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