@factorialco/f0-react 12.10.0 → 12.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/ArchiveThumbnail-cs8kx5Zf.js +70 -0
  2. package/dist/ArchiveViewer-BXUH8Lm5.js +172 -0
  3. package/dist/{ChatPostComposerDialog-DcmLrQk6.js → ChatPostComposerDialog-CGil1xkf.js} +4 -4
  4. package/dist/{CoachmarkProvider-XfLjB3dH.js → CoachmarkProvider-cZnuTk79.js} +29938 -29932
  5. package/dist/CodeThumbnail-Dcer4AyK.js +31 -0
  6. package/dist/CodeViewer-DFBwdIFm.js +98 -0
  7. package/dist/DocumentToolbar-vZEyzJ89.js +74 -0
  8. package/dist/{DocxThumbnail-kHTNnwW0.js → DocxThumbnail-CK9vFoTB.js} +2 -2
  9. package/dist/{DocxViewer-CqHgSExq.js → DocxViewer-DQV5Kv1n.js} +25 -23
  10. package/dist/ExternalLink-RdKU698E.js +22 -0
  11. package/dist/{F0AiProcessingOverlay-H23WHd7F.js → F0AiProcessingOverlay-DjGkQ2Nc.js} +1349 -1345
  12. package/dist/{popover-BjrPOMeQ.js → F0Button-FXkThQ9H.js} +3164 -8587
  13. package/dist/{F0CanvasPanel--hLKeQvg.js → F0CanvasPanel-BgDo2LWP.js} +9436 -9008
  14. package/dist/F0DocumentViewer-BXifXzUW.js +79 -0
  15. package/dist/F0DocumentViewer-DWuIFBHu.js +3 -0
  16. package/dist/F0Icon-Cj0USbCF.js +202 -0
  17. package/dist/{F0Map-hvgCUGk8.js → F0Map-Dwev4u-_.js} +189 -188
  18. package/dist/{F0Select-B-ZxVjXG.js → F0Select-BWWdEd7l.js} +6696 -6726
  19. package/dist/{F0Text-D92NWQRd.js → F0Text-DMZW7dhN.js} +25 -41
  20. package/dist/{F0VideoPlayer-CNp5hXgp.js → F0VideoPlayer-BmCmHG87.js} +412 -408
  21. package/dist/F0VideoPlayer-C8oYUUZM.js +1 -0
  22. package/dist/HtmlThumbnail-BAgkBH2r.js +60 -0
  23. package/dist/HtmlViewer-FRfNoxhP.js +208 -0
  24. package/dist/LockLocked-gdodYvT_.js +41 -0
  25. package/dist/{Map-eIXVKc1x.js → Map-BxGPElF2.js} +57 -54
  26. package/dist/{PdfThumbnail-CCSmwxQU.js → PdfThumbnail-CpGZz5Kq.js} +5 -5
  27. package/dist/PdfViewer-C81MK43i.js +296 -0
  28. package/dist/SandboxedHtmlFrame-B6YWhgyg.js +309 -0
  29. package/dist/{SheetViewer-BN5UYkEZ.js → SheetViewer-DPGpMNqq.js} +36 -26
  30. package/dist/TextThumbnail-DKNxh344.js +15 -0
  31. package/dist/{TextViewer-Bt0_dYB-.js → TextViewer-BH42AeG8.js} +44 -41
  32. package/dist/ai.d.ts +3 -3
  33. package/dist/ai.js +5 -5
  34. package/dist/bash-BcZBmoDA.js +169 -0
  35. package/dist/c-Dv-5_kUQ.js +187 -0
  36. package/dist/component-status.js +2 -2
  37. package/dist/core-C0MCmPil.js +842 -0
  38. package/dist/cpp-CMQhucZt.js +236 -0
  39. package/dist/csharp-CuDKSCf2.js +260 -0
  40. package/dist/css-Dta7Q4Li.js +145 -0
  41. package/dist/dart-po7Eq73d.js +134 -0
  42. package/dist/diff-IgsQP-8T.js +39 -0
  43. package/dist/dist-D-MJbPvE.js +59 -0
  44. package/dist/dockerfile-B4Bz9I5u.js +34 -0
  45. package/dist/dos-1TcyLtUq.js +57 -0
  46. package/dist/elixir-BnEjyLGa.js +189 -0
  47. package/dist/erlang-tgri7ZSv.js +218 -0
  48. package/dist/experimental.d.ts +24 -4
  49. package/dist/experimental.js +2711 -2702
  50. package/dist/{exports-BByQBwpi.d.ts → exports-C0yM5usu.d.ts} +1 -1
  51. package/dist/f0.d.ts +130 -8
  52. package/dist/f0.js +751 -745
  53. package/dist/fetchText-o_GOtiv3.js +54 -0
  54. package/dist/go-CEVmppuo.js +144 -0
  55. package/dist/graphql-BWwc-u8d.js +67 -0
  56. package/dist/groovy-BELuqtd6.js +127 -0
  57. package/dist/haskell-Cxh7aaFM.js +138 -0
  58. package/dist/highlight-CyebkDAD.js +114 -0
  59. package/dist/i18n-provider-BBhzYHef.js +150 -0
  60. package/dist/{i18n-provider-defaults-p0UGTA_k.js → i18n-provider-defaults-BUagKwGN.js} +32 -1
  61. package/dist/{i18n-provider-defaults-DQxuUMpU.d.ts → i18n-provider-defaults-CTDMMs-y.d.ts} +31 -0
  62. package/dist/i18n-provider-defaults.d.ts +1 -1
  63. package/dist/i18n-provider-defaults.js +1 -1
  64. package/dist/{index-D3nEDg8x.d.ts → index-CduxMW5L.d.ts} +1 -1
  65. package/dist/ini-DA-F0rRr.js +88 -0
  66. package/dist/java-Bujnoc_f.js +174 -0
  67. package/dist/javascript-BeEhpXRE.js +431 -0
  68. package/dist/json-CxvE7tEw.js +42 -0
  69. package/dist/kotlin-DOwDGI_m.js +206 -0
  70. package/dist/less-DWlR-e-o.js +196 -0
  71. package/dist/lua-BlZiakwh.js +46 -0
  72. package/dist/makefile-D3841Yg4.js +57 -0
  73. package/dist/{maplibre-Bywi9z2G.js → maplibre-g-8NG-3q.js} +1 -1
  74. package/dist/markdown-D1wNG79U.js +178 -0
  75. package/dist/objectivec-DxtRzTBy.js +117 -0
  76. package/dist/ownValue-D4uSXt0d.js +4 -0
  77. package/dist/{pdfWorker-CKgxOaCl.js → pdfWorker-D5NB2V5s.js} +12 -9
  78. package/dist/pdfWorkerConfig-BwllKt1K.js +8 -0
  79. package/dist/perl-BWRmkuyz.js +192 -0
  80. package/dist/php-CjwybYSP.js +300 -0
  81. package/dist/popover-CQztsDta.js +4486 -0
  82. package/dist/{posts-DGtDUrKT.js → posts-BHRBUAYJ.js} +2 -0
  83. package/dist/powershell-CgKcNA5Q.js +188 -0
  84. package/dist/properties-Bc45MTzW.js +38 -0
  85. package/dist/protobuf-Bv_xSUaI.js +61 -0
  86. package/dist/purify.es-ZpfdAuNV.js +545 -0
  87. package/dist/python-D8PdGjgy.js +238 -0
  88. package/dist/r-DA-9ZIdU.js +140 -0
  89. package/dist/{renderDocx-_UmnE-yc.js → renderDocx-BW-uDyaZ.js} +2 -0
  90. package/dist/ruby-Bqr16BpN.js +262 -0
  91. package/dist/rust-BCvJMwk8.js +182 -0
  92. package/dist/scala-Du8mOD2z.js +162 -0
  93. package/dist/scss-AMxHqh46.js +155 -0
  94. package/dist/skeleton-DqejhQgn.js +72 -0
  95. package/dist/sql-BbYSgcOA.js +118 -0
  96. package/dist/styles.css +1 -1
  97. package/dist/swift-DRKtalPn.js +575 -0
  98. package/dist/toolbarStyles-0IygMI4H.js +52 -0
  99. package/dist/{types-UMYBr8Mi.d.ts → types-DlwD3i9z.d.ts} +3 -95
  100. package/dist/typescript-Bv8uKU6V.js +516 -0
  101. package/dist/{useData-B7LYSzh0.js → useData-Dkq5W4r6.js} +4917 -4876
  102. package/dist/useFetchedText-BR3_KLXx.js +38 -0
  103. package/dist/useThumbnailText-DwXQvLIe.js +22 -0
  104. package/dist/xml-BVpP05uE.js +162 -0
  105. package/dist/yaml-BNe2WG-i.js +144 -0
  106. package/dist/zipTree-B2zUYl6b.js +247 -0
  107. package/package.json +2 -1
  108. package/dist/DocumentToolbar-CqbY6eID.js +0 -70
  109. package/dist/F0DocumentViewer-BN-2IVgz.js +0 -400
  110. package/dist/F0DocumentViewer-D1G3M2J_.js +0 -3
  111. package/dist/F0VideoPlayer-D4bZBBLK.js +0 -1
  112. package/dist/TextThumbnail-X04JgaNI.js +0 -26
  113. package/dist/dist-DvxtFKDL.js +0 -78
@@ -0,0 +1,842 @@
1
+ import { o as e, t } from "./rolldown-runtime-BItFwnF5.js";
2
+ var n = (/* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
3
+ function n(e) {
4
+ return e instanceof Map ? e.clear = e.delete = e.set = function() {
5
+ throw Error("map is read-only");
6
+ } : e instanceof Set && (e.add = e.clear = e.delete = function() {
7
+ throw Error("set is read-only");
8
+ }), Object.freeze(e), Object.getOwnPropertyNames(e).forEach((t) => {
9
+ let r = e[t], i = typeof r;
10
+ (i === "object" || i === "function") && !Object.isFrozen(r) && n(r);
11
+ }), e;
12
+ }
13
+ var r = class {
14
+ constructor(e) {
15
+ e.data === void 0 && (e.data = {}), this.data = e.data, this.isMatchIgnored = !1;
16
+ }
17
+ ignoreMatch() {
18
+ this.isMatchIgnored = !0;
19
+ }
20
+ };
21
+ function i(e) {
22
+ return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
23
+ }
24
+ function a(e, ...t) {
25
+ let n = Object.create(null);
26
+ for (let t in e) n[t] = e[t];
27
+ return t.forEach(function(e) {
28
+ for (let t in e) n[t] = e[t];
29
+ }), n;
30
+ }
31
+ var o = "</span>", s = (e) => !!e.scope, c = (e, { prefix: t }) => {
32
+ if (e.startsWith("language:")) return e.replace("language:", "language-");
33
+ if (e.includes(".")) {
34
+ let n = e.split(".");
35
+ return [`${t}${n.shift()}`, ...n.map((e, t) => `${e}${"_".repeat(t + 1)}`)].join(" ");
36
+ }
37
+ return `${t}${e}`;
38
+ }, l = class {
39
+ constructor(e, t) {
40
+ this.buffer = "", this.classPrefix = t.classPrefix, e.walk(this);
41
+ }
42
+ addText(e) {
43
+ this.buffer += i(e);
44
+ }
45
+ openNode(e) {
46
+ if (!s(e)) return;
47
+ let t = c(e.scope, { prefix: this.classPrefix });
48
+ this.span(t);
49
+ }
50
+ closeNode(e) {
51
+ s(e) && (this.buffer += o);
52
+ }
53
+ value() {
54
+ return this.buffer;
55
+ }
56
+ span(e) {
57
+ this.buffer += `<span class="${e}">`;
58
+ }
59
+ }, u = (e = {}) => {
60
+ let t = { children: [] };
61
+ return Object.assign(t, e), t;
62
+ }, d = class e {
63
+ constructor() {
64
+ this.rootNode = u(), this.stack = [this.rootNode];
65
+ }
66
+ get top() {
67
+ return this.stack[this.stack.length - 1];
68
+ }
69
+ get root() {
70
+ return this.rootNode;
71
+ }
72
+ add(e) {
73
+ this.top.children.push(e);
74
+ }
75
+ openNode(e) {
76
+ let t = u({ scope: e });
77
+ this.add(t), this.stack.push(t);
78
+ }
79
+ closeNode() {
80
+ if (this.stack.length > 1) return this.stack.pop();
81
+ }
82
+ closeAllNodes() {
83
+ for (; this.closeNode(););
84
+ }
85
+ toJSON() {
86
+ return JSON.stringify(this.rootNode, null, 4);
87
+ }
88
+ walk(e) {
89
+ return this.constructor._walk(e, this.rootNode);
90
+ }
91
+ static _walk(e, t) {
92
+ return typeof t == "string" ? e.addText(t) : t.children && (e.openNode(t), t.children.forEach((t) => this._walk(e, t)), e.closeNode(t)), e;
93
+ }
94
+ static _collapse(t) {
95
+ typeof t != "string" && t.children && (t.children.every((e) => typeof e == "string") ? t.children = [t.children.join("")] : t.children.forEach((t) => {
96
+ e._collapse(t);
97
+ }));
98
+ }
99
+ }, f = class extends d {
100
+ constructor(e) {
101
+ super(), this.options = e;
102
+ }
103
+ addText(e) {
104
+ e !== "" && this.add(e);
105
+ }
106
+ startScope(e) {
107
+ this.openNode(e);
108
+ }
109
+ endScope() {
110
+ this.closeNode();
111
+ }
112
+ __addSublanguage(e, t) {
113
+ let n = e.root;
114
+ t && (n.scope = `language:${t}`), this.add(n);
115
+ }
116
+ toHTML() {
117
+ return new l(this, this.options).value();
118
+ }
119
+ finalize() {
120
+ return this.closeAllNodes(), !0;
121
+ }
122
+ };
123
+ function p(e) {
124
+ return e ? typeof e == "string" ? e : e.source : null;
125
+ }
126
+ function m(e) {
127
+ return _("(?=", e, ")");
128
+ }
129
+ function h(e) {
130
+ return _("(?:", e, ")*");
131
+ }
132
+ function g(e) {
133
+ return _("(?:", e, ")?");
134
+ }
135
+ function _(...e) {
136
+ return e.map((e) => p(e)).join("");
137
+ }
138
+ function v(e) {
139
+ let t = e[e.length - 1];
140
+ return typeof t == "object" && t.constructor === Object ? (e.splice(e.length - 1, 1), t) : {};
141
+ }
142
+ function y(...e) {
143
+ return "(" + (v(e).capture ? "" : "?:") + e.map((e) => p(e)).join("|") + ")";
144
+ }
145
+ function b(e) {
146
+ return RegExp(e.toString() + "|").exec("").length - 1;
147
+ }
148
+ function ee(e, t) {
149
+ let n = e && e.exec(t);
150
+ return n && n.index === 0;
151
+ }
152
+ var x = new RegExp(y(/\[(?:[^\\\]]|\\.)*\]/, /\(\?<(?![=!])[^>]+>/, /\(\?'[^']+'/, /\(\??/, /\\([1-9][0-9]*)/, /\\./));
153
+ function S(e, { joinWith: t }) {
154
+ let n = 0;
155
+ return e.map((e) => {
156
+ n += 1;
157
+ let t = n, r = p(e), i = "";
158
+ for (; r.length > 0;) {
159
+ let e = x.exec(r);
160
+ if (!e) {
161
+ i += r;
162
+ break;
163
+ }
164
+ i += r.substring(0, e.index), r = r.substring(e.index + e[0].length), e[0][0] === "\\" && e[1] ? i += "\\" + String(Number(e[1]) + t) : (i += e[0], (e[0] === "(" || /^\(\?[<']/.test(e[0])) && n++);
165
+ }
166
+ return i;
167
+ }).map((e) => `(${e})`).join(t);
168
+ }
169
+ var C = /\b\B/, w = "[a-zA-Z]\\w*", T = "[a-zA-Z_]\\w*", E = "\\b\\d+(\\.\\d+)?", D = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", O = "\\b(0b[01]+)", k = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", A = (e = {}) => {
170
+ let t = /^#![ ]*\//;
171
+ return e.binary && (e.begin = _(t, /.*\b/, e.binary, /\b.*/)), a({
172
+ scope: "meta",
173
+ begin: t,
174
+ end: /$/,
175
+ relevance: 0,
176
+ "on:begin": (e, t) => {
177
+ e.index !== 0 && t.ignoreMatch();
178
+ }
179
+ }, e);
180
+ }, j = {
181
+ begin: "\\\\[\\s\\S]",
182
+ relevance: 0
183
+ }, M = {
184
+ scope: "string",
185
+ begin: "'",
186
+ end: "'",
187
+ illegal: "\\n",
188
+ contains: [j]
189
+ }, N = {
190
+ scope: "string",
191
+ begin: "\"",
192
+ end: "\"",
193
+ illegal: "\\n",
194
+ contains: [j]
195
+ }, P = { begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ }, F = function(e, t, n = {}) {
196
+ let r = a({
197
+ scope: "comment",
198
+ begin: e,
199
+ end: t,
200
+ contains: []
201
+ }, n);
202
+ r.contains.push({
203
+ scope: "doctag",
204
+ begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
205
+ end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,
206
+ excludeBegin: !0,
207
+ relevance: 0
208
+ });
209
+ let i = y("I", "a", "is", "so", "us", "to", "at", "if", "in", "it", "on", /[A-Za-z]+['](d|ve|re|ll|t|s|n)/, /[A-Za-z]+[-][a-z]+/, /[A-Za-z][a-z]{2,}/);
210
+ return r.contains.push({ begin: _(/[ ]+/, "(", i, /[.]?[:]?([.][ ]|[ ])/, "){3}") }), r;
211
+ }, I = F("//", "$"), L = F("/\\*", "\\*/"), R = F("#", "$"), z = /*#__PURE__*/ Object.freeze({
212
+ __proto__: null,
213
+ APOS_STRING_MODE: M,
214
+ BACKSLASH_ESCAPE: j,
215
+ BINARY_NUMBER_MODE: {
216
+ scope: "number",
217
+ begin: O,
218
+ relevance: 0
219
+ },
220
+ BINARY_NUMBER_RE: O,
221
+ COMMENT: F,
222
+ C_BLOCK_COMMENT_MODE: L,
223
+ C_LINE_COMMENT_MODE: I,
224
+ C_NUMBER_MODE: {
225
+ scope: "number",
226
+ begin: D,
227
+ relevance: 0
228
+ },
229
+ C_NUMBER_RE: D,
230
+ END_SAME_AS_BEGIN: function(e) {
231
+ return Object.assign(e, {
232
+ "on:begin": (e, t) => {
233
+ t.data._beginMatch = e[1];
234
+ },
235
+ "on:end": (e, t) => {
236
+ t.data._beginMatch !== e[1] && t.ignoreMatch();
237
+ }
238
+ });
239
+ },
240
+ HASH_COMMENT_MODE: R,
241
+ IDENT_RE: w,
242
+ MATCH_NOTHING_RE: C,
243
+ METHOD_GUARD: {
244
+ begin: "\\.\\s*[a-zA-Z_]\\w*",
245
+ relevance: 0
246
+ },
247
+ NUMBER_MODE: {
248
+ scope: "number",
249
+ begin: E,
250
+ relevance: 0
251
+ },
252
+ NUMBER_RE: E,
253
+ PHRASAL_WORDS_MODE: P,
254
+ QUOTE_STRING_MODE: N,
255
+ REGEXP_MODE: {
256
+ scope: "regexp",
257
+ begin: /\/(?=[^/\n]*\/)/,
258
+ end: /\/[gimuy]*/,
259
+ contains: [j, {
260
+ begin: /\[/,
261
+ end: /\]/,
262
+ relevance: 0,
263
+ contains: [j]
264
+ }]
265
+ },
266
+ RE_STARTERS_RE: k,
267
+ SHEBANG: A,
268
+ TITLE_MODE: {
269
+ scope: "title",
270
+ begin: w,
271
+ relevance: 0
272
+ },
273
+ UNDERSCORE_IDENT_RE: T,
274
+ UNDERSCORE_TITLE_MODE: {
275
+ scope: "title",
276
+ begin: T,
277
+ relevance: 0
278
+ }
279
+ });
280
+ function B(e, t) {
281
+ e.input[e.index - 1] === "." && t.ignoreMatch();
282
+ }
283
+ function te(e, t) {
284
+ e.className !== void 0 && (e.scope = e.className, delete e.className);
285
+ }
286
+ function ne(e, t) {
287
+ t && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = B, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
288
+ }
289
+ function re(e, t) {
290
+ Array.isArray(e.illegal) && (e.illegal = y(...e.illegal));
291
+ }
292
+ function ie(e, t) {
293
+ if (e.match) {
294
+ if (e.begin || e.end) throw Error("begin & end are not supported with match");
295
+ e.begin = e.match, delete e.match;
296
+ }
297
+ }
298
+ function ae(e, t) {
299
+ e.relevance === void 0 && (e.relevance = 1);
300
+ }
301
+ var oe = (e, t) => {
302
+ if (!e.beforeMatch) return;
303
+ if (e.starts) throw Error("beforeMatch cannot be used with starts");
304
+ let n = Object.assign({}, e);
305
+ Object.keys(e).forEach((t) => {
306
+ delete e[t];
307
+ }), e.keywords = n.keywords, e.begin = _(n.beforeMatch, m(n.begin)), e.starts = {
308
+ relevance: 0,
309
+ contains: [Object.assign(n, { endsParent: !0 })]
310
+ }, e.relevance = 0, delete n.beforeMatch;
311
+ }, se = [
312
+ "of",
313
+ "and",
314
+ "for",
315
+ "in",
316
+ "not",
317
+ "or",
318
+ "if",
319
+ "then",
320
+ "parent",
321
+ "list",
322
+ "value"
323
+ ], ce = "keyword";
324
+ function V(e, t, n = ce) {
325
+ let r = Object.create(null);
326
+ return typeof e == "string" ? i(n, e.split(" ")) : Array.isArray(e) ? i(n, e) : Object.keys(e).forEach(function(n) {
327
+ Object.assign(r, V(e[n], t, n));
328
+ }), r;
329
+ function i(e, n) {
330
+ t && (n = n.map((e) => e.toLowerCase())), n.forEach(function(t) {
331
+ let n = t.split("|");
332
+ r[n[0]] = [e, le(n[0], n[1])];
333
+ });
334
+ }
335
+ }
336
+ function le(e, t) {
337
+ return t ? Number(t) : +!ue(e);
338
+ }
339
+ function ue(e) {
340
+ return se.includes(e.toLowerCase());
341
+ }
342
+ var H = {}, U = (e) => {
343
+ console.error(e);
344
+ }, W = (e, ...t) => {
345
+ console.log(`WARN: ${e}`, ...t);
346
+ }, G = (e, t) => {
347
+ H[`${e}/${t}`] || (console.log(`Deprecated as of ${e}. ${t}`), H[`${e}/${t}`] = !0);
348
+ }, K = /* @__PURE__ */ Error();
349
+ function q(e, t, { key: n }) {
350
+ let r = 0, i = e[n], a = {}, o = {};
351
+ for (let e = 1; e <= t.length; e++) o[e + r] = i[e], a[e + r] = !0, r += b(t[e - 1]);
352
+ e[n] = o, e[n]._emit = a, e[n]._multi = !0;
353
+ }
354
+ function de(e) {
355
+ if (Array.isArray(e.begin)) {
356
+ if (e.skip || e.excludeBegin || e.returnBegin) throw U("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), K;
357
+ if (typeof e.beginScope != "object" || e.beginScope === null) throw U("beginScope must be object"), K;
358
+ q(e, e.begin, { key: "beginScope" }), e.begin = S(e.begin, { joinWith: "" });
359
+ }
360
+ }
361
+ function fe(e) {
362
+ if (Array.isArray(e.end)) {
363
+ if (e.skip || e.excludeEnd || e.returnEnd) throw U("skip, excludeEnd, returnEnd not compatible with endScope: {}"), K;
364
+ if (typeof e.endScope != "object" || e.endScope === null) throw U("endScope must be object"), K;
365
+ q(e, e.end, { key: "endScope" }), e.end = S(e.end, { joinWith: "" });
366
+ }
367
+ }
368
+ function pe(e) {
369
+ e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
370
+ }
371
+ function me(e) {
372
+ pe(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), de(e), fe(e);
373
+ }
374
+ function he(e) {
375
+ function t(t, n) {
376
+ return new RegExp(p(t), "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (n ? "g" : ""));
377
+ }
378
+ class n {
379
+ constructor() {
380
+ this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
381
+ }
382
+ addRule(e, t) {
383
+ t.position = this.position++, this.matchIndexes[this.matchAt] = t, this.regexes.push([t, e]), this.matchAt += b(e) + 1;
384
+ }
385
+ compile() {
386
+ this.regexes.length === 0 && (this.exec = () => null);
387
+ let e = this.regexes.map((e) => e[1]);
388
+ this.matcherRe = t(S(e, { joinWith: "|" }), !0), this.lastIndex = 0;
389
+ }
390
+ exec(e) {
391
+ this.matcherRe.lastIndex = this.lastIndex;
392
+ let t = this.matcherRe.exec(e);
393
+ if (!t) return null;
394
+ let n = t.findIndex((e, t) => t > 0 && e !== void 0), r = this.matchIndexes[n];
395
+ return t.splice(0, n), Object.assign(t, r);
396
+ }
397
+ }
398
+ class r {
399
+ constructor() {
400
+ this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
401
+ }
402
+ getMatcher(e) {
403
+ if (this.multiRegexes[e]) return this.multiRegexes[e];
404
+ let t = new n();
405
+ return this.rules.slice(e).forEach(([e, n]) => t.addRule(e, n)), t.compile(), this.multiRegexes[e] = t, t;
406
+ }
407
+ resumingScanAtSamePosition() {
408
+ return this.regexIndex !== 0;
409
+ }
410
+ considerAll() {
411
+ this.regexIndex = 0;
412
+ }
413
+ addRule(e, t) {
414
+ this.rules.push([e, t]), t.type === "begin" && this.count++;
415
+ }
416
+ exec(e) {
417
+ let t = this.getMatcher(this.regexIndex);
418
+ t.lastIndex = this.lastIndex;
419
+ let n = t.exec(e);
420
+ if (this.resumingScanAtSamePosition() && !(n && n.index === this.lastIndex)) {
421
+ let t = this.getMatcher(0);
422
+ t.lastIndex = this.lastIndex + 1, n = t.exec(e);
423
+ }
424
+ return n && (this.regexIndex += n.position + 1, this.regexIndex === this.count && this.considerAll()), n;
425
+ }
426
+ }
427
+ function i(e) {
428
+ let t = new r();
429
+ return e.contains.forEach((e) => t.addRule(e.begin, {
430
+ rule: e,
431
+ type: "begin"
432
+ })), e.terminatorEnd && t.addRule(e.terminatorEnd, { type: "end" }), e.illegal && t.addRule(e.illegal, { type: "illegal" }), t;
433
+ }
434
+ function o(n, r) {
435
+ let a = n;
436
+ if (n.isCompiled) return a;
437
+ [
438
+ te,
439
+ ie,
440
+ me,
441
+ oe
442
+ ].forEach((e) => e(n, r)), e.compilerExtensions.forEach((e) => e(n, r)), n.__beforeBegin = null, [
443
+ ne,
444
+ re,
445
+ ae
446
+ ].forEach((e) => e(n, r)), n.isCompiled = !0;
447
+ let s = null;
448
+ return typeof n.keywords == "object" && n.keywords.$pattern && (n.keywords = Object.assign({}, n.keywords), s = n.keywords.$pattern, delete n.keywords.$pattern), s ||= /\w+/, n.keywords &&= V(n.keywords, e.case_insensitive), a.keywordPatternRe = t(s, !0), r && (n.begin ||= /\B|\b/, a.beginRe = t(a.begin), !n.end && !n.endsWithParent && (n.end = /\B|\b/), n.end && (a.endRe = t(a.end)), a.terminatorEnd = p(a.end) || "", n.endsWithParent && r.terminatorEnd && (a.terminatorEnd += (n.end ? "|" : "") + r.terminatorEnd)), n.illegal && (a.illegalRe = t(n.illegal)), n.contains ||= [], n.contains = [].concat(...n.contains.map(function(e) {
449
+ return ge(e === "self" ? n : e);
450
+ })), n.contains.forEach(function(e) {
451
+ o(e, a);
452
+ }), n.starts && o(n.starts, r), a.matcher = i(a), a;
453
+ }
454
+ if (e.compilerExtensions ||= [], e.contains && e.contains.includes("self")) throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
455
+ return e.classNameAliases = a(e.classNameAliases || {}), o(e);
456
+ }
457
+ function J(e) {
458
+ return e ? e.endsWithParent || J(e.starts) : !1;
459
+ }
460
+ function ge(e) {
461
+ return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(t) {
462
+ return a(e, { variants: null }, t);
463
+ })), e.cachedVariants ? e.cachedVariants : J(e) ? a(e, { starts: e.starts ? a(e.starts) : null }) : Object.isFrozen(e) ? a(e) : e;
464
+ }
465
+ var _e = "11.12.0", ve = class extends Error {
466
+ constructor(e, t) {
467
+ super(e), this.name = "HTMLInjectionError", this.html = t;
468
+ }
469
+ }, Y = i, X = a, Z = Symbol("nomatch"), ye = 7, Q = function(e) {
470
+ let t = Object.create(null), i = Object.create(null), a = [], o = !0, s = "Could not find the language '{}', did you forget to load/include a language module?", c = {
471
+ disableAutodetect: !0,
472
+ name: "Plain text",
473
+ contains: []
474
+ }, l = {
475
+ ignoreUnescapedHTML: !1,
476
+ throwUnescapedHTML: !1,
477
+ noHighlightRe: /^(no-?highlight)$/i,
478
+ languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
479
+ classPrefix: "hljs-",
480
+ cssSelector: "pre code",
481
+ languages: null,
482
+ __emitter: f
483
+ };
484
+ function u(e) {
485
+ return l.noHighlightRe.test(e);
486
+ }
487
+ function d(e) {
488
+ let t = e.className + " ";
489
+ t += e.parentNode ? e.parentNode.className : "";
490
+ let n = l.languageDetectRe.exec(t);
491
+ if (n) {
492
+ let t = M(n[1]);
493
+ return t || (W(s.replace("{}", n[1])), W("Falling back to no-highlight mode for this block.", e)), t ? n[1] : "no-highlight";
494
+ }
495
+ return t.split(/\s+/).find((e) => u(e) || M(e));
496
+ }
497
+ function p(e, t, n) {
498
+ let r = "", i = "";
499
+ typeof t == "object" ? (r = e, n = t.ignoreIllegals, i = t.language) : (G("10.7.0", "highlight(lang, code, ...args) has been deprecated."), G("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), i = e, r = t), n === void 0 && (n = !0);
500
+ let a = {
501
+ code: r,
502
+ language: i
503
+ };
504
+ R("before:highlight", a);
505
+ let o = a.result ? a.result : v(a.language, a.code, n);
506
+ return o.code = a.code, R("after:highlight", o), o;
507
+ }
508
+ function v(e, n, i, a) {
509
+ let c = Object.create(null);
510
+ function u(e, t) {
511
+ return e.keywords[t];
512
+ }
513
+ function d() {
514
+ if (!k.keywords) {
515
+ j.addText(N);
516
+ return;
517
+ }
518
+ let e = 0;
519
+ k.keywordPatternRe.lastIndex = 0;
520
+ let t = k.keywordPatternRe.exec(N), n = "";
521
+ for (; t;) {
522
+ n += N.substring(e, t.index);
523
+ let r = E.case_insensitive ? t[0].toLowerCase() : t[0], i = u(k, r);
524
+ if (i) {
525
+ let [e, a] = i;
526
+ if (j.addText(n), n = "", c[r] = (c[r] || 0) + 1, c[r] <= ye && (P += a), e.startsWith("_")) n += t[0];
527
+ else {
528
+ let n = E.classNameAliases[e] || e;
529
+ m(t[0], n);
530
+ }
531
+ } else n += t[0];
532
+ e = k.keywordPatternRe.lastIndex, t = k.keywordPatternRe.exec(N);
533
+ }
534
+ n += N.substring(e), j.addText(n);
535
+ }
536
+ function f() {
537
+ if (N === "") return;
538
+ let e = null;
539
+ if (typeof k.subLanguage == "string") {
540
+ if (!t[k.subLanguage]) {
541
+ j.addText(N);
542
+ return;
543
+ }
544
+ e = v(k.subLanguage, N, !0, A[k.subLanguage]), A[k.subLanguage] = e._top;
545
+ } else e = x(N, k.subLanguage.length ? k.subLanguage : null);
546
+ k.relevance > 0 && (P += e.relevance), j.__addSublanguage(e._emitter, e.language);
547
+ }
548
+ function p() {
549
+ k.subLanguage == null ? d() : f(), N = "";
550
+ }
551
+ function m(e, t) {
552
+ e !== "" && (j.startScope(t), j.addText(e), j.endScope());
553
+ }
554
+ function h(e, t) {
555
+ let n = 1, r = t.length - 1;
556
+ for (; n <= r;) {
557
+ if (!e._emit[n]) {
558
+ n++;
559
+ continue;
560
+ }
561
+ let r = E.classNameAliases[e[n]] || e[n], i = t[n];
562
+ r ? m(i, r) : (N = i, d(), N = ""), n++;
563
+ }
564
+ }
565
+ function g(e, t) {
566
+ return e.scope && typeof e.scope == "string" && j.openNode(E.classNameAliases[e.scope] || e.scope), e.beginScope && (e.beginScope._wrap ? (m(N, E.classNameAliases[e.beginScope._wrap] || e.beginScope._wrap), N = "") : e.beginScope._multi && (h(e.beginScope, t), N = "")), k = Object.create(e, { parent: { value: k } }), k;
567
+ }
568
+ function _(e, t, n) {
569
+ let i = ee(e.endRe, n);
570
+ if (i) {
571
+ if (e["on:end"]) {
572
+ let n = new r(e);
573
+ e["on:end"](t, n), n.isMatchIgnored && (i = !1);
574
+ }
575
+ if (i) {
576
+ for (; e.endsParent && e.parent;) e = e.parent;
577
+ return e;
578
+ }
579
+ }
580
+ if (e.endsWithParent) return _(e.parent, t, n);
581
+ }
582
+ function y(e) {
583
+ return k.matcher.regexIndex === 0 ? (N += e[0], 1) : (L = !0, 0);
584
+ }
585
+ function b(e) {
586
+ let t = e[0], n = e.rule, i = new r(n), a = [n.__beforeBegin, n["on:begin"]];
587
+ for (let n of a) if (n && (n(e, i), i.isMatchIgnored)) return y(t);
588
+ return n.skip ? N += t : (n.excludeBegin && (N += t), p(), !n.returnBegin && !n.excludeBegin && (N = t)), g(n, e), n.returnBegin ? 0 : t.length;
589
+ }
590
+ function S(e) {
591
+ let t = e[0], r = n.substring(e.index), i = _(k, e, r);
592
+ if (!i) return Z;
593
+ let a = k;
594
+ k.endScope && k.endScope._wrap ? (p(), m(t, k.endScope._wrap)) : k.endScope && k.endScope._multi ? (p(), h(k.endScope, e)) : a.skip ? N += t : (a.returnEnd || a.excludeEnd || (N += t), p(), a.excludeEnd && (N = t));
595
+ do
596
+ k.scope && j.closeNode(), !k.skip && !k.subLanguage && (P += k.relevance), k = k.parent;
597
+ while (k !== i.parent);
598
+ return i.starts && g(i.starts, e), a.returnEnd ? 0 : t.length;
599
+ }
600
+ function C() {
601
+ let e = [];
602
+ for (let t = k; t !== E; t = t.parent) t.scope && e.unshift(t.scope);
603
+ e.forEach((e) => j.openNode(e));
604
+ }
605
+ let w = {};
606
+ function T(t, r) {
607
+ let a = r && r[0];
608
+ if (N += t, a == null) return p(), 0;
609
+ if (w.type === "begin" && r.type === "end" && w.index === r.index && a === "") {
610
+ if (N += n.slice(r.index, r.index + 1), !o) {
611
+ let t = /* @__PURE__ */ Error(`0 width match regex (${e})`);
612
+ throw t.languageName = e, t.badRule = w.rule, t;
613
+ }
614
+ return 1;
615
+ }
616
+ if (w = r, r.type === "begin") return b(r);
617
+ if (r.type === "illegal" && !i) {
618
+ let e = /* @__PURE__ */ Error("Illegal lexeme \"" + a + "\" for mode \"" + (k.scope || "<unnamed>") + "\"");
619
+ throw e.mode = k, e;
620
+ }
621
+ if (r.type === "end") {
622
+ let e = S(r);
623
+ if (e !== Z) return e;
624
+ }
625
+ if (r.type === "illegal" && a === "") return r.index === n.length || (N += "\n"), 1;
626
+ if (I > 1e5 && I > r.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
627
+ return N += a, a.length;
628
+ }
629
+ let E = M(e);
630
+ if (!E) throw U(s.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
631
+ let D = he(E), O = "", k = a || D, A = {}, j = new l.__emitter(l);
632
+ C();
633
+ let N = "", P = 0, F = 0, I = 0, L = !1;
634
+ try {
635
+ if (E.__emitTokens) E.__emitTokens(n, j);
636
+ else {
637
+ for (k.matcher.considerAll();;) {
638
+ I++, L ? L = !1 : k.matcher.considerAll(), k.matcher.lastIndex = F;
639
+ let e = k.matcher.exec(n);
640
+ if (!e) break;
641
+ let t = T(n.substring(F, e.index), e);
642
+ F = e.index + t;
643
+ }
644
+ T(n.substring(F));
645
+ }
646
+ return j.finalize(), O = j.toHTML(), {
647
+ language: e,
648
+ value: O,
649
+ relevance: P,
650
+ illegal: !1,
651
+ _emitter: j,
652
+ _top: k
653
+ };
654
+ } catch (t) {
655
+ if (t.message && t.message.includes("Illegal")) return {
656
+ language: e,
657
+ value: Y(n),
658
+ illegal: !0,
659
+ relevance: 0,
660
+ _illegalBy: {
661
+ message: t.message,
662
+ index: F,
663
+ context: n.slice(F - 100, F + 100),
664
+ mode: t.mode,
665
+ resultSoFar: O
666
+ },
667
+ _emitter: j
668
+ };
669
+ if (o) return {
670
+ language: e,
671
+ value: Y(n),
672
+ illegal: !1,
673
+ relevance: 0,
674
+ errorRaised: t,
675
+ _emitter: j,
676
+ _top: k
677
+ };
678
+ throw t;
679
+ }
680
+ }
681
+ function b(e) {
682
+ let t = {
683
+ value: Y(e),
684
+ illegal: !1,
685
+ relevance: 0,
686
+ _top: c,
687
+ _emitter: new l.__emitter(l)
688
+ };
689
+ return t._emitter.addText(e), t;
690
+ }
691
+ function x(e, n) {
692
+ n = n || l.languages || Object.keys(t);
693
+ let r = b(e), i = n.filter(M).filter(P).map((t) => v(t, e, !1));
694
+ i.unshift(r);
695
+ let [a, o] = i.sort((e, t) => {
696
+ if (e.relevance !== t.relevance) return t.relevance - e.relevance;
697
+ if (e.language && t.language) {
698
+ if (M(e.language).supersetOf === t.language) return 1;
699
+ if (M(t.language).supersetOf === e.language) return -1;
700
+ }
701
+ return 0;
702
+ }), s = a;
703
+ return s.secondBest = o, s;
704
+ }
705
+ function S(e, t, n) {
706
+ let r = t && i[t] || n;
707
+ e.classList.add("hljs"), e.classList.add(`language-${r}`);
708
+ }
709
+ function C(e) {
710
+ let t = null, n = d(e);
711
+ if (u(n)) return;
712
+ if (R("before:highlightElement", {
713
+ el: e,
714
+ language: n
715
+ }), e.dataset.highlighted) {
716
+ console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", e);
717
+ return;
718
+ }
719
+ if (e.children.length > 0 && (l.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(e)), l.throwUnescapedHTML)) throw new ve("One of your code blocks includes unescaped HTML.", e.innerHTML);
720
+ t = e;
721
+ let r = t.textContent, i = n ? p(r, {
722
+ language: n,
723
+ ignoreIllegals: !0
724
+ }) : x(r);
725
+ e.innerHTML = i.value, e.dataset.highlighted = "yes", S(e, n, i.language), e.result = {
726
+ language: i.language,
727
+ re: i.relevance,
728
+ relevance: i.relevance
729
+ }, i.secondBest && (e.secondBest = {
730
+ language: i.secondBest.language,
731
+ relevance: i.secondBest.relevance
732
+ }), R("after:highlightElement", {
733
+ el: e,
734
+ result: i,
735
+ text: r
736
+ });
737
+ }
738
+ function w(e) {
739
+ l = X(l, e);
740
+ }
741
+ let T = () => {
742
+ O(), G("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
743
+ };
744
+ function E() {
745
+ O(), G("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
746
+ }
747
+ let D = !1;
748
+ function O() {
749
+ function e() {
750
+ O();
751
+ }
752
+ document.readyState === "loading" ? (D || window.addEventListener("DOMContentLoaded", e, !1), D = !0) : document.querySelectorAll(l.cssSelector).forEach(C);
753
+ }
754
+ function k(n, r) {
755
+ let i = null;
756
+ try {
757
+ i = r(e);
758
+ } catch (e) {
759
+ if (U("Language definition for '{}' could not be registered.".replace("{}", n)), o) U(e);
760
+ else throw e;
761
+ i = c;
762
+ }
763
+ i.name || (i.name = n), t[n] = i, i.rawDefinition = r.bind(null, e), i.aliases && N(i.aliases, { languageName: n });
764
+ }
765
+ function A(e) {
766
+ delete t[e];
767
+ for (let t of Object.keys(i)) i[t] === e && delete i[t];
768
+ }
769
+ function j() {
770
+ return Object.keys(t);
771
+ }
772
+ function M(e) {
773
+ return e = (e || "").toLowerCase(), t[e] || t[i[e]];
774
+ }
775
+ function N(e, { languageName: t }) {
776
+ typeof e == "string" && (e = [e]), e.forEach((e) => {
777
+ i[e.toLowerCase()] = t;
778
+ });
779
+ }
780
+ function P(e) {
781
+ let t = M(e);
782
+ return t && !t.disableAutodetect;
783
+ }
784
+ function F(e) {
785
+ e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = (t) => {
786
+ e["before:highlightBlock"](Object.assign({ block: t.el }, t));
787
+ }), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = (t) => {
788
+ e["after:highlightBlock"](Object.assign({ block: t.el }, t));
789
+ });
790
+ }
791
+ function I(e) {
792
+ F(e), a.push(e);
793
+ }
794
+ function L(e) {
795
+ let t = a.indexOf(e);
796
+ t !== -1 && a.splice(t, 1);
797
+ }
798
+ function R(e, t) {
799
+ let n = e;
800
+ a.forEach(function(e) {
801
+ e[n] && e[n](t);
802
+ });
803
+ }
804
+ function B(e) {
805
+ return G("10.7.0", "highlightBlock will be removed entirely in v12.0"), G("10.7.0", "Please use highlightElement now."), C(e);
806
+ }
807
+ Object.assign(e, {
808
+ highlight: p,
809
+ highlightAuto: x,
810
+ highlightAll: O,
811
+ highlightElement: C,
812
+ highlightBlock: B,
813
+ configure: w,
814
+ initHighlighting: T,
815
+ initHighlightingOnLoad: E,
816
+ registerLanguage: k,
817
+ unregisterLanguage: A,
818
+ listLanguages: j,
819
+ getLanguage: M,
820
+ registerAliases: N,
821
+ autoDetection: P,
822
+ inherit: X,
823
+ addPlugin: I,
824
+ removePlugin: L
825
+ }), e.debugMode = function() {
826
+ o = !1;
827
+ }, e.safeMode = function() {
828
+ o = !0;
829
+ }, e.versionString = _e, e.regex = {
830
+ concat: _,
831
+ lookahead: m,
832
+ either: y,
833
+ optional: g,
834
+ anyNumberOfTimes: h
835
+ };
836
+ for (let e in z) typeof z[e] == "object" && n(z[e]);
837
+ return Object.assign(e, z), e;
838
+ }, $ = Q({});
839
+ $.newInstance = () => Q({}), t.exports = $, $.HighlightJS = $, $.default = $;
840
+ })))())).default;
841
+ //#endregion
842
+ export { n as default };