@bluepic/embed 0.5.0 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/bash-DI5WKoY1.cjs +1 -0
  2. package/dist/bash-SfqkqXwO.js +169 -0
  3. package/dist/bluepic-embed.iife.js +240 -271
  4. package/dist/bluepic-embed.umd.js +240 -271
  5. package/dist/c-Bwju34J8.js +176 -0
  6. package/dist/c-CxjdkDqU.cjs +1 -0
  7. package/dist/client-zip-Dl4jBUKQ.cjs +1 -0
  8. package/dist/client-zip-DscsL7SZ.js +254 -0
  9. package/dist/components/BxDatePickerPopover.vue.d.ts +1 -1
  10. package/dist/components/BxInput.vue.d.ts +1 -1
  11. package/dist/components/BxTag.vue.d.ts +1 -1
  12. package/dist/components/TemplateEditor/BatchEditor.vue.d.ts +14 -10
  13. package/dist/components/TemplateEditor/BxTemplateEditor.vue.d.ts +80 -64
  14. package/dist/components/TemplateEditor/TemplateView.vue.d.ts +20 -16
  15. package/dist/cpp-BNKWamrP.js +225 -0
  16. package/dist/cpp-BlYqzAb6.cjs +1 -0
  17. package/dist/css-C6p-exw3.cjs +1 -0
  18. package/dist/css-yWyfM7J9.js +140 -0
  19. package/dist/decompress-3ZSaG6Ii.cjs +15 -0
  20. package/dist/decompress-C88dmWOf.js +643 -0
  21. package/dist/embed/embed.d.ts +4416 -1454
  22. package/dist/go-DnIuztGs.js +140 -0
  23. package/dist/go-RBRkffhh.cjs +1 -0
  24. package/dist/java-CYbswnVa.js +169 -0
  25. package/dist/java-DiqBJCuC.cjs +1 -0
  26. package/dist/javascript-DaG6fU1i.js +436 -0
  27. package/dist/javascript-hWWC5YVO.cjs +1 -0
  28. package/dist/json-CW2SpMXu.cjs +1 -0
  29. package/dist/json-Cu6rbgWf.js +36 -0
  30. package/dist/main.cjs +118 -146
  31. package/dist/main.mjs +73680 -85828
  32. package/dist/markdown-BaDHGYjR.cjs +1 -0
  33. package/dist/markdown-D3Gs6FWn.js +181 -0
  34. package/dist/markdown-it-BOugFJd0.cjs +13 -0
  35. package/dist/markdown-it-bsR6HXzL.js +2875 -0
  36. package/dist/postal-mime-BnhFNwEJ.cjs +28 -0
  37. package/dist/postal-mime-Bsdi2kUR.js +3210 -0
  38. package/dist/python-D1ZXre9G.js +238 -0
  39. package/dist/python-DawLCmeM.cjs +1 -0
  40. package/dist/rolldown-runtime-CEFd7nDs.js +30 -0
  41. package/dist/rolldown-runtime-CPUxUITh.cjs +1 -0
  42. package/dist/rust-B47KpJg8.cjs +1 -0
  43. package/dist/rust-DV3X-6zd.js +169 -0
  44. package/dist/scss-BwEwJffF.cjs +1 -0
  45. package/dist/scss-DVPIh7kT.js +150 -0
  46. package/dist/sql-BsfEDS1M.cjs +1 -0
  47. package/dist/sql-CmVzGP4w.js +118 -0
  48. package/dist/style.css +2 -1
  49. package/dist/theme.cjs +1 -1
  50. package/dist/theme.mjs +1394 -1273
  51. package/dist/typescript-CjqyVRRm.cjs +1 -0
  52. package/dist/typescript-DbET6Hbh.js +521 -0
  53. package/dist/unzipit.module-CWI6YKpy.js +697 -0
  54. package/dist/unzipit.module-DLgVBmhU.cjs +1 -0
  55. package/dist/util/gallery.d.ts +21 -37
  56. package/dist/xlsx-Bm1OL5B8.js +16261 -0
  57. package/dist/xlsx-C9EeNB50.cjs +38 -0
  58. package/dist/xml-Bh8MwSUt.cjs +1 -0
  59. package/dist/xml-Bxh-tO8n.js +166 -0
  60. package/dist/yaml-CIP4hiwy.cjs +1 -0
  61. package/dist/yaml-DT7UV549.js +144 -0
  62. package/package.json +9 -5
  63. package/dist/bash-BHkfQ7MG.cjs +0 -1
  64. package/dist/bash-CPB87Egg.js +0 -377
  65. package/dist/c-B4BAHWS4.cjs +0 -1
  66. package/dist/c-C0DTNf68.js +0 -336
  67. package/dist/cpp-BfO2fOQK.cjs +0 -1
  68. package/dist/cpp-DxGBPWa5.js +0 -538
  69. package/dist/css-Cx1gP-zj.js +0 -934
  70. package/dist/css-DTF39MN3.cjs +0 -1
  71. package/dist/decompress-BGiydwyp.cjs +0 -15
  72. package/dist/decompress-D5RzmD-2.js +0 -566
  73. package/dist/go-By8nj0Vi.cjs +0 -1
  74. package/dist/go-C8VcBUsu.js +0 -156
  75. package/dist/index-C99_zLhc.js +0 -175
  76. package/dist/index-D8N6IfRw.cjs +0 -1
  77. package/dist/java-BoRJOXvw.js +0 -249
  78. package/dist/java-DFXAwvvK.cjs +0 -1
  79. package/dist/javascript-C2jY0XE6.cjs +0 -1
  80. package/dist/javascript-CgRUYx2b.js +0 -660
  81. package/dist/json-C4rahuoJ.cjs +0 -1
  82. package/dist/json-DYK-YbD3.js +0 -44
  83. package/dist/markdown-BmL9j9cU.cjs +0 -1
  84. package/dist/markdown-D19noYwn.js +0 -215
  85. package/dist/markdown-it-5-ieF6Bh.js +0 -3790
  86. package/dist/markdown-it-CLB5Jta6.cjs +0 -16
  87. package/dist/postal-mime-Df-WB8Vq.js +0 -3337
  88. package/dist/postal-mime-_7WF5UBe.cjs +0 -28
  89. package/dist/python-BBUuE3AY.js +0 -404
  90. package/dist/python-Clt6L10q.cjs +0 -1
  91. package/dist/rust-DY-oA2gr.js +0 -319
  92. package/dist/rust-_vvcEGSJ.cjs +0 -1
  93. package/dist/scss-BWo_aR1L.js +0 -919
  94. package/dist/scss-ex7iHSUb.cjs +0 -1
  95. package/dist/sql-BSlOauVK.cjs +0 -1
  96. package/dist/sql-IeKX8fQ8.js +0 -615
  97. package/dist/typescript-BHqLHF13.js +0 -755
  98. package/dist/typescript-DYRnLHqF.cjs +0 -1
  99. package/dist/unzipit.module-4zGfAuq6.cjs +0 -1
  100. package/dist/unzipit.module-qN5XWVVT.js +0 -649
  101. package/dist/xlsx-BopDBbWb.js +0 -24176
  102. package/dist/xlsx-qn1xoUuv.cjs +0 -105
  103. package/dist/xml-Bse49fPV.js +0 -212
  104. package/dist/xml-CVmug_x4.cjs +0 -1
  105. package/dist/yaml-BslECvWp.js +0 -183
  106. package/dist/yaml-C6zsmLZx.cjs +0 -1
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function t(e){const n={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:n,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\b0[bB](_?[01])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:n,illegal:/["']/}]}]}}exports.default=t;
@@ -1,156 +0,0 @@
1
- function r(e) {
2
- const n = {
3
- keyword: [
4
- "break",
5
- "case",
6
- "chan",
7
- "const",
8
- "continue",
9
- "default",
10
- "defer",
11
- "else",
12
- "fallthrough",
13
- "for",
14
- "func",
15
- "go",
16
- "goto",
17
- "if",
18
- "import",
19
- "interface",
20
- "map",
21
- "package",
22
- "range",
23
- "return",
24
- "select",
25
- "struct",
26
- "switch",
27
- "type",
28
- "var"
29
- ],
30
- type: [
31
- "bool",
32
- "byte",
33
- "complex64",
34
- "complex128",
35
- "error",
36
- "float32",
37
- "float64",
38
- "int8",
39
- "int16",
40
- "int32",
41
- "int64",
42
- "string",
43
- "uint8",
44
- "uint16",
45
- "uint32",
46
- "uint64",
47
- "int",
48
- "uint",
49
- "uintptr",
50
- "rune"
51
- ],
52
- literal: [
53
- "true",
54
- "false",
55
- "iota",
56
- "nil"
57
- ],
58
- built_in: [
59
- "append",
60
- "cap",
61
- "close",
62
- "complex",
63
- "copy",
64
- "imag",
65
- "len",
66
- "make",
67
- "new",
68
- "panic",
69
- "print",
70
- "println",
71
- "real",
72
- "recover",
73
- "delete"
74
- ]
75
- };
76
- return {
77
- name: "Go",
78
- aliases: ["golang"],
79
- keywords: n,
80
- illegal: "</",
81
- contains: [
82
- e.C_LINE_COMMENT_MODE,
83
- e.C_BLOCK_COMMENT_MODE,
84
- {
85
- className: "string",
86
- variants: [
87
- e.QUOTE_STRING_MODE,
88
- e.APOS_STRING_MODE,
89
- {
90
- begin: "`",
91
- end: "`"
92
- }
93
- ]
94
- },
95
- {
96
- className: "number",
97
- variants: [
98
- {
99
- match: /-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,
100
- // hex without a present digit before . (making a digit afterwards required)
101
- relevance: 0
102
- },
103
- {
104
- match: /-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,
105
- // hex with a present digit before . (making a digit afterwards optional)
106
- relevance: 0
107
- },
108
- {
109
- match: /-?\b0[oO](_?[0-7])*i?/,
110
- // leading 0o octal
111
- relevance: 0
112
- },
113
- {
114
- match: /-?\b0[bB](_?[01])*i?/,
115
- // leading 0b binary
116
- relevance: 0
117
- },
118
- {
119
- match: /-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,
120
- // decimal without a present digit before . (making a digit afterwards required)
121
- relevance: 0
122
- },
123
- {
124
- match: /-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,
125
- // decimal with a present digit before . (making a digit afterwards optional)
126
- relevance: 0
127
- }
128
- ]
129
- },
130
- {
131
- begin: /:=/
132
- // relevance booster
133
- },
134
- {
135
- className: "function",
136
- beginKeywords: "func",
137
- end: "\\s*(\\{|$)",
138
- excludeEnd: !0,
139
- contains: [
140
- e.TITLE_MODE,
141
- {
142
- className: "params",
143
- begin: /\(/,
144
- end: /\)/,
145
- endsParent: !0,
146
- keywords: n,
147
- illegal: /["']/
148
- }
149
- ]
150
- }
151
- ]
152
- };
153
- }
154
- export {
155
- r as default
156
- };
@@ -1,175 +0,0 @@
1
- "stream" in Blob.prototype || Object.defineProperty(Blob.prototype, "stream", { value() {
2
- return new Response(this).body;
3
- } }), "setBigUint64" in DataView.prototype || Object.defineProperty(DataView.prototype, "setBigUint64", { value(t, n, e) {
4
- const i = Number(0xffffffffn & n), o = Number(n >> 32n);
5
- this.setUint32(t + (e ? 0 : 4), i, e), this.setUint32(t + (e ? 4 : 0), o, e);
6
- } });
7
- var U = (t) => new DataView(new ArrayBuffer(t)), u = (t) => new Uint8Array(t.buffer || t), y = (t) => new TextEncoder().encode(String(t)), c = (t) => Math.min(4294967295, Number(t)), B = (t) => Math.min(65535, Number(t));
8
- function D(t, n, e) {
9
- n === void 0 || n instanceof Date || (n = new Date(n));
10
- const i = t !== void 0;
11
- if (e || (e = i ? 436 : 509), t instanceof File) return { isFile: i, t: n || new Date(t.lastModified), bytes: t.stream(), mode: e };
12
- if (t instanceof Response) return { isFile: i, t: n || new Date(t.headers.get("Last-Modified") || Date.now()), bytes: t.body, mode: e };
13
- if (n === void 0) n = /* @__PURE__ */ new Date();
14
- else if (isNaN(n)) throw new Error("Invalid modification date.");
15
- if (!i) return { isFile: i, t: n, mode: e };
16
- if (typeof t == "string") return { isFile: i, t: n, bytes: y(t), mode: e };
17
- if (t instanceof Blob) return { isFile: i, t: n, bytes: t.stream(), mode: e };
18
- if (t instanceof Uint8Array || t instanceof ReadableStream) return { isFile: i, t: n, bytes: t, mode: e };
19
- if (t instanceof ArrayBuffer || ArrayBuffer.isView(t)) return { isFile: i, t: n, bytes: u(t), mode: e };
20
- if (Symbol.asyncIterator in t) return { isFile: i, t: n, bytes: v(t[Symbol.asyncIterator]()), mode: e };
21
- throw new TypeError("Unsupported input format.");
22
- }
23
- function v(t, n = t) {
24
- return new ReadableStream({ async pull(e) {
25
- let i = 0;
26
- for (; e.desiredSize > i; ) {
27
- const o = await t.next();
28
- if (!o.value) {
29
- e.close();
30
- break;
31
- }
32
- {
33
- const r = S(o.value);
34
- e.enqueue(r), i += r.byteLength;
35
- }
36
- }
37
- }, async cancel(e) {
38
- var i;
39
- await ((i = n.throw) == null ? void 0 : i.call(n, e));
40
- } });
41
- }
42
- function S(t) {
43
- return typeof t == "string" ? y(t) : t instanceof Uint8Array ? t : u(t);
44
- }
45
- function I(t, n, e) {
46
- let [i, o] = function(r) {
47
- return r ? r instanceof Uint8Array ? [r, 1] : ArrayBuffer.isView(r) || r instanceof ArrayBuffer ? [u(r), 1] : [y(r), 0] : [void 0, 0];
48
- }(n);
49
- if (t instanceof File) return { i: w(i || y(t.name)), o: BigInt(t.size), u: o };
50
- if (t instanceof Response) {
51
- const r = t.headers.get("content-disposition"), f = r && r.match(/;\s*filename\*?\s*=\s*(?:UTF-\d+''|)["']?([^;"'\r\n]*)["']?(?:;|$)/i), a = f && f[1] || t.url && new URL(t.url).pathname.split("/").findLast(Boolean), l = a && decodeURIComponent(a), d = e || +t.headers.get("content-length");
52
- return { i: w(i || y(l)), o: BigInt(d), u: o };
53
- }
54
- return i = w(i, t !== void 0 || e !== void 0), typeof t == "string" ? { i, o: BigInt(y(t).length), u: o } : t instanceof Blob ? { i, o: BigInt(t.size), u: o } : t instanceof ArrayBuffer || ArrayBuffer.isView(t) ? { i, o: BigInt(t.byteLength), u: o } : { i, o: R(t, e), u: o };
55
- }
56
- function R(t, n) {
57
- return n > -1 ? BigInt(n) : t ? void 0 : 0n;
58
- }
59
- function w(t, n = 1) {
60
- if (!t || t.every((e) => e === 47)) throw new Error("The file must have a name.");
61
- if (n) for (; t[t.length - 1] === 47; ) t = t.subarray(0, -1);
62
- else t[t.length - 1] !== 47 && (t = new Uint8Array([...t, 47]));
63
- return t;
64
- }
65
- var F = new Uint32Array(256);
66
- for (let t = 0; t < 256; ++t) {
67
- let n = t;
68
- for (let e = 0; e < 8; ++e) n = n >>> 1 ^ (1 & n && 3988292384);
69
- F[t] = n;
70
- }
71
- function b(t, n = 0) {
72
- n = ~n;
73
- for (var e = 0, i = t.length; e < i; e++) n = n >>> 8 ^ F[255 & n ^ t[e]];
74
- return ~n >>> 0;
75
- }
76
- function A(t, n, e = 0) {
77
- const i = t.getSeconds() >> 1 | t.getMinutes() << 5 | t.getHours() << 11, o = t.getDate() | t.getMonth() + 1 << 5 | t.getFullYear() - 1980 << 9;
78
- n.setUint16(e, i, 1), n.setUint16(e + 2, o, 1);
79
- }
80
- function L({ i: t, u: n }, e) {
81
- return 8 * (!n || (e ?? function(i) {
82
- try {
83
- M.decode(i);
84
- } catch {
85
- return 0;
86
- }
87
- return 1;
88
- }(t)));
89
- }
90
- var M = new TextDecoder("utf8", { fatal: 1 });
91
- function N(t, n = 0) {
92
- const e = U(30);
93
- return e.setUint32(0, 1347093252), e.setUint32(4, 754976768 | n), A(t.t, e, 10), e.setUint16(26, t.i.length, 1), u(e);
94
- }
95
- async function* T(t) {
96
- let { bytes: n } = t;
97
- if ("then" in n && (n = await n), n instanceof Uint8Array) yield n, t.l = b(n, 0), t.o = BigInt(n.length);
98
- else {
99
- t.o = 0n;
100
- const e = n.getReader();
101
- for (; ; ) {
102
- const { value: i, done: o } = await e.read();
103
- if (o) break;
104
- t.l = b(i, t.l), t.o += BigInt(i.length), yield i;
105
- }
106
- }
107
- }
108
- function E(t, n) {
109
- const e = U(16 + (n ? 8 : 0));
110
- return e.setUint32(0, 1347094280), e.setUint32(4, t.isFile ? t.l : 0, 1), n ? (e.setBigUint64(8, t.o, 1), e.setBigUint64(16, t.o, 1)) : (e.setUint32(8, c(t.o), 1), e.setUint32(12, c(t.o), 1)), u(e);
111
- }
112
- function z(t, n, e = 0, i = 0) {
113
- const o = U(46);
114
- return o.setUint32(0, 1347092738), o.setUint32(4, 755182848), o.setUint16(8, 2048 | e), A(t.t, o, 12), o.setUint32(16, t.isFile ? t.l : 0, 1), o.setUint32(20, c(t.o), 1), o.setUint32(24, c(t.o), 1), o.setUint16(28, t.i.length, 1), o.setUint16(30, i, 1), o.setUint16(40, t.mode | (t.isFile ? 32768 : 16384), 1), o.setUint32(42, c(n), 1), u(o);
115
- }
116
- function V(t, n, e) {
117
- const i = U(e);
118
- return i.setUint16(0, 1, 1), i.setUint16(2, e - 4, 1), 16 & e && (i.setBigUint64(4, t.o, 1), i.setBigUint64(12, t.o, 1)), i.setBigUint64(e - 8, n, 1), u(i);
119
- }
120
- function x(t) {
121
- return t instanceof File || t instanceof Response ? [[t], [t]] : [[t.input, t.name, t.size], [t.input, t.lastModified, t.mode]];
122
- }
123
- var C = (t) => function(n) {
124
- let e = BigInt(22), i = 0n, o = 0;
125
- for (const r of n) {
126
- if (!r.i) throw new Error("Every file must have a non-empty name.");
127
- if (r.o === void 0) throw new Error(`Missing size for file "${new TextDecoder().decode(r.i)}".`);
128
- const f = r.o >= 0xffffffffn, a = i >= 0xffffffffn;
129
- i += BigInt(46 + r.i.length + (f && 8)) + r.o, e += BigInt(r.i.length + 46 + (12 * a | 28 * f)), o || (o = f);
130
- }
131
- return (o || i >= 0xffffffffn) && (e += BigInt(76)), e + i;
132
- }(function* (n) {
133
- for (const e of n) yield I(...x(e)[0]);
134
- }(t));
135
- function k(t, n = {}) {
136
- const e = { "Content-Type": "application/zip", "Content-Disposition": "attachment" };
137
- return (typeof n.length == "bigint" || Number.isInteger(n.length)) && n.length > 0 && (e["Content-Length"] = String(n.length)), n.metadata && (e["Content-Length"] = String(C(n.metadata))), new Response(j(t, n), { headers: e });
138
- }
139
- function j(t, n = {}) {
140
- const e = function(i) {
141
- var r;
142
- const o = i[Symbol.iterator in i ? Symbol.iterator : Symbol.asyncIterator]();
143
- return { async next() {
144
- const f = await o.next();
145
- if (f.done) return f;
146
- const [a, l] = x(f.value);
147
- return { done: 0, value: Object.assign(D(...l), I(...a)) };
148
- }, throw: (r = o.throw) == null ? void 0 : r.bind(o), [Symbol.asyncIterator]() {
149
- return this;
150
- } };
151
- }(t);
152
- return v(async function* (i, o) {
153
- const r = [];
154
- let f = 0n, a = 0n, l = 0;
155
- for await (const s of i) {
156
- const p = L(s, o.buffersAreUTF8);
157
- yield N(s, p), yield new Uint8Array(s.i), s.isFile && (yield* T(s));
158
- const h = s.o >= 0xffffffffn, m = 12 * (f >= 0xffffffffn) | 28 * h;
159
- yield E(s, h), r.push(z(s, f, p, m)), r.push(s.i), m && r.push(V(s, f, m)), h && (f += 8n), a++, f += BigInt(46 + s.i.length) + s.o, l || (l = h);
160
- }
161
- let d = 0n;
162
- for (const s of r) yield s, d += BigInt(s.length);
163
- if (l || f >= 0xffffffffn) {
164
- const s = U(76);
165
- s.setUint32(0, 1347094022), s.setBigUint64(4, BigInt(44), 1), s.setUint32(12, 755182848), s.setBigUint64(24, a, 1), s.setBigUint64(32, a, 1), s.setBigUint64(40, d, 1), s.setBigUint64(48, f, 1), s.setUint32(56, 1347094023), s.setBigUint64(64, f + d, 1), s.setUint32(72, 1, 1), yield u(s);
166
- }
167
- const g = U(22);
168
- g.setUint32(0, 1347093766), g.setUint16(8, B(a), 1), g.setUint16(10, B(a), 1), g.setUint32(12, c(d), 1), g.setUint32(16, c(f), 1), yield u(g);
169
- }(e, n), e);
170
- }
171
- export {
172
- k as downloadZip,
173
- j as makeZip,
174
- C as predictLength
175
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});"stream"in Blob.prototype||Object.defineProperty(Blob.prototype,"stream",{value(){return new Response(this).body}}),"setBigUint64"in DataView.prototype||Object.defineProperty(DataView.prototype,"setBigUint64",{value(t,n,e){const i=Number(0xffffffffn&n),o=Number(n>>32n);this.setUint32(t+(e?0:4),i,e),this.setUint32(t+(e?4:0),o,e)}});var U=t=>new DataView(new ArrayBuffer(t)),u=t=>new Uint8Array(t.buffer||t),y=t=>new TextEncoder().encode(String(t)),c=t=>Math.min(4294967295,Number(t)),b=t=>Math.min(65535,Number(t));function R(t,n,e){n===void 0||n instanceof Date||(n=new Date(n));const i=t!==void 0;if(e||(e=i?436:509),t instanceof File)return{isFile:i,t:n||new Date(t.lastModified),bytes:t.stream(),mode:e};if(t instanceof Response)return{isFile:i,t:n||new Date(t.headers.get("Last-Modified")||Date.now()),bytes:t.body,mode:e};if(n===void 0)n=new Date;else if(isNaN(n))throw new Error("Invalid modification date.");if(!i)return{isFile:i,t:n,mode:e};if(typeof t=="string")return{isFile:i,t:n,bytes:y(t),mode:e};if(t instanceof Blob)return{isFile:i,t:n,bytes:t.stream(),mode:e};if(t instanceof Uint8Array||t instanceof ReadableStream)return{isFile:i,t:n,bytes:t,mode:e};if(t instanceof ArrayBuffer||ArrayBuffer.isView(t))return{isFile:i,t:n,bytes:u(t),mode:e};if(Symbol.asyncIterator in t)return{isFile:i,t:n,bytes:v(t[Symbol.asyncIterator]()),mode:e};throw new TypeError("Unsupported input format.")}function v(t,n=t){return new ReadableStream({async pull(e){let i=0;for(;e.desiredSize>i;){const o=await t.next();if(!o.value){e.close();break}{const r=M(o.value);e.enqueue(r),i+=r.byteLength}}},async cancel(e){var i;await((i=n.throw)==null?void 0:i.call(n,e))}})}function M(t){return typeof t=="string"?y(t):t instanceof Uint8Array?t:u(t)}function I(t,n,e){let[i,o]=function(r){return r?r instanceof Uint8Array?[r,1]:ArrayBuffer.isView(r)||r instanceof ArrayBuffer?[u(r),1]:[y(r),0]:[void 0,0]}(n);if(t instanceof File)return{i:w(i||y(t.name)),o:BigInt(t.size),u:o};if(t instanceof Response){const r=t.headers.get("content-disposition"),f=r&&r.match(/;\s*filename\*?\s*=\s*(?:UTF-\d+''|)["']?([^;"'\r\n]*)["']?(?:;|$)/i),a=f&&f[1]||t.url&&new URL(t.url).pathname.split("/").findLast(Boolean),l=a&&decodeURIComponent(a),d=e||+t.headers.get("content-length");return{i:w(i||y(l)),o:BigInt(d),u:o}}return i=w(i,t!==void 0||e!==void 0),typeof t=="string"?{i,o:BigInt(y(t).length),u:o}:t instanceof Blob?{i,o:BigInt(t.size),u:o}:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?{i,o:BigInt(t.byteLength),u:o}:{i,o:T(t,e),u:o}}function T(t,n){return n>-1?BigInt(n):t?void 0:0n}function w(t,n=1){if(!t||t.every(e=>e===47))throw new Error("The file must have a name.");if(n)for(;t[t.length-1]===47;)t=t.subarray(0,-1);else t[t.length-1]!==47&&(t=new Uint8Array([...t,47]));return t}var F=new Uint32Array(256);for(let t=0;t<256;++t){let n=t;for(let e=0;e<8;++e)n=n>>>1^(1&n&&3988292384);F[t]=n}function B(t,n=0){n=~n;for(var e=0,i=t.length;e<i;e++)n=n>>>8^F[255&n^t[e]];return~n>>>0}function A(t,n,e=0){const i=t.getSeconds()>>1|t.getMinutes()<<5|t.getHours()<<11,o=t.getDate()|t.getMonth()+1<<5|t.getFullYear()-1980<<9;n.setUint16(e,i,1),n.setUint16(e+2,o,1)}function L({i:t,u:n},e){return 8*(!n||(e??function(i){try{N.decode(i)}catch{return 0}return 1}(t)))}var N=new TextDecoder("utf8",{fatal:1});function E(t,n=0){const e=U(30);return e.setUint32(0,1347093252),e.setUint32(4,754976768|n),A(t.t,e,10),e.setUint16(26,t.i.length,1),u(e)}async function*z(t){let{bytes:n}=t;if("then"in n&&(n=await n),n instanceof Uint8Array)yield n,t.l=B(n,0),t.o=BigInt(n.length);else{t.o=0n;const e=n.getReader();for(;;){const{value:i,done:o}=await e.read();if(o)break;t.l=B(i,t.l),t.o+=BigInt(i.length),yield i}}}function V(t,n){const e=U(16+(n?8:0));return e.setUint32(0,1347094280),e.setUint32(4,t.isFile?t.l:0,1),n?(e.setBigUint64(8,t.o,1),e.setBigUint64(16,t.o,1)):(e.setUint32(8,c(t.o),1),e.setUint32(12,c(t.o),1)),u(e)}function C(t,n,e=0,i=0){const o=U(46);return o.setUint32(0,1347092738),o.setUint32(4,755182848),o.setUint16(8,2048|e),A(t.t,o,12),o.setUint32(16,t.isFile?t.l:0,1),o.setUint32(20,c(t.o),1),o.setUint32(24,c(t.o),1),o.setUint16(28,t.i.length,1),o.setUint16(30,i,1),o.setUint16(40,t.mode|(t.isFile?32768:16384),1),o.setUint32(42,c(n),1),u(o)}function j(t,n,e){const i=U(e);return i.setUint16(0,1,1),i.setUint16(2,e-4,1),16&e&&(i.setBigUint64(4,t.o,1),i.setBigUint64(12,t.o,1)),i.setBigUint64(e-8,n,1),u(i)}function S(t){return t instanceof File||t instanceof Response?[[t],[t]]:[[t.input,t.name,t.size],[t.input,t.lastModified,t.mode]]}var D=t=>function(n){let e=BigInt(22),i=0n,o=0;for(const r of n){if(!r.i)throw new Error("Every file must have a non-empty name.");if(r.o===void 0)throw new Error(`Missing size for file "${new TextDecoder().decode(r.i)}".`);const f=r.o>=0xffffffffn,a=i>=0xffffffffn;i+=BigInt(46+r.i.length+(f&&8))+r.o,e+=BigInt(r.i.length+46+(12*a|28*f)),o||(o=f)}return(o||i>=0xffffffffn)&&(e+=BigInt(76)),e+i}(function*(n){for(const e of n)yield I(...S(e)[0])}(t));function O(t,n={}){const e={"Content-Type":"application/zip","Content-Disposition":"attachment"};return(typeof n.length=="bigint"||Number.isInteger(n.length))&&n.length>0&&(e["Content-Length"]=String(n.length)),n.metadata&&(e["Content-Length"]=String(D(n.metadata))),new Response(x(t,n),{headers:e})}function x(t,n={}){const e=function(i){var r;const o=i[Symbol.iterator in i?Symbol.iterator:Symbol.asyncIterator]();return{async next(){const f=await o.next();if(f.done)return f;const[a,l]=S(f.value);return{done:0,value:Object.assign(R(...l),I(...a))}},throw:(r=o.throw)==null?void 0:r.bind(o),[Symbol.asyncIterator](){return this}}}(t);return v(async function*(i,o){const r=[];let f=0n,a=0n,l=0;for await(const s of i){const p=L(s,o.buffersAreUTF8);yield E(s,p),yield new Uint8Array(s.i),s.isFile&&(yield*z(s));const h=s.o>=0xffffffffn,m=12*(f>=0xffffffffn)|28*h;yield V(s,h),r.push(C(s,f,p,m)),r.push(s.i),m&&r.push(j(s,f,m)),h&&(f+=8n),a++,f+=BigInt(46+s.i.length)+s.o,l||(l=h)}let d=0n;for(const s of r)yield s,d+=BigInt(s.length);if(l||f>=0xffffffffn){const s=U(76);s.setUint32(0,1347094022),s.setBigUint64(4,BigInt(44),1),s.setUint32(12,755182848),s.setBigUint64(24,a,1),s.setBigUint64(32,a,1),s.setBigUint64(40,d,1),s.setBigUint64(48,f,1),s.setUint32(56,1347094023),s.setBigUint64(64,f+d,1),s.setUint32(72,1,1),yield u(s)}const g=U(22);g.setUint32(0,1347093766),g.setUint16(8,b(a),1),g.setUint16(10,b(a),1),g.setUint32(12,c(d),1),g.setUint32(16,c(f),1),yield u(g)}(e,n),e)}exports.downloadZip=O;exports.makeZip=x;exports.predictLength=D;
@@ -1,249 +0,0 @@
1
- var a = "[0-9](_*[0-9])*", c = `\\.(${a})`, i = "[0-9a-fA-F](_*[0-9a-fA-F])*", l = {
2
- className: "number",
3
- variants: [
4
- // DecimalFloatingPointLiteral
5
- // including ExponentPart
6
- { begin: `(\\b(${a})((${c})|\\.)?|(${c}))[eE][+-]?(${a})[fFdD]?\\b` },
7
- // excluding ExponentPart
8
- { begin: `\\b(${a})((${c})[fFdD]?\\b|\\.([fFdD]\\b)?)` },
9
- { begin: `(${c})[fFdD]?\\b` },
10
- { begin: `\\b(${a})[fFdD]\\b` },
11
- // HexadecimalFloatingPointLiteral
12
- { begin: `\\b0[xX]((${i})\\.?|(${i})?\\.(${i}))[pP][+-]?(${a})[fFdD]?\\b` },
13
- // DecimalIntegerLiteral
14
- { begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" },
15
- // HexIntegerLiteral
16
- { begin: `\\b0[xX](${i})[lL]?\\b` },
17
- // OctalIntegerLiteral
18
- { begin: "\\b0(_*[0-7])*[lL]?\\b" },
19
- // BinaryIntegerLiteral
20
- { begin: "\\b0[bB][01](_*[01])*[lL]?\\b" }
21
- ],
22
- relevance: 0
23
- };
24
- function O(e, s, n) {
25
- return n === -1 ? "" : e.replace(s, (t) => O(e, s, n - 1));
26
- }
27
- function A(e) {
28
- const s = e.regex, n = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", t = "(?:(?:\\s*\\[\\s*])+)?", o = n + "<@@@>" + t, _ = "(?:" + ("\\?(?:\\s+(?:extends|super)\\s+" + o + ")?") + "|" + o + ")", E = O(
29
- "(?:\\s*<\\s*" + _ + "(?:\\s*,\\s*" + _ + ")*\\s*>)?",
30
- /<@@@>/g,
31
- 2
32
- ), r = {
33
- keyword: [
34
- "synchronized",
35
- "abstract",
36
- "private",
37
- "var",
38
- "static",
39
- "if",
40
- "const ",
41
- "for",
42
- "while",
43
- "strictfp",
44
- "finally",
45
- "protected",
46
- "import",
47
- "native",
48
- "final",
49
- "void",
50
- "enum",
51
- "else",
52
- "break",
53
- "transient",
54
- "catch",
55
- "instanceof",
56
- "volatile",
57
- "case",
58
- "assert",
59
- "package",
60
- "default",
61
- "public",
62
- "try",
63
- "switch",
64
- "continue",
65
- "throws",
66
- "protected",
67
- "public",
68
- "private",
69
- "module",
70
- "requires",
71
- "exports",
72
- "do",
73
- "sealed",
74
- "yield",
75
- "permits",
76
- "goto",
77
- "when"
78
- ],
79
- literal: [
80
- "false",
81
- "true",
82
- "null"
83
- ],
84
- type: [
85
- "char",
86
- "boolean",
87
- "long",
88
- "float",
89
- "int",
90
- "byte",
91
- "short",
92
- "double"
93
- ],
94
- built_in: [
95
- "super",
96
- "this"
97
- ]
98
- }, b = {
99
- className: "meta",
100
- begin: "@" + n,
101
- contains: [
102
- {
103
- begin: /\(/,
104
- end: /\)/,
105
- contains: ["self"]
106
- // allow nested () inside our annotation
107
- }
108
- ]
109
- }, d = {
110
- className: "params",
111
- begin: /\(/,
112
- end: /\)/,
113
- keywords: r,
114
- relevance: 0,
115
- contains: [e.C_BLOCK_COMMENT_MODE],
116
- endsParent: !0
117
- };
118
- return {
119
- name: "Java",
120
- aliases: ["jsp"],
121
- keywords: r,
122
- illegal: /<\/|#/,
123
- contains: [
124
- e.COMMENT(
125
- "/\\*\\*",
126
- "\\*/",
127
- {
128
- relevance: 0,
129
- contains: [
130
- {
131
- // eat up @'s in emails to prevent them to be recognized as doctags
132
- begin: /\w+@/,
133
- relevance: 0
134
- },
135
- {
136
- className: "doctag",
137
- begin: "@[A-Za-z]+"
138
- }
139
- ]
140
- }
141
- ),
142
- // relevance boost
143
- {
144
- begin: /import java\.[a-z]+\./,
145
- keywords: "import",
146
- relevance: 2
147
- },
148
- e.C_LINE_COMMENT_MODE,
149
- e.C_BLOCK_COMMENT_MODE,
150
- {
151
- begin: /"""/,
152
- end: /"""/,
153
- className: "string",
154
- contains: [e.BACKSLASH_ESCAPE]
155
- },
156
- e.APOS_STRING_MODE,
157
- e.QUOTE_STRING_MODE,
158
- {
159
- match: [
160
- /\b(?:class|interface|enum|extends|implements|new)/,
161
- /\s+/,
162
- n
163
- ],
164
- className: {
165
- 1: "keyword",
166
- 3: "title.class"
167
- }
168
- },
169
- {
170
- // Exceptions for hyphenated keywords
171
- match: /non-sealed/,
172
- scope: "keyword"
173
- },
174
- {
175
- // Expression keywords prevent keyword-led expressions from being
176
- // recognized as variable or method declarations.
177
- beginKeywords: "new throw return else yield assert",
178
- relevance: 0
179
- },
180
- {
181
- begin: [
182
- n,
183
- s.concat(E, t, /\s+/),
184
- n,
185
- t,
186
- /\s*/,
187
- /=(?!=)/
188
- ],
189
- className: {
190
- 1: "type",
191
- 3: "variable",
192
- 6: "operator"
193
- }
194
- },
195
- {
196
- begin: [
197
- /record/,
198
- /\s+/,
199
- n
200
- ],
201
- className: {
202
- 1: "keyword",
203
- 3: "title.class"
204
- },
205
- contains: [
206
- d,
207
- e.C_LINE_COMMENT_MODE,
208
- e.C_BLOCK_COMMENT_MODE
209
- ]
210
- },
211
- {
212
- begin: [
213
- n,
214
- s.concat(E, t, /\s+/),
215
- n,
216
- /\s*(?=\()/
217
- ],
218
- className: {
219
- 1: "type",
220
- 3: "title.function"
221
- },
222
- keywords: r,
223
- contains: [
224
- {
225
- className: "params",
226
- begin: /\(/,
227
- end: /\)/,
228
- keywords: r,
229
- relevance: 0,
230
- contains: [
231
- b,
232
- e.APOS_STRING_MODE,
233
- e.QUOTE_STRING_MODE,
234
- l,
235
- e.C_BLOCK_COMMENT_MODE
236
- ]
237
- },
238
- e.C_LINE_COMMENT_MODE,
239
- e.C_BLOCK_COMMENT_MODE
240
- ]
241
- },
242
- l,
243
- b
244
- ]
245
- };
246
- }
247
- export {
248
- A as default
249
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var a="[0-9](_*[0-9])*",i=`\\.(${a})`,c="[0-9a-fA-F](_*[0-9a-fA-F])*",E={className:"number",variants:[{begin:`(\\b(${a})((${i})|\\.)?|(${i}))[eE][+-]?(${a})[fFdD]?\\b`},{begin:`\\b(${a})((${i})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${i})[fFdD]?\\b`},{begin:`\\b(${a})[fFdD]\\b`},{begin:`\\b0[xX]((${c})\\.?|(${c})?\\.(${c}))[pP][+-]?(${a})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${c})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function d(e,t,n){return n===-1?"":e.replace(t,s=>d(e,t,n-1))}function N(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",s="(?:(?:\\s*\\[\\s*])+)?",o=n+"<@@@>"+s,_="(?:"+("\\?(?:\\s+(?:extends|super)\\s+"+o+")?")+"|"+o+")",b=d("(?:\\s*<\\s*"+_+"(?:\\s*,\\s*"+_+")*\\s*>)?",/<@@@>/g,2),r={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},l={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},O={className:"params",begin:/\(/,end:/\)/,keywords:r,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:r,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{beginKeywords:"new throw return else yield assert",relevance:0},{begin:[n,t.concat(b,s,/\s+/),n,s,/\s*/,/=(?!=)/],className:{1:"type",3:"variable",6:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[O,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{begin:[n,t.concat(b,s,/\s+/),n,/\s*(?=\()/],className:{1:"type",3:"title.function"},keywords:r,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:r,relevance:0,contains:[l,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,E,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},E,l]}}exports.default=N;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p="[A-Za-z$_][0-9A-Za-z$_]*",G=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],K=["true","false","null","undefined","NaN","Infinity"],v=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],L=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],w=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],H=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","self","global"],J=[].concat(w,v,L);function W(e){const a=e.regex,B=(t,{after:r})=>{const l="</"+t[0].slice(1);return t.input.indexOf(l,r)!==-1},n=p,A={begin:"<>",end:"</>"},h=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(t,r)=>{const l=t[0].length+t.index,d=t.input[l];if(d==="<"||d===","){r.ignoreMatch();return}d===">"&&(B(t,{after:l})||r.ignoreMatch());let u;const M=t.input.substring(l);if(u=M.match(/^\s*=/)){r.ignoreMatch();return}if((u=M.match(/^\s+extends\s+/))&&u.index===0){r.ignoreMatch();return}}},s={$pattern:p,keyword:G,literal:K,built_in:J,"variable.language":H},_="[0-9](_?[0-9])*",E=`\\.(${_})`,N="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",S={className:"number",variants:[{begin:`(\\b(${N})((${E})|\\.)?|(${E}))[eE][+-]?(${_})\\b`},{begin:`\\b(${N})\\b((${E})\\b|\\.)?|(${E})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},c={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},m={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"xml"}},T={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"css"}},f={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,c],subLanguage:"graphql"}},R={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,c]},g={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},y=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,T,f,R,{match:/\$\d+/},S];c.contains=y.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(y)});const I=[].concat(g,c.contains),b=I.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:["self"].concat(I)}]),i={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b},U={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,a.concat(n,"(",a.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},O={relevance:0,match:a.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...v,...L]}},x={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},D={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[i],illegal:/%/},k={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function P(t){return a.concat("(?!",t.join("|"),")")}const $={match:a.concat(/\b/,P([...w,"super","import","await"].map(t=>`${t}\\s*\\(`)),n,a.lookahead(/\s*\(/)),className:"title.function",relevance:0},Z={begin:a.concat(/\./,a.lookahead(a.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},F={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},i]},C="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",z={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,a.lookahead(C)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[i]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:b,CLASS_REFERENCE:O},illegal:/#(?![$_A-Za-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),x,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,T,f,R,g,{match:/\$\d+/},S,O,{scope:"attr",match:n+a.lookahead(":"),relevance:0},z,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[g,e.REGEXP_MODE,{className:"function",begin:C,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:b}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:A.begin,end:A.end},{match:h},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},D,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[i,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},Z,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[i]},$,k,U,F,{match:/\$[(.]/}]}}exports.default=W;