@marimo-team/islands 0.25.3-dev173 → 0.25.3-dev176
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/{ErrorBoundary-wT3f3iJ1.js → ErrorBoundary-D66f-xAE.js} +1 -1
- package/dist/{any-language-editor-B92WMzoC.js → any-language-editor-BVFHDDQ3.js} +2 -2
- package/dist/{chat-ui-CuORr6fL.js → chat-ui-X-cWrL9u.js} +1222 -1222
- package/dist/{code-visibility-ZReaeMaF.js → code-visibility-CVVeTAwi.js} +2 -2
- package/dist/{common-DCevHg1m.js → common-DNlm9Cdj.js} +1074 -1078
- package/dist/{data-grid-overlay-editor-CTC-bJus.js → data-grid-overlay-editor-BArE3_zi.js} +1 -1
- package/dist/{dist-F8Ep36rk.js → dist-B1M0bGO3.js} +1 -1
- package/dist/{dist-D6d86eNJ.js → dist-BA13RJj5.js} +1 -1
- package/dist/{dist-Bvs24R_E.js → dist-BJtmSgcE.js} +48 -48
- package/dist/{dist-CN_BeG2I.js → dist-Ba2VIn1K.js} +53 -53
- package/dist/{dist-PXYI_yuP.js → dist-Bj4bmwUm.js} +12 -12
- package/dist/{dist-DoE4XJBC.js → dist-BmS-ZGjl.js} +8626 -8626
- package/dist/{dist-BorMD-uX.js → dist-Bzogh7CW.js} +87 -87
- package/dist/{dist-CN8zI-XC.js → dist-CThPVKaP.js} +1385 -1382
- package/dist/{dist-DiDibOYr.js → dist-CTi5FTiV.js} +87 -87
- package/dist/{dist-diIx5qJW.js → dist-Ck_C32ye.js} +2 -2
- package/dist/{dist-BLfKmR-l.js → dist-D1fnFp1J.js} +1 -1
- package/dist/{dist-OR1OnN-y.js → dist-D3x9__Fu.js} +46 -46
- package/dist/{dist-BMQf5zIS.js → dist-D7mrh5sO.js} +36 -36
- package/dist/{dist-CSJ0MDRw.js → dist-D9Q3xjiP.js} +1 -1
- package/dist/{dist-BuaRHxOc.js → dist-DP60Ubh8.js} +2 -2
- package/dist/{dist-CSbh1PNP.js → dist-DTv9KkpW.js} +12 -12
- package/dist/{dist-D-wwqlzJ.js → dist-DVVwOfrD.js} +109 -109
- package/dist/{dist-C8fAKSH1.js → dist-DYXM73-k.js} +36 -36
- package/dist/{dist-DBtSl3sf.js → dist-DjeybPOb.js} +1 -1
- package/dist/{dist-CrSP_H1M.js → dist-DtGn9N4h.js} +197 -197
- package/dist/{dist-CLdpGQVr.js → dist-KN80qWCP.js} +2 -2
- package/dist/{dist-Cg7gzw-a.js → dist-O0qFpEJh.js} +56 -56
- package/dist/{dist-CkTTIdBe.js → dist-OUle2RT7.js} +207 -207
- package/dist/{dist-BK4Oj99o.js → dist-T5rh6JvL.js} +1 -1
- package/dist/{error-entries-CmWMEsY_.js → error-entries-mpoD5t79.js} +4939 -4983
- package/dist/{esm-D2gTsXEV.js → esm-Bbw_Njjx.js} +575 -575
- package/dist/{esm-AMFssoNp.js → esm-mDQNEFe_.js} +354 -354
- package/dist/{feedback-button-DwXkmewo.js → feedback-button-CyvqdxXN.js} +21 -21
- package/dist/{glide-data-editor-BlmcP-lw.js → glide-data-editor-BxvYRMC3.js} +3 -3
- package/dist/{globals-BdRitZ4p.js → globals-BJla9q8e.js} +1 -1
- package/dist/{html-to-image-bpiQh7ND.js → html-to-image-BoZthB4P.js} +454 -445
- package/dist/main.js +3587 -3587
- package/dist/{number-overlay-editor-DQG-hFHT.js → number-overlay-editor-BWg7xiRF.js} +1 -1
- package/dist/{process-output-BzloOI7F.js → process-output-DLS4Mqg_.js} +2 -2
- package/dist/{reveal-component-D3r3vSTK.js → reveal-component-feAltY24.js} +3 -3
- package/package.json +1 -1
- package/src/__mocks__/document.tsx +54 -0
- package/src/__mocks__/notebook.ts +2 -1
- package/src/__mocks__/requests.ts +0 -2
- package/src/components/chat/chat-panel.tsx +3 -3
- package/src/components/datasources/__tests__/column-preview.test.tsx +6 -8
- package/src/components/datasources/column-preview.tsx +4 -8
- package/src/components/datasources/datasources.tsx +4 -3
- package/src/components/dependency-graph/minimap-content.tsx +2 -6
- package/src/components/dependency-graph/panels.tsx +2 -1
- package/src/components/editor/__tests__/Output.test.tsx +50 -32
- package/src/components/editor/__tests__/data-attributes.test.tsx +22 -11
- package/src/components/editor/__tests__/output-persistence.test.tsx +6 -1
- package/src/components/editor/actions/__tests__/name-cell-input.test.tsx +69 -0
- package/src/components/editor/actions/name-cell-input.tsx +4 -3
- package/src/components/editor/actions/useCellActionButton.tsx +20 -26
- package/src/components/editor/actions/useNotebookActions.tsx +13 -18
- package/src/components/editor/actions/useSetCodeVisibility.ts +10 -11
- package/src/components/editor/actions/useSetOutputsExpanded.ts +13 -18
- package/src/components/editor/cell/CreateCellButton.tsx +5 -9
- package/src/components/editor/cell/__tests__/StagedAICell.test.tsx +3 -1
- package/src/components/editor/cell/code/cell-editor.tsx +13 -20
- package/src/components/editor/cell/useAddCell.ts +4 -8
- package/src/components/editor/cell/useDeleteCell.tsx +10 -36
- package/src/components/editor/cell/useRunCells.ts +2 -5
- package/src/components/editor/cell/useSplitCell.tsx +2 -1
- package/src/components/editor/chrome/panels/logs-panel.tsx +2 -1
- package/src/components/editor/chrome/panels/snippets-panel.tsx +5 -11
- package/src/components/editor/chrome/wrapper/__tests__/pending-ai-cells.test.tsx +3 -1
- package/src/components/editor/columns/sortable-column.tsx +1 -1
- package/src/components/editor/connections/components.tsx +4 -9
- package/src/components/editor/controls/Controls.tsx +1 -1
- package/src/components/editor/controls/__tests__/notebook-menu-dropdown.test.tsx +9 -3
- package/src/components/editor/documentation.css +34 -11
- package/src/components/editor/errors/auto-fix.tsx +4 -8
- package/src/components/editor/file-tree/file-explorer.tsx +3 -7
- package/src/components/editor/links/__tests__/cell-link.test.tsx +3 -1
- package/src/components/editor/links/cell-link.tsx +2 -1
- package/src/components/editor/navigation/__tests__/clipboard.test.ts +60 -38
- package/src/components/editor/navigation/__tests__/navigation.test.ts +73 -64
- package/src/components/editor/navigation/clipboard.ts +12 -11
- package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +11 -20
- package/src/components/editor/navigation/navigation.ts +20 -28
- package/src/components/editor/notebook-cell.tsx +7 -10
- package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +125 -69
- package/src/components/editor/renderers/cell-array.tsx +10 -17
- package/src/components/markdown/markdown-renderer.tsx +4 -8
- package/src/components/pages/edit-page.tsx +32 -17
- package/src/components/scratchpad/scratchpad.test.tsx +3 -1
- package/src/components/scratchpad/scratchpad.tsx +4 -7
- package/src/components/slides/__tests__/minimap-actions.test.tsx +9 -25
- package/src/components/slides/minimap.tsx +7 -3
- package/src/components/slides/slide-cell-view.tsx +3 -3
- package/src/components/sort/SortableCellsProvider.tsx +2 -1
- package/src/core/ai/__tests__/staged-cells.test.ts +18 -20
- package/src/core/ai/staged-cells.ts +8 -16
- package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +2 -2
- package/src/core/ai/tools/__tests__/run-cells-tool.test.ts +2 -2
- package/src/core/ai/tools/base.ts +2 -2
- package/src/core/ai/tools/edit-notebook-tool.ts +13 -21
- package/src/core/cells/__tests__/actions.test.ts +474 -34
- package/src/core/cells/__tests__/add-missing-import.test.ts +7 -8
- package/src/core/cells/__tests__/cells.test.ts +171 -813
- package/src/core/cells/__tests__/document.test.ts +5 -35
- package/src/core/cells/__tests__/notebook-outline.test.ts +7 -1
- package/src/core/cells/__tests__/outputs.test.tsx +71 -53
- package/src/core/cells/actions.ts +391 -3
- package/src/core/cells/add-missing-import.ts +46 -42
- package/src/core/cells/cells.ts +38 -413
- package/src/core/cells/document.ts +7 -4
- package/src/core/cells/outputs.ts +12 -28
- package/src/core/codemirror/cells/extensions.ts +6 -6
- package/src/core/codemirror/cells/state.ts +1 -1
- package/src/core/codemirror/keymaps/vim.ts +2 -2
- package/src/core/edit-app.tsx +19 -27
- package/src/core/islands/bridge.ts +0 -2
- package/src/core/kernel/handlers.ts +3 -3
- package/src/core/network/__tests__/requests-lazy.test.ts +1 -3
- package/src/core/network/requests-lazy.ts +0 -2
- package/src/core/network/requests-network.ts +0 -16
- package/src/core/network/requests-static.ts +0 -2
- package/src/core/network/requests-toasting.tsx +0 -2
- package/src/core/network/types.ts +0 -7
- package/src/core/notebook/document/__tests__/codemirror.test.ts +5 -0
- package/src/core/notebook/document/__tests__/draft.test.ts +41 -0
- package/src/core/notebook/document/__tests__/state.test.ts +21 -0
- package/src/core/notebook/document/draft.ts +35 -5
- package/src/core/notebook/document/index.ts +1 -0
- package/src/core/notebook/document/state.ts +6 -2
- package/src/core/session/useNotebookSession.tsx +6 -2
- package/src/core/wasm/bridge.ts +0 -16
- package/src/css/globals.css +56 -22
- package/src/stories/runtime-story.tsx +22 -15
|
@@ -5,17 +5,17 @@ import { t as l } from "./compiler-runtime-CldRdSsv.js";
|
|
|
5
5
|
import { n as u, t as d } from "./copy-icon-De584pZ4.js";
|
|
6
6
|
import { a as f, c as p, l as m, s as h, t as g } from "./chunk-YOKDWASO-DKplTrBY.js";
|
|
7
7
|
import { c as _, l as v, m as y, s as b, t as x, u as ee } from "./tooltip-s4zZxwKe.js";
|
|
8
|
-
import {
|
|
9
|
-
import { D as
|
|
10
|
-
import { J as
|
|
11
|
-
import { m as
|
|
12
|
-
import { t as
|
|
13
|
-
import { $ as
|
|
14
|
-
import { A as
|
|
15
|
-
import {
|
|
16
|
-
import { t as
|
|
8
|
+
import { A as te, Ct as ne, Dt as re, F as ie, It as ae, O as oe, St as se, Tt as ce, U as le, W as ue, Z as de, a as fe, d as pe, en as me, ht as he, j as ge, ot as _e, rn as ve, rt as ye, wt as be, xt as xe } from "./error-entries-mpoD5t79.js";
|
|
9
|
+
import { D as Se, M as Ce, k as we } from "./select-2KOiReNY.js";
|
|
10
|
+
import { J as Te, pt as Ee } from "./dropdown-menu-DCMbbQ35.js";
|
|
11
|
+
import { m as De, y as Oe } from "./toDate-CDzoofJo.js";
|
|
12
|
+
import { t as ke } from "./jsx-runtime-3BD1kT0s.js";
|
|
13
|
+
import { $ as Ae, Ct as S, Dt as je, Et as C, Ot as Me, Q as Ne, Tt as w, Y as Pe, _t as Fe, bt as Ie, dt as Le, ft as Re, gt as ze, ht as Be, kt as T, mt as Ve, tt as He, vt as Ue, wt as E, yt as We } from "./use-restore-focus-BgDTd2tc.js";
|
|
14
|
+
import { A as Ge, D as Ke, T as qe, _ as Je, b as Ye, c as Xe, n as Ze, w as D } from "./useTheme-DMfQYmlG.js";
|
|
15
|
+
import { G as Qe } from "./dist-BmS-ZGjl.js";
|
|
16
|
+
import { t as $e } from "./useAsyncData-Bn8SxUqM.js";
|
|
17
17
|
//#region ../node_modules/.pnpm/domelementtype@2.3.0/node_modules/domelementtype/lib/index.js
|
|
18
|
-
var
|
|
18
|
+
var et = /* @__PURE__ */ t(((e) => {
|
|
19
19
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.Doctype = e.CDATA = e.Tag = e.Style = e.Script = e.Comment = e.Directive = e.Text = e.Root = e.isTag = e.ElementType = void 0;
|
|
20
20
|
var t;
|
|
21
21
|
(function(e) {
|
|
@@ -25,7 +25,7 @@ var $e = /* @__PURE__ */ t(((e) => {
|
|
|
25
25
|
return e.type === t.Tag || e.type === t.Script || e.type === t.Style;
|
|
26
26
|
}
|
|
27
27
|
e.isTag = n, e.Root = t.Root, e.Text = t.Text, e.Directive = t.Directive, e.Comment = t.Comment, e.Script = t.Script, e.Style = t.Style, e.Tag = t.Tag, e.CDATA = t.CDATA, e.Doctype = t.Doctype;
|
|
28
|
-
})),
|
|
28
|
+
})), tt = /* @__PURE__ */ t(((e) => {
|
|
29
29
|
var t = e && e.__extends || (function() {
|
|
30
30
|
var e = function(t, n) {
|
|
31
31
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
@@ -49,7 +49,7 @@ var $e = /* @__PURE__ */ t(((e) => {
|
|
|
49
49
|
}, n.apply(this, arguments);
|
|
50
50
|
};
|
|
51
51
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.cloneNode = e.hasChildren = e.isDocument = e.isDirective = e.isComment = e.isText = e.isCDATA = e.isTag = e.Element = e.Document = e.CDATA = e.NodeWithChildren = e.ProcessingInstruction = e.Comment = e.Text = e.DataNode = e.Node = void 0;
|
|
52
|
-
var r =
|
|
52
|
+
var r = et(), i = function() {
|
|
53
53
|
function e() {
|
|
54
54
|
this.parent = null, this.prev = null, this.next = null, this.startIndex = null, this.endIndex = null;
|
|
55
55
|
}
|
|
@@ -308,7 +308,7 @@ var $e = /* @__PURE__ */ t(((e) => {
|
|
|
308
308
|
}), n = 1; n < t.length; n++) t[n].prev = t[n - 1], t[n - 1].next = t[n];
|
|
309
309
|
return t;
|
|
310
310
|
}
|
|
311
|
-
})),
|
|
311
|
+
})), nt = /* @__PURE__ */ t(((e) => {
|
|
312
312
|
var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
|
|
313
313
|
r === void 0 && (r = n);
|
|
314
314
|
var i = Object.getOwnPropertyDescriptor(t, n);
|
|
@@ -324,8 +324,8 @@ var $e = /* @__PURE__ */ t(((e) => {
|
|
|
324
324
|
for (var r in e) r !== "default" && !Object.prototype.hasOwnProperty.call(n, r) && t(n, e, r);
|
|
325
325
|
};
|
|
326
326
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.DomHandler = void 0;
|
|
327
|
-
var r =
|
|
328
|
-
n(
|
|
327
|
+
var r = et(), i = tt();
|
|
328
|
+
n(tt(), e);
|
|
329
329
|
var a = {
|
|
330
330
|
withStartIndices: !1,
|
|
331
331
|
withEndIndices: !1,
|
|
@@ -382,13 +382,13 @@ var $e = /* @__PURE__ */ t(((e) => {
|
|
|
382
382
|
}, e;
|
|
383
383
|
}();
|
|
384
384
|
e.DomHandler = o, e.default = o;
|
|
385
|
-
})),
|
|
385
|
+
})), rt = /* @__PURE__ */ t(((e) => {
|
|
386
386
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.CARRIAGE_RETURN_PLACEHOLDER_REGEX = e.CARRIAGE_RETURN_PLACEHOLDER = e.CARRIAGE_RETURN_REGEX = e.CARRIAGE_RETURN = e.CASE_SENSITIVE_TAG_NAMES_MAP = e.CASE_SENSITIVE_TAG_NAMES = void 0, e.CASE_SENSITIVE_TAG_NAMES = /* @__PURE__ */ "animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.linearGradient.radialGradient.textPath".split("."), e.CASE_SENSITIVE_TAG_NAMES_MAP = e.CASE_SENSITIVE_TAG_NAMES.reduce(function(e, t) {
|
|
387
387
|
return e[t.toLowerCase()] = t, e;
|
|
388
388
|
}, {}), e.CARRIAGE_RETURN = "\r", e.CARRIAGE_RETURN_REGEX = new RegExp(e.CARRIAGE_RETURN, "g"), e.CARRIAGE_RETURN_PLACEHOLDER = `__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_${Date.now().toString()}__`, e.CARRIAGE_RETURN_PLACEHOLDER_REGEX = new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER, "g");
|
|
389
|
-
})),
|
|
389
|
+
})), it = /* @__PURE__ */ t(((e) => {
|
|
390
390
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.formatAttributes = i, e.hasOpenTag = o, e.escapeSpecialCharacters = s, e.revertEscapedCharacters = c, e.formatDOM = l;
|
|
391
|
-
var t =
|
|
391
|
+
var t = nt(), n = rt();
|
|
392
392
|
function r(e) {
|
|
393
393
|
return n.CASE_SENSITIVE_TAG_NAMES_MAP[e];
|
|
394
394
|
}
|
|
@@ -436,9 +436,9 @@ var $e = /* @__PURE__ */ t(((e) => {
|
|
|
436
436
|
}
|
|
437
437
|
return r && (s = new t.ProcessingInstruction(r.substring(0, r.indexOf(" ")).toLowerCase(), r), s.next = o[0] ?? null, s.parent = n, o.unshift(s), o[1] && (o[1].prev = o[0])), o;
|
|
438
438
|
}
|
|
439
|
-
})),
|
|
439
|
+
})), at = /* @__PURE__ */ t(((e) => {
|
|
440
440
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = h;
|
|
441
|
-
var t =
|
|
441
|
+
var t = it(), n = "html", r = "head", i = "body", a = /<([a-zA-Z]+[0-9]?)/, o = function(e, t) {
|
|
442
442
|
throw Error("This browser does not support `document.implementation.createHTMLDocument`");
|
|
443
443
|
}, s = function(e, t) {
|
|
444
444
|
throw Error("This browser does not support `DOMParser.prototype.parseFromString`");
|
|
@@ -497,19 +497,19 @@ var $e = /* @__PURE__ */ t(((e) => {
|
|
|
497
497
|
return f?.childNodes ?? m();
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
|
-
})),
|
|
500
|
+
})), ot = /* @__PURE__ */ t(((e) => {
|
|
501
501
|
var t = e && e.__importDefault || function(e) {
|
|
502
502
|
return e && e.__esModule ? e : { default: e };
|
|
503
503
|
};
|
|
504
504
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
505
|
-
var n = t(
|
|
505
|
+
var n = t(at()), r = it(), i = /<(![a-zA-Z\s]+)>/;
|
|
506
506
|
function a(e) {
|
|
507
507
|
if (typeof e != "string") throw TypeError("First argument must be a string");
|
|
508
508
|
if (!e) return [];
|
|
509
509
|
var t = i.exec(e), a = t ? t[1] : void 0;
|
|
510
510
|
return (0, r.formatDOM)((0, n.default)(e), null, a);
|
|
511
511
|
}
|
|
512
|
-
})),
|
|
512
|
+
})), st = /* @__PURE__ */ t(((e) => {
|
|
513
513
|
e.SAME = 0, e.CAMELCASE = 1, e.possibleStandardNames = {
|
|
514
514
|
accept: 0,
|
|
515
515
|
acceptCharset: 1,
|
|
@@ -995,7 +995,7 @@ var $e = /* @__PURE__ */ t(((e) => {
|
|
|
995
995
|
z: 0,
|
|
996
996
|
zoomAndPan: 1
|
|
997
997
|
};
|
|
998
|
-
})),
|
|
998
|
+
})), ct = /* @__PURE__ */ t(((e) => {
|
|
999
999
|
var t = 0, n = 1, r = 2, i = 3, a = 4, o = 5, s = 6;
|
|
1000
1000
|
function c(e) {
|
|
1001
1001
|
return u.hasOwnProperty(e) ? u[e] : null;
|
|
@@ -1114,12 +1114,12 @@ var $e = /* @__PURE__ */ t(((e) => {
|
|
|
1114
1114
|
].forEach((e) => {
|
|
1115
1115
|
u[e] = new l(e, n, !1, e.toLowerCase(), null, !0, !0);
|
|
1116
1116
|
});
|
|
1117
|
-
var { CAMELCASE: m, SAME: h, possibleStandardNames: g } =
|
|
1117
|
+
var { CAMELCASE: m, SAME: h, possibleStandardNames: g } = st(), _ = RegExp.prototype.test.bind(/* @__PURE__ */ RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")), v = Object.keys(g).reduce((e, t) => {
|
|
1118
1118
|
let n = g[t];
|
|
1119
1119
|
return n === h ? e[t] = t : n === m ? e[t.toLowerCase()] = t : e[t] = n, e;
|
|
1120
1120
|
}, {});
|
|
1121
1121
|
e.BOOLEAN = i, e.BOOLEANISH_STRING = r, e.NUMERIC = o, e.OVERLOADED_BOOLEAN = a, e.POSITIVE_NUMERIC = s, e.RESERVED = t, e.STRING = n, e.getPropertyInfo = c, e.isCustomAttribute = _, e.possibleStandardNames = v;
|
|
1122
|
-
})),
|
|
1122
|
+
})), lt = /* @__PURE__ */ t(((e) => {
|
|
1123
1123
|
var t = e && e.__importDefault || function(e) {
|
|
1124
1124
|
return e && e.__esModule ? e : { default: e };
|
|
1125
1125
|
};
|
|
@@ -1166,9 +1166,9 @@ var $e = /* @__PURE__ */ t(((e) => {
|
|
|
1166
1166
|
}, e.returnFirstArg = function(e) {
|
|
1167
1167
|
return e;
|
|
1168
1168
|
};
|
|
1169
|
-
})),
|
|
1169
|
+
})), ut = /* @__PURE__ */ t(((e) => {
|
|
1170
1170
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
1171
|
-
var t =
|
|
1171
|
+
var t = ct(), n = lt(), r = ["checked", "value"], i = [
|
|
1172
1172
|
"input",
|
|
1173
1173
|
"select",
|
|
1174
1174
|
"textarea"
|
|
@@ -1203,12 +1203,12 @@ var $e = /* @__PURE__ */ t(((e) => {
|
|
|
1203
1203
|
function s(e) {
|
|
1204
1204
|
return t.possibleStandardNames[e];
|
|
1205
1205
|
}
|
|
1206
|
-
})),
|
|
1206
|
+
})), dt = /* @__PURE__ */ t(((e) => {
|
|
1207
1207
|
var t = e && e.__importDefault || function(e) {
|
|
1208
1208
|
return e && e.__esModule ? e : { default: e };
|
|
1209
1209
|
};
|
|
1210
1210
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
1211
|
-
var n = c(), r = t(
|
|
1211
|
+
var n = c(), r = t(ut()), i = lt(), a = {
|
|
1212
1212
|
cloneElement: n.cloneElement,
|
|
1213
1213
|
createElement: n.createElement,
|
|
1214
1214
|
isValidElement: n.isValidElement
|
|
@@ -1250,16 +1250,16 @@ var $e = /* @__PURE__ */ t(((e) => {
|
|
|
1250
1250
|
function s(e) {
|
|
1251
1251
|
return i.PRESERVE_CUSTOM_ATTRIBUTES && e.type === "tag" && (0, i.isCustomComponent)(e.name, e.attribs);
|
|
1252
1252
|
}
|
|
1253
|
-
})),
|
|
1253
|
+
})), ft = /* @__PURE__ */ t(((e) => {
|
|
1254
1254
|
var t = e && e.__importDefault || function(e) {
|
|
1255
1255
|
return e && e.__esModule ? e : { default: e };
|
|
1256
1256
|
};
|
|
1257
1257
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.htmlToDOM = e.domToReact = e.attributesToProps = e.Text = e.ProcessingInstruction = e.Element = e.Comment = void 0, e.default = o;
|
|
1258
|
-
var n = t(
|
|
1259
|
-
e.htmlToDOM = n.default, e.attributesToProps = t(
|
|
1260
|
-
var r = t(
|
|
1258
|
+
var n = t(ot());
|
|
1259
|
+
e.htmlToDOM = n.default, e.attributesToProps = t(ut()).default;
|
|
1260
|
+
var r = t(dt());
|
|
1261
1261
|
e.domToReact = r.default;
|
|
1262
|
-
var i =
|
|
1262
|
+
var i = nt();
|
|
1263
1263
|
Object.defineProperty(e, "Comment", {
|
|
1264
1264
|
enumerable: !0,
|
|
1265
1265
|
get: function() {
|
|
@@ -1286,7 +1286,7 @@ var $e = /* @__PURE__ */ t(((e) => {
|
|
|
1286
1286
|
if (typeof e != "string") throw TypeError("First argument must be a string");
|
|
1287
1287
|
return e ? (0, r.default)((0, n.default)(e, t?.htmlparser2 ?? a), t) : [];
|
|
1288
1288
|
}
|
|
1289
|
-
})), O = /* @__PURE__ */ e(c(), 1), k = l(), A = /* @__PURE__ */ e(
|
|
1289
|
+
})), O = /* @__PURE__ */ e(c(), 1), k = l(), A = /* @__PURE__ */ e(ft(), 1), pt = A.default.default || A.default, mt = y("between-horizontal-start", [
|
|
1290
1290
|
["rect", {
|
|
1291
1291
|
width: "13",
|
|
1292
1292
|
height: "7",
|
|
@@ -1307,10 +1307,10 @@ var $e = /* @__PURE__ */ t(((e) => {
|
|
|
1307
1307
|
rx: "1",
|
|
1308
1308
|
key: "1q5fc1"
|
|
1309
1309
|
}]
|
|
1310
|
-
]),
|
|
1310
|
+
]), ht = y("loader-circle", [["path", {
|
|
1311
1311
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
1312
1312
|
key: "13zald"
|
|
1313
|
-
}]]),
|
|
1313
|
+
}]]), gt = y("trash-2", [
|
|
1314
1314
|
["path", {
|
|
1315
1315
|
d: "M10 11v6",
|
|
1316
1316
|
key: "nco0om"
|
|
@@ -1331,20 +1331,20 @@ var $e = /* @__PURE__ */ t(((e) => {
|
|
|
1331
1331
|
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
1332
1332
|
key: "e791ji"
|
|
1333
1333
|
}]
|
|
1334
|
-
]),
|
|
1334
|
+
]), _t = y("wrench", [["path", {
|
|
1335
1335
|
d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",
|
|
1336
1336
|
key: "1ngwbx"
|
|
1337
|
-
}]]), j =
|
|
1337
|
+
}]]), j = ke(), vt = Object.defineProperty, M = (e, t) => vt(e, "name", {
|
|
1338
1338
|
value: t,
|
|
1339
1339
|
configurable: !0
|
|
1340
|
-
}),
|
|
1340
|
+
}), yt = "Collapsible", [bt, xt] = Me(yt), [St, Ct] = bt(yt), wt = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ M(function(e, t) {
|
|
1341
1341
|
let { __scopeCollapsible: n, open: r, defaultOpen: i, disabled: a, onOpenChange: o, ...s } = e, [c, l] = w({
|
|
1342
1342
|
prop: r,
|
|
1343
1343
|
defaultProp: i ?? !1,
|
|
1344
1344
|
onChange: o,
|
|
1345
|
-
caller:
|
|
1345
|
+
caller: yt
|
|
1346
1346
|
});
|
|
1347
|
-
return /* @__PURE__ */ (0, j.jsx)(
|
|
1347
|
+
return /* @__PURE__ */ (0, j.jsx)(St, {
|
|
1348
1348
|
scope: n,
|
|
1349
1349
|
disabled: a,
|
|
1350
1350
|
contentId: S(),
|
|
@@ -1357,8 +1357,8 @@ var $e = /* @__PURE__ */ t(((e) => {
|
|
|
1357
1357
|
ref: t
|
|
1358
1358
|
})
|
|
1359
1359
|
});
|
|
1360
|
-
}, "Collapsible")),
|
|
1361
|
-
let { __scopeCollapsible: n, ...r } = e, i =
|
|
1360
|
+
}, "Collapsible")), Tt = "CollapsibleTrigger", Et = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ M(function(e, t) {
|
|
1361
|
+
let { __scopeCollapsible: n, ...r } = e, i = Ct(Tt, n);
|
|
1362
1362
|
return /* @__PURE__ */ (0, j.jsx)(T.button, {
|
|
1363
1363
|
type: "button",
|
|
1364
1364
|
"aria-controls": i.open ? i.contentId : void 0,
|
|
@@ -1370,22 +1370,22 @@ var $e = /* @__PURE__ */ t(((e) => {
|
|
|
1370
1370
|
ref: t,
|
|
1371
1371
|
onClick: C(e.onClick, i.onOpenToggle)
|
|
1372
1372
|
});
|
|
1373
|
-
}, "CollapsibleTrigger")),
|
|
1374
|
-
let { forceMount: n, ...r } = e, i =
|
|
1373
|
+
}, "CollapsibleTrigger")), Dt = "CollapsibleContent", Ot = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ M(function(e, t) {
|
|
1374
|
+
let { forceMount: n, ...r } = e, i = Ct(Dt, e.__scopeCollapsible);
|
|
1375
1375
|
return /* @__PURE__ */ (0, j.jsx)(E, {
|
|
1376
1376
|
present: n || i.open,
|
|
1377
|
-
children: ({ present: e }) => /* @__PURE__ */ (0, j.jsx)(
|
|
1377
|
+
children: ({ present: e }) => /* @__PURE__ */ (0, j.jsx)(kt, {
|
|
1378
1378
|
...r,
|
|
1379
1379
|
ref: t,
|
|
1380
1380
|
present: e
|
|
1381
1381
|
})
|
|
1382
1382
|
});
|
|
1383
|
-
}, "CollapsibleContent")),
|
|
1384
|
-
let { __scopeCollapsible: n, present: r, children: a, ...o } = e, s =
|
|
1383
|
+
}, "CollapsibleContent")), kt = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ M(function(e, t) {
|
|
1384
|
+
let { __scopeCollapsible: n, present: r, children: a, ...o } = e, s = Ct(Dt, n), [c, l] = O.useState(r), u = O.useRef(null), d = i(t, u), f = O.useRef(0), p = f.current, m = O.useRef(0), h = m.current, g = s.open || c, _ = O.useRef(g), v = O.useRef(void 0);
|
|
1385
1385
|
return O.useEffect(() => {
|
|
1386
1386
|
let e = requestAnimationFrame(() => _.current = !1);
|
|
1387
1387
|
return () => cancelAnimationFrame(e);
|
|
1388
|
-
}, []),
|
|
1388
|
+
}, []), je(() => {
|
|
1389
1389
|
let e = u.current;
|
|
1390
1390
|
if (e) {
|
|
1391
1391
|
v.current = v.current || {
|
|
@@ -1416,82 +1416,82 @@ function N(e) {
|
|
|
1416
1416
|
M(N, "getState");
|
|
1417
1417
|
//#endregion
|
|
1418
1418
|
//#region ../node_modules/.pnpm/@radix-ui+react-accordion@1.3.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+rea_abc4d855e45dd0aac37149041714f617/node_modules/@radix-ui/react-accordion/dist/index.mjs
|
|
1419
|
-
var
|
|
1419
|
+
var At = Object.defineProperty, P = (e, t) => At(e, "name", {
|
|
1420
1420
|
value: t,
|
|
1421
1421
|
configurable: !0
|
|
1422
|
-
}),
|
|
1422
|
+
}), jt = {
|
|
1423
1423
|
Single: "single",
|
|
1424
1424
|
Multiple: "multiple"
|
|
1425
1425
|
}, F = {
|
|
1426
1426
|
Vertical: "vertical",
|
|
1427
1427
|
Horizontal: "horizontal"
|
|
1428
|
-
},
|
|
1428
|
+
}, Mt = {
|
|
1429
1429
|
LTR: "ltr",
|
|
1430
1430
|
RTL: "rtl"
|
|
1431
|
-
}, I = "Accordion",
|
|
1431
|
+
}, I = "Accordion", Nt = [
|
|
1432
1432
|
"Home",
|
|
1433
1433
|
"End",
|
|
1434
1434
|
"ArrowDown",
|
|
1435
1435
|
"ArrowUp",
|
|
1436
1436
|
"ArrowLeft",
|
|
1437
1437
|
"ArrowRight"
|
|
1438
|
-
], [
|
|
1438
|
+
], [Pt, { useGetCollection: Ft, createCollectionScope: It }] = we(I), [L, Lt] = Me(I, [It, xt]), Rt = xt(), zt = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
1439
1439
|
let { type: n, ...r } = e, i = r, a = r;
|
|
1440
|
-
return /* @__PURE__ */ (0, j.jsx)(
|
|
1440
|
+
return /* @__PURE__ */ (0, j.jsx)(Pt.Provider, {
|
|
1441
1441
|
scope: e.__scopeAccordion,
|
|
1442
|
-
children: n ===
|
|
1442
|
+
children: n === jt.Multiple ? /* @__PURE__ */ (0, j.jsx)(Gt, {
|
|
1443
1443
|
...a,
|
|
1444
1444
|
ref: t
|
|
1445
|
-
}) : /* @__PURE__ */ (0, j.jsx)(
|
|
1445
|
+
}) : /* @__PURE__ */ (0, j.jsx)(Wt, {
|
|
1446
1446
|
...i,
|
|
1447
1447
|
ref: t
|
|
1448
1448
|
})
|
|
1449
1449
|
});
|
|
1450
|
-
}, "Accordion")), [
|
|
1450
|
+
}, "Accordion")), [Bt, Vt] = L(I), [Ht, Ut] = L(I, { collapsible: !1 }), Wt = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
1451
1451
|
let { value: n, defaultValue: r, onValueChange: i = /* @__PURE__ */ P(() => {}, "onValueChange"), collapsible: a = !1, ...o } = e, [s, c] = w({
|
|
1452
1452
|
prop: n,
|
|
1453
1453
|
defaultProp: r ?? "",
|
|
1454
1454
|
onChange: i,
|
|
1455
1455
|
caller: I
|
|
1456
1456
|
});
|
|
1457
|
-
return /* @__PURE__ */ (0, j.jsx)(
|
|
1457
|
+
return /* @__PURE__ */ (0, j.jsx)(Bt, {
|
|
1458
1458
|
scope: e.__scopeAccordion,
|
|
1459
1459
|
value: O.useMemo(() => s ? [s] : [], [s]),
|
|
1460
1460
|
onItemOpen: c,
|
|
1461
1461
|
onItemClose: O.useCallback(() => a && c(""), [a, c]),
|
|
1462
|
-
children: /* @__PURE__ */ (0, j.jsx)(
|
|
1462
|
+
children: /* @__PURE__ */ (0, j.jsx)(Ht, {
|
|
1463
1463
|
scope: e.__scopeAccordion,
|
|
1464
1464
|
collapsible: a,
|
|
1465
|
-
children: /* @__PURE__ */ (0, j.jsx)(
|
|
1465
|
+
children: /* @__PURE__ */ (0, j.jsx)(qt, {
|
|
1466
1466
|
...o,
|
|
1467
1467
|
ref: t
|
|
1468
1468
|
})
|
|
1469
1469
|
})
|
|
1470
1470
|
});
|
|
1471
|
-
}, "AccordionImplSingle")),
|
|
1471
|
+
}, "AccordionImplSingle")), Gt = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
1472
1472
|
let { value: n, defaultValue: r, onValueChange: i = /* @__PURE__ */ P(() => {}, "onValueChange"), ...a } = e, [o, s] = w({
|
|
1473
1473
|
prop: n,
|
|
1474
1474
|
defaultProp: r ?? [],
|
|
1475
1475
|
onChange: i,
|
|
1476
1476
|
caller: I
|
|
1477
1477
|
}), c = O.useCallback((e) => s((t = []) => [...t, e]), [s]), l = O.useCallback((e) => s((t = []) => t.filter((t) => t !== e)), [s]);
|
|
1478
|
-
return /* @__PURE__ */ (0, j.jsx)(
|
|
1478
|
+
return /* @__PURE__ */ (0, j.jsx)(Bt, {
|
|
1479
1479
|
scope: e.__scopeAccordion,
|
|
1480
1480
|
value: o,
|
|
1481
1481
|
onItemOpen: c,
|
|
1482
1482
|
onItemClose: l,
|
|
1483
|
-
children: /* @__PURE__ */ (0, j.jsx)(
|
|
1483
|
+
children: /* @__PURE__ */ (0, j.jsx)(Ht, {
|
|
1484
1484
|
scope: e.__scopeAccordion,
|
|
1485
1485
|
collapsible: !0,
|
|
1486
|
-
children: /* @__PURE__ */ (0, j.jsx)(
|
|
1486
|
+
children: /* @__PURE__ */ (0, j.jsx)(qt, {
|
|
1487
1487
|
...a,
|
|
1488
1488
|
ref: t
|
|
1489
1489
|
})
|
|
1490
1490
|
})
|
|
1491
1491
|
});
|
|
1492
|
-
}, "AccordionImplMultiple")), [
|
|
1493
|
-
let { __scopeAccordion: n, disabled: r, dir: a, orientation: o = F.Vertical, ...s } = e, c = O.useRef(null), l = i(c, t), u =
|
|
1494
|
-
if (!
|
|
1492
|
+
}, "AccordionImplMultiple")), [Kt, R] = L(I), qt = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
1493
|
+
let { __scopeAccordion: n, disabled: r, dir: a, orientation: o = F.Vertical, ...s } = e, c = O.useRef(null), l = i(c, t), u = Ft(n), d = Se(a) === Mt.LTR, f = C(e.onKeyDown, (e) => {
|
|
1494
|
+
if (!Nt.includes(e.key)) return;
|
|
1495
1495
|
let t = u(), n = e.target, r = t.filter(([, e]) => !e.element.disabled), i = r.findIndex(([, e]) => e.element === n), a = r.size;
|
|
1496
1496
|
if (i === -1) return;
|
|
1497
1497
|
e.preventDefault();
|
|
@@ -1521,12 +1521,12 @@ var kt = Object.defineProperty, P = (e, t) => kt(e, "name", {
|
|
|
1521
1521
|
let p = s % a;
|
|
1522
1522
|
r.at(p)?.element.focus();
|
|
1523
1523
|
});
|
|
1524
|
-
return /* @__PURE__ */ (0, j.jsx)(
|
|
1524
|
+
return /* @__PURE__ */ (0, j.jsx)(Kt, {
|
|
1525
1525
|
scope: n,
|
|
1526
1526
|
disabled: r,
|
|
1527
1527
|
direction: a,
|
|
1528
1528
|
orientation: o,
|
|
1529
|
-
children: /* @__PURE__ */ (0, j.jsx)(
|
|
1529
|
+
children: /* @__PURE__ */ (0, j.jsx)(Pt.Slot, {
|
|
1530
1530
|
scope: n,
|
|
1531
1531
|
children: /* @__PURE__ */ (0, j.jsx)(T.div, {
|
|
1532
1532
|
...s,
|
|
@@ -1536,16 +1536,16 @@ var kt = Object.defineProperty, P = (e, t) => kt(e, "name", {
|
|
|
1536
1536
|
})
|
|
1537
1537
|
})
|
|
1538
1538
|
});
|
|
1539
|
-
}, "AccordionImpl")),
|
|
1540
|
-
let { __scopeAccordion: n, value: r, ...i } = e, a =
|
|
1541
|
-
return /* @__PURE__ */ (0, j.jsx)(
|
|
1539
|
+
}, "AccordionImpl")), Jt = "AccordionItem", [Yt, Xt] = L(Jt), Zt = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
1540
|
+
let { __scopeAccordion: n, value: r, ...i } = e, a = R(Jt, n), o = Vt(Jt, n), s = Rt(n), c = S(), l = r && o.value.includes(r) || !1, u = a.disabled || e.disabled;
|
|
1541
|
+
return /* @__PURE__ */ (0, j.jsx)(Yt, {
|
|
1542
1542
|
scope: n,
|
|
1543
1543
|
open: l,
|
|
1544
1544
|
disabled: u,
|
|
1545
1545
|
triggerId: c,
|
|
1546
|
-
children: /* @__PURE__ */ (0, j.jsx)(
|
|
1546
|
+
children: /* @__PURE__ */ (0, j.jsx)(wt, {
|
|
1547
1547
|
"data-orientation": a.orientation,
|
|
1548
|
-
"data-state":
|
|
1548
|
+
"data-state": rn(l),
|
|
1549
1549
|
...s,
|
|
1550
1550
|
...i,
|
|
1551
1551
|
ref: t,
|
|
@@ -1556,20 +1556,20 @@ var kt = Object.defineProperty, P = (e, t) => kt(e, "name", {
|
|
|
1556
1556
|
}
|
|
1557
1557
|
})
|
|
1558
1558
|
});
|
|
1559
|
-
}, "AccordionItem")),
|
|
1560
|
-
let { __scopeAccordion: n, ...r } = e, i =
|
|
1559
|
+
}, "AccordionItem")), Qt = "AccordionHeader", $t = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
1560
|
+
let { __scopeAccordion: n, ...r } = e, i = R(I, n), a = Xt(Qt, n);
|
|
1561
1561
|
return /* @__PURE__ */ (0, j.jsx)(T.h3, {
|
|
1562
1562
|
"data-orientation": i.orientation,
|
|
1563
|
-
"data-state":
|
|
1563
|
+
"data-state": rn(a.open),
|
|
1564
1564
|
"data-disabled": a.disabled ? "" : void 0,
|
|
1565
1565
|
...r,
|
|
1566
1566
|
ref: t
|
|
1567
1567
|
});
|
|
1568
|
-
}, "AccordionHeader")),
|
|
1569
|
-
let { __scopeAccordion: n, ...r } = e, i =
|
|
1570
|
-
return /* @__PURE__ */ (0, j.jsx)(
|
|
1568
|
+
}, "AccordionHeader")), en = "AccordionTrigger", z = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
1569
|
+
let { __scopeAccordion: n, ...r } = e, i = R(I, n), a = Xt(en, n), o = Ut(en, n), s = Rt(n);
|
|
1570
|
+
return /* @__PURE__ */ (0, j.jsx)(Pt.ItemSlot, {
|
|
1571
1571
|
scope: n,
|
|
1572
|
-
children: /* @__PURE__ */ (0, j.jsx)(
|
|
1572
|
+
children: /* @__PURE__ */ (0, j.jsx)(Et, {
|
|
1573
1573
|
"aria-disabled": a.open && !o.collapsible || void 0,
|
|
1574
1574
|
"data-orientation": i.orientation,
|
|
1575
1575
|
id: a.triggerId,
|
|
@@ -1578,9 +1578,9 @@ var kt = Object.defineProperty, P = (e, t) => kt(e, "name", {
|
|
|
1578
1578
|
ref: t
|
|
1579
1579
|
})
|
|
1580
1580
|
});
|
|
1581
|
-
}, "AccordionTrigger")),
|
|
1582
|
-
let { __scopeAccordion: n, ...r } = e, i =
|
|
1583
|
-
return /* @__PURE__ */ (0, j.jsx)(
|
|
1581
|
+
}, "AccordionTrigger")), tn = "AccordionContent", nn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
1582
|
+
let { __scopeAccordion: n, ...r } = e, i = R(I, n), a = Xt(tn, n), o = Rt(n);
|
|
1583
|
+
return /* @__PURE__ */ (0, j.jsx)(Ot, {
|
|
1584
1584
|
role: "region",
|
|
1585
1585
|
"aria-labelledby": a.triggerId,
|
|
1586
1586
|
"data-orientation": i.orientation,
|
|
@@ -1594,25 +1594,25 @@ var kt = Object.defineProperty, P = (e, t) => kt(e, "name", {
|
|
|
1594
1594
|
}
|
|
1595
1595
|
});
|
|
1596
1596
|
}, "AccordionContent"));
|
|
1597
|
-
function
|
|
1597
|
+
function rn(e) {
|
|
1598
1598
|
return e ? "open" : "closed";
|
|
1599
1599
|
}
|
|
1600
|
-
P(
|
|
1600
|
+
P(rn, "getState");
|
|
1601
1601
|
//#endregion
|
|
1602
1602
|
//#region ../node_modules/.pnpm/@radix-ui+react-popover@1.3.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react_e30c1a3361e595871e7a1c2e1a74b81d/node_modules/@radix-ui/react-popover/dist/index.mjs
|
|
1603
|
-
var
|
|
1603
|
+
var an = Object.defineProperty, B = (e, t) => an(e, "name", {
|
|
1604
1604
|
value: t,
|
|
1605
1605
|
configurable: !0
|
|
1606
|
-
}),
|
|
1606
|
+
}), V = "Popover", [on, sn] = Me(V, [ee]), H = ee(), [cn, U] = on(V), ln = /* @__PURE__ */ B((e) => {
|
|
1607
1607
|
let { __scopePopover: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !1 } = e, s = H(t), c = O.useRef(null), [l, u] = O.useState(!1), [d, f] = O.useState(0), [p, m] = O.useState(0), [h, g] = w({
|
|
1608
1608
|
prop: r,
|
|
1609
1609
|
defaultProp: i ?? !1,
|
|
1610
1610
|
onChange: a,
|
|
1611
|
-
caller:
|
|
1611
|
+
caller: V
|
|
1612
1612
|
});
|
|
1613
1613
|
return /* @__PURE__ */ (0, j.jsx)(b, {
|
|
1614
1614
|
...s,
|
|
1615
|
-
children: /* @__PURE__ */ (0, j.jsx)(
|
|
1615
|
+
children: /* @__PURE__ */ (0, j.jsx)(cn, {
|
|
1616
1616
|
scope: t,
|
|
1617
1617
|
contentId: S(),
|
|
1618
1618
|
titleId: S(),
|
|
@@ -1632,20 +1632,20 @@ var nn = Object.defineProperty, V = (e, t) => nn(e, "name", {
|
|
|
1632
1632
|
children: n
|
|
1633
1633
|
})
|
|
1634
1634
|
});
|
|
1635
|
-
}, "Popover"),
|
|
1636
|
-
let { __scopePopover: n, ...r } = e, i = U(
|
|
1635
|
+
}, "Popover"), un = "PopoverAnchor", dn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1636
|
+
let { __scopePopover: n, ...r } = e, i = U(un, n), a = H(n), { onCustomAnchorAdd: o, onCustomAnchorRemove: s } = i;
|
|
1637
1637
|
return O.useEffect(() => (o(), () => s()), [o, s]), /* @__PURE__ */ (0, j.jsx)(_, {
|
|
1638
1638
|
...a,
|
|
1639
1639
|
...r,
|
|
1640
1640
|
ref: t
|
|
1641
1641
|
});
|
|
1642
|
-
}, "PopoverAnchor")),
|
|
1643
|
-
let { __scopePopover: n, ...r } = e, a = U(
|
|
1642
|
+
}, "PopoverAnchor")), fn = "PopoverTrigger", pn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1643
|
+
let { __scopePopover: n, ...r } = e, a = U(fn, n), o = H(n), s = i(t, a.triggerRef), c = /* @__PURE__ */ (0, j.jsx)(T.button, {
|
|
1644
1644
|
type: "button",
|
|
1645
1645
|
"aria-haspopup": "dialog",
|
|
1646
1646
|
"aria-expanded": a.open,
|
|
1647
1647
|
"aria-controls": a.open ? a.contentId : void 0,
|
|
1648
|
-
"data-state":
|
|
1648
|
+
"data-state": Tn(a.open),
|
|
1649
1649
|
...r,
|
|
1650
1650
|
ref: s,
|
|
1651
1651
|
onClick: C(e.onClick, a.onOpenToggle)
|
|
@@ -1655,42 +1655,42 @@ var nn = Object.defineProperty, V = (e, t) => nn(e, "name", {
|
|
|
1655
1655
|
...o,
|
|
1656
1656
|
children: c
|
|
1657
1657
|
});
|
|
1658
|
-
}, "PopoverTrigger")),
|
|
1659
|
-
let { __scopePopover: t, forceMount: n, children: r, container: i } = e, a = U(
|
|
1660
|
-
return /* @__PURE__ */ (0, j.jsx)(
|
|
1658
|
+
}, "PopoverTrigger")), mn = "PopoverPortal", [hn, gn] = on(mn, { forceMount: void 0 }), _n = /* @__PURE__ */ B((e) => {
|
|
1659
|
+
let { __scopePopover: t, forceMount: n, children: r, container: i } = e, a = U(mn, t);
|
|
1660
|
+
return /* @__PURE__ */ (0, j.jsx)(hn, {
|
|
1661
1661
|
scope: t,
|
|
1662
1662
|
forceMount: n,
|
|
1663
1663
|
children: /* @__PURE__ */ (0, j.jsx)(E, {
|
|
1664
1664
|
present: n || a.open,
|
|
1665
|
-
children: /* @__PURE__ */ (0, j.jsx)(
|
|
1665
|
+
children: /* @__PURE__ */ (0, j.jsx)(Be, {
|
|
1666
1666
|
asChild: !0,
|
|
1667
1667
|
container: i,
|
|
1668
1668
|
children: r
|
|
1669
1669
|
})
|
|
1670
1670
|
})
|
|
1671
1671
|
});
|
|
1672
|
-
}, "PopoverPortal"), W = "PopoverContent",
|
|
1673
|
-
let n =
|
|
1672
|
+
}, "PopoverPortal"), W = "PopoverContent", vn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1673
|
+
let n = gn(W, e.__scopePopover), { forceMount: r = n.forceMount, ...i } = e, a = U(W, e.__scopePopover);
|
|
1674
1674
|
return /* @__PURE__ */ (0, j.jsx)(E, {
|
|
1675
1675
|
present: r || a.open,
|
|
1676
|
-
children: a.modal ? /* @__PURE__ */ (0, j.jsx)(
|
|
1676
|
+
children: a.modal ? /* @__PURE__ */ (0, j.jsx)(bn, {
|
|
1677
1677
|
...i,
|
|
1678
1678
|
ref: t
|
|
1679
|
-
}) : /* @__PURE__ */ (0, j.jsx)(
|
|
1679
|
+
}) : /* @__PURE__ */ (0, j.jsx)(xn, {
|
|
1680
1680
|
...i,
|
|
1681
1681
|
ref: t
|
|
1682
1682
|
})
|
|
1683
1683
|
});
|
|
1684
|
-
}, "PopoverContent")),
|
|
1685
|
-
let n = U(W, e.__scopePopover), r = O.useRef(null), a = i(t, r), o = O.useRef(!1), { nodes: s, registry: c } =
|
|
1684
|
+
}, "PopoverContent")), yn = s("PopoverContent.RemoveScroll"), bn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1685
|
+
let n = U(W, e.__scopePopover), r = O.useRef(null), a = i(t, r), o = O.useRef(!1), { nodes: s, registry: c } = We();
|
|
1686
1686
|
return O.useEffect(() => {
|
|
1687
1687
|
let e = r.current;
|
|
1688
|
-
if (e) return
|
|
1689
|
-
}, []), /* @__PURE__ */ (0, j.jsx)(
|
|
1690
|
-
as:
|
|
1688
|
+
if (e) return Le(e);
|
|
1689
|
+
}, []), /* @__PURE__ */ (0, j.jsx)(Re, {
|
|
1690
|
+
as: yn,
|
|
1691
1691
|
allowPinchZoom: !0,
|
|
1692
1692
|
shards: O.useMemo(() => [r, ...s.map((e) => ({ current: e }))], [r, s]),
|
|
1693
|
-
children: /* @__PURE__ */ (0, j.jsx)(
|
|
1693
|
+
children: /* @__PURE__ */ (0, j.jsx)(Sn, {
|
|
1694
1694
|
...e,
|
|
1695
1695
|
ref: a,
|
|
1696
1696
|
branchNodes: s,
|
|
@@ -1707,9 +1707,9 @@ var nn = Object.defineProperty, V = (e, t) => nn(e, "name", {
|
|
|
1707
1707
|
onFocusOutside: C(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 })
|
|
1708
1708
|
})
|
|
1709
1709
|
});
|
|
1710
|
-
}, "PopoverContentModal")),
|
|
1710
|
+
}, "PopoverContentModal")), xn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1711
1711
|
let n = U(W, e.__scopePopover), r = O.useRef(!1), i = O.useRef(!1);
|
|
1712
|
-
return /* @__PURE__ */ (0, j.jsx)(
|
|
1712
|
+
return /* @__PURE__ */ (0, j.jsx)(Sn, {
|
|
1713
1713
|
...e,
|
|
1714
1714
|
ref: t,
|
|
1715
1715
|
trapFocus: !1,
|
|
@@ -1723,18 +1723,18 @@ var nn = Object.defineProperty, V = (e, t) => nn(e, "name", {
|
|
|
1723
1723
|
n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
|
|
1724
1724
|
}
|
|
1725
1725
|
});
|
|
1726
|
-
}, "PopoverContentNonModal")),
|
|
1726
|
+
}, "PopoverContentNonModal")), Sn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1727
1727
|
let { __scopePopover: n, trapFocus: r, onOpenAutoFocus: a, onCloseAutoFocus: o, disableOutsidePointerEvents: s, onEscapeKeyDown: c, onPointerDownOutside: l, onFocusOutside: u, onInteractOutside: d, "aria-describedby": f, branchNodes: p, branchRegistry: m, ...h } = e, g = U(W, n), _ = H(n), [y, b] = O.useState(null), x = i(t, b);
|
|
1728
|
-
return
|
|
1728
|
+
return Ue(y), Ve(), /* @__PURE__ */ (0, j.jsx)(Fe, {
|
|
1729
1729
|
registry: m,
|
|
1730
|
-
children: /* @__PURE__ */ (0, j.jsx)(
|
|
1730
|
+
children: /* @__PURE__ */ (0, j.jsx)(ze, {
|
|
1731
1731
|
asChild: !0,
|
|
1732
1732
|
loop: !0,
|
|
1733
1733
|
trapped: r,
|
|
1734
1734
|
branches: p,
|
|
1735
1735
|
onMountAutoFocus: a,
|
|
1736
1736
|
onUnmountAutoFocus: o,
|
|
1737
|
-
children: /* @__PURE__ */ (0, j.jsx)(
|
|
1737
|
+
children: /* @__PURE__ */ (0, j.jsx)(Ie, {
|
|
1738
1738
|
asChild: !0,
|
|
1739
1739
|
disableOutsidePointerEvents: s,
|
|
1740
1740
|
onInteractOutside: d,
|
|
@@ -1744,11 +1744,11 @@ var nn = Object.defineProperty, V = (e, t) => nn(e, "name", {
|
|
|
1744
1744
|
onDismiss: () => g.onOpenChange(!1),
|
|
1745
1745
|
deferPointerDownOutside: !0,
|
|
1746
1746
|
children: /* @__PURE__ */ (0, j.jsx)(v, {
|
|
1747
|
-
"data-state":
|
|
1747
|
+
"data-state": Tn(g.open),
|
|
1748
1748
|
role: "dialog",
|
|
1749
1749
|
id: g.contentId,
|
|
1750
1750
|
"aria-labelledby": g.titlePresent ? g.titleId : void 0,
|
|
1751
|
-
"aria-describedby": g.descriptionPresent ?
|
|
1751
|
+
"aria-describedby": g.descriptionPresent ? En(f, g.descriptionId) : f,
|
|
1752
1752
|
..._,
|
|
1753
1753
|
...h,
|
|
1754
1754
|
ref: x,
|
|
@@ -1764,8 +1764,8 @@ var nn = Object.defineProperty, V = (e, t) => nn(e, "name", {
|
|
|
1764
1764
|
})
|
|
1765
1765
|
})
|
|
1766
1766
|
});
|
|
1767
|
-
}, "PopoverContentImpl")),
|
|
1768
|
-
let { __scopePopover: n, ...r } = e, i = U(
|
|
1767
|
+
}, "PopoverContentImpl")), Cn = "PopoverClose", wn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1768
|
+
let { __scopePopover: n, ...r } = e, i = U(Cn, n);
|
|
1769
1769
|
return /* @__PURE__ */ (0, j.jsx)(T.button, {
|
|
1770
1770
|
type: "button",
|
|
1771
1771
|
...r,
|
|
@@ -1773,19 +1773,19 @@ var nn = Object.defineProperty, V = (e, t) => nn(e, "name", {
|
|
|
1773
1773
|
onClick: C(e.onClick, () => i.onOpenChange(!1))
|
|
1774
1774
|
});
|
|
1775
1775
|
}, "PopoverClose"));
|
|
1776
|
-
function
|
|
1776
|
+
function Tn(e) {
|
|
1777
1777
|
return e ? "open" : "closed";
|
|
1778
1778
|
}
|
|
1779
|
-
|
|
1780
|
-
function
|
|
1779
|
+
B(Tn, "getState");
|
|
1780
|
+
function En(...e) {
|
|
1781
1781
|
let t = /* @__PURE__ */ new Set();
|
|
1782
1782
|
for (let n of e) if (typeof n == "string") for (let e of String(n).trim().split(/\s+/)) e && t.add(e);
|
|
1783
1783
|
return t.size > 0 ? Array.from(t).join(" ") : void 0;
|
|
1784
1784
|
}
|
|
1785
|
-
|
|
1785
|
+
B(En, "concatAriaDescribedby");
|
|
1786
1786
|
//#endregion
|
|
1787
1787
|
//#region src/components/ui/query-param-preserving-link.tsx
|
|
1788
|
-
var
|
|
1788
|
+
var Dn = (e) => {
|
|
1789
1789
|
let t = (0, k.c)(16), n, r, i;
|
|
1790
1790
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({href: r, children: n, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
1791
1791
|
let a = (0, O.useRef)(null), o;
|
|
@@ -1802,7 +1802,7 @@ var En = (e) => {
|
|
|
1802
1802
|
t[6] === s ? c = t[7] : (c = { onPress: () => {
|
|
1803
1803
|
s();
|
|
1804
1804
|
} }, t[6] = s, t[7] = c);
|
|
1805
|
-
let { pressProps: l } =
|
|
1805
|
+
let { pressProps: l } = Ee(c), u;
|
|
1806
1806
|
t[8] === s ? u = t[9] : (u = (e) => {
|
|
1807
1807
|
e.preventDefault(), s();
|
|
1808
1808
|
}, t[8] = s, t[9] = u);
|
|
@@ -1815,18 +1815,18 @@ var En = (e) => {
|
|
|
1815
1815
|
...i,
|
|
1816
1816
|
children: n
|
|
1817
1817
|
}), t[10] = n, t[11] = d, t[12] = r, t[13] = l, t[14] = i, t[15] = f) : f = t[15], f;
|
|
1818
|
-
},
|
|
1818
|
+
}, On = ln, kn = pn, An = Ne(_n), jn = wn, Mn = Ae(vn), Nn = O.forwardRef((e, t) => {
|
|
1819
1819
|
let n = (0, k.c)(22), i, a, o, s, c, l;
|
|
1820
1820
|
n[0] === e ? (i = n[1], a = n[2], o = n[3], s = n[4], c = n[5], l = n[6]) : ({className: i, align: o, sideOffset: s, portal: c, scrollable: l, ...a} = e, n[0] = e, n[1] = i, n[2] = a, n[3] = o, n[4] = s, n[5] = c, n[6] = l);
|
|
1821
1821
|
let u = o === void 0 ? "center" : o, d = s === void 0 ? 4 : s, f = c === void 0 || c, p = l !== void 0 && l, m = p && "overflow-auto", h;
|
|
1822
1822
|
n[7] !== i || n[8] !== m ? (h = r("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", i, m), n[7] = i, n[8] = m, n[9] = h) : h = n[9];
|
|
1823
|
-
let g = p ? `calc(var(--radix-popover-content-available-height) - ${
|
|
1823
|
+
let g = p ? `calc(var(--radix-popover-content-available-height) - ${Pe}px)` : void 0, _;
|
|
1824
1824
|
n[10] !== a.style || n[11] !== g ? (_ = {
|
|
1825
1825
|
...a.style,
|
|
1826
1826
|
maxHeight: g
|
|
1827
1827
|
}, n[10] = a.style, n[11] = g, n[12] = _) : _ = n[12];
|
|
1828
1828
|
let v;
|
|
1829
|
-
n[13] !== u || n[14] !== a || n[15] !== t || n[16] !== d || n[17] !== h || n[18] !== _ ? (v = /* @__PURE__ */ (0, j.jsx)(
|
|
1829
|
+
n[13] !== u || n[14] !== a || n[15] !== t || n[16] !== d || n[17] !== h || n[18] !== _ ? (v = /* @__PURE__ */ (0, j.jsx)(He, { children: /* @__PURE__ */ (0, j.jsx)(Mn, {
|
|
1830
1830
|
ref: t,
|
|
1831
1831
|
align: u,
|
|
1832
1832
|
sideOffset: d,
|
|
@@ -1837,35 +1837,35 @@ var En = (e) => {
|
|
|
1837
1837
|
let y = v;
|
|
1838
1838
|
if (f) {
|
|
1839
1839
|
let e;
|
|
1840
|
-
return n[20] === y ? e = n[21] : (e = /* @__PURE__ */ (0, j.jsx)(
|
|
1840
|
+
return n[20] === y ? e = n[21] : (e = /* @__PURE__ */ (0, j.jsx)(An, { children: y }), n[20] = y, n[21] = e), e;
|
|
1841
1841
|
}
|
|
1842
1842
|
return y;
|
|
1843
1843
|
});
|
|
1844
|
-
|
|
1844
|
+
Nn.displayName = vn.displayName;
|
|
1845
1845
|
//#endregion
|
|
1846
1846
|
//#region src/core/documentation/doc-lookup.ts
|
|
1847
|
-
async function
|
|
1848
|
-
let t =
|
|
1847
|
+
async function Pn(e) {
|
|
1848
|
+
let t = pe().inOrderIds.at(0);
|
|
1849
1849
|
if (t) try {
|
|
1850
|
-
let n = await
|
|
1850
|
+
let n = await ye.request({
|
|
1851
1851
|
document: e,
|
|
1852
1852
|
cellId: t
|
|
1853
1853
|
});
|
|
1854
1854
|
if (!n || n.options.length === 0) return;
|
|
1855
1855
|
let r = e.split(".").pop() ?? e, i = n.options[0], a = n.options.find((e) => e.name === r) ?? i;
|
|
1856
|
-
a?.completion_info && Je.set(
|
|
1856
|
+
a?.completion_info && Je.set(_e, { documentation: a.completion_info });
|
|
1857
1857
|
} catch (t) {
|
|
1858
1858
|
n.debug(`Doc lookup failed for "${e}"`, t);
|
|
1859
1859
|
}
|
|
1860
1860
|
}
|
|
1861
1861
|
//#endregion
|
|
1862
1862
|
//#region src/core/documentation/DocHoverTarget.tsx
|
|
1863
|
-
var
|
|
1863
|
+
var Fn = (e) => {
|
|
1864
1864
|
let t = (0, k.c)(8), { qualifiedName: n, children: r } = e, i;
|
|
1865
1865
|
t[0] === n ? i = t[1] : (i = () => {
|
|
1866
|
-
|
|
1866
|
+
Pn(n);
|
|
1867
1867
|
}, t[0] = n, t[1] = i);
|
|
1868
|
-
let a =
|
|
1868
|
+
let a = Te(i, 100), o;
|
|
1869
1869
|
t[2] === a ? o = t[3] : (o = () => a.cancel(), t[2] = a, t[3] = o);
|
|
1870
1870
|
let s;
|
|
1871
1871
|
return t[4] !== r || t[5] !== a || t[6] !== o ? (s = /* @__PURE__ */ (0, j.jsx)("span", {
|
|
@@ -1873,49 +1873,49 @@ var Pn = (e) => {
|
|
|
1873
1873
|
onMouseLeave: o,
|
|
1874
1874
|
children: r
|
|
1875
1875
|
}), t[4] = r, t[5] = a, t[6] = o, t[7] = s) : s = t[7], s;
|
|
1876
|
-
},
|
|
1876
|
+
}, In = Ke(!1);
|
|
1877
1877
|
//#endregion
|
|
1878
1878
|
//#region src/core/static/export-context.ts
|
|
1879
|
-
function
|
|
1879
|
+
function Ln(e) {
|
|
1880
1880
|
if (typeof e != "object" || !e) return !1;
|
|
1881
1881
|
let t = e;
|
|
1882
1882
|
return !(t.trusted !== !0 || t.notebookCode !== void 0 && typeof t.notebookCode != "string");
|
|
1883
1883
|
}
|
|
1884
|
-
function Ln() {
|
|
1885
|
-
let e = window?.__MARIMO_EXPORT_CONTEXT__;
|
|
1886
|
-
return In(e) ? e : void 0;
|
|
1887
|
-
}
|
|
1888
1884
|
function Rn() {
|
|
1889
|
-
|
|
1885
|
+
let e = window?.__MARIMO_EXPORT_CONTEXT__;
|
|
1886
|
+
return Ln(e) ? e : void 0;
|
|
1890
1887
|
}
|
|
1891
1888
|
function zn() {
|
|
1892
|
-
|
|
1889
|
+
return Rn()?.trusted === !0;
|
|
1890
|
+
}
|
|
1891
|
+
function Bn() {
|
|
1892
|
+
if (Je.get(In) || zn() || Je.get(Xe)) return !0;
|
|
1893
1893
|
try {
|
|
1894
|
-
if (
|
|
1894
|
+
if (De() === "read") return !0;
|
|
1895
1895
|
} catch {}
|
|
1896
1896
|
return !1;
|
|
1897
1897
|
}
|
|
1898
1898
|
//#endregion
|
|
1899
1899
|
//#region src/plugins/core/sanitize.ts
|
|
1900
|
-
var
|
|
1901
|
-
let t = e(
|
|
1902
|
-
if (t || n ||
|
|
1900
|
+
var Vn = Ke((e) => {
|
|
1901
|
+
let t = e(In), n = e(Xe);
|
|
1902
|
+
if (t || n || zn()) return !1;
|
|
1903
1903
|
let r = !0;
|
|
1904
1904
|
try {
|
|
1905
|
-
r =
|
|
1905
|
+
r = De() === "read";
|
|
1906
1906
|
} catch {
|
|
1907
1907
|
return !0;
|
|
1908
1908
|
}
|
|
1909
1909
|
return !r;
|
|
1910
1910
|
});
|
|
1911
|
-
function
|
|
1912
|
-
return D(
|
|
1911
|
+
function Hn() {
|
|
1912
|
+
return D(Vn);
|
|
1913
1913
|
}
|
|
1914
1914
|
//#endregion
|
|
1915
1915
|
//#region src/plugins/core/RenderHTML.tsx
|
|
1916
|
-
var
|
|
1916
|
+
var Un = [], Wn = (e) => {
|
|
1917
1917
|
if (e instanceof A.Element && !/^[A-Za-z][\w-]*$/.test(e.name)) return O.createElement(O.Fragment);
|
|
1918
|
-
},
|
|
1918
|
+
}, Gn = (e, t) => {
|
|
1919
1919
|
if (t instanceof A.Element && t.name === "body") {
|
|
1920
1920
|
if ((0, O.isValidElement)(e) && "props" in e) {
|
|
1921
1921
|
let t = e.props.children;
|
|
@@ -1923,7 +1923,7 @@ var Hn = [], Un = (e) => {
|
|
|
1923
1923
|
}
|
|
1924
1924
|
return;
|
|
1925
1925
|
}
|
|
1926
|
-
},
|
|
1926
|
+
}, Kn = (e, t) => {
|
|
1927
1927
|
if (t instanceof A.Element && t.name === "html") {
|
|
1928
1928
|
if ((0, O.isValidElement)(e) && "props" in e) {
|
|
1929
1929
|
let t = e.props.children;
|
|
@@ -1931,55 +1931,55 @@ var Hn = [], Un = (e) => {
|
|
|
1931
1931
|
}
|
|
1932
1932
|
return;
|
|
1933
1933
|
}
|
|
1934
|
-
},
|
|
1934
|
+
}, qn = (e) => {
|
|
1935
1935
|
if (e instanceof A.Element && e.attribs && e.name === "iframe") {
|
|
1936
1936
|
let t = document.createElement("iframe");
|
|
1937
1937
|
return Object.entries(e.attribs).forEach(([e, n]) => {
|
|
1938
1938
|
e.startsWith("\"") && e.endsWith("\"") && (e = e.slice(1, -1)), t.setAttribute(e, n);
|
|
1939
1939
|
}), /* @__PURE__ */ (0, j.jsx)("div", { dangerouslySetInnerHTML: { __html: t.outerHTML } });
|
|
1940
1940
|
}
|
|
1941
|
-
},
|
|
1941
|
+
}, Jn = (e) => {
|
|
1942
1942
|
if (e instanceof A.Element && e.name === "script") {
|
|
1943
1943
|
let t = e.attribs.src;
|
|
1944
1944
|
if (!t) return;
|
|
1945
|
-
if (!
|
|
1945
|
+
if (!Bn()) return n.warn(`[RenderHTML] refusing <script src> in untrusted context: ${t}`), /* @__PURE__ */ (0, j.jsx)(j.Fragment, {});
|
|
1946
1946
|
if (![...document.querySelectorAll("script[src]")].some((e) => e.getAttribute("src") === t)) {
|
|
1947
1947
|
let e = document.createElement("script");
|
|
1948
1948
|
e.src = t, document.head.append(e);
|
|
1949
1949
|
}
|
|
1950
1950
|
return /* @__PURE__ */ (0, j.jsx)(j.Fragment, {});
|
|
1951
1951
|
}
|
|
1952
|
-
},
|
|
1952
|
+
}, Yn = (e, t) => {
|
|
1953
1953
|
if (t instanceof A.Element && t.name === "a") {
|
|
1954
1954
|
let n = t.attribs.href;
|
|
1955
1955
|
if (n?.startsWith("#") && !n.startsWith("#code/")) {
|
|
1956
1956
|
let r = null;
|
|
1957
|
-
return (0, O.isValidElement)(e) && "props" in e && (r = e.props.children), /* @__PURE__ */ (0, j.jsx)(
|
|
1957
|
+
return (0, O.isValidElement)(e) && "props" in e && (r = e.props.children), /* @__PURE__ */ (0, j.jsx)(Dn, {
|
|
1958
1958
|
href: n,
|
|
1959
1959
|
...t.attribs,
|
|
1960
1960
|
children: r
|
|
1961
1961
|
});
|
|
1962
1962
|
}
|
|
1963
1963
|
}
|
|
1964
|
-
}, Yn = (e, t, n) => {
|
|
1965
|
-
if (t instanceof A.Element && t.name === "div" && t.attribs?.class?.includes("codehilite")) return /* @__PURE__ */ (0, j.jsx)(er, { children: e }, n);
|
|
1966
1964
|
}, Xn = (e, t, n) => {
|
|
1965
|
+
if (t instanceof A.Element && t.name === "div" && t.attribs?.class?.includes("codehilite")) return /* @__PURE__ */ (0, j.jsx)(tr, { children: e }, n);
|
|
1966
|
+
}, Zn = (e, t, n) => {
|
|
1967
1967
|
if (!(t instanceof A.Element) || t.name !== "img") return;
|
|
1968
1968
|
let r = t.attribs?.src;
|
|
1969
1969
|
if (!(!r || !(0, O.isValidElement)(e)) && !/^data:/i.test(r)) return (0, O.cloneElement)(e, { key: `${r}-${n}` });
|
|
1970
|
-
},
|
|
1970
|
+
}, Qn = (e, t, n) => {
|
|
1971
1971
|
if (!(t instanceof A.Element) || t.name !== "input" || t.attribs?.type !== "checkbox" || !(0, O.isValidElement)(e)) return;
|
|
1972
1972
|
let r = "checked" in t.attribs;
|
|
1973
1973
|
return (0, O.cloneElement)(e, { key: `checkbox-${n}-${r}` });
|
|
1974
|
-
},
|
|
1974
|
+
}, $n = (e, t) => {
|
|
1975
1975
|
if (t instanceof A.Element && t.attribs?.["data-marimo-doc"]) {
|
|
1976
1976
|
let n = t.attribs["data-marimo-doc"];
|
|
1977
|
-
return /* @__PURE__ */ (0, j.jsx)(
|
|
1977
|
+
return /* @__PURE__ */ (0, j.jsx)(Fn, {
|
|
1978
1978
|
qualifiedName: n,
|
|
1979
1979
|
children: e
|
|
1980
1980
|
});
|
|
1981
1981
|
}
|
|
1982
|
-
},
|
|
1982
|
+
}, er = (e, t) => {
|
|
1983
1983
|
if (t instanceof A.Element && t.attribs?.["data-tooltip"]) {
|
|
1984
1984
|
if ((t.name?.toLowerCase() ?? "").startsWith("marimo-")) return;
|
|
1985
1985
|
let n = t.attribs["data-tooltip"].replace(/^[\r\n]+|[\r\n]+$/g, "");
|
|
@@ -1991,7 +1991,7 @@ var Hn = [], Un = (e) => {
|
|
|
1991
1991
|
children: e
|
|
1992
1992
|
});
|
|
1993
1993
|
}
|
|
1994
|
-
},
|
|
1994
|
+
}, tr = (e) => {
|
|
1995
1995
|
let t = (0, k.c)(3), { children: n } = e, r = (0, O.useRef)(null), i;
|
|
1996
1996
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ (0, j.jsx)("div", {
|
|
1997
1997
|
className: "absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
@@ -2010,12 +2010,12 @@ var Hn = [], Un = (e) => {
|
|
|
2010
2010
|
ref: r,
|
|
2011
2011
|
children: [n, i]
|
|
2012
2012
|
}), t[1] = n, t[2] = a), a;
|
|
2013
|
-
},
|
|
2013
|
+
}, nr = ({ html: e, additionalReplacements: t = Un, alwaysSanitizeHtml: n = !0 }) => /* @__PURE__ */ (0, j.jsx)(rr, {
|
|
2014
2014
|
html: e,
|
|
2015
2015
|
alwaysSanitizeHtml: n,
|
|
2016
2016
|
additionalReplacements: t
|
|
2017
|
-
}),
|
|
2018
|
-
let t = (0, k.c)(5), { html: n, additionalReplacements: r, alwaysSanitizeHtml: i } = e, a = r === void 0 ?
|
|
2017
|
+
}), rr = (e) => {
|
|
2018
|
+
let t = (0, k.c)(5), { html: n, additionalReplacements: r, alwaysSanitizeHtml: i } = e, a = r === void 0 ? Un : r, o = Hn(), s;
|
|
2019
2019
|
bb0: {
|
|
2020
2020
|
if (i || o) {
|
|
2021
2021
|
let e;
|
|
@@ -2025,26 +2025,26 @@ var Hn = [], Un = (e) => {
|
|
|
2025
2025
|
s = n;
|
|
2026
2026
|
}
|
|
2027
2027
|
let c = s, l;
|
|
2028
|
-
return t[2] !== a || t[3] !== c ? (l =
|
|
2028
|
+
return t[2] !== a || t[3] !== c ? (l = ir({
|
|
2029
2029
|
html: c,
|
|
2030
2030
|
additionalReplacements: a
|
|
2031
2031
|
}), t[2] = a, t[3] = c, t[4] = l) : l = t[4], l;
|
|
2032
2032
|
};
|
|
2033
|
-
function
|
|
2033
|
+
function ir({ html: e, additionalReplacements: t = Un }) {
|
|
2034
2034
|
let n = [
|
|
2035
|
-
|
|
2036
|
-
Kn,
|
|
2035
|
+
Wn,
|
|
2037
2036
|
qn,
|
|
2037
|
+
Jn,
|
|
2038
2038
|
...t
|
|
2039
2039
|
], r = [
|
|
2040
|
+
Xn,
|
|
2040
2041
|
Yn,
|
|
2041
|
-
Jn,
|
|
2042
|
-
Qn,
|
|
2043
2042
|
$n,
|
|
2044
|
-
|
|
2045
|
-
Gn
|
|
2046
|
-
|
|
2047
|
-
|
|
2043
|
+
er,
|
|
2044
|
+
Gn,
|
|
2045
|
+
Kn
|
|
2046
|
+
], i = [Zn, Qn];
|
|
2047
|
+
return pt(e, {
|
|
2048
2048
|
replace: (e, t) => {
|
|
2049
2049
|
for (let r of n) {
|
|
2050
2050
|
let n = r(e, t);
|
|
@@ -2071,36 +2071,36 @@ function rr({ html: e, additionalReplacements: t = Hn }) {
|
|
|
2071
2071
|
}
|
|
2072
2072
|
//#endregion
|
|
2073
2073
|
//#region src/utils/json/base64.ts
|
|
2074
|
-
function
|
|
2074
|
+
function ar(e, t) {
|
|
2075
2075
|
return `data:${t};base64,${e}`;
|
|
2076
2076
|
}
|
|
2077
|
-
function
|
|
2077
|
+
function or(e) {
|
|
2078
2078
|
return e.startsWith("data:") && e.includes(";base64,");
|
|
2079
2079
|
}
|
|
2080
|
-
function
|
|
2080
|
+
function sr(e) {
|
|
2081
2081
|
return e.split(",")[1];
|
|
2082
2082
|
}
|
|
2083
|
-
function
|
|
2083
|
+
function cr(e) {
|
|
2084
2084
|
let t = globalThis.atob(e), n = t.length, r = new Uint8Array(n);
|
|
2085
2085
|
for (let e = 0; e < n; e++) r[e] = t.charCodeAt(e);
|
|
2086
2086
|
return r;
|
|
2087
2087
|
}
|
|
2088
|
-
var
|
|
2089
|
-
function
|
|
2090
|
-
let t =
|
|
2088
|
+
var lr = Uint8Array.fromBase64 ?? cr;
|
|
2089
|
+
function ur(e) {
|
|
2090
|
+
let t = lr(e);
|
|
2091
2091
|
return new DataView(t.buffer);
|
|
2092
2092
|
}
|
|
2093
|
-
function
|
|
2093
|
+
function dr(e) {
|
|
2094
2094
|
let t = "", n = e.length;
|
|
2095
2095
|
for (let r = 0; r < n; r++) t += String.fromCharCode(e[r]);
|
|
2096
2096
|
return globalThis.btoa(t);
|
|
2097
2097
|
}
|
|
2098
|
-
var
|
|
2099
|
-
function fr(e) {
|
|
2100
|
-
return dr(new Uint8Array(e.buffer, e.byteOffset, e.byteLength));
|
|
2101
|
-
}
|
|
2098
|
+
var fr = "toBase64" in Uint8Array.prototype ? (e) => e.toBase64() : dr;
|
|
2102
2099
|
function pr(e) {
|
|
2103
|
-
return (e.
|
|
2100
|
+
return fr(new Uint8Array(e.buffer, e.byteOffset, e.byteLength));
|
|
2101
|
+
}
|
|
2102
|
+
function mr(e) {
|
|
2103
|
+
return (e.buffers ?? []).map(ur);
|
|
2104
2104
|
}
|
|
2105
2105
|
//#endregion
|
|
2106
2106
|
//#region ../node_modules/.pnpm/@radix-ui+react-icons@1.3.2_react@19.3.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js
|
|
@@ -2110,8 +2110,8 @@ function G(e, t) {
|
|
|
2110
2110
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2111
2111
|
return n;
|
|
2112
2112
|
}
|
|
2113
|
-
var
|
|
2114
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e,
|
|
2113
|
+
var hr = ["color"], gr = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
2114
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e, hr);
|
|
2115
2115
|
return (0, O.createElement)("svg", Object.assign({
|
|
2116
2116
|
width: "15",
|
|
2117
2117
|
height: "15",
|
|
@@ -2187,8 +2187,8 @@ var mr = ["color"], hr = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
|
2187
2187
|
rx: ".5",
|
|
2188
2188
|
fill: r
|
|
2189
2189
|
}));
|
|
2190
|
-
}),
|
|
2191
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e,
|
|
2190
|
+
}), _r = ["color"], vr = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
2191
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e, _r);
|
|
2192
2192
|
return (0, O.createElement)("svg", Object.assign({
|
|
2193
2193
|
width: "15",
|
|
2194
2194
|
height: "15",
|
|
@@ -2201,8 +2201,8 @@ var mr = ["color"], hr = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
|
2201
2201
|
fillRule: "evenodd",
|
|
2202
2202
|
clipRule: "evenodd"
|
|
2203
2203
|
}));
|
|
2204
|
-
}),
|
|
2205
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e,
|
|
2204
|
+
}), yr = ["color"], br = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
2205
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e, yr);
|
|
2206
2206
|
return (0, O.createElement)("svg", Object.assign({
|
|
2207
2207
|
width: "15",
|
|
2208
2208
|
height: "15",
|
|
@@ -2215,8 +2215,8 @@ var mr = ["color"], hr = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
|
2215
2215
|
fillRule: "evenodd",
|
|
2216
2216
|
clipRule: "evenodd"
|
|
2217
2217
|
}));
|
|
2218
|
-
}),
|
|
2219
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e,
|
|
2218
|
+
}), xr = ["color"], Sr = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
2219
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e, xr);
|
|
2220
2220
|
return (0, O.createElement)("svg", Object.assign({
|
|
2221
2221
|
width: "15",
|
|
2222
2222
|
height: "15",
|
|
@@ -2229,8 +2229,8 @@ var mr = ["color"], hr = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
|
2229
2229
|
fillRule: "evenodd",
|
|
2230
2230
|
clipRule: "evenodd"
|
|
2231
2231
|
}));
|
|
2232
|
-
}),
|
|
2233
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e,
|
|
2232
|
+
}), Cr = ["color"], wr = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
2233
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e, Cr);
|
|
2234
2234
|
return (0, O.createElement)("svg", Object.assign({
|
|
2235
2235
|
width: "15",
|
|
2236
2236
|
height: "15",
|
|
@@ -2243,8 +2243,8 @@ var mr = ["color"], hr = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
|
2243
2243
|
fillRule: "evenodd",
|
|
2244
2244
|
clipRule: "evenodd"
|
|
2245
2245
|
}));
|
|
2246
|
-
}),
|
|
2247
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e,
|
|
2246
|
+
}), Tr = ["color"], Er = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
2247
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e, Tr);
|
|
2248
2248
|
return (0, O.createElement)("svg", Object.assign({
|
|
2249
2249
|
width: "15",
|
|
2250
2250
|
height: "15",
|
|
@@ -2255,8 +2255,8 @@ var mr = ["color"], hr = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
|
2255
2255
|
d: "M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",
|
|
2256
2256
|
fill: r
|
|
2257
2257
|
}));
|
|
2258
|
-
}),
|
|
2259
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e,
|
|
2258
|
+
}), Dr = ["color"], Or = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
2259
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e, Dr);
|
|
2260
2260
|
return (0, O.createElement)("svg", Object.assign({
|
|
2261
2261
|
width: "15",
|
|
2262
2262
|
height: "15",
|
|
@@ -2269,8 +2269,8 @@ var mr = ["color"], hr = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
|
2269
2269
|
fillRule: "evenodd",
|
|
2270
2270
|
clipRule: "evenodd"
|
|
2271
2271
|
}));
|
|
2272
|
-
}),
|
|
2273
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e,
|
|
2272
|
+
}), kr = ["color"], Ar = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
2273
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e, kr);
|
|
2274
2274
|
return (0, O.createElement)("svg", Object.assign({
|
|
2275
2275
|
width: "15",
|
|
2276
2276
|
height: "15",
|
|
@@ -2283,30 +2283,30 @@ var mr = ["color"], hr = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
|
2283
2283
|
fillRule: "evenodd",
|
|
2284
2284
|
clipRule: "evenodd"
|
|
2285
2285
|
}));
|
|
2286
|
-
}),
|
|
2286
|
+
}), jr = zt, Mr = O.forwardRef((e, t) => {
|
|
2287
2287
|
let n = (0, k.c)(9), i, a;
|
|
2288
2288
|
n[0] === e ? (i = n[1], a = n[2]) : ({className: i, ...a} = e, n[0] = e, n[1] = i, n[2] = a);
|
|
2289
2289
|
let o;
|
|
2290
2290
|
n[3] === i ? o = n[4] : (o = r("border-b", i), n[3] = i, n[4] = o);
|
|
2291
2291
|
let s;
|
|
2292
|
-
return n[5] !== a || n[6] !== t || n[7] !== o ? (s = /* @__PURE__ */ (0, j.jsx)(
|
|
2292
|
+
return n[5] !== a || n[6] !== t || n[7] !== o ? (s = /* @__PURE__ */ (0, j.jsx)(Zt, {
|
|
2293
2293
|
ref: t,
|
|
2294
2294
|
className: o,
|
|
2295
2295
|
...a
|
|
2296
2296
|
}), n[5] = a, n[6] = t, n[7] = o, n[8] = s) : s = n[8], s;
|
|
2297
2297
|
});
|
|
2298
|
-
|
|
2299
|
-
var
|
|
2298
|
+
Mr.displayName = "AccordionItem";
|
|
2299
|
+
var Nr = O.forwardRef((e, t) => {
|
|
2300
2300
|
let n = (0, k.c)(12), i, a, o;
|
|
2301
2301
|
n[0] === e ? (i = n[1], a = n[2], o = n[3]) : ({className: a, children: i, ...o} = e, n[0] = e, n[1] = i, n[2] = a, n[3] = o);
|
|
2302
2302
|
let s;
|
|
2303
2303
|
n[4] === a ? s = n[5] : (s = r("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180 text-start", a), n[4] = a, n[5] = s);
|
|
2304
2304
|
let c;
|
|
2305
|
-
n[6] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ (0, j.jsx)(
|
|
2305
|
+
n[6] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ (0, j.jsx)(Ce, { className: "h-4 w-4 transition-transform duration-200" }), n[6] = c) : c = n[6];
|
|
2306
2306
|
let l;
|
|
2307
|
-
return n[7] !== i || n[8] !== o || n[9] !== t || n[10] !== s ? (l = /* @__PURE__ */ (0, j.jsx)(
|
|
2307
|
+
return n[7] !== i || n[8] !== o || n[9] !== t || n[10] !== s ? (l = /* @__PURE__ */ (0, j.jsx)($t, {
|
|
2308
2308
|
className: "flex",
|
|
2309
|
-
children: /* @__PURE__ */ (0, j.jsxs)(
|
|
2309
|
+
children: /* @__PURE__ */ (0, j.jsxs)(z, {
|
|
2310
2310
|
ref: t,
|
|
2311
2311
|
className: s,
|
|
2312
2312
|
...o,
|
|
@@ -2314,8 +2314,8 @@ var Mr = O.forwardRef((e, t) => {
|
|
|
2314
2314
|
})
|
|
2315
2315
|
}), n[7] = i, n[8] = o, n[9] = t, n[10] = s, n[11] = l) : l = n[11], l;
|
|
2316
2316
|
});
|
|
2317
|
-
|
|
2318
|
-
var
|
|
2317
|
+
Nr.displayName = z.displayName;
|
|
2318
|
+
var Pr = O.forwardRef((e, t) => {
|
|
2319
2319
|
let n = (0, k.c)(17), i, a, o, s;
|
|
2320
2320
|
n[0] === e ? (i = n[1], a = n[2], o = n[3], s = n[4]) : ({className: a, children: i, wrapperClassName: s, ...o} = e, n[0] = e, n[1] = i, n[2] = a, n[3] = o, n[4] = s);
|
|
2321
2321
|
let c;
|
|
@@ -2328,17 +2328,17 @@ var Nr = O.forwardRef((e, t) => {
|
|
|
2328
2328
|
children: i
|
|
2329
2329
|
}), n[9] = i, n[10] = l, n[11] = u) : u = n[11];
|
|
2330
2330
|
let d;
|
|
2331
|
-
return n[12] !== o || n[13] !== t || n[14] !== c || n[15] !== u ? (d = /* @__PURE__ */ (0, j.jsx)(
|
|
2331
|
+
return n[12] !== o || n[13] !== t || n[14] !== c || n[15] !== u ? (d = /* @__PURE__ */ (0, j.jsx)(nn, {
|
|
2332
2332
|
ref: t,
|
|
2333
2333
|
className: c,
|
|
2334
2334
|
...o,
|
|
2335
2335
|
children: u
|
|
2336
2336
|
}), n[12] = o, n[13] = t, n[14] = c, n[15] = u, n[16] = d) : d = n[16], d;
|
|
2337
2337
|
});
|
|
2338
|
-
|
|
2338
|
+
Pr.displayName = nn.displayName;
|
|
2339
2339
|
//#endregion
|
|
2340
2340
|
//#region src/utils/multi-map.ts
|
|
2341
|
-
var
|
|
2341
|
+
var Fr = /* @__PURE__ */ e(se(), 1), Ir = class {
|
|
2342
2342
|
map = /* @__PURE__ */ new Map();
|
|
2343
2343
|
get(e) {
|
|
2344
2344
|
return this.map.get(e) ?? [];
|
|
@@ -2381,11 +2381,11 @@ var Pr = /* @__PURE__ */ e(te(), 1), Fr = class {
|
|
|
2381
2381
|
};
|
|
2382
2382
|
//#endregion
|
|
2383
2383
|
//#region src/core/ai/context/registry.ts
|
|
2384
|
-
function
|
|
2384
|
+
function Lr(e) {
|
|
2385
2385
|
let t = e.indexOf("://");
|
|
2386
2386
|
if (t !== -1) return e.slice(0, t);
|
|
2387
2387
|
}
|
|
2388
|
-
var
|
|
2388
|
+
var Rr = class {
|
|
2389
2389
|
async getAttachments(e) {
|
|
2390
2390
|
return [];
|
|
2391
2391
|
}
|
|
@@ -2407,7 +2407,7 @@ var Lr = class {
|
|
|
2407
2407
|
section: t?.section || this.title
|
|
2408
2408
|
};
|
|
2409
2409
|
}
|
|
2410
|
-
},
|
|
2410
|
+
}, zr = class {
|
|
2411
2411
|
providers = /* @__PURE__ */ new Set();
|
|
2412
2412
|
register(e) {
|
|
2413
2413
|
return this.providers.add(e), this;
|
|
@@ -2425,14 +2425,14 @@ var Lr = class {
|
|
|
2425
2425
|
return [...this.providers].flatMap((t) => t.parseContextIds(e));
|
|
2426
2426
|
}
|
|
2427
2427
|
findProviderForUri(e) {
|
|
2428
|
-
let t =
|
|
2428
|
+
let t = Lr(e);
|
|
2429
2429
|
if (t) return [...this.providers].find((n) => n.contextType === t && n.getItems().some((t) => t.uri === e));
|
|
2430
2430
|
}
|
|
2431
2431
|
resolveItems(e) {
|
|
2432
2432
|
if (e.length === 0) return [];
|
|
2433
|
-
let t = new
|
|
2433
|
+
let t = new Ir();
|
|
2434
2434
|
for (let n of e) {
|
|
2435
|
-
let e =
|
|
2435
|
+
let e = Lr(n);
|
|
2436
2436
|
e && t.add(e, n);
|
|
2437
2437
|
}
|
|
2438
2438
|
let n = /* @__PURE__ */ new Map();
|
|
@@ -2463,7 +2463,7 @@ var Lr = class {
|
|
|
2463
2463
|
async getAttachmentsForContext(e) {
|
|
2464
2464
|
let t = this.resolveItems(e);
|
|
2465
2465
|
if (t.length === 0) return [];
|
|
2466
|
-
let r = new
|
|
2466
|
+
let r = new Ir();
|
|
2467
2467
|
for (let e of t) {
|
|
2468
2468
|
let t = this.findProviderForUri(e.uri);
|
|
2469
2469
|
t && r.add(t, e);
|
|
@@ -2478,30 +2478,30 @@ var Lr = class {
|
|
|
2478
2478
|
return (await Promise.all(i)).flat();
|
|
2479
2479
|
}
|
|
2480
2480
|
};
|
|
2481
|
-
ae([
|
|
2481
|
+
ae([me()], zr.prototype, "getAllItems", null);
|
|
2482
2482
|
//#endregion
|
|
2483
2483
|
//#region src/core/ai/context/utils.ts
|
|
2484
|
-
function
|
|
2484
|
+
function Br(e) {
|
|
2485
2485
|
return e.replaceAll("<", "<").replaceAll(">", ">");
|
|
2486
2486
|
}
|
|
2487
|
-
function
|
|
2487
|
+
function Vr(e) {
|
|
2488
2488
|
let { type: t, data: n, details: r } = e, i = `<${t}`;
|
|
2489
2489
|
for (let [e, t] of Object.entries(n)) if (t !== void 0) {
|
|
2490
|
-
let n =
|
|
2490
|
+
let n = Br(typeof t == "object" && t ? JSON.stringify(t) : String(t));
|
|
2491
2491
|
i += ` ${e}="${n}"`;
|
|
2492
2492
|
}
|
|
2493
|
-
return i += ">", r && (i +=
|
|
2493
|
+
return i += ">", r && (i += Br(r)), i += `</${t}>`, i;
|
|
2494
2494
|
}
|
|
2495
2495
|
//#endregion
|
|
2496
2496
|
//#region src/core/ai/context/providers/common.ts
|
|
2497
|
-
var
|
|
2497
|
+
var Hr = {
|
|
2498
2498
|
LOCAL_TABLE: 7,
|
|
2499
2499
|
REMOTE_TABLE: 5,
|
|
2500
2500
|
HIGH: 4,
|
|
2501
2501
|
MEDIUM: 3,
|
|
2502
2502
|
CELL_OUTPUT: 2,
|
|
2503
2503
|
LOW: 2
|
|
2504
|
-
},
|
|
2504
|
+
}, Ur = {
|
|
2505
2505
|
ERROR: {
|
|
2506
2506
|
name: "Error",
|
|
2507
2507
|
rank: 1
|
|
@@ -2526,19 +2526,19 @@ var Vr = {
|
|
|
2526
2526
|
name: "File",
|
|
2527
2527
|
rank: 6
|
|
2528
2528
|
}
|
|
2529
|
-
},
|
|
2529
|
+
}, Wr = "datasource", Gr = class extends Rr {
|
|
2530
2530
|
title = "Datasource";
|
|
2531
2531
|
mentionPrefix = "@";
|
|
2532
|
-
contextType =
|
|
2532
|
+
contextType = Wr;
|
|
2533
2533
|
connectionsMap;
|
|
2534
2534
|
dataframes;
|
|
2535
2535
|
constructor(e, t) {
|
|
2536
|
-
super(), this.connectionsMap = e, this.dataframes = [...t.values()].filter((e) =>
|
|
2536
|
+
super(), this.connectionsMap = e, this.dataframes = [...t.values()].filter((e) => ce(e) === "dataframe");
|
|
2537
2537
|
}
|
|
2538
2538
|
getItems() {
|
|
2539
2539
|
return [...this.connectionsMap.values()].map((e) => {
|
|
2540
2540
|
let t = "Database schema.", n = { connection: e };
|
|
2541
|
-
return
|
|
2541
|
+
return re.has(e.name) && (n.tables = this.dataframes, t = "Database schema and the dataframes that can be queried"), e.databases.length === 0 && (n.tables?.length ?? 0) === 0 ? null : {
|
|
2542
2542
|
uri: this.asURI(e.name),
|
|
2543
2543
|
name: e.name,
|
|
2544
2544
|
description: t,
|
|
@@ -2549,10 +2549,10 @@ var Vr = {
|
|
|
2549
2549
|
}
|
|
2550
2550
|
formatContext(e) {
|
|
2551
2551
|
let t = e.data, { name: n, display_name: r, source: i, ...a } = t.connection, o = a;
|
|
2552
|
-
return
|
|
2552
|
+
return re.has(n) || (o = {
|
|
2553
2553
|
...a,
|
|
2554
2554
|
engine_name: n
|
|
2555
|
-
}),
|
|
2555
|
+
}), Vr({
|
|
2556
2556
|
type: this.contextType,
|
|
2557
2557
|
data: {
|
|
2558
2558
|
connection: o,
|
|
@@ -2562,86 +2562,96 @@ var Vr = {
|
|
|
2562
2562
|
}
|
|
2563
2563
|
formatCompletion(e) {
|
|
2564
2564
|
let t = e.data, n = t.connection, r = t.tables, i = n.name;
|
|
2565
|
-
return
|
|
2565
|
+
return re.has(n.name) && (i = "In-Memory"), {
|
|
2566
2566
|
label: `@${i}`,
|
|
2567
2567
|
displayLabel: i,
|
|
2568
|
-
detail:
|
|
2569
|
-
boost:
|
|
2568
|
+
detail: xe(n.dialect),
|
|
2569
|
+
boost: Hr.MEDIUM,
|
|
2570
2570
|
type: this.contextType,
|
|
2571
|
-
section:
|
|
2571
|
+
section: Ur.DATA_SOURCES,
|
|
2572
2572
|
info: () => {
|
|
2573
2573
|
let e = document.createElement("div");
|
|
2574
|
-
return e.classList.add("mo-cm-tooltip", "docs-documentation"), (0,
|
|
2574
|
+
return e.classList.add("mo-cm-tooltip", "docs-documentation"), (0, Fr.createRoot)(e).render(he(n, r)), e;
|
|
2575
2575
|
}
|
|
2576
2576
|
};
|
|
2577
2577
|
}
|
|
2578
2578
|
};
|
|
2579
|
-
function
|
|
2580
|
-
let n = t.get(
|
|
2579
|
+
function Kr(e, t) {
|
|
2580
|
+
let n = t.get(fe(e))?.code;
|
|
2581
2581
|
if (!n || n.trim() === "") return null;
|
|
2582
|
-
let [r, i, a] =
|
|
2583
|
-
return o ? `@${
|
|
2582
|
+
let [r, i, a] = le.sql.transformIn(n), o = t.get(be).connectionsMap.get(a.engine);
|
|
2583
|
+
return o ? `@${Wr}://${o.name}` : null;
|
|
2584
2584
|
}
|
|
2585
|
-
function
|
|
2586
|
-
let n =
|
|
2585
|
+
function qr(e, t) {
|
|
2586
|
+
let n = Kr(e, t);
|
|
2587
2587
|
if (!n) return null;
|
|
2588
|
-
let r = t.get(
|
|
2588
|
+
let r = t.get(be).connectionsMap, i = new Gr(r, t.get(ne)), a = n.slice(1), o = i.getItems().find((e) => e.uri === a);
|
|
2589
2589
|
return o ? i.formatContext(o) : null;
|
|
2590
2590
|
}
|
|
2591
2591
|
//#endregion
|
|
2592
|
-
//#region src/core/
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
r({
|
|
2608
|
-
cellId: e,
|
|
2609
|
-
config: n
|
|
2610
|
-
}), ve().saveCellConfig({ configs: { [e]: n } }).catch(Xr);
|
|
2611
|
-
}, t[9] = e, t[10] = d, t[11] = r, t[12] = p) : p = t[12];
|
|
2612
|
-
let m = Ke(p), h;
|
|
2613
|
-
return t[13] !== f || t[14] !== m ? (h = [f, m], t[13] = f, t[14] = m, t[15] = h) : h = t[15], h;
|
|
2614
|
-
}
|
|
2615
|
-
function Xr(e) {
|
|
2616
|
-
n.error("Failed to save expand_output config", e);
|
|
2617
|
-
}
|
|
2618
|
-
function Zr(e) {
|
|
2619
|
-
return e?.config.expand_output ?? !1;
|
|
2592
|
+
//#region src/core/notebook/document/select.ts
|
|
2593
|
+
function Jr(e, t, n) {
|
|
2594
|
+
return ve(e, (e) => e?.cells.get(t)?.[n], Ye);
|
|
2595
|
+
}
|
|
2596
|
+
//#endregion
|
|
2597
|
+
//#region src/core/notebook/document/hooks.tsx
|
|
2598
|
+
var Yr = (0, O.createContext)(null);
|
|
2599
|
+
function Xr() {
|
|
2600
|
+
let e = (0, O.useContext)(Yr);
|
|
2601
|
+
if (e === null) throw Error("Document hooks require a DocumentProvider");
|
|
2602
|
+
return e;
|
|
2603
|
+
}
|
|
2604
|
+
function Zr(e, t) {
|
|
2605
|
+
let n = (0, k.c)(4), { documentAtom: r } = Xr(), i;
|
|
2606
|
+
return n[0] !== r || n[1] !== t || n[2] !== e ? (i = Jr(r, e, t), n[0] = r, n[1] = t, n[2] = e, n[3] = i) : i = n[3], D(i);
|
|
2620
2607
|
}
|
|
2621
2608
|
function Qr(e) {
|
|
2622
|
-
|
|
2609
|
+
return Zr(e, "config");
|
|
2610
|
+
}
|
|
2611
|
+
function $r() {
|
|
2612
|
+
return qe(Xr().editAtom);
|
|
2613
|
+
}
|
|
2614
|
+
//#endregion
|
|
2615
|
+
//#region src/core/cells/outputs.ts
|
|
2616
|
+
var ei = {}, ti = {};
|
|
2617
|
+
function ni(e) {
|
|
2618
|
+
let t = (0, k.c)(14), { mode: n } = D(Oe), r = $r(), i = Qr(e)?.expand_output ?? !1, a;
|
|
2619
|
+
t[0] !== e || t[1] !== i ? (a = () => ei[e] ?? i, t[0] = e, t[1] = i, t[2] = a) : a = t[2];
|
|
2620
|
+
let [o, s] = (0, O.useState)(a), c, l;
|
|
2621
|
+
t[3] !== e || t[4] !== o ? (c = () => {
|
|
2622
|
+
ei[e] = o;
|
|
2623
|
+
}, l = [e, o], t[3] = e, t[4] = o, t[5] = c, t[6] = l) : (c = t[5], l = t[6]), (0, O.useEffect)(c, l);
|
|
2624
|
+
let u = n === "edit", d = u ? i : o, f;
|
|
2625
|
+
t[7] !== e || t[8] !== r || t[9] !== u ? (f = (t) => {
|
|
2626
|
+
s(t), !(!u || e === "__scratch__") && r((n) => n.updateConfig(e, { expand_output: t }));
|
|
2627
|
+
}, t[7] = e, t[8] = r, t[9] = u, t[10] = f) : f = t[10];
|
|
2628
|
+
let p = Ge(f), m;
|
|
2629
|
+
return t[11] !== d || t[12] !== p ? (m = [d, p], t[11] = d, t[12] = p, t[13] = m) : m = t[13], m;
|
|
2630
|
+
}
|
|
2631
|
+
function ri(e) {
|
|
2632
|
+
let t = (0, k.c)(6), [n, r] = (0, O.useState)(ti[e] ?? !1), i, a;
|
|
2623
2633
|
t[0] !== e || t[1] !== n ? (i = () => {
|
|
2624
|
-
|
|
2634
|
+
ti[e] = n;
|
|
2625
2635
|
}, a = [e, n], t[0] = e, t[1] = n, t[2] = i, t[3] = a) : (i = t[2], a = t[3]), (0, O.useEffect)(i, a);
|
|
2626
2636
|
let o;
|
|
2627
2637
|
return t[4] === n ? o = t[5] : (o = [n, r], t[4] = n, t[5] = o), o;
|
|
2628
2638
|
}
|
|
2629
|
-
function
|
|
2639
|
+
function ii(e) {
|
|
2630
2640
|
return e == null || e.data == null || e.data === "";
|
|
2631
2641
|
}
|
|
2632
2642
|
//#endregion
|
|
2633
2643
|
//#region src/plugins/impl/code/LazyAnyLanguageCodeMirror.tsx
|
|
2634
|
-
var
|
|
2635
|
-
function
|
|
2644
|
+
var ai = (0, O.lazy)(() => import("./any-language-editor-BVFHDDQ3.js")), oi = [Qe.lineWrapping];
|
|
2645
|
+
function si(e, t) {
|
|
2636
2646
|
return e ? e === "python" ? {
|
|
2637
2647
|
language: e,
|
|
2638
2648
|
code: t
|
|
2639
2649
|
} : e === "sql" ? {
|
|
2640
2650
|
language: "python",
|
|
2641
|
-
code:
|
|
2651
|
+
code: ue.fromQuery(t)
|
|
2642
2652
|
} : e === "markdown" ? {
|
|
2643
2653
|
language: "python",
|
|
2644
|
-
code:
|
|
2654
|
+
code: de.fromMarkdown(t)
|
|
2645
2655
|
} : e === "shell" || e === "bash" ? {
|
|
2646
2656
|
language: "python",
|
|
2647
2657
|
code: `import subprocess\nsubprocess.run("${t}")`
|
|
@@ -2653,22 +2663,21 @@ function ni(e, t) {
|
|
|
2653
2663
|
code: t
|
|
2654
2664
|
};
|
|
2655
2665
|
}
|
|
2656
|
-
var
|
|
2657
|
-
let t = (0, k.c)(9), { code: n, language: r } = e, {
|
|
2666
|
+
var ci = (e) => {
|
|
2667
|
+
let t = (0, k.c)(9), { code: n, language: r } = e, { createCell: i } = ge(), a = te(), s = D(Xe), c;
|
|
2658
2668
|
t[0] !== s || t[1] !== n || t[2] !== i || t[3] !== r || t[4] !== a ? (c = () => {
|
|
2659
|
-
let e =
|
|
2669
|
+
let e = si(r, n);
|
|
2660
2670
|
r === "sql" && ie({
|
|
2661
2671
|
autoInstantiate: s,
|
|
2662
|
-
|
|
2672
|
+
createCell: i,
|
|
2663
2673
|
fromCellId: a
|
|
2664
2674
|
}), i({
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
cellId: a ?? "__end__"
|
|
2675
|
+
after: a,
|
|
2676
|
+
code: e.code
|
|
2668
2677
|
});
|
|
2669
2678
|
}, t[0] = s, t[1] = n, t[2] = i, t[3] = r, t[4] = a, t[5] = c) : c = t[5];
|
|
2670
2679
|
let l = c, u;
|
|
2671
|
-
t[6] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ (0, j.jsx)(
|
|
2680
|
+
t[6] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ (0, j.jsx)(mt, { className: "ml-2 h-4 w-4" }), t[6] = u) : u = t[6];
|
|
2672
2681
|
let d;
|
|
2673
2682
|
return t[7] === l ? d = t[8] : (d = /* @__PURE__ */ (0, j.jsxs)(o, {
|
|
2674
2683
|
size: "xs",
|
|
@@ -2676,32 +2685,32 @@ var ri = (e) => {
|
|
|
2676
2685
|
onClick: l,
|
|
2677
2686
|
children: ["Add to Notebook", u]
|
|
2678
2687
|
}), t[7] = l, t[8] = d), d;
|
|
2679
|
-
},
|
|
2680
|
-
let t = (0, k.c)(17), { code: n, language: r } = e, { theme: i } =
|
|
2688
|
+
}, li = (e) => {
|
|
2689
|
+
let t = (0, k.c)(17), { code: n, language: r } = e, { theme: i } = Ze(), [a, o] = (0, O.useState)(n);
|
|
2681
2690
|
a !== n && o(n);
|
|
2682
2691
|
let s;
|
|
2683
2692
|
t[0] === a ? s = t[1] : (s = async () => {
|
|
2684
2693
|
await u(a);
|
|
2685
2694
|
}, t[0] = a, t[1] = s);
|
|
2686
2695
|
let c = s, l = i === "dark" ? "dark" : "light", d;
|
|
2687
|
-
t[2] !== r || t[3] !== l || t[4] !== a ? (d = /* @__PURE__ */ (0, j.jsx)(O.Suspense, { children: /* @__PURE__ */ (0, j.jsx)(
|
|
2696
|
+
t[2] !== r || t[3] !== l || t[4] !== a ? (d = /* @__PURE__ */ (0, j.jsx)(O.Suspense, { children: /* @__PURE__ */ (0, j.jsx)(ai, {
|
|
2688
2697
|
theme: l,
|
|
2689
2698
|
language: r,
|
|
2690
2699
|
hideUnsupportedLanguageErrors: !0,
|
|
2691
2700
|
className: "cm border rounded overflow-hidden",
|
|
2692
|
-
extensions:
|
|
2701
|
+
extensions: oi,
|
|
2693
2702
|
value: a,
|
|
2694
2703
|
onChange: o
|
|
2695
2704
|
}) }), t[2] = r, t[3] = l, t[4] = a, t[5] = d) : d = t[5];
|
|
2696
2705
|
let f;
|
|
2697
|
-
t[6] === c ? f = t[7] : (f = /* @__PURE__ */ (0, j.jsx)(
|
|
2706
|
+
t[6] === c ? f = t[7] : (f = /* @__PURE__ */ (0, j.jsx)(ui, {
|
|
2698
2707
|
size: "xs",
|
|
2699
2708
|
variant: "outline",
|
|
2700
2709
|
onClick: c,
|
|
2701
2710
|
children: "Copy"
|
|
2702
2711
|
}), t[6] = c, t[7] = f);
|
|
2703
2712
|
let p;
|
|
2704
|
-
t[8] !== r || t[9] !== a ? (p = /* @__PURE__ */ (0, j.jsx)(
|
|
2713
|
+
t[8] !== r || t[9] !== a ? (p = /* @__PURE__ */ (0, j.jsx)(ci, {
|
|
2705
2714
|
code: a,
|
|
2706
2715
|
language: r
|
|
2707
2716
|
}), t[8] = r, t[9] = a, t[10] = p) : p = t[10];
|
|
@@ -2715,7 +2724,7 @@ var ri = (e) => {
|
|
|
2715
2724
|
className: "relative",
|
|
2716
2725
|
children: [d, m]
|
|
2717
2726
|
}), t[14] = d, t[15] = m, t[16] = h) : h = t[16], h;
|
|
2718
|
-
},
|
|
2727
|
+
}, ui = (e) => {
|
|
2719
2728
|
let t = (0, k.c)(9), n, r;
|
|
2720
2729
|
t[0] === e ? (n = t[1], r = t[2]) : ({onClick: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
2721
2730
|
let [i, a] = (0, O.useState)(!1), s;
|
|
@@ -2728,23 +2737,23 @@ var ri = (e) => {
|
|
|
2728
2737
|
onClick: s,
|
|
2729
2738
|
children: c
|
|
2730
2739
|
}), t[5] = r, t[6] = s, t[7] = c, t[8] = l) : l = t[8], l;
|
|
2731
|
-
},
|
|
2740
|
+
}, di = {
|
|
2732
2741
|
...p,
|
|
2733
2742
|
attributes: {
|
|
2734
2743
|
...p.attributes,
|
|
2735
2744
|
"*": [...p.attributes?.["*"] ?? [], "className"]
|
|
2736
2745
|
}
|
|
2737
|
-
},
|
|
2746
|
+
}, fi = Object.values({
|
|
2738
2747
|
...g,
|
|
2739
|
-
sanitize: [h,
|
|
2740
|
-
}),
|
|
2748
|
+
sanitize: [h, di]
|
|
2749
|
+
}), pi = { code: ({ children: e, className: t }) => {
|
|
2741
2750
|
let n = t?.replace("language-", "");
|
|
2742
2751
|
if (n && typeof e == "string") {
|
|
2743
2752
|
let t = e.trim();
|
|
2744
2753
|
return /* @__PURE__ */ (0, j.jsxs)("div", { children: [/* @__PURE__ */ (0, j.jsx)("div", {
|
|
2745
2754
|
className: "text-xs text-muted-foreground pl-1",
|
|
2746
2755
|
children: n
|
|
2747
|
-
}), /* @__PURE__ */ (0, j.jsx)(
|
|
2756
|
+
}), /* @__PURE__ */ (0, j.jsx)(li, {
|
|
2748
2757
|
code: t,
|
|
2749
2758
|
language: n
|
|
2750
2759
|
})] });
|
|
@@ -2753,23 +2762,23 @@ var ri = (e) => {
|
|
|
2753
2762
|
className: t,
|
|
2754
2763
|
children: e
|
|
2755
2764
|
});
|
|
2756
|
-
} },
|
|
2757
|
-
let { data: e } =
|
|
2765
|
+
} }, mi, hi = () => {
|
|
2766
|
+
let { data: e } = $e(async () => mi || (mi = { math: (await import("./dist-Lm-D-Vr6.js")).math }, mi), []);
|
|
2758
2767
|
return e;
|
|
2759
|
-
},
|
|
2760
|
-
let t = (0, k.c)(3), { content: n } = e, r =
|
|
2768
|
+
}, gi = (0, O.memo)((e) => {
|
|
2769
|
+
let t = (0, k.c)(3), { content: n } = e, r = hi(), i;
|
|
2761
2770
|
return t[0] !== n || t[1] !== r ? (i = /* @__PURE__ */ (0, j.jsx)(f, {
|
|
2762
|
-
components:
|
|
2771
|
+
components: pi,
|
|
2763
2772
|
plugins: r,
|
|
2764
|
-
rehypePlugins:
|
|
2773
|
+
rehypePlugins: fi,
|
|
2765
2774
|
className: "mo-markdown-renderer",
|
|
2766
2775
|
children: n
|
|
2767
2776
|
}), t[0] = n, t[1] = r, t[2] = i) : i = t[2], i;
|
|
2768
2777
|
});
|
|
2769
|
-
|
|
2778
|
+
gi.displayName = "MarkdownRenderer";
|
|
2770
2779
|
//#endregion
|
|
2771
2780
|
//#region src/components/icons/spinner.tsx
|
|
2772
|
-
var
|
|
2781
|
+
var _i = a("animate-spin", {
|
|
2773
2782
|
variants: {
|
|
2774
2783
|
centered: { true: "m-auto" },
|
|
2775
2784
|
size: {
|
|
@@ -2780,36 +2789,36 @@ var fi = a("animate-spin", {
|
|
|
2780
2789
|
}
|
|
2781
2790
|
},
|
|
2782
2791
|
defaultVariants: { size: "medium" }
|
|
2783
|
-
}),
|
|
2792
|
+
}), vi = O.forwardRef((e, t) => {
|
|
2784
2793
|
let n = (0, k.c)(13), i, a, o, s;
|
|
2785
2794
|
if (n[0] !== e) {
|
|
2786
2795
|
let { className: t, children: r, centered: c, size: l, ...u } = e;
|
|
2787
2796
|
a = t, i = c, s = l, o = u, n[0] = e, n[1] = i, n[2] = a, n[3] = o, n[4] = s;
|
|
2788
2797
|
} else i = n[1], a = n[2], o = n[3], s = n[4];
|
|
2789
2798
|
let c;
|
|
2790
|
-
n[5] !== i || n[6] !== a || n[7] !== s ? (c = r(
|
|
2799
|
+
n[5] !== i || n[6] !== a || n[7] !== s ? (c = r(_i({
|
|
2791
2800
|
centered: i,
|
|
2792
2801
|
size: s
|
|
2793
2802
|
}), a), n[5] = i, n[6] = a, n[7] = s, n[8] = c) : c = n[8];
|
|
2794
2803
|
let l;
|
|
2795
|
-
return n[9] !== o || n[10] !== t || n[11] !== c ? (l = /* @__PURE__ */ (0, j.jsx)(
|
|
2804
|
+
return n[9] !== o || n[10] !== t || n[11] !== c ? (l = /* @__PURE__ */ (0, j.jsx)(ht, {
|
|
2796
2805
|
ref: t,
|
|
2797
2806
|
className: c,
|
|
2798
2807
|
strokeWidth: 1.5,
|
|
2799
2808
|
...o
|
|
2800
2809
|
}), n[9] = o, n[10] = t, n[11] = c, n[12] = l) : l = n[12], l;
|
|
2801
2810
|
});
|
|
2802
|
-
|
|
2811
|
+
vi.displayName = "Spinner";
|
|
2803
2812
|
//#endregion
|
|
2804
2813
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/util.js
|
|
2805
|
-
function
|
|
2814
|
+
function yi(e, t) {
|
|
2806
2815
|
if (e.match(/^[a-z]+:\/\//i)) return e;
|
|
2807
2816
|
if (e.match(/^\/\//)) return window.location.protocol + e;
|
|
2808
2817
|
if (e.match(/^[a-z]+:/i)) return e;
|
|
2809
2818
|
let n = document.implementation.createHTMLDocument(), r = n.createElement("base"), i = n.createElement("a");
|
|
2810
2819
|
return n.head.appendChild(r), n.body.appendChild(i), t && (r.href = t), i.href = e, i.href;
|
|
2811
2820
|
}
|
|
2812
|
-
var
|
|
2821
|
+
var bi = (() => {
|
|
2813
2822
|
let e = 0, t = () => `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4);
|
|
2814
2823
|
return () => (e += 1, `u${t()}${e}`);
|
|
2815
2824
|
})();
|
|
@@ -2819,28 +2828,28 @@ function K(e) {
|
|
|
2819
2828
|
return t;
|
|
2820
2829
|
}
|
|
2821
2830
|
var q = null;
|
|
2822
|
-
function
|
|
2831
|
+
function xi(e = {}) {
|
|
2823
2832
|
return q || (e.includeStyleProperties ? (q = e.includeStyleProperties, q) : (q = K(window.getComputedStyle(document.documentElement)), q));
|
|
2824
2833
|
}
|
|
2825
2834
|
function J(e, t) {
|
|
2826
2835
|
let n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
|
|
2827
2836
|
return n ? parseFloat(n.replace("px", "")) : 0;
|
|
2828
2837
|
}
|
|
2829
|
-
function
|
|
2838
|
+
function Si(e) {
|
|
2830
2839
|
let t = J(e, "border-left-width"), n = J(e, "border-right-width");
|
|
2831
2840
|
return e.clientWidth + t + n;
|
|
2832
2841
|
}
|
|
2833
|
-
function
|
|
2842
|
+
function Ci(e) {
|
|
2834
2843
|
let t = J(e, "border-top-width"), n = J(e, "border-bottom-width");
|
|
2835
2844
|
return e.clientHeight + t + n;
|
|
2836
2845
|
}
|
|
2837
|
-
function
|
|
2846
|
+
function wi(e, t = {}) {
|
|
2838
2847
|
return {
|
|
2839
|
-
width: t.width ||
|
|
2840
|
-
height: t.height ||
|
|
2848
|
+
width: t.width || Si(e),
|
|
2849
|
+
height: t.height || Ci(e)
|
|
2841
2850
|
};
|
|
2842
2851
|
}
|
|
2843
|
-
function
|
|
2852
|
+
function Ti() {
|
|
2844
2853
|
let e, t;
|
|
2845
2854
|
try {
|
|
2846
2855
|
t = process;
|
|
@@ -2849,7 +2858,7 @@ function bi() {
|
|
|
2849
2858
|
return n && (e = parseInt(n, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
|
|
2850
2859
|
}
|
|
2851
2860
|
var Y = 16384;
|
|
2852
|
-
function
|
|
2861
|
+
function Ei(e) {
|
|
2853
2862
|
(e.width > Y || e.height > Y) && (e.width > Y && e.height > Y ? e.width > e.height ? (e.height *= Y / e.width, e.width = Y) : (e.width *= Y / e.height, e.height = Y) : e.width > Y ? (e.height *= Y / e.width, e.width = Y) : (e.width *= Y / e.height, e.height = Y));
|
|
2854
2863
|
}
|
|
2855
2864
|
function X(e) {
|
|
@@ -2862,12 +2871,12 @@ function X(e) {
|
|
|
2862
2871
|
}, r.onerror = n, r.crossOrigin = "anonymous", r.decoding = "async", r.src = e;
|
|
2863
2872
|
});
|
|
2864
2873
|
}
|
|
2865
|
-
async function
|
|
2874
|
+
async function Di(e) {
|
|
2866
2875
|
return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
|
|
2867
2876
|
}
|
|
2868
|
-
async function
|
|
2877
|
+
async function Oi(e, t, n) {
|
|
2869
2878
|
let r = "http://www.w3.org/2000/svg", i = document.createElementNS(r, "svg"), a = document.createElementNS(r, "foreignObject");
|
|
2870
|
-
return i.setAttribute("width", `${t}`), i.setAttribute("height", `${n}`), i.setAttribute("viewBox", `0 0 ${t} ${n}`), a.setAttribute("width", "100%"), a.setAttribute("height", "100%"), a.setAttribute("x", "0"), a.setAttribute("y", "0"), a.setAttribute("externalResourcesRequired", "true"), i.appendChild(a), a.appendChild(e),
|
|
2879
|
+
return i.setAttribute("width", `${t}`), i.setAttribute("height", `${n}`), i.setAttribute("viewBox", `0 0 ${t} ${n}`), a.setAttribute("width", "100%"), a.setAttribute("height", "100%"), a.setAttribute("x", "0"), a.setAttribute("y", "0"), a.setAttribute("externalResourcesRequired", "true"), i.appendChild(a), a.appendChild(e), Di(i);
|
|
2871
2880
|
}
|
|
2872
2881
|
var Z = (e, t) => {
|
|
2873
2882
|
if (e instanceof t) return !0;
|
|
@@ -2876,66 +2885,66 @@ var Z = (e, t) => {
|
|
|
2876
2885
|
};
|
|
2877
2886
|
//#endregion
|
|
2878
2887
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/clone-pseudos.js
|
|
2879
|
-
function
|
|
2888
|
+
function ki(e) {
|
|
2880
2889
|
let t = e.getPropertyValue("content");
|
|
2881
2890
|
return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
|
|
2882
2891
|
}
|
|
2883
|
-
function
|
|
2884
|
-
return
|
|
2892
|
+
function Ai(e, t) {
|
|
2893
|
+
return xi(t).map((t) => `${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t) ? " !important" : ""};`).join(" ");
|
|
2885
2894
|
}
|
|
2886
|
-
function
|
|
2887
|
-
let i = `.${e}:${t}`, a = n.cssText ?
|
|
2895
|
+
function ji(e, t, n, r) {
|
|
2896
|
+
let i = `.${e}:${t}`, a = n.cssText ? ki(n) : Ai(n, r);
|
|
2888
2897
|
return document.createTextNode(`${i}{${a}}`);
|
|
2889
2898
|
}
|
|
2890
|
-
function
|
|
2899
|
+
function Mi(e, t, n, r) {
|
|
2891
2900
|
let i = window.getComputedStyle(e, n), a = i.getPropertyValue("content");
|
|
2892
2901
|
if (a === "" || a === "none") return;
|
|
2893
|
-
let o =
|
|
2902
|
+
let o = bi();
|
|
2894
2903
|
try {
|
|
2895
2904
|
t.className = `${t.className} ${o}`;
|
|
2896
2905
|
} catch {
|
|
2897
2906
|
return;
|
|
2898
2907
|
}
|
|
2899
2908
|
let s = document.createElement("style");
|
|
2900
|
-
s.appendChild(
|
|
2909
|
+
s.appendChild(ji(o, n, i, r)), t.appendChild(s);
|
|
2901
2910
|
}
|
|
2902
|
-
function
|
|
2903
|
-
|
|
2911
|
+
function Ni(e, t, n) {
|
|
2912
|
+
Mi(e, t, ":before", n), Mi(e, t, ":after", n);
|
|
2904
2913
|
}
|
|
2905
2914
|
//#endregion
|
|
2906
2915
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/mimes.js
|
|
2907
|
-
var
|
|
2908
|
-
woff:
|
|
2909
|
-
woff2:
|
|
2916
|
+
var Pi = "application/font-woff", Fi = "image/jpeg", Ii = {
|
|
2917
|
+
woff: Pi,
|
|
2918
|
+
woff2: Pi,
|
|
2910
2919
|
ttf: "application/font-truetype",
|
|
2911
2920
|
eot: "application/vnd.ms-fontobject",
|
|
2912
2921
|
png: "image/png",
|
|
2913
|
-
jpg:
|
|
2914
|
-
jpeg:
|
|
2922
|
+
jpg: Fi,
|
|
2923
|
+
jpeg: Fi,
|
|
2915
2924
|
gif: "image/gif",
|
|
2916
2925
|
tiff: "image/tiff",
|
|
2917
2926
|
svg: "image/svg+xml",
|
|
2918
2927
|
webp: "image/webp"
|
|
2919
2928
|
};
|
|
2920
|
-
function
|
|
2929
|
+
function Li(e) {
|
|
2921
2930
|
let t = /\.([^./]*?)$/g.exec(e);
|
|
2922
2931
|
return t ? t[1] : "";
|
|
2923
2932
|
}
|
|
2924
|
-
function
|
|
2925
|
-
return
|
|
2933
|
+
function Ri(e) {
|
|
2934
|
+
return Ii[Li(e).toLowerCase()] || "";
|
|
2926
2935
|
}
|
|
2927
2936
|
//#endregion
|
|
2928
2937
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/dataurl.js
|
|
2929
|
-
function
|
|
2938
|
+
function zi(e) {
|
|
2930
2939
|
return e.split(/,/)[1];
|
|
2931
2940
|
}
|
|
2932
|
-
function
|
|
2941
|
+
function Bi(e) {
|
|
2933
2942
|
return e.search(/^(data:)/) !== -1;
|
|
2934
2943
|
}
|
|
2935
|
-
function
|
|
2944
|
+
function Vi(e, t) {
|
|
2936
2945
|
return `data:${t};base64,${e}`;
|
|
2937
2946
|
}
|
|
2938
|
-
async function
|
|
2947
|
+
async function Hi(e, t, n) {
|
|
2939
2948
|
let r = await fetch(e, t);
|
|
2940
2949
|
if (r.status === 404) throw Error(`Resource "${r.url}" not found`);
|
|
2941
2950
|
let i = await r.blob();
|
|
@@ -2953,53 +2962,53 @@ async function Li(e, t, n) {
|
|
|
2953
2962
|
}, a.readAsDataURL(i);
|
|
2954
2963
|
});
|
|
2955
2964
|
}
|
|
2956
|
-
var
|
|
2957
|
-
function
|
|
2965
|
+
var Ui = {};
|
|
2966
|
+
function Wi(e, t, n) {
|
|
2958
2967
|
let r = e.replace(/\?.*/, "");
|
|
2959
2968
|
return n && (r = e), /ttf|otf|eot|woff2?/i.test(r) && (r = r.replace(/.*\//, "")), t ? `[${t}]${r}` : r;
|
|
2960
2969
|
}
|
|
2961
|
-
async function
|
|
2962
|
-
let r =
|
|
2963
|
-
if (
|
|
2970
|
+
async function Gi(e, t, n) {
|
|
2971
|
+
let r = Wi(e, t, n.includeQueryParams);
|
|
2972
|
+
if (Ui[r] != null) return Ui[r];
|
|
2964
2973
|
n.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
|
|
2965
2974
|
let i;
|
|
2966
2975
|
try {
|
|
2967
|
-
i =
|
|
2976
|
+
i = Vi(await Hi(e, n.fetchRequestInit, ({ res: e, result: n }) => (t ||= e.headers.get("Content-Type") || "", zi(n))), t);
|
|
2968
2977
|
} catch (t) {
|
|
2969
2978
|
i = n.imagePlaceholder || "";
|
|
2970
2979
|
let r = `Failed to fetch resource: ${e}`;
|
|
2971
2980
|
t && (r = typeof t == "string" ? t : t.message), r && console.warn(r);
|
|
2972
2981
|
}
|
|
2973
|
-
return
|
|
2982
|
+
return Ui[r] = i, i;
|
|
2974
2983
|
}
|
|
2975
2984
|
//#endregion
|
|
2976
2985
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/clone-node.js
|
|
2977
|
-
async function
|
|
2986
|
+
async function Ki(e) {
|
|
2978
2987
|
let t = e.toDataURL();
|
|
2979
2988
|
return t === "data:," ? e.cloneNode(!1) : X(t);
|
|
2980
2989
|
}
|
|
2981
|
-
async function
|
|
2990
|
+
async function qi(e, t) {
|
|
2982
2991
|
if (e.currentSrc) {
|
|
2983
2992
|
let t = document.createElement("canvas"), n = t.getContext("2d");
|
|
2984
2993
|
return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height), X(t.toDataURL());
|
|
2985
2994
|
}
|
|
2986
2995
|
let n = e.poster;
|
|
2987
|
-
return X(await
|
|
2996
|
+
return X(await Gi(n, Ri(n), t));
|
|
2988
2997
|
}
|
|
2989
|
-
async function
|
|
2998
|
+
async function Ji(e, t) {
|
|
2990
2999
|
try {
|
|
2991
3000
|
if (e?.contentDocument?.body) return await Q(e.contentDocument.body, t, !0);
|
|
2992
3001
|
} catch {}
|
|
2993
3002
|
return e.cloneNode(!1);
|
|
2994
3003
|
}
|
|
2995
|
-
async function
|
|
2996
|
-
return Z(e, HTMLCanvasElement) ?
|
|
3004
|
+
async function Yi(e, t) {
|
|
3005
|
+
return Z(e, HTMLCanvasElement) ? Ki(e) : Z(e, HTMLVideoElement) ? qi(e, t) : Z(e, HTMLIFrameElement) ? Ji(e, t) : e.cloneNode(Zi(e));
|
|
2997
3006
|
}
|
|
2998
|
-
var
|
|
2999
|
-
async function
|
|
3000
|
-
if (
|
|
3007
|
+
var Xi = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", Zi = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
|
|
3008
|
+
async function Qi(e, t, n) {
|
|
3009
|
+
if (Zi(t)) return t;
|
|
3001
3010
|
let r = [];
|
|
3002
|
-
if (
|
|
3011
|
+
if (Xi(e) && e.assignedNodes) r = K(e.assignedNodes());
|
|
3003
3012
|
else if (Z(e, HTMLIFrameElement)) try {
|
|
3004
3013
|
e.contentDocument?.body && (r = K(e.contentDocument.body.childNodes));
|
|
3005
3014
|
} catch {}
|
|
@@ -3008,28 +3017,28 @@ async function qi(e, t, n) {
|
|
|
3008
3017
|
e && t.appendChild(e);
|
|
3009
3018
|
}), Promise.resolve()), t;
|
|
3010
3019
|
}
|
|
3011
|
-
function
|
|
3020
|
+
function $i(e, t, n) {
|
|
3012
3021
|
let r = t.style;
|
|
3013
3022
|
if (!r) return;
|
|
3014
3023
|
let i = window.getComputedStyle(e);
|
|
3015
|
-
i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) :
|
|
3024
|
+
i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) : xi(n).forEach((n) => {
|
|
3016
3025
|
let a = i.getPropertyValue(n);
|
|
3017
3026
|
n === "font-size" && a.endsWith("px") && (a = `${Math.floor(parseFloat(a.substring(0, a.length - 2))) - .1}px`), Z(e, HTMLIFrameElement) && n === "display" && a === "inline" && (a = "block"), n === "d" && t.getAttribute("d") && (a = `path(${t.getAttribute("d")})`), r.setProperty(n, a, i.getPropertyPriority(n));
|
|
3018
3027
|
});
|
|
3019
3028
|
}
|
|
3020
|
-
function
|
|
3029
|
+
function ea(e, t) {
|
|
3021
3030
|
Z(e, HTMLTextAreaElement) && (t.innerHTML = e.value), Z(e, HTMLInputElement) && t.setAttribute("value", e.value);
|
|
3022
3031
|
}
|
|
3023
|
-
function
|
|
3032
|
+
function ta(e, t) {
|
|
3024
3033
|
if (Z(e, HTMLSelectElement)) {
|
|
3025
3034
|
let n = t, r = Array.from(n.children).find((t) => e.value === t.getAttribute("value"));
|
|
3026
3035
|
r && r.setAttribute("selected", "");
|
|
3027
3036
|
}
|
|
3028
3037
|
}
|
|
3029
|
-
function
|
|
3030
|
-
return Z(t, Element) && (
|
|
3038
|
+
function na(e, t, n) {
|
|
3039
|
+
return Z(t, Element) && ($i(e, t, n), Ni(e, t, n), ea(e, t), ta(e, t)), t;
|
|
3031
3040
|
}
|
|
3032
|
-
async function
|
|
3041
|
+
async function ra(e, t) {
|
|
3033
3042
|
let n = e.querySelectorAll ? e.querySelectorAll("use") : [];
|
|
3034
3043
|
if (n.length === 0) return e;
|
|
3035
3044
|
let r = {};
|
|
@@ -3052,60 +3061,60 @@ async function Qi(e, t) {
|
|
|
3052
3061
|
return e;
|
|
3053
3062
|
}
|
|
3054
3063
|
async function Q(e, t, n) {
|
|
3055
|
-
return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((e) =>
|
|
3064
|
+
return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((e) => Yi(e, t)).then((n) => Qi(e, n, t)).then((n) => na(e, n, t)).then((e) => ra(e, t));
|
|
3056
3065
|
}
|
|
3057
3066
|
//#endregion
|
|
3058
3067
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/embed-resources.js
|
|
3059
|
-
var
|
|
3060
|
-
function
|
|
3068
|
+
var ia = /url\((['"]?)([^'"]+?)\1\)/g, aa = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, oa = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
3069
|
+
function sa(e) {
|
|
3061
3070
|
let t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
|
|
3062
3071
|
return RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
|
|
3063
3072
|
}
|
|
3064
|
-
function
|
|
3073
|
+
function ca(e) {
|
|
3065
3074
|
let t = [];
|
|
3066
|
-
return e.replace(
|
|
3075
|
+
return e.replace(ia, (e, n, r) => (t.push(r), e)), t.filter((e) => !Bi(e));
|
|
3067
3076
|
}
|
|
3068
|
-
async function
|
|
3077
|
+
async function la(e, t, n, r, i) {
|
|
3069
3078
|
try {
|
|
3070
|
-
let a = n ?
|
|
3071
|
-
return s = i ?
|
|
3079
|
+
let a = n ? yi(t, n) : t, o = Ri(t), s;
|
|
3080
|
+
return s = i ? Vi(await i(a), o) : await Gi(a, o, r), e.replace(sa(t), `$1${s}$3`);
|
|
3072
3081
|
} catch {}
|
|
3073
3082
|
return e;
|
|
3074
3083
|
}
|
|
3075
|
-
function
|
|
3076
|
-
return t ? e.replace(
|
|
3084
|
+
function ua(e, { preferredFontFormat: t }) {
|
|
3085
|
+
return t ? e.replace(oa, (e) => {
|
|
3077
3086
|
for (;;) {
|
|
3078
|
-
let [n, , r] =
|
|
3087
|
+
let [n, , r] = aa.exec(e) || [];
|
|
3079
3088
|
if (!r) return "";
|
|
3080
3089
|
if (r === t) return `src: ${n};`;
|
|
3081
3090
|
}
|
|
3082
3091
|
}) : e;
|
|
3083
3092
|
}
|
|
3084
|
-
function
|
|
3085
|
-
return e.search(
|
|
3093
|
+
function da(e) {
|
|
3094
|
+
return e.search(ia) !== -1;
|
|
3086
3095
|
}
|
|
3087
|
-
async function
|
|
3088
|
-
if (!
|
|
3089
|
-
let r =
|
|
3090
|
-
return
|
|
3096
|
+
async function fa(e, t, n) {
|
|
3097
|
+
if (!da(e)) return e;
|
|
3098
|
+
let r = ua(e, n);
|
|
3099
|
+
return ca(r).reduce((e, r) => e.then((e) => la(e, r, t, n)), Promise.resolve(r));
|
|
3091
3100
|
}
|
|
3092
3101
|
//#endregion
|
|
3093
3102
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/embed-images.js
|
|
3094
3103
|
async function $(e, t, n) {
|
|
3095
3104
|
let r = t.style?.getPropertyValue(e);
|
|
3096
3105
|
if (r) {
|
|
3097
|
-
let i = await
|
|
3106
|
+
let i = await fa(r, null, n);
|
|
3098
3107
|
return t.style.setProperty(e, i, t.style.getPropertyPriority(e)), !0;
|
|
3099
3108
|
}
|
|
3100
3109
|
return !1;
|
|
3101
3110
|
}
|
|
3102
|
-
async function
|
|
3111
|
+
async function pa(e, t) {
|
|
3103
3112
|
await $("background", e, t) || await $("background-image", e, t), await $("mask", e, t) || await $("-webkit-mask", e, t) || await $("mask-image", e, t) || await $("-webkit-mask-image", e, t);
|
|
3104
3113
|
}
|
|
3105
|
-
async function
|
|
3114
|
+
async function ma(e, t) {
|
|
3106
3115
|
let n = Z(e, HTMLImageElement);
|
|
3107
|
-
if (!(n && !
|
|
3108
|
-
let r = n ? e.src : e.href.baseVal, i = await
|
|
3116
|
+
if (!(n && !Bi(e.src)) && !(Z(e, SVGImageElement) && !Bi(e.href.baseVal))) return;
|
|
3117
|
+
let r = n ? e.src : e.href.baseVal, i = await Gi(r, Ri(r), t);
|
|
3109
3118
|
await new Promise((r, a) => {
|
|
3110
3119
|
e.onload = r, e.onerror = t.onImageErrorHandler ? (...e) => {
|
|
3111
3120
|
try {
|
|
@@ -3118,16 +3127,16 @@ async function la(e, t) {
|
|
|
3118
3127
|
o.decode &&= r, o.loading === "lazy" && (o.loading = "eager"), n ? (e.srcset = "", e.src = i) : e.href.baseVal = i;
|
|
3119
3128
|
});
|
|
3120
3129
|
}
|
|
3121
|
-
async function
|
|
3122
|
-
let n = K(e.childNodes).map((e) =>
|
|
3130
|
+
async function ha(e, t) {
|
|
3131
|
+
let n = K(e.childNodes).map((e) => ga(e, t));
|
|
3123
3132
|
await Promise.all(n).then(() => e);
|
|
3124
3133
|
}
|
|
3125
|
-
async function
|
|
3126
|
-
Z(e, Element) && (await
|
|
3134
|
+
async function ga(e, t) {
|
|
3135
|
+
Z(e, Element) && (await pa(e, t), await ma(e, t), await ha(e, t));
|
|
3127
3136
|
}
|
|
3128
3137
|
//#endregion
|
|
3129
3138
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/apply-style.js
|
|
3130
|
-
function
|
|
3139
|
+
function _a(e, t) {
|
|
3131
3140
|
let { style: n } = e;
|
|
3132
3141
|
t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.width && (n.width = `${t.width}px`), t.height && (n.height = `${t.height}px`);
|
|
3133
3142
|
let r = t.style;
|
|
@@ -3137,22 +3146,22 @@ function fa(e, t) {
|
|
|
3137
3146
|
}
|
|
3138
3147
|
//#endregion
|
|
3139
3148
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/embed-webfonts.js
|
|
3140
|
-
var
|
|
3141
|
-
async function
|
|
3142
|
-
let t =
|
|
3149
|
+
var va = {};
|
|
3150
|
+
async function ya(e) {
|
|
3151
|
+
let t = va[e];
|
|
3143
3152
|
return t ?? (t = {
|
|
3144
3153
|
url: e,
|
|
3145
3154
|
cssText: await (await fetch(e)).text()
|
|
3146
|
-
},
|
|
3155
|
+
}, va[e] = t, t);
|
|
3147
3156
|
}
|
|
3148
|
-
async function
|
|
3157
|
+
async function ba(e, t) {
|
|
3149
3158
|
let n = e.cssText, r = /url\(["']?([^"')]+)["']?\)/g, i = (n.match(/url\([^)]+\)/g) || []).map(async (i) => {
|
|
3150
3159
|
let a = i.replace(r, "$1");
|
|
3151
|
-
return a.startsWith("https://") || (a = new URL(a, e.url).href),
|
|
3160
|
+
return a.startsWith("https://") || (a = new URL(a, e.url).href), Hi(a, t.fetchRequestInit, ({ result: e }) => (n = n.replace(i, `url(${e})`), [i, e]));
|
|
3152
3161
|
});
|
|
3153
3162
|
return Promise.all(i).then(() => n);
|
|
3154
3163
|
}
|
|
3155
|
-
function
|
|
3164
|
+
function xa(e) {
|
|
3156
3165
|
if (e == null) return [];
|
|
3157
3166
|
let t = [], n = e.replace(/(\/\*[\s\S]*?\*\/)/gi, ""), r = /* @__PURE__ */ RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
|
|
3158
3167
|
for (;;) {
|
|
@@ -3172,13 +3181,13 @@ function ga(e) {
|
|
|
3172
3181
|
}
|
|
3173
3182
|
return t;
|
|
3174
3183
|
}
|
|
3175
|
-
async function
|
|
3184
|
+
async function Sa(e, t) {
|
|
3176
3185
|
let n = [], r = [];
|
|
3177
3186
|
return e.forEach((n) => {
|
|
3178
3187
|
if ("cssRules" in n) try {
|
|
3179
3188
|
K(n.cssRules || []).forEach((e, i) => {
|
|
3180
3189
|
if (e.type === CSSRule.IMPORT_RULE) {
|
|
3181
|
-
let a = i + 1, o = e.href, s =
|
|
3190
|
+
let a = i + 1, o = e.href, s = ya(o).then((e) => ba(e, t)).then((e) => xa(e).forEach((e) => {
|
|
3182
3191
|
try {
|
|
3183
3192
|
n.insertRule(e, e.startsWith("@import") ? a += 1 : n.cssRules.length);
|
|
3184
3193
|
} catch (t) {
|
|
@@ -3195,7 +3204,7 @@ async function _a(e, t) {
|
|
|
3195
3204
|
});
|
|
3196
3205
|
} catch (i) {
|
|
3197
3206
|
let a = e.find((e) => e.href == null) || document.styleSheets[0];
|
|
3198
|
-
n.href != null && r.push(
|
|
3207
|
+
n.href != null && r.push(ya(n.href).then((e) => ba(e, t)).then((e) => xa(e).forEach((e) => {
|
|
3199
3208
|
a.insertRule(e, a.cssRules.length);
|
|
3200
3209
|
})).catch((e) => {
|
|
3201
3210
|
console.error("Error loading remote stylesheet", e);
|
|
@@ -3211,37 +3220,37 @@ async function _a(e, t) {
|
|
|
3211
3220
|
}
|
|
3212
3221
|
}), n));
|
|
3213
3222
|
}
|
|
3214
|
-
function
|
|
3215
|
-
return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) =>
|
|
3223
|
+
function Ca(e) {
|
|
3224
|
+
return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => da(e.style.getPropertyValue("src")));
|
|
3216
3225
|
}
|
|
3217
|
-
async function
|
|
3226
|
+
async function wa(e, t) {
|
|
3218
3227
|
if (e.ownerDocument == null) throw Error("Provided element is not within a Document");
|
|
3219
|
-
return
|
|
3228
|
+
return Ca(await Sa(K(e.ownerDocument.styleSheets), t));
|
|
3220
3229
|
}
|
|
3221
|
-
function
|
|
3230
|
+
function Ta(e) {
|
|
3222
3231
|
return (e || "").trim().replace(/["']/g, "");
|
|
3223
3232
|
}
|
|
3224
|
-
function
|
|
3233
|
+
function Ea(e) {
|
|
3225
3234
|
let t = /* @__PURE__ */ new Set();
|
|
3226
3235
|
function n(e) {
|
|
3227
3236
|
let r = e.style.fontFamily || getComputedStyle(e).fontFamily;
|
|
3228
3237
|
r && r.split(",").forEach((e) => {
|
|
3229
|
-
t.add(
|
|
3238
|
+
t.add(Ta(e));
|
|
3230
3239
|
}), Array.from(e.children).forEach((e) => {
|
|
3231
3240
|
e instanceof HTMLElement && n(e);
|
|
3232
3241
|
});
|
|
3233
3242
|
}
|
|
3234
3243
|
return n(e), t;
|
|
3235
3244
|
}
|
|
3236
|
-
async function
|
|
3237
|
-
let n = await
|
|
3238
|
-
return (await Promise.all(n.filter((e) => r.has(
|
|
3245
|
+
async function Da(e, t) {
|
|
3246
|
+
let n = await wa(e, t), r = Ea(e);
|
|
3247
|
+
return (await Promise.all(n.filter((e) => r.has(Ta(e.style.fontFamily))).map((e) => {
|
|
3239
3248
|
let n = e.parentStyleSheet ? e.parentStyleSheet.href : null;
|
|
3240
|
-
return
|
|
3249
|
+
return fa(e.cssText, n, t);
|
|
3241
3250
|
}))).join("\n");
|
|
3242
3251
|
}
|
|
3243
|
-
async function
|
|
3244
|
-
let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await
|
|
3252
|
+
async function Oa(e, t) {
|
|
3253
|
+
let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await Da(e, t) : t.fontEmbedCSS, r = t.extraStyleContent == null ? n : (n || "").concat(t.extraStyleContent);
|
|
3245
3254
|
if (r) {
|
|
3246
3255
|
let t = document.createElement("style"), n = document.createTextNode(r);
|
|
3247
3256
|
t.appendChild(n), e.firstChild ? e.insertBefore(t, e.firstChild) : e.appendChild(t);
|
|
@@ -3249,18 +3258,18 @@ async function Ca(e, t) {
|
|
|
3249
3258
|
}
|
|
3250
3259
|
//#endregion
|
|
3251
3260
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/index.js
|
|
3252
|
-
async function
|
|
3253
|
-
let { width: n, height: r } =
|
|
3254
|
-
return await
|
|
3261
|
+
async function ka(e, t = {}) {
|
|
3262
|
+
let { width: n, height: r } = wi(e, t), i = await Q(e, t, !0);
|
|
3263
|
+
return await Oa(i, t), await ga(i, t), _a(i, t), await Oi(i, n, r);
|
|
3255
3264
|
}
|
|
3256
|
-
async function
|
|
3257
|
-
let { width: n, height: r } =
|
|
3258
|
-
return a.width = c * s, a.height = l * s, t.skipAutoScale ||
|
|
3265
|
+
async function Aa(e, t = {}) {
|
|
3266
|
+
let { width: n, height: r } = wi(e, t), i = await X(await ka(e, t)), a = document.createElement("canvas"), o = a.getContext("2d"), s = t.pixelRatio || Ti(), c = t.canvasWidth || n, l = t.canvasHeight || r;
|
|
3267
|
+
return a.width = c * s, a.height = l * s, t.skipAutoScale || Ei(a), a.style.width = `${c}`, a.style.height = `${l}`, t.backgroundColor && (o.fillStyle = t.backgroundColor, o.fillRect(0, 0, a.width, a.height)), o.drawImage(i, 0, 0, a.width, a.height), a;
|
|
3259
3268
|
}
|
|
3260
|
-
async function
|
|
3261
|
-
return (await
|
|
3269
|
+
async function ja(e, t = {}) {
|
|
3270
|
+
return (await Aa(e, t)).toDataURL();
|
|
3262
3271
|
}
|
|
3263
|
-
var
|
|
3272
|
+
var Ma = {
|
|
3264
3273
|
filter: (e) => {
|
|
3265
3274
|
try {
|
|
3266
3275
|
if ("classList" in e) {
|
|
@@ -3278,11 +3287,11 @@ var Da = {
|
|
|
3278
3287
|
},
|
|
3279
3288
|
includeStyleProperties: /* @__PURE__ */ "width.height.min-width.min-height.max-width.max-height.box-sizing.aspect-ratio.display.position.top.left.bottom.right.z-index.float.clear.flex.flex-direction.flex-wrap.flex-grow.flex-shrink.flex-basis.align-items.align-self.justify-content.gap.order.grid-template-columns.grid-template-rows.grid-column.grid-row.row-gap.column-gap.margin.margin-top.margin-right.margin-bottom.margin-left.padding.padding-top.padding-right.padding-bottom.padding-left.font.font-family.font-size.font-weight.font-style.line-height.letter-spacing.word-spacing.text-align.text-decoration.text-transform.text-indent.text-shadow.white-space.text-wrap.word-break.text-overflow.vertical-align.color.background.background-color.background-image.background-size.background-position.background-repeat.background-clip.border.border-width.border-style.border-color.border-top.border-right.border-bottom.border-left.border-radius.outline.box-shadow.text-shadow.opacity.filter.backdrop-filter.mix-blend-mode.transform.clip-path.overflow.overflow-x.overflow-y.visibility.fill.stroke.stroke-width.object-fit.object-position.list-style.list-style-type.border-collapse.border-spacing.content.cursor".split(".")
|
|
3280
3289
|
};
|
|
3281
|
-
async function
|
|
3282
|
-
return
|
|
3283
|
-
...
|
|
3290
|
+
async function Na(e, t) {
|
|
3291
|
+
return ja(e, {
|
|
3292
|
+
...Ma,
|
|
3284
3293
|
...t
|
|
3285
3294
|
});
|
|
3286
3295
|
}
|
|
3287
3296
|
//#endregion
|
|
3288
|
-
export {
|
|
3297
|
+
export { pt as $, ur as A, On as B, br as C, Or as D, Er as E, mr as F, wn as G, Nn as H, nr as I, Zt as J, zt as K, Rn as L, pr as M, sr as N, Ar as O, or as P, ht as Q, zn as R, vr as S, wr as T, kn as U, jn as V, dn as W, _t as X, z as Y, gt as Z, jr as _, ii as a, Nr as b, $r as c, Kr as d, A as et, Hr as f, zr as g, Rr as h, ai as i, lr as j, ar as k, Gr as l, Vr as m, vi as n, ri as o, Ur as p, nn as q, gi as r, ni as s, Na as t, qr as u, Pr as v, Sr as w, gr as x, Mr as y, In as z };
|