@camunda/copilot-chat 0.8.1-alpha.7 → 0.8.1-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{highlighted-body-OFNGDK62-D11lpZ-A.js → highlighted-body-OFNGDK62-CXUh90ix.js} +1 -1
- package/dist/{index-BdxrWv_q.js → index-hIkxXkoJ.js} +667 -663
- package/dist/index.js +1 -1
- package/dist/mermaid-GHXKKRXX-BSlTZjL9.js +4 -0
- package/package.json +1 -1
- package/dist/mermaid-GHXKKRXX-B_oHlc1J.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as m, jsxs as j, Fragment as it } from "react/jsx-runtime";
|
|
2
2
|
import * as ir from "react";
|
|
3
|
-
import Nr, { useEffect as
|
|
4
|
-
import { Button as Ne, Textarea as Ju, cn as ge, ScrollArea as nh, ScrollBar as rh, Dialog as ih, DialogContent as ah, DialogHeader as sh, DialogTitle as oh, DialogDescription as uh, Label as lh, Input as ch, DialogFooter as dh, Badge as fh, DropdownMenu as hh, DropdownMenuTrigger as ph, DropdownMenuContent as mh, DropdownMenuItem as gh, Alert as
|
|
3
|
+
import Nr, { useEffect as we, useCallback as Z, useRef as ue, useState as J, useContext as De, createContext as gt, forwardRef as ci, createElement as pr, useId as un, useMemo as _e, useImperativeHandle as Zf, useLayoutEffect as Jf, memo as Te, lazy as Zu, isValidElement as rn, useTransition as eh, cloneElement as th, Suspense as ca } from "react";
|
|
4
|
+
import { Button as Ne, Textarea as Ju, cn as ge, ScrollArea as nh, ScrollBar as rh, Dialog as ih, DialogContent as ah, DialogHeader as sh, DialogTitle as oh, DialogDescription as uh, Label as lh, Input as ch, DialogFooter as dh, Badge as fh, DropdownMenu as hh, DropdownMenuTrigger as ph, DropdownMenuContent as mh, DropdownMenuItem as gh, Alert as Ct, Separator as bh, TooltipProvider as $a, Tooltip as qa, TooltipTrigger as ja, TooltipContent as Va, AlertDialog as Eh, AlertDialogContent as Th, AlertDialogHeader as yh, AlertDialogTitle as kh, AlertDialogDescription as xh, AlertDialogFooter as _h, AlertDialogCancel as Ah, AlertDialogAction as Ch, Collapsible as Ya, CollapsibleTrigger as Wa, CollapsibleContent as Ga, AiIcon as wh, Popover as Ih, PopoverTrigger as Nh, ProjectIcon as Sh, PopoverContent as vh } from "@camunda/design-system";
|
|
5
5
|
import { createPortal as el } from "react-dom";
|
|
6
6
|
const Us = (e) => {
|
|
7
7
|
let t;
|
|
@@ -25,7 +25,7 @@ function Oh(e, t = Rh) {
|
|
|
25
25
|
const zs = (e) => {
|
|
26
26
|
const t = Lh(e), n = (r) => Oh(t, r);
|
|
27
27
|
return Object.assign(n, t), n;
|
|
28
|
-
}, tl = ((e) => e ? zs(e) : zs),
|
|
28
|
+
}, tl = ((e) => e ? zs(e) : zs), Cn = tl((e) => ({
|
|
29
29
|
isOpen: !1,
|
|
30
30
|
open: () => e({ isOpen: !0 }),
|
|
31
31
|
close: () => e({ isOpen: !1 }),
|
|
@@ -51,12 +51,12 @@ const zs = (e) => {
|
|
|
51
51
|
const t = document.createElement("style");
|
|
52
52
|
t.id = $s, t.textContent = Wh, document.head.appendChild(t);
|
|
53
53
|
}, UI = ({ children: e }) => {
|
|
54
|
-
const t =
|
|
55
|
-
|
|
54
|
+
const t = Cn((r) => r.isOpen);
|
|
55
|
+
we(() => {
|
|
56
56
|
Gh();
|
|
57
57
|
}, []);
|
|
58
58
|
const n = Z(() => {
|
|
59
|
-
|
|
59
|
+
Cn.getState().close();
|
|
60
60
|
}, []);
|
|
61
61
|
return /* @__PURE__ */ m("div", { className: `${Si.wrapper} ${t ? Si.wrapperOpen : ""}`, children: /* @__PURE__ */ m("div", { className: Si.panel, children: e({ onMinimize: n, isOpen: t }) }) });
|
|
62
62
|
}, zI = ({ label: e }) => /* @__PURE__ */ m("div", { className: "copilot-chat-root", children: /* @__PURE__ */ m(
|
|
@@ -249,17 +249,17 @@ const zs = (e) => {
|
|
|
249
249
|
"STALE_SOURCE",
|
|
250
250
|
"SUBMISSION_UNVERIFIED",
|
|
251
251
|
"PERMISSION_POLICY_UNVERIFIED"
|
|
252
|
-
]) && ve(e.message) && (e.traceRef === void 0 || ve(e.traceRef)),
|
|
252
|
+
]) && ve(e.message) && (e.traceRef === void 0 || ve(e.traceRef)), wn = (e) => Oe(e) && Ee(e.projectId) && Ee(e.artifactId) && ve(e.name) && Ue(e.type, ["bpmn", "dmn", "form"]), ip = (e) => Oe(e) && e.type === "project" && Ee(e.id) && Ue(e.availability, ["available", "deleted", "no_access"]), ap = (e) => Oe(e) && Ee(e.id) && ve(e.name), sp = (e) => Oe(e) && Ee(e.stepId) && Ue(e.kind, ["reasoning", "tool", "plan", "message"]) && ve(e.label) && Ue(e.status, ["active", "complete", "error"]) && (e.name === void 0 || ve(e.name)) && (e.description === void 0 || ve(e.description)) && (e.groupId === void 0 || ve(e.groupId)) && (e.startedAt === void 0 || ve(e.startedAt)) && (e.artifacts === void 0 || Array.isArray(e.artifacts) && e.artifacts.every(wn)), op = (e) => Oe(e) && Ee(e.stepId) && Ue(e.kind, ["turn", "user_edits", "revert", "discard", "transfer"]) && (e.turnId === void 0 || Ee(e.turnId)) && typeof e.reverted == "boolean", up = (e) => !Oe(e) || !Ee(e.artifactKey) || !wn(e.artifact) || !Ue(e.change, ["create", "modify", "delete", "rename", "move"]) || typeof e.fromIncompleteTurn != "boolean" || !Ue(e.access, ["edit", "read", "none"]) || !Wr(e.otherConversationIds) || e.validationMessages !== void 0 && !Wr(e.validationMessages) ? !1 : e.divergence === void 0 ? !0 : Oe(e.divergence) && Ue(e.divergence.kind, ["edited", "renamed", "moved", "deleted"]) && Ee(e.divergence.liveFingerprint) && (e.divergence.by === void 0 || ap(e.divergence.by)) && (e.divergence.at === void 0 || ve(e.divergence.at)), al = (e) => Oe(e) && Ee(e.draftId) && Number.isSafeInteger(e.generation) && Number(e.generation) >= 0 && typeof e.writable == "boolean" && Array.isArray(e.artifacts) && e.artifacts.every(up) && Array.isArray(e.steps) && e.steps.every(op), lp = (e) => {
|
|
253
253
|
if (!Oe(e)) return !1;
|
|
254
254
|
switch (e.type) {
|
|
255
255
|
case "draft_applied":
|
|
256
|
-
return Ee(e.draftId) && Ee(e.applyId) && Number.isSafeInteger(e.generation) && (e.undoable === void 0 || typeof e.undoable == "boolean") && Array.isArray(e.artifacts) && e.artifacts.every(
|
|
256
|
+
return Ee(e.draftId) && Ee(e.applyId) && Number.isSafeInteger(e.generation) && (e.undoable === void 0 || typeof e.undoable == "boolean") && Array.isArray(e.artifacts) && e.artifacts.every(wn);
|
|
257
257
|
case "draft_discarded":
|
|
258
258
|
return Ee(e.draftId) && Number.isSafeInteger(e.generation) && Wr(e.artifactKeys);
|
|
259
259
|
case "draft_reverted":
|
|
260
260
|
return Ee(e.draftId) && Ee(e.beforeTurnId) && Number.isSafeInteger(e.generation) && Ee(e.stepId) && Wr(e.revertedStepIds);
|
|
261
261
|
case "apply_undone":
|
|
262
|
-
return Ee(e.applyId) && (e.recoveryApplyId === void 0 || Ee(e.recoveryApplyId)) && Array.isArray(e.artifacts) && e.artifacts.every(
|
|
262
|
+
return Ee(e.applyId) && (e.recoveryApplyId === void 0 || Ee(e.recoveryApplyId)) && Array.isArray(e.artifacts) && e.artifacts.every(wn);
|
|
263
263
|
case "continued_from":
|
|
264
264
|
return Ee(e.conversationId) && Ee(e.sourceConversationId) && (e.sourceDraftId === void 0 || Ee(e.sourceDraftId));
|
|
265
265
|
default:
|
|
@@ -272,7 +272,7 @@ const zs = (e) => {
|
|
|
272
272
|
"organization_disabled"
|
|
273
273
|
])) && (e.remoteStop === void 0 || Ue(e.remoteStop, ["not_sent", "pending", "confirmed", "unconfirmed"])) && (e.phase === void 0 || Ue(e.phase, ["reconciling_history"])) && (e.error === void 0 || Ws(e.error)) && (e.questions === void 0 || Array.isArray(e.questions) && e.questions.every(
|
|
274
274
|
(t) => Qa(t) && t.messageId === e.messageId
|
|
275
|
-
)) : e.kind === "event" && lp(e.event), ol = (e) => Oe(e) && Ee(e.conversationId) && Number.isSafeInteger(e.revision) && Number(e.revision) >= 0 && Ue(e.status, ["idle", "running"]) && (e.name === void 0 || ve(e.name)) && (e.entryPoint === void 0 ||
|
|
275
|
+
)) : e.kind === "event" && lp(e.event), ol = (e) => Oe(e) && Ee(e.conversationId) && Number.isSafeInteger(e.revision) && Number(e.revision) >= 0 && Ue(e.status, ["idle", "running"]) && (e.name === void 0 || ve(e.name)) && (e.entryPoint === void 0 || wn(e.entryPoint)) && ve(e.preview) && typeof e.hasOpenDraft == "boolean" && Number.isSafeInteger(e.pendingMessageCount) && Number(e.pendingMessageCount) >= 0 && (e.pendingQuestionId === void 0 || Ee(e.pendingQuestionId)), cp = (e) => {
|
|
276
276
|
if (!Oe(e)) throw new Error("Invalid apply draft result payload");
|
|
277
277
|
if (e.status === "applied" && Ee(e.applyId) || e.status === "changed_since_review" && al(e.draft) || e.status === "blocked" && Array.isArray(e.reasons) && e.reasons.every(
|
|
278
278
|
(t) => Oe(t) && Ee(t.artifactKey) && Ue(t.reason, ["no_edit_permission", "location_deleted", "hub_rule", "limit"]) && ve(t.message)
|
|
@@ -286,7 +286,7 @@ const zs = (e) => {
|
|
|
286
286
|
if (!ol(e) || !Oe(e))
|
|
287
287
|
throw new Error("Invalid conversation snapshot payload");
|
|
288
288
|
const t = e;
|
|
289
|
-
if (!Array.isArray(t.messages) || !t.messages.every(sl) || !Array.isArray(t.context) || !t.context.every(ip) || !(t.draft === null || al(t.draft)) || t.availability !== void 0 && (!Oe(t.availability) || !Ue(t.availability.state, ["enabled", "organization_disabled"]) || !ve(t.availability.policyVersion)) || t.verificationHealth !== void 0 && t.verificationHealth !== null && (!Oe(t.verificationHealth) || !Ee(t.verificationHealth.messageId) || !(t.verificationHealth.lastVerifiedAt === null || ve(t.verificationHealth.lastVerifiedAt)) || !(t.verificationHealth.troubleStartedAt === null || ve(t.verificationHealth.troubleStartedAt))) || t.lastApply !== void 0 && (!Oe(t.lastApply) || !Ee(t.lastApply.applyId) || typeof t.lastApply.undoable != "boolean" || !Array.isArray(t.lastApply.artifacts) || !t.lastApply.artifacts.every(
|
|
289
|
+
if (!Array.isArray(t.messages) || !t.messages.every(sl) || !Array.isArray(t.context) || !t.context.every(ip) || !(t.draft === null || al(t.draft)) || t.availability !== void 0 && (!Oe(t.availability) || !Ue(t.availability.state, ["enabled", "organization_disabled"]) || !ve(t.availability.policyVersion)) || t.verificationHealth !== void 0 && t.verificationHealth !== null && (!Oe(t.verificationHealth) || !Ee(t.verificationHealth.messageId) || !(t.verificationHealth.lastVerifiedAt === null || ve(t.verificationHealth.lastVerifiedAt)) || !(t.verificationHealth.troubleStartedAt === null || ve(t.verificationHealth.troubleStartedAt))) || t.lastApply !== void 0 && (!Oe(t.lastApply) || !Ee(t.lastApply.applyId) || typeof t.lastApply.undoable != "boolean" || !Array.isArray(t.lastApply.artifacts) || !t.lastApply.artifacts.every(wn)))
|
|
290
290
|
throw new Error("Invalid conversation snapshot payload");
|
|
291
291
|
const n = t.messages, r = n.flatMap(
|
|
292
292
|
(i) => i.kind === "assistant" ? i.questions ?? [] : []
|
|
@@ -409,67 +409,67 @@ const zs = (e) => {
|
|
|
409
409
|
timer: null
|
|
410
410
|
}, u = () => $e.getState().conversations[t], l = e.getRestoreEligibility?.bind(e, t), d = l && a ? hp(
|
|
411
411
|
l,
|
|
412
|
-
() => u()?.messages.flatMap((
|
|
413
|
-
const P = il(
|
|
412
|
+
() => u()?.messages.flatMap((w) => {
|
|
413
|
+
const P = il(w);
|
|
414
414
|
return P ? [P.applyId] : [];
|
|
415
415
|
}) ?? [],
|
|
416
416
|
a
|
|
417
|
-
) : void 0, f = () => u()?.snapshotRevision ?? -1, h = (
|
|
418
|
-
typeof
|
|
417
|
+
) : void 0, f = () => u()?.snapshotRevision ?? -1, h = (w) => !o.disposed && o.scope === w, p = (w) => {
|
|
418
|
+
typeof w == "object" && w !== null && "status" in w && (w.status === 401 || w.status === 403 || w.status === 404) && (o.failed = !0, Ys(t));
|
|
419
419
|
}, g = () => {
|
|
420
420
|
o.timer !== null && clearTimeout(o.timer), o.timer = null;
|
|
421
421
|
}, y = () => {
|
|
422
422
|
if (o.timer !== null || o.pending || o.disposed) return;
|
|
423
|
-
const
|
|
424
|
-
(o.failed || o.target > f() || (
|
|
423
|
+
const w = u();
|
|
424
|
+
(o.failed || o.target > f() || (w?.revision ?? -1) > f() || w?.status === "running" || w?.messages.some(
|
|
425
425
|
(P) => P.kind === "assistant" && (P.remoteStop === "pending" || P.remoteStop === "unconfirmed")
|
|
426
|
-
)) && (o.timer = setTimeout(
|
|
427
|
-
}, b = async (
|
|
426
|
+
)) && (o.timer = setTimeout(C, pp));
|
|
427
|
+
}, b = async (w) => {
|
|
428
428
|
o.queued = !1;
|
|
429
429
|
const P = i?.(), U = u()?.snapshotRevision, B = U === void 0 ? { kind: "initial", page: await e.getConversation(t) } : { kind: "changes", page: await e.getChanges(t, U) };
|
|
430
|
-
if (h(
|
|
430
|
+
if (h(w)) {
|
|
431
431
|
if (B.page.conversationId !== t)
|
|
432
432
|
throw new Error("Conversation response does not match the requested conversation.");
|
|
433
433
|
if (!Number.isSafeInteger(B.page.revision) || B.page.revision < 0)
|
|
434
434
|
throw new Error("Invalid conversation revision.");
|
|
435
435
|
Gr(B.page.messages), B.page.availability && B.page.revision >= f() && P?.(B.page.availability), Vs(t, B), (B.kind === "initial" || B.page.messages.some(
|
|
436
436
|
(R) => R.kind === "event" && (R.event.type === "draft_applied" || R.event.type === "apply_undone")
|
|
437
|
-
)) && d?.refresh(), o.failed = !1, n(null), o.queued && h(
|
|
437
|
+
)) && d?.refresh(), o.failed = !1, n(null), o.queued && h(w) && await b(w);
|
|
438
438
|
}
|
|
439
439
|
}, T = () => {
|
|
440
440
|
if (o.disposed) return Promise.resolve();
|
|
441
441
|
if (g(), o.pending)
|
|
442
442
|
return o.queued = !0, o.pending;
|
|
443
|
-
const
|
|
444
|
-
return o.pending = b(
|
|
445
|
-
if (h(
|
|
443
|
+
const w = o.scope;
|
|
444
|
+
return o.pending = b(w).catch((P) => {
|
|
445
|
+
if (h(w))
|
|
446
446
|
throw o.failed = !0, p(P), n(P instanceof Error ? P : new Error(String(P))), y(), P;
|
|
447
447
|
}).finally(() => {
|
|
448
|
-
h(
|
|
448
|
+
h(w) && (o.pending = null, y());
|
|
449
449
|
}), o.pending;
|
|
450
|
-
},
|
|
451
|
-
T().catch((
|
|
452
|
-
console.error("[CopilotConversation] Conversation synchronization failed",
|
|
450
|
+
}, C = () => {
|
|
451
|
+
T().catch((w) => {
|
|
452
|
+
console.error("[CopilotConversation] Conversation synchronization failed", w);
|
|
453
453
|
});
|
|
454
|
-
}, v = (
|
|
455
|
-
if (!(o.disposed ||
|
|
456
|
-
if (
|
|
457
|
-
Ys(t), o.target =
|
|
454
|
+
}, v = (w) => {
|
|
455
|
+
if (!(o.disposed || w.chatId !== t || !Number.isSafeInteger(w.revision) || w.revision < 0)) {
|
|
456
|
+
if (w.reset) {
|
|
457
|
+
Ys(t), o.target = w.revision, C();
|
|
458
458
|
return;
|
|
459
459
|
}
|
|
460
|
-
|
|
460
|
+
w.revision <= Math.max(o.target, f()) || (o.target = w.revision, d?.refresh(), C());
|
|
461
461
|
}
|
|
462
462
|
}, D = () => {
|
|
463
|
-
u()?.messagesLoaded && (d?.refresh(), r?.().catch((
|
|
464
|
-
o.disposed || n(
|
|
465
|
-
})),
|
|
463
|
+
u()?.messagesLoaded && (d?.refresh(), r?.().catch((w) => {
|
|
464
|
+
o.disposed || n(w instanceof Error ? w : new Error(String(w)));
|
|
465
|
+
})), C();
|
|
466
466
|
}, M = () => {
|
|
467
467
|
if (o.older) return o.older;
|
|
468
|
-
const
|
|
469
|
-
if (!
|
|
468
|
+
const w = u()?.olderCursor;
|
|
469
|
+
if (!w || o.disposed) return Promise.resolve();
|
|
470
470
|
const P = o.scope;
|
|
471
|
-
return o.older = e.getOlderMessages(t,
|
|
472
|
-
h(P) && (Gr(U.messages), Vs(t, { kind: "older", cursor:
|
|
471
|
+
return o.older = e.getOlderMessages(t, w).then((U) => {
|
|
472
|
+
h(P) && (Gr(U.messages), Vs(t, { kind: "older", cursor: w, page: U }), d?.refresh());
|
|
473
473
|
}).catch((U) => {
|
|
474
474
|
if (h(P))
|
|
475
475
|
throw p(U), u()?.messagesLoaded || n(U instanceof Error ? U : new Error(String(U))), U;
|
|
@@ -477,23 +477,23 @@ const zs = (e) => {
|
|
|
477
477
|
h(P) && (o.older = null);
|
|
478
478
|
}), o.older;
|
|
479
479
|
}, N = () => {
|
|
480
|
-
document.visibilityState !== "hidden" && (d?.refresh(),
|
|
481
|
-
}, $ = () => d?.refresh(), H = (
|
|
482
|
-
o.disposed || (p(
|
|
480
|
+
document.visibilityState !== "hidden" && (d?.refresh(), C());
|
|
481
|
+
}, $ = () => d?.refresh(), H = (w) => {
|
|
482
|
+
o.disposed || (p(w), n(w), d?.refresh(), o.failed = !0, C());
|
|
483
483
|
}, S = () => {
|
|
484
484
|
try {
|
|
485
485
|
return e.observe(t, v, D, H);
|
|
486
|
-
} catch (
|
|
487
|
-
return H(
|
|
486
|
+
} catch (w) {
|
|
487
|
+
return H(w instanceof Error ? w : new Error(String(w))), () => {
|
|
488
488
|
};
|
|
489
489
|
}
|
|
490
490
|
};
|
|
491
491
|
window.addEventListener("online", N), window.addEventListener("focus", $), document.addEventListener("visibilitychange", N);
|
|
492
492
|
const x = $e.subscribe(() => {
|
|
493
|
-
const
|
|
494
|
-
|
|
493
|
+
const w = s();
|
|
494
|
+
w !== o.scope && (o.scope = w, o.pending = null, o.older = null, o.queued = !1, o.target = -1, d?.invalidate(), d?.refresh()), y();
|
|
495
495
|
}), L = S();
|
|
496
|
-
return o.pending ||
|
|
496
|
+
return o.pending || C(), {
|
|
497
497
|
refresh: T,
|
|
498
498
|
loadOlder: M,
|
|
499
499
|
checkRestoreEligibility: d?.check,
|
|
@@ -539,7 +539,7 @@ const zs = (e) => {
|
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
541
|
}, [h]);
|
|
542
|
-
return
|
|
542
|
+
return we(() => {
|
|
543
543
|
const g = () => {
|
|
544
544
|
h().catch(() => {
|
|
545
545
|
});
|
|
@@ -560,7 +560,7 @@ const zs = (e) => {
|
|
|
560
560
|
};
|
|
561
561
|
}, Un = 3e4, bp = (e, t) => {
|
|
562
562
|
const n = t?.messageId, r = t?.troubleStartedAt, i = r ? Date.parse(r) : Number.NaN, [a, s] = J(null);
|
|
563
|
-
return
|
|
563
|
+
return we(() => {
|
|
564
564
|
if (!e || !n || !r || !Number.isFinite(i))
|
|
565
565
|
return;
|
|
566
566
|
const o = Un - (Date.now() - i);
|
|
@@ -589,14 +589,14 @@ const zs = (e) => {
|
|
|
589
589
|
}, []), T = Z(async () => {
|
|
590
590
|
await y().catch(() => {
|
|
591
591
|
});
|
|
592
|
-
}, [y]),
|
|
592
|
+
}, [y]), C = Z(
|
|
593
593
|
async (R) => {
|
|
594
594
|
throw await T(), await p().catch(() => {
|
|
595
595
|
}), R;
|
|
596
596
|
},
|
|
597
597
|
[p, T]
|
|
598
598
|
);
|
|
599
|
-
|
|
599
|
+
we(() => {
|
|
600
600
|
if (!t) return;
|
|
601
601
|
const R = mp(
|
|
602
602
|
e,
|
|
@@ -625,11 +625,11 @@ const zs = (e) => {
|
|
|
625
625
|
try {
|
|
626
626
|
le = await e.postMessage(X);
|
|
627
627
|
} catch (k) {
|
|
628
|
-
return
|
|
628
|
+
return C(k);
|
|
629
629
|
}
|
|
630
630
|
return i.current?.input === X && (i.current = null), le.conversationId === t && await T(), le;
|
|
631
631
|
},
|
|
632
|
-
[e, t, h, T,
|
|
632
|
+
[e, t, h, T, C]
|
|
633
633
|
), D = Z(
|
|
634
634
|
async (R) => {
|
|
635
635
|
if (R.conversationId !== t)
|
|
@@ -638,11 +638,11 @@ const zs = (e) => {
|
|
|
638
638
|
try {
|
|
639
639
|
await e.answerQuestion(R);
|
|
640
640
|
} catch (W) {
|
|
641
|
-
return
|
|
641
|
+
return C(W);
|
|
642
642
|
}
|
|
643
643
|
await T();
|
|
644
644
|
},
|
|
645
|
-
[e, t, h, T,
|
|
645
|
+
[e, t, h, T, C]
|
|
646
646
|
), M = Z(
|
|
647
647
|
async (R) => {
|
|
648
648
|
const W = r.current;
|
|
@@ -651,31 +651,31 @@ const zs = (e) => {
|
|
|
651
651
|
const X = await e.applyDraft(R);
|
|
652
652
|
return X.status === "applied" && W?.refreshRestoreEligibility?.(), await T(), X;
|
|
653
653
|
} catch (X) {
|
|
654
|
-
return
|
|
654
|
+
return C(X);
|
|
655
655
|
}
|
|
656
656
|
},
|
|
657
|
-
[e, h, T,
|
|
657
|
+
[e, h, T, C]
|
|
658
658
|
), N = Z(
|
|
659
659
|
async (R) => {
|
|
660
660
|
try {
|
|
661
661
|
await e.discardDraft(R);
|
|
662
662
|
} catch (W) {
|
|
663
|
-
return
|
|
663
|
+
return C(W);
|
|
664
664
|
}
|
|
665
665
|
await T();
|
|
666
666
|
},
|
|
667
|
-
[e, T,
|
|
667
|
+
[e, T, C]
|
|
668
668
|
), $ = Z(
|
|
669
669
|
async (R) => {
|
|
670
670
|
await h();
|
|
671
671
|
try {
|
|
672
672
|
await e.revertDraft(R);
|
|
673
673
|
} catch (W) {
|
|
674
|
-
return
|
|
674
|
+
return C(W);
|
|
675
675
|
}
|
|
676
676
|
await T();
|
|
677
677
|
},
|
|
678
|
-
[e, h, T,
|
|
678
|
+
[e, h, T, C]
|
|
679
679
|
), H = Z(async () => {
|
|
680
680
|
if (!t || !n.draft)
|
|
681
681
|
throw new Error("There is no open draft to update from live.");
|
|
@@ -686,7 +686,7 @@ const zs = (e) => {
|
|
|
686
686
|
const X = await e.updateDraftFromLive({ conversationId: t, submissionId: W });
|
|
687
687
|
return a.current?.submissionId === W && (a.current = null), await T(), X;
|
|
688
688
|
} catch (X) {
|
|
689
|
-
return
|
|
689
|
+
return C(X);
|
|
690
690
|
}
|
|
691
691
|
}, [
|
|
692
692
|
e,
|
|
@@ -694,7 +694,7 @@ const zs = (e) => {
|
|
|
694
694
|
t,
|
|
695
695
|
h,
|
|
696
696
|
T,
|
|
697
|
-
|
|
697
|
+
C
|
|
698
698
|
]), S = Z(
|
|
699
699
|
async (R) => {
|
|
700
700
|
if (!t) throw new Error("No conversation is selected.");
|
|
@@ -711,46 +711,46 @@ const zs = (e) => {
|
|
|
711
711
|
try {
|
|
712
712
|
await e.undoApply(t, R);
|
|
713
713
|
} catch (le) {
|
|
714
|
-
return W.invalidateRestoreEligibility?.(), W.refreshRestoreEligibility?.(),
|
|
714
|
+
return W.invalidateRestoreEligibility?.(), W.refreshRestoreEligibility?.(), C(le);
|
|
715
715
|
}
|
|
716
716
|
W.refreshRestoreEligibility?.(), await T();
|
|
717
717
|
},
|
|
718
|
-
[e, t, h, T,
|
|
718
|
+
[e, t, h, T, C]
|
|
719
719
|
), x = Z(async () => {
|
|
720
720
|
if (t) {
|
|
721
721
|
await h();
|
|
722
722
|
try {
|
|
723
723
|
await e.sendHeldMessages(t);
|
|
724
724
|
} catch (R) {
|
|
725
|
-
return
|
|
725
|
+
return C(R);
|
|
726
726
|
}
|
|
727
727
|
await T();
|
|
728
728
|
}
|
|
729
|
-
}, [e, t, h, T,
|
|
729
|
+
}, [e, t, h, T, C]), L = Z(
|
|
730
730
|
async (R) => {
|
|
731
731
|
if (t) {
|
|
732
732
|
await h();
|
|
733
733
|
try {
|
|
734
734
|
await e.retryMessage(t, R);
|
|
735
735
|
} catch (W) {
|
|
736
|
-
return
|
|
736
|
+
return C(W);
|
|
737
737
|
}
|
|
738
738
|
await T();
|
|
739
739
|
}
|
|
740
740
|
},
|
|
741
|
-
[e, t, h, T,
|
|
742
|
-
),
|
|
741
|
+
[e, t, h, T, C]
|
|
742
|
+
), w = Z(
|
|
743
743
|
async (R) => {
|
|
744
744
|
if (t) {
|
|
745
745
|
try {
|
|
746
746
|
await e.cancelMessage(t, R);
|
|
747
747
|
} catch (W) {
|
|
748
|
-
return
|
|
748
|
+
return C(W);
|
|
749
749
|
}
|
|
750
750
|
await T();
|
|
751
751
|
}
|
|
752
752
|
},
|
|
753
|
-
[e, t, T,
|
|
753
|
+
[e, t, T, C]
|
|
754
754
|
), P = Z(
|
|
755
755
|
async (R) => {
|
|
756
756
|
if (t) {
|
|
@@ -758,22 +758,22 @@ const zs = (e) => {
|
|
|
758
758
|
try {
|
|
759
759
|
await e.resendTurnInput(t, R);
|
|
760
760
|
} catch (W) {
|
|
761
|
-
return
|
|
761
|
+
return C(W);
|
|
762
762
|
}
|
|
763
763
|
await T();
|
|
764
764
|
}
|
|
765
765
|
},
|
|
766
|
-
[e, t, h, T,
|
|
766
|
+
[e, t, h, T, C]
|
|
767
767
|
), U = Z(async () => {
|
|
768
768
|
if (t) {
|
|
769
769
|
try {
|
|
770
770
|
await e.stopTurn(t);
|
|
771
771
|
} catch (R) {
|
|
772
|
-
return
|
|
772
|
+
return C(R);
|
|
773
773
|
}
|
|
774
774
|
await T();
|
|
775
775
|
}
|
|
776
|
-
}, [e, t, T,
|
|
776
|
+
}, [e, t, T, C]), B = n.status === "running" ? n.messages.filter((R) => R.kind === "assistant").flatMap((R) => R.questions ?? []).find(
|
|
777
777
|
(R) => R.state === "pending" && (n.pendingQuestionId === void 0 || R.questionId === n.pendingQuestionId)
|
|
778
778
|
) : void 0;
|
|
779
779
|
return {
|
|
@@ -805,7 +805,7 @@ const zs = (e) => {
|
|
|
805
805
|
undoApply: S,
|
|
806
806
|
sendHeldMessages: x,
|
|
807
807
|
retryMessage: L,
|
|
808
|
-
cancelMessage:
|
|
808
|
+
cancelMessage: w,
|
|
809
809
|
resendTurnInput: P,
|
|
810
810
|
stopTurn: U,
|
|
811
811
|
refresh: y
|
|
@@ -834,8 +834,8 @@ const zs = (e) => {
|
|
|
834
834
|
if (b < y.applied)
|
|
835
835
|
return;
|
|
836
836
|
y.applied = b, s(null), np(T), T.forEach(l);
|
|
837
|
-
for (const
|
|
838
|
-
js(
|
|
837
|
+
for (const C of y.summaries)
|
|
838
|
+
js(C);
|
|
839
839
|
d();
|
|
840
840
|
} catch (T) {
|
|
841
841
|
b >= y.applied && (y.applied = b, s(T instanceof Error ? T : new Error(String(T))));
|
|
@@ -843,7 +843,7 @@ const zs = (e) => {
|
|
|
843
843
|
y.pending -= 1, y.pending === 0 && (y.summaries = [], i(!1));
|
|
844
844
|
}
|
|
845
845
|
}, [e, l, d]);
|
|
846
|
-
|
|
846
|
+
we(() => {
|
|
847
847
|
f();
|
|
848
848
|
}, [f]);
|
|
849
849
|
const h = Z(
|
|
@@ -853,15 +853,15 @@ const zs = (e) => {
|
|
|
853
853
|
[l, d]
|
|
854
854
|
), p = Z(
|
|
855
855
|
async (y, b) => {
|
|
856
|
-
const T = e.renameConversation.bind(e),
|
|
857
|
-
latest:
|
|
856
|
+
const T = e.renameConversation.bind(e), C = b.trim(), v = $e.getState().conversations[y], D = u.current.get(y) ?? {
|
|
857
|
+
latest: C,
|
|
858
858
|
saved: v?.name ?? null,
|
|
859
859
|
savedRevision: v?.revision,
|
|
860
860
|
pending: 0,
|
|
861
861
|
queue: Promise.resolve()
|
|
862
862
|
};
|
|
863
|
-
D.pending += 1, D.latest =
|
|
864
|
-
const M = D.pending === 1 ? T(y,
|
|
863
|
+
D.pending += 1, D.latest = C, u.current.set(y, D), Li(y, C);
|
|
864
|
+
const M = D.pending === 1 ? T(y, C) : D.queue.then(() => T(y, C));
|
|
865
865
|
D.queue = M.then(
|
|
866
866
|
() => {
|
|
867
867
|
},
|
|
@@ -876,7 +876,7 @@ const zs = (e) => {
|
|
|
876
876
|
},
|
|
877
877
|
[e, h]
|
|
878
878
|
);
|
|
879
|
-
return
|
|
879
|
+
return we(() => {
|
|
880
880
|
const y = () => {
|
|
881
881
|
f();
|
|
882
882
|
};
|
|
@@ -886,7 +886,7 @@ const zs = (e) => {
|
|
|
886
886
|
s(b instanceof Error ? b : new Error(String(b)));
|
|
887
887
|
return;
|
|
888
888
|
}
|
|
889
|
-
}, [e, f, h]),
|
|
889
|
+
}, [e, f, h]), we(() => {
|
|
890
890
|
const y = () => {
|
|
891
891
|
document.visibilityState === "visible" && f();
|
|
892
892
|
};
|
|
@@ -926,12 +926,12 @@ var Pi = {
|
|
|
926
926
|
strokeLinecap: "round",
|
|
927
927
|
strokeLinejoin: "round"
|
|
928
928
|
};
|
|
929
|
-
const
|
|
929
|
+
const Cp = (e) => {
|
|
930
930
|
for (const t in e)
|
|
931
931
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
932
932
|
return !0;
|
|
933
933
|
return !1;
|
|
934
|
-
},
|
|
934
|
+
}, wp = gt({}), Ip = () => De(wp), Np = ci(
|
|
935
935
|
({ color: e, size: t, strokeWidth: n, absoluteStrokeWidth: r, className: i = "", children: a, iconNode: s, ...o }, u) => {
|
|
936
936
|
const {
|
|
937
937
|
size: l = 24,
|
|
@@ -950,7 +950,7 @@ const wp = (e) => {
|
|
|
950
950
|
stroke: e ?? h,
|
|
951
951
|
strokeWidth: g,
|
|
952
952
|
className: cl("lucide", p, i),
|
|
953
|
-
...!a && !
|
|
953
|
+
...!a && !Cp(o) && { "aria-hidden": "true" },
|
|
954
954
|
...o
|
|
955
955
|
},
|
|
956
956
|
[
|
|
@@ -1320,7 +1320,7 @@ const y0 = ({ className: e, onSubmit: t, children: n, ...r }) => {
|
|
|
1320
1320
|
className: ge("justify-between gap-1", e),
|
|
1321
1321
|
...t
|
|
1322
1322
|
}
|
|
1323
|
-
), A0 = ({ className: e, ...t }) => /* @__PURE__ */ m("div", { className: ge("flex min-w-0 items-center gap-1", e), ...t }),
|
|
1323
|
+
), A0 = ({ className: e, ...t }) => /* @__PURE__ */ m("div", { className: ge("flex min-w-0 items-center gap-1", e), ...t }), C0 = ({
|
|
1324
1324
|
className: e,
|
|
1325
1325
|
variant: t = "default",
|
|
1326
1326
|
size: n = "icon-sm",
|
|
@@ -1356,7 +1356,7 @@ const y0 = ({ className: e, onSubmit: t, children: n, ...r }) => {
|
|
|
1356
1356
|
children: s ?? l
|
|
1357
1357
|
}
|
|
1358
1358
|
);
|
|
1359
|
-
},
|
|
1359
|
+
}, w0 = ({ className: e, children: t, ...n }) => /* @__PURE__ */ j(nh, { className: "w-full overflow-x-auto whitespace-nowrap", ...n, children: [
|
|
1360
1360
|
/* @__PURE__ */ m("div", { className: ge("flex w-max flex-nowrap items-center gap-2", e), children: t }),
|
|
1361
1361
|
/* @__PURE__ */ m(rh, { className: "hidden", orientation: "horizontal" })
|
|
1362
1362
|
] }), I0 = ({
|
|
@@ -1406,7 +1406,7 @@ const y0 = ({ className: e, onSubmit: t, children: n, ...r }) => {
|
|
|
1406
1406
|
}
|
|
1407
1407
|
) : null }),
|
|
1408
1408
|
/* @__PURE__ */ m(
|
|
1409
|
-
|
|
1409
|
+
C0,
|
|
1410
1410
|
{
|
|
1411
1411
|
status: n ? "streaming" : "ready",
|
|
1412
1412
|
"aria-label": n ? "Stop" : "Send",
|
|
@@ -1468,13 +1468,13 @@ const y0 = ({ className: e, onSubmit: t, children: n, ...r }) => {
|
|
|
1468
1468
|
onSubmit: u,
|
|
1469
1469
|
onStop: l
|
|
1470
1470
|
}) => {
|
|
1471
|
-
const d = o !== void 0, f = i || d, [h, p] = J(""), [g, y] = J(!1), b = g || f, [T,
|
|
1471
|
+
const d = o !== void 0, f = i || d, [h, p] = J(""), [g, y] = J(!1), b = g || f, [T, C] = J(!1), v = !b && !T && s === void 0 && !!h.trim(), D = r && l !== void 0 && !v, [M, N] = J(null), [$, H] = J(null), [S, x] = J(0), L = ue(null), w = un(), P = _e(
|
|
1472
1472
|
() => t && $ ? L0(t, $.query) : [],
|
|
1473
1473
|
[t, $]
|
|
1474
1474
|
), U = $ !== null && P.length > 0;
|
|
1475
|
-
|
|
1476
|
-
U && document.getElementById(`${
|
|
1477
|
-
}, [S,
|
|
1475
|
+
we(() => {
|
|
1476
|
+
U && document.getElementById(`${w}-${S}`)?.scrollIntoView?.({ block: "nearest" });
|
|
1477
|
+
}, [S, w, U]);
|
|
1478
1478
|
const B = Z(
|
|
1479
1479
|
async (k) => {
|
|
1480
1480
|
const ne = k.trim();
|
|
@@ -1492,13 +1492,13 @@ const y0 = ({ className: e, onSubmit: t, children: n, ...r }) => {
|
|
|
1492
1492
|
[b, u, s, T]
|
|
1493
1493
|
), R = async () => {
|
|
1494
1494
|
if (!(!l || T)) {
|
|
1495
|
-
|
|
1495
|
+
C(!0), N(null);
|
|
1496
1496
|
try {
|
|
1497
1497
|
await l();
|
|
1498
1498
|
} catch {
|
|
1499
1499
|
N("Could not stop this turn. Please try again.");
|
|
1500
1500
|
} finally {
|
|
1501
|
-
|
|
1501
|
+
C(!1);
|
|
1502
1502
|
}
|
|
1503
1503
|
}
|
|
1504
1504
|
}, W = (k, ne) => {
|
|
@@ -1523,7 +1523,7 @@ const y0 = ({ className: e, onSubmit: t, children: n, ...r }) => {
|
|
|
1523
1523
|
} else k.key === "Escape" && (k.preventDefault(), H(null));
|
|
1524
1524
|
};
|
|
1525
1525
|
return /* @__PURE__ */ j("div", { className: `${at.body} flex flex-col gap-2 border-t p-3`, children: [
|
|
1526
|
-
e && e.length > 0 ? /* @__PURE__ */ m("section", { "aria-label": "Examples", children: /* @__PURE__ */ m(
|
|
1526
|
+
e && e.length > 0 ? /* @__PURE__ */ m("section", { "aria-label": "Examples", children: /* @__PURE__ */ m(w0, { children: e.map((k) => /* @__PURE__ */ m(
|
|
1527
1527
|
I0,
|
|
1528
1528
|
{
|
|
1529
1529
|
suggestion: k,
|
|
@@ -1535,7 +1535,7 @@ const y0 = ({ className: e, onSubmit: t, children: n, ...r }) => {
|
|
|
1535
1535
|
U && /* @__PURE__ */ m(
|
|
1536
1536
|
R0,
|
|
1537
1537
|
{
|
|
1538
|
-
id:
|
|
1538
|
+
id: w,
|
|
1539
1539
|
artifacts: P,
|
|
1540
1540
|
activeIndex: S,
|
|
1541
1541
|
onSelect: X
|
|
@@ -1544,7 +1544,7 @@ const y0 = ({ className: e, onSubmit: t, children: n, ...r }) => {
|
|
|
1544
1544
|
d && /* @__PURE__ */ m("p", { id: "copilot-read-only", role: "status", className: "text-sm text-muted-foreground", children: o }),
|
|
1545
1545
|
a && !d && /* @__PURE__ */ m("p", { id: "copilot-waiting-answer", role: "status", className: "text-sm text-muted-foreground", children: "Answer or skip the question above, or type your answer here." }),
|
|
1546
1546
|
s && /* @__PURE__ */ m("p", { id: "copilot-send-blocked", role: "status", className: "text-sm text-muted-foreground", children: s }),
|
|
1547
|
-
M && /* @__PURE__ */ m("p", { id: `${
|
|
1547
|
+
M && /* @__PURE__ */ m("p", { id: `${w}-error`, role: "alert", className: "text-sm text-destructive", children: M }),
|
|
1548
1548
|
/* @__PURE__ */ j(y0, { onSubmit: (k) => B(k.text), children: [
|
|
1549
1549
|
/* @__PURE__ */ m(k0, { children: /* @__PURE__ */ m(
|
|
1550
1550
|
x0,
|
|
@@ -1552,7 +1552,7 @@ const y0 = ({ className: e, onSubmit: t, children: n, ...r }) => {
|
|
|
1552
1552
|
ref: L,
|
|
1553
1553
|
id: "copilot-composer-prompt",
|
|
1554
1554
|
"aria-label": "Message prompt",
|
|
1555
|
-
"aria-describedby": d ? "copilot-read-only" : s ? "copilot-send-blocked" : a ? "copilot-waiting-answer" : M ? `${
|
|
1555
|
+
"aria-describedby": d ? "copilot-read-only" : s ? "copilot-send-blocked" : a ? "copilot-waiting-answer" : M ? `${w}-error` : void 0,
|
|
1556
1556
|
value: h,
|
|
1557
1557
|
onChange: (k) => {
|
|
1558
1558
|
p(k.currentTarget.value), W(k.currentTarget.value, k.currentTarget.selectionStart);
|
|
@@ -1565,9 +1565,9 @@ const y0 = ({ className: e, onSubmit: t, children: n, ...r }) => {
|
|
|
1565
1565
|
role: t ? "combobox" : void 0,
|
|
1566
1566
|
"aria-autocomplete": t ? "list" : void 0,
|
|
1567
1567
|
"aria-haspopup": t ? "listbox" : void 0,
|
|
1568
|
-
"aria-controls": t ?
|
|
1568
|
+
"aria-controls": t ? w : void 0,
|
|
1569
1569
|
"aria-expanded": t ? U : void 0,
|
|
1570
|
-
"aria-activedescendant": U ? `${
|
|
1570
|
+
"aria-activedescendant": U ? `${w}-${S}` : void 0,
|
|
1571
1571
|
disabled: b,
|
|
1572
1572
|
placeholder: "Ask a question or describe a change…"
|
|
1573
1573
|
}
|
|
@@ -1632,7 +1632,7 @@ const y0 = ({ className: e, onSubmit: t, children: n, ...r }) => {
|
|
|
1632
1632
|
)
|
|
1633
1633
|
}
|
|
1634
1634
|
);
|
|
1635
|
-
}, M0 = (e) => e.status === "running" ? e.pendingQuestionId ? { label: "Waiting for answer", variant: "warning" } : { label: "
|
|
1635
|
+
}, M0 = (e) => e.status === "running" ? e.pendingQuestionId ? { label: "Waiting for answer", variant: "warning" } : { label: "Working", variant: "info" } : e.hasOpenDraft ? { label: "Changes ready", variant: "warning" } : null, B0 = ({ conversation: e }) => {
|
|
1636
1636
|
const t = M0(e);
|
|
1637
1637
|
return t ? /* @__PURE__ */ m(fh, { variant: t.variant, children: t.label }) : null;
|
|
1638
1638
|
}, F0 = ({
|
|
@@ -1710,7 +1710,7 @@ const y0 = ({ className: e, onSubmit: t, children: n, ...r }) => {
|
|
|
1710
1710
|
}) => /* @__PURE__ */ j("div", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto p-3", children: [
|
|
1711
1711
|
/* @__PURE__ */ m("h3", { className: "mb-3 font-medium text-sm", children: "Chats" }),
|
|
1712
1712
|
r && /* @__PURE__ */ m(
|
|
1713
|
-
|
|
1713
|
+
Ct,
|
|
1714
1714
|
{
|
|
1715
1715
|
role: "alert",
|
|
1716
1716
|
variant: "destructive",
|
|
@@ -1770,17 +1770,17 @@ const j0 = (e = {}) => {
|
|
|
1770
1770
|
const u = Z(() => {
|
|
1771
1771
|
if (!di)
|
|
1772
1772
|
return !1;
|
|
1773
|
-
const
|
|
1774
|
-
if (!
|
|
1773
|
+
const C = window.getSelection();
|
|
1774
|
+
if (!C || !C.rangeCount)
|
|
1775
1775
|
return !1;
|
|
1776
|
-
const v =
|
|
1776
|
+
const v = C.getRangeAt(0);
|
|
1777
1777
|
return v.commonAncestorContainer.contains(b.current) || b.current?.contains(v.commonAncestorContainer);
|
|
1778
|
-
}, []), l = Z((
|
|
1779
|
-
f.isAtBottom =
|
|
1780
|
-
}, []), d = Z((
|
|
1781
|
-
f.escapedFromLock =
|
|
1778
|
+
}, []), l = Z((C) => {
|
|
1779
|
+
f.isAtBottom = C, i(C);
|
|
1780
|
+
}, []), d = Z((C) => {
|
|
1781
|
+
f.escapedFromLock = C, n(C);
|
|
1782
1782
|
}, []), f = _e(() => {
|
|
1783
|
-
let
|
|
1783
|
+
let C;
|
|
1784
1784
|
return {
|
|
1785
1785
|
escapedFromLock: t,
|
|
1786
1786
|
isAtBottom: r,
|
|
@@ -1806,14 +1806,14 @@ const j0 = (e = {}) => {
|
|
|
1806
1806
|
const { targetScrollTop: v } = this;
|
|
1807
1807
|
if (!e.targetScrollTop)
|
|
1808
1808
|
return v;
|
|
1809
|
-
if (
|
|
1810
|
-
return
|
|
1809
|
+
if (C?.targetScrollTop === v)
|
|
1810
|
+
return C.calculatedScrollTop;
|
|
1811
1811
|
const D = Math.max(Math.min(e.targetScrollTop(v, {
|
|
1812
1812
|
scrollElement: b.current,
|
|
1813
1813
|
contentElement: T.current
|
|
1814
1814
|
}), v), 0);
|
|
1815
|
-
return
|
|
1816
|
-
|
|
1815
|
+
return C = { targetScrollTop: v, calculatedScrollTop: D }, requestAnimationFrame(() => {
|
|
1816
|
+
C = void 0;
|
|
1817
1817
|
}), D;
|
|
1818
1818
|
},
|
|
1819
1819
|
get scrollDifference() {
|
|
@@ -1823,25 +1823,25 @@ const j0 = (e = {}) => {
|
|
|
1823
1823
|
return this.scrollDifference <= z0;
|
|
1824
1824
|
}
|
|
1825
1825
|
};
|
|
1826
|
-
}, []), h = Z((
|
|
1827
|
-
typeof
|
|
1828
|
-
const v = Date.now() + (Number(
|
|
1826
|
+
}, []), h = Z((C = {}) => {
|
|
1827
|
+
typeof C == "string" && (C = { animation: C }), C.preserveScrollPosition || l(!0);
|
|
1828
|
+
const v = Date.now() + (Number(C.wait) || 0), D = Bi(o.current, C.animation), { ignoreEscapes: M = !1 } = C;
|
|
1829
1829
|
let N, $ = f.calculatedTargetScrollTop;
|
|
1830
|
-
|
|
1830
|
+
C.duration instanceof Promise ? C.duration.finally(() => {
|
|
1831
1831
|
N = Date.now();
|
|
1832
|
-
}) : N = v + (
|
|
1832
|
+
}) : N = v + (C.duration ?? 0);
|
|
1833
1833
|
const H = async () => {
|
|
1834
1834
|
const S = new Promise(requestAnimationFrame).then(() => {
|
|
1835
1835
|
if (!f.isAtBottom)
|
|
1836
1836
|
return f.animation = void 0, !1;
|
|
1837
|
-
const { scrollTop: x } = f, L = performance.now(),
|
|
1837
|
+
const { scrollTop: x } = f, L = performance.now(), w = (L - (f.lastTick ?? L)) / $0;
|
|
1838
1838
|
if (f.animation || (f.animation = { behavior: D, promise: S, ignoreEscapes: M }), f.animation.behavior === D && (f.lastTick = L), u() || v > Date.now())
|
|
1839
1839
|
return H();
|
|
1840
1840
|
if (x < Math.min($, f.calculatedTargetScrollTop)) {
|
|
1841
1841
|
if (f.animation?.behavior === D) {
|
|
1842
1842
|
if (D === "instant")
|
|
1843
1843
|
return f.scrollTop = f.calculatedTargetScrollTop, H();
|
|
1844
|
-
f.velocity = (D.damping * f.velocity + D.stiffness * f.scrollDifference) / D.mass, f.accumulated += f.velocity *
|
|
1844
|
+
f.velocity = (D.damping * f.velocity + D.stiffness * f.scrollDifference) / D.mass, f.accumulated += f.velocity * w, f.scrollTop += f.accumulated, f.scrollTop !== x && (f.accumulated = 0);
|
|
1845
1845
|
}
|
|
1846
1846
|
return H();
|
|
1847
1847
|
}
|
|
@@ -1855,11 +1855,11 @@ const j0 = (e = {}) => {
|
|
|
1855
1855
|
f.animation || (f.lastTick = void 0, f.velocity = 0);
|
|
1856
1856
|
}), x));
|
|
1857
1857
|
};
|
|
1858
|
-
return
|
|
1858
|
+
return C.wait !== !0 && (f.animation = void 0), f.animation?.behavior === D ? f.animation.promise : H();
|
|
1859
1859
|
}, [l, u, f]), p = Z(() => {
|
|
1860
1860
|
d(!0), l(!1);
|
|
1861
|
-
}, [d, l]), g = Z(({ target:
|
|
1862
|
-
if (
|
|
1861
|
+
}, [d, l]), g = Z(({ target: C }) => {
|
|
1862
|
+
if (C !== b.current)
|
|
1863
1863
|
return;
|
|
1864
1864
|
const { scrollTop: v, ignoreScrollToTop: D } = f;
|
|
1865
1865
|
let { lastScrollTop: M = v } = f;
|
|
@@ -1877,18 +1877,18 @@ const j0 = (e = {}) => {
|
|
|
1877
1877
|
}
|
|
1878
1878
|
$ && (d(!0), l(!1)), N && d(!1), !f.escapedFromLock && f.isNearBottom && l(!0);
|
|
1879
1879
|
}, 1);
|
|
1880
|
-
}, [d, l, u, f]), y = Z(({ target:
|
|
1881
|
-
let D =
|
|
1880
|
+
}, [d, l, u, f]), y = Z(({ target: C, deltaY: v }) => {
|
|
1881
|
+
let D = C;
|
|
1882
1882
|
for (; !["scroll", "auto"].includes(getComputedStyle(D).overflow); ) {
|
|
1883
1883
|
if (!D.parentElement)
|
|
1884
1884
|
return;
|
|
1885
1885
|
D = D.parentElement;
|
|
1886
1886
|
}
|
|
1887
1887
|
D === b.current && v < 0 && b.current.scrollHeight > b.current.clientHeight && !f.animation?.ignoreEscapes && (d(!0), l(!1));
|
|
1888
|
-
}, [d, l, f]), b = Xs((
|
|
1889
|
-
b.current?.removeEventListener("scroll", g), b.current?.removeEventListener("wheel", y),
|
|
1890
|
-
}, []), T = Xs((
|
|
1891
|
-
if (f.resizeObserver?.disconnect(), f.resizeObserver = void 0, !
|
|
1888
|
+
}, [d, l, f]), b = Xs((C) => {
|
|
1889
|
+
b.current?.removeEventListener("scroll", g), b.current?.removeEventListener("wheel", y), C?.addEventListener("scroll", g, { passive: !0 }), C?.addEventListener("wheel", y, { passive: !0 });
|
|
1890
|
+
}, []), T = Xs((C) => {
|
|
1891
|
+
if (f.resizeObserver?.disconnect(), f.resizeObserver = void 0, !C)
|
|
1892
1892
|
return;
|
|
1893
1893
|
let v;
|
|
1894
1894
|
f.resizeObserver = new ResizeObserver(([D]) => {
|
|
@@ -1908,7 +1908,7 @@ const j0 = (e = {}) => {
|
|
|
1908
1908
|
f.resizeDifference === N && (f.resizeDifference = 0);
|
|
1909
1909
|
}, 1);
|
|
1910
1910
|
});
|
|
1911
|
-
}), f.resizeObserver?.observe(
|
|
1911
|
+
}), f.resizeObserver?.observe(C);
|
|
1912
1912
|
}, []);
|
|
1913
1913
|
return {
|
|
1914
1914
|
contentRef: T,
|
|
@@ -1939,7 +1939,7 @@ function Bi(...e) {
|
|
|
1939
1939
|
const r = JSON.stringify(t);
|
|
1940
1940
|
return Mi.has(r) || Mi.set(r, Object.freeze(t)), n ? "instant" : Mi.get(r);
|
|
1941
1941
|
}
|
|
1942
|
-
const gl = gt(null), V0 = typeof window < "u" ? Jf :
|
|
1942
|
+
const gl = gt(null), V0 = typeof window < "u" ? Jf : we;
|
|
1943
1943
|
function Kr({ instance: e, children: t, resize: n, initial: r, mass: i, damping: a, stiffness: s, targetScrollTop: o, contextRef: u, ...l }) {
|
|
1944
1944
|
const d = ue(null), f = ir.useCallback((M, N) => (D?.targetScrollTop ?? o)?.(M, N) ?? M, [o]), h = j0({
|
|
1945
1945
|
mass: i,
|
|
@@ -1948,12 +1948,12 @@ function Kr({ instance: e, children: t, resize: n, initial: r, mass: i, damping:
|
|
|
1948
1948
|
resize: n,
|
|
1949
1949
|
initial: r,
|
|
1950
1950
|
targetScrollTop: f
|
|
1951
|
-
}), { scrollRef: p, contentRef: g, scrollToBottom: y, stopScroll: b, isAtBottom: T, escapedFromLock:
|
|
1951
|
+
}), { scrollRef: p, contentRef: g, scrollToBottom: y, stopScroll: b, isAtBottom: T, escapedFromLock: C, state: v } = e ?? h, D = _e(() => ({
|
|
1952
1952
|
scrollToBottom: y,
|
|
1953
1953
|
stopScroll: b,
|
|
1954
1954
|
scrollRef: p,
|
|
1955
1955
|
isAtBottom: T,
|
|
1956
|
-
escapedFromLock:
|
|
1956
|
+
escapedFromLock: C,
|
|
1957
1957
|
contentRef: g,
|
|
1958
1958
|
state: v,
|
|
1959
1959
|
get targetScrollTop() {
|
|
@@ -1968,7 +1968,7 @@ function Kr({ instance: e, children: t, resize: n, initial: r, mass: i, damping:
|
|
|
1968
1968
|
g,
|
|
1969
1969
|
p,
|
|
1970
1970
|
b,
|
|
1971
|
-
|
|
1971
|
+
C,
|
|
1972
1972
|
v
|
|
1973
1973
|
]);
|
|
1974
1974
|
return Zf(u, () => D, [D]), V0(() => {
|
|
@@ -2062,7 +2062,7 @@ const Y0 = ({ className: e, ...t }) => /* @__PURE__ */ m(
|
|
|
2062
2062
|
disabled: r,
|
|
2063
2063
|
onRestore: i
|
|
2064
2064
|
}) => {
|
|
2065
|
-
const [a, s] = J(!1), [o, u] = J(!1), [l, d] = J(!1), [f, h] = J(null), p = ue(!1), g = ue(null), y = ue(null), b = un(), T = e.artifacts.map((N) => N.name).join(", "),
|
|
2065
|
+
const [a, s] = J(!1), [o, u] = J(!1), [l, d] = J(!1), [f, h] = J(null), p = ue(!1), g = ue(null), y = ue(null), b = un(), T = e.artifacts.map((N) => N.name).join(", "), C = t ? "Changes restored" : "Version created", v = t ? "Undo restore" : "Restore", D = e.undoable === void 0 ? "Restore eligibility has not been confirmed." : l || !e.undoable ? "This version cannot be restored from chat." : null, M = async () => {
|
|
2066
2066
|
if (!(p.current || r || D || f?.blocked)) {
|
|
2067
2067
|
p.current = !0, u(!0), h(null);
|
|
2068
2068
|
try {
|
|
@@ -2085,10 +2085,10 @@ const Y0 = ({ className: e, ...t }) => /* @__PURE__ */ m(
|
|
|
2085
2085
|
className: at.secondary,
|
|
2086
2086
|
"data-testid": "checkpoint",
|
|
2087
2087
|
role: "group",
|
|
2088
|
-
"aria-label": T ? `${
|
|
2088
|
+
"aria-label": T ? `${C} for ${T}` : C,
|
|
2089
2089
|
children: [
|
|
2090
2090
|
/* @__PURE__ */ m(K0, { "aria-hidden": "true" }),
|
|
2091
|
-
/* @__PURE__ */ m("span", { ref: y, tabIndex: -1, title: T || void 0, children:
|
|
2091
|
+
/* @__PURE__ */ m("span", { ref: y, tabIndex: -1, title: T || void 0, children: C }),
|
|
2092
2092
|
/* @__PURE__ */ m(
|
|
2093
2093
|
X0,
|
|
2094
2094
|
{
|
|
@@ -2131,7 +2131,7 @@ const Y0 = ({ className: e, ...t }) => /* @__PURE__ */ m(
|
|
|
2131
2131
|
/* @__PURE__ */ m(xh, { children: t ? `Replace ${T || "the affected files"} with the versions saved just before this restore. Files that did not exist then may be removed. Your chat history will be kept.` : `Restore the state before this change${T && ` to ${T}`}. This replaces the current content of affected files and may remove files created by the change. Your chat history will be kept.` })
|
|
2132
2132
|
] }),
|
|
2133
2133
|
(f || D) && /* @__PURE__ */ m(
|
|
2134
|
-
|
|
2134
|
+
Ct,
|
|
2135
2135
|
{
|
|
2136
2136
|
variant: "destructive",
|
|
2137
2137
|
title: t ? "Could not undo this restore." : "Could not restore this version.",
|
|
@@ -2142,7 +2142,7 @@ const Y0 = ({ className: e, ...t }) => /* @__PURE__ */ m(
|
|
|
2142
2142
|
/* @__PURE__ */ j(_h, { children: [
|
|
2143
2143
|
/* @__PURE__ */ m(Ah, { disabled: o, children: "Cancel" }),
|
|
2144
2144
|
/* @__PURE__ */ m(
|
|
2145
|
-
|
|
2145
|
+
Ch,
|
|
2146
2146
|
{
|
|
2147
2147
|
disabled: r || o || D !== null || f?.blocked,
|
|
2148
2148
|
onClick: (N) => {
|
|
@@ -2392,8 +2392,8 @@ function Ja(e, t, n, r) {
|
|
|
2392
2392
|
);
|
|
2393
2393
|
if (T.children && p[0] !== xn)
|
|
2394
2394
|
for (y = (r ? T.children.length : -1) + s, b = d.concat(T); y > -1 && y < T.children.length; ) {
|
|
2395
|
-
const
|
|
2396
|
-
if (g = o(
|
|
2395
|
+
const C = T.children[y];
|
|
2396
|
+
if (g = o(C, y, b)(), g[0] === ha)
|
|
2397
2397
|
return g;
|
|
2398
2398
|
y = typeof g[1] == "number" ? g[1] : y + s;
|
|
2399
2399
|
}
|
|
@@ -2405,7 +2405,7 @@ function Ja(e, t, n, r) {
|
|
|
2405
2405
|
function hm(e) {
|
|
2406
2406
|
return Array.isArray(e) ? e : typeof e == "number" ? [er, e] : e == null ? El : [e];
|
|
2407
2407
|
}
|
|
2408
|
-
function
|
|
2408
|
+
function wt(e, t, n, r) {
|
|
2409
2409
|
let i, a, s;
|
|
2410
2410
|
typeof t == "function" && typeof n != "function" ? (a = void 0, s = t, i = n) : (a = t, s = n, i = r), Ja(e, a, o, i);
|
|
2411
2411
|
function o(u, l) {
|
|
@@ -2424,7 +2424,7 @@ function pm({ defaultOrigin: e = "", allowedLinkPrefixes: t = [], allowedImagePr
|
|
|
2424
2424
|
throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");
|
|
2425
2425
|
return (f) => {
|
|
2426
2426
|
const h = ym(e, t, n, r, i, a, s, o, u);
|
|
2427
|
-
Tl(f),
|
|
2427
|
+
Tl(f), wt(f, h);
|
|
2428
2428
|
};
|
|
2429
2429
|
}
|
|
2430
2430
|
function Zs(e, t) {
|
|
@@ -2575,7 +2575,7 @@ const ym = (e, t, n, r, i, a, s, o, u) => {
|
|
|
2575
2575
|
if (d.tagName === "a") {
|
|
2576
2576
|
const p = Js(d.properties.href, t, e, !1, !1, i);
|
|
2577
2577
|
if (p === null) {
|
|
2578
|
-
if (d[Fi] = !0,
|
|
2578
|
+
if (d[Fi] = !0, wt(d, l), h && typeof f == "number") {
|
|
2579
2579
|
const g = Em(d, o, s);
|
|
2580
2580
|
if (g.type === "remove")
|
|
2581
2581
|
return h.children.splice(f, 1), [xn, f];
|
|
@@ -2588,7 +2588,7 @@ const ym = (e, t, n, r, i, a, s, o, u) => {
|
|
|
2588
2588
|
if (d.tagName === "img") {
|
|
2589
2589
|
const p = Js(d.properties.src, n, e, r, !0, i);
|
|
2590
2590
|
if (p === null) {
|
|
2591
|
-
if (d[Fi] = !0,
|
|
2591
|
+
if (d[Fi] = !0, wt(d, l), h && typeof f == "number") {
|
|
2592
2592
|
const g = Tm(d, u, a);
|
|
2593
2593
|
if (g.type === "remove")
|
|
2594
2594
|
return h.children.splice(f, 1), [xn, f];
|
|
@@ -2829,10 +2829,10 @@ et.prototype.overloadedBoolean = !1;
|
|
|
2829
2829
|
et.prototype.property = "";
|
|
2830
2830
|
et.prototype.spaceSeparated = !1;
|
|
2831
2831
|
et.prototype.space = void 0;
|
|
2832
|
-
let
|
|
2832
|
+
let Cm = 0;
|
|
2833
2833
|
const te = fn(), Pe = fn(), pa = fn(), Y = fn(), xe = fn(), sn = fn(), nt = fn();
|
|
2834
2834
|
function fn() {
|
|
2835
|
-
return 2 ** ++
|
|
2835
|
+
return 2 ** ++Cm;
|
|
2836
2836
|
}
|
|
2837
2837
|
const ma = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2838
2838
|
__proto__: null,
|
|
@@ -2887,7 +2887,7 @@ function vn(e) {
|
|
|
2887
2887
|
}
|
|
2888
2888
|
return new Tr(t, n, e.space);
|
|
2889
2889
|
}
|
|
2890
|
-
const
|
|
2890
|
+
const Cl = vn({
|
|
2891
2891
|
properties: {
|
|
2892
2892
|
ariaActiveDescendant: null,
|
|
2893
2893
|
ariaAtomic: Pe,
|
|
@@ -2943,13 +2943,13 @@ const wl = vn({
|
|
|
2943
2943
|
return t === "role" ? t : "aria-" + t.slice(4).toLowerCase();
|
|
2944
2944
|
}
|
|
2945
2945
|
});
|
|
2946
|
-
function
|
|
2946
|
+
function wl(e, t) {
|
|
2947
2947
|
return t in e ? e[t] : t;
|
|
2948
2948
|
}
|
|
2949
2949
|
function Il(e, t) {
|
|
2950
|
-
return
|
|
2950
|
+
return wl(e, t.toLowerCase());
|
|
2951
2951
|
}
|
|
2952
|
-
const
|
|
2952
|
+
const wm = vn({
|
|
2953
2953
|
attributes: {
|
|
2954
2954
|
acceptcharset: "accept-charset",
|
|
2955
2955
|
classname: "class",
|
|
@@ -3880,7 +3880,7 @@ const Cm = vn({
|
|
|
3880
3880
|
zoomAndPan: null
|
|
3881
3881
|
},
|
|
3882
3882
|
space: "svg",
|
|
3883
|
-
transform:
|
|
3883
|
+
transform: wl
|
|
3884
3884
|
}), Nl = vn({
|
|
3885
3885
|
properties: {
|
|
3886
3886
|
xLinkActuate: null,
|
|
@@ -3951,7 +3951,7 @@ function Lm(e) {
|
|
|
3951
3951
|
function Rm(e) {
|
|
3952
3952
|
return e.charAt(1).toUpperCase();
|
|
3953
3953
|
}
|
|
3954
|
-
const yr = Al([
|
|
3954
|
+
const yr = Al([Cl, wm, Nl, Sl, vl], "html"), Yt = Al([Cl, Im, Nl, Sl, vl], "svg");
|
|
3955
3955
|
function ao(e) {
|
|
3956
3956
|
const t = [], n = String(e || "");
|
|
3957
3957
|
let r = n.indexOf(","), i = 0, a = !1;
|
|
@@ -7087,7 +7087,7 @@ const ql = /* @__PURE__ */ new Set([c.DD, c.DT, c.LI, c.OPTGROUP, c.OPTION, c.P,
|
|
|
7087
7087
|
c.TD,
|
|
7088
7088
|
c.TEMPLATE,
|
|
7089
7089
|
c.TH
|
|
7090
|
-
]), _g = /* @__PURE__ */ new Set([...Zr, c.OL, c.UL]), Ag = /* @__PURE__ */ new Set([...Zr, c.BUTTON]), go = /* @__PURE__ */ new Set([c.ANNOTATION_XML, c.MI, c.MN, c.MO, c.MS, c.MTEXT]), bo = /* @__PURE__ */ new Set([c.DESC, c.FOREIGN_OBJECT, c.TITLE]),
|
|
7090
|
+
]), _g = /* @__PURE__ */ new Set([...Zr, c.OL, c.UL]), Ag = /* @__PURE__ */ new Set([...Zr, c.BUTTON]), go = /* @__PURE__ */ new Set([c.ANNOTATION_XML, c.MI, c.MN, c.MO, c.MS, c.MTEXT]), bo = /* @__PURE__ */ new Set([c.DESC, c.FOREIGN_OBJECT, c.TITLE]), Cg = /* @__PURE__ */ new Set([c.TR, c.TEMPLATE, c.HTML]), wg = /* @__PURE__ */ new Set([c.TBODY, c.TFOOT, c.THEAD, c.TEMPLATE, c.HTML]), Ig = /* @__PURE__ */ new Set([c.TABLE, c.TEMPLATE, c.HTML]), Ng = /* @__PURE__ */ new Set([c.TD, c.TH]);
|
|
7091
7091
|
class Sg {
|
|
7092
7092
|
get currentTmplContentOrNode() {
|
|
7093
7093
|
return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;
|
|
@@ -7166,10 +7166,10 @@ class Sg {
|
|
|
7166
7166
|
this.clearBackTo(Ig, q.HTML);
|
|
7167
7167
|
}
|
|
7168
7168
|
clearBackToTableBodyContext() {
|
|
7169
|
-
this.clearBackTo(
|
|
7169
|
+
this.clearBackTo(wg, q.HTML);
|
|
7170
7170
|
}
|
|
7171
7171
|
clearBackToTableRowContext() {
|
|
7172
|
-
this.clearBackTo(
|
|
7172
|
+
this.clearBackTo(Cg, q.HTML);
|
|
7173
7173
|
}
|
|
7174
7174
|
remove(t) {
|
|
7175
7175
|
const n = this._indexOf(t);
|
|
@@ -8538,11 +8538,11 @@ class xo {
|
|
|
8538
8538
|
break;
|
|
8539
8539
|
}
|
|
8540
8540
|
case A.AFTER_AFTER_BODY: {
|
|
8541
|
-
|
|
8541
|
+
Cb(this, t);
|
|
8542
8542
|
break;
|
|
8543
8543
|
}
|
|
8544
8544
|
case A.AFTER_AFTER_FRAMESET: {
|
|
8545
|
-
|
|
8545
|
+
wb(this, t);
|
|
8546
8546
|
break;
|
|
8547
8547
|
}
|
|
8548
8548
|
}
|
|
@@ -9104,10 +9104,10 @@ function A1(e, t) {
|
|
|
9104
9104
|
}
|
|
9105
9105
|
e.openElements.hasInButtonScope(c.P) && e._closePElement(), e._insertElement(t, q.HTML);
|
|
9106
9106
|
}
|
|
9107
|
-
function
|
|
9107
|
+
function C1(e, t) {
|
|
9108
9108
|
e.openElements.hasInButtonScope(c.P) && e._closePElement(), e._insertElement(t, q.HTML), e.tokenizer.state = Re.PLAINTEXT;
|
|
9109
9109
|
}
|
|
9110
|
-
function
|
|
9110
|
+
function w1(e, t) {
|
|
9111
9111
|
e.openElements.hasInScope(c.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(c.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t, q.HTML), e.framesetOk = !1;
|
|
9112
9112
|
}
|
|
9113
9113
|
function I1(e, t) {
|
|
@@ -9329,7 +9329,7 @@ function je(e, t) {
|
|
|
9329
9329
|
break;
|
|
9330
9330
|
}
|
|
9331
9331
|
case c.BUTTON: {
|
|
9332
|
-
|
|
9332
|
+
w1(e, t);
|
|
9333
9333
|
break;
|
|
9334
9334
|
}
|
|
9335
9335
|
case c.APPLET:
|
|
@@ -9369,7 +9369,7 @@ function je(e, t) {
|
|
|
9369
9369
|
break;
|
|
9370
9370
|
}
|
|
9371
9371
|
case c.PLAINTEXT: {
|
|
9372
|
-
|
|
9372
|
+
C1(e, t);
|
|
9373
9373
|
break;
|
|
9374
9374
|
}
|
|
9375
9375
|
case c.COL:
|
|
@@ -10038,13 +10038,13 @@ function _b(e, t) {
|
|
|
10038
10038
|
function Ab(e, t) {
|
|
10039
10039
|
t.tagID === c.HTML && (e.insertionMode = A.AFTER_AFTER_FRAMESET);
|
|
10040
10040
|
}
|
|
10041
|
-
function
|
|
10041
|
+
function Cb(e, t) {
|
|
10042
10042
|
t.tagID === c.HTML ? je(e, t) : $r(e, t);
|
|
10043
10043
|
}
|
|
10044
10044
|
function $r(e, t) {
|
|
10045
10045
|
e.insertionMode = A.IN_BODY, gi(e, t);
|
|
10046
10046
|
}
|
|
10047
|
-
function
|
|
10047
|
+
function wb(e, t) {
|
|
10048
10048
|
switch (t.tagID) {
|
|
10049
10049
|
case c.HTML: {
|
|
10050
10050
|
je(e, t);
|
|
@@ -10117,13 +10117,13 @@ const Lb = /<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title
|
|
|
10117
10117
|
"mdxJsxTextElement",
|
|
10118
10118
|
"mdxTextExpression",
|
|
10119
10119
|
"mdxjsEsm"
|
|
10120
|
-
]),
|
|
10120
|
+
]), Co = { sourceCodeLocationInfo: !0, scriptingEnabled: !1 };
|
|
10121
10121
|
function hc(e, t) {
|
|
10122
10122
|
const n = $b(e), r = Ml("type", {
|
|
10123
10123
|
handlers: { root: Ob, element: Db, text: Pb, comment: mc, doctype: Mb, raw: Fb },
|
|
10124
10124
|
unknown: Hb
|
|
10125
10125
|
}), i = {
|
|
10126
|
-
parser: n ? new xo(
|
|
10126
|
+
parser: n ? new xo(Co) : xo.getFragmentParser(void 0, Co),
|
|
10127
10127
|
handle(o) {
|
|
10128
10128
|
r(o, i);
|
|
10129
10129
|
},
|
|
@@ -10135,7 +10135,7 @@ function hc(e, t) {
|
|
|
10135
10135
|
// To do: support `space`?
|
|
10136
10136
|
file: i.options.file
|
|
10137
10137
|
});
|
|
10138
|
-
return i.stitches &&
|
|
10138
|
+
return i.stitches && wt(s, "comment", function(o, u, l) {
|
|
10139
10139
|
const d = (
|
|
10140
10140
|
/** @type {Stitch} */
|
|
10141
10141
|
/** @type {unknown} */
|
|
@@ -10613,13 +10613,13 @@ function Kb(e, t) {
|
|
|
10613
10613
|
for (l in o)
|
|
10614
10614
|
if ($t.call(o, l)) {
|
|
10615
10615
|
const d = o[l];
|
|
10616
|
-
let f =
|
|
10616
|
+
let f = wo(
|
|
10617
10617
|
e,
|
|
10618
10618
|
Io(a, l),
|
|
10619
10619
|
l,
|
|
10620
10620
|
d
|
|
10621
10621
|
);
|
|
10622
|
-
f == null && (f =
|
|
10622
|
+
f == null && (f = wo(e, Io(s, l), l, d)), f != null && (u[l] = f);
|
|
10623
10623
|
}
|
|
10624
10624
|
if (i && $t.call(i, n)) {
|
|
10625
10625
|
const d = i[n];
|
|
@@ -10628,7 +10628,7 @@ function Kb(e, t) {
|
|
|
10628
10628
|
}
|
|
10629
10629
|
return u;
|
|
10630
10630
|
}
|
|
10631
|
-
function
|
|
10631
|
+
function wo(e, t, n, r) {
|
|
10632
10632
|
return t ? Array.isArray(r) ? Xb(e, t, n, r) : Tc(e, t, n, r) : void 0;
|
|
10633
10633
|
}
|
|
10634
10634
|
function Xb(e, t, n, r) {
|
|
@@ -10767,7 +10767,7 @@ function rE(e, t, n) {
|
|
|
10767
10767
|
const f = d[d.length - 1], h = a[s][0], p = a[s][1];
|
|
10768
10768
|
let g = 0;
|
|
10769
10769
|
const b = f.children.indexOf(l);
|
|
10770
|
-
let T = !1,
|
|
10770
|
+
let T = !1, C = [];
|
|
10771
10771
|
h.lastIndex = 0;
|
|
10772
10772
|
let v = h.exec(l.value);
|
|
10773
10773
|
for (; v; ) {
|
|
@@ -10777,14 +10777,14 @@ function rE(e, t, n) {
|
|
|
10777
10777
|
stack: [...d, l]
|
|
10778
10778
|
};
|
|
10779
10779
|
let N = p(...v, M);
|
|
10780
|
-
if (typeof N == "string" && (N = N.length > 0 ? { type: "text", value: N } : void 0), N === !1 ? h.lastIndex = D + 1 : (g !== D &&
|
|
10780
|
+
if (typeof N == "string" && (N = N.length > 0 ? { type: "text", value: N } : void 0), N === !1 ? h.lastIndex = D + 1 : (g !== D && C.push({
|
|
10781
10781
|
type: "text",
|
|
10782
10782
|
value: l.value.slice(g, D)
|
|
10783
|
-
}), Array.isArray(N) ?
|
|
10783
|
+
}), Array.isArray(N) ? C.push(...N) : N && C.push(N), g = D + v[0].length, T = !0), !h.global)
|
|
10784
10784
|
break;
|
|
10785
10785
|
v = h.exec(l.value);
|
|
10786
10786
|
}
|
|
10787
|
-
return T ? (g < l.value.length &&
|
|
10787
|
+
return T ? (g < l.value.length && C.push({ type: "text", value: l.value.slice(g) }), f.children.splice(b, 1, ...C)) : C = [l], b + C.length;
|
|
10788
10788
|
}
|
|
10789
10789
|
}
|
|
10790
10790
|
function iE(e) {
|
|
@@ -10957,13 +10957,13 @@ function _E(e) {
|
|
|
10957
10957
|
function AE(e) {
|
|
10958
10958
|
this.exit(e);
|
|
10959
10959
|
}
|
|
10960
|
-
function
|
|
10960
|
+
function CE(e) {
|
|
10961
10961
|
const t = this.resume(), n = this.stack[this.stack.length - 1];
|
|
10962
10962
|
n.type, n.identifier = mt(
|
|
10963
10963
|
this.sliceSerialize(e)
|
|
10964
10964
|
).toLowerCase(), n.label = t;
|
|
10965
10965
|
}
|
|
10966
|
-
function
|
|
10966
|
+
function wE(e) {
|
|
10967
10967
|
this.exit(e);
|
|
10968
10968
|
}
|
|
10969
10969
|
function IE() {
|
|
@@ -10988,8 +10988,8 @@ function NE() {
|
|
|
10988
10988
|
exit: {
|
|
10989
10989
|
gfmFootnoteCallString: _E,
|
|
10990
10990
|
gfmFootnoteCall: AE,
|
|
10991
|
-
gfmFootnoteDefinitionLabelString:
|
|
10992
|
-
gfmFootnoteDefinition:
|
|
10991
|
+
gfmFootnoteDefinitionLabelString: CE,
|
|
10992
|
+
gfmFootnoteDefinition: wE
|
|
10993
10993
|
}
|
|
10994
10994
|
};
|
|
10995
10995
|
}
|
|
@@ -11077,12 +11077,12 @@ function FE(e, t) {
|
|
|
11077
11077
|
const y = [], b = [];
|
|
11078
11078
|
let T = -1;
|
|
11079
11079
|
for (e[d].length > l && (l = e[d].length); ++T < e[d].length; ) {
|
|
11080
|
-
const
|
|
11080
|
+
const C = HE(e[d][T]);
|
|
11081
11081
|
if (n.alignDelimiters !== !1) {
|
|
11082
|
-
const v = i(
|
|
11082
|
+
const v = i(C);
|
|
11083
11083
|
b[T] = v, (u[T] === void 0 || v > u[T]) && (u[T] = v);
|
|
11084
11084
|
}
|
|
11085
|
-
y.push(
|
|
11085
|
+
y.push(C);
|
|
11086
11086
|
}
|
|
11087
11087
|
s[d] = y, o[d] = b;
|
|
11088
11088
|
}
|
|
@@ -11101,12 +11101,12 @@ function FE(e, t) {
|
|
|
11101
11101
|
const y = a[f];
|
|
11102
11102
|
let b = "", T = "";
|
|
11103
11103
|
y === 99 ? (b = ":", T = ":") : y === 108 ? b = ":" : y === 114 && (T = ":");
|
|
11104
|
-
let
|
|
11104
|
+
let C = n.alignDelimiters === !1 ? 1 : Math.max(
|
|
11105
11105
|
1,
|
|
11106
11106
|
u[f] - b.length - T.length
|
|
11107
11107
|
);
|
|
11108
|
-
const v = b + "-".repeat(
|
|
11109
|
-
n.alignDelimiters !== !1 && (
|
|
11108
|
+
const v = b + "-".repeat(C) + T;
|
|
11109
|
+
n.alignDelimiters !== !1 && (C = b.length + C + T.length, C > u[f] && (u[f] = C), p[f] = C), h[f] = v;
|
|
11110
11110
|
}
|
|
11111
11111
|
s.splice(1, 0, h), o.splice(1, 0, p), d = -1;
|
|
11112
11112
|
const g = [];
|
|
@@ -11115,7 +11115,7 @@ function FE(e, t) {
|
|
|
11115
11115
|
f = -1;
|
|
11116
11116
|
const T = [];
|
|
11117
11117
|
for (; ++f < l; ) {
|
|
11118
|
-
const
|
|
11118
|
+
const C = y[f] || "";
|
|
11119
11119
|
let v = "", D = "";
|
|
11120
11120
|
if (n.alignDelimiters !== !1) {
|
|
11121
11121
|
const M = u[f] - (b[f] || 0), N = a[f];
|
|
@@ -11123,7 +11123,7 @@ function FE(e, t) {
|
|
|
11123
11123
|
}
|
|
11124
11124
|
n.delimiterStart !== !1 && !f && T.push("|"), n.padding !== !1 && // Don’t add the opening space if we’re not aligning and the cell is
|
|
11125
11125
|
// empty: there will be a closing space.
|
|
11126
|
-
!(n.alignDelimiters === !1 &&
|
|
11126
|
+
!(n.alignDelimiters === !1 && C === "") && (n.delimiterStart !== !1 || f) && T.push(" "), n.alignDelimiters !== !1 && T.push(v), T.push(C), n.alignDelimiters !== !1 && T.push(D), n.padding !== !1 && T.push(" "), (n.delimiterEnd !== !1 || f !== l - 1) && T.push("|");
|
|
11127
11127
|
}
|
|
11128
11128
|
g.push(
|
|
11129
11129
|
n.delimiterEnd === !1 ? T.join("").replace(/ +$/, "") : T.join("")
|
|
@@ -11321,8 +11321,8 @@ function ni(e, t, n) {
|
|
|
11321
11321
|
{ inside: !1, outside: !1 }
|
|
11322
11322
|
);
|
|
11323
11323
|
}
|
|
11324
|
-
|
|
11325
|
-
function
|
|
11324
|
+
Cc.peek = KE;
|
|
11325
|
+
function Cc(e, t, n, r) {
|
|
11326
11326
|
const i = QE(n), a = n.enter("emphasis"), s = n.createTracker(r), o = s.move(i);
|
|
11327
11327
|
let u = s.move(
|
|
11328
11328
|
n.containerPhrasing(e, {
|
|
@@ -11351,9 +11351,9 @@ function KE(e, t, n) {
|
|
|
11351
11351
|
const XE = {};
|
|
11352
11352
|
function fs(e, t) {
|
|
11353
11353
|
const n = XE, r = typeof n.includeImageAlt == "boolean" ? n.includeImageAlt : !0, i = typeof n.includeHtml == "boolean" ? n.includeHtml : !0;
|
|
11354
|
-
return
|
|
11354
|
+
return wc(e, r, i);
|
|
11355
11355
|
}
|
|
11356
|
-
function
|
|
11356
|
+
function wc(e, t, n) {
|
|
11357
11357
|
if (ZE(e)) {
|
|
11358
11358
|
if ("value" in e)
|
|
11359
11359
|
return e.type === "html" && !n ? "" : e.value;
|
|
@@ -11368,7 +11368,7 @@ function Ro(e, t, n) {
|
|
|
11368
11368
|
const r = [];
|
|
11369
11369
|
let i = -1;
|
|
11370
11370
|
for (; ++i < e.length; )
|
|
11371
|
-
r[i] =
|
|
11371
|
+
r[i] = wc(e[i], t, n);
|
|
11372
11372
|
return r.join("");
|
|
11373
11373
|
}
|
|
11374
11374
|
function ZE(e) {
|
|
@@ -11376,7 +11376,7 @@ function ZE(e) {
|
|
|
11376
11376
|
}
|
|
11377
11377
|
function JE(e, t) {
|
|
11378
11378
|
let n = !1;
|
|
11379
|
-
return
|
|
11379
|
+
return wt(e, function(r) {
|
|
11380
11380
|
if ("value" in r && /\r?\n|\r/.test(r.value) || r.type === "break")
|
|
11381
11381
|
return n = !0, ha;
|
|
11382
11382
|
}), !!((!e.depth || e.depth < 3) && fs(e) && (t.options.setext || n));
|
|
@@ -11750,7 +11750,7 @@ const Mc = {
|
|
|
11750
11750
|
break: Lo,
|
|
11751
11751
|
code: YE,
|
|
11752
11752
|
definition: GE,
|
|
11753
|
-
emphasis:
|
|
11753
|
+
emphasis: Cc,
|
|
11754
11754
|
hardBreak: Lo,
|
|
11755
11755
|
heading: eT,
|
|
11756
11756
|
html: Ic,
|
|
@@ -11805,11 +11805,11 @@ function _T() {
|
|
|
11805
11805
|
table: AT,
|
|
11806
11806
|
tableData: Do,
|
|
11807
11807
|
tableHeader: Do,
|
|
11808
|
-
tableRow:
|
|
11808
|
+
tableRow: wT
|
|
11809
11809
|
},
|
|
11810
11810
|
exit: {
|
|
11811
11811
|
codeText: IT,
|
|
11812
|
-
table:
|
|
11812
|
+
table: CT,
|
|
11813
11813
|
tableData: Vi,
|
|
11814
11814
|
tableHeader: Vi,
|
|
11815
11815
|
tableRow: Vi
|
|
@@ -11829,10 +11829,10 @@ function AT(e) {
|
|
|
11829
11829
|
e
|
|
11830
11830
|
), this.data.inTable = !0;
|
|
11831
11831
|
}
|
|
11832
|
-
function
|
|
11832
|
+
function CT(e) {
|
|
11833
11833
|
this.exit(e), this.data.inTable = void 0;
|
|
11834
11834
|
}
|
|
11835
|
-
function
|
|
11835
|
+
function wT(e) {
|
|
11836
11836
|
this.enter({ type: "tableRow", children: [] }, e);
|
|
11837
11837
|
}
|
|
11838
11838
|
function Vi(e) {
|
|
@@ -11883,17 +11883,17 @@ function ST(e) {
|
|
|
11883
11883
|
return l(d(p, y, b), p.align);
|
|
11884
11884
|
}
|
|
11885
11885
|
function o(p, g, y, b) {
|
|
11886
|
-
const T = f(p, y, b),
|
|
11887
|
-
return
|
|
11886
|
+
const T = f(p, y, b), C = l([T]);
|
|
11887
|
+
return C.slice(0, C.indexOf(`
|
|
11888
11888
|
`));
|
|
11889
11889
|
}
|
|
11890
11890
|
function u(p, g, y, b) {
|
|
11891
|
-
const T = y.enter("tableCell"),
|
|
11891
|
+
const T = y.enter("tableCell"), C = y.enter("phrasing"), v = y.containerPhrasing(p, {
|
|
11892
11892
|
...b,
|
|
11893
11893
|
before: a,
|
|
11894
11894
|
after: a
|
|
11895
11895
|
});
|
|
11896
|
-
return
|
|
11896
|
+
return C(), T(), v;
|
|
11897
11897
|
}
|
|
11898
11898
|
function l(p, g) {
|
|
11899
11899
|
return FE(p, {
|
|
@@ -11909,18 +11909,18 @@ function ST(e) {
|
|
|
11909
11909
|
function d(p, g, y) {
|
|
11910
11910
|
const b = p.children;
|
|
11911
11911
|
let T = -1;
|
|
11912
|
-
const
|
|
11912
|
+
const C = [], v = g.enter("table");
|
|
11913
11913
|
for (; ++T < b.length; )
|
|
11914
|
-
|
|
11915
|
-
return v(),
|
|
11914
|
+
C[T] = f(b[T], g, y);
|
|
11915
|
+
return v(), C;
|
|
11916
11916
|
}
|
|
11917
11917
|
function f(p, g, y) {
|
|
11918
11918
|
const b = p.children;
|
|
11919
11919
|
let T = -1;
|
|
11920
|
-
const
|
|
11920
|
+
const C = [], v = g.enter("tableRow");
|
|
11921
11921
|
for (; ++T < b.length; )
|
|
11922
|
-
|
|
11923
|
-
return v(),
|
|
11922
|
+
C[T] = u(b[T], p, g, y);
|
|
11923
|
+
return v(), C;
|
|
11924
11924
|
}
|
|
11925
11925
|
function h(p, g, y) {
|
|
11926
11926
|
let b = Mc.inlineCode(p, g, y);
|
|
@@ -12523,13 +12523,13 @@ function ay(e, t, n) {
|
|
|
12523
12523
|
return e.enter("lineEnding"), e.consume(N), e.exit("lineEnding"), T;
|
|
12524
12524
|
}
|
|
12525
12525
|
function T(N) {
|
|
12526
|
-
return a > 0 && oe(N) ? pe(e,
|
|
12526
|
+
return a > 0 && oe(N) ? pe(e, C, "linePrefix", a + 1)(N) : C(N);
|
|
12527
12527
|
}
|
|
12528
|
-
function
|
|
12528
|
+
function C(N) {
|
|
12529
12529
|
return N === null || ee(N) ? e.check(Fo, y, D)(N) : (e.enter("codeFlowValue"), v(N));
|
|
12530
12530
|
}
|
|
12531
12531
|
function v(N) {
|
|
12532
|
-
return N === null || ee(N) ? (e.exit("codeFlowValue"),
|
|
12532
|
+
return N === null || ee(N) ? (e.exit("codeFlowValue"), C(N)) : (e.consume(N), v);
|
|
12533
12533
|
}
|
|
12534
12534
|
function D(N) {
|
|
12535
12535
|
return e.exit("codeFenced"), t(N);
|
|
@@ -12541,9 +12541,9 @@ function ay(e, t, n) {
|
|
|
12541
12541
|
return N.enter("lineEnding"), N.consume(B), N.exit("lineEnding"), L;
|
|
12542
12542
|
}
|
|
12543
12543
|
function L(B) {
|
|
12544
|
-
return N.enter("codeFencedFence"), oe(B) ? pe(N,
|
|
12544
|
+
return N.enter("codeFencedFence"), oe(B) ? pe(N, w, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(B) : w(B);
|
|
12545
12545
|
}
|
|
12546
|
-
function
|
|
12546
|
+
function w(B) {
|
|
12547
12547
|
return B === o ? (N.enter("codeFencedFenceSequence"), P(B)) : H(B);
|
|
12548
12548
|
}
|
|
12549
12549
|
function P(B) {
|
|
@@ -12857,8 +12857,8 @@ function my(e, t) {
|
|
|
12857
12857
|
// Find a void token that includes a break.
|
|
12858
12858
|
o[h][0] === "exit" && o[h - 1][0] === "enter" && o[h][1].type === o[h - 1][1].type && o[h][1].start.line !== o[h][1].end.line && (y = h + 1, b.push(y), p._tokenizer = void 0, p.previous = void 0, p = p.next);
|
|
12859
12859
|
for (s.events = [], p ? (p._tokenizer = void 0, p.previous = void 0) : b.pop(), h = b.length; h--; ) {
|
|
12860
|
-
const T = o.slice(b[h], b[h + 1]),
|
|
12861
|
-
u.push([
|
|
12860
|
+
const T = o.slice(b[h], b[h + 1]), C = a.pop();
|
|
12861
|
+
u.push([C, C + T.length - 1]), e.splice(C, 2, T);
|
|
12862
12862
|
}
|
|
12863
12863
|
for (u.reverse(), h = -1; ++h < u.length; )
|
|
12864
12864
|
l[g + u[h][0]] = g + u[h][1], g += u[h][1] - u[h][0] - 1;
|
|
@@ -13057,11 +13057,11 @@ function Ay(e, t, n) {
|
|
|
13057
13057
|
return o === null || ee(o) ? t(o) : n(o);
|
|
13058
13058
|
}
|
|
13059
13059
|
}
|
|
13060
|
-
const
|
|
13060
|
+
const Cy = {
|
|
13061
13061
|
name: "hardBreakEscape",
|
|
13062
|
-
tokenize:
|
|
13062
|
+
tokenize: wy
|
|
13063
13063
|
};
|
|
13064
|
-
function
|
|
13064
|
+
function wy(e, t, n) {
|
|
13065
13065
|
return r;
|
|
13066
13066
|
function r(a) {
|
|
13067
13067
|
return e.enter("hardBreakEscape"), e.consume(a), i;
|
|
@@ -13212,7 +13212,7 @@ function Py(e, t, n) {
|
|
|
13212
13212
|
}
|
|
13213
13213
|
function g(I) {
|
|
13214
13214
|
const Fe = "CDATA[";
|
|
13215
|
-
return I === Fe.charCodeAt(o++) ? (e.consume(I), o === Fe.length ? r.interrupt ? t :
|
|
13215
|
+
return I === Fe.charCodeAt(o++) ? (e.consume(I), o === Fe.length ? r.interrupt ? t : w : g) : n(I);
|
|
13216
13216
|
}
|
|
13217
13217
|
function y(I) {
|
|
13218
13218
|
return Ge(I) ? (e.consume(I), s = String.fromCharCode(I), b) : n(I);
|
|
@@ -13220,15 +13220,15 @@ function Py(e, t, n) {
|
|
|
13220
13220
|
function b(I) {
|
|
13221
13221
|
if (I === null || I === 47 || I === 62 || Ae(I)) {
|
|
13222
13222
|
const Fe = I === 47, he = s.toLowerCase();
|
|
13223
|
-
return !Fe && !a && Uo.includes(he) ? (i = 1, r.interrupt ? t(I) :
|
|
13223
|
+
return !Fe && !a && Uo.includes(he) ? (i = 1, r.interrupt ? t(I) : w(I)) : vy.includes(s.toLowerCase()) ? (i = 6, Fe ? (e.consume(I), T) : r.interrupt ? t(I) : w(I)) : (i = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(I) : a ? C(I) : v(I));
|
|
13224
13224
|
}
|
|
13225
13225
|
return I === 45 || qe(I) ? (e.consume(I), s += String.fromCharCode(I), b) : n(I);
|
|
13226
13226
|
}
|
|
13227
13227
|
function T(I) {
|
|
13228
|
-
return I === 62 ? (e.consume(I), r.interrupt ? t :
|
|
13228
|
+
return I === 62 ? (e.consume(I), r.interrupt ? t : w) : n(I);
|
|
13229
13229
|
}
|
|
13230
|
-
function
|
|
13231
|
-
return oe(I) ? (e.consume(I),
|
|
13230
|
+
function C(I) {
|
|
13231
|
+
return oe(I) ? (e.consume(I), C) : x(I);
|
|
13232
13232
|
}
|
|
13233
13233
|
function v(I) {
|
|
13234
13234
|
return I === 47 ? (e.consume(I), x) : I === 58 || I === 95 || Ge(I) ? (e.consume(I), D) : oe(I) ? (e.consume(I), v) : x(I);
|
|
@@ -13255,10 +13255,10 @@ function Py(e, t, n) {
|
|
|
13255
13255
|
return I === 62 ? (e.consume(I), L) : n(I);
|
|
13256
13256
|
}
|
|
13257
13257
|
function L(I) {
|
|
13258
|
-
return I === null || ee(I) ?
|
|
13258
|
+
return I === null || ee(I) ? w(I) : oe(I) ? (e.consume(I), L) : n(I);
|
|
13259
13259
|
}
|
|
13260
|
-
function
|
|
13261
|
-
return I === 45 && i === 2 ? (e.consume(I), R) : I === 60 && i === 1 ? (e.consume(I), W) : I === 62 && i === 4 ? (e.consume(I), ne) : I === 63 && i === 3 ? (e.consume(I), k) : I === 93 && i === 5 ? (e.consume(I), le) : ee(I) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(Ry, Ie, P)(I)) : I === null || ee(I) ? (e.exit("htmlFlowData"), P(I)) : (e.consume(I),
|
|
13260
|
+
function w(I) {
|
|
13261
|
+
return I === 45 && i === 2 ? (e.consume(I), R) : I === 60 && i === 1 ? (e.consume(I), W) : I === 62 && i === 4 ? (e.consume(I), ne) : I === 63 && i === 3 ? (e.consume(I), k) : I === 93 && i === 5 ? (e.consume(I), le) : ee(I) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(Ry, Ie, P)(I)) : I === null || ee(I) ? (e.exit("htmlFlowData"), P(I)) : (e.consume(I), w);
|
|
13262
13262
|
}
|
|
13263
13263
|
function P(I) {
|
|
13264
13264
|
return e.check(Oy, U, Ie)(I);
|
|
@@ -13267,26 +13267,26 @@ function Py(e, t, n) {
|
|
|
13267
13267
|
return e.enter("lineEnding"), e.consume(I), e.exit("lineEnding"), B;
|
|
13268
13268
|
}
|
|
13269
13269
|
function B(I) {
|
|
13270
|
-
return I === null || ee(I) ? P(I) : (e.enter("htmlFlowData"),
|
|
13270
|
+
return I === null || ee(I) ? P(I) : (e.enter("htmlFlowData"), w(I));
|
|
13271
13271
|
}
|
|
13272
13272
|
function R(I) {
|
|
13273
|
-
return I === 45 ? (e.consume(I), k) :
|
|
13273
|
+
return I === 45 ? (e.consume(I), k) : w(I);
|
|
13274
13274
|
}
|
|
13275
13275
|
function W(I) {
|
|
13276
|
-
return I === 47 ? (e.consume(I), s = "", X) :
|
|
13276
|
+
return I === 47 ? (e.consume(I), s = "", X) : w(I);
|
|
13277
13277
|
}
|
|
13278
13278
|
function X(I) {
|
|
13279
13279
|
if (I === 62) {
|
|
13280
13280
|
const Fe = s.toLowerCase();
|
|
13281
|
-
return Uo.includes(Fe) ? (e.consume(I), ne) :
|
|
13281
|
+
return Uo.includes(Fe) ? (e.consume(I), ne) : w(I);
|
|
13282
13282
|
}
|
|
13283
|
-
return Ge(I) && s.length < 8 ? (e.consume(I), s += String.fromCharCode(I), X) :
|
|
13283
|
+
return Ge(I) && s.length < 8 ? (e.consume(I), s += String.fromCharCode(I), X) : w(I);
|
|
13284
13284
|
}
|
|
13285
13285
|
function le(I) {
|
|
13286
|
-
return I === 93 ? (e.consume(I), k) :
|
|
13286
|
+
return I === 93 ? (e.consume(I), k) : w(I);
|
|
13287
13287
|
}
|
|
13288
13288
|
function k(I) {
|
|
13289
|
-
return I === 62 ? (e.consume(I), ne) : I === 45 && i === 2 ? (e.consume(I), k) :
|
|
13289
|
+
return I === 62 ? (e.consume(I), ne) : I === 45 && i === 2 ? (e.consume(I), k) : w(I);
|
|
13290
13290
|
}
|
|
13291
13291
|
function ne(I) {
|
|
13292
13292
|
return I === null || ee(I) ? (e.exit("htmlFlowData"), Ie(I)) : (e.consume(I), ne);
|
|
@@ -13326,7 +13326,7 @@ function Hy(e, t, n) {
|
|
|
13326
13326
|
return k === 33 ? (e.consume(k), l) : k === 47 ? (e.consume(k), M) : k === 63 ? (e.consume(k), v) : Ge(k) ? (e.consume(k), H) : n(k);
|
|
13327
13327
|
}
|
|
13328
13328
|
function l(k) {
|
|
13329
|
-
return k === 45 ? (e.consume(k), d) : k === 91 ? (e.consume(k), a = 0, g) : Ge(k) ? (e.consume(k),
|
|
13329
|
+
return k === 45 ? (e.consume(k), d) : k === 91 ? (e.consume(k), a = 0, g) : Ge(k) ? (e.consume(k), C) : n(k);
|
|
13330
13330
|
}
|
|
13331
13331
|
function d(k) {
|
|
13332
13332
|
return k === 45 ? (e.consume(k), p) : n(k);
|
|
@@ -13353,8 +13353,8 @@ function Hy(e, t, n) {
|
|
|
13353
13353
|
function T(k) {
|
|
13354
13354
|
return k === 62 ? R(k) : k === 93 ? (e.consume(k), T) : y(k);
|
|
13355
13355
|
}
|
|
13356
|
-
function
|
|
13357
|
-
return k === null || k === 62 ? R(k) : ee(k) ? (s =
|
|
13356
|
+
function C(k) {
|
|
13357
|
+
return k === null || k === 62 ? R(k) : ee(k) ? (s = C, W(k)) : (e.consume(k), C);
|
|
13358
13358
|
}
|
|
13359
13359
|
function v(k) {
|
|
13360
13360
|
return k === null ? n(k) : k === 63 ? (e.consume(k), D) : ee(k) ? (s = v, W(k)) : (e.consume(k), v);
|
|
@@ -13381,10 +13381,10 @@ function Hy(e, t, n) {
|
|
|
13381
13381
|
return k === 45 || k === 46 || k === 58 || k === 95 || qe(k) ? (e.consume(k), x) : L(k);
|
|
13382
13382
|
}
|
|
13383
13383
|
function L(k) {
|
|
13384
|
-
return k === 61 ? (e.consume(k),
|
|
13384
|
+
return k === 61 ? (e.consume(k), w) : ee(k) ? (s = L, W(k)) : oe(k) ? (e.consume(k), L) : S(k);
|
|
13385
13385
|
}
|
|
13386
|
-
function
|
|
13387
|
-
return k === null || k === 60 || k === 61 || k === 62 || k === 96 ? n(k) : k === 34 || k === 39 ? (e.consume(k), i = k, P) : ee(k) ? (s =
|
|
13386
|
+
function w(k) {
|
|
13387
|
+
return k === null || k === 60 || k === 61 || k === 62 || k === 96 ? n(k) : k === 34 || k === 39 ? (e.consume(k), i = k, P) : ee(k) ? (s = w, W(k)) : oe(k) ? (e.consume(k), w) : (e.consume(k), U);
|
|
13388
13388
|
}
|
|
13389
13389
|
function P(k) {
|
|
13390
13390
|
return k === i ? (e.consume(k), i = void 0, B) : k === null ? n(k) : ee(k) ? (s = P, W(k)) : (e.consume(k), P);
|
|
@@ -14087,7 +14087,7 @@ function _2() {
|
|
|
14087
14087
|
null: {
|
|
14088
14088
|
name: "table",
|
|
14089
14089
|
tokenize: A2,
|
|
14090
|
-
resolveAll:
|
|
14090
|
+
resolveAll: C2
|
|
14091
14091
|
}
|
|
14092
14092
|
}
|
|
14093
14093
|
};
|
|
@@ -14104,7 +14104,7 @@ function A2(e, t, n) {
|
|
|
14104
14104
|
U === "linePrefix") L--;
|
|
14105
14105
|
else break;
|
|
14106
14106
|
}
|
|
14107
|
-
const
|
|
14107
|
+
const w = L > -1 ? r.events[L][1].type : null, P = w === "tableHead" || w === "tableRow" ? N : u;
|
|
14108
14108
|
return P === N && r.parser.lazy[r.now().line] ? n(x) : P(x);
|
|
14109
14109
|
}
|
|
14110
14110
|
function u(x) {
|
|
@@ -14135,10 +14135,10 @@ function A2(e, t, n) {
|
|
|
14135
14135
|
return x === 58 ? (a += 1, s = !0, e.enter("tableDelimiterMarker"), e.consume(x), e.exit("tableDelimiterMarker"), T) : x === 45 ? (a += 1, T(x)) : x === null || ee(x) ? D(x) : M(x);
|
|
14136
14136
|
}
|
|
14137
14137
|
function T(x) {
|
|
14138
|
-
return x === 45 ? (e.enter("tableDelimiterFiller"),
|
|
14138
|
+
return x === 45 ? (e.enter("tableDelimiterFiller"), C(x)) : M(x);
|
|
14139
14139
|
}
|
|
14140
|
-
function
|
|
14141
|
-
return x === 45 ? (e.consume(x),
|
|
14140
|
+
function C(x) {
|
|
14141
|
+
return x === 45 ? (e.consume(x), C) : x === 58 ? (s = !0, e.exit("tableDelimiterFiller"), e.enter("tableDelimiterMarker"), e.consume(x), e.exit("tableDelimiterMarker"), v) : (e.exit("tableDelimiterFiller"), v(x));
|
|
14142
14142
|
}
|
|
14143
14143
|
function v(x) {
|
|
14144
14144
|
return oe(x) ? pe(e, D, "whitespace")(x) : D(x);
|
|
@@ -14162,7 +14162,7 @@ function A2(e, t, n) {
|
|
|
14162
14162
|
return x === 92 || x === 124 ? (e.consume(x), H) : H(x);
|
|
14163
14163
|
}
|
|
14164
14164
|
}
|
|
14165
|
-
function
|
|
14165
|
+
function C2(e, t) {
|
|
14166
14166
|
let n = -1, r = !0, i = 0, a = [0, 0, 0, 0], s = [0, 0, 0, 0], o = !1, u = 0, l, d, f;
|
|
14167
14167
|
const h = new y2();
|
|
14168
14168
|
for (; ++n < e.length; ) {
|
|
@@ -14219,14 +14219,14 @@ function kn(e, t) {
|
|
|
14219
14219
|
const n = e[t], r = n[0] === "enter" ? "start" : "end";
|
|
14220
14220
|
return n[1][r];
|
|
14221
14221
|
}
|
|
14222
|
-
const
|
|
14222
|
+
const w2 = {
|
|
14223
14223
|
name: "tasklistCheck",
|
|
14224
14224
|
tokenize: N2
|
|
14225
14225
|
};
|
|
14226
14226
|
function I2() {
|
|
14227
14227
|
return {
|
|
14228
14228
|
text: {
|
|
14229
|
-
91:
|
|
14229
|
+
91: w2
|
|
14230
14230
|
}
|
|
14231
14231
|
};
|
|
14232
14232
|
}
|
|
@@ -14568,7 +14568,7 @@ var O2 = Object.defineProperty, D2 = Object.defineProperties, P2 = Object.getOwn
|
|
|
14568
14568
|
let t = 0, n = !1;
|
|
14569
14569
|
for (let r = 0; r < e.length - 1; r += 1) e[r] === "`" && !od(e, r) && (n = !n), !n && e[r] === "$" && e[r + 1] === "$" && (t += 1, r += 1);
|
|
14570
14570
|
return t;
|
|
14571
|
-
},
|
|
14571
|
+
}, Ck = (e) => {
|
|
14572
14572
|
let t = 0, n = !1;
|
|
14573
14573
|
for (let r = 0; r < e.length; r += 1) {
|
|
14574
14574
|
if (e[r] === "\\") {
|
|
@@ -14582,14 +14582,14 @@ var O2 = Object.defineProperty, D2 = Object.defineProperties, P2 = Object.getOwn
|
|
|
14582
14582
|
!n && e[r] === "$" && (r + 1 < e.length && e[r + 1] === "$" ? r += 1 : t += 1);
|
|
14583
14583
|
}
|
|
14584
14584
|
return t;
|
|
14585
|
-
},
|
|
14585
|
+
}, wk = (e) => {
|
|
14586
14586
|
if (e.endsWith("$") && !e.endsWith("$$")) return `${e}$`;
|
|
14587
14587
|
let t = e.indexOf("$$");
|
|
14588
14588
|
return t !== -1 && e.indexOf(`
|
|
14589
14589
|
`, t) !== -1 && !e.endsWith(`
|
|
14590
14590
|
`) ? `${e}
|
|
14591
14591
|
$$` : `${e}$$`;
|
|
14592
|
-
}, Ik = (e) => Ak(e) % 2 === 0 ? e :
|
|
14592
|
+
}, Ik = (e) => Ak(e) % 2 === 0 ? e : wk(e), Nk = (e) => Ck(e) % 2 === 1 ? `${e}$` : e, Sk = (e, t, n) => {
|
|
14593
14593
|
if (e.substring(t + 2).includes(")")) return null;
|
|
14594
14594
|
let r = ek(e, t);
|
|
14595
14595
|
if (r === -1 || Ke(e, r)) return null;
|
|
@@ -14823,7 +14823,7 @@ const jk = (e, t) => {
|
|
|
14823
14823
|
a in n ? n[a] = s : i(a, s);
|
|
14824
14824
|
}
|
|
14825
14825
|
};
|
|
14826
|
-
},
|
|
14826
|
+
}, Ca = "!", Qo = ":", rx = [], Ko = (e, t, n, r, i) => ({
|
|
14827
14827
|
modifiers: e,
|
|
14828
14828
|
hasImportantModifier: t,
|
|
14829
14829
|
baseClassName: n,
|
|
@@ -14854,12 +14854,12 @@ const jk = (e, t) => {
|
|
|
14854
14854
|
}
|
|
14855
14855
|
const f = a.length === 0 ? i : i.slice(u);
|
|
14856
14856
|
let h = f, p = !1;
|
|
14857
|
-
f.endsWith(
|
|
14857
|
+
f.endsWith(Ca) ? (h = f.slice(0, -1), p = !0) : (
|
|
14858
14858
|
/**
|
|
14859
14859
|
* In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
|
|
14860
14860
|
* @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
|
|
14861
14861
|
*/
|
|
14862
|
-
f.startsWith(
|
|
14862
|
+
f.startsWith(Ca) && (h = f.slice(1), p = !0)
|
|
14863
14863
|
);
|
|
14864
14864
|
const g = l && l > u ? l - u : void 0;
|
|
14865
14865
|
return Ko(a, p, h, g);
|
|
@@ -14922,30 +14922,30 @@ const jk = (e, t) => {
|
|
|
14922
14922
|
l = f + (l.length > 0 ? " " + l : l);
|
|
14923
14923
|
continue;
|
|
14924
14924
|
}
|
|
14925
|
-
let T = !!b,
|
|
14925
|
+
let T = !!b, C;
|
|
14926
14926
|
if (T) {
|
|
14927
14927
|
const $ = y.substring(0, b);
|
|
14928
|
-
|
|
14929
|
-
const H =
|
|
14930
|
-
H && H !==
|
|
14928
|
+
C = r($);
|
|
14929
|
+
const H = C && s[C] ? r(y) : void 0;
|
|
14930
|
+
H && H !== C && (C = H, T = !1);
|
|
14931
14931
|
} else
|
|
14932
|
-
|
|
14933
|
-
if (!
|
|
14932
|
+
C = r(y);
|
|
14933
|
+
if (!C) {
|
|
14934
14934
|
if (!T) {
|
|
14935
14935
|
l = f + (l.length > 0 ? " " + l : l);
|
|
14936
14936
|
continue;
|
|
14937
14937
|
}
|
|
14938
|
-
if (
|
|
14938
|
+
if (C = r(y), !C) {
|
|
14939
14939
|
l = f + (l.length > 0 ? " " + l : l);
|
|
14940
14940
|
continue;
|
|
14941
14941
|
}
|
|
14942
14942
|
T = !1;
|
|
14943
14943
|
}
|
|
14944
|
-
const v = p.length === 0 ? "" : p.length === 1 ? p[0] : a(p).join(":"), D = g ? v +
|
|
14944
|
+
const v = p.length === 0 ? "" : p.length === 1 ? p[0] : a(p).join(":"), D = g ? v + Ca : v, M = D + C;
|
|
14945
14945
|
if (o.indexOf(M) > -1)
|
|
14946
14946
|
continue;
|
|
14947
14947
|
o.push(M);
|
|
14948
|
-
const N = i(
|
|
14948
|
+
const N = i(C, T);
|
|
14949
14949
|
for (let $ = 0; $ < N.length; ++$) {
|
|
14950
14950
|
const H = N[$];
|
|
14951
14951
|
o.push(D + H);
|
|
@@ -14986,14 +14986,14 @@ const jk = (e, t) => {
|
|
|
14986
14986
|
// For example, `hsl(0 0% 0%)` would be classified as a length without this check.
|
|
14987
14987
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
14988
14988
|
mx.test(e) && !gx.test(e)
|
|
14989
|
-
), ys = () => !1, yx = (e) => bx.test(e), kx = (e) => Ex.test(e), xx = (e) => !Q(e) && !K(e), _x = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), Ax = (e) => Gt(e, Ed, ys), Q = (e) => hd.test(e), Jt = (e) => Gt(e, Td, Tx), Xo = (e) => Gt(e, Rx, ie),
|
|
14989
|
+
), ys = () => !1, yx = (e) => bx.test(e), kx = (e) => Ex.test(e), xx = (e) => !Q(e) && !K(e), _x = (e) => e.startsWith("@container") && (e[10] === "/" && e[11] !== void 0 || e[11] === "s" && e[16] !== void 0 && e.startsWith("-size/", 10) || e[11] === "n" && e[18] !== void 0 && e.startsWith("-normal/", 10)), Ax = (e) => Gt(e, Ed, ys), Q = (e) => hd.test(e), Jt = (e) => Gt(e, Td, Tx), Xo = (e) => Gt(e, Rx, ie), Cx = (e) => Gt(e, kd, md), wx = (e) => Gt(e, yd, ys), Zo = (e) => Gt(e, gd, ys), Ix = (e) => Gt(e, bd, kx), Dr = (e) => Gt(e, xd, yx), K = (e) => pd.test(e), Vn = (e) => mn(e, Td), Nx = (e) => mn(e, yd), Jo = (e) => mn(e, gd), Sx = (e) => mn(e, Ed), vx = (e) => mn(e, bd), Pr = (e) => mn(e, xd, !0), Lx = (e) => mn(e, kd, !0), Gt = (e, t, n) => {
|
|
14990
14990
|
const r = hd.exec(e);
|
|
14991
14991
|
return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
|
|
14992
14992
|
}, mn = (e, t, n = !1) => {
|
|
14993
14993
|
const r = pd.exec(e);
|
|
14994
14994
|
return r ? r[1] ? t(r[1]) : n : !1;
|
|
14995
14995
|
}, gd = (e) => e === "position" || e === "percentage", bd = (e) => e === "image" || e === "url", Ed = (e) => e === "length" || e === "size" || e === "bg-size", Td = (e) => e === "length", Rx = (e) => e === "number", yd = (e) => e === "family-name", kd = (e) => e === "number" || e === "weight", xd = (e) => e === "shadow", Ox = () => {
|
|
14996
|
-
const e = Be("color"), t = Be("font"), n = Be("text"), r = Be("font-weight"), i = Be("tracking"), a = Be("leading"), s = Be("breakpoint"), o = Be("container"), u = Be("spacing"), l = Be("radius"), d = Be("shadow"), f = Be("inset-shadow"), h = Be("text-shadow"), p = Be("drop-shadow"), g = Be("blur"), y = Be("perspective"), b = Be("aspect"), T = Be("ease"),
|
|
14996
|
+
const e = Be("color"), t = Be("font"), n = Be("text"), r = Be("font-weight"), i = Be("tracking"), a = Be("leading"), s = Be("breakpoint"), o = Be("container"), u = Be("spacing"), l = Be("radius"), d = Be("shadow"), f = Be("inset-shadow"), h = Be("text-shadow"), p = Be("drop-shadow"), g = Be("blur"), y = Be("perspective"), b = Be("aspect"), T = Be("ease"), C = Be("animate"), v = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], D = () => [
|
|
14997
14997
|
"center",
|
|
14998
14998
|
"top",
|
|
14999
14999
|
"bottom",
|
|
@@ -15013,7 +15013,7 @@ const jk = (e, t) => {
|
|
|
15013
15013
|
"left-bottom"
|
|
15014
15014
|
], M = () => [...D(), K, Q], N = () => ["auto", "hidden", "clip", "visible", "scroll"], $ = () => ["auto", "contain", "none"], H = () => [K, Q, u], S = () => [Ft, "full", "auto", ...H()], x = () => [yt, "none", "subgrid", K, Q], L = () => ["auto", {
|
|
15015
15015
|
span: ["full", yt, K, Q]
|
|
15016
|
-
}, yt, K, Q],
|
|
15016
|
+
}, yt, K, Q], w = () => [yt, "auto", K, Q], P = () => ["auto", "min", "max", "fr", K, Q], U = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], B = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], R = () => ["auto", ...H()], W = () => [Ft, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...H()], X = () => [Ft, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...H()], le = () => [Ft, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...H()], k = () => [e, K, Q], ne = () => [...D(), Jo, Zo, {
|
|
15017
15017
|
position: [K, Q]
|
|
15018
15018
|
}], Ie = () => ["no-repeat", {
|
|
15019
15019
|
repeat: ["", "x", "y", "space", "round"]
|
|
@@ -15391,14 +15391,14 @@ const jk = (e, t) => {
|
|
|
15391
15391
|
* @see https://tailwindcss.com/docs/grid-column
|
|
15392
15392
|
*/
|
|
15393
15393
|
"col-start": [{
|
|
15394
|
-
"col-start":
|
|
15394
|
+
"col-start": w()
|
|
15395
15395
|
}],
|
|
15396
15396
|
/**
|
|
15397
15397
|
* Grid Column End
|
|
15398
15398
|
* @see https://tailwindcss.com/docs/grid-column
|
|
15399
15399
|
*/
|
|
15400
15400
|
"col-end": [{
|
|
15401
|
-
"col-end":
|
|
15401
|
+
"col-end": w()
|
|
15402
15402
|
}],
|
|
15403
15403
|
/**
|
|
15404
15404
|
* Grid Template Rows
|
|
@@ -15419,14 +15419,14 @@ const jk = (e, t) => {
|
|
|
15419
15419
|
* @see https://tailwindcss.com/docs/grid-row
|
|
15420
15420
|
*/
|
|
15421
15421
|
"row-start": [{
|
|
15422
|
-
"row-start":
|
|
15422
|
+
"row-start": w()
|
|
15423
15423
|
}],
|
|
15424
15424
|
/**
|
|
15425
15425
|
* Grid Row End
|
|
15426
15426
|
* @see https://tailwindcss.com/docs/grid-row
|
|
15427
15427
|
*/
|
|
15428
15428
|
"row-end": [{
|
|
15429
|
-
"row-end":
|
|
15429
|
+
"row-end": w()
|
|
15430
15430
|
}],
|
|
15431
15431
|
/**
|
|
15432
15432
|
* Grid Auto Flow
|
|
@@ -15852,7 +15852,7 @@ const jk = (e, t) => {
|
|
|
15852
15852
|
* @see https://tailwindcss.com/docs/font-weight
|
|
15853
15853
|
*/
|
|
15854
15854
|
"font-weight": [{
|
|
15855
|
-
font: [r, Lx,
|
|
15855
|
+
font: [r, Lx, Cx]
|
|
15856
15856
|
}],
|
|
15857
15857
|
/**
|
|
15858
15858
|
* Font Stretch
|
|
@@ -15866,7 +15866,7 @@ const jk = (e, t) => {
|
|
|
15866
15866
|
* @see https://tailwindcss.com/docs/font-family
|
|
15867
15867
|
*/
|
|
15868
15868
|
"font-family": [{
|
|
15869
|
-
font: [Nx,
|
|
15869
|
+
font: [Nx, wx, t]
|
|
15870
15870
|
}],
|
|
15871
15871
|
/**
|
|
15872
15872
|
* Font Feature Settings
|
|
@@ -17100,7 +17100,7 @@ const jk = (e, t) => {
|
|
|
17100
17100
|
* @see https://tailwindcss.com/docs/animation
|
|
17101
17101
|
*/
|
|
17102
17102
|
animate: [{
|
|
17103
|
-
animate: ["none",
|
|
17103
|
+
animate: ["none", C, K, Q]
|
|
17104
17104
|
}],
|
|
17105
17105
|
// ------------------
|
|
17106
17106
|
// --- Transforms ---
|
|
@@ -17702,28 +17702,28 @@ function Hx() {
|
|
|
17702
17702
|
throw new TypeError("First argument must be a string");
|
|
17703
17703
|
if (!b) return [];
|
|
17704
17704
|
T = T || {};
|
|
17705
|
-
var
|
|
17705
|
+
var C = 1, v = 1;
|
|
17706
17706
|
function D(U) {
|
|
17707
17707
|
var B = U.match(t);
|
|
17708
|
-
B && (
|
|
17708
|
+
B && (C += B.length);
|
|
17709
17709
|
var R = U.lastIndexOf(u);
|
|
17710
17710
|
v = ~R ? U.length - R : v + U.length;
|
|
17711
17711
|
}
|
|
17712
17712
|
function M() {
|
|
17713
|
-
var U = { line:
|
|
17713
|
+
var U = { line: C, column: v };
|
|
17714
17714
|
return function(B) {
|
|
17715
17715
|
return B.position = new N(U), S(), B;
|
|
17716
17716
|
};
|
|
17717
17717
|
}
|
|
17718
17718
|
function N(U) {
|
|
17719
|
-
this.start = U, this.end = { line:
|
|
17719
|
+
this.start = U, this.end = { line: C, column: v }, this.source = T.source;
|
|
17720
17720
|
}
|
|
17721
17721
|
N.prototype.content = b;
|
|
17722
17722
|
function $(U) {
|
|
17723
17723
|
var B = new Error(
|
|
17724
|
-
T.source + ":" +
|
|
17724
|
+
T.source + ":" + C + ":" + v + ": " + U
|
|
17725
17725
|
);
|
|
17726
|
-
if (B.reason = U, B.filename = T.source, B.line =
|
|
17726
|
+
if (B.reason = U, B.filename = T.source, B.line = C, B.column = v, B.source = b, !T.silent) throw B;
|
|
17727
17727
|
}
|
|
17728
17728
|
function H(U) {
|
|
17729
17729
|
var B = U.exec(b);
|
|
@@ -17755,7 +17755,7 @@ function Hx() {
|
|
|
17755
17755
|
});
|
|
17756
17756
|
}
|
|
17757
17757
|
}
|
|
17758
|
-
function
|
|
17758
|
+
function w() {
|
|
17759
17759
|
var U = M(), B = H(r);
|
|
17760
17760
|
if (B) {
|
|
17761
17761
|
if (L(), !H(i)) return $("property missing ':'");
|
|
@@ -17770,7 +17770,7 @@ function Hx() {
|
|
|
17770
17770
|
function P() {
|
|
17771
17771
|
var U = [];
|
|
17772
17772
|
x(U);
|
|
17773
|
-
for (var B; B =
|
|
17773
|
+
for (var B; B = w(); )
|
|
17774
17774
|
B !== !1 && (U.push(B), x(U));
|
|
17775
17775
|
return U;
|
|
17776
17776
|
}
|
|
@@ -17837,13 +17837,13 @@ function $x() {
|
|
|
17837
17837
|
var qx = $x();
|
|
17838
17838
|
const jx = /* @__PURE__ */ Ad(qx);
|
|
17839
17839
|
function fr(e) {
|
|
17840
|
-
return !e || typeof e != "object" ? "" : "position" in e || "type" in e ? su(e.position) : "start" in e || "end" in e ? su(e) : "line" in e || "column" in e ?
|
|
17840
|
+
return !e || typeof e != "object" ? "" : "position" in e || "type" in e ? su(e.position) : "start" in e || "end" in e ? su(e) : "line" in e || "column" in e ? wa(e) : "";
|
|
17841
17841
|
}
|
|
17842
|
-
function
|
|
17842
|
+
function wa(e) {
|
|
17843
17843
|
return ou(e && e.line) + ":" + ou(e && e.column);
|
|
17844
17844
|
}
|
|
17845
17845
|
function su(e) {
|
|
17846
|
-
return
|
|
17846
|
+
return wa(e && e.start) + "-" + wa(e && e.end);
|
|
17847
17847
|
}
|
|
17848
17848
|
function ou(e) {
|
|
17849
17849
|
return e && typeof e == "number" ? e : 1;
|
|
@@ -17935,7 +17935,7 @@ Ve.prototype.fatal = void 0;
|
|
|
17935
17935
|
Ve.prototype.place = void 0;
|
|
17936
17936
|
Ve.prototype.ruleId = void 0;
|
|
17937
17937
|
Ve.prototype.source = void 0;
|
|
17938
|
-
const ks = {}.hasOwnProperty, Vx = /* @__PURE__ */ new Map(), Yx = /[A-Z]/g, Wx = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]), Gx = /* @__PURE__ */ new Set(["td", "th"]),
|
|
17938
|
+
const ks = {}.hasOwnProperty, Vx = /* @__PURE__ */ new Map(), Yx = /[A-Z]/g, Wx = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]), Gx = /* @__PURE__ */ new Set(["td", "th"]), Cd = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
|
|
17939
17939
|
function Qx(e, t) {
|
|
17940
17940
|
if (!t || t.Fragment === void 0)
|
|
17941
17941
|
throw new TypeError("Expected `Fragment` in options");
|
|
@@ -17968,7 +17968,7 @@ function Qx(e, t) {
|
|
|
17968
17968
|
schema: t.space === "svg" ? Yt : yr,
|
|
17969
17969
|
stylePropertyNameCase: t.stylePropertyNameCase || "dom",
|
|
17970
17970
|
tableCellAlignToStyle: t.tableCellAlignToStyle !== !1
|
|
17971
|
-
}, a =
|
|
17971
|
+
}, a = wd(i, e, void 0);
|
|
17972
17972
|
return a && typeof a != "string" ? a : i.create(
|
|
17973
17973
|
e,
|
|
17974
17974
|
i.Fragment,
|
|
@@ -17976,7 +17976,7 @@ function Qx(e, t) {
|
|
|
17976
17976
|
void 0
|
|
17977
17977
|
);
|
|
17978
17978
|
}
|
|
17979
|
-
function
|
|
17979
|
+
function wd(e, t, n) {
|
|
17980
17980
|
if (t.type === "element")
|
|
17981
17981
|
return Kx(e, t, n);
|
|
17982
17982
|
if (t.type === "mdxFlowExpression" || t.type === "mdxTextExpression")
|
|
@@ -18130,7 +18130,7 @@ function _s(e, t) {
|
|
|
18130
18130
|
s = u + "-" + l, i.set(u, l + 1);
|
|
18131
18131
|
}
|
|
18132
18132
|
}
|
|
18133
|
-
const o =
|
|
18133
|
+
const o = wd(e, a, s);
|
|
18134
18134
|
o !== void 0 && n.push(o);
|
|
18135
18135
|
}
|
|
18136
18136
|
return n;
|
|
@@ -18163,7 +18163,7 @@ function o_(e, t) {
|
|
|
18163
18163
|
ruleId: "style",
|
|
18164
18164
|
source: "hast-util-to-jsx-runtime"
|
|
18165
18165
|
});
|
|
18166
|
-
throw i.file = e.filePath || void 0, i.url =
|
|
18166
|
+
throw i.file = e.filePath || void 0, i.url = Cd + "#cannot-parse-style-attribute", i;
|
|
18167
18167
|
}
|
|
18168
18168
|
}
|
|
18169
18169
|
function Nd(e, t, n) {
|
|
@@ -18207,7 +18207,7 @@ function Er(e, t) {
|
|
|
18207
18207
|
source: "hast-util-to-jsx-runtime"
|
|
18208
18208
|
}
|
|
18209
18209
|
);
|
|
18210
|
-
throw n.file = e.filePath || void 0, n.url =
|
|
18210
|
+
throw n.file = e.filePath || void 0, n.url = Cd + "#cannot-handle-mdx-estrees-without-createevaluater", n;
|
|
18211
18211
|
}
|
|
18212
18212
|
function u_(e) {
|
|
18213
18213
|
const t = {};
|
|
@@ -18295,7 +18295,7 @@ function p_(e) {
|
|
|
18295
18295
|
}
|
|
18296
18296
|
function u(v) {
|
|
18297
18297
|
if (r++, t.containerState._closeFlow) {
|
|
18298
|
-
t.containerState._closeFlow = void 0, i &&
|
|
18298
|
+
t.containerState._closeFlow = void 0, i && C();
|
|
18299
18299
|
const D = t.events.length;
|
|
18300
18300
|
let M = D, N;
|
|
18301
18301
|
for (; M--; )
|
|
@@ -18324,7 +18324,7 @@ function p_(e) {
|
|
|
18324
18324
|
return t.containerState = {}, e.check(uu, d, f)(v);
|
|
18325
18325
|
}
|
|
18326
18326
|
function d(v) {
|
|
18327
|
-
return i &&
|
|
18327
|
+
return i && C(), T(r), h(v);
|
|
18328
18328
|
}
|
|
18329
18329
|
function f(v) {
|
|
18330
18330
|
return t.parser.lazy[t.now().line] = r !== n.length, s = t.now().offset, g(v);
|
|
@@ -18337,7 +18337,7 @@ function p_(e) {
|
|
|
18337
18337
|
}
|
|
18338
18338
|
function g(v) {
|
|
18339
18339
|
if (v === null) {
|
|
18340
|
-
i &&
|
|
18340
|
+
i && C(), T(0), e.consume(v);
|
|
18341
18341
|
return;
|
|
18342
18342
|
}
|
|
18343
18343
|
return i = i || t.parser.flow(t.now()), e.enter("chunkFlow", {
|
|
@@ -18390,7 +18390,7 @@ function p_(e) {
|
|
|
18390
18390
|
}
|
|
18391
18391
|
n.length = v;
|
|
18392
18392
|
}
|
|
18393
|
-
function
|
|
18393
|
+
function C() {
|
|
18394
18394
|
i.write([null]), a = void 0, i = void 0, t.containerState._closeFlow = void 0;
|
|
18395
18395
|
}
|
|
18396
18396
|
}
|
|
@@ -18535,7 +18535,7 @@ const x_ = {
|
|
|
18535
18535
|
[-2]: Yi,
|
|
18536
18536
|
[-1]: Yi,
|
|
18537
18537
|
32: Yi
|
|
18538
|
-
},
|
|
18538
|
+
}, C_ = {
|
|
18539
18539
|
35: Iy,
|
|
18540
18540
|
42: qr,
|
|
18541
18541
|
45: [zo, qr],
|
|
@@ -18544,7 +18544,7 @@ const x_ = {
|
|
|
18544
18544
|
95: qr,
|
|
18545
18545
|
96: Ho,
|
|
18546
18546
|
126: Ho
|
|
18547
|
-
},
|
|
18547
|
+
}, w_ = {
|
|
18548
18548
|
38: Qc,
|
|
18549
18549
|
92: Gc
|
|
18550
18550
|
}, I_ = {
|
|
@@ -18556,7 +18556,7 @@ const x_ = {
|
|
|
18556
18556
|
42: Aa,
|
|
18557
18557
|
60: [XT, Fy],
|
|
18558
18558
|
91: Xy,
|
|
18559
|
-
92: [
|
|
18559
|
+
92: [Cy, Gc],
|
|
18560
18560
|
93: gs,
|
|
18561
18561
|
95: Aa,
|
|
18562
18562
|
96: cy
|
|
@@ -18572,10 +18572,10 @@ const x_ = {
|
|
|
18572
18572
|
contentInitial: __,
|
|
18573
18573
|
disable: v_,
|
|
18574
18574
|
document: x_,
|
|
18575
|
-
flow:
|
|
18575
|
+
flow: C_,
|
|
18576
18576
|
flowInitial: A_,
|
|
18577
18577
|
insideSpan: N_,
|
|
18578
|
-
string:
|
|
18578
|
+
string: w_,
|
|
18579
18579
|
text: I_
|
|
18580
18580
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
18581
18581
|
function R_(e, t, n) {
|
|
@@ -18591,7 +18591,7 @@ function R_(e, t, n) {
|
|
|
18591
18591
|
const u = {
|
|
18592
18592
|
attempt: $(M),
|
|
18593
18593
|
check: $(N),
|
|
18594
|
-
consume:
|
|
18594
|
+
consume: C,
|
|
18595
18595
|
enter: v,
|
|
18596
18596
|
exit: D,
|
|
18597
18597
|
interrupt: $(N, {
|
|
@@ -18614,8 +18614,8 @@ function R_(e, t, n) {
|
|
|
18614
18614
|
function f(L) {
|
|
18615
18615
|
return s = ct(s, L), b(), s[s.length - 1] !== null ? [] : (H(t, 0), l.events = xi(a, l.events, l), l.events);
|
|
18616
18616
|
}
|
|
18617
|
-
function h(L,
|
|
18618
|
-
return D_(p(L),
|
|
18617
|
+
function h(L, w) {
|
|
18618
|
+
return D_(p(L), w);
|
|
18619
18619
|
}
|
|
18620
18620
|
function p(L) {
|
|
18621
18621
|
return O_(s, L);
|
|
@@ -18623,14 +18623,14 @@ function R_(e, t, n) {
|
|
|
18623
18623
|
function g() {
|
|
18624
18624
|
const {
|
|
18625
18625
|
_bufferIndex: L,
|
|
18626
|
-
_index:
|
|
18626
|
+
_index: w,
|
|
18627
18627
|
line: P,
|
|
18628
18628
|
column: U,
|
|
18629
18629
|
offset: B
|
|
18630
18630
|
} = r;
|
|
18631
18631
|
return {
|
|
18632
18632
|
_bufferIndex: L,
|
|
18633
|
-
_index:
|
|
18633
|
+
_index: w,
|
|
18634
18634
|
line: P,
|
|
18635
18635
|
column: U,
|
|
18636
18636
|
offset: B
|
|
@@ -18642,38 +18642,38 @@ function R_(e, t, n) {
|
|
|
18642
18642
|
function b() {
|
|
18643
18643
|
let L;
|
|
18644
18644
|
for (; r._index < s.length; ) {
|
|
18645
|
-
const
|
|
18646
|
-
if (typeof
|
|
18647
|
-
for (L = r._index, r._bufferIndex < 0 && (r._bufferIndex = 0); r._index === L && r._bufferIndex <
|
|
18648
|
-
T(
|
|
18645
|
+
const w = s[r._index];
|
|
18646
|
+
if (typeof w == "string")
|
|
18647
|
+
for (L = r._index, r._bufferIndex < 0 && (r._bufferIndex = 0); r._index === L && r._bufferIndex < w.length; )
|
|
18648
|
+
T(w.charCodeAt(r._bufferIndex));
|
|
18649
18649
|
else
|
|
18650
|
-
T(
|
|
18650
|
+
T(w);
|
|
18651
18651
|
}
|
|
18652
18652
|
}
|
|
18653
18653
|
function T(L) {
|
|
18654
18654
|
d = d(L);
|
|
18655
18655
|
}
|
|
18656
|
-
function
|
|
18656
|
+
function C(L) {
|
|
18657
18657
|
ee(L) ? (r.line++, r.column = 1, r.offset += L === -3 ? 2 : 1, x()) : L !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === // Points w/ non-negative `_bufferIndex` reference
|
|
18658
18658
|
// strings.
|
|
18659
18659
|
/** @type {string} */
|
|
18660
18660
|
s[r._index].length && (r._bufferIndex = -1, r._index++)), l.previous = L;
|
|
18661
18661
|
}
|
|
18662
|
-
function v(L,
|
|
18663
|
-
const P =
|
|
18662
|
+
function v(L, w) {
|
|
18663
|
+
const P = w || {};
|
|
18664
18664
|
return P.type = L, P.start = g(), l.events.push(["enter", P, l]), o.push(P), P;
|
|
18665
18665
|
}
|
|
18666
18666
|
function D(L) {
|
|
18667
|
-
const
|
|
18668
|
-
return
|
|
18667
|
+
const w = o.pop();
|
|
18668
|
+
return w.end = g(), l.events.push(["exit", w, l]), w;
|
|
18669
18669
|
}
|
|
18670
|
-
function M(L,
|
|
18671
|
-
H(L,
|
|
18670
|
+
function M(L, w) {
|
|
18671
|
+
H(L, w.from);
|
|
18672
18672
|
}
|
|
18673
|
-
function N(L,
|
|
18674
|
-
|
|
18673
|
+
function N(L, w) {
|
|
18674
|
+
w.restore();
|
|
18675
18675
|
}
|
|
18676
|
-
function $(L,
|
|
18676
|
+
function $(L, w) {
|
|
18677
18677
|
return P;
|
|
18678
18678
|
function P(U, B, R) {
|
|
18679
18679
|
let W, X, le, k;
|
|
@@ -18709,7 +18709,7 @@ function R_(e, t, n) {
|
|
|
18709
18709
|
// If we do have fields, create an object w/ `context` as its
|
|
18710
18710
|
// prototype.
|
|
18711
18711
|
// This allows a “live binding”, which is needed for `interrupt`.
|
|
18712
|
-
|
|
18712
|
+
w ? Object.assign(Object.create(l), w) : l,
|
|
18713
18713
|
u,
|
|
18714
18714
|
Fe,
|
|
18715
18715
|
he
|
|
@@ -18724,17 +18724,17 @@ function R_(e, t, n) {
|
|
|
18724
18724
|
}
|
|
18725
18725
|
}
|
|
18726
18726
|
}
|
|
18727
|
-
function H(L,
|
|
18728
|
-
L.resolveAll && !a.includes(L) && a.push(L), L.resolve && rt(l.events,
|
|
18727
|
+
function H(L, w) {
|
|
18728
|
+
L.resolveAll && !a.includes(L) && a.push(L), L.resolve && rt(l.events, w, l.events.length - w, L.resolve(l.events.slice(w), l)), L.resolveTo && (l.events = L.resolveTo(l.events, l));
|
|
18729
18729
|
}
|
|
18730
18730
|
function S() {
|
|
18731
|
-
const L = g(),
|
|
18731
|
+
const L = g(), w = l.previous, P = l.currentConstruct, U = l.events.length, B = Array.from(o);
|
|
18732
18732
|
return {
|
|
18733
18733
|
from: U,
|
|
18734
18734
|
restore: R
|
|
18735
18735
|
};
|
|
18736
18736
|
function R() {
|
|
18737
|
-
r = L, l.previous =
|
|
18737
|
+
r = L, l.previous = w, l.currentConstruct = P, l.events.length = U, o = B, x();
|
|
18738
18738
|
}
|
|
18739
18739
|
}
|
|
18740
18740
|
function x() {
|
|
@@ -18867,7 +18867,7 @@ function H_(e) {
|
|
|
18867
18867
|
transforms: [],
|
|
18868
18868
|
canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
|
|
18869
18869
|
enter: {
|
|
18870
|
-
autolink: a(
|
|
18870
|
+
autolink: a(Ce),
|
|
18871
18871
|
autolinkProtocol: S,
|
|
18872
18872
|
autolinkEmail: S,
|
|
18873
18873
|
atxHeading: a(Bn),
|
|
@@ -18895,7 +18895,7 @@ function H_(e) {
|
|
|
18895
18895
|
htmlTextData: S,
|
|
18896
18896
|
image: a(de),
|
|
18897
18897
|
label: s,
|
|
18898
|
-
link: a(
|
|
18898
|
+
link: a(Ce),
|
|
18899
18899
|
listItem: a(Tt),
|
|
18900
18900
|
listItemValue: h,
|
|
18901
18901
|
listOrdered: a(Xe, f),
|
|
@@ -18932,11 +18932,11 @@ function H_(e) {
|
|
|
18932
18932
|
data: x,
|
|
18933
18933
|
definition: u(),
|
|
18934
18934
|
definitionDestinationString: D,
|
|
18935
|
-
definitionLabelString:
|
|
18935
|
+
definitionLabelString: C,
|
|
18936
18936
|
definitionTitleString: v,
|
|
18937
18937
|
emphasis: u(),
|
|
18938
|
-
hardBreakEscape: u(
|
|
18939
|
-
hardBreakTrailing: u(
|
|
18938
|
+
hardBreakEscape: u(w),
|
|
18939
|
+
hardBreakTrailing: u(w),
|
|
18940
18940
|
htmlFlow: u(P),
|
|
18941
18941
|
htmlFlowData: x,
|
|
18942
18942
|
htmlText: u(U),
|
|
@@ -19129,7 +19129,7 @@ function H_(e) {
|
|
|
19129
19129
|
const z = this.resume(), G = this.stack[this.stack.length - 1];
|
|
19130
19130
|
G.value = z.replace(/(\r?\n|\r)$/g, "");
|
|
19131
19131
|
}
|
|
19132
|
-
function
|
|
19132
|
+
function C(z) {
|
|
19133
19133
|
const G = this.resume(), re = this.stack[this.stack.length - 1];
|
|
19134
19134
|
re.label = G, re.identifier = mt(this.sliceSerialize(z)).toLowerCase();
|
|
19135
19135
|
}
|
|
@@ -19180,7 +19180,7 @@ function H_(e) {
|
|
|
19180
19180
|
}
|
|
19181
19181
|
!this.data.setextHeadingSlurpLineEnding && t.canContainEols.includes(G.type) && (S.call(this, z), x.call(this, z));
|
|
19182
19182
|
}
|
|
19183
|
-
function
|
|
19183
|
+
function w() {
|
|
19184
19184
|
this.data.atHardBreak = !0;
|
|
19185
19185
|
}
|
|
19186
19186
|
function P() {
|
|
@@ -19329,7 +19329,7 @@ function H_(e) {
|
|
|
19329
19329
|
alt: null
|
|
19330
19330
|
};
|
|
19331
19331
|
}
|
|
19332
|
-
function
|
|
19332
|
+
function Ce() {
|
|
19333
19333
|
return {
|
|
19334
19334
|
type: "link",
|
|
19335
19335
|
title: null,
|
|
@@ -19820,8 +19820,8 @@ function g3(e) {
|
|
|
19820
19820
|
const g = [], y = e.footnoteCounts.get(f);
|
|
19821
19821
|
for (; y !== void 0 && ++p <= y; ) {
|
|
19822
19822
|
g.length > 0 && g.push({ type: "text", value: " " });
|
|
19823
|
-
let
|
|
19824
|
-
typeof
|
|
19823
|
+
let C = typeof n == "string" ? n : n(u, p);
|
|
19824
|
+
typeof C == "string" && (C = { type: "text", value: C }), g.push({
|
|
19825
19825
|
type: "element",
|
|
19826
19826
|
tagName: "a",
|
|
19827
19827
|
properties: {
|
|
@@ -19830,13 +19830,13 @@ function g3(e) {
|
|
|
19830
19830
|
ariaLabel: typeof r == "string" ? r : r(u, p),
|
|
19831
19831
|
className: ["data-footnote-backref"]
|
|
19832
19832
|
},
|
|
19833
|
-
children: Array.isArray(
|
|
19833
|
+
children: Array.isArray(C) ? C : [C]
|
|
19834
19834
|
});
|
|
19835
19835
|
}
|
|
19836
19836
|
const b = d[d.length - 1];
|
|
19837
19837
|
if (b && b.type === "element" && b.tagName === "p") {
|
|
19838
|
-
const
|
|
19839
|
-
|
|
19838
|
+
const C = b.children[b.children.length - 1];
|
|
19839
|
+
C && C.type === "text" ? C.value += " " : b.children.push({ type: "text", value: " " }), b.children.push(...g);
|
|
19840
19840
|
} else
|
|
19841
19841
|
d.push(...g);
|
|
19842
19842
|
const T = {
|
|
@@ -19890,7 +19890,7 @@ function E3(e, t) {
|
|
|
19890
19890
|
patch: T3,
|
|
19891
19891
|
wrap: x3
|
|
19892
19892
|
};
|
|
19893
|
-
return
|
|
19893
|
+
return wt(e, function(d) {
|
|
19894
19894
|
if (d.type === "definition" || d.type === "footnoteDefinition") {
|
|
19895
19895
|
const f = d.type === "definition" ? r : i, h = String(d.identifier).toUpperCase();
|
|
19896
19896
|
f.has(h) || f.set(h, d);
|
|
@@ -20026,23 +20026,23 @@ function A3() {
|
|
|
20026
20026
|
return l[d];
|
|
20027
20027
|
};
|
|
20028
20028
|
return Zi = function u() {
|
|
20029
|
-
var l, d, f, h, p, g, y = arguments[0], b = 1, T = arguments.length,
|
|
20030
|
-
for (typeof y == "boolean" && (
|
|
20029
|
+
var l, d, f, h, p, g, y = arguments[0], b = 1, T = arguments.length, C = !1;
|
|
20030
|
+
for (typeof y == "boolean" && (C = y, y = arguments[1] || {}, b = 2), (y == null || typeof y != "object" && typeof y != "function") && (y = {}); b < T; ++b)
|
|
20031
20031
|
if (l = arguments[b], l != null)
|
|
20032
20032
|
for (d in l)
|
|
20033
|
-
f = o(y, d), h = o(l, d), y !== h && (
|
|
20033
|
+
f = o(y, d), h = o(l, d), y !== h && (C && h && (a(h) || (p = i(h))) ? (p ? (p = !1, g = f && i(f) ? f : []) : g = f && a(f) ? f : {}, s(y, { name: d, newValue: u(C, g, h) })) : typeof h < "u" && s(y, { name: d, newValue: h }));
|
|
20034
20034
|
return y;
|
|
20035
20035
|
}, Zi;
|
|
20036
20036
|
}
|
|
20037
|
-
var
|
|
20038
|
-
const Ji = /* @__PURE__ */ Ad(
|
|
20037
|
+
var C3 = A3();
|
|
20038
|
+
const Ji = /* @__PURE__ */ Ad(C3);
|
|
20039
20039
|
function Na(e) {
|
|
20040
20040
|
if (typeof e != "object" || e === null)
|
|
20041
20041
|
return !1;
|
|
20042
20042
|
const t = Object.getPrototypeOf(e);
|
|
20043
20043
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
20044
20044
|
}
|
|
20045
|
-
function
|
|
20045
|
+
function w3() {
|
|
20046
20046
|
const e = [], t = { run: n, use: r };
|
|
20047
20047
|
return t;
|
|
20048
20048
|
function n(...i) {
|
|
@@ -20102,7 +20102,7 @@ const _t = { basename: N3, dirname: S3, extname: v3, join: L3, sep: "/" };
|
|
|
20102
20102
|
function N3(e, t) {
|
|
20103
20103
|
if (t !== void 0 && typeof t != "string")
|
|
20104
20104
|
throw new TypeError('"ext" argument must be a string');
|
|
20105
|
-
|
|
20105
|
+
Cr(e);
|
|
20106
20106
|
let n = 0, r = -1, i = e.length, a;
|
|
20107
20107
|
if (t === void 0 || t.length === 0 || t.length > e.length) {
|
|
20108
20108
|
for (; i--; )
|
|
@@ -20128,7 +20128,7 @@ function N3(e, t) {
|
|
|
20128
20128
|
return n === r ? r = s : r < 0 && (r = e.length), e.slice(n, r);
|
|
20129
20129
|
}
|
|
20130
20130
|
function S3(e) {
|
|
20131
|
-
if (
|
|
20131
|
+
if (Cr(e), e.length === 0)
|
|
20132
20132
|
return ".";
|
|
20133
20133
|
let t = -1, n = e.length, r;
|
|
20134
20134
|
for (; --n; )
|
|
@@ -20141,7 +20141,7 @@ function S3(e) {
|
|
|
20141
20141
|
return t < 0 ? e.codePointAt(0) === 47 ? "/" : "." : t === 1 && e.codePointAt(0) === 47 ? "//" : e.slice(0, t);
|
|
20142
20142
|
}
|
|
20143
20143
|
function v3(e) {
|
|
20144
|
-
|
|
20144
|
+
Cr(e);
|
|
20145
20145
|
let t = e.length, n = -1, r = 0, i = -1, a = 0, s;
|
|
20146
20146
|
for (; t--; ) {
|
|
20147
20147
|
const o = e.codePointAt(t);
|
|
@@ -20161,11 +20161,11 @@ function v3(e) {
|
|
|
20161
20161
|
function L3(...e) {
|
|
20162
20162
|
let t = -1, n;
|
|
20163
20163
|
for (; ++t < e.length; )
|
|
20164
|
-
|
|
20164
|
+
Cr(e[t]), e[t] && (n = n === void 0 ? e[t] : n + "/" + e[t]);
|
|
20165
20165
|
return n === void 0 ? "." : R3(n);
|
|
20166
20166
|
}
|
|
20167
20167
|
function R3(e) {
|
|
20168
|
-
|
|
20168
|
+
Cr(e);
|
|
20169
20169
|
const t = e.codePointAt(0) === 47;
|
|
20170
20170
|
let n = O3(e, !t);
|
|
20171
20171
|
return n.length === 0 && !t && (n = "."), n.length > 0 && e.codePointAt(e.length - 1) === 47 && (n += "/"), t ? "/" + n : n;
|
|
@@ -20201,7 +20201,7 @@ function O3(e, t) {
|
|
|
20201
20201
|
}
|
|
20202
20202
|
return n;
|
|
20203
20203
|
}
|
|
20204
|
-
function
|
|
20204
|
+
function Cr(e) {
|
|
20205
20205
|
if (typeof e != "string")
|
|
20206
20206
|
throw new TypeError(
|
|
20207
20207
|
"Path must be a string. Received " + JSON.stringify(e)
|
|
@@ -20676,7 +20676,7 @@ class As extends U3 {
|
|
|
20676
20676
|
* Create a processor.
|
|
20677
20677
|
*/
|
|
20678
20678
|
constructor() {
|
|
20679
|
-
super("copy"), this.Compiler = void 0, this.Parser = void 0, this.attachers = [], this.compiler = void 0, this.freezeIndex = -1, this.frozen = void 0, this.namespace = {}, this.parser = void 0, this.transformers =
|
|
20679
|
+
super("copy"), this.Compiler = void 0, this.Parser = void 0, this.attachers = [], this.compiler = void 0, this.freezeIndex = -1, this.frozen = void 0, this.namespace = {}, this.parser = void 0, this.transformers = w3();
|
|
20680
20680
|
}
|
|
20681
20681
|
/**
|
|
20682
20682
|
* Copy a processor.
|
|
@@ -21189,10 +21189,10 @@ function j3(e) {
|
|
|
21189
21189
|
function V3(e) {
|
|
21190
21190
|
return !!(e && typeof e == "object" && "byteLength" in e && "byteOffset" in e);
|
|
21191
21191
|
}
|
|
21192
|
-
function
|
|
21192
|
+
function Cs() {
|
|
21193
21193
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
21194
21194
|
}
|
|
21195
|
-
var gn =
|
|
21195
|
+
var gn = Cs();
|
|
21196
21196
|
function Pd(e) {
|
|
21197
21197
|
gn = e;
|
|
21198
21198
|
}
|
|
@@ -21210,8 +21210,8 @@ var Y3 = (() => {
|
|
|
21210
21210
|
} catch {
|
|
21211
21211
|
return !1;
|
|
21212
21212
|
}
|
|
21213
|
-
})(), Qe = { 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, 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, 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"), blockquoteBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}>`) }, W3 = /^(?:[ \t]*(?:\n|$))+/, G3 = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Q3 = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,
|
|
21214
|
-
]`).replace("lheading", Bd).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, aA = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, sA = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Hd = /^( {2,}|\\)\n(?!\s*$)/, oA = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Pn = /[\p{P}\p{S}]/u,
|
|
21213
|
+
})(), Qe = { 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, 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, 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"), blockquoteBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}>`) }, W3 = /^(?:[ \t]*(?:\n|$))+/, G3 = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Q3 = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, wr = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, K3 = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, ws = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Md = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Bd = me(Md).replace(/bull/g, ws).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(), X3 = me(Md).replace(/bull/g, ws).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(), Is = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Z3 = /^[^\n]+/, Ns = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, J3 = me(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Ns).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), eA = me(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, ws).getRegex(), Ai = "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", Ss = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, tA = me("^ {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", Ss).replace("tag", Ai).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Fd = me(Is).replace("hr", wr).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[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ai).getRegex(), nA = me(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Fd).getRegex(), vs = { blockquote: nA, code: G3, def: J3, fences: Q3, heading: K3, hr: wr, html: tA, lheading: Bd, list: eA, newline: W3, paragraph: Fd, table: nn, text: Z3 }, ku = me("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", wr).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[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ai).getRegex(), rA = { ...vs, lheading: X3, table: ku, paragraph: me(Is).replace("hr", wr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ku).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ai).getRegex() }, iA = { ...vs, html: me(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Ss).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: nn, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: me(Is).replace("hr", wr).replace("heading", ` *#{1,6} *[^
|
|
21214
|
+
]`).replace("lheading", Bd).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, aA = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, sA = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Hd = /^( {2,}|\\)\n(?!\s*$)/, oA = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Pn = /[\p{P}\p{S}]/u, Ci = /[\s\p{P}\p{S}]/u, Ls = /[^\s\p{P}\p{S}]/u, uA = me(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Ci).getRegex(), Ud = /(?!~)[\p{P}\p{S}]/u, lA = /(?!~)[\s\p{P}\p{S}]/u, cA = /(?:[^\s\p{P}\p{S}]|~)/u, dA = me(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Y3 ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), zd = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, fA = me(zd, "u").replace(/punct/g, Pn).getRegex(), hA = me(zd, "u").replace(/punct/g, Ud).getRegex(), $d = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", pA = me($d, "gu").replace(/notPunctSpace/g, Ls).replace(/punctSpace/g, Ci).replace(/punct/g, Pn).getRegex(), mA = me($d, "gu").replace(/notPunctSpace/g, cA).replace(/punctSpace/g, lA).replace(/punct/g, Ud).getRegex(), gA = me("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Ls).replace(/punctSpace/g, Ci).replace(/punct/g, Pn).getRegex(), bA = me(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Pn).getRegex(), EA = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", TA = me(EA, "gu").replace(/notPunctSpace/g, Ls).replace(/punctSpace/g, Ci).replace(/punct/g, Pn).getRegex(), yA = me(/\\(punct)/, "gu").replace(/punct/g, Pn).getRegex(), kA = me(/^<(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(), xA = me(Ss).replace("(?:-->|$)", "-->").getRegex(), _A = me("^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", xA).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), ii = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, AA = me(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", ii).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), qd = me(/^!?\[(label)\]\[(ref)\]/).replace("label", ii).replace("ref", Ns).getRegex(), jd = me(/^!?\[(ref)\](?:\[\])?/).replace("ref", Ns).getRegex(), CA = me("reflink|nolink(?!\\()", "g").replace("reflink", qd).replace("nolink", jd).getRegex(), xu = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Rs = { _backpedal: nn, anyPunctuation: yA, autolink: kA, blockSkip: dA, br: Hd, code: sA, del: nn, delLDelim: nn, delRDelim: nn, emStrongLDelim: fA, emStrongRDelimAst: pA, emStrongRDelimUnd: gA, escape: aA, link: AA, nolink: jd, punctuation: uA, reflink: qd, reflinkSearch: CA, tag: _A, text: oA, url: nn }, wA = { ...Rs, link: me(/^!?\[(label)\]\((.*?)\)/).replace("label", ii).getRegex(), reflink: me(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", ii).getRegex() }, va = { ...Rs, emStrongRDelimAst: mA, emStrongLDelim: hA, delLDelim: bA, delRDelim: TA, url: me(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", xu).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: me(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", xu).getRegex() }, IA = { ...va, br: me(Hd).replace("{2,}", "*").getRegex(), text: me(va.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, Fr = { normal: vs, gfm: rA, pedantic: iA }, Gn = { normal: Rs, gfm: va, breaks: IA, pedantic: wA }, NA = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, _u = (e) => NA[e];
|
|
21215
21215
|
function xt(e, t) {
|
|
21216
21216
|
if (t) {
|
|
21217
21217
|
if (Qe.escapeTest.test(e)) return e.replace(Qe.escapeReplace, _u);
|
|
@@ -21226,7 +21226,7 @@ function Au(e) {
|
|
|
21226
21226
|
}
|
|
21227
21227
|
return e;
|
|
21228
21228
|
}
|
|
21229
|
-
function
|
|
21229
|
+
function Cu(e, t) {
|
|
21230
21230
|
let n = e.replace(Qe.findPipe, (a, s, o) => {
|
|
21231
21231
|
let u = !1, l = s;
|
|
21232
21232
|
for (; --l >= 0 && o[l] === "\\"; ) u = !u;
|
|
@@ -21261,7 +21261,7 @@ function vA(e, t = 0) {
|
|
|
21261
21261
|
} else r += i, n++;
|
|
21262
21262
|
return r;
|
|
21263
21263
|
}
|
|
21264
|
-
function
|
|
21264
|
+
function wu(e, t, n, r, i) {
|
|
21265
21265
|
let a = t.href, s = t.title || null, o = e[1].replace(i.other.outputLinkReplace, "$1");
|
|
21266
21266
|
r.state.inLink = !0;
|
|
21267
21267
|
let u = { type: e[0].charAt(0) === "!" ? "image" : "link", raw: n, href: a, title: s, text: o, tokens: r.inlineTokens(o) };
|
|
@@ -21377,15 +21377,15 @@ ${d}` : d;
|
|
|
21377
21377
|
`, 1)[0], p = !f.trim(), g = 0;
|
|
21378
21378
|
if (this.options.pedantic ? (g = 2, d = f.trimStart()) : p ? g = t[1].length + 1 : (g = f.search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, d = f.slice(g), g += t[1].length), p && this.rules.other.blankLine.test(h) && (l += h + `
|
|
21379
21379
|
`, e = e.substring(h.length + 1), u = !0), !u) {
|
|
21380
|
-
let y = this.rules.other.nextBulletRegex(g), b = this.rules.other.hrRegex(g), T = this.rules.other.fencesBeginRegex(g),
|
|
21380
|
+
let y = this.rules.other.nextBulletRegex(g), b = this.rules.other.hrRegex(g), T = this.rules.other.fencesBeginRegex(g), C = this.rules.other.headingBeginRegex(g), v = this.rules.other.htmlBeginRegex(g), D = this.rules.other.blockquoteBeginRegex(g);
|
|
21381
21381
|
for (; e; ) {
|
|
21382
21382
|
let M = e.split(`
|
|
21383
21383
|
`, 1)[0], N;
|
|
21384
|
-
if (h = M, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), N = h) : N = h.replace(this.rules.other.tabCharGlobal, " "), T.test(h) ||
|
|
21384
|
+
if (h = M, this.options.pedantic ? (h = h.replace(this.rules.other.listReplaceNesting, " "), N = h) : N = h.replace(this.rules.other.tabCharGlobal, " "), T.test(h) || C.test(h) || v.test(h) || D.test(h) || y.test(h) || b.test(h)) break;
|
|
21385
21385
|
if (N.search(this.rules.other.nonSpaceChar) >= g || !h.trim()) d += `
|
|
21386
21386
|
` + N.slice(g);
|
|
21387
21387
|
else {
|
|
21388
|
-
if (p || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || T.test(f) ||
|
|
21388
|
+
if (p || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || T.test(f) || C.test(f) || b.test(f)) break;
|
|
21389
21389
|
d += `
|
|
21390
21390
|
` + h;
|
|
21391
21391
|
}
|
|
@@ -21440,12 +21440,12 @@ ${d}` : d;
|
|
|
21440
21440
|
table(e) {
|
|
21441
21441
|
let t = this.rules.block.table.exec(e);
|
|
21442
21442
|
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
21443
|
-
let n =
|
|
21443
|
+
let n = Cu(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
21444
21444
|
`) : [], a = { type: "table", raw: t[0], header: [], align: [], rows: [] };
|
|
21445
21445
|
if (n.length === r.length) {
|
|
21446
21446
|
for (let s of r) this.rules.other.tableAlignRight.test(s) ? a.align.push("right") : this.rules.other.tableAlignCenter.test(s) ? a.align.push("center") : this.rules.other.tableAlignLeft.test(s) ? a.align.push("left") : a.align.push(null);
|
|
21447
21447
|
for (let s = 0; s < n.length; s++) a.header.push({ text: n[s], tokens: this.lexer.inline(n[s]), header: !0, align: a.align[s] });
|
|
21448
|
-
for (let s of i) a.rows.push(
|
|
21448
|
+
for (let s of i) a.rows.push(Cu(s, a.header.length).map((o, u) => ({ text: o, tokens: this.lexer.inline(o), header: !1, align: a.align[u] })));
|
|
21449
21449
|
return a;
|
|
21450
21450
|
}
|
|
21451
21451
|
}
|
|
@@ -21497,7 +21497,7 @@ ${d}` : d;
|
|
|
21497
21497
|
let a = this.rules.other.pedanticHrefTitle.exec(r);
|
|
21498
21498
|
a && (r = a[1], i = a[3]);
|
|
21499
21499
|
} else i = t[3] ? t[3].slice(1, -1) : "";
|
|
21500
|
-
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)),
|
|
21500
|
+
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), wu(t, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, t[0], this.lexer, this.rules);
|
|
21501
21501
|
}
|
|
21502
21502
|
}
|
|
21503
21503
|
reflink(e, t) {
|
|
@@ -21508,7 +21508,7 @@ ${d}` : d;
|
|
|
21508
21508
|
let a = n[0].charAt(0);
|
|
21509
21509
|
return { type: "text", raw: a, text: a };
|
|
21510
21510
|
}
|
|
21511
|
-
return
|
|
21511
|
+
return wu(n, i, n[0], this.lexer, this.rules);
|
|
21512
21512
|
}
|
|
21513
21513
|
}
|
|
21514
21514
|
emStrong(e, t, n = "") {
|
|
@@ -22127,7 +22127,7 @@ ${t}</tr>
|
|
|
22127
22127
|
return e ? pt.parse : pt.parseInline;
|
|
22128
22128
|
}
|
|
22129
22129
|
}, RA = class {
|
|
22130
|
-
defaults =
|
|
22130
|
+
defaults = Cs();
|
|
22131
22131
|
options = this.setOptions;
|
|
22132
22132
|
parse = this.parseMarkdown(!0);
|
|
22133
22133
|
parseInline = this.parseMarkdown(!1);
|
|
@@ -22293,7 +22293,7 @@ function ye(e, t) {
|
|
|
22293
22293
|
ye.options = ye.setOptions = function(e) {
|
|
22294
22294
|
return dn.setOptions(e), ye.defaults = dn.defaults, Pd(ye.defaults), ye;
|
|
22295
22295
|
};
|
|
22296
|
-
ye.getDefaults =
|
|
22296
|
+
ye.getDefaults = Cs;
|
|
22297
22297
|
ye.defaults = gn;
|
|
22298
22298
|
ye.use = function(...e) {
|
|
22299
22299
|
return dn.use(...e), ye.defaults = dn.defaults, Pd(ye.defaults), ye;
|
|
@@ -22328,7 +22328,7 @@ function MA(e = {}) {
|
|
|
22328
22328
|
}, []), f = _e(() => typeof window < "u" && window.requestIdleCallback ? (p, g) => window.requestIdleCallback(p, g) : d, [d]), h = _e(() => typeof window < "u" && window.cancelIdleCallback ? (p) => window.cancelIdleCallback(p) : (p) => {
|
|
22329
22329
|
clearTimeout(p);
|
|
22330
22330
|
}, []);
|
|
22331
|
-
return
|
|
22331
|
+
return we(() => {
|
|
22332
22332
|
if (t) {
|
|
22333
22333
|
s(!0);
|
|
22334
22334
|
return;
|
|
@@ -22352,11 +22352,11 @@ function MA(e = {}) {
|
|
|
22352
22352
|
}, n);
|
|
22353
22353
|
}, T = (v, D) => {
|
|
22354
22354
|
v.isIntersecting ? b(D) : g();
|
|
22355
|
-
},
|
|
22356
|
-
for (let D of v) T(D,
|
|
22355
|
+
}, C = new IntersectionObserver((v) => {
|
|
22356
|
+
for (let D of v) T(D, C);
|
|
22357
22357
|
}, { rootMargin: r, threshold: 0 });
|
|
22358
|
-
return
|
|
22359
|
-
u.current && clearTimeout(u.current), l.current && h(l.current),
|
|
22358
|
+
return C.observe(p), () => {
|
|
22359
|
+
u.current && clearTimeout(u.current), l.current && h(l.current), C.disconnect();
|
|
22360
22360
|
};
|
|
22361
22361
|
}, [t, n, r, i, h, f]), { shouldRender: a, containerRef: o };
|
|
22362
22362
|
}
|
|
@@ -22441,29 +22441,29 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22441
22441
|
}, Wd = gt({ code: "" }), Gd = () => De(Wd), JA = ({ language: e }) => {
|
|
22442
22442
|
let t = se();
|
|
22443
22443
|
return m("div", { className: t("flex h-8 items-center text-muted-foreground text-xs"), "data-language": e, "data-streamdown": "code-block-header", children: m("span", { className: t("ml-1 font-mono lowercase"), children: e }) });
|
|
22444
|
-
},
|
|
22444
|
+
}, eC = (e) => {
|
|
22445
22445
|
let t = e.length;
|
|
22446
22446
|
for (; t > 0 && e[t - 1] === `
|
|
22447
22447
|
`; ) t--;
|
|
22448
22448
|
return e.slice(0, t);
|
|
22449
|
-
},
|
|
22450
|
-
let u = se(), l = _e(() =>
|
|
22449
|
+
}, tC = Zu(() => import("./highlighted-body-OFNGDK62-CXUh90ix.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), nC = ({ code: e, language: t, className: n, children: r, isIncomplete: i = !1, startLine: a, lineNumbers: s, ...o }) => {
|
|
22450
|
+
let u = se(), l = _e(() => eC(e), [e]), d = _e(() => ({ bg: "transparent", fg: "inherit", tokens: l.split(`
|
|
22451
22451
|
`).map((f) => [{ content: f, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [l]);
|
|
22452
|
-
return m(Wd.Provider, { value: { code: e }, children: j(ZA, { isIncomplete: i, language: t, children: [m(JA, { language: t }), r ? m("div", { className: u("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"), children: m("div", { className: u("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"), "data-streamdown": "code-block-actions", children: r }) }) : null, m(ca, { fallback: m(XA, { className: n, language: t, lineNumbers: s, result: d, startLine: a, ...o }), children: m(
|
|
22453
|
-
},
|
|
22452
|
+
return m(Wd.Provider, { value: { code: e }, children: j(ZA, { isIncomplete: i, language: t, children: [m(JA, { language: t }), r ? m("div", { className: u("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"), children: m("div", { className: u("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"), "data-streamdown": "code-block-actions", children: r }) }) : null, m(ca, { fallback: m(XA, { className: n, language: t, lineNumbers: s, result: d, startLine: a, ...o }), children: m(tC, { className: n, code: l, language: t, lineNumbers: s, raw: d, startLine: a, ...o }) })] }) });
|
|
22453
|
+
}, rC = (e) => m("svg", { color: "currentColor", height: 16, strokeLinejoin: "round", viewBox: "0 0 16 16", width: 16, ...e, children: m("path", { clipRule: "evenodd", d: "M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z", fill: "currentColor", fillRule: "evenodd" }) }), iC = (e) => m("svg", { color: "currentColor", height: 16, strokeLinejoin: "round", viewBox: "0 0 16 16", width: 16, ...e, children: m("path", { clipRule: "evenodd", d: "M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z", fill: "currentColor", fillRule: "evenodd" }) }), aC = (e) => m("svg", { color: "currentColor", height: 16, strokeLinejoin: "round", viewBox: "0 0 16 16", width: 16, ...e, children: m("path", { clipRule: "evenodd", d: "M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z", fill: "currentColor", fillRule: "evenodd" }) }), sC = (e) => j("svg", { color: "currentColor", height: 16, strokeLinejoin: "round", viewBox: "0 0 16 16", width: 16, ...e, children: [m("path", { d: "M8 0V4", stroke: "currentColor", strokeWidth: "1.5" }), m("path", { d: "M8 16V12", opacity: "0.5", stroke: "currentColor", strokeWidth: "1.5" }), m("path", { d: "M3.29773 1.52783L5.64887 4.7639", opacity: "0.9", stroke: "currentColor", strokeWidth: "1.5" }), m("path", { d: "M12.7023 1.52783L10.3511 4.7639", opacity: "0.1", stroke: "currentColor", strokeWidth: "1.5" }), m("path", { d: "M12.7023 14.472L10.3511 11.236", opacity: "0.4", stroke: "currentColor", strokeWidth: "1.5" }), m("path", { d: "M3.29773 14.472L5.64887 11.236", opacity: "0.6", stroke: "currentColor", strokeWidth: "1.5" }), m("path", { d: "M15.6085 5.52783L11.8043 6.7639", opacity: "0.2", stroke: "currentColor", strokeWidth: "1.5" }), m("path", { d: "M0.391602 10.472L4.19583 9.23598", opacity: "0.7", stroke: "currentColor", strokeWidth: "1.5" }), m("path", { d: "M15.6085 10.4722L11.8043 9.2361", opacity: "0.3", stroke: "currentColor", strokeWidth: "1.5" }), m("path", { d: "M0.391602 5.52783L4.19583 6.7639", opacity: "0.8", stroke: "currentColor", strokeWidth: "1.5" })] }), oC = (e) => m("svg", { color: "currentColor", height: 16, strokeLinejoin: "round", viewBox: "0 0 16 16", width: 16, ...e, children: m("path", { clipRule: "evenodd", d: "M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z", fill: "currentColor", fillRule: "evenodd" }) }), uC = (e) => m("svg", { color: "currentColor", height: 16, strokeLinejoin: "round", viewBox: "0 0 16 16", width: 16, ...e, children: m("path", { clipRule: "evenodd", d: "M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z", fill: "currentColor", fillRule: "evenodd" }) }), lC = (e) => m("svg", { color: "currentColor", height: 16, strokeLinejoin: "round", viewBox: "0 0 16 16", width: 16, ...e, children: m("path", { clipRule: "evenodd", d: "M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z", fill: "currentColor", fillRule: "evenodd" }) }), cC = (e) => m("svg", { color: "currentColor", height: 16, strokeLinejoin: "round", viewBox: "0 0 16 16", width: 16, ...e, children: m("path", { clipRule: "evenodd", d: "M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z", fill: "currentColor", fillRule: "evenodd" }) }), dC = (e) => m("svg", { color: "currentColor", height: 16, strokeLinejoin: "round", viewBox: "0 0 16 16", width: 16, ...e, children: m("path", { clipRule: "evenodd", d: "M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z", fill: "currentColor", fillRule: "evenodd" }) }), fC = (e) => m("svg", { color: "currentColor", height: 16, strokeLinejoin: "round", viewBox: "0 0 16 16", width: 16, ...e, children: m("path", { clipRule: "evenodd", d: "M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z", fill: "currentColor", fillRule: "evenodd" }) }), rr = { CheckIcon: rC, CopyIcon: iC, DownloadIcon: aC, ExternalLinkIcon: cC, Loader2Icon: sC, Maximize2Icon: oC, RotateCcwIcon: uC, XIcon: lC, ZoomInIcon: dC, ZoomOutIcon: fC }, Qd = gt(rr), hC = (e, t) => {
|
|
22454
22454
|
if (e === t) return !0;
|
|
22455
22455
|
if (!(e && t)) return e === t;
|
|
22456
22456
|
let n = Object.keys(e), r = Object.keys(t);
|
|
22457
22457
|
return n.length !== r.length ? !1 : n.every((i) => e[i] === t[i]);
|
|
22458
22458
|
}, Iu = ({ icons: e, children: t }) => {
|
|
22459
22459
|
let n = ue(e), r = ue(e ? { ...rr, ...e } : rr);
|
|
22460
|
-
|
|
22460
|
+
hC(n.current, e) || (n.current = e, r.current = e ? { ...rr, ...e } : rr);
|
|
22461
22461
|
let i = r.current;
|
|
22462
22462
|
return m(Qd.Provider, { value: i, children: t });
|
|
22463
22463
|
}, Et = () => De(Qd), Kd = { copyCode: "Copy Code", downloadFile: "Download file", downloadDiagram: "Download diagram", downloadDiagramAsSvg: "Download diagram as SVG", downloadDiagramAsPng: "Download diagram as PNG", downloadDiagramAsMmd: "Download diagram as MMD", viewFullscreen: "View fullscreen", exitFullscreen: "Exit fullscreen", mermaidFormatSvg: "SVG", mermaidFormatPng: "PNG", mermaidFormatMmd: "MMD", copyTable: "Copy table", copyTableAsMarkdown: "Copy table as Markdown", copyTableAsCsv: "Copy table as CSV", copyTableAsTsv: "Copy table as TSV", downloadTable: "Download table", downloadTableAsCsv: "Download table as CSV", downloadTableAsMarkdown: "Download table as Markdown", tableFormatMarkdown: "Markdown", tableFormatCsv: "CSV", tableFormatTsv: "TSV", imageNotAvailable: "Image not available", downloadImage: "Download image", openExternalLink: "Open external link?", externalLinkWarning: "You're about to visit an external website.", close: "Close", copyLink: "Copy link", copied: "Copied", openLink: "Open link" }, Pa = gt(Kd), Mt = () => De(Pa), Nu = ({ onCopy: e, onError: t, timeout: n = 2e3, children: r, className: i, code: a, ...s }) => {
|
|
22464
22464
|
let o = se(), [u, l] = J(!1), d = ue(0), { code: f } = Gd(), { isAnimating: h } = De(st), p = Mt(), g = a ?? f, y = async () => {
|
|
22465
|
-
var
|
|
22466
|
-
if (typeof window > "u" || !((
|
|
22465
|
+
var C;
|
|
22466
|
+
if (typeof window > "u" || !((C = navigator?.clipboard) != null && C.writeText)) {
|
|
22467
22467
|
t?.(new Error("Clipboard API not available"));
|
|
22468
22468
|
return;
|
|
22469
22469
|
}
|
|
@@ -22473,12 +22473,12 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22473
22473
|
t?.(v);
|
|
22474
22474
|
}
|
|
22475
22475
|
};
|
|
22476
|
-
|
|
22476
|
+
we(() => () => {
|
|
22477
22477
|
window.clearTimeout(d.current);
|
|
22478
22478
|
}, []);
|
|
22479
22479
|
let b = Et(), T = u ? b.CheckIcon : b.CopyIcon;
|
|
22480
22480
|
return m("button", { className: o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50", i), "data-streamdown": "code-block-copy-button", disabled: h, onClick: y, title: p.copyCode, type: "button", ...s, children: r ?? m(T, { size: 14 }) });
|
|
22481
|
-
}, Su = { "1c": "1c", "1c-query": "1cq", abap: "abap", "actionscript-3": "as", ada: "ada", adoc: "adoc", "angular-html": "html", "angular-ts": "ts", apache: "conf", apex: "cls", apl: "apl", applescript: "applescript", ara: "ara", asciidoc: "adoc", asm: "asm", astro: "astro", awk: "awk", ballerina: "bal", bash: "sh", bat: "bat", batch: "bat", be: "be", beancount: "beancount", berry: "berry", bibtex: "bib", bicep: "bicep", blade: "blade.php", bsl: "bsl", c: "c", "c#": "cs", "c++": "cpp", cadence: "cdc", cairo: "cairo", cdc: "cdc", clarity: "clar", clj: "clj", clojure: "clj", "closure-templates": "soy", cmake: "cmake", cmd: "cmd", cobol: "cob", codeowners: "CODEOWNERS", codeql: "ql", coffee: "coffee", coffeescript: "coffee", "common-lisp": "lisp", console: "sh", coq: "v", cpp: "cpp", cql: "cql", crystal: "cr", cs: "cs", csharp: "cs", css: "css", csv: "csv", cue: "cue", cypher: "cql", d: "d", dart: "dart", dax: "dax", desktop: "desktop", diff: "diff", docker: "dockerfile", dockerfile: "dockerfile", dotenv: "env", "dream-maker": "dm", edge: "edge", elisp: "el", elixir: "ex", elm: "elm", "emacs-lisp": "el", erb: "erb", erl: "erl", erlang: "erl", f: "f", "f#": "fs", f03: "f03", f08: "f08", f18: "f18", f77: "f77", f90: "f90", f95: "f95", fennel: "fnl", fish: "fish", fluent: "ftl", for: "for", "fortran-fixed-form": "f", "fortran-free-form": "f90", fs: "fs", fsharp: "fs", fsl: "fsl", ftl: "ftl", gdresource: "tres", gdscript: "gd", gdshader: "gdshader", genie: "gs", gherkin: "feature", "git-commit": "gitcommit", "git-rebase": "gitrebase", gjs: "js", gleam: "gleam", "glimmer-js": "js", "glimmer-ts": "ts", glsl: "glsl", gnuplot: "plt", go: "go", gql: "gql", graphql: "graphql", groovy: "groovy", gts: "gts", hack: "hack", haml: "haml", handlebars: "hbs", haskell: "hs", haxe: "hx", hbs: "hbs", hcl: "hcl", hjson: "hjson", hlsl: "hlsl", hs: "hs", html: "html", "html-derivative": "html", http: "http", hxml: "hxml", hy: "hy", imba: "imba", ini: "ini", jade: "jade", java: "java", javascript: "js", jinja: "jinja", jison: "jison", jl: "jl", js: "js", json: "json", json5: "json5", jsonc: "jsonc", jsonl: "jsonl", jsonnet: "jsonnet", jssm: "jssm", jsx: "jsx", julia: "jl", kotlin: "kt", kql: "kql", kt: "kt", kts: "kts", kusto: "kql", latex: "tex", lean: "lean", lean4: "lean", less: "less", liquid: "liquid", lisp: "lisp", lit: "lit", llvm: "ll", log: "log", logo: "logo", lua: "lua", luau: "luau", make: "mak", makefile: "mak", markdown: "md", marko: "marko", matlab: "m", md: "md", mdc: "mdc", mdx: "mdx", mediawiki: "wiki", mermaid: "mmd", mips: "s", mipsasm: "s", mmd: "mmd", mojo: "mojo", move: "move", nar: "nar", narrat: "narrat", nextflow: "nf", nf: "nf", nginx: "conf", nim: "nim", nix: "nix", nu: "nu", nushell: "nu", objc: "m", "objective-c": "m", "objective-cpp": "mm", ocaml: "ml", pascal: "pas", perl: "pl", perl6: "p6", php: "php", plsql: "pls", po: "po", polar: "polar", postcss: "pcss", pot: "pot", potx: "potx", powerquery: "pq", powershell: "ps1", prisma: "prisma", prolog: "pl", properties: "properties", proto: "proto", protobuf: "proto", ps: "ps", ps1: "ps1", pug: "pug", puppet: "pp", purescript: "purs", py: "py", python: "py", ql: "ql", qml: "qml", qmldir: "qmldir", qss: "qss", r: "r", racket: "rkt", raku: "raku", razor: "cshtml", rb: "rb", reg: "reg", regex: "regex", regexp: "regexp", rel: "rel", riscv: "s", rs: "rs", rst: "rst", ruby: "rb", rust: "rs", sas: "sas", sass: "sass", scala: "scala", scheme: "scm", scss: "scss", sdbl: "sdbl", sh: "sh", shader: "shader", shaderlab: "shader", shell: "sh", shellscript: "sh", shellsession: "sh", smalltalk: "st", solidity: "sol", soy: "soy", sparql: "rq", spl: "spl", splunk: "spl", sql: "sql", "ssh-config": "config", stata: "do", styl: "styl", stylus: "styl", svelte: "svelte", swift: "swift", "system-verilog": "sv", systemd: "service", talon: "talon", talonscript: "talon", tasl: "tasl", tcl: "tcl", templ: "templ", terraform: "tf", tex: "tex", tf: "tf", tfvars: "tfvars", toml: "toml", ts: "ts", "ts-tags": "ts", tsp: "tsp", tsv: "tsv", tsx: "tsx", turtle: "ttl", twig: "twig", typ: "typ", typescript: "ts", typespec: "tsp", typst: "typ", v: "v", vala: "vala", vb: "vb", verilog: "v", vhdl: "vhdl", vim: "vim", viml: "vim", vimscript: "vim", vue: "vue", "vue-html": "html", "vue-vine": "vine", vy: "vy", vyper: "vy", wasm: "wasm", wenyan: "wy", wgsl: "wgsl", wiki: "wiki", wikitext: "wiki", wit: "wit", wl: "wl", wolfram: "wl", xml: "xml", xsl: "xsl", yaml: "yaml", yml: "yml", zenscript: "zs", zig: "zig", zsh: "zsh", 文言: "wy" },
|
|
22481
|
+
}, Su = { "1c": "1c", "1c-query": "1cq", abap: "abap", "actionscript-3": "as", ada: "ada", adoc: "adoc", "angular-html": "html", "angular-ts": "ts", apache: "conf", apex: "cls", apl: "apl", applescript: "applescript", ara: "ara", asciidoc: "adoc", asm: "asm", astro: "astro", awk: "awk", ballerina: "bal", bash: "sh", bat: "bat", batch: "bat", be: "be", beancount: "beancount", berry: "berry", bibtex: "bib", bicep: "bicep", blade: "blade.php", bsl: "bsl", c: "c", "c#": "cs", "c++": "cpp", cadence: "cdc", cairo: "cairo", cdc: "cdc", clarity: "clar", clj: "clj", clojure: "clj", "closure-templates": "soy", cmake: "cmake", cmd: "cmd", cobol: "cob", codeowners: "CODEOWNERS", codeql: "ql", coffee: "coffee", coffeescript: "coffee", "common-lisp": "lisp", console: "sh", coq: "v", cpp: "cpp", cql: "cql", crystal: "cr", cs: "cs", csharp: "cs", css: "css", csv: "csv", cue: "cue", cypher: "cql", d: "d", dart: "dart", dax: "dax", desktop: "desktop", diff: "diff", docker: "dockerfile", dockerfile: "dockerfile", dotenv: "env", "dream-maker": "dm", edge: "edge", elisp: "el", elixir: "ex", elm: "elm", "emacs-lisp": "el", erb: "erb", erl: "erl", erlang: "erl", f: "f", "f#": "fs", f03: "f03", f08: "f08", f18: "f18", f77: "f77", f90: "f90", f95: "f95", fennel: "fnl", fish: "fish", fluent: "ftl", for: "for", "fortran-fixed-form": "f", "fortran-free-form": "f90", fs: "fs", fsharp: "fs", fsl: "fsl", ftl: "ftl", gdresource: "tres", gdscript: "gd", gdshader: "gdshader", genie: "gs", gherkin: "feature", "git-commit": "gitcommit", "git-rebase": "gitrebase", gjs: "js", gleam: "gleam", "glimmer-js": "js", "glimmer-ts": "ts", glsl: "glsl", gnuplot: "plt", go: "go", gql: "gql", graphql: "graphql", groovy: "groovy", gts: "gts", hack: "hack", haml: "haml", handlebars: "hbs", haskell: "hs", haxe: "hx", hbs: "hbs", hcl: "hcl", hjson: "hjson", hlsl: "hlsl", hs: "hs", html: "html", "html-derivative": "html", http: "http", hxml: "hxml", hy: "hy", imba: "imba", ini: "ini", jade: "jade", java: "java", javascript: "js", jinja: "jinja", jison: "jison", jl: "jl", js: "js", json: "json", json5: "json5", jsonc: "jsonc", jsonl: "jsonl", jsonnet: "jsonnet", jssm: "jssm", jsx: "jsx", julia: "jl", kotlin: "kt", kql: "kql", kt: "kt", kts: "kts", kusto: "kql", latex: "tex", lean: "lean", lean4: "lean", less: "less", liquid: "liquid", lisp: "lisp", lit: "lit", llvm: "ll", log: "log", logo: "logo", lua: "lua", luau: "luau", make: "mak", makefile: "mak", markdown: "md", marko: "marko", matlab: "m", md: "md", mdc: "mdc", mdx: "mdx", mediawiki: "wiki", mermaid: "mmd", mips: "s", mipsasm: "s", mmd: "mmd", mojo: "mojo", move: "move", nar: "nar", narrat: "narrat", nextflow: "nf", nf: "nf", nginx: "conf", nim: "nim", nix: "nix", nu: "nu", nushell: "nu", objc: "m", "objective-c": "m", "objective-cpp": "mm", ocaml: "ml", pascal: "pas", perl: "pl", perl6: "p6", php: "php", plsql: "pls", po: "po", polar: "polar", postcss: "pcss", pot: "pot", potx: "potx", powerquery: "pq", powershell: "ps1", prisma: "prisma", prolog: "pl", properties: "properties", proto: "proto", protobuf: "proto", ps: "ps", ps1: "ps1", pug: "pug", puppet: "pp", purescript: "purs", py: "py", python: "py", ql: "ql", qml: "qml", qmldir: "qmldir", qss: "qss", r: "r", racket: "rkt", raku: "raku", razor: "cshtml", rb: "rb", reg: "reg", regex: "regex", regexp: "regexp", rel: "rel", riscv: "s", rs: "rs", rst: "rst", ruby: "rb", rust: "rs", sas: "sas", sass: "sass", scala: "scala", scheme: "scm", scss: "scss", sdbl: "sdbl", sh: "sh", shader: "shader", shaderlab: "shader", shell: "sh", shellscript: "sh", shellsession: "sh", smalltalk: "st", solidity: "sol", soy: "soy", sparql: "rq", spl: "spl", splunk: "spl", sql: "sql", "ssh-config": "config", stata: "do", styl: "styl", stylus: "styl", svelte: "svelte", swift: "swift", "system-verilog": "sv", systemd: "service", talon: "talon", talonscript: "talon", tasl: "tasl", tcl: "tcl", templ: "templ", terraform: "tf", tex: "tex", tf: "tf", tfvars: "tfvars", toml: "toml", ts: "ts", "ts-tags": "ts", tsp: "tsp", tsv: "tsv", tsx: "tsx", turtle: "ttl", twig: "twig", typ: "typ", typescript: "ts", typespec: "tsp", typst: "typ", v: "v", vala: "vala", vb: "vb", verilog: "v", vhdl: "vhdl", vim: "vim", viml: "vim", vimscript: "vim", vue: "vue", "vue-html": "html", "vue-vine": "vine", vy: "vy", vyper: "vy", wasm: "wasm", wenyan: "wy", wgsl: "wgsl", wiki: "wiki", wikitext: "wiki", wit: "wit", wl: "wl", wolfram: "wl", xml: "xml", xsl: "xsl", yaml: "yaml", yml: "yml", zenscript: "zs", zig: "zig", zsh: "zsh", 文言: "wy" }, pC = ({ onDownload: e, onError: t, language: n, children: r, className: i, code: a, ...s }) => {
|
|
22482
22482
|
let o = se(), { code: u } = Gd(), { isAnimating: l } = De(st), d = Mt(), f = Et(), h = a ?? u, p = `file.${n && n in Su ? Su[n] : "txt"}`, g = "text/plain", y = () => {
|
|
22483
22483
|
try {
|
|
22484
22484
|
An(p, h, g), e?.();
|
|
@@ -22490,16 +22490,16 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22490
22490
|
}, vu = () => {
|
|
22491
22491
|
let { Loader2Icon: e } = Et(), t = se();
|
|
22492
22492
|
return j("div", { className: t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"), children: [m("div", { className: t("h-[46px] w-full bg-muted/80") }), m("div", { className: t("flex w-full items-center justify-center p-4"), children: m(e, { className: t("size-4 animate-spin") }) })] });
|
|
22493
|
-
},
|
|
22493
|
+
}, mC = /\.[^/.]+$/, gC = ({ node: e, className: t, src: n, alt: r, onLoad: i, onError: a, ...s }) => {
|
|
22494
22494
|
let { DownloadIcon: o } = Et(), u = se(), l = ue(null), [d, f] = J(!1), [h, p] = J(!1), g = Mt(), y = s.width != null || s.height != null, b = (d || y) && !h, T = h && !y;
|
|
22495
|
-
|
|
22495
|
+
we(() => {
|
|
22496
22496
|
let M = l.current;
|
|
22497
22497
|
if (M != null && M.complete) {
|
|
22498
22498
|
let N = M.naturalWidth > 0;
|
|
22499
22499
|
f(N), p(!N);
|
|
22500
22500
|
}
|
|
22501
22501
|
}, []);
|
|
22502
|
-
let
|
|
22502
|
+
let C = Z((M) => {
|
|
22503
22503
|
f(!0), p(!1), i?.(M);
|
|
22504
22504
|
}, [i]), v = Z((M) => {
|
|
22505
22505
|
f(!1), p(!0), a?.(M);
|
|
@@ -22509,19 +22509,19 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22509
22509
|
if (H) S = N;
|
|
22510
22510
|
else {
|
|
22511
22511
|
let x = M.type, L = "png";
|
|
22512
|
-
x.includes("jpeg") || x.includes("jpg") ? L = "jpg" : x.includes("png") ? L = "png" : x.includes("svg") ? L = "svg" : x.includes("gif") ? L = "gif" : x.includes("webp") && (L = "webp"), S = `${(r || N || "image").replace(
|
|
22512
|
+
x.includes("jpeg") || x.includes("jpg") ? L = "jpg" : x.includes("png") ? L = "png" : x.includes("svg") ? L = "svg" : x.includes("gif") ? L = "gif" : x.includes("webp") && (L = "webp"), S = `${(r || N || "image").replace(mC, "")}.${L}`;
|
|
22513
22513
|
}
|
|
22514
22514
|
An(S, M, M.type);
|
|
22515
22515
|
} catch {
|
|
22516
22516
|
window.open(n, "_blank");
|
|
22517
22517
|
}
|
|
22518
22518
|
};
|
|
22519
|
-
return n ? j("div", { className: u("group relative my-4 inline-block"), "data-streamdown": "image-wrapper", children: [m("img", { alt: r, className: u("max-w-full rounded-lg", T && "hidden", t), "data-streamdown": "image", onError: v, onLoad:
|
|
22519
|
+
return n ? j("div", { className: u("group relative my-4 inline-block"), "data-streamdown": "image-wrapper", children: [m("img", { alt: r, className: u("max-w-full rounded-lg", T && "hidden", t), "data-streamdown": "image", onError: v, onLoad: C, ref: l, src: n, ...s }), T && m("span", { className: u("text-muted-foreground text-xs italic"), "data-streamdown": "image-fallback", children: g.imageNotAvailable }), m("div", { className: u("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block") }), b && m("button", { className: u("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background", "opacity-0 group-hover:opacity-100"), onClick: D, title: g.downloadImage, type: "button", children: m(o, { size: 14 }) })] }) : null;
|
|
22520
22520
|
}, hr = 0, Ps = () => {
|
|
22521
22521
|
hr += 1, hr === 1 && (document.body.style.overflow = "hidden");
|
|
22522
22522
|
}, Ms = () => {
|
|
22523
22523
|
hr = Math.max(0, hr - 1), hr === 0 && (document.body.style.overflow = "");
|
|
22524
|
-
},
|
|
22524
|
+
}, bC = ({ url: e, isOpen: t, onClose: n, onConfirm: r }) => {
|
|
22525
22525
|
let { CheckIcon: i, CopyIcon: a, ExternalLinkIcon: s, XIcon: o } = Et(), u = se(), [l, d] = J(!1), f = Mt(), h = Z(async () => {
|
|
22526
22526
|
try {
|
|
22527
22527
|
await navigator.clipboard.writeText(e), d(!0), setTimeout(() => d(!1), 2e3);
|
|
@@ -22530,7 +22530,7 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22530
22530
|
}, [e]), p = Z(() => {
|
|
22531
22531
|
r(), n();
|
|
22532
22532
|
}, [r, n]);
|
|
22533
|
-
return
|
|
22533
|
+
return we(() => {
|
|
22534
22534
|
if (t) {
|
|
22535
22535
|
Ps();
|
|
22536
22536
|
let g = (y) => {
|
|
@@ -22551,11 +22551,11 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22551
22551
|
var e;
|
|
22552
22552
|
let t = Bs();
|
|
22553
22553
|
return (e = t?.mermaid) != null ? e : null;
|
|
22554
|
-
},
|
|
22554
|
+
}, EC = (e) => {
|
|
22555
22555
|
var t;
|
|
22556
22556
|
let n = Bs();
|
|
22557
22557
|
return n != null && n.renderers && e && (t = n.renderers.find((r) => Array.isArray(r.language) ? r.language.includes(e) : r.language === e)) != null ? t : null;
|
|
22558
|
-
},
|
|
22558
|
+
}, TC = (e, t) => {
|
|
22559
22559
|
var n;
|
|
22560
22560
|
let r = (n = void 0) != null ? n : 5;
|
|
22561
22561
|
return new Promise((i, a) => {
|
|
@@ -22577,7 +22577,7 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22577
22577
|
}, "image/png");
|
|
22578
22578
|
}, o.onerror = () => a(new Error("Failed to load SVG image")), o.src = s;
|
|
22579
22579
|
});
|
|
22580
|
-
},
|
|
22580
|
+
}, yC = ({ chart: e, children: t, className: n, onDownload: r, config: i, onError: a }) => {
|
|
22581
22581
|
let s = se(), [o, u] = J(!1), l = ue(null), { isAnimating: d } = De(st), f = Et(), h = Fs(), p = Mt(), g = async (y) => {
|
|
22582
22582
|
try {
|
|
22583
22583
|
if (y === "mmd") {
|
|
@@ -22588,7 +22588,7 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22588
22588
|
a?.(new Error("Mermaid plugin not available"));
|
|
22589
22589
|
return;
|
|
22590
22590
|
}
|
|
22591
|
-
let b = h.getMermaid(i), T = e.split("").reduce((D, M) => (D << 5) - D + M.charCodeAt(0) | 0, 0),
|
|
22591
|
+
let b = h.getMermaid(i), T = e.split("").reduce((D, M) => (D << 5) - D + M.charCodeAt(0) | 0, 0), C = `mermaid-${Math.abs(T)}-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`, { svg: v } = await b.render(C, e);
|
|
22592
22592
|
if (!v) {
|
|
22593
22593
|
a?.(new Error("SVG not found. Please wait for the diagram to render."));
|
|
22594
22594
|
return;
|
|
@@ -22598,7 +22598,7 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22598
22598
|
return;
|
|
22599
22599
|
}
|
|
22600
22600
|
if (y === "png") {
|
|
22601
|
-
let D = await
|
|
22601
|
+
let D = await TC(v);
|
|
22602
22602
|
An("diagram.png", D, "image/png"), r?.(y), u(!1);
|
|
22603
22603
|
return;
|
|
22604
22604
|
}
|
|
@@ -22606,7 +22606,7 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22606
22606
|
a?.(b);
|
|
22607
22607
|
}
|
|
22608
22608
|
};
|
|
22609
|
-
return
|
|
22609
|
+
return we(() => {
|
|
22610
22610
|
let y = (b) => {
|
|
22611
22611
|
let T = b.composedPath();
|
|
22612
22612
|
l.current && !T.includes(l.current) && u(!1);
|
|
@@ -22615,7 +22615,7 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22615
22615
|
document.removeEventListener("mousedown", y);
|
|
22616
22616
|
};
|
|
22617
22617
|
}, []), j("div", { className: s("relative"), ref: l, children: [m("button", { className: s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50", n), disabled: d, onClick: () => u(!o), title: p.downloadDiagram, type: "button", children: t ?? m(f.DownloadIcon, { size: 14 }) }), o ? j("div", { className: s("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"), children: [m("button", { className: s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"), onClick: () => g("svg"), title: p.downloadDiagramAsSvg, type: "button", children: p.mermaidFormatSvg }), m("button", { className: s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"), onClick: () => g("png"), title: p.downloadDiagramAsPng, type: "button", children: p.mermaidFormatPng }), m("button", { className: s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"), onClick: () => g("mmd"), title: p.downloadDiagramAsMmd, type: "button", children: p.mermaidFormatMmd })] }) : null] });
|
|
22618
|
-
},
|
|
22618
|
+
}, kC = ({ chart: e, config: t, onFullscreen: n, onExit: r, className: i, ...a }) => {
|
|
22619
22619
|
let { Maximize2Icon: s, XIcon: o } = Et(), u = se(), [l, d] = J(!1), { isAnimating: f, controls: h } = De(st), p = Mt(), g = (() => {
|
|
22620
22620
|
if (typeof h == "boolean") return h;
|
|
22621
22621
|
let b = h.mermaid;
|
|
@@ -22623,7 +22623,7 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22623
22623
|
})(), y = () => {
|
|
22624
22624
|
d(!l);
|
|
22625
22625
|
};
|
|
22626
|
-
return
|
|
22626
|
+
return we(() => {
|
|
22627
22627
|
if (l) {
|
|
22628
22628
|
Ps();
|
|
22629
22629
|
let b = (T) => {
|
|
@@ -22633,11 +22633,11 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22633
22633
|
document.removeEventListener("keydown", b), Ms();
|
|
22634
22634
|
};
|
|
22635
22635
|
}
|
|
22636
|
-
}, [l]),
|
|
22636
|
+
}, [l]), we(() => {
|
|
22637
22637
|
l ? n?.() : r && r();
|
|
22638
22638
|
}, [l, n, r]), j(it, { children: [m("button", { className: u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50", i), disabled: f, onClick: y, title: p.viewFullscreen, type: "button", ...a, children: m(s, { size: 14 }) }), l ? el(j("div", { className: u("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"), onClick: y, onKeyDown: (b) => {
|
|
22639
22639
|
b.key === "Escape" && y();
|
|
22640
|
-
}, role: "button", tabIndex: 0, children: [m("button", { className: u("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"), onClick: y, title: p.exitFullscreen, type: "button", children: m(o, { size: 20 }) }), m("div", { className: u("flex size-full items-center justify-center p-4"), onClick: (b) => b.stopPropagation(), onKeyDown: (b) => b.stopPropagation(), role: "presentation", children: m(
|
|
22640
|
+
}, role: "button", tabIndex: 0, children: [m("button", { className: u("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"), onClick: y, title: p.exitFullscreen, type: "button", children: m(o, { size: 20 }) }), m("div", { className: u("flex size-full items-center justify-center p-4"), onClick: (b) => b.stopPropagation(), onKeyDown: (b) => b.stopPropagation(), role: "presentation", children: m(pw, { chart: e, className: u("size-full [&_svg]:h-auto [&_svg]:w-auto"), config: t, fullscreen: !0, showControls: g }) })] }), document.body) : null] });
|
|
22641
22641
|
}, Xd = (e) => {
|
|
22642
22642
|
var t, n;
|
|
22643
22643
|
let r = [], i = [], a = e.querySelectorAll("thead th");
|
|
@@ -22666,7 +22666,7 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22666
22666
|
for (let o of n) a[s] = o.map(r).join(","), s += 1;
|
|
22667
22667
|
return a.join(`
|
|
22668
22668
|
`);
|
|
22669
|
-
},
|
|
22669
|
+
}, xC = (e) => {
|
|
22670
22670
|
let { headers: t, rows: n } = e, r = (o) => {
|
|
22671
22671
|
let u = !1;
|
|
22672
22672
|
for (let d of o) if (d === " " || d === `
|
|
@@ -22714,8 +22714,8 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22714
22714
|
`);
|
|
22715
22715
|
}, Jd = ({ children: e, className: t, onCopy: n, onError: r, timeout: i = 2e3 }) => {
|
|
22716
22716
|
let a = se(), [s, o] = J(!1), [u, l] = J(!1), d = ue(null), f = ue(0), { isAnimating: h } = De(st), p = Mt(), g = async (T) => {
|
|
22717
|
-
var
|
|
22718
|
-
if (typeof window > "u" || !((
|
|
22717
|
+
var C, v;
|
|
22718
|
+
if (typeof window > "u" || !((C = navigator?.clipboard) != null && C.write)) {
|
|
22719
22719
|
r?.(new Error("Clipboard API not available"));
|
|
22720
22720
|
return;
|
|
22721
22721
|
}
|
|
@@ -22725,15 +22725,15 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22725
22725
|
r?.(new Error("Table not found"));
|
|
22726
22726
|
return;
|
|
22727
22727
|
}
|
|
22728
|
-
let N = Xd(M), $ = ({ csv: Zd, tsv:
|
|
22728
|
+
let N = Xd(M), $ = ({ csv: Zd, tsv: xC, md: Ba }[T] || Ba)(N), H = new ClipboardItem({ "text/plain": new Blob([$], { type: "text/plain" }), "text/html": new Blob([M.outerHTML], { type: "text/html" }) });
|
|
22729
22729
|
await navigator.clipboard.write([H]), l(!0), o(!1), n?.(T), f.current = window.setTimeout(() => l(!1), i);
|
|
22730
22730
|
} catch (D) {
|
|
22731
22731
|
r?.(D);
|
|
22732
22732
|
}
|
|
22733
22733
|
};
|
|
22734
|
-
|
|
22735
|
-
let T = (
|
|
22736
|
-
let v =
|
|
22734
|
+
we(() => {
|
|
22735
|
+
let T = (C) => {
|
|
22736
|
+
let v = C.composedPath();
|
|
22737
22737
|
d.current && !v.includes(d.current) && o(!1);
|
|
22738
22738
|
};
|
|
22739
22739
|
return document.addEventListener("mousedown", T), () => {
|
|
@@ -22757,7 +22757,7 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22757
22757
|
r?.(g);
|
|
22758
22758
|
}
|
|
22759
22759
|
};
|
|
22760
|
-
return
|
|
22760
|
+
return we(() => {
|
|
22761
22761
|
let h = (p) => {
|
|
22762
22762
|
let g = p.composedPath();
|
|
22763
22763
|
o.current && !g.includes(o.current) && s(!1);
|
|
@@ -22766,13 +22766,13 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22766
22766
|
document.removeEventListener("mousedown", h);
|
|
22767
22767
|
};
|
|
22768
22768
|
}, []), j("div", { className: i("relative"), ref: o, children: [m("button", { className: i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50", t), disabled: u, onClick: () => s(!a), title: l.downloadTable, type: "button", children: e ?? m(d.DownloadIcon, { size: 14 }) }), a ? j("div", { className: i("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"), children: [m("button", { className: i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"), onClick: () => f("csv"), title: l.downloadTableAsCsv, type: "button", children: l.tableFormatCsv }), m("button", { className: i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"), onClick: () => f("markdown"), title: l.downloadTableAsMarkdown, type: "button", children: l.tableFormatMarkdown })] }) : null] });
|
|
22769
|
-
},
|
|
22769
|
+
}, _C = ({ children: e, className: t, showCopy: n = !0, showDownload: r = !0 }) => {
|
|
22770
22770
|
let { Maximize2Icon: i, XIcon: a } = Et(), s = se(), [o, u] = J(!1), { isAnimating: l } = De(st), d = Mt(), f = () => {
|
|
22771
22771
|
u(!0);
|
|
22772
22772
|
}, h = () => {
|
|
22773
22773
|
u(!1);
|
|
22774
22774
|
};
|
|
22775
|
-
return
|
|
22775
|
+
return we(() => {
|
|
22776
22776
|
if (o) {
|
|
22777
22777
|
Ps();
|
|
22778
22778
|
let p = (g) => {
|
|
@@ -22785,18 +22785,18 @@ var Yd = gt(!1), YA = () => De(Yd), Ds = (...e) => _d(Xa(e)), WA = (e, t) => {
|
|
|
22785
22785
|
}, [o]), j(it, { children: [m("button", { className: s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50", t), disabled: l, onClick: f, title: d.viewFullscreen, type: "button", children: m(i, { size: 14 }) }), o ? el(m("div", { "aria-label": d.viewFullscreen, "aria-modal": "true", className: s("fixed inset-0 z-50 flex flex-col bg-background"), "data-streamdown": "table-fullscreen", onClick: h, onKeyDown: (p) => {
|
|
22786
22786
|
p.key === "Escape" && h();
|
|
22787
22787
|
}, role: "dialog", children: j("div", { className: s("flex h-full flex-col"), onClick: (p) => p.stopPropagation(), onKeyDown: (p) => p.stopPropagation(), role: "presentation", children: [j("div", { className: s("flex items-center justify-end gap-1 p-4"), children: [n ? m(Jd, {}) : null, r ? m(ef, {}) : null, m("button", { className: s("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"), onClick: h, title: d.exitFullscreen, type: "button", children: m(a, { size: 20 }) })] }), m("div", { className: s("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"), children: m("table", { className: s("w-full border-collapse border border-border"), "data-streamdown": "table", children: e }) })] }) }), document.body) : null] });
|
|
22788
|
-
},
|
|
22788
|
+
}, AC = ({ children: e, className: t, showControls: n, showCopy: r = !0, showDownload: i = !0, showFullscreen: a = !0, ...s }) => {
|
|
22789
22789
|
let o = se(), u = n && r, l = n && i, d = n && a, f = u || l || d;
|
|
22790
|
-
return j("div", { className: o("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"), "data-streamdown": "table-wrapper", children: [f ? j("div", { className: o("flex items-center justify-end gap-1"), children: [u ? m(Jd, {}) : null, l ? m(ef, {}) : null, d ? m(
|
|
22791
|
-
},
|
|
22792
|
-
function
|
|
22790
|
+
return j("div", { className: o("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"), "data-streamdown": "table-wrapper", children: [f ? j("div", { className: o("flex items-center justify-end gap-1"), children: [u ? m(Jd, {}) : null, l ? m(ef, {}) : null, d ? m(_C, { showCopy: u, showDownload: l, children: e }) : null] }) : null, m("div", { className: o("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"), children: m("table", { className: o("w-full divide-y divide-border", t), "data-streamdown": "table", ...s, children: e }) })] });
|
|
22791
|
+
}, CC = /startLine=(\d+)/, wC = /\bnoLineNumbers\b/, IC = Zu(() => import("./mermaid-GHXKKRXX-BSlTZjL9.js").then((e) => ({ default: e.Mermaid }))), NC = /language-([^\s]+)/;
|
|
22792
|
+
function wi(e, t) {
|
|
22793
22793
|
if (!(e != null && e.position || t != null && t.position)) return !0;
|
|
22794
22794
|
if (!(e != null && e.position && t != null && t.position)) return !1;
|
|
22795
22795
|
let n = e.position.start, r = t.position.start, i = e.position.end, a = t.position.end;
|
|
22796
22796
|
return n?.line === r?.line && n?.column === r?.column && i?.line === a?.line && i?.column === a?.column;
|
|
22797
22797
|
}
|
|
22798
22798
|
function Le(e, t) {
|
|
22799
|
-
return e.className === t.className &&
|
|
22799
|
+
return e.className === t.className && wi(e.node, t.node);
|
|
22800
22800
|
}
|
|
22801
22801
|
var Fa = (e, t) => typeof e == "boolean" ? e : e[t] !== !1, oa = (e, t) => {
|
|
22802
22802
|
if (typeof e == "boolean") return e;
|
|
@@ -22818,7 +22818,7 @@ Hs.displayName = "MarkdownOl";
|
|
|
22818
22818
|
var tf = Te(({ children: e, className: t, node: n, ...r }) => {
|
|
22819
22819
|
let i = se();
|
|
22820
22820
|
return m("li", { className: i("py-1 [&>p]:inline", t), "data-streamdown": "list-item", ...r, children: e });
|
|
22821
|
-
}, (e, t) => e.className === t.className &&
|
|
22821
|
+
}, (e, t) => e.className === t.className && wi(e.node, t.node));
|
|
22822
22822
|
tf.displayName = "MarkdownLi";
|
|
22823
22823
|
var nf = Te(({ children: e, className: t, node: n, ...r }) => {
|
|
22824
22824
|
let i = se();
|
|
@@ -22835,7 +22835,7 @@ var af = Te(({ children: e, className: t, node: n, ...r }) => {
|
|
|
22835
22835
|
return m("span", { className: i("font-semibold", t), "data-streamdown": "strong", ...r, children: e });
|
|
22836
22836
|
}, (e, t) => Le(e, t));
|
|
22837
22837
|
af.displayName = "MarkdownStrong";
|
|
22838
|
-
var
|
|
22838
|
+
var SC = ({ children: e, className: t, href: n, node: r, ...i }) => {
|
|
22839
22839
|
let a = se(), { linkSafety: s } = De(st), [o, u] = J(!1), l = n === "streamdown:incomplete-link", d = Z(async (g) => {
|
|
22840
22840
|
if (!(!(s != null && s.enabled && n) || l)) {
|
|
22841
22841
|
if (g.preventDefault(), s.onLinkCheck && await s.onLinkCheck(n)) {
|
|
@@ -22849,8 +22849,8 @@ var Sw = ({ children: e, className: t, href: n, node: r, ...i }) => {
|
|
|
22849
22849
|
}, [n]), h = Z(() => {
|
|
22850
22850
|
u(!1);
|
|
22851
22851
|
}, []), p = { url: n ?? "", isOpen: o, onClose: h, onConfirm: f };
|
|
22852
|
-
return s != null && s.enabled && n ? j(it, { children: [m("button", { className: a("wrap-anywhere appearance-none text-left font-medium text-primary underline", t), "data-incomplete": l, "data-streamdown": "link", onClick: d, type: "button", children: e }), s.renderModal ? s.renderModal(p) : m(
|
|
22853
|
-
}, sf = Te(
|
|
22852
|
+
return s != null && s.enabled && n ? j(it, { children: [m("button", { className: a("wrap-anywhere appearance-none text-left font-medium text-primary underline", t), "data-incomplete": l, "data-streamdown": "link", onClick: d, type: "button", children: e }), s.renderModal ? s.renderModal(p) : m(bC, { ...p })] }) : m("a", { className: a("wrap-anywhere font-medium text-primary underline", t), "data-incomplete": l, "data-streamdown": "link", href: n, rel: "noreferrer", target: "_blank", ...i, children: e });
|
|
22853
|
+
}, sf = Te(SC, (e, t) => Le(e, t) && e.href === t.href);
|
|
22854
22854
|
sf.displayName = "MarkdownA";
|
|
22855
22855
|
var of = Te(({ children: e, className: t, node: n, ...r }) => {
|
|
22856
22856
|
let i = se();
|
|
@@ -22884,7 +22884,7 @@ var ff = Te(({ children: e, className: t, node: n, ...r }) => {
|
|
|
22884
22884
|
ff.displayName = "MarkdownH6";
|
|
22885
22885
|
var hf = Te(({ children: e, className: t, node: n, ...r }) => {
|
|
22886
22886
|
let { controls: i } = De(st), a = Fa(i, "table"), s = oa(i, "copy"), o = oa(i, "download"), u = oa(i, "fullscreen");
|
|
22887
|
-
return m(
|
|
22887
|
+
return m(AC, { className: t, showControls: a, showCopy: s, showDownload: o, showFullscreen: u, ...r, children: e });
|
|
22888
22888
|
}, (e, t) => Le(e, t));
|
|
22889
22889
|
hf.displayName = "MarkdownTable";
|
|
22890
22890
|
var pf = Te(({ children: e, className: t, node: n, ...r }) => {
|
|
@@ -22964,26 +22964,26 @@ var xf = Te(({ children: e, className: t, node: n, ...r }) => {
|
|
|
22964
22964
|
return m("section", { className: t, ...r, children: e });
|
|
22965
22965
|
}, (e, t) => Le(e, t));
|
|
22966
22966
|
xf.displayName = "MarkdownSection";
|
|
22967
|
-
var
|
|
22967
|
+
var vC = ({ node: e, className: t, children: n, ...r }) => {
|
|
22968
22968
|
var i, a;
|
|
22969
|
-
let s = se(), o = !("data-block" in r), { mermaid: u, controls: l, lineNumbers: d } = De(st), f = Fs(), h = YA(), p = t?.match(
|
|
22969
|
+
let s = se(), o = !("data-block" in r), { mermaid: u, controls: l, lineNumbers: d } = De(st), f = Fs(), h = YA(), p = t?.match(NC), g = (i = p?.at(1)) != null ? i : "", y = EC(g);
|
|
22970
22970
|
if (o) return m("code", { className: s("rounded bg-muted px-1.5 py-0.5 font-mono text-sm", t), "data-streamdown": "inline-code", ...r, children: n });
|
|
22971
|
-
let b = (a = e?.properties) == null ? void 0 : a.metastring, T = b?.match(
|
|
22971
|
+
let b = (a = e?.properties) == null ? void 0 : a.metastring, T = b?.match(CC), C = T ? Number.parseInt(T[1], 10) : void 0, v = C !== void 0 && C >= 1 ? C : void 0, D = !(b && wC.test(b)) && d !== !1, M = "";
|
|
22972
22972
|
if (rn(n) && n.props && typeof n.props == "object" && "children" in n.props && typeof n.props.children == "string" ? M = n.props.children : typeof n == "string" && (M = n), y) {
|
|
22973
22973
|
let S = y.component;
|
|
22974
22974
|
return m(ca, { fallback: m(vu, {}), children: m(S, { code: M, isIncomplete: h, language: g, meta: b }) });
|
|
22975
22975
|
}
|
|
22976
22976
|
if (g === "mermaid" && f) {
|
|
22977
|
-
let S = Fa(l, "mermaid"), x = Hr(l, "download"), L = Hr(l, "copy"),
|
|
22978
|
-
return m(ca, { fallback: m(vu, {}), children: j("div", { className: s("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2", t), "data-streamdown": "mermaid-block", children: [m("div", { className: s("flex h-8 items-center text-muted-foreground text-xs"), children: m("span", { className: s("ml-1 font-mono lowercase"), children: "mermaid" }) }), U ? m("div", { className: s("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"), children: j("div", { className: s("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"), "data-streamdown": "mermaid-block-actions", children: [x ? m(
|
|
22977
|
+
let S = Fa(l, "mermaid"), x = Hr(l, "download"), L = Hr(l, "copy"), w = Hr(l, "fullscreen"), P = Hr(l, "panZoom"), U = S && (x || L || w);
|
|
22978
|
+
return m(ca, { fallback: m(vu, {}), children: j("div", { className: s("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2", t), "data-streamdown": "mermaid-block", children: [m("div", { className: s("flex h-8 items-center text-muted-foreground text-xs"), children: m("span", { className: s("ml-1 font-mono lowercase"), children: "mermaid" }) }), U ? m("div", { className: s("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"), children: j("div", { className: s("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"), "data-streamdown": "mermaid-block-actions", children: [x ? m(yC, { chart: M, config: u?.config }) : null, L ? m(Nu, { code: M }) : null, w ? m(kC, { chart: M, config: u?.config }) : null] }) }) : null, m("div", { className: s("rounded-md border border-border bg-background"), children: m(IC, { chart: M, config: u?.config, showControls: P }) })] }) });
|
|
22979
22979
|
}
|
|
22980
22980
|
let N = Fa(l, "code"), $ = Lu(l, "download"), H = Lu(l, "copy");
|
|
22981
|
-
return m(
|
|
22982
|
-
}, _f = Te(
|
|
22981
|
+
return m(nC, { className: t, code: M, isIncomplete: h, language: g, lineNumbers: D, startLine: v, children: N ? j(it, { children: [$ ? m(pC, { code: M, language: g }) : null, H ? m(Nu, {}) : null] }) : null });
|
|
22982
|
+
}, _f = Te(vC, (e, t) => e.className === t.className && wi(e.node, t.node));
|
|
22983
22983
|
_f.displayName = "MarkdownCode";
|
|
22984
|
-
var Af = Te(
|
|
22984
|
+
var Af = Te(gC, (e, t) => e.className === t.className && wi(e.node, t.node));
|
|
22985
22985
|
Af.displayName = "MarkdownImg";
|
|
22986
|
-
var
|
|
22986
|
+
var Cf = Te(({ children: e, node: t, ...n }) => {
|
|
22987
22987
|
let r = (Array.isArray(e) ? e : [e]).filter((i) => i != null && i !== "");
|
|
22988
22988
|
if (r.length === 1 && rn(r[0])) {
|
|
22989
22989
|
let i = r[0].props.node, a = i?.tagName;
|
|
@@ -22992,21 +22992,21 @@ var wf = Te(({ children: e, node: t, ...n }) => {
|
|
|
22992
22992
|
}
|
|
22993
22993
|
return m("p", { ...n, children: e });
|
|
22994
22994
|
}, (e, t) => Le(e, t));
|
|
22995
|
-
|
|
22996
|
-
var
|
|
22995
|
+
Cf.displayName = "MarkdownParagraph";
|
|
22996
|
+
var LC = { ol: Hs, li: tf, ul: nf, hr: rf, strong: af, a: sf, h1: of, h2: uf, h3: lf, h4: cf, h5: df, h6: ff, table: hf, thead: pf, tbody: mf, tr: gf, th: bf, td: Ef, blockquote: Tf, code: _f, img: Af, pre: ({ children: e }) => rn(e) ? th(e, { "data-block": "true" }) : e, sup: yf, sub: kf, p: Cf, section: xf }, RC = /[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/, OC = new RegExp("\\p{L}", "u");
|
|
22997
22997
|
function Ru(e) {
|
|
22998
22998
|
let t = e.replace(/^#{1,6}\s+/gm, "").replace(/(\*{1,3}|_{1,3})/g, "").replace(/`[^`]*`/g, "").replace(/\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/^[\s>*\-+\d.]+/gm, "");
|
|
22999
22999
|
for (let n of t) {
|
|
23000
|
-
if (
|
|
23001
|
-
if (
|
|
23000
|
+
if (RC.test(n)) return "rtl";
|
|
23001
|
+
if (OC.test(n)) return "ltr";
|
|
23002
23002
|
}
|
|
23003
23003
|
return "ltr";
|
|
23004
23004
|
}
|
|
23005
|
-
var
|
|
23005
|
+
var DC = /^[ \t]{0,3}(`{3,}|~{3,})/, PC = /^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/, Ou = (e) => {
|
|
23006
23006
|
let t = e.split(`
|
|
23007
23007
|
`), n = null, r = 0;
|
|
23008
23008
|
for (let i of t) {
|
|
23009
|
-
let a =
|
|
23009
|
+
let a = DC.exec(i);
|
|
23010
23010
|
if (n === null) {
|
|
23011
23011
|
if (a) {
|
|
23012
23012
|
let s = a[1];
|
|
@@ -23018,19 +23018,19 @@ var Dw = /^[ \t]{0,3}(`{3,}|~{3,})/, Pw = /^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-
|
|
|
23018
23018
|
}
|
|
23019
23019
|
}
|
|
23020
23020
|
return n !== null;
|
|
23021
|
-
},
|
|
23021
|
+
}, MC = (e) => {
|
|
23022
23022
|
let t = e.split(`
|
|
23023
23023
|
`);
|
|
23024
23024
|
for (let n of t) {
|
|
23025
23025
|
let r = n.trim();
|
|
23026
|
-
if (r.length > 0 && r.includes("|") &&
|
|
23026
|
+
if (r.length > 0 && r.includes("|") && PC.test(r)) return !0;
|
|
23027
23027
|
}
|
|
23028
23028
|
return !1;
|
|
23029
|
-
},
|
|
23030
|
-
|
|
23029
|
+
}, BC = () => (e) => {
|
|
23030
|
+
wt(e, "html", (t, n, r) => {
|
|
23031
23031
|
!r || typeof n != "number" || (r.children[n] = { type: "text", value: t.value });
|
|
23032
23032
|
});
|
|
23033
|
-
}, Du = [], Pu = { allowDangerousHtml: !0 }, Ur = /* @__PURE__ */ new WeakMap(),
|
|
23033
|
+
}, Du = [], Pu = { allowDangerousHtml: !0 }, Ur = /* @__PURE__ */ new WeakMap(), FC = class {
|
|
23034
23034
|
constructor() {
|
|
23035
23035
|
this.cache = /* @__PURE__ */ new Map(), this.keyCache = /* @__PURE__ */ new WeakMap(), this.maxSize = 100;
|
|
23036
23036
|
}
|
|
@@ -23078,64 +23078,64 @@ var Dw = /^[ \t]{0,3}(`{3,}|~{3,})/, Pw = /^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-
|
|
|
23078
23078
|
clear() {
|
|
23079
23079
|
this.cache.clear();
|
|
23080
23080
|
}
|
|
23081
|
-
}, Mu = new
|
|
23082
|
-
let t =
|
|
23083
|
-
return
|
|
23084
|
-
},
|
|
23081
|
+
}, Mu = new FC(), wf = (e) => {
|
|
23082
|
+
let t = HC(e), n = e.children || "", r = t.runSync(t.parse(n), n);
|
|
23083
|
+
return YC(r, e);
|
|
23084
|
+
}, HC = (e) => {
|
|
23085
23085
|
let t = Mu.get(e);
|
|
23086
23086
|
if (t) return t;
|
|
23087
|
-
let n =
|
|
23087
|
+
let n = zC(e);
|
|
23088
23088
|
return Mu.set(e, n), n;
|
|
23089
|
-
},
|
|
23090
|
-
let t = e.rehypePlugins || Du, n = e.remarkPlugins || Du, r =
|
|
23089
|
+
}, UC = (e) => e.some((t) => Array.isArray(t) ? t[0] === ka : t === ka), zC = (e) => {
|
|
23090
|
+
let t = e.rehypePlugins || Du, n = e.remarkPlugins || Du, r = UC(t) ? n : [...n, BC], i = e.remarkRehypeOptions ? { ...Pu, ...e.remarkRehypeOptions } : Pu;
|
|
23091
23091
|
return $3().use(z_).use(r).use(_3, i).use(t);
|
|
23092
|
-
}, $
|
|
23092
|
+
}, $C = (e) => e, qC = (e, t, n, r) => {
|
|
23093
23093
|
n ? e.children.splice(t, 1) : e.children[t] = { type: "text", value: r };
|
|
23094
|
-
},
|
|
23094
|
+
}, jC = (e, t) => {
|
|
23095
23095
|
var n;
|
|
23096
23096
|
for (let r in Xi) if (Object.hasOwn(Xi, r) && Object.hasOwn(e.properties, r)) {
|
|
23097
23097
|
let i = e.properties[r], a = Xi[r];
|
|
23098
23098
|
(a === null || a.includes(e.tagName)) && (e.properties[r] = (n = t(String(i || ""), r, e)) != null ? n : void 0);
|
|
23099
23099
|
}
|
|
23100
|
-
},
|
|
23100
|
+
}, VC = (e, t, n, r, i, a) => {
|
|
23101
23101
|
let s = !1;
|
|
23102
23102
|
return r ? s = !r.includes(e.tagName) : i && (s = i.includes(e.tagName)), !s && a && typeof t == "number" && (s = !a(e, t, n)), s;
|
|
23103
|
-
},
|
|
23103
|
+
}, YC = (e, t) => {
|
|
23104
23104
|
let { allowElement: n, allowedElements: r, disallowedElements: i, skipHtml: a, unwrapDisallowed: s, urlTransform: o } = t;
|
|
23105
23105
|
if (n || r || i || a || o) {
|
|
23106
|
-
let u = o || $
|
|
23107
|
-
|
|
23108
|
-
if (l.type === "raw" && f && typeof d == "number") return
|
|
23109
|
-
if (l.type === "element" && (
|
|
23106
|
+
let u = o || $C;
|
|
23107
|
+
wt(e, (l, d, f) => {
|
|
23108
|
+
if (l.type === "raw" && f && typeof d == "number") return qC(f, d, a, l.value), d;
|
|
23109
|
+
if (l.type === "element" && (jC(l, u), VC(l, d, f, r, i, n) && f && typeof d == "number")) return s && l.children ? f.children.splice(d, 1, ...l.children) : f.children.splice(d, 1), d;
|
|
23110
23110
|
});
|
|
23111
23111
|
}
|
|
23112
23112
|
return Qx(e, { Fragment: it, components: t.components, ignoreInvalidStyle: !0, jsx: m, jsxs: j, passKeys: !0, passNode: !0 });
|
|
23113
|
-
},
|
|
23113
|
+
}, WC = /\[\^[\w-]{1,200}\](?!:)/, GC = /\[\^[\w-]{1,200}\]:/, QC = /<(\w+)[\s>]/, KC = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "param", "source", "track", "wbr"]), Bu = /* @__PURE__ */ new Map(), Fu = /* @__PURE__ */ new Map(), XC = (e) => {
|
|
23114
23114
|
let t = e.toLowerCase(), n = Bu.get(t);
|
|
23115
23115
|
if (n) return n;
|
|
23116
23116
|
let r = new RegExp(`<${t}(?=[\\s>/])[^>]*>`, "gi");
|
|
23117
23117
|
return Bu.set(t, r), r;
|
|
23118
|
-
},
|
|
23118
|
+
}, ZC = (e) => {
|
|
23119
23119
|
let t = e.toLowerCase(), n = Fu.get(t);
|
|
23120
23120
|
if (n) return n;
|
|
23121
23121
|
let r = new RegExp(`</${t}(?=[\\s>])[^>]*>`, "gi");
|
|
23122
23122
|
return Fu.set(t, r), r;
|
|
23123
23123
|
}, Hu = (e, t) => {
|
|
23124
|
-
if (
|
|
23125
|
-
let n = e.match(
|
|
23124
|
+
if (KC.has(t.toLowerCase())) return 0;
|
|
23125
|
+
let n = e.match(XC(t));
|
|
23126
23126
|
if (!n) return 0;
|
|
23127
23127
|
let r = 0;
|
|
23128
23128
|
for (let i of n) i.trimEnd().endsWith("/>") || (r += 1);
|
|
23129
23129
|
return r;
|
|
23130
23130
|
}, Uu = (e, t) => {
|
|
23131
|
-
let n = e.match(
|
|
23131
|
+
let n = e.match(ZC(t));
|
|
23132
23132
|
return n ? n.length : 0;
|
|
23133
|
-
},
|
|
23133
|
+
}, JC = (e) => {
|
|
23134
23134
|
let t = 0;
|
|
23135
23135
|
for (let n = 0; n < e.length - 1; n += 1) e[n] === "$" && e[n + 1] === "$" && (t += 1, n += 1);
|
|
23136
23136
|
return t;
|
|
23137
|
-
},
|
|
23138
|
-
let t =
|
|
23137
|
+
}, ew = (e) => {
|
|
23138
|
+
let t = WC.test(e), n = GC.test(e);
|
|
23139
23139
|
if (t || n) return [e];
|
|
23140
23140
|
let r = dt.lex(e, { gfm: !0 }), i = [], a = [], s = !1;
|
|
23141
23141
|
for (let o of r) {
|
|
@@ -23148,7 +23148,7 @@ var Dw = /^[ \t]{0,3}(`{3,}|~{3,})/, Pw = /^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-
|
|
|
23148
23148
|
continue;
|
|
23149
23149
|
}
|
|
23150
23150
|
if (o.type === "html" && o.block) {
|
|
23151
|
-
let d = u.match(
|
|
23151
|
+
let d = u.match(QC);
|
|
23152
23152
|
if (d) {
|
|
23153
23153
|
let f = d[1], h = Hu(u, f), p = Uu(u, f);
|
|
23154
23154
|
h > p && a.push(f);
|
|
@@ -23156,7 +23156,7 @@ var Dw = /^[ \t]{0,3}(`{3,}|~{3,})/, Pw = /^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-
|
|
|
23156
23156
|
}
|
|
23157
23157
|
if (l > 0 && !s) {
|
|
23158
23158
|
let d = i[l - 1];
|
|
23159
|
-
if (
|
|
23159
|
+
if (JC(d) % 2 === 1) {
|
|
23160
23160
|
i[l - 1] = d + u;
|
|
23161
23161
|
continue;
|
|
23162
23162
|
}
|
|
@@ -23164,7 +23164,7 @@ var Dw = /^[ \t]{0,3}(`{3,}|~{3,})/, Pw = /^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-
|
|
|
23164
23164
|
i.push(u), o.type !== "space" && (s = o.type === "code");
|
|
23165
23165
|
}
|
|
23166
23166
|
return i;
|
|
23167
|
-
},
|
|
23167
|
+
}, tw = (e, t) => {
|
|
23168
23168
|
if (!t.length) return e;
|
|
23169
23169
|
let n = e;
|
|
23170
23170
|
for (let r of t) {
|
|
@@ -23186,37 +23186,37 @@ var Dw = /^[ \t]{0,3}(`{3,}|~{3,})/, Pw = /^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-
|
|
|
23186
23186
|
});
|
|
23187
23187
|
}
|
|
23188
23188
|
return n;
|
|
23189
|
-
},
|
|
23189
|
+
}, nw = /([\\`*_~[\]|])/g, rw = (e) => e.replace(nw, "\\$1"), iw = (e, t) => {
|
|
23190
23190
|
if (!t.length) return e;
|
|
23191
23191
|
let n = e;
|
|
23192
23192
|
for (let r of t) {
|
|
23193
23193
|
let i = new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`, "gi");
|
|
23194
23194
|
n = n.replace(i, (a, s, o, u) => {
|
|
23195
|
-
let l =
|
|
23195
|
+
let l = rw(o).replace(/\n\n/g, " ");
|
|
23196
23196
|
return s + l + u;
|
|
23197
23197
|
});
|
|
23198
23198
|
}
|
|
23199
23199
|
return n;
|
|
23200
|
-
}, If = (e) => e.type === "text" ? e.value : "children" in e && Array.isArray(e.children) ? e.children.map(If).join("") : "",
|
|
23200
|
+
}, If = (e) => e.type === "text" ? e.value : "children" in e && Array.isArray(e.children) ? e.children.map(If).join("") : "", aw = (e) => (t) => {
|
|
23201
23201
|
if (!e || e.length === 0) return;
|
|
23202
23202
|
let n = new Set(e.map((r) => r.toLowerCase()));
|
|
23203
|
-
|
|
23203
|
+
wt(t, "element", (r) => {
|
|
23204
23204
|
if (n.has(r.tagName.toLowerCase())) {
|
|
23205
23205
|
let i = If(r);
|
|
23206
23206
|
r.children = i ? [{ type: "text", value: i }] : [];
|
|
23207
23207
|
}
|
|
23208
23208
|
});
|
|
23209
|
-
},
|
|
23210
|
-
|
|
23209
|
+
}, sw = () => (e) => {
|
|
23210
|
+
wt(e, "code", (t) => {
|
|
23211
23211
|
var n, r;
|
|
23212
23212
|
t.meta && (t.data = (n = t.data) != null ? n : {}, t.data.hProperties = { ...(r = t.data.hProperties) != null ? r : {}, metastring: t.meta });
|
|
23213
23213
|
});
|
|
23214
|
-
},
|
|
23214
|
+
}, ow = /^[ \t]*<[\w!/?-]/, uw = /(^|\n)[ \t]{4,}(?=<[\w!/?-])/g, lw = (e) => typeof e != "string" || e.length === 0 || !ow.test(e) ? e : e.replace(uw, "$1"), zu, $u, qu, ju, jr = { ...tn, protocols: { ...tn.protocols, href: [...($u = (zu = tn.protocols) == null ? void 0 : zu.href) != null ? $u : [], "tel"] }, attributes: { ...tn.attributes, code: [...(ju = (qu = tn.attributes) == null ? void 0 : qu.code) != null ? ju : [], "metastring"] } }, oi = { raw: ka, sanitize: [yc, jr], harden: [pm, { allowedImagePrefixes: ["*"], allowedLinkPrefixes: ["*"], allowedProtocols: ["*"], defaultOrigin: void 0, allowDataImages: !0 }] }, Nf = { gfm: [R2, {}], codeMeta: sw }, Vu = Object.values(oi), cw = Object.values(Nf), dw = { block: " ▋", circle: " ●" }, Sf = ["github-light", "github-dark"], vf = { enabled: !0 }, fw = { shikiTheme: Sf, controls: !0, isAnimating: !1, lineNumbers: !0, mode: "streaming", mermaid: void 0, linkSafety: vf }, st = gt(fw), Lf = Te(({ content: e, shouldParseIncompleteMarkdown: t, shouldNormalizeHtmlIndentation: n, index: r, isIncomplete: i, dir: a, animatePlugin: s, ...o }) => {
|
|
23215
23215
|
if (s) {
|
|
23216
23216
|
let d = s.getLastRenderCharCount();
|
|
23217
23217
|
s.setPrevContentLength(d);
|
|
23218
23218
|
}
|
|
23219
|
-
let u = typeof e == "string" && n ?
|
|
23219
|
+
let u = typeof e == "string" && n ? lw(e) : e, l = m(wf, { ...o, children: u });
|
|
23220
23220
|
return m(Yd.Provider, { value: i, children: a ? m("div", { dir: a, style: { display: "contents" }, children: l }) : l });
|
|
23221
23221
|
}, (e, t) => {
|
|
23222
23222
|
if (e.content !== t.content || e.shouldNormalizeHtmlIndentation !== t.shouldNormalizeHtmlIndentation || e.index !== t.index || e.isIncomplete !== t.isIncomplete || e.dir !== t.dir) return !1;
|
|
@@ -23230,33 +23230,33 @@ var Dw = /^[ \t]{0,3}(`{3,}|~{3,})/, Pw = /^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-
|
|
|
23230
23230
|
return !(e.rehypePlugins !== t.rehypePlugins || e.remarkPlugins !== t.remarkPlugins);
|
|
23231
23231
|
});
|
|
23232
23232
|
Lf.displayName = "Block";
|
|
23233
|
-
var Rf = Te(({ children: e, mode: t = "streaming", dir: n, parseIncompleteMarkdown: r = !0, normalizeHtmlIndentation: i = !1, components: a, rehypePlugins: s = Vu, remarkPlugins: o =
|
|
23233
|
+
var Rf = Te(({ children: e, mode: t = "streaming", dir: n, parseIncompleteMarkdown: r = !0, normalizeHtmlIndentation: i = !1, components: a, rehypePlugins: s = Vu, remarkPlugins: o = cw, className: u, shikiTheme: l = Sf, mermaid: d, controls: f = !0, isAnimating: h = !1, animated: p, BlockComponent: g = Lf, parseMarkdownIntoBlocksFn: y = ew, caret: b, plugins: T, remend: C, linkSafety: v = vf, lineNumbers: D = !0, allowedTags: M, literalTagContent: N, translations: $, icons: H, prefix: S, onAnimationStart: x, onAnimationEnd: L, ...w }) => {
|
|
23234
23234
|
let P = un(), [U, B] = eh(), R = _e(() => GA(S), [S]), W = ue(null), X = ue(x), le = ue(L);
|
|
23235
|
-
X.current = x, le.current = L,
|
|
23236
|
-
var de,
|
|
23235
|
+
X.current = x, le.current = L, we(() => {
|
|
23236
|
+
var de, Ce, Xe;
|
|
23237
23237
|
if (t === "static") return;
|
|
23238
23238
|
let Tt = W.current;
|
|
23239
23239
|
if (W.current = h, Tt === null) {
|
|
23240
23240
|
h && ((de = X.current) == null || de.call(X));
|
|
23241
23241
|
return;
|
|
23242
23242
|
}
|
|
23243
|
-
h && !Tt ? (
|
|
23243
|
+
h && !Tt ? (Ce = X.current) == null || Ce.call(X) : !h && Tt && ((Xe = le.current) == null || Xe.call(le));
|
|
23244
23244
|
}, [h, t]);
|
|
23245
23245
|
let k = _e(() => M ? Object.keys(M) : [], [M]), ne = _e(() => {
|
|
23246
23246
|
if (typeof e != "string") return "";
|
|
23247
|
-
let de = t === "streaming" && r ? qk(e,
|
|
23248
|
-
return N && N.length > 0 && (de =
|
|
23249
|
-
}, [e, t, r,
|
|
23250
|
-
|
|
23247
|
+
let de = t === "streaming" && r ? qk(e, C) : e;
|
|
23248
|
+
return N && N.length > 0 && (de = iw(de, N)), k.length > 0 && (de = tw(de, k)), de;
|
|
23249
|
+
}, [e, t, r, C, k, N]), Ie = _e(() => y(ne), [ne, y]), [I, Fe] = J(Ie);
|
|
23250
|
+
we(() => {
|
|
23251
23251
|
t === "streaming" && !be ? B(() => {
|
|
23252
23252
|
Fe(Ie);
|
|
23253
23253
|
}) : Fe(Ie);
|
|
23254
23254
|
}, [Ie, t]);
|
|
23255
|
-
let he = t === "streaming" ? I : Ie, ce = _e(() => n === "auto" ? he.map(Ru) : void 0, [he, n]), ot = _e(() => he.map((de,
|
|
23256
|
-
var de,
|
|
23257
|
-
return { shikiTheme: (
|
|
23255
|
+
let he = t === "streaming" ? I : Ie, ce = _e(() => n === "auto" ? he.map(Ru) : void 0, [he, n]), ot = _e(() => he.map((de, Ce) => `${P}-${Ce}`), [he.length, P]), Ye = _e(() => p === !0 ? "true" : p ? JSON.stringify(p) : "", [p]), be = _e(() => Ye ? Ye === "true" ? Oa() : Oa(p) : null, [Ye]), ut = _e(() => {
|
|
23256
|
+
var de, Ce;
|
|
23257
|
+
return { shikiTheme: (Ce = (de = T?.code) == null ? void 0 : de.getThemes()) != null ? Ce : l, controls: f, isAnimating: h, lineNumbers: D, mode: t, mermaid: d, linkSafety: v };
|
|
23258
23258
|
}, [l, f, h, D, t, d, v, T?.code]), ft = _e(() => $ ? JSON.stringify($) : "", [$]), St = _e(() => ({ ...Kd, ...$ }), [ft]), Bt = _e(() => {
|
|
23259
|
-
let { inlineCode: de, ...
|
|
23259
|
+
let { inlineCode: de, ...Ce } = a ?? {}, Xe = { ...LC, ...Ce };
|
|
23260
23260
|
if (de) {
|
|
23261
23261
|
let Tt = Xe.code;
|
|
23262
23262
|
Xe.code = (Qt) => "data-block" in Qt ? Tt ? pr(Tt, Qt) : null : pr(de, Qt);
|
|
@@ -23267,26 +23267,26 @@ var Rf = Te(({ children: e, mode: t = "streaming", dir: n, parseIncompleteMarkdo
|
|
|
23267
23267
|
return T != null && T.cjk && (de = [...de, ...T.cjk.remarkPluginsBefore]), de = [...de, ...o], T != null && T.cjk && (de = [...de, ...T.cjk.remarkPluginsAfter]), T != null && T.math && (de = [...de, T.math.remarkPlugin]), de;
|
|
23268
23268
|
}, [o, T?.math, T?.cjk]), Bn = _e(() => {
|
|
23269
23269
|
var de;
|
|
23270
|
-
let
|
|
23270
|
+
let Ce = s;
|
|
23271
23271
|
if (M && Object.keys(M).length > 0 && s === Vu) {
|
|
23272
23272
|
let Xe = { ...jr, tagNames: [...(de = jr.tagNames) != null ? de : [], ...Object.keys(M)], attributes: { ...jr.attributes, ...M } };
|
|
23273
|
-
|
|
23273
|
+
Ce = [oi.raw, [yc, Xe], oi.harden];
|
|
23274
23274
|
}
|
|
23275
|
-
return N && N.length > 0 && (
|
|
23275
|
+
return N && N.length > 0 && (Ce = [...Ce, [aw, N]]), T != null && T.math && (Ce = [...Ce, T.math.rehypePlugin]), be && h && (Ce = [...Ce, be.rehypePlugin]), Ce;
|
|
23276
23276
|
}, [s, T?.math, be, h, M, N]), bn = _e(() => {
|
|
23277
23277
|
if (!h || he.length === 0) return !1;
|
|
23278
23278
|
let de = he.at(-1);
|
|
23279
|
-
return Ou(de) ||
|
|
23280
|
-
}, [h, he]), Ir = _e(() => b && h && !bn ? { "--streamdown-caret": `"${
|
|
23281
|
-
return t === "static" ? m(Pa.Provider, { value: St, children: m(Ma.Provider, { value: T ?? null, children: m(st.Provider, { value: ut, children: m(Iu, { icons: H, children: m(Da.Provider, { value: R, children: m("div", { className: R("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0", u), dir: n === "auto" ? Ru(ne) : n, children: m(
|
|
23279
|
+
return Ou(de) || MC(de);
|
|
23280
|
+
}, [h, he]), Ir = _e(() => b && h && !bn ? { "--streamdown-caret": `"${dw[b]}"` } : void 0, [b, h, bn]);
|
|
23281
|
+
return t === "static" ? m(Pa.Provider, { value: St, children: m(Ma.Provider, { value: T ?? null, children: m(st.Provider, { value: ut, children: m(Iu, { icons: H, children: m(Da.Provider, { value: R, children: m("div", { className: R("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0", u), dir: n === "auto" ? Ru(ne) : n, children: m(wf, { components: Bt, rehypePlugins: Bn, remarkPlugins: vt, ...w, children: ne }) }) }) }) }) }) }) : m(Pa.Provider, { value: St, children: m(Ma.Provider, { value: T ?? null, children: m(st.Provider, { value: ut, children: m(Iu, { icons: H, children: m(Da.Provider, { value: R, children: j("div", { className: R("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0", b && !bn ? "[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]" : null, u), style: Ir, children: [he.length === 0 && b && h && m("span", {}), he.map((de, Ce) => {
|
|
23282
23282
|
var Xe;
|
|
23283
|
-
let Tt =
|
|
23284
|
-
return m(g, { animatePlugin: be, components: Bt, content: de, dir: (Xe = ce?.[
|
|
23283
|
+
let Tt = Ce === he.length - 1, Qt = h && Tt && Ou(de);
|
|
23284
|
+
return m(g, { animatePlugin: be, components: Bt, content: de, dir: (Xe = ce?.[Ce]) != null ? Xe : n !== "auto" ? n : void 0, index: Ce, isIncomplete: Qt, rehypePlugins: Bn, remarkPlugins: vt, shouldNormalizeHtmlIndentation: i, shouldParseIncompleteMarkdown: r, ...w }, ot[Ce]);
|
|
23285
23285
|
})] }) }) }) }) }) });
|
|
23286
23286
|
}, (e, t) => e.children === t.children && e.shikiTheme === t.shikiTheme && e.isAnimating === t.isAnimating && e.animated === t.animated && e.mode === t.mode && e.plugins === t.plugins && e.className === t.className && e.linkSafety === t.linkSafety && e.lineNumbers === t.lineNumbers && e.normalizeHtmlIndentation === t.normalizeHtmlIndentation && e.literalTagContent === t.literalTagContent && JSON.stringify(e.translations) === JSON.stringify(t.translations) && e.prefix === t.prefix && e.dir === t.dir);
|
|
23287
23287
|
Rf.displayName = "Streamdown";
|
|
23288
|
-
var
|
|
23289
|
-
let { RotateCcwIcon: u, ZoomInIcon: l, ZoomOutIcon: d } = Et(), f = se(), h = ue(null), p = ue(null), [g, y] = J(s), [b, T] = J({ x: 0, y: 0 }), [
|
|
23288
|
+
var hw = ({ children: e, className: t, minZoom: n = 0.5, maxZoom: r = 3, zoomStep: i = 0.1, showControls: a = !0, initialZoom: s = 1, fullscreen: o = !1 }) => {
|
|
23289
|
+
let { RotateCcwIcon: u, ZoomInIcon: l, ZoomOutIcon: d } = Et(), f = se(), h = ue(null), p = ue(null), [g, y] = J(s), [b, T] = J({ x: 0, y: 0 }), [C, v] = J(!1), [D, M] = J({ x: 0, y: 0 }), [N, $] = J({ x: 0, y: 0 }), H = Z((R) => {
|
|
23290
23290
|
y((W) => Math.max(n, Math.min(r, W + R)));
|
|
23291
23291
|
}, [n, r]), S = Z(() => {
|
|
23292
23292
|
H(i);
|
|
@@ -23294,7 +23294,7 @@ var hC = ({ children: e, className: t, minZoom: n = 0.5, maxZoom: r = 3, zoomSte
|
|
|
23294
23294
|
H(-i);
|
|
23295
23295
|
}, [H, i]), L = Z(() => {
|
|
23296
23296
|
y(s), T({ x: 0, y: 0 });
|
|
23297
|
-
}, [s]),
|
|
23297
|
+
}, [s]), w = Z((R) => {
|
|
23298
23298
|
R.preventDefault();
|
|
23299
23299
|
let W = R.deltaY > 0 ? -i : i;
|
|
23300
23300
|
H(W);
|
|
@@ -23304,29 +23304,29 @@ var hC = ({ children: e, className: t, minZoom: n = 0.5, maxZoom: r = 3, zoomSte
|
|
|
23304
23304
|
let W = R.currentTarget;
|
|
23305
23305
|
W instanceof HTMLElement && W.setPointerCapture(R.pointerId);
|
|
23306
23306
|
}, [b]), U = Z((R) => {
|
|
23307
|
-
if (!
|
|
23307
|
+
if (!C) return;
|
|
23308
23308
|
R.preventDefault();
|
|
23309
23309
|
let W = R.clientX - D.x, X = R.clientY - D.y;
|
|
23310
23310
|
T({ x: N.x + W, y: N.y + X });
|
|
23311
|
-
}, [
|
|
23311
|
+
}, [C, D, N]), B = Z((R) => {
|
|
23312
23312
|
v(!1);
|
|
23313
23313
|
let W = R.currentTarget;
|
|
23314
23314
|
W instanceof HTMLElement && W.releasePointerCapture(R.pointerId);
|
|
23315
23315
|
}, []);
|
|
23316
|
-
return
|
|
23316
|
+
return we(() => {
|
|
23317
23317
|
let R = h.current;
|
|
23318
|
-
if (R) return R.addEventListener("wheel",
|
|
23319
|
-
R.removeEventListener("wheel",
|
|
23318
|
+
if (R) return R.addEventListener("wheel", w, { passive: !1 }), () => {
|
|
23319
|
+
R.removeEventListener("wheel", w);
|
|
23320
23320
|
};
|
|
23321
|
-
}, [
|
|
23321
|
+
}, [w]), we(() => {
|
|
23322
23322
|
let R = p.current;
|
|
23323
|
-
if (R &&
|
|
23323
|
+
if (R && C) return document.body.style.userSelect = "none", R.addEventListener("pointermove", U, { passive: !1 }), R.addEventListener("pointerup", B), R.addEventListener("pointercancel", B), () => {
|
|
23324
23324
|
document.body.style.userSelect = "", R.removeEventListener("pointermove", U), R.removeEventListener("pointerup", B), R.removeEventListener("pointercancel", B);
|
|
23325
23325
|
};
|
|
23326
|
-
}, [
|
|
23327
|
-
},
|
|
23328
|
-
let a = se(), [s, o] = J(null), [u, l] = J(!1), [d, f] = J(""), [h, p] = J(""), [g, y] = J(0), { mermaid: b } = De(st), T = Fs(),
|
|
23329
|
-
if (
|
|
23326
|
+
}, [C, U, B]), j("div", { className: f("relative flex flex-col", o ? "h-full w-full" : "min-h-28 w-full", t), ref: h, style: { cursor: C ? "grabbing" : "grab" }, children: [a ? j("div", { className: f("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm", o ? "bottom-4 left-4" : "bottom-2 left-2"), children: [m("button", { className: f("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"), disabled: g >= r, onClick: S, title: "Zoom in", type: "button", children: m(l, { size: 16 }) }), m("button", { className: f("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"), disabled: g <= n, onClick: x, title: "Zoom out", type: "button", children: m(d, { size: 16 }) }), m("button", { className: f("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"), onClick: L, title: "Reset zoom and pan", type: "button", children: m(u, { size: 16 }) })] }) : null, m("div", { className: f("flex-1 origin-center transition-transform duration-150 ease-out", o ? "flex h-full w-full items-center justify-center" : "flex w-full items-center justify-center"), onPointerDown: P, ref: p, role: "application", style: { transform: `translate(${b.x}px, ${b.y}px) scale(${g})`, transformOrigin: "center center", touchAction: "none", willChange: "transform" }, children: e })] });
|
|
23327
|
+
}, pw = ({ chart: e, className: t, config: n, fullscreen: r = !1, showControls: i = !0 }) => {
|
|
23328
|
+
let a = se(), [s, o] = J(null), [u, l] = J(!1), [d, f] = J(""), [h, p] = J(""), [g, y] = J(0), { mermaid: b } = De(st), T = Fs(), C = b?.errorComponent, { shouldRender: v, containerRef: D } = MA({ immediate: r });
|
|
23329
|
+
if (we(() => {
|
|
23330
23330
|
if (v) {
|
|
23331
23331
|
if (!T) {
|
|
23332
23332
|
o("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");
|
|
@@ -23350,9 +23350,9 @@ var hC = ({ children: e, className: t, minZoom: n = 0.5, maxZoom: r = 3, zoomSte
|
|
|
23350
23350
|
}, [e, n, g, v, T]), !(v || d || h)) return m("div", { className: a("my-4 min-h-[200px]", t), ref: D });
|
|
23351
23351
|
if (u && !d && !h) return m("div", { className: a("my-4 flex justify-center p-4", t), ref: D, children: j("div", { className: a("flex items-center space-x-2 text-muted-foreground"), children: [m("div", { className: a("h-4 w-4 animate-spin rounded-full border-current border-b-2") }), m("span", { className: a("text-sm"), children: "Loading diagram..." })] }) });
|
|
23352
23352
|
if (s && !d && !h)
|
|
23353
|
-
return
|
|
23353
|
+
return C ? m("div", { ref: D, children: m(C, { chart: e, error: s, retry: () => y(($) => $ + 1) }) }) : j("div", { className: a("rounded-md bg-red-50 p-4", t), ref: D, children: [j("p", { className: a("font-mono text-red-700 text-sm"), children: ["Mermaid Error: ", s] }), j("details", { className: a("mt-2"), children: [m("summary", { className: a("cursor-pointer text-red-600 text-xs"), children: "Show Code" }), m("pre", { className: a("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"), children: e })] })] });
|
|
23354
23354
|
let M = d || h;
|
|
23355
|
-
return m("div", { className: a("size-full", t), "data-streamdown": "mermaid", ref: D, children: m(
|
|
23355
|
+
return m("div", { className: a("size-full", t), "data-streamdown": "mermaid", ref: D, children: m(hw, { className: a(r ? "size-full overflow-hidden" : "overflow-hidden", t), fullscreen: r, maxZoom: 3, minZoom: 0.5, showControls: i, zoomStep: 0.1, children: m("div", { "aria-label": "Mermaid chart", className: a("flex justify-center", r ? "size-full items-center" : null), dangerouslySetInnerHTML: { __html: M }, role: "img" }) }) });
|
|
23356
23356
|
};
|
|
23357
23357
|
const Kn = { kind: "invalid" }, Yu = (e, t) => e.length <= t && e.trim().length > 0 && !/[\p{Cc}\p{Cs}]/u.test(e), Ii = (e) => {
|
|
23358
23358
|
if (!e.toLowerCase().startsWith("#camunda-element")) return { kind: "ordinary" };
|
|
@@ -23377,10 +23377,10 @@ const Kn = { kind: "invalid" }, Yu = (e, t) => e.length <= t && e.trim().length
|
|
|
23377
23377
|
if (i instanceof URIError) return Kn;
|
|
23378
23378
|
throw i;
|
|
23379
23379
|
}
|
|
23380
|
-
},
|
|
23380
|
+
}, mw = () => {
|
|
23381
23381
|
const e = (t) => (t.type === "link" || t.type === "definition") && typeof t.url == "string" && Ii(t.url).kind === "invalid" ? { ...t, url: "#camunda-element-invalid", children: t.children?.map(e) } : t.children ? { ...t, children: t.children.map(e) } : t;
|
|
23382
23382
|
return e;
|
|
23383
|
-
}, Of = (e) => e.tagName === "img" ? String(e.properties?.alt ?? "") : e.value ?? e.children?.map(Of).join("") ?? "",
|
|
23383
|
+
}, Of = (e) => e.tagName === "img" ? String(e.properties?.alt ?? "") : e.value ?? e.children?.map(Of).join("") ?? "", gw = () => {
|
|
23384
23384
|
const e = (t) => {
|
|
23385
23385
|
const n = t.properties?.href;
|
|
23386
23386
|
return t.tagName === "a" && typeof n == "string" && Ii(n).kind !== "ordinary" ? {
|
|
@@ -23391,10 +23391,10 @@ const Kn = { kind: "invalid" }, Yu = (e, t) => e.length <= t && e.trim().length
|
|
|
23391
23391
|
} : t.children ? { ...t, children: t.children.map(e) } : t;
|
|
23392
23392
|
};
|
|
23393
23393
|
return e;
|
|
23394
|
-
},
|
|
23394
|
+
}, bw = [...Object.values(oi), gw], Ew = [...Object.values(Nf), mw], Df = gt(null), Tw = ({ node: e }) => {
|
|
23395
23395
|
const t = De(Df), n = e?.properties.destination, r = String(e?.properties.label ?? ""), i = typeof n == "string" ? Ii(n) : void 0;
|
|
23396
23396
|
return i?.kind !== "reference" ? /* @__PURE__ */ m("span", { children: "Reference unavailable" }) : t?.complete && t.renderElementReference ? t.renderElementReference(i.reference, { ...t.referenceContext, label: r }) : /* @__PURE__ */ m("span", { children: r });
|
|
23397
|
-
},
|
|
23397
|
+
}, yw = { "copilot-element-reference": Tw }, kw = ({
|
|
23398
23398
|
renderElementReference: e,
|
|
23399
23399
|
referenceContext: t,
|
|
23400
23400
|
complete: n,
|
|
@@ -23403,9 +23403,9 @@ const Kn = { kind: "invalid" }, Yu = (e, t) => e.length <= t && e.trim().length
|
|
|
23403
23403
|
Rf,
|
|
23404
23404
|
{
|
|
23405
23405
|
...r,
|
|
23406
|
-
components:
|
|
23407
|
-
rehypePlugins:
|
|
23408
|
-
remarkPlugins:
|
|
23406
|
+
components: yw,
|
|
23407
|
+
rehypePlugins: bw,
|
|
23408
|
+
remarkPlugins: Ew,
|
|
23409
23409
|
parseIncompleteMarkdown: !n
|
|
23410
23410
|
}
|
|
23411
23411
|
) }), Pf = ({ className: e, from: t, ...n }) => /* @__PURE__ */ m(
|
|
@@ -23431,14 +23431,14 @@ const Kn = { kind: "invalid" }, Yu = (e, t) => e.length <= t && e.trim().length
|
|
|
23431
23431
|
...n,
|
|
23432
23432
|
children: e
|
|
23433
23433
|
}
|
|
23434
|
-
),
|
|
23434
|
+
), xw = { messageId: "", blockId: "content" }, Bf = Te(
|
|
23435
23435
|
({
|
|
23436
23436
|
className: e,
|
|
23437
|
-
referenceContext: t =
|
|
23437
|
+
referenceContext: t = xw,
|
|
23438
23438
|
complete: n = !0,
|
|
23439
23439
|
...r
|
|
23440
23440
|
}) => /* @__PURE__ */ m(
|
|
23441
|
-
|
|
23441
|
+
kw,
|
|
23442
23442
|
{
|
|
23443
23443
|
className: ge(
|
|
23444
23444
|
at.body,
|
|
@@ -23452,7 +23452,7 @@ const Kn = { kind: "invalid" }, Yu = (e, t) => e.length <= t && e.trim().length
|
|
|
23452
23452
|
)
|
|
23453
23453
|
);
|
|
23454
23454
|
Bf.displayName = "MessageResponse";
|
|
23455
|
-
const
|
|
23455
|
+
const _w = ({
|
|
23456
23456
|
children: e,
|
|
23457
23457
|
as: t = "p",
|
|
23458
23458
|
className: n,
|
|
@@ -23476,18 +23476,18 @@ const _C = ({
|
|
|
23476
23476
|
children: e
|
|
23477
23477
|
}
|
|
23478
23478
|
);
|
|
23479
|
-
}, Ff = Te(
|
|
23479
|
+
}, Ff = Te(_w), Hf = (e) => {
|
|
23480
23480
|
if (e < 60)
|
|
23481
23481
|
return `${e}s`;
|
|
23482
23482
|
const t = e % 60;
|
|
23483
23483
|
return t === 0 ? `${e / 60}m` : `${Math.floor(e / 60)}m ${t}s`;
|
|
23484
|
-
},
|
|
23485
|
-
event:
|
|
23486
|
-
trigger:
|
|
23487
|
-
preview:
|
|
23488
|
-
reply:
|
|
23489
|
-
details:
|
|
23490
|
-
},
|
|
23484
|
+
}, Aw = "_event_kqsol_1", Cw = "_trigger_kqsol_6", ww = "_preview_kqsol_19", Iw = "_reply_kqsol_25", Nw = "_details_kqsol_26", Xn = {
|
|
23485
|
+
event: Aw,
|
|
23486
|
+
trigger: Cw,
|
|
23487
|
+
preview: ww,
|
|
23488
|
+
reply: Iw,
|
|
23489
|
+
details: Nw
|
|
23490
|
+
}, Sw = ({ question: e }) => {
|
|
23491
23491
|
const t = e.options.filter((r) => e.answer?.selectedOptionIds.includes(r.id)).map((r) => r.label), n = e.state === "cancelled" && !e.answer ? "Question cancelled" : e.answer?.outcome === "skipped" ? "Skipped" : [...t, e.answer?.text].filter(Boolean).join("; ");
|
|
23492
23492
|
return /* @__PURE__ */ j(
|
|
23493
23493
|
Ya,
|
|
@@ -23525,7 +23525,7 @@ const _C = ({
|
|
|
23525
23525
|
]
|
|
23526
23526
|
}
|
|
23527
23527
|
);
|
|
23528
|
-
},
|
|
23528
|
+
}, vw = (e, t) => {
|
|
23529
23529
|
const r = t.filter((i) => i.state !== "pending").filter(
|
|
23530
23530
|
(i, a, s) => s.findIndex((o) => o.questionId === i.questionId) === a
|
|
23531
23531
|
).sort((i, a) => Date.parse(i.createdAt) - Date.parse(a.createdAt)).map((i) => ({
|
|
@@ -23540,12 +23540,12 @@ const _C = ({
|
|
|
23540
23540
|
}, []).concat(
|
|
23541
23541
|
r.filter((i) => i.index === -1).map(({ question: i }) => ({ kind: "question", question: i }))
|
|
23542
23542
|
);
|
|
23543
|
-
},
|
|
23543
|
+
}, Lw = {
|
|
23544
23544
|
reasoning: da,
|
|
23545
23545
|
tool: u0,
|
|
23546
23546
|
plan: Zp,
|
|
23547
23547
|
message: fl
|
|
23548
|
-
},
|
|
23548
|
+
}, Rw = /^(?:Linting|Laying out and linting) /, ui = (e) => e.kind === "tool" && e.status === "error" && (e.name === "bash" || e.name === "shell") && Rw.test(e.label), Ow = (e) => e.status === "error" && e.kind !== "message" && !ui(e) ? $p : Lw[e.kind], Dw = /* @__PURE__ */ new Set([
|
|
23549
23549
|
"read",
|
|
23550
23550
|
"read_file",
|
|
23551
23551
|
"edit",
|
|
@@ -23555,13 +23555,13 @@ const _C = ({
|
|
|
23555
23555
|
"create_file",
|
|
23556
23556
|
"bash",
|
|
23557
23557
|
"shell"
|
|
23558
|
-
]),
|
|
23558
|
+
]), Pw = (e) => e.kind === "tool" && e.description !== void 0 && Dw.has(e.name ?? ""), Mw = ({ step: e }) => /* @__PURE__ */ m(
|
|
23559
23559
|
om,
|
|
23560
23560
|
{
|
|
23561
|
-
icon:
|
|
23561
|
+
icon: Ow(e),
|
|
23562
23562
|
label: e.status === "error" && !ui(e) ? `${e.label} (failed)` : e.label,
|
|
23563
23563
|
description: e.artifacts?.length || e.label === "Searching files" ? void 0 : e.description,
|
|
23564
|
-
descriptionIsFile:
|
|
23564
|
+
descriptionIsFile: Pw(e),
|
|
23565
23565
|
status: ui(e) ? "validation-error" : e.status,
|
|
23566
23566
|
children: e.artifacts?.map((t) => /* @__PURE__ */ j(
|
|
23567
23567
|
bl,
|
|
@@ -23578,17 +23578,17 @@ const _C = ({
|
|
|
23578
23578
|
}
|
|
23579
23579
|
), Uf = (e) => {
|
|
23580
23580
|
const [t, n] = J(() => Date.now());
|
|
23581
|
-
return
|
|
23581
|
+
return we(() => {
|
|
23582
23582
|
const r = setInterval(() => n(Date.now()), e);
|
|
23583
23583
|
return () => clearInterval(r);
|
|
23584
23584
|
}, [e]), t;
|
|
23585
|
-
}, zf = (e) => e.kind === "message", Ha = (e) => e.kind === "reasoning" && e.status !== "error", Ua = (e) => !!e.description?.trim(),
|
|
23585
|
+
}, zf = (e) => e.kind === "message", Ha = (e) => e.kind === "reasoning" && e.status !== "error", Ua = (e) => !!e.description?.trim(), Bw = (e) => e.reduce((t, n) => {
|
|
23586
23586
|
const r = t.at(-1);
|
|
23587
23587
|
return zf(n) ? t.push({ kind: "text", block: n }) : r?.kind === "work" ? t[t.length - 1] = { kind: "work", blocks: [...r.blocks, n] } : t.push({ kind: "work", blocks: [n] }), t;
|
|
23588
23588
|
}, []), li = (e) => {
|
|
23589
23589
|
const t = e ? Date.parse(e) : Number.NaN;
|
|
23590
23590
|
return Number.isFinite(t) ? t : void 0;
|
|
23591
|
-
},
|
|
23591
|
+
}, Fw = (e, t) => e === void 0 || t === void 0 || t < e ? void 0 : Math.max(1, Math.round((t - e) / 1e3)), Wu = ({
|
|
23592
23592
|
children: e,
|
|
23593
23593
|
complete: t,
|
|
23594
23594
|
messageId: n,
|
|
@@ -23602,10 +23602,10 @@ const _C = ({
|
|
|
23602
23602
|
renderElementReference: n ? i : void 0,
|
|
23603
23603
|
children: e
|
|
23604
23604
|
}
|
|
23605
|
-
) }) }), $f = (e, t) =>
|
|
23605
|
+
) }) }), $f = (e, t) => Fw(li(e.startedAt), li(t)), qf = (e, t) => {
|
|
23606
23606
|
const n = $f(e, t);
|
|
23607
23607
|
return n === void 0 ? "Thought" : `Thought for ${Hf(n)}`;
|
|
23608
|
-
},
|
|
23608
|
+
}, Hw = ({ step: e, until: t }) => {
|
|
23609
23609
|
const n = e.status === "active" ? /* @__PURE__ */ m(Ff, { as: "span", className: "text-xs", children: "Thinking…" }) : /* @__PURE__ */ m("span", { children: qf(e, t) });
|
|
23610
23610
|
return Ua(e) ? /* @__PURE__ */ j(Ya, { className: `${at.secondary} not-prose`, children: [
|
|
23611
23611
|
/* @__PURE__ */ j(Wa, { className: "group flex min-h-6 items-center gap-2 text-muted-foreground text-xs transition-colors hover:text-foreground", children: [
|
|
@@ -23630,7 +23630,7 @@ const _C = ({
|
|
|
23630
23630
|
]
|
|
23631
23631
|
}
|
|
23632
23632
|
);
|
|
23633
|
-
},
|
|
23633
|
+
}, Uw = (e, t) => {
|
|
23634
23634
|
const n = Math.floor(Math.max(0, t - e) / 6e4);
|
|
23635
23635
|
if (n < 1)
|
|
23636
23636
|
return "just now";
|
|
@@ -23641,7 +23641,7 @@ const _C = ({
|
|
|
23641
23641
|
return `${r}h ago`;
|
|
23642
23642
|
const i = Math.floor(r / 24);
|
|
23643
23643
|
return i < 7 ? `${i}d ago` : new Date(e).toLocaleDateString();
|
|
23644
|
-
},
|
|
23644
|
+
}, zw = ({ at: e }) => {
|
|
23645
23645
|
const t = Uf(6e4), n = new Date(e);
|
|
23646
23646
|
return /* @__PURE__ */ m($a, { children: /* @__PURE__ */ j(qa, { children: [
|
|
23647
23647
|
/* @__PURE__ */ m(ja, { asChild: !0, children: /* @__PURE__ */ m(
|
|
@@ -23649,22 +23649,22 @@ const _C = ({
|
|
|
23649
23649
|
{
|
|
23650
23650
|
type: "button",
|
|
23651
23651
|
className: `${at.secondary} self-start rounded-sm text-muted-foreground opacity-0 outline-none transition-opacity focus-visible:ring-2 focus-visible:ring-ring group-focus-within/turn:opacity-100 group-hover/turn:opacity-100`,
|
|
23652
|
-
children: /* @__PURE__ */ m("time", { dateTime: n.toISOString(), "aria-live": "off", "data-testid": "turn-delivered-at", children:
|
|
23652
|
+
children: /* @__PURE__ */ m("time", { dateTime: n.toISOString(), "aria-live": "off", "data-testid": "turn-delivered-at", children: Uw(e, t) })
|
|
23653
23653
|
}
|
|
23654
23654
|
) }),
|
|
23655
23655
|
/* @__PURE__ */ m(Va, { children: n.toLocaleString() })
|
|
23656
23656
|
] }) });
|
|
23657
|
-
}, $
|
|
23657
|
+
}, $w = (e, t) => {
|
|
23658
23658
|
const n = [...e].reverse().find((a) => a.status === "active") ?? e.at(-1), r = n ? Ha(n) ? n.status === "active" ? "Thinking" : qf(n, t(n)) : n.status === "error" && !ui(n) ? `${n.label} (failed)` : n.label : "", i = e.length - 1;
|
|
23659
23659
|
return `${r} and ${i} other step${i === 1 ? "" : "s"}`;
|
|
23660
|
-
},
|
|
23660
|
+
}, qw = ({
|
|
23661
23661
|
blocks: e,
|
|
23662
23662
|
label: t,
|
|
23663
23663
|
rows: n
|
|
23664
23664
|
}) => e.length === 1 ? /* @__PURE__ */ m("div", { className: `${at.secondary} flex flex-col`, children: n }) : /* @__PURE__ */ j(nm, { className: `${at.secondary} mb-0`, children: [
|
|
23665
23665
|
/* @__PURE__ */ m(rm, { children: t }),
|
|
23666
23666
|
/* @__PURE__ */ m(im, { children: n })
|
|
23667
|
-
] }),
|
|
23667
|
+
] }), jw = ({
|
|
23668
23668
|
messageId: e,
|
|
23669
23669
|
renderElementReference: t,
|
|
23670
23670
|
steps: n,
|
|
@@ -23675,7 +23675,7 @@ const _C = ({
|
|
|
23675
23675
|
}) => {
|
|
23676
23676
|
const o = (h) => n[n.indexOf(h) + 1]?.startedAt, u = n.filter(
|
|
23677
23677
|
(h) => zf(h) ? Ua(h) : !Ha(h) || Ua(h) || h.status === "active" || $f(h, o(h)) !== void 0
|
|
23678
|
-
), l = (h) =>
|
|
23678
|
+
), l = (h) => Bw(h).map(
|
|
23679
23679
|
(p) => p.kind === "text" ? /* @__PURE__ */ m(
|
|
23680
23680
|
Wu,
|
|
23681
23681
|
{
|
|
@@ -23687,20 +23687,20 @@ const _C = ({
|
|
|
23687
23687
|
},
|
|
23688
23688
|
p.block.stepId
|
|
23689
23689
|
) : /* @__PURE__ */ m(
|
|
23690
|
-
|
|
23690
|
+
qw,
|
|
23691
23691
|
{
|
|
23692
23692
|
blocks: p.blocks,
|
|
23693
|
-
label: $
|
|
23693
|
+
label: $w(p.blocks, o),
|
|
23694
23694
|
rows: p.blocks.map(
|
|
23695
|
-
(g) => Ha(g) ? /* @__PURE__ */ m(
|
|
23695
|
+
(g) => Ha(g) ? /* @__PURE__ */ m(Hw, { step: g, until: o(g) }, g.stepId) : /* @__PURE__ */ m(Mw, { step: g }, g.stepId)
|
|
23696
23696
|
)
|
|
23697
23697
|
},
|
|
23698
23698
|
`work-${p.blocks[0]?.stepId}`
|
|
23699
23699
|
)
|
|
23700
|
-
), d =
|
|
23700
|
+
), d = vw(u, r).flatMap(
|
|
23701
23701
|
(h) => h.kind === "question" ? [
|
|
23702
23702
|
/* @__PURE__ */ m(
|
|
23703
|
-
|
|
23703
|
+
Sw,
|
|
23704
23704
|
{
|
|
23705
23705
|
question: h.question
|
|
23706
23706
|
},
|
|
@@ -23724,10 +23724,10 @@ const _C = ({
|
|
|
23724
23724
|
const f = li(a);
|
|
23725
23725
|
if (!i) {
|
|
23726
23726
|
const h = li(u.at(-1)?.startedAt) ?? f;
|
|
23727
|
-
h !== void 0 && d.length > 0 && d.push(/* @__PURE__ */ m(
|
|
23727
|
+
h !== void 0 && d.length > 0 && d.push(/* @__PURE__ */ m(zw, { at: h }, "status"));
|
|
23728
23728
|
}
|
|
23729
23729
|
return /* @__PURE__ */ m(it, { children: d });
|
|
23730
|
-
},
|
|
23730
|
+
}, Vw = ({
|
|
23731
23731
|
message: e,
|
|
23732
23732
|
actionsBlocked: t,
|
|
23733
23733
|
renderElementReference: n,
|
|
@@ -23756,7 +23756,7 @@ const _C = ({
|
|
|
23756
23756
|
};
|
|
23757
23757
|
return /* @__PURE__ */ j("div", { className: `${tm.message} flex flex-col gap-2`, children: [
|
|
23758
23758
|
/* @__PURE__ */ m(
|
|
23759
|
-
|
|
23759
|
+
jw,
|
|
23760
23760
|
{
|
|
23761
23761
|
messageId: e.messageId,
|
|
23762
23762
|
renderElementReference: n,
|
|
@@ -23771,7 +23771,7 @@ const _C = ({
|
|
|
23771
23771
|
l && /* @__PURE__ */ m("p", { role: "status", className: "text-muted-foreground text-sm", children: l }),
|
|
23772
23772
|
d && /* @__PURE__ */ m("p", { role: "status", className: "text-muted-foreground text-sm", children: d }),
|
|
23773
23773
|
e.inputDelivery === "unverified" && /* @__PURE__ */ m(
|
|
23774
|
-
|
|
23774
|
+
Ct,
|
|
23775
23775
|
{
|
|
23776
23776
|
variant: "warning",
|
|
23777
23777
|
title: "We could not confirm whether the provider received this input.",
|
|
@@ -23807,7 +23807,7 @@ const _C = ({
|
|
|
23807
23807
|
),
|
|
23808
23808
|
o && /* @__PURE__ */ m("p", { role: "alert", className: "text-destructive text-xs", children: o }),
|
|
23809
23809
|
e.state === "failed" && /* @__PURE__ */ m(
|
|
23810
|
-
|
|
23810
|
+
Ct,
|
|
23811
23811
|
{
|
|
23812
23812
|
variant: "destructive",
|
|
23813
23813
|
title: "The turn failed.",
|
|
@@ -23816,10 +23816,10 @@ const _C = ({
|
|
|
23816
23816
|
}
|
|
23817
23817
|
)
|
|
23818
23818
|
] });
|
|
23819
|
-
},
|
|
23820
|
-
const t = e.event, n = t.type === "draft_applied" ? `Applied changes to ${t.artifacts.map((r) => r.name).join(", ")}.` : t.type === "draft_discarded" ? `Discarded ${t.artifactKeys.length}
|
|
23819
|
+
}, Yw = ({ message: e }) => {
|
|
23820
|
+
const t = e.event, n = t.type === "draft_applied" ? `Applied changes to ${t.artifacts.map((r) => r.name).join(", ")}.` : t.type === "draft_discarded" ? `Discarded ${t.artifactKeys.length} change${t.artifactKeys.length === 1 ? "" : "s"}.` : t.type === "draft_reverted" ? "Reverted changes from a previous turn." : t.type === "apply_undone" ? `Undid changes to ${t.artifacts.map((r) => r.name).join(", ")}.` : "Continued from another conversation.";
|
|
23821
23821
|
return /* @__PURE__ */ m("p", { role: "status", className: "text-center text-muted-foreground text-xs", children: n });
|
|
23822
|
-
},
|
|
23822
|
+
}, Ww = ({
|
|
23823
23823
|
message: e,
|
|
23824
23824
|
actionsBlocked: t,
|
|
23825
23825
|
onRetry: n,
|
|
@@ -23881,7 +23881,7 @@ const _C = ({
|
|
|
23881
23881
|
] }),
|
|
23882
23882
|
o && /* @__PURE__ */ m("p", { role: "alert", className: "text-destructive text-xs", children: o })
|
|
23883
23883
|
] });
|
|
23884
|
-
},
|
|
23884
|
+
}, Gw = ({
|
|
23885
23885
|
message: e,
|
|
23886
23886
|
renderElementReference: t,
|
|
23887
23887
|
actionsBlocked: n,
|
|
@@ -23890,8 +23890,8 @@ const _C = ({
|
|
|
23890
23890
|
onSendHeldMessages: a,
|
|
23891
23891
|
onResendTurnInput: s,
|
|
23892
23892
|
onStopTurn: o
|
|
23893
|
-
}) => e.kind === "event" ? /* @__PURE__ */ m(
|
|
23894
|
-
|
|
23893
|
+
}) => e.kind === "event" ? /* @__PURE__ */ m(Yw, { message: e }) : e.kind === "user" ? /* @__PURE__ */ m(
|
|
23894
|
+
Ww,
|
|
23895
23895
|
{
|
|
23896
23896
|
message: e,
|
|
23897
23897
|
actionsBlocked: n,
|
|
@@ -23900,7 +23900,7 @@ const _C = ({
|
|
|
23900
23900
|
onSendHeld: a
|
|
23901
23901
|
}
|
|
23902
23902
|
) : /* @__PURE__ */ m(
|
|
23903
|
-
|
|
23903
|
+
Vw,
|
|
23904
23904
|
{
|
|
23905
23905
|
message: e,
|
|
23906
23906
|
actionsBlocked: n,
|
|
@@ -23908,12 +23908,12 @@ const _C = ({
|
|
|
23908
23908
|
onResend: () => s(e.turnId),
|
|
23909
23909
|
onStop: o
|
|
23910
23910
|
}
|
|
23911
|
-
),
|
|
23912
|
-
draftFooter:
|
|
23913
|
-
draftSummary:
|
|
23914
|
-
reviewLabel:
|
|
23915
|
-
reviewButton:
|
|
23916
|
-
},
|
|
23911
|
+
), Qw = "_draftFooter_1ulok_1", Kw = "_draftSummary_1ulok_6", Xw = "_reviewLabel_1ulok_18", Zw = "_reviewButton_1ulok_25", Zn = {
|
|
23912
|
+
draftFooter: Qw,
|
|
23913
|
+
draftSummary: Kw,
|
|
23914
|
+
reviewLabel: Xw,
|
|
23915
|
+
reviewButton: Zw
|
|
23916
|
+
}, Jw = ({ since: e }) => {
|
|
23917
23917
|
const t = Uf(1e3);
|
|
23918
23918
|
return /* @__PURE__ */ m("span", { "aria-hidden": "true", children: Hf(Math.max(0, Math.floor((t - e) / 1e3))) });
|
|
23919
23919
|
}, eI = ({
|
|
@@ -23930,7 +23930,7 @@ const _C = ({
|
|
|
23930
23930
|
"data-testid": "turn-working",
|
|
23931
23931
|
children: [
|
|
23932
23932
|
/* @__PURE__ */ m(Ff, { as: "span", className: "text-xs", children: t === "reconciling_history" ? "Catching up on conversation history" : "Working…" }),
|
|
23933
|
-
Number.isFinite(n) && /* @__PURE__ */ m(
|
|
23933
|
+
Number.isFinite(n) && /* @__PURE__ */ m(Jw, { since: n })
|
|
23934
23934
|
]
|
|
23935
23935
|
}
|
|
23936
23936
|
);
|
|
@@ -23972,7 +23972,7 @@ const _C = ({
|
|
|
23972
23972
|
},
|
|
23973
23973
|
b.messageId
|
|
23974
23974
|
) : /* @__PURE__ */ m(
|
|
23975
|
-
|
|
23975
|
+
Gw,
|
|
23976
23976
|
{
|
|
23977
23977
|
message: b,
|
|
23978
23978
|
renderElementReference: t,
|
|
@@ -23996,7 +23996,11 @@ const _C = ({
|
|
|
23996
23996
|
"aria-labelledby": p,
|
|
23997
23997
|
className: `${Zn.draftFooter} ${Zn.draftSummary}`,
|
|
23998
23998
|
children: [
|
|
23999
|
-
/* @__PURE__ */
|
|
23999
|
+
/* @__PURE__ */ j("span", { id: p, className: Zn.reviewLabel, children: [
|
|
24000
|
+
o.artifacts.length,
|
|
24001
|
+
" changed ",
|
|
24002
|
+
o.artifacts.length === 1 ? "file" : "files"
|
|
24003
|
+
] }),
|
|
24000
24004
|
/* @__PURE__ */ m(
|
|
24001
24005
|
Ne,
|
|
24002
24006
|
{
|
|
@@ -24005,14 +24009,14 @@ const _C = ({
|
|
|
24005
24009
|
size: "sm",
|
|
24006
24010
|
variant: "secondary",
|
|
24007
24011
|
onClick: () => i({ conversationId: s, draftId: o.draftId }),
|
|
24008
|
-
children: "
|
|
24012
|
+
children: "Open changes"
|
|
24009
24013
|
}
|
|
24010
24014
|
)
|
|
24011
24015
|
]
|
|
24012
24016
|
}
|
|
24013
24017
|
),
|
|
24014
24018
|
h && !o && !f && /* @__PURE__ */ m(
|
|
24015
|
-
|
|
24019
|
+
Ct,
|
|
24016
24020
|
{
|
|
24017
24021
|
className: Zn.draftFooter,
|
|
24018
24022
|
variant: "warning",
|
|
@@ -24089,7 +24093,7 @@ const _C = ({
|
|
|
24089
24093
|
children: /* @__PURE__ */ m(Rp, { className: "size-4" })
|
|
24090
24094
|
}
|
|
24091
24095
|
),
|
|
24092
|
-
/* @__PURE__ */ m(
|
|
24096
|
+
/* @__PURE__ */ m(wh, { className: "size-4 shrink-0", "aria-hidden": "true" }),
|
|
24093
24097
|
/* @__PURE__ */ m("h2", { className: "font-medium text-sm", children: "Copilot" }),
|
|
24094
24098
|
e && /* @__PURE__ */ m(
|
|
24095
24099
|
nI,
|
|
@@ -24264,8 +24268,8 @@ const _C = ({
|
|
|
24264
24268
|
d.current = !0, f({ submission: T, status: "submitting", error: void 0 });
|
|
24265
24269
|
try {
|
|
24266
24270
|
await n(T), f({ status: "accepted" });
|
|
24267
|
-
} catch (
|
|
24268
|
-
f({ status: "failed", error:
|
|
24271
|
+
} catch (C) {
|
|
24272
|
+
f({ status: "failed", error: C instanceof Error ? C.message : String(C) });
|
|
24269
24273
|
} finally {
|
|
24270
24274
|
d.current = !1;
|
|
24271
24275
|
}
|
|
@@ -24306,7 +24310,7 @@ const _C = ({
|
|
|
24306
24310
|
),
|
|
24307
24311
|
a && /* @__PURE__ */ m(Gu, { children: a }),
|
|
24308
24312
|
l.error && /* @__PURE__ */ m(
|
|
24309
|
-
|
|
24313
|
+
Ct,
|
|
24310
24314
|
{
|
|
24311
24315
|
role: "alert",
|
|
24312
24316
|
variant: "destructive",
|
|
@@ -24363,10 +24367,10 @@ const _C = ({
|
|
|
24363
24367
|
selectionContext: p
|
|
24364
24368
|
}) => {
|
|
24365
24369
|
const [g, y] = J(t);
|
|
24366
|
-
|
|
24370
|
+
we(() => {
|
|
24367
24371
|
y(t);
|
|
24368
24372
|
}, [t]);
|
|
24369
|
-
const b = Ep({ client: e, conversationId: g }), T = b.availability?.state === "organization_disabled",
|
|
24373
|
+
const b = Ep({ client: e, conversationId: g }), T = b.availability?.state === "organization_disabled", C = b.availabilityCheckSupported && (b.availabilityLoading || b.availabilityError !== null), v = T || C, D = T ? "Sending and changes are unavailable while Copilot is disabled for this organization." : b.availabilityError ? "Unable to verify organization Copilot availability. Changes are disabled." : void 0, M = b.messages.some(
|
|
24370
24374
|
(B) => B.kind === "assistant" && (B.remoteStop === "pending" || B.remoteStop === "unconfirmed")
|
|
24371
24375
|
), {
|
|
24372
24376
|
conversations: N,
|
|
@@ -24375,7 +24379,7 @@ const _C = ({
|
|
|
24375
24379
|
canRename: S,
|
|
24376
24380
|
error: x,
|
|
24377
24381
|
isLoading: L
|
|
24378
|
-
} = Tp({ client: e }),
|
|
24382
|
+
} = Tp({ client: e }), w = Z(
|
|
24379
24383
|
(B) => {
|
|
24380
24384
|
y(B), r?.(B);
|
|
24381
24385
|
},
|
|
@@ -24406,7 +24410,7 @@ const _C = ({
|
|
|
24406
24410
|
}
|
|
24407
24411
|
),
|
|
24408
24412
|
g && b.synchronizationError && /* @__PURE__ */ m(
|
|
24409
|
-
|
|
24413
|
+
Ct,
|
|
24410
24414
|
{
|
|
24411
24415
|
className: vr.banner,
|
|
24412
24416
|
variant: "destructive",
|
|
@@ -24416,7 +24420,7 @@ const _C = ({
|
|
|
24416
24420
|
}
|
|
24417
24421
|
),
|
|
24418
24422
|
T && /* @__PURE__ */ m(
|
|
24419
|
-
|
|
24423
|
+
Ct,
|
|
24420
24424
|
{
|
|
24421
24425
|
className: vr.banner,
|
|
24422
24426
|
variant: "warning",
|
|
@@ -24426,7 +24430,7 @@ const _C = ({
|
|
|
24426
24430
|
}
|
|
24427
24431
|
),
|
|
24428
24432
|
b.availabilityError && /* @__PURE__ */ m(
|
|
24429
|
-
|
|
24433
|
+
Ct,
|
|
24430
24434
|
{
|
|
24431
24435
|
className: vr.banner,
|
|
24432
24436
|
variant: "destructive",
|
|
@@ -24449,7 +24453,7 @@ const _C = ({
|
|
|
24449
24453
|
}
|
|
24450
24454
|
),
|
|
24451
24455
|
g && b.verificationWarning && /* @__PURE__ */ m(
|
|
24452
|
-
|
|
24456
|
+
Ct,
|
|
24453
24457
|
{
|
|
24454
24458
|
className: vr.banner,
|
|
24455
24459
|
variant: "warning",
|
|
@@ -24472,7 +24476,7 @@ const _C = ({
|
|
|
24472
24476
|
H0,
|
|
24473
24477
|
{
|
|
24474
24478
|
conversations: N,
|
|
24475
|
-
onSelect:
|
|
24479
|
+
onSelect: w,
|
|
24476
24480
|
onRename: S ? H : void 0,
|
|
24477
24481
|
error: x,
|
|
24478
24482
|
loading: L,
|
|
@@ -24526,11 +24530,11 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
24526
24530
|
content: '<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" />',
|
|
24527
24531
|
validationMessages: []
|
|
24528
24532
|
}
|
|
24529
|
-
],
|
|
24533
|
+
], CI = {
|
|
24530
24534
|
code: "PROVIDER_ERROR",
|
|
24531
24535
|
message: "The model provider returned an error.",
|
|
24532
24536
|
traceRef: "trace-fixture-1"
|
|
24533
|
-
},
|
|
24537
|
+
}, wI = {
|
|
24534
24538
|
start: 800,
|
|
24535
24539
|
step: 900,
|
|
24536
24540
|
word: 60
|
|
@@ -24549,7 +24553,7 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
24549
24553
|
return;
|
|
24550
24554
|
}
|
|
24551
24555
|
if (n.outcome === "failed") {
|
|
24552
|
-
t.state = "failed", t.error = n.error ??
|
|
24556
|
+
t.state = "failed", t.error = n.error ?? CI, e.status = "idle", e.emit({
|
|
24553
24557
|
type: "turn_finished",
|
|
24554
24558
|
turnId: t.turnId,
|
|
24555
24559
|
assistantMessageId: t.messageId,
|
|
@@ -24722,7 +24726,7 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
24722
24726
|
otherConversationIds: [],
|
|
24723
24727
|
validationMessages: t.validationMessages
|
|
24724
24728
|
})), YI = (e) => {
|
|
24725
|
-
const t = e?.resolveScript ?? vI, n = e?.entryPoint ?? Yf, r = e?.timing ??
|
|
24729
|
+
const t = e?.resolveScript ?? vI, n = e?.entryPoint ?? Yf, r = e?.timing ?? wI, i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set();
|
|
24726
24730
|
let d = 0, f = 0, h = 0, p = 0;
|
|
24727
24731
|
const g = (S) => ({
|
|
24728
24732
|
conversationId: S.conversationId,
|
|
@@ -24743,8 +24747,8 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
24743
24747
|
S.revision += 1;
|
|
24744
24748
|
const L = { ...x, revision: S.revision };
|
|
24745
24749
|
L.type === "question_requested" && (S.pendingQuestionId = L.question.questionId), L.type === "question_answered" && L.question.state !== "pending" && (S.pendingQuestionId = void 0), S.journal.record(S.messages, S.draft, S.revision);
|
|
24746
|
-
for (const
|
|
24747
|
-
|
|
24750
|
+
for (const w of S.listeners)
|
|
24751
|
+
w({ chatId: S.conversationId, revision: S.revision });
|
|
24748
24752
|
LI.has(L.type) && y(S);
|
|
24749
24753
|
}, T = (S) => {
|
|
24750
24754
|
const x = {
|
|
@@ -24762,7 +24766,7 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
24762
24766
|
context: [],
|
|
24763
24767
|
availability: { state: "enabled", policyVersion: "fixture" },
|
|
24764
24768
|
emit: (L) => b(x, L),
|
|
24765
|
-
setDraft: (L,
|
|
24769
|
+
setDraft: (L, w) => {
|
|
24766
24770
|
h += 1;
|
|
24767
24771
|
const P = x.draft, U = OI(L), B = new Map(
|
|
24768
24772
|
(P?.artifacts ?? []).map((X) => [X.artifactKey, X])
|
|
@@ -24775,7 +24779,7 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
24775
24779
|
artifacts: [...B.values()],
|
|
24776
24780
|
steps: [
|
|
24777
24781
|
...P?.steps ?? [],
|
|
24778
|
-
{ stepId: `draft-step-${
|
|
24782
|
+
{ stepId: `draft-step-${w}`, kind: "turn", turnId: w, reverted: !1 }
|
|
24779
24783
|
]
|
|
24780
24784
|
}, W = new Map(
|
|
24781
24785
|
(s.get(R.draftId) ?? []).map((X) => [
|
|
@@ -24797,24 +24801,24 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
24797
24801
|
}
|
|
24798
24802
|
};
|
|
24799
24803
|
return i.set(S, x), x;
|
|
24800
|
-
},
|
|
24801
|
-
const L = i.get(S),
|
|
24804
|
+
}, C = (S, x) => {
|
|
24805
|
+
const L = i.get(S), w = L?.messages.find(
|
|
24802
24806
|
(B) => B.kind === "assistant" && B.questions?.some((R) => R.questionId === x) === !0
|
|
24803
|
-
), P =
|
|
24804
|
-
return L &&
|
|
24807
|
+
), P = w?.questions?.find((B) => B.questionId === x), U = w && u.get(w.messageId);
|
|
24808
|
+
return L && w && P && U ? { host: L, message: w, question: P, script: U } : void 0;
|
|
24805
24809
|
}, v = (S, x) => {
|
|
24806
24810
|
d += 1, S.messages.push({
|
|
24807
24811
|
kind: "event",
|
|
24808
24812
|
messageId: `event-${d}`,
|
|
24809
24813
|
event: x
|
|
24810
24814
|
});
|
|
24811
|
-
}, D = (S, x, L,
|
|
24815
|
+
}, D = (S, x, L, w) => {
|
|
24812
24816
|
f += 1;
|
|
24813
24817
|
const P = `turn-${f}`;
|
|
24814
24818
|
S.turnId = P;
|
|
24815
24819
|
const U = {
|
|
24816
24820
|
kind: "assistant",
|
|
24817
|
-
messageId:
|
|
24821
|
+
messageId: w,
|
|
24818
24822
|
turnId: P,
|
|
24819
24823
|
content: "",
|
|
24820
24824
|
steps: [],
|
|
@@ -24831,7 +24835,7 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
24831
24835
|
)), S.emit({ type: "turn_input_delivery", turnId: P, inputDelivery: "confirmed" }), U.inputDelivery = "confirmed", S.emit({
|
|
24832
24836
|
type: "turn_started",
|
|
24833
24837
|
turnId: P,
|
|
24834
|
-
assistantMessageId:
|
|
24838
|
+
assistantMessageId: w,
|
|
24835
24839
|
userMessageIds: [L]
|
|
24836
24840
|
}), Wf(S, U, x, r);
|
|
24837
24841
|
}, r.start);
|
|
@@ -24845,8 +24849,8 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
24845
24849
|
availability: S.availability,
|
|
24846
24850
|
...S.lastApply === null ? {} : { lastApply: S.lastApply }
|
|
24847
24851
|
}), $ = (S, x) => {
|
|
24848
|
-
for (const [L,
|
|
24849
|
-
|
|
24852
|
+
for (const [L, w] of a)
|
|
24853
|
+
w.conversationId === S.conversationId && w.artifacts.some(
|
|
24850
24854
|
(P) => x.some(
|
|
24851
24855
|
(U) => U.projectId === P.projectId && U.artifactId === P.artifactId
|
|
24852
24856
|
)
|
|
@@ -24857,7 +24861,7 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
24857
24861
|
return { state: "enabled", policyVersion: "fixture" };
|
|
24858
24862
|
},
|
|
24859
24863
|
answerQuestion: NI({
|
|
24860
|
-
find:
|
|
24864
|
+
find: C,
|
|
24861
24865
|
timing: r
|
|
24862
24866
|
}),
|
|
24863
24867
|
async postMessage(S) {
|
|
@@ -24873,12 +24877,12 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
24873
24877
|
throw new Error("Submission ID was already used with different content.");
|
|
24874
24878
|
return L.result;
|
|
24875
24879
|
}
|
|
24876
|
-
const
|
|
24877
|
-
if (!
|
|
24878
|
-
let P = i.get(
|
|
24880
|
+
const w = S.conversationId ?? S.newConversationId;
|
|
24881
|
+
if (!w) throw new Error("A new conversation ID is required.");
|
|
24882
|
+
let P = i.get(w);
|
|
24879
24883
|
if (S.conversationId && !P)
|
|
24880
24884
|
throw new Error(`Unknown conversation: ${S.conversationId}`);
|
|
24881
|
-
if (P || (P = T(
|
|
24885
|
+
if (P || (P = T(w)), P.status === "running")
|
|
24882
24886
|
throw new Error(`Conversation ${P.conversationId} already has a turn in flight`);
|
|
24883
24887
|
d += 1;
|
|
24884
24888
|
const U = `message-${d}`, B = {
|
|
@@ -24896,15 +24900,15 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
24896
24900
|
delivery: "delivered"
|
|
24897
24901
|
}), d += 1;
|
|
24898
24902
|
const R = `message-${d}`, W = t(S), X = {
|
|
24899
|
-
conversationId:
|
|
24903
|
+
conversationId: w,
|
|
24900
24904
|
messageId: U,
|
|
24901
24905
|
delivery: "delivered"
|
|
24902
24906
|
};
|
|
24903
24907
|
return o.set(S.submissionId, { fingerprint: x, result: X }), D(P, W, U, R), X;
|
|
24904
24908
|
},
|
|
24905
24909
|
observe(S, x, L) {
|
|
24906
|
-
const
|
|
24907
|
-
return
|
|
24910
|
+
const w = M(S);
|
|
24911
|
+
return w.listeners.add(x), L?.(), () => w.listeners.delete(x);
|
|
24908
24912
|
},
|
|
24909
24913
|
async getConversation(S) {
|
|
24910
24914
|
const x = M(S);
|
|
@@ -24935,12 +24939,12 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
24935
24939
|
async renameConversation(S, x) {
|
|
24936
24940
|
const L = i.get(S);
|
|
24937
24941
|
if (!L) throw new Error(`Unknown conversation: ${S}`);
|
|
24938
|
-
const
|
|
24939
|
-
if (
|
|
24942
|
+
const w = x.trim();
|
|
24943
|
+
if (w.length === 0 || w.length > fa)
|
|
24940
24944
|
throw new Error(
|
|
24941
24945
|
`Conversation name must be 1 to ${fa} characters`
|
|
24942
24946
|
);
|
|
24943
|
-
return L.name =
|
|
24947
|
+
return L.name = w, y(L), g(L);
|
|
24944
24948
|
},
|
|
24945
24949
|
async deleteConversation(S) {
|
|
24946
24950
|
if (!i.delete(S))
|
|
@@ -24959,34 +24963,34 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
24959
24963
|
const x = i.get(S);
|
|
24960
24964
|
if (!x) throw new Error(`Unknown conversation: ${S}`);
|
|
24961
24965
|
const L = x.messages.filter(
|
|
24962
|
-
(
|
|
24966
|
+
(w) => w.kind === "user" && w.delivery === "held"
|
|
24963
24967
|
);
|
|
24964
|
-
for (const
|
|
24968
|
+
for (const w of L)
|
|
24965
24969
|
x.messages = x.messages.map(
|
|
24966
|
-
(P) => P.messageId ===
|
|
24970
|
+
(P) => P.messageId === w.messageId ? { ...w, delivery: void 0 } : P
|
|
24967
24971
|
), x.emit({
|
|
24968
24972
|
type: "message_delivery",
|
|
24969
|
-
messageId:
|
|
24973
|
+
messageId: w.messageId,
|
|
24970
24974
|
delivery: "delivered"
|
|
24971
24975
|
});
|
|
24972
24976
|
},
|
|
24973
24977
|
async retryMessage(S, x) {
|
|
24974
|
-
const L = i.get(S),
|
|
24975
|
-
throw !L ||
|
|
24978
|
+
const L = i.get(S), w = L?.messages.find((P) => P.messageId === x);
|
|
24979
|
+
throw !L || w?.kind !== "user" || w.delivery !== "failed" ? new Error(`No failed message ${x} can be retried.`) : new Error("This fixture has no provider transport to retry a failed message.");
|
|
24976
24980
|
},
|
|
24977
24981
|
async cancelMessage(S, x) {
|
|
24978
|
-
const L = i.get(S),
|
|
24979
|
-
if (!L ||
|
|
24982
|
+
const L = i.get(S), w = L?.messages.find((P) => P.messageId === x);
|
|
24983
|
+
if (!L || w?.kind !== "user" || w.delivery === void 0 || w.delivery === "cancelled")
|
|
24980
24984
|
throw new Error(`No pending message ${x} can be cancelled.`);
|
|
24981
24985
|
L.messages = L.messages.map(
|
|
24982
|
-
(P) => P.messageId === x ? { ...
|
|
24986
|
+
(P) => P.messageId === x ? { ...w, delivery: "cancelled", deliveryError: void 0 } : P
|
|
24983
24987
|
), L.emit({ type: "message_delivery", messageId: x, delivery: "cancelled" });
|
|
24984
24988
|
},
|
|
24985
24989
|
async resendTurnInput(S, x) {
|
|
24986
|
-
const L = i.get(S),
|
|
24990
|
+
const L = i.get(S), w = L?.messages.find(
|
|
24987
24991
|
(P) => P.kind === "assistant" && P.turnId === x
|
|
24988
24992
|
);
|
|
24989
|
-
throw !L ||
|
|
24993
|
+
throw !L || w?.kind !== "assistant" || w.inputDelivery !== "unverified" ? new Error(`Turn input for ${x} is not unverified.`) : new Error("This fixture has no provider transport to resend turn input.");
|
|
24990
24994
|
},
|
|
24991
24995
|
async stopTurn(S) {
|
|
24992
24996
|
const x = i.get(S);
|
|
@@ -24995,7 +24999,7 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
24995
24999
|
x.cancelled = !0, x.timer !== void 0 && clearTimeout(x.timer);
|
|
24996
25000
|
const L = x.messages.at(-1);
|
|
24997
25001
|
L?.kind === "assistant" && L.state === "streaming" && (x.messages = x.messages.map(
|
|
24998
|
-
(
|
|
25002
|
+
(w) => w.messageId === L.messageId ? {
|
|
24999
25003
|
...L,
|
|
25000
25004
|
state: "cancelled",
|
|
25001
25005
|
cancellationReason: "user_stop",
|
|
@@ -25003,7 +25007,7 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
25003
25007
|
questions: L.questions?.map(
|
|
25004
25008
|
(P) => P.state === "pending" ? { ...P, state: "cancelled" } : P
|
|
25005
25009
|
)
|
|
25006
|
-
} :
|
|
25010
|
+
} : w
|
|
25007
25011
|
), x.status = "idle", x.pendingQuestionId = void 0, x.emit({
|
|
25008
25012
|
type: "turn_finished",
|
|
25009
25013
|
turnId: L.turnId,
|
|
@@ -25028,20 +25032,20 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
25028
25032
|
}))
|
|
25029
25033
|
};
|
|
25030
25034
|
p += 1;
|
|
25031
|
-
const
|
|
25035
|
+
const w = `fixture-apply-${p}`, P = L.artifacts.map((R) => R.artifact), U = s.get(L.draftId) ?? [];
|
|
25032
25036
|
$(x, P);
|
|
25033
25037
|
const B = U.every(
|
|
25034
25038
|
(R) => R.changeKind === "create" || R.before !== void 0
|
|
25035
25039
|
);
|
|
25036
|
-
return B && a.set(
|
|
25037
|
-
applyId:
|
|
25040
|
+
return B && a.set(w, {
|
|
25041
|
+
applyId: w,
|
|
25038
25042
|
conversationId: S.conversationId,
|
|
25039
25043
|
artifacts: P,
|
|
25040
25044
|
changes: U
|
|
25041
|
-
}), e?.onDraftApplied?.(U), x.lastApply = { applyId:
|
|
25045
|
+
}), e?.onDraftApplied?.(U), x.lastApply = { applyId: w, undoable: B, artifacts: P }, x.draft = null, v(x, {
|
|
25042
25046
|
type: "draft_applied",
|
|
25043
25047
|
draftId: L.draftId,
|
|
25044
|
-
applyId:
|
|
25048
|
+
applyId: w,
|
|
25045
25049
|
generation: L.generation,
|
|
25046
25050
|
artifacts: P,
|
|
25047
25051
|
undoable: B
|
|
@@ -25049,53 +25053,53 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
25049
25053
|
type: "draft_resolved",
|
|
25050
25054
|
draftId: L.draftId,
|
|
25051
25055
|
outcome: "applied",
|
|
25052
|
-
applyId:
|
|
25053
|
-
}), { status: "applied", applyId:
|
|
25056
|
+
applyId: w
|
|
25057
|
+
}), { status: "applied", applyId: w };
|
|
25054
25058
|
},
|
|
25055
25059
|
async discardDraft({ conversationId: S, draftId: x, artifactKeys: L }) {
|
|
25056
|
-
const
|
|
25057
|
-
if (!
|
|
25060
|
+
const w = i.get(S), P = w?.draft;
|
|
25061
|
+
if (!w || !P || P.draftId !== x)
|
|
25058
25062
|
throw new Error("The conversation draft is no longer available.");
|
|
25059
25063
|
const U = L ?? P.artifacts.map((R) => R.artifactKey), B = P.artifacts.filter(
|
|
25060
25064
|
(R) => !U.includes(R.artifactKey)
|
|
25061
25065
|
);
|
|
25062
|
-
|
|
25066
|
+
w.draft = B.length === 0 ? null : { ...P, generation: P.generation + 1, artifacts: B }, v(w, {
|
|
25063
25067
|
type: "draft_discarded",
|
|
25064
25068
|
draftId: x,
|
|
25065
25069
|
generation: P.generation,
|
|
25066
25070
|
artifactKeys: U
|
|
25067
|
-
}),
|
|
25071
|
+
}), w.draft ? w.emit({
|
|
25068
25072
|
type: "draft_changed",
|
|
25069
25073
|
draftId: x,
|
|
25070
|
-
generation:
|
|
25071
|
-
}) :
|
|
25074
|
+
generation: w.draft.generation
|
|
25075
|
+
}) : w.emit({ type: "draft_resolved", draftId: x, outcome: "discarded" });
|
|
25072
25076
|
},
|
|
25073
25077
|
async revertDraft({ conversationId: S, draftId: x, beforeTurnId: L }) {
|
|
25074
|
-
const
|
|
25075
|
-
if (!
|
|
25078
|
+
const w = i.get(S), P = w?.draft;
|
|
25079
|
+
if (!w || !P || P.draftId !== x)
|
|
25076
25080
|
throw new Error("The conversation draft is no longer available.");
|
|
25077
25081
|
const U = P.steps.findIndex((ne) => ne.turnId === L);
|
|
25078
25082
|
if (U < 0) throw new Error(`Unknown turn ${L} in draft.`);
|
|
25079
25083
|
const B = P.steps.slice(U).map((ne) => ne.stepId), R = P.generation + 1, W = `revert-${R}`, X = new Set(
|
|
25080
25084
|
P.steps.slice(U).flatMap((ne) => ne.turnId ? [ne.turnId] : [])
|
|
25081
25085
|
), le = P.steps.slice(0, U).concat(P.steps.slice(U).map((ne) => ({ ...ne, reverted: !0 }))), k = X.size > 0 ? P.artifacts.filter((ne) => !(s.get(x) ?? []).some((I) => I.artifact.artifactId === ne.artifactKey)) : P.artifacts;
|
|
25082
|
-
|
|
25086
|
+
w.draft = {
|
|
25083
25087
|
...P,
|
|
25084
25088
|
generation: R,
|
|
25085
25089
|
artifacts: k,
|
|
25086
25090
|
steps: [...le, { stepId: W, kind: "revert", reverted: !1 }]
|
|
25087
|
-
}, X.size > 0 && s.set(x, []), v(
|
|
25091
|
+
}, X.size > 0 && s.set(x, []), v(w, {
|
|
25088
25092
|
type: "draft_reverted",
|
|
25089
25093
|
draftId: x,
|
|
25090
25094
|
beforeTurnId: L,
|
|
25091
25095
|
generation: R,
|
|
25092
25096
|
stepId: W,
|
|
25093
25097
|
revertedStepIds: B
|
|
25094
|
-
}),
|
|
25098
|
+
}), w.emit({ type: "draft_changed", draftId: x, generation: R });
|
|
25095
25099
|
},
|
|
25096
25100
|
async updateDraftFromLive({ conversationId: S, submissionId: x }) {
|
|
25097
|
-
const L = i.get(S),
|
|
25098
|
-
if (!L || !
|
|
25101
|
+
const L = i.get(S), w = L?.draft;
|
|
25102
|
+
if (!L || !w) throw new Error("There is no open draft to update from live.");
|
|
25099
25103
|
const P = JSON.stringify({ conversationId: S, submissionId: x }), U = o.get(x);
|
|
25100
25104
|
if (U) {
|
|
25101
25105
|
if (U.fingerprint !== P)
|
|
@@ -25103,9 +25107,9 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
25103
25107
|
return U.result;
|
|
25104
25108
|
}
|
|
25105
25109
|
const B = {
|
|
25106
|
-
...
|
|
25107
|
-
generation:
|
|
25108
|
-
artifacts:
|
|
25110
|
+
...w,
|
|
25111
|
+
generation: w.generation + 1,
|
|
25112
|
+
artifacts: w.artifacts.map((W) => ({ ...W, divergence: void 0 }))
|
|
25109
25113
|
};
|
|
25110
25114
|
L.draft = B, L.emit({
|
|
25111
25115
|
type: "draft_changed",
|
|
@@ -25120,16 +25124,16 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
25120
25124
|
return o.set(x, { fingerprint: P, result: R }), R;
|
|
25121
25125
|
},
|
|
25122
25126
|
async undoApply(S, x) {
|
|
25123
|
-
const L = i.get(S),
|
|
25127
|
+
const L = i.get(S), w = a.get(x);
|
|
25124
25128
|
if (!L)
|
|
25125
25129
|
throw new Error(`Unknown conversation: ${S}.`);
|
|
25126
|
-
if (!
|
|
25130
|
+
if (!w || w.conversationId !== S)
|
|
25127
25131
|
throw new Error(`Apply ${x} is not undoable.`);
|
|
25128
|
-
e?.onApplyUndone?.(
|
|
25132
|
+
e?.onApplyUndone?.(w.changes), $(L, w.artifacts), v(L, {
|
|
25129
25133
|
type: "apply_undone",
|
|
25130
25134
|
applyId: x,
|
|
25131
|
-
artifacts:
|
|
25132
|
-
}), L.emit({ type: "apply_undone", applyId: x, artifacts:
|
|
25135
|
+
artifacts: w.artifacts
|
|
25136
|
+
}), L.emit({ type: "apply_undone", applyId: x, artifacts: w.artifacts });
|
|
25133
25137
|
}
|
|
25134
25138
|
};
|
|
25135
25139
|
}, za = async (e, t, n, r) => {
|
|
@@ -25329,12 +25333,12 @@ I added the approval step and wired it into the process.`, Yf = {
|
|
|
25329
25333
|
throw new Error("Invalid BPMN element reference");
|
|
25330
25334
|
return t;
|
|
25331
25335
|
}, QI = () => {
|
|
25332
|
-
|
|
25336
|
+
Cn.getState().open();
|
|
25333
25337
|
}, KI = () => {
|
|
25334
|
-
|
|
25338
|
+
Cn.getState().close();
|
|
25335
25339
|
}, XI = () => {
|
|
25336
|
-
|
|
25337
|
-
}, ZI = () =>
|
|
25340
|
+
Cn.getState().toggle();
|
|
25341
|
+
}, ZI = () => Cn((e) => e.isOpen);
|
|
25338
25342
|
export {
|
|
25339
25343
|
XA as A,
|
|
25340
25344
|
fa as C,
|
|
@@ -25351,7 +25355,7 @@ export {
|
|
|
25351
25355
|
Tp as i,
|
|
25352
25356
|
ZI as j,
|
|
25353
25357
|
QI as o,
|
|
25354
|
-
|
|
25358
|
+
pw as p,
|
|
25355
25359
|
XI as t,
|
|
25356
25360
|
Ep as u
|
|
25357
25361
|
};
|