@picked/client 0.0.1-dev.1794364109154 → 0.0.1-dev.1794460939512
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/.tsbuildinfo +1 -1
- package/dist/{api-Bq6hFeMM.cjs → api-CwgMIHfV.cjs} +1 -1
- package/dist/{api-Du3RThVD.js → api-DpESrsVW.js} +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/esm/index.js +180 -161
- package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
- package/dist/esm/server/index.js +5 -5
- package/dist/{plugin-CSgCjABm.js → plugin-C7lY7wA0.js} +14 -8
- package/dist/plugin-UA4qhlvs.cjs +1 -0
- package/dist/{preview-unavailable-Kuho5HwZ.js → preview-unavailable-D5JVXP6H.js} +1 -1
- package/dist/{preview-unavailable-CNUYFjli.cjs → preview-unavailable-DcA7cGAO.cjs} +1 -1
- package/dist/{provider-Bw2U9ZB2.js → provider-B3lHhG5v.js} +1 -1
- package/dist/{provider-C5EUaKOv.cjs → provider-ZrjYdXty.cjs} +1 -1
- package/dist/types/entities/session/session.d.ts +14 -5
- package/dist/types/entities/session/session.d.ts.map +1 -1
- package/dist/types/entities/workspace/workspace.d.ts +37 -0
- package/dist/types/entities/workspace/workspace.d.ts.map +1 -0
- package/dist/types/lifecycle/lifecycle.d.ts.map +1 -1
- package/dist/types/picked.d.ts +2 -0
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/hash.d.ts +4 -4
- package/dist/types/plugins/dynamic-experiences/hash.d.ts.map +1 -1
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts +7 -3
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/plugin-CUs_0yFg.cjs +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -3,17 +3,17 @@ import { n as t, t as n } from "../rules-logic-9hh8y_1b.js";
|
|
|
3
3
|
import { t as r } from "../logger-DMN6TxJJ.js";
|
|
4
4
|
import { a as i, c as a, d as o, f as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _ } from "../supports-CO9bJGNl.js";
|
|
5
5
|
import { a as v, i as y, r as ee, s as b, t as x } from "../dom-v6ulxr_z.js";
|
|
6
|
-
import { d as S, l as C, n as w, r as
|
|
7
|
-
import { apply as
|
|
8
|
-
import { i as
|
|
9
|
-
import { a as
|
|
10
|
-
import { t as
|
|
11
|
-
import { n as
|
|
12
|
-
import { attach as
|
|
6
|
+
import { d as S, l as C, n as w, r as te, u as T } from "../experience-instance-IOIdP1Rd.js";
|
|
7
|
+
import { apply as E } from "./logic-engine.js";
|
|
8
|
+
import { i as ne, n as D, r as re, t as ie } from "../storage-1MW3-_As.js";
|
|
9
|
+
import { a as ae, c as oe, l as se, n as ce, o as le, r as ue, s as de, t as fe } from "../preview-unavailable-D5JVXP6H.js";
|
|
10
|
+
import { t as pe } from "../id-Bo4RBeOs.js";
|
|
11
|
+
import { n as me, r as he, t as ge } from "../inert-script-report-B_bMPRzp.js";
|
|
12
|
+
import { attach as O, clearNode as _e, combine as k, createApi as A, createDomain as j, createEffect as M, createEvent as N, createNode as ve, createStore as P, is as F, sample as I, withRegion as ye } from "effector";
|
|
13
13
|
import { createFactory as L, invoke as R } from "@withease/factories";
|
|
14
14
|
//#region src/entities/experience/experience.ts
|
|
15
|
-
var z =
|
|
16
|
-
let i = z.store(r), a =
|
|
15
|
+
var z = j("experience"), be = L(({ client: e, experience: r }) => {
|
|
16
|
+
let i = z.store(r), a = A(i, { merge(e, t) {
|
|
17
17
|
return {
|
|
18
18
|
...e,
|
|
19
19
|
...t.experience
|
|
@@ -23,15 +23,15 @@ var z = M("experience"), be = L(({ client: e, experience: r }) => {
|
|
|
23
23
|
decisionLogic: e.condition,
|
|
24
24
|
targetSelectors: e.targets,
|
|
25
25
|
initializeOpenLogic: e.initializeOpen
|
|
26
|
-
})), s =
|
|
27
|
-
let r = e.nodes.filter(S).map((e) => t[e.stepId]).filter((e) => e !== void 0), i = e.nodes.filter(
|
|
26
|
+
})), s = k(i, e.components.listStore, (e, t) => (e.componentName ? t.find((t) => t.name === e.componentName) : void 0) || t.find((t) => t.name === `experience:${e.id}`) || t.find((e) => e.name === "experience"), { skipVoid: !1 }), c = k(i, e.steps.indexStore, e.conditions.indexStore, (e, t, n) => {
|
|
27
|
+
let r = e.nodes.filter(S).map((e) => t[e.stepId]).filter((e) => e !== void 0), i = e.nodes.filter(T).map((e) => n[e.conditionId]).filter((e) => e !== void 0);
|
|
28
28
|
return {
|
|
29
29
|
steps: r,
|
|
30
30
|
nodes: e.nodes,
|
|
31
31
|
edges: e.edges,
|
|
32
32
|
conditions: i
|
|
33
33
|
};
|
|
34
|
-
}), l = i.map((e) => C(e.nodes, e.edges)), u = r.actions ?? [], d, f =
|
|
34
|
+
}), l = i.map((e) => C(e.nodes, e.edges)), u = r.actions ?? [], d, f = O({
|
|
35
35
|
source: o,
|
|
36
36
|
effect: (t, n) => {
|
|
37
37
|
let i = y(t.targetSelectors, r.id);
|
|
@@ -39,18 +39,18 @@ var z = M("experience"), be = L(({ client: e, experience: r }) => {
|
|
|
39
39
|
n ? e.experienceInstances.spawn(d, t, n) : e.experienceInstances.spawn(d, t);
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
}), p =
|
|
42
|
+
}), p = k({
|
|
43
43
|
preconditionPassed: e.preconditionPassedStore,
|
|
44
44
|
isUser: e.session.store.map((e) => e.isUser, { skipVoid: !1 }),
|
|
45
45
|
config: o
|
|
46
|
-
}), m =
|
|
46
|
+
}), m = O({
|
|
47
47
|
source: p,
|
|
48
48
|
effect: async ({ preconditionPassed: i, isUser: a, config: o }) => {
|
|
49
49
|
if (!i || !a) return !1;
|
|
50
50
|
let { decisionLogic: s, targetSelectors: c } = o;
|
|
51
51
|
return c.length === 0 || y(c, r.id).length < 1 ? !1 : s === void 0 || !t(s) || await n(e, s) === !0;
|
|
52
52
|
}
|
|
53
|
-
}), h =
|
|
53
|
+
}), h = M(async () => {
|
|
54
54
|
if (!e.contentLoader) return !0;
|
|
55
55
|
try {
|
|
56
56
|
await e.contentLoader({
|
|
@@ -61,7 +61,7 @@ var z = M("experience"), be = L(({ client: e, experience: r }) => {
|
|
|
61
61
|
`${r.id}`;
|
|
62
62
|
}
|
|
63
63
|
return !0;
|
|
64
|
-
}), g =
|
|
64
|
+
}), g = N(), _ = N(), v = z.createStore(void 0, { skipVoid: !1 }).on(g, (e, t) => t).on(_, (e, t) => t);
|
|
65
65
|
return I({
|
|
66
66
|
clock: g,
|
|
67
67
|
target: m
|
|
@@ -105,12 +105,12 @@ function xe(e) {
|
|
|
105
105
|
return R(be, e);
|
|
106
106
|
}
|
|
107
107
|
var Se = L(({ client: e }) => {
|
|
108
|
-
let t = z.store({}), n =
|
|
108
|
+
let t = z.store({}), n = A(t, { register(e, t) {
|
|
109
109
|
return {
|
|
110
110
|
...e,
|
|
111
111
|
[t.id]: t
|
|
112
112
|
};
|
|
113
|
-
} }), r =
|
|
113
|
+
} }), r = N(), i = M((t) => {
|
|
114
114
|
n.register(xe({
|
|
115
115
|
client: e,
|
|
116
116
|
experience: t
|
|
@@ -143,7 +143,7 @@ var Se = L(({ client: e }) => {
|
|
|
143
143
|
function s(e) {
|
|
144
144
|
return t.map((t) => Object.values(t).find((t) => t.key === e) ?? t[e], { skipVoid: !1 });
|
|
145
145
|
}
|
|
146
|
-
let c =
|
|
146
|
+
let c = O({
|
|
147
147
|
source: t,
|
|
148
148
|
effect: (e, t) => {
|
|
149
149
|
let n = "key" in t ? Object.values(e).find((e) => e.key === t.key) : e[t.id];
|
|
@@ -161,7 +161,7 @@ var Se = L(({ client: e }) => {
|
|
|
161
161
|
getById: o,
|
|
162
162
|
getByKey: s,
|
|
163
163
|
launch: c,
|
|
164
|
-
open:
|
|
164
|
+
open: O({
|
|
165
165
|
source: {
|
|
166
166
|
experiences: t,
|
|
167
167
|
instances: e.experienceInstances.listStore
|
|
@@ -189,7 +189,7 @@ var Se = L(({ client: e }) => {
|
|
|
189
189
|
}
|
|
190
190
|
}),
|
|
191
191
|
listStore: a,
|
|
192
|
-
initialiseExperiencesFx:
|
|
192
|
+
initialiseExperiencesFx: O({
|
|
193
193
|
source: a,
|
|
194
194
|
effect: (e) => {
|
|
195
195
|
for (let t of e) t.initialiseRequested(void 0);
|
|
@@ -206,7 +206,7 @@ var we = async (e) => {
|
|
|
206
206
|
//#endregion
|
|
207
207
|
//#region src/entities/plugin/plugin.ts
|
|
208
208
|
function Te(e) {
|
|
209
|
-
return
|
|
209
|
+
return M(async () => {
|
|
210
210
|
await e();
|
|
211
211
|
});
|
|
212
212
|
}
|
|
@@ -216,7 +216,7 @@ var Ee = (e, t, n) => {
|
|
|
216
216
|
...a,
|
|
217
217
|
...i
|
|
218
218
|
});
|
|
219
|
-
}, De =
|
|
219
|
+
}, De = j("component"), Oe = L(({ client: e, component: t, name: n }) => ({
|
|
220
220
|
name: n,
|
|
221
221
|
component: t,
|
|
222
222
|
frameworkStore: e.frameworks.getByName(t.frameworkName)
|
|
@@ -225,12 +225,12 @@ function ke(e) {
|
|
|
225
225
|
return R(Oe, e);
|
|
226
226
|
}
|
|
227
227
|
var Ae = L(({ client: e }) => {
|
|
228
|
-
let t = De.store({}), n =
|
|
228
|
+
let t = De.store({}), n = A(t, { register(e, t) {
|
|
229
229
|
return {
|
|
230
230
|
...e,
|
|
231
231
|
[t.name]: t
|
|
232
232
|
};
|
|
233
|
-
} }), i =
|
|
233
|
+
} }), i = N();
|
|
234
234
|
I({
|
|
235
235
|
clock: i,
|
|
236
236
|
source: t,
|
|
@@ -263,13 +263,13 @@ var Me = (e, t, n) => {
|
|
|
263
263
|
name: e,
|
|
264
264
|
component: t
|
|
265
265
|
});
|
|
266
|
-
}, Ne =
|
|
267
|
-
let t = Ne.store({}), n =
|
|
266
|
+
}, Ne = j("framework"), Pe = L((e) => {
|
|
267
|
+
let t = Ne.store({}), n = A(t, { register(e, t) {
|
|
268
268
|
return {
|
|
269
269
|
...e,
|
|
270
270
|
[t.name]: t.framework
|
|
271
271
|
};
|
|
272
|
-
} }), i =
|
|
272
|
+
} }), i = N();
|
|
273
273
|
I({
|
|
274
274
|
clock: i,
|
|
275
275
|
source: t,
|
|
@@ -304,7 +304,7 @@ var Ie = (e, t) => {
|
|
|
304
304
|
sessionStorage: t ? globalThis.sessionStorage : void 0,
|
|
305
305
|
localStorage: t ? globalThis.localStorage : void 0
|
|
306
306
|
};
|
|
307
|
-
return
|
|
307
|
+
return k(e.responses.listStore, e.fields.listStore, (t, r) => Object.freeze({
|
|
308
308
|
client: e,
|
|
309
309
|
responses: t,
|
|
310
310
|
fields: r,
|
|
@@ -320,7 +320,7 @@ function ze(e, t, n) {
|
|
|
320
320
|
return new Proxy(Object.create(null), { get(r, i) {
|
|
321
321
|
if (typeof i != "string") return;
|
|
322
322
|
let a = e.find((e) => e.key === i);
|
|
323
|
-
if (a !== void 0) return async () => !n.has(i) && await
|
|
323
|
+
if (a !== void 0) return async () => !n.has(i) && await E(a.logic, {
|
|
324
324
|
...t,
|
|
325
325
|
conditions: ze(e, t, new Set(n).add(i))
|
|
326
326
|
}) === !0;
|
|
@@ -335,7 +335,7 @@ function Be(e, t = [], n = /* @__PURE__ */ new WeakSet()) {
|
|
|
335
335
|
let i = [...t, e];
|
|
336
336
|
return Object.values(e).every((e) => Be(e, i, n)) ? (n.add(e), !0) : !1;
|
|
337
337
|
}
|
|
338
|
-
var Ve = L(({ client: e }) =>
|
|
338
|
+
var Ve = L(({ client: e }) => O({
|
|
339
339
|
source: {
|
|
340
340
|
stateSnapshot: e.stateSnapshotStore,
|
|
341
341
|
predicates: e.predicates.listStore,
|
|
@@ -378,7 +378,7 @@ var Ve = L(({ client: e }) => k({
|
|
|
378
378
|
...d,
|
|
379
379
|
conditions: ze(a, d, /* @__PURE__ */ new Set())
|
|
380
380
|
};
|
|
381
|
-
return await
|
|
381
|
+
return await E(o, f);
|
|
382
382
|
}
|
|
383
383
|
}));
|
|
384
384
|
function He(e) {
|
|
@@ -386,34 +386,34 @@ function He(e) {
|
|
|
386
386
|
}
|
|
387
387
|
//#endregion
|
|
388
388
|
//#region src/lifecycle/lifecycle.ts
|
|
389
|
-
var B =
|
|
390
|
-
let t = B.store(!1), r =
|
|
389
|
+
var B = j("lifecycle"), Ue = L(({ client: e }) => {
|
|
390
|
+
let t = B.store(!1), r = P(void 0, {
|
|
391
391
|
skipVoid: !1,
|
|
392
392
|
domain: B
|
|
393
|
-
}), i =
|
|
393
|
+
}), i = P(void 0, {
|
|
394
394
|
skipVoid: !1,
|
|
395
395
|
domain: B
|
|
396
|
-
}), a = B.store("idle"), o = B.store([]), s =
|
|
396
|
+
}), a = B.store("idle"), o = B.store([]), s = P(void 0, {
|
|
397
397
|
skipVoid: !1,
|
|
398
398
|
domain: B
|
|
399
|
-
}), l =
|
|
399
|
+
}), l = P(void 0, {
|
|
400
400
|
skipVoid: !1,
|
|
401
401
|
domain: B
|
|
402
|
-
}), u =
|
|
402
|
+
}), u = N(), d = N(), f = N(), p = N(), m = N(), h = N();
|
|
403
403
|
o.on(p, (e, t) => [...e, t]), s.on(m, (e, t) => t), l.on(h, (e, t) => t), t.on(d, () => !0);
|
|
404
|
-
let g =
|
|
404
|
+
let g = M(async () => {
|
|
405
405
|
await ee();
|
|
406
|
-
}), _ =
|
|
406
|
+
}), _ = M(async () => {
|
|
407
407
|
await we(e);
|
|
408
|
-
}), v =
|
|
408
|
+
}), v = O({ effect: _ }), y = O({
|
|
409
409
|
source: o,
|
|
410
410
|
effect: async (e) => {
|
|
411
411
|
for (let t of e) await t();
|
|
412
412
|
}
|
|
413
|
-
}), b =
|
|
413
|
+
}), b = O({
|
|
414
414
|
source: s,
|
|
415
415
|
effect: async (t) => t === void 0 ? !0 : typeof t == "boolean" ? t : await n(e, t) === !0
|
|
416
|
-
}), x =
|
|
416
|
+
}), x = O({
|
|
417
417
|
source: l,
|
|
418
418
|
effect: async (t) => t === void 0 ? !0 : typeof t == "boolean" ? t : await n(e, t) === !0
|
|
419
419
|
}), S = I({
|
|
@@ -469,24 +469,24 @@ var B = M("lifecycle"), Ue = L(({ client: e }) => {
|
|
|
469
469
|
fn: () => ({ type: "initialize" }),
|
|
470
470
|
target: e.eventBus
|
|
471
471
|
});
|
|
472
|
-
let C =
|
|
472
|
+
let C = P(!1).on(g.done, () => !0), w = P(!1).on(f, () => !0), te = P(!1).on(v.done, () => !0), T = k(r, i, (e, t) => e === !0 && t === !0);
|
|
473
473
|
I({
|
|
474
474
|
clock: f,
|
|
475
|
-
source:
|
|
475
|
+
source: T,
|
|
476
476
|
filter: (e) => e,
|
|
477
477
|
fn: () => void 0,
|
|
478
478
|
target: _
|
|
479
479
|
});
|
|
480
|
-
let
|
|
480
|
+
let E = k(C, w, T, (e, t, n) => e && t && n);
|
|
481
481
|
I({
|
|
482
|
-
clock:
|
|
482
|
+
clock: E,
|
|
483
483
|
filter: (e) => e,
|
|
484
484
|
fn: () => void 0,
|
|
485
485
|
target: v
|
|
486
486
|
});
|
|
487
|
-
let
|
|
487
|
+
let ne = k(C, w, T, te, (e, t, n, r) => e && t && (!n || r));
|
|
488
488
|
return I({
|
|
489
|
-
clock:
|
|
489
|
+
clock: ne,
|
|
490
490
|
filter: (e) => e,
|
|
491
491
|
fn: () => void 0,
|
|
492
492
|
target: d
|
|
@@ -501,11 +501,12 @@ var B = M("lifecycle"), Ue = L(({ client: e }) => {
|
|
|
501
501
|
}), I({
|
|
502
502
|
clock: d,
|
|
503
503
|
source: e.session.store,
|
|
504
|
-
fn: (
|
|
504
|
+
fn: (e) => ({
|
|
505
505
|
type: "session",
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
506
|
+
pickedId: e.pickedId,
|
|
507
|
+
id: e.id,
|
|
508
|
+
isUser: e.isUser,
|
|
509
|
+
identifiers: e.identifiers
|
|
509
510
|
}),
|
|
510
511
|
target: e.eventBus
|
|
511
512
|
}), I({
|
|
@@ -535,8 +536,8 @@ function We(e) {
|
|
|
535
536
|
}
|
|
536
537
|
//#endregion
|
|
537
538
|
//#region src/entities/predicate/predicate.ts
|
|
538
|
-
var Ge =
|
|
539
|
-
let t = Ge.store({}), n =
|
|
539
|
+
var Ge = j("predicate"), Ke = L(({ client: e }) => {
|
|
540
|
+
let t = Ge.store({}), n = A(t, { register(e, t) {
|
|
540
541
|
return {
|
|
541
542
|
...e,
|
|
542
543
|
[t.name]: {
|
|
@@ -544,7 +545,7 @@ var Ge = M("predicate"), Ke = L(({ client: e }) => {
|
|
|
544
545
|
predicate: t.predicate
|
|
545
546
|
}
|
|
546
547
|
};
|
|
547
|
-
} }), i =
|
|
548
|
+
} }), i = N();
|
|
548
549
|
I({
|
|
549
550
|
clock: i,
|
|
550
551
|
source: t,
|
|
@@ -563,7 +564,7 @@ var Ge = M("predicate"), Ke = L(({ client: e }) => {
|
|
|
563
564
|
return t.map((t) => t[e]?.predicate, { skipVoid: !1 });
|
|
564
565
|
}
|
|
565
566
|
function s(t) {
|
|
566
|
-
let n =
|
|
567
|
+
let n = P(() => void 0, { skipVoid: !1 }), r = O({
|
|
567
568
|
source: {
|
|
568
569
|
predicate: o(t),
|
|
569
570
|
snapshot: e.stateSnapshotStore
|
|
@@ -602,10 +603,10 @@ var Je = (e, t, n) => {
|
|
|
602
603
|
name: e,
|
|
603
604
|
predicate: t
|
|
604
605
|
});
|
|
605
|
-
}, V =
|
|
606
|
+
}, V = j("history");
|
|
606
607
|
function H(e, t) {
|
|
607
608
|
return {
|
|
608
|
-
id:
|
|
609
|
+
id: pe(`history-entry-${Date.now()}-${Math.random()}}`),
|
|
609
610
|
node: t,
|
|
610
611
|
at: Date.now(),
|
|
611
612
|
experienceId: e
|
|
@@ -651,7 +652,7 @@ function Xe() {
|
|
|
651
652
|
//#endregion
|
|
652
653
|
//#region src/utils/events.ts
|
|
653
654
|
var Ze = 0, Qe = (e) => {
|
|
654
|
-
let t =
|
|
655
|
+
let t = P([]);
|
|
655
656
|
return t.on(e, (e, t) => [...e, {
|
|
656
657
|
id: Ze++,
|
|
657
658
|
at: /* @__PURE__ */ new Date(),
|
|
@@ -671,8 +672,8 @@ function U(e) {
|
|
|
671
672
|
}
|
|
672
673
|
//#endregion
|
|
673
674
|
//#region src/entities/field/field.ts
|
|
674
|
-
var $e =
|
|
675
|
-
let e = $e.store({}), t =
|
|
675
|
+
var $e = j("field"), et = L(() => {
|
|
676
|
+
let e = $e.store({}), t = A(e, {
|
|
676
677
|
register(e, t) {
|
|
677
678
|
let n = Object.assign({}, t.field, { policies: U(t.field.policies) });
|
|
678
679
|
return {
|
|
@@ -728,8 +729,8 @@ function tt() {
|
|
|
728
729
|
}
|
|
729
730
|
//#endregion
|
|
730
731
|
//#region src/entities/step/step.ts
|
|
731
|
-
var nt =
|
|
732
|
-
let e = nt.store({}), t =
|
|
732
|
+
var nt = j("step"), rt = L(() => {
|
|
733
|
+
let e = nt.store({}), t = A(e, { register(e, t) {
|
|
733
734
|
return {
|
|
734
735
|
...e,
|
|
735
736
|
[t.step.id]: t.step
|
|
@@ -761,8 +762,8 @@ function at(e, t) {
|
|
|
761
762
|
}
|
|
762
763
|
//#endregion
|
|
763
764
|
//#region src/entities/content/content.ts
|
|
764
|
-
var ot =
|
|
765
|
-
let e = ot.store({}), t =
|
|
765
|
+
var ot = j("content"), st = L(() => {
|
|
766
|
+
let e = ot.store({}), t = A(e, {
|
|
766
767
|
register(e, t) {
|
|
767
768
|
return {
|
|
768
769
|
...e,
|
|
@@ -811,7 +812,7 @@ function lt(e, t) {
|
|
|
811
812
|
}
|
|
812
813
|
//#endregion
|
|
813
814
|
//#region src/entities/action/action.ts
|
|
814
|
-
var ut =
|
|
815
|
+
var ut = j("action"), W = {
|
|
815
816
|
status: "idle",
|
|
816
817
|
response: void 0,
|
|
817
818
|
error: void 0
|
|
@@ -842,7 +843,7 @@ function ft(e) {
|
|
|
842
843
|
};
|
|
843
844
|
}
|
|
844
845
|
var pt = L(({ client: e }) => {
|
|
845
|
-
let t = ut.store({}), n =
|
|
846
|
+
let t = ut.store({}), n = A(t, {
|
|
846
847
|
register(e, t) {
|
|
847
848
|
return {
|
|
848
849
|
...e,
|
|
@@ -856,7 +857,7 @@ var pt = L(({ client: e }) => {
|
|
|
856
857
|
unregister(e, t) {
|
|
857
858
|
return Object.hasOwn(e, t) ? Object.fromEntries(Object.entries(e).filter(([e]) => e !== t)) : e;
|
|
858
859
|
}
|
|
859
|
-
}), i =
|
|
860
|
+
}), i = N(), a = n.unregister;
|
|
860
861
|
I({
|
|
861
862
|
clock: i,
|
|
862
863
|
source: t,
|
|
@@ -891,7 +892,7 @@ var pt = L(({ client: e }) => {
|
|
|
891
892
|
let l = /* @__PURE__ */ new WeakMap(), u = [];
|
|
892
893
|
function d(e, t, n) {
|
|
893
894
|
let r = e?.experience ?? G, i = l.get(r) ?? {
|
|
894
|
-
region: !e || u.includes(e.experience) ?
|
|
895
|
+
region: !e || u.includes(e.experience) ? ve() : null,
|
|
895
896
|
builders: [],
|
|
896
897
|
unlinkers: []
|
|
897
898
|
};
|
|
@@ -901,14 +902,14 @@ var pt = L(({ client: e }) => {
|
|
|
901
902
|
for (let t of u) {
|
|
902
903
|
let n = l.get(t);
|
|
903
904
|
if (n?.region && !e.includes(t)) {
|
|
904
|
-
|
|
905
|
+
_e(n.region), n.region = null;
|
|
905
906
|
for (let e of n.unlinkers) e();
|
|
906
907
|
}
|
|
907
908
|
}
|
|
908
909
|
for (let t of e) {
|
|
909
910
|
let e = l.get(t);
|
|
910
911
|
if (e && !e.region) {
|
|
911
|
-
let t =
|
|
912
|
+
let t = ve();
|
|
912
913
|
e.region = t;
|
|
913
914
|
for (let n of e.builders) ye(t, n);
|
|
914
915
|
}
|
|
@@ -916,9 +917,9 @@ var pt = L(({ client: e }) => {
|
|
|
916
917
|
u = e;
|
|
917
918
|
});
|
|
918
919
|
let f = K((t, n) => {
|
|
919
|
-
let r =
|
|
920
|
+
let r = N(), i = P(c(t, n), { skipVoid: !1 }).on(r, (e, t) => t);
|
|
920
921
|
return d(n, () => {
|
|
921
|
-
let i =
|
|
922
|
+
let i = k(s(t), e.stateSnapshotStore, (e, r) => c(t, n, r));
|
|
922
923
|
I({
|
|
923
924
|
clock: i,
|
|
924
925
|
target: r
|
|
@@ -948,7 +949,7 @@ var pt = L(({ client: e }) => {
|
|
|
948
949
|
}, a);
|
|
949
950
|
}
|
|
950
951
|
let m = K((e, t) => {
|
|
951
|
-
let n =
|
|
952
|
+
let n = N(), r = N(), i = 0, a = async (...a) => {
|
|
952
953
|
i += 1;
|
|
953
954
|
let o = i;
|
|
954
955
|
n();
|
|
@@ -972,9 +973,9 @@ var pt = L(({ client: e }) => {
|
|
|
972
973
|
...n,
|
|
973
974
|
run: a
|
|
974
975
|
});
|
|
975
|
-
return
|
|
976
|
+
return P(o(W)).on(n, () => o(dt)).on(r, (e, t) => o(ft(t)));
|
|
976
977
|
}), h = K((n, r) => {
|
|
977
|
-
let i = f(n, r), a =
|
|
978
|
+
let i = f(n, r), a = P(void 0, { skipVoid: !1 }), o = 0, s = !1, l = !1, u = () => [t.getState()[n]?.action, e.stateSnapshotStore.getState()], d = [], p = M(async (e) => {
|
|
978
979
|
o += 1;
|
|
979
980
|
let t = o;
|
|
980
981
|
if (d = u(), y(n)) return s || (s = !0, `${n}`), {
|
|
@@ -1117,8 +1118,8 @@ async function Ct(t, n, r, i) {
|
|
|
1117
1118
|
}
|
|
1118
1119
|
//#endregion
|
|
1119
1120
|
//#region src/entities/response/response.ts
|
|
1120
|
-
var wt =
|
|
1121
|
-
let t = wt.store({}), r =
|
|
1121
|
+
var wt = j("response"), Tt = L(({ client: e }) => {
|
|
1122
|
+
let t = wt.store({}), r = N(), i = N(), a = A(t, {
|
|
1122
1123
|
register(e, t) {
|
|
1123
1124
|
return {
|
|
1124
1125
|
...e,
|
|
@@ -1147,7 +1148,7 @@ var wt = M("response"), Tt = L(({ client: e }) => {
|
|
|
1147
1148
|
});
|
|
1148
1149
|
} else a.registerBatch(e);
|
|
1149
1150
|
}
|
|
1150
|
-
let s = (t, r) => n(e, t, r), c =
|
|
1151
|
+
let s = (t, r) => n(e, t, r), c = O({
|
|
1151
1152
|
source: {
|
|
1152
1153
|
allFields: e.fields.listStore,
|
|
1153
1154
|
existingResponses: t
|
|
@@ -1201,7 +1202,7 @@ var wt = M("response"), Tt = L(({ client: e }) => {
|
|
|
1201
1202
|
async function l(e) {
|
|
1202
1203
|
return c(e);
|
|
1203
1204
|
}
|
|
1204
|
-
let u =
|
|
1205
|
+
let u = O({
|
|
1205
1206
|
source: t,
|
|
1206
1207
|
effect: async (e, t) => {
|
|
1207
1208
|
let { responsesToCommit: n, validationErrors: r } = await c(t);
|
|
@@ -1216,7 +1217,7 @@ var wt = M("response"), Tt = L(({ client: e }) => {
|
|
|
1216
1217
|
value: t
|
|
1217
1218
|
})));
|
|
1218
1219
|
function m(e) {
|
|
1219
|
-
return
|
|
1220
|
+
return k({
|
|
1220
1221
|
f: e,
|
|
1221
1222
|
s: t
|
|
1222
1223
|
}, ({ f: e, s: t }) => {
|
|
@@ -1257,8 +1258,8 @@ function Et(e) {
|
|
|
1257
1258
|
}
|
|
1258
1259
|
//#endregion
|
|
1259
1260
|
//#region src/entities/condition/condition.ts
|
|
1260
|
-
var Dt =
|
|
1261
|
-
let e = Dt.store({}), t =
|
|
1261
|
+
var Dt = j("condition"), Ot = L(() => {
|
|
1262
|
+
let e = Dt.store({}), t = A(e, { register(e, t) {
|
|
1262
1263
|
return {
|
|
1263
1264
|
...e,
|
|
1264
1265
|
[t.condition.id]: t.condition
|
|
@@ -1343,13 +1344,13 @@ function Ft() {
|
|
|
1343
1344
|
}
|
|
1344
1345
|
//#endregion
|
|
1345
1346
|
//#region src/entities/session/session.ts
|
|
1346
|
-
var
|
|
1347
|
-
function
|
|
1347
|
+
var It = ie("session", "global");
|
|
1348
|
+
function Lt() {
|
|
1348
1349
|
return m() ? crypto.randomUUID() : `${Date.now().toString(36)}-${Math.random().toString(36).substring(2, 15)}-${Math.random().toString(36).substring(2, 15)}-${Math.random().toString(36).substring(2, 15)}`;
|
|
1349
1350
|
}
|
|
1350
|
-
function
|
|
1351
|
+
function Rt() {
|
|
1351
1352
|
if (!h()) return null;
|
|
1352
|
-
let e =
|
|
1353
|
+
let e = D.get(It);
|
|
1353
1354
|
if (!e.isSet()) return null;
|
|
1354
1355
|
try {
|
|
1355
1356
|
return e.json();
|
|
@@ -1357,10 +1358,19 @@ function Lt() {
|
|
|
1357
1358
|
return null;
|
|
1358
1359
|
}
|
|
1359
1360
|
}
|
|
1360
|
-
|
|
1361
|
-
let
|
|
1362
|
-
|
|
1363
|
-
|
|
1361
|
+
function Y(e, t, n) {
|
|
1362
|
+
let r = {
|
|
1363
|
+
pickedId: e,
|
|
1364
|
+
id: e
|
|
1365
|
+
};
|
|
1366
|
+
return t !== void 0 && (r.isUser = t), n && Object.keys(n).length > 0 && (r.identifiers = n), r;
|
|
1367
|
+
}
|
|
1368
|
+
function zt(e) {
|
|
1369
|
+
let t = { id: e.pickedId };
|
|
1370
|
+
return e.isUser !== void 0 && (t.isUser = e.isUser), e.identifiers && (t.identifiers = e.identifiers), t;
|
|
1371
|
+
}
|
|
1372
|
+
var Bt = L(() => {
|
|
1373
|
+
let e = Rt(), t = P(Y(e?.id ?? Lt(), e?.isUser, e?.identifiers)), n = A(t, {
|
|
1364
1374
|
setIsUser: (e, t) => ({
|
|
1365
1375
|
...e,
|
|
1366
1376
|
isUser: t
|
|
@@ -1368,7 +1378,7 @@ var Rt = L(() => {
|
|
|
1368
1378
|
setIdentifier: (e, { key: t, value: n }) => ({
|
|
1369
1379
|
...e,
|
|
1370
1380
|
identifiers: {
|
|
1371
|
-
...e.identifiers
|
|
1381
|
+
...e.identifiers,
|
|
1372
1382
|
[t]: n
|
|
1373
1383
|
}
|
|
1374
1384
|
}),
|
|
@@ -1377,48 +1387,56 @@ var Rt = L(() => {
|
|
|
1377
1387
|
if (!n || !(t in n)) return e;
|
|
1378
1388
|
let r = {};
|
|
1379
1389
|
for (let [e, i] of Object.entries(n)) e !== t && (r[e] = i);
|
|
1380
|
-
|
|
1381
|
-
return e.isUser !== void 0 && (i.isUser = e.isUser), Object.keys(r).length > 0 && (i.identifiers = r), i;
|
|
1390
|
+
return Y(e.pickedId, e.isUser, r);
|
|
1382
1391
|
}
|
|
1383
|
-
}),
|
|
1384
|
-
source:
|
|
1392
|
+
}), r = O({
|
|
1393
|
+
source: t,
|
|
1385
1394
|
effect: (e) => {
|
|
1386
1395
|
if (h()) try {
|
|
1387
|
-
|
|
1396
|
+
D.get(It).set(zt(e));
|
|
1388
1397
|
} catch {}
|
|
1389
1398
|
}
|
|
1390
1399
|
});
|
|
1391
1400
|
return I({
|
|
1392
|
-
source:
|
|
1393
|
-
target:
|
|
1401
|
+
source: t,
|
|
1402
|
+
target: r
|
|
1394
1403
|
}), {
|
|
1395
|
-
store:
|
|
1396
|
-
setIsUser:
|
|
1397
|
-
setIdentifier:
|
|
1398
|
-
removeIdentifier:
|
|
1404
|
+
store: t,
|
|
1405
|
+
setIsUser: n.setIsUser,
|
|
1406
|
+
setIdentifier: n.setIdentifier,
|
|
1407
|
+
removeIdentifier: n.removeIdentifier
|
|
1399
1408
|
};
|
|
1400
1409
|
});
|
|
1401
|
-
function
|
|
1402
|
-
return R(
|
|
1410
|
+
function Vt() {
|
|
1411
|
+
return R(Bt, void 0);
|
|
1412
|
+
}
|
|
1413
|
+
//#endregion
|
|
1414
|
+
//#region src/entities/workspace/workspace.ts
|
|
1415
|
+
function Ht() {
|
|
1416
|
+
let e = N();
|
|
1417
|
+
return {
|
|
1418
|
+
store: P(null).on(e, (e, t) => t),
|
|
1419
|
+
set: e
|
|
1420
|
+
};
|
|
1403
1421
|
}
|
|
1404
1422
|
//#endregion
|
|
1405
1423
|
//#region src/utils/picked-config.ts
|
|
1406
|
-
function
|
|
1424
|
+
function Ut() {
|
|
1407
1425
|
if (s()) return globalThis.window.pickedConfig;
|
|
1408
1426
|
}
|
|
1409
|
-
function
|
|
1410
|
-
if (s()) return
|
|
1427
|
+
function Wt() {
|
|
1428
|
+
if (s()) return Ut()?.projectId;
|
|
1411
1429
|
}
|
|
1412
|
-
function
|
|
1430
|
+
function Gt() {
|
|
1413
1431
|
if (!c()) return;
|
|
1414
1432
|
let e = document.getElementById("picked_script") || document.querySelector("script#picked") || document.getElementById("cvly");
|
|
1415
1433
|
if (e) return e.dataset.projectid || e.getAttribute("project-id") || void 0;
|
|
1416
1434
|
}
|
|
1417
|
-
function
|
|
1435
|
+
function Kt(e) {
|
|
1418
1436
|
if (e.projectId) return e.projectId;
|
|
1419
|
-
let t =
|
|
1437
|
+
let t = Wt();
|
|
1420
1438
|
if (t) return t;
|
|
1421
|
-
let n =
|
|
1439
|
+
let n = Gt();
|
|
1422
1440
|
if (n) return n;
|
|
1423
1441
|
throw Error("projectId is required. You can provide it via one of:\n (1) createClient({ projectId }) options;\n (2) window.pickedConfig = { projectId };\n (3) a <script> tag with id 'picked_script', 'picked', or 'cvly' that includes a data-projectid (or project-id) attribute.");
|
|
1424
1442
|
}
|
|
@@ -1427,7 +1445,7 @@ function Ut(e) {
|
|
|
1427
1445
|
function X(e) {
|
|
1428
1446
|
return e == null || e === "" || Number.isNaN(e);
|
|
1429
1447
|
}
|
|
1430
|
-
var
|
|
1448
|
+
var qt = {
|
|
1431
1449
|
default: (e, t) => X(e) ? String(t ?? "") : String(e),
|
|
1432
1450
|
append: (e, t) => t && !X(e) ? `${e} ${t}` : e,
|
|
1433
1451
|
prepend: (e, t) => t && !X(e) ? `${t} ${e}` : e,
|
|
@@ -1448,24 +1466,24 @@ var Wt = {
|
|
|
1448
1466
|
return e instanceof Set ? t.format(Array.from(e).map(String)) : e;
|
|
1449
1467
|
}
|
|
1450
1468
|
};
|
|
1451
|
-
function
|
|
1469
|
+
function Jt(e) {
|
|
1452
1470
|
return typeof e == "object" && !!e;
|
|
1453
1471
|
}
|
|
1454
|
-
function
|
|
1472
|
+
function Yt(e, t) {
|
|
1455
1473
|
let n = t;
|
|
1456
|
-
for (let t of e.split(".")) if (
|
|
1474
|
+
for (let t of e.split(".")) if (Jt(n) && t in n) n = n[t];
|
|
1457
1475
|
else return;
|
|
1458
1476
|
return typeof n == "function" ? n() : n;
|
|
1459
1477
|
}
|
|
1460
|
-
function
|
|
1461
|
-
let n = e.split("|").map((e) => e.trim()), r =
|
|
1478
|
+
function Xt(e, t) {
|
|
1479
|
+
let n = e.split("|").map((e) => e.trim()), r = Yt(n.shift() ?? "", t);
|
|
1462
1480
|
for (let e of n) {
|
|
1463
|
-
let [t, ...n] = e.split(":"), i = t?.trim() ?? "", a = n.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), o =
|
|
1481
|
+
let [t, ...n] = e.split(":"), i = t?.trim() ?? "", a = n.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), o = qt[i];
|
|
1464
1482
|
o && (r = o(r, a));
|
|
1465
1483
|
}
|
|
1466
1484
|
return X(r) ? "" : typeof r == "object" ? JSON.stringify(r) : String(r);
|
|
1467
1485
|
}
|
|
1468
|
-
function
|
|
1486
|
+
function Zt(e, t) {
|
|
1469
1487
|
let n = "", r = 0;
|
|
1470
1488
|
for (; r < e.length;) if (e[r] === "{" && e[r + 1] === "{") {
|
|
1471
1489
|
r += 2;
|
|
@@ -1477,13 +1495,13 @@ function Jt(e, t) {
|
|
|
1477
1495
|
}
|
|
1478
1496
|
i += e[r++];
|
|
1479
1497
|
}
|
|
1480
|
-
n +=
|
|
1498
|
+
n += Xt(i.trim(), t);
|
|
1481
1499
|
} else n += e[r++];
|
|
1482
1500
|
return n;
|
|
1483
1501
|
}
|
|
1484
1502
|
//#endregion
|
|
1485
1503
|
//#region src/picked.ts
|
|
1486
|
-
var
|
|
1504
|
+
var Qt = class {
|
|
1487
1505
|
static logger = r;
|
|
1488
1506
|
options;
|
|
1489
1507
|
dataSource = null;
|
|
@@ -1492,33 +1510,34 @@ var Yt = class {
|
|
|
1492
1510
|
previewUnavailable = !1;
|
|
1493
1511
|
contentLoader;
|
|
1494
1512
|
previewEmbedderOrigins = null;
|
|
1495
|
-
setPreviewEmbedderOrigins =
|
|
1513
|
+
setPreviewEmbedderOrigins = N();
|
|
1496
1514
|
plugins = {};
|
|
1497
1515
|
telemetry = Ft();
|
|
1498
1516
|
dataProviders = /* @__PURE__ */ new Map();
|
|
1499
|
-
eventBus =
|
|
1517
|
+
eventBus = N();
|
|
1500
1518
|
events;
|
|
1501
1519
|
projectId;
|
|
1502
1520
|
apiUrl;
|
|
1503
1521
|
dashboardUrl;
|
|
1504
1522
|
documentationSiteUrl;
|
|
1505
|
-
session =
|
|
1523
|
+
session = Vt();
|
|
1524
|
+
workspace = Ht();
|
|
1506
1525
|
performance = Pt();
|
|
1507
|
-
searchParams =
|
|
1526
|
+
searchParams = ae();
|
|
1508
1527
|
history = Xe();
|
|
1509
1528
|
components = je({ client: this });
|
|
1510
1529
|
experienceInstances = w({ client: this });
|
|
1511
1530
|
experiences = Ce({ client: this });
|
|
1512
1531
|
frameworks = Fe({ client: this });
|
|
1513
1532
|
predicates = qe({ client: this });
|
|
1514
|
-
features =
|
|
1533
|
+
features = de({ client: this });
|
|
1515
1534
|
conditions = kt();
|
|
1516
1535
|
fields = tt();
|
|
1517
1536
|
responses = Et({ client: this });
|
|
1518
1537
|
steps = it();
|
|
1519
1538
|
contents = ct();
|
|
1520
1539
|
actions = ht({ client: this });
|
|
1521
|
-
conditionResults =
|
|
1540
|
+
conditionResults = te();
|
|
1522
1541
|
stateSnapshotStore = Re({ client: this });
|
|
1523
1542
|
evaluateRuleLogicFx = He({ client: this });
|
|
1524
1543
|
start;
|
|
@@ -1527,12 +1546,12 @@ var Yt = class {
|
|
|
1527
1546
|
conditionPassedStore;
|
|
1528
1547
|
lifecycleStageStore;
|
|
1529
1548
|
lifecycle = We({ client: this });
|
|
1530
|
-
renderStringFx =
|
|
1549
|
+
renderStringFx = O({
|
|
1531
1550
|
source: this.responses.listStore,
|
|
1532
1551
|
effect: (e, { template: t, context: n }) => {
|
|
1533
1552
|
let r = {};
|
|
1534
1553
|
for (let t of e) r[t.fieldKey] = t.value;
|
|
1535
|
-
return
|
|
1554
|
+
return Zt(t, {
|
|
1536
1555
|
...n,
|
|
1537
1556
|
responses: r
|
|
1538
1557
|
});
|
|
@@ -1541,15 +1560,15 @@ var Yt = class {
|
|
|
1541
1560
|
constructor(e) {
|
|
1542
1561
|
this.events = Qe(this.eventBus), this.setPreviewEmbedderOrigins.watch((e) => {
|
|
1543
1562
|
this.previewEmbedderOrigins = e;
|
|
1544
|
-
}), this.projectId =
|
|
1563
|
+
}), this.projectId = Kt(e), this.options = Object.freeze(e), this.apiUrl = e.apiUrl || At(), this.dashboardUrl = e.dashboardUrl ?? "https://dashboard.picked.app", this.documentationSiteUrl = e.documentationSiteUrl ?? "https://docs.picked.app", this.start = this.lifecycle.start, this.readyStore = this.lifecycle.readyStore, this.preconditionPassedStore = this.lifecycle.preconditionPassedStore, this.conditionPassedStore = this.lifecycle.conditionPassedStore, this.lifecycleStageStore = this.lifecycle.lifecycleStageStore, this.setupPlugins(), this.setupFeatures(), this.setupPredicates(), this.setupActions(), this.setupFields(), this.setupComponents(), this.lifecycle.setPrecondition(e.precondition), this.lifecycle.setCondition(e.condition), this.eventBus({
|
|
1545
1564
|
type: "load",
|
|
1546
|
-
version:
|
|
1565
|
+
version: le()
|
|
1547
1566
|
}), this.maybeStartPreviewChannel();
|
|
1548
1567
|
}
|
|
1549
1568
|
dataProviderFor(e) {
|
|
1550
1569
|
let t = e ?? "", n = this.dataProviders.get(t);
|
|
1551
1570
|
if (n) return n;
|
|
1552
|
-
let r = import("../provider-
|
|
1571
|
+
let r = import("../provider-B3lHhG5v.js").then((t) => t.createPickedDataProvider({
|
|
1553
1572
|
apiUrl: this.apiUrl,
|
|
1554
1573
|
projectId: this.projectId,
|
|
1555
1574
|
getRequestObserver: () => this.telemetry.deliveryAPIRequestObserver,
|
|
@@ -1559,7 +1578,7 @@ var Yt = class {
|
|
|
1559
1578
|
}
|
|
1560
1579
|
async getProjectConfig(e) {
|
|
1561
1580
|
let t = await this.dataProviderFor(e?.previewToken), n = await t.getProjectConfig();
|
|
1562
|
-
if (this.dataSource = t.meta.manifest, n === null && t.meta.previewUnavailable) throw new
|
|
1581
|
+
if (this.dataSource = t.meta.manifest, n === null && t.meta.previewUnavailable) throw new fe(this.projectId);
|
|
1563
1582
|
if (n === null) throw Error(`Picked could not resolve the configuration for project "${this.projectId}" from ${this.apiUrl}.`);
|
|
1564
1583
|
return n;
|
|
1565
1584
|
}
|
|
@@ -1567,7 +1586,7 @@ var Yt = class {
|
|
|
1567
1586
|
return (await this.dataProviderFor(t?.previewToken)).getContent(e, t?.signal === void 0 ? void 0 : { signal: t.signal });
|
|
1568
1587
|
}
|
|
1569
1588
|
maybeStartPreviewChannel() {
|
|
1570
|
-
|
|
1589
|
+
ue() && import("../preview-channel-CN0-S8KE.js").then((e) => e.initPreviewChannel(this)).catch(() => void 0);
|
|
1571
1590
|
}
|
|
1572
1591
|
registerFramework = (e) => {
|
|
1573
1592
|
Ie(e, this.frameworks);
|
|
@@ -1581,7 +1600,7 @@ var Yt = class {
|
|
|
1581
1600
|
t?.onStart && this.lifecycle.registerPluginStartHook(t.onStart);
|
|
1582
1601
|
};
|
|
1583
1602
|
registerFeature = (e, t) => {
|
|
1584
|
-
|
|
1603
|
+
se(e, t, this.features);
|
|
1585
1604
|
};
|
|
1586
1605
|
registerPredicate = (e, t) => {
|
|
1587
1606
|
Je(e, t, this.predicates);
|
|
@@ -1644,7 +1663,7 @@ var Yt = class {
|
|
|
1644
1663
|
this.registerFeature(e, n);
|
|
1645
1664
|
}), this.searchParams.feature && this.searchParams.feature.forEach((e) => {
|
|
1646
1665
|
try {
|
|
1647
|
-
let t =
|
|
1666
|
+
let t = oe(e);
|
|
1648
1667
|
if (!t) return;
|
|
1649
1668
|
let { id: n, bucket: r } = t;
|
|
1650
1669
|
this.registerFeature(n, {
|
|
@@ -1686,8 +1705,8 @@ var Yt = class {
|
|
|
1686
1705
|
});
|
|
1687
1706
|
}
|
|
1688
1707
|
getPluginConfig = (e) => this.plugins[e] ?? {};
|
|
1689
|
-
},
|
|
1690
|
-
async function
|
|
1708
|
+
}, $t = "application/picked-javascript", en = "application/picked-module", tn = "data-picked-hydrated";
|
|
1709
|
+
async function nn(e) {
|
|
1691
1710
|
if (!("document" in globalThis)) return;
|
|
1692
1711
|
let t = "application/picked-module", n = "data-picked-hydrated";
|
|
1693
1712
|
function r(e) {
|
|
@@ -1716,26 +1735,26 @@ async function $t(e) {
|
|
|
1716
1735
|
a && await a;
|
|
1717
1736
|
}
|
|
1718
1737
|
}
|
|
1719
|
-
function
|
|
1720
|
-
return `<script>(${
|
|
1738
|
+
function rn() {
|
|
1739
|
+
return `<script>(${nn.toString()})(document)<\/script>`;
|
|
1721
1740
|
}
|
|
1722
1741
|
//#endregion
|
|
1723
1742
|
//#region src/utils/html-asset-value.ts
|
|
1724
|
-
function
|
|
1743
|
+
function an(e) {
|
|
1725
1744
|
return typeof e == "object" && !!e && "id" in e && typeof e.id == "string" && "content" in e && (typeof e.content == "string" || e.content === null);
|
|
1726
1745
|
}
|
|
1727
1746
|
//#endregion
|
|
1728
1747
|
//#region src/utils/devtools-experience.ts
|
|
1729
|
-
var
|
|
1748
|
+
var on = "devtools";
|
|
1730
1749
|
//#endregion
|
|
1731
1750
|
//#region src/entities/component/lazyComponent.ts
|
|
1732
|
-
function
|
|
1751
|
+
function sn(e) {
|
|
1733
1752
|
return {
|
|
1734
1753
|
$$type: "lazy-component",
|
|
1735
1754
|
load: e
|
|
1736
1755
|
};
|
|
1737
1756
|
}
|
|
1738
|
-
function
|
|
1757
|
+
function cn(e) {
|
|
1739
1758
|
return typeof e == "object" && !!e && "$$type" in e && e.$$type === "lazy-component";
|
|
1740
1759
|
}
|
|
1741
1760
|
//#endregion
|
|
@@ -1751,10 +1770,10 @@ function $(e) {
|
|
|
1751
1770
|
for (let e of t) Z(e) && n.push(e.contentEntryId);
|
|
1752
1771
|
return n;
|
|
1753
1772
|
}
|
|
1754
|
-
function
|
|
1773
|
+
function ln(e, t) {
|
|
1755
1774
|
return t === null ? null : e[t] ?? null;
|
|
1756
1775
|
}
|
|
1757
|
-
function
|
|
1776
|
+
function un(e, t) {
|
|
1758
1777
|
let n = [];
|
|
1759
1778
|
for (let r of t) {
|
|
1760
1779
|
let t = e[r];
|
|
@@ -1762,32 +1781,32 @@ function sn(e, t) {
|
|
|
1762
1781
|
}
|
|
1763
1782
|
return n;
|
|
1764
1783
|
}
|
|
1765
|
-
function
|
|
1766
|
-
if (
|
|
1784
|
+
function dn(e, t) {
|
|
1785
|
+
if (F.store(t)) return k(t, e.indexStore, (e, t) => ln(t, Q(e)));
|
|
1767
1786
|
let n = Q(t);
|
|
1768
|
-
return e.indexStore.map((e) =>
|
|
1787
|
+
return e.indexStore.map((e) => ln(e, n), { skipVoid: !1 });
|
|
1769
1788
|
}
|
|
1770
|
-
function
|
|
1771
|
-
if (
|
|
1789
|
+
function fn(e, t) {
|
|
1790
|
+
if (F.store(t)) return k(t, e.indexStore, (e, t) => un(t, $(e)));
|
|
1772
1791
|
let n = $(t);
|
|
1773
|
-
return e.indexStore.map((e) =>
|
|
1792
|
+
return e.indexStore.map((e) => un(e, n), { skipVoid: !1 });
|
|
1774
1793
|
}
|
|
1775
1794
|
//#endregion
|
|
1776
1795
|
//#region src/exports.ts
|
|
1777
|
-
var
|
|
1778
|
-
let t = new
|
|
1796
|
+
var pn = (e) => {
|
|
1797
|
+
let t = new Qt(e);
|
|
1779
1798
|
return u(t), t;
|
|
1780
1799
|
};
|
|
1781
1800
|
//#endregion
|
|
1782
1801
|
//#region src/typed-content.ts
|
|
1783
|
-
function
|
|
1802
|
+
function mn(e) {
|
|
1784
1803
|
return typeof e.data == "object";
|
|
1785
1804
|
}
|
|
1786
|
-
function
|
|
1787
|
-
return e.map((e) => !e || !
|
|
1805
|
+
function hn(e) {
|
|
1806
|
+
return e.map((e) => !e || !mn(e) ? null : e, { skipVoid: !1 });
|
|
1788
1807
|
}
|
|
1789
|
-
function
|
|
1808
|
+
function gn(e, t) {
|
|
1790
1809
|
return e.contentModelKey === t;
|
|
1791
1810
|
}
|
|
1792
1811
|
//#endregion
|
|
1793
|
-
export {
|
|
1812
|
+
export { on as DEVTOOLS_EXPERIENCE_ID, tn as PICKED_HYDRATED_ATTR, en as PICKED_MODULE_SCRIPT_TYPE, $t as PICKED_SCRIPT_TYPE, ce as PREVIEW_TOKEN_PARAM, Qt as Picked, fe as PreviewUnavailableError, rn as buildRehydrateBootstrap, pn as createClient, Te as createPluginEffect, ie as createStorageKey, dn as deriveReference, fn as deriveReferences, n as evaluateRuleLogic, Ut as getPickedConfig, gn as isContentOfModel, Z as isContentReference, an as isHtmlAssetValue, g as isInsideIframe, cn as isLazyLoader, v as isPickedRoot, ue as isPreviewSession, sn as lazyComponent, D as localStore, ge as onInertScriptSubtrees, Q as readReferenceId, $ as readReferenceIds, nn as rehydrateScripts, me as reportInertScriptSubtrees, he as resetInertScriptReport, re as sessionStore, ne as subscribe, d as supportsCookies, m as supportsCryptoRandomUUID, c as supportsDocument, i as supportsHistory, f as supportsIntersectionObserver, h as supportsLocalStorage, a as supportsLocation, l as supportsSessionStorage, _ as supportsShadowRoot, o as supportsWebComponents, s as supportsWindow, hn as toTypedContentStore };
|