@livestore/devtools-vite 0.0.0-snapshot-cd6146083edfb393f2ba774df0fd048e1ac5eb9e → 0.0.0-snapshot-5f04a3a016314e61c6a575304a67dfff5bfc86f5
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/devtools-bundle/{data-grid-overlay-editor-CZuvdYjT.js → data-grid-overlay-editor-iqzhqIrT.js} +1 -1
- package/dist/devtools-bundle/{devtools-react-bundle-CQajgYS1.js → devtools-react-bundle-DC4iefUX.js} +348 -348
- package/dist/devtools-bundle/{index-EqCXTu-q.js → index-CbC-xMhg.js} +1 -1
- package/dist/devtools-bundle/index.js +1 -1
- package/dist/devtools-bundle/{number-overlay-editor-B46CHgMZ.js → number-overlay-editor-qV-88L04.js} +1 -1
- package/package.json +3 -3
package/dist/devtools-bundle/{devtools-react-bundle-CQajgYS1.js → devtools-react-bundle-DC4iefUX.js}
RENAMED
|
@@ -15440,7 +15440,7 @@ const gQ = /* @__PURE__ */ D(vS, (e) => pQ in e ? ye(e.span) : zn(new uh())), lO
|
|
|
15440
15440
|
if (console.error(e, ...t), fO())
|
|
15441
15441
|
debugger;
|
|
15442
15442
|
throw new Error(\`This should never happen: \${e}\`);
|
|
15443
|
-
}, C$ = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_GIT_HASH: "
|
|
15443
|
+
}, C$ = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_GIT_HASH: "945c1abb", VITE_GRAFANA_ENDPOINT: "http://dev3.tail8108.ts.net:30003", VITE_OTEL: "1", VITE_OTEL_EXPORTER_OTLP_ENDPOINT: "http://dev3.tail8108.ts.net:4318", VITE_OTEL_EXPORTER_WEBSOCKET_ENDPOINT: "wss://dev3.tail8108.ts.net:44318" }, Za = (e) => {
|
|
15444
15444
|
if (typeof process < "u" && process.env !== void 0)
|
|
15445
15445
|
return process.env[e];
|
|
15446
15446
|
if (C$ !== void 0)
|
|
@@ -78368,7 +78368,7 @@ const vre = (A) => v$.make(Ld(function* (e) {
|
|
|
78368
78368
|
if (console.error(A, ...e), Nc())
|
|
78369
78369
|
debugger;
|
|
78370
78370
|
throw new Error(`This should never happen: ${A}`);
|
|
78371
|
-
}, joA = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_GIT_HASH: "
|
|
78371
|
+
}, joA = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_GIT_HASH: "945c1abb", VITE_GRAFANA_ENDPOINT: "http://dev3.tail8108.ts.net:30003", VITE_OTEL: "1", VITE_OTEL_EXPORTER_OTLP_ENDPOINT: "http://dev3.tail8108.ts.net:4318", VITE_OTEL_EXPORTER_WEBSOCKET_ENDPOINT: "wss://dev3.tail8108.ts.net:44318" }, CG = (A) => {
|
|
78372
78372
|
if (typeof process < "u" && process.env !== void 0)
|
|
78373
78373
|
return process.env[A];
|
|
78374
78374
|
if (joA !== void 0)
|
|
@@ -82916,36 +82916,7 @@ const ch = ({
|
|
|
82916
82916
|
debug: X$({ nullable: !0 })
|
|
82917
82917
|
},
|
|
82918
82918
|
indexes: [{ columns: ["seqNumGlobal", "seqNumClient"], name: "idx_session_changeset_id" }]
|
|
82919
|
-
}), wF = [XIe, ZFA, X1], zFA = (A) => wF.some((e) => e.sqliteDef.name === A),
|
|
82920
|
-
name: ou,
|
|
82921
|
-
columns: {
|
|
82922
|
-
// TODO Adjust modeling so a global event never needs a client id component
|
|
82923
|
-
seqNumGlobal: wa({ primaryKey: !0, schema: DD }),
|
|
82924
|
-
seqNumClient: wa({ primaryKey: !0, schema: bH }),
|
|
82925
|
-
seqNumRebaseGeneration: wa({ primaryKey: !0 }),
|
|
82926
|
-
parentSeqNumGlobal: wa({ schema: DD }),
|
|
82927
|
-
parentSeqNumClient: wa({ schema: bH }),
|
|
82928
|
-
parentSeqNumRebaseGeneration: wa({}),
|
|
82929
|
-
/** Event definition name */
|
|
82930
|
-
name: nB({}),
|
|
82931
|
-
argsJson: nB({ schema: Xd(uo) }),
|
|
82932
|
-
clientId: nB({}),
|
|
82933
|
-
sessionId: nB({}),
|
|
82934
|
-
schemaHash: wa({}),
|
|
82935
|
-
syncMetadataJson: nB({ schema: Xd(T0(Ah)) })
|
|
82936
|
-
},
|
|
82937
|
-
indexes: [
|
|
82938
|
-
{ columns: ["seqNumGlobal"], name: "idx_eventlog_seqNumGlobal" },
|
|
82939
|
-
{ columns: ["seqNumGlobal", "seqNumClient", "seqNumRebaseGeneration"], name: "idx_eventlog_seqNum" }
|
|
82940
|
-
]
|
|
82941
|
-
}), Lw = "__livestore_sync_status", Aae = Ub({
|
|
82942
|
-
name: Lw,
|
|
82943
|
-
columns: {
|
|
82944
|
-
head: wa({ primaryKey: !0 }),
|
|
82945
|
-
// Null means the sync backend is not yet connected and we haven't yet seen a backend ID
|
|
82946
|
-
backendId: nB({ nullable: !0 })
|
|
82947
|
-
}
|
|
82948
|
-
}), $FA = [A4, Aae], eae = { strategy: "warn" }, nae = (A) => A ?? eae, CrA = ({
|
|
82919
|
+
}), wF = [XIe, ZFA, X1], zFA = (A) => wF.some((e) => e.sqliteDef.name === A), Aae = { strategy: "warn" }, eae = (A) => A ?? Aae, CrA = ({
|
|
82949
82920
|
schema: A,
|
|
82950
82921
|
context: e
|
|
82951
82922
|
}) => GA(function* () {
|
|
@@ -82974,7 +82945,7 @@ const ch = ({
|
|
|
82974
82945
|
return;
|
|
82975
82946
|
}
|
|
82976
82947
|
}
|
|
82977
|
-
}),
|
|
82948
|
+
}), A4 = (A, e) => GA(function* () {
|
|
82978
82949
|
const n = e.event.name, t = A.eventsDefsMap.get(n);
|
|
82979
82950
|
if (t === void 0)
|
|
82980
82951
|
return yield* CrA({
|
|
@@ -82994,7 +82965,7 @@ const ch = ({
|
|
|
82994
82965
|
operation: e.operation
|
|
82995
82966
|
}
|
|
82996
82967
|
}), { _tag: "unknown", reason: "materializer-missing" }) : { _tag: "known", eventDef: t, materializer: g };
|
|
82997
|
-
}),
|
|
82968
|
+
}), nae = Symbol.for("livestore.LiveStoreSchema"), tae = -1, gae = (A) => {
|
|
82998
82969
|
const e = A.state, n = A.state.sqlite.tables;
|
|
82999
82970
|
for (const i of wF)
|
|
83000
82971
|
n.set(i.sqliteDef.name, i);
|
|
@@ -83007,9 +82978,9 @@ const ch = ({
|
|
|
83007
82978
|
t.has(i.name) && En(`Duplicate event name: ${i.name}. Please use unique names for events.`), t.set(i.name, i);
|
|
83008
82979
|
for (const i of n.values())
|
|
83009
82980
|
V0(i) && t.has(i.set.name) === !1 && t.set(i.set.name, i.set);
|
|
83010
|
-
const g =
|
|
82981
|
+
const g = eae(A.unknownEventHandling);
|
|
83011
82982
|
return {
|
|
83012
|
-
LiveStoreSchemaSymbol:
|
|
82983
|
+
LiveStoreSchemaSymbol: nae,
|
|
83013
82984
|
_DbSchemaType: Symbol.for("livestore.DbSchemaType"),
|
|
83014
82985
|
_EventDefMapType: Symbol.for("livestore.EventDefMapType"),
|
|
83015
82986
|
state: e,
|
|
@@ -83019,16 +82990,16 @@ const ch = ({
|
|
|
83019
82990
|
alias: A.devtools?.alias ?? "default"
|
|
83020
82991
|
}
|
|
83021
82992
|
};
|
|
83022
|
-
},
|
|
82993
|
+
}, iae = (A, e) => {
|
|
83023
82994
|
const n = A.eventsDefsMap.get(e);
|
|
83024
82995
|
if (n === void 0)
|
|
83025
82996
|
return En(`No event definition found for \`${e}\`.`);
|
|
83026
82997
|
const t = A.state.materializers.get(e);
|
|
83027
82998
|
return t === void 0 ? En(`No materializer found for \`${e}\`.`) : { eventDef: n, materializer: t };
|
|
83028
|
-
},
|
|
83029
|
-
const e = A.columns.filter((t) => t.primaryKey).map((t) => `'${t.name}'`), n = A.columns.map(
|
|
82999
|
+
}, oae = (A) => {
|
|
83000
|
+
const e = A.columns.filter((t) => t.primaryKey).map((t) => `'${t.name}'`), n = A.columns.map(rae);
|
|
83030
83001
|
return e.length > 0 && n.push(`PRIMARY KEY (${e.join(", ")})`), n.join(", ");
|
|
83031
|
-
},
|
|
83002
|
+
}, rae = (A) => {
|
|
83032
83003
|
const e = A.type._tag, n = A.nullable === !1 ? "not null" : "", t = A.autoIncrement ? "autoincrement" : "", g = (() => {
|
|
83033
83004
|
if (A.default._tag === "None") return "";
|
|
83034
83005
|
if (A.default.value === null) return "default null";
|
|
@@ -83037,7 +83008,7 @@ const ch = ({
|
|
|
83037
83008
|
return e === "text" ? `default '${r}'` : `default ${r}`;
|
|
83038
83009
|
})();
|
|
83039
83010
|
return `'${A.name}' ${e} ${n} ${t} ${g}`;
|
|
83040
|
-
},
|
|
83011
|
+
}, sae = (A) => {
|
|
83041
83012
|
const e = Array.isArray(A.tables) ? A.tables : Object.values(A.tables), n = /* @__PURE__ */ new Map();
|
|
83042
83013
|
for (const i of e) {
|
|
83043
83014
|
const r = i.sqliteDef;
|
|
@@ -83058,7 +83029,36 @@ const ch = ({
|
|
|
83058
83029
|
tables: [...n.values()].map((i) => i.sqliteDef.ast)
|
|
83059
83030
|
});
|
|
83060
83031
|
return { sqlite: { tables: n, migrations: A.migrations ?? { strategy: "auto" }, hash: g }, materializers: t };
|
|
83061
|
-
},
|
|
83032
|
+
}, ou = "eventlog", e4 = Ub({
|
|
83033
|
+
name: ou,
|
|
83034
|
+
columns: {
|
|
83035
|
+
// TODO Adjust modeling so a global event never needs a client id component
|
|
83036
|
+
seqNumGlobal: wa({ primaryKey: !0, schema: DD }),
|
|
83037
|
+
seqNumClient: wa({ primaryKey: !0, schema: bH }),
|
|
83038
|
+
seqNumRebaseGeneration: wa({ primaryKey: !0 }),
|
|
83039
|
+
parentSeqNumGlobal: wa({ schema: DD }),
|
|
83040
|
+
parentSeqNumClient: wa({ schema: bH }),
|
|
83041
|
+
parentSeqNumRebaseGeneration: wa({}),
|
|
83042
|
+
/** Event definition name */
|
|
83043
|
+
name: nB({}),
|
|
83044
|
+
argsJson: nB({ schema: Xd(uo) }),
|
|
83045
|
+
clientId: nB({}),
|
|
83046
|
+
sessionId: nB({}),
|
|
83047
|
+
schemaHash: wa({}),
|
|
83048
|
+
syncMetadataJson: nB({ schema: Xd(T0(Ah)) })
|
|
83049
|
+
},
|
|
83050
|
+
indexes: [
|
|
83051
|
+
{ columns: ["seqNumGlobal"], name: "idx_eventlog_seqNumGlobal" },
|
|
83052
|
+
{ columns: ["seqNumGlobal", "seqNumClient", "seqNumRebaseGeneration"], name: "idx_eventlog_seqNum" }
|
|
83053
|
+
]
|
|
83054
|
+
}), Lw = "__livestore_sync_status", Iae = Ub({
|
|
83055
|
+
name: Lw,
|
|
83056
|
+
columns: {
|
|
83057
|
+
head: wa({ primaryKey: !0 }),
|
|
83058
|
+
// Null means the sync backend is not yet connected and we haven't yet seen a backend ID
|
|
83059
|
+
backendId: nB({ nullable: !0 })
|
|
83060
|
+
}
|
|
83061
|
+
}), $FA = [e4, Iae], Mo = "0.4.0-dev.12", BrA = 6, zL = _e({
|
|
83062
83062
|
/** True when the upstream sync backend is reachable and responding to health checks. */
|
|
83063
83063
|
isConnected: Er,
|
|
83064
83064
|
/** Unix epoch timestamp (ms) of the latest connectivity state transition. */
|
|
@@ -83788,7 +83788,7 @@ const $L = eX("LSD.Leader.SetSyncLatch", {
|
|
|
83788
83788
|
}, LbA = {
|
|
83789
83789
|
devtoolsClientSession: (A, { storeId: e, clientId: n, sessionId: t }) => A === vH.devtoolsClientSession({ storeId: e, clientId: n, sessionId: t }),
|
|
83790
83790
|
devtoolsClientLeader: (A, { storeId: e, clientId: n }) => A.startsWith(`devtools-channel(client-leader-${e}-${n}`)
|
|
83791
|
-
},
|
|
83791
|
+
}, vbA = (A) => A.makeBroadcastChannel({
|
|
83792
83792
|
channelName: vH.sessionInfo(),
|
|
83793
83793
|
schema: KFA
|
|
83794
83794
|
});
|
|
@@ -83817,7 +83817,7 @@ const Av = _A.pipe(
|
|
|
83817
83817
|
source: _A,
|
|
83818
83818
|
channelName: _A,
|
|
83819
83819
|
hops: Pn(_A)
|
|
83820
|
-
},
|
|
83820
|
+
}, _bA = C$.pipe(no);
|
|
83821
83821
|
class FK extends $n("DirectChannelRequest", {
|
|
83822
83822
|
...Ip,
|
|
83823
83823
|
remainingHops: Pn(_A).pipe(no),
|
|
@@ -83831,7 +83831,7 @@ class FK extends $n("DirectChannelRequest", {
|
|
|
83831
83831
|
sourceId: _A
|
|
83832
83832
|
}) {
|
|
83833
83833
|
}
|
|
83834
|
-
class
|
|
83834
|
+
class JbA extends $n("DirectChannelResponseSuccess", {
|
|
83835
83835
|
...Ip,
|
|
83836
83836
|
reqId: _A,
|
|
83837
83837
|
port: Y1,
|
|
@@ -83840,19 +83840,19 @@ class _bA extends $n("DirectChannelResponseSuccess", {
|
|
|
83840
83840
|
channelVersion: zn
|
|
83841
83841
|
}) {
|
|
83842
83842
|
}
|
|
83843
|
-
class
|
|
83843
|
+
class fX extends $n("DirectChannelResponseNoTransferables", {
|
|
83844
83844
|
...Ip,
|
|
83845
83845
|
reqId: _A,
|
|
83846
83846
|
remainingHops: Pn(_A)
|
|
83847
83847
|
}) {
|
|
83848
83848
|
}
|
|
83849
|
-
class
|
|
83849
|
+
class KbA extends $n("ProxyChannelRequest", {
|
|
83850
83850
|
...Ip,
|
|
83851
|
-
remainingHops:
|
|
83851
|
+
remainingHops: _bA,
|
|
83852
83852
|
channelIdCandidate: _A
|
|
83853
83853
|
}) {
|
|
83854
83854
|
}
|
|
83855
|
-
class
|
|
83855
|
+
class xbA extends $n("ProxyChannelResponseSuccess", {
|
|
83856
83856
|
...Ip,
|
|
83857
83857
|
reqId: _A,
|
|
83858
83858
|
remainingHops: Pn(_A),
|
|
@@ -83860,14 +83860,14 @@ class KbA extends $n("ProxyChannelResponseSuccess", {
|
|
|
83860
83860
|
channelIdCandidate: _A
|
|
83861
83861
|
}) {
|
|
83862
83862
|
}
|
|
83863
|
-
class
|
|
83863
|
+
class HbA extends $n("ProxyChannelPayload", {
|
|
83864
83864
|
...Ip,
|
|
83865
|
-
remainingHops:
|
|
83865
|
+
remainingHops: _bA,
|
|
83866
83866
|
payload: uo,
|
|
83867
83867
|
combinedChannelId: _A
|
|
83868
83868
|
}) {
|
|
83869
83869
|
}
|
|
83870
|
-
class
|
|
83870
|
+
class YbA extends $n("ProxyChannelPayloadAck", {
|
|
83871
83871
|
...Ip,
|
|
83872
83872
|
reqId: _A,
|
|
83873
83873
|
remainingHops: Pn(_A),
|
|
@@ -83913,20 +83913,20 @@ const bK = $n("BroadcastChannelPacket", {
|
|
|
83913
83913
|
});
|
|
83914
83914
|
class cW extends Sn(
|
|
83915
83915
|
FK,
|
|
83916
|
-
|
|
83917
|
-
|
|
83916
|
+
JbA,
|
|
83917
|
+
fX
|
|
83918
83918
|
) {
|
|
83919
83919
|
}
|
|
83920
|
-
class
|
|
83921
|
-
JbA,
|
|
83920
|
+
class TbA extends Sn(
|
|
83922
83921
|
KbA,
|
|
83923
83922
|
xbA,
|
|
83924
|
-
HbA
|
|
83923
|
+
HbA,
|
|
83924
|
+
YbA
|
|
83925
83925
|
) {
|
|
83926
83926
|
}
|
|
83927
83927
|
class ev extends Sn(
|
|
83928
83928
|
cW,
|
|
83929
|
-
|
|
83929
|
+
TbA,
|
|
83930
83930
|
BW,
|
|
83931
83931
|
QW,
|
|
83932
83932
|
EW,
|
|
@@ -84010,7 +84010,7 @@ const dae = kt, hae = ({
|
|
|
84010
84010
|
debugId: I
|
|
84011
84011
|
}).pipe(hD(nrA));
|
|
84012
84012
|
yield* S(
|
|
84013
|
-
|
|
84013
|
+
JbA.make({
|
|
84014
84014
|
reqId: R.id,
|
|
84015
84015
|
target: n,
|
|
84016
84016
|
source: A,
|
|
@@ -84136,7 +84136,7 @@ const dae = kt, hae = ({
|
|
|
84136
84136
|
else {
|
|
84137
84137
|
const P = yield* _.pipe(Vo);
|
|
84138
84138
|
if (P._tag === "Failure")
|
|
84139
|
-
yield* Eo(J, P), ZY(P.cause) && Ig(
|
|
84139
|
+
yield* Eo(J, P), ZY(P.cause) && Ig(fX)(P.cause.error) && (yield* Y.pipe(Vo));
|
|
84140
84140
|
else {
|
|
84141
84141
|
const O = P.value;
|
|
84142
84142
|
yield* Jg(S, { channel: O, makeDirectChannelScope: J, channelVersion: v });
|
|
@@ -84213,7 +84213,7 @@ const dae = kt, hae = ({
|
|
|
84213
84213
|
}, yield* lC(u, a.current), B.isConnected = !0;
|
|
84214
84214
|
}), m = Wg(
|
|
84215
84215
|
() => t(
|
|
84216
|
-
|
|
84216
|
+
KbA.make({ channelName: i, hops: [], source: e, target: g, channelIdCandidate: c })
|
|
84217
84217
|
)
|
|
84218
84218
|
), F = (T) => [c, T].sort().join("_"), w = yield* Ls().pipe(
|
|
84219
84219
|
ag(jo)
|
|
@@ -84229,7 +84229,7 @@ const dae = kt, hae = ({
|
|
|
84229
84229
|
), B.isConnected = !1, B.connectCounter++, yield* m) : x._tag === "Initial" && (yield* lC(u, !1), a.current = { _tag: "Pending", initiatedVia: "incoming-request" }, yield* rE("Connecting (received ProxyChannelRequest)").pipe(
|
|
84230
84230
|
Rd(l)
|
|
84231
84231
|
), B.isConnected = !1, B.connectCounter++), yield* _(
|
|
84232
|
-
|
|
84232
|
+
xbA.make({
|
|
84233
84233
|
reqId: T.id,
|
|
84234
84234
|
remainingHops: T.hops,
|
|
84235
84235
|
hops: [],
|
|
@@ -84291,7 +84291,7 @@ ${AA} (channel) === ${T.combinedChannelId} (packet)`
|
|
|
84291
84291
|
${x.combinedChannelId} (channel) === ${T.combinedChannelId} (packet)`
|
|
84292
84292
|
);
|
|
84293
84293
|
if (yield* _(
|
|
84294
|
-
|
|
84294
|
+
YbA.make({
|
|
84295
84295
|
reqId: T.id,
|
|
84296
84296
|
remainingHops: T.hops,
|
|
84297
84297
|
hops: [],
|
|
@@ -84355,7 +84355,7 @@ ${x.combinedChannelId} (channel) === ${T.combinedChannelId} (packet)`
|
|
|
84355
84355
|
(oA) => oA !== !1
|
|
84356
84356
|
);
|
|
84357
84357
|
yield* GA(function* () {
|
|
84358
|
-
const oA = yield* kt(), nA =
|
|
84358
|
+
const oA = yield* kt(), nA = HbA.make({
|
|
84359
84359
|
channelName: i,
|
|
84360
84360
|
payload: _,
|
|
84361
84361
|
hops: [],
|
|
@@ -84396,7 +84396,7 @@ ${x.combinedChannelId} (channel) === ${T.combinedChannelId} (packet)`
|
|
|
84396
84396
|
};
|
|
84397
84397
|
}).pipe(lb("makeProxyChannel"))
|
|
84398
84398
|
);
|
|
84399
|
-
class
|
|
84399
|
+
class DX {
|
|
84400
84400
|
values = /* @__PURE__ */ new Map();
|
|
84401
84401
|
timeoutHandle;
|
|
84402
84402
|
timeoutMs;
|
|
@@ -84404,7 +84404,7 @@ class yX {
|
|
|
84404
84404
|
this.timeoutMs = Fc(e);
|
|
84405
84405
|
}
|
|
84406
84406
|
static make = (e) => GA(function* () {
|
|
84407
|
-
const n = new
|
|
84407
|
+
const n = new DX({ timeout: e });
|
|
84408
84408
|
return yield* ar(() => We(() => n.onShutdown())), n;
|
|
84409
84409
|
});
|
|
84410
84410
|
add(e) {
|
|
@@ -84429,13 +84429,13 @@ class yX {
|
|
|
84429
84429
|
onShutdown = () => clearTimeout(this.timeoutHandle);
|
|
84430
84430
|
}
|
|
84431
84431
|
const nv = (A) => GA(function* () {
|
|
84432
|
-
const e = /* @__PURE__ */ new Map(), n = yield*
|
|
84432
|
+
const e = /* @__PURE__ */ new Map(), n = yield* DX.make(eY(1)), t = yield* w9().pipe(ag(iH)), g = /* @__PURE__ */ new Map(), i = yield* Ls().pipe(
|
|
84433
84433
|
ag(jo)
|
|
84434
84434
|
), r = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map(), a = (b) => {
|
|
84435
84435
|
if (b._tag === "DirectChannelRequest" && (e.size === 0 || // Either if direct edge does not support transferables ...
|
|
84436
84436
|
e.get(b.target)?.channel.supportsTransferables === !1) || // ... or if no forward-edges support transferables
|
|
84437
84437
|
![...e.values()].some((L) => L.channel.supportsTransferables === !0))
|
|
84438
|
-
return
|
|
84438
|
+
return fX.make({
|
|
84439
84439
|
reqId: b.id,
|
|
84440
84440
|
channelName: b.channelName,
|
|
84441
84441
|
// NOTE for now we're "pretending" that the message is coming from the target node
|
|
@@ -84562,7 +84562,7 @@ const nv = (A) => GA(function* () {
|
|
|
84562
84562
|
),
|
|
84563
84563
|
_g
|
|
84564
84564
|
);
|
|
84565
|
-
Ig(
|
|
84565
|
+
Ig(TbA)(T) ? yield* vg(P, { packet: T, respondToSender: O }) : Ig(cW)(T) && (yield* vg(P, { packet: T, respondToSender: O })), (T._tag === "ProxyChannelRequest" || T._tag === "DirectChannelRequest") && (yield* vg(i, {
|
|
84566
84566
|
channelName: T.channelName,
|
|
84567
84567
|
source: T.source,
|
|
84568
84568
|
mode: T._tag === "ProxyChannelRequest" ? "proxy" : "direct"
|
|
@@ -84861,7 +84861,7 @@ const Cq = kie(pae), mae = ({
|
|
|
84861
84861
|
debugInfo: n
|
|
84862
84862
|
}, from: u };
|
|
84863
84863
|
}).pipe(lb("makeWebSocketEdge"), _g)
|
|
84864
|
-
),
|
|
84864
|
+
), qbA = ({
|
|
84865
84865
|
storeId: A,
|
|
84866
84866
|
clientId: e,
|
|
84867
84867
|
sessionId: n,
|
|
@@ -84892,7 +84892,7 @@ const Cq = kie(pae), mae = ({
|
|
|
84892
84892
|
isLeader: t
|
|
84893
84893
|
});
|
|
84894
84894
|
yield* l({ webmeshNode: F, sessionInfo: R });
|
|
84895
|
-
const S = yield*
|
|
84895
|
+
const S = yield* vbA(F);
|
|
84896
84896
|
yield* xFA({
|
|
84897
84897
|
webChannel: S,
|
|
84898
84898
|
sessionInfo: R
|
|
@@ -84934,7 +84934,7 @@ const Cq = kie(pae), mae = ({
|
|
|
84934
84934
|
shutdown: c,
|
|
84935
84935
|
debugInstanceId: D
|
|
84936
84936
|
};
|
|
84937
|
-
}).pipe(Oe("@livestore/common:make-client-session")),
|
|
84937
|
+
}).pipe(Oe("@livestore/common:make-client-session")), yX = ({
|
|
84938
84938
|
eventDef: A,
|
|
84939
84939
|
materializer: e,
|
|
84940
84940
|
dbState: n,
|
|
@@ -84952,7 +84952,7 @@ const Cq = kie(pae), mae = ({
|
|
|
84952
84952
|
return n.select(B, P0(c, B));
|
|
84953
84953
|
}
|
|
84954
84954
|
};
|
|
84955
|
-
return
|
|
84955
|
+
return PbA(
|
|
84956
84956
|
e(g.args, {
|
|
84957
84957
|
eventDef: A,
|
|
84958
84958
|
query: r,
|
|
@@ -84969,7 +84969,7 @@ const Cq = kie(pae), mae = ({
|
|
|
84969
84969
|
const t = A.eventsDefsMap.get(n.name), g = A.state.materializers.get(n.name);
|
|
84970
84970
|
if (t === void 0 || g === void 0)
|
|
84971
84971
|
return Ie();
|
|
84972
|
-
const i =
|
|
84972
|
+
const i = yX({
|
|
84973
84973
|
eventDef: t,
|
|
84974
84974
|
materializer: g,
|
|
84975
84975
|
dbState: e,
|
|
@@ -84978,9 +84978,9 @@ const Cq = kie(pae), mae = ({
|
|
|
84978
84978
|
return ue(eo(JSON.stringify(i)));
|
|
84979
84979
|
}
|
|
84980
84980
|
return Ie();
|
|
84981
|
-
},
|
|
84981
|
+
}, ObA = (A) => eo(JSON.stringify(A)), PbA = (A) => {
|
|
84982
84982
|
if (uFA(A))
|
|
84983
|
-
return A.flatMap(
|
|
84983
|
+
return A.flatMap(PbA);
|
|
84984
84984
|
if (lE(A)) {
|
|
84985
84985
|
const { query: e, bindValues: n, usedTables: t } = A.asSql();
|
|
84986
84986
|
return [{ sql: e, bindValues: n, writeTables: t }];
|
|
@@ -85000,7 +85000,7 @@ const Cq = kie(pae), mae = ({
|
|
|
85000
85000
|
else if (typeof A == "object" && A !== null)
|
|
85001
85001
|
for (const t in A)
|
|
85002
85002
|
A[t] === e ? A[t] = n : uW(A[t], e, n);
|
|
85003
|
-
},
|
|
85003
|
+
}, VbA = ({ otelTracer: A, parentSpanContext: e }) => (n) => {
|
|
85004
85004
|
const t = zd(gFA, A ?? Zre()), g = ypA(en(Qoe, ppA)).pipe(
|
|
85005
85005
|
C9A(t)
|
|
85006
85006
|
);
|
|
@@ -85037,7 +85037,7 @@ const Cq = kie(pae), mae = ({
|
|
|
85037
85037
|
},
|
|
85038
85038
|
clientId: c.clientId,
|
|
85039
85039
|
sessionId: c.sessionId
|
|
85040
|
-
}), f = yield*
|
|
85040
|
+
}), f = yield* A4(e, {
|
|
85041
85041
|
operation: "@livestore/common:rematerializeFromEventlog:processEvent",
|
|
85042
85042
|
event: u
|
|
85043
85043
|
}).pipe(Cn.mapToUnexpectedError);
|
|
@@ -85098,7 +85098,7 @@ LIMIT ${100}
|
|
|
85098
85098
|
query: { sql: e, bindValues: g ?? {} }
|
|
85099
85099
|
});
|
|
85100
85100
|
}
|
|
85101
|
-
},
|
|
85101
|
+
}, jbA = (A, e, n) => {
|
|
85102
85102
|
const t = A.prepare(e), g = t.select(void 0);
|
|
85103
85103
|
return t.finalize(), g;
|
|
85104
85104
|
}, kae = (A, e) => GA(function* () {
|
|
@@ -85132,7 +85132,7 @@ LIMIT ${100}
|
|
|
85132
85132
|
tableAst: ZFA.sqliteDef.ast,
|
|
85133
85133
|
behaviour: "create-if-not-exists"
|
|
85134
85134
|
}), {
|
|
85135
|
-
getEventDefInfos: () =>
|
|
85135
|
+
getEventDefInfos: () => jbA(A, gi`SELECT * FROM ${MH}`),
|
|
85136
85136
|
setEventDefInfo: (e) => {
|
|
85137
85137
|
kK(
|
|
85138
85138
|
A,
|
|
@@ -85145,7 +85145,7 @@ LIMIT ${100}
|
|
|
85145
85145
|
);
|
|
85146
85146
|
}
|
|
85147
85147
|
};
|
|
85148
|
-
}),
|
|
85148
|
+
}), WbA = ({
|
|
85149
85149
|
db: A,
|
|
85150
85150
|
schema: e,
|
|
85151
85151
|
onProgress: n
|
|
@@ -85158,7 +85158,7 @@ LIMIT ${100}
|
|
|
85158
85158
|
});
|
|
85159
85159
|
const t = yield* Mae(A);
|
|
85160
85160
|
yield* kae(e, t);
|
|
85161
|
-
const g =
|
|
85161
|
+
const g = jbA(A, gi`SELECT * FROM ${ZL}`), i = Object.fromEntries(
|
|
85162
85162
|
g.map(({ tableName: l, schemaHash: u }) => [l, u])
|
|
85163
85163
|
), r = [
|
|
85164
85164
|
// NOTE it's important the `SCHEMA_META_TABLE` comes first since we're writing to it below
|
|
@@ -85184,7 +85184,7 @@ LIMIT ${100}
|
|
|
85184
85184
|
behaviour: t,
|
|
85185
85185
|
skipMetaTable: g = !1
|
|
85186
85186
|
}) => GA(function* () {
|
|
85187
|
-
const i = e.name, r =
|
|
85187
|
+
const i = e.name, r = oae(e);
|
|
85188
85188
|
kK(A, gi`create table if not exists '${i}' (${r}) strict`);
|
|
85189
85189
|
for (const I of e.indexes)
|
|
85190
85190
|
kK(A, Gae(i, I));
|
|
@@ -85209,14 +85209,14 @@ LIMIT ${100}
|
|
|
85209
85209
|
), Gae = (A, e) => {
|
|
85210
85210
|
const n = e.unique ? "UNIQUE" : "";
|
|
85211
85211
|
return gi`create ${n} index if not exists '${e.name}' on '${A}' (${e.columns.map((t) => `'${t}'`).join(", ")})`;
|
|
85212
|
-
},
|
|
85212
|
+
}, ZbA = (A) => (...e) => {
|
|
85213
85213
|
const [n, t, g] = e;
|
|
85214
85214
|
if (lE(n)) {
|
|
85215
85215
|
const { query: i, bindValues: r } = n.asSql();
|
|
85216
85216
|
return A(i, r, t);
|
|
85217
85217
|
} else
|
|
85218
85218
|
return A(n, t, g);
|
|
85219
|
-
},
|
|
85219
|
+
}, zbA = (A) => (...e) => {
|
|
85220
85220
|
const [n, t] = e;
|
|
85221
85221
|
if (lE(n)) {
|
|
85222
85222
|
const { query: g, bindValues: i } = n.asSql(), r = $1(n), I = A(g, i);
|
|
@@ -85445,11 +85445,11 @@ class xae extends ur()("ServerAheadError", {
|
|
|
85445
85445
|
providedNum: DD
|
|
85446
85446
|
}) {
|
|
85447
85447
|
}
|
|
85448
|
-
class
|
|
85448
|
+
class $bA extends ur()("InvalidPushError", {
|
|
85449
85449
|
cause: Sn(Cn, xae, Kae)
|
|
85450
85450
|
}) {
|
|
85451
85451
|
}
|
|
85452
|
-
class
|
|
85452
|
+
class XbA extends ur()("InvalidPullError", {
|
|
85453
85453
|
cause: pC
|
|
85454
85454
|
}) {
|
|
85455
85455
|
}
|
|
@@ -85460,7 +85460,7 @@ class lG extends ur()("LeaderAheadError", {
|
|
|
85460
85460
|
// nextGeneration: Schema.Number,
|
|
85461
85461
|
}) {
|
|
85462
85462
|
}
|
|
85463
|
-
Sn(
|
|
85463
|
+
Sn($bA, XbA);
|
|
85464
85464
|
const uG = Symbol.for("NOT_REFRESHED_YET"), Hae = (A) => typeof A == "object" && A !== null && "_tag" in A && A._tag === "thunk", drA = () => ({ _tag: "unknown" }), Yae = (A) => ({ _tag: "Some", value: A }), Tae = () => ({ _tag: "None" });
|
|
85465
85465
|
let qae = 0;
|
|
85466
85466
|
const Oae = () => `graph-${++qae}`;
|
|
@@ -85753,7 +85753,7 @@ const $ae = (A, e, n, t) => {
|
|
|
85753
85753
|
g.rc--, g.rc === 0 && (g.value.destroy(), n.defRcMap.delete(A));
|
|
85754
85754
|
}
|
|
85755
85755
|
}, n.defRcMap.set(A, g), g);
|
|
85756
|
-
}, ACe = "function() { [bytecode] }", eCe = (A) => A === ACe ? { _tag: "invalid", reason: "react-native" } : { _tag: "valid" }, wrA = (A, e) => `${A.sqliteDef.name}.get:${e === void 0 ? A.default.id : e === Ua ? "sessionId" : e}`,
|
|
85756
|
+
}, ACe = "function() { [bytecode] }", eCe = (A) => A === ACe ? { _tag: "invalid", reason: "react-native" } : { _tag: "valid" }, wrA = (A, e) => `${A.sqliteDef.name}.get:${e === void 0 ? A.default.id : e === Ua ? "sessionId" : e}`, AkA = ({
|
|
85757
85757
|
id: A,
|
|
85758
85758
|
explicitDefaultValues: e,
|
|
85759
85759
|
table: n,
|
|
@@ -85842,7 +85842,7 @@ class gCe extends zae {
|
|
|
85842
85842
|
queriedTables: /* @__PURE__ */ new Set([b.tableDef.sqliteDef.name])
|
|
85843
85843
|
},
|
|
85844
85844
|
label: b._tag === "RowQuery" ? wrA(b.tableDef, b.id) : F.toString(),
|
|
85845
|
-
execBeforeFirstRun: b._tag === "RowQuery" ?
|
|
85845
|
+
execBeforeFirstRun: b._tag === "RowQuery" ? AkA({
|
|
85846
85846
|
table: b.tableDef,
|
|
85847
85847
|
explicitDefaultValues: b.explicitDefaultValues,
|
|
85848
85848
|
id: b.id,
|
|
@@ -86001,7 +86001,7 @@ ${n.map(t).join(`
|
|
|
86001
86001
|
}
|
|
86002
86002
|
};
|
|
86003
86003
|
}
|
|
86004
|
-
const
|
|
86004
|
+
const wX = () => ({
|
|
86005
86005
|
slowQueries: new Ll(200),
|
|
86006
86006
|
queryFrameDuration: 0,
|
|
86007
86007
|
queryFrameCount: 0,
|
|
@@ -86017,7 +86017,7 @@ class rCe {
|
|
|
86017
86017
|
otelTracer;
|
|
86018
86018
|
otelRootSpanContext;
|
|
86019
86019
|
tablesUsedStmt;
|
|
86020
|
-
debugInfo =
|
|
86020
|
+
debugInfo = wX();
|
|
86021
86021
|
constructor({
|
|
86022
86022
|
db: e,
|
|
86023
86023
|
otel: n
|
|
@@ -86114,8 +86114,8 @@ class rCe {
|
|
|
86114
86114
|
}
|
|
86115
86115
|
);
|
|
86116
86116
|
}
|
|
86117
|
-
execute =
|
|
86118
|
-
select =
|
|
86117
|
+
execute = ZbA((e, n) => this.cachedExecute(e, n));
|
|
86118
|
+
select = zbA((e, n) => this.cachedSelect(e, n));
|
|
86119
86119
|
cachedSelect(e, n, t) {
|
|
86120
86120
|
const { queriedTables: g, skipCache: i = !1, otelContext: r } = t ?? {};
|
|
86121
86121
|
return this.otelTracer.startActiveSpan(
|
|
@@ -86230,7 +86230,7 @@ const sCe = (A) => {
|
|
|
86230
86230
|
const { subscriptionId: D } = l, m = [];
|
|
86231
86231
|
let F = !1, w;
|
|
86232
86232
|
const R = () => {
|
|
86233
|
-
m.push(e.sqliteDbWrapper.debugInfo), e.sqliteDbWrapper.debugInfo =
|
|
86233
|
+
m.push(e.sqliteDbWrapper.debugInfo), e.sqliteDbWrapper.debugInfo = wX(), m.length > 10 && (B(
|
|
86234
86234
|
tX.make({
|
|
86235
86235
|
debugInfoHistory: m,
|
|
86236
86236
|
requestId: Wo(10),
|
|
@@ -86455,7 +86455,7 @@ let cCe = class extends PhA {
|
|
|
86455
86455
|
(S, { withChangeset: b, materializerHashLeader: L }) => (
|
|
86456
86456
|
// We need to use `Effect.gen` (even though we're using `Effect.fn`) so that we can pass `this` to the function
|
|
86457
86457
|
GA(this, function* () {
|
|
86458
|
-
const G = yield*
|
|
86458
|
+
const G = yield* A4(n, {
|
|
86459
86459
|
operation: "@livestore/livestore:store:materializeEvent",
|
|
86460
86460
|
event: S
|
|
86461
86461
|
});
|
|
@@ -86465,12 +86465,12 @@ let cCe = class extends PhA {
|
|
|
86465
86465
|
sessionChangeset: { _tag: "no-op" },
|
|
86466
86466
|
materializerHash: Ie()
|
|
86467
86467
|
};
|
|
86468
|
-
const { eventDef: v, materializer: J } = G, Y =
|
|
86468
|
+
const { eventDef: v, materializer: J } = G, Y = yX({
|
|
86469
86469
|
eventDef: v,
|
|
86470
86470
|
materializer: J,
|
|
86471
86471
|
dbState: this.sqliteDbWrapper,
|
|
86472
86472
|
event: { decoded: void 0, encoded: S }
|
|
86473
|
-
}), T = Nc() ? ue(
|
|
86473
|
+
}), T = Nc() ? ue(ObA(Y)) : Ie();
|
|
86474
86474
|
if (L._tag === "Some" && T._tag === "Some" && L.value !== T.value)
|
|
86475
86475
|
return yield* P$.make({ eventName: S.name });
|
|
86476
86476
|
const _ = yield* q0.pipe(_g), P = rI.setSpan(zC.active(), _), O = /* @__PURE__ */ new Set(), x = () => {
|
|
@@ -86654,7 +86654,7 @@ Bind values: ${JSON.stringify(j)}`
|
|
|
86654
86654
|
return e.schema ? pb(e.schema)(t) : t;
|
|
86655
86655
|
} else if (lE(e)) {
|
|
86656
86656
|
const t = e[nh];
|
|
86657
|
-
t._tag === "RowQuery" &&
|
|
86657
|
+
t._tag === "RowQuery" && AkA({
|
|
86658
86658
|
table: t.tableDef,
|
|
86659
86659
|
id: t.id,
|
|
86660
86660
|
explicitDefaultValues: t.explicitDefaultValues,
|
|
@@ -86935,15 +86935,15 @@ Bind values: ${JSON.stringify(j)}`
|
|
|
86935
86935
|
const lCe = {
|
|
86936
86936
|
leaderPushBatchSize: 100
|
|
86937
86937
|
};
|
|
86938
|
-
class
|
|
86938
|
+
class pX extends ZF("@livestore/livestore/effect/LiveStoreContextRunning")() {
|
|
86939
86939
|
static fromDeferred = GA(function* () {
|
|
86940
86940
|
const n = yield* yield* uCe;
|
|
86941
|
-
return zd(
|
|
86941
|
+
return zd(pX, n);
|
|
86942
86942
|
}).pipe(wpA);
|
|
86943
86943
|
}
|
|
86944
86944
|
class uCe extends ZF("@livestore/livestore/effect/DeferredStoreContext")() {
|
|
86945
86945
|
}
|
|
86946
|
-
const
|
|
86946
|
+
const ekA = ({
|
|
86947
86947
|
schema: A,
|
|
86948
86948
|
adapter: e,
|
|
86949
86949
|
storeId: n,
|
|
@@ -87029,7 +87029,7 @@ const AkA = ({
|
|
|
87029
87029
|
() => g(J, { migrationsReport: v.leaderThread.initialState.migrationsReport, parentSpan: m })
|
|
87030
87030
|
).pipe(
|
|
87031
87031
|
Cn.mapToUnexpectedError,
|
|
87032
|
-
Og(zd(
|
|
87032
|
+
Og(zd(pX, { stage: "running", store: J })),
|
|
87033
87033
|
Oe("createStore:boot")
|
|
87034
87034
|
)), yield* b6A(), i !== void 0 && (J.reactivityGraph.context.effectsWrapper = i), yield* Jg(S, J), J;
|
|
87035
87035
|
}).pipe(
|
|
@@ -87071,7 +87071,7 @@ const AkA = ({
|
|
|
87071
87071
|
sub: 150,
|
|
87072
87072
|
super: 150,
|
|
87073
87073
|
meta: 300
|
|
87074
|
-
},
|
|
87074
|
+
}, nkA = _e({
|
|
87075
87075
|
index: zn,
|
|
87076
87076
|
showSuper: Er,
|
|
87077
87077
|
id: _A,
|
|
@@ -87082,10 +87082,10 @@ const AkA = ({
|
|
|
87082
87082
|
sub: _A,
|
|
87083
87083
|
super: _A,
|
|
87084
87084
|
meta: _A
|
|
87085
|
-
}), wCe = GD({ key: WRA(
|
|
87086
|
-
column: WRA(
|
|
87085
|
+
}), wCe = GD({ key: WRA(nkA), value: zn }), pCe = _e({
|
|
87086
|
+
column: WRA(nkA),
|
|
87087
87087
|
direction: On("asc", "desc")
|
|
87088
|
-
}),
|
|
87088
|
+
}), tkA = ch({
|
|
87089
87089
|
name: "__livestore_devtools_AtomsTab",
|
|
87090
87090
|
schema: _e({
|
|
87091
87091
|
columnWidths: wCe,
|
|
@@ -87104,7 +87104,7 @@ const AkA = ({
|
|
|
87104
87104
|
minUpdates: 0
|
|
87105
87105
|
}
|
|
87106
87106
|
}
|
|
87107
|
-
}),
|
|
87107
|
+
}), gkA = ch({
|
|
87108
87108
|
name: "__livestore_devtools_EventlogBrowser",
|
|
87109
87109
|
schema: _e({
|
|
87110
87110
|
autoRefresh: Er,
|
|
@@ -87115,7 +87115,7 @@ const AkA = ({
|
|
|
87115
87115
|
id: "singleton",
|
|
87116
87116
|
value: { autoRefresh: !0, showAllColumns: !1, selectedEventTypes: ["server", "client"] }
|
|
87117
87117
|
}
|
|
87118
|
-
}), mCe = On("asc", "desc"),
|
|
87118
|
+
}), mCe = On("asc", "desc"), ikA = ch({
|
|
87119
87119
|
name: "__livestore_devtools_DataBrowserTab",
|
|
87120
87120
|
schema: _e({
|
|
87121
87121
|
searchKey: _A,
|
|
@@ -87124,7 +87124,7 @@ const AkA = ({
|
|
|
87124
87124
|
columnWidths: GD({ key: _A, value: zn })
|
|
87125
87125
|
}),
|
|
87126
87126
|
default: { value: { searchKey: "", orderByColumn: "", orderByDirection: "asc", columnWidths: {} } }
|
|
87127
|
-
}),
|
|
87127
|
+
}), okA = ch({
|
|
87128
87128
|
name: "__livestore_devtools_DataBrowserTab_singleton",
|
|
87129
87129
|
schema: _e({
|
|
87130
87130
|
activeTableName: _A,
|
|
@@ -87140,41 +87140,41 @@ const AkA = ({
|
|
|
87140
87140
|
autoRefresh: Er
|
|
87141
87141
|
}),
|
|
87142
87142
|
default: { id: Ua, value: { autoRefresh: !0 } }
|
|
87143
|
-
}),
|
|
87143
|
+
}), rkA = ch({
|
|
87144
87144
|
name: "__livestore_devtools_TabsContainer",
|
|
87145
87145
|
schema: _e({
|
|
87146
87146
|
tabIndex: zn,
|
|
87147
87147
|
showMeters: Er
|
|
87148
87148
|
}),
|
|
87149
87149
|
default: { id: Ua, value: { tabIndex: 0, showMeters: !0 } }
|
|
87150
|
-
}),
|
|
87150
|
+
}), skA = ch({
|
|
87151
87151
|
name: "__livestore_devtools_QueriesTab",
|
|
87152
87152
|
schema: _e({
|
|
87153
87153
|
tabIndex: zn
|
|
87154
87154
|
}),
|
|
87155
87155
|
default: { id: Ua, value: { tabIndex: 0 } }
|
|
87156
|
-
}),
|
|
87156
|
+
}), IkA = ch({
|
|
87157
87157
|
name: "__livestore_devtools_NetworkState",
|
|
87158
87158
|
schema: _e({
|
|
87159
87159
|
status: zL
|
|
87160
87160
|
}),
|
|
87161
87161
|
default: { value: { status: { isConnected: !1, timestampMs: 0, devtools: { latchClosed: !1 } } } }
|
|
87162
|
-
}),
|
|
87162
|
+
}), akA = ch({
|
|
87163
87163
|
name: "__livestore_devtools_SqlitePlaygroundState",
|
|
87164
87164
|
schema: _e({
|
|
87165
87165
|
query: _A
|
|
87166
87166
|
}),
|
|
87167
87167
|
default: { id: "singleton", value: { query: "" } }
|
|
87168
87168
|
}), bf = {
|
|
87169
|
-
eventlogBrowserSchema:
|
|
87170
|
-
dataBrowserDynamicSchema:
|
|
87171
|
-
dataBrowserStaticSchema:
|
|
87172
|
-
stateSchemaAtomsTab:
|
|
87169
|
+
eventlogBrowserSchema: gkA,
|
|
87170
|
+
dataBrowserDynamicSchema: ikA,
|
|
87171
|
+
dataBrowserStaticSchema: okA,
|
|
87172
|
+
stateSchemaAtomsTab: tkA,
|
|
87173
87173
|
stateSchemaLiveQueriesTab: RCe,
|
|
87174
|
-
stateSchemaQueriesTab:
|
|
87175
|
-
stateSchemaTabsContainer:
|
|
87176
|
-
networkState:
|
|
87177
|
-
sqlitePlaygroundState:
|
|
87174
|
+
stateSchemaQueriesTab: skA,
|
|
87175
|
+
stateSchemaTabsContainer: rkA,
|
|
87176
|
+
networkState: IkA,
|
|
87177
|
+
sqlitePlaygroundState: akA
|
|
87178
87178
|
}, i4 = typeof navigator > "u" || navigator.storage === void 0 ? (
|
|
87179
87179
|
// We're using a proxy here to make the promise reject lazy
|
|
87180
87180
|
new Proxy(
|
|
@@ -87185,7 +87185,7 @@ const AkA = ({
|
|
|
87185
87185
|
)
|
|
87186
87186
|
}
|
|
87187
87187
|
)
|
|
87188
|
-
) : navigator.storage.getDirectory(),
|
|
87188
|
+
) : navigator.storage.getDirectory(), mX = async (A, e = {}) => {
|
|
87189
87189
|
const n = await i4;
|
|
87190
87190
|
if (A === void 0 || A === "" || A === "/") return n;
|
|
87191
87191
|
let t = n;
|
|
@@ -87193,26 +87193,26 @@ const AkA = ({
|
|
|
87193
87193
|
for (; g.length > 0; )
|
|
87194
87194
|
t = await t.getDirectoryHandle(g.shift(), e);
|
|
87195
87195
|
return t;
|
|
87196
|
-
},
|
|
87196
|
+
}, CkA = async (A = i4, e = Number.POSITIVE_INFINITY, n = "") => {
|
|
87197
87197
|
if (e < 0) return;
|
|
87198
87198
|
const t = await A, g = t.values();
|
|
87199
87199
|
for await (const i of g) {
|
|
87200
87200
|
const r = i.kind === "directory", I = i.kind === "file" ? await i.getFile().then((a) => kM(a.size)) : void 0;
|
|
87201
87201
|
if (console.log(`${n}${r ? "📁" : "📄"} ${i.name} ${I ? `(${I})` : ""}`), r) {
|
|
87202
87202
|
const a = await t.getDirectoryHandle(i.name);
|
|
87203
|
-
await
|
|
87203
|
+
await CkA(a, e - 1, `${n} `);
|
|
87204
87204
|
}
|
|
87205
87205
|
}
|
|
87206
87206
|
}, SCe = async (A) => {
|
|
87207
87207
|
if (A.kind === "directory")
|
|
87208
87208
|
for await (const e of A.keys())
|
|
87209
87209
|
await A.removeEntry(e, { recursive: !0 });
|
|
87210
|
-
},
|
|
87210
|
+
}, BkA = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, deleteAll: SCe, getDirHandle: mX, printTree: CkA, rootHandlePromise: i4 }, Symbol.toStringTag, { value: "Module" })), mS = /* @__PURE__ */ new WeakMap(), UK = /* @__PURE__ */ new WeakMap(), JH = {
|
|
87211
87211
|
current: []
|
|
87212
87212
|
};
|
|
87213
87213
|
let Bq = !1, QM = 0;
|
|
87214
87214
|
const HN = /* @__PURE__ */ new Set(), yJ = /* @__PURE__ */ new Map();
|
|
87215
|
-
function
|
|
87215
|
+
function QkA(A) {
|
|
87216
87216
|
const e = Array.from(A).sort((n, t) => n instanceof RS && n.options.deps.includes(t) ? 1 : t instanceof RS && t.options.deps.includes(n) ? -1 : 0);
|
|
87217
87217
|
for (const n of e) {
|
|
87218
87218
|
if (JH.current.includes(n))
|
|
@@ -87222,7 +87222,7 @@ function BkA(A) {
|
|
|
87222
87222
|
if (t)
|
|
87223
87223
|
for (const g of t) {
|
|
87224
87224
|
const i = mS.get(g);
|
|
87225
|
-
i &&
|
|
87225
|
+
i && QkA(i);
|
|
87226
87226
|
}
|
|
87227
87227
|
}
|
|
87228
87228
|
}
|
|
@@ -87242,7 +87242,7 @@ function bCe(A) {
|
|
|
87242
87242
|
})
|
|
87243
87243
|
);
|
|
87244
87244
|
}
|
|
87245
|
-
function
|
|
87245
|
+
function EkA(A) {
|
|
87246
87246
|
if (QM > 0 && !yJ.has(A) && yJ.set(A, A.prevState), HN.add(A), !(QM > 0) && !Bq)
|
|
87247
87247
|
try {
|
|
87248
87248
|
for (Bq = !0; HN.size > 0; ) {
|
|
@@ -87254,7 +87254,7 @@ function QkA(A) {
|
|
|
87254
87254
|
}
|
|
87255
87255
|
for (const n of e) {
|
|
87256
87256
|
const t = mS.get(n);
|
|
87257
|
-
t && (JH.current.push(n),
|
|
87257
|
+
t && (JH.current.push(n), QkA(t));
|
|
87258
87258
|
}
|
|
87259
87259
|
for (const n of e) {
|
|
87260
87260
|
const t = mS.get(n);
|
|
@@ -87274,7 +87274,7 @@ function EM(A) {
|
|
|
87274
87274
|
} finally {
|
|
87275
87275
|
if (QM--, QM === 0) {
|
|
87276
87276
|
const e = Array.from(HN)[0];
|
|
87277
|
-
e &&
|
|
87277
|
+
e && EkA(e);
|
|
87278
87278
|
}
|
|
87279
87279
|
}
|
|
87280
87280
|
}
|
|
@@ -87289,7 +87289,7 @@ class yW {
|
|
|
87289
87289
|
};
|
|
87290
87290
|
}, this.setState = (t) => {
|
|
87291
87291
|
var g, i, r;
|
|
87292
|
-
this.prevState = this.state, this.state = (g = this.options) != null && g.updateFn ? this.options.updateFn(this.prevState)(t) : t(this.prevState), (r = (i = this.options) == null ? void 0 : i.onUpdate) == null || r.call(i),
|
|
87292
|
+
this.prevState = this.state, this.state = (g = this.options) != null && g.updateFn ? this.options.updateFn(this.prevState)(t) : t(this.prevState), (r = (i = this.options) == null ? void 0 : i.onUpdate) == null || r.call(i), EkA(this);
|
|
87293
87293
|
}, this.prevState = e, this.state = e, this.options = n;
|
|
87294
87294
|
}
|
|
87295
87295
|
}
|
|
@@ -87365,7 +87365,7 @@ class RS {
|
|
|
87365
87365
|
}
|
|
87366
87366
|
}
|
|
87367
87367
|
const AD = "__TSR_index", FrA = "popstate", brA = "beforeunload";
|
|
87368
|
-
function
|
|
87368
|
+
function ckA(A) {
|
|
87369
87369
|
let e = A.getLocation();
|
|
87370
87370
|
const n = /* @__PURE__ */ new Set(), t = (r) => {
|
|
87371
87371
|
e = A.getLocation(), n.forEach((I) => I({ location: e, action: r }));
|
|
@@ -87475,7 +87475,7 @@ function EkA(A) {
|
|
|
87475
87475
|
}
|
|
87476
87476
|
function wW(A, e) {
|
|
87477
87477
|
e || (e = {});
|
|
87478
|
-
const n =
|
|
87478
|
+
const n = RX();
|
|
87479
87479
|
return {
|
|
87480
87480
|
...e,
|
|
87481
87481
|
key: n,
|
|
@@ -87492,7 +87492,7 @@ function kCe(A) {
|
|
|
87492
87492
|
e.history.state
|
|
87493
87493
|
);
|
|
87494
87494
|
if (!e.history.state?.__TSR_key && !e.history.state?.key) {
|
|
87495
|
-
const J =
|
|
87495
|
+
const J = RX();
|
|
87496
87496
|
e.history.replaceState(
|
|
87497
87497
|
{
|
|
87498
87498
|
[AD]: 0,
|
|
@@ -87572,7 +87572,7 @@ function kCe(A) {
|
|
|
87572
87572
|
}
|
|
87573
87573
|
if (Y)
|
|
87574
87574
|
return J.preventDefault(), J.returnValue = "";
|
|
87575
|
-
}, v =
|
|
87575
|
+
}, v = ckA({
|
|
87576
87576
|
getLocation: m,
|
|
87577
87577
|
getLength: () => e.history.length,
|
|
87578
87578
|
pushState: (J, Y) => S("push", J, Y),
|
|
@@ -87614,7 +87614,7 @@ function UCe(A = {
|
|
|
87614
87614
|
const t = e.map(
|
|
87615
87615
|
(i, r) => wW(r, void 0)
|
|
87616
87616
|
);
|
|
87617
|
-
return
|
|
87617
|
+
return ckA({
|
|
87618
87618
|
getLocation: () => dG(e[n], t[n]),
|
|
87619
87619
|
getLength: () => e.length,
|
|
87620
87620
|
pushState: (i, r) => {
|
|
@@ -87636,7 +87636,7 @@ function UCe(A = {
|
|
|
87636
87636
|
});
|
|
87637
87637
|
}
|
|
87638
87638
|
function dG(A, e) {
|
|
87639
|
-
const n = A.indexOf("#"), t = A.indexOf("?"), g =
|
|
87639
|
+
const n = A.indexOf("#"), t = A.indexOf("?"), g = RX();
|
|
87640
87640
|
return {
|
|
87641
87641
|
href: A,
|
|
87642
87642
|
pathname: A.substring(
|
|
@@ -87648,7 +87648,7 @@ function dG(A, e) {
|
|
|
87648
87648
|
state: e || { [AD]: 0, key: g, __TSR_key: g }
|
|
87649
87649
|
};
|
|
87650
87650
|
}
|
|
87651
|
-
function
|
|
87651
|
+
function RX() {
|
|
87652
87652
|
return (Math.random() + 1).toString(36).substring(7);
|
|
87653
87653
|
}
|
|
87654
87654
|
function pW(A) {
|
|
@@ -87779,21 +87779,21 @@ function th(A, e) {
|
|
|
87779
87779
|
}
|
|
87780
87780
|
const JB = "__root__", Tl = 0, vw = 1, RF = 2, SF = 3;
|
|
87781
87781
|
function _d(A) {
|
|
87782
|
-
return
|
|
87782
|
+
return SX(
|
|
87783
87783
|
A.filter((e) => e !== void 0).join("/")
|
|
87784
87784
|
);
|
|
87785
87785
|
}
|
|
87786
|
-
function
|
|
87786
|
+
function SX(A) {
|
|
87787
87787
|
return A.replace(/\/{2,}/g, "/");
|
|
87788
87788
|
}
|
|
87789
|
-
function
|
|
87789
|
+
function FX(A) {
|
|
87790
87790
|
return A === "/" ? A : A.replace(/^\/{1,}/, "");
|
|
87791
87791
|
}
|
|
87792
87792
|
function nD(A) {
|
|
87793
87793
|
return A === "/" ? A : A.replace(/\/{1,}$/, "");
|
|
87794
87794
|
}
|
|
87795
87795
|
function NK(A) {
|
|
87796
|
-
return nD(
|
|
87796
|
+
return nD(FX(A));
|
|
87797
87797
|
}
|
|
87798
87798
|
function xH(A, e) {
|
|
87799
87799
|
return A?.endsWith("/") && A !== "/" && A !== `${e}/` ? A.slice(0, -1) : A;
|
|
@@ -87835,7 +87835,7 @@ function _Ce({
|
|
|
87835
87835
|
trailingSlash: n = "never",
|
|
87836
87836
|
parseCache: t
|
|
87837
87837
|
}) {
|
|
87838
|
-
let g =
|
|
87838
|
+
let g = lkA(A, t).slice();
|
|
87839
87839
|
const i = o4(e, t);
|
|
87840
87840
|
g.length > 1 && pW(g)?.value === "/" && g.pop();
|
|
87841
87841
|
for (let a = 0, B = i.length; a < B; a++) {
|
|
@@ -87846,7 +87846,7 @@ function _Ce({
|
|
|
87846
87846
|
const r = g.map(vCe);
|
|
87847
87847
|
return _d(r);
|
|
87848
87848
|
}
|
|
87849
|
-
const
|
|
87849
|
+
const lkA = (A, e) => ukA(A, e, !0), o4 = (A, e) => ukA(A, e, !1), ukA = (A, e, n) => {
|
|
87850
87850
|
if (!A) return [];
|
|
87851
87851
|
const t = e?.get(A);
|
|
87852
87852
|
if (t) return t;
|
|
@@ -87854,7 +87854,7 @@ const ckA = (A, e) => lkA(A, e, !0), o4 = (A, e) => lkA(A, e, !1), lkA = (A, e,
|
|
|
87854
87854
|
return e?.set(A, g), g;
|
|
87855
87855
|
}, JCe = /^\$.{1,}$/, KCe = /^(.*?)\{(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/, xCe = /^(.*?)\{-(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/, HCe = /^\$$/, YCe = /^(.*?)\{\$\}(.*)$/;
|
|
87856
87856
|
function TCe(A, e) {
|
|
87857
|
-
A =
|
|
87857
|
+
A = SX(A);
|
|
87858
87858
|
const n = [];
|
|
87859
87859
|
if (A.slice(0, 1) === "/" && (A = A.substring(1), n.push({
|
|
87860
87860
|
type: Tl,
|
|
@@ -87989,7 +87989,7 @@ function OCe(A, {
|
|
|
87989
87989
|
fuzzy: n,
|
|
87990
87990
|
caseSensitive: t
|
|
87991
87991
|
}, g) {
|
|
87992
|
-
const i = e, r =
|
|
87992
|
+
const i = e, r = lkA(
|
|
87993
87993
|
A.startsWith("/") ? A : `/${A}`,
|
|
87994
87994
|
g
|
|
87995
87995
|
), I = o4(
|
|
@@ -88122,7 +88122,7 @@ function nBe(A) {
|
|
|
88122
88122
|
return A.forEach((t, g) => {
|
|
88123
88123
|
if (t.isRoot || !t.path)
|
|
88124
88124
|
return;
|
|
88125
|
-
const i =
|
|
88125
|
+
const i = FX(t.fullPath);
|
|
88126
88126
|
let r = o4(i), I = 0;
|
|
88127
88127
|
for (; r.length > I + 1 && r[I]?.value === "/"; )
|
|
88128
88128
|
I++;
|
|
@@ -88242,7 +88242,7 @@ function rBe(A) {
|
|
|
88242
88242
|
return `${e.reverse().join(" > ")}`.toLowerCase();
|
|
88243
88243
|
}
|
|
88244
88244
|
let YH = !1;
|
|
88245
|
-
function
|
|
88245
|
+
function dkA({
|
|
88246
88246
|
storageKey: A,
|
|
88247
88247
|
key: e,
|
|
88248
88248
|
behavior: n,
|
|
@@ -88333,7 +88333,7 @@ function sBe(A, e) {
|
|
|
88333
88333
|
}
|
|
88334
88334
|
typeof A.options.scrollRestoration == "function" && !A.options.scrollRestoration({
|
|
88335
88335
|
location: A.latestLocation
|
|
88336
|
-
}) || (
|
|
88336
|
+
}) || (dkA({
|
|
88337
88337
|
storageKey: HH,
|
|
88338
88338
|
key: r,
|
|
88339
88339
|
behavior: A.options.scrollRestorationBehavior,
|
|
@@ -88459,7 +88459,7 @@ function uBe(A) {
|
|
|
88459
88459
|
const MK = (A) => {
|
|
88460
88460
|
if (!A.rendered)
|
|
88461
88461
|
return A.rendered = !0, A.onReady?.();
|
|
88462
|
-
}, r4 = (A, e) => !!(A.preload && !A.router.state.matches.some((n) => n.id === e)),
|
|
88462
|
+
}, r4 = (A, e) => !!(A.preload && !A.router.state.matches.some((n) => n.id === e)), hkA = (A, e) => {
|
|
88463
88463
|
const n = A.router.routesById[e.routeId ?? ""] ?? A.router.routeTree;
|
|
88464
88464
|
!n.options.notFoundComponent && A.router.options?.defaultNotFoundComponent && (n.options.notFoundComponent = A.router.options.defaultNotFoundComponent), th(
|
|
88465
88465
|
n.options.notFoundComponent,
|
|
@@ -88471,7 +88471,7 @@ const MK = (A) => {
|
|
|
88471
88471
|
status: "notFound",
|
|
88472
88472
|
error: e,
|
|
88473
88473
|
isFetching: !1
|
|
88474
|
-
})), e.routerCode === "BEFORE_LOAD" && n.parentRoute && (e.routeId = n.parentRoute.id,
|
|
88474
|
+
})), e.routerCode === "BEFORE_LOAD" && n.parentRoute && (e.routeId = n.parentRoute.id, hkA(A, e));
|
|
88475
88475
|
}, Pf = (A, e, n) => {
|
|
88476
88476
|
if (!(!vl(n) && !ru(n))) {
|
|
88477
88477
|
if (vl(n) && n.redirectHandled && !n.options.reloadDocument)
|
|
@@ -88486,9 +88486,9 @@ const MK = (A) => {
|
|
|
88486
88486
|
error: n
|
|
88487
88487
|
})), ru(n) && !n.routeId && (n.routeId = e.routeId), e._nonReactive.loadPromise?.resolve();
|
|
88488
88488
|
}
|
|
88489
|
-
throw vl(n) ? (A.rendered = !0, n.options._fromLocation = A.location, n.redirectHandled = !0, n = A.router.resolveRedirect(n), n) : (
|
|
88489
|
+
throw vl(n) ? (A.rendered = !0, n.options._fromLocation = A.location, n.redirectHandled = !0, n = A.router.resolveRedirect(n), n) : (hkA(A, n), n);
|
|
88490
88490
|
}
|
|
88491
|
-
},
|
|
88491
|
+
}, fkA = (A, e) => {
|
|
88492
88492
|
const n = A.router.getMatch(e);
|
|
88493
88493
|
return !!(!A.router.isServer && n._nonReactive.dehydrated || A.router.isServer && n.ssr === !1);
|
|
88494
88494
|
}, QN = (A, e, n, t) => {
|
|
@@ -88549,10 +88549,10 @@ const MK = (A) => {
|
|
|
88549
88549
|
g.ssr = I(f ?? a);
|
|
88550
88550
|
});
|
|
88551
88551
|
g.ssr = I(u ?? a);
|
|
88552
|
-
},
|
|
88552
|
+
}, DkA = (A, e, n, t) => {
|
|
88553
88553
|
if (t._nonReactive.pendingTimeout !== void 0) return;
|
|
88554
88554
|
const g = n.options.pendingMs ?? A.router.options.defaultPendingMs;
|
|
88555
|
-
if (!!(A.onReady && !A.router.isServer && !r4(A, e) && (n.options.loader || n.options.beforeLoad ||
|
|
88555
|
+
if (!!(A.onReady && !A.router.isServer && !r4(A, e) && (n.options.loader || n.options.beforeLoad || pkA(n)) && typeof g == "number" && g !== 1 / 0 && (n.options.pendingComponent ?? A.router.options?.defaultPendingComponent))) {
|
|
88556
88556
|
const r = setTimeout(() => {
|
|
88557
88557
|
MK(A);
|
|
88558
88558
|
}, g);
|
|
@@ -88562,7 +88562,7 @@ const MK = (A) => {
|
|
|
88562
88562
|
const t = A.router.getMatch(e);
|
|
88563
88563
|
if (!t._nonReactive.beforeLoadPromise && !t._nonReactive.loaderPromise)
|
|
88564
88564
|
return;
|
|
88565
|
-
|
|
88565
|
+
DkA(A, e, n, t);
|
|
88566
88566
|
const g = () => {
|
|
88567
88567
|
const i = A.router.getMatch(e);
|
|
88568
88568
|
i.preload && (i.status === "redirected" || i.status === "notFound") && Pf(A, i, i.error);
|
|
@@ -88574,7 +88574,7 @@ const MK = (A) => {
|
|
|
88574
88574
|
i?.resolve();
|
|
88575
88575
|
});
|
|
88576
88576
|
const { paramsError: r, searchError: I } = g;
|
|
88577
|
-
r && QN(A, n, r, "PARSE_PARAMS"), I && QN(A, n, I, "VALIDATE_SEARCH"),
|
|
88577
|
+
r && QN(A, n, r, "PARSE_PARAMS"), I && QN(A, n, I, "VALIDATE_SEARCH"), DkA(A, e, t, g);
|
|
88578
88578
|
const a = new AbortController(), B = A.matches[n - 1]?.id, u = { ...(B ? A.router.getMatch(B) : void 0)?.context ?? A.router.options.context ?? void 0, ...g.__routeContext };
|
|
88579
88579
|
let f = !1;
|
|
88580
88580
|
const D = () => {
|
|
@@ -88649,7 +88649,7 @@ const MK = (A) => {
|
|
|
88649
88649
|
}
|
|
88650
88650
|
return I();
|
|
88651
88651
|
}, r = () => fBe(A, n, e, g), I = () => {
|
|
88652
|
-
if (
|
|
88652
|
+
if (fkA(A, n)) return;
|
|
88653
88653
|
const a = hBe(A, n, g);
|
|
88654
88654
|
return eD(a) ? a.then(r) : r();
|
|
88655
88655
|
};
|
|
@@ -88679,7 +88679,7 @@ const MK = (A) => {
|
|
|
88679
88679
|
styles: l
|
|
88680
88680
|
};
|
|
88681
88681
|
});
|
|
88682
|
-
},
|
|
88682
|
+
}, ykA = (A, e, n, t) => {
|
|
88683
88683
|
const g = A.matchPromises[n - 1], { params: i, loaderDeps: r, abortController: I, context: a, cause: B } = A.router.getMatch(e), c = r4(A, e);
|
|
88684
88684
|
return {
|
|
88685
88685
|
params: i,
|
|
@@ -88701,9 +88701,9 @@ const MK = (A) => {
|
|
|
88701
88701
|
try {
|
|
88702
88702
|
const g = A.router.getMatch(e);
|
|
88703
88703
|
try {
|
|
88704
|
-
(!A.router.isServer || g.ssr === !0) &&
|
|
88704
|
+
(!A.router.isServer || g.ssr === !0) && wkA(t);
|
|
88705
88705
|
const i = t.options.loader?.(
|
|
88706
|
-
|
|
88706
|
+
ykA(A, e, n, t)
|
|
88707
88707
|
), r = t.options.loader && eD(i);
|
|
88708
88708
|
if (!!(r || t._lazyPromise || t._componentsPromise || t.options.head || t.options.scripts || t.options.headers || g._nonReactive.minPendingPromise) && A.updateMatch(e, (l) => ({
|
|
88709
88709
|
...l,
|
|
@@ -88770,7 +88770,7 @@ const MK = (A) => {
|
|
|
88770
88770
|
const { id: n, routeId: t } = A.matches[e];
|
|
88771
88771
|
let g = !1, i = !1;
|
|
88772
88772
|
const r = A.router.looseRoutesById[t];
|
|
88773
|
-
if (
|
|
88773
|
+
if (fkA(A, n)) {
|
|
88774
88774
|
if (A.router.isServer) {
|
|
88775
88775
|
const B = cM(A, n, r);
|
|
88776
88776
|
if (B) {
|
|
@@ -88791,7 +88791,7 @@ const MK = (A) => {
|
|
|
88791
88791
|
const c = A.router.getMatch(n);
|
|
88792
88792
|
c.error && Pf(A, c, c.error);
|
|
88793
88793
|
} else {
|
|
88794
|
-
const c = Date.now() - B.updatedAt, l = r4(A, n), u = l ? r.options.preloadStaleTime ?? A.router.options.defaultPreloadStaleTime ?? 3e4 : r.options.staleTime ?? A.router.options.defaultStaleTime ?? 0, f = r.options.shouldReload, D = typeof f == "function" ? f(
|
|
88794
|
+
const c = Date.now() - B.updatedAt, l = r4(A, n), u = l ? r.options.preloadStaleTime ?? A.router.options.defaultPreloadStaleTime ?? 3e4 : r.options.staleTime ?? A.router.options.defaultStaleTime ?? 0, f = r.options.shouldReload, D = typeof f == "function" ? f(ykA(A, n, e, r)) : f, m = !!l && !A.router.state.matches.some((S) => S.id === n), F = A.router.getMatch(n);
|
|
88795
88795
|
F._nonReactive.loaderPromise = mF(), m !== F.preload && A.updateMatch(n, (S) => ({
|
|
88796
88796
|
...S,
|
|
88797
88797
|
preload: m
|
|
@@ -88856,14 +88856,14 @@ async function JrA(A) {
|
|
|
88856
88856
|
}
|
|
88857
88857
|
return e.matches;
|
|
88858
88858
|
}
|
|
88859
|
-
async function
|
|
88859
|
+
async function wkA(A) {
|
|
88860
88860
|
if (!A._lazyLoaded && A._lazyPromise === void 0 && (A.lazyFn ? A._lazyPromise = A.lazyFn().then((e) => {
|
|
88861
88861
|
const { id: n, ...t } = e.options;
|
|
88862
88862
|
Object.assign(A.options, t), A._lazyLoaded = !0, A._lazyPromise = void 0;
|
|
88863
88863
|
}) : A._lazyLoaded = !0), !A._componentsLoaded && A._componentsPromise === void 0) {
|
|
88864
88864
|
const e = () => {
|
|
88865
88865
|
const n = [];
|
|
88866
|
-
for (const t of
|
|
88866
|
+
for (const t of mkA) {
|
|
88867
88867
|
const g = A.options[t]?.preload;
|
|
88868
88868
|
g && n.push(g());
|
|
88869
88869
|
}
|
|
@@ -88880,13 +88880,13 @@ async function ykA(A) {
|
|
|
88880
88880
|
function mJ(A, e) {
|
|
88881
88881
|
return e ? { status: "error", error: e } : { status: "success", value: A };
|
|
88882
88882
|
}
|
|
88883
|
-
function
|
|
88884
|
-
for (const e of
|
|
88883
|
+
function pkA(A) {
|
|
88884
|
+
for (const e of mkA)
|
|
88885
88885
|
if (A.options[e]?.preload)
|
|
88886
88886
|
return !0;
|
|
88887
88887
|
return !1;
|
|
88888
88888
|
}
|
|
88889
|
-
const
|
|
88889
|
+
const mkA = [
|
|
88890
88890
|
"component",
|
|
88891
88891
|
"errorComponent",
|
|
88892
88892
|
"pendingComponent",
|
|
@@ -88896,12 +88896,12 @@ function wBe(A) {
|
|
|
88896
88896
|
return {
|
|
88897
88897
|
input: ({ url: e }) => {
|
|
88898
88898
|
for (const n of A)
|
|
88899
|
-
e =
|
|
88899
|
+
e = RkA(n, e);
|
|
88900
88900
|
return e;
|
|
88901
88901
|
},
|
|
88902
88902
|
output: ({ url: e }) => {
|
|
88903
88903
|
for (let n = A.length - 1; n >= 0; n--)
|
|
88904
|
-
e =
|
|
88904
|
+
e = SkA(A[n], e);
|
|
88905
88905
|
return e;
|
|
88906
88906
|
}
|
|
88907
88907
|
};
|
|
@@ -88916,7 +88916,7 @@ function pBe(A) {
|
|
|
88916
88916
|
output: ({ url: r }) => (r.pathname = _d(["/", e, r.pathname]), r)
|
|
88917
88917
|
};
|
|
88918
88918
|
}
|
|
88919
|
-
function
|
|
88919
|
+
function RkA(A, e) {
|
|
88920
88920
|
const n = A?.input?.({ url: e });
|
|
88921
88921
|
if (n) {
|
|
88922
88922
|
if (typeof n == "string")
|
|
@@ -88926,7 +88926,7 @@ function mkA(A, e) {
|
|
|
88926
88926
|
}
|
|
88927
88927
|
return e;
|
|
88928
88928
|
}
|
|
88929
|
-
function
|
|
88929
|
+
function SkA(A, e) {
|
|
88930
88930
|
const n = A?.output?.({ url: e });
|
|
88931
88931
|
if (n) {
|
|
88932
88932
|
if (typeof n == "string")
|
|
@@ -89023,7 +89023,7 @@ class mBe {
|
|
|
89023
89023
|
href: a,
|
|
89024
89024
|
state: B
|
|
89025
89025
|
}) => {
|
|
89026
|
-
const c = new URL(a, this.origin), l =
|
|
89026
|
+
const c = new URL(a, this.origin), l = RkA(this.rewrite, c), u = this.options.parseSearch(l.search), f = this.options.stringifySearch(u);
|
|
89027
89027
|
l.search = f;
|
|
89028
89028
|
const D = l.href.replace(l.origin, ""), { pathname: m, hash: F } = l;
|
|
89029
89029
|
return {
|
|
@@ -89047,7 +89047,7 @@ class mBe {
|
|
|
89047
89047
|
return i;
|
|
89048
89048
|
}, this.resolvePathWithBase = (n, t) => _Ce({
|
|
89049
89049
|
base: n,
|
|
89050
|
-
to:
|
|
89050
|
+
to: SX(t),
|
|
89051
89051
|
trailingSlash: this.options.trailingSlash,
|
|
89052
89052
|
parseCache: this.parsePathnameCache
|
|
89053
89053
|
}), this.matchRoutes = (n, t, g) => typeof n == "string" ? this.matchRoutesInternal(
|
|
@@ -89134,7 +89134,7 @@ class mBe {
|
|
|
89134
89134
|
const S = this.options.stringifySearch(R), b = i.hash === !0 ? r.hash : i.hash ? j0(i.hash, r.hash) : void 0, L = b ? `#${b}` : "";
|
|
89135
89135
|
let G = i.state === !0 ? r.state : i.state ? j0(i.state, r.state) : {};
|
|
89136
89136
|
G = XQ(r.state, G);
|
|
89137
|
-
const v = `${w}${S}${L}`, J = new URL(v, this.origin), Y =
|
|
89137
|
+
const v = `${w}${S}${L}`, J = new URL(v, this.origin), Y = SkA(this.rewrite, J);
|
|
89138
89138
|
return {
|
|
89139
89139
|
publicHref: Y.pathname + Y.search + Y.hash,
|
|
89140
89140
|
href: v,
|
|
@@ -89450,7 +89450,7 @@ class mBe {
|
|
|
89450
89450
|
return t.status === "error" ? !0 : Date.now() - t.updatedAt >= i;
|
|
89451
89451
|
};
|
|
89452
89452
|
this.clearCache({ filter: n });
|
|
89453
|
-
}, this.loadRouteChunk =
|
|
89453
|
+
}, this.loadRouteChunk = wkA, this.preloadRoute = async (n) => {
|
|
89454
89454
|
const t = this.buildLocation(n);
|
|
89455
89455
|
let g = this.matchRoutes(t, {
|
|
89456
89456
|
throwOnError: !0,
|
|
@@ -89626,7 +89626,7 @@ class mBe {
|
|
|
89626
89626
|
_strictSearch: D
|
|
89627
89627
|
};
|
|
89628
89628
|
else {
|
|
89629
|
-
const P = c.options.loader || c.options.beforeLoad || c.lazyFn ||
|
|
89629
|
+
const P = c.options.loader || c.options.beforeLoad || c.lazyFn || pkA(c) ? "pending" : "success";
|
|
89630
89630
|
T = {
|
|
89631
89631
|
id: b,
|
|
89632
89632
|
index: l,
|
|
@@ -89833,7 +89833,7 @@ function bBe({
|
|
|
89833
89833
|
return r(0, A);
|
|
89834
89834
|
}
|
|
89835
89835
|
const kBe = "Error preloading route! ☝️";
|
|
89836
|
-
class
|
|
89836
|
+
class FkA {
|
|
89837
89837
|
constructor(e) {
|
|
89838
89838
|
if (this.init = (n) => {
|
|
89839
89839
|
this.originalIndex = n.originalIndex;
|
|
@@ -89843,7 +89843,7 @@ class SkA {
|
|
|
89843
89843
|
"Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance."
|
|
89844
89844
|
);
|
|
89845
89845
|
let i = g ? JB : t?.path;
|
|
89846
|
-
i && i !== "/" && (i =
|
|
89846
|
+
i && i !== "/" && (i = FX(i));
|
|
89847
89847
|
const r = t?.id || i;
|
|
89848
89848
|
let I = g ? JB : _d([
|
|
89849
89849
|
this.parentRoute.id === JB ? "" : this.parentRoute.id,
|
|
@@ -89870,12 +89870,12 @@ class SkA {
|
|
|
89870
89870
|
return this._fullPath;
|
|
89871
89871
|
}
|
|
89872
89872
|
}
|
|
89873
|
-
class UBe extends
|
|
89873
|
+
class UBe extends FkA {
|
|
89874
89874
|
constructor(e) {
|
|
89875
89875
|
super(e);
|
|
89876
89876
|
}
|
|
89877
89877
|
}
|
|
89878
|
-
function
|
|
89878
|
+
function bX(A) {
|
|
89879
89879
|
const e = A.errorComponent ?? s4;
|
|
89880
89880
|
return /* @__PURE__ */ z.jsx(
|
|
89881
89881
|
NBe,
|
|
@@ -90091,10 +90091,10 @@ var TrA;
|
|
|
90091
90091
|
function KBe() {
|
|
90092
90092
|
return TrA || (TrA = 1, process.env.NODE_ENV === "production" ? RJ.exports = /* @__PURE__ */ _Be() : RJ.exports = /* @__PURE__ */ JBe()), RJ.exports;
|
|
90093
90093
|
}
|
|
90094
|
-
var
|
|
90095
|
-
const xBe = /* @__PURE__ */ NE(
|
|
90094
|
+
var bkA = /* @__PURE__ */ KBe();
|
|
90095
|
+
const xBe = /* @__PURE__ */ NE(bkA);
|
|
90096
90096
|
function HBe(A, e = (n) => n) {
|
|
90097
|
-
return
|
|
90097
|
+
return bkA.useSyncExternalStoreWithSelector(
|
|
90098
90098
|
A.subscribe,
|
|
90099
90099
|
() => A.state,
|
|
90100
90100
|
() => A.state,
|
|
@@ -90128,11 +90128,11 @@ function YBe(A, e) {
|
|
|
90128
90128
|
return !0;
|
|
90129
90129
|
}
|
|
90130
90130
|
const uq = U.createContext(null);
|
|
90131
|
-
function
|
|
90131
|
+
function kkA() {
|
|
90132
90132
|
return typeof document > "u" ? uq : window.__TSR_ROUTER_CONTEXT__ ? window.__TSR_ROUTER_CONTEXT__ : (window.__TSR_ROUTER_CONTEXT__ = uq, uq);
|
|
90133
90133
|
}
|
|
90134
90134
|
function mC(A) {
|
|
90135
|
-
const e = U.useContext(
|
|
90135
|
+
const e = U.useContext(kkA());
|
|
90136
90136
|
return FF(
|
|
90137
90137
|
!((A?.warn ?? !0) && !e),
|
|
90138
90138
|
"useRouter must be used inside a <RouterProvider> component!"
|
|
@@ -90177,7 +90177,7 @@ function su(A) {
|
|
|
90177
90177
|
structuralSharing: A.structuralSharing
|
|
90178
90178
|
});
|
|
90179
90179
|
}
|
|
90180
|
-
function
|
|
90180
|
+
function kX(A) {
|
|
90181
90181
|
return su({
|
|
90182
90182
|
from: A.from,
|
|
90183
90183
|
strict: A.strict,
|
|
@@ -90185,14 +90185,14 @@ function UX(A) {
|
|
|
90185
90185
|
select: (e) => A.select ? A.select(e.loaderData) : e.loaderData
|
|
90186
90186
|
});
|
|
90187
90187
|
}
|
|
90188
|
-
function
|
|
90188
|
+
function UX(A) {
|
|
90189
90189
|
const { select: e, ...n } = A;
|
|
90190
90190
|
return su({
|
|
90191
90191
|
...n,
|
|
90192
90192
|
select: (t) => e ? e(t.loaderDeps) : t.loaderDeps
|
|
90193
90193
|
});
|
|
90194
90194
|
}
|
|
90195
|
-
function
|
|
90195
|
+
function NX(A) {
|
|
90196
90196
|
return su({
|
|
90197
90197
|
from: A.from,
|
|
90198
90198
|
shouldThrow: A.shouldThrow,
|
|
@@ -90204,7 +90204,7 @@ function MX(A) {
|
|
|
90204
90204
|
}
|
|
90205
90205
|
});
|
|
90206
90206
|
}
|
|
90207
|
-
function
|
|
90207
|
+
function MX(A) {
|
|
90208
90208
|
return su({
|
|
90209
90209
|
from: A.from,
|
|
90210
90210
|
strict: A.strict,
|
|
@@ -90213,7 +90213,7 @@ function GX(A) {
|
|
|
90213
90213
|
select: (e) => A.select ? A.select(e.search) : e.search
|
|
90214
90214
|
});
|
|
90215
90215
|
}
|
|
90216
|
-
function
|
|
90216
|
+
function GX(A) {
|
|
90217
90217
|
const e = mC();
|
|
90218
90218
|
return U.useCallback(
|
|
90219
90219
|
(n) => e.navigate({
|
|
@@ -90479,7 +90479,7 @@ const hq = {}, VBe = { className: "active" }, jBe = { role: "link", "aria-disabl
|
|
|
90479
90479
|
function $Be(A) {
|
|
90480
90480
|
return !!(A.metaKey || A.altKey || A.ctrlKey || A.shiftKey);
|
|
90481
90481
|
}
|
|
90482
|
-
let XBe = class extends
|
|
90482
|
+
let XBe = class extends FkA {
|
|
90483
90483
|
/**
|
|
90484
90484
|
* @deprecated Use the `createRoute` function instead.
|
|
90485
90485
|
*/
|
|
@@ -90492,15 +90492,15 @@ let XBe = class extends SkA {
|
|
|
90492
90492
|
...n,
|
|
90493
90493
|
from: this.id,
|
|
90494
90494
|
select: (t) => n?.select ? n.select(t.context) : t.context
|
|
90495
|
-
}), this.useSearch = (n) =>
|
|
90495
|
+
}), this.useSearch = (n) => MX({
|
|
90496
90496
|
select: n?.select,
|
|
90497
90497
|
structuralSharing: n?.structuralSharing,
|
|
90498
90498
|
from: this.id
|
|
90499
|
-
}), this.useParams = (n) =>
|
|
90499
|
+
}), this.useParams = (n) => NX({
|
|
90500
90500
|
select: n?.select,
|
|
90501
90501
|
structuralSharing: n?.structuralSharing,
|
|
90502
90502
|
from: this.id
|
|
90503
|
-
}), this.useLoaderDeps = (n) =>
|
|
90503
|
+
}), this.useLoaderDeps = (n) => UX({ ...n, from: this.id }), this.useLoaderData = (n) => kX({ ...n, from: this.id }), this.useNavigate = () => GX({ from: this.fullPath }), this.Link = X.forwardRef(
|
|
90504
90504
|
(n, t) => /* @__PURE__ */ z.jsx(a4, { ref: t, from: this.fullPath, ...n })
|
|
90505
90505
|
), this.$$typeof = Symbol.for("react.memo");
|
|
90506
90506
|
}
|
|
@@ -90524,15 +90524,15 @@ class eQe extends UBe {
|
|
|
90524
90524
|
...n,
|
|
90525
90525
|
from: this.id,
|
|
90526
90526
|
select: (t) => n?.select ? n.select(t.context) : t.context
|
|
90527
|
-
}), this.useSearch = (n) =>
|
|
90527
|
+
}), this.useSearch = (n) => MX({
|
|
90528
90528
|
select: n?.select,
|
|
90529
90529
|
structuralSharing: n?.structuralSharing,
|
|
90530
90530
|
from: this.id
|
|
90531
|
-
}), this.useParams = (n) =>
|
|
90531
|
+
}), this.useParams = (n) => NX({
|
|
90532
90532
|
select: n?.select,
|
|
90533
90533
|
structuralSharing: n?.structuralSharing,
|
|
90534
90534
|
from: this.id
|
|
90535
|
-
}), this.useLoaderDeps = (n) =>
|
|
90535
|
+
}), this.useLoaderDeps = (n) => UX({ ...n, from: this.id }), this.useLoaderData = (n) => kX({ ...n, from: this.id }), this.useNavigate = () => GX({ from: this.fullPath }), this.Link = X.forwardRef(
|
|
90536
90536
|
(n, t) => /* @__PURE__ */ z.jsx(a4, { ref: t, from: this.fullPath, ...n })
|
|
90537
90537
|
), this.$$typeof = Symbol.for("react.memo");
|
|
90538
90538
|
}
|
|
@@ -90568,17 +90568,17 @@ class OrA {
|
|
|
90568
90568
|
}), this.useRouteContext = (n) => su({
|
|
90569
90569
|
from: this.options.id,
|
|
90570
90570
|
select: (t) => n?.select ? n.select(t.context) : t.context
|
|
90571
|
-
}), this.useSearch = (n) =>
|
|
90571
|
+
}), this.useSearch = (n) => MX({
|
|
90572
90572
|
select: n?.select,
|
|
90573
90573
|
structuralSharing: n?.structuralSharing,
|
|
90574
90574
|
from: this.options.id
|
|
90575
|
-
}), this.useParams = (n) =>
|
|
90575
|
+
}), this.useParams = (n) => NX({
|
|
90576
90576
|
select: n?.select,
|
|
90577
90577
|
structuralSharing: n?.structuralSharing,
|
|
90578
90578
|
from: this.options.id
|
|
90579
|
-
}), this.useLoaderDeps = (n) =>
|
|
90579
|
+
}), this.useLoaderDeps = (n) => UX({ ...n, from: this.options.id }), this.useLoaderData = (n) => kX({ ...n, from: this.options.id }), this.useNavigate = () => {
|
|
90580
90580
|
const n = mC();
|
|
90581
|
-
return
|
|
90581
|
+
return GX({ from: n.routesById[this.options.id].fullPath });
|
|
90582
90582
|
}, this.options = e, this.$$typeof = Symbol.for("react.memo");
|
|
90583
90583
|
}
|
|
90584
90584
|
}
|
|
@@ -90649,7 +90649,7 @@ function gQe(A) {
|
|
|
90649
90649
|
select: (n) => `not-found-${n.location.pathname}-${n.status}`
|
|
90650
90650
|
});
|
|
90651
90651
|
return /* @__PURE__ */ z.jsx(
|
|
90652
|
-
|
|
90652
|
+
bX,
|
|
90653
90653
|
{
|
|
90654
90654
|
getResetKey: () => e,
|
|
90655
90655
|
onCatch: (n, t) => {
|
|
@@ -90673,7 +90673,7 @@ function iQe() {
|
|
|
90673
90673
|
function xR(A) {
|
|
90674
90674
|
return /* @__PURE__ */ z.jsx(z.Fragment, { children: A.children });
|
|
90675
90675
|
}
|
|
90676
|
-
function
|
|
90676
|
+
function UkA(A, e, n) {
|
|
90677
90677
|
return e.options.notFoundComponent ? /* @__PURE__ */ z.jsx(e.options.notFoundComponent, { data: n }) : A.options.defaultNotFoundComponent ? /* @__PURE__ */ z.jsx(A.options.defaultNotFoundComponent, { data: n }) : (process.env.NODE_ENV === "development" && FF(
|
|
90678
90678
|
e.options.notFoundComponent,
|
|
90679
90679
|
`A notFoundError was encountered on the route with ID "${e.id}", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<div>Not Found<div>)`
|
|
@@ -90706,11 +90706,11 @@ function rQe() {
|
|
|
90706
90706
|
return t && (g.key = t), /* @__PURE__ */ z.jsx(
|
|
90707
90707
|
oQe,
|
|
90708
90708
|
{
|
|
90709
|
-
children: `(${
|
|
90709
|
+
children: `(${dkA.toString()})(${JSON.stringify(g)})`
|
|
90710
90710
|
}
|
|
90711
90711
|
);
|
|
90712
90712
|
}
|
|
90713
|
-
const
|
|
90713
|
+
const NkA = U.memo(function({
|
|
90714
90714
|
matchId: e
|
|
90715
90715
|
}) {
|
|
90716
90716
|
const n = mC(), t = sB({
|
|
@@ -90732,7 +90732,7 @@ const UkA = U.memo(function({
|
|
|
90732
90732
|
) : g.options.notFoundComponent, c = t.ssr === !1 || t.ssr === "data-only", l = (
|
|
90733
90733
|
// If we're on the root route, allow forcefully wrapping in suspense
|
|
90734
90734
|
(!g.isRoot || g.options.wrapInSuspense || c) && (g.options.wrapInSuspense ?? i ?? (g.options.errorComponent?.preload || c)) ? U.Suspense : xR
|
|
90735
|
-
), u = I ?
|
|
90735
|
+
), u = I ? bX : xR, f = B ? gQe : xR, D = sB({
|
|
90736
90736
|
select: (w) => w.loadedAt
|
|
90737
90737
|
}), m = sB({
|
|
90738
90738
|
select: (w) => {
|
|
@@ -90813,7 +90813,7 @@ const VrA = U.memo(function({
|
|
|
90813
90813
|
structuralSharing: !0
|
|
90814
90814
|
}), r = n.routesById[i], I = U.useMemo(() => {
|
|
90815
90815
|
const a = r.options.component ?? n.options.defaultComponent;
|
|
90816
|
-
return a ? /* @__PURE__ */ z.jsx(a, {}, g) : /* @__PURE__ */ z.jsx(
|
|
90816
|
+
return a ? /* @__PURE__ */ z.jsx(a, {}, g) : /* @__PURE__ */ z.jsx(LX, {});
|
|
90817
90817
|
}, [g, r.options.component, n.options.defaultComponent]);
|
|
90818
90818
|
if (t._displayPending)
|
|
90819
90819
|
throw n.getMatch(t.id)?._nonReactive.displayPendingPromise;
|
|
@@ -90833,7 +90833,7 @@ const VrA = U.memo(function({
|
|
|
90833
90833
|
throw n.getMatch(t.id)?._nonReactive.loadPromise;
|
|
90834
90834
|
}
|
|
90835
90835
|
if (t.status === "notFound")
|
|
90836
|
-
return th(ru(t.error), "Expected a notFound error"),
|
|
90836
|
+
return th(ru(t.error), "Expected a notFound error"), UkA(n, r, t.error);
|
|
90837
90837
|
if (t.status === "redirected")
|
|
90838
90838
|
throw th(vl(t.error), "Expected a redirect error"), n.getMatch(t.id)?._nonReactive.loadPromise;
|
|
90839
90839
|
if (t.status === "error") {
|
|
@@ -90853,7 +90853,7 @@ const VrA = U.memo(function({
|
|
|
90853
90853
|
throw t.error;
|
|
90854
90854
|
}
|
|
90855
90855
|
return I;
|
|
90856
|
-
}),
|
|
90856
|
+
}), LX = U.memo(function() {
|
|
90857
90857
|
const e = mC(), n = U.useContext(I4), t = sB({
|
|
90858
90858
|
select: (B) => B.matches.find((c) => c.id === n)?.routeId
|
|
90859
90859
|
}), g = e.routesById[t], i = sB({
|
|
@@ -90871,10 +90871,10 @@ const VrA = U.memo(function({
|
|
|
90871
90871
|
}
|
|
90872
90872
|
}), I = e.options.defaultPendingComponent ? /* @__PURE__ */ z.jsx(e.options.defaultPendingComponent, {}) : null;
|
|
90873
90873
|
if (i)
|
|
90874
|
-
return
|
|
90874
|
+
return UkA(e, g, void 0);
|
|
90875
90875
|
if (!r)
|
|
90876
90876
|
return null;
|
|
90877
|
-
const a = /* @__PURE__ */ z.jsx(
|
|
90877
|
+
const a = /* @__PURE__ */ z.jsx(NkA, { matchId: r });
|
|
90878
90878
|
return n === JB ? /* @__PURE__ */ z.jsx(U.Suspense, { fallback: I, children: a }) : a;
|
|
90879
90879
|
});
|
|
90880
90880
|
function IQe() {
|
|
@@ -90889,9 +90889,9 @@ function aQe() {
|
|
|
90889
90889
|
select: (g) => g.matches[0]?.id
|
|
90890
90890
|
}), n = sB({
|
|
90891
90891
|
select: (g) => g.loadedAt
|
|
90892
|
-
}), t = e ? /* @__PURE__ */ z.jsx(
|
|
90892
|
+
}), t = e ? /* @__PURE__ */ z.jsx(NkA, { matchId: e }) : null;
|
|
90893
90893
|
return /* @__PURE__ */ z.jsx(I4.Provider, { value: e, children: A.options.disableGlobalCatchBoundary ? t : /* @__PURE__ */ z.jsx(
|
|
90894
|
-
|
|
90894
|
+
bX,
|
|
90895
90895
|
{
|
|
90896
90896
|
getResetKey: () => n,
|
|
90897
90897
|
errorComponent: s4,
|
|
@@ -90905,7 +90905,7 @@ function aQe() {
|
|
|
90905
90905
|
}
|
|
90906
90906
|
) });
|
|
90907
90907
|
}
|
|
90908
|
-
const
|
|
90908
|
+
const MkA = (A) => new CQe(A);
|
|
90909
90909
|
class CQe extends mBe {
|
|
90910
90910
|
constructor(e) {
|
|
90911
90911
|
super(e);
|
|
@@ -90925,7 +90925,7 @@ function BQe({
|
|
|
90925
90925
|
...n.context
|
|
90926
90926
|
}
|
|
90927
90927
|
});
|
|
90928
|
-
const t =
|
|
90928
|
+
const t = kkA(), g = /* @__PURE__ */ z.jsx(t.Provider, { value: A, children: e });
|
|
90929
90929
|
return A.options.Wrap ? /* @__PURE__ */ z.jsx(A.options.Wrap, { children: g }) : g;
|
|
90930
90930
|
}
|
|
90931
90931
|
function QQe({ router: A, ...e }) {
|
|
@@ -90934,13 +90934,13 @@ function QQe({ router: A, ...e }) {
|
|
|
90934
90934
|
$n("mock", {
|
|
90935
90935
|
api: uo
|
|
90936
90936
|
});
|
|
90937
|
-
const
|
|
90937
|
+
const GkA = X.createContext(null), ap = () => X.useContext(GkA), EQe = () => z.jsx(LX, {}), vX = nQe({
|
|
90938
90938
|
component: EQe
|
|
90939
90939
|
}), cQe = U.createContext(null), fq = {
|
|
90940
90940
|
didCatch: !1,
|
|
90941
90941
|
error: null
|
|
90942
90942
|
};
|
|
90943
|
-
class
|
|
90943
|
+
class _X extends U.Component {
|
|
90944
90944
|
constructor(e) {
|
|
90945
90945
|
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = fq;
|
|
90946
90946
|
}
|
|
@@ -91020,7 +91020,7 @@ function lQe() {
|
|
|
91020
91020
|
let A = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
91021
91021
|
return A.length !== e.length || A.some((n, t) => !Object.is(n, e[t]));
|
|
91022
91022
|
}
|
|
91023
|
-
const
|
|
91023
|
+
const LkA = X.createContext(null), tv = () => X.useContext(LkA), Dq = {
|
|
91024
91024
|
devtools: ({ tabId: A }) => `devtools-${A}`,
|
|
91025
91025
|
contentscriptMain: ({ tabId: A }) => `contentscript-main-${A}`,
|
|
91026
91026
|
contentscriptIframe: ({ tabId: A }) => `contentscript-iframe-${A}`,
|
|
@@ -91095,10 +91095,10 @@ const qH = (A) => _re({
|
|
|
91095
91095
|
return z.jsxs("div", { className: "flex flex-col items-center justify-center h-full gap-4", children: [z.jsxs("h1", { className: "text-2xl font-bold text-devtools-text", children: ["LiveStore Devtools ", LIVESTORE_DEVTOOLS_SANDBOX ? "(Sandbox)" : ""] }), z.jsxs("p", { className: "text-sm text-devtools-text", children: ["The LiveStore devtools are a", " ", z.jsx("a", { href: "https://docs.livestore.dev/misc/sponsoring", target: "_blank", rel: "noopener noreferrer", className: "underline text-devtools-text hover:text-devtools-text-secondary", children: "sponsor-only benefit" }), ".", z.jsx("br", {}), "Please sign in with GitHub to continue. (You can also try it for free.)"] }), z.jsxs("a", { href: m, target: "_blank", rel: "noopener noreferrer", className: "flex items-center gap-2 p-2 border border-devtools-border rounded-md text-sm bg-devtools-surface text-devtools-text hover:bg-devtools-background-hover", children: [z.jsx("svg", { viewBox: "0 0 24 24", className: "w-5 h-5", fill: "currentColor", "aria-hidden": "true", children: z.jsx("path", { d: "M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" }) }), "Sign in with GitHub"] }), z.jsx("button", { type: "button", onClick: () => u((F) => !F), className: "text-sm text-devtools-text-secondary hover:text-devtools-text", children: l ? "Hide manual input" : "Or enter license key manually" }), l && z.jsxs("div", { className: "flex flex-col items-center justify-center gap-2", children: [z.jsxs("form", { onSubmit: f, className: "flex items-center space-x-2 p-4 w-[600px]", children: [z.jsx("input", { type: "text", className: xs("p-2 border border-devtools-border rounded-md flex-1 text-sm bg-devtools-surface text-devtools-text", B && "opacity-50"), value: i, disabled: B, onChange: (F) => r(F.target.value), placeholder: "Enter license key" }), z.jsx("button", { type: "submit", className: "p-2 border border-devtools-border rounded-md shrink-0 text-sm bg-devtools-surface text-devtools-text hover:bg-devtools-background-hover", disabled: B, children: B ? "Registering..." : "Register Device" })] }), z.jsxs("div", { className: "text-sm text-devtools-text", children: ["You can get your license key from", " ", z.jsx("a", { href: m, target: "_blank", rel: "noopener noreferrer", className: "font-semibold text-devtools-text hover:text-devtools-text-secondary underline", children: "livestore.dev/sponsor" }), "."] })] }), I && z.jsx("pre", { className: "text-red-600 dark:text-red-400 bg-red-100 dark:bg-red-900/20 p-4 rounded-md font-mono text-sm border border-red-200 dark:border-red-800", children: I })] });
|
|
91096
91096
|
}
|
|
91097
91097
|
return A;
|
|
91098
|
-
},
|
|
91098
|
+
}, JX = ({ error: A, resetErrorBoundary: e }) => z.jsxs("div", { role: "alert", className: "space-y-3 bg-red-500 p-4 text-sm h-full overflow-y-auto", children: [z.jsx("div", { className: "text-lg", children: "Something went wrong - this should never happen:" }), z.jsx("pre", { children: A.message }), z.jsx("pre", { children: A.stack }), z.jsx("button", { type: "button", onClick: e, children: "Try again" })] }), wQe = ({ url: A }) => GA(function* () {
|
|
91099
91099
|
const e = yield* nv(pF.devtools.random());
|
|
91100
91100
|
globalThis.__debugWebmeshNode = e, yield* mae({ node: e, url: A, openTimeout: 500 }).pipe(qn);
|
|
91101
|
-
const n = yield*
|
|
91101
|
+
const n = yield* vbA(e), t = yield* Z$({
|
|
91102
91102
|
webChannel: n
|
|
91103
91103
|
});
|
|
91104
91104
|
return {
|
|
@@ -91107,38 +91107,7 @@ const qH = (A) => _re({
|
|
|
91107
91107
|
meshNode: e,
|
|
91108
91108
|
meshChannelMode: "proxy"
|
|
91109
91109
|
};
|
|
91110
|
-
}).pipe(Og(U$))
|
|
91111
|
-
const A = mQe(), e = yield* nv(Dq.devtools({ tabId: A }));
|
|
91112
|
-
globalThis.__debugWebmeshNode = e;
|
|
91113
|
-
const n = window, t = yield* FH({
|
|
91114
|
-
listenWindow: n,
|
|
91115
|
-
sendWindow: n.parent,
|
|
91116
|
-
schema: ev,
|
|
91117
|
-
ids: { own: "devtools", other: "devtools-panel" }
|
|
91118
|
-
});
|
|
91119
|
-
yield* e.addEdge({
|
|
91120
|
-
edgeChannel: t,
|
|
91121
|
-
target: Dq.panel({ tabId: A })
|
|
91122
|
-
}).pipe(_g);
|
|
91123
|
-
const g = yield* e.makeChannel({
|
|
91124
|
-
target: Dq.extensionWorker(),
|
|
91125
|
-
channelName: uQe.clipboard({ tabId: A }),
|
|
91126
|
-
schema: { send: jrA, listen: ka },
|
|
91127
|
-
mode: "direct"
|
|
91128
|
-
}), i = yield* fX(e), r = yield* Z$({
|
|
91129
|
-
webChannel: i
|
|
91130
|
-
});
|
|
91131
|
-
return {
|
|
91132
|
-
connect: () => An,
|
|
91133
|
-
clientSessions: r,
|
|
91134
|
-
meshNode: e,
|
|
91135
|
-
meshChannelMode: "direct",
|
|
91136
|
-
copyToClipboard: (B) => g.send(jrA.make({ text: B })).pipe(cb)
|
|
91137
|
-
};
|
|
91138
|
-
}), mQe = () => {
|
|
91139
|
-
const A = sessionStorage.getItem("livestore-devtools-tab-id");
|
|
91140
|
-
return A === null ? En("No tabId found in sessionStorage") : Number(A);
|
|
91141
|
-
};
|
|
91110
|
+
}).pipe(Og(U$));
|
|
91142
91111
|
class B4 extends fI()("DevtoolsWebCommon.CreateConnection", {
|
|
91143
91112
|
payload: {
|
|
91144
91113
|
from: _A,
|
|
@@ -91150,7 +91119,7 @@ class B4 extends fI()("DevtoolsWebCommon.CreateConnection", {
|
|
|
91150
91119
|
}
|
|
91151
91120
|
class EMe extends Sn(B4) {
|
|
91152
91121
|
}
|
|
91153
|
-
const
|
|
91122
|
+
const KX = Y$({
|
|
91154
91123
|
channelName: "session-info",
|
|
91155
91124
|
schema: KFA
|
|
91156
91125
|
}), OH = {
|
|
@@ -91167,7 +91136,7 @@ const LkA = Y$({
|
|
|
91167
91136
|
sessionId: _A
|
|
91168
91137
|
}), ZrA = $n("ClientSessionContentscriptMainRes", {
|
|
91169
91138
|
tabId: zn
|
|
91170
|
-
}),
|
|
91139
|
+
}), pQe = {
|
|
91171
91140
|
contentscriptMain: Wg(
|
|
91172
91141
|
() => FH({
|
|
91173
91142
|
listenWindow: window,
|
|
@@ -91203,10 +91172,41 @@ const LkA = Y$({
|
|
|
91203
91172
|
schema: ev
|
|
91204
91173
|
});
|
|
91205
91174
|
yield* A.addEdge({ target: e, edgeChannel: i, replaceIfExists: !0 }), QB && (yield* Yi(`@livestore/devtools-web-common: initiated connection: ${A.nodeName} → ${e}`));
|
|
91206
|
-
}).pipe(Cn.mapToUnexpectedError),
|
|
91175
|
+
}).pipe(Cn.mapToUnexpectedError), mQe = GA(function* () {
|
|
91176
|
+
const A = RQe(), e = yield* nv(Dq.devtools({ tabId: A }));
|
|
91177
|
+
globalThis.__debugWebmeshNode = e;
|
|
91178
|
+
const n = window, t = yield* FH({
|
|
91179
|
+
listenWindow: n,
|
|
91180
|
+
sendWindow: n.parent,
|
|
91181
|
+
schema: ev,
|
|
91182
|
+
ids: { own: "devtools", other: "devtools-panel" }
|
|
91183
|
+
});
|
|
91184
|
+
yield* e.addEdge({
|
|
91185
|
+
edgeChannel: t,
|
|
91186
|
+
target: Dq.panel({ tabId: A })
|
|
91187
|
+
}).pipe(_g);
|
|
91188
|
+
const g = yield* e.makeChannel({
|
|
91189
|
+
target: Dq.extensionWorker(),
|
|
91190
|
+
channelName: uQe.clipboard({ tabId: A }),
|
|
91191
|
+
schema: { send: jrA, listen: ka },
|
|
91192
|
+
mode: "direct"
|
|
91193
|
+
}), i = yield* KX, r = yield* Z$({
|
|
91194
|
+
webChannel: i
|
|
91195
|
+
});
|
|
91196
|
+
return {
|
|
91197
|
+
connect: () => An,
|
|
91198
|
+
clientSessions: r,
|
|
91199
|
+
meshNode: e,
|
|
91200
|
+
meshChannelMode: "direct",
|
|
91201
|
+
copyToClipboard: (B) => g.send(jrA.make({ text: B })).pipe(cb)
|
|
91202
|
+
};
|
|
91203
|
+
}), RQe = () => {
|
|
91204
|
+
const A = sessionStorage.getItem("livestore-devtools-tab-id");
|
|
91205
|
+
return A === null ? En("No tabId found in sessionStorage") : Number(A);
|
|
91206
|
+
}, SQe = ({ sharedWorker: A }) => GA(function* () {
|
|
91207
91207
|
const e = yield* nv(pF.devtools.random());
|
|
91208
91208
|
globalThis.__debugWebmeshNode = e;
|
|
91209
|
-
const n = yield*
|
|
91209
|
+
const n = yield* KX, t = yield* Z$({
|
|
91210
91210
|
webChannel: n
|
|
91211
91211
|
});
|
|
91212
91212
|
return {
|
|
@@ -91235,7 +91235,7 @@ const LkA = Y$({
|
|
|
91235
91235
|
}).pipe(Oe("@livestore/devtools-react:makeApi"), _g), bQe = ({ sharedWorker: A, mode: e }) => {
|
|
91236
91236
|
switch (e._tag) {
|
|
91237
91237
|
case "browser-extension":
|
|
91238
|
-
return
|
|
91238
|
+
return mQe;
|
|
91239
91239
|
case "node":
|
|
91240
91240
|
return wQe({ url: e.url });
|
|
91241
91241
|
case "web":
|
|
@@ -91379,7 +91379,7 @@ const LkA = Y$({
|
|
|
91379
91379
|
throw new Error(`Expected mode ${t.mode._tag} but got ${A}`);
|
|
91380
91380
|
const I = t.mode ?? { _tag: A }, a = yield* FQe({ sharedWorker: i, mode: I, triggerReload: r });
|
|
91381
91381
|
return n({ api: a, selectedModeTag: A }), yield* Qh;
|
|
91382
|
-
}).pipe(Ks, Ge, Gd({ thread: "window(devtools)" }), Og(hFA("window(devtools)")), o$(DL), BI), [t, A]), e === void 0 ? z.jsxs("div", { id: "loading", children: ["Loading Devtools via ", A, "..."] }) : z.jsx(
|
|
91382
|
+
}).pipe(Ks, Ge, Gd({ thread: "window(devtools)" }), Og(hFA("window(devtools)")), o$(DL), BI), [t, A]), e === void 0 ? z.jsxs("div", { id: "loading", children: ["Loading Devtools via ", A, "..."] }) : z.jsx(LkA.Provider, { value: e, children: z.jsx(_X, { FallbackComponent: JX, children: z.jsx(LX, {}) }) });
|
|
91383
91383
|
}, bW = bF("/$mode")({
|
|
91384
91384
|
params: {
|
|
91385
91385
|
parse: (A) => ({
|
|
@@ -91557,7 +91557,7 @@ const xQe = (A) => GA(function* () {
|
|
|
91557
91557
|
dbState: e,
|
|
91558
91558
|
since: n
|
|
91559
91559
|
}) => {
|
|
91560
|
-
const t = A.select(
|
|
91560
|
+
const t = A.select(e4.where("seqNumGlobal", ">=", n.global)), g = e.select(
|
|
91561
91561
|
X1.where("seqNumGlobal", ">=", n.global)
|
|
91562
91562
|
);
|
|
91563
91563
|
return t.map((i) => {
|
|
@@ -91610,7 +91610,7 @@ const xQe = (A) => GA(function* () {
|
|
|
91610
91610
|
e,
|
|
91611
91611
|
...JkA({
|
|
91612
91612
|
tableName: ou,
|
|
91613
|
-
columns:
|
|
91613
|
+
columns: e4.sqliteDef.columns,
|
|
91614
91614
|
values: {
|
|
91615
91615
|
seqNumGlobal: A.seqNum.global,
|
|
91616
91616
|
seqNumClient: A.seqNum.client,
|
|
@@ -91635,7 +91635,7 @@ const xQe = (A) => GA(function* () {
|
|
|
91635
91635
|
e,
|
|
91636
91636
|
...LQe({
|
|
91637
91637
|
tableName: ou,
|
|
91638
|
-
columns:
|
|
91638
|
+
columns: e4.sqliteDef.columns,
|
|
91639
91639
|
where: { seqNumGlobal: t.seqNum.global, seqNumClient: t.seqNum.client },
|
|
91640
91640
|
updateValues: { syncMetadataJson: t.meta.syncMetadata }
|
|
91641
91641
|
})
|
|
@@ -91926,7 +91926,7 @@ const xQe = (A) => GA(function* () {
|
|
|
91926
91926
|
[...A.eventsDefsMap.entries()].map(([g, i]) => [g, P1(i.schema)])
|
|
91927
91927
|
);
|
|
91928
91928
|
return (g, i) => GA(function* () {
|
|
91929
|
-
const r = i?.skipEventlog ?? !1, I = yield*
|
|
91929
|
+
const r = i?.skipEventlog ?? !1, I = yield* A4(A, {
|
|
91930
91930
|
operation: "@livestore/common:leader-thread:materializeEvent",
|
|
91931
91931
|
event: g
|
|
91932
91932
|
});
|
|
@@ -91934,19 +91934,19 @@ const xQe = (A) => GA(function* () {
|
|
|
91934
91934
|
return r === !1 && (yield* XrA(
|
|
91935
91935
|
g,
|
|
91936
91936
|
n,
|
|
91937
|
-
|
|
91937
|
+
tae,
|
|
91938
91938
|
g.clientId,
|
|
91939
91939
|
g.sessionId
|
|
91940
91940
|
)), e.debug.head = g.seqNum, {
|
|
91941
91941
|
sessionChangeset: { _tag: "no-op" },
|
|
91942
91942
|
hash: Ie()
|
|
91943
91943
|
};
|
|
91944
|
-
const { eventDef: a, materializer: B } = I, c =
|
|
91944
|
+
const { eventDef: a, materializer: B } = I, c = yX({
|
|
91945
91945
|
eventDef: a,
|
|
91946
91946
|
materializer: B,
|
|
91947
91947
|
dbState: e,
|
|
91948
91948
|
event: { decoded: void 0, encoded: g }
|
|
91949
|
-
}), l = Nc() ? ue(
|
|
91949
|
+
}), l = Nc() ? ue(ObA(c)) : Ie();
|
|
91950
91950
|
if (l._tag === "Some" && g.meta.materializerHashSession._tag === "Some" && g.meta.materializerHashSession.value !== l.value)
|
|
91951
91951
|
return yield* P$.make({ eventName: g.name });
|
|
91952
91952
|
const u = e.session();
|
|
@@ -92067,7 +92067,7 @@ const xQe = (A) => GA(function* () {
|
|
|
92067
92067
|
), L = ({ event: { name: T, args: _ }, clientId: P, sessionId: O }) => GA(function* () {
|
|
92068
92068
|
const x = yield* l;
|
|
92069
92069
|
if (x === void 0) return En("Not initialized");
|
|
92070
|
-
const AA = yield*
|
|
92070
|
+
const AA = yield* A4(A, {
|
|
92071
92071
|
operation: "@livestore/common:LeaderSyncProcessor:pushPartial",
|
|
92072
92072
|
event: {
|
|
92073
92073
|
name: T,
|
|
@@ -92502,7 +92502,7 @@ const xQe = (A) => GA(function* () {
|
|
|
92502
92502
|
yield* vkA(I, { foreignKeys: !0 });
|
|
92503
92503
|
const a = (B) => GA(function* () {
|
|
92504
92504
|
yield* zR(() => B?.init?.(I)).pipe(Cn.mapToUnexpectedError);
|
|
92505
|
-
const c = yield*
|
|
92505
|
+
const c = yield* WbA({
|
|
92506
92506
|
db: I,
|
|
92507
92507
|
schema: n,
|
|
92508
92508
|
onProgress: ({ done: l, total: u }) => vg(t, { stage: "migrating", progress: { done: l, total: u } })
|
|
@@ -92748,8 +92748,8 @@ class BEe extends Sn(
|
|
|
92748
92748
|
DF,
|
|
92749
92749
|
Cn,
|
|
92750
92750
|
Jae,
|
|
92751
|
-
zbA,
|
|
92752
92751
|
$bA,
|
|
92752
|
+
XbA,
|
|
92753
92753
|
V$
|
|
92754
92754
|
) {
|
|
92755
92755
|
}
|
|
@@ -93682,11 +93682,11 @@ const WkA = (A) => {
|
|
|
93682
93682
|
}
|
|
93683
93683
|
},
|
|
93684
93684
|
export: vae(() => A.serialize(t, "main")),
|
|
93685
|
-
execute:
|
|
93685
|
+
execute: ZbA((r, I, a) => {
|
|
93686
93686
|
const B = i.prepare(r);
|
|
93687
93687
|
B.execute(I, a), B.finalize();
|
|
93688
93688
|
}),
|
|
93689
|
-
select:
|
|
93689
|
+
select: zbA((r, I) => {
|
|
93690
93690
|
const a = i.prepare(r), B = a.select(I);
|
|
93691
93691
|
return a.finalize(), B;
|
|
93692
93692
|
}),
|
|
@@ -94536,10 +94536,10 @@ const FEe = g1(1).pipe(gs), CsA = /* @__PURE__ */ new Map(), bEe = ({
|
|
|
94536
94536
|
if (t) {
|
|
94537
94537
|
const { clientId: i, sessionId: r, storeId: I } = e;
|
|
94538
94538
|
yield* KEe({ clientId: i, sessionId: r, schema: g, storeId: I }), yield* xFA({
|
|
94539
|
-
webChannel: yield*
|
|
94539
|
+
webChannel: yield* KX,
|
|
94540
94540
|
sessionInfo: e
|
|
94541
94541
|
}).pipe(Ge, qn), yield* GA(function* () {
|
|
94542
|
-
const a = yield*
|
|
94542
|
+
const a = yield* pQe.clientSession;
|
|
94543
94543
|
yield* a.send(
|
|
94544
94544
|
FW.make({ clientId: i, sessionId: r, storeId: I })
|
|
94545
94545
|
);
|
|
@@ -97284,7 +97284,7 @@ const nUA = () => AUA ? DG() : eUA ?? DG(), tUA = (A) => Y$({
|
|
|
97284
97284
|
});
|
|
97285
97285
|
a.import(D);
|
|
97286
97286
|
const m = yield* tu("has-lock");
|
|
97287
|
-
return yield*
|
|
97287
|
+
return yield* qbA({
|
|
97288
97288
|
...e,
|
|
97289
97289
|
sqliteDb: a,
|
|
97290
97290
|
clientId: B,
|
|
@@ -97318,7 +97318,7 @@ const nUA = () => AUA ? DG() : eUA ?? DG(), tUA = (A) => Y$({
|
|
|
97318
97318
|
_tag: "in-memory",
|
|
97319
97319
|
configureDb: (w) => vkA(w, { foreignKeys: !0 }).pipe(Og(B), gs)
|
|
97320
97320
|
}), l = yield* tUA(e), [u, f] = yield* ep([c(), c()], { concurrency: 2 });
|
|
97321
|
-
r && (u.import(r), yield*
|
|
97321
|
+
r && (u.import(r), yield* WbA({ db: u, schema: A }));
|
|
97322
97322
|
const D = yield* TEe({
|
|
97323
97323
|
devtoolsEnabled: I,
|
|
97324
97324
|
sharedWorkerFiber: a,
|
|
@@ -97393,7 +97393,7 @@ const OEe = ({
|
|
|
97393
97393
|
storeId: e,
|
|
97394
97394
|
schema: n
|
|
97395
97395
|
}) => EC(async () => {
|
|
97396
|
-
const t = iUA(A.directory, e), g = await
|
|
97396
|
+
const t = iUA(A.directory, e), g = await mX(t).catch(() => {
|
|
97397
97397
|
});
|
|
97398
97398
|
if (g === void 0)
|
|
97399
97399
|
return;
|
|
@@ -97477,7 +97477,7 @@ LE("@livestore/adapter-web:cleanupOldStateDbFiles")(
|
|
|
97477
97477
|
const u = l.startsWith("/") ? l.slice(1) : l;
|
|
97478
97478
|
if (t) {
|
|
97479
97479
|
c = yield* DE({
|
|
97480
|
-
try: () =>
|
|
97480
|
+
try: () => mX(`${n}/archive`, { create: !0 }),
|
|
97481
97481
|
catch: (m) => new SS({ message: "Failed to ensure archive directory", cause: m })
|
|
97482
97482
|
});
|
|
97483
97483
|
const D = yield* WEe({
|
|
@@ -97823,7 +97823,7 @@ class uMe extends Sn(
|
|
|
97823
97823
|
) {
|
|
97824
97824
|
}
|
|
97825
97825
|
Nc() && (globalThis.__debugLiveStoreUtils = {
|
|
97826
|
-
opfs:
|
|
97826
|
+
opfs: BkA,
|
|
97827
97827
|
runSync: (A) => gs(A),
|
|
97828
97828
|
runFork: (A) => uI(A)
|
|
97829
97829
|
});
|
|
@@ -98003,7 +98003,7 @@ const Ace = (A) => (e) => GA(function* () {
|
|
|
98003
98003
|
changes: _(new e7()).pipe(yK)
|
|
98004
98004
|
})
|
|
98005
98005
|
}, rA = yield* cE(b);
|
|
98006
|
-
return yield*
|
|
98006
|
+
return yield* qbA({
|
|
98007
98007
|
...e,
|
|
98008
98008
|
sqliteDb: H,
|
|
98009
98009
|
lockStatus: v,
|
|
@@ -98186,7 +98186,7 @@ const Ace = (A) => (e) => GA(function* () {
|
|
|
98186
98186
|
m.current.previousShutdownDeferred && (yield* mi(m.current.previousShutdownDeferred));
|
|
98187
98187
|
const v = yield* Qb().pipe(ag(Eo)), J = yield* hCe;
|
|
98188
98188
|
m.current.componentScope = v, m.current.shutdownDeferred = J, yield* GA(function* () {
|
|
98189
|
-
const T = yield*
|
|
98189
|
+
const T = yield* ekA({
|
|
98190
98190
|
schema: A,
|
|
98191
98191
|
storeId: e,
|
|
98192
98192
|
adapter: g,
|
|
@@ -98222,7 +98222,7 @@ const Ace = (A) => (e) => GA(function* () {
|
|
|
98222
98222
|
Ks,
|
|
98223
98223
|
Oe("@livestore/react:useCreateStore"),
|
|
98224
98224
|
QB ? pFA((v) => console.createTask(v)) : Ze,
|
|
98225
|
-
|
|
98225
|
+
VbA(Bo({ parentSpanContext: n?.rootSpanContext, otelTracer: n?.tracer })),
|
|
98226
98226
|
Ge,
|
|
98227
98227
|
Gd({ thread: "window" }),
|
|
98228
98228
|
Og(hFA("window")),
|
|
@@ -98655,7 +98655,7 @@ const jce = ({ className: A }) => z.jsxs("svg", { width: "20", height: "20", vie
|
|
|
98655
98655
|
return X.useEffect(() => {
|
|
98656
98656
|
e._tag === "Confirming" ? t.current?.showModal() : t.current?.close();
|
|
98657
98657
|
}, [e]), z.jsxs(fUA.Provider, { value: { confirmState: e, setConfirmState: n, modalRef: t }, children: [z.jsx("dialog", { ref: t, className: "fixed inset-0 m-auto w-fit h-fit p-4 space-y-3 backdrop:bg-black/50 bg-devtools-surface rounded-md border border-devtools-border text-devtools-text shadow-lg", children: e._tag === "Confirming" && z.jsxs(z.Fragment, { children: [z.jsx("div", { children: e.message }), z.jsxs("div", { className: "flex space-x-1", children: [z.jsx(oW, { onClick: () => n({ _tag: "None" }), children: "Cancel" }), z.jsx(oW, { className: "bg-red-500", onClick: () => e._tag === "Confirming" ? e.onConfirm() : void 0, children: e.confirmLabel })] })] }) }), A] });
|
|
98658
|
-
}, Mb = 26, Gb = 120, DUA =
|
|
98658
|
+
}, Mb = 26, Gb = 120, DUA = wX(), ysA = q1([]), g7 = q1(DUA), GK = q1(void 0), yUA = q1([]), zce = ({ className: A, onClick: e }) => {
|
|
98659
98659
|
const n = X.useRef(!1);
|
|
98660
98660
|
X.useEffect(() => {
|
|
98661
98661
|
let I = !1, a;
|
|
@@ -98781,14 +98781,14 @@ const jce = ({ className: A }) => z.jsxs("svg", { width: "20", height: "20", vie
|
|
|
98781
98781
|
getValColor: (g, i) => g > 50 ? t[i] : g > 40 ? n[i] : e[i]
|
|
98782
98782
|
});
|
|
98783
98783
|
}, i7 = "rgba(255, 0, 0, 0.9)", o7 = "rgba(255, 255, 0, 0.5)", r7 = "rgba(0, 255, 0, 0.3)", tle = ({ tabs: A }) => {
|
|
98784
|
-
const { store: e } = gh(), [n, t] = e.useClientDocument(
|
|
98784
|
+
const { store: e } = gh(), [n, t] = e.useClientDocument(rkA, e.sessionId);
|
|
98785
98785
|
X.useState(() => e.clientSession.lockStatus.get.pipe(gs) === "has-lock"), X.useEffect(() => {
|
|
98786
98786
|
}, [e]);
|
|
98787
98787
|
const g = A.length > 0 ? A[n.tabIndex]?.label ?? A[0].label : null, i = (r) => {
|
|
98788
98788
|
const I = A.findIndex((a) => a.label === r);
|
|
98789
98789
|
I !== -1 && t({ tabIndex: I });
|
|
98790
98790
|
};
|
|
98791
|
-
return z.jsx(Zce, { children: z.jsxs("div", { className: "h-full flex flex-col relative", children: [z.jsx("div", { role: "application", className: "absolute top-0 right-0 z-10 hidden md:block", onClick: () => t({ showMeters: !n.showMeters }), children: n.showMeters ? z.jsx(zce, {}) : z.jsx(yce, { className: "w-4 h-4 m-1 text-devtools-text-secondary" }) }), !1, z.jsxs(sE, { selectedKey: g, onSelectionChange: i, className: "h-full", children: [z.jsxs(sE.List, { className: "", children: [z.jsx(sE.Tab, { isDisabled: !0, children: z.jsx(lce, {}) }), A.map((r) => z.jsx(sE.Tab, { id: r.label, ...r.icon !== void 0 ? { icon: r.icon } : {}, children: r.label }, r.label))] }), A.map((r) => z.jsx(sE.Panel, { id: r.label, children: z.jsx(
|
|
98791
|
+
return z.jsx(Zce, { children: z.jsxs("div", { className: "h-full flex flex-col relative", children: [z.jsx("div", { role: "application", className: "absolute top-0 right-0 z-10 hidden md:block", onClick: () => t({ showMeters: !n.showMeters }), children: n.showMeters ? z.jsx(zce, {}) : z.jsx(yce, { className: "w-4 h-4 m-1 text-devtools-text-secondary" }) }), !1, z.jsxs(sE, { selectedKey: g, onSelectionChange: i, className: "h-full", children: [z.jsxs(sE.List, { className: "", children: [z.jsx(sE.Tab, { isDisabled: !0, children: z.jsx(lce, {}) }), A.map((r) => z.jsx(sE.Tab, { id: r.label, ...r.icon !== void 0 ? { icon: r.icon } : {}, children: r.label }, r.label))] }), A.map((r) => z.jsx(sE.Panel, { id: r.label, children: z.jsx(_X, { FallbackComponent: JX, children: z.jsx(r.component, {}) }) }, r.label))] })] }) });
|
|
98792
98792
|
};
|
|
98793
98793
|
function wUA(A = "This should not happen") {
|
|
98794
98794
|
throw new Error(A);
|
|
@@ -105486,7 +105486,7 @@ function wNA(A, e) {
|
|
|
105486
105486
|
const [n, ...t] = e;
|
|
105487
105487
|
return t[0] === -1 ? A[n] : wNA(A[n].subGroups ?? [], t);
|
|
105488
105488
|
}
|
|
105489
|
-
const gDe = U.lazy(async () => await import("./data-grid-overlay-editor-
|
|
105489
|
+
const gDe = U.lazy(async () => await import("./data-grid-overlay-editor-iqzhqIrT.js"));
|
|
105490
105490
|
let iDe = 0;
|
|
105491
105491
|
function oDe(A) {
|
|
105492
105492
|
return nde(BaA(BaA(A).filter((e) => e.span !== void 0).map((e) => d0((e.span?.[0] ?? 0) + 1, (e.span?.[1] ?? 0) + 1))));
|
|
@@ -107465,7 +107465,7 @@ function GDe(A, e, n) {
|
|
|
107465
107465
|
}
|
|
107466
107466
|
t.fillStyle = r.textMedium, t.fillText(e, f + a + r.cellHorizontalPadding + 0.5, B + l / 2 + uh(t, r)), t.beginPath();
|
|
107467
107467
|
}
|
|
107468
|
-
const LDe = U.lazy(async () => await import("./number-overlay-editor-
|
|
107468
|
+
const LDe = U.lazy(async () => await import("./number-overlay-editor-qV-88L04.js")), vDe = {
|
|
107469
107469
|
getAccessibilityString: (A) => A.data?.toString() ?? "",
|
|
107470
107470
|
kind: je.Number,
|
|
107471
107471
|
needsHover: !1,
|
|
@@ -111949,7 +111949,7 @@ const Ype = (A) => {
|
|
|
111949
111949
|
}), QMA = () => {
|
|
111950
111950
|
const [A, e] = X.useState(() => (n) => n);
|
|
111951
111951
|
return X.useEffect(() => {
|
|
111952
|
-
Promise.all([import("./mod-2ScWT2NO.js"), import("./index-
|
|
111952
|
+
Promise.all([import("./mod-2ScWT2NO.js"), import("./index-CbC-xMhg.js").then((n) => n.i)]).then(([{ createFromBuffer: n }, { getBuffer: t }]) => {
|
|
111953
111953
|
const g = n(t());
|
|
111954
111954
|
e(() => (i) => g.formatText({ filePath: "some.sql", fileText: i }));
|
|
111955
111955
|
}).catch((n) => {
|
|
@@ -111977,7 +111977,7 @@ const Ype = (A) => {
|
|
|
111977
111977
|
],
|
|
111978
111978
|
n
|
|
111979
111979
|
), ...g, children: t }), Wpe = DG(), Zpe = () => {
|
|
111980
|
-
const [A, e] = X.useState(void 0), { store: n } = gh(), [t, g] = n.useClientDocument(
|
|
111980
|
+
const [A, e] = X.useState(void 0), { store: n } = gh(), [t, g] = n.useClientDocument(akA), [i, r] = X.useState([]), [I, a] = X.useState(void 0);
|
|
111981
111981
|
QMA();
|
|
111982
111982
|
const { apiSession: B } = Ka();
|
|
111983
111983
|
X.useEffect(() => GA(function* () {
|
|
@@ -112052,13 +112052,13 @@ const Ype = (A) => {
|
|
|
112052
112052
|
return X.useEffect(() => {
|
|
112053
112053
|
const g = Qb().pipe(gs);
|
|
112054
112054
|
return GA(function* () {
|
|
112055
|
-
const i = yield* n.snapshot, r = yield*
|
|
112055
|
+
const i = yield* n.snapshot, r = yield* ekA({
|
|
112056
112056
|
schema: t,
|
|
112057
112057
|
adapter: gUA({ importSnapshot: i }),
|
|
112058
112058
|
disableDevtools: !0,
|
|
112059
112059
|
storeId: "devtools-data-browser",
|
|
112060
112060
|
confirmUnsavedChanges: !1
|
|
112061
|
-
}).pipe(
|
|
112061
|
+
}).pipe(VbA({}));
|
|
112062
112062
|
yield* n.syncPull.pipe(mE(({ payload: I }) => {
|
|
112063
112063
|
if (I._tag === "upstream-rebase")
|
|
112064
112064
|
location.reload();
|
|
@@ -112080,7 +112080,7 @@ const Ype = (A) => {
|
|
|
112080
112080
|
return OA ? !V0(OA) : !0;
|
|
112081
112081
|
}));
|
|
112082
112082
|
return [TA, hA, uA];
|
|
112083
|
-
}, [g]), { store: a } = gh(), B = X.useMemo(() => [...i, ...r, ...I], [i, r, I]), c = gh().store.sessionId, [{ activeTableName: l, livestoreInternalsExpanded: u }, f] = a.useClientDocument(
|
|
112083
|
+
}, [g]), { store: a } = gh(), B = X.useMemo(() => [...i, ...r, ...I], [i, r, I]), c = gh().store.sessionId, [{ activeTableName: l, livestoreInternalsExpanded: u }, f] = a.useClientDocument(okA, c), D = X.useMemo(() => {
|
|
112084
112084
|
if (l === "SQLitePlayground")
|
|
112085
112085
|
return;
|
|
112086
112086
|
const $ = g.get(l);
|
|
@@ -112099,7 +112099,7 @@ const Ype = (A) => {
|
|
|
112099
112099
|
const $ = i[0] ?? r[0];
|
|
112100
112100
|
$ && f({ activeTableName: $ });
|
|
112101
112101
|
}
|
|
112102
|
-
const F = X.useMemo(() => D?.sqliteDef.ast.columns[0]?.name ?? "id", [D]), [{ searchKey: w, orderByColumn: R, orderByDirection: S, columnWidths: b }, L] = a.useClientDocument(
|
|
112102
|
+
const F = X.useMemo(() => D?.sqliteDef.ast.columns[0]?.name ?? "id", [D]), [{ searchKey: w, orderByColumn: R, orderByDirection: S, columnWidths: b }, L] = a.useClientDocument(ikA, `${l}-${c}`, { default: { orderByColumn: F } }), G = `ORDER BY ${R} ${S}`, v = A.useQuery(l === "SQLitePlayground" || !D ? pS({
|
|
112103
112103
|
query: "SELECT 1 WHERE 0",
|
|
112104
112104
|
schema: Pn(_e({})),
|
|
112105
112105
|
queriedTables: /* @__PURE__ */ new Set()
|
|
@@ -112295,7 +112295,7 @@ const Ype = (A) => {
|
|
|
112295
112295
|
isAdvanced: !0
|
|
112296
112296
|
}
|
|
112297
112297
|
], ime = () => {
|
|
112298
|
-
const { store: A } = gh(), [{ autoRefresh: e, showAllColumns: n, selectedEventTypes: t }, g] = A.useClientDocument(
|
|
112298
|
+
const { store: A } = gh(), [{ autoRefresh: e, showAllColumns: n, selectedEventTypes: t }, g] = A.useClientDocument(gkA), [i, r] = X.useState(0), { apiSession: I } = Ka(), a = x7(), { isDark: B } = Cv(), c = X.useMemo(() => H7(B), [B]), l = X.useMemo(() => gme.filter((J) => J.isAdvanced === !1 || n), [n]), u = X.useMemo(() => l.map((J) => J.id), [l]), [f, D] = X.useState(void 0);
|
|
112299
112299
|
X.useEffect(() => I.databaseFileInfo.pipe(Ri(D)).pipe(BI), [I]);
|
|
112300
112300
|
const [m, F] = X.useState([]), [w, R] = X.useState(0);
|
|
112301
112301
|
X.useEffect(() => {
|
|
@@ -119514,7 +119514,7 @@ function TGA({
|
|
|
119514
119514
|
TGA.displayName = "MiniMap";
|
|
119515
119515
|
var NUe = U.memo(TGA);
|
|
119516
119516
|
const MUe = () => {
|
|
119517
|
-
const { store: A } = gh(), [e, n] = X.useState([]), [t, g] = A.useClientDocument(
|
|
119517
|
+
const { store: A } = gh(), [e, n] = X.useState([]), [t, g] = A.useClientDocument(tkA), i = X.useRef(!1);
|
|
119518
119518
|
X.useEffect(() => {
|
|
119519
119519
|
i.current = !0;
|
|
119520
119520
|
let l;
|
|
@@ -119836,11 +119836,11 @@ const xUe = (A) => {
|
|
|
119836
119836
|
{ label: "Slow Queries", component: YUe },
|
|
119837
119837
|
{ label: "Reactivity Graph", component: MUe }
|
|
119838
119838
|
], PUe = () => {
|
|
119839
|
-
const { store: A } = gh(), [e, n] = A.useClientDocument(
|
|
119839
|
+
const { store: A } = gh(), [e, n] = A.useClientDocument(skA, Ua), t = SR.length > 0 ? SR[e.tabIndex]?.label ?? SR[0].label : null, g = (i) => {
|
|
119840
119840
|
const r = SR.findIndex((I) => I.label === i);
|
|
119841
119841
|
r !== -1 && n({ tabIndex: r });
|
|
119842
119842
|
};
|
|
119843
|
-
return z.jsxs(sE, { className: "h-full", selectedKey: t, onSelectionChange: g, children: [z.jsx(sE.List, { children: SR.map((i) => z.jsx(sE.Tab, { id: i.label, children: i.label }, i.label)) }), SR.map((i) => z.jsx(sE.Panel, { id: i.label, children: z.jsx(
|
|
119843
|
+
return z.jsxs(sE, { className: "h-full", selectedKey: t, onSelectionChange: g, children: [z.jsx(sE.List, { children: SR.map((i) => z.jsx(sE.Tab, { id: i.label, children: i.label }, i.label)) }), SR.map((i) => z.jsx(sE.Panel, { id: i.label, children: z.jsx(_X, { FallbackComponent: JX, children: z.jsx(i.component, {}) }) }, i.label))] });
|
|
119844
119844
|
}, VUe = Date.now(), jUe = ({ networkStatusArr: A, now: e, inline: n = !1 }) => {
|
|
119845
119845
|
const t = A.at(-1), g = X.useMemo(() => {
|
|
119846
119846
|
for (let I = A.length - 1; I >= 0; I--) {
|
|
@@ -120062,7 +120062,7 @@ const xUe = (A) => {
|
|
|
120062
120062
|
return window.addEventListener("beforeunload", g), yield* ar(() => We(() => {
|
|
120063
120063
|
window.removeEventListener("beforeunload", g);
|
|
120064
120064
|
})), yield* A.networkStatus.pipe(mE((i) => {
|
|
120065
|
-
n.commit(
|
|
120065
|
+
n.commit(IkA.set(
|
|
120066
120066
|
{
|
|
120067
120067
|
status: i
|
|
120068
120068
|
},
|
|
@@ -120074,7 +120074,7 @@ const xUe = (A) => {
|
|
|
120074
120074
|
}), Jt, Ge, qn), yield* A.syncPull.pipe(mE(({ payload: i }) => {
|
|
120075
120075
|
if (i._tag !== "upstream-rebase")
|
|
120076
120076
|
for (const r of i.newEvents)
|
|
120077
|
-
window.tmpLiveStoreMutationCount += 1, e?.sound !== !1 && e?.sound?.mutations && (
|
|
120077
|
+
window.tmpLiveStoreMutationCount += 1, e?.sound !== !1 && e?.sound?.mutations && (iae(t, r.name).eventDef.options.clientOnly ? rNe() : oNe());
|
|
120078
120078
|
}), Jt, Ge, qn), yield* Qh;
|
|
120079
120079
|
}), iNe = K$(() => {
|
|
120080
120080
|
const A = new (window.AudioContext || window.webkitAudioContext)(), e = A.createGain();
|
|
@@ -120181,7 +120181,7 @@ const Eq = {}, fs = () => typeof process < "u" && process.env !== void 0 ? proce
|
|
|
120181
120181
|
if (console.error(A, ...g), fs())
|
|
120182
120182
|
debugger;
|
|
120183
120183
|
throw new Error(\`This should never happen: \${A}\`);
|
|
120184
|
-
}, d0 = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_GIT_HASH: "
|
|
120184
|
+
}, d0 = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_GIT_HASH: "945c1abb", VITE_GRAFANA_ENDPOINT: "http://dev3.tail8108.ts.net:30003", VITE_OTEL: "1", VITE_OTEL_EXPORTER_OTLP_ENDPOINT: "http://dev3.tail8108.ts.net:4318", VITE_OTEL_EXPORTER_WEBSOCKET_ENDPOINT: "wss://dev3.tail8108.ts.net:44318" }, Ni = (A) => {
|
|
120185
120185
|
if (typeof process < "u" && process.env !== void 0)
|
|
120186
120186
|
return process.env[A];
|
|
120187
120187
|
if (d0 !== void 0)
|
|
@@ -137744,36 +137744,7 @@ const cB = ({
|
|
|
137744
137744
|
debug: KR({ nullable: !0 })
|
|
137745
137745
|
},
|
|
137746
137746
|
indexes: [{ columns: ["seqNumGlobal", "seqNumClient"], name: "idx_session_changeset_id" }]
|
|
137747
|
-
}), Ao = [HCA, km, YR], bCA = (A) => Ao.some((g) => g.sqliteDef.name === A),
|
|
137748
|
-
name: yC,
|
|
137749
|
-
columns: {
|
|
137750
|
-
// TODO Adjust modeling so a global event never needs a client id component
|
|
137751
|
-
seqNumGlobal: RI({ primaryKey: !0, schema: WB }),
|
|
137752
|
-
seqNumClient: RI({ primaryKey: !0, schema: Ha }),
|
|
137753
|
-
seqNumRebaseGeneration: RI({ primaryKey: !0 }),
|
|
137754
|
-
parentSeqNumGlobal: RI({ schema: WB }),
|
|
137755
|
-
parentSeqNumClient: RI({ schema: Ha }),
|
|
137756
|
-
parentSeqNumRebaseGeneration: RI({}),
|
|
137757
|
-
/** Event definition name */
|
|
137758
|
-
name: HI({}),
|
|
137759
|
-
argsJson: HI({ schema: VB(dI) }),
|
|
137760
|
-
clientId: HI({}),
|
|
137761
|
-
sessionId: HI({}),
|
|
137762
|
-
schemaHash: RI({}),
|
|
137763
|
-
syncMetadataJson: HI({ schema: VB(Dt(ZB)) })
|
|
137764
|
-
},
|
|
137765
|
-
indexes: [
|
|
137766
|
-
{ columns: ["seqNumGlobal"], name: "idx_eventlog_seqNumGlobal" },
|
|
137767
|
-
{ columns: ["seqNumGlobal", "seqNumClient", "seqNumRebaseGeneration"], name: "idx_eventlog_seqNum" }
|
|
137768
|
-
]
|
|
137769
|
-
}), ie = "__livestore_sync_status", qCA = Jo({
|
|
137770
|
-
name: ie,
|
|
137771
|
-
columns: {
|
|
137772
|
-
head: RI({ primaryKey: !0 }),
|
|
137773
|
-
// Null means the sync backend is not yet connected and we haven't yet seen a backend ID
|
|
137774
|
-
backendId: HI({ nullable: !0 })
|
|
137775
|
-
}
|
|
137776
|
-
}), Lm = [Ch, qCA], xCA = { strategy: "warn" }, TCA = (A) => A ?? xCA, kf = ({
|
|
137747
|
+
}), Ao = [HCA, km, YR], bCA = (A) => Ao.some((g) => g.sqliteDef.name === A), qCA = { strategy: "warn" }, xCA = (A) => A ?? qCA, kf = ({
|
|
137777
137748
|
schema: A,
|
|
137778
137749
|
context: g
|
|
137779
137750
|
}) => v(function* () {
|
|
@@ -137822,7 +137793,7 @@ const cB = ({
|
|
|
137822
137793
|
operation: g.operation
|
|
137823
137794
|
}
|
|
137824
137795
|
}), { _tag: "unknown", reason: "materializer-missing" }) : { _tag: "known", eventDef: Q, materializer: C };
|
|
137825
|
-
}),
|
|
137796
|
+
}), TCA = Symbol.for("livestore.LiveStoreSchema"), vCA = -1, OCA = (A) => {
|
|
137826
137797
|
const g = A.state, I = A.state.sqlite.tables;
|
|
137827
137798
|
for (const B of Ao)
|
|
137828
137799
|
I.set(B.sqliteDef.name, B);
|
|
@@ -137835,9 +137806,9 @@ const cB = ({
|
|
|
137835
137806
|
Q.has(B.name) && FA(\`Duplicate event name: \${B.name}. Please use unique names for events.\`), Q.set(B.name, B);
|
|
137836
137807
|
for (const B of I.values())
|
|
137837
137808
|
Mm(B) && Q.has(B.set.name) === !1 && Q.set(B.set.name, B.set);
|
|
137838
|
-
const C =
|
|
137809
|
+
const C = xCA(A.unknownEventHandling);
|
|
137839
137810
|
return {
|
|
137840
|
-
LiveStoreSchemaSymbol:
|
|
137811
|
+
LiveStoreSchemaSymbol: TCA,
|
|
137841
137812
|
_DbSchemaType: Symbol.for("livestore.DbSchemaType"),
|
|
137842
137813
|
_EventDefMapType: Symbol.for("livestore.EventDefMapType"),
|
|
137843
137814
|
state: g,
|
|
@@ -137847,10 +137818,10 @@ const cB = ({
|
|
|
137847
137818
|
alias: A.devtools?.alias ?? "default"
|
|
137848
137819
|
}
|
|
137849
137820
|
};
|
|
137850
|
-
},
|
|
137851
|
-
const g = A.columns.filter((Q) => Q.primaryKey).map((Q) => \`'\${Q.name}'\`), I = A.columns.map(
|
|
137821
|
+
}, VCA = (A) => {
|
|
137822
|
+
const g = A.columns.filter((Q) => Q.primaryKey).map((Q) => \`'\${Q.name}'\`), I = A.columns.map(_CA);
|
|
137852
137823
|
return g.length > 0 && I.push(\`PRIMARY KEY (\${g.join(", ")})\`), I.join(", ");
|
|
137853
|
-
},
|
|
137824
|
+
}, _CA = (A) => {
|
|
137854
137825
|
const g = A.type._tag, I = A.nullable === !1 ? "not null" : "", Q = A.autoIncrement ? "autoincrement" : "", C = (() => {
|
|
137855
137826
|
if (A.default._tag === "None") return "";
|
|
137856
137827
|
if (A.default.value === null) return "default null";
|
|
@@ -137859,7 +137830,7 @@ const cB = ({
|
|
|
137859
137830
|
return g === "text" ? \`default '\${e}'\` : \`default \${e}\`;
|
|
137860
137831
|
})();
|
|
137861
137832
|
return \`'\${A.name}' \${g} \${I} \${Q} \${C}\`;
|
|
137862
|
-
},
|
|
137833
|
+
}, ZCA = (A) => {
|
|
137863
137834
|
const g = Array.isArray(A.tables) ? A.tables : Object.values(A.tables), I = /* @__PURE__ */ new Map();
|
|
137864
137835
|
for (const B of g) {
|
|
137865
137836
|
const e = B.sqliteDef;
|
|
@@ -137880,7 +137851,36 @@ const cB = ({
|
|
|
137880
137851
|
tables: [...I.values()].map((B) => B.sqliteDef.ast)
|
|
137881
137852
|
});
|
|
137882
137853
|
return { sqlite: { tables: I, migrations: A.migrations ?? { strategy: "auto" }, hash: C }, materializers: Q };
|
|
137883
|
-
},
|
|
137854
|
+
}, yC = "eventlog", Ch = Jo({
|
|
137855
|
+
name: yC,
|
|
137856
|
+
columns: {
|
|
137857
|
+
// TODO Adjust modeling so a global event never needs a client id component
|
|
137858
|
+
seqNumGlobal: RI({ primaryKey: !0, schema: WB }),
|
|
137859
|
+
seqNumClient: RI({ primaryKey: !0, schema: Ha }),
|
|
137860
|
+
seqNumRebaseGeneration: RI({ primaryKey: !0 }),
|
|
137861
|
+
parentSeqNumGlobal: RI({ schema: WB }),
|
|
137862
|
+
parentSeqNumClient: RI({ schema: Ha }),
|
|
137863
|
+
parentSeqNumRebaseGeneration: RI({}),
|
|
137864
|
+
/** Event definition name */
|
|
137865
|
+
name: HI({}),
|
|
137866
|
+
argsJson: HI({ schema: VB(dI) }),
|
|
137867
|
+
clientId: HI({}),
|
|
137868
|
+
sessionId: HI({}),
|
|
137869
|
+
schemaHash: RI({}),
|
|
137870
|
+
syncMetadataJson: HI({ schema: VB(Dt(ZB)) })
|
|
137871
|
+
},
|
|
137872
|
+
indexes: [
|
|
137873
|
+
{ columns: ["seqNumGlobal"], name: "idx_eventlog_seqNumGlobal" },
|
|
137874
|
+
{ columns: ["seqNumGlobal", "seqNumClient", "seqNumRebaseGeneration"], name: "idx_eventlog_seqNum" }
|
|
137875
|
+
]
|
|
137876
|
+
}), ie = "__livestore_sync_status", WCA = Jo({
|
|
137877
|
+
name: ie,
|
|
137878
|
+
columns: {
|
|
137879
|
+
head: RI({ primaryKey: !0 }),
|
|
137880
|
+
// Null means the sync backend is not yet connected and we haven't yet seen a backend ID
|
|
137881
|
+
backendId: HI({ nullable: !0 })
|
|
137882
|
+
}
|
|
137883
|
+
}), Lm = [Ch, WCA], Bh = "0.4.0-dev.12", Lf = 6, Eh = AA({
|
|
137884
137884
|
/** True when the upstream sync backend is reachable and responding to health checks. */
|
|
137885
137885
|
isConnected: YI,
|
|
137886
137886
|
/** Unix epoch timestamp (ms) of the latest connectivity state transition. */
|
|
@@ -139684,7 +139684,7 @@ LIMIT \${100}
|
|
|
139684
139684
|
behaviour: Q,
|
|
139685
139685
|
skipMetaTable: C = !1
|
|
139686
139686
|
}) => v(function* () {
|
|
139687
|
-
const B = g.name, e =
|
|
139687
|
+
const B = g.name, e = VCA(g);
|
|
139688
139688
|
Ur(A, ag\`create table if not exists '\${B}' (\${e}) strict\`);
|
|
139689
139689
|
for (const t of g.indexes)
|
|
139690
139690
|
Ur(A, kBA(B, t));
|
|
@@ -140308,7 +140308,7 @@ const ZBA = (A) => v(function* () {
|
|
|
140308
140308
|
return e === !1 && (yield* pf(
|
|
140309
140309
|
C,
|
|
140310
140310
|
I,
|
|
140311
|
-
|
|
140311
|
+
vCA,
|
|
140312
140312
|
C.clientId,
|
|
140313
140313
|
C.sessionId
|
|
140314
140314
|
)), g.debug.head = C.seqNum, {
|
|
@@ -146256,7 +146256,7 @@ const BeA = (A) => {
|
|
|
146256
146256
|
stateSchemaTabsContainerSet: FB.stateSchemaTabsContainer.set,
|
|
146257
146257
|
stateSchemaQueriesTabSet: FB.stateSchemaQueriesTab.set,
|
|
146258
146258
|
stateSchemaAtomsTabSet: FB.stateSchemaAtomsTab.set
|
|
146259
|
-
}, SeA = nCA(qp, {}), deA =
|
|
146259
|
+
}, SeA = nCA(qp, {}), deA = ZCA({ tables: FB, materializers: SeA }), feA = OCA({ events: qp, state: deA });
|
|
146260
146260
|
BeA({ schema: feA });
|
|
146261
146261
|
globalThis.__debugOpfsUtils = KY;
|
|
146262
146262
|
`, iEA = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", VGA], { type: "text/javascript;charset=utf-8" });
|
|
@@ -146289,7 +146289,7 @@ const jGA = {
|
|
|
146289
146289
|
stateSchemaTabsContainerSet: bf.stateSchemaTabsContainer.set,
|
|
146290
146290
|
stateSchemaQueriesTabSet: bf.stateSchemaQueriesTab.set,
|
|
146291
146291
|
stateSchemaAtomsTabSet: bf.stateSchemaAtomsTab.set
|
|
146292
|
-
}, INe = SIe(jGA, {}), aNe =
|
|
146292
|
+
}, INe = SIe(jGA, {}), aNe = sae({ tables: bf, materializers: INe }), CNe = gae({ events: jGA, state: aNe }), BNe = () => {
|
|
146293
146293
|
const { storeId: A, clientId: e, sessionId: n, schemaAlias: t, mode: g } = WGA.useParams(), { sharedWorker: i, options: r, appSchemas: I, onBoot: a } = ap(), { api: B } = tv(), [c, l] = X.useState(void 0), [u, f] = X.useState("connected"), [D, m] = X.useState(void 0);
|
|
146294
146294
|
X.useEffect(() => {
|
|
146295
146295
|
GA(function* () {
|
|
@@ -146394,11 +146394,11 @@ const jGA = {
|
|
|
146394
146394
|
}), iAA = bW.update({
|
|
146395
146395
|
id: "/$mode",
|
|
146396
146396
|
path: "/$mode",
|
|
146397
|
-
getParentRoute: () =>
|
|
146397
|
+
getParentRoute: () => vX
|
|
146398
146398
|
}), hNe = dNe.update({
|
|
146399
146399
|
id: "/",
|
|
146400
146400
|
path: "/",
|
|
146401
|
-
getParentRoute: () =>
|
|
146401
|
+
getParentRoute: () => vX
|
|
146402
146402
|
}), fNe = ZGA.update({
|
|
146403
146403
|
id: "/",
|
|
146404
146404
|
path: "/",
|
|
@@ -146413,23 +146413,23 @@ const jGA = {
|
|
|
146413
146413
|
}, wNe = iAA._addFileChildren(yNe), pNe = {
|
|
146414
146414
|
IndexRoute: hNe,
|
|
146415
146415
|
ModeRoute: wNe
|
|
146416
|
-
}, zGA =
|
|
146416
|
+
}, zGA = vX._addFileChildren(pNe)._addFileTypes(), mNe = MkA({
|
|
146417
146417
|
routeTree: zGA,
|
|
146418
146418
|
defaultPreload: "intent",
|
|
146419
146419
|
scrollRestoration: !0
|
|
146420
146420
|
});
|
|
146421
|
-
globalThis.__debugOpfsUtils =
|
|
146421
|
+
globalThis.__debugOpfsUtils = BkA;
|
|
146422
146422
|
const RNe = ({ schemas: A, sharedWorker: e, rootEl: n, options: t, mode: g, license: i, mountPath: r = "/_livestore", useMemoryRouter: I, portalEl: a }) => {
|
|
146423
146423
|
if (document.getElementById("portal") === null) {
|
|
146424
146424
|
const l = document.createElement("div");
|
|
146425
146425
|
l.id = "portal", document.body.append(l);
|
|
146426
146426
|
}
|
|
146427
|
-
const B = I ?
|
|
146427
|
+
const B = I ? MkA({
|
|
146428
146428
|
routeTree: zGA,
|
|
146429
146429
|
history: UCe({ initialEntries: [I.initialRoute] })
|
|
146430
146430
|
}) : mNe, c = ({ children: l }) => {
|
|
146431
146431
|
const [u, f] = X.useState(0);
|
|
146432
|
-
return z.jsx(jpe, { children: z.jsx(JJA, { getContainer: () => a ?? document.body, children: z.jsx(
|
|
146432
|
+
return z.jsx(jpe, { children: z.jsx(JJA, { getContainer: () => a ?? document.body, children: z.jsx(GkA.Provider, { value: {
|
|
146433
146433
|
appSchemas: A,
|
|
146434
146434
|
mode: g,
|
|
146435
146435
|
license: i,
|