@soyio/soyio-widget 2.6.0 → 2.7.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
@@ -303,6 +303,7 @@ The **`ConsentBox`** is a component that allows you to embed a consent request d
303
303
  isSandbox: true, // Optional
304
304
  appearance: {}, // Optional
305
305
  actionToken: "<action token>", // Optional
306
+ entityId: "<entity id>", // Optional
306
307
  };
307
308
 
308
309
  // Wait for DOM to be fully loaded
@@ -345,6 +346,7 @@ The `onEvent` follows the following format:
345
346
  - **`actionToken`**: token containing necessary information for creation of the consent commit. [Learn more](https://docs.soyio.id/docs/api/resources/create-consent-request).
346
347
  - **`appearance`**: Customize the appearance of the iframe. [Learn more](https://docs.soyio.id/docs/integration-guide/modules/consent).
347
348
  - **`actionToken`**: In case of losing the state of the consent (i.e. page reload), you can use a previously generated `actionToken` to restore the state of the consent.
349
+ - **`entityId`**: Identifier of the `entity` associated with a `ConsentAction`. If provided and a consent was previously granted by this entity, the UI will display a message indicating that consent has already been given.
348
350
 
349
351
  # Appearance
350
352
 
@@ -386,30 +388,38 @@ interface Variables {
386
388
 
387
389
  ### Available Variables
388
390
 
389
- | Variable | Description | Default |
390
- | ----------------- | -------------------------------------- | ------------------------- |
391
- | `fontFamily` | The font stack to use for text | `"system-ui, sans-serif"` |
392
- | `colorPrimary` | Primary color for interactive elements | `"#0570DE"` |
393
- | `colorBackground` | Background color | `"#FFFFFF"` |
394
- | `colorText` | Main text color | `"#1A1F36"` |
395
- | `borderRadius` | Border radius for elements | `"4px"` |
396
- | `borderWidth` | Border width for elements | `"1px"` |
397
- | `borderStyle` | Border style for elements | `"solid"` |
391
+ | Variable | Description | Default |
392
+ | ----------------- | ---------------------------------------- | ------------------------- |
393
+ | `fontFamily` | The font stack to use for text | `"system-ui, sans-serif"` |
394
+ | `colorPrimary` | Primary color for interactive elements | `"#0570DE"` |
395
+ | `colorSecondary` | Secondary color for interactive elements | `"#0570DE"` |
396
+ | `colorBackground` | Background color | `"#FFFFFF"` |
397
+ | `colorText` | Main text color | `"#1A1F36"` |
398
+ | `borderRadius` | Border radius for elements | `"4px"` |
399
+ | `borderWidth` | Border width for elements | `"1px"` |
400
+ | `borderStyle` | Border style for elements | `"solid"` |
398
401
 
399
402
  ## Rules
400
403
 
401
404
  The `rules` object allows you to apply custom CSS to specific elements. Currently, Soyio supports styling for checkbox components.
402
405
 
406
+ ### Supported rules
407
+
408
+ - `.MainContainer` - The main container of the consent request box. Only border CSS properties are allowed to be overridden.
409
+ - `.Button` - The button component.
410
+ - `.Checkbox` - The checkbox component.
411
+ - `.CheckboxInput` - The checkbox input element.
412
+ - `.CheckboxLabel` - The checkbox label.
413
+
414
+ ![Checkbox Components](https://soyio-public-assets.s3.us-east-1.amazonaws.com/checkbox-appearance.webp)
415
+
403
416
  ### Supported Selectors
404
417
 
405
- - `.CheckboxInput` - The checkbox input element
406
418
  - `.CheckboxInput--checked` - The checked state of the checkbox
407
419
  - `.CheckboxInput:hover` - Hover state of the checkbox
408
420
  - `.CheckboxInput:focus` - Focus state of the checkbox
409
421
  - `.CheckboxInput:focus-visible` - Focus-visible state of the checkbox
410
422
 
411
- ![Checkbox Components](https://soyio-public-assets.s3.us-east-1.amazonaws.com/checkbox-appearance.webp)
412
-
413
423
  ### Example Configuration
414
424
 
415
425
  ```javascript
@@ -418,6 +428,7 @@ const appearance = {
418
428
  variables: {
419
429
  fontFamily: "system-ui, sans-serif",
420
430
  colorPrimary: "#f54c27",
431
+ colorSecondary: "#f54c27",
421
432
  colorBackground: "#ffffff",
422
433
  colorText: "#1E1B4B",
423
434
  borderRadius: "0.5rem",
@@ -425,6 +436,11 @@ const appearance = {
425
436
  borderStyle: "dashed",
426
437
  },
427
438
  rules: {
439
+ ".MainContainer": {
440
+ borderWidth: "1px",
441
+ borderColor: "#E5E7EB",
442
+ borderRadius: "0.25rem",
443
+ },
428
444
  ".CheckboxInput": {
429
445
  appearance: "none",
430
446
  backgroundColor: "transparent",
package/dist/index.js CHANGED
@@ -54,7 +54,7 @@ function k(e, t) {
54
54
  const n = document.createElement("iframe");
55
55
  return n.id = t, n.src = e, n.style.cssText += `
56
56
  width: 100% !important;
57
- min-width: 25rem !important;
57
+ min-width: 375px !important;
58
58
  max-width: 36rem !important;
59
59
  border: none !important;
60
60
  height: 120px !important;
@@ -66,7 +66,7 @@ function k(e, t) {
66
66
  }
67
67
  function M(e) {
68
68
  const t = e.isSandbox ?? !1, n = e.developmentUrl || (t ? S : b), o = new URLSearchParams();
69
- e.actionToken && o.set("actionToken", e.actionToken);
69
+ e.actionToken && o.set("actionToken", e.actionToken), e.entityId && o.set("entityId", e.entityId);
70
70
  const i = o.toString();
71
71
  return `${n}/embed/consents/${e.consentTemplateId}${i ? `?${i}` : ""}`;
72
72
  }
@@ -1,4 +1,4 @@
1
- (function(A,R){typeof exports=="object"&&typeof module<"u"?R(exports):typeof define=="function"&&define.amd?define(["exports"],R):(A=typeof globalThis<"u"?globalThis:A||self,R(A["soyio-widget"]={}))})(this,function(A){"use strict";var Nn=Object.defineProperty;var Dn=(A,R,H)=>R in A?Nn(A,R,{enumerable:!0,configurable:!0,writable:!0,value:H}):A[R]=H;var k=(A,R,H)=>(Dn(A,typeof R!="symbol"?R+"":R,H),H),jn=(A,R,H)=>{if(!R.has(A))throw TypeError("Cannot "+H)};var Ct=(A,R,H)=>{if(R.has(A))throw TypeError("Cannot add the same private member more than once");R instanceof WeakSet?R.add(A):R.set(A,H)};var Tt=(A,R,H)=>(jn(A,R,"access private method"),H);var me,Ot;function R(p,v){for(var w=0;w<v.length;w++){const m=v[w];if(typeof m!="string"&&!Array.isArray(m)){for(const g in m)if(g!=="default"&&!(g in p)){const y=Object.getOwnPropertyDescriptor(m,g);y&&Object.defineProperty(p,g,y.get?y:{enumerable:!0,get:()=>m[g]})}}}return Object.freeze(Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}))}async function H(p,v,w){if(!p.contentWindow)throw new Error("Invalid iframe: contentWindow is null");const m=await Promise.resolve().then(()=>Ce);try{await m.send(p.contentWindow,"SET_APPEARANCE",{appearance:v,identifier:w})}catch(g){console.error("Failed to send appearance config:",g)}}const Fe="https://app.soyio.id",Ue="https://sandbox.soyio.id",At=["DISCLOSURE_REQUEST_SUCCESSFUL","IDENTITY_REGISTERED","IDENTITY_SIGNATURE","UNEXPECTED_ERROR","DENIED_CAMERA_PERMISSION","REJECTED_SIGNATURE"],Rt="WIDGET_CLOSED",Nt=420,Dt=720,jt=500;function zt(p){const v=document.getElementById(p);v&&(console.warn("ConsentBox iframe already exists. Removing existing before mounting new one."),v.remove())}function Mt(p){const v=document.querySelector(p);if(!v)throw new Error(`Iframe div container with id '${p}' not found`);if(v.tagName.toLowerCase()!=="div")throw new Error(`Iframe container with id '${p}' must be a <div> element`);const w=v;return w.style.position="relative",w.style.cssText+=`
1
+ (function(A,R){typeof exports=="object"&&typeof module<"u"?R(exports):typeof define=="function"&&define.amd?define(["exports"],R):(A=typeof globalThis<"u"?globalThis:A||self,R(A["soyio-widget"]={}))})(this,function(A){"use strict";var Nn=Object.defineProperty;var Dn=(A,R,H)=>R in A?Nn(A,R,{enumerable:!0,configurable:!0,writable:!0,value:H}):A[R]=H;var k=(A,R,H)=>(Dn(A,typeof R!="symbol"?R+"":R,H),H),jn=(A,R,H)=>{if(!R.has(A))throw TypeError("Cannot "+H)};var Ct=(A,R,H)=>{if(R.has(A))throw TypeError("Cannot add the same private member more than once");R instanceof WeakSet?R.add(A):R.set(A,H)};var Tt=(A,R,H)=>(jn(A,R,"access private method"),H);var ve,Ot;function R(p,m){for(var w=0;w<m.length;w++){const v=m[w];if(typeof v!="string"&&!Array.isArray(v)){for(const g in v)if(g!=="default"&&!(g in p)){const y=Object.getOwnPropertyDescriptor(v,g);y&&Object.defineProperty(p,g,y.get?y:{enumerable:!0,get:()=>v[g]})}}}return Object.freeze(Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}))}async function H(p,m,w){if(!p.contentWindow)throw new Error("Invalid iframe: contentWindow is null");const v=await Promise.resolve().then(()=>Ce);try{await v.send(p.contentWindow,"SET_APPEARANCE",{appearance:m,identifier:w})}catch(g){console.error("Failed to send appearance config:",g)}}const Fe="https://app.soyio.id",Ue="https://sandbox.soyio.id",At=["DISCLOSURE_REQUEST_SUCCESSFUL","IDENTITY_REGISTERED","IDENTITY_SIGNATURE","UNEXPECTED_ERROR","DENIED_CAMERA_PERMISSION","REJECTED_SIGNATURE"],Rt="WIDGET_CLOSED",Nt=420,Dt=720,jt=500;function zt(p){const m=document.getElementById(p);m&&(console.warn("ConsentBox iframe already exists. Removing existing before mounting new one."),m.remove())}function Mt(p){const m=document.querySelector(p);if(!m)throw new Error(`Iframe div container with id '${p}' not found`);if(m.tagName.toLowerCase()!=="div")throw new Error(`Iframe container with id '${p}' must be a <div> element`);const w=m;return w.style.position="relative",w.style.cssText+=`
2
2
  padding: 0 !important;
3
3
  margin: 0 !important;
4
4
  display: flex !important;
@@ -7,9 +7,9 @@
7
7
  border: none !important;
8
8
  transition: height 0.35s !important;
9
9
  opacity: 1 !important;
10
- `,w}function Lt(p,v){const w=document.createElement("iframe");return w.id=v,w.src=p,w.style.cssText+=`
10
+ `,w}function Lt(p,m){const w=document.createElement("iframe");return w.id=m,w.src=p,w.style.cssText+=`
11
11
  width: 100% !important;
12
- min-width: 25rem !important;
12
+ min-width: 375px !important;
13
13
  max-width: 36rem !important;
14
14
  border: none !important;
15
15
  height: 120px !important;
@@ -17,7 +17,7 @@
17
17
  opacity: 1;
18
18
  transition: height 0.35s,
19
19
  opacity 0.4s 0.1s;
20
- `,w}function Ht(p){const v=p.isSandbox??!1,w=p.developmentUrl||(v?Ue:Fe),m=new URLSearchParams;p.actionToken&&m.set("actionToken",p.actionToken);const g=m.toString();return`${w}/embed/consents/${p.consentTemplateId}${g?`?${g}`:""}`}const Ft="IFRAME_READY",Ut="CONSENT_STATE_CHANGE",Gt="IFRAME_HEIGHT_CHANGE",Bt="TOOLTIP_STATE_CHANGE",_={onHeightChange:{},onIframeReady:{},onStateChange:{},onTooltipChange:{}};let Ge,Be,_e,$e;async function _t(){const p=await Promise.resolve().then(()=>Ce);Ge||Be||_e||$e||(Ge=p.on(Gt,async v=>{const w=v.data,m=_.onHeightChange[w.identifier];if(!m)throw new Error(`No height change listener found for identifier: ${w.identifier}`);m(w.height)}),Be=p.on(Ft,async v=>{const w=v.data,m=_.onIframeReady[w.identifier];if(!m)throw new Error(`No iframe ready listener found for identifier: ${w.identifier}`);m()}),_e=p.on(Ut,async v=>{const w=v.data,m=_.onStateChange[w.identifier];if(!m)throw new Error(`No state change listener found for identifier: ${w.identifier}`);m(w)}),$e=p.on(Bt,async v=>{const w=v.data,m=_.onTooltipChange[w.identifier];if(!m)throw new Error(`No tooltip change listener found for identifier: ${w.identifier}`);m(w)}))}function $t(p,v){const{onHeightChange:w,onIframeReady:m,onStateChange:g,onTooltipChange:y}=v;_.onHeightChange[p]=w,_.onIframeReady[p]=m,_.onStateChange[p]=g,_.onTooltipChange[p]=y}function qt(p){delete _.onHeightChange[p],delete _.onIframeReady[p],delete _.onStateChange[p],delete _.onTooltipChange[p]}class kt{constructor(){k(this,"tooltipElement",null);k(this,"tooltipContent",null);k(this,"tooltipClass","soyio-tooltip");k(this,"hideTimeout",null);this.createTooltipElement(),this.setupGlobalListeners()}createTooltipElement(){const v=document.querySelector(`.${this.tooltipClass}`);v==null||v.remove(),this.tooltipElement=document.createElement("div"),this.tooltipElement.className=this.tooltipClass,this.tooltipElement.style.cssText=`
20
+ `,w}function Ht(p){const m=p.isSandbox??!1,w=p.developmentUrl||(m?Ue:Fe),v=new URLSearchParams;p.actionToken&&v.set("actionToken",p.actionToken),p.entityId&&v.set("entityId",p.entityId);const g=v.toString();return`${w}/embed/consents/${p.consentTemplateId}${g?`?${g}`:""}`}const Ft="IFRAME_READY",Ut="CONSENT_STATE_CHANGE",Gt="IFRAME_HEIGHT_CHANGE",Bt="TOOLTIP_STATE_CHANGE",_={onHeightChange:{},onIframeReady:{},onStateChange:{},onTooltipChange:{}};let Ge,Be,_e,$e;async function _t(){const p=await Promise.resolve().then(()=>Ce);Ge||Be||_e||$e||(Ge=p.on(Gt,async m=>{const w=m.data,v=_.onHeightChange[w.identifier];if(!v)throw new Error(`No height change listener found for identifier: ${w.identifier}`);v(w.height)}),Be=p.on(Ft,async m=>{const w=m.data,v=_.onIframeReady[w.identifier];if(!v)throw new Error(`No iframe ready listener found for identifier: ${w.identifier}`);v()}),_e=p.on(Ut,async m=>{const w=m.data,v=_.onStateChange[w.identifier];if(!v)throw new Error(`No state change listener found for identifier: ${w.identifier}`);v(w)}),$e=p.on(Bt,async m=>{const w=m.data,v=_.onTooltipChange[w.identifier];if(!v)throw new Error(`No tooltip change listener found for identifier: ${w.identifier}`);v(w)}))}function $t(p,m){const{onHeightChange:w,onIframeReady:v,onStateChange:g,onTooltipChange:y}=m;_.onHeightChange[p]=w,_.onIframeReady[p]=v,_.onStateChange[p]=g,_.onTooltipChange[p]=y}function qt(p){delete _.onHeightChange[p],delete _.onIframeReady[p],delete _.onStateChange[p],delete _.onTooltipChange[p]}class kt{constructor(){k(this,"tooltipElement",null);k(this,"tooltipContent",null);k(this,"tooltipClass","soyio-tooltip");k(this,"hideTimeout",null);this.createTooltipElement(),this.setupGlobalListeners()}createTooltipElement(){const m=document.querySelector(`.${this.tooltipClass}`);m==null||m.remove(),this.tooltipElement=document.createElement("div"),this.tooltipElement.className=this.tooltipClass,this.tooltipElement.style.cssText=`
21
21
  position: fixed;
22
22
  z-index: 99999;
23
23
  background: white;
@@ -41,17 +41,17 @@
41
41
  height: 8px;
42
42
  background: white;
43
43
  box-shadow: 2px 2px 2px rgba(0,0,0,0.1);
44
- `,this.tooltipElement.appendChild(w),document.body.appendChild(this.tooltipElement)}setupGlobalListeners(){window.addEventListener("scroll",()=>this.hide(),!0),window.addEventListener("resize",()=>this.hide()),window.addEventListener("orientationchange",()=>this.hide())}show(v,w,m){!this.tooltipElement||!this.tooltipContent||(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null),this.tooltipContent.textContent=v,this.tooltipElement.style.left=`${w}px`,this.tooltipElement.style.top=`${m}px`,this.tooltipElement.style.opacity="1")}hide(){this.tooltipElement&&(this.tooltipElement.style.opacity="0")}destroy(){var v;(v=this.tooltipElement)==null||v.remove(),this.tooltipElement=null,this.tooltipContent=null,this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}}class Jt{constructor(v){k(this,"appearance");k(this,"options");k(this,"tooltipManager");k(this,"iframe",null);k(this,"state",{isSelected:!1,actionToken:null});this.options=v,this.appearance=v.appearance||null,this.tooltipManager=new kt,this.setup()}handleHeightChange(v){this.iframe&&(this.iframe.style.height=`${v}px`)}async handleIframeReady(){!this.iframe||!this.appearance||await H(this.iframe,this.appearance,this.uniqueIdentifier)}handleStateChange(v){const{isSelected:w,actionToken:m}=v;this.state={isSelected:w,actionToken:m},this.options.onEvent({eventName:"CONSENT_CHECKBOX_CHANGE",isSelected:w,actionToken:m})}async setup(){await _t(),$t(this.uniqueIdentifier,{onHeightChange:this.handleHeightChange.bind(this),onIframeReady:this.handleIframeReady.bind(this),onStateChange:this.handleStateChange.bind(this),onTooltipChange:this.handleTooltipChange.bind(this)})}handleTooltipChange(v){if(!this.iframe)return;const w=this.iframe.getBoundingClientRect(),{text:m,coordinates:g,isVisible:y}=v,b=g.x+w.left,F=g.y+w.top;y?this.tooltipManager.show(m,b,F):this.tooltipManager.hide()}mount(v){zt(this.iframeIdentifier);const w=Mt(v),m=Ht(this.options);return this.iframe=Lt(m,this.iframeIdentifier),w.appendChild(this.iframe),this}unmount(){qt(this.uniqueIdentifier),this.iframe&&(this.iframe.remove(),this.iframe=null)}getState(){return{...this.state}}get iframeIdentifier(){return`consent-box-${this.uniqueIdentifier}`}get uniqueIdentifier(){return this.options.consentTemplateId}}const Yt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Zt(p){let v="widget/";return"disclosureRequestId"in p.configProps?v+=["disclosures",p.configProps.disclosureRequestId].join("/"):v+=p.request,v}function Vt(p){const v=p.isSandbox??!1,w=p.developmentUrl||(v?Ue:Fe),m=Object.entries(p.configProps).filter(([y,b])=>b||y==="disclosureRequestId").map(([y,b])=>`${y}=${encodeURIComponent(b)}`).join("&"),g=Zt(p);return`${w}/${g}?sdk=web&${m}`}const Xt=!!(typeof window<"u"&&window.document&&window.document.createElement);let Y=null,We=null;function Ie(p=null){Y&&!Y.closed&&Y.focus(),p==null||p.preventDefault()}function Pe(){document.body.style.filter="",document.body.removeEventListener("click",Ie)}function Kt(){We=setInterval(()=>{(!Y||Y.closed)&&(We&&clearInterval(We),Pe())},jt)}function Qt(p){const v=Vt(p),w=Nt,m=Dt,g=window.screenLeft!==void 0?window.screenLeft:window.screenX,y=window.screenTop!==void 0?window.screenTop:window.screenY,b=window.innerWidth||document.documentElement.clientWidth||window.screen.width,F=window.innerHeight||document.documentElement.clientHeight||window.screen.height,V=b/window.screen.availWidth,re=(b-w)/2/V+g,Z=(F-m)/2/V+y;document.body.style.filter="blur(5px)",document.body.addEventListener("click",Ie),Y=window.open(v,"Soyio",`scrollbars=yes,
44
+ `,this.tooltipElement.appendChild(w),document.body.appendChild(this.tooltipElement)}setupGlobalListeners(){window.addEventListener("scroll",()=>this.hide(),!0),window.addEventListener("resize",()=>this.hide()),window.addEventListener("orientationchange",()=>this.hide())}show(m,w,v){!this.tooltipElement||!this.tooltipContent||(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null),this.tooltipContent.textContent=m,this.tooltipElement.style.left=`${w}px`,this.tooltipElement.style.top=`${v}px`,this.tooltipElement.style.opacity="1")}hide(){this.tooltipElement&&(this.tooltipElement.style.opacity="0")}destroy(){var m;(m=this.tooltipElement)==null||m.remove(),this.tooltipElement=null,this.tooltipContent=null,this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}}class Jt{constructor(m){k(this,"appearance");k(this,"options");k(this,"tooltipManager");k(this,"iframe",null);k(this,"state",{isSelected:!1,actionToken:null});this.options=m,this.appearance=m.appearance||null,this.tooltipManager=new kt,this.setup()}handleHeightChange(m){this.iframe&&(this.iframe.style.height=`${m}px`)}async handleIframeReady(){!this.iframe||!this.appearance||await H(this.iframe,this.appearance,this.uniqueIdentifier)}handleStateChange(m){const{isSelected:w,actionToken:v}=m;this.state={isSelected:w,actionToken:v},this.options.onEvent({eventName:"CONSENT_CHECKBOX_CHANGE",isSelected:w,actionToken:v})}async setup(){await _t(),$t(this.uniqueIdentifier,{onHeightChange:this.handleHeightChange.bind(this),onIframeReady:this.handleIframeReady.bind(this),onStateChange:this.handleStateChange.bind(this),onTooltipChange:this.handleTooltipChange.bind(this)})}handleTooltipChange(m){if(!this.iframe)return;const w=this.iframe.getBoundingClientRect(),{text:v,coordinates:g,isVisible:y}=m,b=g.x+w.left,F=g.y+w.top;y?this.tooltipManager.show(v,b,F):this.tooltipManager.hide()}mount(m){zt(this.iframeIdentifier);const w=Mt(m),v=Ht(this.options);return this.iframe=Lt(v,this.iframeIdentifier),w.appendChild(this.iframe),this}unmount(){qt(this.uniqueIdentifier),this.iframe&&(this.iframe.remove(),this.iframe=null)}getState(){return{...this.state}}get iframeIdentifier(){return`consent-box-${this.uniqueIdentifier}`}get uniqueIdentifier(){return this.options.consentTemplateId}}const Yt=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Zt(p){let m="widget/";return"disclosureRequestId"in p.configProps?m+=["disclosures",p.configProps.disclosureRequestId].join("/"):m+=p.request,m}function Vt(p){const m=p.isSandbox??!1,w=p.developmentUrl||(m?Ue:Fe),v=Object.entries(p.configProps).filter(([y,b])=>b||y==="disclosureRequestId").map(([y,b])=>`${y}=${encodeURIComponent(b)}`).join("&"),g=Zt(p);return`${w}/${g}?sdk=web&${v}`}const Xt=!!(typeof window<"u"&&window.document&&window.document.createElement);let Y=null,We=null;function Ie(p=null){Y&&!Y.closed&&Y.focus(),p==null||p.preventDefault()}function Pe(){document.body.style.filter="",document.body.removeEventListener("click",Ie)}function Kt(){We=setInterval(()=>{(!Y||Y.closed)&&(We&&clearInterval(We),Pe())},jt)}function Qt(p){const m=Vt(p),w=Nt,v=Dt,g=window.screenLeft!==void 0?window.screenLeft:window.screenX,y=window.screenTop!==void 0?window.screenTop:window.screenY,b=window.innerWidth||document.documentElement.clientWidth||window.screen.width,F=window.innerHeight||document.documentElement.clientHeight||window.screen.height,V=b/window.screen.availWidth,re=(b-w)/2/V+g,Z=(F-v)/2/V+y;document.body.style.filter="blur(5px)",document.body.addEventListener("click",Ie),Y=window.open(m,"Soyio",`scrollbars=yes,
45
45
  width=${w},
46
- height=${m},
46
+ height=${v},
47
47
  top=${Z},
48
- left=${re}`),Ie(),Kt()}function en(){Y&&(Y.close(),Y=null),Pe()}const tn="WIDGET_EVENT";let ie=null;function nn(){ie&&(ie.cancel(),ie=null)}async function rn(p){const{onEvent:v}=p,w=await Promise.resolve().then(()=>Ce);ie&&nn(),ie=w.on(tn,async m=>{v(m.data),At.includes(m.data.eventName)?en():m.data.eventName===Rt&&Pe()})}function on(p){rn(p)}class qe{constructor(v){Ct(this,me);k(this,"onEvent");this.onEvent=v.onEvent,Xt&&(Qt(v),on({onEvent:Tt(this,me,Ot).bind(this)}))}}me=new WeakSet,Ot=function(v){this.onEvent(v)};var an=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sn(p){return p&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p}var ke={exports:{}},Je={exports:{}};(function(p,v){(function(w,m){p.exports=m()})(typeof self<"u"?self:an,function(){return function(w){var m={};function g(y){if(m[y])return m[y].exports;var b=m[y]={i:y,l:!1,exports:{}};return w[y].call(b.exports,b,b.exports,g),b.l=!0,b.exports}return g.m=w,g.c=m,g.d=function(y,b,F){g.o(y,b)||Object.defineProperty(y,b,{enumerable:!0,get:F})},g.r=function(y){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})},g.t=function(y,b){if(1&b&&(y=g(y)),8&b||4&b&&typeof y=="object"&&y&&y.__esModule)return y;var F=Object.create(null);if(g.r(F),Object.defineProperty(F,"default",{enumerable:!0,value:y}),2&b&&typeof y!="string")for(var V in y)g.d(F,V,(function(re){return y[re]}).bind(null,V));return F},g.n=function(y){var b=y&&y.__esModule?function(){return y.default}:function(){return y};return g.d(b,"a",b),b},g.o=function(y,b){return{}.hasOwnProperty.call(y,b)},g.p="",g(g.s=0)}([function(w,m,g){g.r(m),g.d(m,"Promise",function(){return I}),g.d(m,"TYPES",function(){return An}),g.d(m,"ProxyWindow",function(){return B}),g.d(m,"setup",function(){return Pt}),g.d(m,"destroy",function(){return On}),g.d(m,"serializeMessage",function(){return In}),g.d(m,"deserializeMessage",function(){return Pn}),g.d(m,"createProxyWindow",function(){return Cn}),g.d(m,"toProxyWindow",function(){return Tn}),g.d(m,"on",function(){return X}),g.d(m,"once",function(){return Wn}),g.d(m,"send",function(){return K}),g.d(m,"markWindowKnown",function(){return pt}),g.d(m,"cleanUpWindow",function(){return Rn}),g.d(m,"bridge",function(){});function y(e){return{}.toString.call(e)==="[object RegExp]"}var b=`Call was rejected by callee.\r
49
- `;function F(e){return e===void 0&&(e=window),e.location.protocol}function V(e){if(e===void 0&&(e=window),e.mockDomain){var n=e.mockDomain.split("//")[0];if(n)return n}return F(e)}function re(e){return e===void 0&&(e=window),V(e)==="about:"}function Z(e){if(e===void 0&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch{}}function Ze(e){if(e===void 0&&(e=window),e&&!Z(e))try{return e.opener}catch{}}function ve(e){try{return!0}catch{}return!1}function we(e){e===void 0&&(e=window);var n=e.location;if(!n)throw new Error("Can not read window location");var t=F(e);if(!t)throw new Error("Can not read window protocol");if(t==="file:")return"file://";if(t==="about:"){var r=Z(e);return r&&ve()?we(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function M(e){e===void 0&&(e=window);var n=we(e);return n&&e.mockDomain&&e.mockDomain.indexOf("mock:")===0?e.mockDomain:n}function Q(e){if(!function(n){try{if(n===window)return!0}catch{}try{var t=Object.getOwnPropertyDescriptor(n,"location");if(t&&t.enumerable===!1)return!1}catch{}try{if(re(n)&&ve())return!0}catch{}try{if(function(r){return r===void 0&&(r=window),V(r)==="mock:"}(n)&&ve())return!0}catch{}try{if(we(n)===we(window))return!0}catch{}return!1}(e))return!1;try{if(e===window||re(e)&&ve()||M(window)===M(e))return!0}catch{}return!1}function ge(e){if(!Q(e))throw new Error("Expected window to be same domain");return e}function Ve(e,n){if(!e||!n)return!1;var t=Z(n);return t?t===e:function(r){var o=[];try{for(;r.parent!==r;)o.push(r.parent),r=r.parent}catch{}return o}(n).indexOf(e)!==-1}function Xe(e){var n=[],t;try{t=e.frames}catch{t=e}var r;try{r=t.length}catch{}if(r===0)return n;if(r){for(var o=0;o<r;o++){var i=void 0;try{i=t[o]}catch{continue}n.push(i)}return n}for(var a=0;a<100;a++){var c=void 0;try{c=t[a]}catch{return n}if(!c)return n;n.push(c)}return n}var cn=[],dn=[];function $(e,n){n===void 0&&(n=!0);try{if(e===window)return!1}catch{return!0}try{if(!e)return!0}catch{return!0}try{if(e.closed)return!0}catch(o){return!o||o.message!==b}if(n&&Q(e))try{if(e.mockclosed)return!0}catch{}try{if(!e.parent||!e.top)return!0}catch{}var t=function(o,i){for(var a=0;a<o.length;a++)try{if(o[a]===i)return a}catch{}return-1}(cn,e);if(t!==-1){var r=dn[t];if(r&&function(o){if(!o.contentWindow||!o.parentNode)return!0;var i=o.ownerDocument;if(i&&i.documentElement&&!i.documentElement.contains(o)){for(var a=o;a.parentNode&&a.parentNode!==a;)a=a.parentNode;if(!a.host||!i.documentElement.contains(a.host))return!0}return!1}(r))return!0}return!1}function Ke(e){return e===void 0&&(e=window),Ze(e=e||window)||Z(e)||void 0}function oe(e,n){if(typeof e=="string"){if(typeof n=="string")return e==="*"||n===e;if(y(n)||Array.isArray(n))return!1}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){return oe(t,n)}))}function ye(e){try{if(e===window)return!0}catch(n){if(n&&n.message===b)return!0}try{if({}.toString.call(e)==="[object Window]")return!0}catch(n){if(n&&n.message===b)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(n){if(n&&n.message===b)return!0}try{if(e&&e.self===e)return!0}catch(n){if(n&&n.message===b)return!0}try{if(e&&e.parent===e)return!0}catch(n){if(n&&n.message===b)return!0}try{if(e&&e.top===e)return!0}catch(n){if(n&&n.message===b)return!0}try{if(e&&e.__cross_domain_utils_window_check__==="__unlikely_value__")return!1}catch{return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch{}return!1}function Qe(e){if(Q(e))return ge(e).frameElement;for(var n=0,t=document.querySelectorAll("iframe");n<t.length;n++){var r=t[n];if(r&&r.contentWindow&&r.contentWindow===e)return r}}function fn(e){if(function(t){return t===void 0&&(t=window),!!Z(t)}(e)){var n=Qe(e);if(n&&n.parentElement){n.parentElement.removeChild(n);return}}try{e.close()}catch{}}function ee(e){try{if(!e)return!1;if(typeof Promise<"u"&&e instanceof Promise)return!0;if(typeof window<"u"&&typeof window.Window=="function"&&e instanceof window.Window||typeof window<"u"&&typeof window.constructor=="function"&&e instanceof window.constructor)return!1;var n={}.toString;if(n){var t=n.call(e);if(t==="[object Window]"||t==="[object global]"||t==="[object DOMWindow]")return!1}if(typeof e.then=="function")return!0}catch{return!1}return!1}var et=[],ae=[],Te=0,se;function tt(){if(!Te&&se){var e=se;se=null,e.resolve()}}function Oe(){Te+=1}function ue(){Te-=1,tt()}var I=function(){function e(t){var r=this;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){var o,i,a=!1,c=!1,u=!1;Oe();try{t(function(s){u?r.resolve(s):(a=!0,o=s)},function(s){u?r.reject(s):(c=!0,i=s)})}catch(s){ue(),this.reject(s);return}ue(),u=!0,a?this.resolve(o):c&&this.reject(i)}}var n=e.prototype;return n.resolve=function(t){if(this.resolved||this.rejected)return this;if(ee(t))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=t,this.dispatch(),this},n.reject=function(t){var r=this;if(this.resolved||this.rejected)return this;if(ee(t))throw new Error("Can not reject promise with another promise");if(!t){var o=t&&typeof t.toString=="function"?t.toString():{}.toString.call(t);t=new Error("Expected reject to be called with Error, got "+o)}return this.rejected=!0,this.error=t,this.errorHandled||setTimeout(function(){r.errorHandled||function(i,a){if(et.indexOf(i)===-1){et.push(i),setTimeout(function(){throw i},1);for(var c=0;c<ae.length;c++)ae[c](i,a)}}(t,r)},1),this.dispatch(),this},n.asyncReject=function(t){return this.errorHandled=!0,this.reject(t),this},n.dispatch=function(){var t=this.resolved,r=this.rejected,o=this.handlers;if(!this.dispatching&&(t||r)){this.dispatching=!0,Oe();for(var i=function(h,x){return h.then(function(E){x.resolve(E)},function(E){x.reject(E)})},a=0;a<o.length;a++){var c=o[a],u=c.onSuccess,s=c.onError,l=c.promise,d=void 0;if(t)try{d=u?u(this.value):this.value}catch(h){l.reject(h);continue}else if(r){if(!s){l.reject(this.error);continue}try{d=s(this.error)}catch(h){l.reject(h);continue}}if(d instanceof e&&(d.resolved||d.rejected)){var f=d;f.resolved?l.resolve(f.value):l.reject(f.error),f.errorHandled=!0}else ee(d)?d instanceof e&&(d.resolved||d.rejected)?d.resolved?l.resolve(d.value):l.reject(d.error):i(d,l):l.resolve(d)}o.length=0,this.dispatching=!1,ue()}},n.then=function(t,r){if(t&&typeof t!="function"&&!t.call)throw new Error("Promise.then expected a function for success handler");if(r&&typeof r!="function"&&!r.call)throw new Error("Promise.then expected a function for error handler");var o=new e;return this.handlers.push({promise:o,onSuccess:t,onError:r}),this.errorHandled=!0,this.dispatch(),o},n.catch=function(t){return this.then(void 0,t)},n.finally=function(t){if(t&&typeof t!="function"&&!t.call)throw new Error("Promise.finally expected a function");return this.then(function(r){return e.try(t).then(function(){return r})},function(r){return e.try(t).then(function(){throw r})})},n.timeout=function(t,r){var o=this;if(this.resolved||this.rejected)return this;var i=setTimeout(function(){o.resolved||o.rejected||o.reject(r||new Error("Promise timed out after "+t+"ms"))},t);return this.then(function(a){return clearTimeout(i),a})},n.toPromise=function(){if(typeof Promise>"u")throw new TypeError("Could not find Promise");return Promise.resolve(this)},n.lazy=function(){return this.errorHandled=!0,this},e.resolve=function(t){return t instanceof e?t:ee(t)?new e(function(r,o){return t.then(r,o)}):new e().resolve(t)},e.reject=function(t){return new e().reject(t)},e.asyncReject=function(t){return new e().asyncReject(t)},e.all=function(t){var r=new e,o=t.length,i=[].slice();if(!o)return r.resolve(i),r;for(var a=function(s,l,d){return l.then(function(f){i[s]=f,(o-=1)==0&&r.resolve(i)},function(f){d.reject(f)})},c=0;c<t.length;c++){var u=t[c];if(u instanceof e){if(u.resolved){i[c]=u.value,o-=1;continue}}else if(!ee(u)){i[c]=u,o-=1;continue}a(c,e.resolve(u),r)}return o===0&&r.resolve(i),r},e.hash=function(t){var r={},o=[],i=function(c){if(t.hasOwnProperty(c)){var u=t[c];ee(u)?o.push(u.then(function(s){r[c]=s})):r[c]=u}};for(var a in t)i(a);return e.all(o).then(function(){return r})},e.map=function(t,r){return e.all(t.map(r))},e.onPossiblyUnhandledException=function(t){return function(r){return ae.push(r),{cancel:function(){ae.splice(ae.indexOf(r),1)}}}(t)},e.try=function(t,r,o){if(t&&typeof t!="function"&&!t.call)throw new Error("Promise.try expected a function");var i;Oe();try{i=t.apply(r,o||[])}catch(a){return ue(),e.reject(a)}return ue(),e.resolve(i)},e.delay=function(t){return new e(function(r){setTimeout(r,t)})},e.isPromise=function(t){return!!(t&&t instanceof e)||ee(t)},e.flush=function(){return function(t){var r=se=se||new t;return tt(),r}(e)},e}();function Ee(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch{}return-1}var Ae=function(){function e(){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(){if(typeof WeakMap>"u"||Object.freeze===void 0)return!1;try{var t=new WeakMap,r={};return Object.freeze(r),t.set(r,"__testvalue__"),t.get(r)==="__testvalue__"}catch{return!1}}())try{this.weakmap=new WeakMap}catch{}this.keys=[],this.values=[]}var n=e.prototype;return n._cleanupClosedWindows=function(){for(var t=this.weakmap,r=this.keys,o=0;o<r.length;o++){var i=r[o];if(ye(i)&&$(i)){if(t)try{t.delete(i)}catch{}r.splice(o,1),this.values.splice(o,1),o-=1}}},n.isSafeToReadWrite=function(t){return!ye(t)},n.set=function(t,r){if(!t)throw new Error("WeakMap expected key");var o=this.weakmap;if(o)try{o.set(t,r)}catch{delete this.weakmap}if(this.isSafeToReadWrite(t))try{var i=this.name,a=t[i];a&&a[0]===t?a[1]=r:Object.defineProperty(t,i,{value:[t,r],writable:!0});return}catch{}this._cleanupClosedWindows();var c=this.keys,u=this.values,s=Ee(c,t);s===-1?(c.push(t),u.push(r)):u[s]=r},n.get=function(t){if(!t)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{if(r.has(t))return r.get(t)}catch{delete this.weakmap}if(this.isSafeToReadWrite(t))try{var o=t[this.name];return o&&o[0]===t?o[1]:void 0}catch{}this._cleanupClosedWindows();var i=Ee(this.keys,t);if(i!==-1)return this.values[i]},n.delete=function(t){if(!t)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{r.delete(t)}catch{delete this.weakmap}if(this.isSafeToReadWrite(t))try{var o=t[this.name];o&&o[0]===t&&(o[0]=o[1]=void 0)}catch{}this._cleanupClosedWindows();var i=this.keys,a=Ee(i,t);a!==-1&&(i.splice(a,1),this.values.splice(a,1))},n.has=function(t){if(!t)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{if(r.has(t))return!0}catch{delete this.weakmap}if(this.isSafeToReadWrite(t))try{var o=t[this.name];return!(!o||o[0]!==t)}catch{}return this._cleanupClosedWindows(),Ee(this.keys,t)!==-1},n.getOrSet=function(t,r){if(this.has(t))return this.get(t);var o=r();return this.set(t,o),o},e}();function nt(e){return e.name||e.__name__||e.displayName||"anonymous"}function rt(e,n){try{delete e.name,e.name=n}catch{}return e.__name__=e.displayName=n,e}function J(){var e="0123456789abcdef";return"uid_"+"xxxxxxxxxx".replace(/./g,function(){return e.charAt(Math.floor(Math.random()*e.length))})+"_"+function(n){if(typeof btoa=="function")return btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g,function(t,r){return String.fromCharCode(parseInt(r,16))})).replace(/[=]/g,"");if(typeof Buffer<"u")return Buffer.from(n,"utf8").toString("base64").replace(/[=]/g,"");throw new Error("Can not find window.btoa or Buffer")}(new Date().toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}var Se;function ot(e){try{return JSON.stringify([].slice.call(e),function(n,t){return typeof t=="function"?"memoize["+function(r){if(Se=Se||new Ae,r==null||typeof r!="object"&&typeof r!="function")throw new Error("Invalid object");var o=Se.get(r);return o||(o=typeof r+":"+J(),Se.set(r,o)),o}(t)+"]":typeof window<"u"&&t instanceof window.Element||t!==null&&typeof t=="object"&&t.nodeType===1&&typeof t.style=="object"&&typeof t.ownerDocument=="object"?{}:t})}catch{throw new Error("Arguments not serializable -- can not be used to memoize")}}function ln(){return{}}var ce=0,it=0;function de(e,n){n===void 0&&(n={});var t=n.thisNamespace,r=t!==void 0&&t,o=n.time,i,a,c=ce;ce+=1;var u=function(){for(var s=arguments.length,l=new Array(s),d=0;d<s;d++)l[d]=arguments[d];c<it&&(i=null,a=null,c=ce,ce+=1);var f;f=r?(a=a||new Ae).getOrSet(this,ln):i=i||{};var h;try{h=ot(l)}catch{return e.apply(this,arguments)}var x=f[h];if(x&&o&&Date.now()-x.time<o&&(delete f[h],x=null),x)return x.value;var E=Date.now(),S=e.apply(this,arguments);return f[h]={time:E,value:S},S};return u.reset=function(){i=null,a=null},rt(u,(n.name||nt(e))+"::memoized")}de.clear=function(){it=ce};function hn(e){var n={};function t(){for(var r=arguments,o=this,i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];var u=ot(a);return n.hasOwnProperty(u)||(n[u]=I.try(function(){return e.apply(o,r)}).finally(function(){delete n[u]})),n[u]}return t.reset=function(){n={}},rt(t,nt(e)+"::promiseMemoized")}function te(){}function fe(e,n){if(n===void 0&&(n=1),n>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";if(typeof e=="string")return e;if(e instanceof Error){var t=e&&e.stack,r=e&&e.message;if(t&&r)return t.indexOf(r)!==-1?t:r+`
50
- `+t;if(t)return t;if(r)return r}return e&&e.toString&&typeof e.toString=="function"?e.toString():{}.toString.call(e)}catch(o){return"Error while stringifying error: "+fe(o,n+1)}}function at(e){return typeof e=="string"?e:e&&e.toString&&typeof e.toString=="function"?e.toString():{}.toString.call(e)}de(function(e){if(Object.values)return Object.values(e);var n=[];for(var t in e)e.hasOwnProperty(t)&&n.push(e[t]);return n});function Re(e){return{}.toString.call(e)==="[object RegExp]"}function le(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function st(){var e=document.body;if(!e)throw new Error("Body element not found");return e}function ut(){return!!document.body&&document.readyState==="complete"}function ct(){return!!document.body&&document.readyState==="interactive"}de(function(){return new I(function(e){if(ut()||ct())return e();var n=setInterval(function(){if(ut()||ct())return clearInterval(n),e()},10)})});var xe=typeof document<"u"?document.currentScript:null,pn=de(function(){if(xe||(xe=function(){try{var e=function(){try{throw new Error("_")}catch(a){return a.stack||""}}(),n=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e),t=n&&n[1];if(!t)return;for(var r=0,o=[].slice.call(document.getElementsByTagName("script")).reverse();r<o.length;r++){var i=o[r];if(i.src&&i.src===t)return i}}catch{}}()))return xe;throw new Error("Can not determine current script")}),mn=J();de(function(){var e;try{e=pn()}catch{return mn}var n=e.getAttribute("data-uid");if(n&&typeof n=="string"||(n=e.getAttribute("data-uid-auto"))&&typeof n=="string")return n;if(e.src){var t=function(r){for(var o="",i=0;i<r.length;i++){var a=r[i].charCodeAt(0)*i;r[i+1]&&(a+=r[i+1].charCodeAt(0)*(i-1)),o+=String.fromCharCode(97+Math.abs(a)%26)}return o}(JSON.stringify({src:e.src,dataset:e.dataset}));n="uid_"+t.slice(t.length-30)}else n=J();return e.setAttribute("data-uid-auto",n),n});function he(e){e===void 0&&(e=window);var n="__post_robot_10_0_46__";return e!==window?e[n]:e[n]=e[n]||{}}var dt=function(){return{}};function j(e,n){return e===void 0&&(e="store"),n===void 0&&(n=dt),le(he(),e,function(){var t=n();return{has:function(r){return t.hasOwnProperty(r)},get:function(r,o){return t.hasOwnProperty(r)?t[r]:o},set:function(r,o){return t[r]=o,o},del:function(r){delete t[r]},getOrSet:function(r,o){return le(t,r,o)},reset:function(){t=n()},keys:function(){return Object.keys(t)}}})}var vn=function(){};function be(){var e=he();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new vn,e.WINDOW_WILDCARD}function L(e,n){return e===void 0&&(e="store"),n===void 0&&(n=dt),j("windowStore").getOrSet(e,function(){var t=new Ae,r=function(o){return t.getOrSet(o,n)};return{has:function(o){return r(o).hasOwnProperty(e)},get:function(o,i){var a=r(o);return a.hasOwnProperty(e)?a[e]:i},set:function(o,i){return r(o)[e]=i,i},del:function(o){delete r(o)[e]},getOrSet:function(o,i){return le(r(o),e,i)}}})}function ft(){return j("instance").getOrSet("instanceID",J)}function lt(e,n){var t=n.domain,r=L("helloPromises"),o=r.get(e);o&&o.resolve({domain:t});var i=I.resolve({domain:t});return r.set(e,i),i}function Ne(e,n){return(0,n.send)(e,"postrobot_hello",{instanceID:ft()},{domain:"*",timeout:-1}).then(function(t){var r=t.origin,o=t.data.instanceID;return lt(e,{domain:r}),{win:e,domain:r,instanceID:o}})}function ht(e,n){var t=n.send;return L("windowInstanceIDPromises").getOrSet(e,function(){return Ne(e,{send:t}).then(function(r){return r.instanceID})})}function pt(e){L("knownWindows").set(e,!0)}function De(e){return typeof e=="object"&&e!==null&&typeof e.__type__=="string"}function mt(e){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}function ne(e,n){return{__type__:e,__val__:n}}var U,wn=((U={}).function=function(){},U.error=function(e){return ne("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},U.promise=function(){},U.regex=function(e){return ne("regex",e.source)},U.date=function(e){return ne("date",e.toJSON())},U.array=function(e){return e},U.object=function(e){return e},U.string=function(e){return e},U.number=function(e){return e},U.boolean=function(e){return e},U.null=function(e){return e},U[void 0]=function(e){return ne("undefined",e)},U),gn={},G,yn=((G={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},G.error=function(e){var n=e.stack,t=e.code,r=e.data,o=new Error(e.message);return o.code=t,r&&(o.data=r),o.stack=n+`
48
+ left=${re}`),Ie(),Kt()}function en(){Y&&(Y.close(),Y=null),Pe()}const tn="WIDGET_EVENT";let ie=null;function nn(){ie&&(ie.cancel(),ie=null)}async function rn(p){const{onEvent:m}=p,w=await Promise.resolve().then(()=>Ce);ie&&nn(),ie=w.on(tn,async v=>{m(v.data),At.includes(v.data.eventName)?en():v.data.eventName===Rt&&Pe()})}function on(p){rn(p)}class qe{constructor(m){Ct(this,ve);k(this,"onEvent");this.onEvent=m.onEvent,Xt&&(Qt(m),on({onEvent:Tt(this,ve,Ot).bind(this)}))}}ve=new WeakSet,Ot=function(m){this.onEvent(m)};var an=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sn(p){return p&&p.__esModule&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p}var ke={exports:{}},Je={exports:{}};(function(p,m){(function(w,v){p.exports=v()})(typeof self<"u"?self:an,function(){return function(w){var v={};function g(y){if(v[y])return v[y].exports;var b=v[y]={i:y,l:!1,exports:{}};return w[y].call(b.exports,b,b.exports,g),b.l=!0,b.exports}return g.m=w,g.c=v,g.d=function(y,b,F){g.o(y,b)||Object.defineProperty(y,b,{enumerable:!0,get:F})},g.r=function(y){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})},g.t=function(y,b){if(1&b&&(y=g(y)),8&b||4&b&&typeof y=="object"&&y&&y.__esModule)return y;var F=Object.create(null);if(g.r(F),Object.defineProperty(F,"default",{enumerable:!0,value:y}),2&b&&typeof y!="string")for(var V in y)g.d(F,V,(function(re){return y[re]}).bind(null,V));return F},g.n=function(y){var b=y&&y.__esModule?function(){return y.default}:function(){return y};return g.d(b,"a",b),b},g.o=function(y,b){return{}.hasOwnProperty.call(y,b)},g.p="",g(g.s=0)}([function(w,v,g){g.r(v),g.d(v,"Promise",function(){return I}),g.d(v,"TYPES",function(){return An}),g.d(v,"ProxyWindow",function(){return B}),g.d(v,"setup",function(){return Pt}),g.d(v,"destroy",function(){return On}),g.d(v,"serializeMessage",function(){return In}),g.d(v,"deserializeMessage",function(){return Pn}),g.d(v,"createProxyWindow",function(){return Cn}),g.d(v,"toProxyWindow",function(){return Tn}),g.d(v,"on",function(){return X}),g.d(v,"once",function(){return Wn}),g.d(v,"send",function(){return K}),g.d(v,"markWindowKnown",function(){return pt}),g.d(v,"cleanUpWindow",function(){return Rn}),g.d(v,"bridge",function(){});function y(e){return{}.toString.call(e)==="[object RegExp]"}var b=`Call was rejected by callee.\r
49
+ `;function F(e){return e===void 0&&(e=window),e.location.protocol}function V(e){if(e===void 0&&(e=window),e.mockDomain){var n=e.mockDomain.split("//")[0];if(n)return n}return F(e)}function re(e){return e===void 0&&(e=window),V(e)==="about:"}function Z(e){if(e===void 0&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch{}}function Ze(e){if(e===void 0&&(e=window),e&&!Z(e))try{return e.opener}catch{}}function me(e){try{return!0}catch{}return!1}function we(e){e===void 0&&(e=window);var n=e.location;if(!n)throw new Error("Can not read window location");var t=F(e);if(!t)throw new Error("Can not read window protocol");if(t==="file:")return"file://";if(t==="about:"){var r=Z(e);return r&&me()?we(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function M(e){e===void 0&&(e=window);var n=we(e);return n&&e.mockDomain&&e.mockDomain.indexOf("mock:")===0?e.mockDomain:n}function Q(e){if(!function(n){try{if(n===window)return!0}catch{}try{var t=Object.getOwnPropertyDescriptor(n,"location");if(t&&t.enumerable===!1)return!1}catch{}try{if(re(n)&&me())return!0}catch{}try{if(function(r){return r===void 0&&(r=window),V(r)==="mock:"}(n)&&me())return!0}catch{}try{if(we(n)===we(window))return!0}catch{}return!1}(e))return!1;try{if(e===window||re(e)&&me()||M(window)===M(e))return!0}catch{}return!1}function ge(e){if(!Q(e))throw new Error("Expected window to be same domain");return e}function Ve(e,n){if(!e||!n)return!1;var t=Z(n);return t?t===e:function(r){var o=[];try{for(;r.parent!==r;)o.push(r.parent),r=r.parent}catch{}return o}(n).indexOf(e)!==-1}function Xe(e){var n=[],t;try{t=e.frames}catch{t=e}var r;try{r=t.length}catch{}if(r===0)return n;if(r){for(var o=0;o<r;o++){var i=void 0;try{i=t[o]}catch{continue}n.push(i)}return n}for(var a=0;a<100;a++){var c=void 0;try{c=t[a]}catch{return n}if(!c)return n;n.push(c)}return n}var cn=[],dn=[];function $(e,n){n===void 0&&(n=!0);try{if(e===window)return!1}catch{return!0}try{if(!e)return!0}catch{return!0}try{if(e.closed)return!0}catch(o){return!o||o.message!==b}if(n&&Q(e))try{if(e.mockclosed)return!0}catch{}try{if(!e.parent||!e.top)return!0}catch{}var t=function(o,i){for(var a=0;a<o.length;a++)try{if(o[a]===i)return a}catch{}return-1}(cn,e);if(t!==-1){var r=dn[t];if(r&&function(o){if(!o.contentWindow||!o.parentNode)return!0;var i=o.ownerDocument;if(i&&i.documentElement&&!i.documentElement.contains(o)){for(var a=o;a.parentNode&&a.parentNode!==a;)a=a.parentNode;if(!a.host||!i.documentElement.contains(a.host))return!0}return!1}(r))return!0}return!1}function Ke(e){return e===void 0&&(e=window),Ze(e=e||window)||Z(e)||void 0}function oe(e,n){if(typeof e=="string"){if(typeof n=="string")return e==="*"||n===e;if(y(n)||Array.isArray(n))return!1}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){return oe(t,n)}))}function ye(e){try{if(e===window)return!0}catch(n){if(n&&n.message===b)return!0}try{if({}.toString.call(e)==="[object Window]")return!0}catch(n){if(n&&n.message===b)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(n){if(n&&n.message===b)return!0}try{if(e&&e.self===e)return!0}catch(n){if(n&&n.message===b)return!0}try{if(e&&e.parent===e)return!0}catch(n){if(n&&n.message===b)return!0}try{if(e&&e.top===e)return!0}catch(n){if(n&&n.message===b)return!0}try{if(e&&e.__cross_domain_utils_window_check__==="__unlikely_value__")return!1}catch{return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch{}return!1}function Qe(e){if(Q(e))return ge(e).frameElement;for(var n=0,t=document.querySelectorAll("iframe");n<t.length;n++){var r=t[n];if(r&&r.contentWindow&&r.contentWindow===e)return r}}function fn(e){if(function(t){return t===void 0&&(t=window),!!Z(t)}(e)){var n=Qe(e);if(n&&n.parentElement){n.parentElement.removeChild(n);return}}try{e.close()}catch{}}function ee(e){try{if(!e)return!1;if(typeof Promise<"u"&&e instanceof Promise)return!0;if(typeof window<"u"&&typeof window.Window=="function"&&e instanceof window.Window||typeof window<"u"&&typeof window.constructor=="function"&&e instanceof window.constructor)return!1;var n={}.toString;if(n){var t=n.call(e);if(t==="[object Window]"||t==="[object global]"||t==="[object DOMWindow]")return!1}if(typeof e.then=="function")return!0}catch{return!1}return!1}var et=[],ae=[],Te=0,se;function tt(){if(!Te&&se){var e=se;se=null,e.resolve()}}function Oe(){Te+=1}function ue(){Te-=1,tt()}var I=function(){function e(t){var r=this;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){var o,i,a=!1,c=!1,u=!1;Oe();try{t(function(s){u?r.resolve(s):(a=!0,o=s)},function(s){u?r.reject(s):(c=!0,i=s)})}catch(s){ue(),this.reject(s);return}ue(),u=!0,a?this.resolve(o):c&&this.reject(i)}}var n=e.prototype;return n.resolve=function(t){if(this.resolved||this.rejected)return this;if(ee(t))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=t,this.dispatch(),this},n.reject=function(t){var r=this;if(this.resolved||this.rejected)return this;if(ee(t))throw new Error("Can not reject promise with another promise");if(!t){var o=t&&typeof t.toString=="function"?t.toString():{}.toString.call(t);t=new Error("Expected reject to be called with Error, got "+o)}return this.rejected=!0,this.error=t,this.errorHandled||setTimeout(function(){r.errorHandled||function(i,a){if(et.indexOf(i)===-1){et.push(i),setTimeout(function(){throw i},1);for(var c=0;c<ae.length;c++)ae[c](i,a)}}(t,r)},1),this.dispatch(),this},n.asyncReject=function(t){return this.errorHandled=!0,this.reject(t),this},n.dispatch=function(){var t=this.resolved,r=this.rejected,o=this.handlers;if(!this.dispatching&&(t||r)){this.dispatching=!0,Oe();for(var i=function(h,x){return h.then(function(E){x.resolve(E)},function(E){x.reject(E)})},a=0;a<o.length;a++){var c=o[a],u=c.onSuccess,s=c.onError,l=c.promise,d=void 0;if(t)try{d=u?u(this.value):this.value}catch(h){l.reject(h);continue}else if(r){if(!s){l.reject(this.error);continue}try{d=s(this.error)}catch(h){l.reject(h);continue}}if(d instanceof e&&(d.resolved||d.rejected)){var f=d;f.resolved?l.resolve(f.value):l.reject(f.error),f.errorHandled=!0}else ee(d)?d instanceof e&&(d.resolved||d.rejected)?d.resolved?l.resolve(d.value):l.reject(d.error):i(d,l):l.resolve(d)}o.length=0,this.dispatching=!1,ue()}},n.then=function(t,r){if(t&&typeof t!="function"&&!t.call)throw new Error("Promise.then expected a function for success handler");if(r&&typeof r!="function"&&!r.call)throw new Error("Promise.then expected a function for error handler");var o=new e;return this.handlers.push({promise:o,onSuccess:t,onError:r}),this.errorHandled=!0,this.dispatch(),o},n.catch=function(t){return this.then(void 0,t)},n.finally=function(t){if(t&&typeof t!="function"&&!t.call)throw new Error("Promise.finally expected a function");return this.then(function(r){return e.try(t).then(function(){return r})},function(r){return e.try(t).then(function(){throw r})})},n.timeout=function(t,r){var o=this;if(this.resolved||this.rejected)return this;var i=setTimeout(function(){o.resolved||o.rejected||o.reject(r||new Error("Promise timed out after "+t+"ms"))},t);return this.then(function(a){return clearTimeout(i),a})},n.toPromise=function(){if(typeof Promise>"u")throw new TypeError("Could not find Promise");return Promise.resolve(this)},n.lazy=function(){return this.errorHandled=!0,this},e.resolve=function(t){return t instanceof e?t:ee(t)?new e(function(r,o){return t.then(r,o)}):new e().resolve(t)},e.reject=function(t){return new e().reject(t)},e.asyncReject=function(t){return new e().asyncReject(t)},e.all=function(t){var r=new e,o=t.length,i=[].slice();if(!o)return r.resolve(i),r;for(var a=function(s,l,d){return l.then(function(f){i[s]=f,(o-=1)==0&&r.resolve(i)},function(f){d.reject(f)})},c=0;c<t.length;c++){var u=t[c];if(u instanceof e){if(u.resolved){i[c]=u.value,o-=1;continue}}else if(!ee(u)){i[c]=u,o-=1;continue}a(c,e.resolve(u),r)}return o===0&&r.resolve(i),r},e.hash=function(t){var r={},o=[],i=function(c){if(t.hasOwnProperty(c)){var u=t[c];ee(u)?o.push(u.then(function(s){r[c]=s})):r[c]=u}};for(var a in t)i(a);return e.all(o).then(function(){return r})},e.map=function(t,r){return e.all(t.map(r))},e.onPossiblyUnhandledException=function(t){return function(r){return ae.push(r),{cancel:function(){ae.splice(ae.indexOf(r),1)}}}(t)},e.try=function(t,r,o){if(t&&typeof t!="function"&&!t.call)throw new Error("Promise.try expected a function");var i;Oe();try{i=t.apply(r,o||[])}catch(a){return ue(),e.reject(a)}return ue(),e.resolve(i)},e.delay=function(t){return new e(function(r){setTimeout(r,t)})},e.isPromise=function(t){return!!(t&&t instanceof e)||ee(t)},e.flush=function(){return function(t){var r=se=se||new t;return tt(),r}(e)},e}();function Ee(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch{}return-1}var Ae=function(){function e(){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(){if(typeof WeakMap>"u"||Object.freeze===void 0)return!1;try{var t=new WeakMap,r={};return Object.freeze(r),t.set(r,"__testvalue__"),t.get(r)==="__testvalue__"}catch{return!1}}())try{this.weakmap=new WeakMap}catch{}this.keys=[],this.values=[]}var n=e.prototype;return n._cleanupClosedWindows=function(){for(var t=this.weakmap,r=this.keys,o=0;o<r.length;o++){var i=r[o];if(ye(i)&&$(i)){if(t)try{t.delete(i)}catch{}r.splice(o,1),this.values.splice(o,1),o-=1}}},n.isSafeToReadWrite=function(t){return!ye(t)},n.set=function(t,r){if(!t)throw new Error("WeakMap expected key");var o=this.weakmap;if(o)try{o.set(t,r)}catch{delete this.weakmap}if(this.isSafeToReadWrite(t))try{var i=this.name,a=t[i];a&&a[0]===t?a[1]=r:Object.defineProperty(t,i,{value:[t,r],writable:!0});return}catch{}this._cleanupClosedWindows();var c=this.keys,u=this.values,s=Ee(c,t);s===-1?(c.push(t),u.push(r)):u[s]=r},n.get=function(t){if(!t)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{if(r.has(t))return r.get(t)}catch{delete this.weakmap}if(this.isSafeToReadWrite(t))try{var o=t[this.name];return o&&o[0]===t?o[1]:void 0}catch{}this._cleanupClosedWindows();var i=Ee(this.keys,t);if(i!==-1)return this.values[i]},n.delete=function(t){if(!t)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{r.delete(t)}catch{delete this.weakmap}if(this.isSafeToReadWrite(t))try{var o=t[this.name];o&&o[0]===t&&(o[0]=o[1]=void 0)}catch{}this._cleanupClosedWindows();var i=this.keys,a=Ee(i,t);a!==-1&&(i.splice(a,1),this.values.splice(a,1))},n.has=function(t){if(!t)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{if(r.has(t))return!0}catch{delete this.weakmap}if(this.isSafeToReadWrite(t))try{var o=t[this.name];return!(!o||o[0]!==t)}catch{}return this._cleanupClosedWindows(),Ee(this.keys,t)!==-1},n.getOrSet=function(t,r){if(this.has(t))return this.get(t);var o=r();return this.set(t,o),o},e}();function nt(e){return e.name||e.__name__||e.displayName||"anonymous"}function rt(e,n){try{delete e.name,e.name=n}catch{}return e.__name__=e.displayName=n,e}function J(){var e="0123456789abcdef";return"uid_"+"xxxxxxxxxx".replace(/./g,function(){return e.charAt(Math.floor(Math.random()*e.length))})+"_"+function(n){if(typeof btoa=="function")return btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g,function(t,r){return String.fromCharCode(parseInt(r,16))})).replace(/[=]/g,"");if(typeof Buffer<"u")return Buffer.from(n,"utf8").toString("base64").replace(/[=]/g,"");throw new Error("Can not find window.btoa or Buffer")}(new Date().toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}var Se;function ot(e){try{return JSON.stringify([].slice.call(e),function(n,t){return typeof t=="function"?"memoize["+function(r){if(Se=Se||new Ae,r==null||typeof r!="object"&&typeof r!="function")throw new Error("Invalid object");var o=Se.get(r);return o||(o=typeof r+":"+J(),Se.set(r,o)),o}(t)+"]":typeof window<"u"&&t instanceof window.Element||t!==null&&typeof t=="object"&&t.nodeType===1&&typeof t.style=="object"&&typeof t.ownerDocument=="object"?{}:t})}catch{throw new Error("Arguments not serializable -- can not be used to memoize")}}function ln(){return{}}var ce=0,it=0;function de(e,n){n===void 0&&(n={});var t=n.thisNamespace,r=t!==void 0&&t,o=n.time,i,a,c=ce;ce+=1;var u=function(){for(var s=arguments.length,l=new Array(s),d=0;d<s;d++)l[d]=arguments[d];c<it&&(i=null,a=null,c=ce,ce+=1);var f;f=r?(a=a||new Ae).getOrSet(this,ln):i=i||{};var h;try{h=ot(l)}catch{return e.apply(this,arguments)}var x=f[h];if(x&&o&&Date.now()-x.time<o&&(delete f[h],x=null),x)return x.value;var E=Date.now(),S=e.apply(this,arguments);return f[h]={time:E,value:S},S};return u.reset=function(){i=null,a=null},rt(u,(n.name||nt(e))+"::memoized")}de.clear=function(){it=ce};function hn(e){var n={};function t(){for(var r=arguments,o=this,i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];var u=ot(a);return n.hasOwnProperty(u)||(n[u]=I.try(function(){return e.apply(o,r)}).finally(function(){delete n[u]})),n[u]}return t.reset=function(){n={}},rt(t,nt(e)+"::promiseMemoized")}function te(){}function fe(e,n){if(n===void 0&&(n=1),n>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";if(typeof e=="string")return e;if(e instanceof Error){var t=e&&e.stack,r=e&&e.message;if(t&&r)return t.indexOf(r)!==-1?t:r+`
50
+ `+t;if(t)return t;if(r)return r}return e&&e.toString&&typeof e.toString=="function"?e.toString():{}.toString.call(e)}catch(o){return"Error while stringifying error: "+fe(o,n+1)}}function at(e){return typeof e=="string"?e:e&&e.toString&&typeof e.toString=="function"?e.toString():{}.toString.call(e)}de(function(e){if(Object.values)return Object.values(e);var n=[];for(var t in e)e.hasOwnProperty(t)&&n.push(e[t]);return n});function Re(e){return{}.toString.call(e)==="[object RegExp]"}function le(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function st(){var e=document.body;if(!e)throw new Error("Body element not found");return e}function ut(){return!!document.body&&document.readyState==="complete"}function ct(){return!!document.body&&document.readyState==="interactive"}de(function(){return new I(function(e){if(ut()||ct())return e();var n=setInterval(function(){if(ut()||ct())return clearInterval(n),e()},10)})});var xe=typeof document<"u"?document.currentScript:null,pn=de(function(){if(xe||(xe=function(){try{var e=function(){try{throw new Error("_")}catch(a){return a.stack||""}}(),n=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e),t=n&&n[1];if(!t)return;for(var r=0,o=[].slice.call(document.getElementsByTagName("script")).reverse();r<o.length;r++){var i=o[r];if(i.src&&i.src===t)return i}}catch{}}()))return xe;throw new Error("Can not determine current script")}),vn=J();de(function(){var e;try{e=pn()}catch{return vn}var n=e.getAttribute("data-uid");if(n&&typeof n=="string"||(n=e.getAttribute("data-uid-auto"))&&typeof n=="string")return n;if(e.src){var t=function(r){for(var o="",i=0;i<r.length;i++){var a=r[i].charCodeAt(0)*i;r[i+1]&&(a+=r[i+1].charCodeAt(0)*(i-1)),o+=String.fromCharCode(97+Math.abs(a)%26)}return o}(JSON.stringify({src:e.src,dataset:e.dataset}));n="uid_"+t.slice(t.length-30)}else n=J();return e.setAttribute("data-uid-auto",n),n});function he(e){e===void 0&&(e=window);var n="__post_robot_10_0_46__";return e!==window?e[n]:e[n]=e[n]||{}}var dt=function(){return{}};function j(e,n){return e===void 0&&(e="store"),n===void 0&&(n=dt),le(he(),e,function(){var t=n();return{has:function(r){return t.hasOwnProperty(r)},get:function(r,o){return t.hasOwnProperty(r)?t[r]:o},set:function(r,o){return t[r]=o,o},del:function(r){delete t[r]},getOrSet:function(r,o){return le(t,r,o)},reset:function(){t=n()},keys:function(){return Object.keys(t)}}})}var mn=function(){};function be(){var e=he();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new mn,e.WINDOW_WILDCARD}function L(e,n){return e===void 0&&(e="store"),n===void 0&&(n=dt),j("windowStore").getOrSet(e,function(){var t=new Ae,r=function(o){return t.getOrSet(o,n)};return{has:function(o){return r(o).hasOwnProperty(e)},get:function(o,i){var a=r(o);return a.hasOwnProperty(e)?a[e]:i},set:function(o,i){return r(o)[e]=i,i},del:function(o){delete r(o)[e]},getOrSet:function(o,i){return le(r(o),e,i)}}})}function ft(){return j("instance").getOrSet("instanceID",J)}function lt(e,n){var t=n.domain,r=L("helloPromises"),o=r.get(e);o&&o.resolve({domain:t});var i=I.resolve({domain:t});return r.set(e,i),i}function Ne(e,n){return(0,n.send)(e,"postrobot_hello",{instanceID:ft()},{domain:"*",timeout:-1}).then(function(t){var r=t.origin,o=t.data.instanceID;return lt(e,{domain:r}),{win:e,domain:r,instanceID:o}})}function ht(e,n){var t=n.send;return L("windowInstanceIDPromises").getOrSet(e,function(){return Ne(e,{send:t}).then(function(r){return r.instanceID})})}function pt(e){L("knownWindows").set(e,!0)}function De(e){return typeof e=="object"&&e!==null&&typeof e.__type__=="string"}function vt(e){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}function ne(e,n){return{__type__:e,__val__:n}}var U,wn=((U={}).function=function(){},U.error=function(e){return ne("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},U.promise=function(){},U.regex=function(e){return ne("regex",e.source)},U.date=function(e){return ne("date",e.toJSON())},U.array=function(e){return e},U.object=function(e){return e},U.string=function(e){return e},U.number=function(e){return e},U.boolean=function(e){return e},U.null=function(e){return e},U[void 0]=function(e){return ne("undefined",e)},U),gn={},G,yn=((G={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},G.error=function(e){var n=e.stack,t=e.code,r=e.data,o=new Error(e.message);return o.code=t,r&&(o.data=r),o.stack=n+`
51
51
 
52
- `+o.stack,o},G.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},G.regex=function(e){return new RegExp(e)},G.date=function(e){return new Date(e)},G.array=function(e){return e},G.object=function(e){return e},G.string=function(e){return e},G.number=function(e){return e},G.boolean=function(e){return e},G.null=function(e){return e},G[void 0]=function(){},G),En={};new I(function(e){if(window.document&&window.document.body)return e(window.document.body);var n=setInterval(function(){if(window.document&&window.document.body)return clearInterval(n),e(window.document.body)},10)});function je(){for(var e=j("idToProxyWindow"),n=0,t=e.keys();n<t.length;n++){var r=t[n];e.get(r).shouldClean()&&e.del(r)}}function vt(e,n){var t=n.send,r=n.id,o=r===void 0?J():r,i=e.then(function(u){if(Q(u))return ge(u).name}),a=e.then(function(u){if($(u))throw new Error("Window is closed, can not determine type");return Ze(u)?"popup":"iframe"});i.catch(te),a.catch(te);var c=function(){return e.then(function(u){if(!$(u))return Q(u)?ge(u).name:i})};return{id:o,getType:function(){return a},getInstanceID:hn(function(){return e.then(function(u){return ht(u,{send:t})})}),close:function(){return e.then(fn)},getName:c,focus:function(){return e.then(function(u){u.focus()})},isClosed:function(){return e.then(function(u){return $(u)})},setLocation:function(u,s){return s===void 0&&(s={}),e.then(function(l){var d=window.location.protocol+"//"+window.location.host,f=s.method,h=f===void 0?"get":f,x=s.body;if(u.indexOf("/")===0)u=""+d+u;else if(!u.match(/^https?:\/\//)&&u.indexOf(d)!==0)throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(u));if(h==="post")return c().then(function(E){if(!E)throw new Error("Can not post to window without target name");(function(S){var P=S.url,D=S.target,T=S.body,C=S.method,z=C===void 0?"post":C,W=document.createElement("form");if(W.setAttribute("target",D),W.setAttribute("method",z),W.setAttribute("action",P),W.style.display="none",T)for(var O=0,q=Object.keys(T);O<q.length;O++){var N,pe=q[O],He=document.createElement("input");He.setAttribute("name",pe),He.setAttribute("value",(N=T[pe])==null?void 0:N.toString()),W.appendChild(He)}st().appendChild(W),W.submit(),st().removeChild(W)})({url:u,target:E,method:h,body:x})});if(h!=="get")throw new Error("Unsupported method: "+h);if(Q(l))try{if(l.location&&typeof l.location.replace=="function"){l.location.replace(u);return}}catch{}l.location=u})},setName:function(u){return e.then(function(s){var l=Q(s),d=Qe(s);if(!l)throw new Error("Can not set name for cross-domain window: "+u);ge(s).name=u,d&&d.setAttribute("name",u),i=I.resolve(u)})}}}var B=function(){function e(t){var r=t.send,o=t.win,i=t.serializedWindow;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 I,this.serializedWindow=i||vt(this.actualWindowPromise,{send:r}),j("idToProxyWindow").set(this.getID(),this),o&&this.setWindow(o,{send:r})}var n=e.prototype;return n.getID=function(){return this.serializedWindow.id},n.getType=function(){return this.serializedWindow.getType()},n.isPopup=function(){return this.getType().then(function(t){return t==="popup"})},n.setLocation=function(t,r){var o=this;return this.serializedWindow.setLocation(t,r).then(function(){return o})},n.getName=function(){return this.serializedWindow.getName()},n.setName=function(t){var r=this;return this.serializedWindow.setName(t).then(function(){return r})},n.close=function(){var t=this;return this.serializedWindow.close().then(function(){return t})},n.focus=function(){var t=this,r=this.isPopup(),o=this.getName(),i=I.hash({isPopup:r,name:o}).then(function(c){var u=c.name;c.isPopup&&u&&window.open("",u,"noopener")}),a=this.serializedWindow.focus();return I.all([i,a]).then(function(){return t})},n.isClosed=function(){return this.serializedWindow.isClosed()},n.getWindow=function(){return this.actualWindow},n.setWindow=function(t,r){var o=r.send;this.actualWindow=t,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=vt(this.actualWindowPromise,{send:o,id:this.getID()}),L("winToProxyWindow").set(t,this)},n.awaitWindow=function(){return this.actualWindowPromise},n.matchWindow=function(t,r){var o=this,i=r.send;return I.try(function(){return o.actualWindow?t===o.actualWindow:I.hash({proxyInstanceID:o.getInstanceID(),knownWindowInstanceID:ht(t,{send:i})}).then(function(a){var c=a.proxyInstanceID===a.knownWindowInstanceID;return c&&o.setWindow(t,{send:i}),c})})},n.unwrap=function(){return this.actualWindow||this},n.getInstanceID=function(){return this.serializedWindow.getInstanceID()},n.shouldClean=function(){return!!(this.actualWindow&&$(this.actualWindow))},n.serialize=function(){return this.serializedWindow},e.unwrap=function(t){return e.isProxyWindow(t)?t.unwrap():t},e.serialize=function(t,r){var o=r.send;return je(),e.toProxyWindow(t,{send:o}).serialize()},e.deserialize=function(t,r){var o=r.send;return je(),j("idToProxyWindow").get(t.id)||new e({serializedWindow:t,send:o})},e.isProxyWindow=function(t){return!!(t&&!ye(t)&&t.isProxyWindow)},e.toProxyWindow=function(t,r){var o=r.send;if(je(),e.isProxyWindow(t))return t;var i=t;return L("winToProxyWindow").get(i)||new e({win:i,send:o})},e}();function ze(e,n,t,r,o){var i=L("methodStore"),a=j("proxyWindowMethods");B.isProxyWindow(r)?a.set(e,{val:n,name:t,domain:o,source:r}):(a.del(e),i.getOrSet(r,function(){return{}})[e]={domain:o,name:t,val:n,source:r})}function wt(e,n){var t=L("methodStore"),r=j("proxyWindowMethods");return t.getOrSet(e,function(){return{}})[n]||r.get(n)}function gt(e,n,t,r,o){a=(i={on:o.on,send:o.send}).on,c=i.send,j("builtinListeners").getOrSet("functionCalls",function(){return a("postrobot_method",{domain:"*"},function(l){var d=l.source,f=l.origin,h=l.data,x=h.id,E=h.name,S=wt(d,x);if(!S)throw new Error("Could not find method '"+E+"' with id: "+h.id+" in "+M(window));var P=S.source,D=S.domain,T=S.val;return I.try(function(){if(!oe(D,f))throw new Error("Method '"+h.name+"' domain "+JSON.stringify(Re(S.domain)?S.domain.source:S.domain)+" does not match origin "+f+" in "+M(window));if(B.isProxyWindow(P))return P.matchWindow(d,{send:c}).then(function(C){if(!C)throw new Error("Method call '"+h.name+"' failed - proxy window does not match source in "+M(window))})}).then(function(){return T.apply({source:d,origin:f},h.args)},function(C){return I.try(function(){if(T.onError)return T.onError(C)}).then(function(){throw C.stack&&(C.stack="Remote call to "+E+"("+function(z){return z===void 0&&(z=[]),(W=z,[].slice.call(W)).map(function(O){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+">"}).join(", ");var W}(h.args)+`) failed
52
+ `+o.stack,o},G.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},G.regex=function(e){return new RegExp(e)},G.date=function(e){return new Date(e)},G.array=function(e){return e},G.object=function(e){return e},G.string=function(e){return e},G.number=function(e){return e},G.boolean=function(e){return e},G.null=function(e){return e},G[void 0]=function(){},G),En={};new I(function(e){if(window.document&&window.document.body)return e(window.document.body);var n=setInterval(function(){if(window.document&&window.document.body)return clearInterval(n),e(window.document.body)},10)});function je(){for(var e=j("idToProxyWindow"),n=0,t=e.keys();n<t.length;n++){var r=t[n];e.get(r).shouldClean()&&e.del(r)}}function mt(e,n){var t=n.send,r=n.id,o=r===void 0?J():r,i=e.then(function(u){if(Q(u))return ge(u).name}),a=e.then(function(u){if($(u))throw new Error("Window is closed, can not determine type");return Ze(u)?"popup":"iframe"});i.catch(te),a.catch(te);var c=function(){return e.then(function(u){if(!$(u))return Q(u)?ge(u).name:i})};return{id:o,getType:function(){return a},getInstanceID:hn(function(){return e.then(function(u){return ht(u,{send:t})})}),close:function(){return e.then(fn)},getName:c,focus:function(){return e.then(function(u){u.focus()})},isClosed:function(){return e.then(function(u){return $(u)})},setLocation:function(u,s){return s===void 0&&(s={}),e.then(function(l){var d=window.location.protocol+"//"+window.location.host,f=s.method,h=f===void 0?"get":f,x=s.body;if(u.indexOf("/")===0)u=""+d+u;else if(!u.match(/^https?:\/\//)&&u.indexOf(d)!==0)throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(u));if(h==="post")return c().then(function(E){if(!E)throw new Error("Can not post to window without target name");(function(S){var P=S.url,D=S.target,T=S.body,C=S.method,z=C===void 0?"post":C,W=document.createElement("form");if(W.setAttribute("target",D),W.setAttribute("method",z),W.setAttribute("action",P),W.style.display="none",T)for(var O=0,q=Object.keys(T);O<q.length;O++){var N,pe=q[O],He=document.createElement("input");He.setAttribute("name",pe),He.setAttribute("value",(N=T[pe])==null?void 0:N.toString()),W.appendChild(He)}st().appendChild(W),W.submit(),st().removeChild(W)})({url:u,target:E,method:h,body:x})});if(h!=="get")throw new Error("Unsupported method: "+h);if(Q(l))try{if(l.location&&typeof l.location.replace=="function"){l.location.replace(u);return}}catch{}l.location=u})},setName:function(u){return e.then(function(s){var l=Q(s),d=Qe(s);if(!l)throw new Error("Can not set name for cross-domain window: "+u);ge(s).name=u,d&&d.setAttribute("name",u),i=I.resolve(u)})}}}var B=function(){function e(t){var r=t.send,o=t.win,i=t.serializedWindow;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 I,this.serializedWindow=i||mt(this.actualWindowPromise,{send:r}),j("idToProxyWindow").set(this.getID(),this),o&&this.setWindow(o,{send:r})}var n=e.prototype;return n.getID=function(){return this.serializedWindow.id},n.getType=function(){return this.serializedWindow.getType()},n.isPopup=function(){return this.getType().then(function(t){return t==="popup"})},n.setLocation=function(t,r){var o=this;return this.serializedWindow.setLocation(t,r).then(function(){return o})},n.getName=function(){return this.serializedWindow.getName()},n.setName=function(t){var r=this;return this.serializedWindow.setName(t).then(function(){return r})},n.close=function(){var t=this;return this.serializedWindow.close().then(function(){return t})},n.focus=function(){var t=this,r=this.isPopup(),o=this.getName(),i=I.hash({isPopup:r,name:o}).then(function(c){var u=c.name;c.isPopup&&u&&window.open("",u,"noopener")}),a=this.serializedWindow.focus();return I.all([i,a]).then(function(){return t})},n.isClosed=function(){return this.serializedWindow.isClosed()},n.getWindow=function(){return this.actualWindow},n.setWindow=function(t,r){var o=r.send;this.actualWindow=t,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=mt(this.actualWindowPromise,{send:o,id:this.getID()}),L("winToProxyWindow").set(t,this)},n.awaitWindow=function(){return this.actualWindowPromise},n.matchWindow=function(t,r){var o=this,i=r.send;return I.try(function(){return o.actualWindow?t===o.actualWindow:I.hash({proxyInstanceID:o.getInstanceID(),knownWindowInstanceID:ht(t,{send:i})}).then(function(a){var c=a.proxyInstanceID===a.knownWindowInstanceID;return c&&o.setWindow(t,{send:i}),c})})},n.unwrap=function(){return this.actualWindow||this},n.getInstanceID=function(){return this.serializedWindow.getInstanceID()},n.shouldClean=function(){return!!(this.actualWindow&&$(this.actualWindow))},n.serialize=function(){return this.serializedWindow},e.unwrap=function(t){return e.isProxyWindow(t)?t.unwrap():t},e.serialize=function(t,r){var o=r.send;return je(),e.toProxyWindow(t,{send:o}).serialize()},e.deserialize=function(t,r){var o=r.send;return je(),j("idToProxyWindow").get(t.id)||new e({serializedWindow:t,send:o})},e.isProxyWindow=function(t){return!!(t&&!ye(t)&&t.isProxyWindow)},e.toProxyWindow=function(t,r){var o=r.send;if(je(),e.isProxyWindow(t))return t;var i=t;return L("winToProxyWindow").get(i)||new e({win:i,send:o})},e}();function ze(e,n,t,r,o){var i=L("methodStore"),a=j("proxyWindowMethods");B.isProxyWindow(r)?a.set(e,{val:n,name:t,domain:o,source:r}):(a.del(e),i.getOrSet(r,function(){return{}})[e]={domain:o,name:t,val:n,source:r})}function wt(e,n){var t=L("methodStore"),r=j("proxyWindowMethods");return t.getOrSet(e,function(){return{}})[n]||r.get(n)}function gt(e,n,t,r,o){a=(i={on:o.on,send:o.send}).on,c=i.send,j("builtinListeners").getOrSet("functionCalls",function(){return a("postrobot_method",{domain:"*"},function(l){var d=l.source,f=l.origin,h=l.data,x=h.id,E=h.name,S=wt(d,x);if(!S)throw new Error("Could not find method '"+E+"' with id: "+h.id+" in "+M(window));var P=S.source,D=S.domain,T=S.val;return I.try(function(){if(!oe(D,f))throw new Error("Method '"+h.name+"' domain "+JSON.stringify(Re(S.domain)?S.domain.source:S.domain)+" does not match origin "+f+" in "+M(window));if(B.isProxyWindow(P))return P.matchWindow(d,{send:c}).then(function(C){if(!C)throw new Error("Method call '"+h.name+"' failed - proxy window does not match source in "+M(window))})}).then(function(){return T.apply({source:d,origin:f},h.args)},function(C){return I.try(function(){if(T.onError)return T.onError(C)}).then(function(){throw C.stack&&(C.stack="Remote call to "+E+"("+function(z){return z===void 0&&(z=[]),(W=z,[].slice.call(W)).map(function(O){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+">"}).join(", ");var W}(h.args)+`) failed
53
53
 
54
- `+C.stack),C})}).then(function(C){return{result:C,id:x,name:E}})})});var i,a,c,u=t.__id__||J();e=B.unwrap(e);var s=t.__name__||t.name||r;return typeof s=="string"&&typeof s.indexOf=="function"&&s.indexOf("anonymous::")===0&&(s=s.replace("anonymous::",r+"::")),B.isProxyWindow(e)?(ze(u,t,s,e,n),e.awaitWindow().then(function(l){ze(u,t,s,l,n)})):ze(u,t,s,e,n),ne("cross_domain_function",{id:u,name:s})}function yt(e,n,t,r){var o,i=r.on,a=r.send;return function(c,u){u===void 0&&(u=gn);var s=JSON.stringify(c,function(l){var d=this[l];if(De(this))return d;var f=mt(d);if(!f)return d;var h=u[f]||wn[f];return h?h(d,l):d});return s===void 0?"undefined":s}(t,((o={}).promise=function(c,u){return function(s,l,d,f,h){return ne("cross_domain_zalgo_promise",{then:gt(s,l,function(x,E){return d.then(x,E)},f,{on:h.on,send:h.send})})}(e,n,c,u,{on:i,send:a})},o.function=function(c,u){return gt(e,n,c,u,{on:i,send:a})},o.object=function(c){return ye(c)||B.isProxyWindow(c)?ne("cross_domain_window",B.serialize(c,{send:a})):c},o))}function Et(e,n,t,r){var o,i=r.send;return function(a,c){if(c===void 0&&(c=En),a!=="undefined")return JSON.parse(a,function(u,s){if(De(this))return s;var l,d;if(De(s)?(l=s.__type__,d=s.__val__):(l=mt(s),d=s),!l)return d;var f=c[l]||yn[l];return f?f(d,u):d})}(t,((o={}).cross_domain_zalgo_promise=function(a){return function(c,u,s){return new I(s.then)}(0,0,a)},o.cross_domain_function=function(a){return function(c,u,s,l){var d=s.id,f=s.name,h=l.send,x=function(S){S===void 0&&(S={});function P(){var D=arguments;return B.toProxyWindow(c,{send:h}).awaitWindow().then(function(T){var C=wt(T,d);if(C&&C.val!==P)return C.val.apply({source:window,origin:M()},D);var z=[].slice.call(D);return S.fireAndForget?h(T,"postrobot_method",{id:d,name:f,args:z},{domain:u,fireAndForget:!0}):h(T,"postrobot_method",{id:d,name:f,args:z},{domain:u,fireAndForget:!1}).then(function(W){return W.data.result})}).catch(function(T){throw T})}return P.__name__=f,P.__origin__=u,P.__source__=c,P.__id__=d,P.origin=u,P},E=x();return E.fireAndForget=x({fireAndForget:!0}),E}(e,n,a,{send:i})},o.cross_domain_window=function(a){return B.deserialize(a,{send:i})},o))}var Me={};Me.postrobot_post_message=function(e,n,t){t.indexOf("file:")===0&&(t="*"),e.postMessage(n,t)};function Le(e,n,t,r){var o=r.on,i=r.send;return I.try(function(){var a=L().getOrSet(e,function(){return{}});return a.buffer=a.buffer||[],a.buffer.push(t),a.flush=a.flush||I.flush().then(function(){if($(e))throw new Error("Window is closed");var c=yt(e,n,((u={}).__post_robot_10_0_46__=a.buffer||[],u),{on:o,send:i}),u;delete a.buffer;for(var s=Object.keys(Me),l=[],d=0;d<s.length;d++){var f=s[d];try{Me[f](e,c,n)}catch(h){l.push(h)}}if(l.length===s.length)throw new Error(`All post-robot messaging strategies failed:
54
+ `+C.stack),C})}).then(function(C){return{result:C,id:x,name:E}})})});var i,a,c,u=t.__id__||J();e=B.unwrap(e);var s=t.__name__||t.name||r;return typeof s=="string"&&typeof s.indexOf=="function"&&s.indexOf("anonymous::")===0&&(s=s.replace("anonymous::",r+"::")),B.isProxyWindow(e)?(ze(u,t,s,e,n),e.awaitWindow().then(function(l){ze(u,t,s,l,n)})):ze(u,t,s,e,n),ne("cross_domain_function",{id:u,name:s})}function yt(e,n,t,r){var o,i=r.on,a=r.send;return function(c,u){u===void 0&&(u=gn);var s=JSON.stringify(c,function(l){var d=this[l];if(De(this))return d;var f=vt(d);if(!f)return d;var h=u[f]||wn[f];return h?h(d,l):d});return s===void 0?"undefined":s}(t,((o={}).promise=function(c,u){return function(s,l,d,f,h){return ne("cross_domain_zalgo_promise",{then:gt(s,l,function(x,E){return d.then(x,E)},f,{on:h.on,send:h.send})})}(e,n,c,u,{on:i,send:a})},o.function=function(c,u){return gt(e,n,c,u,{on:i,send:a})},o.object=function(c){return ye(c)||B.isProxyWindow(c)?ne("cross_domain_window",B.serialize(c,{send:a})):c},o))}function Et(e,n,t,r){var o,i=r.send;return function(a,c){if(c===void 0&&(c=En),a!=="undefined")return JSON.parse(a,function(u,s){if(De(this))return s;var l,d;if(De(s)?(l=s.__type__,d=s.__val__):(l=vt(s),d=s),!l)return d;var f=c[l]||yn[l];return f?f(d,u):d})}(t,((o={}).cross_domain_zalgo_promise=function(a){return function(c,u,s){return new I(s.then)}(0,0,a)},o.cross_domain_function=function(a){return function(c,u,s,l){var d=s.id,f=s.name,h=l.send,x=function(S){S===void 0&&(S={});function P(){var D=arguments;return B.toProxyWindow(c,{send:h}).awaitWindow().then(function(T){var C=wt(T,d);if(C&&C.val!==P)return C.val.apply({source:window,origin:M()},D);var z=[].slice.call(D);return S.fireAndForget?h(T,"postrobot_method",{id:d,name:f,args:z},{domain:u,fireAndForget:!0}):h(T,"postrobot_method",{id:d,name:f,args:z},{domain:u,fireAndForget:!1}).then(function(W){return W.data.result})}).catch(function(T){throw T})}return P.__name__=f,P.__origin__=u,P.__source__=c,P.__id__=d,P.origin=u,P},E=x();return E.fireAndForget=x({fireAndForget:!0}),E}(e,n,a,{send:i})},o.cross_domain_window=function(a){return B.deserialize(a,{send:i})},o))}var Me={};Me.postrobot_post_message=function(e,n,t){t.indexOf("file:")===0&&(t="*"),e.postMessage(n,t)};function Le(e,n,t,r){var o=r.on,i=r.send;return I.try(function(){var a=L().getOrSet(e,function(){return{}});return a.buffer=a.buffer||[],a.buffer.push(t),a.flush=a.flush||I.flush().then(function(){if($(e))throw new Error("Window is closed");var c=yt(e,n,((u={}).__post_robot_10_0_46__=a.buffer||[],u),{on:o,send:i}),u;delete a.buffer;for(var s=Object.keys(Me),l=[],d=0;d<s.length;d++){var f=s[d];try{Me[f](e,c,n)}catch(h){l.push(h)}}if(l.length===s.length)throw new Error(`All post-robot messaging strategies failed:
55
55
 
56
56
  `+l.map(function(h,x){return x+". "+fe(h)}).join(`
57
57
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soyio/soyio-widget",
3
- "version": "2.6.0",
3
+ "version": "2.7.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.umd.cjs",
6
6
  "module": "./dist/index.js",