@telia-ace/widget-runtime-flamingo 1.1.111-rc.0 → 1.1.111-rc.1
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/{index-hvD4rZ3z.mjs → index-BpOmXqng.mjs} +845 -844
- package/index-Cb43X4KG.js +198 -0
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
- package/render-CDXkSh_X.js +120 -0
- package/{render-Cedew0H6.mjs → render-DPn5L-ek.mjs} +133 -133
- package/index-C7Sm0jBi.js +0 -198
- package/render-ENE9aPcF.js +0 -120
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
const Nt = (
|
|
2
|
-
const
|
|
1
|
+
const Nt = (i, t, e, ...s) => {
|
|
2
|
+
const n = `[${i.get("$environment").name || "webprovisions"}] ${e}`;
|
|
3
3
|
switch (t) {
|
|
4
4
|
case "info":
|
|
5
|
-
console.info(
|
|
5
|
+
console.info(n, ...s);
|
|
6
6
|
break;
|
|
7
7
|
case "warning":
|
|
8
|
-
console.warn(
|
|
8
|
+
console.warn(n, ...s);
|
|
9
9
|
break;
|
|
10
10
|
case "error":
|
|
11
|
-
console.error(
|
|
11
|
+
console.error(n, ...s);
|
|
12
12
|
break;
|
|
13
13
|
}
|
|
14
|
-
}, ze = (
|
|
15
|
-
const t =
|
|
14
|
+
}, ze = (i) => {
|
|
15
|
+
const t = i.container || i;
|
|
16
16
|
return {
|
|
17
17
|
info: (e, ...s) => Nt(t, "info", e, ...s),
|
|
18
18
|
warn: (e, ...s) => Nt(t, "warning", e, ...s),
|
|
19
19
|
error: (e, ...s) => Nt(t, "error", e, ...s)
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
var Q = /* @__PURE__ */ ((
|
|
23
|
-
const Be = (
|
|
22
|
+
var Q = /* @__PURE__ */ ((i) => (i.Implementation = "implementation", i.Widget = "widget", i))(Q || {}), N = /* @__PURE__ */ ((i) => (i.Pre = "pre", i.Post = "post", i))(N || {});
|
|
23
|
+
const Be = (i, t, e, s) => {
|
|
24
24
|
try {
|
|
25
|
-
const
|
|
25
|
+
const n = new t(e, s);
|
|
26
26
|
return {
|
|
27
|
-
name:
|
|
27
|
+
name: i,
|
|
28
28
|
invoke: (r, o) => {
|
|
29
29
|
let a;
|
|
30
|
-
return
|
|
30
|
+
return n[r] && (a = n[r].call(n, o)), Promise.resolve(a);
|
|
31
31
|
},
|
|
32
|
-
getInstance: () =>
|
|
32
|
+
getInstance: () => n
|
|
33
33
|
};
|
|
34
|
-
} catch (
|
|
35
|
-
if (
|
|
34
|
+
} catch (n) {
|
|
35
|
+
if (n.message && n.message.indexOf("is not a constructor") >= 0)
|
|
36
36
|
return {
|
|
37
|
-
name:
|
|
37
|
+
name: i,
|
|
38
38
|
invoke: (r) => {
|
|
39
39
|
let o;
|
|
40
40
|
return r === "initialize" && (o = t(e, s)), Promise.resolve(o);
|
|
41
41
|
},
|
|
42
42
|
getInstance: () => t
|
|
43
43
|
};
|
|
44
|
-
throw
|
|
44
|
+
throw n;
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
-
function
|
|
48
|
-
return typeof
|
|
47
|
+
function ne(i, t) {
|
|
48
|
+
return typeof i > "u" ? t : i;
|
|
49
49
|
}
|
|
50
50
|
let We = class {
|
|
51
51
|
constructor(t = {}) {
|
|
52
52
|
this.part = t;
|
|
53
53
|
}
|
|
54
54
|
createCommand(t, e, s) {
|
|
55
|
-
let
|
|
56
|
-
typeof e == "function" ?
|
|
55
|
+
let n;
|
|
56
|
+
typeof e == "function" ? n = {
|
|
57
57
|
scope: Q.Widget,
|
|
58
58
|
stage: N.Post,
|
|
59
59
|
defaultArgs: void 0,
|
|
60
60
|
handlerResolver: e
|
|
61
|
-
} :
|
|
62
|
-
scope:
|
|
63
|
-
stage:
|
|
61
|
+
} : n = {
|
|
62
|
+
scope: ne(e.scope, Q.Widget),
|
|
63
|
+
stage: ne(e.stage, N.Post),
|
|
64
64
|
defaultArgs: e.defaultArgs,
|
|
65
65
|
handlerResolver: s
|
|
66
66
|
};
|
|
67
67
|
let r = this.part;
|
|
68
68
|
const o = t.split(".");
|
|
69
69
|
return o.forEach((a, h) => {
|
|
70
|
-
h === o.length - 1 ? r[a] || (r[a] = () =>
|
|
70
|
+
h === o.length - 1 ? r[a] || (r[a] = () => n) : r = this.part[a] = this.part[a] || {};
|
|
71
71
|
}), this;
|
|
72
72
|
}
|
|
73
73
|
get() {
|
|
74
74
|
return this.part;
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
|
-
const Ae = (
|
|
77
|
+
const Ae = (i) => {
|
|
78
78
|
const t = new We({});
|
|
79
|
-
return
|
|
79
|
+
return i(t), t.get();
|
|
80
80
|
};
|
|
81
|
-
Ae((
|
|
82
|
-
|
|
81
|
+
Ae((i) => {
|
|
82
|
+
i.createCommand(
|
|
83
83
|
"types.register",
|
|
84
84
|
{ scope: Q.Implementation, stage: N.Pre },
|
|
85
85
|
(t) => (e, s) => {
|
|
@@ -104,27 +104,27 @@ Ae((n) => {
|
|
|
104
104
|
).createCommand(
|
|
105
105
|
"plugin",
|
|
106
106
|
{ stage: N.Pre },
|
|
107
|
-
(t) => (e, s,
|
|
107
|
+
(t) => (e, s, n) => {
|
|
108
108
|
const { container: r } = t;
|
|
109
109
|
let o = null, a = e, h = s;
|
|
110
|
-
typeof e == "string" && (o = e, a = s, h =
|
|
111
|
-
const c = (
|
|
112
|
-
const { transformPluginSettings:
|
|
110
|
+
typeof e == "string" && (o = e, a = s, h = n);
|
|
111
|
+
const c = (l) => {
|
|
112
|
+
const { transformPluginSettings: d } = t.container.get("$environmentOptions"), p = d ? d(
|
|
113
113
|
h || {},
|
|
114
114
|
o,
|
|
115
115
|
t.container,
|
|
116
116
|
a
|
|
117
117
|
) : s;
|
|
118
118
|
try {
|
|
119
|
-
const
|
|
119
|
+
const u = Be(
|
|
120
120
|
o,
|
|
121
121
|
a,
|
|
122
122
|
r,
|
|
123
|
-
|
|
123
|
+
p
|
|
124
124
|
);
|
|
125
|
-
r.get("$plugins").push(
|
|
126
|
-
} catch (
|
|
127
|
-
ze(t).warn("Error when initializing plugin",
|
|
125
|
+
r.get("$plugins").push(u), l && u.invoke("initialize", null);
|
|
126
|
+
} catch (u) {
|
|
127
|
+
ze(t).warn("Error when initializing plugin", u);
|
|
128
128
|
}
|
|
129
129
|
};
|
|
130
130
|
t.container.get("$instance") ? c(!0) : t.events.subscribeOnce("widget:instance-created", () => c(!1));
|
|
@@ -157,25 +157,25 @@ Ae((n) => {
|
|
|
157
157
|
}
|
|
158
158
|
);
|
|
159
159
|
});
|
|
160
|
-
function qe(
|
|
160
|
+
function qe(i) {
|
|
161
161
|
const t = {};
|
|
162
|
-
return [].filter.call(
|
|
162
|
+
return [].filter.call(i.attributes, (e) => /^data-/.test(e.name)).map((e) => e.name).forEach((e) => t[e.substr(5)] = i.getAttribute(e)), t;
|
|
163
163
|
}
|
|
164
|
-
const Je = (
|
|
165
|
-
const s = qe(
|
|
164
|
+
const Je = (i, t, e) => {
|
|
165
|
+
const s = qe(i);
|
|
166
166
|
e({
|
|
167
|
-
sourceDOMElement:
|
|
167
|
+
sourceDOMElement: i,
|
|
168
168
|
eventType: t,
|
|
169
169
|
data: s
|
|
170
170
|
});
|
|
171
171
|
};
|
|
172
|
-
function re(
|
|
173
|
-
|
|
172
|
+
function re(i, t, e) {
|
|
173
|
+
i.forEach((s) => {
|
|
174
174
|
s.dataset.attached !== "true" && (Je(s, t, e), s.dataset.monitored = "true");
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
|
-
function Fe(
|
|
178
|
-
const s =
|
|
177
|
+
function Fe(i, t, e) {
|
|
178
|
+
const s = i.container.get("bootstrapping.monitor");
|
|
179
179
|
s && s.events.subscribe("bootstrap:trigger-elements-updated", (r, o) => {
|
|
180
180
|
re(
|
|
181
181
|
o.triggerElements,
|
|
@@ -183,87 +183,87 @@ function Fe(n, t, e) {
|
|
|
183
183
|
e
|
|
184
184
|
);
|
|
185
185
|
});
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
const n = i.container.get("triggerElements");
|
|
187
|
+
n && re(
|
|
188
|
+
n,
|
|
189
189
|
t,
|
|
190
190
|
e
|
|
191
191
|
);
|
|
192
192
|
}
|
|
193
|
-
Ae((
|
|
194
|
-
|
|
193
|
+
Ae((i) => {
|
|
194
|
+
i.createCommand(
|
|
195
195
|
"ready",
|
|
196
196
|
{ scope: Q.Implementation, stage: N.Pre },
|
|
197
197
|
(t) => (e) => {
|
|
198
|
-
const { container: s } = t,
|
|
199
|
-
s.get("bootstrapping").ready ? e(
|
|
200
|
-
e(
|
|
198
|
+
const { container: s } = t, n = s.owner;
|
|
199
|
+
s.get("bootstrapping").ready ? e(n) : n.events.subscribeOnce("bootstrap:ready", () => {
|
|
200
|
+
e(n);
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
203
|
);
|
|
204
204
|
});
|
|
205
|
-
const Mt = (
|
|
206
|
-
const
|
|
205
|
+
const Mt = (i, t, e, ...s) => {
|
|
206
|
+
const n = `[${i.get("$environment").name || "webprovisions"}] ${e}`;
|
|
207
207
|
switch (t) {
|
|
208
208
|
case "info":
|
|
209
|
-
console.info(
|
|
209
|
+
console.info(n, ...s);
|
|
210
210
|
break;
|
|
211
211
|
case "warning":
|
|
212
|
-
console.warn(
|
|
212
|
+
console.warn(n, ...s);
|
|
213
213
|
break;
|
|
214
214
|
case "error":
|
|
215
|
-
console.error(
|
|
215
|
+
console.error(n, ...s);
|
|
216
216
|
break;
|
|
217
217
|
}
|
|
218
|
-
}, Ke = (
|
|
219
|
-
const t =
|
|
218
|
+
}, Ke = (i) => {
|
|
219
|
+
const t = i.container || i;
|
|
220
220
|
return {
|
|
221
221
|
info: (e, ...s) => Mt(t, "info", e, ...s),
|
|
222
222
|
warn: (e, ...s) => Mt(t, "warning", e, ...s),
|
|
223
223
|
error: (e, ...s) => Mt(t, "error", e, ...s)
|
|
224
224
|
};
|
|
225
225
|
};
|
|
226
|
-
var
|
|
227
|
-
const Ge = (
|
|
226
|
+
var ft = /* @__PURE__ */ ((i) => (i.Implementation = "implementation", i.Widget = "widget", i))(ft || {}), R = /* @__PURE__ */ ((i) => (i.Pre = "pre", i.Post = "post", i))(R || {});
|
|
227
|
+
const Ge = (i, t, e, s) => {
|
|
228
228
|
try {
|
|
229
|
-
const
|
|
229
|
+
const n = new t(e, s);
|
|
230
230
|
return {
|
|
231
|
-
name:
|
|
231
|
+
name: i,
|
|
232
232
|
invoke: (r, o) => {
|
|
233
233
|
let a;
|
|
234
|
-
return
|
|
234
|
+
return n[r] && (a = n[r].call(n, o)), Promise.resolve(a);
|
|
235
235
|
},
|
|
236
|
-
getInstance: () =>
|
|
236
|
+
getInstance: () => n
|
|
237
237
|
};
|
|
238
|
-
} catch (
|
|
239
|
-
if (
|
|
238
|
+
} catch (n) {
|
|
239
|
+
if (n.message && n.message.indexOf("is not a constructor") >= 0)
|
|
240
240
|
return {
|
|
241
|
-
name:
|
|
241
|
+
name: i,
|
|
242
242
|
invoke: (r) => {
|
|
243
243
|
let o;
|
|
244
244
|
return r === "initialize" && (o = t(e, s)), Promise.resolve(o);
|
|
245
245
|
},
|
|
246
246
|
getInstance: () => t
|
|
247
247
|
};
|
|
248
|
-
throw
|
|
248
|
+
throw n;
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
function oe(
|
|
252
|
-
return typeof
|
|
251
|
+
function oe(i, t) {
|
|
252
|
+
return typeof i > "u" ? t : i;
|
|
253
253
|
}
|
|
254
254
|
class Ye {
|
|
255
255
|
constructor(t = {}) {
|
|
256
256
|
this.part = t;
|
|
257
257
|
}
|
|
258
258
|
createCommand(t, e, s) {
|
|
259
|
-
let
|
|
260
|
-
typeof e == "function" ?
|
|
261
|
-
scope:
|
|
259
|
+
let n;
|
|
260
|
+
typeof e == "function" ? n = {
|
|
261
|
+
scope: ft.Widget,
|
|
262
262
|
stage: R.Post,
|
|
263
263
|
defaultArgs: void 0,
|
|
264
264
|
handlerResolver: e
|
|
265
|
-
} :
|
|
266
|
-
scope: oe(e.scope,
|
|
265
|
+
} : n = {
|
|
266
|
+
scope: oe(e.scope, ft.Widget),
|
|
267
267
|
stage: oe(e.stage, R.Post),
|
|
268
268
|
defaultArgs: e.defaultArgs,
|
|
269
269
|
handlerResolver: s
|
|
@@ -271,21 +271,21 @@ class Ye {
|
|
|
271
271
|
let r = this.part;
|
|
272
272
|
const o = t.split(".");
|
|
273
273
|
return o.forEach((a, h) => {
|
|
274
|
-
h === o.length - 1 ? r[a] || (r[a] = () =>
|
|
274
|
+
h === o.length - 1 ? r[a] || (r[a] = () => n) : r = this.part[a] = this.part[a] || {};
|
|
275
275
|
}), this;
|
|
276
276
|
}
|
|
277
277
|
get() {
|
|
278
278
|
return this.part;
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
-
const Jt = (
|
|
281
|
+
const Jt = (i) => {
|
|
282
282
|
const t = new Ye({});
|
|
283
|
-
return
|
|
283
|
+
return i(t), t.get();
|
|
284
284
|
};
|
|
285
|
-
Jt((
|
|
286
|
-
|
|
285
|
+
Jt((i) => {
|
|
286
|
+
i.createCommand(
|
|
287
287
|
"types.register",
|
|
288
|
-
{ scope:
|
|
288
|
+
{ scope: ft.Implementation, stage: R.Pre },
|
|
289
289
|
(t) => (e, s) => {
|
|
290
290
|
t.container.get("$types")[e] = s;
|
|
291
291
|
}
|
|
@@ -308,27 +308,27 @@ Jt((n) => {
|
|
|
308
308
|
).createCommand(
|
|
309
309
|
"plugin",
|
|
310
310
|
{ stage: R.Pre },
|
|
311
|
-
(t) => (e, s,
|
|
311
|
+
(t) => (e, s, n) => {
|
|
312
312
|
const { container: r } = t;
|
|
313
313
|
let o = null, a = e, h = s;
|
|
314
|
-
typeof e == "string" && (o = e, a = s, h =
|
|
315
|
-
const c = (
|
|
316
|
-
const { transformPluginSettings:
|
|
314
|
+
typeof e == "string" && (o = e, a = s, h = n);
|
|
315
|
+
const c = (l) => {
|
|
316
|
+
const { transformPluginSettings: d } = t.container.get("$environmentOptions"), p = d ? d(
|
|
317
317
|
h || {},
|
|
318
318
|
o,
|
|
319
319
|
t.container,
|
|
320
320
|
a
|
|
321
321
|
) : s;
|
|
322
322
|
try {
|
|
323
|
-
const
|
|
323
|
+
const u = Ge(
|
|
324
324
|
o,
|
|
325
325
|
a,
|
|
326
326
|
r,
|
|
327
|
-
|
|
327
|
+
p
|
|
328
328
|
);
|
|
329
|
-
r.get("$plugins").push(
|
|
330
|
-
} catch (
|
|
331
|
-
Ke(t).warn("Error when initializing plugin",
|
|
329
|
+
r.get("$plugins").push(u), l && u.invoke("initialize", null);
|
|
330
|
+
} catch (u) {
|
|
331
|
+
Ke(t).warn("Error when initializing plugin", u);
|
|
332
332
|
}
|
|
333
333
|
};
|
|
334
334
|
t.container.get("$instance") ? c(!0) : t.events.subscribeOnce("widget:instance-created", () => c(!1));
|
|
@@ -361,7 +361,7 @@ Jt((n) => {
|
|
|
361
361
|
}
|
|
362
362
|
);
|
|
363
363
|
});
|
|
364
|
-
var
|
|
364
|
+
var Ee = /* @__PURE__ */ ((i) => (i.Activating = "activating", i.Loading = "loading", i.Activated = "activated", i.Deactivating = "deactivating", i.Deactivated = "deactivated", i))(Ee || {});
|
|
365
365
|
class Ze {
|
|
366
366
|
/**
|
|
367
367
|
* Creates a new `Widget` instance.
|
|
@@ -373,7 +373,7 @@ class Ze {
|
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
-
const _t = (
|
|
376
|
+
const _t = (i, t, ...e) => typeof t == "string" ? i(`[humany] ${t}`, ...e) : i(t, ...e), K = class {
|
|
377
377
|
constructor() {
|
|
378
378
|
this.keys = [], this.log = (t, ...e) => this.lookup(t, () => K.log(...e)), this.warn = (t, ...e) => this.lookup(t, () => K.warn(...e)), this.error = (t, ...e) => this.lookup(t, () => K.error(...e)), this.info = (t, ...e) => this.lookup(t, () => K.info(...e));
|
|
379
379
|
}
|
|
@@ -381,26 +381,26 @@ const _t = (n, t, ...e) => typeof t == "string" ? n(`[humany] ${t}`, ...e) : n(t
|
|
|
381
381
|
this.keys.indexOf(t) === -1 && (this.keys.push(t), e());
|
|
382
382
|
}
|
|
383
383
|
};
|
|
384
|
-
let
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
const
|
|
384
|
+
let v = K;
|
|
385
|
+
v.log = (...i) => _t(console.log, ...i);
|
|
386
|
+
v.warn = (...i) => _t(console.warn, ...i);
|
|
387
|
+
v.error = (...i) => _t(console.error, ...i);
|
|
388
|
+
v.info = (...i) => _t(console.info, ...i);
|
|
389
|
+
const xe = (i) => {
|
|
390
390
|
let t = {}, e, s;
|
|
391
|
-
if (typeof
|
|
392
|
-
return
|
|
393
|
-
t = Array.isArray(
|
|
394
|
-
for (s in
|
|
395
|
-
e =
|
|
391
|
+
if (typeof i != "object" || i === null)
|
|
392
|
+
return i;
|
|
393
|
+
t = Array.isArray(i) ? [] : {};
|
|
394
|
+
for (s in i)
|
|
395
|
+
e = i[s], t[s] = typeof e == "object" && e !== null ? xe(e) : e;
|
|
396
396
|
return t;
|
|
397
397
|
};
|
|
398
|
-
function ae(
|
|
398
|
+
function ae(i) {
|
|
399
399
|
let t = 0;
|
|
400
|
-
if (
|
|
400
|
+
if (i.length === 0)
|
|
401
401
|
return t.toString();
|
|
402
|
-
for (let e = 0; e <
|
|
403
|
-
const s =
|
|
402
|
+
for (let e = 0; e < i.length; e++) {
|
|
403
|
+
const s = i.charCodeAt(e);
|
|
404
404
|
t = (t << 5) - t + s, t = t & t;
|
|
405
405
|
}
|
|
406
406
|
return t.toString();
|
|
@@ -409,8 +409,8 @@ let Qe = class {
|
|
|
409
409
|
constructor(t, e) {
|
|
410
410
|
this.lockWarningTime = t, this.lockErrorTime = e, this.tasks = [], this.current = Promise.resolve(), this.next = this.next.bind(this);
|
|
411
411
|
}
|
|
412
|
-
add(t, e, s,
|
|
413
|
-
this.tasks.push({ task: t, resolve: e, reject: s, done:
|
|
412
|
+
add(t, e, s, n) {
|
|
413
|
+
this.tasks.push({ task: t, resolve: e, reject: s, done: n }), this.next();
|
|
414
414
|
}
|
|
415
415
|
next() {
|
|
416
416
|
this.current = this.current.then(() => {
|
|
@@ -418,15 +418,15 @@ let Qe = class {
|
|
|
418
418
|
if (t) {
|
|
419
419
|
let e;
|
|
420
420
|
const s = setTimeout(() => {
|
|
421
|
-
process.env.NODE_ENV !== "production" &&
|
|
421
|
+
process.env.NODE_ENV !== "production" && v.warn(
|
|
422
422
|
`A lock has exceeded ${this.lockWarningTime} ms. Waiting additional ${this.lockErrorTime} ms before rejecting the task.`,
|
|
423
423
|
t
|
|
424
424
|
), e = setTimeout(() => {
|
|
425
425
|
t.reject("lock timeout exceeded");
|
|
426
426
|
}, this.lockErrorTime);
|
|
427
|
-
}, this.lockWarningTime),
|
|
428
|
-
return Promise.resolve(
|
|
429
|
-
() =>
|
|
427
|
+
}, this.lockWarningTime), n = Promise.resolve(t.task()).then((r) => (clearTimeout(s), clearTimeout(e), r));
|
|
428
|
+
return Promise.resolve(n).then(this.next).then(
|
|
429
|
+
() => n.then((r) => {
|
|
430
430
|
t.done(), t.resolve(r);
|
|
431
431
|
})
|
|
432
432
|
).catch((r) => (t.done(), t.reject(r), this.next()));
|
|
@@ -436,27 +436,27 @@ let Qe = class {
|
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
438
|
const ct = /* @__PURE__ */ new WeakMap();
|
|
439
|
-
function
|
|
440
|
-
return ct.has(
|
|
441
|
-
const o = ct.get(
|
|
442
|
-
o.add(s,
|
|
443
|
-
o.tasks.length || ct.delete(
|
|
439
|
+
function E(i, t = 5e3, e = 1e3) {
|
|
440
|
+
return ct.has(i) || ct.set(i, new Qe(t, e)), (s) => new Promise((n, r) => {
|
|
441
|
+
const o = ct.get(i);
|
|
442
|
+
o.add(s, n, r, () => {
|
|
443
|
+
o.tasks.length || ct.delete(i);
|
|
444
444
|
});
|
|
445
445
|
});
|
|
446
446
|
}
|
|
447
|
-
const Xe = (
|
|
447
|
+
const Xe = (i, t) => {
|
|
448
448
|
const e = () => t.querySelectorAll("[data-loading=true]").length > 0, s = /* @__PURE__ */ (() => {
|
|
449
|
-
let
|
|
449
|
+
let n = !1;
|
|
450
450
|
return () => {
|
|
451
|
-
|
|
451
|
+
n || (i.get("$widget").events.dispatch("widget:data-loaded", {
|
|
452
452
|
element: t
|
|
453
|
-
}),
|
|
453
|
+
}), n = !0);
|
|
454
454
|
};
|
|
455
455
|
})();
|
|
456
456
|
if (!e())
|
|
457
457
|
return s();
|
|
458
|
-
new MutationObserver((
|
|
459
|
-
|
|
458
|
+
new MutationObserver((n, r) => {
|
|
459
|
+
n.find(
|
|
460
460
|
(o) => o.type === "attributes" && o.attributeName === "data-loading"
|
|
461
461
|
) && !e() && (r.disconnect(), s());
|
|
462
462
|
}).observe(t, {
|
|
@@ -464,25 +464,25 @@ const Xe = (n, t) => {
|
|
|
464
464
|
childList: !0,
|
|
465
465
|
subtree: !0
|
|
466
466
|
});
|
|
467
|
-
}, ts = (
|
|
468
|
-
|
|
467
|
+
}, ts = (i, t) => {
|
|
468
|
+
i.get("$widget").container.getAsync("components").then((e) => {
|
|
469
469
|
e.events.subscribeOnce(
|
|
470
470
|
"components:component-model-initialized",
|
|
471
471
|
() => {
|
|
472
472
|
let s = e.nodes.visible.reduce(
|
|
473
473
|
(r, o) => (!o.name || !o.type || o.type === "view" || o.type === "root" || o.attributes.layout.size === "none" || t.querySelector(`[data-name="${o.name}"]`) || r.push(o.name), r),
|
|
474
474
|
[]
|
|
475
|
-
),
|
|
475
|
+
), n = !1;
|
|
476
476
|
new MutationObserver((r, o) => {
|
|
477
477
|
r.forEach((a) => {
|
|
478
478
|
if (a.addedNodes) {
|
|
479
479
|
const h = Array.from(
|
|
480
480
|
a.addedNodes
|
|
481
|
-
).reduce((c,
|
|
482
|
-
const
|
|
483
|
-
return
|
|
481
|
+
).reduce((c, l) => {
|
|
482
|
+
const d = l.getAttribute && l.getAttribute("data-name");
|
|
483
|
+
return d && s.indexOf(d) > -1 && c.push(d), c;
|
|
484
484
|
}, []);
|
|
485
|
-
s = s.filter((c) => h.indexOf(c) === -1), !
|
|
485
|
+
s = s.filter((c) => h.indexOf(c) === -1), !n && s.length === 0 && (n = !0, Xe(i, t), o.disconnect());
|
|
486
486
|
}
|
|
487
487
|
});
|
|
488
488
|
}).observe(t, {
|
|
@@ -497,7 +497,7 @@ const Xe = (n, t) => {
|
|
|
497
497
|
);
|
|
498
498
|
});
|
|
499
499
|
}, O = () => Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
|
|
500
|
-
function
|
|
500
|
+
function it() {
|
|
501
501
|
return O() + O() + "-" + O() + "-" + O() + "-" + O() + "-" + O() + O() + O();
|
|
502
502
|
}
|
|
503
503
|
class es {
|
|
@@ -515,15 +515,15 @@ class es {
|
|
|
515
515
|
subscribe(t, e) {
|
|
516
516
|
return this.events.subscribe(
|
|
517
517
|
"data:action",
|
|
518
|
-
(s, { action:
|
|
518
|
+
(s, { action: n, value: r, target: o }) => t === o && e(t, n, r)
|
|
519
519
|
);
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
|
-
const Ce = (
|
|
522
|
+
const Ce = (i) => {
|
|
523
523
|
const t = [];
|
|
524
524
|
return [
|
|
525
525
|
(e, s) => {
|
|
526
|
-
t.push(
|
|
526
|
+
t.push(i.subscribe(e, s));
|
|
527
527
|
},
|
|
528
528
|
() => {
|
|
529
529
|
t.forEach((e) => {
|
|
@@ -555,10 +555,10 @@ let W = class {
|
|
|
555
555
|
new W(t).withId(e.id),
|
|
556
556
|
s
|
|
557
557
|
);
|
|
558
|
-
const [
|
|
558
|
+
const [n, r] = Ce(
|
|
559
559
|
this.platform.events
|
|
560
560
|
);
|
|
561
|
-
this.subscribe =
|
|
561
|
+
this.subscribe = n, this.unsubscribe = r;
|
|
562
562
|
}
|
|
563
563
|
properties(t) {
|
|
564
564
|
return t && this.node.touchProperties((e) => t(e)), this.node.attributes.properties;
|
|
@@ -626,25 +626,25 @@ class ss {
|
|
|
626
626
|
}), this.actions.dispose();
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
|
-
const
|
|
630
|
-
const s =
|
|
629
|
+
const is = (i, t, e) => {
|
|
630
|
+
const s = i.concat(), n = (r, o, a) => {
|
|
631
631
|
let h = !0;
|
|
632
632
|
if (s.length) {
|
|
633
|
-
const c = s.shift(),
|
|
634
|
-
|
|
635
|
-
Object.assign({}, o,
|
|
633
|
+
const c = s.shift(), l = (d, p) => (h = !1, n(
|
|
634
|
+
d,
|
|
635
|
+
Object.assign({}, o, p),
|
|
636
636
|
a
|
|
637
637
|
));
|
|
638
|
-
return Promise.resolve(c(r,
|
|
639
|
-
(
|
|
640
|
-
...
|
|
638
|
+
return Promise.resolve(c(r, l, a)).then(
|
|
639
|
+
(d) => ({
|
|
640
|
+
...d,
|
|
641
641
|
cancelled: h
|
|
642
642
|
})
|
|
643
643
|
);
|
|
644
644
|
}
|
|
645
645
|
return Promise.resolve({ data: r, cancelled: !1, options: o });
|
|
646
646
|
};
|
|
647
|
-
return
|
|
647
|
+
return n(t, {}, e);
|
|
648
648
|
};
|
|
649
649
|
let At = class {
|
|
650
650
|
constructor(t, e, s) {
|
|
@@ -659,16 +659,16 @@ let At = class {
|
|
|
659
659
|
ns: this.ns
|
|
660
660
|
};
|
|
661
661
|
this.platform.actionsState.handlers.push(s);
|
|
662
|
-
const
|
|
662
|
+
const n = () => {
|
|
663
663
|
const r = this.platform.actionsState.handlers.indexOf(s);
|
|
664
664
|
r > -1 && this.platform.actionsState.handlers.splice(r, 1);
|
|
665
665
|
};
|
|
666
|
-
return this.subscriptions.push(
|
|
666
|
+
return this.subscriptions.push(n), n;
|
|
667
667
|
}
|
|
668
668
|
dispatch(t, e) {
|
|
669
669
|
const s = this.platform.nodes.all.concat(
|
|
670
670
|
this.platform.nodes.detached
|
|
671
|
-
),
|
|
671
|
+
), n = {}, r = this.platform.actionsState.handlers.filter(
|
|
672
672
|
(o) => o.key === t && (!o.ns || !this.ns || o.ns === this.ns)
|
|
673
673
|
);
|
|
674
674
|
return Promise.all(
|
|
@@ -676,39 +676,39 @@ let At = class {
|
|
|
676
676
|
const a = s.filter(
|
|
677
677
|
(c) => o.target.match(c) && this.target.match(c)
|
|
678
678
|
), h = this.platform.actionsState.watchers.filter((c) => c.key === t && (!c.ns || !this.ns || c.ns === this.ns) && a.some(
|
|
679
|
-
(
|
|
679
|
+
(l) => c.target.match(l)
|
|
680
680
|
)).map((c) => c.fn);
|
|
681
681
|
return Promise.all(
|
|
682
682
|
a.map((c) => {
|
|
683
|
-
const
|
|
683
|
+
const l = new Ft(
|
|
684
684
|
this.platform,
|
|
685
685
|
c,
|
|
686
686
|
this.ns
|
|
687
687
|
);
|
|
688
|
-
return
|
|
689
|
-
(
|
|
690
|
-
const { data:
|
|
688
|
+
return is(h, e, l).then(
|
|
689
|
+
(d) => {
|
|
690
|
+
const { data: p = {}, options: u, cancelled: g } = d;
|
|
691
691
|
return Promise.resolve(
|
|
692
|
-
g ? {} : o.fn(
|
|
693
|
-
).then((
|
|
694
|
-
|
|
692
|
+
g ? {} : o.fn(p, u, l)
|
|
693
|
+
).then((b) => {
|
|
694
|
+
n[c.id] = b;
|
|
695
695
|
});
|
|
696
696
|
}
|
|
697
697
|
);
|
|
698
698
|
})
|
|
699
699
|
);
|
|
700
700
|
})
|
|
701
|
-
).then(() =>
|
|
701
|
+
).then(() => n);
|
|
702
702
|
}
|
|
703
703
|
watch(t, e) {
|
|
704
|
-
let s = t,
|
|
704
|
+
let s = t, n = this.ns;
|
|
705
705
|
const r = t.split(".");
|
|
706
|
-
r.length > 1 && (
|
|
706
|
+
r.length > 1 && (n = r[0], s = r.splice(1).join("."));
|
|
707
707
|
const o = {
|
|
708
708
|
fn: e,
|
|
709
709
|
target: this.target,
|
|
710
710
|
key: s,
|
|
711
|
-
ns:
|
|
711
|
+
ns: n
|
|
712
712
|
};
|
|
713
713
|
this.platform.actionsState.watchers.push(o);
|
|
714
714
|
const a = () => {
|
|
@@ -721,13 +721,13 @@ let At = class {
|
|
|
721
721
|
this.subscriptions.forEach((t) => t());
|
|
722
722
|
}
|
|
723
723
|
};
|
|
724
|
-
Jt((
|
|
725
|
-
|
|
724
|
+
Jt((i) => {
|
|
725
|
+
i.createCommand("components", (t) => (e) => {
|
|
726
726
|
t.events.subscribeOnce(
|
|
727
727
|
"components:platform-created",
|
|
728
|
-
(s, { platform:
|
|
728
|
+
(s, { platform: n }) => {
|
|
729
729
|
e.handlers && e.handlers.forEach(([r, o]) => {
|
|
730
|
-
|
|
730
|
+
n.addComponentHandler(r, o);
|
|
731
731
|
});
|
|
732
732
|
}
|
|
733
733
|
);
|
|
@@ -735,7 +735,7 @@ Jt((n) => {
|
|
|
735
735
|
});
|
|
736
736
|
let Bt = class {
|
|
737
737
|
constructor(t, e) {
|
|
738
|
-
this.events = t, this.tags = [], this.children = {}, this.changesets = [], this.mountCount = 0, this.id =
|
|
738
|
+
this.events = t, this.tags = [], this.children = {}, this.changesets = [], this.mountCount = 0, this.id = it(), this.type = e, this.attributes = {
|
|
739
739
|
context: {},
|
|
740
740
|
properties: {},
|
|
741
741
|
layout: {},
|
|
@@ -744,7 +744,7 @@ let Bt = class {
|
|
|
744
744
|
}
|
|
745
745
|
mount(t, e) {
|
|
746
746
|
let s = t.get("mounted-nodes");
|
|
747
|
-
return s || (s = /* @__PURE__ */ new Map(), t.register("mounted-nodes", s)), s.has(this) ? (process.env.NODE_ENV !== "production" &&
|
|
747
|
+
return s || (s = /* @__PURE__ */ new Map(), t.register("mounted-nodes", s)), s.has(this) ? (process.env.NODE_ENV !== "production" && v.error(
|
|
748
748
|
"Trying to mount an already mounted component node.",
|
|
749
749
|
this
|
|
750
750
|
), () => {
|
|
@@ -769,46 +769,46 @@ let Bt = class {
|
|
|
769
769
|
t.parent = this, this.children[e] || (this.children[e] = []), this.children[e].unshift(t), this.events.dispatch("components:node-appended", { node: t });
|
|
770
770
|
}
|
|
771
771
|
touchProperties(t, e = {}, s) {
|
|
772
|
-
const
|
|
773
|
-
return this.changesets.push(
|
|
772
|
+
const n = [{ properties: t }, e];
|
|
773
|
+
return this.changesets.push(n), this.events.dispatch("components:set-properties", { node: this }), () => {
|
|
774
774
|
if (s) {
|
|
775
|
-
const r = this.changesets.indexOf(
|
|
775
|
+
const r = this.changesets.indexOf(n);
|
|
776
776
|
r > -1 && (this.changesets.splice(r, 1), this.events.dispatch("components:set-properties", { node: this }));
|
|
777
777
|
}
|
|
778
778
|
};
|
|
779
779
|
}
|
|
780
780
|
writeProperties(t, e = {}, s) {
|
|
781
|
-
const
|
|
782
|
-
return this.changesets.push(
|
|
781
|
+
const n = [{ properties: t }, e];
|
|
782
|
+
return this.changesets.push(n), this.events.dispatch("components:set-properties", { node: this }), () => {
|
|
783
783
|
if (s) {
|
|
784
|
-
const r = this.changesets.indexOf(
|
|
784
|
+
const r = this.changesets.indexOf(n);
|
|
785
785
|
r > -1 && (this.changesets.splice(r, 1), this.events.dispatch("components:set-properties", { node: this }));
|
|
786
786
|
}
|
|
787
787
|
};
|
|
788
788
|
}
|
|
789
789
|
writeLayout(t, e = {}, s) {
|
|
790
|
-
const
|
|
791
|
-
return this.changesets.push(
|
|
790
|
+
const n = [{ layout: t }, e];
|
|
791
|
+
return this.changesets.push(n), this.events.dispatch("components:set-layout", { node: this }), () => {
|
|
792
792
|
if (!s)
|
|
793
793
|
return;
|
|
794
|
-
const r = this.changesets.indexOf(
|
|
794
|
+
const r = this.changesets.indexOf(n);
|
|
795
795
|
r > -1 && (this.changesets.splice(r, 1), this.events.dispatch("components:set-layout", { node: this }));
|
|
796
796
|
};
|
|
797
797
|
}
|
|
798
798
|
writeContext(t, e = {}, s) {
|
|
799
|
-
const
|
|
800
|
-
return this.changesets.push(
|
|
799
|
+
const n = [{ context: t }, e];
|
|
800
|
+
return this.changesets.push(n), this.events.dispatch("components:set-context", { node: this }), () => {
|
|
801
801
|
if (!s)
|
|
802
802
|
return;
|
|
803
|
-
const r = this.changesets.indexOf(
|
|
803
|
+
const r = this.changesets.indexOf(n);
|
|
804
804
|
r > -1 && (this.changesets.splice(r, 1), this.events.dispatch("components:set-context", { node: this }));
|
|
805
805
|
};
|
|
806
806
|
}
|
|
807
807
|
getChildren(t = "default") {
|
|
808
808
|
const e = this.children[t] || [];
|
|
809
|
-
return e.reduce((s,
|
|
810
|
-
const { order: o = r } =
|
|
811
|
-
return s[o] ? s.splice(o, 0,
|
|
809
|
+
return e.reduce((s, n, r) => {
|
|
810
|
+
const { order: o = r } = n.attributes.layout;
|
|
811
|
+
return s[o] ? s.splice(o, 0, n) : s[o] = n, s;
|
|
812
812
|
}, Array(e.length));
|
|
813
813
|
}
|
|
814
814
|
remove() {
|
|
@@ -816,60 +816,60 @@ let Bt = class {
|
|
|
816
816
|
}
|
|
817
817
|
removeChild(t) {
|
|
818
818
|
Object.keys(this.children).forEach((e) => {
|
|
819
|
-
const s = this.children[e],
|
|
820
|
-
|
|
819
|
+
const s = this.children[e], n = s.indexOf(t);
|
|
820
|
+
n > -1 && (s.splice(n, 1), this.events.dispatch("components:node-removed", {
|
|
821
821
|
node: t,
|
|
822
822
|
parentNode: this
|
|
823
823
|
}));
|
|
824
824
|
}), delete t.parent;
|
|
825
825
|
}
|
|
826
826
|
};
|
|
827
|
-
const Oe = (
|
|
828
|
-
for (let s = 0,
|
|
829
|
-
const r = t[
|
|
827
|
+
const Oe = (i, t, e) => {
|
|
828
|
+
for (let s = 0, n = i.length; s < n && e(i[s]) !== !0; s++) {
|
|
829
|
+
const r = t[i[s].id] || "default", o = i[s].getChildren(r);
|
|
830
830
|
Oe(o, t, e);
|
|
831
831
|
}
|
|
832
|
-
},
|
|
833
|
-
if (e(
|
|
834
|
-
const s = t[
|
|
835
|
-
Oe(
|
|
832
|
+
}, Et = (i, t, e) => {
|
|
833
|
+
if (e(i) !== !0) {
|
|
834
|
+
const s = t[i.id] || "default", n = i.children[s];
|
|
835
|
+
Oe(n, t, e);
|
|
836
836
|
}
|
|
837
|
-
},
|
|
837
|
+
}, pt = (i, t) => {
|
|
838
838
|
const e = [];
|
|
839
|
-
return
|
|
839
|
+
return Et(i, t, (s) => {
|
|
840
840
|
e.push(s);
|
|
841
841
|
}), e;
|
|
842
|
-
}, Se = (
|
|
842
|
+
}, Se = (i, t, e) => {
|
|
843
843
|
let s;
|
|
844
|
-
return
|
|
845
|
-
if (e(
|
|
846
|
-
return s =
|
|
844
|
+
return Et(i, t, (n) => {
|
|
845
|
+
if (e(n))
|
|
846
|
+
return s = n, !0;
|
|
847
847
|
}), s;
|
|
848
848
|
};
|
|
849
|
-
let
|
|
849
|
+
let ns = class {
|
|
850
850
|
constructor(t, e, s) {
|
|
851
851
|
this.root = t, this.switches = e, this.all = [], this.visible = [], this.detached = [], s.subscribe(
|
|
852
852
|
"components:node-appended",
|
|
853
|
-
(
|
|
854
|
-
this.all.push(r.node), this.visible =
|
|
853
|
+
(n, r) => {
|
|
854
|
+
this.all.push(r.node), this.visible = pt(t, e);
|
|
855
855
|
}
|
|
856
856
|
), s.subscribe(
|
|
857
857
|
"components:node-removed",
|
|
858
|
-
(
|
|
858
|
+
(n, r) => {
|
|
859
859
|
let o = this.all.indexOf(r.node);
|
|
860
|
-
o > -1 && this.all.splice(o, 1), o = this.visible.indexOf(r.node), o > -1 && this.visible.splice(o, 1), this.visible =
|
|
860
|
+
o > -1 && this.all.splice(o, 1), o = this.visible.indexOf(r.node), o > -1 && this.visible.splice(o, 1), this.visible = pt(t, e);
|
|
861
861
|
}
|
|
862
862
|
), s.subscribe(
|
|
863
863
|
"components:node-switched",
|
|
864
|
-
(
|
|
865
|
-
this.visible =
|
|
864
|
+
(n, r) => {
|
|
865
|
+
this.visible = pt(t, e);
|
|
866
866
|
}
|
|
867
867
|
);
|
|
868
868
|
}
|
|
869
869
|
query(t = {}) {
|
|
870
870
|
const e = [];
|
|
871
|
-
return
|
|
872
|
-
Object.keys(t).every((
|
|
871
|
+
return Et(this.root, this.switches, (s) => {
|
|
872
|
+
Object.keys(t).every((n) => t[n] === s[n]) && e.push(s);
|
|
873
873
|
}), e;
|
|
874
874
|
}
|
|
875
875
|
get(t) {
|
|
@@ -887,85 +887,85 @@ class rs {
|
|
|
887
887
|
return this.handlers.get(t);
|
|
888
888
|
}
|
|
889
889
|
}
|
|
890
|
-
const os = (
|
|
891
|
-
let t =
|
|
890
|
+
const os = (i) => {
|
|
891
|
+
let t = i, e = 0;
|
|
892
892
|
for (; t.parent; )
|
|
893
893
|
e = e + 1, t = t.parent;
|
|
894
894
|
return e;
|
|
895
|
-
}, as = (
|
|
895
|
+
}, as = (i) => i.map(
|
|
896
896
|
([t, e]) => [os(t), t, e]
|
|
897
|
-
).sort(([t], [e]) => t - e).map(([, t, e]) => [t, e]),
|
|
897
|
+
).sort(([t], [e]) => t - e).map(([, t, e]) => [t, e]), Lt = (i) => i instanceof Date ? !1 : i && typeof i == "object" && !Array.isArray(i), x = (i, ...t) => {
|
|
898
898
|
if (!t.length)
|
|
899
|
-
return
|
|
899
|
+
return i;
|
|
900
900
|
const e = t.shift();
|
|
901
|
-
if (
|
|
901
|
+
if (Lt(i) && Lt(e))
|
|
902
902
|
for (const s in e)
|
|
903
|
-
|
|
904
|
-
return
|
|
905
|
-
}, cs = (
|
|
906
|
-
let e = [], s = [],
|
|
903
|
+
Lt(e[s]) ? (i[s] || Object.assign(i, { [s]: {} }), x(i[s], e[s])) : Object.assign(i, { [s]: e[s] });
|
|
904
|
+
return x(i, ...t);
|
|
905
|
+
}, cs = (i, t) => !i || i === "all" ? !0 : i.some((e) => t.indexOf(e) > -1), hs = (i, t) => {
|
|
906
|
+
let e = [], s = [], n;
|
|
907
907
|
const r = () => {
|
|
908
908
|
process.env.NODE_ENV !== "production" && console.time("state-processor.flush");
|
|
909
909
|
const a = /* @__PURE__ */ new Map(), h = as(
|
|
910
|
-
e.map((
|
|
911
|
-
), c = (
|
|
912
|
-
var
|
|
913
|
-
const
|
|
914
|
-
a.set(
|
|
915
|
-
context:
|
|
916
|
-
properties:
|
|
917
|
-
layout:
|
|
918
|
-
}),
|
|
910
|
+
e.map((l, d) => [l, s[d]])
|
|
911
|
+
), c = (l, d) => {
|
|
912
|
+
var p;
|
|
913
|
+
const u = a.get(l) || {}, g = d.context && !u.context, b = d.properties && !u.properties, A = d.layout && !u.layout;
|
|
914
|
+
a.set(l, {
|
|
915
|
+
context: u.context || g,
|
|
916
|
+
properties: u.properties || b,
|
|
917
|
+
layout: u.layout || A
|
|
918
|
+
}), b && (l.attributes.properties = {}), A && (l.attributes.layout = {}), g && (l.attributes.context = x(
|
|
919
919
|
{},
|
|
920
|
-
(
|
|
920
|
+
(p = l.parent) == null ? void 0 : p.attributes.context
|
|
921
921
|
));
|
|
922
922
|
const at = [], St = [], Pt = [];
|
|
923
|
-
if (
|
|
923
|
+
if (l.changesets.forEach((w) => {
|
|
924
924
|
const [$, kt] = w;
|
|
925
|
-
cs(kt.breakpoints,
|
|
925
|
+
cs(kt.breakpoints, i.breakpoints) && (b && (typeof $.properties == "function" ? at.push(
|
|
926
926
|
$.properties
|
|
927
|
-
) :
|
|
927
|
+
) : x(l.attributes.properties, $.properties)), A && (typeof $.layout == "function" ? St.push($.layout) : x(l.attributes.layout, $.layout)), g && (typeof $.context == "function" ? Pt.push(
|
|
928
928
|
$.context
|
|
929
|
-
) :
|
|
929
|
+
) : x(l.attributes.context, $.context)));
|
|
930
930
|
}), at.forEach((w) => {
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
w(
|
|
931
|
+
x(
|
|
932
|
+
l.attributes.properties,
|
|
933
|
+
w(l.attributes.properties)
|
|
934
934
|
);
|
|
935
935
|
}), St.forEach((w) => {
|
|
936
|
-
|
|
936
|
+
x(l.attributes.layout, w(l.attributes.layout));
|
|
937
937
|
}), Pt.forEach((w) => {
|
|
938
|
-
|
|
939
|
-
}), g ||
|
|
940
|
-
const w =
|
|
938
|
+
x(l.attributes.context, w(l.attributes.context));
|
|
939
|
+
}), g || d.recursive) {
|
|
940
|
+
const w = i.getBranch(l), $ = d.recursive ? d : {
|
|
941
941
|
context: !!g
|
|
942
942
|
};
|
|
943
|
-
|
|
943
|
+
l.getChildren(w).forEach((kt) => {
|
|
944
944
|
c(kt, $);
|
|
945
945
|
});
|
|
946
946
|
}
|
|
947
947
|
};
|
|
948
|
-
process.env.NODE_ENV !== "production" && console.timeEnd("state-processor.flush"), h.forEach(([
|
|
949
|
-
c(
|
|
948
|
+
process.env.NODE_ENV !== "production" && console.timeEnd("state-processor.flush"), h.forEach(([l, d]) => {
|
|
949
|
+
c(l, d);
|
|
950
950
|
}), e = [], s = [], t(a);
|
|
951
951
|
}, o = () => {
|
|
952
|
-
clearTimeout(
|
|
952
|
+
clearTimeout(n), n = setTimeout(r, 0);
|
|
953
953
|
};
|
|
954
954
|
return (a, h) => {
|
|
955
955
|
const c = e.indexOf(a);
|
|
956
956
|
if (c > -1) {
|
|
957
|
-
const
|
|
958
|
-
return h.context && (
|
|
957
|
+
const l = s[c];
|
|
958
|
+
return h.context && (l.context = !0), h.properties && (l.properties = !0), h.layout && (l.layout = !0), h.recursive && (l.recursive = !0), o();
|
|
959
959
|
}
|
|
960
960
|
return e.push(a), s.push(h), o();
|
|
961
961
|
};
|
|
962
962
|
};
|
|
963
|
-
class
|
|
963
|
+
class nt {
|
|
964
964
|
constructor(t, e = {}) {
|
|
965
965
|
this.providers = e, this.breakpoints = [], this.actionsState = { handlers: [], watchers: [] }, this.switches = {}, this.changesets = [], this.subscriptions = [], this.customComponentHandler = new rs(), this.events = t.events.createChild(this);
|
|
966
966
|
const s = new Bt(this.events, "root");
|
|
967
|
-
s.name = `root-${t.name}`, this.nodes = new
|
|
968
|
-
const
|
|
967
|
+
s.name = `root-${t.name}`, this.nodes = new ns(s, this.switches, this.events);
|
|
968
|
+
const n = this.processNode = hs(
|
|
969
969
|
this,
|
|
970
970
|
(r) => {
|
|
971
971
|
const o = Array.from(r.keys());
|
|
@@ -991,8 +991,8 @@ class it {
|
|
|
991
991
|
(r, o) => {
|
|
992
992
|
const { node: a } = o;
|
|
993
993
|
this.changesets.forEach((h) => {
|
|
994
|
-
const { changeset: c, target:
|
|
995
|
-
|
|
994
|
+
const { changeset: c, target: l, removes: d } = h, [p, u] = c;
|
|
995
|
+
l.match(o.node) && (p.properties && d.push(a.writeProperties(p.properties, u)), p.context && d.push(a.writeContext(p.context, u)), p.layout && d.push(a.writeLayout(p.layout, u)));
|
|
996
996
|
});
|
|
997
997
|
}
|
|
998
998
|
)
|
|
@@ -1000,42 +1000,42 @@ class it {
|
|
|
1000
1000
|
this.events.subscribe(
|
|
1001
1001
|
"components:node-appended",
|
|
1002
1002
|
(r, o) => {
|
|
1003
|
-
|
|
1003
|
+
n(o.node, { properties: !0, context: !0 });
|
|
1004
1004
|
}
|
|
1005
1005
|
)
|
|
1006
1006
|
), this.subscriptions.push(
|
|
1007
1007
|
this.events.subscribe(
|
|
1008
1008
|
"components:set-properties",
|
|
1009
1009
|
(r, o) => {
|
|
1010
|
-
|
|
1010
|
+
n(o.node, { properties: !0 });
|
|
1011
1011
|
}
|
|
1012
1012
|
)
|
|
1013
1013
|
), this.subscriptions.push(
|
|
1014
1014
|
this.events.subscribe(
|
|
1015
1015
|
"components:set-context",
|
|
1016
1016
|
(r, o) => {
|
|
1017
|
-
|
|
1017
|
+
n(o.node, { properties: !0, context: !0 });
|
|
1018
1018
|
}
|
|
1019
1019
|
)
|
|
1020
1020
|
), this.subscriptions.push(
|
|
1021
1021
|
this.events.subscribe(
|
|
1022
1022
|
"components:set-indent",
|
|
1023
1023
|
(r, o) => {
|
|
1024
|
-
|
|
1024
|
+
n(o.node, { layout: !0 });
|
|
1025
1025
|
}
|
|
1026
1026
|
)
|
|
1027
1027
|
), this.subscriptions.push(
|
|
1028
1028
|
this.events.subscribe(
|
|
1029
1029
|
"components:set-layout",
|
|
1030
1030
|
(r, o) => {
|
|
1031
|
-
|
|
1031
|
+
n(o.node, { layout: !0 });
|
|
1032
1032
|
}
|
|
1033
1033
|
)
|
|
1034
1034
|
), this.subscriptions.push(
|
|
1035
1035
|
this.events.subscribe(
|
|
1036
1036
|
"components:node-switched",
|
|
1037
1037
|
(r, { node: o, branch: a }) => {
|
|
1038
|
-
|
|
1038
|
+
n(o, {
|
|
1039
1039
|
layout: !0,
|
|
1040
1040
|
recursive: !0,
|
|
1041
1041
|
properties: !0,
|
|
@@ -1047,7 +1047,7 @@ class it {
|
|
|
1047
1047
|
this.events.subscribe(
|
|
1048
1048
|
"components:node-removed",
|
|
1049
1049
|
(r, { parentNode: o }) => {
|
|
1050
|
-
|
|
1050
|
+
n(o, { properties: !0 });
|
|
1051
1051
|
}
|
|
1052
1052
|
)
|
|
1053
1053
|
), this.events.parent && this.events.parent.dispatch("components:platform-created", {
|
|
@@ -1098,29 +1098,29 @@ class it {
|
|
|
1098
1098
|
const {
|
|
1099
1099
|
provider: e,
|
|
1100
1100
|
target: s,
|
|
1101
|
-
attributes:
|
|
1101
|
+
attributes: n,
|
|
1102
1102
|
options: r = {},
|
|
1103
1103
|
removable: o
|
|
1104
|
-
} = t, a = t.key ||
|
|
1104
|
+
} = t, a = t.key || it(), h = { changeset: [n, r], target: s, removes: [] };
|
|
1105
1105
|
if (e) {
|
|
1106
1106
|
const c = this.providers[e];
|
|
1107
|
-
c.write(a, s,
|
|
1107
|
+
c.write(a, s, n, r), h.removes.push(() => {
|
|
1108
1108
|
c.remove(a);
|
|
1109
1109
|
});
|
|
1110
1110
|
}
|
|
1111
1111
|
return this.changesets.push(h), this.nodes.all.forEach((c) => {
|
|
1112
1112
|
if (s.match(c)) {
|
|
1113
|
-
let
|
|
1113
|
+
let l = () => {
|
|
1114
1114
|
};
|
|
1115
|
-
|
|
1116
|
-
|
|
1115
|
+
n.properties && (l = c.writeProperties(
|
|
1116
|
+
n.properties,
|
|
1117
1117
|
r,
|
|
1118
1118
|
o
|
|
1119
|
-
)),
|
|
1119
|
+
)), n.context && (l = c.writeContext(n.context, r, o)), n.layout && (l = c.writeContext(n.layout, r, o)), h.removes.push(l);
|
|
1120
1120
|
}
|
|
1121
1121
|
}), () => {
|
|
1122
1122
|
if (o) {
|
|
1123
|
-
h.removes.forEach((
|
|
1123
|
+
h.removes.forEach((l) => l());
|
|
1124
1124
|
const c = this.changesets.indexOf(h);
|
|
1125
1125
|
c > -1 && this.changesets.splice(c, 1);
|
|
1126
1126
|
}
|
|
@@ -1136,91 +1136,91 @@ class it {
|
|
|
1136
1136
|
this.subscriptions.forEach((t) => t());
|
|
1137
1137
|
}
|
|
1138
1138
|
}
|
|
1139
|
-
const
|
|
1140
|
-
if (Array.isArray(
|
|
1141
|
-
const [t, ...e] =
|
|
1139
|
+
const ls = (i) => {
|
|
1140
|
+
if (Array.isArray(i)) {
|
|
1141
|
+
const [t, ...e] = i;
|
|
1142
1142
|
return {
|
|
1143
1143
|
definitionId: t,
|
|
1144
1144
|
overrides: e
|
|
1145
1145
|
};
|
|
1146
1146
|
}
|
|
1147
1147
|
return {
|
|
1148
|
-
definitionId:
|
|
1148
|
+
definitionId: i,
|
|
1149
1149
|
overrides: []
|
|
1150
1150
|
};
|
|
1151
|
-
}, yt = (
|
|
1151
|
+
}, yt = (i, t, e, s, n, r) => {
|
|
1152
1152
|
e.forEach((o) => {
|
|
1153
|
-
const a =
|
|
1153
|
+
const a = ls(o), h = s[a.definitionId];
|
|
1154
1154
|
if (a.definitionId === "view") {
|
|
1155
|
-
const c =
|
|
1156
|
-
c.name = "view", Object.keys(
|
|
1157
|
-
const
|
|
1155
|
+
const c = i.createNode("view");
|
|
1156
|
+
c.name = "view", Object.keys(n).forEach((l) => {
|
|
1157
|
+
const d = n[l];
|
|
1158
1158
|
yt(
|
|
1159
|
-
|
|
1159
|
+
i,
|
|
1160
1160
|
c,
|
|
1161
|
-
[
|
|
1161
|
+
[d.entry],
|
|
1162
1162
|
s,
|
|
1163
|
-
|
|
1164
|
-
|
|
1163
|
+
n,
|
|
1164
|
+
l
|
|
1165
1165
|
);
|
|
1166
|
-
}), t.appendChild(c), a.overrides.forEach((
|
|
1167
|
-
|
|
1168
|
-
breakpoints:
|
|
1169
|
-
}),
|
|
1170
|
-
breakpoints:
|
|
1171
|
-
}),
|
|
1172
|
-
breakpoints:
|
|
1166
|
+
}), t.appendChild(c), a.overrides.forEach((l) => {
|
|
1167
|
+
l.properties && c.writeProperties(l.properties, {
|
|
1168
|
+
breakpoints: l.breakpoints
|
|
1169
|
+
}), l.context && c.writeContext(l.context, {
|
|
1170
|
+
breakpoints: l.breakpoints
|
|
1171
|
+
}), l.layout && c.writeLayout(l.layout, {
|
|
1172
|
+
breakpoints: l.breakpoints
|
|
1173
1173
|
});
|
|
1174
1174
|
});
|
|
1175
|
-
} else if (
|
|
1176
|
-
const c =
|
|
1175
|
+
} else if (i.getComponentHandler(h.type)) {
|
|
1176
|
+
const c = i.getComponentHandler(h.type);
|
|
1177
1177
|
c && c(a, {
|
|
1178
|
-
platform:
|
|
1178
|
+
platform: i,
|
|
1179
1179
|
node: t,
|
|
1180
1180
|
references: e,
|
|
1181
1181
|
definitions: s,
|
|
1182
|
-
views:
|
|
1182
|
+
views: n,
|
|
1183
1183
|
branch: r
|
|
1184
1184
|
});
|
|
1185
1185
|
} else {
|
|
1186
1186
|
const c = s[a.definitionId];
|
|
1187
1187
|
if (process.env.NODE_ENV !== "production" && !c) {
|
|
1188
|
-
|
|
1188
|
+
v.error(
|
|
1189
1189
|
`No definition found for component type '${a.definitionId}'.`
|
|
1190
1190
|
);
|
|
1191
1191
|
return;
|
|
1192
1192
|
}
|
|
1193
|
-
const
|
|
1194
|
-
|
|
1195
|
-
const
|
|
1196
|
-
|
|
1193
|
+
const l = i.createNode(c.type);
|
|
1194
|
+
l.name = a.definitionId, l.tags = c.tags || [], c.properties && l.writeProperties(c.properties), c.context && l.writeContext(c.context), c.layout && l.writeLayout(c.layout), t.appendChild(l, r), a.overrides.forEach((d) => {
|
|
1195
|
+
const p = { breakpoints: d.breakpoints };
|
|
1196
|
+
d.properties && l.writeProperties(d.properties, p), d.context && l.writeContext(d.context, p), d.layout && l.writeLayout(d.layout, p);
|
|
1197
1197
|
}), c.children && yt(
|
|
1198
|
-
|
|
1199
|
-
|
|
1198
|
+
i,
|
|
1199
|
+
l,
|
|
1200
1200
|
c.children,
|
|
1201
1201
|
s,
|
|
1202
|
-
|
|
1202
|
+
n
|
|
1203
1203
|
);
|
|
1204
1204
|
}
|
|
1205
1205
|
});
|
|
1206
|
-
}, Pe = (
|
|
1207
|
-
const { entry: e, components: s, breakpoints:
|
|
1208
|
-
return Object.keys(
|
|
1209
|
-
const h =
|
|
1210
|
-
c.matches &&
|
|
1211
|
-
const
|
|
1212
|
-
|
|
1206
|
+
}, Pe = (i, t) => {
|
|
1207
|
+
const { entry: e, components: s, breakpoints: n, views: r } = t, o = [];
|
|
1208
|
+
return Object.keys(n).forEach((a) => {
|
|
1209
|
+
const h = n[a], c = window.matchMedia(h);
|
|
1210
|
+
c.matches && i.breakpoints.push(a);
|
|
1211
|
+
const l = (d) => {
|
|
1212
|
+
d.matches ? i.addBreakpoint(a) : i.removeBreakpoint(a);
|
|
1213
1213
|
};
|
|
1214
|
-
c.addListener(
|
|
1215
|
-
}), yt(
|
|
1214
|
+
c.addListener(l), o.push(() => c.removeListener(l));
|
|
1215
|
+
}), yt(i, i.nodes.root, [e], s, r), () => o.forEach((a) => {
|
|
1216
1216
|
a();
|
|
1217
1217
|
});
|
|
1218
|
-
}, Wt = (
|
|
1219
|
-
id:
|
|
1220
|
-
type:
|
|
1221
|
-
name:
|
|
1218
|
+
}, Wt = (i, t) => ({
|
|
1219
|
+
id: i.id,
|
|
1220
|
+
type: i.type,
|
|
1221
|
+
name: i.name,
|
|
1222
1222
|
branch: t || "default"
|
|
1223
|
-
}), ke = (
|
|
1223
|
+
}), ke = (i, t, e, s = it(), n = {}) => i.getAsync("components").then((r) => {
|
|
1224
1224
|
let o;
|
|
1225
1225
|
if (typeof t == "string") {
|
|
1226
1226
|
const c = new W(r);
|
|
@@ -1228,32 +1228,32 @@ const ds = (n) => {
|
|
|
1228
1228
|
} else
|
|
1229
1229
|
o = t;
|
|
1230
1230
|
const a = {}, h = (c) => {
|
|
1231
|
-
const
|
|
1232
|
-
return
|
|
1231
|
+
const l = a[c.id];
|
|
1232
|
+
return l ? Promise.resolve(l.controller) : nt.getInstance(i).then((d) => new Ft(d, c, s));
|
|
1233
1233
|
};
|
|
1234
1234
|
r.events.subscribe(
|
|
1235
1235
|
"components:node-enter",
|
|
1236
|
-
(c, { node:
|
|
1237
|
-
o.match(
|
|
1238
|
-
Promise.resolve(e(
|
|
1239
|
-
a[
|
|
1240
|
-
dispose:
|
|
1241
|
-
controller:
|
|
1236
|
+
(c, { node: l }) => {
|
|
1237
|
+
o.match(l) && h(l).then((d) => {
|
|
1238
|
+
Promise.resolve(e(d)).then((p) => {
|
|
1239
|
+
a[l.id] = {
|
|
1240
|
+
dispose: p,
|
|
1241
|
+
controller: d
|
|
1242
1242
|
};
|
|
1243
1243
|
});
|
|
1244
1244
|
});
|
|
1245
1245
|
}
|
|
1246
1246
|
), r.events.subscribe(
|
|
1247
1247
|
"components:node-exit",
|
|
1248
|
-
(c, { node:
|
|
1249
|
-
const
|
|
1250
|
-
|
|
1248
|
+
(c, { node: l }) => {
|
|
1249
|
+
const d = a[l.id];
|
|
1250
|
+
d && (d.dispose && d.dispose(), n.reuseController || (d.controller.dispose(), delete a[l.id]));
|
|
1251
1251
|
}
|
|
1252
1252
|
);
|
|
1253
1253
|
});
|
|
1254
|
-
class
|
|
1254
|
+
class ds {
|
|
1255
1255
|
constructor(t) {
|
|
1256
|
-
this.aliases = /* @__PURE__ */ new Map(), this.components = /* @__PURE__ */ new Map(), this.logger = new
|
|
1256
|
+
this.aliases = /* @__PURE__ */ new Map(), this.components = /* @__PURE__ */ new Map(), this.logger = new v();
|
|
1257
1257
|
const { events: e } = t.get("$widget");
|
|
1258
1258
|
this.events = e;
|
|
1259
1259
|
}
|
|
@@ -1272,8 +1272,8 @@ class ls {
|
|
|
1272
1272
|
registerResolver(t, e) {
|
|
1273
1273
|
return this.events.subscribe(
|
|
1274
1274
|
"component-resolver:resolve",
|
|
1275
|
-
(s,
|
|
1276
|
-
if (
|
|
1275
|
+
(s, n) => {
|
|
1276
|
+
if (n === t) {
|
|
1277
1277
|
const r = this.getComponent(t);
|
|
1278
1278
|
e(r);
|
|
1279
1279
|
}
|
|
@@ -1286,16 +1286,16 @@ class ls {
|
|
|
1286
1286
|
};
|
|
1287
1287
|
}
|
|
1288
1288
|
}
|
|
1289
|
-
var _ = /* @__PURE__ */ ((
|
|
1289
|
+
var _ = /* @__PURE__ */ ((i) => (i.open = "open", i.closed = "closed", i.hidden = "hidden", i))(_ || {});
|
|
1290
1290
|
const Kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1291
1291
|
__proto__: null,
|
|
1292
1292
|
ActionResolver: es,
|
|
1293
1293
|
ActionsController: At,
|
|
1294
1294
|
ComponentNode: Bt,
|
|
1295
1295
|
ComponentNodeController: Ft,
|
|
1296
|
-
ComponentPlatform:
|
|
1296
|
+
ComponentPlatform: nt,
|
|
1297
1297
|
ComponentQuery: W,
|
|
1298
|
-
ComponentResolver:
|
|
1298
|
+
ComponentResolver: ds,
|
|
1299
1299
|
WidgetRenderState: _,
|
|
1300
1300
|
asDescriptor: Wt,
|
|
1301
1301
|
createChildren: yt,
|
|
@@ -1303,18 +1303,18 @@ const Kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1303
1303
|
createEventSubscriber: Ce,
|
|
1304
1304
|
extendComponent: ke,
|
|
1305
1305
|
findComponent: Se,
|
|
1306
|
-
findVisibleComponents:
|
|
1307
|
-
traverseComponents:
|
|
1306
|
+
findVisibleComponents: pt,
|
|
1307
|
+
traverseComponents: Et
|
|
1308
1308
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1309
|
-
var
|
|
1310
|
-
const S = (
|
|
1309
|
+
var f = /* @__PURE__ */ ((i) => (i.Cookie = "cookie", i.Local = "local", i.Session = "session", i))(f || {}), q = /* @__PURE__ */ ((i) => (i.Tenant = "tenant", i.Implementation = "implementation", i.Widget = "widget", i))(q || {}), m = /* @__PURE__ */ ((i) => (i.Necessary = "necessary", i.Functional = "functional", i.Analytical = "analytical", i.Marketing = "marketing", i))(m || {});
|
|
1310
|
+
const S = (i, t, e, s = {}) => ce(i, e).then((n) => (process.env.NODE_ENV !== "production" && n && v.warn(
|
|
1311
1311
|
`createStorageWriter: Attempted to create storage writer using unallowed category.
|
|
1312
1312
|
Key: ${t}
|
|
1313
1313
|
Category: ${JSON.stringify(e)}
|
|
1314
1314
|
Options: ${JSON.stringify(s)}`
|
|
1315
|
-
), (r) => (Zt(
|
|
1315
|
+
), (r) => (Zt(i), ce(i, e).then((o) => {
|
|
1316
1316
|
if (o) {
|
|
1317
|
-
process.env.NODE_ENV !== "production" &&
|
|
1317
|
+
process.env.NODE_ENV !== "production" && v.warn(
|
|
1318
1318
|
`storageWriter: Attempted to write to storage using unallowed category.
|
|
1319
1319
|
Key: ${t}
|
|
1320
1320
|
Category: ${JSON.stringify(e)}
|
|
@@ -1325,131 +1325,131 @@ const S = (n, t, e, s = {}) => ce(n, e).then((i) => (process.env.NODE_ENV !== "p
|
|
|
1325
1325
|
}
|
|
1326
1326
|
const {
|
|
1327
1327
|
scope: a = q.Widget,
|
|
1328
|
-
medium: h =
|
|
1328
|
+
medium: h = f.Session,
|
|
1329
1329
|
duration: c
|
|
1330
|
-
} = s,
|
|
1331
|
-
return
|
|
1332
|
-
})))), C = (
|
|
1330
|
+
} = s, l = us();
|
|
1331
|
+
return l[a][t] = Yt(r, e, c), h === f.Cookie ? ys(i, l) : bs(i, h, l);
|
|
1332
|
+
})))), C = (i, t, e = f.Session) => (Zt(i), typeof t > "u" ? (process.env.NODE_ENV !== "production" && v.warn(
|
|
1333
1333
|
"readStorage: Undefined key passed when reading storage. ",
|
|
1334
1334
|
t,
|
|
1335
1335
|
e
|
|
1336
|
-
), Promise.resolve(void 0)) : e ===
|
|
1337
|
-
(s) =>
|
|
1338
|
-
)), z = (
|
|
1339
|
-
typeof e > "u" && delete
|
|
1340
|
-
}), Ne = (
|
|
1336
|
+
), Promise.resolve(void 0)) : e === f.Cookie ? fs(i).then((s) => bt(s, t)) : vs(i, e).then(
|
|
1337
|
+
(s) => bt(s, t)
|
|
1338
|
+
)), z = (i) => !!Object.entries(i).filter(([t, e]) => typeof e < "u").length, Dt = (i) => Object.entries(i).filter(([t, e]) => typeof e < "u").forEach(([t, { value: e }]) => {
|
|
1339
|
+
typeof e > "u" && delete i[t];
|
|
1340
|
+
}), Ne = (i, t) => {
|
|
1341
1341
|
const e = {
|
|
1342
|
-
tenant: { ...
|
|
1343
|
-
implementation: { ...
|
|
1344
|
-
widget: { ...
|
|
1342
|
+
tenant: { ...i.tenant, ...t.tenant },
|
|
1343
|
+
implementation: { ...i.implementation, ...t.implementation },
|
|
1344
|
+
widget: { ...i.widget, ...t.widget }
|
|
1345
1345
|
};
|
|
1346
|
-
return
|
|
1347
|
-
},
|
|
1346
|
+
return Dt(e.tenant), Dt(e.implementation), Dt(e.widget), e;
|
|
1347
|
+
}, ps = (i) => Object.entries(i).reduce(
|
|
1348
1348
|
(t, e) => {
|
|
1349
|
-
const [s,
|
|
1350
|
-
return Object.entries(
|
|
1349
|
+
const [s, n] = e;
|
|
1350
|
+
return Object.entries(n).forEach((r) => {
|
|
1351
1351
|
const [o, { expiration: a }] = r;
|
|
1352
1352
|
a && t.push(a);
|
|
1353
1353
|
}), t;
|
|
1354
1354
|
},
|
|
1355
1355
|
[]
|
|
1356
|
-
).slice().sort((t, e) => new Date(e).valueOf() - new Date(t).valueOf()).shift() || Ct(),
|
|
1356
|
+
).slice().sort((t, e) => new Date(e).valueOf() - new Date(t).valueOf()).shift() || Ct(), xt = (i) => {
|
|
1357
1357
|
const {
|
|
1358
1358
|
name: t,
|
|
1359
1359
|
implementation: { name: e, tenant: s }
|
|
1360
|
-
} =
|
|
1360
|
+
} = i.get("$widget");
|
|
1361
1361
|
return [
|
|
1362
1362
|
`humany_${s}`,
|
|
1363
1363
|
`humany_${ae(s + e)}`,
|
|
1364
1364
|
`humany_${ae(s + e + t)}`
|
|
1365
1365
|
];
|
|
1366
|
-
}, It = (
|
|
1367
|
-
const t = new RegExp(`(?:^|;)\\s?${
|
|
1366
|
+
}, It = (i) => {
|
|
1367
|
+
const t = new RegExp(`(?:^|;)\\s?${i}=(.*?)(?:;|$)`, "i"), e = document.cookie.match(t);
|
|
1368
1368
|
return e && e[1] && JSON.parse(e[1]) || void 0;
|
|
1369
|
-
}, Rt = (
|
|
1370
|
-
const s = `${
|
|
1371
|
-
return document.cookie = `${s}; ${
|
|
1372
|
-
}, Gt = (
|
|
1373
|
-
const [t, e, s] =
|
|
1369
|
+
}, Rt = (i, t, e) => {
|
|
1370
|
+
const s = `${i}=${JSON.stringify(t).trim()}`, n = `expires=${new Date(e).toUTCString()}`, r = "path=/", o = "SameSite=None;Secure";
|
|
1371
|
+
return document.cookie = `${s}; ${n}; ${r}; ${o}`;
|
|
1372
|
+
}, Gt = (i) => {
|
|
1373
|
+
const [t, e, s] = xt(i), n = It(t) || {}, r = It(e) || {}, o = It(s) || {};
|
|
1374
1374
|
return {
|
|
1375
|
-
tenant:
|
|
1375
|
+
tenant: n,
|
|
1376
1376
|
implementation: r,
|
|
1377
1377
|
widget: o
|
|
1378
1378
|
};
|
|
1379
|
-
}, Me = (
|
|
1380
|
-
const e = Gt(
|
|
1379
|
+
}, Me = (i, t) => {
|
|
1380
|
+
const e = Gt(i), s = Ne(e, t), [n, r, o] = xt(i), { tenant: a, implementation: h, widget: c } = s, l = ps(t), d = Ct({ days: -1 });
|
|
1381
1381
|
Rt(
|
|
1382
|
-
|
|
1382
|
+
n,
|
|
1383
1383
|
a,
|
|
1384
|
-
z(a) ?
|
|
1384
|
+
z(a) ? l : d
|
|
1385
1385
|
), Rt(
|
|
1386
1386
|
r,
|
|
1387
1387
|
h,
|
|
1388
|
-
z(h) ?
|
|
1388
|
+
z(h) ? l : d
|
|
1389
1389
|
), Rt(
|
|
1390
1390
|
o,
|
|
1391
1391
|
c,
|
|
1392
|
-
z(c) ?
|
|
1392
|
+
z(c) ? l : d
|
|
1393
1393
|
);
|
|
1394
|
-
},
|
|
1395
|
-
const [e, s,
|
|
1394
|
+
}, vt = (i, t) => {
|
|
1395
|
+
const [e, s, n] = xt(i), r = t.getItem(e) || "{}", o = t.getItem(s) || "{}", a = t.getItem(n) || "{}";
|
|
1396
1396
|
return {
|
|
1397
1397
|
tenant: JSON.parse(r),
|
|
1398
1398
|
implementation: JSON.parse(o),
|
|
1399
1399
|
widget: JSON.parse(a)
|
|
1400
1400
|
};
|
|
1401
|
-
}, qt = (
|
|
1402
|
-
const s =
|
|
1401
|
+
}, qt = (i, t, e) => {
|
|
1402
|
+
const s = vt(i, t), n = Ne(s, e), [r, o, a] = xt(i), { tenant: h, implementation: c, widget: l } = n;
|
|
1403
1403
|
z(h) ? t.setItem(r, JSON.stringify(h)) : t.removeItem(r), z(c) ? t.setItem(
|
|
1404
1404
|
o,
|
|
1405
1405
|
JSON.stringify(c)
|
|
1406
|
-
) : t.removeItem(o), z(
|
|
1407
|
-
const { events:
|
|
1408
|
-
|
|
1409
|
-
},
|
|
1406
|
+
) : t.removeItem(o), z(l) ? t.setItem(a, JSON.stringify(l)) : t.removeItem(a);
|
|
1407
|
+
const { events: d } = i.get("$widget");
|
|
1408
|
+
d.dispatch("storage:changed", {});
|
|
1409
|
+
}, us = () => ({
|
|
1410
1410
|
tenant: {},
|
|
1411
1411
|
implementation: {},
|
|
1412
1412
|
widget: {}
|
|
1413
|
-
}), gs = (
|
|
1414
|
-
const e =
|
|
1413
|
+
}), gs = (i) => i ? !!i && /* @__PURE__ */ new Date() > new Date(i) : !1, bt = (i, t) => {
|
|
1414
|
+
const e = i.widget[t] || i.implementation[t] || i.tenant[t];
|
|
1415
1415
|
return e == null ? void 0 : e.value;
|
|
1416
|
-
}, Yt = (
|
|
1417
|
-
value:
|
|
1416
|
+
}, Yt = (i, t, e) => e ? {
|
|
1417
|
+
value: i,
|
|
1418
1418
|
category: t,
|
|
1419
1419
|
expiration: typeof e == "object" ? Ct(e) : e
|
|
1420
1420
|
} : {
|
|
1421
|
-
value:
|
|
1421
|
+
value: i,
|
|
1422
1422
|
category: t
|
|
1423
|
-
},
|
|
1424
|
-
const e =
|
|
1425
|
-
return Object.entries(e).forEach(([s,
|
|
1426
|
-
Object.entries(
|
|
1423
|
+
}, ut = (i, t) => {
|
|
1424
|
+
const e = xe(i);
|
|
1425
|
+
return Object.entries(e).forEach(([s, n]) => {
|
|
1426
|
+
Object.entries(n).forEach(([r, o]) => {
|
|
1427
1427
|
const { expiration: a, category: h } = o;
|
|
1428
|
-
(gs(a) ||
|
|
1428
|
+
(gs(a) || ms(t, h)) && (n[r] = Yt(void 0, h, a));
|
|
1429
1429
|
});
|
|
1430
1430
|
}), e;
|
|
1431
|
-
}, ce = (
|
|
1432
|
-
|
|
1431
|
+
}, ce = (i, t) => C(
|
|
1432
|
+
i,
|
|
1433
1433
|
"storagePolicy",
|
|
1434
|
-
|
|
1434
|
+
f.Cookie
|
|
1435
1435
|
).then(
|
|
1436
|
-
(e = [
|
|
1437
|
-
),
|
|
1438
|
-
const t = Gt(
|
|
1436
|
+
(e = [m.Necessary]) => !!t && e.indexOf(t) === -1
|
|
1437
|
+
), ms = (i = [m.Necessary], t) => !!t && i.indexOf(t) === -1, Zt = (i) => {
|
|
1438
|
+
const t = Gt(i), e = vt(i, window.localStorage), s = vt(i, sessionStorage), n = bt(t, "storagePolicy"), [r, o, a] = [
|
|
1439
1439
|
t,
|
|
1440
1440
|
e,
|
|
1441
1441
|
s
|
|
1442
|
-
].map((h) =>
|
|
1443
|
-
Me(
|
|
1444
|
-
}, Ct = (
|
|
1445
|
-
const { days: t = 0, hours: e = 0, minutes: s = 0, seconds:
|
|
1446
|
-
return r.setTime(r.getTime() + e * 60 * 60 * 1e3), r.setTime(r.getTime() + t * 24 * 60 * 60 * 1e3), r.setTime(r.getTime() + s * 60 * 1e3), r.setTime(r.getTime() +
|
|
1447
|
-
},
|
|
1448
|
-
const e = t ===
|
|
1449
|
-
return
|
|
1450
|
-
},
|
|
1451
|
-
const s = t ===
|
|
1452
|
-
return
|
|
1442
|
+
].map((h) => ut(h, n));
|
|
1443
|
+
Me(i, r), qt(i, window.localStorage, o), qt(i, window.sessionStorage, a);
|
|
1444
|
+
}, Ct = (i = { days: 30 }) => {
|
|
1445
|
+
const { days: t = 0, hours: e = 0, minutes: s = 0, seconds: n = 0 } = i, r = /* @__PURE__ */ new Date();
|
|
1446
|
+
return r.setTime(r.getTime() + e * 60 * 60 * 1e3), r.setTime(r.getTime() + t * 24 * 60 * 60 * 1e3), r.setTime(r.getTime() + s * 60 * 1e3), r.setTime(r.getTime() + n * 1e3), r.toISOString();
|
|
1447
|
+
}, fs = (i) => E(document)(() => Gt(i)), ys = (i, t) => E(document)(() => Me(i, t)), vs = (i, t) => {
|
|
1448
|
+
const e = t === f.Local ? window.localStorage : window.sessionStorage;
|
|
1449
|
+
return E(e)(() => vt(i, e));
|
|
1450
|
+
}, bs = (i, t, e) => {
|
|
1451
|
+
const s = t === f.Local ? window.localStorage : window.sessionStorage;
|
|
1452
|
+
return E(s)(() => qt(i, s, e));
|
|
1453
1453
|
};
|
|
1454
1454
|
let gt = class {
|
|
1455
1455
|
constructor() {
|
|
@@ -1460,43 +1460,43 @@ let gt = class {
|
|
|
1460
1460
|
};
|
|
1461
1461
|
}
|
|
1462
1462
|
async setItem(t, e, s = {}) {
|
|
1463
|
-
return
|
|
1464
|
-
const
|
|
1465
|
-
|
|
1463
|
+
return E(this)(() => {
|
|
1464
|
+
const n = ut(this.memory, [
|
|
1465
|
+
m.Necessary
|
|
1466
1466
|
]), { scope: r = q.Tenant, expiration: o } = s;
|
|
1467
|
-
|
|
1467
|
+
n[r][t] = Yt(
|
|
1468
1468
|
e,
|
|
1469
|
-
|
|
1469
|
+
m.Necessary,
|
|
1470
1470
|
(o == null ? void 0 : o.toISOString()) || Ct()
|
|
1471
|
-
), this.memory =
|
|
1471
|
+
), this.memory = n, process.env.NODE_ENV !== "production" && v.warn(
|
|
1472
1472
|
`StorageProvider: StorageProvider is deprecated, use createStorageWriter and readStorage instead, value stored temporarily in memory.
|
|
1473
1473
|
Key: ${t}
|
|
1474
1474
|
Value: ${JSON.stringify(e)}
|
|
1475
1475
|
Options: ${JSON.stringify(s)}
|
|
1476
|
-
Memory: ${JSON.stringify(
|
|
1476
|
+
Memory: ${JSON.stringify(n)}`
|
|
1477
1477
|
);
|
|
1478
1478
|
});
|
|
1479
1479
|
}
|
|
1480
1480
|
async getItem(t) {
|
|
1481
|
-
return
|
|
1482
|
-
const e =
|
|
1483
|
-
|
|
1481
|
+
return E(this)(() => {
|
|
1482
|
+
const e = ut(this.memory, [
|
|
1483
|
+
m.Necessary
|
|
1484
1484
|
]);
|
|
1485
|
-
process.env.NODE_ENV !== "production" &&
|
|
1485
|
+
process.env.NODE_ENV !== "production" && v.warn(
|
|
1486
1486
|
`StorageProvider: StorageProvider is deprecated, use createStorageWriter and readStorage instead, value fetched from legacy memory storage.
|
|
1487
1487
|
Key: ${t}
|
|
1488
1488
|
Memory: ${JSON.stringify(e)}`
|
|
1489
1489
|
);
|
|
1490
|
-
const s =
|
|
1490
|
+
const s = bt(e, t);
|
|
1491
1491
|
return this.memory = e, s;
|
|
1492
1492
|
});
|
|
1493
1493
|
}
|
|
1494
1494
|
async removeItem(t) {
|
|
1495
|
-
return
|
|
1496
|
-
const e =
|
|
1497
|
-
|
|
1495
|
+
return E(this)(() => {
|
|
1496
|
+
const e = ut(this.memory, [
|
|
1497
|
+
m.Necessary
|
|
1498
1498
|
]);
|
|
1499
|
-
delete e.tenant[t], delete e.implementation[t], delete e.widget[t], this.memory = e, process.env.NODE_ENV !== "production" &&
|
|
1499
|
+
delete e.tenant[t], delete e.implementation[t], delete e.widget[t], this.memory = e, process.env.NODE_ENV !== "production" && v.warn(
|
|
1500
1500
|
`StorageProvider: StorageProvider is deprecated, use createStorageWriter and readStorage instead, value removed from memory.
|
|
1501
1501
|
Key: ${t}
|
|
1502
1502
|
Memory: ${JSON.stringify(e)}`
|
|
@@ -1511,14 +1511,14 @@ let gt = class {
|
|
|
1511
1511
|
this.cookies = new gt(), this.session = new gt(), this.local = new gt();
|
|
1512
1512
|
}
|
|
1513
1513
|
};
|
|
1514
|
-
Jt((
|
|
1515
|
-
|
|
1514
|
+
Jt((i) => {
|
|
1515
|
+
i.createCommand(
|
|
1516
1516
|
"storage",
|
|
1517
1517
|
(t) => (e = {}) => {
|
|
1518
1518
|
const { consent: s } = e;
|
|
1519
1519
|
if (typeof s < "u") {
|
|
1520
1520
|
if (typeof s != "number" && typeof s != "string" && !Array.isArray(s)) {
|
|
1521
|
-
process.env.NODE_ENV !== "production" &&
|
|
1521
|
+
process.env.NODE_ENV !== "production" && v.warn(
|
|
1522
1522
|
`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
|
|
1523
1523
|
Passed consent: ${JSON.stringify(s)}`
|
|
1524
1524
|
);
|
|
@@ -1527,32 +1527,32 @@ Jt((n) => {
|
|
|
1527
1527
|
if (Array.isArray(s) && !s.every(
|
|
1528
1528
|
(r) => typeof r == "number" || typeof r == "string"
|
|
1529
1529
|
)) {
|
|
1530
|
-
process.env.NODE_ENV !== "production" &&
|
|
1530
|
+
process.env.NODE_ENV !== "production" && v.warn(
|
|
1531
1531
|
`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
|
|
1532
1532
|
Passed consent: ${JSON.stringify(s)}`
|
|
1533
1533
|
);
|
|
1534
1534
|
return;
|
|
1535
1535
|
}
|
|
1536
|
-
const
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1536
|
+
const n = [
|
|
1537
|
+
m.Necessary,
|
|
1538
|
+
m.Functional,
|
|
1539
|
+
m.Analytical,
|
|
1540
|
+
m.Marketing
|
|
1541
1541
|
].filter((r, o, a) => typeof s == "number" ? s > o : typeof s == "string" ? a.indexOf(s) + 1 > o : Array.isArray(s) ? s.findIndex((h) => h === o + 1 || h === r) > -1 : !0);
|
|
1542
|
-
return
|
|
1543
|
-
`storagePolicyConfigurationApi: passed consent does not include category: '${
|
|
1542
|
+
return n.indexOf(m.Necessary) === -1 && (process.env.NODE_ENV !== "production" && v.warn(
|
|
1543
|
+
`storagePolicyConfigurationApi: passed consent does not include category: '${m.Necessary}'. Consent has to atleast include the '${m.Necessary}' category.
|
|
1544
1544
|
Passed consent: ${JSON.stringify(s)}`
|
|
1545
|
-
),
|
|
1545
|
+
), n.unshift(m.Necessary)), S(
|
|
1546
1546
|
t.container,
|
|
1547
1547
|
"storagePolicy",
|
|
1548
|
-
|
|
1548
|
+
m.Necessary,
|
|
1549
1549
|
{
|
|
1550
|
-
medium:
|
|
1550
|
+
medium: f.Cookie,
|
|
1551
1551
|
scope: q.Tenant,
|
|
1552
1552
|
duration: { days: 365 }
|
|
1553
1553
|
}
|
|
1554
|
-
).then((r) => r(
|
|
1555
|
-
Zt(t.container), t.events.dispatch("storage:policy-changed",
|
|
1554
|
+
).then((r) => r(n)).then(() => {
|
|
1555
|
+
Zt(t.container), t.events.dispatch("storage:policy-changed", n);
|
|
1556
1556
|
});
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
@@ -1560,47 +1560,47 @@ Jt((n) => {
|
|
|
1560
1560
|
});
|
|
1561
1561
|
const $s = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1562
1562
|
__proto__: null,
|
|
1563
|
-
StorageCategory:
|
|
1564
|
-
StorageMedium:
|
|
1563
|
+
StorageCategory: m,
|
|
1564
|
+
StorageMedium: f,
|
|
1565
1565
|
StorageProvider: ws,
|
|
1566
1566
|
StorageScope: q,
|
|
1567
1567
|
StorageService: gt,
|
|
1568
1568
|
createStorageWriter: S,
|
|
1569
1569
|
readStorage: C
|
|
1570
|
-
}, Symbol.toStringTag, { value: "Module" })), _s = (
|
|
1571
|
-
const t = (
|
|
1572
|
-
|
|
1573
|
-
}, e = (
|
|
1574
|
-
|
|
1575
|
-
}, s = (
|
|
1576
|
-
document.activeElement && document.activeElement.classList.contains("ace-widget-trigger") && document.activeElement.classList.contains("ace-tabbing") || t(
|
|
1570
|
+
}, Symbol.toStringTag, { value: "Module" })), _s = (i) => {
|
|
1571
|
+
const t = (n, r) => {
|
|
1572
|
+
n && (r ? n.classList.add("ace-tabbing") : n.classList.remove("ace-tabbing"));
|
|
1573
|
+
}, e = (n) => {
|
|
1574
|
+
n.key === "Tab" ? t(i, !0) : n.key === "Enter" && document.activeElement && document.activeElement.classList.contains("ace-widget-trigger") || t(i, !1);
|
|
1575
|
+
}, s = (n) => {
|
|
1576
|
+
document.activeElement && document.activeElement.classList.contains("ace-widget-trigger") && document.activeElement.classList.contains("ace-tabbing") || t(i, !1);
|
|
1577
1577
|
};
|
|
1578
1578
|
return document.addEventListener("keydown", e), document.addEventListener("click", s), () => {
|
|
1579
1579
|
document.removeEventListener("keydown", e), document.removeEventListener("click", s);
|
|
1580
1580
|
};
|
|
1581
1581
|
};
|
|
1582
|
-
function As(
|
|
1582
|
+
function As(i, t) {
|
|
1583
1583
|
const {
|
|
1584
1584
|
// symbol,
|
|
1585
1585
|
widgetName: e,
|
|
1586
1586
|
label: s = "",
|
|
1587
|
-
ariaLabel:
|
|
1587
|
+
ariaLabel: n = "",
|
|
1588
1588
|
tooltip: r = ""
|
|
1589
1589
|
} = t;
|
|
1590
|
-
return
|
|
1590
|
+
return i.classList.add("ace-widget-trigger"), i.classList.add(`ace-widget_${e}`), s.length && i.classList.add("trigger-has-text"), n.length && !i.getAttribute("aria-label") && i.setAttribute("aria-label", n), n.length && !i.getAttribute("tabindex") && i.setAttribute("tabindex", "0"), r.length && !i.getAttribute("title") && i.setAttribute("title", r), _s(i);
|
|
1591
1591
|
}
|
|
1592
|
-
function
|
|
1593
|
-
|
|
1592
|
+
function Es(i, t) {
|
|
1593
|
+
i instanceof HTMLElement ? (t && i.setAttribute("title", t), i.classList.remove("ace-trigger-active"), i.classList.remove("ace-trigger-loading")) : i instanceof Array && i.forEach((e) => {
|
|
1594
1594
|
t && e.setAttribute("title", t), e.classList.remove("ace-trigger-active"), e.classList.remove("ace-trigger-loading");
|
|
1595
1595
|
});
|
|
1596
1596
|
}
|
|
1597
|
-
function
|
|
1598
|
-
|
|
1597
|
+
function xs(i) {
|
|
1598
|
+
i instanceof HTMLElement ? (i.classList.remove("ace-trigger-active"), i.classList.add("ace-trigger-loading")) : i instanceof Array && i.forEach((t) => {
|
|
1599
1599
|
t.classList.remove("ace-trigger-active"), t.classList.add("ace-trigger-loading");
|
|
1600
1600
|
});
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1603
|
-
|
|
1602
|
+
function Le(i, t) {
|
|
1603
|
+
i instanceof HTMLElement ? (t && i.setAttribute("title", t), i.classList.add("ace-trigger-active"), i.classList.remove("ace-trigger-loading")) : i instanceof Array && i.forEach((e) => {
|
|
1604
1604
|
t && e.setAttribute("title", t), e.classList.add("ace-trigger-active"), e.classList.remove("ace-trigger-loading");
|
|
1605
1605
|
});
|
|
1606
1606
|
}
|
|
@@ -1609,8 +1609,8 @@ function De(n, t) {
|
|
|
1609
1609
|
* Copyright 2019 Google LLC
|
|
1610
1610
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1611
1611
|
*/
|
|
1612
|
-
const
|
|
1613
|
-
let
|
|
1612
|
+
const mt = globalThis, Qt = mt.ShadowRoot && (mt.ShadyCSS === void 0 || mt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Xt = Symbol(), he = /* @__PURE__ */ new WeakMap();
|
|
1613
|
+
let De = class {
|
|
1614
1614
|
constructor(t, e, s) {
|
|
1615
1615
|
if (this._$cssResult$ = !0, s !== Xt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
1616
1616
|
this.cssText = t, this.t = e;
|
|
@@ -1628,58 +1628,58 @@ let Le = class {
|
|
|
1628
1628
|
return this.cssText;
|
|
1629
1629
|
}
|
|
1630
1630
|
};
|
|
1631
|
-
const Cs = (
|
|
1632
|
-
const e =
|
|
1631
|
+
const Cs = (i) => new De(typeof i == "string" ? i : i + "", void 0, Xt), Ie = (i, ...t) => {
|
|
1632
|
+
const e = i.length === 1 ? i[0] : t.reduce((s, n, r) => s + ((o) => {
|
|
1633
1633
|
if (o._$cssResult$ === !0) return o.cssText;
|
|
1634
1634
|
if (typeof o == "number") return o;
|
|
1635
1635
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
1636
|
-
})(
|
|
1637
|
-
return new
|
|
1638
|
-
}, Os = (
|
|
1639
|
-
if (Qt)
|
|
1636
|
+
})(n) + i[r + 1], i[0]);
|
|
1637
|
+
return new De(e, i, Xt);
|
|
1638
|
+
}, Os = (i, t) => {
|
|
1639
|
+
if (Qt) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
1640
1640
|
else for (const e of t) {
|
|
1641
|
-
const s = document.createElement("style"),
|
|
1642
|
-
|
|
1641
|
+
const s = document.createElement("style"), n = mt.litNonce;
|
|
1642
|
+
n !== void 0 && s.setAttribute("nonce", n), s.textContent = e.cssText, i.appendChild(s);
|
|
1643
1643
|
}
|
|
1644
|
-
},
|
|
1644
|
+
}, le = Qt ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
|
1645
1645
|
let e = "";
|
|
1646
1646
|
for (const s of t.cssRules) e += s.cssText;
|
|
1647
1647
|
return Cs(e);
|
|
1648
|
-
})(
|
|
1648
|
+
})(i) : i;
|
|
1649
1649
|
/**
|
|
1650
1650
|
* @license
|
|
1651
1651
|
* Copyright 2017 Google LLC
|
|
1652
1652
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1653
1653
|
*/
|
|
1654
|
-
const { is: Ss, defineProperty: Ps, getOwnPropertyDescriptor: ks, getOwnPropertyNames: Ns, getOwnPropertySymbols: Ms, getPrototypeOf:
|
|
1654
|
+
const { is: Ss, defineProperty: Ps, getOwnPropertyDescriptor: ks, getOwnPropertyNames: Ns, getOwnPropertySymbols: Ms, getPrototypeOf: Ls } = Object, M = globalThis, de = M.trustedTypes, Ds = de ? de.emptyScript : "", Tt = M.reactiveElementPolyfillSupport, G = (i, t) => i, wt = { toAttribute(i, t) {
|
|
1655
1655
|
switch (t) {
|
|
1656
1656
|
case Boolean:
|
|
1657
|
-
|
|
1657
|
+
i = i ? Ds : null;
|
|
1658
1658
|
break;
|
|
1659
1659
|
case Object:
|
|
1660
1660
|
case Array:
|
|
1661
|
-
|
|
1661
|
+
i = i == null ? i : JSON.stringify(i);
|
|
1662
1662
|
}
|
|
1663
|
-
return
|
|
1664
|
-
}, fromAttribute(
|
|
1665
|
-
let e =
|
|
1663
|
+
return i;
|
|
1664
|
+
}, fromAttribute(i, t) {
|
|
1665
|
+
let e = i;
|
|
1666
1666
|
switch (t) {
|
|
1667
1667
|
case Boolean:
|
|
1668
|
-
e =
|
|
1668
|
+
e = i !== null;
|
|
1669
1669
|
break;
|
|
1670
1670
|
case Number:
|
|
1671
|
-
e =
|
|
1671
|
+
e = i === null ? null : Number(i);
|
|
1672
1672
|
break;
|
|
1673
1673
|
case Object:
|
|
1674
1674
|
case Array:
|
|
1675
1675
|
try {
|
|
1676
|
-
e = JSON.parse(
|
|
1676
|
+
e = JSON.parse(i);
|
|
1677
1677
|
} catch {
|
|
1678
1678
|
e = null;
|
|
1679
1679
|
}
|
|
1680
1680
|
}
|
|
1681
1681
|
return e;
|
|
1682
|
-
} }, te = (
|
|
1682
|
+
} }, te = (i, t) => !Ss(i, t), pe = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged: te };
|
|
1683
1683
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), M.litPropertyMetadata ?? (M.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
1684
1684
|
class H extends HTMLElement {
|
|
1685
1685
|
static addInitializer(t) {
|
|
@@ -1688,48 +1688,48 @@ class H extends HTMLElement {
|
|
|
1688
1688
|
static get observedAttributes() {
|
|
1689
1689
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
1690
1690
|
}
|
|
1691
|
-
static createProperty(t, e =
|
|
1691
|
+
static createProperty(t, e = pe) {
|
|
1692
1692
|
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
1693
|
-
const s = Symbol(),
|
|
1694
|
-
|
|
1693
|
+
const s = Symbol(), n = this.getPropertyDescriptor(t, s, e);
|
|
1694
|
+
n !== void 0 && Ps(this.prototype, t, n);
|
|
1695
1695
|
}
|
|
1696
1696
|
}
|
|
1697
1697
|
static getPropertyDescriptor(t, e, s) {
|
|
1698
|
-
const { get:
|
|
1698
|
+
const { get: n, set: r } = ks(this.prototype, t) ?? { get() {
|
|
1699
1699
|
return this[e];
|
|
1700
1700
|
}, set(o) {
|
|
1701
1701
|
this[e] = o;
|
|
1702
1702
|
} };
|
|
1703
1703
|
return { get() {
|
|
1704
|
-
return
|
|
1704
|
+
return n == null ? void 0 : n.call(this);
|
|
1705
1705
|
}, set(o) {
|
|
1706
|
-
const a =
|
|
1706
|
+
const a = n == null ? void 0 : n.call(this);
|
|
1707
1707
|
r.call(this, o), this.requestUpdate(t, a, s);
|
|
1708
1708
|
}, configurable: !0, enumerable: !0 };
|
|
1709
1709
|
}
|
|
1710
1710
|
static getPropertyOptions(t) {
|
|
1711
|
-
return this.elementProperties.get(t) ??
|
|
1711
|
+
return this.elementProperties.get(t) ?? pe;
|
|
1712
1712
|
}
|
|
1713
1713
|
static _$Ei() {
|
|
1714
1714
|
if (this.hasOwnProperty(G("elementProperties"))) return;
|
|
1715
|
-
const t =
|
|
1715
|
+
const t = Ls(this);
|
|
1716
1716
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
1717
1717
|
}
|
|
1718
1718
|
static finalize() {
|
|
1719
1719
|
if (this.hasOwnProperty(G("finalized"))) return;
|
|
1720
1720
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(G("properties"))) {
|
|
1721
1721
|
const e = this.properties, s = [...Ns(e), ...Ms(e)];
|
|
1722
|
-
for (const
|
|
1722
|
+
for (const n of s) this.createProperty(n, e[n]);
|
|
1723
1723
|
}
|
|
1724
1724
|
const t = this[Symbol.metadata];
|
|
1725
1725
|
if (t !== null) {
|
|
1726
1726
|
const e = litPropertyMetadata.get(t);
|
|
1727
|
-
if (e !== void 0) for (const [s,
|
|
1727
|
+
if (e !== void 0) for (const [s, n] of e) this.elementProperties.set(s, n);
|
|
1728
1728
|
}
|
|
1729
1729
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
1730
1730
|
for (const [e, s] of this.elementProperties) {
|
|
1731
|
-
const
|
|
1732
|
-
|
|
1731
|
+
const n = this._$Eu(e, s);
|
|
1732
|
+
n !== void 0 && this._$Eh.set(n, e);
|
|
1733
1733
|
}
|
|
1734
1734
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
1735
1735
|
}
|
|
@@ -1737,8 +1737,8 @@ class H extends HTMLElement {
|
|
|
1737
1737
|
const e = [];
|
|
1738
1738
|
if (Array.isArray(t)) {
|
|
1739
1739
|
const s = new Set(t.flat(1 / 0).reverse());
|
|
1740
|
-
for (const
|
|
1741
|
-
} else t !== void 0 && e.push(
|
|
1740
|
+
for (const n of s) e.unshift(le(n));
|
|
1741
|
+
} else t !== void 0 && e.push(le(t));
|
|
1742
1742
|
return e;
|
|
1743
1743
|
}
|
|
1744
1744
|
static _$Eu(t, e) {
|
|
@@ -1790,18 +1790,18 @@ class H extends HTMLElement {
|
|
|
1790
1790
|
}
|
|
1791
1791
|
_$EC(t, e) {
|
|
1792
1792
|
var r;
|
|
1793
|
-
const s = this.constructor.elementProperties.get(t),
|
|
1794
|
-
if (
|
|
1793
|
+
const s = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, s);
|
|
1794
|
+
if (n !== void 0 && s.reflect === !0) {
|
|
1795
1795
|
const o = (((r = s.converter) == null ? void 0 : r.toAttribute) !== void 0 ? s.converter : wt).toAttribute(e, s.type);
|
|
1796
|
-
this._$Em = t, o == null ? this.removeAttribute(
|
|
1796
|
+
this._$Em = t, o == null ? this.removeAttribute(n) : this.setAttribute(n, o), this._$Em = null;
|
|
1797
1797
|
}
|
|
1798
1798
|
}
|
|
1799
1799
|
_$AK(t, e) {
|
|
1800
1800
|
var r;
|
|
1801
|
-
const s = this.constructor,
|
|
1802
|
-
if (
|
|
1803
|
-
const o = s.getPropertyOptions(
|
|
1804
|
-
this._$Em =
|
|
1801
|
+
const s = this.constructor, n = s._$Eh.get(t);
|
|
1802
|
+
if (n !== void 0 && this._$Em !== n) {
|
|
1803
|
+
const o = s.getPropertyOptions(n), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((r = o.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? o.converter : wt;
|
|
1804
|
+
this._$Em = n, this[n] = a.fromAttribute(e, o.type), this._$Em = null;
|
|
1805
1805
|
}
|
|
1806
1806
|
}
|
|
1807
1807
|
requestUpdate(t, e, s) {
|
|
@@ -1835,18 +1835,18 @@ class H extends HTMLElement {
|
|
|
1835
1835
|
for (const [r, o] of this._$Ep) this[r] = o;
|
|
1836
1836
|
this._$Ep = void 0;
|
|
1837
1837
|
}
|
|
1838
|
-
const
|
|
1839
|
-
if (
|
|
1838
|
+
const n = this.constructor.elementProperties;
|
|
1839
|
+
if (n.size > 0) for (const [r, o] of n) o.wrapped !== !0 || this._$AL.has(r) || this[r] === void 0 || this.P(r, this[r], o);
|
|
1840
1840
|
}
|
|
1841
1841
|
let t = !1;
|
|
1842
1842
|
const e = this._$AL;
|
|
1843
1843
|
try {
|
|
1844
|
-
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((
|
|
1844
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((n) => {
|
|
1845
1845
|
var r;
|
|
1846
|
-
return (r =
|
|
1846
|
+
return (r = n.hostUpdate) == null ? void 0 : r.call(n);
|
|
1847
1847
|
}), this.update(e)) : this._$EU();
|
|
1848
|
-
} catch (
|
|
1849
|
-
throw t = !1, this._$EU(),
|
|
1848
|
+
} catch (n) {
|
|
1849
|
+
throw t = !1, this._$EU(), n;
|
|
1850
1850
|
}
|
|
1851
1851
|
t && this._$AE(e);
|
|
1852
1852
|
}
|
|
@@ -1855,8 +1855,8 @@ class H extends HTMLElement {
|
|
|
1855
1855
|
_$AE(t) {
|
|
1856
1856
|
var e;
|
|
1857
1857
|
(e = this._$EO) == null || e.forEach((s) => {
|
|
1858
|
-
var
|
|
1859
|
-
return (
|
|
1858
|
+
var n;
|
|
1859
|
+
return (n = s.hostUpdated) == null ? void 0 : n.call(s);
|
|
1860
1860
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
1861
1861
|
}
|
|
1862
1862
|
_$EU() {
|
|
@@ -1885,53 +1885,53 @@ H.elementStyles = [], H.shadowRootOptions = { mode: "open" }, H[G("elementProper
|
|
|
1885
1885
|
* Copyright 2017 Google LLC
|
|
1886
1886
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1887
1887
|
*/
|
|
1888
|
-
const Y = globalThis, $t = Y.trustedTypes,
|
|
1889
|
-
\f\r]`, J = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ge = /-->/g,
|
|
1890
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
1891
|
-
function je(
|
|
1892
|
-
if (!ee(
|
|
1893
|
-
return
|
|
1888
|
+
const Y = globalThis, $t = Y.trustedTypes, ue = $t ? $t.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, Re = "$lit$", P = `lit$${Math.random().toFixed(9).slice(2)}$`, Te = "?" + P, Is = `<${Te}>`, j = document, X = () => j.createComment(""), tt = (i) => i === null || typeof i != "object" && typeof i != "function", ee = Array.isArray, Rs = (i) => ee(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Ut = `[
|
|
1889
|
+
\f\r]`, J = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ge = /-->/g, me = />/g, D = RegExp(`>|${Ut}(?:([^\\s"'>=/]+)(${Ut}*=${Ut}*(?:[^
|
|
1890
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), fe = /'/g, ye = /"/g, Ue = /^(?:script|style|textarea|title)$/i, Ts = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), ht = Ts(1), V = Symbol.for("lit-noChange"), y = Symbol.for("lit-nothing"), ve = /* @__PURE__ */ new WeakMap(), T = j.createTreeWalker(j, 129);
|
|
1891
|
+
function je(i, t) {
|
|
1892
|
+
if (!ee(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
1893
|
+
return ue !== void 0 ? ue.createHTML(t) : t;
|
|
1894
1894
|
}
|
|
1895
|
-
const Us = (
|
|
1896
|
-
const e =
|
|
1897
|
-
let
|
|
1895
|
+
const Us = (i, t) => {
|
|
1896
|
+
const e = i.length - 1, s = [];
|
|
1897
|
+
let n, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = J;
|
|
1898
1898
|
for (let a = 0; a < e; a++) {
|
|
1899
|
-
const h =
|
|
1900
|
-
let c,
|
|
1901
|
-
for (;
|
|
1902
|
-
const
|
|
1903
|
-
r += o === J ? h + Is :
|
|
1899
|
+
const h = i[a];
|
|
1900
|
+
let c, l, d = -1, p = 0;
|
|
1901
|
+
for (; p < h.length && (o.lastIndex = p, l = o.exec(h), l !== null); ) p = o.lastIndex, o === J ? l[1] === "!--" ? o = ge : l[1] !== void 0 ? o = me : l[2] !== void 0 ? (Ue.test(l[2]) && (n = RegExp("</" + l[2], "g")), o = D) : l[3] !== void 0 && (o = D) : o === D ? l[0] === ">" ? (o = n ?? J, d = -1) : l[1] === void 0 ? d = -2 : (d = o.lastIndex - l[2].length, c = l[1], o = l[3] === void 0 ? D : l[3] === '"' ? ye : fe) : o === ye || o === fe ? o = D : o === ge || o === me ? o = J : (o = D, n = void 0);
|
|
1902
|
+
const u = o === D && i[a + 1].startsWith("/>") ? " " : "";
|
|
1903
|
+
r += o === J ? h + Is : d >= 0 ? (s.push(c), h.slice(0, d) + Re + h.slice(d) + P + u) : h + P + (d === -2 ? a : u);
|
|
1904
1904
|
}
|
|
1905
|
-
return [je(
|
|
1905
|
+
return [je(i, r + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
1906
1906
|
};
|
|
1907
1907
|
class et {
|
|
1908
1908
|
constructor({ strings: t, _$litType$: e }, s) {
|
|
1909
|
-
let
|
|
1909
|
+
let n;
|
|
1910
1910
|
this.parts = [];
|
|
1911
1911
|
let r = 0, o = 0;
|
|
1912
|
-
const a = t.length - 1, h = this.parts, [c,
|
|
1912
|
+
const a = t.length - 1, h = this.parts, [c, l] = Us(t, e);
|
|
1913
1913
|
if (this.el = et.createElement(c, s), T.currentNode = this.el.content, e === 2 || e === 3) {
|
|
1914
|
-
const
|
|
1915
|
-
|
|
1916
|
-
}
|
|
1917
|
-
for (; (
|
|
1918
|
-
if (
|
|
1919
|
-
if (
|
|
1920
|
-
const
|
|
1921
|
-
h.push({ type: 1, index: r, name: g[2], strings:
|
|
1922
|
-
} else
|
|
1923
|
-
if (Ue.test(
|
|
1924
|
-
const
|
|
1925
|
-
if (
|
|
1926
|
-
|
|
1927
|
-
for (let
|
|
1928
|
-
|
|
1914
|
+
const d = this.el.content.firstChild;
|
|
1915
|
+
d.replaceWith(...d.childNodes);
|
|
1916
|
+
}
|
|
1917
|
+
for (; (n = T.nextNode()) !== null && h.length < a; ) {
|
|
1918
|
+
if (n.nodeType === 1) {
|
|
1919
|
+
if (n.hasAttributes()) for (const d of n.getAttributeNames()) if (d.endsWith(Re)) {
|
|
1920
|
+
const p = l[o++], u = n.getAttribute(d).split(P), g = /([.?@])?(.*)/.exec(p);
|
|
1921
|
+
h.push({ type: 1, index: r, name: g[2], strings: u, ctor: g[1] === "." ? Vs : g[1] === "?" ? Hs : g[1] === "@" ? zs : Ot }), n.removeAttribute(d);
|
|
1922
|
+
} else d.startsWith(P) && (h.push({ type: 6, index: r }), n.removeAttribute(d));
|
|
1923
|
+
if (Ue.test(n.tagName)) {
|
|
1924
|
+
const d = n.textContent.split(P), p = d.length - 1;
|
|
1925
|
+
if (p > 0) {
|
|
1926
|
+
n.textContent = $t ? $t.emptyScript : "";
|
|
1927
|
+
for (let u = 0; u < p; u++) n.append(d[u], X()), T.nextNode(), h.push({ type: 2, index: ++r });
|
|
1928
|
+
n.append(d[p], X());
|
|
1929
1929
|
}
|
|
1930
1930
|
}
|
|
1931
|
-
} else if (
|
|
1931
|
+
} else if (n.nodeType === 8) if (n.data === Te) h.push({ type: 2, index: r });
|
|
1932
1932
|
else {
|
|
1933
|
-
let
|
|
1934
|
-
for (; (
|
|
1933
|
+
let d = -1;
|
|
1934
|
+
for (; (d = n.data.indexOf(P, d + 1)) !== -1; ) h.push({ type: 7, index: r }), d += P.length - 1;
|
|
1935
1935
|
}
|
|
1936
1936
|
r++;
|
|
1937
1937
|
}
|
|
@@ -1941,12 +1941,12 @@ class et {
|
|
|
1941
1941
|
return s.innerHTML = t, s;
|
|
1942
1942
|
}
|
|
1943
1943
|
}
|
|
1944
|
-
function B(
|
|
1944
|
+
function B(i, t, e = i, s) {
|
|
1945
1945
|
var o, a;
|
|
1946
1946
|
if (t === V) return t;
|
|
1947
|
-
let
|
|
1947
|
+
let n = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
|
|
1948
1948
|
const r = tt(t) ? void 0 : t._$litDirective$;
|
|
1949
|
-
return (
|
|
1949
|
+
return (n == null ? void 0 : n.constructor) !== r && ((a = n == null ? void 0 : n._$AO) == null || a.call(n, !1), r === void 0 ? n = void 0 : (n = new r(i), n._$AT(i, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = n : e._$Cl = n), n !== void 0 && (t = B(i, n._$AS(i, t.values), n, s)), t;
|
|
1950
1950
|
}
|
|
1951
1951
|
class js {
|
|
1952
1952
|
constructor(t, e) {
|
|
@@ -1959,8 +1959,8 @@ class js {
|
|
|
1959
1959
|
return this._$AM._$AU;
|
|
1960
1960
|
}
|
|
1961
1961
|
u(t) {
|
|
1962
|
-
const { el: { content: e }, parts: s } = this._$AD,
|
|
1963
|
-
T.currentNode =
|
|
1962
|
+
const { el: { content: e }, parts: s } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ?? j).importNode(e, !0);
|
|
1963
|
+
T.currentNode = n;
|
|
1964
1964
|
let r = T.nextNode(), o = 0, a = 0, h = s[0];
|
|
1965
1965
|
for (; h !== void 0; ) {
|
|
1966
1966
|
if (o === h.index) {
|
|
@@ -1969,7 +1969,7 @@ class js {
|
|
|
1969
1969
|
}
|
|
1970
1970
|
o !== (h == null ? void 0 : h.index) && (r = T.nextNode(), o++);
|
|
1971
1971
|
}
|
|
1972
|
-
return T.currentNode = j,
|
|
1972
|
+
return T.currentNode = j, n;
|
|
1973
1973
|
}
|
|
1974
1974
|
p(t) {
|
|
1975
1975
|
let e = 0;
|
|
@@ -1981,8 +1981,8 @@ class rt {
|
|
|
1981
1981
|
var t;
|
|
1982
1982
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
1983
1983
|
}
|
|
1984
|
-
constructor(t, e, s,
|
|
1985
|
-
this.type = 2, this._$AH = y, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options =
|
|
1984
|
+
constructor(t, e, s, n) {
|
|
1985
|
+
this.type = 2, this._$AH = y, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = n, this._$Cv = (n == null ? void 0 : n.isConnected) ?? !0;
|
|
1986
1986
|
}
|
|
1987
1987
|
get parentNode() {
|
|
1988
1988
|
let t = this._$AA.parentNode;
|
|
@@ -2009,29 +2009,29 @@ class rt {
|
|
|
2009
2009
|
}
|
|
2010
2010
|
$(t) {
|
|
2011
2011
|
var r;
|
|
2012
|
-
const { values: e, _$litType$: s } = t,
|
|
2013
|
-
if (((r = this._$AH) == null ? void 0 : r._$AD) ===
|
|
2012
|
+
const { values: e, _$litType$: s } = t, n = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = et.createElement(je(s.h, s.h[0]), this.options)), s);
|
|
2013
|
+
if (((r = this._$AH) == null ? void 0 : r._$AD) === n) this._$AH.p(e);
|
|
2014
2014
|
else {
|
|
2015
|
-
const o = new js(
|
|
2015
|
+
const o = new js(n, this), a = o.u(this.options);
|
|
2016
2016
|
o.p(e), this.T(a), this._$AH = o;
|
|
2017
2017
|
}
|
|
2018
2018
|
}
|
|
2019
2019
|
_$AC(t) {
|
|
2020
|
-
let e =
|
|
2021
|
-
return e === void 0 &&
|
|
2020
|
+
let e = ve.get(t.strings);
|
|
2021
|
+
return e === void 0 && ve.set(t.strings, e = new et(t)), e;
|
|
2022
2022
|
}
|
|
2023
2023
|
k(t) {
|
|
2024
2024
|
ee(this._$AH) || (this._$AH = [], this._$AR());
|
|
2025
2025
|
const e = this._$AH;
|
|
2026
|
-
let s,
|
|
2027
|
-
for (const r of t)
|
|
2028
|
-
|
|
2026
|
+
let s, n = 0;
|
|
2027
|
+
for (const r of t) n === e.length ? e.push(s = new rt(this.O(X()), this.O(X()), this, this.options)) : s = e[n], s._$AI(r), n++;
|
|
2028
|
+
n < e.length && (this._$AR(s && s._$AB.nextSibling, n), e.length = n);
|
|
2029
2029
|
}
|
|
2030
2030
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
2031
2031
|
var s;
|
|
2032
2032
|
for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
|
2033
|
-
const
|
|
2034
|
-
t.remove(), t =
|
|
2033
|
+
const n = t.nextSibling;
|
|
2034
|
+
t.remove(), t = n;
|
|
2035
2035
|
}
|
|
2036
2036
|
}
|
|
2037
2037
|
setConnected(t) {
|
|
@@ -2046,10 +2046,10 @@ class Ot {
|
|
|
2046
2046
|
get _$AU() {
|
|
2047
2047
|
return this._$AM._$AU;
|
|
2048
2048
|
}
|
|
2049
|
-
constructor(t, e, s,
|
|
2050
|
-
this.type = 1, this._$AH = y, this._$AN = void 0, this.element = t, this.name = e, this._$AM =
|
|
2049
|
+
constructor(t, e, s, n, r) {
|
|
2050
|
+
this.type = 1, this._$AH = y, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = y;
|
|
2051
2051
|
}
|
|
2052
|
-
_$AI(t, e = this, s,
|
|
2052
|
+
_$AI(t, e = this, s, n) {
|
|
2053
2053
|
const r = this.strings;
|
|
2054
2054
|
let o = !1;
|
|
2055
2055
|
if (r === void 0) t = B(this, t, e, 0), o = !tt(t) || t !== this._$AH && t !== V, o && (this._$AH = t);
|
|
@@ -2058,7 +2058,7 @@ class Ot {
|
|
|
2058
2058
|
let h, c;
|
|
2059
2059
|
for (t = r[0], h = 0; h < r.length - 1; h++) c = B(this, a[s + h], e, h), c === V && (c = this._$AH[h]), o || (o = !tt(c) || c !== this._$AH[h]), c === y ? t = y : t !== y && (t += (c ?? "") + r[h + 1]), this._$AH[h] = c;
|
|
2060
2060
|
}
|
|
2061
|
-
o && !
|
|
2061
|
+
o && !n && this.j(t);
|
|
2062
2062
|
}
|
|
2063
2063
|
j(t) {
|
|
2064
2064
|
t === y ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
@@ -2081,13 +2081,13 @@ class Hs extends Ot {
|
|
|
2081
2081
|
}
|
|
2082
2082
|
}
|
|
2083
2083
|
class zs extends Ot {
|
|
2084
|
-
constructor(t, e, s,
|
|
2085
|
-
super(t, e, s,
|
|
2084
|
+
constructor(t, e, s, n, r) {
|
|
2085
|
+
super(t, e, s, n, r), this.type = 5;
|
|
2086
2086
|
}
|
|
2087
2087
|
_$AI(t, e = this) {
|
|
2088
2088
|
if ((t = B(this, t, e, 0) ?? y) === V) return;
|
|
2089
|
-
const s = this._$AH,
|
|
2090
|
-
|
|
2089
|
+
const s = this._$AH, n = t === y && s !== y || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, r = t !== y && (s === y || n);
|
|
2090
|
+
n && this.element.removeEventListener(this.name, this, s), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
2091
2091
|
}
|
|
2092
2092
|
handleEvent(t) {
|
|
2093
2093
|
var e;
|
|
@@ -2107,14 +2107,14 @@ class Bs {
|
|
|
2107
2107
|
}
|
|
2108
2108
|
const jt = Y.litHtmlPolyfillSupport;
|
|
2109
2109
|
jt == null || jt(et, rt), (Y.litHtmlVersions ?? (Y.litHtmlVersions = [])).push("3.2.1");
|
|
2110
|
-
const Ws = (
|
|
2110
|
+
const Ws = (i, t, e) => {
|
|
2111
2111
|
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
2112
|
-
let
|
|
2113
|
-
if (
|
|
2112
|
+
let n = s._$litPart$;
|
|
2113
|
+
if (n === void 0) {
|
|
2114
2114
|
const r = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
2115
|
-
s._$litPart$ =
|
|
2115
|
+
s._$litPart$ = n = new rt(t.insertBefore(X(), r), r, void 0, e ?? {});
|
|
2116
2116
|
}
|
|
2117
|
-
return
|
|
2117
|
+
return n._$AI(i), n;
|
|
2118
2118
|
};
|
|
2119
2119
|
/**
|
|
2120
2120
|
* @license
|
|
@@ -2156,47 +2156,47 @@ Vt == null || Vt({ LitElement: Z });
|
|
|
2156
2156
|
* Copyright 2017 Google LLC
|
|
2157
2157
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2158
2158
|
*/
|
|
2159
|
-
const qs = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged: te }, Js = (
|
|
2160
|
-
const { kind: s, metadata:
|
|
2161
|
-
let r = globalThis.litPropertyMetadata.get(
|
|
2162
|
-
if (r === void 0 && globalThis.litPropertyMetadata.set(
|
|
2159
|
+
const qs = { attribute: !0, type: String, converter: wt, reflect: !1, hasChanged: te }, Js = (i = qs, t, e) => {
|
|
2160
|
+
const { kind: s, metadata: n } = e;
|
|
2161
|
+
let r = globalThis.litPropertyMetadata.get(n);
|
|
2162
|
+
if (r === void 0 && globalThis.litPropertyMetadata.set(n, r = /* @__PURE__ */ new Map()), r.set(e.name, i), s === "accessor") {
|
|
2163
2163
|
const { name: o } = e;
|
|
2164
2164
|
return { set(a) {
|
|
2165
2165
|
const h = t.get.call(this);
|
|
2166
|
-
t.set.call(this, a), this.requestUpdate(o, h,
|
|
2166
|
+
t.set.call(this, a), this.requestUpdate(o, h, i);
|
|
2167
2167
|
}, init(a) {
|
|
2168
|
-
return a !== void 0 && this.P(o, void 0,
|
|
2168
|
+
return a !== void 0 && this.P(o, void 0, i), a;
|
|
2169
2169
|
} };
|
|
2170
2170
|
}
|
|
2171
2171
|
if (s === "setter") {
|
|
2172
2172
|
const { name: o } = e;
|
|
2173
2173
|
return function(a) {
|
|
2174
2174
|
const h = this[o];
|
|
2175
|
-
t.call(this, a), this.requestUpdate(o, h,
|
|
2175
|
+
t.call(this, a), this.requestUpdate(o, h, i);
|
|
2176
2176
|
};
|
|
2177
2177
|
}
|
|
2178
2178
|
throw Error("Unsupported decorator location: " + s);
|
|
2179
2179
|
};
|
|
2180
|
-
function st(
|
|
2181
|
-
return (t, e) => typeof e == "object" ? Js(
|
|
2182
|
-
const o =
|
|
2183
|
-
return
|
|
2184
|
-
})(
|
|
2180
|
+
function st(i) {
|
|
2181
|
+
return (t, e) => typeof e == "object" ? Js(i, t, e) : ((s, n, r) => {
|
|
2182
|
+
const o = n.hasOwnProperty(r);
|
|
2183
|
+
return n.constructor.createProperty(r, o ? { ...s, wrapped: !0 } : s), o ? Object.getOwnPropertyDescriptor(n, r) : void 0;
|
|
2184
|
+
})(i, t, e);
|
|
2185
2185
|
}
|
|
2186
2186
|
/**
|
|
2187
2187
|
* @license
|
|
2188
2188
|
* Copyright 2017 Google LLC
|
|
2189
2189
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2190
2190
|
*/
|
|
2191
|
-
function k(
|
|
2192
|
-
return st({ ...
|
|
2191
|
+
function k(i) {
|
|
2192
|
+
return st({ ...i, state: !0, attribute: !1 });
|
|
2193
2193
|
}
|
|
2194
2194
|
/**
|
|
2195
2195
|
* @license
|
|
2196
2196
|
* Copyright 2017 Google LLC
|
|
2197
2197
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2198
2198
|
*/
|
|
2199
|
-
const Fs = { ATTRIBUTE: 1, CHILD: 2 }, Ks = (
|
|
2199
|
+
const Fs = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Ks = (i) => (...t) => ({ _$litDirective$: i, values: t });
|
|
2200
2200
|
let Gs = class {
|
|
2201
2201
|
constructor(t) {
|
|
2202
2202
|
}
|
|
@@ -2219,48 +2219,48 @@ let Gs = class {
|
|
|
2219
2219
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2220
2220
|
*/
|
|
2221
2221
|
const Ys = Ks(class extends Gs {
|
|
2222
|
-
constructor(
|
|
2222
|
+
constructor(i) {
|
|
2223
2223
|
var t;
|
|
2224
|
-
if (super(
|
|
2224
|
+
if (super(i), i.type !== Fs.ATTRIBUTE || i.name !== "class" || ((t = i.strings) == null ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
2225
2225
|
}
|
|
2226
|
-
render(
|
|
2227
|
-
return " " + Object.keys(
|
|
2226
|
+
render(i) {
|
|
2227
|
+
return " " + Object.keys(i).filter((t) => i[t]).join(" ") + " ";
|
|
2228
2228
|
}
|
|
2229
|
-
update(
|
|
2230
|
-
var s,
|
|
2229
|
+
update(i, [t]) {
|
|
2230
|
+
var s, n;
|
|
2231
2231
|
if (this.st === void 0) {
|
|
2232
|
-
this.st = /* @__PURE__ */ new Set(),
|
|
2232
|
+
this.st = /* @__PURE__ */ new Set(), i.strings !== void 0 && (this.nt = new Set(i.strings.join(" ").split(/\s/).filter((r) => r !== "")));
|
|
2233
2233
|
for (const r in t) t[r] && !((s = this.nt) != null && s.has(r)) && this.st.add(r);
|
|
2234
2234
|
return this.render(t);
|
|
2235
2235
|
}
|
|
2236
|
-
const e =
|
|
2236
|
+
const e = i.element.classList;
|
|
2237
2237
|
for (const r of this.st) r in t || (e.remove(r), this.st.delete(r));
|
|
2238
2238
|
for (const r in t) {
|
|
2239
2239
|
const o = !!t[r];
|
|
2240
|
-
o === this.st.has(r) || (
|
|
2240
|
+
o === this.st.has(r) || (n = this.nt) != null && n.has(r) || (o ? (e.add(r), this.st.add(r)) : (e.remove(r), this.st.delete(r)));
|
|
2241
2241
|
}
|
|
2242
2242
|
return V;
|
|
2243
2243
|
}
|
|
2244
|
-
}),
|
|
2245
|
-
|
|
2246
|
-
}, Zs = (
|
|
2247
|
-
var e, s,
|
|
2248
|
-
|
|
2249
|
-
(s =
|
|
2244
|
+
}), lt = (i, t, e) => {
|
|
2245
|
+
i && e.style.setProperty(t, i);
|
|
2246
|
+
}, Zs = (i, t) => {
|
|
2247
|
+
var e, s, n, r;
|
|
2248
|
+
lt((e = i.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), lt(
|
|
2249
|
+
(s = i.colors) == null ? void 0 : s.textOnPrimaryBackground,
|
|
2250
2250
|
"--text-on-primary-background",
|
|
2251
2251
|
t
|
|
2252
|
-
),
|
|
2253
|
-
(r =
|
|
2252
|
+
), lt((n = i.colors) == null ? void 0 : n.secondaryBackground, "--secondary-background", t), lt(
|
|
2253
|
+
(r = i.colors) == null ? void 0 : r.textOnSecondaryBackground,
|
|
2254
2254
|
"--text-on-secondary-background",
|
|
2255
2255
|
t
|
|
2256
2256
|
);
|
|
2257
2257
|
};
|
|
2258
|
-
var Qs = Object.defineProperty, ot = (
|
|
2259
|
-
for (var
|
|
2260
|
-
(o =
|
|
2261
|
-
return
|
|
2258
|
+
var Qs = Object.defineProperty, ot = (i, t, e, s) => {
|
|
2259
|
+
for (var n = void 0, r = i.length - 1, o; r >= 0; r--)
|
|
2260
|
+
(o = i[r]) && (n = o(t, e, n) || n);
|
|
2261
|
+
return n && Qs(t, e, n), n;
|
|
2262
2262
|
};
|
|
2263
|
-
const
|
|
2263
|
+
const ie = class ie extends Z {
|
|
2264
2264
|
constructor() {
|
|
2265
2265
|
super(...arguments), this.active = !1, this.loaded = !1;
|
|
2266
2266
|
}
|
|
@@ -2280,10 +2280,10 @@ const ne = class ne extends Z {
|
|
|
2280
2280
|
(r) => r[s]
|
|
2281
2281
|
);
|
|
2282
2282
|
if (t) {
|
|
2283
|
-
const { type: s, content:
|
|
2283
|
+
const { type: s, content: n } = t;
|
|
2284
2284
|
switch (s) {
|
|
2285
2285
|
case "Telia": {
|
|
2286
|
-
const r = await e(
|
|
2286
|
+
const r = await e(n);
|
|
2287
2287
|
return r ? ht`<telia-icon
|
|
2288
2288
|
class="trigger-icon"
|
|
2289
2289
|
svg=${r.svg}
|
|
@@ -2291,11 +2291,11 @@ const ne = class ne extends Z {
|
|
|
2291
2291
|
></telia-icon>` : y;
|
|
2292
2292
|
}
|
|
2293
2293
|
case "FontAwesome":
|
|
2294
|
-
return ht`<i class="trigger-fa-icon fa fa-${
|
|
2294
|
+
return ht`<i class="trigger-fa-icon fa fa-${n}"></i>`;
|
|
2295
2295
|
case "Uri":
|
|
2296
2296
|
return ht`<i
|
|
2297
2297
|
class="trigger-custom-icon"
|
|
2298
|
-
style="background: url(${
|
|
2298
|
+
style="background: url(${n}) no-repeat center center;background-size: contain;"
|
|
2299
2299
|
></i>`;
|
|
2300
2300
|
default:
|
|
2301
2301
|
return y;
|
|
@@ -2342,7 +2342,7 @@ const ne = class ne extends Z {
|
|
|
2342
2342
|
</button>`;
|
|
2343
2343
|
}
|
|
2344
2344
|
};
|
|
2345
|
-
|
|
2345
|
+
ie.styles = [
|
|
2346
2346
|
Ie`
|
|
2347
2347
|
:host {
|
|
2348
2348
|
--voca-rem-multiplier: 0.625;
|
|
@@ -2413,29 +2413,29 @@ ne.styles = [
|
|
|
2413
2413
|
}
|
|
2414
2414
|
`
|
|
2415
2415
|
];
|
|
2416
|
-
let
|
|
2416
|
+
let L = ie;
|
|
2417
2417
|
ot([
|
|
2418
2418
|
st({ attribute: !1 })
|
|
2419
|
-
],
|
|
2419
|
+
], L.prototype, "symbol");
|
|
2420
2420
|
ot([
|
|
2421
2421
|
st({ attribute: !1 })
|
|
2422
|
-
],
|
|
2422
|
+
], L.prototype, "container");
|
|
2423
2423
|
ot([
|
|
2424
2424
|
k()
|
|
2425
|
-
],
|
|
2425
|
+
], L.prototype, "active");
|
|
2426
2426
|
ot([
|
|
2427
2427
|
k()
|
|
2428
|
-
],
|
|
2428
|
+
], L.prototype, "loaded");
|
|
2429
2429
|
ot([
|
|
2430
2430
|
k()
|
|
2431
|
-
],
|
|
2432
|
-
var U = /* @__PURE__ */ ((
|
|
2433
|
-
const Xs = (
|
|
2434
|
-
var
|
|
2431
|
+
], L.prototype, "icon");
|
|
2432
|
+
var U = /* @__PURE__ */ ((i) => (i.Inline = "inline", i.Link = "link", i.Badge = "badge", i.Unsupported = "unsupported", i))(U || {});
|
|
2433
|
+
const Xs = (i, t) => i && t ? "both" : i ? "widgetDOM" : t ? "triggerDOM" : "none", Ve = (i) => i ? typeof i == "boolean" && i ? "link" : typeof i == "object" && !Array.isArray(i) ? "badge" : "unsupported" : "inline", ti = async (i, t, e, s, n, r = !1) => {
|
|
2434
|
+
var l, d;
|
|
2435
2435
|
const o = Xs(
|
|
2436
2436
|
e,
|
|
2437
2437
|
s
|
|
2438
|
-
), a = Ve(
|
|
2438
|
+
), a = Ve(n), h = {
|
|
2439
2439
|
widgetDOMElement: e ? e.cloneNode(!0) : void 0,
|
|
2440
2440
|
triggerDOMElement: s ? s.cloneNode(!0) : void 0
|
|
2441
2441
|
}, c = {
|
|
@@ -2450,42 +2450,42 @@ const Xs = (n, t) => n && t ? "both" : n ? "widgetDOM" : t ? "triggerDOM" : "non
|
|
|
2450
2450
|
}
|
|
2451
2451
|
case "widgetDOM": {
|
|
2452
2452
|
if (c.widgetDOMElement = e || document.createElement("div"), a !== "inline") {
|
|
2453
|
-
const
|
|
2453
|
+
const p = document.body.appendChild(
|
|
2454
2454
|
document.createElement("a")
|
|
2455
2455
|
);
|
|
2456
|
-
a === "link" && (
|
|
2456
|
+
a === "link" && (p.innerText = t), c.triggerDOMElement = p;
|
|
2457
2457
|
}
|
|
2458
2458
|
break;
|
|
2459
2459
|
}
|
|
2460
2460
|
case "triggerDOM": {
|
|
2461
|
-
const
|
|
2462
|
-
c.widgetDOMElement =
|
|
2463
|
-
var
|
|
2464
|
-
(
|
|
2465
|
-
|
|
2461
|
+
const p = document.createElement("div");
|
|
2462
|
+
c.widgetDOMElement = p, a === "inline" ? (p.id = (s == null ? void 0 : s.id) || "", r ? (p.style.display = "none", (l = s == null ? void 0 : s.parentNode) == null || l.appendChild(p), c.callback = () => {
|
|
2463
|
+
var u;
|
|
2464
|
+
(u = s == null ? void 0 : s.parentNode) == null || u.replaceChild(
|
|
2465
|
+
p,
|
|
2466
2466
|
s
|
|
2467
|
-
),
|
|
2468
|
-
}) : (
|
|
2469
|
-
|
|
2467
|
+
), p.style.display = (s == null ? void 0 : s.style.display) || "block";
|
|
2468
|
+
}) : (d = s == null ? void 0 : s.parentNode) == null || d.replaceChild(
|
|
2469
|
+
p,
|
|
2470
2470
|
s
|
|
2471
|
-
), c.cachedOriginals.widgetDOMElement = s, c.cachedOriginals.triggerDOMElement = void 0) : (c.widgetDOMElement = document.body.appendChild(
|
|
2471
|
+
), c.cachedOriginals.widgetDOMElement = s, c.cachedOriginals.triggerDOMElement = void 0) : (c.widgetDOMElement = document.body.appendChild(p), c.triggerDOMElement = s);
|
|
2472
2472
|
break;
|
|
2473
2473
|
}
|
|
2474
2474
|
case "none": {
|
|
2475
|
-
const
|
|
2475
|
+
const p = document.body.appendChild(
|
|
2476
2476
|
document.createElement("div")
|
|
2477
2477
|
);
|
|
2478
|
-
if (c.widgetDOMElement =
|
|
2479
|
-
customElements.get("ace-widget-trigger") || customElements.define("ace-widget-trigger",
|
|
2480
|
-
const
|
|
2481
|
-
|
|
2478
|
+
if (c.widgetDOMElement = p, a !== "inline") {
|
|
2479
|
+
customElements.get("ace-widget-trigger") || customElements.define("ace-widget-trigger", L);
|
|
2480
|
+
const u = document.createElement("ace-widget-trigger");
|
|
2481
|
+
u.symbol = n.symbol, u.container = i, document.body.appendChild(u), console.log("Created trigger"), c.triggerDOMElement = u;
|
|
2482
2482
|
}
|
|
2483
2483
|
break;
|
|
2484
2484
|
}
|
|
2485
2485
|
}
|
|
2486
2486
|
return c;
|
|
2487
|
-
},
|
|
2488
|
-
class
|
|
2487
|
+
}, ei = "modals";
|
|
2488
|
+
class si {
|
|
2489
2489
|
constructor(t, e) {
|
|
2490
2490
|
this.options = e, this.unsubscribe = [], this.container = t.createChild(this), this.container.register("widgetDOMElement", this.options.widgetDOMElement), this.container.register(
|
|
2491
2491
|
"triggerDOMElement",
|
|
@@ -2493,9 +2493,9 @@ class sn {
|
|
|
2493
2493
|
);
|
|
2494
2494
|
const s = this.container.get("$widget");
|
|
2495
2495
|
this.options.widgetDOMElement.classList.add("ace-widget"), this.options.widgetDOMElement.classList.add(`ace-widget_${s.name}`);
|
|
2496
|
-
const
|
|
2496
|
+
const n = t.get("widgetDOMElements") || [];
|
|
2497
2497
|
t.register("widgetDOMElements", [
|
|
2498
|
-
...
|
|
2498
|
+
...n,
|
|
2499
2499
|
this.options.widgetDOMElement
|
|
2500
2500
|
]);
|
|
2501
2501
|
}
|
|
@@ -2504,20 +2504,20 @@ class sn {
|
|
|
2504
2504
|
*/
|
|
2505
2505
|
render() {
|
|
2506
2506
|
const { widgetDOMElement: t, triggerDOMElement: e } = this.options, s = this.container.get("$widget");
|
|
2507
|
-
return t.getAttribute("data-rendered") === "true" ? Promise.resolve() : (e && this.options.triggerType === U.Badge &&
|
|
2507
|
+
return t.getAttribute("data-rendered") === "true" ? Promise.resolve() : (e && this.options.triggerType === U.Badge && xs(e), import("./render-DPn5L-ek.mjs").then((n) => n.default(this.container, t)).then(() => {
|
|
2508
2508
|
if (t.setAttribute("data-rendered", "true"), e && this.options.triggerType === U.Badge) {
|
|
2509
2509
|
const r = this.options.triggerOptions.openTooltip;
|
|
2510
|
-
|
|
2510
|
+
Le(e, r);
|
|
2511
2511
|
}
|
|
2512
2512
|
ts(this.container, t);
|
|
2513
|
-
const
|
|
2513
|
+
const n = this.container.get("$environment").widgets.all();
|
|
2514
2514
|
C(
|
|
2515
2515
|
this.container,
|
|
2516
|
-
|
|
2517
|
-
|
|
2516
|
+
ei,
|
|
2517
|
+
f.Session
|
|
2518
2518
|
).then((r) => {
|
|
2519
2519
|
r && r.forEach((o) => {
|
|
2520
|
-
|
|
2520
|
+
n.find(
|
|
2521
2521
|
(a) => a.name === o.name && a.state === "activated"
|
|
2522
2522
|
) && s.events.dispatch("widget:modal-opened", o);
|
|
2523
2523
|
});
|
|
@@ -2529,23 +2529,24 @@ class sn {
|
|
|
2529
2529
|
if (!e)
|
|
2530
2530
|
return;
|
|
2531
2531
|
e.getAttribute("role") || e.setAttribute("role", "button");
|
|
2532
|
-
const { name: s } = this.container.get("$widget"), { label:
|
|
2532
|
+
const { name: s } = this.container.get("$widget"), { label: n, symbol: r, ariaLabel: o, closedTooltip: a, openTooltip: h } = t, c = { closedTooltip: a, openTooltip: h };
|
|
2533
2533
|
this.options.triggerOptions = c;
|
|
2534
|
-
const
|
|
2535
|
-
label:
|
|
2534
|
+
const l = As(e, {
|
|
2535
|
+
label: n,
|
|
2536
|
+
symbol: r,
|
|
2536
2537
|
ariaLabel: o,
|
|
2537
2538
|
widgetName: s,
|
|
2538
2539
|
tooltip: a
|
|
2539
2540
|
});
|
|
2540
|
-
this.unsubscribe.push(
|
|
2541
|
+
this.unsubscribe.push(l);
|
|
2541
2542
|
}
|
|
2542
2543
|
async dispose() {
|
|
2543
|
-
var s,
|
|
2544
|
+
var s, n, r, o;
|
|
2544
2545
|
const { triggerDOMElement: t, widgetDOMElement: e } = this.options;
|
|
2545
2546
|
this.options.cachedOriginals.widgetDOMElement && e && ((s = e.parentNode) == null || s.replaceChild(
|
|
2546
2547
|
this.options.cachedOriginals.widgetDOMElement,
|
|
2547
2548
|
e
|
|
2548
|
-
)), this.options.cachedOriginals.triggerDOMElement && t && ((
|
|
2549
|
+
)), this.options.cachedOriginals.triggerDOMElement && t && ((n = t.parentNode) == null || n.replaceChild(
|
|
2549
2550
|
this.options.cachedOriginals.triggerDOMElement,
|
|
2550
2551
|
t
|
|
2551
2552
|
)), this.unsubscribe.forEach((a) => {
|
|
@@ -2553,9 +2554,9 @@ class sn {
|
|
|
2553
2554
|
}), (r = e.parentNode) == null || r.removeChild(e), (o = t == null ? void 0 : t.parentNode) == null || o.removeChild(t);
|
|
2554
2555
|
}
|
|
2555
2556
|
}
|
|
2556
|
-
const
|
|
2557
|
-
const t = { tags:
|
|
2558
|
-
return
|
|
2557
|
+
const dt = "changesets", ii = (i) => {
|
|
2558
|
+
const t = { tags: i.tags };
|
|
2559
|
+
return i.context && typeof i.context != "function" && (t.context = i.context), i.properties && typeof i.properties != "function" && (t.properties = i.properties), i.layout && typeof i.layout != "function" && (t.layout = i.layout), t;
|
|
2559
2560
|
};
|
|
2560
2561
|
class se {
|
|
2561
2562
|
constructor(t, e) {
|
|
@@ -2564,49 +2565,49 @@ class se {
|
|
|
2564
2565
|
static create(t) {
|
|
2565
2566
|
return S(
|
|
2566
2567
|
t,
|
|
2567
|
-
|
|
2568
|
-
|
|
2568
|
+
dt,
|
|
2569
|
+
m.Necessary,
|
|
2569
2570
|
{
|
|
2570
|
-
medium:
|
|
2571
|
+
medium: f.Local
|
|
2571
2572
|
}
|
|
2572
2573
|
).then(
|
|
2573
2574
|
(e) => new se(t, e)
|
|
2574
2575
|
);
|
|
2575
2576
|
}
|
|
2576
|
-
write(t, e, s,
|
|
2577
|
-
return
|
|
2577
|
+
write(t, e, s, n) {
|
|
2578
|
+
return E(this)(() => C(
|
|
2578
2579
|
this.container,
|
|
2579
|
-
|
|
2580
|
-
|
|
2580
|
+
dt,
|
|
2581
|
+
f.Local
|
|
2581
2582
|
).then((r = {}) => {
|
|
2582
2583
|
const { keys: o = [], items: a = {} } = r, h = o.indexOf(t);
|
|
2583
2584
|
return h > -1 && o.splice(h, 1), o.push(t), a[t] = {
|
|
2584
|
-
options:
|
|
2585
|
-
attributes:
|
|
2585
|
+
options: n,
|
|
2586
|
+
attributes: ii(s),
|
|
2586
2587
|
rules: e.rules
|
|
2587
2588
|
}, this.storageWriter({ keys: o, items: a });
|
|
2588
2589
|
}));
|
|
2589
2590
|
}
|
|
2590
2591
|
remove(t) {
|
|
2591
|
-
return
|
|
2592
|
+
return E(this)(() => C(
|
|
2592
2593
|
this.container,
|
|
2593
|
-
|
|
2594
|
-
|
|
2594
|
+
dt,
|
|
2595
|
+
f.Local
|
|
2595
2596
|
).then((e = {}) => {
|
|
2596
|
-
const { keys: s = [], items:
|
|
2597
|
+
const { keys: s = [], items: n = {} } = e, r = s.indexOf(t);
|
|
2597
2598
|
if (r > -1)
|
|
2598
|
-
return s.splice(r, 1), delete
|
|
2599
|
+
return s.splice(r, 1), delete n[t], this.storageWriter(e);
|
|
2599
2600
|
}));
|
|
2600
2601
|
}
|
|
2601
2602
|
load(t) {
|
|
2602
|
-
return
|
|
2603
|
+
return E(this)(() => C(
|
|
2603
2604
|
this.container,
|
|
2604
|
-
|
|
2605
|
-
|
|
2605
|
+
dt,
|
|
2606
|
+
f.Local
|
|
2606
2607
|
).then((e = {}) => {
|
|
2607
|
-
const { keys: s = [], items:
|
|
2608
|
+
const { keys: s = [], items: n = {} } = e;
|
|
2608
2609
|
s.forEach((r) => {
|
|
2609
|
-
const o =
|
|
2610
|
+
const o = n[r];
|
|
2610
2611
|
if (o) {
|
|
2611
2612
|
const { rules: a, attributes: h, options: c } = o;
|
|
2612
2613
|
t.write({
|
|
@@ -2619,21 +2620,21 @@ class se {
|
|
|
2619
2620
|
}));
|
|
2620
2621
|
}
|
|
2621
2622
|
}
|
|
2622
|
-
const
|
|
2623
|
-
const { container: t } =
|
|
2623
|
+
const ni = (i) => {
|
|
2624
|
+
const { container: t } = i;
|
|
2624
2625
|
return se.create(t).then(
|
|
2625
2626
|
(e) => {
|
|
2626
|
-
const s = t.get("$settings"),
|
|
2627
|
-
return
|
|
2627
|
+
const s = t.get("$settings"), n = { localStorage: e }, r = new nt(i, n), o = Pe(r, s);
|
|
2628
|
+
return i.events.subscribe(
|
|
2628
2629
|
"widget:state-change",
|
|
2629
2630
|
(a, h) => {
|
|
2630
|
-
h.state ===
|
|
2631
|
+
h.state === Ee.Deactivating && o();
|
|
2631
2632
|
}
|
|
2632
2633
|
), r;
|
|
2633
2634
|
}
|
|
2634
2635
|
);
|
|
2635
|
-
},
|
|
2636
|
-
class
|
|
2636
|
+
}, ri = (i) => Promise.resolve().then(() => $s).then(({ StorageProvider: t }) => new t()), oi = (i) => Promise.resolve().then(() => Kt).then(({ ActionResolver: t }) => new t(i)), ai = (i) => Promise.resolve().then(() => Kt).then(({ ComponentResolver: t }) => new t(i)), ci = (i) => Promise.resolve().then(() => Kt).then(() => ni(i.get("$widget"))), Ht = "$settings", zt = "open", be = "activeStickyWidget";
|
|
2637
|
+
class Ui extends Ze {
|
|
2637
2638
|
constructor(t) {
|
|
2638
2639
|
super(t), this.outlets = /* @__PURE__ */ new Map(), this.activated = void 0, this.subs = [], this.handleBootstrapping = (e) => {
|
|
2639
2640
|
const s = {
|
|
@@ -2641,31 +2642,31 @@ class jn extends Ze {
|
|
|
2641
2642
|
withRenderState: "storage"
|
|
2642
2643
|
/* Storage */
|
|
2643
2644
|
};
|
|
2644
|
-
this.container.get("settings").then((
|
|
2645
|
-
const { activate: r } =
|
|
2645
|
+
this.container.get("settings").then((n) => {
|
|
2646
|
+
const { activate: r } = n;
|
|
2646
2647
|
(typeof r > "u" || r === null || r === !0) && (this.activated = (this.activated || this.widget.activate()).then(
|
|
2647
2648
|
() => this.attach(s)
|
|
2648
2649
|
));
|
|
2649
2650
|
});
|
|
2650
2651
|
}, this.container.registerAsync(
|
|
2651
2652
|
"storage",
|
|
2652
|
-
() =>
|
|
2653
|
+
() => ri(this.container)
|
|
2653
2654
|
), this.container.registerFactory("settings", () => C(
|
|
2654
2655
|
this.container,
|
|
2655
2656
|
Ht,
|
|
2656
|
-
|
|
2657
|
+
f.Local
|
|
2657
2658
|
).then((e = {}) => ({
|
|
2658
2659
|
...this.container.get("$settings"),
|
|
2659
2660
|
...e
|
|
2660
2661
|
}))), Fe(this, "load", this.handleBootstrapping), this.container.registerAsync(
|
|
2661
2662
|
"componentResolver",
|
|
2662
|
-
() =>
|
|
2663
|
+
() => ai(this.container)
|
|
2663
2664
|
), this.container.registerAsync(
|
|
2664
2665
|
"actionResolver",
|
|
2665
|
-
() =>
|
|
2666
|
+
() => oi(this.container)
|
|
2666
2667
|
), this.container.register("matchMedia", window.matchMedia), this.container.registerAsync(
|
|
2667
2668
|
"components",
|
|
2668
|
-
() =>
|
|
2669
|
+
() => ci(this.container)
|
|
2669
2670
|
);
|
|
2670
2671
|
}
|
|
2671
2672
|
initialize() {
|
|
@@ -2674,12 +2675,12 @@ class jn extends Ze {
|
|
|
2674
2675
|
"components"
|
|
2675
2676
|
), e = this.container.get("csp");
|
|
2676
2677
|
return e && (window.webprovisionsEnvironmentVariables || (window.webprovisionsEnvironmentVariables = {}), window.webprovisionsEnvironmentVariables.cspNonce = e.nonce), Promise.all([t, this.container.get("settings")]).then(
|
|
2677
|
-
([{ actionResolver: s, components:
|
|
2678
|
+
([{ actionResolver: s, components: n }, r]) => (s.subscribe(
|
|
2678
2679
|
this.widget.name,
|
|
2679
|
-
(h, c,
|
|
2680
|
+
(h, c, l) => this.onAction(c, l)
|
|
2680
2681
|
), ((h) => {
|
|
2681
|
-
|
|
2682
|
-
|
|
2682
|
+
n.nodes.query({ type: "view" }).forEach((c) => {
|
|
2683
|
+
n.setSwitch(c, h);
|
|
2683
2684
|
});
|
|
2684
2685
|
})("index"), this.events.subscribe("widget:data-loaded", (h, { element: c }) => {
|
|
2685
2686
|
this.widget.container.get("seoConfiguration") && this.events.dispatch("widget:preloaded-replaced", {
|
|
@@ -2690,13 +2691,13 @@ class jn extends Ze {
|
|
|
2690
2691
|
}
|
|
2691
2692
|
attach(t = {}) {
|
|
2692
2693
|
return this.container.get("settings").then(async ({ trigger: e }) => {
|
|
2693
|
-
var
|
|
2694
|
+
var p, u;
|
|
2694
2695
|
const {
|
|
2695
2696
|
widgetDOMElement: s,
|
|
2696
|
-
key:
|
|
2697
|
+
key: n = it(),
|
|
2697
2698
|
triggerDOMElement: r,
|
|
2698
2699
|
withRenderState: o
|
|
2699
|
-
} = t, h = Ve(e) === U.Inline && ((r == null ? void 0 : r.childElementCount) || 0) > 0, c = await
|
|
2700
|
+
} = t, h = Ve(e) === U.Inline && ((r == null ? void 0 : r.childElementCount) || 0) > 0, c = await ti(
|
|
2700
2701
|
this.container,
|
|
2701
2702
|
this.widget.name,
|
|
2702
2703
|
s,
|
|
@@ -2705,33 +2706,33 @@ class jn extends Ze {
|
|
|
2705
2706
|
h
|
|
2706
2707
|
);
|
|
2707
2708
|
this.outlets.size < 1 && !o && this.setRenderState("unset");
|
|
2708
|
-
const
|
|
2709
|
-
const g = () =>
|
|
2709
|
+
const l = () => {
|
|
2710
|
+
const g = () => b.querySelectorAll("[data-loading=true]").length === 0, [b] = this.widget.container.get("widgetDOMElements"), A = (Pt, w) => {
|
|
2710
2711
|
g() && (c.callback && c.callback(), w.disconnect());
|
|
2711
2712
|
}, at = {
|
|
2712
2713
|
attributes: !0,
|
|
2713
2714
|
subtree: !0,
|
|
2714
2715
|
childList: !0
|
|
2715
2716
|
};
|
|
2716
|
-
g() && c.callback && c.callback(), new MutationObserver(A).observe(
|
|
2717
|
+
g() && c.callback && c.callback(), new MutationObserver(A).observe(b, at);
|
|
2717
2718
|
};
|
|
2718
2719
|
h && this.widget.container.getAsync("dataClient").then(({ events: g }) => {
|
|
2719
2720
|
g.subscribe(
|
|
2720
2721
|
"data-client:fetched",
|
|
2721
|
-
(
|
|
2722
|
-
A.unresolvedQueries === 0 &&
|
|
2722
|
+
(b, A) => {
|
|
2723
|
+
A.unresolvedQueries === 0 && l();
|
|
2723
2724
|
}
|
|
2724
2725
|
);
|
|
2725
2726
|
});
|
|
2726
|
-
const
|
|
2727
|
-
if (this.outlets.set(
|
|
2727
|
+
const d = this.getOrCreateViewOutlet(n, c);
|
|
2728
|
+
if (this.outlets.set(n, d), this.widget.events.dispatch("widget:attached", {}, { bubbles: !0 }), c.triggerType === U.Badge && e && ((p = c.triggerDOMElement) == null || p.setAttribute(
|
|
2728
2729
|
"aria-expanded",
|
|
2729
2730
|
"false"
|
|
2730
|
-
),
|
|
2731
|
+
), d == null || d.renderBadge(e)), c.triggerType !== U.Inline && ((u = c.triggerDOMElement) == null || u.addEventListener(
|
|
2731
2732
|
"click",
|
|
2732
2733
|
(g) => {
|
|
2733
|
-
g.preventDefault(), this.container.get("settings").then(({ trigger:
|
|
2734
|
-
|
|
2734
|
+
g.preventDefault(), this.container.get("settings").then(({ trigger: b }) => {
|
|
2735
|
+
d.render().then(() => this.renderState()).then((A) => b && b.action && b.action === "hide" ? A === _.open ? this.hide() : this.open() : A === _.open ? this.close() : this.open());
|
|
2735
2736
|
});
|
|
2736
2737
|
}
|
|
2737
2738
|
)), this.outlets.size > 1)
|
|
@@ -2778,7 +2779,7 @@ class jn extends Ze {
|
|
|
2778
2779
|
}
|
|
2779
2780
|
}
|
|
2780
2781
|
getOrCreateViewOutlet(t, e) {
|
|
2781
|
-
return this.outlets.has(t) ? this.outlets.get(t) : new
|
|
2782
|
+
return this.outlets.has(t) ? this.outlets.get(t) : new si(this.container, e);
|
|
2782
2783
|
}
|
|
2783
2784
|
render(t = {}) {
|
|
2784
2785
|
if (process.env.NODE_ENV !== "production" && console.warn(
|
|
@@ -2805,13 +2806,13 @@ class jn extends Ze {
|
|
|
2805
2806
|
S(
|
|
2806
2807
|
this.container,
|
|
2807
2808
|
Ht,
|
|
2808
|
-
|
|
2809
|
+
m.Necessary,
|
|
2809
2810
|
{
|
|
2810
|
-
medium:
|
|
2811
|
+
medium: f.Local
|
|
2811
2812
|
}
|
|
2812
2813
|
)
|
|
2813
|
-
]).then(([e, s]) => Promise.resolve(t(e)).then((
|
|
2814
|
-
const r = { ...e, ...
|
|
2814
|
+
]).then(([e, s]) => Promise.resolve(t(e)).then((n) => s(n).then(() => {
|
|
2815
|
+
const r = { ...e, ...n };
|
|
2815
2816
|
return this.widget.events.dispatch("widget:settings-updated", r), r;
|
|
2816
2817
|
})));
|
|
2817
2818
|
}
|
|
@@ -2819,8 +2820,8 @@ class jn extends Ze {
|
|
|
2819
2820
|
return S(
|
|
2820
2821
|
this.container,
|
|
2821
2822
|
Ht,
|
|
2822
|
-
|
|
2823
|
-
{ medium:
|
|
2823
|
+
m.Necessary,
|
|
2824
|
+
{ medium: f.Local }
|
|
2824
2825
|
).then((t) => t()).then(() => this.container.get("settings")).then((t) => {
|
|
2825
2826
|
this.widget.events.dispatch("widget:settings-updated", t);
|
|
2826
2827
|
});
|
|
@@ -2834,7 +2835,7 @@ class jn extends Ze {
|
|
|
2834
2835
|
return C(
|
|
2835
2836
|
this.container,
|
|
2836
2837
|
zt,
|
|
2837
|
-
|
|
2838
|
+
f.Session
|
|
2838
2839
|
).then((e = _.closed) => e);
|
|
2839
2840
|
}
|
|
2840
2841
|
hide() {
|
|
@@ -2867,9 +2868,9 @@ class jn extends Ze {
|
|
|
2867
2868
|
const s = t === "open" ? _.open : t === "close" ? _.closed : _.hidden;
|
|
2868
2869
|
return this.setRenderState(s).then(() => {
|
|
2869
2870
|
this.setTriggerState(s === _.open), s !== _.hidden ? s === _.open ? this.onOpen() : this.onClose() : this.outlets.forEach(
|
|
2870
|
-
(
|
|
2871
|
+
(n) => {
|
|
2871
2872
|
var r;
|
|
2872
|
-
return (r =
|
|
2873
|
+
return (r = n.options.triggerDOMElement) == null ? void 0 : r.setAttribute(
|
|
2873
2874
|
"aria-expanded",
|
|
2874
2875
|
"false"
|
|
2875
2876
|
);
|
|
@@ -2884,23 +2885,23 @@ class jn extends Ze {
|
|
|
2884
2885
|
S(
|
|
2885
2886
|
this.container,
|
|
2886
2887
|
zt,
|
|
2887
|
-
|
|
2888
|
+
m.Necessary,
|
|
2888
2889
|
{
|
|
2889
|
-
medium:
|
|
2890
|
+
medium: f.Session
|
|
2890
2891
|
}
|
|
2891
2892
|
),
|
|
2892
2893
|
S(
|
|
2893
2894
|
this.container,
|
|
2894
2895
|
zt,
|
|
2895
|
-
|
|
2896
|
+
m.Necessary,
|
|
2896
2897
|
{
|
|
2897
|
-
medium:
|
|
2898
|
+
medium: f.Local,
|
|
2898
2899
|
duration: { minutes: 5 }
|
|
2899
2900
|
}
|
|
2900
2901
|
),
|
|
2901
2902
|
e("renderState")
|
|
2902
|
-
]).then(([
|
|
2903
|
-
t === "unset" || !t ? (r(),
|
|
2903
|
+
]).then(([n, r, o]) => {
|
|
2904
|
+
t === "unset" || !t ? (r(), n()) : n(t), s.dispatch("widget:render-state-changed", {
|
|
2904
2905
|
previous: o,
|
|
2905
2906
|
next: t
|
|
2906
2907
|
});
|
|
@@ -2917,14 +2918,14 @@ class jn extends Ze {
|
|
|
2917
2918
|
onClose() {
|
|
2918
2919
|
const t = this.container.getManyAsync("components");
|
|
2919
2920
|
return this.container.get("settings").then((s) => {
|
|
2920
|
-
const { activate:
|
|
2921
|
-
return s.activate !==
|
|
2921
|
+
const { activate: n } = this.container.get("$settings");
|
|
2922
|
+
return s.activate !== n ? this.setSettings(() => Promise.resolve({ activate: n })) : Promise.resolve();
|
|
2922
2923
|
}).then(() => t).then(
|
|
2923
2924
|
({ components: s }) => {
|
|
2924
2925
|
this.outlets.forEach(
|
|
2925
|
-
(
|
|
2926
|
+
(n) => {
|
|
2926
2927
|
var r;
|
|
2927
|
-
return (r =
|
|
2928
|
+
return (r = n.options.triggerDOMElement) == null ? void 0 : r.setAttribute(
|
|
2928
2929
|
"aria-expanded",
|
|
2929
2930
|
"false"
|
|
2930
2931
|
);
|
|
@@ -2936,9 +2937,9 @@ class jn extends Ze {
|
|
|
2936
2937
|
setTriggerState(t) {
|
|
2937
2938
|
this.outlets.forEach((e) => {
|
|
2938
2939
|
const {
|
|
2939
|
-
options: { triggerDOMElement: s, triggerOptions:
|
|
2940
|
-
} = e, { openTooltip: r, closedTooltip: o } =
|
|
2941
|
-
s && (t ?
|
|
2940
|
+
options: { triggerDOMElement: s, triggerOptions: n }
|
|
2941
|
+
} = e, { openTooltip: r, closedTooltip: o } = n || {};
|
|
2942
|
+
s && (t ? Le(s, r) : Es(s, o));
|
|
2942
2943
|
});
|
|
2943
2944
|
}
|
|
2944
2945
|
deactivate() {
|
|
@@ -2946,14 +2947,14 @@ class jn extends Ze {
|
|
|
2946
2947
|
const t = [];
|
|
2947
2948
|
return this.outlets.forEach((e) => t.push(e.dispose())), C(
|
|
2948
2949
|
this.container,
|
|
2949
|
-
|
|
2950
|
-
|
|
2950
|
+
be,
|
|
2951
|
+
f.Local
|
|
2951
2952
|
).then((e) => e === this.widget.name ? S(
|
|
2952
2953
|
this.container,
|
|
2953
|
-
|
|
2954
|
-
|
|
2954
|
+
be,
|
|
2955
|
+
m.Necessary,
|
|
2955
2956
|
{
|
|
2956
|
-
medium:
|
|
2957
|
+
medium: f.Local,
|
|
2957
2958
|
scope: q.Implementation
|
|
2958
2959
|
}
|
|
2959
2960
|
).then((s) => s()).then(() => Promise.all(t)) : Promise.all(t));
|
|
@@ -2980,13 +2981,13 @@ let He = class extends Event {
|
|
|
2980
2981
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2981
2982
|
*/
|
|
2982
2983
|
let we = class {
|
|
2983
|
-
constructor(t, e, s,
|
|
2984
|
+
constructor(t, e, s, n) {
|
|
2984
2985
|
if (this.subscribe = !1, this.provided = !1, this.value = void 0, this.t = (r, o) => {
|
|
2985
2986
|
this.unsubscribe && (this.unsubscribe !== o && (this.provided = !1, this.unsubscribe()), this.subscribe || this.unsubscribe()), this.value = r, this.host.requestUpdate(), this.provided && !this.subscribe || (this.provided = !0, this.callback && this.callback(r, o)), this.unsubscribe = o;
|
|
2986
2987
|
}, this.host = t, e.context !== void 0) {
|
|
2987
2988
|
const r = e;
|
|
2988
2989
|
this.context = r.context, this.callback = r.callback, this.subscribe = r.subscribe ?? !1;
|
|
2989
|
-
} else this.context = e, this.callback = s, this.subscribe =
|
|
2990
|
+
} else this.context = e, this.callback = s, this.subscribe = n ?? !1;
|
|
2990
2991
|
this.host.addController(this);
|
|
2991
2992
|
}
|
|
2992
2993
|
hostConnected() {
|
|
@@ -3004,7 +3005,7 @@ let we = class {
|
|
|
3004
3005
|
* Copyright 2021 Google LLC
|
|
3005
3006
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3006
3007
|
*/
|
|
3007
|
-
class
|
|
3008
|
+
class hi {
|
|
3008
3009
|
get value() {
|
|
3009
3010
|
return this.o;
|
|
3010
3011
|
}
|
|
@@ -3025,8 +3026,8 @@ class dn {
|
|
|
3025
3026
|
this.subscriptions.has(t) || this.subscriptions.set(t, { disposer: () => {
|
|
3026
3027
|
this.subscriptions.delete(t);
|
|
3027
3028
|
}, consumerHost: e });
|
|
3028
|
-
const { disposer:
|
|
3029
|
-
t(this.value,
|
|
3029
|
+
const { disposer: n } = this.subscriptions.get(t);
|
|
3030
|
+
t(this.value, n);
|
|
3030
3031
|
}
|
|
3031
3032
|
clearCallbacks() {
|
|
3032
3033
|
this.subscriptions.clear();
|
|
@@ -3037,14 +3038,14 @@ class dn {
|
|
|
3037
3038
|
* Copyright 2021 Google LLC
|
|
3038
3039
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3039
3040
|
*/
|
|
3040
|
-
class
|
|
3041
|
+
class li extends Event {
|
|
3041
3042
|
constructor(t) {
|
|
3042
3043
|
super("context-provider", { bubbles: !0, composed: !0 }), this.context = t;
|
|
3043
3044
|
}
|
|
3044
3045
|
}
|
|
3045
|
-
class F extends
|
|
3046
|
+
class F extends hi {
|
|
3046
3047
|
constructor(t, e, s) {
|
|
3047
|
-
var
|
|
3048
|
+
var n, r;
|
|
3048
3049
|
super(e.context !== void 0 ? e.initialValue : s), this.onContextRequest = (o) => {
|
|
3049
3050
|
const a = o.composedPath()[0];
|
|
3050
3051
|
o.context === this.context && a !== this.host && (o.stopPropagation(), this.addCallback(o.callback, a, o.subscribe));
|
|
@@ -3052,15 +3053,15 @@ class F extends dn {
|
|
|
3052
3053
|
const a = o.composedPath()[0];
|
|
3053
3054
|
if (o.context !== this.context || a === this.host) return;
|
|
3054
3055
|
const h = /* @__PURE__ */ new Set();
|
|
3055
|
-
for (const [c, { consumerHost:
|
|
3056
|
+
for (const [c, { consumerHost: l }] of this.subscriptions) h.has(c) || (h.add(c), l.dispatchEvent(new He(this.context, c, !0)));
|
|
3056
3057
|
o.stopPropagation();
|
|
3057
|
-
}, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), (r = (
|
|
3058
|
+
}, this.host = t, e.context !== void 0 ? this.context = e.context : this.context = e, this.attachListeners(), (r = (n = this.host).addController) == null || r.call(n, this);
|
|
3058
3059
|
}
|
|
3059
3060
|
attachListeners() {
|
|
3060
3061
|
this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
|
|
3061
3062
|
}
|
|
3062
3063
|
hostConnected() {
|
|
3063
|
-
this.host.dispatchEvent(new
|
|
3064
|
+
this.host.dispatchEvent(new li(this.context));
|
|
3064
3065
|
}
|
|
3065
3066
|
}
|
|
3066
3067
|
/**
|
|
@@ -3068,21 +3069,21 @@ class F extends dn {
|
|
|
3068
3069
|
* Copyright 2022 Google LLC
|
|
3069
3070
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3070
3071
|
*/
|
|
3071
|
-
function
|
|
3072
|
+
function di({ context: i, subscribe: t }) {
|
|
3072
3073
|
return (e, s) => {
|
|
3073
3074
|
typeof s == "object" ? s.addInitializer(function() {
|
|
3074
|
-
new we(this, { context:
|
|
3075
|
-
e.set.call(this,
|
|
3075
|
+
new we(this, { context: i, callback: (n) => {
|
|
3076
|
+
e.set.call(this, n);
|
|
3076
3077
|
}, subscribe: t });
|
|
3077
|
-
}) : e.constructor.addInitializer((
|
|
3078
|
-
new we(
|
|
3079
|
-
|
|
3078
|
+
}) : e.constructor.addInitializer((n) => {
|
|
3079
|
+
new we(n, { context: i, callback: (r) => {
|
|
3080
|
+
n[s] = r;
|
|
3080
3081
|
}, subscribe: t });
|
|
3081
3082
|
});
|
|
3082
3083
|
};
|
|
3083
3084
|
}
|
|
3084
|
-
const
|
|
3085
|
-
class
|
|
3085
|
+
const pi = "children", ui = "descriptor", gi = "container", mi = "context", fi = "layout", yi = "properties";
|
|
3086
|
+
class vi {
|
|
3086
3087
|
constructor(t) {
|
|
3087
3088
|
(this.host = t).addController(this);
|
|
3088
3089
|
}
|
|
@@ -3099,43 +3100,43 @@ class vn {
|
|
|
3099
3100
|
async dispatch(t, e) {
|
|
3100
3101
|
if (!this._container || !this._descriptor)
|
|
3101
3102
|
return;
|
|
3102
|
-
const s = await
|
|
3103
|
+
const s = await nt.getInstance(
|
|
3103
3104
|
this._container
|
|
3104
|
-
),
|
|
3105
|
+
), n = new W(s).withId(
|
|
3105
3106
|
this._descriptor.id
|
|
3106
3107
|
);
|
|
3107
3108
|
await s.actions(
|
|
3108
|
-
|
|
3109
|
-
this._descriptor.type ||
|
|
3109
|
+
n,
|
|
3110
|
+
this._descriptor.type || it()
|
|
3110
3111
|
).dispatch(t, e);
|
|
3111
3112
|
}
|
|
3112
3113
|
}
|
|
3113
|
-
const
|
|
3114
|
-
const e =
|
|
3115
|
-
let s = {},
|
|
3116
|
-
Array.isArray(e) ? (
|
|
3114
|
+
const bi = async (i, t) => {
|
|
3115
|
+
const e = i.properties().provider;
|
|
3116
|
+
let s = {}, n = "";
|
|
3117
|
+
Array.isArray(e) ? (n = e[0], s = e[1]) : n = e || "";
|
|
3117
3118
|
const r = await t.getAsync(
|
|
3118
|
-
|
|
3119
|
+
n
|
|
3119
3120
|
);
|
|
3120
3121
|
if (!r)
|
|
3121
3122
|
throw new Error("No provider defined in ListComponent");
|
|
3122
|
-
return r.applyComponentNodeSettings(
|
|
3123
|
-
},
|
|
3124
|
-
const { provider: e, settings: s = {} } = await
|
|
3123
|
+
return r.applyComponentNodeSettings(i.node.id, s), { provider: r, settings: s };
|
|
3124
|
+
}, Hi = async (i, t) => {
|
|
3125
|
+
const { provider: e, settings: s = {} } = await bi(i, t);
|
|
3125
3126
|
return {
|
|
3126
|
-
addResource: (
|
|
3127
|
-
getData: (
|
|
3127
|
+
addResource: (n, r) => e.addResource(n, r),
|
|
3128
|
+
getData: (n, r) => e.getData(n, r, s)
|
|
3128
3129
|
};
|
|
3129
3130
|
};
|
|
3130
|
-
class
|
|
3131
|
+
class wi {
|
|
3131
3132
|
constructor(t) {
|
|
3132
3133
|
this.container = t, this.resources = /* @__PURE__ */ new Map(), this.nodeConfiguration = /* @__PURE__ */ new Map();
|
|
3133
3134
|
}
|
|
3134
3135
|
async getData(t, e, s) {
|
|
3135
|
-
const
|
|
3136
|
-
if (!
|
|
3136
|
+
const n = this.resources.get(t);
|
|
3137
|
+
if (!n)
|
|
3137
3138
|
throw new Error(`Unable to get EntityProvider for "${t}"`);
|
|
3138
|
-
return await
|
|
3139
|
+
return await n.query(e, s);
|
|
3139
3140
|
}
|
|
3140
3141
|
addResource(t, e) {
|
|
3141
3142
|
this.resources.set(t, e);
|
|
@@ -3144,94 +3145,94 @@ class $n {
|
|
|
3144
3145
|
this.nodeConfiguration.set(t, e);
|
|
3145
3146
|
}
|
|
3146
3147
|
}
|
|
3147
|
-
const $e = (
|
|
3148
|
-
title:
|
|
3149
|
-
id:
|
|
3148
|
+
const $e = (i) => ({
|
|
3149
|
+
title: i.Title,
|
|
3150
|
+
id: i.Id.toString()
|
|
3150
3151
|
});
|
|
3151
|
-
class
|
|
3152
|
+
class $i extends wi {
|
|
3152
3153
|
constructor(t) {
|
|
3153
3154
|
super(t), this.addResource("item", {
|
|
3154
3155
|
query: async (e, s) => {
|
|
3155
|
-
const
|
|
3156
|
-
`${a}/guides/${
|
|
3156
|
+
const n = e.itemId, r = "78aacc09-ae6f-5485-5ca3-9dacebb95825", o = t.get("$widget").name, a = s.projection || "", c = await (await fetch(
|
|
3157
|
+
`${a}/guides/${n}?client=${r}&funnel=${o}&site=%2F%2Fdemo.humany.cc%2Fadmin%2Finterfaces&phrase=&connectionId=&p.LastGuideId=2857`
|
|
3157
3158
|
)).json();
|
|
3158
3159
|
return c ? $e(c) : null;
|
|
3159
3160
|
}
|
|
3160
3161
|
}), this.addResource("items", {
|
|
3161
3162
|
query: async (e, s) => {
|
|
3162
|
-
const
|
|
3163
|
-
`${o}/guides?client=${
|
|
3163
|
+
const n = "", r = t.get("$widget").name, o = s.projection || "", d = await (await fetch(
|
|
3164
|
+
`${o}/guides?client=${n}&funnel=${r}&site=&phrase=&skip=0&take=10&sorting.type=popularity&sorting.direction=descending`
|
|
3164
3165
|
)).json();
|
|
3165
3166
|
return {
|
|
3166
|
-
items: (
|
|
3167
|
-
totalItems: (
|
|
3167
|
+
items: (d.Matches || []).map((p) => $e(p)),
|
|
3168
|
+
totalItems: (d == null ? void 0 : d.TotalMatches) || 0
|
|
3168
3169
|
};
|
|
3169
3170
|
}
|
|
3170
3171
|
});
|
|
3171
3172
|
}
|
|
3172
3173
|
}
|
|
3173
|
-
const
|
|
3174
|
-
|
|
3175
|
-
},
|
|
3176
|
-
}), t,
|
|
3174
|
+
const zi = async (i) => {
|
|
3175
|
+
i.registerAsync("guideProvider", () => new $i(i));
|
|
3176
|
+
}, Bi = (i, t, e, s, n) => i.getAsync("componentResolver").then((r) => (r.registerComponent(t, e), ke(i, t, s || (() => {
|
|
3177
|
+
}), t, n))), _i = (i) => {
|
|
3177
3178
|
const t = {};
|
|
3178
|
-
return Object.keys(
|
|
3179
|
-
e.indexOf("css-") > -1 && (t[e] =
|
|
3179
|
+
return Object.keys(i).forEach((e) => {
|
|
3180
|
+
e.indexOf("css-") > -1 && (t[e] = i[e]);
|
|
3180
3181
|
}), t;
|
|
3181
|
-
},
|
|
3182
|
-
const e =
|
|
3183
|
-
Object.entries(e).forEach(([s,
|
|
3184
|
-
|
|
3182
|
+
}, Ai = (i, t) => {
|
|
3183
|
+
const e = _i(t);
|
|
3184
|
+
Object.entries(e).forEach(([s, n]) => {
|
|
3185
|
+
i.style.setProperty(s.replace("css-", ""), n);
|
|
3185
3186
|
});
|
|
3186
3187
|
};
|
|
3187
|
-
var
|
|
3188
|
-
for (var
|
|
3189
|
-
(o =
|
|
3190
|
-
return
|
|
3188
|
+
var Ei = Object.defineProperty, I = (i, t, e, s) => {
|
|
3189
|
+
for (var n = void 0, r = i.length - 1, o; r >= 0; r--)
|
|
3190
|
+
(o = i[r]) && (n = o(t, e, n) || n);
|
|
3191
|
+
return n && Ei(t, e, n), n;
|
|
3191
3192
|
};
|
|
3192
|
-
const
|
|
3193
|
-
const e = class e extends
|
|
3193
|
+
const Wi = (i) => {
|
|
3194
|
+
const e = class e extends i {
|
|
3194
3195
|
constructor() {
|
|
3195
3196
|
super(...arguments), this.entry = "", this._descriptorProvider = new F(
|
|
3196
3197
|
this,
|
|
3197
|
-
|
|
3198
|
+
ui,
|
|
3198
3199
|
void 0
|
|
3199
|
-
), this._childrenProvider = new F(this,
|
|
3200
|
+
), this._childrenProvider = new F(this, pi, []), this._propertiesProvider = new F(this, yi, {}), this._contextProvider = new F(this, mi, {}), this._layoutProvider = new F(this, fi, {}), this.actions = new vi(this), this.context = {}, this.layout = {}, this.properties = {};
|
|
3200
3201
|
}
|
|
3201
3202
|
connectedCallback() {
|
|
3202
|
-
super.connectedCallback(), this.container && (this.actions.setContainer(this.container),
|
|
3203
|
-
async (
|
|
3203
|
+
super.connectedCallback(), this.container && (this.actions.setContainer(this.container), nt.getInstance(this.container).then(
|
|
3204
|
+
async (n) => {
|
|
3204
3205
|
var o, a;
|
|
3205
|
-
const r =
|
|
3206
|
+
const r = n.nodes.get(this.entry);
|
|
3206
3207
|
if (r) {
|
|
3207
|
-
this._propertyChangeListener =
|
|
3208
|
+
this._propertyChangeListener = n.events.subscribe(
|
|
3208
3209
|
"components:properties-changed",
|
|
3209
|
-
(
|
|
3210
|
-
r.id ===
|
|
3210
|
+
(p, u) => {
|
|
3211
|
+
r.id === u.node.id && this._setProperties(u.node.attributes.properties);
|
|
3211
3212
|
}
|
|
3212
|
-
), this._contextChangeListener =
|
|
3213
|
+
), this._contextChangeListener = n.events.subscribe(
|
|
3213
3214
|
"components:context-changed",
|
|
3214
|
-
(
|
|
3215
|
-
r.id ===
|
|
3215
|
+
(p, u) => {
|
|
3216
|
+
r.id === u.node.id && this._setContext(u.node.attributes.context);
|
|
3216
3217
|
}
|
|
3217
|
-
), this._layoutChangeListener =
|
|
3218
|
+
), this._layoutChangeListener = n.events.subscribe(
|
|
3218
3219
|
"components:layout-changed",
|
|
3219
|
-
(
|
|
3220
|
-
r.id ===
|
|
3220
|
+
(p, u) => {
|
|
3221
|
+
r.id === u.node.id && this._setLayout(u.node.attributes.layout);
|
|
3221
3222
|
}
|
|
3222
3223
|
);
|
|
3223
3224
|
const h = "default";
|
|
3224
3225
|
this._unmountNode = r.mount(this.container), this._setDescriptor(Wt(r, h)), this._setProperties(r.attributes.properties), this._setContext(r.attributes.context), this._setLayout(this.layout);
|
|
3225
|
-
const c = r.getChildren(h).map((
|
|
3226
|
+
const c = r.getChildren(h).map((p) => Wt(p));
|
|
3226
3227
|
this._childrenProvider.setValue(c);
|
|
3227
|
-
const
|
|
3228
|
+
const l = await this.container.getAsync("componentResolver");
|
|
3228
3229
|
if (((o = this.descriptor) == null ? void 0 : o.type) === "area")
|
|
3229
3230
|
return;
|
|
3230
|
-
const
|
|
3231
|
+
const d = l.getComponent(
|
|
3231
3232
|
((a = this.descriptor) == null ? void 0 : a.type) || ""
|
|
3232
3233
|
);
|
|
3233
|
-
|
|
3234
|
-
this.component =
|
|
3234
|
+
d.then && d.then((p) => {
|
|
3235
|
+
this.component = p.default;
|
|
3235
3236
|
});
|
|
3236
3237
|
}
|
|
3237
3238
|
}
|
|
@@ -3244,23 +3245,23 @@ const qn = (n) => {
|
|
|
3244
3245
|
this.container && this.actions.setContainer(this.container), this.renderRoot.host.style.setProperty(
|
|
3245
3246
|
"--width",
|
|
3246
3247
|
this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
|
|
3247
|
-
),
|
|
3248
|
+
), Ai(this.renderRoot.host, this.properties);
|
|
3248
3249
|
}
|
|
3249
|
-
_setProperties(
|
|
3250
|
-
this._propertiesProvider.setValue(
|
|
3250
|
+
_setProperties(n) {
|
|
3251
|
+
this._propertiesProvider.setValue(n), this.properties = n;
|
|
3251
3252
|
}
|
|
3252
|
-
_setContext(
|
|
3253
|
-
this._contextProvider.setValue(
|
|
3253
|
+
_setContext(n) {
|
|
3254
|
+
this._contextProvider.setValue(n), this.context = n;
|
|
3254
3255
|
}
|
|
3255
|
-
_setLayout(
|
|
3256
|
-
this._layoutProvider.setValue(
|
|
3256
|
+
_setLayout(n) {
|
|
3257
|
+
this._layoutProvider.setValue(n), this.layout = n;
|
|
3257
3258
|
}
|
|
3258
|
-
_setDescriptor(
|
|
3259
|
-
this.descriptor =
|
|
3259
|
+
_setDescriptor(n) {
|
|
3260
|
+
this.descriptor = n, this._descriptorProvider.setValue(n), this.actions.setDescriptor(n);
|
|
3260
3261
|
}
|
|
3261
3262
|
};
|
|
3262
3263
|
e.styles = [
|
|
3263
|
-
|
|
3264
|
+
i.styles ?? [],
|
|
3264
3265
|
Ie`
|
|
3265
3266
|
:host {
|
|
3266
3267
|
font-family: var(--font-family);
|
|
@@ -3277,7 +3278,7 @@ const qn = (n) => {
|
|
|
3277
3278
|
];
|
|
3278
3279
|
let t = e;
|
|
3279
3280
|
return I([
|
|
3280
|
-
|
|
3281
|
+
di({ context: gi }),
|
|
3281
3282
|
st({ attribute: !1 })
|
|
3282
3283
|
], t.prototype, "container"), I([
|
|
3283
3284
|
st()
|
|
@@ -3294,32 +3295,32 @@ const qn = (n) => {
|
|
|
3294
3295
|
], t.prototype, "properties"), t;
|
|
3295
3296
|
};
|
|
3296
3297
|
export {
|
|
3297
|
-
|
|
3298
|
-
|
|
3298
|
+
vi as A,
|
|
3299
|
+
wi as D,
|
|
3299
3300
|
y as E,
|
|
3300
|
-
|
|
3301
|
+
zi as G,
|
|
3301
3302
|
V as T,
|
|
3302
|
-
|
|
3303
|
+
Wi as W,
|
|
3303
3304
|
F as a,
|
|
3304
|
-
|
|
3305
|
-
|
|
3305
|
+
nt as b,
|
|
3306
|
+
gi as c,
|
|
3306
3307
|
Ie as d,
|
|
3307
3308
|
Ks as e,
|
|
3308
3309
|
k as f,
|
|
3309
|
-
|
|
3310
|
-
|
|
3310
|
+
Ai as g,
|
|
3311
|
+
Ui as h,
|
|
3311
3312
|
Gs as i,
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3313
|
+
pi as j,
|
|
3314
|
+
ui as k,
|
|
3315
|
+
mi as l,
|
|
3315
3316
|
Zs as m,
|
|
3316
3317
|
st as n,
|
|
3317
3318
|
_ as o,
|
|
3318
|
-
|
|
3319
|
-
|
|
3319
|
+
fi as p,
|
|
3320
|
+
yi as q,
|
|
3320
3321
|
Z as r,
|
|
3321
|
-
|
|
3322
|
+
Hi as s,
|
|
3322
3323
|
Fs as t,
|
|
3323
|
-
|
|
3324
|
+
Bi as u,
|
|
3324
3325
|
ht as x
|
|
3325
3326
|
};
|