@biggive/components 202609151306.0.0 → 202609171342.0.0

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.
Files changed (174) hide show
  1. package/dist/biggive/biggive.esm.js +1 -1
  2. package/dist/biggive/{p-f1324c49.entry.js → p-01e245e6.entry.js} +1 -1
  3. package/dist/biggive/{p-3197ba6a.entry.js → p-0c3dd528.entry.js} +1 -1
  4. package/dist/biggive/{p-457e7161.entry.js → p-1fa05de0.entry.js} +1 -1
  5. package/dist/biggive/{p-aff122fa.entry.js → p-1fea7be4.entry.js} +1 -1
  6. package/dist/biggive/{p-c1c9b6a0.entry.js → p-2211bc73.entry.js} +1 -1
  7. package/dist/biggive/{p-b22ad681.entry.js → p-23840cdd.entry.js} +1 -1
  8. package/dist/biggive/{p-7fc50b70.entry.js → p-295d5b54.entry.js} +1 -1
  9. package/dist/biggive/{p-41720b30.entry.js → p-2acf2b34.entry.js} +1 -1
  10. package/dist/biggive/{p-f031945c.entry.js → p-2f773874.entry.js} +1 -1
  11. package/dist/biggive/{p-d96fd8bb.entry.js → p-38dbb8c5.entry.js} +1 -1
  12. package/dist/biggive/{p-e0174caf.entry.js → p-3bc183b3.entry.js} +1 -1
  13. package/dist/biggive/{p-43d962a9.entry.js → p-40f20fdb.entry.js} +1 -1
  14. package/dist/biggive/{p-0f1b0135.entry.js → p-42ccddeb.entry.js} +1 -1
  15. package/dist/biggive/{p-7e736f90.entry.js → p-43a82f03.entry.js} +1 -1
  16. package/dist/biggive/{p-99b388f2.entry.js → p-45fca1e3.entry.js} +1 -1
  17. package/dist/biggive/{p-c3efc536.entry.js → p-48cfd1db.entry.js} +1 -1
  18. package/dist/biggive/{p-8d8b1488.entry.js → p-4a6f68dc.entry.js} +1 -1
  19. package/dist/biggive/{p-861f2f4a.entry.js → p-4d2fd220.entry.js} +1 -1
  20. package/dist/biggive/{p-4f78f441.entry.js → p-4dcf84ba.entry.js} +1 -1
  21. package/dist/biggive/{p-cbcb6d1d.entry.js → p-523043cf.entry.js} +1 -1
  22. package/dist/biggive/{p-b6f2e063.entry.js → p-524f1490.entry.js} +1 -1
  23. package/dist/biggive/{p-dbf0630d.entry.js → p-587796aa.entry.js} +1 -1
  24. package/dist/biggive/{p-474ed546.entry.js → p-5d285d41.entry.js} +1 -1
  25. package/dist/biggive/{p-74cea715.entry.js → p-628d65d0.entry.js} +1 -1
  26. package/dist/biggive/p-686996e2.entry.js +1 -0
  27. package/dist/biggive/{p-23253e31.entry.js → p-6a865f26.entry.js} +1 -1
  28. package/dist/biggive/{p-d3e5c82f.entry.js → p-6bf328a9.entry.js} +1 -1
  29. package/dist/biggive/{p-ea02284e.entry.js → p-6cafb9ab.entry.js} +1 -1
  30. package/dist/biggive/{p-1f4c671f.entry.js → p-747ae673.entry.js} +1 -1
  31. package/dist/biggive/{p-491891ab.entry.js → p-790921c5.entry.js} +1 -1
  32. package/dist/biggive/{p-2a6463d8.entry.js → p-7d1cddf2.entry.js} +1 -1
  33. package/dist/biggive/{p-947b9f4e.entry.js → p-7f0e202c.entry.js} +1 -1
  34. package/dist/biggive/{p-9a1744ce.entry.js → p-95d24a15.entry.js} +1 -1
  35. package/dist/biggive/{p-575d8459.entry.js → p-99e19baf.entry.js} +1 -1
  36. package/dist/biggive/p-DrbVeNEi.js +3 -0
  37. package/dist/biggive/p-a6845ab4.entry.js +1 -0
  38. package/dist/biggive/p-a9d2ed45.entry.js +1 -0
  39. package/dist/biggive/{p-6f5830b4.entry.js → p-af577c74.entry.js} +1 -1
  40. package/dist/biggive/p-b5eae243.entry.js +1 -0
  41. package/dist/biggive/{p-1327ae07.entry.js → p-c0a86605.entry.js} +1 -1
  42. package/dist/biggive/{p-199dac64.entry.js → p-c1dc8561.entry.js} +1 -1
  43. package/dist/biggive/{p-80382091.entry.js → p-c31bf4aa.entry.js} +1 -1
  44. package/dist/biggive/{p-88aa444d.entry.js → p-c947136a.entry.js} +1 -1
  45. package/dist/biggive/{p-db09fc60.entry.js → p-d16c6558.entry.js} +1 -1
  46. package/dist/biggive/{p-8507bb63.entry.js → p-d2551043.entry.js} +1 -1
  47. package/dist/biggive/{p-e53193ca.entry.js → p-df7c482e.entry.js} +1 -1
  48. package/dist/biggive/{p-412f12ea.entry.js → p-e0f128b2.entry.js} +1 -1
  49. package/dist/biggive/{p-fc8dd9f4.entry.js → p-ec93c321.entry.js} +1 -1
  50. package/dist/biggive/{p-0799b185.entry.js → p-ed7dc7e1.entry.js} +1 -1
  51. package/dist/biggive/{p-96354618.entry.js → p-f168479e.entry.js} +1 -1
  52. package/dist/biggive/p-f93d4b9f.entry.js +1 -0
  53. package/dist/biggive/{p-b0be3314.entry.js → p-ff834a57.entry.js} +1 -1
  54. package/dist/cjs/biggive-accordion-entry.cjs.entry.js +1 -1
  55. package/dist/cjs/biggive-accordion.cjs.entry.js +1 -1
  56. package/dist/cjs/biggive-article-card.cjs.entry.js +1 -1
  57. package/dist/cjs/biggive-back-to-top.cjs.entry.js +1 -1
  58. package/dist/cjs/biggive-basic-card.cjs.entry.js +1 -1
  59. package/dist/cjs/biggive-biography-card.cjs.entry.js +1 -1
  60. package/dist/cjs/biggive-boxed-content.cjs.entry.js +1 -1
  61. package/dist/cjs/biggive-branded-image.cjs.entry.js +1 -1
  62. package/dist/cjs/biggive-button.cjs.entry.js +1 -1
  63. package/dist/cjs/biggive-call-to-action.cjs.entry.js +1 -1
  64. package/dist/cjs/biggive-campaign-card.cjs.entry.js +1 -1
  65. package/dist/cjs/biggive-campaign-highlights.cjs.entry.js +1 -1
  66. package/dist/cjs/biggive-container-card.cjs.entry.js +1 -1
  67. package/dist/cjs/biggive-cookie-banner.cjs.entry.js +1 -1
  68. package/dist/cjs/biggive-footer.cjs.entry.js +1 -1
  69. package/dist/cjs/biggive-form-field-select.cjs.entry.js +1 -1
  70. package/dist/cjs/biggive-form.cjs.entry.js +1 -1
  71. package/dist/cjs/biggive-formatted-text.cjs.entry.js +1 -1
  72. package/dist/cjs/biggive-grid.cjs.entry.js +1 -1
  73. package/dist/cjs/biggive-heading-banner.cjs.entry.js +1 -1
  74. package/dist/cjs/biggive-heading.cjs.entry.js +1 -1
  75. package/dist/cjs/biggive-hero-image.cjs.entry.js +1 -1
  76. package/dist/cjs/biggive-icon-button.cjs.entry.js +1 -1
  77. package/dist/cjs/biggive-image-button.cjs.entry.js +1 -1
  78. package/dist/cjs/biggive-image-card.cjs.entry.js +1 -1
  79. package/dist/cjs/biggive-image-feature.cjs.entry.js +1 -1
  80. package/dist/cjs/biggive-image.cjs.entry.js +1 -1
  81. package/dist/cjs/biggive-main-menu.cjs.entry.js +1 -1
  82. package/dist/cjs/biggive-misc-icon.cjs.entry.js +1 -1
  83. package/dist/cjs/biggive-nav-group.cjs.entry.js +1 -1
  84. package/dist/cjs/biggive-nav-item.cjs.entry.js +1 -1
  85. package/dist/cjs/biggive-page-column.cjs.entry.js +1 -1
  86. package/dist/cjs/biggive-page-columns.cjs.entry.js +1 -1
  87. package/dist/cjs/biggive-page-section.cjs.entry.js +1 -1
  88. package/dist/cjs/biggive-popup.cjs.entry.js +1 -1
  89. package/dist/cjs/biggive-progress-bar.cjs.entry.js +1 -1
  90. package/dist/cjs/biggive-quote.cjs.entry.js +1 -1
  91. package/dist/cjs/biggive-sheet.cjs.entry.js +1 -1
  92. package/dist/cjs/biggive-social-icon.cjs.entry.js +1 -1
  93. package/dist/cjs/biggive-tab.cjs.entry.js +1 -1
  94. package/dist/cjs/biggive-tabbed-content.cjs.entry.js +1 -1
  95. package/dist/cjs/biggive-table.cjs.entry.js +1 -1
  96. package/dist/cjs/biggive-text-input.cjs.entry.js +1 -1
  97. package/dist/cjs/biggive-timeline-entry.cjs.entry.js +1 -1
  98. package/dist/cjs/biggive-timeline.cjs.entry.js +1 -1
  99. package/dist/cjs/biggive-totalizer-ticker-item.cjs.entry.js +1 -1
  100. package/dist/cjs/biggive-totalizer.cjs.entry.js +1 -1
  101. package/dist/cjs/biggive-video-feature.cjs.entry.js +1 -1
  102. package/dist/cjs/biggive-video.cjs.entry.js +1 -1
  103. package/dist/cjs/biggive.cjs.js +2 -2
  104. package/dist/cjs/{index-BsyTxzpK.js → index-RsfwXn0X.js} +103 -35
  105. package/dist/cjs/loader.cjs.js +1 -1
  106. package/dist/cjs/philco-footer.cjs.entry.js +1 -1
  107. package/dist/cjs/philco-main-menu.cjs.entry.js +1 -1
  108. package/dist/collection/collection-manifest.json +1 -1
  109. package/dist/esm/biggive-accordion-entry.entry.js +1 -1
  110. package/dist/esm/biggive-accordion.entry.js +1 -1
  111. package/dist/esm/biggive-article-card.entry.js +1 -1
  112. package/dist/esm/biggive-back-to-top.entry.js +1 -1
  113. package/dist/esm/biggive-basic-card.entry.js +1 -1
  114. package/dist/esm/biggive-biography-card.entry.js +1 -1
  115. package/dist/esm/biggive-boxed-content.entry.js +1 -1
  116. package/dist/esm/biggive-branded-image.entry.js +1 -1
  117. package/dist/esm/biggive-button.entry.js +1 -1
  118. package/dist/esm/biggive-call-to-action.entry.js +1 -1
  119. package/dist/esm/biggive-campaign-card.entry.js +1 -1
  120. package/dist/esm/biggive-campaign-highlights.entry.js +1 -1
  121. package/dist/esm/biggive-container-card.entry.js +1 -1
  122. package/dist/esm/biggive-cookie-banner.entry.js +1 -1
  123. package/dist/esm/biggive-footer.entry.js +1 -1
  124. package/dist/esm/biggive-form-field-select.entry.js +1 -1
  125. package/dist/esm/biggive-form.entry.js +1 -1
  126. package/dist/esm/biggive-formatted-text.entry.js +1 -1
  127. package/dist/esm/biggive-grid.entry.js +1 -1
  128. package/dist/esm/biggive-heading-banner.entry.js +1 -1
  129. package/dist/esm/biggive-heading.entry.js +1 -1
  130. package/dist/esm/biggive-hero-image.entry.js +1 -1
  131. package/dist/esm/biggive-icon-button.entry.js +1 -1
  132. package/dist/esm/biggive-image-button.entry.js +1 -1
  133. package/dist/esm/biggive-image-card.entry.js +1 -1
  134. package/dist/esm/biggive-image-feature.entry.js +1 -1
  135. package/dist/esm/biggive-image.entry.js +1 -1
  136. package/dist/esm/biggive-main-menu.entry.js +1 -1
  137. package/dist/esm/biggive-misc-icon.entry.js +1 -1
  138. package/dist/esm/biggive-nav-group.entry.js +1 -1
  139. package/dist/esm/biggive-nav-item.entry.js +1 -1
  140. package/dist/esm/biggive-page-column.entry.js +1 -1
  141. package/dist/esm/biggive-page-columns.entry.js +1 -1
  142. package/dist/esm/biggive-page-section.entry.js +1 -1
  143. package/dist/esm/biggive-popup.entry.js +1 -1
  144. package/dist/esm/biggive-progress-bar.entry.js +1 -1
  145. package/dist/esm/biggive-quote.entry.js +1 -1
  146. package/dist/esm/biggive-sheet.entry.js +1 -1
  147. package/dist/esm/biggive-social-icon.entry.js +1 -1
  148. package/dist/esm/biggive-tab.entry.js +1 -1
  149. package/dist/esm/biggive-tabbed-content.entry.js +1 -1
  150. package/dist/esm/biggive-table.entry.js +1 -1
  151. package/dist/esm/biggive-text-input.entry.js +1 -1
  152. package/dist/esm/biggive-timeline-entry.entry.js +1 -1
  153. package/dist/esm/biggive-timeline.entry.js +1 -1
  154. package/dist/esm/biggive-totalizer-ticker-item.entry.js +1 -1
  155. package/dist/esm/biggive-totalizer.entry.js +1 -1
  156. package/dist/esm/biggive-video-feature.entry.js +1 -1
  157. package/dist/esm/biggive-video.entry.js +1 -1
  158. package/dist/esm/biggive.js +3 -3
  159. package/dist/esm/{index-Cml8trro.js → index-DrbVeNEi.js} +103 -35
  160. package/dist/esm/loader.js +2 -2
  161. package/dist/esm/philco-footer.entry.js +1 -1
  162. package/dist/esm/philco-main-menu.entry.js +1 -1
  163. package/dist/types/components.d.ts +2 -2
  164. package/dist/types/stencil-public-runtime.d.ts +74 -55
  165. package/hydrate/index.js +950 -415
  166. package/hydrate/index.mjs +950 -415
  167. package/loader/index.d.ts +1 -1
  168. package/package.json +3 -3
  169. package/dist/biggive/p-2078197e.entry.js +0 -1
  170. package/dist/biggive/p-3e31c822.entry.js +0 -1
  171. package/dist/biggive/p-70db6b6a.entry.js +0 -1
  172. package/dist/biggive/p-Cml8trro.js +0 -2
  173. package/dist/biggive/p-a38575b4.entry.js +0 -1
  174. package/dist/biggive/p-fa80ee3d.entry.js +0 -1
package/hydrate/index.mjs CHANGED
@@ -2,6 +2,10 @@ import { Readable } from 'stream';
2
2
 
3
3
  const modeResolutionChain = [];
4
4
 
5
+ // captured here, at true module scope, before hydrateFactory shadows the
6
+ // AbortController identifier for component code below.
7
+ var $stencilNativeAbortController = AbortController;
8
+
5
9
  function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResults, $stencilAfterHydrate, $stencilHydrateResolve) {
6
10
  var globalThis = $stencilWindow;
7
11
  var self = $stencilWindow;
@@ -93,8 +97,46 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
93
97
 
94
98
  var fetch, FetchError, Headers, Request, Response;
95
99
 
100
+ // Aborted when the render times out or errors, so in-flight fetch() calls
101
+ // made by component code stop holding the render's window/results alive
102
+ // instead of running to completion against a torn-down window. See #6864.
103
+ var $stencilAbortController = new $stencilNativeAbortController();
104
+
105
+ // Any AbortController a component creates itself is transparently wired to
106
+ // cascade-abort when the render times out too, so component code using the
107
+ // standard AbortController convention for its own cancellable work (axios,
108
+ // aws-sdk v3, the mongodb driver, etc.) gets cancelled automatically.
109
+ var AbortController = function () {
110
+ var controller = new $stencilNativeAbortController();
111
+ $stencilAbortController.signal.addEventListener(
112
+ 'abort',
113
+ function () {
114
+ controller.abort();
115
+ },
116
+ { once: true },
117
+ );
118
+ return controller;
119
+ };
120
+
121
+ function $stencilFetchSignal(callerSignal) {
122
+ if (!callerSignal) {
123
+ return $stencilAbortController.signal;
124
+ }
125
+ if (callerSignal.aborted || $stencilAbortController.signal.aborted) {
126
+ return callerSignal.aborted ? callerSignal : $stencilAbortController.signal;
127
+ }
128
+ var merged = new $stencilNativeAbortController();
129
+ var onAbort = function () { merged.abort(); };
130
+ callerSignal.addEventListener('abort', onAbort, { once: true });
131
+ $stencilAbortController.signal.addEventListener('abort', onAbort, { once: true });
132
+ return merged.signal;
133
+ }
134
+
96
135
  if (typeof $stencilWindow.fetch === 'function') {
97
- fetch = $stencilWindow.fetch;
136
+ var $stencilRawFetch = $stencilWindow.fetch;
137
+ fetch = $stencilWindow.fetch = function(input, init) {
138
+ return $stencilRawFetch(input, Object.assign({}, init, { signal: $stencilFetchSignal(init && init.signal) }));
139
+ };
98
140
  } else {
99
141
  fetch = $stencilWindow.fetch = function() { throw new Error('fetch() is not implemented'); };
100
142
  }
@@ -132,10 +174,8 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
132
174
  const NAMESPACE = 'biggive';
133
175
  const BUILD = /* biggive */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", slotRelocation: true, state: true, updatable: true};
134
176
 
135
- const globalStyles = "a{color:inherit;text-decoration:underline}a:hover{text-decoration:none}";
136
-
137
177
  /*
138
- Stencil Hydrate Platform v4.43.2 | MIT Licensed | https://stenciljs.com
178
+ Stencil Hydrate Platform v4.45.0 | MIT Licensed | https://stenciljs.com
139
179
  */
140
180
  var __create = Object.create;
141
181
  var __defProp = Object.defineProperty;
@@ -170,7 +210,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
170
210
  __defProp(target, "default", { value: mod, enumerable: true }) ,
171
211
  mod
172
212
  ));
173
- var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
213
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
174
214
  var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
175
215
  var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
176
216
  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);
@@ -425,9 +465,9 @@ function getPropertyDescriptor(obj, memberName, getOnly) {
425
465
 
426
466
  // src/utils/es2022-rewire-class-members.ts
427
467
  var reWireGetterSetter = (instance, hostRef) => {
428
- var _a;
468
+ var _a2;
429
469
  const cmpMeta = hostRef.$cmpMeta$;
430
- const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
470
+ const members = Object.entries((_a2 = cmpMeta.$members$) != null ? _a2 : {});
431
471
  members.map(([memberName, [memberFlags]]) => {
432
472
  if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
433
473
  const ogValue = instance[memberName];
@@ -475,6 +515,8 @@ var DEFAULT_DOC_DATA = {
475
515
  staticComponents: /* @__PURE__ */ new Set()
476
516
  };
477
517
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
518
+ var MAX_LAZY_LOAD_RETRIES = 3;
519
+ var LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
478
520
 
479
521
  // src/utils/style.ts
480
522
  function createStyleSheetIfNeededAndSupported(styles2) {
@@ -484,18 +526,14 @@ function createStyleSheetIfNeededAndSupported(styles2) {
484
526
  // src/utils/shadow-root.ts
485
527
  var globalStyleSheet;
486
528
  function createShadowRoot(cmpMeta) {
487
- var _a;
529
+ var _a2;
488
530
  const opts = { mode: "open" };
489
531
  const shadowRoot = this.attachShadow(opts);
490
- if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;
532
+ if (globalStyleSheet === void 0) globalStyleSheet = (_a2 = createStyleSheetIfNeededAndSupported()) != null ? _a2 : null;
491
533
  if (globalStyleSheet) {
492
534
  {
493
535
  shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
494
536
  }
495
- } else {
496
- const styleElm = document.createElement("style");
497
- styleElm.innerHTML = globalStyles;
498
- shadowRoot.prepend(styleElm);
499
537
  }
500
538
  }
501
539
  var updateFallbackSlotVisibility = (elm) => {
@@ -539,7 +577,7 @@ function getHostSlotNodes(childNodes, hostName, slotName) {
539
577
  slottedNodes.push(childNode);
540
578
  if (typeof slotName !== "undefined") return slottedNodes;
541
579
  }
542
- slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
580
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(internalCall(childNode, "childNodes"), hostName, slotName)];
543
581
  }
544
582
  return slottedNodes;
545
583
  }
@@ -627,8 +665,8 @@ function dispatchSlotChangeEvent(elm) {
627
665
  elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
628
666
  }
629
667
  function findSlotFromSlottedNode(slottedNode, parentHost) {
630
- var _a;
631
- parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
668
+ var _a2;
669
+ parentHost = parentHost || ((_a2 = slottedNode["s-ol"]) == null ? void 0 : _a2.parentElement);
632
670
  if (!parentHost) return { slotNode: null, slotName: "" };
633
671
  const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
634
672
  const childNodes = internalCall(parentHost, "childNodes");
@@ -662,8 +700,8 @@ var uniqueTime = (key, measureText) => {
662
700
 
663
701
  // src/utils/query-nonce-meta-tag-content.ts
664
702
  function queryNonceMetaTagContent(doc) {
665
- var _a, _b, _c;
666
- 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;
703
+ var _a2, _b, _c;
704
+ return (_c = (_b = (_a2 = doc.head) == null ? void 0 : _a2.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
667
705
  }
668
706
 
669
707
  // src/runtime/styles.ts
@@ -676,7 +714,7 @@ var registerStyle = (scopeId2, cssText, allowCS) => {
676
714
  styles.set(scopeId2, style);
677
715
  };
678
716
  var addStyle = (styleContainerNode, cmpMeta, mode) => {
679
- var _a;
717
+ var _a2;
680
718
  const scopeId2 = getScopeId(cmpMeta);
681
719
  const style = styles.get(scopeId2);
682
720
  if (!win.document) {
@@ -697,7 +735,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
697
735
  } else if (!appliedStyles.has(scopeId2)) {
698
736
  styleElm = win.document.createElement("style");
699
737
  styleElm.textContent = style;
700
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
738
+ const nonce = (_a2 = plt.$nonce$) != null ? _a2 : queryNonceMetaTagContent(win.document);
701
739
  if (nonce != null) {
702
740
  styleElm.setAttribute("nonce", nonce);
703
741
  }
@@ -781,6 +819,11 @@ var h = (nodeName, vnodeData, ...children) => {
781
819
  } else if (child != null && typeof child !== "boolean") {
782
820
  if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
783
821
  child = String(child);
822
+ } else if (typeof nodeName !== "function" && child.$flags$ === void 0) {
823
+ {
824
+ consoleError("Invalid vNode child");
825
+ }
826
+ continue;
784
827
  }
785
828
  if (simple && lastSimple) {
786
829
  vNodeChildren[vNodeChildren.length - 1].$text$ += child;
@@ -881,7 +924,7 @@ var convertToPrivate = (node) => {
881
924
 
882
925
  // src/runtime/client-hydrate.ts
883
926
  var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
884
- var _a, _b, _c, _d;
927
+ var _a2, _b, _c, _d;
885
928
  const endHydrate = createTime("hydrateClient", tagName);
886
929
  const shadowRoot = hostElm.shadowRoot;
887
930
  const childRenderNodes = [];
@@ -918,7 +961,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
918
961
  if (childRenderNode.$tag$ === "slot") {
919
962
  node["s-cr"] = hostElm["s-cr"];
920
963
  }
921
- } else if (((_a = childRenderNode.$tag$) == null ? void 0 : _a.toString().includes("-")) && childRenderNode.$tag$ !== "slot-fb" && !childRenderNode.$elm$.shadowRoot) {
964
+ } else if (((_a2 = childRenderNode.$tag$) == null ? void 0 : _a2.toString().includes("-")) && childRenderNode.$tag$ !== "slot-fb" && !childRenderNode.$elm$.shadowRoot) {
922
965
  const cmpMeta = getHostRef(childRenderNode.$elm$);
923
966
  if (cmpMeta) {
924
967
  const scopeId3 = getScopeId(
@@ -1250,10 +1293,10 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
1250
1293
  parentVNode.$children$[childVNode.$index$] = childVNode;
1251
1294
  }
1252
1295
  var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1253
- var _a, _b;
1296
+ var _a2, _b;
1254
1297
  let slottedNode = slotNode.nextSibling;
1255
1298
  slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1256
- if (!slottedNode || ((_a = slottedNode.nodeValue) == null ? void 0 : _a.startsWith(SLOT_NODE_ID + "."))) return;
1299
+ if (!slottedNode || ((_a2 = slottedNode.nodeValue) == null ? void 0 : _a2.startsWith(SLOT_NODE_ID + "."))) return;
1257
1300
  do {
1258
1301
  if (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (!slottedNode["getAttribute"] || !slottedNode.getAttribute("slot")) && (slottedNode.nodeType === 8 /* CommentNode */ || slottedNode.nodeType === 3 /* TextNode */))) {
1259
1302
  slottedNode["s-sn"] = slotName;
@@ -1571,13 +1614,14 @@ var scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) =>
1571
1614
  }
1572
1615
  }).join(", ");
1573
1616
  };
1617
+ var isScopableAtRule = (selector) => selector.startsWith("@media") || selector.startsWith("@supports") || selector.startsWith("@page") || selector.startsWith("@document") || selector.startsWith("@layer");
1574
1618
  var scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
1575
1619
  return processRules(cssText, (rule) => {
1576
1620
  let selector = rule.selector;
1577
1621
  let content = rule.content;
1578
1622
  if (rule.selector[0] !== "@") {
1579
1623
  selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
1580
- } else if (rule.selector.startsWith("@media") || rule.selector.startsWith("@supports") || rule.selector.startsWith("@page") || rule.selector.startsWith("@document")) {
1624
+ } else if (isScopableAtRule(rule.selector)) {
1581
1625
  content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);
1582
1626
  }
1583
1627
  const cssRule = {
@@ -1656,15 +1700,16 @@ var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
1656
1700
  rule.selector = placeholder + rule.selector;
1657
1701
  return rule;
1658
1702
  };
1659
- cssText = processRules(cssText, (rule) => {
1703
+ const commentSelectors = (input) => processRules(input, (rule) => {
1660
1704
  if (rule.selector[0] !== "@") {
1661
1705
  return processCommentedSelector(rule);
1662
- } else if (rule.selector.startsWith("@media") || rule.selector.startsWith("@supports") || rule.selector.startsWith("@page") || rule.selector.startsWith("@document")) {
1663
- rule.content = processRules(rule.content, processCommentedSelector);
1664
- return rule;
1706
+ }
1707
+ if (isScopableAtRule(rule.selector)) {
1708
+ rule.content = commentSelectors(rule.content);
1665
1709
  }
1666
1710
  return rule;
1667
1711
  });
1712
+ cssText = commentSelectors(cssText);
1668
1713
  }
1669
1714
  const scoped = scopeCssText(cssText, scopeId2, hostScopeId, slotScopeId);
1670
1715
  cssText = [scoped.cssText, ...commentsWithHash].join("\n");
@@ -1681,6 +1726,31 @@ var scopeCss = (cssText, scopeId2, commentOriginalSelector) => {
1681
1726
  return cssText;
1682
1727
  };
1683
1728
 
1729
+ // src/runtime/normalize-watchers.ts
1730
+ var normalizeWatchers = (raw) => {
1731
+ if (!raw) return void 0;
1732
+ const keys = Object.keys(raw);
1733
+ if (keys.length === 0) return void 0;
1734
+ let hasLegacy = false;
1735
+ for (const propName of keys) {
1736
+ if (hasLegacy) break;
1737
+ for (const h2 of raw[propName]) {
1738
+ if (typeof h2 === "string") {
1739
+ hasLegacy = true;
1740
+ break;
1741
+ }
1742
+ }
1743
+ }
1744
+ if (!hasLegacy) return raw;
1745
+ const out = {};
1746
+ for (const propName of keys) {
1747
+ out[propName] = raw[propName].map(
1748
+ (h2) => typeof h2 === "string" ? { [h2]: 0 } : h2
1749
+ );
1750
+ }
1751
+ return out;
1752
+ };
1753
+
1684
1754
  // src/utils/remote-value.ts
1685
1755
  var RemoteValue = class _RemoteValue {
1686
1756
  /**
@@ -1777,11 +1847,19 @@ var RemoteValue = class _RemoteValue {
1777
1847
  };
1778
1848
 
1779
1849
  // src/utils/serialize.ts
1850
+ function decodeBase64Unicode(base64) {
1851
+ const binary = atob(base64);
1852
+ const bytes = new Uint8Array(binary.length);
1853
+ for (let i2 = 0; i2 < binary.length; i2++) {
1854
+ bytes[i2] = binary.charCodeAt(i2);
1855
+ }
1856
+ return new TextDecoder().decode(bytes);
1857
+ }
1780
1858
  function deserializeProperty(value) {
1781
1859
  if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
1782
1860
  return value;
1783
1861
  }
1784
- return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
1862
+ return RemoteValue.fromLocalValue(JSON.parse(decodeBase64Unicode(value.slice(SERIALIZED_PREFIX.length))));
1785
1863
  }
1786
1864
 
1787
1865
  // src/runtime/parse-property-value.ts
@@ -1807,8 +1885,8 @@ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
1807
1885
  return propValue;
1808
1886
  };
1809
1887
  var getElement = (ref) => {
1810
- var _a;
1811
- return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
1888
+ var _a2;
1889
+ return (_a2 = getHostRef(ref)) == null ? void 0 : _a2.$hostElement$ ;
1812
1890
  };
1813
1891
 
1814
1892
  // src/runtime/event-emitter.ts
@@ -1943,7 +2021,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
1943
2021
  }
1944
2022
  }
1945
2023
  if (newValue == null || newValue === false) {
1946
- if (newValue !== false || elm.getAttribute(memberName) === "") {
2024
+ if (newValue !== false || elm.getAttribute(memberName) === "" || flags & 4 /* isHost */ && !isEnumeratedAttribute(memberName)) {
1947
2025
  {
1948
2026
  elm.removeAttribute(memberName);
1949
2027
  }
@@ -1956,6 +2034,8 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
1956
2034
  }
1957
2035
  }
1958
2036
  };
2037
+ var ENUMERATED_ATTRIBUTES = /* @__PURE__ */ new Set(["draggable", "contenteditable", "spellcheck"]);
2038
+ var isEnumeratedAttribute = (attrName) => ENUMERATED_ATTRIBUTES.has(attrName) || attrName.startsWith("aria-");
1959
2039
  var parseClassListRegex = /\s/;
1960
2040
  var parseClassList = (value) => {
1961
2041
  if (typeof value === "object" && value && "baseVal" in value) {
@@ -2022,7 +2102,7 @@ var isSvgMode = false;
2022
2102
  var refCallbacksToRemove = [];
2023
2103
  var refCallbacksToAttach = [];
2024
2104
  var createElm = (oldParentVNode, newParentVNode, childIndex) => {
2025
- var _a;
2105
+ var _a2;
2026
2106
  const newVNode2 = newParentVNode.$children$[childIndex];
2027
2107
  let i2 = 0;
2028
2108
  let elm;
@@ -2093,7 +2173,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
2093
2173
  elm["s-sr"] = true;
2094
2174
  elm["s-cr"] = contentRef;
2095
2175
  elm["s-sn"] = newVNode2.$name$ || "";
2096
- elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
2176
+ elm["s-rf"] = (_a2 = newVNode2.$attrs$) == null ? void 0 : _a2.ref;
2097
2177
  patchSlotNode(elm);
2098
2178
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
2099
2179
  if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
@@ -2251,7 +2331,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
2251
2331
  if (idxInOld >= 0) {
2252
2332
  elmToMove = oldCh[idxInOld];
2253
2333
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
2254
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
2334
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
2255
2335
  } else {
2256
2336
  patch(elmToMove, newStartVnode, isInitialRender);
2257
2337
  oldCh[idxInOld] = void 0;
@@ -2358,7 +2438,10 @@ var markSlotContentForRelocation = (elm) => {
2358
2438
  const slotName = childNode["s-sn"];
2359
2439
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
2360
2440
  node = hostContentNodes[j];
2361
- if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
2441
+ 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
2442
+ // `slotName === ''` itself - a matched default node's cached `s-sn` is `''` too, which
2443
+ // would trivially "match" on every re-render and force pointless re-insertion.
2444
+ (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"] || slotName !== "" && getSlotName(node) === slotName)) {
2362
2445
  if (isNodeLocatedInSlot(node, slotName)) {
2363
2446
  let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
2364
2447
  checkSlotFallbackVisibility = true;
@@ -2426,19 +2509,19 @@ var insertBefore = (parent, newNode, reference, isInitialLoad) => {
2426
2509
  return newNode;
2427
2510
  }
2428
2511
  }
2429
- if (parent.__insertBefore) {
2512
+ if ((parent == null ? void 0 : parent.__insertBefore)) {
2430
2513
  return parent.__insertBefore(newNode, reference);
2431
2514
  } else {
2432
2515
  return parent == null ? void 0 : parent.insertBefore(newNode, reference);
2433
2516
  }
2434
2517
  };
2435
2518
  function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
2436
- var _a, _b;
2519
+ var _a2, _b;
2437
2520
  let scopeId2;
2438
2521
  if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
2439
2522
  const scopeName = slotNode["s-sn"];
2440
2523
  const hostName = slotNode["s-hn"];
2441
- (_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
2524
+ (_a2 = newParent.classList) == null ? void 0 : _a2.add(scopeId2 + "-s");
2442
2525
  if (oldParent && ((_b = oldParent.classList) == null ? void 0 : _b.contains(scopeId2 + "-s"))) {
2443
2526
  let child = (oldParent.__childNodes || oldParent.childNodes)[0];
2444
2527
  let found = false;
@@ -2454,7 +2537,7 @@ function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
2454
2537
  }
2455
2538
  }
2456
2539
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2457
- var _a, _d, _e;
2540
+ var _a2, _d, _e;
2458
2541
  const hostElm = hostRef.$hostElement$;
2459
2542
  const cmpMeta = hostRef.$cmpMeta$;
2460
2543
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
@@ -2502,7 +2585,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2502
2585
  const nodeToRelocate = relocateData.$nodeToRelocate$;
2503
2586
  const slotRefNode = relocateData.$slotRefNode$;
2504
2587
  if (nodeToRelocate.nodeType === 1 /* ElementNode */ && isInitialLoad) {
2505
- nodeToRelocate["s-ih"] = (_a = nodeToRelocate.hidden) != null ? _a : false;
2588
+ nodeToRelocate["s-ih"] = (_a2 = nodeToRelocate.hidden) != null ? _a2 : false;
2506
2589
  }
2507
2590
  if (slotRefNode) {
2508
2591
  const parentNodeRef = slotRefNode.parentNode;
@@ -2562,14 +2645,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2562
2645
  flushQueuedRefCallbacks();
2563
2646
  };
2564
2647
  var slotReferenceDebugNode = (slotVNode) => {
2565
- var _a;
2566
- return (_a = win.document) == null ? void 0 : _a.createComment(
2648
+ var _a2;
2649
+ return (_a2 = win.document) == null ? void 0 : _a2.createComment(
2567
2650
  `<slot${slotVNode.$name$ ? ' name="' + slotVNode.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`
2568
2651
  );
2569
2652
  };
2570
2653
  var originalLocationDebugNode = (nodeToRelocate) => {
2571
- var _a;
2572
- return (_a = win.document) == null ? void 0 : _a.createComment(
2654
+ var _a2;
2655
+ return (_a2 = win.document) == null ? void 0 : _a2.createComment(
2573
2656
  `org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate["s-hn"]})` : `[${nodeToRelocate.textContent}]`)
2574
2657
  );
2575
2658
  };
@@ -2639,7 +2722,7 @@ var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then
2639
2722
  }) : fn();
2640
2723
  var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
2641
2724
  var updateComponent = async (hostRef, instance, isInitialLoad) => {
2642
- var _a;
2725
+ var _a2;
2643
2726
  const elm = hostRef.$hostElement$;
2644
2727
  const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
2645
2728
  const rc = elm["s-rc"];
@@ -2671,7 +2754,7 @@ var updateComponent = async (hostRef, instance, isInitialLoad) => {
2671
2754
  endRender();
2672
2755
  endUpdate();
2673
2756
  {
2674
- const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
2757
+ const childrenPromises = (_a2 = elm["s-p"]) != null ? _a2 : [];
2675
2758
  const postUpdate = () => postUpdateComponent(hostRef);
2676
2759
  if (childrenPromises.length === 0) {
2677
2760
  postUpdate();
@@ -2742,13 +2825,13 @@ var postUpdateComponent = (hostRef) => {
2742
2825
  }
2743
2826
  };
2744
2827
  var appDidLoad = (who) => {
2745
- var _a;
2828
+ var _a2;
2746
2829
  if (BUILD.asyncQueue) {
2747
2830
  plt.$flags$ |= 2 /* appLoaded */;
2748
2831
  }
2749
2832
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
2750
2833
  {
2751
- if ((_a = plt.$orgLocNodes$) == null ? void 0 : _a.size) {
2834
+ if ((_a2 = plt.$orgLocNodes$) == null ? void 0 : _a2.size) {
2752
2835
  plt.$orgLocNodes$.clear();
2753
2836
  }
2754
2837
  }
@@ -2764,8 +2847,8 @@ var safeCall = (instance, method, arg, elm) => {
2764
2847
  return void 0;
2765
2848
  };
2766
2849
  var addHydratedFlag = (elm) => {
2767
- var _a;
2768
- return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated") ;
2850
+ var _a2;
2851
+ return elm.classList.add((_a2 = BUILD.hydratedSelectorName) != null ? _a2 : "hydrated") ;
2769
2852
  };
2770
2853
  var serverSideConnected = (elm) => {
2771
2854
  const children = elm.children;
@@ -2837,15 +2920,13 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
2837
2920
  }
2838
2921
  }
2839
2922
  };
2840
-
2841
- // src/runtime/proxy-component.ts
2842
2923
  var proxyComponent = (Cstr, cmpMeta, flags) => {
2843
- var _a;
2924
+ var _a2;
2844
2925
  const prototype = Cstr.prototype;
2845
2926
  {
2846
2927
  {
2847
2928
  if (Cstr.watchers && !cmpMeta.$watchers$) {
2848
- cmpMeta.$watchers$ = Cstr.watchers;
2929
+ cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
2849
2930
  }
2850
2931
  if (Cstr.deserializers && !cmpMeta.$deserializers$) {
2851
2932
  cmpMeta.$deserializers$ = Cstr.deserializers;
@@ -2854,7 +2935,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2854
2935
  cmpMeta.$serializers$ = Cstr.serializers;
2855
2936
  }
2856
2937
  }
2857
- const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
2938
+ const members = Object.entries((_a2 = cmpMeta.$members$) != null ? _a2 : {});
2858
2939
  members.map(([memberName, [memberFlags]]) => {
2859
2940
  if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
2860
2941
  const { get: origGetter, set: origSetter } = getPropertyDescriptor(prototype, memberName) || {};
@@ -2913,10 +2994,12 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2913
2994
 
2914
2995
  // src/runtime/initialize-component.ts
2915
2996
  var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2997
+ var _a2;
2916
2998
  let Cstr;
2917
2999
  try {
2918
3000
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
2919
3001
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
3002
+ hostRef.$flags$ &= -1025 /* hasFailedLoad */;
2920
3003
  const bundleId = cmpMeta.$lazyBundleId$;
2921
3004
  if (bundleId) {
2922
3005
  const CstrImport = loadModule(cmpMeta);
@@ -2928,11 +3011,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2928
3011
  Cstr = CstrImport;
2929
3012
  }
2930
3013
  if (!Cstr) {
3014
+ hostRef.$flags$ &= -33 /* hasInitializedComponent */;
3015
+ hostRef.$loadRetryCount$ = ((_a2 = hostRef.$loadRetryCount$) != null ? _a2 : 0) + 1;
3016
+ if (hostRef.$loadRetryCount$ < MAX_LAZY_LOAD_RETRIES) {
3017
+ hostRef.$flags$ |= 1024 /* hasFailedLoad */;
3018
+ }
2931
3019
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
2932
3020
  }
2933
3021
  if (!Cstr.isProxied) {
2934
3022
  {
2935
- cmpMeta.$watchers$ = Cstr.watchers;
3023
+ cmpMeta.$watchers$ = normalizeWatchers(Cstr.watchers);
2936
3024
  cmpMeta.$serializers$ = Cstr.serializers;
2937
3025
  cmpMeta.$deserializers$ = Cstr.deserializers;
2938
3026
  }
@@ -2999,7 +3087,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2999
3087
  hostRef.$onRenderResolve$();
3000
3088
  hostRef.$onRenderResolve$ = void 0;
3001
3089
  }
3002
- if (hostRef.$onReadyResolve$) {
3090
+ if (hostRef.$onReadyResolve$ && !(hostRef.$flags$ & 1024 /* hasFailedLoad */)) {
3003
3091
  hostRef.$onReadyResolve$(elm);
3004
3092
  }
3005
3093
  }
@@ -3054,6 +3142,8 @@ var connectedCallback = (elm) => {
3054
3142
  } else {
3055
3143
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
3056
3144
  fireConnectedCallback(hostRef.$lazyInstance$, elm);
3145
+ } else if (hostRef.$flags$ & 1024 /* hasFailedLoad */) {
3146
+ setTimeout(() => initializeComponent(elm, hostRef, cmpMeta), LAZY_LOAD_RETRY_INTERVAL_MS);
3057
3147
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
3058
3148
  hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
3059
3149
  }
@@ -3083,7 +3173,7 @@ var insertVdomAnnotations = (doc, staticComponents) => {
3083
3173
  const orgLocationNodes = [];
3084
3174
  parseVNodeAnnotations(doc, doc.body, docData, orgLocationNodes);
3085
3175
  orgLocationNodes.forEach((orgLocationNode) => {
3086
- var _a;
3176
+ var _a2;
3087
3177
  if (orgLocationNode != null && orgLocationNode["s-nr"]) {
3088
3178
  const nodeRef = orgLocationNode["s-nr"];
3089
3179
  let hostId = nodeRef["s-host-id"];
@@ -3101,7 +3191,7 @@ var insertVdomAnnotations = (doc, staticComponents) => {
3101
3191
  }
3102
3192
  } else if (nodeRef.nodeType === 3 /* TextNode */) {
3103
3193
  if (hostId === 0) {
3104
- const textContent = (_a = nodeRef.nodeValue) == null ? void 0 : _a.trim();
3194
+ const textContent = (_a2 = nodeRef.nodeValue) == null ? void 0 : _a2.trim();
3105
3195
  if (textContent === "") {
3106
3196
  orgLocationNode.remove();
3107
3197
  return;
@@ -3131,7 +3221,7 @@ var insertVdomAnnotations = (doc, staticComponents) => {
3131
3221
  }
3132
3222
  };
3133
3223
  var parseVNodeAnnotations = (doc, node, docData, orgLocationNodes) => {
3134
- var _a;
3224
+ var _a2;
3135
3225
  if (node == null) {
3136
3226
  return;
3137
3227
  }
@@ -3139,7 +3229,7 @@ var parseVNodeAnnotations = (doc, node, docData, orgLocationNodes) => {
3139
3229
  orgLocationNodes.push(node);
3140
3230
  }
3141
3231
  if (node.nodeType === 1 /* ElementNode */) {
3142
- const childNodes = [...Array.from(node.childNodes), ...Array.from(((_a = node.shadowRoot) == null ? void 0 : _a.childNodes) || [])];
3232
+ const childNodes = [...Array.from(node.childNodes), ...Array.from(((_a2 = node.shadowRoot) == null ? void 0 : _a2.childNodes) || [])];
3143
3233
  childNodes.forEach((childNode) => {
3144
3234
  const hostRef = getHostRef(childNode);
3145
3235
  if (hostRef != null && !docData.staticComponents.has(childNode.nodeName.toLowerCase())) {
@@ -3365,8 +3455,35 @@ var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
3365
3455
  };
3366
3456
 
3367
3457
  // node_modules/minimatch/dist/esm/ast.js
3458
+ var _a;
3368
3459
  var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
3369
3460
  var isExtglobType = (c) => types.has(c);
3461
+ var isExtglobAST = (c) => isExtglobType(c.type);
3462
+ var adoptionMap = /* @__PURE__ */ new Map([
3463
+ ["!", ["@"]],
3464
+ ["?", ["?", "@"]],
3465
+ ["@", ["@"]],
3466
+ ["*", ["*", "+", "?", "@"]],
3467
+ ["+", ["+", "@"]]
3468
+ ]);
3469
+ var adoptionWithSpaceMap = /* @__PURE__ */ new Map([
3470
+ ["!", ["?"]],
3471
+ ["@", ["?"]],
3472
+ ["+", ["?", "*"]]
3473
+ ]);
3474
+ var adoptionAnyMap = /* @__PURE__ */ new Map([
3475
+ ["!", ["?", "@"]],
3476
+ ["?", ["?", "@"]],
3477
+ ["@", ["?", "@"]],
3478
+ ["*", ["*", "+", "?", "@"]],
3479
+ ["+", ["+", "@", "?", "*"]]
3480
+ ]);
3481
+ var usurpMap = /* @__PURE__ */ new Map([
3482
+ ["!", /* @__PURE__ */ new Map([["!", "@"]])],
3483
+ ["?", /* @__PURE__ */ new Map([["*", "*"], ["+", "*"]])],
3484
+ ["@", /* @__PURE__ */ new Map([["!", "!"], ["?", "?"], ["@", "@"], ["*", "*"], ["+", "+"]])],
3485
+ ["+", /* @__PURE__ */ new Map([["?", "*"], ["*", "*"]])]
3486
+ ]);
3370
3487
  var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
3371
3488
  var startNoDot = "(?!\\.)";
3372
3489
  var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
@@ -3376,8 +3493,8 @@ var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
3376
3493
  var qmark = "[^/]";
3377
3494
  var star = qmark + "*?";
3378
3495
  var starNoEmpty = qmark + "+?";
3379
- var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
3380
- var _AST = class _AST {
3496
+ var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, canAdoptWithSpace_fn, canAdopt_fn, canAdoptType_fn, adoptWithSpace_fn, adopt_fn, canUsurpType_fn, canUsurp_fn, usurp_fn, flatten_fn, partsToRegExp_fn, parseGlob_fn;
3497
+ var AST = class {
3381
3498
  constructor(type, parent, options = {}) {
3382
3499
  __privateAdd(this, _AST_instances);
3383
3500
  __publicField(this, "type");
@@ -3430,44 +3547,44 @@ var _AST = class _AST {
3430
3547
  for (const p of parts) {
3431
3548
  if (p === "")
3432
3549
  continue;
3433
- if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
3550
+ if (typeof p !== "string" && !(p instanceof _a && __privateGet(p, _parent) === this)) {
3434
3551
  throw new Error("invalid part: " + p);
3435
3552
  }
3436
3553
  __privateGet(this, _parts).push(p);
3437
3554
  }
3438
3555
  }
3439
3556
  toJSON() {
3440
- var _a;
3557
+ var _a2;
3441
3558
  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())];
3442
3559
  if (this.isStart() && !this.type)
3443
3560
  ret.unshift([]);
3444
- if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")) {
3561
+ if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.type) === "!")) {
3445
3562
  ret.push({});
3446
3563
  }
3447
3564
  return ret;
3448
3565
  }
3449
3566
  isStart() {
3450
- var _a;
3567
+ var _a2;
3451
3568
  if (__privateGet(this, _root) === this)
3452
3569
  return true;
3453
- if (!((_a = __privateGet(this, _parent)) == null ? void 0 : _a.isStart()))
3570
+ if (!((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.isStart()))
3454
3571
  return false;
3455
3572
  if (__privateGet(this, _parentIndex) === 0)
3456
3573
  return true;
3457
3574
  const p = __privateGet(this, _parent);
3458
3575
  for (let i2 = 0; i2 < __privateGet(this, _parentIndex); i2++) {
3459
3576
  const pp = __privateGet(p, _parts)[i2];
3460
- if (!(pp instanceof _AST && pp.type === "!")) {
3577
+ if (!(pp instanceof _a && pp.type === "!")) {
3461
3578
  return false;
3462
3579
  }
3463
3580
  }
3464
3581
  return true;
3465
3582
  }
3466
3583
  isEnd() {
3467
- var _a, _b, _c;
3584
+ var _a2, _b, _c;
3468
3585
  if (__privateGet(this, _root) === this)
3469
3586
  return true;
3470
- if (((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")
3587
+ if (((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.type) === "!")
3471
3588
  return true;
3472
3589
  if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
3473
3590
  return false;
@@ -3483,16 +3600,16 @@ var _AST = class _AST {
3483
3600
  this.push(part.clone(this));
3484
3601
  }
3485
3602
  clone(parent) {
3486
- const c = new _AST(this.type, parent);
3603
+ const c = new _a(this.type, parent);
3487
3604
  for (const p of __privateGet(this, _parts)) {
3488
3605
  c.copyIn(p);
3489
3606
  }
3490
3607
  return c;
3491
3608
  }
3492
3609
  static fromGlob(pattern, options = {}) {
3493
- var _a;
3494
- const ast = new _AST(null, void 0, options);
3495
- __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, pattern, ast, 0, options);
3610
+ var _a2;
3611
+ const ast = new _a(null, void 0, options);
3612
+ __privateMethod(_a2 = _a, _AST_static, parseAST_fn).call(_a2, pattern, ast, 0, options, 0);
3496
3613
  return ast;
3497
3614
  }
3498
3615
  // returns the regular expression if there's magic, or the unescaped
@@ -3585,15 +3702,17 @@ var _AST = class _AST {
3585
3702
  // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
3586
3703
  // or start or whatever) and prepend ^ or / at the Regexp construction.
3587
3704
  toRegExpSource(allowDot) {
3588
- var _a;
3705
+ var _a2;
3589
3706
  const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
3590
- if (__privateGet(this, _root) === this)
3707
+ if (__privateGet(this, _root) === this) {
3708
+ __privateMethod(this, _AST_instances, flatten_fn).call(this);
3591
3709
  __privateMethod(this, _AST_instances, fillNegs_fn).call(this);
3592
- if (!this.type) {
3710
+ }
3711
+ if (!isExtglobAST(this)) {
3593
3712
  const noEmpty = this.isStart() && this.isEnd();
3594
3713
  const src = __privateGet(this, _parts).map((p) => {
3595
- var _a2;
3596
- const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a2 = _AST, _AST_static, parseGlob_fn).call(_a2, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
3714
+ var _a3;
3715
+ const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a3 = _a, _AST_static, parseGlob_fn).call(_a3, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
3597
3716
  __privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
3598
3717
  __privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
3599
3718
  return re;
@@ -3616,7 +3735,7 @@ var _AST = class _AST {
3616
3735
  }
3617
3736
  }
3618
3737
  let end = "";
3619
- if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!") {
3738
+ if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.type) === "!") {
3620
3739
  end = "(?:$|\\/)";
3621
3740
  }
3622
3741
  const final2 = start2 + src + end;
@@ -3632,9 +3751,10 @@ var _AST = class _AST {
3632
3751
  let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
3633
3752
  if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
3634
3753
  const s = this.toString();
3635
- __privateSet(this, _parts, [s]);
3636
- this.type = null;
3637
- __privateSet(this, _hasMagic, void 0);
3754
+ const me = this;
3755
+ __privateSet(me, _parts, [s]);
3756
+ me.type = null;
3757
+ __privateSet(me, _hasMagic, void 0);
3638
3758
  return [s, unescape(this.toString()), false, false];
3639
3759
  }
3640
3760
  let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
@@ -3703,8 +3823,9 @@ fillNegs_fn = function() {
3703
3823
  return this;
3704
3824
  };
3705
3825
  _AST_static = new WeakSet();
3706
- parseAST_fn = function(str, ast, pos, opt) {
3707
- var _a, _b;
3826
+ parseAST_fn = function(str, ast, pos, opt, extDepth) {
3827
+ var _a2, _b, _c, _d, _e;
3828
+ const maxDepth = (_a2 = opt.maxExtglobRecursion) != null ? _a2 : 2;
3708
3829
  let escaping = false;
3709
3830
  let inBrace = false;
3710
3831
  let braceStart = -1;
@@ -3736,11 +3857,12 @@ parseAST_fn = function(str, ast, pos, opt) {
3736
3857
  acc2 += c;
3737
3858
  continue;
3738
3859
  }
3739
- if (!opt.noext && isExtglobType(c) && str.charAt(i3) === "(") {
3860
+ const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i3) === "(" && extDepth <= maxDepth;
3861
+ if (doRecurse) {
3740
3862
  ast.push(acc2);
3741
3863
  acc2 = "";
3742
- const ext2 = new _AST(c, ast);
3743
- i3 = __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, str, ext2, i3, opt);
3864
+ const ext2 = new _a(c, ast);
3865
+ i3 = __privateMethod(_b = _a, _AST_static, parseAST_fn).call(_b, str, ext2, i3, opt, extDepth + 1);
3744
3866
  ast.push(ext2);
3745
3867
  continue;
3746
3868
  }
@@ -3750,7 +3872,7 @@ parseAST_fn = function(str, ast, pos, opt) {
3750
3872
  return i3;
3751
3873
  }
3752
3874
  let i2 = pos + 1;
3753
- let part = new _AST(null, ast);
3875
+ let part = new _a(null, ast);
3754
3876
  const parts = [];
3755
3877
  let acc = "";
3756
3878
  while (i2 < str.length) {
@@ -3777,19 +3899,22 @@ parseAST_fn = function(str, ast, pos, opt) {
3777
3899
  acc += c;
3778
3900
  continue;
3779
3901
  }
3780
- if (isExtglobType(c) && str.charAt(i2) === "(") {
3902
+ const doRecurse = isExtglobType(c) && str.charAt(i2) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
3903
+ (extDepth <= maxDepth || ast && __privateMethod(_c = ast, _AST_instances, canAdoptType_fn).call(_c, c));
3904
+ if (doRecurse) {
3905
+ const depthAdd = ast && __privateMethod(_d = ast, _AST_instances, canAdoptType_fn).call(_d, c) ? 0 : 1;
3781
3906
  part.push(acc);
3782
3907
  acc = "";
3783
- const ext2 = new _AST(c, part);
3908
+ const ext2 = new _a(c, part);
3784
3909
  part.push(ext2);
3785
- i2 = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt);
3910
+ i2 = __privateMethod(_e = _a, _AST_static, parseAST_fn).call(_e, str, ext2, i2, opt, extDepth + depthAdd);
3786
3911
  continue;
3787
3912
  }
3788
3913
  if (c === "|") {
3789
3914
  part.push(acc);
3790
3915
  acc = "";
3791
3916
  parts.push(part);
3792
- part = new _AST(null, ast);
3917
+ part = new _a(null, ast);
3793
3918
  continue;
3794
3919
  }
3795
3920
  if (c === ")") {
@@ -3808,6 +3933,100 @@ parseAST_fn = function(str, ast, pos, opt) {
3808
3933
  __privateSet(ast, _parts, [str.substring(pos - 1)]);
3809
3934
  return i2;
3810
3935
  };
3936
+ canAdoptWithSpace_fn = function(child) {
3937
+ return __privateMethod(this, _AST_instances, canAdopt_fn).call(this, child, adoptionWithSpaceMap);
3938
+ };
3939
+ canAdopt_fn = function(child, map2 = adoptionMap) {
3940
+ if (!child || typeof child !== "object" || child.type !== null || __privateGet(child, _parts).length !== 1 || this.type === null) {
3941
+ return false;
3942
+ }
3943
+ const gc = __privateGet(child, _parts)[0];
3944
+ if (!gc || typeof gc !== "object" || gc.type === null) {
3945
+ return false;
3946
+ }
3947
+ return __privateMethod(this, _AST_instances, canAdoptType_fn).call(this, gc.type, map2);
3948
+ };
3949
+ canAdoptType_fn = function(c, map2 = adoptionAnyMap) {
3950
+ var _a2;
3951
+ return !!((_a2 = map2.get(this.type)) == null ? void 0 : _a2.includes(c));
3952
+ };
3953
+ adoptWithSpace_fn = function(child, index) {
3954
+ const gc = __privateGet(child, _parts)[0];
3955
+ const blank = new _a(null, gc, this.options);
3956
+ __privateGet(blank, _parts).push("");
3957
+ gc.push(blank);
3958
+ __privateMethod(this, _AST_instances, adopt_fn).call(this, child, index);
3959
+ };
3960
+ adopt_fn = function(child, index) {
3961
+ const gc = __privateGet(child, _parts)[0];
3962
+ __privateGet(this, _parts).splice(index, 1, ...__privateGet(gc, _parts));
3963
+ for (const p of __privateGet(gc, _parts)) {
3964
+ if (typeof p === "object")
3965
+ __privateSet(p, _parent, this);
3966
+ }
3967
+ __privateSet(this, _toString, void 0);
3968
+ };
3969
+ canUsurpType_fn = function(c) {
3970
+ const m = usurpMap.get(this.type);
3971
+ return !!(m == null ? void 0 : m.has(c));
3972
+ };
3973
+ canUsurp_fn = function(child) {
3974
+ if (!child || typeof child !== "object" || child.type !== null || __privateGet(child, _parts).length !== 1 || this.type === null || __privateGet(this, _parts).length !== 1) {
3975
+ return false;
3976
+ }
3977
+ const gc = __privateGet(child, _parts)[0];
3978
+ if (!gc || typeof gc !== "object" || gc.type === null) {
3979
+ return false;
3980
+ }
3981
+ return __privateMethod(this, _AST_instances, canUsurpType_fn).call(this, gc.type);
3982
+ };
3983
+ usurp_fn = function(child) {
3984
+ const m = usurpMap.get(this.type);
3985
+ const gc = __privateGet(child, _parts)[0];
3986
+ const nt = m == null ? void 0 : m.get(gc.type);
3987
+ if (!nt)
3988
+ return false;
3989
+ __privateSet(this, _parts, __privateGet(gc, _parts));
3990
+ for (const p of __privateGet(this, _parts)) {
3991
+ if (typeof p === "object")
3992
+ __privateSet(p, _parent, this);
3993
+ }
3994
+ this.type = nt;
3995
+ __privateSet(this, _toString, void 0);
3996
+ __privateSet(this, _emptyExt, false);
3997
+ };
3998
+ flatten_fn = function() {
3999
+ var _a2, _b;
4000
+ if (!isExtglobAST(this)) {
4001
+ for (const p of __privateGet(this, _parts)) {
4002
+ if (typeof p === "object")
4003
+ __privateMethod(_a2 = p, _AST_instances, flatten_fn).call(_a2);
4004
+ }
4005
+ } else {
4006
+ let iterations = 0;
4007
+ let done = false;
4008
+ do {
4009
+ done = true;
4010
+ for (let i2 = 0; i2 < __privateGet(this, _parts).length; i2++) {
4011
+ const c = __privateGet(this, _parts)[i2];
4012
+ if (typeof c === "object") {
4013
+ __privateMethod(_b = c, _AST_instances, flatten_fn).call(_b);
4014
+ if (__privateMethod(this, _AST_instances, canAdopt_fn).call(this, c)) {
4015
+ done = false;
4016
+ __privateMethod(this, _AST_instances, adopt_fn).call(this, c, i2);
4017
+ } else if (__privateMethod(this, _AST_instances, canAdoptWithSpace_fn).call(this, c)) {
4018
+ done = false;
4019
+ __privateMethod(this, _AST_instances, adoptWithSpace_fn).call(this, c, i2);
4020
+ } else if (__privateMethod(this, _AST_instances, canUsurp_fn).call(this, c)) {
4021
+ done = false;
4022
+ __privateMethod(this, _AST_instances, usurp_fn).call(this, c);
4023
+ }
4024
+ }
4025
+ }
4026
+ } while (!done && ++iterations < 10);
4027
+ }
4028
+ __privateSet(this, _toString, void 0);
4029
+ };
3811
4030
  partsToRegExp_fn = function(dot) {
3812
4031
  return __privateGet(this, _parts).map((p) => {
3813
4032
  if (typeof p === "string") {
@@ -3822,11 +4041,13 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
3822
4041
  let escaping = false;
3823
4042
  let re = "";
3824
4043
  let uflag = false;
4044
+ let inStar = false;
3825
4045
  for (let i2 = 0; i2 < glob.length; i2++) {
3826
4046
  const c = glob.charAt(i2);
3827
4047
  if (escaping) {
3828
4048
  escaping = false;
3829
4049
  re += (reSpecials.has(c) ? "\\" : "") + c;
4050
+ inStar = false;
3830
4051
  continue;
3831
4052
  }
3832
4053
  if (c === "\\") {
@@ -3844,16 +4065,19 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
3844
4065
  uflag = uflag || needUflag;
3845
4066
  i2 += consumed - 1;
3846
4067
  hasMagic = hasMagic || magic;
4068
+ inStar = false;
3847
4069
  continue;
3848
4070
  }
3849
4071
  }
3850
4072
  if (c === "*") {
3851
- if (noEmpty && glob === "*")
3852
- re += starNoEmpty;
3853
- else
3854
- re += star;
4073
+ if (inStar)
4074
+ continue;
4075
+ inStar = true;
4076
+ re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star;
3855
4077
  hasMagic = true;
3856
4078
  continue;
4079
+ } else {
4080
+ inStar = false;
3857
4081
  }
3858
4082
  if (c === "?") {
3859
4083
  re += qmark;
@@ -3864,8 +4088,8 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
3864
4088
  }
3865
4089
  return [re, unescape(glob), !!hasMagic, uflag];
3866
4090
  };
3867
- __privateAdd(_AST, _AST_static);
3868
- var AST = _AST;
4091
+ __privateAdd(AST, _AST_static);
4092
+ _a = AST;
3869
4093
 
3870
4094
  // node_modules/minimatch/dist/esm/escape.js
3871
4095
  var escape = (s, { windowsPathsNoEscape = false } = {}) => {
@@ -4004,28 +4228,33 @@ var match = (list, pattern, options = {}) => {
4004
4228
  minimatch.match = match;
4005
4229
  var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
4006
4230
  var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
4231
+ var _Minimatch_instances, matchGlobstar_fn, matchGlobStarBodySections_fn, matchOne_fn;
4007
4232
  var Minimatch = class {
4008
- options;
4009
- set;
4010
- pattern;
4011
- windowsPathsNoEscape;
4012
- nonegate;
4013
- negate;
4014
- comment;
4015
- empty;
4016
- preserveMultipleSlashes;
4017
- partial;
4018
- globSet;
4019
- globParts;
4020
- nocase;
4021
- isWindows;
4022
- platform;
4023
- windowsNoMagicRoot;
4024
- regexp;
4025
4233
  constructor(pattern, options = {}) {
4234
+ __privateAdd(this, _Minimatch_instances);
4235
+ __publicField(this, "options");
4236
+ __publicField(this, "set");
4237
+ __publicField(this, "pattern");
4238
+ __publicField(this, "windowsPathsNoEscape");
4239
+ __publicField(this, "nonegate");
4240
+ __publicField(this, "negate");
4241
+ __publicField(this, "comment");
4242
+ __publicField(this, "empty");
4243
+ __publicField(this, "preserveMultipleSlashes");
4244
+ __publicField(this, "partial");
4245
+ __publicField(this, "globSet");
4246
+ __publicField(this, "globParts");
4247
+ __publicField(this, "nocase");
4248
+ __publicField(this, "isWindows");
4249
+ __publicField(this, "platform");
4250
+ __publicField(this, "windowsNoMagicRoot");
4251
+ __publicField(this, "maxGlobstarRecursion");
4252
+ __publicField(this, "regexp");
4253
+ var _a2;
4026
4254
  assertValidPattern(pattern);
4027
4255
  options = options || {};
4028
4256
  this.options = options;
4257
+ this.maxGlobstarRecursion = (_a2 = options.maxGlobstarRecursion) != null ? _a2 : 200;
4029
4258
  this.pattern = pattern;
4030
4259
  this.platform = options.platform || defaultPlatform;
4031
4260
  this.isWindows = this.platform === "win32";
@@ -4293,10 +4522,11 @@ var Minimatch = class {
4293
4522
  for (let i2 = 0; i2 < globParts.length - 1; i2++) {
4294
4523
  for (let j = i2 + 1; j < globParts.length; j++) {
4295
4524
  const matched = this.partsMatch(globParts[i2], globParts[j], !this.preserveMultipleSlashes);
4296
- if (!matched)
4297
- continue;
4298
- globParts[i2] = matched;
4299
- globParts[j] = [];
4525
+ if (matched) {
4526
+ globParts[i2] = [];
4527
+ globParts[j] = matched;
4528
+ break;
4529
+ }
4300
4530
  }
4301
4531
  }
4302
4532
  return globParts.filter((gs) => gs.length);
@@ -4357,7 +4587,8 @@ var Minimatch = class {
4357
4587
  // out of pattern, then that's fine, as long as all
4358
4588
  // the parts match.
4359
4589
  matchOne(file, pattern, partial = false) {
4360
- const options = this.options;
4590
+ let fileStartIndex = 0;
4591
+ let patternStartIndex = 0;
4361
4592
  if (this.isWindows) {
4362
4593
  const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
4363
4594
  const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
@@ -4366,14 +4597,14 @@ var Minimatch = class {
4366
4597
  const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
4367
4598
  const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
4368
4599
  if (typeof fdi === "number" && typeof pdi === "number") {
4369
- const [fd, pd] = [file[fdi], pattern[pdi]];
4600
+ const [fd, pd] = [
4601
+ file[fdi],
4602
+ pattern[pdi]
4603
+ ];
4370
4604
  if (fd.toLowerCase() === pd.toLowerCase()) {
4371
4605
  pattern[pdi] = fd;
4372
- if (pdi > fdi) {
4373
- pattern = pattern.slice(pdi);
4374
- } else if (fdi > pdi) {
4375
- file = file.slice(fdi);
4376
- }
4606
+ patternStartIndex = pdi;
4607
+ fileStartIndex = fdi;
4377
4608
  }
4378
4609
  }
4379
4610
  }
@@ -4381,71 +4612,10 @@ var Minimatch = class {
4381
4612
  if (optimizationLevel >= 2) {
4382
4613
  file = this.levelTwoFileOptimize(file);
4383
4614
  }
4384
- this.debug("matchOne", this, { file, pattern });
4385
- this.debug("matchOne", file.length, pattern.length);
4386
- for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
4387
- this.debug("matchOne loop");
4388
- var p = pattern[pi];
4389
- var f = file[fi];
4390
- this.debug(pattern, p, f);
4391
- if (p === false) {
4392
- return false;
4393
- }
4394
- if (p === GLOBSTAR) {
4395
- this.debug("GLOBSTAR", [pattern, p, f]);
4396
- var fr = fi;
4397
- var pr = pi + 1;
4398
- if (pr === pl) {
4399
- this.debug("** at the end");
4400
- for (; fi < fl; fi++) {
4401
- if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
4402
- return false;
4403
- }
4404
- return true;
4405
- }
4406
- while (fr < fl) {
4407
- var swallowee = file[fr];
4408
- this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
4409
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
4410
- this.debug("globstar found match!", fr, fl, swallowee);
4411
- return true;
4412
- } else {
4413
- if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
4414
- this.debug("dot detected!", file, fr, pattern, pr);
4415
- break;
4416
- }
4417
- this.debug("globstar swallow a segment, and continue");
4418
- fr++;
4419
- }
4420
- }
4421
- if (partial) {
4422
- this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
4423
- if (fr === fl) {
4424
- return true;
4425
- }
4426
- }
4427
- return false;
4428
- }
4429
- let hit;
4430
- if (typeof p === "string") {
4431
- hit = f === p;
4432
- this.debug("string match", p, f, hit);
4433
- } else {
4434
- hit = p.test(f);
4435
- this.debug("pattern match", p, f, hit);
4436
- }
4437
- if (!hit)
4438
- return false;
4439
- }
4440
- if (fi === fl && pi === pl) {
4441
- return true;
4442
- } else if (fi === fl) {
4443
- return partial;
4444
- } else if (pi === pl) {
4445
- return fi === fl - 1 && file[fi] === "";
4446
- } else {
4447
- throw new Error("wtf?");
4615
+ if (pattern.includes(GLOBSTAR)) {
4616
+ return __privateMethod(this, _Minimatch_instances, matchGlobstar_fn).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
4448
4617
  }
4618
+ return __privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
4449
4619
  }
4450
4620
  braceExpand() {
4451
4621
  return braceExpand(this.pattern, this.options);
@@ -4584,6 +4754,135 @@ var Minimatch = class {
4584
4754
  return minimatch.defaults(def).Minimatch;
4585
4755
  }
4586
4756
  };
4757
+ _Minimatch_instances = new WeakSet();
4758
+ matchGlobstar_fn = function(file, pattern, partial, fileIndex, patternIndex) {
4759
+ const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
4760
+ const lastgs = pattern.lastIndexOf(GLOBSTAR);
4761
+ const [head, body, tail] = partial ? [
4762
+ pattern.slice(patternIndex, firstgs),
4763
+ pattern.slice(firstgs + 1),
4764
+ []
4765
+ ] : [
4766
+ pattern.slice(patternIndex, firstgs),
4767
+ pattern.slice(firstgs + 1, lastgs),
4768
+ pattern.slice(lastgs + 1)
4769
+ ];
4770
+ if (head.length) {
4771
+ const fileHead = file.slice(fileIndex, fileIndex + head.length);
4772
+ if (!__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, fileHead, head, partial, 0, 0))
4773
+ return false;
4774
+ fileIndex += head.length;
4775
+ }
4776
+ let fileTailMatch = 0;
4777
+ if (tail.length) {
4778
+ if (tail.length + fileIndex > file.length)
4779
+ return false;
4780
+ let tailStart = file.length - tail.length;
4781
+ if (__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, tail, partial, tailStart, 0)) {
4782
+ fileTailMatch = tail.length;
4783
+ } else {
4784
+ if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) {
4785
+ return false;
4786
+ }
4787
+ tailStart--;
4788
+ if (!__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, tail, partial, tailStart, 0))
4789
+ return false;
4790
+ fileTailMatch = tail.length + 1;
4791
+ }
4792
+ }
4793
+ if (!body.length) {
4794
+ let sawSome = !!fileTailMatch;
4795
+ for (let i3 = fileIndex; i3 < file.length - fileTailMatch; i3++) {
4796
+ const f = String(file[i3]);
4797
+ sawSome = true;
4798
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
4799
+ return false;
4800
+ }
4801
+ }
4802
+ return partial || sawSome;
4803
+ }
4804
+ const bodySegments = [[[], 0]];
4805
+ let currentBody = bodySegments[0];
4806
+ let nonGsParts = 0;
4807
+ const nonGsPartsSums = [0];
4808
+ for (const b of body) {
4809
+ if (b === GLOBSTAR) {
4810
+ nonGsPartsSums.push(nonGsParts);
4811
+ currentBody = [[], 0];
4812
+ bodySegments.push(currentBody);
4813
+ } else {
4814
+ currentBody[0].push(b);
4815
+ nonGsParts++;
4816
+ }
4817
+ }
4818
+ let i2 = bodySegments.length - 1;
4819
+ const fileLength = file.length - fileTailMatch;
4820
+ for (const b of bodySegments) {
4821
+ b[1] = fileLength - (nonGsPartsSums[i2--] + b[0].length);
4822
+ }
4823
+ return !!__privateMethod(this, _Minimatch_instances, matchGlobStarBodySections_fn).call(this, file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
4824
+ };
4825
+ matchGlobStarBodySections_fn = function(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
4826
+ const bs = bodySegments[bodyIndex];
4827
+ if (!bs) {
4828
+ for (let i2 = fileIndex; i2 < file.length; i2++) {
4829
+ sawTail = true;
4830
+ const f = file[i2];
4831
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
4832
+ return false;
4833
+ }
4834
+ }
4835
+ return sawTail;
4836
+ }
4837
+ const [body, after] = bs;
4838
+ while (fileIndex <= after) {
4839
+ const m = __privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
4840
+ if (m && globStarDepth < this.maxGlobstarRecursion) {
4841
+ const sub = __privateMethod(this, _Minimatch_instances, matchGlobStarBodySections_fn).call(this, file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
4842
+ if (sub !== false)
4843
+ return sub;
4844
+ }
4845
+ const f = file[fileIndex];
4846
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
4847
+ return false;
4848
+ }
4849
+ fileIndex++;
4850
+ }
4851
+ return partial || null;
4852
+ };
4853
+ matchOne_fn = function(file, pattern, partial, fileIndex, patternIndex) {
4854
+ let fi;
4855
+ let pi;
4856
+ let pl;
4857
+ let fl;
4858
+ for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
4859
+ this.debug("matchOne loop");
4860
+ let p = pattern[pi];
4861
+ let f = file[fi];
4862
+ this.debug(pattern, p, f);
4863
+ if (p === false || p === GLOBSTAR)
4864
+ return false;
4865
+ let hit;
4866
+ if (typeof p === "string") {
4867
+ hit = f === p;
4868
+ this.debug("string match", p, f, hit);
4869
+ } else {
4870
+ hit = p.test(f);
4871
+ this.debug("pattern match", p, f, hit);
4872
+ }
4873
+ if (!hit)
4874
+ return false;
4875
+ }
4876
+ if (fi === fl && pi === pl) {
4877
+ return true;
4878
+ } else if (fi === fl) {
4879
+ return partial;
4880
+ } else if (pi === pl) {
4881
+ return fi === fl - 1 && file[fi] === "";
4882
+ } else {
4883
+ throw new Error("wtf?");
4884
+ }
4885
+ };
4587
4886
  minimatch.AST = AST;
4588
4887
  minimatch.Minimatch = Minimatch;
4589
4888
  minimatch.escape = escape;
@@ -4657,7 +4956,7 @@ function proxyHostElement(elm, cstr) {
4657
4956
  const hostRef = getHostRef(elm);
4658
4957
  const members = Object.entries(cmpMeta.$members$);
4659
4958
  members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
4660
- var _a, _b;
4959
+ var _a2, _b;
4661
4960
  if (memberFlags & 31 /* Prop */) {
4662
4961
  const attributeName = metaAttributeName || memberName;
4663
4962
  const attrValue = elm.getAttribute(attributeName);
@@ -4665,7 +4964,7 @@ function proxyHostElement(elm, cstr) {
4665
4964
  let attrPropVal;
4666
4965
  const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(cstr.prototype, memberName) || {};
4667
4966
  if (attrValue != null) {
4668
- if ((_a = cmpMeta.$deserializers$) == null ? void 0 : _a[memberName]) {
4967
+ if ((_a2 = cmpMeta.$deserializers$) == null ? void 0 : _a2[memberName]) {
4669
4968
  for (const deserializer of cmpMeta.$deserializers$[memberName]) {
4670
4969
  const [[methodName]] = Object.entries(deserializer);
4671
4970
  attrPropVal = cstr.prototype[methodName](attrValue, memberName);
@@ -4698,8 +4997,8 @@ function proxyHostElement(elm, cstr) {
4698
4997
  Object.defineProperty(elm, memberName, getterSetterDescriptor);
4699
4998
  Object.defineProperty(elm, metaAttributeName, getterSetterDescriptor);
4700
4999
  hostRef.$fetchedCbList$.push(() => {
4701
- var _a2;
4702
- if (!((_a2 = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _a2.has(memberName))) {
5000
+ var _a3;
5001
+ if (!((_a3 = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _a3.has(memberName))) {
4703
5002
  setValue(
4704
5003
  elm,
4705
5004
  memberName,
@@ -4712,11 +5011,11 @@ function proxyHostElement(elm, cstr) {
4712
5011
  } else if (memberFlags & 64 /* Method */) {
4713
5012
  Object.defineProperty(elm, memberName, {
4714
5013
  value(...args) {
4715
- var _a2;
5014
+ var _a3;
4716
5015
  const ref = getHostRef(this);
4717
- return (_a2 = ref == null ? void 0 : ref.$onInstancePromise$) == null ? void 0 : _a2.then(() => {
4718
- var _a3;
4719
- return (_a3 = ref == null ? void 0 : ref.$lazyInstance$) == null ? void 0 : _a3[memberName](...args);
5016
+ return (_a3 = ref == null ? void 0 : ref.$onInstancePromise$) == null ? void 0 : _a3.then(() => {
5017
+ var _a4;
5018
+ return (_a4 = ref == null ? void 0 : ref.$lazyInstance$) == null ? void 0 : _a4[memberName](...args);
4720
5019
  }).catch((e) => {
4721
5020
  consoleError(e, this);
4722
5021
  });
@@ -4727,14 +5026,14 @@ function proxyHostElement(elm, cstr) {
4727
5026
  }
4728
5027
  }
4729
5028
  function componentOnReady() {
4730
- var _a;
4731
- return (_a = getHostRef(this)) == null ? void 0 : _a.$onReadyPromise$;
5029
+ var _a2;
5030
+ return (_a2 = getHostRef(this)) == null ? void 0 : _a2.$onReadyPromise$;
4732
5031
  }
4733
5032
  function forceUpdate2() {
4734
5033
  }
4735
5034
 
4736
5035
  // src/hydrate/platform/hydrate-app.ts
4737
- function hydrateApp(win2, opts, results, afterHydrate, resolve) {
5036
+ function hydrateApp(win2, opts, results, afterHydrate, resolve, abortController) {
4738
5037
  const connectedElements = /* @__PURE__ */ new Set();
4739
5038
  const createdElements = /* @__PURE__ */ new Set();
4740
5039
  const waitingElements = /* @__PURE__ */ new Set();
@@ -4744,6 +5043,13 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
4744
5043
  setScopedSSR(opts);
4745
5044
  let tmrId;
4746
5045
  let ranCompleted = false;
5046
+ const abortedPromise = new Promise((res) => {
5047
+ if (abortController.signal.aborted) {
5048
+ res();
5049
+ } else {
5050
+ abortController.signal.addEventListener("abort", () => res(), { once: true });
5051
+ }
5052
+ });
4747
5053
  function hydratedComplete() {
4748
5054
  globalThis.clearTimeout(tmrId);
4749
5055
  createdElements.clear();
@@ -4765,6 +5071,7 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
4765
5071
  }
4766
5072
  function hydratedError(err2) {
4767
5073
  renderCatchError(opts, results, err2);
5074
+ abortController.abort();
4768
5075
  hydratedComplete();
4769
5076
  }
4770
5077
  function timeoutExceeded() {
@@ -4810,7 +5117,7 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
4810
5117
  if (isValidComponent(elm, opts) && results.hydratedCount < opts.maxHydrateCount) {
4811
5118
  if (!connectedElements.has(elm) && shouldHydrate(elm)) {
4812
5119
  connectedElements.add(elm);
4813
- return hydrateComponent.call(elm, win2, results, elm.nodeName, elm, waitingElements);
5120
+ return hydrateComponent.call(elm, win2, results, elm.nodeName, elm, waitingElements, abortedPromise);
4814
5121
  }
4815
5122
  }
4816
5123
  return resolved2;
@@ -4839,7 +5146,7 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
4839
5146
  hydratedError(e);
4840
5147
  }
4841
5148
  }
4842
- async function hydrateComponent(win2, results, tagName, elm, waitingElements) {
5149
+ async function hydrateComponent(win2, results, tagName, elm, waitingElements, aborted) {
4843
5150
  tagName = tagName.toLowerCase();
4844
5151
  const Cstr = loadModule(
4845
5152
  {
@@ -4854,17 +5161,19 @@ async function hydrateComponent(win2, results, tagName, elm, waitingElements) {
4854
5161
  }
4855
5162
  try {
4856
5163
  connectedCallback(elm);
4857
- await elm.componentOnReady();
4858
- results.hydratedCount++;
4859
- const ref = getHostRef(elm);
4860
- const modeName = !(ref == null ? void 0 : ref.$modeName$) ? "$" : ref == null ? void 0 : ref.$modeName$;
4861
- if (!results.components.some((c) => c.tag === tagName && c.mode === modeName)) {
4862
- results.components.push({
4863
- tag: tagName,
4864
- mode: modeName,
4865
- count: 0,
4866
- depth: -1
4867
- });
5164
+ const wasAborted = await Promise.race([elm.componentOnReady().then(() => false), aborted.then(() => true)]);
5165
+ if (!wasAborted) {
5166
+ results.hydratedCount++;
5167
+ const ref = getHostRef(elm);
5168
+ const modeName = !(ref == null ? void 0 : ref.$modeName$) ? "$" : ref == null ? void 0 : ref.$modeName$;
5169
+ if (!results.components.some((c) => c.tag === tagName && c.mode === modeName)) {
5170
+ results.components.push({
5171
+ tag: tagName,
5172
+ mode: modeName,
5173
+ count: 0,
5174
+ depth: -1
5175
+ });
5176
+ }
4868
5177
  }
4869
5178
  } catch (e) {
4870
5179
  win2.console.error(e);
@@ -8346,7 +8655,7 @@ exports.hydrateApp = hydrateApp;
8346
8655
 
8347
8656
 
8348
8657
  /*hydrateAppClosure end*/
8349
- hydrateApp(window, $stencilHydrateOpts, $stencilHydrateResults, $stencilAfterHydrate, $stencilHydrateResolve);
8658
+ hydrateApp(window, $stencilHydrateOpts, $stencilHydrateResults, $stencilAfterHydrate, $stencilHydrateResolve, $stencilAbortController);
8350
8659
  }
8351
8660
 
8352
8661
  hydrateAppClosure($stencilWindow);
@@ -8441,7 +8750,7 @@ var NAMESPACE = (
8441
8750
  );
8442
8751
 
8443
8752
  /*
8444
- Stencil Hydrate Runner v4.43.2 | MIT Licensed | https://stenciljs.com
8753
+ Stencil Hydrate Runner v4.45.0 | MIT Licensed | https://stenciljs.com
8445
8754
  */
8446
8755
  var __create = Object.create;
8447
8756
  var __defProp = Object.defineProperty;
@@ -9772,11 +10081,11 @@ var fromCodePoint = (
9772
10081
  }
9773
10082
  );
9774
10083
  function replaceCodePoint(codePoint) {
9775
- var _a2;
10084
+ var _a3;
9776
10085
  if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) {
9777
10086
  return 65533;
9778
10087
  }
9779
- return (_a2 = decodeMap.get(codePoint)) !== null && _a2 !== void 0 ? _a2 : codePoint;
10088
+ return (_a3 = decodeMap.get(codePoint)) !== null && _a3 !== void 0 ? _a3 : codePoint;
9780
10089
  }
9781
10090
 
9782
10091
  // node_modules/entities/lib/esm/decode.js
@@ -9973,9 +10282,9 @@ var EntityDecoder = class {
9973
10282
  * @returns The number of characters that were consumed.
9974
10283
  */
9975
10284
  emitNumericEntity(lastCp, expectedLength) {
9976
- var _a2;
10285
+ var _a3;
9977
10286
  if (this.consumed <= expectedLength) {
9978
- (_a2 = this.errors) === null || _a2 === void 0 ? void 0 : _a2.absenceOfDigitsInNumericCharacterReference(this.consumed);
10287
+ (_a3 = this.errors) === null || _a3 === void 0 ? void 0 : _a3.absenceOfDigitsInNumericCharacterReference(this.consumed);
9979
10288
  return 0;
9980
10289
  }
9981
10290
  if (lastCp === CharCodes.SEMI) {
@@ -10035,11 +10344,11 @@ var EntityDecoder = class {
10035
10344
  * @returns The number of characters consumed.
10036
10345
  */
10037
10346
  emitNotTerminatedNamedEntity() {
10038
- var _a2;
10347
+ var _a3;
10039
10348
  const { result, decodeTree } = this;
10040
10349
  const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
10041
10350
  this.emitNamedEntityData(result, valueLength, this.consumed);
10042
- (_a2 = this.errors) === null || _a2 === void 0 ? void 0 : _a2.missingSemicolonAfterCharacterReference();
10351
+ (_a3 = this.errors) === null || _a3 === void 0 ? void 0 : _a3.missingSemicolonAfterCharacterReference();
10043
10352
  return this.consumed;
10044
10353
  }
10045
10354
  /**
@@ -10067,7 +10376,7 @@ var EntityDecoder = class {
10067
10376
  * @returns The number of characters consumed.
10068
10377
  */
10069
10378
  end() {
10070
- var _a2;
10379
+ var _a3;
10071
10380
  switch (this.state) {
10072
10381
  case EntityDecoderState.NamedEntity: {
10073
10382
  return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
@@ -10080,7 +10389,7 @@ var EntityDecoder = class {
10080
10389
  return this.emitNumericEntity(0, 3);
10081
10390
  }
10082
10391
  case EntityDecoderState.NumericStart: {
10083
- (_a2 = this.errors) === null || _a2 === void 0 ? void 0 : _a2.absenceOfDigitsInNumericCharacterReference(this.consumed);
10392
+ (_a3 = this.errors) === null || _a3 === void 0 ? void 0 : _a3.absenceOfDigitsInNumericCharacterReference(this.consumed);
10084
10393
  return 0;
10085
10394
  }
10086
10395
  case EntityDecoderState.EntityStart: {
@@ -10561,8 +10870,8 @@ var TAG_NAME_TO_ID = /* @__PURE__ */ new Map([
10561
10870
  [TAG_NAMES.XMP, TAG_ID.XMP]
10562
10871
  ]);
10563
10872
  function getTagID(tagName) {
10564
- var _a2;
10565
- return (_a2 = TAG_NAME_TO_ID.get(tagName)) !== null && _a2 !== void 0 ? _a2 : TAG_ID.UNKNOWN;
10873
+ var _a3;
10874
+ return (_a3 = TAG_NAME_TO_ID.get(tagName)) !== null && _a3 !== void 0 ? _a3 : TAG_ID.UNKNOWN;
10566
10875
  }
10567
10876
  var $ = TAG_ID;
10568
10877
  var SPECIAL_ELEMENTS = {
@@ -10829,8 +11138,8 @@ var Tokenizer = class {
10829
11138
  }
10830
11139
  //Errors
10831
11140
  _err(code, cpOffset = 0) {
10832
- var _a2, _b;
10833
- (_b = (_a2 = this.handler).onParseError) === null || _b === void 0 ? void 0 : _b.call(_a2, this.preprocessor.getError(code, cpOffset));
11141
+ var _a3, _b;
11142
+ (_b = (_a3 = this.handler).onParseError) === null || _b === void 0 ? void 0 : _b.call(_a3, this.preprocessor.getError(code, cpOffset));
10834
11143
  }
10835
11144
  // NOTE: `offset` may never run across line boundaries.
10836
11145
  getCurrentLocation(offset) {
@@ -10972,13 +11281,13 @@ var Tokenizer = class {
10972
11281
  this.currentLocation = this.getCurrentLocation(0);
10973
11282
  }
10974
11283
  _leaveAttrName() {
10975
- var _a2;
11284
+ var _a3;
10976
11285
  var _b;
10977
11286
  const token = this.currentToken;
10978
11287
  if (getTokenAttr(token, this.currentAttr.name) === null) {
10979
11288
  token.attrs.push(this.currentAttr);
10980
11289
  if (token.location && this.currentLocation) {
10981
- const attrLocations = (_a2 = (_b = token.location).attrs) !== null && _a2 !== void 0 ? _a2 : _b.attrs = /* @__PURE__ */ Object.create(null);
11290
+ const attrLocations = (_a3 = (_b = token.location).attrs) !== null && _a3 !== void 0 ? _a3 : _b.attrs = /* @__PURE__ */ Object.create(null);
10982
11291
  attrLocations[this.currentAttr.name] = this.currentLocation;
10983
11292
  this._leaveAttrValue();
10984
11293
  }
@@ -14326,10 +14635,10 @@ var Parser = class {
14326
14635
  //Errors
14327
14636
  /** @internal */
14328
14637
  _err(token, code, beforeToken) {
14329
- var _a2;
14638
+ var _a3;
14330
14639
  if (!this.onParseError)
14331
14640
  return;
14332
- const loc = (_a2 = token.location) !== null && _a2 !== void 0 ? _a2 : BASE_LOC;
14641
+ const loc = (_a3 = token.location) !== null && _a3 !== void 0 ? _a3 : BASE_LOC;
14333
14642
  const err2 = {
14334
14643
  code,
14335
14644
  startLine: loc.startLine,
@@ -14344,18 +14653,18 @@ var Parser = class {
14344
14653
  //Stack events
14345
14654
  /** @internal */
14346
14655
  onItemPush(node, tid, isTop) {
14347
- var _a2, _b;
14348
- (_b = (_a2 = this.treeAdapter).onItemPush) === null || _b === void 0 ? void 0 : _b.call(_a2, node);
14656
+ var _a3, _b;
14657
+ (_b = (_a3 = this.treeAdapter).onItemPush) === null || _b === void 0 ? void 0 : _b.call(_a3, node);
14349
14658
  if (isTop && this.openElements.stackTop > 0)
14350
14659
  this._setContextModes(node, tid);
14351
14660
  }
14352
14661
  /** @internal */
14353
14662
  onItemPop(node, isTop) {
14354
- var _a2, _b;
14663
+ var _a3, _b;
14355
14664
  if (this.options.sourceCodeLocationInfo) {
14356
14665
  this._setEndLocation(node, this.currentToken);
14357
14666
  }
14358
- (_b = (_a2 = this.treeAdapter).onItemPop) === null || _b === void 0 ? void 0 : _b.call(_a2, node, this.openElements.current);
14667
+ (_b = (_a3 = this.treeAdapter).onItemPop) === null || _b === void 0 ? void 0 : _b.call(_a3, node, this.openElements.current);
14359
14668
  if (isTop) {
14360
14669
  let current;
14361
14670
  let currentTagId;
@@ -16429,9 +16738,9 @@ function eofInBody(p, token) {
16429
16738
  }
16430
16739
  }
16431
16740
  function endTagInText(p, token) {
16432
- var _a2;
16741
+ var _a3;
16433
16742
  if (token.tagID === TAG_ID.SCRIPT) {
16434
- (_a2 = p.scriptHandler) === null || _a2 === void 0 ? void 0 : _a2.call(p, p.openElements.current);
16743
+ (_a3 = p.scriptHandler) === null || _a3 === void 0 ? void 0 : _a3.call(p, p.openElements.current);
16435
16744
  }
16436
16745
  p.openElements.pop();
16437
16746
  p.insertionMode = p.originalInsertionMode;
@@ -17093,7 +17402,7 @@ function startTagAfterBody(p, token) {
17093
17402
  }
17094
17403
  }
17095
17404
  function endTagAfterBody(p, token) {
17096
- var _a2;
17405
+ var _a3;
17097
17406
  if (token.tagID === TAG_ID.HTML) {
17098
17407
  if (!p.fragmentContext) {
17099
17408
  p.insertionMode = InsertionMode.AFTER_AFTER_BODY;
@@ -17101,7 +17410,7 @@ function endTagAfterBody(p, token) {
17101
17410
  if (p.options.sourceCodeLocationInfo && p.openElements.tagIDs[0] === TAG_ID.HTML) {
17102
17411
  p._setEndLocation(p.openElements.items[0], token);
17103
17412
  const bodyElement = p.openElements.items[1];
17104
- if (bodyElement && !((_a2 = p.treeAdapter.getNodeSourceCodeLocation(bodyElement)) === null || _a2 === void 0 ? void 0 : _a2.endTag)) {
17413
+ if (bodyElement && !((_a3 = p.treeAdapter.getNodeSourceCodeLocation(bodyElement)) === null || _a3 === void 0 ? void 0 : _a3.endTag)) {
17105
17414
  p._setEndLocation(bodyElement, token);
17106
17415
  }
17107
17416
  }
@@ -18965,7 +19274,7 @@ function serializeNodeToHtml(elm, serializationOptions = {}) {
18965
19274
  }
18966
19275
  var shadowRootTag = "mock:shadow-root";
18967
19276
  function* streamToHtml(node, opts, output) {
18968
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
19277
+ var _a3, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
18969
19278
  const isShadowRoot = node.nodeType === 11 /* DOCUMENT_FRAGMENT_NODE */;
18970
19279
  if (node.nodeType === 1 /* ELEMENT_NODE */ || isShadowRoot) {
18971
19280
  const tagName = isShadowRoot ? shadowRootTag : getTagName(node);
@@ -18974,7 +19283,7 @@ function* streamToHtml(node, opts, output) {
18974
19283
  }
18975
19284
  const ignoreTag = opts.excludeTags != null && opts.excludeTags.includes(tagName);
18976
19285
  if (ignoreTag === false) {
18977
- const isWithinWhitespaceSensitiveNode = opts.newLines || ((_a2 = opts.indentSpaces) != null ? _a2 : 0) > 0 ? isWithinWhitespaceSensitive(node) : false;
19286
+ const isWithinWhitespaceSensitiveNode = opts.newLines || ((_a3 = opts.indentSpaces) != null ? _a3 : 0) > 0 ? isWithinWhitespaceSensitive(node) : false;
18978
19287
  if (opts.newLines && !isWithinWhitespaceSensitiveNode) {
18979
19288
  yield "\n";
18980
19289
  output.currentLineWidth = 0;
@@ -19493,9 +19802,7 @@ var MockNode2 = class {
19493
19802
  const firstChild = this.firstChild;
19494
19803
  items.forEach((item) => {
19495
19804
  const isNode = typeof item === "object" && item !== null && "nodeType" in item;
19496
- if (firstChild) {
19497
- this.insertBefore(isNode ? item : this.ownerDocument.createTextNode(String(item)), firstChild);
19498
- }
19805
+ this.insertBefore(isNode ? item : this.ownerDocument.createTextNode(String(item)), firstChild);
19499
19806
  });
19500
19807
  }
19501
19808
  cloneNode(deep) {
@@ -19544,8 +19851,8 @@ var MockNode2 = class {
19544
19851
  return null;
19545
19852
  }
19546
19853
  get nodeValue() {
19547
- var _a2;
19548
- return (_a2 = this._nodeValue) != null ? _a2 : "";
19854
+ var _a3;
19855
+ return (_a3 = this._nodeValue) != null ? _a3 : "";
19549
19856
  }
19550
19857
  set nodeValue(value) {
19551
19858
  this._nodeValue = value;
@@ -19605,8 +19912,8 @@ var MockNode2 = class {
19605
19912
  return null;
19606
19913
  }
19607
19914
  get textContent() {
19608
- var _a2;
19609
- return (_a2 = this._nodeValue) != null ? _a2 : "";
19915
+ var _a3;
19916
+ return (_a3 = this._nodeValue) != null ? _a3 : "";
19610
19917
  }
19611
19918
  set textContent(value) {
19612
19919
  this._nodeValue = String(value);
@@ -19665,9 +19972,9 @@ var MockElement = class extends MockNode2 {
19665
19972
  addEventListener(this, type, handler);
19666
19973
  }
19667
19974
  attachShadow(_opts) {
19668
- var _a2;
19975
+ var _a3;
19669
19976
  const shadowRoot = this.ownerDocument.createDocumentFragment();
19670
- shadowRoot.delegatesFocus = (_a2 = _opts.delegatesFocus) != null ? _a2 : false;
19977
+ shadowRoot.delegatesFocus = (_a3 = _opts.delegatesFocus) != null ? _a3 : false;
19671
19978
  this.shadowRoot = shadowRoot;
19672
19979
  return shadowRoot;
19673
19980
  }
@@ -19843,8 +20150,8 @@ var MockElement = class extends MockNode2 {
19843
20150
  });
19844
20151
  }
19845
20152
  set innerHTML(html) {
19846
- var _a2;
19847
- if (NON_ESCAPABLE_CONTENT.has((_a2 = this.nodeName) != null ? _a2 : "") === true) {
20153
+ var _a3;
20154
+ if (NON_ESCAPABLE_CONTENT.has((_a3 = this.nodeName) != null ? _a3 : "") === true) {
19848
20155
  setTextContent(this, html);
19849
20156
  } else {
19850
20157
  for (let i = this.childNodes.length - 1; i >= 0; i--) {
@@ -20087,8 +20394,8 @@ var MockElement = class extends MockNode2 {
20087
20394
  this.setAttributeNS(null, "tabindex", value);
20088
20395
  }
20089
20396
  get tagName() {
20090
- var _a2;
20091
- return (_a2 = this.nodeName) != null ? _a2 : "";
20397
+ var _a3;
20398
+ return (_a3 = this.nodeName) != null ? _a3 : "";
20092
20399
  }
20093
20400
  set tagName(value) {
20094
20401
  this.nodeName = value;
@@ -20310,11 +20617,11 @@ function getElementsByClassName(elm, classNames, foundElms) {
20310
20617
  }
20311
20618
  }
20312
20619
  function getElementsByTagName(elm, tagName, foundElms) {
20313
- var _a2;
20620
+ var _a3;
20314
20621
  const children = elm.children;
20315
20622
  for (let i = 0, ii = children.length; i < ii; i++) {
20316
20623
  const childElm = children[i];
20317
- if (tagName === "*" || ((_a2 = childElm.nodeName) != null ? _a2 : "").toLowerCase() === tagName) {
20624
+ if (tagName === "*" || ((_a3 = childElm.nodeName) != null ? _a3 : "").toLowerCase() === tagName) {
20318
20625
  foundElms.push(childElm);
20319
20626
  }
20320
20627
  getElementsByTagName(childElm, tagName, foundElms);
@@ -20351,8 +20658,8 @@ var MockHTMLElement = class extends MockElement {
20351
20658
  super(ownerDocument, typeof nodeName === "string" ? nodeName.toUpperCase() : null);
20352
20659
  }
20353
20660
  get tagName() {
20354
- var _a2;
20355
- return (_a2 = this.nodeName) != null ? _a2 : "";
20661
+ var _a3;
20662
+ return (_a3 = this.nodeName) != null ? _a3 : "";
20356
20663
  }
20357
20664
  set tagName(value) {
20358
20665
  this.nodeName = value;
@@ -20810,10 +21117,10 @@ var MockLabelElement = class extends MockHTMLElement {
20810
21117
  this.setAttributeNS(null, "for", value);
20811
21118
  }
20812
21119
  get control() {
20813
- var _a2, _b;
21120
+ var _a3, _b;
20814
21121
  const forAttr = this.htmlFor;
20815
21122
  if (forAttr) {
20816
- return (_b = (_a2 = this.ownerDocument) == null ? void 0 : _a2.getElementById(forAttr)) != null ? _b : null;
21123
+ return (_b = (_a3 = this.ownerDocument) == null ? void 0 : _a3.getElementById(forAttr)) != null ? _b : null;
20817
21124
  }
20818
21125
  const labelableSelector = 'button, input:not([type="hidden"]), meter, output, progress, select, textarea';
20819
21126
  return this.querySelector(labelableSelector);
@@ -22590,11 +22897,14 @@ function resetWindow(win2) {
22590
22897
  } catch (e) {
22591
22898
  }
22592
22899
  }
22593
- win2.fetch = null;
22594
- win2.Headers = null;
22595
- win2.Request = null;
22596
- win2.Response = null;
22597
- win2.FetchError = null;
22900
+ const windowDestroyed = () => {
22901
+ throw new Error("MockWindow was already destroyed");
22902
+ };
22903
+ win2.fetch = windowDestroyed;
22904
+ win2.Headers = windowDestroyed;
22905
+ win2.Request = windowDestroyed;
22906
+ win2.Response = windowDestroyed;
22907
+ win2.FetchError = windowDestroyed;
22598
22908
  }
22599
22909
  }
22600
22910
  function resetWindowDimensions(win2) {
@@ -23321,18 +23631,34 @@ var RemoteValue = class _RemoteValue {
23321
23631
  };
23322
23632
 
23323
23633
  // src/utils/serialize.ts
23634
+ function encodeBase64Unicode(str) {
23635
+ const utf8Bytes = new TextEncoder().encode(str);
23636
+ let binary = "";
23637
+ for (let i = 0; i < utf8Bytes.length; i++) {
23638
+ binary += String.fromCharCode(utf8Bytes[i]);
23639
+ }
23640
+ return btoa(binary);
23641
+ }
23642
+ function decodeBase64Unicode(base64) {
23643
+ const binary = atob(base64);
23644
+ const bytes = new Uint8Array(binary.length);
23645
+ for (let i = 0; i < binary.length; i++) {
23646
+ bytes[i] = binary.charCodeAt(i);
23647
+ }
23648
+ return new TextDecoder().decode(bytes);
23649
+ }
23324
23650
  function serializeProperty(value) {
23325
23651
  if (["string", "boolean", "undefined"].includes(typeof value) || typeof value === "number" && value !== Infinity && value !== -Infinity && !isNaN(value)) {
23326
23652
  return value;
23327
23653
  }
23328
23654
  const arg = LocalValue.getArgument(value);
23329
- return SERIALIZED_PREFIX + btoa(JSON.stringify(arg));
23655
+ return SERIALIZED_PREFIX + encodeBase64Unicode(JSON.stringify(arg));
23330
23656
  }
23331
23657
  function deserializeProperty(value) {
23332
23658
  if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
23333
23659
  return value;
23334
23660
  }
23335
- return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
23661
+ return RemoteValue.fromLocalValue(JSON.parse(decodeBase64Unicode(value.slice(SERIALIZED_PREFIX.length))));
23336
23662
  }
23337
23663
  var CAPTURE_EVENT_SUFFIX = "Capture";
23338
23664
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
@@ -23526,8 +23852,35 @@ var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
23526
23852
  };
23527
23853
 
23528
23854
  // node_modules/minimatch/dist/esm/ast.js
23855
+ var _a2;
23529
23856
  var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
23530
23857
  var isExtglobType = (c) => types.has(c);
23858
+ var isExtglobAST = (c) => isExtglobType(c.type);
23859
+ var adoptionMap = /* @__PURE__ */ new Map([
23860
+ ["!", ["@"]],
23861
+ ["?", ["?", "@"]],
23862
+ ["@", ["@"]],
23863
+ ["*", ["*", "+", "?", "@"]],
23864
+ ["+", ["+", "@"]]
23865
+ ]);
23866
+ var adoptionWithSpaceMap = /* @__PURE__ */ new Map([
23867
+ ["!", ["?"]],
23868
+ ["@", ["?"]],
23869
+ ["+", ["?", "*"]]
23870
+ ]);
23871
+ var adoptionAnyMap = /* @__PURE__ */ new Map([
23872
+ ["!", ["?", "@"]],
23873
+ ["?", ["?", "@"]],
23874
+ ["@", ["?", "@"]],
23875
+ ["*", ["*", "+", "?", "@"]],
23876
+ ["+", ["+", "@", "?", "*"]]
23877
+ ]);
23878
+ var usurpMap = /* @__PURE__ */ new Map([
23879
+ ["!", /* @__PURE__ */ new Map([["!", "@"]])],
23880
+ ["?", /* @__PURE__ */ new Map([["*", "*"], ["+", "*"]])],
23881
+ ["@", /* @__PURE__ */ new Map([["!", "!"], ["?", "?"], ["@", "@"], ["*", "*"], ["+", "+"]])],
23882
+ ["+", /* @__PURE__ */ new Map([["?", "*"], ["*", "*"]])]
23883
+ ]);
23531
23884
  var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
23532
23885
  var startNoDot = "(?!\\.)";
23533
23886
  var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
@@ -23537,8 +23890,8 @@ var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
23537
23890
  var qmark = "[^/]";
23538
23891
  var star = qmark + "*?";
23539
23892
  var starNoEmpty = qmark + "+?";
23540
- var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
23541
- var _AST = class _AST {
23893
+ var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, canAdoptWithSpace_fn, canAdopt_fn, canAdoptType_fn, adoptWithSpace_fn, adopt_fn, canUsurpType_fn, canUsurp_fn, usurp_fn, flatten_fn, partsToRegExp_fn, parseGlob_fn;
23894
+ var AST = class {
23542
23895
  constructor(type, parent, options = {}) {
23543
23896
  __privateAdd(this, _AST_instances);
23544
23897
  __publicField(this, "type");
@@ -23591,44 +23944,44 @@ var _AST = class _AST {
23591
23944
  for (const p of parts) {
23592
23945
  if (p === "")
23593
23946
  continue;
23594
- if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
23947
+ if (typeof p !== "string" && !(p instanceof _a2 && __privateGet(p, _parent) === this)) {
23595
23948
  throw new Error("invalid part: " + p);
23596
23949
  }
23597
23950
  __privateGet(this, _parts).push(p);
23598
23951
  }
23599
23952
  }
23600
23953
  toJSON() {
23601
- var _a2;
23954
+ var _a3;
23602
23955
  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())];
23603
23956
  if (this.isStart() && !this.type)
23604
23957
  ret.unshift([]);
23605
- if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.type) === "!")) {
23958
+ if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a3 = __privateGet(this, _parent)) == null ? void 0 : _a3.type) === "!")) {
23606
23959
  ret.push({});
23607
23960
  }
23608
23961
  return ret;
23609
23962
  }
23610
23963
  isStart() {
23611
- var _a2;
23964
+ var _a3;
23612
23965
  if (__privateGet(this, _root) === this)
23613
23966
  return true;
23614
- if (!((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.isStart()))
23967
+ if (!((_a3 = __privateGet(this, _parent)) == null ? void 0 : _a3.isStart()))
23615
23968
  return false;
23616
23969
  if (__privateGet(this, _parentIndex) === 0)
23617
23970
  return true;
23618
23971
  const p = __privateGet(this, _parent);
23619
23972
  for (let i = 0; i < __privateGet(this, _parentIndex); i++) {
23620
23973
  const pp = __privateGet(p, _parts)[i];
23621
- if (!(pp instanceof _AST && pp.type === "!")) {
23974
+ if (!(pp instanceof _a2 && pp.type === "!")) {
23622
23975
  return false;
23623
23976
  }
23624
23977
  }
23625
23978
  return true;
23626
23979
  }
23627
23980
  isEnd() {
23628
- var _a2, _b, _c;
23981
+ var _a3, _b, _c;
23629
23982
  if (__privateGet(this, _root) === this)
23630
23983
  return true;
23631
- if (((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.type) === "!")
23984
+ if (((_a3 = __privateGet(this, _parent)) == null ? void 0 : _a3.type) === "!")
23632
23985
  return true;
23633
23986
  if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
23634
23987
  return false;
@@ -23644,16 +23997,16 @@ var _AST = class _AST {
23644
23997
  this.push(part.clone(this));
23645
23998
  }
23646
23999
  clone(parent) {
23647
- const c = new _AST(this.type, parent);
24000
+ const c = new _a2(this.type, parent);
23648
24001
  for (const p of __privateGet(this, _parts)) {
23649
24002
  c.copyIn(p);
23650
24003
  }
23651
24004
  return c;
23652
24005
  }
23653
24006
  static fromGlob(pattern, options = {}) {
23654
- var _a2;
23655
- const ast = new _AST(null, void 0, options);
23656
- __privateMethod(_a2 = _AST, _AST_static, parseAST_fn).call(_a2, pattern, ast, 0, options);
24007
+ var _a3;
24008
+ const ast = new _a2(null, void 0, options);
24009
+ __privateMethod(_a3 = _a2, _AST_static, parseAST_fn).call(_a3, pattern, ast, 0, options, 0);
23657
24010
  return ast;
23658
24011
  }
23659
24012
  // returns the regular expression if there's magic, or the unescaped
@@ -23746,15 +24099,17 @@ var _AST = class _AST {
23746
24099
  // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
23747
24100
  // or start or whatever) and prepend ^ or / at the Regexp construction.
23748
24101
  toRegExpSource(allowDot) {
23749
- var _a2;
24102
+ var _a3;
23750
24103
  const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
23751
- if (__privateGet(this, _root) === this)
24104
+ if (__privateGet(this, _root) === this) {
24105
+ __privateMethod(this, _AST_instances, flatten_fn).call(this);
23752
24106
  __privateMethod(this, _AST_instances, fillNegs_fn).call(this);
23753
- if (!this.type) {
24107
+ }
24108
+ if (!isExtglobAST(this)) {
23754
24109
  const noEmpty = this.isStart() && this.isEnd();
23755
24110
  const src = __privateGet(this, _parts).map((p) => {
23756
- var _a3;
23757
- const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a3 = _AST, _AST_static, parseGlob_fn).call(_a3, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
24111
+ var _a4;
24112
+ const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a4 = _a2, _AST_static, parseGlob_fn).call(_a4, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
23758
24113
  __privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
23759
24114
  __privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
23760
24115
  return re;
@@ -23777,7 +24132,7 @@ var _AST = class _AST {
23777
24132
  }
23778
24133
  }
23779
24134
  let end = "";
23780
- if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.type) === "!") {
24135
+ if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a3 = __privateGet(this, _parent)) == null ? void 0 : _a3.type) === "!") {
23781
24136
  end = "(?:$|\\/)";
23782
24137
  }
23783
24138
  const final2 = start2 + src + end;
@@ -23793,9 +24148,10 @@ var _AST = class _AST {
23793
24148
  let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
23794
24149
  if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
23795
24150
  const s = this.toString();
23796
- __privateSet(this, _parts, [s]);
23797
- this.type = null;
23798
- __privateSet(this, _hasMagic, void 0);
24151
+ const me = this;
24152
+ __privateSet(me, _parts, [s]);
24153
+ me.type = null;
24154
+ __privateSet(me, _hasMagic, void 0);
23799
24155
  return [s, unescape(this.toString()), false, false];
23800
24156
  }
23801
24157
  let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
@@ -23864,8 +24220,9 @@ fillNegs_fn = function() {
23864
24220
  return this;
23865
24221
  };
23866
24222
  _AST_static = new WeakSet();
23867
- parseAST_fn = function(str, ast, pos, opt) {
23868
- var _a2, _b;
24223
+ parseAST_fn = function(str, ast, pos, opt, extDepth) {
24224
+ var _a3, _b, _c, _d, _e;
24225
+ const maxDepth = (_a3 = opt.maxExtglobRecursion) != null ? _a3 : 2;
23869
24226
  let escaping = false;
23870
24227
  let inBrace = false;
23871
24228
  let braceStart = -1;
@@ -23897,11 +24254,12 @@ parseAST_fn = function(str, ast, pos, opt) {
23897
24254
  acc2 += c;
23898
24255
  continue;
23899
24256
  }
23900
- if (!opt.noext && isExtglobType(c) && str.charAt(i2) === "(") {
24257
+ const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i2) === "(" && extDepth <= maxDepth;
24258
+ if (doRecurse) {
23901
24259
  ast.push(acc2);
23902
24260
  acc2 = "";
23903
- const ext2 = new _AST(c, ast);
23904
- i2 = __privateMethod(_a2 = _AST, _AST_static, parseAST_fn).call(_a2, str, ext2, i2, opt);
24261
+ const ext2 = new _a2(c, ast);
24262
+ i2 = __privateMethod(_b = _a2, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt, extDepth + 1);
23905
24263
  ast.push(ext2);
23906
24264
  continue;
23907
24265
  }
@@ -23911,7 +24269,7 @@ parseAST_fn = function(str, ast, pos, opt) {
23911
24269
  return i2;
23912
24270
  }
23913
24271
  let i = pos + 1;
23914
- let part = new _AST(null, ast);
24272
+ let part = new _a2(null, ast);
23915
24273
  const parts = [];
23916
24274
  let acc = "";
23917
24275
  while (i < str.length) {
@@ -23938,19 +24296,22 @@ parseAST_fn = function(str, ast, pos, opt) {
23938
24296
  acc += c;
23939
24297
  continue;
23940
24298
  }
23941
- if (isExtglobType(c) && str.charAt(i) === "(") {
24299
+ const doRecurse = isExtglobType(c) && str.charAt(i) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
24300
+ (extDepth <= maxDepth || ast && __privateMethod(_c = ast, _AST_instances, canAdoptType_fn).call(_c, c));
24301
+ if (doRecurse) {
24302
+ const depthAdd = ast && __privateMethod(_d = ast, _AST_instances, canAdoptType_fn).call(_d, c) ? 0 : 1;
23942
24303
  part.push(acc);
23943
24304
  acc = "";
23944
- const ext2 = new _AST(c, part);
24305
+ const ext2 = new _a2(c, part);
23945
24306
  part.push(ext2);
23946
- i = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i, opt);
24307
+ i = __privateMethod(_e = _a2, _AST_static, parseAST_fn).call(_e, str, ext2, i, opt, extDepth + depthAdd);
23947
24308
  continue;
23948
24309
  }
23949
24310
  if (c === "|") {
23950
24311
  part.push(acc);
23951
24312
  acc = "";
23952
24313
  parts.push(part);
23953
- part = new _AST(null, ast);
24314
+ part = new _a2(null, ast);
23954
24315
  continue;
23955
24316
  }
23956
24317
  if (c === ")") {
@@ -23969,6 +24330,100 @@ parseAST_fn = function(str, ast, pos, opt) {
23969
24330
  __privateSet(ast, _parts, [str.substring(pos - 1)]);
23970
24331
  return i;
23971
24332
  };
24333
+ canAdoptWithSpace_fn = function(child) {
24334
+ return __privateMethod(this, _AST_instances, canAdopt_fn).call(this, child, adoptionWithSpaceMap);
24335
+ };
24336
+ canAdopt_fn = function(child, map2 = adoptionMap) {
24337
+ if (!child || typeof child !== "object" || child.type !== null || __privateGet(child, _parts).length !== 1 || this.type === null) {
24338
+ return false;
24339
+ }
24340
+ const gc = __privateGet(child, _parts)[0];
24341
+ if (!gc || typeof gc !== "object" || gc.type === null) {
24342
+ return false;
24343
+ }
24344
+ return __privateMethod(this, _AST_instances, canAdoptType_fn).call(this, gc.type, map2);
24345
+ };
24346
+ canAdoptType_fn = function(c, map2 = adoptionAnyMap) {
24347
+ var _a3;
24348
+ return !!((_a3 = map2.get(this.type)) == null ? void 0 : _a3.includes(c));
24349
+ };
24350
+ adoptWithSpace_fn = function(child, index) {
24351
+ const gc = __privateGet(child, _parts)[0];
24352
+ const blank = new _a2(null, gc, this.options);
24353
+ __privateGet(blank, _parts).push("");
24354
+ gc.push(blank);
24355
+ __privateMethod(this, _AST_instances, adopt_fn).call(this, child, index);
24356
+ };
24357
+ adopt_fn = function(child, index) {
24358
+ const gc = __privateGet(child, _parts)[0];
24359
+ __privateGet(this, _parts).splice(index, 1, ...__privateGet(gc, _parts));
24360
+ for (const p of __privateGet(gc, _parts)) {
24361
+ if (typeof p === "object")
24362
+ __privateSet(p, _parent, this);
24363
+ }
24364
+ __privateSet(this, _toString, void 0);
24365
+ };
24366
+ canUsurpType_fn = function(c) {
24367
+ const m = usurpMap.get(this.type);
24368
+ return !!(m == null ? void 0 : m.has(c));
24369
+ };
24370
+ canUsurp_fn = function(child) {
24371
+ if (!child || typeof child !== "object" || child.type !== null || __privateGet(child, _parts).length !== 1 || this.type === null || __privateGet(this, _parts).length !== 1) {
24372
+ return false;
24373
+ }
24374
+ const gc = __privateGet(child, _parts)[0];
24375
+ if (!gc || typeof gc !== "object" || gc.type === null) {
24376
+ return false;
24377
+ }
24378
+ return __privateMethod(this, _AST_instances, canUsurpType_fn).call(this, gc.type);
24379
+ };
24380
+ usurp_fn = function(child) {
24381
+ const m = usurpMap.get(this.type);
24382
+ const gc = __privateGet(child, _parts)[0];
24383
+ const nt = m == null ? void 0 : m.get(gc.type);
24384
+ if (!nt)
24385
+ return false;
24386
+ __privateSet(this, _parts, __privateGet(gc, _parts));
24387
+ for (const p of __privateGet(this, _parts)) {
24388
+ if (typeof p === "object")
24389
+ __privateSet(p, _parent, this);
24390
+ }
24391
+ this.type = nt;
24392
+ __privateSet(this, _toString, void 0);
24393
+ __privateSet(this, _emptyExt, false);
24394
+ };
24395
+ flatten_fn = function() {
24396
+ var _a3, _b;
24397
+ if (!isExtglobAST(this)) {
24398
+ for (const p of __privateGet(this, _parts)) {
24399
+ if (typeof p === "object")
24400
+ __privateMethod(_a3 = p, _AST_instances, flatten_fn).call(_a3);
24401
+ }
24402
+ } else {
24403
+ let iterations = 0;
24404
+ let done = false;
24405
+ do {
24406
+ done = true;
24407
+ for (let i = 0; i < __privateGet(this, _parts).length; i++) {
24408
+ const c = __privateGet(this, _parts)[i];
24409
+ if (typeof c === "object") {
24410
+ __privateMethod(_b = c, _AST_instances, flatten_fn).call(_b);
24411
+ if (__privateMethod(this, _AST_instances, canAdopt_fn).call(this, c)) {
24412
+ done = false;
24413
+ __privateMethod(this, _AST_instances, adopt_fn).call(this, c, i);
24414
+ } else if (__privateMethod(this, _AST_instances, canAdoptWithSpace_fn).call(this, c)) {
24415
+ done = false;
24416
+ __privateMethod(this, _AST_instances, adoptWithSpace_fn).call(this, c, i);
24417
+ } else if (__privateMethod(this, _AST_instances, canUsurp_fn).call(this, c)) {
24418
+ done = false;
24419
+ __privateMethod(this, _AST_instances, usurp_fn).call(this, c);
24420
+ }
24421
+ }
24422
+ }
24423
+ } while (!done && ++iterations < 10);
24424
+ }
24425
+ __privateSet(this, _toString, void 0);
24426
+ };
23972
24427
  partsToRegExp_fn = function(dot) {
23973
24428
  return __privateGet(this, _parts).map((p) => {
23974
24429
  if (typeof p === "string") {
@@ -23983,11 +24438,13 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
23983
24438
  let escaping = false;
23984
24439
  let re = "";
23985
24440
  let uflag = false;
24441
+ let inStar = false;
23986
24442
  for (let i = 0; i < glob.length; i++) {
23987
24443
  const c = glob.charAt(i);
23988
24444
  if (escaping) {
23989
24445
  escaping = false;
23990
24446
  re += (reSpecials.has(c) ? "\\" : "") + c;
24447
+ inStar = false;
23991
24448
  continue;
23992
24449
  }
23993
24450
  if (c === "\\") {
@@ -24005,16 +24462,19 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
24005
24462
  uflag = uflag || needUflag;
24006
24463
  i += consumed - 1;
24007
24464
  hasMagic = hasMagic || magic;
24465
+ inStar = false;
24008
24466
  continue;
24009
24467
  }
24010
24468
  }
24011
24469
  if (c === "*") {
24012
- if (noEmpty && glob === "*")
24013
- re += starNoEmpty;
24014
- else
24015
- re += star;
24470
+ if (inStar)
24471
+ continue;
24472
+ inStar = true;
24473
+ re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star;
24016
24474
  hasMagic = true;
24017
24475
  continue;
24476
+ } else {
24477
+ inStar = false;
24018
24478
  }
24019
24479
  if (c === "?") {
24020
24480
  re += qmark;
@@ -24025,8 +24485,8 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
24025
24485
  }
24026
24486
  return [re, unescape(glob), !!hasMagic, uflag];
24027
24487
  };
24028
- __privateAdd(_AST, _AST_static);
24029
- var AST = _AST;
24488
+ __privateAdd(AST, _AST_static);
24489
+ _a2 = AST;
24030
24490
 
24031
24491
  // node_modules/minimatch/dist/esm/escape.js
24032
24492
  var escape = (s, { windowsPathsNoEscape = false } = {}) => {
@@ -24165,28 +24625,33 @@ var match = (list, pattern, options = {}) => {
24165
24625
  minimatch.match = match;
24166
24626
  var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
24167
24627
  var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
24628
+ var _Minimatch_instances, matchGlobstar_fn, matchGlobStarBodySections_fn, matchOne_fn;
24168
24629
  var Minimatch = class {
24169
- options;
24170
- set;
24171
- pattern;
24172
- windowsPathsNoEscape;
24173
- nonegate;
24174
- negate;
24175
- comment;
24176
- empty;
24177
- preserveMultipleSlashes;
24178
- partial;
24179
- globSet;
24180
- globParts;
24181
- nocase;
24182
- isWindows;
24183
- platform;
24184
- windowsNoMagicRoot;
24185
- regexp;
24186
24630
  constructor(pattern, options = {}) {
24631
+ __privateAdd(this, _Minimatch_instances);
24632
+ __publicField(this, "options");
24633
+ __publicField(this, "set");
24634
+ __publicField(this, "pattern");
24635
+ __publicField(this, "windowsPathsNoEscape");
24636
+ __publicField(this, "nonegate");
24637
+ __publicField(this, "negate");
24638
+ __publicField(this, "comment");
24639
+ __publicField(this, "empty");
24640
+ __publicField(this, "preserveMultipleSlashes");
24641
+ __publicField(this, "partial");
24642
+ __publicField(this, "globSet");
24643
+ __publicField(this, "globParts");
24644
+ __publicField(this, "nocase");
24645
+ __publicField(this, "isWindows");
24646
+ __publicField(this, "platform");
24647
+ __publicField(this, "windowsNoMagicRoot");
24648
+ __publicField(this, "maxGlobstarRecursion");
24649
+ __publicField(this, "regexp");
24650
+ var _a3;
24187
24651
  assertValidPattern(pattern);
24188
24652
  options = options || {};
24189
24653
  this.options = options;
24654
+ this.maxGlobstarRecursion = (_a3 = options.maxGlobstarRecursion) != null ? _a3 : 200;
24190
24655
  this.pattern = pattern;
24191
24656
  this.platform = options.platform || defaultPlatform;
24192
24657
  this.isWindows = this.platform === "win32";
@@ -24454,10 +24919,11 @@ var Minimatch = class {
24454
24919
  for (let i = 0; i < globParts.length - 1; i++) {
24455
24920
  for (let j = i + 1; j < globParts.length; j++) {
24456
24921
  const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
24457
- if (!matched)
24458
- continue;
24459
- globParts[i] = matched;
24460
- globParts[j] = [];
24922
+ if (matched) {
24923
+ globParts[i] = [];
24924
+ globParts[j] = matched;
24925
+ break;
24926
+ }
24461
24927
  }
24462
24928
  }
24463
24929
  return globParts.filter((gs) => gs.length);
@@ -24518,7 +24984,8 @@ var Minimatch = class {
24518
24984
  // out of pattern, then that's fine, as long as all
24519
24985
  // the parts match.
24520
24986
  matchOne(file, pattern, partial = false) {
24521
- const options = this.options;
24987
+ let fileStartIndex = 0;
24988
+ let patternStartIndex = 0;
24522
24989
  if (this.isWindows) {
24523
24990
  const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
24524
24991
  const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
@@ -24527,14 +24994,14 @@ var Minimatch = class {
24527
24994
  const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
24528
24995
  const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
24529
24996
  if (typeof fdi === "number" && typeof pdi === "number") {
24530
- const [fd, pd] = [file[fdi], pattern[pdi]];
24997
+ const [fd, pd] = [
24998
+ file[fdi],
24999
+ pattern[pdi]
25000
+ ];
24531
25001
  if (fd.toLowerCase() === pd.toLowerCase()) {
24532
25002
  pattern[pdi] = fd;
24533
- if (pdi > fdi) {
24534
- pattern = pattern.slice(pdi);
24535
- } else if (fdi > pdi) {
24536
- file = file.slice(fdi);
24537
- }
25003
+ patternStartIndex = pdi;
25004
+ fileStartIndex = fdi;
24538
25005
  }
24539
25006
  }
24540
25007
  }
@@ -24542,71 +25009,10 @@ var Minimatch = class {
24542
25009
  if (optimizationLevel >= 2) {
24543
25010
  file = this.levelTwoFileOptimize(file);
24544
25011
  }
24545
- this.debug("matchOne", this, { file, pattern });
24546
- this.debug("matchOne", file.length, pattern.length);
24547
- for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
24548
- this.debug("matchOne loop");
24549
- var p = pattern[pi];
24550
- var f = file[fi];
24551
- this.debug(pattern, p, f);
24552
- if (p === false) {
24553
- return false;
24554
- }
24555
- if (p === GLOBSTAR) {
24556
- this.debug("GLOBSTAR", [pattern, p, f]);
24557
- var fr = fi;
24558
- var pr = pi + 1;
24559
- if (pr === pl) {
24560
- this.debug("** at the end");
24561
- for (; fi < fl; fi++) {
24562
- if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
24563
- return false;
24564
- }
24565
- return true;
24566
- }
24567
- while (fr < fl) {
24568
- var swallowee = file[fr];
24569
- this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
24570
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
24571
- this.debug("globstar found match!", fr, fl, swallowee);
24572
- return true;
24573
- } else {
24574
- if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
24575
- this.debug("dot detected!", file, fr, pattern, pr);
24576
- break;
24577
- }
24578
- this.debug("globstar swallow a segment, and continue");
24579
- fr++;
24580
- }
24581
- }
24582
- if (partial) {
24583
- this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
24584
- if (fr === fl) {
24585
- return true;
24586
- }
24587
- }
24588
- return false;
24589
- }
24590
- let hit;
24591
- if (typeof p === "string") {
24592
- hit = f === p;
24593
- this.debug("string match", p, f, hit);
24594
- } else {
24595
- hit = p.test(f);
24596
- this.debug("pattern match", p, f, hit);
24597
- }
24598
- if (!hit)
24599
- return false;
24600
- }
24601
- if (fi === fl && pi === pl) {
24602
- return true;
24603
- } else if (fi === fl) {
24604
- return partial;
24605
- } else if (pi === pl) {
24606
- return fi === fl - 1 && file[fi] === "";
24607
- } else {
24608
- throw new Error("wtf?");
25012
+ if (pattern.includes(GLOBSTAR)) {
25013
+ return __privateMethod(this, _Minimatch_instances, matchGlobstar_fn).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
24609
25014
  }
25015
+ return __privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
24610
25016
  }
24611
25017
  braceExpand() {
24612
25018
  return braceExpand(this.pattern, this.options);
@@ -24745,6 +25151,135 @@ var Minimatch = class {
24745
25151
  return minimatch.defaults(def).Minimatch;
24746
25152
  }
24747
25153
  };
25154
+ _Minimatch_instances = new WeakSet();
25155
+ matchGlobstar_fn = function(file, pattern, partial, fileIndex, patternIndex) {
25156
+ const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
25157
+ const lastgs = pattern.lastIndexOf(GLOBSTAR);
25158
+ const [head, body, tail] = partial ? [
25159
+ pattern.slice(patternIndex, firstgs),
25160
+ pattern.slice(firstgs + 1),
25161
+ []
25162
+ ] : [
25163
+ pattern.slice(patternIndex, firstgs),
25164
+ pattern.slice(firstgs + 1, lastgs),
25165
+ pattern.slice(lastgs + 1)
25166
+ ];
25167
+ if (head.length) {
25168
+ const fileHead = file.slice(fileIndex, fileIndex + head.length);
25169
+ if (!__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, fileHead, head, partial, 0, 0))
25170
+ return false;
25171
+ fileIndex += head.length;
25172
+ }
25173
+ let fileTailMatch = 0;
25174
+ if (tail.length) {
25175
+ if (tail.length + fileIndex > file.length)
25176
+ return false;
25177
+ let tailStart = file.length - tail.length;
25178
+ if (__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, tail, partial, tailStart, 0)) {
25179
+ fileTailMatch = tail.length;
25180
+ } else {
25181
+ if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) {
25182
+ return false;
25183
+ }
25184
+ tailStart--;
25185
+ if (!__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, tail, partial, tailStart, 0))
25186
+ return false;
25187
+ fileTailMatch = tail.length + 1;
25188
+ }
25189
+ }
25190
+ if (!body.length) {
25191
+ let sawSome = !!fileTailMatch;
25192
+ for (let i2 = fileIndex; i2 < file.length - fileTailMatch; i2++) {
25193
+ const f = String(file[i2]);
25194
+ sawSome = true;
25195
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
25196
+ return false;
25197
+ }
25198
+ }
25199
+ return partial || sawSome;
25200
+ }
25201
+ const bodySegments = [[[], 0]];
25202
+ let currentBody = bodySegments[0];
25203
+ let nonGsParts = 0;
25204
+ const nonGsPartsSums = [0];
25205
+ for (const b of body) {
25206
+ if (b === GLOBSTAR) {
25207
+ nonGsPartsSums.push(nonGsParts);
25208
+ currentBody = [[], 0];
25209
+ bodySegments.push(currentBody);
25210
+ } else {
25211
+ currentBody[0].push(b);
25212
+ nonGsParts++;
25213
+ }
25214
+ }
25215
+ let i = bodySegments.length - 1;
25216
+ const fileLength = file.length - fileTailMatch;
25217
+ for (const b of bodySegments) {
25218
+ b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
25219
+ }
25220
+ return !!__privateMethod(this, _Minimatch_instances, matchGlobStarBodySections_fn).call(this, file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
25221
+ };
25222
+ matchGlobStarBodySections_fn = function(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
25223
+ const bs = bodySegments[bodyIndex];
25224
+ if (!bs) {
25225
+ for (let i = fileIndex; i < file.length; i++) {
25226
+ sawTail = true;
25227
+ const f = file[i];
25228
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
25229
+ return false;
25230
+ }
25231
+ }
25232
+ return sawTail;
25233
+ }
25234
+ const [body, after] = bs;
25235
+ while (fileIndex <= after) {
25236
+ const m = __privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
25237
+ if (m && globStarDepth < this.maxGlobstarRecursion) {
25238
+ const sub = __privateMethod(this, _Minimatch_instances, matchGlobStarBodySections_fn).call(this, file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
25239
+ if (sub !== false)
25240
+ return sub;
25241
+ }
25242
+ const f = file[fileIndex];
25243
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
25244
+ return false;
25245
+ }
25246
+ fileIndex++;
25247
+ }
25248
+ return partial || null;
25249
+ };
25250
+ matchOne_fn = function(file, pattern, partial, fileIndex, patternIndex) {
25251
+ let fi;
25252
+ let pi;
25253
+ let pl;
25254
+ let fl;
25255
+ for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
25256
+ this.debug("matchOne loop");
25257
+ let p = pattern[pi];
25258
+ let f = file[fi];
25259
+ this.debug(pattern, p, f);
25260
+ if (p === false || p === GLOBSTAR)
25261
+ return false;
25262
+ let hit;
25263
+ if (typeof p === "string") {
25264
+ hit = f === p;
25265
+ this.debug("string match", p, f, hit);
25266
+ } else {
25267
+ hit = p.test(f);
25268
+ this.debug("pattern match", p, f, hit);
25269
+ }
25270
+ if (!hit)
25271
+ return false;
25272
+ }
25273
+ if (fi === fl && pi === pl) {
25274
+ return true;
25275
+ } else if (fi === fl) {
25276
+ return partial;
25277
+ } else if (pi === pl) {
25278
+ return fi === fl - 1 && file[fi] === "";
25279
+ } else {
25280
+ throw new Error("wtf?");
25281
+ }
25282
+ };
24748
25283
  minimatch.AST = AST;
24749
25284
  minimatch.Minimatch = Minimatch;
24750
25285
  minimatch.escape = escape;
@@ -24815,7 +25350,7 @@ var isJsFile = lowerPathParam((p) => p.endsWith(".js") || p.endsWith(".mjs") ||
24815
25350
 
24816
25351
  // src/compiler/html/canonical-link.ts
24817
25352
  var updateCanonicalLink = (doc, href) => {
24818
- var _a2;
25353
+ var _a3;
24819
25354
  let canonicalLinkElm = doc.head.querySelector('link[rel="canonical"]');
24820
25355
  if (typeof href === "string") {
24821
25356
  if (canonicalLinkElm == null) {
@@ -24828,7 +25363,7 @@ var updateCanonicalLink = (doc, href) => {
24828
25363
  if (canonicalLinkElm != null) {
24829
25364
  const existingHref = canonicalLinkElm.getAttribute("href");
24830
25365
  if (!existingHref) {
24831
- (_a2 = canonicalLinkElm.parentNode) == null ? void 0 : _a2.removeChild(canonicalLinkElm);
25366
+ (_a3 = canonicalLinkElm.parentNode) == null ? void 0 : _a3.removeChild(canonicalLinkElm);
24832
25367
  }
24833
25368
  }
24834
25369
  }
@@ -25340,7 +25875,7 @@ var serializeCss = (stylesheet, serializeOpts) => {
25340
25875
  return out.join("");
25341
25876
  };
25342
25877
  var serializeCssVisitNode = (opts, node, index, len) => {
25343
- var _a2;
25878
+ var _a3;
25344
25879
  const nodeType = node.type;
25345
25880
  if (nodeType === 4 /* Declaration */) {
25346
25881
  return serializeCssDeclaration(node, index, len);
@@ -25349,7 +25884,7 @@ var serializeCssVisitNode = (opts, node, index, len) => {
25349
25884
  return serializeCssRule(opts, node);
25350
25885
  }
25351
25886
  if (nodeType === 1 /* Comment */) {
25352
- if (((_a2 = node.comment) == null ? void 0 : _a2[0]) === "!") {
25887
+ if (((_a3 = node.comment) == null ? void 0 : _a3[0]) === "!") {
25353
25888
  return `/*${node.comment}*/`;
25354
25889
  } else {
25355
25890
  return "";
@@ -25397,10 +25932,10 @@ var serializeCssVisitNode = (opts, node, index, len) => {
25397
25932
  return "";
25398
25933
  };
25399
25934
  var serializeCssRule = (opts, node) => {
25400
- var _a2, _b;
25935
+ var _a3, _b;
25401
25936
  const decls = node.declarations;
25402
25937
  const usedSelectors = opts.usedSelectors;
25403
- const selectors = (_b = (_a2 = node.selectors) == null ? void 0 : _a2.slice()) != null ? _b : [];
25938
+ const selectors = (_b = (_a3 = node.selectors) == null ? void 0 : _a3.slice()) != null ? _b : [];
25404
25939
  const hasDecls = decls != null && decls.length > 0;
25405
25940
  const hasNestedRules = node.rules != null && node.rules.length > 0;
25406
25941
  if (!hasDecls && !hasNestedRules) {
@@ -25504,8 +26039,8 @@ var serializeCssKeyframes = (opts, node) => {
25504
26039
  return "@" + (node.vendor || "") + "keyframes " + node.name + "{" + keyframesCss + "}";
25505
26040
  };
25506
26041
  var serializeCssKeyframe = (opts, node) => {
25507
- var _a2, _b;
25508
- return ((_b = (_a2 = node.values) == null ? void 0 : _a2.join(",")) != null ? _b : "") + "{" + serializeCssMapVisit(opts, node.declarations) + "}";
26042
+ var _a3, _b;
26043
+ return ((_b = (_a3 = node.values) == null ? void 0 : _a3.join(",")) != null ? _b : "") + "{" + serializeCssMapVisit(opts, node.declarations) + "}";
25509
26044
  };
25510
26045
  var serializeCssFontFace = (opts, node) => {
25511
26046
  const fontCss = serializeCssMapVisit(opts, node.declarations);
@@ -25529,8 +26064,8 @@ var serializeCssContainer = (opts, node) => {
25529
26064
  return "@container " + removeMediaWhitespace(node.media) + "{" + containerCss + "}";
25530
26065
  };
25531
26066
  var serializeCssPage = (opts, node) => {
25532
- var _a2, _b;
25533
- const sel = (_b = (_a2 = node.selectors) == null ? void 0 : _a2.join(", ")) != null ? _b : "";
26067
+ var _a3, _b;
26068
+ const sel = (_b = (_a3 = node.selectors) == null ? void 0 : _a3.join(", ")) != null ? _b : "";
25534
26069
  return "@page " + sel + "{" + serializeCssMapVisit(opts, node.declarations) + "}";
25535
26070
  };
25536
26071
  var serializeCssDocument = (opts, node) => {
@@ -25577,10 +26112,10 @@ var removeSelectorWhitespace = (selector) => {
25577
26112
  return rtn;
25578
26113
  };
25579
26114
  var removeMediaWhitespace = (media) => {
25580
- var _a2;
26115
+ var _a3;
25581
26116
  let rtn = "";
25582
26117
  let char = "";
25583
- media = (_a2 = media == null ? void 0 : media.trim()) != null ? _a2 : "";
26118
+ media = (_a3 = media == null ? void 0 : media.trim()) != null ? _a3 : "";
25584
26119
  for (let i = 0, l = media.length; i < l; i++) {
25585
26120
  char = media[i];
25586
26121
  if (CSS_WS_REG.test(char)) {