@telia-ace/widget-core 1.0.21-experimental.2 → 1.0.21-experimental.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,63 +1,61 @@
1
- var q = Object.defineProperty, z = Object.defineProperties;
2
- var Q = Object.getOwnPropertyDescriptors;
3
- var H = Object.getOwnPropertySymbols;
4
- var F = Object.prototype.hasOwnProperty, G = Object.prototype.propertyIsEnumerable;
5
- var C = (n, t, e) => t in n ? q(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, x = (n, t) => {
1
+ var V = Object.defineProperty, j = Object.defineProperties;
2
+ var z = Object.getOwnPropertyDescriptors;
3
+ var S = Object.getOwnPropertySymbols;
4
+ var Q = Object.prototype.hasOwnProperty, q = Object.prototype.propertyIsEnumerable;
5
+ var D = (s, t, e) => t in s ? V(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, y = (s, t) => {
6
6
  for (var e in t || (t = {}))
7
- F.call(t, e) && C(n, e, t[e]);
8
- if (H)
9
- for (var e of H(t))
10
- G.call(t, e) && C(n, e, t[e]);
11
- return n;
12
- }, B = (n, t) => z(n, Q(t));
13
- var u = (n, t, e) => (C(n, typeof t != "symbol" ? t + "" : t, e), e);
14
- import { bootstrapImplementation as K, ConfigurationApi as U } from "@webprovisions/bootstrapping";
15
- import { selectImplementations as W, createConfigurationApi as Y, Environment as J, version as X, Implementation as Z, Plugin as tt, WidgetType as et } from "@webprovisions/platform";
16
- import { uuid as k, Logger as $ } from "@telia-ace/widget-utilities";
17
- class xt {
7
+ Q.call(t, e) && D(s, e, t[e]);
8
+ if (S)
9
+ for (var e of S(t))
10
+ q.call(t, e) && D(s, e, t[e]);
11
+ return s;
12
+ }, _ = (s, t) => j(s, z(t));
13
+ import { bootstrapImplementation as F, ConfigurationApi as G } from "@webprovisions/bootstrapping";
14
+ import { selectImplementations as K, createConfigurationApi as W, version as J, Environment as U, Implementation as X, Plugin as Y, WidgetType as Z } from "@webprovisions/platform";
15
+ import { uuid as O, Logger as k } from "@telia-ace/widget-utilities";
16
+ class yt {
18
17
  constructor(t) {
19
- u(this, "events");
20
18
  const { events: e } = t.get("$widget");
21
19
  this.events = e.createChild(this);
22
20
  }
23
- action(t, e, s) {
24
- this.events.dispatch("data:action", { action: e, value: s, target: t }, { bubbles: !0 });
21
+ action(t, e, n) {
22
+ this.events.dispatch("data:action", { action: e, value: n, target: t }, { bubbles: !0 });
25
23
  }
26
24
  subscribe(t, e) {
27
25
  return this.events.subscribe(
28
26
  "data:action",
29
- (s, { action: i, value: c, target: o }) => t === o && e(t, i, c)
27
+ (n, { action: i, value: r, target: c }) => t === c && e(t, i, r)
30
28
  );
31
29
  }
32
30
  }
33
- const wt = (n, t, e = {}) => K(
34
- n,
35
- n.bindings,
31
+ const xt = (s, t, e = {}) => F(
32
+ s,
33
+ s.bindings,
36
34
  () => {
37
- const s = n.container.get("$runtimecfg").map((i) => {
38
- const c = i[0];
39
- if (typeof c == "function")
40
- return c;
41
- if (W(c)(n))
35
+ const n = s.container.get("$runtimecfg").map((i) => {
36
+ const r = i[0];
37
+ if (typeof r == "function")
38
+ return r;
39
+ if (K(r)(s))
42
40
  return i[1];
43
41
  }).filter((i) => !!i);
44
- return (t ? [t] : []).concat(s);
42
+ return (t ? [t] : []).concat(n);
45
43
  },
46
44
  e.rootElementResolver || (() => document.body)
47
- ), st = (n) => {
45
+ ), tt = (s) => {
48
46
  const t = [];
49
47
  return [
50
- (s, i) => {
51
- t.push(n.subscribe(s, i));
48
+ (n, i) => {
49
+ t.push(s.subscribe(n, i));
52
50
  },
53
51
  () => {
54
- t.forEach((s) => {
55
- s();
52
+ t.forEach((n) => {
53
+ n();
56
54
  });
57
55
  }
58
56
  ];
59
57
  };
60
- class R {
58
+ class N {
61
59
  constructor(t, e = []) {
62
60
  this.platform = t, this.rules = e;
63
61
  }
@@ -71,33 +69,30 @@ class R {
71
69
  return this.rules.push({ id: t }), this;
72
70
  }
73
71
  select() {
74
- return new nt(this.platform, this);
72
+ return new et(this.platform, this);
75
73
  }
76
74
  }
77
- class V {
78
- constructor(t, e, s) {
79
- u(this, "actions");
80
- u(this, "subscribe");
81
- u(this, "unsubscribe");
82
- this.platform = t, this.node = e, this.actions = new A(
75
+ class H {
76
+ constructor(t, e, n) {
77
+ this.platform = t, this.node = e, this.actions = new P(
83
78
  t,
84
- new R(t).withId(e.id),
85
- s
79
+ new N(t).withId(e.id),
80
+ n
86
81
  );
87
- const [i, c] = st(this.platform.events);
88
- this.subscribe = i, this.unsubscribe = c;
82
+ const [i, r] = tt(this.platform.events);
83
+ this.subscribe = i, this.unsubscribe = r;
89
84
  }
90
85
  properties(t) {
91
86
  return t && this.node.touchProperties((e) => t(e)), this.node.attributes.properties;
92
87
  }
93
88
  context(t) {
94
- return t && this.subscribe("components:context-changed", (e, { node: s }) => {
95
- s === this.node && t(this.node.attributes.context);
89
+ return t && this.subscribe("components:context-changed", (e, { node: n }) => {
90
+ n === this.node && t(this.node.attributes.context);
96
91
  }), this.node.attributes.context;
97
92
  }
98
93
  layout(t) {
99
- return t && this.subscribe("components:layout-changed", (e, { node: s }) => {
100
- s === this.node && t(this.node.attributes.layout);
94
+ return t && this.subscribe("components:layout-changed", (e, { node: n }) => {
95
+ n === this.node && t(this.node.attributes.layout);
101
96
  }), this.node.attributes.layout;
102
97
  }
103
98
  writeProperties(t, e) {
@@ -113,11 +108,9 @@ class V {
113
108
  this.unsubscribe(), this.actions.dispose();
114
109
  }
115
110
  }
116
- class nt {
117
- constructor(t, e, s = !0) {
118
- u(this, "actions");
119
- u(this, "removes", []);
120
- this.platform = t, this.target = e, this.clearOnDispose = s, this.actions = new A(this.platform, this.target);
111
+ class et {
112
+ constructor(t, e, n = !0) {
113
+ this.platform = t, this.target = e, this.clearOnDispose = n, this.removes = [], this.actions = new P(this.platform, this.target);
121
114
  }
122
115
  writeProperties(t, e) {
123
116
  this.removes.push(
@@ -155,63 +148,62 @@ class nt {
155
148
  }), this.actions.dispose();
156
149
  }
157
150
  }
158
- const it = (n, t, e) => {
159
- const s = n.concat(), i = (c, o, h) => {
160
- let l = !0;
161
- if (s.length) {
162
- const a = s.shift(), r = (p, d) => (l = !1, i(p, Object.assign({}, o, d), h));
163
- return Promise.resolve(a(c, r, h)).then((p) => B(x({}, p), {
164
- cancelled: l
151
+ const st = (s, t, e) => {
152
+ const n = s.concat(), i = (r, c, a) => {
153
+ let u = !0;
154
+ if (n.length) {
155
+ const h = n.shift(), o = (p, l) => (u = !1, i(p, Object.assign({}, c, l), a));
156
+ return Promise.resolve(h(r, o, a)).then((p) => _(y({}, p), {
157
+ cancelled: u
165
158
  }));
166
159
  }
167
- return Promise.resolve({ data: c, cancelled: !1, options: o });
160
+ return Promise.resolve({ data: r, cancelled: !1, options: c });
168
161
  };
169
162
  return i(t, {}, e);
170
163
  };
171
- class A {
172
- constructor(t, e, s) {
173
- u(this, "subscriptions", []);
174
- this.platform = t, this.target = e, this.ns = s, this.create = this.create.bind(this);
164
+ class P {
165
+ constructor(t, e, n) {
166
+ this.platform = t, this.target = e, this.ns = n, this.subscriptions = [], this.create = this.create.bind(this);
175
167
  }
176
168
  create(t, e = () => {
177
169
  }) {
178
- const s = {
170
+ const n = {
179
171
  key: t,
180
172
  fn: e,
181
173
  target: this.target,
182
174
  ns: this.ns
183
175
  };
184
- this.platform.actionsState.handlers.push(s);
176
+ this.platform.actionsState.handlers.push(n);
185
177
  const i = () => {
186
- const c = this.platform.actionsState.handlers.indexOf(s);
187
- c > -1 && this.platform.actionsState.handlers.splice(c, 1);
178
+ const r = this.platform.actionsState.handlers.indexOf(n);
179
+ r > -1 && this.platform.actionsState.handlers.splice(r, 1);
188
180
  };
189
181
  return this.subscriptions.push(i), i;
190
182
  }
191
183
  dispatch(t, e) {
192
- const s = this.platform.nodes.all.concat(
184
+ const n = this.platform.nodes.all.concat(
193
185
  this.platform.nodes.detached
194
- ), i = {}, c = this.platform.actionsState.handlers.filter(
195
- (o) => o.key === t && (!o.ns || !this.ns || o.ns === this.ns)
186
+ ), i = {}, r = this.platform.actionsState.handlers.filter(
187
+ (c) => c.key === t && (!c.ns || !this.ns || c.ns === this.ns)
196
188
  );
197
189
  return Promise.all(
198
- c.map((o) => {
199
- const h = s.filter(
200
- (a) => o.target.match(a) && this.target.match(a)
201
- ), l = this.platform.actionsState.watchers.filter((a) => a.key === t && (!a.ns || !this.ns || a.ns === this.ns) && h.some((r) => a.target.match(r))).map((a) => a.fn);
190
+ r.map((c) => {
191
+ const a = n.filter(
192
+ (h) => c.target.match(h) && this.target.match(h)
193
+ ), u = this.platform.actionsState.watchers.filter((h) => h.key === t && (!h.ns || !this.ns || h.ns === this.ns) && a.some((o) => h.target.match(o))).map((h) => h.fn);
202
194
  return Promise.all(
203
- h.map((a) => {
204
- const r = new V(
195
+ a.map((h) => {
196
+ const o = new H(
205
197
  this.platform,
206
- a,
198
+ h,
207
199
  this.ns
208
200
  );
209
- return it(l, e, r).then((p) => {
210
- const { data: d = {}, options: f, cancelled: g } = p;
201
+ return st(u, e, o).then((p) => {
202
+ const { data: l = {}, options: d, cancelled: b } = p;
211
203
  return Promise.resolve(
212
- g ? {} : o.fn(d, f, r)
213
- ).then((y) => {
214
- i[a.id] = y;
204
+ b ? {} : c.fn(l, d, o)
205
+ ).then((g) => {
206
+ i[h.id] = g;
215
207
  });
216
208
  });
217
209
  })
@@ -220,47 +212,38 @@ class A {
220
212
  ).then(() => i);
221
213
  }
222
214
  watch(t, e) {
223
- let s = t, i = this.ns;
224
- const c = t.split(".");
225
- c.length > 1 && (i = c[0], s = c.splice(1).join("."));
226
- const o = {
215
+ let n = t, i = this.ns;
216
+ const r = t.split(".");
217
+ r.length > 1 && (i = r[0], n = r.splice(1).join("."));
218
+ const c = {
227
219
  fn: e,
228
220
  target: this.target,
229
- key: s,
221
+ key: n,
230
222
  ns: i
231
223
  };
232
- this.platform.actionsState.watchers.push(o);
233
- const h = () => {
234
- const l = this.platform.actionsState.watchers.indexOf(o);
235
- l > -1 && this.platform.actionsState.watchers.splice(l, 1);
224
+ this.platform.actionsState.watchers.push(c);
225
+ const a = () => {
226
+ const u = this.platform.actionsState.watchers.indexOf(c);
227
+ u > -1 && this.platform.actionsState.watchers.splice(u, 1);
236
228
  };
237
- return this.subscriptions.push(h), h;
229
+ return this.subscriptions.push(a), a;
238
230
  }
239
231
  dispose() {
240
232
  this.subscriptions.forEach((t) => t());
241
233
  }
242
234
  }
243
- const Ct = Y((n) => {
244
- n.createCommand("components", (t) => (e) => {
245
- t.events.subscribeOnce("components:platform-created", (s, { platform: i }) => {
246
- e.handlers && e.handlers.forEach(([c, o]) => {
247
- i.addComponentHandler(c, o);
235
+ const wt = W((s) => {
236
+ s.createCommand("components", (t) => (e) => {
237
+ t.events.subscribeOnce("components:platform-created", (n, { platform: i }) => {
238
+ e.handlers && e.handlers.forEach(([r, c]) => {
239
+ i.addComponentHandler(r, c);
248
240
  });
249
241
  });
250
242
  });
251
243
  });
252
- class M {
244
+ class L {
253
245
  constructor(t, e) {
254
- u(this, "id");
255
- u(this, "type");
256
- u(this, "name");
257
- u(this, "parent");
258
- u(this, "tags", []);
259
- u(this, "children", {});
260
- u(this, "changesets", []);
261
- u(this, "attributes");
262
- u(this, "mountCount", 0);
263
- this.events = t, this.id = k(), this.type = e, this.attributes = {
246
+ this.events = t, this.tags = [], this.children = {}, this.changesets = [], this.mountCount = 0, this.id = O(), this.type = e, this.attributes = {
264
247
  context: {},
265
248
  properties: {},
266
249
  layout: {},
@@ -268,10 +251,10 @@ class M {
268
251
  }, this.writeLayout({ size: "full", indent: 0 });
269
252
  }
270
253
  mount(t, e) {
271
- let s = t.get("mounted-nodes");
272
- return s || (s = /* @__PURE__ */ new Map(), t.register("mounted-nodes", s)), s.has(this) ? (process.env.NODE_ENV !== "production" && $.error("Trying to mount an already mounted component node.", this), () => {
254
+ let n = t.get("mounted-nodes");
255
+ return n || (n = /* @__PURE__ */ new Map(), t.register("mounted-nodes", n)), n.has(this) ? (process.env.NODE_ENV !== "production" && k.error("Trying to mount an already mounted component node.", this), () => {
273
256
  }) : (this.events.dispatch("components:node-mounted", { node: this }), this.mountCount === 0 && (this.mountCount = this.mountCount + 1, this.events.dispatch("components:node-enter", { node: this })), () => {
274
- 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 });
257
+ n.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 });
275
258
  });
276
259
  }
277
260
  appendChild(t, e = "default") {
@@ -290,47 +273,47 @@ class M {
290
273
  }
291
274
  t.parent = this, this.children[e] || (this.children[e] = []), this.children[e].unshift(t), this.events.dispatch("components:node-appended", { node: t });
292
275
  }
293
- touchProperties(t, e = {}, s) {
294
- const c = [{ properties: t }, e];
295
- return this.changesets.push(c), this.events.dispatch("components:set-properties", { node: this }), () => {
296
- if (s) {
297
- const o = this.changesets.indexOf(c);
298
- o > -1 && (this.changesets.splice(o, 1), this.events.dispatch("components:set-properties", { node: this }));
276
+ touchProperties(t, e = {}, n) {
277
+ const r = [{ properties: t }, e];
278
+ return this.changesets.push(r), this.events.dispatch("components:set-properties", { node: this }), () => {
279
+ if (n) {
280
+ const c = this.changesets.indexOf(r);
281
+ c > -1 && (this.changesets.splice(c, 1), this.events.dispatch("components:set-properties", { node: this }));
299
282
  }
300
283
  };
301
284
  }
302
- writeProperties(t, e = {}, s) {
303
- const c = [{ properties: t }, e];
304
- return this.changesets.push(c), this.events.dispatch("components:set-properties", { node: this }), () => {
305
- if (s) {
306
- const o = this.changesets.indexOf(c);
307
- o > -1 && (this.changesets.splice(o, 1), this.events.dispatch("components:set-properties", { node: this }));
285
+ writeProperties(t, e = {}, n) {
286
+ const r = [{ properties: t }, e];
287
+ return this.changesets.push(r), this.events.dispatch("components:set-properties", { node: this }), () => {
288
+ if (n) {
289
+ const c = this.changesets.indexOf(r);
290
+ c > -1 && (this.changesets.splice(c, 1), this.events.dispatch("components:set-properties", { node: this }));
308
291
  }
309
292
  };
310
293
  }
311
- writeLayout(t, e = {}, s) {
312
- const c = [{ layout: t }, e];
313
- return this.changesets.push(c), this.events.dispatch("components:set-layout", { node: this }), () => {
314
- if (!s)
294
+ writeLayout(t, e = {}, n) {
295
+ const r = [{ layout: t }, e];
296
+ return this.changesets.push(r), this.events.dispatch("components:set-layout", { node: this }), () => {
297
+ if (!n)
315
298
  return;
316
- const o = this.changesets.indexOf(c);
317
- o > -1 && (this.changesets.splice(o, 1), this.events.dispatch("components:set-layout", { node: this }));
299
+ const c = this.changesets.indexOf(r);
300
+ c > -1 && (this.changesets.splice(c, 1), this.events.dispatch("components:set-layout", { node: this }));
318
301
  };
319
302
  }
320
- writeContext(t, e = {}, s) {
321
- const c = [{ context: t }, e];
322
- return this.changesets.push(c), this.events.dispatch("components:set-context", { node: this }), () => {
323
- if (!s)
303
+ writeContext(t, e = {}, n) {
304
+ const r = [{ context: t }, e];
305
+ return this.changesets.push(r), this.events.dispatch("components:set-context", { node: this }), () => {
306
+ if (!n)
324
307
  return;
325
- const o = this.changesets.indexOf(c);
326
- o > -1 && (this.changesets.splice(o, 1), this.events.dispatch("components:set-context", { node: this }));
308
+ const c = this.changesets.indexOf(r);
309
+ c > -1 && (this.changesets.splice(c, 1), this.events.dispatch("components:set-context", { node: this }));
327
310
  };
328
311
  }
329
312
  getChildren(t = "default") {
330
313
  const e = this.children[t] || [];
331
- return e.reduce((s, i, c) => {
332
- const { order: o = c } = i.attributes.layout;
333
- return s[o] ? s.splice(o, 0, i) : s[o] = i, s;
314
+ return e.reduce((n, i, r) => {
315
+ const { order: c = r } = i.attributes.layout;
316
+ return n[c] ? n.splice(c, 0, i) : n[c] = i, n;
334
317
  }, Array(e.length));
335
318
  }
336
319
  remove() {
@@ -338,60 +321,57 @@ class M {
338
321
  }
339
322
  removeChild(t) {
340
323
  Object.keys(this.children).forEach((e) => {
341
- const s = this.children[e], i = s.indexOf(t);
342
- i > -1 && (s.splice(i, 1), this.events.dispatch("components:node-removed", { node: t, parentNode: this }));
324
+ const n = this.children[e], i = n.indexOf(t);
325
+ i > -1 && (n.splice(i, 1), this.events.dispatch("components:node-removed", { node: t, parentNode: this }));
343
326
  }), delete t.parent;
344
327
  }
345
328
  }
346
- const j = (n, t, e) => {
347
- for (let s = 0, i = n.length; s < i && e(n[s]) !== !0; s++) {
348
- const c = t[n[s].id] || "default", o = n[s].getChildren(c);
349
- j(o, t, e);
329
+ const B = (s, t, e) => {
330
+ for (let n = 0, i = s.length; n < i && e(s[n]) !== !0; n++) {
331
+ const r = t[s[n].id] || "default", c = s[n].getChildren(r);
332
+ B(c, t, e);
350
333
  }
351
- }, T = (n, t, e) => {
352
- if (e(n) !== !0) {
353
- const s = t[n.id] || "default", i = n.children[s];
354
- j(i, t, e);
334
+ }, R = (s, t, e) => {
335
+ if (e(s) !== !0) {
336
+ const n = t[s.id] || "default", i = s.children[n];
337
+ B(i, t, e);
355
338
  }
356
- }, E = (n, t) => {
339
+ }, w = (s, t) => {
357
340
  const e = [];
358
- return T(n, t, (s) => {
359
- e.push(s);
341
+ return R(s, t, (n) => {
342
+ e.push(n);
360
343
  }), e;
361
- }, ot = (n, t, e) => {
362
- let s;
363
- return T(n, t, (i) => {
344
+ }, nt = (s, t, e) => {
345
+ let n;
346
+ return R(s, t, (i) => {
364
347
  if (e(i))
365
- return s = i, !0;
366
- }), s;
348
+ return n = i, !0;
349
+ }), n;
367
350
  };
368
- class rt {
369
- constructor(t, e, s) {
370
- u(this, "all", []);
371
- u(this, "visible", []);
372
- u(this, "detached", []);
373
- this.root = t, this.switches = e, s.subscribe("components:node-appended", (i, c) => {
374
- this.all.push(c.node), this.visible = E(t, e);
375
- }), s.subscribe("components:node-removed", (i, c) => {
376
- let o = this.all.indexOf(c.node);
377
- o > -1 && this.all.splice(o, 1), o = this.visible.indexOf(c.node), o > -1 && this.visible.splice(o, 1), this.visible = E(t, e);
378
- }), s.subscribe("components:node-switched", (i, c) => {
379
- this.visible = E(t, e);
351
+ class it {
352
+ constructor(t, e, n) {
353
+ this.root = t, this.switches = e, this.all = [], this.visible = [], this.detached = [], n.subscribe("components:node-appended", (i, r) => {
354
+ this.all.push(r.node), this.visible = w(t, e);
355
+ }), n.subscribe("components:node-removed", (i, r) => {
356
+ let c = this.all.indexOf(r.node);
357
+ c > -1 && this.all.splice(c, 1), c = this.visible.indexOf(r.node), c > -1 && this.visible.splice(c, 1), this.visible = w(t, e);
358
+ }), n.subscribe("components:node-switched", (i, r) => {
359
+ this.visible = w(t, e);
380
360
  });
381
361
  }
382
362
  query(t = {}) {
383
363
  const e = [];
384
- return T(this.root, this.switches, (s) => {
385
- Object.keys(t).every((c) => t[c] === s[c]) && e.push(s);
364
+ return R(this.root, this.switches, (n) => {
365
+ Object.keys(t).every((r) => t[r] === n[r]) && e.push(n);
386
366
  }), e;
387
367
  }
388
368
  get(t) {
389
- return ot(this.root, this.switches, (e) => e.id === t) || this.detached.find((e) => e.id === t);
369
+ return nt(this.root, this.switches, (e) => e.id === t) || this.detached.find((e) => e.id === t);
390
370
  }
391
371
  }
392
- class ct {
372
+ class ot {
393
373
  constructor() {
394
- u(this, "handlers", /* @__PURE__ */ new Map());
374
+ this.handlers = /* @__PURE__ */ new Map();
395
375
  }
396
376
  add(t, e) {
397
377
  this.handlers.set(t, e);
@@ -400,143 +380,134 @@ class ct {
400
380
  return this.handlers.get(t);
401
381
  }
402
382
  }
403
- const at = (n) => {
404
- let t = n, e = 0;
383
+ const rt = (s) => {
384
+ let t = s, e = 0;
405
385
  for (; t.parent; )
406
386
  e = e + 1, t = t.parent;
407
387
  return e;
408
- }, ht = (n) => n.map(([e, s]) => [at(e), e, s]).sort(([e], [s]) => e - s).map(([, e, s]) => [e, s]), O = (n) => n instanceof Date ? !1 : n && typeof n == "object" && !Array.isArray(n), v = (n, ...t) => {
388
+ }, ct = (s) => s.map(([e, n]) => [rt(e), e, n]).sort(([e], [n]) => e - n).map(([, e, n]) => [e, n]), C = (s) => s instanceof Date ? !1 : s && typeof s == "object" && !Array.isArray(s), v = (s, ...t) => {
409
389
  if (!t.length)
410
- return n;
390
+ return s;
411
391
  const e = t.shift();
412
- if (O(n) && O(e))
413
- for (const s in e)
414
- O(e[s]) ? (n[s] || Object.assign(n, { [s]: {} }), v(n[s], e[s])) : Object.assign(n, { [s]: e[s] });
415
- return v(n, ...t);
416
- }, pt = (n, t) => !n || n === "all" ? !0 : n.some((e) => t.indexOf(e) > -1), ut = (n, t) => {
417
- let e = [], s = [], i;
418
- const c = () => {
392
+ if (C(s) && C(e))
393
+ for (const n in e)
394
+ C(e[n]) ? (s[n] || Object.assign(s, { [n]: {} }), v(s[n], e[n])) : Object.assign(s, { [n]: e[n] });
395
+ return v(s, ...t);
396
+ }, ht = (s, t) => !s || s === "all" ? !0 : s.some((e) => t.indexOf(e) > -1), at = (s, t) => {
397
+ let e = [], n = [], i;
398
+ const r = () => {
419
399
  process.env.NODE_ENV !== "production" && console.time("state-processor.flush");
420
- const h = /* @__PURE__ */ new Map(), l = ht(e.map((r, p) => [r, s[p]])), a = (r, p) => {
421
- var _;
422
- const d = h.get(r) || {}, f = p.context && !d.context, g = p.properties && !d.properties, y = p.layout && !d.layout;
423
- h.set(r, {
424
- context: d.context || f,
425
- properties: d.properties || g,
426
- layout: d.layout || y
427
- }), g && (r.attributes.properties = {}), y && (r.attributes.layout = {}), f && (r.attributes.context = v({}, (_ = r.parent) == null ? void 0 : _.attributes.context));
428
- const D = [], S = [], L = [];
429
- if (r.changesets.forEach((b) => {
430
- const [m, w] = b;
431
- pt(w.breakpoints, n.breakpoints) && (g && (typeof m.properties == "function" ? D.push(
400
+ const a = /* @__PURE__ */ new Map(), u = ct(e.map((o, p) => [o, n[p]])), h = (o, p) => {
401
+ var I;
402
+ const l = a.get(o) || {}, d = p.context && !l.context, b = p.properties && !l.properties, g = p.layout && !l.layout;
403
+ a.set(o, {
404
+ context: l.context || d,
405
+ properties: l.properties || b,
406
+ layout: l.layout || g
407
+ }), b && (o.attributes.properties = {}), g && (o.attributes.layout = {}), d && (o.attributes.context = v({}, (I = o.parent) == null ? void 0 : I.attributes.context));
408
+ const $ = [], A = [], T = [];
409
+ if (o.changesets.forEach((f) => {
410
+ const [m, x] = f;
411
+ ht(x.breakpoints, s.breakpoints) && (b && (typeof m.properties == "function" ? $.push(
432
412
  m.properties
433
- ) : v(r.attributes.properties, m.properties)), y && (typeof m.layout == "function" ? S.push(m.layout) : v(r.attributes.layout, m.layout)), f && (typeof m.context == "function" ? L.push(m.context) : v(r.attributes.context, m.context)));
434
- }), D.forEach((b) => {
435
- v(r.attributes.properties, b(r.attributes.properties));
436
- }), S.forEach((b) => {
437
- v(r.attributes.layout, b(r.attributes.layout));
438
- }), L.forEach((b) => {
439
- v(r.attributes.context, b(r.attributes.context));
440
- }), f || p.recursive) {
441
- const b = n.getBranch(r), m = p.recursive ? p : {
442
- context: !!f
413
+ ) : v(o.attributes.properties, m.properties)), g && (typeof m.layout == "function" ? A.push(m.layout) : v(o.attributes.layout, m.layout)), d && (typeof m.context == "function" ? T.push(m.context) : v(o.attributes.context, m.context)));
414
+ }), $.forEach((f) => {
415
+ v(o.attributes.properties, f(o.attributes.properties));
416
+ }), A.forEach((f) => {
417
+ v(o.attributes.layout, f(o.attributes.layout));
418
+ }), T.forEach((f) => {
419
+ v(o.attributes.context, f(o.attributes.context));
420
+ }), d || p.recursive) {
421
+ const f = s.getBranch(o), m = p.recursive ? p : {
422
+ context: !!d
443
423
  };
444
- r.getChildren(b).forEach((w) => {
445
- a(w, m);
424
+ o.getChildren(f).forEach((x) => {
425
+ h(x, m);
446
426
  });
447
427
  }
448
428
  };
449
- process.env.NODE_ENV !== "production" && console.timeEnd("state-processor.flush"), l.forEach(([r, p]) => {
450
- a(r, p);
451
- }), e = [], s = [], t(h);
452
- }, o = () => {
453
- clearTimeout(i), i = setTimeout(c, 0);
429
+ process.env.NODE_ENV !== "production" && console.timeEnd("state-processor.flush"), u.forEach(([o, p]) => {
430
+ h(o, p);
431
+ }), e = [], n = [], t(a);
432
+ }, c = () => {
433
+ clearTimeout(i), i = setTimeout(r, 0);
454
434
  };
455
- return (h, l) => {
456
- const a = e.indexOf(h);
457
- if (a > -1) {
458
- const r = s[a];
459
- return l.context && (r.context = !0), l.properties && (r.properties = !0), l.layout && (r.layout = !0), l.recursive && (r.recursive = !0), o();
435
+ return (a, u) => {
436
+ const h = e.indexOf(a);
437
+ if (h > -1) {
438
+ const o = n[h];
439
+ return u.context && (o.context = !0), u.properties && (o.properties = !0), u.layout && (o.layout = !0), u.recursive && (o.recursive = !0), c();
460
440
  }
461
- return e.push(h), s.push(l), o();
441
+ return e.push(a), n.push(u), c();
462
442
  };
463
443
  };
464
- class lt {
444
+ class pt {
465
445
  constructor(t, e = {}) {
466
- u(this, "events");
467
- u(this, "breakpoints", []);
468
- u(this, "nodes");
469
- u(this, "actionsState", { handlers: [], watchers: [] });
470
- u(this, "switches", {});
471
- u(this, "changesets", []);
472
- u(this, "subscriptions", []);
473
- u(this, "processNode");
474
- u(this, "customComponentHandler", new ct());
475
- this.providers = e, this.events = t.events.createChild(this);
476
- const s = new M(this.events, "root");
477
- s.name = `root-${t.name}`, this.nodes = new rt(s, this.switches, this.events);
478
- const i = this.processNode = ut(this, (c) => {
479
- const o = Array.from(c.keys());
480
- process.env.NODE_ENV !== "production" && console.info(`STATE PROCESSOR: ${o.length} node(s) processed:
481
- ${o.map(
482
- (h) => `${h.name || "<no name>"} (${h.id})
446
+ this.providers = e, this.breakpoints = [], this.actionsState = { handlers: [], watchers: [] }, this.switches = {}, this.changesets = [], this.subscriptions = [], this.customComponentHandler = new ot(), this.events = t.events.createChild(this);
447
+ const n = new L(this.events, "root");
448
+ n.name = `root-${t.name}`, this.nodes = new it(n, this.switches, this.events);
449
+ const i = this.processNode = at(this, (r) => {
450
+ const c = Array.from(r.keys());
451
+ process.env.NODE_ENV !== "production" && console.info(`STATE PROCESSOR: ${c.length} node(s) processed:
452
+ ${c.map(
453
+ (a) => `${a.name || "<no name>"} (${a.id})
483
454
  `
484
- )}`), o.forEach((h) => {
485
- const l = c.get(h);
486
- h.parent && h.parent.type === "root" && this.events.dispatch("components:root-children-changed", { node: h }), l != null && l.context && this.events.dispatch("components:context-changed", { node: h }), l != null && l.properties && this.events.dispatch("components:properties-changed", { node: h }), l != null && l.layout && this.events.dispatch("components:layout-changed", { node: h });
455
+ )}`), c.forEach((a) => {
456
+ const u = r.get(a);
457
+ a.parent && a.parent.type === "root" && this.events.dispatch("components:root-children-changed", { node: a }), u != null && u.context && this.events.dispatch("components:context-changed", { node: a }), u != null && u.properties && this.events.dispatch("components:properties-changed", { node: a }), u != null && u.layout && this.events.dispatch("components:layout-changed", { node: a });
487
458
  }), this.events.dispatch("components:component-model-initialized", {}, { bubbles: !0 });
488
459
  });
489
460
  Promise.all(
490
- Object.keys(e).map((c) => e[c].load(this))
461
+ Object.keys(e).map((r) => e[r].load(this))
491
462
  ), this.subscriptions.push(
492
463
  this.events.subscribe(
493
464
  "components:node-appended",
494
- (c, o) => {
495
- const { node: h } = o;
496
- this.changesets.forEach((l) => {
497
- const { changeset: a, target: r, removes: p } = l, [d, f] = a;
498
- r.match(o.node) && (d.properties && p.push(h.writeProperties(d.properties, f)), d.context && p.push(h.writeContext(d.context, f)), d.layout && p.push(h.writeLayout(d.layout, f)));
465
+ (r, c) => {
466
+ const { node: a } = c;
467
+ this.changesets.forEach((u) => {
468
+ const { changeset: h, target: o, removes: p } = u, [l, d] = h;
469
+ o.match(c.node) && (l.properties && p.push(a.writeProperties(l.properties, d)), l.context && p.push(a.writeContext(l.context, d)), l.layout && p.push(a.writeLayout(l.layout, d)));
499
470
  });
500
471
  }
501
472
  )
502
473
  ), this.subscriptions.push(
503
474
  this.events.subscribe(
504
475
  "components:node-appended",
505
- (c, o) => {
506
- i(o.node, { properties: !0, context: !0 });
476
+ (r, c) => {
477
+ i(c.node, { properties: !0, context: !0 });
507
478
  }
508
479
  )
509
480
  ), this.subscriptions.push(
510
481
  this.events.subscribe(
511
482
  "components:set-properties",
512
- (c, o) => {
513
- i(o.node, { properties: !0 });
483
+ (r, c) => {
484
+ i(c.node, { properties: !0 });
514
485
  }
515
486
  )
516
487
  ), this.subscriptions.push(
517
488
  this.events.subscribe(
518
489
  "components:set-context",
519
- (c, o) => {
520
- i(o.node, { properties: !0, context: !0 });
490
+ (r, c) => {
491
+ i(c.node, { properties: !0, context: !0 });
521
492
  }
522
493
  )
523
494
  ), this.subscriptions.push(
524
495
  this.events.subscribe(
525
496
  "components:set-indent",
526
- (c, o) => {
527
- i(o.node, { layout: !0 });
497
+ (r, c) => {
498
+ i(c.node, { layout: !0 });
528
499
  }
529
500
  )
530
501
  ), this.subscriptions.push(
531
502
  this.events.subscribe(
532
503
  "components:set-layout",
533
- (c, o) => {
534
- i(o.node, { layout: !0 });
504
+ (r, c) => {
505
+ i(c.node, { layout: !0 });
535
506
  }
536
507
  )
537
508
  ), this.subscriptions.push(
538
- this.events.subscribe("components:node-switched", (c, { node: o, branch: h }) => {
539
- i(o, {
509
+ this.events.subscribe("components:node-switched", (r, { node: c, branch: a }) => {
510
+ i(c, {
540
511
  layout: !0,
541
512
  recursive: !0,
542
513
  properties: !0,
@@ -544,8 +515,8 @@ ${o.map(
544
515
  });
545
516
  })
546
517
  ), this.subscriptions.push(
547
- this.events.subscribe("components:node-removed", (c, { parentNode: o }) => {
548
- i(o, { properties: !0 });
518
+ this.events.subscribe("components:node-removed", (r, { parentNode: c }) => {
519
+ i(c, { properties: !0 });
549
520
  })
550
521
  ), this.events.parent && this.events.parent.dispatch("components:platform-created", { platform: this });
551
522
  }
@@ -576,34 +547,34 @@ ${o.map(
576
547
  return this.switches[t.id];
577
548
  }
578
549
  createNode(t, e = {}) {
579
- const s = new M(this.events, t);
580
- return e.detached && this.nodes.detached.push(s), s;
550
+ const n = new L(this.events, t);
551
+ return e.detached && this.nodes.detached.push(n), n;
581
552
  }
582
553
  components() {
583
- return new R(this);
554
+ return new N(this);
584
555
  }
585
556
  actions(t, e) {
586
- return new A(this, t, e);
557
+ return new P(this, t, e);
587
558
  }
588
559
  write(t) {
589
- const { provider: e, target: s, attributes: i, options: c = {}, removable: o } = t, h = t.key || k(), a = { changeset: [i, c], target: s, removes: [] };
560
+ const { provider: e, target: n, attributes: i, options: r = {}, removable: c } = t, a = t.key || O(), h = { changeset: [i, r], target: n, removes: [] };
590
561
  if (e) {
591
- const r = this.providers[e];
592
- r.write(h, s, i, c), a.removes.push(() => {
593
- r.remove(h);
562
+ const o = this.providers[e];
563
+ o.write(a, n, i, r), h.removes.push(() => {
564
+ o.remove(a);
594
565
  });
595
566
  }
596
- return this.changesets.push(a), this.nodes.all.forEach((r) => {
597
- if (s.match(r)) {
567
+ return this.changesets.push(h), this.nodes.all.forEach((o) => {
568
+ if (n.match(o)) {
598
569
  let p = () => {
599
570
  };
600
- i.properties && (p = r.writeProperties(i.properties, c, o)), i.context && (p = r.writeContext(i.context, c, o)), i.layout && (p = r.writeContext(i.layout, c, o)), a.removes.push(p);
571
+ i.properties && (p = o.writeProperties(i.properties, r, c)), i.context && (p = o.writeContext(i.context, r, c)), i.layout && (p = o.writeContext(i.layout, r, c)), h.removes.push(p);
601
572
  }
602
573
  }), () => {
603
- if (o) {
604
- a.removes.forEach((p) => p());
605
- const r = this.changesets.indexOf(a);
606
- r > -1 && this.changesets.splice(r, 1);
574
+ if (c) {
575
+ h.removes.forEach((p) => p());
576
+ const o = this.changesets.indexOf(h);
577
+ o > -1 && this.changesets.splice(o, 1);
607
578
  }
608
579
  };
609
580
  }
@@ -617,119 +588,113 @@ ${o.map(
617
588
  this.subscriptions.forEach((t) => t());
618
589
  }
619
590
  }
620
- const dt = (n) => {
621
- if (Array.isArray(n)) {
622
- const [t, ...e] = n;
591
+ const ut = (s) => {
592
+ if (Array.isArray(s)) {
593
+ const [t, ...e] = s;
623
594
  return {
624
595
  definitionId: t,
625
596
  overrides: e
626
597
  };
627
598
  }
628
599
  return {
629
- definitionId: n,
600
+ definitionId: s,
630
601
  overrides: []
631
602
  };
632
- }, P = (n, t, e, s, i, c) => {
633
- e.forEach((o) => {
634
- const h = dt(o), l = s[h.definitionId];
635
- if (h.definitionId === "view") {
636
- const a = n.createNode("view");
637
- a.name = "view", Object.keys(i).forEach((r) => {
638
- const p = i[r];
639
- P(n, a, [p.entry], s, i, r);
640
- }), t.appendChild(a), h.overrides.forEach((r) => {
641
- r.properties && a.writeProperties(r.properties, {
642
- breakpoints: r.breakpoints
643
- }), r.context && a.writeContext(r.context, { breakpoints: r.breakpoints }), r.layout && a.writeLayout(r.layout, { breakpoints: r.breakpoints });
603
+ }, E = (s, t, e, n, i, r) => {
604
+ e.forEach((c) => {
605
+ const a = ut(c), u = n[a.definitionId];
606
+ if (a.definitionId === "view") {
607
+ const h = s.createNode("view");
608
+ h.name = "view", Object.keys(i).forEach((o) => {
609
+ const p = i[o];
610
+ E(s, h, [p.entry], n, i, o);
611
+ }), t.appendChild(h), a.overrides.forEach((o) => {
612
+ o.properties && h.writeProperties(o.properties, {
613
+ breakpoints: o.breakpoints
614
+ }), o.context && h.writeContext(o.context, { breakpoints: o.breakpoints }), o.layout && h.writeLayout(o.layout, { breakpoints: o.breakpoints });
644
615
  });
645
- } else if (n.getComponentHandler(l.type)) {
646
- const a = n.getComponentHandler(l.type);
647
- a && a(h, {
648
- platform: n,
616
+ } else if (s.getComponentHandler(u.type)) {
617
+ const h = s.getComponentHandler(u.type);
618
+ h && h(a, {
619
+ platform: s,
649
620
  node: t,
650
621
  references: e,
651
- definitions: s,
622
+ definitions: n,
652
623
  views: i,
653
- branch: c
624
+ branch: r
654
625
  });
655
626
  } else {
656
- const a = s[h.definitionId];
657
- if (process.env.NODE_ENV !== "production" && !a) {
658
- $.error(
659
- `No definition found for component type '${h.definitionId}'.`
627
+ const h = n[a.definitionId];
628
+ if (process.env.NODE_ENV !== "production" && !h) {
629
+ k.error(
630
+ `No definition found for component type '${a.definitionId}'.`
660
631
  );
661
632
  return;
662
633
  }
663
- const r = n.createNode(a.type);
664
- r.name = h.definitionId, r.tags = a.tags || [], a.properties && r.writeProperties(a.properties), a.context && r.writeContext(a.context), a.layout && r.writeLayout(a.layout), t.appendChild(r, c), h.overrides.forEach((p) => {
665
- const d = { breakpoints: p.breakpoints };
666
- p.properties && r.writeProperties(p.properties, d), p.context && r.writeContext(p.context, d), p.layout && r.writeLayout(p.layout, d);
667
- }), a.children && P(n, r, a.children, s, i);
634
+ const o = s.createNode(h.type);
635
+ o.name = a.definitionId, o.tags = h.tags || [], h.properties && o.writeProperties(h.properties), h.context && o.writeContext(h.context), h.layout && o.writeLayout(h.layout), t.appendChild(o, r), a.overrides.forEach((p) => {
636
+ const l = { breakpoints: p.breakpoints };
637
+ p.properties && o.writeProperties(p.properties, l), p.context && o.writeContext(p.context, l), p.layout && o.writeLayout(p.layout, l);
638
+ }), h.children && E(s, o, h.children, n, i);
668
639
  }
669
640
  });
670
- }, Et = (n, t) => {
671
- const { entry: e, components: s, breakpoints: i, views: c } = t, o = [];
672
- return Object.keys(i).forEach((h) => {
673
- const l = i[h], a = window.matchMedia(l);
674
- a.matches && n.breakpoints.push(h);
675
- const r = (p) => {
676
- p.matches ? n.addBreakpoint(h) : n.removeBreakpoint(h);
641
+ }, Ct = (s, t) => {
642
+ const { entry: e, components: n, breakpoints: i, views: r } = t, c = [];
643
+ return Object.keys(i).forEach((a) => {
644
+ const u = i[a], h = window.matchMedia(u);
645
+ h.matches && s.breakpoints.push(a);
646
+ const o = (p) => {
647
+ p.matches ? s.addBreakpoint(a) : s.removeBreakpoint(a);
677
648
  };
678
- a.addListener(r), o.push(() => a.removeListener(r));
679
- }), P(n, n.nodes.root, [e], s, c), () => o.forEach((h) => {
680
- h();
649
+ h.addListener(o), c.push(() => h.removeListener(o));
650
+ }), E(s, s.nodes.root, [e], n, r), () => c.forEach((a) => {
651
+ a();
681
652
  });
682
- }, Ot = (n, t) => ({
683
- id: n.id,
684
- type: n.type,
685
- name: n.name,
653
+ }, Et = (s, t) => ({
654
+ id: s.id,
655
+ type: s.type,
656
+ name: s.name,
686
657
  branch: t || "default"
687
- }), Nt = (n, t, e, s = k(), i = {}) => n.getAsync("components").then((c) => {
688
- let o;
658
+ }), Ot = (s, t, e, n = O(), i = {}) => s.getAsync("components").then((r) => {
659
+ let c;
689
660
  if (typeof t == "string") {
690
- const a = new R(c);
691
- a.ofType(t), o = a;
661
+ const h = new N(r);
662
+ h.ofType(t), c = h;
692
663
  } else
693
- o = t;
694
- const h = {}, l = (a) => {
695
- const r = h[a.id];
696
- return r ? Promise.resolve(r.controller) : lt.getInstance(n).then((p) => new V(p, a, s));
664
+ c = t;
665
+ const a = {}, u = (h) => {
666
+ const o = a[h.id];
667
+ return o ? Promise.resolve(o.controller) : pt.getInstance(s).then((p) => new H(p, h, n));
697
668
  };
698
- c.events.subscribe(
669
+ r.events.subscribe(
699
670
  "components:node-enter",
700
- (a, { node: r }) => {
701
- o.match(r) && l(r).then((p) => {
702
- Promise.resolve(e(p)).then((d) => {
703
- h[r.id] = {
704
- dispose: d,
671
+ (h, { node: o }) => {
672
+ c.match(o) && u(o).then((p) => {
673
+ Promise.resolve(e(p)).then((l) => {
674
+ a[o.id] = {
675
+ dispose: l,
705
676
  controller: p
706
677
  };
707
678
  });
708
679
  });
709
680
  }
710
- ), c.events.subscribe(
681
+ ), r.events.subscribe(
711
682
  "components:node-exit",
712
- (a, { node: r }) => {
713
- const p = h[r.id];
714
- p && (p.dispose && p.dispose(), i.reuseController || (p.controller.dispose(), delete h[r.id]));
683
+ (h, { node: o }) => {
684
+ const p = a[o.id];
685
+ p && (p.dispose && p.dispose(), i.reuseController || (p.controller.dispose(), delete a[o.id]));
715
686
  }
716
687
  );
717
688
  });
718
- class Pt {
689
+ class kt {
719
690
  constructor(t) {
720
- u(this, "aliases", /* @__PURE__ */ new Map());
721
- u(this, "components", /* @__PURE__ */ new Map());
722
- u(this, "events");
723
- u(this, "logger", new $());
691
+ this.aliases = /* @__PURE__ */ new Map(), this.components = /* @__PURE__ */ new Map(), this.logger = new k();
724
692
  const { events: e } = t.get("$widget");
725
693
  this.events = e;
726
694
  }
727
695
  getComponent(t) {
728
- const e = this.aliases.get(t), s = this.components.get(e || t) || null;
729
- return process.env.NODE_ENV !== "production" && (s || this.logger.warn(
730
- e || t,
731
- `Unable to resolve component: "${e || t}". You most likely forgot to register the required plugin for: ${e || t}.`
732
- )), s;
696
+ const e = this.aliases.get(t);
697
+ return this.components.get(e || t) || null;
733
698
  }
734
699
  registerComponent(t, e) {
735
700
  return this.components.set(t, e), this.events.dispatch("component-resolver:resolve", t), () => {
@@ -737,10 +702,10 @@ class Pt {
737
702
  };
738
703
  }
739
704
  registerResolver(t, e) {
740
- return this.events.subscribe("component-resolver:resolve", (s, i) => {
705
+ return this.events.subscribe("component-resolver:resolve", (n, i) => {
741
706
  if (i === t) {
742
- const c = this.getComponent(t);
743
- e(c);
707
+ const r = this.getComponent(t);
708
+ e(r);
744
709
  }
745
710
  });
746
711
  }
@@ -750,82 +715,81 @@ class Pt {
750
715
  };
751
716
  }
752
717
  }
753
- const ft = "39588d1", I = class extends J {
754
- constructor(t, e = []) {
755
- super(t, e, {
756
- transformPluginSettings: (s, i, c) => {
757
- const o = c.get("$settings"), h = o.plugins && i ? o.plugins[i] || {} : {};
758
- return x(x({}, h), s);
718
+ const lt = "3a5c63e", M = class extends U {
719
+ constructor(s, t = []) {
720
+ super(s, t, {
721
+ transformPluginSettings: (e, n, i) => {
722
+ const r = i.get("$settings"), c = r.plugins && n ? r.plugins[n] || {} : {};
723
+ return y(y({}, c), e);
759
724
  }
760
725
  });
761
726
  }
762
- createImplementation(t) {
763
- const e = super.createImplementation(t);
764
- return e.bindings = t.bindings, e;
727
+ createImplementation(s) {
728
+ const t = super.createImplementation(s);
729
+ return t.bindings = s.bindings, t;
765
730
  }
766
- navigate(t, e, s) {
767
- this.widgets.query(t).forEach((i) => i.invoke("navigate", { route: e, params: s }));
731
+ navigate(s, t, e) {
732
+ this.widgets.query(s).forEach((n) => n.invoke("navigate", { route: t, params: e }));
768
733
  }
769
- static create(t = {}) {
770
- const e = [U].concat(
771
- t.configurationApiExtensions || []
734
+ static create(s = {}) {
735
+ const t = [G].concat(
736
+ s.configurationApiExtensions || []
772
737
  );
773
- return new I("humany", e);
738
+ return new M("humany", t);
774
739
  }
775
- static createFromGlobal(t, e = {}) {
776
- if (this.isRuntime(t))
777
- return t.patch(e), t;
778
- const s = [], i = t && t._c;
779
- i && i.forEach((o) => s.push(o));
780
- const c = this.create(e);
781
- return c.container.register("$runtimecfg", s), c;
740
+ static createFromGlobal(s, t = {}) {
741
+ if (this.isRuntime(s))
742
+ return s.patch(t), s;
743
+ const e = [], n = s && s._c;
744
+ n && n.forEach((r) => e.push(r));
745
+ const i = this.create(t);
746
+ return i.container.register("$runtimecfg", e), i;
782
747
  }
783
- static isRuntime(t) {
784
- return !!(t && typeof t == "object" && t.container && typeof t.container.get == "function" && t.container.get("$environment") === t && t.container.owner === t);
748
+ static isRuntime(s) {
749
+ return !!(s && typeof s == "object" && s.container && typeof s.container.get == "function" && s.container.get("$environment") === s && s.container.owner === s);
785
750
  }
786
751
  };
787
- let N = I;
788
- u(N, "version", `${ft} (${X})`);
789
- class kt extends Z {
752
+ let dt = M;
753
+ dt.version = `${lt} (${J})`;
754
+ class Nt extends X {
790
755
  constructor() {
791
- super(...arguments);
792
- u(this, "bindings", []);
756
+ super(...arguments), this.bindings = [];
793
757
  }
794
758
  }
795
- class $t extends tt {
759
+ class Pt extends Y {
796
760
  constructor(t, e) {
797
761
  super(t, e);
798
762
  }
799
763
  }
800
- var mt = /* @__PURE__ */ ((n) => (n.open = "open", n.closed = "closed", n.hidden = "hidden", n))(mt || {});
801
- class Rt extends et {
764
+ var mt = /* @__PURE__ */ ((s) => (s.open = "open", s.closed = "closed", s.hidden = "hidden", s))(mt || {});
765
+ class Rt extends Z {
802
766
  constructor(t) {
803
767
  super(t);
804
768
  }
805
769
  }
806
770
  export {
807
- xt as ActionResolver,
808
- A as ActionsController,
809
- M as ComponentNode,
810
- V as ComponentNodeController,
811
- lt as ComponentPlatform,
812
- R as ComponentQuery,
813
- Pt as ComponentResolver,
814
- N as Environment,
815
- kt as Implementation,
816
- $t as Plugin,
771
+ yt as ActionResolver,
772
+ P as ActionsController,
773
+ L as ComponentNode,
774
+ H as ComponentNodeController,
775
+ pt as ComponentPlatform,
776
+ N as ComponentQuery,
777
+ kt as ComponentResolver,
778
+ dt as Environment,
779
+ Nt as Implementation,
780
+ Pt as Plugin,
817
781
  mt as WidgetRenderState,
818
782
  Rt as WidgetType,
819
- Ot as asDescriptor,
820
- wt as bootstrap,
821
- Ct as componentConfigurationApi,
822
- P as createChildren,
823
- Et as createComponentModel,
824
- st as createEventSubscriber,
825
- Nt as extendComponent,
826
- ot as findComponent,
827
- E as findVisibleComponents,
828
- T as traverseComponents,
829
- ft as version
783
+ Et as asDescriptor,
784
+ xt as bootstrap,
785
+ wt as componentConfigurationApi,
786
+ E as createChildren,
787
+ Ct as createComponentModel,
788
+ tt as createEventSubscriber,
789
+ Ot as extendComponent,
790
+ nt as findComponent,
791
+ w as findVisibleComponents,
792
+ R as traverseComponents,
793
+ lt as version
830
794
  };
831
795
  //# sourceMappingURL=index.js.map