@ixon-cdk/iframe-adapter 1.12.0-next.0 → 1.12.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +72 -45
- package/dist/index.umd.cjs +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -36,6 +36,8 @@ const c = "cdk:cmpctx:", o = {
|
|
|
36
36
|
OpenAlertDialogResult: `${c}openalertdialogresult`,
|
|
37
37
|
OpenConfirmDialog: `${c}openconfirmdialog`,
|
|
38
38
|
OpenConfirmDialogResult: `${c}openconfirmdialogresult`,
|
|
39
|
+
OpenContentDialog: `${c}opencontentdialog`,
|
|
40
|
+
OpenContentDialogResult: `${c}opencontentdialogresult`,
|
|
39
41
|
OpenFormDialog: `${c}openformdialog`,
|
|
40
42
|
OpenFormDialogResult: `${c}openformdialogresult`,
|
|
41
43
|
// VPN
|
|
@@ -47,7 +49,7 @@ const c = "cdk:cmpctx:", o = {
|
|
|
47
49
|
SetTimeRange: `${c}settimerange`,
|
|
48
50
|
TimeRangeChange: `${c}timerangechange`
|
|
49
51
|
};
|
|
50
|
-
function
|
|
52
|
+
function Ot({ iframe: t, context: e }) {
|
|
51
53
|
return window.addEventListener("message", a, !1), e.ontimerangechange = (...r) => {
|
|
52
54
|
t.contentWindow && t.contentWindow.postMessage(
|
|
53
55
|
{
|
|
@@ -227,6 +229,11 @@ function Mt({ iframe: t, context: e }) {
|
|
|
227
229
|
t.contentWindow.postMessage({ type: o.OpenConfirmDialogResult, payload: { result: i } }, "*");
|
|
228
230
|
});
|
|
229
231
|
break;
|
|
232
|
+
case o.OpenContentDialog:
|
|
233
|
+
e.openContentDialog(r.data.payload.options).then((i) => {
|
|
234
|
+
t.contentWindow.postMessage({ type: o.OpenContentDialogResult, payload: { result: i } }, "*");
|
|
235
|
+
});
|
|
236
|
+
break;
|
|
230
237
|
case o.OpenFormDialog:
|
|
231
238
|
e.openFormDialog(r.data.payload.options).then((i) => {
|
|
232
239
|
t.contentWindow.postMessage({ type: o.OpenFormDialogResult, payload: { result: i } }, "*");
|
|
@@ -280,13 +287,13 @@ var ge = "[object Null]", ye = "[object Undefined]", j = S ? S.toStringTag : voi
|
|
|
280
287
|
function fe(t) {
|
|
281
288
|
return t == null ? t === void 0 ? ye : ge : j && j in Object(t) ? ce(t) : pe(t);
|
|
282
289
|
}
|
|
283
|
-
function
|
|
290
|
+
function W(t) {
|
|
284
291
|
var e = typeof t;
|
|
285
292
|
return t != null && (e == "object" || e == "function");
|
|
286
293
|
}
|
|
287
294
|
var he = "[object AsyncFunction]", me = "[object Function]", we = "[object GeneratorFunction]", Ce = "[object Proxy]";
|
|
288
295
|
function _e(t) {
|
|
289
|
-
if (!
|
|
296
|
+
if (!W(t))
|
|
290
297
|
return !1;
|
|
291
298
|
var e = fe(t);
|
|
292
299
|
return e == me || e == we || e == he || e == Ce;
|
|
@@ -314,26 +321,26 @@ function Se(t) {
|
|
|
314
321
|
}
|
|
315
322
|
return "";
|
|
316
323
|
}
|
|
317
|
-
var
|
|
318
|
-
"^" + Ee.call(Le).replace(
|
|
324
|
+
var Oe = /[\\^$.*+?()[\]{}|]/g, $e = /^\[object .+?Constructor\]$/, Me = Function.prototype, Ie = Object.prototype, Ee = Me.toString, Le = Ie.hasOwnProperty, Te = RegExp(
|
|
325
|
+
"^" + Ee.call(Le).replace(Oe, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
319
326
|
);
|
|
320
327
|
function qe(t) {
|
|
321
|
-
if (!
|
|
328
|
+
if (!W(t) || Re(t))
|
|
322
329
|
return !1;
|
|
323
|
-
var e = _e(t) ? Te :
|
|
330
|
+
var e = _e(t) ? Te : $e;
|
|
324
331
|
return e.test(Se(t));
|
|
325
332
|
}
|
|
326
333
|
function Ae(t, e) {
|
|
327
334
|
return t == null ? void 0 : t[e];
|
|
328
335
|
}
|
|
329
|
-
function
|
|
336
|
+
function z(t, e) {
|
|
330
337
|
var n = Ae(t, e);
|
|
331
338
|
return qe(n) ? n : void 0;
|
|
332
339
|
}
|
|
333
340
|
function Ue(t, e) {
|
|
334
341
|
return t === e || t !== t && e !== e;
|
|
335
342
|
}
|
|
336
|
-
var Ne =
|
|
343
|
+
var Ne = z(Object, "create");
|
|
337
344
|
const D = Ne;
|
|
338
345
|
function je() {
|
|
339
346
|
this.__data__ = D ? D(null) : {}, this.size = 0;
|
|
@@ -351,10 +358,10 @@ function Ve(t) {
|
|
|
351
358
|
}
|
|
352
359
|
return Pe.call(e, t) ? e[t] : void 0;
|
|
353
360
|
}
|
|
354
|
-
var He = Object.prototype,
|
|
355
|
-
function
|
|
361
|
+
var He = Object.prototype, We = He.hasOwnProperty;
|
|
362
|
+
function ze(t) {
|
|
356
363
|
var e = this.__data__;
|
|
357
|
-
return D ? e[t] !== void 0 :
|
|
364
|
+
return D ? e[t] !== void 0 : We.call(e, t);
|
|
358
365
|
}
|
|
359
366
|
var Qe = "__lodash_hash_undefined__";
|
|
360
367
|
function Ge(t, e) {
|
|
@@ -371,34 +378,34 @@ function m(t) {
|
|
|
371
378
|
m.prototype.clear = je;
|
|
372
379
|
m.prototype.delete = Be;
|
|
373
380
|
m.prototype.get = Ve;
|
|
374
|
-
m.prototype.has =
|
|
381
|
+
m.prototype.has = ze;
|
|
375
382
|
m.prototype.set = Ge;
|
|
376
383
|
function Je() {
|
|
377
384
|
this.__data__ = [], this.size = 0;
|
|
378
385
|
}
|
|
379
|
-
function
|
|
386
|
+
function O(t, e) {
|
|
380
387
|
for (var n = t.length; n--; )
|
|
381
388
|
if (Ue(t[n][0], e))
|
|
382
389
|
return n;
|
|
383
390
|
return -1;
|
|
384
391
|
}
|
|
385
|
-
var Ke = Array.prototype,
|
|
386
|
-
function
|
|
387
|
-
var e = this.__data__, n =
|
|
392
|
+
var Ke = Array.prototype, Xe = Ke.splice;
|
|
393
|
+
function xe(t) {
|
|
394
|
+
var e = this.__data__, n = O(e, t);
|
|
388
395
|
if (n < 0)
|
|
389
396
|
return !1;
|
|
390
397
|
var a = e.length - 1;
|
|
391
|
-
return n == a ? e.pop() :
|
|
398
|
+
return n == a ? e.pop() : Xe.call(e, n, 1), --this.size, !0;
|
|
392
399
|
}
|
|
393
400
|
function Ye(t) {
|
|
394
|
-
var e = this.__data__, n =
|
|
401
|
+
var e = this.__data__, n = O(e, t);
|
|
395
402
|
return n < 0 ? void 0 : e[n][1];
|
|
396
403
|
}
|
|
397
404
|
function Ze(t) {
|
|
398
|
-
return
|
|
405
|
+
return O(this.__data__, t) > -1;
|
|
399
406
|
}
|
|
400
407
|
function et(t, e) {
|
|
401
|
-
var n = this.__data__, a =
|
|
408
|
+
var n = this.__data__, a = O(n, t);
|
|
402
409
|
return a < 0 ? (++this.size, n.push([t, e])) : n[a][1] = e, this;
|
|
403
410
|
}
|
|
404
411
|
function C(t) {
|
|
@@ -409,11 +416,11 @@ function C(t) {
|
|
|
409
416
|
}
|
|
410
417
|
}
|
|
411
418
|
C.prototype.clear = Je;
|
|
412
|
-
C.prototype.delete =
|
|
419
|
+
C.prototype.delete = xe;
|
|
413
420
|
C.prototype.get = Ye;
|
|
414
421
|
C.prototype.has = Ze;
|
|
415
422
|
C.prototype.set = et;
|
|
416
|
-
var tt =
|
|
423
|
+
var tt = z(q, "Map");
|
|
417
424
|
const nt = tt;
|
|
418
425
|
function at() {
|
|
419
426
|
this.size = 0, this.__data__ = {
|
|
@@ -426,22 +433,22 @@ function rt(t) {
|
|
|
426
433
|
var e = typeof t;
|
|
427
434
|
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
|
|
428
435
|
}
|
|
429
|
-
function
|
|
436
|
+
function $(t, e) {
|
|
430
437
|
var n = t.__data__;
|
|
431
438
|
return rt(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
|
|
432
439
|
}
|
|
433
440
|
function ot(t) {
|
|
434
|
-
var e =
|
|
441
|
+
var e = $(this, t).delete(t);
|
|
435
442
|
return this.size -= e ? 1 : 0, e;
|
|
436
443
|
}
|
|
437
444
|
function st(t) {
|
|
438
|
-
return
|
|
445
|
+
return $(this, t).get(t);
|
|
439
446
|
}
|
|
440
447
|
function it(t) {
|
|
441
|
-
return
|
|
448
|
+
return $(this, t).has(t);
|
|
442
449
|
}
|
|
443
450
|
function lt(t, e) {
|
|
444
|
-
var n =
|
|
451
|
+
var n = $(this, t), a = n.size;
|
|
445
452
|
return n.set(t, e), this.size += n.size == a ? 0 : 1, this;
|
|
446
453
|
}
|
|
447
454
|
function w(t) {
|
|
@@ -471,7 +478,7 @@ function A(t, e) {
|
|
|
471
478
|
}
|
|
472
479
|
A.Cache = w;
|
|
473
480
|
const dt = 2, Q = 1, G = "";
|
|
474
|
-
class
|
|
481
|
+
class M {
|
|
475
482
|
constructor(e, n, a) {
|
|
476
483
|
this.locale = e, this.queryRef = n, this.rawValue = a;
|
|
477
484
|
}
|
|
@@ -483,7 +490,7 @@ class $ {
|
|
|
483
490
|
* @param rawValue the raw value
|
|
484
491
|
*/
|
|
485
492
|
static create(e, n, a) {
|
|
486
|
-
return n.query.postAggr === "count" ? new ut(e, n, a) : new
|
|
493
|
+
return n.query.postAggr === "count" ? new ut(e, n, a) : new M(e, n, a);
|
|
487
494
|
}
|
|
488
495
|
getDecimals(e = dt) {
|
|
489
496
|
return this.decimals ?? this.queryRef.query.decimals ?? e;
|
|
@@ -527,7 +534,7 @@ class $ {
|
|
|
527
534
|
) : ((u = this.queryRef.variable) == null ? void 0 : u.type) === "float" ? n(this.rawValue, this.getDecimals(), this.getUnit(), e) : String(this.getValue());
|
|
528
535
|
}
|
|
529
536
|
}
|
|
530
|
-
class ut extends
|
|
537
|
+
class ut extends M {
|
|
531
538
|
getFactor() {
|
|
532
539
|
return this.factor ?? this.queryRef.query.factor ?? Q;
|
|
533
540
|
}
|
|
@@ -537,7 +544,7 @@ class ut extends $ {
|
|
|
537
544
|
}
|
|
538
545
|
function k(t) {
|
|
539
546
|
return t.map(({ queryRef: n, time: a, value: r }) => {
|
|
540
|
-
const s = new te(n.query, n.variable, n.tag), u =
|
|
547
|
+
const s = new te(n.query, n.variable, n.tag), u = M.create(r.locale, s, r.rawValue);
|
|
541
548
|
return {
|
|
542
549
|
queryRef: s,
|
|
543
550
|
time: a,
|
|
@@ -566,8 +573,8 @@ function pt(t, e) {
|
|
|
566
573
|
f = { ...n, ...e }, U = gt(f.root, n);
|
|
567
574
|
let a = R(t, "all", () => R(t, "two", () => R(t, "one", () => R(t, "none"))));
|
|
568
575
|
if (a) {
|
|
569
|
-
const r =
|
|
570
|
-
return r.length > 0 && (a = r[0]),
|
|
576
|
+
const r = x(Y(a, t));
|
|
577
|
+
return r.length > 0 && (a = r[0]), I(a);
|
|
571
578
|
} else
|
|
572
579
|
throw new Error("Selector was not found.");
|
|
573
580
|
}
|
|
@@ -600,7 +607,7 @@ function R(t, e, n) {
|
|
|
600
607
|
return a || (a = F(r, n)), !a && n ? n() : a;
|
|
601
608
|
}
|
|
602
609
|
function F(t, e) {
|
|
603
|
-
const n = X(
|
|
610
|
+
const n = x(X(t));
|
|
604
611
|
if (n.length > f.threshold)
|
|
605
612
|
return e ? e() : null;
|
|
606
613
|
for (let a of n)
|
|
@@ -608,7 +615,7 @@ function F(t, e) {
|
|
|
608
615
|
return a;
|
|
609
616
|
return null;
|
|
610
617
|
}
|
|
611
|
-
function
|
|
618
|
+
function I(t) {
|
|
612
619
|
let e = t[0], n = e.name;
|
|
613
620
|
for (let a = 1; a < t.length; a++) {
|
|
614
621
|
const r = t[a].level || 0;
|
|
@@ -620,7 +627,7 @@ function P(t) {
|
|
|
620
627
|
return t.map((e) => e.penalty).reduce((e, n) => e + n, 0);
|
|
621
628
|
}
|
|
622
629
|
function K(t) {
|
|
623
|
-
const e =
|
|
630
|
+
const e = I(t);
|
|
624
631
|
switch (U.querySelectorAll(e).length) {
|
|
625
632
|
case 0:
|
|
626
633
|
throw new Error(`Can't select any node with this selector: ${e}`);
|
|
@@ -690,14 +697,14 @@ function v(...t) {
|
|
|
690
697
|
function Ct(t) {
|
|
691
698
|
return t != null;
|
|
692
699
|
}
|
|
693
|
-
function*
|
|
700
|
+
function* X(t, e = []) {
|
|
694
701
|
if (t.length > 0)
|
|
695
702
|
for (let n of t[0])
|
|
696
|
-
yield*
|
|
703
|
+
yield* X(t.slice(1, t.length), e.concat(n));
|
|
697
704
|
else
|
|
698
705
|
yield e;
|
|
699
706
|
}
|
|
700
|
-
function
|
|
707
|
+
function x(t) {
|
|
701
708
|
return [...t].sort((e, n) => P(e) - P(n));
|
|
702
709
|
}
|
|
703
710
|
function* Y(t, e, n = {
|
|
@@ -711,18 +718,18 @@ function* Y(t, e, n = {
|
|
|
711
718
|
n.counter += 1;
|
|
712
719
|
const r = [...t];
|
|
713
720
|
r.splice(a, 1);
|
|
714
|
-
const s =
|
|
721
|
+
const s = I(r);
|
|
715
722
|
if (n.visited.has(s))
|
|
716
723
|
return;
|
|
717
724
|
K(r) && _t(r, e) && (yield r, n.visited.set(s, !0), yield* Y(r, e, n));
|
|
718
725
|
}
|
|
719
726
|
}
|
|
720
727
|
function _t(t, e) {
|
|
721
|
-
return U.querySelector(
|
|
728
|
+
return U.querySelector(I(t)) === e;
|
|
722
729
|
}
|
|
723
730
|
class h extends Error {
|
|
724
|
-
constructor() {
|
|
725
|
-
super(
|
|
731
|
+
constructor(e = "Method is not implemented") {
|
|
732
|
+
super(e), this.name = "NotImplementedError", this.message = e, this.stack = `NotImplementedError: ${e}`;
|
|
726
733
|
}
|
|
727
734
|
}
|
|
728
735
|
class Dt {
|
|
@@ -837,6 +844,26 @@ class Dt {
|
|
|
837
844
|
}
|
|
838
845
|
});
|
|
839
846
|
}
|
|
847
|
+
openContentDialog(e) {
|
|
848
|
+
if (typeof e.onopened == "function")
|
|
849
|
+
throw new h('The "onopened" option is not implemented');
|
|
850
|
+
if (typeof e.onclose == "function")
|
|
851
|
+
throw new h('The "onclose" option is not implemented');
|
|
852
|
+
return new Promise((n) => {
|
|
853
|
+
window.addEventListener("message", a, !1), window.parent.postMessage(
|
|
854
|
+
{
|
|
855
|
+
type: o.OpenContentDialog,
|
|
856
|
+
payload: {
|
|
857
|
+
options: e.htmlContent && typeof e.htmlContent != "string" ? { ...e, htmlContent: e.htmlContent.cloneNode(!0).outerHTML } : e
|
|
858
|
+
}
|
|
859
|
+
},
|
|
860
|
+
"*"
|
|
861
|
+
);
|
|
862
|
+
function a(r) {
|
|
863
|
+
r.source === window.parent && r.data.type === o.OpenContentDialogResult && (window.removeEventListener("message", a, !1), n(r.data.payload.result));
|
|
864
|
+
}
|
|
865
|
+
});
|
|
866
|
+
}
|
|
840
867
|
openFormDialog(e) {
|
|
841
868
|
return new Promise((n) => {
|
|
842
869
|
window.addEventListener("message", a, !1), window.parent.postMessage({ type: o.OpenFormDialog, payload: { options: e } }, "*");
|
|
@@ -1028,6 +1055,6 @@ function T(t) {
|
|
|
1028
1055
|
});
|
|
1029
1056
|
}
|
|
1030
1057
|
export {
|
|
1031
|
-
|
|
1058
|
+
Ot as connect,
|
|
1032
1059
|
T as getComponentContext
|
|
1033
1060
|
};
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(g,l){typeof exports=="object"&&typeof module<"u"?l(exports):typeof define=="function"&&define.amd?define(["exports"],l):(g=typeof globalThis<"u"?globalThis:g||self,l(g["@ixon-cdk/iframe-adapter"]={}))})(this,function(g){"use strict";var St=Object.defineProperty;var Mt=(g,l,o)=>l in g?St(g,l,{enumerable:!0,configurable:!0,writable:!0,value:o}):g[l]=o;var y=(g,l,o)=>(Mt(g,typeof l!="symbol"?l+"":l,o),o);const l="cdk:cmpctx:",o={Create:`${l}create`,Created:`${l}created`,Destroy:`${l}destroy`,BackendComponentClientCreate:`${l}bcc:create`,BackendComponentClientDestroy:`${l}bcc:destroy`,BackendComponentClientCall:`${l}bcc:call`,BackendComponentClientCallResult:`${l}bcc:callresult`,LoggingDataClientCreate:`${l}ldc:create`,LoggingDataClientDestroy:`${l}ldc:destroy`,LoggingDataClientQuery:`${l}ldc:query`,LoggingDataClientQueryResult:`${l}ldc:queryresult`,ResourceDataClientCreate:`${l}rdc:create`,ResourceDataClientDestroy:`${l}rdc:destroy`,ResourceDataClientQuery:`${l}rdc:query`,ResourceDataClientQueryResult:`${l}rdc:queryresult`,ResourceDataClientRender:`${l}rdc:render`,ResourceDataClientRenderResult:`${l}rdc:renderresult`,ResourceDataClientUpdate:`${l}rdc:update`,ResourceDataClientUpdated:`${l}rdc:updated`,OpenActionMenu:`${l}openactionmenu`,OpenActionMenuResult:`${l}openactionmenuresult`,OpenActionBottomSheet:`${l}openactionbottomsheet`,OpenActionBottomSheetResult:`${l}openactionbottomsheetresult`,OpenAlertDialog:`${l}openalertdialog`,OpenAlertDialogResult:`${l}openalertdialogresult`,OpenConfirmDialog:`${l}openconfirmdialog`,OpenConfirmDialogResult:`${l}openconfirmdialogresult`,OpenFormDialog:`${l}openformdialog`,OpenFormDialogResult:`${l}openformdialogresult`,ShowVpnStatusDetails:`${l}showvpnstatusdetails`,ToggleVpn:`${l}togglevpn`,VpnClientStatusChange:`${l}vpnclientstatuschange`,NavigateByUrl:`${l}navigatebyurl`,SetTimeRange:`${l}settimerange`,TimeRangeChange:`${l}timerangechange`};function ee({iframe:t,context:e}){return window.addEventListener("message",a,!1),e.ontimerangechange=(...r)=>{t.contentWindow&&t.contentWindow.postMessage({type:o.TimeRangeChange,payload:r},"*")},e.onvpnclientstatuschange=(...r)=>{t.contentWindow&&t.contentWindow.postMessage({type:o.VpnClientStatusChange,payload:r},"*")},{destroy(){window.removeEventListener("message",a,!1)}};function n(r){return{_apiLinkEntries:[...r._getApiLinks().entries()],appData:r.appData,componentBaseUrl:r.componentBaseUrl,destroyed:r.destroyed,mode:r.mode,inputs:r.inputs,timeRange:r.timeRange,timeRangeIsAdjustable:r.timeRangeIsAdjustable,vpnClientStatus:r.vpnClientStatus}}function a(r){if(a._clients=a._clients||new Map([]),r.source===t.contentWindow)switch(r.data.type){case o.Create:t.contentWindow.postMessage({type:o.Created,payload:n(e)},"*");break;case o.Destroy:e.destroy();break;case o.BackendComponentClientCreate:{const{clientId:i}=r.data.payload,c=e.createBackendComponentClient(i);a._clients.set(i,c);break}case o.BackendComponentClientDestroy:{const{clientId:i}=r.data.payload;a._clients.has(i)&&(a._clients.get(i).destroy(),a._clients.delete(i));break}case o.BackendComponentClientCall:{const{clientId:i,callId:c,functionName:p,functionArguments:d}=r.data.payload;let f=a._clients.get(i);f&&!f._destroyed&&f.call(p,d).then(Z=>{f&&!f.destroyed&&t.contentWindow.postMessage({type:o.BackendComponentClientCallResult,payload:{callId:c,result:Z}},"*")});break}case o.LoggingDataClientCreate:{const{clientId:i}=r.data.payload,c=e.createLoggingDataClient(i);a._clients.set(i,c);break}case o.LoggingDataClientDestroy:{const{clientId:i}=r.data.payload;a._clients.has(i)&&(a._clients.get(i).destroy(),a._clients.delete(i));break}case o.LoggingDataClientQuery:{const{clientId:i,queryId:c,query:p}=r.data.payload;let d=a._clients.get(i);d&&!d._destroyed&&d.query(p,f=>{d._destroyed||t.contentWindow.postMessage({type:o.LoggingDataClientQueryResult,payload:{queryId:c,results:f}},"*")});break}case o.ResourceDataClientCreate:{const{clientId:i}=r.data.payload,c=e.createResourceDataClient(i);a._clients.set(i,c);break}case o.ResourceDataClientDestroy:{const{clientId:i}=r.data.payload;a._clients.has(i)&&(a._clients.get(i).destroy(),a._clients.delete(i));break}case o.ResourceDataClientQuery:{const{clientId:i,queryId:c,query:p}=r.data.payload;let d=a._clients.get(i);d&&!d._destroyed&&d.query(p,f=>{d._destroyed||t.contentWindow.postMessage({type:o.ResourceDataClientQueryResult,payload:{queryId:c,results:f}},"*")});break}case o.ResourceDataClientRender:{const{clientId:i,queryId:c,query:p}=r.data.payload;let d=a._clients.get(i);d&&!d._destroyed&&d.render(p,f=>{d._destroyed||t.contentWindow.postMessage({type:o.ResourceDataClientRenderResult,payload:{queryId:c,results:f}},"*")});break}case o.ResourceDataClientUpdate:{const{clientId:i,updateId:c,update:p}=r.data.payload;let d=a._clients.get(i);d&&!d._destroyed&&d.update(p).then(()=>{d&&!d._destroyed&&t.contentWindow.postMessage({type:o.ResourceDataClientUpdated,payload:{updateId:c}},"*")});break}case o.OpenActionBottomSheet:e.openActionBottomSheet(r.data.payload.options).then(i=>{t.contentWindow.postMessage({type:o.OpenActionBottomSheetResult,payload:{result:i}},"*")});break;case o.OpenActionMenu:const s=t.contentDocument.querySelector(r.data.payload.selector),u={getBoundingClientRect:()=>{const i=t.getBoundingClientRect(),c=s.getBoundingClientRect();return{...JSON.parse(JSON.stringify(c)),top:i.top+c.top,x:i.x+c.x}}};e.openActionMenu(u,r.data.payload.options).then(i=>{t.contentWindow.postMessage({type:o.OpenActionMenuResult,payload:{result:i}},"*")});break;case o.OpenAlertDialog:e.openAlertDialog(r.data.payload.options).then(i=>{t.contentWindow.postMessage({type:o.OpenAlertDialogResult,payload:{result:i}},"*")});break;case o.OpenConfirmDialog:e.openConfirmDialog(r.data.payload.options).then(i=>{t.contentWindow.postMessage({type:o.OpenConfirmDialogResult,payload:{result:i}},"*")});break;case o.OpenFormDialog:e.openFormDialog(r.data.payload.options).then(i=>{t.contentWindow.postMessage({type:o.OpenFormDialogResult,payload:{result:i}},"*")});break;case o.ShowVpnStatusDetails:e.showVpnStatusDetails(r.data.payload.agentId);break;case o.ToggleVpn:e.toggleVpn(r.data.payload.agentId);break;case o.NavigateByUrl:e.navigateByUrl(r.data.payload.url);break;case o.SetTimeRange:e.setTimeRange(r.data.payload.timeRange);break}}}class te{constructor(e,n,a,r){this.query=e,this.variable=n,this.tag=a,this._onCancel=r,Object.freeze(this)}cancel(){this._onCancel&&this._onCancel()}}var ne=typeof global=="object"&&global&&global.Object===Object&&global;const ae=ne;var re=typeof self=="object"&&self&&self.Object===Object&&self,oe=ae||re||Function("return this")();const T=oe;var se=T.Symbol;const b=se;var j=Object.prototype,ie=j.hasOwnProperty,le=j.toString,D=b?b.toStringTag:void 0;function ce(t){var e=ie.call(t,D),n=t[D];try{t[D]=void 0;var a=!0}catch{}var r=le.call(t);return a&&(e?t[D]=n:delete t[D]),r}var de=Object.prototype,ue=de.toString;function pe(t){return ue.call(t)}var ge="[object Null]",fe="[object Undefined]",B=b?b.toStringTag:void 0;function ye(t){return t==null?t===void 0?fe:ge:B&&B in Object(t)?ce(t):pe(t)}function k(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var he="[object AsyncFunction]",me="[object Function]",we="[object GeneratorFunction]",Ce="[object Proxy]";function _e(t){if(!k(t))return!1;var e=ye(t);return e==me||e==we||e==he||e==Ce}var De=T["__core-js_shared__"];const q=De;var F=function(){var t=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Re(t){return!!F&&F in t}var be=Function.prototype,ve=be.toString;function Se(t){if(t!=null){try{return ve.call(t)}catch{}try{return t+""}catch{}}return""}var Me=/[\\^$.*+?()[\]{}|]/g,Ie=/^\[object .+?Constructor\]$/,$e=Function.prototype,Oe=Object.prototype,Ee=$e.toString,Le=Oe.hasOwnProperty,Te=RegExp("^"+Ee.call(Le).replace(Me,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qe(t){if(!k(t)||Re(t))return!1;var e=_e(t)?Te:Ie;return e.test(Se(t))}function Ae(t,e){return t==null?void 0:t[e]}function P(t,e){var n=Ae(t,e);return qe(n)?n:void 0}function Ue(t,e){return t===e||t!==t&&e!==e}var Ne=P(Object,"create");const R=Ne;function je(){this.__data__=R?R(null):{},this.size=0}function Be(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var ke="__lodash_hash_undefined__",Fe=Object.prototype,Pe=Fe.hasOwnProperty;function Ve(t){var e=this.__data__;if(R){var n=e[t];return n===ke?void 0:n}return Pe.call(e,t)?e[t]:void 0}var He=Object.prototype,ze=He.hasOwnProperty;function We(t){var e=this.__data__;return R?e[t]!==void 0:ze.call(e,t)}var Qe="__lodash_hash_undefined__";function Ge(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=R&&e===void 0?Qe:e,this}function m(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var a=t[e];this.set(a[0],a[1])}}m.prototype.clear=je,m.prototype.delete=Be,m.prototype.get=Ve,m.prototype.has=We,m.prototype.set=Ge;function Je(){this.__data__=[],this.size=0}function v(t,e){for(var n=t.length;n--;)if(Ue(t[n][0],e))return n;return-1}var xe=Array.prototype,Ke=xe.splice;function Xe(t){var e=this.__data__,n=v(e,t);if(n<0)return!1;var a=e.length-1;return n==a?e.pop():Ke.call(e,n,1),--this.size,!0}function Ye(t){var e=this.__data__,n=v(e,t);return n<0?void 0:e[n][1]}function Ze(t){return v(this.__data__,t)>-1}function et(t,e){var n=this.__data__,a=v(n,t);return a<0?(++this.size,n.push([t,e])):n[a][1]=e,this}function _(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var a=t[e];this.set(a[0],a[1])}}_.prototype.clear=Je,_.prototype.delete=Xe,_.prototype.get=Ye,_.prototype.has=Ze,_.prototype.set=et;var tt=P(T,"Map");const nt=tt;function at(){this.size=0,this.__data__={hash:new m,map:new(nt||_),string:new m}}function rt(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function S(t,e){var n=t.__data__;return rt(e)?n[typeof e=="string"?"string":"hash"]:n.map}function ot(t){var e=S(this,t).delete(t);return this.size-=e?1:0,e}function st(t){return S(this,t).get(t)}function it(t){return S(this,t).has(t)}function lt(t,e){var n=S(this,t),a=n.size;return n.set(t,e),this.size+=n.size==a?0:1,this}function w(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var a=t[e];this.set(a[0],a[1])}}w.prototype.clear=at,w.prototype.delete=ot,w.prototype.get=st,w.prototype.has=it,w.prototype.set=lt;var ct="Expected a function";function A(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(ct);var n=function(){var a=arguments,r=e?e.apply(this,a):a[0],s=n.cache;if(s.has(r))return s.get(r);var u=t.apply(this,a);return n.cache=s.set(r,u)||s,u};return n.cache=new(A.Cache||w),n}A.Cache=w;const dt=2,V=1,H="";class M{constructor(e,n,a){this.locale=e,this.queryRef=n,this.rawValue=a}static create(e,n,a){return n.query.postAggr==="count"?new ut(e,n,a):new M(e,n,a)}getDecimals(e=dt){return this.decimals??this.queryRef.query.decimals??e}getFactor(){var e,n,a;return this.factor??this.queryRef.query.factor??((n=(e=this.queryRef.tag)==null?void 0:e.variable)!=null&&n.factor?parseFloat(this.queryRef.tag.variable.factor):null)??((a=this.queryRef.variable)!=null&&a.factor?parseFloat(this.queryRef.variable.factor):null)??V}getUnit(){var e,n,a;return this.unit??this.queryRef.query.unit??((n=(e=this.queryRef.tag)==null?void 0:e.variable)==null?void 0:n.unit)??((a=this.queryRef.variable)==null?void 0:a.unit)??H}setDecimals(e){this.decimals=e}setFactor(e){this.factor=e}setUnit(e){this.unit=e}getValue(){return this.rawValue}toString(){var a,r,s,u;const e=this.locale??void 0,n=A((i,c,p,d)=>{const f={style:"decimal",minimumFractionDigits:Math.floor(c),maximumFractionDigits:Math.floor(c)};return`${new Intl.NumberFormat(d,f).format(i)}${p?" "+p:""}`});return this.rawValue===null?"":this.queryRef.query.postAggr==="count"?n(this.rawValue,this.getDecimals(0),this.unit??this.queryRef.query.unit,e):((a=this.queryRef.variable)==null?void 0:a.type)==="str"?this.rawValue:((r=this.queryRef.variable)==null?void 0:r.type)==="bool"?this.rawValue?"True":"False":((s=this.queryRef.variable)==null?void 0:s.type)==="int"?n(this.rawValue,Number.isInteger(this.getFactor())?this.getDecimals(0):this.getDecimals(),this.getUnit(),e):((u=this.queryRef.variable)==null?void 0:u.type)==="float"?n(this.rawValue,this.getDecimals(),this.getUnit(),e):String(this.getValue())}}class ut extends M{getFactor(){return this.factor??this.queryRef.query.factor??V}getUnit(){return this.unit??this.queryRef.query.unit??H}}function z(t){return t.map(({queryRef:n,time:a,value:r})=>{const s=new te(n.query,n.variable,n.tag),u=M.create(r.locale,s,r.rawValue);return{queryRef:s,time:a,value:u}})}let h,U,W;function pt(t,e){if(W=new Date,t.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if(t.tagName.toLowerCase()==="html")return"html";const n={root:document.body,idName:r=>!0,className:r=>!0,tagName:r=>!0,attr:(r,s)=>!1,seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};h={...n,...e},U=gt(h.root,n);let a=I(t,"all",()=>I(t,"two",()=>I(t,"one",()=>I(t,"none"))));if(a){const r=X(Y(a,t));return r.length>0&&(a=r[0]),$(a)}else throw new Error("Selector was not found.")}function gt(t,e){return t.nodeType===Node.DOCUMENT_NODE?t:t===e.root?t.ownerDocument:t}function I(t,e,n){let a=null,r=[],s=t,u=0;for(;s;){const i=new Date().getTime()-W.getTime();if(h.timeoutMs!==void 0&&i>h.timeoutMs)throw new Error(`Timeout: Can't find a unique selector after ${i}ms`);let c=E(ft(s))||E(...yt(s))||E(...ht(s))||E(mt(s))||[x()];const p=wt(s);if(e=="all")p&&(c=c.concat(c.filter(N).map(d=>O(d,p))));else if(e=="two")c=c.slice(0,1),p&&(c=c.concat(c.filter(N).map(d=>O(d,p))));else if(e=="one"){const[d]=c=c.slice(0,1);p&&N(d)&&(c=[O(d,p)])}else e=="none"&&(c=[x()],p&&(c=[O(c[0],p)]));for(let d of c)d.level=u;if(r.push(c),r.length>=h.seedMinLength&&(a=Q(r,n),a))break;s=s.parentElement,u++}return a||(a=Q(r,n)),!a&&n?n():a}function Q(t,e){const n=X(K(t));if(n.length>h.threshold)return e?e():null;for(let a of n)if(J(a))return a;return null}function $(t){let e=t[0],n=e.name;for(let a=1;a<t.length;a++){const r=t[a].level||0;e.level===r-1?n=`${t[a].name} > ${n}`:n=`${t[a].name} ${n}`,e=t[a]}return n}function G(t){return t.map(e=>e.penalty).reduce((e,n)=>e+n,0)}function J(t){const e=$(t);switch(U.querySelectorAll(e).length){case 0:throw new Error(`Can't select any node with this selector: ${e}`);case 1:return!0;default:return!1}}function ft(t){const e=t.getAttribute("id");return e&&h.idName(e)?{name:"#"+CSS.escape(e),penalty:0}:null}function yt(t){return Array.from(t.attributes).filter(n=>h.attr(n.name,n.value)).map(n=>({name:`[${CSS.escape(n.name)}="${CSS.escape(n.value)}"]`,penalty:.5}))}function ht(t){return Array.from(t.classList).filter(h.className).map(n=>({name:"."+CSS.escape(n),penalty:1}))}function mt(t){const e=t.tagName.toLowerCase();return h.tagName(e)?{name:e,penalty:2}:null}function x(){return{name:"*",penalty:3}}function wt(t){const e=t.parentNode;if(!e)return null;let n=e.firstChild;if(!n)return null;let a=0;for(;n&&(n.nodeType===Node.ELEMENT_NODE&&a++,n!==t);)n=n.nextSibling;return a}function O(t,e){return{name:t.name+`:nth-child(${e})`,penalty:t.penalty+1}}function N(t){return t.name!=="html"&&!t.name.startsWith("#")}function E(...t){const e=t.filter(Ct);return e.length>0?e:null}function Ct(t){return t!=null}function*K(t,e=[]){if(t.length>0)for(let n of t[0])yield*K(t.slice(1,t.length),e.concat(n));else yield e}function X(t){return[...t].sort((e,n)=>G(e)-G(n))}function*Y(t,e,n={counter:0,visited:new Map}){if(t.length>2&&t.length>h.optimizedMinLength)for(let a=1;a<t.length-1;a++){if(n.counter>h.maxNumberOfTries)return;n.counter+=1;const r=[...t];r.splice(a,1);const s=$(r);if(n.visited.has(s))return;J(r)&&_t(r,e)&&(yield r,n.visited.set(s,!0),yield*Y(r,e,n))}}function _t(t,e){return U.querySelector($(t))===e}class C extends Error{constructor(){super("Method is not implemented"),this.name="NotImplementedError",this.message="Method is not implemented",this.stack="NotImplementedError: Method is not implemented"}}class Dt{constructor(e){y(this,"ontimerangechange",null);y(this,"onvpnclientstatuschange",null);y(this,"_getApiLinks");y(this,"appData");y(this,"componentBaseUrl");y(this,"destroyed");y(this,"mode");y(this,"inputs");y(this,"inputMap");y(this,"timeRange");y(this,"timeRangeIsAdjustable");y(this,"vpnClientStatus");this._getApiLinks=()=>new Map(e._apiLinkEntries),this.appData=e.appData,this.componentBaseUrl=e.componentBaseUrl,this.destroyed=e.destroyed,this.mode=e.mode,this.inputs=e.inputs,this.inputMap=new Map(Object.entries(this.inputs)),this.timeRange=e.timeRange,this.timeRangeIsAdjustable=e.timeRangeIsAdjustable,this.vpnClientStatus=e.vpnClientStatus,this._messageHandler=this._messageHandler.bind(this),window.addEventListener("message",this._messageHandler,!1)}_messageHandler(e){if(e.source===window.parent)switch(e.data.type){case o.TimeRangeChange:this.ontimerangechange&&this.ontimerangechange(...e.data.payload);break;case o.VpnClientStatusChange:this.onvpnclientstatuschange&&this.onvpnclientstatuschange(...e.data.payload);break}}createBackendComponentClient(){const e=crypto.randomUUID();return window.parent.postMessage({type:o.BackendComponentClientCreate,payload:{clientId:e}},"*"),new Rt(e)}createLoggingDataClient(){const e=crypto.randomUUID();return window.parent.postMessage({type:o.LoggingDataClientCreate,payload:{clientId:e}},"*"),new bt(e)}createObjectStorageClient(){throw new C}createResourceDataClient(){const e=crypto.randomUUID();return window.parent.postMessage({type:o.ResourceDataClientCreate,payload:{clientId:e}},"*"),new vt(e)}createTooltip(){throw new C}destroy(){window.parent.postMessage({type:o.Destroy},"*"),window.removeEventListener("message",this._messageHandler,!1),this.destroyed=!0}getApiUrl(e,n){const a=this._getApiLinks().get(e);if(!a)throw new Error("IxApiError: entry not found");return n?Object.keys(n).sort().reduce((r,s)=>{if(r.includes(`{${s}}`))return r.replace(`{${s}}`,n[s]);const u=new URL(r);return u.searchParams.set(s,n[s]),decodeURIComponent(u.href)},a.href):a.href}navigateByUrl(e){window.parent.postMessage({type:o.NavigateByUrl,payload:{url:e}},"*")}openActionBottomSheet(e){return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:o.OpenActionBottomSheet,payload:{options:e}},"*");function a(r){r.source===window.parent&&r.data.type===o.OpenActionBottomSheetResult&&(window.removeEventListener("message",a,!1),n(r.data.payload.result))}})}openActionMenu(e,n){return new Promise(a=>{window.addEventListener("message",r,!1),window.parent.postMessage({type:o.OpenActionMenu,payload:{selector:pt(e),options:n}},"*");function r(s){s.source===window.parent&&s.data.type===o.OpenActionMenuResult&&(window.removeEventListener("message",r,!1),a(s.data.payload.result))}})}openAlertDialog(e){return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:o.OpenAlertDialog,payload:{options:e}},"*");function a(r){r.source===window.parent&&r.data.type===o.OpenAlertDialogResult&&(window.removeEventListener("message",a,!1),n(r.data.payload.result))}})}openConfirmDialog(e){return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:o.OpenConfirmDialog,payload:{options:e}},"*");function a(r){r.source===window.parent&&r.data.type===o.OpenConfirmDialogResult&&(window.removeEventListener("message",a,!1),n(r.data.payload.result))}})}openFormDialog(e){return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:o.OpenFormDialog,payload:{options:e}},"*");function a(r){r.source===window.parent&&r.data.type===o.OpenFormDialogResult&&(window.removeEventListener("message",a,!1),n(r.data.payload.result))}})}sanitizeHtml(){throw new C}saveAsFile(){throw new C}setTimeRange(e){window.parent.postMessage({type:o.SetTimeRange,payload:{timeRange:e}},"*")}showVpnStatusDetails(e){window.parent.postMessage({type:o.ShowVpnStatusDetails,payload:{agentId:e}},"*")}testVpnAccess(){throw new C}toggleVpn(e){window.parent.postMessage({type:o.ToggleVpn,payload:{agentId:e}},"*")}translate(){throw new C}}class Rt{constructor(e){this.id=e}call(e,n){return new Promise(a=>{const r=crypto.randomUUID();window.addEventListener("message",s,!1),window.parent.postMessage({type:o.BackendComponentClientCall,payload:{clientId:this.id,callId:r,functionName:e,functionArguments:n}});function s(u){u.source===window.parent&&u.data.type===o.BackendComponentClientCallResult&&u.data.payload.callId===r&&(window.removeEventListener("message",s,!1),a(u.data.payload.result))}})}destroy(){window.parent.postMessage({type:o.BackendComponentClientDestroy,payload:{clientId:this.id}},"*")}}class bt{constructor(e){this.id=e}query(e,n){const a=crypto.randomUUID();return window.addEventListener("message",r,!1),window.parent.postMessage({type:o.LoggingDataClientQuery,payload:{clientId:this.id,queryId:a,query:e}},"*"),()=>{window.removeEventListener("message",r,!1)};function r(s){if(s.source===window.parent&&s.data.type===o.LoggingDataClientQueryResult&&s.data.payload.queryId===a){const{results:u}=s.data.payload;if(e.length)if(!e.queries||e.format!=="csv"){const i=u.map(c=>z(c));n(i)}else throw new C;else{const i=z(u);n(i)}}}}destroy(){window.parent.postMessage({type:o.LoggingDataClientDestroy,payload:{clientId:this.id}},"*")}}class vt{constructor(e){this.id=e}query(e,n){const a=crypto.randomUUID();return window.addEventListener("message",r,!1),window.parent.postMessage({type:o.ResourceDataClientQuery,payload:{clientId:this.id,queryId:a,query:e}},"*"),()=>{window.removeEventListener("message",r,!1)};function r(s){s.source===window.parent&&s.data.type===o.ResourceDataClientQueryResult&&s.data.payload.queryId===a&&n(s.data.payload.results)}}update(e){return new Promise(n=>{const a=crypto.randomUUID();window.addEventListener("message",r,!1),window.parent.postMessage({type:o.ResourceDataClientUpdate,payload:{clientId:this.id,updateId:a,update:e}},"*");function r(s){s.source===window.parent&&s.data.type===o.ResourceDataClientUpdated&&s.data.payload.updateId===a&&(window.removeEventListener("message",r,!1),n())}})}render(e,n){const a=crypto.randomUUID();return window.addEventListener("message",r,!1),window.parent.postMessage({type:o.ResourceDataClientRender,payload:{clientId:this.id,queryId:a,query:e}},"*"),()=>{window.removeEventListener("message",r,!1)};function r(s){s.source===window.parent&&s.data.type===o.ResourceDataClientRenderResult&&s.data.payload.queryId===a&&n(s.data.payload.results)}}destroy(){window.parent.postMessage({type:o.ResourceDataClientDestroy,payload:{clientId:this.id}},"*")}}function L(t){const e=!!(t&&t.migrateInputs);return!e&&L.__cache__?Promise.resolve(L.__cache__):new Promise(n=>{window.addEventListener("message",function a(r){if(r.source===window.parent&&r.data&&r.data.type===o.Created){let s=r.data.payload;e&&(s.inputs=t.migrateInputs(s.inputs,null));const u=new Dt(s);n(u),e||(L.__cache__=u),window.removeEventListener("message",a,!1)}},!1),window.parent.postMessage({type:o.Create},"*")})}g.connect=ee,g.getComponentContext=L,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(g,l){typeof exports=="object"&&typeof module<"u"?l(exports):typeof define=="function"&&define.amd?define(["exports"],l):(g=typeof globalThis<"u"?globalThis:g||self,l(g["@ixon-cdk/iframe-adapter"]={}))})(this,function(g){"use strict";var St=Object.defineProperty;var Ot=(g,l,r)=>l in g?St(g,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):g[l]=r;var y=(g,l,r)=>(Ot(g,typeof l!="symbol"?l+"":l,r),r);const l="cdk:cmpctx:",r={Create:`${l}create`,Created:`${l}created`,Destroy:`${l}destroy`,BackendComponentClientCreate:`${l}bcc:create`,BackendComponentClientDestroy:`${l}bcc:destroy`,BackendComponentClientCall:`${l}bcc:call`,BackendComponentClientCallResult:`${l}bcc:callresult`,LoggingDataClientCreate:`${l}ldc:create`,LoggingDataClientDestroy:`${l}ldc:destroy`,LoggingDataClientQuery:`${l}ldc:query`,LoggingDataClientQueryResult:`${l}ldc:queryresult`,ResourceDataClientCreate:`${l}rdc:create`,ResourceDataClientDestroy:`${l}rdc:destroy`,ResourceDataClientQuery:`${l}rdc:query`,ResourceDataClientQueryResult:`${l}rdc:queryresult`,ResourceDataClientRender:`${l}rdc:render`,ResourceDataClientRenderResult:`${l}rdc:renderresult`,ResourceDataClientUpdate:`${l}rdc:update`,ResourceDataClientUpdated:`${l}rdc:updated`,OpenActionMenu:`${l}openactionmenu`,OpenActionMenuResult:`${l}openactionmenuresult`,OpenActionBottomSheet:`${l}openactionbottomsheet`,OpenActionBottomSheetResult:`${l}openactionbottomsheetresult`,OpenAlertDialog:`${l}openalertdialog`,OpenAlertDialogResult:`${l}openalertdialogresult`,OpenConfirmDialog:`${l}openconfirmdialog`,OpenConfirmDialogResult:`${l}openconfirmdialogresult`,OpenContentDialog:`${l}opencontentdialog`,OpenContentDialogResult:`${l}opencontentdialogresult`,OpenFormDialog:`${l}openformdialog`,OpenFormDialogResult:`${l}openformdialogresult`,ShowVpnStatusDetails:`${l}showvpnstatusdetails`,ToggleVpn:`${l}togglevpn`,VpnClientStatusChange:`${l}vpnclientstatuschange`,NavigateByUrl:`${l}navigatebyurl`,SetTimeRange:`${l}settimerange`,TimeRangeChange:`${l}timerangechange`};function ee({iframe:t,context:e}){return window.addEventListener("message",a,!1),e.ontimerangechange=(...o)=>{t.contentWindow&&t.contentWindow.postMessage({type:r.TimeRangeChange,payload:o},"*")},e.onvpnclientstatuschange=(...o)=>{t.contentWindow&&t.contentWindow.postMessage({type:r.VpnClientStatusChange,payload:o},"*")},{destroy(){window.removeEventListener("message",a,!1)}};function n(o){return{_apiLinkEntries:[...o._getApiLinks().entries()],appData:o.appData,componentBaseUrl:o.componentBaseUrl,destroyed:o.destroyed,mode:o.mode,inputs:o.inputs,timeRange:o.timeRange,timeRangeIsAdjustable:o.timeRangeIsAdjustable,vpnClientStatus:o.vpnClientStatus}}function a(o){if(a._clients=a._clients||new Map([]),o.source===t.contentWindow)switch(o.data.type){case r.Create:t.contentWindow.postMessage({type:r.Created,payload:n(e)},"*");break;case r.Destroy:e.destroy();break;case r.BackendComponentClientCreate:{const{clientId:i}=o.data.payload,d=e.createBackendComponentClient(i);a._clients.set(i,d);break}case r.BackendComponentClientDestroy:{const{clientId:i}=o.data.payload;a._clients.has(i)&&(a._clients.get(i).destroy(),a._clients.delete(i));break}case r.BackendComponentClientCall:{const{clientId:i,callId:d,functionName:p,functionArguments:c}=o.data.payload;let f=a._clients.get(i);f&&!f._destroyed&&f.call(p,c).then(Z=>{f&&!f.destroyed&&t.contentWindow.postMessage({type:r.BackendComponentClientCallResult,payload:{callId:d,result:Z}},"*")});break}case r.LoggingDataClientCreate:{const{clientId:i}=o.data.payload,d=e.createLoggingDataClient(i);a._clients.set(i,d);break}case r.LoggingDataClientDestroy:{const{clientId:i}=o.data.payload;a._clients.has(i)&&(a._clients.get(i).destroy(),a._clients.delete(i));break}case r.LoggingDataClientQuery:{const{clientId:i,queryId:d,query:p}=o.data.payload;let c=a._clients.get(i);c&&!c._destroyed&&c.query(p,f=>{c._destroyed||t.contentWindow.postMessage({type:r.LoggingDataClientQueryResult,payload:{queryId:d,results:f}},"*")});break}case r.ResourceDataClientCreate:{const{clientId:i}=o.data.payload,d=e.createResourceDataClient(i);a._clients.set(i,d);break}case r.ResourceDataClientDestroy:{const{clientId:i}=o.data.payload;a._clients.has(i)&&(a._clients.get(i).destroy(),a._clients.delete(i));break}case r.ResourceDataClientQuery:{const{clientId:i,queryId:d,query:p}=o.data.payload;let c=a._clients.get(i);c&&!c._destroyed&&c.query(p,f=>{c._destroyed||t.contentWindow.postMessage({type:r.ResourceDataClientQueryResult,payload:{queryId:d,results:f}},"*")});break}case r.ResourceDataClientRender:{const{clientId:i,queryId:d,query:p}=o.data.payload;let c=a._clients.get(i);c&&!c._destroyed&&c.render(p,f=>{c._destroyed||t.contentWindow.postMessage({type:r.ResourceDataClientRenderResult,payload:{queryId:d,results:f}},"*")});break}case r.ResourceDataClientUpdate:{const{clientId:i,updateId:d,update:p}=o.data.payload;let c=a._clients.get(i);c&&!c._destroyed&&c.update(p).then(()=>{c&&!c._destroyed&&t.contentWindow.postMessage({type:r.ResourceDataClientUpdated,payload:{updateId:d}},"*")});break}case r.OpenActionBottomSheet:e.openActionBottomSheet(o.data.payload.options).then(i=>{t.contentWindow.postMessage({type:r.OpenActionBottomSheetResult,payload:{result:i}},"*")});break;case r.OpenActionMenu:const s=t.contentDocument.querySelector(o.data.payload.selector),u={getBoundingClientRect:()=>{const i=t.getBoundingClientRect(),d=s.getBoundingClientRect();return{...JSON.parse(JSON.stringify(d)),top:i.top+d.top,x:i.x+d.x}}};e.openActionMenu(u,o.data.payload.options).then(i=>{t.contentWindow.postMessage({type:r.OpenActionMenuResult,payload:{result:i}},"*")});break;case r.OpenAlertDialog:e.openAlertDialog(o.data.payload.options).then(i=>{t.contentWindow.postMessage({type:r.OpenAlertDialogResult,payload:{result:i}},"*")});break;case r.OpenConfirmDialog:e.openConfirmDialog(o.data.payload.options).then(i=>{t.contentWindow.postMessage({type:r.OpenConfirmDialogResult,payload:{result:i}},"*")});break;case r.OpenContentDialog:e.openContentDialog(o.data.payload.options).then(i=>{t.contentWindow.postMessage({type:r.OpenContentDialogResult,payload:{result:i}},"*")});break;case r.OpenFormDialog:e.openFormDialog(o.data.payload.options).then(i=>{t.contentWindow.postMessage({type:r.OpenFormDialogResult,payload:{result:i}},"*")});break;case r.ShowVpnStatusDetails:e.showVpnStatusDetails(o.data.payload.agentId);break;case r.ToggleVpn:e.toggleVpn(o.data.payload.agentId);break;case r.NavigateByUrl:e.navigateByUrl(o.data.payload.url);break;case r.SetTimeRange:e.setTimeRange(o.data.payload.timeRange);break}}}class te{constructor(e,n,a,o){this.query=e,this.variable=n,this.tag=a,this._onCancel=o,Object.freeze(this)}cancel(){this._onCancel&&this._onCancel()}}var ne=typeof global=="object"&&global&&global.Object===Object&&global;const ae=ne;var oe=typeof self=="object"&&self&&self.Object===Object&&self,re=ae||oe||Function("return this")();const T=re;var se=T.Symbol;const b=se;var j=Object.prototype,ie=j.hasOwnProperty,le=j.toString,D=b?b.toStringTag:void 0;function de(t){var e=ie.call(t,D),n=t[D];try{t[D]=void 0;var a=!0}catch{}var o=le.call(t);return a&&(e?t[D]=n:delete t[D]),o}var ce=Object.prototype,ue=ce.toString;function pe(t){return ue.call(t)}var ge="[object Null]",fe="[object Undefined]",k=b?b.toStringTag:void 0;function ye(t){return t==null?t===void 0?fe:ge:k&&k in Object(t)?de(t):pe(t)}function B(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var he="[object AsyncFunction]",me="[object Function]",we="[object GeneratorFunction]",Ce="[object Proxy]";function _e(t){if(!B(t))return!1;var e=ye(t);return e==me||e==we||e==he||e==Ce}var De=T["__core-js_shared__"];const q=De;var F=function(){var t=/[^.]+$/.exec(q&&q.keys&&q.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Re(t){return!!F&&F in t}var be=Function.prototype,ve=be.toString;function Se(t){if(t!=null){try{return ve.call(t)}catch{}try{return t+""}catch{}}return""}var Oe=/[\\^$.*+?()[\]{}|]/g,Me=/^\[object .+?Constructor\]$/,$e=Function.prototype,Ie=Object.prototype,Ee=$e.toString,Le=Ie.hasOwnProperty,Te=RegExp("^"+Ee.call(Le).replace(Oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qe(t){if(!B(t)||Re(t))return!1;var e=_e(t)?Te:Me;return e.test(Se(t))}function Ae(t,e){return t==null?void 0:t[e]}function P(t,e){var n=Ae(t,e);return qe(n)?n:void 0}function Ue(t,e){return t===e||t!==t&&e!==e}var Ne=P(Object,"create");const R=Ne;function je(){this.__data__=R?R(null):{},this.size=0}function ke(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Be="__lodash_hash_undefined__",Fe=Object.prototype,Pe=Fe.hasOwnProperty;function Ve(t){var e=this.__data__;if(R){var n=e[t];return n===Be?void 0:n}return Pe.call(e,t)?e[t]:void 0}var He=Object.prototype,We=He.hasOwnProperty;function ze(t){var e=this.__data__;return R?e[t]!==void 0:We.call(e,t)}var Qe="__lodash_hash_undefined__";function Ge(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=R&&e===void 0?Qe:e,this}function w(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var a=t[e];this.set(a[0],a[1])}}w.prototype.clear=je,w.prototype.delete=ke,w.prototype.get=Ve,w.prototype.has=ze,w.prototype.set=Ge;function Je(){this.__data__=[],this.size=0}function v(t,e){for(var n=t.length;n--;)if(Ue(t[n][0],e))return n;return-1}var Ke=Array.prototype,xe=Ke.splice;function Xe(t){var e=this.__data__,n=v(e,t);if(n<0)return!1;var a=e.length-1;return n==a?e.pop():xe.call(e,n,1),--this.size,!0}function Ye(t){var e=this.__data__,n=v(e,t);return n<0?void 0:e[n][1]}function Ze(t){return v(this.__data__,t)>-1}function et(t,e){var n=this.__data__,a=v(n,t);return a<0?(++this.size,n.push([t,e])):n[a][1]=e,this}function _(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var a=t[e];this.set(a[0],a[1])}}_.prototype.clear=Je,_.prototype.delete=Xe,_.prototype.get=Ye,_.prototype.has=Ze,_.prototype.set=et;var tt=P(T,"Map");const nt=tt;function at(){this.size=0,this.__data__={hash:new w,map:new(nt||_),string:new w}}function ot(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function S(t,e){var n=t.__data__;return ot(e)?n[typeof e=="string"?"string":"hash"]:n.map}function rt(t){var e=S(this,t).delete(t);return this.size-=e?1:0,e}function st(t){return S(this,t).get(t)}function it(t){return S(this,t).has(t)}function lt(t,e){var n=S(this,t),a=n.size;return n.set(t,e),this.size+=n.size==a?0:1,this}function C(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var a=t[e];this.set(a[0],a[1])}}C.prototype.clear=at,C.prototype.delete=rt,C.prototype.get=st,C.prototype.has=it,C.prototype.set=lt;var dt="Expected a function";function A(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(dt);var n=function(){var a=arguments,o=e?e.apply(this,a):a[0],s=n.cache;if(s.has(o))return s.get(o);var u=t.apply(this,a);return n.cache=s.set(o,u)||s,u};return n.cache=new(A.Cache||C),n}A.Cache=C;const ct=2,V=1,H="";class O{constructor(e,n,a){this.locale=e,this.queryRef=n,this.rawValue=a}static create(e,n,a){return n.query.postAggr==="count"?new ut(e,n,a):new O(e,n,a)}getDecimals(e=ct){return this.decimals??this.queryRef.query.decimals??e}getFactor(){var e,n,a;return this.factor??this.queryRef.query.factor??((n=(e=this.queryRef.tag)==null?void 0:e.variable)!=null&&n.factor?parseFloat(this.queryRef.tag.variable.factor):null)??((a=this.queryRef.variable)!=null&&a.factor?parseFloat(this.queryRef.variable.factor):null)??V}getUnit(){var e,n,a;return this.unit??this.queryRef.query.unit??((n=(e=this.queryRef.tag)==null?void 0:e.variable)==null?void 0:n.unit)??((a=this.queryRef.variable)==null?void 0:a.unit)??H}setDecimals(e){this.decimals=e}setFactor(e){this.factor=e}setUnit(e){this.unit=e}getValue(){return this.rawValue}toString(){var a,o,s,u;const e=this.locale??void 0,n=A((i,d,p,c)=>{const f={style:"decimal",minimumFractionDigits:Math.floor(d),maximumFractionDigits:Math.floor(d)};return`${new Intl.NumberFormat(c,f).format(i)}${p?" "+p:""}`});return this.rawValue===null?"":this.queryRef.query.postAggr==="count"?n(this.rawValue,this.getDecimals(0),this.unit??this.queryRef.query.unit,e):((a=this.queryRef.variable)==null?void 0:a.type)==="str"?this.rawValue:((o=this.queryRef.variable)==null?void 0:o.type)==="bool"?this.rawValue?"True":"False":((s=this.queryRef.variable)==null?void 0:s.type)==="int"?n(this.rawValue,Number.isInteger(this.getFactor())?this.getDecimals(0):this.getDecimals(),this.getUnit(),e):((u=this.queryRef.variable)==null?void 0:u.type)==="float"?n(this.rawValue,this.getDecimals(),this.getUnit(),e):String(this.getValue())}}class ut extends O{getFactor(){return this.factor??this.queryRef.query.factor??V}getUnit(){return this.unit??this.queryRef.query.unit??H}}function W(t){return t.map(({queryRef:n,time:a,value:o})=>{const s=new te(n.query,n.variable,n.tag),u=O.create(o.locale,s,o.rawValue);return{queryRef:s,time:a,value:u}})}let h,U,z;function pt(t,e){if(z=new Date,t.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if(t.tagName.toLowerCase()==="html")return"html";const n={root:document.body,idName:o=>!0,className:o=>!0,tagName:o=>!0,attr:(o,s)=>!1,seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};h={...n,...e},U=gt(h.root,n);let a=M(t,"all",()=>M(t,"two",()=>M(t,"one",()=>M(t,"none"))));if(a){const o=X(Y(a,t));return o.length>0&&(a=o[0]),$(a)}else throw new Error("Selector was not found.")}function gt(t,e){return t.nodeType===Node.DOCUMENT_NODE?t:t===e.root?t.ownerDocument:t}function M(t,e,n){let a=null,o=[],s=t,u=0;for(;s;){const i=new Date().getTime()-z.getTime();if(h.timeoutMs!==void 0&&i>h.timeoutMs)throw new Error(`Timeout: Can't find a unique selector after ${i}ms`);let d=E(ft(s))||E(...yt(s))||E(...ht(s))||E(mt(s))||[K()];const p=wt(s);if(e=="all")p&&(d=d.concat(d.filter(N).map(c=>I(c,p))));else if(e=="two")d=d.slice(0,1),p&&(d=d.concat(d.filter(N).map(c=>I(c,p))));else if(e=="one"){const[c]=d=d.slice(0,1);p&&N(c)&&(d=[I(c,p)])}else e=="none"&&(d=[K()],p&&(d=[I(d[0],p)]));for(let c of d)c.level=u;if(o.push(d),o.length>=h.seedMinLength&&(a=Q(o,n),a))break;s=s.parentElement,u++}return a||(a=Q(o,n)),!a&&n?n():a}function Q(t,e){const n=X(x(t));if(n.length>h.threshold)return e?e():null;for(let a of n)if(J(a))return a;return null}function $(t){let e=t[0],n=e.name;for(let a=1;a<t.length;a++){const o=t[a].level||0;e.level===o-1?n=`${t[a].name} > ${n}`:n=`${t[a].name} ${n}`,e=t[a]}return n}function G(t){return t.map(e=>e.penalty).reduce((e,n)=>e+n,0)}function J(t){const e=$(t);switch(U.querySelectorAll(e).length){case 0:throw new Error(`Can't select any node with this selector: ${e}`);case 1:return!0;default:return!1}}function ft(t){const e=t.getAttribute("id");return e&&h.idName(e)?{name:"#"+CSS.escape(e),penalty:0}:null}function yt(t){return Array.from(t.attributes).filter(n=>h.attr(n.name,n.value)).map(n=>({name:`[${CSS.escape(n.name)}="${CSS.escape(n.value)}"]`,penalty:.5}))}function ht(t){return Array.from(t.classList).filter(h.className).map(n=>({name:"."+CSS.escape(n),penalty:1}))}function mt(t){const e=t.tagName.toLowerCase();return h.tagName(e)?{name:e,penalty:2}:null}function K(){return{name:"*",penalty:3}}function wt(t){const e=t.parentNode;if(!e)return null;let n=e.firstChild;if(!n)return null;let a=0;for(;n&&(n.nodeType===Node.ELEMENT_NODE&&a++,n!==t);)n=n.nextSibling;return a}function I(t,e){return{name:t.name+`:nth-child(${e})`,penalty:t.penalty+1}}function N(t){return t.name!=="html"&&!t.name.startsWith("#")}function E(...t){const e=t.filter(Ct);return e.length>0?e:null}function Ct(t){return t!=null}function*x(t,e=[]){if(t.length>0)for(let n of t[0])yield*x(t.slice(1,t.length),e.concat(n));else yield e}function X(t){return[...t].sort((e,n)=>G(e)-G(n))}function*Y(t,e,n={counter:0,visited:new Map}){if(t.length>2&&t.length>h.optimizedMinLength)for(let a=1;a<t.length-1;a++){if(n.counter>h.maxNumberOfTries)return;n.counter+=1;const o=[...t];o.splice(a,1);const s=$(o);if(n.visited.has(s))return;J(o)&&_t(o,e)&&(yield o,n.visited.set(s,!0),yield*Y(o,e,n))}}function _t(t,e){return U.querySelector($(t))===e}class m extends Error{constructor(e="Method is not implemented"){super(e),this.name="NotImplementedError",this.message=e,this.stack=`NotImplementedError: ${e}`}}class Dt{constructor(e){y(this,"ontimerangechange",null);y(this,"onvpnclientstatuschange",null);y(this,"_getApiLinks");y(this,"appData");y(this,"componentBaseUrl");y(this,"destroyed");y(this,"mode");y(this,"inputs");y(this,"inputMap");y(this,"timeRange");y(this,"timeRangeIsAdjustable");y(this,"vpnClientStatus");this._getApiLinks=()=>new Map(e._apiLinkEntries),this.appData=e.appData,this.componentBaseUrl=e.componentBaseUrl,this.destroyed=e.destroyed,this.mode=e.mode,this.inputs=e.inputs,this.inputMap=new Map(Object.entries(this.inputs)),this.timeRange=e.timeRange,this.timeRangeIsAdjustable=e.timeRangeIsAdjustable,this.vpnClientStatus=e.vpnClientStatus,this._messageHandler=this._messageHandler.bind(this),window.addEventListener("message",this._messageHandler,!1)}_messageHandler(e){if(e.source===window.parent)switch(e.data.type){case r.TimeRangeChange:this.ontimerangechange&&this.ontimerangechange(...e.data.payload);break;case r.VpnClientStatusChange:this.onvpnclientstatuschange&&this.onvpnclientstatuschange(...e.data.payload);break}}createBackendComponentClient(){const e=crypto.randomUUID();return window.parent.postMessage({type:r.BackendComponentClientCreate,payload:{clientId:e}},"*"),new Rt(e)}createLoggingDataClient(){const e=crypto.randomUUID();return window.parent.postMessage({type:r.LoggingDataClientCreate,payload:{clientId:e}},"*"),new bt(e)}createObjectStorageClient(){throw new m}createResourceDataClient(){const e=crypto.randomUUID();return window.parent.postMessage({type:r.ResourceDataClientCreate,payload:{clientId:e}},"*"),new vt(e)}createTooltip(){throw new m}destroy(){window.parent.postMessage({type:r.Destroy},"*"),window.removeEventListener("message",this._messageHandler,!1),this.destroyed=!0}getApiUrl(e,n){const a=this._getApiLinks().get(e);if(!a)throw new Error("IxApiError: entry not found");return n?Object.keys(n).sort().reduce((o,s)=>{if(o.includes(`{${s}}`))return o.replace(`{${s}}`,n[s]);const u=new URL(o);return u.searchParams.set(s,n[s]),decodeURIComponent(u.href)},a.href):a.href}navigateByUrl(e){window.parent.postMessage({type:r.NavigateByUrl,payload:{url:e}},"*")}openActionBottomSheet(e){return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:r.OpenActionBottomSheet,payload:{options:e}},"*");function a(o){o.source===window.parent&&o.data.type===r.OpenActionBottomSheetResult&&(window.removeEventListener("message",a,!1),n(o.data.payload.result))}})}openActionMenu(e,n){return new Promise(a=>{window.addEventListener("message",o,!1),window.parent.postMessage({type:r.OpenActionMenu,payload:{selector:pt(e),options:n}},"*");function o(s){s.source===window.parent&&s.data.type===r.OpenActionMenuResult&&(window.removeEventListener("message",o,!1),a(s.data.payload.result))}})}openAlertDialog(e){return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:r.OpenAlertDialog,payload:{options:e}},"*");function a(o){o.source===window.parent&&o.data.type===r.OpenAlertDialogResult&&(window.removeEventListener("message",a,!1),n(o.data.payload.result))}})}openConfirmDialog(e){return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:r.OpenConfirmDialog,payload:{options:e}},"*");function a(o){o.source===window.parent&&o.data.type===r.OpenConfirmDialogResult&&(window.removeEventListener("message",a,!1),n(o.data.payload.result))}})}openContentDialog(e){if(typeof e.onopened=="function")throw new m('The "onopened" option is not implemented');if(typeof e.onclose=="function")throw new m('The "onclose" option is not implemented');return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:r.OpenContentDialog,payload:{options:e.htmlContent&&typeof e.htmlContent!="string"?{...e,htmlContent:e.htmlContent.cloneNode(!0).outerHTML}:e}},"*");function a(o){o.source===window.parent&&o.data.type===r.OpenContentDialogResult&&(window.removeEventListener("message",a,!1),n(o.data.payload.result))}})}openFormDialog(e){return new Promise(n=>{window.addEventListener("message",a,!1),window.parent.postMessage({type:r.OpenFormDialog,payload:{options:e}},"*");function a(o){o.source===window.parent&&o.data.type===r.OpenFormDialogResult&&(window.removeEventListener("message",a,!1),n(o.data.payload.result))}})}sanitizeHtml(){throw new m}saveAsFile(){throw new m}setTimeRange(e){window.parent.postMessage({type:r.SetTimeRange,payload:{timeRange:e}},"*")}showVpnStatusDetails(e){window.parent.postMessage({type:r.ShowVpnStatusDetails,payload:{agentId:e}},"*")}testVpnAccess(){throw new m}toggleVpn(e){window.parent.postMessage({type:r.ToggleVpn,payload:{agentId:e}},"*")}translate(){throw new m}}class Rt{constructor(e){this.id=e}call(e,n){return new Promise(a=>{const o=crypto.randomUUID();window.addEventListener("message",s,!1),window.parent.postMessage({type:r.BackendComponentClientCall,payload:{clientId:this.id,callId:o,functionName:e,functionArguments:n}});function s(u){u.source===window.parent&&u.data.type===r.BackendComponentClientCallResult&&u.data.payload.callId===o&&(window.removeEventListener("message",s,!1),a(u.data.payload.result))}})}destroy(){window.parent.postMessage({type:r.BackendComponentClientDestroy,payload:{clientId:this.id}},"*")}}class bt{constructor(e){this.id=e}query(e,n){const a=crypto.randomUUID();return window.addEventListener("message",o,!1),window.parent.postMessage({type:r.LoggingDataClientQuery,payload:{clientId:this.id,queryId:a,query:e}},"*"),()=>{window.removeEventListener("message",o,!1)};function o(s){if(s.source===window.parent&&s.data.type===r.LoggingDataClientQueryResult&&s.data.payload.queryId===a){const{results:u}=s.data.payload;if(e.length)if(!e.queries||e.format!=="csv"){const i=u.map(d=>W(d));n(i)}else throw new m;else{const i=W(u);n(i)}}}}destroy(){window.parent.postMessage({type:r.LoggingDataClientDestroy,payload:{clientId:this.id}},"*")}}class vt{constructor(e){this.id=e}query(e,n){const a=crypto.randomUUID();return window.addEventListener("message",o,!1),window.parent.postMessage({type:r.ResourceDataClientQuery,payload:{clientId:this.id,queryId:a,query:e}},"*"),()=>{window.removeEventListener("message",o,!1)};function o(s){s.source===window.parent&&s.data.type===r.ResourceDataClientQueryResult&&s.data.payload.queryId===a&&n(s.data.payload.results)}}update(e){return new Promise(n=>{const a=crypto.randomUUID();window.addEventListener("message",o,!1),window.parent.postMessage({type:r.ResourceDataClientUpdate,payload:{clientId:this.id,updateId:a,update:e}},"*");function o(s){s.source===window.parent&&s.data.type===r.ResourceDataClientUpdated&&s.data.payload.updateId===a&&(window.removeEventListener("message",o,!1),n())}})}render(e,n){const a=crypto.randomUUID();return window.addEventListener("message",o,!1),window.parent.postMessage({type:r.ResourceDataClientRender,payload:{clientId:this.id,queryId:a,query:e}},"*"),()=>{window.removeEventListener("message",o,!1)};function o(s){s.source===window.parent&&s.data.type===r.ResourceDataClientRenderResult&&s.data.payload.queryId===a&&n(s.data.payload.results)}}destroy(){window.parent.postMessage({type:r.ResourceDataClientDestroy,payload:{clientId:this.id}},"*")}}function L(t){const e=!!(t&&t.migrateInputs);return!e&&L.__cache__?Promise.resolve(L.__cache__):new Promise(n=>{window.addEventListener("message",function a(o){if(o.source===window.parent&&o.data&&o.data.type===r.Created){let s=o.data.payload;e&&(s.inputs=t.migrateInputs(s.inputs,null));const u=new Dt(s);n(u),e||(L.__cache__=u),window.removeEventListener("message",a,!1)}},!1),window.parent.postMessage({type:r.Create},"*")})}g.connect=ee,g.getComponentContext=L,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ixon-cdk/iframe-adapter",
|
|
3
|
-
"version": "1.12.0-next.
|
|
3
|
+
"version": "1.12.0-next.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@medv/finder": "3.2.0"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@ixon-cdk/types": "^1.12.0-next.
|
|
20
|
+
"@ixon-cdk/types": "^1.12.0-next.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"typescript": "~5.1.6",
|