@ixon-cdk/iframe-adapter 1.11.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 +633 -402
- package/dist/index.umd.cjs +1 -1
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -1,54 +1,59 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
const
|
|
1
|
+
var Z = Object.defineProperty;
|
|
2
|
+
var ee = (t, e, n) => e in t ? Z(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var y = (t, e, n) => (ee(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
4
|
+
const c = "cdk:cmpctx:", o = {
|
|
5
5
|
// Lifecycle
|
|
6
|
-
Create: `${
|
|
7
|
-
Created: `${
|
|
8
|
-
Destroy: `${
|
|
6
|
+
Create: `${c}create`,
|
|
7
|
+
Created: `${c}created`,
|
|
8
|
+
Destroy: `${c}destroy`,
|
|
9
9
|
// BackendComponentClient
|
|
10
|
-
BackendComponentClientCreate: `${
|
|
11
|
-
BackendComponentClientDestroy: `${
|
|
12
|
-
BackendComponentClientCall: `${
|
|
13
|
-
BackendComponentClientCallResult: `${
|
|
10
|
+
BackendComponentClientCreate: `${c}bcc:create`,
|
|
11
|
+
BackendComponentClientDestroy: `${c}bcc:destroy`,
|
|
12
|
+
BackendComponentClientCall: `${c}bcc:call`,
|
|
13
|
+
BackendComponentClientCallResult: `${c}bcc:callresult`,
|
|
14
14
|
// LoggingDataClient
|
|
15
|
-
LoggingDataClientCreate: `${
|
|
16
|
-
LoggingDataClientDestroy: `${
|
|
17
|
-
LoggingDataClientQuery: `${
|
|
18
|
-
LoggingDataClientQueryResult: `${
|
|
15
|
+
LoggingDataClientCreate: `${c}ldc:create`,
|
|
16
|
+
LoggingDataClientDestroy: `${c}ldc:destroy`,
|
|
17
|
+
LoggingDataClientQuery: `${c}ldc:query`,
|
|
18
|
+
LoggingDataClientQueryResult: `${c}ldc:queryresult`,
|
|
19
19
|
// ResourceDataClient
|
|
20
|
-
ResourceDataClientCreate: `${
|
|
21
|
-
ResourceDataClientDestroy: `${
|
|
22
|
-
ResourceDataClientQuery: `${
|
|
23
|
-
ResourceDataClientQueryResult: `${
|
|
24
|
-
ResourceDataClientRender: `${
|
|
25
|
-
ResourceDataClientRenderResult: `${
|
|
26
|
-
ResourceDataClientUpdate: `${
|
|
27
|
-
ResourceDataClientUpdated: `${
|
|
20
|
+
ResourceDataClientCreate: `${c}rdc:create`,
|
|
21
|
+
ResourceDataClientDestroy: `${c}rdc:destroy`,
|
|
22
|
+
ResourceDataClientQuery: `${c}rdc:query`,
|
|
23
|
+
ResourceDataClientQueryResult: `${c}rdc:queryresult`,
|
|
24
|
+
ResourceDataClientRender: `${c}rdc:render`,
|
|
25
|
+
ResourceDataClientRenderResult: `${c}rdc:renderresult`,
|
|
26
|
+
ResourceDataClientUpdate: `${c}rdc:update`,
|
|
27
|
+
ResourceDataClientUpdated: `${c}rdc:updated`,
|
|
28
|
+
// ActionMenu
|
|
29
|
+
OpenActionMenu: `${c}openactionmenu`,
|
|
30
|
+
OpenActionMenuResult: `${c}openactionmenuresult`,
|
|
28
31
|
// ActionBottomSheet
|
|
29
|
-
OpenActionBottomSheet: `${
|
|
30
|
-
OpenActionBottomSheetResult: `${
|
|
32
|
+
OpenActionBottomSheet: `${c}openactionbottomsheet`,
|
|
33
|
+
OpenActionBottomSheetResult: `${c}openactionbottomsheetresult`,
|
|
31
34
|
// Dialogs
|
|
32
|
-
OpenAlertDialog: `${
|
|
33
|
-
OpenAlertDialogResult: `${
|
|
34
|
-
OpenConfirmDialog: `${
|
|
35
|
-
OpenConfirmDialogResult: `${
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
OpenAlertDialog: `${c}openalertdialog`,
|
|
36
|
+
OpenAlertDialogResult: `${c}openalertdialogresult`,
|
|
37
|
+
OpenConfirmDialog: `${c}openconfirmdialog`,
|
|
38
|
+
OpenConfirmDialogResult: `${c}openconfirmdialogresult`,
|
|
39
|
+
OpenContentDialog: `${c}opencontentdialog`,
|
|
40
|
+
OpenContentDialogResult: `${c}opencontentdialogresult`,
|
|
41
|
+
OpenFormDialog: `${c}openformdialog`,
|
|
42
|
+
OpenFormDialogResult: `${c}openformdialogresult`,
|
|
38
43
|
// VPN
|
|
39
|
-
ShowVpnStatusDetails: `${
|
|
40
|
-
ToggleVpn: `${
|
|
41
|
-
VpnClientStatusChange: `${
|
|
44
|
+
ShowVpnStatusDetails: `${c}showvpnstatusdetails`,
|
|
45
|
+
ToggleVpn: `${c}togglevpn`,
|
|
46
|
+
VpnClientStatusChange: `${c}vpnclientstatuschange`,
|
|
42
47
|
// Miscellaneous
|
|
43
|
-
NavigateByUrl: `${
|
|
44
|
-
SetTimeRange: `${
|
|
45
|
-
TimeRangeChange: `${
|
|
48
|
+
NavigateByUrl: `${c}navigatebyurl`,
|
|
49
|
+
SetTimeRange: `${c}settimerange`,
|
|
50
|
+
TimeRangeChange: `${c}timerangechange`
|
|
46
51
|
};
|
|
47
|
-
function
|
|
48
|
-
return window.addEventListener("message",
|
|
52
|
+
function Ot({ iframe: t, context: e }) {
|
|
53
|
+
return window.addEventListener("message", a, !1), e.ontimerangechange = (...r) => {
|
|
49
54
|
t.contentWindow && t.contentWindow.postMessage(
|
|
50
55
|
{
|
|
51
|
-
type:
|
|
56
|
+
type: o.TimeRangeChange,
|
|
52
57
|
payload: r
|
|
53
58
|
},
|
|
54
59
|
"*"
|
|
@@ -56,17 +61,17 @@ function at({ iframe: t, context: e }) {
|
|
|
56
61
|
}, e.onvpnclientstatuschange = (...r) => {
|
|
57
62
|
t.contentWindow && t.contentWindow.postMessage(
|
|
58
63
|
{
|
|
59
|
-
type:
|
|
64
|
+
type: o.VpnClientStatusChange,
|
|
60
65
|
payload: r
|
|
61
66
|
},
|
|
62
67
|
"*"
|
|
63
68
|
);
|
|
64
69
|
}, {
|
|
65
70
|
destroy() {
|
|
66
|
-
window.removeEventListener("message",
|
|
71
|
+
window.removeEventListener("message", a, !1);
|
|
67
72
|
}
|
|
68
73
|
};
|
|
69
|
-
function
|
|
74
|
+
function n(r) {
|
|
70
75
|
return {
|
|
71
76
|
_apiLinkEntries: [...r._getApiLinks().entries()],
|
|
72
77
|
appData: r.appData,
|
|
@@ -79,214 +84,234 @@ function at({ iframe: t, context: e }) {
|
|
|
79
84
|
vpnClientStatus: r.vpnClientStatus
|
|
80
85
|
};
|
|
81
86
|
}
|
|
82
|
-
function
|
|
83
|
-
if (
|
|
87
|
+
function a(r) {
|
|
88
|
+
if (a._clients = a._clients || /* @__PURE__ */ new Map([]), r.source === t.contentWindow)
|
|
84
89
|
switch (r.data.type) {
|
|
85
|
-
case
|
|
90
|
+
case o.Create:
|
|
86
91
|
t.contentWindow.postMessage(
|
|
87
92
|
{
|
|
88
|
-
type:
|
|
89
|
-
payload:
|
|
93
|
+
type: o.Created,
|
|
94
|
+
payload: n(e)
|
|
90
95
|
},
|
|
91
96
|
"*"
|
|
92
97
|
);
|
|
93
98
|
break;
|
|
94
|
-
case
|
|
99
|
+
case o.Destroy:
|
|
95
100
|
e.destroy();
|
|
96
101
|
break;
|
|
97
|
-
case
|
|
98
|
-
const { clientId:
|
|
99
|
-
|
|
102
|
+
case o.BackendComponentClientCreate: {
|
|
103
|
+
const { clientId: i } = r.data.payload, l = e.createBackendComponentClient(i);
|
|
104
|
+
a._clients.set(i, l);
|
|
100
105
|
break;
|
|
101
106
|
}
|
|
102
|
-
case
|
|
103
|
-
const { clientId:
|
|
104
|
-
|
|
107
|
+
case o.BackendComponentClientDestroy: {
|
|
108
|
+
const { clientId: i } = r.data.payload;
|
|
109
|
+
a._clients.has(i) && (a._clients.get(i).destroy(), a._clients.delete(i));
|
|
105
110
|
break;
|
|
106
111
|
}
|
|
107
|
-
case
|
|
108
|
-
const { clientId:
|
|
109
|
-
let
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
case o.BackendComponentClientCall: {
|
|
113
|
+
const { clientId: i, callId: l, functionName: p, functionArguments: d } = r.data.payload;
|
|
114
|
+
let g = a._clients.get(i);
|
|
115
|
+
g && !g._destroyed && g.call(p, d).then((N) => {
|
|
116
|
+
g && !g.destroyed && t.contentWindow.postMessage(
|
|
112
117
|
{
|
|
113
|
-
type:
|
|
114
|
-
payload: { callId:
|
|
118
|
+
type: o.BackendComponentClientCallResult,
|
|
119
|
+
payload: { callId: l, result: N }
|
|
115
120
|
},
|
|
116
121
|
"*"
|
|
117
122
|
);
|
|
118
123
|
});
|
|
119
124
|
break;
|
|
120
125
|
}
|
|
121
|
-
case
|
|
122
|
-
const { clientId:
|
|
123
|
-
|
|
126
|
+
case o.LoggingDataClientCreate: {
|
|
127
|
+
const { clientId: i } = r.data.payload, l = e.createLoggingDataClient(i);
|
|
128
|
+
a._clients.set(i, l);
|
|
124
129
|
break;
|
|
125
130
|
}
|
|
126
|
-
case
|
|
127
|
-
const { clientId:
|
|
128
|
-
|
|
131
|
+
case o.LoggingDataClientDestroy: {
|
|
132
|
+
const { clientId: i } = r.data.payload;
|
|
133
|
+
a._clients.has(i) && (a._clients.get(i).destroy(), a._clients.delete(i));
|
|
129
134
|
break;
|
|
130
135
|
}
|
|
131
|
-
case
|
|
132
|
-
const { clientId:
|
|
133
|
-
let d =
|
|
134
|
-
d && !d._destroyed && d.query(
|
|
136
|
+
case o.LoggingDataClientQuery: {
|
|
137
|
+
const { clientId: i, queryId: l, query: p } = r.data.payload;
|
|
138
|
+
let d = a._clients.get(i);
|
|
139
|
+
d && !d._destroyed && d.query(p, (g) => {
|
|
135
140
|
d._destroyed || t.contentWindow.postMessage(
|
|
136
141
|
{
|
|
137
|
-
type:
|
|
138
|
-
payload: { queryId:
|
|
142
|
+
type: o.LoggingDataClientQueryResult,
|
|
143
|
+
payload: { queryId: l, results: g }
|
|
139
144
|
},
|
|
140
145
|
"*"
|
|
141
146
|
);
|
|
142
147
|
});
|
|
143
148
|
break;
|
|
144
149
|
}
|
|
145
|
-
case
|
|
146
|
-
const { clientId:
|
|
147
|
-
|
|
150
|
+
case o.ResourceDataClientCreate: {
|
|
151
|
+
const { clientId: i } = r.data.payload, l = e.createResourceDataClient(i);
|
|
152
|
+
a._clients.set(i, l);
|
|
148
153
|
break;
|
|
149
154
|
}
|
|
150
|
-
case
|
|
151
|
-
const { clientId:
|
|
152
|
-
|
|
155
|
+
case o.ResourceDataClientDestroy: {
|
|
156
|
+
const { clientId: i } = r.data.payload;
|
|
157
|
+
a._clients.has(i) && (a._clients.get(i).destroy(), a._clients.delete(i));
|
|
153
158
|
break;
|
|
154
159
|
}
|
|
155
|
-
case
|
|
156
|
-
const { clientId:
|
|
157
|
-
let d =
|
|
158
|
-
d && !d._destroyed && d.query(
|
|
160
|
+
case o.ResourceDataClientQuery: {
|
|
161
|
+
const { clientId: i, queryId: l, query: p } = r.data.payload;
|
|
162
|
+
let d = a._clients.get(i);
|
|
163
|
+
d && !d._destroyed && d.query(p, (g) => {
|
|
159
164
|
d._destroyed || t.contentWindow.postMessage(
|
|
160
165
|
{
|
|
161
|
-
type:
|
|
162
|
-
payload: { queryId:
|
|
166
|
+
type: o.ResourceDataClientQueryResult,
|
|
167
|
+
payload: { queryId: l, results: g }
|
|
163
168
|
},
|
|
164
169
|
"*"
|
|
165
170
|
);
|
|
166
171
|
});
|
|
167
172
|
break;
|
|
168
173
|
}
|
|
169
|
-
case
|
|
170
|
-
const { clientId:
|
|
171
|
-
let d =
|
|
172
|
-
d && !d._destroyed && d.render(
|
|
174
|
+
case o.ResourceDataClientRender: {
|
|
175
|
+
const { clientId: i, queryId: l, query: p } = r.data.payload;
|
|
176
|
+
let d = a._clients.get(i);
|
|
177
|
+
d && !d._destroyed && d.render(p, (g) => {
|
|
173
178
|
d._destroyed || t.contentWindow.postMessage(
|
|
174
179
|
{
|
|
175
|
-
type:
|
|
176
|
-
payload: { queryId:
|
|
180
|
+
type: o.ResourceDataClientRenderResult,
|
|
181
|
+
payload: { queryId: l, results: g }
|
|
177
182
|
},
|
|
178
183
|
"*"
|
|
179
184
|
);
|
|
180
185
|
});
|
|
181
186
|
break;
|
|
182
187
|
}
|
|
183
|
-
case
|
|
184
|
-
const { clientId:
|
|
185
|
-
let d =
|
|
186
|
-
d && !d._destroyed && d.update(
|
|
188
|
+
case o.ResourceDataClientUpdate: {
|
|
189
|
+
const { clientId: i, updateId: l, update: p } = r.data.payload;
|
|
190
|
+
let d = a._clients.get(i);
|
|
191
|
+
d && !d._destroyed && d.update(p).then(() => {
|
|
187
192
|
d && !d._destroyed && t.contentWindow.postMessage(
|
|
188
193
|
{
|
|
189
|
-
type:
|
|
190
|
-
payload: { updateId:
|
|
194
|
+
type: o.ResourceDataClientUpdated,
|
|
195
|
+
payload: { updateId: l }
|
|
191
196
|
},
|
|
192
197
|
"*"
|
|
193
198
|
);
|
|
194
199
|
});
|
|
195
200
|
break;
|
|
196
201
|
}
|
|
197
|
-
case
|
|
198
|
-
e.openActionBottomSheet(r.data.payload.options).then((
|
|
199
|
-
t.contentWindow.postMessage({ type:
|
|
202
|
+
case o.OpenActionBottomSheet:
|
|
203
|
+
e.openActionBottomSheet(r.data.payload.options).then((i) => {
|
|
204
|
+
t.contentWindow.postMessage({ type: o.OpenActionBottomSheetResult, payload: { result: i } }, "*");
|
|
205
|
+
});
|
|
206
|
+
break;
|
|
207
|
+
case o.OpenActionMenu:
|
|
208
|
+
const s = t.contentDocument.querySelector(r.data.payload.selector), u = {
|
|
209
|
+
getBoundingClientRect: () => {
|
|
210
|
+
const i = t.getBoundingClientRect(), l = s.getBoundingClientRect();
|
|
211
|
+
return {
|
|
212
|
+
...JSON.parse(JSON.stringify(l)),
|
|
213
|
+
top: i.top + l.top,
|
|
214
|
+
x: i.x + l.x
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
e.openActionMenu(u, r.data.payload.options).then((i) => {
|
|
219
|
+
t.contentWindow.postMessage({ type: o.OpenActionMenuResult, payload: { result: i } }, "*");
|
|
220
|
+
});
|
|
221
|
+
break;
|
|
222
|
+
case o.OpenAlertDialog:
|
|
223
|
+
e.openAlertDialog(r.data.payload.options).then((i) => {
|
|
224
|
+
t.contentWindow.postMessage({ type: o.OpenAlertDialogResult, payload: { result: i } }, "*");
|
|
200
225
|
});
|
|
201
226
|
break;
|
|
202
|
-
case
|
|
203
|
-
e.
|
|
204
|
-
t.contentWindow.postMessage({ type:
|
|
227
|
+
case o.OpenConfirmDialog:
|
|
228
|
+
e.openConfirmDialog(r.data.payload.options).then((i) => {
|
|
229
|
+
t.contentWindow.postMessage({ type: o.OpenConfirmDialogResult, payload: { result: i } }, "*");
|
|
205
230
|
});
|
|
206
231
|
break;
|
|
207
|
-
case
|
|
208
|
-
e.
|
|
209
|
-
t.contentWindow.postMessage({ type:
|
|
232
|
+
case o.OpenContentDialog:
|
|
233
|
+
e.openContentDialog(r.data.payload.options).then((i) => {
|
|
234
|
+
t.contentWindow.postMessage({ type: o.OpenContentDialogResult, payload: { result: i } }, "*");
|
|
210
235
|
});
|
|
211
236
|
break;
|
|
212
|
-
case
|
|
213
|
-
e.openFormDialog(r.data.payload.options).then((
|
|
214
|
-
t.contentWindow.postMessage({ type:
|
|
237
|
+
case o.OpenFormDialog:
|
|
238
|
+
e.openFormDialog(r.data.payload.options).then((i) => {
|
|
239
|
+
t.contentWindow.postMessage({ type: o.OpenFormDialogResult, payload: { result: i } }, "*");
|
|
215
240
|
});
|
|
216
241
|
break;
|
|
217
|
-
case
|
|
242
|
+
case o.ShowVpnStatusDetails:
|
|
218
243
|
e.showVpnStatusDetails(r.data.payload.agentId);
|
|
219
244
|
break;
|
|
220
|
-
case
|
|
245
|
+
case o.ToggleVpn:
|
|
221
246
|
e.toggleVpn(r.data.payload.agentId);
|
|
222
247
|
break;
|
|
223
|
-
case
|
|
248
|
+
case o.NavigateByUrl:
|
|
224
249
|
e.navigateByUrl(r.data.payload.url);
|
|
225
250
|
break;
|
|
226
|
-
case
|
|
251
|
+
case o.SetTimeRange:
|
|
227
252
|
e.setTimeRange(r.data.payload.timeRange);
|
|
228
253
|
break;
|
|
229
254
|
}
|
|
230
255
|
}
|
|
231
256
|
}
|
|
232
|
-
class
|
|
233
|
-
constructor(e,
|
|
234
|
-
this.query = e, this.variable =
|
|
257
|
+
class te {
|
|
258
|
+
constructor(e, n, a, r) {
|
|
259
|
+
this.query = e, this.variable = n, this.tag = a, this._onCancel = r, Object.freeze(this);
|
|
235
260
|
}
|
|
236
261
|
cancel() {
|
|
237
262
|
this._onCancel && this._onCancel();
|
|
238
263
|
}
|
|
239
264
|
}
|
|
240
|
-
var
|
|
241
|
-
const
|
|
242
|
-
var
|
|
243
|
-
const
|
|
244
|
-
var
|
|
245
|
-
const
|
|
246
|
-
var
|
|
247
|
-
function
|
|
248
|
-
var e =
|
|
265
|
+
var ne = typeof global == "object" && global && global.Object === Object && global;
|
|
266
|
+
const ae = ne;
|
|
267
|
+
var re = typeof self == "object" && self && self.Object === Object && self, oe = ae || re || Function("return this")();
|
|
268
|
+
const q = oe;
|
|
269
|
+
var se = q.Symbol;
|
|
270
|
+
const S = se;
|
|
271
|
+
var H = Object.prototype, ie = H.hasOwnProperty, le = H.toString, _ = S ? S.toStringTag : void 0;
|
|
272
|
+
function ce(t) {
|
|
273
|
+
var e = ie.call(t, _), n = t[_];
|
|
249
274
|
try {
|
|
250
|
-
t[
|
|
251
|
-
var
|
|
275
|
+
t[_] = void 0;
|
|
276
|
+
var a = !0;
|
|
252
277
|
} catch {
|
|
253
278
|
}
|
|
254
|
-
var r =
|
|
255
|
-
return
|
|
279
|
+
var r = le.call(t);
|
|
280
|
+
return a && (e ? t[_] = n : delete t[_]), r;
|
|
256
281
|
}
|
|
257
|
-
var
|
|
258
|
-
function
|
|
259
|
-
return
|
|
282
|
+
var de = Object.prototype, ue = de.toString;
|
|
283
|
+
function pe(t) {
|
|
284
|
+
return ue.call(t);
|
|
260
285
|
}
|
|
261
|
-
var
|
|
262
|
-
function
|
|
263
|
-
return t == null ? t === void 0 ?
|
|
286
|
+
var ge = "[object Null]", ye = "[object Undefined]", j = S ? S.toStringTag : void 0;
|
|
287
|
+
function fe(t) {
|
|
288
|
+
return t == null ? t === void 0 ? ye : ge : j && j in Object(t) ? ce(t) : pe(t);
|
|
264
289
|
}
|
|
265
|
-
function
|
|
290
|
+
function W(t) {
|
|
266
291
|
var e = typeof t;
|
|
267
292
|
return t != null && (e == "object" || e == "function");
|
|
268
293
|
}
|
|
269
|
-
var
|
|
270
|
-
function
|
|
271
|
-
if (!
|
|
294
|
+
var he = "[object AsyncFunction]", me = "[object Function]", we = "[object GeneratorFunction]", Ce = "[object Proxy]";
|
|
295
|
+
function _e(t) {
|
|
296
|
+
if (!W(t))
|
|
272
297
|
return !1;
|
|
273
|
-
var e =
|
|
274
|
-
return e ==
|
|
298
|
+
var e = fe(t);
|
|
299
|
+
return e == me || e == we || e == he || e == Ce;
|
|
275
300
|
}
|
|
276
|
-
var
|
|
277
|
-
const
|
|
278
|
-
var
|
|
279
|
-
var t = /[^.]+$/.exec(
|
|
301
|
+
var De = q["__core-js_shared__"];
|
|
302
|
+
const E = De;
|
|
303
|
+
var B = function() {
|
|
304
|
+
var t = /[^.]+$/.exec(E && E.keys && E.keys.IE_PROTO || "");
|
|
280
305
|
return t ? "Symbol(src)_1." + t : "";
|
|
281
306
|
}();
|
|
282
|
-
function
|
|
283
|
-
return !!
|
|
307
|
+
function Re(t) {
|
|
308
|
+
return !!B && B in t;
|
|
284
309
|
}
|
|
285
|
-
var
|
|
286
|
-
function
|
|
310
|
+
var be = Function.prototype, ve = be.toString;
|
|
311
|
+
function Se(t) {
|
|
287
312
|
if (t != null) {
|
|
288
313
|
try {
|
|
289
|
-
return
|
|
314
|
+
return ve.call(t);
|
|
290
315
|
} catch {
|
|
291
316
|
}
|
|
292
317
|
try {
|
|
@@ -296,166 +321,166 @@ function de(t) {
|
|
|
296
321
|
}
|
|
297
322
|
return "";
|
|
298
323
|
}
|
|
299
|
-
var
|
|
300
|
-
"^" +
|
|
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.*?") + "$"
|
|
301
326
|
);
|
|
302
|
-
function
|
|
303
|
-
if (!
|
|
327
|
+
function qe(t) {
|
|
328
|
+
if (!W(t) || Re(t))
|
|
304
329
|
return !1;
|
|
305
|
-
var e =
|
|
306
|
-
return e.test(
|
|
330
|
+
var e = _e(t) ? Te : $e;
|
|
331
|
+
return e.test(Se(t));
|
|
307
332
|
}
|
|
308
|
-
function
|
|
333
|
+
function Ae(t, e) {
|
|
309
334
|
return t == null ? void 0 : t[e];
|
|
310
335
|
}
|
|
311
|
-
function
|
|
312
|
-
var
|
|
313
|
-
return
|
|
336
|
+
function z(t, e) {
|
|
337
|
+
var n = Ae(t, e);
|
|
338
|
+
return qe(n) ? n : void 0;
|
|
314
339
|
}
|
|
315
|
-
function
|
|
340
|
+
function Ue(t, e) {
|
|
316
341
|
return t === e || t !== t && e !== e;
|
|
317
342
|
}
|
|
318
|
-
var
|
|
319
|
-
const
|
|
320
|
-
function
|
|
321
|
-
this.__data__ =
|
|
343
|
+
var Ne = z(Object, "create");
|
|
344
|
+
const D = Ne;
|
|
345
|
+
function je() {
|
|
346
|
+
this.__data__ = D ? D(null) : {}, this.size = 0;
|
|
322
347
|
}
|
|
323
|
-
function
|
|
348
|
+
function Be(t) {
|
|
324
349
|
var e = this.has(t) && delete this.__data__[t];
|
|
325
350
|
return this.size -= e ? 1 : 0, e;
|
|
326
351
|
}
|
|
327
|
-
var
|
|
328
|
-
function
|
|
352
|
+
var ke = "__lodash_hash_undefined__", Fe = Object.prototype, Pe = Fe.hasOwnProperty;
|
|
353
|
+
function Ve(t) {
|
|
329
354
|
var e = this.__data__;
|
|
330
|
-
if (
|
|
331
|
-
var
|
|
332
|
-
return
|
|
355
|
+
if (D) {
|
|
356
|
+
var n = e[t];
|
|
357
|
+
return n === ke ? void 0 : n;
|
|
333
358
|
}
|
|
334
|
-
return
|
|
359
|
+
return Pe.call(e, t) ? e[t] : void 0;
|
|
335
360
|
}
|
|
336
|
-
var
|
|
337
|
-
function
|
|
361
|
+
var He = Object.prototype, We = He.hasOwnProperty;
|
|
362
|
+
function ze(t) {
|
|
338
363
|
var e = this.__data__;
|
|
339
|
-
return
|
|
340
|
-
}
|
|
341
|
-
var
|
|
342
|
-
function
|
|
343
|
-
var
|
|
344
|
-
return this.size += this.has(t) ? 0 : 1,
|
|
345
|
-
}
|
|
346
|
-
function
|
|
347
|
-
var e = -1,
|
|
348
|
-
for (this.clear(); ++e <
|
|
349
|
-
var
|
|
350
|
-
this.set(
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
function
|
|
364
|
+
return D ? e[t] !== void 0 : We.call(e, t);
|
|
365
|
+
}
|
|
366
|
+
var Qe = "__lodash_hash_undefined__";
|
|
367
|
+
function Ge(t, e) {
|
|
368
|
+
var n = this.__data__;
|
|
369
|
+
return this.size += this.has(t) ? 0 : 1, n[t] = D && e === void 0 ? Qe : e, this;
|
|
370
|
+
}
|
|
371
|
+
function m(t) {
|
|
372
|
+
var e = -1, n = t == null ? 0 : t.length;
|
|
373
|
+
for (this.clear(); ++e < n; ) {
|
|
374
|
+
var a = t[e];
|
|
375
|
+
this.set(a[0], a[1]);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
m.prototype.clear = je;
|
|
379
|
+
m.prototype.delete = Be;
|
|
380
|
+
m.prototype.get = Ve;
|
|
381
|
+
m.prototype.has = ze;
|
|
382
|
+
m.prototype.set = Ge;
|
|
383
|
+
function Je() {
|
|
359
384
|
this.__data__ = [], this.size = 0;
|
|
360
385
|
}
|
|
361
|
-
function
|
|
362
|
-
for (var
|
|
363
|
-
if (
|
|
364
|
-
return
|
|
386
|
+
function O(t, e) {
|
|
387
|
+
for (var n = t.length; n--; )
|
|
388
|
+
if (Ue(t[n][0], e))
|
|
389
|
+
return n;
|
|
365
390
|
return -1;
|
|
366
391
|
}
|
|
367
|
-
var
|
|
368
|
-
function
|
|
369
|
-
var e = this.__data__,
|
|
370
|
-
if (
|
|
392
|
+
var Ke = Array.prototype, Xe = Ke.splice;
|
|
393
|
+
function xe(t) {
|
|
394
|
+
var e = this.__data__, n = O(e, t);
|
|
395
|
+
if (n < 0)
|
|
371
396
|
return !1;
|
|
372
|
-
var
|
|
373
|
-
return
|
|
374
|
-
}
|
|
375
|
-
function
|
|
376
|
-
var e = this.__data__,
|
|
377
|
-
return
|
|
378
|
-
}
|
|
379
|
-
function
|
|
380
|
-
return
|
|
381
|
-
}
|
|
382
|
-
function
|
|
383
|
-
var
|
|
384
|
-
return
|
|
385
|
-
}
|
|
386
|
-
function
|
|
387
|
-
var e = -1,
|
|
388
|
-
for (this.clear(); ++e <
|
|
389
|
-
var
|
|
390
|
-
this.set(
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
var
|
|
399
|
-
const
|
|
400
|
-
function
|
|
397
|
+
var a = e.length - 1;
|
|
398
|
+
return n == a ? e.pop() : Xe.call(e, n, 1), --this.size, !0;
|
|
399
|
+
}
|
|
400
|
+
function Ye(t) {
|
|
401
|
+
var e = this.__data__, n = O(e, t);
|
|
402
|
+
return n < 0 ? void 0 : e[n][1];
|
|
403
|
+
}
|
|
404
|
+
function Ze(t) {
|
|
405
|
+
return O(this.__data__, t) > -1;
|
|
406
|
+
}
|
|
407
|
+
function et(t, e) {
|
|
408
|
+
var n = this.__data__, a = O(n, t);
|
|
409
|
+
return a < 0 ? (++this.size, n.push([t, e])) : n[a][1] = e, this;
|
|
410
|
+
}
|
|
411
|
+
function C(t) {
|
|
412
|
+
var e = -1, n = t == null ? 0 : t.length;
|
|
413
|
+
for (this.clear(); ++e < n; ) {
|
|
414
|
+
var a = t[e];
|
|
415
|
+
this.set(a[0], a[1]);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
C.prototype.clear = Je;
|
|
419
|
+
C.prototype.delete = xe;
|
|
420
|
+
C.prototype.get = Ye;
|
|
421
|
+
C.prototype.has = Ze;
|
|
422
|
+
C.prototype.set = et;
|
|
423
|
+
var tt = z(q, "Map");
|
|
424
|
+
const nt = tt;
|
|
425
|
+
function at() {
|
|
401
426
|
this.size = 0, this.__data__ = {
|
|
402
|
-
hash: new
|
|
403
|
-
map: new (
|
|
404
|
-
string: new
|
|
427
|
+
hash: new m(),
|
|
428
|
+
map: new (nt || C)(),
|
|
429
|
+
string: new m()
|
|
405
430
|
};
|
|
406
431
|
}
|
|
407
|
-
function
|
|
432
|
+
function rt(t) {
|
|
408
433
|
var e = typeof t;
|
|
409
434
|
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
|
|
410
435
|
}
|
|
411
|
-
function
|
|
412
|
-
var
|
|
413
|
-
return
|
|
436
|
+
function $(t, e) {
|
|
437
|
+
var n = t.__data__;
|
|
438
|
+
return rt(e) ? n[typeof e == "string" ? "string" : "hash"] : n.map;
|
|
414
439
|
}
|
|
415
|
-
function
|
|
416
|
-
var e =
|
|
440
|
+
function ot(t) {
|
|
441
|
+
var e = $(this, t).delete(t);
|
|
417
442
|
return this.size -= e ? 1 : 0, e;
|
|
418
443
|
}
|
|
419
|
-
function
|
|
420
|
-
return
|
|
444
|
+
function st(t) {
|
|
445
|
+
return $(this, t).get(t);
|
|
421
446
|
}
|
|
422
|
-
function
|
|
423
|
-
return
|
|
447
|
+
function it(t) {
|
|
448
|
+
return $(this, t).has(t);
|
|
424
449
|
}
|
|
425
|
-
function
|
|
426
|
-
var
|
|
427
|
-
return
|
|
450
|
+
function lt(t, e) {
|
|
451
|
+
var n = $(this, t), a = n.size;
|
|
452
|
+
return n.set(t, e), this.size += n.size == a ? 0 : 1, this;
|
|
428
453
|
}
|
|
429
|
-
function
|
|
430
|
-
var e = -1,
|
|
431
|
-
for (this.clear(); ++e <
|
|
432
|
-
var
|
|
433
|
-
this.set(
|
|
454
|
+
function w(t) {
|
|
455
|
+
var e = -1, n = t == null ? 0 : t.length;
|
|
456
|
+
for (this.clear(); ++e < n; ) {
|
|
457
|
+
var a = t[e];
|
|
458
|
+
this.set(a[0], a[1]);
|
|
434
459
|
}
|
|
435
460
|
}
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
var
|
|
442
|
-
function
|
|
461
|
+
w.prototype.clear = at;
|
|
462
|
+
w.prototype.delete = ot;
|
|
463
|
+
w.prototype.get = st;
|
|
464
|
+
w.prototype.has = it;
|
|
465
|
+
w.prototype.set = lt;
|
|
466
|
+
var ct = "Expected a function";
|
|
467
|
+
function A(t, e) {
|
|
443
468
|
if (typeof t != "function" || e != null && typeof e != "function")
|
|
444
|
-
throw new TypeError(
|
|
445
|
-
var
|
|
446
|
-
var
|
|
447
|
-
if (
|
|
448
|
-
return
|
|
449
|
-
var
|
|
450
|
-
return
|
|
469
|
+
throw new TypeError(ct);
|
|
470
|
+
var n = function() {
|
|
471
|
+
var a = arguments, r = e ? e.apply(this, a) : a[0], s = n.cache;
|
|
472
|
+
if (s.has(r))
|
|
473
|
+
return s.get(r);
|
|
474
|
+
var u = t.apply(this, a);
|
|
475
|
+
return n.cache = s.set(r, u) || s, u;
|
|
451
476
|
};
|
|
452
|
-
return
|
|
477
|
+
return n.cache = new (A.Cache || w)(), n;
|
|
453
478
|
}
|
|
454
|
-
|
|
455
|
-
const
|
|
456
|
-
class
|
|
457
|
-
constructor(e,
|
|
458
|
-
this.locale = e, this.queryRef =
|
|
479
|
+
A.Cache = w;
|
|
480
|
+
const dt = 2, Q = 1, G = "";
|
|
481
|
+
class M {
|
|
482
|
+
constructor(e, n, a) {
|
|
483
|
+
this.locale = e, this.queryRef = n, this.rawValue = a;
|
|
459
484
|
}
|
|
460
485
|
/**
|
|
461
486
|
* Creates a LoggingDataValue.
|
|
@@ -464,19 +489,19 @@ class R {
|
|
|
464
489
|
* @param queryRef a reference to the query that produced this value
|
|
465
490
|
* @param rawValue the raw value
|
|
466
491
|
*/
|
|
467
|
-
static create(e,
|
|
468
|
-
return
|
|
492
|
+
static create(e, n, a) {
|
|
493
|
+
return n.query.postAggr === "count" ? new ut(e, n, a) : new M(e, n, a);
|
|
469
494
|
}
|
|
470
|
-
getDecimals(e =
|
|
495
|
+
getDecimals(e = dt) {
|
|
471
496
|
return this.decimals ?? this.queryRef.query.decimals ?? e;
|
|
472
497
|
}
|
|
473
498
|
getFactor() {
|
|
474
|
-
var e,
|
|
475
|
-
return this.factor ?? this.queryRef.query.factor ?? ((
|
|
499
|
+
var e, n, a;
|
|
500
|
+
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) ?? Q;
|
|
476
501
|
}
|
|
477
502
|
getUnit() {
|
|
478
|
-
var e,
|
|
479
|
-
return this.unit ?? this.queryRef.query.unit ?? ((
|
|
503
|
+
var e, n, a;
|
|
504
|
+
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) ?? G;
|
|
480
505
|
}
|
|
481
506
|
setDecimals(e) {
|
|
482
507
|
this.decimals = e;
|
|
@@ -492,69 +517,244 @@ class R {
|
|
|
492
517
|
return this.rawValue;
|
|
493
518
|
}
|
|
494
519
|
toString() {
|
|
495
|
-
var
|
|
496
|
-
const e = this.locale ?? void 0,
|
|
497
|
-
const
|
|
520
|
+
var a, r, s, u;
|
|
521
|
+
const e = this.locale ?? void 0, n = A((i, l, p, d) => {
|
|
522
|
+
const g = {
|
|
498
523
|
style: "decimal",
|
|
499
|
-
minimumFractionDigits: Math.floor(
|
|
500
|
-
maximumFractionDigits: Math.floor(
|
|
524
|
+
minimumFractionDigits: Math.floor(l),
|
|
525
|
+
maximumFractionDigits: Math.floor(l)
|
|
501
526
|
};
|
|
502
|
-
return `${new Intl.NumberFormat(
|
|
527
|
+
return `${new Intl.NumberFormat(d, g).format(i)}${p ? " " + p : ""}`;
|
|
503
528
|
});
|
|
504
|
-
return this.rawValue === null ? "" : this.queryRef.query.postAggr === "count" ?
|
|
529
|
+
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(
|
|
505
530
|
this.rawValue,
|
|
506
531
|
Number.isInteger(this.getFactor()) ? this.getDecimals(0) : this.getDecimals(),
|
|
507
532
|
this.getUnit(),
|
|
508
533
|
e
|
|
509
|
-
) : ((
|
|
534
|
+
) : ((u = this.queryRef.variable) == null ? void 0 : u.type) === "float" ? n(this.rawValue, this.getDecimals(), this.getUnit(), e) : String(this.getValue());
|
|
510
535
|
}
|
|
511
536
|
}
|
|
512
|
-
class
|
|
537
|
+
class ut extends M {
|
|
513
538
|
getFactor() {
|
|
514
|
-
return this.factor ?? this.queryRef.query.factor ??
|
|
539
|
+
return this.factor ?? this.queryRef.query.factor ?? Q;
|
|
515
540
|
}
|
|
516
541
|
getUnit() {
|
|
517
|
-
return this.unit ?? this.queryRef.query.unit ??
|
|
542
|
+
return this.unit ?? this.queryRef.query.unit ?? G;
|
|
518
543
|
}
|
|
519
544
|
}
|
|
520
|
-
function
|
|
521
|
-
return t.map(({ queryRef:
|
|
522
|
-
const
|
|
545
|
+
function k(t) {
|
|
546
|
+
return t.map(({ queryRef: n, time: a, value: r }) => {
|
|
547
|
+
const s = new te(n.query, n.variable, n.tag), u = M.create(r.locale, s, r.rawValue);
|
|
523
548
|
return {
|
|
524
|
-
queryRef:
|
|
525
|
-
time:
|
|
526
|
-
value:
|
|
549
|
+
queryRef: s,
|
|
550
|
+
time: a,
|
|
551
|
+
value: u
|
|
527
552
|
};
|
|
528
553
|
});
|
|
529
554
|
}
|
|
555
|
+
let f, U, J;
|
|
556
|
+
function pt(t, e) {
|
|
557
|
+
if (J = /* @__PURE__ */ new Date(), t.nodeType !== Node.ELEMENT_NODE)
|
|
558
|
+
throw new Error("Can't generate CSS selector for non-element node type.");
|
|
559
|
+
if (t.tagName.toLowerCase() === "html")
|
|
560
|
+
return "html";
|
|
561
|
+
const n = {
|
|
562
|
+
root: document.body,
|
|
563
|
+
idName: (r) => !0,
|
|
564
|
+
className: (r) => !0,
|
|
565
|
+
tagName: (r) => !0,
|
|
566
|
+
attr: (r, s) => !1,
|
|
567
|
+
seedMinLength: 1,
|
|
568
|
+
optimizedMinLength: 2,
|
|
569
|
+
threshold: 1e3,
|
|
570
|
+
maxNumberOfTries: 1e4,
|
|
571
|
+
timeoutMs: void 0
|
|
572
|
+
};
|
|
573
|
+
f = { ...n, ...e }, U = gt(f.root, n);
|
|
574
|
+
let a = R(t, "all", () => R(t, "two", () => R(t, "one", () => R(t, "none"))));
|
|
575
|
+
if (a) {
|
|
576
|
+
const r = x(Y(a, t));
|
|
577
|
+
return r.length > 0 && (a = r[0]), I(a);
|
|
578
|
+
} else
|
|
579
|
+
throw new Error("Selector was not found.");
|
|
580
|
+
}
|
|
581
|
+
function gt(t, e) {
|
|
582
|
+
return t.nodeType === Node.DOCUMENT_NODE ? t : t === e.root ? t.ownerDocument : t;
|
|
583
|
+
}
|
|
584
|
+
function R(t, e, n) {
|
|
585
|
+
let a = null, r = [], s = t, u = 0;
|
|
586
|
+
for (; s; ) {
|
|
587
|
+
const i = (/* @__PURE__ */ new Date()).getTime() - J.getTime();
|
|
588
|
+
if (f.timeoutMs !== void 0 && i > f.timeoutMs)
|
|
589
|
+
throw new Error(`Timeout: Can't find a unique selector after ${i}ms`);
|
|
590
|
+
let l = v(yt(s)) || v(...ft(s)) || v(...ht(s)) || v(mt(s)) || [V()];
|
|
591
|
+
const p = wt(s);
|
|
592
|
+
if (e == "all")
|
|
593
|
+
p && (l = l.concat(l.filter(L).map((d) => b(d, p))));
|
|
594
|
+
else if (e == "two")
|
|
595
|
+
l = l.slice(0, 1), p && (l = l.concat(l.filter(L).map((d) => b(d, p))));
|
|
596
|
+
else if (e == "one") {
|
|
597
|
+
const [d] = l = l.slice(0, 1);
|
|
598
|
+
p && L(d) && (l = [b(d, p)]);
|
|
599
|
+
} else
|
|
600
|
+
e == "none" && (l = [V()], p && (l = [b(l[0], p)]));
|
|
601
|
+
for (let d of l)
|
|
602
|
+
d.level = u;
|
|
603
|
+
if (r.push(l), r.length >= f.seedMinLength && (a = F(r, n), a))
|
|
604
|
+
break;
|
|
605
|
+
s = s.parentElement, u++;
|
|
606
|
+
}
|
|
607
|
+
return a || (a = F(r, n)), !a && n ? n() : a;
|
|
608
|
+
}
|
|
609
|
+
function F(t, e) {
|
|
610
|
+
const n = x(X(t));
|
|
611
|
+
if (n.length > f.threshold)
|
|
612
|
+
return e ? e() : null;
|
|
613
|
+
for (let a of n)
|
|
614
|
+
if (K(a))
|
|
615
|
+
return a;
|
|
616
|
+
return null;
|
|
617
|
+
}
|
|
618
|
+
function I(t) {
|
|
619
|
+
let e = t[0], n = e.name;
|
|
620
|
+
for (let a = 1; a < t.length; a++) {
|
|
621
|
+
const r = t[a].level || 0;
|
|
622
|
+
e.level === r - 1 ? n = `${t[a].name} > ${n}` : n = `${t[a].name} ${n}`, e = t[a];
|
|
623
|
+
}
|
|
624
|
+
return n;
|
|
625
|
+
}
|
|
626
|
+
function P(t) {
|
|
627
|
+
return t.map((e) => e.penalty).reduce((e, n) => e + n, 0);
|
|
628
|
+
}
|
|
629
|
+
function K(t) {
|
|
630
|
+
const e = I(t);
|
|
631
|
+
switch (U.querySelectorAll(e).length) {
|
|
632
|
+
case 0:
|
|
633
|
+
throw new Error(`Can't select any node with this selector: ${e}`);
|
|
634
|
+
case 1:
|
|
635
|
+
return !0;
|
|
636
|
+
default:
|
|
637
|
+
return !1;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
function yt(t) {
|
|
641
|
+
const e = t.getAttribute("id");
|
|
642
|
+
return e && f.idName(e) ? {
|
|
643
|
+
name: "#" + CSS.escape(e),
|
|
644
|
+
penalty: 0
|
|
645
|
+
} : null;
|
|
646
|
+
}
|
|
647
|
+
function ft(t) {
|
|
648
|
+
return Array.from(t.attributes).filter((n) => f.attr(n.name, n.value)).map((n) => ({
|
|
649
|
+
name: `[${CSS.escape(n.name)}="${CSS.escape(n.value)}"]`,
|
|
650
|
+
penalty: 0.5
|
|
651
|
+
}));
|
|
652
|
+
}
|
|
653
|
+
function ht(t) {
|
|
654
|
+
return Array.from(t.classList).filter(f.className).map((n) => ({
|
|
655
|
+
name: "." + CSS.escape(n),
|
|
656
|
+
penalty: 1
|
|
657
|
+
}));
|
|
658
|
+
}
|
|
659
|
+
function mt(t) {
|
|
660
|
+
const e = t.tagName.toLowerCase();
|
|
661
|
+
return f.tagName(e) ? {
|
|
662
|
+
name: e,
|
|
663
|
+
penalty: 2
|
|
664
|
+
} : null;
|
|
665
|
+
}
|
|
666
|
+
function V() {
|
|
667
|
+
return {
|
|
668
|
+
name: "*",
|
|
669
|
+
penalty: 3
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
function wt(t) {
|
|
673
|
+
const e = t.parentNode;
|
|
674
|
+
if (!e)
|
|
675
|
+
return null;
|
|
676
|
+
let n = e.firstChild;
|
|
677
|
+
if (!n)
|
|
678
|
+
return null;
|
|
679
|
+
let a = 0;
|
|
680
|
+
for (; n && (n.nodeType === Node.ELEMENT_NODE && a++, n !== t); )
|
|
681
|
+
n = n.nextSibling;
|
|
682
|
+
return a;
|
|
683
|
+
}
|
|
684
|
+
function b(t, e) {
|
|
685
|
+
return {
|
|
686
|
+
name: t.name + `:nth-child(${e})`,
|
|
687
|
+
penalty: t.penalty + 1
|
|
688
|
+
};
|
|
689
|
+
}
|
|
690
|
+
function L(t) {
|
|
691
|
+
return t.name !== "html" && !t.name.startsWith("#");
|
|
692
|
+
}
|
|
693
|
+
function v(...t) {
|
|
694
|
+
const e = t.filter(Ct);
|
|
695
|
+
return e.length > 0 ? e : null;
|
|
696
|
+
}
|
|
697
|
+
function Ct(t) {
|
|
698
|
+
return t != null;
|
|
699
|
+
}
|
|
700
|
+
function* X(t, e = []) {
|
|
701
|
+
if (t.length > 0)
|
|
702
|
+
for (let n of t[0])
|
|
703
|
+
yield* X(t.slice(1, t.length), e.concat(n));
|
|
704
|
+
else
|
|
705
|
+
yield e;
|
|
706
|
+
}
|
|
707
|
+
function x(t) {
|
|
708
|
+
return [...t].sort((e, n) => P(e) - P(n));
|
|
709
|
+
}
|
|
710
|
+
function* Y(t, e, n = {
|
|
711
|
+
counter: 0,
|
|
712
|
+
visited: /* @__PURE__ */ new Map()
|
|
713
|
+
}) {
|
|
714
|
+
if (t.length > 2 && t.length > f.optimizedMinLength)
|
|
715
|
+
for (let a = 1; a < t.length - 1; a++) {
|
|
716
|
+
if (n.counter > f.maxNumberOfTries)
|
|
717
|
+
return;
|
|
718
|
+
n.counter += 1;
|
|
719
|
+
const r = [...t];
|
|
720
|
+
r.splice(a, 1);
|
|
721
|
+
const s = I(r);
|
|
722
|
+
if (n.visited.has(s))
|
|
723
|
+
return;
|
|
724
|
+
K(r) && _t(r, e) && (yield r, n.visited.set(s, !0), yield* Y(r, e, n));
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
function _t(t, e) {
|
|
728
|
+
return U.querySelector(I(t)) === e;
|
|
729
|
+
}
|
|
530
730
|
class h extends Error {
|
|
531
|
-
constructor() {
|
|
532
|
-
super(
|
|
731
|
+
constructor(e = "Method is not implemented") {
|
|
732
|
+
super(e), this.name = "NotImplementedError", this.message = e, this.stack = `NotImplementedError: ${e}`;
|
|
533
733
|
}
|
|
534
734
|
}
|
|
535
|
-
class
|
|
735
|
+
class Dt {
|
|
536
736
|
constructor(e) {
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
737
|
+
y(this, "ontimerangechange", null);
|
|
738
|
+
y(this, "onvpnclientstatuschange", null);
|
|
739
|
+
y(this, "_getApiLinks");
|
|
740
|
+
y(this, "appData");
|
|
741
|
+
y(this, "componentBaseUrl");
|
|
742
|
+
y(this, "destroyed");
|
|
743
|
+
y(this, "mode");
|
|
744
|
+
y(this, "inputs");
|
|
745
|
+
y(this, "inputMap");
|
|
746
|
+
y(this, "timeRange");
|
|
747
|
+
y(this, "timeRangeIsAdjustable");
|
|
748
|
+
y(this, "vpnClientStatus");
|
|
549
749
|
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);
|
|
550
750
|
}
|
|
551
751
|
_messageHandler(e) {
|
|
552
752
|
if (e.source === window.parent)
|
|
553
753
|
switch (e.data.type) {
|
|
554
|
-
case
|
|
754
|
+
case o.TimeRangeChange:
|
|
555
755
|
this.ontimerangechange && this.ontimerangechange(...e.data.payload);
|
|
556
756
|
break;
|
|
557
|
-
case
|
|
757
|
+
case o.VpnClientStatusChange:
|
|
558
758
|
this.onvpnclientstatuschange && this.onvpnclientstatuschange(...e.data.payload);
|
|
559
759
|
break;
|
|
560
760
|
}
|
|
@@ -563,21 +763,21 @@ class Xe {
|
|
|
563
763
|
const e = crypto.randomUUID();
|
|
564
764
|
return window.parent.postMessage(
|
|
565
765
|
{
|
|
566
|
-
type:
|
|
766
|
+
type: o.BackendComponentClientCreate,
|
|
567
767
|
payload: { clientId: e }
|
|
568
768
|
},
|
|
569
769
|
"*"
|
|
570
|
-
), new
|
|
770
|
+
), new Rt(e);
|
|
571
771
|
}
|
|
572
772
|
createLoggingDataClient() {
|
|
573
773
|
const e = crypto.randomUUID();
|
|
574
774
|
return window.parent.postMessage(
|
|
575
775
|
{
|
|
576
|
-
type:
|
|
776
|
+
type: o.LoggingDataClientCreate,
|
|
577
777
|
payload: { clientId: e }
|
|
578
778
|
},
|
|
579
779
|
"*"
|
|
580
|
-
), new
|
|
780
|
+
), new bt(e);
|
|
581
781
|
}
|
|
582
782
|
createObjectStorageClient() {
|
|
583
783
|
throw new h();
|
|
@@ -586,71 +786,102 @@ class Xe {
|
|
|
586
786
|
const e = crypto.randomUUID();
|
|
587
787
|
return window.parent.postMessage(
|
|
588
788
|
{
|
|
589
|
-
type:
|
|
789
|
+
type: o.ResourceDataClientCreate,
|
|
590
790
|
payload: { clientId: e }
|
|
591
791
|
},
|
|
592
792
|
"*"
|
|
593
|
-
), new
|
|
793
|
+
), new vt(e);
|
|
594
794
|
}
|
|
595
795
|
createTooltip() {
|
|
596
796
|
throw new h();
|
|
597
797
|
}
|
|
598
798
|
destroy() {
|
|
599
|
-
window.parent.postMessage({ type:
|
|
799
|
+
window.parent.postMessage({ type: o.Destroy }, "*"), window.removeEventListener("message", this._messageHandler, !1), this.destroyed = !0;
|
|
600
800
|
}
|
|
601
|
-
getApiUrl(e,
|
|
602
|
-
const
|
|
603
|
-
if (!
|
|
801
|
+
getApiUrl(e, n) {
|
|
802
|
+
const a = this._getApiLinks().get(e);
|
|
803
|
+
if (!a)
|
|
604
804
|
throw new Error("IxApiError: entry not found");
|
|
605
|
-
return
|
|
606
|
-
if (r.includes(`{${
|
|
607
|
-
return r.replace(`{${
|
|
608
|
-
const
|
|
609
|
-
return
|
|
610
|
-
},
|
|
805
|
+
return n ? Object.keys(n).sort().reduce((r, s) => {
|
|
806
|
+
if (r.includes(`{${s}}`))
|
|
807
|
+
return r.replace(`{${s}}`, n[s]);
|
|
808
|
+
const u = new URL(r);
|
|
809
|
+
return u.searchParams.set(s, n[s]), decodeURIComponent(u.href);
|
|
810
|
+
}, a.href) : a.href;
|
|
611
811
|
}
|
|
612
812
|
navigateByUrl(e) {
|
|
613
|
-
window.parent.postMessage({ type:
|
|
813
|
+
window.parent.postMessage({ type: o.NavigateByUrl, payload: { url: e } }, "*");
|
|
614
814
|
}
|
|
615
815
|
openActionBottomSheet(e) {
|
|
816
|
+
return new Promise((n) => {
|
|
817
|
+
window.addEventListener("message", a, !1), window.parent.postMessage({ type: o.OpenActionBottomSheet, payload: { options: e } }, "*");
|
|
818
|
+
function a(r) {
|
|
819
|
+
r.source === window.parent && r.data.type === o.OpenActionBottomSheetResult && (window.removeEventListener("message", a, !1), n(r.data.payload.result));
|
|
820
|
+
}
|
|
821
|
+
});
|
|
822
|
+
}
|
|
823
|
+
openActionMenu(e, n) {
|
|
616
824
|
return new Promise((a) => {
|
|
617
|
-
window.addEventListener("message",
|
|
618
|
-
function
|
|
619
|
-
|
|
825
|
+
window.addEventListener("message", r, !1), window.parent.postMessage({ type: o.OpenActionMenu, payload: { selector: pt(e), options: n } }, "*");
|
|
826
|
+
function r(s) {
|
|
827
|
+
s.source === window.parent && s.data.type === o.OpenActionMenuResult && (window.removeEventListener("message", r, !1), a(s.data.payload.result));
|
|
620
828
|
}
|
|
621
829
|
});
|
|
622
830
|
}
|
|
623
831
|
openAlertDialog(e) {
|
|
624
|
-
return new Promise((
|
|
625
|
-
window.addEventListener("message",
|
|
626
|
-
function
|
|
627
|
-
r.source === window.parent && r.data.type ===
|
|
832
|
+
return new Promise((n) => {
|
|
833
|
+
window.addEventListener("message", a, !1), window.parent.postMessage({ type: o.OpenAlertDialog, payload: { options: e } }, "*");
|
|
834
|
+
function a(r) {
|
|
835
|
+
r.source === window.parent && r.data.type === o.OpenAlertDialogResult && (window.removeEventListener("message", a, !1), n(r.data.payload.result));
|
|
628
836
|
}
|
|
629
837
|
});
|
|
630
838
|
}
|
|
631
839
|
openConfirmDialog(e) {
|
|
632
|
-
return new Promise((
|
|
633
|
-
window.addEventListener("message",
|
|
634
|
-
function
|
|
635
|
-
r.source === window.parent && r.data.type ===
|
|
840
|
+
return new Promise((n) => {
|
|
841
|
+
window.addEventListener("message", a, !1), window.parent.postMessage({ type: o.OpenConfirmDialog, payload: { options: e } }, "*");
|
|
842
|
+
function a(r) {
|
|
843
|
+
r.source === window.parent && r.data.type === o.OpenConfirmDialogResult && (window.removeEventListener("message", a, !1), n(r.data.payload.result));
|
|
844
|
+
}
|
|
845
|
+
});
|
|
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));
|
|
636
864
|
}
|
|
637
865
|
});
|
|
638
866
|
}
|
|
639
867
|
openFormDialog(e) {
|
|
640
|
-
return new Promise((
|
|
641
|
-
window.addEventListener("message",
|
|
642
|
-
function
|
|
643
|
-
r.source === window.parent && r.data.type ===
|
|
868
|
+
return new Promise((n) => {
|
|
869
|
+
window.addEventListener("message", a, !1), window.parent.postMessage({ type: o.OpenFormDialog, payload: { options: e } }, "*");
|
|
870
|
+
function a(r) {
|
|
871
|
+
r.source === window.parent && r.data.type === o.OpenFormDialogResult && (window.removeEventListener("message", a, !1), n(r.data.payload.result));
|
|
644
872
|
}
|
|
645
873
|
});
|
|
646
874
|
}
|
|
875
|
+
sanitizeHtml() {
|
|
876
|
+
throw new h();
|
|
877
|
+
}
|
|
647
878
|
saveAsFile() {
|
|
648
879
|
throw new h();
|
|
649
880
|
}
|
|
650
881
|
setTimeRange(e) {
|
|
651
882
|
window.parent.postMessage(
|
|
652
883
|
{
|
|
653
|
-
type:
|
|
884
|
+
type: o.SetTimeRange,
|
|
654
885
|
payload: { timeRange: e }
|
|
655
886
|
},
|
|
656
887
|
"*"
|
|
@@ -659,7 +890,7 @@ class Xe {
|
|
|
659
890
|
showVpnStatusDetails(e) {
|
|
660
891
|
window.parent.postMessage(
|
|
661
892
|
{
|
|
662
|
-
type:
|
|
893
|
+
type: o.ShowVpnStatusDetails,
|
|
663
894
|
payload: { agentId: e }
|
|
664
895
|
},
|
|
665
896
|
"*"
|
|
@@ -669,70 +900,70 @@ class Xe {
|
|
|
669
900
|
throw new h();
|
|
670
901
|
}
|
|
671
902
|
toggleVpn(e) {
|
|
672
|
-
window.parent.postMessage({ type:
|
|
903
|
+
window.parent.postMessage({ type: o.ToggleVpn, payload: { agentId: e } }, "*");
|
|
673
904
|
}
|
|
674
905
|
translate() {
|
|
675
906
|
throw new h();
|
|
676
907
|
}
|
|
677
908
|
}
|
|
678
|
-
class
|
|
909
|
+
class Rt {
|
|
679
910
|
constructor(e) {
|
|
680
911
|
this.id = e;
|
|
681
912
|
}
|
|
682
|
-
call(e,
|
|
683
|
-
return new Promise((
|
|
913
|
+
call(e, n) {
|
|
914
|
+
return new Promise((a) => {
|
|
684
915
|
const r = crypto.randomUUID();
|
|
685
|
-
window.addEventListener("message",
|
|
686
|
-
type:
|
|
916
|
+
window.addEventListener("message", s, !1), window.parent.postMessage({
|
|
917
|
+
type: o.BackendComponentClientCall,
|
|
687
918
|
payload: {
|
|
688
919
|
clientId: this.id,
|
|
689
920
|
callId: r,
|
|
690
921
|
functionName: e,
|
|
691
|
-
functionArguments:
|
|
922
|
+
functionArguments: n
|
|
692
923
|
}
|
|
693
924
|
});
|
|
694
|
-
function
|
|
695
|
-
|
|
925
|
+
function s(u) {
|
|
926
|
+
u.source === window.parent && u.data.type === o.BackendComponentClientCallResult && u.data.payload.callId === r && (window.removeEventListener("message", s, !1), a(u.data.payload.result));
|
|
696
927
|
}
|
|
697
928
|
});
|
|
698
929
|
}
|
|
699
930
|
destroy() {
|
|
700
931
|
window.parent.postMessage(
|
|
701
932
|
{
|
|
702
|
-
type:
|
|
933
|
+
type: o.BackendComponentClientDestroy,
|
|
703
934
|
payload: { clientId: this.id }
|
|
704
935
|
},
|
|
705
936
|
"*"
|
|
706
937
|
);
|
|
707
938
|
}
|
|
708
939
|
}
|
|
709
|
-
class
|
|
940
|
+
class bt {
|
|
710
941
|
constructor(e) {
|
|
711
942
|
this.id = e;
|
|
712
943
|
}
|
|
713
|
-
query(e,
|
|
714
|
-
const
|
|
944
|
+
query(e, n) {
|
|
945
|
+
const a = crypto.randomUUID();
|
|
715
946
|
return window.addEventListener("message", r, !1), window.parent.postMessage(
|
|
716
947
|
{
|
|
717
|
-
type:
|
|
718
|
-
payload: { clientId: this.id, queryId:
|
|
948
|
+
type: o.LoggingDataClientQuery,
|
|
949
|
+
payload: { clientId: this.id, queryId: a, query: e }
|
|
719
950
|
},
|
|
720
951
|
"*"
|
|
721
952
|
), () => {
|
|
722
953
|
window.removeEventListener("message", r, !1);
|
|
723
954
|
};
|
|
724
|
-
function r(
|
|
725
|
-
if (
|
|
726
|
-
const { results:
|
|
955
|
+
function r(s) {
|
|
956
|
+
if (s.source === window.parent && s.data.type === o.LoggingDataClientQueryResult && s.data.payload.queryId === a) {
|
|
957
|
+
const { results: u } = s.data.payload;
|
|
727
958
|
if (e.length)
|
|
728
959
|
if (!e.queries || e.format !== "csv") {
|
|
729
|
-
const
|
|
730
|
-
|
|
960
|
+
const i = u.map((l) => k(l));
|
|
961
|
+
n(i);
|
|
731
962
|
} else
|
|
732
963
|
throw new h();
|
|
733
964
|
else {
|
|
734
|
-
const
|
|
735
|
-
|
|
965
|
+
const i = k(u);
|
|
966
|
+
n(i);
|
|
736
967
|
}
|
|
737
968
|
}
|
|
738
969
|
}
|
|
@@ -740,90 +971,90 @@ class Ze {
|
|
|
740
971
|
destroy() {
|
|
741
972
|
window.parent.postMessage(
|
|
742
973
|
{
|
|
743
|
-
type:
|
|
974
|
+
type: o.LoggingDataClientDestroy,
|
|
744
975
|
payload: { clientId: this.id }
|
|
745
976
|
},
|
|
746
977
|
"*"
|
|
747
978
|
);
|
|
748
979
|
}
|
|
749
980
|
}
|
|
750
|
-
class
|
|
981
|
+
class vt {
|
|
751
982
|
constructor(e) {
|
|
752
983
|
this.id = e;
|
|
753
984
|
}
|
|
754
|
-
query(e,
|
|
755
|
-
const
|
|
985
|
+
query(e, n) {
|
|
986
|
+
const a = crypto.randomUUID();
|
|
756
987
|
return window.addEventListener("message", r, !1), window.parent.postMessage(
|
|
757
988
|
{
|
|
758
|
-
type:
|
|
759
|
-
payload: { clientId: this.id, queryId:
|
|
989
|
+
type: o.ResourceDataClientQuery,
|
|
990
|
+
payload: { clientId: this.id, queryId: a, query: e }
|
|
760
991
|
},
|
|
761
992
|
"*"
|
|
762
993
|
), () => {
|
|
763
994
|
window.removeEventListener("message", r, !1);
|
|
764
995
|
};
|
|
765
|
-
function r(
|
|
766
|
-
|
|
996
|
+
function r(s) {
|
|
997
|
+
s.source === window.parent && s.data.type === o.ResourceDataClientQueryResult && s.data.payload.queryId === a && n(s.data.payload.results);
|
|
767
998
|
}
|
|
768
999
|
}
|
|
769
1000
|
update(e) {
|
|
770
|
-
return new Promise((
|
|
771
|
-
const
|
|
1001
|
+
return new Promise((n) => {
|
|
1002
|
+
const a = crypto.randomUUID();
|
|
772
1003
|
window.addEventListener("message", r, !1), window.parent.postMessage(
|
|
773
1004
|
{
|
|
774
|
-
type:
|
|
775
|
-
payload: { clientId: this.id, updateId:
|
|
1005
|
+
type: o.ResourceDataClientUpdate,
|
|
1006
|
+
payload: { clientId: this.id, updateId: a, update: e }
|
|
776
1007
|
},
|
|
777
1008
|
"*"
|
|
778
1009
|
);
|
|
779
|
-
function r(
|
|
780
|
-
|
|
1010
|
+
function r(s) {
|
|
1011
|
+
s.source === window.parent && s.data.type === o.ResourceDataClientUpdated && s.data.payload.updateId === a && (window.removeEventListener("message", r, !1), n());
|
|
781
1012
|
}
|
|
782
1013
|
});
|
|
783
1014
|
}
|
|
784
|
-
render(e,
|
|
785
|
-
const
|
|
1015
|
+
render(e, n) {
|
|
1016
|
+
const a = crypto.randomUUID();
|
|
786
1017
|
return window.addEventListener("message", r, !1), window.parent.postMessage(
|
|
787
1018
|
{
|
|
788
|
-
type:
|
|
789
|
-
payload: { clientId: this.id, queryId:
|
|
1019
|
+
type: o.ResourceDataClientRender,
|
|
1020
|
+
payload: { clientId: this.id, queryId: a, query: e }
|
|
790
1021
|
},
|
|
791
1022
|
"*"
|
|
792
1023
|
), () => {
|
|
793
1024
|
window.removeEventListener("message", r, !1);
|
|
794
1025
|
};
|
|
795
|
-
function r(
|
|
796
|
-
|
|
1026
|
+
function r(s) {
|
|
1027
|
+
s.source === window.parent && s.data.type === o.ResourceDataClientRenderResult && s.data.payload.queryId === a && n(s.data.payload.results);
|
|
797
1028
|
}
|
|
798
1029
|
}
|
|
799
1030
|
destroy() {
|
|
800
1031
|
window.parent.postMessage(
|
|
801
1032
|
{
|
|
802
|
-
type:
|
|
1033
|
+
type: o.ResourceDataClientDestroy,
|
|
803
1034
|
payload: { clientId: this.id }
|
|
804
1035
|
},
|
|
805
1036
|
"*"
|
|
806
1037
|
);
|
|
807
1038
|
}
|
|
808
1039
|
}
|
|
809
|
-
function
|
|
1040
|
+
function T(t) {
|
|
810
1041
|
const e = !!(t && t.migrateInputs);
|
|
811
|
-
return !e &&
|
|
1042
|
+
return !e && T.__cache__ ? Promise.resolve(T.__cache__) : new Promise((n) => {
|
|
812
1043
|
window.addEventListener(
|
|
813
1044
|
"message",
|
|
814
|
-
function
|
|
815
|
-
if (r.source === window.parent && r.data && r.data.type ===
|
|
816
|
-
let
|
|
817
|
-
e && (
|
|
818
|
-
const
|
|
819
|
-
|
|
1045
|
+
function a(r) {
|
|
1046
|
+
if (r.source === window.parent && r.data && r.data.type === o.Created) {
|
|
1047
|
+
let s = r.data.payload;
|
|
1048
|
+
e && (s.inputs = t.migrateInputs(s.inputs, null));
|
|
1049
|
+
const u = new Dt(s);
|
|
1050
|
+
n(u), e || (T.__cache__ = u), window.removeEventListener("message", a, !1);
|
|
820
1051
|
}
|
|
821
1052
|
},
|
|
822
1053
|
!1
|
|
823
|
-
), window.parent.postMessage({ type:
|
|
1054
|
+
), window.parent.postMessage({ type: o.Create }, "*");
|
|
824
1055
|
});
|
|
825
1056
|
}
|
|
826
1057
|
export {
|
|
827
|
-
|
|
828
|
-
|
|
1058
|
+
Ot as connect,
|
|
1059
|
+
T as getComponentContext
|
|
829
1060
|
};
|