@soyio/soyio-widget 2.13.6 → 2.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -365,6 +365,67 @@ The `onEvent` follows the following format:
365
365
 
366
366
  We don't support hiding the mandatory consent, and we strongly recommend using `notice` so the user doesn't have to give the consent again and knows what they have already given consent to.
367
367
 
368
+ ## Privacy Center
369
+
370
+ The `PrivacyCenterBox` lets you embed the Privacy Center inside your page. You can scope which features to show and which data subjects are relevant to your interface. For more info check [our docs](https://docs.soyio.id/).
371
+
372
+ ```html
373
+ <!-- Add a container div where the Privacy Center will be mounted -->
374
+ <div id="privacy-center-box"></div>
375
+
376
+ <script>
377
+ import { PrivacyCenterBox } from "@soyio/soyio-widget";
378
+
379
+ // Configuration for the Privacy Center
380
+ const privacyCenterOptions = {
381
+ // Choose ONE of the following authentication modes:
382
+ // 1) Public mode
383
+ companyId: "<company id>", // e.g. com_...
384
+
385
+ // 2) Authenticated mode
386
+ // sessionToken: "<session token>",
387
+
388
+ // Feature flags (optional)
389
+ enabledFeatures: ["DataSubjectRequest", "ConsentManagement"],
390
+
391
+ // Limit consent view to specific data subjects (optional)
392
+ dataSubjects: ["customer", "employee"],
393
+
394
+ // Common options
395
+ onEvent: (event) => console.log(event),
396
+ onReady: () => console.log("PrivacyCenterBox is ready"), // Optional
397
+ isSandbox: true, // Optional
398
+ appearance: {}, // Optional
399
+ };
400
+
401
+ // Wait for DOM to be fully loaded
402
+ document.addEventListener("DOMContentLoaded", () => {
403
+ const privacyCenter = new PrivacyCenterBox(privacyCenterOptions);
404
+ privacyCenter.mount("#privacy-center-box");
405
+ });
406
+ </script>
407
+ ```
408
+
409
+ ### Attribute Descriptions
410
+
411
+ - `sessionToken`: Use this to authenticate a session directly.
412
+ - `companyId`: The company identifier. Must start with `com_`. Use this when Privacy Center is mounted in a non authenticated environment.
413
+ - `enabledFeatures`: Optional array of features to show. Supported values: `"DataSubjectRequest"`, `"ConsentManagement"`.
414
+ - `dataSubjects`: Optional array of data subject categories. When present, the consent management view only shows consent for the specified categories. Supported values include: `"anonymous_user"`, `"citizen_voter"`, `"commuter"`, `"consultant"`, `"customer"`, `"employee"`, `"job_applicant"`, `"next_of_kin"`, `"passenger"`, `"patient"`, `"prospect"`, `"shareholder"`, `"supplier_vendor"`, `"trainee"`, `"visitor"`.
415
+ - `isSandbox`: Whether to use the sandbox environment. Defaults to `false`.
416
+ - `appearance`: Customize the iframe appearance. See Appearance section below.
417
+ - `onEvent`: Callback that receives events from the iframe.
418
+ - `onReady`: Optional callback fired when the iframe becomes ready.
419
+
420
+ Note:
421
+ - When `sessionToken` is provided, do not pass `companyId`.
422
+
423
+ ### Privacy Center Events
424
+
425
+ - **`REQUEST_SUBMITTED`**: This event occurs when a user successfully submits a Data Subject Request. The event object includes:
426
+ - `eventName`: The name of the event, in this case, `'REQUEST_SUBMITTED'`.
427
+ - `kind`: The kind of the Data Subject Request submitted. Supported values are: `access`, `opposition`, `rectification`, `suppression` and `portability`
428
+
368
429
  # Appearance
369
430
 
370
431
  Customize the look and feel of Soyio UI components by passing an `appearance` object to the configuration. The appearance object supports themes, CSS variables, and CSS rules for granular control over the styling.
package/dist/index.d.ts CHANGED
@@ -140,6 +140,8 @@ declare type CSSProperties = {
140
140
  width?: string;
141
141
  };
142
142
 
143
+ declare type DataSubject = 'anonymous_user' | 'citizen_voter' | 'commuter' | 'consultant' | 'customer' | 'employee' | 'job_applicant' | 'next_of_kin' | 'passenger' | 'patient' | 'prospect' | 'shareholder' | 'supplier_vendor' | 'trainee' | 'visitor';
144
+
143
145
  declare type DisclosureRequestConfig = {
144
146
  request: 'disclosure';
145
147
  configProps: DisclosureRequestProps;
@@ -210,23 +212,18 @@ export declare class PrivacyCenterBox extends BaseIframeBox<PrivacyCenterConfig>
210
212
  iframeUrl(): string;
211
213
  }
212
214
 
213
- declare type PrivacyCenterConfig = PrivacyCenterConfigWithSessionToken | PrivacyCenterConfigWithoutSessionToken;
214
-
215
- declare type PrivacyCenterConfigWithoutSessionToken = BaseConfig & {
216
- sessionToken?: never;
215
+ declare type PrivacyCenterConfig = BaseConfig & {
217
216
  enabledFeatures?: PrivacyManagerFeature[];
217
+ dataSubjects?: DataSubject[];
218
+ } & ({
218
219
  companyId: `com_${string}`;
219
- subjectId?: `ent_${string}`;
220
- };
221
-
222
- declare type PrivacyCenterConfigWithSessionToken = BaseConfig & {
220
+ sessionToken?: never;
221
+ } | {
223
222
  sessionToken: string;
224
- enabledFeatures?: PrivacyManagerFeature[];
225
223
  companyId?: never;
226
- subjectId?: never;
227
- };
224
+ });
228
225
 
229
- declare type PrivacyManagerFeature = 'DataSubjectRequest' | 'ConsentManagement';
226
+ declare type PrivacyManagerFeature = 'DataSubjectRequest' | 'ConsentManagement' | 'RequestTracking';
230
227
 
231
228
  declare type Request_2 = 'disclosure' | 'signature' | 'authentication';
232
229
 
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
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) => {
2
+ var St = Object.getOwnPropertySymbols, ln = Object.getPrototypeOf, hn = Object.prototype.hasOwnProperty, mn = Object.prototype.propertyIsEnumerable, pn = Reflect.get;
3
+ var xt = (c) => {
4
4
  throw TypeError(c);
5
5
  };
6
6
  var vn = (c, d, h) => d in c ? fn(c, d, { enumerable: !0, configurable: !0, writable: !0, value: h }) : c[d] = h;
@@ -8,30 +8,30 @@ var bt = (c, d) => {
8
8
  var h = {};
9
9
  for (var f in c)
10
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))
11
+ if (c != null && St)
12
+ for (var f of St(c))
13
13
  d.indexOf(f) < 0 && mn.call(c, f) && (h[f] = c[f]);
14
14
  return h;
15
15
  };
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);
16
+ var N = (c, d, h) => vn(c, typeof d != "symbol" ? d + "" : d, h), wn = (c, d, h) => d.has(c) || xt("Cannot " + h);
17
+ var It = (c, d, h) => d.has(c) ? xt("Cannot add the same private member more than once") : d instanceof WeakSet ? d.add(c) : d.set(c, h);
18
18
  var Wt = (c, d, h) => (wn(c, d, "access private method"), h);
19
19
  var Pt = (c, d, h) => pn(ln(c), h, d);
20
20
  var _ = (c, d, h) => new Promise((f, v) => {
21
21
  var y = (A) => {
22
22
  try {
23
- I(h.next(A));
23
+ S(h.next(A));
24
24
  } catch (D) {
25
25
  v(D);
26
26
  }
27
27
  }, E = (A) => {
28
28
  try {
29
- I(h.throw(A));
29
+ S(h.throw(A));
30
30
  } catch (D) {
31
31
  v(D);
32
32
  }
33
- }, I = (A) => A.done ? f(A.value) : Promise.resolve(A.value).then(y, E);
34
- I((h = h.apply(c, d)).next());
33
+ }, S = (A) => A.done ? f(A.value) : Promise.resolve(A.value).then(y, E);
34
+ S((h = h.apply(c, d)).next());
35
35
  });
36
36
  function gn(c, d) {
37
37
  for (var h = 0; h < d.length; h++) {
@@ -93,25 +93,25 @@ class Fe {
93
93
  });
94
94
  }
95
95
  calculateOptimalPlacement(d, h) {
96
- const f = this.tooltipElement.offsetWidth, v = this.tooltipElement.offsetHeight, { innerWidth: y, innerHeight: E } = window, I = 4, A = {
96
+ const f = this.tooltipElement.offsetWidth, v = this.tooltipElement.offsetHeight, { innerWidth: y, innerHeight: E } = window, S = 4, A = {
97
97
  top: {
98
- top: h - v - I,
98
+ top: h - v - S,
99
99
  left: d - f / 2,
100
100
  placement: "top"
101
101
  },
102
102
  bottom: {
103
- top: h + I,
103
+ top: h + S,
104
104
  left: d - f / 2,
105
105
  placement: "bottom"
106
106
  },
107
107
  right: {
108
108
  top: h - v / 2,
109
- left: d + I,
109
+ left: d + S,
110
110
  placement: "right"
111
111
  },
112
112
  left: {
113
113
  top: h - v / 2,
114
- left: d - f - I,
114
+ left: d - f - S,
115
115
  placement: "left"
116
116
  }
117
117
  };
@@ -119,7 +119,7 @@ class Fe {
119
119
  if (Fe.fitsInViewport(k, f, v, y, E))
120
120
  return k;
121
121
  const D = A.top;
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;
122
+ return D.left = Math.max(S, Math.min(D.left, y - f - S)), D.top = Math.max(S, Math.min(D.top, E - v - S)), D;
123
123
  }
124
124
  static fitsInViewport(d, h, f, v, y) {
125
125
  return d.top >= 0 && d.left >= 0 && d.top + f <= y && d.left + h <= v;
@@ -147,7 +147,7 @@ function yn(c, d, h) {
147
147
  }
148
148
  });
149
149
  }
150
- const En = "IFRAME_READY", xn = "IFRAME_HEIGHT_CHANGE", Sn = "TOOLTIP_STATE_CHANGE", bn = "INFO_EVENT", In = "CONSENT_STATE_CHANGE", U = {
150
+ const En = "IFRAME_READY", Sn = "IFRAME_HEIGHT_CHANGE", xn = "TOOLTIP_STATE_CHANGE", bn = "INFO_EVENT", In = "CONSENT_STATE_CHANGE", U = {
151
151
  // BASE
152
152
  onHeightChange: {},
153
153
  onIframeReady: {},
@@ -160,13 +160,13 @@ let Tt, Rt, Ot, At, Nt;
160
160
  function Wn() {
161
161
  return _(this, null, function* () {
162
162
  const c = yield Promise.resolve().then(() => qe);
163
- Tt || Rt || Ot || At || Nt || (Tt = c.on(xn, (d) => _(null, null, function* () {
163
+ Tt || Rt || Ot || At || Nt || (Tt = c.on(Sn, (d) => _(null, null, function* () {
164
164
  const h = d.data, f = U.onHeightChange[h.identifier];
165
165
  return f && f(h.height), Promise.resolve();
166
166
  })), Rt = c.on(En, (d) => _(null, null, function* () {
167
167
  const h = d.data, f = U.onIframeReady[h.identifier];
168
168
  return f && f(), Promise.resolve();
169
- })), Ot = c.on(Sn, (d) => _(null, null, function* () {
169
+ })), Ot = c.on(xn, (d) => _(null, null, function* () {
170
170
  const h = d.data, f = U.onTooltipChange[h.identifier];
171
171
  return f && f(h), Promise.resolve();
172
172
  })), At = c.on(In, (d) => _(null, null, function* () {
@@ -178,7 +178,7 @@ function Wn() {
178
178
  })));
179
179
  });
180
180
  }
181
- function zt(c, d) {
181
+ function jt(c, d) {
182
182
  const {
183
183
  onHeightChange: h,
184
184
  onIframeReady: f,
@@ -228,7 +228,7 @@ function Rn(c, d, h) {
228
228
  function On() {
229
229
  return Math.random().toString(36).substring(2, 10);
230
230
  }
231
- const jt = "https://app.soyio.id", Lt = "https://sandbox.soyio.id", An = "https://privacy.soyio.id", Nn = "https://privacy-sandbox.soyio.id", Dn = [
231
+ const zt = "https://app.soyio.id", Lt = "https://sandbox.soyio.id", An = "https://privacy.soyio.id", Nn = "https://privacy-sandbox.soyio.id", Dn = [
232
232
  "DISCLOSURE_REQUEST_SUCCESSFUL",
233
233
  "IDENTITY_REGISTERED",
234
234
  "IDENTITY_SIGNATURE",
@@ -236,7 +236,7 @@ const jt = "https://app.soyio.id", Lt = "https://sandbox.soyio.id", An = "https:
236
236
  "DENIED_CAMERA_PERMISSION",
237
237
  "REJECTED_SIGNATURE",
238
238
  "CLOSE_POPUP"
239
- ], Mn = "WIDGET_CLOSED", zn = 420, jn = 720, Ln = 500, kn = {
239
+ ], Mn = "WIDGET_CLOSED", jn = 420, zn = 720, Ln = 500, kn = {
240
240
  minWidth: "375px"
241
241
  }, Un = {
242
242
  minWidth: "0px"
@@ -276,8 +276,8 @@ class We {
276
276
  }
277
277
  handleTooltipChange(d) {
278
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;
280
- y ? this.tooltipManager.show(f, E, I) : this.tooltipManager.hide();
279
+ const h = this.iframe.getBoundingClientRect(), { text: f, coordinates: v, isVisible: y } = d, E = v.x + h.left, S = v.y + h.top;
280
+ y ? this.tooltipManager.show(f, E, S) : this.tooltipManager.hide();
281
281
  }
282
282
  setupListeners() {
283
283
  return _(this, null, function* () {
@@ -288,7 +288,7 @@ class We {
288
288
  onTooltipChange: this.handleTooltipChange.bind(this),
289
289
  onInfo: this.options.onEvent.bind(this)
290
290
  };
291
- zt(this.uniqueIdentifier, d);
291
+ jt(this.uniqueIdentifier, d);
292
292
  });
293
293
  }
294
294
  mount(d) {
@@ -369,8 +369,8 @@ class Hn {
369
369
  margin-left: auto;
370
370
  margin-right: 3px;
371
371
  `;
372
- const I = document.createElement("div");
373
- I.style.cssText = `
372
+ const S = document.createElement("div");
373
+ S.style.cssText = `
374
374
  display: flex;
375
375
  align-items: center;
376
376
  gap: 1rem;
@@ -419,7 +419,7 @@ class Hn {
419
419
  }
420
420
  `, document.head.appendChild(Z);
421
421
  }
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);
422
+ f.appendChild(v), f.appendChild(y), f.appendChild(E), D.appendChild(k), D.appendChild(oe), S.appendChild(A), S.appendChild(D), h.appendChild(f), h.appendChild(S), this.element.appendChild(h);
423
423
  }
424
424
  cleanupExistingSkeleton() {
425
425
  const d = document.getElementById(this.identifier);
@@ -432,7 +432,7 @@ class Hn {
432
432
  this.element.style.opacity = "0", setTimeout(() => this.element.remove(), 300);
433
433
  }
434
434
  }
435
- const He = "2.13.6";
435
+ const He = "2.14.1";
436
436
  function _n(c) {
437
437
  var E;
438
438
  const d = [
@@ -441,9 +441,9 @@ function _n(c) {
441
441
  "context",
442
442
  "optionalReconsentBehavior",
443
443
  "mandatoryReconsentBehavior"
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]);
444
+ ], h = (E = c.isSandbox) != null ? E : !1, f = c.developmentUrl || (h ? Lt : zt), v = new URLSearchParams();
445
+ v.set("sdkVersion", He), d.forEach((S) => {
446
+ c[S] && v.set(S, c[S]);
447
447
  });
448
448
  const y = v.toString();
449
449
  return `${f}/embed/consents/${c.consentTemplateId}${y ? `?${y}` : ""}`;
@@ -475,7 +475,7 @@ class kt extends We {
475
475
  }
476
476
  setupListeners() {
477
477
  return _(this, null, function* () {
478
- yield Pt(kt.prototype, this, "setupListeners").call(this), zt(this.uniqueIdentifier, {
478
+ yield Pt(kt.prototype, this, "setupListeners").call(this), jt(this.uniqueIdentifier, {
479
479
  onStateChange: this.handleStateChange.bind(this)
480
480
  });
481
481
  });
@@ -485,9 +485,9 @@ class kt extends We {
485
485
  }
486
486
  }
487
487
  function qn(c) {
488
- var y, E;
488
+ var y, E, S;
489
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(","));
490
+ f.set("sdkVersion", He), c.sessionToken ? f.set("sessionToken", c.sessionToken) : c.companyId && f.set("companyId", c.companyId), (E = c.enabledFeatures) != null && E.length && f.set("enabledFeatures", c.enabledFeatures.join(",")), (S = c.dataSubjects) != null && S.length && f.set("dataSubjects", c.dataSubjects.join(","));
491
491
  const v = f.toString();
492
492
  return `${h}${v ? `?${v}` : ""}`;
493
493
  }
@@ -514,7 +514,7 @@ function Bn(c) {
514
514
  }
515
515
  function Gn(c) {
516
516
  var y;
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);
517
+ const d = (y = c.isSandbox) != null ? y : !1, h = c.developmentUrl || (d ? Lt : zt), f = Object.entries(c.configProps).filter(([E, S]) => S || E === "disclosureRequestId").map(([E, S]) => `${E}=${encodeURIComponent(S)}`).join("&"), v = Bn(c);
518
518
  return `${h}/${v}?sdk=web&sdkVersion=${He}&${f}`;
519
519
  }
520
520
  let Y = null, Le = null;
@@ -530,7 +530,7 @@ function Vn() {
530
530
  }, Ln);
531
531
  }
532
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;
533
+ const d = Gn(c), h = jn, f = zn, 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, S = window.innerHeight || document.documentElement.clientHeight || window.screen.height, A = E / window.screen.availWidth, D = (E - h) / 2 / A + v, k = (S - f) / 2 / A + y;
534
534
  document.body.style.filter = "blur(5px)", document.body.addEventListener("click", Ue), Y = window.open(
535
535
  d,
536
536
  "Soyio",
@@ -575,7 +575,7 @@ Ie = new WeakSet(), Ut = function(d) {
575
575
  function Qn(c) {
576
576
  return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c;
577
577
  }
578
- var ke = { exports: {} }, Se = { exports: {} }, er = Se.exports, Dt;
578
+ var ke = { exports: {} }, xe = { exports: {} }, er = xe.exports, Dt;
579
579
  function tr() {
580
580
  return Dt || (Dt = 1, function(c, d) {
581
581
  (function(h, f) {
@@ -592,10 +592,10 @@ function tr() {
592
592
  };
593
593
  return h[y].call(E.exports, E, E.exports, v), E.l = !0, E.exports;
594
594
  }
595
- return v.m = h, v.c = f, v.d = function(y, E, I) {
595
+ return v.m = h, v.c = f, v.d = function(y, E, S) {
596
596
  v.o(y, E) || Object.defineProperty(y, E, {
597
597
  enumerable: !0,
598
- get: I
598
+ get: S
599
599
  });
600
600
  }, v.r = function(y) {
601
601
  typeof Symbol != "undefined" && Symbol.toStringTag && Object.defineProperty(y, Symbol.toStringTag, {
@@ -605,14 +605,14 @@ function tr() {
605
605
  });
606
606
  }, v.t = function(y, E) {
607
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", {
608
+ var S = /* @__PURE__ */ Object.create(null);
609
+ if (v.r(S), Object.defineProperty(S, "default", {
610
610
  enumerable: !0,
611
611
  value: y
612
- }), 2 & E && typeof y != "string") for (var A in y) v.d(I, A, function(D) {
612
+ }), 2 & E && typeof y != "string") for (var A in y) v.d(S, A, function(D) {
613
613
  return y[D];
614
614
  }.bind(null, A));
615
- return I;
615
+ return S;
616
616
  }, v.n = function(y) {
617
617
  var E = y && y.__esModule ? function() {
618
618
  return y.default;
@@ -659,7 +659,7 @@ function tr() {
659
659
  }
660
660
  var E = `Call was rejected by callee.\r
661
661
  `;
662
- function I(e) {
662
+ function S(e) {
663
663
  return e === void 0 && (e = window), e.location.protocol;
664
664
  }
665
665
  function A(e) {
@@ -667,7 +667,7 @@ function tr() {
667
667
  var n = e.mockDomain.split("//")[0];
668
668
  if (n) return n;
669
669
  }
670
- return I(e);
670
+ return S(e);
671
671
  }
672
672
  function D(e) {
673
673
  return e === void 0 && (e = window), A(e) === "about:";
@@ -695,7 +695,7 @@ function tr() {
695
695
  e === void 0 && (e = window);
696
696
  var n = e.location;
697
697
  if (!n) throw new Error("Can not read window location");
698
- var t = I(e);
698
+ var t = S(e);
699
699
  if (!t) throw new Error("Can not read window protocol");
700
700
  if (t === "file:") return "file://";
701
701
  if (t === "about:") {
@@ -998,11 +998,11 @@ function tr() {
998
998
  var t = this.resolved, r = this.rejected, o = this.handlers;
999
999
  if (!this.dispatching && (t || r)) {
1000
1000
  this.dispatching = !0, Ce();
1001
- for (var i = function(g, b) {
1001
+ for (var i = function(g, I) {
1002
1002
  return g.then(function(x) {
1003
- b.resolve(x);
1003
+ I.resolve(x);
1004
1004
  }, function(x) {
1005
- b.reject(x);
1005
+ I.reject(x);
1006
1006
  });
1007
1007
  }, a = 0; a < o.length; a++) {
1008
1008
  var l = o[a], u = l.onSuccess, s = l.onError, w = l.promise, m = void 0;
@@ -1309,13 +1309,13 @@ function tr() {
1309
1309
  } catch (C) {
1310
1310
  return e.apply(this, arguments);
1311
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);
1312
+ var I = p[g];
1313
+ if (I && o && Date.now() - I.time < o && (delete p[g], I = null), I) return I.value;
1314
+ var x = Date.now(), b = e.apply(this, arguments);
1315
1315
  return p[g] = {
1316
1316
  time: x,
1317
- value: S
1318
- }, S;
1317
+ value: b
1318
+ }, b;
1319
1319
  };
1320
1320
  return u.reset = function() {
1321
1321
  i = null, a = null;
@@ -1447,7 +1447,7 @@ function tr() {
1447
1447
  var ot = function() {
1448
1448
  return {};
1449
1449
  };
1450
- function j(e, n) {
1450
+ function z(e, n) {
1451
1451
  return e === void 0 && (e = "store"), n === void 0 && (n = ot), fe(le(), e, function() {
1452
1452
  var t = n();
1453
1453
  return {
@@ -1477,12 +1477,12 @@ function tr() {
1477
1477
  }
1478
1478
  var Jt = function() {
1479
1479
  };
1480
- function xe() {
1480
+ function Se() {
1481
1481
  var e = le();
1482
1482
  return e.WINDOW_WILDCARD = e.WINDOW_WILDCARD || new Jt(), e.WINDOW_WILDCARD;
1483
1483
  }
1484
1484
  function H(e, n) {
1485
- return e === void 0 && (e = "store"), n === void 0 && (n = ot), j("windowStore").getOrSet(e, function() {
1485
+ return e === void 0 && (e = "store"), n === void 0 && (n = ot), z("windowStore").getOrSet(e, function() {
1486
1486
  var t = new Te(), r = function(o) {
1487
1487
  return t.getOrSet(o, n);
1488
1488
  };
@@ -1507,7 +1507,7 @@ function tr() {
1507
1507
  });
1508
1508
  }
1509
1509
  function it() {
1510
- return j("instance").getOrSet("instanceID", J);
1510
+ return z("instance").getOrSet("instanceID", J);
1511
1511
  }
1512
1512
  function at(e, n) {
1513
1513
  var t = n.domain, r = H("helloPromises"), o = r.get(e);
@@ -1623,7 +1623,7 @@ function tr() {
1623
1623
  }, 10);
1624
1624
  });
1625
1625
  function Ne() {
1626
- for (var e = j("idToProxyWindow"), n = 0, t = e.keys(); n < t.length; n++) {
1626
+ for (var e = z("idToProxyWindow"), n = 0, t = e.keys(); n < t.length; n++) {
1627
1627
  var r = t[n];
1628
1628
  e.get(r).shouldClean() && e.del(r);
1629
1629
  }
@@ -1669,23 +1669,23 @@ function tr() {
1669
1669
  },
1670
1670
  setLocation: function(u, s) {
1671
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;
1672
+ var m = window.location.protocol + "//" + window.location.host, p = s.method, g = p === void 0 ? "get" : p, I = s.body;
1673
1673
  if (u.indexOf("/") === 0) u = "" + m + u;
1674
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
1675
  if (g === "post") return l().then(function(x) {
1676
1676
  if (!x) throw new Error("Can not post to window without target name");
1677
- (function(S) {
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);
1677
+ (function(b) {
1678
+ var C = b.url, j = b.target, R = b.body, T = b.method, L = T === void 0 ? "post" : T, W = document.createElement("form");
1679
+ if (W.setAttribute("target", j), 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], ze = document.createElement("input");
1681
+ ze.setAttribute("name", he), ze.setAttribute("value", (M = R[he]) == null ? void 0 : M.toString()), W.appendChild(ze);
1682
1682
  }
1683
1683
  tt().appendChild(W), W.submit(), tt().removeChild(W);
1684
1684
  })({
1685
1685
  url: u,
1686
1686
  target: x,
1687
1687
  method: g,
1688
- body: b
1688
+ body: I
1689
1689
  });
1690
1690
  });
1691
1691
  if (g !== "get") throw new Error("Unsupported method: " + g);
@@ -1713,7 +1713,7 @@ function tr() {
1713
1713
  var r = t.send, o = t.win, i = t.serializedWindow;
1714
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
1715
  send: r
1716
- }), j("idToProxyWindow").set(this.getID(), this), o && this.setWindow(o, {
1716
+ }), z("idToProxyWindow").set(this.getID(), this), o && this.setWindow(o, {
1717
1717
  send: r
1718
1718
  });
1719
1719
  }
@@ -1798,7 +1798,7 @@ function tr() {
1798
1798
  }).serialize();
1799
1799
  }, e.deserialize = function(t, r) {
1800
1800
  var o = r.send;
1801
- return Ne(), j("idToProxyWindow").get(t.id) || new e({
1801
+ return Ne(), z("idToProxyWindow").get(t.id) || new e({
1802
1802
  serializedWindow: t,
1803
1803
  send: o
1804
1804
  });
@@ -1815,7 +1815,7 @@ function tr() {
1815
1815
  }, e;
1816
1816
  }();
1817
1817
  function De(e, n, t, r, o) {
1818
- var i = H("methodStore"), a = j("proxyWindowMethods");
1818
+ var i = H("methodStore"), a = z("proxyWindowMethods");
1819
1819
  B.isProxyWindow(r) ? a.set(e, {
1820
1820
  val: n,
1821
1821
  name: t,
@@ -1831,7 +1831,7 @@ function tr() {
1831
1831
  });
1832
1832
  }
1833
1833
  function ft(e, n) {
1834
- var t = H("methodStore"), r = j("proxyWindowMethods");
1834
+ var t = H("methodStore"), r = z("proxyWindowMethods");
1835
1835
  return t.getOrSet(e, function() {
1836
1836
  return {};
1837
1837
  })[n] || r.get(n);
@@ -1840,15 +1840,15 @@ function tr() {
1840
1840
  a = (i = {
1841
1841
  on: o.on,
1842
1842
  send: o.send
1843
- }).on, l = i.send, j("builtinListeners").getOrSet("functionCalls", function() {
1843
+ }).on, l = i.send, z("builtinListeners").getOrSet("functionCalls", function() {
1844
1844
  return a("postrobot_method", {
1845
1845
  domain: "*"
1846
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;
1847
+ var m = w.source, p = w.origin, g = w.data, I = g.id, x = g.name, b = ft(m, I);
1848
+ if (!b) throw new Error("Could not find method '" + x + "' with id: " + g.id + " in " + F(window));
1849
+ var C = b.source, j = b.domain, R = b.val;
1850
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));
1851
+ if (!re(j, p)) throw new Error("Method '" + g.name + "' domain " + JSON.stringify(Re(b.domain) ? b.domain.source : b.domain) + " does not match origin " + p + " in " + F(window));
1852
1852
  if (B.isProxyWindow(C)) return C.matchWindow(m, {
1853
1853
  send: l
1854
1854
  }).then(function(T) {
@@ -1875,7 +1875,7 @@ function tr() {
1875
1875
  }).then(function(T) {
1876
1876
  return {
1877
1877
  result: T,
1878
- id: b,
1878
+ id: I,
1879
1879
  name: x
1880
1880
  };
1881
1881
  });
@@ -1907,8 +1907,8 @@ function tr() {
1907
1907
  }(t, ((o = {}).promise = function(l, u) {
1908
1908
  return function(s, w, m, p, g) {
1909
1909
  return te("cross_domain_zalgo_promise", {
1910
- then: lt(s, w, function(b, x) {
1911
- return m.then(b, x);
1910
+ then: lt(s, w, function(I, x) {
1911
+ return m.then(I, x);
1912
1912
  }, p, {
1913
1913
  on: g.on,
1914
1914
  send: g.send
@@ -1945,10 +1945,10 @@ function tr() {
1945
1945
  }(0, 0, a);
1946
1946
  }, o.cross_domain_function = function(a) {
1947
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 = {});
1948
+ var m = s.id, p = s.name, g = w.send, I = function(b) {
1949
+ b === void 0 && (b = {});
1950
1950
  function C() {
1951
- var z = arguments;
1951
+ var j = arguments;
1952
1952
  return B.toProxyWindow(l, {
1953
1953
  send: g
1954
1954
  }).awaitWindow().then(function(R) {
@@ -1956,9 +1956,9 @@ function tr() {
1956
1956
  if (T && T.val !== C) return T.val.apply({
1957
1957
  source: window,
1958
1958
  origin: F()
1959
- }, z);
1960
- var L = [].slice.call(z);
1961
- return S.fireAndForget ? g(R, "postrobot_method", {
1959
+ }, j);
1960
+ var L = [].slice.call(j);
1961
+ return b.fireAndForget ? g(R, "postrobot_method", {
1962
1962
  id: m,
1963
1963
  name: p,
1964
1964
  args: L
@@ -1980,8 +1980,8 @@ function tr() {
1980
1980
  });
1981
1981
  }
1982
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({
1983
+ }, x = I();
1984
+ return x.fireAndForget = I({
1985
1985
  fireAndForget: !0
1986
1986
  }), x;
1987
1987
  }(e, n, a, {
@@ -1997,7 +1997,7 @@ function tr() {
1997
1997
  Me.postrobot_post_message = function(e, n, t) {
1998
1998
  t.indexOf("file:") === 0 && (t = "*"), e.postMessage(n, t);
1999
1999
  };
2000
- function ze(e, n, t, r) {
2000
+ function je(e, n, t, r) {
2001
2001
  var o = r.on, i = r.send;
2002
2002
  return P.try(function() {
2003
2003
  var a = H().getOrSet(e, function() {
@@ -2020,8 +2020,8 @@ function tr() {
2020
2020
  }
2021
2021
  if (w.length === s.length) throw new Error(`All post-robot messaging strategies failed:
2022
2022
 
2023
- ` + w.map(function(g, b) {
2024
- return b + ". " + de(g);
2023
+ ` + w.map(function(g, I) {
2024
+ return I + ". " + de(g);
2025
2025
  }).join(`
2026
2026
 
2027
2027
  `));
@@ -2031,18 +2031,18 @@ function tr() {
2031
2031
  }).then(ee);
2032
2032
  }
2033
2033
  function pt(e) {
2034
- return j("responseListeners").get(e);
2034
+ return z("responseListeners").get(e);
2035
2035
  }
2036
2036
  function vt(e) {
2037
- j("responseListeners").del(e);
2037
+ z("responseListeners").del(e);
2038
2038
  }
2039
2039
  function wt(e) {
2040
- return j("erroredResponseListeners").has(e);
2040
+ return z("erroredResponseListeners").has(e);
2041
2041
  }
2042
2042
  function gt(e) {
2043
2043
  var n = e.name, t = e.win, r = e.domain, o = H("requestListeners");
2044
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++) {
2045
+ for (var i = 0, a = [t, Se()]; i < a.length; i++) {
2046
2046
  var l = a[i];
2047
2047
  if (l) {
2048
2048
  var u = o.get(l);
@@ -2071,7 +2071,7 @@ function tr() {
2071
2071
  function u(s, w, m) {
2072
2072
  return P.flush().then(function() {
2073
2073
  if (!t.fireAndForget && !G(e)) try {
2074
- return ze(e, n, {
2074
+ return je(e, n, {
2075
2075
  id: J(),
2076
2076
  origin: F(window),
2077
2077
  type: "postrobot_message_response",
@@ -2093,7 +2093,7 @@ function tr() {
2093
2093
  }
2094
2094
  return P.all([P.flush().then(function() {
2095
2095
  if (!t.fireAndForget && !G(e)) try {
2096
- return ze(e, n, {
2096
+ return je(e, n, {
2097
2097
  id: J(),
2098
2098
  origin: F(window),
2099
2099
  type: "postrobot_message_ack",
@@ -2152,24 +2152,24 @@ function tr() {
2152
2152
  }
2153
2153
  }
2154
2154
  function yt(e, n) {
2155
- var t = n.on, r = n.send, o = j("receivedMessages");
2155
+ var t = n.on, r = n.send, o = z("receivedMessages");
2156
2156
  try {
2157
2157
  if (!window || window.closed || !e.source) return;
2158
2158
  } catch (w) {
2159
2159
  return;
2160
2160
  }
2161
2161
  var i = e.source, a = e.origin, l = function(w, m, p, g) {
2162
- var b = g.on, x = g.send, S;
2162
+ var I = g.on, x = g.send, b;
2163
2163
  try {
2164
- S = mt(m, p, w, {
2165
- on: b,
2164
+ b = mt(m, p, w, {
2165
+ on: I,
2166
2166
  send: x
2167
2167
  });
2168
- } catch (z) {
2168
+ } catch (j) {
2169
2169
  return;
2170
2170
  }
2171
- if (S && typeof S == "object" && S !== null) {
2172
- var C = S.__post_robot_10_0_46__;
2171
+ if (b && typeof b == "object" && b !== null) {
2172
+ var C = b.__post_robot_10_0_46__;
2173
2173
  if (Array.isArray(C)) return C;
2174
2174
  }
2175
2175
  }(e.data, i, a, {
@@ -2219,10 +2219,10 @@ function tr() {
2219
2219
  }
2220
2220
  var p = u;
2221
2221
  if (Array.isArray(p)) {
2222
- for (var g = [], b = 0, x = p; b < x.length; b++) g.push(o({
2222
+ for (var g = [], I = 0, x = p; I < x.length; I++) g.push(o({
2223
2223
  name: l,
2224
2224
  domain: s,
2225
- win: x[b]
2225
+ win: x[I]
2226
2226
  }, a));
2227
2227
  return {
2228
2228
  cancel: function() {
@@ -2231,14 +2231,14 @@ function tr() {
2231
2231
  };
2232
2232
  }
2233
2233
  if (Array.isArray(s)) {
2234
- for (var S = [], C = 0, z = s; C < z.length; C++) S.push(o({
2234
+ for (var b = [], C = 0, j = s; C < j.length; C++) b.push(o({
2235
2235
  name: l,
2236
2236
  win: p,
2237
- domain: z[C]
2237
+ domain: j[C]
2238
2238
  }, a));
2239
2239
  return {
2240
2240
  cancel: function() {
2241
- for (var M = 0; M < S.length; M++) S[M].cancel();
2241
+ for (var M = 0; M < b.length; M++) b[M].cancel();
2242
2242
  }
2243
2243
  };
2244
2244
  }
@@ -2247,9 +2247,9 @@ function tr() {
2247
2247
  win: p,
2248
2248
  domain: s
2249
2249
  });
2250
- p && p !== "*" || (p = xe());
2250
+ p && p !== "*" || (p = Se());
2251
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);
2252
+ if (R) throw p && s ? new Error("Request listener already exists for " + l + " on domain " + s.toString() + " for " + (p === Se() ? "wildcard" : "specified") + " window") : p ? new Error("Request listener already exists for " + l + " for " + (p === Se() ? "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
2253
  var L = w.getOrSet(p, function() {
2254
2254
  return {};
2255
2255
  }), W = fe(L, l, function() {
@@ -2318,53 +2318,53 @@ function tr() {
2318
2318
  if ($e(x, window) && window.top) return window.top;
2319
2319
  } catch (R) {
2320
2320
  }
2321
- for (var S = 0, C = function R(T) {
2321
+ for (var b = 0, C = function R(T) {
2322
2322
  for (var L = [], W = 0, O = Be(T); W < O.length; W++) {
2323
2323
  var V = O[W];
2324
2324
  L.push(V);
2325
2325
  for (var M = 0, he = R(V); M < he.length; M++) L.push(he[M]);
2326
2326
  }
2327
2327
  return L;
2328
- }(x); S < C.length; S++) {
2329
- var z = C[S];
2328
+ }(x); b < C.length; b++) {
2329
+ var j = C[b];
2330
2330
  try {
2331
- if (z.top) return z.top;
2331
+ if (j.top) return j.top;
2332
2332
  } catch (R) {
2333
2333
  }
2334
- if (k(z) === z) return z;
2334
+ if (k(j) === j) return j;
2335
2335
  }
2336
2336
  }(m) === m) return !1;
2337
- for (var g = 0, b = Be(w); g < b.length; g++) if (b[g] === m) return !0;
2337
+ for (var g = 0, I = Be(w); g < I.length; g++) if (I[g] === m) return !0;
2338
2338
  return !1;
2339
2339
  }(window, s)) return function(w, m, p) {
2340
2340
  m === void 0 && (m = 5e3), p === void 0 && (p = "Window");
2341
- var g = function(b) {
2342
- return H("helloPromises").getOrSet(b, function() {
2341
+ var g = function(I) {
2342
+ return H("helloPromises").getOrSet(I, function() {
2343
2343
  return new P();
2344
2344
  });
2345
2345
  }(w);
2346
2346
  return m !== -1 && (g = g.timeout(m, new Error(p + " did not load after " + m + "ms"))), g;
2347
2347
  }(s, l);
2348
2348
  }).then(function(w) {
2349
- return function(m, p, g, b) {
2350
- var x = b.send;
2349
+ return function(m, p, g, I) {
2350
+ var x = I.send;
2351
2351
  return P.try(function() {
2352
2352
  return typeof p == "string" ? p : P.try(function() {
2353
2353
  return g || Oe(m, {
2354
2354
  send: x
2355
- }).then(function(S) {
2356
- return S.domain;
2355
+ }).then(function(b) {
2356
+ return b.domain;
2357
2357
  });
2358
- }).then(function(S) {
2358
+ }).then(function(b) {
2359
2359
  if (!re(p, p)) throw new Error("Domain " + et(p) + " does not match " + et(p));
2360
- return S;
2360
+ return b;
2361
2361
  });
2362
2362
  });
2363
2363
  }(s, i, (w === void 0 ? {} : w).domain, {
2364
2364
  send: e
2365
2365
  });
2366
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();
2367
+ var m = w, p = t === "postrobot_method" && r && typeof r.name == "string" ? r.name + "()" : t, g = new P(), I = t + "_" + J();
2368
2368
  if (!u) {
2369
2369
  var x = {
2370
2370
  name: t,
@@ -2373,26 +2373,26 @@ function tr() {
2373
2373
  promise: g
2374
2374
  };
2375
2375
  (function(W, O) {
2376
- j("responseListeners").set(W, O);
2377
- })(b, x);
2378
- var S = H("requestPromises").getOrSet(s, function() {
2376
+ z("responseListeners").set(W, O);
2377
+ })(I, x);
2378
+ var b = H("requestPromises").getOrSet(s, function() {
2379
2379
  return [];
2380
2380
  });
2381
- S.push(g), g.catch(function() {
2381
+ b.push(g), g.catch(function() {
2382
2382
  (function(W) {
2383
- j("erroredResponseListeners").set(W, !0);
2384
- })(b), vt(b);
2383
+ z("erroredResponseListeners").set(W, !0);
2384
+ })(I), vt(I);
2385
2385
  });
2386
2386
  var C = function(W) {
2387
2387
  return H("knownWindows").get(W, !1);
2388
- }(s) ? 1e4 : 2e3, z = a, R = C, T = z, L = function(W, O) {
2388
+ }(s) ? 1e4 : 2e3, j = a, R = C, T = j, L = function(W, O) {
2389
2389
  var V;
2390
2390
  return function M() {
2391
2391
  V = setTimeout(function() {
2392
2392
  (function() {
2393
2393
  if (G(s)) return g.reject(new Error("Window closed for " + t + " before " + (x.ack ? "response" : "ack")));
2394
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"));
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 " + j + "ms")) : g.reject(new Error("No ack for postMessage " + p + " in " + F() + " in " + C + "ms"));
2396
2396
  })(), M();
2397
2397
  }, 500);
2398
2398
  }(), {
@@ -2402,14 +2402,14 @@ function tr() {
2402
2402
  };
2403
2403
  }();
2404
2404
  g.finally(function() {
2405
- L.cancel(), S.splice(S.indexOf(g, 1));
2405
+ L.cancel(), b.splice(b.indexOf(g, 1));
2406
2406
  }).catch(ee);
2407
2407
  }
2408
- return ze(s, m, {
2408
+ return je(s, m, {
2409
2409
  id: J(),
2410
2410
  origin: F(window),
2411
2411
  type: "postrobot_message_request",
2412
- hash: b,
2412
+ hash: I,
2413
2413
  name: t,
2414
2414
  data: r,
2415
2415
  fireAndForget: u
@@ -2459,7 +2459,7 @@ function tr() {
2459
2459
  });
2460
2460
  }, function(o) {
2461
2461
  var i = o.on, a = o.send;
2462
- j().getOrSet("postMessageListener", function() {
2462
+ z().getOrSet("postMessageListener", function() {
2463
2463
  return function(l, u, s) {
2464
2464
  return l.addEventListener("message", s), {
2465
2465
  cancel: function() {
@@ -2470,13 +2470,13 @@ function tr() {
2470
2470
  (function(u, s) {
2471
2471
  var w = s.on, m = s.send;
2472
2472
  P.try(function() {
2473
- var p = u.source || u.sourceElement, g = u.origin || u.originalEvent && u.originalEvent.origin, b = u.data;
2473
+ var p = u.source || u.sourceElement, g = u.origin || u.originalEvent && u.originalEvent.origin, I = u.data;
2474
2474
  if (g === "null" && (g = "file://"), p) {
2475
2475
  if (!g) throw new Error("Post message did not have origin domain");
2476
2476
  yt({
2477
2477
  source: p,
2478
2478
  origin: g,
2479
- data: b
2479
+ data: I
2480
2480
  }, {
2481
2481
  on: w,
2482
2482
  send: m
@@ -2494,7 +2494,7 @@ function tr() {
2494
2494
  send: K
2495
2495
  }), function(o) {
2496
2496
  var i = o.on, a = o.send;
2497
- j("builtinListeners").getOrSet("helloListener", function() {
2497
+ z("builtinListeners").getOrSet("helloListener", function() {
2498
2498
  var l = i("postrobot_hello", {
2499
2499
  domain: "*"
2500
2500
  }, function(s) {
@@ -2517,11 +2517,11 @@ function tr() {
2517
2517
  }
2518
2518
  function un() {
2519
2519
  (function() {
2520
- for (var n = j("responseListeners"), t = 0, r = n.keys(); t < r.length; t++) {
2520
+ for (var n = z("responseListeners"), t = 0, r = n.keys(); t < r.length; t++) {
2521
2521
  var o = r[t], i = n.get(o);
2522
2522
  i && (i.cancelled = !0), n.del(o);
2523
2523
  }
2524
- })(), (e = j().get("postMessageListener")) && e.cancel();
2524
+ })(), (e = z().get("postMessageListener")) && e.cancel();
2525
2525
  var e;
2526
2526
  delete window.__post_robot_10_0_46__;
2527
2527
  }
@@ -2532,7 +2532,7 @@ function tr() {
2532
2532
  Et();
2533
2533
  }]);
2534
2534
  });
2535
- }(Se)), Se.exports;
2535
+ }(xe)), xe.exports;
2536
2536
  }
2537
2537
  var Mt;
2538
2538
  function nr() {
@@ -121,7 +121,7 @@
121
121
  0% { background-position: 200% 0; }
122
122
  100% { background-position: -200% 0; }
123
123
  }
124
- `,document.head.appendChild(te)}d.appendChild(v),d.appendChild(y),d.appendChild(E),U.appendChild(H),U.appendChild(he),W.appendChild(q),W.appendChild(U),g.appendChild(d),g.appendChild(W),this.element.appendChild(g)}cleanupExistingSkeleton(){const f=document.getElementById(this.identifier);f&&f.remove()}mount(f){this.cleanupExistingSkeleton(),f.appendChild(this.element)}hide(){this.element.style.opacity="0",setTimeout(()=>this.element.remove(),300)}}const je="2.13.6";function mn(h){var E;const f=["actionToken","entityId","context","optionalReconsentBehavior","mandatoryReconsentBehavior"],g=(E=h.isSandbox)!=null?E:!1,d=h.developmentUrl||(g?at:it),v=new URLSearchParams;v.set("sdkVersion",je),f.forEach(W=>{h[W]&&v.set(W,h[W])});const y=v.toString();return`${d}/embed/consents/${h.consentTemplateId}${y?`?${y}`:""}`}class ze extends be{constructor(g){super(g);M(this,"defaultIframePrefix","consent-box");M(this,"defaultIframeCSSConfig",fn);M(this,"state",{isSelected:!1,actionToken:null});this.Skeleton=hn}get uniqueIdentifier(){return this.options.consentTemplateId}iframeUrl(){return mn(this.options)}handleStateChange(g){const{isSelected:d,actionToken:v}=g;this.state={isSelected:d,actionToken:v},this.options.onEvent({eventName:"CONSENT_CHECKBOX_CHANGE",isSelected:d,actionToken:v})}setupListeners(){return G(this,null,function*(){yield Vt(ze.prototype,this,"setupListeners").call(this),ot(this.uniqueIdentifier,{onStateChange:this.handleStateChange.bind(this)})})}getState(){return this.state}}function pn(h){var y,E;const f=(y=h.isSandbox)!=null?y:!1,g=h.developmentUrl||(f?rn:nn),d=new URLSearchParams;d.set("sdkVersion",je),h.sessionToken?d.set("sessionToken",h.sessionToken):h.companyId&&(d.set("companyId",h.companyId),h.subjectId&&d.set("subjectId",h.subjectId)),(E=h.enabledFeatures)!=null&&E.length&&d.set("enabledFeatures",h.enabledFeatures.join(","));const v=d.toString();return`${g}${v?`?${v}`:""}`}class vn extends be{constructor(){super(...arguments);M(this,"defaultIframePrefix","privacy-center");M(this,"_uniqueIdentifier","privacy-center");M(this,"defaultIframeCSSConfig",ln)}get uniqueIdentifier(){return this._uniqueIdentifier}iframeUrl(){return pn(this.options)}}const wn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),gn="WIDGET_EVENT";function yn(h){let f="widget/";return"disclosureRequestId"in h.configProps?f+=["disclosures",h.configProps.disclosureRequestId].join("/"):f+=h.request,f}function En(h){var y;const f=(y=h.isSandbox)!=null?y:!1,g=h.developmentUrl||(f?at:it),d=Object.entries(h.configProps).filter(([E,W])=>W||E==="disclosureRequestId").map(([E,W])=>`${E}=${encodeURIComponent(W)}`).join("&"),v=yn(h);return`${g}/${v}?sdk=web&sdkVersion=${je}&${d}`}let ee=null,Le=null;function ke(h=null){ee&&!ee.closed&&ee.focus(),h==null||h.preventDefault()}function Ue(){document.body.style.filter="",document.body.removeEventListener("click",ke)}function Sn(){Le=setInterval(()=>{(!ee||ee.closed)&&(Le&&clearInterval(Le),Ue())},cn)}function xn(h){const f=En(h),g=sn,d=un,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,W=window.innerHeight||document.documentElement.clientHeight||window.screen.height,q=E/window.screen.availWidth,U=(E-g)/2/q+v,H=(W-d)/2/q+y;document.body.style.filter="blur(5px)",document.body.addEventListener("click",ke),ee=window.open(f,"Soyio",`scrollbars=yes,
124
+ `,document.head.appendChild(te)}d.appendChild(v),d.appendChild(y),d.appendChild(E),U.appendChild(H),U.appendChild(he),W.appendChild(q),W.appendChild(U),g.appendChild(d),g.appendChild(W),this.element.appendChild(g)}cleanupExistingSkeleton(){const f=document.getElementById(this.identifier);f&&f.remove()}mount(f){this.cleanupExistingSkeleton(),f.appendChild(this.element)}hide(){this.element.style.opacity="0",setTimeout(()=>this.element.remove(),300)}}const je="2.14.1";function mn(h){var E;const f=["actionToken","entityId","context","optionalReconsentBehavior","mandatoryReconsentBehavior"],g=(E=h.isSandbox)!=null?E:!1,d=h.developmentUrl||(g?at:it),v=new URLSearchParams;v.set("sdkVersion",je),f.forEach(W=>{h[W]&&v.set(W,h[W])});const y=v.toString();return`${d}/embed/consents/${h.consentTemplateId}${y?`?${y}`:""}`}class ze extends be{constructor(g){super(g);M(this,"defaultIframePrefix","consent-box");M(this,"defaultIframeCSSConfig",fn);M(this,"state",{isSelected:!1,actionToken:null});this.Skeleton=hn}get uniqueIdentifier(){return this.options.consentTemplateId}iframeUrl(){return mn(this.options)}handleStateChange(g){const{isSelected:d,actionToken:v}=g;this.state={isSelected:d,actionToken:v},this.options.onEvent({eventName:"CONSENT_CHECKBOX_CHANGE",isSelected:d,actionToken:v})}setupListeners(){return G(this,null,function*(){yield Vt(ze.prototype,this,"setupListeners").call(this),ot(this.uniqueIdentifier,{onStateChange:this.handleStateChange.bind(this)})})}getState(){return this.state}}function pn(h){var y,E,W;const f=(y=h.isSandbox)!=null?y:!1,g=h.developmentUrl||(f?rn:nn),d=new URLSearchParams;d.set("sdkVersion",je),h.sessionToken?d.set("sessionToken",h.sessionToken):h.companyId&&d.set("companyId",h.companyId),(E=h.enabledFeatures)!=null&&E.length&&d.set("enabledFeatures",h.enabledFeatures.join(",")),(W=h.dataSubjects)!=null&&W.length&&d.set("dataSubjects",h.dataSubjects.join(","));const v=d.toString();return`${g}${v?`?${v}`:""}`}class vn extends be{constructor(){super(...arguments);M(this,"defaultIframePrefix","privacy-center");M(this,"_uniqueIdentifier","privacy-center");M(this,"defaultIframeCSSConfig",ln)}get uniqueIdentifier(){return this._uniqueIdentifier}iframeUrl(){return pn(this.options)}}const wn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),gn="WIDGET_EVENT";function yn(h){let f="widget/";return"disclosureRequestId"in h.configProps?f+=["disclosures",h.configProps.disclosureRequestId].join("/"):f+=h.request,f}function En(h){var y;const f=(y=h.isSandbox)!=null?y:!1,g=h.developmentUrl||(f?at:it),d=Object.entries(h.configProps).filter(([E,W])=>W||E==="disclosureRequestId").map(([E,W])=>`${E}=${encodeURIComponent(W)}`).join("&"),v=yn(h);return`${g}/${v}?sdk=web&sdkVersion=${je}&${d}`}let ee=null,Le=null;function ke(h=null){ee&&!ee.closed&&ee.focus(),h==null||h.preventDefault()}function Ue(){document.body.style.filter="",document.body.removeEventListener("click",ke)}function Sn(){Le=setInterval(()=>{(!ee||ee.closed)&&(Le&&clearInterval(Le),Ue())},cn)}function xn(h){const f=En(h),g=sn,d=un,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,W=window.innerHeight||document.documentElement.clientHeight||window.screen.height,q=E/window.screen.availWidth,U=(E-g)/2/q+v,H=(W-d)/2/q+y;document.body.style.filter="blur(5px)",document.body.addEventListener("click",ke),ee=window.open(f,"Soyio",`scrollbars=yes,
125
125
  width=${g},
126
126
  height=${d},
127
127
  top=${H},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soyio/soyio-widget",
3
- "version": "2.13.6",
3
+ "version": "2.14.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.umd.cjs",
6
6
  "module": "./dist/index.js",