@tokenoftrust/storefront-runner 2.0.8 → 2.0.9

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 (90) hide show
  1. package/package.json +1 -1
  2. package/pnpm-workspace.yaml +0 -3
  3. package/apps/storefront/.astro/content.d.ts +0 -159
  4. package/apps/storefront/.astro/integrations/_astrojs_cloudflare/cloudflare.d.ts +0 -1
  5. package/apps/storefront/.astro/types.d.ts +0 -3
  6. package/apps/storefront/node_modules/.bin/acorn +0 -43
  7. package/apps/storefront/node_modules/.bin/astro +0 -43
  8. package/apps/storefront/node_modules/.bin/astro-check +0 -43
  9. package/apps/storefront/node_modules/.bin/browserslist +0 -43
  10. package/apps/storefront/node_modules/.bin/cf-wrangler +0 -43
  11. package/apps/storefront/node_modules/.bin/depcruise +0 -43
  12. package/apps/storefront/node_modules/.bin/depcruise-baseline +0 -43
  13. package/apps/storefront/node_modules/.bin/depcruise-fmt +0 -43
  14. package/apps/storefront/node_modules/.bin/depcruise-wrap-stream-in-html +0 -43
  15. package/apps/storefront/node_modules/.bin/dependency-cruise +0 -43
  16. package/apps/storefront/node_modules/.bin/dependency-cruiser +0 -43
  17. package/apps/storefront/node_modules/.bin/drizzle-kit +0 -43
  18. package/apps/storefront/node_modules/.bin/esbuild +0 -43
  19. package/apps/storefront/node_modules/.bin/jiti +0 -43
  20. package/apps/storefront/node_modules/.bin/playwright +0 -43
  21. package/apps/storefront/node_modules/.bin/playwright-core +0 -43
  22. package/apps/storefront/node_modules/.bin/prettier +0 -43
  23. package/apps/storefront/node_modules/.bin/rollup +0 -43
  24. package/apps/storefront/node_modules/.bin/tsc +0 -43
  25. package/apps/storefront/node_modules/.bin/tsserver +0 -43
  26. package/apps/storefront/node_modules/.bin/tsx +0 -43
  27. package/apps/storefront/node_modules/.bin/vite +0 -43
  28. package/apps/storefront/node_modules/.bin/vitest +0 -43
  29. package/apps/storefront/node_modules/.bin/workerd +0 -43
  30. package/apps/storefront/node_modules/.bin/wrangler +0 -43
  31. package/apps/storefront/node_modules/.bin/wrangler2 +0 -43
  32. package/apps/storefront/node_modules/.bin/yaml +0 -43
  33. package/apps/storefront/node_modules/.vite/deps/@astrojs_preact_client__js.js +0 -58
  34. package/apps/storefront/node_modules/.vite/deps/@astrojs_preact_client__js.js.map +0 -1
  35. package/apps/storefront/node_modules/.vite/deps/@astrojs_preact_n_@preact_signals.js +0 -741
  36. package/apps/storefront/node_modules/.vite/deps/@astrojs_preact_n_@preact_signals.js.map +0 -1
  37. package/apps/storefront/node_modules/.vite/deps/@astrojs_preact_server__js.js +0 -2549
  38. package/apps/storefront/node_modules/.vite/deps/@astrojs_preact_server__js.js.map +0 -1
  39. package/apps/storefront/node_modules/.vite/deps/_metadata.json +0 -150
  40. package/apps/storefront/node_modules/.vite/deps/astro-BIHuWFxm.js +0 -434
  41. package/apps/storefront/node_modules/.vite/deps/astro-BIHuWFxm.js.map +0 -1
  42. package/apps/storefront/node_modules/.vite/deps/astro_n_aria-query.js +0 -6390
  43. package/apps/storefront/node_modules/.vite/deps/astro_n_aria-query.js.map +0 -1
  44. package/apps/storefront/node_modules/.vite/deps/astro_n_axobject-query.js +0 -2705
  45. package/apps/storefront/node_modules/.vite/deps/astro_n_axobject-query.js.map +0 -1
  46. package/apps/storefront/node_modules/.vite/deps/astro_n_html-escaper.js +0 -65
  47. package/apps/storefront/node_modules/.vite/deps/astro_n_html-escaper.js.map +0 -1
  48. package/apps/storefront/node_modules/.vite/deps/astro_runtime_client_dev-toolbar_entrypoint__js.js +0 -455
  49. package/apps/storefront/node_modules/.vite/deps/astro_runtime_client_dev-toolbar_entrypoint__js.js.map +0 -1
  50. package/apps/storefront/node_modules/.vite/deps/audit-DKDpcdEI.js +0 -1535
  51. package/apps/storefront/node_modules/.vite/deps/audit-DKDpcdEI.js.map +0 -1
  52. package/apps/storefront/node_modules/.vite/deps/highlight-B9UoX1wa.js +0 -48
  53. package/apps/storefront/node_modules/.vite/deps/highlight-B9UoX1wa.js.map +0 -1
  54. package/apps/storefront/node_modules/.vite/deps/icons-BWi2wI9n.js +0 -42
  55. package/apps/storefront/node_modules/.vite/deps/icons-BWi2wI9n.js.map +0 -1
  56. package/apps/storefront/node_modules/.vite/deps/package.json +0 -3
  57. package/apps/storefront/node_modules/.vite/deps/preact.js +0 -310
  58. package/apps/storefront/node_modules/.vite/deps/preact.js.map +0 -1
  59. package/apps/storefront/node_modules/.vite/deps/preact_compat.js +0 -420
  60. package/apps/storefront/node_modules/.vite/deps/preact_compat.js.map +0 -1
  61. package/apps/storefront/node_modules/.vite/deps/preact_compat_jsx-runtime.js +0 -4
  62. package/apps/storefront/node_modules/.vite/deps/preact_debug.js +0 -236
  63. package/apps/storefront/node_modules/.vite/deps/preact_debug.js.map +0 -1
  64. package/apps/storefront/node_modules/.vite/deps/preact_devtools.js +0 -12
  65. package/apps/storefront/node_modules/.vite/deps/preact_devtools.js.map +0 -1
  66. package/apps/storefront/node_modules/.vite/deps/preact_hooks.js +0 -192
  67. package/apps/storefront/node_modules/.vite/deps/preact_hooks.js.map +0 -1
  68. package/apps/storefront/node_modules/.vite/deps/preact_jsx-dev-runtime.js +0 -3
  69. package/apps/storefront/node_modules/.vite/deps/preact_jsx-runtime.js +0 -92
  70. package/apps/storefront/node_modules/.vite/deps/preact_jsx-runtime.js.map +0 -1
  71. package/apps/storefront/node_modules/.vite/deps/preact_test-utils.js +0 -59
  72. package/apps/storefront/node_modules/.vite/deps/preact_test-utils.js.map +0 -1
  73. package/apps/storefront/node_modules/.vite/deps/rolldown-runtime-BPOCksWG.js +0 -24
  74. package/apps/storefront/node_modules/.vite/deps/settings-BVDV0Roj.js +0 -189
  75. package/apps/storefront/node_modules/.vite/deps/settings-BVDV0Roj.js.map +0 -1
  76. package/apps/storefront/node_modules/.vite/deps/static-html-DveYqwMo.js +0 -13
  77. package/apps/storefront/node_modules/.vite/deps/static-html-DveYqwMo.js.map +0 -1
  78. package/apps/storefront/node_modules/.vite/deps/toolbar-B3VIHCXg.js +0 -458
  79. package/apps/storefront/node_modules/.vite/deps/toolbar-B3VIHCXg.js.map +0 -1
  80. package/apps/storefront/node_modules/.vite/deps/ui-library-BK6ricUd.js +0 -1016
  81. package/apps/storefront/node_modules/.vite/deps/ui-library-BK6ricUd.js.map +0 -1
  82. package/apps/storefront/node_modules/.vite/deps/window-BvxDenKN.js +0 -32
  83. package/apps/storefront/node_modules/.vite/deps/window-BvxDenKN.js.map +0 -1
  84. package/apps/storefront/node_modules/.vite/deps/xray-YFiRUU0Z.js +0 -113
  85. package/apps/storefront/node_modules/.vite/deps/xray-YFiRUU0Z.js.map +0 -1
  86. package/apps/storefront/node_modules/.vite/deps_ssr/_metadata.json +0 -8
  87. package/apps/storefront/node_modules/.vite/deps_ssr/package.json +0 -3
  88. package/packages/public-runtime/node_modules/.bin/tsc +0 -43
  89. package/packages/public-runtime/node_modules/.bin/tsserver +0 -43
  90. package/packages/public-runtime/node_modules/.bin/vitest +0 -43
@@ -1,2549 +0,0 @@
1
- import { n as __toESM, t as __commonJSMin } from "./rolldown-runtime-BPOCksWG.js";
2
- import { Component as C$1, Fragment as S$1, createElement as k$1, options as l$1 } from "./preact.js";
3
- import { t as static_html_default } from "./static-html-DveYqwMo.js";
4
- import opts from "astro:preact:opts";
5
- //#region ../../node_modules/.pnpm/preact-render-to-string@6.7.0_preact@10.29.8/node_modules/preact-render-to-string/dist/index.module.js
6
- var r = "diffed";
7
- var o = "__c";
8
- var i = "__s";
9
- var a = "__c";
10
- var c = "__k";
11
- var u = "__d";
12
- var s = "__s";
13
- var l = /[\s\n\\/='"\0<>]/;
14
- var f = /^(xlink|xmlns|xml)([A-Z])/;
15
- var p = /^(?:accessK|auto[A-Z]|cell|ch|col|cont|cross|dateT|encT|form[A-Z]|frame|hrefL|inputM|maxL|minL|noV|playsI|popoverT|readO|rowS|src[A-Z]|tabI|useM|item[A-Z])/;
16
- var h = /^ac|^ali|arabic|basel|cap|clipPath$|clipRule$|color|dominant|enable|fill|flood|font|glyph[^R]|horiz|image|letter|lighting|marker[^WUH]|overline|panose|pointe|paint|rendering|shape|stop|strikethrough|stroke|text[^L]|transform|underline|unicode|units|^v[^i]|^w|^xH/;
17
- var d = /* @__PURE__ */ new Set(["draggable", "spellcheck"]);
18
- function v(e) {
19
- void 0 !== e.__g ? e.__g |= 8 : e[u] = !0;
20
- }
21
- function m(e) {
22
- void 0 !== e.__g ? e.__g &= -9 : e[u] = !1;
23
- }
24
- function y(e) {
25
- return void 0 !== e.__g ? !!(8 & e.__g) : !0 === e[u];
26
- }
27
- var _ = /["&<]/;
28
- function g(e) {
29
- if (0 === e.length || !1 === _.test(e)) return e;
30
- for (var t = 0, n = 0, r = "", o = ""; n < e.length; n++) {
31
- switch (e.charCodeAt(n)) {
32
- case 34:
33
- o = "&quot;";
34
- break;
35
- case 38:
36
- o = "&amp;";
37
- break;
38
- case 60:
39
- o = "&lt;";
40
- break;
41
- default: continue;
42
- }
43
- n !== t && (r += e.slice(t, n)), r += o, t = n + 1;
44
- }
45
- return n !== t && (r += e.slice(t, n)), r;
46
- }
47
- var b = {};
48
- var x = /* @__PURE__ */ new Set([
49
- "animation-iteration-count",
50
- "border-image-outset",
51
- "border-image-slice",
52
- "border-image-width",
53
- "box-flex",
54
- "box-flex-group",
55
- "box-ordinal-group",
56
- "column-count",
57
- "fill-opacity",
58
- "flex",
59
- "flex-grow",
60
- "flex-negative",
61
- "flex-order",
62
- "flex-positive",
63
- "flex-shrink",
64
- "flood-opacity",
65
- "font-weight",
66
- "grid-column",
67
- "grid-row",
68
- "line-clamp",
69
- "line-height",
70
- "opacity",
71
- "order",
72
- "orphans",
73
- "stop-opacity",
74
- "stroke-dasharray",
75
- "stroke-dashoffset",
76
- "stroke-miterlimit",
77
- "stroke-opacity",
78
- "stroke-width",
79
- "tab-size",
80
- "widows",
81
- "z-index",
82
- "zoom"
83
- ]);
84
- var k = /[A-Z]/g;
85
- function w(e) {
86
- var t = "";
87
- for (var n in e) {
88
- var r = e[n];
89
- if (null != r && "" !== r) {
90
- var o = "-" == n[0] ? n : b[n] || (b[n] = n.replace(k, "-$&").toLowerCase()), i = ";";
91
- "number" != typeof r || o.startsWith("--") || x.has(o) || (i = "px;"), t = t + o + ":" + r + i;
92
- }
93
- }
94
- return t || void 0;
95
- }
96
- function C() {
97
- this.__d = !0;
98
- }
99
- function A(e, t) {
100
- return {
101
- __v: e,
102
- context: t,
103
- props: e.props,
104
- setState: C,
105
- forceUpdate: C,
106
- __d: !0,
107
- __h: new Array(0)
108
- };
109
- }
110
- function S(e, t, n) {
111
- if (!e.s) {
112
- if (n instanceof L) {
113
- if (!n.s) return void (n.o = S.bind(null, e, t));
114
- 1 & t && (t = n.s), n = n.v;
115
- }
116
- if (n && n.then) return void n.then(S.bind(null, e, t), S.bind(null, e, 2));
117
- e.s = t, e.v = n;
118
- const r = e.o;
119
- r && r(e);
120
- }
121
- }
122
- var L = /*#__PURE__*/ function() {
123
- function e() {}
124
- return e.prototype.then = function(t, n) {
125
- var r = new e(), o = this.s;
126
- if (o) {
127
- var i = 1 & o ? t : n;
128
- if (i) {
129
- try {
130
- S(r, 1, i(this.v));
131
- } catch (e) {
132
- S(r, 2, e);
133
- }
134
- return r;
135
- }
136
- return this;
137
- }
138
- return this.o = function(e) {
139
- try {
140
- var o = e.v;
141
- 1 & e.s ? S(r, 1, t ? t(o) : o) : n ? S(r, 1, n(o)) : S(r, 2, o);
142
- } catch (e) {
143
- S(r, 2, e);
144
- }
145
- }, r;
146
- }, e;
147
- }();
148
- function E(e) {
149
- return e instanceof L && 1 & e.s;
150
- }
151
- function j(e, t, n) {
152
- for (var r;;) {
153
- var o = e();
154
- if (E(o) && (o = o.v), !o) return i;
155
- if (o.then) {
156
- r = 0;
157
- break;
158
- }
159
- var i = n();
160
- if (i && i.then) {
161
- if (!E(i)) {
162
- r = 1;
163
- break;
164
- }
165
- i = i.s;
166
- }
167
- if (t) {
168
- var a = t();
169
- if (a && a.then && !E(a)) {
170
- r = 2;
171
- break;
172
- }
173
- }
174
- }
175
- var c = new L(), u = S.bind(null, c, 2);
176
- return (0 === r ? o.then(l) : 1 === r ? i.then(s) : a.then(f)).then(void 0, u), c;
177
- function s(r) {
178
- i = r;
179
- do {
180
- if (t && (a = t()) && a.then && !E(a)) return void a.then(f).then(void 0, u);
181
- if (!(o = e()) || E(o) && !o.v) return void S(c, 1, i);
182
- if (o.then) return void o.then(l).then(void 0, u);
183
- E(i = n()) && (i = i.v);
184
- } while (!i || !i.then);
185
- i.then(s).then(void 0, u);
186
- }
187
- function l(e) {
188
- e ? (i = n()) && i.then ? i.then(s).then(void 0, u) : s(i) : S(c, 1, i);
189
- }
190
- function f() {
191
- (o = e()) ? o.then ? o.then(l).then(void 0, u) : l(o) : S(c, 1, i);
192
- }
193
- }
194
- function T(e, t) {
195
- try {
196
- var n = e();
197
- } catch (e) {
198
- return t(!0, e);
199
- }
200
- return n && n.then ? n.then(t.bind(null, !1), t.bind(null, !0)) : t(!1, n);
201
- }
202
- var D;
203
- var P;
204
- var $;
205
- var U;
206
- var Z = function(a, u) {
207
- try {
208
- var s = l$1[i];
209
- l$1[i] = !0, D = l$1.__b, P = l$1[r], $ = l$1.__r, U = l$1.unmount;
210
- var l = k$1(S$1, null);
211
- return l[c] = [a], Promise.resolve(T(function() {
212
- return Promise.resolve(R(a, u || F, !1, void 0, l, !0, void 0)).then(function(e) {
213
- var t, n = function() {
214
- if (W(e)) {
215
- var n = function() {
216
- var e = o.join(H);
217
- return t = 1, e;
218
- }, r = 0, o = e, i = j(function() {
219
- return !!o.some(function(e) {
220
- return e && "function" == typeof e.then;
221
- }) && r++ < 25;
222
- }, void 0, function() {
223
- return Promise.resolve(Promise.all(o)).then(function(e) {
224
- o = e.flat();
225
- });
226
- });
227
- return i && i.then ? i.then(n) : n();
228
- }
229
- }();
230
- return n && n.then ? n.then(function(n) {
231
- return t ? n : e;
232
- }) : t ? n : e;
233
- });
234
- }, function(t, n) {
235
- if (l$1[o] && l$1[o](a, M), l$1[i] = s, M.length = 0, t) throw n;
236
- return n;
237
- }));
238
- } catch (e) {
239
- return Promise.reject(e);
240
- }
241
- };
242
- var F = {};
243
- var M = [];
244
- var W = Array.isArray;
245
- var z = Object.assign;
246
- var H = "";
247
- var N = "<!--$s-->";
248
- var q = "<!--/$s-->";
249
- function B(e) {
250
- return "string" == typeof e ? N + e + q : W(e) ? (e.unshift(N), e.push(q), e) : e && "function" == typeof e.then ? e.then(B) : N + e + q;
251
- }
252
- function O(e, t) {
253
- var n, r = e.type, o = !0;
254
- return e[a] ? (o = !1, (n = e[a]).state = n[s]) : n = new r(e.props, t), e[a] = n, n.__v = e, n.props = e.props, n.context = t, v(n), n.state ?? (n.state = F), n[s] ?? (n[s] = n.state), r.getDerivedStateFromProps ? n.state = z({}, n.state, r.getDerivedStateFromProps(n.props, n.state)) : o && n.componentWillMount ? (n.componentWillMount(), n.state = n[s] !== n.state ? n[s] : n.state) : !o && n.componentWillUpdate && n.componentWillUpdate(), $ && $(e), n.render(n.props, n.state, t);
255
- }
256
- function R(t, r, o, i, u, _, b) {
257
- if (null == t || !0 === t || !1 === t || t === H) return H;
258
- var x = typeof t;
259
- if ("object" != x) return "function" == x ? H : "string" == x ? g(t) : t + H;
260
- if (W(t)) {
261
- var k, C = H;
262
- u[c] = t;
263
- for (var S = t.length, L = 0; L < S; L++) {
264
- var E = t[L];
265
- if (null != E && "boolean" != typeof E) {
266
- var j, T = R(E, r, o, i, u, _, b);
267
- "string" == typeof T ? C += T : (k || (k = new Array(S)), C && k.push(C), C = H, W(T) ? (j = k).push.apply(j, T) : k.push(T));
268
- }
269
- }
270
- return k ? (C && k.push(C), k) : C;
271
- }
272
- if (void 0 !== t.constructor) return H;
273
- t.__ = u, D && D(t);
274
- var Z = t.type, M = t.props;
275
- if ("function" == typeof Z) {
276
- var N, q, I, K = r;
277
- if (Z === S$1) {
278
- if ("tpl" in M) {
279
- for (var G = H, Q = 0; Q < M.tpl.length; Q++) if (G += M.tpl[Q], M.exprs && Q < M.exprs.length) {
280
- var X = M.exprs[Q];
281
- if (null == X) continue;
282
- "object" != typeof X || void 0 !== X.constructor && !W(X) ? G += X : G += R(X, r, o, i, t, _, b);
283
- }
284
- return G;
285
- }
286
- if ("UNSTABLE_comment" in M) return "<!--" + g(M.UNSTABLE_comment) + "-->";
287
- q = M.children;
288
- } else {
289
- if (null != (N = Z.contextType)) {
290
- var Y = r[N.__c];
291
- K = Y ? Y.props.value : N.__;
292
- }
293
- var ee = Z.prototype && "function" == typeof Z.prototype.render;
294
- if (ee) q = O(t, K), I = t[a];
295
- else {
296
- t[a] = I = A(t, K);
297
- for (var te = 0; y(I) && te++ < 25;) {
298
- m(I), $ && $(t);
299
- try {
300
- q = Z.call(I, M, K);
301
- } catch (e) {
302
- throw _ && e && "function" == typeof e.then && (t._suspended = !0), e;
303
- }
304
- }
305
- v(I);
306
- }
307
- if (null != I.getChildContext && (r = z({}, r, I.getChildContext())), ee && l$1.errorBoundaries && (Z.getDerivedStateFromError || I.componentDidCatch)) {
308
- q = null != q && q.type === S$1 && null == q.key && null == q.props.tpl ? q.props.children : q;
309
- try {
310
- return R(q, r, o, i, t, _, !1);
311
- } catch (e) {
312
- return Z.getDerivedStateFromError && (I[s] = Z.getDerivedStateFromError(e)), I.componentDidCatch && I.componentDidCatch(e, F), y(I) ? (q = O(t, r), null != (I = t[a]).getChildContext && (r = z({}, r, I.getChildContext())), R(q = null != q && q.type === S$1 && null == q.key && null == q.props.tpl ? q.props.children : q, r, o, i, t, _, b)) : H;
313
- } finally {
314
- P && P(t), U && U(t);
315
- }
316
- }
317
- }
318
- q = null != q && q.type === S$1 && null == q.key && null == q.props.tpl ? q.props.children : q;
319
- try {
320
- var ne = R(q, r, o, i, t, _, b);
321
- return P && P(t), l$1.unmount && l$1.unmount(t), t._suspended ? B(ne) : ne;
322
- } catch (n) {
323
- if (!_ && b && b.onError) {
324
- var re = function e(n) {
325
- return b.onError(n, t, function(t, n) {
326
- try {
327
- return R(t, r, o, i, n, _, b);
328
- } catch (t) {
329
- return e(t);
330
- }
331
- });
332
- }(n);
333
- if (void 0 !== re) return re;
334
- var oe = l$1.__e;
335
- return oe && oe(n, t), H;
336
- }
337
- if (!_) throw n;
338
- if (!n || "function" != typeof n.then) throw n;
339
- return n.then(function e() {
340
- try {
341
- var n = R(q, r, o, i, t, _, b);
342
- return t._suspended ? B(n) : n;
343
- } catch (t) {
344
- if (!t || "function" != typeof t.then) throw t;
345
- return t.then(e);
346
- }
347
- });
348
- }
349
- }
350
- var ie, ae = "<" + Z, ce = H;
351
- for (var ue in M) {
352
- var se = M[ue];
353
- if ("function" != typeof (se = J(se) ? se.value : se) || "class" === ue || "className" === ue) {
354
- switch (ue) {
355
- case "children":
356
- ie = se;
357
- continue;
358
- case "key":
359
- case "ref":
360
- case "__self":
361
- case "__source": continue;
362
- case "htmlFor":
363
- if ("for" in M) continue;
364
- ue = "for";
365
- break;
366
- case "className":
367
- if ("class" in M) continue;
368
- ue = "class";
369
- break;
370
- case "defaultChecked":
371
- ue = "checked";
372
- break;
373
- case "defaultSelected":
374
- ue = "selected";
375
- break;
376
- case "defaultValue":
377
- case "value":
378
- switch (ue = "value", Z) {
379
- case "textarea":
380
- ie = se;
381
- continue;
382
- case "select":
383
- i = se;
384
- continue;
385
- case "option": i != se || "selected" in M || (ae += " selected");
386
- }
387
- break;
388
- case "dangerouslySetInnerHTML":
389
- ce = se && se.__html;
390
- continue;
391
- case "style":
392
- "object" == typeof se && (se = w(se));
393
- break;
394
- case "acceptCharset":
395
- ue = "accept-charset";
396
- break;
397
- case "httpEquiv":
398
- ue = "http-equiv";
399
- break;
400
- default:
401
- if (l.test(ue)) continue;
402
- f.test(ue) ? ue = ue.replace(f, "$1:$2").toLowerCase() : "-" !== ue[4] && !d.has(ue) || null == se ? o ? h.test(ue) && (ue = "panose1" === ue ? "panose-1" : ue.replace(/([A-Z])/g, "-$1").toLowerCase()) : p.test(ue) && (ue = ue.toLowerCase()) : se += H;
403
- }
404
- null != se && !1 !== se && (ae = !0 === se || se === H ? ae + " " + ue : ae + " " + ue + "=\"" + ("string" == typeof se ? g(se) : se + H) + "\"");
405
- }
406
- }
407
- if (l.test(Z)) throw new Error(Z + " is not a valid HTML tag name in " + ae + ">");
408
- if (ce || ("string" == typeof ie ? ce = g(ie) : null != ie && !1 !== ie && !0 !== ie && (ce = R(ie, r, "svg" === Z || "foreignObject" !== Z && o, i, t, _, b))), P && P(t), U && U(t), !ce && V.has(Z)) return ae + "/>";
409
- var le = "</" + Z + ">", fe = ae + ">";
410
- return W(ce) ? [fe].concat(ce, [le]) : "string" != typeof ce ? [
411
- fe,
412
- ce,
413
- le
414
- ] : fe + ce + le;
415
- }
416
- var V = /* @__PURE__ */ new Set([
417
- "area",
418
- "base",
419
- "br",
420
- "col",
421
- "command",
422
- "embed",
423
- "hr",
424
- "img",
425
- "input",
426
- "keygen",
427
- "link",
428
- "meta",
429
- "param",
430
- "source",
431
- "track",
432
- "wbr"
433
- ]);
434
- function J(e) {
435
- return null !== e && "object" == typeof e && "function" == typeof e.peek && "value" in e;
436
- }
437
- //#endregion
438
- //#region ../../node_modules/.pnpm/@astrojs+preact@6.0.5_@babel+core@7.29.7_@types+node@26.4.1_esbuild@0.28.2_jiti@2.7.0_p_9974d7dcb4fcbb2fdffe5819f7140fba/node_modules/@astrojs/preact/dist/context.js
439
- var contexts = /* @__PURE__ */ new WeakMap();
440
- function getContext(result) {
441
- if (contexts.has(result)) return contexts.get(result);
442
- let ctx = {
443
- c: 0,
444
- islandCount: 0,
445
- get id() {
446
- return "p" + this.c.toString();
447
- },
448
- signals: /* @__PURE__ */ new Map(),
449
- propsToSignals: /* @__PURE__ */ new Map()
450
- };
451
- contexts.set(result, ctx);
452
- return ctx;
453
- }
454
- function incrementId(ctx) {
455
- let id = ctx.id;
456
- ctx.c++;
457
- return id;
458
- }
459
- function incrementIslandId(ctx) {
460
- const islandId = ctx.islandCount;
461
- ctx.islandCount++;
462
- return islandId;
463
- }
464
- //#endregion
465
- //#region ../../node_modules/.pnpm/@astrojs+preact@6.0.5_@babel+core@7.29.7_@types+node@26.4.1_esbuild@0.28.2_jiti@2.7.0_p_9974d7dcb4fcbb2fdffe5819f7140fba/node_modules/@astrojs/preact/dist/signals.js
466
- function isSignal(x) {
467
- return x != null && typeof x === "object" && typeof x.peek === "function" && "value" in x;
468
- }
469
- function restoreSignalsOnProps(ctx, props) {
470
- let propMap;
471
- if (ctx.propsToSignals.has(props)) propMap = ctx.propsToSignals.get(props);
472
- else {
473
- propMap = /* @__PURE__ */ new Map();
474
- ctx.propsToSignals.set(props, propMap);
475
- }
476
- for (const [key, signal] of propMap) props[key] = signal;
477
- return propMap;
478
- }
479
- function serializeSignals(ctx, props, attrs, map) {
480
- const signals = {};
481
- for (const [key, value] of Object.entries(props)) {
482
- const isPropArray = Array.isArray(value);
483
- const isPropObject = !isSignal(value) && typeof props[key] === "object" && props[key] !== null && !isPropArray;
484
- if (isPropObject || isPropArray) (isPropObject ? Object.keys(props[key]) : value).forEach((valueKey, valueIndex) => {
485
- const signal = isPropObject ? props[key][valueKey] : valueKey;
486
- if (isSignal(signal)) {
487
- const keyOrIndex = isPropObject ? valueKey.toString() : valueIndex;
488
- props[key] = isPropObject ? Object.assign({}, props[key], { [keyOrIndex]: signal.peek() }) : props[key].map((v, i) => i === valueIndex ? [signal.peek(), i] : v);
489
- const currentMap = map.get(key) || [];
490
- map.set(key, [...currentMap, [signal, keyOrIndex]]);
491
- const currentSignals = signals[key] || [];
492
- signals[key] = [...currentSignals, [getSignalId(ctx, signal), keyOrIndex]];
493
- }
494
- });
495
- else if (isSignal(value)) {
496
- props[key] = value.peek();
497
- map.set(key, value);
498
- signals[key] = getSignalId(ctx, value);
499
- }
500
- }
501
- if (Object.keys(signals).length) attrs["data-preact-signals"] = JSON.stringify(signals);
502
- }
503
- function getSignalId(ctx, item) {
504
- let id = ctx.signals.get(item);
505
- if (!id) {
506
- id = incrementId(ctx);
507
- ctx.signals.set(item, id);
508
- }
509
- return id;
510
- }
511
- //#endregion
512
- //#region ../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/constants.js
513
- var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
514
- var WIN_SLASH = "\\\\/";
515
- var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
516
- var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
517
- /**
518
- * Posix glob regex
519
- */
520
- var DOT_LITERAL = "\\.";
521
- var PLUS_LITERAL = "\\+";
522
- var QMARK_LITERAL = "\\?";
523
- var SLASH_LITERAL = "\\/";
524
- var ONE_CHAR = "(?=.)";
525
- var QMARK = "[^/]";
526
- var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
527
- var START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
528
- var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
529
- var POSIX_CHARS = {
530
- DOT_LITERAL,
531
- PLUS_LITERAL,
532
- QMARK_LITERAL,
533
- SLASH_LITERAL,
534
- ONE_CHAR,
535
- QMARK,
536
- END_ANCHOR,
537
- DOTS_SLASH,
538
- NO_DOT: `(?!${DOT_LITERAL})`,
539
- NO_DOTS: `(?!${START_ANCHOR}${DOTS_SLASH})`,
540
- NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`,
541
- NO_DOTS_SLASH: `(?!${DOTS_SLASH})`,
542
- QMARK_NO_DOT: `[^.${SLASH_LITERAL}]`,
543
- STAR: `${QMARK}*?`,
544
- START_ANCHOR,
545
- SEP: "/"
546
- };
547
- /**
548
- * Windows glob regex
549
- */
550
- var WINDOWS_CHARS = {
551
- ...POSIX_CHARS,
552
- SLASH_LITERAL: `[${WIN_SLASH}]`,
553
- QMARK: WIN_NO_SLASH,
554
- STAR: `${WIN_NO_SLASH}*?`,
555
- DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,
556
- NO_DOT: `(?!${DOT_LITERAL})`,
557
- NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
558
- NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,
559
- NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,
560
- QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
561
- START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
562
- END_ANCHOR: `(?:[${WIN_SLASH}]|$)`,
563
- SEP: "\\"
564
- };
565
- module.exports = {
566
- DEFAULT_MAX_EXTGLOB_RECURSION,
567
- MAX_LENGTH: 65536,
568
- POSIX_REGEX_SOURCE: {
569
- __proto__: null,
570
- alnum: "a-zA-Z0-9",
571
- alpha: "a-zA-Z",
572
- ascii: "\\x00-\\x7F",
573
- blank: " \\t",
574
- cntrl: "\\x00-\\x1F\\x7F",
575
- digit: "0-9",
576
- graph: "\\x21-\\x7E",
577
- lower: "a-z",
578
- print: "\\x20-\\x7E ",
579
- punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
580
- space: " \\t\\r\\n\\v\\f",
581
- upper: "A-Z",
582
- word: "A-Za-z0-9_",
583
- xdigit: "A-Fa-f0-9"
584
- },
585
- REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
586
- REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
587
- REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
588
- REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
589
- REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
590
- REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
591
- REPLACEMENTS: {
592
- __proto__: null,
593
- "***": "*",
594
- "**/**": "**",
595
- "**/**/**": "**"
596
- },
597
- CHAR_0: 48,
598
- CHAR_9: 57,
599
- CHAR_UPPERCASE_A: 65,
600
- CHAR_LOWERCASE_A: 97,
601
- CHAR_UPPERCASE_Z: 90,
602
- CHAR_LOWERCASE_Z: 122,
603
- CHAR_LEFT_PARENTHESES: 40,
604
- CHAR_RIGHT_PARENTHESES: 41,
605
- CHAR_ASTERISK: 42,
606
- CHAR_AMPERSAND: 38,
607
- CHAR_AT: 64,
608
- CHAR_BACKWARD_SLASH: 92,
609
- CHAR_CARRIAGE_RETURN: 13,
610
- CHAR_CIRCUMFLEX_ACCENT: 94,
611
- CHAR_COLON: 58,
612
- CHAR_COMMA: 44,
613
- CHAR_DOT: 46,
614
- CHAR_DOUBLE_QUOTE: 34,
615
- CHAR_EQUAL: 61,
616
- CHAR_EXCLAMATION_MARK: 33,
617
- CHAR_FORM_FEED: 12,
618
- CHAR_FORWARD_SLASH: 47,
619
- CHAR_GRAVE_ACCENT: 96,
620
- CHAR_HASH: 35,
621
- CHAR_HYPHEN_MINUS: 45,
622
- CHAR_LEFT_ANGLE_BRACKET: 60,
623
- CHAR_LEFT_CURLY_BRACE: 123,
624
- CHAR_LEFT_SQUARE_BRACKET: 91,
625
- CHAR_LINE_FEED: 10,
626
- CHAR_NO_BREAK_SPACE: 160,
627
- CHAR_PERCENT: 37,
628
- CHAR_PLUS: 43,
629
- CHAR_QUESTION_MARK: 63,
630
- CHAR_RIGHT_ANGLE_BRACKET: 62,
631
- CHAR_RIGHT_CURLY_BRACE: 125,
632
- CHAR_RIGHT_SQUARE_BRACKET: 93,
633
- CHAR_SEMICOLON: 59,
634
- CHAR_SINGLE_QUOTE: 39,
635
- CHAR_SPACE: 32,
636
- CHAR_TAB: 9,
637
- CHAR_UNDERSCORE: 95,
638
- CHAR_VERTICAL_LINE: 124,
639
- CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
640
- /**
641
- * Create EXTGLOB_CHARS
642
- */
643
- extglobChars(chars) {
644
- return {
645
- "!": {
646
- type: "negate",
647
- open: "(?:(?!(?:",
648
- close: `))${chars.STAR})`
649
- },
650
- "?": {
651
- type: "qmark",
652
- open: "(?:",
653
- close: ")?"
654
- },
655
- "+": {
656
- type: "plus",
657
- open: "(?:",
658
- close: ")+"
659
- },
660
- "*": {
661
- type: "star",
662
- open: "(?:",
663
- close: ")*"
664
- },
665
- "@": {
666
- type: "at",
667
- open: "(?:",
668
- close: ")"
669
- }
670
- };
671
- },
672
- /**
673
- * Create GLOB_CHARS
674
- */
675
- globChars(win32) {
676
- return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;
677
- }
678
- };
679
- }));
680
- //#endregion
681
- //#region ../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/utils.js
682
- var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
683
- var { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants();
684
- exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
685
- exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
686
- exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str);
687
- exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
688
- exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
689
- exports.isWindows = () => {
690
- if (typeof navigator !== "undefined" && navigator.platform) {
691
- const platform = navigator.platform.toLowerCase();
692
- return platform === "win32" || platform === "windows";
693
- }
694
- if (typeof process !== "undefined" && process.platform) return process.platform === "win32";
695
- return false;
696
- };
697
- exports.removeBackslashes = (str) => {
698
- return str.replace(REGEX_REMOVE_BACKSLASH, (match) => {
699
- return match === "\\" ? "" : match;
700
- });
701
- };
702
- exports.escapeLast = (input, char, lastIdx) => {
703
- const idx = input.lastIndexOf(char, lastIdx);
704
- if (idx === -1) return input;
705
- if (input[idx - 1] === "\\") return exports.escapeLast(input, char, idx - 1);
706
- return `${input.slice(0, idx)}\\${input.slice(idx)}`;
707
- };
708
- exports.removePrefix = (input, state = {}) => {
709
- let output = input;
710
- if (output.startsWith("./")) {
711
- output = output.slice(2);
712
- state.prefix = "./";
713
- }
714
- return output;
715
- };
716
- exports.wrapOutput = (input, state = {}, options = {}) => {
717
- let output = `${options.contains ? "" : "^"}(?:${input})${options.contains ? "" : "$"}`;
718
- if (state.negated === true) output = `(?:^(?!${output}).*$)`;
719
- return output;
720
- };
721
- exports.basename = (path, { windows } = {}) => {
722
- const segs = path.split(windows ? /[\\/]/ : "/");
723
- const last = segs[segs.length - 1];
724
- if (last === "") return segs[segs.length - 2];
725
- return last;
726
- };
727
- }));
728
- //#endregion
729
- //#region ../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/scan.js
730
- var require_scan = /* @__PURE__ */ __commonJSMin(((exports, module) => {
731
- var utils = require_utils();
732
- var { CHAR_ASTERISK, CHAR_AT, CHAR_BACKWARD_SLASH, CHAR_COMMA, CHAR_DOT, CHAR_EXCLAMATION_MARK, CHAR_FORWARD_SLASH, CHAR_LEFT_CURLY_BRACE, CHAR_LEFT_PARENTHESES, CHAR_LEFT_SQUARE_BRACKET, CHAR_PLUS, CHAR_QUESTION_MARK, CHAR_RIGHT_CURLY_BRACE, CHAR_RIGHT_PARENTHESES, CHAR_RIGHT_SQUARE_BRACKET } = require_constants();
733
- var isPathSeparator = (code) => {
734
- return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
735
- };
736
- var depth = (token) => {
737
- if (token.isPrefix !== true) token.depth = token.isGlobstar ? Infinity : 1;
738
- };
739
- /**
740
- * Quickly scans a glob pattern and returns an object with a handful of
741
- * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),
742
- * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not
743
- * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).
744
- *
745
- * ```js
746
- * const pm = require('picomatch');
747
- * console.log(pm.scan('foo/bar/*.js'));
748
- * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }
749
- * ```
750
- * @param {String} `str`
751
- * @param {Object} `options`
752
- * @return {Object} Returns an object with tokens and regex source string.
753
- * @api public
754
- */
755
- var scan = (input, options) => {
756
- const opts = options || {};
757
- const length = input.length - 1;
758
- const scanToEnd = opts.parts === true || opts.tokens === true || opts.scanToEnd === true;
759
- const slashes = [];
760
- const tokens = [];
761
- const parts = [];
762
- let str = input;
763
- let index = -1;
764
- let start = 0;
765
- let lastIndex = 0;
766
- let isBrace = false;
767
- let isBracket = false;
768
- let isGlob = false;
769
- let isExtglob = false;
770
- let isGlobstar = false;
771
- let braceEscaped = false;
772
- let backslashes = false;
773
- let negated = false;
774
- let negatedExtglob = false;
775
- let finished = false;
776
- let braces = 0;
777
- let prev;
778
- let code;
779
- let token = {
780
- value: "",
781
- depth: 0,
782
- isGlob: false
783
- };
784
- const eos = () => index >= length;
785
- const peek = () => str.charCodeAt(index + 1);
786
- const advance = () => {
787
- prev = code;
788
- return str.charCodeAt(++index);
789
- };
790
- while (index < length) {
791
- code = advance();
792
- let next;
793
- if (code === CHAR_BACKWARD_SLASH) {
794
- backslashes = token.backslashes = true;
795
- code = advance();
796
- if (code === CHAR_LEFT_CURLY_BRACE) braceEscaped = true;
797
- continue;
798
- }
799
- if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {
800
- braces++;
801
- while (eos() !== true && (code = advance())) {
802
- if (code === CHAR_BACKWARD_SLASH) {
803
- backslashes = token.backslashes = true;
804
- advance();
805
- continue;
806
- }
807
- if (code === CHAR_LEFT_CURLY_BRACE) {
808
- braces++;
809
- continue;
810
- }
811
- if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
812
- isBrace = token.isBrace = true;
813
- isGlob = token.isGlob = true;
814
- finished = true;
815
- if (scanToEnd === true) continue;
816
- break;
817
- }
818
- if (braceEscaped !== true && code === CHAR_COMMA) {
819
- isBrace = token.isBrace = true;
820
- isGlob = token.isGlob = true;
821
- finished = true;
822
- if (scanToEnd === true) continue;
823
- break;
824
- }
825
- if (code === CHAR_RIGHT_CURLY_BRACE) {
826
- braces--;
827
- if (braces === 0) {
828
- braceEscaped = false;
829
- isBrace = token.isBrace = true;
830
- finished = true;
831
- break;
832
- }
833
- }
834
- }
835
- if (scanToEnd === true) continue;
836
- break;
837
- }
838
- if (code === CHAR_FORWARD_SLASH) {
839
- slashes.push(index);
840
- tokens.push(token);
841
- token = {
842
- value: "",
843
- depth: 0,
844
- isGlob: false
845
- };
846
- if (finished === true) continue;
847
- if (prev === CHAR_DOT && index === start + 1) {
848
- start += 2;
849
- continue;
850
- }
851
- lastIndex = index + 1;
852
- continue;
853
- }
854
- if (opts.noext !== true) {
855
- if ((code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK) === true && peek() === CHAR_LEFT_PARENTHESES) {
856
- isGlob = token.isGlob = true;
857
- isExtglob = token.isExtglob = true;
858
- finished = true;
859
- if (code === CHAR_EXCLAMATION_MARK && index === start) negatedExtglob = true;
860
- if (scanToEnd === true) {
861
- let parens = 0;
862
- while (eos() !== true && (code = advance())) {
863
- if (code === CHAR_BACKWARD_SLASH) {
864
- backslashes = token.backslashes = true;
865
- advance();
866
- continue;
867
- }
868
- if (code === CHAR_LEFT_PARENTHESES) {
869
- parens++;
870
- continue;
871
- }
872
- if (code === CHAR_RIGHT_PARENTHESES && --parens === 0) {
873
- finished = true;
874
- break;
875
- }
876
- }
877
- continue;
878
- }
879
- break;
880
- }
881
- }
882
- if (code === CHAR_ASTERISK) {
883
- if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;
884
- isGlob = token.isGlob = true;
885
- finished = true;
886
- if (scanToEnd === true) continue;
887
- break;
888
- }
889
- if (code === CHAR_QUESTION_MARK) {
890
- isGlob = token.isGlob = true;
891
- finished = true;
892
- if (scanToEnd === true) continue;
893
- break;
894
- }
895
- if (code === CHAR_LEFT_SQUARE_BRACKET) {
896
- while (eos() !== true && (next = advance())) {
897
- if (next === CHAR_BACKWARD_SLASH) {
898
- backslashes = token.backslashes = true;
899
- advance();
900
- continue;
901
- }
902
- if (next === CHAR_RIGHT_SQUARE_BRACKET) {
903
- isBracket = token.isBracket = true;
904
- isGlob = token.isGlob = true;
905
- finished = true;
906
- break;
907
- }
908
- }
909
- if (scanToEnd === true) continue;
910
- break;
911
- }
912
- if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {
913
- negated = token.negated = true;
914
- start++;
915
- continue;
916
- }
917
- if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {
918
- isGlob = token.isGlob = true;
919
- if (scanToEnd === true) {
920
- let parens = 1;
921
- while (eos() !== true && (code = advance())) {
922
- if (code === CHAR_BACKWARD_SLASH) {
923
- backslashes = token.backslashes = true;
924
- advance();
925
- continue;
926
- }
927
- if (code === CHAR_LEFT_PARENTHESES) {
928
- parens++;
929
- continue;
930
- }
931
- if (code === CHAR_RIGHT_PARENTHESES && --parens === 0) {
932
- finished = true;
933
- break;
934
- }
935
- }
936
- continue;
937
- }
938
- break;
939
- }
940
- if (isGlob === true) {
941
- finished = true;
942
- if (scanToEnd === true) continue;
943
- break;
944
- }
945
- }
946
- if (opts.noext === true) {
947
- isExtglob = false;
948
- isGlob = false;
949
- }
950
- let base = str;
951
- let prefix = "";
952
- let glob = "";
953
- if (start > 0) {
954
- prefix = str.slice(0, start);
955
- str = str.slice(start);
956
- lastIndex -= start;
957
- }
958
- if (base && isGlob === true && lastIndex > 0) {
959
- base = str.slice(0, lastIndex);
960
- glob = str.slice(lastIndex);
961
- } else if (isGlob === true) {
962
- base = "";
963
- glob = str;
964
- } else base = str;
965
- if (base && base !== "" && base !== "/" && base !== str) {
966
- if (isPathSeparator(base.charCodeAt(base.length - 1))) base = base.slice(0, -1);
967
- }
968
- if (opts.unescape === true) {
969
- if (glob) glob = utils.removeBackslashes(glob);
970
- if (base && backslashes === true) base = utils.removeBackslashes(base);
971
- }
972
- const state = {
973
- prefix,
974
- input,
975
- start,
976
- base,
977
- glob,
978
- isBrace,
979
- isBracket,
980
- isGlob,
981
- isExtglob,
982
- isGlobstar,
983
- negated,
984
- negatedExtglob
985
- };
986
- if (opts.tokens === true) {
987
- state.maxDepth = 0;
988
- if (!isPathSeparator(code)) tokens.push(token);
989
- state.tokens = tokens;
990
- }
991
- if (opts.parts === true || opts.tokens === true) {
992
- let prevIndex;
993
- for (let idx = 0; idx < slashes.length; idx++) {
994
- const n = prevIndex !== void 0 ? prevIndex + 1 : start;
995
- const i = slashes[idx];
996
- const value = input.slice(n, i);
997
- if (opts.tokens) {
998
- if (idx === 0 && start !== 0) {
999
- tokens[idx].isPrefix = true;
1000
- tokens[idx].value = prefix;
1001
- } else tokens[idx].value = value;
1002
- depth(tokens[idx]);
1003
- state.maxDepth += tokens[idx].depth;
1004
- }
1005
- if (i >= start) {
1006
- parts.push(value);
1007
- prevIndex = i;
1008
- }
1009
- }
1010
- const n = prevIndex !== void 0 ? prevIndex + 1 : start;
1011
- const value = input.slice(n);
1012
- parts.push(value);
1013
- if (opts.tokens && prevIndex && prevIndex + 1 < input.length) {
1014
- tokens[tokens.length - 1].value = value;
1015
- depth(tokens[tokens.length - 1]);
1016
- state.maxDepth += tokens[tokens.length - 1].depth;
1017
- }
1018
- state.slashes = slashes;
1019
- state.parts = parts;
1020
- }
1021
- return state;
1022
- };
1023
- module.exports = scan;
1024
- }));
1025
- //#endregion
1026
- //#region ../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/parse.js
1027
- var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1028
- var constants = require_constants();
1029
- var utils = require_utils();
1030
- /**
1031
- * Constants
1032
- */
1033
- var { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants;
1034
- /**
1035
- * Helpers
1036
- */
1037
- var expandRange = (args, options) => {
1038
- if (typeof options.expandRange === "function") return options.expandRange(...args, options);
1039
- args.sort();
1040
- const value = `[${args.join("-")}]`;
1041
- try {
1042
- new RegExp(value);
1043
- } catch (ex) {
1044
- return args.map((v) => utils.escapeRegex(v)).join("..");
1045
- }
1046
- return value;
1047
- };
1048
- /**
1049
- * Create the message for a syntax error
1050
- */
1051
- var syntaxError = (type, char) => {
1052
- return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
1053
- };
1054
- var splitTopLevel = (input) => {
1055
- const parts = [];
1056
- let bracket = 0;
1057
- let paren = 0;
1058
- let quote = 0;
1059
- let value = "";
1060
- let escaped = false;
1061
- for (const ch of input) {
1062
- if (escaped === true) {
1063
- value += ch;
1064
- escaped = false;
1065
- continue;
1066
- }
1067
- if (ch === "\\") {
1068
- value += ch;
1069
- escaped = true;
1070
- continue;
1071
- }
1072
- if (ch === "\"") {
1073
- quote = quote === 1 ? 0 : 1;
1074
- value += ch;
1075
- continue;
1076
- }
1077
- if (quote === 0) {
1078
- if (ch === "[") bracket++;
1079
- else if (ch === "]" && bracket > 0) bracket--;
1080
- else if (bracket === 0) {
1081
- if (ch === "(") paren++;
1082
- else if (ch === ")" && paren > 0) paren--;
1083
- else if (ch === "|" && paren === 0) {
1084
- parts.push(value);
1085
- value = "";
1086
- continue;
1087
- }
1088
- }
1089
- }
1090
- value += ch;
1091
- }
1092
- parts.push(value);
1093
- return parts;
1094
- };
1095
- var isPlainBranch = (branch) => {
1096
- let escaped = false;
1097
- for (const ch of branch) {
1098
- if (escaped === true) {
1099
- escaped = false;
1100
- continue;
1101
- }
1102
- if (ch === "\\") {
1103
- escaped = true;
1104
- continue;
1105
- }
1106
- if (/[?*+@!()[\]{}]/.test(ch)) return false;
1107
- }
1108
- return true;
1109
- };
1110
- var normalizeSimpleBranch = (branch) => {
1111
- let value = branch.trim();
1112
- let changed = true;
1113
- while (changed === true) {
1114
- changed = false;
1115
- if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
1116
- value = value.slice(2, -1);
1117
- changed = true;
1118
- }
1119
- }
1120
- if (!isPlainBranch(value)) return;
1121
- return value.replace(/\\(.)/g, "$1");
1122
- };
1123
- var hasRepeatedCharPrefixOverlap = (branches) => {
1124
- const values = branches.map(normalizeSimpleBranch).filter(Boolean);
1125
- for (let i = 0; i < values.length; i++) for (let j = i + 1; j < values.length; j++) {
1126
- const a = values[i];
1127
- const b = values[j];
1128
- const char = a[0];
1129
- if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) continue;
1130
- if (a === b || a.startsWith(b) || b.startsWith(a)) return true;
1131
- }
1132
- return false;
1133
- };
1134
- var parseRepeatedExtglob = (pattern, requireEnd = true) => {
1135
- if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") return;
1136
- let bracket = 0;
1137
- let paren = 0;
1138
- let quote = 0;
1139
- let escaped = false;
1140
- for (let i = 1; i < pattern.length; i++) {
1141
- const ch = pattern[i];
1142
- if (escaped === true) {
1143
- escaped = false;
1144
- continue;
1145
- }
1146
- if (ch === "\\") {
1147
- escaped = true;
1148
- continue;
1149
- }
1150
- if (ch === "\"") {
1151
- quote = quote === 1 ? 0 : 1;
1152
- continue;
1153
- }
1154
- if (quote === 1) continue;
1155
- if (ch === "[") {
1156
- bracket++;
1157
- continue;
1158
- }
1159
- if (ch === "]" && bracket > 0) {
1160
- bracket--;
1161
- continue;
1162
- }
1163
- if (bracket > 0) continue;
1164
- if (ch === "(") {
1165
- paren++;
1166
- continue;
1167
- }
1168
- if (ch === ")") {
1169
- paren--;
1170
- if (paren === 0) {
1171
- if (requireEnd === true && i !== pattern.length - 1) return;
1172
- return {
1173
- type: pattern[0],
1174
- body: pattern.slice(2, i),
1175
- end: i
1176
- };
1177
- }
1178
- }
1179
- }
1180
- };
1181
- var buildCharClassStar = (chars) => {
1182
- return `${chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`}*`;
1183
- };
1184
- var getStarExtglobSequenceChars = (pattern) => {
1185
- let index = 0;
1186
- const chars = [];
1187
- while (index < pattern.length) {
1188
- const match = parseRepeatedExtglob(pattern.slice(index), false);
1189
- if (!match || match.type !== "*") return;
1190
- const branches = splitTopLevel(match.body).map((branch) => branch.trim());
1191
- if (branches.length !== 1) return;
1192
- const branch = normalizeSimpleBranch(branches[0]);
1193
- if (!branch || branch.length !== 1) return;
1194
- chars.push(branch);
1195
- index += match.end + 1;
1196
- }
1197
- if (chars.length < 1) return;
1198
- return chars;
1199
- };
1200
- var repeatedExtglobRecursion = (pattern) => {
1201
- let depth = 0;
1202
- let value = pattern.trim();
1203
- let match = parseRepeatedExtglob(value);
1204
- while (match) {
1205
- depth++;
1206
- value = match.body.trim();
1207
- match = parseRepeatedExtglob(value);
1208
- }
1209
- return depth;
1210
- };
1211
- var analyzeRepeatedExtglob = (body, options) => {
1212
- if (options.maxExtglobRecursion === false) return { risky: false };
1213
- const max = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION;
1214
- const branches = splitTopLevel(body).map((branch) => branch.trim());
1215
- if (branches.length > 1) {
1216
- if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) return { risky: true };
1217
- }
1218
- const safeChars = [];
1219
- let sawStarSequence = false;
1220
- let combinable = true;
1221
- for (const branch of branches) {
1222
- const chars = getStarExtglobSequenceChars(branch);
1223
- if (chars) {
1224
- sawStarSequence = true;
1225
- safeChars.push(...chars);
1226
- continue;
1227
- }
1228
- const literal = normalizeSimpleBranch(branch);
1229
- if (literal && literal.length === 1) {
1230
- safeChars.push(literal);
1231
- continue;
1232
- }
1233
- combinable = false;
1234
- if (repeatedExtglobRecursion(branch) > max) return { risky: true };
1235
- }
1236
- if (sawStarSequence) return combinable ? {
1237
- risky: true,
1238
- safeOutput: buildCharClassStar([...new Set(safeChars)])
1239
- } : { risky: true };
1240
- return { risky: false };
1241
- };
1242
- /**
1243
- * Parse the given input string.
1244
- * @param {String} input
1245
- * @param {Object} options
1246
- * @return {Object}
1247
- */
1248
- var parse = (input, options) => {
1249
- if (typeof input !== "string") throw new TypeError("Expected a string");
1250
- input = REPLACEMENTS[input] || input;
1251
- const opts = { ...options };
1252
- const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
1253
- let len = input.length;
1254
- if (len > max) throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
1255
- const bos = {
1256
- type: "bos",
1257
- value: "",
1258
- output: opts.prepend || ""
1259
- };
1260
- const tokens = [bos];
1261
- const capture = opts.capture ? "" : "?:";
1262
- const PLATFORM_CHARS = constants.globChars(opts.windows);
1263
- const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
1264
- const { DOT_LITERAL, PLUS_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOT_SLASH, NO_DOTS_SLASH, QMARK, QMARK_NO_DOT, STAR, START_ANCHOR } = PLATFORM_CHARS;
1265
- const globstar = (opts) => {
1266
- return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
1267
- };
1268
- const nodot = opts.dot ? "" : NO_DOT;
1269
- const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
1270
- let star = opts.bash === true ? globstar(opts) : STAR;
1271
- if (opts.capture) star = `(${star})`;
1272
- if (typeof opts.noext === "boolean") opts.noextglob = opts.noext;
1273
- const state = {
1274
- input,
1275
- index: -1,
1276
- start: 0,
1277
- dot: opts.dot === true,
1278
- consumed: "",
1279
- output: "",
1280
- prefix: "",
1281
- backtrack: false,
1282
- negated: false,
1283
- brackets: 0,
1284
- braces: 0,
1285
- parens: 0,
1286
- quotes: 0,
1287
- globstar: false,
1288
- tokens
1289
- };
1290
- input = utils.removePrefix(input, state);
1291
- len = input.length;
1292
- const extglobs = [];
1293
- const braces = [];
1294
- const stack = [];
1295
- let prev = bos;
1296
- let value;
1297
- /**
1298
- * Tokenizing helpers
1299
- */
1300
- const eos = () => state.index === len - 1;
1301
- const peek = state.peek = (n = 1) => input[state.index + n];
1302
- const advance = state.advance = () => input[++state.index] || "";
1303
- const remaining = () => input.slice(state.index + 1);
1304
- const consume = (value = "", num = 0) => {
1305
- state.consumed += value;
1306
- state.index += num;
1307
- };
1308
- const append = (token) => {
1309
- state.output += token.output != null ? token.output : token.value;
1310
- consume(token.value);
1311
- };
1312
- const negate = () => {
1313
- let count = 1;
1314
- while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) {
1315
- advance();
1316
- state.start++;
1317
- count++;
1318
- }
1319
- if (count % 2 === 0) return false;
1320
- state.negated = true;
1321
- state.start++;
1322
- return true;
1323
- };
1324
- const increment = (type) => {
1325
- state[type]++;
1326
- stack.push(type);
1327
- };
1328
- const decrement = (type) => {
1329
- state[type]--;
1330
- stack.pop();
1331
- };
1332
- /**
1333
- * Push tokens onto the tokens array. This helper speeds up
1334
- * tokenizing by 1) helping us avoid backtracking as much as possible,
1335
- * and 2) helping us avoid creating extra tokens when consecutive
1336
- * characters are plain text. This improves performance and simplifies
1337
- * lookbehinds.
1338
- */
1339
- const push = (tok) => {
1340
- if (prev.type === "globstar") {
1341
- const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace");
1342
- const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
1343
- if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) {
1344
- state.output = state.output.slice(0, -prev.output.length);
1345
- prev.type = "star";
1346
- prev.value = "*";
1347
- prev.output = star;
1348
- state.output += prev.output;
1349
- }
1350
- }
1351
- if (extglobs.length && tok.type !== "paren") extglobs[extglobs.length - 1].inner += tok.value;
1352
- if (tok.value || tok.output) append(tok);
1353
- if (prev && prev.type === "text" && tok.type === "text") {
1354
- prev.output = (prev.output || prev.value) + tok.value;
1355
- prev.value += tok.value;
1356
- return;
1357
- }
1358
- tok.prev = prev;
1359
- tokens.push(tok);
1360
- prev = tok;
1361
- };
1362
- const extglobOpen = (type, value) => {
1363
- const token = {
1364
- ...EXTGLOB_CHARS[value],
1365
- conditions: 1,
1366
- inner: ""
1367
- };
1368
- token.prev = prev;
1369
- token.parens = state.parens;
1370
- token.output = state.output;
1371
- token.startIndex = state.index;
1372
- token.tokensIndex = tokens.length;
1373
- const output = (opts.capture ? "(" : "") + token.open;
1374
- increment("parens");
1375
- push({
1376
- type,
1377
- value,
1378
- output: state.output ? "" : ONE_CHAR
1379
- });
1380
- push({
1381
- type: "paren",
1382
- extglob: true,
1383
- value: advance(),
1384
- output
1385
- });
1386
- extglobs.push(token);
1387
- };
1388
- const extglobClose = (token) => {
1389
- const literal = input.slice(token.startIndex, state.index + 1);
1390
- const analysis = analyzeRepeatedExtglob(input.slice(token.startIndex + 2, state.index), opts);
1391
- if ((token.type === "plus" || token.type === "star") && analysis.risky) {
1392
- const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
1393
- const open = tokens[token.tokensIndex];
1394
- open.type = "text";
1395
- open.value = literal;
1396
- open.output = safeOutput || utils.escapeRegex(literal);
1397
- for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
1398
- tokens[i].value = "";
1399
- tokens[i].output = "";
1400
- delete tokens[i].suffix;
1401
- }
1402
- state.output = token.output + open.output;
1403
- state.backtrack = true;
1404
- push({
1405
- type: "paren",
1406
- extglob: true,
1407
- value,
1408
- output: ""
1409
- });
1410
- decrement("parens");
1411
- return;
1412
- }
1413
- let output = token.close + (opts.capture ? ")" : "");
1414
- let rest;
1415
- if (token.type === "negate") {
1416
- let extglobStar = star;
1417
- if (token.inner && token.inner.length > 1 && token.inner.includes("/")) extglobStar = globstar(opts);
1418
- if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) output = token.close = `)$))${extglobStar}`;
1419
- if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) output = token.close = `)${parse(rest, {
1420
- ...options,
1421
- fastpaths: false
1422
- }).output})${extglobStar})`;
1423
- if (token.prev.type === "bos") state.negatedExtglob = true;
1424
- }
1425
- push({
1426
- type: "paren",
1427
- extglob: true,
1428
- value,
1429
- output
1430
- });
1431
- decrement("parens");
1432
- };
1433
- /**
1434
- * Fast paths
1435
- */
1436
- if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
1437
- let backslashes = false;
1438
- let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
1439
- if (first === "\\") {
1440
- backslashes = true;
1441
- return m;
1442
- }
1443
- if (first === "?") {
1444
- if (esc) return esc + first + (rest ? QMARK.repeat(rest.length) : "");
1445
- if (index === 0) return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
1446
- return QMARK.repeat(chars.length);
1447
- }
1448
- if (first === ".") return DOT_LITERAL.repeat(chars.length);
1449
- if (first === "*") {
1450
- if (esc) return esc + first + (rest ? star : "");
1451
- return star;
1452
- }
1453
- return esc ? m : `\\${m}`;
1454
- });
1455
- if (backslashes === true) {
1456
- if (opts.unescape === true) output = output.replace(/\\/g, "");
1457
- else output = output.replace(/\\+/g, (m) => {
1458
- return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
1459
- });
1460
- }
1461
- if (output === input && opts.contains === true) {
1462
- state.output = input;
1463
- return state;
1464
- }
1465
- state.output = utils.wrapOutput(output, state, options);
1466
- return state;
1467
- }
1468
- /**
1469
- * Tokenize input until we reach end-of-string
1470
- */
1471
- while (!eos()) {
1472
- value = advance();
1473
- if (value === "\0") continue;
1474
- /**
1475
- * Escaped characters
1476
- */
1477
- if (value === "\\") {
1478
- const next = peek();
1479
- if (next === "/" && opts.bash !== true) continue;
1480
- if (next === "." || next === ";") continue;
1481
- if (!next) {
1482
- value += "\\";
1483
- push({
1484
- type: "text",
1485
- value
1486
- });
1487
- continue;
1488
- }
1489
- const match = /^\\+/.exec(remaining());
1490
- let slashes = 0;
1491
- if (match && match[0].length > 2) {
1492
- slashes = match[0].length;
1493
- state.index += slashes;
1494
- if (slashes % 2 !== 0) value += "\\";
1495
- }
1496
- if (opts.unescape === true) value = advance();
1497
- else value += advance();
1498
- if (state.brackets === 0) {
1499
- push({
1500
- type: "text",
1501
- value
1502
- });
1503
- continue;
1504
- }
1505
- }
1506
- /**
1507
- * If we're inside a regex character class, continue
1508
- * until we reach the closing bracket.
1509
- */
1510
- if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
1511
- if (opts.posix !== false && value === ":") {
1512
- const inner = prev.value.slice(1);
1513
- if (inner.includes("[")) {
1514
- prev.posix = true;
1515
- if (inner.includes(":")) {
1516
- const idx = prev.value.lastIndexOf("[");
1517
- const pre = prev.value.slice(0, idx);
1518
- const posix = POSIX_REGEX_SOURCE[prev.value.slice(idx + 2)];
1519
- if (posix) {
1520
- prev.value = pre + posix;
1521
- state.backtrack = true;
1522
- advance();
1523
- if (!bos.output && tokens.indexOf(prev) === 1) bos.output = ONE_CHAR;
1524
- continue;
1525
- }
1526
- }
1527
- }
1528
- }
1529
- if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") value = `\\${value}`;
1530
- if (value === "]" && (prev.value === "[" || prev.value === "[^")) value = `\\${value}`;
1531
- if (opts.posix === true && value === "!" && prev.value === "[") value = "^";
1532
- prev.value += value;
1533
- append({ value });
1534
- continue;
1535
- }
1536
- /**
1537
- * If we're inside a quoted string, continue
1538
- * until we reach the closing double quote.
1539
- */
1540
- if (state.quotes === 1 && value !== "\"") {
1541
- value = utils.escapeRegex(value);
1542
- prev.value += value;
1543
- append({ value });
1544
- continue;
1545
- }
1546
- /**
1547
- * Double quotes
1548
- */
1549
- if (value === "\"") {
1550
- state.quotes = state.quotes === 1 ? 0 : 1;
1551
- if (opts.keepQuotes === true) push({
1552
- type: "text",
1553
- value
1554
- });
1555
- continue;
1556
- }
1557
- /**
1558
- * Parentheses
1559
- */
1560
- if (value === "(") {
1561
- increment("parens");
1562
- push({
1563
- type: "paren",
1564
- value
1565
- });
1566
- continue;
1567
- }
1568
- if (value === ")") {
1569
- if (state.parens === 0 && opts.strictBrackets === true) throw new SyntaxError(syntaxError("opening", "("));
1570
- const extglob = extglobs[extglobs.length - 1];
1571
- if (extglob && state.parens === extglob.parens + 1) {
1572
- extglobClose(extglobs.pop());
1573
- continue;
1574
- }
1575
- push({
1576
- type: "paren",
1577
- value,
1578
- output: state.parens ? ")" : "\\)"
1579
- });
1580
- decrement("parens");
1581
- continue;
1582
- }
1583
- /**
1584
- * Square brackets
1585
- */
1586
- if (value === "[") {
1587
- if (opts.nobracket === true || !remaining().includes("]")) {
1588
- if (opts.nobracket !== true && opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
1589
- value = `\\${value}`;
1590
- } else increment("brackets");
1591
- push({
1592
- type: "bracket",
1593
- value
1594
- });
1595
- continue;
1596
- }
1597
- if (value === "]") {
1598
- if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) {
1599
- push({
1600
- type: "text",
1601
- value,
1602
- output: `\\${value}`
1603
- });
1604
- continue;
1605
- }
1606
- if (state.brackets === 0) {
1607
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("opening", "["));
1608
- push({
1609
- type: "text",
1610
- value,
1611
- output: `\\${value}`
1612
- });
1613
- continue;
1614
- }
1615
- decrement("brackets");
1616
- const prevValue = prev.value.slice(1);
1617
- if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) value = `/${value}`;
1618
- prev.value += value;
1619
- append({ value });
1620
- if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) continue;
1621
- const escaped = utils.escapeRegex(prev.value);
1622
- state.output = state.output.slice(0, -prev.value.length);
1623
- if (opts.literalBrackets === true) {
1624
- state.output += escaped;
1625
- prev.value = escaped;
1626
- continue;
1627
- }
1628
- prev.value = `(${capture}${escaped}|${prev.value})`;
1629
- state.output += prev.value;
1630
- continue;
1631
- }
1632
- /**
1633
- * Braces
1634
- */
1635
- if (value === "{" && opts.nobrace !== true) {
1636
- increment("braces");
1637
- const open = {
1638
- type: "brace",
1639
- value,
1640
- output: "(",
1641
- outputIndex: state.output.length,
1642
- tokensIndex: state.tokens.length
1643
- };
1644
- braces.push(open);
1645
- push(open);
1646
- continue;
1647
- }
1648
- if (value === "}") {
1649
- const brace = braces[braces.length - 1];
1650
- if (opts.nobrace === true || !brace) {
1651
- push({
1652
- type: "text",
1653
- value,
1654
- output: value
1655
- });
1656
- continue;
1657
- }
1658
- let output = ")";
1659
- if (brace.dots === true) {
1660
- const arr = tokens.slice();
1661
- const range = [];
1662
- for (let i = arr.length - 1; i >= 0; i--) {
1663
- tokens.pop();
1664
- if (arr[i].type === "brace") break;
1665
- if (arr[i].type !== "dots") range.unshift(arr[i].value);
1666
- }
1667
- output = expandRange(range, opts);
1668
- state.backtrack = true;
1669
- }
1670
- if (brace.comma !== true && brace.dots !== true) {
1671
- const out = state.output.slice(0, brace.outputIndex);
1672
- const toks = state.tokens.slice(brace.tokensIndex);
1673
- brace.value = brace.output = "\\{";
1674
- value = output = "\\}";
1675
- state.output = out;
1676
- for (const t of toks) state.output += t.output || t.value;
1677
- }
1678
- push({
1679
- type: "brace",
1680
- value,
1681
- output
1682
- });
1683
- decrement("braces");
1684
- braces.pop();
1685
- continue;
1686
- }
1687
- /**
1688
- * Pipes
1689
- */
1690
- if (value === "|") {
1691
- if (extglobs.length > 0) extglobs[extglobs.length - 1].conditions++;
1692
- push({
1693
- type: "text",
1694
- value
1695
- });
1696
- continue;
1697
- }
1698
- /**
1699
- * Commas
1700
- */
1701
- if (value === ",") {
1702
- let output = value;
1703
- const brace = braces[braces.length - 1];
1704
- if (brace && stack[stack.length - 1] === "braces") {
1705
- brace.comma = true;
1706
- output = "|";
1707
- }
1708
- push({
1709
- type: "comma",
1710
- value,
1711
- output
1712
- });
1713
- continue;
1714
- }
1715
- /**
1716
- * Slashes
1717
- */
1718
- if (value === "/") {
1719
- if (prev.type === "dot" && state.index === state.start + 1) {
1720
- state.start = state.index + 1;
1721
- state.consumed = "";
1722
- state.output = "";
1723
- tokens.pop();
1724
- prev = bos;
1725
- continue;
1726
- }
1727
- push({
1728
- type: "slash",
1729
- value,
1730
- output: SLASH_LITERAL
1731
- });
1732
- continue;
1733
- }
1734
- /**
1735
- * Dots
1736
- */
1737
- if (value === ".") {
1738
- if (state.braces > 0 && prev.type === "dot") {
1739
- if (prev.value === ".") prev.output = DOT_LITERAL;
1740
- const brace = braces[braces.length - 1];
1741
- prev.type = "dots";
1742
- prev.output += value;
1743
- prev.value += value;
1744
- brace.dots = true;
1745
- continue;
1746
- }
1747
- if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
1748
- push({
1749
- type: "text",
1750
- value,
1751
- output: DOT_LITERAL
1752
- });
1753
- continue;
1754
- }
1755
- push({
1756
- type: "dot",
1757
- value,
1758
- output: DOT_LITERAL
1759
- });
1760
- continue;
1761
- }
1762
- /**
1763
- * Question marks
1764
- */
1765
- if (value === "?") {
1766
- if (!(prev && prev.value === "(") && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
1767
- extglobOpen("qmark", value);
1768
- continue;
1769
- }
1770
- if (prev && prev.type === "paren") {
1771
- const next = peek();
1772
- let output = value;
1773
- if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) output = `\\${value}`;
1774
- push({
1775
- type: "text",
1776
- value,
1777
- output
1778
- });
1779
- continue;
1780
- }
1781
- if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) {
1782
- push({
1783
- type: "qmark",
1784
- value,
1785
- output: QMARK_NO_DOT
1786
- });
1787
- continue;
1788
- }
1789
- push({
1790
- type: "qmark",
1791
- value,
1792
- output: QMARK
1793
- });
1794
- continue;
1795
- }
1796
- /**
1797
- * Exclamation
1798
- */
1799
- if (value === "!") {
1800
- if (opts.noextglob !== true && peek() === "(") {
1801
- if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) {
1802
- extglobOpen("negate", value);
1803
- continue;
1804
- }
1805
- }
1806
- if (opts.nonegate !== true && state.index === 0) {
1807
- negate();
1808
- continue;
1809
- }
1810
- }
1811
- /**
1812
- * Plus
1813
- */
1814
- if (value === "+") {
1815
- if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
1816
- extglobOpen("plus", value);
1817
- continue;
1818
- }
1819
- if (prev && prev.value === "(" || opts.regex === false) {
1820
- push({
1821
- type: "plus",
1822
- value,
1823
- output: PLUS_LITERAL
1824
- });
1825
- continue;
1826
- }
1827
- if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) {
1828
- push({
1829
- type: "plus",
1830
- value
1831
- });
1832
- continue;
1833
- }
1834
- push({
1835
- type: "plus",
1836
- value: PLUS_LITERAL
1837
- });
1838
- continue;
1839
- }
1840
- /**
1841
- * Plain text
1842
- */
1843
- if (value === "@") {
1844
- if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
1845
- push({
1846
- type: "at",
1847
- extglob: true,
1848
- value,
1849
- output: ""
1850
- });
1851
- continue;
1852
- }
1853
- push({
1854
- type: "text",
1855
- value
1856
- });
1857
- continue;
1858
- }
1859
- /**
1860
- * Plain text
1861
- */
1862
- if (value !== "*") {
1863
- if (value === "$" || value === "^") value = `\\${value}`;
1864
- const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());
1865
- if (match) {
1866
- value += match[0];
1867
- state.index += match[0].length;
1868
- }
1869
- push({
1870
- type: "text",
1871
- value
1872
- });
1873
- continue;
1874
- }
1875
- /**
1876
- * Stars
1877
- */
1878
- if (prev && (prev.type === "globstar" || prev.star === true)) {
1879
- prev.type = "star";
1880
- prev.star = true;
1881
- prev.value += value;
1882
- prev.output = star;
1883
- state.backtrack = true;
1884
- state.globstar = true;
1885
- consume(value);
1886
- continue;
1887
- }
1888
- let rest = remaining();
1889
- if (opts.noextglob !== true && /^\([^?]/.test(rest)) {
1890
- extglobOpen("star", value);
1891
- continue;
1892
- }
1893
- if (prev.type === "star") {
1894
- if (opts.noglobstar === true) {
1895
- consume(value);
1896
- continue;
1897
- }
1898
- const prior = prev.prev;
1899
- const before = prior.prev;
1900
- const isStart = prior.type === "slash" || prior.type === "bos";
1901
- const afterStar = before && (before.type === "star" || before.type === "globstar");
1902
- if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
1903
- push({
1904
- type: "star",
1905
- value,
1906
- output: ""
1907
- });
1908
- continue;
1909
- }
1910
- const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace");
1911
- const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
1912
- if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
1913
- push({
1914
- type: "star",
1915
- value,
1916
- output: ""
1917
- });
1918
- continue;
1919
- }
1920
- while (rest.slice(0, 3) === "/**") {
1921
- const after = input[state.index + 4];
1922
- if (after && after !== "/") break;
1923
- rest = rest.slice(3);
1924
- consume("/**", 3);
1925
- }
1926
- const isEnd = eos() || state.parens > 0 && rest === ")".repeat(state.parens) && !extglobs.some((extglob) => extglob.type === "negate");
1927
- if (prior.type === "bos" && eos()) {
1928
- prev.type = "globstar";
1929
- prev.value += value;
1930
- prev.output = globstar(opts);
1931
- state.output = prev.output;
1932
- state.globstar = true;
1933
- consume(value);
1934
- continue;
1935
- }
1936
- if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && isEnd) {
1937
- state.output = state.output.slice(0, -(prior.output + prev.output).length);
1938
- prior.output = `(?:${prior.output}`;
1939
- prev.type = "globstar";
1940
- prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)");
1941
- prev.value += value;
1942
- state.globstar = true;
1943
- state.output += prior.output + prev.output;
1944
- consume(value);
1945
- continue;
1946
- }
1947
- if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
1948
- const end = rest[1] !== void 0 ? "|$" : "";
1949
- state.output = state.output.slice(0, -(prior.output + prev.output).length);
1950
- prior.output = `(?:${prior.output}`;
1951
- prev.type = "globstar";
1952
- prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
1953
- prev.value += value;
1954
- state.output += prior.output + prev.output;
1955
- state.globstar = true;
1956
- consume(value + advance());
1957
- push({
1958
- type: "slash",
1959
- value: "/",
1960
- output: ""
1961
- });
1962
- continue;
1963
- }
1964
- if (prior.type === "bos" && rest[0] === "/") {
1965
- prev.type = "globstar";
1966
- prev.value += value;
1967
- prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
1968
- state.output = prev.output;
1969
- state.globstar = true;
1970
- consume(value + advance());
1971
- push({
1972
- type: "slash",
1973
- value: "/",
1974
- output: ""
1975
- });
1976
- continue;
1977
- }
1978
- state.output = state.output.slice(0, -prev.output.length);
1979
- prev.type = "globstar";
1980
- prev.output = globstar(opts);
1981
- prev.value += value;
1982
- state.output += prev.output;
1983
- state.globstar = true;
1984
- consume(value);
1985
- continue;
1986
- }
1987
- const token = {
1988
- type: "star",
1989
- value,
1990
- output: star
1991
- };
1992
- if (opts.bash === true) {
1993
- token.output = ".*?";
1994
- if (prev.type === "bos" || prev.type === "slash") token.output = nodot + token.output;
1995
- push(token);
1996
- continue;
1997
- }
1998
- if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) {
1999
- token.output = value;
2000
- push(token);
2001
- continue;
2002
- }
2003
- if (state.index === state.start || prev.type === "slash" || prev.type === "dot") {
2004
- if (prev.type === "dot") {
2005
- state.output += NO_DOT_SLASH;
2006
- prev.output += NO_DOT_SLASH;
2007
- } else if (opts.dot === true) {
2008
- state.output += NO_DOTS_SLASH;
2009
- prev.output += NO_DOTS_SLASH;
2010
- } else {
2011
- state.output += nodot;
2012
- prev.output += nodot;
2013
- }
2014
- if (peek() !== "*") {
2015
- state.output += ONE_CHAR;
2016
- prev.output += ONE_CHAR;
2017
- }
2018
- }
2019
- push(token);
2020
- }
2021
- while (state.brackets > 0) {
2022
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
2023
- state.output = utils.escapeLast(state.output, "[");
2024
- decrement("brackets");
2025
- }
2026
- while (state.parens > 0) {
2027
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")"));
2028
- state.output = utils.escapeLast(state.output, "(");
2029
- decrement("parens");
2030
- }
2031
- while (state.braces > 0) {
2032
- if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}"));
2033
- state.output = utils.escapeLast(state.output, "{");
2034
- decrement("braces");
2035
- }
2036
- if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) push({
2037
- type: "maybe_slash",
2038
- value: "",
2039
- output: `${SLASH_LITERAL}?`
2040
- });
2041
- if (state.backtrack === true) {
2042
- state.output = "";
2043
- for (const token of state.tokens) {
2044
- state.output += token.output != null ? token.output : token.value;
2045
- if (token.suffix) state.output += token.suffix;
2046
- }
2047
- }
2048
- return state;
2049
- };
2050
- /**
2051
- * Fast paths for creating regular expressions for common glob patterns.
2052
- * This can significantly speed up processing and has very little downside
2053
- * impact when none of the fast paths match.
2054
- */
2055
- parse.fastpaths = (input, options) => {
2056
- const opts = { ...options };
2057
- const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
2058
- const len = input.length;
2059
- if (len > max) throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
2060
- input = REPLACEMENTS[input] || input;
2061
- const { DOT_LITERAL, SLASH_LITERAL, ONE_CHAR, DOTS_SLASH, NO_DOT, NO_DOTS, NO_DOTS_SLASH, STAR, START_ANCHOR } = constants.globChars(opts.windows);
2062
- const nodot = opts.dot ? NO_DOTS : NO_DOT;
2063
- const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
2064
- const capture = opts.capture ? "" : "?:";
2065
- const state = {
2066
- negated: false,
2067
- prefix: ""
2068
- };
2069
- let star = opts.bash === true ? ".*?" : STAR;
2070
- if (opts.capture) star = `(${star})`;
2071
- const globstar = (opts) => {
2072
- if (opts.noglobstar === true) return star;
2073
- return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
2074
- };
2075
- const create = (str) => {
2076
- switch (str) {
2077
- case "*": return `${nodot}${ONE_CHAR}${star}`;
2078
- case ".*": return `${DOT_LITERAL}${ONE_CHAR}${star}`;
2079
- case "*.*": return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
2080
- case "*/*": return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;
2081
- case "**": return nodot + globstar(opts);
2082
- case "**/*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;
2083
- case "**/*.*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;
2084
- case "**/.*": return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
2085
- default: {
2086
- const match = /^(.*?)\.(\w+)$/.exec(str);
2087
- if (!match) return;
2088
- const source = create(match[1]);
2089
- if (!source) return;
2090
- return source + DOT_LITERAL + match[2];
2091
- }
2092
- }
2093
- };
2094
- let source = create(utils.removePrefix(input, state));
2095
- if (source && opts.strictSlashes !== true) source += `${SLASH_LITERAL}?`;
2096
- return source;
2097
- };
2098
- module.exports = parse;
2099
- }));
2100
- //#endregion
2101
- //#region ../../node_modules/.pnpm/picomatch@4.0.7/node_modules/picomatch/lib/picomatch.js
2102
- var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2103
- var scan = require_scan();
2104
- var parse = require_parse();
2105
- var utils = require_utils();
2106
- var constants = require_constants();
2107
- var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
2108
- /**
2109
- * Creates a matcher function from one or more glob patterns. The
2110
- * returned function takes a string to match as its first argument,
2111
- * and returns true if the string is a match. The returned matcher
2112
- * function also takes a boolean as the second argument that, when true,
2113
- * returns an object with additional information.
2114
- *
2115
- * ```js
2116
- * const picomatch = require('picomatch');
2117
- * // picomatch(glob[, options]);
2118
- *
2119
- * const isMatch = picomatch('*.!(*a)');
2120
- * console.log(isMatch('a.a')); //=> false
2121
- * console.log(isMatch('a.b')); //=> true
2122
- *
2123
- * // For environments without `node.js`, `picomatch/posix` provides you a dependency-free matcher, without automatic OS detection.
2124
- * const picomatch = require('picomatch/posix');
2125
- * // the same API, defaulting to posix paths
2126
- * const isMatch = picomatch('a/*');
2127
- * console.log(isMatch('a\\b')); //=> false
2128
- * console.log(isMatch('a/b')); //=> true
2129
- *
2130
- * // you can still configure the matcher function to accept windows paths
2131
- * const isMatch = picomatch('a/*', { options: windows });
2132
- * console.log(isMatch('a\\b')); //=> true
2133
- * console.log(isMatch('a/b')); //=> true
2134
- * ```
2135
- * @name picomatch
2136
- * @param {String|Array} `globs` One or more glob patterns.
2137
- * @param {Object=} `options`
2138
- * @return {Function=} Returns a matcher function.
2139
- * @api public
2140
- */
2141
- var picomatch = (glob, options, returnState = false) => {
2142
- if (Array.isArray(glob)) {
2143
- const fns = glob.map((input) => picomatch(input, options, returnState));
2144
- const arrayMatcher = (str) => {
2145
- for (const isMatch of fns) {
2146
- const state = isMatch(str);
2147
- if (state) return state;
2148
- }
2149
- return false;
2150
- };
2151
- return arrayMatcher;
2152
- }
2153
- const isState = isObject(glob) && glob.tokens && glob.input;
2154
- if (glob === "" || typeof glob !== "string" && !isState) throw new TypeError("Expected pattern to be a non-empty string");
2155
- const opts = options || {};
2156
- const posix = opts.windows;
2157
- const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
2158
- const state = regex.state;
2159
- delete regex.state;
2160
- let isIgnored = () => false;
2161
- if (opts.ignore) {
2162
- const ignoreOpts = {
2163
- ...options,
2164
- ignore: null,
2165
- onMatch: null,
2166
- onResult: null
2167
- };
2168
- isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
2169
- }
2170
- const matcher = (input, returnObject = false) => {
2171
- const { isMatch, match, output } = picomatch.test(input, regex, options, {
2172
- glob,
2173
- posix
2174
- });
2175
- const result = {
2176
- glob,
2177
- state,
2178
- regex,
2179
- posix,
2180
- input,
2181
- output,
2182
- match,
2183
- isMatch
2184
- };
2185
- if (typeof opts.onResult === "function") opts.onResult(result);
2186
- if (isMatch === false) {
2187
- result.isMatch = false;
2188
- return returnObject ? result : false;
2189
- }
2190
- if (isIgnored(input)) {
2191
- if (typeof opts.onIgnore === "function") opts.onIgnore(result);
2192
- result.isMatch = false;
2193
- return returnObject ? result : false;
2194
- }
2195
- if (typeof opts.onMatch === "function") opts.onMatch(result);
2196
- return returnObject ? result : true;
2197
- };
2198
- if (returnState) matcher.state = state;
2199
- return matcher;
2200
- };
2201
- /**
2202
- * Test `input` with the given `regex`. This is used by the main
2203
- * `picomatch()` function to test the input string.
2204
- *
2205
- * ```js
2206
- * const picomatch = require('picomatch');
2207
- * // picomatch.test(input, regex[, options]);
2208
- *
2209
- * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\/([^/]*?))$/));
2210
- * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }
2211
- * ```
2212
- * @param {String} `input` String to test.
2213
- * @param {RegExp} `regex`
2214
- * @return {Object} Returns an object with matching info.
2215
- * @api public
2216
- */
2217
- picomatch.test = (input, regex, options, { glob, posix } = {}) => {
2218
- if (typeof input !== "string") throw new TypeError("Expected input to be a string");
2219
- if (input === "") return {
2220
- isMatch: false,
2221
- output: ""
2222
- };
2223
- const opts = options || {};
2224
- const format = opts.format || (posix ? utils.toPosixSlashes : null);
2225
- let match = input === glob;
2226
- let output = match && format ? format(input) : input;
2227
- if (match === false) {
2228
- output = format ? format(input) : input;
2229
- match = output === glob;
2230
- }
2231
- if (match === false || opts.capture === true) {
2232
- if (opts.matchBase === true || opts.basename === true) match = picomatch.matchBase(input, regex, options, posix);
2233
- else match = regex.exec(output);
2234
- }
2235
- return {
2236
- isMatch: Boolean(match),
2237
- match,
2238
- output
2239
- };
2240
- };
2241
- /**
2242
- * Match the basename of a filepath.
2243
- *
2244
- * ```js
2245
- * const picomatch = require('picomatch');
2246
- * // picomatch.matchBase(input, glob[, options]);
2247
- * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true
2248
- * ```
2249
- * @param {String} `input` String to test.
2250
- * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).
2251
- * @return {Boolean}
2252
- * @api public
2253
- */
2254
- picomatch.matchBase = (input, glob, options, posix = options && options.windows) => {
2255
- return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(utils.basename(input, { windows: posix }));
2256
- };
2257
- /**
2258
- * Returns true if **any** of the given glob `patterns` match the specified `string`.
2259
- *
2260
- * ```js
2261
- * const picomatch = require('picomatch');
2262
- * // picomatch.isMatch(string, patterns[, options]);
2263
- *
2264
- * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true
2265
- * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false
2266
- * ```
2267
- * @param {String|Array} str The string to test.
2268
- * @param {String|Array} patterns One or more glob patterns to use for matching.
2269
- * @param {Object} [options] See available [options](#options).
2270
- * @return {Boolean} Returns true if any patterns match `str`
2271
- * @api public
2272
- */
2273
- picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
2274
- /**
2275
- * Parse a glob pattern to create the source string for a regular
2276
- * expression.
2277
- *
2278
- * ```js
2279
- * const picomatch = require('picomatch');
2280
- * const result = picomatch.parse(pattern[, options]);
2281
- * ```
2282
- * @param {String} `pattern`
2283
- * @param {Object} `options`
2284
- * @return {Object} Returns an object with useful properties and output to be used as a regex source string.
2285
- * @api public
2286
- */
2287
- picomatch.parse = (pattern, options) => {
2288
- if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
2289
- return parse(pattern, {
2290
- ...options,
2291
- fastpaths: false
2292
- });
2293
- };
2294
- /**
2295
- * Scan a glob pattern to separate the pattern into segments.
2296
- *
2297
- * ```js
2298
- * const picomatch = require('picomatch');
2299
- * // picomatch.scan(input[, options]);
2300
- *
2301
- * const result = picomatch.scan('!./foo/*.js');
2302
- * console.log(result);
2303
- * { prefix: '!./',
2304
- * input: '!./foo/*.js',
2305
- * start: 3,
2306
- * base: 'foo',
2307
- * glob: '*.js',
2308
- * isBrace: false,
2309
- * isBracket: false,
2310
- * isGlob: true,
2311
- * isExtglob: false,
2312
- * isGlobstar: false,
2313
- * negated: true }
2314
- * ```
2315
- * @param {String} `input` Glob pattern to scan.
2316
- * @param {Object} `options`
2317
- * @return {Object} Returns an object with
2318
- * @api public
2319
- */
2320
- picomatch.scan = (input, options) => scan(input, options);
2321
- /**
2322
- * Compile a regular expression from the `state` object returned by the
2323
- * [parse()](#parse) method.
2324
- *
2325
- * ```js
2326
- * const picomatch = require('picomatch');
2327
- * const state = picomatch.parse('*.js');
2328
- * // picomatch.compileRe(state[, options]);
2329
- *
2330
- * console.log(picomatch.compileRe(state));
2331
- * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
2332
- * ```
2333
- * @param {Object} `state`
2334
- * @param {Object} `options`
2335
- * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.
2336
- * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.
2337
- * @return {RegExp}
2338
- * @api public
2339
- */
2340
- picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {
2341
- if (returnOutput === true) return state.output;
2342
- const opts = options || {};
2343
- const prepend = opts.contains ? "" : "^";
2344
- const append = opts.contains ? "" : "$";
2345
- let source = `${prepend}(?:${state.output})${append}`;
2346
- if (state && state.negated === true) source = `^(?!${source}).*$`;
2347
- const regex = picomatch.toRegex(source, options);
2348
- if (returnState === true) regex.state = state;
2349
- return regex;
2350
- };
2351
- /**
2352
- * Create a regular expression from a parsed glob pattern.
2353
- *
2354
- * ```js
2355
- * const picomatch = require('picomatch');
2356
- * // picomatch.makeRe(state[, options]);
2357
- *
2358
- * const result = picomatch.makeRe('*.js');
2359
- * console.log(result);
2360
- * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
2361
- * ```
2362
- * @param {String} `state` The object returned from the `.parse` method.
2363
- * @param {Object} `options`
2364
- * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.
2365
- * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.
2366
- * @return {RegExp} Returns a regex created from the given pattern.
2367
- * @api public
2368
- */
2369
- picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
2370
- if (!input || typeof input !== "string") throw new TypeError("Expected a non-empty string");
2371
- let parsed = {
2372
- negated: false,
2373
- fastpaths: true
2374
- };
2375
- if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) parsed.output = parse.fastpaths(input, options);
2376
- if (!parsed.output) parsed = parse(input, options);
2377
- return picomatch.compileRe(parsed, options, returnOutput, returnState);
2378
- };
2379
- /**
2380
- * Create a regular expression from the given regex source string.
2381
- *
2382
- * ```js
2383
- * const picomatch = require('picomatch');
2384
- * // picomatch.toRegex(source[, options]);
2385
- *
2386
- * const { output } = picomatch.parse('*.js');
2387
- * console.log(picomatch.toRegex(output));
2388
- * //=> /^(?:(?!\.)(?=.)[^/]*?\.js)$/
2389
- * ```
2390
- * @param {String} `source` Regular expression source string.
2391
- * @param {Object} `options`
2392
- * @return {RegExp}
2393
- * @api public
2394
- */
2395
- picomatch.toRegex = (source, options) => {
2396
- try {
2397
- const opts = options || {};
2398
- return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
2399
- } catch (err) {
2400
- if (options && options.debug === true) throw err;
2401
- return /$^/;
2402
- }
2403
- };
2404
- /**
2405
- * Picomatch constants.
2406
- * @return {Object}
2407
- */
2408
- picomatch.constants = constants;
2409
- /**
2410
- * Expose "picomatch"
2411
- */
2412
- module.exports = picomatch;
2413
- }));
2414
- //#endregion
2415
- //#region ../../node_modules/.pnpm/@astrojs+internal-helpers@0.11.0/node_modules/@astrojs/internal-helpers/dist/path.js
2416
- var import_picomatch = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
2417
- var pico = require_picomatch$1();
2418
- var utils = require_utils();
2419
- function picomatch(glob, options, returnState = false) {
2420
- if (options && (options.windows === null || options.windows === void 0)) options = {
2421
- ...options,
2422
- windows: utils.isWindows()
2423
- };
2424
- return pico(glob, options, returnState);
2425
- }
2426
- Object.assign(picomatch, pico);
2427
- module.exports = picomatch;
2428
- })))());
2429
- function slash(path) {
2430
- return path.replace(/\\/g, "/");
2431
- }
2432
- //#endregion
2433
- //#region ../../node_modules/.pnpm/@astrojs+internal-helpers@0.11.0/node_modules/@astrojs/internal-helpers/dist/create-filter.js
2434
- function ensureArray(thing) {
2435
- if (Array.isArray(thing)) return thing;
2436
- if (thing == null) return [];
2437
- return [thing];
2438
- }
2439
- function toMatcher(pattern) {
2440
- if (pattern instanceof RegExp) return pattern;
2441
- const normalized = slash(pattern);
2442
- const fn = (0, import_picomatch.default)(normalized, { dot: true });
2443
- return { test: (what) => fn(what) };
2444
- }
2445
- function createFilter(include, exclude) {
2446
- const includeMatchers = ensureArray(include).map(toMatcher);
2447
- const excludeMatchers = ensureArray(exclude).map(toMatcher);
2448
- if (!includeMatchers.length && !excludeMatchers.length) return (id) => typeof id === "string" && !id.includes("\0");
2449
- return function(id) {
2450
- if (typeof id !== "string") return false;
2451
- if (id.includes("\0")) return false;
2452
- const pathId = slash(id);
2453
- for (const matcher of excludeMatchers) {
2454
- if (matcher instanceof RegExp) matcher.lastIndex = 0;
2455
- if (matcher.test(pathId)) return false;
2456
- }
2457
- for (const matcher of includeMatchers) {
2458
- if (matcher instanceof RegExp) matcher.lastIndex = 0;
2459
- if (matcher.test(pathId)) return true;
2460
- }
2461
- return !includeMatchers.length;
2462
- };
2463
- }
2464
- //#endregion
2465
- //#region ../../node_modules/.pnpm/@astrojs+preact@6.0.5_@babel+core@7.29.7_@types+node@26.4.1_esbuild@0.28.2_jiti@2.7.0_p_9974d7dcb4fcbb2fdffe5819f7140fba/node_modules/@astrojs/preact/dist/server.js
2466
- var slotName = (str) => str.trim().replace(/[-_]([a-z])/g, (_, w) => w.toUpperCase());
2467
- var originalConsoleError;
2468
- var consoleFilterRefs = 0;
2469
- var filter = opts?.include || opts?.exclude ? createFilter(opts.include, opts.exclude) : null;
2470
- function setVNodeMask(vNode, mask) {
2471
- vNode._mask = mask;
2472
- vNode.__m = mask;
2473
- }
2474
- async function check(Component, props, children, metadata) {
2475
- if (typeof Component !== "function") return false;
2476
- if (Component.name === "QwikComponent") return false;
2477
- const componentUrl = metadata?.componentUrl;
2478
- if (filter && componentUrl && !filter(componentUrl)) return false;
2479
- if (Component.prototype != null && typeof Component.prototype.render === "function") return C$1.isPrototypeOf(Component);
2480
- useConsoleFilter();
2481
- try {
2482
- const { html } = await renderToStaticMarkup.call(this, Component, props, children, void 0);
2483
- if (typeof html !== "string") return false;
2484
- return html === "" ? false : !html.includes("<undefined>");
2485
- } catch {
2486
- return false;
2487
- } finally {
2488
- finishUsingConsoleFilter();
2489
- }
2490
- }
2491
- function shouldHydrate(metadata) {
2492
- return metadata?.astroStaticSlot ? !!metadata.hydrate : true;
2493
- }
2494
- async function renderToStaticMarkup(Component, props, { default: children, ...slotted }, metadata) {
2495
- const ctx = getContext(this.result);
2496
- const slots = {};
2497
- for (const [key, value] of Object.entries(slotted)) {
2498
- const name = slotName(key);
2499
- slots[name] = k$1(static_html_default, {
2500
- hydrate: shouldHydrate(metadata),
2501
- value,
2502
- name
2503
- });
2504
- }
2505
- let propsMap = restoreSignalsOnProps(ctx, props);
2506
- const newProps = {
2507
- ...props,
2508
- ...slots
2509
- };
2510
- const attrs = {};
2511
- serializeSignals(ctx, props, attrs, propsMap);
2512
- const islandId = incrementIslandId(ctx);
2513
- attrs["data-preact-island-id"] = islandId.toString();
2514
- const vNode = k$1(Component, newProps, children != null ? k$1(static_html_default, {
2515
- hydrate: shouldHydrate(metadata),
2516
- value: children
2517
- }) : children);
2518
- setVNodeMask(vNode, [islandId, 0]);
2519
- return {
2520
- attrs,
2521
- html: await Z(vNode)
2522
- };
2523
- }
2524
- function useConsoleFilter() {
2525
- consoleFilterRefs++;
2526
- if (!originalConsoleError) {
2527
- originalConsoleError = console.error;
2528
- try {
2529
- console.error = filteredConsoleError;
2530
- } catch {}
2531
- }
2532
- }
2533
- function finishUsingConsoleFilter() {
2534
- consoleFilterRefs--;
2535
- }
2536
- function filteredConsoleError(msg, ...rest) {
2537
- if (consoleFilterRefs > 0 && !process.env.ASTRO_INTERNAL_TEST_DISABLE_CONSOLE_FILTER && typeof msg === "string") {
2538
- if (msg.includes("Invalid hook call.") && (msg.includes("https://reactjs.org/link/invalid-hook-call") || msg.includes("https://react.dev/link/invalid-hook-call"))) return;
2539
- }
2540
- originalConsoleError(msg, ...rest);
2541
- }
2542
- var server_default = {
2543
- name: "@astrojs/preact",
2544
- check,
2545
- renderToStaticMarkup,
2546
- supportsAstroStaticSlot: true
2547
- };
2548
- //#endregion
2549
- export { server_default as default };