@marimo-team/islands 0.23.6-dev23 → 0.23.6-dev28
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/{chat-ui-CVfL3lSs.js → chat-ui-M5YTKtUS.js} +3 -3
- package/dist/{code-visibility-DLtrQQPk.js → code-visibility-BgeXZvoM.js} +525 -548
- package/dist/{formats-DJvu12E_.js → formats-CHpN2g_h.js} +1 -1
- package/dist/{html-to-image-Ctyt_1RZ.js → html-to-image-CH84rWtl.js} +1 -1
- package/dist/main.js +9 -9
- package/dist/{process-output-V4Xi7mGt.js → process-output-BDGfLHfB.js} +1 -1
- package/dist/{reveal-component-B_NMN2rm.js → reveal-component-DfAfYnKx.js} +11 -11
- package/dist/toDate-CGmcCn8J.js +662 -0
- package/dist/{vega-component-D3zDd-Uu.js → vega-component-ciCILQDB.js} +2 -2
- package/package.json +1 -1
- package/src/core/runtime/runtime.ts +3 -2
- package/src/core/wasm/__tests__/bridge.test.ts +26 -1
- package/src/core/wasm/bridge.ts +18 -4
- package/src/core/wasm/worker/getController.ts +7 -0
- package/src/core/wasm/worker/save-worker.ts +2 -1
- package/src/core/wasm/worker/worker.ts +2 -1
- package/src/plugins/impl/common/labeled.tsx +1 -1
- package/dist/toDate-0ZO2rMtR.js +0 -638
|
@@ -0,0 +1,662 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import { t as __commonJSMin } from "./chunk-BNovOVIE.js";
|
|
5
|
+
import { _ as Logger } from "./button-CA5pI2YF.js";
|
|
6
|
+
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
7
|
+
import { u as createLucideIcon } from "./dist-ESg7xyoD.js";
|
|
8
|
+
import { r as KnownQueryParams } from "./constants-D0gkYoE2.js";
|
|
9
|
+
import { f as waitFor, p as isIslands, u as store, y as atom } from "./useTheme-CByZUW0p.js";
|
|
10
|
+
import { t as invariant } from "./invariant-UcGKQEhF.js";
|
|
11
|
+
var CircleQuestionMark = createLucideIcon("circle-question-mark", [
|
|
12
|
+
["circle", {
|
|
13
|
+
cx: "12",
|
|
14
|
+
cy: "12",
|
|
15
|
+
r: "10",
|
|
16
|
+
key: "1mglay"
|
|
17
|
+
}],
|
|
18
|
+
["path", {
|
|
19
|
+
d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",
|
|
20
|
+
key: "1u773s"
|
|
21
|
+
}],
|
|
22
|
+
["path", {
|
|
23
|
+
d: "M12 17h.01",
|
|
24
|
+
key: "p32p05"
|
|
25
|
+
}]
|
|
26
|
+
]);
|
|
27
|
+
function isWasm() {
|
|
28
|
+
return typeof document < "u" && document.querySelector("marimo-wasm") !== null;
|
|
29
|
+
}
|
|
30
|
+
var Deferred = class {
|
|
31
|
+
constructor() {
|
|
32
|
+
__publicField(this, "status", "pending");
|
|
33
|
+
__publicField(this, "value");
|
|
34
|
+
this.promise = new Promise((e, b) => {
|
|
35
|
+
this.reject = (e2) => {
|
|
36
|
+
this.status = "rejected", b(e2);
|
|
37
|
+
}, this.resolve = (b2) => {
|
|
38
|
+
this.status = "resolved", isPromiseLike(b2) || (this.value = b2), e(b2);
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
function isPromiseLike(e) {
|
|
44
|
+
return typeof e == "object" && !!e && "then" in e && typeof e.then == "function";
|
|
45
|
+
}
|
|
46
|
+
const WebSocketState = {
|
|
47
|
+
NOT_STARTED: "NOT_STARTED",
|
|
48
|
+
CONNECTING: "CONNECTING",
|
|
49
|
+
OPEN: "OPEN",
|
|
50
|
+
CLOSING: "CLOSING",
|
|
51
|
+
CLOSED: "CLOSED"
|
|
52
|
+
}, connectionAtom = atom({ state: WebSocketState.NOT_STARTED });
|
|
53
|
+
function waitForConnectionOpen() {
|
|
54
|
+
return waitFor(connectionAtom, (e) => e.state === WebSocketState.OPEN);
|
|
55
|
+
}
|
|
56
|
+
atom((e) => e(connectionAtom).state === WebSocketState.CONNECTING), atom((e) => e(connectionAtom).state === WebSocketState.OPEN), atom((e) => {
|
|
57
|
+
let b = e(connectionAtom);
|
|
58
|
+
return b.state === WebSocketState.OPEN || b.state === WebSocketState.NOT_STARTED;
|
|
59
|
+
}), atom((e) => e(connectionAtom).state === WebSocketState.CLOSED), atom((e) => e(connectionAtom).state === WebSocketState.NOT_STARTED);
|
|
60
|
+
var require__u64 = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
61
|
+
Object.defineProperty(e, "__esModule", { value: true }), e.toBig = e.shrSL = e.shrSH = e.rotrSL = e.rotrSH = e.rotrBL = e.rotrBH = e.rotr32L = e.rotr32H = e.rotlSL = e.rotlSH = e.rotlBL = e.rotlBH = e.add5L = e.add5H = e.add4L = e.add4H = e.add3L = e.add3H = void 0, e.add = L, e.fromBig = S, e.split = C;
|
|
62
|
+
var b = /* @__PURE__ */ BigInt(2 ** 32 - 1), x = /* @__PURE__ */ BigInt(32);
|
|
63
|
+
function S(e2, S2 = false) {
|
|
64
|
+
return S2 ? {
|
|
65
|
+
h: Number(e2 & b),
|
|
66
|
+
l: Number(e2 >> x & b)
|
|
67
|
+
} : {
|
|
68
|
+
h: Number(e2 >> x & b) | 0,
|
|
69
|
+
l: Number(e2 & b) | 0
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function C(e2, b2 = false) {
|
|
73
|
+
let x2 = e2.length, C2 = new Uint32Array(x2), w2 = new Uint32Array(x2);
|
|
74
|
+
for (let T2 = 0; T2 < x2; T2++) {
|
|
75
|
+
let { h: x3, l: E2 } = S(e2[T2], b2);
|
|
76
|
+
[C2[T2], w2[T2]] = [x3, E2];
|
|
77
|
+
}
|
|
78
|
+
return [C2, w2];
|
|
79
|
+
}
|
|
80
|
+
var w = (e2, b2) => BigInt(e2 >>> 0) << x | BigInt(b2 >>> 0);
|
|
81
|
+
e.toBig = w;
|
|
82
|
+
var T = (e2, b2, x2) => e2 >>> x2;
|
|
83
|
+
e.shrSH = T;
|
|
84
|
+
var E = (e2, b2, x2) => e2 << 32 - x2 | b2 >>> x2;
|
|
85
|
+
e.shrSL = E;
|
|
86
|
+
var D = (e2, b2, x2) => e2 >>> x2 | b2 << 32 - x2;
|
|
87
|
+
e.rotrSH = D;
|
|
88
|
+
var O = (e2, b2, x2) => e2 << 32 - x2 | b2 >>> x2;
|
|
89
|
+
e.rotrSL = O;
|
|
90
|
+
var k = (e2, b2, x2) => e2 << 64 - x2 | b2 >>> x2 - 32;
|
|
91
|
+
e.rotrBH = k;
|
|
92
|
+
var A = (e2, b2, x2) => e2 >>> x2 - 32 | b2 << 64 - x2;
|
|
93
|
+
e.rotrBL = A;
|
|
94
|
+
var j = (e2, b2) => b2;
|
|
95
|
+
e.rotr32H = j;
|
|
96
|
+
var M = (e2, b2) => e2;
|
|
97
|
+
e.rotr32L = M;
|
|
98
|
+
var N = (e2, b2, x2) => e2 << x2 | b2 >>> 32 - x2;
|
|
99
|
+
e.rotlSH = N;
|
|
100
|
+
var P = (e2, b2, x2) => b2 << x2 | e2 >>> 32 - x2;
|
|
101
|
+
e.rotlSL = P;
|
|
102
|
+
var F = (e2, b2, x2) => b2 << x2 - 32 | e2 >>> 64 - x2;
|
|
103
|
+
e.rotlBH = F;
|
|
104
|
+
var I = (e2, b2, x2) => e2 << x2 - 32 | b2 >>> 64 - x2;
|
|
105
|
+
e.rotlBL = I;
|
|
106
|
+
function L(e2, b2, x2, S2) {
|
|
107
|
+
let C2 = (b2 >>> 0) + (S2 >>> 0);
|
|
108
|
+
return {
|
|
109
|
+
h: e2 + x2 + (C2 / 2 ** 32 | 0) | 0,
|
|
110
|
+
l: C2 | 0
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
var R = (e2, b2, x2) => (e2 >>> 0) + (b2 >>> 0) + (x2 >>> 0);
|
|
114
|
+
e.add3L = R;
|
|
115
|
+
var z = (e2, b2, x2, S2) => b2 + x2 + S2 + (e2 / 2 ** 32 | 0) | 0;
|
|
116
|
+
e.add3H = z;
|
|
117
|
+
var B = (e2, b2, x2, S2) => (e2 >>> 0) + (b2 >>> 0) + (x2 >>> 0) + (S2 >>> 0);
|
|
118
|
+
e.add4L = B;
|
|
119
|
+
var V = (e2, b2, x2, S2, C2) => b2 + x2 + S2 + C2 + (e2 / 2 ** 32 | 0) | 0;
|
|
120
|
+
e.add4H = V;
|
|
121
|
+
var H = (e2, b2, x2, S2, C2) => (e2 >>> 0) + (b2 >>> 0) + (x2 >>> 0) + (S2 >>> 0) + (C2 >>> 0);
|
|
122
|
+
e.add5L = H;
|
|
123
|
+
var U = (e2, b2, x2, S2, C2, w2) => b2 + x2 + S2 + C2 + w2 + (e2 / 2 ** 32 | 0) | 0;
|
|
124
|
+
e.add5H = U, e.default = {
|
|
125
|
+
fromBig: S,
|
|
126
|
+
split: C,
|
|
127
|
+
toBig: w,
|
|
128
|
+
shrSH: T,
|
|
129
|
+
shrSL: E,
|
|
130
|
+
rotrSH: D,
|
|
131
|
+
rotrSL: O,
|
|
132
|
+
rotrBH: k,
|
|
133
|
+
rotrBL: A,
|
|
134
|
+
rotr32H: j,
|
|
135
|
+
rotr32L: M,
|
|
136
|
+
rotlSH: N,
|
|
137
|
+
rotlSL: P,
|
|
138
|
+
rotlBH: F,
|
|
139
|
+
rotlBL: I,
|
|
140
|
+
add: L,
|
|
141
|
+
add3L: R,
|
|
142
|
+
add3H: z,
|
|
143
|
+
add4L: B,
|
|
144
|
+
add4H: V,
|
|
145
|
+
add5H: U,
|
|
146
|
+
add5L: H
|
|
147
|
+
};
|
|
148
|
+
})), require_crypto = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
149
|
+
Object.defineProperty(e, "__esModule", { value: true }), e.crypto = void 0, e.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
|
|
150
|
+
})), require_utils = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
151
|
+
Object.defineProperty(e, "__esModule", { value: true }), e.wrapXOFConstructorWithOpts = e.wrapConstructorWithOpts = e.wrapConstructor = e.Hash = e.nextTick = e.swap32IfBE = e.byteSwapIfBE = e.swap8IfBE = e.isLE = void 0, e.isBytes = x, e.anumber = S, e.abytes = C, e.ahash = w, e.aexists = T, e.aoutput = E, e.u8 = D, e.u32 = O, e.clean = k, e.createView = A, e.rotr = j, e.rotl = M, e.byteSwap = N, e.byteSwap32 = P, e.bytesToHex = R, e.hexToBytes = V, e.asyncLoop = H, e.utf8ToBytes = U, e.bytesToUtf8 = W, e.toBytes = G, e.kdfInputToBytes = K, e.concatBytes = q, e.checkOpts = J, e.createHasher = Y, e.createOptHasher = X, e.createXOFer = Z, e.randomBytes = Q;
|
|
152
|
+
var b = require_crypto();
|
|
153
|
+
function x(e2) {
|
|
154
|
+
return e2 instanceof Uint8Array || ArrayBuffer.isView(e2) && e2.constructor.name === "Uint8Array";
|
|
155
|
+
}
|
|
156
|
+
function S(e2) {
|
|
157
|
+
if (!Number.isSafeInteger(e2) || e2 < 0) throw Error("positive integer expected, got " + e2);
|
|
158
|
+
}
|
|
159
|
+
function C(e2, ...b2) {
|
|
160
|
+
if (!x(e2)) throw Error("Uint8Array expected");
|
|
161
|
+
if (b2.length > 0 && !b2.includes(e2.length)) throw Error("Uint8Array expected of length " + b2 + ", got length=" + e2.length);
|
|
162
|
+
}
|
|
163
|
+
function w(e2) {
|
|
164
|
+
if (typeof e2 != "function" || typeof e2.create != "function") throw Error("Hash should be wrapped by utils.createHasher");
|
|
165
|
+
S(e2.outputLen), S(e2.blockLen);
|
|
166
|
+
}
|
|
167
|
+
function T(e2, b2 = true) {
|
|
168
|
+
if (e2.destroyed) throw Error("Hash instance has been destroyed");
|
|
169
|
+
if (b2 && e2.finished) throw Error("Hash#digest() has already been called");
|
|
170
|
+
}
|
|
171
|
+
function E(e2, b2) {
|
|
172
|
+
C(e2);
|
|
173
|
+
let x2 = b2.outputLen;
|
|
174
|
+
if (e2.length < x2) throw Error("digestInto() expects output buffer of length at least " + x2);
|
|
175
|
+
}
|
|
176
|
+
function D(e2) {
|
|
177
|
+
return new Uint8Array(e2.buffer, e2.byteOffset, e2.byteLength);
|
|
178
|
+
}
|
|
179
|
+
function O(e2) {
|
|
180
|
+
return new Uint32Array(e2.buffer, e2.byteOffset, Math.floor(e2.byteLength / 4));
|
|
181
|
+
}
|
|
182
|
+
function k(...e2) {
|
|
183
|
+
for (let b2 = 0; b2 < e2.length; b2++) e2[b2].fill(0);
|
|
184
|
+
}
|
|
185
|
+
function A(e2) {
|
|
186
|
+
return new DataView(e2.buffer, e2.byteOffset, e2.byteLength);
|
|
187
|
+
}
|
|
188
|
+
function j(e2, b2) {
|
|
189
|
+
return e2 << 32 - b2 | e2 >>> b2;
|
|
190
|
+
}
|
|
191
|
+
function M(e2, b2) {
|
|
192
|
+
return e2 << b2 | e2 >>> 32 - b2 >>> 0;
|
|
193
|
+
}
|
|
194
|
+
e.isLE = (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
|
|
195
|
+
function N(e2) {
|
|
196
|
+
return e2 << 24 & 4278190080 | e2 << 8 & 16711680 | e2 >>> 8 & 65280 | e2 >>> 24 & 255;
|
|
197
|
+
}
|
|
198
|
+
e.swap8IfBE = e.isLE ? (e2) => e2 : (e2) => N(e2), e.byteSwapIfBE = e.swap8IfBE;
|
|
199
|
+
function P(e2) {
|
|
200
|
+
for (let b2 = 0; b2 < e2.length; b2++) e2[b2] = N(e2[b2]);
|
|
201
|
+
return e2;
|
|
202
|
+
}
|
|
203
|
+
e.swap32IfBE = e.isLE ? (e2) => e2 : P;
|
|
204
|
+
var F = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function")(), I = /* @__PURE__ */ Array.from({ length: 256 }, (e2, b2) => b2.toString(16).padStart(2, "0"));
|
|
205
|
+
function R(e2) {
|
|
206
|
+
if (C(e2), F) return e2.toHex();
|
|
207
|
+
let b2 = "";
|
|
208
|
+
for (let x2 = 0; x2 < e2.length; x2++) b2 += I[e2[x2]];
|
|
209
|
+
return b2;
|
|
210
|
+
}
|
|
211
|
+
var z = {
|
|
212
|
+
_0: 48,
|
|
213
|
+
_9: 57,
|
|
214
|
+
A: 65,
|
|
215
|
+
F: 70,
|
|
216
|
+
a: 97,
|
|
217
|
+
f: 102
|
|
218
|
+
};
|
|
219
|
+
function B(e2) {
|
|
220
|
+
if (e2 >= z._0 && e2 <= z._9) return e2 - z._0;
|
|
221
|
+
if (e2 >= z.A && e2 <= z.F) return e2 - (z.A - 10);
|
|
222
|
+
if (e2 >= z.a && e2 <= z.f) return e2 - (z.a - 10);
|
|
223
|
+
}
|
|
224
|
+
function V(e2) {
|
|
225
|
+
if (typeof e2 != "string") throw Error("hex string expected, got " + typeof e2);
|
|
226
|
+
if (F) return Uint8Array.fromHex(e2);
|
|
227
|
+
let b2 = e2.length, x2 = b2 / 2;
|
|
228
|
+
if (b2 % 2) throw Error("hex string expected, got unpadded hex of length " + b2);
|
|
229
|
+
let S2 = new Uint8Array(x2);
|
|
230
|
+
for (let b3 = 0, C2 = 0; b3 < x2; b3++, C2 += 2) {
|
|
231
|
+
let x3 = B(e2.charCodeAt(C2)), w2 = B(e2.charCodeAt(C2 + 1));
|
|
232
|
+
if (x3 === void 0 || w2 === void 0) {
|
|
233
|
+
let b4 = e2[C2] + e2[C2 + 1];
|
|
234
|
+
throw Error('hex string expected, got non-hex character "' + b4 + '" at index ' + C2);
|
|
235
|
+
}
|
|
236
|
+
S2[b3] = x3 * 16 + w2;
|
|
237
|
+
}
|
|
238
|
+
return S2;
|
|
239
|
+
}
|
|
240
|
+
e.nextTick = async () => {
|
|
241
|
+
};
|
|
242
|
+
async function H(b2, x2, S2) {
|
|
243
|
+
let C2 = Date.now();
|
|
244
|
+
for (let w2 = 0; w2 < b2; w2++) {
|
|
245
|
+
S2(w2);
|
|
246
|
+
let b3 = Date.now() - C2;
|
|
247
|
+
b3 >= 0 && b3 < x2 || (await (0, e.nextTick)(), C2 += b3);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
function U(e2) {
|
|
251
|
+
if (typeof e2 != "string") throw Error("string expected");
|
|
252
|
+
return new Uint8Array(new TextEncoder().encode(e2));
|
|
253
|
+
}
|
|
254
|
+
function W(e2) {
|
|
255
|
+
return new TextDecoder().decode(e2);
|
|
256
|
+
}
|
|
257
|
+
function G(e2) {
|
|
258
|
+
return typeof e2 == "string" && (e2 = U(e2)), C(e2), e2;
|
|
259
|
+
}
|
|
260
|
+
function K(e2) {
|
|
261
|
+
return typeof e2 == "string" && (e2 = U(e2)), C(e2), e2;
|
|
262
|
+
}
|
|
263
|
+
function q(...e2) {
|
|
264
|
+
let b2 = 0;
|
|
265
|
+
for (let x3 = 0; x3 < e2.length; x3++) {
|
|
266
|
+
let S2 = e2[x3];
|
|
267
|
+
C(S2), b2 += S2.length;
|
|
268
|
+
}
|
|
269
|
+
let x2 = new Uint8Array(b2);
|
|
270
|
+
for (let b3 = 0, S2 = 0; b3 < e2.length; b3++) {
|
|
271
|
+
let C2 = e2[b3];
|
|
272
|
+
x2.set(C2, S2), S2 += C2.length;
|
|
273
|
+
}
|
|
274
|
+
return x2;
|
|
275
|
+
}
|
|
276
|
+
function J(e2, b2) {
|
|
277
|
+
if (b2 !== void 0 && {}.toString.call(b2) !== "[object Object]") throw Error("options should be object or undefined");
|
|
278
|
+
return Object.assign(e2, b2);
|
|
279
|
+
}
|
|
280
|
+
e.Hash = class {
|
|
281
|
+
};
|
|
282
|
+
function Y(e2) {
|
|
283
|
+
let b2 = (b3) => e2().update(G(b3)).digest(), x2 = e2();
|
|
284
|
+
return b2.outputLen = x2.outputLen, b2.blockLen = x2.blockLen, b2.create = () => e2(), b2;
|
|
285
|
+
}
|
|
286
|
+
function X(e2) {
|
|
287
|
+
let b2 = (b3, x3) => e2(x3).update(G(b3)).digest(), x2 = e2({});
|
|
288
|
+
return b2.outputLen = x2.outputLen, b2.blockLen = x2.blockLen, b2.create = (b3) => e2(b3), b2;
|
|
289
|
+
}
|
|
290
|
+
function Z(e2) {
|
|
291
|
+
let b2 = (b3, x3) => e2(x3).update(G(b3)).digest(), x2 = e2({});
|
|
292
|
+
return b2.outputLen = x2.outputLen, b2.blockLen = x2.blockLen, b2.create = (b3) => e2(b3), b2;
|
|
293
|
+
}
|
|
294
|
+
e.wrapConstructor = Y, e.wrapConstructorWithOpts = X, e.wrapXOFConstructorWithOpts = Z;
|
|
295
|
+
function Q(e2 = 32) {
|
|
296
|
+
if (b.crypto && typeof b.crypto.getRandomValues == "function") return b.crypto.getRandomValues(new Uint8Array(e2));
|
|
297
|
+
if (b.crypto && typeof b.crypto.randomBytes == "function") return Uint8Array.from(b.crypto.randomBytes(e2));
|
|
298
|
+
throw Error("crypto.getRandomValues must be defined");
|
|
299
|
+
}
|
|
300
|
+
})), require_sha3 = /* @__PURE__ */ __commonJSMin(((e) => {
|
|
301
|
+
Object.defineProperty(e, "__esModule", { value: true }), e.shake256 = e.shake128 = e.keccak_512 = e.keccak_384 = e.keccak_256 = e.keccak_224 = e.sha3_512 = e.sha3_384 = e.sha3_256 = e.sha3_224 = e.Keccak = void 0, e.keccakP = L;
|
|
302
|
+
var b = require__u64(), x = require_utils(), S = BigInt(0), C = BigInt(1), w = BigInt(2), T = BigInt(7), E = BigInt(256), D = BigInt(113), O = [], k = [], A = [];
|
|
303
|
+
for (let e2 = 0, b2 = C, x2 = 1, j2 = 0; e2 < 24; e2++) {
|
|
304
|
+
[x2, j2] = [j2, (2 * x2 + 3 * j2) % 5], O.push(2 * (5 * j2 + x2)), k.push((e2 + 1) * (e2 + 2) / 2 % 64);
|
|
305
|
+
let M2 = S;
|
|
306
|
+
for (let e3 = 0; e3 < 7; e3++) b2 = (b2 << C ^ (b2 >> T) * D) % E, b2 & w && (M2 ^= C << (C << /* @__PURE__ */ BigInt(e3)) - C);
|
|
307
|
+
A.push(M2);
|
|
308
|
+
}
|
|
309
|
+
var j = (0, b.split)(A, true), M = j[0], N = j[1], P = (e2, x2, S2) => S2 > 32 ? (0, b.rotlBH)(e2, x2, S2) : (0, b.rotlSH)(e2, x2, S2), F = (e2, x2, S2) => S2 > 32 ? (0, b.rotlBL)(e2, x2, S2) : (0, b.rotlSL)(e2, x2, S2);
|
|
310
|
+
function L(e2, b2 = 24) {
|
|
311
|
+
let S2 = new Uint32Array(10);
|
|
312
|
+
for (let x2 = 24 - b2; x2 < 24; x2++) {
|
|
313
|
+
for (let b4 = 0; b4 < 10; b4++) S2[b4] = e2[b4] ^ e2[b4 + 10] ^ e2[b4 + 20] ^ e2[b4 + 30] ^ e2[b4 + 40];
|
|
314
|
+
for (let b4 = 0; b4 < 10; b4 += 2) {
|
|
315
|
+
let x3 = (b4 + 8) % 10, C3 = (b4 + 2) % 10, w2 = S2[C3], T2 = S2[C3 + 1], E2 = P(w2, T2, 1) ^ S2[x3], D2 = F(w2, T2, 1) ^ S2[x3 + 1];
|
|
316
|
+
for (let x4 = 0; x4 < 50; x4 += 10) e2[b4 + x4] ^= E2, e2[b4 + x4 + 1] ^= D2;
|
|
317
|
+
}
|
|
318
|
+
let b3 = e2[2], C2 = e2[3];
|
|
319
|
+
for (let x3 = 0; x3 < 24; x3++) {
|
|
320
|
+
let S3 = k[x3], w2 = P(b3, C2, S3), T2 = F(b3, C2, S3), E2 = O[x3];
|
|
321
|
+
b3 = e2[E2], C2 = e2[E2 + 1], e2[E2] = w2, e2[E2 + 1] = T2;
|
|
322
|
+
}
|
|
323
|
+
for (let b4 = 0; b4 < 50; b4 += 10) {
|
|
324
|
+
for (let x3 = 0; x3 < 10; x3++) S2[x3] = e2[b4 + x3];
|
|
325
|
+
for (let x3 = 0; x3 < 10; x3++) e2[b4 + x3] ^= ~S2[(x3 + 2) % 10] & S2[(x3 + 4) % 10];
|
|
326
|
+
}
|
|
327
|
+
e2[0] ^= M[x2], e2[1] ^= N[x2];
|
|
328
|
+
}
|
|
329
|
+
(0, x.clean)(S2);
|
|
330
|
+
}
|
|
331
|
+
var z = class e2 extends x.Hash {
|
|
332
|
+
constructor(e3, b2, S2, C2 = false, w2 = 24) {
|
|
333
|
+
if (super(), this.pos = 0, this.posOut = 0, this.finished = false, this.destroyed = false, this.enableXOF = false, this.blockLen = e3, this.suffix = b2, this.outputLen = S2, this.enableXOF = C2, this.rounds = w2, (0, x.anumber)(S2), !(0 < e3 && e3 < 200)) throw Error("only keccak-f1600 function is supported");
|
|
334
|
+
this.state = new Uint8Array(200), this.state32 = (0, x.u32)(this.state);
|
|
335
|
+
}
|
|
336
|
+
clone() {
|
|
337
|
+
return this._cloneInto();
|
|
338
|
+
}
|
|
339
|
+
keccak() {
|
|
340
|
+
(0, x.swap32IfBE)(this.state32), L(this.state32, this.rounds), (0, x.swap32IfBE)(this.state32), this.posOut = 0, this.pos = 0;
|
|
341
|
+
}
|
|
342
|
+
update(e3) {
|
|
343
|
+
(0, x.aexists)(this), e3 = (0, x.toBytes)(e3), (0, x.abytes)(e3);
|
|
344
|
+
let { blockLen: b2, state: S2 } = this, C2 = e3.length;
|
|
345
|
+
for (let x2 = 0; x2 < C2; ) {
|
|
346
|
+
let w2 = Math.min(b2 - this.pos, C2 - x2);
|
|
347
|
+
for (let b3 = 0; b3 < w2; b3++) S2[this.pos++] ^= e3[x2++];
|
|
348
|
+
this.pos === b2 && this.keccak();
|
|
349
|
+
}
|
|
350
|
+
return this;
|
|
351
|
+
}
|
|
352
|
+
finish() {
|
|
353
|
+
if (this.finished) return;
|
|
354
|
+
this.finished = true;
|
|
355
|
+
let { state: e3, suffix: b2, pos: x2, blockLen: S2 } = this;
|
|
356
|
+
e3[x2] ^= b2, b2 & 128 && x2 === S2 - 1 && this.keccak(), e3[S2 - 1] ^= 128, this.keccak();
|
|
357
|
+
}
|
|
358
|
+
writeInto(e3) {
|
|
359
|
+
(0, x.aexists)(this, false), (0, x.abytes)(e3), this.finish();
|
|
360
|
+
let b2 = this.state, { blockLen: S2 } = this;
|
|
361
|
+
for (let x2 = 0, C2 = e3.length; x2 < C2; ) {
|
|
362
|
+
this.posOut >= S2 && this.keccak();
|
|
363
|
+
let w2 = Math.min(S2 - this.posOut, C2 - x2);
|
|
364
|
+
e3.set(b2.subarray(this.posOut, this.posOut + w2), x2), this.posOut += w2, x2 += w2;
|
|
365
|
+
}
|
|
366
|
+
return e3;
|
|
367
|
+
}
|
|
368
|
+
xofInto(e3) {
|
|
369
|
+
if (!this.enableXOF) throw Error("XOF is not possible for this instance");
|
|
370
|
+
return this.writeInto(e3);
|
|
371
|
+
}
|
|
372
|
+
xof(e3) {
|
|
373
|
+
return (0, x.anumber)(e3), this.xofInto(new Uint8Array(e3));
|
|
374
|
+
}
|
|
375
|
+
digestInto(e3) {
|
|
376
|
+
if ((0, x.aoutput)(e3, this), this.finished) throw Error("digest() was already called");
|
|
377
|
+
return this.writeInto(e3), this.destroy(), e3;
|
|
378
|
+
}
|
|
379
|
+
digest() {
|
|
380
|
+
return this.digestInto(new Uint8Array(this.outputLen));
|
|
381
|
+
}
|
|
382
|
+
destroy() {
|
|
383
|
+
this.destroyed = true, (0, x.clean)(this.state);
|
|
384
|
+
}
|
|
385
|
+
_cloneInto(b2) {
|
|
386
|
+
let { blockLen: x2, suffix: S2, outputLen: C2, rounds: w2, enableXOF: T2 } = this;
|
|
387
|
+
return b2 || (b2 = new e2(x2, S2, C2, T2, w2)), b2.state32.set(this.state32), b2.pos = this.pos, b2.posOut = this.posOut, b2.finished = this.finished, b2.rounds = w2, b2.suffix = S2, b2.outputLen = C2, b2.enableXOF = T2, b2.destroyed = this.destroyed, b2;
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
e.Keccak = z;
|
|
391
|
+
var B = (e2, b2, S2) => (0, x.createHasher)(() => new z(b2, e2, S2));
|
|
392
|
+
e.sha3_224 = (() => B(6, 144, 224 / 8))(), e.sha3_256 = (() => B(6, 136, 256 / 8))(), e.sha3_384 = (() => B(6, 104, 384 / 8))(), e.sha3_512 = (() => B(6, 72, 512 / 8))(), e.keccak_224 = (() => B(1, 144, 224 / 8))(), e.keccak_256 = (() => B(1, 136, 256 / 8))(), e.keccak_384 = (() => B(1, 104, 384 / 8))(), e.keccak_512 = (() => B(1, 72, 512 / 8))();
|
|
393
|
+
var V = (e2, b2, S2) => (0, x.createXOFer)((x2 = {}) => new z(b2, e2, x2.dkLen === void 0 ? S2 : x2.dkLen, true));
|
|
394
|
+
e.shake128 = (() => V(31, 168, 128 / 8))(), e.shake256 = (() => V(31, 136, 256 / 8))();
|
|
395
|
+
})), require_src = /* @__PURE__ */ __commonJSMin(((e, b) => {
|
|
396
|
+
var { sha3_512: x } = require_sha3(), S = 24, C = 32, w = (e2 = 4, b2 = Math.random) => {
|
|
397
|
+
let x2 = "";
|
|
398
|
+
for (; x2.length < e2; ) x2 += Math.floor(b2() * 36).toString(36);
|
|
399
|
+
return x2;
|
|
400
|
+
};
|
|
401
|
+
function T(e2) {
|
|
402
|
+
let b2 = 0n;
|
|
403
|
+
for (let x2 of e2.values()) {
|
|
404
|
+
let e3 = BigInt(x2);
|
|
405
|
+
b2 = (b2 << 8n) + e3;
|
|
406
|
+
}
|
|
407
|
+
return b2;
|
|
408
|
+
}
|
|
409
|
+
var E = (e2 = "") => T(x(e2)).toString(36).slice(1), D = Array.from({ length: 26 }, (e2, b2) => String.fromCharCode(b2 + 97)), O = (e2) => D[Math.floor(e2() * D.length)], k = ({ globalObj: e2 = typeof global < "u" ? global : typeof window < "u" ? window : {}, random: b2 = Math.random } = {}) => {
|
|
410
|
+
let x2 = Object.keys(e2).toString();
|
|
411
|
+
return E(x2.length ? x2 + w(C, b2) : w(C, b2)).substring(0, C);
|
|
412
|
+
}, A = (e2) => () => e2++, j = 476782367, M = ({ random: e2 = Math.random, counter: b2 = A(Math.floor(e2() * j)), length: x2 = S, fingerprint: C2 = k({ random: e2 }) } = {}) => function() {
|
|
413
|
+
let S2 = O(e2), T2 = Date.now().toString(36), D2 = b2().toString(36);
|
|
414
|
+
return `${S2 + E(`${T2 + w(x2, e2) + D2 + C2}`).substring(1, x2)}`;
|
|
415
|
+
}, N = M(), P = (e2, { minLength: b2 = 2, maxLength: x2 = C } = {}) => {
|
|
416
|
+
let S2 = e2.length, w2 = /^[0-9a-z]+$/;
|
|
417
|
+
try {
|
|
418
|
+
if (typeof e2 == "string" && S2 >= b2 && S2 <= x2 && w2.test(e2)) return true;
|
|
419
|
+
} finally {
|
|
420
|
+
}
|
|
421
|
+
return false;
|
|
422
|
+
};
|
|
423
|
+
b.exports.getConstants = () => ({
|
|
424
|
+
defaultLength: S,
|
|
425
|
+
bigLength: C
|
|
426
|
+
}), b.exports.init = M, b.exports.createId = N, b.exports.bufToBigInt = T, b.exports.createCounter = A, b.exports.createFingerprint = k, b.exports.isCuid = P;
|
|
427
|
+
})), require_cuid2 = /* @__PURE__ */ __commonJSMin(((e, b) => {
|
|
428
|
+
var { createId: x, init: S, getConstants: C, isCuid: w } = require_src();
|
|
429
|
+
b.exports.createId = x, b.exports.init = S, b.exports.getConstants = C, b.exports.isCuid = w;
|
|
430
|
+
}));
|
|
431
|
+
function updateQueryParams(e) {
|
|
432
|
+
let b = new URL(window.location.href);
|
|
433
|
+
e(b.searchParams), window.history.replaceState({}, "", b.toString());
|
|
434
|
+
}
|
|
435
|
+
var urlRegex = /^(https?:\/\/\S+)$/;
|
|
436
|
+
function isUrl(e) {
|
|
437
|
+
return typeof e == "string" && urlRegex.test(e);
|
|
438
|
+
}
|
|
439
|
+
function appendQueryParams({ href: e, queryParams: b, keys: x }) {
|
|
440
|
+
let S = typeof b == "string" ? new URLSearchParams(b) : b;
|
|
441
|
+
if (S.size === 0 || e.startsWith("http://") || e.startsWith("https://")) return e;
|
|
442
|
+
let C = e.startsWith("#"), w = C && e.includes("?");
|
|
443
|
+
if (C && !w) {
|
|
444
|
+
let b2 = x ? [...S.entries()].filter(([e2]) => x.includes(e2)) : [...S.entries()], C2 = new URLSearchParams();
|
|
445
|
+
for (let [e2, x2] of b2) C2.set(e2, x2);
|
|
446
|
+
let w2 = C2.toString();
|
|
447
|
+
return w2 ? `/?${w2}${e}` : e;
|
|
448
|
+
}
|
|
449
|
+
let T = e, E = "", D = new URLSearchParams(), O = C ? 1 : 0, k = e.indexOf("#", O);
|
|
450
|
+
k !== -1 && (E = e.slice(k), T = e.slice(0, k));
|
|
451
|
+
let A = T.indexOf("?");
|
|
452
|
+
A !== -1 && (D = new URLSearchParams(T.slice(A + 1)), T = T.slice(0, A));
|
|
453
|
+
let j = new URLSearchParams(D), M = x ? [...S.entries()].filter(([e2]) => x.includes(e2)) : [...S.entries()];
|
|
454
|
+
for (let [e2, b2] of M) j.set(e2, b2);
|
|
455
|
+
let N = j.toString();
|
|
456
|
+
return N ? `${T}?${N}${E}` : e;
|
|
457
|
+
}
|
|
458
|
+
var createId = (0, require_cuid2().init)({ length: 6 });
|
|
459
|
+
function generateSessionId() {
|
|
460
|
+
return `s_${createId()}`;
|
|
461
|
+
}
|
|
462
|
+
function isSessionId(e) {
|
|
463
|
+
return e ? /^s_[\da-z]{6}$/.test(e) : false;
|
|
464
|
+
}
|
|
465
|
+
var sessionId = (() => {
|
|
466
|
+
let e = new URL(window.location.href).searchParams.get(KnownQueryParams.sessionId);
|
|
467
|
+
return isSessionId(e) ? (updateQueryParams((e2) => {
|
|
468
|
+
e2.has(KnownQueryParams.kiosk) || e2.delete(KnownQueryParams.sessionId);
|
|
469
|
+
}), Logger.debug("Connecting to existing session", { sessionId: e }), e) : (Logger.debug("Starting a new session", { sessionId: e }), generateSessionId());
|
|
470
|
+
})();
|
|
471
|
+
function getSessionId() {
|
|
472
|
+
return sessionId;
|
|
473
|
+
}
|
|
474
|
+
function isStringToStringRecord(e) {
|
|
475
|
+
if (typeof e != "object" || !e || Array.isArray(e)) return false;
|
|
476
|
+
for (let b of Object.values(e)) if (typeof b != "string") return false;
|
|
477
|
+
return true;
|
|
478
|
+
}
|
|
479
|
+
function isMarimoStaticState(e) {
|
|
480
|
+
if (typeof e != "object" || !e || Array.isArray(e)) return false;
|
|
481
|
+
let b = e;
|
|
482
|
+
return !(!isStringToStringRecord(b.files) || b.modelNotifications !== void 0 && !Array.isArray(b.modelNotifications));
|
|
483
|
+
}
|
|
484
|
+
function getMarimoStaticState() {
|
|
485
|
+
let e = window == null ? void 0 : window.__MARIMO_STATIC__;
|
|
486
|
+
return isMarimoStaticState(e) ? e : void 0;
|
|
487
|
+
}
|
|
488
|
+
function isStaticNotebook() {
|
|
489
|
+
return getMarimoStaticState() !== void 0;
|
|
490
|
+
}
|
|
491
|
+
function getStaticVirtualFiles() {
|
|
492
|
+
let e = getMarimoStaticState();
|
|
493
|
+
return invariant(e !== void 0, "Not a static notebook"), e.files;
|
|
494
|
+
}
|
|
495
|
+
var RuntimeManager = class {
|
|
496
|
+
constructor(e, b = false) {
|
|
497
|
+
__publicField(this, "initialHealthyCheck", new Deferred());
|
|
498
|
+
this.config = e, this.lazy = b;
|
|
499
|
+
try {
|
|
500
|
+
new URL(this.config.url);
|
|
501
|
+
} catch (e2) {
|
|
502
|
+
throw Error(`Invalid runtime URL: ${this.config.url}. ${e2 instanceof Error ? e2.message : "Unknown error"}`, { cause: e2 });
|
|
503
|
+
}
|
|
504
|
+
this.lazy || this.init();
|
|
505
|
+
}
|
|
506
|
+
get isLazy() {
|
|
507
|
+
return this.lazy;
|
|
508
|
+
}
|
|
509
|
+
get httpURL() {
|
|
510
|
+
return new URL(this.config.url);
|
|
511
|
+
}
|
|
512
|
+
get isSameOrigin() {
|
|
513
|
+
return this.httpURL.origin === window.location.origin;
|
|
514
|
+
}
|
|
515
|
+
formatHttpURL(e, b, x = true) {
|
|
516
|
+
e || (e = "");
|
|
517
|
+
let S = this.httpURL, w = new URLSearchParams(window.location.search);
|
|
518
|
+
if (b) for (let [e2, x2] of b.entries()) S.searchParams.set(e2, x2);
|
|
519
|
+
for (let [e2, b2] of w.entries()) x && !Object.values(KnownQueryParams).includes(e2) || S.searchParams.set(e2, b2);
|
|
520
|
+
return S.pathname = `${S.pathname.replace(/\/$/, "")}/${e.replace(/^\//, "")}`, S.hash = "", S;
|
|
521
|
+
}
|
|
522
|
+
formatWsURL(e, b) {
|
|
523
|
+
let x = this.formatHttpURL(e, b, false);
|
|
524
|
+
return !this.isSameOrigin && this.config.authToken && x.searchParams.set(KnownQueryParams.accessToken, this.config.authToken), asWsUrl(x.toString());
|
|
525
|
+
}
|
|
526
|
+
getWsURL(e) {
|
|
527
|
+
let b = new URL(this.config.url), x = new URLSearchParams(b.search);
|
|
528
|
+
return new URLSearchParams(window.location.search).forEach((e2, b2) => {
|
|
529
|
+
x.has(b2) || x.set(b2, e2);
|
|
530
|
+
}), x.set(KnownQueryParams.sessionId, e), this.formatWsURL("/ws", x);
|
|
531
|
+
}
|
|
532
|
+
getWsSyncURL(e) {
|
|
533
|
+
let b = new URL(this.config.url), x = new URLSearchParams(b.search);
|
|
534
|
+
return new URLSearchParams(window.location.search).forEach((e2, b2) => {
|
|
535
|
+
x.has(b2) || x.set(b2, e2);
|
|
536
|
+
}), x.set(KnownQueryParams.sessionId, e), this.formatWsURL("/ws_sync", x);
|
|
537
|
+
}
|
|
538
|
+
getTerminalWsURL() {
|
|
539
|
+
return this.formatWsURL("/terminal/ws");
|
|
540
|
+
}
|
|
541
|
+
getLSPURL(e) {
|
|
542
|
+
if (e === "copilot") {
|
|
543
|
+
let b = this.formatWsURL(`/lsp/${e}`), x = b.searchParams.get(KnownQueryParams.accessToken);
|
|
544
|
+
return b.search = "", x && b.searchParams.set(KnownQueryParams.accessToken, x), b;
|
|
545
|
+
}
|
|
546
|
+
return this.formatWsURL(`/lsp/${e}`);
|
|
547
|
+
}
|
|
548
|
+
getAiURL(e) {
|
|
549
|
+
return this.formatHttpURL(`/api/ai/${e}`);
|
|
550
|
+
}
|
|
551
|
+
healthURL() {
|
|
552
|
+
return this.formatHttpURL("/health");
|
|
553
|
+
}
|
|
554
|
+
async isHealthy() {
|
|
555
|
+
if (isWasm() || isIslands() || isStaticNotebook()) return true;
|
|
556
|
+
try {
|
|
557
|
+
let e = await fetch(this.healthURL().toString());
|
|
558
|
+
if (e.redirected) {
|
|
559
|
+
Logger.debug(`Runtime redirected to ${e.url}`);
|
|
560
|
+
let x2 = new URL(e.url);
|
|
561
|
+
x2.pathname = x2.pathname.replace(/\/health$/, ""), this.config.url = x2.toString();
|
|
562
|
+
}
|
|
563
|
+
let x = e.ok;
|
|
564
|
+
return x && this.setDOMBaseUri(this.config.url), x;
|
|
565
|
+
} catch (e) {
|
|
566
|
+
return Logger.error(`Failed to check health: ${e instanceof Error ? e.message : "Unknown error"}`, { cause: e }), false;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
setDOMBaseUri(e) {
|
|
570
|
+
e = e.split("?", 1)[0], e.endsWith("/") || (e += "/");
|
|
571
|
+
let b = document.querySelector("base");
|
|
572
|
+
b ? b.setAttribute("href", e) : (b = document.createElement("base"), b.setAttribute("href", e), document.head.append(b));
|
|
573
|
+
}
|
|
574
|
+
async init(e) {
|
|
575
|
+
Logger.debug("Initializing runtime...");
|
|
576
|
+
let x = 0;
|
|
577
|
+
for (; !await this.isHealthy(); ) {
|
|
578
|
+
if (x >= 25) {
|
|
579
|
+
Logger.error("Failed to connect after 25 retries"), this.initialHealthyCheck.reject(/* @__PURE__ */ Error("Failed to connect after 25 retries"));
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
if (!(e == null ? void 0 : e.disableRetryDelay)) {
|
|
583
|
+
let e2 = Math.min(100 * 1.2 ** x, 2e3);
|
|
584
|
+
await new Promise((b) => setTimeout(b, e2));
|
|
585
|
+
}
|
|
586
|
+
x++;
|
|
587
|
+
}
|
|
588
|
+
Logger.debug("Runtime is healthy"), this.initialHealthyCheck.resolve();
|
|
589
|
+
}
|
|
590
|
+
async waitForHealthy() {
|
|
591
|
+
return this.initialHealthyCheck.promise;
|
|
592
|
+
}
|
|
593
|
+
headers() {
|
|
594
|
+
let e = {
|
|
595
|
+
"Marimo-Session-Id": getSessionId(),
|
|
596
|
+
"Marimo-Server-Token": this.config.serverToken ?? "",
|
|
597
|
+
"x-runtime-url": this.httpURL.toString()
|
|
598
|
+
};
|
|
599
|
+
return this.config.authToken && (e.Authorization = `Bearer ${this.config.authToken}`), e;
|
|
600
|
+
}
|
|
601
|
+
sessionHeaders() {
|
|
602
|
+
return { "Marimo-Session-Id": getSessionId() };
|
|
603
|
+
}
|
|
604
|
+
};
|
|
605
|
+
function asWsUrl(e) {
|
|
606
|
+
if (!e.startsWith("http")) {
|
|
607
|
+
Logger.warn(`URL must start with http: ${e}`);
|
|
608
|
+
let x = new URL(e);
|
|
609
|
+
return x.protocol = "ws", x;
|
|
610
|
+
}
|
|
611
|
+
return new URL(e.replace(/^http/, "ws"));
|
|
612
|
+
}
|
|
613
|
+
require_compiler_runtime();
|
|
614
|
+
function getBaseURI() {
|
|
615
|
+
let e = new URL(document.baseURI);
|
|
616
|
+
return e.search = "", e.hash = "", e.toString();
|
|
617
|
+
}
|
|
618
|
+
const runtimeConfigAtom = atom({
|
|
619
|
+
lazy: true,
|
|
620
|
+
url: getBaseURI()
|
|
621
|
+
});
|
|
622
|
+
var runtimeManagerAtom = atom((e) => {
|
|
623
|
+
let b = e(runtimeConfigAtom);
|
|
624
|
+
return new RuntimeManager(b, b.lazy);
|
|
625
|
+
});
|
|
626
|
+
function getRuntimeManager() {
|
|
627
|
+
return store.get(runtimeManagerAtom);
|
|
628
|
+
}
|
|
629
|
+
function asRemoteURL(e) {
|
|
630
|
+
if (e.startsWith("http")) return new URL(e);
|
|
631
|
+
let b = getRuntimeManager().httpURL.toString();
|
|
632
|
+
return b.startsWith("blob:") && (b = b.replace("blob:", "")), new URL(e, b);
|
|
633
|
+
}
|
|
634
|
+
const millisecondsInWeek = 6048e5, millisecondsInDay = 864e5, millisecondsInMinute = 6e4, millisecondsInHour = 36e5, millisecondsInSecond = 1e3, secondsInDay = 3600 * 24;
|
|
635
|
+
secondsInDay * 7, secondsInDay * 365.2425;
|
|
636
|
+
const constructFromSymbol = /* @__PURE__ */ Symbol.for("constructDateFrom");
|
|
637
|
+
function constructFrom(e, b) {
|
|
638
|
+
return typeof e == "function" ? e(b) : e && typeof e == "object" && constructFromSymbol in e ? e[constructFromSymbol](b) : e instanceof Date ? new e.constructor(b) : new Date(b);
|
|
639
|
+
}
|
|
640
|
+
function toDate(e, b) {
|
|
641
|
+
return constructFrom(b || e, e);
|
|
642
|
+
}
|
|
643
|
+
export {
|
|
644
|
+
isWasm as _,
|
|
645
|
+
millisecondsInMinute as a,
|
|
646
|
+
asRemoteURL as c,
|
|
647
|
+
isStaticNotebook as d,
|
|
648
|
+
appendQueryParams as f,
|
|
649
|
+
Deferred as g,
|
|
650
|
+
waitForConnectionOpen as h,
|
|
651
|
+
millisecondsInHour as i,
|
|
652
|
+
getRuntimeManager as l,
|
|
653
|
+
require_cuid2 as m,
|
|
654
|
+
constructFrom as n,
|
|
655
|
+
millisecondsInSecond as o,
|
|
656
|
+
isUrl as p,
|
|
657
|
+
millisecondsInDay as r,
|
|
658
|
+
millisecondsInWeek as s,
|
|
659
|
+
toDate as t,
|
|
660
|
+
getStaticVirtualFiles as u,
|
|
661
|
+
CircleQuestionMark as v
|
|
662
|
+
};
|
|
@@ -2,7 +2,7 @@ import { s as __toESM } from "./chunk-BNovOVIE.js";
|
|
|
2
2
|
import { _ as Logger, c as Objects, g as cn, h as Events } from "./button-CA5pI2YF.js";
|
|
3
3
|
import { t as require_react } from "./react-DA-nE2FX.js";
|
|
4
4
|
import { t as require_compiler_runtime } from "./compiler-runtime-CEbnTgxf.js";
|
|
5
|
-
import { c as asRemoteURL,
|
|
5
|
+
import { c as asRemoteURL, v as CircleQuestionMark } from "./toDate-CGmcCn8J.js";
|
|
6
6
|
import "./react-dom-BWRJ_g_k.js";
|
|
7
7
|
import { t as require_jsx_runtime } from "./jsx-runtime-COBk7ree.js";
|
|
8
8
|
import "./zod-BxdsqRPd.js";
|
|
@@ -11,7 +11,7 @@ import { t as Tooltip } from "./tooltip-B0mtKTXm.js";
|
|
|
11
11
|
import { i as debounce_default } from "./constants-D0gkYoE2.js";
|
|
12
12
|
import { n as useTheme, w as useEvent_default } from "./useTheme-CByZUW0p.js";
|
|
13
13
|
import { s as uniq } from "./arrays-CldYf7p7.js";
|
|
14
|
-
import { a as isValid, i as AlertTitle, n as Alert, t as arrow } from "./formats-
|
|
14
|
+
import { a as isValid, i as AlertTitle, n as Alert, t as arrow } from "./formats-CHpN2g_h.js";
|
|
15
15
|
import { n as formats } from "./vega-loader.browser-3_z8GoFC.js";
|
|
16
16
|
import { a as getContainerWidth, n as vegaLoadData, s as tooltipHandler } from "./loader-BvW0-YWZ.js";
|
|
17
17
|
import { t as useAsyncData } from "./useAsyncData-B6hCGywC.js";
|