@picked/client 0.0.39-next.1 → 0.0.39-next.3
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/cjs/index.js +2 -2
- package/dist/cjs/plugins/create-experience/index.js +1 -1
- package/dist/cjs/plugins/experience-browser-storage/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/esm/index.js +551 -470
- package/dist/esm/plugins/create-experience/index.js +91 -82
- package/dist/esm/plugins/experience-browser-storage/index.js +12 -13
- package/dist/esm/server/index.js +1 -1
- package/dist/experience-instance-D0bQ9DzM.js +815 -0
- package/dist/experience-instance-D8RtqKEZ.cjs +1 -0
- package/dist/types/entities/experience-instance/experience-instance.d.ts +30 -118
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/entities/field/field.d.ts +31 -55
- package/dist/types/entities/field/field.d.ts.map +1 -1
- package/dist/types/entities/response/response.d.ts +9 -5
- package/dist/types/entities/response/response.d.ts.map +1 -1
- package/dist/types/picked.d.ts +6 -79
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/create-experience.d.ts +28 -5
- package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
- package/dist/types/utils/events.d.ts +10 -10
- package/dist/types/utils/events.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/experience-instance-CKiUCMCP.js +0 -815
- package/dist/experience-instance-yl7BWjFA.cjs +0 -1
package/dist/esm/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { createDomain as
|
|
2
|
-
import { createFactory as w, invoke as
|
|
3
|
-
import { g as q, t as
|
|
4
|
-
import { f as
|
|
1
|
+
import { createDomain as x, createApi as j, createStore as H, createEffect as $, sample as F, attach as Z, combine as V, createEvent as D } from "effector";
|
|
2
|
+
import { createFactory as w, invoke as b } from "@withease/factories";
|
|
3
|
+
import { g as q, t as ee, c as te, i as re, e as E, a as se, b as ne, d as ie } from "../experience-instance-D0bQ9DzM.js";
|
|
4
|
+
import { f as At } from "../experience-instance-D0bQ9DzM.js";
|
|
5
5
|
import { l as k } from "../logger-C9a75KZn.js";
|
|
6
|
-
import { c as A, l as C, s as
|
|
7
|
-
import { a as
|
|
8
|
-
import { g as
|
|
9
|
-
import { i as
|
|
10
|
-
import { s as
|
|
11
|
-
import { e as
|
|
12
|
-
const K =
|
|
6
|
+
import { c as A, l as C, s as O } from "../storage-Co_LbKr_.js";
|
|
7
|
+
import { a as Rt } from "../storage-Co_LbKr_.js";
|
|
8
|
+
import { g as oe } from "../id-BW-g3y32.js";
|
|
9
|
+
import { i as ae } from "../object-JwZ58NOH.js";
|
|
10
|
+
import { s as N, a as T, b as ce, c as ue, d as de } from "../supports-8YT4QKI7.js";
|
|
11
|
+
import { e as zt, f as Ct, g as Ot, h as Mt, i as Vt, j as Dt, k as Nt } from "../supports-8YT4QKI7.js";
|
|
12
|
+
const K = x("experience"), le = w(
|
|
13
13
|
({ client: t, experience: e }) => {
|
|
14
|
-
const r = K.store(e),
|
|
14
|
+
const r = K.store(e), s = j(r, {
|
|
15
15
|
merge(p, h) {
|
|
16
16
|
return {
|
|
17
17
|
...p,
|
|
@@ -23,7 +23,7 @@ const K = b("experience"), de = w(
|
|
|
23
23
|
decisionLogic: p.condition ?? p.decide,
|
|
24
24
|
targetSelectors: p.targets,
|
|
25
25
|
initializeOpenLogic: e.initializeOpen
|
|
26
|
-
})),
|
|
26
|
+
})), d = t.components.listStore.map(
|
|
27
27
|
(p) => p.find((h) => h.name === `experience:${e.id}`) || p.find((h) => h.name === "experience"),
|
|
28
28
|
{ skipVoid: !1 }
|
|
29
29
|
), o = r.map((p) => ({
|
|
@@ -31,170 +31,170 @@ const K = b("experience"), de = w(
|
|
|
31
31
|
nodes: p.nodes,
|
|
32
32
|
edges: p.edges,
|
|
33
33
|
conditionals: p.conditionals
|
|
34
|
-
})),
|
|
34
|
+
})), n = r.map((p) => p.fields), l = e.actions ?? [];
|
|
35
35
|
return {
|
|
36
36
|
id: e.id,
|
|
37
37
|
configStore: i,
|
|
38
38
|
treeStore: o,
|
|
39
|
-
fieldsStore:
|
|
40
|
-
componentStore:
|
|
41
|
-
actions:
|
|
42
|
-
merge:
|
|
39
|
+
fieldsStore: n,
|
|
40
|
+
componentStore: d,
|
|
41
|
+
actions: l,
|
|
42
|
+
merge: s.merge
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
);
|
|
46
|
-
function
|
|
47
|
-
return
|
|
46
|
+
function pe(t) {
|
|
47
|
+
return b(le, t);
|
|
48
48
|
}
|
|
49
|
-
const
|
|
50
|
-
const e = K.store({}), r =
|
|
51
|
-
register(o,
|
|
49
|
+
const fe = w(({ client: t }) => {
|
|
50
|
+
const e = K.store({}), r = j(e, {
|
|
51
|
+
register(o, n) {
|
|
52
52
|
return {
|
|
53
53
|
...o,
|
|
54
|
-
[
|
|
54
|
+
[n.id]: n
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
|
-
function
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
-
|
|
58
|
+
function s(o) {
|
|
59
|
+
const n = e.getState()[o.id];
|
|
60
|
+
if (n) {
|
|
61
|
+
n.merge({ experience: o, strategy: "override" });
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
|
-
const
|
|
65
|
-
r.register(
|
|
64
|
+
const l = pe({ client: t, experience: o });
|
|
65
|
+
r.register(l);
|
|
66
66
|
}
|
|
67
67
|
const i = e.map((o) => Object.values(o));
|
|
68
|
-
function
|
|
69
|
-
return e.map((
|
|
68
|
+
function d(o) {
|
|
69
|
+
return e.map((n) => n[o], { skipVoid: !1 });
|
|
70
70
|
}
|
|
71
71
|
return {
|
|
72
|
-
register:
|
|
73
|
-
getById:
|
|
72
|
+
register: s,
|
|
73
|
+
getById: d,
|
|
74
74
|
listStore: i
|
|
75
75
|
};
|
|
76
76
|
});
|
|
77
|
-
function
|
|
78
|
-
return
|
|
77
|
+
function ge(t) {
|
|
78
|
+
return b(fe, t);
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const me = (t, e) => {
|
|
81
81
|
e.register(t);
|
|
82
82
|
}, W = (t, e) => {
|
|
83
|
-
const { targetSelectors: r } = e.configStore.getState(),
|
|
84
|
-
|
|
85
|
-
({ elements:
|
|
86
|
-
),
|
|
87
|
-
t.experienceInstances.spawn(e,
|
|
83
|
+
const { targetSelectors: r } = e.configStore.getState(), s = q(r, e.id);
|
|
84
|
+
s.forEach(
|
|
85
|
+
({ elements: d }) => d.forEach((o) => ee(o, e.id))
|
|
86
|
+
), te(s, e.id).forEach((d) => {
|
|
87
|
+
t.experienceInstances.spawn(e, d);
|
|
88
88
|
});
|
|
89
|
-
},
|
|
89
|
+
}, U = async (t) => {
|
|
90
90
|
await Promise.all(
|
|
91
91
|
t.experiences.listStore.getState().map(async (e) => {
|
|
92
|
-
await
|
|
92
|
+
await he(t, e) && W(t, e);
|
|
93
93
|
})
|
|
94
94
|
);
|
|
95
|
-
},
|
|
96
|
-
const { decisionLogic: r, targetSelectors:
|
|
97
|
-
return q(
|
|
98
|
-
},
|
|
99
|
-
const
|
|
95
|
+
}, he = async (t, e) => {
|
|
96
|
+
const { decisionLogic: r, targetSelectors: s } = e.configStore.getState();
|
|
97
|
+
return q(s, e.id).length < 1 || s.length === 0 ? !1 : r && re(r) ? await E(t, r) === !0 : !0;
|
|
98
|
+
}, ye = (t, e, r) => {
|
|
99
|
+
const s = e.name, i = e.setup(t);
|
|
100
100
|
if (i) {
|
|
101
|
-
const
|
|
102
|
-
r[
|
|
101
|
+
const d = r[s] ?? {};
|
|
102
|
+
r[s] = Object.freeze({ ...d, ...i });
|
|
103
103
|
}
|
|
104
|
-
},
|
|
104
|
+
}, Se = x("component"), ve = w(
|
|
105
105
|
({ client: t, component: e, name: r }) => {
|
|
106
|
-
const
|
|
106
|
+
const s = t.frameworks.getByName(e.frameworkName);
|
|
107
107
|
return {
|
|
108
108
|
name: r,
|
|
109
109
|
component: e,
|
|
110
|
-
frameworkStore:
|
|
110
|
+
frameworkStore: s
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
114
|
function ke(t) {
|
|
115
|
-
return
|
|
115
|
+
return b(ve, t);
|
|
116
116
|
}
|
|
117
117
|
const we = w(({ client: t }) => {
|
|
118
|
-
const e =
|
|
119
|
-
register(o,
|
|
118
|
+
const e = Se.store({}), r = j(e, {
|
|
119
|
+
register(o, n) {
|
|
120
120
|
return {
|
|
121
121
|
...o,
|
|
122
|
-
[
|
|
122
|
+
[n.name]: n
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
125
|
});
|
|
126
|
-
function
|
|
126
|
+
function s(o, n) {
|
|
127
127
|
e.getState()[o] && k(
|
|
128
128
|
"warn",
|
|
129
129
|
`Component '${o}' already registered. Registering again will override the previous registration.`
|
|
130
130
|
);
|
|
131
|
-
const p = ke({ client: t, name: o, component:
|
|
131
|
+
const p = ke({ client: t, name: o, component: n });
|
|
132
132
|
r.register(p);
|
|
133
133
|
}
|
|
134
134
|
const i = e.map((o) => Object.values(o));
|
|
135
|
-
function
|
|
136
|
-
return e.map((
|
|
135
|
+
function d(o) {
|
|
136
|
+
return e.map((n) => n[o], { skipVoid: !1 });
|
|
137
137
|
}
|
|
138
138
|
return {
|
|
139
|
-
register:
|
|
140
|
-
getByName:
|
|
139
|
+
register: s,
|
|
140
|
+
getByName: d,
|
|
141
141
|
listStore: i
|
|
142
142
|
};
|
|
143
143
|
});
|
|
144
|
-
function
|
|
145
|
-
return
|
|
144
|
+
function be(t) {
|
|
145
|
+
return b(we, t);
|
|
146
146
|
}
|
|
147
|
-
const
|
|
147
|
+
const _ = (t, e, r) => {
|
|
148
148
|
r.register(t, e);
|
|
149
|
-
}, Ie =
|
|
150
|
-
const e = Ie.store({}), r =
|
|
151
|
-
register(o,
|
|
149
|
+
}, Ie = x("framework"), Fe = w(({ client: t }) => {
|
|
150
|
+
const e = Ie.store({}), r = j(e, {
|
|
151
|
+
register(o, n) {
|
|
152
152
|
return {
|
|
153
153
|
...o,
|
|
154
|
-
[
|
|
154
|
+
[n.name]: n.framework
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
157
|
});
|
|
158
|
-
function
|
|
158
|
+
function s(o, n) {
|
|
159
159
|
e.getState()[o] && k(
|
|
160
160
|
"warn",
|
|
161
161
|
`Framework '${o}' already registered. Registering again will override the previous registration.`
|
|
162
|
-
), r.register({ name: o, framework:
|
|
162
|
+
), r.register({ name: o, framework: n });
|
|
163
163
|
}
|
|
164
164
|
const i = e.map((o) => Object.values(o));
|
|
165
|
-
function
|
|
166
|
-
return e.map((
|
|
165
|
+
function d(o) {
|
|
166
|
+
return e.map((n) => n[o], { skipVoid: !1 });
|
|
167
167
|
}
|
|
168
168
|
return {
|
|
169
|
-
register:
|
|
170
|
-
getByName:
|
|
169
|
+
register: s,
|
|
170
|
+
getByName: d,
|
|
171
171
|
listStore: i
|
|
172
172
|
};
|
|
173
173
|
});
|
|
174
|
-
function
|
|
175
|
-
return
|
|
174
|
+
function xe(t) {
|
|
175
|
+
return b(Fe, t);
|
|
176
176
|
}
|
|
177
|
-
const
|
|
177
|
+
const je = (t, e) => {
|
|
178
178
|
e.register(t.name, t);
|
|
179
|
-
},
|
|
179
|
+
}, Ee = 6e3, Pe = A("last_ping", "global"), Ae = (t) => `${t}/api/v1/ping`, Be = async (t) => {
|
|
180
180
|
try {
|
|
181
|
-
const e = Date.now(), r = C.get(
|
|
182
|
-
let
|
|
183
|
-
if (r.isSet() && (
|
|
181
|
+
const e = Date.now(), r = C.get(Pe);
|
|
182
|
+
let s = 0;
|
|
183
|
+
if (r.isSet() && (s = r.json() ?? 0), s && e - s < Ee)
|
|
184
184
|
return !0;
|
|
185
|
-
const i =
|
|
185
|
+
const i = Ae(t.apiUrl), d = {
|
|
186
186
|
projectId: t.projectId,
|
|
187
187
|
path: window.location.pathname
|
|
188
|
-
}, o = JSON.stringify(
|
|
188
|
+
}, o = JSON.stringify(d), n = {
|
|
189
189
|
"Content-Type": "application/json"
|
|
190
190
|
}, p = document.getElementById("picked_script")?.dataset.verceltoken;
|
|
191
|
-
p && (
|
|
192
|
-
const
|
|
191
|
+
p && (n["x-vercel-protection-bypass"] = p);
|
|
192
|
+
const v = (await fetch(i, {
|
|
193
193
|
method: "POST",
|
|
194
|
-
headers:
|
|
194
|
+
headers: n,
|
|
195
195
|
body: o
|
|
196
196
|
})).ok;
|
|
197
|
-
return
|
|
197
|
+
return v && r.set(e), v;
|
|
198
198
|
} catch (e) {
|
|
199
199
|
return k("error", e), !1;
|
|
200
200
|
}
|
|
@@ -211,257 +211,257 @@ function Y(t) {
|
|
|
211
211
|
};
|
|
212
212
|
return Object.freeze(r);
|
|
213
213
|
}
|
|
214
|
-
const
|
|
215
|
-
const e =
|
|
216
|
-
register(
|
|
214
|
+
const Re = x("predicate"), $e = w(({ client: t }) => {
|
|
215
|
+
const e = Re.store({}), r = j(e, {
|
|
216
|
+
register(n, l) {
|
|
217
217
|
return {
|
|
218
|
-
...
|
|
219
|
-
[
|
|
220
|
-
name:
|
|
221
|
-
predicate:
|
|
218
|
+
...n,
|
|
219
|
+
[l.name]: {
|
|
220
|
+
name: l.name,
|
|
221
|
+
predicate: l.predicate
|
|
222
222
|
}
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
225
|
});
|
|
226
|
-
function n
|
|
227
|
-
e.getState()[
|
|
226
|
+
function s(n, l) {
|
|
227
|
+
e.getState()[n] && k(
|
|
228
228
|
"warn",
|
|
229
|
-
`Predicate '${
|
|
230
|
-
), r.register(Object.freeze({ name:
|
|
229
|
+
`Predicate '${n}' already registered. Registering again will override the previous registration.`
|
|
230
|
+
), r.register(Object.freeze({ name: n, predicate: l }));
|
|
231
231
|
}
|
|
232
|
-
const i = e.map((
|
|
233
|
-
function
|
|
234
|
-
return e.map((
|
|
232
|
+
const i = e.map((n) => Object.values(n));
|
|
233
|
+
function d(n) {
|
|
234
|
+
return e.map((l) => l[n]?.predicate, { skipVoid: !1 });
|
|
235
235
|
}
|
|
236
|
-
function o(
|
|
237
|
-
const
|
|
236
|
+
function o(n) {
|
|
237
|
+
const l = H(() => {
|
|
238
238
|
}, {
|
|
239
239
|
skipVoid: !1
|
|
240
|
-
}), p =
|
|
241
|
-
const h =
|
|
240
|
+
}), p = $(async () => {
|
|
241
|
+
const h = d(n).getState();
|
|
242
242
|
if (!h)
|
|
243
243
|
return;
|
|
244
|
-
const
|
|
245
|
-
return (...
|
|
244
|
+
const v = Y(t);
|
|
245
|
+
return (...m) => h({ ...v, args: m });
|
|
246
246
|
});
|
|
247
|
-
return
|
|
247
|
+
return F({
|
|
248
248
|
source: { responses: t.responses.listStore, fields: t.fields.listStore },
|
|
249
249
|
target: p
|
|
250
|
-
}),
|
|
250
|
+
}), F({
|
|
251
251
|
clock: p.doneData,
|
|
252
252
|
filter: (h) => h !== void 0,
|
|
253
|
-
target:
|
|
254
|
-
}), p(),
|
|
253
|
+
target: l
|
|
254
|
+
}), p(), l;
|
|
255
255
|
}
|
|
256
256
|
return {
|
|
257
|
-
register:
|
|
258
|
-
getByName:
|
|
257
|
+
register: s,
|
|
258
|
+
getByName: d,
|
|
259
259
|
listStore: i,
|
|
260
260
|
getEvokablePredicate: o
|
|
261
261
|
};
|
|
262
262
|
});
|
|
263
|
-
function
|
|
264
|
-
return
|
|
263
|
+
function ze(t) {
|
|
264
|
+
return b($e, t);
|
|
265
265
|
}
|
|
266
266
|
const Ce = (t, e, r) => {
|
|
267
267
|
r.register(t, e);
|
|
268
|
-
},
|
|
269
|
-
const e =
|
|
270
|
-
register(a,
|
|
268
|
+
}, L = x("feature"), Oe = w(({ client: t }) => {
|
|
269
|
+
const e = L.store({}), r = L.store([]), s = j(e, {
|
|
270
|
+
register(a, c) {
|
|
271
271
|
return {
|
|
272
272
|
...a,
|
|
273
|
-
[
|
|
273
|
+
[c.id]: c.feature
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
276
|
});
|
|
277
|
-
function i(a,
|
|
277
|
+
function i(a, c) {
|
|
278
278
|
e.getState()[a] && k(
|
|
279
279
|
"warn",
|
|
280
280
|
`Feature '${a}' already registered. Registering again will override the previous registration.`
|
|
281
281
|
);
|
|
282
|
-
const
|
|
282
|
+
const u = {
|
|
283
283
|
id: a,
|
|
284
284
|
feature: {
|
|
285
|
-
...
|
|
285
|
+
...c,
|
|
286
286
|
id: a
|
|
287
287
|
}
|
|
288
288
|
};
|
|
289
|
-
|
|
289
|
+
s.register(
|
|
290
290
|
Object.freeze({
|
|
291
291
|
id: a,
|
|
292
|
-
feature:
|
|
292
|
+
feature: u
|
|
293
293
|
})
|
|
294
294
|
);
|
|
295
295
|
}
|
|
296
|
-
const
|
|
296
|
+
const d = $(
|
|
297
297
|
async ({
|
|
298
298
|
id: a,
|
|
299
|
-
key:
|
|
299
|
+
key: c,
|
|
300
300
|
storage: f = "local"
|
|
301
301
|
}) => {
|
|
302
|
-
const
|
|
303
|
-
return y === null ? null : { id: a, key:
|
|
302
|
+
const u = A(`feature:${a}:${c}`, "global"), y = (f === "session" ? O : C).get(u).boolean();
|
|
303
|
+
return y === null ? null : { id: a, key: c, bucket: y, storage: f };
|
|
304
304
|
}
|
|
305
|
-
), o =
|
|
305
|
+
), o = $((a) => {
|
|
306
306
|
if (!a)
|
|
307
307
|
return null;
|
|
308
|
-
const
|
|
309
|
-
(a.storage === "session" ?
|
|
310
|
-
}),
|
|
308
|
+
const c = A(`feature:${a.id}:${a.key}`, "global");
|
|
309
|
+
(a.storage === "session" ? O : C).set(c, a.bucket);
|
|
310
|
+
}), n = /* @__PURE__ */ new Map(), l = Z({
|
|
311
311
|
source: { allFeaturesStore: e, resolvedFeaturesStore: r },
|
|
312
|
-
effect: async ({ allFeaturesStore: a, resolvedFeaturesStore:
|
|
313
|
-
const y =
|
|
314
|
-
(
|
|
312
|
+
effect: async ({ allFeaturesStore: a, resolvedFeaturesStore: c }, { id: f, decide: u, key: g }) => {
|
|
313
|
+
const y = c.find(
|
|
314
|
+
(R) => R.id === f && R.key === g
|
|
315
315
|
);
|
|
316
316
|
if (y)
|
|
317
317
|
return y;
|
|
318
|
-
const
|
|
319
|
-
if (!
|
|
318
|
+
const I = a[f];
|
|
319
|
+
if (!I)
|
|
320
320
|
throw new Error(`Feature with id '${f}' not found`);
|
|
321
|
-
const
|
|
322
|
-
if (
|
|
323
|
-
const
|
|
324
|
-
return { id:
|
|
321
|
+
const B = n.get(`${f}:${g}`);
|
|
322
|
+
if (B !== void 0) {
|
|
323
|
+
const R = await B;
|
|
324
|
+
return { id: I.id, bucket: R, key: g, storage: I.feature.storage };
|
|
325
325
|
}
|
|
326
|
-
const
|
|
327
|
-
|
|
328
|
-
const
|
|
329
|
-
return { id:
|
|
326
|
+
const S = u();
|
|
327
|
+
n.set(`${f}:${g}`, S);
|
|
328
|
+
const X = await S;
|
|
329
|
+
return { id: I.id, bucket: X, key: g, storage: I.feature.storage };
|
|
330
330
|
}
|
|
331
331
|
});
|
|
332
|
-
|
|
333
|
-
clock:
|
|
332
|
+
F({
|
|
333
|
+
clock: s.register,
|
|
334
334
|
fn: (a) => {
|
|
335
|
-
const { id:
|
|
336
|
-
return { id:
|
|
335
|
+
const { id: c, feature: f } = a;
|
|
336
|
+
return { id: c, key: f.feature.key, storage: f.feature.storage };
|
|
337
337
|
},
|
|
338
|
-
target:
|
|
339
|
-
}),
|
|
338
|
+
target: d
|
|
339
|
+
}), F({
|
|
340
340
|
source: e,
|
|
341
|
-
clock:
|
|
342
|
-
fn: (a,
|
|
343
|
-
const { id: f, bucket:
|
|
344
|
-
return y ? { key: y, id: f, bucket:
|
|
341
|
+
clock: l.doneData,
|
|
342
|
+
fn: (a, c) => {
|
|
343
|
+
const { id: f, bucket: u, storage: g } = c, y = a[f]?.feature.key;
|
|
344
|
+
return y ? { key: y, id: f, bucket: u, storage: g } : null;
|
|
345
345
|
},
|
|
346
346
|
target: o
|
|
347
347
|
});
|
|
348
|
-
const p =
|
|
348
|
+
const p = V({ allFeaturesStore: e, resolvedFeaturesStore: r }).map(
|
|
349
349
|
({
|
|
350
350
|
allFeaturesStore: a,
|
|
351
|
-
resolvedFeaturesStore:
|
|
351
|
+
resolvedFeaturesStore: c
|
|
352
352
|
}) => Object.values(a).map((f) => {
|
|
353
|
-
const
|
|
354
|
-
(
|
|
353
|
+
const u = c.find(
|
|
354
|
+
(g) => g.id === f.id && g.key === f.feature.key
|
|
355
355
|
);
|
|
356
|
-
return
|
|
356
|
+
return u ? {
|
|
357
357
|
id: f.id,
|
|
358
358
|
name: f.feature.name,
|
|
359
359
|
key: f.feature.key,
|
|
360
|
-
getBucket: () => ({ id: f.id, bucket:
|
|
360
|
+
getBucket: () => ({ id: f.id, bucket: u.bucket }),
|
|
361
361
|
isResolved: !0
|
|
362
362
|
} : {
|
|
363
363
|
id: f.id,
|
|
364
364
|
name: f.feature.name,
|
|
365
365
|
key: f.feature.key,
|
|
366
|
-
getBucket: async () => await
|
|
366
|
+
getBucket: async () => await l(f.feature),
|
|
367
367
|
isResolved: !1
|
|
368
368
|
};
|
|
369
369
|
})
|
|
370
370
|
);
|
|
371
|
-
|
|
372
|
-
clock:
|
|
371
|
+
F({
|
|
372
|
+
clock: l.doneData,
|
|
373
373
|
source: { resolvedFeatures: r },
|
|
374
|
-
filter: ({ resolvedFeatures: a }, { id:
|
|
375
|
-
(
|
|
374
|
+
filter: ({ resolvedFeatures: a }, { id: c, key: f }) => !a.some(
|
|
375
|
+
(g) => g.id === c && g.key === f
|
|
376
376
|
),
|
|
377
|
-
fn: (a,
|
|
377
|
+
fn: (a, c) => c,
|
|
378
378
|
target: t.eventBus.prepend((a) => ({
|
|
379
379
|
type: "feature_decide",
|
|
380
380
|
feature: a
|
|
381
381
|
}))
|
|
382
|
-
}),
|
|
383
|
-
clock: [
|
|
382
|
+
}), F({
|
|
383
|
+
clock: [d.doneData, l.doneData],
|
|
384
384
|
source: r,
|
|
385
|
-
fn: (a,
|
|
386
|
-
(
|
|
387
|
-
) ? a : [...a,
|
|
385
|
+
fn: (a, c) => !c || a.some(
|
|
386
|
+
(u) => u.id === c.id && u.key === c.key
|
|
387
|
+
) ? a : [...a, c],
|
|
388
388
|
target: r
|
|
389
389
|
});
|
|
390
390
|
function h(a) {
|
|
391
|
-
return p.map((
|
|
391
|
+
return p.map((c) => c.find((f) => f.id === a));
|
|
392
392
|
}
|
|
393
|
-
function
|
|
394
|
-
return e.map((
|
|
393
|
+
function v(a) {
|
|
394
|
+
return e.map((c) => c[a], { skipVoid: !1 });
|
|
395
395
|
}
|
|
396
|
-
function
|
|
397
|
-
const
|
|
396
|
+
function m(a) {
|
|
397
|
+
const c = H(
|
|
398
398
|
async () => {
|
|
399
399
|
},
|
|
400
400
|
{ skipVoid: !1 }
|
|
401
|
-
), f =
|
|
402
|
-
const
|
|
403
|
-
if (
|
|
404
|
-
return async () => (await
|
|
401
|
+
), f = $(async () => {
|
|
402
|
+
const u = h(a).getState();
|
|
403
|
+
if (u)
|
|
404
|
+
return async () => (await u.getBucket()).bucket;
|
|
405
405
|
});
|
|
406
|
-
return
|
|
406
|
+
return F({
|
|
407
407
|
source: r,
|
|
408
|
-
filter: (
|
|
408
|
+
filter: (u) => u.some((g) => g.id === a),
|
|
409
409
|
target: f
|
|
410
|
-
}),
|
|
410
|
+
}), F({
|
|
411
411
|
clock: f.doneData,
|
|
412
|
-
filter: (
|
|
413
|
-
target:
|
|
414
|
-
}), f(),
|
|
412
|
+
filter: (u) => u !== void 0,
|
|
413
|
+
target: c
|
|
414
|
+
}), f(), c;
|
|
415
415
|
}
|
|
416
416
|
return {
|
|
417
417
|
register: i,
|
|
418
418
|
getById: h,
|
|
419
|
-
getByName:
|
|
419
|
+
getByName: v,
|
|
420
420
|
listStore: p,
|
|
421
|
-
getEvokableFeature:
|
|
421
|
+
getEvokableFeature: m
|
|
422
422
|
};
|
|
423
423
|
});
|
|
424
|
-
function
|
|
425
|
-
return
|
|
424
|
+
function Me(t) {
|
|
425
|
+
return b(Oe, t);
|
|
426
426
|
}
|
|
427
|
-
const
|
|
427
|
+
const Ve = (t, e, r) => {
|
|
428
428
|
r.register(t, e);
|
|
429
|
-
}, P =
|
|
430
|
-
function
|
|
429
|
+
}, P = x("history");
|
|
430
|
+
function J(t, e) {
|
|
431
431
|
return {
|
|
432
432
|
// eslint-disable-next-line sonarjs/pseudo-random
|
|
433
|
-
id:
|
|
433
|
+
id: oe(`history-entry-${Date.now()}-${Math.random()}}`),
|
|
434
434
|
node: e,
|
|
435
435
|
at: Date.now(),
|
|
436
436
|
experienceId: t
|
|
437
437
|
};
|
|
438
438
|
}
|
|
439
|
-
const
|
|
440
|
-
const t = P.store({ entries: [] }), e = P.event(), r = P.event(),
|
|
441
|
-
t.on(e, (o,
|
|
442
|
-
entries: [...o.entries,
|
|
443
|
-
})), t.on(r, (o,
|
|
439
|
+
const De = w(() => {
|
|
440
|
+
const t = P.store({ entries: [] }), e = P.event(), r = P.event(), s = P.event(), i = P.event();
|
|
441
|
+
t.on(e, (o, n) => ({
|
|
442
|
+
entries: [...o.entries, J(n.experienceId, n.node)]
|
|
443
|
+
})), t.on(r, (o, n) => ({
|
|
444
444
|
entries: [
|
|
445
445
|
...o.entries.slice(0, -1),
|
|
446
|
-
|
|
446
|
+
J(n.experienceId, n.node)
|
|
447
447
|
]
|
|
448
|
-
})), t.on(i, (o,
|
|
449
|
-
function
|
|
450
|
-
const
|
|
448
|
+
})), t.on(i, (o, n) => n);
|
|
449
|
+
function d(o, n) {
|
|
450
|
+
const l = { lastStepIndex: -1, secondLastStepIndex: -1 };
|
|
451
451
|
for (let p = o.length - 1; p >= 0; p--) {
|
|
452
|
-
const h = o[p],
|
|
453
|
-
if (!(!
|
|
454
|
-
if (
|
|
455
|
-
|
|
452
|
+
const h = o[p], v = h?.node;
|
|
453
|
+
if (!(!v || !se(v)) && !(n && h?.experienceId !== n))
|
|
454
|
+
if (l.lastStepIndex === -1)
|
|
455
|
+
l.lastStepIndex = p;
|
|
456
456
|
else {
|
|
457
|
-
|
|
457
|
+
l.secondLastStepIndex = p;
|
|
458
458
|
break;
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
return
|
|
461
|
+
return l;
|
|
462
462
|
}
|
|
463
|
-
return t.on(
|
|
464
|
-
const { secondLastStepIndex:
|
|
463
|
+
return t.on(s, (o, n) => {
|
|
464
|
+
const { secondLastStepIndex: l } = d(o.entries, n.experienceId), p = l !== -1 ? o.entries.slice(0, l + 1) : o.entries;
|
|
465
465
|
return {
|
|
466
466
|
...o,
|
|
467
467
|
entries: p
|
|
@@ -469,79 +469,79 @@ const Ue = w(() => {
|
|
|
469
469
|
}), {
|
|
470
470
|
push: e,
|
|
471
471
|
replace: r,
|
|
472
|
-
back:
|
|
472
|
+
back: s,
|
|
473
473
|
restore: i,
|
|
474
474
|
entriesStore: t.map((o) => o.entries)
|
|
475
475
|
};
|
|
476
476
|
});
|
|
477
|
-
function
|
|
478
|
-
return
|
|
477
|
+
function Ne() {
|
|
478
|
+
return b(De);
|
|
479
479
|
}
|
|
480
|
-
const
|
|
481
|
-
const t =
|
|
482
|
-
register(
|
|
480
|
+
const Te = () => D(), Ue = x("field"), _e = w(() => {
|
|
481
|
+
const t = Ue.store({}), e = j(t, {
|
|
482
|
+
register(n, l) {
|
|
483
483
|
return {
|
|
484
|
-
...
|
|
485
|
-
[
|
|
484
|
+
...n,
|
|
485
|
+
[l.field.id]: l.field
|
|
486
486
|
};
|
|
487
487
|
}
|
|
488
488
|
});
|
|
489
|
-
function r(
|
|
490
|
-
e.register({ field:
|
|
489
|
+
function r(n) {
|
|
490
|
+
e.register({ field: n });
|
|
491
491
|
}
|
|
492
|
-
function n
|
|
493
|
-
const p =
|
|
492
|
+
function s(n, l) {
|
|
493
|
+
const p = d(n).getState();
|
|
494
494
|
if (!p)
|
|
495
495
|
return;
|
|
496
496
|
const h = Object.assign({}, p, {
|
|
497
|
-
...
|
|
497
|
+
...l
|
|
498
498
|
});
|
|
499
499
|
e.register({ field: { ...h } });
|
|
500
500
|
}
|
|
501
|
-
const i = t.map((
|
|
502
|
-
function
|
|
503
|
-
return t.map((
|
|
501
|
+
const i = t.map((n) => Object.values(n));
|
|
502
|
+
function d(n) {
|
|
503
|
+
return t.map((l) => l[n] || null);
|
|
504
504
|
}
|
|
505
|
-
function o(
|
|
506
|
-
return t.map((
|
|
505
|
+
function o(n) {
|
|
506
|
+
return t.map((l) => Object.values(l).find((p) => p.name === n) || null);
|
|
507
507
|
}
|
|
508
508
|
return {
|
|
509
509
|
register: r,
|
|
510
|
-
update:
|
|
511
|
-
getById:
|
|
510
|
+
update: s,
|
|
511
|
+
getById: d,
|
|
512
512
|
listStore: i,
|
|
513
513
|
getByName: o
|
|
514
514
|
};
|
|
515
515
|
});
|
|
516
|
-
function
|
|
517
|
-
return
|
|
516
|
+
function Le() {
|
|
517
|
+
return b(_e);
|
|
518
518
|
}
|
|
519
|
-
const
|
|
519
|
+
const Je = (t, e) => {
|
|
520
520
|
e.register(t);
|
|
521
|
-
}, Ge =
|
|
522
|
-
const t = Ge.store({}), e =
|
|
523
|
-
register(o,
|
|
521
|
+
}, Ge = x("action"), He = w(() => {
|
|
522
|
+
const t = Ge.store({}), e = j(t, {
|
|
523
|
+
register(o, n) {
|
|
524
524
|
return {
|
|
525
525
|
...o,
|
|
526
|
-
[
|
|
527
|
-
name:
|
|
528
|
-
action:
|
|
526
|
+
[n.name]: {
|
|
527
|
+
name: n.name,
|
|
528
|
+
action: n.action
|
|
529
529
|
}
|
|
530
530
|
};
|
|
531
531
|
}
|
|
532
532
|
});
|
|
533
|
-
function r(o,
|
|
534
|
-
e.register({ name: o, action:
|
|
533
|
+
function r(o, n) {
|
|
534
|
+
e.register({ name: o, action: n });
|
|
535
535
|
}
|
|
536
|
-
const
|
|
536
|
+
const s = t.map((o) => Object.values(o));
|
|
537
537
|
function i(o) {
|
|
538
|
-
return t.map((
|
|
538
|
+
return t.map((n) => n[o], { skipVoid: !1 });
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function d(o) {
|
|
541
541
|
return t.map(
|
|
542
|
-
(
|
|
543
|
-
const
|
|
544
|
-
return
|
|
542
|
+
(n) => {
|
|
543
|
+
const l = n[o];
|
|
544
|
+
return l ? l.action : void 0;
|
|
545
545
|
},
|
|
546
546
|
{ skipVoid: !1 }
|
|
547
547
|
);
|
|
@@ -549,160 +549,241 @@ const Le = (t, e) => {
|
|
|
549
549
|
return {
|
|
550
550
|
register: r,
|
|
551
551
|
getByName: i,
|
|
552
|
-
listStore:
|
|
553
|
-
getEvokableAction:
|
|
552
|
+
listStore: s,
|
|
553
|
+
getEvokableAction: d
|
|
554
554
|
};
|
|
555
555
|
});
|
|
556
556
|
function qe() {
|
|
557
|
-
return
|
|
557
|
+
return b(He);
|
|
558
558
|
}
|
|
559
559
|
const Ke = (t, e, r) => {
|
|
560
560
|
r.register(t, e);
|
|
561
561
|
};
|
|
562
|
-
function
|
|
562
|
+
function M(t) {
|
|
563
563
|
return typeof t > "u" || t === null || t === "" || Array.isArray(t) && !t.length;
|
|
564
564
|
}
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
565
|
+
function We(t) {
|
|
566
|
+
return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || t === null;
|
|
567
|
+
}
|
|
568
|
+
function G(t) {
|
|
569
|
+
try {
|
|
570
|
+
return JSON.stringify(t), !0;
|
|
571
|
+
} catch {
|
|
572
|
+
return !1;
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
const Ye = x("response"), Qe = w(({ client: t }) => {
|
|
576
|
+
const e = Ye.store({}), r = D(), s = D(), i = j(e, {
|
|
577
|
+
register(m, a) {
|
|
568
578
|
return {
|
|
569
|
-
...
|
|
579
|
+
...m,
|
|
570
580
|
[a.fieldId]: a.response
|
|
571
581
|
};
|
|
572
582
|
},
|
|
573
|
-
registerBatch(
|
|
583
|
+
registerBatch(m, a) {
|
|
574
584
|
return {
|
|
575
|
-
...
|
|
585
|
+
...m,
|
|
576
586
|
...a
|
|
577
587
|
};
|
|
578
588
|
},
|
|
579
|
-
clear(
|
|
580
|
-
const { [a]:
|
|
589
|
+
clear(m, a) {
|
|
590
|
+
const { [a]: c, ...f } = m;
|
|
581
591
|
return f;
|
|
582
592
|
},
|
|
583
593
|
clearAll() {
|
|
584
594
|
return {};
|
|
585
595
|
}
|
|
586
596
|
});
|
|
587
|
-
function
|
|
588
|
-
if (typeof
|
|
597
|
+
function d(m, a) {
|
|
598
|
+
if (typeof m == "string") {
|
|
589
599
|
if (a === void 0)
|
|
590
600
|
throw new Error("Response is required when registering a single field");
|
|
591
|
-
i.register({ fieldId:
|
|
601
|
+
i.register({ fieldId: m, response: a });
|
|
592
602
|
} else
|
|
593
|
-
i.registerBatch(
|
|
603
|
+
i.registerBatch(m);
|
|
594
604
|
}
|
|
595
|
-
async function o(
|
|
605
|
+
async function o(m) {
|
|
596
606
|
const a = [];
|
|
597
607
|
return await Promise.allSettled(
|
|
598
|
-
Object.entries(
|
|
599
|
-
let
|
|
600
|
-
const
|
|
601
|
-
if (!
|
|
608
|
+
Object.entries(m).map(async ([c, f]) => {
|
|
609
|
+
let u = f;
|
|
610
|
+
const g = t.fields.getById(c).getState();
|
|
611
|
+
if (!g) {
|
|
602
612
|
a.push({
|
|
603
|
-
fieldId:
|
|
604
|
-
userMessage: `Field '${
|
|
605
|
-
systemMessage: `No field with ID '${
|
|
606
|
-
value:
|
|
613
|
+
fieldId: c,
|
|
614
|
+
userMessage: `Field '${c}' not found`,
|
|
615
|
+
systemMessage: `No field with ID '${c}' exists. Available field IDs are: ${Object.keys(t.fields.listStore.getState()).join(",")}.`,
|
|
616
|
+
value: u
|
|
607
617
|
});
|
|
608
618
|
return;
|
|
609
619
|
}
|
|
610
|
-
if (
|
|
611
|
-
const y = await
|
|
612
|
-
$input:
|
|
620
|
+
if (g.multiple && (typeof u == "string" || typeof u == "number" || typeof u == "boolean") && (u = [u]), g.validation && !ae(g.validation) && !M(u)) {
|
|
621
|
+
const y = await E(t, g.validation, {
|
|
622
|
+
$input: u
|
|
613
623
|
});
|
|
614
624
|
if (typeof y == "string") {
|
|
615
625
|
a.push({
|
|
616
|
-
fieldId:
|
|
626
|
+
fieldId: c,
|
|
617
627
|
userMessage: y,
|
|
618
628
|
systemMessage: `Field validation resulted in an error: ${y}.`,
|
|
619
|
-
value:
|
|
629
|
+
value: u
|
|
620
630
|
});
|
|
621
631
|
return;
|
|
622
632
|
}
|
|
623
633
|
if (y === !1) {
|
|
624
634
|
a.push({
|
|
625
|
-
fieldId:
|
|
635
|
+
fieldId: c,
|
|
626
636
|
userMessage: "This field is invalid",
|
|
627
637
|
systemMessage: "Field validation resulted in an unspecified error.",
|
|
628
|
-
value:
|
|
638
|
+
value: u
|
|
629
639
|
});
|
|
630
640
|
return;
|
|
631
641
|
}
|
|
632
642
|
}
|
|
633
|
-
if (
|
|
643
|
+
if (g.required && M(u)) {
|
|
634
644
|
a.push({
|
|
635
|
-
fieldId:
|
|
645
|
+
fieldId: c,
|
|
636
646
|
userMessage: "This field is required",
|
|
637
647
|
systemMessage: "Field is required.",
|
|
638
|
-
value:
|
|
648
|
+
value: u
|
|
639
649
|
});
|
|
640
650
|
return;
|
|
641
651
|
}
|
|
642
|
-
if (!
|
|
652
|
+
if (!g.multiple && Array.isArray(u) && u.length > 1) {
|
|
643
653
|
a.push({
|
|
644
|
-
fieldId:
|
|
654
|
+
fieldId: c,
|
|
645
655
|
userMessage: "This field expects a single response",
|
|
646
656
|
systemMessage: "Field expects a single response.",
|
|
647
|
-
value:
|
|
657
|
+
value: u
|
|
648
658
|
});
|
|
649
659
|
return;
|
|
650
660
|
}
|
|
651
|
-
if (
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
661
|
+
if (g.type === "object" && !M(u))
|
|
662
|
+
if (g.multiple) {
|
|
663
|
+
if (!Array.isArray(u)) {
|
|
664
|
+
a.push({
|
|
665
|
+
fieldId: c,
|
|
666
|
+
userMessage: "This field expects multiple values",
|
|
667
|
+
systemMessage: "Field expects an array of objects.",
|
|
668
|
+
value: u
|
|
669
|
+
});
|
|
670
|
+
return;
|
|
671
|
+
}
|
|
672
|
+
for (const y of u) {
|
|
673
|
+
if (typeof y != "object" || y === null) {
|
|
674
|
+
a.push({
|
|
675
|
+
fieldId: c,
|
|
676
|
+
userMessage: "This field expects object values",
|
|
677
|
+
systemMessage: "Field expects an array of objects, but received non-object value.",
|
|
678
|
+
value: u
|
|
679
|
+
});
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
682
|
+
if (!G(y)) {
|
|
683
|
+
a.push({
|
|
684
|
+
fieldId: c,
|
|
685
|
+
userMessage: "This field contains non-serializable data",
|
|
686
|
+
systemMessage: "Field value contains non-JSON-serializable data (functions, circular references, etc.).",
|
|
687
|
+
value: u
|
|
688
|
+
});
|
|
689
|
+
return;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
} else {
|
|
693
|
+
if (Array.isArray(u)) {
|
|
694
|
+
a.push({
|
|
695
|
+
fieldId: c,
|
|
696
|
+
userMessage: "This field expects a single value",
|
|
697
|
+
systemMessage: "Field expects a single object, not an array.",
|
|
698
|
+
value: u
|
|
699
|
+
});
|
|
700
|
+
return;
|
|
701
|
+
}
|
|
702
|
+
if (typeof u != "object" || u === null) {
|
|
703
|
+
a.push({
|
|
704
|
+
fieldId: c,
|
|
705
|
+
userMessage: "This field expects an object value",
|
|
706
|
+
systemMessage: "Field expects an object value.",
|
|
707
|
+
value: u
|
|
708
|
+
});
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
if (!G(u)) {
|
|
712
|
+
a.push({
|
|
713
|
+
fieldId: c,
|
|
714
|
+
userMessage: "This field contains non-serializable data",
|
|
715
|
+
systemMessage: "Field value contains non-JSON-serializable data (functions, circular references, etc.).",
|
|
716
|
+
value: u
|
|
717
|
+
});
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
if (g.options) {
|
|
722
|
+
const y = Array.isArray(u) ? u : [u];
|
|
723
|
+
if (g.type === "object") {
|
|
724
|
+
const I = g.options.map((S) => JSON.stringify(S.value));
|
|
725
|
+
y.every((S) => I.includes(JSON.stringify(S))) || a.push({
|
|
726
|
+
fieldId: c,
|
|
727
|
+
userMessage: "This field expects a valid option",
|
|
728
|
+
systemMessage: "Field expects a valid option from the defined choices.",
|
|
729
|
+
value: u
|
|
730
|
+
});
|
|
731
|
+
} else {
|
|
732
|
+
const I = g.options.map((S) => S.value);
|
|
733
|
+
y.every((S) => !We(S) || S === null ? !1 : I.includes(S)) || a.push({
|
|
734
|
+
fieldId: c,
|
|
735
|
+
userMessage: "This field expects a valid option",
|
|
736
|
+
systemMessage: `Field expects a valid option. Valid options are: ${I.join(", ")}`,
|
|
737
|
+
value: u
|
|
738
|
+
});
|
|
739
|
+
}
|
|
659
740
|
}
|
|
660
741
|
})
|
|
661
|
-
), { responsesToCommit:
|
|
742
|
+
), { responsesToCommit: m, validationErrors: a };
|
|
662
743
|
}
|
|
663
|
-
async function
|
|
664
|
-
const { responsesToCommit: a, validationErrors:
|
|
665
|
-
return
|
|
744
|
+
async function n(m) {
|
|
745
|
+
const { responsesToCommit: a, validationErrors: c } = await o(m);
|
|
746
|
+
return c.length ? { errors: c } : (i.registerBatch(a), { errors: [] });
|
|
666
747
|
}
|
|
667
|
-
const
|
|
668
|
-
fieldId:
|
|
669
|
-
value:
|
|
748
|
+
const l = e.map((m) => m), p = e.map((m) => Object.keys(m).map((c) => ({
|
|
749
|
+
fieldId: c,
|
|
750
|
+
value: m[c]
|
|
670
751
|
})));
|
|
671
|
-
function h(
|
|
672
|
-
const a = t.fields.getById(
|
|
673
|
-
return
|
|
752
|
+
function h(m) {
|
|
753
|
+
const a = t.fields.getById(m), c = e.map((f) => f[m] || null);
|
|
754
|
+
return V({ f: a, r: c }, ({ f, r: u }) => u || (f?.defaultValue ? f.defaultValue : null));
|
|
674
755
|
}
|
|
675
|
-
function
|
|
676
|
-
const a = t.fields.getByName(
|
|
677
|
-
return
|
|
678
|
-
const
|
|
679
|
-
return
|
|
756
|
+
function v(m) {
|
|
757
|
+
const a = t.fields.getByName(m);
|
|
758
|
+
return V({ f: a, s: e }, ({ f: c, s: f }) => {
|
|
759
|
+
const u = c && f[c.id] || null;
|
|
760
|
+
return u || (c?.defaultValue ? c.defaultValue : null);
|
|
680
761
|
});
|
|
681
762
|
}
|
|
682
|
-
return
|
|
763
|
+
return F({
|
|
683
764
|
clock: r,
|
|
684
765
|
target: i.clearAll
|
|
685
|
-
}),
|
|
686
|
-
clock:
|
|
766
|
+
}), F({
|
|
767
|
+
clock: s,
|
|
687
768
|
target: i.clear
|
|
688
769
|
}), {
|
|
689
|
-
register:
|
|
770
|
+
register: d,
|
|
690
771
|
clearAll: r,
|
|
691
|
-
clear:
|
|
692
|
-
commit:
|
|
772
|
+
clear: s,
|
|
773
|
+
commit: n,
|
|
693
774
|
getResponsesToCommit: o,
|
|
694
775
|
listStore: p,
|
|
695
|
-
getAllStore:
|
|
776
|
+
getAllStore: l,
|
|
696
777
|
getByFieldId: h,
|
|
697
|
-
getByFieldName:
|
|
778
|
+
getByFieldName: v
|
|
698
779
|
};
|
|
699
780
|
});
|
|
700
|
-
function
|
|
701
|
-
return
|
|
781
|
+
function Xe(t) {
|
|
782
|
+
return b(Qe, t);
|
|
702
783
|
}
|
|
703
|
-
const
|
|
704
|
-
function
|
|
705
|
-
if (
|
|
784
|
+
const Ze = () => "0.0.39-next.3";
|
|
785
|
+
function et() {
|
|
786
|
+
if (N()) {
|
|
706
787
|
const t = [
|
|
707
788
|
document.currentScript,
|
|
708
789
|
document.getElementById("picked_script"),
|
|
@@ -716,70 +797,70 @@ function Xe() {
|
|
|
716
797
|
}
|
|
717
798
|
return "https://api.picked.app";
|
|
718
799
|
}
|
|
719
|
-
function
|
|
720
|
-
if (!
|
|
800
|
+
function tt() {
|
|
801
|
+
if (!T())
|
|
721
802
|
return {};
|
|
722
803
|
const t = new URLSearchParams(window.location.search), e = {}, r = /* @__PURE__ */ new Set();
|
|
723
804
|
for (const [i] of t.entries())
|
|
724
805
|
i.startsWith("picked-") && r.add(i);
|
|
725
806
|
for (const i of r) {
|
|
726
|
-
const
|
|
727
|
-
e[
|
|
807
|
+
const d = i.replace("picked-", "");
|
|
808
|
+
e[d] = t.getAll(i);
|
|
728
809
|
}
|
|
729
|
-
const
|
|
810
|
+
const s = A("s");
|
|
730
811
|
if (r.size > 0)
|
|
731
|
-
|
|
812
|
+
O.set(s, e);
|
|
732
813
|
else {
|
|
733
|
-
const i =
|
|
814
|
+
const i = O.get(s);
|
|
734
815
|
if (i)
|
|
735
816
|
return i.json() || {};
|
|
736
817
|
}
|
|
737
818
|
return e;
|
|
738
819
|
}
|
|
739
|
-
function
|
|
740
|
-
if (
|
|
820
|
+
function rt() {
|
|
821
|
+
if (ue())
|
|
741
822
|
return crypto.randomUUID();
|
|
742
|
-
const t = Date.now().toString(36), e = Math.random().toString(36).substring(2, 15), r = Math.random().toString(36).substring(2, 15),
|
|
743
|
-
return `${t}-${e}-${r}-${
|
|
823
|
+
const t = Date.now().toString(36), e = Math.random().toString(36).substring(2, 15), r = Math.random().toString(36).substring(2, 15), s = Math.random().toString(36).substring(2, 15);
|
|
824
|
+
return `${t}-${e}-${r}-${s}`;
|
|
744
825
|
}
|
|
745
|
-
const
|
|
746
|
-
const t = C.get(
|
|
826
|
+
const st = A("session", "global"), nt = () => {
|
|
827
|
+
const t = C.get(st);
|
|
747
828
|
let e;
|
|
748
829
|
t.isSet() && (e = t.json());
|
|
749
830
|
const r = (i) => t.set({
|
|
750
831
|
id: i.id,
|
|
751
832
|
isUser: i.isUser,
|
|
752
833
|
identifiers: i.identifiers
|
|
753
|
-
}),
|
|
754
|
-
id: e?.id ??
|
|
834
|
+
}), s = {
|
|
835
|
+
id: e?.id ?? rt(),
|
|
755
836
|
isUser: e?.isUser ?? void 0,
|
|
756
837
|
identifiers: e?.identifiers ?? void 0,
|
|
757
838
|
setIsUser(i) {
|
|
758
839
|
this.isUser = i, r(this);
|
|
759
840
|
},
|
|
760
|
-
setIdentifier(i,
|
|
761
|
-
this.identifiers = { ...this.identifiers, [i]:
|
|
841
|
+
setIdentifier(i, d) {
|
|
842
|
+
this.identifiers = { ...this.identifiers, [i]: d }, r(this);
|
|
762
843
|
},
|
|
763
844
|
removeIdentifier(i) {
|
|
764
845
|
this.identifiers && (this.identifiers = Object.fromEntries(
|
|
765
|
-
Object.entries(this.identifiers).filter(([
|
|
846
|
+
Object.entries(this.identifiers).filter(([d]) => d !== i)
|
|
766
847
|
), this.identifiers = Object.keys(this.identifiers).length ? this.identifiers : void 0, r(this));
|
|
767
848
|
}
|
|
768
849
|
};
|
|
769
|
-
return r(
|
|
770
|
-
},
|
|
771
|
-
function
|
|
772
|
-
if (
|
|
850
|
+
return r(s), s;
|
|
851
|
+
}, it = () => ce() ? nt() : null;
|
|
852
|
+
function ot() {
|
|
853
|
+
if (T())
|
|
773
854
|
return globalThis.window.pickedConfig;
|
|
774
855
|
}
|
|
775
|
-
function
|
|
776
|
-
if (!
|
|
856
|
+
function at() {
|
|
857
|
+
if (!T())
|
|
777
858
|
return;
|
|
778
|
-
const t =
|
|
859
|
+
const t = ot(), e = t?.organizationId, r = t?.projectId;
|
|
779
860
|
return e && r ? { organizationId: e, projectId: r } : void 0;
|
|
780
861
|
}
|
|
781
|
-
function
|
|
782
|
-
if (!
|
|
862
|
+
function ct() {
|
|
863
|
+
if (!N())
|
|
783
864
|
return;
|
|
784
865
|
const t = document.getElementById("picked_script") || document.querySelector("script#picked") || // legacy support for 'cvly' script tag
|
|
785
866
|
document.getElementById("cvly");
|
|
@@ -788,14 +869,14 @@ function ot() {
|
|
|
788
869
|
const e = t.dataset.organizationid || t.getAttribute("organization-id"), r = t.dataset.projectid || t.getAttribute("project-id");
|
|
789
870
|
return e && r ? { organizationId: e, projectId: r } : void 0;
|
|
790
871
|
}
|
|
791
|
-
function
|
|
872
|
+
function ut(t) {
|
|
792
873
|
const { organizationId: e, projectId: r } = t;
|
|
793
874
|
if (e && r)
|
|
794
875
|
return { organizationId: e, projectId: r };
|
|
795
|
-
const
|
|
796
|
-
if (
|
|
797
|
-
return
|
|
798
|
-
const i =
|
|
876
|
+
const s = at();
|
|
877
|
+
if (s)
|
|
878
|
+
return s;
|
|
879
|
+
const i = ct();
|
|
799
880
|
if (i)
|
|
800
881
|
return i;
|
|
801
882
|
throw new Error(
|
|
@@ -805,13 +886,13 @@ function at(t) {
|
|
|
805
886
|
(3) a <script> tag with id 'picked_script', 'picked', or 'cvly' that includes data-organizationid/data-projectid (or organization-id/project-id) attributes.`
|
|
806
887
|
);
|
|
807
888
|
}
|
|
808
|
-
function
|
|
889
|
+
function z(t) {
|
|
809
890
|
return t == null || t === "" || Number.isNaN(t);
|
|
810
891
|
}
|
|
811
|
-
const
|
|
812
|
-
default: (t, e) =>
|
|
813
|
-
append: (t, e) => e &&
|
|
814
|
-
prepend: (t, e) => e &&
|
|
892
|
+
const dt = {
|
|
893
|
+
default: (t, e) => z(t) ? String(e ?? "") : String(t),
|
|
894
|
+
append: (t, e) => e && !z(t) ? `${t} ${e}` : t,
|
|
895
|
+
prepend: (t, e) => e && !z(t) ? `${e} ${t}` : t,
|
|
815
896
|
upper: (t) => typeof t == "string" ? t.toUpperCase() : t,
|
|
816
897
|
lower: (t) => typeof t == "string" ? t.toLowerCase() : t,
|
|
817
898
|
capitalize: (t) => typeof t == "string" ? t.charAt(0).toUpperCase() + t.slice(1) : t,
|
|
@@ -822,119 +903,119 @@ const ct = {
|
|
|
822
903
|
if (Array.isArray(t))
|
|
823
904
|
return e.format(t.map(String));
|
|
824
905
|
if (t instanceof Map) {
|
|
825
|
-
const r = Array.from(t.entries()).map(([
|
|
906
|
+
const r = Array.from(t.entries()).map(([s, i]) => `${s}: ${i}`);
|
|
826
907
|
return e.format(r);
|
|
827
908
|
}
|
|
828
909
|
return t instanceof Set ? e.format(Array.from(t).map(String)) : t;
|
|
829
910
|
}
|
|
830
911
|
};
|
|
831
|
-
function
|
|
912
|
+
function lt(t) {
|
|
832
913
|
return typeof t == "object" && t !== null;
|
|
833
914
|
}
|
|
834
|
-
function
|
|
915
|
+
function pt(t, e) {
|
|
835
916
|
let r = e;
|
|
836
|
-
for (const
|
|
837
|
-
if (
|
|
838
|
-
r = r[
|
|
917
|
+
for (const s of t.split("."))
|
|
918
|
+
if (lt(r) && s in r)
|
|
919
|
+
r = r[s];
|
|
839
920
|
else
|
|
840
921
|
return;
|
|
841
922
|
return typeof r == "function" ? r() : r;
|
|
842
923
|
}
|
|
843
|
-
function
|
|
844
|
-
const r = t.split("|").map((
|
|
845
|
-
let i =
|
|
846
|
-
for (const
|
|
847
|
-
const [o, ...
|
|
924
|
+
function ft(t, e) {
|
|
925
|
+
const r = t.split("|").map((d) => d.trim()), s = r.shift() ?? "";
|
|
926
|
+
let i = pt(s, e);
|
|
927
|
+
for (const d of r) {
|
|
928
|
+
const [o, ...n] = d.split(":"), l = o?.trim() ?? "", p = n.join(":").trim().replaceAll(/(?:^['"]|['"]$)/g, ""), h = dt[l];
|
|
848
929
|
h && (i = h(i, p));
|
|
849
930
|
}
|
|
850
|
-
return
|
|
931
|
+
return z(i) ? "" : typeof i == "object" ? JSON.stringify(i) : String(i);
|
|
851
932
|
}
|
|
852
|
-
function
|
|
853
|
-
let r = "",
|
|
854
|
-
for (;
|
|
855
|
-
if (t[
|
|
856
|
-
|
|
933
|
+
function gt(t, e) {
|
|
934
|
+
let r = "", s = 0;
|
|
935
|
+
for (; s < t.length; )
|
|
936
|
+
if (t[s] === "{" && t[s + 1] === "{") {
|
|
937
|
+
s += 2;
|
|
857
938
|
let i = "";
|
|
858
|
-
for (;
|
|
859
|
-
if (t[
|
|
860
|
-
|
|
939
|
+
for (; s < t.length; ) {
|
|
940
|
+
if (t[s] === "}" && t[s + 1] === "}") {
|
|
941
|
+
s += 2;
|
|
861
942
|
break;
|
|
862
943
|
}
|
|
863
|
-
i += t[
|
|
944
|
+
i += t[s++];
|
|
864
945
|
}
|
|
865
|
-
r +=
|
|
946
|
+
r += ft(i.trim(), e);
|
|
866
947
|
} else
|
|
867
|
-
r += t[
|
|
948
|
+
r += t[s++];
|
|
868
949
|
return r;
|
|
869
950
|
}
|
|
870
|
-
class
|
|
951
|
+
class mt {
|
|
871
952
|
static logger = k;
|
|
872
953
|
options;
|
|
873
954
|
isReady = !1;
|
|
874
955
|
project;
|
|
875
956
|
plugins = {};
|
|
876
|
-
eventBus =
|
|
957
|
+
eventBus = Te();
|
|
877
958
|
organizationId;
|
|
878
959
|
projectId;
|
|
879
960
|
apiUrl;
|
|
880
961
|
session;
|
|
881
962
|
precondition;
|
|
882
963
|
condition;
|
|
883
|
-
searchParams =
|
|
884
|
-
history =
|
|
885
|
-
components =
|
|
964
|
+
searchParams = tt();
|
|
965
|
+
history = Ne();
|
|
966
|
+
components = be({ client: this });
|
|
886
967
|
experienceInstances = ne({ client: this });
|
|
887
|
-
experiences =
|
|
888
|
-
frameworks =
|
|
889
|
-
predicates =
|
|
890
|
-
features =
|
|
891
|
-
responses =
|
|
892
|
-
fields =
|
|
968
|
+
experiences = ge({ client: this });
|
|
969
|
+
frameworks = xe({ client: this });
|
|
970
|
+
predicates = ze({ client: this });
|
|
971
|
+
features = Me({ client: this });
|
|
972
|
+
responses = Xe({ client: this });
|
|
973
|
+
fields = Le();
|
|
893
974
|
actions = qe();
|
|
894
975
|
constructor(e) {
|
|
895
976
|
k("info", "Picked client initializing.");
|
|
896
|
-
const { organizationId: r, projectId:
|
|
897
|
-
this.organizationId = r, this.projectId =
|
|
977
|
+
const { organizationId: r, projectId: s } = ut(e);
|
|
978
|
+
this.organizationId = r, this.projectId = s, this.options = Object.freeze(e), this.apiUrl = e.apiUrl || et(), this.session = it(), this.setupPlugins(), this.setupFeatures(), this.setupPredicates(), this.setupActions(), this.precondition = e.precondition, this.condition = e.condition, this.eventBus({ type: "load", version: Ze() }), k("info", "Picked client initialized.");
|
|
898
979
|
}
|
|
899
980
|
start() {
|
|
900
|
-
|
|
901
|
-
if (!
|
|
981
|
+
Be(this), (async () => {
|
|
982
|
+
if (!N())
|
|
902
983
|
return;
|
|
903
984
|
let r;
|
|
904
|
-
typeof this.precondition > "u" ? r = !0 : typeof this.precondition == "boolean" ? r = this.precondition : r = await
|
|
905
|
-
let
|
|
906
|
-
r && (this.condition === void 0 ?
|
|
907
|
-
const i = r &&
|
|
908
|
-
if (typeof
|
|
909
|
-
const
|
|
910
|
-
this.session.setIsUser(
|
|
985
|
+
typeof this.precondition > "u" ? r = !0 : typeof this.precondition == "boolean" ? r = this.precondition : r = await E(this, this.precondition) === !0;
|
|
986
|
+
let s;
|
|
987
|
+
r && (this.condition === void 0 ? s = !0 : typeof this.condition == "boolean" ? s = this.condition : s = await E(this, this.condition) === !0);
|
|
988
|
+
const i = r && s === !0;
|
|
989
|
+
if (typeof s == "boolean" && this.session) {
|
|
990
|
+
const d = s;
|
|
991
|
+
this.session.setIsUser(d), this.eventBus({ type: "user_decide", value: d });
|
|
911
992
|
}
|
|
912
|
-
this.eventBus({ type: "initialize" }), document.body && i &&
|
|
993
|
+
this.eventBus({ type: "initialize" }), document.body && i && U(this), await ie(), i && U(this), this.eventBus({ type: "ready" }), this.isReady = !0, this.session && this.eventBus({ type: "session", ...this.session });
|
|
913
994
|
})();
|
|
914
995
|
}
|
|
915
996
|
registerFramework(e) {
|
|
916
|
-
|
|
997
|
+
je(e, this.frameworks);
|
|
917
998
|
}
|
|
918
999
|
registerComponent(e, r) {
|
|
919
|
-
|
|
1000
|
+
_(e, r, this.components);
|
|
920
1001
|
}
|
|
921
1002
|
registerPlugin(e) {
|
|
922
|
-
|
|
1003
|
+
ye(this, e, this.plugins);
|
|
923
1004
|
}
|
|
924
1005
|
registerFeature(e, r) {
|
|
925
|
-
|
|
1006
|
+
Ve(e, r, this.features);
|
|
926
1007
|
}
|
|
927
1008
|
registerPredicate(e, r) {
|
|
928
1009
|
Ce(e, r, this.predicates);
|
|
929
1010
|
}
|
|
930
1011
|
registerField(e) {
|
|
931
|
-
|
|
1012
|
+
Je(e, this.fields);
|
|
932
1013
|
}
|
|
933
1014
|
registerAction(e, r) {
|
|
934
1015
|
Ke(e, r, this.actions);
|
|
935
1016
|
}
|
|
936
1017
|
registerExperience(e) {
|
|
937
|
-
e.component &&
|
|
1018
|
+
e.component && _(`experience:${e.id}`, e.component, this.components), me(e, this.experiences);
|
|
938
1019
|
}
|
|
939
1020
|
getStateSnapshot() {
|
|
940
1021
|
return Y(this);
|
|
@@ -959,14 +1040,14 @@ class ft {
|
|
|
959
1040
|
setupPlugins() {
|
|
960
1041
|
this.options.plugins?.forEach((e) => {
|
|
961
1042
|
if (Array.isArray(e)) {
|
|
962
|
-
e.forEach((
|
|
963
|
-
this.registerPlugin(
|
|
1043
|
+
e.forEach((s) => {
|
|
1044
|
+
this.registerPlugin(s);
|
|
964
1045
|
});
|
|
965
1046
|
return;
|
|
966
1047
|
}
|
|
967
1048
|
const r = typeof e == "function" ? e() : e;
|
|
968
1049
|
if (Array.isArray(r)) {
|
|
969
|
-
r.forEach((
|
|
1050
|
+
r.forEach((s) => this.registerPlugin(s));
|
|
970
1051
|
return;
|
|
971
1052
|
}
|
|
972
1053
|
this.registerPlugin(r);
|
|
@@ -974,21 +1055,21 @@ class ft {
|
|
|
974
1055
|
}
|
|
975
1056
|
setupFeatures() {
|
|
976
1057
|
const e = this.options.features;
|
|
977
|
-
e && (Object.entries(e).forEach(([r,
|
|
978
|
-
const i = typeof
|
|
1058
|
+
e && (Object.entries(e).forEach(([r, s]) => {
|
|
1059
|
+
const i = typeof s == "function" ? s() : s;
|
|
979
1060
|
this.registerFeature(r, i);
|
|
980
1061
|
}), this.searchParams.feature && this.searchParams.feature.forEach((r) => {
|
|
981
1062
|
try {
|
|
982
|
-
const [
|
|
983
|
-
if (!
|
|
1063
|
+
const [s, i] = r.split(":");
|
|
1064
|
+
if (!s || !i)
|
|
984
1065
|
return;
|
|
985
|
-
let
|
|
986
|
-
|
|
987
|
-
key: `${
|
|
1066
|
+
let d = i;
|
|
1067
|
+
d === "true" && (d = !0), d === "false" && (d = !1), this.registerFeature(s, {
|
|
1068
|
+
key: `${d}`,
|
|
988
1069
|
// use the assigned bucket value as the key
|
|
989
|
-
name:
|
|
1070
|
+
name: s,
|
|
990
1071
|
// eslint-disable-next-line sonarjs/function-return-type
|
|
991
|
-
decide: () =>
|
|
1072
|
+
decide: () => d,
|
|
992
1073
|
storage: "session"
|
|
993
1074
|
});
|
|
994
1075
|
} catch {
|
|
@@ -997,22 +1078,22 @@ class ft {
|
|
|
997
1078
|
}
|
|
998
1079
|
setupPredicates() {
|
|
999
1080
|
const e = this.options.predicates;
|
|
1000
|
-
e && Object.entries(e).forEach(([r,
|
|
1001
|
-
if (typeof
|
|
1081
|
+
e && Object.entries(e).forEach(([r, s]) => {
|
|
1082
|
+
if (typeof s != "function") {
|
|
1002
1083
|
k("warn", `Predicate "${r}" is not a function.`);
|
|
1003
1084
|
return;
|
|
1004
1085
|
}
|
|
1005
|
-
this.registerPredicate(r,
|
|
1086
|
+
this.registerPredicate(r, s);
|
|
1006
1087
|
});
|
|
1007
1088
|
}
|
|
1008
1089
|
setupActions() {
|
|
1009
1090
|
const e = this.options.actions;
|
|
1010
|
-
e && Object.entries(e).forEach(([r,
|
|
1011
|
-
if (typeof
|
|
1091
|
+
e && Object.entries(e).forEach(([r, s]) => {
|
|
1092
|
+
if (typeof s != "function") {
|
|
1012
1093
|
k("warn", `Action "${r}" is not a function.`);
|
|
1013
1094
|
return;
|
|
1014
1095
|
}
|
|
1015
|
-
this.registerAction(r,
|
|
1096
|
+
this.registerAction(r, s);
|
|
1016
1097
|
});
|
|
1017
1098
|
}
|
|
1018
1099
|
getPluginConfig(e) {
|
|
@@ -1061,57 +1142,57 @@ class ft {
|
|
|
1061
1142
|
* // => "Fruits: apple, banana, and cherry"
|
|
1062
1143
|
*/
|
|
1063
1144
|
renderString = (e, r) => {
|
|
1064
|
-
const
|
|
1065
|
-
return
|
|
1145
|
+
const s = this.responses.listStore.getState().reduce((i, d) => (i[d.fieldId] = d.value, i), {});
|
|
1146
|
+
return gt(e, {
|
|
1066
1147
|
...r,
|
|
1067
|
-
responses:
|
|
1148
|
+
responses: s
|
|
1068
1149
|
});
|
|
1069
1150
|
};
|
|
1070
1151
|
}
|
|
1071
|
-
function
|
|
1152
|
+
function Q(t) {
|
|
1072
1153
|
return t.options?.some((e) => "condition" in e) ?? !1;
|
|
1073
1154
|
}
|
|
1074
|
-
function
|
|
1075
|
-
return t.some((e) => e.condition ||
|
|
1155
|
+
function ht(t) {
|
|
1156
|
+
return t.some((e) => e.condition || Q(e));
|
|
1076
1157
|
}
|
|
1077
|
-
async function
|
|
1078
|
-
return e.length === 0 || !
|
|
1079
|
-
e.map(async (
|
|
1080
|
-
if (!(
|
|
1158
|
+
async function xt(t, e) {
|
|
1159
|
+
return e.length === 0 || !ht(e) ? e : (await Promise.all(
|
|
1160
|
+
e.map(async (s) => {
|
|
1161
|
+
if (!(s.condition ? await E(t, s.condition) : !0))
|
|
1081
1162
|
return null;
|
|
1082
|
-
if (!
|
|
1083
|
-
return
|
|
1163
|
+
if (!s.options || !Q(s))
|
|
1164
|
+
return s;
|
|
1084
1165
|
const o = (await Promise.all(
|
|
1085
|
-
|
|
1086
|
-
)).filter((
|
|
1087
|
-
return o.length ===
|
|
1166
|
+
s.options.map(async (l) => l.condition ? await E(t, l.condition) ? l : null : l)
|
|
1167
|
+
)).filter((l) => l !== null);
|
|
1168
|
+
return o.length === s.options.length ? s : o.length === 0 ? null : { ...s, options: o };
|
|
1088
1169
|
})
|
|
1089
|
-
)).filter((
|
|
1170
|
+
)).filter((s) => s !== null);
|
|
1090
1171
|
}
|
|
1091
|
-
const
|
|
1092
|
-
const e = new
|
|
1093
|
-
return
|
|
1172
|
+
const jt = (t) => {
|
|
1173
|
+
const e = new mt(t);
|
|
1174
|
+
return de(e), e;
|
|
1094
1175
|
};
|
|
1095
1176
|
export {
|
|
1096
|
-
|
|
1097
|
-
|
|
1177
|
+
mt as Picked,
|
|
1178
|
+
jt as createClient,
|
|
1098
1179
|
A as createStorageKey,
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1180
|
+
E as evaluateRuleLogic,
|
|
1181
|
+
ot as getPickedConfig,
|
|
1182
|
+
xt as getStepFields,
|
|
1183
|
+
At as isPickedRoot,
|
|
1103
1184
|
C as localStore,
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1185
|
+
O as sessionStore,
|
|
1186
|
+
Rt as subscribe,
|
|
1187
|
+
zt as supportsCookies,
|
|
1188
|
+
ue as supportsCryptoRandomUUID,
|
|
1189
|
+
N as supportsDocument,
|
|
1190
|
+
Ct as supportsHistory,
|
|
1191
|
+
Ot as supportsIntersectionObserver,
|
|
1192
|
+
ce as supportsLocalStorage,
|
|
1193
|
+
Mt as supportsLocation,
|
|
1194
|
+
Vt as supportsSessionStorage,
|
|
1114
1195
|
Dt as supportsShadowRoot,
|
|
1115
|
-
|
|
1116
|
-
|
|
1196
|
+
Nt as supportsWebComponents,
|
|
1197
|
+
T as supportsWindow
|
|
1117
1198
|
};
|