@picked/client 0.0.1-dev.1777867216429 → 0.0.1-dev.1777869768355
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-qBG8rsTJ.cjs → api-DT7ImnBi.cjs} +1 -1
- package/dist/{api-Xp22knXn.js → api-Dx9PpWfN.js} +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 -167
- 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 +14 -8
- package/dist/types/entities/history/history.d.ts.map +1 -1
- package/dist/types/picked.d.ts +8 -4
- 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-Dx9PpWfN.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,100 @@ 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
|
-
|
|
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 = -1, r = -1;
|
|
489
|
+
for (let i = e.length - 1; i >= 0; i--) {
|
|
490
|
+
let a = e[i];
|
|
491
|
+
if (!(!a || a.instanceId !== t || !v(a.node))) if (n === -1) n = i;
|
|
480
492
|
else {
|
|
481
|
-
|
|
493
|
+
r = i;
|
|
482
494
|
break;
|
|
483
495
|
}
|
|
484
496
|
}
|
|
497
|
+
return r === -1 ? e : e.filter((e, n) => e.instanceId !== t || n <= r);
|
|
498
|
+
}), e.on(i, (e, { snapshots: t }) => {
|
|
499
|
+
let n = [];
|
|
500
|
+
for (let e of Object.values(t)) n.push(...e);
|
|
485
501
|
return n;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
let
|
|
489
|
-
|
|
502
|
+
}), e.on(o, (e, t) => [...e, ...t]);
|
|
503
|
+
let s = e.map((e) => {
|
|
504
|
+
let t = {};
|
|
505
|
+
for (let n of e) {
|
|
506
|
+
let e = t[n.experienceId];
|
|
507
|
+
e ? e.push(n) : t[n.experienceId] = [n];
|
|
508
|
+
}
|
|
509
|
+
return t;
|
|
510
|
+
});
|
|
511
|
+
return j({
|
|
512
|
+
clock: a,
|
|
513
|
+
source: s,
|
|
514
|
+
fn: (e, { instanceId: t, experienceId: n }) => De(e[n] ?? []).map((e) => ({
|
|
490
515
|
...e,
|
|
491
|
-
|
|
492
|
-
|
|
516
|
+
id: C(`history-entry-${Date.now()}-${Math.random()}}`),
|
|
517
|
+
instanceId: t,
|
|
518
|
+
at: Date.now()
|
|
519
|
+
})),
|
|
520
|
+
target: o
|
|
493
521
|
}), {
|
|
494
522
|
push: t,
|
|
495
523
|
replace: n,
|
|
496
524
|
back: r,
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
entriesStore: e.map((e) => e
|
|
525
|
+
restoreSnapshots: i,
|
|
526
|
+
seedInstanceFromSnapshot: a,
|
|
527
|
+
entriesStore: e.map((e) => e),
|
|
528
|
+
snapshotStore: s
|
|
500
529
|
};
|
|
501
530
|
});
|
|
502
|
-
function
|
|
503
|
-
return
|
|
531
|
+
function ke() {
|
|
532
|
+
return N(Oe);
|
|
504
533
|
}
|
|
505
534
|
//#endregion
|
|
506
535
|
//#region src/utils/events.ts
|
|
507
|
-
var
|
|
508
|
-
let t =
|
|
509
|
-
return
|
|
536
|
+
var Ae = 0, je = (e) => {
|
|
537
|
+
let t = A([]);
|
|
538
|
+
return j({
|
|
510
539
|
clock: e,
|
|
511
540
|
source: t,
|
|
512
541
|
fn: (e, t) => [...e, {
|
|
513
|
-
id:
|
|
542
|
+
id: Ae++,
|
|
514
543
|
at: /* @__PURE__ */ new Date(),
|
|
515
544
|
payload: t
|
|
516
545
|
}],
|
|
517
546
|
target: t
|
|
518
547
|
}), t;
|
|
519
|
-
},
|
|
520
|
-
let e =
|
|
548
|
+
}, Me = D("field"), Ne = M(() => {
|
|
549
|
+
let e = Me.store({}), t = E(e, {
|
|
521
550
|
register(e, t) {
|
|
522
551
|
return {
|
|
523
552
|
...e,
|
|
@@ -561,13 +590,13 @@ var ke = 0, Ae = (e) => {
|
|
|
561
590
|
getByName: s
|
|
562
591
|
};
|
|
563
592
|
});
|
|
564
|
-
function
|
|
565
|
-
return
|
|
593
|
+
function Pe() {
|
|
594
|
+
return N(Ne);
|
|
566
595
|
}
|
|
567
596
|
//#endregion
|
|
568
597
|
//#region src/entities/step/step.ts
|
|
569
|
-
var
|
|
570
|
-
let e =
|
|
598
|
+
var Fe = D("step"), Ie = M(() => {
|
|
599
|
+
let e = Fe.store({}), t = E(e, { register(e, t) {
|
|
571
600
|
return {
|
|
572
601
|
...e,
|
|
573
602
|
[t.step.id]: t.step
|
|
@@ -591,16 +620,16 @@ var Pe = E("step"), Fe = j(() => {
|
|
|
591
620
|
indexStore: e
|
|
592
621
|
};
|
|
593
622
|
});
|
|
594
|
-
function
|
|
595
|
-
return
|
|
623
|
+
function Le() {
|
|
624
|
+
return N(Ie);
|
|
596
625
|
}
|
|
597
|
-
function
|
|
626
|
+
function Re(e, t) {
|
|
598
627
|
t.register(e);
|
|
599
628
|
}
|
|
600
629
|
//#endregion
|
|
601
630
|
//#region src/entities/action/action.ts
|
|
602
|
-
var
|
|
603
|
-
let t =
|
|
631
|
+
var ze = D("action"), Be = M(({ client: e }) => {
|
|
632
|
+
let t = ze.store({}), n = E(t, { register(e, t) {
|
|
604
633
|
return {
|
|
605
634
|
...e,
|
|
606
635
|
[t.key]: {
|
|
@@ -620,7 +649,7 @@ var Re = E("action"), ze = j(({ client: e }) => {
|
|
|
620
649
|
return t.map((t) => t[e]?.action, { skipVoid: !1 });
|
|
621
650
|
}
|
|
622
651
|
function o(t, n) {
|
|
623
|
-
let r =
|
|
652
|
+
let r = A(() => void 0, { skipVoid: !1 }), i = n ? { experience: n.experience } : null, o = O(async () => {
|
|
624
653
|
let n = a(t).getState();
|
|
625
654
|
if (!n) return;
|
|
626
655
|
let r = U(e);
|
|
@@ -629,13 +658,13 @@ var Re = E("action"), ze = j(({ client: e }) => {
|
|
|
629
658
|
args: e
|
|
630
659
|
}, i);
|
|
631
660
|
});
|
|
632
|
-
return
|
|
661
|
+
return j({
|
|
633
662
|
source: {
|
|
634
663
|
responses: e.responses.listStore,
|
|
635
664
|
fields: e.fields.listStore
|
|
636
665
|
},
|
|
637
666
|
target: o
|
|
638
|
-
}),
|
|
667
|
+
}), j({
|
|
639
668
|
clock: o.doneData,
|
|
640
669
|
filter: (e) => e !== void 0,
|
|
641
670
|
target: r
|
|
@@ -648,10 +677,10 @@ var Re = E("action"), ze = j(({ client: e }) => {
|
|
|
648
677
|
getEvokableAction: o
|
|
649
678
|
};
|
|
650
679
|
});
|
|
651
|
-
function
|
|
652
|
-
return
|
|
680
|
+
function Ve(e) {
|
|
681
|
+
return N(Be, e);
|
|
653
682
|
}
|
|
654
|
-
var
|
|
683
|
+
var He = (e, t, n) => {
|
|
655
684
|
n.register(e, t);
|
|
656
685
|
};
|
|
657
686
|
//#endregion
|
|
@@ -667,7 +696,7 @@ function q(e, t, n, r) {
|
|
|
667
696
|
function J(e) {
|
|
668
697
|
return e === null || e === "" || Array.isArray(e) && !e.length;
|
|
669
698
|
}
|
|
670
|
-
function
|
|
699
|
+
function Ue(e) {
|
|
671
700
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
|
|
672
701
|
}
|
|
673
702
|
function Y(e) {
|
|
@@ -677,13 +706,13 @@ function Y(e) {
|
|
|
677
706
|
return !1;
|
|
678
707
|
}
|
|
679
708
|
}
|
|
680
|
-
function
|
|
709
|
+
function We(e, t) {
|
|
681
710
|
return t.find((t) => t.key === e) ?? null;
|
|
682
711
|
}
|
|
683
|
-
function
|
|
712
|
+
function Ge(e, t) {
|
|
684
713
|
return e.multiple && (typeof t == "string" || typeof t == "number" || typeof t == "boolean") ? [t] : t;
|
|
685
714
|
}
|
|
686
|
-
function
|
|
715
|
+
function Ke(e, t) {
|
|
687
716
|
if (e.type !== "object" || J(t)) return null;
|
|
688
717
|
if (e.multiple) {
|
|
689
718
|
if (!Array.isArray(t)) return q(e, t, "This field expects multiple values", "Field expects an array of objects.");
|
|
@@ -695,7 +724,7 @@ function Ge(e, t) {
|
|
|
695
724
|
}
|
|
696
725
|
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
726
|
}
|
|
698
|
-
function
|
|
727
|
+
function qe(e, t) {
|
|
699
728
|
if (J(t) || !Array.isArray(e.options) || e.options.length === 0) return null;
|
|
700
729
|
let n = Array.isArray(t) ? t : [t];
|
|
701
730
|
if (e.type === "object") {
|
|
@@ -703,9 +732,9 @@ function Ke(e, t) {
|
|
|
703
732
|
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
733
|
}
|
|
705
734
|
let r = e.options.map((e) => e.value);
|
|
706
|
-
return n.every((e) => !
|
|
735
|
+
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
736
|
}
|
|
708
|
-
async function
|
|
737
|
+
async function Je(e, t, r, i) {
|
|
709
738
|
if (t.validation && !n(t.validation) && !J(r)) {
|
|
710
739
|
let n = i ? {
|
|
711
740
|
$input: r,
|
|
@@ -718,8 +747,8 @@ async function qe(e, t, r, i) {
|
|
|
718
747
|
}
|
|
719
748
|
//#endregion
|
|
720
749
|
//#region src/entities/response/response.ts
|
|
721
|
-
var
|
|
722
|
-
let n =
|
|
750
|
+
var Ye = D("response"), Xe = M(({ client: e }) => {
|
|
751
|
+
let n = Ye.store({}), r = k(), i = k(), a = E(n, {
|
|
723
752
|
register(e, t) {
|
|
724
753
|
return {
|
|
725
754
|
...e,
|
|
@@ -748,7 +777,7 @@ var Je = E("response"), Ye = j(({ client: e }) => {
|
|
|
748
777
|
});
|
|
749
778
|
} else a.registerBatch(e);
|
|
750
779
|
}
|
|
751
|
-
let s = (n, r) => t(e, n, r), c =
|
|
780
|
+
let s = (n, r) => t(e, n, r), c = w({
|
|
752
781
|
source: {
|
|
753
782
|
allFields: e.fields.listStore,
|
|
754
783
|
existingResponses: n
|
|
@@ -758,7 +787,7 @@ var Je = E("response"), Ye = j(({ client: e }) => {
|
|
|
758
787
|
...t,
|
|
759
788
|
...n
|
|
760
789
|
}, o = Object.entries(n), c = await Promise.allSettled(o.map(async ([t, n]) => {
|
|
761
|
-
let o =
|
|
790
|
+
let o = We(t, e);
|
|
762
791
|
if (!o) {
|
|
763
792
|
r.push({
|
|
764
793
|
fieldKey: t,
|
|
@@ -768,17 +797,17 @@ var Je = E("response"), Ye = j(({ client: e }) => {
|
|
|
768
797
|
});
|
|
769
798
|
return;
|
|
770
799
|
}
|
|
771
|
-
let c =
|
|
800
|
+
let c = Ge(o, n), l = await Je(s, o, c, a);
|
|
772
801
|
if (l) {
|
|
773
802
|
r.push(l);
|
|
774
803
|
return;
|
|
775
804
|
}
|
|
776
|
-
let u =
|
|
805
|
+
let u = Ke(o, c);
|
|
777
806
|
if (u) {
|
|
778
807
|
r.push(u);
|
|
779
808
|
return;
|
|
780
809
|
}
|
|
781
|
-
let d =
|
|
810
|
+
let d = qe(o, c);
|
|
782
811
|
if (d) {
|
|
783
812
|
r.push(d);
|
|
784
813
|
return;
|
|
@@ -806,7 +835,7 @@ var Je = E("response"), Ye = j(({ client: e }) => {
|
|
|
806
835
|
async function l(e) {
|
|
807
836
|
return c(e);
|
|
808
837
|
}
|
|
809
|
-
let u =
|
|
838
|
+
let u = w({
|
|
810
839
|
source: n,
|
|
811
840
|
effect: async (e, t) => {
|
|
812
841
|
let { responsesToCommit: n, validationErrors: r } = await c(t);
|
|
@@ -821,7 +850,7 @@ var Je = E("response"), Ye = j(({ client: e }) => {
|
|
|
821
850
|
value: t
|
|
822
851
|
})));
|
|
823
852
|
function m(e) {
|
|
824
|
-
return
|
|
853
|
+
return T({
|
|
825
854
|
f: e,
|
|
826
855
|
s: n
|
|
827
856
|
}, ({ f: e, s: t }) => {
|
|
@@ -838,10 +867,10 @@ var Je = E("response"), Ye = j(({ client: e }) => {
|
|
|
838
867
|
function _(t) {
|
|
839
868
|
return m(e.fields.getByName(t));
|
|
840
869
|
}
|
|
841
|
-
return
|
|
870
|
+
return j({
|
|
842
871
|
clock: r,
|
|
843
872
|
target: a.clearAll
|
|
844
|
-
}),
|
|
873
|
+
}), j({
|
|
845
874
|
clock: i,
|
|
846
875
|
target: a.clear
|
|
847
876
|
}), {
|
|
@@ -857,13 +886,13 @@ var Je = E("response"), Ye = j(({ client: e }) => {
|
|
|
857
886
|
getByFieldName: _
|
|
858
887
|
};
|
|
859
888
|
});
|
|
860
|
-
function
|
|
861
|
-
return
|
|
889
|
+
function Ze(e) {
|
|
890
|
+
return N(Xe, e);
|
|
862
891
|
}
|
|
863
892
|
//#endregion
|
|
864
893
|
//#region src/entities/condition/condition.ts
|
|
865
|
-
var
|
|
866
|
-
let e =
|
|
894
|
+
var Qe = D("condition"), $e = M(() => {
|
|
895
|
+
let e = Qe.store({}), t = E(e, { register(e, t) {
|
|
867
896
|
return {
|
|
868
897
|
...e,
|
|
869
898
|
[t.condition.id]: t.condition
|
|
@@ -887,12 +916,12 @@ var Ze = E("condition"), Qe = j(() => {
|
|
|
887
916
|
indexStore: e
|
|
888
917
|
};
|
|
889
918
|
});
|
|
890
|
-
function
|
|
891
|
-
return
|
|
919
|
+
function et() {
|
|
920
|
+
return N($e);
|
|
892
921
|
}
|
|
893
922
|
//#endregion
|
|
894
923
|
//#region src/utils/api-url.ts
|
|
895
|
-
function
|
|
924
|
+
function tt() {
|
|
896
925
|
if (f()) {
|
|
897
926
|
let e = [
|
|
898
927
|
document.currentScript,
|
|
@@ -907,7 +936,7 @@ function et() {
|
|
|
907
936
|
}
|
|
908
937
|
//#endregion
|
|
909
938
|
//#region src/utils/search-params.ts
|
|
910
|
-
function
|
|
939
|
+
function nt() {
|
|
911
940
|
if (!o()) return {};
|
|
912
941
|
let e = new URLSearchParams(window.location.search), t = {}, n = /* @__PURE__ */ new Set();
|
|
913
942
|
for (let [t] of e.entries()) t.startsWith("picked-") && n.add(t);
|
|
@@ -925,18 +954,18 @@ function tt() {
|
|
|
925
954
|
}
|
|
926
955
|
//#endregion
|
|
927
956
|
//#region src/utils/user-session.ts
|
|
928
|
-
function
|
|
957
|
+
function rt() {
|
|
929
958
|
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
959
|
}
|
|
931
|
-
var
|
|
932
|
-
let e = b.get(
|
|
960
|
+
var it = S("session", "global"), X = () => {
|
|
961
|
+
let e = b.get(it), t;
|
|
933
962
|
e.isSet() && (t = e.json());
|
|
934
963
|
let n = (t) => e.set({
|
|
935
964
|
id: t.id,
|
|
936
965
|
isUser: t.isUser,
|
|
937
966
|
identifiers: t.identifiers
|
|
938
967
|
}), r = {
|
|
939
|
-
id: t?.id ??
|
|
968
|
+
id: t?.id ?? rt(),
|
|
940
969
|
isUser: t?.isUser ?? void 0,
|
|
941
970
|
identifiers: t?.identifiers ?? void 0,
|
|
942
971
|
setIsUser(e) {
|
|
@@ -953,13 +982,13 @@ var rt = S("session", "global"), it = () => {
|
|
|
953
982
|
}
|
|
954
983
|
};
|
|
955
984
|
return n(r), r;
|
|
956
|
-
},
|
|
985
|
+
}, at = () => u() ? X() : null;
|
|
957
986
|
//#endregion
|
|
958
987
|
//#region src/utils/picked-config.ts
|
|
959
988
|
function Z() {
|
|
960
989
|
if (o()) return globalThis.window.pickedConfig;
|
|
961
990
|
}
|
|
962
|
-
function
|
|
991
|
+
function ot() {
|
|
963
992
|
if (!o()) return;
|
|
964
993
|
let e = Z(), t = e?.organizationId, n = e?.projectId;
|
|
965
994
|
return t && n ? {
|
|
@@ -967,7 +996,7 @@ function at() {
|
|
|
967
996
|
projectId: n
|
|
968
997
|
} : void 0;
|
|
969
998
|
}
|
|
970
|
-
function
|
|
999
|
+
function st() {
|
|
971
1000
|
if (!f()) return;
|
|
972
1001
|
let e = document.getElementById("picked_script") || document.querySelector("script#picked") || document.getElementById("cvly");
|
|
973
1002
|
if (!e) return;
|
|
@@ -977,15 +1006,15 @@ function ot() {
|
|
|
977
1006
|
projectId: n
|
|
978
1007
|
} : void 0;
|
|
979
1008
|
}
|
|
980
|
-
function
|
|
1009
|
+
function ct(e) {
|
|
981
1010
|
let { organizationId: t, projectId: n } = e;
|
|
982
1011
|
if (t && n) return {
|
|
983
1012
|
organizationId: t,
|
|
984
1013
|
projectId: n
|
|
985
1014
|
};
|
|
986
|
-
let r =
|
|
1015
|
+
let r = ot();
|
|
987
1016
|
if (r) return r;
|
|
988
|
-
let i =
|
|
1017
|
+
let i = st();
|
|
989
1018
|
if (i) return i;
|
|
990
1019
|
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
1020
|
}
|
|
@@ -994,7 +1023,7 @@ function st(e) {
|
|
|
994
1023
|
function Q(e) {
|
|
995
1024
|
return e == null || e === "" || Number.isNaN(e);
|
|
996
1025
|
}
|
|
997
|
-
var
|
|
1026
|
+
var lt = {
|
|
998
1027
|
default: (e, t) => Q(e) ? String(t ?? "") : String(e),
|
|
999
1028
|
append: (e, t) => t && !Q(e) ? `${e} ${t}` : e,
|
|
1000
1029
|
prepend: (e, t) => t && !Q(e) ? `${t} ${e}` : e,
|
|
@@ -1015,24 +1044,24 @@ var ct = {
|
|
|
1015
1044
|
return e instanceof Set ? t.format(Array.from(e).map(String)) : e;
|
|
1016
1045
|
}
|
|
1017
1046
|
};
|
|
1018
|
-
function
|
|
1047
|
+
function ut(e) {
|
|
1019
1048
|
return typeof e == "object" && !!e;
|
|
1020
1049
|
}
|
|
1021
|
-
function
|
|
1050
|
+
function dt(e, t) {
|
|
1022
1051
|
let n = t;
|
|
1023
|
-
for (let t of e.split(".")) if (
|
|
1052
|
+
for (let t of e.split(".")) if (ut(n) && t in n) n = n[t];
|
|
1024
1053
|
else return;
|
|
1025
1054
|
return typeof n == "function" ? n() : n;
|
|
1026
1055
|
}
|
|
1027
|
-
function
|
|
1028
|
-
let n = e.split("|").map((e) => e.trim()), r =
|
|
1056
|
+
function ft(e, t) {
|
|
1057
|
+
let n = e.split("|").map((e) => e.trim()), r = dt(n.shift() ?? "", t);
|
|
1029
1058
|
for (let e of n) {
|
|
1030
|
-
let [t, ...n] = e.split(":"), i = t?.trim() ?? "", a = n.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), o =
|
|
1059
|
+
let [t, ...n] = e.split(":"), i = t?.trim() ?? "", a = n.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), o = lt[i];
|
|
1031
1060
|
o && (r = o(r, a));
|
|
1032
1061
|
}
|
|
1033
1062
|
return Q(r) ? "" : typeof r == "object" ? JSON.stringify(r) : String(r);
|
|
1034
1063
|
}
|
|
1035
|
-
function
|
|
1064
|
+
function pt(e, t) {
|
|
1036
1065
|
let n = "", r = 0;
|
|
1037
1066
|
for (; r < e.length;) if (e[r] === "{" && e[r + 1] === "{") {
|
|
1038
1067
|
r += 2;
|
|
@@ -1044,7 +1073,7 @@ function ft(e, t) {
|
|
|
1044
1073
|
}
|
|
1045
1074
|
i += e[r++];
|
|
1046
1075
|
}
|
|
1047
|
-
n +=
|
|
1076
|
+
n += ft(i.trim(), t);
|
|
1048
1077
|
} else n += e[r++];
|
|
1049
1078
|
return n;
|
|
1050
1079
|
}
|
|
@@ -1056,7 +1085,7 @@ var $ = class {
|
|
|
1056
1085
|
isReady = !1;
|
|
1057
1086
|
plugins = {};
|
|
1058
1087
|
pluginStartHooks = [];
|
|
1059
|
-
eventBus =
|
|
1088
|
+
eventBus = k();
|
|
1060
1089
|
events;
|
|
1061
1090
|
organizationId;
|
|
1062
1091
|
projectId;
|
|
@@ -1067,23 +1096,23 @@ var $ = class {
|
|
|
1067
1096
|
precondition;
|
|
1068
1097
|
condition;
|
|
1069
1098
|
preconditionPassed;
|
|
1070
|
-
searchParams =
|
|
1071
|
-
history =
|
|
1099
|
+
searchParams = nt();
|
|
1100
|
+
history = ke();
|
|
1072
1101
|
components = V({ client: this });
|
|
1073
1102
|
experienceInstances = te({ client: this });
|
|
1074
|
-
experiences =
|
|
1103
|
+
experiences = ue({ client: this });
|
|
1075
1104
|
frameworks = he({ client: this });
|
|
1076
1105
|
predicates = Se({ client: this });
|
|
1077
1106
|
features = Te({ client: this });
|
|
1078
|
-
conditions =
|
|
1079
|
-
fields =
|
|
1080
|
-
responses =
|
|
1081
|
-
steps =
|
|
1082
|
-
actions =
|
|
1107
|
+
conditions = et();
|
|
1108
|
+
fields = Pe();
|
|
1109
|
+
responses = Ze({ client: this });
|
|
1110
|
+
steps = Le();
|
|
1111
|
+
actions = Ve({ client: this });
|
|
1083
1112
|
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 ||
|
|
1113
|
+
this.events = je(this.eventBus);
|
|
1114
|
+
let { organizationId: t, projectId: n } = ct(e);
|
|
1115
|
+
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
1116
|
type: "load",
|
|
1088
1117
|
version: oe()
|
|
1089
1118
|
});
|
|
@@ -1104,7 +1133,7 @@ var $ = class {
|
|
|
1104
1133
|
value: e
|
|
1105
1134
|
});
|
|
1106
1135
|
}
|
|
1107
|
-
if (this.eventBus({ type: "initialize" }), n &&
|
|
1136
|
+
if (this.eventBus({ type: "initialize" }), n && I(this), await ne(), n && I(this), this.eventBus({ type: "ready" }), this.isReady = !0, this.session) {
|
|
1108
1137
|
let { id: e, isUser: t, identifiers: n } = this.session;
|
|
1109
1138
|
this.eventBus({
|
|
1110
1139
|
type: "session",
|
|
@@ -1122,7 +1151,7 @@ var $ = class {
|
|
|
1122
1151
|
H(e, t, this.components);
|
|
1123
1152
|
};
|
|
1124
1153
|
registerPlugin = (e) => {
|
|
1125
|
-
|
|
1154
|
+
de(this, e, this.plugins);
|
|
1126
1155
|
let t = this.plugins[e.name];
|
|
1127
1156
|
t?.onStart && this.pluginStartHooks.push(t.onStart);
|
|
1128
1157
|
};
|
|
@@ -1139,10 +1168,10 @@ var $ = class {
|
|
|
1139
1168
|
this.fields.register(e);
|
|
1140
1169
|
};
|
|
1141
1170
|
registerStep = (e) => {
|
|
1142
|
-
|
|
1171
|
+
Re(e, this.steps);
|
|
1143
1172
|
};
|
|
1144
1173
|
registerAction = (e, t) => {
|
|
1145
|
-
|
|
1174
|
+
He(e, t, this.actions);
|
|
1146
1175
|
};
|
|
1147
1176
|
registerExperience = (e) => {
|
|
1148
1177
|
e.component && H(`experience:${e.id}`, e.component, this.components), this.experiences.register(e);
|
|
@@ -1236,7 +1265,7 @@ var $ = class {
|
|
|
1236
1265
|
getPluginConfig = (e) => this.plugins[e] ?? {};
|
|
1237
1266
|
renderString = (e, t) => {
|
|
1238
1267
|
let n = this.responses.listStore.getState().reduce((e, t) => (e[t.fieldKey] = t.value, e), {});
|
|
1239
|
-
return
|
|
1268
|
+
return pt(e, {
|
|
1240
1269
|
...t,
|
|
1241
1270
|
responses: n
|
|
1242
1271
|
});
|
|
@@ -1244,20 +1273,20 @@ var $ = class {
|
|
|
1244
1273
|
};
|
|
1245
1274
|
//#endregion
|
|
1246
1275
|
//#region src/entities/component/lazyComponent.ts
|
|
1247
|
-
function
|
|
1276
|
+
function mt(e) {
|
|
1248
1277
|
return {
|
|
1249
1278
|
$$type: "lazy-component",
|
|
1250
1279
|
load: e
|
|
1251
1280
|
};
|
|
1252
1281
|
}
|
|
1253
|
-
function
|
|
1282
|
+
function ht(e) {
|
|
1254
1283
|
return typeof e == "object" && !!e && "$$type" in e && e.$$type === "lazy-component";
|
|
1255
1284
|
}
|
|
1256
1285
|
//#endregion
|
|
1257
1286
|
//#region src/exports.ts
|
|
1258
|
-
var
|
|
1287
|
+
var gt = (e) => {
|
|
1259
1288
|
let t = new $(e);
|
|
1260
1289
|
return d(t), t;
|
|
1261
1290
|
};
|
|
1262
1291
|
//#endregion
|
|
1263
|
-
export { $ as Picked,
|
|
1292
|
+
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 };
|