artifactuse 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/state.d.ts +2 -0
- package/dist/{index-INYOxlcg.js → index-B4BEvWtI.js} +520 -504
- package/dist/index.js +1 -1
- package/dist/react/index.js +392 -389
- package/dist/svelte/index.d.ts +15 -0
- package/dist/svelte/index.js +1436 -1415
- package/dist/vue/index.d.ts +12 -0
- package/dist/vue/index.js +1143 -1129
- package/dist/vue2/composables.d.ts +12 -0
- package/dist/vue2/index.js +118 -29
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var Dr = Object.defineProperty;
|
|
2
2
|
var qr = (e, t, r) => t in e ? Dr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
-
var
|
|
3
|
+
var I = (e, t, r) => qr(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
const Ee = {
|
|
5
5
|
CODE: "code",
|
|
6
6
|
FORM: "form",
|
|
@@ -476,20 +476,20 @@ function Xr(e, t, r, a) {
|
|
|
476
476
|
if (b) return !1;
|
|
477
477
|
const v = a.minClickableLines;
|
|
478
478
|
if (v == null) return !1;
|
|
479
|
-
const
|
|
480
|
-
return f <
|
|
479
|
+
const x = typeof v == "number" ? v : v.lines || 0, $ = typeof v == "object" && Array.isArray(v.ignoreLanguages) ? v.ignoreLanguages : [];
|
|
480
|
+
return f < x && !$.includes(r);
|
|
481
481
|
}
|
|
482
482
|
function o(f, b) {
|
|
483
483
|
const v = a.actionLabel;
|
|
484
|
-
let
|
|
485
|
-
return typeof v == "string" ?
|
|
484
|
+
let x;
|
|
485
|
+
return typeof v == "string" ? x = v : v && typeof v == "object" && (x = v[f] || v.default || null), x || (x = f === "diff" || f === "patch" || f === "smartdiff" ? "View full diff" : "View full code"), `${x} (${b} lines)`;
|
|
486
486
|
}
|
|
487
487
|
if (r === "smartdiff")
|
|
488
488
|
try {
|
|
489
489
|
const f = JSON.parse(t), v = Wr(f.oldCode, f.newCode).split(`
|
|
490
|
-
`),
|
|
491
|
-
`)),
|
|
492
|
-
return `<div class="artifactuse-inline-preview${
|
|
490
|
+
`), x = v.slice(0, s), $ = x.map((T) => T[0] || " "), A = x.map((T) => T.slice(1)), C = lt(A.join(`
|
|
491
|
+
`)), R = v.length > s, M = f.language || "plaintext", y = n(v.length, R), z = y ? " artifactuse-inline-preview--static" : "", H = y ? ' data-non-clickable="true"' : "", P = o("smartdiff", v.length);
|
|
492
|
+
return `<div class="artifactuse-inline-preview${R ? " artifactuse-inline-preview--truncated" : ""}${z}" data-artifact-id="${e.id}" data-smartdiff="true" data-smartdiff-markers="${$.join(",")}"${H}><pre class="artifactuse-inline-preview__pre"><code class="language-${M}">${C}</code></pre>` + (R ? `<div class="artifactuse-inline-preview__fade"><span class="artifactuse-inline-preview__action">${P}</span></div>` : "") + "</div>";
|
|
493
493
|
} catch {
|
|
494
494
|
}
|
|
495
495
|
let i = t, u = r;
|
|
@@ -579,19 +579,19 @@ function ea(e, t, r = {}) {
|
|
|
579
579
|
const w = [], c = /<pre><code class="language-(\w+)">([\s\S]*?)<\/code><\/pre>/gi;
|
|
580
580
|
let m = 0;
|
|
581
581
|
const h = e.replace(c, (g, f, b) => {
|
|
582
|
-
const v = fr(b).trim(),
|
|
582
|
+
const v = fr(b).trim(), x = v.split(`
|
|
583
583
|
`).length;
|
|
584
584
|
let $ = f.toLowerCase();
|
|
585
585
|
if ((["xml", "markup", "html", "htm"].includes($) || !$) && v.trim().startsWith("<svg") && ($ = "svg"), p($))
|
|
586
586
|
return m++, g;
|
|
587
|
-
const
|
|
588
|
-
let
|
|
589
|
-
if (n ?
|
|
590
|
-
const
|
|
591
|
-
if (u && (
|
|
592
|
-
return Xr(
|
|
593
|
-
let
|
|
594
|
-
return
|
|
587
|
+
const A = pr($);
|
|
588
|
+
let C = !1;
|
|
589
|
+
if (n ? C = !0 : $ === "diff" || $ === "patch" || $ === "smartdiff" ? C = x > 10 : A ? C = !0 : C = v.length >= s && x >= a, !C && d($) && (C = !0), C) {
|
|
590
|
+
const R = Me(v, $, t, m);
|
|
591
|
+
if (u && (R.tabs = u), l && (R.viewMode = l), m++, w.push(R), d($))
|
|
592
|
+
return Xr(R, v, $, o);
|
|
593
|
+
let M = "panel";
|
|
594
|
+
return R.isInline && (M = R.type === "social" ? "inline-social" : "inline-form"), Kr(R, M);
|
|
595
595
|
}
|
|
596
596
|
return m++, g;
|
|
597
597
|
});
|
|
@@ -611,70 +611,74 @@ function ta() {
|
|
|
611
611
|
// Multi-tab support
|
|
612
612
|
openTabs: [],
|
|
613
613
|
// Array of artifact IDs open as tabs (ordered)
|
|
614
|
-
tabViewModes: {}
|
|
614
|
+
tabViewModes: {},
|
|
615
615
|
// { [artifactId]: 'preview' | 'code' | 'split' | 'edit' }
|
|
616
|
+
// Panel empty view
|
|
617
|
+
forceEmptyView: !1
|
|
618
|
+
// When true, panel shows empty state regardless of artifacts
|
|
616
619
|
};
|
|
617
620
|
const t = /* @__PURE__ */ new Set();
|
|
618
621
|
function r() {
|
|
619
|
-
t.forEach((
|
|
622
|
+
t.forEach((M) => {
|
|
620
623
|
try {
|
|
621
|
-
|
|
622
|
-
} catch (
|
|
623
|
-
console.error("Artifactuse state subscriber error:",
|
|
624
|
+
M(e);
|
|
625
|
+
} catch (y) {
|
|
626
|
+
console.error("Artifactuse state subscriber error:", y);
|
|
624
627
|
}
|
|
625
628
|
});
|
|
626
629
|
}
|
|
627
|
-
function a(
|
|
628
|
-
return t.add(
|
|
629
|
-
t.delete(
|
|
630
|
+
function a(M) {
|
|
631
|
+
return t.add(M), M(e), () => {
|
|
632
|
+
t.delete(M);
|
|
630
633
|
};
|
|
631
634
|
}
|
|
632
635
|
function s() {
|
|
633
636
|
return { ...e };
|
|
634
637
|
}
|
|
635
|
-
function n(
|
|
636
|
-
const
|
|
637
|
-
if (
|
|
638
|
+
function n(M) {
|
|
639
|
+
const y = e.artifacts.findIndex((z) => z.id === M.id);
|
|
640
|
+
if (y === -1)
|
|
638
641
|
e = {
|
|
639
642
|
...e,
|
|
640
|
-
artifacts: [...e.artifacts,
|
|
643
|
+
artifacts: [...e.artifacts, M]
|
|
641
644
|
};
|
|
642
645
|
else {
|
|
643
|
-
const
|
|
644
|
-
|
|
646
|
+
const z = [...e.artifacts];
|
|
647
|
+
z[y] = { ...z[y], ...M }, e = {
|
|
645
648
|
...e,
|
|
646
|
-
artifacts:
|
|
649
|
+
artifacts: z
|
|
647
650
|
};
|
|
648
651
|
}
|
|
649
652
|
r();
|
|
650
653
|
}
|
|
651
|
-
function o(
|
|
652
|
-
|
|
654
|
+
function o(M) {
|
|
655
|
+
M.forEach(n);
|
|
653
656
|
}
|
|
654
|
-
function i(
|
|
655
|
-
const
|
|
657
|
+
function i(M) {
|
|
658
|
+
const y = e.openTabs.filter((P) => P !== M), { [M]: z, ...H } = e.tabViewModes;
|
|
656
659
|
e = {
|
|
657
660
|
...e,
|
|
658
|
-
artifacts: e.artifacts.filter((
|
|
659
|
-
activeArtifactId: e.activeArtifactId ===
|
|
660
|
-
isPanelOpen: e.activeArtifactId ===
|
|
661
|
-
openTabs:
|
|
662
|
-
tabViewModes:
|
|
661
|
+
artifacts: e.artifacts.filter((P) => P.id !== M),
|
|
662
|
+
activeArtifactId: e.activeArtifactId === M ? null : e.activeArtifactId,
|
|
663
|
+
isPanelOpen: e.activeArtifactId === M ? !1 : e.isPanelOpen,
|
|
664
|
+
openTabs: y,
|
|
665
|
+
tabViewModes: H
|
|
663
666
|
}, r();
|
|
664
667
|
}
|
|
665
|
-
function u(
|
|
666
|
-
return e.artifacts.find((
|
|
668
|
+
function u(M) {
|
|
669
|
+
return e.artifacts.find((y) => y.id === M) || null;
|
|
667
670
|
}
|
|
668
671
|
function l() {
|
|
669
672
|
return e.activeArtifactId ? u(e.activeArtifactId) : null;
|
|
670
673
|
}
|
|
671
|
-
function d(
|
|
672
|
-
const
|
|
673
|
-
let
|
|
674
|
-
|
|
674
|
+
function d(M) {
|
|
675
|
+
const y = u(M);
|
|
676
|
+
let z = e.tabViewModes[M];
|
|
677
|
+
z || (z = (y == null ? void 0 : y.isPreviewable) === !1 ? "code" : "preview", y != null && y.tabs && !y.tabs.includes(z) && (z = y.tabs[0])), e = {
|
|
675
678
|
...e,
|
|
676
|
-
activeArtifactId:
|
|
677
|
-
viewMode:
|
|
679
|
+
activeArtifactId: M,
|
|
680
|
+
viewMode: z,
|
|
681
|
+
forceEmptyView: !1
|
|
678
682
|
}, r();
|
|
679
683
|
}
|
|
680
684
|
function p() {
|
|
@@ -683,80 +687,86 @@ function ta() {
|
|
|
683
687
|
activeArtifactId: null
|
|
684
688
|
}, r();
|
|
685
689
|
}
|
|
686
|
-
function w(
|
|
690
|
+
function w(M) {
|
|
687
691
|
e = {
|
|
688
692
|
...e,
|
|
689
|
-
isPanelOpen:
|
|
690
|
-
isFullscreen:
|
|
693
|
+
isPanelOpen: M,
|
|
694
|
+
isFullscreen: M ? e.isFullscreen : !1
|
|
691
695
|
}, r();
|
|
692
696
|
}
|
|
693
|
-
function c(
|
|
694
|
-
if (!["preview", "code", "split", "edit"].includes(
|
|
695
|
-
console.warn(`Invalid view mode: ${
|
|
697
|
+
function c(M) {
|
|
698
|
+
if (!["preview", "code", "split", "edit"].includes(M)) {
|
|
699
|
+
console.warn(`Invalid view mode: ${M}`);
|
|
696
700
|
return;
|
|
697
701
|
}
|
|
698
|
-
const
|
|
702
|
+
const y = e.activeArtifactId ? { ...e.tabViewModes, [e.activeArtifactId]: M } : e.tabViewModes;
|
|
703
|
+
e = {
|
|
704
|
+
...e,
|
|
705
|
+
viewMode: M,
|
|
706
|
+
tabViewModes: y
|
|
707
|
+
}, r();
|
|
708
|
+
}
|
|
709
|
+
function m(M) {
|
|
699
710
|
e = {
|
|
700
711
|
...e,
|
|
701
|
-
|
|
702
|
-
tabViewModes: C
|
|
712
|
+
isFullscreen: M
|
|
703
713
|
}, r();
|
|
704
714
|
}
|
|
705
|
-
function
|
|
715
|
+
function h(M) {
|
|
706
716
|
e = {
|
|
707
717
|
...e,
|
|
708
|
-
|
|
718
|
+
forceEmptyView: !!M
|
|
709
719
|
}, r();
|
|
710
720
|
}
|
|
711
|
-
function
|
|
712
|
-
return e.artifacts.filter((
|
|
721
|
+
function g(M) {
|
|
722
|
+
return e.artifacts.filter((y) => y.messageId === M);
|
|
713
723
|
}
|
|
714
|
-
function
|
|
715
|
-
return e.artifacts.filter((
|
|
724
|
+
function f(M) {
|
|
725
|
+
return e.artifacts.filter((y) => y.type === M);
|
|
716
726
|
}
|
|
717
|
-
function
|
|
727
|
+
function b() {
|
|
718
728
|
return e.artifacts.length;
|
|
719
729
|
}
|
|
720
|
-
function
|
|
721
|
-
const
|
|
722
|
-
if (!
|
|
723
|
-
const
|
|
724
|
-
let
|
|
725
|
-
|
|
730
|
+
function v(M) {
|
|
731
|
+
const y = u(M);
|
|
732
|
+
if (!y) return;
|
|
733
|
+
const H = e.openTabs.includes(M) ? e.openTabs : [...e.openTabs, M];
|
|
734
|
+
let P = e.tabViewModes[M];
|
|
735
|
+
P || (P = y.isPreviewable === !1 ? "code" : "preview", y.tabs && !y.tabs.includes(P) && (P = y.tabs[0])), e = {
|
|
726
736
|
...e,
|
|
727
|
-
openTabs:
|
|
728
|
-
activeArtifactId:
|
|
729
|
-
tabViewModes: { ...e.tabViewModes, [
|
|
730
|
-
viewMode:
|
|
737
|
+
openTabs: H,
|
|
738
|
+
activeArtifactId: M,
|
|
739
|
+
tabViewModes: { ...e.tabViewModes, [M]: P },
|
|
740
|
+
viewMode: P
|
|
731
741
|
}, r();
|
|
732
742
|
}
|
|
733
|
-
function
|
|
734
|
-
const
|
|
735
|
-
if (
|
|
736
|
-
const
|
|
737
|
-
let
|
|
738
|
-
e.activeArtifactId ===
|
|
739
|
-
const
|
|
743
|
+
function x(M) {
|
|
744
|
+
const y = e.openTabs.indexOf(M);
|
|
745
|
+
if (y === -1) return;
|
|
746
|
+
const z = e.openTabs.filter((K) => K !== M), { [M]: H, ...P } = e.tabViewModes;
|
|
747
|
+
let T = e.activeArtifactId;
|
|
748
|
+
e.activeArtifactId === M && (z.length === 0 ? T = null : y >= z.length ? T = z[z.length - 1] : T = z[y]);
|
|
749
|
+
const W = T && P[T] || "preview";
|
|
740
750
|
e = {
|
|
741
751
|
...e,
|
|
742
|
-
openTabs:
|
|
743
|
-
activeArtifactId:
|
|
744
|
-
tabViewModes:
|
|
745
|
-
viewMode:
|
|
752
|
+
openTabs: z,
|
|
753
|
+
activeArtifactId: T,
|
|
754
|
+
tabViewModes: P,
|
|
755
|
+
viewMode: W
|
|
746
756
|
}, r();
|
|
747
757
|
}
|
|
748
|
-
function M
|
|
749
|
-
if (!u(
|
|
750
|
-
const
|
|
758
|
+
function $(M) {
|
|
759
|
+
if (!u(M)) return;
|
|
760
|
+
const z = e.tabViewModes[M] || e.viewMode;
|
|
751
761
|
e = {
|
|
752
762
|
...e,
|
|
753
|
-
openTabs: [
|
|
754
|
-
activeArtifactId:
|
|
755
|
-
tabViewModes: { [
|
|
756
|
-
viewMode:
|
|
763
|
+
openTabs: [M],
|
|
764
|
+
activeArtifactId: M,
|
|
765
|
+
tabViewModes: { [M]: z },
|
|
766
|
+
viewMode: z
|
|
757
767
|
}, r();
|
|
758
768
|
}
|
|
759
|
-
function
|
|
769
|
+
function A() {
|
|
760
770
|
e = {
|
|
761
771
|
...e,
|
|
762
772
|
openTabs: [],
|
|
@@ -764,7 +774,7 @@ function ta() {
|
|
|
764
774
|
tabViewModes: {}
|
|
765
775
|
}, r();
|
|
766
776
|
}
|
|
767
|
-
function
|
|
777
|
+
function C() {
|
|
768
778
|
e = {
|
|
769
779
|
artifacts: [],
|
|
770
780
|
activeArtifactId: null,
|
|
@@ -772,22 +782,23 @@ function ta() {
|
|
|
772
782
|
viewMode: "preview",
|
|
773
783
|
isFullscreen: !1,
|
|
774
784
|
openTabs: [],
|
|
775
|
-
tabViewModes: {}
|
|
785
|
+
tabViewModes: {},
|
|
786
|
+
forceEmptyView: !1
|
|
776
787
|
}, r();
|
|
777
788
|
}
|
|
778
|
-
function
|
|
779
|
-
const
|
|
780
|
-
let
|
|
781
|
-
const
|
|
782
|
-
|
|
789
|
+
function R(M) {
|
|
790
|
+
const y = r;
|
|
791
|
+
let z = !1;
|
|
792
|
+
const H = () => {
|
|
793
|
+
z = !0;
|
|
783
794
|
};
|
|
784
795
|
try {
|
|
785
796
|
Object.defineProperty(window, "__artifactuse_notify__", {
|
|
786
|
-
value:
|
|
797
|
+
value: H,
|
|
787
798
|
configurable: !0
|
|
788
|
-
}),
|
|
799
|
+
}), M();
|
|
789
800
|
} finally {
|
|
790
|
-
delete window.__artifactuse_notify__,
|
|
801
|
+
delete window.__artifactuse_notify__, z && y();
|
|
791
802
|
}
|
|
792
803
|
}
|
|
793
804
|
return {
|
|
@@ -800,23 +811,24 @@ function ta() {
|
|
|
800
811
|
removeArtifact: i,
|
|
801
812
|
getArtifact: u,
|
|
802
813
|
getActiveArtifact: l,
|
|
803
|
-
getArtifactsByMessageId:
|
|
804
|
-
getArtifactsByType:
|
|
805
|
-
getArtifactCount:
|
|
814
|
+
getArtifactsByMessageId: g,
|
|
815
|
+
getArtifactsByType: f,
|
|
816
|
+
getArtifactCount: b,
|
|
806
817
|
// Panel state
|
|
807
818
|
setActiveArtifact: d,
|
|
808
819
|
clearActiveArtifact: p,
|
|
809
820
|
setPanelOpen: w,
|
|
810
821
|
setViewMode: c,
|
|
811
822
|
setFullscreen: m,
|
|
823
|
+
setForceEmptyView: h,
|
|
812
824
|
// Multi-tab
|
|
813
|
-
openTab:
|
|
814
|
-
closeTab:
|
|
815
|
-
closeOtherTabs:
|
|
816
|
-
closeAllTabs:
|
|
825
|
+
openTab: v,
|
|
826
|
+
closeTab: x,
|
|
827
|
+
closeOtherTabs: $,
|
|
828
|
+
closeAllTabs: A,
|
|
817
829
|
// Utilities
|
|
818
|
-
clear:
|
|
819
|
-
batch:
|
|
830
|
+
clear: C,
|
|
831
|
+
batch: R
|
|
820
832
|
};
|
|
821
833
|
}
|
|
822
834
|
function ct(e) {
|
|
@@ -830,115 +842,115 @@ function ra(e = []) {
|
|
|
830
842
|
const t = Array.isArray(e) ? e : [e].filter(Boolean), r = new Set(t), a = /* @__PURE__ */ new Map();
|
|
831
843
|
let s = null, n = !1, o = !1;
|
|
832
844
|
const i = [];
|
|
833
|
-
function u(
|
|
845
|
+
function u(y) {
|
|
834
846
|
if (r.size === 0)
|
|
835
847
|
return console.warn("Artifactuse bridge: No allowed origins configured, accepting all messages"), !0;
|
|
836
|
-
const
|
|
837
|
-
if (!
|
|
838
|
-
for (const
|
|
839
|
-
const
|
|
840
|
-
if (
|
|
848
|
+
const z = ct(y);
|
|
849
|
+
if (!z) return !1;
|
|
850
|
+
for (const H of r) {
|
|
851
|
+
const P = ct(H);
|
|
852
|
+
if (P && P === z || H === z)
|
|
841
853
|
return !0;
|
|
842
854
|
}
|
|
843
855
|
return !1;
|
|
844
856
|
}
|
|
845
|
-
function l(
|
|
846
|
-
var U,
|
|
847
|
-
if (((U =
|
|
848
|
-
((
|
|
857
|
+
function l(y) {
|
|
858
|
+
var U, J, k;
|
|
859
|
+
if (((U = y.data) == null ? void 0 : U.type) === "artifactuse" && (console.log("[Bridge] Message from:", y.origin, "action:", (J = y.data) == null ? void 0 : J.action), console.log("[Bridge] Allowed origins:", w())), !u(y.origin)) {
|
|
860
|
+
((k = y.data) == null ? void 0 : k.type) === "artifactuse" && console.warn("[Bridge] Origin NOT allowed:", y.origin);
|
|
849
861
|
return;
|
|
850
862
|
}
|
|
851
|
-
const { type:
|
|
852
|
-
if (
|
|
853
|
-
if (
|
|
863
|
+
const { type: z, action: H, data: P, requestId: T } = y.data || {};
|
|
864
|
+
if (z !== "artifactuse") return;
|
|
865
|
+
if (H === "ready" || H === "panel:ready") {
|
|
854
866
|
console.log("[Bridge] panel:ready received, setting isReady=true"), n = !0, o = !0, m();
|
|
855
867
|
return;
|
|
856
868
|
}
|
|
857
|
-
(a.get(
|
|
869
|
+
(a.get(H) || []).forEach((_) => {
|
|
858
870
|
try {
|
|
859
|
-
|
|
860
|
-
} catch (
|
|
861
|
-
console.error(`Artifactuse bridge handler error (${
|
|
871
|
+
_(P, T);
|
|
872
|
+
} catch (L) {
|
|
873
|
+
console.error(`Artifactuse bridge handler error (${H}):`, L);
|
|
862
874
|
}
|
|
863
|
-
}), (a.get("*") || []).forEach((
|
|
875
|
+
}), (a.get("*") || []).forEach((_) => {
|
|
864
876
|
try {
|
|
865
|
-
|
|
866
|
-
} catch (
|
|
867
|
-
console.error("Artifactuse bridge wildcard handler error:",
|
|
877
|
+
_({ action: H, data: P, requestId: T });
|
|
878
|
+
} catch (L) {
|
|
879
|
+
console.error("Artifactuse bridge wildcard handler error:", L);
|
|
868
880
|
}
|
|
869
881
|
});
|
|
870
882
|
}
|
|
871
883
|
window.addEventListener("message", l);
|
|
872
|
-
function d(
|
|
873
|
-
|
|
884
|
+
function d(y) {
|
|
885
|
+
y && typeof y == "string" && r.add(y);
|
|
874
886
|
}
|
|
875
|
-
function p(
|
|
876
|
-
|
|
887
|
+
function p(y) {
|
|
888
|
+
y && typeof y == "string" && r.delete(y);
|
|
877
889
|
}
|
|
878
890
|
function w() {
|
|
879
891
|
return [...r];
|
|
880
892
|
}
|
|
881
|
-
function c(
|
|
882
|
-
console.log("[Bridge] setIframe called, current isReady:", n, "readySignalReceived:", o, "same iframe:", s ===
|
|
893
|
+
function c(y) {
|
|
894
|
+
console.log("[Bridge] setIframe called, current isReady:", n, "readySignalReceived:", o, "same iframe:", s === y), s !== y && (s = y, o ? (console.log("[Bridge] Ready signal was already received, keeping isReady=true"), n = !0) : n = !1), console.log("[Bridge] setIframe done, isReady:", n, "pendingMessages:", i.length), m();
|
|
883
895
|
}
|
|
884
896
|
function m() {
|
|
885
|
-
console.log("[Bridge] flushPendingMessages: isReady=", n, "hasIframe=", !!(s != null && s.contentWindow), "pending=", i.length), n && (s != null && s.contentWindow) && i.length > 0 && (console.log("[Bridge] Flushing", i.length, "pending messages"), i.forEach((
|
|
897
|
+
console.log("[Bridge] flushPendingMessages: isReady=", n, "hasIframe=", !!(s != null && s.contentWindow), "pending=", i.length), n && (s != null && s.contentWindow) && i.length > 0 && (console.log("[Bridge] Flushing", i.length, "pending messages"), i.forEach((y) => h(y)), i.length = 0);
|
|
886
898
|
}
|
|
887
|
-
function h(
|
|
899
|
+
function h(y, z = "*") {
|
|
888
900
|
if (!(s != null && s.contentWindow))
|
|
889
901
|
return console.warn("Artifactuse: No panel iframe available"), !1;
|
|
890
902
|
try {
|
|
891
|
-
return s.contentWindow.postMessage(
|
|
892
|
-
} catch (
|
|
893
|
-
return console.error("Artifactuse bridge send error:",
|
|
903
|
+
return s.contentWindow.postMessage(y, z), !0;
|
|
904
|
+
} catch (H) {
|
|
905
|
+
return console.error("Artifactuse bridge send error:", H), !1;
|
|
894
906
|
}
|
|
895
907
|
}
|
|
896
|
-
function g(
|
|
897
|
-
const
|
|
908
|
+
function g(y, z, H = null, P = "*") {
|
|
909
|
+
const T = {
|
|
898
910
|
type: "artifactuse",
|
|
899
|
-
action:
|
|
900
|
-
data:
|
|
901
|
-
requestId:
|
|
911
|
+
action: y,
|
|
912
|
+
data: z,
|
|
913
|
+
requestId: H || ut(),
|
|
902
914
|
timestamp: Date.now()
|
|
903
915
|
};
|
|
904
|
-
return n ? (h(
|
|
905
|
-
}
|
|
906
|
-
function f(
|
|
907
|
-
return new Promise((
|
|
908
|
-
const
|
|
909
|
-
v(`${
|
|
910
|
-
},
|
|
911
|
-
|
|
916
|
+
return n ? (h(T, P), T.requestId) : (i.push(T), T.requestId);
|
|
917
|
+
}
|
|
918
|
+
function f(y, z, H = 3e4) {
|
|
919
|
+
return new Promise((P, T) => {
|
|
920
|
+
const W = ut(), K = setTimeout(() => {
|
|
921
|
+
v(`${y}:response`, U), T(new Error(`Artifactuse bridge request timeout: ${y}`));
|
|
922
|
+
}, H), U = (J, k) => {
|
|
923
|
+
k === W && (clearTimeout(K), v(`${y}:response`, U), P(J));
|
|
912
924
|
};
|
|
913
|
-
b(`${
|
|
925
|
+
b(`${y}:response`, U), g(y, z, W);
|
|
914
926
|
});
|
|
915
927
|
}
|
|
916
|
-
function b(
|
|
917
|
-
return a.has(
|
|
928
|
+
function b(y, z) {
|
|
929
|
+
return a.has(y) || a.set(y, []), a.get(y).push(z), () => v(y, z);
|
|
918
930
|
}
|
|
919
|
-
function v(
|
|
920
|
-
const
|
|
921
|
-
if (
|
|
922
|
-
const
|
|
923
|
-
|
|
931
|
+
function v(y, z) {
|
|
932
|
+
const H = a.get(y);
|
|
933
|
+
if (H) {
|
|
934
|
+
const P = H.indexOf(z);
|
|
935
|
+
P > -1 && H.splice(P, 1);
|
|
924
936
|
}
|
|
925
937
|
}
|
|
926
|
-
function
|
|
927
|
-
return g("load:artifact",
|
|
938
|
+
function x(y) {
|
|
939
|
+
return g("load:artifact", y);
|
|
928
940
|
}
|
|
929
|
-
function $(
|
|
930
|
-
return g("update:artifact", { artifactId:
|
|
941
|
+
function $(y, z) {
|
|
942
|
+
return g("update:artifact", { artifactId: y, updates: z });
|
|
931
943
|
}
|
|
932
|
-
function
|
|
944
|
+
function A() {
|
|
933
945
|
return f("save", {});
|
|
934
946
|
}
|
|
935
|
-
function
|
|
936
|
-
return f("export", { format:
|
|
947
|
+
function C(y = "default") {
|
|
948
|
+
return f("export", { format: y });
|
|
937
949
|
}
|
|
938
|
-
function y
|
|
939
|
-
return g("ai:response",
|
|
950
|
+
function R(y, z) {
|
|
951
|
+
return g("ai:response", y, z);
|
|
940
952
|
}
|
|
941
|
-
function
|
|
953
|
+
function M() {
|
|
942
954
|
window.removeEventListener("message", l), a.clear(), r.clear(), s = null, n = !1, o = !1, i.length = 0;
|
|
943
955
|
}
|
|
944
956
|
return {
|
|
@@ -947,12 +959,12 @@ function ra(e = []) {
|
|
|
947
959
|
request: f,
|
|
948
960
|
on: b,
|
|
949
961
|
off: v,
|
|
950
|
-
loadArtifact:
|
|
962
|
+
loadArtifact: x,
|
|
951
963
|
updateArtifact: $,
|
|
952
|
-
requestSave:
|
|
953
|
-
requestExport:
|
|
954
|
-
sendAIResponse:
|
|
955
|
-
destroy:
|
|
964
|
+
requestSave: A,
|
|
965
|
+
requestExport: C,
|
|
966
|
+
sendAIResponse: R,
|
|
967
|
+
destroy: M,
|
|
956
968
|
// Origin management
|
|
957
969
|
addAllowedOrigin: d,
|
|
958
970
|
removeAllowedOrigin: p,
|
|
@@ -1606,7 +1618,7 @@ function fa(e = {}) {
|
|
|
1606
1618
|
return r === "auto" ? w === "dark" : r === "dark";
|
|
1607
1619
|
}
|
|
1608
1620
|
function d(w, c = {}) {
|
|
1609
|
-
var
|
|
1621
|
+
var B, be;
|
|
1610
1622
|
if (!a())
|
|
1611
1623
|
return console.warn("Artifactuse: CodeMirror modules not provided. Editor not available."), null;
|
|
1612
1624
|
const { EditorState: m } = t.state, {
|
|
@@ -1615,79 +1627,79 @@ function fa(e = {}) {
|
|
|
1615
1627
|
lineNumbers: f,
|
|
1616
1628
|
highlightActiveLineGutter: b,
|
|
1617
1629
|
highlightSpecialChars: v,
|
|
1618
|
-
drawSelection:
|
|
1630
|
+
drawSelection: x,
|
|
1619
1631
|
dropCursor: $,
|
|
1620
|
-
rectangularSelection:
|
|
1621
|
-
crosshairCursor:
|
|
1622
|
-
highlightActiveLine:
|
|
1623
|
-
} = t.view, { defaultKeymap:
|
|
1624
|
-
indentOnInput:
|
|
1625
|
-
syntaxHighlighting:
|
|
1626
|
-
bracketMatching:
|
|
1627
|
-
foldGutter:
|
|
1632
|
+
rectangularSelection: A,
|
|
1633
|
+
crosshairCursor: C,
|
|
1634
|
+
highlightActiveLine: R
|
|
1635
|
+
} = t.view, { defaultKeymap: M, history: y, historyKeymap: z, indentWithTab: H } = t.commands, {
|
|
1636
|
+
indentOnInput: P,
|
|
1637
|
+
syntaxHighlighting: T,
|
|
1638
|
+
bracketMatching: W,
|
|
1639
|
+
foldGutter: K,
|
|
1628
1640
|
foldKeymap: U,
|
|
1629
|
-
HighlightStyle:
|
|
1641
|
+
HighlightStyle: J
|
|
1630
1642
|
} = t.language, {
|
|
1631
|
-
closeBrackets:
|
|
1632
|
-
closeBracketsKeymap:
|
|
1633
|
-
autocompletion:
|
|
1634
|
-
completionKeymap:
|
|
1635
|
-
} = t.autocomplete,
|
|
1643
|
+
closeBrackets: k,
|
|
1644
|
+
closeBracketsKeymap: _,
|
|
1645
|
+
autocompletion: L,
|
|
1646
|
+
completionKeymap: S
|
|
1647
|
+
} = t.autocomplete, D = ((B = t.lezerHighlight) == null ? void 0 : B.tags) || ((be = t.language) == null ? void 0 : be.tags), E = l(c.sdkTheme), Z = E ? s(h) : n(h), ne = [
|
|
1636
1648
|
f(),
|
|
1637
1649
|
b(),
|
|
1638
1650
|
v(),
|
|
1639
|
-
|
|
1640
|
-
|
|
1651
|
+
y(),
|
|
1652
|
+
K({
|
|
1641
1653
|
openText: "▾",
|
|
1642
1654
|
closedText: "▸"
|
|
1643
1655
|
}),
|
|
1644
|
-
|
|
1656
|
+
x(),
|
|
1645
1657
|
$(),
|
|
1646
1658
|
m.allowMultipleSelections.of(!0),
|
|
1659
|
+
P(),
|
|
1660
|
+
...D ? [T(o(J, D, E))] : [],
|
|
1661
|
+
W(),
|
|
1662
|
+
k(),
|
|
1647
1663
|
L(),
|
|
1648
|
-
...P ? [I(o(k, P, Z))] : [],
|
|
1649
|
-
G(),
|
|
1650
|
-
_(),
|
|
1651
1664
|
A(),
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
y(),
|
|
1665
|
+
C(),
|
|
1666
|
+
R(),
|
|
1655
1667
|
g.of([
|
|
1656
|
-
...
|
|
1657
|
-
...
|
|
1658
|
-
...
|
|
1668
|
+
..._,
|
|
1669
|
+
...M,
|
|
1670
|
+
...z,
|
|
1659
1671
|
...U,
|
|
1660
|
-
...
|
|
1661
|
-
|
|
1672
|
+
...S,
|
|
1673
|
+
H
|
|
1662
1674
|
]),
|
|
1663
1675
|
u(c.language),
|
|
1664
|
-
|
|
1676
|
+
Z
|
|
1665
1677
|
];
|
|
1666
|
-
c.onChange &&
|
|
1667
|
-
h.updateListener.of((
|
|
1668
|
-
|
|
1678
|
+
c.onChange && ne.push(
|
|
1679
|
+
h.updateListener.of((Q) => {
|
|
1680
|
+
Q.docChanged && c.onChange(Q.state.doc.toString());
|
|
1669
1681
|
})
|
|
1670
1682
|
);
|
|
1671
|
-
const
|
|
1683
|
+
const oe = m.create({
|
|
1672
1684
|
doc: c.code || "",
|
|
1673
|
-
extensions:
|
|
1674
|
-
}),
|
|
1675
|
-
state:
|
|
1685
|
+
extensions: ne
|
|
1686
|
+
}), G = new h({
|
|
1687
|
+
state: oe,
|
|
1676
1688
|
parent: w
|
|
1677
1689
|
});
|
|
1678
1690
|
return {
|
|
1679
|
-
view:
|
|
1691
|
+
view: G,
|
|
1680
1692
|
getCode() {
|
|
1681
|
-
return
|
|
1693
|
+
return G.state.doc.toString();
|
|
1682
1694
|
},
|
|
1683
|
-
setCode(
|
|
1684
|
-
const it =
|
|
1685
|
-
it !==
|
|
1686
|
-
changes: { from: 0, to: it.length, insert:
|
|
1695
|
+
setCode(Q) {
|
|
1696
|
+
const it = G.state.doc.toString();
|
|
1697
|
+
it !== Q && G.dispatch({
|
|
1698
|
+
changes: { from: 0, to: it.length, insert: Q }
|
|
1687
1699
|
});
|
|
1688
1700
|
},
|
|
1689
1701
|
destroy() {
|
|
1690
|
-
|
|
1702
|
+
G.destroy();
|
|
1691
1703
|
}
|
|
1692
1704
|
};
|
|
1693
1705
|
}
|
|
@@ -1703,9 +1715,9 @@ function fa(e = {}) {
|
|
|
1703
1715
|
function Ke() {
|
|
1704
1716
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
1705
1717
|
}
|
|
1706
|
-
var
|
|
1718
|
+
var se = Ke();
|
|
1707
1719
|
function mr(e) {
|
|
1708
|
-
|
|
1720
|
+
se = e;
|
|
1709
1721
|
}
|
|
1710
1722
|
var he = { exec: () => null };
|
|
1711
1723
|
function j(e, t = "") {
|
|
@@ -1721,9 +1733,9 @@ var ha = (() => {
|
|
|
1721
1733
|
} catch {
|
|
1722
1734
|
return !1;
|
|
1723
1735
|
}
|
|
1724
|
-
})(), q = { 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") }, ga = /^(?:[ \t]*(?:\n|$))+/, ma = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, wa = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, me = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ba = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Je = /(?:[*+-]|\d{1,9}[.)])/, wr = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, br = j(wr).replace(/bull/g, Je).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(), va = j(wr).replace(/bull/g, Je).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]+)*)/, ya = /^[^\n]+/, Ye = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ka = j(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Ye).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), xa = j(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Je).getRegex(), Te = "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", et = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Ma = j("^ {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", et).replace("tag", Te).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), vr = j(Qe).replace("hr", me).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", Te).getRegex(), $a = j(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", vr).getRegex(), tt = { blockquote: $a, code: ma, def: ka, fences: wa, heading: ba, hr: me, html: Ma, lheading: br, list: xa, newline: ga, paragraph: vr, table: he, text: ya }, pt = j("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", me).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", Te).getRegex(),
|
|
1725
|
-
]`).replace("lheading", br).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Sa = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ca = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, yr = /^( {2,}|\\)\n(?!\s*$)/, Ra = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, _e = /[\p{P}\p{S}]/u, rt = /[\s\p{P}\p{S}]/u, kr = /[^\s\p{P}\p{S}]/u, La = j(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, rt).getRegex(), xr = /(?!~)[\p{P}\p{S}]/u, Ta = /(?!~)[\s\p{P}\p{S}]/u, _a = /(?:[^\s\p{P}\p{S}]|~)/u, Ea = j(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", ha ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Mr = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Pa = j(Mr, "u").replace(/punct/g, _e).getRegex(), ja = j(Mr, "u").replace(/punct/g, xr).getRegex(), $r = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ha = j($r, "gu").replace(/notPunctSpace/g, kr).replace(/punctSpace/g, rt).replace(/punct/g, _e).getRegex(), Va = j($r, "gu").replace(/notPunctSpace/g, _a).replace(/punctSpace/g, Ta).replace(/punct/g, xr).getRegex(), Ia = j("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, kr).replace(/punctSpace/g, rt).replace(/punct/g, _e).getRegex(), Da = j(/\\(punct)/, "gu").replace(/punct/g, _e).getRegex(), qa = j(/^<(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(), Za = j(et).replace("(?:-->|$)", "-->").getRegex(), Oa = j("^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", Za).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), $e = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Ba = j(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", $e).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),
|
|
1726
|
-
function
|
|
1736
|
+
})(), q = { 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") }, ga = /^(?:[ \t]*(?:\n|$))+/, ma = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, wa = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, me = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ba = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Je = /(?:[*+-]|\d{1,9}[.)])/, wr = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, br = j(wr).replace(/bull/g, Je).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(), va = j(wr).replace(/bull/g, Je).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]+)*)/, ya = /^[^\n]+/, Ye = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ka = j(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Ye).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), xa = j(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Je).getRegex(), Te = "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", et = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Ma = j("^ {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", et).replace("tag", Te).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), vr = j(Qe).replace("hr", me).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", Te).getRegex(), $a = j(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", vr).getRegex(), tt = { blockquote: $a, code: ma, def: ka, fences: wa, heading: ba, hr: me, html: Ma, lheading: br, list: xa, newline: ga, paragraph: vr, table: he, text: ya }, pt = j("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", me).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", Te).getRegex(), Aa = { ...tt, lheading: va, table: pt, paragraph: j(Qe).replace("hr", me).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", pt).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", Te).getRegex() }, za = { ...tt, html: j(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", et).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: he, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: j(Qe).replace("hr", me).replace("heading", ` *#{1,6} *[^
|
|
1737
|
+
]`).replace("lheading", br).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Sa = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ca = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, yr = /^( {2,}|\\)\n(?!\s*$)/, Ra = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, _e = /[\p{P}\p{S}]/u, rt = /[\s\p{P}\p{S}]/u, kr = /[^\s\p{P}\p{S}]/u, La = j(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, rt).getRegex(), xr = /(?!~)[\p{P}\p{S}]/u, Ta = /(?!~)[\s\p{P}\p{S}]/u, _a = /(?:[^\s\p{P}\p{S}]|~)/u, Ea = j(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", ha ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Mr = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Pa = j(Mr, "u").replace(/punct/g, _e).getRegex(), ja = j(Mr, "u").replace(/punct/g, xr).getRegex(), $r = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ha = j($r, "gu").replace(/notPunctSpace/g, kr).replace(/punctSpace/g, rt).replace(/punct/g, _e).getRegex(), Va = j($r, "gu").replace(/notPunctSpace/g, _a).replace(/punctSpace/g, Ta).replace(/punct/g, xr).getRegex(), Ia = j("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, kr).replace(/punctSpace/g, rt).replace(/punct/g, _e).getRegex(), Da = j(/\\(punct)/, "gu").replace(/punct/g, _e).getRegex(), qa = j(/^<(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(), Za = j(et).replace("(?:-->|$)", "-->").getRegex(), Oa = j("^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", Za).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), $e = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Ba = j(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", $e).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Ar = j(/^!?\[(label)\]\[(ref)\]/).replace("label", $e).replace("ref", Ye).getRegex(), zr = j(/^!?\[(ref)\](?:\[\])?/).replace("ref", Ye).getRegex(), Fa = j("reflink|nolink(?!\\()", "g").replace("reflink", Ar).replace("nolink", zr).getRegex(), ft = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, at = { _backpedal: he, anyPunctuation: Da, autolink: qa, blockSkip: Ea, br: yr, code: Ca, del: he, emStrongLDelim: Pa, emStrongRDelimAst: Ha, emStrongRDelimUnd: Ia, escape: Sa, link: Ba, nolink: zr, punctuation: La, reflink: Ar, reflinkSearch: Fa, tag: Oa, text: Ra, url: he }, Na = { ...at, link: j(/^!?\[(label)\]\((.*?)\)/).replace("label", $e).getRegex(), reflink: j(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", $e).getRegex() }, Ve = { ...at, emStrongRDelimAst: Va, emStrongLDelim: ja, url: j(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ft).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: j(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ft).getRegex() }, Ua = { ...Ve, br: j(yr).replace("{2,}", "*").getRegex(), text: j(Ve.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ye = { normal: tt, gfm: Aa, pedantic: za }, ce = { normal: at, gfm: Ve, breaks: Ua, pedantic: Na }, Ga = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, ht = (e) => Ga[e];
|
|
1738
|
+
function X(e, t) {
|
|
1727
1739
|
if (t) {
|
|
1728
1740
|
if (q.escapeTest.test(e)) return e.replace(q.escapeReplace, ht);
|
|
1729
1741
|
} else if (q.escapeTestNoEncode.test(e)) return e.replace(q.escapeReplaceNoEncode, ht);
|
|
@@ -1784,12 +1796,12 @@ function Xa(e, t, r) {
|
|
|
1784
1796
|
}).join(`
|
|
1785
1797
|
`);
|
|
1786
1798
|
}
|
|
1787
|
-
var
|
|
1799
|
+
var Ae = class {
|
|
1788
1800
|
constructor(e) {
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
this.options = e ||
|
|
1801
|
+
I(this, "options");
|
|
1802
|
+
I(this, "rules");
|
|
1803
|
+
I(this, "lexer");
|
|
1804
|
+
this.options = e || se;
|
|
1793
1805
|
}
|
|
1794
1806
|
space(e) {
|
|
1795
1807
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -1882,20 +1894,20 @@ ${d}` : d;
|
|
|
1882
1894
|
`, 1)[0], h = !c.trim(), g = 0;
|
|
1883
1895
|
if (this.options.pedantic ? (g = 2, w = c.trimStart()) : h ? g = t[1].length + 1 : (g = t[2].search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, w = c.slice(g), g += t[1].length), h && this.rules.other.blankLine.test(m) && (p += m + `
|
|
1884
1896
|
`, e = e.substring(m.length + 1), d = !0), !d) {
|
|
1885
|
-
let f = this.rules.other.nextBulletRegex(g), b = this.rules.other.hrRegex(g), v = this.rules.other.fencesBeginRegex(g),
|
|
1897
|
+
let f = this.rules.other.nextBulletRegex(g), b = this.rules.other.hrRegex(g), v = this.rules.other.fencesBeginRegex(g), x = this.rules.other.headingBeginRegex(g), $ = this.rules.other.htmlBeginRegex(g);
|
|
1886
1898
|
for (; e; ) {
|
|
1887
|
-
let
|
|
1888
|
-
`, 1)[0],
|
|
1889
|
-
if (m =
|
|
1890
|
-
if (
|
|
1891
|
-
` +
|
|
1899
|
+
let A = e.split(`
|
|
1900
|
+
`, 1)[0], C;
|
|
1901
|
+
if (m = A, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), C = m) : C = m.replace(this.rules.other.tabCharGlobal, " "), v.test(m) || x.test(m) || $.test(m) || f.test(m) || b.test(m)) break;
|
|
1902
|
+
if (C.search(this.rules.other.nonSpaceChar) >= g || !m.trim()) w += `
|
|
1903
|
+
` + C.slice(g);
|
|
1892
1904
|
else {
|
|
1893
|
-
if (h || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || v.test(c) ||
|
|
1905
|
+
if (h || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || v.test(c) || x.test(c) || b.test(c)) break;
|
|
1894
1906
|
w += `
|
|
1895
1907
|
` + m;
|
|
1896
1908
|
}
|
|
1897
|
-
!h && !m.trim() && (h = !0), p +=
|
|
1898
|
-
`, e = e.substring(
|
|
1909
|
+
!h && !m.trim() && (h = !0), p += A + `
|
|
1910
|
+
`, e = e.substring(A.length + 1), c = C.slice(g);
|
|
1899
1911
|
}
|
|
1900
1912
|
}
|
|
1901
1913
|
o.loose || (u ? o.loose = !0 : this.rules.other.doubleBlankLine.test(p) && (u = !0)), o.items.push({ type: "list_item", raw: p, task: !!this.options.gfm && this.rules.other.listIsTask.test(w), loose: !1, text: w, tokens: [] }), o.raw += p;
|
|
@@ -2086,12 +2098,12 @@ ${d}` : d;
|
|
|
2086
2098
|
}
|
|
2087
2099
|
}, F = class Ie {
|
|
2088
2100
|
constructor(t) {
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t ||
|
|
2101
|
+
I(this, "tokens");
|
|
2102
|
+
I(this, "options");
|
|
2103
|
+
I(this, "state");
|
|
2104
|
+
I(this, "inlineQueue");
|
|
2105
|
+
I(this, "tokenizer");
|
|
2106
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || se, this.options.tokenizer = this.options.tokenizer || new Ae(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
|
|
2095
2107
|
let r = { other: q, block: ye.normal, inline: ce.normal };
|
|
2096
2108
|
this.options.pedantic ? (r.block = ye.pedantic, r.inline = ce.pedantic) : this.options.gfm && (r.block = ye.gfm, this.options.breaks ? r.inline = ce.breaks : r.inline = ce.gfm), this.tokenizer.rules = r;
|
|
2097
2109
|
}
|
|
@@ -2293,11 +2305,11 @@ ${d}` : d;
|
|
|
2293
2305
|
}
|
|
2294
2306
|
return r;
|
|
2295
2307
|
}
|
|
2296
|
-
},
|
|
2308
|
+
}, ze = class {
|
|
2297
2309
|
constructor(e) {
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
this.options = e ||
|
|
2310
|
+
I(this, "options");
|
|
2311
|
+
I(this, "parser");
|
|
2312
|
+
this.options = e || se;
|
|
2301
2313
|
}
|
|
2302
2314
|
space(e) {
|
|
2303
2315
|
return "";
|
|
@@ -2306,8 +2318,8 @@ ${d}` : d;
|
|
|
2306
2318
|
var n;
|
|
2307
2319
|
let a = (n = (t || "").match(q.notSpaceStart)) == null ? void 0 : n[0], s = e.replace(q.endingNewline, "") + `
|
|
2308
2320
|
`;
|
|
2309
|
-
return a ? '<pre><code class="language-' +
|
|
2310
|
-
` : "<pre><code>" + (r ? s :
|
|
2321
|
+
return a ? '<pre><code class="language-' + X(a) + '">' + (r ? s : X(s, !0)) + `</code></pre>
|
|
2322
|
+
` : "<pre><code>" + (r ? s : X(s, !0)) + `</code></pre>
|
|
2311
2323
|
`;
|
|
2312
2324
|
}
|
|
2313
2325
|
blockquote({ tokens: e }) {
|
|
@@ -2385,7 +2397,7 @@ ${e}</tr>
|
|
|
2385
2397
|
return `<em>${this.parser.parseInline(e)}</em>`;
|
|
2386
2398
|
}
|
|
2387
2399
|
codespan({ text: e }) {
|
|
2388
|
-
return `<code>${
|
|
2400
|
+
return `<code>${X(e, !0)}</code>`;
|
|
2389
2401
|
}
|
|
2390
2402
|
br(e) {
|
|
2391
2403
|
return "<br>";
|
|
@@ -2398,18 +2410,18 @@ ${e}</tr>
|
|
|
2398
2410
|
if (s === null) return a;
|
|
2399
2411
|
e = s;
|
|
2400
2412
|
let n = '<a href="' + e + '"';
|
|
2401
|
-
return t && (n += ' title="' +
|
|
2413
|
+
return t && (n += ' title="' + X(t) + '"'), n += ">" + a + "</a>", n;
|
|
2402
2414
|
}
|
|
2403
2415
|
image({ href: e, title: t, text: r, tokens: a }) {
|
|
2404
2416
|
a && (r = this.parser.parseInline(a, this.parser.textRenderer));
|
|
2405
2417
|
let s = gt(e);
|
|
2406
|
-
if (s === null) return
|
|
2418
|
+
if (s === null) return X(r);
|
|
2407
2419
|
e = s;
|
|
2408
2420
|
let n = `<img src="${e}" alt="${r}"`;
|
|
2409
|
-
return t && (n += ` title="${
|
|
2421
|
+
return t && (n += ` title="${X(t)}"`), n += ">", n;
|
|
2410
2422
|
}
|
|
2411
2423
|
text(e) {
|
|
2412
|
-
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text :
|
|
2424
|
+
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : X(e.text);
|
|
2413
2425
|
}
|
|
2414
2426
|
}, st = class {
|
|
2415
2427
|
strong({ text: e }) {
|
|
@@ -2444,10 +2456,10 @@ ${e}</tr>
|
|
|
2444
2456
|
}
|
|
2445
2457
|
}, N = class De {
|
|
2446
2458
|
constructor(t) {
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
this.options = t ||
|
|
2459
|
+
I(this, "options");
|
|
2460
|
+
I(this, "renderer");
|
|
2461
|
+
I(this, "textRenderer");
|
|
2462
|
+
this.options = t || se, this.options.renderer = this.options.renderer || new ze(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new st();
|
|
2451
2463
|
}
|
|
2452
2464
|
static parse(t, r) {
|
|
2453
2465
|
return new De(r).parse(t);
|
|
@@ -2595,9 +2607,9 @@ ${e}</tr>
|
|
|
2595
2607
|
}
|
|
2596
2608
|
}, xe, pe = (xe = class {
|
|
2597
2609
|
constructor(e) {
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
this.options = e ||
|
|
2610
|
+
I(this, "options");
|
|
2611
|
+
I(this, "block");
|
|
2612
|
+
this.options = e || se;
|
|
2601
2613
|
}
|
|
2602
2614
|
preprocess(e) {
|
|
2603
2615
|
return e;
|
|
@@ -2617,18 +2629,18 @@ ${e}</tr>
|
|
|
2617
2629
|
provideParser() {
|
|
2618
2630
|
return this.block ? N.parse : N.parseInline;
|
|
2619
2631
|
}
|
|
2620
|
-
},
|
|
2632
|
+
}, I(xe, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), I(xe, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), xe), Ka = class {
|
|
2621
2633
|
constructor(...e) {
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2634
|
+
I(this, "defaults", Ke());
|
|
2635
|
+
I(this, "options", this.setOptions);
|
|
2636
|
+
I(this, "parse", this.parseMarkdown(!0));
|
|
2637
|
+
I(this, "parseInline", this.parseMarkdown(!1));
|
|
2638
|
+
I(this, "Parser", N);
|
|
2639
|
+
I(this, "Renderer", ze);
|
|
2640
|
+
I(this, "TextRenderer", st);
|
|
2641
|
+
I(this, "Lexer", F);
|
|
2642
|
+
I(this, "Tokenizer", Ae);
|
|
2643
|
+
I(this, "Hooks", pe);
|
|
2632
2644
|
this.use(...e);
|
|
2633
2645
|
}
|
|
2634
2646
|
walkTokens(e, t) {
|
|
@@ -2676,7 +2688,7 @@ ${e}</tr>
|
|
|
2676
2688
|
}
|
|
2677
2689
|
"childTokens" in s && s.childTokens && (t.childTokens[s.name] = s.childTokens);
|
|
2678
2690
|
}), a.extensions = t), r.renderer) {
|
|
2679
|
-
let s = this.defaults.renderer || new
|
|
2691
|
+
let s = this.defaults.renderer || new ze(this.defaults);
|
|
2680
2692
|
for (let n in r.renderer) {
|
|
2681
2693
|
if (!(n in s)) throw new Error(`renderer '${n}' does not exist`);
|
|
2682
2694
|
if (["options", "parser"].includes(n)) continue;
|
|
@@ -2689,7 +2701,7 @@ ${e}</tr>
|
|
|
2689
2701
|
a.renderer = s;
|
|
2690
2702
|
}
|
|
2691
2703
|
if (r.tokenizer) {
|
|
2692
|
-
let s = this.defaults.tokenizer || new
|
|
2704
|
+
let s = this.defaults.tokenizer || new Ae(this.defaults);
|
|
2693
2705
|
for (let n in r.tokenizer) {
|
|
2694
2706
|
if (!(n in s)) throw new Error(`tokenizer '${n}' does not exist`);
|
|
2695
2707
|
if (["options", "rules", "lexer"].includes(n)) continue;
|
|
@@ -2771,43 +2783,43 @@ ${e}</tr>
|
|
|
2771
2783
|
return (r) => {
|
|
2772
2784
|
if (r.message += `
|
|
2773
2785
|
Please report this to https://github.com/markedjs/marked.`, e) {
|
|
2774
|
-
let a = "<p>An error occurred:</p><pre>" +
|
|
2786
|
+
let a = "<p>An error occurred:</p><pre>" + X(r.message + "", !0) + "</pre>";
|
|
2775
2787
|
return t ? Promise.resolve(a) : a;
|
|
2776
2788
|
}
|
|
2777
2789
|
if (t) return Promise.reject(r);
|
|
2778
2790
|
throw r;
|
|
2779
2791
|
};
|
|
2780
2792
|
}
|
|
2781
|
-
},
|
|
2782
|
-
function
|
|
2783
|
-
return
|
|
2793
|
+
}, re = new Ka();
|
|
2794
|
+
function V(e, t) {
|
|
2795
|
+
return re.parse(e, t);
|
|
2784
2796
|
}
|
|
2785
|
-
|
|
2786
|
-
return
|
|
2797
|
+
V.options = V.setOptions = function(e) {
|
|
2798
|
+
return re.setOptions(e), V.defaults = re.defaults, mr(V.defaults), V;
|
|
2787
2799
|
};
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
return
|
|
2800
|
+
V.getDefaults = Ke;
|
|
2801
|
+
V.defaults = se;
|
|
2802
|
+
V.use = function(...e) {
|
|
2803
|
+
return re.use(...e), V.defaults = re.defaults, mr(V.defaults), V;
|
|
2792
2804
|
};
|
|
2793
|
-
|
|
2794
|
-
return
|
|
2805
|
+
V.walkTokens = function(e, t) {
|
|
2806
|
+
return re.walkTokens(e, t);
|
|
2795
2807
|
};
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2808
|
+
V.parseInline = re.parseInline;
|
|
2809
|
+
V.Parser = N;
|
|
2810
|
+
V.parser = N.parse;
|
|
2811
|
+
V.Renderer = ze;
|
|
2812
|
+
V.TextRenderer = st;
|
|
2813
|
+
V.Lexer = F;
|
|
2814
|
+
V.lexer = F.lex;
|
|
2815
|
+
V.Tokenizer = Ae;
|
|
2816
|
+
V.Hooks = pe;
|
|
2817
|
+
V.parse = V;
|
|
2818
|
+
V.options;
|
|
2819
|
+
V.setOptions;
|
|
2820
|
+
V.use;
|
|
2821
|
+
V.walkTokens;
|
|
2822
|
+
V.parseInline;
|
|
2811
2823
|
N.parse;
|
|
2812
2824
|
F.lex;
|
|
2813
2825
|
const Ja = ["jpg", "jpeg", "png", "gif", "webp", "svg", "bmp", "ico", "avif"];
|
|
@@ -3089,54 +3101,54 @@ function cs() {
|
|
|
3089
3101
|
}
|
|
3090
3102
|
function us(e, t = {}) {
|
|
3091
3103
|
const r = t.theme || "dark", a = [];
|
|
3092
|
-
e = e.replace(/<pre[^>]*>[\s\S]*?<\/pre>/gi, (
|
|
3093
|
-
const
|
|
3094
|
-
return a.push(
|
|
3095
|
-
}), e = e.replace(/<code[^>]*>[\s\S]*?<\/code>/gi, (
|
|
3096
|
-
const
|
|
3097
|
-
return a.push(
|
|
3098
|
-
}), e = e.replace(/<(video|audio|iframe)[^>]*>[\s\S]*?<\/\1>/gi, (
|
|
3099
|
-
const
|
|
3100
|
-
return a.push(
|
|
3104
|
+
e = e.replace(/<pre[^>]*>[\s\S]*?<\/pre>/gi, (A) => {
|
|
3105
|
+
const C = `__PROTECTED_${a.length}__`;
|
|
3106
|
+
return a.push(A), C;
|
|
3107
|
+
}), e = e.replace(/<code[^>]*>[\s\S]*?<\/code>/gi, (A) => {
|
|
3108
|
+
const C = `__PROTECTED_${a.length}__`;
|
|
3109
|
+
return a.push(A), C;
|
|
3110
|
+
}), e = e.replace(/<(video|audio|iframe)[^>]*>[\s\S]*?<\/\1>/gi, (A) => {
|
|
3111
|
+
const C = `__PROTECTED_${a.length}__`;
|
|
3112
|
+
return a.push(A), C;
|
|
3101
3113
|
});
|
|
3102
3114
|
const s = /<a[^>]*href="(https?:\/\/[^"]+\.(mp3|wav|flac|aac|ogg|m4a|wma)(?:\?[^"]*)?)"[^>]*>[^<]*<\/a>/gi;
|
|
3103
|
-
e = e.replace(s, (
|
|
3115
|
+
e = e.replace(s, (A, C) => vt(C));
|
|
3104
3116
|
const n = new RegExp(`(?<!["'=])(https?:\\/\\/[^\\s<>"]+\\.(mp3|wav|flac|aac|ogg|m4a|wma)(\\?[^\\s<>"]*)?)(?!["'])`, "gi");
|
|
3105
|
-
e = e.replace(n, (
|
|
3117
|
+
e = e.replace(n, (A, C) => vt(C));
|
|
3106
3118
|
const o = /<a[^>]*href="(https?:\/\/(?:www\.)?soundcloud\.com\/[^"]+)"[^>]*>[^<]*<\/a>/gi;
|
|
3107
|
-
e = e.replace(o, (
|
|
3119
|
+
e = e.replace(o, (A, C) => yt(C));
|
|
3108
3120
|
const i = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?soundcloud\\.com\\/[^\\s<>"]+)(?!["'])`, "gi");
|
|
3109
|
-
e = e.replace(i, (
|
|
3121
|
+
e = e.replace(i, (A, C) => yt(C));
|
|
3110
3122
|
const u = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/track\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3111
|
-
e = e.replace(u, (
|
|
3123
|
+
e = e.replace(u, (A, C, R) => O("track", R, r));
|
|
3112
3124
|
const l = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/track\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
3113
|
-
e = e.replace(l, (
|
|
3125
|
+
e = e.replace(l, (A, C, R) => O("track", R, r));
|
|
3114
3126
|
const d = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/album\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3115
|
-
e = e.replace(d, (
|
|
3127
|
+
e = e.replace(d, (A, C, R) => O("album", R, r));
|
|
3116
3128
|
const p = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/album\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
3117
|
-
e = e.replace(p, (
|
|
3129
|
+
e = e.replace(p, (A, C, R) => O("album", R, r));
|
|
3118
3130
|
const w = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/playlist\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3119
|
-
e = e.replace(w, (
|
|
3131
|
+
e = e.replace(w, (A, C, R) => O("playlist", R, r));
|
|
3120
3132
|
const c = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/playlist\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
3121
|
-
e = e.replace(c, (
|
|
3133
|
+
e = e.replace(c, (A, C, R) => O("playlist", R, r));
|
|
3122
3134
|
const m = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/artist\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3123
|
-
e = e.replace(m, (
|
|
3135
|
+
e = e.replace(m, (A, C, R) => O("artist", R, r));
|
|
3124
3136
|
const h = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/artist\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
3125
|
-
e = e.replace(h, (
|
|
3137
|
+
e = e.replace(h, (A, C, R) => O("artist", R, r));
|
|
3126
3138
|
const g = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/episode\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3127
|
-
e = e.replace(g, (
|
|
3139
|
+
e = e.replace(g, (A, C, R) => O("episode", R, r));
|
|
3128
3140
|
const f = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/episode\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
3129
|
-
e = e.replace(f, (
|
|
3141
|
+
e = e.replace(f, (A, C, R) => O("episode", R, r));
|
|
3130
3142
|
const b = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/show\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3131
|
-
e = e.replace(b, (
|
|
3143
|
+
e = e.replace(b, (A, C, R) => O("show", R, r));
|
|
3132
3144
|
const v = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/show\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
3133
|
-
e = e.replace(v, (
|
|
3134
|
-
const
|
|
3135
|
-
e = e.replace(
|
|
3145
|
+
e = e.replace(v, (A, C, R) => O("show", R, r));
|
|
3146
|
+
const x = /<a[^>]*href="(https?:\/\/music\.apple\.com\/([a-z]{2})\/([a-z-]+)\/[^\/]+\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3147
|
+
e = e.replace(x, (A, C, R, M, y) => kt(R, M, y));
|
|
3136
3148
|
const $ = new RegExp(`(?<!["'=])(https?:\\/\\/music\\.apple\\.com\\/([a-z]{2})\\/([a-z-]+)\\/[^\\/\\s]+\\/(\\d+))(?!["'])`, "gi");
|
|
3137
|
-
e = e.replace($, (
|
|
3138
|
-
for (let
|
|
3139
|
-
e = e.replace(`__PROTECTED_${
|
|
3149
|
+
e = e.replace($, (A, C, R, M, y) => kt(R, M, y));
|
|
3150
|
+
for (let A = a.length - 1; A >= 0; A--)
|
|
3151
|
+
e = e.replace(`__PROTECTED_${A}__`, a[A]);
|
|
3140
3152
|
return e;
|
|
3141
3153
|
}
|
|
3142
3154
|
function ds(e) {
|
|
@@ -3250,7 +3262,7 @@ function yt(e) {
|
|
|
3250
3262
|
</div>
|
|
3251
3263
|
`;
|
|
3252
3264
|
}
|
|
3253
|
-
function
|
|
3265
|
+
function O(e, t, r = "dark") {
|
|
3254
3266
|
const s = {
|
|
3255
3267
|
track: 152,
|
|
3256
3268
|
album: 352,
|
|
@@ -3287,7 +3299,7 @@ function kt(e, t, r) {
|
|
|
3287
3299
|
</div>
|
|
3288
3300
|
`;
|
|
3289
3301
|
}
|
|
3290
|
-
const
|
|
3302
|
+
const ae = /* @__PURE__ */ new Map(), je = [0.5, 0.75, 1, 1.25, 1.5, 2];
|
|
3291
3303
|
function ps(e = document) {
|
|
3292
3304
|
e.querySelectorAll(".artifactuse-audio-player:not([data-initialized])").forEach((r) => {
|
|
3293
3305
|
fs(r);
|
|
@@ -3307,8 +3319,8 @@ function fs(e) {
|
|
|
3307
3319
|
currentTime: 0,
|
|
3308
3320
|
waveformData: null
|
|
3309
3321
|
};
|
|
3310
|
-
|
|
3311
|
-
b.isPlaying ?
|
|
3322
|
+
ae.set(t, { playerEl: e, audio: a, state: b }), hs(d, t), s == null || s.addEventListener("click", () => {
|
|
3323
|
+
b.isPlaying ? zt(t) : At(t);
|
|
3312
3324
|
}), a.addEventListener("loadedmetadata", () => {
|
|
3313
3325
|
b.duration = a.duration, u.textContent = $t(a.duration);
|
|
3314
3326
|
}), a.addEventListener("timeupdate", () => {
|
|
@@ -3322,26 +3334,26 @@ function fs(e) {
|
|
|
3322
3334
|
}), a.addEventListener("pause", () => {
|
|
3323
3335
|
b.isPlaying = !1, n.style.display = "", o.style.display = "none", e.classList.remove("is-playing");
|
|
3324
3336
|
}), l == null || l.addEventListener("click", (v) => {
|
|
3325
|
-
const
|
|
3326
|
-
isNaN(
|
|
3337
|
+
const x = l.getBoundingClientRect(), C = (v.clientX - x.left) / x.width * a.duration;
|
|
3338
|
+
isNaN(C) || (a.currentTime = C);
|
|
3327
3339
|
}), l == null || l.addEventListener("mousemove", (v) => {
|
|
3328
|
-
const
|
|
3329
|
-
w.style.width = `${
|
|
3340
|
+
const x = l.getBoundingClientRect(), A = (v.clientX - x.left) / x.width * 100;
|
|
3341
|
+
w.style.width = `${A}%`;
|
|
3330
3342
|
}), l == null || l.addEventListener("mouseleave", () => {
|
|
3331
3343
|
w.style.width = "0%";
|
|
3332
3344
|
}), c == null || c.addEventListener("click", () => {
|
|
3333
3345
|
b.isMuted = !b.isMuted, a.muted = b.isMuted, m.style.display = b.isMuted ? "none" : "", h.style.display = b.isMuted ? "" : "none", b.isMuted ? g.value = 0 : g.value = b.volume * 100;
|
|
3334
3346
|
}), g == null || g.addEventListener("input", (v) => {
|
|
3335
|
-
const
|
|
3336
|
-
b.volume =
|
|
3347
|
+
const x = parseInt(v.target.value, 10) / 100;
|
|
3348
|
+
b.volume = x, a.volume = x, x === 0 ? (b.isMuted = !0, m.style.display = "none", h.style.display = "") : (b.isMuted = !1, a.muted = !1, m.style.display = "", h.style.display = "none");
|
|
3337
3349
|
}), f == null || f.addEventListener("click", () => {
|
|
3338
|
-
const
|
|
3339
|
-
b.playbackRate = je[
|
|
3350
|
+
const x = (je.indexOf(b.playbackRate) + 1) % je.length;
|
|
3351
|
+
b.playbackRate = je[x], a.playbackRate = b.playbackRate, f.querySelector("span").textContent = `${b.playbackRate}x`;
|
|
3340
3352
|
}), e.addEventListener("keydown", (v) => {
|
|
3341
3353
|
switch (v.key) {
|
|
3342
3354
|
case " ":
|
|
3343
3355
|
case "k":
|
|
3344
|
-
v.preventDefault(), b.isPlaying ?
|
|
3356
|
+
v.preventDefault(), b.isPlaying ? zt(t) : At(t);
|
|
3345
3357
|
break;
|
|
3346
3358
|
case "ArrowLeft":
|
|
3347
3359
|
v.preventDefault(), a.currentTime = Math.max(0, a.currentTime - 5);
|
|
@@ -3403,25 +3415,25 @@ function $t(e) {
|
|
|
3403
3415
|
const t = Math.floor(e / 3600), r = Math.floor(e % 3600 / 60), a = Math.floor(e % 60);
|
|
3404
3416
|
return t > 0 ? `${t}:${r.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}` : `${r}:${a.toString().padStart(2, "0")}`;
|
|
3405
3417
|
}
|
|
3406
|
-
function
|
|
3407
|
-
const t =
|
|
3418
|
+
function At(e) {
|
|
3419
|
+
const t = ae.get(e);
|
|
3408
3420
|
t && t.audio.play();
|
|
3409
3421
|
}
|
|
3410
|
-
function
|
|
3411
|
-
const t =
|
|
3422
|
+
function zt(e) {
|
|
3423
|
+
const t = ae.get(e);
|
|
3412
3424
|
t && t.audio.pause();
|
|
3413
3425
|
}
|
|
3414
3426
|
function gs(e) {
|
|
3415
|
-
|
|
3427
|
+
ae.forEach((t, r) => {
|
|
3416
3428
|
r !== e && t.state.isPlaying && t.audio.pause();
|
|
3417
3429
|
});
|
|
3418
3430
|
}
|
|
3419
3431
|
function ms(e) {
|
|
3420
|
-
const t =
|
|
3421
|
-
t && (t.audio.pause(), t.audio.src = "",
|
|
3432
|
+
const t = ae.get(e);
|
|
3433
|
+
t && (t.audio.pause(), t.audio.src = "", ae.delete(e));
|
|
3422
3434
|
}
|
|
3423
3435
|
function ws() {
|
|
3424
|
-
|
|
3436
|
+
ae.forEach((e, t) => {
|
|
3425
3437
|
ms(t);
|
|
3426
3438
|
});
|
|
3427
3439
|
}
|
|
@@ -3448,33 +3460,33 @@ function bs(e) {
|
|
|
3448
3460
|
return t.push(St(f)), b;
|
|
3449
3461
|
});
|
|
3450
3462
|
const s = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/place\/([^\/\?"]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3451
|
-
e = e.replace(s, (g, f, b) =>
|
|
3463
|
+
e = e.replace(s, (g, f, b) => Y(decodeURIComponent(b.replace(/\+/g, " "))));
|
|
3452
3464
|
const n = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/place\\/([^\\/\\?\\s]+))(?!["'])`, "gi");
|
|
3453
|
-
e = e.replace(n, (g, f, b) =>
|
|
3465
|
+
e = e.replace(n, (g, f, b) => Y(decodeURIComponent(b.replace(/\+/g, " "))));
|
|
3454
3466
|
const o = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/@([0-9.-]+),([0-9.-]+),([0-9]+)z[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3455
|
-
e = e.replace(o, (g, f, b, v,
|
|
3467
|
+
e = e.replace(o, (g, f, b, v, x) => Ue(b, v, x));
|
|
3456
3468
|
const i = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/@([0-9.-]+),([0-9.-]+),([0-9]+)z)(?!["'])`, "gi");
|
|
3457
|
-
e = e.replace(i, (g, f, b, v,
|
|
3469
|
+
e = e.replace(i, (g, f, b, v, x) => Ue(b, v, x));
|
|
3458
3470
|
const u = /<a[^>]*href="(https?:\/\/maps\.google\.com\/\?q=([^\s"&]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3459
|
-
e = e.replace(u, (g, f, b) =>
|
|
3471
|
+
e = e.replace(u, (g, f, b) => Y(decodeURIComponent(b)));
|
|
3460
3472
|
const l = new RegExp(`(?<!["'=])(https?:\\/\\/maps\\.google\\.com\\/\\?q=([^\\s"&]+))(?!["'])`, "gi");
|
|
3461
|
-
e = e.replace(l, (g, f, b) =>
|
|
3473
|
+
e = e.replace(l, (g, f, b) => Y(decodeURIComponent(b)));
|
|
3462
3474
|
const d = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/search\/([^\/\?"]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3463
|
-
e = e.replace(d, (g, f, b) =>
|
|
3475
|
+
e = e.replace(d, (g, f, b) => Y(decodeURIComponent(b.replace(/\+/g, " "))));
|
|
3464
3476
|
const p = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/search\\/([^\\/\\?\\s]+))(?!["'])`, "gi");
|
|
3465
|
-
e = e.replace(p, (g, f, b) =>
|
|
3477
|
+
e = e.replace(p, (g, f, b) => Y(decodeURIComponent(b.replace(/\+/g, " "))));
|
|
3466
3478
|
const w = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/search\/\?[^"]*query=([^"&]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3467
|
-
e = e.replace(w, (g, f, b) =>
|
|
3479
|
+
e = e.replace(w, (g, f, b) => Y(decodeURIComponent(b.replace(/\+/g, " "))));
|
|
3468
3480
|
const c = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/search\\/\\?[^\\s"]*query=([^\\s"&]+))(?!["'])`, "gi");
|
|
3469
|
-
e = e.replace(c, (g, f, b) =>
|
|
3481
|
+
e = e.replace(c, (g, f, b) => Y(decodeURIComponent(b.replace(/\+/g, " "))));
|
|
3470
3482
|
const m = /<a[^>]*href="(https?:\/\/(?:www\.)?openstreetmap\.org\/[^"]*mlat=([0-9.-]+)[^"]*mlon=([0-9.-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3471
3483
|
e = e.replace(m, (g, f, b, v) => {
|
|
3472
|
-
const
|
|
3484
|
+
const x = f.match(/#map=(\d+)/), $ = x ? x[1] : 15;
|
|
3473
3485
|
return Ct(b, v, $);
|
|
3474
3486
|
});
|
|
3475
3487
|
const h = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?openstreetmap\\.org\\/[^\\s]*mlat=([0-9.-]+)[^\\s]*mlon=([0-9.-]+))(?!["'])`, "gi");
|
|
3476
3488
|
e = e.replace(h, (g, f, b, v) => {
|
|
3477
|
-
const
|
|
3489
|
+
const x = f.match(/#map=(\d+)/), $ = x ? x[1] : 15;
|
|
3478
3490
|
return Ct(b, v, $);
|
|
3479
3491
|
});
|
|
3480
3492
|
for (let g = t.length - 1; g >= 0; g--)
|
|
@@ -3509,7 +3521,7 @@ function St(e) {
|
|
|
3509
3521
|
</div>
|
|
3510
3522
|
`;
|
|
3511
3523
|
}
|
|
3512
|
-
function
|
|
3524
|
+
function Y(e) {
|
|
3513
3525
|
const t = encodeURIComponent(e);
|
|
3514
3526
|
return `
|
|
3515
3527
|
<div class="artifactuse-map-wrapper">
|
|
@@ -3571,37 +3583,37 @@ function Ct(e, t, r = 15) {
|
|
|
3571
3583
|
}
|
|
3572
3584
|
function vs(e, t = {}) {
|
|
3573
3585
|
const r = t.theme || "dark", a = /<a[^>]*href="(https?:\/\/(?:www\.)?(?:twitter\.com|x\.com)\/([a-zA-Z0-9_]+)\/status\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3574
|
-
e = e.replace(a, (v,
|
|
3586
|
+
e = e.replace(a, (v, x, $, A) => Rt($, A, r));
|
|
3575
3587
|
const s = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?(?:twitter\\.com|x\\.com)\\/([a-zA-Z0-9_]+)\\/status\\/(\\d+))(?!["'])`, "gi");
|
|
3576
|
-
e = e.replace(s, (v,
|
|
3588
|
+
e = e.replace(s, (v, x, $, A) => Rt($, A, r));
|
|
3577
3589
|
const n = /<a[^>]*href="(https?:\/\/(?:www\.)?instagram\.com\/p\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3578
|
-
e = e.replace(n, (v,
|
|
3590
|
+
e = e.replace(n, (v, x, $) => Lt($));
|
|
3579
3591
|
const o = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?instagram\\.com\\/p\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
|
|
3580
|
-
e = e.replace(o, (v,
|
|
3592
|
+
e = e.replace(o, (v, x, $) => Lt($));
|
|
3581
3593
|
const i = /<a[^>]*href="(https?:\/\/(?:www\.)?instagram\.com\/reel\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3582
|
-
e = e.replace(i, (v,
|
|
3594
|
+
e = e.replace(i, (v, x, $) => Tt($));
|
|
3583
3595
|
const u = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?instagram\\.com\\/reel\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
|
|
3584
|
-
e = e.replace(u, (v,
|
|
3596
|
+
e = e.replace(u, (v, x, $) => Tt($));
|
|
3585
3597
|
const l = /<a[^>]*href="(https?:\/\/(?:www\.)?tiktok\.com\/@([a-zA-Z0-9_.]+)\/video\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3586
|
-
e = e.replace(l, (v,
|
|
3598
|
+
e = e.replace(l, (v, x, $, A) => _t(A));
|
|
3587
3599
|
const d = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?tiktok\\.com\\/@([a-zA-Z0-9_.]+)\\/video\\/(\\d+))(?!["'])`, "gi");
|
|
3588
|
-
e = e.replace(d, (v,
|
|
3600
|
+
e = e.replace(d, (v, x, $, A) => _t(A));
|
|
3589
3601
|
const p = /<a[^>]*href="(https?:\/\/(?:www\.)?linkedin\.com\/(?:posts|feed\/update)\/([a-zA-Z0-9_:-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3590
|
-
e = e.replace(p, (v,
|
|
3602
|
+
e = e.replace(p, (v, x, $) => Et($, x));
|
|
3591
3603
|
const w = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?linkedin\\.com\\/(?:posts|feed\\/update)\\/([a-zA-Z0-9_:-]+))(?!["'])`, "gi");
|
|
3592
|
-
e = e.replace(w, (v,
|
|
3604
|
+
e = e.replace(w, (v, x, $) => Et($, x));
|
|
3593
3605
|
const c = /<a[^>]*href="(https?:\/\/(?:www\.)?reddit\.com\/r\/([a-zA-Z0-9_]+)\/comments\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3594
|
-
e = e.replace(c, (v,
|
|
3606
|
+
e = e.replace(c, (v, x, $, A) => Pt($, A, x));
|
|
3595
3607
|
const m = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?reddit\\.com\\/r\\/([a-zA-Z0-9_]+)\\/comments\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
3596
|
-
e = e.replace(m, (v,
|
|
3608
|
+
e = e.replace(m, (v, x, $, A) => Pt($, A, x));
|
|
3597
3609
|
const h = /<a[^>]*href="(https?:\/\/(?:www\.)?facebook\.com\/[a-zA-Z0-9.]+\/posts\/\d+[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3598
|
-
e = e.replace(h, (v,
|
|
3610
|
+
e = e.replace(h, (v, x) => jt(x));
|
|
3599
3611
|
const g = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?facebook\\.com\\/[a-zA-Z0-9.]+\\/posts\\/\\d+)(?!["'])`, "gi");
|
|
3600
|
-
e = e.replace(g, (v,
|
|
3612
|
+
e = e.replace(g, (v, x) => jt(x));
|
|
3601
3613
|
const f = /<a[^>]*href="(https?:\/\/(?:www\.)?pinterest\.com\/pin\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3602
|
-
e = e.replace(f, (v,
|
|
3614
|
+
e = e.replace(f, (v, x, $) => Ht($));
|
|
3603
3615
|
const b = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?pinterest\\.com\\/pin\\/(\\d+))(?!["'])`, "gi");
|
|
3604
|
-
return e = e.replace(b, (v,
|
|
3616
|
+
return e = e.replace(b, (v, x, $) => Ht($)), e;
|
|
3605
3617
|
}
|
|
3606
3618
|
function Rt(e, t, r = "dark") {
|
|
3607
3619
|
return `
|
|
@@ -3743,23 +3755,23 @@ function Vt(e) {
|
|
|
3743
3755
|
}
|
|
3744
3756
|
function ks(e) {
|
|
3745
3757
|
const t = /<a[^>]*href="(https?:\/\/docs\.google\.com\/document\/d\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3746
|
-
e = e.replace(t, (l, d, p) =>
|
|
3758
|
+
e = e.replace(t, (l, d, p) => ie(p, "document"));
|
|
3747
3759
|
const r = new RegExp(`(?<!["'=])(https?:\\/\\/docs\\.google\\.com\\/document\\/d\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
|
|
3748
|
-
e = e.replace(r, (l, d, p) =>
|
|
3760
|
+
e = e.replace(r, (l, d, p) => ie(p, "document"));
|
|
3749
3761
|
const a = /<a[^>]*href="(https?:\/\/docs\.google\.com\/spreadsheets\/d\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3750
|
-
e = e.replace(a, (l, d, p) =>
|
|
3762
|
+
e = e.replace(a, (l, d, p) => ie(p, "spreadsheets"));
|
|
3751
3763
|
const s = new RegExp(`(?<!["'=])(https?:\\/\\/docs\\.google\\.com\\/spreadsheets\\/d\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
|
|
3752
|
-
e = e.replace(s, (l, d, p) =>
|
|
3764
|
+
e = e.replace(s, (l, d, p) => ie(p, "spreadsheets"));
|
|
3753
3765
|
const n = /<a[^>]*href="(https?:\/\/docs\.google\.com\/presentation\/d\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3754
|
-
e = e.replace(n, (l, d, p) =>
|
|
3766
|
+
e = e.replace(n, (l, d, p) => ie(p, "presentation"));
|
|
3755
3767
|
const o = new RegExp(`(?<!["'=])(https?:\\/\\/docs\\.google\\.com\\/presentation\\/d\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
|
|
3756
|
-
e = e.replace(o, (l, d, p) =>
|
|
3768
|
+
e = e.replace(o, (l, d, p) => ie(p, "presentation"));
|
|
3757
3769
|
const i = /<a[^>]*href="(https?:\/\/docs\.google\.com\/forms\/d\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
3758
3770
|
e = e.replace(i, (l, d, p) => It(p));
|
|
3759
3771
|
const u = new RegExp(`(?<!["'=])(https?:\\/\\/docs\\.google\\.com\\/forms\\/d\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
|
|
3760
3772
|
return e = e.replace(u, (l, d, p) => It(p)), e;
|
|
3761
3773
|
}
|
|
3762
|
-
function
|
|
3774
|
+
function ie(e, t) {
|
|
3763
3775
|
const r = {
|
|
3764
3776
|
document: "Google Doc",
|
|
3765
3777
|
spreadsheets: "Google Sheet",
|
|
@@ -3939,7 +3951,7 @@ function Nt(e, t, r = "dark") {
|
|
|
3939
3951
|
</div>
|
|
3940
3952
|
`;
|
|
3941
3953
|
}
|
|
3942
|
-
function
|
|
3954
|
+
function As(e) {
|
|
3943
3955
|
const t = /<a[^>]*href="(https?:\/\/public\.tableau\.com\/(?:views|profile)\/([^\s"]+))"[^>]*>[^<]*<\/a>/gi;
|
|
3944
3956
|
e = e.replace(t, (l, d, p) => Ut(p));
|
|
3945
3957
|
const r = new RegExp(`(?<!["'=])(https?:\\/\\/public\\.tableau\\.com\\/(?:views|profile)\\/([^\\s<>"]+))(?!["'])`, "gi");
|
|
@@ -4006,7 +4018,7 @@ function Xt(e) {
|
|
|
4006
4018
|
</div>
|
|
4007
4019
|
`;
|
|
4008
4020
|
}
|
|
4009
|
-
function
|
|
4021
|
+
function zs(e, t = {}) {
|
|
4010
4022
|
const r = t.theme || "dark", a = /<a[^>]*href="(https?:\/\/sketchfab\.com\/(?:3d-)?models\/([a-zA-Z0-9-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
4011
4023
|
e = e.replace(a, (h, g, f) => Kt(f, r));
|
|
4012
4024
|
const s = new RegExp(`(?<!["'=])(https?:\\/\\/sketchfab\\.com\\/(?:3d-)?models\\/([a-zA-Z0-9-]+))(?!["'])`, "gi");
|
|
@@ -4122,25 +4134,25 @@ function Ss(e, t = {}) {
|
|
|
4122
4134
|
const s = new RegExp(`(?<!["'=])(https?:\\/\\/(?:[a-zA-Z0-9-]+\\.)?typeform\\.com\\/to\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
|
|
4123
4135
|
e = e.replace(s, (f, b, v) => rr(v));
|
|
4124
4136
|
const n = /<a[^>]*href="(https?:\/\/calendly\.com\/([a-zA-Z0-9_-]+)(?:\/([a-zA-Z0-9_-]+))?[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
4125
|
-
e = e.replace(n, (f, b, v,
|
|
4137
|
+
e = e.replace(n, (f, b, v, x) => ar(v, x));
|
|
4126
4138
|
const o = new RegExp(`(?<!["'=])(https?:\\/\\/calendly\\.com\\/([a-zA-Z0-9_-]+)(?:\\/([a-zA-Z0-9_-]+))?)(?!["'])`, "gi");
|
|
4127
|
-
e = e.replace(o, (f, b, v,
|
|
4139
|
+
e = e.replace(o, (f, b, v, x) => ar(v, x));
|
|
4128
4140
|
const i = /<a[^>]*href="(https?:\/\/calendar\.google\.com\/calendar\/appointments\/schedules\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
4129
4141
|
e = e.replace(i, (f, b, v) => sr(v));
|
|
4130
4142
|
const u = new RegExp(`(?<!["'=])(https?:\\/\\/calendar\\.google\\.com\\/calendar\\/appointments\\/schedules\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
|
|
4131
4143
|
e = e.replace(u, (f, b, v) => sr(v));
|
|
4132
4144
|
const l = /<a[^>]*href="(https?:\/\/cal\.com\/([a-zA-Z0-9_-]+)(?:\/([a-zA-Z0-9_-]+))?[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
4133
|
-
e = e.replace(l, (f, b, v,
|
|
4145
|
+
e = e.replace(l, (f, b, v, x) => nr(v, x, r));
|
|
4134
4146
|
const d = new RegExp(`(?<!["'=])(https?:\\/\\/cal\\.com\\/([a-zA-Z0-9_-]+)(?:\\/([a-zA-Z0-9_-]+))?)(?!["'])`, "gi");
|
|
4135
|
-
e = e.replace(d, (f, b, v,
|
|
4147
|
+
e = e.replace(d, (f, b, v, x) => nr(v, x, r));
|
|
4136
4148
|
const p = /<a[^>]*href="(https?:\/\/(?:www\.)?notion\.so\/([a-zA-Z0-9-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
4137
4149
|
e = e.replace(p, (f, b, v) => ir(v));
|
|
4138
4150
|
const w = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?notion\\.so\\/([a-zA-Z0-9-]+))(?!["'])`, "gi");
|
|
4139
4151
|
e = e.replace(w, (f, b, v) => ir(v));
|
|
4140
4152
|
const c = /<a[^>]*href="(https?:\/\/airtable\.com\/(?:embed\/)?([a-zA-Z0-9]+)(?:\/([a-zA-Z0-9]+))?[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
4141
|
-
e = e.replace(c, (f, b, v,
|
|
4153
|
+
e = e.replace(c, (f, b, v, x) => or(v, x));
|
|
4142
4154
|
const m = new RegExp(`(?<!["'=])(https?:\\/\\/airtable\\.com\\/(?:embed\\/)?([a-zA-Z0-9]+)(?:\\/([a-zA-Z0-9]+))?)(?!["'])`, "gi");
|
|
4143
|
-
e = e.replace(m, (f, b, v,
|
|
4155
|
+
e = e.replace(m, (f, b, v, x) => or(v, x));
|
|
4144
4156
|
const h = /<a[^>]*href="(https?:\/\/miro\.com\/app\/board\/([a-zA-Z0-9_=-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
|
|
4145
4157
|
e = e.replace(h, (f, b, v) => lr(v));
|
|
4146
4158
|
const g = new RegExp(`(?<!["'=])(https?:\\/\\/miro\\.com\\/app\\/board\\/([a-zA-Z0-9_=-]+))(?!["'])`, "gi");
|
|
@@ -4225,7 +4237,7 @@ function lr(e) {
|
|
|
4225
4237
|
</div>
|
|
4226
4238
|
`;
|
|
4227
4239
|
}
|
|
4228
|
-
let
|
|
4240
|
+
let ee = null, Se = !1, nt = !1;
|
|
4229
4241
|
function Cr(e) {
|
|
4230
4242
|
const t = /<pre><code class="language-mermaid">([\s\S]*?)<\/code><\/pre>/gi;
|
|
4231
4243
|
return e = e.replace(t, (r, a) => {
|
|
@@ -4329,19 +4341,19 @@ function Ge(e) {
|
|
|
4329
4341
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
4330
4342
|
}
|
|
4331
4343
|
function Ts() {
|
|
4332
|
-
return
|
|
4344
|
+
return ee || (typeof mermaid < "u" ? Promise.resolve() : (ee = new Promise((e, t) => {
|
|
4333
4345
|
const r = setTimeout(() => {
|
|
4334
|
-
|
|
4346
|
+
ee = null, t(new Error("Mermaid loading timed out after 15 seconds"));
|
|
4335
4347
|
}, 15e3), a = document.createElement("script");
|
|
4336
4348
|
a.src = "https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js", a.crossOrigin = "anonymous", a.onload = () => {
|
|
4337
4349
|
clearTimeout(r), console.log("Mermaid script loaded successfully"), e();
|
|
4338
4350
|
}, a.onerror = (s) => {
|
|
4339
|
-
clearTimeout(r),
|
|
4351
|
+
clearTimeout(r), ee = null, console.error("Mermaid script failed to load:", s), t(new Error("Failed to load Mermaid script from CDN"));
|
|
4340
4352
|
}, document.head.appendChild(a);
|
|
4341
|
-
}),
|
|
4353
|
+
}), ee));
|
|
4342
4354
|
}
|
|
4343
4355
|
function rn() {
|
|
4344
|
-
|
|
4356
|
+
ee = null, Se = !1, nt = !1;
|
|
4345
4357
|
}
|
|
4346
4358
|
function an() {
|
|
4347
4359
|
return typeof mermaid < "u";
|
|
@@ -4530,7 +4542,7 @@ function qs() {
|
|
|
4530
4542
|
});
|
|
4531
4543
|
});
|
|
4532
4544
|
}
|
|
4533
|
-
let
|
|
4545
|
+
let te = null, Re = !1;
|
|
4534
4546
|
function _r(e) {
|
|
4535
4547
|
return e = Zs(e), e = e.replace(/\$\$([\s\S]*?)\$\$/g, (t, r) => fe(r.trim(), !0)), e = e.replace(/\\\[([\s\S]*?)\\\]/g, (t, r) => fe(r.trim(), !0)), e = e.replace(new RegExp("(?<!\\$)\\$(?!\\$)((?:[^$\\\\]|\\\\.)+?)\\$(?!\\$)", "g"), (t, r) => fe(r.trim(), !1)), e = e.replace(/\\\(([\s\S]*?)\\\)/g, (t, r) => fe(r.trim(), !1)), e;
|
|
4536
4548
|
}
|
|
@@ -4604,9 +4616,9 @@ function We(e) {
|
|
|
4604
4616
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
4605
4617
|
}
|
|
4606
4618
|
function Ns() {
|
|
4607
|
-
return
|
|
4619
|
+
return te || (typeof katex < "u" ? Promise.resolve() : (te = new Promise((e, t) => {
|
|
4608
4620
|
const r = setTimeout(() => {
|
|
4609
|
-
|
|
4621
|
+
te = null, t(new Error("KaTeX loading timed out after 10 seconds"));
|
|
4610
4622
|
}, 1e4), a = document.createElement("link");
|
|
4611
4623
|
a.rel = "stylesheet", a.href = "https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css", a.crossOrigin = "anonymous", a.onerror = () => {
|
|
4612
4624
|
console.warn("KaTeX CSS failed to load, math may not render correctly");
|
|
@@ -4615,12 +4627,12 @@ function Ns() {
|
|
|
4615
4627
|
s.src = "https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.js", s.crossOrigin = "anonymous", s.onload = () => {
|
|
4616
4628
|
clearTimeout(r), console.log("KaTeX script loaded successfully"), e();
|
|
4617
4629
|
}, s.onerror = (n) => {
|
|
4618
|
-
clearTimeout(r),
|
|
4630
|
+
clearTimeout(r), te = null, console.error("KaTeX script failed to load:", n), t(new Error("Failed to load KaTeX script from CDN"));
|
|
4619
4631
|
}, document.head.appendChild(s);
|
|
4620
|
-
}),
|
|
4632
|
+
}), te));
|
|
4621
4633
|
}
|
|
4622
4634
|
function cn() {
|
|
4623
|
-
|
|
4635
|
+
te = null, Re = !1;
|
|
4624
4636
|
}
|
|
4625
4637
|
function un() {
|
|
4626
4638
|
return typeof katex < "u";
|
|
@@ -4786,7 +4798,7 @@ function Gs() {
|
|
|
4786
4798
|
return o ? `<pre><code class="language-${ke(o)}">${i}</code></pre>` : `<pre><code>${i}</code></pre>`;
|
|
4787
4799
|
}
|
|
4788
4800
|
};
|
|
4789
|
-
|
|
4801
|
+
V.use({
|
|
4790
4802
|
renderer: {
|
|
4791
4803
|
...e,
|
|
4792
4804
|
...t,
|
|
@@ -5009,37 +5021,37 @@ function Ks(e, t) {
|
|
|
5009
5021
|
}
|
|
5010
5022
|
function bn(e = {}) {
|
|
5011
5023
|
const t = Ir(Ws, e), r = ta(), a = { ...Hr, ...t.panels }, s = Xs(a, t.cdnUrl), n = ra(s), o = na(t.theme, t.colors || {}), i = Ks(t, n), u = pa(t.sharing), l = fa(t.editor);
|
|
5012
|
-
function d(k, _,
|
|
5013
|
-
let
|
|
5014
|
-
const D = [],
|
|
5024
|
+
function d(k, _, L = {}) {
|
|
5025
|
+
let S = V.parse(k);
|
|
5026
|
+
const D = [], E = { theme: o.resolved }, Z = L.inlinePreview ?? t.inlinePreview ?? null, ne = L.inlineCode ?? t.inlineCode ?? null, oe = L.tabs ?? t.tabs ?? null, G = L.viewMode ?? t.viewMode ?? null;
|
|
5015
5027
|
if (t.processors.codeBlocks) {
|
|
5016
|
-
const
|
|
5028
|
+
const B = ea(S, _, {
|
|
5017
5029
|
...t.codeExtraction,
|
|
5018
5030
|
inlinePreview: Z,
|
|
5019
5031
|
inlineCode: ne,
|
|
5020
|
-
tabs:
|
|
5021
|
-
viewMode:
|
|
5032
|
+
tabs: oe,
|
|
5033
|
+
viewMode: G
|
|
5022
5034
|
});
|
|
5023
|
-
|
|
5035
|
+
S = B.html, D.push(...B.artifacts);
|
|
5024
5036
|
}
|
|
5025
|
-
return t.processors.images && (
|
|
5026
|
-
r.addArtifact(
|
|
5037
|
+
return t.processors.images && (S = Qa(S)), t.processors.imageGalleries && (S = Ya(S)), t.processors.videos && (S = as(S)), t.processors.videoGalleries && (S = os(S)), t.processors.audio && (S = us(S, E)), t.processors.maps && (S = bs(S)), t.processors.social && (S = vs(S, E)), t.processors.documents && (S = ys(S), S = ks(S), S = xs(S)), t.processors.codeEmbeds && (S = $s(S, E)), t.processors.dataViz && (S = As(S)), t.processors.design && (S = zs(S, E)), t.processors.interactive && (S = Ss(S, E)), t.processors.tables && (S = _s(S)), t.processors.math && (S = _r(S)), t.processors.mermaid && (S = Cr(S)), D.forEach((B) => {
|
|
5038
|
+
r.addArtifact(B);
|
|
5027
5039
|
}), {
|
|
5028
|
-
html:
|
|
5040
|
+
html: S,
|
|
5029
5041
|
artifacts: D
|
|
5030
5042
|
};
|
|
5031
5043
|
}
|
|
5032
5044
|
async function p(k = document) {
|
|
5033
|
-
const _ = [],
|
|
5034
|
-
t.processors.math && _.push(Pr()), t.processors.mermaid && _.push(Tr(
|
|
5035
|
-
var
|
|
5036
|
-
const Z =
|
|
5045
|
+
const _ = [], L = { theme: o.resolved };
|
|
5046
|
+
t.processors.math && _.push(Pr()), t.processors.mermaid && _.push(Tr(L)), t.processors.tables && qs(), t.processors.audio && ps(k), t.syntaxHighlight && (jr(k), (k === document ? document : k).querySelectorAll(".artifactuse-inline-preview[data-smartdiff]").forEach((E) => {
|
|
5047
|
+
var G;
|
|
5048
|
+
const Z = E.querySelector("code");
|
|
5037
5049
|
if (!Z || Z.dataset.smartdiffProcessed) return;
|
|
5038
|
-
const ne = ((
|
|
5050
|
+
const ne = ((G = E.dataset.smartdiffMarkers) == null ? void 0 : G.split(",")) || [], oe = Z.innerHTML.split(`
|
|
5039
5051
|
`);
|
|
5040
|
-
Z.innerHTML =
|
|
5041
|
-
const
|
|
5042
|
-
return
|
|
5052
|
+
Z.innerHTML = oe.map((B, be) => {
|
|
5053
|
+
const Q = ne[be];
|
|
5054
|
+
return Q === "-" ? `<span class="token deleted">${B}</span>` : Q === "+" ? `<span class="token inserted">${B}</span>` : B;
|
|
5043
5055
|
}).join(`
|
|
5044
5056
|
`), Z.dataset.smartdiffProcessed = "true";
|
|
5045
5057
|
})), await Promise.all(_);
|
|
@@ -5049,96 +5061,99 @@ function bn(e = {}) {
|
|
|
5049
5061
|
console.warn("Attempted to open inline artifact in panel:", k.id);
|
|
5050
5062
|
return;
|
|
5051
5063
|
}
|
|
5052
|
-
t.multiTab ? r.openTab(k.id) : r.setActiveArtifact(k.id), r.setPanelOpen(!0), k.viewMode && r.setViewMode(k.viewMode),
|
|
5064
|
+
t.multiTab ? r.openTab(k.id) : r.setActiveArtifact(k.id), r.setForceEmptyView(!1), r.setPanelOpen(!0), k.viewMode && r.setViewMode(k.viewMode), T("artifact:opened", k);
|
|
5053
5065
|
}
|
|
5054
|
-
function c(k, _,
|
|
5055
|
-
const
|
|
5056
|
-
return m(_, D, { ...
|
|
5066
|
+
function c(k, _, L = {}) {
|
|
5067
|
+
const S = k.split(".").pop(), D = L.language || Nr(S) || S, E = L.title || k;
|
|
5068
|
+
return m(_, D, { ...L, title: E });
|
|
5057
5069
|
}
|
|
5058
|
-
function m(k, _,
|
|
5059
|
-
const
|
|
5060
|
-
return
|
|
5070
|
+
function m(k, _, L = {}) {
|
|
5071
|
+
const S = L.messageId || Br("open"), D = A({ type: _, language: _ }) ? _ : "txt", E = Me(k, D, S, 0);
|
|
5072
|
+
return E.title = L.title || E.title, E.isInline = !1, E.editorLanguage = _, L.tabs && (E.tabs = L.tabs), L.panelUrl && (E.panelUrl = L.panelUrl), r.addArtifact(E), w(E), L.viewMode ? r.setViewMode(L.viewMode) : L.tabs && r.setViewMode(L.tabs[0]), E;
|
|
5061
5073
|
}
|
|
5062
|
-
function h(k, _,
|
|
5063
|
-
const
|
|
5074
|
+
function h(k, _, L = {}) {
|
|
5075
|
+
const S = typeof k == "string" ? k : k == null ? void 0 : k.id, D = r.getArtifact(S);
|
|
5064
5076
|
if (!D) return null;
|
|
5065
|
-
const
|
|
5066
|
-
return
|
|
5077
|
+
const E = { ...D, code: _, _refreshToken: Date.now() };
|
|
5078
|
+
return L.title !== void 0 && (E.title = L.title), L.tabs !== void 0 && (E.tabs = L.tabs), L.panelUrl !== void 0 && (E.panelUrl = L.panelUrl), r.addArtifact(E), T("artifact:updated", { artifactId: S, artifact: r.getArtifact(S) }), r.getArtifact(S);
|
|
5067
5079
|
}
|
|
5068
5080
|
function g() {
|
|
5069
|
-
r.
|
|
5081
|
+
r.clearActiveArtifact(), r.setForceEmptyView(!0), r.setPanelOpen(!0), T("panel:opened");
|
|
5070
5082
|
}
|
|
5071
5083
|
function f() {
|
|
5072
|
-
|
|
5073
|
-
r.clearActiveArtifact(), r.setPanelOpen(k), k || r.setFullscreen(!1), L("panel:toggled", { isOpen: k });
|
|
5084
|
+
r.setPanelOpen(!1), r.setFullscreen(!1), T("panel:closed");
|
|
5074
5085
|
}
|
|
5075
5086
|
function b() {
|
|
5087
|
+
const k = !r.getState().isPanelOpen;
|
|
5088
|
+
r.clearActiveArtifact(), r.setPanelOpen(k), k || r.setFullscreen(!1), T("panel:toggled", { isOpen: k });
|
|
5089
|
+
}
|
|
5090
|
+
function v() {
|
|
5076
5091
|
const k = !r.getState().isFullscreen;
|
|
5077
|
-
r.setFullscreen(k),
|
|
5092
|
+
r.setFullscreen(k), T("fullscreen:toggled", { isFullscreen: k });
|
|
5078
5093
|
}
|
|
5079
|
-
function
|
|
5080
|
-
r.setViewMode(k),
|
|
5094
|
+
function x(k) {
|
|
5095
|
+
r.setViewMode(k), T("viewMode:changed", { mode: k });
|
|
5081
5096
|
}
|
|
5082
|
-
function
|
|
5097
|
+
function $(k, _ = {}) {
|
|
5083
5098
|
if (!k) return null;
|
|
5084
5099
|
if (k.panelUrl) return k.panelUrl;
|
|
5085
|
-
const { type:
|
|
5100
|
+
const { type: L, language: S } = k, D = {
|
|
5086
5101
|
theme: _.theme || o.resolved
|
|
5087
|
-
},
|
|
5088
|
-
|
|
5089
|
-
let Z = i.resolve(
|
|
5090
|
-
return !Z &&
|
|
5102
|
+
}, E = o.colors;
|
|
5103
|
+
E != null && E.primary && (D.accent = E.primary);
|
|
5104
|
+
let Z = i.resolve(L, D);
|
|
5105
|
+
return !Z && S && (Z = i.resolve(S, D)), Z;
|
|
5091
5106
|
}
|
|
5092
|
-
function
|
|
5107
|
+
function A(k) {
|
|
5093
5108
|
return k ? i.has(k.type) || i.has(k.language) : !1;
|
|
5094
5109
|
}
|
|
5095
|
-
function
|
|
5110
|
+
function C(k, _) {
|
|
5096
5111
|
i.register(k, _);
|
|
5097
5112
|
}
|
|
5098
|
-
function
|
|
5113
|
+
function R(k) {
|
|
5099
5114
|
i.unregister(k);
|
|
5100
5115
|
}
|
|
5101
|
-
function
|
|
5116
|
+
function M() {
|
|
5102
5117
|
return i.getTypes();
|
|
5103
5118
|
}
|
|
5104
|
-
function
|
|
5119
|
+
function y(k, _) {
|
|
5105
5120
|
n.send(k, _);
|
|
5106
5121
|
}
|
|
5107
|
-
const
|
|
5108
|
-
function
|
|
5109
|
-
return
|
|
5110
|
-
var
|
|
5111
|
-
(
|
|
5122
|
+
const z = /* @__PURE__ */ new Map();
|
|
5123
|
+
function H(k, _) {
|
|
5124
|
+
return z.has(k) || z.set(k, /* @__PURE__ */ new Set()), z.get(k).add(_), () => {
|
|
5125
|
+
var L;
|
|
5126
|
+
(L = z.get(k)) == null || L.delete(_);
|
|
5112
5127
|
};
|
|
5113
5128
|
}
|
|
5114
|
-
function
|
|
5115
|
-
var
|
|
5116
|
-
(
|
|
5129
|
+
function P(k, _) {
|
|
5130
|
+
var L;
|
|
5131
|
+
(L = z.get(k)) == null || L.delete(_);
|
|
5117
5132
|
}
|
|
5118
|
-
function
|
|
5119
|
-
var
|
|
5120
|
-
(
|
|
5133
|
+
function T(k, _) {
|
|
5134
|
+
var L;
|
|
5135
|
+
(L = z.get(k)) == null || L.forEach((S) => {
|
|
5121
5136
|
try {
|
|
5122
|
-
|
|
5137
|
+
S(_);
|
|
5123
5138
|
} catch (D) {
|
|
5124
5139
|
console.error(`Artifactuse event handler error (${k}):`, D);
|
|
5125
5140
|
}
|
|
5126
5141
|
});
|
|
5127
5142
|
}
|
|
5128
|
-
n.on("ai:request", (k) =>
|
|
5129
|
-
k != null && k.artifactId && (k == null ? void 0 : k.code) !== void 0 && h(k.artifactId, k.code),
|
|
5143
|
+
n.on("ai:request", (k) => T("ai:request", k)), n.on("save:request", (k) => T("save:request", k)), n.on("export:complete", (k) => T("export:complete", k)), n.on("form:submit", (k) => T("form:submit", k)), n.on("form:cancel", (k) => T("form:cancel", k)), n.on("form:step", (k) => T("form:step", k)), n.on("social:copy", (k) => T("social:copy", k)), n.on("edit:save", (k) => {
|
|
5144
|
+
k != null && k.artifactId && (k == null ? void 0 : k.code) !== void 0 && h(k.artifactId, k.code), T("edit:save", k);
|
|
5130
5145
|
});
|
|
5131
|
-
function
|
|
5146
|
+
function W() {
|
|
5132
5147
|
o.apply();
|
|
5133
5148
|
}
|
|
5134
|
-
function
|
|
5149
|
+
function K(k) {
|
|
5135
5150
|
o.set(k);
|
|
5136
5151
|
}
|
|
5137
|
-
function
|
|
5152
|
+
function U() {
|
|
5138
5153
|
return o.resolved;
|
|
5139
5154
|
}
|
|
5140
|
-
function
|
|
5141
|
-
n.destroy(),
|
|
5155
|
+
function J() {
|
|
5156
|
+
n.destroy(), z.clear(), r.clear(), ws();
|
|
5142
5157
|
}
|
|
5143
5158
|
return {
|
|
5144
5159
|
// Config
|
|
@@ -5155,32 +5170,33 @@ function bn(e = {}) {
|
|
|
5155
5170
|
openFile: c,
|
|
5156
5171
|
openCode: m,
|
|
5157
5172
|
updateFile: h,
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5173
|
+
openPanel: g,
|
|
5174
|
+
closePanel: f,
|
|
5175
|
+
togglePanel: b,
|
|
5176
|
+
toggleFullscreen: v,
|
|
5177
|
+
setViewMode: x,
|
|
5178
|
+
getPanelUrl: $,
|
|
5179
|
+
sendToPanel: y,
|
|
5164
5180
|
// Multi-tab
|
|
5165
5181
|
closeTab: (k) => r.closeTab(k),
|
|
5166
5182
|
closeOtherTabs: (k) => r.closeOtherTabs(k),
|
|
5167
5183
|
closeAllTabs: () => r.closeAllTabs(),
|
|
5168
5184
|
// Panel management (new)
|
|
5169
|
-
hasPanel:
|
|
5170
|
-
registerPanel:
|
|
5171
|
-
unregisterPanel:
|
|
5172
|
-
getPanelTypes:
|
|
5185
|
+
hasPanel: A,
|
|
5186
|
+
registerPanel: C,
|
|
5187
|
+
unregisterPanel: R,
|
|
5188
|
+
getPanelTypes: M,
|
|
5173
5189
|
panelResolver: i,
|
|
5174
5190
|
// Expose for advanced use
|
|
5175
5191
|
// Theme
|
|
5176
5192
|
theme: o,
|
|
5177
|
-
applyTheme:
|
|
5178
|
-
setTheme:
|
|
5179
|
-
getTheme:
|
|
5193
|
+
applyTheme: W,
|
|
5194
|
+
setTheme: K,
|
|
5195
|
+
getTheme: U,
|
|
5180
5196
|
// Events
|
|
5181
|
-
on:
|
|
5182
|
-
off:
|
|
5183
|
-
emit:
|
|
5197
|
+
on: H,
|
|
5198
|
+
off: P,
|
|
5199
|
+
emit: T,
|
|
5184
5200
|
// Editor (CodeMirror integration)
|
|
5185
5201
|
editor: l,
|
|
5186
5202
|
// Bridge (for advanced use)
|
|
@@ -5188,7 +5204,7 @@ function bn(e = {}) {
|
|
|
5188
5204
|
// Sharing
|
|
5189
5205
|
share: u,
|
|
5190
5206
|
// Cleanup
|
|
5191
|
-
destroy:
|
|
5207
|
+
destroy: J
|
|
5192
5208
|
};
|
|
5193
5209
|
}
|
|
5194
5210
|
function Ir(e, t, r = /* @__PURE__ */ new WeakSet()) {
|
|
@@ -5230,12 +5246,12 @@ export {
|
|
|
5230
5246
|
us as F,
|
|
5231
5247
|
vt as G,
|
|
5232
5248
|
yt as H,
|
|
5233
|
-
|
|
5249
|
+
O as I,
|
|
5234
5250
|
kt as J,
|
|
5235
5251
|
ps as K,
|
|
5236
5252
|
ws as L,
|
|
5237
5253
|
bs as M,
|
|
5238
|
-
|
|
5254
|
+
Y as N,
|
|
5239
5255
|
Ue as O,
|
|
5240
5256
|
Ct as P,
|
|
5241
5257
|
vs as Q,
|
|
@@ -5251,7 +5267,7 @@ export {
|
|
|
5251
5267
|
Vt as _,
|
|
5252
5268
|
Ys as a,
|
|
5253
5269
|
wn as a$,
|
|
5254
|
-
|
|
5270
|
+
ie as a0,
|
|
5255
5271
|
It as a1,
|
|
5256
5272
|
xs as a2,
|
|
5257
5273
|
Dt as a3,
|
|
@@ -5289,12 +5305,12 @@ export {
|
|
|
5289
5305
|
Us as aZ,
|
|
5290
5306
|
mn as a_,
|
|
5291
5307
|
Nt as aa,
|
|
5292
|
-
|
|
5308
|
+
As as ab,
|
|
5293
5309
|
Ut as ac,
|
|
5294
5310
|
Gt as ad,
|
|
5295
5311
|
Wt as ae,
|
|
5296
5312
|
Xt as af,
|
|
5297
|
-
|
|
5313
|
+
zs as ag,
|
|
5298
5314
|
Kt as ah,
|
|
5299
5315
|
Jt as ai,
|
|
5300
5316
|
Qt as aj,
|