zudoku 0.66.5 → 0.66.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/main.d.ts +6 -6
- package/dist/config/validators/InputNavigationSchema.d.ts +2 -0
- package/dist/config/validators/InputNavigationSchema.js +1 -0
- package/dist/config/validators/InputNavigationSchema.js.map +1 -1
- package/dist/config/validators/NavigationSchema.js +6 -1
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/flat-config.d.ts +1 -0
- package/dist/lib/authentication/providers/auth0.js +11 -7
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +0 -22
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/supabase.js +6 -15
- package/dist/lib/authentication/providers/supabase.js.map +1 -1
- package/dist/lib/oas/graphql/circular.d.ts +1 -0
- package/dist/lib/oas/graphql/circular.js +20 -5
- package/dist/lib/oas/graphql/circular.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +5 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.js +11 -3
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/vite/api/SchemaManager.d.ts +1 -0
- package/dist/vite/api/SchemaManager.js +9 -3
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/prerender/utils.js +9 -3
- package/dist/vite/prerender/utils.js.map +1 -1
- package/lib/{ClaudeLogo-ByzA8TYR.js → ClaudeLogo-BpqHBMS8.js} +3 -3
- package/lib/{ClaudeLogo-ByzA8TYR.js.map → ClaudeLogo-BpqHBMS8.js.map} +1 -1
- package/lib/{Input-nskrp_mj.js → Input-B6YcAPv-.js} +3 -3
- package/lib/{Input-nskrp_mj.js.map → Input-B6YcAPv-.js.map} +1 -1
- package/lib/{MdxPage-Bh5YNRV9.js → MdxPage-CeFSxGb_.js} +8 -8
- package/lib/{MdxPage-Bh5YNRV9.js.map → MdxPage-CeFSxGb_.js.map} +1 -1
- package/lib/{Mermaid-CGRoylZf.js → Mermaid-COVtAqcZ.js} +3 -3
- package/lib/{Mermaid-CGRoylZf.js.map → Mermaid-COVtAqcZ.js.map} +1 -1
- package/lib/{OAuthErrorPage-CsTKz5hX.js → OAuthErrorPage-XTPBOMN8.js} +6 -6
- package/lib/{OAuthErrorPage-CsTKz5hX.js.map → OAuthErrorPage-XTPBOMN8.js.map} +1 -1
- package/lib/{OasProvider-BBAbJiYa.js → OasProvider-BS4rdzZC.js} +4 -4
- package/lib/{OasProvider-BBAbJiYa.js.map → OasProvider-BS4rdzZC.js.map} +1 -1
- package/lib/{OperationList-DUxrNisd.js → OperationList-Dg0Nm1tg.js} +128 -125
- package/lib/{OperationList-DUxrNisd.js.map → OperationList-Dg0Nm1tg.js.map} +1 -1
- package/lib/{RouteGuard-CIN9Ou-r.js → RouteGuard-kCicqF3x.js} +4 -4
- package/lib/{RouteGuard-CIN9Ou-r.js.map → RouteGuard-kCicqF3x.js.map} +1 -1
- package/lib/{SchemaList-BbnkfjIe.js → SchemaList-DZKBH2WC.js} +7 -7
- package/lib/{SchemaList-BbnkfjIe.js.map → SchemaList-DZKBH2WC.js.map} +1 -1
- package/lib/{SchemaView-BrUf6_nP.js → SchemaView-DBaqV2yU.js} +94 -91
- package/lib/SchemaView-DBaqV2yU.js.map +1 -0
- package/lib/{SignUp-AlaaduyY.js → SignUp-DNmOFbLD.js} +4 -4
- package/lib/{SignUp-AlaaduyY.js.map → SignUp-DNmOFbLD.js.map} +1 -1
- package/lib/{SyntaxHighlight-DveJcTOQ.js → SyntaxHighlight-C75W8uCn.js} +372 -363
- package/lib/SyntaxHighlight-C75W8uCn.js.map +1 -0
- package/lib/{Toc-B4ShtN-I.js → Toc-ICilS65g.js} +2 -2
- package/lib/{Toc-B4ShtN-I.js.map → Toc-ICilS65g.js.map} +1 -1
- package/lib/{ZudokuContext-CDJYKqMY.js → ZudokuContext-Ea7gxmGq.js} +2 -2
- package/lib/{ZudokuContext-CDJYKqMY.js.map → ZudokuContext-Ea7gxmGq.js.map} +1 -1
- package/lib/chunk-EPOLDU6W-C6C8jAwd.js +8558 -0
- package/lib/chunk-EPOLDU6W-C6C8jAwd.js.map +1 -0
- package/lib/{circular-CuSWVYOZ.js → circular-DleWPaPP.js} +767 -747
- package/lib/{circular-CuSWVYOZ.js.map → circular-DleWPaPP.js.map} +1 -1
- package/lib/{createServer-B1_RUTJP.js → createServer-nqMW9kro.js} +4 -4
- package/lib/{createServer-B1_RUTJP.js.map → createServer-nqMW9kro.js.map} +1 -1
- package/lib/{errors-iDfQAr_v.js → errors-D2FbERKl.js} +2 -2
- package/lib/{errors-iDfQAr_v.js.map → errors-D2FbERKl.js.map} +1 -1
- package/lib/{firebase-I54w2ZsH.js → firebase-Cn9CmB6h.js} +14 -14
- package/lib/{firebase-I54w2ZsH.js.map → firebase-Cn9CmB6h.js.map} +1 -1
- package/lib/{hook-BxWvqzB0.js → hook-B2nmfmYN.js} +3 -3
- package/lib/{hook-BxWvqzB0.js.map → hook-B2nmfmYN.js.map} +1 -1
- package/lib/{index-CjTisMeX.js → index-CC4L3gtM.js} +4 -4
- package/lib/{index-CjTisMeX.js.map → index-CC4L3gtM.js.map} +1 -1
- package/lib/{index-B4puReRo.js → index-CSDW7CHl.js} +12 -12
- package/lib/{index-B4puReRo.js.map → index-CSDW7CHl.js.map} +1 -1
- package/lib/{index-A5Cre871.js → index-D5NeW2z6.js} +7 -7
- package/lib/{index-A5Cre871.js.map → index-D5NeW2z6.js.map} +1 -1
- package/lib/{index-Dbrv6d94.js → index-DSKBOdpT.js} +2 -2
- package/lib/{index-Dbrv6d94.js.map → index-DSKBOdpT.js.map} +1 -1
- package/lib/{index.esm-BxIXRKtj.js → index.esm-B35e7P83.js} +2 -2
- package/lib/index.esm-B35e7P83.js.map +1 -0
- package/lib/{mutation-Cq0wKBqW.js → mutation-BOYnEDf6.js} +2 -2
- package/lib/{mutation-Cq0wKBqW.js.map → mutation-BOYnEDf6.js.map} +1 -1
- package/lib/ui/SyntaxHighlight.js +2 -2
- package/lib/zudoku.__internal.js +42 -42
- package/lib/zudoku.__internal.js.map +1 -1
- package/lib/zudoku.auth-auth0.js +16 -16
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +4 -4
- package/lib/zudoku.auth-clerk.js +52 -75
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-firebase.js +4 -4
- package/lib/zudoku.auth-openid.js +4 -4
- package/lib/zudoku.auth-supabase.js +31 -40
- package/lib/zudoku.auth-supabase.js.map +1 -1
- package/lib/zudoku.components.js +5 -5
- package/lib/zudoku.hooks.js +3 -3
- package/lib/zudoku.mermaid.js +3 -3
- package/lib/zudoku.plugin-api-catalog.js +4 -4
- package/lib/zudoku.plugin-api-keys.js +6 -6
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +3 -3
- package/lib/zudoku.router.js +1130 -1404
- package/lib/zudoku.router.js.map +1 -1
- package/package.json +10 -10
- package/src/lib/authentication/providers/auth0.tsx +15 -9
- package/src/lib/authentication/providers/clerk.tsx +0 -26
- package/src/lib/authentication/providers/supabase.tsx +6 -15
- package/src/lib/oas/graphql/circular.ts +36 -3
- package/src/lib/plugins/openapi/OperationList.tsx +6 -1
- package/src/lib/plugins/openapi/schema/utils.ts +15 -4
- package/lib/SchemaView-BrUf6_nP.js.map +0 -1
- package/lib/SyntaxHighlight-DveJcTOQ.js.map +0 -1
- package/lib/chunk-PVWAREVJ-ClM0m2aJ.js +0 -7965
- package/lib/chunk-PVWAREVJ-ClM0m2aJ.js.map +0 -1
- package/lib/index.esm-BxIXRKtj.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as at } from "./jsx-runtime-BzflLqGi.js";
|
|
2
2
|
import { createElement as ss, Fragment as as, memo as is } from "react";
|
|
3
|
-
import { a as ls } from "./ZudokuContext-
|
|
3
|
+
import { a as ls } from "./ZudokuContext-Ea7gxmGq.js";
|
|
4
4
|
import { c as Ir } from "./cn-5-Gd1Dss.js";
|
|
5
5
|
import { a as us, i as cs } from "./invariant-BJAl77rw.js";
|
|
6
6
|
import { CodeBlock as hs } from "./ui/CodeBlock.js";
|
|
@@ -30,7 +30,7 @@ function In(t, e) {
|
|
|
30
30
|
return (gs.jsx ? ds : ps).test(t);
|
|
31
31
|
}
|
|
32
32
|
const ms = /[ \t\n\f\r]/g;
|
|
33
|
-
function
|
|
33
|
+
function Ct(t) {
|
|
34
34
|
return typeof t == "object" ? t.type === "text" ? Nn(t.value) : !1 : Nn(t);
|
|
35
35
|
}
|
|
36
36
|
function Nn(t) {
|
|
@@ -60,7 +60,7 @@ function Lr(t, e) {
|
|
|
60
60
|
Object.assign(n, o.property), Object.assign(r, o.normal);
|
|
61
61
|
return new qe(n, r, e);
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function Ut(t) {
|
|
64
64
|
return t.toLowerCase();
|
|
65
65
|
}
|
|
66
66
|
let W = class {
|
|
@@ -89,24 +89,24 @@ W.prototype.property = "";
|
|
|
89
89
|
W.prototype.spaceSeparated = !1;
|
|
90
90
|
W.prototype.space = void 0;
|
|
91
91
|
let ys = 0;
|
|
92
|
-
const x = ye(),
|
|
92
|
+
const x = ye(), M = ye(), Pr = ye(), b = ye(), I = ye(), xe = ye(), q = ye();
|
|
93
93
|
function ye() {
|
|
94
94
|
return 2 ** ++ys;
|
|
95
95
|
}
|
|
96
|
-
const
|
|
96
|
+
const zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
97
97
|
__proto__: null,
|
|
98
98
|
boolean: x,
|
|
99
|
-
booleanish:
|
|
99
|
+
booleanish: M,
|
|
100
100
|
commaOrSpaceSeparated: q,
|
|
101
101
|
commaSeparated: xe,
|
|
102
102
|
number: b,
|
|
103
103
|
overloadedBoolean: Pr,
|
|
104
104
|
spaceSeparated: I
|
|
105
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
105
|
+
}, Symbol.toStringTag, { value: "Module" })), Et = (
|
|
106
106
|
/** @type {ReadonlyArray<keyof typeof types>} */
|
|
107
|
-
Object.keys(
|
|
107
|
+
Object.keys(zt)
|
|
108
108
|
);
|
|
109
|
-
let
|
|
109
|
+
let cn = class extends W {
|
|
110
110
|
/**
|
|
111
111
|
* @constructor
|
|
112
112
|
* @param {string} property
|
|
@@ -123,36 +123,36 @@ let hn = class extends W {
|
|
|
123
123
|
constructor(e, n, r, o) {
|
|
124
124
|
let s = -1;
|
|
125
125
|
if (super(e, n), Ln(this, "space", o), typeof r == "number")
|
|
126
|
-
for (; ++s <
|
|
127
|
-
const a =
|
|
128
|
-
Ln(this,
|
|
126
|
+
for (; ++s < Et.length; ) {
|
|
127
|
+
const a = Et[s];
|
|
128
|
+
Ln(this, Et[s], (r & zt[a]) === zt[a]);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
};
|
|
132
|
-
|
|
132
|
+
cn.prototype.defined = !0;
|
|
133
133
|
function Ln(t, e, n) {
|
|
134
134
|
n && (t[e] = n);
|
|
135
135
|
}
|
|
136
136
|
function Ie(t) {
|
|
137
137
|
const e = {}, n = {};
|
|
138
138
|
for (const [r, o] of Object.entries(t.properties)) {
|
|
139
|
-
const s = new
|
|
139
|
+
const s = new cn(
|
|
140
140
|
r,
|
|
141
141
|
t.transform(t.attributes || {}, r),
|
|
142
142
|
o,
|
|
143
143
|
t.space
|
|
144
144
|
);
|
|
145
|
-
t.mustUseProperty && t.mustUseProperty.includes(r) && (s.mustUseProperty = !0), e[r] = s, n[
|
|
145
|
+
t.mustUseProperty && t.mustUseProperty.includes(r) && (s.mustUseProperty = !0), e[r] = s, n[Ut(r)] = r, n[Ut(s.attribute)] = r;
|
|
146
146
|
}
|
|
147
147
|
return new qe(e, n, t.space);
|
|
148
148
|
}
|
|
149
149
|
const $r = Ie({
|
|
150
150
|
properties: {
|
|
151
151
|
ariaActiveDescendant: null,
|
|
152
|
-
ariaAtomic:
|
|
152
|
+
ariaAtomic: M,
|
|
153
153
|
ariaAutoComplete: null,
|
|
154
|
-
ariaBusy:
|
|
155
|
-
ariaChecked:
|
|
154
|
+
ariaBusy: M,
|
|
155
|
+
ariaChecked: M,
|
|
156
156
|
ariaColCount: b,
|
|
157
157
|
ariaColIndex: b,
|
|
158
158
|
ariaColSpan: b,
|
|
@@ -160,36 +160,36 @@ const $r = Ie({
|
|
|
160
160
|
ariaCurrent: null,
|
|
161
161
|
ariaDescribedBy: I,
|
|
162
162
|
ariaDetails: null,
|
|
163
|
-
ariaDisabled:
|
|
163
|
+
ariaDisabled: M,
|
|
164
164
|
ariaDropEffect: I,
|
|
165
165
|
ariaErrorMessage: null,
|
|
166
|
-
ariaExpanded:
|
|
166
|
+
ariaExpanded: M,
|
|
167
167
|
ariaFlowTo: I,
|
|
168
|
-
ariaGrabbed:
|
|
168
|
+
ariaGrabbed: M,
|
|
169
169
|
ariaHasPopup: null,
|
|
170
|
-
ariaHidden:
|
|
170
|
+
ariaHidden: M,
|
|
171
171
|
ariaInvalid: null,
|
|
172
172
|
ariaKeyShortcuts: null,
|
|
173
173
|
ariaLabel: null,
|
|
174
174
|
ariaLabelledBy: I,
|
|
175
175
|
ariaLevel: b,
|
|
176
176
|
ariaLive: null,
|
|
177
|
-
ariaModal:
|
|
178
|
-
ariaMultiLine:
|
|
179
|
-
ariaMultiSelectable:
|
|
177
|
+
ariaModal: M,
|
|
178
|
+
ariaMultiLine: M,
|
|
179
|
+
ariaMultiSelectable: M,
|
|
180
180
|
ariaOrientation: null,
|
|
181
181
|
ariaOwns: I,
|
|
182
182
|
ariaPlaceholder: null,
|
|
183
183
|
ariaPosInSet: b,
|
|
184
|
-
ariaPressed:
|
|
185
|
-
ariaReadOnly:
|
|
184
|
+
ariaPressed: M,
|
|
185
|
+
ariaReadOnly: M,
|
|
186
186
|
ariaRelevant: null,
|
|
187
|
-
ariaRequired:
|
|
187
|
+
ariaRequired: M,
|
|
188
188
|
ariaRoleDescription: I,
|
|
189
189
|
ariaRowCount: b,
|
|
190
190
|
ariaRowIndex: b,
|
|
191
191
|
ariaRowSpan: b,
|
|
192
|
-
ariaSelected:
|
|
192
|
+
ariaSelected: M,
|
|
193
193
|
ariaSetSize: b,
|
|
194
194
|
ariaSort: null,
|
|
195
195
|
ariaValueMax: b,
|
|
@@ -243,7 +243,7 @@ const bs = Ie({
|
|
|
243
243
|
cols: b,
|
|
244
244
|
colSpan: null,
|
|
245
245
|
content: null,
|
|
246
|
-
contentEditable:
|
|
246
|
+
contentEditable: M,
|
|
247
247
|
controls: x,
|
|
248
248
|
controlsList: I,
|
|
249
249
|
coords: b | xe,
|
|
@@ -257,7 +257,7 @@ const bs = Ie({
|
|
|
257
257
|
dirName: null,
|
|
258
258
|
disabled: x,
|
|
259
259
|
download: Pr,
|
|
260
|
-
draggable:
|
|
260
|
+
draggable: M,
|
|
261
261
|
encType: null,
|
|
262
262
|
enterKeyHint: null,
|
|
263
263
|
fetchPriority: null,
|
|
@@ -428,7 +428,7 @@ const bs = Ie({
|
|
|
428
428
|
sizes: null,
|
|
429
429
|
slot: null,
|
|
430
430
|
span: b,
|
|
431
|
-
spellCheck:
|
|
431
|
+
spellCheck: M,
|
|
432
432
|
src: null,
|
|
433
433
|
srcDoc: null,
|
|
434
434
|
srcLang: null,
|
|
@@ -443,7 +443,7 @@ const bs = Ie({
|
|
|
443
443
|
type: null,
|
|
444
444
|
typeMustMatch: x,
|
|
445
445
|
useMap: null,
|
|
446
|
-
value:
|
|
446
|
+
value: M,
|
|
447
447
|
width: b,
|
|
448
448
|
wrap: null,
|
|
449
449
|
writingSuggestions: null,
|
|
@@ -535,7 +535,7 @@ const bs = Ie({
|
|
|
535
535
|
// `<table>`
|
|
536
536
|
scheme: null,
|
|
537
537
|
// `<meta>`
|
|
538
|
-
scrolling:
|
|
538
|
+
scrolling: M,
|
|
539
539
|
// `<frame>`. Use overflow in the child context
|
|
540
540
|
standby: null,
|
|
541
541
|
// `<object>`
|
|
@@ -1173,7 +1173,7 @@ const bs = Ie({
|
|
|
1173
1173
|
xmlnsXLink: "xmlnsXlink"
|
|
1174
1174
|
}, _s = /[A-Z]/g, Pn = /-[a-z]/g, Ss = /^data[-\w.:]+$/i;
|
|
1175
1175
|
function ks(t, e) {
|
|
1176
|
-
const n =
|
|
1176
|
+
const n = Ut(e);
|
|
1177
1177
|
let r = e, o = W;
|
|
1178
1178
|
if (n in t.normal)
|
|
1179
1179
|
return t.property[t.normal[n]];
|
|
@@ -1188,7 +1188,7 @@ function ks(t, e) {
|
|
|
1188
1188
|
a.charAt(0) !== "-" && (a = "-" + a), e = "data" + a;
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
1191
|
-
o =
|
|
1191
|
+
o = cn;
|
|
1192
1192
|
}
|
|
1193
1193
|
return new o(r, e);
|
|
1194
1194
|
}
|
|
@@ -1198,7 +1198,7 @@ function vs(t) {
|
|
|
1198
1198
|
function xs(t) {
|
|
1199
1199
|
return t.charAt(1).toUpperCase();
|
|
1200
1200
|
}
|
|
1201
|
-
const Es = Lr([$r, bs, Or, Dr, Gr], "html"),
|
|
1201
|
+
const Es = Lr([$r, bs, Or, Dr, Gr], "html"), hn = Lr([$r, Cs, Or, Dr, Gr], "svg");
|
|
1202
1202
|
function fh(t) {
|
|
1203
1203
|
const e = String(t || "").trim();
|
|
1204
1204
|
return e ? e.split(/[ \t\n\r\f]+/g) : [];
|
|
@@ -1206,13 +1206,13 @@ function fh(t) {
|
|
|
1206
1206
|
function Fr(t) {
|
|
1207
1207
|
return t.join(" ").trim();
|
|
1208
1208
|
}
|
|
1209
|
-
var Ce = {},
|
|
1209
|
+
var Ce = {}, At, $n;
|
|
1210
1210
|
function As() {
|
|
1211
|
-
if ($n) return
|
|
1211
|
+
if ($n) return At;
|
|
1212
1212
|
$n = 1;
|
|
1213
1213
|
var t = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, e = /\n/g, n = /^\s*/, r = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, o = /^:\s*/, s = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, a = /^[;\s]*/, i = /^\s+|\s+$/g, l = `
|
|
1214
1214
|
`, u = "/", c = "*", h = "", f = "comment", d = "declaration";
|
|
1215
|
-
|
|
1215
|
+
At = function(g, w) {
|
|
1216
1216
|
if (typeof g != "string")
|
|
1217
1217
|
throw new TypeError("First argument must be a string");
|
|
1218
1218
|
if (!g) return [];
|
|
@@ -1221,13 +1221,13 @@ function As() {
|
|
|
1221
1221
|
function y(R) {
|
|
1222
1222
|
var k = R.match(e);
|
|
1223
1223
|
k && (m += k.length);
|
|
1224
|
-
var
|
|
1225
|
-
_ = ~
|
|
1224
|
+
var F = R.lastIndexOf(l);
|
|
1225
|
+
_ = ~F ? R.length - F : _ + R.length;
|
|
1226
1226
|
}
|
|
1227
1227
|
function S() {
|
|
1228
1228
|
var R = { line: m, column: _ };
|
|
1229
1229
|
return function(k) {
|
|
1230
|
-
return k.position = new E(R),
|
|
1230
|
+
return k.position = new E(R), T(), k;
|
|
1231
1231
|
};
|
|
1232
1232
|
}
|
|
1233
1233
|
function E(R) {
|
|
@@ -1243,11 +1243,11 @@ function As() {
|
|
|
1243
1243
|
function L(R) {
|
|
1244
1244
|
var k = R.exec(g);
|
|
1245
1245
|
if (k) {
|
|
1246
|
-
var
|
|
1247
|
-
return y(
|
|
1246
|
+
var F = k[0];
|
|
1247
|
+
return y(F), g = g.slice(F.length), k;
|
|
1248
1248
|
}
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1250
|
+
function T() {
|
|
1251
1251
|
L(n);
|
|
1252
1252
|
}
|
|
1253
1253
|
function Z(R) {
|
|
@@ -1263,10 +1263,10 @@ function As() {
|
|
|
1263
1263
|
++k;
|
|
1264
1264
|
if (k += 2, h === g.charAt(k - 1))
|
|
1265
1265
|
return $("End of comment missing");
|
|
1266
|
-
var
|
|
1267
|
-
return _ += 2, y(
|
|
1266
|
+
var F = g.slice(2, k - 2);
|
|
1267
|
+
return _ += 2, y(F), g = g.slice(k), _ += 2, R({
|
|
1268
1268
|
type: f,
|
|
1269
|
-
comment:
|
|
1269
|
+
comment: F
|
|
1270
1270
|
});
|
|
1271
1271
|
}
|
|
1272
1272
|
}
|
|
@@ -1274,10 +1274,10 @@ function As() {
|
|
|
1274
1274
|
var R = S(), k = L(r);
|
|
1275
1275
|
if (k) {
|
|
1276
1276
|
if (ee(), !L(o)) return $("property missing ':'");
|
|
1277
|
-
var
|
|
1277
|
+
var F = L(s), Te = R({
|
|
1278
1278
|
type: d,
|
|
1279
1279
|
property: p(k[0].replace(t, h)),
|
|
1280
|
-
value:
|
|
1280
|
+
value: F ? p(F[0].replace(t, h)) : h
|
|
1281
1281
|
});
|
|
1282
1282
|
return L(a), Te;
|
|
1283
1283
|
}
|
|
@@ -1289,12 +1289,12 @@ function As() {
|
|
|
1289
1289
|
k !== !1 && (R.push(k), Z(R));
|
|
1290
1290
|
return R;
|
|
1291
1291
|
}
|
|
1292
|
-
return
|
|
1292
|
+
return T(), te();
|
|
1293
1293
|
};
|
|
1294
1294
|
function p(g) {
|
|
1295
1295
|
return g ? g.replace(i, h) : h;
|
|
1296
1296
|
}
|
|
1297
|
-
return
|
|
1297
|
+
return At;
|
|
1298
1298
|
}
|
|
1299
1299
|
var Tn;
|
|
1300
1300
|
function Rs() {
|
|
@@ -1369,13 +1369,13 @@ function ph(t) {
|
|
|
1369
1369
|
return { start: e, end: n };
|
|
1370
1370
|
}
|
|
1371
1371
|
function Ts(t) {
|
|
1372
|
-
return !t || typeof t != "object" ? "" : "position" in t || "type" in t ? Dn(t.position) : "start" in t || "end" in t ? Dn(t) : "line" in t || "column" in t ?
|
|
1372
|
+
return !t || typeof t != "object" ? "" : "position" in t || "type" in t ? Dn(t.position) : "start" in t || "end" in t ? Dn(t) : "line" in t || "column" in t ? Ht(t) : "";
|
|
1373
1373
|
}
|
|
1374
|
-
function
|
|
1374
|
+
function Ht(t) {
|
|
1375
1375
|
return Gn(t && t.line) + ":" + Gn(t && t.column);
|
|
1376
1376
|
}
|
|
1377
1377
|
function Dn(t) {
|
|
1378
|
-
return
|
|
1378
|
+
return Ht(t && t.start) + "-" + Ht(t && t.end);
|
|
1379
1379
|
}
|
|
1380
1380
|
function Gn(t) {
|
|
1381
1381
|
return t && typeof t == "number" ? t : 1;
|
|
@@ -1467,7 +1467,7 @@ H.prototype.fatal = void 0;
|
|
|
1467
1467
|
H.prototype.place = void 0;
|
|
1468
1468
|
H.prototype.ruleId = void 0;
|
|
1469
1469
|
H.prototype.source = void 0;
|
|
1470
|
-
const
|
|
1470
|
+
const fn = {}.hasOwnProperty, Ms = /* @__PURE__ */ new Map(), Os = /[A-Z]/g, Ds = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]), Gs = /* @__PURE__ */ new Set(["td", "th"]), Ur = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
|
|
1471
1471
|
function Fs(t, e) {
|
|
1472
1472
|
if (!e || e.Fragment === void 0)
|
|
1473
1473
|
throw new TypeError("Expected `Fragment` in options");
|
|
@@ -1497,7 +1497,7 @@ function Fs(t, e) {
|
|
|
1497
1497
|
ignoreInvalidStyle: e.ignoreInvalidStyle || !1,
|
|
1498
1498
|
passKeys: e.passKeys !== !1,
|
|
1499
1499
|
passNode: e.passNode || !1,
|
|
1500
|
-
schema: e.space === "svg" ?
|
|
1500
|
+
schema: e.space === "svg" ? hn : Es,
|
|
1501
1501
|
stylePropertyNameCase: e.stylePropertyNameCase || "dom",
|
|
1502
1502
|
tableCellAlignToStyle: e.tableCellAlignToStyle !== !1
|
|
1503
1503
|
}, s = zr(o, t, void 0);
|
|
@@ -1525,12 +1525,12 @@ function zr(t, e, n) {
|
|
|
1525
1525
|
function Bs(t, e, n) {
|
|
1526
1526
|
const r = t.schema;
|
|
1527
1527
|
let o = r;
|
|
1528
|
-
e.tagName.toLowerCase() === "svg" && r.space === "html" && (o =
|
|
1528
|
+
e.tagName.toLowerCase() === "svg" && r.space === "html" && (o = hn, t.schema = o), t.ancestors.push(e);
|
|
1529
1529
|
const s = Wr(t, e.tagName, !1), a = Xs(t, e);
|
|
1530
|
-
let i =
|
|
1530
|
+
let i = dn(t, e);
|
|
1531
1531
|
return Ds.has(e.tagName) && (i = i.filter(function(l) {
|
|
1532
|
-
return typeof l == "string" ? !
|
|
1533
|
-
})), Hr(t, a, s, e),
|
|
1532
|
+
return typeof l == "string" ? !Ct(l) : !0;
|
|
1533
|
+
})), Hr(t, a, s, e), pn(a, i), t.ancestors.pop(), t.schema = r, t.create(e, s, a, n);
|
|
1534
1534
|
}
|
|
1535
1535
|
function js(t, e) {
|
|
1536
1536
|
if (e.data && e.data.estree && t.evaluater) {
|
|
@@ -1551,13 +1551,13 @@ function Us(t, e) {
|
|
|
1551
1551
|
function zs(t, e, n) {
|
|
1552
1552
|
const r = t.schema;
|
|
1553
1553
|
let o = r;
|
|
1554
|
-
e.name === "svg" && r.space === "html" && (o =
|
|
1555
|
-
const s = e.name === null ? t.Fragment : Wr(t, e.name, !0), a = Ks(t, e), i =
|
|
1556
|
-
return Hr(t, a, s, e),
|
|
1554
|
+
e.name === "svg" && r.space === "html" && (o = hn, t.schema = o), t.ancestors.push(e);
|
|
1555
|
+
const s = e.name === null ? t.Fragment : Wr(t, e.name, !0), a = Ks(t, e), i = dn(t, e);
|
|
1556
|
+
return Hr(t, a, s, e), pn(a, i), t.ancestors.pop(), t.schema = r, t.create(e, s, a, n);
|
|
1557
1557
|
}
|
|
1558
1558
|
function Hs(t, e, n) {
|
|
1559
1559
|
const r = {};
|
|
1560
|
-
return
|
|
1560
|
+
return pn(r, dn(t, e)), t.create(e, t.Fragment, r, n);
|
|
1561
1561
|
}
|
|
1562
1562
|
function Ws(t, e) {
|
|
1563
1563
|
return e.value;
|
|
@@ -1565,7 +1565,7 @@ function Ws(t, e) {
|
|
|
1565
1565
|
function Hr(t, e, n, r) {
|
|
1566
1566
|
typeof n != "string" && n !== t.Fragment && t.passNode && (e.node = r);
|
|
1567
1567
|
}
|
|
1568
|
-
function
|
|
1568
|
+
function pn(t, e) {
|
|
1569
1569
|
if (e.length > 0) {
|
|
1570
1570
|
const n = e.length > 1 ? e : e[0];
|
|
1571
1571
|
n && (t.children = n);
|
|
@@ -1600,7 +1600,7 @@ function Xs(t, e) {
|
|
|
1600
1600
|
const n = {};
|
|
1601
1601
|
let r, o;
|
|
1602
1602
|
for (o in e.properties)
|
|
1603
|
-
if (o !== "children" &&
|
|
1603
|
+
if (o !== "children" && fn.call(e.properties, o)) {
|
|
1604
1604
|
const s = Ys(t, o, e.properties[o]);
|
|
1605
1605
|
if (s) {
|
|
1606
1606
|
const [a, i] = s;
|
|
@@ -1648,7 +1648,7 @@ function Ks(t, e) {
|
|
|
1648
1648
|
}
|
|
1649
1649
|
return n;
|
|
1650
1650
|
}
|
|
1651
|
-
function
|
|
1651
|
+
function dn(t, e) {
|
|
1652
1652
|
const n = [];
|
|
1653
1653
|
let r = -1;
|
|
1654
1654
|
const o = t.passKeys ? /* @__PURE__ */ new Map() : Ms;
|
|
@@ -1723,7 +1723,7 @@ function Wr(t, e, n) {
|
|
|
1723
1723
|
/** @type {string | number} */
|
|
1724
1724
|
r.value
|
|
1725
1725
|
);
|
|
1726
|
-
return
|
|
1726
|
+
return fn.call(t.components, o) ? t.components[o] : o;
|
|
1727
1727
|
}
|
|
1728
1728
|
if (t.evaluater)
|
|
1729
1729
|
return t.evaluater.evaluateExpression(r);
|
|
@@ -1745,7 +1745,7 @@ function Zs(t) {
|
|
|
1745
1745
|
const e = {};
|
|
1746
1746
|
let n;
|
|
1747
1747
|
for (n in t)
|
|
1748
|
-
|
|
1748
|
+
fn.call(t, n) && (e[Qs(n)] = t[n]);
|
|
1749
1749
|
return e;
|
|
1750
1750
|
}
|
|
1751
1751
|
function Qs(t) {
|
|
@@ -1774,7 +1774,7 @@ const Vr = (
|
|
|
1774
1774
|
if (t == null)
|
|
1775
1775
|
return oa;
|
|
1776
1776
|
if (typeof t == "function")
|
|
1777
|
-
return
|
|
1777
|
+
return wt(t);
|
|
1778
1778
|
if (typeof t == "object")
|
|
1779
1779
|
return Array.isArray(t) ? ta(t) : na(t);
|
|
1780
1780
|
if (typeof t == "string")
|
|
@@ -1787,7 +1787,7 @@ function ta(t) {
|
|
|
1787
1787
|
let n = -1;
|
|
1788
1788
|
for (; ++n < t.length; )
|
|
1789
1789
|
e[n] = Vr(t[n]);
|
|
1790
|
-
return
|
|
1790
|
+
return wt(r);
|
|
1791
1791
|
function r(...o) {
|
|
1792
1792
|
let s = -1;
|
|
1793
1793
|
for (; ++s < e.length; )
|
|
@@ -1800,7 +1800,7 @@ function na(t) {
|
|
|
1800
1800
|
/** @type {Record<string, unknown>} */
|
|
1801
1801
|
t
|
|
1802
1802
|
);
|
|
1803
|
-
return
|
|
1803
|
+
return wt(n);
|
|
1804
1804
|
function n(r) {
|
|
1805
1805
|
const o = (
|
|
1806
1806
|
/** @type {Record<string, unknown>} */
|
|
@@ -1814,12 +1814,12 @@ function na(t) {
|
|
|
1814
1814
|
}
|
|
1815
1815
|
}
|
|
1816
1816
|
function ra(t) {
|
|
1817
|
-
return
|
|
1817
|
+
return wt(e);
|
|
1818
1818
|
function e(n) {
|
|
1819
1819
|
return n && n.type === t;
|
|
1820
1820
|
}
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1822
|
+
function wt(t) {
|
|
1823
1823
|
return e;
|
|
1824
1824
|
function e(n, r, o) {
|
|
1825
1825
|
return !!(sa(n) && t.call(
|
|
@@ -1938,27 +1938,27 @@ function jn(t, e) {
|
|
|
1938
1938
|
r++, o = n.indexOf(e, o + e.length);
|
|
1939
1939
|
return r;
|
|
1940
1940
|
}
|
|
1941
|
-
let
|
|
1941
|
+
let B = class extends Error {
|
|
1942
1942
|
constructor(e) {
|
|
1943
1943
|
super(e), this.name = "ShikiError";
|
|
1944
1944
|
}
|
|
1945
1945
|
};
|
|
1946
1946
|
function fa(t) {
|
|
1947
|
-
return
|
|
1947
|
+
return gn(t);
|
|
1948
1948
|
}
|
|
1949
|
-
function
|
|
1949
|
+
function gn(t) {
|
|
1950
1950
|
return Array.isArray(t) ? pa(t) : t instanceof RegExp ? t : typeof t == "object" ? da(t) : t;
|
|
1951
1951
|
}
|
|
1952
1952
|
function pa(t) {
|
|
1953
1953
|
let e = [];
|
|
1954
1954
|
for (let n = 0, r = t.length; n < r; n++)
|
|
1955
|
-
e[n] =
|
|
1955
|
+
e[n] = gn(t[n]);
|
|
1956
1956
|
return e;
|
|
1957
1957
|
}
|
|
1958
1958
|
function da(t) {
|
|
1959
1959
|
let e = {};
|
|
1960
1960
|
for (let n in t)
|
|
1961
|
-
e[n] =
|
|
1961
|
+
e[n] = gn(t[n]);
|
|
1962
1962
|
return e;
|
|
1963
1963
|
}
|
|
1964
1964
|
function Kr(t, ...e) {
|
|
@@ -1971,12 +1971,12 @@ function Yr(t) {
|
|
|
1971
1971
|
const e = ~t.lastIndexOf("/") || ~t.lastIndexOf("\\");
|
|
1972
1972
|
return e === 0 ? t : ~e === t.length - 1 ? Yr(t.substring(0, t.length - 1)) : t.substr(~e + 1);
|
|
1973
1973
|
}
|
|
1974
|
-
var
|
|
1974
|
+
var Rt = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g, Je = class {
|
|
1975
1975
|
static hasCaptures(t) {
|
|
1976
|
-
return t === null ? !1 : (
|
|
1976
|
+
return t === null ? !1 : (Rt.lastIndex = 0, Rt.test(t));
|
|
1977
1977
|
}
|
|
1978
1978
|
static replaceCaptures(t, e, n) {
|
|
1979
|
-
return t.replace(
|
|
1979
|
+
return t.replace(Rt, (r, o, s, a) => {
|
|
1980
1980
|
let i = n[parseInt(o || s, 10)];
|
|
1981
1981
|
if (i) {
|
|
1982
1982
|
let l = e.substring(i.start, i.end);
|
|
@@ -2064,7 +2064,7 @@ var eo = class {
|
|
|
2064
2064
|
r.background
|
|
2065
2065
|
) : null;
|
|
2066
2066
|
}
|
|
2067
|
-
},
|
|
2067
|
+
}, It = class rt {
|
|
2068
2068
|
constructor(e, n) {
|
|
2069
2069
|
this.parent = e, this.scopeName = n;
|
|
2070
2070
|
}
|
|
@@ -2200,7 +2200,7 @@ function Ca(t, e) {
|
|
|
2200
2200
|
let l = t.shift();
|
|
2201
2201
|
l.fontStyle !== -1 && (n = l.fontStyle), l.foreground !== null && (r = l.foreground), l.background !== null && (o = l.background);
|
|
2202
2202
|
}
|
|
2203
|
-
let s = new wa(e), a = new to(n, s.getId(r), s.getId(o)), i = new Sa(new
|
|
2203
|
+
let s = new wa(e), a = new to(n, s.getId(r), s.getId(o)), i = new Sa(new Wt(0, null, -1, 0, 0), []);
|
|
2204
2204
|
for (let l = 0, u = t.length; l < u; l++) {
|
|
2205
2205
|
let c = t[l];
|
|
2206
2206
|
i.insert(0, c.scope, c.parentScopes, c.fontStyle, s.getId(c.foreground), s.getId(c.background));
|
|
@@ -2234,7 +2234,7 @@ var wa = class {
|
|
|
2234
2234
|
getColorMap() {
|
|
2235
2235
|
return this._id2color.slice(0);
|
|
2236
2236
|
}
|
|
2237
|
-
}, _a = Object.freeze([]),
|
|
2237
|
+
}, _a = Object.freeze([]), Wt = class no {
|
|
2238
2238
|
scopeDepth;
|
|
2239
2239
|
parentScopes;
|
|
2240
2240
|
fontStyle;
|
|
@@ -2255,7 +2255,7 @@ var wa = class {
|
|
|
2255
2255
|
acceptOverwrite(e, n, r, o) {
|
|
2256
2256
|
this.scopeDepth > e ? console.log("how did this happen?") : this.scopeDepth = e, n !== -1 && (this.fontStyle = n), r !== 0 && (this.foreground = r), o !== 0 && (this.background = o);
|
|
2257
2257
|
}
|
|
2258
|
-
}, Sa = class
|
|
2258
|
+
}, Sa = class Vt {
|
|
2259
2259
|
constructor(e, n = [], r = {}) {
|
|
2260
2260
|
this._mainRule = e, this._children = r, this._rulesWithParentScopes = n;
|
|
2261
2261
|
}
|
|
@@ -2279,7 +2279,7 @@ var wa = class {
|
|
|
2279
2279
|
return this._children[o].match(s);
|
|
2280
2280
|
}
|
|
2281
2281
|
const n = this._rulesWithParentScopes.concat(this._mainRule);
|
|
2282
|
-
return n.sort(
|
|
2282
|
+
return n.sort(Vt._cmpBySpecificity), n;
|
|
2283
2283
|
}
|
|
2284
2284
|
insert(e, n, r, o, s, a) {
|
|
2285
2285
|
if (n === "") {
|
|
@@ -2289,7 +2289,7 @@ var wa = class {
|
|
|
2289
2289
|
let i = n.indexOf("."), l, u;
|
|
2290
2290
|
i === -1 ? (l = n, u = "") : (l = n.substring(0, i), u = n.substring(i + 1));
|
|
2291
2291
|
let c;
|
|
2292
|
-
this._children.hasOwnProperty(l) ? c = this._children[l] : (c = new
|
|
2292
|
+
this._children.hasOwnProperty(l) ? c = this._children[l] : (c = new Vt(this._mainRule.clone(), Wt.cloneArr(this._rulesWithParentScopes)), this._children[l] = c), c.insert(e + 1, u, r, o, s, a);
|
|
2293
2293
|
}
|
|
2294
2294
|
_doInsertHere(e, n, r, o, s) {
|
|
2295
2295
|
if (n === null) {
|
|
@@ -2303,7 +2303,7 @@ var wa = class {
|
|
|
2303
2303
|
return;
|
|
2304
2304
|
}
|
|
2305
2305
|
}
|
|
2306
|
-
r === -1 && (r = this._mainRule.fontStyle), o === 0 && (o = this._mainRule.foreground), s === 0 && (s = this._mainRule.background), this._rulesWithParentScopes.push(new
|
|
2306
|
+
r === -1 && (r = this._mainRule.fontStyle), o === 0 && (o = this._mainRule.foreground), s === 0 && (s = this._mainRule.background), this._rulesWithParentScopes.push(new Wt(e, n, r, o, s));
|
|
2307
2307
|
}
|
|
2308
2308
|
}, Re = class K {
|
|
2309
2309
|
static toBinaryStr(e) {
|
|
@@ -2484,7 +2484,7 @@ function Aa(t, e, n, r) {
|
|
|
2484
2484
|
return;
|
|
2485
2485
|
}
|
|
2486
2486
|
const s = n.lookup(e);
|
|
2487
|
-
t instanceof Ue ? ot({ baseGrammar: s, selfGrammar: o }, r) :
|
|
2487
|
+
t instanceof Ue ? ot({ baseGrammar: s, selfGrammar: o }, r) : qt(
|
|
2488
2488
|
t.ruleName,
|
|
2489
2489
|
{ baseGrammar: s, selfGrammar: o, repository: o.repository },
|
|
2490
2490
|
r
|
|
@@ -2494,7 +2494,7 @@ function Aa(t, e, n, r) {
|
|
|
2494
2494
|
for (const i of a)
|
|
2495
2495
|
r.add(new Ue(i));
|
|
2496
2496
|
}
|
|
2497
|
-
function
|
|
2497
|
+
function qt(t, e, n) {
|
|
2498
2498
|
if (e.repository && e.repository[t]) {
|
|
2499
2499
|
const r = e.repository[t];
|
|
2500
2500
|
ut([r], e, n);
|
|
@@ -2530,14 +2530,14 @@ function ut(t, e, n) {
|
|
|
2530
2530
|
ot(e, n);
|
|
2531
2531
|
break;
|
|
2532
2532
|
case 2:
|
|
2533
|
-
|
|
2533
|
+
qt(a.ruleName, { ...e, repository: o }, n);
|
|
2534
2534
|
break;
|
|
2535
2535
|
case 3:
|
|
2536
2536
|
case 4:
|
|
2537
2537
|
const i = a.scopeName === e.selfGrammar.scopeName ? e.selfGrammar : a.scopeName === e.baseGrammar.scopeName ? e.baseGrammar : void 0;
|
|
2538
2538
|
if (i) {
|
|
2539
2539
|
const l = { baseGrammar: e.baseGrammar, selfGrammar: i, repository: o };
|
|
2540
|
-
a.kind === 4 ?
|
|
2540
|
+
a.kind === 4 ? qt(a.ruleName, l, n) : ot(l, n);
|
|
2541
2541
|
} else
|
|
2542
2542
|
a.kind === 4 ? n.add(new va(a.scopeName, a.ruleName)) : n.add(new Ue(a.scopeName));
|
|
2543
2543
|
break;
|
|
@@ -2664,7 +2664,7 @@ var Xe = class {
|
|
|
2664
2664
|
_getCachedCompiledPatterns(t) {
|
|
2665
2665
|
return this._cachedCompiledPatterns || (this._cachedCompiledPatterns = new He(), this.collectPatterns(t, this._cachedCompiledPatterns)), this._cachedCompiledPatterns;
|
|
2666
2666
|
}
|
|
2667
|
-
},
|
|
2667
|
+
}, Xt = class extends Xe {
|
|
2668
2668
|
_begin;
|
|
2669
2669
|
beginCaptures;
|
|
2670
2670
|
_end;
|
|
@@ -2793,7 +2793,7 @@ var Xe = class {
|
|
|
2793
2793
|
e.while,
|
|
2794
2794
|
U._compileCaptures(e.whileCaptures || e.captures, n, r),
|
|
2795
2795
|
U._compilePatterns(e.patterns, n, r)
|
|
2796
|
-
) : new
|
|
2796
|
+
) : new Xt(
|
|
2797
2797
|
e.$vscodeTextmateLocation,
|
|
2798
2798
|
e.id,
|
|
2799
2799
|
e.name,
|
|
@@ -2862,7 +2862,7 @@ var Xe = class {
|
|
|
2862
2862
|
if (l !== -1) {
|
|
2863
2863
|
const u = n.getRule(l);
|
|
2864
2864
|
let c = !1;
|
|
2865
|
-
if ((u instanceof Wn || u instanceof
|
|
2865
|
+
if ((u instanceof Wn || u instanceof Xt || u instanceof ct) && u.hasMissingPatterns && u.patterns.length === 0 && (c = !0), c)
|
|
2866
2866
|
continue;
|
|
2867
2867
|
o.push(l);
|
|
2868
2868
|
}
|
|
@@ -2987,15 +2987,15 @@ var Xe = class {
|
|
|
2987
2987
|
captureIndices: r.captureIndices
|
|
2988
2988
|
} : null;
|
|
2989
2989
|
}
|
|
2990
|
-
},
|
|
2990
|
+
}, Nt = class {
|
|
2991
2991
|
constructor(t, e) {
|
|
2992
2992
|
this.languageId = t, this.tokenType = e;
|
|
2993
2993
|
}
|
|
2994
|
-
}, Da = class
|
|
2994
|
+
}, Da = class Kt {
|
|
2995
2995
|
_defaultAttributes;
|
|
2996
2996
|
_embeddedLanguagesMatcher;
|
|
2997
2997
|
constructor(e, n) {
|
|
2998
|
-
this._defaultAttributes = new
|
|
2998
|
+
this._defaultAttributes = new Nt(
|
|
2999
2999
|
e,
|
|
3000
3000
|
8
|
|
3001
3001
|
/* NotSet */
|
|
@@ -3005,12 +3005,12 @@ var Xe = class {
|
|
|
3005
3005
|
return this._defaultAttributes;
|
|
3006
3006
|
}
|
|
3007
3007
|
getBasicScopeAttributes(e) {
|
|
3008
|
-
return e === null ?
|
|
3008
|
+
return e === null ? Kt._NULL_SCOPE_METADATA : this._getBasicScopeAttributes.get(e);
|
|
3009
3009
|
}
|
|
3010
|
-
static _NULL_SCOPE_METADATA = new
|
|
3010
|
+
static _NULL_SCOPE_METADATA = new Nt(0, 0);
|
|
3011
3011
|
_getBasicScopeAttributes = new eo((e) => {
|
|
3012
3012
|
const n = this._scopeToLanguage(e), r = this._toStandardTokenType(e);
|
|
3013
|
-
return new
|
|
3013
|
+
return new Nt(n, r);
|
|
3014
3014
|
});
|
|
3015
3015
|
/**
|
|
3016
3016
|
* Given a produced TM scope, return the language that token describes or null if unknown.
|
|
@@ -3020,7 +3020,7 @@ var Xe = class {
|
|
|
3020
3020
|
return this._embeddedLanguagesMatcher.match(e) || 0;
|
|
3021
3021
|
}
|
|
3022
3022
|
_toStandardTokenType(e) {
|
|
3023
|
-
const n = e.match(
|
|
3023
|
+
const n = e.match(Kt.STANDARD_TOKEN_TYPE_REGEXP);
|
|
3024
3024
|
if (!n)
|
|
3025
3025
|
return 8;
|
|
3026
3026
|
switch (n[1]) {
|
|
@@ -3133,7 +3133,7 @@ function lo(t, e, n, r, o, s, a, i) {
|
|
|
3133
3133
|
null,
|
|
3134
3134
|
S,
|
|
3135
3135
|
S
|
|
3136
|
-
), m instanceof
|
|
3136
|
+
), m instanceof Xt) {
|
|
3137
3137
|
const E = m;
|
|
3138
3138
|
Ge(
|
|
3139
3139
|
t,
|
|
@@ -3487,7 +3487,7 @@ var qa = class {
|
|
|
3487
3487
|
this._grammar.repository
|
|
3488
3488
|
), this.getInjections());
|
|
3489
3489
|
let o;
|
|
3490
|
-
if (!e || e ===
|
|
3490
|
+
if (!e || e === Yt.NULL) {
|
|
3491
3491
|
o = !0;
|
|
3492
3492
|
const u = this._basicScopeAttributesProvider.getDefaultAttributes(), c = this.themeProvider.getDefaults(), h = Re.set(
|
|
3493
3493
|
0,
|
|
@@ -3509,7 +3509,7 @@ var qa = class {
|
|
|
3509
3509
|
) : d = Fe.createRoot(
|
|
3510
3510
|
"unknown",
|
|
3511
3511
|
h
|
|
3512
|
-
), e = new
|
|
3512
|
+
), e = new Yt(
|
|
3513
3513
|
null,
|
|
3514
3514
|
this._rootId,
|
|
3515
3515
|
-1,
|
|
@@ -3568,14 +3568,14 @@ var Fe = class ne {
|
|
|
3568
3568
|
static fromExtension(e, n) {
|
|
3569
3569
|
let r = e, o = e?.scopePath ?? null;
|
|
3570
3570
|
for (const s of n)
|
|
3571
|
-
o =
|
|
3571
|
+
o = It.push(o, s.scopeNames), r = new ne(r, o, s.encodedTokenAttributes);
|
|
3572
3572
|
return r;
|
|
3573
3573
|
}
|
|
3574
3574
|
static createRoot(e, n) {
|
|
3575
|
-
return new ne(null, new
|
|
3575
|
+
return new ne(null, new It(null, e), n);
|
|
3576
3576
|
}
|
|
3577
3577
|
static createRootAndLookUpScopeName(e, n, r) {
|
|
3578
|
-
const o = r.getMetadataForScope(e), s = new
|
|
3578
|
+
const o = r.getMetadataForScope(e), s = new It(null, e), a = r.themeProvider.themeMatch(s), i = ne.mergeAttributes(
|
|
3579
3579
|
n,
|
|
3580
3580
|
o,
|
|
3581
3581
|
a
|
|
@@ -3644,7 +3644,7 @@ var Fe = class ne {
|
|
|
3644
3644
|
}), r = r.parent;
|
|
3645
3645
|
return r === e ? n.reverse() : void 0;
|
|
3646
3646
|
}
|
|
3647
|
-
},
|
|
3647
|
+
}, Yt = class fe {
|
|
3648
3648
|
/**
|
|
3649
3649
|
* Invariant:
|
|
3650
3650
|
* ```
|
|
@@ -4067,7 +4067,7 @@ var Fe = class ne {
|
|
|
4067
4067
|
s
|
|
4068
4068
|
);
|
|
4069
4069
|
}
|
|
4070
|
-
},
|
|
4070
|
+
}, Jt = Yt.NULL;
|
|
4071
4071
|
class Ke {
|
|
4072
4072
|
/**
|
|
4073
4073
|
* @param {SchemaType['property']} property
|
|
@@ -4092,7 +4092,7 @@ function co(t, e) {
|
|
|
4092
4092
|
Object.assign(n, o.property), Object.assign(r, o.normal);
|
|
4093
4093
|
return new Ke(n, r, e);
|
|
4094
4094
|
}
|
|
4095
|
-
function
|
|
4095
|
+
function Zt(t) {
|
|
4096
4096
|
return t.toLowerCase();
|
|
4097
4097
|
}
|
|
4098
4098
|
class V {
|
|
@@ -4121,24 +4121,24 @@ V.prototype.property = "";
|
|
|
4121
4121
|
V.prototype.spaceSeparated = !1;
|
|
4122
4122
|
V.prototype.space = void 0;
|
|
4123
4123
|
let Za = 0;
|
|
4124
|
-
const A = be(),
|
|
4124
|
+
const A = be(), O = be(), Qt = be(), C = be(), N = be(), Ee = be(), X = be();
|
|
4125
4125
|
function be() {
|
|
4126
4126
|
return 2 ** ++Za;
|
|
4127
4127
|
}
|
|
4128
|
-
const
|
|
4128
|
+
const en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4129
4129
|
__proto__: null,
|
|
4130
4130
|
boolean: A,
|
|
4131
|
-
booleanish:
|
|
4131
|
+
booleanish: O,
|
|
4132
4132
|
commaOrSpaceSeparated: X,
|
|
4133
4133
|
commaSeparated: Ee,
|
|
4134
4134
|
number: C,
|
|
4135
|
-
overloadedBoolean:
|
|
4135
|
+
overloadedBoolean: Qt,
|
|
4136
4136
|
spaceSeparated: N
|
|
4137
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4137
|
+
}, Symbol.toStringTag, { value: "Module" })), Lt = (
|
|
4138
4138
|
/** @type {ReadonlyArray<keyof typeof types>} */
|
|
4139
|
-
Object.keys(
|
|
4139
|
+
Object.keys(en)
|
|
4140
4140
|
);
|
|
4141
|
-
class
|
|
4141
|
+
class mn extends V {
|
|
4142
4142
|
/**
|
|
4143
4143
|
* @constructor
|
|
4144
4144
|
* @param {string} property
|
|
@@ -4155,36 +4155,36 @@ class yn extends V {
|
|
|
4155
4155
|
constructor(e, n, r, o) {
|
|
4156
4156
|
let s = -1;
|
|
4157
4157
|
if (super(e, n), Yn(this, "space", o), typeof r == "number")
|
|
4158
|
-
for (; ++s <
|
|
4159
|
-
const a =
|
|
4160
|
-
Yn(this,
|
|
4158
|
+
for (; ++s < Lt.length; ) {
|
|
4159
|
+
const a = Lt[s];
|
|
4160
|
+
Yn(this, Lt[s], (r & en[a]) === en[a]);
|
|
4161
4161
|
}
|
|
4162
4162
|
}
|
|
4163
4163
|
}
|
|
4164
|
-
|
|
4164
|
+
mn.prototype.defined = !0;
|
|
4165
4165
|
function Yn(t, e, n) {
|
|
4166
4166
|
n && (t[e] = n);
|
|
4167
4167
|
}
|
|
4168
4168
|
function Ne(t) {
|
|
4169
4169
|
const e = {}, n = {};
|
|
4170
4170
|
for (const [r, o] of Object.entries(t.properties)) {
|
|
4171
|
-
const s = new
|
|
4171
|
+
const s = new mn(
|
|
4172
4172
|
r,
|
|
4173
4173
|
t.transform(t.attributes || {}, r),
|
|
4174
4174
|
o,
|
|
4175
4175
|
t.space
|
|
4176
4176
|
);
|
|
4177
|
-
t.mustUseProperty && t.mustUseProperty.includes(r) && (s.mustUseProperty = !0), e[r] = s, n[
|
|
4177
|
+
t.mustUseProperty && t.mustUseProperty.includes(r) && (s.mustUseProperty = !0), e[r] = s, n[Zt(r)] = r, n[Zt(s.attribute)] = r;
|
|
4178
4178
|
}
|
|
4179
4179
|
return new Ke(e, n, t.space);
|
|
4180
4180
|
}
|
|
4181
4181
|
const ho = Ne({
|
|
4182
4182
|
properties: {
|
|
4183
4183
|
ariaActiveDescendant: null,
|
|
4184
|
-
ariaAtomic:
|
|
4184
|
+
ariaAtomic: O,
|
|
4185
4185
|
ariaAutoComplete: null,
|
|
4186
|
-
ariaBusy:
|
|
4187
|
-
ariaChecked:
|
|
4186
|
+
ariaBusy: O,
|
|
4187
|
+
ariaChecked: O,
|
|
4188
4188
|
ariaColCount: C,
|
|
4189
4189
|
ariaColIndex: C,
|
|
4190
4190
|
ariaColSpan: C,
|
|
@@ -4192,36 +4192,36 @@ const ho = Ne({
|
|
|
4192
4192
|
ariaCurrent: null,
|
|
4193
4193
|
ariaDescribedBy: N,
|
|
4194
4194
|
ariaDetails: null,
|
|
4195
|
-
ariaDisabled:
|
|
4195
|
+
ariaDisabled: O,
|
|
4196
4196
|
ariaDropEffect: N,
|
|
4197
4197
|
ariaErrorMessage: null,
|
|
4198
|
-
ariaExpanded:
|
|
4198
|
+
ariaExpanded: O,
|
|
4199
4199
|
ariaFlowTo: N,
|
|
4200
|
-
ariaGrabbed:
|
|
4200
|
+
ariaGrabbed: O,
|
|
4201
4201
|
ariaHasPopup: null,
|
|
4202
|
-
ariaHidden:
|
|
4202
|
+
ariaHidden: O,
|
|
4203
4203
|
ariaInvalid: null,
|
|
4204
4204
|
ariaKeyShortcuts: null,
|
|
4205
4205
|
ariaLabel: null,
|
|
4206
4206
|
ariaLabelledBy: N,
|
|
4207
4207
|
ariaLevel: C,
|
|
4208
4208
|
ariaLive: null,
|
|
4209
|
-
ariaModal:
|
|
4210
|
-
ariaMultiLine:
|
|
4211
|
-
ariaMultiSelectable:
|
|
4209
|
+
ariaModal: O,
|
|
4210
|
+
ariaMultiLine: O,
|
|
4211
|
+
ariaMultiSelectable: O,
|
|
4212
4212
|
ariaOrientation: null,
|
|
4213
4213
|
ariaOwns: N,
|
|
4214
4214
|
ariaPlaceholder: null,
|
|
4215
4215
|
ariaPosInSet: C,
|
|
4216
|
-
ariaPressed:
|
|
4217
|
-
ariaReadOnly:
|
|
4216
|
+
ariaPressed: O,
|
|
4217
|
+
ariaReadOnly: O,
|
|
4218
4218
|
ariaRelevant: null,
|
|
4219
|
-
ariaRequired:
|
|
4219
|
+
ariaRequired: O,
|
|
4220
4220
|
ariaRoleDescription: N,
|
|
4221
4221
|
ariaRowCount: C,
|
|
4222
4222
|
ariaRowIndex: C,
|
|
4223
4223
|
ariaRowSpan: C,
|
|
4224
|
-
ariaSelected:
|
|
4224
|
+
ariaSelected: O,
|
|
4225
4225
|
ariaSetSize: C,
|
|
4226
4226
|
ariaSort: null,
|
|
4227
4227
|
ariaValueMax: C,
|
|
@@ -4275,7 +4275,7 @@ const Qa = Ne({
|
|
|
4275
4275
|
cols: C,
|
|
4276
4276
|
colSpan: null,
|
|
4277
4277
|
content: null,
|
|
4278
|
-
contentEditable:
|
|
4278
|
+
contentEditable: O,
|
|
4279
4279
|
controls: A,
|
|
4280
4280
|
controlsList: N,
|
|
4281
4281
|
coords: C | Ee,
|
|
@@ -4288,8 +4288,8 @@ const Qa = Ne({
|
|
|
4288
4288
|
dir: null,
|
|
4289
4289
|
dirName: null,
|
|
4290
4290
|
disabled: A,
|
|
4291
|
-
download:
|
|
4292
|
-
draggable:
|
|
4291
|
+
download: Qt,
|
|
4292
|
+
draggable: O,
|
|
4293
4293
|
encType: null,
|
|
4294
4294
|
enterKeyHint: null,
|
|
4295
4295
|
fetchPriority: null,
|
|
@@ -4301,7 +4301,7 @@ const Qa = Ne({
|
|
|
4301
4301
|
formTarget: null,
|
|
4302
4302
|
headers: N,
|
|
4303
4303
|
height: C,
|
|
4304
|
-
hidden:
|
|
4304
|
+
hidden: Qt,
|
|
4305
4305
|
high: C,
|
|
4306
4306
|
href: null,
|
|
4307
4307
|
hrefLang: null,
|
|
@@ -4460,7 +4460,7 @@ const Qa = Ne({
|
|
|
4460
4460
|
sizes: null,
|
|
4461
4461
|
slot: null,
|
|
4462
4462
|
span: C,
|
|
4463
|
-
spellCheck:
|
|
4463
|
+
spellCheck: O,
|
|
4464
4464
|
src: null,
|
|
4465
4465
|
srcDoc: null,
|
|
4466
4466
|
srcLang: null,
|
|
@@ -4475,7 +4475,7 @@ const Qa = Ne({
|
|
|
4475
4475
|
type: null,
|
|
4476
4476
|
typeMustMatch: A,
|
|
4477
4477
|
useMap: null,
|
|
4478
|
-
value:
|
|
4478
|
+
value: O,
|
|
4479
4479
|
width: C,
|
|
4480
4480
|
wrap: null,
|
|
4481
4481
|
writingSuggestions: null,
|
|
@@ -4567,7 +4567,7 @@ const Qa = Ne({
|
|
|
4567
4567
|
// `<table>`
|
|
4568
4568
|
scheme: null,
|
|
4569
4569
|
// `<meta>`
|
|
4570
|
-
scrolling:
|
|
4570
|
+
scrolling: O,
|
|
4571
4571
|
// `<frame>`. Use overflow in the child context
|
|
4572
4572
|
standby: null,
|
|
4573
4573
|
// `<object>`
|
|
@@ -5187,7 +5187,7 @@ const Qa = Ne({
|
|
|
5187
5187
|
}
|
|
5188
5188
|
}), ti = /[A-Z]/g, Jn = /-[a-z]/g, ni = /^data[-\w.:]+$/i;
|
|
5189
5189
|
function ri(t, e) {
|
|
5190
|
-
const n =
|
|
5190
|
+
const n = Zt(e);
|
|
5191
5191
|
let r = e, o = V;
|
|
5192
5192
|
if (n in t.normal)
|
|
5193
5193
|
return t.property[t.normal[n]];
|
|
@@ -5202,7 +5202,7 @@ function ri(t, e) {
|
|
|
5202
5202
|
a.charAt(0) !== "-" && (a = "-" + a), e = "data" + a;
|
|
5203
5203
|
}
|
|
5204
5204
|
}
|
|
5205
|
-
o =
|
|
5205
|
+
o = mn;
|
|
5206
5206
|
}
|
|
5207
5207
|
return new o(r, e);
|
|
5208
5208
|
}
|
|
@@ -5366,7 +5366,7 @@ const bi = [
|
|
|
5366
5366
|
"yacute",
|
|
5367
5367
|
"yen",
|
|
5368
5368
|
"yuml"
|
|
5369
|
-
],
|
|
5369
|
+
], Pt = {
|
|
5370
5370
|
nbsp: " ",
|
|
5371
5371
|
iexcl: "¡",
|
|
5372
5372
|
cent: "¢",
|
|
@@ -5628,15 +5628,15 @@ const bi = [
|
|
|
5628
5628
|
"not",
|
|
5629
5629
|
"para",
|
|
5630
5630
|
"times"
|
|
5631
|
-
], Co = {}.hasOwnProperty,
|
|
5631
|
+
], Co = {}.hasOwnProperty, tn = {};
|
|
5632
5632
|
let Ze;
|
|
5633
|
-
for (Ze in
|
|
5634
|
-
Co.call(
|
|
5633
|
+
for (Ze in Pt)
|
|
5634
|
+
Co.call(Pt, Ze) && (tn[Pt[Ze]] = Ze);
|
|
5635
5635
|
const wi = /[^\dA-Za-z]/;
|
|
5636
5636
|
function _i(t, e, n, r) {
|
|
5637
5637
|
const o = String.fromCharCode(t);
|
|
5638
|
-
if (Co.call(
|
|
5639
|
-
const s =
|
|
5638
|
+
if (Co.call(tn, o)) {
|
|
5639
|
+
const s = tn[o], a = "&" + s;
|
|
5640
5640
|
return n && bi.includes(s) && !Ci.includes(s) && (!r || e && e !== 61 && wi.test(String.fromCharCode(e))) ? a : a + ";";
|
|
5641
5641
|
}
|
|
5642
5642
|
return "";
|
|
@@ -5677,14 +5677,14 @@ function Ei(t, e, n, r) {
|
|
|
5677
5677
|
function Ai(t, e, n, r) {
|
|
5678
5678
|
return "<!" + (r.settings.upperDoctype ? "DOCTYPE" : "doctype") + (r.settings.tightDoctype ? "" : " ") + "html>";
|
|
5679
5679
|
}
|
|
5680
|
-
const
|
|
5680
|
+
const G = _o(1), wo = _o(-1), Ri = [];
|
|
5681
5681
|
function _o(t) {
|
|
5682
5682
|
return e;
|
|
5683
5683
|
function e(n, r, o) {
|
|
5684
5684
|
const s = n ? n.children : Ri;
|
|
5685
5685
|
let a = (r || 0) + t, i = s[a];
|
|
5686
5686
|
if (!o)
|
|
5687
|
-
for (; i &&
|
|
5687
|
+
for (; i && Ct(i); )
|
|
5688
5688
|
a += t, i = s[a];
|
|
5689
5689
|
return i;
|
|
5690
5690
|
}
|
|
@@ -5696,13 +5696,13 @@ function So(t) {
|
|
|
5696
5696
|
return Ii.call(t, n.tagName) && t[n.tagName](n, r, o);
|
|
5697
5697
|
}
|
|
5698
5698
|
}
|
|
5699
|
-
const
|
|
5699
|
+
const yn = So({
|
|
5700
5700
|
body: Li,
|
|
5701
|
-
caption:
|
|
5702
|
-
colgroup:
|
|
5701
|
+
caption: $t,
|
|
5702
|
+
colgroup: $t,
|
|
5703
5703
|
dd: Mi,
|
|
5704
5704
|
dt: Ti,
|
|
5705
|
-
head:
|
|
5705
|
+
head: $t,
|
|
5706
5706
|
html: Ni,
|
|
5707
5707
|
li: $i,
|
|
5708
5708
|
optgroup: Oi,
|
|
@@ -5717,64 +5717,64 @@ const bn = So({
|
|
|
5717
5717
|
thead: Gi,
|
|
5718
5718
|
tr: ji
|
|
5719
5719
|
});
|
|
5720
|
-
function
|
|
5721
|
-
const r =
|
|
5722
|
-
return !r || r.type !== "comment" && !(r.type === "text" &&
|
|
5720
|
+
function $t(t, e, n) {
|
|
5721
|
+
const r = G(n, e, !0);
|
|
5722
|
+
return !r || r.type !== "comment" && !(r.type === "text" && Ct(r.value.charAt(0)));
|
|
5723
5723
|
}
|
|
5724
5724
|
function Ni(t, e, n) {
|
|
5725
|
-
const r =
|
|
5725
|
+
const r = G(n, e);
|
|
5726
5726
|
return !r || r.type !== "comment";
|
|
5727
5727
|
}
|
|
5728
5728
|
function Li(t, e, n) {
|
|
5729
|
-
const r =
|
|
5729
|
+
const r = G(n, e);
|
|
5730
5730
|
return !r || r.type !== "comment";
|
|
5731
5731
|
}
|
|
5732
5732
|
function Pi(t, e, n) {
|
|
5733
|
-
const r =
|
|
5733
|
+
const r = G(n, e);
|
|
5734
5734
|
return r ? r.type === "element" && (r.tagName === "address" || r.tagName === "article" || r.tagName === "aside" || r.tagName === "blockquote" || r.tagName === "details" || r.tagName === "div" || r.tagName === "dl" || r.tagName === "fieldset" || r.tagName === "figcaption" || r.tagName === "figure" || r.tagName === "footer" || r.tagName === "form" || r.tagName === "h1" || r.tagName === "h2" || r.tagName === "h3" || r.tagName === "h4" || r.tagName === "h5" || r.tagName === "h6" || r.tagName === "header" || r.tagName === "hgroup" || r.tagName === "hr" || r.tagName === "main" || r.tagName === "menu" || r.tagName === "nav" || r.tagName === "ol" || r.tagName === "p" || r.tagName === "pre" || r.tagName === "section" || r.tagName === "table" || r.tagName === "ul") : !n || // Confusing parent.
|
|
5735
5735
|
!(n.type === "element" && (n.tagName === "a" || n.tagName === "audio" || n.tagName === "del" || n.tagName === "ins" || n.tagName === "map" || n.tagName === "noscript" || n.tagName === "video"));
|
|
5736
5736
|
}
|
|
5737
5737
|
function $i(t, e, n) {
|
|
5738
|
-
const r =
|
|
5738
|
+
const r = G(n, e);
|
|
5739
5739
|
return !r || r.type === "element" && r.tagName === "li";
|
|
5740
5740
|
}
|
|
5741
5741
|
function Ti(t, e, n) {
|
|
5742
|
-
const r =
|
|
5742
|
+
const r = G(n, e);
|
|
5743
5743
|
return !!(r && r.type === "element" && (r.tagName === "dt" || r.tagName === "dd"));
|
|
5744
5744
|
}
|
|
5745
5745
|
function Mi(t, e, n) {
|
|
5746
|
-
const r =
|
|
5746
|
+
const r = G(n, e);
|
|
5747
5747
|
return !r || r.type === "element" && (r.tagName === "dt" || r.tagName === "dd");
|
|
5748
5748
|
}
|
|
5749
5749
|
function Qn(t, e, n) {
|
|
5750
|
-
const r =
|
|
5750
|
+
const r = G(n, e);
|
|
5751
5751
|
return !r || r.type === "element" && (r.tagName === "rp" || r.tagName === "rt");
|
|
5752
5752
|
}
|
|
5753
5753
|
function Oi(t, e, n) {
|
|
5754
|
-
const r =
|
|
5754
|
+
const r = G(n, e);
|
|
5755
5755
|
return !r || r.type === "element" && r.tagName === "optgroup";
|
|
5756
5756
|
}
|
|
5757
5757
|
function Di(t, e, n) {
|
|
5758
|
-
const r =
|
|
5758
|
+
const r = G(n, e);
|
|
5759
5759
|
return !r || r.type === "element" && (r.tagName === "option" || r.tagName === "optgroup");
|
|
5760
5760
|
}
|
|
5761
5761
|
function Gi(t, e, n) {
|
|
5762
|
-
const r =
|
|
5762
|
+
const r = G(n, e);
|
|
5763
5763
|
return !!(r && r.type === "element" && (r.tagName === "tbody" || r.tagName === "tfoot"));
|
|
5764
5764
|
}
|
|
5765
5765
|
function Fi(t, e, n) {
|
|
5766
|
-
const r =
|
|
5766
|
+
const r = G(n, e);
|
|
5767
5767
|
return !r || r.type === "element" && (r.tagName === "tbody" || r.tagName === "tfoot");
|
|
5768
5768
|
}
|
|
5769
5769
|
function Bi(t, e, n) {
|
|
5770
|
-
return !
|
|
5770
|
+
return !G(n, e);
|
|
5771
5771
|
}
|
|
5772
5772
|
function ji(t, e, n) {
|
|
5773
|
-
const r =
|
|
5773
|
+
const r = G(n, e);
|
|
5774
5774
|
return !r || r.type === "element" && r.tagName === "tr";
|
|
5775
5775
|
}
|
|
5776
5776
|
function er(t, e, n) {
|
|
5777
|
-
const r =
|
|
5777
|
+
const r = G(n, e);
|
|
5778
5778
|
return !r || r.type === "element" && (r.tagName === "td" || r.tagName === "th");
|
|
5779
5779
|
}
|
|
5780
5780
|
const Ui = So({
|
|
@@ -5785,7 +5785,7 @@ const Ui = So({
|
|
|
5785
5785
|
tbody: qi
|
|
5786
5786
|
});
|
|
5787
5787
|
function zi(t) {
|
|
5788
|
-
const e =
|
|
5788
|
+
const e = G(t, -1);
|
|
5789
5789
|
return !e || e.type !== "comment";
|
|
5790
5790
|
}
|
|
5791
5791
|
function Hi(t) {
|
|
@@ -5799,16 +5799,16 @@ function Hi(t) {
|
|
|
5799
5799
|
return !n || n.type === "element";
|
|
5800
5800
|
}
|
|
5801
5801
|
function Wi(t) {
|
|
5802
|
-
const e =
|
|
5803
|
-
return !e || e.type !== "comment" && !(e.type === "text" &&
|
|
5802
|
+
const e = G(t, -1, !0);
|
|
5803
|
+
return !e || e.type !== "comment" && !(e.type === "text" && Ct(e.value.charAt(0))) && !(e.type === "element" && (e.tagName === "meta" || e.tagName === "link" || e.tagName === "script" || e.tagName === "style" || e.tagName === "template"));
|
|
5804
5804
|
}
|
|
5805
5805
|
function Vi(t, e, n) {
|
|
5806
|
-
const r = wo(n, e), o =
|
|
5807
|
-
return n && r && r.type === "element" && r.tagName === "colgroup" &&
|
|
5806
|
+
const r = wo(n, e), o = G(t, -1, !0);
|
|
5807
|
+
return n && r && r.type === "element" && r.tagName === "colgroup" && yn(r, n.children.indexOf(r), n) ? !1 : !!(o && o.type === "element" && o.tagName === "col");
|
|
5808
5808
|
}
|
|
5809
5809
|
function qi(t, e, n) {
|
|
5810
|
-
const r = wo(n, e), o =
|
|
5811
|
-
return n && r && r.type === "element" && (r.tagName === "thead" || r.tagName === "tbody") &&
|
|
5810
|
+
const r = wo(n, e), o = G(t, -1);
|
|
5811
|
+
return n && r && r.type === "element" && (r.tagName === "thead" || r.tagName === "tbody") && yn(r, n.children.indexOf(r), n) ? !1 : !!(o && o.type === "element" && o.tagName === "tr");
|
|
5812
5812
|
}
|
|
5813
5813
|
const Qe = {
|
|
5814
5814
|
// See: <https://html.spec.whatwg.org/#attribute-name-state>.
|
|
@@ -5849,7 +5849,7 @@ function Xi(t, e, n, r) {
|
|
|
5849
5849
|
const u = Ki(r, t.properties), c = r.all(
|
|
5850
5850
|
o.space === "html" && t.tagName === "template" ? t.content : t
|
|
5851
5851
|
);
|
|
5852
|
-
return r.schema = o, c && (a = !1), (u || !s || !Ui(t, e, n)) && (i.push("<", t.tagName, u ? " " + u : ""), a && (o.space === "svg" || r.settings.closeSelfClosing) && (l = u.charAt(u.length - 1), (!r.settings.tightSelfClosing || l === "/" || l && l !== '"' && l !== "'") && i.push(" "), i.push("/")), i.push(">")), i.push(c), !a && (!s || !
|
|
5852
|
+
return r.schema = o, c && (a = !1), (u || !s || !Ui(t, e, n)) && (i.push("<", t.tagName, u ? " " + u : ""), a && (o.space === "svg" || r.settings.closeSelfClosing) && (l = u.charAt(u.length - 1), (!r.settings.tightSelfClosing || l === "/" || l && l !== '"' && l !== "'") && i.push(" "), i.push("/")), i.push(">")), i.push(c), !a && (!s || !yn(t, e, n)) && i.push("</" + t.tagName + ">"), i.join("");
|
|
5853
5853
|
}
|
|
5854
5854
|
function Ki(t, e) {
|
|
5855
5855
|
const n = [];
|
|
@@ -5987,17 +5987,17 @@ function ul(t) {
|
|
|
5987
5987
|
async function vo(t) {
|
|
5988
5988
|
return Promise.resolve(typeof t == "function" ? t() : t).then((e) => e.default || e);
|
|
5989
5989
|
}
|
|
5990
|
-
function
|
|
5990
|
+
function bn(t) {
|
|
5991
5991
|
return !t || ["plaintext", "txt", "text", "plain"].includes(t);
|
|
5992
5992
|
}
|
|
5993
5993
|
function xo(t) {
|
|
5994
|
-
return t === "ansi" ||
|
|
5994
|
+
return t === "ansi" || bn(t);
|
|
5995
5995
|
}
|
|
5996
|
-
function
|
|
5996
|
+
function Cn(t) {
|
|
5997
5997
|
return t === "none";
|
|
5998
5998
|
}
|
|
5999
5999
|
function cl(t) {
|
|
6000
|
-
return
|
|
6000
|
+
return Cn(t);
|
|
6001
6001
|
}
|
|
6002
6002
|
function Eo(t, e) {
|
|
6003
6003
|
if (!e)
|
|
@@ -6008,7 +6008,7 @@ function Eo(t, e) {
|
|
|
6008
6008
|
r && !t.properties.class.includes(r) && t.properties.class.push(r);
|
|
6009
6009
|
return t;
|
|
6010
6010
|
}
|
|
6011
|
-
function
|
|
6011
|
+
function _t(t, e = !1) {
|
|
6012
6012
|
if (t.length === 0)
|
|
6013
6013
|
return [["", 0]];
|
|
6014
6014
|
const n = t.split(/(\r?\n)/g);
|
|
@@ -6021,7 +6021,7 @@ function St(t, e = !1) {
|
|
|
6021
6021
|
return o;
|
|
6022
6022
|
}
|
|
6023
6023
|
function hl(t) {
|
|
6024
|
-
const e =
|
|
6024
|
+
const e = _t(t, !0).map(([o]) => o);
|
|
6025
6025
|
function n(o) {
|
|
6026
6026
|
if (o === t.length)
|
|
6027
6027
|
return {
|
|
@@ -6048,7 +6048,7 @@ function hl(t) {
|
|
|
6048
6048
|
posToIndex: r
|
|
6049
6049
|
};
|
|
6050
6050
|
}
|
|
6051
|
-
const
|
|
6051
|
+
const wn = "light-dark()", fl = ["color", "background-color"];
|
|
6052
6052
|
function pl(t, e) {
|
|
6053
6053
|
let n = 0;
|
|
6054
6054
|
const r = [];
|
|
@@ -6084,10 +6084,10 @@ function gl(t, e, n, r, o = "css-vars") {
|
|
|
6084
6084
|
for (const f of i) {
|
|
6085
6085
|
const d = c[f] || "inherit";
|
|
6086
6086
|
if (h === 0 && r && fl.includes(f))
|
|
6087
|
-
if (r ===
|
|
6087
|
+
if (r === wn && a.length > 1) {
|
|
6088
6088
|
const p = e.findIndex((_) => _ === "light"), g = e.findIndex((_) => _ === "dark");
|
|
6089
6089
|
if (p === -1 || g === -1)
|
|
6090
|
-
throw new
|
|
6090
|
+
throw new B('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');
|
|
6091
6091
|
const w = a[p][f] || "inherit", m = a[g][f] || "inherit";
|
|
6092
6092
|
l[f] = `light-dark(${w}, ${m})`, o === "css-vars" && (l[u(h, f)] = d);
|
|
6093
6093
|
} else
|
|
@@ -6106,11 +6106,11 @@ function pt(t) {
|
|
|
6106
6106
|
}
|
|
6107
6107
|
return e;
|
|
6108
6108
|
}
|
|
6109
|
-
function
|
|
6109
|
+
function nn(t) {
|
|
6110
6110
|
return typeof t == "string" ? t : Object.entries(t).map(([e, n]) => `${e}:${n}`).join(";");
|
|
6111
6111
|
}
|
|
6112
6112
|
const Ao = /* @__PURE__ */ new WeakMap();
|
|
6113
|
-
function
|
|
6113
|
+
function St(t, e) {
|
|
6114
6114
|
Ao.set(t, e);
|
|
6115
6115
|
}
|
|
6116
6116
|
function We(t) {
|
|
@@ -6136,7 +6136,7 @@ class Le {
|
|
|
6136
6136
|
*/
|
|
6137
6137
|
static initial(e, n) {
|
|
6138
6138
|
return new Le(
|
|
6139
|
-
Object.fromEntries(ul(n).map((r) => [r,
|
|
6139
|
+
Object.fromEntries(ul(n).map((r) => [r, Jt])),
|
|
6140
6140
|
e
|
|
6141
6141
|
);
|
|
6142
6142
|
}
|
|
@@ -6181,7 +6181,7 @@ function ml(t) {
|
|
|
6181
6181
|
}
|
|
6182
6182
|
function yl(t, e) {
|
|
6183
6183
|
if (!(t instanceof Le))
|
|
6184
|
-
throw new
|
|
6184
|
+
throw new B("Invalid grammar state");
|
|
6185
6185
|
return t.getInternalStack(e);
|
|
6186
6186
|
}
|
|
6187
6187
|
function bl() {
|
|
@@ -6191,7 +6191,7 @@ function bl() {
|
|
|
6191
6191
|
let r = function(a) {
|
|
6192
6192
|
if (typeof a == "number") {
|
|
6193
6193
|
if (a < 0 || a > n.source.length)
|
|
6194
|
-
throw new
|
|
6194
|
+
throw new B(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);
|
|
6195
6195
|
return {
|
|
6196
6196
|
...o.indexToPos(a),
|
|
6197
6197
|
offset: a
|
|
@@ -6199,10 +6199,10 @@ function bl() {
|
|
|
6199
6199
|
} else {
|
|
6200
6200
|
const i = o.lines[a.line];
|
|
6201
6201
|
if (i === void 0)
|
|
6202
|
-
throw new
|
|
6202
|
+
throw new B(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${o.lines.length}`);
|
|
6203
6203
|
let l = a.character;
|
|
6204
6204
|
if (l < 0 && (l = i.length + l), l < 0 || l > i.length)
|
|
6205
|
-
throw new
|
|
6205
|
+
throw new B(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${i.length}`);
|
|
6206
6206
|
return {
|
|
6207
6207
|
...a,
|
|
6208
6208
|
character: l,
|
|
@@ -6236,7 +6236,7 @@ function bl() {
|
|
|
6236
6236
|
return;
|
|
6237
6237
|
const r = e(this), o = Array.from(n.children).filter((c) => c.type === "element" && c.tagName === "span");
|
|
6238
6238
|
if (o.length !== r.converter.lines.length)
|
|
6239
|
-
throw new
|
|
6239
|
+
throw new B(`Number of lines in code element (${o.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);
|
|
6240
6240
|
function s(c, h, f, d) {
|
|
6241
6241
|
const p = o[c];
|
|
6242
6242
|
let g = "", w = -1, m = -1;
|
|
@@ -6244,9 +6244,9 @@ function bl() {
|
|
|
6244
6244
|
for (let y = 0; y < p.children.length; y++)
|
|
6245
6245
|
g += Ro(p.children[y]), w === -1 && g.length === h && (w = y + 1), m === -1 && g.length === f && (m = y + 1);
|
|
6246
6246
|
if (w === -1)
|
|
6247
|
-
throw new
|
|
6247
|
+
throw new B(`Failed to find start index for decoration ${JSON.stringify(d.start)}`);
|
|
6248
6248
|
if (m === -1)
|
|
6249
|
-
throw new
|
|
6249
|
+
throw new B(`Failed to find end index for decoration ${JSON.stringify(d.end)}`);
|
|
6250
6250
|
const _ = p.children.slice(w, m);
|
|
6251
6251
|
if (!d.alwaysWrap && _.length === p.children.length)
|
|
6252
6252
|
i(p, d, "line");
|
|
@@ -6293,13 +6293,13 @@ function Cl(t) {
|
|
|
6293
6293
|
for (let e = 0; e < t.length; e++) {
|
|
6294
6294
|
const n = t[e];
|
|
6295
6295
|
if (n.start.offset > n.end.offset)
|
|
6296
|
-
throw new
|
|
6296
|
+
throw new B(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);
|
|
6297
6297
|
for (let r = e + 1; r < t.length; r++) {
|
|
6298
6298
|
const o = t[r], s = n.start.offset <= o.start.offset && o.start.offset < n.end.offset, a = n.start.offset < o.end.offset && o.end.offset <= n.end.offset, i = o.start.offset <= n.start.offset && n.start.offset < o.end.offset, l = o.start.offset < n.end.offset && n.end.offset <= o.end.offset;
|
|
6299
6299
|
if (s || a || i || l) {
|
|
6300
6300
|
if (s && a || i && l || i && n.start.offset === n.end.offset || a && o.start.offset === o.end.offset)
|
|
6301
6301
|
continue;
|
|
6302
|
-
throw new
|
|
6302
|
+
throw new B(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(o.start)} intersect.`);
|
|
6303
6303
|
}
|
|
6304
6304
|
}
|
|
6305
6305
|
}
|
|
@@ -6351,7 +6351,7 @@ var de = [
|
|
|
6351
6351
|
"brightMagenta",
|
|
6352
6352
|
"brightCyan",
|
|
6353
6353
|
"brightWhite"
|
|
6354
|
-
],
|
|
6354
|
+
], Tt = {
|
|
6355
6355
|
1: "bold",
|
|
6356
6356
|
2: "dim",
|
|
6357
6357
|
3: "italic",
|
|
@@ -6400,12 +6400,12 @@ function kl(t) {
|
|
|
6400
6400
|
if (r === 0)
|
|
6401
6401
|
e.push({ type: "resetAll" });
|
|
6402
6402
|
else if (r <= 9)
|
|
6403
|
-
|
|
6403
|
+
Tt[r] && e.push({
|
|
6404
6404
|
type: "setDecoration",
|
|
6405
|
-
value:
|
|
6405
|
+
value: Tt[r]
|
|
6406
6406
|
});
|
|
6407
6407
|
else if (r <= 29) {
|
|
6408
|
-
const o =
|
|
6408
|
+
const o = Tt[r - 20];
|
|
6409
6409
|
o && (e.push({
|
|
6410
6410
|
type: "resetDecoration",
|
|
6411
6411
|
value: o
|
|
@@ -6561,7 +6561,7 @@ const Al = {
|
|
|
6561
6561
|
brightWhite: "#FFFFFF"
|
|
6562
6562
|
};
|
|
6563
6563
|
function Rl(t, e, n) {
|
|
6564
|
-
const r = ft(t, n), o =
|
|
6564
|
+
const r = ft(t, n), o = _t(e), s = Object.fromEntries(
|
|
6565
6565
|
de.map((l) => {
|
|
6566
6566
|
const u = `terminal.ansi${l[0].toUpperCase()}${l.substring(1)}`, c = t.colors?.[u];
|
|
6567
6567
|
return [l, c || Al[l]];
|
|
@@ -6605,21 +6605,21 @@ function Il(t) {
|
|
|
6605
6605
|
const n = t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);
|
|
6606
6606
|
return n ? `var(${n[1]}-dim)` : t;
|
|
6607
6607
|
}
|
|
6608
|
-
function
|
|
6608
|
+
function _n(t, e, n = {}) {
|
|
6609
6609
|
const {
|
|
6610
6610
|
theme: r = t.getLoadedThemes()[0]
|
|
6611
6611
|
} = n, o = t.resolveLangAlias(n.lang || "text");
|
|
6612
|
-
if (
|
|
6613
|
-
return
|
|
6612
|
+
if (bn(o) || Cn(r))
|
|
6613
|
+
return _t(e).map((l) => [{ content: l[0], offset: l[1] }]);
|
|
6614
6614
|
const { theme: s, colorMap: a } = t.setTheme(r);
|
|
6615
6615
|
if (o === "ansi")
|
|
6616
6616
|
return Rl(s, e, n);
|
|
6617
6617
|
const i = t.getLanguage(n.lang || "text");
|
|
6618
6618
|
if (n.grammarState) {
|
|
6619
6619
|
if (n.grammarState.lang !== i.name)
|
|
6620
|
-
throw new
|
|
6620
|
+
throw new B(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${i.name}"`);
|
|
6621
6621
|
if (!n.grammarState.themes.includes(s.name))
|
|
6622
|
-
throw new
|
|
6622
|
+
throw new B(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`);
|
|
6623
6623
|
}
|
|
6624
6624
|
return Ll(e, i, s, a, n);
|
|
6625
6625
|
}
|
|
@@ -6630,31 +6630,31 @@ function Nl(...t) {
|
|
|
6630
6630
|
lang: o = "text",
|
|
6631
6631
|
theme: s = e.getLoadedThemes()[0]
|
|
6632
6632
|
} = r;
|
|
6633
|
-
if (
|
|
6634
|
-
throw new
|
|
6633
|
+
if (bn(o) || Cn(s))
|
|
6634
|
+
throw new B("Plain language does not have grammar state");
|
|
6635
6635
|
if (o === "ansi")
|
|
6636
|
-
throw new
|
|
6636
|
+
throw new B("ANSI language does not have grammar state");
|
|
6637
6637
|
const { theme: a, colorMap: i } = e.setTheme(s), l = e.getLanguage(o);
|
|
6638
6638
|
return new Le(
|
|
6639
|
-
|
|
6639
|
+
Sn(n, l, a, i, r).stateStack,
|
|
6640
6640
|
l.name,
|
|
6641
6641
|
a.name
|
|
6642
6642
|
);
|
|
6643
6643
|
}
|
|
6644
6644
|
function Ll(t, e, n, r, o) {
|
|
6645
|
-
const s =
|
|
6646
|
-
|
|
6645
|
+
const s = Sn(t, e, n, r, o), a = new Le(
|
|
6646
|
+
s.stateStack,
|
|
6647
6647
|
e.name,
|
|
6648
6648
|
n.name
|
|
6649
6649
|
);
|
|
6650
|
-
return
|
|
6650
|
+
return St(s.tokens, a), s.tokens;
|
|
6651
6651
|
}
|
|
6652
|
-
function
|
|
6652
|
+
function Sn(t, e, n, r, o) {
|
|
6653
6653
|
const s = ft(n, o), {
|
|
6654
6654
|
tokenizeMaxLineLength: a = 0,
|
|
6655
6655
|
tokenizeTimeLimit: i = 500
|
|
6656
|
-
} = o, l =
|
|
6657
|
-
let u = o.grammarState ? yl(o.grammarState, n.name) ??
|
|
6656
|
+
} = o, l = _t(t);
|
|
6657
|
+
let u = o.grammarState ? yl(o.grammarState, n.name) ?? Jt : o.grammarContextCode != null ? Sn(
|
|
6658
6658
|
o.grammarContextCode,
|
|
6659
6659
|
e,
|
|
6660
6660
|
n,
|
|
@@ -6664,7 +6664,7 @@ function gt(t, e, n, r, o) {
|
|
|
6664
6664
|
grammarState: void 0,
|
|
6665
6665
|
grammarContextCode: void 0
|
|
6666
6666
|
}
|
|
6667
|
-
).stateStack :
|
|
6667
|
+
).stateStack : Jt, c = [];
|
|
6668
6668
|
const h = [];
|
|
6669
6669
|
for (let f = 0, d = l.length; f < d; f++) {
|
|
6670
6670
|
const [p, g] = l[f];
|
|
@@ -6688,10 +6688,10 @@ function gt(t, e, n, r, o) {
|
|
|
6688
6688
|
const $ = y.tokens[2 * E], L = E + 1 < S ? y.tokens[2 * E + 2] : p.length;
|
|
6689
6689
|
if ($ === L)
|
|
6690
6690
|
continue;
|
|
6691
|
-
const
|
|
6692
|
-
r[Re.getForeground(
|
|
6691
|
+
const T = y.tokens[2 * E + 1], Z = ue(
|
|
6692
|
+
r[Re.getForeground(T)],
|
|
6693
6693
|
s
|
|
6694
|
-
), ee = Re.getFontStyle(
|
|
6694
|
+
), ee = Re.getFontStyle(T), ce = {
|
|
6695
6695
|
content: p.substring($, L),
|
|
6696
6696
|
offset: g + $,
|
|
6697
6697
|
color: Z,
|
|
@@ -6701,31 +6701,31 @@ function gt(t, e, n, r, o) {
|
|
|
6701
6701
|
const te = [];
|
|
6702
6702
|
if (o.includeExplanation !== "scopeName")
|
|
6703
6703
|
for (const k of n.settings) {
|
|
6704
|
-
let
|
|
6704
|
+
let F;
|
|
6705
6705
|
switch (typeof k.scope) {
|
|
6706
6706
|
case "string":
|
|
6707
|
-
|
|
6707
|
+
F = k.scope.split(/,/).map((Te) => Te.trim());
|
|
6708
6708
|
break;
|
|
6709
6709
|
case "object":
|
|
6710
|
-
|
|
6710
|
+
F = k.scope;
|
|
6711
6711
|
break;
|
|
6712
6712
|
default:
|
|
6713
6713
|
continue;
|
|
6714
6714
|
}
|
|
6715
6715
|
te.push({
|
|
6716
6716
|
settings: k,
|
|
6717
|
-
selectors:
|
|
6717
|
+
selectors: F.map((Te) => Te.split(/ /))
|
|
6718
6718
|
});
|
|
6719
6719
|
}
|
|
6720
6720
|
ce.explanation = [];
|
|
6721
6721
|
let R = 0;
|
|
6722
6722
|
for (; $ + R < L; ) {
|
|
6723
|
-
const k = m[_],
|
|
6723
|
+
const k = m[_], F = p.substring(
|
|
6724
6724
|
k.startIndex,
|
|
6725
6725
|
k.endIndex
|
|
6726
6726
|
);
|
|
6727
|
-
R +=
|
|
6728
|
-
content:
|
|
6727
|
+
R += F.length, ce.explanation.push({
|
|
6728
|
+
content: F,
|
|
6729
6729
|
scopes: o.includeExplanation === "scopeName" ? Pl(
|
|
6730
6730
|
k.scopes
|
|
6731
6731
|
) : $l(
|
|
@@ -6781,7 +6781,7 @@ function Ml(t, e, n) {
|
|
|
6781
6781
|
}
|
|
6782
6782
|
function Io(t, e, n) {
|
|
6783
6783
|
const r = Object.entries(n.themes).filter((l) => l[1]).map((l) => ({ color: l[0], theme: l[1] })), o = r.map((l) => {
|
|
6784
|
-
const u =
|
|
6784
|
+
const u = _n(t, e, {
|
|
6785
6785
|
...n,
|
|
6786
6786
|
theme: l.theme
|
|
6787
6787
|
}), c = We(u), h = typeof l.theme == "string" ? l.theme : l.theme.name;
|
|
@@ -6813,7 +6813,7 @@ function Io(t, e, n) {
|
|
|
6813
6813
|
Object.fromEntries(o.map((l) => [l.theme, l.state?.getInternalStack(l.theme)])),
|
|
6814
6814
|
o[0].state.lang
|
|
6815
6815
|
) : void 0;
|
|
6816
|
-
return i &&
|
|
6816
|
+
return i && St(a, i), a;
|
|
6817
6817
|
}
|
|
6818
6818
|
function Ol(...t) {
|
|
6819
6819
|
const e = t.map(() => []), n = t.length;
|
|
@@ -6838,7 +6838,7 @@ function Ol(...t) {
|
|
|
6838
6838
|
}
|
|
6839
6839
|
return e;
|
|
6840
6840
|
}
|
|
6841
|
-
function
|
|
6841
|
+
function gt(t, e, n) {
|
|
6842
6842
|
let r, o, s, a, i, l;
|
|
6843
6843
|
if ("themes" in n) {
|
|
6844
6844
|
const {
|
|
@@ -6847,21 +6847,21 @@ function mt(t, e, n) {
|
|
|
6847
6847
|
colorsRendering: h = "css-vars"
|
|
6848
6848
|
} = n, f = Object.entries(n.themes).filter((m) => m[1]).map((m) => ({ color: m[0], theme: m[1] })).sort((m, _) => m.color === u ? -1 : _.color === u ? 1 : 0);
|
|
6849
6849
|
if (f.length === 0)
|
|
6850
|
-
throw new
|
|
6850
|
+
throw new B("`themes` option must not be empty");
|
|
6851
6851
|
const d = Io(
|
|
6852
6852
|
t,
|
|
6853
6853
|
e,
|
|
6854
6854
|
n
|
|
6855
6855
|
);
|
|
6856
|
-
if (l = We(d), u &&
|
|
6857
|
-
throw new
|
|
6856
|
+
if (l = We(d), u && wn !== u && !f.find((m) => m.color === u))
|
|
6857
|
+
throw new B(`\`themes\` option must contain the defaultColor key \`${u}\``);
|
|
6858
6858
|
const p = f.map((m) => t.getTheme(m.theme)), g = f.map((m) => m.color);
|
|
6859
|
-
s = d.map((m) => m.map((_) => gl(_, g, c, u, h))), l &&
|
|
6859
|
+
s = d.map((m) => m.map((_) => gl(_, g, c, u, h))), l && St(s, l);
|
|
6860
6860
|
const w = f.map((m) => ft(m.theme, n));
|
|
6861
6861
|
o = rr(f, p, w, c, u, "fg", h), r = rr(f, p, w, c, u, "bg", h), a = `shiki-themes ${p.map((m) => m.name).join(" ")}`, i = u ? void 0 : [o, r].join(";");
|
|
6862
6862
|
} else if ("theme" in n) {
|
|
6863
6863
|
const u = ft(n.theme, n);
|
|
6864
|
-
s =
|
|
6864
|
+
s = _n(
|
|
6865
6865
|
t,
|
|
6866
6866
|
e,
|
|
6867
6867
|
n
|
|
@@ -6869,7 +6869,7 @@ function mt(t, e, n) {
|
|
|
6869
6869
|
const c = t.getTheme(n.theme);
|
|
6870
6870
|
r = ue(c.bg, u), o = ue(c.fg, u), a = c.name, l = We(s);
|
|
6871
6871
|
} else
|
|
6872
|
-
throw new
|
|
6872
|
+
throw new B("Invalid options, either `theme` or `themes` must be provided");
|
|
6873
6873
|
return {
|
|
6874
6874
|
tokens: s,
|
|
6875
6875
|
fg: o,
|
|
@@ -6883,10 +6883,10 @@ function rr(t, e, n, r, o, s, a) {
|
|
|
6883
6883
|
return t.map((i, l) => {
|
|
6884
6884
|
const u = ue(e[l][s], n[l]) || "inherit", c = `${r + i.color}${s === "bg" ? "-bg" : ""}:${u}`;
|
|
6885
6885
|
if (l === 0 && o) {
|
|
6886
|
-
if (o ===
|
|
6886
|
+
if (o === wn && t.length > 1) {
|
|
6887
6887
|
const h = t.findIndex((g) => g.color === "light"), f = t.findIndex((g) => g.color === "dark");
|
|
6888
6888
|
if (h === -1 || f === -1)
|
|
6889
|
-
throw new
|
|
6889
|
+
throw new B('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');
|
|
6890
6890
|
const d = ue(e[h][s], n[h]) || "inherit", p = ue(e[f][s], n[f]) || "inherit";
|
|
6891
6891
|
return `light-dark(${d}, ${p});${c}`;
|
|
6892
6892
|
}
|
|
@@ -6895,11 +6895,11 @@ function rr(t, e, n, r, o, s, a) {
|
|
|
6895
6895
|
return a === "css-vars" ? c : null;
|
|
6896
6896
|
}).filter((i) => !!i).join(";");
|
|
6897
6897
|
}
|
|
6898
|
-
function
|
|
6898
|
+
function mt(t, e, n, r = {
|
|
6899
6899
|
meta: {},
|
|
6900
6900
|
options: n,
|
|
6901
|
-
codeToHast: (o, s) =>
|
|
6902
|
-
codeToTokens: (o, s) =>
|
|
6901
|
+
codeToHast: (o, s) => mt(t, o, s),
|
|
6902
|
+
codeToTokens: (o, s) => gt(t, o, s)
|
|
6903
6903
|
}) {
|
|
6904
6904
|
let o = e;
|
|
6905
6905
|
for (const p of dt(n))
|
|
@@ -6911,7 +6911,7 @@ function yt(t, e, n, r = {
|
|
|
6911
6911
|
themeName: l,
|
|
6912
6912
|
rootStyle: u,
|
|
6913
6913
|
grammarState: c
|
|
6914
|
-
} =
|
|
6914
|
+
} = gt(t, o, n);
|
|
6915
6915
|
const {
|
|
6916
6916
|
mergeWhitespaces: h = !0,
|
|
6917
6917
|
mergeSameStyleTokens: f = !1
|
|
@@ -7006,7 +7006,7 @@ function Dl(t, e, n, r = We(t)) {
|
|
|
7006
7006
|
},
|
|
7007
7007
|
children: [{ type: "text", value: y.content }]
|
|
7008
7008
|
};
|
|
7009
|
-
const E =
|
|
7009
|
+
const E = nn(y.htmlStyle || pt(y));
|
|
7010
7010
|
E && (S.properties.style = E);
|
|
7011
7011
|
for (const $ of o)
|
|
7012
7012
|
S = $?.span?.call(d, S, w + 1, _, m, y) || S;
|
|
@@ -7058,7 +7058,7 @@ function Dl(t, e, n, r = We(t)) {
|
|
|
7058
7058
|
let p = a;
|
|
7059
7059
|
for (const g of o)
|
|
7060
7060
|
p = g?.root?.call(d, p) || p;
|
|
7061
|
-
return r &&
|
|
7061
|
+
return r && St(p, r), p;
|
|
7062
7062
|
}
|
|
7063
7063
|
function Gl(t) {
|
|
7064
7064
|
return t.map((e) => {
|
|
@@ -7112,7 +7112,7 @@ function Bl(t) {
|
|
|
7112
7112
|
n.push({ ...r });
|
|
7113
7113
|
continue;
|
|
7114
7114
|
}
|
|
7115
|
-
const o = n[n.length - 1], s =
|
|
7115
|
+
const o = n[n.length - 1], s = nn(o.htmlStyle || pt(o)), a = nn(r.htmlStyle || pt(r)), i = o.fontStyle && (o.fontStyle & z.Underline || o.fontStyle & z.Strikethrough), l = r.fontStyle && (r.fontStyle & z.Underline || r.fontStyle & z.Strikethrough);
|
|
7116
7116
|
!i && !l && s === a ? o.content += r.content : n.push({ ...r });
|
|
7117
7117
|
}
|
|
7118
7118
|
return n;
|
|
@@ -7123,10 +7123,10 @@ function Ul(t, e, n) {
|
|
|
7123
7123
|
const r = {
|
|
7124
7124
|
meta: {},
|
|
7125
7125
|
options: n,
|
|
7126
|
-
codeToHast: (s, a) =>
|
|
7127
|
-
codeToTokens: (s, a) =>
|
|
7126
|
+
codeToHast: (s, a) => mt(t, s, a),
|
|
7127
|
+
codeToTokens: (s, a) => gt(t, s, a)
|
|
7128
7128
|
};
|
|
7129
|
-
let o = jl(
|
|
7129
|
+
let o = jl(mt(t, e, n, r));
|
|
7130
7130
|
for (const s of dt(n))
|
|
7131
7131
|
o = s.postprocess?.call(r, o, n) || o;
|
|
7132
7132
|
return o;
|
|
@@ -7443,10 +7443,10 @@ async function Kl(t) {
|
|
|
7443
7443
|
const e = await Xl(t);
|
|
7444
7444
|
return {
|
|
7445
7445
|
getLastGrammarState: (...n) => Nl(e, ...n),
|
|
7446
|
-
codeToTokensBase: (n, r) =>
|
|
7446
|
+
codeToTokensBase: (n, r) => _n(e, n, r),
|
|
7447
7447
|
codeToTokensWithThemes: (n, r) => Io(e, n, r),
|
|
7448
|
-
codeToTokens: (n, r) =>
|
|
7449
|
-
codeToHast: (n, r) =>
|
|
7448
|
+
codeToTokens: (n, r) => gt(e, n, r),
|
|
7449
|
+
codeToHast: (n, r) => mt(e, n, r),
|
|
7450
7450
|
codeToHtml: (n, r) => Ul(e, n, r),
|
|
7451
7451
|
getBundledLanguages: () => ({}),
|
|
7452
7452
|
getBundledThemes: () => ({}),
|
|
@@ -7555,8 +7555,8 @@ function eu(t, e) {
|
|
|
7555
7555
|
let S, E = !1;
|
|
7556
7556
|
if (y.lang ? t.getLoadedLanguages().includes(y.lang) || xo(y.lang) ? S = y.lang : c ? (E = !0, S = y.lang) : a && (S = a) : S = s, !S)
|
|
7557
7557
|
return;
|
|
7558
|
-
const $ = y.meta ? r?.(y.meta, g, d) : void 0, L = (
|
|
7559
|
-
const Z = f(
|
|
7558
|
+
const $ = y.meta ? r?.(y.meta, g, d) : void 0, L = (T) => {
|
|
7559
|
+
const Z = f(T, y.code, y.meta, $ ?? {});
|
|
7560
7560
|
if (Z) {
|
|
7561
7561
|
if (y.type === "inline") {
|
|
7562
7562
|
const ee = Z.children[0];
|
|
@@ -7567,13 +7567,22 @@ function eu(t, e) {
|
|
|
7567
7567
|
};
|
|
7568
7568
|
if (E)
|
|
7569
7569
|
try {
|
|
7570
|
-
p.push(
|
|
7571
|
-
|
|
7570
|
+
p.push(
|
|
7571
|
+
t.loadLanguage(S).then(() => L(S)).catch((T) => {
|
|
7572
|
+
if (a)
|
|
7573
|
+
L(a);
|
|
7574
|
+
else if (i)
|
|
7575
|
+
i(T);
|
|
7576
|
+
else
|
|
7577
|
+
throw T;
|
|
7578
|
+
})
|
|
7579
|
+
);
|
|
7580
|
+
} catch (T) {
|
|
7572
7581
|
if (a)
|
|
7573
7582
|
return L(a);
|
|
7574
7583
|
if (i)
|
|
7575
|
-
i(
|
|
7576
|
-
else throw
|
|
7584
|
+
i(T);
|
|
7585
|
+
else throw T;
|
|
7577
7586
|
}
|
|
7578
7587
|
else
|
|
7579
7588
|
L(S);
|
|
@@ -7656,12 +7665,12 @@ function Pe(t) {
|
|
|
7656
7665
|
function au(t, e, n) {
|
|
7657
7666
|
return t.has(e) || t.set(e, n), t.get(e);
|
|
7658
7667
|
}
|
|
7659
|
-
const vn = /* @__PURE__ */ new Set(["alnum", "alpha", "ascii", "blank", "cntrl", "digit", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"]),
|
|
7668
|
+
const vn = /* @__PURE__ */ new Set(["alnum", "alpha", "ascii", "blank", "cntrl", "digit", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"]), j = String.raw;
|
|
7660
7669
|
function $e(t, e) {
|
|
7661
7670
|
if (t == null) throw new Error(e ?? "Value expected");
|
|
7662
7671
|
return t;
|
|
7663
7672
|
}
|
|
7664
|
-
const Mo =
|
|
7673
|
+
const Mo = j`\[\^?`, Oo = `c.? | C(?:-.?)?|${j`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${j`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${j`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${j`o\{[^\}]*\}?`}|${j`\d{1,3}`}`, xn = /[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/, et = new RegExp(j`
|
|
7665
7674
|
\\ (?:
|
|
7666
7675
|
${Oo}
|
|
7667
7676
|
| [gk]<[^>]*>?
|
|
@@ -7683,7 +7692,7 @@ const Mo = B`\[\^?`, Oo = `c.? | C(?:-.?)?|${B`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x
|
|
|
7683
7692
|
| (?:${xn.source})+
|
|
7684
7693
|
| ${Mo}
|
|
7685
7694
|
| .
|
|
7686
|
-
`.replace(/\s+/g, ""), "gsu"),
|
|
7695
|
+
`.replace(/\s+/g, ""), "gsu"), Mt = new RegExp(j`
|
|
7687
7696
|
\\ (?:
|
|
7688
7697
|
${Oo}
|
|
7689
7698
|
| .
|
|
@@ -7778,7 +7787,7 @@ function lu(t, e, n, r) {
|
|
|
7778
7787
|
}
|
|
7779
7788
|
if (n === ".") return { token: ge("dot", n) };
|
|
7780
7789
|
if (n === "^" || n === "$") {
|
|
7781
|
-
const a = t.singleline ? { "^":
|
|
7790
|
+
const a = t.singleline ? { "^": j`\A`, $: j`\Z` }[n] : n;
|
|
7782
7791
|
return { token: ur(a, n) };
|
|
7783
7792
|
}
|
|
7784
7793
|
return n === "|" ? { token: hu(n) } : xn.test(n) ? { tokens: Iu(n) } : { token: se(Pe(n), n) };
|
|
@@ -7786,7 +7795,7 @@ function lu(t, e, n, r) {
|
|
|
7786
7795
|
function uu(t, e, n) {
|
|
7787
7796
|
const r = [cr(e[1] === "^", e)];
|
|
7788
7797
|
let o = 1, s;
|
|
7789
|
-
for (
|
|
7798
|
+
for (Mt.lastIndex = n; s = Mt.exec(t); ) {
|
|
7790
7799
|
const a = s[0];
|
|
7791
7800
|
if (a[0] === "[" && a[1] !== ":") o++, r.push(cr(a[1] === "^", a));
|
|
7792
7801
|
else if (a === "]") {
|
|
@@ -7797,7 +7806,7 @@ function uu(t, e, n) {
|
|
|
7797
7806
|
Array.isArray(i) ? r.push(...i) : r.push(i);
|
|
7798
7807
|
}
|
|
7799
7808
|
}
|
|
7800
|
-
return { tokens: r, lastIndex:
|
|
7809
|
+
return { tokens: r, lastIndex: Mt.lastIndex || t.length };
|
|
7801
7810
|
}
|
|
7802
7811
|
function cu(t) {
|
|
7803
7812
|
if (t[0] === "\\") return Do(t, { inCharClass: !0 });
|
|
@@ -7812,7 +7821,7 @@ function Do(t, { inCharClass: e }) {
|
|
|
7812
7821
|
const n = t[1];
|
|
7813
7822
|
if (n === "c" || n === "C") return _u(t);
|
|
7814
7823
|
if ("dDhHsSwW".includes(n)) return vu(t);
|
|
7815
|
-
if (t.startsWith(
|
|
7824
|
+
if (t.startsWith(j`\o{`)) throw new Error(`Incomplete, invalid, or unsupported octal code point "${t}"`);
|
|
7816
7825
|
if (/^\\[pP]\{/.test(t)) {
|
|
7817
7826
|
if (t.length === 3) throw new Error(`Incomplete or invalid Unicode property "${t}"`);
|
|
7818
7827
|
return xu(t);
|
|
@@ -7829,7 +7838,7 @@ function Do(t, { inCharClass: e }) {
|
|
|
7829
7838
|
if (n === "u" || n === "x") return se(Au(t), t);
|
|
7830
7839
|
if (hr.has(n)) return se(hr.get(n), t);
|
|
7831
7840
|
if (/\d/.test(n)) return gu(e, t);
|
|
7832
|
-
if (t === "\\") throw new Error(
|
|
7841
|
+
if (t === "\\") throw new Error(j`Incomplete escape "\"`);
|
|
7833
7842
|
if (n === "M") throw new Error(`Unsupported meta "${t}"`);
|
|
7834
7843
|
if ([...t].length === 2) return se(t.codePointAt(1), t);
|
|
7835
7844
|
throw new Error(`Unexpected escape "${t}"`);
|
|
@@ -7987,7 +7996,7 @@ function Ru(t, e) {
|
|
|
7987
7996
|
const l = a[i];
|
|
7988
7997
|
let u;
|
|
7989
7998
|
if (i === 0 && l !== "8" && l !== "9") {
|
|
7990
|
-
if (u = parseInt(l, 8), u > 127) throw new Error(
|
|
7999
|
+
if (u = parseInt(l, 8), u > 127) throw new Error(j`Octal encoded byte above 177 unsupported "${n}"`);
|
|
7991
8000
|
} else u = Pe(l);
|
|
7992
8001
|
s.push(se(u, (i === 0 ? "\\" : "") + l));
|
|
7993
8002
|
}
|
|
@@ -8033,7 +8042,7 @@ function jo(t, e = {}) {
|
|
|
8033
8042
|
case "Backreference":
|
|
8034
8043
|
return $u(p, s);
|
|
8035
8044
|
case "Character":
|
|
8036
|
-
return
|
|
8045
|
+
return kt(p.value, { useLastValid: !!d.isCheckingRangeEnd });
|
|
8037
8046
|
case "CharacterClassHyphen":
|
|
8038
8047
|
return Tu(p, s, d);
|
|
8039
8048
|
case "CharacterClassOpen":
|
|
@@ -8065,13 +8074,13 @@ function jo(t, e = {}) {
|
|
|
8065
8074
|
if (f > l.length) throw new Error("Subroutine uses a group number that's not defined");
|
|
8066
8075
|
f && (l[f - 1].isSubroutined = !0);
|
|
8067
8076
|
} else if (c.has(f)) {
|
|
8068
|
-
if (c.get(f).length > 1) throw new Error(
|
|
8077
|
+
if (c.get(f).length > 1) throw new Error(j`Subroutine uses a duplicate group name "\g<${f}>"`);
|
|
8069
8078
|
c.get(f)[0].isSubroutined = !0;
|
|
8070
|
-
} else throw new Error(
|
|
8079
|
+
} else throw new Error(j`Subroutine uses a group name that's not defined "\g<${f}>"`);
|
|
8071
8080
|
return a;
|
|
8072
8081
|
}
|
|
8073
8082
|
function Pu({ kind: t }) {
|
|
8074
|
-
return
|
|
8083
|
+
return rn($e({ "^": "line_start", $: "line_end", "\\A": "string_start", "\\b": "word_boundary", "\\B": "word_boundary", "\\G": "search_start", "\\y": "text_segment_boundary", "\\Y": "text_segment_boundary", "\\z": "string_end", "\\Z": "string_end_newline" }[t], `Unexpected assertion kind "${t}"`), { negate: t === j`\B` || t === j`\Y` });
|
|
8075
8084
|
}
|
|
8076
8085
|
function $u({ raw: t }, e) {
|
|
8077
8086
|
const n = /^\\k[<']/.test(t), r = n ? t.slice(3, -1) : t.slice(1), o = (s, a = !1) => {
|
|
@@ -8079,14 +8088,14 @@ function $u({ raw: t }, e) {
|
|
|
8079
8088
|
let l = !1;
|
|
8080
8089
|
if (s > i) if (e.skipBackrefValidation) l = !0;
|
|
8081
8090
|
else throw new Error(`Not enough capturing groups defined to the left "${t}"`);
|
|
8082
|
-
return e.hasNumberedRef = !0,
|
|
8091
|
+
return e.hasNumberedRef = !0, on(a ? i + 1 - s : s, { orphan: l });
|
|
8083
8092
|
};
|
|
8084
8093
|
if (n) {
|
|
8085
8094
|
const s = /^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);
|
|
8086
8095
|
if (s) return o(+s.groups.num, !!s.groups.sign);
|
|
8087
8096
|
if (/[-+]/.test(r)) throw new Error(`Invalid backref name "${t}"`);
|
|
8088
8097
|
if (!e.namedGroupsByName.has(r)) throw new Error(`Group name not defined to the left "${t}"`);
|
|
8089
|
-
return
|
|
8098
|
+
return on(r);
|
|
8090
8099
|
}
|
|
8091
8100
|
return o(+r);
|
|
8092
8101
|
}
|
|
@@ -8097,7 +8106,7 @@ function Tu(t, e, n) {
|
|
|
8097
8106
|
if (a.type === "Character" && l.type === "Character") return s.body.pop(), ju(a, l);
|
|
8098
8107
|
throw new Error("Invalid character class range");
|
|
8099
8108
|
}
|
|
8100
|
-
return
|
|
8109
|
+
return kt(Pe("-"));
|
|
8101
8110
|
}
|
|
8102
8111
|
function Mu({ negate: t }, e, n) {
|
|
8103
8112
|
const { tokens: r, walk: o } = e, s = r[e.nextIndex], a = [st()];
|
|
@@ -8116,11 +8125,11 @@ function Mu({ negate: t }, e, n) {
|
|
|
8116
8125
|
function Ou({ kind: t, negate: e, value: n }, r) {
|
|
8117
8126
|
const { normalizeUnknownPropertyNames: o, skipPropertyNameValidation: s, unicodePropertyMap: a } = r;
|
|
8118
8127
|
if (t === "property") {
|
|
8119
|
-
const i =
|
|
8128
|
+
const i = vt(n);
|
|
8120
8129
|
if (vn.has(i) && !a?.has(i)) t = "posix", n = i;
|
|
8121
8130
|
else return ke(n, { negate: e, normalizeUnknownPropertyNames: o, skipPropertyNameValidation: s, unicodePropertyMap: a });
|
|
8122
8131
|
}
|
|
8123
|
-
return t === "posix" ? Wu(n, { negate: e }) :
|
|
8132
|
+
return t === "posix" ? Wu(n, { negate: e }) : sn(t, { negate: e });
|
|
8124
8133
|
}
|
|
8125
8134
|
function Du(t, e, n) {
|
|
8126
8135
|
const { tokens: r, capturingGroups: o, namedGroupsByName: s, skipLookbehindValidation: a, walk: i } = e, l = qu(t), u = l.type === "AbsenceFunction", c = gr(l), h = c && l.negate;
|
|
@@ -8164,11 +8173,11 @@ function Bu(t, e) {
|
|
|
8164
8173
|
function me(t) {
|
|
8165
8174
|
return { type: "Alternative", body: Wo(t?.body) };
|
|
8166
8175
|
}
|
|
8167
|
-
function
|
|
8176
|
+
function rn(t, e) {
|
|
8168
8177
|
const n = { type: "Assertion", kind: t };
|
|
8169
8178
|
return (t === "word_boundary" || t === "text_segment_boundary") && (n.negate = !!e?.negate), n;
|
|
8170
8179
|
}
|
|
8171
|
-
function
|
|
8180
|
+
function on(t, e) {
|
|
8172
8181
|
const n = !!e?.orphan;
|
|
8173
8182
|
return { type: "Backreference", ref: t, ...n && { orphan: n } };
|
|
8174
8183
|
}
|
|
@@ -8177,7 +8186,7 @@ function Uo(t, e) {
|
|
|
8177
8186
|
if (n.name !== void 0 && !Xu(n.name)) throw new Error(`Group name "${n.name}" invalid in Oniguruma`);
|
|
8178
8187
|
return { type: "CapturingGroup", number: t, ...n.name && { name: n.name }, ...n.isSubroutined && { isSubroutined: n.isSubroutined }, body: Ye(e?.body) };
|
|
8179
8188
|
}
|
|
8180
|
-
function
|
|
8189
|
+
function kt(t, e) {
|
|
8181
8190
|
const n = { useLastValid: !1, ...e };
|
|
8182
8191
|
if (t > 1114111) {
|
|
8183
8192
|
const r = t.toString(16);
|
|
@@ -8194,7 +8203,7 @@ function ju(t, e) {
|
|
|
8194
8203
|
if (e.value < t.value) throw new Error("Character class range out of order");
|
|
8195
8204
|
return { type: "CharacterClassRange", min: t, max: e };
|
|
8196
8205
|
}
|
|
8197
|
-
function
|
|
8206
|
+
function sn(t, e) {
|
|
8198
8207
|
const n = !!e?.negate, r = { type: "CharacterSet", kind: t };
|
|
8199
8208
|
return (t === "digit" || t === "hex" || t === "newline" || t === "space" || t === "word") && (r.negate = n), (t === "text_segment" || t === "newline" && !n) && (r.variableLength = !0), r;
|
|
8200
8209
|
}
|
|
@@ -8235,10 +8244,10 @@ function Ho(t) {
|
|
|
8235
8244
|
}
|
|
8236
8245
|
function ke(t, e) {
|
|
8237
8246
|
const n = { negate: !1, normalizeUnknownPropertyNames: !1, skipPropertyNameValidation: !1, unicodePropertyMap: null, ...e };
|
|
8238
|
-
let r = n.unicodePropertyMap?.get(
|
|
8247
|
+
let r = n.unicodePropertyMap?.get(vt(t));
|
|
8239
8248
|
if (!r) {
|
|
8240
8249
|
if (n.normalizeUnknownPropertyNames) r = Ku(t);
|
|
8241
|
-
else if (n.unicodePropertyMap && !n.skipPropertyNameValidation) throw new Error(
|
|
8250
|
+
else if (n.unicodePropertyMap && !n.skipPropertyNameValidation) throw new Error(j`Invalid Unicode property "\p{${t}}"`);
|
|
8242
8251
|
}
|
|
8243
8252
|
return { type: "CharacterSet", kind: "property", value: r ?? t, negate: n.negate };
|
|
8244
8253
|
}
|
|
@@ -8281,7 +8290,7 @@ function Xu(t) {
|
|
|
8281
8290
|
function Ku(t) {
|
|
8282
8291
|
return t.trim().replace(/[- _]+/g, "_").replace(/[A-Z][a-z]+(?=[A-Z])/g, "$&_").replace(/[A-Za-z]+/g, (e) => e[0].toUpperCase() + e.slice(1).toLowerCase());
|
|
8283
8292
|
}
|
|
8284
|
-
function
|
|
8293
|
+
function vt(t) {
|
|
8285
8294
|
return t.replace(/[- _]+/g, "").toLowerCase();
|
|
8286
8295
|
}
|
|
8287
8296
|
function mr(t, e) {
|
|
@@ -8468,7 +8477,7 @@ function tc(t, e) {
|
|
|
8468
8477
|
r.forEach(($, L) => {
|
|
8469
8478
|
E.set(
|
|
8470
8479
|
L >= S ? L + 1 : L,
|
|
8471
|
-
$.map((
|
|
8480
|
+
$.map((T) => T >= S ? T + 1 : T)
|
|
8472
8481
|
);
|
|
8473
8482
|
}), r = E;
|
|
8474
8483
|
}
|
|
@@ -8497,7 +8506,7 @@ function tc(t, e) {
|
|
|
8497
8506
|
hiddenCaptures: n
|
|
8498
8507
|
};
|
|
8499
8508
|
}
|
|
8500
|
-
const qo = String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,
|
|
8509
|
+
const qo = String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`, Ot = new RegExp(String.raw`
|
|
8501
8510
|
\\(?: \d+
|
|
8502
8511
|
| c[A-Za-z]
|
|
8503
8512
|
| [gk]<[^>]+>
|
|
@@ -8520,7 +8529,7 @@ function nc(t) {
|
|
|
8520
8529
|
};
|
|
8521
8530
|
const e = [];
|
|
8522
8531
|
let n = null, r = null, o = "", s = 0, a;
|
|
8523
|
-
for (
|
|
8532
|
+
for (Ot.lastIndex = 0; a = Ot.exec(t); ) {
|
|
8524
8533
|
const { 0: i, index: l, groups: { qBase: u, qMod: c, invalidQ: h } } = a;
|
|
8525
8534
|
if (i === "[")
|
|
8526
8535
|
s || (r = l), s++;
|
|
@@ -8543,7 +8552,7 @@ function nc(t) {
|
|
|
8543
8552
|
t = `${t.slice(0, l - o.length)}(?>${o}${u})${t.slice(l + i.length)}`;
|
|
8544
8553
|
f += 4;
|
|
8545
8554
|
}
|
|
8546
|
-
|
|
8555
|
+
Ot.lastIndex += f;
|
|
8547
8556
|
} else i[0] === "(" ? e.push(l) : i === ")" && (n = e.length ? e.pop() : null);
|
|
8548
8557
|
o = i;
|
|
8549
8558
|
}
|
|
@@ -8551,7 +8560,7 @@ function nc(t) {
|
|
|
8551
8560
|
pattern: t
|
|
8552
8561
|
};
|
|
8553
8562
|
}
|
|
8554
|
-
const Y = String.raw, rc = Y`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,
|
|
8563
|
+
const Y = String.raw, rc = Y`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`, an = Y`\(\?R=(?<rDepth>[^\)]+)\)|${rc}`, xt = Y`\(\?<(?![=!])(?<captureName>[^>]+)>`, Xo = Y`${xt}|(?<unnamed>\()(?!\?)`, he = new RegExp(Y`${xt}|${an}|\(\?|\\?.`, "gsu"), Dt = "Cannot use multiple overlapping recursions";
|
|
8555
8564
|
function oc(t, e) {
|
|
8556
8565
|
const { hiddenCaptures: n, mode: r } = {
|
|
8557
8566
|
hiddenCaptures: [],
|
|
@@ -8559,7 +8568,7 @@ function oc(t, e) {
|
|
|
8559
8568
|
...e
|
|
8560
8569
|
};
|
|
8561
8570
|
let o = e?.captureTransfers ?? /* @__PURE__ */ new Map();
|
|
8562
|
-
if (!new RegExp(
|
|
8571
|
+
if (!new RegExp(an, "su").test(t))
|
|
8563
8572
|
return {
|
|
8564
8573
|
pattern: t,
|
|
8565
8574
|
captureTransfers: o,
|
|
@@ -8577,7 +8586,7 @@ function oc(t, e) {
|
|
|
8577
8586
|
d === "]" && c--;
|
|
8578
8587
|
else if (g) {
|
|
8579
8588
|
if (Cr(g), u)
|
|
8580
|
-
throw new Error(
|
|
8589
|
+
throw new Error(Dt);
|
|
8581
8590
|
if (a)
|
|
8582
8591
|
throw new Error(
|
|
8583
8592
|
// When used in `external` mode by transpilers other than Regex+, backrefs might have
|
|
@@ -8585,8 +8594,8 @@ function oc(t, e) {
|
|
|
8585
8594
|
`${r === "external" ? "Backrefs" : "Numbered backrefs"} cannot be used with global recursion`
|
|
8586
8595
|
);
|
|
8587
8596
|
const _ = t.slice(0, f.index), y = t.slice(he.lastIndex);
|
|
8588
|
-
if (nt(y,
|
|
8589
|
-
throw new Error(
|
|
8597
|
+
if (nt(y, an, J.DEFAULT))
|
|
8598
|
+
throw new Error(Dt);
|
|
8590
8599
|
const S = +g - 1;
|
|
8591
8600
|
t = wr(
|
|
8592
8601
|
_,
|
|
@@ -8611,22 +8620,22 @@ function oc(t, e) {
|
|
|
8611
8620
|
for (const te of l)
|
|
8612
8621
|
if (te.name === w || te.num === +w) {
|
|
8613
8622
|
if (_ = !0, te.hasRecursedWithin)
|
|
8614
|
-
throw new Error(
|
|
8623
|
+
throw new Error(Dt);
|
|
8615
8624
|
break;
|
|
8616
8625
|
}
|
|
8617
8626
|
if (!_)
|
|
8618
8627
|
throw new Error(Y`Recursive \g cannot be used outside the referenced group "${r === "external" ? w : Y`\g<${w}&R=${m}>`}"`);
|
|
8619
8628
|
const y = i.get(w), S = ec(t, y);
|
|
8620
|
-
if (a && nt(S, Y`${
|
|
8629
|
+
if (a && nt(S, Y`${xt}|\((?!\?)`, J.DEFAULT))
|
|
8621
8630
|
throw new Error(
|
|
8622
8631
|
// When used in `external` mode by transpilers other than Regex+, backrefs might have
|
|
8623
8632
|
// gone through conversion from named to numbered, so avoid a misleading error
|
|
8624
8633
|
`${r === "external" ? "Backrefs" : "Numbered backrefs"} cannot be used with recursion of capturing groups`
|
|
8625
8634
|
);
|
|
8626
|
-
const E = t.slice(y, f.index), $ = S.slice(E.length + d.length), L = s.length,
|
|
8635
|
+
const E = t.slice(y, f.index), $ = S.slice(E.length + d.length), L = s.length, T = +m - 1, Z = wr(
|
|
8627
8636
|
E,
|
|
8628
8637
|
$,
|
|
8629
|
-
|
|
8638
|
+
T,
|
|
8630
8639
|
!0,
|
|
8631
8640
|
n,
|
|
8632
8641
|
s,
|
|
@@ -8635,7 +8644,7 @@ function oc(t, e) {
|
|
|
8635
8644
|
o = Sr(
|
|
8636
8645
|
o,
|
|
8637
8646
|
E,
|
|
8638
|
-
|
|
8647
|
+
T,
|
|
8639
8648
|
s.length - L,
|
|
8640
8649
|
L,
|
|
8641
8650
|
h
|
|
@@ -8667,7 +8676,7 @@ function Cr(t) {
|
|
|
8667
8676
|
}
|
|
8668
8677
|
function wr(t, e, n, r, o, s, a) {
|
|
8669
8678
|
const i = /* @__PURE__ */ new Set();
|
|
8670
|
-
r && Vo(t + e,
|
|
8679
|
+
r && Vo(t + e, xt, ({ groups: { captureName: u } }) => {
|
|
8671
8680
|
i.add(u);
|
|
8672
8681
|
}, J.DEFAULT);
|
|
8673
8682
|
const l = [
|
|
@@ -8729,7 +8738,7 @@ function Sr(t, e, n, r, o, s) {
|
|
|
8729
8738
|
}
|
|
8730
8739
|
return t;
|
|
8731
8740
|
}
|
|
8732
|
-
var
|
|
8741
|
+
var D = String.fromCodePoint, v = String.raw, ae = {
|
|
8733
8742
|
flagGroups: (() => {
|
|
8734
8743
|
try {
|
|
8735
8744
|
new RegExp("(?i:)");
|
|
@@ -8756,7 +8765,7 @@ ae.bugFlagVLiteralHyphenIsRange = ae.unicodeSets ? (() => {
|
|
|
8756
8765
|
return !1;
|
|
8757
8766
|
})() : !1;
|
|
8758
8767
|
ae.bugNestedClassIgnoresNegation = ae.unicodeSets && new RegExp("[[^a]]", "v").test("a");
|
|
8759
|
-
function
|
|
8768
|
+
function yt(t, { enable: e, disable: n }) {
|
|
8760
8769
|
return {
|
|
8761
8770
|
dotAll: !n?.dotAll && !!(e?.dotAll || t.dotAll),
|
|
8762
8771
|
ignoreCase: !n?.ignoreCase && !!(e?.ignoreCase || t.ignoreCase)
|
|
@@ -8765,7 +8774,7 @@ function bt(t, { enable: e, disable: n }) {
|
|
|
8765
8774
|
function Ve(t, e, n) {
|
|
8766
8775
|
return t.has(e) || t.set(e, n), t.get(e);
|
|
8767
8776
|
}
|
|
8768
|
-
function
|
|
8777
|
+
function ln(t, e) {
|
|
8769
8778
|
return kr[t] >= kr[e];
|
|
8770
8779
|
}
|
|
8771
8780
|
function ac(t, e) {
|
|
@@ -8834,9 +8843,9 @@ function Ko(t = {}) {
|
|
|
8834
8843
|
return e.target === "auto" && (e.target = ae.flagGroups ? "ES2025" : ae.unicodeSets ? "ES2024" : "ES2018"), e;
|
|
8835
8844
|
}
|
|
8836
8845
|
var lc = "[ -\r ]", uc = /* @__PURE__ */ new Set([
|
|
8837
|
-
|
|
8846
|
+
D(304),
|
|
8838
8847
|
// İ
|
|
8839
|
-
|
|
8848
|
+
D(305)
|
|
8840
8849
|
// ı
|
|
8841
8850
|
]), re = v`[\p{L}\p{M}\p{N}\p{Pc}]`;
|
|
8842
8851
|
function Yo(t) {
|
|
@@ -8936,29 +8945,29 @@ Uppercase Upper
|
|
|
8936
8945
|
Variation_Selector VS
|
|
8937
8946
|
White_Space space
|
|
8938
8947
|
XID_Continue XIDC
|
|
8939
|
-
XID_Start XIDS`.split(/\s/).map((t) => [
|
|
8948
|
+
XID_Start XIDS`.split(/\s/).map((t) => [vt(t), t])
|
|
8940
8949
|
), cc = /* @__PURE__ */ new Map([
|
|
8941
|
-
["s",
|
|
8950
|
+
["s", D(383)],
|
|
8942
8951
|
// s, ſ
|
|
8943
|
-
[
|
|
8952
|
+
[D(383), "s"]
|
|
8944
8953
|
// ſ, s
|
|
8945
8954
|
]), hc = /* @__PURE__ */ new Map([
|
|
8946
|
-
[
|
|
8955
|
+
[D(223), D(7838)],
|
|
8947
8956
|
// ß, ẞ
|
|
8948
|
-
[
|
|
8957
|
+
[D(107), D(8490)],
|
|
8949
8958
|
// k, K (Kelvin)
|
|
8950
|
-
[
|
|
8959
|
+
[D(229), D(8491)],
|
|
8951
8960
|
// å, Å (Angstrom)
|
|
8952
|
-
[
|
|
8961
|
+
[D(969), D(8486)]
|
|
8953
8962
|
// ω, Ω (Ohm)
|
|
8954
8963
|
]), fc = new Map([
|
|
8955
8964
|
ie(453),
|
|
8956
8965
|
ie(456),
|
|
8957
8966
|
ie(459),
|
|
8958
8967
|
ie(498),
|
|
8959
|
-
...
|
|
8960
|
-
...
|
|
8961
|
-
...
|
|
8968
|
+
...Gt(8072, 8079),
|
|
8969
|
+
...Gt(8088, 8095),
|
|
8970
|
+
...Gt(8104, 8111),
|
|
8962
8971
|
ie(8124),
|
|
8963
8972
|
ie(8140),
|
|
8964
8973
|
ie(8188)
|
|
@@ -8986,10 +8995,10 @@ function dc(t, e) {
|
|
|
8986
8995
|
return n;
|
|
8987
8996
|
}
|
|
8988
8997
|
function ie(t) {
|
|
8989
|
-
const e =
|
|
8998
|
+
const e = D(t);
|
|
8990
8999
|
return [e.toLowerCase(), e];
|
|
8991
9000
|
}
|
|
8992
|
-
function
|
|
9001
|
+
function Gt(t, e) {
|
|
8993
9002
|
return dc(t, e).map((n) => ie(n));
|
|
8994
9003
|
}
|
|
8995
9004
|
var Jo = /* @__PURE__ */ new Set([
|
|
@@ -9029,7 +9038,7 @@ function gc(t, e) {
|
|
|
9029
9038
|
avoidSubclass: n.avoidSubclass,
|
|
9030
9039
|
flagDirectivesByAlt: /* @__PURE__ */ new Map(),
|
|
9031
9040
|
jsGroupNameMap: /* @__PURE__ */ new Map(),
|
|
9032
|
-
minTargetEs2024:
|
|
9041
|
+
minTargetEs2024: ln(n.bestEffortTarget, "ES2024"),
|
|
9033
9042
|
passedLookbehind: !1,
|
|
9034
9043
|
strategy: null,
|
|
9035
9044
|
// Subroutines can appear before the groups they ref, so collect reffed nodes for a second pass
|
|
@@ -9104,8 +9113,8 @@ var mc = {
|
|
|
9104
9113
|
throw new Error(`Unsupported text segment boundary "\\${u ? "Y" : "y"}"`);
|
|
9105
9114
|
if (l === "line_end")
|
|
9106
9115
|
a(P(pe({ body: [
|
|
9107
|
-
me({ body: [
|
|
9108
|
-
me({ body: [
|
|
9116
|
+
me({ body: [rn("string_end")] }),
|
|
9117
|
+
me({ body: [kt(10)] })
|
|
9109
9118
|
// `\n`
|
|
9110
9119
|
] }), e));
|
|
9111
9120
|
else if (l === "line_start")
|
|
@@ -9120,7 +9129,7 @@ var mc = {
|
|
|
9120
9129
|
else {
|
|
9121
9130
|
if (h)
|
|
9122
9131
|
throw new Error(v`Uses "\G" in a way that requires a subclass`);
|
|
9123
|
-
a(le(
|
|
9132
|
+
a(le(rn("string_start"), e)), i.strategy = "clip_search";
|
|
9124
9133
|
}
|
|
9125
9134
|
}
|
|
9126
9135
|
else if (!(l === "string_end" || l === "string_start")) if (l === "string_end_newline")
|
|
@@ -9135,11 +9144,11 @@ var mc = {
|
|
|
9135
9144
|
},
|
|
9136
9145
|
Backreference({ node: t }, { jsGroupNameMap: e }) {
|
|
9137
9146
|
let { ref: n } = t;
|
|
9138
|
-
typeof n == "string" && !
|
|
9147
|
+
typeof n == "string" && !Bt(n) && (n = Ft(n, e), t.ref = n);
|
|
9139
9148
|
},
|
|
9140
9149
|
CapturingGroup({ node: t }, { jsGroupNameMap: e, subroutineRefMap: n }) {
|
|
9141
9150
|
let { name: r } = t;
|
|
9142
|
-
r && !
|
|
9151
|
+
r && !Bt(r) && (r = Ft(r, e), t.name = r), n.set(t.number, t), r && n.set(r, t);
|
|
9143
9152
|
},
|
|
9144
9153
|
CharacterClassRange({ node: t, parent: e, replaceWith: n }) {
|
|
9145
9154
|
if (e.kind === "intersection") {
|
|
@@ -9150,15 +9159,15 @@ var mc = {
|
|
|
9150
9159
|
CharacterSet({ node: t, parent: e, replaceWith: n }, { accuracy: r, minTargetEs2024: o, digitIsAscii: s, spaceIsAscii: a, wordIsAscii: i }) {
|
|
9151
9160
|
const { kind: l, negate: u, value: c } = t;
|
|
9152
9161
|
if (s && (l === "digit" || c === "digit")) {
|
|
9153
|
-
n(le(
|
|
9162
|
+
n(le(sn("digit", { negate: u }), e));
|
|
9154
9163
|
return;
|
|
9155
9164
|
}
|
|
9156
9165
|
if (a && (l === "space" || c === "space")) {
|
|
9157
|
-
n(P(
|
|
9166
|
+
n(P(jt(oe(lc), u), e));
|
|
9158
9167
|
return;
|
|
9159
9168
|
}
|
|
9160
9169
|
if (i && (l === "word" || c === "word")) {
|
|
9161
|
-
n(le(
|
|
9170
|
+
n(le(sn("word", { negate: u }), e));
|
|
9162
9171
|
return;
|
|
9163
9172
|
}
|
|
9164
9173
|
if (l === "any")
|
|
@@ -9190,15 +9199,15 @@ var mc = {
|
|
|
9190
9199
|
graph: "!-~",
|
|
9191
9200
|
print: " -~"
|
|
9192
9201
|
}[c];
|
|
9193
|
-
u && (h = `\0-${
|
|
9202
|
+
u && (h = `\0-${D(h.codePointAt(0) - 1)}${D(h.codePointAt(2) + 1)}-`), n(P(oe(`[${h}]`), e));
|
|
9194
9203
|
} else
|
|
9195
|
-
n(P(
|
|
9204
|
+
n(P(jt(oe(pc.get(c)), u), e));
|
|
9196
9205
|
else if (l === "property")
|
|
9197
|
-
An.has(
|
|
9206
|
+
An.has(vt(c)) || (t.key = "sc");
|
|
9198
9207
|
else if (l === "space")
|
|
9199
9208
|
n(le(ke("space", { negate: u }), e));
|
|
9200
9209
|
else if (l === "word")
|
|
9201
|
-
n(P(
|
|
9210
|
+
n(P(jt(oe(re), u), e));
|
|
9202
9211
|
else
|
|
9203
9212
|
throw new Error(`Unexpected character set kind "${l}"`);
|
|
9204
9213
|
},
|
|
@@ -9312,7 +9321,7 @@ var mc = {
|
|
|
9312
9321
|
},
|
|
9313
9322
|
Subroutine({ node: t }, { jsGroupNameMap: e }) {
|
|
9314
9323
|
let { ref: n } = t;
|
|
9315
|
-
typeof n == "string" && !
|
|
9324
|
+
typeof n == "string" && !Bt(n) && (n = Ft(n, e), t.ref = n);
|
|
9316
9325
|
}
|
|
9317
9326
|
}, yc = {
|
|
9318
9327
|
Backreference({ node: t }, { multiplexCapturesToLeftByRef: e, reffedNodesByReferencer: n }) {
|
|
@@ -9373,7 +9382,7 @@ var mc = {
|
|
|
9373
9382
|
},
|
|
9374
9383
|
Group: {
|
|
9375
9384
|
enter({ node: t }, e) {
|
|
9376
|
-
e.prevFlags = e.currentFlags, t.flags && (e.currentFlags =
|
|
9385
|
+
e.prevFlags = e.currentFlags, t.flags && (e.currentFlags = yt(e.currentFlags, t.flags));
|
|
9377
9386
|
},
|
|
9378
9387
|
exit(t, e) {
|
|
9379
9388
|
e.currentFlags = e.prevFlags;
|
|
@@ -9397,7 +9406,7 @@ var mc = {
|
|
|
9397
9406
|
const c = es(_c(
|
|
9398
9407
|
a,
|
|
9399
9408
|
(f) => f.type === "Group" && !!f.flags
|
|
9400
|
-
)), h = c ?
|
|
9409
|
+
)), h = c ? yt(r.globalFlags, c) : r.globalFlags;
|
|
9401
9410
|
Cc(h, r.currentFlags) || (u = Q({
|
|
9402
9411
|
flags: Sc(h)
|
|
9403
9412
|
}), u.body[0].body.push(l));
|
|
@@ -9417,7 +9426,7 @@ var mc = {
|
|
|
9417
9426
|
const a = Q({
|
|
9418
9427
|
atomic: !0,
|
|
9419
9428
|
body: s.reverse().map((i) => me({
|
|
9420
|
-
body: [
|
|
9429
|
+
body: [on(i.number)]
|
|
9421
9430
|
}))
|
|
9422
9431
|
});
|
|
9423
9432
|
n(P(a, e));
|
|
@@ -9485,7 +9494,7 @@ function _c(t, e) {
|
|
|
9485
9494
|
(!e || e(t)) && n.push(t);
|
|
9486
9495
|
return n;
|
|
9487
9496
|
}
|
|
9488
|
-
function
|
|
9497
|
+
function Ft(t, e) {
|
|
9489
9498
|
if (e.has(t))
|
|
9490
9499
|
return e.get(t);
|
|
9491
9500
|
const n = `$${e.size}_${t.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug, "_")}`;
|
|
@@ -9557,7 +9566,7 @@ function xc(t, e) {
|
|
|
9557
9566
|
kind: "search_start"
|
|
9558
9567
|
});
|
|
9559
9568
|
}
|
|
9560
|
-
function
|
|
9569
|
+
function Bt(t) {
|
|
9561
9570
|
return /^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(t);
|
|
9562
9571
|
}
|
|
9563
9572
|
function oe(t, e) {
|
|
@@ -9569,7 +9578,7 @@ function oe(t, e) {
|
|
|
9569
9578
|
}).body;
|
|
9570
9579
|
return r.length > 1 || r[0].body.length > 1 ? Q({ body: r }) : r[0].body[0];
|
|
9571
9580
|
}
|
|
9572
|
-
function
|
|
9581
|
+
function jt(t, e) {
|
|
9573
9582
|
return t.negate = e, t;
|
|
9574
9583
|
}
|
|
9575
9584
|
function le(t, e) {
|
|
@@ -9579,7 +9588,7 @@ function P(t, e) {
|
|
|
9579
9588
|
return Zo(t), t.parent = e, t;
|
|
9580
9589
|
}
|
|
9581
9590
|
function Ec(t, e) {
|
|
9582
|
-
const n = Ko(e), r =
|
|
9591
|
+
const n = Ko(e), r = ln(n.target, "ES2024"), o = ln(n.target, "ES2025"), s = n.rules.recursionLimit;
|
|
9583
9592
|
if (!Number.isInteger(s) || s < 2 || s > 20)
|
|
9584
9593
|
throw new Error("Invalid recursionLimit; use 2-20");
|
|
9585
9594
|
let a = null, i = null;
|
|
@@ -9643,7 +9652,7 @@ var Ac = {
|
|
|
9643
9652
|
if (Er(t)) {
|
|
9644
9653
|
const n = e.getCurrentModI();
|
|
9645
9654
|
e.pushModI(
|
|
9646
|
-
t.flags ?
|
|
9655
|
+
t.flags ? yt({ ignoreCase: n }, t.flags).ignoreCase : n
|
|
9647
9656
|
);
|
|
9648
9657
|
}
|
|
9649
9658
|
},
|
|
@@ -9655,7 +9664,7 @@ var Ac = {
|
|
|
9655
9664
|
e.setHasCasedChar();
|
|
9656
9665
|
},
|
|
9657
9666
|
Character({ node: t }, e) {
|
|
9658
|
-
Rn(
|
|
9667
|
+
Rn(D(t.value)) && e.setHasCasedChar();
|
|
9659
9668
|
},
|
|
9660
9669
|
CharacterClassRange({ node: t, skip: e }, n) {
|
|
9661
9670
|
e(), os(t, { firstOnly: !0 }).length && n.setHasCasedChar();
|
|
@@ -9703,7 +9712,7 @@ var Ac = {
|
|
|
9703
9712
|
@param {CharacterNode} node
|
|
9704
9713
|
*/
|
|
9705
9714
|
Character({ value: t }, e) {
|
|
9706
|
-
const n =
|
|
9715
|
+
const n = D(t), r = _e(t, {
|
|
9707
9716
|
escDigit: e.lastNode.type === "Backreference",
|
|
9708
9717
|
inCharClass: e.inCharClass,
|
|
9709
9718
|
useFlagV: e.useFlagV
|
|
@@ -9724,7 +9733,7 @@ var Ac = {
|
|
|
9724
9733
|
let { body: a } = t;
|
|
9725
9734
|
if (r === "intersection" && !e.useFlagV)
|
|
9726
9735
|
throw new Error("Use of character class intersection requires min target ES2024");
|
|
9727
|
-
ae.bugFlagVLiteralHyphenIsRange && e.useFlagV && a.some(Ar) && (a = [
|
|
9736
|
+
ae.bugFlagVLiteralHyphenIsRange && e.useFlagV && a.some(Ar) && (a = [kt(45), ...a.filter((u) => !Ar(u))]);
|
|
9728
9737
|
const i = () => `[${o ? "^" : ""}${a.map(n).join(r === "intersection" ? "&&" : "")}]`;
|
|
9729
9738
|
if (!e.inCharClass) {
|
|
9730
9739
|
if (
|
|
@@ -9815,7 +9824,7 @@ var Ac = {
|
|
|
9815
9824
|
*/
|
|
9816
9825
|
Group({ atomic: t, body: e, flags: n, parent: r }, o, s) {
|
|
9817
9826
|
const a = o.currentFlags;
|
|
9818
|
-
n && (o.currentFlags =
|
|
9827
|
+
n && (o.currentFlags = yt(a, n));
|
|
9819
9828
|
const i = e.map(s).join("|"), l = !o.verbose && e.length === 1 && // Single alt
|
|
9820
9829
|
r.type !== "Quantifier" && !t && (!o.useFlagMods || !n) ? i : `(?${Tc(t, n, o.useFlagMods)}${i})`;
|
|
9821
9830
|
return o.currentFlags = a, l;
|
|
@@ -9921,7 +9930,7 @@ function os(t, e) {
|
|
|
9921
9930
|
if (r < 65 && (o === 65535 || o >= 131071) || r === 65536 && o >= 131071)
|
|
9922
9931
|
return s;
|
|
9923
9932
|
for (let a = r; a <= o; a++) {
|
|
9924
|
-
const i =
|
|
9933
|
+
const i = D(a);
|
|
9925
9934
|
if (!Rn(i))
|
|
9926
9935
|
continue;
|
|
9927
9936
|
const l = Yo(i).filter((u) => {
|
|
@@ -9943,7 +9952,7 @@ function _e(t, { escDigit: e, inCharClass: n, useFlagV: r }) {
|
|
|
9943
9952
|
e && Oc(t)
|
|
9944
9953
|
)
|
|
9945
9954
|
return t > 255 ? `\\u{${t.toString(16).toUpperCase()}}` : `\\x${t.toString(16).toUpperCase().padStart(2, "0")}`;
|
|
9946
|
-
const o = n ? r ? Lc : Nc : Ic, s =
|
|
9955
|
+
const o = n ? r ? Lc : Nc : Ic, s = D(t);
|
|
9947
9956
|
return (o.has(s) ? "\\" : "") + s;
|
|
9948
9957
|
}
|
|
9949
9958
|
function $c(t) {
|
|
@@ -9980,7 +9989,7 @@ function Oc(t) {
|
|
|
9980
9989
|
function Ar({ type: t, value: e }) {
|
|
9981
9990
|
return t === "Character" && e === 45;
|
|
9982
9991
|
}
|
|
9983
|
-
var Dc = class
|
|
9992
|
+
var Dc = class un extends RegExp {
|
|
9984
9993
|
/**
|
|
9985
9994
|
@type {Map<number, {
|
|
9986
9995
|
hidden?: true;
|
|
@@ -10030,7 +10039,7 @@ var Dc = class cn extends RegExp {
|
|
|
10030
10039
|
if (r)
|
|
10031
10040
|
throw new Error("Cannot provide options when copying a regexp");
|
|
10032
10041
|
const s = e;
|
|
10033
|
-
super(s, n), this.#r = s.source, s instanceof
|
|
10042
|
+
super(s, n), this.#r = s.source, s instanceof un && (this.#t = s.#t, this.#n = s.#n, this.#o = s.#o, this.rawOptions = s.rawOptions);
|
|
10034
10043
|
} else {
|
|
10035
10044
|
const s = {
|
|
10036
10045
|
hiddenCaptures: [],
|
|
@@ -10051,7 +10060,7 @@ var Dc = class cn extends RegExp {
|
|
|
10051
10060
|
exec(e) {
|
|
10052
10061
|
if (!this.#e) {
|
|
10053
10062
|
const { lazyCompile: o, ...s } = this.rawOptions;
|
|
10054
|
-
this.#e = new
|
|
10063
|
+
this.#e = new un(this.#r, this.flags, s);
|
|
10055
10064
|
}
|
|
10056
10065
|
const n = this.global || this.sticky, r = this.lastIndex;
|
|
10057
10066
|
if (this.#o === "clip_search" && n && r) {
|
|
@@ -10302,7 +10311,7 @@ const Vc = "overflow-x-auto scrollbar not-inline", qc = Wc({ forgiving: !0 }), X
|
|
|
10302
10311
|
rss: "xml",
|
|
10303
10312
|
webmanifest: "json"
|
|
10304
10313
|
}
|
|
10305
|
-
}), Kc = await Xc,
|
|
10314
|
+
}), Kc = await Xc, bt = {
|
|
10306
10315
|
themes: {
|
|
10307
10316
|
light: "github-light",
|
|
10308
10317
|
dark: "github-dark"
|
|
@@ -10334,17 +10343,17 @@ const Vc = "overflow-x-auto scrollbar not-inline", qc = Wc({ forgiving: !0 }), X
|
|
|
10334
10343
|
class: Ir(e.properties.class, r.properties.class)
|
|
10335
10344
|
}, r.properties = {});
|
|
10336
10345
|
});
|
|
10337
|
-
}, mh = (t =
|
|
10346
|
+
}, mh = (t = bt.themes, e = Kc) => [
|
|
10338
10347
|
[
|
|
10339
10348
|
eu,
|
|
10340
10349
|
e,
|
|
10341
|
-
{ ...
|
|
10350
|
+
{ ...bt, themes: t }
|
|
10342
10351
|
],
|
|
10343
10352
|
Yc
|
|
10344
|
-
], Jc = (t, e, n = "text", r =
|
|
10353
|
+
], Jc = (t, e, n = "text", r = bt.themes) => {
|
|
10345
10354
|
const o = t.codeToHast(e, {
|
|
10346
10355
|
lang: n,
|
|
10347
|
-
...
|
|
10356
|
+
...bt,
|
|
10348
10357
|
themes: r
|
|
10349
10358
|
});
|
|
10350
10359
|
return Fs(o, {
|
|
@@ -10397,4 +10406,4 @@ export {
|
|
|
10397
10406
|
Xr as v,
|
|
10398
10407
|
ca as z
|
|
10399
10408
|
};
|
|
10400
|
-
//# sourceMappingURL=SyntaxHighlight-
|
|
10409
|
+
//# sourceMappingURL=SyntaxHighlight-C75W8uCn.js.map
|