@telia-ace/widget-core-flamingo 1.0.14 → 1.1.12-rc.10
Sign up to get free protection for your applications and to get access to all the features.
- package/bootstrap.d.ts +3 -0
- package/components/ace-widget.component.d.ts +21 -0
- package/components/trigger.component.d.ts +14 -0
- package/components/unresolved.component.d.ts +7 -0
- package/components/widget.component.d.ts +18 -0
- package/components/wrapper.component.d.ts +13 -0
- package/index-5087564d.mjs +335 -0
- package/index-6dd00f59.js +1 -0
- package/index.d.ts +9 -0
- package/index.js +257 -0
- package/index.mjs +1998 -0
- package/models/application.d.ts +27 -0
- package/models/container.d.ts +16 -0
- package/models/environment.d.ts +12 -0
- package/models/site.d.ts +12 -0
- package/package.json +7 -43
- package/services/component-platform.d.ts +13 -0
- package/services/component-resolver.d.ts +8 -0
- package/services/http-client.service.d.ts +11 -0
- package/types.d.ts +47 -0
- package/utils/map-branding.d.ts +1 -0
- package/LICENSE.txt +0 -6
- package/README.md +0 -3
- package/dist/action-resolver.d.ts +0 -9
- package/dist/action-resolver.d.ts.map +0 -1
- package/dist/bootstrap.d.ts +0 -16
- package/dist/bootstrap.d.ts.map +0 -1
- package/dist/component-platform/actions-controller.d.ts +0 -41
- package/dist/component-platform/actions-controller.d.ts.map +0 -1
- package/dist/component-platform/changeset-provider.d.ts +0 -9
- package/dist/component-platform/changeset-provider.d.ts.map +0 -1
- package/dist/component-platform/component-configuration-api.d.ts +0 -3
- package/dist/component-platform/component-configuration-api.d.ts.map +0 -1
- package/dist/component-platform/component-controller.d.ts +0 -39
- package/dist/component-platform/component-controller.d.ts.map +0 -1
- package/dist/component-platform/component-node-collection.d.ts +0 -19
- package/dist/component-platform/component-node-collection.d.ts.map +0 -1
- package/dist/component-platform/component-node.d.ts +0 -64
- package/dist/component-platform/component-node.d.ts.map +0 -1
- package/dist/component-platform/component-platform.d.ts +0 -55
- package/dist/component-platform/component-platform.d.ts.map +0 -1
- package/dist/component-platform/component-query.d.ts +0 -17
- package/dist/component-platform/component-query.d.ts.map +0 -1
- package/dist/component-platform/create-component-model.d.ts +0 -37
- package/dist/component-platform/create-component-model.d.ts.map +0 -1
- package/dist/component-platform/custom-component-handler.d.ts +0 -22
- package/dist/component-platform/custom-component-handler.d.ts.map +0 -1
- package/dist/component-platform/descriptor.d.ts +0 -9
- package/dist/component-platform/descriptor.d.ts.map +0 -1
- package/dist/component-platform/extend-component.d.ts +0 -9
- package/dist/component-platform/extend-component.d.ts.map +0 -1
- package/dist/component-platform/index.d.ts +0 -19
- package/dist/component-platform/index.d.ts.map +0 -1
- package/dist/component-platform/queries.d.ts +0 -7
- package/dist/component-platform/queries.d.ts.map +0 -1
- package/dist/component-platform/state-processor.d.ts +0 -13
- package/dist/component-platform/state-processor.d.ts.map +0 -1
- package/dist/component-resolver.d.ts +0 -15
- package/dist/component-resolver.d.ts.map +0 -1
- package/dist/environment.d.ts +0 -49
- package/dist/environment.d.ts.map +0 -1
- package/dist/event-subscriber.d.ts +0 -8
- package/dist/event-subscriber.d.ts.map +0 -1
- package/dist/implementation.d.ts +0 -8
- package/dist/implementation.d.ts.map +0 -1
- package/dist/index.d.ts +0 -15
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -2076
- package/dist/index.js.map +0 -1
- package/dist/plugin.d.ts +0 -8
- package/dist/plugin.d.ts.map +0 -1
- package/dist/types/configuration.d.ts +0 -87
- package/dist/types/configuration.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/ui.d.ts +0 -49
- package/dist/types/ui.d.ts.map +0 -1
- package/dist/version.d.ts +0 -3
- package/dist/version.d.ts.map +0 -1
- package/dist/widget-type.d.ts +0 -8
- package/dist/widget-type.d.ts.map +0 -1
package/index.mjs
ADDED
@@ -0,0 +1,1998 @@
|
|
1
|
+
var ht = function(i, t) {
|
2
|
+
return ht = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, r) {
|
3
|
+
e.__proto__ = r;
|
4
|
+
} || function(e, r) {
|
5
|
+
for (var n in r)
|
6
|
+
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
7
|
+
}, ht(i, t);
|
8
|
+
};
|
9
|
+
function N(i, t) {
|
10
|
+
if (typeof t != "function" && t !== null)
|
11
|
+
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
12
|
+
ht(i, t);
|
13
|
+
function e() {
|
14
|
+
this.constructor = i;
|
15
|
+
}
|
16
|
+
i.prototype = t === null ? Object.create(t) : (e.prototype = t.prototype, new e());
|
17
|
+
}
|
18
|
+
function ut(i) {
|
19
|
+
var t = typeof Symbol == "function" && Symbol.iterator, e = t && i[t], r = 0;
|
20
|
+
if (e)
|
21
|
+
return e.call(i);
|
22
|
+
if (i && typeof i.length == "number")
|
23
|
+
return {
|
24
|
+
next: function() {
|
25
|
+
return i && r >= i.length && (i = void 0), { value: i && i[r++], done: !i };
|
26
|
+
}
|
27
|
+
};
|
28
|
+
throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
29
|
+
}
|
30
|
+
function Y(i, t) {
|
31
|
+
var e = typeof Symbol == "function" && i[Symbol.iterator];
|
32
|
+
if (!e)
|
33
|
+
return i;
|
34
|
+
var r = e.call(i), n, s = [], o;
|
35
|
+
try {
|
36
|
+
for (; (t === void 0 || t-- > 0) && !(n = r.next()).done; )
|
37
|
+
s.push(n.value);
|
38
|
+
} catch (a) {
|
39
|
+
o = { error: a };
|
40
|
+
} finally {
|
41
|
+
try {
|
42
|
+
n && !n.done && (e = r.return) && e.call(r);
|
43
|
+
} finally {
|
44
|
+
if (o)
|
45
|
+
throw o.error;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
return s;
|
49
|
+
}
|
50
|
+
function q(i, t, e) {
|
51
|
+
if (e || arguments.length === 2)
|
52
|
+
for (var r = 0, n = t.length, s; r < n; r++)
|
53
|
+
(s || !(r in t)) && (s || (s = Array.prototype.slice.call(t, 0, r)), s[r] = t[r]);
|
54
|
+
return i.concat(s || Array.prototype.slice.call(t));
|
55
|
+
}
|
56
|
+
function m(i) {
|
57
|
+
return typeof i == "function";
|
58
|
+
}
|
59
|
+
function Nt(i) {
|
60
|
+
var t = function(r) {
|
61
|
+
Error.call(r), r.stack = new Error().stack;
|
62
|
+
}, e = i(t);
|
63
|
+
return e.prototype = Object.create(Error.prototype), e.prototype.constructor = e, e;
|
64
|
+
}
|
65
|
+
var it = Nt(function(i) {
|
66
|
+
return function(e) {
|
67
|
+
i(this), this.message = e ? e.length + ` errors occurred during unsubscription:
|
68
|
+
` + e.map(function(r, n) {
|
69
|
+
return n + 1 + ") " + r.toString();
|
70
|
+
}).join(`
|
71
|
+
`) : "", this.name = "UnsubscriptionError", this.errors = e;
|
72
|
+
};
|
73
|
+
});
|
74
|
+
function pt(i, t) {
|
75
|
+
if (i) {
|
76
|
+
var e = i.indexOf(t);
|
77
|
+
0 <= e && i.splice(e, 1);
|
78
|
+
}
|
79
|
+
}
|
80
|
+
var X = function() {
|
81
|
+
function i(t) {
|
82
|
+
this.initialTeardown = t, this.closed = !1, this._parentage = null, this._finalizers = null;
|
83
|
+
}
|
84
|
+
return i.prototype.unsubscribe = function() {
|
85
|
+
var t, e, r, n, s;
|
86
|
+
if (!this.closed) {
|
87
|
+
this.closed = !0;
|
88
|
+
var o = this._parentage;
|
89
|
+
if (o)
|
90
|
+
if (this._parentage = null, Array.isArray(o))
|
91
|
+
try {
|
92
|
+
for (var a = ut(o), c = a.next(); !c.done; c = a.next()) {
|
93
|
+
var h = c.value;
|
94
|
+
h.remove(this);
|
95
|
+
}
|
96
|
+
} catch (v) {
|
97
|
+
t = { error: v };
|
98
|
+
} finally {
|
99
|
+
try {
|
100
|
+
c && !c.done && (e = a.return) && e.call(a);
|
101
|
+
} finally {
|
102
|
+
if (t)
|
103
|
+
throw t.error;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
else
|
107
|
+
o.remove(this);
|
108
|
+
var d = this.initialTeardown;
|
109
|
+
if (m(d))
|
110
|
+
try {
|
111
|
+
d();
|
112
|
+
} catch (v) {
|
113
|
+
s = v instanceof it ? v.errors : [v];
|
114
|
+
}
|
115
|
+
var l = this._finalizers;
|
116
|
+
if (l) {
|
117
|
+
this._finalizers = null;
|
118
|
+
try {
|
119
|
+
for (var f = ut(l), u = f.next(); !u.done; u = f.next()) {
|
120
|
+
var g = u.value;
|
121
|
+
try {
|
122
|
+
$t(g);
|
123
|
+
} catch (v) {
|
124
|
+
s = s ?? [], v instanceof it ? s = q(q([], Y(s)), Y(v.errors)) : s.push(v);
|
125
|
+
}
|
126
|
+
}
|
127
|
+
} catch (v) {
|
128
|
+
r = { error: v };
|
129
|
+
} finally {
|
130
|
+
try {
|
131
|
+
u && !u.done && (n = f.return) && n.call(f);
|
132
|
+
} finally {
|
133
|
+
if (r)
|
134
|
+
throw r.error;
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}
|
138
|
+
if (s)
|
139
|
+
throw new it(s);
|
140
|
+
}
|
141
|
+
}, i.prototype.add = function(t) {
|
142
|
+
var e;
|
143
|
+
if (t && t !== this)
|
144
|
+
if (this.closed)
|
145
|
+
$t(t);
|
146
|
+
else {
|
147
|
+
if (t instanceof i) {
|
148
|
+
if (t.closed || t._hasParent(this))
|
149
|
+
return;
|
150
|
+
t._addParent(this);
|
151
|
+
}
|
152
|
+
(this._finalizers = (e = this._finalizers) !== null && e !== void 0 ? e : []).push(t);
|
153
|
+
}
|
154
|
+
}, i.prototype._hasParent = function(t) {
|
155
|
+
var e = this._parentage;
|
156
|
+
return e === t || Array.isArray(e) && e.includes(t);
|
157
|
+
}, i.prototype._addParent = function(t) {
|
158
|
+
var e = this._parentage;
|
159
|
+
this._parentage = Array.isArray(e) ? (e.push(t), e) : e ? [e, t] : t;
|
160
|
+
}, i.prototype._removeParent = function(t) {
|
161
|
+
var e = this._parentage;
|
162
|
+
e === t ? this._parentage = null : Array.isArray(e) && pt(e, t);
|
163
|
+
}, i.prototype.remove = function(t) {
|
164
|
+
var e = this._finalizers;
|
165
|
+
e && pt(e, t), t instanceof i && t._removeParent(this);
|
166
|
+
}, i.EMPTY = function() {
|
167
|
+
var t = new i();
|
168
|
+
return t.closed = !0, t;
|
169
|
+
}(), i;
|
170
|
+
}(), Dt = X.EMPTY;
|
171
|
+
function Lt(i) {
|
172
|
+
return i instanceof X || i && "closed" in i && m(i.remove) && m(i.add) && m(i.unsubscribe);
|
173
|
+
}
|
174
|
+
function $t(i) {
|
175
|
+
m(i) ? i() : i.unsubscribe();
|
176
|
+
}
|
177
|
+
var Bt = {
|
178
|
+
onUnhandledError: null,
|
179
|
+
onStoppedNotification: null,
|
180
|
+
Promise: void 0,
|
181
|
+
useDeprecatedSynchronousErrorHandling: !1,
|
182
|
+
useDeprecatedNextContext: !1
|
183
|
+
}, dt = {
|
184
|
+
setTimeout: function(i, t) {
|
185
|
+
for (var e = [], r = 2; r < arguments.length; r++)
|
186
|
+
e[r - 2] = arguments[r];
|
187
|
+
var n = dt.delegate;
|
188
|
+
return n != null && n.setTimeout ? n.setTimeout.apply(n, q([i, t], Y(e))) : setTimeout.apply(void 0, q([i, t], Y(e)));
|
189
|
+
},
|
190
|
+
clearTimeout: function(i) {
|
191
|
+
var t = dt.delegate;
|
192
|
+
return ((t == null ? void 0 : t.clearTimeout) || clearTimeout)(i);
|
193
|
+
},
|
194
|
+
delegate: void 0
|
195
|
+
};
|
196
|
+
function se(i) {
|
197
|
+
dt.setTimeout(function() {
|
198
|
+
throw i;
|
199
|
+
});
|
200
|
+
}
|
201
|
+
function wt() {
|
202
|
+
}
|
203
|
+
function V(i) {
|
204
|
+
i();
|
205
|
+
}
|
206
|
+
var zt = function(i) {
|
207
|
+
N(t, i);
|
208
|
+
function t(e) {
|
209
|
+
var r = i.call(this) || this;
|
210
|
+
return r.isStopped = !1, e ? (r.destination = e, Lt(e) && e.add(r)) : r.destination = le, r;
|
211
|
+
}
|
212
|
+
return t.create = function(e, r, n) {
|
213
|
+
return new ft(e, r, n);
|
214
|
+
}, t.prototype.next = function(e) {
|
215
|
+
this.isStopped || this._next(e);
|
216
|
+
}, t.prototype.error = function(e) {
|
217
|
+
this.isStopped || (this.isStopped = !0, this._error(e));
|
218
|
+
}, t.prototype.complete = function() {
|
219
|
+
this.isStopped || (this.isStopped = !0, this._complete());
|
220
|
+
}, t.prototype.unsubscribe = function() {
|
221
|
+
this.closed || (this.isStopped = !0, i.prototype.unsubscribe.call(this), this.destination = null);
|
222
|
+
}, t.prototype._next = function(e) {
|
223
|
+
this.destination.next(e);
|
224
|
+
}, t.prototype._error = function(e) {
|
225
|
+
try {
|
226
|
+
this.destination.error(e);
|
227
|
+
} finally {
|
228
|
+
this.unsubscribe();
|
229
|
+
}
|
230
|
+
}, t.prototype._complete = function() {
|
231
|
+
try {
|
232
|
+
this.destination.complete();
|
233
|
+
} finally {
|
234
|
+
this.unsubscribe();
|
235
|
+
}
|
236
|
+
}, t;
|
237
|
+
}(X), oe = Function.prototype.bind;
|
238
|
+
function nt(i, t) {
|
239
|
+
return oe.call(i, t);
|
240
|
+
}
|
241
|
+
var ae = function() {
|
242
|
+
function i(t) {
|
243
|
+
this.partialObserver = t;
|
244
|
+
}
|
245
|
+
return i.prototype.next = function(t) {
|
246
|
+
var e = this.partialObserver;
|
247
|
+
if (e.next)
|
248
|
+
try {
|
249
|
+
e.next(t);
|
250
|
+
} catch (r) {
|
251
|
+
W(r);
|
252
|
+
}
|
253
|
+
}, i.prototype.error = function(t) {
|
254
|
+
var e = this.partialObserver;
|
255
|
+
if (e.error)
|
256
|
+
try {
|
257
|
+
e.error(t);
|
258
|
+
} catch (r) {
|
259
|
+
W(r);
|
260
|
+
}
|
261
|
+
else
|
262
|
+
W(t);
|
263
|
+
}, i.prototype.complete = function() {
|
264
|
+
var t = this.partialObserver;
|
265
|
+
if (t.complete)
|
266
|
+
try {
|
267
|
+
t.complete();
|
268
|
+
} catch (e) {
|
269
|
+
W(e);
|
270
|
+
}
|
271
|
+
}, i;
|
272
|
+
}(), ft = function(i) {
|
273
|
+
N(t, i);
|
274
|
+
function t(e, r, n) {
|
275
|
+
var s = i.call(this) || this, o;
|
276
|
+
if (m(e) || !e)
|
277
|
+
o = {
|
278
|
+
next: e ?? void 0,
|
279
|
+
error: r ?? void 0,
|
280
|
+
complete: n ?? void 0
|
281
|
+
};
|
282
|
+
else {
|
283
|
+
var a;
|
284
|
+
s && Bt.useDeprecatedNextContext ? (a = Object.create(e), a.unsubscribe = function() {
|
285
|
+
return s.unsubscribe();
|
286
|
+
}, o = {
|
287
|
+
next: e.next && nt(e.next, a),
|
288
|
+
error: e.error && nt(e.error, a),
|
289
|
+
complete: e.complete && nt(e.complete, a)
|
290
|
+
}) : o = e;
|
291
|
+
}
|
292
|
+
return s.destination = new ae(o), s;
|
293
|
+
}
|
294
|
+
return t;
|
295
|
+
}(zt);
|
296
|
+
function W(i) {
|
297
|
+
se(i);
|
298
|
+
}
|
299
|
+
function ce(i) {
|
300
|
+
throw i;
|
301
|
+
}
|
302
|
+
var le = {
|
303
|
+
closed: !0,
|
304
|
+
next: wt,
|
305
|
+
error: ce,
|
306
|
+
complete: wt
|
307
|
+
}, he = function() {
|
308
|
+
return typeof Symbol == "function" && Symbol.observable || "@@observable";
|
309
|
+
}();
|
310
|
+
function ue(i) {
|
311
|
+
return i;
|
312
|
+
}
|
313
|
+
function pe(i) {
|
314
|
+
return i.length === 0 ? ue : i.length === 1 ? i[0] : function(e) {
|
315
|
+
return i.reduce(function(r, n) {
|
316
|
+
return n(r);
|
317
|
+
}, e);
|
318
|
+
};
|
319
|
+
}
|
320
|
+
var At = function() {
|
321
|
+
function i(t) {
|
322
|
+
t && (this._subscribe = t);
|
323
|
+
}
|
324
|
+
return i.prototype.lift = function(t) {
|
325
|
+
var e = new i();
|
326
|
+
return e.source = this, e.operator = t, e;
|
327
|
+
}, i.prototype.subscribe = function(t, e, r) {
|
328
|
+
var n = this, s = fe(t) ? t : new ft(t, e, r);
|
329
|
+
return V(function() {
|
330
|
+
var o = n, a = o.operator, c = o.source;
|
331
|
+
s.add(a ? a.call(s, c) : c ? n._subscribe(s) : n._trySubscribe(s));
|
332
|
+
}), s;
|
333
|
+
}, i.prototype._trySubscribe = function(t) {
|
334
|
+
try {
|
335
|
+
return this._subscribe(t);
|
336
|
+
} catch (e) {
|
337
|
+
t.error(e);
|
338
|
+
}
|
339
|
+
}, i.prototype.forEach = function(t, e) {
|
340
|
+
var r = this;
|
341
|
+
return e = St(e), new e(function(n, s) {
|
342
|
+
var o = new ft({
|
343
|
+
next: function(a) {
|
344
|
+
try {
|
345
|
+
t(a);
|
346
|
+
} catch (c) {
|
347
|
+
s(c), o.unsubscribe();
|
348
|
+
}
|
349
|
+
},
|
350
|
+
error: s,
|
351
|
+
complete: n
|
352
|
+
});
|
353
|
+
r.subscribe(o);
|
354
|
+
});
|
355
|
+
}, i.prototype._subscribe = function(t) {
|
356
|
+
var e;
|
357
|
+
return (e = this.source) === null || e === void 0 ? void 0 : e.subscribe(t);
|
358
|
+
}, i.prototype[he] = function() {
|
359
|
+
return this;
|
360
|
+
}, i.prototype.pipe = function() {
|
361
|
+
for (var t = [], e = 0; e < arguments.length; e++)
|
362
|
+
t[e] = arguments[e];
|
363
|
+
return pe(t)(this);
|
364
|
+
}, i.prototype.toPromise = function(t) {
|
365
|
+
var e = this;
|
366
|
+
return t = St(t), new t(function(r, n) {
|
367
|
+
var s;
|
368
|
+
e.subscribe(function(o) {
|
369
|
+
return s = o;
|
370
|
+
}, function(o) {
|
371
|
+
return n(o);
|
372
|
+
}, function() {
|
373
|
+
return r(s);
|
374
|
+
});
|
375
|
+
});
|
376
|
+
}, i.create = function(t) {
|
377
|
+
return new i(t);
|
378
|
+
}, i;
|
379
|
+
}();
|
380
|
+
function St(i) {
|
381
|
+
var t;
|
382
|
+
return (t = i ?? Bt.Promise) !== null && t !== void 0 ? t : Promise;
|
383
|
+
}
|
384
|
+
function de(i) {
|
385
|
+
return i && m(i.next) && m(i.error) && m(i.complete);
|
386
|
+
}
|
387
|
+
function fe(i) {
|
388
|
+
return i && i instanceof zt || de(i) && Lt(i);
|
389
|
+
}
|
390
|
+
var ge = Nt(function(i) {
|
391
|
+
return function() {
|
392
|
+
i(this), this.name = "ObjectUnsubscribedError", this.message = "object unsubscribed";
|
393
|
+
};
|
394
|
+
}), Wt = function(i) {
|
395
|
+
N(t, i);
|
396
|
+
function t() {
|
397
|
+
var e = i.call(this) || this;
|
398
|
+
return e.closed = !1, e.currentObservers = null, e.observers = [], e.isStopped = !1, e.hasError = !1, e.thrownError = null, e;
|
399
|
+
}
|
400
|
+
return t.prototype.lift = function(e) {
|
401
|
+
var r = new Et(this, this);
|
402
|
+
return r.operator = e, r;
|
403
|
+
}, t.prototype._throwIfClosed = function() {
|
404
|
+
if (this.closed)
|
405
|
+
throw new ge();
|
406
|
+
}, t.prototype.next = function(e) {
|
407
|
+
var r = this;
|
408
|
+
V(function() {
|
409
|
+
var n, s;
|
410
|
+
if (r._throwIfClosed(), !r.isStopped) {
|
411
|
+
r.currentObservers || (r.currentObservers = Array.from(r.observers));
|
412
|
+
try {
|
413
|
+
for (var o = ut(r.currentObservers), a = o.next(); !a.done; a = o.next()) {
|
414
|
+
var c = a.value;
|
415
|
+
c.next(e);
|
416
|
+
}
|
417
|
+
} catch (h) {
|
418
|
+
n = { error: h };
|
419
|
+
} finally {
|
420
|
+
try {
|
421
|
+
a && !a.done && (s = o.return) && s.call(o);
|
422
|
+
} finally {
|
423
|
+
if (n)
|
424
|
+
throw n.error;
|
425
|
+
}
|
426
|
+
}
|
427
|
+
}
|
428
|
+
});
|
429
|
+
}, t.prototype.error = function(e) {
|
430
|
+
var r = this;
|
431
|
+
V(function() {
|
432
|
+
if (r._throwIfClosed(), !r.isStopped) {
|
433
|
+
r.hasError = r.isStopped = !0, r.thrownError = e;
|
434
|
+
for (var n = r.observers; n.length; )
|
435
|
+
n.shift().error(e);
|
436
|
+
}
|
437
|
+
});
|
438
|
+
}, t.prototype.complete = function() {
|
439
|
+
var e = this;
|
440
|
+
V(function() {
|
441
|
+
if (e._throwIfClosed(), !e.isStopped) {
|
442
|
+
e.isStopped = !0;
|
443
|
+
for (var r = e.observers; r.length; )
|
444
|
+
r.shift().complete();
|
445
|
+
}
|
446
|
+
});
|
447
|
+
}, t.prototype.unsubscribe = function() {
|
448
|
+
this.isStopped = this.closed = !0, this.observers = this.currentObservers = null;
|
449
|
+
}, Object.defineProperty(t.prototype, "observed", {
|
450
|
+
get: function() {
|
451
|
+
var e;
|
452
|
+
return ((e = this.observers) === null || e === void 0 ? void 0 : e.length) > 0;
|
453
|
+
},
|
454
|
+
enumerable: !1,
|
455
|
+
configurable: !0
|
456
|
+
}), t.prototype._trySubscribe = function(e) {
|
457
|
+
return this._throwIfClosed(), i.prototype._trySubscribe.call(this, e);
|
458
|
+
}, t.prototype._subscribe = function(e) {
|
459
|
+
return this._throwIfClosed(), this._checkFinalizedStatuses(e), this._innerSubscribe(e);
|
460
|
+
}, t.prototype._innerSubscribe = function(e) {
|
461
|
+
var r = this, n = this, s = n.hasError, o = n.isStopped, a = n.observers;
|
462
|
+
return s || o ? Dt : (this.currentObservers = null, a.push(e), new X(function() {
|
463
|
+
r.currentObservers = null, pt(a, e);
|
464
|
+
}));
|
465
|
+
}, t.prototype._checkFinalizedStatuses = function(e) {
|
466
|
+
var r = this, n = r.hasError, s = r.thrownError, o = r.isStopped;
|
467
|
+
n ? e.error(s) : o && e.complete();
|
468
|
+
}, t.prototype.asObservable = function() {
|
469
|
+
var e = new At();
|
470
|
+
return e.source = this, e;
|
471
|
+
}, t.create = function(e, r) {
|
472
|
+
return new Et(e, r);
|
473
|
+
}, t;
|
474
|
+
}(At), Et = function(i) {
|
475
|
+
N(t, i);
|
476
|
+
function t(e, r) {
|
477
|
+
var n = i.call(this) || this;
|
478
|
+
return n.destination = e, n.source = r, n;
|
479
|
+
}
|
480
|
+
return t.prototype.next = function(e) {
|
481
|
+
var r, n;
|
482
|
+
(n = (r = this.destination) === null || r === void 0 ? void 0 : r.next) === null || n === void 0 || n.call(r, e);
|
483
|
+
}, t.prototype.error = function(e) {
|
484
|
+
var r, n;
|
485
|
+
(n = (r = this.destination) === null || r === void 0 ? void 0 : r.error) === null || n === void 0 || n.call(r, e);
|
486
|
+
}, t.prototype.complete = function() {
|
487
|
+
var e, r;
|
488
|
+
(r = (e = this.destination) === null || e === void 0 ? void 0 : e.complete) === null || r === void 0 || r.call(e);
|
489
|
+
}, t.prototype._subscribe = function(e) {
|
490
|
+
var r, n;
|
491
|
+
return (n = (r = this.source) === null || r === void 0 ? void 0 : r.subscribe(e)) !== null && n !== void 0 ? n : Dt;
|
492
|
+
}, t;
|
493
|
+
}(Wt), ve = function(i) {
|
494
|
+
N(t, i);
|
495
|
+
function t(e) {
|
496
|
+
var r = i.call(this) || this;
|
497
|
+
return r._value = e, r;
|
498
|
+
}
|
499
|
+
return Object.defineProperty(t.prototype, "value", {
|
500
|
+
get: function() {
|
501
|
+
return this.getValue();
|
502
|
+
},
|
503
|
+
enumerable: !1,
|
504
|
+
configurable: !0
|
505
|
+
}), t.prototype._subscribe = function(e) {
|
506
|
+
var r = i.prototype._subscribe.call(this, e);
|
507
|
+
return !r.closed && e.next(this._value), r;
|
508
|
+
}, t.prototype.getValue = function() {
|
509
|
+
var e = this, r = e.hasError, n = e.thrownError, s = e._value;
|
510
|
+
if (r)
|
511
|
+
throw n;
|
512
|
+
return this._throwIfClosed(), s;
|
513
|
+
}, t.prototype.next = function(e) {
|
514
|
+
i.prototype.next.call(this, this._value = e);
|
515
|
+
}, t;
|
516
|
+
}(Wt), Gt = /* @__PURE__ */ ((i) => (i.Loading = "loading", i.Ready = "ready", i))(Gt || {});
|
517
|
+
class Ct {
|
518
|
+
constructor(t, e) {
|
519
|
+
this.state = new ve(
|
520
|
+
"loading"
|
521
|
+
/* Loading */
|
522
|
+
), this.resolvers = /* @__PURE__ */ new Map(), this.name = t, this.environment = e, this.state.next(
|
523
|
+
"ready"
|
524
|
+
/* Ready */
|
525
|
+
);
|
526
|
+
}
|
527
|
+
setState(t) {
|
528
|
+
this.state.next(t);
|
529
|
+
}
|
530
|
+
async register(t, e) {
|
531
|
+
this.resolvers.set(t, e);
|
532
|
+
}
|
533
|
+
async get(t) {
|
534
|
+
return this.resolvers.get(t);
|
535
|
+
}
|
536
|
+
}
|
537
|
+
/**
|
538
|
+
* @license
|
539
|
+
* Copyright 2019 Google LLC
|
540
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
541
|
+
*/
|
542
|
+
const F = globalThis, vt = F.ShadowRoot && (F.ShadyCSS === void 0 || F.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, yt = Symbol(), xt = /* @__PURE__ */ new WeakMap();
|
543
|
+
let Vt = class {
|
544
|
+
constructor(t, e, r) {
|
545
|
+
if (this._$cssResult$ = !0, r !== yt)
|
546
|
+
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
547
|
+
this.cssText = t, this.t = e;
|
548
|
+
}
|
549
|
+
get styleSheet() {
|
550
|
+
let t = this.o;
|
551
|
+
const e = this.t;
|
552
|
+
if (vt && t === void 0) {
|
553
|
+
const r = e !== void 0 && e.length === 1;
|
554
|
+
r && (t = xt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && xt.set(e, t));
|
555
|
+
}
|
556
|
+
return t;
|
557
|
+
}
|
558
|
+
toString() {
|
559
|
+
return this.cssText;
|
560
|
+
}
|
561
|
+
};
|
562
|
+
const ye = (i) => new Vt(typeof i == "string" ? i : i + "", void 0, yt), D = (i, ...t) => {
|
563
|
+
const e = i.length === 1 ? i[0] : t.reduce((r, n, s) => r + ((o) => {
|
564
|
+
if (o._$cssResult$ === !0)
|
565
|
+
return o.cssText;
|
566
|
+
if (typeof o == "number")
|
567
|
+
return o;
|
568
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
569
|
+
})(n) + i[s + 1], i[0]);
|
570
|
+
return new Vt(e, i, yt);
|
571
|
+
}, me = (i, t) => {
|
572
|
+
if (vt)
|
573
|
+
i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
574
|
+
else
|
575
|
+
for (const e of t) {
|
576
|
+
const r = document.createElement("style"), n = F.litNonce;
|
577
|
+
n !== void 0 && r.setAttribute("nonce", n), r.textContent = e.cssText, i.appendChild(r);
|
578
|
+
}
|
579
|
+
}, Pt = vt ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
580
|
+
let e = "";
|
581
|
+
for (const r of t.cssRules)
|
582
|
+
e += r.cssText;
|
583
|
+
return ye(e);
|
584
|
+
})(i) : i;
|
585
|
+
/**
|
586
|
+
* @license
|
587
|
+
* Copyright 2017 Google LLC
|
588
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
589
|
+
*/
|
590
|
+
const { is: be, defineProperty: _e, getOwnPropertyDescriptor: $e, getOwnPropertyNames: we, getOwnPropertySymbols: Ae, getPrototypeOf: Se } = Object, _ = globalThis, Tt = _.trustedTypes, Ee = Tt ? Tt.emptyScript : "", st = _.reactiveElementPolyfillSupport, R = (i, t) => i, J = { toAttribute(i, t) {
|
591
|
+
switch (t) {
|
592
|
+
case Boolean:
|
593
|
+
i = i ? Ee : null;
|
594
|
+
break;
|
595
|
+
case Object:
|
596
|
+
case Array:
|
597
|
+
i = i == null ? i : JSON.stringify(i);
|
598
|
+
}
|
599
|
+
return i;
|
600
|
+
}, fromAttribute(i, t) {
|
601
|
+
let e = i;
|
602
|
+
switch (t) {
|
603
|
+
case Boolean:
|
604
|
+
e = i !== null;
|
605
|
+
break;
|
606
|
+
case Number:
|
607
|
+
e = i === null ? null : Number(i);
|
608
|
+
break;
|
609
|
+
case Object:
|
610
|
+
case Array:
|
611
|
+
try {
|
612
|
+
e = JSON.parse(i);
|
613
|
+
} catch {
|
614
|
+
e = null;
|
615
|
+
}
|
616
|
+
}
|
617
|
+
return e;
|
618
|
+
} }, mt = (i, t) => !be(i, t), Ot = { attribute: !0, type: String, converter: J, reflect: !1, hasChanged: mt };
|
619
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), _.litPropertyMetadata ?? (_.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
620
|
+
class T extends HTMLElement {
|
621
|
+
static addInitializer(t) {
|
622
|
+
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
623
|
+
}
|
624
|
+
static get observedAttributes() {
|
625
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
626
|
+
}
|
627
|
+
static createProperty(t, e = Ot) {
|
628
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
629
|
+
const r = Symbol(), n = this.getPropertyDescriptor(t, r, e);
|
630
|
+
n !== void 0 && _e(this.prototype, t, n);
|
631
|
+
}
|
632
|
+
}
|
633
|
+
static getPropertyDescriptor(t, e, r) {
|
634
|
+
const { get: n, set: s } = $e(this.prototype, t) ?? { get() {
|
635
|
+
return this[e];
|
636
|
+
}, set(o) {
|
637
|
+
this[e] = o;
|
638
|
+
} };
|
639
|
+
return { get() {
|
640
|
+
return n == null ? void 0 : n.call(this);
|
641
|
+
}, set(o) {
|
642
|
+
const a = n == null ? void 0 : n.call(this);
|
643
|
+
s.call(this, o), this.requestUpdate(t, a, r);
|
644
|
+
}, configurable: !0, enumerable: !0 };
|
645
|
+
}
|
646
|
+
static getPropertyOptions(t) {
|
647
|
+
return this.elementProperties.get(t) ?? Ot;
|
648
|
+
}
|
649
|
+
static _$Ei() {
|
650
|
+
if (this.hasOwnProperty(R("elementProperties")))
|
651
|
+
return;
|
652
|
+
const t = Se(this);
|
653
|
+
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
654
|
+
}
|
655
|
+
static finalize() {
|
656
|
+
if (this.hasOwnProperty(R("finalized")))
|
657
|
+
return;
|
658
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(R("properties"))) {
|
659
|
+
const e = this.properties, r = [...we(e), ...Ae(e)];
|
660
|
+
for (const n of r)
|
661
|
+
this.createProperty(n, e[n]);
|
662
|
+
}
|
663
|
+
const t = this[Symbol.metadata];
|
664
|
+
if (t !== null) {
|
665
|
+
const e = litPropertyMetadata.get(t);
|
666
|
+
if (e !== void 0)
|
667
|
+
for (const [r, n] of e)
|
668
|
+
this.elementProperties.set(r, n);
|
669
|
+
}
|
670
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
671
|
+
for (const [e, r] of this.elementProperties) {
|
672
|
+
const n = this._$Eu(e, r);
|
673
|
+
n !== void 0 && this._$Eh.set(n, e);
|
674
|
+
}
|
675
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
676
|
+
}
|
677
|
+
static finalizeStyles(t) {
|
678
|
+
const e = [];
|
679
|
+
if (Array.isArray(t)) {
|
680
|
+
const r = new Set(t.flat(1 / 0).reverse());
|
681
|
+
for (const n of r)
|
682
|
+
e.unshift(Pt(n));
|
683
|
+
} else
|
684
|
+
t !== void 0 && e.push(Pt(t));
|
685
|
+
return e;
|
686
|
+
}
|
687
|
+
static _$Eu(t, e) {
|
688
|
+
const r = e.attribute;
|
689
|
+
return r === !1 ? void 0 : typeof r == "string" ? r : typeof t == "string" ? t.toLowerCase() : void 0;
|
690
|
+
}
|
691
|
+
constructor() {
|
692
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
693
|
+
}
|
694
|
+
_$Ev() {
|
695
|
+
var t;
|
696
|
+
this._$Eg = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
|
697
|
+
}
|
698
|
+
addController(t) {
|
699
|
+
var e;
|
700
|
+
(this._$ES ?? (this._$ES = [])).push(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
701
|
+
}
|
702
|
+
removeController(t) {
|
703
|
+
var e;
|
704
|
+
(e = this._$ES) == null || e.splice(this._$ES.indexOf(t) >>> 0, 1);
|
705
|
+
}
|
706
|
+
_$E_() {
|
707
|
+
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
708
|
+
for (const r of e.keys())
|
709
|
+
this.hasOwnProperty(r) && (t.set(r, this[r]), delete this[r]);
|
710
|
+
t.size > 0 && (this._$Ep = t);
|
711
|
+
}
|
712
|
+
createRenderRoot() {
|
713
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
714
|
+
return me(t, this.constructor.elementStyles), t;
|
715
|
+
}
|
716
|
+
connectedCallback() {
|
717
|
+
var t;
|
718
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) == null || t.forEach((e) => {
|
719
|
+
var r;
|
720
|
+
return (r = e.hostConnected) == null ? void 0 : r.call(e);
|
721
|
+
});
|
722
|
+
}
|
723
|
+
enableUpdating(t) {
|
724
|
+
}
|
725
|
+
disconnectedCallback() {
|
726
|
+
var t;
|
727
|
+
(t = this._$ES) == null || t.forEach((e) => {
|
728
|
+
var r;
|
729
|
+
return (r = e.hostDisconnected) == null ? void 0 : r.call(e);
|
730
|
+
});
|
731
|
+
}
|
732
|
+
attributeChangedCallback(t, e, r) {
|
733
|
+
this._$AK(t, r);
|
734
|
+
}
|
735
|
+
_$EO(t, e) {
|
736
|
+
var s;
|
737
|
+
const r = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, r);
|
738
|
+
if (n !== void 0 && r.reflect === !0) {
|
739
|
+
const o = (((s = r.converter) == null ? void 0 : s.toAttribute) !== void 0 ? r.converter : J).toAttribute(e, r.type);
|
740
|
+
this._$Em = t, o == null ? this.removeAttribute(n) : this.setAttribute(n, o), this._$Em = null;
|
741
|
+
}
|
742
|
+
}
|
743
|
+
_$AK(t, e) {
|
744
|
+
var s;
|
745
|
+
const r = this.constructor, n = r._$Eh.get(t);
|
746
|
+
if (n !== void 0 && this._$Em !== n) {
|
747
|
+
const o = r.getPropertyOptions(n), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((s = o.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? o.converter : J;
|
748
|
+
this._$Em = n, this[n] = a.fromAttribute(e, o.type), this._$Em = null;
|
749
|
+
}
|
750
|
+
}
|
751
|
+
requestUpdate(t, e, r, n = !1, s) {
|
752
|
+
if (t !== void 0) {
|
753
|
+
if (r ?? (r = this.constructor.getPropertyOptions(t)), !(r.hasChanged ?? mt)(n ? s : this[t], e))
|
754
|
+
return;
|
755
|
+
this.C(t, e, r);
|
756
|
+
}
|
757
|
+
this.isUpdatePending === !1 && (this._$Eg = this._$EP());
|
758
|
+
}
|
759
|
+
C(t, e, r) {
|
760
|
+
this._$AL.has(t) || this._$AL.set(t, e), r.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
|
761
|
+
}
|
762
|
+
async _$EP() {
|
763
|
+
this.isUpdatePending = !0;
|
764
|
+
try {
|
765
|
+
await this._$Eg;
|
766
|
+
} catch (e) {
|
767
|
+
Promise.reject(e);
|
768
|
+
}
|
769
|
+
const t = this.scheduleUpdate();
|
770
|
+
return t != null && await t, !this.isUpdatePending;
|
771
|
+
}
|
772
|
+
scheduleUpdate() {
|
773
|
+
return this.performUpdate();
|
774
|
+
}
|
775
|
+
performUpdate() {
|
776
|
+
var r;
|
777
|
+
if (!this.isUpdatePending)
|
778
|
+
return;
|
779
|
+
if (!this.hasUpdated) {
|
780
|
+
if (this._$Ep) {
|
781
|
+
for (const [s, o] of this._$Ep)
|
782
|
+
this[s] = o;
|
783
|
+
this._$Ep = void 0;
|
784
|
+
}
|
785
|
+
const n = this.constructor.elementProperties;
|
786
|
+
if (n.size > 0)
|
787
|
+
for (const [s, o] of n)
|
788
|
+
o.wrapped !== !0 || this._$AL.has(s) || this[s] === void 0 || this.C(s, this[s], o);
|
789
|
+
}
|
790
|
+
let t = !1;
|
791
|
+
const e = this._$AL;
|
792
|
+
try {
|
793
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (r = this._$ES) == null || r.forEach((n) => {
|
794
|
+
var s;
|
795
|
+
return (s = n.hostUpdate) == null ? void 0 : s.call(n);
|
796
|
+
}), this.update(e)) : this._$ET();
|
797
|
+
} catch (n) {
|
798
|
+
throw t = !1, this._$ET(), n;
|
799
|
+
}
|
800
|
+
t && this._$AE(e);
|
801
|
+
}
|
802
|
+
willUpdate(t) {
|
803
|
+
}
|
804
|
+
_$AE(t) {
|
805
|
+
var e;
|
806
|
+
(e = this._$ES) == null || e.forEach((r) => {
|
807
|
+
var n;
|
808
|
+
return (n = r.hostUpdated) == null ? void 0 : n.call(r);
|
809
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
810
|
+
}
|
811
|
+
_$ET() {
|
812
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
813
|
+
}
|
814
|
+
get updateComplete() {
|
815
|
+
return this.getUpdateComplete();
|
816
|
+
}
|
817
|
+
getUpdateComplete() {
|
818
|
+
return this._$Eg;
|
819
|
+
}
|
820
|
+
shouldUpdate(t) {
|
821
|
+
return !0;
|
822
|
+
}
|
823
|
+
update(t) {
|
824
|
+
this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EO(e, this[e]))), this._$ET();
|
825
|
+
}
|
826
|
+
updated(t) {
|
827
|
+
}
|
828
|
+
firstUpdated(t) {
|
829
|
+
}
|
830
|
+
}
|
831
|
+
T.elementStyles = [], T.shadowRootOptions = { mode: "open" }, T[R("elementProperties")] = /* @__PURE__ */ new Map(), T[R("finalized")] = /* @__PURE__ */ new Map(), st == null || st({ ReactiveElement: T }), (_.reactiveElementVersions ?? (_.reactiveElementVersions = [])).push("2.0.1");
|
832
|
+
/**
|
833
|
+
* @license
|
834
|
+
* Copyright 2017 Google LLC
|
835
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
836
|
+
*/
|
837
|
+
const I = globalThis, K = I.trustedTypes, Ut = K ? K.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, Ft = "$lit$", b = `lit$${(Math.random() + "").slice(9)}$`, Yt = "?" + b, Ce = `<${Yt}>`, x = document, k = () => x.createComment(""), j = (i) => i === null || typeof i != "object" && typeof i != "function", qt = Array.isArray, xe = (i) => qt(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", ot = `[
|
838
|
+
\f\r]`, U = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Rt = /-->/g, It = />/g, S = RegExp(`>|${ot}(?:([^\\s"'>=/]+)(${ot}*=${ot}*(?:[^
|
839
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Mt = /'/g, kt = /"/g, Jt = /^(?:script|style|textarea|title)$/i, Pe = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), Z = Pe(1), P = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), jt = /* @__PURE__ */ new WeakMap(), C = x.createTreeWalker(x, 129);
|
840
|
+
function Kt(i, t) {
|
841
|
+
if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
|
842
|
+
throw Error("invalid template strings array");
|
843
|
+
return Ut !== void 0 ? Ut.createHTML(t) : t;
|
844
|
+
}
|
845
|
+
const Te = (i, t) => {
|
846
|
+
const e = i.length - 1, r = [];
|
847
|
+
let n, s = t === 2 ? "<svg>" : "", o = U;
|
848
|
+
for (let a = 0; a < e; a++) {
|
849
|
+
const c = i[a];
|
850
|
+
let h, d, l = -1, f = 0;
|
851
|
+
for (; f < c.length && (o.lastIndex = f, d = o.exec(c), d !== null); )
|
852
|
+
f = o.lastIndex, o === U ? d[1] === "!--" ? o = Rt : d[1] !== void 0 ? o = It : d[2] !== void 0 ? (Jt.test(d[2]) && (n = RegExp("</" + d[2], "g")), o = S) : d[3] !== void 0 && (o = S) : o === S ? d[0] === ">" ? (o = n ?? U, l = -1) : d[1] === void 0 ? l = -2 : (l = o.lastIndex - d[2].length, h = d[1], o = d[3] === void 0 ? S : d[3] === '"' ? kt : Mt) : o === kt || o === Mt ? o = S : o === Rt || o === It ? o = U : (o = S, n = void 0);
|
853
|
+
const u = o === S && i[a + 1].startsWith("/>") ? " " : "";
|
854
|
+
s += o === U ? c + Ce : l >= 0 ? (r.push(h), c.slice(0, l) + Ft + c.slice(l) + b + u) : c + b + (l === -2 ? a : u);
|
855
|
+
}
|
856
|
+
return [Kt(i, s + (i[e] || "<?>") + (t === 2 ? "</svg>" : "")), r];
|
857
|
+
};
|
858
|
+
class H {
|
859
|
+
constructor({ strings: t, _$litType$: e }, r) {
|
860
|
+
let n;
|
861
|
+
this.parts = [];
|
862
|
+
let s = 0, o = 0;
|
863
|
+
const a = t.length - 1, c = this.parts, [h, d] = Te(t, e);
|
864
|
+
if (this.el = H.createElement(h, r), C.currentNode = this.el.content, e === 2) {
|
865
|
+
const l = this.el.content.firstChild;
|
866
|
+
l.replaceWith(...l.childNodes);
|
867
|
+
}
|
868
|
+
for (; (n = C.nextNode()) !== null && c.length < a; ) {
|
869
|
+
if (n.nodeType === 1) {
|
870
|
+
if (n.hasAttributes())
|
871
|
+
for (const l of n.getAttributeNames())
|
872
|
+
if (l.endsWith(Ft)) {
|
873
|
+
const f = d[o++], u = n.getAttribute(l).split(b), g = /([.?@])?(.*)/.exec(f);
|
874
|
+
c.push({ type: 1, index: s, name: g[2], strings: u, ctor: g[1] === "." ? Ue : g[1] === "?" ? Re : g[1] === "@" ? Ie : tt }), n.removeAttribute(l);
|
875
|
+
} else
|
876
|
+
l.startsWith(b) && (c.push({ type: 6, index: s }), n.removeAttribute(l));
|
877
|
+
if (Jt.test(n.tagName)) {
|
878
|
+
const l = n.textContent.split(b), f = l.length - 1;
|
879
|
+
if (f > 0) {
|
880
|
+
n.textContent = K ? K.emptyScript : "";
|
881
|
+
for (let u = 0; u < f; u++)
|
882
|
+
n.append(l[u], k()), C.nextNode(), c.push({ type: 2, index: ++s });
|
883
|
+
n.append(l[f], k());
|
884
|
+
}
|
885
|
+
}
|
886
|
+
} else if (n.nodeType === 8)
|
887
|
+
if (n.data === Yt)
|
888
|
+
c.push({ type: 2, index: s });
|
889
|
+
else {
|
890
|
+
let l = -1;
|
891
|
+
for (; (l = n.data.indexOf(b, l + 1)) !== -1; )
|
892
|
+
c.push({ type: 7, index: s }), l += b.length - 1;
|
893
|
+
}
|
894
|
+
s++;
|
895
|
+
}
|
896
|
+
}
|
897
|
+
static createElement(t, e) {
|
898
|
+
const r = x.createElement("template");
|
899
|
+
return r.innerHTML = t, r;
|
900
|
+
}
|
901
|
+
}
|
902
|
+
function O(i, t, e = i, r) {
|
903
|
+
var o, a;
|
904
|
+
if (t === P)
|
905
|
+
return t;
|
906
|
+
let n = r !== void 0 ? (o = e._$Co) == null ? void 0 : o[r] : e._$Cl;
|
907
|
+
const s = j(t) ? void 0 : t._$litDirective$;
|
908
|
+
return (n == null ? void 0 : n.constructor) !== s && ((a = n == null ? void 0 : n._$AO) == null || a.call(n, !1), s === void 0 ? n = void 0 : (n = new s(i), n._$AT(i, e, r)), r !== void 0 ? (e._$Co ?? (e._$Co = []))[r] = n : e._$Cl = n), n !== void 0 && (t = O(i, n._$AS(i, t.values), n, r)), t;
|
909
|
+
}
|
910
|
+
class Oe {
|
911
|
+
constructor(t, e) {
|
912
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
913
|
+
}
|
914
|
+
get parentNode() {
|
915
|
+
return this._$AM.parentNode;
|
916
|
+
}
|
917
|
+
get _$AU() {
|
918
|
+
return this._$AM._$AU;
|
919
|
+
}
|
920
|
+
u(t) {
|
921
|
+
const { el: { content: e }, parts: r } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ?? x).importNode(e, !0);
|
922
|
+
C.currentNode = n;
|
923
|
+
let s = C.nextNode(), o = 0, a = 0, c = r[0];
|
924
|
+
for (; c !== void 0; ) {
|
925
|
+
if (o === c.index) {
|
926
|
+
let h;
|
927
|
+
c.type === 2 ? h = new L(s, s.nextSibling, this, t) : c.type === 1 ? h = new c.ctor(s, c.name, c.strings, this, t) : c.type === 6 && (h = new Me(s, this, t)), this._$AV.push(h), c = r[++a];
|
928
|
+
}
|
929
|
+
o !== (c == null ? void 0 : c.index) && (s = C.nextNode(), o++);
|
930
|
+
}
|
931
|
+
return C.currentNode = x, n;
|
932
|
+
}
|
933
|
+
p(t) {
|
934
|
+
let e = 0;
|
935
|
+
for (const r of this._$AV)
|
936
|
+
r !== void 0 && (r.strings !== void 0 ? (r._$AI(t, r, e), e += r.strings.length - 2) : r._$AI(t[e])), e++;
|
937
|
+
}
|
938
|
+
}
|
939
|
+
class L {
|
940
|
+
get _$AU() {
|
941
|
+
var t;
|
942
|
+
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
943
|
+
}
|
944
|
+
constructor(t, e, r, n) {
|
945
|
+
this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = r, this.options = n, this._$Cv = (n == null ? void 0 : n.isConnected) ?? !0;
|
946
|
+
}
|
947
|
+
get parentNode() {
|
948
|
+
let t = this._$AA.parentNode;
|
949
|
+
const e = this._$AM;
|
950
|
+
return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
|
951
|
+
}
|
952
|
+
get startNode() {
|
953
|
+
return this._$AA;
|
954
|
+
}
|
955
|
+
get endNode() {
|
956
|
+
return this._$AB;
|
957
|
+
}
|
958
|
+
_$AI(t, e = this) {
|
959
|
+
t = O(this, t, e), j(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== P && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : xe(t) ? this.T(t) : this._(t);
|
960
|
+
}
|
961
|
+
k(t) {
|
962
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
963
|
+
}
|
964
|
+
$(t) {
|
965
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
966
|
+
}
|
967
|
+
_(t) {
|
968
|
+
this._$AH !== p && j(this._$AH) ? this._$AA.nextSibling.data = t : this.$(x.createTextNode(t)), this._$AH = t;
|
969
|
+
}
|
970
|
+
g(t) {
|
971
|
+
var s;
|
972
|
+
const { values: e, _$litType$: r } = t, n = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = H.createElement(Kt(r.h, r.h[0]), this.options)), r);
|
973
|
+
if (((s = this._$AH) == null ? void 0 : s._$AD) === n)
|
974
|
+
this._$AH.p(e);
|
975
|
+
else {
|
976
|
+
const o = new Oe(n, this), a = o.u(this.options);
|
977
|
+
o.p(e), this.$(a), this._$AH = o;
|
978
|
+
}
|
979
|
+
}
|
980
|
+
_$AC(t) {
|
981
|
+
let e = jt.get(t.strings);
|
982
|
+
return e === void 0 && jt.set(t.strings, e = new H(t)), e;
|
983
|
+
}
|
984
|
+
T(t) {
|
985
|
+
qt(this._$AH) || (this._$AH = [], this._$AR());
|
986
|
+
const e = this._$AH;
|
987
|
+
let r, n = 0;
|
988
|
+
for (const s of t)
|
989
|
+
n === e.length ? e.push(r = new L(this.k(k()), this.k(k()), this, this.options)) : r = e[n], r._$AI(s), n++;
|
990
|
+
n < e.length && (this._$AR(r && r._$AB.nextSibling, n), e.length = n);
|
991
|
+
}
|
992
|
+
_$AR(t = this._$AA.nextSibling, e) {
|
993
|
+
var r;
|
994
|
+
for ((r = this._$AP) == null ? void 0 : r.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
995
|
+
const n = t.nextSibling;
|
996
|
+
t.remove(), t = n;
|
997
|
+
}
|
998
|
+
}
|
999
|
+
setConnected(t) {
|
1000
|
+
var e;
|
1001
|
+
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
1002
|
+
}
|
1003
|
+
}
|
1004
|
+
class tt {
|
1005
|
+
get tagName() {
|
1006
|
+
return this.element.tagName;
|
1007
|
+
}
|
1008
|
+
get _$AU() {
|
1009
|
+
return this._$AM._$AU;
|
1010
|
+
}
|
1011
|
+
constructor(t, e, r, n, s) {
|
1012
|
+
this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = s, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = p;
|
1013
|
+
}
|
1014
|
+
_$AI(t, e = this, r, n) {
|
1015
|
+
const s = this.strings;
|
1016
|
+
let o = !1;
|
1017
|
+
if (s === void 0)
|
1018
|
+
t = O(this, t, e, 0), o = !j(t) || t !== this._$AH && t !== P, o && (this._$AH = t);
|
1019
|
+
else {
|
1020
|
+
const a = t;
|
1021
|
+
let c, h;
|
1022
|
+
for (t = s[0], c = 0; c < s.length - 1; c++)
|
1023
|
+
h = O(this, a[r + c], e, c), h === P && (h = this._$AH[c]), o || (o = !j(h) || h !== this._$AH[c]), h === p ? t = p : t !== p && (t += (h ?? "") + s[c + 1]), this._$AH[c] = h;
|
1024
|
+
}
|
1025
|
+
o && !n && this.O(t);
|
1026
|
+
}
|
1027
|
+
O(t) {
|
1028
|
+
t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
1029
|
+
}
|
1030
|
+
}
|
1031
|
+
class Ue extends tt {
|
1032
|
+
constructor() {
|
1033
|
+
super(...arguments), this.type = 3;
|
1034
|
+
}
|
1035
|
+
O(t) {
|
1036
|
+
this.element[this.name] = t === p ? void 0 : t;
|
1037
|
+
}
|
1038
|
+
}
|
1039
|
+
class Re extends tt {
|
1040
|
+
constructor() {
|
1041
|
+
super(...arguments), this.type = 4;
|
1042
|
+
}
|
1043
|
+
O(t) {
|
1044
|
+
this.element.toggleAttribute(this.name, !!t && t !== p);
|
1045
|
+
}
|
1046
|
+
}
|
1047
|
+
class Ie extends tt {
|
1048
|
+
constructor(t, e, r, n, s) {
|
1049
|
+
super(t, e, r, n, s), this.type = 5;
|
1050
|
+
}
|
1051
|
+
_$AI(t, e = this) {
|
1052
|
+
if ((t = O(this, t, e, 0) ?? p) === P)
|
1053
|
+
return;
|
1054
|
+
const r = this._$AH, n = t === p && r !== p || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, s = t !== p && (r === p || n);
|
1055
|
+
n && this.element.removeEventListener(this.name, this, r), s && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
1056
|
+
}
|
1057
|
+
handleEvent(t) {
|
1058
|
+
var e;
|
1059
|
+
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
1060
|
+
}
|
1061
|
+
}
|
1062
|
+
class Me {
|
1063
|
+
constructor(t, e, r) {
|
1064
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = r;
|
1065
|
+
}
|
1066
|
+
get _$AU() {
|
1067
|
+
return this._$AM._$AU;
|
1068
|
+
}
|
1069
|
+
_$AI(t) {
|
1070
|
+
O(this, t);
|
1071
|
+
}
|
1072
|
+
}
|
1073
|
+
const at = I.litHtmlPolyfillSupport;
|
1074
|
+
at == null || at(H, L), (I.litHtmlVersions ?? (I.litHtmlVersions = [])).push("3.0.2");
|
1075
|
+
const ke = (i, t, e) => {
|
1076
|
+
const r = (e == null ? void 0 : e.renderBefore) ?? t;
|
1077
|
+
let n = r._$litPart$;
|
1078
|
+
if (n === void 0) {
|
1079
|
+
const s = (e == null ? void 0 : e.renderBefore) ?? null;
|
1080
|
+
r._$litPart$ = n = new L(t.insertBefore(k(), s), s, void 0, e ?? {});
|
1081
|
+
}
|
1082
|
+
return n._$AI(i), n;
|
1083
|
+
};
|
1084
|
+
/**
|
1085
|
+
* @license
|
1086
|
+
* Copyright 2017 Google LLC
|
1087
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1088
|
+
*/
|
1089
|
+
let $ = class extends T {
|
1090
|
+
constructor() {
|
1091
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
1092
|
+
}
|
1093
|
+
createRenderRoot() {
|
1094
|
+
var e;
|
1095
|
+
const t = super.createRenderRoot();
|
1096
|
+
return (e = this.renderOptions).renderBefore ?? (e.renderBefore = t.firstChild), t;
|
1097
|
+
}
|
1098
|
+
update(t) {
|
1099
|
+
const e = this.render();
|
1100
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = ke(e, this.renderRoot, this.renderOptions);
|
1101
|
+
}
|
1102
|
+
connectedCallback() {
|
1103
|
+
var t;
|
1104
|
+
super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);
|
1105
|
+
}
|
1106
|
+
disconnectedCallback() {
|
1107
|
+
var t;
|
1108
|
+
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
1109
|
+
}
|
1110
|
+
render() {
|
1111
|
+
return P;
|
1112
|
+
}
|
1113
|
+
};
|
1114
|
+
var Ht;
|
1115
|
+
$._$litElement$ = !0, $.finalized = !0, (Ht = globalThis.litElementHydrateSupport) == null || Ht.call(globalThis, { LitElement: $ });
|
1116
|
+
const ct = globalThis.litElementPolyfillSupport;
|
1117
|
+
ct == null || ct({ LitElement: $ });
|
1118
|
+
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.1");
|
1119
|
+
/**
|
1120
|
+
* @license
|
1121
|
+
* Copyright 2017 Google LLC
|
1122
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1123
|
+
*/
|
1124
|
+
const je = { attribute: !0, type: String, converter: J, reflect: !1, hasChanged: mt }, He = (i = je, t, e) => {
|
1125
|
+
const { kind: r, metadata: n } = e;
|
1126
|
+
let s = globalThis.litPropertyMetadata.get(n);
|
1127
|
+
if (s === void 0 && globalThis.litPropertyMetadata.set(n, s = /* @__PURE__ */ new Map()), s.set(e.name, i), r === "accessor") {
|
1128
|
+
const { name: o } = e;
|
1129
|
+
return { set(a) {
|
1130
|
+
const c = t.get.call(this);
|
1131
|
+
t.set.call(this, a), this.requestUpdate(o, c, i);
|
1132
|
+
}, init(a) {
|
1133
|
+
return a !== void 0 && this.C(o, void 0, i), a;
|
1134
|
+
} };
|
1135
|
+
}
|
1136
|
+
if (r === "setter") {
|
1137
|
+
const { name: o } = e;
|
1138
|
+
return function(a) {
|
1139
|
+
const c = this[o];
|
1140
|
+
t.call(this, a), this.requestUpdate(o, c, i);
|
1141
|
+
};
|
1142
|
+
}
|
1143
|
+
throw Error("Unsupported decorator location: " + r);
|
1144
|
+
};
|
1145
|
+
function y(i) {
|
1146
|
+
return (t, e) => typeof e == "object" ? He(i, t, e) : ((r, n, s) => {
|
1147
|
+
const o = n.hasOwnProperty(s);
|
1148
|
+
return n.constructor.createProperty(s, o ? { ...r, wrapped: !0 } : r), o ? Object.getOwnPropertyDescriptor(n, s) : void 0;
|
1149
|
+
})(i, t, e);
|
1150
|
+
}
|
1151
|
+
/**
|
1152
|
+
* @license
|
1153
|
+
* Copyright 2017 Google LLC
|
1154
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1155
|
+
*/
|
1156
|
+
function B(i) {
|
1157
|
+
return y({ ...i, state: !0, attribute: !1 });
|
1158
|
+
}
|
1159
|
+
/**
|
1160
|
+
* @license
|
1161
|
+
* Copyright 2017 Google LLC
|
1162
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1163
|
+
*/
|
1164
|
+
const Zt = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Qt = (i) => (...t) => ({ _$litDirective$: i, values: t });
|
1165
|
+
class Xt {
|
1166
|
+
constructor(t) {
|
1167
|
+
}
|
1168
|
+
get _$AU() {
|
1169
|
+
return this._$AM._$AU;
|
1170
|
+
}
|
1171
|
+
_$AT(t, e, r) {
|
1172
|
+
this._$Ct = t, this._$AM = e, this._$Ci = r;
|
1173
|
+
}
|
1174
|
+
_$AS(t, e) {
|
1175
|
+
return this.update(t, e);
|
1176
|
+
}
|
1177
|
+
update(t, e) {
|
1178
|
+
return this.render(...e);
|
1179
|
+
}
|
1180
|
+
}
|
1181
|
+
/**
|
1182
|
+
* @license
|
1183
|
+
* Copyright 2018 Google LLC
|
1184
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1185
|
+
*/
|
1186
|
+
const Ne = Qt(class extends Xt {
|
1187
|
+
constructor(i) {
|
1188
|
+
var t;
|
1189
|
+
if (super(i), i.type !== Zt.ATTRIBUTE || i.name !== "class" || ((t = i.strings) == null ? void 0 : t.length) > 2)
|
1190
|
+
throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
1191
|
+
}
|
1192
|
+
render(i) {
|
1193
|
+
return " " + Object.keys(i).filter((t) => i[t]).join(" ") + " ";
|
1194
|
+
}
|
1195
|
+
update(i, [t]) {
|
1196
|
+
var r, n;
|
1197
|
+
if (this.it === void 0) {
|
1198
|
+
this.it = /* @__PURE__ */ new Set(), i.strings !== void 0 && (this.st = new Set(i.strings.join(" ").split(/\s/).filter((s) => s !== "")));
|
1199
|
+
for (const s in t)
|
1200
|
+
t[s] && !((r = this.st) != null && r.has(s)) && this.it.add(s);
|
1201
|
+
return this.render(t);
|
1202
|
+
}
|
1203
|
+
const e = i.element.classList;
|
1204
|
+
for (const s of this.it)
|
1205
|
+
s in t || (e.remove(s), this.it.delete(s));
|
1206
|
+
for (const s in t) {
|
1207
|
+
const o = !!t[s];
|
1208
|
+
o === this.it.has(s) || (n = this.st) != null && n.has(s) || (o ? (e.add(s), this.it.add(s)) : (e.remove(s), this.it.delete(s)));
|
1209
|
+
}
|
1210
|
+
return P;
|
1211
|
+
}
|
1212
|
+
}), G = (i, t, e) => {
|
1213
|
+
i && e.style.setProperty(t, i);
|
1214
|
+
}, te = (i, t) => {
|
1215
|
+
var e, r, n, s;
|
1216
|
+
G((e = i.colors) == null ? void 0 : e.primaryBackground, "--primary-background", t), G(
|
1217
|
+
(r = i.colors) == null ? void 0 : r.textOnPrimaryBackground,
|
1218
|
+
"--text-on-primary-background",
|
1219
|
+
t
|
1220
|
+
), G(
|
1221
|
+
(n = i.colors) == null ? void 0 : n.secondaryBackground,
|
1222
|
+
"--secondary-background",
|
1223
|
+
t
|
1224
|
+
), G(
|
1225
|
+
(s = i.colors) == null ? void 0 : s.textOnSecondaryBackground,
|
1226
|
+
"--text-on-secondary-background",
|
1227
|
+
t
|
1228
|
+
);
|
1229
|
+
};
|
1230
|
+
var De = Object.defineProperty, Le = Object.getOwnPropertyDescriptor, et = (i, t, e, r) => {
|
1231
|
+
for (var n = r > 1 ? void 0 : r ? Le(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
1232
|
+
(o = i[s]) && (n = (r ? o(t, e, n) : o(n)) || n);
|
1233
|
+
return r && n && De(t, e, n), n;
|
1234
|
+
};
|
1235
|
+
class A extends $ {
|
1236
|
+
constructor() {
|
1237
|
+
super(...arguments), this.active = !1, this.loaded = !1;
|
1238
|
+
}
|
1239
|
+
async connectedCallback() {
|
1240
|
+
super.connectedCallback(), this.icon = await this._renderSymbol(), this.loaded = !0, this._applyBranding();
|
1241
|
+
}
|
1242
|
+
_toggleActive() {
|
1243
|
+
var t;
|
1244
|
+
if (!((t = this.application) != null && t.root)) {
|
1245
|
+
console.warn(
|
1246
|
+
"Could not activate widget. No root element assigned to widget."
|
1247
|
+
);
|
1248
|
+
return;
|
1249
|
+
}
|
1250
|
+
this.active = !this.active, this.active ? this.application.appendToDOM() : this.application.removeFromDOM();
|
1251
|
+
}
|
1252
|
+
_applyBranding() {
|
1253
|
+
var t;
|
1254
|
+
(t = this.application) != null && t.settings && te(this.application.settings.branding, this);
|
1255
|
+
}
|
1256
|
+
async _renderSymbol() {
|
1257
|
+
var s;
|
1258
|
+
const t = (s = this.application) == null ? void 0 : s.triggerIcon;
|
1259
|
+
if (!t)
|
1260
|
+
return p;
|
1261
|
+
const e = async (o) => await import("./index-5087564d.mjs").then(
|
1262
|
+
(c) => c[o]
|
1263
|
+
), { type: r, content: n } = t;
|
1264
|
+
switch (r) {
|
1265
|
+
case "Telia": {
|
1266
|
+
const o = await e(n);
|
1267
|
+
return o ? Z`<telia-icon
|
1268
|
+
class="trigger-icon"
|
1269
|
+
svg=${o.svg}
|
1270
|
+
size="lg"
|
1271
|
+
></telia-icon>` : p;
|
1272
|
+
}
|
1273
|
+
default:
|
1274
|
+
return p;
|
1275
|
+
}
|
1276
|
+
}
|
1277
|
+
render() {
|
1278
|
+
return Z`<button
|
1279
|
+
class=${Ne({
|
1280
|
+
trigger: !0,
|
1281
|
+
active: this.active,
|
1282
|
+
rendered: this.loaded
|
1283
|
+
})}
|
1284
|
+
@click=${this._toggleActive}
|
1285
|
+
>
|
1286
|
+
${this.icon}
|
1287
|
+
<span class="trigger-close">
|
1288
|
+
<svg
|
1289
|
+
width="18"
|
1290
|
+
height="9"
|
1291
|
+
viewBox="0 0 18 9"
|
1292
|
+
fill="none"
|
1293
|
+
xmlns="http://www.w3.org/2000/svg"
|
1294
|
+
>
|
1295
|
+
<path
|
1296
|
+
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"
|
1297
|
+
fill="white"
|
1298
|
+
/>
|
1299
|
+
</svg>
|
1300
|
+
</span>
|
1301
|
+
<span class="trigger-loader">
|
1302
|
+
<svg viewBox="25 25 50 50">
|
1303
|
+
<circle
|
1304
|
+
cx="50"
|
1305
|
+
cy="50"
|
1306
|
+
r="20"
|
1307
|
+
fill="none"
|
1308
|
+
stroke="#000"
|
1309
|
+
stroke-width="2"
|
1310
|
+
stroke-miterlimit="10"
|
1311
|
+
/>
|
1312
|
+
</svg>
|
1313
|
+
</span>
|
1314
|
+
</button>`;
|
1315
|
+
}
|
1316
|
+
}
|
1317
|
+
A.styles = [
|
1318
|
+
D`
|
1319
|
+
:host {
|
1320
|
+
--voca-rem-multiplier: 0.625;
|
1321
|
+
display: block;
|
1322
|
+
box-sizing: border-box;
|
1323
|
+
}
|
1324
|
+
|
1325
|
+
.trigger {
|
1326
|
+
position: fixed;
|
1327
|
+
transform: scale(0);
|
1328
|
+
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
1329
|
+
bottom: 20px;
|
1330
|
+
right: 20px;
|
1331
|
+
z-index: 5;
|
1332
|
+
display: flex;
|
1333
|
+
align-items: center;
|
1334
|
+
justify-content: center;
|
1335
|
+
border: none;
|
1336
|
+
line-height: 55px;
|
1337
|
+
height: 55px;
|
1338
|
+
width: 55px;
|
1339
|
+
border-radius: 55px;
|
1340
|
+
cursor: pointer;
|
1341
|
+
background-color: var(--trigger-bg, var(--primary-background));
|
1342
|
+
font-family: Lato;
|
1343
|
+
text-decoration: none;
|
1344
|
+
border: 3px dashed transparent;
|
1345
|
+
box-sizing: border-box;
|
1346
|
+
transition: transform 200ms ease-out;
|
1347
|
+
}
|
1348
|
+
.trigger:hover {
|
1349
|
+
transform: scale(1.1) !important;
|
1350
|
+
}
|
1351
|
+
.trigger.rendered {
|
1352
|
+
transform: scale(1);
|
1353
|
+
}
|
1354
|
+
.trigger.active .trigger-icon {
|
1355
|
+
opacity: 0;
|
1356
|
+
transform: rotate(-180deg) scale(0);
|
1357
|
+
}
|
1358
|
+
.trigger.active .trigger-close {
|
1359
|
+
opacity: 1;
|
1360
|
+
transform: rotate(0deg) scale(1);
|
1361
|
+
}
|
1362
|
+
|
1363
|
+
.trigger-icon {
|
1364
|
+
display: inline-block;
|
1365
|
+
line-height: inherit;
|
1366
|
+
text-align: center;
|
1367
|
+
opacity: 1;
|
1368
|
+
transform: rotate(0deg) scale(1);
|
1369
|
+
transition: opacity 200ms ease-out, transform 200ms ease-out;
|
1370
|
+
color: var(--trigger-text-color, var(--text-on-primary-background));
|
1371
|
+
}
|
1372
|
+
.trigger-close {
|
1373
|
+
opacity: 0;
|
1374
|
+
transition: transform 200ms ease-out;
|
1375
|
+
transform: rotate(180deg) scale(0);
|
1376
|
+
position: absolute;
|
1377
|
+
top: 0;
|
1378
|
+
bottom: 0;
|
1379
|
+
left: 0;
|
1380
|
+
right: 0;
|
1381
|
+
display: flex;
|
1382
|
+
justify-content: center;
|
1383
|
+
align-items: center;
|
1384
|
+
fill: var(--trigger-text-color, var(--text-on-primary-background));
|
1385
|
+
}
|
1386
|
+
`
|
1387
|
+
];
|
1388
|
+
et([
|
1389
|
+
y({ attribute: !1 })
|
1390
|
+
], A.prototype, "application", 2);
|
1391
|
+
et([
|
1392
|
+
B()
|
1393
|
+
], A.prototype, "active", 2);
|
1394
|
+
et([
|
1395
|
+
B()
|
1396
|
+
], A.prototype, "loaded", 2);
|
1397
|
+
et([
|
1398
|
+
B()
|
1399
|
+
], A.prototype, "icon", 2);
|
1400
|
+
var Be = Object.defineProperty, ze = Object.getOwnPropertyDescriptor, E = (i, t, e, r) => {
|
1401
|
+
for (var n = r > 1 ? void 0 : r ? ze(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
1402
|
+
(o = i[s]) && (n = (r ? o(t, e, n) : o(n)) || n);
|
1403
|
+
return r && n && Be(t, e, n), n;
|
1404
|
+
};
|
1405
|
+
const We = (i) => {
|
1406
|
+
class t extends i {
|
1407
|
+
constructor() {
|
1408
|
+
super(...arguments), this.properties = {}, this.context = {}, this.layout = {}, this.nodes = [];
|
1409
|
+
}
|
1410
|
+
writeProperties(r) {
|
1411
|
+
this.properties = r;
|
1412
|
+
}
|
1413
|
+
writeLayout(r) {
|
1414
|
+
this.layout = r;
|
1415
|
+
}
|
1416
|
+
writeContext(r) {
|
1417
|
+
this.context = r;
|
1418
|
+
}
|
1419
|
+
addChild(r) {
|
1420
|
+
r.parent = this, this.nodes.push(r);
|
1421
|
+
}
|
1422
|
+
connectedCallback() {
|
1423
|
+
super.connectedCallback(), this.renderRoot.host.style.setProperty(
|
1424
|
+
"--width",
|
1425
|
+
this.layout.size === "full" ? "var(--columns, 1)" : `min(${this.layout.size || "var(--columns)"}, var(--columns))`
|
1426
|
+
);
|
1427
|
+
}
|
1428
|
+
}
|
1429
|
+
return t.styles = [
|
1430
|
+
// (superClass as unknown as typeof LitElement).styles ?? [],
|
1431
|
+
D`
|
1432
|
+
:host {
|
1433
|
+
font-family: var(--font-family);
|
1434
|
+
grid-column: span var(--width);
|
1435
|
+
max-width: 100%;
|
1436
|
+
overflow: hidden;
|
1437
|
+
box-sizing: border-box;
|
1438
|
+
display: block;
|
1439
|
+
}
|
1440
|
+
* {
|
1441
|
+
box-sizing: border-box;
|
1442
|
+
}
|
1443
|
+
`
|
1444
|
+
], E([
|
1445
|
+
y()
|
1446
|
+
], t.prototype, "properties", 2), E([
|
1447
|
+
y()
|
1448
|
+
], t.prototype, "context", 2), E([
|
1449
|
+
y()
|
1450
|
+
], t.prototype, "layout", 2), E([
|
1451
|
+
y()
|
1452
|
+
], t.prototype, "name", 2), E([
|
1453
|
+
y()
|
1454
|
+
], t.prototype, "type", 2), E([
|
1455
|
+
y({ attribute: !1 })
|
1456
|
+
], t.prototype, "application", 2), E([
|
1457
|
+
y({ attribute: !1 })
|
1458
|
+
], t.prototype, "parent", 2), t;
|
1459
|
+
};
|
1460
|
+
class bt extends We($) {
|
1461
|
+
render() {
|
1462
|
+
return Z`Non resolved component`;
|
1463
|
+
}
|
1464
|
+
}
|
1465
|
+
bt.styles = [
|
1466
|
+
D`
|
1467
|
+
:host {
|
1468
|
+
display: block;
|
1469
|
+
}
|
1470
|
+
`
|
1471
|
+
];
|
1472
|
+
/**
|
1473
|
+
* @license
|
1474
|
+
* Copyright 2020 Google LLC
|
1475
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1476
|
+
*/
|
1477
|
+
const Ge = (i) => i.strings === void 0;
|
1478
|
+
/**
|
1479
|
+
* @license
|
1480
|
+
* Copyright 2017 Google LLC
|
1481
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1482
|
+
*/
|
1483
|
+
const M = (i, t) => {
|
1484
|
+
var r;
|
1485
|
+
const e = i._$AN;
|
1486
|
+
if (e === void 0)
|
1487
|
+
return !1;
|
1488
|
+
for (const n of e)
|
1489
|
+
(r = n._$AO) == null || r.call(n, t, !1), M(n, t);
|
1490
|
+
return !0;
|
1491
|
+
}, Q = (i) => {
|
1492
|
+
let t, e;
|
1493
|
+
do {
|
1494
|
+
if ((t = i._$AM) === void 0)
|
1495
|
+
break;
|
1496
|
+
e = t._$AN, e.delete(i), i = t;
|
1497
|
+
} while ((e == null ? void 0 : e.size) === 0);
|
1498
|
+
}, ee = (i) => {
|
1499
|
+
for (let t; t = i._$AM; i = t) {
|
1500
|
+
let e = t._$AN;
|
1501
|
+
if (e === void 0)
|
1502
|
+
t._$AN = e = /* @__PURE__ */ new Set();
|
1503
|
+
else if (e.has(i))
|
1504
|
+
break;
|
1505
|
+
e.add(i), Ye(t);
|
1506
|
+
}
|
1507
|
+
};
|
1508
|
+
function Ve(i) {
|
1509
|
+
this._$AN !== void 0 ? (Q(this), this._$AM = i, ee(this)) : this._$AM = i;
|
1510
|
+
}
|
1511
|
+
function Fe(i, t = !1, e = 0) {
|
1512
|
+
const r = this._$AH, n = this._$AN;
|
1513
|
+
if (n !== void 0 && n.size !== 0)
|
1514
|
+
if (t)
|
1515
|
+
if (Array.isArray(r))
|
1516
|
+
for (let s = e; s < r.length; s++)
|
1517
|
+
M(r[s], !1), Q(r[s]);
|
1518
|
+
else
|
1519
|
+
r != null && (M(r, !1), Q(r));
|
1520
|
+
else
|
1521
|
+
M(this, i);
|
1522
|
+
}
|
1523
|
+
const Ye = (i) => {
|
1524
|
+
i.type == Zt.CHILD && (i._$AP ?? (i._$AP = Fe), i._$AQ ?? (i._$AQ = Ve));
|
1525
|
+
};
|
1526
|
+
class qe extends Xt {
|
1527
|
+
constructor() {
|
1528
|
+
super(...arguments), this._$AN = void 0;
|
1529
|
+
}
|
1530
|
+
_$AT(t, e, r) {
|
1531
|
+
super._$AT(t, e, r), ee(this), this.isConnected = t._$AU;
|
1532
|
+
}
|
1533
|
+
_$AO(t, e = !0) {
|
1534
|
+
var r, n;
|
1535
|
+
t !== this.isConnected && (this.isConnected = t, t ? (r = this.reconnected) == null || r.call(this) : (n = this.disconnected) == null || n.call(this)), e && (M(this, t), Q(this));
|
1536
|
+
}
|
1537
|
+
setValue(t) {
|
1538
|
+
if (Ge(this._$Ct))
|
1539
|
+
this._$Ct._$AI(t, this);
|
1540
|
+
else {
|
1541
|
+
const e = [...this._$Ct._$AH];
|
1542
|
+
e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
|
1543
|
+
}
|
1544
|
+
}
|
1545
|
+
disconnected() {
|
1546
|
+
}
|
1547
|
+
reconnected() {
|
1548
|
+
}
|
1549
|
+
}
|
1550
|
+
/**
|
1551
|
+
* @license
|
1552
|
+
* Copyright 2020 Google LLC
|
1553
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1554
|
+
*/
|
1555
|
+
const Je = () => new Ke();
|
1556
|
+
class Ke {
|
1557
|
+
}
|
1558
|
+
const lt = /* @__PURE__ */ new WeakMap(), Ze = Qt(class extends qe {
|
1559
|
+
render(i) {
|
1560
|
+
return p;
|
1561
|
+
}
|
1562
|
+
update(i, [t]) {
|
1563
|
+
var r;
|
1564
|
+
const e = t !== this.G;
|
1565
|
+
return e && this.G !== void 0 && this.ot(void 0), (e || this.rt !== this.lt) && (this.G = t, this.ct = (r = i.options) == null ? void 0 : r.host, this.ot(this.lt = i.element)), p;
|
1566
|
+
}
|
1567
|
+
ot(i) {
|
1568
|
+
if (typeof this.G == "function") {
|
1569
|
+
const t = this.ct ?? globalThis;
|
1570
|
+
let e = lt.get(t);
|
1571
|
+
e === void 0 && (e = /* @__PURE__ */ new WeakMap(), lt.set(t, e)), e.get(this.G) !== void 0 && this.G.call(this.ct, void 0), e.set(this.G, i), i !== void 0 && this.G.call(this.ct, i);
|
1572
|
+
} else
|
1573
|
+
this.G.value = i;
|
1574
|
+
}
|
1575
|
+
get rt() {
|
1576
|
+
var i, t;
|
1577
|
+
return typeof this.G == "function" ? (i = lt.get(this.ct ?? globalThis)) == null ? void 0 : i.get(this.G) : (t = this.G) == null ? void 0 : t.value;
|
1578
|
+
}
|
1579
|
+
disconnected() {
|
1580
|
+
this.rt === this.lt && this.ot(void 0);
|
1581
|
+
}
|
1582
|
+
reconnected() {
|
1583
|
+
this.ot(this.lt);
|
1584
|
+
}
|
1585
|
+
});
|
1586
|
+
/**
|
1587
|
+
* @license
|
1588
|
+
* Copyright 2021 Google LLC
|
1589
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
1590
|
+
*/
|
1591
|
+
function* Qe(i, t) {
|
1592
|
+
if (i !== void 0) {
|
1593
|
+
let e = 0;
|
1594
|
+
for (const r of i)
|
1595
|
+
yield t(r, e++);
|
1596
|
+
}
|
1597
|
+
}
|
1598
|
+
var w = /* @__PURE__ */ ((i) => (i.Inline = "inline", i.Trigger = "trigger", i))(w || {}), Xe = Object.defineProperty, tr = Object.getOwnPropertyDescriptor, er = (i, t, e, r) => {
|
1599
|
+
for (var n = r > 1 ? void 0 : r ? tr(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
1600
|
+
(o = i[s]) && (n = (r ? o(t, e, n) : o(n)) || n);
|
1601
|
+
return r && n && Xe(t, e, n), n;
|
1602
|
+
};
|
1603
|
+
class rt extends $ {
|
1604
|
+
constructor() {
|
1605
|
+
super(...arguments), this.nodes = [], this.wrapperRef = Je();
|
1606
|
+
}
|
1607
|
+
addChild(t) {
|
1608
|
+
t.parent = this, this.nodes.push(t);
|
1609
|
+
}
|
1610
|
+
applyBranding() {
|
1611
|
+
if (this.wrapperRef.value) {
|
1612
|
+
const t = this.application.settings;
|
1613
|
+
t != null && t.branding && te(t.branding, this.wrapperRef.value);
|
1614
|
+
}
|
1615
|
+
}
|
1616
|
+
firstUpdated(t) {
|
1617
|
+
this.applyBranding();
|
1618
|
+
}
|
1619
|
+
render() {
|
1620
|
+
return this.application.renderStrategy === w.Trigger && this.renderRoot.host.classList.add("floating"), Z`<div class="widget-container" ${Ze(this.wrapperRef)}>
|
1621
|
+
${Qe(this.nodes, (t) => t)}
|
1622
|
+
</div>`;
|
1623
|
+
}
|
1624
|
+
}
|
1625
|
+
rt.styles = D`
|
1626
|
+
:host {
|
1627
|
+
--font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
1628
|
+
--spacing-xs: 0.2rem;
|
1629
|
+
--spacing-sm: 0.5rem;
|
1630
|
+
--spacing-md: 1rem;
|
1631
|
+
--spacing-lg: 1.2rem;
|
1632
|
+
--spacing-xl: 1.8rem;
|
1633
|
+
|
1634
|
+
--text-color: #222222;
|
1635
|
+
--link-color: #990ae3;
|
1636
|
+
--gray-color: #f3f3f8;
|
1637
|
+
--gray-dark-color: #a6a6a6;
|
1638
|
+
|
1639
|
+
--box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
|
1640
|
+
--border-radius: var(--spacing-sm);
|
1641
|
+
--border-radius-sm: var(--spacing-sm);
|
1642
|
+
}
|
1643
|
+
:host {
|
1644
|
+
--voca-rem-multiplier: 0.625;
|
1645
|
+
box-sizing: border-box;
|
1646
|
+
display: block;
|
1647
|
+
}
|
1648
|
+
|
1649
|
+
:host(.floating) {
|
1650
|
+
position: fixed;
|
1651
|
+
z-index: 6;
|
1652
|
+
inset: auto 20px 95px auto;
|
1653
|
+
max-height: calc(100vh - 120px);
|
1654
|
+
width: 400px;
|
1655
|
+
height: 700px;
|
1656
|
+
}
|
1657
|
+
:host(.floating) .widget-container {
|
1658
|
+
box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;
|
1659
|
+
border-radius: 0.7rem;
|
1660
|
+
}
|
1661
|
+
:host(.inline) {
|
1662
|
+
height: 100%;
|
1663
|
+
position: fixed;
|
1664
|
+
inset: 0 0 0 0;
|
1665
|
+
}
|
1666
|
+
|
1667
|
+
* {
|
1668
|
+
box-sizing: border-box;
|
1669
|
+
}
|
1670
|
+
.widget-container {
|
1671
|
+
height: 100%;
|
1672
|
+
background-color: var(--primary-background);
|
1673
|
+
padding: 0 var(--spacing-sm);
|
1674
|
+
}
|
1675
|
+
.widget-container.expanded {
|
1676
|
+
opacity: 1;
|
1677
|
+
animation: slideUp 0.5s;
|
1678
|
+
}
|
1679
|
+
.widget-container.hidden {
|
1680
|
+
opacity: 0;
|
1681
|
+
animation: slideDown 0.5s;
|
1682
|
+
}
|
1683
|
+
@keyframes slideDown {
|
1684
|
+
from {
|
1685
|
+
transform: translateY(0);
|
1686
|
+
opacity: 1;
|
1687
|
+
}
|
1688
|
+
to {
|
1689
|
+
transform: translateY(100%);
|
1690
|
+
opacity: 0;
|
1691
|
+
}
|
1692
|
+
}
|
1693
|
+
@keyframes slideUp {
|
1694
|
+
from {
|
1695
|
+
transform: translateY(100%);
|
1696
|
+
opacity: 0;
|
1697
|
+
}
|
1698
|
+
to {
|
1699
|
+
transform: translateY(0);
|
1700
|
+
opacity: 1;
|
1701
|
+
}
|
1702
|
+
}
|
1703
|
+
`;
|
1704
|
+
er([
|
1705
|
+
y({ attribute: !1 })
|
1706
|
+
], rt.prototype, "application", 2);
|
1707
|
+
class rr {
|
1708
|
+
constructor() {
|
1709
|
+
this.root = this.createRoot();
|
1710
|
+
}
|
1711
|
+
createComponentModel(t, e) {
|
1712
|
+
this.root.application = e;
|
1713
|
+
const r = (a) => {
|
1714
|
+
if (Array.isArray(a)) {
|
1715
|
+
const [c, ...h] = a;
|
1716
|
+
return {
|
1717
|
+
definitionId: c,
|
1718
|
+
overrides: h
|
1719
|
+
};
|
1720
|
+
}
|
1721
|
+
return {
|
1722
|
+
definitionId: a,
|
1723
|
+
overrides: []
|
1724
|
+
};
|
1725
|
+
}, n = (a, c, h, d) => {
|
1726
|
+
h.forEach((l) => {
|
1727
|
+
const f = r(l), u = d[f.definitionId];
|
1728
|
+
if (!u) {
|
1729
|
+
console.error(
|
1730
|
+
`No definition found for component type '${f.definitionId}'.`
|
1731
|
+
);
|
1732
|
+
return;
|
1733
|
+
}
|
1734
|
+
const g = a.createNode(u.type, u.type);
|
1735
|
+
g && (g.name = f.definitionId, g.application = e, u.properties && g.writeProperties(u.properties), u.context && g.writeContext(u.context), u.layout && g.writeLayout(u.layout), c.addChild(g), u.children && n(
|
1736
|
+
a,
|
1737
|
+
g,
|
1738
|
+
u.children,
|
1739
|
+
d
|
1740
|
+
// views
|
1741
|
+
));
|
1742
|
+
});
|
1743
|
+
}, { entry: s, components: o } = t;
|
1744
|
+
return n(this, this.root, [s], o), this.root;
|
1745
|
+
}
|
1746
|
+
createRoot() {
|
1747
|
+
return new rt();
|
1748
|
+
}
|
1749
|
+
createNode(t, e) {
|
1750
|
+
const r = this.resolveComponent(e);
|
1751
|
+
if (!r)
|
1752
|
+
return console.warn(`Unable to resolve component: ${e}`), new bt();
|
1753
|
+
const n = new r();
|
1754
|
+
return n.type = e, n.name = t, n;
|
1755
|
+
}
|
1756
|
+
resolveComponent(t) {
|
1757
|
+
return customElements.get(`ace-${t}`);
|
1758
|
+
}
|
1759
|
+
getRoot() {
|
1760
|
+
return this.root;
|
1761
|
+
}
|
1762
|
+
}
|
1763
|
+
const re = class {
|
1764
|
+
constructor() {
|
1765
|
+
this.components = /* @__PURE__ */ new Map();
|
1766
|
+
}
|
1767
|
+
getComponent(i) {
|
1768
|
+
const t = this.components.get(i);
|
1769
|
+
return t || console.warn(
|
1770
|
+
`Unable to resolve component: ${i}. You most likely forgot to register the required plugin.`
|
1771
|
+
), t;
|
1772
|
+
}
|
1773
|
+
registerComponent(i, t) {
|
1774
|
+
this.components.set(i, t);
|
1775
|
+
}
|
1776
|
+
async loadComponents() {
|
1777
|
+
const i = [...this.components.entries()].map(([t, e]) => e.then((r) => {
|
1778
|
+
this.defineAsWebComponent(t, r.default);
|
1779
|
+
}));
|
1780
|
+
await Promise.all(i);
|
1781
|
+
}
|
1782
|
+
defineAsWebComponent(i, t) {
|
1783
|
+
const e = re.ResolveWebComponentName(i);
|
1784
|
+
customElements.get(e) || customElements.define(e, t);
|
1785
|
+
}
|
1786
|
+
};
|
1787
|
+
let ie = re;
|
1788
|
+
ie.ResolveWebComponentName = (i) => `ace-${i}`;
|
1789
|
+
class ir {
|
1790
|
+
constructor(t, e, r, n) {
|
1791
|
+
this.name = t, this.container = e, this.settings = r, this.options = n, this.platform = new rr(), this.renderStrategy = w.Inline, this.autoActivate = !1, this.plugins = [], this.componentResolver = new ie(), this.renderStrategy = this.options.renderStrategy || w.Inline, this.triggerIcon = this.options.triggerIcon, typeof n.autoActivate == "boolean" && (this.autoActivate = n.autoActivate), this.container.register("$settings", r);
|
1792
|
+
}
|
1793
|
+
async activate() {
|
1794
|
+
if (await this.loadPlugins(), await this.componentResolver.loadComponents(), this.root = this.platform.createComponentModel(this.settings, this), this.container.setState(Gt.Ready), this.autoActivate) {
|
1795
|
+
const t = this.render();
|
1796
|
+
t && document.body.appendChild(t);
|
1797
|
+
}
|
1798
|
+
}
|
1799
|
+
async loadPlugins() {
|
1800
|
+
for await (const t of this.plugins)
|
1801
|
+
await t(this);
|
1802
|
+
}
|
1803
|
+
plugin(t) {
|
1804
|
+
return this.plugins.push(t), this;
|
1805
|
+
}
|
1806
|
+
appendToDOM() {
|
1807
|
+
this.root && document.body.appendChild(this.root);
|
1808
|
+
}
|
1809
|
+
removeFromDOM() {
|
1810
|
+
this.root && document.body.removeChild(this.root);
|
1811
|
+
}
|
1812
|
+
registerComponent(t, e) {
|
1813
|
+
this.componentResolver.registerComponent(t, e);
|
1814
|
+
}
|
1815
|
+
resolveComponent(t) {
|
1816
|
+
return this.componentResolver.getComponent(t);
|
1817
|
+
}
|
1818
|
+
render() {
|
1819
|
+
if (this.renderStrategy === w.Trigger) {
|
1820
|
+
const t = new A();
|
1821
|
+
return t.application = this, t;
|
1822
|
+
}
|
1823
|
+
return this.root;
|
1824
|
+
}
|
1825
|
+
}
|
1826
|
+
const ne = class {
|
1827
|
+
// TODO:
|
1828
|
+
// private static endpoint = 'http://localhost:5299/api'; // TODO:
|
1829
|
+
static async getSite(i) {
|
1830
|
+
const e = await (await fetch(i)).json();
|
1831
|
+
return e ? {
|
1832
|
+
id: e.id,
|
1833
|
+
apps: e.widgets.map((r) => {
|
1834
|
+
let n = w.Inline;
|
1835
|
+
return r.renderStrategy === "Trigger" && (n = w.Trigger), {
|
1836
|
+
id: r.id,
|
1837
|
+
widgetId: r.widgetId,
|
1838
|
+
renderStrategy: n,
|
1839
|
+
triggerIcon: {
|
1840
|
+
type: "Telia",
|
1841
|
+
content: r.triggerIcon
|
1842
|
+
}
|
1843
|
+
};
|
1844
|
+
})
|
1845
|
+
} : null;
|
1846
|
+
}
|
1847
|
+
static async getWidget(i) {
|
1848
|
+
const e = await (await fetch(`${ne.endpoint}/widget/${i}`)).json();
|
1849
|
+
return e ? {
|
1850
|
+
name: e.name,
|
1851
|
+
config: JSON.parse(e.configuration)
|
1852
|
+
} : null;
|
1853
|
+
}
|
1854
|
+
};
|
1855
|
+
let gt = ne;
|
1856
|
+
gt.endpoint = "https://widgets.ace.teliacompany.net/api";
|
1857
|
+
class nr {
|
1858
|
+
constructor() {
|
1859
|
+
this.applications = [], this.container = new Ct("environment", this), setTimeout(() => {
|
1860
|
+
this.notifyWidgetsOfCreation();
|
1861
|
+
}, 1e3);
|
1862
|
+
}
|
1863
|
+
async bootstrap() {
|
1864
|
+
await this.activate();
|
1865
|
+
}
|
1866
|
+
async activate() {
|
1867
|
+
const t = this.applications.filter(
|
1868
|
+
(e) => e.autoActivate
|
1869
|
+
);
|
1870
|
+
for await (const e of t)
|
1871
|
+
await e.activate();
|
1872
|
+
}
|
1873
|
+
notifyWidgetsOfCreation() {
|
1874
|
+
document.querySelectorAll("ace-widget").forEach((e) => {
|
1875
|
+
const r = this.applications.find((n) => n.name === e.name);
|
1876
|
+
r && e.dispatchEvent(
|
1877
|
+
new CustomEvent("environment-created", {
|
1878
|
+
detail: { widget: r }
|
1879
|
+
})
|
1880
|
+
);
|
1881
|
+
});
|
1882
|
+
}
|
1883
|
+
registerApp(t, e, r) {
|
1884
|
+
const n = new Ct(t, this), s = new ir(t, n, e, r);
|
1885
|
+
this.applications.push(s);
|
1886
|
+
}
|
1887
|
+
}
|
1888
|
+
class sr {
|
1889
|
+
constructor(t) {
|
1890
|
+
this.configurations = [], typeof t == "string" ? this.url = t : this.loadFromConfig(t);
|
1891
|
+
}
|
1892
|
+
async load(t) {
|
1893
|
+
const e = await gt.getSite(t);
|
1894
|
+
if (!e) {
|
1895
|
+
console.warn(`Unable to load site from the url provided: ${t}`);
|
1896
|
+
return;
|
1897
|
+
}
|
1898
|
+
this.configurations = e.apps;
|
1899
|
+
}
|
1900
|
+
loadFromConfig(t) {
|
1901
|
+
this.configurations = t.apps.map((e) => ({
|
1902
|
+
id: "",
|
1903
|
+
renderStrategy: e.renderStrategy,
|
1904
|
+
widgetId: e.widgetId,
|
1905
|
+
autoActivate: e.autoActivate,
|
1906
|
+
triggerIcon: {
|
1907
|
+
type: "Telia",
|
1908
|
+
content: e.triggerIcon || "question"
|
1909
|
+
}
|
1910
|
+
}));
|
1911
|
+
}
|
1912
|
+
async bootstrap(t) {
|
1913
|
+
var e;
|
1914
|
+
this.url && await this.load(this.url), this.environment = new nr(), this.addGlobal(this.environment);
|
1915
|
+
for await (const r of this.configurations) {
|
1916
|
+
const n = await gt.getWidget(r.widgetId);
|
1917
|
+
n && ((e = this.environment) == null || e.registerApp(n.name, n.config, {
|
1918
|
+
renderStrategy: r.renderStrategy,
|
1919
|
+
triggerIcon: r.triggerIcon,
|
1920
|
+
autoActivate: r.autoActivate
|
1921
|
+
}));
|
1922
|
+
}
|
1923
|
+
t(this.environment), await this.environment.bootstrap();
|
1924
|
+
}
|
1925
|
+
addGlobal(t) {
|
1926
|
+
globalThis.widgets = t;
|
1927
|
+
}
|
1928
|
+
}
|
1929
|
+
var or = Object.defineProperty, ar = Object.getOwnPropertyDescriptor, _t = (i, t, e, r) => {
|
1930
|
+
for (var n = r > 1 ? void 0 : r ? ar(t, e) : t, s = i.length - 1, o; s >= 0; s--)
|
1931
|
+
(o = i[s]) && (n = (r ? o(t, e, n) : o(n)) || n);
|
1932
|
+
return r && n && or(t, e, n), n;
|
1933
|
+
};
|
1934
|
+
class z extends $ {
|
1935
|
+
constructor() {
|
1936
|
+
super(), this.status = "deactivated", this.addEventListener("environment-created", this.onEnvironmentCreated);
|
1937
|
+
}
|
1938
|
+
async connectedCallback() {
|
1939
|
+
super.connectedCallback(), await this.getGlobalEnvironment();
|
1940
|
+
}
|
1941
|
+
disconnectedCallback() {
|
1942
|
+
super.disconnectedCallback(), this.removeEventListener("environment-created", this.onEnvironmentCreated);
|
1943
|
+
}
|
1944
|
+
async onEnvironmentCreated(t) {
|
1945
|
+
this.widget = t.detail.widget, await this.activate(), this.requestUpdate();
|
1946
|
+
}
|
1947
|
+
async activate() {
|
1948
|
+
this.widget && (await this.widget.activate(), this.status = "activated");
|
1949
|
+
}
|
1950
|
+
async getGlobalEnvironment() {
|
1951
|
+
const t = globalThis.widgets;
|
1952
|
+
t && (this.widget = t.applications.find(
|
1953
|
+
(e) => e.name === this.name
|
1954
|
+
), await this.activate());
|
1955
|
+
}
|
1956
|
+
render() {
|
1957
|
+
if (!this.widget || this.status !== "activated")
|
1958
|
+
return p;
|
1959
|
+
if (this.widget.renderStrategy === w.Trigger) {
|
1960
|
+
const t = new A();
|
1961
|
+
return t.application = this.widget, t;
|
1962
|
+
}
|
1963
|
+
return this.widget.render();
|
1964
|
+
}
|
1965
|
+
}
|
1966
|
+
z.styles = [
|
1967
|
+
D`
|
1968
|
+
:host {
|
1969
|
+
display: block;
|
1970
|
+
}
|
1971
|
+
`
|
1972
|
+
];
|
1973
|
+
_t([
|
1974
|
+
y({ attribute: !0 })
|
1975
|
+
], z.prototype, "name", 2);
|
1976
|
+
_t([
|
1977
|
+
B()
|
1978
|
+
], z.prototype, "widget", 2);
|
1979
|
+
_t([
|
1980
|
+
B()
|
1981
|
+
], z.prototype, "status", 2);
|
1982
|
+
customElements.get("ace-trigger") || customElements.define("ace-trigger", A);
|
1983
|
+
customElements.get("ace-unresolved-component") || customElements.define("ace-unresolved-component", bt);
|
1984
|
+
customElements.get("ace-wrapper") || customElements.define("ace-wrapper", rt);
|
1985
|
+
customElements.get("ace-widget") || customElements.define("ace-widget", z);
|
1986
|
+
const hr = async (i, t) => {
|
1987
|
+
await new sr(i).bootstrap(t);
|
1988
|
+
};
|
1989
|
+
export {
|
1990
|
+
z as AceWidget,
|
1991
|
+
ir as Application,
|
1992
|
+
Ct as Container,
|
1993
|
+
nr as Environment,
|
1994
|
+
sr as Site,
|
1995
|
+
A as Trigger,
|
1996
|
+
We as WidgetComponent,
|
1997
|
+
hr as bootstrap
|
1998
|
+
};
|