xv-webcomponents 1.25.1 → 2.0.0-beta.28
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/LICENSE +21 -21
- package/README.md +249 -129
- package/dist/angular/angular-component-lib/utils.d.ts +9 -0
- package/dist/angular/angular-component-lib/utils.js +58 -0
- package/dist/angular/index.d.ts +4 -0
- package/dist/angular/index.js +56 -0
- package/dist/angular/proxies.d.ts +696 -0
- package/dist/angular/proxies.js +1642 -0
- package/dist/angular/web-components.module.d.ts +7 -0
- package/dist/angular/web-components.module.js +168 -0
- package/dist/cjs/_vars-DMytunQw.js +26 -0
- package/dist/cjs/{index-Cb30DBqk.js → index-DaTpiyaU.js} +2 -0
- package/dist/cjs/{index-DpLAFt0R.js → index-Dwhgrew8.js} +401 -1805
- package/dist/cjs/index.cjs.js +4 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/maplibre-gl-BIvnXGyX.js +884 -0
- package/dist/cjs/{xv-accordion-v2_50.cjs.entry.js → xv-accordion-v2_49.cjs.entry.js} +2046 -694
- package/dist/cjs/xv-header-next.cjs.entry.js +10 -89
- package/dist/cjs/xv-mega-menu-next.cjs.entry.js +4 -4
- package/dist/cjs/xv-webcomponents.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/xv-accordion/xv-accordion.js +1 -1
- package/dist/collection/components/xv-accordion-item/xv-accordion-item.js +1 -1
- package/dist/collection/components/xv-breadcrumbs/xv-breadcrumbs.js +1 -1
- package/dist/collection/components/xv-button/xv-button.js +2 -1
- package/dist/collection/components/xv-button-group/xv-button-group.js +3 -3
- package/dist/collection/components/xv-card/xv-card.js +1 -1
- package/dist/collection/components/xv-checkbox/xv-checkbox.js +4 -3
- package/dist/collection/components/xv-content-switcher/xv-content-switcher-item/xv-content-switcher-item.js +1 -1
- package/dist/collection/components/xv-content-switcher/xv-content-switcher.js +7 -6
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js +5 -3
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.js +4 -3
- package/dist/collection/components/xv-data-table/xv-data-table.js +5 -3
- package/dist/collection/components/xv-date-picker/xv-date-picker.js +16 -8
- package/dist/collection/components/xv-datepicker/xv-datepicker.js +5 -4
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js +9 -5
- package/dist/collection/components/xv-dropdown/xv-dropdown.js +9 -5
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.css +3 -3
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.js +6 -4
- package/dist/collection/components/xv-footer/xv-footer.js +1 -1
- package/dist/collection/components/xv-geo-map/xv-geo-map.css +43 -67
- package/dist/collection/components/xv-geo-map/xv-geo-map.js +10 -10
- package/dist/collection/components/xv-header/xv-header.js +7 -88
- package/dist/collection/components/xv-header-next/xv-header-next.js +10 -91
- package/dist/collection/components/xv-link/xv-link.js +1 -1
- package/dist/collection/components/xv-loader/xv-loader.js +2 -1
- package/dist/collection/components/xv-login-modal/xv-login-modal.css +7 -7
- package/dist/collection/components/xv-mega-menu/xv-mega-menu.js +2 -2
- package/dist/collection/components/xv-mega-menu-next/xv-mega-menu-next.js +5 -4
- package/dist/collection/components/xv-modal/xv-modal.js +3 -2
- package/dist/collection/components/xv-notification/xv-notification.js +3 -2
- package/dist/collection/components/xv-number-input/xv-number-input.js +4 -3
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js +7 -4
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +14 -11
- package/dist/collection/components/xv-pagination/xv-pagination.css +2 -2
- package/dist/collection/components/xv-pagination/xv-pagination.js +7 -4
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js +3 -2
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +6 -5
- package/dist/collection/components/xv-radio/xv-radio.js +4 -3
- package/dist/collection/components/xv-slider/xv-slider.js +1 -1
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.css +129 -61
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js +279 -78
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.css +138 -24
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +334 -162
- package/dist/collection/components/xv-table/xv-table.css +240 -99
- package/dist/collection/components/xv-table/xv-table.js +2058 -64
- package/dist/collection/components/xv-table/xv-table.model.js +10 -0
- package/dist/collection/components/xv-table/xv-table.utils.js +243 -0
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +1 -1
- package/dist/collection/components/xv-tabs/xv-tabs.js +2 -1
- package/dist/collection/components/xv-tag/xv-tag.js +1 -1
- package/dist/collection/components/xv-tag-combobox/xv-tag-combobox.js +6 -4
- package/dist/collection/components/xv-text-input/xv-text-input.js +4 -3
- package/dist/collection/components/xv-textarea/xv-textarea.js +4 -3
- package/dist/collection/components/xv-tile/xv-tile.css +1 -1
- package/dist/collection/components/xv-tile/xv-tile.js +2 -2
- package/dist/collection/components/xv-toggle/xv-toggle.js +3 -2
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js +3 -2
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +4 -3
- package/dist/collection/index.js +3 -0
- package/dist/collection/utils/table-layout.js +130 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-A3B7AR96.js +9 -0
- package/dist/components/p-B0kwaJ8n.js +1 -0
- package/dist/components/p-B9zHwwFm.js +1 -0
- package/dist/components/p-BEoh0dZI.js +1 -0
- package/dist/components/p-BaZ-srfu.js +1 -0
- package/dist/components/p-Bej2l-wN.js +1 -0
- package/dist/components/p-BfP9ezJQ.js +1 -0
- package/dist/components/p-BfhvpeQh.js +1 -0
- package/dist/components/p-BiiqsbVQ.js +1 -0
- package/dist/components/p-CSYnNMKb.js +1 -0
- package/dist/components/p-CspyoLL9.js +1 -0
- package/dist/components/p-CvgDDcjp.js +1 -0
- package/dist/components/p-D4FwGeDJ.js +1 -0
- package/dist/components/p-DCvH_Br_.js +1 -0
- package/dist/components/p-DFe9Mtw_.js +1 -0
- package/dist/components/p-DFtMwE-h.js +1 -0
- package/dist/components/p-DIvi4fI3.js +1 -0
- package/dist/components/p-DNRISLNf.js +1 -0
- package/dist/components/p-DPnvoOYj.js +1 -0
- package/dist/components/p-Dwbe941A.js +1 -0
- package/dist/components/p-HjYAjHna.js +1 -0
- package/dist/components/p-JClekcEh.js +1 -0
- package/dist/components/p-NoM9oIJn.js +1 -0
- package/dist/components/p-SvgdO2VS.js +1 -0
- package/dist/components/p-XEk4dHG3.js +1 -0
- package/dist/components/p-e0i0f6QA.js +1 -0
- package/dist/components/p-i7_81si-.js +1 -0
- package/dist/components/p-i82EFiq6.js +1 -0
- package/dist/components/p-jD7nSJaM.js +1 -0
- package/dist/components/xv-accordion-v2-item.d.ts +11 -0
- package/dist/components/xv-accordion-v2-item.js +1 -0
- package/dist/components/xv-accordion-v2.d.ts +11 -0
- package/dist/components/xv-accordion-v2.js +1 -0
- package/dist/components/xv-breadcrumbs-v2.d.ts +11 -0
- package/dist/components/xv-breadcrumbs-v2.js +1 -0
- package/dist/components/xv-button-group-v2.d.ts +11 -0
- package/dist/components/xv-button-group-v2.js +1 -0
- package/dist/components/xv-button-v2.d.ts +11 -0
- package/dist/components/xv-button-v2.js +1 -0
- package/dist/components/xv-card-v2.d.ts +11 -0
- package/dist/components/xv-card-v2.js +1 -0
- package/dist/components/xv-checkbox-v2.d.ts +11 -0
- package/dist/components/xv-checkbox-v2.js +1 -0
- package/dist/components/xv-content-switcher-item-v2.d.ts +11 -0
- package/dist/components/xv-content-switcher-item-v2.js +1 -0
- package/dist/components/xv-content-switcher-v2.d.ts +11 -0
- package/dist/components/xv-content-switcher-v2.js +1 -0
- package/dist/components/xv-data-table-cell.d.ts +11 -0
- package/dist/components/xv-data-table-cell.js +1 -0
- package/dist/components/xv-data-table-collapse.d.ts +11 -0
- package/dist/components/xv-data-table-collapse.js +1 -0
- package/dist/components/xv-data-table-row.d.ts +11 -0
- package/dist/components/xv-data-table-row.js +1 -0
- package/dist/components/xv-data-table.d.ts +11 -0
- package/dist/components/xv-data-table.js +7 -0
- package/dist/components/xv-date-picker.d.ts +11 -0
- package/dist/components/xv-date-picker.js +1 -0
- package/dist/components/xv-datepicker.d.ts +11 -0
- package/dist/components/xv-datepicker.js +1 -0
- package/dist/components/xv-dropdown-v2-item.d.ts +11 -0
- package/dist/components/xv-dropdown-v2-item.js +1 -0
- package/dist/components/xv-dropdown-v2.d.ts +11 -0
- package/dist/components/xv-dropdown-v2.js +1 -0
- package/dist/components/xv-file-uploader.d.ts +11 -0
- package/dist/components/xv-file-uploader.js +1 -0
- package/dist/components/xv-footer.d.ts +11 -0
- package/dist/components/xv-footer.js +1 -0
- package/dist/components/xv-geo-map-v2.d.ts +11 -0
- package/dist/components/xv-geo-map-v2.js +1 -0
- package/dist/components/xv-header-next.d.ts +11 -0
- package/dist/components/xv-header-next.js +1 -0
- package/dist/components/xv-header.d.ts +11 -0
- package/dist/components/xv-header.js +1 -0
- package/dist/components/xv-image-viewer.d.ts +11 -0
- package/dist/components/xv-image-viewer.js +1 -0
- package/dist/components/xv-link-v2.d.ts +11 -0
- package/dist/components/xv-link-v2.js +1 -0
- package/dist/components/xv-loader-v2.d.ts +11 -0
- package/dist/components/xv-loader-v2.js +1 -0
- package/dist/components/xv-login-modal.d.ts +11 -0
- package/dist/components/xv-login-modal.js +1 -0
- package/dist/components/xv-mega-menu-next.d.ts +11 -0
- package/dist/components/xv-mega-menu-next.js +1 -0
- package/dist/components/xv-mega-menu.d.ts +11 -0
- package/dist/components/xv-mega-menu.js +1 -0
- package/dist/components/xv-modal-v2.d.ts +11 -0
- package/dist/components/xv-modal-v2.js +1 -0
- package/dist/components/xv-notification-v2.d.ts +11 -0
- package/dist/components/xv-notification-v2.js +1 -0
- package/dist/components/xv-number-input-v2.d.ts +11 -0
- package/dist/components/xv-number-input-v2.js +1 -0
- package/dist/components/xv-overflow-menu-v2-item.d.ts +11 -0
- package/dist/components/xv-overflow-menu-v2-item.js +1 -0
- package/dist/components/xv-overflow-menu-v2.d.ts +11 -0
- package/dist/components/xv-overflow-menu-v2.js +1 -0
- package/dist/components/xv-pagination.d.ts +11 -0
- package/dist/components/xv-pagination.js +1 -0
- package/dist/components/xv-progress-indicator-v2-item.d.ts +11 -0
- package/dist/components/xv-progress-indicator-v2-item.js +1 -0
- package/dist/components/xv-progress-indicator-v2.d.ts +11 -0
- package/dist/components/xv-progress-indicator-v2.js +1 -0
- package/dist/components/xv-radio-v2.d.ts +11 -0
- package/dist/components/xv-radio-v2.js +1 -0
- package/dist/components/xv-slider-v2.d.ts +11 -0
- package/dist/components/xv-slider-v2.js +1 -0
- package/dist/components/xv-tab-v2.d.ts +11 -0
- package/dist/components/xv-tab-v2.js +1 -0
- package/dist/components/xv-table-cell.d.ts +11 -0
- package/dist/components/xv-table-cell.js +1 -0
- package/dist/components/xv-table-row.d.ts +11 -0
- package/dist/components/xv-table-row.js +1 -0
- package/dist/components/xv-table.d.ts +11 -0
- package/dist/components/xv-table.js +1 -0
- package/dist/components/xv-tabs-v2.d.ts +11 -0
- package/dist/components/xv-tabs-v2.js +1 -0
- package/dist/components/xv-tag-combobox.d.ts +11 -0
- package/dist/components/xv-tag-combobox.js +1 -0
- package/dist/components/xv-tag-v2.d.ts +11 -0
- package/dist/components/xv-tag-v2.js +1 -0
- package/dist/components/xv-text-input-v2.d.ts +11 -0
- package/dist/components/xv-text-input-v2.js +1 -0
- package/dist/components/xv-textarea.d.ts +11 -0
- package/dist/components/xv-textarea.js +1 -0
- package/dist/components/xv-tile.d.ts +11 -0
- package/dist/components/xv-tile.js +1 -0
- package/dist/components/xv-toggle-tip.d.ts +11 -0
- package/dist/components/xv-toggle-tip.js +1 -0
- package/dist/components/xv-toggle.d.ts +11 -0
- package/dist/components/xv-toggle.js +1 -0
- package/dist/components/xv-tooltip-v2.d.ts +11 -0
- package/dist/components/xv-tooltip-v2.js +1 -0
- package/dist/custom-elements.json +11561 -0
- package/dist/docs.d.ts +480 -0
- package/dist/docs.json +17181 -0
- package/dist/esm/_vars-CDEU4jkD.js +23 -0
- package/dist/esm/{index-CQm2sRKT.js → index-ClusqSO5.js} +2 -0
- package/dist/esm/{index-DmxA2ysB.js → index-DJC3-dS3.js} +400 -1806
- package/dist/esm/index.js +2 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/maplibre-gl-A3B7AR96.js +826 -0
- package/dist/esm/maplibre-gl-shared.mjs +2 -2
- package/dist/esm/maplibre-gl-worker.mjs +2 -2
- package/dist/esm/{xv-accordion-v2_50.entry.js → xv-accordion-v2_49.entry.js} +2044 -691
- package/dist/esm/xv-header-next.entry.js +10 -89
- package/dist/esm/xv-mega-menu-next.entry.js +4 -4
- package/dist/esm/xv-webcomponents.js +4 -4
- package/dist/react/components.d.ts +55 -0
- package/dist/react/components.js +56 -0
- package/dist/react/create-component.d.ts +24 -0
- package/dist/react/runtime.d.ts +2 -0
- package/dist/react/runtime.js +43 -0
- package/dist/react/tag-transformer.d.ts +3 -0
- package/dist/react/tag-transformer.js +12 -0
- package/dist/react/xv-accordion-v2-item.d.ts +12 -0
- package/dist/react/xv-accordion-v2-item.js +14 -0
- package/dist/react/xv-accordion-v2.d.ts +15 -0
- package/dist/react/xv-accordion-v2.js +14 -0
- package/dist/react/xv-breadcrumbs-v2.d.ts +9 -0
- package/dist/react/xv-breadcrumbs-v2.js +14 -0
- package/dist/react/xv-button-group-v2.d.ts +12 -0
- package/dist/react/xv-button-group-v2.js +14 -0
- package/dist/react/xv-button-v2.d.ts +9 -0
- package/dist/react/xv-button-v2.js +14 -0
- package/dist/react/xv-card-v2.d.ts +9 -0
- package/dist/react/xv-card-v2.js +14 -0
- package/dist/react/xv-checkbox-v2.d.ts +15 -0
- package/dist/react/xv-checkbox-v2.js +19 -0
- package/dist/react/xv-content-switcher-item-v2.d.ts +9 -0
- package/dist/react/xv-content-switcher-item-v2.js +14 -0
- package/dist/react/xv-content-switcher-v2.d.ts +12 -0
- package/dist/react/xv-content-switcher-v2.js +14 -0
- package/dist/react/xv-data-table-cell.d.ts +12 -0
- package/dist/react/xv-data-table-cell.js +14 -0
- package/dist/react/xv-data-table-collapse.d.ts +12 -0
- package/dist/react/xv-data-table-collapse.js +14 -0
- package/dist/react/xv-data-table-row.d.ts +12 -0
- package/dist/react/xv-data-table-row.js +14 -0
- package/dist/react/xv-data-table.d.ts +12 -0
- package/dist/react/xv-data-table.js +14 -0
- package/dist/react/xv-date-picker.d.ts +14 -0
- package/dist/react/xv-date-picker.js +18 -0
- package/dist/react/xv-datepicker.d.ts +13 -0
- package/dist/react/xv-datepicker.js +17 -0
- package/dist/react/xv-dropdown-v2-item.d.ts +12 -0
- package/dist/react/xv-dropdown-v2-item.js +14 -0
- package/dist/react/xv-dropdown-v2.d.ts +13 -0
- package/dist/react/xv-dropdown-v2.js +17 -0
- package/dist/react/xv-file-uploader.d.ts +13 -0
- package/dist/react/xv-file-uploader.js +17 -0
- package/dist/react/xv-footer.d.ts +9 -0
- package/dist/react/xv-footer.js +14 -0
- package/dist/react/xv-geo-map-v2.d.ts +13 -0
- package/dist/react/xv-geo-map-v2.js +17 -0
- package/dist/react/xv-header-next.d.ts +12 -0
- package/dist/react/xv-header-next.js +14 -0
- package/dist/react/xv-header.d.ts +12 -0
- package/dist/react/xv-header.js +14 -0
- package/dist/react/xv-image-viewer.d.ts +12 -0
- package/dist/react/xv-image-viewer.js +14 -0
- package/dist/react/xv-link-v2.d.ts +9 -0
- package/dist/react/xv-link-v2.js +14 -0
- package/dist/react/xv-loader-v2.d.ts +9 -0
- package/dist/react/xv-loader-v2.js +14 -0
- package/dist/react/xv-login-modal.d.ts +12 -0
- package/dist/react/xv-login-modal.js +14 -0
- package/dist/react/xv-mega-menu-next.d.ts +12 -0
- package/dist/react/xv-mega-menu-next.js +14 -0
- package/dist/react/xv-mega-menu.d.ts +12 -0
- package/dist/react/xv-mega-menu.js +14 -0
- package/dist/react/xv-modal-v2.d.ts +12 -0
- package/dist/react/xv-modal-v2.js +14 -0
- package/dist/react/xv-notification-v2.d.ts +12 -0
- package/dist/react/xv-notification-v2.js +14 -0
- package/dist/react/xv-number-input-v2.d.ts +12 -0
- package/dist/react/xv-number-input-v2.js +14 -0
- package/dist/react/xv-overflow-menu-v2-item.d.ts +12 -0
- package/dist/react/xv-overflow-menu-v2-item.js +14 -0
- package/dist/react/xv-overflow-menu-v2.d.ts +13 -0
- package/dist/react/xv-overflow-menu-v2.js +17 -0
- package/dist/react/xv-pagination.d.ts +15 -0
- package/dist/react/xv-pagination.js +14 -0
- package/dist/react/xv-progress-indicator-v2-item.d.ts +9 -0
- package/dist/react/xv-progress-indicator-v2-item.js +14 -0
- package/dist/react/xv-progress-indicator-v2.d.ts +9 -0
- package/dist/react/xv-progress-indicator-v2.js +14 -0
- package/dist/react/xv-radio-v2.d.ts +9 -0
- package/dist/react/xv-radio-v2.js +14 -0
- package/dist/react/xv-slider-v2.d.ts +12 -0
- package/dist/react/xv-slider-v2.js +14 -0
- package/dist/react/xv-tab-v2.d.ts +9 -0
- package/dist/react/xv-tab-v2.js +14 -0
- package/dist/react/xv-table-cell.d.ts +9 -0
- package/dist/react/xv-table-cell.js +14 -0
- package/dist/react/xv-table-row.d.ts +9 -0
- package/dist/react/xv-table-row.js +14 -0
- package/dist/react/xv-table.d.ts +18 -0
- package/dist/react/xv-table.js +22 -0
- package/dist/react/xv-tabs-v2.d.ts +12 -0
- package/dist/react/xv-tabs-v2.js +14 -0
- package/dist/react/xv-tag-combobox.d.ts +13 -0
- package/dist/react/xv-tag-combobox.js +17 -0
- package/dist/react/xv-tag-v2.d.ts +12 -0
- package/dist/react/xv-tag-v2.js +14 -0
- package/dist/react/xv-text-input-v2.d.ts +12 -0
- package/dist/react/xv-text-input-v2.js +14 -0
- package/dist/react/xv-textarea.d.ts +12 -0
- package/dist/react/xv-textarea.js +14 -0
- package/dist/react/xv-tile.d.ts +15 -0
- package/dist/react/xv-tile.js +14 -0
- package/dist/react/xv-toggle-tip.d.ts +12 -0
- package/dist/react/xv-toggle-tip.js +14 -0
- package/dist/react/xv-toggle.d.ts +12 -0
- package/dist/react/xv-toggle.js +14 -0
- package/dist/react/xv-tooltip-v2.d.ts +9 -0
- package/dist/react/xv-tooltip-v2.js +14 -0
- package/dist/types/components/xv-header/xv-header.d.ts +13 -29
- package/dist/types/components/xv-header-next/xv-header-next.d.ts +13 -29
- package/dist/types/components/xv-table/xv-table-cell/xv-table-cell.d.ts +43 -8
- package/dist/types/components/xv-table/xv-table-row/xv-table-row.d.ts +57 -18
- package/dist/types/components/xv-table/xv-table.d.ts +298 -9
- package/dist/types/components/xv-table/xv-table.model.d.ts +78 -0
- package/dist/types/components/xv-table/xv-table.utils.d.ts +47 -0
- package/dist/types/components.d.ts +1498 -209
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +126 -57
- package/dist/types/utils/table-layout.d.ts +7 -0
- package/dist/vscode-data.json +3293 -0
- package/dist/xv-webcomponents/index.esm.js +1 -1
- package/dist/xv-webcomponents/{p-fe9b38f8.entry.js → p-0c30d09f.entry.js} +1 -1
- package/dist/xv-webcomponents/p-6b58979e.entry.js +8 -0
- package/dist/xv-webcomponents/p-A3B7AR96.js +9 -0
- package/dist/xv-webcomponents/p-CDEU4jkD.js +1 -0
- package/dist/xv-webcomponents/p-DJC3-dS3.js +3 -0
- package/dist/xv-webcomponents/p-DSFVdw3w.js +1 -0
- package/dist/xv-webcomponents/p-c4173686.entry.js +1 -0
- package/dist/xv-webcomponents/xv-webcomponents.css +6 -6
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
- package/loader/index.d.ts +1 -1
- package/package.json +139 -61
- package/dist/cjs/_vars-Cyrk3TAl.js +0 -3423
- package/dist/cjs/maplibre-gl-CCZS3Rg5.js +0 -900
- package/dist/collection/components/xv-header/_vars.js +0 -51
- package/dist/collection/components/xv-table/_vars.js +0 -2
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.css +0 -58
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +0 -75
- package/dist/esm/_vars-BkYBzv3h.js +0 -3413
- package/dist/esm/maplibre-gl-CS4Eagm9.js +0 -813
- package/dist/types/components/xv-header/_vars.d.ts +0 -47
- package/dist/types/components/xv-table/_vars.d.ts +0 -15
- package/dist/types/components/xv-table/xv-table-expand/xv-table-expand.d.ts +0 -8
- package/dist/xv-webcomponents/p-7832549c.entry.js +0 -8
- package/dist/xv-webcomponents/p-BkYBzv3h.js +0 -1
- package/dist/xv-webcomponents/p-CQm2sRKT.js +0 -1
- package/dist/xv-webcomponents/p-CS4Eagm9.js +0 -10
- package/dist/xv-webcomponents/p-DmxA2ysB.js +0 -2
- package/dist/xv-webcomponents/p-f46bb687.entry.js +0 -1
|
@@ -4,261 +4,29 @@ const NAMESPACE = 'xv-webcomponents';
|
|
|
4
4
|
const BUILD = /* xv-webcomponents */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, slotRelocation: true, state: true, updatable: true};
|
|
5
5
|
|
|
6
6
|
const globalScripts = () => {};
|
|
7
|
-
const globalStyles = ".xv-container{width:100%;max-width:1170px;margin-inline:auto}@media (min-width: 576px){.xv-container{max-width:540px}}@media (min-width: 768px){.xv-container{max-width:720px}}@media (min-width: 992px){.xv-container{max-width:960px;padding-inline:var(--bs-gutter-x, 0.75rem)}}@media (min-width: 1200px){.xv-container{max-width:1140px}}@media (min-width: 1400px){.xv-container{max-width:1320px}}.xv-tooltip[role=tooltip]{position:absolute;background-color:var(--background-inverse, #333333);color:var(--text-on-color);padding:var(--spacing-03) var(--spacing-04);border-radius:3px;font-size:var(--fz-sm);z-index:999;min-width:min(150px, 90vw);max-width:min(400px, 90vw)}.xv-tooltip[role=tooltip]::after{content:\"\";position:absolute;width:0;height:0;border-style:solid}.xv-tooltip[role=tooltip][data-popper-placement=top]::after{bottom:-5px;left:50%;transform:translateX(-50%);border-width:5px 5px 0 5px;border-color:var(--background-inverse, black) transparent transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=top-start]::after{bottom:-5px;left:12px;border-width:5px 5px 0 5px;border-color:var(--background-inverse, black) transparent transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=top-end]::after{bottom:-5px;right:12px;border-width:5px 5px 0 5px;border-color:var(--background-inverse, black) transparent transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=bottom]::after{top:-5px;left:50%;transform:translateX(-50%);border-width:0 5px 5px 5px;border-color:transparent transparent var(--background-inverse, black) transparent}.xv-tooltip[role=tooltip][data-popper-placement=bottom-start]::after{top:-5px;left:12px;border-width:0 5px 5px 5px;border-color:transparent transparent var(--background-inverse, black) transparent}.xv-tooltip[role=tooltip][data-popper-placement=bottom-end]::after{top:-5px;right:12px;border-width:0 5px 5px 5px;border-color:transparent transparent var(--background-inverse, black) transparent}.xv-tooltip[role=tooltip][data-popper-placement=left]::after{top:50%;right:-5px;transform:translateY(-50%);border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--background-inverse, black)}.xv-tooltip[role=tooltip][data-popper-placement=left-start]::after{top:12px;right:-5px;border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--background-inverse, black)}.xv-tooltip[role=tooltip][data-popper-placement=left-end]::after{bottom:12px;right:-5px;border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--background-inverse, black)}.xv-tooltip[role=tooltip][data-popper-placement=right]::after{top:50%;left:-5px;transform:translateY(-50%);border-width:5px 5px 5px 0;border-color:transparent var(--background-inverse, black) transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=right-start]::after{top:12px;left:-5px;border-width:5px 5px 5px 0;border-color:transparent var(--background-inverse, black) transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=right-end]::after{bottom:12px;left:-5px;border-width:5px 5px 5px 0;border-color:transparent var(--background-inverse, black) transparent transparent}.fa,.fas,.far,.fal,.fad,.fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.3333333333em;line-height:0.75em;vertical-align:-0.0667em}.fa-xs{font-size:0.75em}.fa-sm{font-size:0.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid 0.08em #eee;border-radius:0.1em;padding:0.2em 0.25em 0.15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fas.fa-pull-left,.far.fa-pull-left,.fal.fa-pull-left,.fab.fa-pull-left{margin-right:0.3em}.fa.fa-pull-right,.fas.fa-pull-right,.far.fa-pull-right,.fal.fa-pull-right,.fab.fa-pull-right{margin-left:0.3em}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.fa-rotate-90{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\";transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";transform:scale(1, -1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";transform:scale(-1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-flip-both{filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.sr-only{border:0;clip:rect(0, 0, 0, 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}/*!\n
|
|
7
|
+
const globalStyles = ".xv-container{width:100%;max-width:1170px;margin-inline:auto}@media (min-width: 576px){.xv-container{max-width:540px}}@media (min-width: 768px){.xv-container{max-width:720px}}@media (min-width: 992px){.xv-container{max-width:960px;padding-inline:var(--bs-gutter-x, 0.75rem)}}@media (min-width: 1200px){.xv-container{max-width:1140px}}@media (min-width: 1400px){.xv-container{max-width:1320px}}.xv-tooltip[role=tooltip]{position:absolute;background-color:var(--background-inverse, #333333);color:var(--text-on-color);padding:var(--spacing-03) var(--spacing-04);border-radius:3px;font-size:var(--fz-sm);z-index:999;min-width:min(150px, 90vw);max-width:min(400px, 90vw)}.xv-tooltip[role=tooltip]::after{content:\"\";position:absolute;width:0;height:0;border-style:solid}.xv-tooltip[role=tooltip][data-popper-placement=top]::after{bottom:-5px;left:50%;transform:translateX(-50%);border-width:5px 5px 0 5px;border-color:var(--background-inverse, black) transparent transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=top-start]::after{bottom:-5px;left:12px;border-width:5px 5px 0 5px;border-color:var(--background-inverse, black) transparent transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=top-end]::after{bottom:-5px;right:12px;border-width:5px 5px 0 5px;border-color:var(--background-inverse, black) transparent transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=bottom]::after{top:-5px;left:50%;transform:translateX(-50%);border-width:0 5px 5px 5px;border-color:transparent transparent var(--background-inverse, black) transparent}.xv-tooltip[role=tooltip][data-popper-placement=bottom-start]::after{top:-5px;left:12px;border-width:0 5px 5px 5px;border-color:transparent transparent var(--background-inverse, black) transparent}.xv-tooltip[role=tooltip][data-popper-placement=bottom-end]::after{top:-5px;right:12px;border-width:0 5px 5px 5px;border-color:transparent transparent var(--background-inverse, black) transparent}.xv-tooltip[role=tooltip][data-popper-placement=left]::after{top:50%;right:-5px;transform:translateY(-50%);border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--background-inverse, black)}.xv-tooltip[role=tooltip][data-popper-placement=left-start]::after{top:12px;right:-5px;border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--background-inverse, black)}.xv-tooltip[role=tooltip][data-popper-placement=left-end]::after{bottom:12px;right:-5px;border-width:5px 0 5px 5px;border-color:transparent transparent transparent var(--background-inverse, black)}.xv-tooltip[role=tooltip][data-popper-placement=right]::after{top:50%;left:-5px;transform:translateY(-50%);border-width:5px 5px 5px 0;border-color:transparent var(--background-inverse, black) transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=right-start]::after{top:12px;left:-5px;border-width:5px 5px 5px 0;border-color:transparent var(--background-inverse, black) transparent transparent}.xv-tooltip[role=tooltip][data-popper-placement=right-end]::after{bottom:12px;left:-5px;border-width:5px 5px 5px 0;border-color:transparent var(--background-inverse, black) transparent transparent}.fa,.fas,.far,.fal,.fad,.fab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.3333333333em;line-height:0.75em;vertical-align:-0.0667em}.fa-xs{font-size:0.75em}.fa-sm{font-size:0.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:solid 0.08em #eee;border-radius:0.1em;padding:0.2em 0.25em 0.15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fas.fa-pull-left,.far.fa-pull-left,.fal.fa-pull-left,.fab.fa-pull-left{margin-right:0.3em}.fa.fa-pull-right,.fas.fa-pull-right,.far.fa-pull-right,.fal.fa-pull-right,.fab.fa-pull-right{margin-left:0.3em}.fa-spin{animation:fa-spin 2s infinite linear}.fa-pulse{animation:fa-spin 1s infinite steps(8)}@keyframes fa-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.fa-rotate-90{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\";transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";transform:scale(1, -1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-ms-filter:\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";transform:scale(-1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-flip-both{filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.sr-only{border:0;clip:rect(0, 0, 0, 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}/*!\n* Font Awesome Pro 5.15.4 by @fontawesome - https://fontawesome.com\n* License - https://fontawesome.com/license (Commercial License)\n*/@font-face{font-family:\"Font Awesome 5 Pro\";font-style:normal;font-weight:900;font-display:block;src:url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-solid-900.eot\");src:url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-solid-900.eot?#iefix\") format(\"embedded-opentype\"), url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-solid-900.woff2\") format(\"woff2\"), url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-solid-900.woff\") format(\"woff\"), url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-solid-900.ttf\") format(\"truetype\"), url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-solid-900.svg#fontawesome\") format(\"svg\")}.fa,.fas{font-family:\"Font Awesome 5 Pro\";font-weight:900}/*!\n* Font Awesome Pro 5.15.4 by @fontawesome - https://fontawesome.com\n* License - https://fontawesome.com/license (Commercial License)\n*/@font-face{font-family:\"Font Awesome 5 Pro\";font-style:normal;font-weight:400;font-display:block;src:url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-regular-400.eot\");src:url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-regular-400.eot?#iefix\") format(\"embedded-opentype\"), url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-regular-400.woff2\") format(\"woff2\"), url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-regular-400.woff\") format(\"woff\"), url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-regular-400.ttf\") format(\"truetype\"), url(\"https://crossvertise.blob.core.windows.net/assets/fonts/fa-regular-400.svg#fontawesome\") format(\"svg\")}.far{font-family:\"Font Awesome 5 Pro\";font-weight:400}.fa-bars:before{content:\"\\f0c9\"}.fa-bell:before{content:\"\\f0f3\"}.fa-check:before{content:\"\\f00c\"}.fa-circle:before{content:\"\\f111\"}.fa-clock:before{content:\"\\f017\"}.fa-envelope:before{content:\"\\f0e0\"}.fa-question-circle:before{content:\"\\f059\"}.fa-search:before{content:\"\\f002\"}.fa-shopping-cart:before{content:\"\\f07a\"}.fa-square:before{content:\"\\f0c8\"}.fa-times:before{content:\"\\f00d\"}.fa-times-circle:before{content:\"\\f057\"}.fa-triangle:before{content:\"\\f2ec\"}.fa-user:before{content:\"\\f007\"}";
|
|
8
8
|
|
|
9
9
|
/*
|
|
10
|
-
Stencil Client Platform v4.
|
|
10
|
+
Stencil Client Platform v4.45.0 | MIT Licensed | https://stenciljs.com
|
|
11
11
|
*/
|
|
12
|
-
var __create = Object.create;
|
|
13
|
-
var __defProp = Object.defineProperty;
|
|
14
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
15
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
16
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
17
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
18
|
-
var __typeError = (msg) => {
|
|
19
|
-
throw TypeError(msg);
|
|
20
|
-
};
|
|
21
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
22
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
23
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
24
|
-
};
|
|
25
|
-
var __export = (target, all) => {
|
|
26
|
-
for (var name in all)
|
|
27
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
|
-
};
|
|
29
|
-
var __copyProps = (to, from, except, desc) => {
|
|
30
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
31
|
-
for (let key of __getOwnPropNames(from))
|
|
32
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
33
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
34
|
-
}
|
|
35
|
-
return to;
|
|
36
|
-
};
|
|
37
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
38
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
39
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
40
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
41
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
42
|
-
__defProp(target, "default", { value: mod, enumerable: true }) ,
|
|
43
|
-
mod
|
|
44
|
-
));
|
|
45
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
|
|
46
|
-
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
47
|
-
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
48
|
-
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);
|
|
49
|
-
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
|
|
50
|
-
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
51
12
|
|
|
52
|
-
// node_modules/balanced-match/index.js
|
|
53
|
-
var require_balanced_match = __commonJS({
|
|
54
|
-
"node_modules/balanced-match/index.js"(exports, module) {
|
|
55
|
-
module.exports = balanced;
|
|
56
|
-
function balanced(a, b, str) {
|
|
57
|
-
if (a instanceof RegExp) a = maybeMatch(a, str);
|
|
58
|
-
if (b instanceof RegExp) b = maybeMatch(b, str);
|
|
59
|
-
var r = range(a, b, str);
|
|
60
|
-
return r && {
|
|
61
|
-
start: r[0],
|
|
62
|
-
end: r[1],
|
|
63
|
-
pre: str.slice(0, r[0]),
|
|
64
|
-
body: str.slice(r[0] + a.length, r[1]),
|
|
65
|
-
post: str.slice(r[1] + b.length)
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
function maybeMatch(reg, str) {
|
|
69
|
-
var m = str.match(reg);
|
|
70
|
-
return m ? m[0] : null;
|
|
71
|
-
}
|
|
72
|
-
balanced.range = range;
|
|
73
|
-
function range(a, b, str) {
|
|
74
|
-
var begs, beg, left, right, result;
|
|
75
|
-
var ai = str.indexOf(a);
|
|
76
|
-
var bi = str.indexOf(b, ai + 1);
|
|
77
|
-
var i2 = ai;
|
|
78
|
-
if (ai >= 0 && bi > 0) {
|
|
79
|
-
if (a === b) {
|
|
80
|
-
return [ai, bi];
|
|
81
|
-
}
|
|
82
|
-
begs = [];
|
|
83
|
-
left = str.length;
|
|
84
|
-
while (i2 >= 0 && !result) {
|
|
85
|
-
if (i2 == ai) {
|
|
86
|
-
begs.push(i2);
|
|
87
|
-
ai = str.indexOf(a, i2 + 1);
|
|
88
|
-
} else if (begs.length == 1) {
|
|
89
|
-
result = [begs.pop(), bi];
|
|
90
|
-
} else {
|
|
91
|
-
beg = begs.pop();
|
|
92
|
-
if (beg < left) {
|
|
93
|
-
left = beg;
|
|
94
|
-
right = bi;
|
|
95
|
-
}
|
|
96
|
-
bi = str.indexOf(b, i2 + 1);
|
|
97
|
-
}
|
|
98
|
-
i2 = ai < bi && ai >= 0 ? ai : bi;
|
|
99
|
-
}
|
|
100
|
-
if (begs.length) {
|
|
101
|
-
result = [left, right];
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return result;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
// node_modules/brace-expansion/index.js
|
|
110
|
-
var require_brace_expansion = __commonJS({
|
|
111
|
-
"node_modules/brace-expansion/index.js"(exports, module) {
|
|
112
|
-
var balanced = require_balanced_match();
|
|
113
|
-
module.exports = expandTop;
|
|
114
|
-
var escSlash = "\0SLASH" + Math.random() + "\0";
|
|
115
|
-
var escOpen = "\0OPEN" + Math.random() + "\0";
|
|
116
|
-
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
117
|
-
var escComma = "\0COMMA" + Math.random() + "\0";
|
|
118
|
-
var escPeriod = "\0PERIOD" + Math.random() + "\0";
|
|
119
|
-
function numeric(str) {
|
|
120
|
-
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
|
|
121
|
-
}
|
|
122
|
-
function escapeBraces(str) {
|
|
123
|
-
return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
|
|
124
|
-
}
|
|
125
|
-
function unescapeBraces(str) {
|
|
126
|
-
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
|
|
127
|
-
}
|
|
128
|
-
function parseCommaParts(str) {
|
|
129
|
-
if (!str)
|
|
130
|
-
return [""];
|
|
131
|
-
var parts = [];
|
|
132
|
-
var m = balanced("{", "}", str);
|
|
133
|
-
if (!m)
|
|
134
|
-
return str.split(",");
|
|
135
|
-
var pre = m.pre;
|
|
136
|
-
var body = m.body;
|
|
137
|
-
var post = m.post;
|
|
138
|
-
var p = pre.split(",");
|
|
139
|
-
p[p.length - 1] += "{" + body + "}";
|
|
140
|
-
var postParts = parseCommaParts(post);
|
|
141
|
-
if (post.length) {
|
|
142
|
-
p[p.length - 1] += postParts.shift();
|
|
143
|
-
p.push.apply(p, postParts);
|
|
144
|
-
}
|
|
145
|
-
parts.push.apply(parts, p);
|
|
146
|
-
return parts;
|
|
147
|
-
}
|
|
148
|
-
function expandTop(str) {
|
|
149
|
-
if (!str)
|
|
150
|
-
return [];
|
|
151
|
-
if (str.substr(0, 2) === "{}") {
|
|
152
|
-
str = "\\{\\}" + str.substr(2);
|
|
153
|
-
}
|
|
154
|
-
return expand2(escapeBraces(str), true).map(unescapeBraces);
|
|
155
|
-
}
|
|
156
|
-
function embrace(str) {
|
|
157
|
-
return "{" + str + "}";
|
|
158
|
-
}
|
|
159
|
-
function isPadded(el) {
|
|
160
|
-
return /^-?0\d/.test(el);
|
|
161
|
-
}
|
|
162
|
-
function lte(i2, y) {
|
|
163
|
-
return i2 <= y;
|
|
164
|
-
}
|
|
165
|
-
function gte(i2, y) {
|
|
166
|
-
return i2 >= y;
|
|
167
|
-
}
|
|
168
|
-
function expand2(str, isTop) {
|
|
169
|
-
var expansions = [];
|
|
170
|
-
var m = balanced("{", "}", str);
|
|
171
|
-
if (!m) return [str];
|
|
172
|
-
var pre = m.pre;
|
|
173
|
-
var post = m.post.length ? expand2(m.post, false) : [""];
|
|
174
|
-
if (/\$$/.test(m.pre)) {
|
|
175
|
-
for (var k = 0; k < post.length; k++) {
|
|
176
|
-
var expansion = pre + "{" + m.body + "}" + post[k];
|
|
177
|
-
expansions.push(expansion);
|
|
178
|
-
}
|
|
179
|
-
} else {
|
|
180
|
-
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
181
|
-
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
182
|
-
var isSequence = isNumericSequence || isAlphaSequence;
|
|
183
|
-
var isOptions = m.body.indexOf(",") >= 0;
|
|
184
|
-
if (!isSequence && !isOptions) {
|
|
185
|
-
if (m.post.match(/,(?!,).*\}/)) {
|
|
186
|
-
str = m.pre + "{" + m.body + escClose + m.post;
|
|
187
|
-
return expand2(str);
|
|
188
|
-
}
|
|
189
|
-
return [str];
|
|
190
|
-
}
|
|
191
|
-
var n;
|
|
192
|
-
if (isSequence) {
|
|
193
|
-
n = m.body.split(/\.\./);
|
|
194
|
-
} else {
|
|
195
|
-
n = parseCommaParts(m.body);
|
|
196
|
-
if (n.length === 1) {
|
|
197
|
-
n = expand2(n[0], false).map(embrace);
|
|
198
|
-
if (n.length === 1) {
|
|
199
|
-
return post.map(function(p) {
|
|
200
|
-
return m.pre + n[0] + p;
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
var N;
|
|
206
|
-
if (isSequence) {
|
|
207
|
-
var x = numeric(n[0]);
|
|
208
|
-
var y = numeric(n[1]);
|
|
209
|
-
var width = Math.max(n[0].length, n[1].length);
|
|
210
|
-
var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
|
|
211
|
-
var test = lte;
|
|
212
|
-
var reverse = y < x;
|
|
213
|
-
if (reverse) {
|
|
214
|
-
incr *= -1;
|
|
215
|
-
test = gte;
|
|
216
|
-
}
|
|
217
|
-
var pad = n.some(isPadded);
|
|
218
|
-
N = [];
|
|
219
|
-
for (var i2 = x; test(i2, y); i2 += incr) {
|
|
220
|
-
var c;
|
|
221
|
-
if (isAlphaSequence) {
|
|
222
|
-
c = String.fromCharCode(i2);
|
|
223
|
-
if (c === "\\")
|
|
224
|
-
c = "";
|
|
225
|
-
} else {
|
|
226
|
-
c = String(i2);
|
|
227
|
-
if (pad) {
|
|
228
|
-
var need = width - c.length;
|
|
229
|
-
if (need > 0) {
|
|
230
|
-
var z = new Array(need + 1).join("0");
|
|
231
|
-
if (i2 < 0)
|
|
232
|
-
c = "-" + z + c.slice(1);
|
|
233
|
-
else
|
|
234
|
-
c = z + c;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
N.push(c);
|
|
239
|
-
}
|
|
240
|
-
} else {
|
|
241
|
-
N = [];
|
|
242
|
-
for (var j = 0; j < n.length; j++) {
|
|
243
|
-
N.push.apply(N, expand2(n[j], false));
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
for (var j = 0; j < N.length; j++) {
|
|
247
|
-
for (var k = 0; k < post.length; k++) {
|
|
248
|
-
var expansion = pre + N[j] + post[k];
|
|
249
|
-
if (!isTop || isSequence || expansion)
|
|
250
|
-
expansions.push(expansion);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
return expansions;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
});
|
|
258
13
|
|
|
259
14
|
// src/utils/constants.ts
|
|
260
15
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
261
16
|
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
17
|
+
|
|
18
|
+
// src/utils/get-prop-descriptor.ts
|
|
19
|
+
function getPropertyDescriptor(obj, memberName, getOnly) {
|
|
20
|
+
const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
|
|
21
|
+
while (obj && obj !== stopAt) {
|
|
22
|
+
const desc = Object.getOwnPropertyDescriptor(obj, memberName);
|
|
23
|
+
if (desc && (!getOnly || desc.get)) return desc;
|
|
24
|
+
obj = Object.getPrototypeOf(obj);
|
|
25
|
+
}
|
|
26
|
+
return void 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// src/utils/es2022-rewire-class-members.ts
|
|
262
30
|
var reWireGetterSetter = (instance, hostRef) => {
|
|
263
31
|
var _a;
|
|
264
32
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -266,7 +34,7 @@ var reWireGetterSetter = (instance, hostRef) => {
|
|
|
266
34
|
members.map(([memberName, [memberFlags]]) => {
|
|
267
35
|
if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
|
|
268
36
|
const ogValue = instance[memberName];
|
|
269
|
-
const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
|
|
37
|
+
const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName, true) || Object.getOwnPropertyDescriptor(instance, memberName);
|
|
270
38
|
if (ogDescriptor) {
|
|
271
39
|
Object.defineProperty(instance, memberName, {
|
|
272
40
|
get() {
|
|
@@ -279,18 +47,14 @@ var reWireGetterSetter = (instance, hostRef) => {
|
|
|
279
47
|
enumerable: true
|
|
280
48
|
});
|
|
281
49
|
}
|
|
282
|
-
|
|
50
|
+
if (hostRef.$instanceValues$.has(memberName)) {
|
|
51
|
+
instance[memberName] = hostRef.$instanceValues$.get(memberName);
|
|
52
|
+
} else if (ogValue !== void 0) {
|
|
53
|
+
instance[memberName] = ogValue;
|
|
54
|
+
}
|
|
283
55
|
}
|
|
284
56
|
});
|
|
285
57
|
};
|
|
286
|
-
function getPropertyDescriptor(obj, memberName) {
|
|
287
|
-
while (obj) {
|
|
288
|
-
const desc = Object.getOwnPropertyDescriptor(obj, memberName);
|
|
289
|
-
if (desc == null ? void 0 : desc.get) return desc;
|
|
290
|
-
obj = Object.getPrototypeOf(obj);
|
|
291
|
-
}
|
|
292
|
-
return void 0;
|
|
293
|
-
}
|
|
294
58
|
|
|
295
59
|
// src/client/client-host-ref.ts
|
|
296
60
|
var getHostRef = (ref) => {
|
|
@@ -335,7 +99,9 @@ var consoleError = (e, el) => (0, console.error)(e, el);
|
|
|
335
99
|
|
|
336
100
|
// src/client/client-load-module.ts
|
|
337
101
|
var cmpModules = /* @__PURE__ */ new Map();
|
|
102
|
+
var failedLoadAttempts = /* @__PURE__ */ new Map();
|
|
338
103
|
var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
104
|
+
var _a;
|
|
339
105
|
const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
|
|
340
106
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
341
107
|
if (!bundleId) {
|
|
@@ -345,21 +111,28 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
345
111
|
if (module) {
|
|
346
112
|
return module[exportName];
|
|
347
113
|
}
|
|
114
|
+
const retryCount = (_a = failedLoadAttempts.get(bundleId)) != null ? _a : 0;
|
|
115
|
+
const cacheBustParams = [
|
|
116
|
+
retryCount > 0 ? `s-retry=${retryCount}` : "",
|
|
117
|
+
""
|
|
118
|
+
].filter(Boolean).join("&");
|
|
348
119
|
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
349
120
|
return import(
|
|
350
121
|
/* @vite-ignore */
|
|
351
122
|
/* webpackInclude: /\.entry\.js$/ */
|
|
352
123
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
353
124
|
/* webpackMode: "lazy" */
|
|
354
|
-
`./${bundleId}.entry.js${""}`
|
|
125
|
+
`./${bundleId}.entry.js${cacheBustParams ? "?" + cacheBustParams : ""}`
|
|
355
126
|
).then(
|
|
356
127
|
(importedModule) => {
|
|
357
128
|
{
|
|
129
|
+
failedLoadAttempts.delete(bundleId);
|
|
358
130
|
cmpModules.set(bundleId, importedModule);
|
|
359
131
|
}
|
|
360
132
|
return importedModule[exportName];
|
|
361
133
|
},
|
|
362
134
|
(e) => {
|
|
135
|
+
failedLoadAttempts.set(bundleId, retryCount + 1);
|
|
363
136
|
consoleError(e, hostRef.$hostElement$);
|
|
364
137
|
}
|
|
365
138
|
);
|
|
@@ -369,6 +142,8 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
369
142
|
var styles = /* @__PURE__ */ new Map();
|
|
370
143
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
371
144
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
145
|
+
var MAX_LAZY_LOAD_RETRIES = 3;
|
|
146
|
+
var LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
|
|
372
147
|
var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
373
148
|
"formAssociatedCallback",
|
|
374
149
|
"formResetCallback",
|
|
@@ -418,6 +193,10 @@ var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @_
|
|
|
418
193
|
var queuePending = false;
|
|
419
194
|
var queueDomReads = [];
|
|
420
195
|
var queueDomWrites = [];
|
|
196
|
+
var scheduleFlush = () => {
|
|
197
|
+
var _a;
|
|
198
|
+
return ((_a = win.document) == null ? void 0 : _a.hidden) ? nextTick(flush) : plt.raf(flush);
|
|
199
|
+
};
|
|
421
200
|
var queueTask = (queue, write) => (cb) => {
|
|
422
201
|
queue.push(cb);
|
|
423
202
|
if (!queuePending) {
|
|
@@ -425,7 +204,7 @@ var queueTask = (queue, write) => (cb) => {
|
|
|
425
204
|
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
426
205
|
nextTick(flush);
|
|
427
206
|
} else {
|
|
428
|
-
|
|
207
|
+
scheduleFlush();
|
|
429
208
|
}
|
|
430
209
|
}
|
|
431
210
|
};
|
|
@@ -444,1433 +223,13 @@ var flush = () => {
|
|
|
444
223
|
{
|
|
445
224
|
consume(queueDomWrites);
|
|
446
225
|
if (queuePending = queueDomReads.length > 0) {
|
|
447
|
-
|
|
226
|
+
scheduleFlush();
|
|
448
227
|
}
|
|
449
228
|
}
|
|
450
229
|
};
|
|
451
230
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
452
231
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
453
232
|
|
|
454
|
-
// src/utils/helpers.ts
|
|
455
|
-
var isDef = (v) => v != null && v !== void 0;
|
|
456
|
-
var isComplexType = (o) => {
|
|
457
|
-
o = typeof o;
|
|
458
|
-
return o === "object" || o === "function";
|
|
459
|
-
};
|
|
460
|
-
|
|
461
|
-
// node_modules/minimatch/dist/esm/index.js
|
|
462
|
-
var import_brace_expansion = __toESM(require_brace_expansion());
|
|
463
|
-
|
|
464
|
-
// node_modules/minimatch/dist/esm/assert-valid-pattern.js
|
|
465
|
-
var MAX_PATTERN_LENGTH = 1024 * 64;
|
|
466
|
-
var assertValidPattern = (pattern) => {
|
|
467
|
-
if (typeof pattern !== "string") {
|
|
468
|
-
throw new TypeError("invalid pattern");
|
|
469
|
-
}
|
|
470
|
-
if (pattern.length > MAX_PATTERN_LENGTH) {
|
|
471
|
-
throw new TypeError("pattern is too long");
|
|
472
|
-
}
|
|
473
|
-
};
|
|
474
|
-
|
|
475
|
-
// node_modules/minimatch/dist/esm/brace-expressions.js
|
|
476
|
-
var posixClasses = {
|
|
477
|
-
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
|
|
478
|
-
"[:alpha:]": ["\\p{L}\\p{Nl}", true],
|
|
479
|
-
"[:ascii:]": ["\\x00-\\x7f", false],
|
|
480
|
-
"[:blank:]": ["\\p{Zs}\\t", true],
|
|
481
|
-
"[:cntrl:]": ["\\p{Cc}", true],
|
|
482
|
-
"[:digit:]": ["\\p{Nd}", true],
|
|
483
|
-
"[:graph:]": ["\\p{Z}\\p{C}", true, true],
|
|
484
|
-
"[:lower:]": ["\\p{Ll}", true],
|
|
485
|
-
"[:print:]": ["\\p{C}", true],
|
|
486
|
-
"[:punct:]": ["\\p{P}", true],
|
|
487
|
-
"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
|
|
488
|
-
"[:upper:]": ["\\p{Lu}", true],
|
|
489
|
-
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
|
|
490
|
-
"[:xdigit:]": ["A-Fa-f0-9", false]
|
|
491
|
-
};
|
|
492
|
-
var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
|
|
493
|
-
var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
494
|
-
var rangesToString = (ranges) => ranges.join("");
|
|
495
|
-
var parseClass = (glob, position) => {
|
|
496
|
-
const pos = position;
|
|
497
|
-
if (glob.charAt(pos) !== "[") {
|
|
498
|
-
throw new Error("not in a brace expression");
|
|
499
|
-
}
|
|
500
|
-
const ranges = [];
|
|
501
|
-
const negs = [];
|
|
502
|
-
let i2 = pos + 1;
|
|
503
|
-
let sawStart = false;
|
|
504
|
-
let uflag = false;
|
|
505
|
-
let escaping = false;
|
|
506
|
-
let negate = false;
|
|
507
|
-
let endPos = pos;
|
|
508
|
-
let rangeStart = "";
|
|
509
|
-
WHILE: while (i2 < glob.length) {
|
|
510
|
-
const c = glob.charAt(i2);
|
|
511
|
-
if ((c === "!" || c === "^") && i2 === pos + 1) {
|
|
512
|
-
negate = true;
|
|
513
|
-
i2++;
|
|
514
|
-
continue;
|
|
515
|
-
}
|
|
516
|
-
if (c === "]" && sawStart && !escaping) {
|
|
517
|
-
endPos = i2 + 1;
|
|
518
|
-
break;
|
|
519
|
-
}
|
|
520
|
-
sawStart = true;
|
|
521
|
-
if (c === "\\") {
|
|
522
|
-
if (!escaping) {
|
|
523
|
-
escaping = true;
|
|
524
|
-
i2++;
|
|
525
|
-
continue;
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
if (c === "[" && !escaping) {
|
|
529
|
-
for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
|
|
530
|
-
if (glob.startsWith(cls, i2)) {
|
|
531
|
-
if (rangeStart) {
|
|
532
|
-
return ["$.", false, glob.length - pos, true];
|
|
533
|
-
}
|
|
534
|
-
i2 += cls.length;
|
|
535
|
-
if (neg)
|
|
536
|
-
negs.push(unip);
|
|
537
|
-
else
|
|
538
|
-
ranges.push(unip);
|
|
539
|
-
uflag = uflag || u;
|
|
540
|
-
continue WHILE;
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
escaping = false;
|
|
545
|
-
if (rangeStart) {
|
|
546
|
-
if (c > rangeStart) {
|
|
547
|
-
ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
|
|
548
|
-
} else if (c === rangeStart) {
|
|
549
|
-
ranges.push(braceEscape(c));
|
|
550
|
-
}
|
|
551
|
-
rangeStart = "";
|
|
552
|
-
i2++;
|
|
553
|
-
continue;
|
|
554
|
-
}
|
|
555
|
-
if (glob.startsWith("-]", i2 + 1)) {
|
|
556
|
-
ranges.push(braceEscape(c + "-"));
|
|
557
|
-
i2 += 2;
|
|
558
|
-
continue;
|
|
559
|
-
}
|
|
560
|
-
if (glob.startsWith("-", i2 + 1)) {
|
|
561
|
-
rangeStart = c;
|
|
562
|
-
i2 += 2;
|
|
563
|
-
continue;
|
|
564
|
-
}
|
|
565
|
-
ranges.push(braceEscape(c));
|
|
566
|
-
i2++;
|
|
567
|
-
}
|
|
568
|
-
if (endPos < i2) {
|
|
569
|
-
return ["", false, 0, false];
|
|
570
|
-
}
|
|
571
|
-
if (!ranges.length && !negs.length) {
|
|
572
|
-
return ["$.", false, glob.length - pos, true];
|
|
573
|
-
}
|
|
574
|
-
if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) {
|
|
575
|
-
const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
|
|
576
|
-
return [regexpEscape(r), false, endPos - pos, false];
|
|
577
|
-
}
|
|
578
|
-
const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]";
|
|
579
|
-
const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
|
|
580
|
-
const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs;
|
|
581
|
-
return [comb, uflag, endPos - pos, true];
|
|
582
|
-
};
|
|
583
|
-
|
|
584
|
-
// node_modules/minimatch/dist/esm/unescape.js
|
|
585
|
-
var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
586
|
-
return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
587
|
-
};
|
|
588
|
-
|
|
589
|
-
// node_modules/minimatch/dist/esm/ast.js
|
|
590
|
-
var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
|
|
591
|
-
var isExtglobType = (c) => types.has(c);
|
|
592
|
-
var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
|
|
593
|
-
var startNoDot = "(?!\\.)";
|
|
594
|
-
var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
|
|
595
|
-
var justDots = /* @__PURE__ */ new Set(["..", "."]);
|
|
596
|
-
var reSpecials = new Set("().*{}+?[]^$\\!");
|
|
597
|
-
var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
598
|
-
var qmark = "[^/]";
|
|
599
|
-
var star = qmark + "*?";
|
|
600
|
-
var starNoEmpty = qmark + "+?";
|
|
601
|
-
var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
|
|
602
|
-
var _AST = class _AST {
|
|
603
|
-
constructor(type, parent, options = {}) {
|
|
604
|
-
__privateAdd(this, _AST_instances);
|
|
605
|
-
__publicField(this, "type");
|
|
606
|
-
__privateAdd(this, _root);
|
|
607
|
-
__privateAdd(this, _hasMagic);
|
|
608
|
-
__privateAdd(this, _uflag, false);
|
|
609
|
-
__privateAdd(this, _parts, []);
|
|
610
|
-
__privateAdd(this, _parent);
|
|
611
|
-
__privateAdd(this, _parentIndex);
|
|
612
|
-
__privateAdd(this, _negs);
|
|
613
|
-
__privateAdd(this, _filledNegs, false);
|
|
614
|
-
__privateAdd(this, _options);
|
|
615
|
-
__privateAdd(this, _toString);
|
|
616
|
-
// set to true if it's an extglob with no children
|
|
617
|
-
// (which really means one child of '')
|
|
618
|
-
__privateAdd(this, _emptyExt, false);
|
|
619
|
-
this.type = type;
|
|
620
|
-
if (type)
|
|
621
|
-
__privateSet(this, _hasMagic, true);
|
|
622
|
-
__privateSet(this, _parent, parent);
|
|
623
|
-
__privateSet(this, _root, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _root) : this);
|
|
624
|
-
__privateSet(this, _options, __privateGet(this, _root) === this ? options : __privateGet(__privateGet(this, _root), _options));
|
|
625
|
-
__privateSet(this, _negs, __privateGet(this, _root) === this ? [] : __privateGet(__privateGet(this, _root), _negs));
|
|
626
|
-
if (type === "!" && !__privateGet(__privateGet(this, _root), _filledNegs))
|
|
627
|
-
__privateGet(this, _negs).push(this);
|
|
628
|
-
__privateSet(this, _parentIndex, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0);
|
|
629
|
-
}
|
|
630
|
-
get hasMagic() {
|
|
631
|
-
if (__privateGet(this, _hasMagic) !== void 0)
|
|
632
|
-
return __privateGet(this, _hasMagic);
|
|
633
|
-
for (const p of __privateGet(this, _parts)) {
|
|
634
|
-
if (typeof p === "string")
|
|
635
|
-
continue;
|
|
636
|
-
if (p.type || p.hasMagic)
|
|
637
|
-
return __privateSet(this, _hasMagic, true);
|
|
638
|
-
}
|
|
639
|
-
return __privateGet(this, _hasMagic);
|
|
640
|
-
}
|
|
641
|
-
// reconstructs the pattern
|
|
642
|
-
toString() {
|
|
643
|
-
if (__privateGet(this, _toString) !== void 0)
|
|
644
|
-
return __privateGet(this, _toString);
|
|
645
|
-
if (!this.type) {
|
|
646
|
-
return __privateSet(this, _toString, __privateGet(this, _parts).map((p) => String(p)).join(""));
|
|
647
|
-
} else {
|
|
648
|
-
return __privateSet(this, _toString, this.type + "(" + __privateGet(this, _parts).map((p) => String(p)).join("|") + ")");
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
push(...parts) {
|
|
652
|
-
for (const p of parts) {
|
|
653
|
-
if (p === "")
|
|
654
|
-
continue;
|
|
655
|
-
if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
|
|
656
|
-
throw new Error("invalid part: " + p);
|
|
657
|
-
}
|
|
658
|
-
__privateGet(this, _parts).push(p);
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
toJSON() {
|
|
662
|
-
var _a;
|
|
663
|
-
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())];
|
|
664
|
-
if (this.isStart() && !this.type)
|
|
665
|
-
ret.unshift([]);
|
|
666
|
-
if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")) {
|
|
667
|
-
ret.push({});
|
|
668
|
-
}
|
|
669
|
-
return ret;
|
|
670
|
-
}
|
|
671
|
-
isStart() {
|
|
672
|
-
var _a;
|
|
673
|
-
if (__privateGet(this, _root) === this)
|
|
674
|
-
return true;
|
|
675
|
-
if (!((_a = __privateGet(this, _parent)) == null ? void 0 : _a.isStart()))
|
|
676
|
-
return false;
|
|
677
|
-
if (__privateGet(this, _parentIndex) === 0)
|
|
678
|
-
return true;
|
|
679
|
-
const p = __privateGet(this, _parent);
|
|
680
|
-
for (let i2 = 0; i2 < __privateGet(this, _parentIndex); i2++) {
|
|
681
|
-
const pp = __privateGet(p, _parts)[i2];
|
|
682
|
-
if (!(pp instanceof _AST && pp.type === "!")) {
|
|
683
|
-
return false;
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
return true;
|
|
687
|
-
}
|
|
688
|
-
isEnd() {
|
|
689
|
-
var _a, _b, _c;
|
|
690
|
-
if (__privateGet(this, _root) === this)
|
|
691
|
-
return true;
|
|
692
|
-
if (((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")
|
|
693
|
-
return true;
|
|
694
|
-
if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
|
|
695
|
-
return false;
|
|
696
|
-
if (!this.type)
|
|
697
|
-
return (_c = __privateGet(this, _parent)) == null ? void 0 : _c.isEnd();
|
|
698
|
-
const pl = __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0;
|
|
699
|
-
return __privateGet(this, _parentIndex) === pl - 1;
|
|
700
|
-
}
|
|
701
|
-
copyIn(part) {
|
|
702
|
-
if (typeof part === "string")
|
|
703
|
-
this.push(part);
|
|
704
|
-
else
|
|
705
|
-
this.push(part.clone(this));
|
|
706
|
-
}
|
|
707
|
-
clone(parent) {
|
|
708
|
-
const c = new _AST(this.type, parent);
|
|
709
|
-
for (const p of __privateGet(this, _parts)) {
|
|
710
|
-
c.copyIn(p);
|
|
711
|
-
}
|
|
712
|
-
return c;
|
|
713
|
-
}
|
|
714
|
-
static fromGlob(pattern, options = {}) {
|
|
715
|
-
var _a;
|
|
716
|
-
const ast = new _AST(null, void 0, options);
|
|
717
|
-
__privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, pattern, ast, 0, options);
|
|
718
|
-
return ast;
|
|
719
|
-
}
|
|
720
|
-
// returns the regular expression if there's magic, or the unescaped
|
|
721
|
-
// string if not.
|
|
722
|
-
toMMPattern() {
|
|
723
|
-
if (this !== __privateGet(this, _root))
|
|
724
|
-
return __privateGet(this, _root).toMMPattern();
|
|
725
|
-
const glob = this.toString();
|
|
726
|
-
const [re, body, hasMagic, uflag] = this.toRegExpSource();
|
|
727
|
-
const anyMagic = hasMagic || __privateGet(this, _hasMagic) || __privateGet(this, _options).nocase && !__privateGet(this, _options).nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase();
|
|
728
|
-
if (!anyMagic) {
|
|
729
|
-
return body;
|
|
730
|
-
}
|
|
731
|
-
const flags = (__privateGet(this, _options).nocase ? "i" : "") + (uflag ? "u" : "");
|
|
732
|
-
return Object.assign(new RegExp(`^${re}$`, flags), {
|
|
733
|
-
_src: re,
|
|
734
|
-
_glob: glob
|
|
735
|
-
});
|
|
736
|
-
}
|
|
737
|
-
get options() {
|
|
738
|
-
return __privateGet(this, _options);
|
|
739
|
-
}
|
|
740
|
-
// returns the string match, the regexp source, whether there's magic
|
|
741
|
-
// in the regexp (so a regular expression is required) and whether or
|
|
742
|
-
// not the uflag is needed for the regular expression (for posix classes)
|
|
743
|
-
// TODO: instead of injecting the start/end at this point, just return
|
|
744
|
-
// the BODY of the regexp, along with the start/end portions suitable
|
|
745
|
-
// for binding the start/end in either a joined full-path makeRe context
|
|
746
|
-
// (where we bind to (^|/), or a standalone matchPart context (where
|
|
747
|
-
// we bind to ^, and not /). Otherwise slashes get duped!
|
|
748
|
-
//
|
|
749
|
-
// In part-matching mode, the start is:
|
|
750
|
-
// - if not isStart: nothing
|
|
751
|
-
// - if traversal possible, but not allowed: ^(?!\.\.?$)
|
|
752
|
-
// - if dots allowed or not possible: ^
|
|
753
|
-
// - if dots possible and not allowed: ^(?!\.)
|
|
754
|
-
// end is:
|
|
755
|
-
// - if not isEnd(): nothing
|
|
756
|
-
// - else: $
|
|
757
|
-
//
|
|
758
|
-
// In full-path matching mode, we put the slash at the START of the
|
|
759
|
-
// pattern, so start is:
|
|
760
|
-
// - if first pattern: same as part-matching mode
|
|
761
|
-
// - if not isStart(): nothing
|
|
762
|
-
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
|
|
763
|
-
// - if dots allowed or not possible: /
|
|
764
|
-
// - if dots possible and not allowed: /(?!\.)
|
|
765
|
-
// end is:
|
|
766
|
-
// - if last pattern, same as part-matching mode
|
|
767
|
-
// - else nothing
|
|
768
|
-
//
|
|
769
|
-
// Always put the (?:$|/) on negated tails, though, because that has to be
|
|
770
|
-
// there to bind the end of the negated pattern portion, and it's easier to
|
|
771
|
-
// just stick it in now rather than try to inject it later in the middle of
|
|
772
|
-
// the pattern.
|
|
773
|
-
//
|
|
774
|
-
// We can just always return the same end, and leave it up to the caller
|
|
775
|
-
// to know whether it's going to be used joined or in parts.
|
|
776
|
-
// And, if the start is adjusted slightly, can do the same there:
|
|
777
|
-
// - if not isStart: nothing
|
|
778
|
-
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
|
|
779
|
-
// - if dots allowed or not possible: (?:/|^)
|
|
780
|
-
// - if dots possible and not allowed: (?:/|^)(?!\.)
|
|
781
|
-
//
|
|
782
|
-
// But it's better to have a simpler binding without a conditional, for
|
|
783
|
-
// performance, so probably better to return both start options.
|
|
784
|
-
//
|
|
785
|
-
// Then the caller just ignores the end if it's not the first pattern,
|
|
786
|
-
// and the start always gets applied.
|
|
787
|
-
//
|
|
788
|
-
// But that's always going to be $ if it's the ending pattern, or nothing,
|
|
789
|
-
// so the caller can just attach $ at the end of the pattern when building.
|
|
790
|
-
//
|
|
791
|
-
// So the todo is:
|
|
792
|
-
// - better detect what kind of start is needed
|
|
793
|
-
// - return both flavors of starting pattern
|
|
794
|
-
// - attach $ at the end of the pattern when creating the actual RegExp
|
|
795
|
-
//
|
|
796
|
-
// Ah, but wait, no, that all only applies to the root when the first pattern
|
|
797
|
-
// is not an extglob. If the first pattern IS an extglob, then we need all
|
|
798
|
-
// that dot prevention biz to live in the extglob portions, because eg
|
|
799
|
-
// +(*|.x*) can match .xy but not .yx.
|
|
800
|
-
//
|
|
801
|
-
// So, return the two flavors if it's #root and the first child is not an
|
|
802
|
-
// AST, otherwise leave it to the child AST to handle it, and there,
|
|
803
|
-
// use the (?:^|/) style of start binding.
|
|
804
|
-
//
|
|
805
|
-
// Even simplified further:
|
|
806
|
-
// - Since the start for a join is eg /(?!\.) and the start for a part
|
|
807
|
-
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
|
|
808
|
-
// or start or whatever) and prepend ^ or / at the Regexp construction.
|
|
809
|
-
toRegExpSource(allowDot) {
|
|
810
|
-
var _a;
|
|
811
|
-
const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
|
|
812
|
-
if (__privateGet(this, _root) === this)
|
|
813
|
-
__privateMethod(this, _AST_instances, fillNegs_fn).call(this);
|
|
814
|
-
if (!this.type) {
|
|
815
|
-
const noEmpty = this.isStart() && this.isEnd();
|
|
816
|
-
const src = __privateGet(this, _parts).map((p) => {
|
|
817
|
-
var _a2;
|
|
818
|
-
const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a2 = _AST, _AST_static, parseGlob_fn).call(_a2, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
|
|
819
|
-
__privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
|
|
820
|
-
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
821
|
-
return re;
|
|
822
|
-
}).join("");
|
|
823
|
-
let start2 = "";
|
|
824
|
-
if (this.isStart()) {
|
|
825
|
-
if (typeof __privateGet(this, _parts)[0] === "string") {
|
|
826
|
-
const dotTravAllowed = __privateGet(this, _parts).length === 1 && justDots.has(__privateGet(this, _parts)[0]);
|
|
827
|
-
if (!dotTravAllowed) {
|
|
828
|
-
const aps = addPatternStart;
|
|
829
|
-
const needNoTrav = (
|
|
830
|
-
// dots are allowed, and the pattern starts with [ or .
|
|
831
|
-
dot && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or .
|
|
832
|
-
src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or .
|
|
833
|
-
src.startsWith("\\.\\.") && aps.has(src.charAt(4))
|
|
834
|
-
);
|
|
835
|
-
const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
|
|
836
|
-
start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
let end = "";
|
|
841
|
-
if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!") {
|
|
842
|
-
end = "(?:$|\\/)";
|
|
843
|
-
}
|
|
844
|
-
const final2 = start2 + src + end;
|
|
845
|
-
return [
|
|
846
|
-
final2,
|
|
847
|
-
unescape(src),
|
|
848
|
-
__privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
|
|
849
|
-
__privateGet(this, _uflag)
|
|
850
|
-
];
|
|
851
|
-
}
|
|
852
|
-
const repeated = this.type === "*" || this.type === "+";
|
|
853
|
-
const start = this.type === "!" ? "(?:(?!(?:" : "(?:";
|
|
854
|
-
let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
|
|
855
|
-
if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
|
|
856
|
-
const s = this.toString();
|
|
857
|
-
__privateSet(this, _parts, [s]);
|
|
858
|
-
this.type = null;
|
|
859
|
-
__privateSet(this, _hasMagic, void 0);
|
|
860
|
-
return [s, unescape(this.toString()), false, false];
|
|
861
|
-
}
|
|
862
|
-
let bodyDotAllowed = !repeated || allowDot || dot || false ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
|
|
863
|
-
if (bodyDotAllowed === body) {
|
|
864
|
-
bodyDotAllowed = "";
|
|
865
|
-
}
|
|
866
|
-
if (bodyDotAllowed) {
|
|
867
|
-
body = `(?:${body})(?:${bodyDotAllowed})*?`;
|
|
868
|
-
}
|
|
869
|
-
let final = "";
|
|
870
|
-
if (this.type === "!" && __privateGet(this, _emptyExt)) {
|
|
871
|
-
final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty;
|
|
872
|
-
} else {
|
|
873
|
-
const close = this.type === "!" ? (
|
|
874
|
-
// !() must match something,but !(x) can match ''
|
|
875
|
-
"))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")"
|
|
876
|
-
) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
|
|
877
|
-
final = start + body + close;
|
|
878
|
-
}
|
|
879
|
-
return [
|
|
880
|
-
final,
|
|
881
|
-
unescape(body),
|
|
882
|
-
__privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
|
|
883
|
-
__privateGet(this, _uflag)
|
|
884
|
-
];
|
|
885
|
-
}
|
|
886
|
-
};
|
|
887
|
-
_root = new WeakMap();
|
|
888
|
-
_hasMagic = new WeakMap();
|
|
889
|
-
_uflag = new WeakMap();
|
|
890
|
-
_parts = new WeakMap();
|
|
891
|
-
_parent = new WeakMap();
|
|
892
|
-
_parentIndex = new WeakMap();
|
|
893
|
-
_negs = new WeakMap();
|
|
894
|
-
_filledNegs = new WeakMap();
|
|
895
|
-
_options = new WeakMap();
|
|
896
|
-
_toString = new WeakMap();
|
|
897
|
-
_emptyExt = new WeakMap();
|
|
898
|
-
_AST_instances = new WeakSet();
|
|
899
|
-
fillNegs_fn = function() {
|
|
900
|
-
if (this !== __privateGet(this, _root))
|
|
901
|
-
throw new Error("should only call on root");
|
|
902
|
-
if (__privateGet(this, _filledNegs))
|
|
903
|
-
return this;
|
|
904
|
-
this.toString();
|
|
905
|
-
__privateSet(this, _filledNegs, true);
|
|
906
|
-
let n;
|
|
907
|
-
while (n = __privateGet(this, _negs).pop()) {
|
|
908
|
-
if (n.type !== "!")
|
|
909
|
-
continue;
|
|
910
|
-
let p = n;
|
|
911
|
-
let pp = __privateGet(p, _parent);
|
|
912
|
-
while (pp) {
|
|
913
|
-
for (let i2 = __privateGet(p, _parentIndex) + 1; !pp.type && i2 < __privateGet(pp, _parts).length; i2++) {
|
|
914
|
-
for (const part of __privateGet(n, _parts)) {
|
|
915
|
-
if (typeof part === "string") {
|
|
916
|
-
throw new Error("string part in extglob AST??");
|
|
917
|
-
}
|
|
918
|
-
part.copyIn(__privateGet(pp, _parts)[i2]);
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
|
-
p = pp;
|
|
922
|
-
pp = __privateGet(p, _parent);
|
|
923
|
-
}
|
|
924
|
-
}
|
|
925
|
-
return this;
|
|
926
|
-
};
|
|
927
|
-
_AST_static = new WeakSet();
|
|
928
|
-
parseAST_fn = function(str, ast, pos, opt) {
|
|
929
|
-
var _a, _b;
|
|
930
|
-
let escaping = false;
|
|
931
|
-
let inBrace = false;
|
|
932
|
-
let braceStart = -1;
|
|
933
|
-
let braceNeg = false;
|
|
934
|
-
if (ast.type === null) {
|
|
935
|
-
let i3 = pos;
|
|
936
|
-
let acc2 = "";
|
|
937
|
-
while (i3 < str.length) {
|
|
938
|
-
const c = str.charAt(i3++);
|
|
939
|
-
if (escaping || c === "\\") {
|
|
940
|
-
escaping = !escaping;
|
|
941
|
-
acc2 += c;
|
|
942
|
-
continue;
|
|
943
|
-
}
|
|
944
|
-
if (inBrace) {
|
|
945
|
-
if (i3 === braceStart + 1) {
|
|
946
|
-
if (c === "^" || c === "!") {
|
|
947
|
-
braceNeg = true;
|
|
948
|
-
}
|
|
949
|
-
} else if (c === "]" && !(i3 === braceStart + 2 && braceNeg)) {
|
|
950
|
-
inBrace = false;
|
|
951
|
-
}
|
|
952
|
-
acc2 += c;
|
|
953
|
-
continue;
|
|
954
|
-
} else if (c === "[") {
|
|
955
|
-
inBrace = true;
|
|
956
|
-
braceStart = i3;
|
|
957
|
-
braceNeg = false;
|
|
958
|
-
acc2 += c;
|
|
959
|
-
continue;
|
|
960
|
-
}
|
|
961
|
-
if (!opt.noext && isExtglobType(c) && str.charAt(i3) === "(") {
|
|
962
|
-
ast.push(acc2);
|
|
963
|
-
acc2 = "";
|
|
964
|
-
const ext2 = new _AST(c, ast);
|
|
965
|
-
i3 = __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, str, ext2, i3, opt);
|
|
966
|
-
ast.push(ext2);
|
|
967
|
-
continue;
|
|
968
|
-
}
|
|
969
|
-
acc2 += c;
|
|
970
|
-
}
|
|
971
|
-
ast.push(acc2);
|
|
972
|
-
return i3;
|
|
973
|
-
}
|
|
974
|
-
let i2 = pos + 1;
|
|
975
|
-
let part = new _AST(null, ast);
|
|
976
|
-
const parts = [];
|
|
977
|
-
let acc = "";
|
|
978
|
-
while (i2 < str.length) {
|
|
979
|
-
const c = str.charAt(i2++);
|
|
980
|
-
if (escaping || c === "\\") {
|
|
981
|
-
escaping = !escaping;
|
|
982
|
-
acc += c;
|
|
983
|
-
continue;
|
|
984
|
-
}
|
|
985
|
-
if (inBrace) {
|
|
986
|
-
if (i2 === braceStart + 1) {
|
|
987
|
-
if (c === "^" || c === "!") {
|
|
988
|
-
braceNeg = true;
|
|
989
|
-
}
|
|
990
|
-
} else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) {
|
|
991
|
-
inBrace = false;
|
|
992
|
-
}
|
|
993
|
-
acc += c;
|
|
994
|
-
continue;
|
|
995
|
-
} else if (c === "[") {
|
|
996
|
-
inBrace = true;
|
|
997
|
-
braceStart = i2;
|
|
998
|
-
braceNeg = false;
|
|
999
|
-
acc += c;
|
|
1000
|
-
continue;
|
|
1001
|
-
}
|
|
1002
|
-
if (isExtglobType(c) && str.charAt(i2) === "(") {
|
|
1003
|
-
part.push(acc);
|
|
1004
|
-
acc = "";
|
|
1005
|
-
const ext2 = new _AST(c, part);
|
|
1006
|
-
part.push(ext2);
|
|
1007
|
-
i2 = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt);
|
|
1008
|
-
continue;
|
|
1009
|
-
}
|
|
1010
|
-
if (c === "|") {
|
|
1011
|
-
part.push(acc);
|
|
1012
|
-
acc = "";
|
|
1013
|
-
parts.push(part);
|
|
1014
|
-
part = new _AST(null, ast);
|
|
1015
|
-
continue;
|
|
1016
|
-
}
|
|
1017
|
-
if (c === ")") {
|
|
1018
|
-
if (acc === "" && __privateGet(ast, _parts).length === 0) {
|
|
1019
|
-
__privateSet(ast, _emptyExt, true);
|
|
1020
|
-
}
|
|
1021
|
-
part.push(acc);
|
|
1022
|
-
acc = "";
|
|
1023
|
-
ast.push(...parts, part);
|
|
1024
|
-
return i2;
|
|
1025
|
-
}
|
|
1026
|
-
acc += c;
|
|
1027
|
-
}
|
|
1028
|
-
ast.type = null;
|
|
1029
|
-
__privateSet(ast, _hasMagic, void 0);
|
|
1030
|
-
__privateSet(ast, _parts, [str.substring(pos - 1)]);
|
|
1031
|
-
return i2;
|
|
1032
|
-
};
|
|
1033
|
-
partsToRegExp_fn = function(dot) {
|
|
1034
|
-
return __privateGet(this, _parts).map((p) => {
|
|
1035
|
-
if (typeof p === "string") {
|
|
1036
|
-
throw new Error("string type in extglob ast??");
|
|
1037
|
-
}
|
|
1038
|
-
const [re, _, _hasMagic2, uflag] = p.toRegExpSource(dot);
|
|
1039
|
-
__privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
|
|
1040
|
-
return re;
|
|
1041
|
-
}).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|");
|
|
1042
|
-
};
|
|
1043
|
-
parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
|
|
1044
|
-
let escaping = false;
|
|
1045
|
-
let re = "";
|
|
1046
|
-
let uflag = false;
|
|
1047
|
-
for (let i2 = 0; i2 < glob.length; i2++) {
|
|
1048
|
-
const c = glob.charAt(i2);
|
|
1049
|
-
if (escaping) {
|
|
1050
|
-
escaping = false;
|
|
1051
|
-
re += (reSpecials.has(c) ? "\\" : "") + c;
|
|
1052
|
-
continue;
|
|
1053
|
-
}
|
|
1054
|
-
if (c === "\\") {
|
|
1055
|
-
if (i2 === glob.length - 1) {
|
|
1056
|
-
re += "\\\\";
|
|
1057
|
-
} else {
|
|
1058
|
-
escaping = true;
|
|
1059
|
-
}
|
|
1060
|
-
continue;
|
|
1061
|
-
}
|
|
1062
|
-
if (c === "[") {
|
|
1063
|
-
const [src, needUflag, consumed, magic] = parseClass(glob, i2);
|
|
1064
|
-
if (consumed) {
|
|
1065
|
-
re += src;
|
|
1066
|
-
uflag = uflag || needUflag;
|
|
1067
|
-
i2 += consumed - 1;
|
|
1068
|
-
hasMagic = hasMagic || magic;
|
|
1069
|
-
continue;
|
|
1070
|
-
}
|
|
1071
|
-
}
|
|
1072
|
-
if (c === "*") {
|
|
1073
|
-
if (noEmpty && glob === "*")
|
|
1074
|
-
re += starNoEmpty;
|
|
1075
|
-
else
|
|
1076
|
-
re += star;
|
|
1077
|
-
hasMagic = true;
|
|
1078
|
-
continue;
|
|
1079
|
-
}
|
|
1080
|
-
if (c === "?") {
|
|
1081
|
-
re += qmark;
|
|
1082
|
-
hasMagic = true;
|
|
1083
|
-
continue;
|
|
1084
|
-
}
|
|
1085
|
-
re += regExpEscape(c);
|
|
1086
|
-
}
|
|
1087
|
-
return [re, unescape(glob), !!hasMagic, uflag];
|
|
1088
|
-
};
|
|
1089
|
-
__privateAdd(_AST, _AST_static);
|
|
1090
|
-
var AST = _AST;
|
|
1091
|
-
|
|
1092
|
-
// node_modules/minimatch/dist/esm/escape.js
|
|
1093
|
-
var escape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
1094
|
-
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
1095
|
-
};
|
|
1096
|
-
|
|
1097
|
-
// node_modules/minimatch/dist/esm/index.js
|
|
1098
|
-
var minimatch = (p, pattern, options = {}) => {
|
|
1099
|
-
assertValidPattern(pattern);
|
|
1100
|
-
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
1101
|
-
return false;
|
|
1102
|
-
}
|
|
1103
|
-
return new Minimatch(pattern, options).match(p);
|
|
1104
|
-
};
|
|
1105
|
-
var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
|
|
1106
|
-
var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2);
|
|
1107
|
-
var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2);
|
|
1108
|
-
var starDotExtTestNocase = (ext2) => {
|
|
1109
|
-
ext2 = ext2.toLowerCase();
|
|
1110
|
-
return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2);
|
|
1111
|
-
};
|
|
1112
|
-
var starDotExtTestNocaseDot = (ext2) => {
|
|
1113
|
-
ext2 = ext2.toLowerCase();
|
|
1114
|
-
return (f) => f.toLowerCase().endsWith(ext2);
|
|
1115
|
-
};
|
|
1116
|
-
var starDotStarRE = /^\*+\.\*+$/;
|
|
1117
|
-
var starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
|
|
1118
|
-
var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes(".");
|
|
1119
|
-
var dotStarRE = /^\.\*+$/;
|
|
1120
|
-
var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
|
|
1121
|
-
var starRE = /^\*+$/;
|
|
1122
|
-
var starTest = (f) => f.length !== 0 && !f.startsWith(".");
|
|
1123
|
-
var starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
|
|
1124
|
-
var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
|
|
1125
|
-
var qmarksTestNocase = ([$0, ext2 = ""]) => {
|
|
1126
|
-
const noext = qmarksTestNoExt([$0]);
|
|
1127
|
-
if (!ext2)
|
|
1128
|
-
return noext;
|
|
1129
|
-
ext2 = ext2.toLowerCase();
|
|
1130
|
-
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
|
|
1131
|
-
};
|
|
1132
|
-
var qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
|
|
1133
|
-
const noext = qmarksTestNoExtDot([$0]);
|
|
1134
|
-
if (!ext2)
|
|
1135
|
-
return noext;
|
|
1136
|
-
ext2 = ext2.toLowerCase();
|
|
1137
|
-
return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
|
|
1138
|
-
};
|
|
1139
|
-
var qmarksTestDot = ([$0, ext2 = ""]) => {
|
|
1140
|
-
const noext = qmarksTestNoExtDot([$0]);
|
|
1141
|
-
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
1142
|
-
};
|
|
1143
|
-
var qmarksTest = ([$0, ext2 = ""]) => {
|
|
1144
|
-
const noext = qmarksTestNoExt([$0]);
|
|
1145
|
-
return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
|
|
1146
|
-
};
|
|
1147
|
-
var qmarksTestNoExt = ([$0]) => {
|
|
1148
|
-
const len = $0.length;
|
|
1149
|
-
return (f) => f.length === len && !f.startsWith(".");
|
|
1150
|
-
};
|
|
1151
|
-
var qmarksTestNoExtDot = ([$0]) => {
|
|
1152
|
-
const len = $0.length;
|
|
1153
|
-
return (f) => f.length === len && f !== "." && f !== "..";
|
|
1154
|
-
};
|
|
1155
|
-
var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
1156
|
-
var path = {
|
|
1157
|
-
win32: { sep: "\\" },
|
|
1158
|
-
posix: { sep: "/" }
|
|
1159
|
-
};
|
|
1160
|
-
var sep = defaultPlatform === "win32" ? path.win32.sep : path.posix.sep;
|
|
1161
|
-
minimatch.sep = sep;
|
|
1162
|
-
var GLOBSTAR = Symbol("globstar **");
|
|
1163
|
-
minimatch.GLOBSTAR = GLOBSTAR;
|
|
1164
|
-
var qmark2 = "[^/]";
|
|
1165
|
-
var star2 = qmark2 + "*?";
|
|
1166
|
-
var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
|
|
1167
|
-
var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
|
|
1168
|
-
var filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
|
|
1169
|
-
minimatch.filter = filter;
|
|
1170
|
-
var ext = (a, b = {}) => Object.assign({}, a, b);
|
|
1171
|
-
var defaults = (def) => {
|
|
1172
|
-
if (!def || typeof def !== "object" || !Object.keys(def).length) {
|
|
1173
|
-
return minimatch;
|
|
1174
|
-
}
|
|
1175
|
-
const orig = minimatch;
|
|
1176
|
-
const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
|
|
1177
|
-
return Object.assign(m, {
|
|
1178
|
-
Minimatch: class Minimatch extends orig.Minimatch {
|
|
1179
|
-
constructor(pattern, options = {}) {
|
|
1180
|
-
super(pattern, ext(def, options));
|
|
1181
|
-
}
|
|
1182
|
-
static defaults(options) {
|
|
1183
|
-
return orig.defaults(ext(def, options)).Minimatch;
|
|
1184
|
-
}
|
|
1185
|
-
},
|
|
1186
|
-
AST: class AST extends orig.AST {
|
|
1187
|
-
/* c8 ignore start */
|
|
1188
|
-
constructor(type, parent, options = {}) {
|
|
1189
|
-
super(type, parent, ext(def, options));
|
|
1190
|
-
}
|
|
1191
|
-
/* c8 ignore stop */
|
|
1192
|
-
static fromGlob(pattern, options = {}) {
|
|
1193
|
-
return orig.AST.fromGlob(pattern, ext(def, options));
|
|
1194
|
-
}
|
|
1195
|
-
},
|
|
1196
|
-
unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
|
|
1197
|
-
escape: (s, options = {}) => orig.escape(s, ext(def, options)),
|
|
1198
|
-
filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
|
|
1199
|
-
defaults: (options) => orig.defaults(ext(def, options)),
|
|
1200
|
-
makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
|
|
1201
|
-
braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
|
|
1202
|
-
match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
|
|
1203
|
-
sep: orig.sep,
|
|
1204
|
-
GLOBSTAR
|
|
1205
|
-
});
|
|
1206
|
-
};
|
|
1207
|
-
minimatch.defaults = defaults;
|
|
1208
|
-
var braceExpand = (pattern, options = {}) => {
|
|
1209
|
-
assertValidPattern(pattern);
|
|
1210
|
-
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
1211
|
-
return [pattern];
|
|
1212
|
-
}
|
|
1213
|
-
return (0, import_brace_expansion.default)(pattern);
|
|
1214
|
-
};
|
|
1215
|
-
minimatch.braceExpand = braceExpand;
|
|
1216
|
-
var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
|
|
1217
|
-
minimatch.makeRe = makeRe;
|
|
1218
|
-
var match = (list, pattern, options = {}) => {
|
|
1219
|
-
const mm = new Minimatch(pattern, options);
|
|
1220
|
-
list = list.filter((f) => mm.match(f));
|
|
1221
|
-
if (mm.options.nonull && !list.length) {
|
|
1222
|
-
list.push(pattern);
|
|
1223
|
-
}
|
|
1224
|
-
return list;
|
|
1225
|
-
};
|
|
1226
|
-
minimatch.match = match;
|
|
1227
|
-
var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
1228
|
-
var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
1229
|
-
var Minimatch = class {
|
|
1230
|
-
options;
|
|
1231
|
-
set;
|
|
1232
|
-
pattern;
|
|
1233
|
-
windowsPathsNoEscape;
|
|
1234
|
-
nonegate;
|
|
1235
|
-
negate;
|
|
1236
|
-
comment;
|
|
1237
|
-
empty;
|
|
1238
|
-
preserveMultipleSlashes;
|
|
1239
|
-
partial;
|
|
1240
|
-
globSet;
|
|
1241
|
-
globParts;
|
|
1242
|
-
nocase;
|
|
1243
|
-
isWindows;
|
|
1244
|
-
platform;
|
|
1245
|
-
windowsNoMagicRoot;
|
|
1246
|
-
regexp;
|
|
1247
|
-
constructor(pattern, options = {}) {
|
|
1248
|
-
assertValidPattern(pattern);
|
|
1249
|
-
options = options || {};
|
|
1250
|
-
this.options = options;
|
|
1251
|
-
this.pattern = pattern;
|
|
1252
|
-
this.platform = options.platform || defaultPlatform;
|
|
1253
|
-
this.isWindows = this.platform === "win32";
|
|
1254
|
-
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
|
|
1255
|
-
if (this.windowsPathsNoEscape) {
|
|
1256
|
-
this.pattern = this.pattern.replace(/\\/g, "/");
|
|
1257
|
-
}
|
|
1258
|
-
this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
|
|
1259
|
-
this.regexp = null;
|
|
1260
|
-
this.negate = false;
|
|
1261
|
-
this.nonegate = !!options.nonegate;
|
|
1262
|
-
this.comment = false;
|
|
1263
|
-
this.empty = false;
|
|
1264
|
-
this.partial = !!options.partial;
|
|
1265
|
-
this.nocase = !!this.options.nocase;
|
|
1266
|
-
this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase);
|
|
1267
|
-
this.globSet = [];
|
|
1268
|
-
this.globParts = [];
|
|
1269
|
-
this.set = [];
|
|
1270
|
-
this.make();
|
|
1271
|
-
}
|
|
1272
|
-
hasMagic() {
|
|
1273
|
-
if (this.options.magicalBraces && this.set.length > 1) {
|
|
1274
|
-
return true;
|
|
1275
|
-
}
|
|
1276
|
-
for (const pattern of this.set) {
|
|
1277
|
-
for (const part of pattern) {
|
|
1278
|
-
if (typeof part !== "string")
|
|
1279
|
-
return true;
|
|
1280
|
-
}
|
|
1281
|
-
}
|
|
1282
|
-
return false;
|
|
1283
|
-
}
|
|
1284
|
-
debug(..._) {
|
|
1285
|
-
}
|
|
1286
|
-
make() {
|
|
1287
|
-
const pattern = this.pattern;
|
|
1288
|
-
const options = this.options;
|
|
1289
|
-
if (!options.nocomment && pattern.charAt(0) === "#") {
|
|
1290
|
-
this.comment = true;
|
|
1291
|
-
return;
|
|
1292
|
-
}
|
|
1293
|
-
if (!pattern) {
|
|
1294
|
-
this.empty = true;
|
|
1295
|
-
return;
|
|
1296
|
-
}
|
|
1297
|
-
this.parseNegate();
|
|
1298
|
-
this.globSet = [...new Set(this.braceExpand())];
|
|
1299
|
-
if (options.debug) {
|
|
1300
|
-
this.debug = (...args) => console.error(...args);
|
|
1301
|
-
}
|
|
1302
|
-
this.debug(this.pattern, this.globSet);
|
|
1303
|
-
const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
|
|
1304
|
-
this.globParts = this.preprocess(rawGlobParts);
|
|
1305
|
-
this.debug(this.pattern, this.globParts);
|
|
1306
|
-
let set = this.globParts.map((s, _, __) => {
|
|
1307
|
-
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
1308
|
-
const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
|
|
1309
|
-
const isDrive = /^[a-z]:/i.test(s[0]);
|
|
1310
|
-
if (isUNC) {
|
|
1311
|
-
return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
|
|
1312
|
-
} else if (isDrive) {
|
|
1313
|
-
return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
|
|
1314
|
-
}
|
|
1315
|
-
}
|
|
1316
|
-
return s.map((ss) => this.parse(ss));
|
|
1317
|
-
});
|
|
1318
|
-
this.debug(this.pattern, set);
|
|
1319
|
-
this.set = set.filter((s) => s.indexOf(false) === -1);
|
|
1320
|
-
if (this.isWindows) {
|
|
1321
|
-
for (let i2 = 0; i2 < this.set.length; i2++) {
|
|
1322
|
-
const p = this.set[i2];
|
|
1323
|
-
if (p[0] === "" && p[1] === "" && this.globParts[i2][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) {
|
|
1324
|
-
p[2] = "?";
|
|
1325
|
-
}
|
|
1326
|
-
}
|
|
1327
|
-
}
|
|
1328
|
-
this.debug(this.pattern, this.set);
|
|
1329
|
-
}
|
|
1330
|
-
// various transforms to equivalent pattern sets that are
|
|
1331
|
-
// faster to process in a filesystem walk. The goal is to
|
|
1332
|
-
// eliminate what we can, and push all ** patterns as far
|
|
1333
|
-
// to the right as possible, even if it increases the number
|
|
1334
|
-
// of patterns that we have to process.
|
|
1335
|
-
preprocess(globParts) {
|
|
1336
|
-
if (this.options.noglobstar) {
|
|
1337
|
-
for (let i2 = 0; i2 < globParts.length; i2++) {
|
|
1338
|
-
for (let j = 0; j < globParts[i2].length; j++) {
|
|
1339
|
-
if (globParts[i2][j] === "**") {
|
|
1340
|
-
globParts[i2][j] = "*";
|
|
1341
|
-
}
|
|
1342
|
-
}
|
|
1343
|
-
}
|
|
1344
|
-
}
|
|
1345
|
-
const { optimizationLevel = 1 } = this.options;
|
|
1346
|
-
if (optimizationLevel >= 2) {
|
|
1347
|
-
globParts = this.firstPhasePreProcess(globParts);
|
|
1348
|
-
globParts = this.secondPhasePreProcess(globParts);
|
|
1349
|
-
} else if (optimizationLevel >= 1) {
|
|
1350
|
-
globParts = this.levelOneOptimize(globParts);
|
|
1351
|
-
} else {
|
|
1352
|
-
globParts = this.adjascentGlobstarOptimize(globParts);
|
|
1353
|
-
}
|
|
1354
|
-
return globParts;
|
|
1355
|
-
}
|
|
1356
|
-
// just get rid of adjascent ** portions
|
|
1357
|
-
adjascentGlobstarOptimize(globParts) {
|
|
1358
|
-
return globParts.map((parts) => {
|
|
1359
|
-
let gs = -1;
|
|
1360
|
-
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
|
|
1361
|
-
let i2 = gs;
|
|
1362
|
-
while (parts[i2 + 1] === "**") {
|
|
1363
|
-
i2++;
|
|
1364
|
-
}
|
|
1365
|
-
if (i2 !== gs) {
|
|
1366
|
-
parts.splice(gs, i2 - gs);
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
return parts;
|
|
1370
|
-
});
|
|
1371
|
-
}
|
|
1372
|
-
// get rid of adjascent ** and resolve .. portions
|
|
1373
|
-
levelOneOptimize(globParts) {
|
|
1374
|
-
return globParts.map((parts) => {
|
|
1375
|
-
parts = parts.reduce((set, part) => {
|
|
1376
|
-
const prev = set[set.length - 1];
|
|
1377
|
-
if (part === "**" && prev === "**") {
|
|
1378
|
-
return set;
|
|
1379
|
-
}
|
|
1380
|
-
if (part === "..") {
|
|
1381
|
-
if (prev && prev !== ".." && prev !== "." && prev !== "**") {
|
|
1382
|
-
set.pop();
|
|
1383
|
-
return set;
|
|
1384
|
-
}
|
|
1385
|
-
}
|
|
1386
|
-
set.push(part);
|
|
1387
|
-
return set;
|
|
1388
|
-
}, []);
|
|
1389
|
-
return parts.length === 0 ? [""] : parts;
|
|
1390
|
-
});
|
|
1391
|
-
}
|
|
1392
|
-
levelTwoFileOptimize(parts) {
|
|
1393
|
-
if (!Array.isArray(parts)) {
|
|
1394
|
-
parts = this.slashSplit(parts);
|
|
1395
|
-
}
|
|
1396
|
-
let didSomething = false;
|
|
1397
|
-
do {
|
|
1398
|
-
didSomething = false;
|
|
1399
|
-
if (!this.preserveMultipleSlashes) {
|
|
1400
|
-
for (let i2 = 1; i2 < parts.length - 1; i2++) {
|
|
1401
|
-
const p = parts[i2];
|
|
1402
|
-
if (i2 === 1 && p === "" && parts[0] === "")
|
|
1403
|
-
continue;
|
|
1404
|
-
if (p === "." || p === "") {
|
|
1405
|
-
didSomething = true;
|
|
1406
|
-
parts.splice(i2, 1);
|
|
1407
|
-
i2--;
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
|
|
1411
|
-
didSomething = true;
|
|
1412
|
-
parts.pop();
|
|
1413
|
-
}
|
|
1414
|
-
}
|
|
1415
|
-
let dd = 0;
|
|
1416
|
-
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
1417
|
-
const p = parts[dd - 1];
|
|
1418
|
-
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
1419
|
-
didSomething = true;
|
|
1420
|
-
parts.splice(dd - 1, 2);
|
|
1421
|
-
dd -= 2;
|
|
1422
|
-
}
|
|
1423
|
-
}
|
|
1424
|
-
} while (didSomething);
|
|
1425
|
-
return parts.length === 0 ? [""] : parts;
|
|
1426
|
-
}
|
|
1427
|
-
// First phase: single-pattern processing
|
|
1428
|
-
// <pre> is 1 or more portions
|
|
1429
|
-
// <rest> is 1 or more portions
|
|
1430
|
-
// <p> is any portion other than ., .., '', or **
|
|
1431
|
-
// <e> is . or ''
|
|
1432
|
-
//
|
|
1433
|
-
// **/.. is *brutal* for filesystem walking performance, because
|
|
1434
|
-
// it effectively resets the recursive walk each time it occurs,
|
|
1435
|
-
// and ** cannot be reduced out by a .. pattern part like a regexp
|
|
1436
|
-
// or most strings (other than .., ., and '') can be.
|
|
1437
|
-
//
|
|
1438
|
-
// <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
|
|
1439
|
-
// <pre>/<e>/<rest> -> <pre>/<rest>
|
|
1440
|
-
// <pre>/<p>/../<rest> -> <pre>/<rest>
|
|
1441
|
-
// **/**/<rest> -> **/<rest>
|
|
1442
|
-
//
|
|
1443
|
-
// **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
|
|
1444
|
-
// this WOULD be allowed if ** did follow symlinks, or * didn't
|
|
1445
|
-
firstPhasePreProcess(globParts) {
|
|
1446
|
-
let didSomething = false;
|
|
1447
|
-
do {
|
|
1448
|
-
didSomething = false;
|
|
1449
|
-
for (let parts of globParts) {
|
|
1450
|
-
let gs = -1;
|
|
1451
|
-
while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
|
|
1452
|
-
let gss = gs;
|
|
1453
|
-
while (parts[gss + 1] === "**") {
|
|
1454
|
-
gss++;
|
|
1455
|
-
}
|
|
1456
|
-
if (gss > gs) {
|
|
1457
|
-
parts.splice(gs + 1, gss - gs);
|
|
1458
|
-
}
|
|
1459
|
-
let next = parts[gs + 1];
|
|
1460
|
-
const p = parts[gs + 2];
|
|
1461
|
-
const p2 = parts[gs + 3];
|
|
1462
|
-
if (next !== "..")
|
|
1463
|
-
continue;
|
|
1464
|
-
if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
|
|
1465
|
-
continue;
|
|
1466
|
-
}
|
|
1467
|
-
didSomething = true;
|
|
1468
|
-
parts.splice(gs, 1);
|
|
1469
|
-
const other = parts.slice(0);
|
|
1470
|
-
other[gs] = "**";
|
|
1471
|
-
globParts.push(other);
|
|
1472
|
-
gs--;
|
|
1473
|
-
}
|
|
1474
|
-
if (!this.preserveMultipleSlashes) {
|
|
1475
|
-
for (let i2 = 1; i2 < parts.length - 1; i2++) {
|
|
1476
|
-
const p = parts[i2];
|
|
1477
|
-
if (i2 === 1 && p === "" && parts[0] === "")
|
|
1478
|
-
continue;
|
|
1479
|
-
if (p === "." || p === "") {
|
|
1480
|
-
didSomething = true;
|
|
1481
|
-
parts.splice(i2, 1);
|
|
1482
|
-
i2--;
|
|
1483
|
-
}
|
|
1484
|
-
}
|
|
1485
|
-
if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
|
|
1486
|
-
didSomething = true;
|
|
1487
|
-
parts.pop();
|
|
1488
|
-
}
|
|
1489
|
-
}
|
|
1490
|
-
let dd = 0;
|
|
1491
|
-
while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
|
|
1492
|
-
const p = parts[dd - 1];
|
|
1493
|
-
if (p && p !== "." && p !== ".." && p !== "**") {
|
|
1494
|
-
didSomething = true;
|
|
1495
|
-
const needDot = dd === 1 && parts[dd + 1] === "**";
|
|
1496
|
-
const splin = needDot ? ["."] : [];
|
|
1497
|
-
parts.splice(dd - 1, 2, ...splin);
|
|
1498
|
-
if (parts.length === 0)
|
|
1499
|
-
parts.push("");
|
|
1500
|
-
dd -= 2;
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
} while (didSomething);
|
|
1505
|
-
return globParts;
|
|
1506
|
-
}
|
|
1507
|
-
// second phase: multi-pattern dedupes
|
|
1508
|
-
// {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
|
|
1509
|
-
// {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
|
|
1510
|
-
// {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
|
|
1511
|
-
//
|
|
1512
|
-
// {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
|
|
1513
|
-
// ^-- not valid because ** doens't follow symlinks
|
|
1514
|
-
secondPhasePreProcess(globParts) {
|
|
1515
|
-
for (let i2 = 0; i2 < globParts.length - 1; i2++) {
|
|
1516
|
-
for (let j = i2 + 1; j < globParts.length; j++) {
|
|
1517
|
-
const matched = this.partsMatch(globParts[i2], globParts[j], !this.preserveMultipleSlashes);
|
|
1518
|
-
if (!matched)
|
|
1519
|
-
continue;
|
|
1520
|
-
globParts[i2] = matched;
|
|
1521
|
-
globParts[j] = [];
|
|
1522
|
-
}
|
|
1523
|
-
}
|
|
1524
|
-
return globParts.filter((gs) => gs.length);
|
|
1525
|
-
}
|
|
1526
|
-
partsMatch(a, b, emptyGSMatch = false) {
|
|
1527
|
-
let ai = 0;
|
|
1528
|
-
let bi = 0;
|
|
1529
|
-
let result = [];
|
|
1530
|
-
let which = "";
|
|
1531
|
-
while (ai < a.length && bi < b.length) {
|
|
1532
|
-
if (a[ai] === b[bi]) {
|
|
1533
|
-
result.push(which === "b" ? b[bi] : a[ai]);
|
|
1534
|
-
ai++;
|
|
1535
|
-
bi++;
|
|
1536
|
-
} else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
|
|
1537
|
-
result.push(a[ai]);
|
|
1538
|
-
ai++;
|
|
1539
|
-
} else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
|
|
1540
|
-
result.push(b[bi]);
|
|
1541
|
-
bi++;
|
|
1542
|
-
} else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
|
|
1543
|
-
if (which === "b")
|
|
1544
|
-
return false;
|
|
1545
|
-
which = "a";
|
|
1546
|
-
result.push(a[ai]);
|
|
1547
|
-
ai++;
|
|
1548
|
-
bi++;
|
|
1549
|
-
} else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
|
|
1550
|
-
if (which === "a")
|
|
1551
|
-
return false;
|
|
1552
|
-
which = "b";
|
|
1553
|
-
result.push(b[bi]);
|
|
1554
|
-
ai++;
|
|
1555
|
-
bi++;
|
|
1556
|
-
} else {
|
|
1557
|
-
return false;
|
|
1558
|
-
}
|
|
1559
|
-
}
|
|
1560
|
-
return a.length === b.length && result;
|
|
1561
|
-
}
|
|
1562
|
-
parseNegate() {
|
|
1563
|
-
if (this.nonegate)
|
|
1564
|
-
return;
|
|
1565
|
-
const pattern = this.pattern;
|
|
1566
|
-
let negate = false;
|
|
1567
|
-
let negateOffset = 0;
|
|
1568
|
-
for (let i2 = 0; i2 < pattern.length && pattern.charAt(i2) === "!"; i2++) {
|
|
1569
|
-
negate = !negate;
|
|
1570
|
-
negateOffset++;
|
|
1571
|
-
}
|
|
1572
|
-
if (negateOffset)
|
|
1573
|
-
this.pattern = pattern.slice(negateOffset);
|
|
1574
|
-
this.negate = negate;
|
|
1575
|
-
}
|
|
1576
|
-
// set partial to true to test if, for example,
|
|
1577
|
-
// "/a/b" matches the start of "/*/b/*/d"
|
|
1578
|
-
// Partial means, if you run out of file before you run
|
|
1579
|
-
// out of pattern, then that's fine, as long as all
|
|
1580
|
-
// the parts match.
|
|
1581
|
-
matchOne(file, pattern, partial = false) {
|
|
1582
|
-
const options = this.options;
|
|
1583
|
-
if (this.isWindows) {
|
|
1584
|
-
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
|
|
1585
|
-
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
|
|
1586
|
-
const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
|
|
1587
|
-
const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
|
|
1588
|
-
const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
|
|
1589
|
-
const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
|
|
1590
|
-
if (typeof fdi === "number" && typeof pdi === "number") {
|
|
1591
|
-
const [fd, pd] = [file[fdi], pattern[pdi]];
|
|
1592
|
-
if (fd.toLowerCase() === pd.toLowerCase()) {
|
|
1593
|
-
pattern[pdi] = fd;
|
|
1594
|
-
if (pdi > fdi) {
|
|
1595
|
-
pattern = pattern.slice(pdi);
|
|
1596
|
-
} else if (fdi > pdi) {
|
|
1597
|
-
file = file.slice(fdi);
|
|
1598
|
-
}
|
|
1599
|
-
}
|
|
1600
|
-
}
|
|
1601
|
-
}
|
|
1602
|
-
const { optimizationLevel = 1 } = this.options;
|
|
1603
|
-
if (optimizationLevel >= 2) {
|
|
1604
|
-
file = this.levelTwoFileOptimize(file);
|
|
1605
|
-
}
|
|
1606
|
-
this.debug("matchOne", this, { file, pattern });
|
|
1607
|
-
this.debug("matchOne", file.length, pattern.length);
|
|
1608
|
-
for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
1609
|
-
this.debug("matchOne loop");
|
|
1610
|
-
var p = pattern[pi];
|
|
1611
|
-
var f = file[fi];
|
|
1612
|
-
this.debug(pattern, p, f);
|
|
1613
|
-
if (p === false) {
|
|
1614
|
-
return false;
|
|
1615
|
-
}
|
|
1616
|
-
if (p === GLOBSTAR) {
|
|
1617
|
-
this.debug("GLOBSTAR", [pattern, p, f]);
|
|
1618
|
-
var fr = fi;
|
|
1619
|
-
var pr = pi + 1;
|
|
1620
|
-
if (pr === pl) {
|
|
1621
|
-
this.debug("** at the end");
|
|
1622
|
-
for (; fi < fl; fi++) {
|
|
1623
|
-
if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
|
|
1624
|
-
return false;
|
|
1625
|
-
}
|
|
1626
|
-
return true;
|
|
1627
|
-
}
|
|
1628
|
-
while (fr < fl) {
|
|
1629
|
-
var swallowee = file[fr];
|
|
1630
|
-
this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
|
|
1631
|
-
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
|
|
1632
|
-
this.debug("globstar found match!", fr, fl, swallowee);
|
|
1633
|
-
return true;
|
|
1634
|
-
} else {
|
|
1635
|
-
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
|
|
1636
|
-
this.debug("dot detected!", file, fr, pattern, pr);
|
|
1637
|
-
break;
|
|
1638
|
-
}
|
|
1639
|
-
this.debug("globstar swallow a segment, and continue");
|
|
1640
|
-
fr++;
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
if (partial) {
|
|
1644
|
-
this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
|
|
1645
|
-
if (fr === fl) {
|
|
1646
|
-
return true;
|
|
1647
|
-
}
|
|
1648
|
-
}
|
|
1649
|
-
return false;
|
|
1650
|
-
}
|
|
1651
|
-
let hit;
|
|
1652
|
-
if (typeof p === "string") {
|
|
1653
|
-
hit = f === p;
|
|
1654
|
-
this.debug("string match", p, f, hit);
|
|
1655
|
-
} else {
|
|
1656
|
-
hit = p.test(f);
|
|
1657
|
-
this.debug("pattern match", p, f, hit);
|
|
1658
|
-
}
|
|
1659
|
-
if (!hit)
|
|
1660
|
-
return false;
|
|
1661
|
-
}
|
|
1662
|
-
if (fi === fl && pi === pl) {
|
|
1663
|
-
return true;
|
|
1664
|
-
} else if (fi === fl) {
|
|
1665
|
-
return partial;
|
|
1666
|
-
} else if (pi === pl) {
|
|
1667
|
-
return fi === fl - 1 && file[fi] === "";
|
|
1668
|
-
} else {
|
|
1669
|
-
throw new Error("wtf?");
|
|
1670
|
-
}
|
|
1671
|
-
}
|
|
1672
|
-
braceExpand() {
|
|
1673
|
-
return braceExpand(this.pattern, this.options);
|
|
1674
|
-
}
|
|
1675
|
-
parse(pattern) {
|
|
1676
|
-
assertValidPattern(pattern);
|
|
1677
|
-
const options = this.options;
|
|
1678
|
-
if (pattern === "**")
|
|
1679
|
-
return GLOBSTAR;
|
|
1680
|
-
if (pattern === "")
|
|
1681
|
-
return "";
|
|
1682
|
-
let m;
|
|
1683
|
-
let fastTest = null;
|
|
1684
|
-
if (m = pattern.match(starRE)) {
|
|
1685
|
-
fastTest = options.dot ? starTestDot : starTest;
|
|
1686
|
-
} else if (m = pattern.match(starDotExtRE)) {
|
|
1687
|
-
fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
|
|
1688
|
-
} else if (m = pattern.match(qmarksRE)) {
|
|
1689
|
-
fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
|
|
1690
|
-
} else if (m = pattern.match(starDotStarRE)) {
|
|
1691
|
-
fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
|
|
1692
|
-
} else if (m = pattern.match(dotStarRE)) {
|
|
1693
|
-
fastTest = dotStarTest;
|
|
1694
|
-
}
|
|
1695
|
-
const re = AST.fromGlob(pattern, this.options).toMMPattern();
|
|
1696
|
-
if (fastTest && typeof re === "object") {
|
|
1697
|
-
Reflect.defineProperty(re, "test", { value: fastTest });
|
|
1698
|
-
}
|
|
1699
|
-
return re;
|
|
1700
|
-
}
|
|
1701
|
-
makeRe() {
|
|
1702
|
-
if (this.regexp || this.regexp === false)
|
|
1703
|
-
return this.regexp;
|
|
1704
|
-
const set = this.set;
|
|
1705
|
-
if (!set.length) {
|
|
1706
|
-
this.regexp = false;
|
|
1707
|
-
return this.regexp;
|
|
1708
|
-
}
|
|
1709
|
-
const options = this.options;
|
|
1710
|
-
const twoStar = options.noglobstar ? star2 : options.dot ? twoStarDot : twoStarNoDot;
|
|
1711
|
-
const flags = new Set(options.nocase ? ["i"] : []);
|
|
1712
|
-
let re = set.map((pattern) => {
|
|
1713
|
-
const pp = pattern.map((p) => {
|
|
1714
|
-
if (p instanceof RegExp) {
|
|
1715
|
-
for (const f of p.flags.split(""))
|
|
1716
|
-
flags.add(f);
|
|
1717
|
-
}
|
|
1718
|
-
return typeof p === "string" ? regExpEscape2(p) : p === GLOBSTAR ? GLOBSTAR : p._src;
|
|
1719
|
-
});
|
|
1720
|
-
pp.forEach((p, i2) => {
|
|
1721
|
-
const next = pp[i2 + 1];
|
|
1722
|
-
const prev = pp[i2 - 1];
|
|
1723
|
-
if (p !== GLOBSTAR || prev === GLOBSTAR) {
|
|
1724
|
-
return;
|
|
1725
|
-
}
|
|
1726
|
-
if (prev === void 0) {
|
|
1727
|
-
if (next !== void 0 && next !== GLOBSTAR) {
|
|
1728
|
-
pp[i2 + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
|
|
1729
|
-
} else {
|
|
1730
|
-
pp[i2] = twoStar;
|
|
1731
|
-
}
|
|
1732
|
-
} else if (next === void 0) {
|
|
1733
|
-
pp[i2 - 1] = prev + "(?:\\/|" + twoStar + ")?";
|
|
1734
|
-
} else if (next !== GLOBSTAR) {
|
|
1735
|
-
pp[i2 - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
|
|
1736
|
-
pp[i2 + 1] = GLOBSTAR;
|
|
1737
|
-
}
|
|
1738
|
-
});
|
|
1739
|
-
return pp.filter((p) => p !== GLOBSTAR).join("/");
|
|
1740
|
-
}).join("|");
|
|
1741
|
-
const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
1742
|
-
re = "^" + open + re + close + "$";
|
|
1743
|
-
if (this.negate)
|
|
1744
|
-
re = "^(?!" + re + ").+$";
|
|
1745
|
-
try {
|
|
1746
|
-
this.regexp = new RegExp(re, [...flags].join(""));
|
|
1747
|
-
} catch (ex) {
|
|
1748
|
-
this.regexp = false;
|
|
1749
|
-
}
|
|
1750
|
-
return this.regexp;
|
|
1751
|
-
}
|
|
1752
|
-
slashSplit(p) {
|
|
1753
|
-
if (this.preserveMultipleSlashes) {
|
|
1754
|
-
return p.split("/");
|
|
1755
|
-
} else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
|
|
1756
|
-
return ["", ...p.split(/\/+/)];
|
|
1757
|
-
} else {
|
|
1758
|
-
return p.split(/\/+/);
|
|
1759
|
-
}
|
|
1760
|
-
}
|
|
1761
|
-
match(f, partial = this.partial) {
|
|
1762
|
-
this.debug("match", f, this.pattern);
|
|
1763
|
-
if (this.comment) {
|
|
1764
|
-
return false;
|
|
1765
|
-
}
|
|
1766
|
-
if (this.empty) {
|
|
1767
|
-
return f === "";
|
|
1768
|
-
}
|
|
1769
|
-
if (f === "/" && partial) {
|
|
1770
|
-
return true;
|
|
1771
|
-
}
|
|
1772
|
-
const options = this.options;
|
|
1773
|
-
if (this.isWindows) {
|
|
1774
|
-
f = f.split("\\").join("/");
|
|
1775
|
-
}
|
|
1776
|
-
const ff = this.slashSplit(f);
|
|
1777
|
-
this.debug(this.pattern, "split", ff);
|
|
1778
|
-
const set = this.set;
|
|
1779
|
-
this.debug(this.pattern, "set", set);
|
|
1780
|
-
let filename = ff[ff.length - 1];
|
|
1781
|
-
if (!filename) {
|
|
1782
|
-
for (let i2 = ff.length - 2; !filename && i2 >= 0; i2--) {
|
|
1783
|
-
filename = ff[i2];
|
|
1784
|
-
}
|
|
1785
|
-
}
|
|
1786
|
-
for (let i2 = 0; i2 < set.length; i2++) {
|
|
1787
|
-
const pattern = set[i2];
|
|
1788
|
-
let file = ff;
|
|
1789
|
-
if (options.matchBase && pattern.length === 1) {
|
|
1790
|
-
file = [filename];
|
|
1791
|
-
}
|
|
1792
|
-
const hit = this.matchOne(file, pattern, partial);
|
|
1793
|
-
if (hit) {
|
|
1794
|
-
if (options.flipNegate) {
|
|
1795
|
-
return true;
|
|
1796
|
-
}
|
|
1797
|
-
return !this.negate;
|
|
1798
|
-
}
|
|
1799
|
-
}
|
|
1800
|
-
if (options.flipNegate) {
|
|
1801
|
-
return false;
|
|
1802
|
-
}
|
|
1803
|
-
return this.negate;
|
|
1804
|
-
}
|
|
1805
|
-
static defaults(def) {
|
|
1806
|
-
return minimatch.defaults(def).Minimatch;
|
|
1807
|
-
}
|
|
1808
|
-
};
|
|
1809
|
-
minimatch.AST = AST;
|
|
1810
|
-
minimatch.Minimatch = Minimatch;
|
|
1811
|
-
minimatch.escape = escape;
|
|
1812
|
-
minimatch.unescape = unescape;
|
|
1813
|
-
|
|
1814
|
-
// src/utils/query-nonce-meta-tag-content.ts
|
|
1815
|
-
function queryNonceMetaTagContent(doc) {
|
|
1816
|
-
var _a, _b, _c;
|
|
1817
|
-
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;
|
|
1818
|
-
}
|
|
1819
|
-
|
|
1820
|
-
// src/utils/regular-expression.ts
|
|
1821
|
-
var escapeRegExpSpecialCharacters = (text) => {
|
|
1822
|
-
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1823
|
-
};
|
|
1824
|
-
|
|
1825
|
-
// src/utils/result.ts
|
|
1826
|
-
var result_exports = {};
|
|
1827
|
-
__export(result_exports, {
|
|
1828
|
-
err: () => err,
|
|
1829
|
-
map: () => map,
|
|
1830
|
-
ok: () => ok,
|
|
1831
|
-
unwrap: () => unwrap,
|
|
1832
|
-
unwrapErr: () => unwrapErr
|
|
1833
|
-
});
|
|
1834
|
-
var ok = (value) => ({
|
|
1835
|
-
isOk: true,
|
|
1836
|
-
isErr: false,
|
|
1837
|
-
value
|
|
1838
|
-
});
|
|
1839
|
-
var err = (value) => ({
|
|
1840
|
-
isOk: false,
|
|
1841
|
-
isErr: true,
|
|
1842
|
-
value
|
|
1843
|
-
});
|
|
1844
|
-
function map(result, fn) {
|
|
1845
|
-
if (result.isOk) {
|
|
1846
|
-
const val = fn(result.value);
|
|
1847
|
-
if (val instanceof Promise) {
|
|
1848
|
-
return val.then((newVal) => ok(newVal));
|
|
1849
|
-
} else {
|
|
1850
|
-
return ok(val);
|
|
1851
|
-
}
|
|
1852
|
-
}
|
|
1853
|
-
if (result.isErr) {
|
|
1854
|
-
const value = result.value;
|
|
1855
|
-
return err(value);
|
|
1856
|
-
}
|
|
1857
|
-
throw "should never get here";
|
|
1858
|
-
}
|
|
1859
|
-
var unwrap = (result) => {
|
|
1860
|
-
if (result.isOk) {
|
|
1861
|
-
return result.value;
|
|
1862
|
-
} else {
|
|
1863
|
-
throw result.value;
|
|
1864
|
-
}
|
|
1865
|
-
};
|
|
1866
|
-
var unwrapErr = (result) => {
|
|
1867
|
-
if (result.isErr) {
|
|
1868
|
-
return result.value;
|
|
1869
|
-
} else {
|
|
1870
|
-
throw result.value;
|
|
1871
|
-
}
|
|
1872
|
-
};
|
|
1873
|
-
|
|
1874
233
|
// src/utils/style.ts
|
|
1875
234
|
function createStyleSheetIfNeededAndSupported(styles2) {
|
|
1876
235
|
if (!supportsConstructableStylesheets) return void 0;
|
|
@@ -1935,10 +294,11 @@ function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
|
1935
294
|
let childNode;
|
|
1936
295
|
for (; i2 < childNodes.length; i2++) {
|
|
1937
296
|
childNode = childNodes[i2];
|
|
1938
|
-
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0)) {
|
|
297
|
+
if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
|
|
1939
298
|
slottedNodes.push(childNode);
|
|
299
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
1940
300
|
}
|
|
1941
|
-
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode
|
|
301
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(internalCall(childNode, "childNodes"), hostName, slotName)];
|
|
1942
302
|
}
|
|
1943
303
|
return slottedNodes;
|
|
1944
304
|
}
|
|
@@ -1994,6 +354,18 @@ function patchSlotNode(node) {
|
|
|
1994
354
|
node.assignedElements = assignedFactory(true);
|
|
1995
355
|
node.assignedNodes = assignedFactory(false);
|
|
1996
356
|
}
|
|
357
|
+
function dispatchSlotChangeEvent(elm) {
|
|
358
|
+
elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
|
|
359
|
+
}
|
|
360
|
+
function findSlotFromSlottedNode(slottedNode, parentHost) {
|
|
361
|
+
var _a;
|
|
362
|
+
parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
|
|
363
|
+
if (!parentHost) return { slotNode: null, slotName: "" };
|
|
364
|
+
const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
|
|
365
|
+
const childNodes = internalCall(parentHost, "childNodes");
|
|
366
|
+
const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
|
|
367
|
+
return { slotNode, slotName };
|
|
368
|
+
}
|
|
1997
369
|
function internalCall(node, method) {
|
|
1998
370
|
if ("__" + method in node) {
|
|
1999
371
|
const toReturn = node["__" + method];
|
|
@@ -2018,6 +390,14 @@ var uniqueTime = (key, measureText) => {
|
|
|
2018
390
|
};
|
|
2019
391
|
}
|
|
2020
392
|
};
|
|
393
|
+
|
|
394
|
+
// src/utils/query-nonce-meta-tag-content.ts
|
|
395
|
+
function queryNonceMetaTagContent(doc) {
|
|
396
|
+
var _a, _b, _c;
|
|
397
|
+
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;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// src/runtime/styles.ts
|
|
2021
401
|
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
2022
402
|
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
2023
403
|
let style = styles.get(scopeId2);
|
|
@@ -2051,7 +431,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2051
431
|
}
|
|
2052
432
|
if (!appliedStyles.has(scopeId2)) {
|
|
2053
433
|
styleElm = win.document.createElement("style");
|
|
2054
|
-
styleElm.
|
|
434
|
+
styleElm.textContent = style;
|
|
2055
435
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
2056
436
|
if (nonce != null) {
|
|
2057
437
|
styleElm.setAttribute("nonce", nonce);
|
|
@@ -2076,8 +456,8 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2076
456
|
}
|
|
2077
457
|
} else {
|
|
2078
458
|
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
2079
|
-
if (existingStyleContainer) {
|
|
2080
|
-
existingStyleContainer.
|
|
459
|
+
if (existingStyleContainer && true) {
|
|
460
|
+
existingStyleContainer.textContent = style + existingStyleContainer.textContent;
|
|
2081
461
|
} else {
|
|
2082
462
|
styleContainerNode.prepend(styleElm);
|
|
2083
463
|
}
|
|
@@ -2090,7 +470,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2090
470
|
styleContainerNode.insertBefore(styleElm, null);
|
|
2091
471
|
}
|
|
2092
472
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
2093
|
-
styleElm.
|
|
473
|
+
styleElm.textContent += SLOT_FB_CSS;
|
|
2094
474
|
}
|
|
2095
475
|
if (appliedStyles) {
|
|
2096
476
|
appliedStyles.add(scopeId2);
|
|
@@ -2138,6 +518,15 @@ var attachStyles = (hostRef) => {
|
|
|
2138
518
|
endAttachStyles();
|
|
2139
519
|
};
|
|
2140
520
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
521
|
+
|
|
522
|
+
// src/utils/helpers.ts
|
|
523
|
+
var isDef = (v) => v != null && v !== void 0;
|
|
524
|
+
var isComplexType = (o) => {
|
|
525
|
+
o = typeof o;
|
|
526
|
+
return o === "object" || o === "function";
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
// src/runtime/vdom/h.ts
|
|
2141
530
|
var h = (nodeName, vnodeData, ...children) => {
|
|
2142
531
|
if (typeof nodeName === "string") {
|
|
2143
532
|
nodeName = transformTag(nodeName);
|
|
@@ -2156,6 +545,11 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
2156
545
|
} else if (child != null && typeof child !== "boolean") {
|
|
2157
546
|
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
|
2158
547
|
child = String(child);
|
|
548
|
+
} else if (typeof nodeName !== "function" && child.$flags$ === void 0) {
|
|
549
|
+
{
|
|
550
|
+
consoleError("Invalid vNode child");
|
|
551
|
+
}
|
|
552
|
+
continue;
|
|
2159
553
|
}
|
|
2160
554
|
if (simple && lastSimple) {
|
|
2161
555
|
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
@@ -2205,7 +599,8 @@ var newVNode = (tag, text) => {
|
|
|
2205
599
|
const vnode = {
|
|
2206
600
|
$flags$: 0,
|
|
2207
601
|
$tag$: tag,
|
|
2208
|
-
|
|
602
|
+
// Normalize undefined to null to prevent rendering "undefined" as text
|
|
603
|
+
$text$: text != null ? text : null,
|
|
2209
604
|
$elm$: null,
|
|
2210
605
|
$children$: null
|
|
2211
606
|
};
|
|
@@ -2252,18 +647,33 @@ var convertToPrivate = (node) => {
|
|
|
2252
647
|
vnode.$name$ = node.vname;
|
|
2253
648
|
return vnode;
|
|
2254
649
|
};
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
)
|
|
650
|
+
|
|
651
|
+
// src/runtime/normalize-watchers.ts
|
|
652
|
+
var normalizeWatchers = (raw) => {
|
|
653
|
+
if (!raw) return void 0;
|
|
654
|
+
const keys = Object.keys(raw);
|
|
655
|
+
if (keys.length === 0) return void 0;
|
|
656
|
+
let hasLegacy = false;
|
|
657
|
+
for (const propName of keys) {
|
|
658
|
+
if (hasLegacy) break;
|
|
659
|
+
for (const h2 of raw[propName]) {
|
|
660
|
+
if (typeof h2 === "string") {
|
|
661
|
+
hasLegacy = true;
|
|
662
|
+
break;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
if (!hasLegacy) return raw;
|
|
667
|
+
const out = {};
|
|
668
|
+
for (const propName of keys) {
|
|
669
|
+
out[propName] = raw[propName].map(
|
|
670
|
+
(h2) => typeof h2 === "string" ? { [h2]: 0 } : h2
|
|
671
|
+
);
|
|
672
|
+
}
|
|
673
|
+
return out;
|
|
2263
674
|
};
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
createSupportsRuleRe(":host-context");
|
|
675
|
+
|
|
676
|
+
// src/runtime/parse-property-value.ts
|
|
2267
677
|
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
2268
678
|
if (propValue != null && !isComplexType(propValue)) {
|
|
2269
679
|
if (propType & 4 /* Boolean */) {
|
|
@@ -2344,7 +754,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2344
754
|
}
|
|
2345
755
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
2346
756
|
if (newValue) {
|
|
2347
|
-
newValue
|
|
757
|
+
queueRefAttachment(newValue, elm);
|
|
2348
758
|
}
|
|
2349
759
|
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
2350
760
|
if (memberName[2] === "-") {
|
|
@@ -2364,6 +774,36 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2364
774
|
plt.ael(elm, memberName, newValue, capture);
|
|
2365
775
|
}
|
|
2366
776
|
}
|
|
777
|
+
} else if (memberName[0] === "a" && memberName.startsWith("attr:")) {
|
|
778
|
+
const propName = memberName.slice(5);
|
|
779
|
+
let attrName;
|
|
780
|
+
{
|
|
781
|
+
const hostRef = getHostRef(elm);
|
|
782
|
+
if (hostRef && hostRef.$cmpMeta$ && hostRef.$cmpMeta$.$members$) {
|
|
783
|
+
const memberMeta = hostRef.$cmpMeta$.$members$[propName];
|
|
784
|
+
if (memberMeta && memberMeta[1]) {
|
|
785
|
+
attrName = memberMeta[1];
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
if (!attrName) {
|
|
790
|
+
attrName = propName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
791
|
+
}
|
|
792
|
+
if (newValue == null || newValue === false) {
|
|
793
|
+
if (newValue !== false || elm.getAttribute(attrName) === "") {
|
|
794
|
+
elm.removeAttribute(attrName);
|
|
795
|
+
}
|
|
796
|
+
} else {
|
|
797
|
+
elm.setAttribute(attrName, newValue === true ? "" : newValue);
|
|
798
|
+
}
|
|
799
|
+
return;
|
|
800
|
+
} else if (memberName[0] === "p" && memberName.startsWith("prop:")) {
|
|
801
|
+
const propName = memberName.slice(5);
|
|
802
|
+
try {
|
|
803
|
+
elm[propName] = newValue;
|
|
804
|
+
} catch (e) {
|
|
805
|
+
}
|
|
806
|
+
return;
|
|
2367
807
|
} else {
|
|
2368
808
|
const isComplex = isComplexType(newValue);
|
|
2369
809
|
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
@@ -2372,7 +812,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2372
812
|
const n = newValue == null ? "" : newValue;
|
|
2373
813
|
if (memberName === "list") {
|
|
2374
814
|
isProp = false;
|
|
2375
|
-
} else if (oldValue == null || elm[memberName]
|
|
815
|
+
} else if (oldValue == null || elm[memberName] !== n) {
|
|
2376
816
|
if (typeof elm.__lookupSetter__(memberName) === "function") {
|
|
2377
817
|
elm[memberName] = n;
|
|
2378
818
|
} else {
|
|
@@ -2386,7 +826,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2386
826
|
}
|
|
2387
827
|
}
|
|
2388
828
|
if (newValue == null || newValue === false) {
|
|
2389
|
-
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
829
|
+
if (newValue !== false || elm.getAttribute(memberName) === "" || flags & 4 /* isHost */ && !isEnumeratedAttribute(memberName)) {
|
|
2390
830
|
{
|
|
2391
831
|
elm.removeAttribute(memberName);
|
|
2392
832
|
}
|
|
@@ -2399,6 +839,8 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
2399
839
|
}
|
|
2400
840
|
}
|
|
2401
841
|
};
|
|
842
|
+
var ENUMERATED_ATTRIBUTES = /* @__PURE__ */ new Set(["draggable", "contenteditable", "spellcheck"]);
|
|
843
|
+
var isEnumeratedAttribute = (attrName) => ENUMERATED_ATTRIBUTES.has(attrName) || attrName.startsWith("aria-");
|
|
2402
844
|
var parseClassListRegex = /\s/;
|
|
2403
845
|
var parseClassList = (value) => {
|
|
2404
846
|
if (typeof value === "object" && value && "baseVal" in value) {
|
|
@@ -2458,6 +900,8 @@ var useNativeShadowDom = false;
|
|
|
2458
900
|
var checkSlotFallbackVisibility = false;
|
|
2459
901
|
var checkSlotRelocate = false;
|
|
2460
902
|
var isSvgMode = false;
|
|
903
|
+
var refCallbacksToRemove = [];
|
|
904
|
+
var refCallbacksToAttach = [];
|
|
2461
905
|
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
2462
906
|
var _a;
|
|
2463
907
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
@@ -2480,7 +924,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2480
924
|
);
|
|
2481
925
|
}
|
|
2482
926
|
}
|
|
2483
|
-
if (newVNode2.$text$
|
|
927
|
+
if (newVNode2.$text$ != null) {
|
|
2484
928
|
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
2485
929
|
} else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
2486
930
|
elm = newVNode2.$elm$ = win.document.createTextNode("");
|
|
@@ -2492,9 +936,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2492
936
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
2493
937
|
}
|
|
2494
938
|
if (!win.document) {
|
|
2495
|
-
throw new Error(
|
|
2496
|
-
"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."
|
|
2497
|
-
);
|
|
939
|
+
throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");
|
|
2498
940
|
}
|
|
2499
941
|
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
2500
942
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
@@ -2536,9 +978,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2536
978
|
patchSlotNode(elm);
|
|
2537
979
|
oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
|
|
2538
980
|
if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
|
|
2539
|
-
|
|
2540
|
-
putBackInOriginalLocation(oldParentVNode.$elm$, false);
|
|
2541
|
-
}
|
|
981
|
+
relocateToHostRoot(oldParentVNode.$elm$);
|
|
2542
982
|
}
|
|
2543
983
|
{
|
|
2544
984
|
addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
|
|
@@ -2547,9 +987,37 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2547
987
|
}
|
|
2548
988
|
return elm;
|
|
2549
989
|
};
|
|
990
|
+
var relocateToHostRoot = (parentElm) => {
|
|
991
|
+
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
992
|
+
const host = parentElm.closest(hostTagName.toLowerCase());
|
|
993
|
+
if (host != null) {
|
|
994
|
+
const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
|
|
995
|
+
(ref) => ref["s-cr"]
|
|
996
|
+
);
|
|
997
|
+
const childNodeArray = Array.from(
|
|
998
|
+
parentElm.__childNodes || parentElm.childNodes
|
|
999
|
+
);
|
|
1000
|
+
for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
|
|
1001
|
+
if (childNode["s-sh"] != null) {
|
|
1002
|
+
insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
|
|
1003
|
+
childNode["s-sh"] = void 0;
|
|
1004
|
+
checkSlotRelocate = true;
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
1009
|
+
};
|
|
2550
1010
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
2551
1011
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
2552
1012
|
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
1013
|
+
if (parentElm["s-sr"]) {
|
|
1014
|
+
let node = parentElm;
|
|
1015
|
+
while (node = node.nextSibling) {
|
|
1016
|
+
if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
|
|
1017
|
+
oldSlotChildNodes.push(node);
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
2553
1021
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
2554
1022
|
const childNode = oldSlotChildNodes[i2];
|
|
2555
1023
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
@@ -2664,7 +1132,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
2664
1132
|
if (idxInOld >= 0) {
|
|
2665
1133
|
elmToMove = oldCh[idxInOld];
|
|
2666
1134
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
2667
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2,
|
|
1135
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
2668
1136
|
} else {
|
|
2669
1137
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
2670
1138
|
oldCh[idxInOld] = void 0;
|
|
@@ -2722,11 +1190,17 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
2722
1190
|
const tag = newVNode2.$tag$;
|
|
2723
1191
|
const text = newVNode2.$text$;
|
|
2724
1192
|
let defaultHolder;
|
|
2725
|
-
if (text
|
|
1193
|
+
if (text == null) {
|
|
2726
1194
|
{
|
|
2727
1195
|
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
2728
1196
|
}
|
|
2729
1197
|
{
|
|
1198
|
+
if (tag === "slot" && !useNativeShadowDom) {
|
|
1199
|
+
if (oldVNode.$name$ !== newVNode2.$name$) {
|
|
1200
|
+
newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
|
|
1201
|
+
relocateToHostRoot(newVNode2.$elm$.parentElement);
|
|
1202
|
+
}
|
|
1203
|
+
}
|
|
2730
1204
|
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
2731
1205
|
}
|
|
2732
1206
|
if (oldChildren !== null && newChildren !== null) {
|
|
@@ -2763,7 +1237,10 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2763
1237
|
const slotName = childNode["s-sn"];
|
|
2764
1238
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
2765
1239
|
node = hostContentNodes[j];
|
|
2766
|
-
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] &&
|
|
1240
|
+
if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && // let an exact named-slot match override a stale default-slot claim. Skip this for
|
|
1241
|
+
// `slotName === ''` itself - a matched default node's cached `s-sn` is `''` too, which
|
|
1242
|
+
// would trivially "match" on every re-render and force pointless re-insertion.
|
|
1243
|
+
(!node["s-sh"] || node["s-sh"] !== childNode["s-hn"] || slotName !== "" && getSlotName(node) === slotName)) {
|
|
2767
1244
|
if (isNodeLocatedInSlot(node, slotName)) {
|
|
2768
1245
|
let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
|
|
2769
1246
|
checkSlotFallbackVisibility = true;
|
|
@@ -2803,15 +1280,39 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
2803
1280
|
};
|
|
2804
1281
|
var nullifyVNodeRefs = (vNode) => {
|
|
2805
1282
|
{
|
|
2806
|
-
vNode.$attrs$ && vNode.$attrs$.ref
|
|
1283
|
+
if (vNode.$attrs$ && vNode.$attrs$.ref) {
|
|
1284
|
+
refCallbacksToRemove.push(() => vNode.$attrs$.ref(null));
|
|
1285
|
+
}
|
|
2807
1286
|
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
2808
1287
|
}
|
|
2809
1288
|
};
|
|
2810
|
-
var
|
|
2811
|
-
|
|
2812
|
-
|
|
1289
|
+
var queueRefAttachment = (refCallback, elm) => {
|
|
1290
|
+
{
|
|
1291
|
+
refCallbacksToAttach.push(() => refCallback(elm));
|
|
1292
|
+
}
|
|
1293
|
+
};
|
|
1294
|
+
var flushQueuedRefCallbacks = () => {
|
|
1295
|
+
{
|
|
1296
|
+
refCallbacksToRemove.forEach((cb) => cb());
|
|
1297
|
+
refCallbacksToRemove.length = 0;
|
|
1298
|
+
refCallbacksToAttach.forEach((cb) => cb());
|
|
1299
|
+
refCallbacksToAttach.length = 0;
|
|
2813
1300
|
}
|
|
1301
|
+
};
|
|
1302
|
+
var insertBefore = (parent, newNode, reference, isInitialLoad) => {
|
|
2814
1303
|
{
|
|
1304
|
+
if (typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
|
|
1305
|
+
addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
|
|
1306
|
+
} else if (typeof newNode["s-sn"] === "string") {
|
|
1307
|
+
parent.insertBefore(newNode, reference);
|
|
1308
|
+
const { slotNode } = findSlotFromSlottedNode(newNode);
|
|
1309
|
+
if (slotNode && !isInitialLoad) dispatchSlotChangeEvent(slotNode);
|
|
1310
|
+
return newNode;
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
if ((parent == null ? void 0 : parent.__insertBefore)) {
|
|
1314
|
+
return parent.__insertBefore(newNode, reference);
|
|
1315
|
+
} else {
|
|
2815
1316
|
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
2816
1317
|
}
|
|
2817
1318
|
};
|
|
@@ -2837,7 +1338,7 @@ function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
|
|
|
2837
1338
|
}
|
|
2838
1339
|
}
|
|
2839
1340
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
2840
|
-
var _a, _b, _c, _d;
|
|
1341
|
+
var _a, _b, _c, _d, _e;
|
|
2841
1342
|
const hostElm = hostRef.$hostElement$;
|
|
2842
1343
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
2843
1344
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
@@ -2881,7 +1382,12 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2881
1382
|
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
2882
1383
|
const orgLocationNode = win.document.createTextNode("");
|
|
2883
1384
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
2884
|
-
insertBefore(
|
|
1385
|
+
insertBefore(
|
|
1386
|
+
nodeToRelocate.parentNode,
|
|
1387
|
+
nodeToRelocate["s-ol"] = orgLocationNode,
|
|
1388
|
+
nodeToRelocate,
|
|
1389
|
+
isInitialLoad
|
|
1390
|
+
);
|
|
2885
1391
|
}
|
|
2886
1392
|
}
|
|
2887
1393
|
for (const relocateData of relocateNodes) {
|
|
@@ -2893,7 +1399,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2893
1399
|
if (slotRefNode) {
|
|
2894
1400
|
const parentNodeRef = slotRefNode.parentNode;
|
|
2895
1401
|
let insertBeforeNode = slotRefNode.nextSibling;
|
|
2896
|
-
{
|
|
1402
|
+
if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
|
|
2897
1403
|
let orgLocationNode = (_b = nodeToRelocate["s-ol"]) == null ? void 0 : _b.previousSibling;
|
|
2898
1404
|
while (orgLocationNode) {
|
|
2899
1405
|
let refNode = (_c = orgLocationNode["s-nr"]) != null ? _c : null;
|
|
@@ -2914,10 +1420,18 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2914
1420
|
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
2915
1421
|
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
2916
1422
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
2917
|
-
|
|
2918
|
-
|
|
1423
|
+
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode, isInitialLoad);
|
|
1424
|
+
if (nodeToRelocate.nodeType === 8 /* CommentNode */ && nodeToRelocate.nodeValue.startsWith("s-nt-")) {
|
|
1425
|
+
const textNode = win.document.createTextNode(nodeToRelocate.nodeValue.replace(/^s-nt-/, ""));
|
|
1426
|
+
textNode["s-hn"] = nodeToRelocate["s-hn"];
|
|
1427
|
+
textNode["s-sn"] = nodeToRelocate["s-sn"];
|
|
1428
|
+
textNode["s-sh"] = nodeToRelocate["s-sh"];
|
|
1429
|
+
textNode["s-sr"] = nodeToRelocate["s-sr"];
|
|
1430
|
+
textNode["s-ol"] = nodeToRelocate["s-ol"];
|
|
1431
|
+
textNode["s-ol"]["s-nr"] = textNode;
|
|
1432
|
+
insertBefore(nodeToRelocate.parentNode, textNode, nodeToRelocate, isInitialLoad);
|
|
1433
|
+
nodeToRelocate.parentNode.removeChild(nodeToRelocate);
|
|
2919
1434
|
}
|
|
2920
|
-
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
2921
1435
|
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
2922
1436
|
nodeToRelocate.hidden = (_d = nodeToRelocate["s-ih"]) != null ? _d : false;
|
|
2923
1437
|
}
|
|
@@ -2935,7 +1449,26 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
2935
1449
|
plt.$flags$ &= -2 /* isTmpDisconnected */;
|
|
2936
1450
|
relocateNodes.length = 0;
|
|
2937
1451
|
}
|
|
1452
|
+
if (!useNativeShadowDom && !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && hostElm["s-cr"]) {
|
|
1453
|
+
const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
|
|
1454
|
+
for (const childNode of children) {
|
|
1455
|
+
if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
|
|
1456
|
+
if (isInitialLoad && childNode["s-ih"] == null) {
|
|
1457
|
+
childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
|
|
1458
|
+
}
|
|
1459
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
1460
|
+
childNode.hidden = true;
|
|
1461
|
+
} else if (childNode.nodeType === 3 /* TextNode */ && !!childNode.nodeValue.trim()) {
|
|
1462
|
+
const textCommentNode = win.document.createComment("s-nt-" + childNode.nodeValue);
|
|
1463
|
+
textCommentNode["s-sn"] = childNode["s-sn"];
|
|
1464
|
+
insertBefore(childNode.parentNode, textCommentNode, childNode, isInitialLoad);
|
|
1465
|
+
childNode.parentNode.removeChild(childNode);
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
2938
1470
|
contentRef = void 0;
|
|
1471
|
+
flushQueuedRefCallbacks();
|
|
2939
1472
|
};
|
|
2940
1473
|
|
|
2941
1474
|
// src/runtime/update-component.ts
|
|
@@ -2981,6 +1514,10 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
2981
1514
|
let maybePromise;
|
|
2982
1515
|
if (isInitialLoad) {
|
|
2983
1516
|
{
|
|
1517
|
+
if (hostRef.$deferredConnectedCallback$) {
|
|
1518
|
+
hostRef.$deferredConnectedCallback$ = false;
|
|
1519
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1520
|
+
}
|
|
2984
1521
|
{
|
|
2985
1522
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
2986
1523
|
if (hostRef.$queuedListeners$) {
|
|
@@ -3000,8 +1537,8 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
3000
1537
|
endSchedule();
|
|
3001
1538
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
3002
1539
|
};
|
|
3003
|
-
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((
|
|
3004
|
-
console.error(
|
|
1540
|
+
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err) => {
|
|
1541
|
+
console.error(err);
|
|
3005
1542
|
fn();
|
|
3006
1543
|
}) : fn();
|
|
3007
1544
|
var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
|
|
@@ -3029,7 +1566,7 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
|
3029
1566
|
if (childrenPromises.length === 0) {
|
|
3030
1567
|
postUpdate();
|
|
3031
1568
|
} else {
|
|
3032
|
-
Promise.all(childrenPromises).then(postUpdate);
|
|
1569
|
+
Promise.all(childrenPromises).then(postUpdate).catch(postUpdate);
|
|
3033
1570
|
hostRef.$flags$ |= 4 /* isWaitingForChildren */;
|
|
3034
1571
|
childrenPromises.length = 0;
|
|
3035
1572
|
}
|
|
@@ -3158,18 +1695,22 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
3158
1695
|
});
|
|
3159
1696
|
}
|
|
3160
1697
|
}
|
|
3161
|
-
if (
|
|
1698
|
+
if (flags & 2 /* hasRendered */) {
|
|
3162
1699
|
if (instance.componentShouldUpdate) {
|
|
3163
|
-
|
|
1700
|
+
const shouldUpdate = instance.componentShouldUpdate(newVal, oldVal, propName);
|
|
1701
|
+
if (shouldUpdate === false && !(flags & 16 /* isQueuedForUpdate */)) {
|
|
3164
1702
|
return;
|
|
3165
1703
|
}
|
|
3166
1704
|
}
|
|
3167
|
-
|
|
1705
|
+
if (!(flags & 16 /* isQueuedForUpdate */)) {
|
|
1706
|
+
scheduleUpdate(hostRef, false);
|
|
1707
|
+
}
|
|
3168
1708
|
}
|
|
3169
1709
|
}
|
|
3170
1710
|
};
|
|
3171
1711
|
|
|
3172
1712
|
// src/runtime/proxy-component.ts
|
|
1713
|
+
var reflectedAttrValue = (propValue) => propValue == null || propValue === false ? null : propValue === true ? "" : String(propValue);
|
|
3173
1714
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
3174
1715
|
var _a, _b;
|
|
3175
1716
|
const prototype = Cstr.prototype;
|
|
@@ -3196,7 +1737,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3196
1737
|
if (cmpMeta.$members$ || BUILD.propChangeCallback) {
|
|
3197
1738
|
{
|
|
3198
1739
|
if (Cstr.watchers && !cmpMeta.$watchers$) {
|
|
3199
|
-
cmpMeta.$watchers$ = Cstr.watchers;
|
|
1740
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
|
|
3200
1741
|
}
|
|
3201
1742
|
if (Cstr.deserializers && !cmpMeta.$deserializers$) {
|
|
3202
1743
|
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
@@ -3208,7 +1749,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3208
1749
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
3209
1750
|
members.map(([memberName, [memberFlags]]) => {
|
|
3210
1751
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
3211
|
-
const { get: origGetter, set: origSetter } =
|
|
1752
|
+
const { get: origGetter, set: origSetter } = getPropertyDescriptor(prototype, memberName) || {};
|
|
3212
1753
|
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
3213
1754
|
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
3214
1755
|
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
@@ -3262,23 +1803,28 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3262
1803
|
}
|
|
3263
1804
|
return;
|
|
3264
1805
|
}
|
|
3265
|
-
const
|
|
1806
|
+
const parsedValue = parsePropertyValue(
|
|
1807
|
+
newValue,
|
|
1808
|
+
memberFlags,
|
|
1809
|
+
!!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
1810
|
+
);
|
|
1811
|
+
const setterSetVal = (val) => {
|
|
3266
1812
|
const currentValue = ref.$lazyInstance$[memberName];
|
|
3267
1813
|
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
3268
1814
|
ref.$instanceValues$.set(memberName, currentValue);
|
|
3269
1815
|
}
|
|
3270
|
-
ref.$lazyInstance$[memberName] =
|
|
3271
|
-
newValue,
|
|
3272
|
-
memberFlags,
|
|
3273
|
-
!!(cmpMeta.$flags$ & 64 /* formAssociated */)
|
|
3274
|
-
);
|
|
1816
|
+
ref.$lazyInstance$[memberName] = val;
|
|
3275
1817
|
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
3276
1818
|
};
|
|
3277
1819
|
if (ref.$lazyInstance$) {
|
|
3278
|
-
setterSetVal();
|
|
1820
|
+
setterSetVal(parsedValue);
|
|
3279
1821
|
} else {
|
|
1822
|
+
ref.$instanceValues$.set(memberName, parsedValue);
|
|
3280
1823
|
ref.$fetchedCbList$.push(() => {
|
|
3281
|
-
|
|
1824
|
+
const pendingValue = ref.$instanceValues$.get(memberName);
|
|
1825
|
+
if (ref.$lazyInstance$[memberName] !== pendingValue) {
|
|
1826
|
+
setterSetVal(pendingValue);
|
|
1827
|
+
}
|
|
3282
1828
|
});
|
|
3283
1829
|
}
|
|
3284
1830
|
}
|
|
@@ -3326,11 +1872,19 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3326
1872
|
return;
|
|
3327
1873
|
}
|
|
3328
1874
|
const propFlags = members.find(([m]) => m === propName);
|
|
3329
|
-
|
|
1875
|
+
const propMemberFlags = propFlags ? propFlags[1][0] : 0;
|
|
1876
|
+
const isBooleanTarget = propMemberFlags & 4 /* Boolean */;
|
|
1877
|
+
if (propMemberFlags & 512 /* ReflectAttr */ && propMemberFlags & 8 /* Any */ && // a complex value is never written to an attribute, so a change while the prop holds
|
|
1878
|
+
// one is always external
|
|
1879
|
+
!isComplexType(this[propName]) && reflectedAttrValue(this[propName]) === newValue) {
|
|
1880
|
+
return;
|
|
1881
|
+
}
|
|
1882
|
+
const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
|
|
1883
|
+
if (isBooleanTarget) {
|
|
3330
1884
|
newValue = newValue === null || newValue === "false" ? false : true;
|
|
3331
1885
|
}
|
|
3332
1886
|
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
3333
|
-
if (newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1887
|
+
if (!isSpuriousBooleanRemoval && newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
3334
1888
|
this[propName] = newValue;
|
|
3335
1889
|
}
|
|
3336
1890
|
});
|
|
@@ -3356,72 +1910,95 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
3356
1910
|
|
|
3357
1911
|
// src/runtime/initialize-component.ts
|
|
3358
1912
|
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1913
|
+
var _a;
|
|
3359
1914
|
let Cstr;
|
|
3360
|
-
|
|
3361
|
-
hostRef.$flags$
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
const
|
|
3365
|
-
if (
|
|
3366
|
-
const
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
1915
|
+
try {
|
|
1916
|
+
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1917
|
+
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1918
|
+
hostRef.$flags$ &= -1025 /* hasFailedLoad */;
|
|
1919
|
+
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1920
|
+
if (bundleId) {
|
|
1921
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1922
|
+
if (CstrImport && "then" in CstrImport) {
|
|
1923
|
+
const endLoad = uniqueTime();
|
|
1924
|
+
Cstr = await CstrImport;
|
|
1925
|
+
endLoad();
|
|
1926
|
+
} else {
|
|
1927
|
+
Cstr = CstrImport;
|
|
1928
|
+
}
|
|
1929
|
+
if (!Cstr) {
|
|
1930
|
+
hostRef.$flags$ &= -33 /* hasInitializedComponent */;
|
|
1931
|
+
hostRef.$loadRetryCount$ = ((_a = hostRef.$loadRetryCount$) != null ? _a : 0) + 1;
|
|
1932
|
+
if (hostRef.$loadRetryCount$ < MAX_LAZY_LOAD_RETRIES) {
|
|
1933
|
+
hostRef.$flags$ |= 1024 /* hasFailedLoad */;
|
|
1934
|
+
}
|
|
1935
|
+
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1936
|
+
}
|
|
1937
|
+
if (!Cstr.isProxied) {
|
|
1938
|
+
{
|
|
1939
|
+
cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
|
|
1940
|
+
cmpMeta.$serializers$ = Cstr.serializers;
|
|
1941
|
+
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
1942
|
+
}
|
|
1943
|
+
proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
|
|
1944
|
+
Cstr.isProxied = true;
|
|
1945
|
+
}
|
|
1946
|
+
const endNewInstance = createTime("createInstance", cmpMeta.$tagName$);
|
|
3376
1947
|
{
|
|
3377
|
-
|
|
3378
|
-
cmpMeta.$serializers$ = Cstr.serializers;
|
|
3379
|
-
cmpMeta.$deserializers$ = Cstr.deserializers;
|
|
1948
|
+
hostRef.$flags$ |= 8 /* isConstructingInstance */;
|
|
3380
1949
|
}
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
1950
|
+
try {
|
|
1951
|
+
new Cstr(hostRef);
|
|
1952
|
+
} catch (e) {
|
|
1953
|
+
consoleError(e, elm);
|
|
1954
|
+
}
|
|
1955
|
+
{
|
|
1956
|
+
hostRef.$flags$ &= -9 /* isConstructingInstance */;
|
|
1957
|
+
}
|
|
1958
|
+
{
|
|
1959
|
+
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1960
|
+
}
|
|
1961
|
+
endNewInstance();
|
|
1962
|
+
const needsDeferredCallback = cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
|
|
1963
|
+
if (!needsDeferredCallback) {
|
|
1964
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1965
|
+
} else {
|
|
1966
|
+
hostRef.$deferredConnectedCallback$ = true;
|
|
1967
|
+
}
|
|
1968
|
+
} else {
|
|
1969
|
+
Cstr = elm.constructor;
|
|
1970
|
+
const cmpTag = elm.localName;
|
|
1971
|
+
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
3395
1972
|
}
|
|
3396
|
-
{
|
|
3397
|
-
|
|
1973
|
+
if (Cstr && Cstr.style) {
|
|
1974
|
+
let style;
|
|
1975
|
+
if (typeof Cstr.style === "string") {
|
|
1976
|
+
style = Cstr.style;
|
|
1977
|
+
}
|
|
1978
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
1979
|
+
if (!styles.has(scopeId2) || BUILD.hotModuleReplacement) {
|
|
1980
|
+
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
1981
|
+
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
1982
|
+
endRegisterStyles();
|
|
1983
|
+
}
|
|
3398
1984
|
}
|
|
3399
|
-
|
|
3400
|
-
|
|
1985
|
+
}
|
|
1986
|
+
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1987
|
+
const schedule = () => scheduleUpdate(hostRef, true);
|
|
1988
|
+
if (ancestorComponent && ancestorComponent["s-rc"]) {
|
|
1989
|
+
ancestorComponent["s-rc"].push(schedule);
|
|
3401
1990
|
} else {
|
|
3402
|
-
|
|
3403
|
-
const cmpTag = elm.localName;
|
|
3404
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1991
|
+
schedule();
|
|
3405
1992
|
}
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
3415
|
-
endRegisterStyles();
|
|
3416
|
-
}
|
|
1993
|
+
} catch (e) {
|
|
1994
|
+
consoleError(e, elm);
|
|
1995
|
+
if (hostRef.$onRenderResolve$) {
|
|
1996
|
+
hostRef.$onRenderResolve$();
|
|
1997
|
+
hostRef.$onRenderResolve$ = void 0;
|
|
1998
|
+
}
|
|
1999
|
+
if (hostRef.$onReadyResolve$ && !(hostRef.$flags$ & 1024 /* hasFailedLoad */)) {
|
|
2000
|
+
hostRef.$onReadyResolve$(elm);
|
|
3417
2001
|
}
|
|
3418
|
-
}
|
|
3419
|
-
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
3420
|
-
const schedule = () => scheduleUpdate(hostRef, true);
|
|
3421
|
-
if (ancestorComponent && ancestorComponent["s-rc"]) {
|
|
3422
|
-
ancestorComponent["s-rc"].push(schedule);
|
|
3423
|
-
} else {
|
|
3424
|
-
schedule();
|
|
3425
2002
|
}
|
|
3426
2003
|
};
|
|
3427
2004
|
var fireConnectedCallback = (instance, elm) => {
|
|
@@ -3458,7 +2035,7 @@ var connectedCallback = (elm) => {
|
|
|
3458
2035
|
}
|
|
3459
2036
|
if (cmpMeta.$members$) {
|
|
3460
2037
|
Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
3461
|
-
if (memberFlags & 31 /* Prop */ &&
|
|
2038
|
+
if (memberFlags & 31 /* Prop */ && Object.prototype.hasOwnProperty.call(elm, memberName)) {
|
|
3462
2039
|
const value = elm[memberName];
|
|
3463
2040
|
delete elm[memberName];
|
|
3464
2041
|
elm[memberName] = value;
|
|
@@ -3472,6 +2049,8 @@ var connectedCallback = (elm) => {
|
|
|
3472
2049
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
3473
2050
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
3474
2051
|
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
2052
|
+
} else if (hostRef.$flags$ & 1024 /* hasFailedLoad */) {
|
|
2053
|
+
setTimeout(() => initializeComponent(elm, hostRef, cmpMeta), LAZY_LOAD_RETRY_INTERVAL_MS);
|
|
3475
2054
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
3476
2055
|
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
3477
2056
|
}
|
|
@@ -3539,7 +2118,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3539
2118
|
let hasSlotRelocation = false;
|
|
3540
2119
|
lazyBundles.map((lazyBundle) => {
|
|
3541
2120
|
lazyBundle[1].map((compactMeta) => {
|
|
3542
|
-
var _a2, _b
|
|
2121
|
+
var _a2, _b;
|
|
3543
2122
|
const cmpMeta = {
|
|
3544
2123
|
$flags$: compactMeta[0],
|
|
3545
2124
|
$tagName$: compactMeta[1],
|
|
@@ -3559,16 +2138,18 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3559
2138
|
cmpMeta.$attrsToReflect$ = [];
|
|
3560
2139
|
}
|
|
3561
2140
|
{
|
|
3562
|
-
cmpMeta.$watchers$ = (
|
|
3563
|
-
cmpMeta.$serializers$ = (
|
|
3564
|
-
cmpMeta.$deserializers$ = (
|
|
2141
|
+
cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
|
|
2142
|
+
cmpMeta.$serializers$ = (_a2 = compactMeta[5]) != null ? _a2 : {};
|
|
2143
|
+
cmpMeta.$deserializers$ = (_b = compactMeta[6]) != null ? _b : {};
|
|
3565
2144
|
}
|
|
3566
2145
|
const tagName = transformTag(cmpMeta.$tagName$);
|
|
3567
2146
|
const HostElement = class extends HTMLElement {
|
|
2147
|
+
["s-p"];
|
|
2148
|
+
["s-rc"];
|
|
2149
|
+
hasRegisteredEventListeners = false;
|
|
3568
2150
|
// StencilLazyHost
|
|
3569
2151
|
constructor(self) {
|
|
3570
2152
|
super(self);
|
|
3571
|
-
this.hasRegisteredEventListeners = false;
|
|
3572
2153
|
self = this;
|
|
3573
2154
|
registerHost(self, cmpMeta);
|
|
3574
2155
|
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
@@ -3606,7 +2187,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3606
2187
|
}
|
|
3607
2188
|
disconnectedCallback() {
|
|
3608
2189
|
plt.jmp(() => disconnectedCallback(this));
|
|
3609
|
-
|
|
2190
|
+
nextTick(() => {
|
|
3610
2191
|
var _a3;
|
|
3611
2192
|
const hostRef = getHostRef(this);
|
|
3612
2193
|
if (!hostRef) {
|
|
@@ -3712,8 +2293,21 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
|
3712
2293
|
|
|
3713
2294
|
// src/runtime/nonce.ts
|
|
3714
2295
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
2296
|
+
|
|
2297
|
+
// src/runtime/tag-transform.ts
|
|
2298
|
+
var tagTransformer = void 0;
|
|
3715
2299
|
function transformTag(tag) {
|
|
3716
|
-
return tag;
|
|
2300
|
+
if (!tagTransformer) return tag;
|
|
2301
|
+
return tagTransformer(tag);
|
|
2302
|
+
}
|
|
2303
|
+
function setTagTransformer(transformer) {
|
|
2304
|
+
if (tagTransformer) {
|
|
2305
|
+
console.warn(`
|
|
2306
|
+
A tagTransformer has already been set.
|
|
2307
|
+
Overwriting it may lead to error and unexpected results if your components have already been defined.
|
|
2308
|
+
`);
|
|
2309
|
+
}
|
|
2310
|
+
tagTransformer = transformer;
|
|
3717
2311
|
}
|
|
3718
2312
|
|
|
3719
2313
|
exports.Fragment = Fragment;
|
|
@@ -3726,3 +2320,5 @@ exports.h = h;
|
|
|
3726
2320
|
exports.promiseResolve = promiseResolve;
|
|
3727
2321
|
exports.registerInstance = registerInstance;
|
|
3728
2322
|
exports.setNonce = setNonce;
|
|
2323
|
+
exports.setTagTransformer = setTagTransformer;
|
|
2324
|
+
exports.transformTag = transformTag;
|