@telia-ace/widget-components-widget-header-flamingo 1.1.6 → 1.1.7-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,99 +1,99 @@
1
- const ht = (i, t, e, ...s) => {
2
- const n = `[${i.get("$environment").name || "webprovisions"}] ${e}`;
1
+ const pt = (n, t, e, ...s) => {
2
+ const i = `[${n.get("$environment").name || "webprovisions"}] ${e}`;
3
3
  switch (t) {
4
4
  case "info":
5
- console.info(n, ...s);
5
+ console.info(i, ...s);
6
6
  break;
7
7
  case "warning":
8
- console.warn(n, ...s);
8
+ console.warn(i, ...s);
9
9
  break;
10
10
  case "error":
11
- console.error(n, ...s);
11
+ console.error(i, ...s);
12
12
  break;
13
13
  }
14
- }, Oe = (i) => {
15
- const t = i.container || i;
14
+ }, xe = (n) => {
15
+ const t = n.container || n;
16
16
  return {
17
- info: (e, ...s) => ht(t, "info", e, ...s),
18
- warn: (e, ...s) => ht(t, "warning", e, ...s),
19
- error: (e, ...s) => ht(t, "error", e, ...s)
17
+ info: (e, ...s) => pt(t, "info", e, ...s),
18
+ warn: (e, ...s) => pt(t, "warning", e, ...s),
19
+ error: (e, ...s) => pt(t, "error", e, ...s)
20
20
  };
21
21
  };
22
- var W = /* @__PURE__ */ ((i) => (i.Implementation = "implementation", i.Widget = "widget", i))(W || {}), O = /* @__PURE__ */ ((i) => (i.Pre = "pre", i.Post = "post", i))(O || {});
23
- const Se = (i, t, e, s) => {
22
+ var q = /* @__PURE__ */ ((n) => (n.Implementation = "implementation", n.Widget = "widget", n))(q || {}), k = /* @__PURE__ */ ((n) => (n.Pre = "pre", n.Post = "post", n))(k || {});
23
+ const Pe = (n, t, e, s) => {
24
24
  try {
25
- const n = new t(e, s);
25
+ const i = new t(e, s);
26
26
  return {
27
- name: i,
27
+ name: n,
28
28
  invoke: (r, o) => {
29
29
  let a;
30
- return n[r] && (a = n[r].call(n, o)), Promise.resolve(a);
30
+ return i[r] && (a = i[r].call(i, o)), Promise.resolve(a);
31
31
  },
32
- getInstance: () => n
32
+ getInstance: () => i
33
33
  };
34
- } catch (n) {
35
- if (n.message && n.message.indexOf("is not a constructor") >= 0)
34
+ } catch (i) {
35
+ if (i.message && i.message.indexOf("is not a constructor") >= 0)
36
36
  return {
37
- name: i,
37
+ name: n,
38
38
  invoke: (r) => {
39
39
  let o;
40
40
  return r === "initialize" && (o = t(e, s)), Promise.resolve(o);
41
41
  },
42
42
  getInstance: () => t
43
43
  };
44
- throw n;
44
+ throw i;
45
45
  }
46
46
  };
47
- function It(i, t) {
48
- return typeof i > "u" ? t : i;
47
+ function jt(n, t) {
48
+ return typeof n > "u" ? t : n;
49
49
  }
50
- let Ne = class {
50
+ let Ce = class {
51
51
  constructor(t = {}) {
52
52
  this.part = t;
53
53
  }
54
54
  createCommand(t, e, s) {
55
- let n;
56
- typeof e == "function" ? n = {
57
- scope: W.Widget,
58
- stage: O.Post,
55
+ let i;
56
+ typeof e == "function" ? i = {
57
+ scope: q.Widget,
58
+ stage: k.Post,
59
59
  defaultArgs: void 0,
60
60
  handlerResolver: e
61
- } : n = {
62
- scope: It(e.scope, W.Widget),
63
- stage: It(e.stage, O.Post),
61
+ } : i = {
62
+ scope: jt(e.scope, q.Widget),
63
+ stage: jt(e.stage, k.Post),
64
64
  defaultArgs: e.defaultArgs,
65
65
  handlerResolver: s
66
66
  };
67
67
  let r = this.part;
68
68
  const o = t.split(".");
69
- return o.forEach((a, h) => {
70
- h === o.length - 1 ? r[a] || (r[a] = () => n) : r = this.part[a] = this.part[a] || {};
69
+ return o.forEach((a, c) => {
70
+ c === o.length - 1 ? r[a] || (r[a] = () => i) : r = this.part[a] = this.part[a] || {};
71
71
  }), this;
72
72
  }
73
73
  get() {
74
74
  return this.part;
75
75
  }
76
76
  };
77
- const pe = (i) => {
78
- const t = new Ne({});
79
- return i(t), t.get();
77
+ const ce = (n) => {
78
+ const t = new Ce({});
79
+ return n(t), t.get();
80
80
  };
81
- pe((i) => {
82
- i.createCommand(
81
+ ce((n) => {
82
+ n.createCommand(
83
83
  "types.register",
84
- { scope: W.Implementation, stage: O.Pre },
84
+ { scope: q.Implementation, stage: k.Pre },
85
85
  (t) => (e, s) => {
86
86
  t.container.get("$types")[e] = s;
87
87
  }
88
88
  ).createCommand(
89
89
  "type",
90
- { stage: O.Pre },
90
+ { stage: k.Pre },
91
91
  (t) => (e) => {
92
92
  t.container.register("$type", e);
93
93
  }
94
94
  ).createCommand(
95
95
  "settings",
96
- { stage: O.Pre, defaultArgs: [null] },
96
+ { stage: k.Pre, defaultArgs: [null] },
97
97
  (t) => (e) => {
98
98
  t.events.dispatch(
99
99
  "settings:change",
@@ -103,31 +103,31 @@ pe((i) => {
103
103
  }
104
104
  ).createCommand(
105
105
  "plugin",
106
- { stage: O.Pre },
107
- (t) => (e, s, n) => {
106
+ { stage: k.Pre },
107
+ (t) => (e, s, i) => {
108
108
  const { container: r } = t;
109
- let o = null, a = e, h = s;
110
- typeof e == "string" && (o = e, a = s, h = n);
111
- const c = (l) => {
112
- const { transformPluginSettings: d } = t.container.get("$environmentOptions"), p = d ? d(
113
- h || {},
109
+ let o = null, a = e, c = s;
110
+ typeof e == "string" && (o = e, a = s, c = i);
111
+ const l = (h) => {
112
+ const { transformPluginSettings: p } = t.container.get("$environmentOptions"), u = p ? p(
113
+ c || {},
114
114
  o,
115
115
  t.container,
116
116
  a
117
117
  ) : s;
118
118
  try {
119
- const u = Se(
119
+ const d = Pe(
120
120
  o,
121
121
  a,
122
122
  r,
123
- p
123
+ u
124
124
  );
125
- r.get("$plugins").push(u), l && u.invoke("initialize", null);
126
- } catch (u) {
127
- Oe(t).warn("Error when initializing plugin", u);
125
+ r.get("$plugins").push(d), h && d.invoke("initialize", null);
126
+ } catch (d) {
127
+ xe(t).warn("Error when initializing plugin", d);
128
128
  }
129
129
  };
130
- t.container.get("$instance") ? c(!0) : t.events.subscribeOnce("widget:instance-created", () => c(!1));
130
+ t.container.get("$instance") ? l(!0) : t.events.subscribeOnce("widget:instance-created", () => l(!1));
131
131
  }
132
132
  ).createCommand(
133
133
  "container.register",
@@ -157,77 +157,77 @@ pe((i) => {
157
157
  }
158
158
  );
159
159
  });
160
- const Te = pe((i) => {
161
- i.createCommand(
160
+ const ke = ce((n) => {
161
+ n.createCommand(
162
162
  "ready",
163
- { scope: W.Implementation, stage: O.Pre },
163
+ { scope: q.Implementation, stage: k.Pre },
164
164
  (t) => (e) => {
165
- const { container: s } = t, n = s.owner;
166
- s.get("bootstrapping").ready ? e(n) : n.events.subscribeOnce("bootstrap:ready", () => {
167
- e(n);
165
+ const { container: s } = t, i = s.owner;
166
+ s.get("bootstrapping").ready ? e(i) : i.events.subscribeOnce("bootstrap:ready", () => {
167
+ e(i);
168
168
  });
169
169
  }
170
170
  );
171
- }), lt = /* @__PURE__ */ new WeakMap();
172
- function j() {
173
- return (i) => (lt.has(i) || lt.set(i, {}), lt.get(i));
171
+ }), dt = /* @__PURE__ */ new WeakMap();
172
+ function L() {
173
+ return (n) => (dt.has(n) || dt.set(n, {}), dt.get(n));
174
174
  }
175
- const dt = (i, t, e, ...s) => {
176
- const n = `[${i.get("$environment").name || "webprovisions"}] ${e}`;
175
+ const ut = (n, t, e, ...s) => {
176
+ const i = `[${n.get("$environment").name || "webprovisions"}] ${e}`;
177
177
  switch (t) {
178
178
  case "info":
179
- console.info(n, ...s);
179
+ console.info(i, ...s);
180
180
  break;
181
181
  case "warning":
182
- console.warn(n, ...s);
182
+ console.warn(i, ...s);
183
183
  break;
184
184
  case "error":
185
- console.error(n, ...s);
185
+ console.error(i, ...s);
186
186
  break;
187
187
  }
188
- }, f = (i) => {
189
- const t = i.container || i;
188
+ }, y = (n) => {
189
+ const t = n.container || n;
190
190
  return {
191
- info: (e, ...s) => dt(t, "info", e, ...s),
192
- warn: (e, ...s) => dt(t, "warning", e, ...s),
193
- error: (e, ...s) => dt(t, "error", e, ...s)
191
+ info: (e, ...s) => ut(t, "info", e, ...s),
192
+ warn: (e, ...s) => ut(t, "warning", e, ...s),
193
+ error: (e, ...s) => ut(t, "error", e, ...s)
194
194
  };
195
- }, g = j(), Ct = (() => {
196
- let i = 0;
197
- return () => ++i;
198
- })(), Pt = (i, t, e) => {
199
- const s = g(i).touchQueue.get(t);
200
- s && s.forEach((n) => {
201
- n(e, i);
195
+ }, g = L(), _t = (() => {
196
+ let n = 0;
197
+ return () => ++n;
198
+ })(), At = (n, t, e) => {
199
+ const s = g(n).touchQueue.get(t);
200
+ s && s.forEach((i) => {
201
+ i(e, n);
202
202
  });
203
203
  };
204
- class Me {
205
- constructor(t, e, s, n) {
206
- this.key = t, this.factory = e, this.parent = s, this.container = n, this.id = Ct(), this.resolved = !1, this.constructed = !1, this.async = !0;
204
+ class Oe {
205
+ constructor(t, e, s, i) {
206
+ this.key = t, this.factory = e, this.parent = s, this.container = i, this.id = _t(), this.resolved = !1, this.constructed = !1, this.async = !0;
207
207
  }
208
208
  resolve() {
209
209
  if (!this.constructed) {
210
210
  const t = this.factory(this.parent, this.container);
211
- return this.constructed = !0, this.value = Promise.resolve(t).then((e) => (this.resolved = !0, Pt(this.container, this.key, e), e));
211
+ return this.constructed = !0, this.value = Promise.resolve(t).then((e) => (this.resolved = !0, At(this.container, this.key, e), e));
212
212
  }
213
213
  return this.value;
214
214
  }
215
215
  }
216
- class Ue {
217
- constructor(t, e, s, n) {
218
- this.key = t, this.value = e, this.parent = s, this.container = n, this.id = Ct(), this.async = !1, this.resolved = !1, this.constructed = !0, this.resolve = () => (this.resolved = !0, Pt(this.container, this.key, this.value), this.value);
216
+ class Se {
217
+ constructor(t, e, s, i) {
218
+ this.key = t, this.value = e, this.parent = s, this.container = i, this.id = _t(), this.async = !1, this.resolved = !1, this.constructed = !0, this.resolve = () => (this.resolved = !0, At(this.container, this.key, this.value), this.value);
219
219
  }
220
220
  }
221
- class He {
222
- constructor(t, e, s, n) {
223
- this.key = t, this.value = e, this.parent = s, this.container = n, this.id = Ct(), this.async = !1, this.resolved = !1, this.constructed = !1, this.resolve = () => {
221
+ class Ne {
222
+ constructor(t, e, s, i) {
223
+ this.key = t, this.value = e, this.parent = s, this.container = i, this.id = _t(), this.async = !1, this.resolved = !1, this.constructed = !1, this.resolve = () => {
224
224
  this.resolved = !0, this.constructed = !0;
225
225
  const r = this.value(this.parent, this.container);
226
- return Pt(this.container, this.key, this.value), r;
226
+ return At(this.container, this.key, this.value), r;
227
227
  };
228
228
  }
229
229
  }
230
- class kt {
230
+ class Et {
231
231
  /**
232
232
  * Creates a new instance of `Container`.
233
233
  * @param owner The object owning this inctance.
@@ -242,7 +242,7 @@ class kt {
242
242
  * @param id Resolver id.
243
243
  */
244
244
  delete(t) {
245
- const e = g(this).resolvers, s = Array.from(e.values()).find((n) => n.id === t);
245
+ const e = g(this).resolvers, s = Array.from(e.values()).find((i) => i.id === t);
246
246
  return s ? (g(this).touchQueue.delete(s.key), Promise.resolve(e.delete(s.key))) : this.parent ? this.parent.delete(t) : Promise.resolve(!1);
247
247
  }
248
248
  /**
@@ -252,9 +252,9 @@ class kt {
252
252
  const t = g(this).resolvers, e = Array.from(t.values());
253
253
  return Promise.all(e.map((s) => {
254
254
  if (s.constructed)
255
- return Promise.resolve(s.resolve()).then((n) => {
256
- if (n !== null && typeof n == "object" && typeof n.dispose == "function")
257
- return n.dispose.call(n, this, s);
255
+ return Promise.resolve(s.resolve()).then((i) => {
256
+ if (i !== null && typeof i == "object" && typeof i.dispose == "function")
257
+ return i.dispose.call(i, this, s);
258
258
  });
259
259
  })).then(() => {
260
260
  e.forEach((s) => this.delete(s.id)), g(this).children.forEach((s) => s.clear());
@@ -277,13 +277,13 @@ class kt {
277
277
  touch(t, e) {
278
278
  const s = g(this).resolvers.get(t);
279
279
  if (s && s.constructed)
280
- Promise.resolve(s.resolve()).then((n) => {
281
- e(n, this);
280
+ Promise.resolve(s.resolve()).then((i) => {
281
+ e(i, this);
282
282
  });
283
283
  else {
284
- const n = g(this).touchQueue;
285
- let r = n.get(t);
286
- r || (r = [], n.set(t, r)), r.push(e);
284
+ const i = g(this).touchQueue;
285
+ let r = i.get(t);
286
+ r || (r = [], i.set(t, r)), r.push(e);
287
287
  }
288
288
  return this.parent && !s ? this.parent.touch(t, e) : Promise.resolve();
289
289
  }
@@ -294,9 +294,9 @@ class kt {
294
294
  */
295
295
  registerAsync(t, e) {
296
296
  const s = g(this).resolvers.get(t);
297
- s && !s.async && process.env.NODE_ENV !== "production" && f(this).warn(`Mismatching resolver type. You are registering an async resolver with a key ('${t}') previously used by a non-async resolver.`);
298
- const n = new Me(t, e, s, this);
299
- return g(this).resolvers.set(t, n), n.id;
297
+ s && !s.async && process.env.NODE_ENV !== "production" && y(this).warn(`Mismatching resolver type. You are registering an async resolver with a key ('${t}') previously used by a non-async resolver.`);
298
+ const i = new Oe(t, e, s, this);
299
+ return g(this).resolvers.set(t, i), i.id;
300
300
  }
301
301
  /**
302
302
  * Registers a factory resolver for constructing the value to be resolved.
@@ -305,9 +305,9 @@ class kt {
305
305
  */
306
306
  registerFactory(t, e) {
307
307
  const s = g(this).resolvers.get(t);
308
- s && s.async && process.env.NODE_ENV !== "production" && f(this).warn(`Mismatching resolver type. You are registering a non-async resolver with a key ('${t}') previously used by an async resolver.`);
309
- const n = new He(t, e, s, this);
310
- return g(this).resolvers.set(t, n), n.id;
308
+ s && s.async && process.env.NODE_ENV !== "production" && y(this).warn(`Mismatching resolver type. You are registering a non-async resolver with a key ('${t}') previously used by an async resolver.`);
309
+ const i = new Ne(t, e, s, this);
310
+ return g(this).resolvers.set(t, i), i.id;
311
311
  }
312
312
  /**
313
313
  * Registers an synchronous resolver.
@@ -316,9 +316,9 @@ class kt {
316
316
  */
317
317
  register(t, e) {
318
318
  const s = g(this).resolvers.get(t);
319
- s && s.async && process.env.NODE_ENV !== "production" && f(this).warn(`Mismatching resolver type. You are registering a non-async resolver with a key ('${t}') previously used by an async resolver.`);
320
- const n = new Ue(t, e, s, this);
321
- return g(this).resolvers.set(t, n), n.id;
319
+ s && s.async && process.env.NODE_ENV !== "production" && y(this).warn(`Mismatching resolver type. You are registering a non-async resolver with a key ('${t}') previously used by an async resolver.`);
320
+ const i = new Se(t, e, s, this);
321
+ return g(this).resolvers.set(t, i), i.id;
322
322
  }
323
323
  /**
324
324
  * Gets the value for a synchronous resolver.
@@ -327,7 +327,7 @@ class kt {
327
327
  get(t) {
328
328
  const e = g(this).resolvers.get(t);
329
329
  if (e)
330
- return e.async && process.env.NODE_ENV !== "production" && f(this).warn(`You are retrieving an async value (with key '${t}') by the non-async function 'container.get(key)'. This will not be supported in future versions. Use 'container.getAsync(key) instead.'`), e.resolve();
330
+ return e.async && process.env.NODE_ENV !== "production" && y(this).warn(`You are retrieving an async value (with key '${t}') by the non-async function 'container.get(key)'. This will not be supported in future versions. Use 'container.getAsync(key) instead.'`), e.resolve();
331
331
  if (this.parent)
332
332
  return this.parent.get(t);
333
333
  }
@@ -339,7 +339,7 @@ class kt {
339
339
  const e = g(this).resolvers.get(t);
340
340
  if (e) {
341
341
  if (!e.async)
342
- throw process.env.NODE_ENV !== "production" && f(this).warn(`You are retrieving a non-async value (with key '${t}') by the async function 'container.getAsync(key)'.Use 'container.get(key) instead.'`), "Mismatching resolver type";
342
+ throw process.env.NODE_ENV !== "production" && y(this).warn(`You are retrieving a non-async value (with key '${t}') by the async function 'container.getAsync(key)'.Use 'container.get(key) instead.'`), "Mismatching resolver type";
343
343
  return e.resolve();
344
344
  }
345
345
  return this.parent ? this.parent.getAsync(t) : Promise.resolve(void 0);
@@ -350,14 +350,14 @@ class kt {
350
350
  }
351
351
  getManyAsync(...t) {
352
352
  const e = {};
353
- return Promise.all(t.map((s) => this.getAsync(s).then((n) => e[s] = n))).then(() => e);
353
+ return Promise.all(t.map((s) => this.getAsync(s).then((i) => e[s] = i))).then(() => e);
354
354
  }
355
355
  createChild(t, e) {
356
- const s = new kt(t, e, this);
356
+ const s = new Et(t, e, this);
357
357
  return g(this).children.push(s), s;
358
358
  }
359
359
  }
360
- let Bt = class {
360
+ let zt = class {
361
361
  /**
362
362
  *
363
363
  * @param type Type of event.
@@ -365,8 +365,8 @@ let Bt = class {
365
365
  * @param cancelable Whether the event is cancelable by calling preventDefault().
366
366
  * @param bubbles Whether the event will bubble up the parent hierarchy.
367
367
  */
368
- constructor(t, e, s = !1, n = !1) {
369
- this.type = t, this.target = e, this.cancelable = !!s, this.bubbles = !!n, this.defaultPrevented = !1;
368
+ constructor(t, e, s = !1, i = !1) {
369
+ this.type = t, this.target = e, this.cancelable = !!s, this.bubbles = !!i, this.defaultPrevented = !1;
370
370
  }
371
371
  /**
372
372
  * Cancels the default behaviour (if the event is cancelable).
@@ -375,34 +375,34 @@ let Bt = class {
375
375
  this.cancelable && (this.defaultPrevented = !0);
376
376
  }
377
377
  };
378
- const _ = j(), Vt = (i, t) => [].concat(
379
- _(i).listenerLookup.get(t.toLowerCase()) || [],
380
- _(i).listenerLookup.get("*") || []
381
- ), Wt = (i, t, e, s) => {
382
- let n, r;
383
- return t instanceof Bt ? (n = t, r = t.type) : (n = new Bt(t, i.target, !!e.cancelable, !!e.bubbles), r = t), { event: n, type: r, async: s };
378
+ const w = L(), Dt = (n, t) => [].concat(
379
+ w(n).listenerLookup.get(t.toLowerCase()) || [],
380
+ w(n).listenerLookup.get("*") || []
381
+ ), It = (n, t, e, s) => {
382
+ let i, r;
383
+ return t instanceof zt ? (i = t, r = t.type) : (i = new zt(t, n.target, !!e.cancelable, !!e.bubbles), r = t), { event: i, type: r, async: s };
384
384
  };
385
- let Le = class ue {
385
+ let Te = class he {
386
386
  /**
387
387
  * Creates a new Event Manager instance.
388
388
  * @param target The target of events dispatched from this Event Manager instance.
389
389
  * @param parent Parent Event Manager instance.
390
390
  */
391
391
  constructor(t, e) {
392
- this.target = t, this.parent = e, _(this).listenerLookup = /* @__PURE__ */ new Map(), _(this).children = [];
392
+ this.target = t, this.parent = e, w(this).listenerLookup = /* @__PURE__ */ new Map(), w(this).children = [];
393
393
  }
394
394
  /**
395
395
  * Clears registered event listeners in this `EventManager` as well as in any children.
396
396
  */
397
397
  clear() {
398
- _(this).listenerLookup.clear(), _(this).children.forEach((t) => t.clear());
398
+ w(this).listenerLookup.clear(), w(this).children.forEach((t) => t.clear());
399
399
  }
400
400
  /**
401
401
  * Detaches this `EventManager` instance from its parent, allowing it to be garbage-collected.
402
402
  */
403
403
  detach() {
404
404
  if (this.parent) {
405
- const t = _(this.parent).children, e = t.indexOf(this);
405
+ const t = w(this.parent).children, e = t.indexOf(this);
406
406
  e > -1 && t.splice(e, 1);
407
407
  }
408
408
  }
@@ -412,8 +412,8 @@ let Le = class ue {
412
412
  * @param listener Listener for the event.
413
413
  */
414
414
  subscribe(t, e, s) {
415
- const n = _(this).listenerLookup, r = t.toLowerCase();
416
- return n.has(r) || n.set(r, []), n.get(r).push(e), () => this.unsubscribe(t, e);
415
+ const i = w(this).listenerLookup, r = t.toLowerCase();
416
+ return i.has(r) || i.set(r, []), i.get(r).push(e), () => this.unsubscribe(t, e);
417
417
  }
418
418
  /**
419
419
  * Similar to `subscribe()` but immediately removes the subscription after the first call.
@@ -421,7 +421,7 @@ let Le = class ue {
421
421
  * @param listener Listener for the event.
422
422
  */
423
423
  subscribeOnce(t, e) {
424
- const s = this.subscribe(t, (n, r) => (s(), e(n, r)));
424
+ const s = this.subscribe(t, (i, r) => (s(), e(i, r)));
425
425
  }
426
426
  /**
427
427
  * Removes a listener for the specified event type.
@@ -429,10 +429,10 @@ let Le = class ue {
429
429
  * @param listener Event listener to remove.
430
430
  */
431
431
  unsubscribe(t, e) {
432
- const s = _(this).listenerLookup.get(t.toLowerCase());
432
+ const s = w(this).listenerLookup.get(t.toLowerCase());
433
433
  if (s) {
434
- const n = s.indexOf(e);
435
- n > -1 && s.splice(n, 1);
434
+ const i = s.indexOf(e);
435
+ i > -1 && s.splice(i, 1);
436
436
  }
437
437
  }
438
438
  /**
@@ -442,15 +442,15 @@ let Le = class ue {
442
442
  * @param options Optional event options used if first parameter is an event type.
443
443
  */
444
444
  dispatchAsync(t, e, s = {}) {
445
- const { event: n, type: r } = Wt(this, t, s, !0), o = Vt(this, r);
445
+ const { event: i, type: r } = It(this, t, s, !0), o = Dt(this, r);
446
446
  let a = 0;
447
- const h = o.length;
448
- let c = Promise.resolve();
449
- for (a = 0; a < h; a++)
450
- ((l) => {
451
- c = c.then((d) => d ? Promise.resolve(!0) : Promise.resolve(l(n, e)).then(() => n.defaultPrevented));
447
+ const c = o.length;
448
+ let l = Promise.resolve();
449
+ for (a = 0; a < c; a++)
450
+ ((h) => {
451
+ l = l.then((p) => p ? Promise.resolve(!0) : Promise.resolve(h(i, e)).then(() => i.defaultPrevented));
452
452
  })(o[a]);
453
- return c.then((l) => !l && n.bubbles && this.parent ? this.parent.dispatchAsync(n, e) : l);
453
+ return l.then((h) => !h && i.bubbles && this.parent ? this.parent.dispatchAsync(i, e) : h);
454
454
  }
455
455
  /**
456
456
  * Dispatches an event to registered event listeners.
@@ -459,52 +459,52 @@ let Le = class ue {
459
459
  * @param options Optional event options used if first parameter is an event type.
460
460
  */
461
461
  dispatch(t, e, s = {}) {
462
- const { event: n, type: r } = Wt(this, t, s, !1), o = Vt(this, r);
462
+ const { event: i, type: r } = It(this, t, s, !1), o = Dt(this, r);
463
463
  let a = 0;
464
- const h = o.length;
465
- let c = !1;
466
- for (a = 0; a < h; a++)
467
- if (o[a](n, e), n.defaultPrevented) {
468
- c = !0;
464
+ const c = o.length;
465
+ let l = !1;
466
+ for (a = 0; a < c; a++)
467
+ if (o[a](i, e), i.defaultPrevented) {
468
+ l = !0;
469
469
  break;
470
470
  }
471
- return !c && n.bubbles && this.parent && (c = this.parent.dispatch(n, e)), c;
471
+ return !l && i.bubbles && this.parent && (l = this.parent.dispatch(i, e)), l;
472
472
  }
473
473
  /**
474
474
  * Creates a child instance to the current Event manager.
475
475
  */
476
476
  createChild(t) {
477
- const e = new ue(t, this);
478
- return _(this).children.push(e), e;
477
+ const e = new he(t, this);
478
+ return w(this).children.push(e), e;
479
479
  }
480
480
  };
481
- const J = (i, t, e) => {
482
- const s = i.get("$plugins").map((n) => {
481
+ const X = (n, t, e) => {
482
+ const s = n.get("$plugins").map((i) => {
483
483
  try {
484
- return n.invoke(t, e);
484
+ return i.invoke(t, e);
485
485
  } catch (r) {
486
- f(i).error("An error occured when invoking a plugin.", n, r);
486
+ y(n).error("An error occured when invoking a plugin.", i, r);
487
487
  }
488
488
  });
489
489
  return Promise.all(s);
490
490
  };
491
- let Re = class {
491
+ let Me = class {
492
492
  constructor(t) {
493
493
  this.widget = t.get("$widget"), this.events = this.widget.events, this.container = this.widget.container, this.initialized = null, this.activated = null, this.initialize = this.initialize.bind(this), this.activate = this.activate.bind(this), this.deactivate = this.deactivate.bind(this), this.invoke = this.invoke.bind(this), this.createInstance();
494
494
  }
495
495
  createInstance() {
496
496
  if (!this.widget.container.get("$instance")) {
497
497
  const t = this.widget.container.get("$types"), e = this.widget.container.get("$type");
498
- !e && f(this).error("Unable to create widget. No type is specified.");
498
+ !e && y(this).error("Unable to create widget. No type is specified.");
499
499
  const s = t[e];
500
- !s && f(this).error(`Unable to create widget. Type '${e}' is not registered.`), this.widget.events.dispatch("widget:create-instance", {}, { bubbles: !0 });
500
+ !s && y(this).error(`Unable to create widget. Type '${e}' is not registered.`), this.widget.events.dispatch("widget:create-instance", {}, { bubbles: !0 });
501
501
  try {
502
502
  this.widget.container.register(
503
503
  "$instance",
504
504
  new s(this.container)
505
505
  );
506
- } catch (n) {
507
- f(this).error("Unable to create widget type.", n);
506
+ } catch (i) {
507
+ y(this).error("Unable to create widget type.", i);
508
508
  }
509
509
  this.widget.events.dispatch("widget:instance-created", {}, { bubbles: !0 });
510
510
  }
@@ -519,7 +519,7 @@ let Re = class {
519
519
  return this.initialized = this.initialized || (() => {
520
520
  const e = this.container.get("$instance"), s = e.initialize || (() => {
521
521
  });
522
- return this.initialized = Promise.resolve(s.call(e, t)).then(() => J(this.container, "initialize", t)).then(() => {
522
+ return this.initialized = Promise.resolve(s.call(e, t)).then(() => X(this.container, "initialize", t)).then(() => {
523
523
  });
524
524
  })();
525
525
  }
@@ -531,7 +531,7 @@ let Re = class {
531
531
  */
532
532
  activate(t) {
533
533
  return (this.initialized || this.initialize()).then(() => {
534
- this.activated = this.activated || (() => J(this.container, "activate").then(() => {
534
+ this.activated = this.activated || (() => X(this.container, "activate").then(() => {
535
535
  const e = this.container.get("$instance");
536
536
  return this.activated = e.activate(t);
537
537
  }))();
@@ -540,7 +540,7 @@ let Re = class {
540
540
  deactivate() {
541
541
  const t = this.container.get("$instance"), e = t.deactivate || (() => {
542
542
  });
543
- return J(this.container, "deactivate").then(() => Promise.resolve(e.call(t))).then(() => {
543
+ return X(this.container, "deactivate").then(() => Promise.resolve(e.call(t))).then(() => {
544
544
  this.initialized = null, this.activated = null;
545
545
  }).then(() => {
546
546
  });
@@ -551,183 +551,183 @@ let Re = class {
551
551
  * @param args Command arguments
552
552
  */
553
553
  invoke(t, ...e) {
554
- return J(this.container, "invoke", { command: t, args: e }).then(() => {
554
+ return X(this.container, "invoke", { command: t, args: e }).then(() => {
555
555
  const s = this.container.get("$instance");
556
556
  if (s[t])
557
557
  return s[t].apply(s, e);
558
- const n = s.invoke;
559
- if (n)
560
- return n.call(s, t, ...e);
558
+ const i = s.invoke;
559
+ if (i)
560
+ return i.call(s, t, ...e);
561
561
  });
562
562
  }
563
563
  };
564
- const H = (i, t) => {
564
+ const H = (n, t) => {
565
565
  if (!t)
566
566
  return !0;
567
567
  if (typeof t == "string") {
568
568
  const e = t.split(",");
569
- for (let s = 0, n = e.length; s < n; s++) {
569
+ for (let s = 0, i = e.length; s < i; s++) {
570
570
  const r = e[s].trim();
571
- if (r === i || r === "*")
571
+ if (r === n || r === "*")
572
572
  return !0;
573
573
  }
574
574
  }
575
- return t instanceof Array ? t.indexOf(i) > -1 : !1;
576
- }, je = (i, t) => {
575
+ return t instanceof Array ? t.indexOf(n) > -1 : !1;
576
+ }, Ue = (n, t) => {
577
577
  if (typeof t == "function")
578
- return t(i);
579
- const e = typeof t == "string" ? Ie(t) : t;
580
- return !(!H(i.implementation.tenant || "", e.tenant || "") || !H(i.implementation.name, e.implementation || "") || !H(i.name, e.widget || "") || !H(i.container.get("$type"), e.type || ""));
581
- }, ze = (i, t) => {
578
+ return t(n);
579
+ const e = typeof t == "string" ? Le(t) : t;
580
+ return !(!H(n.implementation.tenant || "", e.tenant || "") || !H(n.implementation.name, e.implementation || "") || !H(n.name, e.widget || "") || !H(n.container.get("$type"), e.type || ""));
581
+ }, He = (n, t) => {
582
582
  if (typeof t == "function")
583
- return t(i);
584
- const e = typeof t == "string" ? Be(t) : t;
585
- return !(!H(i.tenant || "", e.tenant || "") || !H(i.name, e.implementation || ""));
586
- }, ge = (i) => (t) => je(t, i), De = (i) => (t) => ze(t, i), x = (i) => i instanceof Array && i.length === 1 ? i[0] : i, Ie = (i) => {
587
- const t = {}, e = i.split(":");
588
- return e.length === 1 ? t.widget = x(e[0].split(",")) : e.length === 2 ? (t.implementation = x(e[0].split(",")), t.widget = x(e[1].split(","))) : (t.tenant = x(e[0].split(",")), t.implementation = x(e[1].split(",")), t.widget = x(e[2].split(","))), t;
589
- }, Be = (i) => {
590
- const t = {}, e = i.split(":");
591
- return e.length === 1 ? t.implementation = x(e[0].split(",")) : (t.tenant = x(e[0].split(",")), t.implementation = x(e[1].split(","))), t;
592
- }, et = j(), Ft = (i, t, e) => i.filter((s) => s.stage === t && ge(s.selector)(e));
593
- function Ve(i) {
594
- const t = i.container.get("$environment");
595
- let e = et(t).configurationCache;
596
- e && (e = e.filter((s) => s[0] !== i), et(t).configurationCache = e);
583
+ return t(n);
584
+ const e = typeof t == "string" ? je(t) : t;
585
+ return !(!H(n.tenant || "", e.tenant || "") || !H(n.name, e.implementation || ""));
586
+ }, le = (n) => (t) => Ue(t, n), Re = (n) => (t) => He(t, n), E = (n) => n instanceof Array && n.length === 1 ? n[0] : n, Le = (n) => {
587
+ const t = {}, e = n.split(":");
588
+ return e.length === 1 ? t.widget = E(e[0].split(",")) : e.length === 2 ? (t.implementation = E(e[0].split(",")), t.widget = E(e[1].split(","))) : (t.tenant = E(e[0].split(",")), t.implementation = E(e[1].split(",")), t.widget = E(e[2].split(","))), t;
589
+ }, je = (n) => {
590
+ const t = {}, e = n.split(":");
591
+ return e.length === 1 ? t.implementation = E(e[0].split(",")) : (t.tenant = E(e[0].split(",")), t.implementation = E(e[1].split(","))), t;
592
+ }, it = L(), Bt = (n, t, e) => n.filter((s) => s.stage === t && le(s.selector)(e));
593
+ function ze(n) {
594
+ const t = n.container.get("$environment");
595
+ let e = it(t).configurationCache;
596
+ e && (e = e.filter((s) => s[0] !== n), it(t).configurationCache = e);
597
597
  }
598
- var st = /* @__PURE__ */ ((i) => (i.Implementation = "implementation", i.Widget = "widget", i))(st || {}), C = /* @__PURE__ */ ((i) => (i.Pre = "pre", i.Post = "post", i))(C || {});
599
- const ve = (i, t, e) => (Object.keys(t).forEach((s) => {
600
- const n = t[s];
601
- if (typeof n == "function") {
602
- const r = n();
603
- typeof r.defaultArgs < "u" && e(r, ...r.defaultArgs), i[s] = (...o) => {
598
+ var nt = /* @__PURE__ */ ((n) => (n.Implementation = "implementation", n.Widget = "widget", n))(nt || {}), x = /* @__PURE__ */ ((n) => (n.Pre = "pre", n.Post = "post", n))(x || {});
599
+ const pe = (n, t, e) => (Object.keys(t).forEach((s) => {
600
+ const i = t[s];
601
+ if (typeof i == "function") {
602
+ const r = i();
603
+ typeof r.defaultArgs < "u" && e(r, ...r.defaultArgs), n[s] = (...o) => {
604
604
  const a = Object.assign(
605
605
  {},
606
606
  r,
607
607
  { handlerResolver: r.handlerResolver.bind({}) }
608
608
  );
609
- return e(a, ...o), i;
609
+ return e(a, ...o), n;
610
610
  };
611
611
  } else
612
- i[s] = ve(
612
+ n[s] = pe(
613
613
  {},
614
- n,
614
+ i,
615
615
  e
616
616
  );
617
- }), i), We = (i, t) => {
617
+ }), n), De = (n, t) => {
618
618
  switch (t) {
619
619
  case "implementation":
620
- return i.implementation;
620
+ return n.implementation;
621
621
  case "widget":
622
- return i;
622
+ return n;
623
623
  }
624
- }, qt = (i, t, e, s) => (s.forEach((n) => {
625
- ve(
626
- i,
624
+ }, Vt = (n, t, e, s) => (s.forEach((i) => {
625
+ pe(
627
626
  n,
627
+ i,
628
628
  (r, ...o) => {
629
629
  const a = {
630
630
  selector: t,
631
631
  stage: r.stage,
632
- handler: (h) => {
633
- const c = We(h, r.scope), l = { container: c.container, events: c.events }, d = r.handlerResolver, p = d(l);
634
- let u = et(e.environment).configurationCache;
635
- return u || (u = et(e.environment).configurationCache = []), u.find((y) => y.indexOf(c) > -1 && y.indexOf(d) > -1) ? Promise.resolve() : (u.push([c, d]), Promise.resolve(p(...o)));
632
+ handler: (c) => {
633
+ const l = De(c, r.scope), h = { container: l.container, events: l.events }, p = r.handlerResolver, u = p(h);
634
+ let d = it(e.environment).configurationCache;
635
+ return d || (d = it(e.environment).configurationCache = []), d.find((f) => f.indexOf(l) > -1 && f.indexOf(p) > -1) ? Promise.resolve() : (d.push([l, p]), Promise.resolve(u(...o)));
636
636
  }
637
637
  };
638
638
  e.instructions.push(a);
639
639
  }
640
640
  );
641
- }), i);
642
- function Fe(i, t) {
641
+ }), n);
642
+ function Ie(n, t) {
643
643
  function e(s) {
644
- return qt(
644
+ return Vt(
645
645
  {},
646
646
  s,
647
- i,
647
+ n,
648
648
  t
649
649
  );
650
650
  }
651
- return qt(
651
+ return Vt(
652
652
  e,
653
653
  "*",
654
- i,
654
+ n,
655
655
  t
656
656
  );
657
657
  }
658
- const qe = (i, t, e, s) => {
658
+ const Be = (n, t, e, s) => {
659
659
  try {
660
- const n = new t(e, s);
660
+ const i = new t(e, s);
661
661
  return {
662
- name: i,
662
+ name: n,
663
663
  invoke: (r, o) => {
664
664
  let a;
665
- return n[r] && (a = n[r].call(n, o)), Promise.resolve(a);
665
+ return i[r] && (a = i[r].call(i, o)), Promise.resolve(a);
666
666
  },
667
- getInstance: () => n
667
+ getInstance: () => i
668
668
  };
669
- } catch (n) {
670
- if (n.message && n.message.indexOf("is not a constructor") >= 0)
669
+ } catch (i) {
670
+ if (i.message && i.message.indexOf("is not a constructor") >= 0)
671
671
  return {
672
- name: i,
672
+ name: n,
673
673
  invoke: (r) => {
674
674
  let o;
675
675
  return r === "initialize" && (o = t(e, s)), Promise.resolve(o);
676
676
  },
677
677
  getInstance: () => t
678
678
  };
679
- throw n;
679
+ throw i;
680
680
  }
681
681
  };
682
- function Yt(i, t) {
683
- return typeof i > "u" ? t : i;
682
+ function Wt(n, t) {
683
+ return typeof n > "u" ? t : n;
684
684
  }
685
- let Ye = class {
685
+ let Ve = class {
686
686
  constructor(t = {}) {
687
687
  this.part = t;
688
688
  }
689
689
  createCommand(t, e, s) {
690
- let n;
691
- typeof e == "function" ? n = {
692
- scope: st.Widget,
693
- stage: C.Post,
690
+ let i;
691
+ typeof e == "function" ? i = {
692
+ scope: nt.Widget,
693
+ stage: x.Post,
694
694
  defaultArgs: void 0,
695
695
  handlerResolver: e
696
- } : n = {
697
- scope: Yt(e.scope, st.Widget),
698
- stage: Yt(e.stage, C.Post),
696
+ } : i = {
697
+ scope: Wt(e.scope, nt.Widget),
698
+ stage: Wt(e.stage, x.Post),
699
699
  defaultArgs: e.defaultArgs,
700
700
  handlerResolver: s
701
701
  };
702
702
  let r = this.part;
703
703
  const o = t.split(".");
704
- return o.forEach((a, h) => {
705
- h === o.length - 1 ? r[a] || (r[a] = () => n) : r = this.part[a] = this.part[a] || {};
704
+ return o.forEach((a, c) => {
705
+ c === o.length - 1 ? r[a] || (r[a] = () => i) : r = this.part[a] = this.part[a] || {};
706
706
  }), this;
707
707
  }
708
708
  get() {
709
709
  return this.part;
710
710
  }
711
711
  };
712
- const me = (i) => {
713
- const t = new Ye({});
714
- return i(t), t.get();
715
- }, Qe = me((i) => {
716
- i.createCommand(
712
+ const de = (n) => {
713
+ const t = new Ve({});
714
+ return n(t), t.get();
715
+ }, We = de((n) => {
716
+ n.createCommand(
717
717
  "types.register",
718
- { scope: st.Implementation, stage: C.Pre },
718
+ { scope: nt.Implementation, stage: x.Pre },
719
719
  (t) => (e, s) => {
720
720
  t.container.get("$types")[e] = s;
721
721
  }
722
722
  ).createCommand(
723
723
  "type",
724
- { stage: C.Pre },
724
+ { stage: x.Pre },
725
725
  (t) => (e) => {
726
726
  t.container.register("$type", e);
727
727
  }
728
728
  ).createCommand(
729
729
  "settings",
730
- { stage: C.Pre, defaultArgs: [null] },
730
+ { stage: x.Pre, defaultArgs: [null] },
731
731
  (t) => (e) => {
732
732
  t.events.dispatch(
733
733
  "settings:change",
@@ -737,31 +737,31 @@ const me = (i) => {
737
737
  }
738
738
  ).createCommand(
739
739
  "plugin",
740
- { stage: C.Pre },
741
- (t) => (e, s, n) => {
740
+ { stage: x.Pre },
741
+ (t) => (e, s, i) => {
742
742
  const { container: r } = t;
743
- let o = null, a = e, h = s;
744
- typeof e == "string" && (o = e, a = s, h = n);
745
- const c = (l) => {
746
- const { transformPluginSettings: d } = t.container.get("$environmentOptions"), p = d ? d(
747
- h || {},
743
+ let o = null, a = e, c = s;
744
+ typeof e == "string" && (o = e, a = s, c = i);
745
+ const l = (h) => {
746
+ const { transformPluginSettings: p } = t.container.get("$environmentOptions"), u = p ? p(
747
+ c || {},
748
748
  o,
749
749
  t.container,
750
750
  a
751
751
  ) : s;
752
752
  try {
753
- const u = qe(
753
+ const d = Be(
754
754
  o,
755
755
  a,
756
756
  r,
757
- p
757
+ u
758
758
  );
759
- r.get("$plugins").push(u), l && u.invoke("initialize", null);
760
- } catch (u) {
761
- f(t).warn("Error when initializing plugin", u);
759
+ r.get("$plugins").push(d), h && d.invoke("initialize", null);
760
+ } catch (d) {
761
+ y(t).warn("Error when initializing plugin", d);
762
762
  }
763
763
  };
764
- t.container.get("$instance") ? c(!0) : t.events.subscribeOnce("widget:instance-created", () => c(!1));
764
+ t.container.get("$instance") ? l(!0) : t.events.subscribeOnce("widget:instance-created", () => l(!1));
765
765
  }
766
766
  ).createCommand(
767
767
  "container.register",
@@ -790,20 +790,20 @@ const me = (i) => {
790
790
  t.container.register("csp", e);
791
791
  }
792
792
  );
793
- }), Ze = Qe;
794
- function Ke(i, t, e = []) {
795
- const s = [Ze].concat(e), n = Fe(
793
+ }), Fe = We;
794
+ function qe(n, t, e = []) {
795
+ const s = [Fe].concat(e), i = Ie(
796
796
  t,
797
797
  s
798
798
  );
799
- i(n, t);
799
+ n(i, t);
800
800
  }
801
- let Je = class {
801
+ let Ye = class {
802
802
  constructor() {
803
803
  this.tasks = [], this.current = Promise.resolve(), this.next = this.next.bind(this);
804
804
  }
805
- add(t, e, s, n) {
806
- this.tasks.push({ task: t, resolve: e, reject: s, done: n }), this.next();
805
+ add(t, e, s, i) {
806
+ this.tasks.push({ task: t, resolve: e, reject: s, done: i }), this.next();
807
807
  }
808
808
  next() {
809
809
  this.current = this.current.then(() => {
@@ -818,22 +818,22 @@ let Je = class {
818
818
  });
819
819
  }
820
820
  };
821
- const G = /* @__PURE__ */ new WeakMap();
822
- function Ge(i) {
823
- return G.has(i) || G.set(i, new Je()), (t) => new Promise((e, s) => {
824
- const n = G.get(i);
825
- n.add(t, e, s, () => {
826
- n.tasks.length || G.delete(i);
821
+ const tt = /* @__PURE__ */ new WeakMap();
822
+ function Qe(n) {
823
+ return tt.has(n) || tt.set(n, new Ye()), (t) => new Promise((e, s) => {
824
+ const i = tt.get(n);
825
+ i.add(t, e, s, () => {
826
+ i.tasks.length || tt.delete(n);
827
827
  });
828
828
  });
829
829
  }
830
- const Qt = (i) => typeof i < "u", D = (i, t) => {
831
- i.events.dispatch("widget:state-change", { state: t }, { bubbles: !0 }), i.state = t, i.events.dispatch("widget:state-changed", {}, { bubbles: !0 });
832
- }, b = j(), Xe = (i) => {
833
- const { container: t, events: e } = i;
834
- t.get("$controller") || (t.register("$controller", new Re(t)), e.dispatch("widget:controller-created", {}, { bubbles: !0 }));
830
+ const Ft = (n) => typeof n < "u", D = (n, t) => {
831
+ n.events.dispatch("widget:state-change", { state: t }, { bubbles: !0 }), n.state = t, n.events.dispatch("widget:state-changed", {}, { bubbles: !0 });
832
+ }, b = L(), Ze = (n) => {
833
+ const { container: t, events: e } = n;
834
+ t.get("$controller") || (t.register("$controller", new Me(t)), e.dispatch("widget:controller-created", {}, { bubbles: !0 }));
835
835
  };
836
- class ts {
836
+ class Je {
837
837
  /**
838
838
  * Creates a new `Widget` instance.
839
839
  * @param name Name of widget.
@@ -841,12 +841,12 @@ class ts {
841
841
  * @param configuration Configuration for the widget.
842
842
  */
843
843
  constructor(t, e, s) {
844
- this.state = "deactivated", this.name = t, this.implementation = e, this.container = e.container.createChild(this, t), this.events = e.events.createChild(this), b(this).subscriptions = [], s && e.configure((n) => {
845
- const r = n(t);
846
- Qt(s.type) && r.type(s.type), Qt(s.settings) && r.settings(s.settings), s.plugins && Object.keys(s.plugins).forEach((o) => {
844
+ this.state = "deactivated", this.name = t, this.implementation = e, this.container = e.container.createChild(this, t), this.events = e.events.createChild(this), b(this).subscriptions = [], s && e.configure((i) => {
845
+ const r = i(t);
846
+ Ft(s.type) && r.type(s.type), Ft(s.settings) && r.settings(s.settings), s.plugins && Object.keys(s.plugins).forEach((o) => {
847
847
  var a;
848
- const h = (a = s.plugins) == null ? void 0 : a[o];
849
- r.plugin(o, h);
848
+ const c = (a = s.plugins) == null ? void 0 : a[o];
849
+ r.plugin(o, c);
850
850
  });
851
851
  }), this.load = this.load.bind(this), this.activate = this.activate.bind(this), this.invoke = this.invoke.bind(this), this.deactivate = this.deactivate.bind(this);
852
852
  }
@@ -855,7 +855,7 @@ class ts {
855
855
  * pending configuration.
856
856
  */
857
857
  load() {
858
- return Ge(this)(() => {
858
+ return Qe(this)(() => {
859
859
  b(this).deactivatedPromise = null;
860
860
  const t = this.state === "deactivated";
861
861
  t && (D(
@@ -867,11 +867,11 @@ class ts {
867
867
  "loading"
868
868
  /* Loading */
869
869
  );
870
- const e = this.implementation.instructions, s = Ft(e, C.Pre, this);
871
- return Promise.all(s.map((n) => n.handler(this))).then(() => {
872
- Xe(this);
873
- const n = Ft(e, C.Post, this);
874
- return Promise.all(n.map((r) => r.handler(this))).then(() => {
870
+ const e = this.implementation.instructions, s = Bt(e, x.Pre, this);
871
+ return Promise.all(s.map((i) => i.handler(this))).then(() => {
872
+ Ze(this);
873
+ const i = Bt(e, x.Post, this);
874
+ return Promise.all(i.map((r) => r.handler(this))).then(() => {
875
875
  t && this.container.get("$controller").initialize();
876
876
  });
877
877
  }).then(() => (D(
@@ -897,7 +897,7 @@ class ts {
897
897
  })
898
898
  );
899
899
  const e = b(this).activatedPromise;
900
- return e ? (process.env.NODE_ENV !== "production" && f(this).warn(`Widget '${this.name}' has already been activated. The passed arguments for this activation will be discarded.`, t), e) : b(this).activatedPromise = this.load().then(() => this.container.get("$controller").activate(t));
900
+ return e ? (process.env.NODE_ENV !== "production" && y(this).warn(`Widget '${this.name}' has already been activated. The passed arguments for this activation will be discarded.`, t), e) : b(this).activatedPromise = this.load().then(() => this.container.get("$controller").activate(t));
901
901
  }
902
902
  /**
903
903
  * Invokes a command on a widget. If the widget isn't activate the invocation
@@ -906,10 +906,10 @@ class ts {
906
906
  * @param args Command arguments.
907
907
  */
908
908
  invoke(t, ...e) {
909
- const s = b(this).activatedPromise, n = (r, ...o) => s.then(this.load).then(() => this.container.get("$controller").invoke(r, ...o));
910
- return s ? n(t, ...e) : (process.env.NODE_ENV !== "production" && f(this).warn("You are invoking a command on a deactivated widget. The invocation will be queued until the widget is activated.", this), new Promise((r) => {
909
+ const s = b(this).activatedPromise, i = (r, ...o) => s.then(this.load).then(() => this.container.get("$controller").invoke(r, ...o));
910
+ return s ? i(t, ...e) : (process.env.NODE_ENV !== "production" && y(this).warn("You are invoking a command on a deactivated widget. The invocation will be queued until the widget is activated.", this), new Promise((r) => {
911
911
  const o = this.events.subscribe("widget:state-changed", () => {
912
- this.state === "activated" && (o(), r(n(t, ...e)));
912
+ this.state === "activated" && (o(), r(i(t, ...e)));
913
913
  });
914
914
  }));
915
915
  }
@@ -923,7 +923,7 @@ class ts {
923
923
  "deactivating"
924
924
  /* Deactivating */
925
925
  ), b(this).deactivatedPromise = this.container.get("$controller").deactivate().then(() => (b(this).activatedPromise = null, b(this).subscriptions.forEach((e) => e()), b(this).subscriptions = [], this.container.clear().then(() => {
926
- this.events.clear(), Ve(this), D(
926
+ this.events.clear(), ze(this), D(
927
927
  this,
928
928
  "deactivated"
929
929
  /* Deactivated */
@@ -931,8 +931,8 @@ class ts {
931
931
  })))));
932
932
  }
933
933
  }
934
- const Zt = j();
935
- class es {
934
+ const qt = L();
935
+ class Ke {
936
936
  /**
937
937
  * Creates a new Implementation instance.
938
938
  * @param configuration Configuration for the implementation.
@@ -940,7 +940,7 @@ class es {
940
940
  * @param configurationApiExtensions Optional configuration API extensions.
941
941
  */
942
942
  constructor(t, e, s = []) {
943
- this.instructions = [], this.widgets = /* @__PURE__ */ new Map(), this.name = t.name, this.tenant = t.tenant, this.environment = e, this.container = e.container.createChild(this, this.name), this.events = e.events.createChild(this), this.container.register("$types", {}), Zt(this).configurationApiExtensions = s;
943
+ this.instructions = [], this.widgets = /* @__PURE__ */ new Map(), this.name = t.name, this.tenant = t.tenant, this.environment = e, this.container = e.container.createChild(this, this.name), this.events = e.events.createChild(this), this.container.register("$types", {}), qt(this).configurationApiExtensions = s;
944
944
  }
945
945
  /**
946
946
  * Loads all widgets in the implementation.
@@ -954,7 +954,7 @@ class es {
954
954
  * @param configFn Callback function for configuration.
955
955
  */
956
956
  configure(t) {
957
- return Ke(t, this, Zt(this).configurationApiExtensions), this.events.dispatch(
957
+ return qe(t, this, qt(this).configurationApiExtensions), this.events.dispatch(
958
958
  "implementation:configured",
959
959
  { implementation: this },
960
960
  { bubbles: !0 }
@@ -966,25 +966,25 @@ class es {
966
966
  * @param configuration Widget configuration.
967
967
  */
968
968
  createWidget(t, e) {
969
- const s = new ts(t, this, e);
969
+ const s = new Je(t, this, e);
970
970
  return this.widgets.set(s.name, s), s;
971
971
  }
972
972
  }
973
- function ss(i, t, e) {
974
- const s = new es(i, t, e);
975
- return i.widgets && Object.keys(i.widgets).forEach((n) => {
973
+ function Ge(n, t, e) {
974
+ const s = new Ke(n, t, e);
975
+ return n.widgets && Object.keys(n.widgets).forEach((i) => {
976
976
  var r;
977
- const o = (r = i.widgets) == null ? void 0 : r[n];
978
- s.createWidget(n, o);
977
+ const o = (r = n.widgets) == null ? void 0 : r[i];
978
+ s.createWidget(i, o);
979
979
  }), s;
980
980
  }
981
- let Kt = class fe {
981
+ let Yt = class ue {
982
982
  constructor(t, e) {
983
983
  this.selectorFactory = e, typeof t == "function" ? this.resolver = t : this.resolver = () => t;
984
984
  }
985
985
  append(t) {
986
986
  const e = typeof t == "function" ? t : () => t;
987
- return new fe(
987
+ return new ue(
988
988
  () => this.all().concat(e()),
989
989
  this.selectorFactory
990
990
  );
@@ -1001,32 +1001,32 @@ let Kt = class fe {
1001
1001
  return e[0];
1002
1002
  }
1003
1003
  };
1004
- const Ot = "#____version____#", pt = j(), is = (i) => i.tenant ? `${i.name}:${i.tenant}` : i.name, ye = class {
1004
+ const xt = "#____version____#", gt = L(), Xe = (n) => n.tenant ? `${n.name}:${n.tenant}` : n.name, ge = class {
1005
1005
  constructor(t, e = [], s = {}) {
1006
- this.widgets = new Kt(
1006
+ this.widgets = new Yt(
1007
1007
  () => {
1008
- let n = [];
1008
+ let i = [];
1009
1009
  return this.implementations.all().forEach((r) => {
1010
- n = n.concat(Array.from(r.widgets.values()));
1011
- }), n;
1010
+ i = i.concat(Array.from(r.widgets.values()));
1011
+ }), i;
1012
1012
  },
1013
- ge
1014
- ), this.implementations = new Kt([], De), this.name = t, this.container = new kt(this, t), this.events = new Le(this), this.container.register("$version", Ot), this.container.register("$environment", this), this.container.register("$environmentOptions", s), pt(this).configurationApiExtensions = e;
1013
+ le
1014
+ ), this.implementations = new Yt([], Re), this.name = t, this.container = new Et(this, t), this.events = new Te(this), this.container.register("$version", xt), this.container.register("$environment", this), this.container.register("$environmentOptions", s), gt(this).configurationApiExtensions = e;
1015
1015
  }
1016
1016
  /**
1017
1017
  * Creates an implementation based on the provided configuration.
1018
1018
  * @param config Implementation configuration.
1019
1019
  */
1020
1020
  createImplementation(t) {
1021
- const e = is(t);
1021
+ const e = Xe(t);
1022
1022
  let s = this.implementations.find(e);
1023
1023
  if (s)
1024
- return process.env.NODE_ENV !== "production" && f(s).warn(`Implementation "${e}" already exist on current environment.`), s;
1025
- const n = pt(this).configurationApiExtensions;
1026
- return s = ss(
1024
+ return process.env.NODE_ENV !== "production" && y(s).warn(`Implementation "${e}" already exist on current environment.`), s;
1025
+ const i = gt(this).configurationApiExtensions;
1026
+ return s = Ge(
1027
1027
  t,
1028
1028
  this,
1029
- n
1029
+ i
1030
1030
  ), this.implementations = this.implementations.append([s]), this.events.dispatch("implementation:created", { implementation: s }), s;
1031
1031
  }
1032
1032
  /**
@@ -1036,8 +1036,8 @@ const Ot = "#____version____#", pt = j(), is = (i) => i.tenant ? `${i.name}:${i.
1036
1036
  patch(t = {}) {
1037
1037
  const { name: e, configurationApiExtensions: s } = t;
1038
1038
  typeof e < "u" && e !== null && (this.name = e), s && s.forEach(
1039
- (n) => {
1040
- pt(this).configurationApiExtensions.push(n);
1039
+ (i) => {
1040
+ gt(this).configurationApiExtensions.push(i);
1041
1041
  }
1042
1042
  );
1043
1043
  }
@@ -1046,16 +1046,16 @@ const Ot = "#____version____#", pt = j(), is = (i) => i.tenant ? `${i.name}:${i.
1046
1046
  * @param configuration Environment configuration.
1047
1047
  */
1048
1048
  static create(t = {}) {
1049
- return new ye(
1049
+ return new ge(
1050
1050
  t.name || "",
1051
1051
  t.configurationApiExtensions,
1052
1052
  t.options
1053
1053
  );
1054
1054
  }
1055
1055
  };
1056
- let $e = ye;
1057
- $e.version = Ot;
1058
- const rt = (i, t, ...e) => typeof t == "string" ? i(`[humany] ${t}`, ...e) : i(t, ...e), B = class {
1056
+ let me = ge;
1057
+ me.version = xt;
1058
+ const at = (n, t, ...e) => typeof t == "string" ? n(`[humany] ${t}`, ...e) : n(t, ...e), B = class {
1059
1059
  constructor() {
1060
1060
  this.keys = [], this.log = (t, ...e) => this.lookup(t, () => B.log(...e)), this.warn = (t, ...e) => this.lookup(t, () => B.warn(...e)), this.error = (t, ...e) => this.lookup(t, () => B.error(...e)), this.info = (t, ...e) => this.lookup(t, () => B.info(...e));
1061
1061
  }
@@ -1063,28 +1063,28 @@ const rt = (i, t, ...e) => typeof t == "string" ? i(`[humany] ${t}`, ...e) : i(t
1063
1063
  this.keys.indexOf(t) === -1 && (this.keys.push(t), e());
1064
1064
  }
1065
1065
  };
1066
- let Q = B;
1067
- Q.log = (...i) => rt(console.log, ...i);
1068
- Q.warn = (...i) => rt(console.warn, ...i);
1069
- Q.error = (...i) => rt(console.error, ...i);
1070
- Q.info = (...i) => rt(console.info, ...i);
1066
+ let J = B;
1067
+ J.log = (...n) => at(console.log, ...n);
1068
+ J.warn = (...n) => at(console.warn, ...n);
1069
+ J.error = (...n) => at(console.error, ...n);
1070
+ J.info = (...n) => at(console.info, ...n);
1071
1071
  const P = () => Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
1072
- function St() {
1072
+ function Pt() {
1073
1073
  return P() + P() + "-" + P() + "-" + P() + "-" + P() + "-" + P() + P() + P();
1074
1074
  }
1075
- var ns = Object.defineProperty, rs = Object.defineProperties, os = Object.getOwnPropertyDescriptors, Jt = Object.getOwnPropertySymbols, as = Object.prototype.hasOwnProperty, cs = Object.prototype.propertyIsEnumerable, Gt = (i, t, e) => t in i ? ns(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e, _t = (i, t) => {
1075
+ var ts = Object.defineProperty, es = Object.defineProperties, ss = Object.getOwnPropertyDescriptors, Qt = Object.getOwnPropertySymbols, is = Object.prototype.hasOwnProperty, ns = Object.prototype.propertyIsEnumerable, Zt = (n, t, e) => t in n ? ts(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, wt = (n, t) => {
1076
1076
  for (var e in t || (t = {}))
1077
- as.call(t, e) && Gt(i, e, t[e]);
1078
- if (Jt)
1079
- for (var e of Jt(t))
1080
- cs.call(t, e) && Gt(i, e, t[e]);
1081
- return i;
1082
- }, hs = (i, t) => rs(i, os(t));
1083
- const ls = (i) => {
1077
+ is.call(t, e) && Zt(n, e, t[e]);
1078
+ if (Qt)
1079
+ for (var e of Qt(t))
1080
+ ns.call(t, e) && Zt(n, e, t[e]);
1081
+ return n;
1082
+ }, rs = (n, t) => es(n, ss(t));
1083
+ const os = (n) => {
1084
1084
  const t = [];
1085
1085
  return [
1086
1086
  (e, s) => {
1087
- t.push(i.subscribe(e, s));
1087
+ t.push(n.subscribe(e, s));
1088
1088
  },
1089
1089
  () => {
1090
1090
  t.forEach((e) => {
@@ -1093,7 +1093,7 @@ const ls = (i) => {
1093
1093
  }
1094
1094
  ];
1095
1095
  };
1096
- let Nt = class {
1096
+ let Ct = class {
1097
1097
  constructor(t, e = []) {
1098
1098
  this.platform = t, this.rules = e;
1099
1099
  }
@@ -1107,17 +1107,17 @@ let Nt = class {
1107
1107
  return this.rules.push({ id: t }), this;
1108
1108
  }
1109
1109
  select() {
1110
- return new ds(this.platform, this);
1110
+ return new as(this.platform, this);
1111
1111
  }
1112
- }, be = class {
1112
+ }, fe = class {
1113
1113
  constructor(t, e, s) {
1114
- this.platform = t, this.node = e, this.actions = new Tt(
1114
+ this.platform = t, this.node = e, this.actions = new kt(
1115
1115
  t,
1116
- new Nt(t).withId(e.id),
1116
+ new Ct(t).withId(e.id),
1117
1117
  s
1118
1118
  );
1119
- const [n, r] = ls(this.platform.events);
1120
- this.subscribe = n, this.unsubscribe = r;
1119
+ const [i, r] = os(this.platform.events);
1120
+ this.subscribe = i, this.unsubscribe = r;
1121
1121
  }
1122
1122
  properties(t) {
1123
1123
  return t && this.node.touchProperties((e) => t(e)), this.node.attributes.properties;
@@ -1145,9 +1145,9 @@ let Nt = class {
1145
1145
  this.unsubscribe(), this.actions.dispose();
1146
1146
  }
1147
1147
  };
1148
- class ds {
1148
+ class as {
1149
1149
  constructor(t, e, s = !0) {
1150
- this.platform = t, this.target = e, this.clearOnDispose = s, this.removes = [], this.actions = new Tt(this.platform, this.target);
1150
+ this.platform = t, this.target = e, this.clearOnDispose = s, this.removes = [], this.actions = new kt(this.platform, this.target);
1151
1151
  }
1152
1152
  writeProperties(t, e) {
1153
1153
  this.removes.push(
@@ -1185,20 +1185,20 @@ class ds {
1185
1185
  }), this.actions.dispose();
1186
1186
  }
1187
1187
  }
1188
- const ps = (i, t, e) => {
1189
- const s = i.concat(), n = (r, o, a) => {
1190
- let h = !0;
1188
+ const cs = (n, t, e) => {
1189
+ const s = n.concat(), i = (r, o, a) => {
1190
+ let c = !0;
1191
1191
  if (s.length) {
1192
- const c = s.shift(), l = (d, p) => (h = !1, n(d, Object.assign({}, o, p), a));
1193
- return Promise.resolve(c(r, l, a)).then((d) => hs(_t({}, d), {
1194
- cancelled: h
1192
+ const l = s.shift(), h = (p, u) => (c = !1, i(p, Object.assign({}, o, u), a));
1193
+ return Promise.resolve(l(r, h, a)).then((p) => rs(wt({}, p), {
1194
+ cancelled: c
1195
1195
  }));
1196
1196
  }
1197
1197
  return Promise.resolve({ data: r, cancelled: !1, options: o });
1198
1198
  };
1199
- return n(t, {}, e);
1199
+ return i(t, {}, e);
1200
1200
  };
1201
- let Tt = class {
1201
+ let kt = class {
1202
1202
  constructor(t, e, s) {
1203
1203
  this.platform = t, this.target = e, this.ns = s, this.subscriptions = [], this.create = this.create.bind(this);
1204
1204
  }
@@ -1211,57 +1211,57 @@ let Tt = class {
1211
1211
  ns: this.ns
1212
1212
  };
1213
1213
  this.platform.actionsState.handlers.push(s);
1214
- const n = () => {
1214
+ const i = () => {
1215
1215
  const r = this.platform.actionsState.handlers.indexOf(s);
1216
1216
  r > -1 && this.platform.actionsState.handlers.splice(r, 1);
1217
1217
  };
1218
- return this.subscriptions.push(n), n;
1218
+ return this.subscriptions.push(i), i;
1219
1219
  }
1220
1220
  dispatch(t, e) {
1221
1221
  const s = this.platform.nodes.all.concat(
1222
1222
  this.platform.nodes.detached
1223
- ), n = {}, r = this.platform.actionsState.handlers.filter(
1223
+ ), i = {}, r = this.platform.actionsState.handlers.filter(
1224
1224
  (o) => o.key === t && (!o.ns || !this.ns || o.ns === this.ns)
1225
1225
  );
1226
1226
  return Promise.all(
1227
1227
  r.map((o) => {
1228
1228
  const a = s.filter(
1229
- (c) => o.target.match(c) && this.target.match(c)
1230
- ), h = this.platform.actionsState.watchers.filter((c) => c.key === t && (!c.ns || !this.ns || c.ns === this.ns) && a.some((l) => c.target.match(l))).map((c) => c.fn);
1229
+ (l) => o.target.match(l) && this.target.match(l)
1230
+ ), c = this.platform.actionsState.watchers.filter((l) => l.key === t && (!l.ns || !this.ns || l.ns === this.ns) && a.some((h) => l.target.match(h))).map((l) => l.fn);
1231
1231
  return Promise.all(
1232
- a.map((c) => {
1233
- const l = new be(
1232
+ a.map((l) => {
1233
+ const h = new fe(
1234
1234
  this.platform,
1235
- c,
1235
+ l,
1236
1236
  this.ns
1237
1237
  );
1238
- return ps(h, e, l).then((d) => {
1239
- const { data: p = {}, options: u, cancelled: y } = d;
1238
+ return cs(c, e, h).then((p) => {
1239
+ const { data: u = {}, options: d, cancelled: f } = p;
1240
1240
  return Promise.resolve(
1241
- y ? {} : o.fn(p, u, l)
1242
- ).then((w) => {
1243
- n[c.id] = w;
1241
+ f ? {} : o.fn(u, d, h)
1242
+ ).then((z) => {
1243
+ i[l.id] = z;
1244
1244
  });
1245
1245
  });
1246
1246
  })
1247
1247
  );
1248
1248
  })
1249
- ).then(() => n);
1249
+ ).then(() => i);
1250
1250
  }
1251
1251
  watch(t, e) {
1252
- let s = t, n = this.ns;
1252
+ let s = t, i = this.ns;
1253
1253
  const r = t.split(".");
1254
- r.length > 1 && (n = r[0], s = r.splice(1).join("."));
1254
+ r.length > 1 && (i = r[0], s = r.splice(1).join("."));
1255
1255
  const o = {
1256
1256
  fn: e,
1257
1257
  target: this.target,
1258
1258
  key: s,
1259
- ns: n
1259
+ ns: i
1260
1260
  };
1261
1261
  this.platform.actionsState.watchers.push(o);
1262
1262
  const a = () => {
1263
- const h = this.platform.actionsState.watchers.indexOf(o);
1264
- h > -1 && this.platform.actionsState.watchers.splice(h, 1);
1263
+ const c = this.platform.actionsState.watchers.indexOf(o);
1264
+ c > -1 && this.platform.actionsState.watchers.splice(c, 1);
1265
1265
  };
1266
1266
  return this.subscriptions.push(a), a;
1267
1267
  }
@@ -1269,18 +1269,18 @@ let Tt = class {
1269
1269
  this.subscriptions.forEach((t) => t());
1270
1270
  }
1271
1271
  };
1272
- me((i) => {
1273
- i.createCommand("components", (t) => (e) => {
1274
- t.events.subscribeOnce("components:platform-created", (s, { platform: n }) => {
1272
+ de((n) => {
1273
+ n.createCommand("components", (t) => (e) => {
1274
+ t.events.subscribeOnce("components:platform-created", (s, { platform: i }) => {
1275
1275
  e.handlers && e.handlers.forEach(([r, o]) => {
1276
- n.addComponentHandler(r, o);
1276
+ i.addComponentHandler(r, o);
1277
1277
  });
1278
1278
  });
1279
1279
  });
1280
1280
  });
1281
- let Xt = class {
1281
+ let Jt = class {
1282
1282
  constructor(t, e) {
1283
- this.events = t, this.tags = [], this.children = {}, this.changesets = [], this.mountCount = 0, this.id = St(), this.type = e, this.attributes = {
1283
+ this.events = t, this.tags = [], this.children = {}, this.changesets = [], this.mountCount = 0, this.id = Pt(), this.type = e, this.attributes = {
1284
1284
  context: {},
1285
1285
  properties: {},
1286
1286
  layout: {},
@@ -1289,7 +1289,7 @@ let Xt = class {
1289
1289
  }
1290
1290
  mount(t, e) {
1291
1291
  let s = t.get("mounted-nodes");
1292
- return s || (s = /* @__PURE__ */ new Map(), t.register("mounted-nodes", s)), s.has(this) ? (process.env.NODE_ENV !== "production" && Q.error("Trying to mount an already mounted component node.", this), () => {
1292
+ return s || (s = /* @__PURE__ */ new Map(), t.register("mounted-nodes", s)), s.has(this) ? (process.env.NODE_ENV !== "production" && J.error("Trying to mount an already mounted component node.", this), () => {
1293
1293
  }) : (this.events.dispatch("components:node-mounted", { node: this }), this.mountCount === 0 && (this.mountCount = this.mountCount + 1, this.events.dispatch("components:node-enter", { node: this })), () => {
1294
1294
  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 });
1295
1295
  });
@@ -1311,46 +1311,46 @@ let Xt = class {
1311
1311
  t.parent = this, this.children[e] || (this.children[e] = []), this.children[e].unshift(t), this.events.dispatch("components:node-appended", { node: t });
1312
1312
  }
1313
1313
  touchProperties(t, e = {}, s) {
1314
- const n = [{ properties: t }, e];
1315
- return this.changesets.push(n), this.events.dispatch("components:set-properties", { node: this }), () => {
1314
+ const i = [{ properties: t }, e];
1315
+ return this.changesets.push(i), this.events.dispatch("components:set-properties", { node: this }), () => {
1316
1316
  if (s) {
1317
- const r = this.changesets.indexOf(n);
1317
+ const r = this.changesets.indexOf(i);
1318
1318
  r > -1 && (this.changesets.splice(r, 1), this.events.dispatch("components:set-properties", { node: this }));
1319
1319
  }
1320
1320
  };
1321
1321
  }
1322
1322
  writeProperties(t, e = {}, s) {
1323
- const n = [{ properties: t }, e];
1324
- return this.changesets.push(n), this.events.dispatch("components:set-properties", { node: this }), () => {
1323
+ const i = [{ properties: t }, e];
1324
+ return this.changesets.push(i), this.events.dispatch("components:set-properties", { node: this }), () => {
1325
1325
  if (s) {
1326
- const r = this.changesets.indexOf(n);
1326
+ const r = this.changesets.indexOf(i);
1327
1327
  r > -1 && (this.changesets.splice(r, 1), this.events.dispatch("components:set-properties", { node: this }));
1328
1328
  }
1329
1329
  };
1330
1330
  }
1331
1331
  writeLayout(t, e = {}, s) {
1332
- const n = [{ layout: t }, e];
1333
- return this.changesets.push(n), this.events.dispatch("components:set-layout", { node: this }), () => {
1332
+ const i = [{ layout: t }, e];
1333
+ return this.changesets.push(i), this.events.dispatch("components:set-layout", { node: this }), () => {
1334
1334
  if (!s)
1335
1335
  return;
1336
- const r = this.changesets.indexOf(n);
1336
+ const r = this.changesets.indexOf(i);
1337
1337
  r > -1 && (this.changesets.splice(r, 1), this.events.dispatch("components:set-layout", { node: this }));
1338
1338
  };
1339
1339
  }
1340
1340
  writeContext(t, e = {}, s) {
1341
- const n = [{ context: t }, e];
1342
- return this.changesets.push(n), this.events.dispatch("components:set-context", { node: this }), () => {
1341
+ const i = [{ context: t }, e];
1342
+ return this.changesets.push(i), this.events.dispatch("components:set-context", { node: this }), () => {
1343
1343
  if (!s)
1344
1344
  return;
1345
- const r = this.changesets.indexOf(n);
1345
+ const r = this.changesets.indexOf(i);
1346
1346
  r > -1 && (this.changesets.splice(r, 1), this.events.dispatch("components:set-context", { node: this }));
1347
1347
  };
1348
1348
  }
1349
1349
  getChildren(t = "default") {
1350
1350
  const e = this.children[t] || [];
1351
- return e.reduce((s, n, r) => {
1352
- const { order: o = r } = n.attributes.layout;
1353
- return s[o] ? s.splice(o, 0, n) : s[o] = n, s;
1351
+ return e.reduce((s, i, r) => {
1352
+ const { order: o = r } = i.attributes.layout;
1353
+ return s[o] ? s.splice(o, 0, i) : s[o] = i, s;
1354
1354
  }, Array(e.length));
1355
1355
  }
1356
1356
  remove() {
@@ -1358,55 +1358,55 @@ let Xt = class {
1358
1358
  }
1359
1359
  removeChild(t) {
1360
1360
  Object.keys(this.children).forEach((e) => {
1361
- const s = this.children[e], n = s.indexOf(t);
1362
- n > -1 && (s.splice(n, 1), this.events.dispatch("components:node-removed", { node: t, parentNode: this }));
1361
+ const s = this.children[e], i = s.indexOf(t);
1362
+ i > -1 && (s.splice(i, 1), this.events.dispatch("components:node-removed", { node: t, parentNode: this }));
1363
1363
  }), delete t.parent;
1364
1364
  }
1365
1365
  };
1366
- const we = (i, t, e) => {
1367
- for (let s = 0, n = i.length; s < n && e(i[s]) !== !0; s++) {
1368
- const r = t[i[s].id] || "default", o = i[s].getChildren(r);
1369
- we(o, t, e);
1366
+ const ve = (n, t, e) => {
1367
+ for (let s = 0, i = n.length; s < i && e(n[s]) !== !0; s++) {
1368
+ const r = t[n[s].id] || "default", o = n[s].getChildren(r);
1369
+ ve(o, t, e);
1370
1370
  }
1371
- }, Mt = (i, t, e) => {
1372
- if (e(i) !== !0) {
1373
- const s = t[i.id] || "default", n = i.children[s];
1374
- we(n, t, e);
1371
+ }, Ot = (n, t, e) => {
1372
+ if (e(n) !== !0) {
1373
+ const s = t[n.id] || "default", i = n.children[s];
1374
+ ve(i, t, e);
1375
1375
  }
1376
- }, ut = (i, t) => {
1376
+ }, mt = (n, t) => {
1377
1377
  const e = [];
1378
- return Mt(i, t, (s) => {
1378
+ return Ot(n, t, (s) => {
1379
1379
  e.push(s);
1380
1380
  }), e;
1381
- }, us = (i, t, e) => {
1381
+ }, hs = (n, t, e) => {
1382
1382
  let s;
1383
- return Mt(i, t, (n) => {
1384
- if (e(n))
1385
- return s = n, !0;
1383
+ return Ot(n, t, (i) => {
1384
+ if (e(i))
1385
+ return s = i, !0;
1386
1386
  }), s;
1387
1387
  };
1388
- class gs {
1388
+ class ls {
1389
1389
  constructor(t, e, s) {
1390
- this.root = t, this.switches = e, this.all = [], this.visible = [], this.detached = [], s.subscribe("components:node-appended", (n, r) => {
1391
- this.all.push(r.node), this.visible = ut(t, e);
1392
- }), s.subscribe("components:node-removed", (n, r) => {
1390
+ this.root = t, this.switches = e, this.all = [], this.visible = [], this.detached = [], s.subscribe("components:node-appended", (i, r) => {
1391
+ this.all.push(r.node), this.visible = mt(t, e);
1392
+ }), s.subscribe("components:node-removed", (i, r) => {
1393
1393
  let o = this.all.indexOf(r.node);
1394
- o > -1 && this.all.splice(o, 1), o = this.visible.indexOf(r.node), o > -1 && this.visible.splice(o, 1), this.visible = ut(t, e);
1395
- }), s.subscribe("components:node-switched", (n, r) => {
1396
- this.visible = ut(t, e);
1394
+ o > -1 && this.all.splice(o, 1), o = this.visible.indexOf(r.node), o > -1 && this.visible.splice(o, 1), this.visible = mt(t, e);
1395
+ }), s.subscribe("components:node-switched", (i, r) => {
1396
+ this.visible = mt(t, e);
1397
1397
  });
1398
1398
  }
1399
1399
  query(t = {}) {
1400
1400
  const e = [];
1401
- return Mt(this.root, this.switches, (s) => {
1402
- Object.keys(t).every((n) => t[n] === s[n]) && e.push(s);
1401
+ return Ot(this.root, this.switches, (s) => {
1402
+ Object.keys(t).every((i) => t[i] === s[i]) && e.push(s);
1403
1403
  }), e;
1404
1404
  }
1405
1405
  get(t) {
1406
- return us(this.root, this.switches, (e) => e.id === t) || this.detached.find((e) => e.id === t);
1406
+ return hs(this.root, this.switches, (e) => e.id === t) || this.detached.find((e) => e.id === t);
1407
1407
  }
1408
1408
  }
1409
- class vs {
1409
+ class ps {
1410
1410
  constructor() {
1411
1411
  this.handlers = /* @__PURE__ */ new Map();
1412
1412
  }
@@ -1417,81 +1417,81 @@ class vs {
1417
1417
  return this.handlers.get(t);
1418
1418
  }
1419
1419
  }
1420
- const ms = (i) => {
1421
- let t = i, e = 0;
1420
+ const ds = (n) => {
1421
+ let t = n, e = 0;
1422
1422
  for (; t.parent; )
1423
1423
  e = e + 1, t = t.parent;
1424
1424
  return e;
1425
- }, fs = (i) => i.map(([t, e]) => [ms(t), t, e]).sort(([t], [e]) => t - e).map(([, t, e]) => [t, e]), gt = (i) => i instanceof Date ? !1 : i && typeof i == "object" && !Array.isArray(i), E = (i, ...t) => {
1425
+ }, us = (n) => n.map(([t, e]) => [ds(t), t, e]).sort(([t], [e]) => t - e).map(([, t, e]) => [t, e]), ft = (n) => n instanceof Date ? !1 : n && typeof n == "object" && !Array.isArray(n), A = (n, ...t) => {
1426
1426
  if (!t.length)
1427
- return i;
1427
+ return n;
1428
1428
  const e = t.shift();
1429
- if (gt(i) && gt(e))
1429
+ if (ft(n) && ft(e))
1430
1430
  for (const s in e)
1431
- gt(e[s]) ? (i[s] || Object.assign(i, { [s]: {} }), E(i[s], e[s])) : Object.assign(i, { [s]: e[s] });
1432
- return E(i, ...t);
1433
- }, ys = (i, t) => !i || i === "all" ? !0 : i.some((e) => t.indexOf(e) > -1), $s = (i, t) => {
1434
- let e = [], s = [], n;
1431
+ ft(e[s]) ? (n[s] || Object.assign(n, { [s]: {} }), A(n[s], e[s])) : Object.assign(n, { [s]: e[s] });
1432
+ return A(n, ...t);
1433
+ }, gs = (n, t) => !n || n === "all" ? !0 : n.some((e) => t.indexOf(e) > -1), ms = (n, t) => {
1434
+ let e = [], s = [], i;
1435
1435
  const r = () => {
1436
1436
  process.env.NODE_ENV !== "production" && console.time("state-processor.flush");
1437
- const a = /* @__PURE__ */ new Map(), h = fs(e.map((l, d) => [l, s[d]])), c = (l, d) => {
1438
- var p;
1439
- const u = a.get(l) || {}, y = d.context && !u.context, w = d.properties && !u.properties, at = d.layout && !u.layout;
1440
- a.set(l, {
1441
- context: u.context || y,
1442
- properties: u.properties || w,
1443
- layout: u.layout || at
1444
- }), w && (l.attributes.properties = {}), at && (l.attributes.layout = {}), y && (l.attributes.context = E({}, (p = l.parent) == null ? void 0 : p.attributes.context));
1445
- const jt = [], zt = [], Dt = [];
1446
- if (l.changesets.forEach((A) => {
1447
- const [$, ct] = A;
1448
- ys(ct.breakpoints, i.breakpoints) && (w && (typeof $.properties == "function" ? jt.push(
1437
+ const a = /* @__PURE__ */ new Map(), c = us(e.map((h, p) => [h, s[p]])), l = (h, p) => {
1438
+ var u;
1439
+ const d = a.get(h) || {}, f = p.context && !d.context, z = p.properties && !d.properties, ht = p.layout && !d.layout;
1440
+ a.set(h, {
1441
+ context: d.context || f,
1442
+ properties: d.properties || z,
1443
+ layout: d.layout || ht
1444
+ }), z && (h.attributes.properties = {}), ht && (h.attributes.layout = {}), f && (h.attributes.context = A({}, (u = h.parent) == null ? void 0 : u.attributes.context));
1445
+ const Ht = [], Rt = [], Lt = [];
1446
+ if (h.changesets.forEach((_) => {
1447
+ const [$, lt] = _;
1448
+ gs(lt.breakpoints, n.breakpoints) && (z && (typeof $.properties == "function" ? Ht.push(
1449
1449
  $.properties
1450
- ) : E(l.attributes.properties, $.properties)), at && (typeof $.layout == "function" ? zt.push($.layout) : E(l.attributes.layout, $.layout)), y && (typeof $.context == "function" ? Dt.push($.context) : E(l.attributes.context, $.context)));
1451
- }), jt.forEach((A) => {
1452
- E(l.attributes.properties, A(l.attributes.properties));
1453
- }), zt.forEach((A) => {
1454
- E(l.attributes.layout, A(l.attributes.layout));
1455
- }), Dt.forEach((A) => {
1456
- E(l.attributes.context, A(l.attributes.context));
1457
- }), y || d.recursive) {
1458
- const A = i.getBranch(l), $ = d.recursive ? d : {
1459
- context: !!y
1450
+ ) : A(h.attributes.properties, $.properties)), ht && (typeof $.layout == "function" ? Rt.push($.layout) : A(h.attributes.layout, $.layout)), f && (typeof $.context == "function" ? Lt.push($.context) : A(h.attributes.context, $.context)));
1451
+ }), Ht.forEach((_) => {
1452
+ A(h.attributes.properties, _(h.attributes.properties));
1453
+ }), Rt.forEach((_) => {
1454
+ A(h.attributes.layout, _(h.attributes.layout));
1455
+ }), Lt.forEach((_) => {
1456
+ A(h.attributes.context, _(h.attributes.context));
1457
+ }), f || p.recursive) {
1458
+ const _ = n.getBranch(h), $ = p.recursive ? p : {
1459
+ context: !!f
1460
1460
  };
1461
- l.getChildren(A).forEach((ct) => {
1462
- c(ct, $);
1461
+ h.getChildren(_).forEach((lt) => {
1462
+ l(lt, $);
1463
1463
  });
1464
1464
  }
1465
1465
  };
1466
- process.env.NODE_ENV !== "production" && console.timeEnd("state-processor.flush"), h.forEach(([l, d]) => {
1467
- c(l, d);
1466
+ process.env.NODE_ENV !== "production" && console.timeEnd("state-processor.flush"), c.forEach(([h, p]) => {
1467
+ l(h, p);
1468
1468
  }), e = [], s = [], t(a);
1469
1469
  }, o = () => {
1470
- clearTimeout(n), n = setTimeout(r, 0);
1470
+ clearTimeout(i), i = setTimeout(r, 0);
1471
1471
  };
1472
- return (a, h) => {
1473
- const c = e.indexOf(a);
1474
- if (c > -1) {
1475
- const l = s[c];
1476
- return h.context && (l.context = !0), h.properties && (l.properties = !0), h.layout && (l.layout = !0), h.recursive && (l.recursive = !0), o();
1472
+ return (a, c) => {
1473
+ const l = e.indexOf(a);
1474
+ if (l > -1) {
1475
+ const h = s[l];
1476
+ return c.context && (h.context = !0), c.properties && (h.properties = !0), c.layout && (h.layout = !0), c.recursive && (h.recursive = !0), o();
1477
1477
  }
1478
- return e.push(a), s.push(h), o();
1478
+ return e.push(a), s.push(c), o();
1479
1479
  };
1480
1480
  };
1481
- class bs {
1481
+ class fs {
1482
1482
  constructor(t, e = {}) {
1483
- this.providers = e, this.breakpoints = [], this.actionsState = { handlers: [], watchers: [] }, this.switches = {}, this.changesets = [], this.subscriptions = [], this.customComponentHandler = new vs(), this.events = t.events.createChild(this);
1484
- const s = new Xt(this.events, "root");
1485
- s.name = `root-${t.name}`, this.nodes = new gs(s, this.switches, this.events);
1486
- const n = this.processNode = $s(this, (r) => {
1483
+ this.providers = e, this.breakpoints = [], this.actionsState = { handlers: [], watchers: [] }, this.switches = {}, this.changesets = [], this.subscriptions = [], this.customComponentHandler = new ps(), this.events = t.events.createChild(this);
1484
+ const s = new Jt(this.events, "root");
1485
+ s.name = `root-${t.name}`, this.nodes = new ls(s, this.switches, this.events);
1486
+ const i = this.processNode = ms(this, (r) => {
1487
1487
  const o = Array.from(r.keys());
1488
1488
  process.env.NODE_ENV !== "production" && console.info(`STATE PROCESSOR: ${o.length} node(s) processed:
1489
1489
  ${o.map(
1490
1490
  (a) => `${a.name || "<no name>"} (${a.id})
1491
1491
  `
1492
1492
  )}`), o.forEach((a) => {
1493
- const h = r.get(a);
1494
- a.parent && a.parent.type === "root" && this.events.dispatch("components:root-children-changed", { node: a }), h != null && h.context && this.events.dispatch("components:context-changed", { node: a }), h != null && h.properties && this.events.dispatch("components:properties-changed", { node: a }), h != null && h.layout && this.events.dispatch("components:layout-changed", { node: a });
1493
+ const c = r.get(a);
1494
+ a.parent && a.parent.type === "root" && this.events.dispatch("components:root-children-changed", { node: a }), c != null && c.context && this.events.dispatch("components:context-changed", { node: a }), c != null && c.properties && this.events.dispatch("components:properties-changed", { node: a }), c != null && c.layout && this.events.dispatch("components:layout-changed", { node: a });
1495
1495
  }), this.events.dispatch("components:component-model-initialized", {}, { bubbles: !0 });
1496
1496
  });
1497
1497
  Promise.all(
@@ -1501,9 +1501,9 @@ ${o.map(
1501
1501
  "components:node-appended",
1502
1502
  (r, o) => {
1503
1503
  const { node: a } = o;
1504
- this.changesets.forEach((h) => {
1505
- const { changeset: c, target: l, removes: d } = h, [p, u] = c;
1506
- l.match(o.node) && (p.properties && d.push(a.writeProperties(p.properties, u)), p.context && d.push(a.writeContext(p.context, u)), p.layout && d.push(a.writeLayout(p.layout, u)));
1504
+ this.changesets.forEach((c) => {
1505
+ const { changeset: l, target: h, removes: p } = c, [u, d] = l;
1506
+ h.match(o.node) && (u.properties && p.push(a.writeProperties(u.properties, d)), u.context && p.push(a.writeContext(u.context, d)), u.layout && p.push(a.writeLayout(u.layout, d)));
1507
1507
  });
1508
1508
  }
1509
1509
  )
@@ -1511,40 +1511,40 @@ ${o.map(
1511
1511
  this.events.subscribe(
1512
1512
  "components:node-appended",
1513
1513
  (r, o) => {
1514
- n(o.node, { properties: !0, context: !0 });
1514
+ i(o.node, { properties: !0, context: !0 });
1515
1515
  }
1516
1516
  )
1517
1517
  ), this.subscriptions.push(
1518
1518
  this.events.subscribe(
1519
1519
  "components:set-properties",
1520
1520
  (r, o) => {
1521
- n(o.node, { properties: !0 });
1521
+ i(o.node, { properties: !0 });
1522
1522
  }
1523
1523
  )
1524
1524
  ), this.subscriptions.push(
1525
1525
  this.events.subscribe(
1526
1526
  "components:set-context",
1527
1527
  (r, o) => {
1528
- n(o.node, { properties: !0, context: !0 });
1528
+ i(o.node, { properties: !0, context: !0 });
1529
1529
  }
1530
1530
  )
1531
1531
  ), this.subscriptions.push(
1532
1532
  this.events.subscribe(
1533
1533
  "components:set-indent",
1534
1534
  (r, o) => {
1535
- n(o.node, { layout: !0 });
1535
+ i(o.node, { layout: !0 });
1536
1536
  }
1537
1537
  )
1538
1538
  ), this.subscriptions.push(
1539
1539
  this.events.subscribe(
1540
1540
  "components:set-layout",
1541
1541
  (r, o) => {
1542
- n(o.node, { layout: !0 });
1542
+ i(o.node, { layout: !0 });
1543
1543
  }
1544
1544
  )
1545
1545
  ), this.subscriptions.push(
1546
1546
  this.events.subscribe("components:node-switched", (r, { node: o, branch: a }) => {
1547
- n(o, {
1547
+ i(o, {
1548
1548
  layout: !0,
1549
1549
  recursive: !0,
1550
1550
  properties: !0,
@@ -1553,7 +1553,7 @@ ${o.map(
1553
1553
  })
1554
1554
  ), this.subscriptions.push(
1555
1555
  this.events.subscribe("components:node-removed", (r, { parentNode: o }) => {
1556
- n(o, { properties: !0 });
1556
+ i(o, { properties: !0 });
1557
1557
  })
1558
1558
  ), this.events.parent && this.events.parent.dispatch("components:platform-created", { platform: this });
1559
1559
  }
@@ -1588,34 +1588,34 @@ ${o.map(
1588
1588
  * @param type Type of node.
1589
1589
  */
1590
1590
  createNode(t, e = {}) {
1591
- const s = new Xt(this.events, t);
1591
+ const s = new Jt(this.events, t);
1592
1592
  return e.detached && this.nodes.detached.push(s), s;
1593
1593
  }
1594
1594
  components() {
1595
- return new Nt(this);
1595
+ return new Ct(this);
1596
1596
  }
1597
1597
  actions(t, e) {
1598
- return new Tt(this, t, e);
1598
+ return new kt(this, t, e);
1599
1599
  }
1600
1600
  write(t) {
1601
- const { provider: e, target: s, attributes: n, options: r = {}, removable: o } = t, a = t.key || St(), h = { changeset: [n, r], target: s, removes: [] };
1601
+ const { provider: e, target: s, attributes: i, options: r = {}, removable: o } = t, a = t.key || Pt(), c = { changeset: [i, r], target: s, removes: [] };
1602
1602
  if (e) {
1603
- const c = this.providers[e];
1604
- c.write(a, s, n, r), h.removes.push(() => {
1605
- c.remove(a);
1603
+ const l = this.providers[e];
1604
+ l.write(a, s, i, r), c.removes.push(() => {
1605
+ l.remove(a);
1606
1606
  });
1607
1607
  }
1608
- return this.changesets.push(h), this.nodes.all.forEach((c) => {
1609
- if (s.match(c)) {
1610
- let l = () => {
1608
+ return this.changesets.push(c), this.nodes.all.forEach((l) => {
1609
+ if (s.match(l)) {
1610
+ let h = () => {
1611
1611
  };
1612
- n.properties && (l = c.writeProperties(n.properties, r, o)), n.context && (l = c.writeContext(n.context, r, o)), n.layout && (l = c.writeContext(n.layout, r, o)), h.removes.push(l);
1612
+ i.properties && (h = l.writeProperties(i.properties, r, o)), i.context && (h = l.writeContext(i.context, r, o)), i.layout && (h = l.writeContext(i.layout, r, o)), c.removes.push(h);
1613
1613
  }
1614
1614
  }), () => {
1615
1615
  if (o) {
1616
- h.removes.forEach((l) => l());
1617
- const c = this.changesets.indexOf(h);
1618
- c > -1 && this.changesets.splice(c, 1);
1616
+ c.removes.forEach((h) => h());
1617
+ const l = this.changesets.indexOf(c);
1618
+ l > -1 && this.changesets.splice(l, 1);
1619
1619
  }
1620
1620
  };
1621
1621
  }
@@ -1629,47 +1629,47 @@ ${o.map(
1629
1629
  this.subscriptions.forEach((t) => t());
1630
1630
  }
1631
1631
  }
1632
- const oi = (i, t) => ({
1633
- id: i.id,
1634
- type: i.type,
1635
- name: i.name,
1632
+ const ai = (n, t) => ({
1633
+ id: n.id,
1634
+ type: n.type,
1635
+ name: n.name,
1636
1636
  branch: t || "default"
1637
- }), ws = (i, t, e, s = St(), n = {}) => i.getAsync("components").then((r) => {
1637
+ }), vs = (n, t, e, s = Pt(), i = {}) => n.getAsync("components").then((r) => {
1638
1638
  let o;
1639
1639
  if (typeof t == "string") {
1640
- const c = new Nt(r);
1641
- c.ofType(t), o = c;
1640
+ const l = new Ct(r);
1641
+ l.ofType(t), o = l;
1642
1642
  } else
1643
1643
  o = t;
1644
- const a = {}, h = (c) => {
1645
- const l = a[c.id];
1646
- return l ? Promise.resolve(l.controller) : bs.getInstance(i).then((d) => new be(d, c, s));
1644
+ const a = {}, c = (l) => {
1645
+ const h = a[l.id];
1646
+ return h ? Promise.resolve(h.controller) : fs.getInstance(n).then((p) => new fe(p, l, s));
1647
1647
  };
1648
1648
  r.events.subscribe(
1649
1649
  "components:node-enter",
1650
- (c, { node: l }) => {
1651
- o.match(l) && h(l).then((d) => {
1652
- Promise.resolve(e(d)).then((p) => {
1653
- a[l.id] = {
1654
- dispose: p,
1655
- controller: d
1650
+ (l, { node: h }) => {
1651
+ o.match(h) && c(h).then((p) => {
1652
+ Promise.resolve(e(p)).then((u) => {
1653
+ a[h.id] = {
1654
+ dispose: u,
1655
+ controller: p
1656
1656
  };
1657
1657
  });
1658
1658
  });
1659
1659
  }
1660
1660
  ), r.events.subscribe(
1661
1661
  "components:node-exit",
1662
- (c, { node: l }) => {
1663
- const d = a[l.id];
1664
- d && (d.dispose && d.dispose(), n.reuseController || (d.controller.dispose(), delete a[l.id]));
1662
+ (l, { node: h }) => {
1663
+ const p = a[h.id];
1664
+ p && (p.dispose && p.dispose(), i.reuseController || (p.controller.dispose(), delete a[h.id]));
1665
1665
  }
1666
1666
  );
1667
- }), _s = "#____version____#", _e = class extends $e {
1667
+ }), ys = "#____version____#", ye = class extends me {
1668
1668
  constructor(t, e = []) {
1669
1669
  super(t, e, {
1670
- transformPluginSettings: (s, n, r) => {
1671
- const o = r.get("$settings"), a = o.plugins && n ? o.plugins[n] || {} : {};
1672
- return _t(_t({}, a), s);
1670
+ transformPluginSettings: (s, i, r) => {
1671
+ const o = r.get("$settings"), a = o.plugins && i ? o.plugins[i] || {} : {};
1672
+ return wt(wt({}, a), s);
1673
1673
  }
1674
1674
  });
1675
1675
  }
@@ -1685,17 +1685,17 @@ const oi = (i, t) => ({
1685
1685
  * @param params Route params.
1686
1686
  */
1687
1687
  navigate(t, e, s) {
1688
- this.widgets.query(t).forEach((n) => n.invoke("navigate", { route: e, params: s }));
1688
+ this.widgets.query(t).forEach((i) => i.invoke("navigate", { route: e, params: s }));
1689
1689
  }
1690
1690
  /**
1691
1691
  * Creates a runtime based on provided configuration.
1692
1692
  * @param configuration Runtime configuration.
1693
1693
  */
1694
1694
  static create(t = {}) {
1695
- const e = [Te].concat(
1695
+ const e = [ke].concat(
1696
1696
  t.configurationApiExtensions || []
1697
1697
  );
1698
- return new _e("humany", e);
1698
+ return new ye("humany", e);
1699
1699
  }
1700
1700
  /**
1701
1701
  * Creates a widget runtime based on provided configuration and retains configuration handlers
@@ -1707,8 +1707,8 @@ const oi = (i, t) => ({
1707
1707
  static createFromGlobal(t, e = {}) {
1708
1708
  if (this.isRuntime(t))
1709
1709
  return t.patch(e), t;
1710
- const s = [], n = t && t._c;
1711
- n && n.forEach((o) => s.push(o));
1710
+ const s = [], i = t && t._c;
1711
+ i && i.forEach((o) => s.push(o));
1712
1712
  const r = this.create(e);
1713
1713
  return r.container.register("$runtimecfg", s), r;
1714
1714
  }
@@ -1720,26 +1720,26 @@ const oi = (i, t) => ({
1720
1720
  return !!(t && typeof t == "object" && t.container && typeof t.container.get == "function" && t.container.get("$environment") === t && t.container.owner === t);
1721
1721
  }
1722
1722
  };
1723
- let As = _e;
1724
- As.version = `${_s} (${Ot})`;
1723
+ let $s = ye;
1724
+ $s.version = `${ys} (${xt})`;
1725
1725
  /**
1726
1726
  * @license
1727
1727
  * Copyright 2019 Google LLC
1728
1728
  * SPDX-License-Identifier: BSD-3-Clause
1729
1729
  */
1730
- const tt = window, Ut = tt.ShadowRoot && (tt.ShadyCSS === void 0 || tt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ht = Symbol(), te = /* @__PURE__ */ new WeakMap();
1731
- let Ae = class {
1730
+ const st = globalThis, St = st.ShadowRoot && (st.ShadyCSS === void 0 || st.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Nt = Symbol(), Kt = /* @__PURE__ */ new WeakMap();
1731
+ let $e = class {
1732
1732
  constructor(t, e, s) {
1733
- if (this._$cssResult$ = !0, s !== Ht)
1733
+ if (this._$cssResult$ = !0, s !== Nt)
1734
1734
  throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
1735
1735
  this.cssText = t, this.t = e;
1736
1736
  }
1737
1737
  get styleSheet() {
1738
1738
  let t = this.o;
1739
1739
  const e = this.t;
1740
- if (Ut && t === void 0) {
1740
+ if (St && t === void 0) {
1741
1741
  const s = e !== void 0 && e.length === 1;
1742
- s && (t = te.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && te.set(e, t));
1742
+ s && (t = Kt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && Kt.set(e, t));
1743
1743
  }
1744
1744
  return t;
1745
1745
  }
@@ -1747,185 +1747,210 @@ let Ae = class {
1747
1747
  return this.cssText;
1748
1748
  }
1749
1749
  };
1750
- const Es = (i) => new Ae(typeof i == "string" ? i : i + "", void 0, Ht), xs = (i, ...t) => {
1751
- const e = i.length === 1 ? i[0] : t.reduce((s, n, r) => s + ((o) => {
1750
+ const bs = (n) => new $e(typeof n == "string" ? n : n + "", void 0, Nt), ws = (n, ...t) => {
1751
+ const e = n.length === 1 ? n[0] : t.reduce((s, i, r) => s + ((o) => {
1752
1752
  if (o._$cssResult$ === !0)
1753
1753
  return o.cssText;
1754
1754
  if (typeof o == "number")
1755
1755
  return o;
1756
1756
  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.");
1757
- })(n) + i[r + 1], i[0]);
1758
- return new Ae(e, i, Ht);
1759
- }, Cs = (i, t) => {
1760
- Ut ? i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
1761
- const s = document.createElement("style"), n = tt.litNonce;
1762
- n !== void 0 && s.setAttribute("nonce", n), s.textContent = e.cssText, i.appendChild(s);
1763
- });
1764
- }, ee = Ut ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
1757
+ })(i) + n[r + 1], n[0]);
1758
+ return new $e(e, n, Nt);
1759
+ }, _s = (n, t) => {
1760
+ if (St)
1761
+ n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
1762
+ else
1763
+ for (const e of t) {
1764
+ const s = document.createElement("style"), i = st.litNonce;
1765
+ i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, n.appendChild(s);
1766
+ }
1767
+ }, Gt = St ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
1765
1768
  let e = "";
1766
1769
  for (const s of t.cssRules)
1767
1770
  e += s.cssText;
1768
- return Es(e);
1769
- })(i) : i;
1771
+ return bs(e);
1772
+ })(n) : n;
1770
1773
  /**
1771
1774
  * @license
1772
1775
  * Copyright 2017 Google LLC
1773
1776
  * SPDX-License-Identifier: BSD-3-Clause
1774
1777
  */
1775
- var vt;
1776
- const it = window, se = it.trustedTypes, Ps = se ? se.emptyScript : "", ie = it.reactiveElementPolyfillSupport, At = { toAttribute(i, t) {
1778
+ const { is: As, defineProperty: Es, getOwnPropertyDescriptor: xs, getOwnPropertyNames: Ps, getOwnPropertySymbols: Cs, getPrototypeOf: ks } = Object, O = globalThis, Xt = O.trustedTypes, Os = Xt ? Xt.emptyScript : "", vt = O.reactiveElementPolyfillSupport, V = (n, t) => n, rt = { toAttribute(n, t) {
1777
1779
  switch (t) {
1778
1780
  case Boolean:
1779
- i = i ? Ps : null;
1781
+ n = n ? Os : null;
1780
1782
  break;
1781
1783
  case Object:
1782
1784
  case Array:
1783
- i = i == null ? i : JSON.stringify(i);
1785
+ n = n == null ? n : JSON.stringify(n);
1784
1786
  }
1785
- return i;
1786
- }, fromAttribute(i, t) {
1787
- let e = i;
1787
+ return n;
1788
+ }, fromAttribute(n, t) {
1789
+ let e = n;
1788
1790
  switch (t) {
1789
1791
  case Boolean:
1790
- e = i !== null;
1792
+ e = n !== null;
1791
1793
  break;
1792
1794
  case Number:
1793
- e = i === null ? null : Number(i);
1795
+ e = n === null ? null : Number(n);
1794
1796
  break;
1795
1797
  case Object:
1796
1798
  case Array:
1797
1799
  try {
1798
- e = JSON.parse(i);
1800
+ e = JSON.parse(n);
1799
1801
  } catch {
1800
1802
  e = null;
1801
1803
  }
1802
1804
  }
1803
1805
  return e;
1804
- } }, Ee = (i, t) => t !== i && (t == t || i == i), mt = { attribute: !0, type: String, converter: At, reflect: !1, hasChanged: Ee }, Et = "finalized";
1805
- let U = class extends HTMLElement {
1806
- constructor() {
1807
- super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
1808
- }
1806
+ } }, Tt = (n, t) => !As(n, t), te = { attribute: !0, type: String, converter: rt, reflect: !1, hasChanged: Tt };
1807
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), O.litPropertyMetadata ?? (O.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
1808
+ class U extends HTMLElement {
1809
1809
  static addInitializer(t) {
1810
- var e;
1811
- this.finalize(), ((e = this.h) !== null && e !== void 0 ? e : this.h = []).push(t);
1810
+ this._$Ei(), (this.l ?? (this.l = [])).push(t);
1812
1811
  }
1813
1812
  static get observedAttributes() {
1814
- this.finalize();
1815
- const t = [];
1816
- return this.elementProperties.forEach((e, s) => {
1817
- const n = this._$Ep(s, e);
1818
- n !== void 0 && (this._$Ev.set(n, s), t.push(n));
1819
- }), t;
1820
- }
1821
- static createProperty(t, e = mt) {
1822
- if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
1823
- const s = typeof t == "symbol" ? Symbol() : "__" + t, n = this.getPropertyDescriptor(t, s, e);
1824
- n !== void 0 && Object.defineProperty(this.prototype, t, n);
1813
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
1814
+ }
1815
+ static createProperty(t, e = te) {
1816
+ if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
1817
+ const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
1818
+ i !== void 0 && Es(this.prototype, t, i);
1825
1819
  }
1826
1820
  }
1827
1821
  static getPropertyDescriptor(t, e, s) {
1828
- return { get() {
1822
+ const { get: i, set: r } = xs(this.prototype, t) ?? { get() {
1829
1823
  return this[e];
1830
- }, set(n) {
1831
- const r = this[t];
1832
- this[e] = n, this.requestUpdate(t, r, s);
1824
+ }, set(o) {
1825
+ this[e] = o;
1826
+ } };
1827
+ return { get() {
1828
+ return i == null ? void 0 : i.call(this);
1829
+ }, set(o) {
1830
+ const a = i == null ? void 0 : i.call(this);
1831
+ r.call(this, o), this.requestUpdate(t, a, s);
1833
1832
  }, configurable: !0, enumerable: !0 };
1834
1833
  }
1835
1834
  static getPropertyOptions(t) {
1836
- return this.elementProperties.get(t) || mt;
1835
+ return this.elementProperties.get(t) ?? te;
1836
+ }
1837
+ static _$Ei() {
1838
+ if (this.hasOwnProperty(V("elementProperties")))
1839
+ return;
1840
+ const t = ks(this);
1841
+ t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
1837
1842
  }
1838
1843
  static finalize() {
1839
- if (this.hasOwnProperty(Et))
1840
- return !1;
1841
- this[Et] = !0;
1842
- const t = Object.getPrototypeOf(this);
1843
- if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
1844
- const e = this.properties, s = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
1845
- for (const n of s)
1846
- this.createProperty(n, e[n]);
1844
+ if (this.hasOwnProperty(V("finalized")))
1845
+ return;
1846
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(V("properties"))) {
1847
+ const e = this.properties, s = [...Ps(e), ...Cs(e)];
1848
+ for (const i of s)
1849
+ this.createProperty(i, e[i]);
1850
+ }
1851
+ const t = this[Symbol.metadata];
1852
+ if (t !== null) {
1853
+ const e = litPropertyMetadata.get(t);
1854
+ if (e !== void 0)
1855
+ for (const [s, i] of e)
1856
+ this.elementProperties.set(s, i);
1847
1857
  }
1848
- return this.elementStyles = this.finalizeStyles(this.styles), !0;
1858
+ this._$Eh = /* @__PURE__ */ new Map();
1859
+ for (const [e, s] of this.elementProperties) {
1860
+ const i = this._$Eu(e, s);
1861
+ i !== void 0 && this._$Eh.set(i, e);
1862
+ }
1863
+ this.elementStyles = this.finalizeStyles(this.styles);
1849
1864
  }
1850
1865
  static finalizeStyles(t) {
1851
1866
  const e = [];
1852
1867
  if (Array.isArray(t)) {
1853
1868
  const s = new Set(t.flat(1 / 0).reverse());
1854
- for (const n of s)
1855
- e.unshift(ee(n));
1869
+ for (const i of s)
1870
+ e.unshift(Gt(i));
1856
1871
  } else
1857
- t !== void 0 && e.push(ee(t));
1872
+ t !== void 0 && e.push(Gt(t));
1858
1873
  return e;
1859
1874
  }
1860
- static _$Ep(t, e) {
1875
+ static _$Eu(t, e) {
1861
1876
  const s = e.attribute;
1862
1877
  return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
1863
1878
  }
1864
- _$Eu() {
1879
+ constructor() {
1880
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
1881
+ }
1882
+ _$Ev() {
1865
1883
  var t;
1866
- this._$E_ = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach((e) => e(this));
1884
+ 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));
1867
1885
  }
1868
1886
  addController(t) {
1869
- var e, s;
1870
- ((e = this._$ES) !== null && e !== void 0 ? e : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((s = t.hostConnected) === null || s === void 0 || s.call(t));
1887
+ var e;
1888
+ (this._$ES ?? (this._$ES = [])).push(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
1871
1889
  }
1872
1890
  removeController(t) {
1873
1891
  var e;
1874
- (e = this._$ES) === null || e === void 0 || e.splice(this._$ES.indexOf(t) >>> 0, 1);
1892
+ (e = this._$ES) == null || e.splice(this._$ES.indexOf(t) >>> 0, 1);
1875
1893
  }
1876
- _$Eg() {
1877
- this.constructor.elementProperties.forEach((t, e) => {
1878
- this.hasOwnProperty(e) && (this._$Ei.set(e, this[e]), delete this[e]);
1879
- });
1894
+ _$E_() {
1895
+ const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
1896
+ for (const s of e.keys())
1897
+ this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
1898
+ t.size > 0 && (this._$Ep = t);
1880
1899
  }
1881
1900
  createRenderRoot() {
1882
- var t;
1883
- const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
1884
- return Cs(e, this.constructor.elementStyles), e;
1901
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
1902
+ return _s(t, this.constructor.elementStyles), t;
1885
1903
  }
1886
1904
  connectedCallback() {
1887
1905
  var t;
1888
- this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach((e) => {
1906
+ this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) == null || t.forEach((e) => {
1889
1907
  var s;
1890
- return (s = e.hostConnected) === null || s === void 0 ? void 0 : s.call(e);
1908
+ return (s = e.hostConnected) == null ? void 0 : s.call(e);
1891
1909
  });
1892
1910
  }
1893
1911
  enableUpdating(t) {
1894
1912
  }
1895
1913
  disconnectedCallback() {
1896
1914
  var t;
1897
- (t = this._$ES) === null || t === void 0 || t.forEach((e) => {
1915
+ (t = this._$ES) == null || t.forEach((e) => {
1898
1916
  var s;
1899
- return (s = e.hostDisconnected) === null || s === void 0 ? void 0 : s.call(e);
1917
+ return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
1900
1918
  });
1901
1919
  }
1902
1920
  attributeChangedCallback(t, e, s) {
1903
1921
  this._$AK(t, s);
1904
1922
  }
1905
- _$EO(t, e, s = mt) {
1906
- var n;
1907
- const r = this.constructor._$Ep(t, s);
1908
- if (r !== void 0 && s.reflect === !0) {
1909
- const o = (((n = s.converter) === null || n === void 0 ? void 0 : n.toAttribute) !== void 0 ? s.converter : At).toAttribute(e, s.type);
1910
- this._$El = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$El = null;
1923
+ _$EO(t, e) {
1924
+ var r;
1925
+ const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
1926
+ if (i !== void 0 && s.reflect === !0) {
1927
+ const o = (((r = s.converter) == null ? void 0 : r.toAttribute) !== void 0 ? s.converter : rt).toAttribute(e, s.type);
1928
+ this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
1911
1929
  }
1912
1930
  }
1913
1931
  _$AK(t, e) {
1914
- var s;
1915
- const n = this.constructor, r = n._$Ev.get(t);
1916
- if (r !== void 0 && this._$El !== r) {
1917
- const o = n.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((s = o.converter) === null || s === void 0 ? void 0 : s.fromAttribute) !== void 0 ? o.converter : At;
1918
- this._$El = r, this[r] = a.fromAttribute(e, o.type), this._$El = null;
1932
+ var r;
1933
+ const s = this.constructor, i = s._$Eh.get(t);
1934
+ if (i !== void 0 && this._$Em !== i) {
1935
+ const o = s.getPropertyOptions(i), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((r = o.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? o.converter : rt;
1936
+ this._$Em = i, this[i] = a.fromAttribute(e, o.type), this._$Em = null;
1919
1937
  }
1920
1938
  }
1921
- requestUpdate(t, e, s) {
1922
- let n = !0;
1923
- t !== void 0 && (((s = s || this.constructor.getPropertyOptions(t)).hasChanged || Ee)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, s))) : n = !1), !this.isUpdatePending && n && (this._$E_ = this._$Ej());
1939
+ requestUpdate(t, e, s, i = !1, r) {
1940
+ if (t !== void 0) {
1941
+ if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? Tt)(i ? r : this[t], e))
1942
+ return;
1943
+ this.C(t, e, s);
1944
+ }
1945
+ this.isUpdatePending === !1 && (this._$Eg = this._$EP());
1924
1946
  }
1925
- async _$Ej() {
1947
+ C(t, e, s) {
1948
+ this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
1949
+ }
1950
+ async _$EP() {
1926
1951
  this.isUpdatePending = !0;
1927
1952
  try {
1928
- await this._$E_;
1953
+ await this._$Eg;
1929
1954
  } catch (e) {
1930
1955
  Promise.reject(e);
1931
1956
  }
@@ -1936,121 +1961,123 @@ let U = class extends HTMLElement {
1936
1961
  return this.performUpdate();
1937
1962
  }
1938
1963
  performUpdate() {
1939
- var t;
1964
+ var s;
1940
1965
  if (!this.isUpdatePending)
1941
1966
  return;
1942
- this.hasUpdated, this._$Ei && (this._$Ei.forEach((n, r) => this[r] = n), this._$Ei = void 0);
1943
- let e = !1;
1944
- const s = this._$AL;
1967
+ if (!this.hasUpdated) {
1968
+ if (this._$Ep) {
1969
+ for (const [r, o] of this._$Ep)
1970
+ this[r] = o;
1971
+ this._$Ep = void 0;
1972
+ }
1973
+ const i = this.constructor.elementProperties;
1974
+ if (i.size > 0)
1975
+ for (const [r, o] of i)
1976
+ o.wrapped !== !0 || this._$AL.has(r) || this[r] === void 0 || this.C(r, this[r], o);
1977
+ }
1978
+ let t = !1;
1979
+ const e = this._$AL;
1945
1980
  try {
1946
- e = this.shouldUpdate(s), e ? (this.willUpdate(s), (t = this._$ES) === null || t === void 0 || t.forEach((n) => {
1981
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$ES) == null || s.forEach((i) => {
1947
1982
  var r;
1948
- return (r = n.hostUpdate) === null || r === void 0 ? void 0 : r.call(n);
1949
- }), this.update(s)) : this._$Ek();
1950
- } catch (n) {
1951
- throw e = !1, this._$Ek(), n;
1983
+ return (r = i.hostUpdate) == null ? void 0 : r.call(i);
1984
+ }), this.update(e)) : this._$ET();
1985
+ } catch (i) {
1986
+ throw t = !1, this._$ET(), i;
1952
1987
  }
1953
- e && this._$AE(s);
1988
+ t && this._$AE(e);
1954
1989
  }
1955
1990
  willUpdate(t) {
1956
1991
  }
1957
1992
  _$AE(t) {
1958
1993
  var e;
1959
- (e = this._$ES) === null || e === void 0 || e.forEach((s) => {
1960
- var n;
1961
- return (n = s.hostUpdated) === null || n === void 0 ? void 0 : n.call(s);
1994
+ (e = this._$ES) == null || e.forEach((s) => {
1995
+ var i;
1996
+ return (i = s.hostUpdated) == null ? void 0 : i.call(s);
1962
1997
  }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
1963
1998
  }
1964
- _$Ek() {
1999
+ _$ET() {
1965
2000
  this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
1966
2001
  }
1967
2002
  get updateComplete() {
1968
2003
  return this.getUpdateComplete();
1969
2004
  }
1970
2005
  getUpdateComplete() {
1971
- return this._$E_;
2006
+ return this._$Eg;
1972
2007
  }
1973
2008
  shouldUpdate(t) {
1974
2009
  return !0;
1975
2010
  }
1976
2011
  update(t) {
1977
- this._$EC !== void 0 && (this._$EC.forEach((e, s) => this._$EO(s, this[s], e)), this._$EC = void 0), this._$Ek();
2012
+ this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EO(e, this[e]))), this._$ET();
1978
2013
  }
1979
2014
  updated(t) {
1980
2015
  }
1981
2016
  firstUpdated(t) {
1982
2017
  }
1983
- };
1984
- U[Et] = !0, U.elementProperties = /* @__PURE__ */ new Map(), U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, ie == null || ie({ ReactiveElement: U }), ((vt = it.reactiveElementVersions) !== null && vt !== void 0 ? vt : it.reactiveElementVersions = []).push("1.6.3");
2018
+ }
2019
+ U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[V("elementProperties")] = /* @__PURE__ */ new Map(), U[V("finalized")] = /* @__PURE__ */ new Map(), vt == null || vt({ ReactiveElement: U }), (O.reactiveElementVersions ?? (O.reactiveElementVersions = [])).push("2.0.1");
1985
2020
  /**
1986
2021
  * @license
1987
2022
  * Copyright 2017 Google LLC
1988
2023
  * SPDX-License-Identifier: BSD-3-Clause
1989
2024
  */
1990
- var ft;
1991
- const nt = window, L = nt.trustedTypes, ne = L ? L.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, xt = "$lit$", k = `lit$${(Math.random() + "").slice(9)}$`, xe = "?" + k, ks = `<${xe}>`, T = document, F = () => T.createComment(""), q = (i) => i === null || typeof i != "object" && typeof i != "function", Ce = Array.isArray, Os = (i) => Ce(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", yt = `[
1992
- \f\r]`, I = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, re = /-->/g, oe = />/g, S = RegExp(`>|${yt}(?:([^\\s"'>=/]+)(${yt}*=${yt}*(?:[^
1993
- \f\r"'\`<>=]|("|')|))|$)`, "g"), ae = /'/g, ce = /"/g, Pe = /^(?:script|style|textarea|title)$/i, Ss = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), X = Ss(1), M = Symbol.for("lit-noChange"), v = Symbol.for("lit-nothing"), he = /* @__PURE__ */ new WeakMap(), N = T.createTreeWalker(T, 129, null, !1);
1994
- function ke(i, t) {
1995
- if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
2025
+ const W = globalThis, ot = W.trustedTypes, ee = ot ? ot.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, be = "$lit$", C = `lit$${(Math.random() + "").slice(9)}$`, we = "?" + C, Ss = `<${we}>`, T = document, Y = () => T.createComment(""), Q = (n) => n === null || typeof n != "object" && typeof n != "function", _e = Array.isArray, Ns = (n) => _e(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", yt = `[
2026
+ \f\r]`, I = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, se = /-->/g, ie = />/g, S = RegExp(`>|${yt}(?:([^\\s"'>=/]+)(${yt}*=${yt}*(?:[^
2027
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ne = /'/g, re = /"/g, Ae = /^(?:script|style|textarea|title)$/i, Ts = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), et = Ts(1), M = Symbol.for("lit-noChange"), m = Symbol.for("lit-nothing"), oe = /* @__PURE__ */ new WeakMap(), N = T.createTreeWalker(T, 129);
2028
+ function Ee(n, t) {
2029
+ if (!Array.isArray(n) || !n.hasOwnProperty("raw"))
1996
2030
  throw Error("invalid template strings array");
1997
- return ne !== void 0 ? ne.createHTML(t) : t;
2031
+ return ee !== void 0 ? ee.createHTML(t) : t;
1998
2032
  }
1999
- const Ns = (i, t) => {
2000
- const e = i.length - 1, s = [];
2001
- let n, r = t === 2 ? "<svg>" : "", o = I;
2033
+ const Ms = (n, t) => {
2034
+ const e = n.length - 1, s = [];
2035
+ let i, r = t === 2 ? "<svg>" : "", o = I;
2002
2036
  for (let a = 0; a < e; a++) {
2003
- const h = i[a];
2004
- let c, l, d = -1, p = 0;
2005
- for (; p < h.length && (o.lastIndex = p, l = o.exec(h), l !== null); )
2006
- p = o.lastIndex, o === I ? l[1] === "!--" ? o = re : l[1] !== void 0 ? o = oe : l[2] !== void 0 ? (Pe.test(l[2]) && (n = RegExp("</" + l[2], "g")), o = S) : l[3] !== void 0 && (o = S) : o === S ? l[0] === ">" ? (o = n ?? I, d = -1) : l[1] === void 0 ? d = -2 : (d = o.lastIndex - l[2].length, c = l[1], o = l[3] === void 0 ? S : l[3] === '"' ? ce : ae) : o === ce || o === ae ? o = S : o === re || o === oe ? o = I : (o = S, n = void 0);
2007
- const u = o === S && i[a + 1].startsWith("/>") ? " " : "";
2008
- r += o === I ? h + ks : d >= 0 ? (s.push(c), h.slice(0, d) + xt + h.slice(d) + k + u) : h + k + (d === -2 ? (s.push(void 0), a) : u);
2009
- }
2010
- return [ke(i, r + (i[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
2037
+ const c = n[a];
2038
+ let l, h, p = -1, u = 0;
2039
+ for (; u < c.length && (o.lastIndex = u, h = o.exec(c), h !== null); )
2040
+ u = o.lastIndex, o === I ? h[1] === "!--" ? o = se : h[1] !== void 0 ? o = ie : h[2] !== void 0 ? (Ae.test(h[2]) && (i = RegExp("</" + h[2], "g")), o = S) : h[3] !== void 0 && (o = S) : o === S ? h[0] === ">" ? (o = i ?? I, p = -1) : h[1] === void 0 ? p = -2 : (p = o.lastIndex - h[2].length, l = h[1], o = h[3] === void 0 ? S : h[3] === '"' ? re : ne) : o === re || o === ne ? o = S : o === se || o === ie ? o = I : (o = S, i = void 0);
2041
+ const d = o === S && n[a + 1].startsWith("/>") ? " " : "";
2042
+ r += o === I ? c + Ss : p >= 0 ? (s.push(l), c.slice(0, p) + be + c.slice(p) + C + d) : c + C + (p === -2 ? a : d);
2043
+ }
2044
+ return [Ee(n, r + (n[e] || "<?>") + (t === 2 ? "</svg>" : "")), s];
2011
2045
  };
2012
- class Y {
2046
+ class Z {
2013
2047
  constructor({ strings: t, _$litType$: e }, s) {
2014
- let n;
2048
+ let i;
2015
2049
  this.parts = [];
2016
2050
  let r = 0, o = 0;
2017
- const a = t.length - 1, h = this.parts, [c, l] = Ns(t, e);
2018
- if (this.el = Y.createElement(c, s), N.currentNode = this.el.content, e === 2) {
2019
- const d = this.el.content, p = d.firstChild;
2020
- p.remove(), d.append(...p.childNodes);
2051
+ const a = t.length - 1, c = this.parts, [l, h] = Ms(t, e);
2052
+ if (this.el = Z.createElement(l, s), N.currentNode = this.el.content, e === 2) {
2053
+ const p = this.el.content.firstChild;
2054
+ p.replaceWith(...p.childNodes);
2021
2055
  }
2022
- for (; (n = N.nextNode()) !== null && h.length < a; ) {
2023
- if (n.nodeType === 1) {
2024
- if (n.hasAttributes()) {
2025
- const d = [];
2026
- for (const p of n.getAttributeNames())
2027
- if (p.endsWith(xt) || p.startsWith(k)) {
2028
- const u = l[o++];
2029
- if (d.push(p), u !== void 0) {
2030
- const y = n.getAttribute(u.toLowerCase() + xt).split(k), w = /([.?@])?(.*)/.exec(u);
2031
- h.push({ type: 1, index: r, name: w[2], strings: y, ctor: w[1] === "." ? Ms : w[1] === "?" ? Hs : w[1] === "@" ? Ls : ot });
2032
- } else
2033
- h.push({ type: 6, index: r });
2034
- }
2035
- for (const p of d)
2036
- n.removeAttribute(p);
2037
- }
2038
- if (Pe.test(n.tagName)) {
2039
- const d = n.textContent.split(k), p = d.length - 1;
2040
- if (p > 0) {
2041
- n.textContent = L ? L.emptyScript : "";
2042
- for (let u = 0; u < p; u++)
2043
- n.append(d[u], F()), N.nextNode(), h.push({ type: 2, index: ++r });
2044
- n.append(d[p], F());
2056
+ for (; (i = N.nextNode()) !== null && c.length < a; ) {
2057
+ if (i.nodeType === 1) {
2058
+ if (i.hasAttributes())
2059
+ for (const p of i.getAttributeNames())
2060
+ if (p.endsWith(be)) {
2061
+ const u = h[o++], d = i.getAttribute(p).split(C), f = /([.?@])?(.*)/.exec(u);
2062
+ c.push({ type: 1, index: r, name: f[2], strings: d, ctor: f[1] === "." ? Hs : f[1] === "?" ? Rs : f[1] === "@" ? Ls : ct }), i.removeAttribute(p);
2063
+ } else
2064
+ p.startsWith(C) && (c.push({ type: 6, index: r }), i.removeAttribute(p));
2065
+ if (Ae.test(i.tagName)) {
2066
+ const p = i.textContent.split(C), u = p.length - 1;
2067
+ if (u > 0) {
2068
+ i.textContent = ot ? ot.emptyScript : "";
2069
+ for (let d = 0; d < u; d++)
2070
+ i.append(p[d], Y()), N.nextNode(), c.push({ type: 2, index: ++r });
2071
+ i.append(p[u], Y());
2045
2072
  }
2046
2073
  }
2047
- } else if (n.nodeType === 8)
2048
- if (n.data === xe)
2049
- h.push({ type: 2, index: r });
2074
+ } else if (i.nodeType === 8)
2075
+ if (i.data === we)
2076
+ c.push({ type: 2, index: r });
2050
2077
  else {
2051
- let d = -1;
2052
- for (; (d = n.data.indexOf(k, d + 1)) !== -1; )
2053
- h.push({ type: 7, index: r }), d += k.length - 1;
2078
+ let p = -1;
2079
+ for (; (p = i.data.indexOf(C, p + 1)) !== -1; )
2080
+ c.push({ type: 7, index: r }), p += C.length - 1;
2054
2081
  }
2055
2082
  r++;
2056
2083
  }
@@ -2060,15 +2087,15 @@ class Y {
2060
2087
  return s.innerHTML = t, s;
2061
2088
  }
2062
2089
  }
2063
- function R(i, t, e = i, s) {
2064
- var n, r, o, a;
2090
+ function R(n, t, e = n, s) {
2091
+ var o, a;
2065
2092
  if (t === M)
2066
2093
  return t;
2067
- let h = s !== void 0 ? (n = e._$Co) === null || n === void 0 ? void 0 : n[s] : e._$Cl;
2068
- const c = q(t) ? void 0 : t._$litDirective$;
2069
- return (h == null ? void 0 : h.constructor) !== c && ((r = h == null ? void 0 : h._$AO) === null || r === void 0 || r.call(h, !1), c === void 0 ? h = void 0 : (h = new c(i), h._$AT(i, e, s)), s !== void 0 ? ((o = (a = e)._$Co) !== null && o !== void 0 ? o : a._$Co = [])[s] = h : e._$Cl = h), h !== void 0 && (t = R(i, h._$AS(i, t.values), h, s)), t;
2094
+ let i = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
2095
+ const r = Q(t) ? void 0 : t._$litDirective$;
2096
+ return (i == null ? void 0 : i.constructor) !== r && ((a = i == null ? void 0 : i._$AO) == null || a.call(i, !1), r === void 0 ? i = void 0 : (i = new r(n), i._$AT(n, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = R(n, i._$AS(n, t.values), i, s)), t;
2070
2097
  }
2071
- class Ts {
2098
+ class Us {
2072
2099
  constructor(t, e) {
2073
2100
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
2074
2101
  }
@@ -2079,33 +2106,31 @@ class Ts {
2079
2106
  return this._$AM._$AU;
2080
2107
  }
2081
2108
  u(t) {
2082
- var e;
2083
- const { el: { content: s }, parts: n } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : T).importNode(s, !0);
2084
- N.currentNode = r;
2085
- let o = N.nextNode(), a = 0, h = 0, c = n[0];
2109
+ const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? T).importNode(e, !0);
2110
+ N.currentNode = i;
2111
+ let r = N.nextNode(), o = 0, a = 0, c = s[0];
2086
2112
  for (; c !== void 0; ) {
2087
- if (a === c.index) {
2113
+ if (o === c.index) {
2088
2114
  let l;
2089
- c.type === 2 ? l = new Z(o, o.nextSibling, this, t) : c.type === 1 ? l = new c.ctor(o, c.name, c.strings, this, t) : c.type === 6 && (l = new Rs(o, this, t)), this._$AV.push(l), c = n[++h];
2115
+ c.type === 2 ? l = new K(r, r.nextSibling, this, t) : c.type === 1 ? l = new c.ctor(r, c.name, c.strings, this, t) : c.type === 6 && (l = new js(r, this, t)), this._$AV.push(l), c = s[++a];
2090
2116
  }
2091
- a !== (c == null ? void 0 : c.index) && (o = N.nextNode(), a++);
2117
+ o !== (c == null ? void 0 : c.index) && (r = N.nextNode(), o++);
2092
2118
  }
2093
- return N.currentNode = T, r;
2119
+ return N.currentNode = T, i;
2094
2120
  }
2095
- v(t) {
2121
+ p(t) {
2096
2122
  let e = 0;
2097
2123
  for (const s of this._$AV)
2098
2124
  s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
2099
2125
  }
2100
2126
  }
2101
- class Z {
2102
- constructor(t, e, s, n) {
2103
- var r;
2104
- this.type = 2, this._$AH = v, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = n, this._$Cp = (r = n == null ? void 0 : n.isConnected) === null || r === void 0 || r;
2105
- }
2127
+ class K {
2106
2128
  get _$AU() {
2107
- var t, e;
2108
- return (e = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && e !== void 0 ? e : this._$Cp;
2129
+ var t;
2130
+ return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
2131
+ }
2132
+ constructor(t, e, s, i) {
2133
+ this.type = 2, this._$AH = m, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
2109
2134
  }
2110
2135
  get parentNode() {
2111
2136
  let t = this._$AA.parentNode;
@@ -2119,7 +2144,7 @@ class Z {
2119
2144
  return this._$AB;
2120
2145
  }
2121
2146
  _$AI(t, e = this) {
2122
- t = R(this, t, e), q(t) ? t === v || t == null || t === "" ? (this._$AH !== v && this._$AR(), this._$AH = v) : t !== this._$AH && t !== M && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Os(t) ? this.T(t) : this._(t);
2147
+ t = R(this, t, e), Q(t) ? t === m || t == null || t === "" ? (this._$AH !== m && this._$AR(), this._$AH = m) : t !== this._$AH && t !== M && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Ns(t) ? this.T(t) : this._(t);
2123
2148
  }
2124
2149
  k(t) {
2125
2150
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -2128,103 +2153,101 @@ class Z {
2128
2153
  this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
2129
2154
  }
2130
2155
  _(t) {
2131
- this._$AH !== v && q(this._$AH) ? this._$AA.nextSibling.data = t : this.$(T.createTextNode(t)), this._$AH = t;
2156
+ this._$AH !== m && Q(this._$AH) ? this._$AA.nextSibling.data = t : this.$(T.createTextNode(t)), this._$AH = t;
2132
2157
  }
2133
2158
  g(t) {
2134
- var e;
2135
- const { values: s, _$litType$: n } = t, r = typeof n == "number" ? this._$AC(t) : (n.el === void 0 && (n.el = Y.createElement(ke(n.h, n.h[0]), this.options)), n);
2136
- if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === r)
2137
- this._$AH.v(s);
2159
+ var r;
2160
+ const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = Z.createElement(Ee(s.h, s.h[0]), this.options)), s);
2161
+ if (((r = this._$AH) == null ? void 0 : r._$AD) === i)
2162
+ this._$AH.p(e);
2138
2163
  else {
2139
- const o = new Ts(r, this), a = o.u(this.options);
2140
- o.v(s), this.$(a), this._$AH = o;
2164
+ const o = new Us(i, this), a = o.u(this.options);
2165
+ o.p(e), this.$(a), this._$AH = o;
2141
2166
  }
2142
2167
  }
2143
2168
  _$AC(t) {
2144
- let e = he.get(t.strings);
2145
- return e === void 0 && he.set(t.strings, e = new Y(t)), e;
2169
+ let e = oe.get(t.strings);
2170
+ return e === void 0 && oe.set(t.strings, e = new Z(t)), e;
2146
2171
  }
2147
2172
  T(t) {
2148
- Ce(this._$AH) || (this._$AH = [], this._$AR());
2173
+ _e(this._$AH) || (this._$AH = [], this._$AR());
2149
2174
  const e = this._$AH;
2150
- let s, n = 0;
2175
+ let s, i = 0;
2151
2176
  for (const r of t)
2152
- n === e.length ? e.push(s = new Z(this.k(F()), this.k(F()), this, this.options)) : s = e[n], s._$AI(r), n++;
2153
- n < e.length && (this._$AR(s && s._$AB.nextSibling, n), e.length = n);
2177
+ i === e.length ? e.push(s = new K(this.k(Y()), this.k(Y()), this, this.options)) : s = e[i], s._$AI(r), i++;
2178
+ i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
2154
2179
  }
2155
2180
  _$AR(t = this._$AA.nextSibling, e) {
2156
2181
  var s;
2157
- for ((s = this._$AP) === null || s === void 0 || s.call(this, !1, !0, e); t && t !== this._$AB; ) {
2158
- const n = t.nextSibling;
2159
- t.remove(), t = n;
2182
+ for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
2183
+ const i = t.nextSibling;
2184
+ t.remove(), t = i;
2160
2185
  }
2161
2186
  }
2162
2187
  setConnected(t) {
2163
2188
  var e;
2164
- this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
2189
+ this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
2165
2190
  }
2166
2191
  }
2167
- class ot {
2168
- constructor(t, e, s, n, r) {
2169
- this.type = 1, this._$AH = v, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = v;
2170
- }
2192
+ class ct {
2171
2193
  get tagName() {
2172
2194
  return this.element.tagName;
2173
2195
  }
2174
2196
  get _$AU() {
2175
2197
  return this._$AM._$AU;
2176
2198
  }
2177
- _$AI(t, e = this, s, n) {
2199
+ constructor(t, e, s, i, r) {
2200
+ this.type = 1, this._$AH = m, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = m;
2201
+ }
2202
+ _$AI(t, e = this, s, i) {
2178
2203
  const r = this.strings;
2179
2204
  let o = !1;
2180
2205
  if (r === void 0)
2181
- t = R(this, t, e, 0), o = !q(t) || t !== this._$AH && t !== M, o && (this._$AH = t);
2206
+ t = R(this, t, e, 0), o = !Q(t) || t !== this._$AH && t !== M, o && (this._$AH = t);
2182
2207
  else {
2183
2208
  const a = t;
2184
- let h, c;
2185
- for (t = r[0], h = 0; h < r.length - 1; h++)
2186
- c = R(this, a[s + h], e, h), c === M && (c = this._$AH[h]), o || (o = !q(c) || c !== this._$AH[h]), c === v ? t = v : t !== v && (t += (c ?? "") + r[h + 1]), this._$AH[h] = c;
2209
+ let c, l;
2210
+ for (t = r[0], c = 0; c < r.length - 1; c++)
2211
+ l = R(this, a[s + c], e, c), l === M && (l = this._$AH[c]), o || (o = !Q(l) || l !== this._$AH[c]), l === m ? t = m : t !== m && (t += (l ?? "") + r[c + 1]), this._$AH[c] = l;
2187
2212
  }
2188
- o && !n && this.j(t);
2213
+ o && !i && this.O(t);
2189
2214
  }
2190
- j(t) {
2191
- t === v ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
2215
+ O(t) {
2216
+ t === m ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
2192
2217
  }
2193
2218
  }
2194
- class Ms extends ot {
2219
+ class Hs extends ct {
2195
2220
  constructor() {
2196
2221
  super(...arguments), this.type = 3;
2197
2222
  }
2198
- j(t) {
2199
- this.element[this.name] = t === v ? void 0 : t;
2223
+ O(t) {
2224
+ this.element[this.name] = t === m ? void 0 : t;
2200
2225
  }
2201
2226
  }
2202
- const Us = L ? L.emptyScript : "";
2203
- class Hs extends ot {
2227
+ class Rs extends ct {
2204
2228
  constructor() {
2205
2229
  super(...arguments), this.type = 4;
2206
2230
  }
2207
- j(t) {
2208
- t && t !== v ? this.element.setAttribute(this.name, Us) : this.element.removeAttribute(this.name);
2231
+ O(t) {
2232
+ this.element.toggleAttribute(this.name, !!t && t !== m);
2209
2233
  }
2210
2234
  }
2211
- class Ls extends ot {
2212
- constructor(t, e, s, n, r) {
2213
- super(t, e, s, n, r), this.type = 5;
2235
+ class Ls extends ct {
2236
+ constructor(t, e, s, i, r) {
2237
+ super(t, e, s, i, r), this.type = 5;
2214
2238
  }
2215
2239
  _$AI(t, e = this) {
2216
- var s;
2217
- if ((t = (s = R(this, t, e, 0)) !== null && s !== void 0 ? s : v) === M)
2240
+ if ((t = R(this, t, e, 0) ?? m) === M)
2218
2241
  return;
2219
- const n = this._$AH, r = t === v && n !== v || t.capture !== n.capture || t.once !== n.once || t.passive !== n.passive, o = t !== v && (n === v || r);
2220
- r && this.element.removeEventListener(this.name, this, n), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
2242
+ const s = this._$AH, i = t === m && s !== m || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, r = t !== m && (s === m || i);
2243
+ i && this.element.removeEventListener(this.name, this, s), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
2221
2244
  }
2222
2245
  handleEvent(t) {
2223
- var e, s;
2224
- typeof this._$AH == "function" ? this._$AH.call((s = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && s !== void 0 ? s : this.element, t) : this._$AH.handleEvent(t);
2246
+ var e;
2247
+ typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
2225
2248
  }
2226
2249
  }
2227
- class Rs {
2250
+ class js {
2228
2251
  constructor(t, e, s) {
2229
2252
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
2230
2253
  }
@@ -2235,92 +2258,99 @@ class Rs {
2235
2258
  R(this, t);
2236
2259
  }
2237
2260
  }
2238
- const le = nt.litHtmlPolyfillSupport;
2239
- le == null || le(Y, Z), ((ft = nt.litHtmlVersions) !== null && ft !== void 0 ? ft : nt.litHtmlVersions = []).push("2.8.0");
2240
- const js = (i, t, e) => {
2241
- var s, n;
2242
- const r = (s = e == null ? void 0 : e.renderBefore) !== null && s !== void 0 ? s : t;
2243
- let o = r._$litPart$;
2244
- if (o === void 0) {
2245
- const a = (n = e == null ? void 0 : e.renderBefore) !== null && n !== void 0 ? n : null;
2246
- r._$litPart$ = o = new Z(t.insertBefore(F(), a), a, void 0, e ?? {});
2247
- }
2248
- return o._$AI(i), o;
2261
+ const $t = W.litHtmlPolyfillSupport;
2262
+ $t == null || $t(Z, K), (W.litHtmlVersions ?? (W.litHtmlVersions = [])).push("3.0.2");
2263
+ const zs = (n, t, e) => {
2264
+ const s = (e == null ? void 0 : e.renderBefore) ?? t;
2265
+ let i = s._$litPart$;
2266
+ if (i === void 0) {
2267
+ const r = (e == null ? void 0 : e.renderBefore) ?? null;
2268
+ s._$litPart$ = i = new K(t.insertBefore(Y(), r), r, void 0, e ?? {});
2269
+ }
2270
+ return i._$AI(n), i;
2249
2271
  };
2250
2272
  /**
2251
2273
  * @license
2252
2274
  * Copyright 2017 Google LLC
2253
2275
  * SPDX-License-Identifier: BSD-3-Clause
2254
2276
  */
2255
- var $t, bt;
2256
- class V extends U {
2277
+ class F extends U {
2257
2278
  constructor() {
2258
2279
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
2259
2280
  }
2260
2281
  createRenderRoot() {
2261
- var t, e;
2262
- const s = super.createRenderRoot();
2263
- return (t = (e = this.renderOptions).renderBefore) !== null && t !== void 0 || (e.renderBefore = s.firstChild), s;
2282
+ var e;
2283
+ const t = super.createRenderRoot();
2284
+ return (e = this.renderOptions).renderBefore ?? (e.renderBefore = t.firstChild), t;
2264
2285
  }
2265
2286
  update(t) {
2266
2287
  const e = this.render();
2267
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = js(e, this.renderRoot, this.renderOptions);
2288
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = zs(e, this.renderRoot, this.renderOptions);
2268
2289
  }
2269
2290
  connectedCallback() {
2270
2291
  var t;
2271
- super.connectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!0);
2292
+ super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);
2272
2293
  }
2273
2294
  disconnectedCallback() {
2274
2295
  var t;
2275
- super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
2296
+ super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
2276
2297
  }
2277
2298
  render() {
2278
2299
  return M;
2279
2300
  }
2280
2301
  }
2281
- V.finalized = !0, V._$litElement$ = !0, ($t = globalThis.litElementHydrateSupport) === null || $t === void 0 || $t.call(globalThis, { LitElement: V });
2282
- const de = globalThis.litElementPolyfillSupport;
2283
- de == null || de({ LitElement: V });
2284
- ((bt = globalThis.litElementVersions) !== null && bt !== void 0 ? bt : globalThis.litElementVersions = []).push("3.3.3");
2302
+ var ae;
2303
+ F._$litElement$ = !0, F.finalized = !0, (ae = globalThis.litElementHydrateSupport) == null || ae.call(globalThis, { LitElement: F });
2304
+ const bt = globalThis.litElementPolyfillSupport;
2305
+ bt == null || bt({ LitElement: F });
2306
+ (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.1");
2285
2307
  /**
2286
2308
  * @license
2287
2309
  * Copyright 2017 Google LLC
2288
2310
  * SPDX-License-Identifier: BSD-3-Clause
2289
2311
  */
2290
- const zs = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
2291
- e.createProperty(t.key, i);
2292
- } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
2293
- typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
2294
- }, finisher(e) {
2295
- e.createProperty(t.key, i);
2296
- } }, Ds = (i, t, e) => {
2297
- t.constructor.createProperty(e, i);
2312
+ const Ds = { attribute: !0, type: String, converter: rt, reflect: !1, hasChanged: Tt }, Is = (n = Ds, t, e) => {
2313
+ const { kind: s, metadata: i } = e;
2314
+ let r = globalThis.litPropertyMetadata.get(i);
2315
+ if (r === void 0 && globalThis.litPropertyMetadata.set(i, r = /* @__PURE__ */ new Map()), r.set(e.name, n), s === "accessor") {
2316
+ const { name: o } = e;
2317
+ return { set(a) {
2318
+ const c = t.get.call(this);
2319
+ t.set.call(this, a), this.requestUpdate(o, c, n);
2320
+ }, init(a) {
2321
+ return a !== void 0 && this.C(o, void 0, n), a;
2322
+ } };
2323
+ }
2324
+ if (s === "setter") {
2325
+ const { name: o } = e;
2326
+ return function(a) {
2327
+ const c = this[o];
2328
+ t.call(this, a), this.requestUpdate(o, c, n);
2329
+ };
2330
+ }
2331
+ throw Error("Unsupported decorator location: " + s);
2298
2332
  };
2299
- function Lt(i) {
2300
- return (t, e) => e !== void 0 ? Ds(i, t, e) : zs(i, t);
2333
+ function Mt(n) {
2334
+ return (t, e) => typeof e == "object" ? Is(n, t, e) : ((s, i, r) => {
2335
+ const o = i.hasOwnProperty(r);
2336
+ return i.constructor.createProperty(r, o ? { ...s, wrapped: !0 } : s), o ? Object.getOwnPropertyDescriptor(i, r) : void 0;
2337
+ })(n, t, e);
2301
2338
  }
2302
2339
  /**
2303
2340
  * @license
2304
2341
  * Copyright 2017 Google LLC
2305
2342
  * SPDX-License-Identifier: BSD-3-Clause
2306
2343
  */
2307
- function Rt(i) {
2308
- return Lt({ ...i, state: !0 });
2344
+ function Ut(n) {
2345
+ return Mt({ ...n, state: !0, attribute: !1 });
2309
2346
  }
2310
- /**
2311
- * @license
2312
- * Copyright 2021 Google LLC
2313
- * SPDX-License-Identifier: BSD-3-Clause
2314
- */
2315
- var wt;
2316
- ((wt = window.HTMLSlotElement) === null || wt === void 0 ? void 0 : wt.prototype.assignedElements) != null;
2317
2347
  /**
2318
2348
  * @license
2319
2349
  * Copyright 2017 Google LLC
2320
2350
  * SPDX-License-Identifier: BSD-3-Clause
2321
2351
  */
2322
- const Is = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Bs = (i) => (...t) => ({ _$litDirective$: i, values: t });
2323
- class Vs {
2352
+ const Bs = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Vs = (n) => (...t) => ({ _$litDirective$: n, values: t });
2353
+ class Ws {
2324
2354
  constructor(t) {
2325
2355
  }
2326
2356
  get _$AU() {
@@ -2341,45 +2371,44 @@ class Vs {
2341
2371
  * Copyright 2018 Google LLC
2342
2372
  * SPDX-License-Identifier: BSD-3-Clause
2343
2373
  */
2344
- const Ws = Bs(class extends Vs {
2345
- constructor(i) {
2374
+ const Fs = Vs(class extends Ws {
2375
+ constructor(n) {
2346
2376
  var t;
2347
- if (super(i), i.type !== Is.ATTRIBUTE || i.name !== "class" || ((t = i.strings) === null || t === void 0 ? void 0 : t.length) > 2)
2377
+ if (super(n), n.type !== Bs.ATTRIBUTE || n.name !== "class" || ((t = n.strings) == null ? void 0 : t.length) > 2)
2348
2378
  throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
2349
2379
  }
2350
- render(i) {
2351
- return " " + Object.keys(i).filter((t) => i[t]).join(" ") + " ";
2380
+ render(n) {
2381
+ return " " + Object.keys(n).filter((t) => n[t]).join(" ") + " ";
2352
2382
  }
2353
- update(i, [t]) {
2354
- var e, s;
2383
+ update(n, [t]) {
2384
+ var s, i;
2355
2385
  if (this.it === void 0) {
2356
- this.it = /* @__PURE__ */ new Set(), i.strings !== void 0 && (this.nt = new Set(i.strings.join(" ").split(/\s/).filter((r) => r !== "")));
2386
+ this.it = /* @__PURE__ */ new Set(), n.strings !== void 0 && (this.st = new Set(n.strings.join(" ").split(/\s/).filter((r) => r !== "")));
2357
2387
  for (const r in t)
2358
- t[r] && !(!((e = this.nt) === null || e === void 0) && e.has(r)) && this.it.add(r);
2388
+ t[r] && !((s = this.st) != null && s.has(r)) && this.it.add(r);
2359
2389
  return this.render(t);
2360
2390
  }
2361
- const n = i.element.classList;
2362
- this.it.forEach((r) => {
2363
- r in t || (n.remove(r), this.it.delete(r));
2364
- });
2391
+ const e = n.element.classList;
2392
+ for (const r of this.it)
2393
+ r in t || (e.remove(r), this.it.delete(r));
2365
2394
  for (const r in t) {
2366
2395
  const o = !!t[r];
2367
- o === this.it.has(r) || !((s = this.nt) === null || s === void 0) && s.has(r) || (o ? (n.add(r), this.it.add(r)) : (n.remove(r), this.it.delete(r)));
2396
+ o === this.it.has(r) || (i = this.st) != null && i.has(r) || (o ? (e.add(r), this.it.add(r)) : (e.remove(r), this.it.delete(r)));
2368
2397
  }
2369
2398
  return M;
2370
2399
  }
2371
- }), m = (i, t, e) => {
2372
- i && e.style.setProperty(t, i);
2373
- }, Fs = (i, t) => {
2374
- var e, s, n, r, o, a, h, c, l, d, p;
2375
- m((e = i.colors) == null ? void 0 : e.primary, "--primary-color", t), m((s = i.colors) == null ? void 0 : s.secondary, "--secondary-color", t), m((n = i.colors) == null ? void 0 : n.text, "--text-color", t), m((r = i.colors) == null ? void 0 : r.link, "--link-color", t), m((o = i.colors) == null ? void 0 : o.gray, "--gray-color", t), m((a = i.colors) == null ? void 0 : a.grayDark, "--gray-dark-color", t), m((h = i.spacing) == null ? void 0 : h.xs, "--spacing-xs", t), m((c = i.spacing) == null ? void 0 : c.sm, "--spacing-sm", t), m((l = i.spacing) == null ? void 0 : l.md, "--spacing-md", t), m((d = i.spacing) == null ? void 0 : d.lg, "--spacing-lg", t), m((p = i.spacing) == null ? void 0 : p.xl, "--spacing-xl", t), m(i.boxShadow, "--box-shadow", t), m(i.borderRadius, "--border-radius", t), m(i.borderRadiusSm, "--border-radius-sm", t), m(i.fontFamily, "--font-family", t);
2400
+ }), v = (n, t, e) => {
2401
+ n && e.style.setProperty(t, n);
2402
+ }, qs = (n, t) => {
2403
+ var e, s, i, r, o, a, c, l, h, p, u;
2404
+ v((e = n.colors) == null ? void 0 : e.primary, "--primary-color", t), v((s = n.colors) == null ? void 0 : s.secondary, "--secondary-color", t), v((i = n.colors) == null ? void 0 : i.text, "--text-color", t), v((r = n.colors) == null ? void 0 : r.link, "--link-color", t), v((o = n.colors) == null ? void 0 : o.gray, "--gray-color", t), v((a = n.colors) == null ? void 0 : a.grayDark, "--gray-dark-color", t), v((c = n.spacing) == null ? void 0 : c.xs, "--spacing-xs", t), v((l = n.spacing) == null ? void 0 : l.sm, "--spacing-sm", t), v((h = n.spacing) == null ? void 0 : h.md, "--spacing-md", t), v((p = n.spacing) == null ? void 0 : p.lg, "--spacing-lg", t), v((u = n.spacing) == null ? void 0 : u.xl, "--spacing-xl", t), v(n.boxShadow, "--box-shadow", t), v(n.borderRadius, "--border-radius", t), v(n.borderRadiusSm, "--border-radius-sm", t), v(n.fontFamily, "--font-family", t);
2376
2405
  };
2377
- var qs = Object.defineProperty, Ys = Object.getOwnPropertyDescriptor, K = (i, t, e, s) => {
2378
- for (var n = s > 1 ? void 0 : s ? Ys(t, e) : t, r = i.length - 1, o; r >= 0; r--)
2379
- (o = i[r]) && (n = (s ? o(t, e, n) : o(n)) || n);
2380
- return s && n && qs(t, e, n), n;
2406
+ var Ys = Object.defineProperty, Qs = Object.getOwnPropertyDescriptor, G = (n, t, e, s) => {
2407
+ for (var i = s > 1 ? void 0 : s ? Qs(t, e) : t, r = n.length - 1, o; r >= 0; r--)
2408
+ (o = n[r]) && (i = (s ? o(t, e, i) : o(i)) || i);
2409
+ return s && i && Ys(t, e, i), i;
2381
2410
  };
2382
- class z extends V {
2411
+ class j extends F {
2383
2412
  constructor() {
2384
2413
  super(...arguments), this.active = !1, this.loaded = !1;
2385
2414
  }
@@ -2392,38 +2421,38 @@ class z extends V {
2392
2421
  _applyBranding() {
2393
2422
  var s;
2394
2423
  const t = ((s = this.container) == null ? void 0 : s.get("$settings")) ?? {}, e = t == null ? void 0 : t.components[t == null ? void 0 : t.entry];
2395
- e && Fs(e.context, this);
2424
+ e && qs(e.context, this);
2396
2425
  }
2397
2426
  async _renderSymbol(t) {
2398
2427
  const e = async (s) => await import("./index-d18b6f25.mjs").then(
2399
2428
  (r) => r[s]
2400
2429
  );
2401
2430
  if (t) {
2402
- const { type: s, content: n } = t;
2431
+ const { type: s, content: i } = t;
2403
2432
  switch (s) {
2404
2433
  case "Telia": {
2405
- const r = await e(n);
2406
- return r ? X`<telia-icon
2434
+ const r = await e(i);
2435
+ return r ? et`<telia-icon
2407
2436
  class="trigger-icon"
2408
2437
  svg=${r.svg}
2409
2438
  size="lg"
2410
- ></telia-icon>` : v;
2439
+ ></telia-icon>` : m;
2411
2440
  }
2412
2441
  case "FontAwesome":
2413
- return X`<i class="trigger-fa-icon fa fa-${n}"></i>`;
2442
+ return et`<i class="trigger-fa-icon fa fa-${i}"></i>`;
2414
2443
  case "Uri":
2415
- return X`<i
2444
+ return et`<i
2416
2445
  class="trigger-custom-icon"
2417
- style="background: url(${n}) no-repeat center center;background-size: contain;"
2446
+ style="background: url(${i}) no-repeat center center;background-size: contain;"
2418
2447
  ></i>`;
2419
2448
  default:
2420
- return v;
2449
+ return m;
2421
2450
  }
2422
2451
  }
2423
2452
  }
2424
2453
  render() {
2425
- return X`<button
2426
- class=${Ws({
2454
+ return et`<button
2455
+ class=${Fs({
2427
2456
  trigger: !0,
2428
2457
  active: this.active,
2429
2458
  rendered: this.loaded
@@ -2461,8 +2490,8 @@ class z extends V {
2461
2490
  </button>`;
2462
2491
  }
2463
2492
  }
2464
- z.styles = [
2465
- xs`
2493
+ j.styles = [
2494
+ ws`
2466
2495
  :host {
2467
2496
  --voca-rem-multiplier: 0.625;
2468
2497
  display: block;
@@ -2532,41 +2561,41 @@ z.styles = [
2532
2561
  }
2533
2562
  `
2534
2563
  ];
2535
- K([
2536
- Lt({ attribute: !1 })
2537
- ], z.prototype, "symbol", 2);
2538
- K([
2539
- Lt({ attribute: !1 })
2540
- ], z.prototype, "container", 2);
2541
- K([
2542
- Rt()
2543
- ], z.prototype, "active", 2);
2544
- K([
2545
- Rt()
2546
- ], z.prototype, "loaded", 2);
2547
- K([
2548
- Rt()
2549
- ], z.prototype, "icon", 2);
2550
- const Qs = (i, t, e, s, n) => i.getAsync("componentResolver").then((r) => (r.registerComponent(t, e), ws(i, t, s || (() => {
2551
- }), t, n))), li = (i) => Qs(
2552
- i,
2564
+ G([
2565
+ Mt({ attribute: !1 })
2566
+ ], j.prototype, "symbol", 2);
2567
+ G([
2568
+ Mt({ attribute: !1 })
2569
+ ], j.prototype, "container", 2);
2570
+ G([
2571
+ Ut()
2572
+ ], j.prototype, "active", 2);
2573
+ G([
2574
+ Ut()
2575
+ ], j.prototype, "loaded", 2);
2576
+ G([
2577
+ Ut()
2578
+ ], j.prototype, "icon", 2);
2579
+ const Zs = (n, t, e, s, i) => n.getAsync("componentResolver").then((r) => (r.registerComponent(t, e), vs(n, t, s || (() => {
2580
+ }), t, i))), li = (n) => Zs(
2581
+ n,
2553
2582
  "widget-header",
2554
- import("./widget-header-e556e370.mjs"),
2583
+ import("./widget-header-52b90c8d.mjs"),
2555
2584
  (t) => {
2556
2585
  }
2557
2586
  );
2558
2587
  console.log("3");
2559
2588
  export {
2560
- v as A,
2561
- oi as E,
2562
- Nt as P,
2589
+ ai as E,
2590
+ Ct as P,
2591
+ m as T,
2563
2592
  li as W,
2564
- St as h,
2565
- xs as i,
2566
- Fs as m,
2567
- Lt as n,
2568
- bs as p,
2569
- V as s,
2570
- Rt as t,
2571
- X as x
2593
+ Pt as h,
2594
+ ws as i,
2595
+ qs as m,
2596
+ Mt as n,
2597
+ fs as p,
2598
+ Ut as r,
2599
+ F as s,
2600
+ et as x
2572
2601
  };