@mgdis/mg-components 6.21.0 → 6.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-CCsGMNyq.js → index-BxB20_Vw.js} +8 -0
- package/dist/cjs/{index-C2viYwrR.js → index-Dz2LAZQT.js} +329 -1789
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{mg-action-more_37.cjs.entry.js → mg-action-more_36.cjs.entry.js} +200 -242
- package/dist/cjs/mg-alert.cjs.entry.js +3 -3
- package/dist/cjs/mg-breadcrumb.cjs.entry.js +63 -0
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-fieldset.cjs.entry.js +2 -2
- package/dist/cjs/mg-input-combobox.cjs.entry.js +4 -4
- package/dist/cjs/mg-input-file.cjs.entry.js +4 -4
- package/dist/cjs/mg-input-rich-text-editor.cjs.entry.js +40095 -15808
- package/dist/cjs/mg-loader.cjs.entry.js +3 -3
- package/dist/cjs/mg-progress.cjs.entry.js +2 -2
- package/dist/collection/assets/icons/index.js +1 -1
- package/dist/collection/collection-manifest.json +4 -3
- package/dist/collection/components/atoms/internals/mg-character-left/mg-character-left.js +1 -1
- package/dist/collection/components/atoms/internals/mg-input-title/mg-input-title.js +1 -1
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +2 -1
- package/dist/collection/components/atoms/mg-button/mg-button.js +6 -3
- package/dist/collection/components/atoms/mg-card/mg-card.js +3 -2
- package/dist/collection/components/atoms/mg-divider/mg-divider.js +1 -1
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +10 -6
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +3 -2
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip-content/mg-tooltip-content.js +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +3 -2
- package/dist/collection/components/molecules/inputs/mg-input/mg-input.js +5 -3
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.js +2 -2
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.js +38 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +3 -2
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +47 -26
- package/dist/collection/components/molecules/inputs/mg-input-combobox/mg-input-combobox.js +13 -7
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +3 -2
- package/dist/collection/components/molecules/inputs/mg-input-file/mg-input-file.js +4 -3
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +9 -5
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +6 -4
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +5 -3
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/custom-properties.scss +212 -0
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.conf.js +1 -0
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/editor/index.js +300 -94
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.conf.js +29 -0
- package/dist/collection/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.js +164 -51
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +22 -8
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +12 -7
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +5 -3
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +7 -4
- package/dist/collection/components/molecules/internals/mg-item-more/mg-item-more.js +7 -38
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.conf.js +0 -4
- package/dist/collection/components/molecules/menus/mg-menu/mg-menu.js +24 -44
- package/dist/collection/components/molecules/menus/mg-menu-item/mg-menu-item.js +69 -40
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +11 -7
- package/dist/collection/components/molecules/mg-alert/mg-alert.js +5 -3
- package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.conf.js +1 -0
- package/dist/collection/components/molecules/mg-breadcrumb/mg-breadcrumb.js +93 -0
- package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
- package/dist/collection/components/molecules/mg-fieldset/mg-fieldset.js +3 -2
- package/dist/collection/components/molecules/mg-form/mg-form.js +5 -3
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +5 -3
- package/dist/collection/components/molecules/mg-loader/mg-loader.js +1 -1
- package/dist/collection/components/molecules/mg-message/mg-message.js +6 -4
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +4 -3
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +2 -1
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +5 -3
- package/dist/collection/components/molecules/mg-popover/mg-popover-content/mg-popover-content.js +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +3 -2
- package/dist/collection/components/molecules/mg-progress/mg-progress.js +3 -2
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +3 -2
- package/dist/collection/components/molecules/mg-table/mg-table.js +41 -2
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.conf.js +0 -4
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +15 -34
- package/dist/collection/locales/en/messages.json +3 -0
- package/dist/collection/locales/fr/messages.json +3 -0
- package/dist/components/index2.js +1 -1
- package/dist/components/index3.js +1 -1
- package/dist/components/mg-action-more.js +1 -1
- package/dist/components/mg-alert.js +1 -1
- package/dist/components/mg-breadcrumb.d.ts +11 -0
- package/dist/components/mg-breadcrumb.js +1 -0
- package/dist/components/mg-card2.js +1 -1
- package/dist/components/mg-character-left2.js +1 -1
- package/dist/components/mg-details.js +1 -1
- package/dist/components/mg-divider2.js +1 -1
- package/dist/components/mg-fieldset.js +1 -1
- package/dist/components/mg-form.js +1 -1
- package/dist/components/mg-icon2.js +1 -1
- package/dist/components/mg-illustrated-message.js +1 -1
- package/dist/components/mg-input-checkbox.js +1 -1
- package/dist/components/mg-input-combobox.js +1 -1
- package/dist/components/mg-input-date.js +1 -1
- package/dist/components/mg-input-file.js +1 -1
- package/dist/components/mg-input-numeric.js +1 -1
- package/dist/components/mg-input-password.js +1 -1
- package/dist/components/mg-input-radio.js +1 -1
- package/dist/components/mg-input-rich-text-editor.js +1663 -1
- package/dist/components/mg-input-select2.js +1 -1
- package/dist/components/mg-input-text2.js +1 -1
- package/dist/components/mg-input-textarea.js +1 -1
- package/dist/components/mg-input-title2.js +1 -1
- package/dist/components/mg-input-toggle.js +1 -1
- package/dist/components/mg-input2.js +1 -1
- package/dist/components/mg-item-more2.js +1 -1
- package/dist/components/mg-loader2.js +1 -1
- package/dist/components/mg-menu-item2.js +1 -1
- package/dist/components/mg-message2.js +1 -1
- package/dist/components/mg-modal.js +1 -1
- package/dist/components/mg-panel.js +1 -1
- package/dist/components/mg-popover-content2.js +1 -1
- package/dist/components/mg-popover2.js +1 -1
- package/dist/components/mg-progress.js +1 -1
- package/dist/components/mg-skip-links.js +1 -1
- package/dist/components/mg-table.js +1 -1
- package/dist/components/mg-tabs2.js +1 -1
- package/dist/components/mg-tag.js +1 -1
- package/dist/components/mg-tooltip-content2.js +1 -1
- package/dist/components/mg-tooltip2.js +1 -1
- package/dist/esm/{index-DFwaH2hS.js → index-C3jUhxdI.js} +329 -1789
- package/dist/esm/{index-D-uaxCxH.js → index-DSEloqPn.js} +8 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mg-action-more_37.entry.js → mg-action-more_36.entry.js} +202 -243
- package/dist/esm/mg-alert.entry.js +3 -3
- package/dist/esm/mg-breadcrumb.entry.js +61 -0
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-fieldset.entry.js +2 -2
- package/dist/esm/mg-input-combobox.entry.js +4 -4
- package/dist/esm/mg-input-file.entry.js +4 -4
- package/dist/esm/mg-input-rich-text-editor.entry.js +40082 -15795
- package/dist/esm/mg-loader.entry.js +3 -3
- package/dist/esm/mg-progress.entry.js +2 -2
- package/dist/mg-components/locales/en/messages.json +3 -0
- package/dist/mg-components/locales/fr/messages.json +3 -0
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-6b57f249.entry.js → p-06fbdb2f.entry.js} +1 -1
- package/dist/mg-components/{p-c3d116b9.entry.js → p-188b9ca9.entry.js} +1 -1
- package/dist/mg-components/p-4667078d.entry.js +1 -0
- package/dist/mg-components/p-5a859ecf.entry.js +1658 -0
- package/dist/mg-components/p-661da56b.entry.js +1 -0
- package/dist/mg-components/{p-988c282e.entry.js → p-8e256086.entry.js} +1 -1
- package/dist/mg-components/p-C3jUhxdI.js +2 -0
- package/dist/mg-components/p-DSEloqPn.js +1 -0
- package/dist/mg-components/{p-6b655830.entry.js → p-b0b8c58f.entry.js} +1 -1
- package/dist/mg-components/{p-dd1934f4.entry.js → p-bbcef41c.entry.js} +1 -1
- package/dist/mg-components/{p-4175dcbe.entry.js → p-c1aeb277.entry.js} +1 -1
- package/dist/types/assets/icons/index.d.ts +2 -0
- package/dist/types/components/molecules/inputs/mg-input/mg-input.conf.d.ts +1 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxList.d.ts +2 -2
- package/dist/types/components/molecules/inputs/mg-input-checkbox/MgInputCheckboxPaginated.d.ts +8 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +16 -8
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +15 -5
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/editor/editor.conf.d.ts +17 -0
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/editor/index.d.ts +27 -19
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.conf.d.ts +3 -0
- package/dist/types/components/molecules/inputs/mg-input-rich-text-editor/mg-input-rich-text-editor.d.ts +48 -14
- package/dist/types/components/molecules/inputs/mg-input-select/mg-input-select.d.ts +1 -1
- package/dist/types/components/molecules/internals/mg-item-more/mg-item-more.conf.d.ts +0 -5
- package/dist/types/components/molecules/internals/mg-item-more/mg-item-more.d.ts +1 -6
- package/dist/types/components/molecules/menus/mg-menu/mg-menu.conf.d.ts +2 -10
- package/dist/types/components/molecules/menus/mg-menu/mg-menu.d.ts +7 -7
- package/dist/types/components/molecules/menus/mg-menu-item/mg-menu-item.d.ts +12 -8
- package/dist/types/components/molecules/mg-breadcrumb/mg-breadcrumb.conf.d.ts +18 -0
- package/dist/types/components/molecules/mg-breadcrumb/mg-breadcrumb.d.ts +34 -0
- package/dist/types/components/molecules/mg-table/mg-table.d.ts +6 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.conf.d.ts +1 -9
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +4 -4
- package/dist/types/components.d.ts +617 -207
- package/dist/types/stencil-public-runtime.d.ts +52 -2
- package/ide/intellij/web-types.json +143 -55
- package/ide/vscode/css-custom-data.json +10 -2
- package/ide/vscode/html-custom-data.json +113 -34
- package/package.json +24 -23
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +0 -245
- package/dist/components/mg-input-checkbox-paginated.d.ts +0 -11
- package/dist/components/mg-input-checkbox-paginated.js +0 -1
- package/dist/components/mg-input-checkbox-paginated2.js +0 -1
- package/dist/mg-components/p-08fa327b.entry.js +0 -1
- package/dist/mg-components/p-D-uaxCxH.js +0 -1
- package/dist/mg-components/p-DFwaH2hS.js +0 -2
- package/dist/mg-components/p-a79b1f19.entry.js +0 -1
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +0 -77
|
@@ -25,254 +25,22 @@ const globalScripts = () => {};
|
|
|
25
25
|
const globalStyles = ":root{--mg-b-size-4:0.4rem;--mg-b-size-8:0.8rem;--mg-b-size-12:1.2rem;--mg-b-size-16:1.6rem;--mg-b-size-20:2rem;--mg-b-size-24:2.4rem;--mg-b-size-32:3.2rem;--mg-b-size-40:4rem;--mg-b-size-48:4.8rem;--mg-b-size-56:5.6rem;--mg-b-size-64:6.4rem;--mg-b-size-72:7.2rem;--mg-b-size-120:12rem;--mg-b-size-border:0.1rem;--mg-b-size-radius:var(--mg-b-size-4);--mg-b-size-floating-element-max-width:40rem;--mg-b-size-min-height:3.5rem;--mg-b-spacing-actions:var(--mg-b-size-8);--mg-b-color-blue-10:rgb(227, 244, 255);--mg-b-color-blue-20:rgb(209, 237, 255);--mg-b-color-blue-30:rgb(166, 219, 255);--mg-b-color-blue-40:rgb(106, 195, 255);--mg-b-color-blue-50:rgb(64, 179, 255);--mg-b-color-blue-60:rgb(22, 162, 255);--mg-b-color-blue-70:rgb(0, 132, 220);--mg-b-color-blue-80:rgb(0, 94, 156);--mg-b-color-blue-90:rgb(0, 67, 111);--mg-b-color-blue-100:rgb(0, 39, 66);--mg-b-color-green-10:rgb(234, 251, 244);--mg-b-color-green-20:rgb(212, 247, 234);--mg-b-color-green-30:rgb(181, 240, 219);--mg-b-color-green-40:rgb(144, 232, 202);--mg-b-color-green-50:rgb(97, 223, 179);--mg-b-color-green-60:rgb(50, 213, 156);--mg-b-color-green-70:rgb(46, 194, 142);--mg-b-color-green-80:rgb(36, 151, 111);--mg-b-color-green-90:rgb(21, 89, 66);--mg-b-color-green-100:rgb(13, 54, 40);--mg-b-color-red-10:rgb(251, 233, 234);--mg-b-color-red-20:rgb(248, 216, 217);--mg-b-color-red-30:rgb(242, 174, 178);--mg-b-color-red-40:rgb(236, 134, 139);--mg-b-color-red-50:rgb(229, 96, 103);--mg-b-color-red-60:rgb(221, 42, 52);--mg-b-color-red-70:rgb(219, 31, 41);--mg-b-color-red-80:rgb(152, 21, 28);--mg-b-color-red-90:rgb(120, 17, 23);--mg-b-color-red-100:rgb(92, 13, 13);--mg-b-color-yellow-10:rgb(255, 247, 230);--mg-b-color-yellow-20:rgb(255, 240, 207);--mg-b-color-yellow-30:rgb(255, 226, 162);--mg-b-color-yellow-40:rgb(255, 212, 118);--mg-b-color-yellow-50:rgb(255, 195, 62);--mg-b-color-yellow-60:rgb(232, 177, 56);--mg-b-color-yellow-70:rgb(181, 138, 44);--mg-b-color-yellow-80:rgb(140, 107, 34);--mg-b-color-yellow-90:rgb(86, 66, 21);--mg-b-color-yellow-100:rgb(53, 41, 13);--mg-b-color-neutral-0:rgb(255, 255, 255);--mg-b-color-neutral-10:rgb(250, 251, 251);--mg-b-color-neutral-20:rgb(236, 238, 238);--mg-b-color-neutral-30:rgb(225, 227, 228);--mg-b-color-neutral-40:rgb(197, 201, 203);--mg-b-color-neutral-50:rgb(182, 188, 190);--mg-b-color-neutral-60:rgb(157, 165, 167);--mg-b-color-neutral-70:rgb(129, 139, 142);--mg-b-color-neutral-80:rgb(101, 113, 117);--mg-b-color-neutral-90:rgb(75, 89, 94);--mg-b-color-neutral-100:rgb(47, 64, 69);--mg-b-color-neutral-110:rgb(21, 40, 46);--mg-b-color-neutral-120:rgb(5, 9, 11);--mg-b-color-dark:var(--mg-b-color-neutral-110);--mg-b-color-light:var(--mg-b-color-neutral-0);--mg-b-color-danger:var(--mg-b-color-red-70);--mg-b-color-text-on-danger:var(--mg-b-color-light);--mg-b-color-info:var(--mg-b-color-blue-80);--mg-b-color-text-on-info:var(--mg-b-color-light);--mg-b-color-success:var(--mg-b-color-green-60);--mg-b-color-text-on-success:var(--mg-b-color-dark);--mg-b-color-warning:var(--mg-b-color-yellow-50);--mg-b-color-text-on-warning:var(--mg-b-color-dark);--mg-b-color-app:var(--mg-b-color-blue-80);--mg-b-color-primary:var(--mg-b-color-neutral-110);--mg-b-color-text-on-primary:var(--mg-b-color-light);--mg-b-color-secondary:var(--mg-b-color-neutral-10);--mg-b-color-text-on-secondary:var(--mg-b-color-dark);--mg-b-font-size:1.3rem;--mg-b-font-size-small:1.17rem;--mg-b-font-size-h1:calc(var(--mg-b-font-size) * 1.85);--mg-b-font-size-h2:calc(var(--mg-b-font-size) * 1.65);--mg-b-font-size-h3:calc(var(--mg-b-font-size) * 1.35);--mg-b-font-size-h4:calc(var(--mg-b-font-size) * 1.2);--mg-b-font-size-h5:calc(var(--mg-b-font-size) * 1.1);--mg-b-font-size-h6:calc(var(--mg-b-font-size) * 0.8);--mg-b-small-font-size:0.9em;--mg-b-font-family:'Open Sans', sans-serif;--mg-b-font-family-heading:var(--mg-b-font-family);--mg-b-line-height:1.4;--mg-b-box-shadow:0 0.3rem 0.8rem 0 color-mix(in srgb, var(--mg-b-color-dark), transparent 85%);--mg-b-opacity-element-disabled:0.4}:root{--mg-c-badge-size:var(--mg-b-size-16);--mg-c-badge-font-size:var(--mg-b-font-size-small);--mg-c-button-border-radius:var(--mg-b-size-radius);--mg-c-button-icon-border-radius:var(--mg-b-size-min-height);--mg-c-button-color-background-danger:var(--mg-b-color-danger);--mg-c-button-color-border-danger:var(--mg-b-color-red-80);--mg-c-button-color-gradient-danger:var(--mg-b-color-red-80);--mg-c-button-color-text-danger:var(--mg-b-color-text-on-danger);--mg-c-button-color-background-info:var(--mg-b-color-info);--mg-c-button-color-border-info:var(--mg-b-color-blue-90);--mg-c-button-color-gradient-info:var(--mg-b-color-blue-90);--mg-c-button-color-text-info:var(--mg-b-color-text-on-info);--mg-c-button-color-background-success:var(--mg-b-color-success);--mg-c-button-color-border-success:var(--mg-b-color-green-70);--mg-c-button-color-gradient-success:var(--mg-b-color-green-70);--mg-c-button-color-text-success:var(--mg-b-color-text-on-success);--mg-c-button-color-background-warning:var(--mg-b-color-warning);--mg-c-button-color-border-warning:var(--mg-b-color-yellow-60);--mg-c-button-color-gradient-warning:var(--mg-b-color-yellow-60);--mg-c-button-color-text-warning:var(--mg-b-color-text-on-warning);--mg-c-button-color-background-primary:var(--mg-b-color-primary);--mg-c-button-color-border-primary:var(--mg-b-color-neutral-120);--mg-c-button-color-gradient-primary:var(--mg-b-color-neutral-120);--mg-c-button-color-text-primary:var(--mg-b-color-text-on-primary);--mg-c-button-color-background-secondary:var(--mg-b-color-secondary);--mg-c-button-color-border-secondary:var(--mg-b-color-neutral-20);--mg-c-button-color-gradient-secondary:var(--mg-b-color-neutral-20);--mg-c-button-color-text-secondary:var(--mg-b-color-text-on-secondary);--mg-c-button-color-background-danger-alt:var(--mg-b-color-neutral-10);--mg-c-button-color-border-danger-alt:var(--mg-b-color-neutral-20);--mg-c-button-color-gradient-danger-alt:var(--mg-b-color-neutral-20);--mg-c-button-color-text-danger-alt:var(--mg-b-color-danger);--mg-c-card-spacing-default:var(--mg-b-size-16);--mg-c-card-border-radius-default:var(--mg-b-size-12);--mg-c-card-color-background-default:var(--mg-b-color-light);--mg-c-card-border-default:var(--mg-b-size-border) solid var(--mg-b-color-neutral-30);--mg-c-card-box-shadow-default:var(--mg-b-box-shadow);--mg-c-divider-color-background:color-mix(in srgb, var(--mg-b-color-dark), transparent 85%);--mg-c-divider-thickness:var(--mg-b-size-border);--mg-c-divider-spacing-vertical:var(--mg-b-size-40);--mg-c-icon-border-radius:50%;--mg-c-tag-height:var(--mg-b-size-24);--mg-c-tag-border-radius:var(--mg-b-size-radius);--mg-c-tag-font-size:var(--mg-b-font-size-small);--mg-c-tooltip-border-radius:var(--mg-b-size-radius);--mg-c-tooltip-color-background:var(--mg-b-color-dark);--mg-c-tooltip-color-text:var(--mg-b-color-light);--mg-c-details-spacing:var(--mg-b-size-8);--mg-c-illustrated-message-spacing-vertical:var(--mg-b-size-40);--mg-c-input-border-width:var(--mg-b-size-border);--mg-c-input-border-radius:var(--mg-b-size-radius);--mg-c-input-color-border:rgb(181 194 201);--mg-c-input-placeholder-color-text:rgb(181 194 201);--mg-c-input-color-icon:rgb(181 194 201);--mg-c-input-color-box-shadow-focus:rgb(0 221 255 / 50%);--mg-c-input-error-color-background:color-mix(in srgb, var(--mg-b-color-danger), white 95%);--mg-c-input-toggle-border-radius-ratio:2;--mg-c-input-check-size:var(--mg-b-size-16);--mg-c-menu-item-color:var(--mg-b-color-app);--mg-c-message-border-radius:var(--mg-b-size-radius);--mg-c-modal-border-radius:var(--mg-c-card-border-radius-default);--mg-c-modal-title-font-size:var(--mg-b-font-size-h3);--mg-c-panel-border-radius:var(--mg-c-card-border-radius-default);--mg-c-panel-box-shadow:var(--mg-b-box-shadow);--mg-c-panel-content-spacing:var(--mg-b-size-16);--mg-c-popover-border-radius:var(--mg-c-card-border-radius-default);--mg-c-popover-color-background:var(--mg-b-color-light);--mg-c-popover-color-text:var(--mg-b-color-dark);--mg-c-popover-title-font-size:var(--mg-b-font-size-h5);--mg-c-popover-max-width:var(--mg-b-size-floating-element-max-width);--mg-c-progress-size:var(--mg-b-size-8);--mg-c-progress-border-color:var(--mg-b-color-neutral-80);--mg-c-progress-bar-color-background:var(--mg-b-color-neutral-30);--mg-c-progress-fill-color-background:var(--mg-b-color-app);--mg-c-tabs-color:var(--mg-b-color-app)}html{font-size:62.5%}body{font-family:var(--mg-b-font-family);font-size:var(--mg-b-font-size);-webkit-font-smoothing:antialiased;line-height:var(--mg-b-line-height)}:root{--mg-b-font-family:system-ui, sans-serif}";
|
|
26
26
|
|
|
27
27
|
/*
|
|
28
|
-
Stencil Client Platform v4.
|
|
28
|
+
Stencil Client Platform v4.43.4 | MIT Licensed | https://stenciljs.com
|
|
29
29
|
*/
|
|
30
|
-
var __create = Object.create;
|
|
31
|
-
var __defProp = Object.defineProperty;
|
|
32
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
33
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
34
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
35
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
36
|
-
var __typeError = (msg) => {
|
|
37
|
-
throw TypeError(msg);
|
|
38
|
-
};
|
|
39
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
40
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
41
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
42
|
-
};
|
|
43
|
-
var __export = (target, all) => {
|
|
44
|
-
for (var name in all)
|
|
45
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
46
|
-
};
|
|
47
|
-
var __copyProps = (to, from, except, desc) => {
|
|
48
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
49
|
-
for (let key of __getOwnPropNames(from))
|
|
50
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
51
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
52
|
-
}
|
|
53
|
-
return to;
|
|
54
|
-
};
|
|
55
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
56
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
57
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
58
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
59
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
60
|
-
__defProp(target, "default", { value: mod, enumerable: true }) ,
|
|
61
|
-
mod
|
|
62
|
-
));
|
|
63
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
|
64
|
-
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
65
|
-
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
66
|
-
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);
|
|
67
|
-
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
68
|
-
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
69
30
|
|
|
70
|
-
// node_modules/balanced-match/index.js
|
|
71
|
-
var require_balanced_match = __commonJS({
|
|
72
|
-
"node_modules/balanced-match/index.js"(exports, module) {
|
|
73
|
-
module.exports = balanced;
|
|
74
|
-
function balanced(a, b, str) {
|
|
75
|
-
if (a instanceof RegExp) a = maybeMatch(a, str);
|
|
76
|
-
if (b instanceof RegExp) b = maybeMatch(b, str);
|
|
77
|
-
var r = range(a, b, str);
|
|
78
|
-
return r && {
|
|
79
|
-
start: r[0],
|
|
80
|
-
end: r[1],
|
|
81
|
-
pre: str.slice(0, r[0]),
|
|
82
|
-
body: str.slice(r[0] + a.length, r[1]),
|
|
83
|
-
post: str.slice(r[1] + b.length)
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
function maybeMatch(reg, str) {
|
|
87
|
-
var m = str.match(reg);
|
|
88
|
-
return m ? m[0] : null;
|
|
89
|
-
}
|
|
90
|
-
balanced.range = range;
|
|
91
|
-
function range(a, b, str) {
|
|
92
|
-
var begs, beg, left, right, result;
|
|
93
|
-
var ai = str.indexOf(a);
|
|
94
|
-
var bi = str.indexOf(b, ai + 1);
|
|
95
|
-
var i2 = ai;
|
|
96
|
-
if (ai >= 0 && bi > 0) {
|
|
97
|
-
if (a === b) {
|
|
98
|
-
return [ai, bi];
|
|
99
|
-
}
|
|
100
|
-
begs = [];
|
|
101
|
-
left = str.length;
|
|
102
|
-
while (i2 >= 0 && !result) {
|
|
103
|
-
if (i2 == ai) {
|
|
104
|
-
begs.push(i2);
|
|
105
|
-
ai = str.indexOf(a, i2 + 1);
|
|
106
|
-
} else if (begs.length == 1) {
|
|
107
|
-
result = [begs.pop(), bi];
|
|
108
|
-
} else {
|
|
109
|
-
beg = begs.pop();
|
|
110
|
-
if (beg < left) {
|
|
111
|
-
left = beg;
|
|
112
|
-
right = bi;
|
|
113
|
-
}
|
|
114
|
-
bi = str.indexOf(b, i2 + 1);
|
|
115
|
-
}
|
|
116
|
-
i2 = ai < bi && ai >= 0 ? ai : bi;
|
|
117
|
-
}
|
|
118
|
-
if (begs.length) {
|
|
119
|
-
result = [left, right];
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
return result;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
31
|
|
|
127
|
-
//
|
|
128
|
-
|
|
129
|
-
"
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
135
|
-
var escComma = "\0COMMA" + Math.random() + "\0";
|
|
136
|
-
var escPeriod = "\0PERIOD" + Math.random() + "\0";
|
|
137
|
-
function numeric(str) {
|
|
138
|
-
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
|
|
139
|
-
}
|
|
140
|
-
function escapeBraces(str) {
|
|
141
|
-
return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
|
|
142
|
-
}
|
|
143
|
-
function unescapeBraces(str) {
|
|
144
|
-
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
|
|
145
|
-
}
|
|
146
|
-
function parseCommaParts(str) {
|
|
147
|
-
if (!str)
|
|
148
|
-
return [""];
|
|
149
|
-
var parts = [];
|
|
150
|
-
var m = balanced("{", "}", str);
|
|
151
|
-
if (!m)
|
|
152
|
-
return str.split(",");
|
|
153
|
-
var pre = m.pre;
|
|
154
|
-
var body = m.body;
|
|
155
|
-
var post = m.post;
|
|
156
|
-
var p = pre.split(",");
|
|
157
|
-
p[p.length - 1] += "{" + body + "}";
|
|
158
|
-
var postParts = parseCommaParts(post);
|
|
159
|
-
if (post.length) {
|
|
160
|
-
p[p.length - 1] += postParts.shift();
|
|
161
|
-
p.push.apply(p, postParts);
|
|
162
|
-
}
|
|
163
|
-
parts.push.apply(parts, p);
|
|
164
|
-
return parts;
|
|
165
|
-
}
|
|
166
|
-
function expandTop(str) {
|
|
167
|
-
if (!str)
|
|
168
|
-
return [];
|
|
169
|
-
if (str.substr(0, 2) === "{}") {
|
|
170
|
-
str = "\\{\\}" + str.substr(2);
|
|
171
|
-
}
|
|
172
|
-
return expand2(escapeBraces(str), true).map(unescapeBraces);
|
|
173
|
-
}
|
|
174
|
-
function embrace(str) {
|
|
175
|
-
return "{" + str + "}";
|
|
176
|
-
}
|
|
177
|
-
function isPadded(el) {
|
|
178
|
-
return /^-?0\d/.test(el);
|
|
179
|
-
}
|
|
180
|
-
function lte(i2, y) {
|
|
181
|
-
return i2 <= y;
|
|
182
|
-
}
|
|
183
|
-
function gte(i2, y) {
|
|
184
|
-
return i2 >= y;
|
|
185
|
-
}
|
|
186
|
-
function expand2(str, isTop) {
|
|
187
|
-
var expansions = [];
|
|
188
|
-
var m = balanced("{", "}", str);
|
|
189
|
-
if (!m) return [str];
|
|
190
|
-
var pre = m.pre;
|
|
191
|
-
var post = m.post.length ? expand2(m.post, false) : [""];
|
|
192
|
-
if (/\$$/.test(m.pre)) {
|
|
193
|
-
for (var k = 0; k < post.length; k++) {
|
|
194
|
-
var expansion = pre + "{" + m.body + "}" + post[k];
|
|
195
|
-
expansions.push(expansion);
|
|
196
|
-
}
|
|
197
|
-
} else {
|
|
198
|
-
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
199
|
-
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
200
|
-
var isSequence = isNumericSequence || isAlphaSequence;
|
|
201
|
-
var isOptions = m.body.indexOf(",") >= 0;
|
|
202
|
-
if (!isSequence && !isOptions) {
|
|
203
|
-
if (m.post.match(/,(?!,).*\}/)) {
|
|
204
|
-
str = m.pre + "{" + m.body + escClose + m.post;
|
|
205
|
-
return expand2(str);
|
|
206
|
-
}
|
|
207
|
-
return [str];
|
|
208
|
-
}
|
|
209
|
-
var n;
|
|
210
|
-
if (isSequence) {
|
|
211
|
-
n = m.body.split(/\.\./);
|
|
212
|
-
} else {
|
|
213
|
-
n = parseCommaParts(m.body);
|
|
214
|
-
if (n.length === 1) {
|
|
215
|
-
n = expand2(n[0], false).map(embrace);
|
|
216
|
-
if (n.length === 1) {
|
|
217
|
-
return post.map(function(p) {
|
|
218
|
-
return m.pre + n[0] + p;
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
var N;
|
|
224
|
-
if (isSequence) {
|
|
225
|
-
var x = numeric(n[0]);
|
|
226
|
-
var y = numeric(n[1]);
|
|
227
|
-
var width = Math.max(n[0].length, n[1].length);
|
|
228
|
-
var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
|
|
229
|
-
var test = lte;
|
|
230
|
-
var reverse = y < x;
|
|
231
|
-
if (reverse) {
|
|
232
|
-
incr *= -1;
|
|
233
|
-
test = gte;
|
|
234
|
-
}
|
|
235
|
-
var pad = n.some(isPadded);
|
|
236
|
-
N = [];
|
|
237
|
-
for (var i2 = x; test(i2, y); i2 += incr) {
|
|
238
|
-
var c;
|
|
239
|
-
if (isAlphaSequence) {
|
|
240
|
-
c = String.fromCharCode(i2);
|
|
241
|
-
if (c === "\\")
|
|
242
|
-
c = "";
|
|
243
|
-
} else {
|
|
244
|
-
c = String(i2);
|
|
245
|
-
if (pad) {
|
|
246
|
-
var need = width - c.length;
|
|
247
|
-
if (need > 0) {
|
|
248
|
-
var z = new Array(need + 1).join("0");
|
|
249
|
-
if (i2 < 0)
|
|
250
|
-
c = "-" + z + c.slice(1);
|
|
251
|
-
else
|
|
252
|
-
c = z + c;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
N.push(c);
|
|
257
|
-
}
|
|
258
|
-
} else {
|
|
259
|
-
N = [];
|
|
260
|
-
for (var j = 0; j < n.length; j++) {
|
|
261
|
-
N.push.apply(N, expand2(n[j], false));
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
for (var j = 0; j < N.length; j++) {
|
|
265
|
-
for (var k = 0; k < post.length; k++) {
|
|
266
|
-
var expansion = pre + N[j] + post[k];
|
|
267
|
-
if (!isTop || isSequence || expansion)
|
|
268
|
-
expansions.push(expansion);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
return expansions;
|
|
273
|
-
}
|
|
32
|
+
// src/utils/get-prop-descriptor.ts
|
|
33
|
+
function getPropertyDescriptor(obj, memberName, getOnly) {
|
|
34
|
+
const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
|
|
35
|
+
while (obj && obj !== stopAt) {
|
|
36
|
+
const desc = Object.getOwnPropertyDescriptor(obj, memberName);
|
|
37
|
+
if (desc && (!getOnly || desc.get)) return desc;
|
|
38
|
+
obj = Object.getPrototypeOf(obj);
|
|
274
39
|
}
|
|
275
|
-
|
|
40
|
+
return void 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// src/utils/es2022-rewire-class-members.ts
|
|
276
44
|
var reWireGetterSetter = (instance, hostRef) => {
|
|
277
45
|
var _a;
|
|
278
46
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -280,7 +48,7 @@ var reWireGetterSetter = (instance, hostRef) => {
|
|
|
280
48
|
members.map(([memberName, [memberFlags]]) => {
|
|
281
49
|
if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
|
|
282
50
|
const ogValue = instance[memberName];
|
|
283
|
-
const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
|
|
51
|
+
const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName, true) || Object.getOwnPropertyDescriptor(instance, memberName);
|
|
284
52
|
if (ogDescriptor) {
|
|
285
53
|
Object.defineProperty(instance, memberName, {
|
|
286
54
|
get() {
|
|
@@ -293,18 +61,14 @@ var reWireGetterSetter = (instance, hostRef) => {
|
|
|
293
61
|
enumerable: true
|
|
294
62
|
});
|
|
295
63
|
}
|
|
296
|
-
|
|
64
|
+
if (hostRef.$instanceValues$.has(memberName)) {
|
|
65
|
+
instance[memberName] = hostRef.$instanceValues$.get(memberName);
|
|
66
|
+
} else if (ogValue !== void 0) {
|
|
67
|
+
instance[memberName] = ogValue;
|
|
68
|
+
}
|
|
297
69
|
}
|
|
298
70
|
});
|
|
299
71
|
};
|
|
300
|
-
function getPropertyDescriptor(obj, memberName) {
|
|
301
|
-
while (obj) {
|
|
302
|
-
const desc = Object.getOwnPropertyDescriptor(obj, memberName);
|
|
303
|
-
if (desc == null ? void 0 : desc.get) return desc;
|
|
304
|
-
obj = Object.getPrototypeOf(obj);
|
|
305
|
-
}
|
|
306
|
-
return void 0;
|
|
307
|
-
}
|
|
308
72
|
|
|
309
73
|
// src/client/client-host-ref.ts
|
|
310
74
|
var getHostRef = (ref) => {
|
|
@@ -371,6 +135,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
371
135
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
372
136
|
/* webpackMode: "lazy" */
|
|
373
137
|
'./mg-fieldset.cjs.entry.js')); }).then(processMod, consoleError);
|
|
138
|
+
case 'mg-breadcrumb.cjs':
|
|
139
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
140
|
+
/* webpackMode: "lazy" */
|
|
141
|
+
'./mg-breadcrumb.cjs.entry.js')); }).then(processMod, consoleError);
|
|
374
142
|
case 'mg-input-combobox.cjs':
|
|
375
143
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
376
144
|
/* webpackMode: "lazy" */
|
|
@@ -391,10 +159,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
391
159
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
392
160
|
/* webpackMode: "lazy" */
|
|
393
161
|
'./mg-progress.cjs.entry.js')); }).then(processMod, consoleError);
|
|
394
|
-
case 'mg-action-
|
|
162
|
+
case 'mg-action-more_36.cjs':
|
|
395
163
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
396
164
|
/* webpackMode: "lazy" */
|
|
397
|
-
'./mg-action-
|
|
165
|
+
'./mg-action-more_36.cjs.entry.js')); }).then(processMod, consoleError);
|
|
398
166
|
case 'mg-input-rich-text-editor.cjs':
|
|
399
167
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
400
168
|
/* webpackMode: "lazy" */
|
|
@@ -501,1426 +269,6 @@ var flush = () => {
|
|
|
501
269
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
502
270
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
503
271
|
|
|
504
|
-
// src/utils/helpers.ts
|
|
505
|
-
var isDef = (v) => v != null && v !== void 0;
|
|
506
|
-
var isComplexType = (o) => {
|
|
507
|
-
o = typeof o;
|
|
508
|
-
return o === "object" || o === "function";
|
|
509
|
-
};
|
|
510
|
-
|
|
511
|
-
// node_modules/minimatch/dist/esm/index.js
|
|
512
|
-
var import_brace_expansion = __toESM(require_brace_expansion());
|
|
513
|
-
|
|
514
|
-
// node_modules/minimatch/dist/esm/assert-valid-pattern.js
|
|
515
|
-
var MAX_PATTERN_LENGTH = 1024 * 64;
|
|
516
|
-
var assertValidPattern = (pattern) => {
|
|
517
|
-
if (typeof pattern !== "string") {
|
|
518
|
-
throw new TypeError("invalid pattern");
|
|
519
|
-
}
|
|
520
|
-
if (pattern.length > MAX_PATTERN_LENGTH) {
|
|
521
|
-
throw new TypeError("pattern is too long");
|
|
522
|
-
}
|
|
523
|
-
};
|
|
524
|
-
|
|
525
|
-
// node_modules/minimatch/dist/esm/brace-expressions.js
|
|
526
|
-
var posixClasses = {
|
|
527
|
-
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
|
|
528
|
-
"[:alpha:]": ["\\p{L}\\p{Nl}", true],
|
|
529
|
-
"[:ascii:]": ["\\x00-\\x7f", false],
|
|
530
|
-
"[:blank:]": ["\\p{Zs}\\t", true],
|
|
531
|
-
"[:cntrl:]": ["\\p{Cc}", true],
|
|
532
|
-
"[:digit:]": ["\\p{Nd}", true],
|
|
533
|
-
"[:graph:]": ["\\p{Z}\\p{C}", true, true],
|
|
534
|
-
"[:lower:]": ["\\p{Ll}", true],
|
|
535
|
-
"[:print:]": ["\\p{C}", true],
|
|
536
|
-
"[:punct:]": ["\\p{P}", true],
|
|
537
|
-
"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
|
|
538
|
-
"[:upper:]": ["\\p{Lu}", true],
|
|
539
|
-
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
|
|
540
|
-
"[:xdigit:]": ["A-Fa-f0-9", false]
|
|
541
|
-
};
|
|
542
|
-
var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
|
|
543
|
-
var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
544
|
-
var rangesToString = (ranges) => ranges.join("");
|
|
545
|
-
var parseClass = (glob, position) => {
|
|
546
|
-
const pos = position;
|
|
547
|
-
if (glob.charAt(pos) !== "[") {
|
|
548
|
-
throw new Error("not in a brace expression");
|
|
549
|
-
}
|
|
550
|
-
const ranges = [];
|
|
551
|
-
const negs = [];
|
|
552
|
-
let i2 = pos + 1;
|
|
553
|
-
let sawStart = false;
|
|
554
|
-
let uflag = false;
|
|
555
|
-
let escaping = false;
|
|
556
|
-
let negate = false;
|
|
557
|
-
let endPos = pos;
|
|
558
|
-
let rangeStart = "";
|
|
559
|
-
WHILE: while (i2 < glob.length) {
|
|
560
|
-
const c = glob.charAt(i2);
|
|
561
|
-
if ((c === "!" || c === "^") && i2 === pos + 1) {
|
|
562
|
-
negate = true;
|
|
563
|
-
i2++;
|
|
564
|
-
continue;
|
|
565
|
-
}
|
|
566
|
-
if (c === "]" && sawStart && !escaping) {
|
|
567
|
-
endPos = i2 + 1;
|
|
568
|
-
break;
|
|
569
|
-
}
|
|
570
|
-
sawStart = true;
|
|
571
|
-
if (c === "\\") {
|
|
572
|
-
if (!escaping) {
|
|
573
|
-
escaping = true;
|
|
574
|
-
i2++;
|
|
575
|
-
continue;
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
if (c === "[" && !escaping) {
|
|
579
|
-
for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
|
|
580
|
-
if (glob.startsWith(cls, i2)) {
|
|
581
|
-
if (rangeStart) {
|
|
582
|
-
return ["$.", false, glob.length - pos, true];
|
|
583
|
-
}
|
|
584
|
-
i2 += cls.length;
|
|
585
|
-
if (neg)
|
|
586
|
-
negs.push(unip);
|
|
587
|
-
else
|
|
588
|
-
ranges.push(unip);
|
|
589
|
-
uflag = uflag || u;
|
|
590
|
-
continue WHILE;
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
escaping = false;
|
|
595
|
-
if (rangeStart) {
|
|
596
|
-
if (c > rangeStart) {
|
|
597
|
-
ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
|
|
598
|
-
} else if (c === rangeStart) {
|
|
599
|
-
ranges.push(braceEscape(c));
|
|
600
|
-
}
|
|
601
|
-
rangeStart = "";
|
|
602
|
-
i2++;
|
|
603
|
-
continue;
|
|
604
|
-
}
|
|
605
|
-
if (glob.startsWith("-]", i2 + 1)) {
|
|
606
|
-
ranges.push(braceEscape(c + "-"));
|
|
607
|
-
i2 += 2;
|
|
608
|
-
continue;
|
|
609
|
-
}
|
|
610
|
-
if (glob.startsWith("-", i2 + 1)) {
|
|
611
|
-
rangeStart = c;
|
|
612
|
-
i2 += 2;
|
|
613
|
-
continue;
|
|
614
|
-
}
|
|
615
|
-
ranges.push(braceEscape(c));
|
|
616
|
-
i2++;
|
|
617
|
-
}
|
|
618
|
-
if (endPos < i2) {
|
|
619
|
-
return ["", false, 0, false];
|
|
620
|
-
}
|
|
621
|
-
if (!ranges.length && !negs.length) {
|
|
622
|
-
return ["$.", false, glob.length - pos, true];
|
|
623
|
-
}
|
|
624
|
-
if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) {
|
|
625
|
-
const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
|
|
626
|
-
return [regexpEscape(r), false, endPos - pos, false];
|
|
627
|
-
}
|
|
628
|
-
const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]";
|
|
629
|
-
const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
|
|
630
|
-
const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs;
|
|
631
|
-
return [comb, uflag, endPos - pos, true];
|
|
632
|
-
};
|
|
633
|
-
|
|
634
|
-
// node_modules/minimatch/dist/esm/unescape.js
|
|
635
|
-
var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
636
|
-
return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
637
|
-
};
|
|
638
|
-
|
|
639
|
-
// node_modules/minimatch/dist/esm/ast.js
|
|
640
|
-
var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
|
|
641
|
-
var isExtglobType = (c) => types.has(c);
|
|
642
|
-
var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
|
|
643
|
-
var startNoDot = "(?!\\.)";
|
|
644
|
-
var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
|
|
645
|
-
var justDots = /* @__PURE__ */ new Set(["..", "."]);
|
|
646
|
-
var reSpecials = new Set("().*{}+?[]^$\\!");
|
|
647
|
-
var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
648
|
-
var qmark = "[^/]";
|
|
649
|
-
var star = qmark + "*?";
|
|
650
|
-
var starNoEmpty = qmark + "+?";
|
|
651
|
-
var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
|
|
652
|
-
var _AST = class _AST {
|
|
653
|
-
constructor(type, parent, options = {}) {
|
|
654
|
-
__privateAdd(this, _AST_instances);
|
|
655
|
-
__publicField(this, "type");
|
|
656
|
-
__privateAdd(this, _root);
|
|
657
|
-
__privateAdd(this, _hasMagic);
|
|
658
|
-
__privateAdd(this, _uflag, false);
|
|
659
|
-
__privateAdd(this, _parts, []);
|
|
660
|
-
__privateAdd(this, _parent);
|
|
661
|
-
__privateAdd(this, _parentIndex);
|
|
662
|
-
__privateAdd(this, _negs);
|
|
663
|
-
__privateAdd(this, _filledNegs, false);
|
|
664
|
-
__privateAdd(this, _options);
|
|
665
|
-
__privateAdd(this, _toString);
|
|
666
|
-
// set to true if it's an extglob with no children
|
|
667
|
-
// (which really means one child of '')
|
|
668
|
-
__privateAdd(this, _emptyExt, false);
|
|
669
|
-
this.type = type;
|
|
670
|
-
if (type)
|
|
671
|
-
__privateSet(this, _hasMagic, true);
|
|
672
|
-
__privateSet(this, _parent, parent);
|
|
673
|
-
__privateSet(this, _root, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _root) : this);
|
|
674
|
-
__privateSet(this, _options, __privateGet(this, _root) === this ? options : __privateGet(__privateGet(this, _root), _options));
|
|
675
|
-
__privateSet(this, _negs, __privateGet(this, _root) === this ? [] : __privateGet(__privateGet(this, _root), _negs));
|
|
676
|
-
if (type === "!" && !__privateGet(__privateGet(this, _root), _filledNegs))
|
|
677
|
-
__privateGet(this, _negs).push(this);
|
|
678
|
-
__privateSet(this, _parentIndex, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0);
|
|
679
|
-
}
|
|
680
|
-
get hasMagic() {
|
|
681
|
-
if (__privateGet(this, _hasMagic) !== void 0)
|
|
682
|
-
return __privateGet(this, _hasMagic);
|
|
683
|
-
for (const p of __privateGet(this, _parts)) {
|
|
684
|
-
if (typeof p === "string")
|
|
685
|
-
continue;
|
|
686
|
-
if (p.type || p.hasMagic)
|
|
687
|
-
return __privateSet(this, _hasMagic, true);
|
|
688
|
-
}
|
|
689
|
-
return __privateGet(this, _hasMagic);
|
|
690
|
-
}
|
|
691
|
-
// reconstructs the pattern
|
|
692
|
-
toString() {
|
|
693
|
-
if (__privateGet(this, _toString) !== void 0)
|
|
694
|
-
return __privateGet(this, _toString);
|
|
695
|
-
if (!this.type) {
|
|
696
|
-
return __privateSet(this, _toString, __privateGet(this, _parts).map((p) => String(p)).join(""));
|
|
697
|
-
} else {
|
|
698
|
-
return __privateSet(this, _toString, this.type + "(" + __privateGet(this, _parts).map((p) => String(p)).join("|") + ")");
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
push(...parts) {
|
|
702
|
-
for (const p of parts) {
|
|
703
|
-
if (p === "")
|
|
704
|
-
continue;
|
|
705
|
-
if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
|
|
706
|
-
throw new Error("invalid part: " + p);
|
|
707
|
-
}
|
|
708
|
-
__privateGet(this, _parts).push(p);
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
toJSON() {
|
|
712
|
-
var _a;
|
|
713
|
-
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())];
|
|
714
|
-
if (this.isStart() && !this.type)
|
|
715
|
-
ret.unshift([]);
|
|
716
|
-
if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")) {
|
|
717
|
-
ret.push({});
|
|
718
|
-
}
|
|
719
|
-
return ret;
|
|
720
|
-
}
|
|
721
|
-
isStart() {
|
|
722
|
-
var _a;
|
|
723
|
-
if (__privateGet(this, _root) === this)
|
|
724
|
-
return true;
|
|
725
|
-
if (!((_a = __privateGet(this, _parent)) == null ? void 0 : _a.isStart()))
|
|
726
|
-
return false;
|
|
727
|
-
if (__privateGet(this, _parentIndex) === 0)
|
|
728
|
-
return true;
|
|
729
|
-
const p = __privateGet(this, _parent);
|
|
730
|
-
for (let i2 = 0; i2 < __privateGet(this, _parentIndex); i2++) {
|
|
731
|
-
const pp = __privateGet(p, _parts)[i2];
|
|
732
|
-
if (!(pp instanceof _AST && pp.type === "!")) {
|
|
733
|
-
return false;
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
return true;
|
|
737
|
-
}
|
|
738
|
-
isEnd() {
|
|
739
|
-
var _a, _b, _c;
|
|
740
|
-
if (__privateGet(this, _root) === this)
|
|
741
|
-
return true;
|
|
742
|
-
if (((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")
|
|
743
|
-
return true;
|
|
744
|
-
if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
|
|
745
|
-
return false;
|
|
746
|
-
if (!this.type)
|
|
747
|
-
return (_c = __privateGet(this, _parent)) == null ? void 0 : _c.isEnd();
|
|
748
|
-
const pl = __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0;
|
|
749
|
-
return __privateGet(this, _parentIndex) === pl - 1;
|
|
750
|
-
}
|
|
751
|
-
copyIn(part) {
|
|
752
|
-
if (typeof part === "string")
|
|
753
|
-
this.push(part);
|
|
754
|
-
else
|
|
755
|
-
this.push(part.clone(this));
|
|
756
|
-
}
|
|
757
|
-
clone(parent) {
|
|
758
|
-
const c = new _AST(this.type, parent);
|
|
759
|
-
for (const p of __privateGet(this, _parts)) {
|
|
760
|
-
c.copyIn(p);
|
|
761
|
-
}
|
|
762
|
-
return c;
|
|
763
|
-
}
|
|
764
|
-
static fromGlob(pattern, options = {}) {
|
|
765
|
-
var _a;
|
|
766
|
-
const ast = new _AST(null, void 0, options);
|
|
767
|
-
__privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, pattern, ast, 0, options);
|
|
768
|
-
return ast;
|
|
769
|
-
}
|
|
770
|
-
// returns the regular expression if there's magic, or the unescaped
|
|
771
|
-
// string if not.
|
|
772
|
-
toMMPattern() {
|
|
773
|
-
if (this !== __privateGet(this, _root))
|
|
774
|
-
return __privateGet(this, _root).toMMPattern();
|
|
775
|
-
const glob = this.toString();
|
|
776
|
-
const [re, body, hasMagic, uflag] = this.toRegExpSource();
|
|
777
|
-
const anyMagic = hasMagic || __privateGet(this, _hasMagic) || __privateGet(this, _options).nocase && !__privateGet(this, _options).nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase();
|
|
778
|
-
if (!anyMagic) {
|
|
779
|
-
return body;
|
|
780
|
-
}
|
|
781
|
-
const flags = (__privateGet(this, _options).nocase ? "i" : "") + (uflag ? "u" : "");
|
|
782
|
-
return Object.assign(new RegExp(`^${re}$`, flags), {
|
|
783
|
-
_src: re,
|
|
784
|
-
_glob: glob
|
|
785
|
-
});
|
|
786
|
-
}
|
|
787
|
-
get options() {
|
|
788
|
-
return __privateGet(this, _options);
|
|
789
|
-
}
|
|
790
|
-
// returns the string match, the regexp source, whether there's magic
|
|
791
|
-
// in the regexp (so a regular expression is required) and whether or
|
|
792
|
-
// not the uflag is needed for the regular expression (for posix classes)
|
|
793
|
-
// TODO: instead of injecting the start/end at this point, just return
|
|
794
|
-
// the BODY of the regexp, along with the start/end portions suitable
|
|
795
|
-
// for binding the start/end in either a joined full-path makeRe context
|
|
796
|
-
// (where we bind to (^|/), or a standalone matchPart context (where
|
|
797
|
-
// we bind to ^, and not /). Otherwise slashes get duped!
|
|
798
|
-
//
|
|
799
|
-
// In part-matching mode, the start is:
|
|
800
|
-
// - if not isStart: nothing
|
|
801
|
-
// - if traversal possible, but not allowed: ^(?!\.\.?$)
|
|
802
|
-
// - if dots allowed or not possible: ^
|
|
803
|
-
// - if dots possible and not allowed: ^(?!\.)
|
|
804
|
-
// end is:
|
|
805
|
-
// - if not isEnd(): nothing
|
|
806
|
-
// - else: $
|
|
807
|
-
//
|
|
808
|
-
// In full-path matching mode, we put the slash at the START of the
|
|
809
|
-
// pattern, so start is:
|
|
810
|
-
// - if first pattern: same as part-matching mode
|
|
811
|
-
// - if not isStart(): nothing
|
|
812
|
-
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
|
|
813
|
-
// - if dots allowed or not possible: /
|
|
814
|
-
// - if dots possible and not allowed: /(?!\.)
|
|
815
|
-
// end is:
|
|
816
|
-
// - if last pattern, same as part-matching mode
|
|
817
|
-
// - else nothing
|
|
818
|
-
//
|
|
819
|
-
// Always put the (?:$|/) on negated tails, though, because that has to be
|
|
820
|
-
// there to bind the end of the negated pattern portion, and it's easier to
|
|
821
|
-
// just stick it in now rather than try to inject it later in the middle of
|
|
822
|
-
// the pattern.
|
|
823
|
-
//
|
|
824
|
-
// We can just always return the same end, and leave it up to the caller
|
|
825
|
-
// to know whether it's going to be used joined or in parts.
|
|
826
|
-
// And, if the start is adjusted slightly, can do the same there:
|
|
827
|
-
// - if not isStart: nothing
|
|
828
|
-
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
|
|
829
|
-
// - if dots allowed or not possible: (?:/|^)
|
|
830
|
-
// - if dots possible and not allowed: (?:/|^)(?!\.)
|
|
831
|
-
//
|
|
832
|
-
// But it's better to have a simpler binding without a conditional, for
|
|
833
|
-
// performance, so probably better to return both start options.
|
|
834
|
-
//
|
|
835
|
-
// Then the caller just ignores the end if it's not the first pattern,
|
|
836
|
-
// and the start always gets applied.
|
|
837
|
-
//
|
|
838
|
-
// But that's always going to be $ if it's the ending pattern, or nothing,
|
|
839
|
-
// so the caller can just attach $ at the end of the pattern when building.
|
|
840
|
-
//
|
|
841
|
-
// So the todo is:
|
|
842
|
-
// - better detect what kind of start is needed
|
|
843
|
-
// - return both flavors of starting pattern
|
|
844
|
-
// - attach $ at the end of the pattern when creating the actual RegExp
|
|
845
|
-
//
|
|
846
|
-
// Ah, but wait, no, that all only applies to the root when the first pattern
|
|
847
|
-
// is not an extglob. If the first pattern IS an extglob, then we need all
|
|
848
|
-
// that dot prevention biz to live in the extglob portions, because eg
|
|
849
|
-
// +(*|.x*) can match .xy but not .yx.
|
|
850
|
-
//
|
|
851
|
-
// So, return the two flavors if it's #root and the first child is not an
|
|
852
|
-
// AST, otherwise leave it to the child AST to handle it, and there,
|
|
853
|
-
// use the (?:^|/) style of start binding.
|
|
854
|
-
//
|
|
855
|
-
// Even simplified further:
|
|
856
|
-
// - Since the start for a join is eg /(?!\.) and the start for a part
|
|
857
|
-
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
|
|
858
|
-
// or start or whatever) and prepend ^ or / at the Regexp construction.
|
|
859
|
-
toRegExpSource(allowDot) {
|
|
860
|
-
var _a;
|
|
861
|
-
const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
|
|
862
|
-
if (__privateGet(this, _root) === this)
|
|
863
|
-
__privateMethod(this, _AST_instances, fillNegs_fn).call(this);
|
|
864
|
-
if (!this.type) {
|
|
865
|
-
const noEmpty = this.isStart() && this.isEnd();
|
|
866
|
-
const src = __privateGet(this, _parts).map((p) => {
|
|
867
|
-
var _a2;
|
|
868
|
-
const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a2 = _AST, _AST_static, parseGlob_fn).call(_a2, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
|
|
869
|
-
__privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
|
|
870
|
-
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
871
|
-
return re;
|
|
872
|
-
}).join("");
|
|
873
|
-
let start2 = "";
|
|
874
|
-
if (this.isStart()) {
|
|
875
|
-
if (typeof __privateGet(this, _parts)[0] === "string") {
|
|
876
|
-
const dotTravAllowed = __privateGet(this, _parts).length === 1 && justDots.has(__privateGet(this, _parts)[0]);
|
|
877
|
-
if (!dotTravAllowed) {
|
|
878
|
-
const aps = addPatternStart;
|
|
879
|
-
const needNoTrav = (
|
|
880
|
-
// dots are allowed, and the pattern starts with [ or .
|
|
881
|
-
dot && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or .
|
|
882
|
-
src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or .
|
|
883
|
-
src.startsWith("\\.\\.") && aps.has(src.charAt(4))
|
|
884
|
-
);
|
|
885
|
-
const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
|
|
886
|
-
start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
let end = "";
|
|
891
|
-
if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!") {
|
|
892
|
-
end = "(?:$|\\/)";
|
|
893
|
-
}
|
|
894
|
-
const final2 = start2 + src + end;
|
|
895
|
-
return [
|
|
896
|
-
final2,
|
|
897
|
-
unescape(src),
|
|
898
|
-
__privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
|
|
899
|
-
__privateGet(this, _uflag)
|
|
900
|
-
];
|
|
901
|
-
}
|
|
902
|
-
const repeated = this.type === "*" || this.type === "+";
|
|
903
|
-
const start = this.type === "!" ? "(?:(?!(?:" : "(?:";
|
|
904
|
-
let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
|
|
905
|
-
if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
|
|
906
|
-
const s = this.toString();
|
|
907
|
-
__privateSet(this, _parts, [s]);
|
|
908
|
-
this.type = null;
|
|
909
|
-
__privateSet(this, _hasMagic, void 0);
|
|
910
|
-
return [s, unescape(this.toString()), false, false];
|
|
911
|
-
}
|
|
912
|
-
let bodyDotAllowed = !repeated || allowDot || dot || false ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
|
|
913
|
-
if (bodyDotAllowed === body) {
|
|
914
|
-
bodyDotAllowed = "";
|
|
915
|
-
}
|
|
916
|
-
if (bodyDotAllowed) {
|
|
917
|
-
body = `(?:${body})(?:${bodyDotAllowed})*?`;
|
|
918
|
-
}
|
|
919
|
-
let final = "";
|
|
920
|
-
if (this.type === "!" && __privateGet(this, _emptyExt)) {
|
|
921
|
-
final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty;
|
|
922
|
-
} else {
|
|
923
|
-
const close = this.type === "!" ? (
|
|
924
|
-
// !() must match something,but !(x) can match ''
|
|
925
|
-
"))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")"
|
|
926
|
-
) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
|
|
927
|
-
final = start + body + close;
|
|
928
|
-
}
|
|
929
|
-
return [
|
|
930
|
-
final,
|
|
931
|
-
unescape(body),
|
|
932
|
-
__privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
|
|
933
|
-
__privateGet(this, _uflag)
|
|
934
|
-
];
|
|
935
|
-
}
|
|
936
|
-
};
|
|
937
|
-
_root = new WeakMap();
|
|
938
|
-
_hasMagic = new WeakMap();
|
|
939
|
-
_uflag = new WeakMap();
|
|
940
|
-
_parts = new WeakMap();
|
|
941
|
-
_parent = new WeakMap();
|
|
942
|
-
_parentIndex = new WeakMap();
|
|
943
|
-
_negs = new WeakMap();
|
|
944
|
-
_filledNegs = new WeakMap();
|
|
945
|
-
_options = new WeakMap();
|
|
946
|
-
_toString = new WeakMap();
|
|
947
|
-
_emptyExt = new WeakMap();
|
|
948
|
-
_AST_instances = new WeakSet();
|
|
949
|
-
fillNegs_fn = function() {
|
|
950
|
-
if (this !== __privateGet(this, _root))
|
|
951
|
-
throw new Error("should only call on root");
|
|
952
|
-
if (__privateGet(this, _filledNegs))
|
|
953
|
-
return this;
|
|
954
|
-
this.toString();
|
|
955
|
-
__privateSet(this, _filledNegs, true);
|
|
956
|
-
let n;
|
|
957
|
-
while (n = __privateGet(this, _negs).pop()) {
|
|
958
|
-
if (n.type !== "!")
|
|
959
|
-
continue;
|
|
960
|
-
let p = n;
|
|
961
|
-
let pp = __privateGet(p, _parent);
|
|
962
|
-
while (pp) {
|
|
963
|
-
for (let i2 = __privateGet(p, _parentIndex) + 1; !pp.type && i2 < __privateGet(pp, _parts).length; i2++) {
|
|
964
|
-
for (const part of __privateGet(n, _parts)) {
|
|
965
|
-
if (typeof part === "string") {
|
|
966
|
-
throw new Error("string part in extglob AST??");
|
|
967
|
-
}
|
|
968
|
-
part.copyIn(__privateGet(pp, _parts)[i2]);
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
p = pp;
|
|
972
|
-
pp = __privateGet(p, _parent);
|
|
973
|
-
}
|
|
974
|
-
}
|
|
975
|
-
return this;
|
|
976
|
-
};
|
|
977
|
-
_AST_static = new WeakSet();
|
|
978
|
-
parseAST_fn = function(str, ast, pos, opt) {
|
|
979
|
-
var _a, _b;
|
|
980
|
-
let escaping = false;
|
|
981
|
-
let inBrace = false;
|
|
982
|
-
let braceStart = -1;
|
|
983
|
-
let braceNeg = false;
|
|
984
|
-
if (ast.type === null) {
|
|
985
|
-
let i3 = pos;
|
|
986
|
-
let acc2 = "";
|
|
987
|
-
while (i3 < str.length) {
|
|
988
|
-
const c = str.charAt(i3++);
|
|
989
|
-
if (escaping || c === "\\") {
|
|
990
|
-
escaping = !escaping;
|
|
991
|
-
acc2 += c;
|
|
992
|
-
continue;
|
|
993
|
-
}
|
|
994
|
-
if (inBrace) {
|
|
995
|
-
if (i3 === braceStart + 1) {
|
|
996
|
-
if (c === "^" || c === "!") {
|
|
997
|
-
braceNeg = true;
|
|
998
|
-
}
|
|
999
|
-
} else if (c === "]" && !(i3 === braceStart + 2 && braceNeg)) {
|
|
1000
|
-
inBrace = false;
|
|
1001
|
-
}
|
|
1002
|
-
acc2 += c;
|
|
1003
|
-
continue;
|
|
1004
|
-
} else if (c === "[") {
|
|
1005
|
-
inBrace = true;
|
|
1006
|
-
braceStart = i3;
|
|
1007
|
-
braceNeg = false;
|
|
1008
|
-
acc2 += c;
|
|
1009
|
-
continue;
|
|
1010
|
-
}
|
|
1011
|
-
if (!opt.noext && isExtglobType(c) && str.charAt(i3) === "(") {
|
|
1012
|
-
ast.push(acc2);
|
|
1013
|
-
acc2 = "";
|
|
1014
|
-
const ext2 = new _AST(c, ast);
|
|
1015
|
-
i3 = __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, str, ext2, i3, opt);
|
|
1016
|
-
ast.push(ext2);
|
|
1017
|
-
continue;
|
|
1018
|
-
}
|
|
1019
|
-
acc2 += c;
|
|
1020
|
-
}
|
|
1021
|
-
ast.push(acc2);
|
|
1022
|
-
return i3;
|
|
1023
|
-
}
|
|
1024
|
-
let i2 = pos + 1;
|
|
1025
|
-
let part = new _AST(null, ast);
|
|
1026
|
-
const parts = [];
|
|
1027
|
-
let acc = "";
|
|
1028
|
-
while (i2 < str.length) {
|
|
1029
|
-
const c = str.charAt(i2++);
|
|
1030
|
-
if (escaping || c === "\\") {
|
|
1031
|
-
escaping = !escaping;
|
|
1032
|
-
acc += c;
|
|
1033
|
-
continue;
|
|
1034
|
-
}
|
|
1035
|
-
if (inBrace) {
|
|
1036
|
-
if (i2 === braceStart + 1) {
|
|
1037
|
-
if (c === "^" || c === "!") {
|
|
1038
|
-
braceNeg = true;
|
|
1039
|
-
}
|
|
1040
|
-
} else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) {
|
|
1041
|
-
inBrace = false;
|
|
1042
|
-
}
|
|
1043
|
-
acc += c;
|
|
1044
|
-
continue;
|
|
1045
|
-
} else if (c === "[") {
|
|
1046
|
-
inBrace = true;
|
|
1047
|
-
braceStart = i2;
|
|
1048
|
-
braceNeg = false;
|
|
1049
|
-
acc += c;
|
|
1050
|
-
continue;
|
|
1051
|
-
}
|
|
1052
|
-
if (isExtglobType(c) && str.charAt(i2) === "(") {
|
|
1053
|
-
part.push(acc);
|
|
1054
|
-
acc = "";
|
|
1055
|
-
const ext2 = new _AST(c, part);
|
|
1056
|
-
part.push(ext2);
|
|
1057
|
-
i2 = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt);
|
|
1058
|
-
continue;
|
|
1059
|
-
}
|
|
1060
|
-
if (c === "|") {
|
|
1061
|
-
part.push(acc);
|
|
1062
|
-
acc = "";
|
|
1063
|
-
parts.push(part);
|
|
1064
|
-
part = new _AST(null, ast);
|
|
1065
|
-
continue;
|
|
1066
|
-
}
|
|
1067
|
-
if (c === ")") {
|
|
1068
|
-
if (acc === "" && __privateGet(ast, _parts).length === 0) {
|
|
1069
|
-
__privateSet(ast, _emptyExt, true);
|
|
1070
|
-
}
|
|
1071
|
-
part.push(acc);
|
|
1072
|
-
acc = "";
|
|
1073
|
-
ast.push(...parts, part);
|
|
1074
|
-
return i2;
|
|
1075
|
-
}
|
|
1076
|
-
acc += c;
|
|
1077
|
-
}
|
|
1078
|
-
ast.type = null;
|
|
1079
|
-
__privateSet(ast, _hasMagic, void 0);
|
|
1080
|
-
__privateSet(ast, _parts, [str.substring(pos - 1)]);
|
|
1081
|
-
return i2;
|
|
1082
|
-
};
|
|
1083
|
-
partsToRegExp_fn = function(dot) {
|
|
1084
|
-
return __privateGet(this, _parts).map((p) => {
|
|
1085
|
-
if (typeof p === "string") {
|
|
1086
|
-
throw new Error("string type in extglob ast??");
|
|
1087
|
-
}
|
|
1088
|
-
const [re, _, _hasMagic2, uflag] = p.toRegExpSource(dot);
|
|
1089
|
-
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
1090
|
-
return re;
|
|
1091
|
-
}).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|");
|
|
1092
|
-
};
|
|
1093
|
-
parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
|
|
1094
|
-
let escaping = false;
|
|
1095
|
-
let re = "";
|
|
1096
|
-
let uflag = false;
|
|
1097
|
-
for (let i2 = 0; i2 < glob.length; i2++) {
|
|
1098
|
-
const c = glob.charAt(i2);
|
|
1099
|
-
if (escaping) {
|
|
1100
|
-
escaping = false;
|
|
1101
|
-
re += (reSpecials.has(c) ? "\\" : "") + c;
|
|
1102
|
-
continue;
|
|
1103
|
-
}
|
|
1104
|
-
if (c === "\\") {
|
|
1105
|
-
if (i2 === glob.length - 1) {
|
|
1106
|
-
re += "\\\\";
|
|
1107
|
-
} else {
|
|
1108
|
-
escaping = true;
|
|
1109
|
-
}
|
|
1110
|
-
continue;
|
|
1111
|
-
}
|
|
1112
|
-
if (c === "[") {
|
|
1113
|
-
const [src, needUflag, consumed, magic] = parseClass(glob, i2);
|
|
1114
|
-
if (consumed) {
|
|
1115
|
-
re += src;
|
|
1116
|
-
uflag = uflag || needUflag;
|
|
1117
|
-
i2 += consumed - 1;
|
|
1118
|
-
hasMagic = hasMagic || magic;
|
|
1119
|
-
continue;
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
if (c === "*") {
|
|
1123
|
-
if (noEmpty && glob === "*")
|
|
1124
|
-
re += starNoEmpty;
|
|
1125
|
-
else
|
|
1126
|
-
re += star;
|
|
1127
|
-
hasMagic = true;
|
|
1128
|
-
continue;
|
|
1129
|
-
}
|
|
1130
|
-
if (c === "?") {
|
|
1131
|
-
re += qmark;
|
|
1132
|
-
hasMagic = true;
|
|
1133
|
-
continue;
|
|
1134
|
-
}
|
|
1135
|
-
re += regExpEscape(c);
|
|
1136
|
-
}
|
|
1137
|
-
return [re, unescape(glob), !!hasMagic, uflag];
|
|
1138
|
-
};
|
|
1139
|
-
__privateAdd(_AST, _AST_static);
|
|
1140
|
-
var AST = _AST;
|
|
1141
|
-
|
|
1142
|
-
// node_modules/minimatch/dist/esm/escape.js
|
|
1143
|
-
var escape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
1144
|
-
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
1145
|
-
};
|
|
1146
|
-
|
|
1147
|
-
// node_modules/minimatch/dist/esm/index.js
|
|
1148
|
-
var minimatch = (p, pattern, options = {}) => {
|
|
1149
|
-
assertValidPattern(pattern);
|
|
1150
|
-
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
1151
|
-
return false;
|
|
1152
|
-
}
|
|
1153
|
-
return new Minimatch(pattern, options).match(p);
|
|
1154
|
-
};
|
|
1155
|
-
var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
|
|
1156
|
-
var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2);
|
|
1157
|
-
var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2);
|
|
1158
|
-
var starDotExtTestNocase = (ext2) => {
|
|
1159
|
-
ext2 = ext2.toLowerCase();
|
|
1160
|
-
return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2);
|
|
1161
|
-
};
|
|
1162
|
-
var starDotExtTestNocaseDot = (ext2) => {
|
|
1163
|
-
ext2 = ext2.toLowerCase();
|
|
1164
|
-
return (f) => f.toLowerCase().endsWith(ext2);
|
|
1165
|
-
};
|
|
1166
|
-
var starDotStarRE = /^\*+\.\*+$/;
|
|
1167
|
-
var starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
|
|
1168
|
-
var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes(".");
|
|
1169
|
-
var dotStarRE = /^\.\*+$/;
|
|
1170
|
-
var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
|
|
1171
|
-
var starRE = /^\*+$/;
|
|
1172
|
-
var starTest = (f) => f.length !== 0 && !f.startsWith(".");
|
|
1173
|
-
var starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
|
|
1174
|
-
var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
|
|
1175
|
-
var qmarksTestNocase = ([$0, ext2 = ""]) => {
|
|
1176
|
-
const noext = qmarksTestNoExt([$0]);
|
|
1177
|
-
if (!ext2)
|
|
1178
|
-
return noext;
|
|
1179
|
-
ext2 = ext2.toLowerCase();
|
|
1180
|
-
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
|
|
1181
|
-
};
|
|
1182
|
-
var qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
|
|
1183
|
-
const noext = qmarksTestNoExtDot([$0]);
|
|
1184
|
-
if (!ext2)
|
|
1185
|
-
return noext;
|
|
1186
|
-
ext2 = ext2.toLowerCase();
|
|
1187
|
-
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
|
|
1188
|
-
};
|
|
1189
|
-
var qmarksTestDot = ([$0, ext2 = ""]) => {
|
|
1190
|
-
const noext = qmarksTestNoExtDot([$0]);
|
|
1191
|
-
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
1192
|
-
};
|
|
1193
|
-
var qmarksTest = ([$0, ext2 = ""]) => {
|
|
1194
|
-
const noext = qmarksTestNoExt([$0]);
|
|
1195
|
-
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
1196
|
-
};
|
|
1197
|
-
var qmarksTestNoExt = ([$0]) => {
|
|
1198
|
-
const len = $0.length;
|
|
1199
|
-
return (f) => f.length === len && !f.startsWith(".");
|
|
1200
|
-
};
|
|
1201
|
-
var qmarksTestNoExtDot = ([$0]) => {
|
|
1202
|
-
const len = $0.length;
|
|
1203
|
-
return (f) => f.length === len && f !== "." && f !== "..";
|
|
1204
|
-
};
|
|
1205
|
-
var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
1206
|
-
var path = {
|
|
1207
|
-
win32: { sep: "\\" },
|
|
1208
|
-
posix: { sep: "/" }
|
|
1209
|
-
};
|
|
1210
|
-
var sep = defaultPlatform === "win32" ? path.win32.sep : path.posix.sep;
|
|
1211
|
-
minimatch.sep = sep;
|
|
1212
|
-
var GLOBSTAR = Symbol("globstar **");
|
|
1213
|
-
minimatch.GLOBSTAR = GLOBSTAR;
|
|
1214
|
-
var qmark2 = "[^/]";
|
|
1215
|
-
var star2 = qmark2 + "*?";
|
|
1216
|
-
var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
|
|
1217
|
-
var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
|
|
1218
|
-
var filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
|
|
1219
|
-
minimatch.filter = filter;
|
|
1220
|
-
var ext = (a, b = {}) => Object.assign({}, a, b);
|
|
1221
|
-
var defaults = (def) => {
|
|
1222
|
-
if (!def || typeof def !== "object" || !Object.keys(def).length) {
|
|
1223
|
-
return minimatch;
|
|
1224
|
-
}
|
|
1225
|
-
const orig = minimatch;
|
|
1226
|
-
const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
|
|
1227
|
-
return Object.assign(m, {
|
|
1228
|
-
Minimatch: class Minimatch extends orig.Minimatch {
|
|
1229
|
-
constructor(pattern, options = {}) {
|
|
1230
|
-
super(pattern, ext(def, options));
|
|
1231
|
-
}
|
|
1232
|
-
static defaults(options) {
|
|
1233
|
-
return orig.defaults(ext(def, options)).Minimatch;
|
|
1234
|
-
}
|
|
1235
|
-
},
|
|
1236
|
-
AST: class AST extends orig.AST {
|
|
1237
|
-
/* c8 ignore start */
|
|
1238
|
-
constructor(type, parent, options = {}) {
|
|
1239
|
-
super(type, parent, ext(def, options));
|
|
1240
|
-
}
|
|
1241
|
-
/* c8 ignore stop */
|
|
1242
|
-
static fromGlob(pattern, options = {}) {
|
|
1243
|
-
return orig.AST.fromGlob(pattern, ext(def, options));
|
|
1244
|
-
}
|
|
1245
|
-
},
|
|
1246
|
-
unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
|
|
1247
|
-
escape: (s, options = {}) => orig.escape(s, ext(def, options)),
|
|
1248
|
-
filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
|
|
1249
|
-
defaults: (options) => orig.defaults(ext(def, options)),
|
|
1250
|
-
makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
|
|
1251
|
-
braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
|
|
1252
|
-
match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
|
|
1253
|
-
sep: orig.sep,
|
|
1254
|
-
GLOBSTAR
|
|
1255
|
-
});
|
|
1256
|
-
};
|
|
1257
|
-
minimatch.defaults = defaults;
|
|
1258
|
-
var braceExpand = (pattern, options = {}) => {
|
|
1259
|
-
assertValidPattern(pattern);
|
|
1260
|
-
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
1261
|
-
return [pattern];
|
|
1262
|
-
}
|
|
1263
|
-
return (0, import_brace_expansion.default)(pattern);
|
|
1264
|
-
};
|
|
1265
|
-
minimatch.braceExpand = braceExpand;
|
|
1266
|
-
var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
|
|
1267
|
-
minimatch.makeRe = makeRe;
|
|
1268
|
-
var match = (list, pattern, options = {}) => {
|
|
1269
|
-
const mm = new Minimatch(pattern, options);
|
|
1270
|
-
list = list.filter((f) => mm.match(f));
|
|
1271
|
-
if (mm.options.nonull && !list.length) {
|
|
1272
|
-
list.push(pattern);
|
|
1273
|
-
}
|
|
1274
|
-
return list;
|
|
1275
|
-
};
|
|
1276
|
-
minimatch.match = match;
|
|
1277
|
-
var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
1278
|
-
var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
1279
|
-
var Minimatch = class {
|
|
1280
|
-
options;
|
|
1281
|
-
set;
|
|
1282
|
-
pattern;
|
|
1283
|
-
windowsPathsNoEscape;
|
|
1284
|
-
nonegate;
|
|
1285
|
-
negate;
|
|
1286
|
-
comment;
|
|
1287
|
-
empty;
|
|
1288
|
-
preserveMultipleSlashes;
|
|
1289
|
-
partial;
|
|
1290
|
-
globSet;
|
|
1291
|
-
globParts;
|
|
1292
|
-
nocase;
|
|
1293
|
-
isWindows;
|
|
1294
|
-
platform;
|
|
1295
|
-
windowsNoMagicRoot;
|
|
1296
|
-
regexp;
|
|
1297
|
-
constructor(pattern, options = {}) {
|
|
1298
|
-
assertValidPattern(pattern);
|
|
1299
|
-
options = options || {};
|
|
1300
|
-
this.options = options;
|
|
1301
|
-
this.pattern = pattern;
|
|
1302
|
-
this.platform = options.platform || defaultPlatform;
|
|
1303
|
-
this.isWindows = this.platform === "win32";
|
|
1304
|
-
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
|
|
1305
|
-
if (this.windowsPathsNoEscape) {
|
|
1306
|
-
this.pattern = this.pattern.replace(/\\/g, "/");
|
|
1307
|
-
}
|
|
1308
|
-
this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
|
|
1309
|
-
this.regexp = null;
|
|
1310
|
-
this.negate = false;
|
|
1311
|
-
this.nonegate = !!options.nonegate;
|
|
1312
|
-
this.comment = false;
|
|
1313
|
-
this.empty = false;
|
|
1314
|
-
this.partial = !!options.partial;
|
|
1315
|
-
this.nocase = !!this.options.nocase;
|
|
1316
|
-
this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase);
|
|
1317
|
-
this.globSet = [];
|
|
1318
|
-
this.globParts = [];
|
|
1319
|
-
this.set = [];
|
|
1320
|
-
this.make();
|
|
1321
|
-
}
|
|
1322
|
-
hasMagic() {
|
|
1323
|
-
if (this.options.magicalBraces && this.set.length > 1) {
|
|
1324
|
-
return true;
|
|
1325
|
-
}
|
|
1326
|
-
for (const pattern of this.set) {
|
|
1327
|
-
for (const part of pattern) {
|
|
1328
|
-
if (typeof part !== "string")
|
|
1329
|
-
return true;
|
|
1330
|
-
}
|
|
1331
|
-
}
|
|
1332
|
-
return false;
|
|
1333
|
-
}
|
|
1334
|
-
debug(..._) {
|
|
1335
|
-
}
|
|
1336
|
-
make() {
|
|
1337
|
-
const pattern = this.pattern;
|
|
1338
|
-
const options = this.options;
|
|
1339
|
-
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
1340
|
-
this.comment = true;
|
|
1341
|
-
return;
|
|
1342
|
-
}
|
|
1343
|
-
if (!pattern) {
|
|
1344
|
-
this.empty = true;
|
|
1345
|
-
return;
|
|
1346
|
-
}
|
|
1347
|
-
this.parseNegate();
|
|
1348
|
-
this.globSet = [...new Set(this.braceExpand())];
|
|
1349
|
-
if (options.debug) {
|
|
1350
|
-
this.debug = (...args) => console.error(...args);
|
|
1351
|
-
}
|
|
1352
|
-
this.debug(this.pattern, this.globSet);
|
|
1353
|
-
const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
|
|
1354
|
-
this.globParts = this.preprocess(rawGlobParts);
|
|
1355
|
-
this.debug(this.pattern, this.globParts);
|
|
1356
|
-
let set = this.globParts.map((s, _, __) => {
|
|
1357
|
-
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
1358
|
-
const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
|
|
1359
|
-
const isDrive = /^[a-z]:/i.test(s[0]);
|
|
1360
|
-
if (isUNC) {
|
|
1361
|
-
return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
|
|
1362
|
-
} else if (isDrive) {
|
|
1363
|
-
return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
|
|
1364
|
-
}
|
|
1365
|
-
}
|
|
1366
|
-
return s.map((ss) => this.parse(ss));
|
|
1367
|
-
});
|
|
1368
|
-
this.debug(this.pattern, set);
|
|
1369
|
-
this.set = set.filter((s) => s.indexOf(false) === -1);
|
|
1370
|
-
if (this.isWindows) {
|
|
1371
|
-
for (let i2 = 0; i2 < this.set.length; i2++) {
|
|
1372
|
-
const p = this.set[i2];
|
|
1373
|
-
if (p[0] === "" && p[1] === "" && this.globParts[i2][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) {
|
|
1374
|
-
p[2] = "?";
|
|
1375
|
-
}
|
|
1376
|
-
}
|
|
1377
|
-
}
|
|
1378
|
-
this.debug(this.pattern, this.set);
|
|
1379
|
-
}
|
|
1380
|
-
// various transforms to equivalent pattern sets that are
|
|
1381
|
-
// faster to process in a filesystem walk. The goal is to
|
|
1382
|
-
// eliminate what we can, and push all ** patterns as far
|
|
1383
|
-
// to the right as possible, even if it increases the number
|
|
1384
|
-
// of patterns that we have to process.
|
|
1385
|
-
preprocess(globParts) {
|
|
1386
|
-
if (this.options.noglobstar) {
|
|
1387
|
-
for (let i2 = 0; i2 < globParts.length; i2++) {
|
|
1388
|
-
for (let j = 0; j < globParts[i2].length; j++) {
|
|
1389
|
-
if (globParts[i2][j] === "**") {
|
|
1390
|
-
globParts[i2][j] = "*";
|
|
1391
|
-
}
|
|
1392
|
-
}
|
|
1393
|
-
}
|
|
1394
|
-
}
|
|
1395
|
-
const { optimizationLevel = 1 } = this.options;
|
|
1396
|
-
if (optimizationLevel >= 2) {
|
|
1397
|
-
globParts = this.firstPhasePreProcess(globParts);
|
|
1398
|
-
globParts = this.secondPhasePreProcess(globParts);
|
|
1399
|
-
} else if (optimizationLevel >= 1) {
|
|
1400
|
-
globParts = this.levelOneOptimize(globParts);
|
|
1401
|
-
} else {
|
|
1402
|
-
globParts = this.adjascentGlobstarOptimize(globParts);
|
|
1403
|
-
}
|
|
1404
|
-
return globParts;
|
|
1405
|
-
}
|
|
1406
|
-
// just get rid of adjascent ** portions
|
|
1407
|
-
adjascentGlobstarOptimize(globParts) {
|
|
1408
|
-
return globParts.map((parts) => {
|
|
1409
|
-
let gs = -1;
|
|
1410
|
-
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
|
|
1411
|
-
let i2 = gs;
|
|
1412
|
-
while (parts[i2 + 1] === "**") {
|
|
1413
|
-
i2++;
|
|
1414
|
-
}
|
|
1415
|
-
if (i2 !== gs) {
|
|
1416
|
-
parts.splice(gs, i2 - gs);
|
|
1417
|
-
}
|
|
1418
|
-
}
|
|
1419
|
-
return parts;
|
|
1420
|
-
});
|
|
1421
|
-
}
|
|
1422
|
-
// get rid of adjascent ** and resolve .. portions
|
|
1423
|
-
levelOneOptimize(globParts) {
|
|
1424
|
-
return globParts.map((parts) => {
|
|
1425
|
-
parts = parts.reduce((set, part) => {
|
|
1426
|
-
const prev = set[set.length - 1];
|
|
1427
|
-
if (part === "**" && prev === "**") {
|
|
1428
|
-
return set;
|
|
1429
|
-
}
|
|
1430
|
-
if (part === "..") {
|
|
1431
|
-
if (prev && prev !== ".." && prev !== "." && prev !== "**") {
|
|
1432
|
-
set.pop();
|
|
1433
|
-
return set;
|
|
1434
|
-
}
|
|
1435
|
-
}
|
|
1436
|
-
set.push(part);
|
|
1437
|
-
return set;
|
|
1438
|
-
}, []);
|
|
1439
|
-
return parts.length === 0 ? [""] : parts;
|
|
1440
|
-
});
|
|
1441
|
-
}
|
|
1442
|
-
levelTwoFileOptimize(parts) {
|
|
1443
|
-
if (!Array.isArray(parts)) {
|
|
1444
|
-
parts = this.slashSplit(parts);
|
|
1445
|
-
}
|
|
1446
|
-
let didSomething = false;
|
|
1447
|
-
do {
|
|
1448
|
-
didSomething = false;
|
|
1449
|
-
if (!this.preserveMultipleSlashes) {
|
|
1450
|
-
for (let i2 = 1; i2 < parts.length - 1; i2++) {
|
|
1451
|
-
const p = parts[i2];
|
|
1452
|
-
if (i2 === 1 && p === "" && parts[0] === "")
|
|
1453
|
-
continue;
|
|
1454
|
-
if (p === "." || p === "") {
|
|
1455
|
-
didSomething = true;
|
|
1456
|
-
parts.splice(i2, 1);
|
|
1457
|
-
i2--;
|
|
1458
|
-
}
|
|
1459
|
-
}
|
|
1460
|
-
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
|
|
1461
|
-
didSomething = true;
|
|
1462
|
-
parts.pop();
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
let dd = 0;
|
|
1466
|
-
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
1467
|
-
const p = parts[dd - 1];
|
|
1468
|
-
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
1469
|
-
didSomething = true;
|
|
1470
|
-
parts.splice(dd - 1, 2);
|
|
1471
|
-
dd -= 2;
|
|
1472
|
-
}
|
|
1473
|
-
}
|
|
1474
|
-
} while (didSomething);
|
|
1475
|
-
return parts.length === 0 ? [""] : parts;
|
|
1476
|
-
}
|
|
1477
|
-
// First phase: single-pattern processing
|
|
1478
|
-
// <pre> is 1 or more portions
|
|
1479
|
-
// <rest> is 1 or more portions
|
|
1480
|
-
// <p> is any portion other than ., .., '', or **
|
|
1481
|
-
// <e> is . or ''
|
|
1482
|
-
//
|
|
1483
|
-
// **/.. is *brutal* for filesystem walking performance, because
|
|
1484
|
-
// it effectively resets the recursive walk each time it occurs,
|
|
1485
|
-
// and ** cannot be reduced out by a .. pattern part like a regexp
|
|
1486
|
-
// or most strings (other than .., ., and '') can be.
|
|
1487
|
-
//
|
|
1488
|
-
// <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
|
|
1489
|
-
// <pre>/<e>/<rest> -> <pre>/<rest>
|
|
1490
|
-
// <pre>/<p>/../<rest> -> <pre>/<rest>
|
|
1491
|
-
// **/**/<rest> -> **/<rest>
|
|
1492
|
-
//
|
|
1493
|
-
// **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
|
|
1494
|
-
// this WOULD be allowed if ** did follow symlinks, or * didn't
|
|
1495
|
-
firstPhasePreProcess(globParts) {
|
|
1496
|
-
let didSomething = false;
|
|
1497
|
-
do {
|
|
1498
|
-
didSomething = false;
|
|
1499
|
-
for (let parts of globParts) {
|
|
1500
|
-
let gs = -1;
|
|
1501
|
-
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
|
|
1502
|
-
let gss = gs;
|
|
1503
|
-
while (parts[gss + 1] === "**") {
|
|
1504
|
-
gss++;
|
|
1505
|
-
}
|
|
1506
|
-
if (gss > gs) {
|
|
1507
|
-
parts.splice(gs + 1, gss - gs);
|
|
1508
|
-
}
|
|
1509
|
-
let next = parts[gs + 1];
|
|
1510
|
-
const p = parts[gs + 2];
|
|
1511
|
-
const p2 = parts[gs + 3];
|
|
1512
|
-
if (next !== "..")
|
|
1513
|
-
continue;
|
|
1514
|
-
if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
|
|
1515
|
-
continue;
|
|
1516
|
-
}
|
|
1517
|
-
didSomething = true;
|
|
1518
|
-
parts.splice(gs, 1);
|
|
1519
|
-
const other = parts.slice(0);
|
|
1520
|
-
other[gs] = "**";
|
|
1521
|
-
globParts.push(other);
|
|
1522
|
-
gs--;
|
|
1523
|
-
}
|
|
1524
|
-
if (!this.preserveMultipleSlashes) {
|
|
1525
|
-
for (let i2 = 1; i2 < parts.length - 1; i2++) {
|
|
1526
|
-
const p = parts[i2];
|
|
1527
|
-
if (i2 === 1 && p === "" && parts[0] === "")
|
|
1528
|
-
continue;
|
|
1529
|
-
if (p === "." || p === "") {
|
|
1530
|
-
didSomething = true;
|
|
1531
|
-
parts.splice(i2, 1);
|
|
1532
|
-
i2--;
|
|
1533
|
-
}
|
|
1534
|
-
}
|
|
1535
|
-
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
|
|
1536
|
-
didSomething = true;
|
|
1537
|
-
parts.pop();
|
|
1538
|
-
}
|
|
1539
|
-
}
|
|
1540
|
-
let dd = 0;
|
|
1541
|
-
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
1542
|
-
const p = parts[dd - 1];
|
|
1543
|
-
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
1544
|
-
didSomething = true;
|
|
1545
|
-
const needDot = dd === 1 && parts[dd + 1] === "**";
|
|
1546
|
-
const splin = needDot ? ["."] : [];
|
|
1547
|
-
parts.splice(dd - 1, 2, ...splin);
|
|
1548
|
-
if (parts.length === 0)
|
|
1549
|
-
parts.push("");
|
|
1550
|
-
dd -= 2;
|
|
1551
|
-
}
|
|
1552
|
-
}
|
|
1553
|
-
}
|
|
1554
|
-
} while (didSomething);
|
|
1555
|
-
return globParts;
|
|
1556
|
-
}
|
|
1557
|
-
// second phase: multi-pattern dedupes
|
|
1558
|
-
// {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
|
|
1559
|
-
// {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
|
|
1560
|
-
// {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
|
|
1561
|
-
//
|
|
1562
|
-
// {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
|
|
1563
|
-
// ^-- not valid because ** doens't follow symlinks
|
|
1564
|
-
secondPhasePreProcess(globParts) {
|
|
1565
|
-
for (let i2 = 0; i2 < globParts.length - 1; i2++) {
|
|
1566
|
-
for (let j = i2 + 1; j < globParts.length; j++) {
|
|
1567
|
-
const matched = this.partsMatch(globParts[i2], globParts[j], !this.preserveMultipleSlashes);
|
|
1568
|
-
if (!matched)
|
|
1569
|
-
continue;
|
|
1570
|
-
globParts[i2] = matched;
|
|
1571
|
-
globParts[j] = [];
|
|
1572
|
-
}
|
|
1573
|
-
}
|
|
1574
|
-
return globParts.filter((gs) => gs.length);
|
|
1575
|
-
}
|
|
1576
|
-
partsMatch(a, b, emptyGSMatch = false) {
|
|
1577
|
-
let ai = 0;
|
|
1578
|
-
let bi = 0;
|
|
1579
|
-
let result = [];
|
|
1580
|
-
let which = "";
|
|
1581
|
-
while (ai < a.length && bi < b.length) {
|
|
1582
|
-
if (a[ai] === b[bi]) {
|
|
1583
|
-
result.push(which === "b" ? b[bi] : a[ai]);
|
|
1584
|
-
ai++;
|
|
1585
|
-
bi++;
|
|
1586
|
-
} else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
|
|
1587
|
-
result.push(a[ai]);
|
|
1588
|
-
ai++;
|
|
1589
|
-
} else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
|
|
1590
|
-
result.push(b[bi]);
|
|
1591
|
-
bi++;
|
|
1592
|
-
} else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
|
|
1593
|
-
if (which === "b")
|
|
1594
|
-
return false;
|
|
1595
|
-
which = "a";
|
|
1596
|
-
result.push(a[ai]);
|
|
1597
|
-
ai++;
|
|
1598
|
-
bi++;
|
|
1599
|
-
} else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
|
|
1600
|
-
if (which === "a")
|
|
1601
|
-
return false;
|
|
1602
|
-
which = "b";
|
|
1603
|
-
result.push(b[bi]);
|
|
1604
|
-
ai++;
|
|
1605
|
-
bi++;
|
|
1606
|
-
} else {
|
|
1607
|
-
return false;
|
|
1608
|
-
}
|
|
1609
|
-
}
|
|
1610
|
-
return a.length === b.length && result;
|
|
1611
|
-
}
|
|
1612
|
-
parseNegate() {
|
|
1613
|
-
if (this.nonegate)
|
|
1614
|
-
return;
|
|
1615
|
-
const pattern = this.pattern;
|
|
1616
|
-
let negate = false;
|
|
1617
|
-
let negateOffset = 0;
|
|
1618
|
-
for (let i2 = 0; i2 < pattern.length && pattern.charAt(i2) === "!"; i2++) {
|
|
1619
|
-
negate = !negate;
|
|
1620
|
-
negateOffset++;
|
|
1621
|
-
}
|
|
1622
|
-
if (negateOffset)
|
|
1623
|
-
this.pattern = pattern.slice(negateOffset);
|
|
1624
|
-
this.negate = negate;
|
|
1625
|
-
}
|
|
1626
|
-
// set partial to true to test if, for example,
|
|
1627
|
-
// "/a/b" matches the start of "/*/b/*/d"
|
|
1628
|
-
// Partial means, if you run out of file before you run
|
|
1629
|
-
// out of pattern, then that's fine, as long as all
|
|
1630
|
-
// the parts match.
|
|
1631
|
-
matchOne(file, pattern, partial = false) {
|
|
1632
|
-
const options = this.options;
|
|
1633
|
-
if (this.isWindows) {
|
|
1634
|
-
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
|
|
1635
|
-
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
|
|
1636
|
-
const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
|
|
1637
|
-
const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
|
|
1638
|
-
const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
|
|
1639
|
-
const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
|
|
1640
|
-
if (typeof fdi === "number" && typeof pdi === "number") {
|
|
1641
|
-
const [fd, pd] = [file[fdi], pattern[pdi]];
|
|
1642
|
-
if (fd.toLowerCase() === pd.toLowerCase()) {
|
|
1643
|
-
pattern[pdi] = fd;
|
|
1644
|
-
if (pdi > fdi) {
|
|
1645
|
-
pattern = pattern.slice(pdi);
|
|
1646
|
-
} else if (fdi > pdi) {
|
|
1647
|
-
file = file.slice(fdi);
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
}
|
|
1651
|
-
}
|
|
1652
|
-
const { optimizationLevel = 1 } = this.options;
|
|
1653
|
-
if (optimizationLevel >= 2) {
|
|
1654
|
-
file = this.levelTwoFileOptimize(file);
|
|
1655
|
-
}
|
|
1656
|
-
this.debug("matchOne", this, { file, pattern });
|
|
1657
|
-
this.debug("matchOne", file.length, pattern.length);
|
|
1658
|
-
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
1659
|
-
this.debug("matchOne loop");
|
|
1660
|
-
var p = pattern[pi];
|
|
1661
|
-
var f = file[fi];
|
|
1662
|
-
this.debug(pattern, p, f);
|
|
1663
|
-
if (p === false) {
|
|
1664
|
-
return false;
|
|
1665
|
-
}
|
|
1666
|
-
if (p === GLOBSTAR) {
|
|
1667
|
-
this.debug("GLOBSTAR", [pattern, p, f]);
|
|
1668
|
-
var fr = fi;
|
|
1669
|
-
var pr = pi + 1;
|
|
1670
|
-
if (pr === pl) {
|
|
1671
|
-
this.debug("** at the end");
|
|
1672
|
-
for (; fi < fl; fi++) {
|
|
1673
|
-
if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
|
|
1674
|
-
return false;
|
|
1675
|
-
}
|
|
1676
|
-
return true;
|
|
1677
|
-
}
|
|
1678
|
-
while (fr < fl) {
|
|
1679
|
-
var swallowee = file[fr];
|
|
1680
|
-
this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
|
|
1681
|
-
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
|
|
1682
|
-
this.debug("globstar found match!", fr, fl, swallowee);
|
|
1683
|
-
return true;
|
|
1684
|
-
} else {
|
|
1685
|
-
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
|
|
1686
|
-
this.debug("dot detected!", file, fr, pattern, pr);
|
|
1687
|
-
break;
|
|
1688
|
-
}
|
|
1689
|
-
this.debug("globstar swallow a segment, and continue");
|
|
1690
|
-
fr++;
|
|
1691
|
-
}
|
|
1692
|
-
}
|
|
1693
|
-
if (partial) {
|
|
1694
|
-
this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
|
|
1695
|
-
if (fr === fl) {
|
|
1696
|
-
return true;
|
|
1697
|
-
}
|
|
1698
|
-
}
|
|
1699
|
-
return false;
|
|
1700
|
-
}
|
|
1701
|
-
let hit;
|
|
1702
|
-
if (typeof p === "string") {
|
|
1703
|
-
hit = f === p;
|
|
1704
|
-
this.debug("string match", p, f, hit);
|
|
1705
|
-
} else {
|
|
1706
|
-
hit = p.test(f);
|
|
1707
|
-
this.debug("pattern match", p, f, hit);
|
|
1708
|
-
}
|
|
1709
|
-
if (!hit)
|
|
1710
|
-
return false;
|
|
1711
|
-
}
|
|
1712
|
-
if (fi === fl && pi === pl) {
|
|
1713
|
-
return true;
|
|
1714
|
-
} else if (fi === fl) {
|
|
1715
|
-
return partial;
|
|
1716
|
-
} else if (pi === pl) {
|
|
1717
|
-
return fi === fl - 1 && file[fi] === "";
|
|
1718
|
-
} else {
|
|
1719
|
-
throw new Error("wtf?");
|
|
1720
|
-
}
|
|
1721
|
-
}
|
|
1722
|
-
braceExpand() {
|
|
1723
|
-
return braceExpand(this.pattern, this.options);
|
|
1724
|
-
}
|
|
1725
|
-
parse(pattern) {
|
|
1726
|
-
assertValidPattern(pattern);
|
|
1727
|
-
const options = this.options;
|
|
1728
|
-
if (pattern === "**")
|
|
1729
|
-
return GLOBSTAR;
|
|
1730
|
-
if (pattern === "")
|
|
1731
|
-
return "";
|
|
1732
|
-
let m;
|
|
1733
|
-
let fastTest = null;
|
|
1734
|
-
if (m = pattern.match(starRE)) {
|
|
1735
|
-
fastTest = options.dot ? starTestDot : starTest;
|
|
1736
|
-
} else if (m = pattern.match(starDotExtRE)) {
|
|
1737
|
-
fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
|
|
1738
|
-
} else if (m = pattern.match(qmarksRE)) {
|
|
1739
|
-
fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
|
|
1740
|
-
} else if (m = pattern.match(starDotStarRE)) {
|
|
1741
|
-
fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
|
|
1742
|
-
} else if (m = pattern.match(dotStarRE)) {
|
|
1743
|
-
fastTest = dotStarTest;
|
|
1744
|
-
}
|
|
1745
|
-
const re = AST.fromGlob(pattern, this.options).toMMPattern();
|
|
1746
|
-
if (fastTest && typeof re === "object") {
|
|
1747
|
-
Reflect.defineProperty(re, "test", { value: fastTest });
|
|
1748
|
-
}
|
|
1749
|
-
return re;
|
|
1750
|
-
}
|
|
1751
|
-
makeRe() {
|
|
1752
|
-
if (this.regexp || this.regexp === false)
|
|
1753
|
-
return this.regexp;
|
|
1754
|
-
const set = this.set;
|
|
1755
|
-
if (!set.length) {
|
|
1756
|
-
this.regexp = false;
|
|
1757
|
-
return this.regexp;
|
|
1758
|
-
}
|
|
1759
|
-
const options = this.options;
|
|
1760
|
-
const twoStar = options.noglobstar ? star2 : options.dot ? twoStarDot : twoStarNoDot;
|
|
1761
|
-
const flags = new Set(options.nocase ? ["i"] : []);
|
|
1762
|
-
let re = set.map((pattern) => {
|
|
1763
|
-
const pp = pattern.map((p) => {
|
|
1764
|
-
if (p instanceof RegExp) {
|
|
1765
|
-
for (const f of p.flags.split(""))
|
|
1766
|
-
flags.add(f);
|
|
1767
|
-
}
|
|
1768
|
-
return typeof p === "string" ? regExpEscape2(p) : p === GLOBSTAR ? GLOBSTAR : p._src;
|
|
1769
|
-
});
|
|
1770
|
-
pp.forEach((p, i2) => {
|
|
1771
|
-
const next = pp[i2 + 1];
|
|
1772
|
-
const prev = pp[i2 - 1];
|
|
1773
|
-
if (p !== GLOBSTAR || prev === GLOBSTAR) {
|
|
1774
|
-
return;
|
|
1775
|
-
}
|
|
1776
|
-
if (prev === void 0) {
|
|
1777
|
-
if (next !== void 0 && next !== GLOBSTAR) {
|
|
1778
|
-
pp[i2 + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
|
|
1779
|
-
} else {
|
|
1780
|
-
pp[i2] = twoStar;
|
|
1781
|
-
}
|
|
1782
|
-
} else if (next === void 0) {
|
|
1783
|
-
pp[i2 - 1] = prev + "(?:\\/|" + twoStar + ")?";
|
|
1784
|
-
} else if (next !== GLOBSTAR) {
|
|
1785
|
-
pp[i2 - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
|
|
1786
|
-
pp[i2 + 1] = GLOBSTAR;
|
|
1787
|
-
}
|
|
1788
|
-
});
|
|
1789
|
-
return pp.filter((p) => p !== GLOBSTAR).join("/");
|
|
1790
|
-
}).join("|");
|
|
1791
|
-
const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
1792
|
-
re = "^" + open + re + close + "$";
|
|
1793
|
-
if (this.negate)
|
|
1794
|
-
re = "^(?!" + re + ").+$";
|
|
1795
|
-
try {
|
|
1796
|
-
this.regexp = new RegExp(re, [...flags].join(""));
|
|
1797
|
-
} catch (ex) {
|
|
1798
|
-
this.regexp = false;
|
|
1799
|
-
}
|
|
1800
|
-
return this.regexp;
|
|
1801
|
-
}
|
|
1802
|
-
slashSplit(p) {
|
|
1803
|
-
if (this.preserveMultipleSlashes) {
|
|
1804
|
-
return p.split("/");
|
|
1805
|
-
} else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
|
|
1806
|
-
return ["", ...p.split(/\/+/)];
|
|
1807
|
-
} else {
|
|
1808
|
-
return p.split(/\/+/);
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
|
-
match(f, partial = this.partial) {
|
|
1812
|
-
this.debug("match", f, this.pattern);
|
|
1813
|
-
if (this.comment) {
|
|
1814
|
-
return false;
|
|
1815
|
-
}
|
|
1816
|
-
if (this.empty) {
|
|
1817
|
-
return f === "";
|
|
1818
|
-
}
|
|
1819
|
-
if (f === "/" && partial) {
|
|
1820
|
-
return true;
|
|
1821
|
-
}
|
|
1822
|
-
const options = this.options;
|
|
1823
|
-
if (this.isWindows) {
|
|
1824
|
-
f = f.split("\\").join("/");
|
|
1825
|
-
}
|
|
1826
|
-
const ff = this.slashSplit(f);
|
|
1827
|
-
this.debug(this.pattern, "split", ff);
|
|
1828
|
-
const set = this.set;
|
|
1829
|
-
this.debug(this.pattern, "set", set);
|
|
1830
|
-
let filename = ff[ff.length - 1];
|
|
1831
|
-
if (!filename) {
|
|
1832
|
-
for (let i2 = ff.length - 2; !filename && i2 >= 0; i2--) {
|
|
1833
|
-
filename = ff[i2];
|
|
1834
|
-
}
|
|
1835
|
-
}
|
|
1836
|
-
for (let i2 = 0; i2 < set.length; i2++) {
|
|
1837
|
-
const pattern = set[i2];
|
|
1838
|
-
let file = ff;
|
|
1839
|
-
if (options.matchBase && pattern.length === 1) {
|
|
1840
|
-
file = [filename];
|
|
1841
|
-
}
|
|
1842
|
-
const hit = this.matchOne(file, pattern, partial);
|
|
1843
|
-
if (hit) {
|
|
1844
|
-
if (options.flipNegate) {
|
|
1845
|
-
return true;
|
|
1846
|
-
}
|
|
1847
|
-
return !this.negate;
|
|
1848
|
-
}
|
|
1849
|
-
}
|
|
1850
|
-
if (options.flipNegate) {
|
|
1851
|
-
return false;
|
|
1852
|
-
}
|
|
1853
|
-
return this.negate;
|
|
1854
|
-
}
|
|
1855
|
-
static defaults(def) {
|
|
1856
|
-
return minimatch.defaults(def).Minimatch;
|
|
1857
|
-
}
|
|
1858
|
-
};
|
|
1859
|
-
minimatch.AST = AST;
|
|
1860
|
-
minimatch.Minimatch = Minimatch;
|
|
1861
|
-
minimatch.escape = escape;
|
|
1862
|
-
minimatch.unescape = unescape;
|
|
1863
|
-
|
|
1864
|
-
// src/utils/query-nonce-meta-tag-content.ts
|
|
1865
|
-
function queryNonceMetaTagContent(doc) {
|
|
1866
|
-
var _a, _b, _c;
|
|
1867
|
-
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
1868
|
-
}
|
|
1869
|
-
|
|
1870
|
-
// src/utils/regular-expression.ts
|
|
1871
|
-
var escapeRegExpSpecialCharacters = (text) => {
|
|
1872
|
-
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1873
|
-
};
|
|
1874
|
-
|
|
1875
|
-
// src/utils/result.ts
|
|
1876
|
-
var result_exports = {};
|
|
1877
|
-
__export(result_exports, {
|
|
1878
|
-
err: () => err,
|
|
1879
|
-
map: () => map,
|
|
1880
|
-
ok: () => ok,
|
|
1881
|
-
unwrap: () => unwrap,
|
|
1882
|
-
unwrapErr: () => unwrapErr
|
|
1883
|
-
});
|
|
1884
|
-
var ok = (value) => ({
|
|
1885
|
-
isOk: true,
|
|
1886
|
-
isErr: false,
|
|
1887
|
-
value
|
|
1888
|
-
});
|
|
1889
|
-
var err = (value) => ({
|
|
1890
|
-
isOk: false,
|
|
1891
|
-
isErr: true,
|
|
1892
|
-
value
|
|
1893
|
-
});
|
|
1894
|
-
function map(result, fn) {
|
|
1895
|
-
if (result.isOk) {
|
|
1896
|
-
const val = fn(result.value);
|
|
1897
|
-
if (val instanceof Promise) {
|
|
1898
|
-
return val.then((newVal) => ok(newVal));
|
|
1899
|
-
} else {
|
|
1900
|
-
return ok(val);
|
|
1901
|
-
}
|
|
1902
|
-
}
|
|
1903
|
-
if (result.isErr) {
|
|
1904
|
-
const value = result.value;
|
|
1905
|
-
return err(value);
|
|
1906
|
-
}
|
|
1907
|
-
throw "should never get here";
|
|
1908
|
-
}
|
|
1909
|
-
var unwrap = (result) => {
|
|
1910
|
-
if (result.isOk) {
|
|
1911
|
-
return result.value;
|
|
1912
|
-
} else {
|
|
1913
|
-
throw result.value;
|
|
1914
|
-
}
|
|
1915
|
-
};
|
|
1916
|
-
var unwrapErr = (result) => {
|
|
1917
|
-
if (result.isErr) {
|
|
1918
|
-
return result.value;
|
|
1919
|
-
} else {
|
|
1920
|
-
throw result.value;
|
|
1921
|
-
}
|
|
1922
|
-
};
|
|
1923
|
-
|
|
1924
272
|
// src/utils/style.ts
|
|
1925
273
|
function createStyleSheetIfNeededAndSupported(styles2) {
|
|
1926
274
|
if (!supportsConstructableStylesheets) return void 0;
|
|
@@ -1985,8 +333,9 @@ function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
|
1985
333
|
let childNode;
|
|
1986
334
|
for (; i2 < childNodes.length; i2++) {
|
|
1987
335
|
childNode = childNodes[i2];
|
|
1988
|
-
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0)) {
|
|
336
|
+
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
|
|
1989
337
|
slottedNodes.push(childNode);
|
|
338
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
1990
339
|
}
|
|
1991
340
|
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
1992
341
|
}
|
|
@@ -2044,6 +393,18 @@ function patchSlotNode(node) {
|
|
|
2044
393
|
node.assignedElements = assignedFactory(true);
|
|
2045
394
|
node.assignedNodes = assignedFactory(false);
|
|
2046
395
|
}
|
|
396
|
+
function dispatchSlotChangeEvent(elm) {
|
|
397
|
+
elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
|
|
398
|
+
}
|
|
399
|
+
function findSlotFromSlottedNode(slottedNode, parentHost) {
|
|
400
|
+
var _a;
|
|
401
|
+
parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
|
|
402
|
+
if (!parentHost) return { slotNode: null, slotName: "" };
|
|
403
|
+
const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
|
|
404
|
+
const childNodes = internalCall(parentHost, "childNodes");
|
|
405
|
+
const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
|
|
406
|
+
return { slotNode, slotName };
|
|
407
|
+
}
|
|
2047
408
|
function internalCall(node, method) {
|
|
2048
409
|
if ("__" + method in node) {
|
|
2049
410
|
const toReturn = node["__" + method];
|
|
@@ -2068,6 +429,14 @@ var uniqueTime = (key, measureText) => {
|
|
|
2068
429
|
};
|
|
2069
430
|
}
|
|
2070
431
|
};
|
|
432
|
+
|
|
433
|
+
// src/utils/query-nonce-meta-tag-content.ts
|
|
434
|
+
function queryNonceMetaTagContent(doc) {
|
|
435
|
+
var _a, _b, _c;
|
|
436
|
+
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
// src/runtime/styles.ts
|
|
2071
440
|
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
2072
441
|
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
2073
442
|
let style = styles.get(scopeId2);
|
|
@@ -2101,7 +470,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2101
470
|
}
|
|
2102
471
|
if (!appliedStyles.has(scopeId2)) {
|
|
2103
472
|
styleElm = win.document.createElement("style");
|
|
2104
|
-
styleElm.
|
|
473
|
+
styleElm.textContent = style;
|
|
2105
474
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
2106
475
|
if (nonce != null) {
|
|
2107
476
|
styleElm.setAttribute("nonce", nonce);
|
|
@@ -2126,8 +495,8 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2126
495
|
}
|
|
2127
496
|
} else {
|
|
2128
497
|
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
2129
|
-
if (existingStyleContainer) {
|
|
2130
|
-
existingStyleContainer.
|
|
498
|
+
if (existingStyleContainer && true) {
|
|
499
|
+
existingStyleContainer.textContent = style + existingStyleContainer.textContent;
|
|
2131
500
|
} else {
|
|
2132
501
|
styleContainerNode.prepend(styleElm);
|
|
2133
502
|
}
|
|
@@ -2140,7 +509,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2140
509
|
styleContainerNode.insertBefore(styleElm, null);
|
|
2141
510
|
}
|
|
2142
511
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
2143
|
-
styleElm.
|
|
512
|
+
styleElm.textContent += SLOT_FB_CSS;
|
|
2144
513
|
}
|
|
2145
514
|
if (appliedStyles) {
|
|
2146
515
|
appliedStyles.add(scopeId2);
|
|
@@ -2188,6 +557,15 @@ var attachStyles = (hostRef) => {
|
|
|
2188
557
|
endAttachStyles();
|
|
2189
558
|
};
|
|
2190
559
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
560
|
+
|
|
561
|
+
// src/utils/helpers.ts
|
|
562
|
+
var isDef = (v) => v != null && v !== void 0;
|
|
563
|
+
var isComplexType = (o) => {
|
|
564
|
+
o = typeof o;
|
|
565
|
+
return o === "object" || o === "function";
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
// src/runtime/vdom/h.ts
|
|
2191
569
|
var h = (nodeName, vnodeData, ...children) => {
|
|
2192
570
|
if (typeof nodeName === "string") {
|
|
2193
571
|
nodeName = transformTag(nodeName);
|
|
@@ -2255,7 +633,8 @@ var newVNode = (tag, text) => {
|
|
|
2255
633
|
const vnode = {
|
|
2256
634
|
$flags$: 0,
|
|
2257
635
|
$tag$: tag,
|
|
2258
|
-
|
|
636
|
+
// Normalize undefined to null to prevent rendering "undefined" as text
|
|
637
|
+
$text$: text != null ? text : null,
|
|
2259
638
|
$elm$: null,
|
|
2260
639
|
$children$: null
|
|
2261
640
|
};
|
|
@@ -2302,18 +681,33 @@ var convertToPrivate = (node) => {
|
|
|
2302
681
|
vnode.$name$ = node.vname;
|
|
2303
682
|
return vnode;
|
|
2304
683
|
};
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
)
|
|
684
|
+
|
|
685
|
+
// src/runtime/normalize-watchers.ts
|
|
686
|
+
var normalizeWatchers = (raw) => {
|
|
687
|
+
if (!raw) return void 0;
|
|
688
|
+
const keys = Object.keys(raw);
|
|
689
|
+
if (keys.length === 0) return void 0;
|
|
690
|
+
let hasLegacy = false;
|
|
691
|
+
for (const propName of keys) {
|
|
692
|
+
if (hasLegacy) break;
|
|
693
|
+
for (const h2 of raw[propName]) {
|
|
694
|
+
if (typeof h2 === "string") {
|
|
695
|
+
hasLegacy = true;
|
|
696
|
+
break;
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
if (!hasLegacy) return raw;
|
|
701
|
+
const out = {};
|
|
702
|
+
for (const propName of keys) {
|
|
703
|
+
out[propName] = raw[propName].map(
|
|
704
|
+
(h2) => typeof h2 === "string" ? { [h2]: 0 } : h2
|
|
705
|
+
);
|
|
706
|
+
}
|
|
707
|
+
return out;
|
|
2313
708
|
};
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
createSupportsRuleRe(":host-context");
|
|
709
|
+
|
|
710
|
+
// src/runtime/parse-property-value.ts
|
|
2317
711
|
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
2318
712
|
if (propValue != null && !isComplexType(propValue)) {
|
|
2319
713
|
if (propType & 4 /* Boolean */) {
|
|
@@ -2392,7 +786,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2392
786
|
}
|
|
2393
787
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
2394
788
|
if (newValue) {
|
|
2395
|
-
newValue
|
|
789
|
+
queueRefAttachment(newValue, elm);
|
|
2396
790
|
}
|
|
2397
791
|
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
2398
792
|
if (memberName[2] === "-") {
|
|
@@ -2412,15 +806,45 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2412
806
|
plt.ael(elm, memberName, newValue, capture);
|
|
2413
807
|
}
|
|
2414
808
|
}
|
|
809
|
+
} else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
|
|
810
|
+
const propName = memberName.slice(5);
|
|
811
|
+
let attrName;
|
|
812
|
+
{
|
|
813
|
+
const hostRef = getHostRef(elm);
|
|
814
|
+
if (hostRef && hostRef.$cmpMeta$ && hostRef.$cmpMeta$.$members$) {
|
|
815
|
+
const memberMeta = hostRef.$cmpMeta$.$members$[propName];
|
|
816
|
+
if (memberMeta && memberMeta[1]) {
|
|
817
|
+
attrName = memberMeta[1];
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
if (!attrName) {
|
|
822
|
+
attrName = propName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
823
|
+
}
|
|
824
|
+
if (newValue == null || newValue === false) {
|
|
825
|
+
if (newValue !== false || elm.getAttribute(attrName) === "") {
|
|
826
|
+
elm.removeAttribute(attrName);
|
|
827
|
+
}
|
|
828
|
+
} else {
|
|
829
|
+
elm.setAttribute(attrName, newValue === true ? "" : newValue);
|
|
830
|
+
}
|
|
831
|
+
return;
|
|
832
|
+
} else if (memberName[0] === "p" && memberName.startsWith("prop:")) {
|
|
833
|
+
const propName = memberName.slice(5);
|
|
834
|
+
try {
|
|
835
|
+
elm[propName] = newValue;
|
|
836
|
+
} catch (e) {
|
|
837
|
+
}
|
|
838
|
+
return;
|
|
2415
839
|
} else {
|
|
2416
840
|
const isComplex = isComplexType(newValue);
|
|
2417
|
-
if ((isProp || isComplex && newValue !== null) &&
|
|
841
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
2418
842
|
try {
|
|
2419
843
|
if (!elm.tagName.includes("-")) {
|
|
2420
844
|
const n = newValue == null ? "" : newValue;
|
|
2421
845
|
if (memberName === "list") {
|
|
2422
846
|
isProp = false;
|
|
2423
|
-
} else if (oldValue == null || elm[memberName]
|
|
847
|
+
} else if (oldValue == null || elm[memberName] !== n) {
|
|
2424
848
|
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
2425
849
|
elm[memberName] = n;
|
|
2426
850
|
} else {
|
|
@@ -2517,6 +941,8 @@ var useNativeShadowDom = false;
|
|
|
2517
941
|
var checkSlotFallbackVisibility = false;
|
|
2518
942
|
var checkSlotRelocate = false;
|
|
2519
943
|
var isSvgMode = false;
|
|
944
|
+
var refCallbacksToRemove = [];
|
|
945
|
+
var refCallbacksToAttach = [];
|
|
2520
946
|
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
2521
947
|
var _a;
|
|
2522
948
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
@@ -2539,7 +965,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2539
965
|
);
|
|
2540
966
|
}
|
|
2541
967
|
}
|
|
2542
|
-
if (newVNode2.$text$
|
|
968
|
+
if (newVNode2.$text$ != null) {
|
|
2543
969
|
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
2544
970
|
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
2545
971
|
elm = newVNode2.$elm$ = win.document.createTextNode("");
|
|
@@ -2548,9 +974,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2548
974
|
}
|
|
2549
975
|
} else {
|
|
2550
976
|
if (!win.document) {
|
|
2551
|
-
throw new Error(
|
|
2552
|
-
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
2553
|
-
);
|
|
977
|
+
throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");
|
|
2554
978
|
}
|
|
2555
979
|
elm = newVNode2.$elm$ = win.document.createElement(
|
|
2556
980
|
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
@@ -2581,9 +1005,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2581
1005
|
patchSlotNode(elm);
|
|
2582
1006
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
2583
1007
|
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
2584
|
-
|
|
2585
|
-
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
2586
|
-
}
|
|
1008
|
+
relocateToHostRoot(oldParentVNode.$elm$);
|
|
2587
1009
|
}
|
|
2588
1010
|
{
|
|
2589
1011
|
addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
|
|
@@ -2592,9 +1014,37 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2592
1014
|
}
|
|
2593
1015
|
return elm;
|
|
2594
1016
|
};
|
|
1017
|
+
var relocateToHostRoot = (parentElm) => {
|
|
1018
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
1019
|
+
const host = parentElm.closest(hostTagName.toLowerCase());
|
|
1020
|
+
if (host != null) {
|
|
1021
|
+
const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
|
|
1022
|
+
(ref) => ref["s-cr"]
|
|
1023
|
+
);
|
|
1024
|
+
const childNodeArray = Array.from(
|
|
1025
|
+
parentElm.__childNodes || parentElm.childNodes
|
|
1026
|
+
);
|
|
1027
|
+
for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
|
|
1028
|
+
if (childNode["s-sh"] != null) {
|
|
1029
|
+
insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
|
|
1030
|
+
childNode["s-sh"] = void 0;
|
|
1031
|
+
checkSlotRelocate = true;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
1036
|
+
};
|
|
2595
1037
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
2596
1038
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
2597
1039
|
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
1040
|
+
if (parentElm["s-sr"]) {
|
|
1041
|
+
let node = parentElm;
|
|
1042
|
+
while (node = node.nextSibling) {
|
|
1043
|
+
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
1044
|
+
oldSlotChildNodes.push(node);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
2598
1048
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
2599
1049
|
const childNode = oldSlotChildNodes[i2];
|
|
2600
1050
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
@@ -2764,10 +1214,17 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
2764
1214
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
2765
1215
|
const oldChildren = oldVNode.$children$;
|
|
2766
1216
|
const newChildren = newVNode2.$children$;
|
|
1217
|
+
const tag = newVNode2.$tag$;
|
|
2767
1218
|
const text = newVNode2.$text$;
|
|
2768
1219
|
let defaultHolder;
|
|
2769
|
-
if (text
|
|
1220
|
+
if (text == null) {
|
|
2770
1221
|
{
|
|
1222
|
+
if (tag === "slot" && !useNativeShadowDom) {
|
|
1223
|
+
if (oldVNode.$name$ !== newVNode2.$name$) {
|
|
1224
|
+
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
1225
|
+
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
2771
1228
|
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
2772
1229
|
}
|
|
2773
1230
|
if (oldChildren !== null && newChildren !== null) {
|
|
@@ -2801,7 +1258,7 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2801
1258
|
const slotName = childNode["s-sn"];
|
|
2802
1259
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
2803
1260
|
node = hostContentNodes[j];
|
|
2804
|
-
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (
|
|
1261
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
|
|
2805
1262
|
if (isNodeLocatedInSlot(node, slotName)) {
|
|
2806
1263
|
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
2807
1264
|
checkSlotFallbackVisibility = true;
|
|
@@ -2841,15 +1298,39 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2841
1298
|
};
|
|
2842
1299
|
var nullifyVNodeRefs = (vNode) => {
|
|
2843
1300
|
{
|
|
2844
|
-
vNode.$attrs$ && vNode.$attrs$.ref
|
|
1301
|
+
if (vNode.$attrs$ && vNode.$attrs$.ref) {
|
|
1302
|
+
refCallbacksToRemove.push(() => vNode.$attrs$.ref(null));
|
|
1303
|
+
}
|
|
2845
1304
|
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
2846
1305
|
}
|
|
2847
1306
|
};
|
|
2848
|
-
var
|
|
2849
|
-
|
|
2850
|
-
|
|
1307
|
+
var queueRefAttachment = (refCallback, elm) => {
|
|
1308
|
+
{
|
|
1309
|
+
refCallbacksToAttach.push(() => refCallback(elm));
|
|
2851
1310
|
}
|
|
1311
|
+
};
|
|
1312
|
+
var flushQueuedRefCallbacks = () => {
|
|
2852
1313
|
{
|
|
1314
|
+
refCallbacksToRemove.forEach((cb) => cb());
|
|
1315
|
+
refCallbacksToRemove.length = 0;
|
|
1316
|
+
refCallbacksToAttach.forEach((cb) => cb());
|
|
1317
|
+
refCallbacksToAttach.length = 0;
|
|
1318
|
+
}
|
|
1319
|
+
};
|
|
1320
|
+
var insertBefore = (parent, newNode, reference, isInitialLoad) => {
|
|
1321
|
+
{
|
|
1322
|
+
if (typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
|
|
1323
|
+
addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
|
|
1324
|
+
} else if (typeof newNode["s-sn"] === "string") {
|
|
1325
|
+
parent.insertBefore(newNode, reference);
|
|
1326
|
+
const { slotNode } = findSlotFromSlottedNode(newNode);
|
|
1327
|
+
if (slotNode && !isInitialLoad) dispatchSlotChangeEvent(slotNode);
|
|
1328
|
+
return newNode;
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
if (parent.__insertBefore) {
|
|
1332
|
+
return parent.__insertBefore(newNode, reference);
|
|
1333
|
+
} else {
|
|
2853
1334
|
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
2854
1335
|
}
|
|
2855
1336
|
};
|
|
@@ -2875,7 +1356,7 @@ function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
|
|
|
2875
1356
|
}
|
|
2876
1357
|
}
|
|
2877
1358
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
2878
|
-
var _a, _b, _c, _d;
|
|
1359
|
+
var _a, _b, _c, _d, _e;
|
|
2879
1360
|
const hostElm = hostRef.$hostElement$;
|
|
2880
1361
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
2881
1362
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -2919,7 +1400,12 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2919
1400
|
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
2920
1401
|
const orgLocationNode = win.document.createTextNode("");
|
|
2921
1402
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
2922
|
-
insertBefore(
|
|
1403
|
+
insertBefore(
|
|
1404
|
+
nodeToRelocate.parentNode,
|
|
1405
|
+
nodeToRelocate["s-ol"] = orgLocationNode,
|
|
1406
|
+
nodeToRelocate,
|
|
1407
|
+
isInitialLoad
|
|
1408
|
+
);
|
|
2923
1409
|
}
|
|
2924
1410
|
}
|
|
2925
1411
|
for (const relocateData of relocateNodes) {
|
|
@@ -2931,7 +1417,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2931
1417
|
if (slotRefNode) {
|
|
2932
1418
|
const parentNodeRef = slotRefNode.parentNode;
|
|
2933
1419
|
let insertBeforeNode = slotRefNode.nextSibling;
|
|
2934
|
-
{
|
|
1420
|
+
if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
|
|
2935
1421
|
let orgLocationNode = (_b = nodeToRelocate["s-ol"]) == null ? void 0 : _b.previousSibling;
|
|
2936
1422
|
while (orgLocationNode) {
|
|
2937
1423
|
let refNode = (_c = orgLocationNode["s-nr"]) != null ? _c : null;
|
|
@@ -2952,10 +1438,18 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2952
1438
|
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
2953
1439
|
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
2954
1440
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
2955
|
-
|
|
2956
|
-
|
|
1441
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode, isInitialLoad);
|
|
1442
|
+
if (nodeToRelocate.nodeType === 8 /* CommentNode */ && nodeToRelocate.nodeValue.startsWith("s-nt-")) {
|
|
1443
|
+
const textNode = win.document.createTextNode(nodeToRelocate.nodeValue.replace(/^s-nt-/, ""));
|
|
1444
|
+
textNode["s-hn"] = nodeToRelocate["s-hn"];
|
|
1445
|
+
textNode["s-sn"] = nodeToRelocate["s-sn"];
|
|
1446
|
+
textNode["s-sh"] = nodeToRelocate["s-sh"];
|
|
1447
|
+
textNode["s-sr"] = nodeToRelocate["s-sr"];
|
|
1448
|
+
textNode["s-ol"] = nodeToRelocate["s-ol"];
|
|
1449
|
+
textNode["s-ol"]["s-nr"] = textNode;
|
|
1450
|
+
insertBefore(nodeToRelocate.parentNode, textNode, nodeToRelocate, isInitialLoad);
|
|
1451
|
+
nodeToRelocate.parentNode.removeChild(nodeToRelocate);
|
|
2957
1452
|
}
|
|
2958
|
-
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
2959
1453
|
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
2960
1454
|
nodeToRelocate.hidden = (_d = nodeToRelocate["s-ih"]) != null ? _d : false;
|
|
2961
1455
|
}
|
|
@@ -2973,7 +1467,26 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2973
1467
|
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
2974
1468
|
relocateNodes.length = 0;
|
|
2975
1469
|
}
|
|
1470
|
+
if (!useNativeShadowDom && !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && hostElm["s-cr"]) {
|
|
1471
|
+
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
1472
|
+
for (const childNode of children) {
|
|
1473
|
+
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
1474
|
+
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
1475
|
+
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
1476
|
+
}
|
|
1477
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1478
|
+
childNode.hidden = true;
|
|
1479
|
+
} else if (childNode.nodeType === 3 /* TextNode */ && !!childNode.nodeValue.trim()) {
|
|
1480
|
+
const textCommentNode = win.document.createComment("s-nt-" + childNode.nodeValue);
|
|
1481
|
+
textCommentNode["s-sn"] = childNode["s-sn"];
|
|
1482
|
+
insertBefore(childNode.parentNode, textCommentNode, childNode, isInitialLoad);
|
|
1483
|
+
childNode.parentNode.removeChild(childNode);
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
2976
1488
|
contentRef = void 0;
|
|
1489
|
+
flushQueuedRefCallbacks();
|
|
2977
1490
|
};
|
|
2978
1491
|
|
|
2979
1492
|
// src/runtime/update-component.ts
|
|
@@ -3019,6 +1532,10 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
3019
1532
|
let maybePromise;
|
|
3020
1533
|
if (isInitialLoad) {
|
|
3021
1534
|
{
|
|
1535
|
+
if (hostRef.$deferredConnectedCallback$) {
|
|
1536
|
+
hostRef.$deferredConnectedCallback$ = false;
|
|
1537
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1538
|
+
}
|
|
3022
1539
|
{
|
|
3023
1540
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
3024
1541
|
if (hostRef.$queuedListeners$) {
|
|
@@ -3038,8 +1555,8 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
3038
1555
|
endSchedule();
|
|
3039
1556
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
3040
1557
|
};
|
|
3041
|
-
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((
|
|
3042
|
-
console.error(
|
|
1558
|
+
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err) => {
|
|
1559
|
+
console.error(err);
|
|
3043
1560
|
fn();
|
|
3044
1561
|
}) : fn();
|
|
3045
1562
|
var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
|
|
@@ -3067,7 +1584,7 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
3067
1584
|
if (childrenPromises.length === 0) {
|
|
3068
1585
|
postUpdate();
|
|
3069
1586
|
} else {
|
|
3070
|
-
Promise.all(childrenPromises).then(postUpdate);
|
|
1587
|
+
Promise.all(childrenPromises).then(postUpdate).catch(postUpdate);
|
|
3071
1588
|
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
3072
1589
|
childrenPromises.length = 0;
|
|
3073
1590
|
}
|
|
@@ -3205,13 +1722,16 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
3205
1722
|
});
|
|
3206
1723
|
}
|
|
3207
1724
|
}
|
|
3208
|
-
if (
|
|
1725
|
+
if (flags & 2 /* hasRendered */) {
|
|
3209
1726
|
if (instance.componentShouldUpdate) {
|
|
3210
|
-
|
|
1727
|
+
const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
|
|
1728
|
+
if (shouldUpdate === false && !(flags & 16 /* isQueuedForUpdate */)) {
|
|
3211
1729
|
return;
|
|
3212
1730
|
}
|
|
3213
1731
|
}
|
|
3214
|
-
|
|
1732
|
+
if (!(flags & 16 /* isQueuedForUpdate */)) {
|
|
1733
|
+
scheduleUpdate(hostRef, false);
|
|
1734
|
+
}
|
|
3215
1735
|
}
|
|
3216
1736
|
}
|
|
3217
1737
|
};
|
|
@@ -3223,7 +1743,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3223
1743
|
if (cmpMeta.$members$ || BUILD.propChangeCallback) {
|
|
3224
1744
|
{
|
|
3225
1745
|
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
3226
|
-
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1746
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
|
|
3227
1747
|
}
|
|
3228
1748
|
if (Cstr.deserializers && !cmpMeta.$deserializers$) {
|
|
3229
1749
|
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
@@ -3235,7 +1755,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3235
1755
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
3236
1756
|
members.map(([memberName, [memberFlags]]) => {
|
|
3237
1757
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
3238
|
-
const { get: origGetter, set: origSetter } =
|
|
1758
|
+
const { get: origGetter, set: origSetter } = getPropertyDescriptor(prototype, memberName) || {};
|
|
3239
1759
|
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
3240
1760
|
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
3241
1761
|
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
@@ -3349,11 +1869,13 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3349
1869
|
return;
|
|
3350
1870
|
}
|
|
3351
1871
|
const propFlags = members.find(([m]) => m === propName);
|
|
3352
|
-
|
|
1872
|
+
const isBooleanTarget = propFlags && propFlags[1][0] & 4 /* Boolean */;
|
|
1873
|
+
const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
|
|
1874
|
+
if (isBooleanTarget) {
|
|
3353
1875
|
newValue = newValue === null || newValue === "false" ? false : true;
|
|
3354
1876
|
}
|
|
3355
1877
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
3356
|
-
if (newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1878
|
+
if (!isSpuriousBooleanRemoval && newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
3357
1879
|
this[propName] = newValue;
|
|
3358
1880
|
}
|
|
3359
1881
|
});
|
|
@@ -3380,71 +1902,87 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3380
1902
|
// src/runtime/initialize-component.ts
|
|
3381
1903
|
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
3382
1904
|
let Cstr;
|
|
3383
|
-
|
|
3384
|
-
hostRef.$flags$
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
1905
|
+
try {
|
|
1906
|
+
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1907
|
+
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1908
|
+
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1909
|
+
if (bundleId) {
|
|
1910
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1911
|
+
if (CstrImport && "then" in CstrImport) {
|
|
1912
|
+
const endLoad = uniqueTime();
|
|
1913
|
+
Cstr = await CstrImport;
|
|
1914
|
+
endLoad();
|
|
1915
|
+
} else {
|
|
1916
|
+
Cstr = CstrImport;
|
|
1917
|
+
}
|
|
1918
|
+
if (!Cstr) {
|
|
1919
|
+
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1920
|
+
}
|
|
1921
|
+
if (!Cstr.isProxied) {
|
|
1922
|
+
{
|
|
1923
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
|
|
1924
|
+
cmpMeta.$serializers$ = Cstr.serializers;
|
|
1925
|
+
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
1926
|
+
}
|
|
1927
|
+
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1928
|
+
Cstr.isProxied = true;
|
|
1929
|
+
}
|
|
1930
|
+
const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
|
|
3399
1931
|
{
|
|
3400
|
-
|
|
3401
|
-
cmpMeta.$serializers$ = Cstr.serializers;
|
|
3402
|
-
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
1932
|
+
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
3403
1933
|
}
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
1934
|
+
try {
|
|
1935
|
+
new Cstr(hostRef);
|
|
1936
|
+
} catch (e) {
|
|
1937
|
+
consoleError(e, elm);
|
|
1938
|
+
}
|
|
1939
|
+
{
|
|
1940
|
+
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
1941
|
+
}
|
|
1942
|
+
{
|
|
1943
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1944
|
+
}
|
|
1945
|
+
endNewInstance();
|
|
1946
|
+
const needsDeferredCallback = cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
|
|
1947
|
+
if (!needsDeferredCallback) {
|
|
1948
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1949
|
+
} else {
|
|
1950
|
+
hostRef.$deferredConnectedCallback$ = true;
|
|
1951
|
+
}
|
|
1952
|
+
} else {
|
|
1953
|
+
Cstr = elm.constructor;
|
|
1954
|
+
const cmpTag = elm.localName;
|
|
1955
|
+
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
3418
1956
|
}
|
|
3419
|
-
{
|
|
3420
|
-
|
|
1957
|
+
if (Cstr && Cstr.style) {
|
|
1958
|
+
let style;
|
|
1959
|
+
if (typeof Cstr.style === "string") {
|
|
1960
|
+
style = Cstr.style;
|
|
1961
|
+
}
|
|
1962
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
1963
|
+
if (!styles.has(scopeId2) || BUILD.hotModuleReplacement) {
|
|
1964
|
+
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
1965
|
+
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1966
|
+
endRegisterStyles();
|
|
1967
|
+
}
|
|
3421
1968
|
}
|
|
3422
|
-
|
|
3423
|
-
|
|
1969
|
+
}
|
|
1970
|
+
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1971
|
+
const schedule = () => scheduleUpdate(hostRef, true);
|
|
1972
|
+
if (ancestorComponent && ancestorComponent["s-rc"]) {
|
|
1973
|
+
ancestorComponent["s-rc"].push(schedule);
|
|
3424
1974
|
} else {
|
|
3425
|
-
|
|
3426
|
-
const cmpTag = elm.localName;
|
|
3427
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1975
|
+
schedule();
|
|
3428
1976
|
}
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
3438
|
-
endRegisterStyles();
|
|
3439
|
-
}
|
|
1977
|
+
} catch (e) {
|
|
1978
|
+
consoleError(e, elm);
|
|
1979
|
+
if (hostRef.$onRenderResolve$) {
|
|
1980
|
+
hostRef.$onRenderResolve$();
|
|
1981
|
+
hostRef.$onRenderResolve$ = void 0;
|
|
1982
|
+
}
|
|
1983
|
+
if (hostRef.$onReadyResolve$) {
|
|
1984
|
+
hostRef.$onReadyResolve$(elm);
|
|
3440
1985
|
}
|
|
3441
|
-
}
|
|
3442
|
-
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
3443
|
-
const schedule = () => scheduleUpdate(hostRef, true);
|
|
3444
|
-
if (ancestorComponent && ancestorComponent["s-rc"]) {
|
|
3445
|
-
ancestorComponent["s-rc"].push(schedule);
|
|
3446
|
-
} else {
|
|
3447
|
-
schedule();
|
|
3448
1986
|
}
|
|
3449
1987
|
};
|
|
3450
1988
|
var fireConnectedCallback = (instance, elm) => {
|
|
@@ -3481,7 +2019,7 @@ var connectedCallback = (elm) => {
|
|
|
3481
2019
|
}
|
|
3482
2020
|
if (cmpMeta.$members$) {
|
|
3483
2021
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
3484
|
-
if (memberFlags & 31 /* Prop */ &&
|
|
2022
|
+
if (memberFlags & 31 /* Prop */ && Object.prototype.hasOwnProperty.call(elm, memberName)) {
|
|
3485
2023
|
const value = elm[memberName];
|
|
3486
2024
|
delete elm[memberName];
|
|
3487
2025
|
elm[memberName] = value;
|
|
@@ -3562,7 +2100,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3562
2100
|
let hasSlotRelocation = false;
|
|
3563
2101
|
lazyBundles.map((lazyBundle) => {
|
|
3564
2102
|
lazyBundle[1].map((compactMeta) => {
|
|
3565
|
-
var _a2, _b
|
|
2103
|
+
var _a2, _b;
|
|
3566
2104
|
const cmpMeta = {
|
|
3567
2105
|
$flags$: compactMeta[0],
|
|
3568
2106
|
$tagName$: compactMeta[1],
|
|
@@ -3582,16 +2120,18 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3582
2120
|
cmpMeta.$attrsToReflect$ = [];
|
|
3583
2121
|
}
|
|
3584
2122
|
{
|
|
3585
|
-
cmpMeta.$watchers$ = (
|
|
3586
|
-
cmpMeta.$serializers$ = (
|
|
3587
|
-
cmpMeta.$deserializers$ = (
|
|
2123
|
+
cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
|
|
2124
|
+
cmpMeta.$serializers$ = (_a2 = compactMeta[5]) != null ? _a2 : {};
|
|
2125
|
+
cmpMeta.$deserializers$ = (_b = compactMeta[6]) != null ? _b : {};
|
|
3588
2126
|
}
|
|
3589
2127
|
const tagName = transformTag(cmpMeta.$tagName$);
|
|
3590
2128
|
const HostElement = class extends HTMLElement {
|
|
2129
|
+
["s-p"];
|
|
2130
|
+
["s-rc"];
|
|
2131
|
+
hasRegisteredEventListeners = false;
|
|
3591
2132
|
// StencilLazyHost
|
|
3592
2133
|
constructor(self) {
|
|
3593
2134
|
super(self);
|
|
3594
|
-
this.hasRegisteredEventListeners = false;
|
|
3595
2135
|
self = this;
|
|
3596
2136
|
registerHost(self, cmpMeta);
|
|
3597
2137
|
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|