@picked/client 0.0.1-dev.1777867216429 → 0.0.1-dev.1777938796953
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/{api-Xp22knXn.js → api-Bn4z854o.js} +1 -1
- package/dist/{api-qBG8rsTJ.cjs → api-GE6C0lxp.cjs} +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/plugins/history-browser-storage/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/docs/pickedql/data-sources.md +2 -2
- package/dist/docs/pickedql/schema.md +2 -2
- package/dist/esm/index.js +196 -168
- package/dist/esm/plugins/dynamic-experiences/index.js +1 -1
- package/dist/esm/plugins/history-browser-storage/index.js +3 -3
- package/dist/esm/server/index.js +1 -1
- package/dist/experience-instance-BDTNGT8a.cjs +1 -0
- package/dist/{experience-instance-C4UJM092.js → experience-instance-CWYRLfFM.js} +70 -83
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/entities/history/history.d.ts +22 -22
- package/dist/types/entities/history/history.d.ts.map +1 -1
- package/dist/types/picked.d.ts +7 -16
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/history-browser-storage/plugin.d.ts +14 -0
- package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/experience-instance-BWniatU5.cjs +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -2,15 +2,15 @@ import { n as e, t } from "../rules-logic-BTIxfrJJ.js";
|
|
|
2
2
|
import { t as n } from "../object-C82v79xc.js";
|
|
3
3
|
import { t as r } from "../logger-6z_gb4rA.js";
|
|
4
4
|
import { a as i, c as a, d as o, i as s, l as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h } from "../supports-0XIfd4-R.js";
|
|
5
|
-
import { a as g, c as _, i as v, l as ee, n as te, o as ne, r as re, s as y } from "../experience-instance-
|
|
5
|
+
import { a as g, c as _, i as v, l as ee, n as te, o as ne, r as re, s as y } from "../experience-instance-CWYRLfFM.js";
|
|
6
6
|
import { i as ie, n as b, r as x, t as S } from "../storage-6Xk0uAxB.js";
|
|
7
|
-
import { n as ae, r as oe } from "../api-
|
|
8
|
-
import { t as
|
|
9
|
-
import { attach as
|
|
10
|
-
import { createFactory as
|
|
7
|
+
import { n as ae, r as oe } from "../api-Bn4z854o.js";
|
|
8
|
+
import { t as C } from "../id-CRqy981z.js";
|
|
9
|
+
import { attach as w, combine as T, createApi as E, createDomain as D, createEffect as O, createEvent as k, createStore as A, sample as j } from "effector";
|
|
10
|
+
import { createFactory as M, invoke as N } from "@withease/factories";
|
|
11
11
|
//#region src/entities/experience/experience.ts
|
|
12
|
-
var
|
|
13
|
-
let n =
|
|
12
|
+
var P = D("experience"), se = M(({ client: e, experience: t }) => {
|
|
13
|
+
let n = P.store(t), r = E(n, { merge(e, t) {
|
|
14
14
|
return {
|
|
15
15
|
...e,
|
|
16
16
|
...t.experience
|
|
@@ -20,7 +20,7 @@ var N = E("experience"), ce = j(({ client: e, experience: t }) => {
|
|
|
20
20
|
decisionLogic: e.condition,
|
|
21
21
|
targetSelectors: e.targets,
|
|
22
22
|
initializeOpenLogic: e.initializeOpen
|
|
23
|
-
})), a =
|
|
23
|
+
})), a = T(n, 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 }), o = T(n, e.steps.indexStore, e.conditions.indexStore, (e, t, n) => {
|
|
24
24
|
let r = e.nodes.filter(v).map((e) => t[e.stepId]).filter((e) => e !== void 0), i = e.nodes.filter(re).map((e) => n[e.conditionId]).filter((e) => e !== void 0);
|
|
25
25
|
return {
|
|
26
26
|
steps: r,
|
|
@@ -40,11 +40,11 @@ var N = E("experience"), ce = j(({ client: e, experience: t }) => {
|
|
|
40
40
|
merge: r.merge
|
|
41
41
|
};
|
|
42
42
|
});
|
|
43
|
-
function
|
|
44
|
-
return
|
|
43
|
+
function ce(e) {
|
|
44
|
+
return N(se, e);
|
|
45
45
|
}
|
|
46
|
-
var
|
|
47
|
-
let t =
|
|
46
|
+
var le = M(({ client: e }) => {
|
|
47
|
+
let t = P.store({}), n = E(t, { register(e, t) {
|
|
48
48
|
return {
|
|
49
49
|
...e,
|
|
50
50
|
[t.id]: t
|
|
@@ -59,7 +59,7 @@ var ue = j(({ client: e }) => {
|
|
|
59
59
|
});
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
let a =
|
|
62
|
+
let a = ce({
|
|
63
63
|
client: e,
|
|
64
64
|
experience: r
|
|
65
65
|
});
|
|
@@ -72,7 +72,7 @@ var ue = j(({ client: e }) => {
|
|
|
72
72
|
function o(e) {
|
|
73
73
|
return t.map((t) => Object.values(t).find((t) => t.key === e) ?? t[e], { skipVoid: !1 });
|
|
74
74
|
}
|
|
75
|
-
let s =
|
|
75
|
+
let s = w({
|
|
76
76
|
source: t,
|
|
77
77
|
effect: async (t, n) => {
|
|
78
78
|
let r = "key" in n ? Object.values(t).find((e) => e.key === n.key) : t[n.id];
|
|
@@ -82,10 +82,10 @@ var ue = j(({ client: e }) => {
|
|
|
82
82
|
}
|
|
83
83
|
let { options: i } = n;
|
|
84
84
|
if (i?.bypassCondition) {
|
|
85
|
-
|
|
85
|
+
F(e, r, i);
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
|
-
await
|
|
88
|
+
await L(e, r) && F(e, r, i);
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
91
|
return {
|
|
@@ -94,7 +94,7 @@ var ue = j(({ client: e }) => {
|
|
|
94
94
|
getById: a,
|
|
95
95
|
getByKey: o,
|
|
96
96
|
launch: s,
|
|
97
|
-
open:
|
|
97
|
+
open: w({
|
|
98
98
|
source: {
|
|
99
99
|
experiences: t,
|
|
100
100
|
instances: e.experienceInstances.listStore
|
|
@@ -120,23 +120,23 @@ var ue = j(({ client: e }) => {
|
|
|
120
120
|
listStore: i
|
|
121
121
|
};
|
|
122
122
|
});
|
|
123
|
-
function
|
|
124
|
-
return
|
|
123
|
+
function ue(e) {
|
|
124
|
+
return N(le, e);
|
|
125
125
|
}
|
|
126
|
-
var
|
|
126
|
+
var F = (e, t, n) => {
|
|
127
127
|
let { targetSelectors: r } = t.configStore.getState(), i = y(r, t.id);
|
|
128
128
|
i.forEach(({ elements: e }) => e.forEach((e) => ee(e, t.id))), g(i, t.id, t.key).forEach((r) => {
|
|
129
129
|
n ? e.experienceInstances.spawn(t, r, n) : e.experienceInstances.spawn(t, r);
|
|
130
130
|
});
|
|
131
|
-
},
|
|
131
|
+
}, I = async (e) => {
|
|
132
132
|
await Promise.all(e.experiences.listStore.getState().map(async (t) => {
|
|
133
|
-
await
|
|
133
|
+
await L(e, t) && F(e, t);
|
|
134
134
|
}));
|
|
135
|
-
},
|
|
135
|
+
}, L = async (n, r) => {
|
|
136
136
|
if (!n.preconditionPassed || !n.session?.isUser) return !1;
|
|
137
137
|
let { decisionLogic: i, targetSelectors: a } = r.configStore.getState();
|
|
138
138
|
return y(a, r.id).length < 1 || a.length === 0 ? !1 : i === void 0 ? !0 : e(i) ? await t(n, i) === !0 : !0;
|
|
139
|
-
},
|
|
139
|
+
}, de = (e, t, n) => {
|
|
140
140
|
let r = t.name, i = t.setup(e);
|
|
141
141
|
if (i) {
|
|
142
142
|
let e = n[r] ?? {};
|
|
@@ -145,16 +145,16 @@ var P = (e, t, n) => {
|
|
|
145
145
|
...i
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
},
|
|
148
|
+
}, fe = D("component"), R = M(({ client: e, component: t, name: n }) => ({
|
|
149
149
|
name: n,
|
|
150
150
|
component: t,
|
|
151
151
|
frameworkStore: e.frameworks.getByName(t.frameworkName)
|
|
152
152
|
}));
|
|
153
153
|
function z(e) {
|
|
154
|
-
return
|
|
154
|
+
return N(R, e);
|
|
155
155
|
}
|
|
156
|
-
var B =
|
|
157
|
-
let t =
|
|
156
|
+
var B = M(({ client: e }) => {
|
|
157
|
+
let t = fe.store({}), n = E(t, { register(e, t) {
|
|
158
158
|
return {
|
|
159
159
|
...e,
|
|
160
160
|
[t.name]: t
|
|
@@ -180,12 +180,12 @@ var B = j(({ client: e }) => {
|
|
|
180
180
|
};
|
|
181
181
|
});
|
|
182
182
|
function V(e) {
|
|
183
|
-
return
|
|
183
|
+
return N(B, e);
|
|
184
184
|
}
|
|
185
185
|
var H = (e, t, n) => {
|
|
186
186
|
n.register(e, t);
|
|
187
|
-
}, pe =
|
|
188
|
-
let t = pe.store({}), n =
|
|
187
|
+
}, pe = D("framework"), me = M(({ client: e }) => {
|
|
188
|
+
let t = pe.store({}), n = E(t, { register(e, t) {
|
|
189
189
|
return {
|
|
190
190
|
...e,
|
|
191
191
|
[t.name]: t.framework
|
|
@@ -208,7 +208,7 @@ var H = (e, t, n) => {
|
|
|
208
208
|
};
|
|
209
209
|
});
|
|
210
210
|
function he(e) {
|
|
211
|
-
return
|
|
211
|
+
return N(me, e);
|
|
212
212
|
}
|
|
213
213
|
var ge = (e, t) => {
|
|
214
214
|
t.register(e.name, e);
|
|
@@ -243,8 +243,8 @@ function U(e) {
|
|
|
243
243
|
}
|
|
244
244
|
//#endregion
|
|
245
245
|
//#region src/entities/predicate/predicate.ts
|
|
246
|
-
var be =
|
|
247
|
-
let t = be.store({}), n =
|
|
246
|
+
var be = D("predicate"), xe = M(({ client: e }) => {
|
|
247
|
+
let t = be.store({}), n = E(t, { register(e, t) {
|
|
248
248
|
return {
|
|
249
249
|
...e,
|
|
250
250
|
[t.name]: {
|
|
@@ -264,7 +264,7 @@ var be = E("predicate"), xe = j(({ client: e }) => {
|
|
|
264
264
|
return t.map((t) => t[e]?.predicate, { skipVoid: !1 });
|
|
265
265
|
}
|
|
266
266
|
function o(t) {
|
|
267
|
-
let n =
|
|
267
|
+
let n = A(() => void 0, { skipVoid: !1 }), r = O(async () => {
|
|
268
268
|
let n = a(t).getState();
|
|
269
269
|
if (!n) return;
|
|
270
270
|
let r = U(e);
|
|
@@ -273,13 +273,13 @@ var be = E("predicate"), xe = j(({ client: e }) => {
|
|
|
273
273
|
args: e
|
|
274
274
|
});
|
|
275
275
|
});
|
|
276
|
-
return
|
|
276
|
+
return j({
|
|
277
277
|
source: {
|
|
278
278
|
responses: e.responses.listStore,
|
|
279
279
|
fields: e.fields.listStore
|
|
280
280
|
},
|
|
281
281
|
target: r
|
|
282
|
-
}),
|
|
282
|
+
}), j({
|
|
283
283
|
clock: r.doneData,
|
|
284
284
|
filter: (e) => e !== void 0,
|
|
285
285
|
target: n
|
|
@@ -293,12 +293,12 @@ var be = E("predicate"), xe = j(({ client: e }) => {
|
|
|
293
293
|
};
|
|
294
294
|
});
|
|
295
295
|
function Se(e) {
|
|
296
|
-
return
|
|
296
|
+
return N(xe, e);
|
|
297
297
|
}
|
|
298
298
|
var Ce = (e, t, n) => {
|
|
299
299
|
n.register(e, t);
|
|
300
|
-
}, W =
|
|
301
|
-
let t = W.store({}), n = W.store([]), r =
|
|
300
|
+
}, W = D("feature"), we = M(({ client: e }) => {
|
|
301
|
+
let t = W.store({}), n = W.store([]), r = E(t, { register(e, t) {
|
|
302
302
|
return {
|
|
303
303
|
...e,
|
|
304
304
|
[t.id]: t.feature
|
|
@@ -318,7 +318,7 @@ var Ce = (e, t, n) => {
|
|
|
318
318
|
feature: i
|
|
319
319
|
}));
|
|
320
320
|
}
|
|
321
|
-
let a =
|
|
321
|
+
let a = O(async ({ id: e, key: t, storage: n = "local" }) => {
|
|
322
322
|
let r = S(`feature:${e}:${t}`, "global"), i = (n === "session" ? x : b).get(r).boolean();
|
|
323
323
|
return i === null ? null : {
|
|
324
324
|
id: e,
|
|
@@ -326,11 +326,11 @@ var Ce = (e, t, n) => {
|
|
|
326
326
|
bucket: i,
|
|
327
327
|
storage: n
|
|
328
328
|
};
|
|
329
|
-
}), o =
|
|
329
|
+
}), o = O((e) => {
|
|
330
330
|
if (!e) return null;
|
|
331
331
|
let t = S(`feature:${e.id}:${e.key}`, "global");
|
|
332
332
|
(e.storage === "session" ? x : b).set(t, e.bucket);
|
|
333
|
-
}), s = /* @__PURE__ */ new Map(), c =
|
|
333
|
+
}), s = /* @__PURE__ */ new Map(), c = w({
|
|
334
334
|
source: {
|
|
335
335
|
allFeaturesStore: t,
|
|
336
336
|
resolvedFeaturesStore: n
|
|
@@ -361,7 +361,7 @@ var Ce = (e, t, n) => {
|
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
363
|
});
|
|
364
|
-
|
|
364
|
+
j({
|
|
365
365
|
clock: r.register,
|
|
366
366
|
fn: (e) => {
|
|
367
367
|
let { id: t, feature: n } = e;
|
|
@@ -372,7 +372,7 @@ var Ce = (e, t, n) => {
|
|
|
372
372
|
};
|
|
373
373
|
},
|
|
374
374
|
target: a
|
|
375
|
-
}),
|
|
375
|
+
}), j({
|
|
376
376
|
source: t,
|
|
377
377
|
clock: c.doneData,
|
|
378
378
|
fn: (e, t) => {
|
|
@@ -386,7 +386,7 @@ var Ce = (e, t, n) => {
|
|
|
386
386
|
},
|
|
387
387
|
target: o
|
|
388
388
|
});
|
|
389
|
-
let l =
|
|
389
|
+
let l = T({
|
|
390
390
|
allFeaturesStore: t,
|
|
391
391
|
resolvedFeaturesStore: n
|
|
392
392
|
}).map(({ allFeaturesStore: e, resolvedFeaturesStore: t }) => Object.values(e).map((e) => {
|
|
@@ -408,7 +408,7 @@ var Ce = (e, t, n) => {
|
|
|
408
408
|
isResolved: !1
|
|
409
409
|
};
|
|
410
410
|
}));
|
|
411
|
-
|
|
411
|
+
j({
|
|
412
412
|
clock: c.doneData,
|
|
413
413
|
source: { resolvedFeatures: n },
|
|
414
414
|
filter: ({ resolvedFeatures: e }, { id: t, key: n }) => !e.some((e) => e.id === t && e.key === n),
|
|
@@ -417,7 +417,7 @@ var Ce = (e, t, n) => {
|
|
|
417
417
|
type: "feature_decide",
|
|
418
418
|
feature: e
|
|
419
419
|
}))
|
|
420
|
-
}),
|
|
420
|
+
}), j({
|
|
421
421
|
clock: [a.doneData, c.doneData],
|
|
422
422
|
source: n,
|
|
423
423
|
fn: (e, t) => !t || e.some((e) => e.id === t.id && e.key === t.key) ? e : [...e, t],
|
|
@@ -430,15 +430,15 @@ var Ce = (e, t, n) => {
|
|
|
430
430
|
return t.map((t) => t[e], { skipVoid: !1 });
|
|
431
431
|
}
|
|
432
432
|
function f(e) {
|
|
433
|
-
let t =
|
|
433
|
+
let t = A(async () => void 0, { skipVoid: !1 }), r = O(async () => {
|
|
434
434
|
let t = u(e).getState();
|
|
435
435
|
if (t) return async () => (await t.getBucket()).bucket;
|
|
436
436
|
});
|
|
437
|
-
return
|
|
437
|
+
return j({
|
|
438
438
|
source: n,
|
|
439
439
|
filter: (t) => t.some((t) => t.id === e),
|
|
440
440
|
target: r
|
|
441
|
-
}),
|
|
441
|
+
}), j({
|
|
442
442
|
clock: r.doneData,
|
|
443
443
|
filter: (e) => e !== void 0,
|
|
444
444
|
target: t
|
|
@@ -453,71 +453,99 @@ var Ce = (e, t, n) => {
|
|
|
453
453
|
};
|
|
454
454
|
});
|
|
455
455
|
function Te(e) {
|
|
456
|
-
return
|
|
456
|
+
return N(we, e);
|
|
457
457
|
}
|
|
458
458
|
var Ee = (e, t, n) => {
|
|
459
459
|
n.register(e, t);
|
|
460
|
-
}, G =
|
|
461
|
-
function K(e, t) {
|
|
460
|
+
}, G = D("history");
|
|
461
|
+
function K(e, t, n) {
|
|
462
462
|
return {
|
|
463
|
-
id:
|
|
464
|
-
node:
|
|
463
|
+
id: C(`history-entry-${Date.now()}-${Math.random()}}`),
|
|
464
|
+
node: n,
|
|
465
465
|
at: Date.now(),
|
|
466
|
-
|
|
466
|
+
instanceId: e,
|
|
467
|
+
experienceId: t
|
|
467
468
|
};
|
|
468
469
|
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
470
|
+
function De(e) {
|
|
471
|
+
for (let t = e.length - 1; t >= 0; t--) {
|
|
472
|
+
let n = e[t];
|
|
473
|
+
if (n && v(n.node)) return e.slice(0, t + 1);
|
|
474
|
+
}
|
|
475
|
+
return [];
|
|
476
|
+
}
|
|
477
|
+
var Oe = M(() => {
|
|
478
|
+
let e = G.store([]), t = G.event(), n = G.event(), r = G.event(), i = G.event(), a = G.event(), o = G.event();
|
|
479
|
+
e.on(t, (e, t) => [...e, K(t.instanceId, t.experienceId, t.node)]), e.on(n, (e, t) => {
|
|
480
|
+
let n = -1;
|
|
481
|
+
for (let r = e.length - 1; r >= 0; r--) if (e[r]?.instanceId === t.instanceId) {
|
|
482
|
+
n = r;
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
let r = K(t.instanceId, t.experienceId, t.node);
|
|
486
|
+
return n === -1 ? [...e, r] : e.map((e, t) => t === n ? r : e);
|
|
487
|
+
}), e.on(r, (e, { instanceId: t }) => {
|
|
488
|
+
let n = 0, r = -1;
|
|
489
|
+
for (let i = e.length - 1; i >= 0; i--) {
|
|
490
|
+
let a = e[i];
|
|
491
|
+
if (!(a?.instanceId !== t || !v(a.node)) && (n += 1, n === 2)) {
|
|
492
|
+
r = i;
|
|
482
493
|
break;
|
|
483
494
|
}
|
|
484
495
|
}
|
|
496
|
+
return r === -1 ? e : e.filter((e, n) => e.instanceId !== t || n <= r);
|
|
497
|
+
}), e.on(i, (e, { snapshots: t }) => {
|
|
498
|
+
let n = [];
|
|
499
|
+
for (let e of Object.values(t)) n.push(...e);
|
|
485
500
|
return n;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
let
|
|
489
|
-
|
|
501
|
+
}), e.on(o, (e, t) => [...e, ...t]);
|
|
502
|
+
let s = e.map((e) => {
|
|
503
|
+
let t = {};
|
|
504
|
+
for (let n of e) {
|
|
505
|
+
let e = t[n.experienceId];
|
|
506
|
+
e ? e.push(n) : t[n.experienceId] = [n];
|
|
507
|
+
}
|
|
508
|
+
return t;
|
|
509
|
+
});
|
|
510
|
+
return j({
|
|
511
|
+
clock: a,
|
|
512
|
+
source: s,
|
|
513
|
+
fn: (e, { instanceId: t, experienceId: n }) => De(e[n] ?? []).map((e) => ({
|
|
490
514
|
...e,
|
|
491
|
-
|
|
492
|
-
|
|
515
|
+
id: C(`history-entry-${Date.now()}-${Math.random()}}`),
|
|
516
|
+
instanceId: t,
|
|
517
|
+
at: Date.now()
|
|
518
|
+
})),
|
|
519
|
+
target: o
|
|
493
520
|
}), {
|
|
494
521
|
push: t,
|
|
495
522
|
replace: n,
|
|
496
523
|
back: r,
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
entriesStore: e.map((e) => e
|
|
524
|
+
restoreSnapshots: i,
|
|
525
|
+
seedInstanceFromSnapshot: a,
|
|
526
|
+
entriesStore: e.map((e) => e),
|
|
527
|
+
snapshotStore: s
|
|
500
528
|
};
|
|
501
529
|
});
|
|
502
|
-
function
|
|
503
|
-
return
|
|
530
|
+
function ke() {
|
|
531
|
+
return N(Oe);
|
|
504
532
|
}
|
|
505
533
|
//#endregion
|
|
506
534
|
//#region src/utils/events.ts
|
|
507
|
-
var
|
|
508
|
-
let t =
|
|
509
|
-
return
|
|
535
|
+
var Ae = 0, je = (e) => {
|
|
536
|
+
let t = A([]);
|
|
537
|
+
return j({
|
|
510
538
|
clock: e,
|
|
511
539
|
source: t,
|
|
512
540
|
fn: (e, t) => [...e, {
|
|
513
|
-
id:
|
|
541
|
+
id: Ae++,
|
|
514
542
|
at: /* @__PURE__ */ new Date(),
|
|
515
543
|
payload: t
|
|
516
544
|
}],
|
|
517
545
|
target: t
|
|
518
546
|
}), t;
|
|
519
|
-
},
|
|
520
|
-
let e =
|
|
547
|
+
}, Me = D("field"), Ne = M(() => {
|
|
548
|
+
let e = Me.store({}), t = E(e, {
|
|
521
549
|
register(e, t) {
|
|
522
550
|
return {
|
|
523
551
|
...e,
|
|
@@ -561,13 +589,13 @@ var ke = 0, Ae = (e) => {
|
|
|
561
589
|
getByName: s
|
|
562
590
|
};
|
|
563
591
|
});
|
|
564
|
-
function
|
|
565
|
-
return
|
|
592
|
+
function Pe() {
|
|
593
|
+
return N(Ne);
|
|
566
594
|
}
|
|
567
595
|
//#endregion
|
|
568
596
|
//#region src/entities/step/step.ts
|
|
569
|
-
var
|
|
570
|
-
let e =
|
|
597
|
+
var Fe = D("step"), Ie = M(() => {
|
|
598
|
+
let e = Fe.store({}), t = E(e, { register(e, t) {
|
|
571
599
|
return {
|
|
572
600
|
...e,
|
|
573
601
|
[t.step.id]: t.step
|
|
@@ -591,16 +619,16 @@ var Pe = E("step"), Fe = j(() => {
|
|
|
591
619
|
indexStore: e
|
|
592
620
|
};
|
|
593
621
|
});
|
|
594
|
-
function
|
|
595
|
-
return
|
|
622
|
+
function Le() {
|
|
623
|
+
return N(Ie);
|
|
596
624
|
}
|
|
597
|
-
function
|
|
625
|
+
function Re(e, t) {
|
|
598
626
|
t.register(e);
|
|
599
627
|
}
|
|
600
628
|
//#endregion
|
|
601
629
|
//#region src/entities/action/action.ts
|
|
602
|
-
var
|
|
603
|
-
let t =
|
|
630
|
+
var ze = D("action"), Be = M(({ client: e }) => {
|
|
631
|
+
let t = ze.store({}), n = E(t, { register(e, t) {
|
|
604
632
|
return {
|
|
605
633
|
...e,
|
|
606
634
|
[t.key]: {
|
|
@@ -620,7 +648,7 @@ var Re = E("action"), ze = j(({ client: e }) => {
|
|
|
620
648
|
return t.map((t) => t[e]?.action, { skipVoid: !1 });
|
|
621
649
|
}
|
|
622
650
|
function o(t, n) {
|
|
623
|
-
let r =
|
|
651
|
+
let r = A(() => void 0, { skipVoid: !1 }), i = n ? { experience: n.experience } : null, o = O(async () => {
|
|
624
652
|
let n = a(t).getState();
|
|
625
653
|
if (!n) return;
|
|
626
654
|
let r = U(e);
|
|
@@ -629,13 +657,13 @@ var Re = E("action"), ze = j(({ client: e }) => {
|
|
|
629
657
|
args: e
|
|
630
658
|
}, i);
|
|
631
659
|
});
|
|
632
|
-
return
|
|
660
|
+
return j({
|
|
633
661
|
source: {
|
|
634
662
|
responses: e.responses.listStore,
|
|
635
663
|
fields: e.fields.listStore
|
|
636
664
|
},
|
|
637
665
|
target: o
|
|
638
|
-
}),
|
|
666
|
+
}), j({
|
|
639
667
|
clock: o.doneData,
|
|
640
668
|
filter: (e) => e !== void 0,
|
|
641
669
|
target: r
|
|
@@ -648,10 +676,10 @@ var Re = E("action"), ze = j(({ client: e }) => {
|
|
|
648
676
|
getEvokableAction: o
|
|
649
677
|
};
|
|
650
678
|
});
|
|
651
|
-
function
|
|
652
|
-
return
|
|
679
|
+
function Ve(e) {
|
|
680
|
+
return N(Be, e);
|
|
653
681
|
}
|
|
654
|
-
var
|
|
682
|
+
var He = (e, t, n) => {
|
|
655
683
|
n.register(e, t);
|
|
656
684
|
};
|
|
657
685
|
//#endregion
|
|
@@ -667,7 +695,7 @@ function q(e, t, n, r) {
|
|
|
667
695
|
function J(e) {
|
|
668
696
|
return e === null || e === "" || Array.isArray(e) && !e.length;
|
|
669
697
|
}
|
|
670
|
-
function
|
|
698
|
+
function Ue(e) {
|
|
671
699
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
|
|
672
700
|
}
|
|
673
701
|
function Y(e) {
|
|
@@ -677,13 +705,13 @@ function Y(e) {
|
|
|
677
705
|
return !1;
|
|
678
706
|
}
|
|
679
707
|
}
|
|
680
|
-
function
|
|
708
|
+
function We(e, t) {
|
|
681
709
|
return t.find((t) => t.key === e) ?? null;
|
|
682
710
|
}
|
|
683
|
-
function
|
|
711
|
+
function Ge(e, t) {
|
|
684
712
|
return e.multiple && (typeof t == "string" || typeof t == "number" || typeof t == "boolean") ? [t] : t;
|
|
685
713
|
}
|
|
686
|
-
function
|
|
714
|
+
function Ke(e, t) {
|
|
687
715
|
if (e.type !== "object" || J(t)) return null;
|
|
688
716
|
if (e.multiple) {
|
|
689
717
|
if (!Array.isArray(t)) return q(e, t, "This field expects multiple values", "Field expects an array of objects.");
|
|
@@ -695,7 +723,7 @@ function Ge(e, t) {
|
|
|
695
723
|
}
|
|
696
724
|
return Array.isArray(t) ? q(e, t, "This field expects a single value", "Field expects a single object, not an array.") : typeof t != "object" || !t ? q(e, t, "This field expects an object value", "Field expects an object value.") : Y(t) ? null : q(e, t, "This field contains non-serializable data", "Field value contains non-JSON-serializable data (functions, circular references, etc.).");
|
|
697
725
|
}
|
|
698
|
-
function
|
|
726
|
+
function qe(e, t) {
|
|
699
727
|
if (J(t) || !Array.isArray(e.options) || e.options.length === 0) return null;
|
|
700
728
|
let n = Array.isArray(t) ? t : [t];
|
|
701
729
|
if (e.type === "object") {
|
|
@@ -703,9 +731,9 @@ function Ke(e, t) {
|
|
|
703
731
|
return n.every((e) => r.has(JSON.stringify(e))) ? null : q(e, t, "This field expects a valid option", "Field expects a valid option from the defined choices.");
|
|
704
732
|
}
|
|
705
733
|
let r = e.options.map((e) => e.value);
|
|
706
|
-
return n.every((e) => !
|
|
734
|
+
return n.every((e) => !Ue(e) || e === null ? !1 : r.includes(e)) ? null : q(e, t, "This field expects a valid option", `Field expects a valid option. Valid options are: ${r.join(", ")}`);
|
|
707
735
|
}
|
|
708
|
-
async function
|
|
736
|
+
async function Je(e, t, r, i) {
|
|
709
737
|
if (t.validation && !n(t.validation) && !J(r)) {
|
|
710
738
|
let n = i ? {
|
|
711
739
|
$input: r,
|
|
@@ -718,8 +746,8 @@ async function qe(e, t, r, i) {
|
|
|
718
746
|
}
|
|
719
747
|
//#endregion
|
|
720
748
|
//#region src/entities/response/response.ts
|
|
721
|
-
var
|
|
722
|
-
let n =
|
|
749
|
+
var Ye = D("response"), Xe = M(({ client: e }) => {
|
|
750
|
+
let n = Ye.store({}), r = k(), i = k(), a = E(n, {
|
|
723
751
|
register(e, t) {
|
|
724
752
|
return {
|
|
725
753
|
...e,
|
|
@@ -748,7 +776,7 @@ var Je = E("response"), Ye = j(({ client: e }) => {
|
|
|
748
776
|
});
|
|
749
777
|
} else a.registerBatch(e);
|
|
750
778
|
}
|
|
751
|
-
let s = (n, r) => t(e, n, r), c =
|
|
779
|
+
let s = (n, r) => t(e, n, r), c = w({
|
|
752
780
|
source: {
|
|
753
781
|
allFields: e.fields.listStore,
|
|
754
782
|
existingResponses: n
|
|
@@ -758,7 +786,7 @@ var Je = E("response"), Ye = j(({ client: e }) => {
|
|
|
758
786
|
...t,
|
|
759
787
|
...n
|
|
760
788
|
}, o = Object.entries(n), c = await Promise.allSettled(o.map(async ([t, n]) => {
|
|
761
|
-
let o =
|
|
789
|
+
let o = We(t, e);
|
|
762
790
|
if (!o) {
|
|
763
791
|
r.push({
|
|
764
792
|
fieldKey: t,
|
|
@@ -768,17 +796,17 @@ var Je = E("response"), Ye = j(({ client: e }) => {
|
|
|
768
796
|
});
|
|
769
797
|
return;
|
|
770
798
|
}
|
|
771
|
-
let c =
|
|
799
|
+
let c = Ge(o, n), l = await Je(s, o, c, a);
|
|
772
800
|
if (l) {
|
|
773
801
|
r.push(l);
|
|
774
802
|
return;
|
|
775
803
|
}
|
|
776
|
-
let u =
|
|
804
|
+
let u = Ke(o, c);
|
|
777
805
|
if (u) {
|
|
778
806
|
r.push(u);
|
|
779
807
|
return;
|
|
780
808
|
}
|
|
781
|
-
let d =
|
|
809
|
+
let d = qe(o, c);
|
|
782
810
|
if (d) {
|
|
783
811
|
r.push(d);
|
|
784
812
|
return;
|
|
@@ -806,7 +834,7 @@ var Je = E("response"), Ye = j(({ client: e }) => {
|
|
|
806
834
|
async function l(e) {
|
|
807
835
|
return c(e);
|
|
808
836
|
}
|
|
809
|
-
let u =
|
|
837
|
+
let u = w({
|
|
810
838
|
source: n,
|
|
811
839
|
effect: async (e, t) => {
|
|
812
840
|
let { responsesToCommit: n, validationErrors: r } = await c(t);
|
|
@@ -821,7 +849,7 @@ var Je = E("response"), Ye = j(({ client: e }) => {
|
|
|
821
849
|
value: t
|
|
822
850
|
})));
|
|
823
851
|
function m(e) {
|
|
824
|
-
return
|
|
852
|
+
return T({
|
|
825
853
|
f: e,
|
|
826
854
|
s: n
|
|
827
855
|
}, ({ f: e, s: t }) => {
|
|
@@ -838,10 +866,10 @@ var Je = E("response"), Ye = j(({ client: e }) => {
|
|
|
838
866
|
function _(t) {
|
|
839
867
|
return m(e.fields.getByName(t));
|
|
840
868
|
}
|
|
841
|
-
return
|
|
869
|
+
return j({
|
|
842
870
|
clock: r,
|
|
843
871
|
target: a.clearAll
|
|
844
|
-
}),
|
|
872
|
+
}), j({
|
|
845
873
|
clock: i,
|
|
846
874
|
target: a.clear
|
|
847
875
|
}), {
|
|
@@ -857,13 +885,13 @@ var Je = E("response"), Ye = j(({ client: e }) => {
|
|
|
857
885
|
getByFieldName: _
|
|
858
886
|
};
|
|
859
887
|
});
|
|
860
|
-
function
|
|
861
|
-
return
|
|
888
|
+
function Ze(e) {
|
|
889
|
+
return N(Xe, e);
|
|
862
890
|
}
|
|
863
891
|
//#endregion
|
|
864
892
|
//#region src/entities/condition/condition.ts
|
|
865
|
-
var
|
|
866
|
-
let e =
|
|
893
|
+
var Qe = D("condition"), $e = M(() => {
|
|
894
|
+
let e = Qe.store({}), t = E(e, { register(e, t) {
|
|
867
895
|
return {
|
|
868
896
|
...e,
|
|
869
897
|
[t.condition.id]: t.condition
|
|
@@ -887,12 +915,12 @@ var Ze = E("condition"), Qe = j(() => {
|
|
|
887
915
|
indexStore: e
|
|
888
916
|
};
|
|
889
917
|
});
|
|
890
|
-
function
|
|
891
|
-
return
|
|
918
|
+
function et() {
|
|
919
|
+
return N($e);
|
|
892
920
|
}
|
|
893
921
|
//#endregion
|
|
894
922
|
//#region src/utils/api-url.ts
|
|
895
|
-
function
|
|
923
|
+
function tt() {
|
|
896
924
|
if (f()) {
|
|
897
925
|
let e = [
|
|
898
926
|
document.currentScript,
|
|
@@ -907,7 +935,7 @@ function et() {
|
|
|
907
935
|
}
|
|
908
936
|
//#endregion
|
|
909
937
|
//#region src/utils/search-params.ts
|
|
910
|
-
function
|
|
938
|
+
function nt() {
|
|
911
939
|
if (!o()) return {};
|
|
912
940
|
let e = new URLSearchParams(window.location.search), t = {}, n = /* @__PURE__ */ new Set();
|
|
913
941
|
for (let [t] of e.entries()) t.startsWith("picked-") && n.add(t);
|
|
@@ -925,18 +953,18 @@ function tt() {
|
|
|
925
953
|
}
|
|
926
954
|
//#endregion
|
|
927
955
|
//#region src/utils/user-session.ts
|
|
928
|
-
function
|
|
956
|
+
function rt() {
|
|
929
957
|
return l() ? 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)}`;
|
|
930
958
|
}
|
|
931
|
-
var
|
|
932
|
-
let e = b.get(
|
|
959
|
+
var it = S("session", "global"), X = () => {
|
|
960
|
+
let e = b.get(it), t;
|
|
933
961
|
e.isSet() && (t = e.json());
|
|
934
962
|
let n = (t) => e.set({
|
|
935
963
|
id: t.id,
|
|
936
964
|
isUser: t.isUser,
|
|
937
965
|
identifiers: t.identifiers
|
|
938
966
|
}), r = {
|
|
939
|
-
id: t?.id ??
|
|
967
|
+
id: t?.id ?? rt(),
|
|
940
968
|
isUser: t?.isUser ?? void 0,
|
|
941
969
|
identifiers: t?.identifiers ?? void 0,
|
|
942
970
|
setIsUser(e) {
|
|
@@ -953,13 +981,13 @@ var rt = S("session", "global"), it = () => {
|
|
|
953
981
|
}
|
|
954
982
|
};
|
|
955
983
|
return n(r), r;
|
|
956
|
-
},
|
|
984
|
+
}, at = () => u() ? X() : null;
|
|
957
985
|
//#endregion
|
|
958
986
|
//#region src/utils/picked-config.ts
|
|
959
987
|
function Z() {
|
|
960
988
|
if (o()) return globalThis.window.pickedConfig;
|
|
961
989
|
}
|
|
962
|
-
function
|
|
990
|
+
function ot() {
|
|
963
991
|
if (!o()) return;
|
|
964
992
|
let e = Z(), t = e?.organizationId, n = e?.projectId;
|
|
965
993
|
return t && n ? {
|
|
@@ -967,7 +995,7 @@ function at() {
|
|
|
967
995
|
projectId: n
|
|
968
996
|
} : void 0;
|
|
969
997
|
}
|
|
970
|
-
function
|
|
998
|
+
function st() {
|
|
971
999
|
if (!f()) return;
|
|
972
1000
|
let e = document.getElementById("picked_script") || document.querySelector("script#picked") || document.getElementById("cvly");
|
|
973
1001
|
if (!e) return;
|
|
@@ -977,15 +1005,15 @@ function ot() {
|
|
|
977
1005
|
projectId: n
|
|
978
1006
|
} : void 0;
|
|
979
1007
|
}
|
|
980
|
-
function
|
|
1008
|
+
function ct(e) {
|
|
981
1009
|
let { organizationId: t, projectId: n } = e;
|
|
982
1010
|
if (t && n) return {
|
|
983
1011
|
organizationId: t,
|
|
984
1012
|
projectId: n
|
|
985
1013
|
};
|
|
986
|
-
let r =
|
|
1014
|
+
let r = ot();
|
|
987
1015
|
if (r) return r;
|
|
988
|
-
let i =
|
|
1016
|
+
let i = st();
|
|
989
1017
|
if (i) return i;
|
|
990
1018
|
throw Error("organizationId and projectId are required. You can provide them via one of:\n (1) createClient({ organizationId, projectId }) options;\n (2) window.pickedConfig = { organizationId, projectId };\n (3) a <script> tag with id 'picked_script', 'picked', or 'cvly' that includes data-organizationid/data-projectid (or organization-id/project-id) attributes.");
|
|
991
1019
|
}
|
|
@@ -994,7 +1022,7 @@ function st(e) {
|
|
|
994
1022
|
function Q(e) {
|
|
995
1023
|
return e == null || e === "" || Number.isNaN(e);
|
|
996
1024
|
}
|
|
997
|
-
var
|
|
1025
|
+
var lt = {
|
|
998
1026
|
default: (e, t) => Q(e) ? String(t ?? "") : String(e),
|
|
999
1027
|
append: (e, t) => t && !Q(e) ? `${e} ${t}` : e,
|
|
1000
1028
|
prepend: (e, t) => t && !Q(e) ? `${t} ${e}` : e,
|
|
@@ -1015,24 +1043,24 @@ var ct = {
|
|
|
1015
1043
|
return e instanceof Set ? t.format(Array.from(e).map(String)) : e;
|
|
1016
1044
|
}
|
|
1017
1045
|
};
|
|
1018
|
-
function
|
|
1046
|
+
function ut(e) {
|
|
1019
1047
|
return typeof e == "object" && !!e;
|
|
1020
1048
|
}
|
|
1021
|
-
function
|
|
1049
|
+
function dt(e, t) {
|
|
1022
1050
|
let n = t;
|
|
1023
|
-
for (let t of e.split(".")) if (
|
|
1051
|
+
for (let t of e.split(".")) if (ut(n) && t in n) n = n[t];
|
|
1024
1052
|
else return;
|
|
1025
1053
|
return typeof n == "function" ? n() : n;
|
|
1026
1054
|
}
|
|
1027
|
-
function
|
|
1028
|
-
let n = e.split("|").map((e) => e.trim()), r =
|
|
1055
|
+
function ft(e, t) {
|
|
1056
|
+
let n = e.split("|").map((e) => e.trim()), r = dt(n.shift() ?? "", t);
|
|
1029
1057
|
for (let e of n) {
|
|
1030
|
-
let [t, ...n] = e.split(":"), i = t?.trim() ?? "", a = n.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), o =
|
|
1058
|
+
let [t, ...n] = e.split(":"), i = t?.trim() ?? "", a = n.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), o = lt[i];
|
|
1031
1059
|
o && (r = o(r, a));
|
|
1032
1060
|
}
|
|
1033
1061
|
return Q(r) ? "" : typeof r == "object" ? JSON.stringify(r) : String(r);
|
|
1034
1062
|
}
|
|
1035
|
-
function
|
|
1063
|
+
function pt(e, t) {
|
|
1036
1064
|
let n = "", r = 0;
|
|
1037
1065
|
for (; r < e.length;) if (e[r] === "{" && e[r + 1] === "{") {
|
|
1038
1066
|
r += 2;
|
|
@@ -1044,7 +1072,7 @@ function ft(e, t) {
|
|
|
1044
1072
|
}
|
|
1045
1073
|
i += e[r++];
|
|
1046
1074
|
}
|
|
1047
|
-
n +=
|
|
1075
|
+
n += ft(i.trim(), t);
|
|
1048
1076
|
} else n += e[r++];
|
|
1049
1077
|
return n;
|
|
1050
1078
|
}
|
|
@@ -1056,7 +1084,7 @@ var $ = class {
|
|
|
1056
1084
|
isReady = !1;
|
|
1057
1085
|
plugins = {};
|
|
1058
1086
|
pluginStartHooks = [];
|
|
1059
|
-
eventBus =
|
|
1087
|
+
eventBus = k();
|
|
1060
1088
|
events;
|
|
1061
1089
|
organizationId;
|
|
1062
1090
|
projectId;
|
|
@@ -1067,23 +1095,23 @@ var $ = class {
|
|
|
1067
1095
|
precondition;
|
|
1068
1096
|
condition;
|
|
1069
1097
|
preconditionPassed;
|
|
1070
|
-
searchParams =
|
|
1071
|
-
history =
|
|
1098
|
+
searchParams = nt();
|
|
1099
|
+
history = ke();
|
|
1072
1100
|
components = V({ client: this });
|
|
1073
1101
|
experienceInstances = te({ client: this });
|
|
1074
|
-
experiences =
|
|
1102
|
+
experiences = ue({ client: this });
|
|
1075
1103
|
frameworks = he({ client: this });
|
|
1076
1104
|
predicates = Se({ client: this });
|
|
1077
1105
|
features = Te({ client: this });
|
|
1078
|
-
conditions =
|
|
1079
|
-
fields =
|
|
1080
|
-
responses =
|
|
1081
|
-
steps =
|
|
1082
|
-
actions =
|
|
1106
|
+
conditions = et();
|
|
1107
|
+
fields = Pe();
|
|
1108
|
+
responses = Ze({ client: this });
|
|
1109
|
+
steps = Le();
|
|
1110
|
+
actions = Ve({ client: this });
|
|
1083
1111
|
constructor(e) {
|
|
1084
|
-
this.events =
|
|
1085
|
-
let { organizationId: t, projectId: n } =
|
|
1086
|
-
this.organizationId = t, this.projectId = n, this.options = Object.freeze(e), this.apiUrl = e.apiUrl ||
|
|
1112
|
+
this.events = je(this.eventBus);
|
|
1113
|
+
let { organizationId: t, projectId: n } = ct(e);
|
|
1114
|
+
this.organizationId = t, this.projectId = n, this.options = Object.freeze(e), this.apiUrl = e.apiUrl || tt(), this.dashboardUrl = e.dashboardUrl ?? "https://dashboard.picked.app", this.documentationSiteUrl = e.documentationSiteUrl ?? "https://docs.picked.app", this.session = at(), this.setupPlugins(), this.setupFeatures(), this.setupPredicates(), this.setupActions(), this.setupComponents(), this.precondition = e.precondition, this.condition = e.condition, this.eventBus({
|
|
1087
1115
|
type: "load",
|
|
1088
1116
|
version: oe()
|
|
1089
1117
|
});
|
|
@@ -1104,7 +1132,7 @@ var $ = class {
|
|
|
1104
1132
|
value: e
|
|
1105
1133
|
});
|
|
1106
1134
|
}
|
|
1107
|
-
if (this.eventBus({ type: "initialize" }), n &&
|
|
1135
|
+
if (this.eventBus({ type: "initialize" }), n && I(this), await ne(), n && I(this), this.eventBus({ type: "ready" }), this.isReady = !0, this.session) {
|
|
1108
1136
|
let { id: e, isUser: t, identifiers: n } = this.session;
|
|
1109
1137
|
this.eventBus({
|
|
1110
1138
|
type: "session",
|
|
@@ -1122,7 +1150,7 @@ var $ = class {
|
|
|
1122
1150
|
H(e, t, this.components);
|
|
1123
1151
|
};
|
|
1124
1152
|
registerPlugin = (e) => {
|
|
1125
|
-
|
|
1153
|
+
de(this, e, this.plugins);
|
|
1126
1154
|
let t = this.plugins[e.name];
|
|
1127
1155
|
t?.onStart && this.pluginStartHooks.push(t.onStart);
|
|
1128
1156
|
};
|
|
@@ -1139,10 +1167,10 @@ var $ = class {
|
|
|
1139
1167
|
this.fields.register(e);
|
|
1140
1168
|
};
|
|
1141
1169
|
registerStep = (e) => {
|
|
1142
|
-
|
|
1170
|
+
Re(e, this.steps);
|
|
1143
1171
|
};
|
|
1144
1172
|
registerAction = (e, t) => {
|
|
1145
|
-
|
|
1173
|
+
He(e, t, this.actions);
|
|
1146
1174
|
};
|
|
1147
1175
|
registerExperience = (e) => {
|
|
1148
1176
|
e.component && H(`experience:${e.id}`, e.component, this.components), this.experiences.register(e);
|
|
@@ -1236,7 +1264,7 @@ var $ = class {
|
|
|
1236
1264
|
getPluginConfig = (e) => this.plugins[e] ?? {};
|
|
1237
1265
|
renderString = (e, t) => {
|
|
1238
1266
|
let n = this.responses.listStore.getState().reduce((e, t) => (e[t.fieldKey] = t.value, e), {});
|
|
1239
|
-
return
|
|
1267
|
+
return pt(e, {
|
|
1240
1268
|
...t,
|
|
1241
1269
|
responses: n
|
|
1242
1270
|
});
|
|
@@ -1244,20 +1272,20 @@ var $ = class {
|
|
|
1244
1272
|
};
|
|
1245
1273
|
//#endregion
|
|
1246
1274
|
//#region src/entities/component/lazyComponent.ts
|
|
1247
|
-
function
|
|
1275
|
+
function mt(e) {
|
|
1248
1276
|
return {
|
|
1249
1277
|
$$type: "lazy-component",
|
|
1250
1278
|
load: e
|
|
1251
1279
|
};
|
|
1252
1280
|
}
|
|
1253
|
-
function
|
|
1281
|
+
function ht(e) {
|
|
1254
1282
|
return typeof e == "object" && !!e && "$$type" in e && e.$$type === "lazy-component";
|
|
1255
1283
|
}
|
|
1256
1284
|
//#endregion
|
|
1257
1285
|
//#region src/exports.ts
|
|
1258
|
-
var
|
|
1286
|
+
var gt = (e) => {
|
|
1259
1287
|
let t = new $(e);
|
|
1260
1288
|
return d(t), t;
|
|
1261
1289
|
};
|
|
1262
1290
|
//#endregion
|
|
1263
|
-
export { $ as Picked,
|
|
1291
|
+
export { $ as Picked, gt as createClient, S as createStorageKey, t as evaluateRuleLogic, Z as getPickedConfig, ht as isLazyLoader, _ as isPickedRoot, mt as lazyComponent, b as localStore, x as sessionStore, ie as subscribe, m as supportsCookies, l as supportsCryptoRandomUUID, f as supportsDocument, s as supportsHistory, i as supportsIntersectionObserver, u as supportsLocalStorage, p as supportsLocation, a as supportsSessionStorage, c as supportsShadowRoot, h as supportsWebComponents, o as supportsWindow };
|