@marimo-team/islands 0.25.3-dev96 → 0.25.3-dev98
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-DJjRNeOW.js → ErrorBoundary-D5HXg9iP.js} +1 -1
- package/dist/{chat-ui-ChmqaLQA.js → chat-ui-BIgPxfPP.js} +4 -4
- package/dist/{code-visibility-BqP2qZal.js → code-visibility-gnf5rA6s.js} +2 -2
- package/dist/{common-Dwl0aTge.js → common-B3KZnxiH.js} +3 -3
- package/dist/{data-grid-overlay-editor-DadR_9Qe.js → data-grid-overlay-editor-wb2J7aj-.js} +1 -1
- package/dist/{error-entries-Cq0m-sO5.js → error-entries-TAO6kEhF.js} +242 -230
- package/dist/{feedback-button-PDt2V0S1.js → feedback-button-B9M0GGjm.js} +3 -3
- package/dist/{glide-data-editor-D2mdZ_2N.js → glide-data-editor-BBDo3Rj6.js} +3 -3
- package/dist/{globals-B8YEfM4c.js → globals-C7_iz22d.js} +1 -1
- package/dist/{html-to-image-D00_TX1M.js → html-to-image-CWdayGZU.js} +1 -1
- package/dist/main.js +1845 -1835
- package/dist/{number-overlay-editor-DdzFRhUf.js → number-overlay-editor-CDufNBLN.js} +1 -1
- package/dist/{process-output-ByXe3l6a.js → process-output-DD-oSvZk.js} +2 -2
- package/dist/{reveal-component-ClNTWzdK.js → reveal-component-BTMViKBQ.js} +7 -7
- package/package.json +1 -1
- package/src/components/chat/acp/blocks.tsx +2 -2
- package/src/components/data-table/charts/__tests__/chart-panel.test.tsx +74 -1
- package/src/components/data-table/charts/__tests__/storage.test.ts +4 -1
- package/src/components/data-table/charts/charts.tsx +21 -6
- package/src/components/data-table/charts/storage.ts +16 -5
- package/src/components/editor/output/ansi-reduce.ts +6 -0
- package/src/components/editor/output/console/ConsoleOutput.tsx +11 -7
- package/src/components/editor/package-alert.tsx +4 -4
- package/src/components/scratchpad/scratchpad.tsx +2 -2
- package/src/components/slides/reveal-component.tsx +4 -2
- package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +4 -0
- package/src/core/cells/__tests__/cell.test.ts +39 -0
- package/src/core/cells/__tests__/cells.test.ts +3 -1
- package/src/core/cells/__tests__/collapseConsoleOutputs.test.ts +54 -0
- package/src/core/cells/cell.ts +14 -3
- package/src/core/cells/cells.ts +1 -0
- package/src/core/cells/types.ts +10 -1
- package/src/plugins/impl/chat/chat-ui.tsx +1 -1
|
@@ -21943,7 +21943,7 @@ function Sp(e) {
|
|
|
21943
21943
|
//#endregion
|
|
21944
21944
|
//#region src/core/codemirror/lsp/utils.ts
|
|
21945
21945
|
function Cp(e) {
|
|
21946
|
-
return bp.is(e) ? j.get(
|
|
21946
|
+
return bp.is(e) ? j.get(yx).inOrderIds.includes(bp.parse(e)) : !1;
|
|
21947
21947
|
}
|
|
21948
21948
|
function wp() {
|
|
21949
21949
|
return j.get(ii)?.rootUri ?? "file:///";
|
|
@@ -22406,7 +22406,7 @@ var cm = class {
|
|
|
22406
22406
|
return Bp(e, t);
|
|
22407
22407
|
}
|
|
22408
22408
|
}, lm = () => {
|
|
22409
|
-
let e =
|
|
22409
|
+
let e = Ex().cellHandles;
|
|
22410
22410
|
return Pt.mapValues(e, (e) => e.current?.editorViewOrNull);
|
|
22411
22411
|
};
|
|
22412
22412
|
function um(e) {
|
|
@@ -22946,7 +22946,7 @@ var Dm = /* @__PURE__ */ new Set([1, 2]);
|
|
|
22946
22946
|
function Om(e, t) {
|
|
22947
22947
|
if (!("method" in t) || t.method !== "window/logMessage") return;
|
|
22948
22948
|
let n = t.params;
|
|
22949
|
-
!Np(n) || typeof n.message != "string" ||
|
|
22949
|
+
!Np(n) || typeof n.message != "string" || vx({ logs: [{
|
|
22950
22950
|
timestamp: Date.now() / 1e3,
|
|
22951
22951
|
level: Dm.has(n.type) ? "stderr" : "stdout",
|
|
22952
22952
|
message: n.message,
|
|
@@ -26077,7 +26077,7 @@ function Gv(e, t) {
|
|
|
26077
26077
|
//#endregion
|
|
26078
26078
|
//#region src/components/editor/connections/components.tsx
|
|
26079
26079
|
function Kv() {
|
|
26080
|
-
let e = (0, Tr.c)(4), { createNewCell: t } =
|
|
26080
|
+
let e = (0, Tr.c)(4), { createNewCell: t } = Lx(), n = Wv(), r = Me(Fe), i;
|
|
26081
26081
|
return e[0] !== r || e[1] !== t || e[2] !== n ? (i = (e) => {
|
|
26082
26082
|
/\bmo\./.test(e) && Iv({
|
|
26083
26083
|
autoInstantiate: r,
|
|
@@ -26967,6 +26967,7 @@ var Zy = class e {
|
|
|
26967
26967
|
channel;
|
|
26968
26968
|
timestamp;
|
|
26969
26969
|
code;
|
|
26970
|
+
id;
|
|
26970
26971
|
ansiReducer = new $y();
|
|
26971
26972
|
_data;
|
|
26972
26973
|
get data() {
|
|
@@ -26974,13 +26975,13 @@ var Zy = class e {
|
|
|
26974
26975
|
}
|
|
26975
26976
|
static create(t) {
|
|
26976
26977
|
let n = new $y();
|
|
26977
|
-
return n.append(t.data), new e(t.mimetype, t.channel, t.timestamp, n, t.code);
|
|
26978
|
+
return n.append(t.data), new e(t.mimetype, t.channel, t.timestamp, n, t.code, t.id);
|
|
26978
26979
|
}
|
|
26979
|
-
constructor(e, t, n, r, i) {
|
|
26980
|
-
this.mimetype = e, this.channel = t, this.timestamp = n, this.code = i, this.ansiReducer = r, this._data = this.ansiReducer.render();
|
|
26980
|
+
constructor(e, t, n, r, i, a) {
|
|
26981
|
+
this.mimetype = e, this.channel = t, this.timestamp = n, this.code = i, this.id = a, this.ansiReducer = r, this._data = this.ansiReducer.render();
|
|
26981
26982
|
}
|
|
26982
26983
|
appendData(t) {
|
|
26983
|
-
return this.ansiReducer.append(t), new e(this.mimetype, this.channel, this.timestamp, this.ansiReducer, this.code);
|
|
26984
|
+
return this.ansiReducer.append(t), new e(this.mimetype, this.channel, this.timestamp, this.ansiReducer, this.code, this.id);
|
|
26984
26985
|
}
|
|
26985
26986
|
toJSON() {
|
|
26986
26987
|
return {
|
|
@@ -27045,7 +27046,10 @@ function ob(e, t) {
|
|
|
27045
27046
|
}
|
|
27046
27047
|
//#endregion
|
|
27047
27048
|
//#region src/core/cells/cell.ts
|
|
27048
|
-
function sb(e
|
|
27049
|
+
function sb(e) {
|
|
27050
|
+
return (e.at(-1)?.id ?? 0) + 1;
|
|
27051
|
+
}
|
|
27052
|
+
function cb(e, t) {
|
|
27049
27053
|
let n = { ...e };
|
|
27050
27054
|
switch (t.status) {
|
|
27051
27055
|
case "queued":
|
|
@@ -27071,30 +27075,37 @@ function sb(e, t) {
|
|
|
27071
27075
|
mimetype: e.mimetype,
|
|
27072
27076
|
data: e.data,
|
|
27073
27077
|
timestamp: e.timestamp,
|
|
27078
|
+
id: e.id,
|
|
27074
27079
|
response: e.response ?? ""
|
|
27075
27080
|
} : e));
|
|
27076
27081
|
let a = t.console;
|
|
27077
|
-
a != null && (i = tb(Array.isArray(a) ? a
|
|
27082
|
+
a != null && (i = tb(Array.isArray(a) ? a.map((e, t) => ({
|
|
27083
|
+
...e,
|
|
27084
|
+
id: t + 1
|
|
27085
|
+
})) : [...i, {
|
|
27086
|
+
...a,
|
|
27087
|
+
id: sb(i)
|
|
27088
|
+
}])), n.consoleOutputs = i, n.outline = qy(n.output);
|
|
27078
27089
|
let o = [t.console].flat().filter(Boolean).filter((e) => e.channel === "pdb");
|
|
27079
27090
|
return o.length > 0 && o.some((e) => e.data === "start") && (n.debuggerActive = !0), n;
|
|
27080
27091
|
}
|
|
27081
|
-
function
|
|
27092
|
+
function lb(e) {
|
|
27082
27093
|
let t = { ...e };
|
|
27083
27094
|
return e.status !== "disabled-transitively" && (t.status = "queued"), t.interrupted = !1, t.errored = !1, t.runElapsedTimeMs = null, t.debuggerActive = !1, t;
|
|
27084
27095
|
}
|
|
27085
|
-
function
|
|
27096
|
+
function ub(e) {
|
|
27086
27097
|
return e === "running" || e === "queued";
|
|
27087
27098
|
}
|
|
27088
|
-
function
|
|
27099
|
+
function db(e, t) {
|
|
27089
27100
|
let { status: n, output: r, runStartTimestamp: i, interrupted: a, staleInputs: o } = e;
|
|
27090
27101
|
if (a) return !1;
|
|
27091
27102
|
if (t) return !0;
|
|
27092
|
-
let s =
|
|
27103
|
+
let s = ub(n), c = n === "running" && r !== null && i !== null && (r.timestamp ?? 0) > i;
|
|
27093
27104
|
return s && !c ? !0 : o;
|
|
27094
27105
|
}
|
|
27095
27106
|
//#endregion
|
|
27096
27107
|
//#region src/core/cells/document-changes.ts
|
|
27097
|
-
function
|
|
27108
|
+
function fb(e, t) {
|
|
27098
27109
|
if (!e) {
|
|
27099
27110
|
a.warn("getCell: cellId is undefined");
|
|
27100
27111
|
return;
|
|
@@ -27106,32 +27117,32 @@ function db(e, t) {
|
|
|
27106
27117
|
}
|
|
27107
27118
|
return n;
|
|
27108
27119
|
}
|
|
27109
|
-
function
|
|
27120
|
+
function pb(e, t) {
|
|
27110
27121
|
let n = t.cellIds.inOrderIds, r = n.indexOf(e);
|
|
27111
27122
|
if (r > 0) return { after: n[r - 1] };
|
|
27112
27123
|
if (r === 0 && n.length > 1) return { before: n[1] };
|
|
27113
27124
|
}
|
|
27114
|
-
function
|
|
27125
|
+
function mb(e) {
|
|
27115
27126
|
let t = /* @__PURE__ */ new Map(), n = e.cellIds.getColumns();
|
|
27116
27127
|
for (let [e, r] of n.entries()) for (let n of r.inOrderIds) t.set(n, e);
|
|
27117
27128
|
return t;
|
|
27118
27129
|
}
|
|
27119
|
-
function
|
|
27130
|
+
function hb(e, t) {
|
|
27120
27131
|
let n = new Set(e.cellIds.inOrderIds), r = [];
|
|
27121
27132
|
for (let e of t.cellIds.inOrderIds) if (!n.has(e)) {
|
|
27122
|
-
let n =
|
|
27133
|
+
let n = fb(e, t);
|
|
27123
27134
|
n && r.push({
|
|
27124
27135
|
type: "create-cell",
|
|
27125
27136
|
cellId: n.id,
|
|
27126
27137
|
code: n.code,
|
|
27127
27138
|
name: n.name,
|
|
27128
27139
|
config: n.config,
|
|
27129
|
-
...
|
|
27140
|
+
...pb(n.id, t)
|
|
27130
27141
|
});
|
|
27131
27142
|
}
|
|
27132
27143
|
return r;
|
|
27133
27144
|
}
|
|
27134
|
-
function
|
|
27145
|
+
function gb(e, t) {
|
|
27135
27146
|
let n = new Set(t.cellIds.inOrderIds), r = [];
|
|
27136
27147
|
for (let t of e.cellIds.inOrderIds) n.has(t) || r.push({
|
|
27137
27148
|
type: "delete-cell",
|
|
@@ -27139,10 +27150,10 @@ function hb(e, t) {
|
|
|
27139
27150
|
});
|
|
27140
27151
|
return r;
|
|
27141
27152
|
}
|
|
27142
|
-
function
|
|
27143
|
-
let n =
|
|
27153
|
+
function _b(e, t) {
|
|
27154
|
+
let n = mb(e), r = mb(t), i = [];
|
|
27144
27155
|
for (let [e, a] of r) if (n.get(e) !== a) {
|
|
27145
|
-
let n =
|
|
27156
|
+
let n = fb(e, t);
|
|
27146
27157
|
i.push({
|
|
27147
27158
|
type: "set-config",
|
|
27148
27159
|
cellId: e,
|
|
@@ -27157,9 +27168,9 @@ function gb(e, t) {
|
|
|
27157
27168
|
cellIds: t.cellIds.inOrderIds
|
|
27158
27169
|
}), i;
|
|
27159
27170
|
}
|
|
27160
|
-
function
|
|
27171
|
+
function vb(e, t, n) {
|
|
27161
27172
|
switch (n.type) {
|
|
27162
|
-
case "createNewCell": return
|
|
27173
|
+
case "createNewCell": return hb(e, t);
|
|
27163
27174
|
case "deleteCell": return [{
|
|
27164
27175
|
type: "delete-cell",
|
|
27165
27176
|
cellId: n.payload.cellId
|
|
@@ -27171,15 +27182,15 @@ function _b(e, t, n) {
|
|
|
27171
27182
|
return [{
|
|
27172
27183
|
type: "move-cell",
|
|
27173
27184
|
cellId: e,
|
|
27174
|
-
...
|
|
27185
|
+
...pb(e, t)
|
|
27175
27186
|
}];
|
|
27176
27187
|
}
|
|
27177
27188
|
case "dropCellOverCell":
|
|
27178
27189
|
case "dropCellOverColumn":
|
|
27179
27190
|
case "moveCellToIndex":
|
|
27180
|
-
case "moveCellsRelativeTo": return
|
|
27191
|
+
case "moveCellsRelativeTo": return _b(e, t);
|
|
27181
27192
|
case "updateCellCode": {
|
|
27182
|
-
let e =
|
|
27193
|
+
let e = fb(n.payload.cellId, t);
|
|
27183
27194
|
return e ? [{
|
|
27184
27195
|
type: "set-code",
|
|
27185
27196
|
cellId: e.id,
|
|
@@ -27187,7 +27198,7 @@ function _b(e, t, n) {
|
|
|
27187
27198
|
}] : [];
|
|
27188
27199
|
}
|
|
27189
27200
|
case "updateCellName": {
|
|
27190
|
-
let e =
|
|
27201
|
+
let e = fb(n.payload.cellId, t);
|
|
27191
27202
|
return e ? [{
|
|
27192
27203
|
type: "set-name",
|
|
27193
27204
|
cellId: e.id,
|
|
@@ -27195,7 +27206,7 @@ function _b(e, t, n) {
|
|
|
27195
27206
|
}] : [];
|
|
27196
27207
|
}
|
|
27197
27208
|
case "updateCellConfig": {
|
|
27198
|
-
let { cellId: e } = n.payload, r =
|
|
27209
|
+
let { cellId: e } = n.payload, r = fb(e, t);
|
|
27199
27210
|
return r ? [{
|
|
27200
27211
|
type: "set-config",
|
|
27201
27212
|
cellId: e,
|
|
@@ -27210,30 +27221,30 @@ function _b(e, t, n) {
|
|
|
27210
27221
|
case "addColumnBreakpoint":
|
|
27211
27222
|
case "deleteColumn":
|
|
27212
27223
|
case "mergeAllColumns":
|
|
27213
|
-
case "compactColumns": return
|
|
27214
|
-
case "addColumn": return [...
|
|
27224
|
+
case "compactColumns": return _b(e, t);
|
|
27225
|
+
case "addColumn": return [...hb(e, t), ..._b(e, t)];
|
|
27215
27226
|
case "undoDeleteCell": {
|
|
27216
|
-
let n =
|
|
27227
|
+
let n = hb(e, t), r = _b(e, t);
|
|
27217
27228
|
return n.length === 0 ? r : r.length > 1 ? [...n, ...r] : n;
|
|
27218
27229
|
}
|
|
27219
27230
|
case "splitCell": {
|
|
27220
|
-
let { cellId: r } = n.payload, i =
|
|
27231
|
+
let { cellId: r } = n.payload, i = fb(r, t);
|
|
27221
27232
|
return i ? [{
|
|
27222
27233
|
type: "set-code",
|
|
27223
27234
|
cellId: r,
|
|
27224
27235
|
code: i.code
|
|
27225
|
-
}, ...
|
|
27236
|
+
}, ...hb(e, t)] : [];
|
|
27226
27237
|
}
|
|
27227
27238
|
case "undoSplitCell": {
|
|
27228
|
-
let { cellId: r } = n.payload, i =
|
|
27239
|
+
let { cellId: r } = n.payload, i = fb(r, t);
|
|
27229
27240
|
return i ? [{
|
|
27230
27241
|
type: "set-code",
|
|
27231
27242
|
cellId: r,
|
|
27232
27243
|
code: i.code
|
|
27233
|
-
}, ...
|
|
27244
|
+
}, ...gb(e, t)] : [];
|
|
27234
27245
|
}
|
|
27235
|
-
case "moveToNextCell": return
|
|
27236
|
-
case "addSetupCellIfDoesntExist": return
|
|
27246
|
+
case "moveToNextCell": return hb(e, t);
|
|
27247
|
+
case "addSetupCellIfDoesntExist": return hb(e, t);
|
|
27237
27248
|
case "focusCell":
|
|
27238
27249
|
case "focusTopCell":
|
|
27239
27250
|
case "focusBottomCell":
|
|
@@ -27263,88 +27274,88 @@ function _b(e, t, n) {
|
|
|
27263
27274
|
default: ee(n);
|
|
27264
27275
|
}
|
|
27265
27276
|
}
|
|
27266
|
-
var
|
|
27277
|
+
var yb = /* @__PURE__ */ new Set([
|
|
27267
27278
|
"set-code",
|
|
27268
27279
|
"set-name",
|
|
27269
27280
|
"set-config"
|
|
27270
|
-
]),
|
|
27281
|
+
]), bb = /* @__PURE__ */ new Set([
|
|
27271
27282
|
"set-code",
|
|
27272
27283
|
"set-name",
|
|
27273
27284
|
"set-config",
|
|
27274
27285
|
"move-cell"
|
|
27275
27286
|
]);
|
|
27276
|
-
function
|
|
27287
|
+
function xb(e) {
|
|
27277
27288
|
let t = /* @__PURE__ */ new Set();
|
|
27278
27289
|
for (let n of e) n.type === "delete-cell" && t.add(n.cellId);
|
|
27279
|
-
let n = e.filter((e) => !(
|
|
27290
|
+
let n = e.filter((e) => !(bb.has(e.type) && "cellId" in e && t.has(e.cellId))), r = /* @__PURE__ */ new Map();
|
|
27280
27291
|
return n.forEach((e, t) => {
|
|
27281
|
-
|
|
27282
|
-
}), n.filter((e, t) =>
|
|
27283
|
-
}
|
|
27284
|
-
var
|
|
27285
|
-
function
|
|
27286
|
-
if (
|
|
27287
|
-
let e =
|
|
27288
|
-
|
|
27289
|
-
}
|
|
27290
|
-
async function
|
|
27291
|
-
if (e ===
|
|
27292
|
-
if (
|
|
27293
|
-
for (;
|
|
27294
|
-
let t =
|
|
27292
|
+
yb.has(e.type) && "cellId" in e && r.set(`${e.type}:${e.cellId}`, t);
|
|
27293
|
+
}), n.filter((e, t) => yb.has(e.type) && "cellId" in e ? r.get(`${e.type}:${e.cellId}`) === t : !0);
|
|
27294
|
+
}
|
|
27295
|
+
var Sb = [], Cb = [], wb = Promise.resolve(), Tb = 0, Eb = null, Db = { status: "synchronized" };
|
|
27296
|
+
function Ob() {
|
|
27297
|
+
if (Db.status === "failed") return;
|
|
27298
|
+
let e = xb(Sb);
|
|
27299
|
+
Sb = [], e.length > 0 && Cb.push(e);
|
|
27300
|
+
}
|
|
27301
|
+
async function kb(e) {
|
|
27302
|
+
if (e === Tb) {
|
|
27303
|
+
if (Db.status === "failed") throw Db.error;
|
|
27304
|
+
for (; Cb.length > 0;) {
|
|
27305
|
+
let t = Cb[0];
|
|
27295
27306
|
try {
|
|
27296
27307
|
await nl().sendDocumentTransaction({ changes: t });
|
|
27297
27308
|
} catch (t) {
|
|
27298
|
-
if (e !==
|
|
27299
|
-
throw
|
|
27309
|
+
if (e !== Tb) return;
|
|
27310
|
+
throw Db = {
|
|
27300
27311
|
status: "failed",
|
|
27301
27312
|
error: t
|
|
27302
|
-
},
|
|
27313
|
+
}, Cb = Cb.slice(1), t;
|
|
27303
27314
|
}
|
|
27304
|
-
if (e !==
|
|
27305
|
-
|
|
27315
|
+
if (e !== Tb) return;
|
|
27316
|
+
Cb.shift();
|
|
27306
27317
|
}
|
|
27307
27318
|
}
|
|
27308
27319
|
}
|
|
27309
|
-
function
|
|
27310
|
-
let e =
|
|
27311
|
-
return
|
|
27320
|
+
function Ab() {
|
|
27321
|
+
let e = Tb, t = Eb?.promise ?? Promise.resolve(), n = Promise.all([wb.catch(() => void 0), t]).then(() => kb(e));
|
|
27322
|
+
return wb = n, n;
|
|
27312
27323
|
}
|
|
27313
|
-
var
|
|
27314
|
-
|
|
27324
|
+
var jb = je(() => {
|
|
27325
|
+
Ob(), Ab().catch(() => void 0);
|
|
27315
27326
|
}, 400);
|
|
27316
|
-
async function
|
|
27317
|
-
if (
|
|
27318
|
-
|
|
27319
|
-
let e =
|
|
27327
|
+
async function Mb() {
|
|
27328
|
+
if (Db.status === "failed") throw Db.error;
|
|
27329
|
+
jb.cancel(), Ob();
|
|
27330
|
+
let e = Ab();
|
|
27320
27331
|
for (;;) {
|
|
27321
|
-
if (await e,
|
|
27322
|
-
e =
|
|
27332
|
+
if (await e, jb.cancel(), Ob(), Sb.length === 0 && Cb.length === 0 && wb === e) return;
|
|
27333
|
+
e = wb === e ? Ab() : wb;
|
|
27323
27334
|
}
|
|
27324
27335
|
}
|
|
27325
|
-
function
|
|
27336
|
+
function Nb(e) {
|
|
27326
27337
|
return "cellId" in e && e.cellId === "__scratch__";
|
|
27327
27338
|
}
|
|
27328
|
-
function
|
|
27329
|
-
j.get(fe) ||
|
|
27339
|
+
function Pb(e) {
|
|
27340
|
+
j.get(fe) || Nb(e) || (Sb.push(e), Db.status === "synchronized" && jb());
|
|
27330
27341
|
}
|
|
27331
|
-
function
|
|
27332
|
-
for (let r of
|
|
27342
|
+
function Fb(e, t, n) {
|
|
27343
|
+
for (let r of vb(e, t, n)) Pb(r);
|
|
27333
27344
|
}
|
|
27334
27345
|
//#endregion
|
|
27335
27346
|
//#region ../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/fromUnixTime.js
|
|
27336
|
-
function
|
|
27347
|
+
function Ib(e, t) {
|
|
27337
27348
|
return ge(e * 1e3, t?.in);
|
|
27338
27349
|
}
|
|
27339
27350
|
//#endregion
|
|
27340
27351
|
//#region ../node_modules/.pnpm/ansi_up@6.0.6/node_modules/ansi_up/ansi_up.js
|
|
27341
|
-
var
|
|
27352
|
+
var Lb = function(e, t) {
|
|
27342
27353
|
return Object.defineProperty ? Object.defineProperty(e, "raw", { value: t }) : e.raw = t, e;
|
|
27343
|
-
},
|
|
27354
|
+
}, Rb;
|
|
27344
27355
|
(function(e) {
|
|
27345
27356
|
e[e.EOS = 0] = "EOS", e[e.Text = 1] = "Text", e[e.Incomplete = 2] = "Incomplete", e[e.ESC = 3] = "ESC", e[e.Unknown = 4] = "Unknown", e[e.SGR = 5] = "SGR", e[e.OSCURL = 6] = "OSCURL";
|
|
27346
|
-
})(
|
|
27347
|
-
var
|
|
27357
|
+
})(Rb ||= {});
|
|
27358
|
+
var zb = class {
|
|
27348
27359
|
constructor() {
|
|
27349
27360
|
this.VERSION = "6.0.6", this.setup_palettes(), this._use_classes = !1, this.bold = !1, this.faint = !1, this.italic = !1, this.underline = !1, this.fg = this.bg = null, this._buffer = "", this._url_allowlist = {
|
|
27350
27361
|
http: 1,
|
|
@@ -27576,57 +27587,57 @@ var Rb = class {
|
|
|
27576
27587
|
}
|
|
27577
27588
|
get_next_packet() {
|
|
27578
27589
|
var e = {
|
|
27579
|
-
kind:
|
|
27590
|
+
kind: Rb.EOS,
|
|
27580
27591
|
text: "",
|
|
27581
27592
|
url: ""
|
|
27582
27593
|
}, t = this._buffer.length;
|
|
27583
27594
|
if (t == 0) return e;
|
|
27584
27595
|
var n = this._buffer.indexOf("\x1B");
|
|
27585
|
-
if (n == -1) return e.kind =
|
|
27586
|
-
if (n > 0) return e.kind =
|
|
27596
|
+
if (n == -1) return e.kind = Rb.Text, e.text = this._buffer, this._buffer = "", e;
|
|
27597
|
+
if (n > 0) return e.kind = Rb.Text, e.text = this._buffer.slice(0, n), this._buffer = this._buffer.slice(n), e;
|
|
27587
27598
|
if (n == 0) {
|
|
27588
|
-
if (t < 3) return e.kind =
|
|
27599
|
+
if (t < 3) return e.kind = Rb.Incomplete, e;
|
|
27589
27600
|
var r = this._buffer.charAt(1);
|
|
27590
|
-
if (r != "[" && r != "]" && r != "(") return e.kind =
|
|
27601
|
+
if (r != "[" && r != "]" && r != "(") return e.kind = Rb.ESC, e.text = this._buffer.slice(0, 1), this._buffer = this._buffer.slice(1), e;
|
|
27591
27602
|
if (r == "[") {
|
|
27592
|
-
this._csi_regex ||=
|
|
27603
|
+
this._csi_regex ||= Bb(Hb ||= Lb(["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \x1B[ # CSI\n ([<-?]?) # private-mode char\n ([d;]*) # any digits or semicolons\n ([ -/]? # an intermediate modifier\n [@-~]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \x1B[ # CSI\n [ -~]* # anything legal\n ([\0-:]) # anything illegal\n )\n "], ["\n ^ # beginning of line\n #\n # First attempt\n (?: # legal sequence\n \\x1b\\[ # CSI\n ([\\x3c-\\x3f]?) # private-mode char\n ([\\d;]*) # any digits or semicolons\n ([\\x20-\\x2f]? # an intermediate modifier\n [\\x40-\\x7e]) # the command\n )\n | # alternate (second attempt)\n (?: # illegal sequence\n \\x1b\\[ # CSI\n [\\x20-\\x7e]* # anything legal\n ([\\x00-\\x1f:]) # anything illegal\n )\n "]));
|
|
27593
27604
|
let t = this._buffer.match(this._csi_regex);
|
|
27594
|
-
if (t === null) return e.kind =
|
|
27595
|
-
if (t[4]) return e.kind =
|
|
27596
|
-
e.kind = t[1] != "" || t[3] != "m" ?
|
|
27605
|
+
if (t === null) return e.kind = Rb.Incomplete, e;
|
|
27606
|
+
if (t[4]) return e.kind = Rb.ESC, e.text = this._buffer.slice(0, 1), this._buffer = this._buffer.slice(1), e;
|
|
27607
|
+
e.kind = t[1] != "" || t[3] != "m" ? Rb.Unknown : Rb.SGR, e.text = t[2];
|
|
27597
27608
|
var i = t[0].length;
|
|
27598
27609
|
return this._buffer = this._buffer.slice(i), e;
|
|
27599
27610
|
}
|
|
27600
27611
|
if (r == "]") {
|
|
27601
|
-
if (t < 4) return e.kind =
|
|
27602
|
-
if (this._buffer.charAt(2) != "8" || this._buffer.charAt(3) != ";") return e.kind =
|
|
27603
|
-
this._osc_st ||=
|
|
27612
|
+
if (t < 4) return e.kind = Rb.Incomplete, e;
|
|
27613
|
+
if (this._buffer.charAt(2) != "8" || this._buffer.charAt(3) != ";") return e.kind = Rb.ESC, e.text = this._buffer.slice(0, 1), this._buffer = this._buffer.slice(1), e;
|
|
27614
|
+
this._osc_st ||= Vb(Ub ||= Lb(["\n (?: # legal sequence\n (\x1B\\) # ESC | # alternate\n (\x07) # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\0-] # anything illegal\n | # alternate\n [\b-] # anything illegal\n | # alternate\n [-] # anything illegal\n )\n "], ["\n (?: # legal sequence\n (\\x1b\\\\) # ESC \\\n | # alternate\n (\\x07) # BEL (what xterm did)\n )\n | # alternate (second attempt)\n ( # illegal sequence\n [\\x00-\\x06] # anything illegal\n | # alternate\n [\\x08-\\x1a] # anything illegal\n | # alternate\n [\\x1c-\\x1f] # anything illegal\n )\n "])), this._osc_st.lastIndex = 0;
|
|
27604
27615
|
{
|
|
27605
27616
|
let t = this._osc_st.exec(this._buffer);
|
|
27606
|
-
if (t === null) return e.kind =
|
|
27607
|
-
if (t[3]) return e.kind =
|
|
27617
|
+
if (t === null) return e.kind = Rb.Incomplete, e;
|
|
27618
|
+
if (t[3]) return e.kind = Rb.ESC, e.text = this._buffer.slice(0, 1), this._buffer = this._buffer.slice(1), e;
|
|
27608
27619
|
}
|
|
27609
27620
|
{
|
|
27610
27621
|
let t = this._osc_st.exec(this._buffer);
|
|
27611
|
-
if (t === null) return e.kind =
|
|
27612
|
-
if (t[3]) return e.kind =
|
|
27622
|
+
if (t === null) return e.kind = Rb.Incomplete, e;
|
|
27623
|
+
if (t[3]) return e.kind = Rb.ESC, e.text = this._buffer.slice(0, 1), this._buffer = this._buffer.slice(1), e;
|
|
27613
27624
|
}
|
|
27614
|
-
this._osc_regex ||=
|
|
27625
|
+
this._osc_regex ||= Bb(Wb ||= Lb(["\n ^ # beginning of line\n #\n \x1B]8; # OSC Hyperlink\n [ -:<-~]* # params (excluding ;)\n ; # end of params\n ([!-~]{0,512}) # URL capture\n (?: # ST\n (?:\x1B\\) # ESC | # alternate\n (?:\x07) # BEL (what xterm did)\n )\n ([ -~]+) # TEXT capture\n \x1B]8;; # OSC Hyperlink End\n (?: # ST\n (?:\x1B\\) # ESC | # alternate\n (?:\x07) # BEL (what xterm did)\n )\n "], ["\n ^ # beginning of line\n #\n \\x1b\\]8; # OSC Hyperlink\n [\\x20-\\x3a\\x3c-\\x7e]* # params (excluding ;)\n ; # end of params\n ([\\x21-\\x7e]{0,512}) # URL capture\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n ([\\x20-\\x7e]+) # TEXT capture\n \\x1b\\]8;; # OSC Hyperlink End\n (?: # ST\n (?:\\x1b\\\\) # ESC \\\n | # alternate\n (?:\\x07) # BEL (what xterm did)\n )\n "]));
|
|
27615
27626
|
let n = this._buffer.match(this._osc_regex);
|
|
27616
|
-
if (n === null) return e.kind =
|
|
27617
|
-
e.kind =
|
|
27627
|
+
if (n === null) return e.kind = Rb.ESC, e.text = this._buffer.slice(0, 1), this._buffer = this._buffer.slice(1), e;
|
|
27628
|
+
e.kind = Rb.OSCURL, e.url = n[1], e.text = n[2];
|
|
27618
27629
|
var i = n[0].length;
|
|
27619
27630
|
return this._buffer = this._buffer.slice(i), e;
|
|
27620
27631
|
}
|
|
27621
|
-
if (r == "(") return e.kind =
|
|
27632
|
+
if (r == "(") return e.kind = Rb.Unknown, this._buffer = this._buffer.slice(3), e;
|
|
27622
27633
|
}
|
|
27623
27634
|
}
|
|
27624
27635
|
ansi_to_html(e) {
|
|
27625
27636
|
this.append_buffer(e);
|
|
27626
27637
|
for (var t = [];;) {
|
|
27627
27638
|
var n = this.get_next_packet();
|
|
27628
|
-
if (n.kind ==
|
|
27629
|
-
n.kind !=
|
|
27639
|
+
if (n.kind == Rb.EOS || n.kind == Rb.Incomplete) break;
|
|
27640
|
+
n.kind != Rb.ESC && n.kind != Rb.Unknown && (n.kind == Rb.Text ? t.push(this.transform_to_html(this.with_state(n))) : n.kind == Rb.SGR ? this.process_ansi(n) : n.kind == Rb.OSCURL && t.push(this.process_hyperlink(n)));
|
|
27630
27641
|
}
|
|
27631
27642
|
return t.join("");
|
|
27632
27643
|
}
|
|
@@ -27696,16 +27707,16 @@ var Rb = class {
|
|
|
27696
27707
|
return t.length < 1 || !this._url_allowlist[t[0]] ? "" : `<a href="${this.escape_txt_for_html(e.url)}">${this.escape_txt_for_html(e.text)}</a>`;
|
|
27697
27708
|
}
|
|
27698
27709
|
};
|
|
27699
|
-
function
|
|
27710
|
+
function Bb(e, ...t) {
|
|
27700
27711
|
let n = e.raw[0].replace(/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm, "");
|
|
27701
27712
|
return new RegExp(n);
|
|
27702
27713
|
}
|
|
27703
|
-
function
|
|
27714
|
+
function Vb(e, ...t) {
|
|
27704
27715
|
let n = e.raw[0].replace(/^\s+|\s+\n|\s*#[\s\S]*?\n|\n/gm, "");
|
|
27705
27716
|
return new RegExp(n, "g");
|
|
27706
27717
|
}
|
|
27707
|
-
var
|
|
27708
|
-
function
|
|
27718
|
+
var Hb, Ub, Wb, Gb = new zb();
|
|
27719
|
+
function Kb(e) {
|
|
27709
27720
|
try {
|
|
27710
27721
|
let t = document.createElement("div");
|
|
27711
27722
|
return t.innerHTML = e, (t.textContent || t.innerText || "").split("\n").map((e) => e.trimEnd()).join("\n");
|
|
@@ -27713,24 +27724,24 @@ function Gb(e) {
|
|
|
27713
27724
|
return a.error("Error parsing HTML content:", t), e;
|
|
27714
27725
|
}
|
|
27715
27726
|
}
|
|
27716
|
-
function
|
|
27727
|
+
function qb(e) {
|
|
27717
27728
|
if (!e) return "";
|
|
27718
27729
|
try {
|
|
27719
|
-
return Gb
|
|
27730
|
+
return Kb(Gb.ansi_to_html(e));
|
|
27720
27731
|
} catch (t) {
|
|
27721
27732
|
return a.error("Error converting ANSI to plain text:", t), e;
|
|
27722
27733
|
}
|
|
27723
27734
|
}
|
|
27724
27735
|
//#endregion
|
|
27725
27736
|
//#region src/core/errors/traceback-atom.ts
|
|
27726
|
-
var
|
|
27737
|
+
var Jb = A(null);
|
|
27727
27738
|
//#endregion
|
|
27728
27739
|
//#region src/core/cells/logs.ts
|
|
27729
|
-
function
|
|
27740
|
+
function Yb(e) {
|
|
27730
27741
|
return e.type === "cell" ? e.cellId : `lsp:${e.name}`;
|
|
27731
27742
|
}
|
|
27732
|
-
var
|
|
27733
|
-
function
|
|
27743
|
+
var Xb = !1;
|
|
27744
|
+
function Zb(e) {
|
|
27734
27745
|
let t = [], n = [e.console].filter(Boolean).flat();
|
|
27735
27746
|
for (let r of n) {
|
|
27736
27747
|
let n = r.mimetype === "text/plain", i = r.mimetype === "text/html" || r.mimetype === "application/vnd.marimo+traceback";
|
|
@@ -27740,7 +27751,7 @@ function Xb(e) {
|
|
|
27740
27751
|
case "stdout":
|
|
27741
27752
|
case "stderr":
|
|
27742
27753
|
case "marimo-error": {
|
|
27743
|
-
let a = ne.asString(r.data), o = i ?
|
|
27754
|
+
let a = ne.asString(r.data), o = i ? Kb(a) : a;
|
|
27744
27755
|
t.push({
|
|
27745
27756
|
timestamp: r.timestamp || Date.now(),
|
|
27746
27757
|
level: n ? "stderr" : "stdout",
|
|
@@ -27755,9 +27766,9 @@ function Xb(e) {
|
|
|
27755
27766
|
}
|
|
27756
27767
|
}
|
|
27757
27768
|
}
|
|
27758
|
-
if (t.forEach(
|
|
27769
|
+
if (t.forEach(Qb.log), n.length === 0 && Vc(e.output?.mimetype) && Array.isArray(e.output.data)) {
|
|
27759
27770
|
e.output.data.forEach((t) => {
|
|
27760
|
-
|
|
27771
|
+
Qb.log({
|
|
27761
27772
|
level: "stderr",
|
|
27762
27773
|
source: {
|
|
27763
27774
|
type: "cell",
|
|
@@ -27768,8 +27779,8 @@ function Xb(e) {
|
|
|
27768
27779
|
});
|
|
27769
27780
|
});
|
|
27770
27781
|
let t = e.output.data.filter((e) => "type" in e && e.type === "exception" || e.type === "internal"), n = j.get(E) === "read";
|
|
27771
|
-
if (t.length > 0 && !
|
|
27772
|
-
|
|
27782
|
+
if (t.length > 0 && !Xb && n) {
|
|
27783
|
+
Xb = !0;
|
|
27773
27784
|
let e = t.find((e) => e.traceback);
|
|
27774
27785
|
f(e ? {
|
|
27775
27786
|
title: "An internal error occurred",
|
|
@@ -27778,7 +27789,7 @@ function Xb(e) {
|
|
|
27778
27789
|
action: F.createElement(Ae, {
|
|
27779
27790
|
altText: "View traceback",
|
|
27780
27791
|
onClick: () => {
|
|
27781
|
-
j.set(
|
|
27792
|
+
j.set(Jb, {
|
|
27782
27793
|
traceback: e.traceback,
|
|
27783
27794
|
errorMessage: e.msg || "An internal error occurred"
|
|
27784
27795
|
});
|
|
@@ -27793,13 +27804,13 @@ function Xb(e) {
|
|
|
27793
27804
|
}
|
|
27794
27805
|
return t;
|
|
27795
27806
|
}
|
|
27796
|
-
var
|
|
27807
|
+
var Qb = { log: (e) => {
|
|
27797
27808
|
let t = e.level === "stdout" ? "gray" : e.level === "stderr" ? "red" : "orange", n = e.level.toUpperCase();
|
|
27798
|
-
console.log(`%c[${n}]`, `color:${t}; padding:2px 0; border-radius:2px; font-weight:bold`, `[${
|
|
27809
|
+
console.log(`%c[${n}]`, `color:${t}; padding:2px 0; border-radius:2px; font-weight:bold`, `[${$b(e.timestamp)}]`, `(${Yb(e.source)}) ${e.message}`);
|
|
27799
27810
|
} };
|
|
27800
|
-
function
|
|
27811
|
+
function $b(e) {
|
|
27801
27812
|
try {
|
|
27802
|
-
return
|
|
27813
|
+
return Ib(e).toLocaleTimeString(void 0, {
|
|
27803
27814
|
hour12: !0,
|
|
27804
27815
|
hour: "numeric",
|
|
27805
27816
|
minute: "numeric",
|
|
@@ -27811,10 +27822,10 @@ function Qb(e) {
|
|
|
27811
27822
|
}
|
|
27812
27823
|
//#endregion
|
|
27813
27824
|
//#region src/components/editor/navigation/focus-utils.ts
|
|
27814
|
-
function
|
|
27825
|
+
function ex() {
|
|
27815
27826
|
return document.activeElement instanceof HTMLElement && document.activeElement.classList.contains("marimo-cell");
|
|
27816
27827
|
}
|
|
27817
|
-
function
|
|
27828
|
+
function tx(e) {
|
|
27818
27829
|
try {
|
|
27819
27830
|
e.focus();
|
|
27820
27831
|
} catch {
|
|
@@ -27823,7 +27834,7 @@ function ex(e) {
|
|
|
27823
27834
|
}
|
|
27824
27835
|
//#endregion
|
|
27825
27836
|
//#region src/utils/timeout.ts
|
|
27826
|
-
function
|
|
27837
|
+
function nx(e, t) {
|
|
27827
27838
|
let { retries: n, delay: r, initialDelay: i = 0 } = t, o = 0, s = () => {
|
|
27828
27839
|
if (o < n) {
|
|
27829
27840
|
try {
|
|
@@ -27838,18 +27849,18 @@ function tx(e, t) {
|
|
|
27838
27849
|
}
|
|
27839
27850
|
//#endregion
|
|
27840
27851
|
//#region src/core/cells/scrollCellIntoView.ts
|
|
27841
|
-
function
|
|
27852
|
+
function rx({ cellId: e, cell: t, isCodeHidden: n, codeFocus: r, variableName: i }) {
|
|
27842
27853
|
if (!t) return;
|
|
27843
27854
|
let o = document.getElementById(Jr.create(e));
|
|
27844
27855
|
if (!o) {
|
|
27845
27856
|
a.warn("scrollCellIntoView: element not found");
|
|
27846
27857
|
return;
|
|
27847
27858
|
}
|
|
27848
|
-
if (
|
|
27849
|
-
|
|
27859
|
+
if (ex()) {
|
|
27860
|
+
tx(o);
|
|
27850
27861
|
return;
|
|
27851
27862
|
}
|
|
27852
|
-
if (n)
|
|
27863
|
+
if (n) tx(o);
|
|
27853
27864
|
else {
|
|
27854
27865
|
Ei.promote(e);
|
|
27855
27866
|
let n = t.current?.editorView;
|
|
@@ -27858,7 +27869,7 @@ function nx({ cellId: e, cell: t, isCodeHidden: n, codeFocus: r, variableName: i
|
|
|
27858
27869
|
return;
|
|
27859
27870
|
}
|
|
27860
27871
|
if (n.hasFocus || !document.hasFocus()) return;
|
|
27861
|
-
if (
|
|
27872
|
+
if (nx(() => (n.focus(), n.hasFocus), {
|
|
27862
27873
|
retries: 5,
|
|
27863
27874
|
delay: 20
|
|
27864
27875
|
}), r === "top") n.dispatch({ selection: {
|
|
@@ -27878,14 +27889,14 @@ function nx({ cellId: e, cell: t, isCodeHidden: n, codeFocus: r, variableName: i
|
|
|
27878
27889
|
block: "nearest"
|
|
27879
27890
|
});
|
|
27880
27891
|
}
|
|
27881
|
-
function
|
|
27892
|
+
function ix() {
|
|
27882
27893
|
let e = document.getElementById("App");
|
|
27883
27894
|
e?.scrollTo({
|
|
27884
27895
|
top: e.scrollHeight,
|
|
27885
27896
|
behavior: "smooth"
|
|
27886
27897
|
});
|
|
27887
27898
|
}
|
|
27888
|
-
function
|
|
27899
|
+
function ax() {
|
|
27889
27900
|
document.getElementById("App")?.scrollTo({
|
|
27890
27901
|
top: 0,
|
|
27891
27902
|
behavior: "smooth"
|
|
@@ -27893,7 +27904,7 @@ function ix() {
|
|
|
27893
27904
|
}
|
|
27894
27905
|
//#endregion
|
|
27895
27906
|
//#region src/core/cells/types.ts
|
|
27896
|
-
function
|
|
27907
|
+
function ox({ id: e, name: t = "_", code: n = "", lastCodeRun: r = null, lastExecutionTime: i = null, edited: a = !1, config: o, serializedEditorState: s = null }) {
|
|
27897
27908
|
return {
|
|
27898
27909
|
id: e,
|
|
27899
27910
|
config: o || {
|
|
@@ -27910,7 +27921,7 @@ function ax({ id: e, name: t = "_", code: n = "", lastCodeRun: r = null, lastExe
|
|
|
27910
27921
|
serializedEditorState: s
|
|
27911
27922
|
};
|
|
27912
27923
|
}
|
|
27913
|
-
function
|
|
27924
|
+
function sx(e) {
|
|
27914
27925
|
return {
|
|
27915
27926
|
hide_code: !1,
|
|
27916
27927
|
disabled: !1,
|
|
@@ -27919,7 +27930,7 @@ function ox(e) {
|
|
|
27919
27930
|
...e
|
|
27920
27931
|
};
|
|
27921
27932
|
}
|
|
27922
|
-
function
|
|
27933
|
+
function cx(e) {
|
|
27923
27934
|
return {
|
|
27924
27935
|
outline: null,
|
|
27925
27936
|
output: null,
|
|
@@ -27938,7 +27949,7 @@ function sx(e) {
|
|
|
27938
27949
|
}
|
|
27939
27950
|
//#endregion
|
|
27940
27951
|
//#region src/core/cells/cells.ts
|
|
27941
|
-
function
|
|
27952
|
+
function lx(e) {
|
|
27942
27953
|
let t = {
|
|
27943
27954
|
column: 0,
|
|
27944
27955
|
hide_code: !1,
|
|
@@ -27948,14 +27959,14 @@ function cx(e) {
|
|
|
27948
27959
|
return {
|
|
27949
27960
|
...e,
|
|
27950
27961
|
cellData: {
|
|
27951
|
-
[Gr]:
|
|
27962
|
+
[Gr]: ox({
|
|
27952
27963
|
id: Gr,
|
|
27953
27964
|
config: t
|
|
27954
27965
|
}),
|
|
27955
27966
|
...e.cellData
|
|
27956
27967
|
},
|
|
27957
27968
|
cellRuntime: {
|
|
27958
|
-
[Gr]:
|
|
27969
|
+
[Gr]: cx(),
|
|
27959
27970
|
...e.cellRuntime
|
|
27960
27971
|
},
|
|
27961
27972
|
cellHandles: {
|
|
@@ -27964,8 +27975,8 @@ function cx(e) {
|
|
|
27964
27975
|
}
|
|
27965
27976
|
};
|
|
27966
27977
|
}
|
|
27967
|
-
function
|
|
27968
|
-
return
|
|
27978
|
+
function ux() {
|
|
27979
|
+
return lx({
|
|
27969
27980
|
cellIds: yi.from([]),
|
|
27970
27981
|
cellData: {},
|
|
27971
27982
|
cellRuntime: {},
|
|
@@ -27976,7 +27987,7 @@ function lx() {
|
|
|
27976
27987
|
untouchedNewCells: /* @__PURE__ */ new Set()
|
|
27977
27988
|
});
|
|
27978
27989
|
}
|
|
27979
|
-
var { reducer:
|
|
27990
|
+
var { reducer: dx, addMiddleware: fx, createActions: px, useActions: mx, valueAtom: $ } = y(ux, {
|
|
27980
27991
|
createNewCell: (e, t) => {
|
|
27981
27992
|
let { cellId: n, before: r, code: i, name: a, config: o, lastCodeRun: s = null, lastExecutionTime: c = null, autoFocus: l = !0, skipIfCodeExists: u = !1, hideCode: d = void 0 } = t, f, p;
|
|
27982
27993
|
if (u) {
|
|
@@ -27998,12 +28009,12 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
27998
28009
|
cellIds: e.cellIds.insertId(m, f, h),
|
|
27999
28010
|
cellData: {
|
|
28000
28011
|
...e.cellData,
|
|
28001
|
-
[m]:
|
|
28012
|
+
[m]: ox({
|
|
28002
28013
|
id: m,
|
|
28003
28014
|
code: i,
|
|
28004
28015
|
name: a,
|
|
28005
28016
|
lastCodeRun: s,
|
|
28006
|
-
config:
|
|
28017
|
+
config: sx({
|
|
28007
28018
|
...o,
|
|
28008
28019
|
...d != null && { hide_code: d }
|
|
28009
28020
|
}),
|
|
@@ -28013,7 +28024,7 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28013
28024
|
},
|
|
28014
28025
|
cellRuntime: {
|
|
28015
28026
|
...e.cellRuntime,
|
|
28016
|
-
[m]:
|
|
28027
|
+
[m]: cx()
|
|
28017
28028
|
},
|
|
28018
28029
|
cellHandles: {
|
|
28019
28030
|
...e.cellHandles,
|
|
@@ -28115,10 +28126,10 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28115
28126
|
let { cellId: r, where: i } = t, a = n.indexOfOrThrow(r), o;
|
|
28116
28127
|
o = i === "before" ? Nt(a - 1, 0, n.length - 1) : i === "after" ? Nt(a + 1, 0, n.length - 1) : a;
|
|
28117
28128
|
let s = n.atOrThrow(o);
|
|
28118
|
-
return
|
|
28129
|
+
return rx({
|
|
28119
28130
|
cellId: s,
|
|
28120
28131
|
cell: e.cellHandles[s],
|
|
28121
|
-
isCodeHidden:
|
|
28132
|
+
isCodeHidden: hx(e, s),
|
|
28122
28133
|
codeFocus: i === "after" ? "top" : "bottom",
|
|
28123
28134
|
variableName: void 0
|
|
28124
28135
|
}), e;
|
|
@@ -28127,25 +28138,25 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28127
28138
|
let t = e.cellIds.getColumns().at(0);
|
|
28128
28139
|
if (t === void 0 || t.length === 0) return e;
|
|
28129
28140
|
let n = t.first();
|
|
28130
|
-
return
|
|
28141
|
+
return rx({
|
|
28131
28142
|
cellId: n,
|
|
28132
28143
|
cell: e.cellHandles[n],
|
|
28133
|
-
isCodeHidden:
|
|
28144
|
+
isCodeHidden: hx(e, n),
|
|
28134
28145
|
codeFocus: void 0,
|
|
28135
28146
|
variableName: void 0
|
|
28136
|
-
}),
|
|
28147
|
+
}), ax(), e;
|
|
28137
28148
|
},
|
|
28138
28149
|
focusBottomCell: (e) => {
|
|
28139
28150
|
let t = e.cellIds.getColumns().at(-1);
|
|
28140
28151
|
if (t === void 0 || t.length === 0) return e;
|
|
28141
28152
|
let n = t.last();
|
|
28142
|
-
return
|
|
28153
|
+
return rx({
|
|
28143
28154
|
cellId: n,
|
|
28144
28155
|
cell: e.cellHandles[n],
|
|
28145
|
-
isCodeHidden:
|
|
28156
|
+
isCodeHidden: hx(e, n),
|
|
28146
28157
|
codeFocus: void 0,
|
|
28147
28158
|
variableName: void 0
|
|
28148
|
-
}),
|
|
28159
|
+
}), ix(), e;
|
|
28149
28160
|
},
|
|
28150
28161
|
sendToTop: (e, t) => {
|
|
28151
28162
|
let n = e.cellIds.findWithId(t.cellId);
|
|
@@ -28174,11 +28185,11 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28174
28185
|
cellIds: e.cellIds.addColumn(t.columnId, [n]),
|
|
28175
28186
|
cellData: {
|
|
28176
28187
|
...e.cellData,
|
|
28177
|
-
[n]:
|
|
28188
|
+
[n]: ox({ id: n })
|
|
28178
28189
|
},
|
|
28179
28190
|
cellRuntime: {
|
|
28180
28191
|
...e.cellRuntime,
|
|
28181
|
-
[n]:
|
|
28192
|
+
[n]: cx()
|
|
28182
28193
|
},
|
|
28183
28194
|
cellHandles: {
|
|
28184
28195
|
...e.cellHandles,
|
|
@@ -28224,7 +28235,7 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28224
28235
|
let i = r.indexOfOrThrow(n), o = i === 0 ? 1 : i - 1, s = null;
|
|
28225
28236
|
r.length > 1 && (s = r.atOrThrow(o));
|
|
28226
28237
|
let c = (e.cellHandles[n].current?.editorView)?.state.toJSON({ history: Tt });
|
|
28227
|
-
c && (c.doc = e.cellData[n].code),
|
|
28238
|
+
c && (c.doc = e.cellData[n].code), Px(n);
|
|
28228
28239
|
let l = e.cellData[n];
|
|
28229
28240
|
return {
|
|
28230
28241
|
...e,
|
|
@@ -28262,7 +28273,7 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28262
28273
|
scrollKey: n[0] ?? null
|
|
28263
28274
|
};
|
|
28264
28275
|
}
|
|
28265
|
-
let { name: n, serializedEditorState: r = { doc: "" }, column: i, index: a, isSetupCell: o, config: s } = t, c = o ? Kr : qr.create(), l =
|
|
28276
|
+
let { name: n, serializedEditorState: r = { doc: "" }, column: i, index: a, isSetupCell: o, config: s } = t, c = o ? Kr : qr.create(), l = ox({
|
|
28266
28277
|
id: c,
|
|
28267
28278
|
name: n,
|
|
28268
28279
|
code: r.doc,
|
|
@@ -28279,7 +28290,7 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28279
28290
|
},
|
|
28280
28291
|
cellRuntime: {
|
|
28281
28292
|
...e.cellRuntime,
|
|
28282
|
-
[c]:
|
|
28293
|
+
[c]: cx()
|
|
28283
28294
|
},
|
|
28284
28295
|
cellHandles: {
|
|
28285
28296
|
...e.cellHandles,
|
|
@@ -28291,7 +28302,7 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28291
28302
|
},
|
|
28292
28303
|
clearSerializedEditorState: (e, t) => {
|
|
28293
28304
|
let { cellId: n } = t;
|
|
28294
|
-
return
|
|
28305
|
+
return _x({
|
|
28295
28306
|
state: e,
|
|
28296
28307
|
cellId: n,
|
|
28297
28308
|
cellReducer: (e) => ({
|
|
@@ -28302,7 +28313,7 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28302
28313
|
},
|
|
28303
28314
|
updateCellCode: (e, t) => {
|
|
28304
28315
|
let { cellId: n, code: r, formattingChange: i } = t;
|
|
28305
|
-
return e.cellData[n] ?
|
|
28316
|
+
return e.cellData[n] ? _x({
|
|
28306
28317
|
state: e,
|
|
28307
28318
|
cellId: n,
|
|
28308
28319
|
cellReducer: (e) => i ? {
|
|
@@ -28318,7 +28329,7 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28318
28329
|
},
|
|
28319
28330
|
updateCellName: (e, t) => {
|
|
28320
28331
|
let { cellId: n, name: r } = t;
|
|
28321
|
-
return
|
|
28332
|
+
return _x({
|
|
28322
28333
|
state: e,
|
|
28323
28334
|
cellId: n,
|
|
28324
28335
|
cellReducer: (e) => ({
|
|
@@ -28329,23 +28340,23 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28329
28340
|
},
|
|
28330
28341
|
updateCellConfig: (e, t) => {
|
|
28331
28342
|
let { cellId: n, config: r } = t;
|
|
28332
|
-
return
|
|
28343
|
+
return _x({
|
|
28333
28344
|
state: e,
|
|
28334
28345
|
cellId: n,
|
|
28335
28346
|
cellReducer: (e) => ({
|
|
28336
28347
|
...e,
|
|
28337
|
-
config:
|
|
28348
|
+
config: sx({
|
|
28338
28349
|
...e.config,
|
|
28339
28350
|
...r
|
|
28340
28351
|
})
|
|
28341
28352
|
})
|
|
28342
28353
|
});
|
|
28343
28354
|
},
|
|
28344
|
-
prepareForRun: (e, t) =>
|
|
28345
|
-
state:
|
|
28355
|
+
prepareForRun: (e, t) => _x({
|
|
28356
|
+
state: gx({
|
|
28346
28357
|
state: e,
|
|
28347
28358
|
cellId: t.cellId,
|
|
28348
|
-
cellReducer: (e) =>
|
|
28359
|
+
cellReducer: (e) => lb(e)
|
|
28349
28360
|
}),
|
|
28350
28361
|
cellId: t.cellId,
|
|
28351
28362
|
cellReducer: (e) => ({
|
|
@@ -28355,12 +28366,12 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28355
28366
|
})
|
|
28356
28367
|
}),
|
|
28357
28368
|
handleCellMessage: (e, t) => {
|
|
28358
|
-
let n = t.cell_id, r =
|
|
28369
|
+
let n = t.cell_id, r = gx({
|
|
28359
28370
|
state: e,
|
|
28360
28371
|
cellId: n,
|
|
28361
|
-
cellReducer: (e) =>
|
|
28372
|
+
cellReducer: (e) => cb(e, t)
|
|
28362
28373
|
});
|
|
28363
|
-
return t.status === "queued" && (r =
|
|
28374
|
+
return t.status === "queued" && (r = _x({
|
|
28364
28375
|
state: r,
|
|
28365
28376
|
cellId: n,
|
|
28366
28377
|
cellReducer: (e) => ({
|
|
@@ -28370,7 +28381,7 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28370
28381
|
})
|
|
28371
28382
|
})), {
|
|
28372
28383
|
...r,
|
|
28373
|
-
cellLogs: [...r.cellLogs, ...
|
|
28384
|
+
cellLogs: [...r.cellLogs, ...Zb(t)]
|
|
28374
28385
|
};
|
|
28375
28386
|
},
|
|
28376
28387
|
addLogs: (e, t) => ({
|
|
@@ -28380,7 +28391,7 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28380
28391
|
setCellIds: (e, t) => {
|
|
28381
28392
|
if (Le(e.cellIds.inOrderIds, t.cellIds)) return e;
|
|
28382
28393
|
let n = { ...e.cellData }, r = { ...e.cellRuntime }, i = { ...e.cellHandles };
|
|
28383
|
-
for (let a of t.cellIds) a in e.cellData || (n[a] =
|
|
28394
|
+
for (let a of t.cellIds) a in e.cellData || (n[a] = ox({ id: a })), a in e.cellRuntime || (r[a] = cx()), a in e.cellHandles || (i[a] = (0, F.createRef)());
|
|
28384
28395
|
return {
|
|
28385
28396
|
...e,
|
|
28386
28397
|
cellIds: yi.fromWithPreviousShape(t.cellIds, e.cellIds),
|
|
@@ -28399,7 +28410,7 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28399
28410
|
setCellCodes: (e, t) => {
|
|
28400
28411
|
N(t.codes.length === t.ids.length, "Expected codes and ids to have the same length");
|
|
28401
28412
|
let n = { ...e }, r = ({ cell: e, code: r, cellId: i, name: a, config: o }) => {
|
|
28402
|
-
if (!e) return
|
|
28413
|
+
if (!e) return ox({
|
|
28403
28414
|
id: i,
|
|
28404
28415
|
code: r,
|
|
28405
28416
|
name: a,
|
|
@@ -28451,7 +28462,7 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28451
28462
|
},
|
|
28452
28463
|
setStdinResponse: (e, t) => {
|
|
28453
28464
|
let { cellId: n, response: r, outputIndex: i } = t;
|
|
28454
|
-
return
|
|
28465
|
+
return gx({
|
|
28455
28466
|
state: e,
|
|
28456
28467
|
cellId: n,
|
|
28457
28468
|
cellReducer: (e) => {
|
|
@@ -28461,6 +28472,7 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28461
28472
|
mimetype: n.mimetype,
|
|
28462
28473
|
data: n.data,
|
|
28463
28474
|
timestamp: n.timestamp,
|
|
28475
|
+
id: n.id,
|
|
28464
28476
|
response: n.mimetype === "text/password" ? "" : r
|
|
28465
28477
|
}, {
|
|
28466
28478
|
...e,
|
|
@@ -28472,11 +28484,11 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28472
28484
|
},
|
|
28473
28485
|
setCells: (e, t) => {
|
|
28474
28486
|
let n = Object.fromEntries(t.map((e) => [e.id, e])), r = _e(), i = (t) => {
|
|
28475
|
-
if (!r) return
|
|
28487
|
+
if (!r) return cx();
|
|
28476
28488
|
let n = e.cellRuntime[t];
|
|
28477
|
-
return n && (n.output != null || n.consoleOutputs.length > 0) ? n :
|
|
28489
|
+
return n && (n.output != null || n.consoleOutputs.length > 0) ? n : cx();
|
|
28478
28490
|
}, a = Object.fromEntries(t.map((e) => [e.id, i(e.id)]));
|
|
28479
|
-
return
|
|
28491
|
+
return lx({
|
|
28480
28492
|
...e,
|
|
28481
28493
|
cellIds: yi.fromIdsAndColumns(t.map((e) => [e.id, e.config.column])),
|
|
28482
28494
|
cellData: n,
|
|
@@ -28495,11 +28507,11 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28495
28507
|
cellIds: e.cellIds.insertId(t, a.id, s),
|
|
28496
28508
|
cellData: {
|
|
28497
28509
|
...e.cellData,
|
|
28498
|
-
[t]:
|
|
28510
|
+
[t]: ox({ id: t })
|
|
28499
28511
|
},
|
|
28500
28512
|
cellRuntime: {
|
|
28501
28513
|
...e.cellRuntime,
|
|
28502
|
-
[t]:
|
|
28514
|
+
[t]: cx()
|
|
28503
28515
|
},
|
|
28504
28516
|
cellHandles: {
|
|
28505
28517
|
...e.cellHandles,
|
|
@@ -28515,11 +28527,11 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28515
28527
|
cellIds: e.cellIds.insertId(t, a.id, 0),
|
|
28516
28528
|
cellData: {
|
|
28517
28529
|
...e.cellData,
|
|
28518
|
-
[t]:
|
|
28530
|
+
[t]: ox({ id: t })
|
|
28519
28531
|
},
|
|
28520
28532
|
cellRuntime: {
|
|
28521
28533
|
...e.cellRuntime,
|
|
28522
|
-
[t]:
|
|
28534
|
+
[t]: cx()
|
|
28523
28535
|
},
|
|
28524
28536
|
cellHandles: {
|
|
28525
28537
|
...e.cellHandles,
|
|
@@ -28531,10 +28543,10 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28531
28543
|
if ((c || l) && i) return e;
|
|
28532
28544
|
if (s >= 0 && s < a.length) {
|
|
28533
28545
|
let t = a.atOrThrow(s);
|
|
28534
|
-
|
|
28546
|
+
rx({
|
|
28535
28547
|
cellId: t,
|
|
28536
28548
|
cell: e.cellHandles[t],
|
|
28537
|
-
isCodeHidden:
|
|
28549
|
+
isCodeHidden: hx(e, t),
|
|
28538
28550
|
codeFocus: r ? "bottom" : "top",
|
|
28539
28551
|
variableName: void 0
|
|
28540
28552
|
});
|
|
@@ -28567,10 +28579,10 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28567
28579
|
let t = e.scrollKey;
|
|
28568
28580
|
if (t === null) return e;
|
|
28569
28581
|
let n = e.cellIds.findWithId(t), r = n.indexOfOrThrow(t), i = r === n.length - 1 ? n.last() : n.atOrThrow(r);
|
|
28570
|
-
return
|
|
28582
|
+
return rx({
|
|
28571
28583
|
cellId: i,
|
|
28572
28584
|
cell: e.cellHandles[i],
|
|
28573
|
-
isCodeHidden:
|
|
28585
|
+
isCodeHidden: hx(e, i),
|
|
28574
28586
|
codeFocus: void 0,
|
|
28575
28587
|
variableName: void 0
|
|
28576
28588
|
}), {
|
|
@@ -28650,7 +28662,7 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28650
28662
|
code: s,
|
|
28651
28663
|
edited: !!s && s.trim() !== a.lastCodeRun?.trim()
|
|
28652
28664
|
},
|
|
28653
|
-
[l]:
|
|
28665
|
+
[l]: ox({
|
|
28654
28666
|
id: l,
|
|
28655
28667
|
code: c,
|
|
28656
28668
|
edited: !!c
|
|
@@ -28663,7 +28675,7 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28663
28675
|
output: null,
|
|
28664
28676
|
consoleOutputs: []
|
|
28665
28677
|
},
|
|
28666
|
-
[l]:
|
|
28678
|
+
[l]: cx()
|
|
28667
28679
|
},
|
|
28668
28680
|
cellHandles: {
|
|
28669
28681
|
...e.cellHandles,
|
|
@@ -28701,7 +28713,7 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28701
28713
|
},
|
|
28702
28714
|
clearCellOutput: (e, t) => {
|
|
28703
28715
|
let { cellId: n } = t;
|
|
28704
|
-
return
|
|
28716
|
+
return gx({
|
|
28705
28717
|
state: e,
|
|
28706
28718
|
cellId: n,
|
|
28707
28719
|
cellReducer: (e) => ({
|
|
@@ -28713,7 +28725,7 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28713
28725
|
},
|
|
28714
28726
|
clearCellConsoleOutput: (e, t) => {
|
|
28715
28727
|
let { cellId: n } = t;
|
|
28716
|
-
return
|
|
28728
|
+
return gx({
|
|
28717
28729
|
state: e,
|
|
28718
28730
|
cellId: n,
|
|
28719
28731
|
cellReducer: (e) => ({
|
|
@@ -28744,7 +28756,7 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28744
28756
|
cellIds: e.cellIds.insertId(Kr, e.cellIds.atOrThrow(0).id, 0),
|
|
28745
28757
|
cellData: {
|
|
28746
28758
|
...e.cellData,
|
|
28747
|
-
[Kr]:
|
|
28759
|
+
[Kr]: ox({
|
|
28748
28760
|
id: Kr,
|
|
28749
28761
|
name: Kr,
|
|
28750
28762
|
code: n,
|
|
@@ -28753,7 +28765,7 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28753
28765
|
},
|
|
28754
28766
|
cellRuntime: {
|
|
28755
28767
|
...e.cellRuntime,
|
|
28756
|
-
[Kr]:
|
|
28768
|
+
[Kr]: cx()
|
|
28757
28769
|
},
|
|
28758
28770
|
cellHandles: {
|
|
28759
28771
|
...e.cellHandles,
|
|
@@ -28763,11 +28775,11 @@ var { reducer: ux, addMiddleware: dx, createActions: fx, useActions: px, valueAt
|
|
|
28763
28775
|
};
|
|
28764
28776
|
}
|
|
28765
28777
|
});
|
|
28766
|
-
|
|
28767
|
-
function
|
|
28778
|
+
fx(Fb);
|
|
28779
|
+
function hx(e, t) {
|
|
28768
28780
|
return !!e.cellData[t].config.hide_code && !e.untouchedNewCells.has(t);
|
|
28769
28781
|
}
|
|
28770
|
-
function
|
|
28782
|
+
function gx({ state: e, cellId: t, cellReducer: n }) {
|
|
28771
28783
|
return t in e.cellRuntime ? {
|
|
28772
28784
|
...e,
|
|
28773
28785
|
cellRuntime: {
|
|
@@ -28776,7 +28788,7 @@ function hx({ state: e, cellId: t, cellReducer: n }) {
|
|
|
28776
28788
|
}
|
|
28777
28789
|
} : (a.warn(`Cell ${t} not found in state`), e);
|
|
28778
28790
|
}
|
|
28779
|
-
function
|
|
28791
|
+
function _x({ state: e, cellId: t, cellReducer: n }) {
|
|
28780
28792
|
return t in e.cellData ? {
|
|
28781
28793
|
...e,
|
|
28782
28794
|
cellData: {
|
|
@@ -28785,11 +28797,11 @@ function gx({ state: e, cellId: t, cellReducer: n }) {
|
|
|
28785
28797
|
}
|
|
28786
28798
|
} : (a.warn(`Cell ${t} not found in state`), e);
|
|
28787
28799
|
}
|
|
28788
|
-
var
|
|
28789
|
-
j.set($, (t) =>
|
|
28790
|
-
}).addLogs,
|
|
28800
|
+
var vx = px((e) => {
|
|
28801
|
+
j.set($, (t) => dx(t, e));
|
|
28802
|
+
}).addLogs, yx = A((e) => e($).cellIds), bx = A((e) => e(yx).hasOnlyOneId());
|
|
28791
28803
|
A((e) => Kc(e($)).length > 0), A((e) => qc(e($)).length > 0), A((e) => Jc(e($))), A((e) => Yc(e($))), A((e) => Wc(e($)));
|
|
28792
|
-
var
|
|
28804
|
+
var xx = A((e) => {
|
|
28793
28805
|
let { cellIds: t, cellRuntime: n, cellData: r } = e($);
|
|
28794
28806
|
return t.inOrderIds.map((e) => {
|
|
28795
28807
|
let t = n[e], { name: i } = r[e];
|
|
@@ -28807,43 +28819,43 @@ var bx = A((e) => {
|
|
|
28807
28819
|
}
|
|
28808
28820
|
return null;
|
|
28809
28821
|
}).filter(Boolean);
|
|
28810
|
-
}),
|
|
28811
|
-
let t = e(
|
|
28822
|
+
}), Sx = A((e) => {
|
|
28823
|
+
let t = e(yx), n = e(kx);
|
|
28812
28824
|
return Ky(t.inOrderIds.map((e) => n[e].outline));
|
|
28813
28825
|
});
|
|
28814
|
-
A((e) => e(
|
|
28815
|
-
var
|
|
28826
|
+
A((e) => e(xx).length);
|
|
28827
|
+
var Cx = Ie(A((e) => {
|
|
28816
28828
|
let { cellIds: t, cellData: n } = e($);
|
|
28817
28829
|
return Pt.fromEntries(t.inOrderIds.map((e) => [e, n[e]?.name]));
|
|
28818
28830
|
}));
|
|
28819
28831
|
A((e) => e($).scrollKey);
|
|
28820
|
-
var
|
|
28832
|
+
var wx = () => Me(yx), Tx = () => Me(Cx), Ex = () => j.get($), Dx = () => j.get($).cellIds, Ox = () => {
|
|
28821
28833
|
let { cellIds: e, cellData: t } = j.get($);
|
|
28822
28834
|
return e.inOrderIds.map((e) => t[e]?.name).filter(Boolean);
|
|
28823
28835
|
};
|
|
28824
28836
|
br(pr($, (e) => e.cellIds.inOrderIds.map((t) => e.cellData[t])));
|
|
28825
|
-
var
|
|
28837
|
+
var kx = A((e) => e($).cellRuntime);
|
|
28826
28838
|
A((e) => Hc(e($))), A((e) => {
|
|
28827
28839
|
let { cellRuntime: t } = e($);
|
|
28828
28840
|
return Object.entries(t).every(([e, t]) => t.status !== "running" || e === "__scratch__");
|
|
28829
28841
|
}), A((e) => Uc(e($)));
|
|
28830
|
-
var
|
|
28842
|
+
var Ax = A((e) => e($).cellIds.colLength);
|
|
28831
28843
|
A((e) => e($).cellIds.idLength > 0), A((e) => e($).cellIds.getColumnIds());
|
|
28832
|
-
var
|
|
28833
|
-
function
|
|
28834
|
-
|
|
28844
|
+
var jx = lr((e) => A((t) => t($).cellData[e])), Mx = lr((e) => A((t) => t($).cellRuntime[e])), Nx = lr((e) => A((t) => t($).cellHandles[e]));
|
|
28845
|
+
function Px(e) {
|
|
28846
|
+
jx.remove(e), Mx.remove(e), Nx.remove(e);
|
|
28835
28847
|
}
|
|
28836
|
-
var
|
|
28848
|
+
var Fx = (e) => {
|
|
28837
28849
|
let { cellHandles: t } = j.get($);
|
|
28838
28850
|
return t[e].current?.editorView;
|
|
28839
|
-
},
|
|
28840
|
-
function
|
|
28851
|
+
}, Ix = (e) => (Ei.promote(e), Fx(e));
|
|
28852
|
+
function Lx(e) {
|
|
28841
28853
|
let t = (0, Tr.c)(2), n;
|
|
28842
|
-
return t[0] === e ? n = t[1] : (n = e === void 0 ? {} : e, t[0] = e, t[1] = n),
|
|
28854
|
+
return t[0] === e ? n = t[1] : (n = e === void 0 ? {} : e, t[0] = e, t[1] = n), mx(n);
|
|
28843
28855
|
}
|
|
28844
28856
|
//#endregion
|
|
28845
28857
|
//#region src/core/errors/error-entries.ts
|
|
28846
|
-
function
|
|
28858
|
+
function Rx(e) {
|
|
28847
28859
|
if (zc(e.mimetype)) {
|
|
28848
28860
|
if (!Array.isArray(e.data)) return null;
|
|
28849
28861
|
let t = e.data.filter((e) => !e.type.includes("ancestor"));
|
|
@@ -28854,23 +28866,23 @@ function Lx(e) {
|
|
|
28854
28866
|
tracebackHtml: e.data
|
|
28855
28867
|
} : null;
|
|
28856
28868
|
}
|
|
28857
|
-
function
|
|
28869
|
+
function zx(e) {
|
|
28858
28870
|
return e.some((e) => "traceback" in e && e.traceback);
|
|
28859
28871
|
}
|
|
28860
|
-
function
|
|
28872
|
+
function Bx(e) {
|
|
28861
28873
|
let t = e?.find((e) => Bc(e.mimetype));
|
|
28862
28874
|
if (!(!t || typeof t.data != "string" || t.data.length === 0)) return t.data;
|
|
28863
28875
|
}
|
|
28864
|
-
function
|
|
28876
|
+
function Vx(e, t) {
|
|
28865
28877
|
if (e.tracebackHtml) return e.tracebackHtml;
|
|
28866
|
-
if (!
|
|
28878
|
+
if (!zx(e.errorData)) return Bx(t);
|
|
28867
28879
|
}
|
|
28868
|
-
function
|
|
28880
|
+
function Hx(e) {
|
|
28869
28881
|
let { cellIds: t, cellRuntime: n, cellData: r } = e.get($), i = [];
|
|
28870
28882
|
for (let [e, a] of t.inOrderIds.entries()) {
|
|
28871
28883
|
let t = n[a], o = t.output;
|
|
28872
28884
|
if (!o || !Vc(o.mimetype)) continue;
|
|
28873
|
-
let s =
|
|
28885
|
+
let s = Rx(o);
|
|
28874
28886
|
if (!s) continue;
|
|
28875
28887
|
let c = hv(r[a].name, e), l = r[a].lastCodeRun ?? r[a].code;
|
|
28876
28888
|
i.push({
|
|
@@ -28878,21 +28890,21 @@ function Vx(e) {
|
|
|
28878
28890
|
cellName: c,
|
|
28879
28891
|
cellCode: l,
|
|
28880
28892
|
errorData: s.errorData,
|
|
28881
|
-
tracebackHtml:
|
|
28893
|
+
tracebackHtml: Vx(s, t.consoleOutputs)
|
|
28882
28894
|
});
|
|
28883
28895
|
}
|
|
28884
28896
|
return i;
|
|
28885
28897
|
}
|
|
28886
|
-
function Hx(e) {
|
|
28887
|
-
return e.type === "setup-refs" ? "The setup cell cannot have references" : e.type === "cycle" ? "This cell is in a cycle" : e.type === "multiple-defs" ? `The variable '${e.name}' was defined by another cell` : e.type === "import-star" || e.type === "ancestor-stopped" || e.type === "ancestor-prevented" || e.type === "exception" || e.type === "strict-exception" ? e.msg : e.type === "interruption" ? "This cell was interrupted and needs to be re-run" : e.type === "syntax" || e.type === "unknown" || e.type === "sql-error" ? e.msg : e.type === "internal" ? e.msg || "An internal error occurred" : (T(e), "Unknown error");
|
|
28888
|
-
}
|
|
28889
28898
|
function Ux(e) {
|
|
28890
|
-
|
|
28891
|
-
return "traceback" in e && e.traceback && (t += `\n\nTraceback:\n${Gb(e.traceback)}`), t;
|
|
28899
|
+
return e.type === "setup-refs" ? "The setup cell cannot have references" : e.type === "cycle" ? "This cell is in a cycle" : e.type === "multiple-defs" ? `The variable '${e.name}' was defined by another cell` : e.type === "import-star" || e.type === "ancestor-stopped" || e.type === "ancestor-prevented" || e.type === "exception" || e.type === "strict-exception" ? e.msg : e.type === "interruption" ? "This cell was interrupted and needs to be re-run" : e.type === "syntax" || e.type === "unknown" || e.type === "sql-error" ? e.msg : e.type === "internal" ? e.msg || "An internal error occurred" : (T(e), "Unknown error");
|
|
28892
28900
|
}
|
|
28893
28901
|
function Wx(e) {
|
|
28902
|
+
let t = Ux(e);
|
|
28903
|
+
return "traceback" in e && e.traceback && (t += `\n\nTraceback:\n${Kb(e.traceback)}`), t;
|
|
28904
|
+
}
|
|
28905
|
+
function Gx(e) {
|
|
28894
28906
|
let t = [e.cellName];
|
|
28895
|
-
return e.tracebackHtml && t.push(
|
|
28907
|
+
return e.tracebackHtml && t.push(Kb(e.tracebackHtml)), e.errorData.length > 0 && t.push(e.errorData.map(Wx).join("\n\n")), t.join("\n\n");
|
|
28896
28908
|
}
|
|
28897
28909
|
//#endregion
|
|
28898
|
-
export { bf as $, cr as $t, By as A, Gc as At, pv as B, ei as Bt,
|
|
28910
|
+
export { bf as $, cr as $t, By as A, Gc as At, pv as B, ei as Bt, qb as C, Fl as Ct, ub as D, el as Dt, Mb as E, nl as Et, bv as F, ui as Ft, wm as G, Xr as Gt, uv as H, Zr as Ht, xv as I, ci as It, Np as J, Vr as Jt, Cm as K, Yr as Kt, hv as L, li as Lt, Wv as M, $c as Mt, Lv as N, Mc as Nt, db as O, tl as Ot, Iv as P, hi as Pt, Vf as Q, Er as Qt, mv as R, ri as Rt, ox as S, Al as St, zb as T, hl as Tt, U_ as U, Jr as Ut, dv as V, ti as Vt, Vm as W, Gr as Wt, np as X, Ir as Xt, yp as Y, Fr as Yt, Hf as Z, Nr as Zt, Ax as _, Kl as _t, jx as a, Nn as an, zd as at, wx as b, Bl as bt, Ix as c, En as cn, Cd as ct, Dx as d, Sn as dn, dd as dt, wr as en, sf as et, Ex as f, xn as fn, cd as ft, Sx as g, pn as gn, Wl as gt, $ as h, hn, Jl as ht, Hx as i, Pn as in, Hd as it, Hv as j, Qc as jt, Gy as k, Zc as kt, Fx as l, wn as ln, vd as lt, ux as m, gn as mn, ql as mt, Gx as n, Bn as nn, Xd as nt, yx as o, jn as on, Td as ot, bx as p, yn as pn, hu as pt, Pp as q, Br as qt, Wx as r, Ln as rn, Jd as rt, px as s, kn as sn, Ed as st, Ux as t, pr as tn, Qd as tt, Ox as u, Cn as un, gd as ut, dx as v, Gl as vt, Kb as w, _l as wt, Tx as x, Pl as xt, Lx as y, Hl as yt, gv as z, $r as zt };
|