@chaibuilder/sdk 0.1.12 → 0.1.13
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/{AddBlocks-73aa52ed.js → AddBlocks-598b655e.js} +1 -1
- package/dist/{AddBlocks-eafcb8ab.cjs → AddBlocks-5df8b221.cjs} +1 -1
- package/dist/{BrandingOptions-6e8c6721.js → BrandingOptions-0acb0974.js} +1 -1
- package/dist/{BrandingOptions-45caece9.cjs → BrandingOptions-2795be29.cjs} +1 -1
- package/dist/{CanvasArea-3049f560.js → CanvasArea-73b0ec3b.js} +2 -2
- package/dist/{CanvasArea-a392ffc1.cjs → CanvasArea-a637ef3a.cjs} +2 -2
- package/dist/{CurrentPage-3d3209a1.js → CurrentPage-3a189b02.js} +1 -1
- package/dist/{CurrentPage-def95a2d.cjs → CurrentPage-77baf305.cjs} +1 -1
- package/dist/ImagesPanel-68a11293.cjs +1 -0
- package/dist/ImagesPanel-996761b1.js +27 -0
- package/dist/{Layers-23512777.js → Layers-42ba6c2e.js} +2 -2
- package/dist/{Layers-3bdb61c3.cjs → Layers-7f3a2335.cjs} +1 -1
- package/dist/{MarkAsGlobalBlock-37ae563e.js → MarkAsGlobalBlock-3e708ff4.js} +1 -1
- package/dist/{MarkAsGlobalBlock-d10b749d.cjs → MarkAsGlobalBlock-c18910cc.cjs} +1 -1
- package/dist/{PagesPanel-a0cb2a3c.js → PagesPanel-86323919.js} +2 -2
- package/dist/{PagesPanel-2e626ee0.cjs → PagesPanel-dfbcc68b.cjs} +1 -1
- package/dist/{ProjectPanel-453caab3.cjs → ProjectPanel-4be28a35.cjs} +1 -1
- package/dist/{ProjectPanel-590ad7b5.js → ProjectPanel-9f645945.js} +2 -2
- package/dist/{Settings-201df828.js → Settings-57f2a7c2.js} +3 -3
- package/dist/{Settings-3f024a5e.cjs → Settings-99916fc1.cjs} +1 -1
- package/dist/{SidePanels-2d310a73.cjs → SidePanels-0e4ab159.cjs} +1 -1
- package/dist/{SidePanels-2135b1a7.js → SidePanels-b0347e28.js} +2 -2
- package/dist/{Topbar-f722a517.cjs → Topbar-44c010e3.cjs} +1 -1
- package/dist/{Topbar-4e436076.js → Topbar-87c1c5b2.js} +1 -1
- package/dist/UnsplashImages-47374e0c.js +181 -0
- package/dist/UnsplashImages-f761ad96.cjs +1 -0
- package/dist/{add-page-modal-e38900bd.js → add-page-modal-71c100f9.js} +4 -4
- package/dist/{add-page-modal-17cd6043.cjs → add-page-modal-b4e12262.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +2 -0
- package/dist/core.js +1 -1
- package/dist/{delete-page-modal-69202329.js → delete-page-modal-9dbe3038.js} +1 -1
- package/dist/{delete-page-modal-7e833472.cjs → delete-page-modal-fe71e66d.cjs} +1 -1
- package/dist/{form-e9748a4e.cjs → form-5d04c9b3.cjs} +1 -1
- package/dist/{form-52b48fbc.js → form-bf09d392.js} +1 -1
- package/dist/{index-9ba9f277.js → index-0d399aef.js} +277 -276
- package/dist/{index-4462d894.cjs → index-d4a18b5d.cjs} +2 -2
- package/dist/{link-26d3158f.cjs → link-4585b2d6.cjs} +1 -1
- package/dist/{link-eeef0a29.js → link-6467eda6.js} +1 -1
- package/dist/{page-viewer-ddaba8df.js → page-viewer-8a0cd017.js} +2 -2
- package/dist/{page-viewer-2fb5485c.cjs → page-viewer-eec3bdfb.cjs} +1 -1
- package/dist/{project-general-setting-fc4ea1f6.cjs → project-general-setting-12172508.cjs} +1 -1
- package/dist/{project-general-setting-5810b457.js → project-general-setting-155bc3fc.js} +4 -4
- package/dist/{project-seo-setting-b3372d3f.cjs → project-seo-setting-3f645a02.cjs} +1 -1
- package/dist/{project-seo-setting-23fb5e80.js → project-seo-setting-e9587467.js} +3 -3
- package/dist/server.cjs +1 -1
- package/dist/server.d.ts +17 -17
- package/dist/server.js +33 -33
- package/dist/{single-page-detail-128a33a7.cjs → single-page-detail-1b3195d1.cjs} +1 -1
- package/dist/{single-page-detail-359a0806.js → single-page-detail-fb0fe01b.js} +5 -5
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +2 -2
- package/package.json +1 -1
- package/dist/ImagesPanel-36a2f276.js +0 -27
- package/dist/ImagesPanel-731cda7a.cjs +0 -1
- package/dist/UnsplashImages-68492dc9.cjs +0 -1
- package/dist/UnsplashImages-afaa7706.js +0 -151
|
@@ -6,10 +6,10 @@ var a = (e, t, n) => (fs(e, t, "read from private field"), n ? n.call(e) : t.get
|
|
|
6
6
|
if (t.has(e))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
t instanceof WeakSet ? t.add(e) : t.set(e, n);
|
|
9
|
-
},
|
|
9
|
+
}, k = (e, t, n, s) => (fs(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
10
10
|
var Bn = (e, t, n, s) => ({
|
|
11
11
|
set _(r) {
|
|
12
|
-
|
|
12
|
+
k(e, t, r, n);
|
|
13
13
|
},
|
|
14
14
|
get _() {
|
|
15
15
|
return a(e, t, s);
|
|
@@ -32,7 +32,7 @@ import yi from "flat-to-nested";
|
|
|
32
32
|
import { g as st, c as qn, a as Ho, b as Jo } from "./html-to-json-8397fab5.js";
|
|
33
33
|
import Yo, { excludeAction as Xo, ActionCreators as hs } from "redux-undo";
|
|
34
34
|
import { useThrottledCallback as Zo } from "@react-hookz/web";
|
|
35
|
-
import { S as vt, I as vi, a as
|
|
35
|
+
import { S as vt, I as vi, a as As, B as ks } from "./MODIFIERS-c2e02614.js";
|
|
36
36
|
import { useChaiBlocks as ea, syncBlocksWithDefaults as ta } from "@chaibuilder/blocks";
|
|
37
37
|
import { FileTextIcon as na, GearIcon as sa, EyeClosedIcon as ra, EyeOpenIcon as ia } from "@radix-ui/react-icons";
|
|
38
38
|
import { LogOutIcon as oa } from "lucide-react";
|
|
@@ -103,16 +103,16 @@ const cr = (e) => "init" in e, ur = (e) => !!e.write, Kn = /* @__PURE__ */ new W
|
|
|
103
103
|
e.status = "fulfilled", e.value = t;
|
|
104
104
|
}, fr = (e, t) => {
|
|
105
105
|
e.status = "rejected", e.reason = t;
|
|
106
|
-
}, Sa = (e) => typeof (e == null ? void 0 : e.then) == "function", sn = (e, t) => "v" in e && "v" in t && Object.is(e.v, t.v), hr = (e, t) => "e" in e && "e" in t && Object.is(e.e, t.e),
|
|
106
|
+
}, Sa = (e) => typeof (e == null ? void 0 : e.then) == "function", sn = (e, t) => "v" in e && "v" in t && Object.is(e.v, t.v), hr = (e, t) => "e" in e && "e" in t && Object.is(e.e, t.e), xt = (e) => "v" in e && e.v instanceof Promise, Pa = (e, t) => "v" in e && "v" in t && e.v.orig && e.v.orig === t.v.orig, Dn = (e) => {
|
|
107
107
|
if ("e" in e)
|
|
108
108
|
throw e.e;
|
|
109
109
|
return e.v;
|
|
110
|
-
},
|
|
110
|
+
}, Aa = () => {
|
|
111
111
|
const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new Map();
|
|
112
112
|
let s, r, i;
|
|
113
113
|
const o = (m) => e.get(m), c = (m, v) => {
|
|
114
114
|
const j = e.get(m);
|
|
115
|
-
if (e.set(m, v), n.has(m) || n.set(m, j), j &&
|
|
115
|
+
if (e.set(m, v), n.has(m) || n.set(m, j), j && xt(j)) {
|
|
116
116
|
const w = "v" in v ? v.v instanceof Promise ? v.v : Promise.resolve(v.v) : Promise.reject(v.e);
|
|
117
117
|
lr(j.v, w);
|
|
118
118
|
}
|
|
@@ -129,7 +129,7 @@ const cr = (e) => "init" in e, ur = (e) => !!e.write, Kn = /* @__PURE__ */ new W
|
|
|
129
129
|
};
|
|
130
130
|
if (j && l(m, D, j), w && sn(w, D) && w.d === D.d)
|
|
131
131
|
return w;
|
|
132
|
-
if (w &&
|
|
132
|
+
if (w && xt(w) && xt(D) && Pa(w, D)) {
|
|
133
133
|
if (w.d === D.d)
|
|
134
134
|
return w;
|
|
135
135
|
D.v = w.v;
|
|
@@ -188,7 +188,7 @@ const cr = (e) => "init" in e, ur = (e) => !!e.write, Kn = /* @__PURE__ */ new W
|
|
|
188
188
|
}), Array.from(v.d).every(([$, G]) => {
|
|
189
189
|
const d = o($);
|
|
190
190
|
return $ === m || d === G || // TODO This is a hack, we should find a better solution.
|
|
191
|
-
d && !
|
|
191
|
+
d && !xt(d) && sn(d, G);
|
|
192
192
|
})))
|
|
193
193
|
return v;
|
|
194
194
|
const j = /* @__PURE__ */ new Map();
|
|
@@ -235,8 +235,8 @@ const cr = (e) => "init" in e, ur = (e) => !!e.write, Kn = /* @__PURE__ */ new W
|
|
|
235
235
|
return v || (v = b(m)), v;
|
|
236
236
|
}, C = (m, v) => !v.l.size && (!v.t.size || v.t.size === 1 && v.t.has(m)), y = (m) => {
|
|
237
237
|
const v = t.get(m);
|
|
238
|
-
v && C(m, v) &&
|
|
239
|
-
},
|
|
238
|
+
v && C(m, v) && A(m);
|
|
239
|
+
}, x = (m) => {
|
|
240
240
|
const v = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new WeakMap(), w = (E) => {
|
|
241
241
|
const S = t.get(E);
|
|
242
242
|
S == null || S.t.forEach((V) => {
|
|
@@ -274,7 +274,7 @@ const cr = (e) => "init" in e, ur = (e) => !!e.write, Kn = /* @__PURE__ */ new W
|
|
|
274
274
|
if (!cr(S))
|
|
275
275
|
throw new Error("atom not writable");
|
|
276
276
|
const G = o(S), d = f(S, V[0]);
|
|
277
|
-
(!G || !sn(G, d)) &&
|
|
277
|
+
(!G || !sn(G, d)) && x(S);
|
|
278
278
|
} else
|
|
279
279
|
$ = I(S, ...V);
|
|
280
280
|
if (!j) {
|
|
@@ -299,15 +299,15 @@ const cr = (e) => "init" in e, ur = (e) => !!e.write, Kn = /* @__PURE__ */ new W
|
|
|
299
299
|
w && (j.u = w);
|
|
300
300
|
}
|
|
301
301
|
return j;
|
|
302
|
-
},
|
|
302
|
+
}, A = (m) => {
|
|
303
303
|
var v;
|
|
304
304
|
const j = (v = t.get(m)) == null ? void 0 : v.u;
|
|
305
305
|
j && j(), t.delete(m);
|
|
306
306
|
const w = o(m);
|
|
307
|
-
w && (
|
|
307
|
+
w && (xt(w) && lr(w.v), w.d.forEach((D, E) => {
|
|
308
308
|
if (E !== m) {
|
|
309
309
|
const S = t.get(E);
|
|
310
|
-
S && (S.t.delete(m), C(E, S) &&
|
|
310
|
+
S && (S.t.delete(m), C(E, S) && A(E));
|
|
311
311
|
}
|
|
312
312
|
}));
|
|
313
313
|
}, F = (m, v, j) => {
|
|
@@ -318,7 +318,7 @@ const cr = (e) => "init" in e, ur = (e) => !!e.write, Kn = /* @__PURE__ */ new W
|
|
|
318
318
|
return;
|
|
319
319
|
}
|
|
320
320
|
const S = t.get(E);
|
|
321
|
-
S && (S.t.delete(m), C(E, S) &&
|
|
321
|
+
S && (S.t.delete(m), C(E, S) && A(E));
|
|
322
322
|
}), w.forEach((D) => {
|
|
323
323
|
const E = t.get(D);
|
|
324
324
|
E ? E.t.add(m) : t.has(m) && b(D, m);
|
|
@@ -334,7 +334,7 @@ const cr = (e) => "init" in e, ur = (e) => !!e.write, Kn = /* @__PURE__ */ new W
|
|
|
334
334
|
const E = t.get(j);
|
|
335
335
|
E && !// TODO This seems pretty hacky. Hope to fix it.
|
|
336
336
|
// Maybe we could `mountDependencies` in `setAtomState`?
|
|
337
|
-
(w && !
|
|
337
|
+
(w && !xt(w) && (sn(w, D) || hr(w, D))) && E.l.forEach((S) => S());
|
|
338
338
|
}
|
|
339
339
|
});
|
|
340
340
|
}
|
|
@@ -351,7 +351,7 @@ const cr = (e) => "init" in e, ur = (e) => !!e.write, Kn = /* @__PURE__ */ new W
|
|
|
351
351
|
};
|
|
352
352
|
};
|
|
353
353
|
let ps;
|
|
354
|
-
const
|
|
354
|
+
const ka = () => (ps || (ps = Aa()), ps), xa = Symbol();
|
|
355
355
|
function Ea(e, t) {
|
|
356
356
|
const n = ze(
|
|
357
357
|
e,
|
|
@@ -388,8 +388,8 @@ function ja(e, t) {
|
|
|
388
388
|
throw new Error("splitAtom: index out of bounds for read");
|
|
389
389
|
}
|
|
390
390
|
return b[F];
|
|
391
|
-
},
|
|
392
|
-
const
|
|
391
|
+
}, x = (I, B, b) => {
|
|
392
|
+
const A = I(r), F = I(e), M = s(F, A == null ? void 0 : A.arr).keyList.indexOf(O);
|
|
393
393
|
if (M < 0 || M >= F.length)
|
|
394
394
|
throw new Error("splitAtom: index out of bounds for write");
|
|
395
395
|
const m = Ia(b) ? b(F[M]) : b;
|
|
@@ -399,7 +399,7 @@ function ja(e, t) {
|
|
|
399
399
|
...F.slice(M + 1)
|
|
400
400
|
]);
|
|
401
401
|
};
|
|
402
|
-
f[g] = mr(e) ? ze(y,
|
|
402
|
+
f[g] = mr(e) ? ze(y, x) : ze(y);
|
|
403
403
|
}), u && u.keyList.length === p.length && u.keyList.every((P, g) => P === p[g]) ? l = u : l = { arr: o, atomList: f, keyList: p }, n.set(o, l), l;
|
|
404
404
|
}, r = ze((o) => {
|
|
405
405
|
const c = o(r), l = o(e);
|
|
@@ -511,7 +511,7 @@ function Ra(e) {
|
|
|
511
511
|
const Da = Ra(
|
|
512
512
|
() => typeof window < "u" ? window.localStorage : void 0
|
|
513
513
|
);
|
|
514
|
-
function
|
|
514
|
+
function At(e, t, n = Da, s) {
|
|
515
515
|
const r = s == null ? void 0 : s.unstable_getOnInit, i = ze(
|
|
516
516
|
r ? n.getItem(e, t) : t
|
|
517
517
|
);
|
|
@@ -523,13 +523,13 @@ function kt(e, t, n = Da, s) {
|
|
|
523
523
|
(c) => c(i),
|
|
524
524
|
(c, l, u) => {
|
|
525
525
|
const f = typeof u == "function" ? u(c(i)) : u;
|
|
526
|
-
return f ===
|
|
526
|
+
return f === xa ? (l(i, t), n.removeItem(e)) : f instanceof Promise ? f.then((p) => (l(i, p), n.setItem(e, p))) : (l(i, f), n.setItem(e, f));
|
|
527
527
|
}
|
|
528
528
|
);
|
|
529
529
|
}
|
|
530
530
|
const Ma = Ro(void 0), bi = (e) => {
|
|
531
531
|
const t = Lo(Ma);
|
|
532
|
-
return (e == null ? void 0 : e.store) || t ||
|
|
532
|
+
return (e == null ? void 0 : e.store) || t || ka();
|
|
533
533
|
}, La = (e) => typeof (e == null ? void 0 : e.then) == "function", Na = Xn.use || ((e) => {
|
|
534
534
|
if (e.status === "pending")
|
|
535
535
|
throw e;
|
|
@@ -668,26 +668,26 @@ const Pi = (e) => {
|
|
|
668
668
|
Va
|
|
669
669
|
);
|
|
670
670
|
ts.debugLabel = "pageBlocksAtom";
|
|
671
|
-
const
|
|
671
|
+
const Ae = N((e) => {
|
|
672
672
|
var t;
|
|
673
673
|
return (t = e(ts)) == null ? void 0 : t.present;
|
|
674
674
|
});
|
|
675
|
-
|
|
676
|
-
const Qs = ja(
|
|
675
|
+
Ae.debugLabel = "presentBlocksAtom";
|
|
676
|
+
const Qs = ja(Ae);
|
|
677
677
|
Qs.debugLabel = "pageBlocksAtomsAtom";
|
|
678
|
-
const
|
|
679
|
-
|
|
678
|
+
const Ai = N((e) => $a(e(Ae)));
|
|
679
|
+
Ai.debugLabel = "pageBlocksTreeAtom";
|
|
680
680
|
const Ka = N("");
|
|
681
681
|
Ka.debugLabel = "builderActivePageAtom";
|
|
682
682
|
const za = N(-1);
|
|
683
683
|
za.debugLabel = "destinationDropIndexAtom";
|
|
684
684
|
const Ga = N(!1);
|
|
685
685
|
Ga.debugLabel = "addBlocksModalAtom";
|
|
686
|
-
const
|
|
686
|
+
const ke = () => {
|
|
687
687
|
const [, e] = X(ts);
|
|
688
688
|
return e;
|
|
689
689
|
}, Td = () => {
|
|
690
|
-
const e =
|
|
690
|
+
const e = ke(), t = ne(Ai), n = W(
|
|
691
691
|
(s) => {
|
|
692
692
|
const r = wi(s);
|
|
693
693
|
e({ type: "set_page_blocks", payload: r });
|
|
@@ -696,18 +696,18 @@ const xe = () => {
|
|
|
696
696
|
);
|
|
697
697
|
return [t, n];
|
|
698
698
|
}, Wa = () => {
|
|
699
|
-
const e =
|
|
699
|
+
const e = ke();
|
|
700
700
|
return [W(
|
|
701
701
|
(n) => {
|
|
702
702
|
e({ type: "set_page_blocks", payload: n });
|
|
703
703
|
},
|
|
704
704
|
[e]
|
|
705
705
|
)];
|
|
706
|
-
},
|
|
706
|
+
}, xs = (e) => ["Box", "Slot", "Form", "DataContext", "Link", "List", "ListItem", "Row", "Column", "Table", "TableCell"].includes(
|
|
707
707
|
e
|
|
708
708
|
), Fd = (e) => !["Slot"].includes(e), Ud = (e) => !["Slot"].includes(e);
|
|
709
709
|
function Ha(e, t) {
|
|
710
|
-
return e === "Slot" || t === "List" && e !== "ListItem" || t === "Row" && e !== "Column" ? !1 :
|
|
710
|
+
return e === "Slot" || t === "List" && e !== "ListItem" || t === "Row" && e !== "Column" ? !1 : xs(t);
|
|
711
711
|
}
|
|
712
712
|
const qd = (e, { dragSource: t, dropTarget: n }) => {
|
|
713
713
|
const s = ee(t, "data._type", ""), r = ee(n, "data._type", "");
|
|
@@ -715,7 +715,7 @@ const qd = (e, { dragSource: t, dropTarget: n }) => {
|
|
|
715
715
|
}, Vs = N([]);
|
|
716
716
|
Vs.debugLabel = "selectedBlockIdsAtom";
|
|
717
717
|
const Ks = N((e) => {
|
|
718
|
-
const t = e(
|
|
718
|
+
const t = e(Ae), n = e(Vs);
|
|
719
719
|
return de(
|
|
720
720
|
te(t, ({ _id: s }) => he(n, s)),
|
|
721
721
|
(s) => ({ ...s })
|
|
@@ -732,21 +732,21 @@ const zs = N((e) => {
|
|
|
732
732
|
zs.debugLabel = "selectedBlockAtom";
|
|
733
733
|
const Ja = (e) => ee(e, "parent", null), Ya = N((e) => {
|
|
734
734
|
const t = e(Ks), n = de(t, Ja);
|
|
735
|
-
return te(e(
|
|
735
|
+
return te(e(Ae), (s) => he(n, s._id));
|
|
736
736
|
});
|
|
737
737
|
Ya.debugLabel = "selectedBlocksParentsAtom";
|
|
738
|
+
const ki = N(() => !1);
|
|
739
|
+
ki.debugLabel = "selectedBlockFlexChildAtom";
|
|
738
740
|
const xi = N(() => !1);
|
|
739
|
-
xi.debugLabel = "
|
|
740
|
-
const Ai = N(() => !1);
|
|
741
|
-
Ai.debugLabel = "selectedBlockGridChildAtom";
|
|
741
|
+
xi.debugLabel = "selectedBlockGridChildAtom";
|
|
742
742
|
const Gs = N("");
|
|
743
743
|
Gs.debugLabel = "styleStateAtom";
|
|
744
|
-
const Ei =
|
|
744
|
+
const Ei = At("styleBreakpoint", "xs");
|
|
745
745
|
Ei.debugLabel = "styleBreakpointAtom";
|
|
746
746
|
const $d = () => ({
|
|
747
|
-
flexChild: ne(
|
|
748
|
-
gridChild: ne(
|
|
749
|
-
}), Qd = () => ne(zs),
|
|
747
|
+
flexChild: ne(ki),
|
|
748
|
+
gridChild: ne(xi)
|
|
749
|
+
}), Qd = () => ne(zs), kt = () => {
|
|
750
750
|
const [e, t] = X(Vs), n = W(
|
|
751
751
|
(s) => {
|
|
752
752
|
t((r) => he(r, s) ? fi(r, s) : [...r, s]);
|
|
@@ -837,7 +837,7 @@ const $d = () => ({
|
|
|
837
837
|
case "styles":
|
|
838
838
|
return e.default;
|
|
839
839
|
case "slot":
|
|
840
|
-
return `${
|
|
840
|
+
return `${As}${st()}`;
|
|
841
841
|
case "singular":
|
|
842
842
|
const { i18n: t, schema: n } = e;
|
|
843
843
|
return t ? vi : ee(n, "default", "");
|
|
@@ -848,7 +848,7 @@ const $d = () => ({
|
|
|
848
848
|
default:
|
|
849
849
|
return "";
|
|
850
850
|
}
|
|
851
|
-
}, ec = () => ne(
|
|
851
|
+
}, ec = () => ne(Ae);
|
|
852
852
|
function vr(e, t, n, s, r) {
|
|
853
853
|
if (t === null)
|
|
854
854
|
return [...e, ...s];
|
|
@@ -867,7 +867,7 @@ function vr(e, t, n, s, r) {
|
|
|
867
867
|
return e.splice(c, 0, ...s), e;
|
|
868
868
|
}
|
|
869
869
|
const Vd = () => {
|
|
870
|
-
const e =
|
|
870
|
+
const e = ke(), t = ec(), [, n] = kt(), s = W(
|
|
871
871
|
(i, o, c) => {
|
|
872
872
|
var f;
|
|
873
873
|
for (let p = 0; p < i.length; p++) {
|
|
@@ -879,7 +879,7 @@ const Vd = () => {
|
|
|
879
879
|
}
|
|
880
880
|
let l;
|
|
881
881
|
o && (l = Oe(t, { _id: o }), i[0]._parent = o);
|
|
882
|
-
const u = l ?
|
|
882
|
+
const u = l ? xs(l._type) : !0;
|
|
883
883
|
return !u && l && (i[0]._parent = l._parent), e({
|
|
884
884
|
type: "set_blocks",
|
|
885
885
|
payload: vr(t, o || null, c || null, i, u)
|
|
@@ -895,10 +895,10 @@ const Vd = () => {
|
|
|
895
895
|
}
|
|
896
896
|
const l = st(), u = Oi(i.props), f = [];
|
|
897
897
|
hi(u, (C, y) => {
|
|
898
|
-
if (pi(C,
|
|
899
|
-
const
|
|
898
|
+
if (pi(C, As)) {
|
|
899
|
+
const x = C.replace(As, "");
|
|
900
900
|
f.push({
|
|
901
|
-
_id:
|
|
901
|
+
_id: x,
|
|
902
902
|
_type: "Slot",
|
|
903
903
|
_parent: l,
|
|
904
904
|
_name: i.props[y].name,
|
|
@@ -914,7 +914,7 @@ const Vd = () => {
|
|
|
914
914
|
};
|
|
915
915
|
let P;
|
|
916
916
|
o && (P = Oe(t, { _id: o }), p._parent = o);
|
|
917
|
-
const g = P ?
|
|
917
|
+
const g = P ? xs(P._type) : !0;
|
|
918
918
|
!g && P && (p._parent = P._parent);
|
|
919
919
|
const O = [p, ...f];
|
|
920
920
|
return e({
|
|
@@ -1014,7 +1014,7 @@ const _i = () => X(On), sc = (e) => {
|
|
|
1014
1014
|
});
|
|
1015
1015
|
});
|
|
1016
1016
|
}), Kd = () => {
|
|
1017
|
-
const e =
|
|
1017
|
+
const e = ke(), t = ot(rc);
|
|
1018
1018
|
return W(
|
|
1019
1019
|
(n, s, r) => {
|
|
1020
1020
|
t({ blockIds: n, newClasses: s, dispatch: e }), r && setTimeout(() => e({ type: "create_snapshot" }), 500);
|
|
@@ -1034,10 +1034,10 @@ const ic = N((e) => {
|
|
|
1034
1034
|
}, cc = N(!1), Ii = () => {
|
|
1035
1035
|
const [e, t] = X(cc);
|
|
1036
1036
|
return [e, t];
|
|
1037
|
-
}, uc = N(
|
|
1037
|
+
}, uc = N(ks), ji = () => {
|
|
1038
1038
|
const [e, t] = X(uc);
|
|
1039
1039
|
return [
|
|
1040
|
-
Uo(e) ? { ...
|
|
1040
|
+
Uo(e) ? { ...ks, ...e } : ks,
|
|
1041
1041
|
t
|
|
1042
1042
|
];
|
|
1043
1043
|
}, lc = N(null), dc = () => ({ currentPage: ne(lc) }), Bi = new yi({});
|
|
@@ -1097,7 +1097,7 @@ function pc(e) {
|
|
|
1097
1097
|
return nt(s, (i) => it(r, Me(i).blockId, i)), [n, r];
|
|
1098
1098
|
}
|
|
1099
1099
|
const Li = () => {
|
|
1100
|
-
const [e] = ji(), { currentPage: t } = dc(), n = ne(
|
|
1100
|
+
const [e] = ji(), { currentPage: t } = dc(), n = ne(Ae);
|
|
1101
1101
|
return W(() => {
|
|
1102
1102
|
const s = de(
|
|
1103
1103
|
n,
|
|
@@ -1110,7 +1110,7 @@ const Li = () => {
|
|
|
1110
1110
|
};
|
|
1111
1111
|
}, [e, t, n]);
|
|
1112
1112
|
};
|
|
1113
|
-
|
|
1113
|
+
At("blockStylingActiveTab", 1);
|
|
1114
1114
|
N([]);
|
|
1115
1115
|
const Ni = N(!1);
|
|
1116
1116
|
Ni.debugLabel = "readOnlyModeAtom";
|
|
@@ -1120,7 +1120,7 @@ const gc = N(!1);
|
|
|
1120
1120
|
gc.debugLabel = "advanceStylingOpenAtom";
|
|
1121
1121
|
const yc = N("online");
|
|
1122
1122
|
yc.debugLabel = "networkModeAtom";
|
|
1123
|
-
|
|
1123
|
+
At("currentUiLibrary", "");
|
|
1124
1124
|
const vc = N(!1);
|
|
1125
1125
|
vc.debugLabel = "codeEditorOpenAtom";
|
|
1126
1126
|
const bc = N(!1);
|
|
@@ -1131,12 +1131,12 @@ const Sc = N("");
|
|
|
1131
1131
|
Sc.debugLabel = "primaryLanguageAtom";
|
|
1132
1132
|
const Pc = N(null);
|
|
1133
1133
|
Pc.debugLabel = "canvasIframeAtom";
|
|
1134
|
-
const
|
|
1135
|
-
|
|
1136
|
-
const
|
|
1137
|
-
|
|
1138
|
-
const
|
|
1139
|
-
|
|
1134
|
+
const Ac = N("layers");
|
|
1135
|
+
Ac.debugLabel = "activePanelAtom";
|
|
1136
|
+
const kc = N(!1);
|
|
1137
|
+
kc.debugLabel = "addBlockOffCanvasAtom";
|
|
1138
|
+
const xc = N("");
|
|
1139
|
+
xc.debugLabel = "showPredefinedBlockCategoryAtom";
|
|
1140
1140
|
const ns = N({ undoCount: 0, redoCount: 0 });
|
|
1141
1141
|
ns.debugLabel = "historyStatesAtom";
|
|
1142
1142
|
const ss = N("SAVED");
|
|
@@ -1158,7 +1158,7 @@ const zd = () => {
|
|
|
1158
1158
|
// save only every 5 seconds
|
|
1159
1159
|
), syncState: e, setSyncState: t };
|
|
1160
1160
|
}, rs = () => {
|
|
1161
|
-
const e = ne(ts), [{ undoCount: t, redoCount: n }] = X(ns), s =
|
|
1161
|
+
const e = ne(ts), [{ undoCount: t, redoCount: n }] = X(ns), s = ke(), [r] = Ii(), [, i] = kt(), [, o] = _i(), [, c] = X(ss), l = dn("onSyncStatusChange", () => {
|
|
1162
1162
|
}), u = W(() => {
|
|
1163
1163
|
s({ type: "create_snapshot" });
|
|
1164
1164
|
}, [s]);
|
|
@@ -1182,7 +1182,7 @@ const zd = () => {
|
|
|
1182
1182
|
},
|
|
1183
1183
|
createSnapshot: u
|
|
1184
1184
|
};
|
|
1185
|
-
}, Ec = () => X(Ei), Ti =
|
|
1185
|
+
}, Ec = () => X(Ei), Ti = At("canvasWidth", 360), Fi = N((e) => {
|
|
1186
1186
|
const t = e(Ti);
|
|
1187
1187
|
return Ho(t).toLowerCase();
|
|
1188
1188
|
}), Gd = () => {
|
|
@@ -1190,7 +1190,7 @@ const zd = () => {
|
|
|
1190
1190
|
return Ee(() => {
|
|
1191
1191
|
s !== "xs" && r(n);
|
|
1192
1192
|
}, [n, s, r]), [e, n, t];
|
|
1193
|
-
}, Oc =
|
|
1193
|
+
}, Oc = At("canvasZoom", 100), Wd = () => X(Oc), Ui = N([]), qi = () => {
|
|
1194
1194
|
const [e, t] = X(Ui), n = ot(Js), s = W(
|
|
1195
1195
|
(r) => {
|
|
1196
1196
|
t(r), n([]);
|
|
@@ -1206,14 +1206,14 @@ const zd = () => {
|
|
|
1206
1206
|
[t, n]
|
|
1207
1207
|
);
|
|
1208
1208
|
return [e, s];
|
|
1209
|
-
}, $i =
|
|
1209
|
+
}, $i = At("darkMode", !1), Hd = () => {
|
|
1210
1210
|
const [e, t] = X($i);
|
|
1211
1211
|
return [e, t];
|
|
1212
1212
|
}, Cc = N(!1), Jd = () => {
|
|
1213
1213
|
const [e, t] = X(Cc);
|
|
1214
1214
|
return [e, t];
|
|
1215
1215
|
}, Qi = () => {
|
|
1216
|
-
const e =
|
|
1216
|
+
const e = ke(), t = ne(Ae), [, n] = kt();
|
|
1217
1217
|
return W(
|
|
1218
1218
|
(s, r = null) => {
|
|
1219
1219
|
const i = [];
|
|
@@ -1233,7 +1233,7 @@ const zd = () => {
|
|
|
1233
1233
|
);
|
|
1234
1234
|
return [e, t, n];
|
|
1235
1235
|
}, jc = N(""), Bc = () => X(jc), Xd = () => {
|
|
1236
|
-
const e = ne(
|
|
1236
|
+
const e = ne(Ae), t = ke(), n = Li(), [, , s] = ac();
|
|
1237
1237
|
return W(
|
|
1238
1238
|
async (r, i) => {
|
|
1239
1239
|
const o = st(16), c = de(e, (l) => (l._id === r && (l._globalBlockId = o, l._name = i), l));
|
|
@@ -1242,7 +1242,7 @@ const zd = () => {
|
|
|
1242
1242
|
[e, t, n, s]
|
|
1243
1243
|
);
|
|
1244
1244
|
}, Zd = () => ({}), Rc = () => {
|
|
1245
|
-
const e = ne(
|
|
1245
|
+
const e = ne(Ae), t = ke();
|
|
1246
1246
|
return W(
|
|
1247
1247
|
(n, s) => {
|
|
1248
1248
|
const r = de(e, (i) => (he(n, ee(i, "_id")) && it(i, "_parent", s), i));
|
|
@@ -1274,7 +1274,7 @@ const zd = () => {
|
|
|
1274
1274
|
const n = [], s = te(e, (r) => he(t, r._id) || he(t, r._parent) ? (n.push(r._id), !1) : !0);
|
|
1275
1275
|
return Le(n) ? s : Vi(s, n);
|
|
1276
1276
|
}, Lc = () => {
|
|
1277
|
-
const e =
|
|
1277
|
+
const e = ke(), t = ne(Ae), [n, s] = kt();
|
|
1278
1278
|
return W(
|
|
1279
1279
|
(r) => {
|
|
1280
1280
|
var c;
|
|
@@ -1313,7 +1313,7 @@ const zd = () => {
|
|
|
1313
1313
|
});
|
|
1314
1314
|
});
|
|
1315
1315
|
}), tf = () => {
|
|
1316
|
-
const e =
|
|
1316
|
+
const e = ke(), t = ot(Nc);
|
|
1317
1317
|
return W(
|
|
1318
1318
|
(n, s) => {
|
|
1319
1319
|
t({ blockIds: n, fullClasses: s, dispatch: e }), setTimeout(() => e({ type: "create_snapshot" }));
|
|
@@ -1362,7 +1362,7 @@ const zd = () => {
|
|
|
1362
1362
|
payload: { ids: n, props: s }
|
|
1363
1363
|
});
|
|
1364
1364
|
}), of = () => {
|
|
1365
|
-
const { createSnapshot: e } = rs(), t =
|
|
1365
|
+
const { createSnapshot: e } = rs(), t = ke(), n = ot(zi);
|
|
1366
1366
|
return W(
|
|
1367
1367
|
(s, r) => {
|
|
1368
1368
|
n({ blockIds: s, props: r, dispatch: t }), e();
|
|
@@ -1370,7 +1370,7 @@ const zd = () => {
|
|
|
1370
1370
|
[e, t, n]
|
|
1371
1371
|
);
|
|
1372
1372
|
}, af = () => {
|
|
1373
|
-
const e =
|
|
1373
|
+
const e = ke(), t = ot(zi);
|
|
1374
1374
|
return W(
|
|
1375
1375
|
(n, s) => {
|
|
1376
1376
|
t({ blockIds: n, props: s, dispatch: e });
|
|
@@ -1400,11 +1400,11 @@ const zd = () => {
|
|
|
1400
1400
|
openModal: n,
|
|
1401
1401
|
closeModal: s
|
|
1402
1402
|
};
|
|
1403
|
-
}, uf = () => ne(Ni), qc = N(""), $c = N(null), lf = () => X(qc), df = () => X($c), Qc =
|
|
1403
|
+
}, uf = () => ne(Ni), qc = N(""), $c = N(null), lf = () => X(qc), df = () => X($c), Qc = At("selectedBreakpoints", ["XS", "MD", "XL"]), ff = () => {
|
|
1404
1404
|
const [e, t] = X(Qc);
|
|
1405
1405
|
return [e, t];
|
|
1406
1406
|
}, Wi = () => {
|
|
1407
|
-
const e = ot(ns), { clear: t } = rs(), [, n] =
|
|
1407
|
+
const e = ot(ns), { clear: t } = rs(), [, n] = kt(), [, s] = Bc(), [, r] = _i();
|
|
1408
1408
|
return () => {
|
|
1409
1409
|
n([]), r([]), s(""), t(), e({ undoCount: 0, redoCount: 0 });
|
|
1410
1410
|
};
|
|
@@ -1434,7 +1434,7 @@ const zd = () => {
|
|
|
1434
1434
|
/* @__PURE__ */ _.jsx("div", { children: n ? /* @__PURE__ */ _.jsx(Et, { fallback: /* @__PURE__ */ _.jsx(Vo, { className: "h-96 w-full" }), children: Xn.createElement(n) }) : null })
|
|
1435
1435
|
] });
|
|
1436
1436
|
}, Yc = () => {
|
|
1437
|
-
const [e, t] =
|
|
1437
|
+
const [e, t] = kt(), [, n] = _c(), s = Lc(), r = Qi(), [, i] = qi(), { pasteBlocks: o } = Dc(), { undo: c, redo: l } = rs();
|
|
1438
1438
|
Qe("esc", () => t([]), {}, [t]), Qe("ctrl+c,command+c", () => n(e), {}, [e, n]), Qe("ctrl+d,command+d", () => r(e), { preventDefault: !0 }, [e, r]), Qe("ctrl+x,command+x", () => i(e), {}, [e, i]), Qe("ctrl+v,command+v", () => e.length === 1 ? o(e[0]) : null, {}, [e, o]), Qe("ctrl+z,command+z", () => c(), {}, [c]), Qe("ctrl+y,command+y", () => l(), {}, [l]), Qe(
|
|
1439
1439
|
"del, backspace",
|
|
1440
1440
|
(u) => {
|
|
@@ -1450,13 +1450,13 @@ const zd = () => {
|
|
|
1450
1450
|
n.push(s == null ? void 0 : s._parent), s = Oe(e, { _id: r }), r = s == null ? void 0 : s._parent;
|
|
1451
1451
|
return Pe(n);
|
|
1452
1452
|
}, Hi = N([]), Zc = () => {
|
|
1453
|
-
const [e] =
|
|
1453
|
+
const [e] = kt(), t = ne(Ae), [, n] = X(Hi);
|
|
1454
1454
|
Ee(() => {
|
|
1455
1455
|
let s = [];
|
|
1456
1456
|
const r = Me(e);
|
|
1457
1457
|
$s(r) && (s = [r, ...Xc(t, r)]), n(s);
|
|
1458
1458
|
}, [e, t, n]);
|
|
1459
|
-
}, bf = () => ne(Hi), eu = Pt(() => import("./SidePanels-
|
|
1459
|
+
}, bf = () => ne(Hi), eu = Pt(() => import("./SidePanels-b0347e28.js")), tu = Pt(() => import("./Topbar-87c1c5b2.js")), nu = Pt(() => import("./CanvasArea-73b0ec3b.js")), su = Pt(() => import("./Settings-57f2a7c2.js")), ru = () => {
|
|
1460
1460
|
const [e] = Ua(ss), t = (n) => {
|
|
1461
1461
|
n.preventDefault();
|
|
1462
1462
|
};
|
|
@@ -1482,12 +1482,12 @@ const zd = () => {
|
|
|
1482
1482
|
] }) });
|
|
1483
1483
|
}, iu = Go();
|
|
1484
1484
|
N({});
|
|
1485
|
-
function
|
|
1485
|
+
function Ar(e, t, n, s, r) {
|
|
1486
1486
|
for (t = t.split ? t.split(".") : t, s = 0; s < t.length; s++)
|
|
1487
1487
|
e = e ? e[t[s]] : r;
|
|
1488
1488
|
return e === r ? n : e;
|
|
1489
1489
|
}
|
|
1490
|
-
var Mn = "undefined",
|
|
1490
|
+
var Mn = "undefined", kr = "object", Ji = "any", Yi = "*", bt = "__", zn = typeof process < "u" ? process : {};
|
|
1491
1491
|
zn.env && zn.env.NODE_ENV;
|
|
1492
1492
|
var _e = typeof document < "u";
|
|
1493
1493
|
zn.versions != null && zn.versions.node != null;
|
|
@@ -1568,7 +1568,7 @@ os(is, "form");
|
|
|
1568
1568
|
os(is, "button");
|
|
1569
1569
|
os(is, "input");
|
|
1570
1570
|
os(is, "select");
|
|
1571
|
-
function
|
|
1571
|
+
function xr(e) {
|
|
1572
1572
|
try {
|
|
1573
1573
|
return decodeURIComponent(e.replace(/\+/g, " "));
|
|
1574
1574
|
} catch {
|
|
@@ -1590,7 +1590,7 @@ function yu() {
|
|
|
1590
1590
|
function vu(e) {
|
|
1591
1591
|
return function(t) {
|
|
1592
1592
|
for (var n, s = /* @__PURE__ */ Object.create(null), r = /([^&=]+)=?([^&]*)/g; n = r.exec(t); ) {
|
|
1593
|
-
var i =
|
|
1593
|
+
var i = xr(n[1]), o = xr(n[2]);
|
|
1594
1594
|
i.substring(i.length - 2) === "[]" ? (s[i = i.substring(0, i.length - 2)] || (s[i] = [])).push(o) : s[i] = o === "" || o;
|
|
1595
1595
|
}
|
|
1596
1596
|
for (var c in s) {
|
|
@@ -1624,7 +1624,7 @@ function as() {
|
|
|
1624
1624
|
}
|
|
1625
1625
|
return e;
|
|
1626
1626
|
}
|
|
1627
|
-
var an = "global", Ht = bt + "global" + bt, Jt = typeof self ===
|
|
1627
|
+
var an = "global", Ht = bt + "global" + bt, Jt = typeof self === kr && self.self === self && self || typeof global === kr && global.global === global && global || void 0;
|
|
1628
1628
|
function wt(e) {
|
|
1629
1629
|
return Jt[Ht][e];
|
|
1630
1630
|
}
|
|
@@ -1767,7 +1767,7 @@ var rt = bt + "anon_id", yt = bt + "user_id", It = bt + "user_traits", Ke = "use
|
|
|
1767
1767
|
}, pluginReadyType: function(e) {
|
|
1768
1768
|
return "ready:" + e;
|
|
1769
1769
|
} }), Or = /^utm_/, _r = /^an_prop_/, Cr = /^an_trait_/;
|
|
1770
|
-
function
|
|
1770
|
+
function Au(e) {
|
|
1771
1771
|
var t = e.storage.setItem;
|
|
1772
1772
|
return function(n) {
|
|
1773
1773
|
return function(s) {
|
|
@@ -1796,7 +1796,7 @@ function ku(e) {
|
|
|
1796
1796
|
};
|
|
1797
1797
|
};
|
|
1798
1798
|
}
|
|
1799
|
-
function
|
|
1799
|
+
function ku(e) {
|
|
1800
1800
|
return function(t, n) {
|
|
1801
1801
|
if (t === void 0 && (t = {}), n === void 0 && (n = {}), n.type === U.setItemEnd) {
|
|
1802
1802
|
if (n.key === rt)
|
|
@@ -1822,7 +1822,7 @@ function Ir(e) {
|
|
|
1822
1822
|
var _s = function(e) {
|
|
1823
1823
|
return bt + "TEMP" + bt + e;
|
|
1824
1824
|
};
|
|
1825
|
-
function
|
|
1825
|
+
function xu(e) {
|
|
1826
1826
|
var t = e.storage, n = t.setItem, s = t.removeItem, r = t.getItem;
|
|
1827
1827
|
return function(i) {
|
|
1828
1828
|
return function(o) {
|
|
@@ -1865,10 +1865,10 @@ function so(e, t, n) {
|
|
|
1865
1865
|
l.processIndex.forEach(function(f) {
|
|
1866
1866
|
var p = o.actions[f], P = p.plugin, g = p.payload.type, O = s[P][g];
|
|
1867
1867
|
if (O && De(O)) {
|
|
1868
|
-
var C = function(
|
|
1869
|
-
return
|
|
1870
|
-
return
|
|
1871
|
-
},
|
|
1868
|
+
var C = function(x, I) {
|
|
1869
|
+
return x === void 0 && (x = {}), I === void 0 && (I = {}), [Ke, _t].reduce(function(B, b) {
|
|
1870
|
+
return x.hasOwnProperty(b) && I[b] && I[b] !== x[b] && (B[b] = I[b]), B;
|
|
1871
|
+
}, x);
|
|
1872
1872
|
}(p.payload, c);
|
|
1873
1873
|
O({ payload: C, config: i[P].config, instance: n });
|
|
1874
1874
|
var y = g + ":" + P;
|
|
@@ -1891,9 +1891,9 @@ var ms = function(e) {
|
|
|
1891
1891
|
P && (g = o.during.map(function(y) {
|
|
1892
1892
|
return y.pluginName;
|
|
1893
1893
|
}));
|
|
1894
|
-
var O = function(y,
|
|
1894
|
+
var O = function(y, x) {
|
|
1895
1895
|
return function(I, B, b) {
|
|
1896
|
-
var
|
|
1896
|
+
var A = B.config, F = B.name, T = F + "." + I.type;
|
|
1897
1897
|
b && (T = b.event);
|
|
1898
1898
|
var M = I.type.match(jt) ? function(m, v, j, w, D) {
|
|
1899
1899
|
return function(E, S) {
|
|
@@ -1902,22 +1902,22 @@ var ms = function(e) {
|
|
|
1902
1902
|
throw new Error("Method " + v + " can only abort " + m + " plugin. " + JSON.stringify($) + " input valid");
|
|
1903
1903
|
return q({}, D, { abort: { reason: E, plugins: $, caller: v, _: V } });
|
|
1904
1904
|
};
|
|
1905
|
-
}(F, T,
|
|
1905
|
+
}(F, T, x, b, I) : function(m, v) {
|
|
1906
1906
|
return function() {
|
|
1907
1907
|
throw new Error(m.type + " action not cancellable. Remove abort in " + v);
|
|
1908
1908
|
};
|
|
1909
1909
|
}(I, T);
|
|
1910
|
-
return { payload: Eu(I), instance: y, config:
|
|
1910
|
+
return { payload: Eu(I), instance: y, config: A || {}, abort: M };
|
|
1911
1911
|
};
|
|
1912
|
-
}(s, g), C = t.exact.reduce(function(y,
|
|
1913
|
-
var I =
|
|
1912
|
+
}(s, g), C = t.exact.reduce(function(y, x) {
|
|
1913
|
+
var I = x.pluginName, B = x.methodName, b = !1;
|
|
1914
1914
|
return B.match(/^initialize/) || B.match(/^reset/) || (b = !u[I].loaded), f.offline && B.match(/^(page|track|identify)/) && (b = !0), y["" + I] = b, y;
|
|
1915
1915
|
}, {});
|
|
1916
|
-
return Promise.resolve(t.exact.reduce(function(y,
|
|
1916
|
+
return Promise.resolve(t.exact.reduce(function(y, x, I) {
|
|
1917
1917
|
try {
|
|
1918
|
-
var B =
|
|
1918
|
+
var B = x.pluginName;
|
|
1919
1919
|
return Promise.resolve(y).then(function(b) {
|
|
1920
|
-
function
|
|
1920
|
+
function A() {
|
|
1921
1921
|
return Promise.resolve(b);
|
|
1922
1922
|
}
|
|
1923
1923
|
var F = function() {
|
|
@@ -1948,30 +1948,30 @@ var ms = function(e) {
|
|
|
1948
1948
|
});
|
|
1949
1949
|
b[B] = n;
|
|
1950
1950
|
}();
|
|
1951
|
-
return F && F.then ? F.then(
|
|
1951
|
+
return F && F.then ? F.then(A) : A();
|
|
1952
1952
|
});
|
|
1953
1953
|
} catch (b) {
|
|
1954
1954
|
return Promise.reject(b);
|
|
1955
1955
|
}
|
|
1956
1956
|
}, Promise.resolve({}))).then(function(y) {
|
|
1957
|
-
return Promise.resolve(t.exact.reduce(function(
|
|
1957
|
+
return Promise.resolve(t.exact.reduce(function(x, I, B) {
|
|
1958
1958
|
try {
|
|
1959
|
-
var b = t.exact.length === B + 1,
|
|
1960
|
-
return Promise.resolve(
|
|
1961
|
-
var M = y[
|
|
1962
|
-
if (P && (M = T), ys(M,
|
|
1963
|
-
return gs({ data: M, method: p, instance: s, pluginName:
|
|
1964
|
-
if (ys(T,
|
|
1959
|
+
var b = t.exact.length === B + 1, A = I.pluginName, F = i[A];
|
|
1960
|
+
return Promise.resolve(x).then(function(T) {
|
|
1961
|
+
var M = y[A] ? y[A] : {};
|
|
1962
|
+
if (P && (M = T), ys(M, A))
|
|
1963
|
+
return gs({ data: M, method: p, instance: s, pluginName: A, store: c }), Promise.resolve(T);
|
|
1964
|
+
if (ys(T, A))
|
|
1965
1965
|
return b && gs({ data: T, method: p, instance: s, store: c }), Promise.resolve(T);
|
|
1966
|
-
if (C.hasOwnProperty(
|
|
1967
|
-
return c.dispatch({ type: "queue", plugin:
|
|
1968
|
-
var m = O(y[
|
|
1969
|
-
return Promise.resolve(F[p]({ abort: m.abort, payload: M, instance: s, config: Dr(
|
|
1970
|
-
var j = ge(v) ? v : {}, w = q({}, T, j), D = y[
|
|
1971
|
-
if (ys(D,
|
|
1972
|
-
gs({ data: D, method: p, instance: s, pluginName:
|
|
1966
|
+
if (C.hasOwnProperty(A) && C[A] === !0)
|
|
1967
|
+
return c.dispatch({ type: "queue", plugin: A, payload: M, _: { called: "queue", from: "queueMechanism" } }), Promise.resolve(T);
|
|
1968
|
+
var m = O(y[A], i[A]);
|
|
1969
|
+
return Promise.resolve(F[p]({ abort: m.abort, payload: M, instance: s, config: Dr(A, u, i), plugins: u })).then(function(v) {
|
|
1970
|
+
var j = ge(v) ? v : {}, w = q({}, T, j), D = y[A];
|
|
1971
|
+
if (ys(D, A))
|
|
1972
|
+
gs({ data: D, method: p, instance: s, pluginName: A, store: c });
|
|
1973
1973
|
else {
|
|
1974
|
-
var E = p + ":" +
|
|
1974
|
+
var E = p + ":" + A;
|
|
1975
1975
|
(E.match(/:/g) || []).length < 2 && !p.match(Br) && !p.match(Rr) && s.dispatch(q({}, P ? w : M, { type: E, _: { called: E, from: "submethod" } }));
|
|
1976
1976
|
}
|
|
1977
1977
|
return Promise.resolve(w);
|
|
@@ -1980,14 +1980,14 @@ var ms = function(e) {
|
|
|
1980
1980
|
} catch (T) {
|
|
1981
1981
|
return Promise.reject(T);
|
|
1982
1982
|
}
|
|
1983
|
-
}, Promise.resolve(n))).then(function(
|
|
1983
|
+
}, Promise.resolve(n))).then(function(x) {
|
|
1984
1984
|
if (!(p.match(jt) || p.match(/^registerPlugin/) || p.match(Rr) || p.match(Br) || p.match(/^params/) || p.match(/^userIdChanged/))) {
|
|
1985
|
-
if (l.plugins.includes(p),
|
|
1986
|
-
return
|
|
1987
|
-
var I = q({},
|
|
1988
|
-
ro(
|
|
1985
|
+
if (l.plugins.includes(p), x._ && x._.originalAction === p)
|
|
1986
|
+
return x;
|
|
1987
|
+
var I = q({}, x, { _: { originalAction: x.type, called: x.type, from: "engineEnd" } });
|
|
1988
|
+
ro(x, t.exact.length) && !p.match(/End$/) && (I = q({}, I, { type: x.type + "Aborted" })), c.dispatch(I);
|
|
1989
1989
|
}
|
|
1990
|
-
return
|
|
1990
|
+
return x;
|
|
1991
1991
|
});
|
|
1992
1992
|
});
|
|
1993
1993
|
} catch (y) {
|
|
@@ -2057,10 +2057,10 @@ function Ou(e, t, n) {
|
|
|
2057
2057
|
return f.includes(b);
|
|
2058
2058
|
}).map(function(b) {
|
|
2059
2059
|
return P[b];
|
|
2060
|
-
}), C = [], y = [],
|
|
2061
|
-
var
|
|
2060
|
+
}), C = [], y = [], x = o.disabled, I = O.map(function(b) {
|
|
2061
|
+
var A = b.loaded, F = b.name, T = b.config;
|
|
2062
2062
|
return no(b, function() {
|
|
2063
|
-
return
|
|
2063
|
+
return A({ config: T });
|
|
2064
2064
|
}, 1e4).then(function(M) {
|
|
2065
2065
|
return s[F] || (r.dispatch({ type: U.pluginReadyType(F), name: F, events: Object.keys(b).filter(function(m) {
|
|
2066
2066
|
return !Os.includes(m);
|
|
@@ -2072,9 +2072,9 @@ function Ou(e, t, n) {
|
|
|
2072
2072
|
});
|
|
2073
2073
|
});
|
|
2074
2074
|
Promise.all(I).then(function(b) {
|
|
2075
|
-
var
|
|
2075
|
+
var A = { plugins: C, failed: y, disabled: x };
|
|
2076
2076
|
setTimeout(function() {
|
|
2077
|
-
g.length === I.length +
|
|
2077
|
+
g.length === I.length + x.length && r.dispatch(q({}, { type: U.ready }, A));
|
|
2078
2078
|
}, 0);
|
|
2079
2079
|
});
|
|
2080
2080
|
}
|
|
@@ -2082,9 +2082,9 @@ function Ou(e, t, n) {
|
|
|
2082
2082
|
if (u !== U.bootstrap)
|
|
2083
2083
|
return /^ready:([^:]*)$/.test(u) && setTimeout(function() {
|
|
2084
2084
|
return so(r, t, e);
|
|
2085
|
-
}, 0), Promise.resolve(function(b,
|
|
2085
|
+
}, 0), Promise.resolve(function(b, A, F, T, M) {
|
|
2086
2086
|
try {
|
|
2087
|
-
var m = De(
|
|
2087
|
+
var m = De(A) ? A() : A, v = b.type, j = v.replace(jt, "");
|
|
2088
2088
|
if (b._ && b._.called)
|
|
2089
2089
|
return Promise.resolve(b);
|
|
2090
2090
|
var w = F.getState(), D = (V = m, ($ = w.plugins) === void 0 && ($ = {}), (G = b.options) === void 0 && (G = {}), Object.keys(V).filter(function(d) {
|
|
@@ -2373,7 +2373,7 @@ function Qu(e) {
|
|
|
2373
2373
|
return H[ce] = (Y = h.methods[ce], function() {
|
|
2374
2374
|
for (var se = Array.prototype.slice.call(arguments), J = new Array(Y.length), Ce = 0; Ce < se.length; Ce++)
|
|
2375
2375
|
J[Ce] = se[Ce];
|
|
2376
|
-
return J[J.length] =
|
|
2376
|
+
return J[J.length] = A, Y.apply({ instance: A }, J);
|
|
2377
2377
|
}), H;
|
|
2378
2378
|
}, {}), delete h.methods);
|
|
2379
2379
|
var K = Object.keys(h).concat(L), z = new Set(d.events.concat(K));
|
|
@@ -2394,7 +2394,7 @@ function Qu(e) {
|
|
|
2394
2394
|
return o;
|
|
2395
2395
|
}, p = new Cu(), P = p.addMiddleware, g = p.removeMiddleware, O = p.dynamicMiddlewares, C = function() {
|
|
2396
2396
|
throw new Error("Abort disabled inListener");
|
|
2397
|
-
}, y = vu(),
|
|
2397
|
+
}, y = vu(), x = Ir(r), I = q({}, x, n, y.an_uid ? { userId: y.an_uid } : {}, y.an_aid ? { anonymousId: y.an_aid } : {});
|
|
2398
2398
|
I.anonymousId || (I.anonymousId = as());
|
|
2399
2399
|
var B = q({ enable: function(d, h) {
|
|
2400
2400
|
return new Promise(function(L) {
|
|
@@ -2404,11 +2404,11 @@ function Qu(e) {
|
|
|
2404
2404
|
return new Promise(function(L) {
|
|
2405
2405
|
S.dispatch({ type: U.disablePlugin, plugins: vs(d), _: { originalAction: U.disablePlugin } }, L, [h]);
|
|
2406
2406
|
});
|
|
2407
|
-
} }, s.methods), b = !1,
|
|
2407
|
+
} }, s.methods), b = !1, A = { identify: function(d, h, L, K) {
|
|
2408
2408
|
try {
|
|
2409
|
-
var z = Ct(d) ? d : null, H = ge(d) ? d : h, ce = L || {}, Y =
|
|
2409
|
+
var z = Ct(d) ? d : null, H = ge(d) ? d : h, ce = L || {}, Y = A.user();
|
|
2410
2410
|
St(_s(Ke), z);
|
|
2411
|
-
var se = z || H.userId || i(Ke,
|
|
2411
|
+
var se = z || H.userId || i(Ke, A, H);
|
|
2412
2412
|
return Promise.resolve(new Promise(function(J) {
|
|
2413
2413
|
S.dispatch(q({ type: U.identifyStart, userId: se, traits: H || {}, options: ce, anonymousId: Y.anonymousId }, Y.id && Y.id !== z && { previousId: Y.id }), J, [h, L, K]);
|
|
2414
2414
|
}));
|
|
@@ -2422,7 +2422,7 @@ function Qu(e) {
|
|
|
2422
2422
|
throw new Error("EventMissing");
|
|
2423
2423
|
var H = ge(d) ? d : h || {}, ce = ge(L) ? L : {};
|
|
2424
2424
|
return Promise.resolve(new Promise(function(Y) {
|
|
2425
|
-
S.dispatch({ type: U.trackStart, event: z, properties: H, options: ce, userId: i(Ke,
|
|
2425
|
+
S.dispatch({ type: U.trackStart, event: z, properties: H, options: ce, userId: i(Ke, A, h), anonymousId: i(_t, A, h) }, Y, [h, L, K]);
|
|
2426
2426
|
}));
|
|
2427
2427
|
} catch (Y) {
|
|
2428
2428
|
return Promise.reject(Y);
|
|
@@ -2431,24 +2431,24 @@ function Qu(e) {
|
|
|
2431
2431
|
try {
|
|
2432
2432
|
var K = ge(d) ? d : {}, z = ge(h) ? h : {};
|
|
2433
2433
|
return Promise.resolve(new Promise(function(H) {
|
|
2434
|
-
S.dispatch({ type: U.pageStart, properties: Lu(K), options: z, userId: i(Ke,
|
|
2434
|
+
S.dispatch({ type: U.pageStart, properties: Lu(K), options: z, userId: i(Ke, A, K), anonymousId: i(_t, A, K) }, H, [d, h, L]);
|
|
2435
2435
|
}));
|
|
2436
2436
|
} catch (H) {
|
|
2437
2437
|
return Promise.reject(H);
|
|
2438
2438
|
}
|
|
2439
2439
|
}, user: function(d) {
|
|
2440
2440
|
if (d === Ke || d === "id")
|
|
2441
|
-
return i(Ke,
|
|
2441
|
+
return i(Ke, A);
|
|
2442
2442
|
if (d === _t || d === "anonId")
|
|
2443
|
-
return i(_t,
|
|
2444
|
-
var h =
|
|
2445
|
-
return d ?
|
|
2443
|
+
return i(_t, A);
|
|
2444
|
+
var h = A.getState("user");
|
|
2445
|
+
return d ? Ar(h, d) : h;
|
|
2446
2446
|
}, reset: function(d) {
|
|
2447
2447
|
return new Promise(function(h) {
|
|
2448
2448
|
S.dispatch({ type: U.resetStart }, h, d);
|
|
2449
2449
|
});
|
|
2450
2450
|
}, ready: function(d) {
|
|
2451
|
-
return b && d({ plugins: B, instance:
|
|
2451
|
+
return b && d({ plugins: B, instance: A }), A.on(U.ready, function(h) {
|
|
2452
2452
|
d(h), b = !0;
|
|
2453
2453
|
});
|
|
2454
2454
|
}, on: function(d, h) {
|
|
@@ -2461,13 +2461,13 @@ function Qu(e) {
|
|
|
2461
2461
|
var K = function(Y) {
|
|
2462
2462
|
return function(se) {
|
|
2463
2463
|
return function(J) {
|
|
2464
|
-
return J.type.match(L) && h({ payload: J, instance:
|
|
2464
|
+
return J.type.match(L) && h({ payload: J, instance: A, plugins: o }), se(J);
|
|
2465
2465
|
};
|
|
2466
2466
|
};
|
|
2467
2467
|
}, z = function(Y) {
|
|
2468
2468
|
return function(se) {
|
|
2469
2469
|
return function(J) {
|
|
2470
|
-
return J.type.match(L) || h({ payload: J, instance:
|
|
2470
|
+
return J.type.match(L) || h({ payload: J, instance: A, plugins: o }), se(J);
|
|
2471
2471
|
};
|
|
2472
2472
|
};
|
|
2473
2473
|
};
|
|
@@ -2478,7 +2478,7 @@ function Qu(e) {
|
|
|
2478
2478
|
var H = d.match(L) ? Tn : Fn, ce = function(Y) {
|
|
2479
2479
|
return function(se) {
|
|
2480
2480
|
return function(J) {
|
|
2481
|
-
return J.type === d && h({ payload: J, instance:
|
|
2481
|
+
return J.type === d && h({ payload: J, instance: A, plugins: o, abort: C }), se(J);
|
|
2482
2482
|
};
|
|
2483
2483
|
};
|
|
2484
2484
|
};
|
|
@@ -2490,13 +2490,13 @@ function Qu(e) {
|
|
|
2490
2490
|
return !1;
|
|
2491
2491
|
if (d === U.bootstrap)
|
|
2492
2492
|
throw new Error(".once disabled for " + d);
|
|
2493
|
-
var L =
|
|
2494
|
-
h({ payload: K.payload, instance:
|
|
2493
|
+
var L = A.on(d, function(K) {
|
|
2494
|
+
h({ payload: K.payload, instance: A, plugins: o, abort: C }), L();
|
|
2495
2495
|
});
|
|
2496
2496
|
return L;
|
|
2497
2497
|
}, getState: function(d) {
|
|
2498
2498
|
var h = S.getState();
|
|
2499
|
-
return d ?
|
|
2499
|
+
return d ? Ar(h, d) : Object.assign({}, h);
|
|
2500
2500
|
}, dispatch: function(d) {
|
|
2501
2501
|
var h = Ct(d) ? { type: d } : d;
|
|
2502
2502
|
if ($n.includes(h.type))
|
|
@@ -2508,14 +2508,14 @@ function Qu(e) {
|
|
|
2508
2508
|
}, removeItem: function(d, h) {
|
|
2509
2509
|
S.dispatch({ type: U.removeItemStart, key: d, options: h });
|
|
2510
2510
|
} }, setAnonymousId: function(d, h) {
|
|
2511
|
-
|
|
2511
|
+
A.storage.setItem(rt, d, h);
|
|
2512
2512
|
}, events: { core: $n, plugins: c } }, F = s.middlewares.concat([function(d) {
|
|
2513
2513
|
return function(h) {
|
|
2514
2514
|
return function(L) {
|
|
2515
2515
|
return L.meta || (L.meta = Qr()), h(L);
|
|
2516
2516
|
};
|
|
2517
2517
|
};
|
|
2518
|
-
}, O(Tn), Ou(
|
|
2518
|
+
}, O(Tn), Ou(A, f, { all: u, plugins: c }), _u(r), Au(A), xu(A), O(Fn)]), T = { context: Fu, user: ku(r), page: Tu, track: Bu, plugins: Iu(f), queue: Du }, M = Yt, m = Yt;
|
|
2519
2519
|
if (_e && e.debug) {
|
|
2520
2520
|
var v = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
|
|
2521
2521
|
v && (M = v({ trace: !0, traceLimit: 25 })), m = function() {
|
|
@@ -2565,7 +2565,7 @@ function Qu(e) {
|
|
|
2565
2565
|
return j.apply(null, [K]);
|
|
2566
2566
|
});
|
|
2567
2567
|
var V = Object.keys(o);
|
|
2568
|
-
S.dispatch({ type: U.bootstrap, plugins: V, config: w, params: y, user: I, initialUser: n, persistedUser:
|
|
2568
|
+
S.dispatch({ type: U.bootstrap, plugins: V, config: w, params: y, user: I, initialUser: n, persistedUser: x });
|
|
2569
2569
|
var $ = V.filter(function(d) {
|
|
2570
2570
|
return s.pluginEnabled[d];
|
|
2571
2571
|
}), G = V.filter(function(d) {
|
|
@@ -2573,14 +2573,14 @@ function Qu(e) {
|
|
|
2573
2573
|
});
|
|
2574
2574
|
return S.dispatch({ type: U.registerPlugins, plugins: V, enabled: s.pluginEnabled }), s.pluginsArray.map(function(d, h) {
|
|
2575
2575
|
var L = d.bootstrap, K = d.config, z = d.name;
|
|
2576
|
-
L && De(L) && L({ instance:
|
|
2576
|
+
L && De(L) && L({ instance: A, config: K, payload: d }), S.dispatch({ type: U.registerPluginType(z), name: z, enabled: s.pluginEnabled[z], plugin: d }), s.pluginsArray.length === h + 1 && S.dispatch({ type: U.initializeStart, plugins: $, disabled: G });
|
|
2577
2577
|
}), $u(function(d) {
|
|
2578
2578
|
S.dispatch({ type: d ? U.offline : U.online });
|
|
2579
2579
|
}), function(d, h, L) {
|
|
2580
2580
|
setInterval(function() {
|
|
2581
2581
|
return so(d, h, L);
|
|
2582
2582
|
}, 3e3);
|
|
2583
|
-
}(S, f,
|
|
2583
|
+
}(S, f, A), A;
|
|
2584
2584
|
}
|
|
2585
2585
|
var Tn = "before", Fn = "after", cn = "cookie", at = mo(), ho = cs, Vu = cs;
|
|
2586
2586
|
function po(e) {
|
|
@@ -2711,7 +2711,7 @@ function el() {
|
|
|
2711
2711
|
};
|
|
2712
2712
|
return Qu(Kr(Kr({}, t), e));
|
|
2713
2713
|
}
|
|
2714
|
-
const tl = "@chaibuilder/sdk", nl = "0.1.
|
|
2714
|
+
const tl = "@chaibuilder/sdk", nl = "0.1.13", sl = "module", rl = [
|
|
2715
2715
|
"dist"
|
|
2716
2716
|
], il = "dist/core.js", ol = !1, al = {
|
|
2717
2717
|
".": {
|
|
@@ -3078,7 +3078,7 @@ var ct, We, Rt, ni, Sl = (ni = class extends tn {
|
|
|
3078
3078
|
R(this, ct, void 0);
|
|
3079
3079
|
R(this, We, void 0);
|
|
3080
3080
|
R(this, Rt, void 0);
|
|
3081
|
-
|
|
3081
|
+
k(this, Rt, (t) => {
|
|
3082
3082
|
if (!Xt && window.addEventListener) {
|
|
3083
3083
|
const n = () => t();
|
|
3084
3084
|
return window.addEventListener("visibilitychange", n, !1), () => {
|
|
@@ -3092,16 +3092,16 @@ var ct, We, Rt, ni, Sl = (ni = class extends tn {
|
|
|
3092
3092
|
}
|
|
3093
3093
|
onUnsubscribe() {
|
|
3094
3094
|
var t;
|
|
3095
|
-
this.hasListeners() || ((t = a(this, We)) == null || t.call(this),
|
|
3095
|
+
this.hasListeners() || ((t = a(this, We)) == null || t.call(this), k(this, We, void 0));
|
|
3096
3096
|
}
|
|
3097
3097
|
setEventListener(t) {
|
|
3098
3098
|
var n;
|
|
3099
|
-
|
|
3099
|
+
k(this, Rt, t), (n = a(this, We)) == null || n.call(this), k(this, We, t((s) => {
|
|
3100
3100
|
typeof s == "boolean" ? this.setFocused(s) : this.onFocus();
|
|
3101
3101
|
}));
|
|
3102
3102
|
}
|
|
3103
3103
|
setFocused(t) {
|
|
3104
|
-
a(this, ct) !== t && (
|
|
3104
|
+
a(this, ct) !== t && (k(this, ct, t), this.onFocus());
|
|
3105
3105
|
}
|
|
3106
3106
|
onFocus() {
|
|
3107
3107
|
this.listeners.forEach((t) => {
|
|
@@ -3118,7 +3118,7 @@ var ct, We, Rt, ni, Sl = (ni = class extends tn {
|
|
|
3118
3118
|
R(this, Dt, !0);
|
|
3119
3119
|
R(this, He, void 0);
|
|
3120
3120
|
R(this, Mt, void 0);
|
|
3121
|
-
|
|
3121
|
+
k(this, Mt, (t) => {
|
|
3122
3122
|
if (!Xt && window.addEventListener) {
|
|
3123
3123
|
const n = () => t(!0), s = () => t(!1);
|
|
3124
3124
|
return window.addEventListener("online", n, !1), window.addEventListener("offline", s, !1), () => {
|
|
@@ -3132,14 +3132,14 @@ var ct, We, Rt, ni, Sl = (ni = class extends tn {
|
|
|
3132
3132
|
}
|
|
3133
3133
|
onUnsubscribe() {
|
|
3134
3134
|
var t;
|
|
3135
|
-
this.hasListeners() || ((t = a(this, He)) == null || t.call(this),
|
|
3135
|
+
this.hasListeners() || ((t = a(this, He)) == null || t.call(this), k(this, He, void 0));
|
|
3136
3136
|
}
|
|
3137
3137
|
setEventListener(t) {
|
|
3138
3138
|
var n;
|
|
3139
|
-
|
|
3139
|
+
k(this, Mt, t), (n = a(this, He)) == null || n.call(this), k(this, He, t(this.setOnline.bind(this)));
|
|
3140
3140
|
}
|
|
3141
3141
|
setOnline(t) {
|
|
3142
|
-
a(this, Dt) !== t && (
|
|
3142
|
+
a(this, Dt) !== t && (k(this, Dt, t), this.listeners.forEach((s) => {
|
|
3143
3143
|
s(t);
|
|
3144
3144
|
}));
|
|
3145
3145
|
}
|
|
@@ -3147,7 +3147,7 @@ var ct, We, Rt, ni, Sl = (ni = class extends tn {
|
|
|
3147
3147
|
return a(this, Dt);
|
|
3148
3148
|
}
|
|
3149
3149
|
}, Dt = new WeakMap(), He = new WeakMap(), Mt = new WeakMap(), si), Jn = new Pl();
|
|
3150
|
-
function
|
|
3150
|
+
function Al(e) {
|
|
3151
3151
|
return Math.min(1e3 * 2 ** e, 3e4);
|
|
3152
3152
|
}
|
|
3153
3153
|
function ls(e) {
|
|
@@ -3163,27 +3163,27 @@ function bs(e) {
|
|
|
3163
3163
|
}
|
|
3164
3164
|
function So(e) {
|
|
3165
3165
|
let t = !1, n = 0, s = !1, r, i, o;
|
|
3166
|
-
const c = new Promise((y,
|
|
3167
|
-
i = y, o =
|
|
3166
|
+
const c = new Promise((y, x) => {
|
|
3167
|
+
i = y, o = x;
|
|
3168
3168
|
}), l = (y) => {
|
|
3169
|
-
var
|
|
3170
|
-
s || (g(new wo(y)), (
|
|
3169
|
+
var x;
|
|
3170
|
+
s || (g(new wo(y)), (x = e.abort) == null || x.call(e));
|
|
3171
3171
|
}, u = () => {
|
|
3172
3172
|
t = !0;
|
|
3173
3173
|
}, f = () => {
|
|
3174
3174
|
t = !1;
|
|
3175
3175
|
}, p = () => !Hn.isFocused() || e.networkMode !== "always" && !Jn.isOnline(), P = (y) => {
|
|
3176
|
-
var
|
|
3177
|
-
s || (s = !0, (
|
|
3176
|
+
var x;
|
|
3177
|
+
s || (s = !0, (x = e.onSuccess) == null || x.call(e, y), r == null || r(), i(y));
|
|
3178
3178
|
}, g = (y) => {
|
|
3179
|
-
var
|
|
3180
|
-
s || (s = !0, (
|
|
3179
|
+
var x;
|
|
3180
|
+
s || (s = !0, (x = e.onError) == null || x.call(e, y), r == null || r(), o(y));
|
|
3181
3181
|
}, O = () => new Promise((y) => {
|
|
3182
|
-
var
|
|
3182
|
+
var x;
|
|
3183
3183
|
r = (I) => {
|
|
3184
3184
|
const B = s || !p();
|
|
3185
3185
|
return B && y(I), B;
|
|
3186
|
-
}, (
|
|
3186
|
+
}, (x = e.onPause) == null || x.call(e);
|
|
3187
3187
|
}).then(() => {
|
|
3188
3188
|
var y;
|
|
3189
3189
|
r = void 0, s || (y = e.onContinue) == null || y.call(e);
|
|
@@ -3193,23 +3193,23 @@ function So(e) {
|
|
|
3193
3193
|
let y;
|
|
3194
3194
|
try {
|
|
3195
3195
|
y = e.fn();
|
|
3196
|
-
} catch (
|
|
3197
|
-
y = Promise.reject(
|
|
3196
|
+
} catch (x) {
|
|
3197
|
+
y = Promise.reject(x);
|
|
3198
3198
|
}
|
|
3199
|
-
Promise.resolve(y).then(P).catch((
|
|
3199
|
+
Promise.resolve(y).then(P).catch((x) => {
|
|
3200
3200
|
var F;
|
|
3201
3201
|
if (s)
|
|
3202
3202
|
return;
|
|
3203
|
-
const I = e.retry ?? (Xt ? 0 : 3), B = e.retryDelay ??
|
|
3204
|
-
if (t || !
|
|
3205
|
-
g(
|
|
3203
|
+
const I = e.retry ?? (Xt ? 0 : 3), B = e.retryDelay ?? Al, b = typeof B == "function" ? B(n, x) : B, A = I === !0 || typeof I == "number" && n < I || typeof I == "function" && I(n, x);
|
|
3204
|
+
if (t || !A) {
|
|
3205
|
+
g(x);
|
|
3206
3206
|
return;
|
|
3207
3207
|
}
|
|
3208
|
-
n++, (F = e.onFail) == null || F.call(e, n,
|
|
3208
|
+
n++, (F = e.onFail) == null || F.call(e, n, x), bo(b).then(() => {
|
|
3209
3209
|
if (p())
|
|
3210
3210
|
return O();
|
|
3211
3211
|
}).then(() => {
|
|
3212
|
-
t ? g(
|
|
3212
|
+
t ? g(x) : C();
|
|
3213
3213
|
});
|
|
3214
3214
|
});
|
|
3215
3215
|
};
|
|
@@ -3221,7 +3221,7 @@ function So(e) {
|
|
|
3221
3221
|
continueRetry: f
|
|
3222
3222
|
};
|
|
3223
3223
|
}
|
|
3224
|
-
function
|
|
3224
|
+
function kl() {
|
|
3225
3225
|
let e = [], t = 0, n = (f) => {
|
|
3226
3226
|
f();
|
|
3227
3227
|
}, s = (f) => {
|
|
@@ -3266,7 +3266,7 @@ function xl() {
|
|
|
3266
3266
|
}
|
|
3267
3267
|
};
|
|
3268
3268
|
}
|
|
3269
|
-
var ie =
|
|
3269
|
+
var ie = kl(), ut, ri, Po = (ri = class {
|
|
3270
3270
|
constructor() {
|
|
3271
3271
|
R(this, ut, void 0);
|
|
3272
3272
|
}
|
|
@@ -3274,7 +3274,7 @@ var ie = xl(), ut, ri, Po = (ri = class {
|
|
|
3274
3274
|
this.clearGcTimeout();
|
|
3275
3275
|
}
|
|
3276
3276
|
scheduleGc() {
|
|
3277
|
-
this.clearGcTimeout(), Cs(this.gcTime) &&
|
|
3277
|
+
this.clearGcTimeout(), Cs(this.gcTime) && k(this, ut, setTimeout(() => {
|
|
3278
3278
|
this.optionalRemove();
|
|
3279
3279
|
}, this.gcTime));
|
|
3280
3280
|
}
|
|
@@ -3285,13 +3285,13 @@ var ie = xl(), ut, ri, Po = (ri = class {
|
|
|
3285
3285
|
);
|
|
3286
3286
|
}
|
|
3287
3287
|
clearGcTimeout() {
|
|
3288
|
-
a(this, ut) && (clearTimeout(a(this, ut)),
|
|
3288
|
+
a(this, ut) && (clearTimeout(a(this, ut)), k(this, ut, void 0));
|
|
3289
3289
|
}
|
|
3290
|
-
}, ut = new WeakMap(), ri), Lt, Nt, ye, Je, ve, oe, mn, lt, Tt, Qn,
|
|
3290
|
+
}, ut = new WeakMap(), ri), Lt, Nt, ye, Je, ve, oe, mn, lt, Tt, Qn, xe, Ne, ii, xl = (ii = class extends Po {
|
|
3291
3291
|
constructor(t) {
|
|
3292
3292
|
super();
|
|
3293
3293
|
R(this, Tt);
|
|
3294
|
-
R(this,
|
|
3294
|
+
R(this, xe);
|
|
3295
3295
|
R(this, Lt, void 0);
|
|
3296
3296
|
R(this, Nt, void 0);
|
|
3297
3297
|
R(this, ye, void 0);
|
|
@@ -3300,7 +3300,7 @@ var ie = xl(), ut, ri, Po = (ri = class {
|
|
|
3300
3300
|
R(this, oe, void 0);
|
|
3301
3301
|
R(this, mn, void 0);
|
|
3302
3302
|
R(this, lt, void 0);
|
|
3303
|
-
|
|
3303
|
+
k(this, lt, !1), k(this, mn, t.defaultOptions), Q(this, Tt, Qn).call(this, t.options), k(this, oe, []), k(this, ye, t.cache), this.queryKey = t.queryKey, this.queryHash = t.queryHash, k(this, Lt, t.state || El(this.options)), this.state = a(this, Lt), this.scheduleGc();
|
|
3304
3304
|
}
|
|
3305
3305
|
get meta() {
|
|
3306
3306
|
return this.options.meta;
|
|
@@ -3310,7 +3310,7 @@ var ie = xl(), ut, ri, Po = (ri = class {
|
|
|
3310
3310
|
}
|
|
3311
3311
|
setData(t, n) {
|
|
3312
3312
|
const s = js(this.state.data, t, this.options);
|
|
3313
|
-
return Q(this,
|
|
3313
|
+
return Q(this, xe, Ne).call(this, {
|
|
3314
3314
|
data: s,
|
|
3315
3315
|
type: "success",
|
|
3316
3316
|
dataUpdatedAt: n == null ? void 0 : n.updatedAt,
|
|
@@ -3318,7 +3318,7 @@ var ie = xl(), ut, ri, Po = (ri = class {
|
|
|
3318
3318
|
}), s;
|
|
3319
3319
|
}
|
|
3320
3320
|
setState(t, n) {
|
|
3321
|
-
Q(this,
|
|
3321
|
+
Q(this, xe, Ne).call(this, { type: "setState", state: t, setStateOptions: n });
|
|
3322
3322
|
}
|
|
3323
3323
|
cancel(t) {
|
|
3324
3324
|
var s;
|
|
@@ -3359,13 +3359,13 @@ var ie = xl(), ut, ri, Po = (ri = class {
|
|
|
3359
3359
|
a(this, oe).includes(t) || (a(this, oe).push(t), this.clearGcTimeout(), a(this, ye).notify({ type: "observerAdded", query: this, observer: t }));
|
|
3360
3360
|
}
|
|
3361
3361
|
removeObserver(t) {
|
|
3362
|
-
a(this, oe).includes(t) && (
|
|
3362
|
+
a(this, oe).includes(t) && (k(this, oe, a(this, oe).filter((n) => n !== t)), a(this, oe).length || (a(this, ve) && (a(this, lt) ? a(this, ve).cancel({ revert: !0 }) : a(this, ve).cancelRetry()), this.scheduleGc()), a(this, ye).notify({ type: "observerRemoved", query: this, observer: t }));
|
|
3363
3363
|
}
|
|
3364
3364
|
getObserversCount() {
|
|
3365
3365
|
return a(this, oe).length;
|
|
3366
3366
|
}
|
|
3367
3367
|
invalidate() {
|
|
3368
|
-
this.state.isInvalidated || Q(this,
|
|
3368
|
+
this.state.isInvalidated || Q(this, xe, Ne).call(this, { type: "invalidate" });
|
|
3369
3369
|
}
|
|
3370
3370
|
fetch(t, n) {
|
|
3371
3371
|
var u, f, p, P;
|
|
@@ -3388,11 +3388,11 @@ var ie = xl(), ut, ri, Po = (ri = class {
|
|
|
3388
3388
|
}, i = (g) => {
|
|
3389
3389
|
Object.defineProperty(g, "signal", {
|
|
3390
3390
|
enumerable: !0,
|
|
3391
|
-
get: () => (
|
|
3391
|
+
get: () => (k(this, lt, !0), s.signal)
|
|
3392
3392
|
});
|
|
3393
3393
|
};
|
|
3394
3394
|
i(r);
|
|
3395
|
-
const o = () => this.options.queryFn ? (
|
|
3395
|
+
const o = () => this.options.queryFn ? (k(this, lt, !1), this.options.persister ? this.options.persister(
|
|
3396
3396
|
this.options.queryFn,
|
|
3397
3397
|
r,
|
|
3398
3398
|
this
|
|
@@ -3410,35 +3410,35 @@ var ie = xl(), ut, ri, Po = (ri = class {
|
|
|
3410
3410
|
i(c), (f = this.options.behavior) == null || f.onFetch(
|
|
3411
3411
|
c,
|
|
3412
3412
|
this
|
|
3413
|
-
),
|
|
3413
|
+
), k(this, Nt, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((p = c.fetchOptions) == null ? void 0 : p.meta)) && Q(this, xe, Ne).call(this, { type: "fetch", meta: (P = c.fetchOptions) == null ? void 0 : P.meta });
|
|
3414
3414
|
const l = (g) => {
|
|
3415
|
-
var O, C, y,
|
|
3416
|
-
bs(g) && g.silent || Q(this,
|
|
3415
|
+
var O, C, y, x;
|
|
3416
|
+
bs(g) && g.silent || Q(this, xe, Ne).call(this, {
|
|
3417
3417
|
type: "error",
|
|
3418
3418
|
error: g
|
|
3419
3419
|
}), bs(g) || ((C = (O = a(this, ye).config).onError) == null || C.call(
|
|
3420
3420
|
O,
|
|
3421
3421
|
g,
|
|
3422
3422
|
this
|
|
3423
|
-
), (
|
|
3423
|
+
), (x = (y = a(this, ye).config).onSettled) == null || x.call(
|
|
3424
3424
|
y,
|
|
3425
3425
|
this.state.data,
|
|
3426
3426
|
g,
|
|
3427
3427
|
this
|
|
3428
3428
|
)), this.isFetchingOptimistic || this.scheduleGc(), this.isFetchingOptimistic = !1;
|
|
3429
3429
|
};
|
|
3430
|
-
return
|
|
3430
|
+
return k(this, ve, So({
|
|
3431
3431
|
fn: c.fetchFn,
|
|
3432
3432
|
abort: s.abort.bind(s),
|
|
3433
3433
|
onSuccess: (g) => {
|
|
3434
|
-
var O, C, y,
|
|
3434
|
+
var O, C, y, x;
|
|
3435
3435
|
if (typeof g > "u") {
|
|
3436
3436
|
process.env.NODE_ENV !== "production" && console.error(
|
|
3437
3437
|
`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
|
|
3438
3438
|
), l(new Error(`${this.queryHash} data is undefined`));
|
|
3439
3439
|
return;
|
|
3440
3440
|
}
|
|
3441
|
-
this.setData(g), (C = (O = a(this, ye).config).onSuccess) == null || C.call(O, g, this), (
|
|
3441
|
+
this.setData(g), (C = (O = a(this, ye).config).onSuccess) == null || C.call(O, g, this), (x = (y = a(this, ye).config).onSettled) == null || x.call(
|
|
3442
3442
|
y,
|
|
3443
3443
|
g,
|
|
3444
3444
|
this.state.error,
|
|
@@ -3447,22 +3447,22 @@ var ie = xl(), ut, ri, Po = (ri = class {
|
|
|
3447
3447
|
},
|
|
3448
3448
|
onError: l,
|
|
3449
3449
|
onFail: (g, O) => {
|
|
3450
|
-
Q(this,
|
|
3450
|
+
Q(this, xe, Ne).call(this, { type: "failed", failureCount: g, error: O });
|
|
3451
3451
|
},
|
|
3452
3452
|
onPause: () => {
|
|
3453
|
-
Q(this,
|
|
3453
|
+
Q(this, xe, Ne).call(this, { type: "pause" });
|
|
3454
3454
|
},
|
|
3455
3455
|
onContinue: () => {
|
|
3456
|
-
Q(this,
|
|
3456
|
+
Q(this, xe, Ne).call(this, { type: "continue" });
|
|
3457
3457
|
},
|
|
3458
3458
|
retry: c.options.retry,
|
|
3459
3459
|
retryDelay: c.options.retryDelay,
|
|
3460
3460
|
networkMode: c.options.networkMode
|
|
3461
|
-
})),
|
|
3461
|
+
})), k(this, Je, a(this, ve).promise), a(this, Je);
|
|
3462
3462
|
}
|
|
3463
3463
|
}, Lt = new WeakMap(), Nt = new WeakMap(), ye = new WeakMap(), Je = new WeakMap(), ve = new WeakMap(), oe = new WeakMap(), mn = new WeakMap(), lt = new WeakMap(), Tt = new WeakSet(), Qn = function(t) {
|
|
3464
3464
|
this.options = { ...a(this, mn), ...t }, this.updateGcTime(this.options.gcTime);
|
|
3465
|
-
},
|
|
3465
|
+
}, xe = new WeakSet(), Ne = function(t) {
|
|
3466
3466
|
const n = (s) => {
|
|
3467
3467
|
switch (t.type) {
|
|
3468
3468
|
case "failed":
|
|
@@ -3559,12 +3559,12 @@ var Ie, oi, Ol = (oi = class extends tn {
|
|
|
3559
3559
|
constructor(t = {}) {
|
|
3560
3560
|
super();
|
|
3561
3561
|
R(this, Ie, void 0);
|
|
3562
|
-
this.config = t,
|
|
3562
|
+
this.config = t, k(this, Ie, /* @__PURE__ */ new Map());
|
|
3563
3563
|
}
|
|
3564
3564
|
build(t, n, s) {
|
|
3565
3565
|
const r = n.queryKey, i = n.queryHash ?? sr(r, n);
|
|
3566
3566
|
let o = this.get(i);
|
|
3567
|
-
return o || (o = new
|
|
3567
|
+
return o || (o = new xl({
|
|
3568
3568
|
cache: this,
|
|
3569
3569
|
queryKey: r,
|
|
3570
3570
|
queryHash: i,
|
|
@@ -3635,7 +3635,7 @@ var Ie, oi, Ol = (oi = class extends tn {
|
|
|
3635
3635
|
R(this, gn, void 0);
|
|
3636
3636
|
R(this, me, void 0);
|
|
3637
3637
|
R(this, Ft, void 0);
|
|
3638
|
-
this.mutationId = t.mutationId,
|
|
3638
|
+
this.mutationId = t.mutationId, k(this, gn, t.defaultOptions), k(this, me, t.mutationCache), k(this, je, []), this.state = t.state || Ao(), this.setOptions(t.options), this.scheduleGc();
|
|
3639
3639
|
}
|
|
3640
3640
|
setOptions(t) {
|
|
3641
3641
|
this.options = { ...a(this, gn), ...t }, this.updateGcTime(this.options.gcTime);
|
|
@@ -3651,7 +3651,7 @@ var Ie, oi, Ol = (oi = class extends tn {
|
|
|
3651
3651
|
}));
|
|
3652
3652
|
}
|
|
3653
3653
|
removeObserver(t) {
|
|
3654
|
-
|
|
3654
|
+
k(this, je, a(this, je).filter((n) => n !== t)), this.scheduleGc(), a(this, me).notify({
|
|
3655
3655
|
type: "observerRemoved",
|
|
3656
3656
|
mutation: this,
|
|
3657
3657
|
observer: t
|
|
@@ -3666,8 +3666,8 @@ var Ie, oi, Ol = (oi = class extends tn {
|
|
|
3666
3666
|
this.execute(this.state.variables);
|
|
3667
3667
|
}
|
|
3668
3668
|
async execute(t) {
|
|
3669
|
-
var r, i, o, c, l, u, f, p, P, g, O, C, y,
|
|
3670
|
-
const n = () => (
|
|
3669
|
+
var r, i, o, c, l, u, f, p, P, g, O, C, y, x, I, B, b, A, F, T;
|
|
3670
|
+
const n = () => (k(this, Ft, So({
|
|
3671
3671
|
fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
|
|
3672
3672
|
onFail: (M, m) => {
|
|
3673
3673
|
Q(this, Be, Ve).call(this, { type: "failed", failureCount: M, error: m });
|
|
@@ -3713,7 +3713,7 @@ var Ie, oi, Ol = (oi = class extends tn {
|
|
|
3713
3713
|
)), await ((C = (O = this.options).onSettled) == null ? void 0 : C.call(O, M, null, t, this.state.context)), Q(this, Be, Ve).call(this, { type: "success", data: M }), M;
|
|
3714
3714
|
} catch (M) {
|
|
3715
3715
|
try {
|
|
3716
|
-
throw await ((
|
|
3716
|
+
throw await ((x = (y = a(this, me).config).onError) == null ? void 0 : x.call(
|
|
3717
3717
|
y,
|
|
3718
3718
|
M,
|
|
3719
3719
|
t,
|
|
@@ -3724,7 +3724,7 @@ var Ie, oi, Ol = (oi = class extends tn {
|
|
|
3724
3724
|
M,
|
|
3725
3725
|
t,
|
|
3726
3726
|
this.state.context
|
|
3727
|
-
)), await ((
|
|
3727
|
+
)), await ((A = (b = a(this, me).config).onSettled) == null ? void 0 : A.call(
|
|
3728
3728
|
b,
|
|
3729
3729
|
void 0,
|
|
3730
3730
|
M,
|
|
@@ -3807,7 +3807,7 @@ var Ie, oi, Ol = (oi = class extends tn {
|
|
|
3807
3807
|
});
|
|
3808
3808
|
});
|
|
3809
3809
|
}, ai);
|
|
3810
|
-
function
|
|
3810
|
+
function Ao() {
|
|
3811
3811
|
return {
|
|
3812
3812
|
context: void 0,
|
|
3813
3813
|
data: void 0,
|
|
@@ -3826,7 +3826,7 @@ var be, yn, dt, ci, Cl = (ci = class extends tn {
|
|
|
3826
3826
|
R(this, be, void 0);
|
|
3827
3827
|
R(this, yn, void 0);
|
|
3828
3828
|
R(this, dt, void 0);
|
|
3829
|
-
this.config = t,
|
|
3829
|
+
this.config = t, k(this, be, []), k(this, yn, 0);
|
|
3830
3830
|
}
|
|
3831
3831
|
build(t, n, s) {
|
|
3832
3832
|
const r = new _l({
|
|
@@ -3841,7 +3841,7 @@ var be, yn, dt, ci, Cl = (ci = class extends tn {
|
|
|
3841
3841
|
a(this, be).push(t), this.notify({ type: "added", mutation: t });
|
|
3842
3842
|
}
|
|
3843
3843
|
remove(t) {
|
|
3844
|
-
|
|
3844
|
+
k(this, be, a(this, be).filter((n) => n !== t)), this.notify({ type: "removed", mutation: t });
|
|
3845
3845
|
}
|
|
3846
3846
|
clear() {
|
|
3847
3847
|
ie.batch(() => {
|
|
@@ -3872,7 +3872,7 @@ var be, yn, dt, ci, Cl = (ci = class extends tn {
|
|
|
3872
3872
|
});
|
|
3873
3873
|
}
|
|
3874
3874
|
resumePausedMutations() {
|
|
3875
|
-
return
|
|
3875
|
+
return k(this, dt, (a(this, dt) ?? Promise.resolve()).then(() => {
|
|
3876
3876
|
const t = a(this, be).filter((n) => n.state.isPaused);
|
|
3877
3877
|
return ie.batch(
|
|
3878
3878
|
() => t.reduce(
|
|
@@ -3881,7 +3881,7 @@ var be, yn, dt, ci, Cl = (ci = class extends tn {
|
|
|
3881
3881
|
)
|
|
3882
3882
|
);
|
|
3883
3883
|
}).then(() => {
|
|
3884
|
-
|
|
3884
|
+
k(this, dt, void 0);
|
|
3885
3885
|
})), a(this, dt);
|
|
3886
3886
|
}
|
|
3887
3887
|
}, be = new WeakMap(), yn = new WeakMap(), dt = new WeakMap(), ci);
|
|
@@ -3889,8 +3889,8 @@ function Il(e) {
|
|
|
3889
3889
|
return {
|
|
3890
3890
|
onFetch: (t, n) => {
|
|
3891
3891
|
const s = async () => {
|
|
3892
|
-
var O, C, y,
|
|
3893
|
-
const r = t.options, i = (y = (C = (O = t.fetchOptions) == null ? void 0 : O.meta) == null ? void 0 : C.fetchMore) == null ? void 0 : y.direction, o = ((
|
|
3892
|
+
var O, C, y, x, I;
|
|
3893
|
+
const r = t.options, i = (y = (C = (O = t.fetchOptions) == null ? void 0 : O.meta) == null ? void 0 : C.fetchMore) == null ? void 0 : y.direction, o = ((x = t.state.data) == null ? void 0 : x.pages) || [], c = ((I = t.state.data) == null ? void 0 : I.pageParams) || [], l = { pages: [], pageParams: [] };
|
|
3894
3894
|
let u = !1;
|
|
3895
3895
|
const f = (B) => {
|
|
3896
3896
|
Object.defineProperty(B, "signal", {
|
|
@@ -3901,7 +3901,7 @@ function Il(e) {
|
|
|
3901
3901
|
});
|
|
3902
3902
|
}, p = t.options.queryFn || (() => Promise.reject(
|
|
3903
3903
|
new Error(`Missing queryFn: '${t.options.queryHash}'`)
|
|
3904
|
-
)), P = async (B, b,
|
|
3904
|
+
)), P = async (B, b, A) => {
|
|
3905
3905
|
if (u)
|
|
3906
3906
|
return Promise.reject();
|
|
3907
3907
|
if (b == null && B.pages.length)
|
|
@@ -3909,13 +3909,13 @@ function Il(e) {
|
|
|
3909
3909
|
const F = {
|
|
3910
3910
|
queryKey: t.queryKey,
|
|
3911
3911
|
pageParam: b,
|
|
3912
|
-
direction:
|
|
3912
|
+
direction: A ? "backward" : "forward",
|
|
3913
3913
|
meta: t.options.meta
|
|
3914
3914
|
};
|
|
3915
3915
|
f(F);
|
|
3916
3916
|
const T = await p(
|
|
3917
3917
|
F
|
|
3918
|
-
), { maxPages: M } = t.options, m =
|
|
3918
|
+
), { maxPages: M } = t.options, m = A ? wl : bl;
|
|
3919
3919
|
return {
|
|
3920
3920
|
pages: m(B.pages, T, M),
|
|
3921
3921
|
pageParams: m(B.pageParams, b, M)
|
|
@@ -3923,11 +3923,11 @@ function Il(e) {
|
|
|
3923
3923
|
};
|
|
3924
3924
|
let g;
|
|
3925
3925
|
if (i && o.length) {
|
|
3926
|
-
const B = i === "backward", b = B ? jl : Zr,
|
|
3926
|
+
const B = i === "backward", b = B ? jl : Zr, A = {
|
|
3927
3927
|
pages: o,
|
|
3928
3928
|
pageParams: c
|
|
3929
|
-
}, F = b(r,
|
|
3930
|
-
g = await P(
|
|
3929
|
+
}, F = b(r, A);
|
|
3930
|
+
g = await P(A, F, B);
|
|
3931
3931
|
} else {
|
|
3932
3932
|
g = await P(
|
|
3933
3933
|
l,
|
|
@@ -3935,8 +3935,8 @@ function Il(e) {
|
|
|
3935
3935
|
);
|
|
3936
3936
|
const B = e ?? o.length;
|
|
3937
3937
|
for (let b = 1; b < B; b++) {
|
|
3938
|
-
const
|
|
3939
|
-
g = await P(g,
|
|
3938
|
+
const A = Zr(r, g);
|
|
3939
|
+
g = await P(g, A);
|
|
3940
3940
|
}
|
|
3941
3941
|
}
|
|
3942
3942
|
return g;
|
|
@@ -3986,18 +3986,18 @@ var re, Ye, Xe, Ut, qt, Ze, $t, Qt, ui, Bl = (ui = class {
|
|
|
3986
3986
|
R(this, Ze, void 0);
|
|
3987
3987
|
R(this, $t, void 0);
|
|
3988
3988
|
R(this, Qt, void 0);
|
|
3989
|
-
|
|
3989
|
+
k(this, re, e.queryCache || new Ol()), k(this, Ye, e.mutationCache || new Cl()), k(this, Xe, e.defaultOptions || {}), k(this, Ut, /* @__PURE__ */ new Map()), k(this, qt, /* @__PURE__ */ new Map()), k(this, Ze, 0);
|
|
3990
3990
|
}
|
|
3991
3991
|
mount() {
|
|
3992
|
-
Bn(this, Ze)._++, a(this, Ze) === 1 && (
|
|
3992
|
+
Bn(this, Ze)._++, a(this, Ze) === 1 && (k(this, $t, Hn.subscribe(() => {
|
|
3993
3993
|
Hn.isFocused() && (this.resumePausedMutations(), a(this, re).onFocus());
|
|
3994
|
-
})),
|
|
3994
|
+
})), k(this, Qt, Jn.subscribe(() => {
|
|
3995
3995
|
Jn.isOnline() && (this.resumePausedMutations(), a(this, re).onOnline());
|
|
3996
3996
|
})));
|
|
3997
3997
|
}
|
|
3998
3998
|
unmount() {
|
|
3999
3999
|
var e, t;
|
|
4000
|
-
Bn(this, Ze)._--, a(this, Ze) === 0 && ((e = a(this, $t)) == null || e.call(this),
|
|
4000
|
+
Bn(this, Ze)._--, a(this, Ze) === 0 && ((e = a(this, $t)) == null || e.call(this), k(this, $t, void 0), (t = a(this, Qt)) == null || t.call(this), k(this, Qt, void 0));
|
|
4001
4001
|
}
|
|
4002
4002
|
isFetching(e) {
|
|
4003
4003
|
return a(this, re).findAll({ ...e, fetchStatus: "fetching" }).length;
|
|
@@ -4114,7 +4114,7 @@ var re, Ye, Xe, Ut, qt, Ze, $t, Qt, ui, Bl = (ui = class {
|
|
|
4114
4114
|
return a(this, Xe);
|
|
4115
4115
|
}
|
|
4116
4116
|
setDefaultOptions(e) {
|
|
4117
|
-
|
|
4117
|
+
k(this, Xe, e);
|
|
4118
4118
|
}
|
|
4119
4119
|
setQueryDefaults(e, t) {
|
|
4120
4120
|
a(this, Ut).set(hn(e), {
|
|
@@ -4167,7 +4167,7 @@ var re, Ye, Xe, Ut, qt, Ze, $t, Qt, ui, Bl = (ui = class {
|
|
|
4167
4167
|
clear() {
|
|
4168
4168
|
a(this, re).clear(), a(this, Ye).clear();
|
|
4169
4169
|
}
|
|
4170
|
-
}, re = new WeakMap(), Ye = new WeakMap(), Xe = new WeakMap(), Ut = new WeakMap(), qt = new WeakMap(), Ze = new WeakMap(), $t = new WeakMap(), Qt = new WeakMap(), ui), fe, Z, Vt, ue, ft, Kt, Re, vn, zt, Gt, ht, pt, et, mt, gt, on, bn, Bs, wn, Rs, Sn, Ds, Pn, Ms,
|
|
4170
|
+
}, re = new WeakMap(), Ye = new WeakMap(), Xe = new WeakMap(), Ut = new WeakMap(), qt = new WeakMap(), Ze = new WeakMap(), $t = new WeakMap(), Qt = new WeakMap(), ui), fe, Z, Vt, ue, ft, Kt, Re, vn, zt, Gt, ht, pt, et, mt, gt, on, bn, Bs, wn, Rs, Sn, Ds, Pn, Ms, An, Ls, kn, Ns, xn, Ts, Yn, ko, li, Rl = (li = class extends tn {
|
|
4171
4171
|
constructor(t, n) {
|
|
4172
4172
|
super();
|
|
4173
4173
|
R(this, gt);
|
|
@@ -4175,9 +4175,9 @@ var re, Ye, Xe, Ut, qt, Ze, $t, Qt, ui, Bl = (ui = class {
|
|
|
4175
4175
|
R(this, wn);
|
|
4176
4176
|
R(this, Sn);
|
|
4177
4177
|
R(this, Pn);
|
|
4178
|
+
R(this, An);
|
|
4178
4179
|
R(this, kn);
|
|
4179
4180
|
R(this, xn);
|
|
4180
|
-
R(this, An);
|
|
4181
4181
|
R(this, Yn);
|
|
4182
4182
|
R(this, fe, void 0);
|
|
4183
4183
|
R(this, Z, void 0);
|
|
@@ -4195,7 +4195,7 @@ var re, Ye, Xe, Ut, qt, Ze, $t, Qt, ui, Bl = (ui = class {
|
|
|
4195
4195
|
R(this, pt, void 0);
|
|
4196
4196
|
R(this, et, void 0);
|
|
4197
4197
|
R(this, mt, void 0);
|
|
4198
|
-
|
|
4198
|
+
k(this, Z, void 0), k(this, Vt, void 0), k(this, ue, void 0), k(this, mt, /* @__PURE__ */ new Set()), k(this, fe, t), this.options = n, k(this, Re, null), this.bindMethods(), this.setOptions(n);
|
|
4199
4199
|
}
|
|
4200
4200
|
bindMethods() {
|
|
4201
4201
|
this.refetch = this.refetch.bind(this);
|
|
@@ -4221,7 +4221,7 @@ var re, Ye, Xe, Ut, qt, Ze, $t, Qt, ui, Bl = (ui = class {
|
|
|
4221
4221
|
);
|
|
4222
4222
|
}
|
|
4223
4223
|
destroy() {
|
|
4224
|
-
this.listeners = /* @__PURE__ */ new Set(), Q(this,
|
|
4224
|
+
this.listeners = /* @__PURE__ */ new Set(), Q(this, An, Ls).call(this), Q(this, kn, Ns).call(this), a(this, Z).removeObserver(this);
|
|
4225
4225
|
}
|
|
4226
4226
|
setOptions(t, n) {
|
|
4227
4227
|
const s = this.options, r = a(this, Z);
|
|
@@ -4231,7 +4231,7 @@ var re, Ye, Xe, Ut, qt, Ze, $t, Qt, ui, Bl = (ui = class {
|
|
|
4231
4231
|
observer: this
|
|
4232
4232
|
}), typeof this.options.enabled < "u" && typeof this.options.enabled != "boolean")
|
|
4233
4233
|
throw new Error("Expected enabled to be a boolean");
|
|
4234
|
-
this.options.queryKey || (this.options.queryKey = s.queryKey), Q(this,
|
|
4234
|
+
this.options.queryKey || (this.options.queryKey = s.queryKey), Q(this, xn, Ts).call(this);
|
|
4235
4235
|
const i = this.hasListeners();
|
|
4236
4236
|
i && ti(
|
|
4237
4237
|
a(this, Z),
|
|
@@ -4244,7 +4244,7 @@ var re, Ye, Xe, Ut, qt, Ze, $t, Qt, ui, Bl = (ui = class {
|
|
|
4244
4244
|
}
|
|
4245
4245
|
getOptimisticResult(t) {
|
|
4246
4246
|
const n = a(this, fe).getQueryCache().build(a(this, fe), t), s = this.createResult(n, t);
|
|
4247
|
-
return Ml(this, s) && (
|
|
4247
|
+
return Ml(this, s) && (k(this, ue, s), k(this, Kt, this.options), k(this, ft, a(this, Z).state)), s;
|
|
4248
4248
|
}
|
|
4249
4249
|
getCurrentResult() {
|
|
4250
4250
|
return a(this, ue);
|
|
@@ -4290,9 +4290,9 @@ var re, Ye, Xe, Ut, qt, Ze, $t, Qt, ui, Bl = (ui = class {
|
|
|
4290
4290
|
y = a(this, zt);
|
|
4291
4291
|
else
|
|
4292
4292
|
try {
|
|
4293
|
-
|
|
4293
|
+
k(this, vn, n.select), y = n.select(f.data), y = js(i == null ? void 0 : i.data, y, n), k(this, zt, y), k(this, Re, null);
|
|
4294
4294
|
} catch (T) {
|
|
4295
|
-
|
|
4295
|
+
k(this, Re, T);
|
|
4296
4296
|
}
|
|
4297
4297
|
else
|
|
4298
4298
|
y = f.data;
|
|
@@ -4305,9 +4305,9 @@ var re, Ye, Xe, Ut, qt, Ze, $t, Qt, ui, Bl = (ui = class {
|
|
|
4305
4305
|
a(this, Gt)
|
|
4306
4306
|
) : n.placeholderData, n.select && typeof T < "u")
|
|
4307
4307
|
try {
|
|
4308
|
-
T = n.select(T),
|
|
4308
|
+
T = n.select(T), k(this, Re, null);
|
|
4309
4309
|
} catch (M) {
|
|
4310
|
-
|
|
4310
|
+
k(this, Re, M);
|
|
4311
4311
|
}
|
|
4312
4312
|
typeof T < "u" && (O = "success", y = js(
|
|
4313
4313
|
i == null ? void 0 : i.data,
|
|
@@ -4316,7 +4316,7 @@ var re, Ye, Xe, Ut, qt, Ze, $t, Qt, ui, Bl = (ui = class {
|
|
|
4316
4316
|
), C = !0);
|
|
4317
4317
|
}
|
|
4318
4318
|
a(this, Re) && (p = a(this, Re), y = a(this, zt), P = Date.now(), O = "error");
|
|
4319
|
-
const
|
|
4319
|
+
const x = g === "fetching", I = O === "pending", B = O === "error", b = I && x;
|
|
4320
4320
|
return {
|
|
4321
4321
|
status: O,
|
|
4322
4322
|
fetchStatus: g,
|
|
@@ -4334,8 +4334,8 @@ var re, Ye, Xe, Ut, qt, Ze, $t, Qt, ui, Bl = (ui = class {
|
|
|
4334
4334
|
errorUpdateCount: f.errorUpdateCount,
|
|
4335
4335
|
isFetched: f.dataUpdateCount > 0 || f.errorUpdateCount > 0,
|
|
4336
4336
|
isFetchedAfterMount: f.dataUpdateCount > u.dataUpdateCount || f.errorUpdateCount > u.errorUpdateCount,
|
|
4337
|
-
isFetching:
|
|
4338
|
-
isRefetching:
|
|
4337
|
+
isFetching: x,
|
|
4338
|
+
isRefetching: x && !I,
|
|
4339
4339
|
isLoadingError: B && f.dataUpdatedAt === 0,
|
|
4340
4340
|
isPaused: g === "paused",
|
|
4341
4341
|
isPlaceholderData: C,
|
|
@@ -4346,9 +4346,9 @@ var re, Ye, Xe, Ut, qt, Ze, $t, Qt, ui, Bl = (ui = class {
|
|
|
4346
4346
|
}
|
|
4347
4347
|
updateResult(t) {
|
|
4348
4348
|
const n = a(this, ue), s = this.createResult(a(this, Z), this.options);
|
|
4349
|
-
if (
|
|
4349
|
+
if (k(this, ft, a(this, Z).state), k(this, Kt, this.options), a(this, ft).data !== void 0 && k(this, Gt, a(this, Z)), Wn(s, n))
|
|
4350
4350
|
return;
|
|
4351
|
-
|
|
4351
|
+
k(this, ue, s);
|
|
4352
4352
|
const r = {}, i = () => {
|
|
4353
4353
|
if (!n)
|
|
4354
4354
|
return !0;
|
|
@@ -4363,47 +4363,47 @@ var re, Ye, Xe, Ut, qt, Ze, $t, Qt, ui, Bl = (ui = class {
|
|
|
4363
4363
|
return a(this, ue)[f] !== n[f] && l.has(f);
|
|
4364
4364
|
});
|
|
4365
4365
|
};
|
|
4366
|
-
(t == null ? void 0 : t.listeners) !== !1 && i() && (r.listeners = !0), Q(this, Yn,
|
|
4366
|
+
(t == null ? void 0 : t.listeners) !== !1 && i() && (r.listeners = !0), Q(this, Yn, ko).call(this, { ...r, ...t });
|
|
4367
4367
|
}
|
|
4368
4368
|
onQueryUpdate() {
|
|
4369
4369
|
this.updateResult(), this.hasListeners() && Q(this, Pn, Ms).call(this);
|
|
4370
4370
|
}
|
|
4371
4371
|
}, fe = new WeakMap(), Z = new WeakMap(), Vt = new WeakMap(), ue = new WeakMap(), ft = new WeakMap(), Kt = new WeakMap(), Re = new WeakMap(), vn = new WeakMap(), zt = new WeakMap(), Gt = new WeakMap(), ht = new WeakMap(), pt = new WeakMap(), et = new WeakMap(), mt = new WeakMap(), gt = new WeakSet(), on = function(t) {
|
|
4372
|
-
Q(this,
|
|
4372
|
+
Q(this, xn, Ts).call(this);
|
|
4373
4373
|
let n = a(this, Z).fetch(
|
|
4374
4374
|
this.options,
|
|
4375
4375
|
t
|
|
4376
4376
|
);
|
|
4377
4377
|
return t != null && t.throwOnError || (n = n.catch(Se)), n;
|
|
4378
4378
|
}, bn = new WeakSet(), Bs = function() {
|
|
4379
|
-
if (Q(this,
|
|
4379
|
+
if (Q(this, An, Ls).call(this), Xt || a(this, ue).isStale || !Cs(this.options.staleTime))
|
|
4380
4380
|
return;
|
|
4381
4381
|
const n = yo(
|
|
4382
4382
|
a(this, ue).dataUpdatedAt,
|
|
4383
4383
|
this.options.staleTime
|
|
4384
4384
|
) + 1;
|
|
4385
|
-
|
|
4385
|
+
k(this, ht, setTimeout(() => {
|
|
4386
4386
|
a(this, ue).isStale || this.updateResult();
|
|
4387
4387
|
}, n));
|
|
4388
4388
|
}, wn = new WeakSet(), Rs = function() {
|
|
4389
4389
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(a(this, Z)) : this.options.refetchInterval) ?? !1;
|
|
4390
4390
|
}, Sn = new WeakSet(), Ds = function(t) {
|
|
4391
|
-
Q(this,
|
|
4391
|
+
Q(this, kn, Ns).call(this), k(this, et, t), !(Xt || this.options.enabled === !1 || !Cs(a(this, et)) || a(this, et) === 0) && k(this, pt, setInterval(() => {
|
|
4392
4392
|
(this.options.refetchIntervalInBackground || Hn.isFocused()) && Q(this, gt, on).call(this);
|
|
4393
4393
|
}, a(this, et)));
|
|
4394
4394
|
}, Pn = new WeakSet(), Ms = function() {
|
|
4395
4395
|
Q(this, bn, Bs).call(this), Q(this, Sn, Ds).call(this, Q(this, wn, Rs).call(this));
|
|
4396
|
-
},
|
|
4397
|
-
a(this, ht) && (clearTimeout(a(this, ht)),
|
|
4398
|
-
},
|
|
4399
|
-
a(this, pt) && (clearInterval(a(this, pt)),
|
|
4400
|
-
},
|
|
4396
|
+
}, An = new WeakSet(), Ls = function() {
|
|
4397
|
+
a(this, ht) && (clearTimeout(a(this, ht)), k(this, ht, void 0));
|
|
4398
|
+
}, kn = new WeakSet(), Ns = function() {
|
|
4399
|
+
a(this, pt) && (clearInterval(a(this, pt)), k(this, pt, void 0));
|
|
4400
|
+
}, xn = new WeakSet(), Ts = function() {
|
|
4401
4401
|
const t = a(this, fe).getQueryCache().build(a(this, fe), this.options);
|
|
4402
4402
|
if (t === a(this, Z))
|
|
4403
4403
|
return;
|
|
4404
4404
|
const n = a(this, Z);
|
|
4405
|
-
|
|
4406
|
-
}, Yn = new WeakSet(),
|
|
4405
|
+
k(this, Z, t), k(this, Vt, t.state), this.hasListeners() && (n == null || n.removeObserver(this), t.addObserver(this));
|
|
4406
|
+
}, Yn = new WeakSet(), ko = function(t) {
|
|
4407
4407
|
ie.batch(() => {
|
|
4408
4408
|
t.listeners && this.listeners.forEach((n) => {
|
|
4409
4409
|
n(a(this, ue));
|
|
@@ -4444,7 +4444,7 @@ var tt, le, we, Te, Wt, Vn, En, Us, di, Ll = (di = class extends tn {
|
|
|
4444
4444
|
R(this, le, void 0);
|
|
4445
4445
|
R(this, we, void 0);
|
|
4446
4446
|
R(this, Te, void 0);
|
|
4447
|
-
|
|
4447
|
+
k(this, le, void 0), k(this, tt, t), this.setOptions(n), this.bindMethods(), Q(this, Wt, Vn).call(this);
|
|
4448
4448
|
}
|
|
4449
4449
|
bindMethods() {
|
|
4450
4450
|
this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
|
|
@@ -4469,16 +4469,16 @@ var tt, le, we, Te, Wt, Vn, En, Us, di, Ll = (di = class extends tn {
|
|
|
4469
4469
|
return a(this, le);
|
|
4470
4470
|
}
|
|
4471
4471
|
reset() {
|
|
4472
|
-
|
|
4472
|
+
k(this, we, void 0), Q(this, Wt, Vn).call(this), Q(this, En, Us).call(this);
|
|
4473
4473
|
}
|
|
4474
4474
|
mutate(t, n) {
|
|
4475
4475
|
var s;
|
|
4476
|
-
return
|
|
4476
|
+
return k(this, Te, n), (s = a(this, we)) == null || s.removeObserver(this), k(this, we, a(this, tt).getMutationCache().build(a(this, tt), this.options)), a(this, we).addObserver(this), a(this, we).execute(t);
|
|
4477
4477
|
}
|
|
4478
4478
|
}, tt = new WeakMap(), le = new WeakMap(), we = new WeakMap(), Te = new WeakMap(), Wt = new WeakSet(), Vn = function() {
|
|
4479
4479
|
var n;
|
|
4480
|
-
const t = ((n = a(this, we)) == null ? void 0 : n.state) ??
|
|
4481
|
-
|
|
4480
|
+
const t = ((n = a(this, we)) == null ? void 0 : n.state) ?? Ao();
|
|
4481
|
+
k(this, le, {
|
|
4482
4482
|
...t,
|
|
4483
4483
|
isPending: t.status === "pending",
|
|
4484
4484
|
isSuccess: t.status === "success",
|
|
@@ -4516,10 +4516,10 @@ var tt, le, we, Te, Wt, Vn, En, Us, di, Ll = (di = class extends tn {
|
|
|
4516
4516
|
f(a(this, le));
|
|
4517
4517
|
});
|
|
4518
4518
|
});
|
|
4519
|
-
}, di),
|
|
4519
|
+
}, di), xo = ae.createContext(
|
|
4520
4520
|
void 0
|
|
4521
4521
|
), qe = (e) => {
|
|
4522
|
-
const t = ae.useContext(
|
|
4522
|
+
const t = ae.useContext(xo);
|
|
4523
4523
|
if (e)
|
|
4524
4524
|
return e;
|
|
4525
4525
|
if (!t)
|
|
@@ -4530,7 +4530,7 @@ var tt, le, we, Te, Wt, Vn, En, Us, di, Ll = (di = class extends tn {
|
|
|
4530
4530
|
children: t
|
|
4531
4531
|
}) => (ae.useEffect(() => (e.mount(), () => {
|
|
4532
4532
|
e.unmount();
|
|
4533
|
-
}), [e]), /* @__PURE__ */ ae.createElement(
|
|
4533
|
+
}), [e]), /* @__PURE__ */ ae.createElement(xo.Provider, { value: e }, t)), Eo = ae.createContext(!1), Tl = () => ae.useContext(Eo);
|
|
4534
4534
|
Eo.Provider;
|
|
4535
4535
|
function Fl() {
|
|
4536
4536
|
let e = !1;
|
|
@@ -4787,7 +4787,7 @@ const In = () => {
|
|
|
4787
4787
|
})).json()).url;
|
|
4788
4788
|
}
|
|
4789
4789
|
});
|
|
4790
|
-
}, rd = Pt(() => import("./PagesPanel-
|
|
4790
|
+
}, rd = Pt(() => import("./PagesPanel-86323919.js")), id = Pt(() => import("./ProjectPanel-9f645945.js")), od = Pt(() => import("./CurrentPage-3a189b02.js")), ad = () => /* @__PURE__ */ _.jsx("h2", { children: "Your Logo" }), cd = () => {
|
|
4791
4791
|
const e = qe();
|
|
4792
4792
|
return /* @__PURE__ */ _.jsx("div", { className: "border-gray-200 rounded-md p-2 mb-2 border", children: /* @__PURE__ */ _.jsx(
|
|
4793
4793
|
oa,
|
|
@@ -4810,8 +4810,8 @@ const In = () => {
|
|
|
4810
4810
|
[p]
|
|
4811
4811
|
), y = async (I = 20, B = 0) => {
|
|
4812
4812
|
const b = `limit=${I}&offset=${B}`;
|
|
4813
|
-
return await fetch(`${P}/assets?${b}`).then((
|
|
4814
|
-
}, { logo:
|
|
4813
|
+
return await fetch(`${P}/assets?${b}`).then((A) => A.json());
|
|
4814
|
+
}, { logo: x = ad } = e;
|
|
4815
4815
|
return n || !t ? /* @__PURE__ */ _.jsx(qs, {}) : r || !s ? /* @__PURE__ */ _.jsx(qs, {}) : /* @__PURE__ */ _.jsx("div", { className: "bg-background text-foreground", children: /* @__PURE__ */ _.jsx(
|
|
4816
4816
|
yl,
|
|
4817
4817
|
{
|
|
@@ -4825,7 +4825,7 @@ const In = () => {
|
|
|
4825
4825
|
o({ brandingOptions: I });
|
|
4826
4826
|
},
|
|
4827
4827
|
topBarComponents: {
|
|
4828
|
-
left: [
|
|
4828
|
+
left: [x],
|
|
4829
4829
|
center: [od],
|
|
4830
4830
|
right: [ud]
|
|
4831
4831
|
},
|
|
@@ -4840,7 +4840,8 @@ const In = () => {
|
|
|
4840
4840
|
fetchMediaCallback: y,
|
|
4841
4841
|
getUILibraryBlocks: O,
|
|
4842
4842
|
getExternalPredefinedBlock: C,
|
|
4843
|
-
getPages: () => s
|
|
4843
|
+
getPages: () => s,
|
|
4844
|
+
unsplashAccessKey: e.unsplashAccessKey || ""
|
|
4844
4845
|
}
|
|
4845
4846
|
) });
|
|
4846
4847
|
}, dd = () => {
|
|
@@ -4971,11 +4972,11 @@ export {
|
|
|
4971
4972
|
bf as U,
|
|
4972
4973
|
qd as V,
|
|
4973
4974
|
mf as W,
|
|
4974
|
-
|
|
4975
|
-
|
|
4975
|
+
kc as X,
|
|
4976
|
+
xc as Y,
|
|
4976
4977
|
wf as Z,
|
|
4977
4978
|
Xd as _,
|
|
4978
|
-
|
|
4979
|
+
Ac as a,
|
|
4979
4980
|
Zl as a0,
|
|
4980
4981
|
Sf as a1,
|
|
4981
4982
|
yl as a2,
|
|
@@ -5005,7 +5006,7 @@ export {
|
|
|
5005
5006
|
Gd as e,
|
|
5006
5007
|
ff as f,
|
|
5007
5008
|
Wa as g,
|
|
5008
|
-
|
|
5009
|
+
kt as h,
|
|
5009
5010
|
_i as i,
|
|
5010
5011
|
pf as j,
|
|
5011
5012
|
Wd as k,
|