@soyio/soyio-widget 2.13.5 → 2.13.6

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.
Files changed (3) hide show
  1. package/dist/index.js +1888 -2081
  2. package/dist/index.umd.cjs +15 -15
  3. package/package.json +12 -10
package/dist/index.js CHANGED
@@ -1,26 +1,23 @@
1
- var un = Object.defineProperty;
2
- var yt = Object.getOwnPropertySymbols, cn = Object.getPrototypeOf, dn = Object.prototype.hasOwnProperty, fn = Object.prototype.propertyIsEnumerable, ln = Reflect.get;
3
- var hn = (d, c, h) => c in d ? un(d, c, { enumerable: !0, configurable: !0, writable: !0, value: h }) : d[c] = h;
4
- var Et = (d, c) => {
1
+ var fn = Object.defineProperty;
2
+ var xt = Object.getOwnPropertySymbols, ln = Object.getPrototypeOf, hn = Object.prototype.hasOwnProperty, mn = Object.prototype.propertyIsEnumerable, pn = Reflect.get;
3
+ var St = (c) => {
4
+ throw TypeError(c);
5
+ };
6
+ var vn = (c, d, h) => d in c ? fn(c, d, { enumerable: !0, configurable: !0, writable: !0, value: h }) : c[d] = h;
7
+ var bt = (c, d) => {
5
8
  var h = {};
6
- for (var f in d)
7
- dn.call(d, f) && c.indexOf(f) < 0 && (h[f] = d[f]);
8
- if (d != null && yt)
9
- for (var f of yt(d))
10
- c.indexOf(f) < 0 && fn.call(d, f) && (h[f] = d[f]);
9
+ for (var f in c)
10
+ hn.call(c, f) && d.indexOf(f) < 0 && (h[f] = c[f]);
11
+ if (c != null && xt)
12
+ for (var f of xt(c))
13
+ d.indexOf(f) < 0 && mn.call(c, f) && (h[f] = c[f]);
11
14
  return h;
12
15
  };
13
- var N = (d, c, h) => (hn(d, typeof c != "symbol" ? c + "" : c, h), h), mn = (d, c, h) => {
14
- if (!c.has(d))
15
- throw TypeError("Cannot " + h);
16
- };
17
- var xt = (d, c, h) => {
18
- if (c.has(d))
19
- throw TypeError("Cannot add the same private member more than once");
20
- c instanceof WeakSet ? c.add(d) : c.set(d, h);
21
- };
22
- var St = (d, c, h) => (mn(d, c, "access private method"), h), bt = (d, c, h) => ln(cn(d), h, c);
23
- var _ = (d, c, h) => new Promise((f, v) => {
16
+ var N = (c, d, h) => vn(c, typeof d != "symbol" ? d + "" : d, h), wn = (c, d, h) => d.has(c) || St("Cannot " + h);
17
+ var It = (c, d, h) => d.has(c) ? St("Cannot add the same private member more than once") : d instanceof WeakSet ? d.add(c) : d.set(c, h);
18
+ var Wt = (c, d, h) => (wn(c, d, "access private method"), h);
19
+ var Pt = (c, d, h) => pn(ln(c), h, d);
20
+ var _ = (c, d, h) => new Promise((f, v) => {
24
21
  var y = (A) => {
25
22
  try {
26
23
  I(h.next(A));
@@ -34,37 +31,37 @@ var _ = (d, c, h) => new Promise((f, v) => {
34
31
  v(D);
35
32
  }
36
33
  }, I = (A) => A.done ? f(A.value) : Promise.resolve(A.value).then(y, E);
37
- I((h = h.apply(d, c)).next());
34
+ I((h = h.apply(c, d)).next());
38
35
  });
39
- function pn(d, c) {
40
- for (var h = 0; h < c.length; h++) {
41
- const f = c[h];
36
+ function gn(c, d) {
37
+ for (var h = 0; h < d.length; h++) {
38
+ const f = d[h];
42
39
  if (typeof f != "string" && !Array.isArray(f)) {
43
40
  for (const v in f)
44
- if (v !== "default" && !(v in d)) {
41
+ if (v !== "default" && !(v in c)) {
45
42
  const y = Object.getOwnPropertyDescriptor(f, v);
46
- y && Object.defineProperty(d, v, y.get ? y : {
43
+ y && Object.defineProperty(c, v, y.get ? y : {
47
44
  enumerable: !0,
48
45
  get: () => f[v]
49
46
  });
50
47
  }
51
48
  }
52
49
  }
53
- return Object.freeze(Object.defineProperty(d, Symbol.toStringTag, { value: "Module" }));
50
+ return Object.freeze(Object.defineProperty(c, Symbol.toStringTag, { value: "Module" }));
54
51
  }
55
- const Se = !!(typeof window != "undefined" && window.document && window.document.createElement), It = 200;
56
- class ke {
52
+ const be = !!(typeof window != "undefined" && window.document && window.document.createElement), Ct = 200;
53
+ class Fe {
57
54
  constructor() {
58
55
  N(this, "tooltipElement", null);
59
56
  N(this, "tooltipContent", null);
60
57
  N(this, "tooltipClass", "soyio-tooltip");
61
58
  N(this, "hideTimeout", null);
62
- Se && this.createTooltipElement();
59
+ be && this.createTooltipElement();
63
60
  }
64
61
  createTooltipElement() {
65
- const c = document.querySelector(`.${this.tooltipClass}`);
66
- if (c) {
67
- this.tooltipElement = c, this.tooltipContent = this.tooltipElement.querySelector(".soyio-tooltip-content");
62
+ const d = document.querySelector(`.${this.tooltipClass}`);
63
+ if (d) {
64
+ this.tooltipElement = d, this.tooltipContent = this.tooltipElement.querySelector(".soyio-tooltip-content");
68
65
  return;
69
66
  }
70
67
  this.tooltipElement = document.createElement("div"), this.tooltipElement.className = this.tooltipClass, this.tooltipElement.style.cssText = `
@@ -81,77 +78,76 @@ class ke {
81
78
  word-wrap: break-word;
82
79
  pointer-events: none;
83
80
  opacity: 0;
84
- transition: opacity ${It}ms ease, transform ${It}ms ease;
81
+ transition: opacity ${Ct}ms ease, transform ${Ct}ms ease;
85
82
  backdrop-filter: blur(5px);
86
83
  -webkit-backdrop-filter: blur(5px);
87
84
  transform: scale(0.95);
88
85
  `, this.tooltipContent = document.createElement("div"), this.tooltipContent.className = "soyio-tooltip-content", this.tooltipElement.appendChild(this.tooltipContent), document.body.appendChild(this.tooltipElement);
89
86
  }
90
- show(c, h, f) {
91
- if (!this.tooltipElement || !this.tooltipContent)
92
- return;
93
- this.hideTimeout && (clearTimeout(this.hideTimeout), this.hideTimeout = null), this.tooltipContent.textContent = c, this.tooltipElement.style.opacity = "0", this.tooltipElement.style.transform = "scale(0.95)";
87
+ show(d, h, f) {
88
+ if (!this.tooltipElement || !this.tooltipContent) return;
89
+ this.hideTimeout && (clearTimeout(this.hideTimeout), this.hideTimeout = null), this.tooltipContent.textContent = d, this.tooltipElement.style.opacity = "0", this.tooltipElement.style.transform = "scale(0.95)";
94
90
  const v = this.calculateOptimalPlacement(h, f);
95
91
  this.applyPlacement(v), requestAnimationFrame(() => {
96
92
  this.tooltipElement && (this.tooltipElement.style.opacity = "1", this.tooltipElement.style.transform = "scale(1)");
97
93
  });
98
94
  }
99
- calculateOptimalPlacement(c, h) {
95
+ calculateOptimalPlacement(d, h) {
100
96
  const f = this.tooltipElement.offsetWidth, v = this.tooltipElement.offsetHeight, { innerWidth: y, innerHeight: E } = window, I = 4, A = {
101
97
  top: {
102
98
  top: h - v - I,
103
- left: c - f / 2,
99
+ left: d - f / 2,
104
100
  placement: "top"
105
101
  },
106
102
  bottom: {
107
103
  top: h + I,
108
- left: c - f / 2,
104
+ left: d - f / 2,
109
105
  placement: "bottom"
110
106
  },
111
107
  right: {
112
108
  top: h - v / 2,
113
- left: c + I,
109
+ left: d + I,
114
110
  placement: "right"
115
111
  },
116
112
  left: {
117
113
  top: h - v / 2,
118
- left: c - f - I,
114
+ left: d - f - I,
119
115
  placement: "left"
120
116
  }
121
117
  };
122
118
  for (const [, k] of Object.entries(A))
123
- if (ke.fitsInViewport(k, f, v, y, E))
119
+ if (Fe.fitsInViewport(k, f, v, y, E))
124
120
  return k;
125
121
  const D = A.top;
126
122
  return D.left = Math.max(I, Math.min(D.left, y - f - I)), D.top = Math.max(I, Math.min(D.top, E - v - I)), D;
127
123
  }
128
- static fitsInViewport(c, h, f, v, y) {
129
- return c.top >= 0 && c.left >= 0 && c.top + f <= y && c.left + h <= v;
124
+ static fitsInViewport(d, h, f, v, y) {
125
+ return d.top >= 0 && d.left >= 0 && d.top + f <= y && d.left + h <= v;
130
126
  }
131
- applyPlacement(c) {
132
- this.tooltipElement && (this.tooltipElement.style.left = `${c.left}px`, this.tooltipElement.style.top = `${c.top}px`);
127
+ applyPlacement(d) {
128
+ this.tooltipElement && (this.tooltipElement.style.left = `${d.left}px`, this.tooltipElement.style.top = `${d.top}px`);
133
129
  }
134
130
  hide() {
135
131
  this.tooltipElement && (this.hideTimeout && (clearTimeout(this.hideTimeout), this.hideTimeout = null), this.tooltipElement.style.opacity = "0", this.tooltipElement.style.transform = "scale(0.95)");
136
132
  }
137
133
  destroy() {
138
- var c;
139
- (c = this.tooltipElement) == null || c.remove(), this.tooltipElement = null, this.tooltipContent = null, this.hideTimeout && (clearTimeout(this.hideTimeout), this.hideTimeout = null);
134
+ var d;
135
+ (d = this.tooltipElement) == null || d.remove(), this.tooltipElement = null, this.tooltipContent = null, this.hideTimeout && (clearTimeout(this.hideTimeout), this.hideTimeout = null);
140
136
  }
141
137
  }
142
- function vn(d, c, h) {
138
+ function yn(c, d, h) {
143
139
  return _(this, null, function* () {
144
- if (!d.contentWindow)
140
+ if (!c.contentWindow)
145
141
  throw new Error("Invalid iframe: contentWindow is null");
146
- const f = yield Promise.resolve().then(() => He);
142
+ const f = yield Promise.resolve().then(() => qe);
147
143
  try {
148
- yield f.send(d.contentWindow, "SET_APPEARANCE", { appearance: c, identifier: h });
144
+ yield f.send(c.contentWindow, "SET_APPEARANCE", { appearance: d, identifier: h });
149
145
  } catch (v) {
150
146
  console.error("Failed to send appearance config:", v);
151
147
  }
152
148
  });
153
149
  }
154
- const wn = "IFRAME_READY", gn = "IFRAME_HEIGHT_CHANGE", yn = "TOOLTIP_STATE_CHANGE", En = "INFO_EVENT", xn = "CONSENT_STATE_CHANGE", U = {
150
+ const En = "IFRAME_READY", xn = "IFRAME_HEIGHT_CHANGE", Sn = "TOOLTIP_STATE_CHANGE", bn = "INFO_EVENT", In = "CONSENT_STATE_CHANGE", U = {
155
151
  // BASE
156
152
  onHeightChange: {},
157
153
  onIframeReady: {},
@@ -160,52 +156,52 @@ const wn = "IFRAME_READY", gn = "IFRAME_HEIGHT_CHANGE", yn = "TOOLTIP_STATE_CHAN
160
156
  // CONSENT
161
157
  onStateChange: {}
162
158
  };
163
- let Wt, Pt, Ct, Tt, Ot;
164
- function Sn() {
159
+ let Tt, Rt, Ot, At, Nt;
160
+ function Wn() {
165
161
  return _(this, null, function* () {
166
- const d = yield Promise.resolve().then(() => He);
167
- Wt || Pt || Ct || Tt || Ot || (Wt = d.on(gn, (c) => _(this, null, function* () {
168
- const h = c.data, f = U.onHeightChange[h.identifier];
162
+ const c = yield Promise.resolve().then(() => qe);
163
+ Tt || Rt || Ot || At || Nt || (Tt = c.on(xn, (d) => _(null, null, function* () {
164
+ const h = d.data, f = U.onHeightChange[h.identifier];
169
165
  return f && f(h.height), Promise.resolve();
170
- })), Pt = d.on(wn, (c) => _(this, null, function* () {
171
- const h = c.data, f = U.onIframeReady[h.identifier];
166
+ })), Rt = c.on(En, (d) => _(null, null, function* () {
167
+ const h = d.data, f = U.onIframeReady[h.identifier];
172
168
  return f && f(), Promise.resolve();
173
- })), Ct = d.on(yn, (c) => _(this, null, function* () {
174
- const h = c.data, f = U.onTooltipChange[h.identifier];
169
+ })), Ot = c.on(Sn, (d) => _(null, null, function* () {
170
+ const h = d.data, f = U.onTooltipChange[h.identifier];
175
171
  return f && f(h), Promise.resolve();
176
- })), Tt = d.on(xn, (c) => _(this, null, function* () {
177
- const h = c.data, f = U.onStateChange[h.identifier];
172
+ })), At = c.on(In, (d) => _(null, null, function* () {
173
+ const h = d.data, f = U.onStateChange[h.identifier];
178
174
  return f && f(h), Promise.resolve();
179
- })), Ot = d.on(En, (h) => _(this, [h], function* ({ data: c }) {
180
- const E = c, { identifier: f } = E, v = Et(E, ["identifier"]), y = U.onInfo[f];
175
+ })), Nt = c.on(bn, (h) => _(null, [h], function* ({ data: d }) {
176
+ const E = d, { identifier: f } = E, v = bt(E, ["identifier"]), y = U.onInfo[f];
181
177
  return y && y(v), Promise.resolve();
182
178
  })));
183
179
  });
184
180
  }
185
- function Rt(d, c) {
181
+ function zt(c, d) {
186
182
  const {
187
183
  onHeightChange: h,
188
184
  onIframeReady: f,
189
185
  onTooltipChange: v,
190
186
  onStateChange: y,
191
187
  onInfo: E
192
- } = c;
193
- h && (U.onHeightChange[d] = h), f && (U.onIframeReady[d] = f), v && (U.onTooltipChange[d] = v), y && (U.onStateChange[d] = y), E && (U.onInfo[d] = E);
188
+ } = d;
189
+ h && (U.onHeightChange[c] = h), f && (U.onIframeReady[c] = f), v && (U.onTooltipChange[c] = v), y && (U.onStateChange[c] = y), E && (U.onInfo[c] = E);
194
190
  }
195
- function bn(d) {
196
- delete U.onHeightChange[d], delete U.onIframeReady[d], delete U.onTooltipChange[d], delete U.onStateChange[d], delete U.onInfo[d];
191
+ function Pn(c) {
192
+ delete U.onHeightChange[c], delete U.onIframeReady[c], delete U.onTooltipChange[c], delete U.onStateChange[c], delete U.onInfo[c];
197
193
  }
198
- function In(d) {
199
- const c = document.getElementById(d);
200
- c && (console.warn("ConsentBox iframe already exists. Removing existing before mounting new one."), c.remove());
194
+ function Cn(c) {
195
+ const d = document.getElementById(c);
196
+ d && (console.warn("ConsentBox iframe already exists. Removing existing before mounting new one."), d.remove());
201
197
  }
202
- function Wn(d) {
203
- const c = document.querySelector(d);
204
- if (!c)
205
- throw new Error(`Iframe div container with id '${d}' not found`);
206
- if (c.tagName.toLowerCase() !== "div")
207
- throw new Error(`Iframe container with id '${d}' must be a <div> element`);
208
- const h = c;
198
+ function Tn(c) {
199
+ const d = document.querySelector(c);
200
+ if (!d)
201
+ throw new Error(`Iframe div container with id '${c}' not found`);
202
+ if (d.tagName.toLowerCase() !== "div")
203
+ throw new Error(`Iframe container with id '${c}' must be a <div> element`);
204
+ const h = d;
209
205
  return h.style.position = "relative", h.style.cssText += `
210
206
  padding: 0 !important;
211
207
  margin: 0 !important;
@@ -217,9 +213,9 @@ function Wn(d) {
217
213
  opacity: 1 !important;
218
214
  `, h;
219
215
  }
220
- function Pn(d, c, h) {
216
+ function Rn(c, d, h) {
221
217
  const f = document.createElement("iframe");
222
- return f.id = c, f.src = d, f.style.cssText += `
218
+ return f.id = d, f.src = c, f.style.cssText += `
223
219
  width: 100% !important;
224
220
  min-width: ${h.minWidth} !important;
225
221
  border: none !important;
@@ -229,10 +225,10 @@ function Pn(d, c, h) {
229
225
  opacity 0.4s 0.1s;
230
226
  `, f;
231
227
  }
232
- function Cn() {
228
+ function On() {
233
229
  return Math.random().toString(36).substring(2, 10);
234
230
  }
235
- const At = "https://app.soyio.id", Nt = "https://sandbox.soyio.id", Tn = "https://privacy.soyio.id", On = "https://privacy-sandbox.soyio.id", Rn = [
231
+ const jt = "https://app.soyio.id", Lt = "https://sandbox.soyio.id", An = "https://privacy.soyio.id", Nn = "https://privacy-sandbox.soyio.id", Dn = [
236
232
  "DISCLOSURE_REQUEST_SUCCESSFUL",
237
233
  "IDENTITY_REGISTERED",
238
234
  "IDENTITY_SIGNATURE",
@@ -240,27 +236,27 @@ const At = "https://app.soyio.id", Nt = "https://sandbox.soyio.id", Tn = "https:
240
236
  "DENIED_CAMERA_PERMISSION",
241
237
  "REJECTED_SIGNATURE",
242
238
  "CLOSE_POPUP"
243
- ], An = "WIDGET_CLOSED", Nn = 420, Dn = 720, Mn = 500, jn = {
239
+ ], Mn = "WIDGET_CLOSED", zn = 420, jn = 720, Ln = 500, kn = {
244
240
  minWidth: "375px"
245
- }, zn = {
241
+ }, Un = {
246
242
  minWidth: "0px"
247
- }, Ln = {
243
+ }, Fn = {
248
244
  minWidth: "375px"
249
245
  };
250
- class Ie {
251
- constructor(c) {
246
+ class We {
247
+ constructor(d) {
252
248
  N(this, "iframe", null);
253
249
  N(this, "skeleton", null);
254
250
  N(this, "options");
255
251
  N(this, "appearance");
256
252
  N(this, "tooltipManager");
257
- N(this, "defaultIframeCSSConfig", jn);
253
+ N(this, "defaultIframeCSSConfig", kn);
258
254
  N(this, "Skeleton", null);
259
255
  N(this, "defaultUniqueId");
260
- this.options = c, this.appearance = c.appearance || null, this.tooltipManager = new ke(), this.defaultUniqueId = Ie.generateUniqueId();
256
+ this.options = d, this.appearance = d.appearance || null, this.tooltipManager = new Fe(), this.defaultUniqueId = We.generateUniqueId();
261
257
  }
262
258
  static generateUniqueId() {
263
- return Cn();
259
+ return On();
264
260
  }
265
261
  get uniqueIdentifier() {
266
262
  return this.defaultUniqueId;
@@ -268,53 +264,50 @@ class Ie {
268
264
  get iframeIdentifier() {
269
265
  return `${this.defaultIframePrefix}-${this.uniqueIdentifier}`;
270
266
  }
271
- handleHeightChange(c) {
272
- if (!this.iframe || (this.iframe.style.height = `${c}px`, c > 0))
273
- return;
267
+ handleHeightChange(d) {
268
+ if (!this.iframe || (this.iframe.style.height = `${d}px`, d > 0)) return;
274
269
  const { parentElement: h } = this.iframe;
275
270
  h && (h.style.display = "none");
276
271
  }
277
272
  handleIframeReady() {
278
273
  return _(this, null, function* () {
279
- this.iframe && (this.options.onReady && this.options.onReady(), yield vn(this.iframe, this.appearance, this.uniqueIdentifier), this.skeleton && this.skeleton.hide());
274
+ this.iframe && (this.options.onReady && this.options.onReady(), yield yn(this.iframe, this.appearance, this.uniqueIdentifier), this.skeleton && this.skeleton.hide());
280
275
  });
281
276
  }
282
- handleTooltipChange(c) {
283
- if (!this.iframe)
284
- return;
285
- const h = this.iframe.getBoundingClientRect(), { text: f, coordinates: v, isVisible: y } = c, E = v.x + h.left, I = v.y + h.top;
277
+ handleTooltipChange(d) {
278
+ if (!this.iframe) return;
279
+ const h = this.iframe.getBoundingClientRect(), { text: f, coordinates: v, isVisible: y } = d, E = v.x + h.left, I = v.y + h.top;
286
280
  y ? this.tooltipManager.show(f, E, I) : this.tooltipManager.hide();
287
281
  }
288
282
  setupListeners() {
289
283
  return _(this, null, function* () {
290
- yield Sn();
291
- const c = {
284
+ yield Wn();
285
+ const d = {
292
286
  onHeightChange: this.handleHeightChange.bind(this),
293
287
  onIframeReady: this.handleIframeReady.bind(this),
294
288
  onTooltipChange: this.handleTooltipChange.bind(this),
295
289
  onInfo: this.options.onEvent.bind(this)
296
290
  };
297
- Rt(this.uniqueIdentifier, c);
291
+ zt(this.uniqueIdentifier, d);
298
292
  });
299
293
  }
300
- mount(c) {
294
+ mount(d) {
301
295
  return _(this, null, function* () {
302
- if (!Se)
303
- return this;
304
- yield this.setupListeners(), In(this.iframeIdentifier);
305
- const h = Wn(c), f = this.iframeUrl();
306
- return this.iframe = Pn(f, this.iframeIdentifier, this.defaultIframeCSSConfig), this.Skeleton && (this.skeleton = new this.Skeleton(this.uniqueIdentifier), this.skeleton.mount(h)), h.appendChild(this.iframe), this;
296
+ if (!be) return this;
297
+ yield this.setupListeners(), Cn(this.iframeIdentifier);
298
+ const h = Tn(d), f = this.iframeUrl();
299
+ return this.iframe = Rn(f, this.iframeIdentifier, this.defaultIframeCSSConfig), this.Skeleton && (this.skeleton = new this.Skeleton(this.uniqueIdentifier), this.skeleton.mount(h)), h.appendChild(this.iframe), this;
307
300
  });
308
301
  }
309
302
  unmount() {
310
- Se && (bn(this.uniqueIdentifier), this.skeleton && (this.skeleton.hide(), this.skeleton = null), this.iframe && (this.iframe.remove(), this.iframe = null));
303
+ be && (Pn(this.uniqueIdentifier), this.skeleton && (this.skeleton.hide(), this.skeleton = null), this.iframe && (this.iframe.remove(), this.iframe = null));
311
304
  }
312
305
  }
313
- class kn {
314
- constructor(c) {
306
+ class Hn {
307
+ constructor(d) {
315
308
  N(this, "element");
316
309
  N(this, "identifier");
317
- this.identifier = `skeleton-${c}`, this.element = document.createElement("div"), this.element.id = this.identifier, this.element.style.cssText = `
310
+ this.identifier = `skeleton-${d}`, this.element = document.createElement("div"), this.element.id = this.identifier, this.element.style.cssText = `
318
311
  position: absolute;
319
312
  left: 50%;
320
313
  top: 50%;
@@ -429,48 +422,48 @@ class kn {
429
422
  f.appendChild(v), f.appendChild(y), f.appendChild(E), D.appendChild(k), D.appendChild(oe), I.appendChild(A), I.appendChild(D), h.appendChild(f), h.appendChild(I), this.element.appendChild(h);
430
423
  }
431
424
  cleanupExistingSkeleton() {
432
- const c = document.getElementById(this.identifier);
433
- c && c.remove();
425
+ const d = document.getElementById(this.identifier);
426
+ d && d.remove();
434
427
  }
435
- mount(c) {
436
- this.cleanupExistingSkeleton(), c.appendChild(this.element);
428
+ mount(d) {
429
+ this.cleanupExistingSkeleton(), d.appendChild(this.element);
437
430
  }
438
431
  hide() {
439
432
  this.element.style.opacity = "0", setTimeout(() => this.element.remove(), 300);
440
433
  }
441
434
  }
442
- const Ue = "2.13.5";
443
- function Un(d) {
435
+ const He = "2.13.6";
436
+ function _n(c) {
444
437
  var E;
445
- const c = [
438
+ const d = [
446
439
  "actionToken",
447
440
  "entityId",
448
441
  "context",
449
442
  "optionalReconsentBehavior",
450
443
  "mandatoryReconsentBehavior"
451
- ], h = (E = d.isSandbox) != null ? E : !1, f = d.developmentUrl || (h ? Nt : At), v = new URLSearchParams();
452
- v.set("sdkVersion", Ue), c.forEach((I) => {
453
- d[I] && v.set(I, d[I]);
444
+ ], h = (E = c.isSandbox) != null ? E : !1, f = c.developmentUrl || (h ? Lt : jt), v = new URLSearchParams();
445
+ v.set("sdkVersion", He), d.forEach((I) => {
446
+ c[I] && v.set(I, c[I]);
454
447
  });
455
448
  const y = v.toString();
456
- return `${f}/embed/consents/${d.consentTemplateId}${y ? `?${y}` : ""}`;
449
+ return `${f}/embed/consents/${c.consentTemplateId}${y ? `?${y}` : ""}`;
457
450
  }
458
- class Dt extends Ie {
451
+ class kt extends We {
459
452
  constructor(h) {
460
453
  super(h);
461
454
  N(this, "defaultIframePrefix", "consent-box");
462
- N(this, "defaultIframeCSSConfig", zn);
455
+ N(this, "defaultIframeCSSConfig", Un);
463
456
  N(this, "state", {
464
457
  isSelected: !1,
465
458
  actionToken: null
466
459
  });
467
- this.Skeleton = kn;
460
+ this.Skeleton = Hn;
468
461
  }
469
462
  get uniqueIdentifier() {
470
463
  return this.options.consentTemplateId;
471
464
  }
472
465
  iframeUrl() {
473
- return Un(this.options);
466
+ return _n(this.options);
474
467
  }
475
468
  handleStateChange(h) {
476
469
  const { isSelected: f, actionToken: v } = h;
@@ -482,7 +475,7 @@ class Dt extends Ie {
482
475
  }
483
476
  setupListeners() {
484
477
  return _(this, null, function* () {
485
- yield bt(Dt.prototype, this, "setupListeners").call(this), Rt(this.uniqueIdentifier, {
478
+ yield Pt(kt.prototype, this, "setupListeners").call(this), zt(this.uniqueIdentifier, {
486
479
  onStateChange: this.handleStateChange.bind(this)
487
480
  });
488
481
  });
@@ -491,793 +484,713 @@ class Dt extends Ie {
491
484
  return this.state;
492
485
  }
493
486
  }
494
- function Fn(d) {
487
+ function qn(c) {
495
488
  var y, E;
496
- const c = (y = d.isSandbox) != null ? y : !1, h = d.developmentUrl || (c ? On : Tn), f = new URLSearchParams();
497
- f.set("sdkVersion", Ue), d.sessionToken ? f.set("sessionToken", d.sessionToken) : d.companyId && (f.set("companyId", d.companyId), d.subjectId && f.set("subjectId", d.subjectId)), (E = d.enabledFeatures) != null && E.length && f.set("enabledFeatures", d.enabledFeatures.join(","));
489
+ const d = (y = c.isSandbox) != null ? y : !1, h = c.developmentUrl || (d ? Nn : An), f = new URLSearchParams();
490
+ f.set("sdkVersion", He), c.sessionToken ? f.set("sessionToken", c.sessionToken) : c.companyId && (f.set("companyId", c.companyId), c.subjectId && f.set("subjectId", c.subjectId)), (E = c.enabledFeatures) != null && E.length && f.set("enabledFeatures", c.enabledFeatures.join(","));
498
491
  const v = f.toString();
499
492
  return `${h}${v ? `?${v}` : ""}`;
500
493
  }
501
- class tr extends Ie {
494
+ class ir extends We {
502
495
  constructor() {
503
496
  super(...arguments);
504
497
  N(this, "defaultIframePrefix", "privacy-center");
505
498
  N(this, "_uniqueIdentifier", "privacy-center");
506
- N(this, "defaultIframeCSSConfig", Ln);
499
+ N(this, "defaultIframeCSSConfig", Fn);
507
500
  }
508
501
  get uniqueIdentifier() {
509
502
  return this._uniqueIdentifier;
510
503
  }
511
504
  iframeUrl() {
512
- return Fn(this.options);
505
+ return qn(this.options);
513
506
  }
514
507
  }
515
- const nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
508
+ const ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
516
509
  __proto__: null
517
- }, Symbol.toStringTag, { value: "Module" })), Hn = "WIDGET_EVENT";
518
- function _n(d) {
519
- let c = "widget/";
520
- return "disclosureRequestId" in d.configProps ? c += ["disclosures", d.configProps.disclosureRequestId].join("/") : c += d.request, c;
510
+ }, Symbol.toStringTag, { value: "Module" })), $n = "WIDGET_EVENT";
511
+ function Bn(c) {
512
+ let d = "widget/";
513
+ return "disclosureRequestId" in c.configProps ? d += ["disclosures", c.configProps.disclosureRequestId].join("/") : d += c.request, d;
521
514
  }
522
- function qn(d) {
515
+ function Gn(c) {
523
516
  var y;
524
- const c = (y = d.isSandbox) != null ? y : !1, h = d.developmentUrl || (c ? Nt : At), f = Object.entries(d.configProps).filter(([E, I]) => I || E === "disclosureRequestId").map(([E, I]) => `${E}=${encodeURIComponent(I)}`).join("&"), v = _n(d);
525
- return `${h}/${v}?sdk=web&sdkVersion=${Ue}&${f}`;
517
+ const d = (y = c.isSandbox) != null ? y : !1, h = c.developmentUrl || (d ? Lt : jt), f = Object.entries(c.configProps).filter(([E, I]) => I || E === "disclosureRequestId").map(([E, I]) => `${E}=${encodeURIComponent(I)}`).join("&"), v = Bn(c);
518
+ return `${h}/${v}?sdk=web&sdkVersion=${He}&${f}`;
526
519
  }
527
- let Y = null, ze = null;
528
- function Le(d = null) {
529
- Y && !Y.closed && Y.focus(), d == null || d.preventDefault();
520
+ let Y = null, Le = null;
521
+ function Ue(c = null) {
522
+ Y && !Y.closed && Y.focus(), c == null || c.preventDefault();
530
523
  }
531
- function Fe() {
532
- document.body.style.filter = "", document.body.removeEventListener("click", Le);
524
+ function _e() {
525
+ document.body.style.filter = "", document.body.removeEventListener("click", Ue);
533
526
  }
534
- function Bn() {
535
- ze = setInterval(() => {
536
- (!Y || Y.closed) && (ze && clearInterval(ze), Fe());
537
- }, Mn);
527
+ function Vn() {
528
+ Le = setInterval(() => {
529
+ (!Y || Y.closed) && (Le && clearInterval(Le), _e());
530
+ }, Ln);
538
531
  }
539
- function Gn(d) {
540
- const c = qn(d), h = Nn, f = Dn, v = 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, A = E / window.screen.availWidth, D = (E - h) / 2 / A + v, k = (I - f) / 2 / A + y;
541
- document.body.style.filter = "blur(5px)", document.body.addEventListener("click", Le), Y = window.open(
542
- c,
532
+ function Jn(c) {
533
+ const d = Gn(c), h = zn, f = jn, v = 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, A = E / window.screen.availWidth, D = (E - h) / 2 / A + v, k = (I - f) / 2 / A + y;
534
+ document.body.style.filter = "blur(5px)", document.body.addEventListener("click", Ue), Y = window.open(
535
+ d,
543
536
  "Soyio",
544
537
  `scrollbars=yes,
545
538
  width=${h},
546
539
  height=${f},
547
540
  top=${k},
548
541
  left=${D}`
549
- ), Le(), Bn();
542
+ ), Ue(), Vn();
550
543
  }
551
- function $n() {
552
- Y && (Y.close(), Y = null), Fe();
544
+ function Yn() {
545
+ Y && (Y.close(), Y = null), _e();
553
546
  }
554
547
  let me = null;
555
- function Vn() {
548
+ function Zn() {
556
549
  me && (me.cancel(), me = null);
557
550
  }
558
- function Jn(d) {
551
+ function Kn(c) {
559
552
  return _(this, null, function* () {
560
- const { onEvent: c } = d, h = yield Promise.resolve().then(() => He);
561
- me && Vn(), me = h.on(Hn, (v) => _(this, [v], function* ({ data: f }) {
562
- return c(f), Rn.includes(f.eventName) ? $n() : f.eventName === An && Fe(), Promise.resolve();
553
+ const { onEvent: d } = c, h = yield Promise.resolve().then(() => qe);
554
+ me && Zn(), me = h.on($n, (v) => _(null, [v], function* ({ data: f }) {
555
+ return d(f), Dn.includes(f.eventName) ? Yn() : f.eventName === Mn && _e(), Promise.resolve();
563
556
  }));
564
557
  });
565
558
  }
566
- function Yn(d) {
567
- Jn(d);
559
+ function Xn(c) {
560
+ Kn(c);
568
561
  }
569
- var be, Mt;
570
- class rr {
571
- constructor(c) {
572
- xt(this, be);
562
+ var Ie, Ut;
563
+ class sr {
564
+ constructor(d) {
565
+ It(this, Ie);
573
566
  N(this, "onEvent");
574
- this.onEvent = c.onEvent, Se && (Gn(c), Yn({
575
- onEvent: St(this, be, Mt).bind(this)
567
+ this.onEvent = d.onEvent, be && (Jn(d), Xn({
568
+ onEvent: Wt(this, Ie, Ut).bind(this)
576
569
  }));
577
570
  }
578
571
  }
579
- be = new WeakSet(), Mt = function(c) {
580
- this.onEvent(c);
572
+ Ie = new WeakSet(), Ut = function(d) {
573
+ this.onEvent(d);
581
574
  };
582
- var Zn = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {};
583
- function Kn(d) {
584
- return d && d.__esModule && Object.prototype.hasOwnProperty.call(d, "default") ? d.default : d;
575
+ function Qn(c) {
576
+ return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c;
585
577
  }
586
- var jt = { exports: {} }, zt = { exports: {} };
587
- (function(d, c) {
588
- (function(h, f) {
589
- d.exports = f();
590
- })(typeof self != "undefined" ? self : Zn, function() {
591
- return function(h) {
592
- var f = {};
593
- function v(y) {
594
- if (f[y])
595
- return f[y].exports;
596
- var E = f[y] = {
597
- i: y,
598
- l: !1,
599
- exports: {}
600
- };
601
- return h[y].call(E.exports, E, E.exports, v), E.l = !0, E.exports;
602
- }
603
- return v.m = h, v.c = f, v.d = function(y, E, I) {
604
- v.o(y, E) || Object.defineProperty(y, E, {
605
- enumerable: !0,
606
- get: I
607
- });
608
- }, v.r = function(y) {
609
- typeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(y, Symbol.toStringTag, {
610
- value: "Module"
611
- }), Object.defineProperty(y, "__esModule", {
612
- value: !0
578
+ var ke = { exports: {} }, Se = { exports: {} }, er = Se.exports, Dt;
579
+ function tr() {
580
+ return Dt || (Dt = 1, function(c, d) {
581
+ (function(h, f) {
582
+ c.exports = f();
583
+ })(typeof self != "undefined" ? self : er, function() {
584
+ return function(h) {
585
+ var f = {};
586
+ function v(y) {
587
+ if (f[y]) return f[y].exports;
588
+ var E = f[y] = {
589
+ i: y,
590
+ l: !1,
591
+ exports: {}
592
+ };
593
+ return h[y].call(E.exports, E, E.exports, v), E.l = !0, E.exports;
594
+ }
595
+ return v.m = h, v.c = f, v.d = function(y, E, I) {
596
+ v.o(y, E) || Object.defineProperty(y, E, {
597
+ enumerable: !0,
598
+ get: I
599
+ });
600
+ }, v.r = function(y) {
601
+ typeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(y, Symbol.toStringTag, {
602
+ value: "Module"
603
+ }), Object.defineProperty(y, "__esModule", {
604
+ value: !0
605
+ });
606
+ }, v.t = function(y, E) {
607
+ if (1 & E && (y = v(y)), 8 & E || 4 & E && typeof y == "object" && y && y.__esModule) return y;
608
+ var I = /* @__PURE__ */ Object.create(null);
609
+ if (v.r(I), Object.defineProperty(I, "default", {
610
+ enumerable: !0,
611
+ value: y
612
+ }), 2 & E && typeof y != "string") for (var A in y) v.d(I, A, function(D) {
613
+ return y[D];
614
+ }.bind(null, A));
615
+ return I;
616
+ }, v.n = function(y) {
617
+ var E = y && y.__esModule ? function() {
618
+ return y.default;
619
+ } : function() {
620
+ return y;
621
+ };
622
+ return v.d(E, "a", E), E;
623
+ }, v.o = function(y, E) {
624
+ return {}.hasOwnProperty.call(y, E);
625
+ }, v.p = "", v(v.s = 0);
626
+ }([function(h, f, v) {
627
+ v.r(f), v.d(f, "Promise", function() {
628
+ return P;
629
+ }), v.d(f, "TYPES", function() {
630
+ return cn;
631
+ }), v.d(f, "ProxyWindow", function() {
632
+ return B;
633
+ }), v.d(f, "setup", function() {
634
+ return Et;
635
+ }), v.d(f, "destroy", function() {
636
+ return un;
637
+ }), v.d(f, "serializeMessage", function() {
638
+ return rn;
639
+ }), v.d(f, "deserializeMessage", function() {
640
+ return on;
641
+ }), v.d(f, "createProxyWindow", function() {
642
+ return an;
643
+ }), v.d(f, "toProxyWindow", function() {
644
+ return sn;
645
+ }), v.d(f, "on", function() {
646
+ return ne;
647
+ }), v.d(f, "once", function() {
648
+ return nn;
649
+ }), v.d(f, "send", function() {
650
+ return K;
651
+ }), v.d(f, "markWindowKnown", function() {
652
+ return ut;
653
+ }), v.d(f, "cleanUpWindow", function() {
654
+ return dn;
655
+ }), v.d(f, "bridge", function() {
613
656
  });
614
- }, v.t = function(y, E) {
615
- if (1 & E && (y = v(y)), 8 & E || 4 & E && typeof y == "object" && y && y.__esModule)
616
- return y;
617
- var I = /* @__PURE__ */ Object.create(null);
618
- if (v.r(I), Object.defineProperty(I, "default", {
619
- enumerable: !0,
620
- value: y
621
- }), 2 & E && typeof y != "string")
622
- for (var A in y)
623
- v.d(I, A, function(D) {
624
- return y[D];
625
- }.bind(null, A));
626
- return I;
627
- }, v.n = function(y) {
628
- var E = y && y.__esModule ? function() {
629
- return y.default;
630
- } : function() {
631
- return y;
632
- };
633
- return v.d(E, "a", E), E;
634
- }, v.o = function(y, E) {
635
- return {}.hasOwnProperty.call(y, E);
636
- }, v.p = "", v(v.s = 0);
637
- }([function(h, f, v) {
638
- v.r(f), v.d(f, "Promise", function() {
639
- return P;
640
- }), v.d(f, "TYPES", function() {
641
- return an;
642
- }), v.d(f, "ProxyWindow", function() {
643
- return G;
644
- }), v.d(f, "setup", function() {
645
- return gt;
646
- }), v.d(f, "destroy", function() {
647
- return on;
648
- }), v.d(f, "serializeMessage", function() {
649
- return en;
650
- }), v.d(f, "deserializeMessage", function() {
651
- return tn;
652
- }), v.d(f, "createProxyWindow", function() {
653
- return nn;
654
- }), v.d(f, "toProxyWindow", function() {
655
- return rn;
656
- }), v.d(f, "on", function() {
657
- return K;
658
- }), v.d(f, "once", function() {
659
- return Qt;
660
- }), v.d(f, "send", function() {
661
- return X;
662
- }), v.d(f, "markWindowKnown", function() {
663
- return at;
664
- }), v.d(f, "cleanUpWindow", function() {
665
- return sn;
666
- }), v.d(f, "bridge", function() {
667
- });
668
- function y(e) {
669
- return {}.toString.call(e) === "[object RegExp]";
670
- }
671
- var E = `Call was rejected by callee.\r
657
+ function y(e) {
658
+ return {}.toString.call(e) === "[object RegExp]";
659
+ }
660
+ var E = `Call was rejected by callee.\r
672
661
  `;
673
- function I(e) {
674
- return e === void 0 && (e = window), e.location.protocol;
675
- }
676
- function A(e) {
677
- if (e === void 0 && (e = window), e.mockDomain) {
678
- var n = e.mockDomain.split("//")[0];
679
- if (n)
680
- return n;
662
+ function I(e) {
663
+ return e === void 0 && (e = window), e.location.protocol;
681
664
  }
682
- return I(e);
683
- }
684
- function D(e) {
685
- return e === void 0 && (e = window), A(e) === "about:";
686
- }
687
- function k(e) {
688
- if (e === void 0 && (e = window), e)
689
- try {
690
- if (e.parent && e.parent !== e)
691
- return e.parent;
665
+ function A(e) {
666
+ if (e === void 0 && (e = window), e.mockDomain) {
667
+ var n = e.mockDomain.split("//")[0];
668
+ if (n) return n;
669
+ }
670
+ return I(e);
671
+ }
672
+ function D(e) {
673
+ return e === void 0 && (e = window), A(e) === "about:";
674
+ }
675
+ function k(e) {
676
+ if (e === void 0 && (e = window), e) try {
677
+ if (e.parent && e.parent !== e) return e.parent;
692
678
  } catch (n) {
693
679
  }
694
- }
695
- function oe(e) {
696
- if (e === void 0 && (e = window), e && !k(e))
697
- try {
680
+ }
681
+ function oe(e) {
682
+ if (e === void 0 && (e = window), e && !k(e)) try {
698
683
  return e.opener;
699
684
  } catch (n) {
700
685
  }
701
- }
702
- function Z(e) {
703
- try {
704
- return !0;
705
- } catch (n) {
706
686
  }
707
- return !1;
708
- }
709
- function pe(e) {
710
- e === void 0 && (e = window);
711
- var n = e.location;
712
- if (!n)
713
- throw new Error("Can not read window location");
714
- var t = I(e);
715
- if (!t)
716
- throw new Error("Can not read window protocol");
717
- if (t === "file:")
718
- return "file://";
719
- if (t === "about:") {
720
- var r = k(e);
721
- return r && Z() ? pe(r) : "about://";
722
- }
723
- var o = n.host;
724
- if (!o)
725
- throw new Error("Can not read window host");
726
- return t + "//" + o;
727
- }
728
- function F(e) {
729
- e === void 0 && (e = window);
730
- var n = pe(e);
731
- return n && e.mockDomain && e.mockDomain.indexOf("mock:") === 0 ? e.mockDomain : n;
732
- }
733
- function Q(e) {
734
- if (!function(n) {
687
+ function Z(e) {
735
688
  try {
736
- if (n === window)
737
- return !0;
738
- } catch (r) {
689
+ return !0;
690
+ } catch (n) {
739
691
  }
740
- try {
741
- var t = Object.getOwnPropertyDescriptor(n, "location");
742
- if (t && t.enumerable === !1)
743
- return !1;
744
- } catch (r) {
692
+ return !1;
693
+ }
694
+ function pe(e) {
695
+ e === void 0 && (e = window);
696
+ var n = e.location;
697
+ if (!n) throw new Error("Can not read window location");
698
+ var t = I(e);
699
+ if (!t) throw new Error("Can not read window protocol");
700
+ if (t === "file:") return "file://";
701
+ if (t === "about:") {
702
+ var r = k(e);
703
+ return r && Z() ? pe(r) : "about://";
745
704
  }
705
+ var o = n.host;
706
+ if (!o) throw new Error("Can not read window host");
707
+ return t + "//" + o;
708
+ }
709
+ function F(e) {
710
+ e === void 0 && (e = window);
711
+ var n = pe(e);
712
+ return n && e.mockDomain && e.mockDomain.indexOf("mock:") === 0 ? e.mockDomain : n;
713
+ }
714
+ function X(e) {
715
+ if (!function(n) {
716
+ try {
717
+ if (n === window) return !0;
718
+ } catch (r) {
719
+ }
720
+ try {
721
+ var t = Object.getOwnPropertyDescriptor(n, "location");
722
+ if (t && t.enumerable === !1) return !1;
723
+ } catch (r) {
724
+ }
725
+ try {
726
+ if (D(n) && Z()) return !0;
727
+ } catch (r) {
728
+ }
729
+ try {
730
+ if (function(r) {
731
+ return r === void 0 && (r = window), A(r) === "mock:";
732
+ }(n) && Z()) return !0;
733
+ } catch (r) {
734
+ }
735
+ try {
736
+ if (pe(n) === pe(window)) return !0;
737
+ } catch (r) {
738
+ }
739
+ return !1;
740
+ }(e)) return !1;
746
741
  try {
747
- if (D(n) && Z())
748
- return !0;
749
- } catch (r) {
742
+ if (e === window || D(e) && Z() || F(window) === F(e)) return !0;
743
+ } catch (n) {
750
744
  }
745
+ return !1;
746
+ }
747
+ function ve(e) {
748
+ if (!X(e)) throw new Error("Expected window to be same domain");
749
+ return e;
750
+ }
751
+ function $e(e, n) {
752
+ if (!e || !n) return !1;
753
+ var t = k(n);
754
+ return t ? t === e : function(r) {
755
+ var o = [];
756
+ try {
757
+ for (; r.parent !== r; )
758
+ o.push(r.parent), r = r.parent;
759
+ } catch (i) {
760
+ }
761
+ return o;
762
+ }(n).indexOf(e) !== -1;
763
+ }
764
+ function Be(e) {
765
+ var n = [], t;
751
766
  try {
752
- if (function(r) {
753
- return r === void 0 && (r = window), A(r) === "mock:";
754
- }(n) && Z())
755
- return !0;
756
- } catch (r) {
767
+ t = e.frames;
768
+ } catch (u) {
769
+ t = e;
757
770
  }
771
+ var r;
758
772
  try {
759
- if (pe(n) === pe(window))
760
- return !0;
761
- } catch (r) {
773
+ r = t.length;
774
+ } catch (u) {
762
775
  }
763
- return !1;
764
- }(e))
765
- return !1;
766
- try {
767
- if (e === window || D(e) && Z() || F(window) === F(e))
768
- return !0;
769
- } catch (n) {
770
- }
771
- return !1;
772
- }
773
- function ve(e) {
774
- if (!Q(e))
775
- throw new Error("Expected window to be same domain");
776
- return e;
777
- }
778
- function _e(e, n) {
779
- if (!e || !n)
780
- return !1;
781
- var t = k(n);
782
- return t ? t === e : function(r) {
783
- var o = [];
784
- try {
785
- for (; r.parent !== r; )
786
- o.push(r.parent), r = r.parent;
787
- } catch (i) {
776
+ if (r === 0) return n;
777
+ if (r) {
778
+ for (var o = 0; o < r; o++) {
779
+ var i = void 0;
780
+ try {
781
+ i = t[o];
782
+ } catch (u) {
783
+ continue;
784
+ }
785
+ n.push(i);
786
+ }
787
+ return n;
788
788
  }
789
- return o;
790
- }(n).indexOf(e) !== -1;
791
- }
792
- function qe(e) {
793
- var n = [], t;
794
- try {
795
- t = e.frames;
796
- } catch (u) {
797
- t = e;
798
- }
799
- var r;
800
- try {
801
- r = t.length;
802
- } catch (u) {
803
- }
804
- if (r === 0)
805
- return n;
806
- if (r) {
807
- for (var o = 0; o < r; o++) {
808
- var i = void 0;
789
+ for (var a = 0; a < 100; a++) {
790
+ var l = void 0;
809
791
  try {
810
- i = t[o];
792
+ l = t[a];
811
793
  } catch (u) {
812
- continue;
794
+ return n;
813
795
  }
814
- n.push(i);
796
+ if (!l) return n;
797
+ n.push(l);
815
798
  }
816
799
  return n;
817
800
  }
818
- for (var a = 0; a < 100; a++) {
819
- var l = void 0;
801
+ var Ht = [], _t = [];
802
+ function G(e, n) {
803
+ n === void 0 && (n = !0);
820
804
  try {
821
- l = t[a];
822
- } catch (u) {
823
- return n;
824
- }
825
- if (!l)
826
- return n;
827
- n.push(l);
828
- }
829
- return n;
830
- }
831
- var kt = [], Ut = [];
832
- function $(e, n) {
833
- n === void 0 && (n = !0);
834
- try {
835
- if (e === window)
836
- return !1;
837
- } catch (o) {
838
- return !0;
839
- }
840
- try {
841
- if (!e)
805
+ if (e === window) return !1;
806
+ } catch (o) {
842
807
  return !0;
843
- } catch (o) {
844
- return !0;
845
- }
846
- try {
847
- if (e.closed)
808
+ }
809
+ try {
810
+ if (!e) return !0;
811
+ } catch (o) {
848
812
  return !0;
849
- } catch (o) {
850
- return !o || o.message !== E;
851
- }
852
- if (n && Q(e))
813
+ }
853
814
  try {
854
- if (e.mockclosed)
855
- return !0;
815
+ if (e.closed) return !0;
856
816
  } catch (o) {
817
+ return !o || o.message !== E;
857
818
  }
858
- try {
859
- if (!e.parent || !e.top)
860
- return !0;
861
- } catch (o) {
862
- }
863
- var t = function(o, i) {
864
- for (var a = 0; a < o.length; a++)
865
- try {
866
- if (o[a] === i)
867
- return a;
819
+ if (n && X(e)) try {
820
+ if (e.mockclosed) return !0;
821
+ } catch (o) {
822
+ }
823
+ try {
824
+ if (!e.parent || !e.top) return !0;
825
+ } catch (o) {
826
+ }
827
+ var t = function(o, i) {
828
+ for (var a = 0; a < o.length; a++) try {
829
+ if (o[a] === i) return a;
868
830
  } catch (l) {
869
831
  }
870
- return -1;
871
- }(kt, e);
872
- if (t !== -1) {
873
- var r = Ut[t];
874
- if (r && function(o) {
875
- if (!o.contentWindow || !o.parentNode)
876
- return !0;
877
- var i = o.ownerDocument;
878
- if (i && i.documentElement && !i.documentElement.contains(o)) {
879
- for (var a = o; a.parentNode && a.parentNode !== a; )
880
- a = a.parentNode;
881
- if (!a.host || !i.documentElement.contains(a.host))
882
- return !0;
883
- }
884
- return !1;
885
- }(r))
886
- return !0;
887
- }
888
- return !1;
889
- }
890
- function Be(e) {
891
- return e === void 0 && (e = window), oe(e = e || window) || k(e) || void 0;
892
- }
893
- function re(e, n) {
894
- if (typeof e == "string") {
895
- if (typeof n == "string")
896
- return e === "*" || n === e;
897
- if (y(n) || Array.isArray(n))
898
- return !1;
899
- }
900
- return y(e) ? y(n) ? e.toString() === n.toString() : !Array.isArray(n) && !!n.match(e) : !!Array.isArray(e) && (Array.isArray(n) ? JSON.stringify(e) === JSON.stringify(n) : !y(n) && e.some(function(t) {
901
- return re(t, n);
902
- }));
903
- }
904
- function we(e) {
905
- try {
906
- if (e === window)
907
- return !0;
908
- } catch (n) {
909
- if (n && n.message === E)
910
- return !0;
911
- }
912
- try {
913
- if ({}.toString.call(e) === "[object Window]")
914
- return !0;
915
- } catch (n) {
916
- if (n && n.message === E)
917
- return !0;
918
- }
919
- try {
920
- if (window.Window && e instanceof window.Window)
921
- return !0;
922
- } catch (n) {
923
- if (n && n.message === E)
924
- return !0;
925
- }
926
- try {
927
- if (e && e.self === e)
928
- return !0;
929
- } catch (n) {
930
- if (n && n.message === E)
931
- return !0;
932
- }
933
- try {
934
- if (e && e.parent === e)
935
- return !0;
936
- } catch (n) {
937
- if (n && n.message === E)
938
- return !0;
939
- }
940
- try {
941
- if (e && e.top === e)
942
- return !0;
943
- } catch (n) {
944
- if (n && n.message === E)
945
- return !0;
946
- }
947
- try {
948
- if (e && e.__cross_domain_utils_window_check__ === "__unlikely_value__")
949
- return !1;
950
- } catch (n) {
951
- return !0;
952
- }
953
- try {
954
- if ("postMessage" in e && "self" in e && "location" in e)
955
- return !0;
956
- } catch (n) {
832
+ return -1;
833
+ }(Ht, e);
834
+ if (t !== -1) {
835
+ var r = _t[t];
836
+ if (r && function(o) {
837
+ if (!o.contentWindow || !o.parentNode) return !0;
838
+ var i = o.ownerDocument;
839
+ if (i && i.documentElement && !i.documentElement.contains(o)) {
840
+ for (var a = o; a.parentNode && a.parentNode !== a; ) a = a.parentNode;
841
+ if (!a.host || !i.documentElement.contains(a.host)) return !0;
842
+ }
843
+ return !1;
844
+ }(r)) return !0;
845
+ }
846
+ return !1;
957
847
  }
958
- return !1;
959
- }
960
- function Ge(e) {
961
- if (Q(e))
962
- return ve(e).frameElement;
963
- for (var n = 0, t = document.querySelectorAll("iframe"); n < t.length; n++) {
964
- var r = t[n];
965
- if (r && r.contentWindow && r.contentWindow === e)
966
- return r;
848
+ function Ge(e) {
849
+ return e === void 0 && (e = window), oe(e = e || window) || k(e) || void 0;
967
850
  }
968
- }
969
- function Ft(e) {
970
- if (function(t) {
971
- return t === void 0 && (t = window), !!k(t);
972
- }(e)) {
973
- var n = Ge(e);
974
- if (n && n.parentElement) {
975
- n.parentElement.removeChild(n);
976
- return;
851
+ function re(e, n) {
852
+ if (typeof e == "string") {
853
+ if (typeof n == "string") return e === "*" || n === e;
854
+ if (y(n) || Array.isArray(n)) return !1;
977
855
  }
856
+ return y(e) ? y(n) ? e.toString() === n.toString() : !Array.isArray(n) && !!n.match(e) : !!Array.isArray(e) && (Array.isArray(n) ? JSON.stringify(e) === JSON.stringify(n) : !y(n) && e.some(function(t) {
857
+ return re(t, n);
858
+ }));
978
859
  }
979
- try {
980
- e.close();
981
- } catch (t) {
982
- }
983
- }
984
- function ee(e) {
985
- try {
986
- if (!e)
987
- return !1;
988
- if (typeof Promise != "undefined" && e instanceof Promise)
989
- return !0;
990
- if (typeof window != "undefined" && typeof window.Window == "function" && e instanceof window.Window || typeof window != "undefined" && typeof window.constructor == "function" && e instanceof window.constructor)
991
- return !1;
992
- var n = {}.toString;
993
- if (n) {
994
- var t = n.call(e);
995
- if (t === "[object Window]" || t === "[object global]" || t === "[object DOMWindow]")
996
- return !1;
860
+ function we(e) {
861
+ try {
862
+ if (e === window) return !0;
863
+ } catch (n) {
864
+ if (n && n.message === E) return !0;
865
+ }
866
+ try {
867
+ if ({}.toString.call(e) === "[object Window]") return !0;
868
+ } catch (n) {
869
+ if (n && n.message === E) return !0;
997
870
  }
998
- if (typeof e.then == "function")
871
+ try {
872
+ if (window.Window && e instanceof window.Window) return !0;
873
+ } catch (n) {
874
+ if (n && n.message === E) return !0;
875
+ }
876
+ try {
877
+ if (e && e.self === e) return !0;
878
+ } catch (n) {
879
+ if (n && n.message === E) return !0;
880
+ }
881
+ try {
882
+ if (e && e.parent === e) return !0;
883
+ } catch (n) {
884
+ if (n && n.message === E) return !0;
885
+ }
886
+ try {
887
+ if (e && e.top === e) return !0;
888
+ } catch (n) {
889
+ if (n && n.message === E) return !0;
890
+ }
891
+ try {
892
+ if (e && e.__cross_domain_utils_window_check__ === "__unlikely_value__") return !1;
893
+ } catch (n) {
999
894
  return !0;
1000
- } catch (r) {
895
+ }
896
+ try {
897
+ if ("postMessage" in e && "self" in e && "location" in e) return !0;
898
+ } catch (n) {
899
+ }
1001
900
  return !1;
1002
901
  }
1003
- return !1;
1004
- }
1005
- var $e = [], ie = [], We = 0, ae;
1006
- function Ve() {
1007
- if (!We && ae) {
1008
- var e = ae;
1009
- ae = null, e.resolve();
902
+ function Ve(e) {
903
+ if (X(e)) return ve(e).frameElement;
904
+ for (var n = 0, t = document.querySelectorAll("iframe"); n < t.length; n++) {
905
+ var r = t[n];
906
+ if (r && r.contentWindow && r.contentWindow === e) return r;
907
+ }
1010
908
  }
1011
- }
1012
- function Pe() {
1013
- We += 1;
1014
- }
1015
- function se() {
1016
- We -= 1, Ve();
1017
- }
1018
- var P = function() {
1019
- function e(t) {
1020
- var r = this;
1021
- if (this.resolved = void 0, this.rejected = void 0, this.errorHandled = void 0, this.value = void 0, this.error = void 0, this.handlers = void 0, this.dispatching = void 0, this.stack = void 0, this.resolved = !1, this.rejected = !1, this.errorHandled = !1, this.handlers = [], t) {
1022
- var o, i, a = !1, l = !1, u = !1;
1023
- Pe();
1024
- try {
1025
- t(function(s) {
1026
- u ? r.resolve(s) : (a = !0, o = s);
1027
- }, function(s) {
1028
- u ? r.reject(s) : (l = !0, i = s);
1029
- });
1030
- } catch (s) {
1031
- se(), this.reject(s);
909
+ function qt(e) {
910
+ if (function(t) {
911
+ return t === void 0 && (t = window), !!k(t);
912
+ }(e)) {
913
+ var n = Ve(e);
914
+ if (n && n.parentElement) {
915
+ n.parentElement.removeChild(n);
1032
916
  return;
1033
917
  }
1034
- se(), u = !0, a ? this.resolve(o) : l && this.reject(i);
1035
918
  }
919
+ try {
920
+ e.close();
921
+ } catch (t) {
922
+ }
923
+ }
924
+ function Q(e) {
925
+ try {
926
+ if (!e) return !1;
927
+ if (typeof Promise != "undefined" && e instanceof Promise) return !0;
928
+ if (typeof window != "undefined" && typeof window.Window == "function" && e instanceof window.Window || typeof window != "undefined" && typeof window.constructor == "function" && e instanceof window.constructor) return !1;
929
+ var n = {}.toString;
930
+ if (n) {
931
+ var t = n.call(e);
932
+ if (t === "[object Window]" || t === "[object global]" || t === "[object DOMWindow]") return !1;
933
+ }
934
+ if (typeof e.then == "function") return !0;
935
+ } catch (r) {
936
+ return !1;
937
+ }
938
+ return !1;
1036
939
  }
1037
- var n = e.prototype;
1038
- return n.resolve = function(t) {
1039
- if (this.resolved || this.rejected)
1040
- return this;
1041
- if (ee(t))
1042
- throw new Error("Can not resolve promise with another promise");
1043
- return this.resolved = !0, this.value = t, this.dispatch(), this;
1044
- }, n.reject = function(t) {
1045
- var r = this;
1046
- if (this.resolved || this.rejected)
1047
- return this;
1048
- if (ee(t))
1049
- throw new Error("Can not reject promise with another promise");
1050
- if (!t) {
1051
- var o = t && typeof t.toString == "function" ? t.toString() : {}.toString.call(t);
1052
- t = new Error("Expected reject to be called with Error, got " + o);
940
+ var Je = [], ie = [], Pe = 0, ae;
941
+ function Ye() {
942
+ if (!Pe && ae) {
943
+ var e = ae;
944
+ ae = null, e.resolve();
1053
945
  }
1054
- return this.rejected = !0, this.error = t, this.errorHandled || setTimeout(function() {
1055
- r.errorHandled || function(i, a) {
1056
- if ($e.indexOf(i) === -1) {
1057
- $e.push(i), setTimeout(function() {
1058
- throw i;
1059
- }, 1);
1060
- for (var l = 0; l < ie.length; l++)
1061
- ie[l](i, a);
946
+ }
947
+ function Ce() {
948
+ Pe += 1;
949
+ }
950
+ function se() {
951
+ Pe -= 1, Ye();
952
+ }
953
+ var P = function() {
954
+ function e(t) {
955
+ var r = this;
956
+ if (this.resolved = void 0, this.rejected = void 0, this.errorHandled = void 0, this.value = void 0, this.error = void 0, this.handlers = void 0, this.dispatching = void 0, this.stack = void 0, this.resolved = !1, this.rejected = !1, this.errorHandled = !1, this.handlers = [], t) {
957
+ var o, i, a = !1, l = !1, u = !1;
958
+ Ce();
959
+ try {
960
+ t(function(s) {
961
+ u ? r.resolve(s) : (a = !0, o = s);
962
+ }, function(s) {
963
+ u ? r.reject(s) : (l = !0, i = s);
964
+ });
965
+ } catch (s) {
966
+ se(), this.reject(s);
967
+ return;
1062
968
  }
1063
- }(t, r);
1064
- }, 1), this.dispatch(), this;
1065
- }, n.asyncReject = function(t) {
1066
- return this.errorHandled = !0, this.reject(t), this;
1067
- }, n.dispatch = function() {
1068
- var t = this.resolved, r = this.rejected, o = this.handlers;
1069
- if (!this.dispatching && (t || r)) {
1070
- this.dispatching = !0, Pe();
1071
- for (var i = function(g, b) {
1072
- return g.then(function(x) {
1073
- b.resolve(x);
1074
- }, function(x) {
1075
- b.reject(x);
1076
- });
1077
- }, a = 0; a < o.length; a++) {
1078
- var l = o[a], u = l.onSuccess, s = l.onError, w = l.promise, m = void 0;
1079
- if (t)
1080
- try {
969
+ se(), u = !0, a ? this.resolve(o) : l && this.reject(i);
970
+ }
971
+ }
972
+ var n = e.prototype;
973
+ return n.resolve = function(t) {
974
+ if (this.resolved || this.rejected) return this;
975
+ if (Q(t)) throw new Error("Can not resolve promise with another promise");
976
+ return this.resolved = !0, this.value = t, this.dispatch(), this;
977
+ }, n.reject = function(t) {
978
+ var r = this;
979
+ if (this.resolved || this.rejected) return this;
980
+ if (Q(t)) throw new Error("Can not reject promise with another promise");
981
+ if (!t) {
982
+ var o = t && typeof t.toString == "function" ? t.toString() : {}.toString.call(t);
983
+ t = new Error("Expected reject to be called with Error, got " + o);
984
+ }
985
+ return this.rejected = !0, this.error = t, this.errorHandled || setTimeout(function() {
986
+ r.errorHandled || function(i, a) {
987
+ if (Je.indexOf(i) === -1) {
988
+ Je.push(i), setTimeout(function() {
989
+ throw i;
990
+ }, 1);
991
+ for (var l = 0; l < ie.length; l++) ie[l](i, a);
992
+ }
993
+ }(t, r);
994
+ }, 1), this.dispatch(), this;
995
+ }, n.asyncReject = function(t) {
996
+ return this.errorHandled = !0, this.reject(t), this;
997
+ }, n.dispatch = function() {
998
+ var t = this.resolved, r = this.rejected, o = this.handlers;
999
+ if (!this.dispatching && (t || r)) {
1000
+ this.dispatching = !0, Ce();
1001
+ for (var i = function(g, b) {
1002
+ return g.then(function(x) {
1003
+ b.resolve(x);
1004
+ }, function(x) {
1005
+ b.reject(x);
1006
+ });
1007
+ }, a = 0; a < o.length; a++) {
1008
+ var l = o[a], u = l.onSuccess, s = l.onError, w = l.promise, m = void 0;
1009
+ if (t) try {
1081
1010
  m = u ? u(this.value) : this.value;
1082
1011
  } catch (g) {
1083
1012
  w.reject(g);
1084
1013
  continue;
1085
1014
  }
1086
- else if (r) {
1087
- if (!s) {
1088
- w.reject(this.error);
1089
- continue;
1090
- }
1091
- try {
1092
- m = s(this.error);
1093
- } catch (g) {
1094
- w.reject(g);
1095
- continue;
1015
+ else if (r) {
1016
+ if (!s) {
1017
+ w.reject(this.error);
1018
+ continue;
1019
+ }
1020
+ try {
1021
+ m = s(this.error);
1022
+ } catch (g) {
1023
+ w.reject(g);
1024
+ continue;
1025
+ }
1096
1026
  }
1027
+ if (m instanceof e && (m.resolved || m.rejected)) {
1028
+ var p = m;
1029
+ p.resolved ? w.resolve(p.value) : w.reject(p.error), p.errorHandled = !0;
1030
+ } else Q(m) ? m instanceof e && (m.resolved || m.rejected) ? m.resolved ? w.resolve(m.value) : w.reject(m.error) : i(m, w) : w.resolve(m);
1097
1031
  }
1098
- if (m instanceof e && (m.resolved || m.rejected)) {
1099
- var p = m;
1100
- p.resolved ? w.resolve(p.value) : w.reject(p.error), p.errorHandled = !0;
1101
- } else
1102
- ee(m) ? m instanceof e && (m.resolved || m.rejected) ? m.resolved ? w.resolve(m.value) : w.reject(m.error) : i(m, w) : w.resolve(m);
1032
+ o.length = 0, this.dispatching = !1, se();
1103
1033
  }
1104
- o.length = 0, this.dispatching = !1, se();
1105
- }
1106
- }, n.then = function(t, r) {
1107
- if (t && typeof t != "function" && !t.call)
1108
- throw new Error("Promise.then expected a function for success handler");
1109
- if (r && typeof r != "function" && !r.call)
1110
- throw new Error("Promise.then expected a function for error handler");
1111
- var o = new e();
1112
- return this.handlers.push({
1113
- promise: o,
1114
- onSuccess: t,
1115
- onError: r
1116
- }), this.errorHandled = !0, this.dispatch(), o;
1117
- }, n.catch = function(t) {
1118
- return this.then(void 0, t);
1119
- }, n.finally = function(t) {
1120
- if (t && typeof t != "function" && !t.call)
1121
- throw new Error("Promise.finally expected a function");
1122
- return this.then(function(r) {
1123
- return e.try(t).then(function() {
1124
- return r;
1125
- });
1126
- }, function(r) {
1127
- return e.try(t).then(function() {
1128
- throw r;
1034
+ }, n.then = function(t, r) {
1035
+ if (t && typeof t != "function" && !t.call) throw new Error("Promise.then expected a function for success handler");
1036
+ if (r && typeof r != "function" && !r.call) throw new Error("Promise.then expected a function for error handler");
1037
+ var o = new e();
1038
+ return this.handlers.push({
1039
+ promise: o,
1040
+ onSuccess: t,
1041
+ onError: r
1042
+ }), this.errorHandled = !0, this.dispatch(), o;
1043
+ }, n.catch = function(t) {
1044
+ return this.then(void 0, t);
1045
+ }, n.finally = function(t) {
1046
+ if (t && typeof t != "function" && !t.call) throw new Error("Promise.finally expected a function");
1047
+ return this.then(function(r) {
1048
+ return e.try(t).then(function() {
1049
+ return r;
1050
+ });
1051
+ }, function(r) {
1052
+ return e.try(t).then(function() {
1053
+ throw r;
1054
+ });
1129
1055
  });
1130
- });
1131
- }, n.timeout = function(t, r) {
1132
- var o = this;
1133
- if (this.resolved || this.rejected)
1134
- return this;
1135
- var i = setTimeout(function() {
1136
- o.resolved || o.rejected || o.reject(r || new Error("Promise timed out after " + t + "ms"));
1137
- }, t);
1138
- return this.then(function(a) {
1139
- return clearTimeout(i), a;
1140
- });
1141
- }, n.toPromise = function() {
1142
- if (typeof Promise == "undefined")
1143
- throw new TypeError("Could not find Promise");
1144
- return Promise.resolve(this);
1145
- }, n.lazy = function() {
1146
- return this.errorHandled = !0, this;
1147
- }, e.resolve = function(t) {
1148
- return t instanceof e ? t : ee(t) ? new e(function(r, o) {
1149
- return t.then(r, o);
1150
- }) : new e().resolve(t);
1151
- }, e.reject = function(t) {
1152
- return new e().reject(t);
1153
- }, e.asyncReject = function(t) {
1154
- return new e().asyncReject(t);
1155
- }, e.all = function(t) {
1156
- var r = new e(), o = t.length, i = [].slice();
1157
- if (!o)
1158
- return r.resolve(i), r;
1159
- for (var a = function(s, w, m) {
1160
- return w.then(function(p) {
1161
- i[s] = p, (o -= 1) == 0 && r.resolve(i);
1162
- }, function(p) {
1163
- m.reject(p);
1056
+ }, n.timeout = function(t, r) {
1057
+ var o = this;
1058
+ if (this.resolved || this.rejected) return this;
1059
+ var i = setTimeout(function() {
1060
+ o.resolved || o.rejected || o.reject(r || new Error("Promise timed out after " + t + "ms"));
1061
+ }, t);
1062
+ return this.then(function(a) {
1063
+ return clearTimeout(i), a;
1164
1064
  });
1165
- }, l = 0; l < t.length; l++) {
1166
- var u = t[l];
1167
- if (u instanceof e) {
1168
- if (u.resolved) {
1169
- i[l] = u.value, o -= 1;
1065
+ }, n.toPromise = function() {
1066
+ if (typeof Promise == "undefined") throw new TypeError("Could not find Promise");
1067
+ return Promise.resolve(this);
1068
+ }, n.lazy = function() {
1069
+ return this.errorHandled = !0, this;
1070
+ }, e.resolve = function(t) {
1071
+ return t instanceof e ? t : Q(t) ? new e(function(r, o) {
1072
+ return t.then(r, o);
1073
+ }) : new e().resolve(t);
1074
+ }, e.reject = function(t) {
1075
+ return new e().reject(t);
1076
+ }, e.asyncReject = function(t) {
1077
+ return new e().asyncReject(t);
1078
+ }, e.all = function(t) {
1079
+ var r = new e(), o = t.length, i = [].slice();
1080
+ if (!o)
1081
+ return r.resolve(i), r;
1082
+ for (var a = function(s, w, m) {
1083
+ return w.then(function(p) {
1084
+ i[s] = p, (o -= 1) == 0 && r.resolve(i);
1085
+ }, function(p) {
1086
+ m.reject(p);
1087
+ });
1088
+ }, l = 0; l < t.length; l++) {
1089
+ var u = t[l];
1090
+ if (u instanceof e) {
1091
+ if (u.resolved) {
1092
+ i[l] = u.value, o -= 1;
1093
+ continue;
1094
+ }
1095
+ } else if (!Q(u)) {
1096
+ i[l] = u, o -= 1;
1170
1097
  continue;
1171
1098
  }
1172
- } else if (!ee(u)) {
1173
- i[l] = u, o -= 1;
1174
- continue;
1099
+ a(l, e.resolve(u), r);
1175
1100
  }
1176
- a(l, e.resolve(u), r);
1177
- }
1178
- return o === 0 && r.resolve(i), r;
1179
- }, e.hash = function(t) {
1180
- var r = {}, o = [], i = function(l) {
1181
- if (t.hasOwnProperty(l)) {
1182
- var u = t[l];
1183
- ee(u) ? o.push(u.then(function(s) {
1184
- r[l] = s;
1185
- })) : r[l] = u;
1186
- }
1187
- };
1188
- for (var a in t)
1189
- i(a);
1190
- return e.all(o).then(function() {
1191
- return r;
1192
- });
1193
- }, e.map = function(t, r) {
1194
- return e.all(t.map(r));
1195
- }, e.onPossiblyUnhandledException = function(t) {
1196
- return function(r) {
1197
- return ie.push(r), {
1198
- cancel: function() {
1199
- ie.splice(ie.indexOf(r), 1);
1101
+ return o === 0 && r.resolve(i), r;
1102
+ }, e.hash = function(t) {
1103
+ var r = {}, o = [], i = function(l) {
1104
+ if (t.hasOwnProperty(l)) {
1105
+ var u = t[l];
1106
+ Q(u) ? o.push(u.then(function(s) {
1107
+ r[l] = s;
1108
+ })) : r[l] = u;
1200
1109
  }
1201
1110
  };
1202
- }(t);
1203
- }, e.try = function(t, r, o) {
1204
- if (t && typeof t != "function" && !t.call)
1205
- throw new Error("Promise.try expected a function");
1206
- var i;
1207
- Pe();
1208
- try {
1209
- i = t.apply(r, o || []);
1210
- } catch (a) {
1211
- return se(), e.reject(a);
1212
- }
1213
- return se(), e.resolve(i);
1214
- }, e.delay = function(t) {
1215
- return new e(function(r) {
1216
- setTimeout(r, t);
1217
- });
1218
- }, e.isPromise = function(t) {
1219
- return !!(t && t instanceof e) || ee(t);
1220
- }, e.flush = function() {
1221
- return function(t) {
1222
- var r = ae = ae || new t();
1223
- return Ve(), r;
1224
- }(e);
1225
- }, e;
1226
- }();
1227
- function ge(e, n) {
1228
- for (var t = 0; t < e.length; t++)
1229
- try {
1230
- if (e[t] === n)
1231
- return t;
1232
- } catch (r) {
1233
- }
1234
- return -1;
1235
- }
1236
- var Ce = function() {
1237
- function e() {
1238
- if (this.name = void 0, this.weakmap = void 0, this.keys = void 0, this.values = void 0, this.name = "__weakmap_" + (1e9 * Math.random() >>> 0) + "__", function() {
1239
- if (typeof WeakMap == "undefined" || Object.freeze === void 0)
1240
- return !1;
1241
- try {
1242
- var t = /* @__PURE__ */ new WeakMap(), r = {};
1243
- return Object.freeze(r), t.set(r, "__testvalue__"), t.get(r) === "__testvalue__";
1244
- } catch (o) {
1245
- return !1;
1246
- }
1247
- }())
1111
+ for (var a in t) i(a);
1112
+ return e.all(o).then(function() {
1113
+ return r;
1114
+ });
1115
+ }, e.map = function(t, r) {
1116
+ return e.all(t.map(r));
1117
+ }, e.onPossiblyUnhandledException = function(t) {
1118
+ return function(r) {
1119
+ return ie.push(r), {
1120
+ cancel: function() {
1121
+ ie.splice(ie.indexOf(r), 1);
1122
+ }
1123
+ };
1124
+ }(t);
1125
+ }, e.try = function(t, r, o) {
1126
+ if (t && typeof t != "function" && !t.call) throw new Error("Promise.try expected a function");
1127
+ var i;
1128
+ Ce();
1248
1129
  try {
1249
- this.weakmap = /* @__PURE__ */ new WeakMap();
1250
- } catch (t) {
1130
+ i = t.apply(r, o || []);
1131
+ } catch (a) {
1132
+ return se(), e.reject(a);
1251
1133
  }
1252
- this.keys = [], this.values = [];
1253
- }
1254
- var n = e.prototype;
1255
- return n._cleanupClosedWindows = function() {
1256
- for (var t = this.weakmap, r = this.keys, o = 0; o < r.length; o++) {
1257
- var i = r[o];
1258
- if (we(i) && $(i)) {
1259
- if (t)
1260
- try {
1134
+ return se(), e.resolve(i);
1135
+ }, e.delay = function(t) {
1136
+ return new e(function(r) {
1137
+ setTimeout(r, t);
1138
+ });
1139
+ }, e.isPromise = function(t) {
1140
+ return !!(t && t instanceof e) || Q(t);
1141
+ }, e.flush = function() {
1142
+ return function(t) {
1143
+ var r = ae = ae || new t();
1144
+ return Ye(), r;
1145
+ }(e);
1146
+ }, e;
1147
+ }();
1148
+ function ge(e, n) {
1149
+ for (var t = 0; t < e.length; t++) try {
1150
+ if (e[t] === n) return t;
1151
+ } catch (r) {
1152
+ }
1153
+ return -1;
1154
+ }
1155
+ var Te = function() {
1156
+ function e() {
1157
+ if (this.name = void 0, this.weakmap = void 0, this.keys = void 0, this.values = void 0, this.name = "__weakmap_" + (1e9 * Math.random() >>> 0) + "__", function() {
1158
+ if (typeof WeakMap == "undefined" || Object.freeze === void 0) return !1;
1159
+ try {
1160
+ var t = /* @__PURE__ */ new WeakMap(), r = {};
1161
+ return Object.freeze(r), t.set(r, "__testvalue__"), t.get(r) === "__testvalue__";
1162
+ } catch (o) {
1163
+ return !1;
1164
+ }
1165
+ }()) try {
1166
+ this.weakmap = /* @__PURE__ */ new WeakMap();
1167
+ } catch (t) {
1168
+ }
1169
+ this.keys = [], this.values = [];
1170
+ }
1171
+ var n = e.prototype;
1172
+ return n._cleanupClosedWindows = function() {
1173
+ for (var t = this.weakmap, r = this.keys, o = 0; o < r.length; o++) {
1174
+ var i = r[o];
1175
+ if (we(i) && G(i)) {
1176
+ if (t) try {
1261
1177
  t.delete(i);
1262
1178
  } catch (a) {
1263
1179
  }
1264
- r.splice(o, 1), this.values.splice(o, 1), o -= 1;
1180
+ r.splice(o, 1), this.values.splice(o, 1), o -= 1;
1181
+ }
1265
1182
  }
1266
- }
1267
- }, n.isSafeToReadWrite = function(t) {
1268
- return !we(t);
1269
- }, n.set = function(t, r) {
1270
- if (!t)
1271
- throw new Error("WeakMap expected key");
1272
- var o = this.weakmap;
1273
- if (o)
1274
- try {
1183
+ }, n.isSafeToReadWrite = function(t) {
1184
+ return !we(t);
1185
+ }, n.set = function(t, r) {
1186
+ if (!t) throw new Error("WeakMap expected key");
1187
+ var o = this.weakmap;
1188
+ if (o) try {
1275
1189
  o.set(t, r);
1276
1190
  } catch (w) {
1277
1191
  delete this.weakmap;
1278
1192
  }
1279
- if (this.isSafeToReadWrite(t))
1280
- try {
1193
+ if (this.isSafeToReadWrite(t)) try {
1281
1194
  var i = this.name, a = t[i];
1282
1195
  a && a[0] === t ? a[1] = r : Object.defineProperty(t, i, {
1283
1196
  value: [t, r],
@@ -1286,532 +1199,488 @@ var jt = { exports: {} }, zt = { exports: {} };
1286
1199
  return;
1287
1200
  } catch (w) {
1288
1201
  }
1289
- this._cleanupClosedWindows();
1290
- var l = this.keys, u = this.values, s = ge(l, t);
1291
- s === -1 ? (l.push(t), u.push(r)) : u[s] = r;
1292
- }, n.get = function(t) {
1293
- if (!t)
1294
- throw new Error("WeakMap expected key");
1295
- var r = this.weakmap;
1296
- if (r)
1297
- try {
1298
- if (r.has(t))
1299
- return r.get(t);
1202
+ this._cleanupClosedWindows();
1203
+ var l = this.keys, u = this.values, s = ge(l, t);
1204
+ s === -1 ? (l.push(t), u.push(r)) : u[s] = r;
1205
+ }, n.get = function(t) {
1206
+ if (!t) throw new Error("WeakMap expected key");
1207
+ var r = this.weakmap;
1208
+ if (r) try {
1209
+ if (r.has(t)) return r.get(t);
1300
1210
  } catch (a) {
1301
1211
  delete this.weakmap;
1302
1212
  }
1303
- if (this.isSafeToReadWrite(t))
1304
- try {
1213
+ if (this.isSafeToReadWrite(t)) try {
1305
1214
  var o = t[this.name];
1306
1215
  return o && o[0] === t ? o[1] : void 0;
1307
1216
  } catch (a) {
1308
1217
  }
1309
- this._cleanupClosedWindows();
1310
- var i = ge(this.keys, t);
1311
- if (i !== -1)
1312
- return this.values[i];
1313
- }, n.delete = function(t) {
1314
- if (!t)
1315
- throw new Error("WeakMap expected key");
1316
- var r = this.weakmap;
1317
- if (r)
1318
- try {
1218
+ this._cleanupClosedWindows();
1219
+ var i = ge(this.keys, t);
1220
+ if (i !== -1) return this.values[i];
1221
+ }, n.delete = function(t) {
1222
+ if (!t) throw new Error("WeakMap expected key");
1223
+ var r = this.weakmap;
1224
+ if (r) try {
1319
1225
  r.delete(t);
1320
1226
  } catch (l) {
1321
1227
  delete this.weakmap;
1322
1228
  }
1323
- if (this.isSafeToReadWrite(t))
1324
- try {
1229
+ if (this.isSafeToReadWrite(t)) try {
1325
1230
  var o = t[this.name];
1326
1231
  o && o[0] === t && (o[0] = o[1] = void 0);
1327
1232
  } catch (l) {
1328
1233
  }
1329
- this._cleanupClosedWindows();
1330
- var i = this.keys, a = ge(i, t);
1331
- a !== -1 && (i.splice(a, 1), this.values.splice(a, 1));
1332
- }, n.has = function(t) {
1333
- if (!t)
1334
- throw new Error("WeakMap expected key");
1335
- var r = this.weakmap;
1336
- if (r)
1337
- try {
1338
- if (r.has(t))
1339
- return !0;
1234
+ this._cleanupClosedWindows();
1235
+ var i = this.keys, a = ge(i, t);
1236
+ a !== -1 && (i.splice(a, 1), this.values.splice(a, 1));
1237
+ }, n.has = function(t) {
1238
+ if (!t) throw new Error("WeakMap expected key");
1239
+ var r = this.weakmap;
1240
+ if (r) try {
1241
+ if (r.has(t)) return !0;
1340
1242
  } catch (i) {
1341
1243
  delete this.weakmap;
1342
1244
  }
1343
- if (this.isSafeToReadWrite(t))
1344
- try {
1245
+ if (this.isSafeToReadWrite(t)) try {
1345
1246
  var o = t[this.name];
1346
1247
  return !(!o || o[0] !== t);
1347
1248
  } catch (i) {
1348
1249
  }
1349
- return this._cleanupClosedWindows(), ge(this.keys, t) !== -1;
1350
- }, n.getOrSet = function(t, r) {
1351
- if (this.has(t))
1352
- return this.get(t);
1353
- var o = r();
1354
- return this.set(t, o), o;
1355
- }, e;
1356
- }();
1357
- function Je(e) {
1358
- return e.name || e.__name__ || e.displayName || "anonymous";
1359
- }
1360
- function Ye(e, n) {
1361
- try {
1362
- delete e.name, e.name = n;
1363
- } catch (t) {
1250
+ return this._cleanupClosedWindows(), ge(this.keys, t) !== -1;
1251
+ }, n.getOrSet = function(t, r) {
1252
+ if (this.has(t)) return this.get(t);
1253
+ var o = r();
1254
+ return this.set(t, o), o;
1255
+ }, e;
1256
+ }();
1257
+ function Ze(e) {
1258
+ return e.name || e.__name__ || e.displayName || "anonymous";
1364
1259
  }
1365
- return e.__name__ = e.displayName = n, e;
1366
- }
1367
- function J() {
1368
- var e = "0123456789abcdef";
1369
- return "uid_" + "xxxxxxxxxx".replace(/./g, function() {
1370
- return e.charAt(Math.floor(Math.random() * e.length));
1371
- }) + "_" + function(n) {
1372
- if (typeof btoa == "function")
1373
- return btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g, function(t, r) {
1260
+ function Ke(e, n) {
1261
+ try {
1262
+ delete e.name, e.name = n;
1263
+ } catch (t) {
1264
+ }
1265
+ return e.__name__ = e.displayName = n, e;
1266
+ }
1267
+ function J() {
1268
+ var e = "0123456789abcdef";
1269
+ return "uid_" + "xxxxxxxxxx".replace(/./g, function() {
1270
+ return e.charAt(Math.floor(Math.random() * e.length));
1271
+ }) + "_" + function(n) {
1272
+ if (typeof btoa == "function") return btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g, function(t, r) {
1374
1273
  return String.fromCharCode(parseInt(r, 16));
1375
1274
  })).replace(/[=]/g, "");
1376
- if (typeof Buffer != "undefined")
1377
- return Buffer.from(n, "utf8").toString("base64").replace(/[=]/g, "");
1378
- throw new Error("Can not find window.btoa or Buffer");
1379
- }((/* @__PURE__ */ new Date()).toISOString().slice(11, 19).replace("T", ".")).replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
1380
- }
1381
- var ye;
1382
- function Ze(e) {
1383
- try {
1384
- return JSON.stringify([].slice.call(e), function(n, t) {
1385
- return typeof t == "function" ? "memoize[" + function(r) {
1386
- if (ye = ye || new Ce(), r == null || typeof r != "object" && typeof r != "function")
1387
- throw new Error("Invalid object");
1388
- var o = ye.get(r);
1389
- return o || (o = typeof r + ":" + J(), ye.set(r, o)), o;
1390
- }(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;
1391
- });
1392
- } catch (n) {
1393
- throw new Error("Arguments not serializable -- can not be used to memoize");
1275
+ if (typeof Buffer != "undefined") return Buffer.from(n, "utf8").toString("base64").replace(/[=]/g, "");
1276
+ throw new Error("Can not find window.btoa or Buffer");
1277
+ }((/* @__PURE__ */ new Date()).toISOString().slice(11, 19).replace("T", ".")).replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
1394
1278
  }
1395
- }
1396
- function Ht() {
1397
- return {};
1398
- }
1399
- var ue = 0, Ke = 0;
1400
- function ce(e, n) {
1401
- n === void 0 && (n = {});
1402
- var t = n.thisNamespace, r = t !== void 0 && t, o = n.time, i, a, l = ue;
1403
- ue += 1;
1404
- var u = function() {
1405
- for (var s = arguments.length, w = new Array(s), m = 0; m < s; m++)
1406
- w[m] = arguments[m];
1407
- l < Ke && (i = null, a = null, l = ue, ue += 1);
1408
- var p;
1409
- p = r ? (a = a || new Ce()).getOrSet(this, Ht) : i = i || {};
1410
- var g;
1279
+ var ye;
1280
+ function Xe(e) {
1411
1281
  try {
1412
- g = Ze(w);
1413
- } catch (C) {
1414
- return e.apply(this, arguments);
1282
+ return JSON.stringify([].slice.call(e), function(n, t) {
1283
+ return typeof t == "function" ? "memoize[" + function(r) {
1284
+ if (ye = ye || new Te(), r == null || typeof r != "object" && typeof r != "function") throw new Error("Invalid object");
1285
+ var o = ye.get(r);
1286
+ return o || (o = typeof r + ":" + J(), ye.set(r, o)), o;
1287
+ }(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;
1288
+ });
1289
+ } catch (n) {
1290
+ throw new Error("Arguments not serializable -- can not be used to memoize");
1415
1291
  }
1416
- var b = p[g];
1417
- if (b && o && Date.now() - b.time < o && (delete p[g], b = null), b)
1418
- return b.value;
1419
- var x = Date.now(), S = e.apply(this, arguments);
1420
- return p[g] = {
1421
- time: x,
1422
- value: S
1423
- }, S;
1292
+ }
1293
+ function $t() {
1294
+ return {};
1295
+ }
1296
+ var ue = 0, Qe = 0;
1297
+ function ce(e, n) {
1298
+ n === void 0 && (n = {});
1299
+ var t = n.thisNamespace, r = t !== void 0 && t, o = n.time, i, a, l = ue;
1300
+ ue += 1;
1301
+ var u = function() {
1302
+ for (var s = arguments.length, w = new Array(s), m = 0; m < s; m++) w[m] = arguments[m];
1303
+ l < Qe && (i = null, a = null, l = ue, ue += 1);
1304
+ var p;
1305
+ p = r ? (a = a || new Te()).getOrSet(this, $t) : i = i || {};
1306
+ var g;
1307
+ try {
1308
+ g = Xe(w);
1309
+ } catch (C) {
1310
+ return e.apply(this, arguments);
1311
+ }
1312
+ var b = p[g];
1313
+ if (b && o && Date.now() - b.time < o && (delete p[g], b = null), b) return b.value;
1314
+ var x = Date.now(), S = e.apply(this, arguments);
1315
+ return p[g] = {
1316
+ time: x,
1317
+ value: S
1318
+ }, S;
1319
+ };
1320
+ return u.reset = function() {
1321
+ i = null, a = null;
1322
+ }, Ke(u, (n.name || Ze(e)) + "::memoized");
1323
+ }
1324
+ ce.clear = function() {
1325
+ Qe = ue;
1424
1326
  };
1425
- return u.reset = function() {
1426
- i = null, a = null;
1427
- }, Ye(u, (n.name || Je(e)) + "::memoized");
1428
- }
1429
- ce.clear = function() {
1430
- Ke = ue;
1431
- };
1432
- function _t(e) {
1433
- var n = {};
1434
- function t() {
1435
- for (var r = arguments, o = this, i = arguments.length, a = new Array(i), l = 0; l < i; l++)
1436
- a[l] = arguments[l];
1437
- var u = Ze(a);
1438
- return n.hasOwnProperty(u) || (n[u] = P.try(function() {
1439
- return e.apply(o, r);
1440
- }).finally(function() {
1441
- delete n[u];
1442
- })), n[u];
1443
- }
1444
- return t.reset = function() {
1445
- n = {};
1446
- }, Ye(t, Je(e) + "::promiseMemoized");
1447
- }
1448
- function te() {
1449
- }
1450
- function de(e, n) {
1451
- if (n === void 0 && (n = 1), n >= 3)
1452
- return "stringifyError stack overflow";
1453
- try {
1454
- if (!e)
1455
- return "<unknown error: " + {}.toString.call(e) + ">";
1456
- if (typeof e == "string")
1457
- return e;
1458
- if (e instanceof Error) {
1459
- var t = e && e.stack, r = e && e.message;
1460
- if (t && r)
1461
- return t.indexOf(r) !== -1 ? t : r + `
1462
- ` + t;
1463
- if (t)
1464
- return t;
1465
- if (r)
1466
- return r;
1327
+ function Bt(e) {
1328
+ var n = {};
1329
+ function t() {
1330
+ for (var r = arguments, o = this, i = arguments.length, a = new Array(i), l = 0; l < i; l++) a[l] = arguments[l];
1331
+ var u = Xe(a);
1332
+ return n.hasOwnProperty(u) || (n[u] = P.try(function() {
1333
+ return e.apply(o, r);
1334
+ }).finally(function() {
1335
+ delete n[u];
1336
+ })), n[u];
1467
1337
  }
1468
- return e && e.toString && typeof e.toString == "function" ? e.toString() : {}.toString.call(e);
1469
- } catch (o) {
1470
- return "Error while stringifying error: " + de(o, n + 1);
1338
+ return t.reset = function() {
1339
+ n = {};
1340
+ }, Ke(t, Ze(e) + "::promiseMemoized");
1471
1341
  }
1472
- }
1473
- function Xe(e) {
1474
- return typeof e == "string" ? e : e && e.toString && typeof e.toString == "function" ? e.toString() : {}.toString.call(e);
1475
- }
1476
- ce(function(e) {
1477
- if (Object.values)
1478
- return Object.values(e);
1479
- var n = [];
1480
- for (var t in e)
1481
- e.hasOwnProperty(t) && n.push(e[t]);
1482
- return n;
1483
- });
1484
- function Te(e) {
1485
- return {}.toString.call(e) === "[object RegExp]";
1486
- }
1487
- function fe(e, n, t) {
1488
- if (e.hasOwnProperty(n))
1489
- return e[n];
1490
- var r = t();
1491
- return e[n] = r, r;
1492
- }
1493
- function Qe() {
1494
- var e = document.body;
1495
- if (!e)
1496
- throw new Error("Body element not found");
1497
- return e;
1498
- }
1499
- function et() {
1500
- return !!document.body && document.readyState === "complete";
1501
- }
1502
- function tt() {
1503
- return !!document.body && document.readyState === "interactive";
1504
- }
1505
- ce(function() {
1506
- return new P(function(e) {
1507
- if (et() || tt())
1508
- return e();
1509
- var n = setInterval(function() {
1510
- if (et() || tt())
1511
- return clearInterval(n), e();
1512
- }, 10);
1513
- });
1514
- });
1515
- var Ee = typeof document != "undefined" ? document.currentScript : null, qt = ce(function() {
1516
- if (Ee || (Ee = function() {
1342
+ function ee() {
1343
+ }
1344
+ function de(e, n) {
1345
+ if (n === void 0 && (n = 1), n >= 3) return "stringifyError stack overflow";
1517
1346
  try {
1518
- var e = function() {
1519
- try {
1520
- throw new Error("_");
1521
- } catch (a) {
1522
- return a.stack || "";
1523
- }
1524
- }(), n = /.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e), t = n && n[1];
1525
- if (!t)
1526
- return;
1527
- for (var r = 0, o = [].slice.call(document.getElementsByTagName("script")).reverse(); r < o.length; r++) {
1528
- var i = o[r];
1529
- if (i.src && i.src === t)
1530
- return i;
1347
+ if (!e) return "<unknown error: " + {}.toString.call(e) + ">";
1348
+ if (typeof e == "string") return e;
1349
+ if (e instanceof Error) {
1350
+ var t = e && e.stack, r = e && e.message;
1351
+ if (t && r) return t.indexOf(r) !== -1 ? t : r + `
1352
+ ` + t;
1353
+ if (t) return t;
1354
+ if (r) return r;
1531
1355
  }
1532
- } catch (a) {
1356
+ return e && e.toString && typeof e.toString == "function" ? e.toString() : {}.toString.call(e);
1357
+ } catch (o) {
1358
+ return "Error while stringifying error: " + de(o, n + 1);
1533
1359
  }
1534
- }()))
1535
- return Ee;
1536
- throw new Error("Can not determine current script");
1537
- }), Bt = J();
1538
- ce(function() {
1539
- var e;
1540
- try {
1541
- e = qt();
1542
- } catch (r) {
1543
- return Bt;
1544
- }
1545
- var n = e.getAttribute("data-uid");
1546
- if (n && typeof n == "string" || (n = e.getAttribute("data-uid-auto")) && typeof n == "string")
1360
+ }
1361
+ function et(e) {
1362
+ return typeof e == "string" ? e : e.toString && typeof e.toString == "function" ? e.toString() : {}.toString.call(e);
1363
+ }
1364
+ ce(function(e) {
1365
+ if (Object.values) return Object.values(e);
1366
+ var n = [];
1367
+ for (var t in e) e.hasOwnProperty(t) && n.push(e[t]);
1547
1368
  return n;
1548
- if (e.src) {
1549
- var t = function(r) {
1550
- for (var o = "", i = 0; i < r.length; i++) {
1551
- var a = r[i].charCodeAt(0) * i;
1552
- r[i + 1] && (a += r[i + 1].charCodeAt(0) * (i - 1)), o += String.fromCharCode(97 + Math.abs(a) % 26);
1553
- }
1554
- return o;
1555
- }(JSON.stringify({
1556
- src: e.src,
1557
- dataset: e.dataset
1558
- }));
1559
- n = "uid_" + t.slice(t.length - 30);
1560
- } else
1561
- n = J();
1562
- return e.setAttribute("data-uid-auto", n), n;
1563
- });
1564
- function le(e) {
1565
- e === void 0 && (e = window);
1566
- var n = "__post_robot_10_0_46__";
1567
- return e !== window ? e[n] : e[n] = e[n] || {};
1568
- }
1569
- var nt = function() {
1570
- return {};
1571
- };
1572
- function z(e, n) {
1573
- return e === void 0 && (e = "store"), n === void 0 && (n = nt), fe(le(), e, function() {
1574
- var t = n();
1575
- return {
1576
- has: function(r) {
1577
- return t.hasOwnProperty(r);
1578
- },
1579
- get: function(r, o) {
1580
- return t.hasOwnProperty(r) ? t[r] : o;
1581
- },
1582
- set: function(r, o) {
1583
- return t[r] = o, o;
1584
- },
1585
- del: function(r) {
1586
- delete t[r];
1587
- },
1588
- getOrSet: function(r, o) {
1589
- return fe(t, r, o);
1590
- },
1591
- reset: function() {
1592
- t = n();
1593
- },
1594
- keys: function() {
1595
- return Object.keys(t);
1596
- }
1597
- };
1598
- });
1599
- }
1600
- var Gt = function() {
1601
- };
1602
- function xe() {
1603
- var e = le();
1604
- return e.WINDOW_WILDCARD = e.WINDOW_WILDCARD || new Gt(), e.WINDOW_WILDCARD;
1605
- }
1606
- function H(e, n) {
1607
- return e === void 0 && (e = "store"), n === void 0 && (n = nt), z("windowStore").getOrSet(e, function() {
1608
- var t = new Ce(), r = function(o) {
1609
- return t.getOrSet(o, n);
1610
- };
1611
- return {
1612
- has: function(o) {
1613
- return r(o).hasOwnProperty(e);
1614
- },
1615
- get: function(o, i) {
1616
- var a = r(o);
1617
- return a.hasOwnProperty(e) ? a[e] : i;
1618
- },
1619
- set: function(o, i) {
1620
- return r(o)[e] = i, i;
1621
- },
1622
- del: function(o) {
1623
- delete r(o)[e];
1624
- },
1625
- getOrSet: function(o, i) {
1626
- return fe(r(o), e, i);
1627
- }
1628
- };
1629
1369
  });
1630
- }
1631
- function rt() {
1632
- return z("instance").getOrSet("instanceID", J);
1633
- }
1634
- function ot(e, n) {
1635
- var t = n.domain, r = H("helloPromises"), o = r.get(e);
1636
- o && o.resolve({
1637
- domain: t
1638
- });
1639
- var i = P.resolve({
1640
- domain: t
1370
+ function Re(e) {
1371
+ return {}.toString.call(e) === "[object RegExp]";
1372
+ }
1373
+ function fe(e, n, t) {
1374
+ if (e.hasOwnProperty(n)) return e[n];
1375
+ var r = t();
1376
+ return e[n] = r, r;
1377
+ }
1378
+ function tt() {
1379
+ var e = document.body;
1380
+ if (!e) throw new Error("Body element not found");
1381
+ return e;
1382
+ }
1383
+ function nt() {
1384
+ return !!document.body && document.readyState === "complete";
1385
+ }
1386
+ function rt() {
1387
+ return !!document.body && document.readyState === "interactive";
1388
+ }
1389
+ ce(function() {
1390
+ return new P(function(e) {
1391
+ if (nt() || rt()) return e();
1392
+ var n = setInterval(function() {
1393
+ if (nt() || rt())
1394
+ return clearInterval(n), e();
1395
+ }, 10);
1396
+ });
1641
1397
  });
1642
- return r.set(e, i), i;
1643
- }
1644
- function Oe(e, n) {
1645
- return (0, n.send)(e, "postrobot_hello", {
1646
- instanceID: rt()
1647
- }, {
1648
- domain: "*",
1649
- timeout: -1
1650
- }).then(function(t) {
1651
- var r = t.origin, o = t.data.instanceID;
1652
- return ot(e, {
1653
- domain: r
1654
- }), {
1655
- win: e,
1656
- domain: r,
1657
- instanceID: o
1658
- };
1398
+ var Ee = typeof document != "undefined" ? document.currentScript : null, Gt = ce(function() {
1399
+ if (Ee || (Ee = function() {
1400
+ try {
1401
+ var e = function() {
1402
+ try {
1403
+ throw new Error("_");
1404
+ } catch (a) {
1405
+ return a.stack || "";
1406
+ }
1407
+ }(), n = /.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e), t = n && n[1];
1408
+ if (!t) return;
1409
+ for (var r = 0, o = [].slice.call(document.getElementsByTagName("script")).reverse(); r < o.length; r++) {
1410
+ var i = o[r];
1411
+ if (i.src && i.src === t) return i;
1412
+ }
1413
+ } catch (a) {
1414
+ }
1415
+ }())) return Ee;
1416
+ throw new Error("Can not determine current script");
1417
+ }), Vt = J();
1418
+ ce(function() {
1419
+ var e;
1420
+ try {
1421
+ e = Gt();
1422
+ } catch (r) {
1423
+ return Vt;
1424
+ }
1425
+ var n = e.getAttribute("data-uid");
1426
+ if (n && typeof n == "string" || (n = e.getAttribute("data-uid-auto")) && typeof n == "string") return n;
1427
+ if (e.src) {
1428
+ var t = function(r) {
1429
+ for (var o = "", i = 0; i < r.length; i++) {
1430
+ var a = r[i].charCodeAt(0) * i;
1431
+ r[i + 1] && (a += r[i + 1].charCodeAt(0) * (i - 1)), o += String.fromCharCode(97 + Math.abs(a) % 26);
1432
+ }
1433
+ return o;
1434
+ }(JSON.stringify({
1435
+ src: e.src,
1436
+ dataset: e.dataset
1437
+ }));
1438
+ n = "uid_" + t.slice(t.length - 30);
1439
+ } else n = J();
1440
+ return e.setAttribute("data-uid-auto", n), n;
1659
1441
  });
1660
- }
1661
- function it(e, n) {
1662
- var t = n.send;
1663
- return H("windowInstanceIDPromises").getOrSet(e, function() {
1664
- return Oe(e, {
1665
- send: t
1666
- }).then(function(r) {
1667
- return r.instanceID;
1442
+ function le(e) {
1443
+ e === void 0 && (e = window);
1444
+ var n = "__post_robot_10_0_46__";
1445
+ return e !== window ? e[n] : e[n] = e[n] || {};
1446
+ }
1447
+ var ot = function() {
1448
+ return {};
1449
+ };
1450
+ function j(e, n) {
1451
+ return e === void 0 && (e = "store"), n === void 0 && (n = ot), fe(le(), e, function() {
1452
+ var t = n();
1453
+ return {
1454
+ has: function(r) {
1455
+ return t.hasOwnProperty(r);
1456
+ },
1457
+ get: function(r, o) {
1458
+ return t.hasOwnProperty(r) ? t[r] : o;
1459
+ },
1460
+ set: function(r, o) {
1461
+ return t[r] = o, o;
1462
+ },
1463
+ del: function(r) {
1464
+ delete t[r];
1465
+ },
1466
+ getOrSet: function(r, o) {
1467
+ return fe(t, r, o);
1468
+ },
1469
+ reset: function() {
1470
+ t = n();
1471
+ },
1472
+ keys: function() {
1473
+ return Object.keys(t);
1474
+ }
1475
+ };
1668
1476
  });
1669
- });
1670
- }
1671
- function at(e) {
1672
- H("knownWindows").set(e, !0);
1673
- }
1674
- function Re(e) {
1675
- return typeof e == "object" && e !== null && typeof e.__type__ == "string";
1676
- }
1677
- function st(e) {
1678
- return e === void 0 ? "undefined" : e === null ? "null" : Array.isArray(e) ? "array" : typeof e == "function" ? "function" : typeof e == "object" ? e instanceof Error ? "error" : typeof e.then == "function" ? "promise" : {}.toString.call(e) === "[object RegExp]" ? "regex" : {}.toString.call(e) === "[object Date]" ? "date" : "object" : typeof e == "string" ? "string" : typeof e == "number" ? "number" : typeof e == "boolean" ? "boolean" : void 0;
1679
- }
1680
- function ne(e, n) {
1681
- return {
1682
- __type__: e,
1683
- __val__: n
1477
+ }
1478
+ var Jt = function() {
1684
1479
  };
1685
- }
1686
- var q, $t = ((q = {}).function = function() {
1687
- }, q.error = function(e) {
1688
- return ne("error", {
1689
- message: e.message,
1690
- stack: e.stack,
1691
- code: e.code,
1692
- data: e.data
1693
- });
1694
- }, q.promise = function() {
1695
- }, q.regex = function(e) {
1696
- return ne("regex", e.source);
1697
- }, q.date = function(e) {
1698
- return ne("date", e.toJSON());
1699
- }, q.array = function(e) {
1700
- return e;
1701
- }, q.object = function(e) {
1702
- return e;
1703
- }, q.string = function(e) {
1704
- return e;
1705
- }, q.number = function(e) {
1706
- return e;
1707
- }, q.boolean = function(e) {
1708
- return e;
1709
- }, q.null = function(e) {
1710
- return e;
1711
- }, q[void 0] = function(e) {
1712
- return ne("undefined", e);
1713
- }, q), Vt = {}, B, Jt = ((B = {}).function = function() {
1714
- throw new Error("Function serialization is not implemented; nothing to deserialize");
1715
- }, B.error = function(e) {
1716
- var n = e.stack, t = e.code, r = e.data, o = new Error(e.message);
1717
- return o.code = t, r && (o.data = r), o.stack = n + `
1480
+ function xe() {
1481
+ var e = le();
1482
+ return e.WINDOW_WILDCARD = e.WINDOW_WILDCARD || new Jt(), e.WINDOW_WILDCARD;
1483
+ }
1484
+ function H(e, n) {
1485
+ return e === void 0 && (e = "store"), n === void 0 && (n = ot), j("windowStore").getOrSet(e, function() {
1486
+ var t = new Te(), r = function(o) {
1487
+ return t.getOrSet(o, n);
1488
+ };
1489
+ return {
1490
+ has: function(o) {
1491
+ return r(o).hasOwnProperty(e);
1492
+ },
1493
+ get: function(o, i) {
1494
+ var a = r(o);
1495
+ return a.hasOwnProperty(e) ? a[e] : i;
1496
+ },
1497
+ set: function(o, i) {
1498
+ return r(o)[e] = i, i;
1499
+ },
1500
+ del: function(o) {
1501
+ delete r(o)[e];
1502
+ },
1503
+ getOrSet: function(o, i) {
1504
+ return fe(r(o), e, i);
1505
+ }
1506
+ };
1507
+ });
1508
+ }
1509
+ function it() {
1510
+ return j("instance").getOrSet("instanceID", J);
1511
+ }
1512
+ function at(e, n) {
1513
+ var t = n.domain, r = H("helloPromises"), o = r.get(e);
1514
+ o && o.resolve({
1515
+ domain: t
1516
+ });
1517
+ var i = P.resolve({
1518
+ domain: t
1519
+ });
1520
+ return r.set(e, i), i;
1521
+ }
1522
+ function Oe(e, n) {
1523
+ return (0, n.send)(e, "postrobot_hello", {
1524
+ instanceID: it()
1525
+ }, {
1526
+ domain: "*",
1527
+ timeout: -1
1528
+ }).then(function(t) {
1529
+ var r = t.origin, o = t.data.instanceID;
1530
+ return at(e, {
1531
+ domain: r
1532
+ }), {
1533
+ win: e,
1534
+ domain: r,
1535
+ instanceID: o
1536
+ };
1537
+ });
1538
+ }
1539
+ function st(e, n) {
1540
+ var t = n.send;
1541
+ return H("windowInstanceIDPromises").getOrSet(e, function() {
1542
+ return Oe(e, {
1543
+ send: t
1544
+ }).then(function(r) {
1545
+ return r.instanceID;
1546
+ });
1547
+ });
1548
+ }
1549
+ function ut(e) {
1550
+ H("knownWindows").set(e, !0);
1551
+ }
1552
+ function Ae(e) {
1553
+ return typeof e == "object" && e !== null && typeof e.__type__ == "string";
1554
+ }
1555
+ function ct(e) {
1556
+ return e === void 0 ? "undefined" : e === null ? "null" : Array.isArray(e) ? "array" : typeof e == "function" ? "function" : typeof e == "object" ? e instanceof Error ? "error" : typeof e.then == "function" ? "promise" : {}.toString.call(e) === "[object RegExp]" ? "regex" : {}.toString.call(e) === "[object Date]" ? "date" : "object" : typeof e == "string" ? "string" : typeof e == "number" ? "number" : typeof e == "boolean" ? "boolean" : void 0;
1557
+ }
1558
+ function te(e, n) {
1559
+ return {
1560
+ __type__: e,
1561
+ __val__: n
1562
+ };
1563
+ }
1564
+ var q, Yt = ((q = {}).function = function() {
1565
+ }, q.error = function(e) {
1566
+ return te("error", {
1567
+ message: e.message,
1568
+ stack: e.stack,
1569
+ code: e.code,
1570
+ data: e.data
1571
+ });
1572
+ }, q.promise = function() {
1573
+ }, q.regex = function(e) {
1574
+ return te("regex", e.source);
1575
+ }, q.date = function(e) {
1576
+ return te("date", e.toJSON());
1577
+ }, q.array = function(e) {
1578
+ return e;
1579
+ }, q.object = function(e) {
1580
+ return e;
1581
+ }, q.string = function(e) {
1582
+ return e;
1583
+ }, q.number = function(e) {
1584
+ return e;
1585
+ }, q.boolean = function(e) {
1586
+ return e;
1587
+ }, q.null = function(e) {
1588
+ return e;
1589
+ }, q[void 0] = function(e) {
1590
+ return te("undefined", e);
1591
+ }, q), Zt = {}, $, Kt = (($ = {}).function = function() {
1592
+ throw new Error("Function serialization is not implemented; nothing to deserialize");
1593
+ }, $.error = function(e) {
1594
+ var n = e.stack, t = e.code, r = e.data, o = new Error(e.message);
1595
+ return o.code = t, r && (o.data = r), o.stack = n + `
1718
1596
 
1719
1597
  ` + o.stack, o;
1720
- }, B.promise = function() {
1721
- throw new Error("Promise serialization is not implemented; nothing to deserialize");
1722
- }, B.regex = function(e) {
1723
- return new RegExp(e);
1724
- }, B.date = function(e) {
1725
- return new Date(e);
1726
- }, B.array = function(e) {
1727
- return e;
1728
- }, B.object = function(e) {
1729
- return e;
1730
- }, B.string = function(e) {
1731
- return e;
1732
- }, B.number = function(e) {
1733
- return e;
1734
- }, B.boolean = function(e) {
1735
- return e;
1736
- }, B.null = function(e) {
1737
- return e;
1738
- }, B[void 0] = function() {
1739
- }, B), Yt = {};
1740
- new P(function(e) {
1741
- if (window.document && window.document.body)
1742
- return e(window.document.body);
1743
- var n = setInterval(function() {
1744
- if (window.document && window.document.body)
1745
- return clearInterval(n), e(window.document.body);
1746
- }, 10);
1747
- });
1748
- function Ae() {
1749
- for (var e = z("idToProxyWindow"), n = 0, t = e.keys(); n < t.length; n++) {
1750
- var r = t[n];
1751
- e.get(r).shouldClean() && e.del(r);
1752
- }
1753
- }
1754
- function ut(e, n) {
1755
- var t = n.send, r = n.id, o = r === void 0 ? J() : r, i = e.then(function(u) {
1756
- if (Q(u))
1757
- return ve(u).name;
1758
- }), a = e.then(function(u) {
1759
- if ($(u))
1760
- throw new Error("Window is closed, can not determine type");
1761
- return oe(u) ? "popup" : "iframe";
1598
+ }, $.promise = function() {
1599
+ throw new Error("Promise serialization is not implemented; nothing to deserialize");
1600
+ }, $.regex = function(e) {
1601
+ return new RegExp(e);
1602
+ }, $.date = function(e) {
1603
+ return new Date(e);
1604
+ }, $.array = function(e) {
1605
+ return e;
1606
+ }, $.object = function(e) {
1607
+ return e;
1608
+ }, $.string = function(e) {
1609
+ return e;
1610
+ }, $.number = function(e) {
1611
+ return e;
1612
+ }, $.boolean = function(e) {
1613
+ return e;
1614
+ }, $.null = function(e) {
1615
+ return e;
1616
+ }, $[void 0] = function() {
1617
+ }, $), Xt = {};
1618
+ new P(function(e) {
1619
+ if (window.document && window.document.body) return e(window.document.body);
1620
+ var n = setInterval(function() {
1621
+ if (window.document && window.document.body)
1622
+ return clearInterval(n), e(window.document.body);
1623
+ }, 10);
1762
1624
  });
1763
- i.catch(te), a.catch(te);
1764
- var l = function() {
1765
- return e.then(function(u) {
1766
- if (!$(u))
1767
- return Q(u) ? ve(u).name : i;
1625
+ function Ne() {
1626
+ for (var e = j("idToProxyWindow"), n = 0, t = e.keys(); n < t.length; n++) {
1627
+ var r = t[n];
1628
+ e.get(r).shouldClean() && e.del(r);
1629
+ }
1630
+ }
1631
+ function dt(e, n) {
1632
+ var t = n.send, r = n.id, o = r === void 0 ? J() : r, i = e.then(function(u) {
1633
+ if (X(u)) return ve(u).name;
1634
+ }), a = e.then(function(u) {
1635
+ if (G(u)) throw new Error("Window is closed, can not determine type");
1636
+ return oe(u) ? "popup" : "iframe";
1768
1637
  });
1769
- };
1770
- return {
1771
- id: o,
1772
- getType: function() {
1773
- return a;
1774
- },
1775
- getInstanceID: _t(function() {
1776
- return e.then(function(u) {
1777
- return it(u, {
1778
- send: t
1779
- });
1780
- });
1781
- }),
1782
- close: function() {
1783
- return e.then(Ft);
1784
- },
1785
- getName: l,
1786
- focus: function() {
1638
+ i.catch(ee), a.catch(ee);
1639
+ var l = function() {
1787
1640
  return e.then(function(u) {
1788
- u.focus();
1641
+ if (!G(u)) return X(u) ? ve(u).name : i;
1789
1642
  });
1790
- },
1791
- isClosed: function() {
1792
- return e.then(function(u) {
1793
- return $(u);
1794
- });
1795
- },
1796
- setLocation: function(u, s) {
1797
- return s === void 0 && (s = {}), e.then(function(w) {
1798
- var m = window.location.protocol + "//" + window.location.host, p = s.method, g = p === void 0 ? "get" : p, b = s.body;
1799
- if (u.indexOf("/") === 0)
1800
- u = "" + m + u;
1801
- else if (!u.match(/^https?:\/\//) && u.indexOf(m) !== 0)
1802
- throw new Error("Expected url to be http or https url, or absolute path, got " + JSON.stringify(u));
1803
- if (g === "post")
1804
- return l().then(function(x) {
1805
- if (!x)
1806
- throw new Error("Can not post to window without target name");
1643
+ };
1644
+ return {
1645
+ id: o,
1646
+ getType: function() {
1647
+ return a;
1648
+ },
1649
+ getInstanceID: Bt(function() {
1650
+ return e.then(function(u) {
1651
+ return st(u, {
1652
+ send: t
1653
+ });
1654
+ });
1655
+ }),
1656
+ close: function() {
1657
+ return e.then(qt);
1658
+ },
1659
+ getName: l,
1660
+ focus: function() {
1661
+ return e.then(function(u) {
1662
+ u.focus();
1663
+ });
1664
+ },
1665
+ isClosed: function() {
1666
+ return e.then(function(u) {
1667
+ return G(u);
1668
+ });
1669
+ },
1670
+ setLocation: function(u, s) {
1671
+ return s === void 0 && (s = {}), e.then(function(w) {
1672
+ var m = window.location.protocol + "//" + window.location.host, p = s.method, g = p === void 0 ? "get" : p, b = s.body;
1673
+ if (u.indexOf("/") === 0) u = "" + m + u;
1674
+ else if (!u.match(/^https?:\/\//) && u.indexOf(m) !== 0) throw new Error("Expected url to be http or https url, or absolute path, got " + JSON.stringify(u));
1675
+ if (g === "post") return l().then(function(x) {
1676
+ if (!x) throw new Error("Can not post to window without target name");
1807
1677
  (function(S) {
1808
- var C = S.url, j = S.target, O = S.body, T = S.method, L = T === void 0 ? "post" : T, W = document.createElement("form");
1809
- if (W.setAttribute("target", j), W.setAttribute("method", L), W.setAttribute("action", C), W.style.display = "none", O)
1810
- for (var R = 0, V = Object.keys(O); R < V.length; R++) {
1811
- var M, he = V[R], je = document.createElement("input");
1812
- je.setAttribute("name", he), je.setAttribute("value", (M = O[he]) == null ? void 0 : M.toString()), W.appendChild(je);
1813
- }
1814
- Qe().appendChild(W), W.submit(), Qe().removeChild(W);
1678
+ var C = S.url, z = S.target, R = S.body, T = S.method, L = T === void 0 ? "post" : T, W = document.createElement("form");
1679
+ if (W.setAttribute("target", z), W.setAttribute("method", L), W.setAttribute("action", C), W.style.display = "none", R) for (var O = 0, V = Object.keys(R); O < V.length; O++) {
1680
+ var M, he = V[O], je = document.createElement("input");
1681
+ je.setAttribute("name", he), je.setAttribute("value", (M = R[he]) == null ? void 0 : M.toString()), W.appendChild(je);
1682
+ }
1683
+ tt().appendChild(W), W.submit(), tt().removeChild(W);
1815
1684
  })({
1816
1685
  url: u,
1817
1686
  target: x,
@@ -1819,413 +1688,390 @@ var jt = { exports: {} }, zt = { exports: {} };
1819
1688
  body: b
1820
1689
  });
1821
1690
  });
1822
- if (g !== "get")
1823
- throw new Error("Unsupported method: " + g);
1824
- if (Q(w))
1825
- try {
1691
+ if (g !== "get") throw new Error("Unsupported method: " + g);
1692
+ if (X(w)) try {
1826
1693
  if (w.location && typeof w.location.replace == "function") {
1827
1694
  w.location.replace(u);
1828
1695
  return;
1829
1696
  }
1830
1697
  } catch (x) {
1831
1698
  }
1832
- w.location = u;
1833
- });
1834
- },
1835
- setName: function(u) {
1836
- return e.then(function(s) {
1837
- var w = Q(s), m = Ge(s);
1838
- if (!w)
1839
- throw new Error("Can not set name for cross-domain window: " + u);
1840
- ve(s).name = u, m && m.setAttribute("name", u), i = P.resolve(u);
1699
+ w.location = u;
1700
+ });
1701
+ },
1702
+ setName: function(u) {
1703
+ return e.then(function(s) {
1704
+ var w = X(s), m = Ve(s);
1705
+ if (!w) throw new Error("Can not set name for cross-domain window: " + u);
1706
+ ve(s).name = u, m && m.setAttribute("name", u), i = P.resolve(u);
1707
+ });
1708
+ }
1709
+ };
1710
+ }
1711
+ var B = function() {
1712
+ function e(t) {
1713
+ var r = t.send, o = t.win, i = t.serializedWindow;
1714
+ 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 P(), this.serializedWindow = i || dt(this.actualWindowPromise, {
1715
+ send: r
1716
+ }), j("idToProxyWindow").set(this.getID(), this), o && this.setWindow(o, {
1717
+ send: r
1841
1718
  });
1842
1719
  }
1843
- };
1844
- }
1845
- var G = function() {
1846
- function e(t) {
1847
- var r = t.send, o = t.win, i = t.serializedWindow;
1848
- 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 P(), this.serializedWindow = i || ut(this.actualWindowPromise, {
1849
- send: r
1850
- }), z("idToProxyWindow").set(this.getID(), this), o && this.setWindow(o, {
1851
- send: r
1852
- });
1853
- }
1854
- var n = e.prototype;
1855
- return n.getID = function() {
1856
- return this.serializedWindow.id;
1857
- }, n.getType = function() {
1858
- return this.serializedWindow.getType();
1859
- }, n.isPopup = function() {
1860
- return this.getType().then(function(t) {
1861
- return t === "popup";
1862
- });
1863
- }, n.setLocation = function(t, r) {
1864
- var o = this;
1865
- return this.serializedWindow.setLocation(t, r).then(function() {
1866
- return o;
1867
- });
1868
- }, n.getName = function() {
1869
- return this.serializedWindow.getName();
1870
- }, n.setName = function(t) {
1871
- var r = this;
1872
- return this.serializedWindow.setName(t).then(function() {
1873
- return r;
1874
- });
1875
- }, n.close = function() {
1876
- var t = this;
1877
- return this.serializedWindow.close().then(function() {
1878
- return t;
1879
- });
1880
- }, n.focus = function() {
1881
- var t = this, r = this.isPopup(), o = this.getName(), i = P.hash({
1882
- isPopup: r,
1883
- name: o
1884
- }).then(function(l) {
1885
- var u = l.name;
1886
- l.isPopup && u && window.open("", u, "noopener");
1887
- }), a = this.serializedWindow.focus();
1888
- return P.all([i, a]).then(function() {
1889
- return t;
1890
- });
1891
- }, n.isClosed = function() {
1892
- return this.serializedWindow.isClosed();
1893
- }, n.getWindow = function() {
1894
- return this.actualWindow;
1895
- }, n.setWindow = function(t, r) {
1896
- var o = r.send;
1897
- this.actualWindow = t, this.actualWindowPromise.resolve(this.actualWindow), this.serializedWindow = ut(this.actualWindowPromise, {
1898
- send: o,
1899
- id: this.getID()
1900
- }), H("winToProxyWindow").set(t, this);
1901
- }, n.awaitWindow = function() {
1902
- return this.actualWindowPromise;
1903
- }, n.matchWindow = function(t, r) {
1904
- var o = this, i = r.send;
1905
- return P.try(function() {
1906
- return o.actualWindow ? t === o.actualWindow : P.hash({
1907
- proxyInstanceID: o.getInstanceID(),
1908
- knownWindowInstanceID: it(t, {
1909
- send: i
1910
- })
1911
- }).then(function(a) {
1912
- var l = a.proxyInstanceID === a.knownWindowInstanceID;
1913
- return l && o.setWindow(t, {
1914
- send: i
1915
- }), l;
1720
+ var n = e.prototype;
1721
+ return n.getID = function() {
1722
+ return this.serializedWindow.id;
1723
+ }, n.getType = function() {
1724
+ return this.serializedWindow.getType();
1725
+ }, n.isPopup = function() {
1726
+ return this.getType().then(function(t) {
1727
+ return t === "popup";
1916
1728
  });
1917
- });
1918
- }, n.unwrap = function() {
1919
- return this.actualWindow || this;
1920
- }, n.getInstanceID = function() {
1921
- return this.serializedWindow.getInstanceID();
1922
- }, n.shouldClean = function() {
1923
- return !!(this.actualWindow && $(this.actualWindow));
1924
- }, n.serialize = function() {
1925
- return this.serializedWindow;
1926
- }, e.unwrap = function(t) {
1927
- return e.isProxyWindow(t) ? t.unwrap() : t;
1928
- }, e.serialize = function(t, r) {
1929
- var o = r.send;
1930
- return Ae(), e.toProxyWindow(t, {
1931
- send: o
1932
- }).serialize();
1933
- }, e.deserialize = function(t, r) {
1934
- var o = r.send;
1935
- return Ae(), z("idToProxyWindow").get(t.id) || new e({
1936
- serializedWindow: t,
1937
- send: o
1938
- });
1939
- }, e.isProxyWindow = function(t) {
1940
- return !!(t && !we(t) && t.isProxyWindow);
1941
- }, e.toProxyWindow = function(t, r) {
1942
- var o = r.send;
1943
- if (Ae(), e.isProxyWindow(t))
1944
- return t;
1945
- var i = t;
1946
- return H("winToProxyWindow").get(i) || new e({
1947
- win: i,
1948
- send: o
1949
- });
1950
- }, e;
1951
- }();
1952
- function Ne(e, n, t, r, o) {
1953
- var i = H("methodStore"), a = z("proxyWindowMethods");
1954
- G.isProxyWindow(r) ? a.set(e, {
1955
- val: n,
1956
- name: t,
1957
- domain: o,
1958
- source: r
1959
- }) : (a.del(e), i.getOrSet(r, function() {
1960
- return {};
1961
- })[e] = {
1962
- domain: o,
1963
- name: t,
1964
- val: n,
1965
- source: r
1966
- });
1967
- }
1968
- function ct(e, n) {
1969
- var t = H("methodStore"), r = z("proxyWindowMethods");
1970
- return t.getOrSet(e, function() {
1971
- return {};
1972
- })[n] || r.get(n);
1973
- }
1974
- function dt(e, n, t, r, o) {
1975
- a = (i = {
1976
- on: o.on,
1977
- send: o.send
1978
- }).on, l = i.send, z("builtinListeners").getOrSet("functionCalls", function() {
1979
- return a("postrobot_method", {
1980
- domain: "*"
1981
- }, function(w) {
1982
- var m = w.source, p = w.origin, g = w.data, b = g.id, x = g.name, S = ct(m, b);
1983
- if (!S)
1984
- throw new Error("Could not find method '" + x + "' with id: " + g.id + " in " + F(window));
1985
- var C = S.source, j = S.domain, O = S.val;
1729
+ }, n.setLocation = function(t, r) {
1730
+ var o = this;
1731
+ return this.serializedWindow.setLocation(t, r).then(function() {
1732
+ return o;
1733
+ });
1734
+ }, n.getName = function() {
1735
+ return this.serializedWindow.getName();
1736
+ }, n.setName = function(t) {
1737
+ var r = this;
1738
+ return this.serializedWindow.setName(t).then(function() {
1739
+ return r;
1740
+ });
1741
+ }, n.close = function() {
1742
+ var t = this;
1743
+ return this.serializedWindow.close().then(function() {
1744
+ return t;
1745
+ });
1746
+ }, n.focus = function() {
1747
+ var t = this, r = this.isPopup(), o = this.getName(), i = P.hash({
1748
+ isPopup: r,
1749
+ name: o
1750
+ }).then(function(l) {
1751
+ var u = l.name;
1752
+ l.isPopup && u && window.open("", u, "noopener");
1753
+ }), a = this.serializedWindow.focus();
1754
+ return P.all([i, a]).then(function() {
1755
+ return t;
1756
+ });
1757
+ }, n.isClosed = function() {
1758
+ return this.serializedWindow.isClosed();
1759
+ }, n.getWindow = function() {
1760
+ return this.actualWindow;
1761
+ }, n.setWindow = function(t, r) {
1762
+ var o = r.send;
1763
+ this.actualWindow = t, this.actualWindowPromise.resolve(this.actualWindow), this.serializedWindow = dt(this.actualWindowPromise, {
1764
+ send: o,
1765
+ id: this.getID()
1766
+ }), H("winToProxyWindow").set(t, this);
1767
+ }, n.awaitWindow = function() {
1768
+ return this.actualWindowPromise;
1769
+ }, n.matchWindow = function(t, r) {
1770
+ var o = this, i = r.send;
1986
1771
  return P.try(function() {
1987
- if (!re(j, p))
1988
- throw new Error("Method '" + g.name + "' domain " + JSON.stringify(Te(S.domain) ? S.domain.source : S.domain) + " does not match origin " + p + " in " + F(window));
1989
- if (G.isProxyWindow(C))
1990
- return C.matchWindow(m, {
1772
+ return o.actualWindow ? t === o.actualWindow : P.hash({
1773
+ proxyInstanceID: o.getInstanceID(),
1774
+ knownWindowInstanceID: st(t, {
1775
+ send: i
1776
+ })
1777
+ }).then(function(a) {
1778
+ var l = a.proxyInstanceID === a.knownWindowInstanceID;
1779
+ return l && o.setWindow(t, {
1780
+ send: i
1781
+ }), l;
1782
+ });
1783
+ });
1784
+ }, n.unwrap = function() {
1785
+ return this.actualWindow || this;
1786
+ }, n.getInstanceID = function() {
1787
+ return this.serializedWindow.getInstanceID();
1788
+ }, n.shouldClean = function() {
1789
+ return !!(this.actualWindow && G(this.actualWindow));
1790
+ }, n.serialize = function() {
1791
+ return this.serializedWindow;
1792
+ }, e.unwrap = function(t) {
1793
+ return e.isProxyWindow(t) ? t.unwrap() : t;
1794
+ }, e.serialize = function(t, r) {
1795
+ var o = r.send;
1796
+ return Ne(), e.toProxyWindow(t, {
1797
+ send: o
1798
+ }).serialize();
1799
+ }, e.deserialize = function(t, r) {
1800
+ var o = r.send;
1801
+ return Ne(), j("idToProxyWindow").get(t.id) || new e({
1802
+ serializedWindow: t,
1803
+ send: o
1804
+ });
1805
+ }, e.isProxyWindow = function(t) {
1806
+ return !!(t && !we(t) && t.isProxyWindow);
1807
+ }, e.toProxyWindow = function(t, r) {
1808
+ var o = r.send;
1809
+ if (Ne(), e.isProxyWindow(t)) return t;
1810
+ var i = t;
1811
+ return H("winToProxyWindow").get(i) || new e({
1812
+ win: i,
1813
+ send: o
1814
+ });
1815
+ }, e;
1816
+ }();
1817
+ function De(e, n, t, r, o) {
1818
+ var i = H("methodStore"), a = j("proxyWindowMethods");
1819
+ B.isProxyWindow(r) ? a.set(e, {
1820
+ val: n,
1821
+ name: t,
1822
+ domain: o,
1823
+ source: r
1824
+ }) : (a.del(e), i.getOrSet(r, function() {
1825
+ return {};
1826
+ })[e] = {
1827
+ domain: o,
1828
+ name: t,
1829
+ val: n,
1830
+ source: r
1831
+ });
1832
+ }
1833
+ function ft(e, n) {
1834
+ var t = H("methodStore"), r = j("proxyWindowMethods");
1835
+ return t.getOrSet(e, function() {
1836
+ return {};
1837
+ })[n] || r.get(n);
1838
+ }
1839
+ function lt(e, n, t, r, o) {
1840
+ a = (i = {
1841
+ on: o.on,
1842
+ send: o.send
1843
+ }).on, l = i.send, j("builtinListeners").getOrSet("functionCalls", function() {
1844
+ return a("postrobot_method", {
1845
+ domain: "*"
1846
+ }, function(w) {
1847
+ var m = w.source, p = w.origin, g = w.data, b = g.id, x = g.name, S = ft(m, b);
1848
+ if (!S) throw new Error("Could not find method '" + x + "' with id: " + g.id + " in " + F(window));
1849
+ var C = S.source, z = S.domain, R = S.val;
1850
+ return P.try(function() {
1851
+ if (!re(z, p)) throw new Error("Method '" + g.name + "' domain " + JSON.stringify(Re(S.domain) ? S.domain.source : S.domain) + " does not match origin " + p + " in " + F(window));
1852
+ if (B.isProxyWindow(C)) return C.matchWindow(m, {
1991
1853
  send: l
1992
1854
  }).then(function(T) {
1993
- if (!T)
1994
- throw new Error("Method call '" + g.name + "' failed - proxy window does not match source in " + F(window));
1855
+ if (!T) throw new Error("Method call '" + g.name + "' failed - proxy window does not match source in " + F(window));
1995
1856
  });
1996
- }).then(function() {
1997
- return O.apply({
1998
- source: m,
1999
- origin: p
2000
- }, g.args);
2001
- }, function(T) {
2002
- return P.try(function() {
2003
- if (O.onError)
2004
- return O.onError(T);
2005
1857
  }).then(function() {
2006
- throw T.stack && (T.stack = "Remote call to " + x + "(" + function(L) {
2007
- return L === void 0 && (L = []), (W = L, [].slice.call(W)).map(function(R) {
2008
- return typeof R == "string" ? "'" + R + "'" : R === void 0 ? "undefined" : R === null ? "null" : typeof R == "boolean" ? R.toString() : Array.isArray(R) ? "[ ... ]" : typeof R == "object" ? "{ ... }" : typeof R == "function" ? "() => { ... }" : "<" + typeof R + ">";
2009
- }).join(", ");
2010
- var W;
2011
- }(g.args) + `) failed
1858
+ return R.apply({
1859
+ source: m,
1860
+ origin: p
1861
+ }, g.args);
1862
+ }, function(T) {
1863
+ return P.try(function() {
1864
+ if (R.onError) return R.onError(T);
1865
+ }).then(function() {
1866
+ throw T.stack && (T.stack = "Remote call to " + x + "(" + function(L) {
1867
+ return L === void 0 && (L = []), (W = L, [].slice.call(W)).map(function(O) {
1868
+ return typeof O == "string" ? "'" + O + "'" : O === void 0 ? "undefined" : O === null ? "null" : typeof O == "boolean" ? O.toString() : Array.isArray(O) ? "[ ... ]" : typeof O == "object" ? "{ ... }" : typeof O == "function" ? "() => { ... }" : "<" + typeof O + ">";
1869
+ }).join(", ");
1870
+ var W;
1871
+ }(g.args) + `) failed
2012
1872
 
2013
1873
  ` + T.stack), T;
1874
+ });
1875
+ }).then(function(T) {
1876
+ return {
1877
+ result: T,
1878
+ id: b,
1879
+ name: x
1880
+ };
2014
1881
  });
2015
- }).then(function(T) {
2016
- return {
2017
- result: T,
2018
- id: b,
2019
- name: x
2020
- };
2021
1882
  });
2022
1883
  });
2023
- });
2024
- var i, a, l, u = t.__id__ || J();
2025
- e = G.unwrap(e);
2026
- var s = t.__name__ || t.name || r;
2027
- return typeof s == "string" && typeof s.indexOf == "function" && s.indexOf("anonymous::") === 0 && (s = s.replace("anonymous::", r + "::")), G.isProxyWindow(e) ? (Ne(u, t, s, e, n), e.awaitWindow().then(function(w) {
2028
- Ne(u, t, s, w, n);
2029
- })) : Ne(u, t, s, e, n), ne("cross_domain_function", {
2030
- id: u,
2031
- name: s
2032
- });
2033
- }
2034
- function ft(e, n, t, r) {
2035
- var o, i = r.on, a = r.send;
2036
- return function(l, u) {
2037
- u === void 0 && (u = Vt);
2038
- var s = JSON.stringify(l, function(w) {
2039
- var m = this[w];
2040
- if (Re(this))
2041
- return m;
2042
- var p = st(m);
2043
- if (!p)
2044
- return m;
2045
- var g = u[p] || $t[p];
2046
- return g ? g(m, w) : m;
1884
+ var i, a, l, u = t.__id__ || J();
1885
+ e = B.unwrap(e);
1886
+ var s = t.__name__ || t.name || r;
1887
+ return typeof s == "string" && typeof s.indexOf == "function" && s.indexOf("anonymous::") === 0 && (s = s.replace("anonymous::", r + "::")), B.isProxyWindow(e) ? (De(u, t, s, e, n), e.awaitWindow().then(function(w) {
1888
+ De(u, t, s, w, n);
1889
+ })) : De(u, t, s, e, n), te("cross_domain_function", {
1890
+ id: u,
1891
+ name: s
2047
1892
  });
2048
- return s === void 0 ? "undefined" : s;
2049
- }(t, ((o = {}).promise = function(l, u) {
2050
- return function(s, w, m, p, g) {
2051
- return ne("cross_domain_zalgo_promise", {
2052
- then: dt(s, w, function(b, x) {
2053
- return m.then(b, x);
2054
- }, p, {
2055
- on: g.on,
2056
- send: g.send
2057
- })
1893
+ }
1894
+ function ht(e, n, t, r) {
1895
+ var o, i = r.on, a = r.send;
1896
+ return function(l, u) {
1897
+ u === void 0 && (u = Zt);
1898
+ var s = JSON.stringify(l, function(w) {
1899
+ var m = this[w];
1900
+ if (Ae(this)) return m;
1901
+ var p = ct(m);
1902
+ if (!p) return m;
1903
+ var g = u[p] || Yt[p];
1904
+ return g ? g(m, w) : m;
2058
1905
  });
2059
- }(e, n, l, u, {
2060
- on: i,
2061
- send: a
2062
- });
2063
- }, o.function = function(l, u) {
2064
- return dt(e, n, l, u, {
2065
- on: i,
2066
- send: a
2067
- });
2068
- }, o.object = function(l) {
2069
- return we(l) || G.isProxyWindow(l) ? ne("cross_domain_window", G.serialize(l, {
2070
- send: a
2071
- })) : l;
2072
- }, o));
2073
- }
2074
- function lt(e, n, t, r) {
2075
- var o, i = r.send;
2076
- return function(a, l) {
2077
- if (l === void 0 && (l = Yt), a !== "undefined")
2078
- return JSON.parse(a, function(u, s) {
2079
- if (Re(this))
2080
- return s;
1906
+ return s === void 0 ? "undefined" : s;
1907
+ }(t, ((o = {}).promise = function(l, u) {
1908
+ return function(s, w, m, p, g) {
1909
+ return te("cross_domain_zalgo_promise", {
1910
+ then: lt(s, w, function(b, x) {
1911
+ return m.then(b, x);
1912
+ }, p, {
1913
+ on: g.on,
1914
+ send: g.send
1915
+ })
1916
+ });
1917
+ }(e, n, l, u, {
1918
+ on: i,
1919
+ send: a
1920
+ });
1921
+ }, o.function = function(l, u) {
1922
+ return lt(e, n, l, u, {
1923
+ on: i,
1924
+ send: a
1925
+ });
1926
+ }, o.object = function(l) {
1927
+ return we(l) || B.isProxyWindow(l) ? te("cross_domain_window", B.serialize(l, {
1928
+ send: a
1929
+ })) : l;
1930
+ }, o));
1931
+ }
1932
+ function mt(e, n, t, r) {
1933
+ var o, i = r.send;
1934
+ return function(a, l) {
1935
+ if (l === void 0 && (l = Xt), a !== "undefined") return JSON.parse(a, function(u, s) {
1936
+ if (Ae(this)) return s;
2081
1937
  var w, m;
2082
- if (Re(s) ? (w = s.__type__, m = s.__val__) : (w = st(s), m = s), !w)
2083
- return m;
2084
- var p = l[w] || Jt[w];
1938
+ if (Ae(s) ? (w = s.__type__, m = s.__val__) : (w = ct(s), m = s), !w) return m;
1939
+ var p = l[w] || Kt[w];
2085
1940
  return p ? p(m, u) : m;
2086
1941
  });
2087
- }(t, ((o = {}).cross_domain_zalgo_promise = function(a) {
2088
- return function(l, u, s) {
2089
- return new P(s.then);
2090
- }(0, 0, a);
2091
- }, o.cross_domain_function = function(a) {
2092
- return function(l, u, s, w) {
2093
- var m = s.id, p = s.name, g = w.send, b = function(S) {
2094
- S === void 0 && (S = {});
2095
- function C() {
2096
- var j = arguments;
2097
- return G.toProxyWindow(l, {
2098
- send: g
2099
- }).awaitWindow().then(function(O) {
2100
- var T = ct(O, m);
2101
- if (T && T.val !== C)
2102
- return T.val.apply({
1942
+ }(t, ((o = {}).cross_domain_zalgo_promise = function(a) {
1943
+ return function(l, u, s) {
1944
+ return new P(s.then);
1945
+ }(0, 0, a);
1946
+ }, o.cross_domain_function = function(a) {
1947
+ return function(l, u, s, w) {
1948
+ var m = s.id, p = s.name, g = w.send, b = function(S) {
1949
+ S === void 0 && (S = {});
1950
+ function C() {
1951
+ var z = arguments;
1952
+ return B.toProxyWindow(l, {
1953
+ send: g
1954
+ }).awaitWindow().then(function(R) {
1955
+ var T = ft(R, m);
1956
+ if (T && T.val !== C) return T.val.apply({
2103
1957
  source: window,
2104
1958
  origin: F()
2105
- }, j);
2106
- var L = [].slice.call(j);
2107
- return S.fireAndForget ? g(O, "postrobot_method", {
2108
- id: m,
2109
- name: p,
2110
- args: L
2111
- }, {
2112
- domain: u,
2113
- fireAndForget: !0
2114
- }) : g(O, "postrobot_method", {
2115
- id: m,
2116
- name: p,
2117
- args: L
2118
- }, {
2119
- domain: u,
2120
- fireAndForget: !1
2121
- }).then(function(W) {
2122
- return W.data.result;
1959
+ }, z);
1960
+ var L = [].slice.call(z);
1961
+ return S.fireAndForget ? g(R, "postrobot_method", {
1962
+ id: m,
1963
+ name: p,
1964
+ args: L
1965
+ }, {
1966
+ domain: u,
1967
+ fireAndForget: !0
1968
+ }) : g(R, "postrobot_method", {
1969
+ id: m,
1970
+ name: p,
1971
+ args: L
1972
+ }, {
1973
+ domain: u,
1974
+ fireAndForget: !1
1975
+ }).then(function(W) {
1976
+ return W.data.result;
1977
+ });
1978
+ }).catch(function(R) {
1979
+ throw R;
2123
1980
  });
2124
- }).catch(function(O) {
2125
- throw O;
2126
- });
2127
- }
2128
- return C.__name__ = p, C.__origin__ = u, C.__source__ = l, C.__id__ = m, C.origin = u, C;
2129
- }, x = b();
2130
- return x.fireAndForget = b({
2131
- fireAndForget: !0
2132
- }), x;
2133
- }(e, n, a, {
2134
- send: i
2135
- });
2136
- }, o.cross_domain_window = function(a) {
2137
- return G.deserialize(a, {
2138
- send: i
2139
- });
2140
- }, o));
2141
- }
2142
- var De = {};
2143
- De.postrobot_post_message = function(e, n, t) {
2144
- t.indexOf("file:") === 0 && (t = "*"), e.postMessage(n, t);
2145
- };
2146
- function Me(e, n, t, r) {
2147
- var o = r.on, i = r.send;
2148
- return P.try(function() {
2149
- var a = H().getOrSet(e, function() {
2150
- return {};
2151
- });
2152
- return a.buffer = a.buffer || [], a.buffer.push(t), a.flush = a.flush || P.flush().then(function() {
2153
- if ($(e))
2154
- throw new Error("Window is closed");
2155
- var l = ft(e, n, ((u = {}).__post_robot_10_0_46__ = a.buffer || [], u), {
2156
- on: o,
1981
+ }
1982
+ return C.__name__ = p, C.__origin__ = u, C.__source__ = l, C.__id__ = m, C.origin = u, C;
1983
+ }, x = b();
1984
+ return x.fireAndForget = b({
1985
+ fireAndForget: !0
1986
+ }), x;
1987
+ }(e, n, a, {
2157
1988
  send: i
2158
- }), u;
2159
- delete a.buffer;
2160
- for (var s = Object.keys(De), w = [], m = 0; m < s.length; m++) {
2161
- var p = s[m];
2162
- try {
2163
- De[p](e, l, n);
2164
- } catch (g) {
2165
- w.push(g);
1989
+ });
1990
+ }, o.cross_domain_window = function(a) {
1991
+ return B.deserialize(a, {
1992
+ send: i
1993
+ });
1994
+ }, o));
1995
+ }
1996
+ var Me = {};
1997
+ Me.postrobot_post_message = function(e, n, t) {
1998
+ t.indexOf("file:") === 0 && (t = "*"), e.postMessage(n, t);
1999
+ };
2000
+ function ze(e, n, t, r) {
2001
+ var o = r.on, i = r.send;
2002
+ return P.try(function() {
2003
+ var a = H().getOrSet(e, function() {
2004
+ return {};
2005
+ });
2006
+ return a.buffer = a.buffer || [], a.buffer.push(t), a.flush = a.flush || P.flush().then(function() {
2007
+ if (G(e)) throw new Error("Window is closed");
2008
+ var l = ht(e, n, ((u = {}).__post_robot_10_0_46__ = a.buffer || [], u), {
2009
+ on: o,
2010
+ send: i
2011
+ }), u;
2012
+ delete a.buffer;
2013
+ for (var s = Object.keys(Me), w = [], m = 0; m < s.length; m++) {
2014
+ var p = s[m];
2015
+ try {
2016
+ Me[p](e, l, n);
2017
+ } catch (g) {
2018
+ w.push(g);
2019
+ }
2166
2020
  }
2167
- }
2168
- if (w.length === s.length)
2169
- throw new Error(`All post-robot messaging strategies failed:
2021
+ if (w.length === s.length) throw new Error(`All post-robot messaging strategies failed:
2170
2022
 
2171
2023
  ` + w.map(function(g, b) {
2172
2024
  return b + ". " + de(g);
2173
2025
  }).join(`
2174
2026
 
2175
2027
  `));
2176
- }), a.flush.then(function() {
2177
- delete a.flush;
2178
- });
2179
- }).then(te);
2180
- }
2181
- function ht(e) {
2182
- return z("responseListeners").get(e);
2183
- }
2184
- function mt(e) {
2185
- z("responseListeners").del(e);
2186
- }
2187
- function pt(e) {
2188
- return z("erroredResponseListeners").has(e);
2189
- }
2190
- function vt(e) {
2191
- var n = e.name, t = e.win, r = e.domain, o = H("requestListeners");
2192
- if (t === "*" && (t = null), r === "*" && (r = null), !n)
2193
- throw new Error("Name required to get request listener");
2194
- for (var i = 0, a = [t, xe()]; i < a.length; i++) {
2195
- var l = a[i];
2196
- if (l) {
2197
- var u = o.get(l);
2198
- if (u) {
2199
- var s = u[n];
2200
- if (s) {
2201
- if (r && typeof r == "string") {
2202
- if (s[r])
2203
- return s[r];
2204
- if (s.__domain_regex__)
2205
- for (var w = 0, m = s.__domain_regex__; w < m.length; w++) {
2028
+ }), a.flush.then(function() {
2029
+ delete a.flush;
2030
+ });
2031
+ }).then(ee);
2032
+ }
2033
+ function pt(e) {
2034
+ return j("responseListeners").get(e);
2035
+ }
2036
+ function vt(e) {
2037
+ j("responseListeners").del(e);
2038
+ }
2039
+ function wt(e) {
2040
+ return j("erroredResponseListeners").has(e);
2041
+ }
2042
+ function gt(e) {
2043
+ var n = e.name, t = e.win, r = e.domain, o = H("requestListeners");
2044
+ if (t === "*" && (t = null), r === "*" && (r = null), !n) throw new Error("Name required to get request listener");
2045
+ for (var i = 0, a = [t, xe()]; i < a.length; i++) {
2046
+ var l = a[i];
2047
+ if (l) {
2048
+ var u = o.get(l);
2049
+ if (u) {
2050
+ var s = u[n];
2051
+ if (s) {
2052
+ if (r && typeof r == "string") {
2053
+ if (s[r]) return s[r];
2054
+ if (s.__domain_regex__) for (var w = 0, m = s.__domain_regex__; w < m.length; w++) {
2206
2055
  var p = m[w], g = p.listener;
2207
- if (re(p.regex, r))
2208
- return g;
2056
+ if (re(p.regex, r)) return g;
2209
2057
  }
2058
+ }
2059
+ if (s["*"]) return s["*"];
2210
2060
  }
2211
- if (s["*"])
2212
- return s["*"];
2213
2061
  }
2214
2062
  }
2215
2063
  }
2216
2064
  }
2217
- }
2218
- function Zt(e, n, t, r) {
2219
- var o = r.on, i = r.send, a = vt({
2220
- name: t.name,
2221
- win: e,
2222
- domain: n
2223
- }), l = t.name === "postrobot_method" && t.data && typeof t.data.name == "string" ? t.data.name + "()" : t.name;
2224
- function u(s, w, m) {
2225
- return P.flush().then(function() {
2226
- if (!t.fireAndForget && !$(e))
2227
- try {
2228
- return Me(e, n, {
2065
+ function Qt(e, n, t, r) {
2066
+ var o = r.on, i = r.send, a = gt({
2067
+ name: t.name,
2068
+ win: e,
2069
+ domain: n
2070
+ }), l = t.name === "postrobot_method" && t.data && typeof t.data.name == "string" ? t.data.name + "()" : t.name;
2071
+ function u(s, w, m) {
2072
+ return P.flush().then(function() {
2073
+ if (!t.fireAndForget && !G(e)) try {
2074
+ return ze(e, n, {
2229
2075
  id: J(),
2230
2076
  origin: F(window),
2231
2077
  type: "postrobot_message_response",
@@ -2243,12 +2089,11 @@ var jt = { exports: {} }, zt = { exports: {} };
2243
2089
 
2244
2090
  ` + de(p));
2245
2091
  }
2246
- });
2247
- }
2248
- return P.all([P.flush().then(function() {
2249
- if (!t.fireAndForget && !$(e))
2250
- try {
2251
- return Me(e, n, {
2092
+ });
2093
+ }
2094
+ return P.all([P.flush().then(function() {
2095
+ if (!t.fireAndForget && !G(e)) try {
2096
+ return ze(e, n, {
2252
2097
  id: J(),
2253
2098
  origin: F(window),
2254
2099
  type: "postrobot_message_ack",
@@ -2263,270 +2108,235 @@ var jt = { exports: {} }, zt = { exports: {} };
2263
2108
 
2264
2109
  ` + de(s));
2265
2110
  }
2266
- }), P.try(function() {
2267
- if (!a)
2268
- throw new Error("No handler found for post message: " + t.name + " from " + n + " in " + window.location.protocol + "//" + window.location.host + window.location.pathname);
2269
- return a.handler({
2270
- source: e,
2271
- origin: n,
2272
- data: t.data
2111
+ }), P.try(function() {
2112
+ if (!a) throw new Error("No handler found for post message: " + t.name + " from " + n + " in " + window.location.protocol + "//" + window.location.host + window.location.pathname);
2113
+ return a.handler({
2114
+ source: e,
2115
+ origin: n,
2116
+ data: t.data
2117
+ });
2118
+ }).then(function(s) {
2119
+ return u("success", s);
2120
+ }, function(s) {
2121
+ return u("error", null, s);
2122
+ })]).then(ee).catch(function(s) {
2123
+ if (a && a.handleError) return a.handleError(s);
2124
+ throw s;
2273
2125
  });
2274
- }).then(function(s) {
2275
- return u("success", s);
2276
- }, function(s) {
2277
- return u("error", null, s);
2278
- })]).then(te).catch(function(s) {
2279
- if (a && a.handleError)
2280
- return a.handleError(s);
2281
- throw s;
2282
- });
2283
- }
2284
- function Kt(e, n, t) {
2285
- if (!pt(t.hash)) {
2286
- var r = ht(t.hash);
2287
- if (!r)
2288
- throw new Error("No handler found for post message ack for message: " + t.name + " from " + n + " in " + window.location.protocol + "//" + window.location.host + window.location.pathname);
2289
- try {
2290
- if (!re(r.domain, n))
2291
- throw new Error("Ack origin " + n + " does not match domain " + r.domain.toString());
2292
- if (e !== r.win)
2293
- throw new Error("Ack source does not match registered window");
2294
- } catch (o) {
2295
- r.promise.reject(o);
2296
- }
2297
- r.ack = !0;
2298
2126
  }
2299
- }
2300
- function Xt(e, n, t) {
2301
- if (!pt(t.hash)) {
2302
- var r = ht(t.hash);
2303
- if (!r)
2304
- throw new Error("No handler found for post message response for message: " + t.name + " from " + n + " in " + window.location.protocol + "//" + window.location.host + window.location.pathname);
2305
- if (!re(r.domain, n))
2306
- throw new Error("Response origin " + n + " does not match domain " + (o = r.domain, Array.isArray(o) ? "(" + o.join(" | ") + ")" : y(o) ? "RegExp(" + o.toString() + ")" : o.toString()));
2307
- var o;
2308
- if (e !== r.win)
2309
- throw new Error("Response source does not match registered window");
2310
- mt(t.hash), t.ack === "error" ? r.promise.reject(t.error) : t.ack === "success" && r.promise.resolve({
2311
- source: e,
2312
- origin: n,
2313
- data: t.data
2314
- });
2127
+ function en(e, n, t) {
2128
+ if (!wt(t.hash)) {
2129
+ var r = pt(t.hash);
2130
+ if (!r) throw new Error("No handler found for post message ack for message: " + t.name + " from " + n + " in " + window.location.protocol + "//" + window.location.host + window.location.pathname);
2131
+ try {
2132
+ if (!re(r.domain, n)) throw new Error("Ack origin " + n + " does not match domain " + r.domain.toString());
2133
+ if (e !== r.win) throw new Error("Ack source does not match registered window");
2134
+ } catch (o) {
2135
+ r.promise.reject(o);
2136
+ }
2137
+ r.ack = !0;
2138
+ }
2315
2139
  }
2316
- }
2317
- function wt(e, n) {
2318
- var t = n.on, r = n.send, o = z("receivedMessages");
2319
- try {
2320
- if (!window || window.closed || !e.source)
2321
- return;
2322
- } catch (w) {
2323
- return;
2140
+ function tn(e, n, t) {
2141
+ if (!wt(t.hash)) {
2142
+ var r = pt(t.hash);
2143
+ if (!r) throw new Error("No handler found for post message response for message: " + t.name + " from " + n + " in " + window.location.protocol + "//" + window.location.host + window.location.pathname);
2144
+ if (!re(r.domain, n)) throw new Error("Response origin " + n + " does not match domain " + (o = r.domain, Array.isArray(o) ? "(" + o.join(" | ") + ")" : y(o) ? "RegExp(" + o.toString() + ")" : o.toString()));
2145
+ var o;
2146
+ if (e !== r.win) throw new Error("Response source does not match registered window");
2147
+ vt(t.hash), t.ack === "error" ? r.promise.reject(t.error) : t.ack === "success" && r.promise.resolve({
2148
+ source: e,
2149
+ origin: n,
2150
+ data: t.data
2151
+ });
2152
+ }
2324
2153
  }
2325
- var i = e.source, a = e.origin, l = function(w, m, p, g) {
2326
- var b = g.on, x = g.send, S;
2154
+ function yt(e, n) {
2155
+ var t = n.on, r = n.send, o = j("receivedMessages");
2327
2156
  try {
2328
- S = lt(m, p, w, {
2329
- on: b,
2330
- send: x
2331
- });
2332
- } catch (j) {
2157
+ if (!window || window.closed || !e.source) return;
2158
+ } catch (w) {
2333
2159
  return;
2334
2160
  }
2335
- if (S && typeof S == "object" && S !== null) {
2336
- var C = S.__post_robot_10_0_46__;
2337
- if (Array.isArray(C))
2338
- return C;
2339
- }
2340
- }(e.data, i, a, {
2341
- on: t,
2342
- send: r
2343
- });
2344
- if (l) {
2345
- at(i);
2346
- for (var u = 0; u < l.length; u++) {
2347
- var s = l[u];
2348
- if (o.has(s.id) || (o.set(s.id, !0), $(i) && !s.fireAndForget))
2349
- return;
2350
- s.origin.indexOf("file:") === 0 && (a = "file://");
2161
+ var i = e.source, a = e.origin, l = function(w, m, p, g) {
2162
+ var b = g.on, x = g.send, S;
2351
2163
  try {
2352
- s.type === "postrobot_message_request" ? Zt(i, a, s, {
2353
- on: t,
2354
- send: r
2355
- }) : s.type === "postrobot_message_response" ? Xt(i, a, s) : s.type === "postrobot_message_ack" && Kt(i, a, s);
2356
- } catch (w) {
2357
- setTimeout(function() {
2358
- throw w;
2359
- }, 0);
2164
+ S = mt(m, p, w, {
2165
+ on: b,
2166
+ send: x
2167
+ });
2168
+ } catch (z) {
2169
+ return;
2360
2170
  }
2361
- }
2362
- }
2363
- }
2364
- function K(e, n, t) {
2365
- if (!e)
2366
- throw new Error("Expected name");
2367
- if (typeof (n = n || {}) == "function" && (t = n, n = {}), !t)
2368
- throw new Error("Expected handler");
2369
- var r = function o(i, a) {
2370
- var l = i.name, u = i.win, s = i.domain, w = H("requestListeners");
2371
- if (!l || typeof l != "string")
2372
- throw new Error("Name required to add request listener");
2373
- if (u && u !== "*" && G.isProxyWindow(u)) {
2374
- var m = u.awaitWindow().then(function(M) {
2375
- return o({
2376
- name: l,
2377
- win: M,
2378
- domain: s
2379
- }, a);
2380
- });
2381
- return {
2382
- cancel: function() {
2383
- m.then(function(M) {
2384
- return M.cancel();
2385
- }, te);
2171
+ if (S && typeof S == "object" && S !== null) {
2172
+ var C = S.__post_robot_10_0_46__;
2173
+ if (Array.isArray(C)) return C;
2174
+ }
2175
+ }(e.data, i, a, {
2176
+ on: t,
2177
+ send: r
2178
+ });
2179
+ if (l) {
2180
+ ut(i);
2181
+ for (var u = 0; u < l.length; u++) {
2182
+ var s = l[u];
2183
+ if (o.has(s.id) || (o.set(s.id, !0), G(i) && !s.fireAndForget)) return;
2184
+ s.origin.indexOf("file:") === 0 && (a = "file://");
2185
+ try {
2186
+ s.type === "postrobot_message_request" ? Qt(i, a, s, {
2187
+ on: t,
2188
+ send: r
2189
+ }) : s.type === "postrobot_message_response" ? tn(i, a, s) : s.type === "postrobot_message_ack" && en(i, a, s);
2190
+ } catch (w) {
2191
+ setTimeout(function() {
2192
+ throw w;
2193
+ }, 0);
2386
2194
  }
2387
- };
2195
+ }
2388
2196
  }
2389
- var p = u;
2390
- if (Array.isArray(p)) {
2391
- for (var g = [], b = 0, x = p; b < x.length; b++)
2392
- g.push(o({
2197
+ }
2198
+ function ne(e, n, t) {
2199
+ if (!e) throw new Error("Expected name");
2200
+ if (typeof (n = n || {}) == "function" && (t = n, n = {}), !t) throw new Error("Expected handler");
2201
+ var r = function o(i, a) {
2202
+ var l = i.name, u = i.win, s = i.domain, w = H("requestListeners");
2203
+ if (!l || typeof l != "string") throw new Error("Name required to add request listener");
2204
+ if (u && u !== "*" && B.isProxyWindow(u)) {
2205
+ var m = u.awaitWindow().then(function(M) {
2206
+ return o({
2207
+ name: l,
2208
+ win: M,
2209
+ domain: s
2210
+ }, a);
2211
+ });
2212
+ return {
2213
+ cancel: function() {
2214
+ m.then(function(M) {
2215
+ return M.cancel();
2216
+ }, ee);
2217
+ }
2218
+ };
2219
+ }
2220
+ var p = u;
2221
+ if (Array.isArray(p)) {
2222
+ for (var g = [], b = 0, x = p; b < x.length; b++) g.push(o({
2393
2223
  name: l,
2394
2224
  domain: s,
2395
2225
  win: x[b]
2396
2226
  }, a));
2397
- return {
2398
- cancel: function() {
2399
- for (var M = 0; M < g.length; M++)
2400
- g[M].cancel();
2401
- }
2402
- };
2403
- }
2404
- if (Array.isArray(s)) {
2405
- for (var S = [], C = 0, j = s; C < j.length; C++)
2406
- S.push(o({
2227
+ return {
2228
+ cancel: function() {
2229
+ for (var M = 0; M < g.length; M++) g[M].cancel();
2230
+ }
2231
+ };
2232
+ }
2233
+ if (Array.isArray(s)) {
2234
+ for (var S = [], C = 0, z = s; C < z.length; C++) S.push(o({
2407
2235
  name: l,
2408
2236
  win: p,
2409
- domain: j[C]
2237
+ domain: z[C]
2410
2238
  }, a));
2411
- return {
2239
+ return {
2240
+ cancel: function() {
2241
+ for (var M = 0; M < S.length; M++) S[M].cancel();
2242
+ }
2243
+ };
2244
+ }
2245
+ var R = gt({
2246
+ name: l,
2247
+ win: p,
2248
+ domain: s
2249
+ });
2250
+ p && p !== "*" || (p = xe());
2251
+ var T = (s = s || "*").toString();
2252
+ if (R) throw p && s ? new Error("Request listener already exists for " + l + " on domain " + s.toString() + " for " + (p === xe() ? "wildcard" : "specified") + " window") : p ? new Error("Request listener already exists for " + l + " for " + (p === xe() ? "wildcard" : "specified") + " window") : s ? new Error("Request listener already exists for " + l + " on domain " + s.toString()) : new Error("Request listener already exists for " + l);
2253
+ var L = w.getOrSet(p, function() {
2254
+ return {};
2255
+ }), W = fe(L, l, function() {
2256
+ return {};
2257
+ }), O, V;
2258
+ return Re(s) ? (O = fe(W, "__domain_regex__", function() {
2259
+ return [];
2260
+ })).push(V = {
2261
+ regex: s,
2262
+ listener: a
2263
+ }) : W[T] = a, {
2412
2264
  cancel: function() {
2413
- for (var M = 0; M < S.length; M++)
2414
- S[M].cancel();
2265
+ delete W[T], V && (O.splice(O.indexOf(V, 1)), O.length || delete W.__domain_regex__), Object.keys(W).length || delete L[l], p && !Object.keys(L).length && w.del(p);
2415
2266
  }
2416
2267
  };
2417
- }
2418
- var O = vt({
2419
- name: l,
2420
- win: p,
2421
- domain: s
2268
+ }({
2269
+ name: e,
2270
+ win: n.window,
2271
+ domain: n.domain || "*"
2272
+ }, {
2273
+ handler: t || n.handler,
2274
+ handleError: n.errorHandler || function(o) {
2275
+ throw o;
2276
+ }
2422
2277
  });
2423
- p && p !== "*" || (p = xe());
2424
- var T = (s = s || "*").toString();
2425
- if (O)
2426
- throw p && s ? new Error("Request listener already exists for " + l + " on domain " + s.toString() + " for " + (p === xe() ? "wildcard" : "specified") + " window") : p ? new Error("Request listener already exists for " + l + " for " + (p === xe() ? "wildcard" : "specified") + " window") : s ? new Error("Request listener already exists for " + l + " on domain " + s.toString()) : new Error("Request listener already exists for " + l);
2427
- var L = w.getOrSet(p, function() {
2428
- return {};
2429
- }), W = fe(L, l, function() {
2430
- return {};
2431
- }), R, V;
2432
- return Te(s) ? (R = fe(W, "__domain_regex__", function() {
2433
- return [];
2434
- })).push(V = {
2435
- regex: s,
2436
- listener: a
2437
- }) : W[T] = a, {
2278
+ return {
2438
2279
  cancel: function() {
2439
- delete W[T], V && (R.splice(R.indexOf(V, 1)), R.length || delete W.__domain_regex__), Object.keys(W).length || delete L[l], p && !Object.keys(L).length && w.del(p);
2280
+ r.cancel();
2440
2281
  }
2441
2282
  };
2442
- }({
2443
- name: e,
2444
- win: n.window,
2445
- domain: n.domain || "*"
2446
- }, {
2447
- handler: t || n.handler,
2448
- handleError: n.errorHandler || function(o) {
2449
- throw o;
2450
- }
2451
- });
2452
- return {
2453
- cancel: function() {
2454
- r.cancel();
2455
- }
2456
- };
2457
- }
2458
- function Qt(e, n, t) {
2459
- typeof (n = n || {}) == "function" && (t = n, n = {});
2460
- var r = new P(), o;
2461
- return n.errorHandler = function(i) {
2462
- o.cancel(), r.reject(i);
2463
- }, o = K(e, n, function(i) {
2464
- if (o.cancel(), r.resolve(i), t)
2465
- return t(i);
2466
- }), r.cancel = o.cancel, r;
2467
- }
2468
- var X = function e(n, t, r, o) {
2469
- var i = (o = o || {}).domain || "*", a = o.timeout || -1, l = o.timeout || 5e3, u = o.fireAndForget || !1;
2470
- return G.toProxyWindow(n, {
2471
- send: e
2472
- }).awaitWindow().then(function(s) {
2473
- return P.try(function() {
2474
- if (function(w, m, p) {
2475
- if (!w)
2476
- throw new Error("Expected name");
2477
- if (p && typeof p != "string" && !Array.isArray(p) && !Te(p))
2478
- throw new TypeError("Can not send " + w + ". Expected domain " + JSON.stringify(p) + " to be a string, array, or regex");
2479
- if ($(m))
2480
- throw new Error("Can not send " + w + ". Target window is closed");
2481
- }(t, s, i), function(w, m) {
2482
- var p = Be(m);
2483
- if (p)
2484
- return p === w;
2485
- if (m === w || function(x) {
2486
- x === void 0 && (x = window);
2487
- try {
2488
- if (x.top)
2489
- return x.top;
2490
- } catch (O) {
2491
- }
2492
- if (k(x) === x)
2493
- return x;
2494
- try {
2495
- if (_e(window, x) && window.top)
2496
- return window.top;
2497
- } catch (O) {
2498
- }
2499
- try {
2500
- if (_e(x, window) && window.top)
2501
- return window.top;
2502
- } catch (O) {
2503
- }
2504
- for (var S = 0, C = function O(T) {
2505
- for (var L = [], W = 0, R = qe(T); W < R.length; W++) {
2506
- var V = R[W];
2507
- L.push(V);
2508
- for (var M = 0, he = O(V); M < he.length; M++)
2509
- L.push(he[M]);
2283
+ }
2284
+ function nn(e, n, t) {
2285
+ typeof (n = n || {}) == "function" && (t = n, n = {});
2286
+ var r = new P(), o;
2287
+ return n.errorHandler = function(i) {
2288
+ o.cancel(), r.reject(i);
2289
+ }, o = ne(e, n, function(i) {
2290
+ if (o.cancel(), r.resolve(i), t) return t(i);
2291
+ }), r.cancel = o.cancel, r;
2292
+ }
2293
+ var K = function e(n, t, r, o) {
2294
+ var i = (o = o || {}).domain || "*", a = o.timeout || -1, l = o.timeout || 5e3, u = o.fireAndForget || !1;
2295
+ return B.toProxyWindow(n, {
2296
+ send: e
2297
+ }).awaitWindow().then(function(s) {
2298
+ return P.try(function() {
2299
+ if (function(w, m, p) {
2300
+ if (!w) throw new Error("Expected name");
2301
+ if (typeof p != "string" && !Array.isArray(p) && !Re(p)) throw new TypeError("Can not send " + w + ". Expected domain " + JSON.stringify(p) + " to be a string, array, or regex");
2302
+ if (G(m)) throw new Error("Can not send " + w + ". Target window is closed");
2303
+ }(t, s, i), function(w, m) {
2304
+ var p = Ge(m);
2305
+ if (p) return p === w;
2306
+ if (m === w || function(x) {
2307
+ x === void 0 && (x = window);
2308
+ try {
2309
+ if (x.top) return x.top;
2310
+ } catch (R) {
2510
2311
  }
2511
- return L;
2512
- }(x); S < C.length; S++) {
2513
- var j = C[S];
2312
+ if (k(x) === x) return x;
2514
2313
  try {
2515
- if (j.top)
2516
- return j.top;
2517
- } catch (O) {
2314
+ if ($e(window, x) && window.top) return window.top;
2315
+ } catch (R) {
2518
2316
  }
2519
- if (k(j) === j)
2520
- return j;
2521
- }
2522
- }(m) === m)
2317
+ try {
2318
+ if ($e(x, window) && window.top) return window.top;
2319
+ } catch (R) {
2320
+ }
2321
+ for (var S = 0, C = function R(T) {
2322
+ for (var L = [], W = 0, O = Be(T); W < O.length; W++) {
2323
+ var V = O[W];
2324
+ L.push(V);
2325
+ for (var M = 0, he = R(V); M < he.length; M++) L.push(he[M]);
2326
+ }
2327
+ return L;
2328
+ }(x); S < C.length; S++) {
2329
+ var z = C[S];
2330
+ try {
2331
+ if (z.top) return z.top;
2332
+ } catch (R) {
2333
+ }
2334
+ if (k(z) === z) return z;
2335
+ }
2336
+ }(m) === m) return !1;
2337
+ for (var g = 0, b = Be(w); g < b.length; g++) if (b[g] === m) return !0;
2523
2338
  return !1;
2524
- for (var g = 0, b = qe(w); g < b.length; g++)
2525
- if (b[g] === m)
2526
- return !0;
2527
- return !1;
2528
- }(window, s))
2529
- return function(w, m, p) {
2339
+ }(window, s)) return function(w, m, p) {
2530
2340
  m === void 0 && (m = 5e3), p === void 0 && (p = "Window");
2531
2341
  var g = function(b) {
2532
2342
  return H("helloPromises").getOrSet(b, function() {
@@ -2535,214 +2345,211 @@ var jt = { exports: {} }, zt = { exports: {} };
2535
2345
  }(w);
2536
2346
  return m !== -1 && (g = g.timeout(m, new Error(p + " did not load after " + m + "ms"))), g;
2537
2347
  }(s, l);
2538
- }).then(function(w) {
2539
- return function(m, p, g, b) {
2540
- var x = b.send;
2541
- return P.try(function() {
2542
- return typeof p == "string" ? p : P.try(function() {
2543
- return g || Oe(m, {
2544
- send: x
2348
+ }).then(function(w) {
2349
+ return function(m, p, g, b) {
2350
+ var x = b.send;
2351
+ return P.try(function() {
2352
+ return typeof p == "string" ? p : P.try(function() {
2353
+ return g || Oe(m, {
2354
+ send: x
2355
+ }).then(function(S) {
2356
+ return S.domain;
2357
+ });
2545
2358
  }).then(function(S) {
2546
- return S.domain;
2359
+ if (!re(p, p)) throw new Error("Domain " + et(p) + " does not match " + et(p));
2360
+ return S;
2547
2361
  });
2548
- }).then(function(S) {
2549
- if (!re(p, p))
2550
- throw new Error("Domain " + Xe(p) + " does not match " + Xe(p));
2551
- return S;
2552
2362
  });
2363
+ }(s, i, (w === void 0 ? {} : w).domain, {
2364
+ send: e
2553
2365
  });
2554
- }(s, i, (w === void 0 ? {} : w).domain, {
2555
- send: e
2556
- });
2557
- }).then(function(w) {
2558
- var m = w, p = t === "postrobot_method" && r && typeof r.name == "string" ? r.name + "()" : t, g = new P(), b = t + "_" + J();
2559
- if (!u) {
2560
- var x = {
2561
- name: t,
2562
- win: s,
2563
- domain: m,
2564
- promise: g
2565
- };
2566
- (function(W, R) {
2567
- z("responseListeners").set(W, R);
2568
- })(b, x);
2569
- var S = H("requestPromises").getOrSet(s, function() {
2570
- return [];
2571
- });
2572
- S.push(g), g.catch(function() {
2573
- (function(W) {
2574
- z("erroredResponseListeners").set(W, !0);
2575
- })(b), mt(b);
2576
- });
2577
- var C = function(W) {
2578
- return H("knownWindows").get(W, !1);
2579
- }(s) ? 1e4 : 2e3, j = a, O = C, T = j, L = function(W, R) {
2580
- var V;
2581
- return function M() {
2582
- V = setTimeout(function() {
2583
- (function() {
2584
- if ($(s))
2585
- return g.reject(new Error("Window closed for " + t + " before " + (x.ack ? "response" : "ack")));
2586
- if (x.cancelled)
2587
- return g.reject(new Error("Response listener was cancelled for " + t));
2588
- O = Math.max(O - 500, 0), T !== -1 && (T = Math.max(T - 500, 0)), x.ack || O !== 0 ? T === 0 && g.reject(new Error("No response for postMessage " + p + " in " + F() + " in " + j + "ms")) : g.reject(new Error("No ack for postMessage " + p + " in " + F() + " in " + C + "ms"));
2589
- })(), M();
2590
- }, 500);
2591
- }(), {
2592
- cancel: function() {
2593
- clearTimeout(V);
2594
- }
2366
+ }).then(function(w) {
2367
+ var m = w, p = t === "postrobot_method" && r && typeof r.name == "string" ? r.name + "()" : t, g = new P(), b = t + "_" + J();
2368
+ if (!u) {
2369
+ var x = {
2370
+ name: t,
2371
+ win: s,
2372
+ domain: m,
2373
+ promise: g
2595
2374
  };
2596
- }();
2597
- g.finally(function() {
2598
- L.cancel(), S.splice(S.indexOf(g, 1));
2599
- }).catch(te);
2600
- }
2601
- return Me(s, m, {
2602
- id: J(),
2603
- origin: F(window),
2604
- type: "postrobot_message_request",
2605
- hash: b,
2606
- name: t,
2607
- data: r,
2608
- fireAndForget: u
2609
- }, {
2610
- on: K,
2611
- send: e
2612
- }).then(function() {
2613
- return u ? g.resolve() : g;
2614
- }, function(W) {
2615
- throw new Error("Send request message failed for " + p + " in " + F() + `
2375
+ (function(W, O) {
2376
+ j("responseListeners").set(W, O);
2377
+ })(b, x);
2378
+ var S = H("requestPromises").getOrSet(s, function() {
2379
+ return [];
2380
+ });
2381
+ S.push(g), g.catch(function() {
2382
+ (function(W) {
2383
+ j("erroredResponseListeners").set(W, !0);
2384
+ })(b), vt(b);
2385
+ });
2386
+ var C = function(W) {
2387
+ return H("knownWindows").get(W, !1);
2388
+ }(s) ? 1e4 : 2e3, z = a, R = C, T = z, L = function(W, O) {
2389
+ var V;
2390
+ return function M() {
2391
+ V = setTimeout(function() {
2392
+ (function() {
2393
+ if (G(s)) return g.reject(new Error("Window closed for " + t + " before " + (x.ack ? "response" : "ack")));
2394
+ if (x.cancelled) return g.reject(new Error("Response listener was cancelled for " + t));
2395
+ R = Math.max(R - 500, 0), T !== -1 && (T = Math.max(T - 500, 0)), x.ack || R !== 0 ? T === 0 && g.reject(new Error("No response for postMessage " + p + " in " + F() + " in " + z + "ms")) : g.reject(new Error("No ack for postMessage " + p + " in " + F() + " in " + C + "ms"));
2396
+ })(), M();
2397
+ }, 500);
2398
+ }(), {
2399
+ cancel: function() {
2400
+ clearTimeout(V);
2401
+ }
2402
+ };
2403
+ }();
2404
+ g.finally(function() {
2405
+ L.cancel(), S.splice(S.indexOf(g, 1));
2406
+ }).catch(ee);
2407
+ }
2408
+ return ze(s, m, {
2409
+ id: J(),
2410
+ origin: F(window),
2411
+ type: "postrobot_message_request",
2412
+ hash: b,
2413
+ name: t,
2414
+ data: r,
2415
+ fireAndForget: u
2416
+ }, {
2417
+ on: ne,
2418
+ send: e
2419
+ }).then(function() {
2420
+ return u ? g.resolve() : g;
2421
+ }, function(W) {
2422
+ throw new Error("Send request message failed for " + p + " in " + F() + `
2616
2423
 
2617
2424
  ` + de(W));
2425
+ });
2618
2426
  });
2619
2427
  });
2620
- });
2621
- };
2622
- function en(e, n, t) {
2623
- return ft(e, n, t, {
2624
- on: K,
2625
- send: X
2626
- });
2627
- }
2628
- function tn(e, n, t) {
2629
- return lt(e, n, t, {
2630
- on: K,
2631
- send: X
2632
- });
2633
- }
2634
- function nn(e) {
2635
- return new G({
2636
- send: X,
2637
- win: e
2638
- });
2639
- }
2640
- function rn(e) {
2641
- return G.toProxyWindow(e, {
2642
- send: X
2643
- });
2644
- }
2645
- function gt() {
2646
- le().initialized || (le().initialized = !0, n = (e = {
2647
- on: K,
2648
- send: X
2649
- }).on, t = e.send, (r = le()).receiveMessage = r.receiveMessage || function(o) {
2650
- return wt(o, {
2651
- on: n,
2652
- send: t
2428
+ };
2429
+ function rn(e, n, t) {
2430
+ return ht(e, n, t, {
2431
+ on: ne,
2432
+ send: K
2653
2433
  });
2654
- }, function(o) {
2655
- var i = o.on, a = o.send;
2656
- z().getOrSet("postMessageListener", function() {
2657
- return function(l, u, s) {
2658
- return l.addEventListener("message", s), {
2659
- cancel: function() {
2660
- l.removeEventListener("message", s);
2661
- }
2662
- };
2663
- }(window, 0, function(l) {
2664
- (function(u, s) {
2665
- var w = s.on, m = s.send;
2666
- P.try(function() {
2667
- var p = u.source || u.sourceElement, g = u.origin || u.originalEvent && u.originalEvent.origin, b = u.data;
2668
- if (g === "null" && (g = "file://"), p) {
2669
- if (!g)
2670
- throw new Error("Post message did not have origin domain");
2671
- wt({
2672
- source: p,
2673
- origin: g,
2674
- data: b
2675
- }, {
2676
- on: w,
2677
- send: m
2678
- });
2434
+ }
2435
+ function on(e, n, t) {
2436
+ return mt(e, n, t, {
2437
+ send: K
2438
+ });
2439
+ }
2440
+ function an(e) {
2441
+ return new B({
2442
+ send: K,
2443
+ win: e
2444
+ });
2445
+ }
2446
+ function sn(e) {
2447
+ return B.toProxyWindow(e, {
2448
+ send: K
2449
+ });
2450
+ }
2451
+ function Et() {
2452
+ le().initialized || (le().initialized = !0, n = (e = {
2453
+ on: ne,
2454
+ send: K
2455
+ }).on, t = e.send, (r = le()).receiveMessage = r.receiveMessage || function(o) {
2456
+ return yt(o, {
2457
+ on: n,
2458
+ send: t
2459
+ });
2460
+ }, function(o) {
2461
+ var i = o.on, a = o.send;
2462
+ j().getOrSet("postMessageListener", function() {
2463
+ return function(l, u, s) {
2464
+ return l.addEventListener("message", s), {
2465
+ cancel: function() {
2466
+ l.removeEventListener("message", s);
2679
2467
  }
2468
+ };
2469
+ }(window, 0, function(l) {
2470
+ (function(u, s) {
2471
+ var w = s.on, m = s.send;
2472
+ P.try(function() {
2473
+ var p = u.source || u.sourceElement, g = u.origin || u.originalEvent && u.originalEvent.origin, b = u.data;
2474
+ if (g === "null" && (g = "file://"), p) {
2475
+ if (!g) throw new Error("Post message did not have origin domain");
2476
+ yt({
2477
+ source: p,
2478
+ origin: g,
2479
+ data: b
2480
+ }, {
2481
+ on: w,
2482
+ send: m
2483
+ });
2484
+ }
2485
+ });
2486
+ })(l, {
2487
+ on: i,
2488
+ send: a
2680
2489
  });
2681
- })(l, {
2682
- on: i,
2683
- send: a
2684
2490
  });
2685
2491
  });
2686
- });
2687
- }({
2688
- on: K,
2689
- send: X
2690
- }), function(o) {
2691
- var i = o.on, a = o.send;
2692
- z("builtinListeners").getOrSet("helloListener", function() {
2693
- var l = i("postrobot_hello", {
2694
- domain: "*"
2695
- }, function(s) {
2696
- return ot(s.source, {
2697
- domain: s.origin
2698
- }), {
2699
- instanceID: rt()
2700
- };
2701
- }), u = Be();
2702
- return u && Oe(u, {
2703
- send: a
2704
- }).catch(function(s) {
2705
- }), l;
2706
- });
2707
- }({
2708
- on: K,
2709
- send: X
2710
- }));
2711
- var e, n, t, r;
2712
- }
2713
- function on() {
2714
- (function() {
2715
- for (var n = z("responseListeners"), t = 0, r = n.keys(); t < r.length; t++) {
2716
- var o = r[t], i = n.get(o);
2717
- i && (i.cancelled = !0), n.del(o);
2718
- }
2719
- })(), (e = z().get("postMessageListener")) && e.cancel();
2720
- var e;
2721
- delete window.__post_robot_10_0_46__;
2722
- }
2723
- var an = !0;
2724
- function sn(e) {
2725
- for (var n = 0, t = H("requestPromises").get(e, []); n < t.length; n++)
2726
- t[n].reject(new Error("Window " + ($(e) ? "closed" : "cleaned up") + " before response")).catch(te);
2727
- }
2728
- gt();
2729
- }]);
2730
- });
2731
- })(zt);
2732
- var Xn = zt.exports;
2733
- (function(d) {
2734
- d.exports = Xn, d.exports.default = d.exports;
2735
- })(jt);
2736
- var Lt = jt.exports;
2737
- const Qn = /* @__PURE__ */ Kn(Lt), He = /* @__PURE__ */ pn({
2492
+ }({
2493
+ on: ne,
2494
+ send: K
2495
+ }), function(o) {
2496
+ var i = o.on, a = o.send;
2497
+ j("builtinListeners").getOrSet("helloListener", function() {
2498
+ var l = i("postrobot_hello", {
2499
+ domain: "*"
2500
+ }, function(s) {
2501
+ return at(s.source, {
2502
+ domain: s.origin
2503
+ }), {
2504
+ instanceID: it()
2505
+ };
2506
+ }), u = Ge();
2507
+ return u && Oe(u, {
2508
+ send: a
2509
+ }).catch(function(s) {
2510
+ }), l;
2511
+ });
2512
+ }({
2513
+ on: ne,
2514
+ send: K
2515
+ }));
2516
+ var e, n, t, r;
2517
+ }
2518
+ function un() {
2519
+ (function() {
2520
+ for (var n = j("responseListeners"), t = 0, r = n.keys(); t < r.length; t++) {
2521
+ var o = r[t], i = n.get(o);
2522
+ i && (i.cancelled = !0), n.del(o);
2523
+ }
2524
+ })(), (e = j().get("postMessageListener")) && e.cancel();
2525
+ var e;
2526
+ delete window.__post_robot_10_0_46__;
2527
+ }
2528
+ var cn = !0;
2529
+ function dn(e) {
2530
+ for (var n = 0, t = H("requestPromises").get(e, []); n < t.length; n++) t[n].reject(new Error("Window " + (G(e) ? "closed" : "cleaned up") + " before response")).catch(ee);
2531
+ }
2532
+ Et();
2533
+ }]);
2534
+ });
2535
+ }(Se)), Se.exports;
2536
+ }
2537
+ var Mt;
2538
+ function nr() {
2539
+ return Mt || (Mt = 1, function(c) {
2540
+ c.exports = tr(), c.exports.default = c.exports;
2541
+ }(ke)), ke.exports;
2542
+ }
2543
+ var Ft = nr();
2544
+ const rr = /* @__PURE__ */ Qn(Ft), qe = /* @__PURE__ */ gn({
2738
2545
  __proto__: null,
2739
- default: Qn
2740
- }, [Lt]);
2546
+ default: rr
2547
+ }, [Ft]);
2741
2548
  export {
2742
- Dt as ConsentBox,
2743
- tr as PrivacyCenterBox,
2744
- nr as SoyioTypes,
2745
- rr as SoyioWidget,
2746
- ke as _TooltipManager,
2747
- rr as default
2549
+ kt as ConsentBox,
2550
+ ir as PrivacyCenterBox,
2551
+ ar as SoyioTypes,
2552
+ sr as SoyioWidget,
2553
+ Fe as _TooltipManager,
2554
+ sr as default
2748
2555
  };