artifactuse 0.1.10 → 0.1.12

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.
@@ -1,11 +1,11 @@
1
- var yr = Object.defineProperty;
2
- var kr = (e, t, r) => t in e ? yr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var _ = (e, t, r) => kr(e, typeof t != "symbol" ? t + "" : t, r);
4
- const be = {
1
+ var xr = Object.defineProperty;
2
+ var $r = (e, t, r) => t in e ? xr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var C = (e, t, r) => $r(e, typeof t != "symbol" ? t + "" : t, r);
4
+ const ye = {
5
5
  CODE: "code",
6
6
  FORM: "form",
7
7
  SOCIAL: "social"
8
- }, xr = [
8
+ }, Rr = [
9
9
  // Code languages
10
10
  "html",
11
11
  "htm",
@@ -31,7 +31,7 @@ const be = {
31
31
  // Structured artifacts
32
32
  "form",
33
33
  "social"
34
- ], $r = [
34
+ ], Ar = [
35
35
  // Visual editors (always panel)
36
36
  "video",
37
37
  "videoeditor",
@@ -55,13 +55,13 @@ const be = {
55
55
  // Structured artifacts (form can be panel based on complexity)
56
56
  "form"
57
57
  ];
58
- function Xt(e) {
59
- return xr.includes(e == null ? void 0 : e.toLowerCase());
58
+ function Qt(e) {
59
+ return Rr.includes(e == null ? void 0 : e.toLowerCase());
60
60
  }
61
- function Ar(e) {
62
- return $r.includes(e == null ? void 0 : e.toLowerCase());
61
+ function zr(e) {
62
+ return Ar.includes(e == null ? void 0 : e.toLowerCase());
63
63
  }
64
- function Rr(e) {
64
+ function Sr(e) {
65
65
  return {
66
66
  // Code languages
67
67
  html: "HTML",
@@ -119,7 +119,7 @@ function Rr(e) {
119
119
  social: "Social Preview"
120
120
  }[e == null ? void 0 : e.toLowerCase()] || (e == null ? void 0 : e.toUpperCase()) || "Code";
121
121
  }
122
- function xs(e) {
122
+ function Rs(e) {
123
123
  return {
124
124
  html: "html",
125
125
  htm: "html",
@@ -161,7 +161,7 @@ function xs(e) {
161
161
  social: "json"
162
162
  }[e == null ? void 0 : e.toLowerCase()] || "txt";
163
163
  }
164
- function $s(e) {
164
+ function As(e) {
165
165
  return {
166
166
  html: '<path d="M12 17.56l4.07-1.13.55-6.1H9.38l-.16-1.7h7.78l.16-1.7H6.85l.48 5.1h6.3l-.25 2.9-2.38.63-2.38-.63-.15-1.7H6.76l.3 3.2L12 17.56M4.07 3h15.86L18.5 19.2 12 21l-6.5-1.8L4.07 3z"/>',
167
167
  htm: '<path d="M12 17.56l4.07-1.13.55-6.1H9.38l-.16-1.7h7.78l.16-1.7H6.85l.48 5.1h6.3l-.25 2.9-2.38.63-2.38-.63-.15-1.7H6.76l.3 3.2L12 17.56M4.07 3h15.86L18.5 19.2 12 21l-6.5-1.8L4.07 3z"/>',
@@ -195,20 +195,20 @@ function $s(e) {
195
195
  social: '<path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"/>'
196
196
  }[e == null ? void 0 : e.toLowerCase()] || '<polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/>';
197
197
  }
198
- function As(e) {
198
+ function zs(e) {
199
199
  if (e === 0) return "0 Bytes";
200
200
  const t = 1024, r = ["Bytes", "KB", "MB", "GB"], a = Math.floor(Math.log(e) / Math.log(t));
201
201
  return parseFloat((e / Math.pow(t, a)).toFixed(2)) + " " + r[a];
202
202
  }
203
- function Wt(e) {
203
+ function Kt(e) {
204
204
  return e.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&amp;/g, "&").replace(/&#10;/g, `
205
205
  `).replace(/&#13;/g, "\r").replace(/&#9;/g, " ").replace(/&nbsp;/g, " ");
206
206
  }
207
- function zr(e) {
207
+ function Lr(e) {
208
208
  const t = JSON.stringify(e);
209
209
  return typeof btoa == "function" ? btoa(unescape(encodeURIComponent(t))) : typeof Buffer < "u" ? Buffer.from(t, "utf-8").toString("base64") : t.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
210
210
  }
211
- function Sr(e, t) {
211
+ function _r(e, t) {
212
212
  const r = t == null ? void 0 : t.toLowerCase();
213
213
  if (r === "form" || r === "social")
214
214
  try {
@@ -237,22 +237,22 @@ function Sr(e, t) {
237
237
  if (u && u[1] !== "main") return u[1];
238
238
  }
239
239
  const l = e.match(/<title>([^<]+)<\/title>/i);
240
- return l ? l[1].trim() : e.includes("<template>") && e.includes("<script>") ? "Vue Component" : e.includes("import React") || e.includes('from "react"') ? "React Component" : e.includes("<!DOCTYPE html>") || e.includes("<html") ? "HTML Document" : e.includes("@app.route") || e.includes("Flask") ? "Flask App" : e.includes("express()") ? "Express Server" : e.includes("CREATE TABLE") ? "SQL Schema" : e.includes("SELECT") && e.includes("FROM") ? "SQL Query" : `${Rr(t)} Code`;
240
+ return l ? l[1].trim() : e.includes("<template>") && e.includes("<script>") ? "Vue Component" : e.includes("import React") || e.includes('from "react"') ? "React Component" : e.includes("<!DOCTYPE html>") || e.includes("<html") ? "HTML Document" : e.includes("@app.route") || e.includes("Flask") ? "Flask App" : e.includes("express()") ? "Express Server" : e.includes("CREATE TABLE") ? "SQL Schema" : e.includes("SELECT") && e.includes("FROM") ? "SQL Query" : `${Sr(t)} Code`;
241
241
  }
242
- function Lr(e, t = "panel") {
243
- const r = zr(e);
242
+ function Mr(e, t = "panel") {
243
+ const r = Lr(e);
244
244
  return `<div class="${`artifactuse-placeholder artifactuse-${t}`}" data-artifact-id="${e.id}" data-artifact-type="${e.type}" data-artifact="${r}"></div>`;
245
245
  }
246
- function Qt(e) {
246
+ function Jt(e) {
247
247
  try {
248
248
  return JSON.parse(e);
249
249
  } catch {
250
250
  return null;
251
251
  }
252
252
  }
253
- function _r(e) {
253
+ function Cr(e) {
254
254
  var s;
255
- const t = Qt(e);
255
+ const t = Jt(e);
256
256
  if (!t || t.display === "inline") return !0;
257
257
  if (t.display === "panel" || t.variant === "wizard") return !1;
258
258
  if (t.variant === "buttons") return !0;
@@ -261,47 +261,47 @@ function _r(e) {
261
261
  const a = ["multiselect", "rating", "color", "range"];
262
262
  return !(r.some((i) => a.includes(i.type)) || r.filter((i) => i.type !== "buttons" && i.type !== "divider" && i.type !== "heading").length > 4 || r.some((i) => i.type === "textarea" && (i.rows || 3) > 4));
263
263
  }
264
- function Mr(e, t) {
264
+ function Tr(e, t) {
265
265
  const r = e == null ? void 0 : e.toLowerCase();
266
- return r === "social" ? !0 : r === "form" ? _r(t) : !1;
266
+ return r === "social" ? !0 : r === "form" ? Cr(t) : !1;
267
267
  }
268
- function Cr(e) {
268
+ function Er(e) {
269
269
  const t = e == null ? void 0 : e.toLowerCase();
270
- return t === "form" ? be.FORM : t === "social" ? be.SOCIAL : be.CODE;
270
+ return t === "form" ? ye.FORM : t === "social" ? ye.SOCIAL : ye.CODE;
271
271
  }
272
- function xe(e, t, r, a) {
273
- const s = t == null ? void 0 : t.toLowerCase(), i = Cr(s), o = Mr(s, e);
272
+ function Re(e, t, r, a) {
273
+ const s = t == null ? void 0 : t.toLowerCase(), i = Er(s), o = Tr(s, e);
274
274
  return {
275
275
  id: `${r}-${i}-${a}`,
276
276
  messageId: r,
277
277
  type: i,
278
278
  language: s,
279
- title: Sr(e, s),
279
+ title: _r(e, s),
280
280
  code: e,
281
281
  isInline: o,
282
- isPreviewable: Xt(s),
283
- isPanelArtifact: Ar(s),
282
+ isPreviewable: Qt(s),
283
+ isPanelArtifact: zr(s),
284
284
  size: e.length,
285
285
  lineCount: e.split(`
286
286
  `).length,
287
287
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
288
288
  };
289
289
  }
290
- function Rs(e, t) {
290
+ function Ss(e, t) {
291
291
  const r = [], a = /<pre><code class="language-(\w+)">([\s\S]*?)<\/code><\/pre>/gi;
292
292
  let s, i = 0;
293
293
  for (; (s = a.exec(e)) !== null; ) {
294
- const o = s[1], n = Wt(s[2]);
294
+ const o = s[1], n = Kt(s[2]);
295
295
  let l = o.toLowerCase();
296
- if ((["xml", "markup", "html", "htm"].includes(l) || !l) && (n.trim().startsWith("<svg") || n.includes("<svg ") || n.includes("<svg>")) && (l = "svg"), (l === "form" || l === "social") && !Qt(n)) {
297
- r.push(xe(n, "json", t, i)), i++;
296
+ if ((["xml", "markup", "html", "htm"].includes(l) || !l) && (n.trim().startsWith("<svg") || n.includes("<svg ") || n.includes("<svg>")) && (l = "svg"), (l === "form" || l === "social") && !Jt(n)) {
297
+ r.push(Re(n, "json", t, i)), i++;
298
298
  continue;
299
299
  }
300
- r.push(xe(n, l, t, i)), i++;
300
+ r.push(Re(n, l, t, i)), i++;
301
301
  }
302
302
  return r;
303
303
  }
304
- function Tr(e, t, r = {}) {
304
+ function Pr(e, t, r = {}) {
305
305
  const {
306
306
  minLines: a = 3,
307
307
  minLength: s = 50,
@@ -309,17 +309,17 @@ function Tr(e, t, r = {}) {
309
309
  } = r, o = [], n = /<pre><code class="language-(\w+)">([\s\S]*?)<\/code><\/pre>/gi;
310
310
  let l = 0;
311
311
  const c = e.replace(n, (u, d, v) => {
312
- const p = Wt(v).trim(), w = p.split(`
312
+ const p = Kt(v).trim(), w = p.split(`
313
313
  `).length;
314
314
  let f = d.toLowerCase();
315
315
  (["xml", "markup", "html", "htm"].includes(f) || !f) && p.trim().startsWith("<svg") && (f = "svg");
316
- const m = Xt(f);
316
+ const g = Qt(f);
317
317
  let h = !1;
318
- if (i ? h = !0 : f === "diff" || f === "patch" ? h = w > 10 : m ? h = !0 : h = p.length >= s && w >= a, h) {
319
- const g = xe(p, f, t, l);
320
- l++, o.push(g);
318
+ if (i ? h = !0 : f === "diff" || f === "patch" ? h = w > 10 : g ? h = !0 : h = p.length >= s && w >= a, h) {
319
+ const m = Re(p, f, t, l);
320
+ l++, o.push(m);
321
321
  let y = "panel";
322
- return g.isInline && (y = g.type === "social" ? "inline-social" : "inline-form"), Lr(g, y);
322
+ return m.isInline && (y = m.type === "social" ? "inline-social" : "inline-form"), Mr(m, y);
323
323
  }
324
324
  return l++, u;
325
325
  });
@@ -328,7 +328,7 @@ function Tr(e, t, r = {}) {
328
328
  html: c
329
329
  };
330
330
  }
331
- function Er() {
331
+ function Ir() {
332
332
  let e = {
333
333
  artifacts: [],
334
334
  activeArtifactId: null,
@@ -356,17 +356,17 @@ function Er() {
356
356
  return { ...e };
357
357
  }
358
358
  function i(b) {
359
- const x = e.artifacts.findIndex((A) => A.id === b.id);
359
+ const x = e.artifacts.findIndex(($) => $.id === b.id);
360
360
  if (x === -1)
361
361
  e = {
362
362
  ...e,
363
363
  artifacts: [...e.artifacts, b]
364
364
  };
365
365
  else {
366
- const A = [...e.artifacts];
367
- A[x] = { ...A[x], ...b }, e = {
366
+ const $ = [...e.artifacts];
367
+ $[x] = { ...$[x], ...b }, e = {
368
368
  ...e,
369
- artifacts: A
369
+ artifacts: $
370
370
  };
371
371
  }
372
372
  r();
@@ -429,13 +429,13 @@ function Er() {
429
429
  function f(b) {
430
430
  return e.artifacts.filter((x) => x.messageId === b);
431
431
  }
432
- function m(b) {
432
+ function g(b) {
433
433
  return e.artifacts.filter((x) => x.type === b);
434
434
  }
435
435
  function h() {
436
436
  return e.artifacts.length;
437
437
  }
438
- function g() {
438
+ function m() {
439
439
  e = {
440
440
  artifacts: [],
441
441
  activeArtifactId: null,
@@ -446,17 +446,17 @@ function Er() {
446
446
  }
447
447
  function y(b) {
448
448
  const x = r;
449
- let A = !1;
450
- const z = () => {
451
- A = !0;
449
+ let $ = !1;
450
+ const S = () => {
451
+ $ = !0;
452
452
  };
453
453
  try {
454
454
  Object.defineProperty(window, "__artifactuse_notify__", {
455
- value: z,
455
+ value: S,
456
456
  configurable: !0
457
457
  }), b();
458
458
  } finally {
459
- delete window.__artifactuse_notify__, A && x();
459
+ delete window.__artifactuse_notify__, $ && x();
460
460
  }
461
461
  }
462
462
  return {
@@ -470,7 +470,7 @@ function Er() {
470
470
  getArtifact: l,
471
471
  getActiveArtifact: c,
472
472
  getArtifactsByMessageId: f,
473
- getArtifactsByType: m,
473
+ getArtifactsByType: g,
474
474
  getArtifactCount: h,
475
475
  // Panel state
476
476
  setActiveArtifact: u,
@@ -479,142 +479,148 @@ function Er() {
479
479
  setViewMode: p,
480
480
  setFullscreen: w,
481
481
  // Utilities
482
- clear: g,
482
+ clear: m,
483
483
  batch: y
484
484
  };
485
485
  }
486
- function Ne(e) {
486
+ function Ge(e) {
487
487
  try {
488
488
  return new URL(e).hostname;
489
489
  } catch {
490
490
  return null;
491
491
  }
492
492
  }
493
- function Pr(e = []) {
493
+ function Zr(e = []) {
494
494
  const t = Array.isArray(e) ? e : [e].filter(Boolean), r = new Set(t), a = /* @__PURE__ */ new Map();
495
- let s = null, i = !1;
496
- const o = [];
497
- function n(k) {
495
+ let s = null, i = !1, o = !1;
496
+ const n = [];
497
+ function l(R) {
498
498
  if (r.size === 0)
499
499
  return console.warn("Artifactuse bridge: No allowed origins configured, accepting all messages"), !0;
500
- const M = Ne(k);
501
- if (!M) return !1;
502
- for (const C of r) {
503
- const P = Ne(C);
504
- if (P && P === M || C === M)
500
+ const T = Ge(R);
501
+ if (!T) return !1;
502
+ for (const E of r) {
503
+ const k = Ge(E);
504
+ if (k && k === T || E === T)
505
505
  return !0;
506
506
  }
507
507
  return !1;
508
508
  }
509
- function l(k) {
510
- if (!n(k.origin))
509
+ function c(R) {
510
+ var P, Z, B;
511
+ if (((P = R.data) == null ? void 0 : P.type) === "artifactuse" && (console.log("[Bridge] Message from:", R.origin, "action:", (Z = R.data) == null ? void 0 : Z.action), console.log("[Bridge] Allowed origins:", v())), !l(R.origin)) {
512
+ ((B = R.data) == null ? void 0 : B.type) === "artifactuse" && console.warn("[Bridge] Origin NOT allowed:", R.origin);
511
513
  return;
512
- const { type: M, action: C, data: P, requestId: H } = k.data || {};
513
- if (M !== "artifactuse") return;
514
- if (C === "ready" || C === "panel:ready") {
515
- i = !0, o.forEach((R) => p(R)), o.length = 0;
514
+ }
515
+ const { type: T, action: E, data: k, requestId: M } = R.data || {};
516
+ if (T !== "artifactuse") return;
517
+ if (E === "ready" || E === "panel:ready") {
518
+ console.log("[Bridge] panel:ready received, setting isReady=true"), i = !0, o = !0, w();
516
519
  return;
517
520
  }
518
- (a.get(C) || []).forEach((R) => {
521
+ (a.get(E) || []).forEach((be) => {
519
522
  try {
520
- R(P, H);
521
- } catch (I) {
522
- console.error(`Artifactuse bridge handler error (${C}):`, I);
523
+ be(k, M);
524
+ } catch (ve) {
525
+ console.error(`Artifactuse bridge handler error (${E}):`, ve);
523
526
  }
524
- }), (a.get("*") || []).forEach((R) => {
527
+ }), (a.get("*") || []).forEach((be) => {
525
528
  try {
526
- R({ action: C, data: P, requestId: H });
527
- } catch (I) {
528
- console.error("Artifactuse bridge wildcard handler error:", I);
529
+ be({ action: E, data: k, requestId: M });
530
+ } catch (ve) {
531
+ console.error("Artifactuse bridge wildcard handler error:", ve);
529
532
  }
530
533
  });
531
534
  }
532
- window.addEventListener("message", l);
533
- function c(k) {
534
- k && typeof k == "string" && r.add(k);
535
+ window.addEventListener("message", c);
536
+ function u(R) {
537
+ R && typeof R == "string" && r.add(R);
535
538
  }
536
- function u(k) {
537
- k && typeof k == "string" && r.delete(k);
539
+ function d(R) {
540
+ R && typeof R == "string" && r.delete(R);
538
541
  }
539
- function d() {
542
+ function v() {
540
543
  return [...r];
541
544
  }
542
- function v(k) {
543
- s = k, i = !1;
545
+ function p(R) {
546
+ console.log("[Bridge] setIframe called, current isReady:", i, "readySignalReceived:", o, "same iframe:", s === R), s !== R && (s = R, o ? (console.log("[Bridge] Ready signal was already received, keeping isReady=true"), i = !0) : i = !1), console.log("[Bridge] setIframe done, isReady:", i, "pendingMessages:", n.length), w();
544
547
  }
545
- function p(k, M = "*") {
548
+ function w() {
549
+ console.log("[Bridge] flushPendingMessages: isReady=", i, "hasIframe=", !!(s != null && s.contentWindow), "pending=", n.length), i && (s != null && s.contentWindow) && n.length > 0 && (console.log("[Bridge] Flushing", n.length, "pending messages"), n.forEach((R) => f(R)), n.length = 0);
550
+ }
551
+ function f(R, T = "*") {
546
552
  if (!(s != null && s.contentWindow))
547
553
  return console.warn("Artifactuse: No panel iframe available"), !1;
548
554
  try {
549
- return s.contentWindow.postMessage(k, M), !0;
550
- } catch (C) {
551
- return console.error("Artifactuse bridge send error:", C), !1;
555
+ return s.contentWindow.postMessage(R, T), !0;
556
+ } catch (E) {
557
+ return console.error("Artifactuse bridge send error:", E), !1;
552
558
  }
553
559
  }
554
- function w(k, M, C = null, P = "*") {
555
- const H = {
560
+ function g(R, T, E = null, k = "*") {
561
+ const M = {
556
562
  type: "artifactuse",
557
- action: k,
558
- data: M,
559
- requestId: C || Ue(),
563
+ action: R,
564
+ data: T,
565
+ requestId: E || Xe(),
560
566
  timestamp: Date.now()
561
567
  };
562
- return i ? (p(H, P), H.requestId) : (o.push(H), H.requestId);
563
- }
564
- function f(k, M, C = 3e4) {
565
- return new Promise((P, H) => {
566
- const $ = Ue(), T = setTimeout(() => {
567
- h(`${k}:response`, R), H(new Error(`Artifactuse bridge request timeout: ${k}`));
568
- }, C), R = (I, Z) => {
569
- Z === $ && (clearTimeout(T), h(`${k}:response`, R), P(I));
568
+ return i ? (f(M, k), M.requestId) : (n.push(M), M.requestId);
569
+ }
570
+ function h(R, T, E = 3e4) {
571
+ return new Promise((k, M) => {
572
+ const A = Xe(), H = setTimeout(() => {
573
+ y(`${R}:response`, P), M(new Error(`Artifactuse bridge request timeout: ${R}`));
574
+ }, E), P = (Z, B) => {
575
+ B === A && (clearTimeout(H), y(`${R}:response`, P), k(Z));
570
576
  };
571
- m(`${k}:response`, R), w(k, M, $);
577
+ m(`${R}:response`, P), g(R, T, A);
572
578
  });
573
579
  }
574
- function m(k, M) {
575
- return a.has(k) || a.set(k, []), a.get(k).push(M), () => h(k, M);
580
+ function m(R, T) {
581
+ return a.has(R) || a.set(R, []), a.get(R).push(T), () => y(R, T);
576
582
  }
577
- function h(k, M) {
578
- const C = a.get(k);
579
- if (C) {
580
- const P = C.indexOf(M);
581
- P > -1 && C.splice(P, 1);
583
+ function y(R, T) {
584
+ const E = a.get(R);
585
+ if (E) {
586
+ const k = E.indexOf(T);
587
+ k > -1 && E.splice(k, 1);
582
588
  }
583
589
  }
584
- function g(k) {
585
- return w("load:artifact", k);
590
+ function b(R) {
591
+ return g("load:artifact", R);
586
592
  }
587
- function y(k, M) {
588
- return w("update:artifact", { artifactId: k, updates: M });
593
+ function x(R, T) {
594
+ return g("update:artifact", { artifactId: R, updates: T });
589
595
  }
590
- function b() {
591
- return f("save", {});
596
+ function $() {
597
+ return h("save", {});
592
598
  }
593
- function x(k = "default") {
594
- return f("export", { format: k });
599
+ function S(R = "default") {
600
+ return h("export", { format: R });
595
601
  }
596
- function A(k, M) {
597
- return w("ai:response", k, M);
602
+ function z(R, T) {
603
+ return g("ai:response", R, T);
598
604
  }
599
- function z() {
600
- window.removeEventListener("message", l), a.clear(), r.clear(), s = null, i = !1, o.length = 0;
605
+ function F() {
606
+ window.removeEventListener("message", c), a.clear(), r.clear(), s = null, i = !1, o = !1, n.length = 0;
601
607
  }
602
608
  return {
603
- setIframe: v,
604
- send: w,
605
- request: f,
609
+ setIframe: p,
610
+ send: g,
611
+ request: h,
606
612
  on: m,
607
- off: h,
608
- loadArtifact: g,
609
- updateArtifact: y,
610
- requestSave: b,
611
- requestExport: x,
612
- sendAIResponse: A,
613
- destroy: z,
613
+ off: y,
614
+ loadArtifact: b,
615
+ updateArtifact: x,
616
+ requestSave: $,
617
+ requestExport: S,
618
+ sendAIResponse: z,
619
+ destroy: F,
614
620
  // Origin management
615
- addAllowedOrigin: c,
616
- removeAllowedOrigin: u,
617
- getAllowedOrigins: d,
621
+ addAllowedOrigin: u,
622
+ removeAllowedOrigin: d,
623
+ getAllowedOrigins: v,
618
624
  // State
619
625
  get isReady() {
620
626
  return i;
@@ -624,10 +630,10 @@ function Pr(e = []) {
624
630
  }
625
631
  };
626
632
  }
627
- function Ue() {
633
+ function Xe() {
628
634
  return `req-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
629
635
  }
630
- function Ir(e) {
636
+ function qr(e) {
631
637
  if (!e) return null;
632
638
  if (typeof e == "string" && e.includes(","))
633
639
  return e.trim();
@@ -637,22 +643,22 @@ function Ir(e) {
637
643
  const r = parseInt(t.slice(0, 2), 16), a = parseInt(t.slice(2, 4), 16), s = parseInt(t.slice(4, 6), 16);
638
644
  return `${r}, ${a}, ${s}`;
639
645
  }
640
- function Zr(e) {
641
- return e ? Ir(e) : null;
646
+ function Hr(e) {
647
+ return e ? qr(e) : null;
642
648
  }
643
- function ie(e) {
649
+ function ne(e) {
644
650
  if (!e || typeof e != "object") return {};
645
651
  const t = {};
646
652
  for (const [r, a] of Object.entries(e))
647
653
  if (r === "gradientOpacity" || typeof a == "number")
648
654
  t[r] = a;
649
655
  else {
650
- const s = Zr(a);
656
+ const s = Hr(a);
651
657
  s && (t[r] = s);
652
658
  }
653
659
  return t;
654
660
  }
655
- const Ge = {
661
+ const We = {
656
662
  // Dark theme
657
663
  dark: {
658
664
  primary: "99, 102, 241",
@@ -722,15 +728,15 @@ const Ge = {
722
728
  gradientOpacity: "0.25"
723
729
  }
724
730
  };
725
- function qr(e = "auto", t = {}) {
731
+ function jr(e = "auto", t = {}) {
726
732
  let r = e, a = {
727
- dark: { ...Ge.dark },
728
- light: { ...Ge.light }
733
+ dark: { ...We.dark },
734
+ light: { ...We.light }
729
735
  };
730
- t.dark && (a.dark = { ...a.dark, ...ie(t.dark) }), t.light && (a.light = { ...a.light, ...ie(t.light) });
736
+ t.dark && (a.dark = { ...a.dark, ...ne(t.dark) }), t.light && (a.light = { ...a.light, ...ne(t.light) });
731
737
  const s = { ...t };
732
738
  if (delete s.dark, delete s.light, Object.keys(s).length > 0) {
733
- const w = ie(s);
739
+ const w = ne(s);
734
740
  a.dark = { ...a.dark, ...w }, a.light = { ...a.light, ...w };
735
741
  }
736
742
  function i() {
@@ -741,14 +747,14 @@ function qr(e = "auto", t = {}) {
741
747
  }
742
748
  function n() {
743
749
  const w = o();
744
- return Object.entries(w).map(([f, m]) => `--artifactuse-${Q(f)}: ${m};`).join(`
750
+ return Object.entries(w).map(([f, g]) => `--artifactuse-${K(f)}: ${g};`).join(`
745
751
  `);
746
752
  }
747
753
  function l(w = document.documentElement) {
748
- const f = o(), m = i();
749
- Object.entries(f).forEach(([h, g]) => {
750
- w.style.setProperty(`--artifactuse-${Q(h)}`, g);
751
- }), w.setAttribute("data-artifactuse-theme", m), w.classList.remove("artifactuse-dark", "artifactuse-light"), w.classList.add(`artifactuse-${m}`);
754
+ const f = o(), g = i();
755
+ Object.entries(f).forEach(([h, m]) => {
756
+ w.style.setProperty(`--artifactuse-${K(h)}`, m);
757
+ }), w.setAttribute("data-artifactuse-theme", g), w.classList.remove("artifactuse-dark", "artifactuse-light"), w.classList.add(`artifactuse-${g}`);
752
758
  }
753
759
  function c(w) {
754
760
  if (!["dark", "light", "auto"].includes(w)) {
@@ -762,33 +768,33 @@ function qr(e = "auto", t = {}) {
762
768
  c(w === "dark" ? "light" : "dark");
763
769
  }
764
770
  function d(w, f = null) {
765
- const m = ie(w);
766
- f ? a[f] = { ...a[f], ...m } : (a.dark = { ...a.dark, ...m }, a.light = { ...a.light, ...m }), l();
771
+ const g = ne(w);
772
+ f ? a[f] = { ...a[f], ...g } : (a.dark = { ...a.dark, ...g }, a.light = { ...a.light, ...g }), l();
767
773
  }
768
774
  function v(w) {
769
- const f = window.matchMedia("(prefers-color-scheme: dark)"), m = (h) => {
775
+ const f = window.matchMedia("(prefers-color-scheme: dark)"), g = (h) => {
770
776
  r === "auto" && (l(), w && w(h.matches ? "dark" : "light"));
771
777
  };
772
- return f.addEventListener("change", m), () => {
773
- f.removeEventListener("change", m);
778
+ return f.addEventListener("change", g), () => {
779
+ f.removeEventListener("change", g);
774
780
  };
775
781
  }
776
782
  function p() {
777
783
  return `
778
784
  :root,
779
785
  [data-artifactuse-theme="dark"] {
780
- ${Object.entries(a.dark).map(([w, f]) => `--artifactuse-${Q(w)}: ${f};`).join(`
786
+ ${Object.entries(a.dark).map(([w, f]) => `--artifactuse-${K(w)}: ${f};`).join(`
781
787
  `)}
782
788
  }
783
789
 
784
790
  [data-artifactuse-theme="light"] {
785
- ${Object.entries(a.light).map(([w, f]) => `--artifactuse-${Q(w)}: ${f};`).join(`
791
+ ${Object.entries(a.light).map(([w, f]) => `--artifactuse-${K(w)}: ${f};`).join(`
786
792
  `)}
787
793
  }
788
794
 
789
795
  @media (prefers-color-scheme: light) {
790
796
  :root:not([data-artifactuse-theme]) {
791
- ${Object.entries(a.light).map(([w, f]) => `--artifactuse-${Q(w)}: ${f};`).join(`
797
+ ${Object.entries(a.light).map(([w, f]) => `--artifactuse-${K(w)}: ${f};`).join(`
792
798
  `)}
793
799
  }
794
800
  }
@@ -815,59 +821,59 @@ function qr(e = "auto", t = {}) {
815
821
  watchSystemTheme: v
816
822
  };
817
823
  }
818
- function Q(e) {
824
+ function K(e) {
819
825
  return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
820
826
  }
821
- function Ie() {
827
+ function qe() {
822
828
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
823
829
  }
824
- var X = Ie();
825
- function Kt(e) {
826
- X = e;
830
+ var W = qe();
831
+ function Yt(e) {
832
+ W = e;
827
833
  }
828
- var re = { exec: () => null };
829
- function S(e, t = "") {
834
+ var ae = { exec: () => null };
835
+ function L(e, t = "") {
830
836
  let r = typeof e == "string" ? e : e.source, a = { replace: (s, i) => {
831
837
  let o = typeof i == "string" ? i : i.source;
832
- return o = o.replace(E.caret, "$1"), r = r.replace(s, o), a;
838
+ return o = o.replace(I.caret, "$1"), r = r.replace(s, o), a;
833
839
  }, getRegex: () => new RegExp(r, t) };
834
840
  return a;
835
841
  }
836
- var Hr = (() => {
842
+ var Dr = (() => {
837
843
  try {
838
844
  return !!new RegExp("(?<=1)(?<!1)");
839
845
  } catch {
840
846
  return !1;
841
847
  }
842
- })(), E = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (e) => new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}#`), htmlBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}<(?:[a-z].*>|!--)`, "i") }, jr = /^(?:[ \t]*(?:\n|$))+/, Dr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Or = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ae = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Vr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ze = /(?:[*+-]|\d{1,9}[.)])/, Jt = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Yt = S(Jt).replace(/bull/g, Ze).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Br = S(Jt).replace(/bull/g, Ze).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), qe = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Fr = /^[^\n]+/, He = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Nr = S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", He).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Ur = S(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Ze).getRegex(), ge = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", je = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Gr = S("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", je).replace("tag", ge).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), er = S(qe).replace("hr", ae).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ge).getRegex(), Xr = S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", er).getRegex(), De = { blockquote: Xr, code: Dr, def: Nr, fences: Or, heading: Vr, hr: ae, html: Gr, lheading: Yt, list: Ur, newline: jr, paragraph: er, table: re, text: Fr }, Xe = S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ae).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ge).getRegex(), Wr = { ...De, lheading: Br, table: Xe, paragraph: S(qe).replace("hr", ae).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Xe).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ge).getRegex() }, Qr = { ...De, html: S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", je).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: re, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: S(qe).replace("hr", ae).replace("heading", ` *#{1,6} *[^
843
- ]`).replace("lheading", Yt).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Kr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Jr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, tr = /^( {2,}|\\)\n(?!\s*$)/, Yr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, me = /[\p{P}\p{S}]/u, Oe = /[\s\p{P}\p{S}]/u, rr = /[^\s\p{P}\p{S}]/u, ea = S(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Oe).getRegex(), ar = /(?!~)[\p{P}\p{S}]/u, ta = /(?!~)[\s\p{P}\p{S}]/u, ra = /(?:[^\s\p{P}\p{S}]|~)/u, aa = S(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Hr ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), sr = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, sa = S(sr, "u").replace(/punct/g, me).getRegex(), ia = S(sr, "u").replace(/punct/g, ar).getRegex(), ir = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", na = S(ir, "gu").replace(/notPunctSpace/g, rr).replace(/punctSpace/g, Oe).replace(/punct/g, me).getRegex(), oa = S(ir, "gu").replace(/notPunctSpace/g, ra).replace(/punctSpace/g, ta).replace(/punct/g, ar).getRegex(), ca = S("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, rr).replace(/punctSpace/g, Oe).replace(/punct/g, me).getRegex(), la = S(/\\(punct)/, "gu").replace(/punct/g, me).getRegex(), ua = S(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), pa = S(je).replace("(?:-->|$)", "-->").getRegex(), da = S("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", pa).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), le = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, fa = S(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", le).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), nr = S(/^!?\[(label)\]\[(ref)\]/).replace("label", le).replace("ref", He).getRegex(), or = S(/^!?\[(ref)\](?:\[\])?/).replace("ref", He).getRegex(), ha = S("reflink|nolink(?!\\()", "g").replace("reflink", nr).replace("nolink", or).getRegex(), We = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Ve = { _backpedal: re, anyPunctuation: la, autolink: ua, blockSkip: aa, br: tr, code: Jr, del: re, emStrongLDelim: sa, emStrongRDelimAst: na, emStrongRDelimUnd: ca, escape: Kr, link: fa, nolink: or, punctuation: ea, reflink: nr, reflinkSearch: ha, tag: da, text: Yr, url: re }, ga = { ...Ve, link: S(/^!?\[(label)\]\((.*?)\)/).replace("label", le).getRegex(), reflink: S(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", le).getRegex() }, $e = { ...Ve, emStrongRDelimAst: oa, emStrongLDelim: ia, url: S(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", We).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: S(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", We).getRegex() }, ma = { ...$e, br: S(tr).replace("{2,}", "*").getRegex(), text: S($e.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ne = { normal: De, gfm: Wr, pedantic: Qr }, K = { normal: Ve, gfm: $e, breaks: ma, pedantic: ga }, wa = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Qe = (e) => wa[e];
844
- function V(e, t) {
848
+ })(), I = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (e) => new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}#`), htmlBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}<(?:[a-z].*>|!--)`, "i") }, Or = /^(?:[ \t]*(?:\n|$))+/, Br = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Vr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, se = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Fr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, He = /(?:[*+-]|\d{1,9}[.)])/, er = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, tr = L(er).replace(/bull/g, He).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Nr = L(er).replace(/bull/g, He).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), je = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Ur = /^[^\n]+/, De = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Gr = L(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", De).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Xr = L(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, He).getRegex(), me = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Oe = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Wr = L("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", Oe).replace("tag", me).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), rr = L(je).replace("hr", se).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", me).getRegex(), Qr = L(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", rr).getRegex(), Be = { blockquote: Qr, code: Br, def: Gr, fences: Vr, heading: Fr, hr: se, html: Wr, lheading: tr, list: Xr, newline: Or, paragraph: rr, table: ae, text: Ur }, Qe = L("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", se).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", me).getRegex(), Kr = { ...Be, lheading: Nr, table: Qe, paragraph: L(je).replace("hr", se).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Qe).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", me).getRegex() }, Jr = { ...Be, html: L(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Oe).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: ae, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: L(je).replace("hr", se).replace("heading", ` *#{1,6} *[^
849
+ ]`).replace("lheading", tr).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Yr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ea = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ar = /^( {2,}|\\)\n(?!\s*$)/, ta = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, we = /[\p{P}\p{S}]/u, Ve = /[\s\p{P}\p{S}]/u, sr = /[^\s\p{P}\p{S}]/u, ra = L(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Ve).getRegex(), ir = /(?!~)[\p{P}\p{S}]/u, aa = /(?!~)[\s\p{P}\p{S}]/u, sa = /(?:[^\s\p{P}\p{S}]|~)/u, ia = L(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Dr ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), nr = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, na = L(nr, "u").replace(/punct/g, we).getRegex(), oa = L(nr, "u").replace(/punct/g, ir).getRegex(), or = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", ca = L(or, "gu").replace(/notPunctSpace/g, sr).replace(/punctSpace/g, Ve).replace(/punct/g, we).getRegex(), la = L(or, "gu").replace(/notPunctSpace/g, sa).replace(/punctSpace/g, aa).replace(/punct/g, ir).getRegex(), ua = L("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, sr).replace(/punctSpace/g, Ve).replace(/punct/g, we).getRegex(), pa = L(/\\(punct)/, "gu").replace(/punct/g, we).getRegex(), da = L(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), fa = L(Oe).replace("(?:-->|$)", "-->").getRegex(), ha = L("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", fa).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), ue = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, ga = L(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", ue).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), cr = L(/^!?\[(label)\]\[(ref)\]/).replace("label", ue).replace("ref", De).getRegex(), lr = L(/^!?\[(ref)\](?:\[\])?/).replace("ref", De).getRegex(), ma = L("reflink|nolink(?!\\()", "g").replace("reflink", cr).replace("nolink", lr).getRegex(), Ke = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Fe = { _backpedal: ae, anyPunctuation: pa, autolink: da, blockSkip: ia, br: ar, code: ea, del: ae, emStrongLDelim: na, emStrongRDelimAst: ca, emStrongRDelimUnd: ua, escape: Yr, link: ga, nolink: lr, punctuation: ra, reflink: cr, reflinkSearch: ma, tag: ha, text: ta, url: ae }, wa = { ...Fe, link: L(/^!?\[(label)\]\((.*?)\)/).replace("label", ue).getRegex(), reflink: L(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", ue).getRegex() }, Ae = { ...Fe, emStrongRDelimAst: la, emStrongLDelim: oa, url: L(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Ke).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: L(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Ke).getRegex() }, ba = { ...Ae, br: L(ar).replace("{2,}", "*").getRegex(), text: L(Ae.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, oe = { normal: Be, gfm: Kr, pedantic: Jr }, J = { normal: Fe, gfm: Ae, breaks: ba, pedantic: wa }, va = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Je = (e) => va[e];
850
+ function O(e, t) {
845
851
  if (t) {
846
- if (E.escapeTest.test(e)) return e.replace(E.escapeReplace, Qe);
847
- } else if (E.escapeTestNoEncode.test(e)) return e.replace(E.escapeReplaceNoEncode, Qe);
852
+ if (I.escapeTest.test(e)) return e.replace(I.escapeReplace, Je);
853
+ } else if (I.escapeTestNoEncode.test(e)) return e.replace(I.escapeReplaceNoEncode, Je);
848
854
  return e;
849
855
  }
850
- function Ke(e) {
856
+ function Ye(e) {
851
857
  try {
852
- e = encodeURI(e).replace(E.percentDecode, "%");
858
+ e = encodeURI(e).replace(I.percentDecode, "%");
853
859
  } catch {
854
860
  return null;
855
861
  }
856
862
  return e;
857
863
  }
858
- function Je(e, t) {
864
+ function et(e, t) {
859
865
  var i;
860
- let r = e.replace(E.findPipe, (o, n, l) => {
866
+ let r = e.replace(I.findPipe, (o, n, l) => {
861
867
  let c = !1, u = n;
862
868
  for (; --u >= 0 && l[u] === "\\"; ) c = !c;
863
869
  return c ? "|" : " |";
864
- }), a = r.split(E.splitPipe), s = 0;
870
+ }), a = r.split(I.splitPipe), s = 0;
865
871
  if (a[0].trim() || a.shift(), a.length > 0 && !((i = a.at(-1)) != null && i.trim()) && a.pop(), t) if (a.length > t) a.splice(t);
866
872
  else for (; a.length < t; ) a.push("");
867
- for (; s < a.length; s++) a[s] = a[s].trim().replace(E.slashPipe, "|");
873
+ for (; s < a.length; s++) a[s] = a[s].trim().replace(I.slashPipe, "|");
868
874
  return a;
869
875
  }
870
- function J(e, t, r) {
876
+ function Y(e, t, r) {
871
877
  let a = e.length;
872
878
  if (a === 0) return "";
873
879
  let s = 0;
@@ -875,7 +881,7 @@ function J(e, t, r) {
875
881
  s++;
876
882
  return e.slice(0, a - s);
877
883
  }
878
- function ba(e, t) {
884
+ function ya(e, t) {
879
885
  if (e.indexOf(t[1]) === -1) return -1;
880
886
  let r = 0;
881
887
  for (let a = 0; a < e.length; a++) if (e[a] === "\\") a++;
@@ -883,13 +889,13 @@ function ba(e, t) {
883
889
  else if (e[a] === t[1] && (r--, r < 0)) return a;
884
890
  return r > 0 ? -2 : -1;
885
891
  }
886
- function Ye(e, t, r, a, s) {
892
+ function tt(e, t, r, a, s) {
887
893
  let i = t.href, o = t.title || null, n = e[1].replace(s.other.outputLinkReplace, "$1");
888
894
  a.state.inLink = !0;
889
895
  let l = { type: e[0].charAt(0) === "!" ? "image" : "link", raw: r, href: i, title: o, text: n, tokens: a.inlineTokens(n) };
890
896
  return a.state.inLink = !1, l;
891
897
  }
892
- function va(e, t, r) {
898
+ function ka(e, t, r) {
893
899
  let a = e.match(r.other.indentCodeCompensation);
894
900
  if (a === null) return t;
895
901
  let s = a[1];
@@ -902,12 +908,12 @@ function va(e, t, r) {
902
908
  }).join(`
903
909
  `);
904
910
  }
905
- var ue = class {
911
+ var pe = class {
906
912
  constructor(e) {
907
- _(this, "options");
908
- _(this, "rules");
909
- _(this, "lexer");
910
- this.options = e || X;
913
+ C(this, "options");
914
+ C(this, "rules");
915
+ C(this, "lexer");
916
+ this.options = e || W;
911
917
  }
912
918
  space(e) {
913
919
  let t = this.rules.block.newline.exec(e);
@@ -917,14 +923,14 @@ var ue = class {
917
923
  let t = this.rules.block.code.exec(e);
918
924
  if (t) {
919
925
  let r = t[0].replace(this.rules.other.codeRemoveIndent, "");
920
- return { type: "code", raw: t[0], codeBlockStyle: "indented", text: this.options.pedantic ? r : J(r, `
926
+ return { type: "code", raw: t[0], codeBlockStyle: "indented", text: this.options.pedantic ? r : Y(r, `
921
927
  `) };
922
928
  }
923
929
  }
924
930
  fences(e) {
925
931
  let t = this.rules.block.fences.exec(e);
926
932
  if (t) {
927
- let r = t[0], a = va(r, t[3] || "", this.rules);
933
+ let r = t[0], a = ka(r, t[3] || "", this.rules);
928
934
  return { type: "code", raw: r, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: a };
929
935
  }
930
936
  }
@@ -933,7 +939,7 @@ var ue = class {
933
939
  if (t) {
934
940
  let r = t[2].trim();
935
941
  if (this.rules.other.endingHash.test(r)) {
936
- let a = J(r, "#");
942
+ let a = Y(r, "#");
937
943
  (this.options.pedantic || !a || this.rules.other.endingSpaceChar.test(a)) && (r = a.trim());
938
944
  }
939
945
  return { type: "heading", raw: t[0], depth: t[1].length, text: r, tokens: this.lexer.inline(r) };
@@ -941,13 +947,13 @@ var ue = class {
941
947
  }
942
948
  hr(e) {
943
949
  let t = this.rules.block.hr.exec(e);
944
- if (t) return { type: "hr", raw: J(t[0], `
950
+ if (t) return { type: "hr", raw: Y(t[0], `
945
951
  `) };
946
952
  }
947
953
  blockquote(e) {
948
954
  let t = this.rules.block.blockquote.exec(e);
949
955
  if (t) {
950
- let r = J(t[0], `
956
+ let r = Y(t[0], `
951
957
  `).split(`
952
958
  `), a = "", s = "", i = [];
953
959
  for (; r.length > 0; ) {
@@ -997,23 +1003,23 @@ ${u}` : u;
997
1003
  d = t[0], e = e.substring(d.length);
998
1004
  let p = t[2].split(`
999
1005
  `, 1)[0].replace(this.rules.other.listReplaceTabs, (h) => " ".repeat(3 * h.length)), w = e.split(`
1000
- `, 1)[0], f = !p.trim(), m = 0;
1001
- if (this.options.pedantic ? (m = 2, v = p.trimStart()) : f ? m = t[1].length + 1 : (m = t[2].search(this.rules.other.nonSpaceChar), m = m > 4 ? 1 : m, v = p.slice(m), m += t[1].length), f && this.rules.other.blankLine.test(w) && (d += w + `
1006
+ `, 1)[0], f = !p.trim(), g = 0;
1007
+ if (this.options.pedantic ? (g = 2, v = p.trimStart()) : f ? g = t[1].length + 1 : (g = t[2].search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, v = p.slice(g), g += t[1].length), f && this.rules.other.blankLine.test(w) && (d += w + `
1002
1008
  `, e = e.substring(w.length + 1), u = !0), !u) {
1003
- let h = this.rules.other.nextBulletRegex(m), g = this.rules.other.hrRegex(m), y = this.rules.other.fencesBeginRegex(m), b = this.rules.other.headingBeginRegex(m), x = this.rules.other.htmlBeginRegex(m);
1009
+ let h = this.rules.other.nextBulletRegex(g), m = this.rules.other.hrRegex(g), y = this.rules.other.fencesBeginRegex(g), b = this.rules.other.headingBeginRegex(g), x = this.rules.other.htmlBeginRegex(g);
1004
1010
  for (; e; ) {
1005
- let A = e.split(`
1006
- `, 1)[0], z;
1007
- if (w = A, this.options.pedantic ? (w = w.replace(this.rules.other.listReplaceNesting, " "), z = w) : z = w.replace(this.rules.other.tabCharGlobal, " "), y.test(w) || b.test(w) || x.test(w) || h.test(w) || g.test(w)) break;
1008
- if (z.search(this.rules.other.nonSpaceChar) >= m || !w.trim()) v += `
1009
- ` + z.slice(m);
1011
+ let $ = e.split(`
1012
+ `, 1)[0], S;
1013
+ if (w = $, this.options.pedantic ? (w = w.replace(this.rules.other.listReplaceNesting, " "), S = w) : S = w.replace(this.rules.other.tabCharGlobal, " "), y.test(w) || b.test(w) || x.test(w) || h.test(w) || m.test(w)) break;
1014
+ if (S.search(this.rules.other.nonSpaceChar) >= g || !w.trim()) v += `
1015
+ ` + S.slice(g);
1010
1016
  else {
1011
- if (f || p.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || y.test(p) || b.test(p) || g.test(p)) break;
1017
+ if (f || p.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || y.test(p) || b.test(p) || m.test(p)) break;
1012
1018
  v += `
1013
1019
  ` + w;
1014
1020
  }
1015
- !f && !w.trim() && (f = !0), d += A + `
1016
- `, e = e.substring(A.length + 1), p = z.slice(m);
1021
+ !f && !w.trim() && (f = !0), d += $ + `
1022
+ `, e = e.substring($.length + 1), p = S.slice(g);
1017
1023
  }
1018
1024
  }
1019
1025
  o.loose || (l ? o.loose = !0 : this.rules.other.doubleBlankLine.test(d) && (l = !0)), o.items.push({ type: "list_item", raw: d, task: !!this.options.gfm && this.rules.other.listIsTask.test(v), loose: !1, text: v, tokens: [] }), o.raw += d;
@@ -1064,12 +1070,12 @@ ${u}` : u;
1064
1070
  var o;
1065
1071
  let t = this.rules.block.table.exec(e);
1066
1072
  if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
1067
- let r = Je(t[1]), a = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), s = (o = t[3]) != null && o.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
1073
+ let r = et(t[1]), a = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), s = (o = t[3]) != null && o.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
1068
1074
  `) : [], i = { type: "table", raw: t[0], header: [], align: [], rows: [] };
1069
1075
  if (r.length === a.length) {
1070
1076
  for (let n of a) this.rules.other.tableAlignRight.test(n) ? i.align.push("right") : this.rules.other.tableAlignCenter.test(n) ? i.align.push("center") : this.rules.other.tableAlignLeft.test(n) ? i.align.push("left") : i.align.push(null);
1071
1077
  for (let n = 0; n < r.length; n++) i.header.push({ text: r[n], tokens: this.lexer.inline(r[n]), header: !0, align: i.align[n] });
1072
- for (let n of s) i.rows.push(Je(n, i.header.length).map((l, c) => ({ text: l, tokens: this.lexer.inline(l), header: !1, align: i.align[c] })));
1078
+ for (let n of s) i.rows.push(et(n, i.header.length).map((l, c) => ({ text: l, tokens: this.lexer.inline(l), header: !1, align: i.align[c] })));
1073
1079
  return i;
1074
1080
  }
1075
1081
  }
@@ -1103,10 +1109,10 @@ ${u}` : u;
1103
1109
  let r = t[2].trim();
1104
1110
  if (!this.options.pedantic && this.rules.other.startAngleBracket.test(r)) {
1105
1111
  if (!this.rules.other.endAngleBracket.test(r)) return;
1106
- let i = J(r.slice(0, -1), "\\");
1112
+ let i = Y(r.slice(0, -1), "\\");
1107
1113
  if ((r.length - i.length) % 2 === 0) return;
1108
1114
  } else {
1109
- let i = ba(t[2], "()");
1115
+ let i = ya(t[2], "()");
1110
1116
  if (i === -2) return;
1111
1117
  if (i > -1) {
1112
1118
  let o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + i;
@@ -1118,7 +1124,7 @@ ${u}` : u;
1118
1124
  let i = this.rules.other.pedanticHrefTitle.exec(a);
1119
1125
  i && (a = i[1], s = i[3]);
1120
1126
  } else s = t[3] ? t[3].slice(1, -1) : "";
1121
- return a = a.trim(), this.rules.other.startAngleBracket.test(a) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? a = a.slice(1) : a = a.slice(1, -1)), Ye(t, { href: a && a.replace(this.rules.inline.anyPunctuation, "$1"), title: s && s.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
1127
+ return a = a.trim(), this.rules.other.startAngleBracket.test(a) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? a = a.slice(1) : a = a.slice(1, -1)), tt(t, { href: a && a.replace(this.rules.inline.anyPunctuation, "$1"), title: s && s.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
1122
1128
  }
1123
1129
  }
1124
1130
  reflink(e, t) {
@@ -1129,7 +1135,7 @@ ${u}` : u;
1129
1135
  let i = r[0].charAt(0);
1130
1136
  return { type: "text", raw: i, text: i };
1131
1137
  }
1132
- return Ye(r, s, r[0], this.lexer, this.rules);
1138
+ return tt(r, s, r[0], this.lexer, this.rules);
1133
1139
  }
1134
1140
  }
1135
1141
  emStrong(e, t, r = "") {
@@ -1202,28 +1208,28 @@ ${u}` : u;
1202
1208
  return { type: "text", raw: t[0], text: t[0], escaped: r };
1203
1209
  }
1204
1210
  }
1205
- }, j = class Ae {
1211
+ }, j = class ze {
1206
1212
  constructor(t) {
1207
- _(this, "tokens");
1208
- _(this, "options");
1209
- _(this, "state");
1210
- _(this, "inlineQueue");
1211
- _(this, "tokenizer");
1212
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || X, this.options.tokenizer = this.options.tokenizer || new ue(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1213
- let r = { other: E, block: ne.normal, inline: K.normal };
1214
- this.options.pedantic ? (r.block = ne.pedantic, r.inline = K.pedantic) : this.options.gfm && (r.block = ne.gfm, this.options.breaks ? r.inline = K.breaks : r.inline = K.gfm), this.tokenizer.rules = r;
1213
+ C(this, "tokens");
1214
+ C(this, "options");
1215
+ C(this, "state");
1216
+ C(this, "inlineQueue");
1217
+ C(this, "tokenizer");
1218
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || W, this.options.tokenizer = this.options.tokenizer || new pe(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1219
+ let r = { other: I, block: oe.normal, inline: J.normal };
1220
+ this.options.pedantic ? (r.block = oe.pedantic, r.inline = J.pedantic) : this.options.gfm && (r.block = oe.gfm, this.options.breaks ? r.inline = J.breaks : r.inline = J.gfm), this.tokenizer.rules = r;
1215
1221
  }
1216
1222
  static get rules() {
1217
- return { block: ne, inline: K };
1223
+ return { block: oe, inline: J };
1218
1224
  }
1219
1225
  static lex(t, r) {
1220
- return new Ae(r).lex(t);
1226
+ return new ze(r).lex(t);
1221
1227
  }
1222
1228
  static lexInline(t, r) {
1223
- return new Ae(r).inlineTokens(t);
1229
+ return new ze(r).inlineTokens(t);
1224
1230
  }
1225
1231
  lex(t) {
1226
- t = t.replace(E.carriageReturn, `
1232
+ t = t.replace(I.carriageReturn, `
1227
1233
  `), this.blockTokens(t, this.tokens);
1228
1234
  for (let r = 0; r < this.inlineQueue.length; r++) {
1229
1235
  let a = this.inlineQueue[r];
@@ -1233,7 +1239,7 @@ ${u}` : u;
1233
1239
  }
1234
1240
  blockTokens(t, r = [], a = !1) {
1235
1241
  var s, i, o;
1236
- for (this.options.pedantic && (t = t.replace(E.tabCharGlobal, " ").replace(E.spaceLine, "")); t; ) {
1242
+ for (this.options.pedantic && (t = t.replace(I.tabCharGlobal, " ").replace(I.spaceLine, "")); t; ) {
1237
1243
  let n;
1238
1244
  if ((i = (s = this.options.extensions) == null ? void 0 : s.block) != null && i.some((c) => (n = c.call({ lexer: this }, t, r)) ? (t = t.substring(n.raw.length), r.push(n), !0) : !1)) continue;
1239
1245
  if (n = this.tokenizer.space(t)) {
@@ -1390,9 +1396,9 @@ ${u}` : u;
1390
1396
  }
1391
1397
  let w = t;
1392
1398
  if ((v = this.options.extensions) != null && v.startInline) {
1393
- let f = 1 / 0, m = t.slice(1), h;
1394
- this.options.extensions.startInline.forEach((g) => {
1395
- h = g.call({ lexer: this }, m), typeof h == "number" && h >= 0 && (f = Math.min(f, h));
1399
+ let f = 1 / 0, g = t.slice(1), h;
1400
+ this.options.extensions.startInline.forEach((m) => {
1401
+ h = m.call({ lexer: this }, g), typeof h == "number" && h >= 0 && (f = Math.min(f, h));
1396
1402
  }), f < 1 / 0 && f >= 0 && (w = t.substring(0, f + 1));
1397
1403
  }
1398
1404
  if (p = this.tokenizer.inlineText(w)) {
@@ -1411,21 +1417,21 @@ ${u}` : u;
1411
1417
  }
1412
1418
  return r;
1413
1419
  }
1414
- }, pe = class {
1420
+ }, de = class {
1415
1421
  constructor(e) {
1416
- _(this, "options");
1417
- _(this, "parser");
1418
- this.options = e || X;
1422
+ C(this, "options");
1423
+ C(this, "parser");
1424
+ this.options = e || W;
1419
1425
  }
1420
1426
  space(e) {
1421
1427
  return "";
1422
1428
  }
1423
1429
  code({ text: e, lang: t, escaped: r }) {
1424
1430
  var i;
1425
- let a = (i = (t || "").match(E.notSpaceStart)) == null ? void 0 : i[0], s = e.replace(E.endingNewline, "") + `
1431
+ let a = (i = (t || "").match(I.notSpaceStart)) == null ? void 0 : i[0], s = e.replace(I.endingNewline, "") + `
1426
1432
  `;
1427
- return a ? '<pre><code class="language-' + V(a) + '">' + (r ? s : V(s, !0)) + `</code></pre>
1428
- ` : "<pre><code>" + (r ? s : V(s, !0)) + `</code></pre>
1433
+ return a ? '<pre><code class="language-' + O(a) + '">' + (r ? s : O(s, !0)) + `</code></pre>
1434
+ ` : "<pre><code>" + (r ? s : O(s, !0)) + `</code></pre>
1429
1435
  `;
1430
1436
  }
1431
1437
  blockquote({ tokens: e }) {
@@ -1503,7 +1509,7 @@ ${e}</tr>
1503
1509
  return `<em>${this.parser.parseInline(e)}</em>`;
1504
1510
  }
1505
1511
  codespan({ text: e }) {
1506
- return `<code>${V(e, !0)}</code>`;
1512
+ return `<code>${O(e, !0)}</code>`;
1507
1513
  }
1508
1514
  br(e) {
1509
1515
  return "<br>";
@@ -1512,24 +1518,24 @@ ${e}</tr>
1512
1518
  return `<del>${this.parser.parseInline(e)}</del>`;
1513
1519
  }
1514
1520
  link({ href: e, title: t, tokens: r }) {
1515
- let a = this.parser.parseInline(r), s = Ke(e);
1521
+ let a = this.parser.parseInline(r), s = Ye(e);
1516
1522
  if (s === null) return a;
1517
1523
  e = s;
1518
1524
  let i = '<a href="' + e + '"';
1519
- return t && (i += ' title="' + V(t) + '"'), i += ">" + a + "</a>", i;
1525
+ return t && (i += ' title="' + O(t) + '"'), i += ">" + a + "</a>", i;
1520
1526
  }
1521
1527
  image({ href: e, title: t, text: r, tokens: a }) {
1522
1528
  a && (r = this.parser.parseInline(a, this.parser.textRenderer));
1523
- let s = Ke(e);
1524
- if (s === null) return V(r);
1529
+ let s = Ye(e);
1530
+ if (s === null) return O(r);
1525
1531
  e = s;
1526
1532
  let i = `<img src="${e}" alt="${r}"`;
1527
- return t && (i += ` title="${V(t)}"`), i += ">", i;
1533
+ return t && (i += ` title="${O(t)}"`), i += ">", i;
1528
1534
  }
1529
1535
  text(e) {
1530
- return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : V(e.text);
1536
+ return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : O(e.text);
1531
1537
  }
1532
- }, Be = class {
1538
+ }, Ne = class {
1533
1539
  strong({ text: e }) {
1534
1540
  return e;
1535
1541
  }
@@ -1560,18 +1566,18 @@ ${e}</tr>
1560
1566
  checkbox({ raw: e }) {
1561
1567
  return e;
1562
1568
  }
1563
- }, D = class Re {
1569
+ }, D = class Se {
1564
1570
  constructor(t) {
1565
- _(this, "options");
1566
- _(this, "renderer");
1567
- _(this, "textRenderer");
1568
- this.options = t || X, this.options.renderer = this.options.renderer || new pe(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Be();
1571
+ C(this, "options");
1572
+ C(this, "renderer");
1573
+ C(this, "textRenderer");
1574
+ this.options = t || W, this.options.renderer = this.options.renderer || new de(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Ne();
1569
1575
  }
1570
1576
  static parse(t, r) {
1571
- return new Re(r).parse(t);
1577
+ return new Se(r).parse(t);
1572
1578
  }
1573
1579
  static parseInline(t, r) {
1574
- return new Re(r).parseInline(t);
1580
+ return new Se(r).parseInline(t);
1575
1581
  }
1576
1582
  parse(t) {
1577
1583
  var a, s;
@@ -1711,11 +1717,11 @@ ${e}</tr>
1711
1717
  }
1712
1718
  return a;
1713
1719
  }
1714
- }, ce, ee = (ce = class {
1720
+ }, le, te = (le = class {
1715
1721
  constructor(e) {
1716
- _(this, "options");
1717
- _(this, "block");
1718
- this.options = e || X;
1722
+ C(this, "options");
1723
+ C(this, "block");
1724
+ this.options = e || W;
1719
1725
  }
1720
1726
  preprocess(e) {
1721
1727
  return e;
@@ -1735,18 +1741,18 @@ ${e}</tr>
1735
1741
  provideParser() {
1736
1742
  return this.block ? D.parse : D.parseInline;
1737
1743
  }
1738
- }, _(ce, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), _(ce, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), ce), ya = class {
1744
+ }, C(le, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), C(le, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), le), xa = class {
1739
1745
  constructor(...e) {
1740
- _(this, "defaults", Ie());
1741
- _(this, "options", this.setOptions);
1742
- _(this, "parse", this.parseMarkdown(!0));
1743
- _(this, "parseInline", this.parseMarkdown(!1));
1744
- _(this, "Parser", D);
1745
- _(this, "Renderer", pe);
1746
- _(this, "TextRenderer", Be);
1747
- _(this, "Lexer", j);
1748
- _(this, "Tokenizer", ue);
1749
- _(this, "Hooks", ee);
1746
+ C(this, "defaults", qe());
1747
+ C(this, "options", this.setOptions);
1748
+ C(this, "parse", this.parseMarkdown(!0));
1749
+ C(this, "parseInline", this.parseMarkdown(!1));
1750
+ C(this, "Parser", D);
1751
+ C(this, "Renderer", de);
1752
+ C(this, "TextRenderer", Ne);
1753
+ C(this, "Lexer", j);
1754
+ C(this, "Tokenizer", pe);
1755
+ C(this, "Hooks", te);
1750
1756
  this.use(...e);
1751
1757
  }
1752
1758
  walkTokens(e, t) {
@@ -1794,7 +1800,7 @@ ${e}</tr>
1794
1800
  }
1795
1801
  "childTokens" in s && s.childTokens && (t.childTokens[s.name] = s.childTokens);
1796
1802
  }), a.extensions = t), r.renderer) {
1797
- let s = this.defaults.renderer || new pe(this.defaults);
1803
+ let s = this.defaults.renderer || new de(this.defaults);
1798
1804
  for (let i in r.renderer) {
1799
1805
  if (!(i in s)) throw new Error(`renderer '${i}' does not exist`);
1800
1806
  if (["options", "parser"].includes(i)) continue;
@@ -1807,7 +1813,7 @@ ${e}</tr>
1807
1813
  a.renderer = s;
1808
1814
  }
1809
1815
  if (r.tokenizer) {
1810
- let s = this.defaults.tokenizer || new ue(this.defaults);
1816
+ let s = this.defaults.tokenizer || new pe(this.defaults);
1811
1817
  for (let i in r.tokenizer) {
1812
1818
  if (!(i in s)) throw new Error(`tokenizer '${i}' does not exist`);
1813
1819
  if (["options", "rules", "lexer"].includes(i)) continue;
@@ -1820,13 +1826,13 @@ ${e}</tr>
1820
1826
  a.tokenizer = s;
1821
1827
  }
1822
1828
  if (r.hooks) {
1823
- let s = this.defaults.hooks || new ee();
1829
+ let s = this.defaults.hooks || new te();
1824
1830
  for (let i in r.hooks) {
1825
1831
  if (!(i in s)) throw new Error(`hook '${i}' does not exist`);
1826
1832
  if (["options", "block"].includes(i)) continue;
1827
1833
  let o = i, n = r.hooks[o], l = s[o];
1828
- ee.passThroughHooks.has(i) ? s[o] = (c) => {
1829
- if (this.defaults.async && ee.passThroughHooksRespectAsync.has(i)) return (async () => {
1834
+ te.passThroughHooks.has(i) ? s[o] = (c) => {
1835
+ if (this.defaults.async && te.passThroughHooksRespectAsync.has(i)) return (async () => {
1830
1836
  let d = await n.call(s, c);
1831
1837
  return l.call(s, d);
1832
1838
  })();
@@ -1889,47 +1895,47 @@ ${e}</tr>
1889
1895
  return (r) => {
1890
1896
  if (r.message += `
1891
1897
  Please report this to https://github.com/markedjs/marked.`, e) {
1892
- let a = "<p>An error occurred:</p><pre>" + V(r.message + "", !0) + "</pre>";
1898
+ let a = "<p>An error occurred:</p><pre>" + O(r.message + "", !0) + "</pre>";
1893
1899
  return t ? Promise.resolve(a) : a;
1894
1900
  }
1895
1901
  if (t) return Promise.reject(r);
1896
1902
  throw r;
1897
1903
  };
1898
1904
  }
1899
- }, U = new ya();
1900
- function L(e, t) {
1901
- return U.parse(e, t);
1905
+ }, G = new xa();
1906
+ function _(e, t) {
1907
+ return G.parse(e, t);
1902
1908
  }
1903
- L.options = L.setOptions = function(e) {
1904
- return U.setOptions(e), L.defaults = U.defaults, Kt(L.defaults), L;
1909
+ _.options = _.setOptions = function(e) {
1910
+ return G.setOptions(e), _.defaults = G.defaults, Yt(_.defaults), _;
1905
1911
  };
1906
- L.getDefaults = Ie;
1907
- L.defaults = X;
1908
- L.use = function(...e) {
1909
- return U.use(...e), L.defaults = U.defaults, Kt(L.defaults), L;
1912
+ _.getDefaults = qe;
1913
+ _.defaults = W;
1914
+ _.use = function(...e) {
1915
+ return G.use(...e), _.defaults = G.defaults, Yt(_.defaults), _;
1910
1916
  };
1911
- L.walkTokens = function(e, t) {
1912
- return U.walkTokens(e, t);
1917
+ _.walkTokens = function(e, t) {
1918
+ return G.walkTokens(e, t);
1913
1919
  };
1914
- L.parseInline = U.parseInline;
1915
- L.Parser = D;
1916
- L.parser = D.parse;
1917
- L.Renderer = pe;
1918
- L.TextRenderer = Be;
1919
- L.Lexer = j;
1920
- L.lexer = j.lex;
1921
- L.Tokenizer = ue;
1922
- L.Hooks = ee;
1923
- L.parse = L;
1924
- L.options;
1925
- L.setOptions;
1926
- L.use;
1927
- L.walkTokens;
1928
- L.parseInline;
1920
+ _.parseInline = G.parseInline;
1921
+ _.Parser = D;
1922
+ _.parser = D.parse;
1923
+ _.Renderer = de;
1924
+ _.TextRenderer = Ne;
1925
+ _.Lexer = j;
1926
+ _.lexer = j.lex;
1927
+ _.Tokenizer = pe;
1928
+ _.Hooks = te;
1929
+ _.parse = _;
1930
+ _.options;
1931
+ _.setOptions;
1932
+ _.use;
1933
+ _.walkTokens;
1934
+ _.parseInline;
1929
1935
  D.parse;
1930
1936
  j.lex;
1931
- const ka = ["jpg", "jpeg", "png", "gif", "webp", "svg", "bmp", "ico", "avif"];
1932
- function xa(e) {
1937
+ const $a = ["jpg", "jpeg", "png", "gif", "webp", "svg", "bmp", "ico", "avif"];
1938
+ function Ra(e) {
1933
1939
  const t = [];
1934
1940
  e = e.replace(/<pre[^>]*>[\s\S]*?<\/pre>/gi, (i) => {
1935
1941
  const o = `__IMG_PROTECTED_${t.length}__`;
@@ -1944,31 +1950,31 @@ function xa(e) {
1944
1950
  const o = `__IMG_PROTECTED_${t.length}__`;
1945
1951
  return t.push(i), o;
1946
1952
  });
1947
- const r = ka.join("|"), a = new RegExp(
1953
+ const r = $a.join("|"), a = new RegExp(
1948
1954
  `<a[^>]*href="(https?:\\/\\/[^"]+\\.(?:${r})(?:\\?[^"]*)?)"[^>]*>([^<]*)<\\/a>`,
1949
1955
  "gi"
1950
1956
  );
1951
1957
  e = e.replace(a, (i, o, n) => {
1952
1958
  const l = n && !n.match(/^(view|see|open|click|image|photo|picture)$/i) ? n : "";
1953
- return ze(o, l, l);
1959
+ return Le(o, l, l);
1954
1960
  });
1955
1961
  const s = new RegExp(
1956
1962
  `(?<!["'=])(https?:\\/\\/[^\\s<>"]+\\.(?:${r})(\\?[^\\s<>"]*)?)(?!["'])`,
1957
1963
  "gi"
1958
1964
  );
1959
- e = e.replace(s, (i, o) => ze(o, "", ""));
1965
+ e = e.replace(s, (i, o) => Le(o, "", ""));
1960
1966
  for (let i = t.length - 1; i >= 0; i--)
1961
1967
  e = e.replace(`__IMG_PROTECTED_${i}__`, t[i]);
1962
1968
  return e;
1963
1969
  }
1964
- function ze(e, t, r) {
1970
+ function Le(e, t, r) {
1965
1971
  const a = t || r || "";
1966
1972
  let s = "artifactuse-image";
1967
1973
  e.includes("large2x") || e.includes("large") || r != null && r.toLowerCase().includes("hero") ? s = "artifactuse-hero-image" : e.includes("small") || e.includes("tiny") ? s = "artifactuse-inline-image" : (r != null && r.toLowerCase().includes("aerial") || r != null && r.toLowerCase().includes("view")) && (s = "artifactuse-hero-image");
1968
1974
  let i = '<div class="artifactuse-image-container">';
1969
1975
  return i += `<img src="${e}" alt="${r || ""}" class="${s}" data-lightbox="true" data-caption="${a}" loading="lazy" />`, a && (i += `<div class="artifactuse-image-caption">${a}</div>`), i += "</div>", i;
1970
1976
  }
1971
- function $a(e) {
1977
+ function Aa(e) {
1972
1978
  const t = e.split(`
1973
1979
  `), r = [];
1974
1980
  let a = [], s = !1;
@@ -1989,60 +1995,60 @@ function $a(e) {
1989
1995
  r.push(t[i]);
1990
1996
  } else {
1991
1997
  if (s && a.length >= 2) {
1992
- const n = et(a);
1998
+ const n = rt(a);
1993
1999
  r.push(n);
1994
2000
  } else s && a.length === 1 && r.push(a[0]);
1995
2001
  s = !1, a = [], r.push(t[i]);
1996
2002
  }
1997
2003
  }
1998
2004
  if (s && a.length >= 2) {
1999
- const i = et(a);
2005
+ const i = rt(a);
2000
2006
  r.push(i);
2001
2007
  } else s && a.length === 1 && r.push(a[0]);
2002
2008
  return r.join(`
2003
2009
  `);
2004
2010
  }
2005
- function et(e) {
2011
+ function rt(e) {
2006
2012
  return `<div class="artifactuse-image-gallery">
2007
2013
  ${e.map((r) => r.replace("artifactuse-image-container", "artifactuse-gallery-item").replace("artifactuse-image-caption", "artifactuse-gallery-caption").replace("artifactuse-image", "artifactuse-gallery-image").replace("artifactuse-hero-image", "artifactuse-gallery-image").replace("artifactuse-inline-image", "artifactuse-gallery-image")).join(`
2008
2014
  `)}
2009
2015
  </div>`;
2010
2016
  }
2011
- const cr = ["mp4", "webm", "mov", "avi", "mkv", "flv", "wmv", "m4v"];
2012
- function Aa(e) {
2017
+ const ur = ["mp4", "webm", "mov", "avi", "mkv", "flv", "wmv", "m4v"];
2018
+ function za(e) {
2013
2019
  if (!e) return !1;
2014
- const t = cr.join("|");
2020
+ const t = ur.join("|");
2015
2021
  return !!(new RegExp(`\\.(${t})(\\?.*)?$`, "i").test(e) || /(?:youtube\.com\/watch\?v=|youtu\.be\/)[a-zA-Z0-9_-]+/.test(e) || /vimeo\.com\/\d+/.test(e) || /loom\.com\/share\/[a-zA-Z0-9]+/.test(e) || /dailymotion\.com\/video\/[a-zA-Z0-9]+/.test(e));
2016
2022
  }
2017
- function Ra(e) {
2023
+ function Sa(e) {
2018
2024
  if (!e) return null;
2019
2025
  let t = e.match(/(?:youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9_-]+)/);
2020
2026
  if (t) return { type: "youtube", id: t[1] };
2021
2027
  if (t = e.match(/vimeo\.com\/(\d+)/), t) return { type: "vimeo", id: t[1] };
2022
2028
  if (t = e.match(/loom\.com\/share\/([a-zA-Z0-9]+)/), t) return { type: "loom", id: t[1] };
2023
2029
  if (t = e.match(/dailymotion\.com\/video\/([a-zA-Z0-9]+)/), t) return { type: "dailymotion", id: t[1] };
2024
- const r = cr.join("|");
2030
+ const r = ur.join("|");
2025
2031
  return new RegExp(`\\.(${r})(\\?.*)?$`, "i").test(e) ? { type: "direct", id: e } : null;
2026
2032
  }
2027
- function za(e) {
2028
- const t = Ra(e);
2033
+ function La(e) {
2034
+ const t = Sa(e);
2029
2035
  if (!t) return `<a href="${e}" target="_blank" rel="noopener noreferrer">${e}</a>`;
2030
2036
  switch (t.type) {
2031
2037
  case "youtube":
2032
- return Le(t.id);
2038
+ return Me(t.id);
2033
2039
  case "vimeo":
2034
- return _e(t.id);
2040
+ return Ce(t.id);
2035
2041
  case "loom":
2036
- return Me(t.id);
2042
+ return Te(t.id);
2037
2043
  case "dailymotion":
2038
- return Ce(t.id);
2044
+ return Ee(t.id);
2039
2045
  case "direct":
2040
- return Se(t.id);
2046
+ return _e(t.id);
2041
2047
  default:
2042
2048
  return `<a href="${e}" target="_blank" rel="noopener noreferrer">${e}</a>`;
2043
2049
  }
2044
2050
  }
2045
- function Sa(e) {
2051
+ function _a(e) {
2046
2052
  const t = [];
2047
2053
  e = e.replace(/<pre[^>]*>[\s\S]*?<\/pre>/gi, (p) => {
2048
2054
  const w = `__PROTECTED_${t.length}__`;
@@ -2055,32 +2061,32 @@ function Sa(e) {
2055
2061
  return t.push(p), w;
2056
2062
  });
2057
2063
  const r = /\[([^\]]+)\]\((https:\/\/www\.pexels\.com\/video\/[^)]+)\)\s*(?:<\/p>)?\s*(?:<p>)?\s*(?:Preview image:\s*)?!\[([^\]]*)\]\((https:\/\/images\.pexels\.com\/videos\/[^)]+)\)/gi;
2058
- e = e.replace(r, (p, w, f, m, h) => _a(w, f, h, m));
2064
+ e = e.replace(r, (p, w, f, g, h) => Ca(w, f, h, g));
2059
2065
  const a = /<a[^>]*href="(https?:\/\/[^"]+\.(mp4|webm|mov|avi|mkv|flv|wmv|m4v)(?:\?[^"]*)?)"[^>]*>[^<]*<\/a>/gi;
2060
- e = e.replace(a, (p, w) => Se(w));
2066
+ e = e.replace(a, (p, w) => _e(w));
2061
2067
  const s = new RegExp(`(?<!["'=])(https?:\\/\\/[^\\s<>"]+\\.(mp4|webm|mov|avi|mkv|flv|wmv|m4v)(\\?[^\\s<>"]*)?)(?!["'])`, "gi");
2062
- e = e.replace(s, (p, w) => Se(w));
2068
+ e = e.replace(s, (p, w) => _e(w));
2063
2069
  const i = /<a[^>]*href="(https?:\/\/(?:www\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2064
- e = e.replace(i, (p, w, f) => Le(f));
2070
+ e = e.replace(i, (p, w, f) => Me(f));
2065
2071
  const o = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?(?:youtube\\.com\\/watch\\?v=|youtu\\.be\\/)([a-zA-Z0-9_-]+))(?!["'])`, "gi");
2066
- e = e.replace(o, (p, w, f) => Le(f));
2072
+ e = e.replace(o, (p, w, f) => Me(f));
2067
2073
  const n = /<a[^>]*href="(https?:\/\/(?:www\.)?vimeo\.com\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2068
- e = e.replace(n, (p, w, f) => _e(f));
2074
+ e = e.replace(n, (p, w, f) => Ce(f));
2069
2075
  const l = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?vimeo\\.com\\/(\\d+))(?!["'])`, "gi");
2070
- e = e.replace(l, (p, w, f) => _e(f));
2076
+ e = e.replace(l, (p, w, f) => Ce(f));
2071
2077
  const c = /<a[^>]*href="(https?:\/\/(?:www\.)?loom\.com\/share\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2072
- e = e.replace(c, (p, w, f) => Me(f));
2078
+ e = e.replace(c, (p, w, f) => Te(f));
2073
2079
  const u = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?loom\\.com\\/share\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2074
- e = e.replace(u, (p, w, f) => Me(f));
2080
+ e = e.replace(u, (p, w, f) => Te(f));
2075
2081
  const d = /<a[^>]*href="(https?:\/\/(?:www\.)?dailymotion\.com\/video\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2076
- e = e.replace(d, (p, w, f) => Ce(f));
2082
+ e = e.replace(d, (p, w, f) => Ee(f));
2077
2083
  const v = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?dailymotion\\.com\\/video\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2078
- e = e.replace(v, (p, w, f) => Ce(f));
2084
+ e = e.replace(v, (p, w, f) => Ee(f));
2079
2085
  for (let p = t.length - 1; p >= 0; p--)
2080
2086
  e = e.replace(`__PROTECTED_${p}__`, t[p]);
2081
2087
  return e;
2082
2088
  }
2083
- function La(e) {
2089
+ function Ma(e) {
2084
2090
  const t = e.split("?")[0].split(".").pop().toLowerCase();
2085
2091
  return {
2086
2092
  mp4: "video/mp4",
@@ -2093,34 +2099,34 @@ function La(e) {
2093
2099
  wmv: "video/x-ms-wmv"
2094
2100
  }[t] || "video/mp4";
2095
2101
  }
2096
- function Se(e) {
2097
- const t = La(e);
2102
+ function _e(e) {
2103
+ const t = Ma(e);
2098
2104
  return `<div class="artifactuse-video-wrapper"><video controls preload="metadata" class="artifactuse-video"><source src="${e}" type="${t}">Your browser does not support the video tag.</video></div>`;
2099
2105
  }
2100
- function _a(e, t, r, a) {
2106
+ function Ca(e, t, r, a) {
2101
2107
  return `<div class="artifactuse-video-preview-container"><div class="artifactuse-video-preview-wrapper" data-video-url="${t}"><img src="${r}" alt="${a}" class="artifactuse-video-preview-image" loading="lazy" /><div class="artifactuse-video-play-overlay"><svg class="artifactuse-play-icon" viewBox="0 0 24 24" fill="currentColor"><path d="M8 5v14l11-7z"/></svg></div><div class="artifactuse-video-info-overlay"><h4 class="artifactuse-video-title">${e}</h4><p class="artifactuse-video-alt">${a}</p></div></div><div class="artifactuse-video-actions"><a href="${t}" target="_blank" rel="noopener" class="artifactuse-video-link">Watch on Pexels</a></div></div>`;
2102
2108
  }
2103
- function Le(e) {
2109
+ function Me(e) {
2104
2110
  const t = `https://i.ytimg.com/vi/${e}/hqdefault.jpg`, a = `this.parentElement.innerHTML='<iframe src=\\'${`https://www.youtube.com/embed/${e}?autoplay=1`}\\' frameborder=\\'0\\' allow=\\'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\\' allowfullscreen class=\\'artifactuse-video-iframe\\'></iframe>'`;
2105
2111
  return `<div class="artifactuse-video-wrapper artifactuse-video-lazy" data-video-type="youtube" data-video-id="${e}"><button type="button" class="artifactuse-video-facade" aria-label="Play YouTube video" onclick="${a}"><img src="${t}" alt="YouTube video thumbnail" class="artifactuse-video-thumbnail" loading="lazy" /><div class="artifactuse-video-play-button artifactuse-youtube-play"><svg viewBox="0 0 68 48" width="68" height="48"><path class="artifactuse-youtube-play-bg" d="M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z" fill="#f00"/><path d="M 45,24 27,14 27,34" fill="#fff"/></svg></div></button></div>`;
2106
2112
  }
2107
- function _e(e) {
2113
+ function Ce(e) {
2108
2114
  const t = `https://player.vimeo.com/video/${e}?autoplay=1`, r = `https://vumbnail.com/${e}.jpg`, a = `this.parentElement.innerHTML='<iframe src=\\'${t}\\' frameborder=\\'0\\' allow=\\'autoplay; fullscreen; picture-in-picture\\' allowfullscreen class=\\'artifactuse-video-iframe\\'></iframe>'`;
2109
2115
  return `<div class="artifactuse-video-wrapper artifactuse-video-lazy" data-video-type="vimeo" data-video-id="${e}"><button type="button" class="artifactuse-video-facade" aria-label="Play Vimeo video" onclick="${a}"><img src="${r}" alt="Vimeo video thumbnail" class="artifactuse-video-thumbnail" loading="lazy" onerror="this.style.display='none'" /><div class="artifactuse-video-play-button artifactuse-vimeo-play"><svg viewBox="0 0 64 64" width="64" height="64"><circle cx="32" cy="32" r="31" fill="#1ab7ea"/><path d="M26 20 L26 44 L46 32 Z" fill="#fff"/></svg></div></button></div>`;
2110
2116
  }
2111
- function Me(e) {
2117
+ function Te(e) {
2112
2118
  const t = `https://www.loom.com/embed/${e}?autoplay=1`, r = `https://cdn.loom.com/sessions/thumbnails/${e}-with-play.gif`, a = `this.parentElement.innerHTML='<iframe src=\\'${t}\\' frameborder=\\'0\\' allowfullscreen class=\\'artifactuse-video-iframe\\'></iframe>'`;
2113
2119
  return `<div class="artifactuse-video-wrapper artifactuse-video-lazy" data-video-type="loom" data-video-id="${e}"><button type="button" class="artifactuse-video-facade" aria-label="Play Loom video" onclick="${a}"><img src="${r}" alt="Loom video thumbnail" class="artifactuse-video-thumbnail" loading="lazy" onerror="this.style.display='none'" /><div class="artifactuse-video-play-button artifactuse-loom-play"><svg viewBox="0 0 64 64" width="64" height="64"><circle cx="32" cy="32" r="31" fill="#625df5"/><path d="M26 20 L26 44 L46 32 Z" fill="#fff"/></svg></div></button></div>`;
2114
2120
  }
2115
- function Ce(e) {
2121
+ function Ee(e) {
2116
2122
  const t = `https://www.dailymotion.com/embed/video/${e}?autoplay=1`, r = `https://www.dailymotion.com/thumbnail/video/${e}`, a = `this.parentElement.innerHTML='<iframe src=\\'${t}\\' frameborder=\\'0\\' allow=\\'autoplay; fullscreen; picture-in-picture\\' allowfullscreen class=\\'artifactuse-video-iframe\\'></iframe>'`;
2117
2123
  return `<div class="artifactuse-video-wrapper artifactuse-video-lazy" data-video-type="dailymotion" data-video-id="${e}"><button type="button" class="artifactuse-video-facade" aria-label="Play Dailymotion video" onclick="${a}"><img src="${r}" alt="Dailymotion video thumbnail" class="artifactuse-video-thumbnail" loading="lazy" onerror="this.style.display='none'" /><div class="artifactuse-video-play-button artifactuse-dailymotion-play"><svg viewBox="0 0 64 64" width="64" height="64"><circle cx="32" cy="32" r="31" fill="#0066dc"/><path d="M26 20 L26 44 L46 32 Z" fill="#fff"/></svg></div></button></div>`;
2118
2124
  }
2119
- function Ma(e) {
2125
+ function Ta(e) {
2120
2126
  let t = e.replace(/<\/p>/g, "").replace(/<p>/g, "").replace(/<br\s*\/?>/g, "").replace(/<strong>.*?<\/strong>/g, "").replace(/<em>.*?<\/em>/g, "").replace(/<b>.*?<\/b>/g, "").replace(/<i>.*?<\/i>/g, "").replace(/\n/g, "").replace(/\s+/g, "").trim();
2121
2127
  return /<(?!\/)[^>]+>/.test(t) ? !1 : t.length < 200;
2122
2128
  }
2123
- function ve(e) {
2129
+ function ke(e) {
2124
2130
  let t = e.match(/<p>((?:[^<]|<(?!\/p>))*?)(?:<br\s*\/?>)?\s*<\/p>\s*$/);
2125
2131
  if (t) {
2126
2132
  const r = t[1].trim(), a = r.replace(/<[^>]*>/g, "").trim();
@@ -2134,7 +2140,7 @@ function ve(e) {
2134
2140
  }
2135
2141
  return "";
2136
2142
  }
2137
- function Ca(e) {
2143
+ function Ea(e) {
2138
2144
  const t = /<div class="artifactuse-video-(wrapper|preview-container)/g, r = [];
2139
2145
  let a;
2140
2146
  for (; (a = t.exec(e)) !== null; ) {
@@ -2158,16 +2164,16 @@ function Ca(e) {
2158
2164
  const s = [];
2159
2165
  let i = [{
2160
2166
  ...r[0],
2161
- caption: ve(e.substring(0, r[0].start))
2167
+ caption: ke(e.substring(0, r[0].start))
2162
2168
  }];
2163
2169
  for (let l = 1; l < r.length; l++) {
2164
2170
  const c = r[l - 1], u = r[l], d = e.substring(c.end, u.start);
2165
- Ma(d) ? i.push({
2171
+ Ta(d) ? i.push({
2166
2172
  ...u,
2167
- caption: ve(d)
2173
+ caption: ke(d)
2168
2174
  }) : (s.push([...i]), i = [{
2169
2175
  ...u,
2170
- caption: ve(e.substring(c.end, u.start))
2176
+ caption: ke(e.substring(c.end, u.start))
2171
2177
  }]);
2172
2178
  }
2173
2179
  s.push(i);
@@ -2178,7 +2184,7 @@ function Ca(e) {
2178
2184
  let u = c.start;
2179
2185
  const v = e.substring(n, c.start).match(/<p>((?:[^<]|<(?!\/p>))*?)(?:<br\s*\/?>)?\s*<\/p>\s*$/);
2180
2186
  if (v && (u = c.start - v[0].length, l[0].caption = v[1].trim()), o += e.substring(n, u), l.length >= 2)
2181
- o += Ta(l);
2187
+ o += Pa(l);
2182
2188
  else {
2183
2189
  const p = l[0];
2184
2190
  p.caption ? o += `<div class="artifactuse-video-container">${p.html}<div class="artifactuse-video-caption">${p.caption}</div></div>` : o += p.html;
@@ -2187,7 +2193,7 @@ function Ca(e) {
2187
2193
  }
2188
2194
  return o += e.substring(n), o = o.replace(/<p>\s*<\/p>/g, ""), o;
2189
2195
  }
2190
- function Ta(e) {
2196
+ function Pa(e) {
2191
2197
  return `<div class="artifactuse-video-gallery">
2192
2198
  ${e.map(({ html: r, caption: a }) => {
2193
2199
  let s = r.replace(
@@ -2202,75 +2208,75 @@ ${e.map(({ html: r, caption: a }) => {
2202
2208
  `)}
2203
2209
  </div>`;
2204
2210
  }
2205
- function Ea() {
2211
+ function Ia() {
2206
2212
  return `audio-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
2207
2213
  }
2208
- function Pa(e, t = {}) {
2214
+ function Za(e, t = {}) {
2209
2215
  const r = t.theme || "dark", a = [];
2210
- e = e.replace(/<pre[^>]*>[\s\S]*?<\/pre>/gi, (A) => {
2211
- const z = `__PROTECTED_${a.length}__`;
2212
- return a.push(A), z;
2213
- }), e = e.replace(/<code[^>]*>[\s\S]*?<\/code>/gi, (A) => {
2214
- const z = `__PROTECTED_${a.length}__`;
2215
- return a.push(A), z;
2216
- }), e = e.replace(/<(video|audio|iframe)[^>]*>[\s\S]*?<\/\1>/gi, (A) => {
2217
- const z = `__PROTECTED_${a.length}__`;
2218
- return a.push(A), z;
2216
+ e = e.replace(/<pre[^>]*>[\s\S]*?<\/pre>/gi, ($) => {
2217
+ const S = `__PROTECTED_${a.length}__`;
2218
+ return a.push($), S;
2219
+ }), e = e.replace(/<code[^>]*>[\s\S]*?<\/code>/gi, ($) => {
2220
+ const S = `__PROTECTED_${a.length}__`;
2221
+ return a.push($), S;
2222
+ }), e = e.replace(/<(video|audio|iframe)[^>]*>[\s\S]*?<\/\1>/gi, ($) => {
2223
+ const S = `__PROTECTED_${a.length}__`;
2224
+ return a.push($), S;
2219
2225
  });
2220
2226
  const s = /<a[^>]*href="(https?:\/\/[^"]+\.(mp3|wav|flac|aac|ogg|m4a|wma)(?:\?[^"]*)?)"[^>]*>[^<]*<\/a>/gi;
2221
- e = e.replace(s, (A, z) => tt(z));
2227
+ e = e.replace(s, ($, S) => at(S));
2222
2228
  const i = new RegExp(`(?<!["'=])(https?:\\/\\/[^\\s<>"]+\\.(mp3|wav|flac|aac|ogg|m4a|wma)(\\?[^\\s<>"]*)?)(?!["'])`, "gi");
2223
- e = e.replace(i, (A, z) => tt(z));
2229
+ e = e.replace(i, ($, S) => at(S));
2224
2230
  const o = /<a[^>]*href="(https?:\/\/(?:www\.)?soundcloud\.com\/[^"]+)"[^>]*>[^<]*<\/a>/gi;
2225
- e = e.replace(o, (A, z) => rt(z));
2231
+ e = e.replace(o, ($, S) => st(S));
2226
2232
  const n = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?soundcloud\\.com\\/[^\\s<>"]+)(?!["'])`, "gi");
2227
- e = e.replace(n, (A, z) => rt(z));
2233
+ e = e.replace(n, ($, S) => st(S));
2228
2234
  const l = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/track\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2229
- e = e.replace(l, (A, z, k) => q("track", k, r));
2235
+ e = e.replace(l, ($, S, z) => q("track", z, r));
2230
2236
  const c = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/track\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2231
- e = e.replace(c, (A, z, k) => q("track", k, r));
2237
+ e = e.replace(c, ($, S, z) => q("track", z, r));
2232
2238
  const u = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/album\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2233
- e = e.replace(u, (A, z, k) => q("album", k, r));
2239
+ e = e.replace(u, ($, S, z) => q("album", z, r));
2234
2240
  const d = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/album\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2235
- e = e.replace(d, (A, z, k) => q("album", k, r));
2241
+ e = e.replace(d, ($, S, z) => q("album", z, r));
2236
2242
  const v = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/playlist\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2237
- e = e.replace(v, (A, z, k) => q("playlist", k, r));
2243
+ e = e.replace(v, ($, S, z) => q("playlist", z, r));
2238
2244
  const p = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/playlist\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2239
- e = e.replace(p, (A, z, k) => q("playlist", k, r));
2245
+ e = e.replace(p, ($, S, z) => q("playlist", z, r));
2240
2246
  const w = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/artist\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2241
- e = e.replace(w, (A, z, k) => q("artist", k, r));
2247
+ e = e.replace(w, ($, S, z) => q("artist", z, r));
2242
2248
  const f = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/artist\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2243
- e = e.replace(f, (A, z, k) => q("artist", k, r));
2244
- const m = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/episode\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2245
- e = e.replace(m, (A, z, k) => q("episode", k, r));
2249
+ e = e.replace(f, ($, S, z) => q("artist", z, r));
2250
+ const g = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/episode\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2251
+ e = e.replace(g, ($, S, z) => q("episode", z, r));
2246
2252
  const h = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/episode\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2247
- e = e.replace(h, (A, z, k) => q("episode", k, r));
2248
- const g = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/show\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2249
- e = e.replace(g, (A, z, k) => q("show", k, r));
2253
+ e = e.replace(h, ($, S, z) => q("episode", z, r));
2254
+ const m = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/show\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2255
+ e = e.replace(m, ($, S, z) => q("show", z, r));
2250
2256
  const y = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/show\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2251
- e = e.replace(y, (A, z, k) => q("show", k, r));
2257
+ e = e.replace(y, ($, S, z) => q("show", z, r));
2252
2258
  const b = /<a[^>]*href="(https?:\/\/music\.apple\.com\/([a-z]{2})\/([a-z-]+)\/[^\/]+\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2253
- e = e.replace(b, (A, z, k, M, C) => at(k, M, C));
2259
+ e = e.replace(b, ($, S, z, F, R) => it(z, F, R));
2254
2260
  const x = new RegExp(`(?<!["'=])(https?:\\/\\/music\\.apple\\.com\\/([a-z]{2})\\/([a-z-]+)\\/[^\\/\\s]+\\/(\\d+))(?!["'])`, "gi");
2255
- e = e.replace(x, (A, z, k, M, C) => at(k, M, C));
2256
- for (let A = a.length - 1; A >= 0; A--)
2257
- e = e.replace(`__PROTECTED_${A}__`, a[A]);
2261
+ e = e.replace(x, ($, S, z, F, R) => it(z, F, R));
2262
+ for (let $ = a.length - 1; $ >= 0; $--)
2263
+ e = e.replace(`__PROTECTED_${$}__`, a[$]);
2258
2264
  return e;
2259
2265
  }
2260
- function Ia(e) {
2266
+ function qa(e) {
2261
2267
  const t = e.match(/\.([a-zA-Z0-9]+)(?:\?|$)/);
2262
2268
  return t ? t[1].toUpperCase() : "AUDIO";
2263
2269
  }
2264
- function Y(e) {
2270
+ function ee(e) {
2265
2271
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
2266
2272
  }
2267
- function tt(e) {
2268
- const t = Ea(), r = decodeURIComponent(e.split("/").pop().split("?")[0]), a = Ia(e);
2273
+ function at(e) {
2274
+ const t = Ia(), r = decodeURIComponent(e.split("/").pop().split("?")[0]), a = qa(e);
2269
2275
  return `
2270
- <div class="artifactuse-audio-player" data-player-id="${t}" data-audio-src="${Y(e)}">
2276
+ <div class="artifactuse-audio-player" data-player-id="${t}" data-audio-src="${ee(e)}">
2271
2277
  <!-- Hidden audio element -->
2272
2278
  <audio preload="metadata" class="artifactuse-audio-element">
2273
- <source src="${Y(e)}" type="audio/mpeg">
2279
+ <source src="${ee(e)}" type="audio/mpeg">
2274
2280
  </audio>
2275
2281
 
2276
2282
  <!-- Header -->
@@ -2283,7 +2289,7 @@ function tt(e) {
2283
2289
  </svg>
2284
2290
  </div>
2285
2291
  <div class="artifactuse-audio-meta">
2286
- <span class="artifactuse-audio-filename" title="${Y(r)}">${Y(r)}</span>
2292
+ <span class="artifactuse-audio-filename" title="${ee(r)}">${ee(r)}</span>
2287
2293
  <span class="artifactuse-audio-format">${a}</span>
2288
2294
  </div>
2289
2295
  <span class="artifactuse-audio-duration">--:--</span>
@@ -2344,7 +2350,7 @@ function tt(e) {
2344
2350
  </div>
2345
2351
 
2346
2352
  <!-- Download -->
2347
- <a href="${Y(e)}" download class="artifactuse-audio-btn artifactuse-audio-download-btn" aria-label="Download">
2353
+ <a href="${ee(e)}" download class="artifactuse-audio-btn artifactuse-audio-download-btn" aria-label="Download">
2348
2354
  <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
2349
2355
  <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
2350
2356
  <polyline points="7 10 12 15 17 10"></polyline>
@@ -2356,7 +2362,7 @@ function tt(e) {
2356
2362
  </div>
2357
2363
  `;
2358
2364
  }
2359
- function rt(e) {
2365
+ function st(e) {
2360
2366
  return `
2361
2367
  <div class="artifactuse-soundcloud-wrapper">
2362
2368
  <iframe
@@ -2391,7 +2397,7 @@ function q(e, t, r = "dark") {
2391
2397
  </div>
2392
2398
  `;
2393
2399
  }
2394
- function at(e, t, r) {
2400
+ function it(e, t, r) {
2395
2401
  return `
2396
2402
  <div class="artifactuse-apple-music-wrapper">
2397
2403
  <iframe
@@ -2405,18 +2411,18 @@ function at(e, t, r) {
2405
2411
  </div>
2406
2412
  `;
2407
2413
  }
2408
- const G = /* @__PURE__ */ new Map(), ye = [0.5, 0.75, 1, 1.25, 1.5, 2];
2409
- function Za(e = document) {
2414
+ const X = /* @__PURE__ */ new Map(), xe = [0.5, 0.75, 1, 1.25, 1.5, 2];
2415
+ function Ha(e = document) {
2410
2416
  e.querySelectorAll(".artifactuse-audio-player:not([data-initialized])").forEach((r) => {
2411
- qa(r);
2417
+ ja(r);
2412
2418
  });
2413
2419
  }
2414
- function qa(e) {
2420
+ function ja(e) {
2415
2421
  const t = e.dataset.playerId, r = e.dataset.audioSrc;
2416
2422
  if (!t || !r) return;
2417
- const a = e.querySelector(".artifactuse-audio-element"), s = e.querySelector(".artifactuse-audio-play-btn"), i = e.querySelector(".artifactuse-audio-icon-play"), o = e.querySelector(".artifactuse-audio-icon-pause"), n = e.querySelector(".artifactuse-audio-current"), l = e.querySelector(".artifactuse-audio-duration"), c = e.querySelector(".artifactuse-audio-waveform"), u = e.querySelector(".artifactuse-audio-waveform-canvas"), d = e.querySelector(".artifactuse-audio-waveform-progress"), v = e.querySelector(".artifactuse-audio-waveform-hover"), p = e.querySelector(".artifactuse-audio-mute-btn"), w = e.querySelector(".artifactuse-audio-icon-volume"), f = e.querySelector(".artifactuse-audio-icon-muted"), m = e.querySelector(".artifactuse-audio-volume-slider"), h = e.querySelector(".artifactuse-audio-speed-btn");
2423
+ const a = e.querySelector(".artifactuse-audio-element"), s = e.querySelector(".artifactuse-audio-play-btn"), i = e.querySelector(".artifactuse-audio-icon-play"), o = e.querySelector(".artifactuse-audio-icon-pause"), n = e.querySelector(".artifactuse-audio-current"), l = e.querySelector(".artifactuse-audio-duration"), c = e.querySelector(".artifactuse-audio-waveform"), u = e.querySelector(".artifactuse-audio-waveform-canvas"), d = e.querySelector(".artifactuse-audio-waveform-progress"), v = e.querySelector(".artifactuse-audio-waveform-hover"), p = e.querySelector(".artifactuse-audio-mute-btn"), w = e.querySelector(".artifactuse-audio-icon-volume"), f = e.querySelector(".artifactuse-audio-icon-muted"), g = e.querySelector(".artifactuse-audio-volume-slider"), h = e.querySelector(".artifactuse-audio-speed-btn");
2418
2424
  if (!a) return;
2419
- const g = {
2425
+ const m = {
2420
2426
  isPlaying: !1,
2421
2427
  isMuted: !1,
2422
2428
  volume: 1,
@@ -2425,41 +2431,41 @@ function qa(e) {
2425
2431
  currentTime: 0,
2426
2432
  waveformData: null
2427
2433
  };
2428
- G.set(t, { playerEl: e, audio: a, state: g }), Ha(u, t), s == null || s.addEventListener("click", () => {
2429
- g.isPlaying ? ct(t) : ot(t);
2434
+ X.set(t, { playerEl: e, audio: a, state: m }), Da(u, t), s == null || s.addEventListener("click", () => {
2435
+ m.isPlaying ? ut(t) : lt(t);
2430
2436
  }), a.addEventListener("loadedmetadata", () => {
2431
- g.duration = a.duration, l.textContent = nt(a.duration);
2437
+ m.duration = a.duration, l.textContent = ct(a.duration);
2432
2438
  }), a.addEventListener("timeupdate", () => {
2433
- g.currentTime = a.currentTime, n.textContent = nt(a.currentTime);
2439
+ m.currentTime = a.currentTime, n.textContent = ct(a.currentTime);
2434
2440
  const y = a.currentTime / a.duration * 100;
2435
2441
  d.style.width = `${y}%`;
2436
2442
  }), a.addEventListener("ended", () => {
2437
- g.isPlaying = !1, i.style.display = "", o.style.display = "none", e.classList.remove("is-playing"), d.style.width = "0%";
2443
+ m.isPlaying = !1, i.style.display = "", o.style.display = "none", e.classList.remove("is-playing"), d.style.width = "0%";
2438
2444
  }), a.addEventListener("play", () => {
2439
- g.isPlaying = !0, i.style.display = "none", o.style.display = "", e.classList.add("is-playing"), ja(t);
2445
+ m.isPlaying = !0, i.style.display = "none", o.style.display = "", e.classList.add("is-playing"), Oa(t);
2440
2446
  }), a.addEventListener("pause", () => {
2441
- g.isPlaying = !1, i.style.display = "", o.style.display = "none", e.classList.remove("is-playing");
2447
+ m.isPlaying = !1, i.style.display = "", o.style.display = "none", e.classList.remove("is-playing");
2442
2448
  }), c == null || c.addEventListener("click", (y) => {
2443
- const b = c.getBoundingClientRect(), z = (y.clientX - b.left) / b.width * a.duration;
2444
- isNaN(z) || (a.currentTime = z);
2449
+ const b = c.getBoundingClientRect(), S = (y.clientX - b.left) / b.width * a.duration;
2450
+ isNaN(S) || (a.currentTime = S);
2445
2451
  }), c == null || c.addEventListener("mousemove", (y) => {
2446
- const b = c.getBoundingClientRect(), A = (y.clientX - b.left) / b.width * 100;
2447
- v.style.width = `${A}%`;
2452
+ const b = c.getBoundingClientRect(), $ = (y.clientX - b.left) / b.width * 100;
2453
+ v.style.width = `${$}%`;
2448
2454
  }), c == null || c.addEventListener("mouseleave", () => {
2449
2455
  v.style.width = "0%";
2450
2456
  }), p == null || p.addEventListener("click", () => {
2451
- g.isMuted = !g.isMuted, a.muted = g.isMuted, w.style.display = g.isMuted ? "none" : "", f.style.display = g.isMuted ? "" : "none", g.isMuted ? m.value = 0 : m.value = g.volume * 100;
2452
- }), m == null || m.addEventListener("input", (y) => {
2457
+ m.isMuted = !m.isMuted, a.muted = m.isMuted, w.style.display = m.isMuted ? "none" : "", f.style.display = m.isMuted ? "" : "none", m.isMuted ? g.value = 0 : g.value = m.volume * 100;
2458
+ }), g == null || g.addEventListener("input", (y) => {
2453
2459
  const b = parseInt(y.target.value, 10) / 100;
2454
- g.volume = b, a.volume = b, b === 0 ? (g.isMuted = !0, w.style.display = "none", f.style.display = "") : (g.isMuted = !1, a.muted = !1, w.style.display = "", f.style.display = "none");
2460
+ m.volume = b, a.volume = b, b === 0 ? (m.isMuted = !0, w.style.display = "none", f.style.display = "") : (m.isMuted = !1, a.muted = !1, w.style.display = "", f.style.display = "none");
2455
2461
  }), h == null || h.addEventListener("click", () => {
2456
- const b = (ye.indexOf(g.playbackRate) + 1) % ye.length;
2457
- g.playbackRate = ye[b], a.playbackRate = g.playbackRate, h.querySelector("span").textContent = `${g.playbackRate}x`;
2462
+ const b = (xe.indexOf(m.playbackRate) + 1) % xe.length;
2463
+ m.playbackRate = xe[b], a.playbackRate = m.playbackRate, h.querySelector("span").textContent = `${m.playbackRate}x`;
2458
2464
  }), e.addEventListener("keydown", (y) => {
2459
2465
  switch (y.key) {
2460
2466
  case " ":
2461
2467
  case "k":
2462
- y.preventDefault(), g.isPlaying ? ct(t) : ot(t);
2468
+ y.preventDefault(), m.isPlaying ? ut(t) : lt(t);
2463
2469
  break;
2464
2470
  case "ArrowLeft":
2465
2471
  y.preventDefault(), a.currentTime = Math.max(0, a.currentTime - 5);
@@ -2468,10 +2474,10 @@ function qa(e) {
2468
2474
  y.preventDefault(), a.currentTime = Math.min(a.duration, a.currentTime + 5);
2469
2475
  break;
2470
2476
  case "ArrowUp":
2471
- y.preventDefault(), g.volume = Math.min(1, g.volume + 0.1), a.volume = g.volume, m.value = g.volume * 100;
2477
+ y.preventDefault(), m.volume = Math.min(1, m.volume + 0.1), a.volume = m.volume, g.value = m.volume * 100;
2472
2478
  break;
2473
2479
  case "ArrowDown":
2474
- y.preventDefault(), g.volume = Math.max(0, g.volume - 0.1), a.volume = g.volume, m.value = g.volume * 100;
2480
+ y.preventDefault(), m.volume = Math.max(0, m.volume - 0.1), a.volume = m.volume, g.value = m.volume * 100;
2475
2481
  break;
2476
2482
  case "m":
2477
2483
  y.preventDefault(), p == null || p.click();
@@ -2479,19 +2485,19 @@ function qa(e) {
2479
2485
  }
2480
2486
  }), e.setAttribute("data-initialized", "true"), e.setAttribute("tabindex", "0");
2481
2487
  }
2482
- function Ha(e, t) {
2488
+ function Da(e, t) {
2483
2489
  if (!e) return;
2484
2490
  const r = e.getContext("2d"), a = window.devicePixelRatio || 1, s = e.parentElement.getBoundingClientRect();
2485
2491
  e.width = s.width * a, e.height = s.height * a, e.style.width = `${s.width}px`, e.style.height = `${s.height}px`, r.scale(a, a);
2486
- const i = s.width, o = s.height, n = Math.floor(i / 4), l = st(n, t);
2487
- it(r, l, i, o), new ResizeObserver(() => {
2492
+ const i = s.width, o = s.height, n = Math.floor(i / 4), l = nt(n, t);
2493
+ ot(r, l, i, o), new ResizeObserver(() => {
2488
2494
  const u = e.parentElement.getBoundingClientRect();
2489
2495
  e.width = u.width * a, e.height = u.height * a, e.style.width = `${u.width}px`, e.style.height = `${u.height}px`, r.scale(a, a);
2490
- const d = Math.floor(u.width / 4), v = st(d, t);
2491
- it(r, v, u.width, u.height);
2496
+ const d = Math.floor(u.width / 4), v = nt(d, t);
2497
+ ot(r, v, u.width, u.height);
2492
2498
  }).observe(e.parentElement);
2493
2499
  }
2494
- function st(e, t) {
2500
+ function nt(e, t) {
2495
2501
  const r = [];
2496
2502
  let a = 0;
2497
2503
  for (let i = 0; i < t.length; i++) {
@@ -2508,7 +2514,7 @@ function st(e, t) {
2508
2514
  }
2509
2515
  return r;
2510
2516
  }
2511
- function it(e, t, r, a) {
2517
+ function ot(e, t, r, a) {
2512
2518
  e.clearRect(0, 0, r, a);
2513
2519
  const s = 2, o = s + 2, n = a / 2, c = getComputedStyle(document.documentElement).getPropertyValue("--artifactuse-text-muted").trim() || "107, 114, 128";
2514
2520
  e.fillStyle = `rgba(${c}, 0.4)`, t.forEach((u, d) => {
@@ -2516,90 +2522,90 @@ function it(e, t, r, a) {
2516
2522
  e.beginPath(), e.roundRect(v, n - w, s, p, f), e.fill();
2517
2523
  });
2518
2524
  }
2519
- function nt(e) {
2525
+ function ct(e) {
2520
2526
  if (!e || isNaN(e)) return "0:00";
2521
2527
  const t = Math.floor(e / 3600), r = Math.floor(e % 3600 / 60), a = Math.floor(e % 60);
2522
2528
  return t > 0 ? `${t}:${r.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}` : `${r}:${a.toString().padStart(2, "0")}`;
2523
2529
  }
2524
- function ot(e) {
2525
- const t = G.get(e);
2530
+ function lt(e) {
2531
+ const t = X.get(e);
2526
2532
  t && t.audio.play();
2527
2533
  }
2528
- function ct(e) {
2529
- const t = G.get(e);
2534
+ function ut(e) {
2535
+ const t = X.get(e);
2530
2536
  t && t.audio.pause();
2531
2537
  }
2532
- function ja(e) {
2533
- G.forEach((t, r) => {
2538
+ function Oa(e) {
2539
+ X.forEach((t, r) => {
2534
2540
  r !== e && t.state.isPlaying && t.audio.pause();
2535
2541
  });
2536
2542
  }
2537
- function Da(e) {
2538
- const t = G.get(e);
2539
- t && (t.audio.pause(), t.audio.src = "", G.delete(e));
2543
+ function Ba(e) {
2544
+ const t = X.get(e);
2545
+ t && (t.audio.pause(), t.audio.src = "", X.delete(e));
2540
2546
  }
2541
- function Oa() {
2542
- G.forEach((e, t) => {
2543
- Da(t);
2547
+ function Va() {
2548
+ X.forEach((e, t) => {
2549
+ Ba(t);
2544
2550
  });
2545
2551
  }
2546
- function Va(e) {
2552
+ function Fa(e) {
2547
2553
  const t = [];
2548
- e = e.replace(/<pre[^>]*>[\s\S]*?<\/pre>/gi, (m) => {
2554
+ e = e.replace(/<pre[^>]*>[\s\S]*?<\/pre>/gi, (g) => {
2549
2555
  const h = `__PROTECTED_MAP_${t.length}__`;
2550
- return t.push(m), h;
2551
- }), e = e.replace(/<code[^>]*>[\s\S]*?<\/code>/gi, (m) => {
2556
+ return t.push(g), h;
2557
+ }), e = e.replace(/<code[^>]*>[\s\S]*?<\/code>/gi, (g) => {
2552
2558
  const h = `__PROTECTED_MAP_${t.length}__`;
2553
- return t.push(m), h;
2554
- }), e = e.replace(/<iframe[^>]*>[\s\S]*?<\/iframe>/gi, (m) => {
2559
+ return t.push(g), h;
2560
+ }), e = e.replace(/<iframe[^>]*>[\s\S]*?<\/iframe>/gi, (g) => {
2555
2561
  const h = `__PROTECTED_MAP_${t.length}__`;
2556
- return t.push(m), h;
2562
+ return t.push(g), h;
2557
2563
  });
2558
2564
  const r = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/embed\?pb=[^"]+)"[^>]*>[^<]*<\/a>/gi;
2559
- e = e.replace(r, (m, h) => {
2560
- const g = `__PROTECTED_MAP_${t.length}__`;
2561
- return t.push(lt(h)), g;
2565
+ e = e.replace(r, (g, h) => {
2566
+ const m = `__PROTECTED_MAP_${t.length}__`;
2567
+ return t.push(pt(h)), m;
2562
2568
  });
2563
2569
  const a = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/embed\\?pb=[^\\s<>"]+)(?!["'])`, "gi");
2564
- e = e.replace(a, (m, h) => {
2565
- const g = `__PROTECTED_MAP_${t.length}__`;
2566
- return t.push(lt(h)), g;
2570
+ e = e.replace(a, (g, h) => {
2571
+ const m = `__PROTECTED_MAP_${t.length}__`;
2572
+ return t.push(pt(h)), m;
2567
2573
  });
2568
2574
  const s = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/place\/([^\/\?"]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2569
- e = e.replace(s, (m, h, g) => B(decodeURIComponent(g.replace(/\+/g, " "))));
2575
+ e = e.replace(s, (g, h, m) => V(decodeURIComponent(m.replace(/\+/g, " "))));
2570
2576
  const i = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/place\\/([^\\/\\?\\s]+))(?!["'])`, "gi");
2571
- e = e.replace(i, (m, h, g) => B(decodeURIComponent(g.replace(/\+/g, " "))));
2577
+ e = e.replace(i, (g, h, m) => V(decodeURIComponent(m.replace(/\+/g, " "))));
2572
2578
  const o = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/@([0-9.-]+),([0-9.-]+),([0-9]+)z[^"]*)"[^>]*>[^<]*<\/a>/gi;
2573
- e = e.replace(o, (m, h, g, y, b) => Te(g, y, b));
2579
+ e = e.replace(o, (g, h, m, y, b) => Pe(m, y, b));
2574
2580
  const n = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/@([0-9.-]+),([0-9.-]+),([0-9]+)z)(?!["'])`, "gi");
2575
- e = e.replace(n, (m, h, g, y, b) => Te(g, y, b));
2581
+ e = e.replace(n, (g, h, m, y, b) => Pe(m, y, b));
2576
2582
  const l = /<a[^>]*href="(https?:\/\/maps\.google\.com\/\?q=([^\s"&]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2577
- e = e.replace(l, (m, h, g) => B(decodeURIComponent(g)));
2583
+ e = e.replace(l, (g, h, m) => V(decodeURIComponent(m)));
2578
2584
  const c = new RegExp(`(?<!["'=])(https?:\\/\\/maps\\.google\\.com\\/\\?q=([^\\s"&]+))(?!["'])`, "gi");
2579
- e = e.replace(c, (m, h, g) => B(decodeURIComponent(g)));
2585
+ e = e.replace(c, (g, h, m) => V(decodeURIComponent(m)));
2580
2586
  const u = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/search\/([^\/\?"]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2581
- e = e.replace(u, (m, h, g) => B(decodeURIComponent(g.replace(/\+/g, " "))));
2587
+ e = e.replace(u, (g, h, m) => V(decodeURIComponent(m.replace(/\+/g, " "))));
2582
2588
  const d = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/search\\/([^\\/\\?\\s]+))(?!["'])`, "gi");
2583
- e = e.replace(d, (m, h, g) => B(decodeURIComponent(g.replace(/\+/g, " "))));
2589
+ e = e.replace(d, (g, h, m) => V(decodeURIComponent(m.replace(/\+/g, " "))));
2584
2590
  const v = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/search\/\?[^"]*query=([^"&]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2585
- e = e.replace(v, (m, h, g) => B(decodeURIComponent(g.replace(/\+/g, " "))));
2591
+ e = e.replace(v, (g, h, m) => V(decodeURIComponent(m.replace(/\+/g, " "))));
2586
2592
  const p = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/search\\/\\?[^\\s"]*query=([^\\s"&]+))(?!["'])`, "gi");
2587
- e = e.replace(p, (m, h, g) => B(decodeURIComponent(g.replace(/\+/g, " "))));
2593
+ e = e.replace(p, (g, h, m) => V(decodeURIComponent(m.replace(/\+/g, " "))));
2588
2594
  const w = /<a[^>]*href="(https?:\/\/(?:www\.)?openstreetmap\.org\/[^"]*mlat=([0-9.-]+)[^"]*mlon=([0-9.-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2589
- e = e.replace(w, (m, h, g, y) => {
2595
+ e = e.replace(w, (g, h, m, y) => {
2590
2596
  const b = h.match(/#map=(\d+)/), x = b ? b[1] : 15;
2591
- return ut(g, y, x);
2597
+ return dt(m, y, x);
2592
2598
  });
2593
2599
  const f = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?openstreetmap\\.org\\/[^\\s]*mlat=([0-9.-]+)[^\\s]*mlon=([0-9.-]+))(?!["'])`, "gi");
2594
- e = e.replace(f, (m, h, g, y) => {
2600
+ e = e.replace(f, (g, h, m, y) => {
2595
2601
  const b = h.match(/#map=(\d+)/), x = b ? b[1] : 15;
2596
- return ut(g, y, x);
2602
+ return dt(m, y, x);
2597
2603
  });
2598
- for (let m = t.length - 1; m >= 0; m--)
2599
- e = e.replace(`__PROTECTED_MAP_${m}__`, t[m]);
2604
+ for (let g = t.length - 1; g >= 0; g--)
2605
+ e = e.replace(`__PROTECTED_MAP_${g}__`, t[g]);
2600
2606
  return e;
2601
2607
  }
2602
- function lt(e) {
2608
+ function pt(e) {
2603
2609
  const t = e.match(/pb=([^&]+)/);
2604
2610
  if (t) {
2605
2611
  const r = decodeURIComponent(t[1]), a = r.match(/!3d(-?[\d.]+).*?!2d(-?[\d.]+)/), s = r.match(/!2d(-?[\d.]+).*?!3d(-?[\d.]+)/);
@@ -2611,7 +2617,7 @@ function lt(e) {
2611
2617
  const c = parseFloat(n[1]);
2612
2618
  c > 1e4 ? l = 10 : c > 5e3 ? l = 12 : c > 1e3 ? l = 14 : c > 500 ? l = 16 : l = 18;
2613
2619
  }
2614
- return Te(i, o, l);
2620
+ return Pe(i, o, l);
2615
2621
  }
2616
2622
  }
2617
2623
  return `
@@ -2627,7 +2633,7 @@ function lt(e) {
2627
2633
  </div>
2628
2634
  `;
2629
2635
  }
2630
- function B(e) {
2636
+ function V(e) {
2631
2637
  const t = encodeURIComponent(e);
2632
2638
  return `
2633
2639
  <div class="artifactuse-map-wrapper">
@@ -2652,7 +2658,7 @@ function B(e) {
2652
2658
  </div>
2653
2659
  `;
2654
2660
  }
2655
- function Te(e, t, r) {
2661
+ function Pe(e, t, r) {
2656
2662
  return `
2657
2663
  <div class="artifactuse-map-wrapper">
2658
2664
  <iframe
@@ -2671,7 +2677,7 @@ function Te(e, t, r) {
2671
2677
  </div>
2672
2678
  `;
2673
2679
  }
2674
- function ut(e, t, r = 15) {
2680
+ function dt(e, t, r = 15) {
2675
2681
  return `
2676
2682
  <div class="artifactuse-map-wrapper">
2677
2683
  <iframe
@@ -2687,41 +2693,41 @@ function ut(e, t, r = 15) {
2687
2693
  </div>
2688
2694
  `;
2689
2695
  }
2690
- function Ba(e, t = {}) {
2696
+ function Na(e, t = {}) {
2691
2697
  const r = t.theme || "dark", a = /<a[^>]*href="(https?:\/\/(?:www\.)?(?:twitter\.com|x\.com)\/([a-zA-Z0-9_]+)\/status\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2692
- e = e.replace(a, (y, b, x, A) => pt(x, A, r));
2698
+ e = e.replace(a, (y, b, x, $) => ft(x, $, r));
2693
2699
  const s = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?(?:twitter\\.com|x\\.com)\\/([a-zA-Z0-9_]+)\\/status\\/(\\d+))(?!["'])`, "gi");
2694
- e = e.replace(s, (y, b, x, A) => pt(x, A, r));
2700
+ e = e.replace(s, (y, b, x, $) => ft(x, $, r));
2695
2701
  const i = /<a[^>]*href="(https?:\/\/(?:www\.)?instagram\.com\/p\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2696
- e = e.replace(i, (y, b, x) => dt(x));
2702
+ e = e.replace(i, (y, b, x) => ht(x));
2697
2703
  const o = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?instagram\\.com\\/p\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
2698
- e = e.replace(o, (y, b, x) => dt(x));
2704
+ e = e.replace(o, (y, b, x) => ht(x));
2699
2705
  const n = /<a[^>]*href="(https?:\/\/(?:www\.)?instagram\.com\/reel\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2700
- e = e.replace(n, (y, b, x) => ft(x));
2706
+ e = e.replace(n, (y, b, x) => gt(x));
2701
2707
  const l = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?instagram\\.com\\/reel\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
2702
- e = e.replace(l, (y, b, x) => ft(x));
2708
+ e = e.replace(l, (y, b, x) => gt(x));
2703
2709
  const c = /<a[^>]*href="(https?:\/\/(?:www\.)?tiktok\.com\/@([a-zA-Z0-9_.]+)\/video\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2704
- e = e.replace(c, (y, b, x, A) => ht(A));
2710
+ e = e.replace(c, (y, b, x, $) => mt($));
2705
2711
  const u = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?tiktok\\.com\\/@([a-zA-Z0-9_.]+)\\/video\\/(\\d+))(?!["'])`, "gi");
2706
- e = e.replace(u, (y, b, x, A) => ht(A));
2712
+ e = e.replace(u, (y, b, x, $) => mt($));
2707
2713
  const d = /<a[^>]*href="(https?:\/\/(?:www\.)?linkedin\.com\/(?:posts|feed\/update)\/([a-zA-Z0-9_:-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2708
- e = e.replace(d, (y, b, x) => gt(x, b));
2714
+ e = e.replace(d, (y, b, x) => wt(x, b));
2709
2715
  const v = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?linkedin\\.com\\/(?:posts|feed\\/update)\\/([a-zA-Z0-9_:-]+))(?!["'])`, "gi");
2710
- e = e.replace(v, (y, b, x) => gt(x, b));
2716
+ e = e.replace(v, (y, b, x) => wt(x, b));
2711
2717
  const p = /<a[^>]*href="(https?:\/\/(?:www\.)?reddit\.com\/r\/([a-zA-Z0-9_]+)\/comments\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2712
- e = e.replace(p, (y, b, x, A) => mt(x, A, b));
2718
+ e = e.replace(p, (y, b, x, $) => bt(x, $, b));
2713
2719
  const w = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?reddit\\.com\\/r\\/([a-zA-Z0-9_]+)\\/comments\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2714
- e = e.replace(w, (y, b, x, A) => mt(x, A, b));
2720
+ e = e.replace(w, (y, b, x, $) => bt(x, $, b));
2715
2721
  const f = /<a[^>]*href="(https?:\/\/(?:www\.)?facebook\.com\/[a-zA-Z0-9.]+\/posts\/\d+[^"]*)"[^>]*>[^<]*<\/a>/gi;
2716
- e = e.replace(f, (y, b) => wt(b));
2717
- const m = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?facebook\\.com\\/[a-zA-Z0-9.]+\\/posts\\/\\d+)(?!["'])`, "gi");
2718
- e = e.replace(m, (y, b) => wt(b));
2722
+ e = e.replace(f, (y, b) => vt(b));
2723
+ const g = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?facebook\\.com\\/[a-zA-Z0-9.]+\\/posts\\/\\d+)(?!["'])`, "gi");
2724
+ e = e.replace(g, (y, b) => vt(b));
2719
2725
  const h = /<a[^>]*href="(https?:\/\/(?:www\.)?pinterest\.com\/pin\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2720
- e = e.replace(h, (y, b, x) => bt(x));
2721
- const g = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?pinterest\\.com\\/pin\\/(\\d+))(?!["'])`, "gi");
2722
- return e = e.replace(g, (y, b, x) => bt(x)), e;
2726
+ e = e.replace(h, (y, b, x) => yt(x));
2727
+ const m = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?pinterest\\.com\\/pin\\/(\\d+))(?!["'])`, "gi");
2728
+ return e = e.replace(m, (y, b, x) => yt(x)), e;
2723
2729
  }
2724
- function pt(e, t, r = "dark") {
2730
+ function ft(e, t, r = "dark") {
2725
2731
  return `
2726
2732
  <div class="artifactuse-twitter-wrapper">
2727
2733
  <blockquote class="twitter-tweet" data-dnt="true" data-theme="${r}">
@@ -2731,7 +2737,7 @@ function pt(e, t, r = "dark") {
2731
2737
  </div>
2732
2738
  `;
2733
2739
  }
2734
- function dt(e) {
2740
+ function ht(e) {
2735
2741
  return `
2736
2742
  <div class="artifactuse-instagram-wrapper">
2737
2743
  <iframe
@@ -2745,7 +2751,7 @@ function dt(e) {
2745
2751
  </div>
2746
2752
  `;
2747
2753
  }
2748
- function ft(e) {
2754
+ function gt(e) {
2749
2755
  return `
2750
2756
  <div class="artifactuse-instagram-wrapper">
2751
2757
  <iframe
@@ -2759,7 +2765,7 @@ function ft(e) {
2759
2765
  </div>
2760
2766
  `;
2761
2767
  }
2762
- function ht(e) {
2768
+ function mt(e) {
2763
2769
  return `
2764
2770
  <div class="artifactuse-tiktok-wrapper">
2765
2771
  <iframe
@@ -2772,7 +2778,7 @@ function ht(e) {
2772
2778
  </div>
2773
2779
  `;
2774
2780
  }
2775
- function gt(e, t) {
2781
+ function wt(e, t) {
2776
2782
  return `
2777
2783
  <div class="artifactuse-linkedin-wrapper">
2778
2784
  <iframe
@@ -2788,7 +2794,7 @@ function gt(e, t) {
2788
2794
  </div>
2789
2795
  `;
2790
2796
  }
2791
- function mt(e, t, r) {
2797
+ function bt(e, t, r) {
2792
2798
  return `
2793
2799
  <div class="artifactuse-reddit-wrapper">
2794
2800
  <iframe
@@ -2803,7 +2809,7 @@ function mt(e, t, r) {
2803
2809
  </div>
2804
2810
  `;
2805
2811
  }
2806
- function wt(e) {
2812
+ function vt(e) {
2807
2813
  return `
2808
2814
  <div class="artifactuse-facebook-wrapper">
2809
2815
  <iframe
@@ -2821,7 +2827,7 @@ function wt(e) {
2821
2827
  </div>
2822
2828
  `;
2823
2829
  }
2824
- function bt(e) {
2830
+ function yt(e) {
2825
2831
  return `
2826
2832
  <div class="artifactuse-pinterest-wrapper">
2827
2833
  <a data-pin-do="embedPin" data-pin-width="large" href="https://www.pinterest.com/pin/${e}/"></a>
@@ -2829,13 +2835,13 @@ function bt(e) {
2829
2835
  </div>
2830
2836
  `;
2831
2837
  }
2832
- function Fa(e) {
2838
+ function Ua(e) {
2833
2839
  const t = /<a[^>]*href="(https?:\/\/[^"]+\.pdf(?:\?[^"]*)?)"[^>]*>[^<]*<\/a>/gi;
2834
- e = e.replace(t, (a, s) => vt(s));
2840
+ e = e.replace(t, (a, s) => kt(s));
2835
2841
  const r = new RegExp(`(?<!["'=])(https?:\\/\\/[^\\s<>"]+\\.pdf(?:\\?[^\\s<>"]*)?)(?!["'])`, "gi");
2836
- return e = e.replace(r, (a, s) => vt(s)), e;
2842
+ return e = e.replace(r, (a, s) => kt(s)), e;
2837
2843
  }
2838
- function vt(e) {
2844
+ function kt(e) {
2839
2845
  return `
2840
2846
  <div class="artifactuse-pdf-wrapper">
2841
2847
  <div class="artifactuse-pdf-header">
@@ -2859,25 +2865,25 @@ function vt(e) {
2859
2865
  </div>
2860
2866
  `;
2861
2867
  }
2862
- function Na(e) {
2868
+ function Ga(e) {
2863
2869
  const t = /<a[^>]*href="(https?:\/\/docs\.google\.com\/document\/d\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2864
- e = e.replace(t, (c, u, d) => W(d, "document"));
2870
+ e = e.replace(t, (c, u, d) => Q(d, "document"));
2865
2871
  const r = new RegExp(`(?<!["'=])(https?:\\/\\/docs\\.google\\.com\\/document\\/d\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
2866
- e = e.replace(r, (c, u, d) => W(d, "document"));
2872
+ e = e.replace(r, (c, u, d) => Q(d, "document"));
2867
2873
  const a = /<a[^>]*href="(https?:\/\/docs\.google\.com\/spreadsheets\/d\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2868
- e = e.replace(a, (c, u, d) => W(d, "spreadsheets"));
2874
+ e = e.replace(a, (c, u, d) => Q(d, "spreadsheets"));
2869
2875
  const s = new RegExp(`(?<!["'=])(https?:\\/\\/docs\\.google\\.com\\/spreadsheets\\/d\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
2870
- e = e.replace(s, (c, u, d) => W(d, "spreadsheets"));
2876
+ e = e.replace(s, (c, u, d) => Q(d, "spreadsheets"));
2871
2877
  const i = /<a[^>]*href="(https?:\/\/docs\.google\.com\/presentation\/d\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2872
- e = e.replace(i, (c, u, d) => W(d, "presentation"));
2878
+ e = e.replace(i, (c, u, d) => Q(d, "presentation"));
2873
2879
  const o = new RegExp(`(?<!["'=])(https?:\\/\\/docs\\.google\\.com\\/presentation\\/d\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
2874
- e = e.replace(o, (c, u, d) => W(d, "presentation"));
2880
+ e = e.replace(o, (c, u, d) => Q(d, "presentation"));
2875
2881
  const n = /<a[^>]*href="(https?:\/\/docs\.google\.com\/forms\/d\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2876
- e = e.replace(n, (c, u, d) => yt(d));
2882
+ e = e.replace(n, (c, u, d) => xt(d));
2877
2883
  const l = new RegExp(`(?<!["'=])(https?:\\/\\/docs\\.google\\.com\\/forms\\/d\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
2878
- return e = e.replace(l, (c, u, d) => yt(d)), e;
2884
+ return e = e.replace(l, (c, u, d) => xt(d)), e;
2879
2885
  }
2880
- function W(e, t) {
2886
+ function Q(e, t) {
2881
2887
  const r = {
2882
2888
  document: "Google Doc",
2883
2889
  spreadsheets: "Google Sheet",
@@ -2908,7 +2914,7 @@ function W(e, t) {
2908
2914
  </div>
2909
2915
  `;
2910
2916
  }
2911
- function yt(e) {
2917
+ function xt(e) {
2912
2918
  return `
2913
2919
  <div class="artifactuse-google-form-wrapper">
2914
2920
  <iframe
@@ -2919,13 +2925,13 @@ function yt(e) {
2919
2925
  </div>
2920
2926
  `;
2921
2927
  }
2922
- function Ua(e) {
2928
+ function Xa(e) {
2923
2929
  const t = /<a[^>]*href="(https?:\/\/[^"]+\.(docx?|xlsx?|pptx?)(?:\?[^"]*)?)"[^>]*>[^<]*<\/a>/gi;
2924
- e = e.replace(t, (a, s) => kt(s));
2930
+ e = e.replace(t, (a, s) => $t(s));
2925
2931
  const r = new RegExp(`(?<!["'=])(https?:\\/\\/[^\\s<>"]+\\.(docx?|xlsx?|pptx?)(?:\\?[^\\s<>"]*)?)(?!["'])`, "gi");
2926
- return e = e.replace(r, (a, s) => kt(s)), e;
2932
+ return e = e.replace(r, (a, s) => $t(s)), e;
2927
2933
  }
2928
- function kt(e) {
2934
+ function $t(e) {
2929
2935
  const t = encodeURIComponent(e), r = e.split("/").pop().split("?")[0], a = r.split(".").pop().toLowerCase();
2930
2936
  return `
2931
2937
  <div class="artifactuse-office-wrapper">
@@ -2951,43 +2957,43 @@ function kt(e) {
2951
2957
  </div>
2952
2958
  `;
2953
2959
  }
2954
- function Ga(e) {
2960
+ function Wa(e) {
2955
2961
  return `${e}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
2956
2962
  }
2957
- function Xa(e, t = {}) {
2963
+ function Qa(e, t = {}) {
2958
2964
  const r = t.theme || "dark", a = /<a[^>]*href="(https?:\/\/gist\.github\.com\/([a-zA-Z0-9_-]+)\/([a-f0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2959
- e = e.replace(a, (f, m, h, g) => xt(h, g));
2965
+ e = e.replace(a, (f, g, h, m) => Rt(h, m));
2960
2966
  const s = new RegExp(`(?<!["'=])(https?:\\/\\/gist\\.github\\.com\\/([a-zA-Z0-9_-]+)\\/([a-f0-9]+))(?!["'])`, "gi");
2961
- e = e.replace(s, (f, m, h, g) => xt(h, g));
2967
+ e = e.replace(s, (f, g, h, m) => Rt(h, m));
2962
2968
  const i = /<a[^>]*href="(https?:\/\/codepen\.io\/([a-zA-Z0-9_-]+)\/(?:pen|full|details)\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2963
- e = e.replace(i, (f, m, h, g) => $t(h, g, r));
2969
+ e = e.replace(i, (f, g, h, m) => At(h, m, r));
2964
2970
  const o = new RegExp(`(?<!["'=])(https?:\\/\\/codepen\\.io\\/([a-zA-Z0-9_-]+)\\/(?:pen|full|details)\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2965
- e = e.replace(o, (f, m, h, g) => $t(h, g, r));
2971
+ e = e.replace(o, (f, g, h, m) => At(h, m, r));
2966
2972
  const n = /<a[^>]*href="(https?:\/\/codesandbox\.io\/(?:s|embed)\/([a-zA-Z0-9-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2967
- e = e.replace(n, (f, m, h) => At(h, r));
2973
+ e = e.replace(n, (f, g, h) => zt(h, r));
2968
2974
  const l = new RegExp(`(?<!["'=])(https?:\\/\\/codesandbox\\.io\\/(?:s|embed)\\/([a-zA-Z0-9-]+))(?!["'])`, "gi");
2969
- e = e.replace(l, (f, m, h) => At(h, r));
2975
+ e = e.replace(l, (f, g, h) => zt(h, r));
2970
2976
  const c = /<a[^>]*href="(https?:\/\/jsfiddle\.net\/([a-zA-Z0-9_]+)\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2971
- e = e.replace(c, (f, m, h, g) => Rt(h, g, r));
2977
+ e = e.replace(c, (f, g, h, m) => St(h, m, r));
2972
2978
  const u = new RegExp(`(?<!["'=])(https?:\\/\\/jsfiddle\\.net\\/([a-zA-Z0-9_]+)\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2973
- e = e.replace(u, (f, m, h, g) => Rt(h, g, r));
2979
+ e = e.replace(u, (f, g, h, m) => St(h, m, r));
2974
2980
  const d = /<a[^>]*href="(https?:\/\/stackblitz\.com\/(?:edit|embed)\/([a-zA-Z0-9-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2975
- e = e.replace(d, (f, m, h) => zt(h, r));
2981
+ e = e.replace(d, (f, g, h) => Lt(h, r));
2976
2982
  const v = new RegExp(`(?<!["'=])(https?:\\/\\/stackblitz\\.com\\/(?:edit|embed)\\/([a-zA-Z0-9-]+))(?!["'])`, "gi");
2977
- e = e.replace(v, (f, m, h) => zt(h, r));
2983
+ e = e.replace(v, (f, g, h) => Lt(h, r));
2978
2984
  const p = /<a[^>]*href="(https?:\/\/replit\.com\/@([a-zA-Z0-9_]+)\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2979
- e = e.replace(p, (f, m, h, g) => St(h, g, r));
2985
+ e = e.replace(p, (f, g, h, m) => _t(h, m, r));
2980
2986
  const w = new RegExp(`(?<!["'=])(https?:\\/\\/replit\\.com\\/@([a-zA-Z0-9_]+)\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
2981
- return e = e.replace(w, (f, m, h, g) => St(h, g, r)), e;
2987
+ return e = e.replace(w, (f, g, h, m) => _t(h, m, r)), e;
2982
2988
  }
2983
- function xt(e, t) {
2989
+ function Rt(e, t) {
2984
2990
  return `
2985
- <div class="artifactuse-gist-wrapper" id="${Ga("gist")}">
2991
+ <div class="artifactuse-gist-wrapper" id="${Wa("gist")}">
2986
2992
  <script src="https://gist.github.com/${e}/${t}.js"><\/script>
2987
2993
  </div>
2988
2994
  `;
2989
2995
  }
2990
- function $t(e, t, r = "dark") {
2996
+ function At(e, t, r = "dark") {
2991
2997
  return `
2992
2998
  <div class="artifactuse-codepen-wrapper">
2993
2999
  <iframe
@@ -3004,7 +3010,7 @@ function $t(e, t, r = "dark") {
3004
3010
  </div>
3005
3011
  `;
3006
3012
  }
3007
- function At(e, t = "dark") {
3013
+ function zt(e, t = "dark") {
3008
3014
  return `
3009
3015
  <div class="artifactuse-codesandbox-wrapper">
3010
3016
  <iframe
@@ -3018,7 +3024,7 @@ function At(e, t = "dark") {
3018
3024
  </div>
3019
3025
  `;
3020
3026
  }
3021
- function Rt(e, t, r = "dark") {
3027
+ function St(e, t, r = "dark") {
3022
3028
  return `
3023
3029
  <div class="artifactuse-jsfiddle-wrapper">
3024
3030
  <iframe
@@ -3033,7 +3039,7 @@ function Rt(e, t, r = "dark") {
3033
3039
  </div>
3034
3040
  `;
3035
3041
  }
3036
- function zt(e, t = "dark") {
3042
+ function Lt(e, t = "dark") {
3037
3043
  return `
3038
3044
  <div class="artifactuse-stackblitz-wrapper">
3039
3045
  <iframe
@@ -3045,7 +3051,7 @@ function zt(e, t = "dark") {
3045
3051
  </div>
3046
3052
  `;
3047
3053
  }
3048
- function St(e, t, r = "dark") {
3054
+ function _t(e, t, r = "dark") {
3049
3055
  return `
3050
3056
  <div class="artifactuse-replit-wrapper">
3051
3057
  <iframe
@@ -3057,25 +3063,25 @@ function St(e, t, r = "dark") {
3057
3063
  </div>
3058
3064
  `;
3059
3065
  }
3060
- function Wa(e) {
3066
+ function Ka(e) {
3061
3067
  const t = /<a[^>]*href="(https?:\/\/public\.tableau\.com\/(?:views|profile)\/([^\s"]+))"[^>]*>[^<]*<\/a>/gi;
3062
- e = e.replace(t, (c, u, d) => Lt(d));
3068
+ e = e.replace(t, (c, u, d) => Mt(d));
3063
3069
  const r = new RegExp(`(?<!["'=])(https?:\\/\\/public\\.tableau\\.com\\/(?:views|profile)\\/([^\\s<>"]+))(?!["'])`, "gi");
3064
- e = e.replace(r, (c, u, d) => Lt(d));
3070
+ e = e.replace(r, (c, u, d) => Mt(d));
3065
3071
  const a = /<a[^>]*href="(https?:\/\/(?:public\.)?flourish\.studio\/visualisation\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3066
- e = e.replace(a, (c, u, d) => _t(d));
3072
+ e = e.replace(a, (c, u, d) => Ct(d));
3067
3073
  const s = new RegExp(`(?<!["'=])(https?:\\/\\/(?:public\\.)?flourish\\.studio\\/visualisation\\/(\\d+))(?!["'])`, "gi");
3068
- e = e.replace(s, (c, u, d) => _t(d));
3074
+ e = e.replace(s, (c, u, d) => Ct(d));
3069
3075
  const i = /<a[^>]*href="(https?:\/\/datawrapper\.dwcdn\.net\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3070
- e = e.replace(i, (c, u, d) => Mt(d));
3076
+ e = e.replace(i, (c, u, d) => Tt(d));
3071
3077
  const o = new RegExp(`(?<!["'=])(https?:\\/\\/datawrapper\\.dwcdn\\.net\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
3072
- e = e.replace(o, (c, u, d) => Mt(d));
3078
+ e = e.replace(o, (c, u, d) => Tt(d));
3073
3079
  const n = /<a[^>]*href="(https?:\/\/(?:e\.)?infogram\.com\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3074
- e = e.replace(n, (c, u, d) => Ct(d));
3080
+ e = e.replace(n, (c, u, d) => Et(d));
3075
3081
  const l = new RegExp(`(?<!["'=])(https?:\\/\\/(?:e\\.)?infogram\\.com\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
3076
- return e = e.replace(l, (c, u, d) => Ct(d)), e;
3082
+ return e = e.replace(l, (c, u, d) => Et(d)), e;
3077
3083
  }
3078
- function Lt(e) {
3084
+ function Mt(e) {
3079
3085
  return `
3080
3086
  <div class="artifactuse-tableau-wrapper">
3081
3087
  <iframe
@@ -3087,7 +3093,7 @@ function Lt(e) {
3087
3093
  </div>
3088
3094
  `;
3089
3095
  }
3090
- function _t(e) {
3096
+ function Ct(e) {
3091
3097
  return `
3092
3098
  <div class="artifactuse-flourish-wrapper">
3093
3099
  <iframe
@@ -3099,7 +3105,7 @@ function _t(e) {
3099
3105
  </div>
3100
3106
  `;
3101
3107
  }
3102
- function Mt(e) {
3108
+ function Tt(e) {
3103
3109
  return `
3104
3110
  <div class="artifactuse-datawrapper-wrapper">
3105
3111
  <iframe
@@ -3111,7 +3117,7 @@ function Mt(e) {
3111
3117
  </div>
3112
3118
  `;
3113
3119
  }
3114
- function Ct(e) {
3120
+ function Et(e) {
3115
3121
  return `
3116
3122
  <div class="artifactuse-infogram-wrapper">
3117
3123
  <iframe
@@ -3124,33 +3130,33 @@ function Ct(e) {
3124
3130
  </div>
3125
3131
  `;
3126
3132
  }
3127
- function Qa(e, t = {}) {
3133
+ function Ja(e, t = {}) {
3128
3134
  const r = t.theme || "dark", a = /<a[^>]*href="(https?:\/\/sketchfab\.com\/(?:3d-)?models\/([a-zA-Z0-9-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3129
- e = e.replace(a, (f, m, h) => Tt(h, r));
3135
+ e = e.replace(a, (f, g, h) => Pt(h, r));
3130
3136
  const s = new RegExp(`(?<!["'=])(https?:\\/\\/sketchfab\\.com\\/(?:3d-)?models\\/([a-zA-Z0-9-]+))(?!["'])`, "gi");
3131
- e = e.replace(s, (f, m, h) => Tt(h, r));
3137
+ e = e.replace(s, (f, g, h) => Pt(h, r));
3132
3138
  const i = /<a[^>]*href="(https?:\/\/(?:www\.)?figma\.com\/(?:file|design)\/([a-zA-Z0-9]+)(?:\/[^?\s"]*)?(?:\?node-id=([^&\s"]+))?[^"]*)"[^>]*>[^<]*<\/a>/gi;
3133
- e = e.replace(i, (f, m, h, g) => Et(h, g));
3139
+ e = e.replace(i, (f, g, h, m) => It(h, m));
3134
3140
  const o = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?figma\\.com\\/(?:file|design)\\/([a-zA-Z0-9]+)(?:\\/[^?\\s]*)?(?:\\?node-id=([^&\\s]+))?)(?!["'])`, "gi");
3135
- e = e.replace(o, (f, m, h, g) => Et(h, g));
3141
+ e = e.replace(o, (f, g, h, m) => It(h, m));
3136
3142
  const n = /<a[^>]*href="(https?:\/\/(?:www\.)?figma\.com\/proto\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3137
- e = e.replace(n, (f, m, h) => Pt(h, m));
3143
+ e = e.replace(n, (f, g, h) => Zt(h, g));
3138
3144
  const l = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?figma\\.com\\/proto\\/([a-zA-Z0-9]+)[^\\s]*)(?!["'])`, "gi");
3139
- e = e.replace(l, (f, m, h) => Pt(h, m));
3145
+ e = e.replace(l, (f, g, h) => Zt(h, g));
3140
3146
  const c = /<a[^>]*href="(https?:\/\/(?:www\.)?canva\.com\/design\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3141
- e = e.replace(c, (f, m, h) => It(h, m));
3147
+ e = e.replace(c, (f, g, h) => qt(h, g));
3142
3148
  const u = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?canva\\.com\\/design\\/([a-zA-Z0-9_-]+)[^\\s]*)(?!["'])`, "gi");
3143
- e = e.replace(u, (f, m, h) => It(h, m));
3149
+ e = e.replace(u, (f, g, h) => qt(h, g));
3144
3150
  const d = /<a[^>]*href="(https?:\/\/dribbble\.com\/shots\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3145
- e = e.replace(d, (f, m, h) => Zt(h));
3151
+ e = e.replace(d, (f, g, h) => Ht(h));
3146
3152
  const v = new RegExp(`(?<!["'=])(https?:\\/\\/dribbble\\.com\\/shots\\/(\\d+))(?!["'])`, "gi");
3147
- e = e.replace(v, (f, m, h) => Zt(h));
3153
+ e = e.replace(v, (f, g, h) => Ht(h));
3148
3154
  const p = /<a[^>]*href="(https?:\/\/(?:www\.)?behance\.net\/gallery\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3149
- e = e.replace(p, (f, m, h) => qt(h, m));
3155
+ e = e.replace(p, (f, g, h) => jt(h, g));
3150
3156
  const w = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?behance\\.net\\/gallery\\/(\\d+)[^\\s]*)(?!["'])`, "gi");
3151
- return e = e.replace(w, (f, m, h) => qt(h, m)), e;
3157
+ return e = e.replace(w, (f, g, h) => jt(h, g)), e;
3152
3158
  }
3153
- function Tt(e, t = "dark") {
3159
+ function Pt(e, t = "dark") {
3154
3160
  return `
3155
3161
  <div class="artifactuse-sketchfab-wrapper">
3156
3162
  <iframe
@@ -3165,7 +3171,7 @@ function Tt(e, t = "dark") {
3165
3171
  </div>
3166
3172
  `;
3167
3173
  }
3168
- function Et(e, t) {
3174
+ function It(e, t) {
3169
3175
  const r = t ? `&node-id=${t}` : "";
3170
3176
  return `
3171
3177
  <div class="artifactuse-figma-wrapper">
@@ -3178,7 +3184,7 @@ function Et(e, t) {
3178
3184
  </div>
3179
3185
  `;
3180
3186
  }
3181
- function Pt(e, t) {
3187
+ function Zt(e, t) {
3182
3188
  return `
3183
3189
  <div class="artifactuse-figma-wrapper">
3184
3190
  <iframe
@@ -3190,7 +3196,7 @@ function Pt(e, t) {
3190
3196
  </div>
3191
3197
  `;
3192
3198
  }
3193
- function It(e, t) {
3199
+ function qt(e, t) {
3194
3200
  return `
3195
3201
  <div class="artifactuse-canva-wrapper">
3196
3202
  <div class="artifactuse-canva-preview">
@@ -3207,7 +3213,7 @@ function It(e, t) {
3207
3213
  </div>
3208
3214
  `;
3209
3215
  }
3210
- function Zt(e) {
3216
+ function Ht(e) {
3211
3217
  return `
3212
3218
  <div class="artifactuse-dribbble-wrapper">
3213
3219
  <iframe
@@ -3219,7 +3225,7 @@ function Zt(e) {
3219
3225
  </div>
3220
3226
  `;
3221
3227
  }
3222
- function qt(e, t) {
3228
+ function jt(e, t) {
3223
3229
  return `
3224
3230
  <div class="artifactuse-behance-wrapper">
3225
3231
  <iframe
@@ -3234,37 +3240,37 @@ function qt(e, t) {
3234
3240
  </div>
3235
3241
  `;
3236
3242
  }
3237
- function Ka(e, t = {}) {
3243
+ function Ya(e, t = {}) {
3238
3244
  const r = t.theme || "dark", a = /<a[^>]*href="(https?:\/\/(?:[a-zA-Z0-9-]+\.)?typeform\.com\/to\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3239
- e = e.replace(a, (h, g, y) => Ht(y));
3245
+ e = e.replace(a, (h, m, y) => Dt(y));
3240
3246
  const s = new RegExp(`(?<!["'=])(https?:\\/\\/(?:[a-zA-Z0-9-]+\\.)?typeform\\.com\\/to\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
3241
- e = e.replace(s, (h, g, y) => Ht(y));
3247
+ e = e.replace(s, (h, m, y) => Dt(y));
3242
3248
  const i = /<a[^>]*href="(https?:\/\/calendly\.com\/([a-zA-Z0-9_-]+)(?:\/([a-zA-Z0-9_-]+))?[^"]*)"[^>]*>[^<]*<\/a>/gi;
3243
- e = e.replace(i, (h, g, y, b) => jt(y, b));
3249
+ e = e.replace(i, (h, m, y, b) => Ot(y, b));
3244
3250
  const o = new RegExp(`(?<!["'=])(https?:\\/\\/calendly\\.com\\/([a-zA-Z0-9_-]+)(?:\\/([a-zA-Z0-9_-]+))?)(?!["'])`, "gi");
3245
- e = e.replace(o, (h, g, y, b) => jt(y, b));
3251
+ e = e.replace(o, (h, m, y, b) => Ot(y, b));
3246
3252
  const n = /<a[^>]*href="(https?:\/\/calendar\.google\.com\/calendar\/appointments\/schedules\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3247
- e = e.replace(n, (h, g, y) => Dt(y));
3253
+ e = e.replace(n, (h, m, y) => Bt(y));
3248
3254
  const l = new RegExp(`(?<!["'=])(https?:\\/\\/calendar\\.google\\.com\\/calendar\\/appointments\\/schedules\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
3249
- e = e.replace(l, (h, g, y) => Dt(y));
3255
+ e = e.replace(l, (h, m, y) => Bt(y));
3250
3256
  const c = /<a[^>]*href="(https?:\/\/cal\.com\/([a-zA-Z0-9_-]+)(?:\/([a-zA-Z0-9_-]+))?[^"]*)"[^>]*>[^<]*<\/a>/gi;
3251
- e = e.replace(c, (h, g, y, b) => Ot(y, b, r));
3257
+ e = e.replace(c, (h, m, y, b) => Vt(y, b, r));
3252
3258
  const u = new RegExp(`(?<!["'=])(https?:\\/\\/cal\\.com\\/([a-zA-Z0-9_-]+)(?:\\/([a-zA-Z0-9_-]+))?)(?!["'])`, "gi");
3253
- e = e.replace(u, (h, g, y, b) => Ot(y, b, r));
3259
+ e = e.replace(u, (h, m, y, b) => Vt(y, b, r));
3254
3260
  const d = /<a[^>]*href="(https?:\/\/(?:www\.)?notion\.so\/([a-zA-Z0-9-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3255
- e = e.replace(d, (h, g, y) => Vt(y));
3261
+ e = e.replace(d, (h, m, y) => Ft(y));
3256
3262
  const v = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?notion\\.so\\/([a-zA-Z0-9-]+))(?!["'])`, "gi");
3257
- e = e.replace(v, (h, g, y) => Vt(y));
3263
+ e = e.replace(v, (h, m, y) => Ft(y));
3258
3264
  const p = /<a[^>]*href="(https?:\/\/airtable\.com\/(?:embed\/)?([a-zA-Z0-9]+)(?:\/([a-zA-Z0-9]+))?[^"]*)"[^>]*>[^<]*<\/a>/gi;
3259
- e = e.replace(p, (h, g, y, b) => Bt(y, b));
3265
+ e = e.replace(p, (h, m, y, b) => Nt(y, b));
3260
3266
  const w = new RegExp(`(?<!["'=])(https?:\\/\\/airtable\\.com\\/(?:embed\\/)?([a-zA-Z0-9]+)(?:\\/([a-zA-Z0-9]+))?)(?!["'])`, "gi");
3261
- e = e.replace(w, (h, g, y, b) => Bt(y, b));
3267
+ e = e.replace(w, (h, m, y, b) => Nt(y, b));
3262
3268
  const f = /<a[^>]*href="(https?:\/\/miro\.com\/app\/board\/([a-zA-Z0-9_=-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3263
- e = e.replace(f, (h, g, y) => Ft(y));
3264
- const m = new RegExp(`(?<!["'=])(https?:\\/\\/miro\\.com\\/app\\/board\\/([a-zA-Z0-9_=-]+))(?!["'])`, "gi");
3265
- return e = e.replace(m, (h, g, y) => Ft(y)), e;
3269
+ e = e.replace(f, (h, m, y) => Ut(y));
3270
+ const g = new RegExp(`(?<!["'=])(https?:\\/\\/miro\\.com\\/app\\/board\\/([a-zA-Z0-9_=-]+))(?!["'])`, "gi");
3271
+ return e = e.replace(g, (h, m, y) => Ut(y)), e;
3266
3272
  }
3267
- function Ht(e) {
3273
+ function Dt(e) {
3268
3274
  return `
3269
3275
  <div class="artifactuse-typeform-wrapper">
3270
3276
  <iframe
@@ -3275,7 +3281,7 @@ function Ht(e) {
3275
3281
  </div>
3276
3282
  `;
3277
3283
  }
3278
- function jt(e, t = "") {
3284
+ function Ot(e, t = "") {
3279
3285
  return `
3280
3286
  <div class="artifactuse-calendly-wrapper">
3281
3287
  <iframe
@@ -3286,7 +3292,7 @@ function jt(e, t = "") {
3286
3292
  </div>
3287
3293
  `;
3288
3294
  }
3289
- function Dt(e) {
3295
+ function Bt(e) {
3290
3296
  return `
3291
3297
  <div class="artifactuse-google-calendar-wrapper">
3292
3298
  <iframe
@@ -3297,7 +3303,7 @@ function Dt(e) {
3297
3303
  </div>
3298
3304
  `;
3299
3305
  }
3300
- function Ot(e, t = "", r = "dark") {
3306
+ function Vt(e, t = "", r = "dark") {
3301
3307
  return `
3302
3308
  <div class="artifactuse-calcom-wrapper">
3303
3309
  <iframe
@@ -3308,7 +3314,7 @@ function Ot(e, t = "", r = "dark") {
3308
3314
  </div>
3309
3315
  `;
3310
3316
  }
3311
- function Vt(e) {
3317
+ function Ft(e) {
3312
3318
  return `
3313
3319
  <div class="artifactuse-notion-wrapper">
3314
3320
  <iframe
@@ -3320,7 +3326,7 @@ function Vt(e) {
3320
3326
  </div>
3321
3327
  `;
3322
3328
  }
3323
- function Bt(e, t) {
3329
+ function Nt(e, t) {
3324
3330
  return `
3325
3331
  <div class="artifactuse-airtable-wrapper">
3326
3332
  <iframe
@@ -3331,7 +3337,7 @@ function Bt(e, t) {
3331
3337
  </div>
3332
3338
  `;
3333
3339
  }
3334
- function Ft(e) {
3340
+ function Ut(e) {
3335
3341
  return `
3336
3342
  <div class="artifactuse-miro-wrapper">
3337
3343
  <iframe
@@ -3343,37 +3349,37 @@ function Ft(e) {
3343
3349
  </div>
3344
3350
  `;
3345
3351
  }
3346
- let F = null, de = !1, Fe = !1;
3347
- function lr(e) {
3352
+ let N = null, fe = !1, Ue = !1;
3353
+ function pr(e) {
3348
3354
  const t = /<pre><code class="language-mermaid">([\s\S]*?)<\/code><\/pre>/gi;
3349
3355
  return e = e.replace(t, (r, a) => {
3350
- const s = Ja(a).trim();
3351
- return Ya(s);
3356
+ const s = es(a).trim();
3357
+ return ts(s);
3352
3358
  }), e;
3353
3359
  }
3354
- function Ja(e) {
3360
+ function es(e) {
3355
3361
  return e.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&nbsp;/g, " ");
3356
3362
  }
3357
- function Ya(e) {
3358
- const t = ur(e);
3363
+ function ts(e) {
3364
+ const t = dr(e);
3359
3365
  return `
3360
3366
  <div class="artifactuse-mermaid-container" data-mermaid-id="${`mermaid-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`}" data-mermaid-diagram="${t}">
3361
3367
  <div class="artifactuse-mermaid-loading">Loading diagram...</div>
3362
3368
  </div>
3363
3369
  `;
3364
3370
  }
3365
- function ur(e) {
3371
+ function dr(e) {
3366
3372
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
3367
3373
  }
3368
- function pr(e) {
3374
+ function fr(e) {
3369
3375
  return e.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&amp;/g, "&");
3370
3376
  }
3371
- function dr(e = {}) {
3372
- return typeof mermaid > "u" ? de ? (console.warn("Mermaid loading previously failed. Diagram rendering disabled."), Promise.resolve()) : (console.debug("Mermaid library not loaded. Attempting to load..."), ts().then(() => (console.log("Mermaid loaded, rendering diagrams..."), Nt(e), fe())).catch((t) => {
3373
- console.error("Failed to load Mermaid library:", t), de = !0, es();
3374
- })) : (Fe || Nt(e), fe());
3377
+ function hr(e = {}) {
3378
+ return typeof mermaid > "u" ? fe ? (console.warn("Mermaid loading previously failed. Diagram rendering disabled."), Promise.resolve()) : (console.debug("Mermaid library not loaded. Attempting to load..."), as().then(() => (console.log("Mermaid loaded, rendering diagrams..."), Gt(e), he())).catch((t) => {
3379
+ console.error("Failed to load Mermaid library:", t), fe = !0, rs();
3380
+ })) : (Ue || Gt(e), he());
3375
3381
  }
3376
- function Nt(e = {}) {
3382
+ function Gt(e = {}) {
3377
3383
  if (typeof mermaid > "u") return;
3378
3384
  const r = {
3379
3385
  dark: "dark",
@@ -3401,9 +3407,9 @@ function Nt(e = {}) {
3401
3407
  theme: r
3402
3408
  // Ensure theme is not overridden by spread
3403
3409
  };
3404
- mermaid.initialize(a), Fe = !0;
3410
+ mermaid.initialize(a), Ue = !0;
3405
3411
  }
3406
- async function fe() {
3412
+ async function he() {
3407
3413
  if (typeof mermaid > "u") {
3408
3414
  console.warn("renderAllMermaid called but Mermaid is not available");
3409
3415
  return;
@@ -3411,7 +3417,7 @@ async function fe() {
3411
3417
  const e = document.querySelectorAll(".artifactuse-mermaid-container");
3412
3418
  for (const t of e) {
3413
3419
  if (t.dataset.rendered === "true") continue;
3414
- const r = pr(t.dataset.mermaidDiagram), a = t.dataset.mermaidId;
3420
+ const r = fr(t.dataset.mermaidDiagram), a = t.dataset.mermaidId;
3415
3421
  try {
3416
3422
  if (await mermaid.parse(r)) {
3417
3423
  const { svg: i } = await mermaid.render(a, r);
@@ -3421,78 +3427,78 @@ async function fe() {
3421
3427
  console.error("Mermaid rendering error:", s), t.innerHTML = `
3422
3428
  <div class="artifactuse-mermaid-error">
3423
3429
  <div class="artifactuse-mermaid-error-title">Diagram Error</div>
3424
- <pre class="artifactuse-mermaid-error-message">${Ee(s.message || "Invalid diagram syntax")}</pre>
3430
+ <pre class="artifactuse-mermaid-error-message">${Ie(s.message || "Invalid diagram syntax")}</pre>
3425
3431
  <details class="artifactuse-mermaid-error-details">
3426
3432
  <summary>View source</summary>
3427
- <pre>${Ee(r)}</pre>
3433
+ <pre>${Ie(r)}</pre>
3428
3434
  </details>
3429
3435
  </div>
3430
3436
  `, t.dataset.rendered = "true", t.classList.add("artifactuse-mermaid-error-container");
3431
3437
  }
3432
3438
  }
3433
3439
  }
3434
- function es() {
3440
+ function rs() {
3435
3441
  document.querySelectorAll(".artifactuse-mermaid-container").forEach((e) => {
3436
3442
  if (e.dataset.rendered === "true") return;
3437
- const t = pr(e.dataset.mermaidDiagram);
3443
+ const t = fr(e.dataset.mermaidDiagram);
3438
3444
  e.innerHTML = `
3439
3445
  <div class="artifactuse-mermaid-fallback">
3440
3446
  <div class="artifactuse-mermaid-fallback-title">Mermaid Diagram</div>
3441
- <pre class="artifactuse-mermaid-fallback-source">${Ee(t)}</pre>
3447
+ <pre class="artifactuse-mermaid-fallback-source">${Ie(t)}</pre>
3442
3448
  </div>
3443
3449
  `, e.dataset.rendered = "true", e.classList.add("artifactuse-mermaid-fallback-container");
3444
3450
  });
3445
3451
  }
3446
- function Ee(e) {
3452
+ function Ie(e) {
3447
3453
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
3448
3454
  }
3449
- function ts() {
3450
- return F || (typeof mermaid < "u" ? Promise.resolve() : (F = new Promise((e, t) => {
3455
+ function as() {
3456
+ return N || (typeof mermaid < "u" ? Promise.resolve() : (N = new Promise((e, t) => {
3451
3457
  const r = setTimeout(() => {
3452
- F = null, t(new Error("Mermaid loading timed out after 15 seconds"));
3458
+ N = null, t(new Error("Mermaid loading timed out after 15 seconds"));
3453
3459
  }, 15e3), a = document.createElement("script");
3454
3460
  a.src = "https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js", a.crossOrigin = "anonymous", a.onload = () => {
3455
3461
  clearTimeout(r), console.log("Mermaid script loaded successfully"), e();
3456
3462
  }, a.onerror = (s) => {
3457
- clearTimeout(r), F = null, console.error("Mermaid script failed to load:", s), t(new Error("Failed to load Mermaid script from CDN"));
3463
+ clearTimeout(r), N = null, console.error("Mermaid script failed to load:", s), t(new Error("Failed to load Mermaid script from CDN"));
3458
3464
  }, document.head.appendChild(a);
3459
- }), F));
3465
+ }), N));
3460
3466
  }
3461
- function zs() {
3462
- F = null, de = !1, Fe = !1;
3467
+ function Ls() {
3468
+ N = null, fe = !1, Ue = !1;
3463
3469
  }
3464
- function Ss() {
3470
+ function _s() {
3465
3471
  return typeof mermaid < "u";
3466
3472
  }
3467
- function Ls() {
3468
- return de;
3473
+ function Ms() {
3474
+ return fe;
3469
3475
  }
3470
- function _s(e, t = {}) {
3476
+ function Cs(e, t = {}) {
3471
3477
  if (!e) return Promise.resolve();
3472
3478
  let r = e.innerHTML;
3473
- return r = lr(r), e.innerHTML = r, dr(t);
3479
+ return r = pr(r), e.innerHTML = r, hr(t);
3474
3480
  }
3475
- async function Ms(e) {
3481
+ async function Ts(e) {
3476
3482
  const t = document.querySelector(`[data-mermaid-id="${e}"]`);
3477
- t && (t.dataset.rendered = "false", t.innerHTML = '<div class="artifactuse-mermaid-loading">Loading diagram...</div>', await fe());
3483
+ t && (t.dataset.rendered = "false", t.innerHTML = '<div class="artifactuse-mermaid-loading">Loading diagram...</div>', await he());
3478
3484
  }
3479
- async function Cs(e, t) {
3485
+ async function Es(e, t) {
3480
3486
  const r = document.querySelector(`[data-mermaid-id="${e}"]`);
3481
- r && (r.dataset.mermaidDiagram = ur(t), r.dataset.rendered = "false", r.innerHTML = '<div class="artifactuse-mermaid-loading">Loading diagram...</div>', await fe());
3487
+ r && (r.dataset.mermaidDiagram = dr(t), r.dataset.rendered = "false", r.innerHTML = '<div class="artifactuse-mermaid-loading">Loading diagram...</div>', await he());
3482
3488
  }
3483
- function rs(e) {
3489
+ function ss(e) {
3484
3490
  const t = /<table([^>]*)>([\s\S]*?)<\/table>/gi;
3485
3491
  let r = 0;
3486
3492
  return e = e.replace(t, (a, s, i) => {
3487
3493
  const o = `artifactuse-table-${r++}`;
3488
- return as(o, s, i);
3494
+ return is(o, s, i);
3489
3495
  }), e;
3490
3496
  }
3491
- function as(e, t, r) {
3497
+ function is(e, t, r) {
3492
3498
  const a = /<thead/i.test(r) || /<th/i.test(r), s = (r.match(/<tr/gi) || []).length;
3493
3499
  if (!a || s < 3)
3494
3500
  return `<table${t} class="artifactuse-table">${r}</table>`;
3495
- const i = ss(r);
3501
+ const i = ns(r);
3496
3502
  return `
3497
3503
  <div class="artifactuse-table-container" data-table-id="${e}">
3498
3504
  <div class="artifactuse-table-controls">
@@ -3535,7 +3541,7 @@ function as(e, t, r) {
3535
3541
  </div>
3536
3542
  `;
3537
3543
  }
3538
- function ss(e) {
3544
+ function ns(e) {
3539
3545
  let t = 0;
3540
3546
  return e = e.replace(/<th(\s[^>]*)?>([\s\S]*?)<\/th>/gi, (r, a, s) => {
3541
3547
  const i = t++;
@@ -3554,7 +3560,7 @@ function ss(e) {
3554
3560
  `;
3555
3561
  }), e;
3556
3562
  }
3557
- function is(e) {
3563
+ function os(e) {
3558
3564
  const t = e.querySelectorAll("tr"), r = [];
3559
3565
  return t.forEach((a) => {
3560
3566
  const s = a.querySelectorAll("th, td"), i = [];
@@ -3566,11 +3572,11 @@ function is(e) {
3566
3572
  }), r.join(`
3567
3573
  `);
3568
3574
  }
3569
- function ns(e, t = "table-data.csv") {
3575
+ function cs(e, t = "table-data.csv") {
3570
3576
  const r = new Blob([e], { type: "text/csv;charset=utf-8;" }), a = URL.createObjectURL(r), s = document.createElement("a");
3571
3577
  s.href = a, s.download = t, document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(a);
3572
3578
  }
3573
- function os(e) {
3579
+ function ls(e) {
3574
3580
  const t = e.querySelectorAll("tr"), r = [];
3575
3581
  return t.forEach((a) => {
3576
3582
  const s = a.querySelectorAll("th, td"), i = [];
@@ -3580,7 +3586,7 @@ function os(e) {
3580
3586
  }), r.join(`
3581
3587
  `);
3582
3588
  }
3583
- function cs(e, t, r = !0) {
3589
+ function us(e, t, r = !0) {
3584
3590
  const a = e.querySelector("tbody") || e, s = Array.from(a.querySelectorAll("tr")).filter((i) => !i.querySelector("th"));
3585
3591
  s.sort((i, o) => {
3586
3592
  const n = i.cells[t], l = o.cells[t];
@@ -3593,7 +3599,7 @@ function cs(e, t, r = !0) {
3593
3599
  return !isNaN(p.getTime()) && !isNaN(w.getTime()) ? r ? p - w : w - p : r ? c.localeCompare(u) : u.localeCompare(c);
3594
3600
  }), s.forEach((i) => a.appendChild(i));
3595
3601
  }
3596
- function ls(e, t) {
3602
+ function ps(e, t) {
3597
3603
  const r = e.querySelectorAll("tbody tr, tr:not(:first-child)"), a = t.toLowerCase().trim();
3598
3604
  let s = 0;
3599
3605
  return r.forEach((i) => {
@@ -3605,13 +3611,13 @@ function ls(e, t) {
3605
3611
  i.style.display = n ? "" : "none", n && s++;
3606
3612
  }), s;
3607
3613
  }
3608
- function us() {
3614
+ function ds() {
3609
3615
  document.querySelectorAll("[data-table-search]").forEach((e) => {
3610
3616
  const t = e.dataset.tableSearch, r = document.getElementById(t), a = document.querySelector(`[data-table-count="${t}"]`);
3611
3617
  if (r) {
3612
3618
  const s = r.querySelectorAll("tbody tr, tr:not(:first-child)"), i = Array.from(s).filter((o) => !o.querySelector("th")).length;
3613
3619
  a && (a.textContent = `${i} rows`), e.addEventListener("input", (o) => {
3614
- const n = ls(r, o.target.value);
3620
+ const n = ps(r, o.target.value);
3615
3621
  a && (a.textContent = o.target.value ? `${n} of ${i} rows` : `${i} rows`);
3616
3622
  });
3617
3623
  }
@@ -3620,21 +3626,21 @@ function us() {
3620
3626
  const t = e.closest("table"), r = parseInt(e.dataset.sortCol), s = e.dataset.sortDir !== "asc";
3621
3627
  t.querySelectorAll(".artifactuse-sortable-header").forEach((i) => {
3622
3628
  i.dataset.sortDir = "", i.classList.remove("sort-asc", "sort-desc");
3623
- }), e.dataset.sortDir = s ? "asc" : "desc", e.classList.add(s ? "sort-asc" : "sort-desc"), cs(t, r, s);
3629
+ }), e.dataset.sortDir = s ? "asc" : "desc", e.classList.add(s ? "sort-asc" : "sort-desc"), us(t, r, s);
3624
3630
  });
3625
3631
  }), document.querySelectorAll("[data-table-export]").forEach((e) => {
3626
3632
  e.addEventListener("click", () => {
3627
3633
  const t = e.dataset.tableExport, r = document.getElementById(t);
3628
3634
  if (r) {
3629
- const a = is(r);
3630
- ns(a, `${t}.csv`);
3635
+ const a = os(r);
3636
+ cs(a, `${t}.csv`);
3631
3637
  }
3632
3638
  });
3633
3639
  }), document.querySelectorAll("[data-table-copy]").forEach((e) => {
3634
3640
  e.addEventListener("click", async () => {
3635
3641
  const t = e.dataset.tableCopy, r = document.getElementById(t);
3636
3642
  if (r) {
3637
- const a = os(r);
3643
+ const a = ls(r);
3638
3644
  try {
3639
3645
  await navigator.clipboard.writeText(a);
3640
3646
  const s = e.querySelector("span"), i = s ? s.textContent : "";
@@ -3648,52 +3654,52 @@ function us() {
3648
3654
  });
3649
3655
  });
3650
3656
  }
3651
- let N = null, he = !1;
3652
- function fr(e) {
3653
- return e = ps(e), e = e.replace(/\$\$([\s\S]*?)\$\$/g, (t, r) => te(r.trim(), !0)), e = e.replace(/\\\[([\s\S]*?)\\\]/g, (t, r) => te(r.trim(), !0)), e = e.replace(new RegExp("(?<!\\$)\\$(?!\\$)((?:[^$\\\\]|\\\\.)+?)\\$(?!\\$)", "g"), (t, r) => te(r.trim(), !1)), e = e.replace(/\\\(([\s\S]*?)\\\)/g, (t, r) => te(r.trim(), !1)), e;
3657
+ let U = null, ge = !1;
3658
+ function gr(e) {
3659
+ return e = fs(e), e = e.replace(/\$\$([\s\S]*?)\$\$/g, (t, r) => re(r.trim(), !0)), e = e.replace(/\\\[([\s\S]*?)\\\]/g, (t, r) => re(r.trim(), !0)), e = e.replace(new RegExp("(?<!\\$)\\$(?!\\$)((?:[^$\\\\]|\\\\.)+?)\\$(?!\\$)", "g"), (t, r) => re(r.trim(), !1)), e = e.replace(/\\\(([\s\S]*?)\\\)/g, (t, r) => re(r.trim(), !1)), e;
3654
3660
  }
3655
- function ps(e) {
3661
+ function fs(e) {
3656
3662
  const t = /<pre><code class="language-(math|latex)">([\s\S]*?)<\/code><\/pre>/gi;
3657
3663
  return e = e.replace(t, (r, a, s) => {
3658
- const i = ds(s).trim();
3659
- return te(i, !0);
3664
+ const i = hs(s).trim();
3665
+ return re(i, !0);
3660
3666
  }), e;
3661
3667
  }
3662
- function ds(e) {
3668
+ function hs(e) {
3663
3669
  return e.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&nbsp;/g, " ");
3664
3670
  }
3665
- function te(e, t = !1) {
3666
- const r = fs(e);
3671
+ function re(e, t = !1) {
3672
+ const r = gs(e);
3667
3673
  return `<span class="artifactuse-math-container ${t ? "artifactuse-math-display" : "artifactuse-math-inline"}" data-tex="${r}" data-display="${t ? "true" : "false"}"></span>`;
3668
3674
  }
3669
- function fs(e) {
3675
+ function gs(e) {
3670
3676
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
3671
3677
  }
3672
- function hr(e) {
3678
+ function mr(e) {
3673
3679
  return e.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&amp;/g, "&");
3674
3680
  }
3675
- function gr() {
3676
- return typeof katex > "u" ? he ? (console.warn("KaTeX loading previously failed. Math rendering disabled."), Promise.resolve()) : (console.debug("KaTeX library not loaded. Attempting to load..."), gs().then(() => {
3677
- console.log("KaTeX loaded, rendering math..."), Ut();
3681
+ function wr() {
3682
+ return typeof katex > "u" ? ge ? (console.warn("KaTeX loading previously failed. Math rendering disabled."), Promise.resolve()) : (console.debug("KaTeX library not loaded. Attempting to load..."), ws().then(() => {
3683
+ console.log("KaTeX loaded, rendering math..."), Xt();
3678
3684
  }).catch((e) => {
3679
- console.error("Failed to load KaTeX library:", e), he = !0, hs();
3680
- })) : (Ut(), Promise.resolve());
3685
+ console.error("Failed to load KaTeX library:", e), ge = !0, ms();
3686
+ })) : (Xt(), Promise.resolve());
3681
3687
  }
3682
- function hs() {
3688
+ function ms() {
3683
3689
  document.querySelectorAll(".artifactuse-math-container").forEach((e) => {
3684
3690
  if (e.dataset.rendered === "true") return;
3685
- const t = hr(e.dataset.tex);
3686
- e.innerHTML = `<code class="artifactuse-math-fallback" title="Math rendering unavailable">${Pe(t)}</code>`, e.dataset.rendered = "true", e.classList.add("artifactuse-math-fallback-container");
3691
+ const t = mr(e.dataset.tex);
3692
+ e.innerHTML = `<code class="artifactuse-math-fallback" title="Math rendering unavailable">${Ze(t)}</code>`, e.dataset.rendered = "true", e.classList.add("artifactuse-math-fallback-container");
3687
3693
  });
3688
3694
  }
3689
- function Ut() {
3695
+ function Xt() {
3690
3696
  if (typeof katex > "u") {
3691
3697
  console.warn("renderAllMath called but KaTeX is not available");
3692
3698
  return;
3693
3699
  }
3694
3700
  document.querySelectorAll(".artifactuse-math-container").forEach((e) => {
3695
3701
  if (e.dataset.rendered === "true") return;
3696
- const t = hr(e.dataset.tex), r = e.dataset.display === "true";
3702
+ const t = mr(e.dataset.tex), r = e.dataset.display === "true";
3697
3703
  try {
3698
3704
  katex.render(t, e, {
3699
3705
  displayMode: r,
@@ -3714,17 +3720,17 @@ function Ut() {
3714
3720
  }
3715
3721
  }), e.dataset.rendered = "true";
3716
3722
  } catch (a) {
3717
- console.error("KaTeX rendering error:", a), e.innerHTML = `<span class="artifactuse-math-error" title="${Pe(a.message)}">${Pe(t)}</span>`, e.dataset.rendered = "true";
3723
+ console.error("KaTeX rendering error:", a), e.innerHTML = `<span class="artifactuse-math-error" title="${Ze(a.message)}">${Ze(t)}</span>`, e.dataset.rendered = "true";
3718
3724
  }
3719
3725
  });
3720
3726
  }
3721
- function Pe(e) {
3727
+ function Ze(e) {
3722
3728
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
3723
3729
  }
3724
- function gs() {
3725
- return N || (typeof katex < "u" ? Promise.resolve() : (N = new Promise((e, t) => {
3730
+ function ws() {
3731
+ return U || (typeof katex < "u" ? Promise.resolve() : (U = new Promise((e, t) => {
3726
3732
  const r = setTimeout(() => {
3727
- N = null, t(new Error("KaTeX loading timed out after 10 seconds"));
3733
+ U = null, t(new Error("KaTeX loading timed out after 10 seconds"));
3728
3734
  }, 1e4), a = document.createElement("link");
3729
3735
  a.rel = "stylesheet", a.href = "https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css", a.crossOrigin = "anonymous", a.onerror = () => {
3730
3736
  console.warn("KaTeX CSS failed to load, math may not render correctly");
@@ -3733,25 +3739,25 @@ function gs() {
3733
3739
  s.src = "https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.js", s.crossOrigin = "anonymous", s.onload = () => {
3734
3740
  clearTimeout(r), console.log("KaTeX script loaded successfully"), e();
3735
3741
  }, s.onerror = (i) => {
3736
- clearTimeout(r), N = null, console.error("KaTeX script failed to load:", i), t(new Error("Failed to load KaTeX script from CDN"));
3742
+ clearTimeout(r), U = null, console.error("KaTeX script failed to load:", i), t(new Error("Failed to load KaTeX script from CDN"));
3737
3743
  }, document.head.appendChild(s);
3738
- }), N));
3744
+ }), U));
3739
3745
  }
3740
- function Ts() {
3741
- N = null, he = !1;
3746
+ function Ps() {
3747
+ U = null, ge = !1;
3742
3748
  }
3743
- function Es() {
3749
+ function Is() {
3744
3750
  return typeof katex < "u";
3745
3751
  }
3746
- function Ps() {
3747
- return he;
3752
+ function Zs() {
3753
+ return ge;
3748
3754
  }
3749
- function Is(e) {
3755
+ function qs(e) {
3750
3756
  if (!e) return Promise.resolve();
3751
3757
  let t = e.innerHTML;
3752
- return t = fr(t), e.innerHTML = t, gr();
3758
+ return t = gr(t), e.innerHTML = t, wr();
3753
3759
  }
3754
- const Zs = {
3760
+ const Hs = {
3755
3761
  // Fractions
3756
3762
  fraction: (e, t) => `\\frac{${e}}{${t}}`,
3757
3763
  // Square root
@@ -3784,11 +3790,11 @@ const Zs = {
3784
3790
  derivative: (e, t) => `\\frac{d${e}}{d${t}}`,
3785
3791
  partialDerivative: (e, t) => `\\frac{\\partial ${e}}{\\partial ${t}}`
3786
3792
  };
3787
- function se() {
3793
+ function ie() {
3788
3794
  return typeof window < "u" && window.Prism;
3789
3795
  }
3790
- function mr(e) {
3791
- if (!se()) {
3796
+ function br(e) {
3797
+ if (!ie()) {
3792
3798
  console.warn("Artifactuse: Prism.js not found. Install and include Prism.js for syntax highlighting.");
3793
3799
  return;
3794
3800
  }
@@ -3796,24 +3802,24 @@ function mr(e) {
3796
3802
  if (!t) return;
3797
3803
  t.querySelectorAll("pre code").forEach((a) => {
3798
3804
  if (a.classList.contains("prism-highlighted")) return;
3799
- const s = ms(a);
3805
+ const s = bs(a);
3800
3806
  s && (a.className.includes(`language-${s}`) || a.classList.add(`language-${s}`), window.Prism.highlightElement(a), a.classList.add("prism-highlighted"));
3801
3807
  });
3802
3808
  }
3803
- function qs(e, t) {
3804
- se() && (t && !e.className.includes(`language-${t}`) && e.classList.add(`language-${t}`), window.Prism.highlightElement(e), e.classList.add("prism-highlighted"));
3809
+ function js(e, t) {
3810
+ ie() && (t && !e.className.includes(`language-${t}`) && e.classList.add(`language-${t}`), window.Prism.highlightElement(e), e.classList.add("prism-highlighted"));
3805
3811
  }
3806
- function Hs(e, t) {
3807
- if (!se()) return Gt(e);
3812
+ function Ds(e, t) {
3813
+ if (!ie()) return Wt(e);
3808
3814
  const r = window.Prism.languages[t];
3809
- return r ? window.Prism.highlight(e, r, t) : Gt(e);
3815
+ return r ? window.Prism.highlight(e, r, t) : Wt(e);
3810
3816
  }
3811
- function ms(e) {
3817
+ function bs(e) {
3812
3818
  const t = e.className.split(/\s+/);
3813
3819
  for (const s of t) {
3814
3820
  const i = s.match(/^(?:language-|lang-)(.+)$/);
3815
3821
  if (i)
3816
- return ke(i[1]);
3822
+ return $e(i[1]);
3817
3823
  }
3818
3824
  const r = e.closest("pre");
3819
3825
  if (r) {
@@ -3821,13 +3827,13 @@ function ms(e) {
3821
3827
  for (const i of s) {
3822
3828
  const o = i.match(/^(?:language-|lang-)(.+)$/);
3823
3829
  if (o)
3824
- return ke(o[1]);
3830
+ return $e(o[1]);
3825
3831
  }
3826
3832
  }
3827
3833
  const a = e.dataset.language || (r == null ? void 0 : r.dataset.language);
3828
- return a ? ke(a) : null;
3834
+ return a ? $e(a) : null;
3829
3835
  }
3830
- function ke(e) {
3836
+ function $e(e) {
3831
3837
  const t = {
3832
3838
  js: "javascript",
3833
3839
  ts: "typescript",
@@ -3853,11 +3859,11 @@ function ke(e) {
3853
3859
  }, r = e.toLowerCase();
3854
3860
  return t[r] || r;
3855
3861
  }
3856
- function Gt(e) {
3862
+ function Wt(e) {
3857
3863
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
3858
3864
  }
3859
- function js(e) {
3860
- if (!se())
3865
+ function Os(e) {
3866
+ if (!ie())
3861
3867
  return console.warn("Artifactuse: Prism.js not found. Auto-highlighting disabled."), null;
3862
3868
  const t = new MutationObserver((r) => {
3863
3869
  let a = !1;
@@ -3869,42 +3875,42 @@ function js(e) {
3869
3875
  break;
3870
3876
  }
3871
3877
  }
3872
- a && mr(e);
3878
+ a && br(e);
3873
3879
  });
3874
3880
  return t.observe(e, {
3875
3881
  childList: !0,
3876
3882
  subtree: !0
3877
3883
  }), t;
3878
3884
  }
3879
- function Ds() {
3880
- return se() ? Object.keys(window.Prism.languages).filter(
3885
+ function Bs() {
3886
+ return ie() ? Object.keys(window.Prism.languages).filter(
3881
3887
  (e) => typeof window.Prism.languages[e] == "object"
3882
3888
  ) : [];
3883
3889
  }
3884
- function oe(e) {
3890
+ function ce(e) {
3885
3891
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
3886
3892
  }
3887
- function ws() {
3893
+ function vs() {
3888
3894
  const e = {
3889
3895
  image(a) {
3890
3896
  const s = typeof a == "string" ? a : a.href, i = typeof a == "string" ? arguments[1] : a.title, o = typeof a == "string" ? arguments[2] : a.text;
3891
- return ze(s || "", i || "", o || "");
3897
+ return Le(s || "", i || "", o || "");
3892
3898
  }
3893
3899
  }, t = {
3894
3900
  link(a) {
3895
3901
  const s = typeof a == "string" ? a : a.href, i = typeof a == "string" ? arguments[1] : a.title, o = typeof a == "string" ? arguments[2] : a.text;
3896
- if (Aa(s))
3897
- return za(s);
3898
- const n = i ? ` title="${oe(i)}"` : "";
3899
- return `<a href="${oe(s || "")}" target="_blank" rel="noopener noreferrer"${n}>${o || ""}</a>`;
3902
+ if (za(s))
3903
+ return La(s);
3904
+ const n = i ? ` title="${ce(i)}"` : "";
3905
+ return `<a href="${ce(s || "")}" target="_blank" rel="noopener noreferrer"${n}>${o || ""}</a>`;
3900
3906
  }
3901
3907
  }, r = {
3902
3908
  code(a) {
3903
- const s = typeof a == "string" ? a : a.text, o = (typeof a == "string" ? arguments[1] : a.lang) || "", n = oe(s || "");
3904
- return o ? `<pre><code class="language-${oe(o)}">${n}</code></pre>` : `<pre><code>${n}</code></pre>`;
3909
+ const s = typeof a == "string" ? a : a.text, o = (typeof a == "string" ? arguments[1] : a.lang) || "", n = ce(s || "");
3910
+ return o ? `<pre><code class="language-${ce(o)}">${n}</code></pre>` : `<pre><code>${n}</code></pre>`;
3905
3911
  }
3906
3912
  };
3907
- L.use({
3913
+ _.use({
3908
3914
  renderer: {
3909
3915
  ...e,
3910
3916
  ...t,
@@ -3914,8 +3920,8 @@ function ws() {
3914
3920
  breaks: !0
3915
3921
  });
3916
3922
  }
3917
- ws();
3918
- const wr = {
3923
+ vs();
3924
+ const vr = {
3919
3925
  // Structured artifact types
3920
3926
  form: "form-panel",
3921
3927
  // Visual editors
@@ -3948,7 +3954,7 @@ const wr = {
3948
3954
  md: "html-panel",
3949
3955
  // Diagrams
3950
3956
  mermaid: "mermaid-panel"
3951
- }, bs = {
3957
+ }, ys = {
3952
3958
  // CDN URL for panel artifacts (video editor, canvas, etc.)
3953
3959
  cdnUrl: "https://cdn.artifactuse.com",
3954
3960
  // Theme: 'dark' | 'light' | 'auto'
@@ -4003,7 +4009,7 @@ const wr = {
4003
4009
  // Syntax highlighting (requires Prism.js)
4004
4010
  syntaxHighlight: !0
4005
4011
  };
4006
- function br(e, t) {
4012
+ function yr(e, t) {
4007
4013
  if (e == null)
4008
4014
  return null;
4009
4015
  try {
@@ -4018,7 +4024,7 @@ function br(e, t) {
4018
4024
  }
4019
4025
  return null;
4020
4026
  }
4021
- function vs(e, t) {
4027
+ function ks(e, t) {
4022
4028
  const r = /* @__PURE__ */ new Set();
4023
4029
  try {
4024
4030
  r.add(new URL(t).origin);
@@ -4026,13 +4032,13 @@ function vs(e, t) {
4026
4032
  console.warn("Artifactuse: Invalid default CDN URL:", t);
4027
4033
  }
4028
4034
  for (const a of Object.values(e)) {
4029
- const s = br(a, t);
4035
+ const s = yr(a, t);
4030
4036
  s && r.add(s);
4031
4037
  }
4032
4038
  return [...r];
4033
4039
  }
4034
- function ys(e, t) {
4035
- const r = { ...wr };
4040
+ function xs(e, t) {
4041
+ const r = { ...vr };
4036
4042
  if (e.panels)
4037
4043
  for (const [l, c] of Object.entries(e.panels))
4038
4044
  if (Array.isArray(l))
@@ -4058,8 +4064,8 @@ function ys(e, t) {
4058
4064
  return null;
4059
4065
  v.endsWith("/") || (v += "");
4060
4066
  const p = new URLSearchParams();
4061
- c.theme && p.set("theme", c.theme), c.accent && p.set("accent", c.accent), c.params && Object.entries(c.params).forEach(([f, m]) => {
4062
- p.set(f, m);
4067
+ c.theme && p.set("theme", c.theme), c.accent && p.set("accent", c.accent), c.params && Object.entries(c.params).forEach(([f, g]) => {
4068
+ p.set(f, g);
4063
4069
  });
4064
4070
  const w = p.toString();
4065
4071
  return w ? `${v}?${w}` : v;
@@ -4076,7 +4082,7 @@ function ys(e, t) {
4076
4082
  const p = v == null ? void 0 : v.toLowerCase();
4077
4083
  p && (r[p] = c);
4078
4084
  });
4079
- const d = br(c, e.cdnUrl);
4085
+ const d = yr(c, e.cdnUrl);
4080
4086
  d && t && t.addAllowedOrigin(d);
4081
4087
  }
4082
4088
  function n(l) {
@@ -4097,104 +4103,104 @@ function ys(e, t) {
4097
4103
  }
4098
4104
  };
4099
4105
  }
4100
- function Os(e = {}) {
4101
- const t = vr(bs, e), r = Er(), a = { ...wr, ...t.panels }, s = vs(a, t.cdnUrl), i = Pr(s), o = qr(t.theme, t.colors || {}), n = ys(t, i);
4102
- function l($, T) {
4103
- let R = L.parse($);
4104
- const I = [], Z = { theme: o.resolved };
4106
+ function Vs(e = {}) {
4107
+ const t = kr(ys, e), r = Ir(), a = { ...vr, ...t.panels }, s = ks(a, t.cdnUrl), i = Zr(s), o = jr(t.theme, t.colors || {}), n = xs(t, i);
4108
+ function l(k, M) {
4109
+ let A = _.parse(k);
4110
+ const H = [], P = { theme: o.resolved };
4105
4111
  if (t.processors.codeBlocks) {
4106
- const O = Tr(R, T, t.codeExtraction);
4107
- R = O.html, I.push(...O.artifacts);
4112
+ const Z = Pr(A, M, t.codeExtraction);
4113
+ A = Z.html, H.push(...Z.artifacts);
4108
4114
  }
4109
- return t.processors.images && (R = xa(R)), t.processors.imageGalleries && (R = $a(R)), t.processors.videos && (R = Sa(R)), t.processors.videoGalleries && (R = Ca(R)), t.processors.audio && (R = Pa(R, Z)), t.processors.maps && (R = Va(R)), t.processors.social && (R = Ba(R, Z)), t.processors.documents && (R = Fa(R), R = Na(R), R = Ua(R)), t.processors.codeEmbeds && (R = Xa(R, Z)), t.processors.dataViz && (R = Wa(R)), t.processors.design && (R = Qa(R, Z)), t.processors.interactive && (R = Ka(R, Z)), t.processors.tables && (R = rs(R)), t.processors.math && (R = fr(R)), t.processors.mermaid && (R = lr(R)), I.forEach((O) => {
4110
- r.addArtifact(O);
4115
+ return t.processors.images && (A = Ra(A)), t.processors.imageGalleries && (A = Aa(A)), t.processors.videos && (A = _a(A)), t.processors.videoGalleries && (A = Ea(A)), t.processors.audio && (A = Za(A, P)), t.processors.maps && (A = Fa(A)), t.processors.social && (A = Na(A, P)), t.processors.documents && (A = Ua(A), A = Ga(A), A = Xa(A)), t.processors.codeEmbeds && (A = Qa(A, P)), t.processors.dataViz && (A = Ka(A)), t.processors.design && (A = Ja(A, P)), t.processors.interactive && (A = Ya(A, P)), t.processors.tables && (A = ss(A)), t.processors.math && (A = gr(A)), t.processors.mermaid && (A = pr(A)), H.forEach((Z) => {
4116
+ r.addArtifact(Z);
4111
4117
  }), {
4112
- html: R,
4113
- artifacts: I
4118
+ html: A,
4119
+ artifacts: H
4114
4120
  };
4115
4121
  }
4116
- async function c($ = document) {
4117
- const T = [], R = { theme: o.resolved };
4118
- t.processors.math && T.push(gr()), t.processors.mermaid && T.push(dr(R)), t.processors.tables && us(), t.processors.audio && Za($), t.syntaxHighlight && mr($), await Promise.all(T);
4122
+ async function c(k = document) {
4123
+ const M = [], A = { theme: o.resolved };
4124
+ t.processors.math && M.push(wr()), t.processors.mermaid && M.push(hr(A)), t.processors.tables && ds(), t.processors.audio && Ha(k), t.syntaxHighlight && br(k), await Promise.all(M);
4119
4125
  }
4120
- function u($) {
4121
- if ($.isInline) {
4122
- console.warn("Attempted to open inline artifact in panel:", $.id);
4126
+ function u(k) {
4127
+ if (k.isInline) {
4128
+ console.warn("Attempted to open inline artifact in panel:", k.id);
4123
4129
  return;
4124
4130
  }
4125
- r.setActiveArtifact($.id), r.setPanelOpen(!0), k("artifact:opened", $);
4131
+ r.setActiveArtifact(k.id), r.setPanelOpen(!0), z("artifact:opened", k);
4126
4132
  }
4127
4133
  function d() {
4128
- r.setPanelOpen(!1), r.setFullscreen(!1), k("panel:closed");
4134
+ r.setPanelOpen(!1), r.setFullscreen(!1), z("panel:closed");
4129
4135
  }
4130
4136
  function v() {
4131
- const $ = !r.getState().isPanelOpen;
4132
- r.clearActiveArtifact(), r.setPanelOpen($), $ || r.setFullscreen(!1), k("panel:toggled", { isOpen: $ });
4137
+ const k = !r.getState().isPanelOpen;
4138
+ r.clearActiveArtifact(), r.setPanelOpen(k), k || r.setFullscreen(!1), z("panel:toggled", { isOpen: k });
4133
4139
  }
4134
4140
  function p() {
4135
- const $ = !r.getState().isFullscreen;
4136
- r.setFullscreen($), k("fullscreen:toggled", { isFullscreen: $ });
4141
+ const k = !r.getState().isFullscreen;
4142
+ r.setFullscreen(k), z("fullscreen:toggled", { isFullscreen: k });
4137
4143
  }
4138
- function w($) {
4139
- r.setViewMode($), k("viewMode:changed", { mode: $ });
4144
+ function w(k) {
4145
+ r.setViewMode(k), z("viewMode:changed", { mode: k });
4140
4146
  }
4141
- function f($, T = {}) {
4142
- if (!$) return null;
4143
- const { type: R, language: I } = $, Z = {
4144
- theme: T.theme || o.resolved
4145
- }, O = o.colors;
4146
- O != null && O.primary && (Z.accent = O.primary);
4147
- let we = n.resolve(R, Z);
4148
- return !we && I && (we = n.resolve(I, Z)), we;
4147
+ function f(k, M = {}) {
4148
+ if (!k) return null;
4149
+ const { type: A, language: H } = k, P = {
4150
+ theme: M.theme || o.resolved
4151
+ }, Z = o.colors;
4152
+ Z != null && Z.primary && (P.accent = Z.primary);
4153
+ let B = n.resolve(A, P);
4154
+ return !B && H && (B = n.resolve(H, P)), B;
4149
4155
  }
4150
- function m($) {
4151
- return $ ? n.has($.type) || n.has($.language) : !1;
4156
+ function g(k) {
4157
+ return k ? n.has(k.type) || n.has(k.language) : !1;
4152
4158
  }
4153
- function h($, T) {
4154
- n.register($, T);
4159
+ function h(k, M) {
4160
+ n.register(k, M);
4155
4161
  }
4156
- function g($) {
4157
- n.unregister($);
4162
+ function m(k) {
4163
+ n.unregister(k);
4158
4164
  }
4159
4165
  function y() {
4160
4166
  return n.getTypes();
4161
4167
  }
4162
- function b($, T) {
4163
- i.send($, T);
4168
+ function b(k, M) {
4169
+ i.send(k, M);
4164
4170
  }
4165
4171
  const x = /* @__PURE__ */ new Map();
4166
- function A($, T) {
4167
- return x.has($) || x.set($, /* @__PURE__ */ new Set()), x.get($).add(T), () => {
4168
- var R;
4169
- (R = x.get($)) == null || R.delete(T);
4172
+ function $(k, M) {
4173
+ return x.has(k) || x.set(k, /* @__PURE__ */ new Set()), x.get(k).add(M), () => {
4174
+ var A;
4175
+ (A = x.get(k)) == null || A.delete(M);
4170
4176
  };
4171
4177
  }
4172
- function z($, T) {
4173
- var R;
4174
- (R = x.get($)) == null || R.delete(T);
4178
+ function S(k, M) {
4179
+ var A;
4180
+ (A = x.get(k)) == null || A.delete(M);
4175
4181
  }
4176
- function k($, T) {
4177
- var R;
4178
- (R = x.get($)) == null || R.forEach((I) => {
4182
+ function z(k, M) {
4183
+ var A;
4184
+ (A = x.get(k)) == null || A.forEach((H) => {
4179
4185
  try {
4180
- I(T);
4181
- } catch (Z) {
4182
- console.error(`Artifactuse event handler error (${$}):`, Z);
4186
+ H(M);
4187
+ } catch (P) {
4188
+ console.error(`Artifactuse event handler error (${k}):`, P);
4183
4189
  }
4184
4190
  });
4185
4191
  }
4186
- i.on("ai:request", ($) => k("ai:request", $)), i.on("save:request", ($) => k("save:request", $)), i.on("export:complete", ($) => k("export:complete", $)), i.on("form:submit", ($) => k("form:submit", $)), i.on("form:cancel", ($) => k("form:cancel", $)), i.on("form:step", ($) => k("form:step", $)), i.on("social:copy", ($) => k("social:copy", $));
4187
- function M() {
4192
+ i.on("ai:request", (k) => z("ai:request", k)), i.on("save:request", (k) => z("save:request", k)), i.on("export:complete", (k) => z("export:complete", k)), i.on("form:submit", (k) => z("form:submit", k)), i.on("form:cancel", (k) => z("form:cancel", k)), i.on("form:step", (k) => z("form:step", k)), i.on("social:copy", (k) => z("social:copy", k));
4193
+ function F() {
4188
4194
  o.apply();
4189
4195
  }
4190
- function C($) {
4191
- o.set($);
4196
+ function R(k) {
4197
+ o.set(k);
4192
4198
  }
4193
- function P() {
4199
+ function T() {
4194
4200
  return o.resolved;
4195
4201
  }
4196
- function H() {
4197
- i.destroy(), x.clear(), r.clear(), Oa();
4202
+ function E() {
4203
+ i.destroy(), x.clear(), r.clear(), Va();
4198
4204
  }
4199
4205
  return {
4200
4206
  // Config
@@ -4215,28 +4221,28 @@ function Os(e = {}) {
4215
4221
  getPanelUrl: f,
4216
4222
  sendToPanel: b,
4217
4223
  // Panel management (new)
4218
- hasPanel: m,
4224
+ hasPanel: g,
4219
4225
  registerPanel: h,
4220
- unregisterPanel: g,
4226
+ unregisterPanel: m,
4221
4227
  getPanelTypes: y,
4222
4228
  panelResolver: n,
4223
4229
  // Expose for advanced use
4224
4230
  // Theme
4225
4231
  theme: o,
4226
- applyTheme: M,
4227
- setTheme: C,
4228
- getTheme: P,
4232
+ applyTheme: F,
4233
+ setTheme: R,
4234
+ getTheme: T,
4229
4235
  // Events
4230
- on: A,
4231
- off: z,
4232
- emit: k,
4236
+ on: $,
4237
+ off: S,
4238
+ emit: z,
4233
4239
  // Bridge (for advanced use)
4234
4240
  bridge: i,
4235
4241
  // Cleanup
4236
- destroy: H
4242
+ destroy: E
4237
4243
  };
4238
4244
  }
4239
- function vr(e, t, r = /* @__PURE__ */ new WeakSet()) {
4245
+ function kr(e, t, r = /* @__PURE__ */ new WeakSet()) {
4240
4246
  if (!t) return e;
4241
4247
  if (!e) return t;
4242
4248
  if (typeof t == "object" && t !== null) {
@@ -4257,7 +4263,7 @@ function vr(e, t, r = /* @__PURE__ */ new WeakSet()) {
4257
4263
  continue;
4258
4264
  }
4259
4265
  if (typeof i == "object" && i.constructor === Object) {
4260
- a[s] = vr(e[s] || {}, i, r);
4266
+ a[s] = kr(e[s] || {}, i, r);
4261
4267
  continue;
4262
4268
  }
4263
4269
  a[s] = i;
@@ -4266,120 +4272,120 @@ function vr(e, t, r = /* @__PURE__ */ new WeakSet()) {
4266
4272
  return a;
4267
4273
  }
4268
4274
  export {
4269
- yt as $,
4270
- Me as A,
4271
- Ce as B,
4272
- Pa as C,
4273
- wr as D,
4274
- tt as E,
4275
- rt as F,
4275
+ xt as $,
4276
+ Te as A,
4277
+ Ee as B,
4278
+ Za as C,
4279
+ vr as D,
4280
+ at as E,
4281
+ st as F,
4276
4282
  q as G,
4277
- at as H,
4278
- Za as I,
4279
- Oa as J,
4280
- Va as K,
4281
- B as L,
4282
- Te as M,
4283
- ut as N,
4284
- Ba as O,
4285
- pt as P,
4286
- dt as Q,
4287
- ft as R,
4288
- ht as S,
4289
- gt as T,
4290
- mt as U,
4291
- wt as V,
4292
- bt as W,
4293
- Fa as X,
4294
- vt as Y,
4295
- Na as Z,
4296
- W as _,
4297
- $s as a,
4298
- Ua as a0,
4299
- kt as a1,
4300
- Xa as a2,
4301
- xt as a3,
4302
- $t as a4,
4303
- At as a5,
4304
- Rt as a6,
4305
- zt as a7,
4306
- St as a8,
4307
- Wa as a9,
4308
- _s as aA,
4309
- Ms as aB,
4310
- Cs as aC,
4311
- rs as aD,
4312
- as as aE,
4313
- is as aF,
4314
- ns as aG,
4315
- os as aH,
4316
- cs as aI,
4317
- ls as aJ,
4318
- us as aK,
4319
- fr as aL,
4320
- te as aM,
4321
- gr as aN,
4322
- gs as aO,
4323
- Ts as aP,
4324
- Es as aQ,
4325
- Ps as aR,
4326
- Is as aS,
4327
- Zs as aT,
4328
- mr as aU,
4329
- qs as aV,
4330
- Hs as aW,
4331
- ms as aX,
4332
- js as aY,
4333
- Ds as aZ,
4334
- Lt as aa,
4335
- _t as ab,
4336
- Mt as ac,
4337
- Ct as ad,
4338
- Qa as ae,
4339
- Tt as af,
4340
- Et as ag,
4341
- Pt as ah,
4342
- It as ai,
4343
- Zt as aj,
4344
- qt as ak,
4345
- Ka as al,
4346
- Ht as am,
4347
- jt as an,
4348
- Dt as ao,
4349
- Ot as ap,
4350
- Vt as aq,
4351
- Bt as ar,
4352
- Ft as as,
4353
- lr as at,
4354
- Ya as au,
4355
- dr as av,
4356
- ts as aw,
4357
- zs as ax,
4358
- Ss as ay,
4359
- Ls as az,
4360
- xs as b,
4361
- Os as c,
4362
- Mr as d,
4363
- Tr as e,
4364
- As as f,
4365
- Rr as g,
4366
- Er as h,
4367
- se as i,
4368
- Pr as j,
4369
- qr as k,
4370
- xa as l,
4371
- $a as m,
4372
- ke as n,
4373
- et as o,
4374
- Rs as p,
4375
- Sa as q,
4376
- ze as r,
4377
- Aa as s,
4378
- za as t,
4379
- Se as u,
4380
- Ca as v,
4381
- Ta as w,
4382
- _a as x,
4383
- Le as y,
4384
- _e as z
4283
+ it as H,
4284
+ Ha as I,
4285
+ Va as J,
4286
+ Fa as K,
4287
+ V as L,
4288
+ Pe as M,
4289
+ dt as N,
4290
+ Na as O,
4291
+ ft as P,
4292
+ ht as Q,
4293
+ gt as R,
4294
+ mt as S,
4295
+ wt as T,
4296
+ bt as U,
4297
+ vt as V,
4298
+ yt as W,
4299
+ Ua as X,
4300
+ kt as Y,
4301
+ Ga as Z,
4302
+ Q as _,
4303
+ As as a,
4304
+ Xa as a0,
4305
+ $t as a1,
4306
+ Qa as a2,
4307
+ Rt as a3,
4308
+ At as a4,
4309
+ zt as a5,
4310
+ St as a6,
4311
+ Lt as a7,
4312
+ _t as a8,
4313
+ Ka as a9,
4314
+ Cs as aA,
4315
+ Ts as aB,
4316
+ Es as aC,
4317
+ ss as aD,
4318
+ is as aE,
4319
+ os as aF,
4320
+ cs as aG,
4321
+ ls as aH,
4322
+ us as aI,
4323
+ ps as aJ,
4324
+ ds as aK,
4325
+ gr as aL,
4326
+ re as aM,
4327
+ wr as aN,
4328
+ ws as aO,
4329
+ Ps as aP,
4330
+ Is as aQ,
4331
+ Zs as aR,
4332
+ qs as aS,
4333
+ Hs as aT,
4334
+ br as aU,
4335
+ js as aV,
4336
+ Ds as aW,
4337
+ bs as aX,
4338
+ Os as aY,
4339
+ Bs as aZ,
4340
+ Mt as aa,
4341
+ Ct as ab,
4342
+ Tt as ac,
4343
+ Et as ad,
4344
+ Ja as ae,
4345
+ Pt as af,
4346
+ It as ag,
4347
+ Zt as ah,
4348
+ qt as ai,
4349
+ Ht as aj,
4350
+ jt as ak,
4351
+ Ya as al,
4352
+ Dt as am,
4353
+ Ot as an,
4354
+ Bt as ao,
4355
+ Vt as ap,
4356
+ Ft as aq,
4357
+ Nt as ar,
4358
+ Ut as as,
4359
+ pr as at,
4360
+ ts as au,
4361
+ hr as av,
4362
+ as as aw,
4363
+ Ls as ax,
4364
+ _s as ay,
4365
+ Ms as az,
4366
+ Rs as b,
4367
+ Vs as c,
4368
+ Tr as d,
4369
+ Pr as e,
4370
+ zs as f,
4371
+ Sr as g,
4372
+ Ir as h,
4373
+ ie as i,
4374
+ Zr as j,
4375
+ jr as k,
4376
+ Ra as l,
4377
+ Aa as m,
4378
+ $e as n,
4379
+ rt as o,
4380
+ Ss as p,
4381
+ _a as q,
4382
+ Le as r,
4383
+ za as s,
4384
+ La as t,
4385
+ _e as u,
4386
+ Ea as v,
4387
+ Pa as w,
4388
+ Ca as x,
4389
+ Me as y,
4390
+ Ce as z
4385
4391
  };