@soyio/soyio-widget 2.10.2 → 2.11.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 +530 -527
- package/dist/index.umd.cjs +26 -35
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,50 +1,58 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
|
|
1
|
+
var rn = Object.defineProperty;
|
|
2
|
+
var vt = Object.getOwnPropertySymbols, on = Object.getPrototypeOf, an = Object.prototype.hasOwnProperty, sn = Object.prototype.propertyIsEnumerable, un = Reflect.get;
|
|
3
|
+
var cn = (d, f, h) => f in d ? rn(d, f, { enumerable: !0, configurable: !0, writable: !0, value: h }) : d[f] = h;
|
|
4
|
+
var wt = (d, f) => {
|
|
5
|
+
var h = {};
|
|
6
|
+
for (var l in d)
|
|
7
|
+
an.call(d, l) && f.indexOf(l) < 0 && (h[l] = d[l]);
|
|
8
|
+
if (d != null && vt)
|
|
9
|
+
for (var l of vt(d))
|
|
10
|
+
f.indexOf(l) < 0 && sn.call(d, l) && (h[l] = d[l]);
|
|
11
|
+
return h;
|
|
12
|
+
};
|
|
13
|
+
var O = (d, f, h) => (cn(d, typeof f != "symbol" ? f + "" : f, h), h), dn = (d, f, h) => {
|
|
14
|
+
if (!f.has(d))
|
|
7
15
|
throw TypeError("Cannot " + h);
|
|
8
16
|
};
|
|
9
|
-
var
|
|
10
|
-
if (
|
|
17
|
+
var gt = (d, f, h) => {
|
|
18
|
+
if (f.has(d))
|
|
11
19
|
throw TypeError("Cannot add the same private member more than once");
|
|
12
|
-
|
|
20
|
+
f instanceof WeakSet ? f.add(d) : f.set(d, h);
|
|
13
21
|
};
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var y = (
|
|
22
|
+
var yt = (d, f, h) => (dn(d, f, "access private method"), h), Et = (d, f, h) => un(on(d), h, f);
|
|
23
|
+
var G = (d, f, h) => new Promise((l, g) => {
|
|
24
|
+
var y = (D) => {
|
|
17
25
|
try {
|
|
18
|
-
I(h.next(
|
|
26
|
+
I(h.next(D));
|
|
19
27
|
} catch (j) {
|
|
20
28
|
g(j);
|
|
21
29
|
}
|
|
22
|
-
}, E = (
|
|
30
|
+
}, E = (D) => {
|
|
23
31
|
try {
|
|
24
|
-
I(h.throw(
|
|
32
|
+
I(h.throw(D));
|
|
25
33
|
} catch (j) {
|
|
26
34
|
g(j);
|
|
27
35
|
}
|
|
28
|
-
}, I = (
|
|
29
|
-
I((h = h.apply(
|
|
36
|
+
}, I = (D) => D.done ? l(D.value) : Promise.resolve(D.value).then(y, E);
|
|
37
|
+
I((h = h.apply(d, f)).next());
|
|
30
38
|
});
|
|
31
|
-
function
|
|
32
|
-
for (var h = 0; h <
|
|
33
|
-
const
|
|
34
|
-
if (typeof
|
|
35
|
-
for (const g in
|
|
36
|
-
if (g !== "default" && !(g in
|
|
37
|
-
const y = Object.getOwnPropertyDescriptor(
|
|
38
|
-
y && Object.defineProperty(
|
|
39
|
+
function fn(d, f) {
|
|
40
|
+
for (var h = 0; h < f.length; h++) {
|
|
41
|
+
const l = f[h];
|
|
42
|
+
if (typeof l != "string" && !Array.isArray(l)) {
|
|
43
|
+
for (const g in l)
|
|
44
|
+
if (g !== "default" && !(g in d)) {
|
|
45
|
+
const y = Object.getOwnPropertyDescriptor(l, g);
|
|
46
|
+
y && Object.defineProperty(d, g, y.get ? y : {
|
|
39
47
|
enumerable: !0,
|
|
40
|
-
get: () =>
|
|
48
|
+
get: () => l[g]
|
|
41
49
|
});
|
|
42
50
|
}
|
|
43
51
|
}
|
|
44
52
|
}
|
|
45
|
-
return Object.freeze(Object.defineProperty(
|
|
53
|
+
return Object.freeze(Object.defineProperty(d, Symbol.toStringTag, { value: "Module" }));
|
|
46
54
|
}
|
|
47
|
-
class
|
|
55
|
+
class ln {
|
|
48
56
|
constructor() {
|
|
49
57
|
O(this, "tooltipElement", null);
|
|
50
58
|
O(this, "tooltipContent", null);
|
|
@@ -53,8 +61,8 @@ class sn {
|
|
|
53
61
|
this.createTooltipElement(), this.setupGlobalListeners();
|
|
54
62
|
}
|
|
55
63
|
createTooltipElement() {
|
|
56
|
-
const
|
|
57
|
-
|
|
64
|
+
const f = document.querySelector(`.${this.tooltipClass}`);
|
|
65
|
+
f == null || f.remove(), this.tooltipElement = document.createElement("div"), this.tooltipElement.className = this.tooltipClass, this.tooltipElement.style.cssText = `
|
|
58
66
|
position: fixed;
|
|
59
67
|
z-index: 99999;
|
|
60
68
|
background: white;
|
|
@@ -70,112 +78,106 @@ class sn {
|
|
|
70
78
|
transition: opacity 0.2s ease-in-out;
|
|
71
79
|
transform: translateX(-50%) translateY(-100%);
|
|
72
80
|
margin-top: -8px;
|
|
73
|
-
`, this.tooltipContent = document.createElement("div"), this.tooltipContent.style.cssText = "text-align: center;", this.tooltipElement.appendChild(this.tooltipContent);
|
|
74
|
-
const h = document.createElement("div");
|
|
75
|
-
h.style.cssText = `
|
|
76
|
-
position: absolute;
|
|
77
|
-
bottom: -4px;
|
|
78
|
-
left: 50%;
|
|
79
|
-
transform: translateX(-50%) rotate(45deg);
|
|
80
|
-
width: 8px;
|
|
81
|
-
height: 8px;
|
|
82
|
-
background: white;
|
|
83
|
-
box-shadow: 2px 2px 2px rgba(0,0,0,0.1);
|
|
84
|
-
`, this.tooltipElement.appendChild(h), document.body.appendChild(this.tooltipElement);
|
|
81
|
+
`, this.tooltipContent = document.createElement("div"), this.tooltipContent.style.cssText = "text-align: center;", this.tooltipElement.appendChild(this.tooltipContent), document.body.appendChild(this.tooltipElement);
|
|
85
82
|
}
|
|
86
83
|
setupGlobalListeners() {
|
|
87
84
|
window.addEventListener("scroll", () => this.hide(), !0), window.addEventListener("resize", () => this.hide()), window.addEventListener("orientationchange", () => this.hide());
|
|
88
85
|
}
|
|
89
|
-
show(
|
|
90
|
-
!this.tooltipElement || !this.tooltipContent || (this.hideTimeout && (clearTimeout(this.hideTimeout), this.hideTimeout = null), this.tooltipContent.textContent =
|
|
86
|
+
show(f, h, l) {
|
|
87
|
+
!this.tooltipElement || !this.tooltipContent || (this.hideTimeout && (clearTimeout(this.hideTimeout), this.hideTimeout = null), this.tooltipContent.textContent = f, this.tooltipElement.style.left = `${h}px`, this.tooltipElement.style.top = `${l}px`, this.tooltipElement.style.opacity = "1");
|
|
91
88
|
}
|
|
92
89
|
hide() {
|
|
93
90
|
this.tooltipElement && (this.tooltipElement.style.opacity = "0");
|
|
94
91
|
}
|
|
95
92
|
destroy() {
|
|
96
|
-
var
|
|
97
|
-
(
|
|
93
|
+
var f;
|
|
94
|
+
(f = this.tooltipElement) == null || f.remove(), this.tooltipElement = null, this.tooltipContent = null, this.hideTimeout && (clearTimeout(this.hideTimeout), this.hideTimeout = null);
|
|
98
95
|
}
|
|
99
96
|
}
|
|
100
|
-
const
|
|
97
|
+
const Ct = "https://app.soyio.id", Pt = "https://sandbox.soyio.id", hn = "https://privacy.soyio.id", mn = "https://privacy-sandbox.soyio.id", pn = [
|
|
101
98
|
"DISCLOSURE_REQUEST_SUCCESSFUL",
|
|
102
99
|
"IDENTITY_REGISTERED",
|
|
103
100
|
"IDENTITY_SIGNATURE",
|
|
104
101
|
"UNEXPECTED_ERROR",
|
|
105
102
|
"DENIED_CAMERA_PERMISSION",
|
|
106
103
|
"REJECTED_SIGNATURE"
|
|
107
|
-
],
|
|
104
|
+
], vn = "WIDGET_CLOSED", wn = 420, gn = 720, yn = 500, En = {
|
|
108
105
|
minWidth: "375px",
|
|
109
106
|
maxWidth: "50rem"
|
|
110
|
-
},
|
|
107
|
+
}, xn = {
|
|
111
108
|
minWidth: "375px",
|
|
112
109
|
maxWidth: "36rem"
|
|
113
|
-
},
|
|
110
|
+
}, Sn = {
|
|
114
111
|
minWidth: "375px",
|
|
115
112
|
maxWidth: "50rem"
|
|
116
113
|
};
|
|
117
|
-
function
|
|
118
|
-
return
|
|
119
|
-
if (!
|
|
114
|
+
function bn(d, f, h) {
|
|
115
|
+
return G(this, null, function* () {
|
|
116
|
+
if (!d.contentWindow)
|
|
120
117
|
throw new Error("Invalid iframe: contentWindow is null");
|
|
121
|
-
const
|
|
118
|
+
const l = yield Promise.resolve().then(() => ke);
|
|
122
119
|
try {
|
|
123
|
-
yield
|
|
120
|
+
yield l.send(d.contentWindow, "SET_APPEARANCE", { appearance: f, identifier: h });
|
|
124
121
|
} catch (g) {
|
|
125
122
|
console.error("Failed to send appearance config:", g);
|
|
126
123
|
}
|
|
127
124
|
});
|
|
128
125
|
}
|
|
129
|
-
const
|
|
126
|
+
const In = "IFRAME_READY", Wn = "IFRAME_HEIGHT_CHANGE", Cn = "TOOLTIP_STATE_CHANGE", Pn = "INFO_EVENT", Tn = "CONSENT_STATE_CHANGE", k = {
|
|
130
127
|
// BASE
|
|
131
128
|
onHeightChange: {},
|
|
132
129
|
onIframeReady: {},
|
|
133
130
|
onTooltipChange: {},
|
|
131
|
+
onInfo: {},
|
|
134
132
|
// CONSENT
|
|
135
133
|
onStateChange: {}
|
|
136
134
|
};
|
|
137
|
-
let
|
|
138
|
-
function
|
|
139
|
-
return
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
const h =
|
|
143
|
-
|
|
144
|
-
})),
|
|
145
|
-
const h =
|
|
146
|
-
|
|
147
|
-
})),
|
|
148
|
-
const h =
|
|
149
|
-
|
|
150
|
-
})),
|
|
151
|
-
const h =
|
|
152
|
-
|
|
135
|
+
let xt, St, bt, It, Wt;
|
|
136
|
+
function Rn() {
|
|
137
|
+
return G(this, null, function* () {
|
|
138
|
+
const d = yield Promise.resolve().then(() => ke);
|
|
139
|
+
xt || St || bt || It || Wt || (xt = d.on(Wn, (f) => G(this, null, function* () {
|
|
140
|
+
const h = f.data, l = k.onHeightChange[h.identifier];
|
|
141
|
+
l && l(h.height);
|
|
142
|
+
})), St = d.on(In, (f) => G(this, null, function* () {
|
|
143
|
+
const h = f.data, l = k.onIframeReady[h.identifier];
|
|
144
|
+
l && l();
|
|
145
|
+
})), bt = d.on(Cn, (f) => G(this, null, function* () {
|
|
146
|
+
const h = f.data, l = k.onTooltipChange[h.identifier];
|
|
147
|
+
l && l(h);
|
|
148
|
+
})), It = d.on(Tn, (f) => G(this, null, function* () {
|
|
149
|
+
const h = f.data, l = k.onStateChange[h.identifier];
|
|
150
|
+
l && l(h);
|
|
151
|
+
})), Wt = d.on(Pn, (h) => G(this, [h], function* ({ data: f }) {
|
|
152
|
+
const E = f, { identifier: l } = E, g = wt(E, ["identifier"]), y = k.onInfo[l];
|
|
153
|
+
y && y(g);
|
|
153
154
|
})));
|
|
154
155
|
});
|
|
155
156
|
}
|
|
156
|
-
function
|
|
157
|
+
function Tt(d, f) {
|
|
157
158
|
const {
|
|
158
159
|
onHeightChange: h,
|
|
159
|
-
onIframeReady:
|
|
160
|
+
onIframeReady: l,
|
|
160
161
|
onTooltipChange: g,
|
|
161
|
-
onStateChange: y
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
onStateChange: y,
|
|
163
|
+
onInfo: E
|
|
164
|
+
} = f;
|
|
165
|
+
h && (k.onHeightChange[d] = h), l && (k.onIframeReady[d] = l), g && (k.onTooltipChange[d] = g), y && (k.onStateChange[d] = y), E && (k.onInfo[d] = E);
|
|
164
166
|
}
|
|
165
|
-
function
|
|
166
|
-
delete
|
|
167
|
+
function An(d) {
|
|
168
|
+
delete k.onHeightChange[d], delete k.onIframeReady[d], delete k.onTooltipChange[d], delete k.onStateChange[d], delete k.onInfo[d];
|
|
167
169
|
}
|
|
168
|
-
function
|
|
169
|
-
const
|
|
170
|
-
|
|
170
|
+
function On(d) {
|
|
171
|
+
const f = document.getElementById(d);
|
|
172
|
+
f && (console.warn("ConsentBox iframe already exists. Removing existing before mounting new one."), f.remove());
|
|
171
173
|
}
|
|
172
|
-
function
|
|
173
|
-
const
|
|
174
|
-
if (!
|
|
175
|
-
throw new Error(`Iframe div container with id '${
|
|
176
|
-
if (
|
|
177
|
-
throw new Error(`Iframe container with id '${
|
|
178
|
-
const h =
|
|
174
|
+
function Nn(d) {
|
|
175
|
+
const f = document.querySelector(d);
|
|
176
|
+
if (!f)
|
|
177
|
+
throw new Error(`Iframe div container with id '${d}' not found`);
|
|
178
|
+
if (f.tagName.toLowerCase() !== "div")
|
|
179
|
+
throw new Error(`Iframe container with id '${d}' must be a <div> element`);
|
|
180
|
+
const h = f;
|
|
179
181
|
return h.style.position = "relative", h.style.cssText += `
|
|
180
182
|
padding: 0 !important;
|
|
181
183
|
margin: 0 !important;
|
|
@@ -187,9 +189,9 @@ function Cn(f) {
|
|
|
187
189
|
opacity: 1 !important;
|
|
188
190
|
`, h;
|
|
189
191
|
}
|
|
190
|
-
function
|
|
191
|
-
const
|
|
192
|
-
return
|
|
192
|
+
function Dn(d, f, h) {
|
|
193
|
+
const l = document.createElement("iframe");
|
|
194
|
+
return l.id = f, l.src = d, l.style.cssText += `
|
|
193
195
|
width: 100% !important;
|
|
194
196
|
min-width: ${h.minWidth} !important;
|
|
195
197
|
max-width: ${h.maxWidth} !important;
|
|
@@ -198,25 +200,25 @@ function Pn(f, d, h) {
|
|
|
198
200
|
opacity: 1;
|
|
199
201
|
transition: height 0.35s,
|
|
200
202
|
opacity 0.4s 0.1s;
|
|
201
|
-
`,
|
|
203
|
+
`, l;
|
|
202
204
|
}
|
|
203
|
-
function
|
|
205
|
+
function Ln() {
|
|
204
206
|
return Math.random().toString(36).substring(2, 10);
|
|
205
207
|
}
|
|
206
208
|
class be {
|
|
207
|
-
constructor(
|
|
209
|
+
constructor(f) {
|
|
208
210
|
O(this, "iframe", null);
|
|
209
211
|
O(this, "skeleton", null);
|
|
210
212
|
O(this, "options");
|
|
211
213
|
O(this, "appearance");
|
|
212
214
|
O(this, "tooltipManager");
|
|
213
|
-
O(this, "defaultIframeCSSConfig",
|
|
215
|
+
O(this, "defaultIframeCSSConfig", En);
|
|
214
216
|
O(this, "Skeleton", null);
|
|
215
217
|
O(this, "defaultUniqueId");
|
|
216
|
-
this.options =
|
|
218
|
+
this.options = f, this.appearance = f.appearance || null, this.tooltipManager = new ln(), this.defaultUniqueId = be.generateUniqueId();
|
|
217
219
|
}
|
|
218
220
|
static generateUniqueId() {
|
|
219
|
-
return
|
|
221
|
+
return Ln();
|
|
220
222
|
}
|
|
221
223
|
get uniqueIdentifier() {
|
|
222
224
|
return this.defaultUniqueId;
|
|
@@ -224,48 +226,49 @@ class be {
|
|
|
224
226
|
get iframeIdentifier() {
|
|
225
227
|
return `${this.defaultIframePrefix}-${this.uniqueIdentifier}`;
|
|
226
228
|
}
|
|
227
|
-
handleHeightChange(
|
|
228
|
-
if (!this.iframe || (this.iframe.style.height = `${
|
|
229
|
+
handleHeightChange(f) {
|
|
230
|
+
if (!this.iframe || (this.iframe.style.height = `${f}px`, f > 0))
|
|
229
231
|
return;
|
|
230
232
|
const { parentElement: h } = this.iframe;
|
|
231
233
|
h && (h.style.display = "none");
|
|
232
234
|
}
|
|
233
235
|
handleIframeReady() {
|
|
234
|
-
this.iframe && (this.options.onReady && this.options.onReady(),
|
|
236
|
+
this.iframe && (this.options.onReady && this.options.onReady(), bn(this.iframe, this.appearance, this.uniqueIdentifier), this.skeleton && this.skeleton.hide());
|
|
235
237
|
}
|
|
236
|
-
handleTooltipChange(
|
|
238
|
+
handleTooltipChange(f) {
|
|
237
239
|
if (!this.iframe)
|
|
238
240
|
return;
|
|
239
|
-
const h = this.iframe.getBoundingClientRect(), { text:
|
|
240
|
-
y ? this.tooltipManager.show(
|
|
241
|
+
const h = this.iframe.getBoundingClientRect(), { text: l, coordinates: g, isVisible: y } = f, E = g.x + h.left, I = g.y + h.top;
|
|
242
|
+
y ? this.tooltipManager.show(l, E, I) : this.tooltipManager.hide();
|
|
241
243
|
}
|
|
242
244
|
setupListeners() {
|
|
243
|
-
return
|
|
244
|
-
yield
|
|
245
|
-
const
|
|
245
|
+
return G(this, null, function* () {
|
|
246
|
+
yield Rn();
|
|
247
|
+
const f = {
|
|
246
248
|
onHeightChange: this.handleHeightChange.bind(this),
|
|
247
249
|
onIframeReady: this.handleIframeReady.bind(this),
|
|
248
|
-
onTooltipChange: this.handleTooltipChange.bind(this)
|
|
250
|
+
onTooltipChange: this.handleTooltipChange.bind(this),
|
|
251
|
+
onInfo: this.options.onEvent.bind(this)
|
|
249
252
|
};
|
|
250
|
-
|
|
253
|
+
Tt(this.uniqueIdentifier, f);
|
|
251
254
|
});
|
|
252
255
|
}
|
|
253
|
-
mount(
|
|
254
|
-
return
|
|
255
|
-
yield this.setupListeners(),
|
|
256
|
-
const h =
|
|
257
|
-
return this.iframe =
|
|
256
|
+
mount(f) {
|
|
257
|
+
return G(this, null, function* () {
|
|
258
|
+
yield this.setupListeners(), On(this.iframeIdentifier);
|
|
259
|
+
const h = Nn(f), l = this.iframeUrl();
|
|
260
|
+
return this.iframe = Dn(l, this.iframeIdentifier, this.defaultIframeCSSConfig), this.Skeleton && (this.skeleton = new this.Skeleton(this.uniqueIdentifier), this.skeleton.mount(h)), h.appendChild(this.iframe), this;
|
|
258
261
|
});
|
|
259
262
|
}
|
|
260
263
|
unmount() {
|
|
261
|
-
|
|
264
|
+
An(this.uniqueIdentifier), this.skeleton && (this.skeleton.hide(), this.skeleton = null), this.iframe && (this.iframe.remove(), this.iframe = null);
|
|
262
265
|
}
|
|
263
266
|
}
|
|
264
|
-
class
|
|
265
|
-
constructor(
|
|
267
|
+
class zn {
|
|
268
|
+
constructor(f) {
|
|
266
269
|
O(this, "element");
|
|
267
270
|
O(this, "identifier");
|
|
268
|
-
this.identifier = `skeleton-${
|
|
271
|
+
this.identifier = `skeleton-${f}`, this.element = document.createElement("div"), this.element.id = this.identifier, this.element.style.cssText = `
|
|
269
272
|
position: absolute;
|
|
270
273
|
left: 50%;
|
|
271
274
|
top: 50%;
|
|
@@ -292,8 +295,8 @@ class Rn {
|
|
|
292
295
|
flex-direction: column;
|
|
293
296
|
justify-content: space-between;
|
|
294
297
|
`;
|
|
295
|
-
const
|
|
296
|
-
|
|
298
|
+
const l = document.createElement("div");
|
|
299
|
+
l.style.cssText = `
|
|
297
300
|
display: flex;
|
|
298
301
|
align-items: center;
|
|
299
302
|
gap: 0.75rem;
|
|
@@ -334,8 +337,8 @@ class Rn {
|
|
|
334
337
|
align-items: center;
|
|
335
338
|
gap: 1rem;
|
|
336
339
|
`;
|
|
337
|
-
const
|
|
338
|
-
|
|
340
|
+
const D = document.createElement("div");
|
|
341
|
+
D.style.cssText = `
|
|
339
342
|
width: 1rem;
|
|
340
343
|
height: 1rem;
|
|
341
344
|
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
|
@@ -352,8 +355,8 @@ class Rn {
|
|
|
352
355
|
flex-direction: column;
|
|
353
356
|
gap: 0.5rem;
|
|
354
357
|
`;
|
|
355
|
-
const
|
|
356
|
-
|
|
358
|
+
const B = document.createElement("div");
|
|
359
|
+
B.style.cssText = `
|
|
357
360
|
height: 0.875rem;
|
|
358
361
|
width: 80%;
|
|
359
362
|
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
|
@@ -370,70 +373,70 @@ class Rn {
|
|
|
370
373
|
animation: shimmer 1.5s infinite;
|
|
371
374
|
border-radius: 0.125rem;
|
|
372
375
|
`, !document.getElementById("skeleton-animation")) {
|
|
373
|
-
const
|
|
374
|
-
|
|
376
|
+
const Z = document.createElement("style");
|
|
377
|
+
Z.id = "skeleton-animation", Z.textContent = `
|
|
375
378
|
@keyframes shimmer {
|
|
376
379
|
0% { background-position: 200% 0; }
|
|
377
380
|
100% { background-position: -200% 0; }
|
|
378
381
|
}
|
|
379
|
-
`, document.head.appendChild(
|
|
382
|
+
`, document.head.appendChild(Z);
|
|
380
383
|
}
|
|
381
|
-
|
|
384
|
+
l.appendChild(g), l.appendChild(y), l.appendChild(E), j.appendChild(B), j.appendChild(oe), I.appendChild(D), I.appendChild(j), h.appendChild(l), h.appendChild(I), this.element.appendChild(h);
|
|
382
385
|
}
|
|
383
386
|
cleanupExistingSkeleton() {
|
|
384
|
-
const
|
|
385
|
-
|
|
387
|
+
const f = document.getElementById(this.identifier);
|
|
388
|
+
f && f.remove();
|
|
386
389
|
}
|
|
387
|
-
mount(
|
|
388
|
-
this.cleanupExistingSkeleton(),
|
|
390
|
+
mount(f) {
|
|
391
|
+
this.cleanupExistingSkeleton(), f.appendChild(this.element);
|
|
389
392
|
}
|
|
390
393
|
hide() {
|
|
391
394
|
this.element.style.opacity = "0", setTimeout(() => this.element.remove(), 300);
|
|
392
395
|
}
|
|
393
396
|
}
|
|
394
|
-
function
|
|
397
|
+
function Mn(d) {
|
|
395
398
|
var E;
|
|
396
|
-
const
|
|
399
|
+
const f = [
|
|
397
400
|
"actionToken",
|
|
398
401
|
"entityId",
|
|
399
402
|
"context",
|
|
400
403
|
"optionalReconsentBehavior",
|
|
401
404
|
"mandatoryReconsentBehavior"
|
|
402
|
-
], h = (E =
|
|
403
|
-
|
|
404
|
-
|
|
405
|
+
], h = (E = d.isSandbox) != null ? E : !1, l = d.developmentUrl || (h ? Pt : Ct), g = new URLSearchParams();
|
|
406
|
+
f.forEach((I) => {
|
|
407
|
+
d[I] && g.set(I, d[I]);
|
|
405
408
|
});
|
|
406
409
|
const y = g.toString();
|
|
407
|
-
return `${
|
|
410
|
+
return `${l}/embed/consents/${d.consentTemplateId}${y ? `?${y}` : ""}`;
|
|
408
411
|
}
|
|
409
|
-
class
|
|
412
|
+
class Rt extends be {
|
|
410
413
|
constructor(h) {
|
|
411
414
|
super(h);
|
|
412
415
|
O(this, "defaultIframePrefix", "consent-box");
|
|
413
|
-
O(this, "defaultIframeCSSConfig",
|
|
416
|
+
O(this, "defaultIframeCSSConfig", xn);
|
|
414
417
|
O(this, "state", {
|
|
415
418
|
isSelected: !1,
|
|
416
419
|
actionToken: null
|
|
417
420
|
});
|
|
418
|
-
this.Skeleton =
|
|
421
|
+
this.Skeleton = zn;
|
|
419
422
|
}
|
|
420
423
|
get uniqueIdentifier() {
|
|
421
424
|
return this.options.consentTemplateId;
|
|
422
425
|
}
|
|
423
426
|
iframeUrl() {
|
|
424
|
-
return
|
|
427
|
+
return Mn(this.options);
|
|
425
428
|
}
|
|
426
429
|
handleStateChange(h) {
|
|
427
|
-
const { isSelected:
|
|
428
|
-
this.state = { isSelected:
|
|
430
|
+
const { isSelected: l, actionToken: g } = h;
|
|
431
|
+
this.state = { isSelected: l, actionToken: g }, this.options.onEvent({
|
|
429
432
|
eventName: "CONSENT_CHECKBOX_CHANGE",
|
|
430
|
-
isSelected:
|
|
433
|
+
isSelected: l,
|
|
431
434
|
actionToken: g
|
|
432
435
|
});
|
|
433
436
|
}
|
|
434
437
|
setupListeners() {
|
|
435
|
-
return
|
|
436
|
-
yield
|
|
438
|
+
return G(this, null, function* () {
|
|
439
|
+
yield Et(Rt.prototype, this, "setupListeners").call(this), Tt(this.uniqueIdentifier, {
|
|
437
440
|
onStateChange: this.handleStateChange.bind(this)
|
|
438
441
|
});
|
|
439
442
|
});
|
|
@@ -442,123 +445,123 @@ class Ct extends be {
|
|
|
442
445
|
return this.state;
|
|
443
446
|
}
|
|
444
447
|
}
|
|
445
|
-
function
|
|
448
|
+
function jn(d) {
|
|
446
449
|
var E;
|
|
447
|
-
const
|
|
450
|
+
const f = [
|
|
448
451
|
"subjectId",
|
|
449
452
|
"companyId"
|
|
450
|
-
], h = (E =
|
|
451
|
-
|
|
452
|
-
|
|
453
|
+
], h = (E = d.isSandbox) != null ? E : !1, l = d.developmentUrl || (h ? mn : hn), g = new URLSearchParams();
|
|
454
|
+
f.forEach((I) => {
|
|
455
|
+
d[I] && g.set(I, d[I]);
|
|
453
456
|
});
|
|
454
457
|
const y = g.toString();
|
|
455
|
-
return `${
|
|
458
|
+
return `${l}/${y ? `?${y}` : ""}`;
|
|
456
459
|
}
|
|
457
|
-
class
|
|
460
|
+
class Qn extends be {
|
|
458
461
|
constructor() {
|
|
459
462
|
super(...arguments);
|
|
460
463
|
O(this, "defaultIframePrefix", "privacy-center");
|
|
461
464
|
O(this, "_uniqueIdentifier", "privacy-center");
|
|
462
|
-
O(this, "defaultIframeCSSConfig",
|
|
465
|
+
O(this, "defaultIframeCSSConfig", Sn);
|
|
463
466
|
}
|
|
464
467
|
get uniqueIdentifier() {
|
|
465
468
|
return this._uniqueIdentifier;
|
|
466
469
|
}
|
|
467
470
|
iframeUrl() {
|
|
468
|
-
return
|
|
471
|
+
return jn(this.options);
|
|
469
472
|
}
|
|
470
473
|
}
|
|
471
|
-
const
|
|
474
|
+
const er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
472
475
|
__proto__: null
|
|
473
476
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
474
|
-
function
|
|
475
|
-
let
|
|
476
|
-
return "disclosureRequestId" in
|
|
477
|
+
function kn(d) {
|
|
478
|
+
let f = "widget/";
|
|
479
|
+
return "disclosureRequestId" in d.configProps ? f += ["disclosures", d.configProps.disclosureRequestId].join("/") : f += d.request, f;
|
|
477
480
|
}
|
|
478
|
-
function
|
|
481
|
+
function Un(d) {
|
|
479
482
|
var y;
|
|
480
|
-
const
|
|
481
|
-
return `${h}/${g}?sdk=web&${
|
|
483
|
+
const f = (y = d.isSandbox) != null ? y : !1, h = d.developmentUrl || (f ? Pt : Ct), l = Object.entries(d.configProps).filter(([E, I]) => I || E === "disclosureRequestId").map(([E, I]) => `${E}=${encodeURIComponent(I)}`).join("&"), g = kn(d);
|
|
484
|
+
return `${h}/${g}?sdk=web&${l}`;
|
|
482
485
|
}
|
|
483
|
-
const
|
|
484
|
-
let
|
|
485
|
-
function Me(
|
|
486
|
-
|
|
486
|
+
const Fn = !!(typeof window != "undefined" && window.document && window.document.createElement);
|
|
487
|
+
let J = null, ze = null;
|
|
488
|
+
function Me(d = null) {
|
|
489
|
+
J && !J.closed && J.focus(), d == null || d.preventDefault();
|
|
487
490
|
}
|
|
488
491
|
function je() {
|
|
489
492
|
document.body.style.filter = "", document.body.removeEventListener("click", Me);
|
|
490
493
|
}
|
|
491
|
-
function
|
|
494
|
+
function Hn() {
|
|
492
495
|
ze = setInterval(() => {
|
|
493
|
-
(!
|
|
494
|
-
},
|
|
496
|
+
(!J || J.closed) && (ze && clearInterval(ze), je());
|
|
497
|
+
}, yn);
|
|
495
498
|
}
|
|
496
|
-
function
|
|
497
|
-
const
|
|
498
|
-
document.body.style.filter = "blur(5px)", document.body.addEventListener("click", Me),
|
|
499
|
-
|
|
499
|
+
function _n(d) {
|
|
500
|
+
const f = Un(d), h = wn, l = gn, g = window.screenLeft !== void 0 ? window.screenLeft : window.screenX, y = window.screenTop !== void 0 ? window.screenTop : window.screenY, E = window.innerWidth || document.documentElement.clientWidth || window.screen.width, I = window.innerHeight || document.documentElement.clientHeight || window.screen.height, D = E / window.screen.availWidth, j = (E - h) / 2 / D + g, B = (I - l) / 2 / D + y;
|
|
501
|
+
document.body.style.filter = "blur(5px)", document.body.addEventListener("click", Me), J = window.open(
|
|
502
|
+
f,
|
|
500
503
|
"Soyio",
|
|
501
504
|
`scrollbars=yes,
|
|
502
505
|
width=${h},
|
|
503
|
-
height=${
|
|
504
|
-
top=${
|
|
506
|
+
height=${l},
|
|
507
|
+
top=${B},
|
|
505
508
|
left=${j}`
|
|
506
|
-
), Me(),
|
|
509
|
+
), Me(), Hn();
|
|
507
510
|
}
|
|
508
|
-
function
|
|
509
|
-
|
|
511
|
+
function qn() {
|
|
512
|
+
J && (J.close(), J = null), je();
|
|
510
513
|
}
|
|
511
|
-
const
|
|
514
|
+
const Gn = "WIDGET_EVENT";
|
|
512
515
|
let me = null;
|
|
513
|
-
function
|
|
516
|
+
function Bn() {
|
|
514
517
|
me && (me.cancel(), me = null);
|
|
515
518
|
}
|
|
516
|
-
function
|
|
517
|
-
return
|
|
518
|
-
const { onEvent:
|
|
519
|
-
me &&
|
|
520
|
-
|
|
519
|
+
function $n(d) {
|
|
520
|
+
return G(this, null, function* () {
|
|
521
|
+
const { onEvent: f } = d, h = yield Promise.resolve().then(() => ke);
|
|
522
|
+
me && Bn(), me = h.on(Gn, (l) => G(this, null, function* () {
|
|
523
|
+
f(l.data), pn.includes(l.data.eventName) ? qn() : l.data.eventName === vn && je();
|
|
521
524
|
}));
|
|
522
525
|
});
|
|
523
526
|
}
|
|
524
|
-
function
|
|
525
|
-
|
|
527
|
+
function Vn(d) {
|
|
528
|
+
$n(d);
|
|
526
529
|
}
|
|
527
|
-
var Se,
|
|
528
|
-
class
|
|
529
|
-
constructor(
|
|
530
|
-
|
|
530
|
+
var Se, At;
|
|
531
|
+
class tr {
|
|
532
|
+
constructor(f) {
|
|
533
|
+
gt(this, Se);
|
|
531
534
|
O(this, "onEvent");
|
|
532
|
-
this.onEvent =
|
|
533
|
-
onEvent:
|
|
535
|
+
this.onEvent = f.onEvent, Fn && (_n(f), Vn({
|
|
536
|
+
onEvent: yt(this, Se, At).bind(this)
|
|
534
537
|
}));
|
|
535
538
|
}
|
|
536
539
|
}
|
|
537
|
-
Se = new WeakSet(),
|
|
538
|
-
this.onEvent(
|
|
540
|
+
Se = new WeakSet(), At = function(f) {
|
|
541
|
+
this.onEvent(f);
|
|
539
542
|
};
|
|
540
|
-
var
|
|
541
|
-
function
|
|
542
|
-
return
|
|
543
|
+
var Yn = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {};
|
|
544
|
+
function Jn(d) {
|
|
545
|
+
return d && d.__esModule && Object.prototype.hasOwnProperty.call(d, "default") ? d.default : d;
|
|
543
546
|
}
|
|
544
|
-
var
|
|
545
|
-
(function(
|
|
546
|
-
(function(h,
|
|
547
|
-
|
|
548
|
-
})(typeof self != "undefined" ? self :
|
|
547
|
+
var Ot = { exports: {} }, Nt = { exports: {} };
|
|
548
|
+
(function(d, f) {
|
|
549
|
+
(function(h, l) {
|
|
550
|
+
d.exports = l();
|
|
551
|
+
})(typeof self != "undefined" ? self : Yn, function() {
|
|
549
552
|
return function(h) {
|
|
550
|
-
var
|
|
553
|
+
var l = {};
|
|
551
554
|
function g(y) {
|
|
552
|
-
if (
|
|
553
|
-
return
|
|
554
|
-
var E =
|
|
555
|
+
if (l[y])
|
|
556
|
+
return l[y].exports;
|
|
557
|
+
var E = l[y] = {
|
|
555
558
|
i: y,
|
|
556
559
|
l: !1,
|
|
557
560
|
exports: {}
|
|
558
561
|
};
|
|
559
562
|
return h[y].call(E.exports, E, E.exports, g), E.l = !0, E.exports;
|
|
560
563
|
}
|
|
561
|
-
return g.m = h, g.c =
|
|
564
|
+
return g.m = h, g.c = l, g.d = function(y, E, I) {
|
|
562
565
|
g.o(y, E) || Object.defineProperty(y, E, {
|
|
563
566
|
enumerable: !0,
|
|
564
567
|
get: I
|
|
@@ -577,10 +580,10 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
577
580
|
enumerable: !0,
|
|
578
581
|
value: y
|
|
579
582
|
}), 2 & E && typeof y != "string")
|
|
580
|
-
for (var
|
|
581
|
-
g.d(I,
|
|
583
|
+
for (var D in y)
|
|
584
|
+
g.d(I, D, function(j) {
|
|
582
585
|
return y[j];
|
|
583
|
-
}.bind(null,
|
|
586
|
+
}.bind(null, D));
|
|
584
587
|
return I;
|
|
585
588
|
}, g.n = function(y) {
|
|
586
589
|
var E = y && y.__esModule ? function() {
|
|
@@ -592,36 +595,36 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
592
595
|
}, g.o = function(y, E) {
|
|
593
596
|
return {}.hasOwnProperty.call(y, E);
|
|
594
597
|
}, g.p = "", g(g.s = 0);
|
|
595
|
-
}([function(h,
|
|
596
|
-
g.r(
|
|
598
|
+
}([function(h, l, g) {
|
|
599
|
+
g.r(l), g.d(l, "Promise", function() {
|
|
597
600
|
return C;
|
|
598
|
-
}), g.d(
|
|
599
|
-
return
|
|
600
|
-
}), g.d(
|
|
601
|
-
return
|
|
602
|
-
}), g.d(
|
|
601
|
+
}), g.d(l, "TYPES", function() {
|
|
602
|
+
return tn;
|
|
603
|
+
}), g.d(l, "ProxyWindow", function() {
|
|
604
|
+
return q;
|
|
605
|
+
}), g.d(l, "setup", function() {
|
|
603
606
|
return pt;
|
|
604
|
-
}), g.d(
|
|
607
|
+
}), g.d(l, "destroy", function() {
|
|
608
|
+
return en;
|
|
609
|
+
}), g.d(l, "serializeMessage", function() {
|
|
605
610
|
return Zt;
|
|
606
|
-
}), g.d(
|
|
607
|
-
return Yt;
|
|
608
|
-
}), g.d(p, "deserializeMessage", function() {
|
|
609
|
-
return Jt;
|
|
610
|
-
}), g.d(p, "createProxyWindow", function() {
|
|
611
|
-
return Vt;
|
|
612
|
-
}), g.d(p, "toProxyWindow", function() {
|
|
611
|
+
}), g.d(l, "deserializeMessage", function() {
|
|
613
612
|
return Xt;
|
|
614
|
-
}), g.d(
|
|
615
|
-
return
|
|
616
|
-
}), g.d(
|
|
617
|
-
return
|
|
618
|
-
}), g.d(
|
|
613
|
+
}), g.d(l, "createProxyWindow", function() {
|
|
614
|
+
return Kt;
|
|
615
|
+
}), g.d(l, "toProxyWindow", function() {
|
|
616
|
+
return Qt;
|
|
617
|
+
}), g.d(l, "on", function() {
|
|
618
|
+
return X;
|
|
619
|
+
}), g.d(l, "once", function() {
|
|
620
|
+
return Jt;
|
|
621
|
+
}), g.d(l, "send", function() {
|
|
619
622
|
return K;
|
|
620
|
-
}), g.d(
|
|
623
|
+
}), g.d(l, "markWindowKnown", function() {
|
|
621
624
|
return rt;
|
|
622
|
-
}), g.d(
|
|
623
|
-
return
|
|
624
|
-
}), g.d(
|
|
625
|
+
}), g.d(l, "cleanUpWindow", function() {
|
|
626
|
+
return nn;
|
|
627
|
+
}), g.d(l, "bridge", function() {
|
|
625
628
|
});
|
|
626
629
|
function y(e) {
|
|
627
630
|
return {}.toString.call(e) === "[object RegExp]";
|
|
@@ -631,7 +634,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
631
634
|
function I(e) {
|
|
632
635
|
return e === void 0 && (e = window), e.location.protocol;
|
|
633
636
|
}
|
|
634
|
-
function
|
|
637
|
+
function D(e) {
|
|
635
638
|
if (e === void 0 && (e = window), e.mockDomain) {
|
|
636
639
|
var n = e.mockDomain.split("//")[0];
|
|
637
640
|
if (n)
|
|
@@ -640,9 +643,9 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
640
643
|
return I(e);
|
|
641
644
|
}
|
|
642
645
|
function j(e) {
|
|
643
|
-
return e === void 0 && (e = window),
|
|
646
|
+
return e === void 0 && (e = window), D(e) === "about:";
|
|
644
647
|
}
|
|
645
|
-
function
|
|
648
|
+
function B(e) {
|
|
646
649
|
if (e === void 0 && (e = window), e)
|
|
647
650
|
try {
|
|
648
651
|
if (e.parent && e.parent !== e)
|
|
@@ -651,13 +654,13 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
651
654
|
}
|
|
652
655
|
}
|
|
653
656
|
function oe(e) {
|
|
654
|
-
if (e === void 0 && (e = window), e && !
|
|
657
|
+
if (e === void 0 && (e = window), e && !B(e))
|
|
655
658
|
try {
|
|
656
659
|
return e.opener;
|
|
657
660
|
} catch (n) {
|
|
658
661
|
}
|
|
659
662
|
}
|
|
660
|
-
function
|
|
663
|
+
function Z(e) {
|
|
661
664
|
try {
|
|
662
665
|
return !0;
|
|
663
666
|
} catch (n) {
|
|
@@ -675,15 +678,15 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
675
678
|
if (t === "file:")
|
|
676
679
|
return "file://";
|
|
677
680
|
if (t === "about:") {
|
|
678
|
-
var r =
|
|
679
|
-
return r &&
|
|
681
|
+
var r = B(e);
|
|
682
|
+
return r && Z() ? pe(r) : "about://";
|
|
680
683
|
}
|
|
681
684
|
var o = n.host;
|
|
682
685
|
if (!o)
|
|
683
686
|
throw new Error("Can not read window host");
|
|
684
687
|
return t + "//" + o;
|
|
685
688
|
}
|
|
686
|
-
function
|
|
689
|
+
function U(e) {
|
|
687
690
|
e === void 0 && (e = window);
|
|
688
691
|
var n = pe(e);
|
|
689
692
|
return n && e.mockDomain && e.mockDomain.indexOf("mock:") === 0 ? e.mockDomain : n;
|
|
@@ -702,14 +705,14 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
702
705
|
} catch (r) {
|
|
703
706
|
}
|
|
704
707
|
try {
|
|
705
|
-
if (j(n) &&
|
|
708
|
+
if (j(n) && Z())
|
|
706
709
|
return !0;
|
|
707
710
|
} catch (r) {
|
|
708
711
|
}
|
|
709
712
|
try {
|
|
710
713
|
if (function(r) {
|
|
711
|
-
return r === void 0 && (r = window),
|
|
712
|
-
}(n) &&
|
|
714
|
+
return r === void 0 && (r = window), D(r) === "mock:";
|
|
715
|
+
}(n) && Z())
|
|
713
716
|
return !0;
|
|
714
717
|
} catch (r) {
|
|
715
718
|
}
|
|
@@ -722,7 +725,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
722
725
|
}(e))
|
|
723
726
|
return !1;
|
|
724
727
|
try {
|
|
725
|
-
if (e === window || j(e) &&
|
|
728
|
+
if (e === window || j(e) && Z() || U(window) === U(e))
|
|
726
729
|
return !0;
|
|
727
730
|
} catch (n) {
|
|
728
731
|
}
|
|
@@ -736,7 +739,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
736
739
|
function Ue(e, n) {
|
|
737
740
|
if (!e || !n)
|
|
738
741
|
return !1;
|
|
739
|
-
var t =
|
|
742
|
+
var t = B(n);
|
|
740
743
|
return t ? t === e : function(r) {
|
|
741
744
|
var o = [];
|
|
742
745
|
try {
|
|
@@ -786,8 +789,8 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
786
789
|
}
|
|
787
790
|
return n;
|
|
788
791
|
}
|
|
789
|
-
var
|
|
790
|
-
function
|
|
792
|
+
var Lt = [], zt = [];
|
|
793
|
+
function $(e, n) {
|
|
791
794
|
n === void 0 && (n = !0);
|
|
792
795
|
try {
|
|
793
796
|
if (e === window)
|
|
@@ -826,9 +829,9 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
826
829
|
} catch (c) {
|
|
827
830
|
}
|
|
828
831
|
return -1;
|
|
829
|
-
}(
|
|
832
|
+
}(Lt, e);
|
|
830
833
|
if (t !== -1) {
|
|
831
|
-
var r =
|
|
834
|
+
var r = zt[t];
|
|
832
835
|
if (r && function(o) {
|
|
833
836
|
if (!o.contentWindow || !o.parentNode)
|
|
834
837
|
return !0;
|
|
@@ -846,7 +849,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
846
849
|
return !1;
|
|
847
850
|
}
|
|
848
851
|
function He(e) {
|
|
849
|
-
return e === void 0 && (e = window), oe(e = e || window) ||
|
|
852
|
+
return e === void 0 && (e = window), oe(e = e || window) || B(e) || void 0;
|
|
850
853
|
}
|
|
851
854
|
function re(e, n) {
|
|
852
855
|
if (typeof e == "string") {
|
|
@@ -924,9 +927,9 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
924
927
|
return r;
|
|
925
928
|
}
|
|
926
929
|
}
|
|
927
|
-
function
|
|
930
|
+
function Mt(e) {
|
|
928
931
|
if (function(t) {
|
|
929
|
-
return t === void 0 && (t = window), !!
|
|
932
|
+
return t === void 0 && (t = window), !!B(t);
|
|
930
933
|
}(e)) {
|
|
931
934
|
var n = _e(e);
|
|
932
935
|
if (n && n.parentElement) {
|
|
@@ -1033,10 +1036,10 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1033
1036
|
b.reject(x);
|
|
1034
1037
|
});
|
|
1035
1038
|
}, a = 0; a < o.length; a++) {
|
|
1036
|
-
var c = o[a], u = c.onSuccess, s = c.onError, v = c.promise,
|
|
1039
|
+
var c = o[a], u = c.onSuccess, s = c.onError, v = c.promise, m = void 0;
|
|
1037
1040
|
if (t)
|
|
1038
1041
|
try {
|
|
1039
|
-
|
|
1042
|
+
m = u ? u(this.value) : this.value;
|
|
1040
1043
|
} catch (w) {
|
|
1041
1044
|
v.reject(w);
|
|
1042
1045
|
continue;
|
|
@@ -1047,17 +1050,17 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1047
1050
|
continue;
|
|
1048
1051
|
}
|
|
1049
1052
|
try {
|
|
1050
|
-
|
|
1053
|
+
m = s(this.error);
|
|
1051
1054
|
} catch (w) {
|
|
1052
1055
|
v.reject(w);
|
|
1053
1056
|
continue;
|
|
1054
1057
|
}
|
|
1055
1058
|
}
|
|
1056
|
-
if (
|
|
1057
|
-
var
|
|
1058
|
-
|
|
1059
|
+
if (m instanceof e && (m.resolved || m.rejected)) {
|
|
1060
|
+
var p = m;
|
|
1061
|
+
p.resolved ? v.resolve(p.value) : v.reject(p.error), p.errorHandled = !0;
|
|
1059
1062
|
} else
|
|
1060
|
-
ee(
|
|
1063
|
+
ee(m) ? m instanceof e && (m.resolved || m.rejected) ? m.resolved ? v.resolve(m.value) : v.reject(m.error) : i(m, v) : v.resolve(m);
|
|
1061
1064
|
}
|
|
1062
1065
|
o.length = 0, this.dispatching = !1, se();
|
|
1063
1066
|
}
|
|
@@ -1114,11 +1117,11 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1114
1117
|
var r = new e(), o = t.length, i = [].slice();
|
|
1115
1118
|
if (!o)
|
|
1116
1119
|
return r.resolve(i), r;
|
|
1117
|
-
for (var a = function(s, v,
|
|
1118
|
-
return v.then(function(
|
|
1119
|
-
i[s] =
|
|
1120
|
-
}, function(
|
|
1121
|
-
|
|
1120
|
+
for (var a = function(s, v, m) {
|
|
1121
|
+
return v.then(function(p) {
|
|
1122
|
+
i[s] = p, (o -= 1) == 0 && r.resolve(i);
|
|
1123
|
+
}, function(p) {
|
|
1124
|
+
m.reject(p);
|
|
1122
1125
|
});
|
|
1123
1126
|
}, c = 0; c < t.length; c++) {
|
|
1124
1127
|
var u = t[c];
|
|
@@ -1213,7 +1216,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1213
1216
|
return n._cleanupClosedWindows = function() {
|
|
1214
1217
|
for (var t = this.weakmap, r = this.keys, o = 0; o < r.length; o++) {
|
|
1215
1218
|
var i = r[o];
|
|
1216
|
-
if (we(i) &&
|
|
1219
|
+
if (we(i) && $(i)) {
|
|
1217
1220
|
if (t)
|
|
1218
1221
|
try {
|
|
1219
1222
|
t.delete(i);
|
|
@@ -1322,7 +1325,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1322
1325
|
}
|
|
1323
1326
|
return e.__name__ = e.displayName = n, e;
|
|
1324
1327
|
}
|
|
1325
|
-
function
|
|
1328
|
+
function Y() {
|
|
1326
1329
|
var e = "0123456789abcdef";
|
|
1327
1330
|
return "uid_" + "xxxxxxxxxx".replace(/./g, function() {
|
|
1328
1331
|
return e.charAt(Math.floor(Math.random() * e.length));
|
|
@@ -1337,45 +1340,45 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1337
1340
|
}((/* @__PURE__ */ new Date()).toISOString().slice(11, 19).replace("T", ".")).replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
|
1338
1341
|
}
|
|
1339
1342
|
var ye;
|
|
1340
|
-
function
|
|
1343
|
+
function Ve(e) {
|
|
1341
1344
|
try {
|
|
1342
1345
|
return JSON.stringify([].slice.call(e), function(n, t) {
|
|
1343
1346
|
return typeof t == "function" ? "memoize[" + function(r) {
|
|
1344
1347
|
if (ye = ye || new Ce(), r == null || typeof r != "object" && typeof r != "function")
|
|
1345
1348
|
throw new Error("Invalid object");
|
|
1346
1349
|
var o = ye.get(r);
|
|
1347
|
-
return o || (o = typeof r + ":" +
|
|
1350
|
+
return o || (o = typeof r + ":" + Y(), ye.set(r, o)), o;
|
|
1348
1351
|
}(t) + "]" : typeof window != "undefined" && t instanceof window.Element || t !== null && typeof t == "object" && t.nodeType === 1 && typeof t.style == "object" && typeof t.ownerDocument == "object" ? {} : t;
|
|
1349
1352
|
});
|
|
1350
1353
|
} catch (n) {
|
|
1351
1354
|
throw new Error("Arguments not serializable -- can not be used to memoize");
|
|
1352
1355
|
}
|
|
1353
1356
|
}
|
|
1354
|
-
function
|
|
1357
|
+
function jt() {
|
|
1355
1358
|
return {};
|
|
1356
1359
|
}
|
|
1357
|
-
var ue = 0,
|
|
1360
|
+
var ue = 0, Ye = 0;
|
|
1358
1361
|
function ce(e, n) {
|
|
1359
1362
|
n === void 0 && (n = {});
|
|
1360
1363
|
var t = n.thisNamespace, r = t !== void 0 && t, o = n.time, i, a, c = ue;
|
|
1361
1364
|
ue += 1;
|
|
1362
1365
|
var u = function() {
|
|
1363
|
-
for (var s = arguments.length, v = new Array(s),
|
|
1364
|
-
v[
|
|
1365
|
-
c <
|
|
1366
|
-
var
|
|
1367
|
-
|
|
1366
|
+
for (var s = arguments.length, v = new Array(s), m = 0; m < s; m++)
|
|
1367
|
+
v[m] = arguments[m];
|
|
1368
|
+
c < Ye && (i = null, a = null, c = ue, ue += 1);
|
|
1369
|
+
var p;
|
|
1370
|
+
p = r ? (a = a || new Ce()).getOrSet(this, jt) : i = i || {};
|
|
1368
1371
|
var w;
|
|
1369
1372
|
try {
|
|
1370
|
-
w =
|
|
1373
|
+
w = Ve(v);
|
|
1371
1374
|
} catch (P) {
|
|
1372
1375
|
return e.apply(this, arguments);
|
|
1373
1376
|
}
|
|
1374
|
-
var b =
|
|
1375
|
-
if (b && o && Date.now() - b.time < o && (delete
|
|
1377
|
+
var b = p[w];
|
|
1378
|
+
if (b && o && Date.now() - b.time < o && (delete p[w], b = null), b)
|
|
1376
1379
|
return b.value;
|
|
1377
1380
|
var x = Date.now(), S = e.apply(this, arguments);
|
|
1378
|
-
return
|
|
1381
|
+
return p[w] = {
|
|
1379
1382
|
time: x,
|
|
1380
1383
|
value: S
|
|
1381
1384
|
}, S;
|
|
@@ -1385,14 +1388,14 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1385
1388
|
}, $e(u, (n.name || Be(e)) + "::memoized");
|
|
1386
1389
|
}
|
|
1387
1390
|
ce.clear = function() {
|
|
1388
|
-
|
|
1391
|
+
Ye = ue;
|
|
1389
1392
|
};
|
|
1390
|
-
function
|
|
1393
|
+
function kt(e) {
|
|
1391
1394
|
var n = {};
|
|
1392
1395
|
function t() {
|
|
1393
1396
|
for (var r = arguments, o = this, i = arguments.length, a = new Array(i), c = 0; c < i; c++)
|
|
1394
1397
|
a[c] = arguments[c];
|
|
1395
|
-
var u =
|
|
1398
|
+
var u = Ve(a);
|
|
1396
1399
|
return n.hasOwnProperty(u) || (n[u] = C.try(function() {
|
|
1397
1400
|
return e.apply(o, r);
|
|
1398
1401
|
}).finally(function() {
|
|
@@ -1428,7 +1431,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1428
1431
|
return "Error while stringifying error: " + de(o, n + 1);
|
|
1429
1432
|
}
|
|
1430
1433
|
}
|
|
1431
|
-
function
|
|
1434
|
+
function Je(e) {
|
|
1432
1435
|
return typeof e == "string" ? e : e && e.toString && typeof e.toString == "function" ? e.toString() : {}.toString.call(e);
|
|
1433
1436
|
}
|
|
1434
1437
|
ce(function(e) {
|
|
@@ -1448,13 +1451,13 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1448
1451
|
var r = t();
|
|
1449
1452
|
return e[n] = r, r;
|
|
1450
1453
|
}
|
|
1451
|
-
function
|
|
1454
|
+
function Ze() {
|
|
1452
1455
|
var e = document.body;
|
|
1453
1456
|
if (!e)
|
|
1454
1457
|
throw new Error("Body element not found");
|
|
1455
1458
|
return e;
|
|
1456
1459
|
}
|
|
1457
|
-
function
|
|
1460
|
+
function Xe() {
|
|
1458
1461
|
return !!document.body && document.readyState === "complete";
|
|
1459
1462
|
}
|
|
1460
1463
|
function Ke() {
|
|
@@ -1462,15 +1465,15 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1462
1465
|
}
|
|
1463
1466
|
ce(function() {
|
|
1464
1467
|
return new C(function(e) {
|
|
1465
|
-
if (
|
|
1468
|
+
if (Xe() || Ke())
|
|
1466
1469
|
return e();
|
|
1467
1470
|
var n = setInterval(function() {
|
|
1468
|
-
if (
|
|
1471
|
+
if (Xe() || Ke())
|
|
1469
1472
|
return clearInterval(n), e();
|
|
1470
1473
|
}, 10);
|
|
1471
1474
|
});
|
|
1472
1475
|
});
|
|
1473
|
-
var Ee = typeof document != "undefined" ? document.currentScript : null,
|
|
1476
|
+
var Ee = typeof document != "undefined" ? document.currentScript : null, Ut = ce(function() {
|
|
1474
1477
|
if (Ee || (Ee = function() {
|
|
1475
1478
|
try {
|
|
1476
1479
|
var e = function() {
|
|
@@ -1492,13 +1495,13 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1492
1495
|
}()))
|
|
1493
1496
|
return Ee;
|
|
1494
1497
|
throw new Error("Can not determine current script");
|
|
1495
|
-
}),
|
|
1498
|
+
}), Ft = Y();
|
|
1496
1499
|
ce(function() {
|
|
1497
1500
|
var e;
|
|
1498
1501
|
try {
|
|
1499
|
-
e =
|
|
1502
|
+
e = Ut();
|
|
1500
1503
|
} catch (r) {
|
|
1501
|
-
return
|
|
1504
|
+
return Ft;
|
|
1502
1505
|
}
|
|
1503
1506
|
var n = e.getAttribute("data-uid");
|
|
1504
1507
|
if (n && typeof n == "string" || (n = e.getAttribute("data-uid-auto")) && typeof n == "string")
|
|
@@ -1516,7 +1519,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1516
1519
|
}));
|
|
1517
1520
|
n = "uid_" + t.slice(t.length - 30);
|
|
1518
1521
|
} else
|
|
1519
|
-
n =
|
|
1522
|
+
n = Y();
|
|
1520
1523
|
return e.setAttribute("data-uid-auto", n), n;
|
|
1521
1524
|
});
|
|
1522
1525
|
function le(e) {
|
|
@@ -1555,13 +1558,13 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1555
1558
|
};
|
|
1556
1559
|
});
|
|
1557
1560
|
}
|
|
1558
|
-
var
|
|
1561
|
+
var Ht = function() {
|
|
1559
1562
|
};
|
|
1560
1563
|
function xe() {
|
|
1561
1564
|
var e = le();
|
|
1562
|
-
return e.WINDOW_WILDCARD = e.WINDOW_WILDCARD || new
|
|
1565
|
+
return e.WINDOW_WILDCARD = e.WINDOW_WILDCARD || new Ht(), e.WINDOW_WILDCARD;
|
|
1563
1566
|
}
|
|
1564
|
-
function
|
|
1567
|
+
function F(e, n) {
|
|
1565
1568
|
return e === void 0 && (e = "store"), n === void 0 && (n = Qe), z("windowStore").getOrSet(e, function() {
|
|
1566
1569
|
var t = new Ce(), r = function(o) {
|
|
1567
1570
|
return t.getOrSet(o, n);
|
|
@@ -1587,10 +1590,10 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1587
1590
|
});
|
|
1588
1591
|
}
|
|
1589
1592
|
function et() {
|
|
1590
|
-
return z("instance").getOrSet("instanceID",
|
|
1593
|
+
return z("instance").getOrSet("instanceID", Y);
|
|
1591
1594
|
}
|
|
1592
1595
|
function tt(e, n) {
|
|
1593
|
-
var t = n.domain, r =
|
|
1596
|
+
var t = n.domain, r = F("helloPromises"), o = r.get(e);
|
|
1594
1597
|
o && o.resolve({
|
|
1595
1598
|
domain: t
|
|
1596
1599
|
});
|
|
@@ -1618,7 +1621,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1618
1621
|
}
|
|
1619
1622
|
function nt(e, n) {
|
|
1620
1623
|
var t = n.send;
|
|
1621
|
-
return
|
|
1624
|
+
return F("windowInstanceIDPromises").getOrSet(e, function() {
|
|
1622
1625
|
return Te(e, {
|
|
1623
1626
|
send: t
|
|
1624
1627
|
}).then(function(r) {
|
|
@@ -1627,7 +1630,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1627
1630
|
});
|
|
1628
1631
|
}
|
|
1629
1632
|
function rt(e) {
|
|
1630
|
-
|
|
1633
|
+
F("knownWindows").set(e, !0);
|
|
1631
1634
|
}
|
|
1632
1635
|
function Re(e) {
|
|
1633
1636
|
return typeof e == "object" && e !== null && typeof e.__type__ == "string";
|
|
@@ -1641,60 +1644,60 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1641
1644
|
__val__: n
|
|
1642
1645
|
};
|
|
1643
1646
|
}
|
|
1644
|
-
var
|
|
1645
|
-
},
|
|
1647
|
+
var H, _t = ((H = {}).function = function() {
|
|
1648
|
+
}, H.error = function(e) {
|
|
1646
1649
|
return ne("error", {
|
|
1647
1650
|
message: e.message,
|
|
1648
1651
|
stack: e.stack,
|
|
1649
1652
|
code: e.code,
|
|
1650
1653
|
data: e.data
|
|
1651
1654
|
});
|
|
1652
|
-
},
|
|
1653
|
-
},
|
|
1655
|
+
}, H.promise = function() {
|
|
1656
|
+
}, H.regex = function(e) {
|
|
1654
1657
|
return ne("regex", e.source);
|
|
1655
|
-
},
|
|
1658
|
+
}, H.date = function(e) {
|
|
1656
1659
|
return ne("date", e.toJSON());
|
|
1657
|
-
},
|
|
1660
|
+
}, H.array = function(e) {
|
|
1658
1661
|
return e;
|
|
1659
|
-
},
|
|
1662
|
+
}, H.object = function(e) {
|
|
1660
1663
|
return e;
|
|
1661
|
-
},
|
|
1664
|
+
}, H.string = function(e) {
|
|
1662
1665
|
return e;
|
|
1663
|
-
},
|
|
1666
|
+
}, H.number = function(e) {
|
|
1664
1667
|
return e;
|
|
1665
|
-
},
|
|
1668
|
+
}, H.boolean = function(e) {
|
|
1666
1669
|
return e;
|
|
1667
|
-
},
|
|
1670
|
+
}, H.null = function(e) {
|
|
1668
1671
|
return e;
|
|
1669
|
-
},
|
|
1672
|
+
}, H[void 0] = function(e) {
|
|
1670
1673
|
return ne("undefined", e);
|
|
1671
|
-
},
|
|
1674
|
+
}, H), qt = {}, _, Gt = ((_ = {}).function = function() {
|
|
1672
1675
|
throw new Error("Function serialization is not implemented; nothing to deserialize");
|
|
1673
|
-
},
|
|
1676
|
+
}, _.error = function(e) {
|
|
1674
1677
|
var n = e.stack, t = e.code, r = e.data, o = new Error(e.message);
|
|
1675
1678
|
return o.code = t, r && (o.data = r), o.stack = n + `
|
|
1676
1679
|
|
|
1677
1680
|
` + o.stack, o;
|
|
1678
|
-
},
|
|
1681
|
+
}, _.promise = function() {
|
|
1679
1682
|
throw new Error("Promise serialization is not implemented; nothing to deserialize");
|
|
1680
|
-
},
|
|
1683
|
+
}, _.regex = function(e) {
|
|
1681
1684
|
return new RegExp(e);
|
|
1682
|
-
},
|
|
1685
|
+
}, _.date = function(e) {
|
|
1683
1686
|
return new Date(e);
|
|
1684
|
-
},
|
|
1687
|
+
}, _.array = function(e) {
|
|
1685
1688
|
return e;
|
|
1686
|
-
},
|
|
1689
|
+
}, _.object = function(e) {
|
|
1687
1690
|
return e;
|
|
1688
|
-
},
|
|
1691
|
+
}, _.string = function(e) {
|
|
1689
1692
|
return e;
|
|
1690
|
-
},
|
|
1693
|
+
}, _.number = function(e) {
|
|
1691
1694
|
return e;
|
|
1692
|
-
},
|
|
1695
|
+
}, _.boolean = function(e) {
|
|
1693
1696
|
return e;
|
|
1694
|
-
},
|
|
1697
|
+
}, _.null = function(e) {
|
|
1695
1698
|
return e;
|
|
1696
|
-
},
|
|
1697
|
-
},
|
|
1699
|
+
}, _[void 0] = function() {
|
|
1700
|
+
}, _), Bt = {};
|
|
1698
1701
|
new C(function(e) {
|
|
1699
1702
|
if (window.document && window.document.body)
|
|
1700
1703
|
return e(window.document.body);
|
|
@@ -1710,18 +1713,18 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1710
1713
|
}
|
|
1711
1714
|
}
|
|
1712
1715
|
function it(e, n) {
|
|
1713
|
-
var t = n.send, r = n.id, o = r === void 0 ?
|
|
1716
|
+
var t = n.send, r = n.id, o = r === void 0 ? Y() : r, i = e.then(function(u) {
|
|
1714
1717
|
if (Q(u))
|
|
1715
1718
|
return ve(u).name;
|
|
1716
1719
|
}), a = e.then(function(u) {
|
|
1717
|
-
if (
|
|
1720
|
+
if ($(u))
|
|
1718
1721
|
throw new Error("Window is closed, can not determine type");
|
|
1719
1722
|
return oe(u) ? "popup" : "iframe";
|
|
1720
1723
|
});
|
|
1721
1724
|
i.catch(te), a.catch(te);
|
|
1722
1725
|
var c = function() {
|
|
1723
1726
|
return e.then(function(u) {
|
|
1724
|
-
if (
|
|
1727
|
+
if (!$(u))
|
|
1725
1728
|
return Q(u) ? ve(u).name : i;
|
|
1726
1729
|
});
|
|
1727
1730
|
};
|
|
@@ -1730,7 +1733,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1730
1733
|
getType: function() {
|
|
1731
1734
|
return a;
|
|
1732
1735
|
},
|
|
1733
|
-
getInstanceID:
|
|
1736
|
+
getInstanceID: kt(function() {
|
|
1734
1737
|
return e.then(function(u) {
|
|
1735
1738
|
return nt(u, {
|
|
1736
1739
|
send: t
|
|
@@ -1738,7 +1741,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1738
1741
|
});
|
|
1739
1742
|
}),
|
|
1740
1743
|
close: function() {
|
|
1741
|
-
return e.then(
|
|
1744
|
+
return e.then(Mt);
|
|
1742
1745
|
},
|
|
1743
1746
|
getName: c,
|
|
1744
1747
|
focus: function() {
|
|
@@ -1748,15 +1751,15 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1748
1751
|
},
|
|
1749
1752
|
isClosed: function() {
|
|
1750
1753
|
return e.then(function(u) {
|
|
1751
|
-
return
|
|
1754
|
+
return $(u);
|
|
1752
1755
|
});
|
|
1753
1756
|
},
|
|
1754
1757
|
setLocation: function(u, s) {
|
|
1755
1758
|
return s === void 0 && (s = {}), e.then(function(v) {
|
|
1756
|
-
var
|
|
1759
|
+
var m = window.location.protocol + "//" + window.location.host, p = s.method, w = p === void 0 ? "get" : p, b = s.body;
|
|
1757
1760
|
if (u.indexOf("/") === 0)
|
|
1758
|
-
u = "" +
|
|
1759
|
-
else if (!u.match(/^https?:\/\//) && u.indexOf(
|
|
1761
|
+
u = "" + m + u;
|
|
1762
|
+
else if (!u.match(/^https?:\/\//) && u.indexOf(m) !== 0)
|
|
1760
1763
|
throw new Error("Expected url to be http or https url, or absolute path, got " + JSON.stringify(u));
|
|
1761
1764
|
if (w === "post")
|
|
1762
1765
|
return c().then(function(x) {
|
|
@@ -1765,11 +1768,11 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1765
1768
|
(function(S) {
|
|
1766
1769
|
var P = S.url, L = S.target, R = S.body, T = S.method, M = T === void 0 ? "post" : T, W = document.createElement("form");
|
|
1767
1770
|
if (W.setAttribute("target", L), W.setAttribute("method", M), W.setAttribute("action", P), W.style.display = "none", R)
|
|
1768
|
-
for (var A = 0,
|
|
1769
|
-
var
|
|
1770
|
-
Le.setAttribute("name", he), Le.setAttribute("value", (
|
|
1771
|
+
for (var A = 0, V = Object.keys(R); A < V.length; A++) {
|
|
1772
|
+
var N, he = V[A], Le = document.createElement("input");
|
|
1773
|
+
Le.setAttribute("name", he), Le.setAttribute("value", (N = R[he]) == null ? void 0 : N.toString()), W.appendChild(Le);
|
|
1771
1774
|
}
|
|
1772
|
-
|
|
1775
|
+
Ze().appendChild(W), W.submit(), Ze().removeChild(W);
|
|
1773
1776
|
})({
|
|
1774
1777
|
url: u,
|
|
1775
1778
|
target: x,
|
|
@@ -1792,15 +1795,15 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1792
1795
|
},
|
|
1793
1796
|
setName: function(u) {
|
|
1794
1797
|
return e.then(function(s) {
|
|
1795
|
-
var v = Q(s),
|
|
1798
|
+
var v = Q(s), m = _e(s);
|
|
1796
1799
|
if (!v)
|
|
1797
1800
|
throw new Error("Can not set name for cross-domain window: " + u);
|
|
1798
|
-
ve(s).name = u,
|
|
1801
|
+
ve(s).name = u, m && m.setAttribute("name", u), i = C.resolve(u);
|
|
1799
1802
|
});
|
|
1800
1803
|
}
|
|
1801
1804
|
};
|
|
1802
1805
|
}
|
|
1803
|
-
var
|
|
1806
|
+
var q = function() {
|
|
1804
1807
|
function e(t) {
|
|
1805
1808
|
var r = t.send, o = t.win, i = t.serializedWindow;
|
|
1806
1809
|
this.id = void 0, this.isProxyWindow = !0, this.serializedWindow = void 0, this.actualWindow = void 0, this.actualWindowPromise = void 0, this.send = void 0, this.name = void 0, this.actualWindowPromise = new C(), this.serializedWindow = i || it(this.actualWindowPromise, {
|
|
@@ -1855,7 +1858,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1855
1858
|
this.actualWindow = t, this.actualWindowPromise.resolve(this.actualWindow), this.serializedWindow = it(this.actualWindowPromise, {
|
|
1856
1859
|
send: o,
|
|
1857
1860
|
id: this.getID()
|
|
1858
|
-
}),
|
|
1861
|
+
}), F("winToProxyWindow").set(t, this);
|
|
1859
1862
|
}, n.awaitWindow = function() {
|
|
1860
1863
|
return this.actualWindowPromise;
|
|
1861
1864
|
}, n.matchWindow = function(t, r) {
|
|
@@ -1878,7 +1881,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1878
1881
|
}, n.getInstanceID = function() {
|
|
1879
1882
|
return this.serializedWindow.getInstanceID();
|
|
1880
1883
|
}, n.shouldClean = function() {
|
|
1881
|
-
return !!(this.actualWindow &&
|
|
1884
|
+
return !!(this.actualWindow && $(this.actualWindow));
|
|
1882
1885
|
}, n.serialize = function() {
|
|
1883
1886
|
return this.serializedWindow;
|
|
1884
1887
|
}, e.unwrap = function(t) {
|
|
@@ -1901,15 +1904,15 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1901
1904
|
if (Ae(), e.isProxyWindow(t))
|
|
1902
1905
|
return t;
|
|
1903
1906
|
var i = t;
|
|
1904
|
-
return
|
|
1907
|
+
return F("winToProxyWindow").get(i) || new e({
|
|
1905
1908
|
win: i,
|
|
1906
1909
|
send: o
|
|
1907
1910
|
});
|
|
1908
1911
|
}, e;
|
|
1909
1912
|
}();
|
|
1910
1913
|
function Oe(e, n, t, r, o) {
|
|
1911
|
-
var i =
|
|
1912
|
-
|
|
1914
|
+
var i = F("methodStore"), a = z("proxyWindowMethods");
|
|
1915
|
+
q.isProxyWindow(r) ? a.set(e, {
|
|
1913
1916
|
val: n,
|
|
1914
1917
|
name: t,
|
|
1915
1918
|
domain: o,
|
|
@@ -1924,7 +1927,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1924
1927
|
});
|
|
1925
1928
|
}
|
|
1926
1929
|
function at(e, n) {
|
|
1927
|
-
var t =
|
|
1930
|
+
var t = F("methodStore"), r = z("proxyWindowMethods");
|
|
1928
1931
|
return t.getOrSet(e, function() {
|
|
1929
1932
|
return {};
|
|
1930
1933
|
})[n] || r.get(n);
|
|
@@ -1937,24 +1940,24 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1937
1940
|
return a("postrobot_method", {
|
|
1938
1941
|
domain: "*"
|
|
1939
1942
|
}, function(v) {
|
|
1940
|
-
var
|
|
1943
|
+
var m = v.source, p = v.origin, w = v.data, b = w.id, x = w.name, S = at(m, b);
|
|
1941
1944
|
if (!S)
|
|
1942
|
-
throw new Error("Could not find method '" + x + "' with id: " + w.id + " in " +
|
|
1945
|
+
throw new Error("Could not find method '" + x + "' with id: " + w.id + " in " + U(window));
|
|
1943
1946
|
var P = S.source, L = S.domain, R = S.val;
|
|
1944
1947
|
return C.try(function() {
|
|
1945
|
-
if (!re(L,
|
|
1946
|
-
throw new Error("Method '" + w.name + "' domain " + JSON.stringify(Pe(S.domain) ? S.domain.source : S.domain) + " does not match origin " +
|
|
1947
|
-
if (
|
|
1948
|
-
return P.matchWindow(
|
|
1948
|
+
if (!re(L, p))
|
|
1949
|
+
throw new Error("Method '" + w.name + "' domain " + JSON.stringify(Pe(S.domain) ? S.domain.source : S.domain) + " does not match origin " + p + " in " + U(window));
|
|
1950
|
+
if (q.isProxyWindow(P))
|
|
1951
|
+
return P.matchWindow(m, {
|
|
1949
1952
|
send: c
|
|
1950
1953
|
}).then(function(T) {
|
|
1951
1954
|
if (!T)
|
|
1952
|
-
throw new Error("Method call '" + w.name + "' failed - proxy window does not match source in " +
|
|
1955
|
+
throw new Error("Method call '" + w.name + "' failed - proxy window does not match source in " + U(window));
|
|
1953
1956
|
});
|
|
1954
1957
|
}).then(function() {
|
|
1955
1958
|
return R.apply({
|
|
1956
|
-
source:
|
|
1957
|
-
origin:
|
|
1959
|
+
source: m,
|
|
1960
|
+
origin: p
|
|
1958
1961
|
}, w.args);
|
|
1959
1962
|
}, function(T) {
|
|
1960
1963
|
return C.try(function() {
|
|
@@ -1979,10 +1982,10 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1979
1982
|
});
|
|
1980
1983
|
});
|
|
1981
1984
|
});
|
|
1982
|
-
var i, a, c, u = t.__id__ ||
|
|
1983
|
-
e =
|
|
1985
|
+
var i, a, c, u = t.__id__ || Y();
|
|
1986
|
+
e = q.unwrap(e);
|
|
1984
1987
|
var s = t.__name__ || t.name || r;
|
|
1985
|
-
return typeof s == "string" && typeof s.indexOf == "function" && s.indexOf("anonymous::") === 0 && (s = s.replace("anonymous::", r + "::")),
|
|
1988
|
+
return typeof s == "string" && typeof s.indexOf == "function" && s.indexOf("anonymous::") === 0 && (s = s.replace("anonymous::", r + "::")), q.isProxyWindow(e) ? (Oe(u, t, s, e, n), e.awaitWindow().then(function(v) {
|
|
1986
1989
|
Oe(u, t, s, v, n);
|
|
1987
1990
|
})) : Oe(u, t, s, e, n), ne("cross_domain_function", {
|
|
1988
1991
|
id: u,
|
|
@@ -1992,24 +1995,24 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
1992
1995
|
function ut(e, n, t, r) {
|
|
1993
1996
|
var o, i = r.on, a = r.send;
|
|
1994
1997
|
return function(c, u) {
|
|
1995
|
-
u === void 0 && (u =
|
|
1998
|
+
u === void 0 && (u = qt);
|
|
1996
1999
|
var s = JSON.stringify(c, function(v) {
|
|
1997
|
-
var
|
|
2000
|
+
var m = this[v];
|
|
1998
2001
|
if (Re(this))
|
|
1999
|
-
return
|
|
2000
|
-
var
|
|
2001
|
-
if (!
|
|
2002
|
-
return
|
|
2003
|
-
var w = u[
|
|
2004
|
-
return w ? w(
|
|
2002
|
+
return m;
|
|
2003
|
+
var p = ot(m);
|
|
2004
|
+
if (!p)
|
|
2005
|
+
return m;
|
|
2006
|
+
var w = u[p] || _t[p];
|
|
2007
|
+
return w ? w(m, v) : m;
|
|
2005
2008
|
});
|
|
2006
2009
|
return s === void 0 ? "undefined" : s;
|
|
2007
2010
|
}(t, ((o = {}).promise = function(c, u) {
|
|
2008
|
-
return function(s, v,
|
|
2011
|
+
return function(s, v, m, p, w) {
|
|
2009
2012
|
return ne("cross_domain_zalgo_promise", {
|
|
2010
2013
|
then: st(s, v, function(b, x) {
|
|
2011
|
-
return
|
|
2012
|
-
},
|
|
2014
|
+
return m.then(b, x);
|
|
2015
|
+
}, p, {
|
|
2013
2016
|
on: w.on,
|
|
2014
2017
|
send: w.send
|
|
2015
2018
|
})
|
|
@@ -2024,7 +2027,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2024
2027
|
send: a
|
|
2025
2028
|
});
|
|
2026
2029
|
}, o.object = function(c) {
|
|
2027
|
-
return we(c) ||
|
|
2030
|
+
return we(c) || q.isProxyWindow(c) ? ne("cross_domain_window", q.serialize(c, {
|
|
2028
2031
|
send: a
|
|
2029
2032
|
})) : c;
|
|
2030
2033
|
}, o));
|
|
@@ -2032,15 +2035,15 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2032
2035
|
function ct(e, n, t, r) {
|
|
2033
2036
|
var o, i = r.send;
|
|
2034
2037
|
return function(a, c) {
|
|
2035
|
-
if (c === void 0 && (c =
|
|
2038
|
+
if (c === void 0 && (c = Bt), a !== "undefined")
|
|
2036
2039
|
return JSON.parse(a, function(u, s) {
|
|
2037
2040
|
if (Re(this))
|
|
2038
2041
|
return s;
|
|
2039
|
-
var v,
|
|
2040
|
-
if (Re(s) ? (v = s.__type__,
|
|
2041
|
-
return
|
|
2042
|
-
var
|
|
2043
|
-
return
|
|
2042
|
+
var v, m;
|
|
2043
|
+
if (Re(s) ? (v = s.__type__, m = s.__val__) : (v = ot(s), m = s), !v)
|
|
2044
|
+
return m;
|
|
2045
|
+
var p = c[v] || Gt[v];
|
|
2046
|
+
return p ? p(m, u) : m;
|
|
2044
2047
|
});
|
|
2045
2048
|
}(t, ((o = {}).cross_domain_zalgo_promise = function(a) {
|
|
2046
2049
|
return function(c, u, s) {
|
|
@@ -2048,30 +2051,30 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2048
2051
|
}(0, 0, a);
|
|
2049
2052
|
}, o.cross_domain_function = function(a) {
|
|
2050
2053
|
return function(c, u, s, v) {
|
|
2051
|
-
var
|
|
2054
|
+
var m = s.id, p = s.name, w = v.send, b = function(S) {
|
|
2052
2055
|
S === void 0 && (S = {});
|
|
2053
2056
|
function P() {
|
|
2054
2057
|
var L = arguments;
|
|
2055
|
-
return
|
|
2058
|
+
return q.toProxyWindow(c, {
|
|
2056
2059
|
send: w
|
|
2057
2060
|
}).awaitWindow().then(function(R) {
|
|
2058
|
-
var T = at(R,
|
|
2061
|
+
var T = at(R, m);
|
|
2059
2062
|
if (T && T.val !== P)
|
|
2060
2063
|
return T.val.apply({
|
|
2061
2064
|
source: window,
|
|
2062
|
-
origin:
|
|
2065
|
+
origin: U()
|
|
2063
2066
|
}, L);
|
|
2064
2067
|
var M = [].slice.call(L);
|
|
2065
2068
|
return S.fireAndForget ? w(R, "postrobot_method", {
|
|
2066
|
-
id:
|
|
2067
|
-
name:
|
|
2069
|
+
id: m,
|
|
2070
|
+
name: p,
|
|
2068
2071
|
args: M
|
|
2069
2072
|
}, {
|
|
2070
2073
|
domain: u,
|
|
2071
2074
|
fireAndForget: !0
|
|
2072
2075
|
}) : w(R, "postrobot_method", {
|
|
2073
|
-
id:
|
|
2074
|
-
name:
|
|
2076
|
+
id: m,
|
|
2077
|
+
name: p,
|
|
2075
2078
|
args: M
|
|
2076
2079
|
}, {
|
|
2077
2080
|
domain: u,
|
|
@@ -2083,7 +2086,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2083
2086
|
throw R;
|
|
2084
2087
|
});
|
|
2085
2088
|
}
|
|
2086
|
-
return P.__name__ =
|
|
2089
|
+
return P.__name__ = p, P.__origin__ = u, P.__source__ = c, P.__id__ = m, P.origin = u, P;
|
|
2087
2090
|
}, x = b();
|
|
2088
2091
|
return x.fireAndForget = b({
|
|
2089
2092
|
fireAndForget: !0
|
|
@@ -2092,33 +2095,33 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2092
2095
|
send: i
|
|
2093
2096
|
});
|
|
2094
2097
|
}, o.cross_domain_window = function(a) {
|
|
2095
|
-
return
|
|
2098
|
+
return q.deserialize(a, {
|
|
2096
2099
|
send: i
|
|
2097
2100
|
});
|
|
2098
2101
|
}, o));
|
|
2099
2102
|
}
|
|
2100
|
-
var
|
|
2101
|
-
|
|
2103
|
+
var Ne = {};
|
|
2104
|
+
Ne.postrobot_post_message = function(e, n, t) {
|
|
2102
2105
|
t.indexOf("file:") === 0 && (t = "*"), e.postMessage(n, t);
|
|
2103
2106
|
};
|
|
2104
|
-
function
|
|
2107
|
+
function De(e, n, t, r) {
|
|
2105
2108
|
var o = r.on, i = r.send;
|
|
2106
2109
|
return C.try(function() {
|
|
2107
|
-
var a =
|
|
2110
|
+
var a = F().getOrSet(e, function() {
|
|
2108
2111
|
return {};
|
|
2109
2112
|
});
|
|
2110
2113
|
return a.buffer = a.buffer || [], a.buffer.push(t), a.flush = a.flush || C.flush().then(function() {
|
|
2111
|
-
if (
|
|
2114
|
+
if ($(e))
|
|
2112
2115
|
throw new Error("Window is closed");
|
|
2113
2116
|
var c = ut(e, n, ((u = {}).__post_robot_10_0_46__ = a.buffer || [], u), {
|
|
2114
2117
|
on: o,
|
|
2115
2118
|
send: i
|
|
2116
2119
|
}), u;
|
|
2117
2120
|
delete a.buffer;
|
|
2118
|
-
for (var s = Object.keys(
|
|
2119
|
-
var
|
|
2121
|
+
for (var s = Object.keys(Ne), v = [], m = 0; m < s.length; m++) {
|
|
2122
|
+
var p = s[m];
|
|
2120
2123
|
try {
|
|
2121
|
-
|
|
2124
|
+
Ne[p](e, c, n);
|
|
2122
2125
|
} catch (w) {
|
|
2123
2126
|
v.push(w);
|
|
2124
2127
|
}
|
|
@@ -2146,7 +2149,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2146
2149
|
return z("erroredResponseListeners").has(e);
|
|
2147
2150
|
}
|
|
2148
2151
|
function ht(e) {
|
|
2149
|
-
var n = e.name, t = e.win, r = e.domain, o =
|
|
2152
|
+
var n = e.name, t = e.win, r = e.domain, o = F("requestListeners");
|
|
2150
2153
|
if (t === "*" && (t = null), r === "*" && (r = null), !n)
|
|
2151
2154
|
throw new Error("Name required to get request listener");
|
|
2152
2155
|
for (var i = 0, a = [t, xe()]; i < a.length; i++) {
|
|
@@ -2160,9 +2163,9 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2160
2163
|
if (s[r])
|
|
2161
2164
|
return s[r];
|
|
2162
2165
|
if (s.__domain_regex__)
|
|
2163
|
-
for (var v = 0,
|
|
2164
|
-
var
|
|
2165
|
-
if (re(
|
|
2166
|
+
for (var v = 0, m = s.__domain_regex__; v < m.length; v++) {
|
|
2167
|
+
var p = m[v], w = p.listener;
|
|
2168
|
+
if (re(p.regex, r))
|
|
2166
2169
|
return w;
|
|
2167
2170
|
}
|
|
2168
2171
|
}
|
|
@@ -2173,42 +2176,42 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2173
2176
|
}
|
|
2174
2177
|
}
|
|
2175
2178
|
}
|
|
2176
|
-
function
|
|
2179
|
+
function $t(e, n, t, r) {
|
|
2177
2180
|
var o = r.on, i = r.send, a = ht({
|
|
2178
2181
|
name: t.name,
|
|
2179
2182
|
win: e,
|
|
2180
2183
|
domain: n
|
|
2181
2184
|
}), c = t.name === "postrobot_method" && t.data && typeof t.data.name == "string" ? t.data.name + "()" : t.name;
|
|
2182
|
-
function u(s, v,
|
|
2185
|
+
function u(s, v, m) {
|
|
2183
2186
|
return C.flush().then(function() {
|
|
2184
|
-
if (!t.fireAndForget &&
|
|
2187
|
+
if (!t.fireAndForget && !$(e))
|
|
2185
2188
|
try {
|
|
2186
|
-
return
|
|
2187
|
-
id:
|
|
2188
|
-
origin:
|
|
2189
|
+
return De(e, n, {
|
|
2190
|
+
id: Y(),
|
|
2191
|
+
origin: U(window),
|
|
2189
2192
|
type: "postrobot_message_response",
|
|
2190
2193
|
hash: t.hash,
|
|
2191
2194
|
name: t.name,
|
|
2192
2195
|
ack: s,
|
|
2193
2196
|
data: v,
|
|
2194
|
-
error:
|
|
2197
|
+
error: m
|
|
2195
2198
|
}, {
|
|
2196
2199
|
on: o,
|
|
2197
2200
|
send: i
|
|
2198
2201
|
});
|
|
2199
|
-
} catch (
|
|
2200
|
-
throw new Error("Send response message failed for " + c + " in " +
|
|
2202
|
+
} catch (p) {
|
|
2203
|
+
throw new Error("Send response message failed for " + c + " in " + U() + `
|
|
2201
2204
|
|
|
2202
|
-
` + de(
|
|
2205
|
+
` + de(p));
|
|
2203
2206
|
}
|
|
2204
2207
|
});
|
|
2205
2208
|
}
|
|
2206
2209
|
return C.all([C.flush().then(function() {
|
|
2207
|
-
if (!t.fireAndForget &&
|
|
2210
|
+
if (!t.fireAndForget && !$(e))
|
|
2208
2211
|
try {
|
|
2209
|
-
return
|
|
2210
|
-
id:
|
|
2211
|
-
origin:
|
|
2212
|
+
return De(e, n, {
|
|
2213
|
+
id: Y(),
|
|
2214
|
+
origin: U(window),
|
|
2212
2215
|
type: "postrobot_message_ack",
|
|
2213
2216
|
hash: t.hash,
|
|
2214
2217
|
name: t.name
|
|
@@ -2217,7 +2220,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2217
2220
|
send: i
|
|
2218
2221
|
});
|
|
2219
2222
|
} catch (s) {
|
|
2220
|
-
throw new Error("Send ack message failed for " + c + " in " +
|
|
2223
|
+
throw new Error("Send ack message failed for " + c + " in " + U() + `
|
|
2221
2224
|
|
|
2222
2225
|
` + de(s));
|
|
2223
2226
|
}
|
|
@@ -2239,7 +2242,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2239
2242
|
throw s;
|
|
2240
2243
|
});
|
|
2241
2244
|
}
|
|
2242
|
-
function
|
|
2245
|
+
function Vt(e, n, t) {
|
|
2243
2246
|
if (!lt(t.hash)) {
|
|
2244
2247
|
var r = dt(t.hash);
|
|
2245
2248
|
if (!r)
|
|
@@ -2255,7 +2258,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2255
2258
|
r.ack = !0;
|
|
2256
2259
|
}
|
|
2257
2260
|
}
|
|
2258
|
-
function
|
|
2261
|
+
function Yt(e, n, t) {
|
|
2259
2262
|
if (!lt(t.hash)) {
|
|
2260
2263
|
var r = dt(t.hash);
|
|
2261
2264
|
if (!r)
|
|
@@ -2280,10 +2283,10 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2280
2283
|
} catch (v) {
|
|
2281
2284
|
return;
|
|
2282
2285
|
}
|
|
2283
|
-
var i = e.source, a = e.origin, c = function(v,
|
|
2286
|
+
var i = e.source, a = e.origin, c = function(v, m, p, w) {
|
|
2284
2287
|
var b = w.on, x = w.send, S;
|
|
2285
2288
|
try {
|
|
2286
|
-
S = ct(
|
|
2289
|
+
S = ct(m, p, v, {
|
|
2287
2290
|
on: b,
|
|
2288
2291
|
send: x
|
|
2289
2292
|
});
|
|
@@ -2303,14 +2306,14 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2303
2306
|
rt(i);
|
|
2304
2307
|
for (var u = 0; u < c.length; u++) {
|
|
2305
2308
|
var s = c[u];
|
|
2306
|
-
if (o.has(s.id) || (o.set(s.id, !0),
|
|
2309
|
+
if (o.has(s.id) || (o.set(s.id, !0), $(i) && !s.fireAndForget))
|
|
2307
2310
|
return;
|
|
2308
2311
|
s.origin.indexOf("file:") === 0 && (a = "file://");
|
|
2309
2312
|
try {
|
|
2310
|
-
s.type === "postrobot_message_request" ?
|
|
2313
|
+
s.type === "postrobot_message_request" ? $t(i, a, s, {
|
|
2311
2314
|
on: t,
|
|
2312
2315
|
send: r
|
|
2313
|
-
}) : s.type === "postrobot_message_response" ?
|
|
2316
|
+
}) : s.type === "postrobot_message_response" ? Yt(i, a, s) : s.type === "postrobot_message_ack" && Vt(i, a, s);
|
|
2314
2317
|
} catch (v) {
|
|
2315
2318
|
setTimeout(function() {
|
|
2316
2319
|
throw v;
|
|
@@ -2319,34 +2322,34 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2319
2322
|
}
|
|
2320
2323
|
}
|
|
2321
2324
|
}
|
|
2322
|
-
function
|
|
2325
|
+
function X(e, n, t) {
|
|
2323
2326
|
if (!e)
|
|
2324
2327
|
throw new Error("Expected name");
|
|
2325
2328
|
if (typeof (n = n || {}) == "function" && (t = n, n = {}), !t)
|
|
2326
2329
|
throw new Error("Expected handler");
|
|
2327
2330
|
var r = function o(i, a) {
|
|
2328
|
-
var c = i.name, u = i.win, s = i.domain, v =
|
|
2331
|
+
var c = i.name, u = i.win, s = i.domain, v = F("requestListeners");
|
|
2329
2332
|
if (!c || typeof c != "string")
|
|
2330
2333
|
throw new Error("Name required to add request listener");
|
|
2331
|
-
if (u && u !== "*" &&
|
|
2332
|
-
var
|
|
2334
|
+
if (u && u !== "*" && q.isProxyWindow(u)) {
|
|
2335
|
+
var m = u.awaitWindow().then(function(N) {
|
|
2333
2336
|
return o({
|
|
2334
2337
|
name: c,
|
|
2335
|
-
win:
|
|
2338
|
+
win: N,
|
|
2336
2339
|
domain: s
|
|
2337
2340
|
}, a);
|
|
2338
2341
|
});
|
|
2339
2342
|
return {
|
|
2340
2343
|
cancel: function() {
|
|
2341
|
-
|
|
2342
|
-
return
|
|
2344
|
+
m.then(function(N) {
|
|
2345
|
+
return N.cancel();
|
|
2343
2346
|
}, te);
|
|
2344
2347
|
}
|
|
2345
2348
|
};
|
|
2346
2349
|
}
|
|
2347
|
-
var
|
|
2348
|
-
if (Array.isArray(
|
|
2349
|
-
for (var w = [], b = 0, x =
|
|
2350
|
+
var p = u;
|
|
2351
|
+
if (Array.isArray(p)) {
|
|
2352
|
+
for (var w = [], b = 0, x = p; b < x.length; b++)
|
|
2350
2353
|
w.push(o({
|
|
2351
2354
|
name: c,
|
|
2352
2355
|
domain: s,
|
|
@@ -2354,8 +2357,8 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2354
2357
|
}, a));
|
|
2355
2358
|
return {
|
|
2356
2359
|
cancel: function() {
|
|
2357
|
-
for (var
|
|
2358
|
-
w[
|
|
2360
|
+
for (var N = 0; N < w.length; N++)
|
|
2361
|
+
w[N].cancel();
|
|
2359
2362
|
}
|
|
2360
2363
|
};
|
|
2361
2364
|
}
|
|
@@ -2363,38 +2366,38 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2363
2366
|
for (var S = [], P = 0, L = s; P < L.length; P++)
|
|
2364
2367
|
S.push(o({
|
|
2365
2368
|
name: c,
|
|
2366
|
-
win:
|
|
2369
|
+
win: p,
|
|
2367
2370
|
domain: L[P]
|
|
2368
2371
|
}, a));
|
|
2369
2372
|
return {
|
|
2370
2373
|
cancel: function() {
|
|
2371
|
-
for (var
|
|
2372
|
-
S[
|
|
2374
|
+
for (var N = 0; N < S.length; N++)
|
|
2375
|
+
S[N].cancel();
|
|
2373
2376
|
}
|
|
2374
2377
|
};
|
|
2375
2378
|
}
|
|
2376
2379
|
var R = ht({
|
|
2377
2380
|
name: c,
|
|
2378
|
-
win:
|
|
2381
|
+
win: p,
|
|
2379
2382
|
domain: s
|
|
2380
2383
|
});
|
|
2381
|
-
|
|
2384
|
+
p && p !== "*" || (p = xe());
|
|
2382
2385
|
var T = (s = s || "*").toString();
|
|
2383
2386
|
if (R)
|
|
2384
|
-
throw
|
|
2385
|
-
var M = v.getOrSet(
|
|
2387
|
+
throw p && s ? new Error("Request listener already exists for " + c + " on domain " + s.toString() + " for " + (p === xe() ? "wildcard" : "specified") + " window") : p ? new Error("Request listener already exists for " + c + " for " + (p === xe() ? "wildcard" : "specified") + " window") : s ? new Error("Request listener already exists for " + c + " on domain " + s.toString()) : new Error("Request listener already exists for " + c);
|
|
2388
|
+
var M = v.getOrSet(p, function() {
|
|
2386
2389
|
return {};
|
|
2387
2390
|
}), W = fe(M, c, function() {
|
|
2388
2391
|
return {};
|
|
2389
|
-
}), A,
|
|
2392
|
+
}), A, V;
|
|
2390
2393
|
return Pe(s) ? (A = fe(W, "__domain_regex__", function() {
|
|
2391
2394
|
return [];
|
|
2392
|
-
})).push(
|
|
2395
|
+
})).push(V = {
|
|
2393
2396
|
regex: s,
|
|
2394
2397
|
listener: a
|
|
2395
2398
|
}) : W[T] = a, {
|
|
2396
2399
|
cancel: function() {
|
|
2397
|
-
delete W[T],
|
|
2400
|
+
delete W[T], V && (A.splice(A.indexOf(V, 1)), A.length || delete W.__domain_regex__), Object.keys(W).length || delete M[c], p && !Object.keys(M).length && v.del(p);
|
|
2398
2401
|
}
|
|
2399
2402
|
};
|
|
2400
2403
|
}({
|
|
@@ -2413,41 +2416,41 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2413
2416
|
}
|
|
2414
2417
|
};
|
|
2415
2418
|
}
|
|
2416
|
-
function
|
|
2419
|
+
function Jt(e, n, t) {
|
|
2417
2420
|
typeof (n = n || {}) == "function" && (t = n, n = {});
|
|
2418
2421
|
var r = new C(), o;
|
|
2419
2422
|
return n.errorHandler = function(i) {
|
|
2420
2423
|
o.cancel(), r.reject(i);
|
|
2421
|
-
}, o =
|
|
2424
|
+
}, o = X(e, n, function(i) {
|
|
2422
2425
|
if (o.cancel(), r.resolve(i), t)
|
|
2423
2426
|
return t(i);
|
|
2424
2427
|
}), r.cancel = o.cancel, r;
|
|
2425
2428
|
}
|
|
2426
2429
|
var K = function e(n, t, r, o) {
|
|
2427
2430
|
var i = (o = o || {}).domain || "*", a = o.timeout || -1, c = o.timeout || 5e3, u = o.fireAndForget || !1;
|
|
2428
|
-
return
|
|
2431
|
+
return q.toProxyWindow(n, {
|
|
2429
2432
|
send: e
|
|
2430
2433
|
}).awaitWindow().then(function(s) {
|
|
2431
2434
|
return C.try(function() {
|
|
2432
|
-
if (function(v,
|
|
2435
|
+
if (function(v, m, p) {
|
|
2433
2436
|
if (!v)
|
|
2434
2437
|
throw new Error("Expected name");
|
|
2435
|
-
if (
|
|
2436
|
-
throw new TypeError("Can not send " + v + ". Expected domain " + JSON.stringify(
|
|
2437
|
-
if (
|
|
2438
|
+
if (p && typeof p != "string" && !Array.isArray(p) && !Pe(p))
|
|
2439
|
+
throw new TypeError("Can not send " + v + ". Expected domain " + JSON.stringify(p) + " to be a string, array, or regex");
|
|
2440
|
+
if ($(m))
|
|
2438
2441
|
throw new Error("Can not send " + v + ". Target window is closed");
|
|
2439
|
-
}(t, s, i), function(v,
|
|
2440
|
-
var
|
|
2441
|
-
if (
|
|
2442
|
-
return
|
|
2443
|
-
if (
|
|
2442
|
+
}(t, s, i), function(v, m) {
|
|
2443
|
+
var p = He(m);
|
|
2444
|
+
if (p)
|
|
2445
|
+
return p === v;
|
|
2446
|
+
if (m === v || function(x) {
|
|
2444
2447
|
x === void 0 && (x = window);
|
|
2445
2448
|
try {
|
|
2446
2449
|
if (x.top)
|
|
2447
2450
|
return x.top;
|
|
2448
2451
|
} catch (R) {
|
|
2449
2452
|
}
|
|
2450
|
-
if (
|
|
2453
|
+
if (B(x) === x)
|
|
2451
2454
|
return x;
|
|
2452
2455
|
try {
|
|
2453
2456
|
if (Ue(window, x) && window.top)
|
|
@@ -2461,10 +2464,10 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2461
2464
|
}
|
|
2462
2465
|
for (var S = 0, P = function R(T) {
|
|
2463
2466
|
for (var M = [], W = 0, A = Fe(T); W < A.length; W++) {
|
|
2464
|
-
var
|
|
2465
|
-
M.push(
|
|
2466
|
-
for (var
|
|
2467
|
-
M.push(he[
|
|
2467
|
+
var V = A[W];
|
|
2468
|
+
M.push(V);
|
|
2469
|
+
for (var N = 0, he = R(V); N < he.length; N++)
|
|
2470
|
+
M.push(he[N]);
|
|
2468
2471
|
}
|
|
2469
2472
|
return M;
|
|
2470
2473
|
}(x); S < P.length; S++) {
|
|
@@ -2474,38 +2477,38 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2474
2477
|
return L.top;
|
|
2475
2478
|
} catch (R) {
|
|
2476
2479
|
}
|
|
2477
|
-
if (
|
|
2480
|
+
if (B(L) === L)
|
|
2478
2481
|
return L;
|
|
2479
2482
|
}
|
|
2480
|
-
}(
|
|
2483
|
+
}(m) === m)
|
|
2481
2484
|
return !1;
|
|
2482
2485
|
for (var w = 0, b = Fe(v); w < b.length; w++)
|
|
2483
|
-
if (b[w] ===
|
|
2486
|
+
if (b[w] === m)
|
|
2484
2487
|
return !0;
|
|
2485
2488
|
return !1;
|
|
2486
2489
|
}(window, s))
|
|
2487
|
-
return function(v,
|
|
2488
|
-
|
|
2490
|
+
return function(v, m, p) {
|
|
2491
|
+
m === void 0 && (m = 5e3), p === void 0 && (p = "Window");
|
|
2489
2492
|
var w = function(b) {
|
|
2490
|
-
return
|
|
2493
|
+
return F("helloPromises").getOrSet(b, function() {
|
|
2491
2494
|
return new C();
|
|
2492
2495
|
});
|
|
2493
2496
|
}(v);
|
|
2494
|
-
return
|
|
2497
|
+
return m !== -1 && (w = w.timeout(m, new Error(p + " did not load after " + m + "ms"))), w;
|
|
2495
2498
|
}(s, c);
|
|
2496
2499
|
}).then(function(v) {
|
|
2497
|
-
return function(
|
|
2500
|
+
return function(m, p, w, b) {
|
|
2498
2501
|
var x = b.send;
|
|
2499
2502
|
return C.try(function() {
|
|
2500
|
-
return typeof
|
|
2501
|
-
return w || Te(
|
|
2503
|
+
return typeof p == "string" ? p : C.try(function() {
|
|
2504
|
+
return w || Te(m, {
|
|
2502
2505
|
send: x
|
|
2503
2506
|
}).then(function(S) {
|
|
2504
2507
|
return S.domain;
|
|
2505
2508
|
});
|
|
2506
2509
|
}).then(function(S) {
|
|
2507
|
-
if (!re(
|
|
2508
|
-
throw new Error("Domain " +
|
|
2510
|
+
if (!re(p, p))
|
|
2511
|
+
throw new Error("Domain " + Je(p) + " does not match " + Je(p));
|
|
2509
2512
|
return S;
|
|
2510
2513
|
});
|
|
2511
2514
|
});
|
|
@@ -2513,18 +2516,18 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2513
2516
|
send: e
|
|
2514
2517
|
});
|
|
2515
2518
|
}).then(function(v) {
|
|
2516
|
-
var
|
|
2519
|
+
var m = v, p = t === "postrobot_method" && r && typeof r.name == "string" ? r.name + "()" : t, w = new C(), b = t + "_" + Y();
|
|
2517
2520
|
if (!u) {
|
|
2518
2521
|
var x = {
|
|
2519
2522
|
name: t,
|
|
2520
2523
|
win: s,
|
|
2521
|
-
domain:
|
|
2524
|
+
domain: m,
|
|
2522
2525
|
promise: w
|
|
2523
2526
|
};
|
|
2524
2527
|
(function(W, A) {
|
|
2525
2528
|
z("responseListeners").set(W, A);
|
|
2526
2529
|
})(b, x);
|
|
2527
|
-
var S =
|
|
2530
|
+
var S = F("requestPromises").getOrSet(s, function() {
|
|
2528
2531
|
return [];
|
|
2529
2532
|
});
|
|
2530
2533
|
S.push(w), w.catch(function() {
|
|
@@ -2533,22 +2536,22 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2533
2536
|
})(b), ft(b);
|
|
2534
2537
|
});
|
|
2535
2538
|
var P = function(W) {
|
|
2536
|
-
return
|
|
2539
|
+
return F("knownWindows").get(W, !1);
|
|
2537
2540
|
}(s) ? 1e4 : 2e3, L = a, R = P, T = L, M = function(W, A) {
|
|
2538
|
-
var
|
|
2539
|
-
return function
|
|
2540
|
-
|
|
2541
|
+
var V;
|
|
2542
|
+
return function N() {
|
|
2543
|
+
V = setTimeout(function() {
|
|
2541
2544
|
(function() {
|
|
2542
|
-
if (
|
|
2545
|
+
if ($(s))
|
|
2543
2546
|
return w.reject(new Error("Window closed for " + t + " before " + (x.ack ? "response" : "ack")));
|
|
2544
2547
|
if (x.cancelled)
|
|
2545
2548
|
return w.reject(new Error("Response listener was cancelled for " + t));
|
|
2546
|
-
R = Math.max(R - 500, 0), T !== -1 && (T = Math.max(T - 500, 0)), x.ack || R !== 0 ? T === 0 && w.reject(new Error("No response for postMessage " +
|
|
2547
|
-
})(),
|
|
2549
|
+
R = Math.max(R - 500, 0), T !== -1 && (T = Math.max(T - 500, 0)), x.ack || R !== 0 ? T === 0 && w.reject(new Error("No response for postMessage " + p + " in " + U() + " in " + L + "ms")) : w.reject(new Error("No ack for postMessage " + p + " in " + U() + " in " + P + "ms"));
|
|
2550
|
+
})(), N();
|
|
2548
2551
|
}, 500);
|
|
2549
2552
|
}(), {
|
|
2550
2553
|
cancel: function() {
|
|
2551
|
-
clearTimeout(
|
|
2554
|
+
clearTimeout(V);
|
|
2552
2555
|
}
|
|
2553
2556
|
};
|
|
2554
2557
|
}();
|
|
@@ -2556,53 +2559,53 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2556
2559
|
M.cancel(), S.splice(S.indexOf(w, 1));
|
|
2557
2560
|
}).catch(te);
|
|
2558
2561
|
}
|
|
2559
|
-
return
|
|
2560
|
-
id:
|
|
2561
|
-
origin:
|
|
2562
|
+
return De(s, m, {
|
|
2563
|
+
id: Y(),
|
|
2564
|
+
origin: U(window),
|
|
2562
2565
|
type: "postrobot_message_request",
|
|
2563
2566
|
hash: b,
|
|
2564
2567
|
name: t,
|
|
2565
2568
|
data: r,
|
|
2566
2569
|
fireAndForget: u
|
|
2567
2570
|
}, {
|
|
2568
|
-
on:
|
|
2571
|
+
on: X,
|
|
2569
2572
|
send: e
|
|
2570
2573
|
}).then(function() {
|
|
2571
2574
|
return u ? w.resolve() : w;
|
|
2572
2575
|
}, function(W) {
|
|
2573
|
-
throw new Error("Send request message failed for " +
|
|
2576
|
+
throw new Error("Send request message failed for " + p + " in " + U() + `
|
|
2574
2577
|
|
|
2575
2578
|
` + de(W));
|
|
2576
2579
|
});
|
|
2577
2580
|
});
|
|
2578
2581
|
});
|
|
2579
2582
|
};
|
|
2580
|
-
function
|
|
2583
|
+
function Zt(e, n, t) {
|
|
2581
2584
|
return ut(e, n, t, {
|
|
2582
|
-
on:
|
|
2585
|
+
on: X,
|
|
2583
2586
|
send: K
|
|
2584
2587
|
});
|
|
2585
2588
|
}
|
|
2586
|
-
function
|
|
2589
|
+
function Xt(e, n, t) {
|
|
2587
2590
|
return ct(e, n, t, {
|
|
2588
|
-
on:
|
|
2591
|
+
on: X,
|
|
2589
2592
|
send: K
|
|
2590
2593
|
});
|
|
2591
2594
|
}
|
|
2592
|
-
function
|
|
2593
|
-
return new
|
|
2595
|
+
function Kt(e) {
|
|
2596
|
+
return new q({
|
|
2594
2597
|
send: K,
|
|
2595
2598
|
win: e
|
|
2596
2599
|
});
|
|
2597
2600
|
}
|
|
2598
|
-
function
|
|
2599
|
-
return
|
|
2601
|
+
function Qt(e) {
|
|
2602
|
+
return q.toProxyWindow(e, {
|
|
2600
2603
|
send: K
|
|
2601
2604
|
});
|
|
2602
2605
|
}
|
|
2603
2606
|
function pt() {
|
|
2604
2607
|
le().initialized || (le().initialized = !0, n = (e = {
|
|
2605
|
-
on:
|
|
2608
|
+
on: X,
|
|
2606
2609
|
send: K
|
|
2607
2610
|
}).on, t = e.send, (r = le()).receiveMessage = r.receiveMessage || function(o) {
|
|
2608
2611
|
return mt(o, {
|
|
@@ -2620,19 +2623,19 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2620
2623
|
};
|
|
2621
2624
|
}(window, 0, function(c) {
|
|
2622
2625
|
(function(u, s) {
|
|
2623
|
-
var v = s.on,
|
|
2626
|
+
var v = s.on, m = s.send;
|
|
2624
2627
|
C.try(function() {
|
|
2625
|
-
var
|
|
2626
|
-
if (w === "null" && (w = "file://"),
|
|
2628
|
+
var p = u.source || u.sourceElement, w = u.origin || u.originalEvent && u.originalEvent.origin, b = u.data;
|
|
2629
|
+
if (w === "null" && (w = "file://"), p) {
|
|
2627
2630
|
if (!w)
|
|
2628
2631
|
throw new Error("Post message did not have origin domain");
|
|
2629
2632
|
mt({
|
|
2630
|
-
source:
|
|
2633
|
+
source: p,
|
|
2631
2634
|
origin: w,
|
|
2632
2635
|
data: b
|
|
2633
2636
|
}, {
|
|
2634
2637
|
on: v,
|
|
2635
|
-
send:
|
|
2638
|
+
send: m
|
|
2636
2639
|
});
|
|
2637
2640
|
}
|
|
2638
2641
|
});
|
|
@@ -2643,7 +2646,7 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2643
2646
|
});
|
|
2644
2647
|
});
|
|
2645
2648
|
}({
|
|
2646
|
-
on:
|
|
2649
|
+
on: X,
|
|
2647
2650
|
send: K
|
|
2648
2651
|
}), function(o) {
|
|
2649
2652
|
var i = o.on, a = o.send;
|
|
@@ -2663,12 +2666,12 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2663
2666
|
}), c;
|
|
2664
2667
|
});
|
|
2665
2668
|
}({
|
|
2666
|
-
on:
|
|
2669
|
+
on: X,
|
|
2667
2670
|
send: K
|
|
2668
2671
|
}));
|
|
2669
2672
|
var e, n, t, r;
|
|
2670
2673
|
}
|
|
2671
|
-
function
|
|
2674
|
+
function en() {
|
|
2672
2675
|
(function() {
|
|
2673
2676
|
for (var n = z("responseListeners"), t = 0, r = n.keys(); t < r.length; t++) {
|
|
2674
2677
|
var o = r[t], i = n.get(o);
|
|
@@ -2678,29 +2681,29 @@ var Tt = { exports: {} }, Rt = { exports: {} };
|
|
|
2678
2681
|
var e;
|
|
2679
2682
|
delete window.__post_robot_10_0_46__;
|
|
2680
2683
|
}
|
|
2681
|
-
var
|
|
2682
|
-
function
|
|
2683
|
-
for (var n = 0, t =
|
|
2684
|
-
t[n].reject(new Error("Window " + (
|
|
2684
|
+
var tn = !0;
|
|
2685
|
+
function nn(e) {
|
|
2686
|
+
for (var n = 0, t = F("requestPromises").get(e, []); n < t.length; n++)
|
|
2687
|
+
t[n].reject(new Error("Window " + ($(e) ? "closed" : "cleaned up") + " before response")).catch(te);
|
|
2685
2688
|
}
|
|
2686
2689
|
pt();
|
|
2687
2690
|
}]);
|
|
2688
2691
|
});
|
|
2689
|
-
})(
|
|
2690
|
-
var
|
|
2691
|
-
(function(
|
|
2692
|
-
|
|
2693
|
-
})(
|
|
2694
|
-
var
|
|
2695
|
-
const
|
|
2692
|
+
})(Nt);
|
|
2693
|
+
var Zn = Nt.exports;
|
|
2694
|
+
(function(d) {
|
|
2695
|
+
d.exports = Zn, d.exports.default = d.exports;
|
|
2696
|
+
})(Ot);
|
|
2697
|
+
var Dt = Ot.exports;
|
|
2698
|
+
const Xn = /* @__PURE__ */ Jn(Dt), ke = /* @__PURE__ */ fn({
|
|
2696
2699
|
__proto__: null,
|
|
2697
|
-
default:
|
|
2698
|
-
}, [
|
|
2700
|
+
default: Xn
|
|
2701
|
+
}, [Dt]);
|
|
2699
2702
|
export {
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2703
|
+
Rt as ConsentBox,
|
|
2704
|
+
Qn as PrivacyCenterBox,
|
|
2705
|
+
er as SoyioTypes,
|
|
2706
|
+
tr as SoyioWidget,
|
|
2707
|
+
ln as _TooltipManager,
|
|
2708
|
+
tr as default
|
|
2706
2709
|
};
|