@telia-ace/widget-components-widget-header-flamingo 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-3485efe5.js +2625 -0
- package/dist/index-3485efe5.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/widget-header-f97a5dcf.js +648 -0
- package/dist/widget-header-f97a5dcf.js.map +1 -0
- package/dist/widget-header.d.ts +3 -3
- package/dist/widget-header.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/index-afbfee89.js +0 -2311
- package/dist/index-afbfee89.js.map +0 -1
- package/dist/widget-header-290db4ff.js +0 -756
- package/dist/widget-header-290db4ff.js.map +0 -1
|
@@ -0,0 +1,2625 @@
|
|
|
1
|
+
var Be = Object.defineProperty, Je = Object.defineProperties, qe = Object.getOwnPropertyDescriptors, Gt = Object.getOwnPropertySymbols, Fe = Object.getPrototypeOf, Ke = Object.prototype.hasOwnProperty, Ze = Object.prototype.propertyIsEnumerable, Xe = Reflect.get, te = (e, t, s) => t in e ? Be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, Ut = (e, t) => {
|
|
2
|
+
for (var s in t || (t = {}))
|
|
3
|
+
Ke.call(t, s) && te(e, s, t[s]);
|
|
4
|
+
if (Gt)
|
|
5
|
+
for (var s of Gt(t))
|
|
6
|
+
Ze.call(t, s) && te(e, s, t[s]);
|
|
7
|
+
return e;
|
|
8
|
+
}, Ht = (e, t) => Je(e, qe(t)), Qe = (e, t, s) => Xe(Fe(e), s, t), U = (e, t, s) => new Promise((i, r) => {
|
|
9
|
+
var o = (c) => {
|
|
10
|
+
try {
|
|
11
|
+
a(s.next(c));
|
|
12
|
+
} catch (l) {
|
|
13
|
+
r(l);
|
|
14
|
+
}
|
|
15
|
+
}, n = (c) => {
|
|
16
|
+
try {
|
|
17
|
+
a(s.throw(c));
|
|
18
|
+
} catch (l) {
|
|
19
|
+
r(l);
|
|
20
|
+
}
|
|
21
|
+
}, a = (c) => c.done ? i(c.value) : Promise.resolve(c.value).then(o, n);
|
|
22
|
+
a((s = s.apply(e, t)).next());
|
|
23
|
+
});
|
|
24
|
+
const vt = (e, t, s, ...i) => {
|
|
25
|
+
const r = `[${e.get("$environment").name || "webprovisions"}] ${s}`;
|
|
26
|
+
switch (t) {
|
|
27
|
+
case "info":
|
|
28
|
+
console.info(r, ...i);
|
|
29
|
+
break;
|
|
30
|
+
case "warning":
|
|
31
|
+
console.warn(r, ...i);
|
|
32
|
+
break;
|
|
33
|
+
case "error":
|
|
34
|
+
console.error(r, ...i);
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
}, Ye = (e) => {
|
|
38
|
+
const t = e.container || e;
|
|
39
|
+
return {
|
|
40
|
+
info: (s, ...i) => vt(t, "info", s, ...i),
|
|
41
|
+
warn: (s, ...i) => vt(t, "warning", s, ...i),
|
|
42
|
+
error: (s, ...i) => vt(t, "error", s, ...i)
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
var st = /* @__PURE__ */ ((e) => (e.Implementation = "implementation", e.Widget = "widget", e))(st || {}), k = /* @__PURE__ */ ((e) => (e.Pre = "pre", e.Post = "post", e))(k || {});
|
|
46
|
+
const Ge = (e, t, s, i) => {
|
|
47
|
+
try {
|
|
48
|
+
const r = new t(s, i);
|
|
49
|
+
return {
|
|
50
|
+
name: e,
|
|
51
|
+
invoke: (o, n) => {
|
|
52
|
+
let a;
|
|
53
|
+
return r[o] && (a = r[o].call(r, n)), Promise.resolve(a);
|
|
54
|
+
},
|
|
55
|
+
getInstance: () => r
|
|
56
|
+
};
|
|
57
|
+
} catch (r) {
|
|
58
|
+
if (r.message && r.message.indexOf("is not a constructor") >= 0)
|
|
59
|
+
return {
|
|
60
|
+
name: e,
|
|
61
|
+
invoke: (o) => {
|
|
62
|
+
let n;
|
|
63
|
+
return o === "initialize" && (n = t(s, i)), Promise.resolve(n);
|
|
64
|
+
},
|
|
65
|
+
getInstance: () => t
|
|
66
|
+
};
|
|
67
|
+
throw r;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
function ee(e, t) {
|
|
71
|
+
return typeof e == "undefined" ? t : e;
|
|
72
|
+
}
|
|
73
|
+
let ts = class {
|
|
74
|
+
constructor(e = {}) {
|
|
75
|
+
this.part = e;
|
|
76
|
+
}
|
|
77
|
+
createCommand(e, t, s) {
|
|
78
|
+
let i;
|
|
79
|
+
typeof t == "function" ? i = {
|
|
80
|
+
scope: st.Widget,
|
|
81
|
+
stage: k.Post,
|
|
82
|
+
defaultArgs: void 0,
|
|
83
|
+
handlerResolver: t
|
|
84
|
+
} : i = {
|
|
85
|
+
scope: ee(t.scope, st.Widget),
|
|
86
|
+
stage: ee(t.stage, k.Post),
|
|
87
|
+
defaultArgs: t.defaultArgs,
|
|
88
|
+
handlerResolver: s
|
|
89
|
+
};
|
|
90
|
+
let r = this.part;
|
|
91
|
+
const o = e.split(".");
|
|
92
|
+
return o.forEach((n, a) => {
|
|
93
|
+
a === o.length - 1 ? r[n] || (r[n] = () => i) : r = this.part[n] = this.part[n] || {};
|
|
94
|
+
}), this;
|
|
95
|
+
}
|
|
96
|
+
get() {
|
|
97
|
+
return this.part;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
const Mt = (e) => {
|
|
101
|
+
const t = new ts({});
|
|
102
|
+
return e(t), t.get();
|
|
103
|
+
};
|
|
104
|
+
Mt((e) => {
|
|
105
|
+
e.createCommand(
|
|
106
|
+
"types.register",
|
|
107
|
+
{ scope: st.Implementation, stage: k.Pre },
|
|
108
|
+
(t) => (s, i) => {
|
|
109
|
+
t.container.get("$types")[s] = i;
|
|
110
|
+
}
|
|
111
|
+
).createCommand(
|
|
112
|
+
"type",
|
|
113
|
+
{ stage: k.Pre },
|
|
114
|
+
(t) => (s) => {
|
|
115
|
+
t.container.register("$type", s);
|
|
116
|
+
}
|
|
117
|
+
).createCommand(
|
|
118
|
+
"settings",
|
|
119
|
+
{ stage: k.Pre, defaultArgs: [null] },
|
|
120
|
+
(t) => (s) => {
|
|
121
|
+
t.events.dispatch(
|
|
122
|
+
"settings:change",
|
|
123
|
+
s,
|
|
124
|
+
{ bubbles: !0 }
|
|
125
|
+
), t.container.register("$settings", s);
|
|
126
|
+
}
|
|
127
|
+
).createCommand(
|
|
128
|
+
"plugin",
|
|
129
|
+
{ stage: k.Pre },
|
|
130
|
+
(t) => (s, i, r) => {
|
|
131
|
+
const { container: o } = t;
|
|
132
|
+
let n = null, a = s, c = i;
|
|
133
|
+
typeof s == "string" && (n = s, a = i, c = r);
|
|
134
|
+
const l = (h) => {
|
|
135
|
+
const { transformPluginSettings: d } = t.container.get("$environmentOptions"), u = d ? d(
|
|
136
|
+
c || {},
|
|
137
|
+
n,
|
|
138
|
+
t.container,
|
|
139
|
+
a
|
|
140
|
+
) : i;
|
|
141
|
+
try {
|
|
142
|
+
const p = Ge(
|
|
143
|
+
n,
|
|
144
|
+
a,
|
|
145
|
+
o,
|
|
146
|
+
u
|
|
147
|
+
);
|
|
148
|
+
o.get("$plugins").push(p), h && p.invoke("initialize", null);
|
|
149
|
+
} catch (p) {
|
|
150
|
+
Ye(t).warn("Error when initializing plugin", p);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
t.container.get("$instance") ? l(!0) : t.events.subscribeOnce("widget:instance-created", () => l(!1));
|
|
154
|
+
}
|
|
155
|
+
).createCommand(
|
|
156
|
+
"container.register",
|
|
157
|
+
(t) => (s, i) => {
|
|
158
|
+
t.container.register(s, i);
|
|
159
|
+
}
|
|
160
|
+
).createCommand(
|
|
161
|
+
"container.registerAsync",
|
|
162
|
+
(t) => (s, i) => {
|
|
163
|
+
t.container.registerAsync(s, i);
|
|
164
|
+
}
|
|
165
|
+
).createCommand(
|
|
166
|
+
"container.registerFactory",
|
|
167
|
+
(t) => (s, i) => {
|
|
168
|
+
t.container.registerFactory(s, i);
|
|
169
|
+
}
|
|
170
|
+
).createCommand(
|
|
171
|
+
"container.touch",
|
|
172
|
+
(t) => (s, i) => {
|
|
173
|
+
t.container.touch(s, i);
|
|
174
|
+
}
|
|
175
|
+
).createCommand(
|
|
176
|
+
"csp",
|
|
177
|
+
{},
|
|
178
|
+
(t) => (s) => {
|
|
179
|
+
t.container.register("csp", s);
|
|
180
|
+
}
|
|
181
|
+
);
|
|
182
|
+
});
|
|
183
|
+
const ct = (e, t, ...s) => typeof t == "string" ? e(`[humany] ${t}`, ...s) : e(t, ...s), B = class {
|
|
184
|
+
constructor() {
|
|
185
|
+
this.keys = [], this.log = (e, ...t) => this.lookup(e, () => B.log(...t)), this.warn = (e, ...t) => this.lookup(e, () => B.warn(...t)), this.error = (e, ...t) => this.lookup(e, () => B.error(...t)), this.info = (e, ...t) => this.lookup(e, () => B.info(...t));
|
|
186
|
+
}
|
|
187
|
+
lookup(e, t) {
|
|
188
|
+
this.keys.indexOf(e) === -1 && (this.keys.push(e), t());
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
let v = B;
|
|
192
|
+
v.log = (...e) => ct(console.log, ...e);
|
|
193
|
+
v.warn = (...e) => ct(console.warn, ...e);
|
|
194
|
+
v.error = (...e) => ct(console.error, ...e);
|
|
195
|
+
v.info = (...e) => ct(console.info, ...e);
|
|
196
|
+
const Ce = (e) => {
|
|
197
|
+
let t = {}, s, i;
|
|
198
|
+
if (typeof e != "object" || e === null)
|
|
199
|
+
return e;
|
|
200
|
+
t = Array.isArray(e) ? [] : {};
|
|
201
|
+
for (i in e)
|
|
202
|
+
s = e[i], t[i] = typeof s == "object" && s !== null ? Ce(s) : s;
|
|
203
|
+
return t;
|
|
204
|
+
}, es = Ce;
|
|
205
|
+
function se(e) {
|
|
206
|
+
let t = 0;
|
|
207
|
+
if (e.length === 0)
|
|
208
|
+
return t.toString();
|
|
209
|
+
for (let s = 0; s < e.length; s++) {
|
|
210
|
+
const i = e.charCodeAt(s);
|
|
211
|
+
t = (t << 5) - t + i, t = t & t;
|
|
212
|
+
}
|
|
213
|
+
return t.toString();
|
|
214
|
+
}
|
|
215
|
+
let ss = class {
|
|
216
|
+
constructor(e, t) {
|
|
217
|
+
this.lockWarningTime = e, this.lockErrorTime = t, this.tasks = [], this.current = Promise.resolve(), this.next = this.next.bind(this);
|
|
218
|
+
}
|
|
219
|
+
add(e, t, s, i) {
|
|
220
|
+
this.tasks.push({ task: e, resolve: t, reject: s, done: i }), this.next();
|
|
221
|
+
}
|
|
222
|
+
next() {
|
|
223
|
+
this.current = this.current.then(() => {
|
|
224
|
+
const e = this.tasks.shift();
|
|
225
|
+
if (e) {
|
|
226
|
+
let t;
|
|
227
|
+
const s = setTimeout(() => {
|
|
228
|
+
process.env.NODE_ENV !== "production" && v.warn(
|
|
229
|
+
`A lock has exceeded ${this.lockWarningTime} ms. Waiting additional ${this.lockErrorTime} ms before rejecting the task.`,
|
|
230
|
+
e
|
|
231
|
+
), t = setTimeout(() => {
|
|
232
|
+
e.reject("lock timeout exceeded");
|
|
233
|
+
}, this.lockErrorTime);
|
|
234
|
+
}, this.lockWarningTime), i = Promise.resolve(e.task()).then((r) => (clearTimeout(s), clearTimeout(t), r));
|
|
235
|
+
return Promise.resolve(i).then(this.next).then(
|
|
236
|
+
() => i.then((r) => {
|
|
237
|
+
e.done(), e.resolve(r);
|
|
238
|
+
})
|
|
239
|
+
).catch((r) => (e.done(), e.reject(r), this.next()));
|
|
240
|
+
}
|
|
241
|
+
return Promise.resolve();
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
const Q = /* @__PURE__ */ new WeakMap();
|
|
246
|
+
function ht(e, t = 5e3, s = 1e3) {
|
|
247
|
+
return Q.has(e) || Q.set(e, new ss(t, s)), (i) => new Promise((r, o) => {
|
|
248
|
+
const n = Q.get(e);
|
|
249
|
+
n.add(i, r, o, () => {
|
|
250
|
+
n.tasks.length || Q.delete(e);
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
const A = () => Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
|
|
255
|
+
function lt() {
|
|
256
|
+
return A() + A() + "-" + A() + "-" + A() + "-" + A() + "-" + A() + A() + A();
|
|
257
|
+
}
|
|
258
|
+
var is = Object.defineProperty, rs = Object.defineProperties, os = Object.getOwnPropertyDescriptors, ie = Object.getOwnPropertySymbols, ns = Object.prototype.hasOwnProperty, as = Object.prototype.propertyIsEnumerable, re = (e, t, s) => t in e ? is(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, cs = (e, t) => {
|
|
259
|
+
for (var s in t || (t = {}))
|
|
260
|
+
ns.call(t, s) && re(e, s, t[s]);
|
|
261
|
+
if (ie)
|
|
262
|
+
for (var s of ie(t))
|
|
263
|
+
as.call(t, s) && re(e, s, t[s]);
|
|
264
|
+
return e;
|
|
265
|
+
}, hs = (e, t) => rs(e, os(t));
|
|
266
|
+
const ls = (e) => {
|
|
267
|
+
const t = [];
|
|
268
|
+
return [
|
|
269
|
+
(s, i) => {
|
|
270
|
+
t.push(e.subscribe(s, i));
|
|
271
|
+
},
|
|
272
|
+
() => {
|
|
273
|
+
t.forEach((s) => {
|
|
274
|
+
s();
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
];
|
|
278
|
+
};
|
|
279
|
+
let dt = class {
|
|
280
|
+
constructor(e, t = []) {
|
|
281
|
+
this.platform = e, this.rules = t;
|
|
282
|
+
}
|
|
283
|
+
match(e) {
|
|
284
|
+
return this.rules.every((t) => !(t.id && t.id !== e.id || t.type && t.type !== e.type));
|
|
285
|
+
}
|
|
286
|
+
ofType(e) {
|
|
287
|
+
return this.rules.push({ type: e }), this;
|
|
288
|
+
}
|
|
289
|
+
withId(e) {
|
|
290
|
+
return this.rules.push({ id: e }), this;
|
|
291
|
+
}
|
|
292
|
+
select() {
|
|
293
|
+
return new ds(this.platform, this);
|
|
294
|
+
}
|
|
295
|
+
}, Ee = class {
|
|
296
|
+
constructor(e, t, s) {
|
|
297
|
+
this.platform = e, this.node = t, this.actions = new zt(
|
|
298
|
+
e,
|
|
299
|
+
new dt(e).withId(t.id),
|
|
300
|
+
s
|
|
301
|
+
);
|
|
302
|
+
const [i, r] = ls(this.platform.events);
|
|
303
|
+
this.subscribe = i, this.unsubscribe = r;
|
|
304
|
+
}
|
|
305
|
+
properties(e) {
|
|
306
|
+
return e && this.node.touchProperties((t) => e(t)), this.node.attributes.properties;
|
|
307
|
+
}
|
|
308
|
+
context(e) {
|
|
309
|
+
return e && this.subscribe("components:context-changed", (t, { node: s }) => {
|
|
310
|
+
s === this.node && e(this.node.attributes.context);
|
|
311
|
+
}), this.node.attributes.context;
|
|
312
|
+
}
|
|
313
|
+
layout(e) {
|
|
314
|
+
return e && this.subscribe("components:layout-changed", (t, { node: s }) => {
|
|
315
|
+
s === this.node && e(this.node.attributes.layout);
|
|
316
|
+
}), this.node.attributes.layout;
|
|
317
|
+
}
|
|
318
|
+
writeProperties(e, t) {
|
|
319
|
+
this.node.writeProperties(e, t);
|
|
320
|
+
}
|
|
321
|
+
writeContext(e, t) {
|
|
322
|
+
this.node.writeProperties(e, t);
|
|
323
|
+
}
|
|
324
|
+
writeLayout(e, t) {
|
|
325
|
+
this.node.writeLayout(e, t);
|
|
326
|
+
}
|
|
327
|
+
dispose() {
|
|
328
|
+
this.unsubscribe(), this.actions.dispose();
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
class ds {
|
|
332
|
+
constructor(t, s, i = !0) {
|
|
333
|
+
this.platform = t, this.target = s, this.clearOnDispose = i, this.removes = [], this.actions = new zt(this.platform, this.target);
|
|
334
|
+
}
|
|
335
|
+
writeProperties(t, s) {
|
|
336
|
+
this.removes.push(
|
|
337
|
+
this.platform.write({
|
|
338
|
+
options: s,
|
|
339
|
+
attributes: { properties: t },
|
|
340
|
+
target: this.target,
|
|
341
|
+
removable: this.clearOnDispose
|
|
342
|
+
})
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
writeContext(t, s) {
|
|
346
|
+
this.removes.push(
|
|
347
|
+
this.platform.write({
|
|
348
|
+
options: s,
|
|
349
|
+
attributes: { context: t },
|
|
350
|
+
target: this.target,
|
|
351
|
+
removable: this.clearOnDispose
|
|
352
|
+
})
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
writeLayout(t, s) {
|
|
356
|
+
this.removes.push(
|
|
357
|
+
this.platform.write({
|
|
358
|
+
options: s,
|
|
359
|
+
attributes: { layout: t },
|
|
360
|
+
target: this.target,
|
|
361
|
+
removable: this.clearOnDispose
|
|
362
|
+
})
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
dispose() {
|
|
366
|
+
this.removes.forEach((t) => {
|
|
367
|
+
t();
|
|
368
|
+
}), this.actions.dispose();
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
const us = (e, t, s) => {
|
|
372
|
+
const i = e.concat(), r = (o, n, a) => {
|
|
373
|
+
let c = !0;
|
|
374
|
+
if (i.length) {
|
|
375
|
+
const l = i.shift(), h = (d, u) => (c = !1, r(d, Object.assign({}, n, u), a));
|
|
376
|
+
return Promise.resolve(l(o, h, a)).then((d) => hs(cs({}, d), {
|
|
377
|
+
cancelled: c
|
|
378
|
+
}));
|
|
379
|
+
}
|
|
380
|
+
return Promise.resolve({ data: o, cancelled: !1, options: n });
|
|
381
|
+
};
|
|
382
|
+
return r(t, {}, s);
|
|
383
|
+
};
|
|
384
|
+
let zt = class {
|
|
385
|
+
constructor(e, t, s) {
|
|
386
|
+
this.platform = e, this.target = t, this.ns = s, this.subscriptions = [], this.create = this.create.bind(this);
|
|
387
|
+
}
|
|
388
|
+
create(e, t = () => {
|
|
389
|
+
}) {
|
|
390
|
+
const s = {
|
|
391
|
+
key: e,
|
|
392
|
+
fn: t,
|
|
393
|
+
target: this.target,
|
|
394
|
+
ns: this.ns
|
|
395
|
+
};
|
|
396
|
+
this.platform.actionsState.handlers.push(s);
|
|
397
|
+
const i = () => {
|
|
398
|
+
const r = this.platform.actionsState.handlers.indexOf(s);
|
|
399
|
+
r > -1 && this.platform.actionsState.handlers.splice(r, 1);
|
|
400
|
+
};
|
|
401
|
+
return this.subscriptions.push(i), i;
|
|
402
|
+
}
|
|
403
|
+
dispatch(e, t) {
|
|
404
|
+
const s = this.platform.nodes.all.concat(
|
|
405
|
+
this.platform.nodes.detached
|
|
406
|
+
), i = {}, r = this.platform.actionsState.handlers.filter(
|
|
407
|
+
(o) => o.key === e && (!o.ns || !this.ns || o.ns === this.ns)
|
|
408
|
+
);
|
|
409
|
+
return Promise.all(
|
|
410
|
+
r.map((o) => {
|
|
411
|
+
const n = s.filter(
|
|
412
|
+
(c) => o.target.match(c) && this.target.match(c)
|
|
413
|
+
), a = this.platform.actionsState.watchers.filter((c) => c.key === e && (!c.ns || !this.ns || c.ns === this.ns) && n.some((l) => c.target.match(l))).map((c) => c.fn);
|
|
414
|
+
return Promise.all(
|
|
415
|
+
n.map((c) => {
|
|
416
|
+
const l = new Ee(
|
|
417
|
+
this.platform,
|
|
418
|
+
c,
|
|
419
|
+
this.ns
|
|
420
|
+
);
|
|
421
|
+
return us(a, t, l).then((h) => {
|
|
422
|
+
const { data: d = {}, options: u, cancelled: p } = h;
|
|
423
|
+
return Promise.resolve(
|
|
424
|
+
p ? {} : o.fn(d, u, l)
|
|
425
|
+
).then((b) => {
|
|
426
|
+
i[c.id] = b;
|
|
427
|
+
});
|
|
428
|
+
});
|
|
429
|
+
})
|
|
430
|
+
);
|
|
431
|
+
})
|
|
432
|
+
).then(() => i);
|
|
433
|
+
}
|
|
434
|
+
watch(e, t) {
|
|
435
|
+
let s = e, i = this.ns;
|
|
436
|
+
const r = e.split(".");
|
|
437
|
+
r.length > 1 && (i = r[0], s = r.splice(1).join("."));
|
|
438
|
+
const o = {
|
|
439
|
+
fn: t,
|
|
440
|
+
target: this.target,
|
|
441
|
+
key: s,
|
|
442
|
+
ns: i
|
|
443
|
+
};
|
|
444
|
+
this.platform.actionsState.watchers.push(o);
|
|
445
|
+
const n = () => {
|
|
446
|
+
const a = this.platform.actionsState.watchers.indexOf(o);
|
|
447
|
+
a > -1 && this.platform.actionsState.watchers.splice(a, 1);
|
|
448
|
+
};
|
|
449
|
+
return this.subscriptions.push(n), n;
|
|
450
|
+
}
|
|
451
|
+
dispose() {
|
|
452
|
+
this.subscriptions.forEach((e) => e());
|
|
453
|
+
}
|
|
454
|
+
};
|
|
455
|
+
Mt((e) => {
|
|
456
|
+
e.createCommand("components", (t) => (s) => {
|
|
457
|
+
t.events.subscribeOnce("components:platform-created", (i, { platform: r }) => {
|
|
458
|
+
s.handlers && s.handlers.forEach(([o, n]) => {
|
|
459
|
+
r.addComponentHandler(o, n);
|
|
460
|
+
});
|
|
461
|
+
});
|
|
462
|
+
});
|
|
463
|
+
});
|
|
464
|
+
let oe = class {
|
|
465
|
+
constructor(e, t) {
|
|
466
|
+
this.events = e, this.tags = [], this.children = {}, this.changesets = [], this.mountCount = 0, this.id = lt(), this.type = t, this.attributes = {
|
|
467
|
+
context: {},
|
|
468
|
+
properties: {},
|
|
469
|
+
layout: {},
|
|
470
|
+
tags: []
|
|
471
|
+
}, this.writeLayout({ size: "full", indent: 0 });
|
|
472
|
+
}
|
|
473
|
+
mount(e, t) {
|
|
474
|
+
let s = e.get("mounted-nodes");
|
|
475
|
+
return s || (s = /* @__PURE__ */ new Map(), e.register("mounted-nodes", s)), s.has(this) ? (process.env.NODE_ENV !== "production" && v.error("Trying to mount an already mounted component node.", this), () => {
|
|
476
|
+
}) : (this.events.dispatch("components:node-mounted", { node: this }), this.mountCount === 0 && (this.mountCount = this.mountCount + 1, this.events.dispatch("components:node-enter", { node: this })), () => {
|
|
477
|
+
s.delete(this), this.events.dispatch("components:node-unmounted", { node: this }), this.mountCount = this.mountCount - 1, this.mountCount === 0 && this.events.dispatch("components:node-exit", { node: this });
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
appendChild(e, t = "default") {
|
|
481
|
+
if (e.parent) {
|
|
482
|
+
if (e.parent === this)
|
|
483
|
+
return;
|
|
484
|
+
e.parent.removeChild(e);
|
|
485
|
+
}
|
|
486
|
+
e.parent = this, this.children[t] || (this.children[t] = []), this.children[t].push(e), this.events.dispatch("components:node-appended", { node: e });
|
|
487
|
+
}
|
|
488
|
+
prependChild(e, t = "default") {
|
|
489
|
+
if (e.parent) {
|
|
490
|
+
if (e.parent === this)
|
|
491
|
+
return;
|
|
492
|
+
e.parent.removeChild(e);
|
|
493
|
+
}
|
|
494
|
+
e.parent = this, this.children[t] || (this.children[t] = []), this.children[t].unshift(e), this.events.dispatch("components:node-appended", { node: e });
|
|
495
|
+
}
|
|
496
|
+
touchProperties(e, t = {}, s) {
|
|
497
|
+
const i = [{ properties: e }, t];
|
|
498
|
+
return this.changesets.push(i), this.events.dispatch("components:set-properties", { node: this }), () => {
|
|
499
|
+
if (s) {
|
|
500
|
+
const r = this.changesets.indexOf(i);
|
|
501
|
+
r > -1 && (this.changesets.splice(r, 1), this.events.dispatch("components:set-properties", { node: this }));
|
|
502
|
+
}
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
writeProperties(e, t = {}, s) {
|
|
506
|
+
const i = [{ properties: e }, t];
|
|
507
|
+
return this.changesets.push(i), this.events.dispatch("components:set-properties", { node: this }), () => {
|
|
508
|
+
if (s) {
|
|
509
|
+
const r = this.changesets.indexOf(i);
|
|
510
|
+
r > -1 && (this.changesets.splice(r, 1), this.events.dispatch("components:set-properties", { node: this }));
|
|
511
|
+
}
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
writeLayout(e, t = {}, s) {
|
|
515
|
+
const i = [{ layout: e }, t];
|
|
516
|
+
return this.changesets.push(i), this.events.dispatch("components:set-layout", { node: this }), () => {
|
|
517
|
+
if (!s)
|
|
518
|
+
return;
|
|
519
|
+
const r = this.changesets.indexOf(i);
|
|
520
|
+
r > -1 && (this.changesets.splice(r, 1), this.events.dispatch("components:set-layout", { node: this }));
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
writeContext(e, t = {}, s) {
|
|
524
|
+
const i = [{ context: e }, t];
|
|
525
|
+
return this.changesets.push(i), this.events.dispatch("components:set-context", { node: this }), () => {
|
|
526
|
+
if (!s)
|
|
527
|
+
return;
|
|
528
|
+
const r = this.changesets.indexOf(i);
|
|
529
|
+
r > -1 && (this.changesets.splice(r, 1), this.events.dispatch("components:set-context", { node: this }));
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
getChildren(e = "default") {
|
|
533
|
+
const t = this.children[e] || [];
|
|
534
|
+
return t.reduce((s, i, r) => {
|
|
535
|
+
const { order: o = r } = i.attributes.layout;
|
|
536
|
+
return s[o] ? s.splice(o, 0, i) : s[o] = i, s;
|
|
537
|
+
}, Array(t.length));
|
|
538
|
+
}
|
|
539
|
+
remove() {
|
|
540
|
+
this.parent && this.parent.removeChild(this);
|
|
541
|
+
}
|
|
542
|
+
removeChild(e) {
|
|
543
|
+
Object.keys(this.children).forEach((t) => {
|
|
544
|
+
const s = this.children[t], i = s.indexOf(e);
|
|
545
|
+
i > -1 && (s.splice(i, 1), this.events.dispatch("components:node-removed", { node: e, parentNode: this }));
|
|
546
|
+
}), delete e.parent;
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
const Oe = (e, t, s) => {
|
|
550
|
+
for (let i = 0, r = e.length; i < r && s(e[i]) !== !0; i++) {
|
|
551
|
+
const o = t[e[i].id] || "default", n = e[i].getChildren(o);
|
|
552
|
+
Oe(n, t, s);
|
|
553
|
+
}
|
|
554
|
+
}, Vt = (e, t, s) => {
|
|
555
|
+
if (s(e) !== !0) {
|
|
556
|
+
const i = t[e.id] || "default", r = e.children[i];
|
|
557
|
+
Oe(r, t, s);
|
|
558
|
+
}
|
|
559
|
+
}, yt = (e, t) => {
|
|
560
|
+
const s = [];
|
|
561
|
+
return Vt(e, t, (i) => {
|
|
562
|
+
s.push(i);
|
|
563
|
+
}), s;
|
|
564
|
+
}, ps = (e, t, s) => {
|
|
565
|
+
let i;
|
|
566
|
+
return Vt(e, t, (r) => {
|
|
567
|
+
if (s(r))
|
|
568
|
+
return i = r, !0;
|
|
569
|
+
}), i;
|
|
570
|
+
};
|
|
571
|
+
let gs = class {
|
|
572
|
+
constructor(e, t, s) {
|
|
573
|
+
this.root = e, this.switches = t, this.all = [], this.visible = [], this.detached = [], s.subscribe("components:node-appended", (i, r) => {
|
|
574
|
+
this.all.push(r.node), this.visible = yt(e, t);
|
|
575
|
+
}), s.subscribe("components:node-removed", (i, r) => {
|
|
576
|
+
let o = this.all.indexOf(r.node);
|
|
577
|
+
o > -1 && this.all.splice(o, 1), o = this.visible.indexOf(r.node), o > -1 && this.visible.splice(o, 1), this.visible = yt(e, t);
|
|
578
|
+
}), s.subscribe("components:node-switched", (i, r) => {
|
|
579
|
+
this.visible = yt(e, t);
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
query(e = {}) {
|
|
583
|
+
const t = [];
|
|
584
|
+
return Vt(this.root, this.switches, (s) => {
|
|
585
|
+
Object.keys(e).every((i) => e[i] === s[i]) && t.push(s);
|
|
586
|
+
}), t;
|
|
587
|
+
}
|
|
588
|
+
get(e) {
|
|
589
|
+
return ps(this.root, this.switches, (t) => t.id === e) || this.detached.find((t) => t.id === e);
|
|
590
|
+
}
|
|
591
|
+
}, ms = class {
|
|
592
|
+
constructor() {
|
|
593
|
+
this.handlers = /* @__PURE__ */ new Map();
|
|
594
|
+
}
|
|
595
|
+
add(e, t) {
|
|
596
|
+
this.handlers.set(e, t);
|
|
597
|
+
}
|
|
598
|
+
get(e) {
|
|
599
|
+
return this.handlers.get(e);
|
|
600
|
+
}
|
|
601
|
+
};
|
|
602
|
+
const fs = (e) => {
|
|
603
|
+
let t = e, s = 0;
|
|
604
|
+
for (; t.parent; )
|
|
605
|
+
s = s + 1, t = t.parent;
|
|
606
|
+
return s;
|
|
607
|
+
}, vs = (e) => e.map(([t, s]) => [fs(t), t, s]).sort(([t], [s]) => t - s).map(([, t, s]) => [t, s]), bt = (e) => e instanceof Date ? !1 : e && typeof e == "object" && !Array.isArray(e), $ = (e, ...t) => {
|
|
608
|
+
if (!t.length)
|
|
609
|
+
return e;
|
|
610
|
+
const s = t.shift();
|
|
611
|
+
if (bt(e) && bt(s))
|
|
612
|
+
for (const i in s)
|
|
613
|
+
bt(s[i]) ? (e[i] || Object.assign(e, { [i]: {} }), $(e[i], s[i])) : Object.assign(e, { [i]: s[i] });
|
|
614
|
+
return $(e, ...t);
|
|
615
|
+
}, ys = (e, t) => !e || e === "all" ? !0 : e.some((s) => t.indexOf(s) > -1), bs = (e, t) => {
|
|
616
|
+
let s = [], i = [], r;
|
|
617
|
+
const o = () => {
|
|
618
|
+
process.env.NODE_ENV !== "production" && console.time("state-processor.flush");
|
|
619
|
+
const a = /* @__PURE__ */ new Map(), c = vs(s.map((h, d) => [h, i[d]])), l = (h, d) => {
|
|
620
|
+
var u;
|
|
621
|
+
const p = a.get(h) || {}, b = d.context && !p.context, x = d.properties && !p.properties, mt = d.layout && !p.layout;
|
|
622
|
+
a.set(h, {
|
|
623
|
+
context: p.context || b,
|
|
624
|
+
properties: p.properties || x,
|
|
625
|
+
layout: p.layout || mt
|
|
626
|
+
}), x && (h.attributes.properties = {}), mt && (h.attributes.layout = {}), b && (h.attributes.context = $({}, (u = h.parent) == null ? void 0 : u.attributes.context));
|
|
627
|
+
const Xt = [], Qt = [], Yt = [];
|
|
628
|
+
if (h.changesets.forEach((w) => {
|
|
629
|
+
const [y, ft] = w;
|
|
630
|
+
ys(ft.breakpoints, e.breakpoints) && (x && (typeof y.properties == "function" ? Xt.push(
|
|
631
|
+
y.properties
|
|
632
|
+
) : $(h.attributes.properties, y.properties)), mt && (typeof y.layout == "function" ? Qt.push(y.layout) : $(h.attributes.layout, y.layout)), b && (typeof y.context == "function" ? Yt.push(y.context) : $(h.attributes.context, y.context)));
|
|
633
|
+
}), Xt.forEach((w) => {
|
|
634
|
+
$(h.attributes.properties, w(h.attributes.properties));
|
|
635
|
+
}), Qt.forEach((w) => {
|
|
636
|
+
$(h.attributes.layout, w(h.attributes.layout));
|
|
637
|
+
}), Yt.forEach((w) => {
|
|
638
|
+
$(h.attributes.context, w(h.attributes.context));
|
|
639
|
+
}), b || d.recursive) {
|
|
640
|
+
const w = e.getBranch(h), y = d.recursive ? d : {
|
|
641
|
+
context: !!b
|
|
642
|
+
};
|
|
643
|
+
h.getChildren(w).forEach((ft) => {
|
|
644
|
+
l(ft, y);
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
};
|
|
648
|
+
process.env.NODE_ENV !== "production" && console.timeEnd("state-processor.flush"), c.forEach(([h, d]) => {
|
|
649
|
+
l(h, d);
|
|
650
|
+
}), s = [], i = [], t(a);
|
|
651
|
+
}, n = () => {
|
|
652
|
+
clearTimeout(r), r = setTimeout(o, 0);
|
|
653
|
+
};
|
|
654
|
+
return (a, c) => {
|
|
655
|
+
const l = s.indexOf(a);
|
|
656
|
+
if (l > -1) {
|
|
657
|
+
const h = i[l];
|
|
658
|
+
return c.context && (h.context = !0), c.properties && (h.properties = !0), c.layout && (h.layout = !0), c.recursive && (h.recursive = !0), n();
|
|
659
|
+
}
|
|
660
|
+
return s.push(a), i.push(c), n();
|
|
661
|
+
};
|
|
662
|
+
};
|
|
663
|
+
let Wt = class {
|
|
664
|
+
constructor(e, t = {}) {
|
|
665
|
+
this.providers = t, this.breakpoints = [], this.actionsState = { handlers: [], watchers: [] }, this.switches = {}, this.changesets = [], this.subscriptions = [], this.customComponentHandler = new ms(), this.events = e.events.createChild(this);
|
|
666
|
+
const s = new oe(this.events, "root");
|
|
667
|
+
s.name = `root-${e.name}`, this.nodes = new gs(s, this.switches, this.events);
|
|
668
|
+
const i = this.processNode = bs(this, (r) => {
|
|
669
|
+
const o = Array.from(r.keys());
|
|
670
|
+
process.env.NODE_ENV !== "production" && console.info(`STATE PROCESSOR: ${o.length} node(s) processed:
|
|
671
|
+
${o.map(
|
|
672
|
+
(n) => `${n.name || "<no name>"} (${n.id})
|
|
673
|
+
`
|
|
674
|
+
)}`), o.forEach((n) => {
|
|
675
|
+
const a = r.get(n);
|
|
676
|
+
n.parent && n.parent.type === "root" && this.events.dispatch("components:root-children-changed", { node: n }), a != null && a.context && this.events.dispatch("components:context-changed", { node: n }), a != null && a.properties && this.events.dispatch("components:properties-changed", { node: n }), a != null && a.layout && this.events.dispatch("components:layout-changed", { node: n });
|
|
677
|
+
}), this.events.dispatch("components:component-model-initialized", {}, { bubbles: !0 });
|
|
678
|
+
});
|
|
679
|
+
Promise.all(
|
|
680
|
+
Object.keys(t).map((r) => t[r].load(this))
|
|
681
|
+
), this.subscriptions.push(
|
|
682
|
+
this.events.subscribe(
|
|
683
|
+
"components:node-appended",
|
|
684
|
+
(r, o) => {
|
|
685
|
+
const { node: n } = o;
|
|
686
|
+
this.changesets.forEach((a) => {
|
|
687
|
+
const { changeset: c, target: l, removes: h } = a, [d, u] = c;
|
|
688
|
+
l.match(o.node) && (d.properties && h.push(n.writeProperties(d.properties, u)), d.context && h.push(n.writeContext(d.context, u)), d.layout && h.push(n.writeLayout(d.layout, u)));
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
)
|
|
692
|
+
), this.subscriptions.push(
|
|
693
|
+
this.events.subscribe(
|
|
694
|
+
"components:node-appended",
|
|
695
|
+
(r, o) => {
|
|
696
|
+
i(o.node, { properties: !0, context: !0 });
|
|
697
|
+
}
|
|
698
|
+
)
|
|
699
|
+
), this.subscriptions.push(
|
|
700
|
+
this.events.subscribe(
|
|
701
|
+
"components:set-properties",
|
|
702
|
+
(r, o) => {
|
|
703
|
+
i(o.node, { properties: !0 });
|
|
704
|
+
}
|
|
705
|
+
)
|
|
706
|
+
), this.subscriptions.push(
|
|
707
|
+
this.events.subscribe(
|
|
708
|
+
"components:set-context",
|
|
709
|
+
(r, o) => {
|
|
710
|
+
i(o.node, { properties: !0, context: !0 });
|
|
711
|
+
}
|
|
712
|
+
)
|
|
713
|
+
), this.subscriptions.push(
|
|
714
|
+
this.events.subscribe(
|
|
715
|
+
"components:set-indent",
|
|
716
|
+
(r, o) => {
|
|
717
|
+
i(o.node, { layout: !0 });
|
|
718
|
+
}
|
|
719
|
+
)
|
|
720
|
+
), this.subscriptions.push(
|
|
721
|
+
this.events.subscribe(
|
|
722
|
+
"components:set-layout",
|
|
723
|
+
(r, o) => {
|
|
724
|
+
i(o.node, { layout: !0 });
|
|
725
|
+
}
|
|
726
|
+
)
|
|
727
|
+
), this.subscriptions.push(
|
|
728
|
+
this.events.subscribe("components:node-switched", (r, { node: o, branch: n }) => {
|
|
729
|
+
i(o, {
|
|
730
|
+
layout: !0,
|
|
731
|
+
recursive: !0,
|
|
732
|
+
properties: !0,
|
|
733
|
+
context: !0
|
|
734
|
+
});
|
|
735
|
+
})
|
|
736
|
+
), this.subscriptions.push(
|
|
737
|
+
this.events.subscribe("components:node-removed", (r, { parentNode: o }) => {
|
|
738
|
+
i(o, { properties: !0 });
|
|
739
|
+
})
|
|
740
|
+
), this.events.parent && this.events.parent.dispatch("components:platform-created", { platform: this });
|
|
741
|
+
}
|
|
742
|
+
static getInstance(e) {
|
|
743
|
+
return e.getAsync("components");
|
|
744
|
+
}
|
|
745
|
+
addBreakpoint(e) {
|
|
746
|
+
this.breakpoints.indexOf(e) === -1 && (this.breakpoints.push(e), this.processNode(this.nodes.root, {
|
|
747
|
+
context: !0,
|
|
748
|
+
properties: !0,
|
|
749
|
+
layout: !0,
|
|
750
|
+
recursive: !0
|
|
751
|
+
}));
|
|
752
|
+
}
|
|
753
|
+
removeBreakpoint(e) {
|
|
754
|
+
const t = this.breakpoints.indexOf(e);
|
|
755
|
+
t > -1 && (this.breakpoints.splice(t, 1), this.processNode(this.nodes.root, {
|
|
756
|
+
context: !0,
|
|
757
|
+
properties: !0,
|
|
758
|
+
layout: !0,
|
|
759
|
+
recursive: !0
|
|
760
|
+
}));
|
|
761
|
+
}
|
|
762
|
+
setSwitch(e, t) {
|
|
763
|
+
this.switches[e.id] = t, this.events.dispatch("components:node-switched", { node: e, branch: t });
|
|
764
|
+
}
|
|
765
|
+
getBranch(e) {
|
|
766
|
+
return this.switches[e.id];
|
|
767
|
+
}
|
|
768
|
+
/**
|
|
769
|
+
* Creates a `ComponentNode` of the specified type.
|
|
770
|
+
* @param type Type of node.
|
|
771
|
+
*/
|
|
772
|
+
createNode(e, t = {}) {
|
|
773
|
+
const s = new oe(this.events, e);
|
|
774
|
+
return t.detached && this.nodes.detached.push(s), s;
|
|
775
|
+
}
|
|
776
|
+
components() {
|
|
777
|
+
return new dt(this);
|
|
778
|
+
}
|
|
779
|
+
actions(e, t) {
|
|
780
|
+
return new zt(this, e, t);
|
|
781
|
+
}
|
|
782
|
+
write(e) {
|
|
783
|
+
const { provider: t, target: s, attributes: i, options: r = {}, removable: o } = e, n = e.key || lt(), a = { changeset: [i, r], target: s, removes: [] };
|
|
784
|
+
if (t) {
|
|
785
|
+
const c = this.providers[t];
|
|
786
|
+
c.write(n, s, i, r), a.removes.push(() => {
|
|
787
|
+
c.remove(n);
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
return this.changesets.push(a), this.nodes.all.forEach((c) => {
|
|
791
|
+
if (s.match(c)) {
|
|
792
|
+
let l = () => {
|
|
793
|
+
};
|
|
794
|
+
i.properties && (l = c.writeProperties(i.properties, r, o)), i.context && (l = c.writeContext(i.context, r, o)), i.layout && (l = c.writeContext(i.layout, r, o)), a.removes.push(l);
|
|
795
|
+
}
|
|
796
|
+
}), () => {
|
|
797
|
+
if (o) {
|
|
798
|
+
a.removes.forEach((l) => l());
|
|
799
|
+
const c = this.changesets.indexOf(a);
|
|
800
|
+
c > -1 && this.changesets.splice(c, 1);
|
|
801
|
+
}
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
addComponentHandler(e, t) {
|
|
805
|
+
this.customComponentHandler.add(e, t);
|
|
806
|
+
}
|
|
807
|
+
getComponentHandler(e) {
|
|
808
|
+
return this.customComponentHandler.get(e);
|
|
809
|
+
}
|
|
810
|
+
dispose() {
|
|
811
|
+
this.subscriptions.forEach((e) => e());
|
|
812
|
+
}
|
|
813
|
+
};
|
|
814
|
+
const ne = (e, t) => ({
|
|
815
|
+
id: e.id,
|
|
816
|
+
type: e.type,
|
|
817
|
+
name: e.name,
|
|
818
|
+
branch: t || "default"
|
|
819
|
+
}), ws = (e, t, s, i = lt(), r = {}) => e.getAsync("components").then((o) => {
|
|
820
|
+
let n;
|
|
821
|
+
if (typeof t == "string") {
|
|
822
|
+
const l = new dt(o);
|
|
823
|
+
l.ofType(t), n = l;
|
|
824
|
+
} else
|
|
825
|
+
n = t;
|
|
826
|
+
const a = {}, c = (l) => {
|
|
827
|
+
const h = a[l.id];
|
|
828
|
+
return h ? Promise.resolve(h.controller) : Wt.getInstance(e).then((d) => new Ee(d, l, i));
|
|
829
|
+
};
|
|
830
|
+
o.events.subscribe(
|
|
831
|
+
"components:node-enter",
|
|
832
|
+
(l, { node: h }) => {
|
|
833
|
+
n.match(h) && c(h).then((d) => {
|
|
834
|
+
Promise.resolve(s(d)).then((u) => {
|
|
835
|
+
a[h.id] = {
|
|
836
|
+
dispose: u,
|
|
837
|
+
controller: d
|
|
838
|
+
};
|
|
839
|
+
});
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
), o.events.subscribe(
|
|
843
|
+
"components:node-exit",
|
|
844
|
+
(l, { node: h }) => {
|
|
845
|
+
const d = a[h.id];
|
|
846
|
+
d && (d.dispose && d.dispose(), r.reuseController || (d.controller.dispose(), delete a[h.id]));
|
|
847
|
+
}
|
|
848
|
+
);
|
|
849
|
+
});
|
|
850
|
+
process.env.NODE_ENV;
|
|
851
|
+
var $s = Object.defineProperty, ae = Object.getOwnPropertySymbols, _s = Object.prototype.hasOwnProperty, xs = Object.prototype.propertyIsEnumerable, ce = (e, t, s) => t in e ? $s(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, I = (e, t) => {
|
|
852
|
+
for (var s in t || (t = {}))
|
|
853
|
+
_s.call(t, s) && ce(e, s, t[s]);
|
|
854
|
+
if (ae)
|
|
855
|
+
for (var s of ae(t))
|
|
856
|
+
xs.call(t, s) && ce(e, s, t[s]);
|
|
857
|
+
return e;
|
|
858
|
+
}, _ = /* @__PURE__ */ ((e) => (e.Cookie = "cookie", e.Local = "local", e.Session = "session", e))(_ || {}), Bt = /* @__PURE__ */ ((e) => (e.Tenant = "tenant", e.Implementation = "implementation", e.Widget = "widget", e))(Bt || {}), f = /* @__PURE__ */ ((e) => (e.Necessary = "necessary", e.Functional = "functional", e.Analytical = "analytical", e.Marketing = "marketing", e))(f || {});
|
|
859
|
+
const As = (e, t, s, i = {}) => he(e, s).then((r) => (process.env.NODE_ENV !== "production" && r && v.warn(
|
|
860
|
+
`createStorageWriter: Attempted to create storage writer using unallowed category.
|
|
861
|
+
Key: ${t}
|
|
862
|
+
Category: ${JSON.stringify(s)}
|
|
863
|
+
Options: ${JSON.stringify(i)}`
|
|
864
|
+
), (o) => (qt(e), he(e, s).then((n) => {
|
|
865
|
+
if (n) {
|
|
866
|
+
process.env.NODE_ENV !== "production" && v.warn(
|
|
867
|
+
`storageWriter: Attempted to write to storage using unallowed category.
|
|
868
|
+
Key: ${t}
|
|
869
|
+
Category: ${JSON.stringify(s)}
|
|
870
|
+
Value: ${JSON.stringify(o)}
|
|
871
|
+
Options: ${JSON.stringify(i)}`
|
|
872
|
+
);
|
|
873
|
+
return;
|
|
874
|
+
}
|
|
875
|
+
const {
|
|
876
|
+
scope: a = Bt.Widget,
|
|
877
|
+
medium: c = _.Session,
|
|
878
|
+
duration: l
|
|
879
|
+
} = i, h = Os();
|
|
880
|
+
return h[a][t] = ke(o, s, l), c === _.Cookie ? js(e, h) : Rs(e, c, h);
|
|
881
|
+
})))), Cs = (e, t, s = _.Session) => (qt(e), typeof t == "undefined" ? (process.env.NODE_ENV !== "production" && v.warn("readStorage: Undefined key passed when reading storage. ", t, s), Promise.resolve(void 0)) : s === _.Cookie ? Ns(e).then((i) => Rt(i, t)) : Ts(e, s).then((i) => Rt(i, t))), H = (e) => !!Object.entries(e).filter(([t, s]) => typeof s != "undefined").length, wt = (e) => Object.entries(e).filter(([t, s]) => typeof s != "undefined").forEach(([t, { value: s }]) => {
|
|
882
|
+
typeof s == "undefined" && delete e[t];
|
|
883
|
+
}), Pe = (e, t) => {
|
|
884
|
+
const s = {
|
|
885
|
+
tenant: I(I({}, e.tenant), t.tenant),
|
|
886
|
+
implementation: I(I({}, e.implementation), t.implementation),
|
|
887
|
+
widget: I(I({}, e.widget), t.widget)
|
|
888
|
+
};
|
|
889
|
+
return wt(s.tenant), wt(s.implementation), wt(s.widget), s;
|
|
890
|
+
}, Es = (e) => Object.entries(e).reduce((t, s) => {
|
|
891
|
+
const [i, r] = s;
|
|
892
|
+
return Object.entries(r).forEach((o) => {
|
|
893
|
+
const [n, { expiration: a }] = o;
|
|
894
|
+
a && t.push(a);
|
|
895
|
+
}), t;
|
|
896
|
+
}, []).slice().sort((t, s) => new Date(s).valueOf() - new Date(t).valueOf()).shift() || Ft(), ut = (e) => {
|
|
897
|
+
const {
|
|
898
|
+
name: t,
|
|
899
|
+
implementation: { name: s, tenant: i }
|
|
900
|
+
} = e.get("$widget");
|
|
901
|
+
return [
|
|
902
|
+
`humany_${i}`,
|
|
903
|
+
`humany_${se(i + s)}`,
|
|
904
|
+
`humany_${se(i + s + t)}`
|
|
905
|
+
];
|
|
906
|
+
}, $t = (e) => {
|
|
907
|
+
const t = new RegExp(`(?:^|;)\\s?${e}=(.*?)(?:;|$)`, "i"), s = document.cookie.match(t);
|
|
908
|
+
return s && s[1] && JSON.parse(s[1]) || void 0;
|
|
909
|
+
}, _t = (e, t, s) => {
|
|
910
|
+
const i = `${e}=${JSON.stringify(t).trim()}`, r = `expires=${new Date(s).toUTCString()}`, o = "path=/", n = "SameSite=None;Secure";
|
|
911
|
+
return document.cookie = `${i}; ${r}; ${o}; ${n}`;
|
|
912
|
+
}, Jt = (e) => {
|
|
913
|
+
const [t, s, i] = ut(e), r = $t(t) || {}, o = $t(s) || {}, n = $t(i) || {};
|
|
914
|
+
return {
|
|
915
|
+
tenant: r,
|
|
916
|
+
implementation: o,
|
|
917
|
+
widget: n
|
|
918
|
+
};
|
|
919
|
+
}, Se = (e, t) => {
|
|
920
|
+
const s = Jt(e), i = Pe(s, t), [r, o, n] = ut(e), { tenant: a, implementation: c, widget: l } = i, h = Es(t), d = Ft({ days: -1 });
|
|
921
|
+
_t(r, a, H(a) ? h : d), _t(
|
|
922
|
+
o,
|
|
923
|
+
c,
|
|
924
|
+
H(c) ? h : d
|
|
925
|
+
), _t(n, l, H(l) ? h : d);
|
|
926
|
+
}, it = (e, t) => {
|
|
927
|
+
const [s, i, r] = ut(e), o = t.getItem(s) || "{}", n = t.getItem(i) || "{}", a = t.getItem(r) || "{}";
|
|
928
|
+
return {
|
|
929
|
+
tenant: JSON.parse(o),
|
|
930
|
+
implementation: JSON.parse(n),
|
|
931
|
+
widget: JSON.parse(a)
|
|
932
|
+
};
|
|
933
|
+
}, Tt = (e, t, s) => {
|
|
934
|
+
const i = it(e, t), r = Pe(i, s), [o, n, a] = ut(e), { tenant: c, implementation: l, widget: h } = r;
|
|
935
|
+
H(c) ? t.setItem(o, JSON.stringify(c)) : t.removeItem(o), H(l) ? t.setItem(n, JSON.stringify(l)) : t.removeItem(n), H(h) ? t.setItem(a, JSON.stringify(h)) : t.removeItem(a);
|
|
936
|
+
}, Os = () => ({ tenant: {}, implementation: {}, widget: {} }), Ps = (e) => e ? !!e && /* @__PURE__ */ new Date() > new Date(e) : !1, Rt = (e, t) => {
|
|
937
|
+
const s = e.widget[t] || e.implementation[t] || e.tenant[t];
|
|
938
|
+
return s == null ? void 0 : s.value;
|
|
939
|
+
}, ke = (e, t, s) => s ? {
|
|
940
|
+
value: e,
|
|
941
|
+
category: t,
|
|
942
|
+
expiration: typeof s == "object" ? Ft(s) : s
|
|
943
|
+
} : {
|
|
944
|
+
value: e,
|
|
945
|
+
category: t
|
|
946
|
+
}, Ss = (e, t) => {
|
|
947
|
+
const s = es(e);
|
|
948
|
+
return Object.entries(s).forEach(([i, r]) => {
|
|
949
|
+
Object.entries(r).forEach(([o, n]) => {
|
|
950
|
+
const { expiration: a, category: c } = n;
|
|
951
|
+
(Ps(a) || ks(t, c)) && (r[o] = ke(void 0, c, a));
|
|
952
|
+
});
|
|
953
|
+
}), s;
|
|
954
|
+
}, he = (e, t) => Cs(e, "storagePolicy", _.Cookie).then(
|
|
955
|
+
(s = [f.Necessary]) => !!t && s.indexOf(t) === -1
|
|
956
|
+
), ks = (e = [f.Necessary], t) => !!t && e.indexOf(t) === -1, qt = (e) => {
|
|
957
|
+
const t = Jt(e), s = it(e, window.localStorage), i = it(e, sessionStorage), r = Rt(t, "storagePolicy"), [o, n, a] = [
|
|
958
|
+
t,
|
|
959
|
+
s,
|
|
960
|
+
i
|
|
961
|
+
].map((c) => Ss(c, r));
|
|
962
|
+
Se(e, o), Tt(e, window.localStorage, n), Tt(e, window.sessionStorage, a);
|
|
963
|
+
}, Ft = (e = { days: 30 }) => {
|
|
964
|
+
const { days: t = 0, hours: s = 0, minutes: i = 0, seconds: r = 0 } = e, o = /* @__PURE__ */ new Date();
|
|
965
|
+
return o.setTime(o.getTime() + s * 60 * 60 * 1e3), o.setTime(o.getTime() + t * 24 * 60 * 60 * 1e3), o.setTime(o.getTime() + i * 60 * 1e3), o.setTime(o.getTime() + r * 1e3), o.toISOString();
|
|
966
|
+
}, Ns = (e) => ht(document)(() => Jt(e)), js = (e, t) => ht(document)(() => Se(e, t)), Ts = (e, t) => {
|
|
967
|
+
const s = t === _.Local ? window.localStorage : window.sessionStorage;
|
|
968
|
+
return ht(s)(() => it(e, s));
|
|
969
|
+
}, Rs = (e, t, s) => {
|
|
970
|
+
const i = t === _.Local ? window.localStorage : window.sessionStorage;
|
|
971
|
+
return ht(i)(() => Tt(e, i, s));
|
|
972
|
+
}, xt = (e, t, s, ...i) => {
|
|
973
|
+
const r = `[${e.get("$environment").name || "webprovisions"}] ${s}`;
|
|
974
|
+
switch (t) {
|
|
975
|
+
case "info":
|
|
976
|
+
console.info(r, ...i);
|
|
977
|
+
break;
|
|
978
|
+
case "warning":
|
|
979
|
+
console.warn(r, ...i);
|
|
980
|
+
break;
|
|
981
|
+
case "error":
|
|
982
|
+
console.error(r, ...i);
|
|
983
|
+
break;
|
|
984
|
+
}
|
|
985
|
+
}, Ds = (e) => {
|
|
986
|
+
const t = e.container || e;
|
|
987
|
+
return {
|
|
988
|
+
info: (s, ...i) => xt(t, "info", s, ...i),
|
|
989
|
+
warn: (s, ...i) => xt(t, "warning", s, ...i),
|
|
990
|
+
error: (s, ...i) => xt(t, "error", s, ...i)
|
|
991
|
+
};
|
|
992
|
+
};
|
|
993
|
+
var rt = /* @__PURE__ */ ((e) => (e.Implementation = "implementation", e.Widget = "widget", e))(rt || {}), N = /* @__PURE__ */ ((e) => (e.Pre = "pre", e.Post = "post", e))(N || {});
|
|
994
|
+
const Is = (e, t, s, i) => {
|
|
995
|
+
try {
|
|
996
|
+
const r = new t(s, i);
|
|
997
|
+
return {
|
|
998
|
+
name: e,
|
|
999
|
+
invoke: (o, n) => {
|
|
1000
|
+
let a;
|
|
1001
|
+
return r[o] && (a = r[o].call(r, n)), Promise.resolve(a);
|
|
1002
|
+
},
|
|
1003
|
+
getInstance: () => r
|
|
1004
|
+
};
|
|
1005
|
+
} catch (r) {
|
|
1006
|
+
if (r.message && r.message.indexOf("is not a constructor") >= 0)
|
|
1007
|
+
return {
|
|
1008
|
+
name: e,
|
|
1009
|
+
invoke: (o) => {
|
|
1010
|
+
let n;
|
|
1011
|
+
return o === "initialize" && (n = t(s, i)), Promise.resolve(n);
|
|
1012
|
+
},
|
|
1013
|
+
getInstance: () => t
|
|
1014
|
+
};
|
|
1015
|
+
throw r;
|
|
1016
|
+
}
|
|
1017
|
+
};
|
|
1018
|
+
function le(e, t) {
|
|
1019
|
+
return typeof e == "undefined" ? t : e;
|
|
1020
|
+
}
|
|
1021
|
+
let Ls = class {
|
|
1022
|
+
constructor(e = {}) {
|
|
1023
|
+
this.part = e;
|
|
1024
|
+
}
|
|
1025
|
+
createCommand(e, t, s) {
|
|
1026
|
+
let i;
|
|
1027
|
+
typeof t == "function" ? i = {
|
|
1028
|
+
scope: rt.Widget,
|
|
1029
|
+
stage: N.Post,
|
|
1030
|
+
defaultArgs: void 0,
|
|
1031
|
+
handlerResolver: t
|
|
1032
|
+
} : i = {
|
|
1033
|
+
scope: le(t.scope, rt.Widget),
|
|
1034
|
+
stage: le(t.stage, N.Post),
|
|
1035
|
+
defaultArgs: t.defaultArgs,
|
|
1036
|
+
handlerResolver: s
|
|
1037
|
+
};
|
|
1038
|
+
let r = this.part;
|
|
1039
|
+
const o = e.split(".");
|
|
1040
|
+
return o.forEach((n, a) => {
|
|
1041
|
+
a === o.length - 1 ? r[n] || (r[n] = () => i) : r = this.part[n] = this.part[n] || {};
|
|
1042
|
+
}), this;
|
|
1043
|
+
}
|
|
1044
|
+
get() {
|
|
1045
|
+
return this.part;
|
|
1046
|
+
}
|
|
1047
|
+
};
|
|
1048
|
+
const Ne = (e) => {
|
|
1049
|
+
const t = new Ls({});
|
|
1050
|
+
return e(t), t.get();
|
|
1051
|
+
};
|
|
1052
|
+
Ne((e) => {
|
|
1053
|
+
e.createCommand(
|
|
1054
|
+
"types.register",
|
|
1055
|
+
{ scope: rt.Implementation, stage: N.Pre },
|
|
1056
|
+
(t) => (s, i) => {
|
|
1057
|
+
t.container.get("$types")[s] = i;
|
|
1058
|
+
}
|
|
1059
|
+
).createCommand(
|
|
1060
|
+
"type",
|
|
1061
|
+
{ stage: N.Pre },
|
|
1062
|
+
(t) => (s) => {
|
|
1063
|
+
t.container.register("$type", s);
|
|
1064
|
+
}
|
|
1065
|
+
).createCommand(
|
|
1066
|
+
"settings",
|
|
1067
|
+
{ stage: N.Pre, defaultArgs: [null] },
|
|
1068
|
+
(t) => (s) => {
|
|
1069
|
+
t.events.dispatch(
|
|
1070
|
+
"settings:change",
|
|
1071
|
+
s,
|
|
1072
|
+
{ bubbles: !0 }
|
|
1073
|
+
), t.container.register("$settings", s);
|
|
1074
|
+
}
|
|
1075
|
+
).createCommand(
|
|
1076
|
+
"plugin",
|
|
1077
|
+
{ stage: N.Pre },
|
|
1078
|
+
(t) => (s, i, r) => {
|
|
1079
|
+
const { container: o } = t;
|
|
1080
|
+
let n = null, a = s, c = i;
|
|
1081
|
+
typeof s == "string" && (n = s, a = i, c = r);
|
|
1082
|
+
const l = (h) => {
|
|
1083
|
+
const { transformPluginSettings: d } = t.container.get("$environmentOptions"), u = d ? d(
|
|
1084
|
+
c || {},
|
|
1085
|
+
n,
|
|
1086
|
+
t.container,
|
|
1087
|
+
a
|
|
1088
|
+
) : i;
|
|
1089
|
+
try {
|
|
1090
|
+
const p = Is(
|
|
1091
|
+
n,
|
|
1092
|
+
a,
|
|
1093
|
+
o,
|
|
1094
|
+
u
|
|
1095
|
+
);
|
|
1096
|
+
o.get("$plugins").push(p), h && p.invoke("initialize", null);
|
|
1097
|
+
} catch (p) {
|
|
1098
|
+
Ds(t).warn("Error when initializing plugin", p);
|
|
1099
|
+
}
|
|
1100
|
+
};
|
|
1101
|
+
t.container.get("$instance") ? l(!0) : t.events.subscribeOnce("widget:instance-created", () => l(!1));
|
|
1102
|
+
}
|
|
1103
|
+
).createCommand(
|
|
1104
|
+
"container.register",
|
|
1105
|
+
(t) => (s, i) => {
|
|
1106
|
+
t.container.register(s, i);
|
|
1107
|
+
}
|
|
1108
|
+
).createCommand(
|
|
1109
|
+
"container.registerAsync",
|
|
1110
|
+
(t) => (s, i) => {
|
|
1111
|
+
t.container.registerAsync(s, i);
|
|
1112
|
+
}
|
|
1113
|
+
).createCommand(
|
|
1114
|
+
"container.registerFactory",
|
|
1115
|
+
(t) => (s, i) => {
|
|
1116
|
+
t.container.registerFactory(s, i);
|
|
1117
|
+
}
|
|
1118
|
+
).createCommand(
|
|
1119
|
+
"container.touch",
|
|
1120
|
+
(t) => (s, i) => {
|
|
1121
|
+
t.container.touch(s, i);
|
|
1122
|
+
}
|
|
1123
|
+
).createCommand(
|
|
1124
|
+
"csp",
|
|
1125
|
+
{},
|
|
1126
|
+
(t) => (s) => {
|
|
1127
|
+
t.container.register("csp", s);
|
|
1128
|
+
}
|
|
1129
|
+
);
|
|
1130
|
+
});
|
|
1131
|
+
Ne((e) => {
|
|
1132
|
+
e.createCommand("storage", (t) => (s = {}) => {
|
|
1133
|
+
const { consent: i } = s;
|
|
1134
|
+
if (typeof i != "undefined") {
|
|
1135
|
+
if (typeof i != "number" && typeof i != "string" && !Array.isArray(i)) {
|
|
1136
|
+
process.env.NODE_ENV !== "production" && v.warn(
|
|
1137
|
+
`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
|
|
1138
|
+
Passed consent: ${JSON.stringify(i)}`
|
|
1139
|
+
);
|
|
1140
|
+
return;
|
|
1141
|
+
}
|
|
1142
|
+
if (Array.isArray(i) && !i.every(
|
|
1143
|
+
(o) => typeof o == "number" || typeof o == "string"
|
|
1144
|
+
)) {
|
|
1145
|
+
process.env.NODE_ENV !== "production" && v.warn(
|
|
1146
|
+
`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
|
|
1147
|
+
Passed consent: ${JSON.stringify(i)}`
|
|
1148
|
+
);
|
|
1149
|
+
return;
|
|
1150
|
+
}
|
|
1151
|
+
const r = [
|
|
1152
|
+
f.Necessary,
|
|
1153
|
+
f.Functional,
|
|
1154
|
+
f.Analytical,
|
|
1155
|
+
f.Marketing
|
|
1156
|
+
].filter((o, n, a) => typeof i == "number" ? i > n : typeof i == "string" ? a.indexOf(i) + 1 > n : Array.isArray(i) ? i.findIndex((c) => c === n + 1 || c === o) > -1 : !0);
|
|
1157
|
+
return r.indexOf(f.Necessary) === -1 && (process.env.NODE_ENV !== "production" && v.warn(
|
|
1158
|
+
`storagePolicyConfigurationApi: passed consent does not include category: '${f.Necessary}'. Consent has to atleast include the '${f.Necessary}' category.
|
|
1159
|
+
Passed consent: ${JSON.stringify(i)}`
|
|
1160
|
+
), r.unshift(f.Necessary)), As(
|
|
1161
|
+
t.container,
|
|
1162
|
+
"storagePolicy",
|
|
1163
|
+
f.Necessary,
|
|
1164
|
+
{
|
|
1165
|
+
medium: _.Cookie,
|
|
1166
|
+
scope: Bt.Tenant,
|
|
1167
|
+
duration: { days: 365 }
|
|
1168
|
+
}
|
|
1169
|
+
).then((o) => o(r)).then(() => {
|
|
1170
|
+
qt(t.container), t.events.dispatch("storage:policy-changed", r);
|
|
1171
|
+
});
|
|
1172
|
+
}
|
|
1173
|
+
});
|
|
1174
|
+
});
|
|
1175
|
+
function je(e) {
|
|
1176
|
+
if (e.__esModule)
|
|
1177
|
+
return e;
|
|
1178
|
+
var t = e.default;
|
|
1179
|
+
if (typeof t == "function") {
|
|
1180
|
+
var s = function i() {
|
|
1181
|
+
if (this instanceof i) {
|
|
1182
|
+
var r = [null];
|
|
1183
|
+
r.push.apply(r, arguments);
|
|
1184
|
+
var o = Function.bind.apply(t, r);
|
|
1185
|
+
return new o();
|
|
1186
|
+
}
|
|
1187
|
+
return t.apply(this, arguments);
|
|
1188
|
+
};
|
|
1189
|
+
s.prototype = t.prototype;
|
|
1190
|
+
} else
|
|
1191
|
+
s = {};
|
|
1192
|
+
return Object.defineProperty(s, "__esModule", { value: !0 }), Object.keys(e).forEach(function(i) {
|
|
1193
|
+
var r = Object.getOwnPropertyDescriptor(e, i);
|
|
1194
|
+
Object.defineProperty(s, i, r.get ? r : {
|
|
1195
|
+
enumerable: !0,
|
|
1196
|
+
get: function() {
|
|
1197
|
+
return e[i];
|
|
1198
|
+
}
|
|
1199
|
+
});
|
|
1200
|
+
}), s;
|
|
1201
|
+
}
|
|
1202
|
+
var Te = function() {
|
|
1203
|
+
};
|
|
1204
|
+
process.env.NODE_ENV !== "production" && (Te = function(e, t, s) {
|
|
1205
|
+
var i = arguments.length;
|
|
1206
|
+
s = new Array(i > 2 ? i - 2 : 0);
|
|
1207
|
+
for (var r = 2; r < i; r++)
|
|
1208
|
+
s[r - 2] = arguments[r];
|
|
1209
|
+
if (t === void 0)
|
|
1210
|
+
throw new Error(
|
|
1211
|
+
"`warning(condition, format, ...args)` requires a warning message argument"
|
|
1212
|
+
);
|
|
1213
|
+
if (t.length < 10 || /^[s\W]*$/.test(t))
|
|
1214
|
+
throw new Error(
|
|
1215
|
+
"The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: " + t
|
|
1216
|
+
);
|
|
1217
|
+
if (!e) {
|
|
1218
|
+
var o = 0, n = "Warning: " + t.replace(/%s/g, function() {
|
|
1219
|
+
return s[o++];
|
|
1220
|
+
});
|
|
1221
|
+
typeof console != "undefined" && console.error(n);
|
|
1222
|
+
try {
|
|
1223
|
+
throw new Error(n);
|
|
1224
|
+
} catch (a) {
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
});
|
|
1228
|
+
var Us = Te, Hs = Us;
|
|
1229
|
+
Ms(Hs);
|
|
1230
|
+
function Ms(e) {
|
|
1231
|
+
return e && e.__esModule ? e : { default: e };
|
|
1232
|
+
}
|
|
1233
|
+
function Y(e) {
|
|
1234
|
+
return e.charAt(0) === "/";
|
|
1235
|
+
}
|
|
1236
|
+
function At(e, t) {
|
|
1237
|
+
for (var s = t, i = s + 1, r = e.length; i < r; s += 1, i += 1)
|
|
1238
|
+
e[s] = e[i];
|
|
1239
|
+
e.pop();
|
|
1240
|
+
}
|
|
1241
|
+
function zs(e) {
|
|
1242
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", s = e && e.split("/") || [], i = t && t.split("/") || [], r = e && Y(e), o = t && Y(t), n = r || o;
|
|
1243
|
+
if (e && Y(e) ? i = s : s.length && (i.pop(), i = i.concat(s)), !i.length)
|
|
1244
|
+
return "/";
|
|
1245
|
+
var a = void 0;
|
|
1246
|
+
if (i.length) {
|
|
1247
|
+
var c = i[i.length - 1];
|
|
1248
|
+
a = c === "." || c === ".." || c === "";
|
|
1249
|
+
} else
|
|
1250
|
+
a = !1;
|
|
1251
|
+
for (var l = 0, h = i.length; h >= 0; h--) {
|
|
1252
|
+
var d = i[h];
|
|
1253
|
+
d === "." ? At(i, h) : d === ".." ? (At(i, h), l++) : l && (At(i, h), l--);
|
|
1254
|
+
}
|
|
1255
|
+
if (!n)
|
|
1256
|
+
for (; l--; l)
|
|
1257
|
+
i.unshift("..");
|
|
1258
|
+
n && i[0] !== "" && (!i[0] || !Y(i[0])) && i.unshift("");
|
|
1259
|
+
var u = i.join("/");
|
|
1260
|
+
return a && u.substr(-1) !== "/" && (u += "/"), u;
|
|
1261
|
+
}
|
|
1262
|
+
const Vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1263
|
+
__proto__: null,
|
|
1264
|
+
default: zs
|
|
1265
|
+
}, Symbol.toStringTag, { value: "Module" })), Ws = /* @__PURE__ */ je(Vs);
|
|
1266
|
+
var de = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
1267
|
+
return typeof e;
|
|
1268
|
+
} : function(e) {
|
|
1269
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
1270
|
+
};
|
|
1271
|
+
function tt(e, t) {
|
|
1272
|
+
if (e === t)
|
|
1273
|
+
return !0;
|
|
1274
|
+
if (e == null || t == null)
|
|
1275
|
+
return !1;
|
|
1276
|
+
if (Array.isArray(e))
|
|
1277
|
+
return Array.isArray(t) && e.length === t.length && e.every(function(c, l) {
|
|
1278
|
+
return tt(c, t[l]);
|
|
1279
|
+
});
|
|
1280
|
+
var s = typeof e == "undefined" ? "undefined" : de(e), i = typeof t == "undefined" ? "undefined" : de(t);
|
|
1281
|
+
if (s !== i)
|
|
1282
|
+
return !1;
|
|
1283
|
+
if (s === "object") {
|
|
1284
|
+
var r = e.valueOf(), o = t.valueOf();
|
|
1285
|
+
if (r !== e || o !== t)
|
|
1286
|
+
return tt(r, o);
|
|
1287
|
+
var n = Object.keys(e), a = Object.keys(t);
|
|
1288
|
+
return n.length !== a.length ? !1 : n.every(function(c) {
|
|
1289
|
+
return tt(e[c], t[c]);
|
|
1290
|
+
});
|
|
1291
|
+
}
|
|
1292
|
+
return !1;
|
|
1293
|
+
}
|
|
1294
|
+
const Bs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1295
|
+
__proto__: null,
|
|
1296
|
+
default: tt
|
|
1297
|
+
}, Symbol.toStringTag, { value: "Module" })), Js = /* @__PURE__ */ je(Bs);
|
|
1298
|
+
var qs = Ws;
|
|
1299
|
+
Re(qs);
|
|
1300
|
+
var Fs = Js;
|
|
1301
|
+
Re(Fs);
|
|
1302
|
+
function Re(e) {
|
|
1303
|
+
return e && e.__esModule ? e : { default: e };
|
|
1304
|
+
}
|
|
1305
|
+
Mt((e) => {
|
|
1306
|
+
e.createCommand("routing", (t) => (s) => {
|
|
1307
|
+
const i = {
|
|
1308
|
+
mode: s.mode
|
|
1309
|
+
};
|
|
1310
|
+
s.basePath && (i.basePath = s.basePath), t.container.register("routingSettings", i);
|
|
1311
|
+
});
|
|
1312
|
+
});
|
|
1313
|
+
const Ct = (e, t, s, ...i) => {
|
|
1314
|
+
const r = `[${e.get("$environment").name || "webprovisions"}] ${s}`;
|
|
1315
|
+
switch (t) {
|
|
1316
|
+
case "info":
|
|
1317
|
+
console.info(r, ...i);
|
|
1318
|
+
break;
|
|
1319
|
+
case "warning":
|
|
1320
|
+
console.warn(r, ...i);
|
|
1321
|
+
break;
|
|
1322
|
+
case "error":
|
|
1323
|
+
console.error(r, ...i);
|
|
1324
|
+
break;
|
|
1325
|
+
}
|
|
1326
|
+
}, Ks = (e) => {
|
|
1327
|
+
const t = e.container || e;
|
|
1328
|
+
return {
|
|
1329
|
+
info: (s, ...i) => Ct(t, "info", s, ...i),
|
|
1330
|
+
warn: (s, ...i) => Ct(t, "warning", s, ...i),
|
|
1331
|
+
error: (s, ...i) => Ct(t, "error", s, ...i)
|
|
1332
|
+
};
|
|
1333
|
+
};
|
|
1334
|
+
var q = /* @__PURE__ */ ((e) => (e.Implementation = "implementation", e.Widget = "widget", e))(q || {}), O = /* @__PURE__ */ ((e) => (e.Pre = "pre", e.Post = "post", e))(O || {});
|
|
1335
|
+
const Zs = (e, t, s, i) => {
|
|
1336
|
+
try {
|
|
1337
|
+
const r = new t(s, i);
|
|
1338
|
+
return {
|
|
1339
|
+
name: e,
|
|
1340
|
+
invoke: (o, n) => {
|
|
1341
|
+
let a;
|
|
1342
|
+
return r[o] && (a = r[o].call(r, n)), Promise.resolve(a);
|
|
1343
|
+
},
|
|
1344
|
+
getInstance: () => r
|
|
1345
|
+
};
|
|
1346
|
+
} catch (r) {
|
|
1347
|
+
if (r.message && r.message.indexOf("is not a constructor") >= 0)
|
|
1348
|
+
return {
|
|
1349
|
+
name: e,
|
|
1350
|
+
invoke: (o) => {
|
|
1351
|
+
let n;
|
|
1352
|
+
return o === "initialize" && (n = t(s, i)), Promise.resolve(n);
|
|
1353
|
+
},
|
|
1354
|
+
getInstance: () => t
|
|
1355
|
+
};
|
|
1356
|
+
throw r;
|
|
1357
|
+
}
|
|
1358
|
+
};
|
|
1359
|
+
function ue(e, t) {
|
|
1360
|
+
return typeof e == "undefined" ? t : e;
|
|
1361
|
+
}
|
|
1362
|
+
class Xs {
|
|
1363
|
+
constructor(t = {}) {
|
|
1364
|
+
this.part = t;
|
|
1365
|
+
}
|
|
1366
|
+
createCommand(t, s, i) {
|
|
1367
|
+
let r;
|
|
1368
|
+
typeof s == "function" ? r = {
|
|
1369
|
+
scope: q.Widget,
|
|
1370
|
+
stage: O.Post,
|
|
1371
|
+
defaultArgs: void 0,
|
|
1372
|
+
handlerResolver: s
|
|
1373
|
+
} : r = {
|
|
1374
|
+
scope: ue(s.scope, q.Widget),
|
|
1375
|
+
stage: ue(s.stage, O.Post),
|
|
1376
|
+
defaultArgs: s.defaultArgs,
|
|
1377
|
+
handlerResolver: i
|
|
1378
|
+
};
|
|
1379
|
+
let o = this.part;
|
|
1380
|
+
const n = t.split(".");
|
|
1381
|
+
return n.forEach((a, c) => {
|
|
1382
|
+
c === n.length - 1 ? o[a] || (o[a] = () => r) : o = this.part[a] = this.part[a] || {};
|
|
1383
|
+
}), this;
|
|
1384
|
+
}
|
|
1385
|
+
get() {
|
|
1386
|
+
return this.part;
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
const De = (e) => {
|
|
1390
|
+
const t = new Xs({});
|
|
1391
|
+
return e(t), t.get();
|
|
1392
|
+
};
|
|
1393
|
+
De((e) => {
|
|
1394
|
+
e.createCommand(
|
|
1395
|
+
"types.register",
|
|
1396
|
+
{ scope: q.Implementation, stage: O.Pre },
|
|
1397
|
+
(t) => (s, i) => {
|
|
1398
|
+
t.container.get("$types")[s] = i;
|
|
1399
|
+
}
|
|
1400
|
+
).createCommand(
|
|
1401
|
+
"type",
|
|
1402
|
+
{ stage: O.Pre },
|
|
1403
|
+
(t) => (s) => {
|
|
1404
|
+
t.container.register("$type", s);
|
|
1405
|
+
}
|
|
1406
|
+
).createCommand(
|
|
1407
|
+
"settings",
|
|
1408
|
+
{ stage: O.Pre, defaultArgs: [null] },
|
|
1409
|
+
(t) => (s) => {
|
|
1410
|
+
t.events.dispatch(
|
|
1411
|
+
"settings:change",
|
|
1412
|
+
s,
|
|
1413
|
+
{ bubbles: !0 }
|
|
1414
|
+
), t.container.register("$settings", s);
|
|
1415
|
+
}
|
|
1416
|
+
).createCommand(
|
|
1417
|
+
"plugin",
|
|
1418
|
+
{ stage: O.Pre },
|
|
1419
|
+
(t) => (s, i, r) => {
|
|
1420
|
+
const { container: o } = t;
|
|
1421
|
+
let n = null, a = s, c = i;
|
|
1422
|
+
typeof s == "string" && (n = s, a = i, c = r);
|
|
1423
|
+
const l = (h) => {
|
|
1424
|
+
const { transformPluginSettings: d } = t.container.get("$environmentOptions"), u = d ? d(
|
|
1425
|
+
c || {},
|
|
1426
|
+
n,
|
|
1427
|
+
t.container,
|
|
1428
|
+
a
|
|
1429
|
+
) : i;
|
|
1430
|
+
try {
|
|
1431
|
+
const p = Zs(
|
|
1432
|
+
n,
|
|
1433
|
+
a,
|
|
1434
|
+
o,
|
|
1435
|
+
u
|
|
1436
|
+
);
|
|
1437
|
+
o.get("$plugins").push(p), h && p.invoke("initialize", null);
|
|
1438
|
+
} catch (p) {
|
|
1439
|
+
Ks(t).warn("Error when initializing plugin", p);
|
|
1440
|
+
}
|
|
1441
|
+
};
|
|
1442
|
+
t.container.get("$instance") ? l(!0) : t.events.subscribeOnce("widget:instance-created", () => l(!1));
|
|
1443
|
+
}
|
|
1444
|
+
).createCommand(
|
|
1445
|
+
"container.register",
|
|
1446
|
+
(t) => (s, i) => {
|
|
1447
|
+
t.container.register(s, i);
|
|
1448
|
+
}
|
|
1449
|
+
).createCommand(
|
|
1450
|
+
"container.registerAsync",
|
|
1451
|
+
(t) => (s, i) => {
|
|
1452
|
+
t.container.registerAsync(s, i);
|
|
1453
|
+
}
|
|
1454
|
+
).createCommand(
|
|
1455
|
+
"container.registerFactory",
|
|
1456
|
+
(t) => (s, i) => {
|
|
1457
|
+
t.container.registerFactory(s, i);
|
|
1458
|
+
}
|
|
1459
|
+
).createCommand(
|
|
1460
|
+
"container.touch",
|
|
1461
|
+
(t) => (s, i) => {
|
|
1462
|
+
t.container.touch(s, i);
|
|
1463
|
+
}
|
|
1464
|
+
).createCommand(
|
|
1465
|
+
"csp",
|
|
1466
|
+
{},
|
|
1467
|
+
(t) => (s) => {
|
|
1468
|
+
t.container.register("csp", s);
|
|
1469
|
+
}
|
|
1470
|
+
);
|
|
1471
|
+
});
|
|
1472
|
+
De((e) => {
|
|
1473
|
+
e.createCommand(
|
|
1474
|
+
"ready",
|
|
1475
|
+
{ scope: q.Implementation, stage: O.Pre },
|
|
1476
|
+
(t) => (s) => {
|
|
1477
|
+
const { container: i } = t, r = i.owner;
|
|
1478
|
+
i.get("bootstrapping").ready ? s(r) : r.events.subscribeOnce("bootstrap:ready", () => {
|
|
1479
|
+
s(r);
|
|
1480
|
+
});
|
|
1481
|
+
}
|
|
1482
|
+
);
|
|
1483
|
+
});
|
|
1484
|
+
/**
|
|
1485
|
+
* @license
|
|
1486
|
+
* Copyright 2019 Google LLC
|
|
1487
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1488
|
+
*/
|
|
1489
|
+
const et = window, Kt = et.ShadowRoot && (et.ShadyCSS === void 0 || et.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Zt = Symbol(), pe = /* @__PURE__ */ new WeakMap();
|
|
1490
|
+
let Ie = class {
|
|
1491
|
+
constructor(e, t, s) {
|
|
1492
|
+
if (this._$cssResult$ = !0, s !== Zt)
|
|
1493
|
+
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
1494
|
+
this.cssText = e, this.t = t;
|
|
1495
|
+
}
|
|
1496
|
+
get styleSheet() {
|
|
1497
|
+
let e = this.o;
|
|
1498
|
+
const t = this.t;
|
|
1499
|
+
if (Kt && e === void 0) {
|
|
1500
|
+
const s = t !== void 0 && t.length === 1;
|
|
1501
|
+
s && (e = pe.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && pe.set(t, e));
|
|
1502
|
+
}
|
|
1503
|
+
return e;
|
|
1504
|
+
}
|
|
1505
|
+
toString() {
|
|
1506
|
+
return this.cssText;
|
|
1507
|
+
}
|
|
1508
|
+
};
|
|
1509
|
+
const Qs = (e) => new Ie(typeof e == "string" ? e : e + "", void 0, Zt), Le = (e, ...t) => {
|
|
1510
|
+
const s = e.length === 1 ? e[0] : t.reduce((i, r, o) => i + ((n) => {
|
|
1511
|
+
if (n._$cssResult$ === !0)
|
|
1512
|
+
return n.cssText;
|
|
1513
|
+
if (typeof n == "number")
|
|
1514
|
+
return n;
|
|
1515
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
1516
|
+
})(r) + e[o + 1], e[0]);
|
|
1517
|
+
return new Ie(s, e, Zt);
|
|
1518
|
+
}, Ys = (e, t) => {
|
|
1519
|
+
Kt ? e.adoptedStyleSheets = t.map((s) => s instanceof CSSStyleSheet ? s : s.styleSheet) : t.forEach((s) => {
|
|
1520
|
+
const i = document.createElement("style"), r = et.litNonce;
|
|
1521
|
+
r !== void 0 && i.setAttribute("nonce", r), i.textContent = s.cssText, e.appendChild(i);
|
|
1522
|
+
});
|
|
1523
|
+
}, ge = Kt ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
|
|
1524
|
+
let s = "";
|
|
1525
|
+
for (const i of t.cssRules)
|
|
1526
|
+
s += i.cssText;
|
|
1527
|
+
return Qs(s);
|
|
1528
|
+
})(e) : e;
|
|
1529
|
+
/**
|
|
1530
|
+
* @license
|
|
1531
|
+
* Copyright 2017 Google LLC
|
|
1532
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1533
|
+
*/
|
|
1534
|
+
var Et;
|
|
1535
|
+
const ot = window, me = ot.trustedTypes, Gs = me ? me.emptyScript : "", fe = ot.reactiveElementPolyfillSupport, Dt = { toAttribute(e, t) {
|
|
1536
|
+
switch (t) {
|
|
1537
|
+
case Boolean:
|
|
1538
|
+
e = e ? Gs : null;
|
|
1539
|
+
break;
|
|
1540
|
+
case Object:
|
|
1541
|
+
case Array:
|
|
1542
|
+
e = e == null ? e : JSON.stringify(e);
|
|
1543
|
+
}
|
|
1544
|
+
return e;
|
|
1545
|
+
}, fromAttribute(e, t) {
|
|
1546
|
+
let s = e;
|
|
1547
|
+
switch (t) {
|
|
1548
|
+
case Boolean:
|
|
1549
|
+
s = e !== null;
|
|
1550
|
+
break;
|
|
1551
|
+
case Number:
|
|
1552
|
+
s = e === null ? null : Number(e);
|
|
1553
|
+
break;
|
|
1554
|
+
case Object:
|
|
1555
|
+
case Array:
|
|
1556
|
+
try {
|
|
1557
|
+
s = JSON.parse(e);
|
|
1558
|
+
} catch (i) {
|
|
1559
|
+
s = null;
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
return s;
|
|
1563
|
+
} }, Ue = (e, t) => t !== e && (t == t || e == e), Ot = { attribute: !0, type: String, converter: Dt, reflect: !1, hasChanged: Ue }, It = "finalized";
|
|
1564
|
+
let L = class extends HTMLElement {
|
|
1565
|
+
constructor() {
|
|
1566
|
+
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
|
|
1567
|
+
}
|
|
1568
|
+
static addInitializer(e) {
|
|
1569
|
+
var t;
|
|
1570
|
+
this.finalize(), ((t = this.h) !== null && t !== void 0 ? t : this.h = []).push(e);
|
|
1571
|
+
}
|
|
1572
|
+
static get observedAttributes() {
|
|
1573
|
+
this.finalize();
|
|
1574
|
+
const e = [];
|
|
1575
|
+
return this.elementProperties.forEach((t, s) => {
|
|
1576
|
+
const i = this._$Ep(s, t);
|
|
1577
|
+
i !== void 0 && (this._$Ev.set(i, s), e.push(i));
|
|
1578
|
+
}), e;
|
|
1579
|
+
}
|
|
1580
|
+
static createProperty(e, t = Ot) {
|
|
1581
|
+
if (t.state && (t.attribute = !1), this.finalize(), this.elementProperties.set(e, t), !t.noAccessor && !this.prototype.hasOwnProperty(e)) {
|
|
1582
|
+
const s = typeof e == "symbol" ? Symbol() : "__" + e, i = this.getPropertyDescriptor(e, s, t);
|
|
1583
|
+
i !== void 0 && Object.defineProperty(this.prototype, e, i);
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
static getPropertyDescriptor(e, t, s) {
|
|
1587
|
+
return { get() {
|
|
1588
|
+
return this[t];
|
|
1589
|
+
}, set(i) {
|
|
1590
|
+
const r = this[e];
|
|
1591
|
+
this[t] = i, this.requestUpdate(e, r, s);
|
|
1592
|
+
}, configurable: !0, enumerable: !0 };
|
|
1593
|
+
}
|
|
1594
|
+
static getPropertyOptions(e) {
|
|
1595
|
+
return this.elementProperties.get(e) || Ot;
|
|
1596
|
+
}
|
|
1597
|
+
static finalize() {
|
|
1598
|
+
if (this.hasOwnProperty(It))
|
|
1599
|
+
return !1;
|
|
1600
|
+
this[It] = !0;
|
|
1601
|
+
const e = Object.getPrototypeOf(this);
|
|
1602
|
+
if (e.finalize(), e.h !== void 0 && (this.h = [...e.h]), this.elementProperties = new Map(e.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
1603
|
+
const t = this.properties, s = [...Object.getOwnPropertyNames(t), ...Object.getOwnPropertySymbols(t)];
|
|
1604
|
+
for (const i of s)
|
|
1605
|
+
this.createProperty(i, t[i]);
|
|
1606
|
+
}
|
|
1607
|
+
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
1608
|
+
}
|
|
1609
|
+
static finalizeStyles(e) {
|
|
1610
|
+
const t = [];
|
|
1611
|
+
if (Array.isArray(e)) {
|
|
1612
|
+
const s = new Set(e.flat(1 / 0).reverse());
|
|
1613
|
+
for (const i of s)
|
|
1614
|
+
t.unshift(ge(i));
|
|
1615
|
+
} else
|
|
1616
|
+
e !== void 0 && t.push(ge(e));
|
|
1617
|
+
return t;
|
|
1618
|
+
}
|
|
1619
|
+
static _$Ep(e, t) {
|
|
1620
|
+
const s = t.attribute;
|
|
1621
|
+
return s === !1 ? void 0 : typeof s == "string" ? s : typeof e == "string" ? e.toLowerCase() : void 0;
|
|
1622
|
+
}
|
|
1623
|
+
_$Eu() {
|
|
1624
|
+
var e;
|
|
1625
|
+
this._$E_ = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (e = this.constructor.h) === null || e === void 0 || e.forEach((t) => t(this));
|
|
1626
|
+
}
|
|
1627
|
+
addController(e) {
|
|
1628
|
+
var t, s;
|
|
1629
|
+
((t = this._$ES) !== null && t !== void 0 ? t : this._$ES = []).push(e), this.renderRoot !== void 0 && this.isConnected && ((s = e.hostConnected) === null || s === void 0 || s.call(e));
|
|
1630
|
+
}
|
|
1631
|
+
removeController(e) {
|
|
1632
|
+
var t;
|
|
1633
|
+
(t = this._$ES) === null || t === void 0 || t.splice(this._$ES.indexOf(e) >>> 0, 1);
|
|
1634
|
+
}
|
|
1635
|
+
_$Eg() {
|
|
1636
|
+
this.constructor.elementProperties.forEach((e, t) => {
|
|
1637
|
+
this.hasOwnProperty(t) && (this._$Ei.set(t, this[t]), delete this[t]);
|
|
1638
|
+
});
|
|
1639
|
+
}
|
|
1640
|
+
createRenderRoot() {
|
|
1641
|
+
var e;
|
|
1642
|
+
const t = (e = this.shadowRoot) !== null && e !== void 0 ? e : this.attachShadow(this.constructor.shadowRootOptions);
|
|
1643
|
+
return Ys(t, this.constructor.elementStyles), t;
|
|
1644
|
+
}
|
|
1645
|
+
connectedCallback() {
|
|
1646
|
+
var e;
|
|
1647
|
+
this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this._$ES) === null || e === void 0 || e.forEach((t) => {
|
|
1648
|
+
var s;
|
|
1649
|
+
return (s = t.hostConnected) === null || s === void 0 ? void 0 : s.call(t);
|
|
1650
|
+
});
|
|
1651
|
+
}
|
|
1652
|
+
enableUpdating(e) {
|
|
1653
|
+
}
|
|
1654
|
+
disconnectedCallback() {
|
|
1655
|
+
var e;
|
|
1656
|
+
(e = this._$ES) === null || e === void 0 || e.forEach((t) => {
|
|
1657
|
+
var s;
|
|
1658
|
+
return (s = t.hostDisconnected) === null || s === void 0 ? void 0 : s.call(t);
|
|
1659
|
+
});
|
|
1660
|
+
}
|
|
1661
|
+
attributeChangedCallback(e, t, s) {
|
|
1662
|
+
this._$AK(e, s);
|
|
1663
|
+
}
|
|
1664
|
+
_$EO(e, t, s = Ot) {
|
|
1665
|
+
var i;
|
|
1666
|
+
const r = this.constructor._$Ep(e, s);
|
|
1667
|
+
if (r !== void 0 && s.reflect === !0) {
|
|
1668
|
+
const o = (((i = s.converter) === null || i === void 0 ? void 0 : i.toAttribute) !== void 0 ? s.converter : Dt).toAttribute(t, s.type);
|
|
1669
|
+
this._$El = e, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$El = null;
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
_$AK(e, t) {
|
|
1673
|
+
var s;
|
|
1674
|
+
const i = this.constructor, r = i._$Ev.get(e);
|
|
1675
|
+
if (r !== void 0 && this._$El !== r) {
|
|
1676
|
+
const o = i.getPropertyOptions(r), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((s = o.converter) === null || s === void 0 ? void 0 : s.fromAttribute) !== void 0 ? o.converter : Dt;
|
|
1677
|
+
this._$El = r, this[r] = n.fromAttribute(t, o.type), this._$El = null;
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
requestUpdate(e, t, s) {
|
|
1681
|
+
let i = !0;
|
|
1682
|
+
e !== void 0 && (((s = s || this.constructor.getPropertyOptions(e)).hasChanged || Ue)(this[e], t) ? (this._$AL.has(e) || this._$AL.set(e, t), s.reflect === !0 && this._$El !== e && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(e, s))) : i = !1), !this.isUpdatePending && i && (this._$E_ = this._$Ej());
|
|
1683
|
+
}
|
|
1684
|
+
_$Ej() {
|
|
1685
|
+
return U(this, null, function* () {
|
|
1686
|
+
this.isUpdatePending = !0;
|
|
1687
|
+
try {
|
|
1688
|
+
yield this._$E_;
|
|
1689
|
+
} catch (t) {
|
|
1690
|
+
Promise.reject(t);
|
|
1691
|
+
}
|
|
1692
|
+
const e = this.scheduleUpdate();
|
|
1693
|
+
return e != null && (yield e), !this.isUpdatePending;
|
|
1694
|
+
});
|
|
1695
|
+
}
|
|
1696
|
+
scheduleUpdate() {
|
|
1697
|
+
return this.performUpdate();
|
|
1698
|
+
}
|
|
1699
|
+
performUpdate() {
|
|
1700
|
+
var e;
|
|
1701
|
+
if (!this.isUpdatePending)
|
|
1702
|
+
return;
|
|
1703
|
+
this.hasUpdated, this._$Ei && (this._$Ei.forEach((i, r) => this[r] = i), this._$Ei = void 0);
|
|
1704
|
+
let t = !1;
|
|
1705
|
+
const s = this._$AL;
|
|
1706
|
+
try {
|
|
1707
|
+
t = this.shouldUpdate(s), t ? (this.willUpdate(s), (e = this._$ES) === null || e === void 0 || e.forEach((i) => {
|
|
1708
|
+
var r;
|
|
1709
|
+
return (r = i.hostUpdate) === null || r === void 0 ? void 0 : r.call(i);
|
|
1710
|
+
}), this.update(s)) : this._$Ek();
|
|
1711
|
+
} catch (i) {
|
|
1712
|
+
throw t = !1, this._$Ek(), i;
|
|
1713
|
+
}
|
|
1714
|
+
t && this._$AE(s);
|
|
1715
|
+
}
|
|
1716
|
+
willUpdate(e) {
|
|
1717
|
+
}
|
|
1718
|
+
_$AE(e) {
|
|
1719
|
+
var t;
|
|
1720
|
+
(t = this._$ES) === null || t === void 0 || t.forEach((s) => {
|
|
1721
|
+
var i;
|
|
1722
|
+
return (i = s.hostUpdated) === null || i === void 0 ? void 0 : i.call(s);
|
|
1723
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
|
|
1724
|
+
}
|
|
1725
|
+
_$Ek() {
|
|
1726
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
1727
|
+
}
|
|
1728
|
+
get updateComplete() {
|
|
1729
|
+
return this.getUpdateComplete();
|
|
1730
|
+
}
|
|
1731
|
+
getUpdateComplete() {
|
|
1732
|
+
return this._$E_;
|
|
1733
|
+
}
|
|
1734
|
+
shouldUpdate(e) {
|
|
1735
|
+
return !0;
|
|
1736
|
+
}
|
|
1737
|
+
update(e) {
|
|
1738
|
+
this._$EC !== void 0 && (this._$EC.forEach((t, s) => this._$EO(s, this[s], t)), this._$EC = void 0), this._$Ek();
|
|
1739
|
+
}
|
|
1740
|
+
updated(e) {
|
|
1741
|
+
}
|
|
1742
|
+
firstUpdated(e) {
|
|
1743
|
+
}
|
|
1744
|
+
};
|
|
1745
|
+
L[It] = !0, L.elementProperties = /* @__PURE__ */ new Map(), L.elementStyles = [], L.shadowRootOptions = { mode: "open" }, fe == null || fe({ ReactiveElement: L }), ((Et = ot.reactiveElementVersions) !== null && Et !== void 0 ? Et : ot.reactiveElementVersions = []).push("1.6.3");
|
|
1746
|
+
/**
|
|
1747
|
+
* @license
|
|
1748
|
+
* Copyright 2017 Google LLC
|
|
1749
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1750
|
+
*/
|
|
1751
|
+
var Pt;
|
|
1752
|
+
const nt = window, M = nt.trustedTypes, ve = M ? M.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Lt = "$lit$", C = `lit$${(Math.random() + "").slice(9)}$`, He = "?" + C, ti = `<${He}>`, T = document, F = () => T.createComment(""), K = (e) => e === null || typeof e != "object" && typeof e != "function", Me = Array.isArray, ei = (e) => Me(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", St = `[
|
|
1753
|
+
\f\r]`, V = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ye = /-->/g, be = />/g, P = RegExp(`>|${St}(?:([^\\s"'>=/]+)(${St}*=${St}*(?:[^
|
|
1754
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), we = /'/g, $e = /"/g, ze = /^(?:script|style|textarea|title)$/i, si = (e) => (t, ...s) => ({ _$litType$: e, strings: t, values: s }), G = si(1), R = Symbol.for("lit-noChange"), g = Symbol.for("lit-nothing"), _e = /* @__PURE__ */ new WeakMap(), j = T.createTreeWalker(T, 129, null, !1);
|
|
1755
|
+
function Ve(e, t) {
|
|
1756
|
+
if (!Array.isArray(e) || !e.hasOwnProperty("raw"))
|
|
1757
|
+
throw Error("invalid template strings array");
|
|
1758
|
+
return ve !== void 0 ? ve.createHTML(t) : t;
|
|
1759
|
+
}
|
|
1760
|
+
const ii = (e, t) => {
|
|
1761
|
+
const s = e.length - 1, i = [];
|
|
1762
|
+
let r, o = t === 2 ? "<svg>" : "", n = V;
|
|
1763
|
+
for (let a = 0; a < s; a++) {
|
|
1764
|
+
const c = e[a];
|
|
1765
|
+
let l, h, d = -1, u = 0;
|
|
1766
|
+
for (; u < c.length && (n.lastIndex = u, h = n.exec(c), h !== null); )
|
|
1767
|
+
u = n.lastIndex, n === V ? h[1] === "!--" ? n = ye : h[1] !== void 0 ? n = be : h[2] !== void 0 ? (ze.test(h[2]) && (r = RegExp("</" + h[2], "g")), n = P) : h[3] !== void 0 && (n = P) : n === P ? h[0] === ">" ? (n = r != null ? r : V, d = -1) : h[1] === void 0 ? d = -2 : (d = n.lastIndex - h[2].length, l = h[1], n = h[3] === void 0 ? P : h[3] === '"' ? $e : we) : n === $e || n === we ? n = P : n === ye || n === be ? n = V : (n = P, r = void 0);
|
|
1768
|
+
const p = n === P && e[a + 1].startsWith("/>") ? " " : "";
|
|
1769
|
+
o += n === V ? c + ti : d >= 0 ? (i.push(l), c.slice(0, d) + Lt + c.slice(d) + C + p) : c + C + (d === -2 ? (i.push(void 0), a) : p);
|
|
1770
|
+
}
|
|
1771
|
+
return [Ve(e, o + (e[s] || "<?>") + (t === 2 ? "</svg>" : "")), i];
|
|
1772
|
+
};
|
|
1773
|
+
class Z {
|
|
1774
|
+
constructor({ strings: t, _$litType$: s }, i) {
|
|
1775
|
+
let r;
|
|
1776
|
+
this.parts = [];
|
|
1777
|
+
let o = 0, n = 0;
|
|
1778
|
+
const a = t.length - 1, c = this.parts, [l, h] = ii(t, s);
|
|
1779
|
+
if (this.el = Z.createElement(l, i), j.currentNode = this.el.content, s === 2) {
|
|
1780
|
+
const d = this.el.content, u = d.firstChild;
|
|
1781
|
+
u.remove(), d.append(...u.childNodes);
|
|
1782
|
+
}
|
|
1783
|
+
for (; (r = j.nextNode()) !== null && c.length < a; ) {
|
|
1784
|
+
if (r.nodeType === 1) {
|
|
1785
|
+
if (r.hasAttributes()) {
|
|
1786
|
+
const d = [];
|
|
1787
|
+
for (const u of r.getAttributeNames())
|
|
1788
|
+
if (u.endsWith(Lt) || u.startsWith(C)) {
|
|
1789
|
+
const p = h[n++];
|
|
1790
|
+
if (d.push(u), p !== void 0) {
|
|
1791
|
+
const b = r.getAttribute(p.toLowerCase() + Lt).split(C), x = /([.?@])?(.*)/.exec(p);
|
|
1792
|
+
c.push({ type: 1, index: o, name: x[2], strings: b, ctor: x[1] === "." ? oi : x[1] === "?" ? ai : x[1] === "@" ? ci : pt });
|
|
1793
|
+
} else
|
|
1794
|
+
c.push({ type: 6, index: o });
|
|
1795
|
+
}
|
|
1796
|
+
for (const u of d)
|
|
1797
|
+
r.removeAttribute(u);
|
|
1798
|
+
}
|
|
1799
|
+
if (ze.test(r.tagName)) {
|
|
1800
|
+
const d = r.textContent.split(C), u = d.length - 1;
|
|
1801
|
+
if (u > 0) {
|
|
1802
|
+
r.textContent = M ? M.emptyScript : "";
|
|
1803
|
+
for (let p = 0; p < u; p++)
|
|
1804
|
+
r.append(d[p], F()), j.nextNode(), c.push({ type: 2, index: ++o });
|
|
1805
|
+
r.append(d[u], F());
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
} else if (r.nodeType === 8)
|
|
1809
|
+
if (r.data === He)
|
|
1810
|
+
c.push({ type: 2, index: o });
|
|
1811
|
+
else {
|
|
1812
|
+
let d = -1;
|
|
1813
|
+
for (; (d = r.data.indexOf(C, d + 1)) !== -1; )
|
|
1814
|
+
c.push({ type: 7, index: o }), d += C.length - 1;
|
|
1815
|
+
}
|
|
1816
|
+
o++;
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
static createElement(t, s) {
|
|
1820
|
+
const i = T.createElement("template");
|
|
1821
|
+
return i.innerHTML = t, i;
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
function z(e, t, s = e, i) {
|
|
1825
|
+
var r, o, n, a;
|
|
1826
|
+
if (t === R)
|
|
1827
|
+
return t;
|
|
1828
|
+
let c = i !== void 0 ? (r = s._$Co) === null || r === void 0 ? void 0 : r[i] : s._$Cl;
|
|
1829
|
+
const l = K(t) ? void 0 : t._$litDirective$;
|
|
1830
|
+
return (c == null ? void 0 : c.constructor) !== l && ((o = c == null ? void 0 : c._$AO) === null || o === void 0 || o.call(c, !1), l === void 0 ? c = void 0 : (c = new l(e), c._$AT(e, s, i)), i !== void 0 ? ((n = (a = s)._$Co) !== null && n !== void 0 ? n : a._$Co = [])[i] = c : s._$Cl = c), c !== void 0 && (t = z(e, c._$AS(e, t.values), c, i)), t;
|
|
1831
|
+
}
|
|
1832
|
+
class ri {
|
|
1833
|
+
constructor(t, s) {
|
|
1834
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = s;
|
|
1835
|
+
}
|
|
1836
|
+
get parentNode() {
|
|
1837
|
+
return this._$AM.parentNode;
|
|
1838
|
+
}
|
|
1839
|
+
get _$AU() {
|
|
1840
|
+
return this._$AM._$AU;
|
|
1841
|
+
}
|
|
1842
|
+
u(t) {
|
|
1843
|
+
var s;
|
|
1844
|
+
const { el: { content: i }, parts: r } = this._$AD, o = ((s = t == null ? void 0 : t.creationScope) !== null && s !== void 0 ? s : T).importNode(i, !0);
|
|
1845
|
+
j.currentNode = o;
|
|
1846
|
+
let n = j.nextNode(), a = 0, c = 0, l = r[0];
|
|
1847
|
+
for (; l !== void 0; ) {
|
|
1848
|
+
if (a === l.index) {
|
|
1849
|
+
let h;
|
|
1850
|
+
l.type === 2 ? h = new X(n, n.nextSibling, this, t) : l.type === 1 ? h = new l.ctor(n, l.name, l.strings, this, t) : l.type === 6 && (h = new hi(n, this, t)), this._$AV.push(h), l = r[++c];
|
|
1851
|
+
}
|
|
1852
|
+
a !== (l == null ? void 0 : l.index) && (n = j.nextNode(), a++);
|
|
1853
|
+
}
|
|
1854
|
+
return j.currentNode = T, o;
|
|
1855
|
+
}
|
|
1856
|
+
v(t) {
|
|
1857
|
+
let s = 0;
|
|
1858
|
+
for (const i of this._$AV)
|
|
1859
|
+
i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, s), s += i.strings.length - 2) : i._$AI(t[s])), s++;
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
class X {
|
|
1863
|
+
constructor(t, s, i, r) {
|
|
1864
|
+
var o;
|
|
1865
|
+
this.type = 2, this._$AH = g, this._$AN = void 0, this._$AA = t, this._$AB = s, this._$AM = i, this.options = r, this._$Cp = (o = r == null ? void 0 : r.isConnected) === null || o === void 0 || o;
|
|
1866
|
+
}
|
|
1867
|
+
get _$AU() {
|
|
1868
|
+
var t, s;
|
|
1869
|
+
return (s = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && s !== void 0 ? s : this._$Cp;
|
|
1870
|
+
}
|
|
1871
|
+
get parentNode() {
|
|
1872
|
+
let t = this._$AA.parentNode;
|
|
1873
|
+
const s = this._$AM;
|
|
1874
|
+
return s !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = s.parentNode), t;
|
|
1875
|
+
}
|
|
1876
|
+
get startNode() {
|
|
1877
|
+
return this._$AA;
|
|
1878
|
+
}
|
|
1879
|
+
get endNode() {
|
|
1880
|
+
return this._$AB;
|
|
1881
|
+
}
|
|
1882
|
+
_$AI(t, s = this) {
|
|
1883
|
+
t = z(this, t, s), K(t) ? t === g || t == null || t === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : t !== this._$AH && t !== R && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : ei(t) ? this.T(t) : this._(t);
|
|
1884
|
+
}
|
|
1885
|
+
k(t) {
|
|
1886
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
1887
|
+
}
|
|
1888
|
+
$(t) {
|
|
1889
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
1890
|
+
}
|
|
1891
|
+
_(t) {
|
|
1892
|
+
this._$AH !== g && K(this._$AH) ? this._$AA.nextSibling.data = t : this.$(T.createTextNode(t)), this._$AH = t;
|
|
1893
|
+
}
|
|
1894
|
+
g(t) {
|
|
1895
|
+
var s;
|
|
1896
|
+
const { values: i, _$litType$: r } = t, o = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = Z.createElement(Ve(r.h, r.h[0]), this.options)), r);
|
|
1897
|
+
if (((s = this._$AH) === null || s === void 0 ? void 0 : s._$AD) === o)
|
|
1898
|
+
this._$AH.v(i);
|
|
1899
|
+
else {
|
|
1900
|
+
const n = new ri(o, this), a = n.u(this.options);
|
|
1901
|
+
n.v(i), this.$(a), this._$AH = n;
|
|
1902
|
+
}
|
|
1903
|
+
}
|
|
1904
|
+
_$AC(t) {
|
|
1905
|
+
let s = _e.get(t.strings);
|
|
1906
|
+
return s === void 0 && _e.set(t.strings, s = new Z(t)), s;
|
|
1907
|
+
}
|
|
1908
|
+
T(t) {
|
|
1909
|
+
Me(this._$AH) || (this._$AH = [], this._$AR());
|
|
1910
|
+
const s = this._$AH;
|
|
1911
|
+
let i, r = 0;
|
|
1912
|
+
for (const o of t)
|
|
1913
|
+
r === s.length ? s.push(i = new X(this.k(F()), this.k(F()), this, this.options)) : i = s[r], i._$AI(o), r++;
|
|
1914
|
+
r < s.length && (this._$AR(i && i._$AB.nextSibling, r), s.length = r);
|
|
1915
|
+
}
|
|
1916
|
+
_$AR(t = this._$AA.nextSibling, s) {
|
|
1917
|
+
var i;
|
|
1918
|
+
for ((i = this._$AP) === null || i === void 0 || i.call(this, !1, !0, s); t && t !== this._$AB; ) {
|
|
1919
|
+
const r = t.nextSibling;
|
|
1920
|
+
t.remove(), t = r;
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
setConnected(t) {
|
|
1924
|
+
var s;
|
|
1925
|
+
this._$AM === void 0 && (this._$Cp = t, (s = this._$AP) === null || s === void 0 || s.call(this, t));
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
class pt {
|
|
1929
|
+
constructor(t, s, i, r, o) {
|
|
1930
|
+
this.type = 1, this._$AH = g, this._$AN = void 0, this.element = t, this.name = s, this._$AM = r, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = g;
|
|
1931
|
+
}
|
|
1932
|
+
get tagName() {
|
|
1933
|
+
return this.element.tagName;
|
|
1934
|
+
}
|
|
1935
|
+
get _$AU() {
|
|
1936
|
+
return this._$AM._$AU;
|
|
1937
|
+
}
|
|
1938
|
+
_$AI(t, s = this, i, r) {
|
|
1939
|
+
const o = this.strings;
|
|
1940
|
+
let n = !1;
|
|
1941
|
+
if (o === void 0)
|
|
1942
|
+
t = z(this, t, s, 0), n = !K(t) || t !== this._$AH && t !== R, n && (this._$AH = t);
|
|
1943
|
+
else {
|
|
1944
|
+
const a = t;
|
|
1945
|
+
let c, l;
|
|
1946
|
+
for (t = o[0], c = 0; c < o.length - 1; c++)
|
|
1947
|
+
l = z(this, a[i + c], s, c), l === R && (l = this._$AH[c]), n || (n = !K(l) || l !== this._$AH[c]), l === g ? t = g : t !== g && (t += (l != null ? l : "") + o[c + 1]), this._$AH[c] = l;
|
|
1948
|
+
}
|
|
1949
|
+
n && !r && this.j(t);
|
|
1950
|
+
}
|
|
1951
|
+
j(t) {
|
|
1952
|
+
t === g ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t != null ? t : "");
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
class oi extends pt {
|
|
1956
|
+
constructor() {
|
|
1957
|
+
super(...arguments), this.type = 3;
|
|
1958
|
+
}
|
|
1959
|
+
j(t) {
|
|
1960
|
+
this.element[this.name] = t === g ? void 0 : t;
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
const ni = M ? M.emptyScript : "";
|
|
1964
|
+
class ai extends pt {
|
|
1965
|
+
constructor() {
|
|
1966
|
+
super(...arguments), this.type = 4;
|
|
1967
|
+
}
|
|
1968
|
+
j(t) {
|
|
1969
|
+
t && t !== g ? this.element.setAttribute(this.name, ni) : this.element.removeAttribute(this.name);
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
class ci extends pt {
|
|
1973
|
+
constructor(t, s, i, r, o) {
|
|
1974
|
+
super(t, s, i, r, o), this.type = 5;
|
|
1975
|
+
}
|
|
1976
|
+
_$AI(t, s = this) {
|
|
1977
|
+
var i;
|
|
1978
|
+
if ((t = (i = z(this, t, s, 0)) !== null && i !== void 0 ? i : g) === R)
|
|
1979
|
+
return;
|
|
1980
|
+
const r = this._$AH, o = t === g && r !== g || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, n = t !== g && (r === g || o);
|
|
1981
|
+
o && this.element.removeEventListener(this.name, this, r), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
1982
|
+
}
|
|
1983
|
+
handleEvent(t) {
|
|
1984
|
+
var s, i;
|
|
1985
|
+
typeof this._$AH == "function" ? this._$AH.call((i = (s = this.options) === null || s === void 0 ? void 0 : s.host) !== null && i !== void 0 ? i : this.element, t) : this._$AH.handleEvent(t);
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
class hi {
|
|
1989
|
+
constructor(t, s, i) {
|
|
1990
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = s, this.options = i;
|
|
1991
|
+
}
|
|
1992
|
+
get _$AU() {
|
|
1993
|
+
return this._$AM._$AU;
|
|
1994
|
+
}
|
|
1995
|
+
_$AI(t) {
|
|
1996
|
+
z(this, t);
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
const xe = nt.litHtmlPolyfillSupport;
|
|
2000
|
+
xe == null || xe(Z, X), ((Pt = nt.litHtmlVersions) !== null && Pt !== void 0 ? Pt : nt.litHtmlVersions = []).push("2.8.0");
|
|
2001
|
+
const li = (e, t, s) => {
|
|
2002
|
+
var i, r;
|
|
2003
|
+
const o = (i = s == null ? void 0 : s.renderBefore) !== null && i !== void 0 ? i : t;
|
|
2004
|
+
let n = o._$litPart$;
|
|
2005
|
+
if (n === void 0) {
|
|
2006
|
+
const a = (r = s == null ? void 0 : s.renderBefore) !== null && r !== void 0 ? r : null;
|
|
2007
|
+
o._$litPart$ = n = new X(t.insertBefore(F(), a), a, void 0, s != null ? s : {});
|
|
2008
|
+
}
|
|
2009
|
+
return n._$AI(e), n;
|
|
2010
|
+
};
|
|
2011
|
+
/**
|
|
2012
|
+
* @license
|
|
2013
|
+
* Copyright 2017 Google LLC
|
|
2014
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2015
|
+
*/
|
|
2016
|
+
var kt, Nt;
|
|
2017
|
+
let J = class extends L {
|
|
2018
|
+
constructor() {
|
|
2019
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
2020
|
+
}
|
|
2021
|
+
createRenderRoot() {
|
|
2022
|
+
var e, t;
|
|
2023
|
+
const s = super.createRenderRoot();
|
|
2024
|
+
return (e = (t = this.renderOptions).renderBefore) !== null && e !== void 0 || (t.renderBefore = s.firstChild), s;
|
|
2025
|
+
}
|
|
2026
|
+
update(e) {
|
|
2027
|
+
const t = this.render();
|
|
2028
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = li(t, this.renderRoot, this.renderOptions);
|
|
2029
|
+
}
|
|
2030
|
+
connectedCallback() {
|
|
2031
|
+
var e;
|
|
2032
|
+
super.connectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!0);
|
|
2033
|
+
}
|
|
2034
|
+
disconnectedCallback() {
|
|
2035
|
+
var e;
|
|
2036
|
+
super.disconnectedCallback(), (e = this._$Do) === null || e === void 0 || e.setConnected(!1);
|
|
2037
|
+
}
|
|
2038
|
+
render() {
|
|
2039
|
+
return R;
|
|
2040
|
+
}
|
|
2041
|
+
};
|
|
2042
|
+
J.finalized = !0, J._$litElement$ = !0, (kt = globalThis.litElementHydrateSupport) === null || kt === void 0 || kt.call(globalThis, { LitElement: J });
|
|
2043
|
+
const Ae = globalThis.litElementPolyfillSupport;
|
|
2044
|
+
Ae == null || Ae({ LitElement: J });
|
|
2045
|
+
((Nt = globalThis.litElementVersions) !== null && Nt !== void 0 ? Nt : globalThis.litElementVersions = []).push("3.3.3");
|
|
2046
|
+
/**
|
|
2047
|
+
* @license
|
|
2048
|
+
* Copyright 2017 Google LLC
|
|
2049
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2050
|
+
*/
|
|
2051
|
+
const di = (e, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? Ht(Ut({}, t), { finisher(s) {
|
|
2052
|
+
s.createProperty(t.key, e);
|
|
2053
|
+
} }) : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
|
|
2054
|
+
typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
|
|
2055
|
+
}, finisher(s) {
|
|
2056
|
+
s.createProperty(t.key, e);
|
|
2057
|
+
} }, ui = (e, t, s) => {
|
|
2058
|
+
t.constructor.createProperty(s, e);
|
|
2059
|
+
};
|
|
2060
|
+
function at(e) {
|
|
2061
|
+
return (t, s) => s !== void 0 ? ui(e, t, s) : di(e, t);
|
|
2062
|
+
}
|
|
2063
|
+
/**
|
|
2064
|
+
* @license
|
|
2065
|
+
* Copyright 2017 Google LLC
|
|
2066
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2067
|
+
*/
|
|
2068
|
+
function E(e) {
|
|
2069
|
+
return at(Ht(Ut({}, e), { state: !0 }));
|
|
2070
|
+
}
|
|
2071
|
+
/**
|
|
2072
|
+
* @license
|
|
2073
|
+
* Copyright 2017 Google LLC
|
|
2074
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2075
|
+
*/
|
|
2076
|
+
const pi = ({ finisher: e, descriptor: t }) => (s, i) => {
|
|
2077
|
+
var r;
|
|
2078
|
+
if (i === void 0) {
|
|
2079
|
+
const o = (r = s.originalKey) !== null && r !== void 0 ? r : s.key, n = t != null ? { kind: "method", placement: "prototype", key: o, descriptor: t(s.key) } : Ht(Ut({}, s), { key: o });
|
|
2080
|
+
return e != null && (n.finisher = function(a) {
|
|
2081
|
+
e(a, o);
|
|
2082
|
+
}), n;
|
|
2083
|
+
}
|
|
2084
|
+
{
|
|
2085
|
+
const o = s.constructor;
|
|
2086
|
+
t !== void 0 && Object.defineProperty(s, i, t(i)), e == null || e(o, i);
|
|
2087
|
+
}
|
|
2088
|
+
};
|
|
2089
|
+
/**
|
|
2090
|
+
* @license
|
|
2091
|
+
* Copyright 2021 Google LLC
|
|
2092
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2093
|
+
*/
|
|
2094
|
+
var jt;
|
|
2095
|
+
((jt = window.HTMLSlotElement) === null || jt === void 0 ? void 0 : jt.prototype.assignedElements) != null;
|
|
2096
|
+
/**
|
|
2097
|
+
* @license
|
|
2098
|
+
* Copyright 2017 Google LLC
|
|
2099
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2100
|
+
*/
|
|
2101
|
+
const gi = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, mi = (e) => (...t) => ({ _$litDirective$: e, values: t });
|
|
2102
|
+
let fi = class {
|
|
2103
|
+
constructor(e) {
|
|
2104
|
+
}
|
|
2105
|
+
get _$AU() {
|
|
2106
|
+
return this._$AM._$AU;
|
|
2107
|
+
}
|
|
2108
|
+
_$AT(e, t, s) {
|
|
2109
|
+
this._$Ct = e, this._$AM = t, this._$Ci = s;
|
|
2110
|
+
}
|
|
2111
|
+
_$AS(e, t) {
|
|
2112
|
+
return this.update(e, t);
|
|
2113
|
+
}
|
|
2114
|
+
update(e, t) {
|
|
2115
|
+
return this.render(...t);
|
|
2116
|
+
}
|
|
2117
|
+
};
|
|
2118
|
+
/**
|
|
2119
|
+
* @license
|
|
2120
|
+
* Copyright 2018 Google LLC
|
|
2121
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2122
|
+
*/
|
|
2123
|
+
const vi = mi(class extends fi {
|
|
2124
|
+
constructor(e) {
|
|
2125
|
+
var t;
|
|
2126
|
+
if (super(e), e.type !== gi.ATTRIBUTE || e.name !== "class" || ((t = e.strings) === null || t === void 0 ? void 0 : t.length) > 2)
|
|
2127
|
+
throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
2128
|
+
}
|
|
2129
|
+
render(e) {
|
|
2130
|
+
return " " + Object.keys(e).filter((t) => e[t]).join(" ") + " ";
|
|
2131
|
+
}
|
|
2132
|
+
update(e, [t]) {
|
|
2133
|
+
var s, i;
|
|
2134
|
+
if (this.it === void 0) {
|
|
2135
|
+
this.it = /* @__PURE__ */ new Set(), e.strings !== void 0 && (this.nt = new Set(e.strings.join(" ").split(/\s/).filter((o) => o !== "")));
|
|
2136
|
+
for (const o in t)
|
|
2137
|
+
t[o] && !(!((s = this.nt) === null || s === void 0) && s.has(o)) && this.it.add(o);
|
|
2138
|
+
return this.render(t);
|
|
2139
|
+
}
|
|
2140
|
+
const r = e.element.classList;
|
|
2141
|
+
this.it.forEach((o) => {
|
|
2142
|
+
o in t || (r.remove(o), this.it.delete(o));
|
|
2143
|
+
});
|
|
2144
|
+
for (const o in t) {
|
|
2145
|
+
const n = !!t[o];
|
|
2146
|
+
n === this.it.has(o) || !((i = this.nt) === null || i === void 0) && i.has(o) || (n ? (r.add(o), this.it.add(o)) : (r.remove(o), this.it.delete(o)));
|
|
2147
|
+
}
|
|
2148
|
+
return R;
|
|
2149
|
+
}
|
|
2150
|
+
});
|
|
2151
|
+
var yi = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, gt = (e, t, s, i) => {
|
|
2152
|
+
for (var r = i > 1 ? void 0 : i ? bi(t, s) : t, o = e.length - 1, n; o >= 0; o--)
|
|
2153
|
+
(n = e[o]) && (r = (i ? n(t, s, r) : n(r)) || r);
|
|
2154
|
+
return i && r && yi(t, s, r), r;
|
|
2155
|
+
};
|
|
2156
|
+
class D extends J {
|
|
2157
|
+
constructor() {
|
|
2158
|
+
super(...arguments), this.active = !1, this.loaded = !1;
|
|
2159
|
+
}
|
|
2160
|
+
connectedCallback() {
|
|
2161
|
+
return U(this, null, function* () {
|
|
2162
|
+
Qe(D.prototype, this, "connectedCallback").call(this), this.icon = yield this._renderSymbol(this.symbol), this.loaded = !0;
|
|
2163
|
+
});
|
|
2164
|
+
}
|
|
2165
|
+
_toggleActive() {
|
|
2166
|
+
this.active = !this.active;
|
|
2167
|
+
}
|
|
2168
|
+
_renderSymbol(t) {
|
|
2169
|
+
return U(this, null, function* () {
|
|
2170
|
+
const s = (i) => U(this, null, function* () {
|
|
2171
|
+
return yield import("./index-9688347a-02584d39.js").then((r) => r[i]);
|
|
2172
|
+
});
|
|
2173
|
+
if (t) {
|
|
2174
|
+
const { type: i, content: r } = t;
|
|
2175
|
+
switch (i) {
|
|
2176
|
+
case "Telia": {
|
|
2177
|
+
const o = yield s(r);
|
|
2178
|
+
return o ? G`<telia-icon
|
|
2179
|
+
class="trigger-icon"
|
|
2180
|
+
svg=${o.svg}
|
|
2181
|
+
size="lg"
|
|
2182
|
+
></telia-icon>` : g;
|
|
2183
|
+
}
|
|
2184
|
+
case "FontAwesome":
|
|
2185
|
+
return G`<i class="trigger-fa-icon fa fa-${r}"></i>`;
|
|
2186
|
+
case "Uri":
|
|
2187
|
+
return G`<i
|
|
2188
|
+
class="trigger-custom-icon"
|
|
2189
|
+
style="background: url(${r}) no-repeat center center;background-size: contain;"
|
|
2190
|
+
></i>`;
|
|
2191
|
+
default:
|
|
2192
|
+
return g;
|
|
2193
|
+
}
|
|
2194
|
+
}
|
|
2195
|
+
});
|
|
2196
|
+
}
|
|
2197
|
+
render() {
|
|
2198
|
+
return G`<button
|
|
2199
|
+
class=${vi({
|
|
2200
|
+
trigger: !0,
|
|
2201
|
+
active: this.active,
|
|
2202
|
+
rendered: this.loaded
|
|
2203
|
+
})}
|
|
2204
|
+
@click=${this._toggleActive}
|
|
2205
|
+
>
|
|
2206
|
+
${this.icon}
|
|
2207
|
+
<span class="trigger-close">
|
|
2208
|
+
<svg
|
|
2209
|
+
width="18"
|
|
2210
|
+
height="9"
|
|
2211
|
+
viewBox="0 0 18 9"
|
|
2212
|
+
fill="none"
|
|
2213
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
2214
|
+
>
|
|
2215
|
+
<path
|
|
2216
|
+
d="M9 9C8.81794 9.00045 8.63759 8.96634 8.46939 8.89965C8.3012 8.83295 8.14851 8.735 8.02015 8.61145L0.194523 1.12367C0.068294 0.99862 -0.00155266 0.831133 2.61958e-05 0.657285C0.00160506 0.483436 0.0744832 0.317136 0.202964 0.194202C0.331445 0.0712675 0.505249 0.00153576 0.686941 2.50649e-05C0.868634 -0.00148563 1.04368 0.0653456 1.17437 0.186125L9 7.6739L16.8256 0.186125C16.9563 0.0653456 17.1314 -0.00148563 17.3131 2.50649e-05C17.4948 0.00153576 17.6686 0.0712675 17.797 0.194202C17.9255 0.317136 17.9984 0.483436 18 0.657285C18.0016 0.831133 17.9317 0.99862 17.8055 1.12367L9.97985 8.61145C9.85149 8.735 9.6988 8.83295 9.53061 8.89965C9.36241 8.96634 9.18206 9.00045 9 9Z"
|
|
2217
|
+
fill="white"
|
|
2218
|
+
/>
|
|
2219
|
+
</svg>
|
|
2220
|
+
</span>
|
|
2221
|
+
<span class="trigger-loader">
|
|
2222
|
+
<svg viewBox="25 25 50 50">
|
|
2223
|
+
<circle
|
|
2224
|
+
cx="50"
|
|
2225
|
+
cy="50"
|
|
2226
|
+
r="20"
|
|
2227
|
+
fill="none"
|
|
2228
|
+
stroke="#000"
|
|
2229
|
+
stroke-width="2"
|
|
2230
|
+
stroke-miterlimit="10"
|
|
2231
|
+
/>
|
|
2232
|
+
</svg>
|
|
2233
|
+
</span>
|
|
2234
|
+
</button>`;
|
|
2235
|
+
}
|
|
2236
|
+
}
|
|
2237
|
+
D.styles = [
|
|
2238
|
+
Le`
|
|
2239
|
+
:host {
|
|
2240
|
+
--voca-rem-multiplier: 0.625;
|
|
2241
|
+
display: block;
|
|
2242
|
+
box-sizing: border-box;
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
.trigger {
|
|
2246
|
+
position: fixed;
|
|
2247
|
+
transform: scale(0);
|
|
2248
|
+
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
|
2249
|
+
bottom: 20px;
|
|
2250
|
+
right: 20px;
|
|
2251
|
+
z-index: 5;
|
|
2252
|
+
display: flex;
|
|
2253
|
+
align-items: center;
|
|
2254
|
+
justify-content: center;
|
|
2255
|
+
border: none;
|
|
2256
|
+
line-height: 55px;
|
|
2257
|
+
height: 55px;
|
|
2258
|
+
width: 55px;
|
|
2259
|
+
border-radius: 55px;
|
|
2260
|
+
cursor: pointer;
|
|
2261
|
+
background-color: #990ae3;
|
|
2262
|
+
font-family: Lato;
|
|
2263
|
+
text-decoration: none;
|
|
2264
|
+
border: 3px dashed transparent;
|
|
2265
|
+
box-sizing: border-box;
|
|
2266
|
+
transition: transform 200ms ease-out;
|
|
2267
|
+
}
|
|
2268
|
+
.trigger:hover {
|
|
2269
|
+
transform: scale(1.1) !important;
|
|
2270
|
+
}
|
|
2271
|
+
.trigger.rendered {
|
|
2272
|
+
transform: scale(1);
|
|
2273
|
+
}
|
|
2274
|
+
.trigger.active .trigger-icon {
|
|
2275
|
+
opacity: 0;
|
|
2276
|
+
transform: rotate(-180deg) scale(0);
|
|
2277
|
+
}
|
|
2278
|
+
.trigger.active .trigger-close {
|
|
2279
|
+
opacity: 1;
|
|
2280
|
+
transform: rotate(0deg) scale(1);
|
|
2281
|
+
}
|
|
2282
|
+
|
|
2283
|
+
.trigger-icon {
|
|
2284
|
+
display: inline-block;
|
|
2285
|
+
line-height: inherit;
|
|
2286
|
+
text-align: center;
|
|
2287
|
+
opacity: 1;
|
|
2288
|
+
transform: rotate(0deg) scale(1);
|
|
2289
|
+
transition:
|
|
2290
|
+
opacity 200ms ease-out,
|
|
2291
|
+
transform 200ms ease-out;
|
|
2292
|
+
color: #ffffff;
|
|
2293
|
+
}
|
|
2294
|
+
.trigger-close {
|
|
2295
|
+
opacity: 0;
|
|
2296
|
+
transition: transform 200ms ease-out;
|
|
2297
|
+
transform: rotate(180deg) scale(0);
|
|
2298
|
+
position: absolute;
|
|
2299
|
+
top: 0;
|
|
2300
|
+
bottom: 0;
|
|
2301
|
+
left: 0;
|
|
2302
|
+
right: 0;
|
|
2303
|
+
display: flex;
|
|
2304
|
+
justify-content: center;
|
|
2305
|
+
align-items: center;
|
|
2306
|
+
fill: #ffffff;
|
|
2307
|
+
}
|
|
2308
|
+
`
|
|
2309
|
+
];
|
|
2310
|
+
gt([
|
|
2311
|
+
at({ attribute: !1 })
|
|
2312
|
+
], D.prototype, "symbol", 2);
|
|
2313
|
+
gt([
|
|
2314
|
+
E()
|
|
2315
|
+
], D.prototype, "active", 2);
|
|
2316
|
+
gt([
|
|
2317
|
+
E()
|
|
2318
|
+
], D.prototype, "loaded", 2);
|
|
2319
|
+
gt([
|
|
2320
|
+
E()
|
|
2321
|
+
], D.prototype, "icon", 2);
|
|
2322
|
+
/**
|
|
2323
|
+
* @license
|
|
2324
|
+
* Copyright 2021 Google LLC
|
|
2325
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2326
|
+
*/
|
|
2327
|
+
let We = class extends Event {
|
|
2328
|
+
constructor(e, t, s) {
|
|
2329
|
+
super("context-request", { bubbles: !0, composed: !0 }), this.context = e, this.callback = t, this.subscribe = s != null && s;
|
|
2330
|
+
}
|
|
2331
|
+
};
|
|
2332
|
+
/**
|
|
2333
|
+
* @license
|
|
2334
|
+
* Copyright 2021 Google LLC
|
|
2335
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2336
|
+
*/
|
|
2337
|
+
/**
|
|
2338
|
+
* @license
|
|
2339
|
+
* Copyright 2021 Google LLC
|
|
2340
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2341
|
+
*/
|
|
2342
|
+
let wi = class {
|
|
2343
|
+
constructor(e, t, s, i) {
|
|
2344
|
+
var r;
|
|
2345
|
+
if (this.subscribe = !1, this.provided = !1, this.value = void 0, this.t = (o, n) => {
|
|
2346
|
+
this.unsubscribe && (this.unsubscribe !== n && (this.provided = !1, this.unsubscribe()), this.subscribe || this.unsubscribe()), this.value = o, this.host.requestUpdate(), this.provided && !this.subscribe || (this.provided = !0, this.callback && this.callback(o, n)), this.unsubscribe = n;
|
|
2347
|
+
}, this.host = e, t.context !== void 0) {
|
|
2348
|
+
const o = t;
|
|
2349
|
+
this.context = o.context, this.callback = o.callback, this.subscribe = (r = o.subscribe) !== null && r !== void 0 && r;
|
|
2350
|
+
} else
|
|
2351
|
+
this.context = t, this.callback = s, this.subscribe = i != null && i;
|
|
2352
|
+
this.host.addController(this);
|
|
2353
|
+
}
|
|
2354
|
+
hostConnected() {
|
|
2355
|
+
this.dispatchRequest();
|
|
2356
|
+
}
|
|
2357
|
+
hostDisconnected() {
|
|
2358
|
+
this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0);
|
|
2359
|
+
}
|
|
2360
|
+
dispatchRequest() {
|
|
2361
|
+
this.host.dispatchEvent(new We(this.context, this.t, this.subscribe));
|
|
2362
|
+
}
|
|
2363
|
+
};
|
|
2364
|
+
/**
|
|
2365
|
+
* @license
|
|
2366
|
+
* Copyright 2021 Google LLC
|
|
2367
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2368
|
+
*/
|
|
2369
|
+
class $i {
|
|
2370
|
+
constructor(t) {
|
|
2371
|
+
this.subscriptions = /* @__PURE__ */ new Map(), this.updateObservers = () => {
|
|
2372
|
+
for (const [s, { disposer: i }] of this.subscriptions)
|
|
2373
|
+
s(this.o, i);
|
|
2374
|
+
}, t !== void 0 && (this.value = t);
|
|
2375
|
+
}
|
|
2376
|
+
get value() {
|
|
2377
|
+
return this.o;
|
|
2378
|
+
}
|
|
2379
|
+
set value(t) {
|
|
2380
|
+
this.setValue(t);
|
|
2381
|
+
}
|
|
2382
|
+
setValue(t, s = !1) {
|
|
2383
|
+
const i = s || !Object.is(t, this.o);
|
|
2384
|
+
this.o = t, i && this.updateObservers();
|
|
2385
|
+
}
|
|
2386
|
+
addCallback(t, s, i) {
|
|
2387
|
+
if (!i)
|
|
2388
|
+
return void t(this.value);
|
|
2389
|
+
this.subscriptions.has(t) || this.subscriptions.set(t, { disposer: () => {
|
|
2390
|
+
this.subscriptions.delete(t);
|
|
2391
|
+
}, consumerHost: s });
|
|
2392
|
+
const { disposer: r } = this.subscriptions.get(t);
|
|
2393
|
+
t(this.value, r);
|
|
2394
|
+
}
|
|
2395
|
+
clearCallbacks() {
|
|
2396
|
+
this.subscriptions.clear();
|
|
2397
|
+
}
|
|
2398
|
+
}
|
|
2399
|
+
/**
|
|
2400
|
+
* @license
|
|
2401
|
+
* Copyright 2021 Google LLC
|
|
2402
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2403
|
+
*/
|
|
2404
|
+
class _i extends Event {
|
|
2405
|
+
constructor(t) {
|
|
2406
|
+
super("context-provider", { bubbles: !0, composed: !0 }), this.context = t;
|
|
2407
|
+
}
|
|
2408
|
+
}
|
|
2409
|
+
class W extends $i {
|
|
2410
|
+
constructor(t, s, i) {
|
|
2411
|
+
super(s.context !== void 0 ? s.initialValue : i), this.onContextRequest = (r) => {
|
|
2412
|
+
const o = r.composedPath()[0];
|
|
2413
|
+
r.context === this.context && o !== this.host && (r.stopPropagation(), this.addCallback(r.callback, o, r.subscribe));
|
|
2414
|
+
}, this.onProviderRequest = (r) => {
|
|
2415
|
+
const o = r.composedPath()[0];
|
|
2416
|
+
if (r.context === this.context && o !== this.host) {
|
|
2417
|
+
for (const [n, { consumerHost: a }] of this.subscriptions)
|
|
2418
|
+
a.dispatchEvent(new We(this.context, n, !0));
|
|
2419
|
+
r.stopPropagation();
|
|
2420
|
+
}
|
|
2421
|
+
}, this.host = t, s.context !== void 0 ? this.context = s.context : this.context = s, this.attachListeners(), this.host.addController(this);
|
|
2422
|
+
}
|
|
2423
|
+
attachListeners() {
|
|
2424
|
+
this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
|
|
2425
|
+
}
|
|
2426
|
+
hostConnected() {
|
|
2427
|
+
this.host.dispatchEvent(new _i(this.context));
|
|
2428
|
+
}
|
|
2429
|
+
}
|
|
2430
|
+
/**
|
|
2431
|
+
* @license
|
|
2432
|
+
* Copyright 2022 Google LLC
|
|
2433
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
2434
|
+
*/
|
|
2435
|
+
function xi({ context: e, subscribe: t }) {
|
|
2436
|
+
return pi({ finisher: (s, i) => {
|
|
2437
|
+
s.addInitializer((r) => {
|
|
2438
|
+
new wi(r, { context: e, callback: (o) => {
|
|
2439
|
+
r[i] = o;
|
|
2440
|
+
}, subscribe: t });
|
|
2441
|
+
});
|
|
2442
|
+
} });
|
|
2443
|
+
}
|
|
2444
|
+
const Ai = "children", Ci = "descriptor", Ei = "container", Oi = "context", Pi = "layout", Si = "properties";
|
|
2445
|
+
class ki {
|
|
2446
|
+
constructor(t) {
|
|
2447
|
+
(this.host = t).addController(this);
|
|
2448
|
+
}
|
|
2449
|
+
hostConnected() {
|
|
2450
|
+
}
|
|
2451
|
+
hostDisconnected() {
|
|
2452
|
+
}
|
|
2453
|
+
setDescriptor(t) {
|
|
2454
|
+
this._descriptor = t;
|
|
2455
|
+
}
|
|
2456
|
+
setContainer(t) {
|
|
2457
|
+
this._container = t;
|
|
2458
|
+
}
|
|
2459
|
+
dispatch(t, s) {
|
|
2460
|
+
return U(this, null, function* () {
|
|
2461
|
+
if (!this._container || !this._descriptor)
|
|
2462
|
+
return;
|
|
2463
|
+
const i = yield Wt.getInstance(
|
|
2464
|
+
this._container
|
|
2465
|
+
), r = new dt(i).withId(
|
|
2466
|
+
this._descriptor.id
|
|
2467
|
+
);
|
|
2468
|
+
yield i.actions(
|
|
2469
|
+
r,
|
|
2470
|
+
this._descriptor.type || lt()
|
|
2471
|
+
).dispatch(t, s);
|
|
2472
|
+
});
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
const Ni = (e, t, s, i, r) => e.getAsync("componentResolver").then((o) => (o.registerComponent(t, s), ws(e, t, i || (() => {
|
|
2476
|
+
}), t, r))), m = (e, t, s) => {
|
|
2477
|
+
e && s.style.setProperty(t, e);
|
|
2478
|
+
}, ji = (e, t) => {
|
|
2479
|
+
var s, i, r, o, n, a, c, l, h, d, u;
|
|
2480
|
+
m((s = e.colors) == null ? void 0 : s.primary, "--primary-color", t), m((i = e.colors) == null ? void 0 : i.secondary, "--secondary-color", t), m((r = e.colors) == null ? void 0 : r.text, "--text-color", t), m((o = e.colors) == null ? void 0 : o.link, "--link-color", t), m((n = e.colors) == null ? void 0 : n.gray, "--gray-color", t), m((a = e.colors) == null ? void 0 : a.grayDark, "--gray-dark-color", t), m((c = e.spacing) == null ? void 0 : c.xs, "--spacing-xs", t), m((l = e.spacing) == null ? void 0 : l.sm, "--spacing-sm", t), m((h = e.spacing) == null ? void 0 : h.md, "--spacing-md", t), m((d = e.spacing) == null ? void 0 : d.lg, "--spacing-lg", t), m((u = e.spacing) == null ? void 0 : u.xl, "--spacing-xl", t), m(e.boxShadow, "--box-shadow", t), m(e.borderRadius, "--border-radius", t), m(e.borderRadiusSm, "--border-radius-sm", t), m(e.fontFamily, "--font-family", t);
|
|
2481
|
+
}, Ti = (e) => {
|
|
2482
|
+
const t = {};
|
|
2483
|
+
return Object.keys(e).forEach((s) => {
|
|
2484
|
+
s.indexOf("css-") > -1 && (t[s] = e[s]);
|
|
2485
|
+
}), t;
|
|
2486
|
+
}, Ri = (e, t) => {
|
|
2487
|
+
const s = Ti(t);
|
|
2488
|
+
Object.entries(s).forEach(([i, r]) => {
|
|
2489
|
+
e.style.setProperty(i.replace("css-", ""), r);
|
|
2490
|
+
});
|
|
2491
|
+
};
|
|
2492
|
+
var Di = Object.defineProperty, Ii = Object.getOwnPropertyDescriptor, S = (e, t, s, i) => {
|
|
2493
|
+
for (var r = i > 1 ? void 0 : i ? Ii(t, s) : t, o = e.length - 1, n; o >= 0; o--)
|
|
2494
|
+
(n = e[o]) && (r = (i ? n(t, s, r) : n(r)) || r);
|
|
2495
|
+
return i && r && Di(t, s, r), r;
|
|
2496
|
+
};
|
|
2497
|
+
const Li = (e) => {
|
|
2498
|
+
var t;
|
|
2499
|
+
class s extends e {
|
|
2500
|
+
constructor() {
|
|
2501
|
+
super(...arguments), this.entry = "", this._descriptorProvider = new W(
|
|
2502
|
+
this,
|
|
2503
|
+
Ci,
|
|
2504
|
+
void 0
|
|
2505
|
+
), this._childrenProvider = new W(this, Ai, []), this._propertiesProvider = new W(this, Si, {}), this._contextProvider = new W(this, Oi, {}), this._layoutProvider = new W(this, Pi, {}), this.actions = new ki(this), this.context = {}, this.layout = {}, this.properties = {};
|
|
2506
|
+
}
|
|
2507
|
+
connectedCallback() {
|
|
2508
|
+
super.connectedCallback(), this.container && (this.actions.setContainer(this.container), Wt.getInstance(this.container).then(
|
|
2509
|
+
(r) => U(this, null, function* () {
|
|
2510
|
+
var o;
|
|
2511
|
+
const n = r.nodes.get(this.entry);
|
|
2512
|
+
if (n) {
|
|
2513
|
+
this._propertyChangeListener = r.events.subscribe(
|
|
2514
|
+
"components:properties-changed",
|
|
2515
|
+
(h, d) => {
|
|
2516
|
+
n.id === d.node.id && this._setProperties(d.node.attributes.properties);
|
|
2517
|
+
}
|
|
2518
|
+
), this._contextChangeListener = r.events.subscribe(
|
|
2519
|
+
"components:context-changed",
|
|
2520
|
+
(h, d) => {
|
|
2521
|
+
n.id === d.node.id && this._setContext(d.node.attributes.context);
|
|
2522
|
+
}
|
|
2523
|
+
), this._layoutChangeListener = r.events.subscribe(
|
|
2524
|
+
"components:layout-changed",
|
|
2525
|
+
(h, d) => {
|
|
2526
|
+
n.id === d.node.id && this._setLayout(d.node.attributes.layout);
|
|
2527
|
+
}
|
|
2528
|
+
);
|
|
2529
|
+
const a = "default";
|
|
2530
|
+
this._unmountNode = n.mount(this.container), this._setDescriptor(ne(n, a)), this._setProperties(n.attributes.properties), this._setContext(n.attributes.context), this._setLayout(this.layout);
|
|
2531
|
+
const c = n.getChildren(a).map((h) => ne(h));
|
|
2532
|
+
this._childrenProvider.setValue(c);
|
|
2533
|
+
const l = (yield this.container.getAsync("componentResolver")).getComponent(
|
|
2534
|
+
((o = this.descriptor) == null ? void 0 : o.type) || ""
|
|
2535
|
+
);
|
|
2536
|
+
l.then && l.then((h) => {
|
|
2537
|
+
this.component = h.default;
|
|
2538
|
+
});
|
|
2539
|
+
}
|
|
2540
|
+
})
|
|
2541
|
+
));
|
|
2542
|
+
}
|
|
2543
|
+
disconnectedCallback() {
|
|
2544
|
+
super.disconnectedCallback(), this._propertyChangeListener && this._propertyChangeListener(), this._contextChangeListener && this._contextChangeListener(), this._layoutChangeListener && this._layoutChangeListener(), this._unmountNode && this._unmountNode();
|
|
2545
|
+
}
|
|
2546
|
+
updated() {
|
|
2547
|
+
ji(this.context, this.renderRoot.host), this.renderRoot.host.style.setProperty(
|
|
2548
|
+
"--width",
|
|
2549
|
+
this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
|
|
2550
|
+
), Ri(this.renderRoot.host, this.properties);
|
|
2551
|
+
}
|
|
2552
|
+
_setProperties(r) {
|
|
2553
|
+
this._propertiesProvider.setValue(r), this.properties = r;
|
|
2554
|
+
}
|
|
2555
|
+
_setContext(r) {
|
|
2556
|
+
this._contextProvider.setValue(r), this.context = r;
|
|
2557
|
+
}
|
|
2558
|
+
_setLayout(r) {
|
|
2559
|
+
this._layoutProvider.setValue(r), this.layout = r;
|
|
2560
|
+
}
|
|
2561
|
+
_setDescriptor(r) {
|
|
2562
|
+
this.descriptor = r, this._descriptorProvider.setValue(r), this.actions.setDescriptor(r);
|
|
2563
|
+
}
|
|
2564
|
+
}
|
|
2565
|
+
return s.styles = [
|
|
2566
|
+
(t = e.styles) != null ? t : [],
|
|
2567
|
+
Le`
|
|
2568
|
+
:host {
|
|
2569
|
+
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
|
2570
|
+
--spacing-xs: 0.2rem;
|
|
2571
|
+
--spacing-sm: 0.5rem;
|
|
2572
|
+
--spacing-md: 1rem;
|
|
2573
|
+
--spacing-lg: 1.2rem;
|
|
2574
|
+
--spacing-xl: 1.8rem;
|
|
2575
|
+
|
|
2576
|
+
--primary-color: #29003e;
|
|
2577
|
+
--secondary-color: #00558f;
|
|
2578
|
+
--text-color: #222222;
|
|
2579
|
+
--link-color: #990ae3;
|
|
2580
|
+
--gray-color: #efefef;
|
|
2581
|
+
--gray-dark-color: #a6a6a6;
|
|
2582
|
+
|
|
2583
|
+
--box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
|
|
2584
|
+
--border-radius: 1rem;
|
|
2585
|
+
--border-radius-sm: 0.3rem;
|
|
2586
|
+
|
|
2587
|
+
font-family: var(--font-family);
|
|
2588
|
+
grid-column: span var(--width);
|
|
2589
|
+
max-width: 100%;
|
|
2590
|
+
overflow: hidden;
|
|
2591
|
+
box-sizing: border-box;
|
|
2592
|
+
display: block;
|
|
2593
|
+
}
|
|
2594
|
+
* {
|
|
2595
|
+
box-sizing: border-box;
|
|
2596
|
+
}
|
|
2597
|
+
`
|
|
2598
|
+
], S([
|
|
2599
|
+
xi({ context: Ei }),
|
|
2600
|
+
at({ attribute: !1 })
|
|
2601
|
+
], s.prototype, "container", 2), S([
|
|
2602
|
+
at()
|
|
2603
|
+
], s.prototype, "entry", 2), S([
|
|
2604
|
+
E()
|
|
2605
|
+
], s.prototype, "descriptor", 2), S([
|
|
2606
|
+
E()
|
|
2607
|
+
], s.prototype, "component", 2), S([
|
|
2608
|
+
E()
|
|
2609
|
+
], s.prototype, "context", 2), S([
|
|
2610
|
+
E()
|
|
2611
|
+
], s.prototype, "layout", 2), S([
|
|
2612
|
+
E()
|
|
2613
|
+
], s.prototype, "properties", 2), s;
|
|
2614
|
+
}, Ui = (e) => Ni(
|
|
2615
|
+
e,
|
|
2616
|
+
"widget-header",
|
|
2617
|
+
import("./widget-header-f97a5dcf.js"),
|
|
2618
|
+
(t) => {
|
|
2619
|
+
}
|
|
2620
|
+
);
|
|
2621
|
+
export {
|
|
2622
|
+
Li as D,
|
|
2623
|
+
Ui as W
|
|
2624
|
+
};
|
|
2625
|
+
//# sourceMappingURL=index-3485efe5.js.map
|