@picked/client 0.0.1-dev.1777594341273 → 0.0.1-dev.1777601813342
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-DWa-ZqA4.cjs → api-BAOO2VZv.cjs} +1 -1
- package/dist/{api-DtOVNMSX.js → api-CiR56vZg.js} +1 -1
- package/dist/cjs/form/index.js +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/plugins/experience-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/history-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
- package/dist/cjs/plugins/responses-indexeddb/index.js +1 -1
- package/dist/cjs/plugins/single-page-app/index.js +1 -1
- package/dist/cjs/plugins/web-components/index.js +1 -1
- package/dist/cjs/plugins/window-object/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/docs/{actions.md → actions.mdx} +7 -0
- package/dist/docs/{api-keys.md → api-keys.mdx} +7 -0
- package/dist/docs/{conditions.md → conditions.mdx} +7 -0
- package/dist/docs/{experiences.md → experiences.mdx} +7 -0
- package/dist/docs/{features.md → features.mdx} +7 -0
- package/dist/docs/{fields.md → fields.mdx} +7 -0
- package/dist/docs/flow-builder/{overview.md → overview.mdx} +7 -0
- package/dist/docs/pickedql/data-sources.md +49 -2
- package/dist/docs/pickedql/dimensions.md +40 -0
- package/dist/docs/pickedql/examples.md +41 -1
- package/dist/docs/pickedql/filtering.md +22 -0
- package/dist/docs/pickedql/index.md +2 -1
- package/dist/docs/pickedql/schema.md +34 -1
- package/dist/docs/pickedql/virtual-functions.md +67 -11
- package/dist/docs/{projects.md → projects.mdx} +7 -0
- package/dist/docs/{reports.md → reports.mdx} +7 -0
- package/dist/docs/{steps.md → steps.mdx} +7 -0
- package/dist/docs/{workspaces.md → workspaces.mdx} +8 -0
- package/dist/esm/form/index.js +21 -6
- package/dist/esm/index.js +174 -174
- package/dist/esm/plugins/dynamic-experiences/index.js +1 -1
- package/dist/esm/plugins/experience-browser-storage/index.js +20 -18
- package/dist/esm/plugins/history-browser-storage/index.js +17 -15
- package/dist/esm/plugins/responses-browser-storage/index.js +21 -19
- package/dist/esm/plugins/responses-indexeddb/index.js +37 -35
- package/dist/esm/plugins/single-page-app/index.js +88 -42
- package/dist/esm/plugins/web-components/index.js +2 -2
- package/dist/esm/plugins/window-object/index.js +1 -1
- package/dist/esm/server/index.js +1 -1
- package/dist/{experience-CNIhapU2.js → experience-CR19HpPg.js} +2 -2
- package/dist/{experience-CTEBY-it.cjs → experience-DOWnsvA1.cjs} +1 -1
- package/dist/experience-instance-C2jZU8ho.cjs +1 -0
- package/dist/{experience-instance-B0tFPMAU.js → experience-instance-CGLdwg--.js} +12 -8
- package/dist/{nodes-2fst8XKi.js → nodes-Bmzx3TP_.js} +7 -7
- package/dist/{nodes-DBK4N9YY.cjs → nodes-Dx9bxj35.cjs} +1 -1
- package/dist/{rules-logic-D7dL30U1.js → rules-logic-CvILqbhz.js} +8 -5
- package/dist/{rules-logic-DJhGFqhC.cjs → rules-logic-DV5SUr5M.cjs} +1 -1
- package/dist/supports-DFDQ6eJO.cjs +1 -0
- package/dist/{supports-B_trw6lj.js → supports-DUJbucFW.js} +18 -9
- package/dist/types/entities/action/action.d.ts +30 -4
- package/dist/types/entities/action/action.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts +4 -2
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/entities/framework/framework.d.ts +12 -2
- package/dist/types/entities/framework/framework.d.ts.map +1 -1
- package/dist/types/entities/response/response-validation.d.ts +17 -17
- package/dist/types/entities/response/response-validation.d.ts.map +1 -1
- package/dist/types/form/create-field-evaluator.d.ts.map +1 -1
- package/dist/types/form/create-submit-pipeline.d.ts.map +1 -1
- package/dist/types/picked.d.ts +3 -1
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-indexeddb/plugin.d.ts.map +1 -1
- package/dist/types/plugins/single-page-app/plugin.d.ts +64 -12
- package/dist/types/plugins/single-page-app/plugin.d.ts.map +1 -1
- package/dist/types/utils/global-obj.d.ts +5 -0
- package/dist/types/utils/global-obj.d.ts.map +1 -1
- package/dist/types/utils/supports.d.ts +113 -0
- package/dist/types/utils/supports.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/experience-instance-BN0RZG1b.cjs +0 -1
- package/dist/supports-CKSVYpQx.cjs +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { r as e, t } from "../rules-logic-
|
|
1
|
+
import { r as e, t } from "../rules-logic-CvILqbhz.js";
|
|
2
2
|
import { t as n } from "../logger-C44jSdYl.js";
|
|
3
|
-
import { a as r, c as i, d as a,
|
|
4
|
-
import { a as
|
|
5
|
-
import { n as v, t as
|
|
6
|
-
import { i as
|
|
7
|
-
import { n as
|
|
8
|
-
import { n as
|
|
9
|
-
import { t as
|
|
10
|
-
import { attach as
|
|
11
|
-
import { createFactory as
|
|
3
|
+
import { a as r, c as i, d as a, f as o, i as s, l as c, m as l, n as u, o as d, r as f, s as p, t as m, u as h } from "../supports-DUJbucFW.js";
|
|
4
|
+
import { a as g, c as _, u as ee } from "../nodes-Bmzx3TP_.js";
|
|
5
|
+
import { n as v, t as te } from "../experience-CR19HpPg.js";
|
|
6
|
+
import { i as ne, n as y, r as b, t as x } from "../storage-6Xk0uAxB.js";
|
|
7
|
+
import { n as S, r as C } from "../api-CiR56vZg.js";
|
|
8
|
+
import { n as re } from "../experience-instance-CGLdwg--.js";
|
|
9
|
+
import { t as ie } from "../id-n2yrHvNo.js";
|
|
10
|
+
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";
|
|
11
|
+
import { createFactory as M, invoke as N } from "@withease/factories";
|
|
12
12
|
//#region src/entities/plugin/plugin.ts
|
|
13
13
|
var ae = (e, t, n) => {
|
|
14
14
|
let r = t.name, i = t.setup(e);
|
|
@@ -19,16 +19,16 @@ var ae = (e, t, n) => {
|
|
|
19
19
|
...i
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
|
-
}, oe =
|
|
22
|
+
}, oe = D("component"), se = M(({ client: e, component: t, name: n }) => ({
|
|
23
23
|
name: n,
|
|
24
24
|
component: t,
|
|
25
25
|
frameworkStore: e.frameworks.getByName(t.frameworkName)
|
|
26
26
|
}));
|
|
27
27
|
function ce(e) {
|
|
28
|
-
return
|
|
28
|
+
return N(se, e);
|
|
29
29
|
}
|
|
30
|
-
var le =
|
|
31
|
-
let t = oe.store({}), n =
|
|
30
|
+
var le = M(({ client: e }) => {
|
|
31
|
+
let t = oe.store({}), n = E(t, { register(e, t) {
|
|
32
32
|
return {
|
|
33
33
|
...e,
|
|
34
34
|
[t.name]: t
|
|
@@ -54,12 +54,12 @@ var le = j(({ client: e }) => {
|
|
|
54
54
|
};
|
|
55
55
|
});
|
|
56
56
|
function ue(e) {
|
|
57
|
-
return
|
|
57
|
+
return N(le, e);
|
|
58
58
|
}
|
|
59
|
-
var
|
|
59
|
+
var P = (e, t, n) => {
|
|
60
60
|
n.register(e, t);
|
|
61
|
-
},
|
|
62
|
-
let t =
|
|
61
|
+
}, F = D("framework"), I = M(({ client: e }) => {
|
|
62
|
+
let t = F.store({}), n = E(t, { register(e, t) {
|
|
63
63
|
return {
|
|
64
64
|
...e,
|
|
65
65
|
[t.name]: t.framework
|
|
@@ -81,21 +81,21 @@ var N = (e, t, n) => {
|
|
|
81
81
|
listStore: i
|
|
82
82
|
};
|
|
83
83
|
});
|
|
84
|
-
function
|
|
85
|
-
return
|
|
84
|
+
function L(e) {
|
|
85
|
+
return N(I, e);
|
|
86
86
|
}
|
|
87
|
-
var
|
|
87
|
+
var R = (e, t) => {
|
|
88
88
|
t.register(e.name, e);
|
|
89
|
-
},
|
|
89
|
+
}, z = 6e3, B = x("last_ping", "global"), V = async (e) => {
|
|
90
90
|
try {
|
|
91
|
-
let t = Date.now(), n = y.get(
|
|
92
|
-
if (n.isSet() && (r = n.json() ?? 0), r && t - r <
|
|
91
|
+
let t = Date.now(), n = y.get(B), r = 0;
|
|
92
|
+
if (n.isSet() && (r = n.json() ?? 0), r && t - r < z) return !0;
|
|
93
93
|
let i = {
|
|
94
94
|
projectId: e.projectId,
|
|
95
95
|
path: window.location.pathname
|
|
96
96
|
}, a = {}, o = document.getElementById("picked_script")?.dataset.verceltoken;
|
|
97
97
|
o && (a["x-vercel-protection-bypass"] = o);
|
|
98
|
-
let s = (await
|
|
98
|
+
let s = (await S(e.apiUrl, "ping", i, a)).ok;
|
|
99
99
|
return s && n.set(t), s;
|
|
100
100
|
} catch {
|
|
101
101
|
return !1;
|
|
@@ -103,7 +103,7 @@ var L = (e, t) => {
|
|
|
103
103
|
};
|
|
104
104
|
//#endregion
|
|
105
105
|
//#region src/utils/state-snaphot.ts
|
|
106
|
-
function
|
|
106
|
+
function H(e) {
|
|
107
107
|
let t = typeof window < "u", n = {
|
|
108
108
|
client: e,
|
|
109
109
|
responses: e.responses.listStore.getState(),
|
|
@@ -117,8 +117,8 @@ function V(e) {
|
|
|
117
117
|
}
|
|
118
118
|
//#endregion
|
|
119
119
|
//#region src/entities/predicate/predicate.ts
|
|
120
|
-
var
|
|
121
|
-
let t =
|
|
120
|
+
var U = D("predicate"), de = M(({ client: e }) => {
|
|
121
|
+
let t = U.store({}), n = E(t, { register(e, t) {
|
|
122
122
|
return {
|
|
123
123
|
...e,
|
|
124
124
|
[t.name]: {
|
|
@@ -138,22 +138,22 @@ var H = E("predicate"), U = j(({ client: e }) => {
|
|
|
138
138
|
return t.map((t) => t[e]?.predicate, { skipVoid: !1 });
|
|
139
139
|
}
|
|
140
140
|
function o(t) {
|
|
141
|
-
let n =
|
|
141
|
+
let n = A(() => void 0, { skipVoid: !1 }), r = O(async () => {
|
|
142
142
|
let n = a(t).getState();
|
|
143
143
|
if (!n) return;
|
|
144
|
-
let r =
|
|
144
|
+
let r = H(e);
|
|
145
145
|
return (...e) => n({
|
|
146
146
|
...r,
|
|
147
147
|
args: e
|
|
148
148
|
});
|
|
149
149
|
});
|
|
150
|
-
return
|
|
150
|
+
return j({
|
|
151
151
|
source: {
|
|
152
152
|
responses: e.responses.listStore,
|
|
153
153
|
fields: e.fields.listStore
|
|
154
154
|
},
|
|
155
155
|
target: r
|
|
156
|
-
}),
|
|
156
|
+
}), j({
|
|
157
157
|
clock: r.doneData,
|
|
158
158
|
filter: (e) => e !== void 0,
|
|
159
159
|
target: n
|
|
@@ -166,13 +166,13 @@ var H = E("predicate"), U = j(({ client: e }) => {
|
|
|
166
166
|
getEvokablePredicate: o
|
|
167
167
|
};
|
|
168
168
|
});
|
|
169
|
-
function
|
|
170
|
-
return
|
|
169
|
+
function fe(e) {
|
|
170
|
+
return N(de, e);
|
|
171
171
|
}
|
|
172
|
-
var
|
|
172
|
+
var pe = (e, t, n) => {
|
|
173
173
|
n.register(e, t);
|
|
174
|
-
}, W =
|
|
175
|
-
let t = W.store({}), n = W.store([]), r =
|
|
174
|
+
}, W = D("feature"), me = M(({ client: e }) => {
|
|
175
|
+
let t = W.store({}), n = W.store([]), r = E(t, { register(e, t) {
|
|
176
176
|
return {
|
|
177
177
|
...e,
|
|
178
178
|
[t.id]: t.feature
|
|
@@ -192,7 +192,7 @@ var fe = (e, t, n) => {
|
|
|
192
192
|
feature: i
|
|
193
193
|
}));
|
|
194
194
|
}
|
|
195
|
-
let a =
|
|
195
|
+
let a = O(async ({ id: e, key: t, storage: n = "local" }) => {
|
|
196
196
|
let r = x(`feature:${e}:${t}`, "global"), i = (n === "session" ? b : y).get(r).boolean();
|
|
197
197
|
return i === null ? null : {
|
|
198
198
|
id: e,
|
|
@@ -200,11 +200,11 @@ var fe = (e, t, n) => {
|
|
|
200
200
|
bucket: i,
|
|
201
201
|
storage: n
|
|
202
202
|
};
|
|
203
|
-
}), o =
|
|
203
|
+
}), o = O((e) => {
|
|
204
204
|
if (!e) return null;
|
|
205
205
|
let t = x(`feature:${e.id}:${e.key}`, "global");
|
|
206
206
|
(e.storage === "session" ? b : y).set(t, e.bucket);
|
|
207
|
-
}), s = /* @__PURE__ */ new Map(), c =
|
|
207
|
+
}), s = /* @__PURE__ */ new Map(), c = w({
|
|
208
208
|
source: {
|
|
209
209
|
allFeaturesStore: t,
|
|
210
210
|
resolvedFeaturesStore: n
|
|
@@ -235,7 +235,7 @@ var fe = (e, t, n) => {
|
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
237
|
});
|
|
238
|
-
|
|
238
|
+
j({
|
|
239
239
|
clock: r.register,
|
|
240
240
|
fn: (e) => {
|
|
241
241
|
let { id: t, feature: n } = e;
|
|
@@ -246,7 +246,7 @@ var fe = (e, t, n) => {
|
|
|
246
246
|
};
|
|
247
247
|
},
|
|
248
248
|
target: a
|
|
249
|
-
}),
|
|
249
|
+
}), j({
|
|
250
250
|
source: t,
|
|
251
251
|
clock: c.doneData,
|
|
252
252
|
fn: (e, t) => {
|
|
@@ -260,7 +260,7 @@ var fe = (e, t, n) => {
|
|
|
260
260
|
},
|
|
261
261
|
target: o
|
|
262
262
|
});
|
|
263
|
-
let l =
|
|
263
|
+
let l = T({
|
|
264
264
|
allFeaturesStore: t,
|
|
265
265
|
resolvedFeaturesStore: n
|
|
266
266
|
}).map(({ allFeaturesStore: e, resolvedFeaturesStore: t }) => Object.values(e).map((e) => {
|
|
@@ -282,7 +282,7 @@ var fe = (e, t, n) => {
|
|
|
282
282
|
isResolved: !1
|
|
283
283
|
};
|
|
284
284
|
}));
|
|
285
|
-
|
|
285
|
+
j({
|
|
286
286
|
clock: c.doneData,
|
|
287
287
|
source: { resolvedFeatures: n },
|
|
288
288
|
filter: ({ resolvedFeatures: e }, { id: t, key: n }) => !e.some((e) => e.id === t && e.key === n),
|
|
@@ -291,7 +291,7 @@ var fe = (e, t, n) => {
|
|
|
291
291
|
type: "feature_decide",
|
|
292
292
|
feature: e
|
|
293
293
|
}))
|
|
294
|
-
}),
|
|
294
|
+
}), j({
|
|
295
295
|
clock: [a.doneData, c.doneData],
|
|
296
296
|
source: n,
|
|
297
297
|
fn: (e, t) => !t || e.some((e) => e.id === t.id && e.key === t.key) ? e : [...e, t],
|
|
@@ -304,15 +304,15 @@ var fe = (e, t, n) => {
|
|
|
304
304
|
return t.map((t) => t[e], { skipVoid: !1 });
|
|
305
305
|
}
|
|
306
306
|
function f(e) {
|
|
307
|
-
let t =
|
|
307
|
+
let t = A(async () => void 0, { skipVoid: !1 }), r = O(async () => {
|
|
308
308
|
let t = u(e).getState();
|
|
309
309
|
if (t) return async () => (await t.getBucket()).bucket;
|
|
310
310
|
});
|
|
311
|
-
return
|
|
311
|
+
return j({
|
|
312
312
|
source: n,
|
|
313
313
|
filter: (t) => t.some((t) => t.id === e),
|
|
314
314
|
target: r
|
|
315
|
-
}),
|
|
315
|
+
}), j({
|
|
316
316
|
clock: r.doneData,
|
|
317
317
|
filter: (e) => e !== void 0,
|
|
318
318
|
target: t
|
|
@@ -326,21 +326,21 @@ var fe = (e, t, n) => {
|
|
|
326
326
|
getEvokableFeature: f
|
|
327
327
|
};
|
|
328
328
|
});
|
|
329
|
-
function
|
|
330
|
-
return
|
|
329
|
+
function he(e) {
|
|
330
|
+
return N(me, e);
|
|
331
331
|
}
|
|
332
|
-
var
|
|
332
|
+
var ge = (e, t, n) => {
|
|
333
333
|
n.register(e, t);
|
|
334
|
-
}, G =
|
|
334
|
+
}, G = D("history");
|
|
335
335
|
function K(e, t) {
|
|
336
336
|
return {
|
|
337
|
-
id:
|
|
337
|
+
id: ie(`history-entry-${Date.now()}-${Math.random()}}`),
|
|
338
338
|
node: t,
|
|
339
339
|
at: Date.now(),
|
|
340
340
|
experienceId: e
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
|
-
var
|
|
343
|
+
var _e = M(() => {
|
|
344
344
|
let e = G.store({ entries: [] }), t = G.event(), n = G.event(), r = G.event(), i = G.event();
|
|
345
345
|
e.on(t, (e, t) => ({ entries: [...e.entries, K(t.experienceId, t.node)] })), e.on(n, (e, t) => ({ entries: [...e.entries.slice(0, -1), K(t.experienceId, t.node)] })), e.on(i, (e, t) => t);
|
|
346
346
|
function a(e, t) {
|
|
@@ -350,7 +350,7 @@ var ge = j(() => {
|
|
|
350
350
|
};
|
|
351
351
|
for (let r = e.length - 1; r >= 0; r--) {
|
|
352
352
|
let i = e[r], a = i?.node;
|
|
353
|
-
if (!(!a || !
|
|
353
|
+
if (!(!a || !g(a)) && !(t && i.experienceId !== t)) if (n.lastStepIndex === -1) n.lastStepIndex = r;
|
|
354
354
|
else {
|
|
355
355
|
n.secondLastStepIndex = r;
|
|
356
356
|
break;
|
|
@@ -372,25 +372,25 @@ var ge = j(() => {
|
|
|
372
372
|
entriesStore: e.map((e) => e.entries)
|
|
373
373
|
};
|
|
374
374
|
});
|
|
375
|
-
function
|
|
376
|
-
return
|
|
375
|
+
function ve() {
|
|
376
|
+
return N(_e);
|
|
377
377
|
}
|
|
378
378
|
//#endregion
|
|
379
379
|
//#region src/utils/events.ts
|
|
380
|
-
var
|
|
381
|
-
let t =
|
|
382
|
-
return
|
|
380
|
+
var ye = 0, be = (e) => {
|
|
381
|
+
let t = A([]);
|
|
382
|
+
return j({
|
|
383
383
|
clock: e,
|
|
384
384
|
source: t,
|
|
385
385
|
fn: (e, t) => [...e, {
|
|
386
|
-
id:
|
|
386
|
+
id: ye++,
|
|
387
387
|
at: /* @__PURE__ */ new Date(),
|
|
388
388
|
payload: t
|
|
389
389
|
}],
|
|
390
390
|
target: t
|
|
391
391
|
}), t;
|
|
392
|
-
},
|
|
393
|
-
let e =
|
|
392
|
+
}, xe = D("field"), Se = M(() => {
|
|
393
|
+
let e = xe.store({}), t = E(e, {
|
|
394
394
|
register(e, t) {
|
|
395
395
|
return {
|
|
396
396
|
...e,
|
|
@@ -434,13 +434,13 @@ var ve = 0, ye = (e) => {
|
|
|
434
434
|
getByName: s
|
|
435
435
|
};
|
|
436
436
|
});
|
|
437
|
-
function
|
|
438
|
-
return
|
|
437
|
+
function Ce() {
|
|
438
|
+
return N(Se);
|
|
439
439
|
}
|
|
440
440
|
//#endregion
|
|
441
441
|
//#region src/entities/step/step.ts
|
|
442
|
-
var
|
|
443
|
-
let e =
|
|
442
|
+
var we = D("step"), Te = M(() => {
|
|
443
|
+
let e = we.store({}), t = E(e, { register(e, t) {
|
|
444
444
|
return {
|
|
445
445
|
...e,
|
|
446
446
|
[t.step.id]: t.step
|
|
@@ -464,16 +464,16 @@ var Ce = E("step"), we = j(() => {
|
|
|
464
464
|
indexStore: e
|
|
465
465
|
};
|
|
466
466
|
});
|
|
467
|
-
function
|
|
468
|
-
return
|
|
467
|
+
function Ee() {
|
|
468
|
+
return N(Te);
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function De(e, t) {
|
|
471
471
|
t.register(e);
|
|
472
472
|
}
|
|
473
473
|
//#endregion
|
|
474
474
|
//#region src/entities/action/action.ts
|
|
475
|
-
var
|
|
476
|
-
let t =
|
|
475
|
+
var Oe = D("action"), ke = M(({ client: e }) => {
|
|
476
|
+
let t = Oe.store({}), n = E(t, { register(e, t) {
|
|
477
477
|
return {
|
|
478
478
|
...e,
|
|
479
479
|
[t.key]: {
|
|
@@ -492,27 +492,27 @@ var De = E("action"), Oe = j(({ client: e }) => {
|
|
|
492
492
|
function a(e) {
|
|
493
493
|
return t.map((t) => t[e]?.action, { skipVoid: !1 });
|
|
494
494
|
}
|
|
495
|
-
function o(t) {
|
|
496
|
-
let
|
|
495
|
+
function o(t, n) {
|
|
496
|
+
let r = A(() => void 0, { skipVoid: !1 }), i = n ? { experience: n.experience } : null, o = O(async () => {
|
|
497
497
|
let n = a(t).getState();
|
|
498
498
|
if (!n) return;
|
|
499
|
-
let r =
|
|
499
|
+
let r = H(e);
|
|
500
500
|
return (...e) => n({
|
|
501
501
|
...r,
|
|
502
502
|
args: e
|
|
503
|
-
});
|
|
503
|
+
}, i);
|
|
504
504
|
});
|
|
505
|
-
return
|
|
505
|
+
return j({
|
|
506
506
|
source: {
|
|
507
507
|
responses: e.responses.listStore,
|
|
508
508
|
fields: e.fields.listStore
|
|
509
509
|
},
|
|
510
|
-
target:
|
|
511
|
-
}),
|
|
512
|
-
clock:
|
|
510
|
+
target: o
|
|
511
|
+
}), j({
|
|
512
|
+
clock: o.doneData,
|
|
513
513
|
filter: (e) => e !== void 0,
|
|
514
|
-
target:
|
|
515
|
-
}),
|
|
514
|
+
target: r
|
|
515
|
+
}), o(), r;
|
|
516
516
|
}
|
|
517
517
|
return {
|
|
518
518
|
register: r,
|
|
@@ -521,10 +521,10 @@ var De = E("action"), Oe = j(({ client: e }) => {
|
|
|
521
521
|
getEvokableAction: o
|
|
522
522
|
};
|
|
523
523
|
});
|
|
524
|
-
function
|
|
525
|
-
return
|
|
524
|
+
function Ae(e) {
|
|
525
|
+
return N(ke, e);
|
|
526
526
|
}
|
|
527
|
-
var
|
|
527
|
+
var je = (e, t, n) => {
|
|
528
528
|
n.register(e, t);
|
|
529
529
|
};
|
|
530
530
|
//#endregion
|
|
@@ -538,9 +538,9 @@ function q(e, t, n, r) {
|
|
|
538
538
|
};
|
|
539
539
|
}
|
|
540
540
|
function J(e) {
|
|
541
|
-
return e
|
|
541
|
+
return e === null || e === "" || Array.isArray(e) && !e.length;
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function Me(e) {
|
|
544
544
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
|
|
545
545
|
}
|
|
546
546
|
function Y(e) {
|
|
@@ -550,13 +550,13 @@ function Y(e) {
|
|
|
550
550
|
return !1;
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function Ne(e, t) {
|
|
554
554
|
return t.find((t) => t.key === e) ?? null;
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function Pe(e, t) {
|
|
557
557
|
return e.multiple && (typeof t == "string" || typeof t == "number" || typeof t == "boolean") ? [t] : t;
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function Fe(e, t) {
|
|
560
560
|
if (e.type !== "object" || J(t)) return null;
|
|
561
561
|
if (e.multiple) {
|
|
562
562
|
if (!Array.isArray(t)) return q(e, t, "This field expects multiple values", "Field expects an array of objects.");
|
|
@@ -568,17 +568,17 @@ function Pe(e, t) {
|
|
|
568
568
|
}
|
|
569
569
|
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.).");
|
|
570
570
|
}
|
|
571
|
-
function
|
|
572
|
-
if (!Array.isArray(e.options) || e.options.length === 0) return null;
|
|
571
|
+
function Ie(e, t) {
|
|
572
|
+
if (J(t) || !Array.isArray(e.options) || e.options.length === 0) return null;
|
|
573
573
|
let n = Array.isArray(t) ? t : [t];
|
|
574
574
|
if (e.type === "object") {
|
|
575
|
-
let r = e.options.map((e) => JSON.stringify(e.value));
|
|
576
|
-
return n.every((e) => r.
|
|
575
|
+
let r = new Set(e.options.map((e) => JSON.stringify(e.value)));
|
|
576
|
+
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.");
|
|
577
577
|
}
|
|
578
578
|
let r = e.options.map((e) => e.value);
|
|
579
|
-
return n.every((e) => !
|
|
579
|
+
return n.every((e) => !Me(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(", ")}`);
|
|
580
580
|
}
|
|
581
|
-
async function
|
|
581
|
+
async function Le(t, n, r, i) {
|
|
582
582
|
if (n.validation && !e(n.validation) && !J(r)) {
|
|
583
583
|
let e = i ? {
|
|
584
584
|
$input: r,
|
|
@@ -591,8 +591,8 @@ async function Ie(t, n, r, i) {
|
|
|
591
591
|
}
|
|
592
592
|
//#endregion
|
|
593
593
|
//#region src/entities/response/response.ts
|
|
594
|
-
var
|
|
595
|
-
let n =
|
|
594
|
+
var Re = D("response"), ze = M(({ client: e }) => {
|
|
595
|
+
let n = Re.store({}), r = k(), i = k(), a = E(n, {
|
|
596
596
|
register(e, t) {
|
|
597
597
|
return {
|
|
598
598
|
...e,
|
|
@@ -621,7 +621,7 @@ var Le = E("response"), Re = j(({ client: e }) => {
|
|
|
621
621
|
});
|
|
622
622
|
} else a.registerBatch(e);
|
|
623
623
|
}
|
|
624
|
-
let s = (n, r) => t(e, n, r), c =
|
|
624
|
+
let s = (n, r) => t(e, n, r), c = w({
|
|
625
625
|
source: {
|
|
626
626
|
allFields: e.fields.listStore,
|
|
627
627
|
existingResponses: n
|
|
@@ -631,7 +631,7 @@ var Le = E("response"), Re = j(({ client: e }) => {
|
|
|
631
631
|
...t,
|
|
632
632
|
...n
|
|
633
633
|
}, o = Object.entries(n), c = await Promise.allSettled(o.map(async ([t, n]) => {
|
|
634
|
-
let o =
|
|
634
|
+
let o = Ne(t, e);
|
|
635
635
|
if (!o) {
|
|
636
636
|
r.push({
|
|
637
637
|
fieldKey: t,
|
|
@@ -641,17 +641,17 @@ var Le = E("response"), Re = j(({ client: e }) => {
|
|
|
641
641
|
});
|
|
642
642
|
return;
|
|
643
643
|
}
|
|
644
|
-
let c =
|
|
644
|
+
let c = Pe(o, n), l = await Le(s, o, c, a);
|
|
645
645
|
if (l) {
|
|
646
646
|
r.push(l);
|
|
647
647
|
return;
|
|
648
648
|
}
|
|
649
|
-
let u =
|
|
649
|
+
let u = Fe(o, c);
|
|
650
650
|
if (u) {
|
|
651
651
|
r.push(u);
|
|
652
652
|
return;
|
|
653
653
|
}
|
|
654
|
-
let d =
|
|
654
|
+
let d = Ie(o, c);
|
|
655
655
|
if (d) {
|
|
656
656
|
r.push(d);
|
|
657
657
|
return;
|
|
@@ -679,7 +679,7 @@ var Le = E("response"), Re = j(({ client: e }) => {
|
|
|
679
679
|
async function l(e) {
|
|
680
680
|
return c(e);
|
|
681
681
|
}
|
|
682
|
-
let u =
|
|
682
|
+
let u = w({
|
|
683
683
|
source: n,
|
|
684
684
|
effect: async (e, t) => {
|
|
685
685
|
let { responsesToCommit: n, validationErrors: r } = await c(t);
|
|
@@ -694,7 +694,7 @@ var Le = E("response"), Re = j(({ client: e }) => {
|
|
|
694
694
|
value: t
|
|
695
695
|
})));
|
|
696
696
|
function m(e) {
|
|
697
|
-
return
|
|
697
|
+
return T({
|
|
698
698
|
f: e,
|
|
699
699
|
s: n
|
|
700
700
|
}, ({ f: e, s: t }) => {
|
|
@@ -711,10 +711,10 @@ var Le = E("response"), Re = j(({ client: e }) => {
|
|
|
711
711
|
function _(t) {
|
|
712
712
|
return m(e.fields.getByName(t));
|
|
713
713
|
}
|
|
714
|
-
return
|
|
714
|
+
return j({
|
|
715
715
|
clock: r,
|
|
716
716
|
target: a.clearAll
|
|
717
|
-
}),
|
|
717
|
+
}), j({
|
|
718
718
|
clock: i,
|
|
719
719
|
target: a.clear
|
|
720
720
|
}), {
|
|
@@ -730,13 +730,13 @@ var Le = E("response"), Re = j(({ client: e }) => {
|
|
|
730
730
|
getByFieldName: _
|
|
731
731
|
};
|
|
732
732
|
});
|
|
733
|
-
function
|
|
734
|
-
return
|
|
733
|
+
function Be(e) {
|
|
734
|
+
return N(ze, e);
|
|
735
735
|
}
|
|
736
736
|
//#endregion
|
|
737
737
|
//#region src/entities/condition/condition.ts
|
|
738
|
-
var
|
|
739
|
-
let e =
|
|
738
|
+
var Ve = D("condition"), He = M(() => {
|
|
739
|
+
let e = Ve.store({}), t = E(e, { register(e, t) {
|
|
740
740
|
return {
|
|
741
741
|
...e,
|
|
742
742
|
[t.condition.id]: t.condition
|
|
@@ -760,13 +760,13 @@ var Be = E("condition"), Ve = j(() => {
|
|
|
760
760
|
indexStore: e
|
|
761
761
|
};
|
|
762
762
|
});
|
|
763
|
-
function
|
|
764
|
-
return
|
|
763
|
+
function Ue() {
|
|
764
|
+
return N(He);
|
|
765
765
|
}
|
|
766
766
|
//#endregion
|
|
767
767
|
//#region src/utils/api-url.ts
|
|
768
|
-
function
|
|
769
|
-
if (
|
|
768
|
+
function We() {
|
|
769
|
+
if (f()) {
|
|
770
770
|
let e = [
|
|
771
771
|
document.currentScript,
|
|
772
772
|
document.getElementById("picked_script"),
|
|
@@ -780,8 +780,8 @@ function Ue() {
|
|
|
780
780
|
}
|
|
781
781
|
//#endregion
|
|
782
782
|
//#region src/utils/search-params.ts
|
|
783
|
-
function
|
|
784
|
-
if (!
|
|
783
|
+
function Ge() {
|
|
784
|
+
if (!o()) return {};
|
|
785
785
|
let e = new URLSearchParams(window.location.search), t = {}, n = /* @__PURE__ */ new Set();
|
|
786
786
|
for (let [t] of e.entries()) t.startsWith("picked-") && n.add(t);
|
|
787
787
|
for (let r of n) {
|
|
@@ -798,18 +798,18 @@ function We() {
|
|
|
798
798
|
}
|
|
799
799
|
//#endregion
|
|
800
800
|
//#region src/utils/user-session.ts
|
|
801
|
-
function
|
|
802
|
-
return
|
|
801
|
+
function Ke() {
|
|
802
|
+
return u() ? 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)}`;
|
|
803
803
|
}
|
|
804
|
-
var
|
|
805
|
-
let e = y.get(
|
|
804
|
+
var qe = x("session", "global"), Je = () => {
|
|
805
|
+
let e = y.get(qe), t;
|
|
806
806
|
e.isSet() && (t = e.json());
|
|
807
807
|
let n = (t) => e.set({
|
|
808
808
|
id: t.id,
|
|
809
809
|
isUser: t.isUser,
|
|
810
810
|
identifiers: t.identifiers
|
|
811
811
|
}), r = {
|
|
812
|
-
id: t?.id ??
|
|
812
|
+
id: t?.id ?? Ke(),
|
|
813
813
|
isUser: t?.isUser ?? void 0,
|
|
814
814
|
identifiers: t?.identifiers ?? void 0,
|
|
815
815
|
setIsUser(e) {
|
|
@@ -826,22 +826,22 @@ var Ke = x("session", "global"), qe = () => {
|
|
|
826
826
|
}
|
|
827
827
|
};
|
|
828
828
|
return n(r), r;
|
|
829
|
-
},
|
|
829
|
+
}, Ye = () => d() ? Je() : null;
|
|
830
830
|
//#endregion
|
|
831
831
|
//#region src/utils/picked-config.ts
|
|
832
832
|
function X() {
|
|
833
|
-
if (
|
|
833
|
+
if (o()) return globalThis.window.pickedConfig;
|
|
834
834
|
}
|
|
835
|
-
function
|
|
836
|
-
if (!
|
|
835
|
+
function Xe() {
|
|
836
|
+
if (!o()) return;
|
|
837
837
|
let e = X(), t = e?.organizationId, n = e?.projectId;
|
|
838
838
|
return t && n ? {
|
|
839
839
|
organizationId: t,
|
|
840
840
|
projectId: n
|
|
841
841
|
} : void 0;
|
|
842
842
|
}
|
|
843
|
-
function
|
|
844
|
-
if (!
|
|
843
|
+
function Z() {
|
|
844
|
+
if (!f()) return;
|
|
845
845
|
let e = document.getElementById("picked_script") || document.querySelector("script#picked") || document.getElementById("cvly");
|
|
846
846
|
if (!e) return;
|
|
847
847
|
let t = e.dataset.organizationid || e.getAttribute("organization-id"), n = e.dataset.projectid || e.getAttribute("project-id");
|
|
@@ -850,15 +850,15 @@ function Xe() {
|
|
|
850
850
|
projectId: n
|
|
851
851
|
} : void 0;
|
|
852
852
|
}
|
|
853
|
-
function
|
|
853
|
+
function Ze(e) {
|
|
854
854
|
let { organizationId: t, projectId: n } = e;
|
|
855
855
|
if (t && n) return {
|
|
856
856
|
organizationId: t,
|
|
857
857
|
projectId: n
|
|
858
858
|
};
|
|
859
|
-
let r =
|
|
859
|
+
let r = Xe();
|
|
860
860
|
if (r) return r;
|
|
861
|
-
let i =
|
|
861
|
+
let i = Z();
|
|
862
862
|
if (i) return i;
|
|
863
863
|
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.");
|
|
864
864
|
}
|
|
@@ -867,7 +867,7 @@ function Z(e) {
|
|
|
867
867
|
function Q(e) {
|
|
868
868
|
return e == null || e === "" || Number.isNaN(e);
|
|
869
869
|
}
|
|
870
|
-
var
|
|
870
|
+
var Qe = {
|
|
871
871
|
default: (e, t) => Q(e) ? String(t ?? "") : String(e),
|
|
872
872
|
append: (e, t) => t && !Q(e) ? `${e} ${t}` : e,
|
|
873
873
|
prepend: (e, t) => t && !Q(e) ? `${t} ${e}` : e,
|
|
@@ -888,24 +888,24 @@ var Ze = {
|
|
|
888
888
|
return e instanceof Set ? t.format(Array.from(e).map(String)) : e;
|
|
889
889
|
}
|
|
890
890
|
};
|
|
891
|
-
function
|
|
891
|
+
function $e(e) {
|
|
892
892
|
return typeof e == "object" && !!e;
|
|
893
893
|
}
|
|
894
|
-
function
|
|
894
|
+
function et(e, t) {
|
|
895
895
|
let n = t;
|
|
896
|
-
for (let t of e.split(".")) if (
|
|
896
|
+
for (let t of e.split(".")) if ($e(n) && t in n) n = n[t];
|
|
897
897
|
else return;
|
|
898
898
|
return typeof n == "function" ? n() : n;
|
|
899
899
|
}
|
|
900
|
-
function
|
|
901
|
-
let n = e.split("|").map((e) => e.trim()), r =
|
|
900
|
+
function tt(e, t) {
|
|
901
|
+
let n = e.split("|").map((e) => e.trim()), r = et(n.shift() ?? "", t);
|
|
902
902
|
for (let e of n) {
|
|
903
|
-
let [t, ...n] = e.split(":"), i = t?.trim() ?? "", a = n.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), o =
|
|
903
|
+
let [t, ...n] = e.split(":"), i = t?.trim() ?? "", a = n.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), o = Qe[i];
|
|
904
904
|
o && (r = o(r, a));
|
|
905
905
|
}
|
|
906
906
|
return Q(r) ? "" : typeof r == "object" ? JSON.stringify(r) : String(r);
|
|
907
907
|
}
|
|
908
|
-
function
|
|
908
|
+
function nt(e, t) {
|
|
909
909
|
let n = "", r = 0;
|
|
910
910
|
for (; r < e.length;) if (e[r] === "{" && e[r + 1] === "{") {
|
|
911
911
|
r += 2;
|
|
@@ -917,7 +917,7 @@ function tt(e, t) {
|
|
|
917
917
|
}
|
|
918
918
|
i += e[r++];
|
|
919
919
|
}
|
|
920
|
-
n +=
|
|
920
|
+
n += tt(i.trim(), t);
|
|
921
921
|
} else n += e[r++];
|
|
922
922
|
return n;
|
|
923
923
|
}
|
|
@@ -929,7 +929,7 @@ var $ = class {
|
|
|
929
929
|
isReady = !1;
|
|
930
930
|
plugins = {};
|
|
931
931
|
pluginStartHooks = [];
|
|
932
|
-
eventBus =
|
|
932
|
+
eventBus = k();
|
|
933
933
|
events;
|
|
934
934
|
organizationId;
|
|
935
935
|
projectId;
|
|
@@ -940,30 +940,30 @@ var $ = class {
|
|
|
940
940
|
precondition;
|
|
941
941
|
condition;
|
|
942
942
|
preconditionPassed;
|
|
943
|
-
searchParams =
|
|
944
|
-
history =
|
|
943
|
+
searchParams = Ge();
|
|
944
|
+
history = ve();
|
|
945
945
|
components = ue({ client: this });
|
|
946
|
-
experienceInstances =
|
|
947
|
-
experiences =
|
|
948
|
-
frameworks =
|
|
949
|
-
predicates =
|
|
950
|
-
features =
|
|
951
|
-
conditions =
|
|
952
|
-
fields =
|
|
953
|
-
responses =
|
|
954
|
-
steps =
|
|
955
|
-
actions =
|
|
946
|
+
experienceInstances = re({ client: this });
|
|
947
|
+
experiences = te({ client: this });
|
|
948
|
+
frameworks = L({ client: this });
|
|
949
|
+
predicates = fe({ client: this });
|
|
950
|
+
features = he({ client: this });
|
|
951
|
+
conditions = Ue();
|
|
952
|
+
fields = Ce();
|
|
953
|
+
responses = Be({ client: this });
|
|
954
|
+
steps = Ee();
|
|
955
|
+
actions = Ae({ client: this });
|
|
956
956
|
constructor(e) {
|
|
957
|
-
this.events =
|
|
958
|
-
let { organizationId: t, projectId: n } =
|
|
959
|
-
this.organizationId = t, this.projectId = n, this.options = Object.freeze(e), this.apiUrl = e.apiUrl ||
|
|
957
|
+
this.events = be(this.eventBus);
|
|
958
|
+
let { organizationId: t, projectId: n } = Ze(e);
|
|
959
|
+
this.organizationId = t, this.projectId = n, this.options = Object.freeze(e), this.apiUrl = e.apiUrl || We(), this.dashboardUrl = e.dashboardUrl ?? "https://dashboard.picked.app", this.documentationSiteUrl = e.documentationSiteUrl ?? "https://docs.picked.app", this.session = Ye(), this.setupPlugins(), this.setupFeatures(), this.setupPredicates(), this.setupActions(), this.setupComponents(), this.precondition = e.precondition, this.condition = e.condition, this.eventBus({
|
|
960
960
|
type: "load",
|
|
961
|
-
version:
|
|
961
|
+
version: C()
|
|
962
962
|
});
|
|
963
963
|
}
|
|
964
964
|
start = () => {
|
|
965
|
-
|
|
966
|
-
if (!
|
|
965
|
+
V(this), (async () => {
|
|
966
|
+
if (!f()) return;
|
|
967
967
|
await this.runPluginStartHooks();
|
|
968
968
|
let e = await this.evaluateGate(this.precondition);
|
|
969
969
|
this.preconditionPassed = e;
|
|
@@ -977,7 +977,7 @@ var $ = class {
|
|
|
977
977
|
value: e
|
|
978
978
|
});
|
|
979
979
|
}
|
|
980
|
-
if (this.eventBus({ type: "initialize" }), n && v(this), await
|
|
980
|
+
if (this.eventBus({ type: "initialize" }), n && v(this), await _(), n && v(this), this.eventBus({ type: "ready" }), this.isReady = !0, this.session) {
|
|
981
981
|
let { id: e, isUser: t, identifiers: n } = this.session;
|
|
982
982
|
this.eventBus({
|
|
983
983
|
type: "session",
|
|
@@ -989,10 +989,10 @@ var $ = class {
|
|
|
989
989
|
})();
|
|
990
990
|
};
|
|
991
991
|
registerFramework = (e) => {
|
|
992
|
-
|
|
992
|
+
R(e, this.frameworks);
|
|
993
993
|
};
|
|
994
994
|
registerComponent = (e, t) => {
|
|
995
|
-
|
|
995
|
+
P(e, t, this.components);
|
|
996
996
|
};
|
|
997
997
|
registerPlugin = (e) => {
|
|
998
998
|
ae(this, e, this.plugins);
|
|
@@ -1000,10 +1000,10 @@ var $ = class {
|
|
|
1000
1000
|
t?.onStart && this.pluginStartHooks.push(t.onStart);
|
|
1001
1001
|
};
|
|
1002
1002
|
registerFeature = (e, t) => {
|
|
1003
|
-
|
|
1003
|
+
ge(e, t, this.features);
|
|
1004
1004
|
};
|
|
1005
1005
|
registerPredicate = (e, t) => {
|
|
1006
|
-
|
|
1006
|
+
pe(e, t, this.predicates);
|
|
1007
1007
|
};
|
|
1008
1008
|
registerCondition = (e) => {
|
|
1009
1009
|
this.conditions.register(e);
|
|
@@ -1012,15 +1012,15 @@ var $ = class {
|
|
|
1012
1012
|
this.fields.register(e);
|
|
1013
1013
|
};
|
|
1014
1014
|
registerStep = (e) => {
|
|
1015
|
-
|
|
1015
|
+
De(e, this.steps);
|
|
1016
1016
|
};
|
|
1017
1017
|
registerAction = (e, t) => {
|
|
1018
|
-
|
|
1018
|
+
je(e, t, this.actions);
|
|
1019
1019
|
};
|
|
1020
1020
|
registerExperience = (e) => {
|
|
1021
|
-
e.component &&
|
|
1021
|
+
e.component && P(`experience:${e.id}`, e.component, this.components), this.experiences.register(e);
|
|
1022
1022
|
};
|
|
1023
|
-
getStateSnapshot = () =>
|
|
1023
|
+
getStateSnapshot = () => H(this);
|
|
1024
1024
|
launchExperienceById = async (e, t) => {
|
|
1025
1025
|
this.experiences.launch({
|
|
1026
1026
|
id: e,
|
|
@@ -1109,7 +1109,7 @@ var $ = class {
|
|
|
1109
1109
|
getPluginConfig = (e) => this.plugins[e] ?? {};
|
|
1110
1110
|
renderString = (e, t) => {
|
|
1111
1111
|
let n = this.responses.listStore.getState().reduce((e, t) => (e[t.fieldKey] = t.value, e), {});
|
|
1112
|
-
return
|
|
1112
|
+
return nt(e, {
|
|
1113
1113
|
...t,
|
|
1114
1114
|
responses: n
|
|
1115
1115
|
});
|
|
@@ -1117,20 +1117,20 @@ var $ = class {
|
|
|
1117
1117
|
};
|
|
1118
1118
|
//#endregion
|
|
1119
1119
|
//#region src/entities/component/lazyComponent.ts
|
|
1120
|
-
function
|
|
1120
|
+
function rt(e) {
|
|
1121
1121
|
return {
|
|
1122
1122
|
$$type: "lazy-component",
|
|
1123
1123
|
load: e
|
|
1124
1124
|
};
|
|
1125
1125
|
}
|
|
1126
|
-
function
|
|
1126
|
+
function it(e) {
|
|
1127
1127
|
return typeof e == "object" && !!e && "$$type" in e && e.$$type === "lazy-component";
|
|
1128
1128
|
}
|
|
1129
1129
|
//#endregion
|
|
1130
1130
|
//#region src/exports.ts
|
|
1131
|
-
var
|
|
1131
|
+
var at = (e) => {
|
|
1132
1132
|
let t = new $(e);
|
|
1133
|
-
return
|
|
1133
|
+
return l(t), t;
|
|
1134
1134
|
};
|
|
1135
1135
|
//#endregion
|
|
1136
|
-
export { $ as Picked,
|
|
1136
|
+
export { $ as Picked, at as createClient, x as createStorageKey, t as evaluateRuleLogic, X as getPickedConfig, it as isLazyLoader, ee as isPickedRoot, rt as lazyComponent, y as localStore, b as sessionStore, ne as subscribe, m as supportsCookies, u as supportsCryptoRandomUUID, f as supportsDocument, s as supportsHistory, r as supportsIntersectionObserver, d as supportsLocalStorage, p as supportsLocation, i as supportsNavigation, c as supportsSessionStorage, h as supportsShadowRoot, a as supportsWebComponents, o as supportsWindow };
|