sanity 3.94.1 → 3.94.2-next.1.a8381d7633

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 (113) hide show
  1. package/lib/_chunks-cjs/version.js +1 -1
  2. package/lib/_chunks-es/version.mjs +1 -1
  3. package/package.json +25 -25
  4. package/dist/BehaviorSubject-CU-WJrzA.mjs +0 -30
  5. package/dist/BehaviorSubject-CU-WJrzA.mjs.map +0 -1
  6. package/dist/BroadcastDisplayedDocument-BSV9T3BU.mjs +0 -20
  7. package/dist/BroadcastDisplayedDocument-BSV9T3BU.mjs.map +0 -1
  8. package/dist/DisplayedDocumentBroadcaster-DZ65n35Q.mjs +0 -62
  9. package/dist/DisplayedDocumentBroadcaster-DZ65n35Q.mjs.map +0 -1
  10. package/dist/LiveQueries-Crz53eU5.mjs +0 -407
  11. package/dist/LiveQueries-Crz53eU5.mjs.map +0 -1
  12. package/dist/Observable-CCQtH8Gg.mjs +0 -546
  13. package/dist/Observable-CCQtH8Gg.mjs.map +0 -1
  14. package/dist/PostMessageDocuments-BjgsJxz4.mjs +0 -72
  15. package/dist/PostMessageDocuments-BjgsJxz4.mjs.map +0 -1
  16. package/dist/PostMessagePerspective-pucY-E6a.mjs +0 -22
  17. package/dist/PostMessagePerspective-pucY-E6a.mjs.map +0 -1
  18. package/dist/PostMessagePreviewSnapshots-CRQgRg4_.mjs +0 -71
  19. package/dist/PostMessagePreviewSnapshots-CRQgRg4_.mjs.map +0 -1
  20. package/dist/PostMessageRefreshMutations-D944RbO3.mjs +0 -66
  21. package/dist/PostMessageRefreshMutations-D944RbO3.mjs.map +0 -1
  22. package/dist/PostMessageSchema-3eOtr1bs.mjs +0 -516
  23. package/dist/PostMessageSchema-3eOtr1bs.mjs.map +0 -1
  24. package/dist/PostMessageTelemetry-DMTQDJeN.mjs +0 -20
  25. package/dist/PostMessageTelemetry-DMTQDJeN.mjs.map +0 -1
  26. package/dist/PresentationToolGrantsCheck-B0q4AQ3b.mjs +0 -3999
  27. package/dist/PresentationToolGrantsCheck-B0q4AQ3b.mjs.map +0 -1
  28. package/dist/QRCodeSVG-hyTW2xeN.mjs +0 -648
  29. package/dist/QRCodeSVG-hyTW2xeN.mjs.map +0 -1
  30. package/dist/Refractor-Zss2QEe8.mjs +0 -2568
  31. package/dist/Refractor-Zss2QEe8.mjs.map +0 -1
  32. package/dist/SourceContext-QxJD1Wrm.mjs +0 -111
  33. package/dist/SourceContext-QxJD1Wrm.mjs.map +0 -1
  34. package/dist/StructureToolProvider-B-7cwz7l.mjs +0 -2287
  35. package/dist/StructureToolProvider-B-7cwz7l.mjs.map +0 -1
  36. package/dist/ViteDevServerStopped-CgIEqy9p.mjs +0 -57
  37. package/dist/ViteDevServerStopped-CgIEqy9p.mjs.map +0 -1
  38. package/dist/_createContext.mjs +0 -38
  39. package/dist/_createContext.mjs.map +0 -1
  40. package/dist/_singletons.mjs +0 -216
  41. package/dist/_singletons.mjs.map +0 -1
  42. package/dist/browser-B0Q9qZJS.mjs +0 -478
  43. package/dist/browser-B0Q9qZJS.mjs.map +0 -1
  44. package/dist/browser-DmX5VEcE.mjs +0 -324
  45. package/dist/browser-DmX5VEcE.mjs.map +0 -1
  46. package/dist/desk.mjs +0 -53
  47. package/dist/desk.mjs.map +0 -1
  48. package/dist/first-Cz545eV-.mjs +0 -42
  49. package/dist/first-Cz545eV-.mjs.map +0 -1
  50. package/dist/index-B2GCDfau.mjs +0 -96
  51. package/dist/index-B2GCDfau.mjs.map +0 -1
  52. package/dist/index-BRIelBPK.mjs +0 -6946
  53. package/dist/index-BRIelBPK.mjs.map +0 -1
  54. package/dist/index-BUB137yJ.mjs +0 -144
  55. package/dist/index-BUB137yJ.mjs.map +0 -1
  56. package/dist/index-C3PGPrdL.mjs +0 -1192
  57. package/dist/index-C3PGPrdL.mjs.map +0 -1
  58. package/dist/index-C9NvTy6s.mjs +0 -319
  59. package/dist/index-C9NvTy6s.mjs.map +0 -1
  60. package/dist/index-DCkQlgdi.mjs +0 -4001
  61. package/dist/index-DCkQlgdi.mjs.map +0 -1
  62. package/dist/index-DG-3plB0.mjs +0 -71
  63. package/dist/index-DG-3plB0.mjs.map +0 -1
  64. package/dist/index-RoxwhtVB.mjs +0 -5600
  65. package/dist/index-RoxwhtVB.mjs.map +0 -1
  66. package/dist/index-iMZR29eF.mjs +0 -756
  67. package/dist/index-iMZR29eF.mjs.map +0 -1
  68. package/dist/index-wVXq9rWS.mjs +0 -244
  69. package/dist/index-wVXq9rWS.mjs.map +0 -1
  70. package/dist/index.mjs +0 -137385
  71. package/dist/index.mjs.map +0 -1
  72. package/dist/lodash-Vz5dH_Dm.mjs +0 -3679
  73. package/dist/lodash-Vz5dH_Dm.mjs.map +0 -1
  74. package/dist/pane-Bm_57XKB.mjs +0 -5
  75. package/dist/pane-Bm_57XKB.mjs.map +0 -1
  76. package/dist/pane-Dopl4BjD.mjs +0 -5
  77. package/dist/pane-Dopl4BjD.mjs.map +0 -1
  78. package/dist/presentation-DsIky7Cj.mjs +0 -556
  79. package/dist/presentation-DsIky7Cj.mjs.map +0 -1
  80. package/dist/presentation.mjs +0 -10
  81. package/dist/presentation.mjs.map +0 -1
  82. package/dist/publishReplay-PuJoYJpp.mjs +0 -92
  83. package/dist/publishReplay-PuJoYJpp.mjs.map +0 -1
  84. package/dist/refractor-Bg1S3YDK.mjs +0 -26
  85. package/dist/refractor-Bg1S3YDK.mjs.map +0 -1
  86. package/dist/resources-BQsCEzu1.mjs +0 -60
  87. package/dist/resources-BQsCEzu1.mjs.map +0 -1
  88. package/dist/resources-BahMtJuO.mjs +0 -177
  89. package/dist/resources-BahMtJuO.mjs.map +0 -1
  90. package/dist/resources-CjkBN4z6.mjs +0 -126
  91. package/dist/resources-CjkBN4z6.mjs.map +0 -1
  92. package/dist/resources-Dc-6ZcPg.mjs +0 -157
  93. package/dist/resources-Dc-6ZcPg.mjs.map +0 -1
  94. package/dist/resources-DqxSuDsr.mjs +0 -37
  95. package/dist/resources-DqxSuDsr.mjs.map +0 -1
  96. package/dist/resources-_gTjFWLH.mjs +0 -517
  97. package/dist/resources-_gTjFWLH.mjs.map +0 -1
  98. package/dist/resources-kA1bao30.mjs +0 -358
  99. package/dist/resources-kA1bao30.mjs.map +0 -1
  100. package/dist/router.mjs +0 -721
  101. package/dist/router.mjs.map +0 -1
  102. package/dist/stegaEncodeSourceMap-DCG9Ba1H.mjs +0 -358
  103. package/dist/stegaEncodeSourceMap-DCG9Ba1H.mjs.map +0 -1
  104. package/dist/structure.mjs +0 -57
  105. package/dist/structure.mjs.map +0 -1
  106. package/dist/structureTool-Bth1vd8r.mjs +0 -13150
  107. package/dist/structureTool-Bth1vd8r.mjs.map +0 -1
  108. package/dist/switchMap-DHVUskpL.mjs +0 -54
  109. package/dist/switchMap-DHVUskpL.mjs.map +0 -1
  110. package/dist/v4-zH-CAum7.mjs +0 -24798
  111. package/dist/v4-zH-CAum7.mjs.map +0 -1
  112. package/dist/version-DoE_JnhG.mjs +0 -5
  113. package/dist/version-DoE_JnhG.mjs.map +0 -1
@@ -1,756 +0,0 @@
1
- var lt = Object.defineProperty;
2
- var Te = (e) => {
3
- throw TypeError(e);
4
- };
5
- var ft = (e, t, s) => t in e ? lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
6
- var _ = (e, t, s) => ft(e, typeof t != "symbol" ? t + "" : t, s), fe = (e, t, s) => t.has(e) || Te("Cannot " + s);
7
- var r = (e, t, s) => (fe(e, t, "read from private field"), s ? s.call(e) : t.get(e)), b = (e, t, s) => t.has(e) ? Te("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, s), g = (e, t, s, n) => (fe(e, t, "write to private field"), n ? n.call(e, s) : t.set(e, s), s), o = (e, t, s) => (fe(e, t, "access private method"), s);
8
- var mt = Object.defineProperty, u = (e, t) => mt(e, "name", { value: t, configurable: !0 }), B = class {
9
- constructor(e, t, s, n, p, f) {
10
- _(this, "type", 3);
11
- _(this, "name", "");
12
- _(this, "prefix", "");
13
- _(this, "value", "");
14
- _(this, "suffix", "");
15
- _(this, "modifier", 3);
16
- this.type = e, this.name = t, this.prefix = s, this.value = n, this.suffix = p, this.modifier = f;
17
- }
18
- hasCustomName() {
19
- return this.name !== "" && typeof this.name != "number";
20
- }
21
- };
22
- u(B, "Part");
23
- var dt = /[$_\p{ID_Start}]/u, gt = /[$_\u200C\u200D\p{ID_Continue}]/u, de = ".*";
24
- function Oe(e, t) {
25
- return (t ? /^[\x00-\xFF]*$/ : /^[\x00-\x7F]*$/).test(e);
26
- }
27
- u(Oe, "isASCII");
28
- function ve(e, t = !1) {
29
- let s = [], n = 0;
30
- for (; n < e.length; ) {
31
- let p = e[n], f = u(function(c) {
32
- if (!t) throw new TypeError(c);
33
- s.push({ type: "INVALID_CHAR", index: n, value: e[n++] });
34
- }, "ErrorOrInvalid");
35
- if (p === "*") {
36
- s.push({ type: "ASTERISK", index: n, value: e[n++] });
37
- continue;
38
- }
39
- if (p === "+" || p === "?") {
40
- s.push({ type: "OTHER_MODIFIER", index: n, value: e[n++] });
41
- continue;
42
- }
43
- if (p === "\\") {
44
- s.push({ type: "ESCAPED_CHAR", index: n++, value: e[n++] });
45
- continue;
46
- }
47
- if (p === "{") {
48
- s.push({ type: "OPEN", index: n, value: e[n++] });
49
- continue;
50
- }
51
- if (p === "}") {
52
- s.push({ type: "CLOSE", index: n, value: e[n++] });
53
- continue;
54
- }
55
- if (p === ":") {
56
- let c = "", i = n + 1;
57
- for (; i < e.length; ) {
58
- let h = e.substr(i, 1);
59
- if (i === n + 1 && dt.test(h) || i !== n + 1 && gt.test(h)) {
60
- c += e[i++];
61
- continue;
62
- }
63
- break;
64
- }
65
- if (!c) {
66
- f(`Missing parameter name at ${n}`);
67
- continue;
68
- }
69
- s.push({ type: "NAME", index: n, value: c }), n = i;
70
- continue;
71
- }
72
- if (p === "(") {
73
- let c = 1, i = "", h = n + 1, l = !1;
74
- if (e[h] === "?") {
75
- f(`Pattern cannot start with "?" at ${h}`);
76
- continue;
77
- }
78
- for (; h < e.length; ) {
79
- if (!Oe(e[h], !1)) {
80
- f(`Invalid character '${e[h]}' at ${h}.`), l = !0;
81
- break;
82
- }
83
- if (e[h] === "\\") {
84
- i += e[h++] + e[h++];
85
- continue;
86
- }
87
- if (e[h] === ")") {
88
- if (c--, c === 0) {
89
- h++;
90
- break;
91
- }
92
- } else if (e[h] === "(" && (c++, e[h + 1] !== "?")) {
93
- f(`Capturing groups are not allowed at ${h}`), l = !0;
94
- break;
95
- }
96
- i += e[h++];
97
- }
98
- if (l) continue;
99
- if (c) {
100
- f(`Unbalanced pattern at ${n}`);
101
- continue;
102
- }
103
- if (!i) {
104
- f(`Missing pattern at ${n}`);
105
- continue;
106
- }
107
- s.push({ type: "REGEX", index: n, value: i }), n = h;
108
- continue;
109
- }
110
- s.push({ type: "CHAR", index: n, value: e[n++] });
111
- }
112
- return s.push({ type: "END", index: n, value: "" }), s;
113
- }
114
- u(ve, "lexer");
115
- function xe(e, t = {}) {
116
- let s = ve(e);
117
- t.delimiter ?? (t.delimiter = "/#?"), t.prefixes ?? (t.prefixes = "./");
118
- let n = `[^${P(t.delimiter)}]+?`, p = [], f = 0, c = 0, i = /* @__PURE__ */ new Set(), h = u((d) => {
119
- if (c < s.length && s[c].type === d) return s[c++].value;
120
- }, "tryConsume"), l = u(() => h("OTHER_MODIFIER") ?? h("ASTERISK"), "tryConsumeModifier"), $ = u((d) => {
121
- let E = h(d);
122
- if (E !== void 0) return E;
123
- let { type: R, index: G } = s[c];
124
- throw new TypeError(`Unexpected ${R} at ${G}, expected ${d}`);
125
- }, "mustConsume"), T = u(() => {
126
- let d = "", E;
127
- for (; E = h("CHAR") ?? h("ESCAPED_CHAR"); ) d += E;
128
- return d;
129
- }, "consumeText"), se = u((d) => d, "DefaultEncodePart"), ne = t.encodePart || se, ae = "", pe = u((d) => {
130
- ae += d;
131
- }, "appendToPendingFixedValue"), le = u(() => {
132
- ae.length && (p.push(new B(3, "", "", ne(ae), "", 3)), ae = "");
133
- }, "maybeAddPartFromPendingFixedValue"), Ae = u((d, E, R, G, D) => {
134
- let S = 3;
135
- switch (D) {
136
- case "?":
137
- S = 1;
138
- break;
139
- case "*":
140
- S = 0;
141
- break;
142
- case "+":
143
- S = 2;
144
- break;
145
- }
146
- if (!E && !R && S === 3) {
147
- pe(d);
148
- return;
149
- }
150
- if (le(), !E && !R) {
151
- if (!d) return;
152
- p.push(new B(3, "", "", ne(d), "", S));
153
- return;
154
- }
155
- let C;
156
- R ? R === "*" ? C = de : C = R : C = n;
157
- let ie = 2;
158
- C === n ? (ie = 1, C = "") : C === de && (ie = 0, C = "");
159
- let H;
160
- if (E ? H = E : R && (H = f++), i.has(H)) throw new TypeError(`Duplicate name '${H}'.`);
161
- i.add(H), p.push(new B(ie, H, ne(d), C, ne(G), S));
162
- }, "addPart");
163
- for (; c < s.length; ) {
164
- let d = h("CHAR"), E = h("NAME"), R = h("REGEX");
165
- if (!E && !R && (R = h("ASTERISK")), E || R) {
166
- let D = d ?? "";
167
- t.prefixes.indexOf(D) === -1 && (pe(D), D = ""), le();
168
- let S = l();
169
- Ae(D, E, R, "", S);
170
- continue;
171
- }
172
- let G = d ?? h("ESCAPED_CHAR");
173
- if (G) {
174
- pe(G);
175
- continue;
176
- }
177
- if (h("OPEN")) {
178
- let D = T(), S = h("NAME"), C = h("REGEX");
179
- !S && !C && (C = h("ASTERISK"));
180
- let ie = T();
181
- $("CLOSE");
182
- let H = l();
183
- Ae(D, S, C, ie, H);
184
- continue;
185
- }
186
- le(), $("END");
187
- }
188
- return p;
189
- }
190
- u(xe, "parse");
191
- function P(e) {
192
- return e.replace(/([.+*?^${}()[\]|/\\])/g, "\\$1");
193
- }
194
- u(P, "escapeString");
195
- function ge(e) {
196
- return e && e.ignoreCase ? "ui" : "u";
197
- }
198
- u(ge, "flags");
199
- function De(e, t, s) {
200
- return Ee(xe(e, s), t, s);
201
- }
202
- u(De, "stringToRegexp");
203
- function M(e) {
204
- switch (e) {
205
- case 0:
206
- return "*";
207
- case 1:
208
- return "?";
209
- case 2:
210
- return "+";
211
- case 3:
212
- return "";
213
- }
214
- }
215
- u(M, "modifierToString");
216
- function Ee(e, t, s = {}) {
217
- s.delimiter ?? (s.delimiter = "/#?"), s.prefixes ?? (s.prefixes = "./"), s.sensitive ?? (s.sensitive = !1), s.strict ?? (s.strict = !1), s.end ?? (s.end = !0), s.start ?? (s.start = !0), s.endsWith = "";
218
- let n = s.start ? "^" : "";
219
- for (let i of e) {
220
- if (i.type === 3) {
221
- i.modifier === 3 ? n += P(i.value) : n += `(?:${P(i.value)})${M(i.modifier)}`;
222
- continue;
223
- }
224
- t && t.push(i.name);
225
- let h = `[^${P(s.delimiter)}]+?`, l = i.value;
226
- if (i.type === 1 ? l = h : i.type === 0 && (l = de), !i.prefix.length && !i.suffix.length) {
227
- i.modifier === 3 || i.modifier === 1 ? n += `(${l})${M(i.modifier)}` : n += `((?:${l})${M(i.modifier)})`;
228
- continue;
229
- }
230
- if (i.modifier === 3 || i.modifier === 1) {
231
- n += `(?:${P(i.prefix)}(${l})${P(i.suffix)})`, n += M(i.modifier);
232
- continue;
233
- }
234
- n += `(?:${P(i.prefix)}`, n += `((?:${l})(?:`, n += P(i.suffix), n += P(i.prefix), n += `(?:${l}))*)${P(i.suffix)})`, i.modifier === 0 && (n += "?");
235
- }
236
- let p = `[${P(s.endsWith)}]|$`, f = `[${P(s.delimiter)}]`;
237
- if (s.end) return s.strict || (n += `${f}?`), s.endsWith.length ? n += `(?=${p})` : n += "$", new RegExp(n, ge(s));
238
- s.strict || (n += `(?:${f}(?=${p}))?`);
239
- let c = !1;
240
- if (e.length) {
241
- let i = e[e.length - 1];
242
- i.type === 3 && i.modifier === 3 && (c = s.delimiter.indexOf(i) > -1);
243
- }
244
- return c || (n += `(?=${f}|${p})`), new RegExp(n, ge(s));
245
- }
246
- u(Ee, "partsToRegexp");
247
- var j = { delimiter: "", prefixes: "", sensitive: !0, strict: !0 }, yt = { delimiter: ".", prefixes: "", sensitive: !0, strict: !0 }, bt = { delimiter: "/", prefixes: "/", sensitive: !0, strict: !0 };
248
- function He(e, t) {
249
- return e.length ? e[0] === "/" ? !0 : !t || e.length < 2 ? !1 : (e[0] == "\\" || e[0] == "{") && e[1] == "/" : !1;
250
- }
251
- u(He, "isAbsolutePathname");
252
- function $e(e, t) {
253
- return e.startsWith(t) ? e.substring(t.length, e.length) : e;
254
- }
255
- u($e, "maybeStripPrefix");
256
- function Ne(e, t) {
257
- return e.endsWith(t) ? e.substr(0, e.length - t.length) : e;
258
- }
259
- u(Ne, "maybeStripSuffix");
260
- function Re(e) {
261
- return !e || e.length < 2 ? !1 : e[0] === "[" || (e[0] === "\\" || e[0] === "{") && e[1] === "[";
262
- }
263
- u(Re, "treatAsIPv6Hostname");
264
- var je = ["ftp", "file", "http", "https", "ws", "wss"];
265
- function Pe(e) {
266
- if (!e) return !0;
267
- for (let t of je) if (e.test(t)) return !0;
268
- return !1;
269
- }
270
- u(Pe, "isSpecialScheme");
271
- function _e(e, t) {
272
- if (e = $e(e, "#"), t || e === "") return e;
273
- let s = new URL("https://example.com");
274
- return s.hash = e, s.hash ? s.hash.substring(1, s.hash.length) : "";
275
- }
276
- u(_e, "canonicalizeHash");
277
- function Fe(e, t) {
278
- if (e = $e(e, "?"), t || e === "") return e;
279
- let s = new URL("https://example.com");
280
- return s.search = e, s.search ? s.search.substring(1, s.search.length) : "";
281
- }
282
- u(Fe, "canonicalizeSearch");
283
- function Me(e, t) {
284
- return t || e === "" ? e : Re(e) ? Le(e) : Ce(e);
285
- }
286
- u(Me, "canonicalizeHostname");
287
- function ze(e, t) {
288
- if (t || e === "") return e;
289
- let s = new URL("https://example.com");
290
- return s.password = e, s.password;
291
- }
292
- u(ze, "canonicalizePassword");
293
- function We(e, t) {
294
- if (t || e === "") return e;
295
- let s = new URL("https://example.com");
296
- return s.username = e, s.username;
297
- }
298
- u(We, "canonicalizeUsername");
299
- function Ge(e, t, s) {
300
- if (s || e === "") return e;
301
- if (t && !je.includes(t)) return new URL(`${t}:${e}`).pathname;
302
- let n = e[0] == "/";
303
- return e = new URL(n ? e : "/-" + e, "https://example.com").pathname, n || (e = e.substring(2, e.length)), e;
304
- }
305
- u(Ge, "canonicalizePathname");
306
- function Ke(e, t, s) {
307
- return ke(t) === e && (e = ""), s || e === "" ? e : Se(e);
308
- }
309
- u(Ke, "canonicalizePort");
310
- function Ve(e, t) {
311
- return e = Ne(e, ":"), t || e === "" ? e : ce(e);
312
- }
313
- u(Ve, "canonicalizeProtocol");
314
- function ke(e) {
315
- switch (e) {
316
- case "ws":
317
- case "http":
318
- return "80";
319
- case "wws":
320
- case "https":
321
- return "443";
322
- case "ftp":
323
- return "21";
324
- default:
325
- return "";
326
- }
327
- }
328
- u(ke, "defaultPortForProtocol");
329
- function ce(e) {
330
- if (e === "") return e;
331
- if (/^[-+.A-Za-z0-9]*$/.test(e)) return e.toLowerCase();
332
- throw new TypeError(`Invalid protocol '${e}'.`);
333
- }
334
- u(ce, "protocolEncodeCallback");
335
- function Xe(e) {
336
- if (e === "") return e;
337
- let t = new URL("https://example.com");
338
- return t.username = e, t.username;
339
- }
340
- u(Xe, "usernameEncodeCallback");
341
- function Be(e) {
342
- if (e === "") return e;
343
- let t = new URL("https://example.com");
344
- return t.password = e, t.password;
345
- }
346
- u(Be, "passwordEncodeCallback");
347
- function Ce(e) {
348
- if (e === "") return e;
349
- if (/[\t\n\r #%/:<>?@[\]^\\|]/g.test(e)) throw new TypeError(`Invalid hostname '${e}'`);
350
- let t = new URL("https://example.com");
351
- return t.hostname = e, t.hostname;
352
- }
353
- u(Ce, "hostnameEncodeCallback");
354
- function Le(e) {
355
- if (e === "") return e;
356
- if (/[^0-9a-fA-F[\]:]/g.test(e)) throw new TypeError(`Invalid IPv6 hostname '${e}'`);
357
- return e.toLowerCase();
358
- }
359
- u(Le, "ipv6HostnameEncodeCallback");
360
- function Se(e) {
361
- if (e === "" || /^[0-9]*$/.test(e) && parseInt(e) <= 65535) return e;
362
- throw new TypeError(`Invalid port '${e}'.`);
363
- }
364
- u(Se, "portEncodeCallback");
365
- function qe(e) {
366
- if (e === "") return e;
367
- let t = new URL("https://example.com");
368
- return t.pathname = e[0] !== "/" ? "/-" + e : e, e[0] !== "/" ? t.pathname.substring(2, t.pathname.length) : t.pathname;
369
- }
370
- u(qe, "standardURLPathnameEncodeCallback");
371
- function Je(e) {
372
- return e === "" ? e : new URL(`data:${e}`).pathname;
373
- }
374
- u(Je, "pathURLPathnameEncodeCallback");
375
- function Qe(e) {
376
- if (e === "") return e;
377
- let t = new URL("https://example.com");
378
- return t.search = e, t.search.substring(1, t.search.length);
379
- }
380
- u(Qe, "searchEncodeCallback");
381
- function Ye(e) {
382
- if (e === "") return e;
383
- let t = new URL("https://example.com");
384
- return t.hash = e, t.hash.substring(1, t.hash.length);
385
- }
386
- u(Ye, "hashEncodeCallback");
387
- var q, x, w, m, z, J, k, Q, Y, Z, a, y, et, ye, re, oe, L, be, tt, he, st, it, ue, K, F, rt, nt, at, ot, U, ht, Ue, Ze = (Ue = class {
388
- constructor(e) {
389
- b(this, a);
390
- b(this, q);
391
- b(this, x, []);
392
- b(this, w, {});
393
- b(this, m, 0);
394
- b(this, z, 1);
395
- b(this, J, 0);
396
- b(this, k, 0);
397
- b(this, Q, 0);
398
- b(this, Y, 0);
399
- b(this, Z, !1);
400
- g(this, q, e);
401
- }
402
- get result() {
403
- return r(this, w);
404
- }
405
- parse() {
406
- for (g(this, x, ve(r(this, q), !0)); r(this, m) < r(this, x).length; g(this, m, r(this, m) + r(this, z))) {
407
- if (g(this, z, 1), r(this, x)[r(this, m)].type === "END") {
408
- if (r(this, k) === 0) {
409
- o(this, a, ye).call(this), o(this, a, F).call(this) ? o(this, a, y).call(this, 9, 1) : o(this, a, K).call(this) ? o(this, a, y).call(this, 8, 1) : o(this, a, y).call(this, 7, 0);
410
- continue;
411
- } else if (r(this, k) === 2) {
412
- o(this, a, re).call(this, 5);
413
- continue;
414
- }
415
- o(this, a, y).call(this, 10, 0);
416
- break;
417
- }
418
- if (r(this, Q) > 0) if (o(this, a, nt).call(this)) g(this, Q, r(this, Q) - 1);
419
- else continue;
420
- if (o(this, a, rt).call(this)) {
421
- g(this, Q, r(this, Q) + 1);
422
- continue;
423
- }
424
- switch (r(this, k)) {
425
- case 0:
426
- o(this, a, be).call(this) && o(this, a, re).call(this, 1);
427
- break;
428
- case 1:
429
- if (o(this, a, be).call(this)) {
430
- o(this, a, ht).call(this);
431
- let e = 7, t = 1;
432
- o(this, a, tt).call(this) ? (e = 2, t = 3) : r(this, Z) && (e = 2), o(this, a, y).call(this, e, t);
433
- }
434
- break;
435
- case 2:
436
- o(this, a, he).call(this) ? o(this, a, re).call(this, 3) : (o(this, a, ue).call(this) || o(this, a, K).call(this) || o(this, a, F).call(this)) && o(this, a, re).call(this, 5);
437
- break;
438
- case 3:
439
- o(this, a, st).call(this) ? o(this, a, y).call(this, 4, 1) : o(this, a, he).call(this) && o(this, a, y).call(this, 5, 1);
440
- break;
441
- case 4:
442
- o(this, a, he).call(this) && o(this, a, y).call(this, 5, 1);
443
- break;
444
- case 5:
445
- o(this, a, at).call(this) ? g(this, Y, r(this, Y) + 1) : o(this, a, ot).call(this) && g(this, Y, r(this, Y) - 1), o(this, a, it).call(this) && !r(this, Y) ? o(this, a, y).call(this, 6, 1) : o(this, a, ue).call(this) ? o(this, a, y).call(this, 7, 0) : o(this, a, K).call(this) ? o(this, a, y).call(this, 8, 1) : o(this, a, F).call(this) && o(this, a, y).call(this, 9, 1);
446
- break;
447
- case 6:
448
- o(this, a, ue).call(this) ? o(this, a, y).call(this, 7, 0) : o(this, a, K).call(this) ? o(this, a, y).call(this, 8, 1) : o(this, a, F).call(this) && o(this, a, y).call(this, 9, 1);
449
- break;
450
- case 7:
451
- o(this, a, K).call(this) ? o(this, a, y).call(this, 8, 1) : o(this, a, F).call(this) && o(this, a, y).call(this, 9, 1);
452
- break;
453
- case 8:
454
- o(this, a, F).call(this) && o(this, a, y).call(this, 9, 1);
455
- break;
456
- }
457
- }
458
- r(this, w).hostname !== void 0 && r(this, w).port === void 0 && (r(this, w).port = "");
459
- }
460
- }, q = new WeakMap(), x = new WeakMap(), w = new WeakMap(), m = new WeakMap(), z = new WeakMap(), J = new WeakMap(), k = new WeakMap(), Q = new WeakMap(), Y = new WeakMap(), Z = new WeakMap(), a = new WeakSet(), y = function(e, t) {
461
- var s, n, p;
462
- switch (r(this, k)) {
463
- case 0:
464
- break;
465
- case 1:
466
- r(this, w).protocol = o(this, a, U).call(this);
467
- break;
468
- case 2:
469
- break;
470
- case 3:
471
- r(this, w).username = o(this, a, U).call(this);
472
- break;
473
- case 4:
474
- r(this, w).password = o(this, a, U).call(this);
475
- break;
476
- case 5:
477
- r(this, w).hostname = o(this, a, U).call(this);
478
- break;
479
- case 6:
480
- r(this, w).port = o(this, a, U).call(this);
481
- break;
482
- case 7:
483
- r(this, w).pathname = o(this, a, U).call(this);
484
- break;
485
- case 8:
486
- r(this, w).search = o(this, a, U).call(this);
487
- break;
488
- case 9:
489
- r(this, w).hash = o(this, a, U).call(this);
490
- break;
491
- }
492
- r(this, k) !== 0 && e !== 10 && ([1, 2, 3, 4].includes(r(this, k)) && [6, 7, 8, 9].includes(e) && ((s = r(this, w)).hostname ?? (s.hostname = "")), [1, 2, 3, 4, 5, 6].includes(r(this, k)) && [8, 9].includes(e) && ((n = r(this, w)).pathname ?? (n.pathname = r(this, Z) ? "/" : "")), [1, 2, 3, 4, 5, 6, 7].includes(r(this, k)) && e === 9 && ((p = r(this, w)).search ?? (p.search = ""))), o(this, a, et).call(this, e, t);
493
- }, et = function(e, t) {
494
- g(this, k, e), g(this, J, r(this, m) + t), g(this, m, r(this, m) + t), g(this, z, 0);
495
- }, ye = function() {
496
- g(this, m, r(this, J)), g(this, z, 0);
497
- }, re = function(e) {
498
- o(this, a, ye).call(this), g(this, k, e);
499
- }, oe = function(e) {
500
- return e < 0 && (e = r(this, x).length - e), e < r(this, x).length ? r(this, x)[e] : r(this, x)[r(this, x).length - 1];
501
- }, L = function(e, t) {
502
- let s = o(this, a, oe).call(this, e);
503
- return s.value === t && (s.type === "CHAR" || s.type === "ESCAPED_CHAR" || s.type === "INVALID_CHAR");
504
- }, be = function() {
505
- return o(this, a, L).call(this, r(this, m), ":");
506
- }, tt = function() {
507
- return o(this, a, L).call(this, r(this, m) + 1, "/") && o(this, a, L).call(this, r(this, m) + 2, "/");
508
- }, he = function() {
509
- return o(this, a, L).call(this, r(this, m), "@");
510
- }, st = function() {
511
- return o(this, a, L).call(this, r(this, m), ":");
512
- }, it = function() {
513
- return o(this, a, L).call(this, r(this, m), ":");
514
- }, ue = function() {
515
- return o(this, a, L).call(this, r(this, m), "/");
516
- }, K = function() {
517
- if (o(this, a, L).call(this, r(this, m), "?")) return !0;
518
- if (r(this, x)[r(this, m)].value !== "?") return !1;
519
- let e = o(this, a, oe).call(this, r(this, m) - 1);
520
- return e.type !== "NAME" && e.type !== "REGEX" && e.type !== "CLOSE" && e.type !== "ASTERISK";
521
- }, F = function() {
522
- return o(this, a, L).call(this, r(this, m), "#");
523
- }, rt = function() {
524
- return r(this, x)[r(this, m)].type == "OPEN";
525
- }, nt = function() {
526
- return r(this, x)[r(this, m)].type == "CLOSE";
527
- }, at = function() {
528
- return o(this, a, L).call(this, r(this, m), "[");
529
- }, ot = function() {
530
- return o(this, a, L).call(this, r(this, m), "]");
531
- }, U = function() {
532
- let e = r(this, x)[r(this, m)], t = o(this, a, oe).call(this, r(this, J)).index;
533
- return r(this, q).substring(t, e.index);
534
- }, ht = function() {
535
- let e = {};
536
- Object.assign(e, j), e.encodePart = ce;
537
- let t = De(o(this, a, U).call(this), void 0, e);
538
- g(this, Z, Pe(t));
539
- }, Ue);
540
- u(Ze, "Parser");
541
- var me = ["protocol", "username", "password", "hostname", "port", "pathname", "search", "hash"], N = "*";
542
- function we(e, t) {
543
- if (typeof e != "string") throw new TypeError("parameter 1 is not of type 'string'.");
544
- let s = new URL(e, t);
545
- return { protocol: s.protocol.substring(0, s.protocol.length - 1), username: s.username, password: s.password, hostname: s.hostname, port: s.port, pathname: s.pathname, search: s.search !== "" ? s.search.substring(1, s.search.length) : void 0, hash: s.hash !== "" ? s.hash.substring(1, s.hash.length) : void 0 };
546
- }
547
- u(we, "extractValues");
548
- function I(e, t) {
549
- return t ? X(e) : e;
550
- }
551
- u(I, "processBaseURLString");
552
- function V(e, t, s) {
553
- let n;
554
- if (typeof t.baseURL == "string") try {
555
- n = new URL(t.baseURL), t.protocol === void 0 && (e.protocol = I(n.protocol.substring(0, n.protocol.length - 1), s)), !s && t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.username === void 0 && (e.username = I(n.username, s)), !s && t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.username === void 0 && t.password === void 0 && (e.password = I(n.password, s)), t.protocol === void 0 && t.hostname === void 0 && (e.hostname = I(n.hostname, s)), t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && (e.port = I(n.port, s)), t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.pathname === void 0 && (e.pathname = I(n.pathname, s)), t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.pathname === void 0 && t.search === void 0 && (e.search = I(n.search.substring(1, n.search.length), s)), t.protocol === void 0 && t.hostname === void 0 && t.port === void 0 && t.pathname === void 0 && t.search === void 0 && t.hash === void 0 && (e.hash = I(n.hash.substring(1, n.hash.length), s));
556
- } catch {
557
- throw new TypeError(`invalid baseURL '${t.baseURL}'.`);
558
- }
559
- if (typeof t.protocol == "string" && (e.protocol = Ve(t.protocol, s)), typeof t.username == "string" && (e.username = We(t.username, s)), typeof t.password == "string" && (e.password = ze(t.password, s)), typeof t.hostname == "string" && (e.hostname = Me(t.hostname, s)), typeof t.port == "string" && (e.port = Ke(t.port, e.protocol, s)), typeof t.pathname == "string") {
560
- if (e.pathname = t.pathname, n && !He(e.pathname, s)) {
561
- let p = n.pathname.lastIndexOf("/");
562
- p >= 0 && (e.pathname = I(n.pathname.substring(0, p + 1), s) + e.pathname);
563
- }
564
- e.pathname = Ge(e.pathname, e.protocol, s);
565
- }
566
- return typeof t.search == "string" && (e.search = Fe(t.search, s)), typeof t.hash == "string" && (e.hash = _e(t.hash, s)), e;
567
- }
568
- u(V, "applyInit");
569
- function X(e) {
570
- return e.replace(/([+*?:{}()\\])/g, "\\$1");
571
- }
572
- u(X, "escapePatternString");
573
- function ut(e) {
574
- return e.replace(/([.+*?^${}()[\]|/\\])/g, "\\$1");
575
- }
576
- u(ut, "escapeRegexpString");
577
- function ct(e, t) {
578
- t.delimiter ?? (t.delimiter = "/#?"), t.prefixes ?? (t.prefixes = "./"), t.sensitive ?? (t.sensitive = !1), t.strict ?? (t.strict = !1), t.end ?? (t.end = !0), t.start ?? (t.start = !0), t.endsWith = "";
579
- let s = ".*", n = `[^${ut(t.delimiter)}]+?`, p = /[$_\u200C\u200D\p{ID_Continue}]/u, f = "";
580
- for (let c = 0; c < e.length; ++c) {
581
- let i = e[c];
582
- if (i.type === 3) {
583
- if (i.modifier === 3) {
584
- f += X(i.value);
585
- continue;
586
- }
587
- f += `{${X(i.value)}}${M(i.modifier)}`;
588
- continue;
589
- }
590
- let h = i.hasCustomName(), l = !!i.suffix.length || !!i.prefix.length && (i.prefix.length !== 1 || !t.prefixes.includes(i.prefix)), $ = c > 0 ? e[c - 1] : null, T = c < e.length - 1 ? e[c + 1] : null;
591
- if (!l && h && i.type === 1 && i.modifier === 3 && T && !T.prefix.length && !T.suffix.length) if (T.type === 3) {
592
- let se = T.value.length > 0 ? T.value[0] : "";
593
- l = p.test(se);
594
- } else l = !T.hasCustomName();
595
- if (!l && !i.prefix.length && $ && $.type === 3) {
596
- let se = $.value[$.value.length - 1];
597
- l = t.prefixes.includes(se);
598
- }
599
- l && (f += "{"), f += X(i.prefix), h && (f += `:${i.name}`), i.type === 2 ? f += `(${i.value})` : i.type === 1 ? h || (f += `(${n})`) : i.type === 0 && (!h && (!$ || $.type === 3 || $.modifier !== 3 || l || i.prefix !== "") ? f += "*" : f += `(${s})`), i.type === 1 && h && i.suffix.length && p.test(i.suffix[0]) && (f += "\\"), f += X(i.suffix), l && (f += "}"), i.modifier !== 3 && (f += M(i.modifier));
600
- }
601
- return f;
602
- }
603
- u(ct, "partsToPattern");
604
- var O, W, ee, v, A, te, Ie, pt = (Ie = class {
605
- constructor(e = {}, t, s) {
606
- b(this, O);
607
- b(this, W, {});
608
- b(this, ee, {});
609
- b(this, v, {});
610
- b(this, A, {});
611
- b(this, te, !1);
612
- try {
613
- let n;
614
- if (typeof t == "string" ? n = t : s = t, typeof e == "string") {
615
- let i = new Ze(e);
616
- if (i.parse(), e = i.result, n === void 0 && typeof e.protocol != "string") throw new TypeError("A base URL must be provided for a relative constructor string.");
617
- e.baseURL = n;
618
- } else {
619
- if (!e || typeof e != "object") throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");
620
- if (n) throw new TypeError("parameter 1 is not of type 'string'.");
621
- }
622
- typeof s > "u" && (s = { ignoreCase: !1 });
623
- let p = { ignoreCase: s.ignoreCase === !0 };
624
- g(this, O, V({ pathname: N, protocol: N, username: N, password: N, hostname: N, port: N, search: N, hash: N }, e, !0)), ke(r(this, O).protocol) === r(this, O).port && (r(this, O).port = "");
625
- let c;
626
- for (c of me) {
627
- if (!(c in r(this, O))) continue;
628
- let i = {}, h = r(this, O)[c];
629
- switch (r(this, ee)[c] = [], c) {
630
- case "protocol":
631
- Object.assign(i, j), i.encodePart = ce;
632
- break;
633
- case "username":
634
- Object.assign(i, j), i.encodePart = Xe;
635
- break;
636
- case "password":
637
- Object.assign(i, j), i.encodePart = Be;
638
- break;
639
- case "hostname":
640
- Object.assign(i, yt), Re(h) ? i.encodePart = Le : i.encodePart = Ce;
641
- break;
642
- case "port":
643
- Object.assign(i, j), i.encodePart = Se;
644
- break;
645
- case "pathname":
646
- Pe(r(this, W).protocol) ? (Object.assign(i, bt, p), i.encodePart = qe) : (Object.assign(i, j, p), i.encodePart = Je);
647
- break;
648
- case "search":
649
- Object.assign(i, j, p), i.encodePart = Qe;
650
- break;
651
- case "hash":
652
- Object.assign(i, j, p), i.encodePart = Ye;
653
- break;
654
- }
655
- try {
656
- r(this, A)[c] = xe(h, i), r(this, W)[c] = Ee(r(this, A)[c], r(this, ee)[c], i), r(this, v)[c] = ct(r(this, A)[c], i), g(this, te, r(this, te) || r(this, A)[c].some((l) => l.type === 2));
657
- } catch {
658
- throw new TypeError(`invalid ${c} pattern '${r(this, O)[c]}'.`);
659
- }
660
- }
661
- } catch (n) {
662
- throw new TypeError(`Failed to construct 'URLPattern': ${n.message}`);
663
- }
664
- }
665
- get [Symbol.toStringTag]() {
666
- return "URLPattern";
667
- }
668
- test(e = {}, t) {
669
- let s = { pathname: "", protocol: "", username: "", password: "", hostname: "", port: "", search: "", hash: "" };
670
- if (typeof e != "string" && t) throw new TypeError("parameter 1 is not of type 'string'.");
671
- if (typeof e > "u") return !1;
672
- try {
673
- typeof e == "object" ? s = V(s, e, !1) : s = V(s, we(e, t), !1);
674
- } catch {
675
- return !1;
676
- }
677
- let n;
678
- for (n of me) if (!r(this, W)[n].exec(s[n])) return !1;
679
- return !0;
680
- }
681
- exec(e = {}, t) {
682
- let s = { pathname: "", protocol: "", username: "", password: "", hostname: "", port: "", search: "", hash: "" };
683
- if (typeof e != "string" && t) throw new TypeError("parameter 1 is not of type 'string'.");
684
- if (typeof e > "u") return;
685
- try {
686
- typeof e == "object" ? s = V(s, e, !1) : s = V(s, we(e, t), !1);
687
- } catch {
688
- return null;
689
- }
690
- let n = {};
691
- t ? n.inputs = [e, t] : n.inputs = [e];
692
- let p;
693
- for (p of me) {
694
- let f = r(this, W)[p].exec(s[p]);
695
- if (!f) return null;
696
- let c = {};
697
- for (let [i, h] of r(this, ee)[p].entries()) if (typeof h == "string" || typeof h == "number") {
698
- let l = f[i + 1];
699
- c[h] = l;
700
- }
701
- n[p] = { input: s[p] ?? "", groups: c };
702
- }
703
- return n;
704
- }
705
- static compareComponent(e, t, s) {
706
- let n = u((i, h) => {
707
- for (let l of ["type", "modifier", "prefix", "value", "suffix"]) {
708
- if (i[l] < h[l]) return -1;
709
- if (i[l] !== h[l])
710
- return 1;
711
- }
712
- return 0;
713
- }, "comparePart"), p = new B(3, "", "", "", "", 3), f = new B(0, "", "", "", "", 3), c = u((i, h) => {
714
- let l = 0;
715
- for (; l < Math.min(i.length, h.length); ++l) {
716
- let $ = n(i[l], h[l]);
717
- if ($) return $;
718
- }
719
- return i.length === h.length ? 0 : n(i[l] ?? p, h[l] ?? p);
720
- }, "comparePartList");
721
- return !r(t, v)[e] && !r(s, v)[e] ? 0 : r(t, v)[e] && !r(s, v)[e] ? c(r(t, A)[e], [f]) : !r(t, v)[e] && r(s, v)[e] ? c([f], r(s, A)[e]) : c(r(t, A)[e], r(s, A)[e]);
722
- }
723
- get protocol() {
724
- return r(this, v).protocol;
725
- }
726
- get username() {
727
- return r(this, v).username;
728
- }
729
- get password() {
730
- return r(this, v).password;
731
- }
732
- get hostname() {
733
- return r(this, v).hostname;
734
- }
735
- get port() {
736
- return r(this, v).port;
737
- }
738
- get pathname() {
739
- return r(this, v).pathname;
740
- }
741
- get search() {
742
- return r(this, v).search;
743
- }
744
- get hash() {
745
- return r(this, v).hash;
746
- }
747
- get hasRegExpGroups() {
748
- return r(this, te);
749
- }
750
- }, O = new WeakMap(), W = new WeakMap(), ee = new WeakMap(), v = new WeakMap(), A = new WeakMap(), te = new WeakMap(), Ie);
751
- u(pt, "URLPattern");
752
- globalThis.URLPattern || (globalThis.URLPattern = pt);
753
- export {
754
- pt as URLPattern
755
- };
756
- //# sourceMappingURL=index-iMZR29eF.mjs.map