proto-autos-wc 0.1.124 → 0.1.126

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.
@@ -1,17 +1,258 @@
1
1
  'use strict';
2
2
 
3
3
  const NAMESPACE = 'proto-autos-wc';
4
- const BUILD = /* proto-autos-wc */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, deserializer: false, devTools: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propChangeCallback: false, propMutable: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, serializer: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false };
4
+ const BUILD = /* proto-autos-wc */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, deserializer: false, devTools: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propChangeCallback: false, propMutable: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, serializer: false, shadowDelegatesFocus: false, shadowDom: true, shadowSlotAssignmentManual: false, slot: false, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false };
5
5
  const Env = /* proto-autos-wc */ {};
6
6
 
7
7
  /*
8
- Stencil Client Platform v4.39.0 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Platform v4.40.0 | MIT Licensed | https://stenciljs.com
9
9
  */
10
+ var __create = Object.create;
10
11
  var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __typeError = (msg) => {
17
+ throw TypeError(msg);
18
+ };
19
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20
+ var __commonJS = (cb, mod) => function __require() {
21
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
22
+ };
11
23
  var __export = (target, all) => {
12
24
  for (var name in all)
13
25
  __defProp(target, name, { get: all[name], enumerable: true });
14
26
  };
27
+ var __copyProps = (to, from, except, desc) => {
28
+ if (from && typeof from === "object" || typeof from === "function") {
29
+ for (let key of __getOwnPropNames(from))
30
+ if (!__hasOwnProp.call(to, key) && key !== except)
31
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
32
+ }
33
+ return to;
34
+ };
35
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
36
+ // If the importer is in node compatibility mode or this is not an ESM
37
+ // file that has been converted to a CommonJS file using a Babel-
38
+ // compatible transform (i.e. "__esModule" has not been set), then set
39
+ // "default" to the CommonJS "module.exports" for node compatibility.
40
+ __defProp(target, "default", { value: mod, enumerable: true }) ,
41
+ mod
42
+ ));
43
+ var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
44
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
45
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
46
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
47
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
48
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
49
+
50
+ // node_modules/balanced-match/index.js
51
+ var require_balanced_match = __commonJS({
52
+ "node_modules/balanced-match/index.js"(exports, module) {
53
+ module.exports = balanced;
54
+ function balanced(a, b, str) {
55
+ if (a instanceof RegExp) a = maybeMatch(a, str);
56
+ if (b instanceof RegExp) b = maybeMatch(b, str);
57
+ var r = range(a, b, str);
58
+ return r && {
59
+ start: r[0],
60
+ end: r[1],
61
+ pre: str.slice(0, r[0]),
62
+ body: str.slice(r[0] + a.length, r[1]),
63
+ post: str.slice(r[1] + b.length)
64
+ };
65
+ }
66
+ function maybeMatch(reg, str) {
67
+ var m = str.match(reg);
68
+ return m ? m[0] : null;
69
+ }
70
+ balanced.range = range;
71
+ function range(a, b, str) {
72
+ var begs, beg, left, right, result;
73
+ var ai = str.indexOf(a);
74
+ var bi = str.indexOf(b, ai + 1);
75
+ var i2 = ai;
76
+ if (ai >= 0 && bi > 0) {
77
+ if (a === b) {
78
+ return [ai, bi];
79
+ }
80
+ begs = [];
81
+ left = str.length;
82
+ while (i2 >= 0 && !result) {
83
+ if (i2 == ai) {
84
+ begs.push(i2);
85
+ ai = str.indexOf(a, i2 + 1);
86
+ } else if (begs.length == 1) {
87
+ result = [begs.pop(), bi];
88
+ } else {
89
+ beg = begs.pop();
90
+ if (beg < left) {
91
+ left = beg;
92
+ right = bi;
93
+ }
94
+ bi = str.indexOf(b, i2 + 1);
95
+ }
96
+ i2 = ai < bi && ai >= 0 ? ai : bi;
97
+ }
98
+ if (begs.length) {
99
+ result = [left, right];
100
+ }
101
+ }
102
+ return result;
103
+ }
104
+ }
105
+ });
106
+
107
+ // node_modules/brace-expansion/index.js
108
+ var require_brace_expansion = __commonJS({
109
+ "node_modules/brace-expansion/index.js"(exports, module) {
110
+ var balanced = require_balanced_match();
111
+ module.exports = expandTop;
112
+ var escSlash = "\0SLASH" + Math.random() + "\0";
113
+ var escOpen = "\0OPEN" + Math.random() + "\0";
114
+ var escClose = "\0CLOSE" + Math.random() + "\0";
115
+ var escComma = "\0COMMA" + Math.random() + "\0";
116
+ var escPeriod = "\0PERIOD" + Math.random() + "\0";
117
+ function numeric(str) {
118
+ return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
119
+ }
120
+ function escapeBraces(str) {
121
+ return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
122
+ }
123
+ function unescapeBraces(str) {
124
+ return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
125
+ }
126
+ function parseCommaParts(str) {
127
+ if (!str)
128
+ return [""];
129
+ var parts = [];
130
+ var m = balanced("{", "}", str);
131
+ if (!m)
132
+ return str.split(",");
133
+ var pre = m.pre;
134
+ var body = m.body;
135
+ var post = m.post;
136
+ var p = pre.split(",");
137
+ p[p.length - 1] += "{" + body + "}";
138
+ var postParts = parseCommaParts(post);
139
+ if (post.length) {
140
+ p[p.length - 1] += postParts.shift();
141
+ p.push.apply(p, postParts);
142
+ }
143
+ parts.push.apply(parts, p);
144
+ return parts;
145
+ }
146
+ function expandTop(str) {
147
+ if (!str)
148
+ return [];
149
+ if (str.substr(0, 2) === "{}") {
150
+ str = "\\{\\}" + str.substr(2);
151
+ }
152
+ return expand2(escapeBraces(str), true).map(unescapeBraces);
153
+ }
154
+ function embrace(str) {
155
+ return "{" + str + "}";
156
+ }
157
+ function isPadded(el) {
158
+ return /^-?0\d/.test(el);
159
+ }
160
+ function lte(i2, y) {
161
+ return i2 <= y;
162
+ }
163
+ function gte(i2, y) {
164
+ return i2 >= y;
165
+ }
166
+ function expand2(str, isTop) {
167
+ var expansions = [];
168
+ var m = balanced("{", "}", str);
169
+ if (!m) return [str];
170
+ var pre = m.pre;
171
+ var post = m.post.length ? expand2(m.post, false) : [""];
172
+ if (/\$$/.test(m.pre)) {
173
+ for (var k = 0; k < post.length; k++) {
174
+ var expansion = pre + "{" + m.body + "}" + post[k];
175
+ expansions.push(expansion);
176
+ }
177
+ } else {
178
+ var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
179
+ var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
180
+ var isSequence = isNumericSequence || isAlphaSequence;
181
+ var isOptions = m.body.indexOf(",") >= 0;
182
+ if (!isSequence && !isOptions) {
183
+ if (m.post.match(/,(?!,).*\}/)) {
184
+ str = m.pre + "{" + m.body + escClose + m.post;
185
+ return expand2(str);
186
+ }
187
+ return [str];
188
+ }
189
+ var n;
190
+ if (isSequence) {
191
+ n = m.body.split(/\.\./);
192
+ } else {
193
+ n = parseCommaParts(m.body);
194
+ if (n.length === 1) {
195
+ n = expand2(n[0], false).map(embrace);
196
+ if (n.length === 1) {
197
+ return post.map(function(p) {
198
+ return m.pre + n[0] + p;
199
+ });
200
+ }
201
+ }
202
+ }
203
+ var N;
204
+ if (isSequence) {
205
+ var x = numeric(n[0]);
206
+ var y = numeric(n[1]);
207
+ var width = Math.max(n[0].length, n[1].length);
208
+ var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
209
+ var test = lte;
210
+ var reverse = y < x;
211
+ if (reverse) {
212
+ incr *= -1;
213
+ test = gte;
214
+ }
215
+ var pad = n.some(isPadded);
216
+ N = [];
217
+ for (var i2 = x; test(i2, y); i2 += incr) {
218
+ var c;
219
+ if (isAlphaSequence) {
220
+ c = String.fromCharCode(i2);
221
+ if (c === "\\")
222
+ c = "";
223
+ } else {
224
+ c = String(i2);
225
+ if (pad) {
226
+ var need = width - c.length;
227
+ if (need > 0) {
228
+ var z = new Array(need + 1).join("0");
229
+ if (i2 < 0)
230
+ c = "-" + z + c.slice(1);
231
+ else
232
+ c = z + c;
233
+ }
234
+ }
235
+ }
236
+ N.push(c);
237
+ }
238
+ } else {
239
+ N = [];
240
+ for (var j = 0; j < n.length; j++) {
241
+ N.push.apply(N, expand2(n[j], false));
242
+ }
243
+ }
244
+ for (var j = 0; j < N.length; j++) {
245
+ for (var k = 0; k < post.length; k++) {
246
+ var expansion = pre + N[j] + post[k];
247
+ if (!isTop || isSequence || expansion)
248
+ expansions.push(expansion);
249
+ }
250
+ }
251
+ }
252
+ return expansions;
253
+ }
254
+ }
255
+ });
15
256
  var Build = {
16
257
  isDev: BUILD.isDev ? true : false,
17
258
  isBrowser: true,
@@ -320,11 +561,11 @@ var readTask = /* @__PURE__ */ queueTask(queueDomReads, false);
320
561
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
321
562
 
322
563
  // src/runtime/asset-path.ts
323
- var getAssetPath = (path) => {
324
- const assetUrl = new URL(path, plt.$resourcesUrl$);
564
+ var getAssetPath = (path2) => {
565
+ const assetUrl = new URL(path2, plt.$resourcesUrl$);
325
566
  return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
326
567
  };
327
- var setAssetPath = (path) => plt.$resourcesUrl$ = path;
568
+ var setAssetPath = (path2) => plt.$resourcesUrl$ = path2;
328
569
 
329
570
  // src/utils/helpers.ts
330
571
  var isDef = (v) => v != null && v !== void 0;
@@ -333,6 +574,1359 @@ var isComplexType = (o) => {
333
574
  return o === "object" || o === "function";
334
575
  };
335
576
 
577
+ // node_modules/minimatch/dist/esm/index.js
578
+ var import_brace_expansion = __toESM(require_brace_expansion());
579
+
580
+ // node_modules/minimatch/dist/esm/assert-valid-pattern.js
581
+ var MAX_PATTERN_LENGTH = 1024 * 64;
582
+ var assertValidPattern = (pattern) => {
583
+ if (typeof pattern !== "string") {
584
+ throw new TypeError("invalid pattern");
585
+ }
586
+ if (pattern.length > MAX_PATTERN_LENGTH) {
587
+ throw new TypeError("pattern is too long");
588
+ }
589
+ };
590
+
591
+ // node_modules/minimatch/dist/esm/brace-expressions.js
592
+ var posixClasses = {
593
+ "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
594
+ "[:alpha:]": ["\\p{L}\\p{Nl}", true],
595
+ "[:ascii:]": ["\\x00-\\x7f", false],
596
+ "[:blank:]": ["\\p{Zs}\\t", true],
597
+ "[:cntrl:]": ["\\p{Cc}", true],
598
+ "[:digit:]": ["\\p{Nd}", true],
599
+ "[:graph:]": ["\\p{Z}\\p{C}", true, true],
600
+ "[:lower:]": ["\\p{Ll}", true],
601
+ "[:print:]": ["\\p{C}", true],
602
+ "[:punct:]": ["\\p{P}", true],
603
+ "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
604
+ "[:upper:]": ["\\p{Lu}", true],
605
+ "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
606
+ "[:xdigit:]": ["A-Fa-f0-9", false]
607
+ };
608
+ var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
609
+ var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
610
+ var rangesToString = (ranges) => ranges.join("");
611
+ var parseClass = (glob, position) => {
612
+ const pos = position;
613
+ if (glob.charAt(pos) !== "[") {
614
+ throw new Error("not in a brace expression");
615
+ }
616
+ const ranges = [];
617
+ const negs = [];
618
+ let i2 = pos + 1;
619
+ let sawStart = false;
620
+ let uflag = false;
621
+ let escaping = false;
622
+ let negate = false;
623
+ let endPos = pos;
624
+ let rangeStart = "";
625
+ WHILE: while (i2 < glob.length) {
626
+ const c = glob.charAt(i2);
627
+ if ((c === "!" || c === "^") && i2 === pos + 1) {
628
+ negate = true;
629
+ i2++;
630
+ continue;
631
+ }
632
+ if (c === "]" && sawStart && !escaping) {
633
+ endPos = i2 + 1;
634
+ break;
635
+ }
636
+ sawStart = true;
637
+ if (c === "\\") {
638
+ if (!escaping) {
639
+ escaping = true;
640
+ i2++;
641
+ continue;
642
+ }
643
+ }
644
+ if (c === "[" && !escaping) {
645
+ for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
646
+ if (glob.startsWith(cls, i2)) {
647
+ if (rangeStart) {
648
+ return ["$.", false, glob.length - pos, true];
649
+ }
650
+ i2 += cls.length;
651
+ if (neg)
652
+ negs.push(unip);
653
+ else
654
+ ranges.push(unip);
655
+ uflag = uflag || u;
656
+ continue WHILE;
657
+ }
658
+ }
659
+ }
660
+ escaping = false;
661
+ if (rangeStart) {
662
+ if (c > rangeStart) {
663
+ ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
664
+ } else if (c === rangeStart) {
665
+ ranges.push(braceEscape(c));
666
+ }
667
+ rangeStart = "";
668
+ i2++;
669
+ continue;
670
+ }
671
+ if (glob.startsWith("-]", i2 + 1)) {
672
+ ranges.push(braceEscape(c + "-"));
673
+ i2 += 2;
674
+ continue;
675
+ }
676
+ if (glob.startsWith("-", i2 + 1)) {
677
+ rangeStart = c;
678
+ i2 += 2;
679
+ continue;
680
+ }
681
+ ranges.push(braceEscape(c));
682
+ i2++;
683
+ }
684
+ if (endPos < i2) {
685
+ return ["", false, 0, false];
686
+ }
687
+ if (!ranges.length && !negs.length) {
688
+ return ["$.", false, glob.length - pos, true];
689
+ }
690
+ if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) {
691
+ const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
692
+ return [regexpEscape(r), false, endPos - pos, false];
693
+ }
694
+ const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]";
695
+ const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
696
+ const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs;
697
+ return [comb, uflag, endPos - pos, true];
698
+ };
699
+
700
+ // node_modules/minimatch/dist/esm/unescape.js
701
+ var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
702
+ return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
703
+ };
704
+
705
+ // node_modules/minimatch/dist/esm/ast.js
706
+ var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
707
+ var isExtglobType = (c) => types.has(c);
708
+ var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
709
+ var startNoDot = "(?!\\.)";
710
+ var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
711
+ var justDots = /* @__PURE__ */ new Set(["..", "."]);
712
+ var reSpecials = new Set("().*{}+?[]^$\\!");
713
+ var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
714
+ var qmark = "[^/]";
715
+ var star = qmark + "*?";
716
+ var starNoEmpty = qmark + "+?";
717
+ var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
718
+ var _AST = class _AST {
719
+ constructor(type, parent, options = {}) {
720
+ __privateAdd(this, _AST_instances);
721
+ __publicField(this, "type");
722
+ __privateAdd(this, _root);
723
+ __privateAdd(this, _hasMagic);
724
+ __privateAdd(this, _uflag, false);
725
+ __privateAdd(this, _parts, []);
726
+ __privateAdd(this, _parent);
727
+ __privateAdd(this, _parentIndex);
728
+ __privateAdd(this, _negs);
729
+ __privateAdd(this, _filledNegs, false);
730
+ __privateAdd(this, _options);
731
+ __privateAdd(this, _toString);
732
+ // set to true if it's an extglob with no children
733
+ // (which really means one child of '')
734
+ __privateAdd(this, _emptyExt, false);
735
+ this.type = type;
736
+ if (type)
737
+ __privateSet(this, _hasMagic, true);
738
+ __privateSet(this, _parent, parent);
739
+ __privateSet(this, _root, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _root) : this);
740
+ __privateSet(this, _options, __privateGet(this, _root) === this ? options : __privateGet(__privateGet(this, _root), _options));
741
+ __privateSet(this, _negs, __privateGet(this, _root) === this ? [] : __privateGet(__privateGet(this, _root), _negs));
742
+ if (type === "!" && !__privateGet(__privateGet(this, _root), _filledNegs))
743
+ __privateGet(this, _negs).push(this);
744
+ __privateSet(this, _parentIndex, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0);
745
+ }
746
+ get hasMagic() {
747
+ if (__privateGet(this, _hasMagic) !== void 0)
748
+ return __privateGet(this, _hasMagic);
749
+ for (const p of __privateGet(this, _parts)) {
750
+ if (typeof p === "string")
751
+ continue;
752
+ if (p.type || p.hasMagic)
753
+ return __privateSet(this, _hasMagic, true);
754
+ }
755
+ return __privateGet(this, _hasMagic);
756
+ }
757
+ // reconstructs the pattern
758
+ toString() {
759
+ if (__privateGet(this, _toString) !== void 0)
760
+ return __privateGet(this, _toString);
761
+ if (!this.type) {
762
+ return __privateSet(this, _toString, __privateGet(this, _parts).map((p) => String(p)).join(""));
763
+ } else {
764
+ return __privateSet(this, _toString, this.type + "(" + __privateGet(this, _parts).map((p) => String(p)).join("|") + ")");
765
+ }
766
+ }
767
+ push(...parts) {
768
+ for (const p of parts) {
769
+ if (p === "")
770
+ continue;
771
+ if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
772
+ throw new Error("invalid part: " + p);
773
+ }
774
+ __privateGet(this, _parts).push(p);
775
+ }
776
+ }
777
+ toJSON() {
778
+ var _a;
779
+ 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())];
780
+ if (this.isStart() && !this.type)
781
+ ret.unshift([]);
782
+ if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")) {
783
+ ret.push({});
784
+ }
785
+ return ret;
786
+ }
787
+ isStart() {
788
+ var _a;
789
+ if (__privateGet(this, _root) === this)
790
+ return true;
791
+ if (!((_a = __privateGet(this, _parent)) == null ? void 0 : _a.isStart()))
792
+ return false;
793
+ if (__privateGet(this, _parentIndex) === 0)
794
+ return true;
795
+ const p = __privateGet(this, _parent);
796
+ for (let i2 = 0; i2 < __privateGet(this, _parentIndex); i2++) {
797
+ const pp = __privateGet(p, _parts)[i2];
798
+ if (!(pp instanceof _AST && pp.type === "!")) {
799
+ return false;
800
+ }
801
+ }
802
+ return true;
803
+ }
804
+ isEnd() {
805
+ var _a, _b, _c;
806
+ if (__privateGet(this, _root) === this)
807
+ return true;
808
+ if (((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")
809
+ return true;
810
+ if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
811
+ return false;
812
+ if (!this.type)
813
+ return (_c = __privateGet(this, _parent)) == null ? void 0 : _c.isEnd();
814
+ const pl = __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0;
815
+ return __privateGet(this, _parentIndex) === pl - 1;
816
+ }
817
+ copyIn(part) {
818
+ if (typeof part === "string")
819
+ this.push(part);
820
+ else
821
+ this.push(part.clone(this));
822
+ }
823
+ clone(parent) {
824
+ const c = new _AST(this.type, parent);
825
+ for (const p of __privateGet(this, _parts)) {
826
+ c.copyIn(p);
827
+ }
828
+ return c;
829
+ }
830
+ static fromGlob(pattern, options = {}) {
831
+ var _a;
832
+ const ast = new _AST(null, void 0, options);
833
+ __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, pattern, ast, 0, options);
834
+ return ast;
835
+ }
836
+ // returns the regular expression if there's magic, or the unescaped
837
+ // string if not.
838
+ toMMPattern() {
839
+ if (this !== __privateGet(this, _root))
840
+ return __privateGet(this, _root).toMMPattern();
841
+ const glob = this.toString();
842
+ const [re, body, hasMagic, uflag] = this.toRegExpSource();
843
+ const anyMagic = hasMagic || __privateGet(this, _hasMagic) || __privateGet(this, _options).nocase && !__privateGet(this, _options).nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase();
844
+ if (!anyMagic) {
845
+ return body;
846
+ }
847
+ const flags = (__privateGet(this, _options).nocase ? "i" : "") + (uflag ? "u" : "");
848
+ return Object.assign(new RegExp(`^${re}$`, flags), {
849
+ _src: re,
850
+ _glob: glob
851
+ });
852
+ }
853
+ get options() {
854
+ return __privateGet(this, _options);
855
+ }
856
+ // returns the string match, the regexp source, whether there's magic
857
+ // in the regexp (so a regular expression is required) and whether or
858
+ // not the uflag is needed for the regular expression (for posix classes)
859
+ // TODO: instead of injecting the start/end at this point, just return
860
+ // the BODY of the regexp, along with the start/end portions suitable
861
+ // for binding the start/end in either a joined full-path makeRe context
862
+ // (where we bind to (^|/), or a standalone matchPart context (where
863
+ // we bind to ^, and not /). Otherwise slashes get duped!
864
+ //
865
+ // In part-matching mode, the start is:
866
+ // - if not isStart: nothing
867
+ // - if traversal possible, but not allowed: ^(?!\.\.?$)
868
+ // - if dots allowed or not possible: ^
869
+ // - if dots possible and not allowed: ^(?!\.)
870
+ // end is:
871
+ // - if not isEnd(): nothing
872
+ // - else: $
873
+ //
874
+ // In full-path matching mode, we put the slash at the START of the
875
+ // pattern, so start is:
876
+ // - if first pattern: same as part-matching mode
877
+ // - if not isStart(): nothing
878
+ // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
879
+ // - if dots allowed or not possible: /
880
+ // - if dots possible and not allowed: /(?!\.)
881
+ // end is:
882
+ // - if last pattern, same as part-matching mode
883
+ // - else nothing
884
+ //
885
+ // Always put the (?:$|/) on negated tails, though, because that has to be
886
+ // there to bind the end of the negated pattern portion, and it's easier to
887
+ // just stick it in now rather than try to inject it later in the middle of
888
+ // the pattern.
889
+ //
890
+ // We can just always return the same end, and leave it up to the caller
891
+ // to know whether it's going to be used joined or in parts.
892
+ // And, if the start is adjusted slightly, can do the same there:
893
+ // - if not isStart: nothing
894
+ // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
895
+ // - if dots allowed or not possible: (?:/|^)
896
+ // - if dots possible and not allowed: (?:/|^)(?!\.)
897
+ //
898
+ // But it's better to have a simpler binding without a conditional, for
899
+ // performance, so probably better to return both start options.
900
+ //
901
+ // Then the caller just ignores the end if it's not the first pattern,
902
+ // and the start always gets applied.
903
+ //
904
+ // But that's always going to be $ if it's the ending pattern, or nothing,
905
+ // so the caller can just attach $ at the end of the pattern when building.
906
+ //
907
+ // So the todo is:
908
+ // - better detect what kind of start is needed
909
+ // - return both flavors of starting pattern
910
+ // - attach $ at the end of the pattern when creating the actual RegExp
911
+ //
912
+ // Ah, but wait, no, that all only applies to the root when the first pattern
913
+ // is not an extglob. If the first pattern IS an extglob, then we need all
914
+ // that dot prevention biz to live in the extglob portions, because eg
915
+ // +(*|.x*) can match .xy but not .yx.
916
+ //
917
+ // So, return the two flavors if it's #root and the first child is not an
918
+ // AST, otherwise leave it to the child AST to handle it, and there,
919
+ // use the (?:^|/) style of start binding.
920
+ //
921
+ // Even simplified further:
922
+ // - Since the start for a join is eg /(?!\.) and the start for a part
923
+ // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
924
+ // or start or whatever) and prepend ^ or / at the Regexp construction.
925
+ toRegExpSource(allowDot) {
926
+ var _a;
927
+ const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
928
+ if (__privateGet(this, _root) === this)
929
+ __privateMethod(this, _AST_instances, fillNegs_fn).call(this);
930
+ if (!this.type) {
931
+ const noEmpty = this.isStart() && this.isEnd();
932
+ const src = __privateGet(this, _parts).map((p) => {
933
+ var _a2;
934
+ const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a2 = _AST, _AST_static, parseGlob_fn).call(_a2, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
935
+ __privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
936
+ __privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
937
+ return re;
938
+ }).join("");
939
+ let start2 = "";
940
+ if (this.isStart()) {
941
+ if (typeof __privateGet(this, _parts)[0] === "string") {
942
+ const dotTravAllowed = __privateGet(this, _parts).length === 1 && justDots.has(__privateGet(this, _parts)[0]);
943
+ if (!dotTravAllowed) {
944
+ const aps = addPatternStart;
945
+ const needNoTrav = (
946
+ // dots are allowed, and the pattern starts with [ or .
947
+ dot && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or .
948
+ src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or .
949
+ src.startsWith("\\.\\.") && aps.has(src.charAt(4))
950
+ );
951
+ const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
952
+ start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
953
+ }
954
+ }
955
+ }
956
+ let end = "";
957
+ if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!") {
958
+ end = "(?:$|\\/)";
959
+ }
960
+ const final2 = start2 + src + end;
961
+ return [
962
+ final2,
963
+ unescape(src),
964
+ __privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
965
+ __privateGet(this, _uflag)
966
+ ];
967
+ }
968
+ const repeated = this.type === "*" || this.type === "+";
969
+ const start = this.type === "!" ? "(?:(?!(?:" : "(?:";
970
+ let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
971
+ if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
972
+ const s = this.toString();
973
+ __privateSet(this, _parts, [s]);
974
+ this.type = null;
975
+ __privateSet(this, _hasMagic, void 0);
976
+ return [s, unescape(this.toString()), false, false];
977
+ }
978
+ let bodyDotAllowed = !repeated || allowDot || dot || false ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
979
+ if (bodyDotAllowed === body) {
980
+ bodyDotAllowed = "";
981
+ }
982
+ if (bodyDotAllowed) {
983
+ body = `(?:${body})(?:${bodyDotAllowed})*?`;
984
+ }
985
+ let final = "";
986
+ if (this.type === "!" && __privateGet(this, _emptyExt)) {
987
+ final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty;
988
+ } else {
989
+ const close = this.type === "!" ? (
990
+ // !() must match something,but !(x) can match ''
991
+ "))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")"
992
+ ) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
993
+ final = start + body + close;
994
+ }
995
+ return [
996
+ final,
997
+ unescape(body),
998
+ __privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
999
+ __privateGet(this, _uflag)
1000
+ ];
1001
+ }
1002
+ };
1003
+ _root = new WeakMap();
1004
+ _hasMagic = new WeakMap();
1005
+ _uflag = new WeakMap();
1006
+ _parts = new WeakMap();
1007
+ _parent = new WeakMap();
1008
+ _parentIndex = new WeakMap();
1009
+ _negs = new WeakMap();
1010
+ _filledNegs = new WeakMap();
1011
+ _options = new WeakMap();
1012
+ _toString = new WeakMap();
1013
+ _emptyExt = new WeakMap();
1014
+ _AST_instances = new WeakSet();
1015
+ fillNegs_fn = function() {
1016
+ if (this !== __privateGet(this, _root))
1017
+ throw new Error("should only call on root");
1018
+ if (__privateGet(this, _filledNegs))
1019
+ return this;
1020
+ this.toString();
1021
+ __privateSet(this, _filledNegs, true);
1022
+ let n;
1023
+ while (n = __privateGet(this, _negs).pop()) {
1024
+ if (n.type !== "!")
1025
+ continue;
1026
+ let p = n;
1027
+ let pp = __privateGet(p, _parent);
1028
+ while (pp) {
1029
+ for (let i2 = __privateGet(p, _parentIndex) + 1; !pp.type && i2 < __privateGet(pp, _parts).length; i2++) {
1030
+ for (const part of __privateGet(n, _parts)) {
1031
+ if (typeof part === "string") {
1032
+ throw new Error("string part in extglob AST??");
1033
+ }
1034
+ part.copyIn(__privateGet(pp, _parts)[i2]);
1035
+ }
1036
+ }
1037
+ p = pp;
1038
+ pp = __privateGet(p, _parent);
1039
+ }
1040
+ }
1041
+ return this;
1042
+ };
1043
+ _AST_static = new WeakSet();
1044
+ parseAST_fn = function(str, ast, pos, opt) {
1045
+ var _a, _b;
1046
+ let escaping = false;
1047
+ let inBrace = false;
1048
+ let braceStart = -1;
1049
+ let braceNeg = false;
1050
+ if (ast.type === null) {
1051
+ let i3 = pos;
1052
+ let acc2 = "";
1053
+ while (i3 < str.length) {
1054
+ const c = str.charAt(i3++);
1055
+ if (escaping || c === "\\") {
1056
+ escaping = !escaping;
1057
+ acc2 += c;
1058
+ continue;
1059
+ }
1060
+ if (inBrace) {
1061
+ if (i3 === braceStart + 1) {
1062
+ if (c === "^" || c === "!") {
1063
+ braceNeg = true;
1064
+ }
1065
+ } else if (c === "]" && !(i3 === braceStart + 2 && braceNeg)) {
1066
+ inBrace = false;
1067
+ }
1068
+ acc2 += c;
1069
+ continue;
1070
+ } else if (c === "[") {
1071
+ inBrace = true;
1072
+ braceStart = i3;
1073
+ braceNeg = false;
1074
+ acc2 += c;
1075
+ continue;
1076
+ }
1077
+ if (!opt.noext && isExtglobType(c) && str.charAt(i3) === "(") {
1078
+ ast.push(acc2);
1079
+ acc2 = "";
1080
+ const ext2 = new _AST(c, ast);
1081
+ i3 = __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, str, ext2, i3, opt);
1082
+ ast.push(ext2);
1083
+ continue;
1084
+ }
1085
+ acc2 += c;
1086
+ }
1087
+ ast.push(acc2);
1088
+ return i3;
1089
+ }
1090
+ let i2 = pos + 1;
1091
+ let part = new _AST(null, ast);
1092
+ const parts = [];
1093
+ let acc = "";
1094
+ while (i2 < str.length) {
1095
+ const c = str.charAt(i2++);
1096
+ if (escaping || c === "\\") {
1097
+ escaping = !escaping;
1098
+ acc += c;
1099
+ continue;
1100
+ }
1101
+ if (inBrace) {
1102
+ if (i2 === braceStart + 1) {
1103
+ if (c === "^" || c === "!") {
1104
+ braceNeg = true;
1105
+ }
1106
+ } else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) {
1107
+ inBrace = false;
1108
+ }
1109
+ acc += c;
1110
+ continue;
1111
+ } else if (c === "[") {
1112
+ inBrace = true;
1113
+ braceStart = i2;
1114
+ braceNeg = false;
1115
+ acc += c;
1116
+ continue;
1117
+ }
1118
+ if (isExtglobType(c) && str.charAt(i2) === "(") {
1119
+ part.push(acc);
1120
+ acc = "";
1121
+ const ext2 = new _AST(c, part);
1122
+ part.push(ext2);
1123
+ i2 = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt);
1124
+ continue;
1125
+ }
1126
+ if (c === "|") {
1127
+ part.push(acc);
1128
+ acc = "";
1129
+ parts.push(part);
1130
+ part = new _AST(null, ast);
1131
+ continue;
1132
+ }
1133
+ if (c === ")") {
1134
+ if (acc === "" && __privateGet(ast, _parts).length === 0) {
1135
+ __privateSet(ast, _emptyExt, true);
1136
+ }
1137
+ part.push(acc);
1138
+ acc = "";
1139
+ ast.push(...parts, part);
1140
+ return i2;
1141
+ }
1142
+ acc += c;
1143
+ }
1144
+ ast.type = null;
1145
+ __privateSet(ast, _hasMagic, void 0);
1146
+ __privateSet(ast, _parts, [str.substring(pos - 1)]);
1147
+ return i2;
1148
+ };
1149
+ partsToRegExp_fn = function(dot) {
1150
+ return __privateGet(this, _parts).map((p) => {
1151
+ if (typeof p === "string") {
1152
+ throw new Error("string type in extglob ast??");
1153
+ }
1154
+ const [re, _, _hasMagic2, uflag] = p.toRegExpSource(dot);
1155
+ __privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
1156
+ return re;
1157
+ }).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|");
1158
+ };
1159
+ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
1160
+ let escaping = false;
1161
+ let re = "";
1162
+ let uflag = false;
1163
+ for (let i2 = 0; i2 < glob.length; i2++) {
1164
+ const c = glob.charAt(i2);
1165
+ if (escaping) {
1166
+ escaping = false;
1167
+ re += (reSpecials.has(c) ? "\\" : "") + c;
1168
+ continue;
1169
+ }
1170
+ if (c === "\\") {
1171
+ if (i2 === glob.length - 1) {
1172
+ re += "\\\\";
1173
+ } else {
1174
+ escaping = true;
1175
+ }
1176
+ continue;
1177
+ }
1178
+ if (c === "[") {
1179
+ const [src, needUflag, consumed, magic] = parseClass(glob, i2);
1180
+ if (consumed) {
1181
+ re += src;
1182
+ uflag = uflag || needUflag;
1183
+ i2 += consumed - 1;
1184
+ hasMagic = hasMagic || magic;
1185
+ continue;
1186
+ }
1187
+ }
1188
+ if (c === "*") {
1189
+ if (noEmpty && glob === "*")
1190
+ re += starNoEmpty;
1191
+ else
1192
+ re += star;
1193
+ hasMagic = true;
1194
+ continue;
1195
+ }
1196
+ if (c === "?") {
1197
+ re += qmark;
1198
+ hasMagic = true;
1199
+ continue;
1200
+ }
1201
+ re += regExpEscape(c);
1202
+ }
1203
+ return [re, unescape(glob), !!hasMagic, uflag];
1204
+ };
1205
+ __privateAdd(_AST, _AST_static);
1206
+ var AST = _AST;
1207
+
1208
+ // node_modules/minimatch/dist/esm/escape.js
1209
+ var escape = (s, { windowsPathsNoEscape = false } = {}) => {
1210
+ return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
1211
+ };
1212
+
1213
+ // node_modules/minimatch/dist/esm/index.js
1214
+ var minimatch = (p, pattern, options = {}) => {
1215
+ assertValidPattern(pattern);
1216
+ if (!options.nocomment && pattern.charAt(0) === "#") {
1217
+ return false;
1218
+ }
1219
+ return new Minimatch(pattern, options).match(p);
1220
+ };
1221
+ var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
1222
+ var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2);
1223
+ var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2);
1224
+ var starDotExtTestNocase = (ext2) => {
1225
+ ext2 = ext2.toLowerCase();
1226
+ return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2);
1227
+ };
1228
+ var starDotExtTestNocaseDot = (ext2) => {
1229
+ ext2 = ext2.toLowerCase();
1230
+ return (f) => f.toLowerCase().endsWith(ext2);
1231
+ };
1232
+ var starDotStarRE = /^\*+\.\*+$/;
1233
+ var starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
1234
+ var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes(".");
1235
+ var dotStarRE = /^\.\*+$/;
1236
+ var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
1237
+ var starRE = /^\*+$/;
1238
+ var starTest = (f) => f.length !== 0 && !f.startsWith(".");
1239
+ var starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
1240
+ var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
1241
+ var qmarksTestNocase = ([$0, ext2 = ""]) => {
1242
+ const noext = qmarksTestNoExt([$0]);
1243
+ if (!ext2)
1244
+ return noext;
1245
+ ext2 = ext2.toLowerCase();
1246
+ return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
1247
+ };
1248
+ var qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
1249
+ const noext = qmarksTestNoExtDot([$0]);
1250
+ if (!ext2)
1251
+ return noext;
1252
+ ext2 = ext2.toLowerCase();
1253
+ return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
1254
+ };
1255
+ var qmarksTestDot = ([$0, ext2 = ""]) => {
1256
+ const noext = qmarksTestNoExtDot([$0]);
1257
+ return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
1258
+ };
1259
+ var qmarksTest = ([$0, ext2 = ""]) => {
1260
+ const noext = qmarksTestNoExt([$0]);
1261
+ return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
1262
+ };
1263
+ var qmarksTestNoExt = ([$0]) => {
1264
+ const len = $0.length;
1265
+ return (f) => f.length === len && !f.startsWith(".");
1266
+ };
1267
+ var qmarksTestNoExtDot = ([$0]) => {
1268
+ const len = $0.length;
1269
+ return (f) => f.length === len && f !== "." && f !== "..";
1270
+ };
1271
+ var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
1272
+ var path = {
1273
+ win32: { sep: "\\" },
1274
+ posix: { sep: "/" }
1275
+ };
1276
+ var sep = defaultPlatform === "win32" ? path.win32.sep : path.posix.sep;
1277
+ minimatch.sep = sep;
1278
+ var GLOBSTAR = Symbol("globstar **");
1279
+ minimatch.GLOBSTAR = GLOBSTAR;
1280
+ var qmark2 = "[^/]";
1281
+ var star2 = qmark2 + "*?";
1282
+ var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
1283
+ var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
1284
+ var filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
1285
+ minimatch.filter = filter;
1286
+ var ext = (a, b = {}) => Object.assign({}, a, b);
1287
+ var defaults = (def) => {
1288
+ if (!def || typeof def !== "object" || !Object.keys(def).length) {
1289
+ return minimatch;
1290
+ }
1291
+ const orig = minimatch;
1292
+ const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
1293
+ return Object.assign(m, {
1294
+ Minimatch: class Minimatch extends orig.Minimatch {
1295
+ constructor(pattern, options = {}) {
1296
+ super(pattern, ext(def, options));
1297
+ }
1298
+ static defaults(options) {
1299
+ return orig.defaults(ext(def, options)).Minimatch;
1300
+ }
1301
+ },
1302
+ AST: class AST extends orig.AST {
1303
+ /* c8 ignore start */
1304
+ constructor(type, parent, options = {}) {
1305
+ super(type, parent, ext(def, options));
1306
+ }
1307
+ /* c8 ignore stop */
1308
+ static fromGlob(pattern, options = {}) {
1309
+ return orig.AST.fromGlob(pattern, ext(def, options));
1310
+ }
1311
+ },
1312
+ unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
1313
+ escape: (s, options = {}) => orig.escape(s, ext(def, options)),
1314
+ filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
1315
+ defaults: (options) => orig.defaults(ext(def, options)),
1316
+ makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
1317
+ braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
1318
+ match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
1319
+ sep: orig.sep,
1320
+ GLOBSTAR
1321
+ });
1322
+ };
1323
+ minimatch.defaults = defaults;
1324
+ var braceExpand = (pattern, options = {}) => {
1325
+ assertValidPattern(pattern);
1326
+ if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
1327
+ return [pattern];
1328
+ }
1329
+ return (0, import_brace_expansion.default)(pattern);
1330
+ };
1331
+ minimatch.braceExpand = braceExpand;
1332
+ var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
1333
+ minimatch.makeRe = makeRe;
1334
+ var match = (list, pattern, options = {}) => {
1335
+ const mm = new Minimatch(pattern, options);
1336
+ list = list.filter((f) => mm.match(f));
1337
+ if (mm.options.nonull && !list.length) {
1338
+ list.push(pattern);
1339
+ }
1340
+ return list;
1341
+ };
1342
+ minimatch.match = match;
1343
+ var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
1344
+ var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1345
+ var Minimatch = class {
1346
+ options;
1347
+ set;
1348
+ pattern;
1349
+ windowsPathsNoEscape;
1350
+ nonegate;
1351
+ negate;
1352
+ comment;
1353
+ empty;
1354
+ preserveMultipleSlashes;
1355
+ partial;
1356
+ globSet;
1357
+ globParts;
1358
+ nocase;
1359
+ isWindows;
1360
+ platform;
1361
+ windowsNoMagicRoot;
1362
+ regexp;
1363
+ constructor(pattern, options = {}) {
1364
+ assertValidPattern(pattern);
1365
+ options = options || {};
1366
+ this.options = options;
1367
+ this.pattern = pattern;
1368
+ this.platform = options.platform || defaultPlatform;
1369
+ this.isWindows = this.platform === "win32";
1370
+ this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
1371
+ if (this.windowsPathsNoEscape) {
1372
+ this.pattern = this.pattern.replace(/\\/g, "/");
1373
+ }
1374
+ this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
1375
+ this.regexp = null;
1376
+ this.negate = false;
1377
+ this.nonegate = !!options.nonegate;
1378
+ this.comment = false;
1379
+ this.empty = false;
1380
+ this.partial = !!options.partial;
1381
+ this.nocase = !!this.options.nocase;
1382
+ this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase);
1383
+ this.globSet = [];
1384
+ this.globParts = [];
1385
+ this.set = [];
1386
+ this.make();
1387
+ }
1388
+ hasMagic() {
1389
+ if (this.options.magicalBraces && this.set.length > 1) {
1390
+ return true;
1391
+ }
1392
+ for (const pattern of this.set) {
1393
+ for (const part of pattern) {
1394
+ if (typeof part !== "string")
1395
+ return true;
1396
+ }
1397
+ }
1398
+ return false;
1399
+ }
1400
+ debug(..._) {
1401
+ }
1402
+ make() {
1403
+ const pattern = this.pattern;
1404
+ const options = this.options;
1405
+ if (!options.nocomment && pattern.charAt(0) === "#") {
1406
+ this.comment = true;
1407
+ return;
1408
+ }
1409
+ if (!pattern) {
1410
+ this.empty = true;
1411
+ return;
1412
+ }
1413
+ this.parseNegate();
1414
+ this.globSet = [...new Set(this.braceExpand())];
1415
+ if (options.debug) {
1416
+ this.debug = (...args) => console.error(...args);
1417
+ }
1418
+ this.debug(this.pattern, this.globSet);
1419
+ const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
1420
+ this.globParts = this.preprocess(rawGlobParts);
1421
+ this.debug(this.pattern, this.globParts);
1422
+ let set = this.globParts.map((s, _, __) => {
1423
+ if (this.isWindows && this.windowsNoMagicRoot) {
1424
+ const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
1425
+ const isDrive = /^[a-z]:/i.test(s[0]);
1426
+ if (isUNC) {
1427
+ return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
1428
+ } else if (isDrive) {
1429
+ return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
1430
+ }
1431
+ }
1432
+ return s.map((ss) => this.parse(ss));
1433
+ });
1434
+ this.debug(this.pattern, set);
1435
+ this.set = set.filter((s) => s.indexOf(false) === -1);
1436
+ if (this.isWindows) {
1437
+ for (let i2 = 0; i2 < this.set.length; i2++) {
1438
+ const p = this.set[i2];
1439
+ if (p[0] === "" && p[1] === "" && this.globParts[i2][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) {
1440
+ p[2] = "?";
1441
+ }
1442
+ }
1443
+ }
1444
+ this.debug(this.pattern, this.set);
1445
+ }
1446
+ // various transforms to equivalent pattern sets that are
1447
+ // faster to process in a filesystem walk. The goal is to
1448
+ // eliminate what we can, and push all ** patterns as far
1449
+ // to the right as possible, even if it increases the number
1450
+ // of patterns that we have to process.
1451
+ preprocess(globParts) {
1452
+ if (this.options.noglobstar) {
1453
+ for (let i2 = 0; i2 < globParts.length; i2++) {
1454
+ for (let j = 0; j < globParts[i2].length; j++) {
1455
+ if (globParts[i2][j] === "**") {
1456
+ globParts[i2][j] = "*";
1457
+ }
1458
+ }
1459
+ }
1460
+ }
1461
+ const { optimizationLevel = 1 } = this.options;
1462
+ if (optimizationLevel >= 2) {
1463
+ globParts = this.firstPhasePreProcess(globParts);
1464
+ globParts = this.secondPhasePreProcess(globParts);
1465
+ } else if (optimizationLevel >= 1) {
1466
+ globParts = this.levelOneOptimize(globParts);
1467
+ } else {
1468
+ globParts = this.adjascentGlobstarOptimize(globParts);
1469
+ }
1470
+ return globParts;
1471
+ }
1472
+ // just get rid of adjascent ** portions
1473
+ adjascentGlobstarOptimize(globParts) {
1474
+ return globParts.map((parts) => {
1475
+ let gs = -1;
1476
+ while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
1477
+ let i2 = gs;
1478
+ while (parts[i2 + 1] === "**") {
1479
+ i2++;
1480
+ }
1481
+ if (i2 !== gs) {
1482
+ parts.splice(gs, i2 - gs);
1483
+ }
1484
+ }
1485
+ return parts;
1486
+ });
1487
+ }
1488
+ // get rid of adjascent ** and resolve .. portions
1489
+ levelOneOptimize(globParts) {
1490
+ return globParts.map((parts) => {
1491
+ parts = parts.reduce((set, part) => {
1492
+ const prev = set[set.length - 1];
1493
+ if (part === "**" && prev === "**") {
1494
+ return set;
1495
+ }
1496
+ if (part === "..") {
1497
+ if (prev && prev !== ".." && prev !== "." && prev !== "**") {
1498
+ set.pop();
1499
+ return set;
1500
+ }
1501
+ }
1502
+ set.push(part);
1503
+ return set;
1504
+ }, []);
1505
+ return parts.length === 0 ? [""] : parts;
1506
+ });
1507
+ }
1508
+ levelTwoFileOptimize(parts) {
1509
+ if (!Array.isArray(parts)) {
1510
+ parts = this.slashSplit(parts);
1511
+ }
1512
+ let didSomething = false;
1513
+ do {
1514
+ didSomething = false;
1515
+ if (!this.preserveMultipleSlashes) {
1516
+ for (let i2 = 1; i2 < parts.length - 1; i2++) {
1517
+ const p = parts[i2];
1518
+ if (i2 === 1 && p === "" && parts[0] === "")
1519
+ continue;
1520
+ if (p === "." || p === "") {
1521
+ didSomething = true;
1522
+ parts.splice(i2, 1);
1523
+ i2--;
1524
+ }
1525
+ }
1526
+ if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
1527
+ didSomething = true;
1528
+ parts.pop();
1529
+ }
1530
+ }
1531
+ let dd = 0;
1532
+ while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
1533
+ const p = parts[dd - 1];
1534
+ if (p && p !== "." && p !== ".." && p !== "**") {
1535
+ didSomething = true;
1536
+ parts.splice(dd - 1, 2);
1537
+ dd -= 2;
1538
+ }
1539
+ }
1540
+ } while (didSomething);
1541
+ return parts.length === 0 ? [""] : parts;
1542
+ }
1543
+ // First phase: single-pattern processing
1544
+ // <pre> is 1 or more portions
1545
+ // <rest> is 1 or more portions
1546
+ // <p> is any portion other than ., .., '', or **
1547
+ // <e> is . or ''
1548
+ //
1549
+ // **/.. is *brutal* for filesystem walking performance, because
1550
+ // it effectively resets the recursive walk each time it occurs,
1551
+ // and ** cannot be reduced out by a .. pattern part like a regexp
1552
+ // or most strings (other than .., ., and '') can be.
1553
+ //
1554
+ // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
1555
+ // <pre>/<e>/<rest> -> <pre>/<rest>
1556
+ // <pre>/<p>/../<rest> -> <pre>/<rest>
1557
+ // **/**/<rest> -> **/<rest>
1558
+ //
1559
+ // **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
1560
+ // this WOULD be allowed if ** did follow symlinks, or * didn't
1561
+ firstPhasePreProcess(globParts) {
1562
+ let didSomething = false;
1563
+ do {
1564
+ didSomething = false;
1565
+ for (let parts of globParts) {
1566
+ let gs = -1;
1567
+ while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
1568
+ let gss = gs;
1569
+ while (parts[gss + 1] === "**") {
1570
+ gss++;
1571
+ }
1572
+ if (gss > gs) {
1573
+ parts.splice(gs + 1, gss - gs);
1574
+ }
1575
+ let next = parts[gs + 1];
1576
+ const p = parts[gs + 2];
1577
+ const p2 = parts[gs + 3];
1578
+ if (next !== "..")
1579
+ continue;
1580
+ if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
1581
+ continue;
1582
+ }
1583
+ didSomething = true;
1584
+ parts.splice(gs, 1);
1585
+ const other = parts.slice(0);
1586
+ other[gs] = "**";
1587
+ globParts.push(other);
1588
+ gs--;
1589
+ }
1590
+ if (!this.preserveMultipleSlashes) {
1591
+ for (let i2 = 1; i2 < parts.length - 1; i2++) {
1592
+ const p = parts[i2];
1593
+ if (i2 === 1 && p === "" && parts[0] === "")
1594
+ continue;
1595
+ if (p === "." || p === "") {
1596
+ didSomething = true;
1597
+ parts.splice(i2, 1);
1598
+ i2--;
1599
+ }
1600
+ }
1601
+ if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
1602
+ didSomething = true;
1603
+ parts.pop();
1604
+ }
1605
+ }
1606
+ let dd = 0;
1607
+ while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
1608
+ const p = parts[dd - 1];
1609
+ if (p && p !== "." && p !== ".." && p !== "**") {
1610
+ didSomething = true;
1611
+ const needDot = dd === 1 && parts[dd + 1] === "**";
1612
+ const splin = needDot ? ["."] : [];
1613
+ parts.splice(dd - 1, 2, ...splin);
1614
+ if (parts.length === 0)
1615
+ parts.push("");
1616
+ dd -= 2;
1617
+ }
1618
+ }
1619
+ }
1620
+ } while (didSomething);
1621
+ return globParts;
1622
+ }
1623
+ // second phase: multi-pattern dedupes
1624
+ // {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
1625
+ // {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
1626
+ // {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
1627
+ //
1628
+ // {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
1629
+ // ^-- not valid because ** doens't follow symlinks
1630
+ secondPhasePreProcess(globParts) {
1631
+ for (let i2 = 0; i2 < globParts.length - 1; i2++) {
1632
+ for (let j = i2 + 1; j < globParts.length; j++) {
1633
+ const matched = this.partsMatch(globParts[i2], globParts[j], !this.preserveMultipleSlashes);
1634
+ if (!matched)
1635
+ continue;
1636
+ globParts[i2] = matched;
1637
+ globParts[j] = [];
1638
+ }
1639
+ }
1640
+ return globParts.filter((gs) => gs.length);
1641
+ }
1642
+ partsMatch(a, b, emptyGSMatch = false) {
1643
+ let ai = 0;
1644
+ let bi = 0;
1645
+ let result = [];
1646
+ let which = "";
1647
+ while (ai < a.length && bi < b.length) {
1648
+ if (a[ai] === b[bi]) {
1649
+ result.push(which === "b" ? b[bi] : a[ai]);
1650
+ ai++;
1651
+ bi++;
1652
+ } else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
1653
+ result.push(a[ai]);
1654
+ ai++;
1655
+ } else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
1656
+ result.push(b[bi]);
1657
+ bi++;
1658
+ } else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
1659
+ if (which === "b")
1660
+ return false;
1661
+ which = "a";
1662
+ result.push(a[ai]);
1663
+ ai++;
1664
+ bi++;
1665
+ } else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
1666
+ if (which === "a")
1667
+ return false;
1668
+ which = "b";
1669
+ result.push(b[bi]);
1670
+ ai++;
1671
+ bi++;
1672
+ } else {
1673
+ return false;
1674
+ }
1675
+ }
1676
+ return a.length === b.length && result;
1677
+ }
1678
+ parseNegate() {
1679
+ if (this.nonegate)
1680
+ return;
1681
+ const pattern = this.pattern;
1682
+ let negate = false;
1683
+ let negateOffset = 0;
1684
+ for (let i2 = 0; i2 < pattern.length && pattern.charAt(i2) === "!"; i2++) {
1685
+ negate = !negate;
1686
+ negateOffset++;
1687
+ }
1688
+ if (negateOffset)
1689
+ this.pattern = pattern.slice(negateOffset);
1690
+ this.negate = negate;
1691
+ }
1692
+ // set partial to true to test if, for example,
1693
+ // "/a/b" matches the start of "/*/b/*/d"
1694
+ // Partial means, if you run out of file before you run
1695
+ // out of pattern, then that's fine, as long as all
1696
+ // the parts match.
1697
+ matchOne(file, pattern, partial = false) {
1698
+ const options = this.options;
1699
+ if (this.isWindows) {
1700
+ const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
1701
+ const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
1702
+ const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
1703
+ const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
1704
+ const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
1705
+ const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
1706
+ if (typeof fdi === "number" && typeof pdi === "number") {
1707
+ const [fd, pd] = [file[fdi], pattern[pdi]];
1708
+ if (fd.toLowerCase() === pd.toLowerCase()) {
1709
+ pattern[pdi] = fd;
1710
+ if (pdi > fdi) {
1711
+ pattern = pattern.slice(pdi);
1712
+ } else if (fdi > pdi) {
1713
+ file = file.slice(fdi);
1714
+ }
1715
+ }
1716
+ }
1717
+ }
1718
+ const { optimizationLevel = 1 } = this.options;
1719
+ if (optimizationLevel >= 2) {
1720
+ file = this.levelTwoFileOptimize(file);
1721
+ }
1722
+ this.debug("matchOne", this, { file, pattern });
1723
+ this.debug("matchOne", file.length, pattern.length);
1724
+ for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
1725
+ this.debug("matchOne loop");
1726
+ var p = pattern[pi];
1727
+ var f = file[fi];
1728
+ this.debug(pattern, p, f);
1729
+ if (p === false) {
1730
+ return false;
1731
+ }
1732
+ if (p === GLOBSTAR) {
1733
+ this.debug("GLOBSTAR", [pattern, p, f]);
1734
+ var fr = fi;
1735
+ var pr = pi + 1;
1736
+ if (pr === pl) {
1737
+ this.debug("** at the end");
1738
+ for (; fi < fl; fi++) {
1739
+ if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
1740
+ return false;
1741
+ }
1742
+ return true;
1743
+ }
1744
+ while (fr < fl) {
1745
+ var swallowee = file[fr];
1746
+ this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
1747
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
1748
+ this.debug("globstar found match!", fr, fl, swallowee);
1749
+ return true;
1750
+ } else {
1751
+ if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
1752
+ this.debug("dot detected!", file, fr, pattern, pr);
1753
+ break;
1754
+ }
1755
+ this.debug("globstar swallow a segment, and continue");
1756
+ fr++;
1757
+ }
1758
+ }
1759
+ if (partial) {
1760
+ this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
1761
+ if (fr === fl) {
1762
+ return true;
1763
+ }
1764
+ }
1765
+ return false;
1766
+ }
1767
+ let hit;
1768
+ if (typeof p === "string") {
1769
+ hit = f === p;
1770
+ this.debug("string match", p, f, hit);
1771
+ } else {
1772
+ hit = p.test(f);
1773
+ this.debug("pattern match", p, f, hit);
1774
+ }
1775
+ if (!hit)
1776
+ return false;
1777
+ }
1778
+ if (fi === fl && pi === pl) {
1779
+ return true;
1780
+ } else if (fi === fl) {
1781
+ return partial;
1782
+ } else if (pi === pl) {
1783
+ return fi === fl - 1 && file[fi] === "";
1784
+ } else {
1785
+ throw new Error("wtf?");
1786
+ }
1787
+ }
1788
+ braceExpand() {
1789
+ return braceExpand(this.pattern, this.options);
1790
+ }
1791
+ parse(pattern) {
1792
+ assertValidPattern(pattern);
1793
+ const options = this.options;
1794
+ if (pattern === "**")
1795
+ return GLOBSTAR;
1796
+ if (pattern === "")
1797
+ return "";
1798
+ let m;
1799
+ let fastTest = null;
1800
+ if (m = pattern.match(starRE)) {
1801
+ fastTest = options.dot ? starTestDot : starTest;
1802
+ } else if (m = pattern.match(starDotExtRE)) {
1803
+ fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
1804
+ } else if (m = pattern.match(qmarksRE)) {
1805
+ fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
1806
+ } else if (m = pattern.match(starDotStarRE)) {
1807
+ fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
1808
+ } else if (m = pattern.match(dotStarRE)) {
1809
+ fastTest = dotStarTest;
1810
+ }
1811
+ const re = AST.fromGlob(pattern, this.options).toMMPattern();
1812
+ if (fastTest && typeof re === "object") {
1813
+ Reflect.defineProperty(re, "test", { value: fastTest });
1814
+ }
1815
+ return re;
1816
+ }
1817
+ makeRe() {
1818
+ if (this.regexp || this.regexp === false)
1819
+ return this.regexp;
1820
+ const set = this.set;
1821
+ if (!set.length) {
1822
+ this.regexp = false;
1823
+ return this.regexp;
1824
+ }
1825
+ const options = this.options;
1826
+ const twoStar = options.noglobstar ? star2 : options.dot ? twoStarDot : twoStarNoDot;
1827
+ const flags = new Set(options.nocase ? ["i"] : []);
1828
+ let re = set.map((pattern) => {
1829
+ const pp = pattern.map((p) => {
1830
+ if (p instanceof RegExp) {
1831
+ for (const f of p.flags.split(""))
1832
+ flags.add(f);
1833
+ }
1834
+ return typeof p === "string" ? regExpEscape2(p) : p === GLOBSTAR ? GLOBSTAR : p._src;
1835
+ });
1836
+ pp.forEach((p, i2) => {
1837
+ const next = pp[i2 + 1];
1838
+ const prev = pp[i2 - 1];
1839
+ if (p !== GLOBSTAR || prev === GLOBSTAR) {
1840
+ return;
1841
+ }
1842
+ if (prev === void 0) {
1843
+ if (next !== void 0 && next !== GLOBSTAR) {
1844
+ pp[i2 + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
1845
+ } else {
1846
+ pp[i2] = twoStar;
1847
+ }
1848
+ } else if (next === void 0) {
1849
+ pp[i2 - 1] = prev + "(?:\\/|" + twoStar + ")?";
1850
+ } else if (next !== GLOBSTAR) {
1851
+ pp[i2 - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
1852
+ pp[i2 + 1] = GLOBSTAR;
1853
+ }
1854
+ });
1855
+ return pp.filter((p) => p !== GLOBSTAR).join("/");
1856
+ }).join("|");
1857
+ const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
1858
+ re = "^" + open + re + close + "$";
1859
+ if (this.negate)
1860
+ re = "^(?!" + re + ").+$";
1861
+ try {
1862
+ this.regexp = new RegExp(re, [...flags].join(""));
1863
+ } catch (ex) {
1864
+ this.regexp = false;
1865
+ }
1866
+ return this.regexp;
1867
+ }
1868
+ slashSplit(p) {
1869
+ if (this.preserveMultipleSlashes) {
1870
+ return p.split("/");
1871
+ } else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
1872
+ return ["", ...p.split(/\/+/)];
1873
+ } else {
1874
+ return p.split(/\/+/);
1875
+ }
1876
+ }
1877
+ match(f, partial = this.partial) {
1878
+ this.debug("match", f, this.pattern);
1879
+ if (this.comment) {
1880
+ return false;
1881
+ }
1882
+ if (this.empty) {
1883
+ return f === "";
1884
+ }
1885
+ if (f === "/" && partial) {
1886
+ return true;
1887
+ }
1888
+ const options = this.options;
1889
+ if (this.isWindows) {
1890
+ f = f.split("\\").join("/");
1891
+ }
1892
+ const ff = this.slashSplit(f);
1893
+ this.debug(this.pattern, "split", ff);
1894
+ const set = this.set;
1895
+ this.debug(this.pattern, "set", set);
1896
+ let filename = ff[ff.length - 1];
1897
+ if (!filename) {
1898
+ for (let i2 = ff.length - 2; !filename && i2 >= 0; i2--) {
1899
+ filename = ff[i2];
1900
+ }
1901
+ }
1902
+ for (let i2 = 0; i2 < set.length; i2++) {
1903
+ const pattern = set[i2];
1904
+ let file = ff;
1905
+ if (options.matchBase && pattern.length === 1) {
1906
+ file = [filename];
1907
+ }
1908
+ const hit = this.matchOne(file, pattern, partial);
1909
+ if (hit) {
1910
+ if (options.flipNegate) {
1911
+ return true;
1912
+ }
1913
+ return !this.negate;
1914
+ }
1915
+ }
1916
+ if (options.flipNegate) {
1917
+ return false;
1918
+ }
1919
+ return this.negate;
1920
+ }
1921
+ static defaults(def) {
1922
+ return minimatch.defaults(def).Minimatch;
1923
+ }
1924
+ };
1925
+ minimatch.AST = AST;
1926
+ minimatch.Minimatch = Minimatch;
1927
+ minimatch.escape = escape;
1928
+ minimatch.unescape = unescape;
1929
+
336
1930
  // src/utils/query-nonce-meta-tag-content.ts
337
1931
  function queryNonceMetaTagContent(doc) {
338
1932
  var _a, _b, _c;
@@ -505,10 +2099,17 @@ function createStyleSheetIfNeededAndSupported(styles2) {
505
2099
  var globalStyleSheet;
506
2100
  function createShadowRoot(cmpMeta) {
507
2101
  var _a;
508
- const shadowRoot = BUILD.shadowDelegatesFocus ? this.attachShadow({
509
- mode: "open",
510
- delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)
511
- }) : this.attachShadow({ mode: "open" });
2102
+ const opts = { mode: "open" };
2103
+ if (BUILD.shadowDelegatesFocus) {
2104
+ opts.delegatesFocus = !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */);
2105
+ }
2106
+ if (BUILD.shadowSlotAssignmentManual) {
2107
+ const isManual = !!(cmpMeta.$flags$ & 1024 /* shadowSlotAssignmentManual */);
2108
+ if (isManual) {
2109
+ opts.slotAssignment = "manual";
2110
+ }
2111
+ }
2112
+ const shadowRoot = this.attachShadow(opts);
512
2113
  if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;
513
2114
  if (globalStyleSheet) {
514
2115
  if (supportsMutableAdoptedStyleSheets) {
@@ -1135,7 +2736,7 @@ var registerStyle = (scopeId2, cssText, allowCS) => {
1135
2736
  styles.set(scopeId2, style);
1136
2737
  };
1137
2738
  var addStyle = (styleContainerNode, cmpMeta, mode) => {
1138
- var _a;
2739
+ var _a, _b, _c;
1139
2740
  const scopeId2 = getScopeId(cmpMeta, mode);
1140
2741
  const style = styles.get(scopeId2);
1141
2742
  if (!BUILD.attachStyles || !win.document) {
@@ -1150,51 +2751,51 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
1150
2751
  if (!appliedStyles) {
1151
2752
  rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
1152
2753
  }
1153
- if (!appliedStyles.has(scopeId2)) {
1154
- if (BUILD.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
1155
- styleElm.innerHTML = style;
1156
- } else {
1157
- styleElm = win.document.createElement("style");
1158
- styleElm.innerHTML = style;
1159
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1160
- if (nonce != null) {
1161
- styleElm.setAttribute("nonce", nonce);
1162
- }
1163
- if ((BUILD.hydrateServerSide || BUILD.hotModuleReplacement) && (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */ || cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */)) {
1164
- styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
1165
- }
1166
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1167
- if (styleContainerNode.nodeName === "HEAD") {
1168
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1169
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1170
- styleContainerNode.insertBefore(
1171
- styleElm,
1172
- (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
1173
- );
1174
- } else if ("host" in styleContainerNode) {
1175
- if (supportsConstructableStylesheets) {
1176
- const stylesheet = new CSSStyleSheet();
1177
- stylesheet.replaceSync(style);
1178
- if (supportsMutableAdoptedStyleSheets) {
1179
- styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
1180
- } else {
1181
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
1182
- }
2754
+ const existingStyleElm = (BUILD.hydrateClientSide || BUILD.hotModuleReplacement) && styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
2755
+ if (existingStyleElm) {
2756
+ existingStyleElm.innerHTML = style;
2757
+ } else if (!appliedStyles.has(scopeId2)) {
2758
+ styleElm = win.document.createElement("style");
2759
+ styleElm.innerHTML = style;
2760
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
2761
+ if (nonce != null) {
2762
+ styleElm.setAttribute("nonce", nonce);
2763
+ }
2764
+ if ((BUILD.hydrateServerSide || BUILD.hotModuleReplacement) && (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */ || cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */ || cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
2765
+ styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
2766
+ }
2767
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
2768
+ if (styleContainerNode.nodeName === "HEAD") {
2769
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
2770
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
2771
+ styleContainerNode.insertBefore(
2772
+ styleElm,
2773
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
2774
+ );
2775
+ } else if ("host" in styleContainerNode) {
2776
+ if (supportsConstructableStylesheets) {
2777
+ const currentWindow = (_b = styleContainerNode.defaultView) != null ? _b : styleContainerNode.ownerDocument.defaultView;
2778
+ const stylesheet = new currentWindow.CSSStyleSheet();
2779
+ stylesheet.replaceSync(style);
2780
+ if (supportsMutableAdoptedStyleSheets) {
2781
+ styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
1183
2782
  } else {
1184
- const existingStyleContainer = styleContainerNode.querySelector("style");
1185
- if (existingStyleContainer) {
1186
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1187
- } else {
1188
- styleContainerNode.prepend(styleElm);
1189
- }
2783
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
1190
2784
  }
1191
2785
  } else {
1192
- styleContainerNode.append(styleElm);
2786
+ const existingStyleContainer = styleContainerNode.querySelector("style");
2787
+ if (existingStyleContainer) {
2788
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
2789
+ } else {
2790
+ styleContainerNode.prepend(styleElm);
2791
+ }
1193
2792
  }
2793
+ } else {
2794
+ styleContainerNode.append(styleElm);
1194
2795
  }
1195
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1196
- styleContainerNode.insertBefore(styleElm, null);
1197
- }
2796
+ }
2797
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2798
+ styleContainerNode.insertBefore(styleElm, null);
1198
2799
  }
1199
2800
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1200
2801
  styleElm.innerHTML += SLOT_FB_CSS;
@@ -1203,11 +2804,28 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
1203
2804
  appliedStyles.add(scopeId2);
1204
2805
  }
1205
2806
  }
1206
- } else if (BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
1207
- if (supportsMutableAdoptedStyleSheets) {
1208
- styleContainerNode.adoptedStyleSheets.push(style);
1209
- } else {
1210
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
2807
+ } else if (BUILD.constructableCSS) {
2808
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
2809
+ if (!appliedStyles) {
2810
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
2811
+ }
2812
+ if (!appliedStyles.has(scopeId2)) {
2813
+ const currentWindow = (_c = styleContainerNode.defaultView) != null ? _c : styleContainerNode.ownerDocument.defaultView;
2814
+ let stylesheet;
2815
+ if (style.constructor === currentWindow.CSSStyleSheet) {
2816
+ stylesheet = style;
2817
+ } else {
2818
+ stylesheet = new currentWindow.CSSStyleSheet();
2819
+ for (let i2 = 0; i2 < style.cssRules.length; i2++) {
2820
+ stylesheet.insertRule(style.cssRules[i2].cssText, i2);
2821
+ }
2822
+ }
2823
+ if (supportsMutableAdoptedStyleSheets) {
2824
+ styleContainerNode.adoptedStyleSheets.push(stylesheet);
2825
+ } else {
2826
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, stylesheet];
2827
+ }
2828
+ appliedStyles.add(scopeId2);
1211
2829
  }
1212
2830
  }
1213
2831
  }
@@ -1384,7 +3002,7 @@ var validateInputProperties = (inputElm) => {
1384
3002
 
1385
3003
  // src/runtime/client-hydrate.ts
1386
3004
  var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1387
- var _a, _b;
3005
+ var _a, _b, _c, _d;
1388
3006
  const endHydrate = createTime("hydrateClient", tagName);
1389
3007
  const shadowRoot = hostElm.shadowRoot;
1390
3008
  const childRenderNodes = [];
@@ -1477,6 +3095,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1477
3095
  let snGroupIdx;
1478
3096
  let snGroupLen;
1479
3097
  let slottedItem;
3098
+ let currentPos = 0;
1480
3099
  for (snIndex; snIndex < snLen; snIndex++) {
1481
3100
  slotGroup = slottedNodes[snIndex];
1482
3101
  if (!slotGroup || !slotGroup.length) continue;
@@ -1490,7 +3109,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1490
3109
  if (!hosts[slottedItem.hostId]) continue;
1491
3110
  const hostEle = hosts[slottedItem.hostId];
1492
3111
  if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1493
- hostEle.appendChild(slottedItem.node);
3112
+ hostEle.insertBefore(slottedItem.node, (_c = (_b = slotGroup[snGroupIdx - 1]) == null ? void 0 : _b.node) == null ? void 0 : _c.nextSibling);
1494
3113
  }
1495
3114
  if (!hostEle.shadowRoot || !shadowRoot) {
1496
3115
  if (!slottedItem.slot["s-cr"]) {
@@ -1501,14 +3120,15 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1501
3120
  slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1502
3121
  }
1503
3122
  }
1504
- addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1505
- if (((_b = slottedItem.node.parentElement) == null ? void 0 : _b.shadowRoot) && slottedItem.node["getAttribute"] && slottedItem.node.getAttribute("slot")) {
3123
+ addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"] || currentPos);
3124
+ if (((_d = slottedItem.node.parentElement) == null ? void 0 : _d.shadowRoot) && slottedItem.node["getAttribute"] && slottedItem.node.getAttribute("slot")) {
1506
3125
  slottedItem.node.removeAttribute("slot");
1507
3126
  }
1508
3127
  if (BUILD.experimentalSlotFixes) {
1509
3128
  patchSlottedNode(slottedItem.node);
1510
3129
  }
1511
3130
  }
3131
+ currentPos = (slottedItem.node["s-oo"] || currentPos) + 1;
1512
3132
  }
1513
3133
  }
1514
3134
  if (BUILD.scoped && scopeId2 && slotNodes.length) {
@@ -1530,7 +3150,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1530
3150
  if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
1531
3151
  if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
1532
3152
  node.removeAttribute("hidden");
1533
- } else if (node.nodeType === 8 /* CommentNode */ && !node.nodeValue || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
3153
+ } else if (node.nodeType === 8 /* CommentNode */ && !node.nodeValue) {
1534
3154
  node.parentNode.removeChild(node);
1535
3155
  }
1536
3156
  }
@@ -1697,10 +3317,6 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1697
3317
  vnode.$elm$ = node;
1698
3318
  vnode.$index$ = "0";
1699
3319
  parentVNode.$children$ = [vnode];
1700
- } else {
1701
- if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim() && !node["s-nr"]) {
1702
- node.remove();
1703
- }
1704
3320
  }
1705
3321
  return parentVNode;
1706
3322
  };
@@ -2071,16 +3687,16 @@ var applyStrictSelectorScope = (selector, scopeSelector2, hostSelector) => {
2071
3687
  let scopedSelector = "";
2072
3688
  let startIndex = 0;
2073
3689
  let res;
2074
- const sep = /( |>|\+|~(?!=))(?=(?:[^()]*\([^()]*\))*[^()]*$)\s*/g;
3690
+ const sep2 = /( |>|\+|~(?!=))(?=(?:[^()]*\([^()]*\))*[^()]*$)\s*/g;
2075
3691
  const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;
2076
3692
  let shouldScope = !hasHost;
2077
- while ((res = sep.exec(selector)) !== null) {
3693
+ while ((res = sep2.exec(selector)) !== null) {
2078
3694
  const separator = res[1];
2079
3695
  const part2 = selector.slice(startIndex, res.index).trim();
2080
3696
  shouldScope = shouldScope || part2.indexOf(_polyfillHostNoCombinator) > -1;
2081
3697
  const scopedPart = shouldScope ? _scopeSelectorPart(part2) : part2;
2082
3698
  scopedSelector += `${scopedPart} ${separator} `;
2083
- startIndex = sep.lastIndex;
3699
+ startIndex = sep2.lastIndex;
2084
3700
  }
2085
3701
  const part = selector.substring(startIndex);
2086
3702
  shouldScope = !part.match(_safePartRe) && (shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1);
@@ -2499,10 +4115,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
2499
4115
  elm.classList.add(elm["s-si"] = scopeId);
2500
4116
  }
2501
4117
  if (newVNode2.$children$) {
4118
+ const appendTarget = newVNode2.$tag$ === "template" ? elm.content : elm;
2502
4119
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
2503
4120
  childNode = createElm(oldParentVNode, newVNode2, i2);
2504
4121
  if (childNode) {
2505
- elm.appendChild(childNode);
4122
+ appendTarget.appendChild(childNode);
2506
4123
  }
2507
4124
  }
2508
4125
  }
@@ -2589,6 +4206,9 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
2589
4206
  if (BUILD.shadowDom && containerElm.shadowRoot && containerElm.tagName === hostTagName) {
2590
4207
  containerElm = containerElm.shadowRoot;
2591
4208
  }
4209
+ if (parentVNode.$tag$ === "template") {
4210
+ containerElm = containerElm.content;
4211
+ }
2592
4212
  for (; startIdx <= endIdx; ++startIdx) {
2593
4213
  if (vnodes[startIdx]) {
2594
4214
  childNode = createElm(null, parentVNode, startIdx);
@@ -2632,6 +4252,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
2632
4252
  let newEndVnode = newCh[newEndIdx];
2633
4253
  let node;
2634
4254
  let elmToMove;
4255
+ const containerElm = newVNode2.$tag$ === "template" ? parentElm.content : parentElm;
2635
4256
  while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
2636
4257
  if (oldStartVnode == null) {
2637
4258
  oldStartVnode = oldCh[++oldStartIdx];
@@ -2654,7 +4275,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
2654
4275
  putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
2655
4276
  }
2656
4277
  patch(oldStartVnode, newEndVnode, isInitialRender);
2657
- insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
4278
+ insertBefore(containerElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
2658
4279
  oldStartVnode = oldCh[++oldStartIdx];
2659
4280
  newEndVnode = newCh[--newEndIdx];
2660
4281
  } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
@@ -2662,7 +4283,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
2662
4283
  putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
2663
4284
  }
2664
4285
  patch(oldEndVnode, newStartVnode, isInitialRender);
2665
- insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
4286
+ insertBefore(containerElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
2666
4287
  oldEndVnode = oldCh[--oldEndIdx];
2667
4288
  newStartVnode = newCh[++newStartIdx];
2668
4289
  } else {
@@ -2937,13 +4558,16 @@ render() {
2937
4558
  for (const relocateData of relocateNodes) {
2938
4559
  const nodeToRelocate = relocateData.$nodeToRelocate$;
2939
4560
  const slotRefNode = relocateData.$slotRefNode$;
4561
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && isInitialLoad) {
4562
+ nodeToRelocate["s-ih"] = (_a = nodeToRelocate.hidden) != null ? _a : false;
4563
+ }
2940
4564
  if (slotRefNode) {
2941
4565
  const parentNodeRef = slotRefNode.parentNode;
2942
4566
  let insertBeforeNode = slotRefNode.nextSibling;
2943
4567
  if (!BUILD.hydrateServerSide && (!BUILD.experimentalSlotFixes || insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
2944
- let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
4568
+ let orgLocationNode = (_b = nodeToRelocate["s-ol"]) == null ? void 0 : _b.previousSibling;
2945
4569
  while (orgLocationNode) {
2946
- let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
4570
+ let refNode = (_c = orgLocationNode["s-nr"]) != null ? _c : null;
2947
4571
  if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
2948
4572
  refNode = refNode.nextSibling;
2949
4573
  while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
@@ -2966,18 +4590,13 @@ render() {
2966
4590
  }
2967
4591
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
2968
4592
  if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
2969
- nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
4593
+ nodeToRelocate.hidden = (_d = nodeToRelocate["s-ih"]) != null ? _d : false;
2970
4594
  }
2971
4595
  }
2972
4596
  }
2973
4597
  nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
2974
- } else {
2975
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
2976
- if (isInitialLoad) {
2977
- nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
2978
- }
2979
- nodeToRelocate.hidden = true;
2980
- }
4598
+ } else if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
4599
+ nodeToRelocate.hidden = true;
2981
4600
  }
2982
4601
  }
2983
4602
  }
@@ -3331,7 +4950,8 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
3331
4950
  if (BUILD.serializer && BUILD.reflect && cmpMeta.$attrsToReflect$) {
3332
4951
  if (instance && cmpMeta.$serializers$ && cmpMeta.$serializers$[propName]) {
3333
4952
  let attrVal = newVal;
3334
- for (const methodName of cmpMeta.$serializers$[propName]) {
4953
+ for (const serializer of cmpMeta.$serializers$[propName]) {
4954
+ const [[methodName]] = Object.entries(serializer);
3335
4955
  attrVal = instance[methodName](attrVal, propName);
3336
4956
  }
3337
4957
  hostRef.$serializerValues$.set(propName, attrVal);
@@ -3360,27 +4980,34 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
3360
4980
  );
3361
4981
  }
3362
4982
  }
3363
- if (!BUILD.lazyLoad || instance) {
3364
- if (BUILD.propChangeCallback && cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
3365
- const watchMethods = cmpMeta.$watchers$[propName];
3366
- if (watchMethods) {
3367
- watchMethods.map((watchMethodName) => {
3368
- try {
3369
- instance[watchMethodName](newVal, oldVal, propName);
3370
- } catch (e) {
3371
- consoleError(e, elm);
4983
+ if (BUILD.propChangeCallback && cmpMeta.$watchers$) {
4984
+ const watchMethods = cmpMeta.$watchers$[propName];
4985
+ if (watchMethods) {
4986
+ watchMethods.map((watcher) => {
4987
+ try {
4988
+ const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
4989
+ if (flags & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */) {
4990
+ if (!instance) {
4991
+ hostRef.$fetchedCbList$.push(() => {
4992
+ hostRef.$lazyInstance$[watchMethodName](newVal, oldVal, propName);
4993
+ });
4994
+ } else {
4995
+ instance[watchMethodName](newVal, oldVal, propName);
4996
+ }
3372
4997
  }
3373
- });
3374
- }
3375
- }
3376
- if (BUILD.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
3377
- if (instance.componentShouldUpdate) {
3378
- if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
3379
- return;
4998
+ } catch (e) {
4999
+ consoleError(e, elm);
3380
5000
  }
5001
+ });
5002
+ }
5003
+ }
5004
+ if (BUILD.updatable && (flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
5005
+ if (instance.componentShouldUpdate) {
5006
+ if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
5007
+ return;
3381
5008
  }
3382
- scheduleUpdate(hostRef, false);
3383
5009
  }
5010
+ scheduleUpdate(hostRef, false);
3384
5011
  }
3385
5012
  }
3386
5013
  };
@@ -3563,7 +5190,8 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
3563
5190
  this[propName] = deserializeVal;
3564
5191
  }
3565
5192
  };
3566
- for (const methodName of cmpMeta.$deserializers$[propName]) {
5193
+ for (const deserializer of cmpMeta.$deserializers$[propName]) {
5194
+ const [[methodName]] = Object.entries(deserializer);
3567
5195
  if (BUILD.lazyLoad) {
3568
5196
  if (hostRef.$lazyInstance$) {
3569
5197
  setVal(methodName, hostRef.$lazyInstance$);
@@ -3582,13 +5210,14 @@ More information: https://stenciljs.com/docs/properties#prop-mutability`
3582
5210
  return;
3583
5211
  } else if (propName == null) {
3584
5212
  const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
3585
- if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
5213
+ if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && newValue !== oldValue) {
3586
5214
  const elm = BUILD.lazyLoad ? hostRef.$hostElement$ : this;
3587
5215
  const instance = BUILD.lazyLoad ? hostRef.$lazyInstance$ : elm;
3588
5216
  const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
3589
- entry == null ? void 0 : entry.forEach((callbackName) => {
3590
- if (instance[callbackName] != null) {
3591
- instance[callbackName].call(instance, newValue, oldValue, attrName);
5217
+ entry == null ? void 0 : entry.forEach((watcher) => {
5218
+ const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
5219
+ if (instance[watchMethodName] != null && (flags2 & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */)) {
5220
+ instance[watchMethodName].call(instance, newValue, oldValue, attrName);
3592
5221
  }
3593
5222
  });
3594
5223
  }
@@ -3689,7 +5318,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
3689
5318
  }
3690
5319
  }
3691
5320
  const scopeId2 = getScopeId(cmpMeta, hostRef.$modeName$);
3692
- if (!styles.has(scopeId2)) {
5321
+ if (!styles.has(scopeId2) || BUILD.hotModuleReplacement && hmrVersionId) {
3693
5322
  const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
3694
5323
  if (BUILD.hydrateServerSide && BUILD.shadowDom) {
3695
5324
  if (cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */) {
@@ -3852,7 +5481,7 @@ var proxyCustomElement = (Cstr, compactMeta) => {
3852
5481
  if (BUILD.shadowDom && !supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
3853
5482
  cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;
3854
5483
  }
3855
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && cmpMeta.$flags$ & 256 /* hasRenderFn */) {
5484
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && cmpMeta.$flags$ & 256 /* hasSlot */) {
3856
5485
  if (BUILD.experimentalSlotFixes) {
3857
5486
  patchPseudoShadowDom(Cstr.prototype);
3858
5487
  } else {
@@ -4081,7 +5710,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
4081
5710
  return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
4082
5711
  }
4083
5712
  };
4084
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && cmpMeta.$flags$ & 256 /* hasRenderFn */) {
5713
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && cmpMeta.$flags$ & 256 /* hasSlot */) {
4085
5714
  if (BUILD.experimentalSlotFixes) {
4086
5715
  patchPseudoShadowDom(HostElement.prototype);
4087
5716
  } else {