!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=10)}([function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.API_V2_ENDPOINT=n.RELEASE_TAG=n.ENV=void 0;n.ENV="prod",n.RELEASE_TAG="55b7b62",n.API_V2_ENDPOINT="https://apiv2.imbox.io/"},function(e,n,t){"use strict";t.r(n),function(e){var r=t(8),o=t(9),i=setTimeout;function a(e){return Boolean(e&&void 0!==e.length)}function u(){}function c(e){if(!(this instanceof c))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],p(e,this)}function s(e,n){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,c._immediateFn((function(){var t=1===e._state?n.onFulfilled:n.onRejected;if(null!==t){var r;try{r=t(e._value)}catch(e){return void d(n.promise,e)}f(n.promise,r)}else(1===e._state?f:d)(n.promise,e._value)}))):e._deferreds.push(n)}function f(e,n){try{if(n===e)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var t=n.then;if(n instanceof c)return e._state=3,e._value=n,void l(e);if("function"==typeof t)return void p((r=t,o=n,function(){r.apply(o,arguments)}),e)}e._state=1,e._value=n,l(e)}catch(n){d(e,n)}var r,o}function d(e,n){e._state=2,e._value=n,l(e)}function l(e){2===e._state&&0===e._deferreds.length&&c._immediateFn((function(){e._handled||c._unhandledRejectionFn(e._value)}));for(var n=0,t=e._deferreds.length;n1)for(var t=1;t * @license MIT */ var r=t(28),o=t(29),i=t(30);function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,n){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,n){if(c.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var t=e.length;if(0===t)return 0;for(var r=!1;;)switch(n){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return U(e).length;default:if(r)return F(e).length;n=(""+n).toLowerCase(),r=!0}}function w(e,n,t){var r=!1;if((void 0===n||n<0)&&(n=0),n>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(n>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,n,t);case"utf8":case"utf-8":return O(this,n,t);case"ascii":return S(this,n,t);case"latin1":case"binary":return A(this,n,t);case"base64":return C(this,n,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,n,t);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,n,t){var r=e[n];e[n]=e[t],e[t]=r}function v(e,n,t,r,o){if(0===e.length)return-1;if("string"==typeof t?(r=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=o?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(o)return-1;t=e.length-1}else if(t<0){if(!o)return-1;t=0}if("string"==typeof n&&(n=c.from(n,r)),c.isBuffer(n))return 0===n.length?-1:g(e,n,t,r,o);if("number"==typeof n)return n&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,n,t):Uint8Array.prototype.lastIndexOf.call(e,n,t):g(e,[n],t,r,o);throw new TypeError("val must be string, number or Buffer")}function g(e,n,t,r,o){var i,a=1,u=e.length,c=n.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||n.length<2)return-1;a=2,u/=2,c/=2,t/=2}function s(e,n){return 1===a?e[n]:e.readUInt16BE(n*a)}if(o){var f=-1;for(i=t;iu&&(t=u-c),i=t;i>=0;i--){for(var d=!0,l=0;lo&&(r=o):r=o;var i=n.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=t%256,i.push(o),i.push(r);return i}(n,e.length-t),e,t,r)}function C(e,n,t){return 0===n&&t===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(n,t))}function O(e,n,t){t=Math.min(e.length,t);for(var r=[],o=n;o239?4:s>223?3:s>191?2:1;if(o+d<=t)switch(d){case 1:s<128&&(f=s);break;case 2:128==(192&(i=e[o+1]))&&(c=(31&s)<<6|63&i)>127&&(f=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(c=(15&s)<<12|(63&i)<<6|63&a)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:i=e[o+1],a=e[o+2],u=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&u)&&(c=(15&s)<<18|(63&i)<<12|(63&a)<<6|63&u)>65535&&c<1114112&&(f=c)}null===f?(f=65533,d=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),o+=d}return function(e){var n=e.length;if(n<=4096)return String.fromCharCode.apply(String,e);var t="",r=0;for(;r0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},c.prototype.compare=function(e,n,t,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===t&&(t=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),n<0||t>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&n>=t)return 0;if(r>=o)return-1;if(n>=t)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(t>>>=0)-(n>>>=0),u=Math.min(i,a),s=this.slice(r,o),f=e.slice(n,t),d=0;do)&&(t=o),e.length>0&&(t<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return y(this,e,n,t);case"utf8":case"utf-8":return b(this,e,n,t);case"ascii":return x(this,e,n,t);case"latin1":case"binary":return E(this,e,n,t);case"base64":return _(this,e,n,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n,t);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(e,n,t){var r="";t=Math.min(e.length,t);for(var o=n;or)&&(t=r);for(var o="",i=n;it)throw new RangeError("Trying to access beyond buffer length")}function k(e,n,t,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>o||ne.length)throw new RangeError("Index out of range")}function R(e,n,t,r){n<0&&(n=65535+n+1);for(var o=0,i=Math.min(e.length-t,2);o>>8*(r?o:1-o)}function I(e,n,t,r){n<0&&(n=4294967295+n+1);for(var o=0,i=Math.min(e.length-t,4);o>>8*(r?o:3-o)&255}function N(e,n,t,r,o,i){if(t+r>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function j(e,n,t,r,i){return i||N(e,0,t,4),o.write(e,n,t,r,23,4),t+4}function M(e,n,t,r,i){return i||N(e,0,t,8),o.write(e,n,t,r,52,8),t+8}c.prototype.slice=function(e,n){var t,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(n=void 0===n?r:~~n)<0?(n+=r)<0&&(n=0):n>r&&(n=r),n0&&(o*=256);)r+=this[e+--n]*o;return r},c.prototype.readUInt8=function(e,n){return n||D(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,n){return n||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,n){return n||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,n){return n||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,n){return n||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,n,t){e|=0,n|=0,t||D(e,n,this.length);for(var r=this[e],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*n)),r},c.prototype.readIntBE=function(e,n,t){e|=0,n|=0,t||D(e,n,this.length);for(var r=n,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*n)),i},c.prototype.readInt8=function(e,n){return n||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,n){n||D(e,2,this.length);var t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},c.prototype.readInt16BE=function(e,n){n||D(e,2,this.length);var t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},c.prototype.readInt32LE=function(e,n){return n||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,n){return n||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,n){return n||D(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,n){return n||D(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,n){return n||D(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,n){return n||D(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,n,t,r){(e=+e,n|=0,t|=0,r)||k(this,e,n,t,Math.pow(2,8*t)-1,0);var o=1,i=0;for(this[n]=255&e;++i=0&&(i*=256);)this[n+o]=e/i&255;return n+t},c.prototype.writeUInt8=function(e,n,t){return e=+e,n|=0,t||k(this,e,n,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},c.prototype.writeUInt16LE=function(e,n,t){return e=+e,n|=0,t||k(this,e,n,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):R(this,e,n,!0),n+2},c.prototype.writeUInt16BE=function(e,n,t){return e=+e,n|=0,t||k(this,e,n,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):R(this,e,n,!1),n+2},c.prototype.writeUInt32LE=function(e,n,t){return e=+e,n|=0,t||k(this,e,n,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):I(this,e,n,!0),n+4},c.prototype.writeUInt32BE=function(e,n,t){return e=+e,n|=0,t||k(this,e,n,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):I(this,e,n,!1),n+4},c.prototype.writeIntLE=function(e,n,t,r){if(e=+e,n|=0,!r){var o=Math.pow(2,8*t-1);k(this,e,n,t,o-1,-o)}var i=0,a=1,u=0;for(this[n]=255&e;++i>0)-u&255;return n+t},c.prototype.writeIntBE=function(e,n,t,r){if(e=+e,n|=0,!r){var o=Math.pow(2,8*t-1);k(this,e,n,t,o-1,-o)}var i=t-1,a=1,u=0;for(this[n+i]=255&e;--i>=0&&(a*=256);)e<0&&0===u&&0!==this[n+i+1]&&(u=1),this[n+i]=(e/a>>0)-u&255;return n+t},c.prototype.writeInt8=function(e,n,t){return e=+e,n|=0,t||k(this,e,n,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[n]=255&e,n+1},c.prototype.writeInt16LE=function(e,n,t){return e=+e,n|=0,t||k(this,e,n,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):R(this,e,n,!0),n+2},c.prototype.writeInt16BE=function(e,n,t){return e=+e,n|=0,t||k(this,e,n,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):R(this,e,n,!1),n+2},c.prototype.writeInt32LE=function(e,n,t){return e=+e,n|=0,t||k(this,e,n,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):I(this,e,n,!0),n+4},c.prototype.writeInt32BE=function(e,n,t){return e=+e,n|=0,t||k(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):I(this,e,n,!1),n+4},c.prototype.writeFloatLE=function(e,n,t){return j(this,e,n,!0,t)},c.prototype.writeFloatBE=function(e,n,t){return j(this,e,n,!1,t)},c.prototype.writeDoubleLE=function(e,n,t){return M(this,e,n,!0,t)},c.prototype.writeDoubleBE=function(e,n,t){return M(this,e,n,!1,t)},c.prototype.copy=function(e,n,t,r){if(t||(t=0),r||0===r||(r=this.length),n>=e.length&&(n=e.length),n||(n=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-n=0;--o)e[o+n]=this[o+t];else if(i<1e3||!c.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,t=void 0===t?this.length:t>>>0,e||(e=0),"number"==typeof e)for(i=n;i55295&&t<57344){if(!o){if(t>56319){(n-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(n-=3)>-1&&i.push(239,191,189);continue}o=t;continue}if(t<56320){(n-=3)>-1&&i.push(239,191,189),o=t;continue}t=65536+(o-55296<<10|t-56320)}else o&&(n-=3)>-1&&i.push(239,191,189);if(o=null,t<128){if((n-=1)<0)break;i.push(t)}else if(t<2048){if((n-=2)<0)break;i.push(t>>6|192,63&t|128)}else if(t<65536){if((n-=3)<0)break;i.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((n-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return i}function U(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,n,t,r){for(var o=0;o=n.length||o>=e.length);++o)n[o+t]=e[o];return o}}).call(this,t(2))},function(e,n,t){"use strict";n.a=function(e){var n=this.constructor;return this.then((function(t){return n.resolve(e()).then((function(){return t}))}),(function(t){return n.resolve(e()).then((function(){return n.reject(t)}))}))}},function(e,n,t){"use strict";n.a=function(e){return new this((function(n,t){if(!e||void 0===e.length)return t(new TypeError(typeof e+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(e);if(0===r.length)return n([]);var o=r.length;function i(e,t){if(t&&("object"==typeof t||"function"==typeof t)){var a=t.then;if("function"==typeof a)return void a.call(t,(function(n){i(e,n)}),(function(t){r[e]={status:"rejected",reason:t},0==--o&&n(r)}))}r[e]={status:"fulfilled",value:t},0==--o&&n(r)}for(var a=0;a=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),n))},t(13),n.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,n.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,t(2))},function(e,n,t){(function(e,n){!function(e,t){"use strict";if(!e.setImmediate){var r,o,i,a,u,c=1,s={},f=!1,d=e.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(e);l=l&&l.setTimeout?l:e,"[object process]"==={}.toString.call(e.process)?r=function(e){n.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var n=!0,t=e.onmessage;return e.onmessage=function(){n=!1},e.postMessage("","*"),e.onmessage=t,n}}()?e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){p(e.data)},r=function(e){i.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(o=d.documentElement,r=function(e){var n=d.createElement("script");n.onreadystatechange=function(){p(e),n.onreadystatechange=null,o.removeChild(n),n=null},o.appendChild(n)}):r=function(e){setTimeout(p,0,e)}:(a="setImmediate$"+Math.random()+"$",u=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(a)&&p(+n.data.slice(a.length))},e.addEventListener?e.addEventListener("message",u,!1):e.attachEvent("onmessage",u),r=function(n){e.postMessage(a+n,"*")}),l.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var n=new Array(arguments.length-1),t=0;t-1)return!0}else if("equal"==t){if(e===n)return!0}else if("equal_or_greater"==t){if(e>=n)return!0}else if("greater"==t){if(e>n)return!0}else if("equal_or_smaller"==t){if(e<=n)return!0}else if("smaller"==t){if(e0&&a.length===u}function u(e,n,t){var r=document.querySelector(e);if(r&&window.getComputedStyle)return window.getComputedStyle(r,null).getPropertyValue(n)===t;return!1}function c(e,n,t){var r=document.querySelectorAll(e),o=0;if(r)for(var i=0;i0&&r.length===o}Object.defineProperty(n,"__esModule",{value:!0}),n.getPreferedGroups=n.getPreferedEmails=n.runPageConditions=void 0;var s=[];function f(e,n){(function(e,n){var t=e+":"+n;return s.some((function(e){return e.id===t}))})(e,n)||function(e,n){var t=document.querySelector(e);if(t){var r={id:e+":"+n,targetElement:t,hasFired:!1,result:null},o=function(e){r.hasFired=!0,r.result=e,e.target.removeEventListener(e.type,o)};s.push(r),t.addEventListener(n,o)}}(e,n);var t=function(e,n){var t=e+":"+n,r=s.filter((function(e){return e.id===t}));return r.length>0&&r[0]}(e,n);return t&&t.hasFired}n.runPageConditions=function(e,n){var t=0;null!==e&&"[]"!==e?t=setInterval((function(){if(e){var s=function(e){for(var n=0,t=("textContent"in document?"textContent":"innerText"),s=0;s0?imBoxPreferedAgentEmailArr:[]},n.getPreferedGroups=function(){return"undefined"!=typeof imBoxPreferedGroupsArr&&imBoxPreferedGroupsArr.length>0?imBoxPreferedGroupsArr:[]}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getRefTrack=void 0;var r={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function o(e,n){n||(n=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var t=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(n);return t?t[2]?decodeURIComponent(t[2].replace(/\+/g," ")):"":null}function i(e){for(var n=r,t=n.parser[n.strictMode?"strict":"loose"].exec(e),o={},i=14;i--;)o[n.key[i]]=t[i]||"";return o[n.q.name]={},o[n.key[12]].replace(n.q.parser,(function(e,t,r){t&&(o[n.q.name][t]=r)})),o}n.getRefTrack=function(){var e={},n=i(document.referrer).host,t=i(document.location).host;return""==n||n==t?e.source="Direct":-1!=document.URL.search(/imboxsrc/)?e.source=o("imboxsrc"):-1!=document.referrer.search(/adurl/)?(e.source="AdWords",e.keyword=o("q"),e.se="Google",null!==e.keyword&&"null"!==e.keyword&&-1===e.keyword.indexOf("&esrc=")||(e.keyword="Not set")):-1!=n.search(/google/)?(e.source="Organic",e.keyword=o("q"),e.se="Google",null!==e.keyword&&"null"!==e.keyword&&-1===e.keyword.indexOf("&esrc=")||(e.keyword="Not set")):-1!=n.search(/bing/)?(e.source="Organic",e.keyword=o("q"),e.se="Bing",null!==e.keyword&&"null"!==e.keyword&&-1===e.keyword.indexOf("&esrc=")||(e.keyword="Not set")):-1!=n.search(/yahoo/)?(e.source="Organic",e.se="Yahoo"):n!=t&&(e.source=n),e}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WidgetMediator=void 0;var r=t(3),o=t(23),i=t(1),a=t(24),u=t(25),c=function(){function e(){this.widgetCallQueues={},this.widgetCallHandlers=[],this.apiCallQueues={},this.apiCallHandlers=[],this.rpcQueues={},this.rpcHandlers=[],this.widgets=[],this.launcherWidth=void 0,this.launcherHeight=void 0,this.launcherPosition="bottomRight",this.widgetWidth=void 0,this.widgetHeight=void 0,this.customStyles="",this.pubSub=new o.PubSub,this.chain=(0,a.createPromiseChain)()}return e.prototype.setLauncherPosition=function(e){this.launcherPosition=e},e.prototype.registerApiCallHandler=function(e,n){for(;this.apiCallQueues[""+e]&&this.apiCallQueues[""+e].length;){n((t=this.apiCallQueues[""+e].shift()).method,t.args)}for(;this.apiCallQueues[0]&&this.apiCallQueues[0].length;){var t;n((t=this.apiCallQueues[0].shift()).method,t.args)}this.apiCallHandlers.push({userId:e,callback:n})},e.prototype.registerWidgetCallHandler=function(e,n){for(;this.widgetCallQueues[e]&&this.widgetCallQueues[e].length;){var t=this.widgetCallQueues[e].shift();n(t.method,t.args)}var r=Math.floor(1e3*Math.random());return this.widgetCallHandlers.push({id:r,name:e,handler:n}),r},e.prototype.deregisterWidgetCallHandler=function(e){this.widgetCallHandlers=this.widgetCallHandlers.filter((function(n){return n.id!==e}))},e.prototype.registerRPCHandler=function(e,n){for(;this.rpcQueues[e]&&this.rpcQueues[e].length;){var t=this.rpcQueues[e].shift();n(t.method,t.args,t.callback)}this.rpcHandlers.push({name:e,handler:n}),this.pubSub.publish("rpcHandlerConnected",e)},e.prototype.callWidget=function(e,n,t){this.widgetCallHandlers.some((function(n){return n.name===e}))?this.widgetCallHandlers.filter((function(n){return n.name===e})).forEach((function(e){e.handler(n,t)})):(this.widgetCallQueues[e]||(this.widgetCallQueues[e]=[]),this.widgetCallQueues[e].push({method:n,args:t}))},e.prototype.waitUntilConnected=function(e,n){var t=this;return new i.default((function(r,o){if(t.rpcHandlers.some((function(n){return n.name===e})))r();else{var i=!1,a=t.pubSub.subscribe("rpcHandlerConnected",(function(){i=!0,t.pubSub.unsubscribe(a),r()}));n&&setTimeout((function(){i||(t.pubSub.unsubscribe(a),o(new Error("Timeout waiting for"+e+" to connect")))}),n)}}))},e.prototype.rpc=function(e,n,t,r){var o=this;return void 0===r&&(r=1e4),new i.default((function(i,a){var u=o.rpcHandlers.filter((function(n){return n.name===e})),c=[],s=function(e,n){c.push({err:e,data:n}),c.length===u.length&&i(c)};u.length>0?o.rpcHandlers.filter((function(n){return n.name===e})).forEach((function(e){var o=!1,i=setTimeout((function(){o=!0,s(new Error("Timeout"))}),r);e.handler(n,t,(function(e,n){o||(clearTimeout(i),s(e,n))}))})):a(new Error("No handler matched "+e))}))},e.prototype.onMouseenterLauncher=function(){this.callWidget("widget","onMouseenterLauncher",[])},e.prototype.apiCallAll=function(e,n){this.doApiCall(this.apiCallHandlers,"0",e,n)},e.prototype.apiCall=function(e,n,t){var r=this.apiCallHandlers.filter((function(n){return""+n.userId===e||"0"===e}));this.doApiCall(r,e,n,t)},e.prototype.addWidget=function(e,n){this.widgets.push({name:e,id:n})},e.prototype.getWidget=function(e){var n=this.widgets.filter((function(n){return n.name===e}));return n.length>0&&n[0]},e.prototype.addCustomOuterStyles=function(e){this.customStyles=e;var n=this.getWidget("widget"),t=this.getWidget("launcher"),r=document.querySelector("#styles-"+n.id),o=document.querySelector("#styles-"+t.id);r&&(r.innerHTML+="\n"+e),o&&(o.innerHTML+="\n"+e)},e.prototype.changeDimensions=function(e,n,t){var r=this;return new i.default((function(o){var i=r.getWidget(e),a=document.querySelector("#styles-"+i.id);if(!(r.widgetWidth===n&&r.widgetHeight===t)){if(r.widgetWidth=n,r.widgetHeight=t,i&&a){var u=r.fixedDimensions(i.id,n,t);a.innerHTML=u,o()}}else o()}))},e.prototype.getDimensions=function(e){return"widget"===e?{width:this.widgetWidth,height:this.widgetHeight}:{width:this.launcherWidth,height:this.launcherHeight}},e.prototype.changeLauncherDimensions=function(e,n){var t=this.getWidget("widget"),r=this.getWidget("launcher"),o=document.querySelector("#styles-"+t.id),i=document.querySelector("#styles-"+r.id);if(this.launcherWidth=e,this.launcherHeight=n,o){var a=void 0;a=this.widgetWidth&&this.widgetHeight?this.fixedDimensions(t.id,this.widgetWidth,this.widgetHeight):this.createDefaultStyles(t.id),o.innerHTML=a}if(i){a=this.createLauncherStyles(r.id,e,n);i.innerHTML=a}},e.prototype.restoreDimensions=function(e){var n=this.getWidget(e),t=document.querySelector("#styles-"+n.id);if(this.widgetWidth=void 0,this.widgetHeight=void 0,n&&t){var r=this.createDefaultStyles(n.id);t.innerHTML=r}},e.prototype.showLauncher=function(){var e=this;this.widgets.filter((function(e){return"launcher"===e.name})).forEach((function(n){var t=document.querySelector("#frame-container-"+n.id);t&&(t.classList.add("imbox-show"),e.callWidget("launcher","isDisplaying",[]))}))},e.prototype.openWidget=function(e,n){var t=this;this.chain((function(r){t.widgets.filter((function(e){return"widget"===e.name})).forEach((function(o){var a=document.querySelector("#frame-container-"+o.id);a.classList.contains("imbox-show")||a.classList.contains("imbox-show-proactive")?r():(a.classList.remove("imbox-leave"),"widget-proactive"===e?a.classList.add("imbox-show-proactive"):a.classList.add("imbox-show"),"widget"===e?t.addMobileOverscroll():"notification"===e&&a.classList.add("imbox-notification"),i.default.all([t.rpc("widget","setOpenedState",[!0,n],500),t.rpc("launcher","setOpenedState",[!0,n],500)]).then((function(){r()})).catch((function(e){console.error(e),r()})))}))})).catch(console.error)},e.prototype.setWidgetUIState=function(e){var n=this;this.widgets.filter((function(e){return"widget"===e.name})).forEach((function(t){var r=document.querySelector("#frame-container-"+t.id);r.classList.remove("imbox-notification"),"widget"===e?n.addMobileOverscroll():"notification"===e&&(r.classList.add("imbox-notification"),n.removeMobileOverscroll())}))},e.prototype.setBadgeCount=function(e){this.callWidget("launcher","setBadgeCount",[e])},e.prototype.closeWidget=function(e){var n=this;return this.chain((function(t){var r=0,o=n.widgets.filter((function(e){return"widget"===e.name})),a=function(){++r===o.length&&t()};n.removeMobileOverscroll(),o.forEach((function(t){var r=document.querySelector("#frame-container-"+t.id);r.classList.contains("imbox-show")||r.classList.contains("imbox-show-proactive")?(r.classList.add("imbox-leave"),r.classList.remove("imbox-show"),r.classList.remove("imbox-show-proactive"),setTimeout((function(){r.classList.remove("imbox-leave"),r.classList.remove("imbox-notification"),i.default.all([n.rpc("widget","setOpenedState",[!1,e],500),n.rpc("launcher","setOpenedState",[!1,e],500)]).then((function(){a()})).catch((function(e){console.error(e),a()}))}),130)):a()}))}))},e.prototype.toggleWidget=function(){var e=this;this.chain((function(n){var t=0,r=e.widgets.filter((function(e){return"widget"===e.name})),o=function(){++t===r.length&&n()};r.forEach((function(n){var t=document.querySelector("#frame-container-"+n.id),r=t.classList.contains("imbox-show")||t.classList.contains("imbox-show-proactive");r?(e.removeMobileOverscroll(),t.classList.add("imbox-leave"),t.classList.remove("imbox-show"),t.classList.remove("imbox-show-proactive"),setTimeout((function(){t.classList.remove("imbox-notification"),t.classList.remove("imbox-leave"),i.default.all([e.rpc("launcher","setOpenedState",[!r,"launcher"],500),e.rpc("widget","setOpenedState",[!r,"launcher"],500)]).then((function(){o()})).catch((function(e){console.error(e),o()}))}),130)):(t.classList.add("imbox-show"),t.classList.remove("imbox-leave"),i.default.all([e.rpc("launcher","setOpenedState",[!r,"launcher"],500),e.rpc("widget","setOpenedState",[!r,"launcher"],500)]).then((function(){o()})).catch((function(e){console.error("skriv nåt här",e),o()})))}))})).catch((function(){}))},e.prototype.hideAll=function(){this.widgets.forEach((function(e){var n=document.querySelector("#frame-container-"+e.id);n&&(n.classList.remove("imbox-leave"),n.classList.remove("imbox-show"),n.classList.remove("imbox-show-proactive"))}))},e.prototype.hideWidget=function(){this.widgets.filter((function(e){return"widget"===e.name})).forEach((function(e){var n=document.querySelector("#frame-container-"+e.id);n&&(n.classList.remove("imbox-show"),n.classList.remove("imbox-show-proactive"),n.classList.remove("imbox-leave"))}))},e.prototype.hideLauncher=function(){this.widgets.filter((function(e){return"launcher"===e.name})).forEach((function(e){var n=document.querySelector("#frame-container-"+e.id);n&&(n.classList.remove("imbox-show"),n.classList.remove("imbox-leave"))}))},e.prototype.fixedDimensions=function(e,n,t){return(0,u.generateFixedDimensions)(e,n,t,this.launcherHeight,this.customStyles)},e.prototype.createDefaultStyles=function(e){return(0,u.generateDefaultStyles)(e,this.launcherHeight,this.customStyles)},e.prototype.createLauncherStyles=function(e,n,t){return void 0===n&&(n="0px"),void 0===t&&(t="0px"),(0,u.generateLauncherCSS)(e,this.launcherPosition,n,t,this.customStyles)},e.prototype.doApiCall=function(e,n,t,r){e&&e.length>0?e.forEach((function(e){e.callback(t,r)})):(this.apiCallQueues[n]||(this.apiCallQueues[n]=[]),this.apiCallQueues[n].push({method:t,args:r}))},e.prototype.addMobileOverscroll=function(){if("mobile"===(0,r.getDeviceTypeExcludeIPad)()){var e=document.querySelector("body");e&&e.classList.add("imbox-active")}},e.prototype.removeMobileOverscroll=function(){var e=document.querySelector("body");e&&e.classList.remove("imbox-active")},e}();n.WidgetMediator=c},function(e,n,t){"use strict";var r=this&&this.__spreadArray||function(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o>>0)+"__",function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var e=new WeakMap,n={};return Object.freeze(n),e.set(n,"__testvalue__"),"__testvalue__"===e.get(n)}catch(e){return!1}}())try{this.weakmap=new WeakMap}catch(e){}this.keys=[],this.values=[]}var n=e.prototype;return n._cleanupClosedWindows=function(){for(var e=this.weakmap,n=this.keys,t=0;t=3)return"stringifyError stack overflow";try{if(!e)return"";if("string"==typeof e)return e;if(e instanceof Error){var t=e&&e.stack,r=e&&e.message;if(t&&r)return-1!==t.indexOf(r)?t:r+"\n"+t;if(t)return t;if(r)return r}return e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}catch(e){return"Error while stringifying error: "+pe(e,n+1)}}function we(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function me(e,n){if(!n)return e;if(Object.assign)return Object.assign(e,n);for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function ve(e){return e}function ge(e,n){var t;return function r(){t=setTimeout((function(){e(),r()}),n)}(),{cancel:function(){clearTimeout(t)}}}function ye(e){return[].slice.call(e)}function be(e){return null!=e}function xe(e){return"[object RegExp]"==={}.toString.call(e)}function Ee(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function _e(e){var n,t=[],r=!1,o={set:function(n,t){return r||(e[n]=t,o.register((function(){delete e[n]}))),t},register:function(e){var o=he((function(){return e(n)}));return r?e(n):t.push(o),{cancel:function(){var e=t.indexOf(o);-1!==e&&t.splice(e,1)}}},all:function(e){n=e;var o=[];for(r=!0;t.length;){var i=t.shift();o.push(i())}return w.all(o).then(le)}};return o}function Pe(e,n){if(null==n)throw new Error("Expected "+e+" to be present");return n}fe.clear=function(){se=ce},fe((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}));var Ce=function(e){function n(n){var t;return(t=e.call(this,n)||this).name=t.constructor.name,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t),t.constructor):t.stack=new Error(n).stack,t}return i(n,e),n}(ee(Error));function Oe(){var e=document.body;if(!e)throw new Error("Body element not found");return e}function Se(){return Boolean(document.body)&&"complete"===document.readyState}function Ae(){return Boolean(document.body)&&"interactive"===document.readyState}function Te(e){return encodeURIComponent(e)}function We(e){return function(n,t,r){void 0===r&&(r=[]);var o=n.__inline_memoize_cache__=n.__inline_memoize_cache__||{},i=ae(r);return o.hasOwnProperty(i)?o[i]:o[i]=function(){var n={};if(!e)return n;if(-1===e.indexOf("="))return n;for(var t=0,r=e.split("&");t { ... }":"<"+typeof e+">"})).join(", ")+") failed\n\n")+e.stack),e}))})).then((function(e){return{result:e,id:o,name:i}}))}))}));var c=t.__id__||ie();e=bn.unwrap(e);var s=t.__name__||t.name||r;return"string"==typeof s&&"function"==typeof s.indexOf&&0===s.indexOf("anonymous::")&&(s=s.replace("anonymous::",r+"::")),bn.isProxyWindow(e)?(xn(c,t,s,e,n),e.awaitWindow().then((function(e){xn(c,t,s,e,n)}))):xn(c,t,s,e,n),ln("cross_domain_function",{id:c,name:s})}function Pn(e,n,t,r){var o,i=r.on,a=r.send;return function(e,n){void 0===n&&(n=wn);var t=JSON.stringify(e,(function(e){var t=this[e];if(fn(this))return t;var r=dn(t);if(!r)return t;var o=n[r]||pn[r];return o?o(t,e):t}));return void 0===t?"undefined":t}(t,((o={}).promise=function(t,r){return function(e,n,t,r,o){return ln("cross_domain_zalgo_promise",{then:_n(e,n,(function(e,n){return t.then(e,n)}),r,{on:o.on,send:o.send})})}(e,n,t,r,{on:i,send:a})},o.function=function(t,r){return _n(e,n,t,r,{on:i,send:a})},o.object=function(e){return H(e)||bn.isProxyWindow(e)?ln("cross_domain_window",bn.serialize(e,{send:a})):e},o))}function Cn(e,n,t,r){var o,i=r.send;return function(e,n){if(void 0===n&&(n=vn),"undefined"!==e)return JSON.parse(e,(function(e,t){if(fn(this))return t;var r,o;if(fn(t)?(r=t.__type__,o=t.__val__):(r=dn(t),o=t),!r)return o;var i=n[r]||mn[r];return i?i(o,e):o}))}(t,((o={}).cross_domain_zalgo_promise=function(e){return function(e,n,t){return new w(t.then)}(0,0,e)},o.cross_domain_function=function(t){return function(e,n,t,r){var o=t.id,i=t.name,a=r.send,u=function(t){function r(){var u=arguments;return bn.toProxyWindow(e,{send:a}).awaitWindow().then((function(e){var c=En(e,o);if(c&&c.val!==r)return c.val.apply({source:window,origin:O()},u);var s=[].slice.call(u);return t.fireAndForget?a(e,"postrobot_method",{id:o,name:i,args:s},{domain:n,fireAndForget:!0}):a(e,"postrobot_method",{id:o,name:i,args:s},{domain:n,fireAndForget:!1}).then((function(e){return e.data.result}))})).catch((function(e){throw e}))}return void 0===t&&(t={}),r.__name__=i,r.__origin__=n,r.__source__=e,r.__id__=o,r.origin=n,r},c=u();return c.fireAndForget=u({fireAndForget:!0}),c}(e,n,t,{send:i})},o.cross_domain_window=function(e){return bn.deserialize(e,{send:i})},o))}var On={};function Sn(e,n,t,r){var o=r.on,i=r.send;return w.try((function(){var r=rn().getOrSet(e,(function(){return{}}));return r.buffer=r.buffer||[],r.buffer.push(t),r.flush=r.flush||w.flush().then((function(){if(j(e))throw new Error("Window is closed");var t,a=Pn(e,n,((t={}).__post_robot_11_0_0__=r.buffer||[],t),{on:o,send:i});delete r.buffer;for(var u=Object.keys(On),c=[],s=0;s1?n-1:0),o=1;o1?t-1:0),i=1;i iframe {\n display: inline-block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: opacity .2s ease-in-out;\n }\n\n #"+n+" > iframe.zoid-invisible {\n opacity: 0;\n }\n\n #"+n+" > iframe.zoid-visible {\n opacity: 1;\n }\n ")),f.appendChild(t),f.appendChild(r),f.appendChild(d),r.classList.add("zoid-visible"),t.classList.add("zoid-invisible"),a.on(Qn.RENDERED,(function(){r.classList.remove("zoid-visible"),r.classList.add("zoid-invisible"),t.classList.remove("zoid-invisible"),t.classList.add("zoid-visible"),setTimeout((function(){Be(r)}),1)})),a.on(Qn.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=Ze(n)),"number"==typeof t&&(f.style.height=Ze(t))})),f}}var ft=_e(),dt=_e(),lt=function(e){var n,t,r,o;$e().initialized||($e().initialized=!0,t=(n={on:jn,send:Mn}).on,r=n.send,(o=$e()).receiveMessage=o.receiveMessage||function(e){return Nn(e,{on:t,send:r})},function(e){var n=e.on,t=e.send;Ke().getOrSet("postMessageListener",(function(){return ze(window,"message",(function(e){!function(e,n){var t=n.on,r=n.send;w.try((function(){var n=e.source||e.sourceElement,o=e.origin||e.originalEvent&&e.originalEvent.origin,i=e.data;if("null"===o&&(o="file://"),n){if(!o)throw new Error("Post message did not have origin domain");Nn({source:n,origin:o,data:i},{on:t,send:r})}}))}(e,{on:n,send:t})}))}))}({on:jn,send:Mn}),function(e){var n=e.on,t=e.send;Ke("builtinListeners").getOrSet("helloListener",(function(){var e=n("postrobot_hello",{domain:"*"},(function(e){return an(e.source,{domain:e.origin}),{instanceID:on()}})),r=L();return r&&un(r,{send:t}).catch((function(e){})),e}))}({on:jn,send:Mn}));var i=function(e){var n,t,r=function(e){var n=e.tag,t=e.url,r=e.domain,o=e.bridgeUrl,i=e.props,u=void 0===i?{}:i,c=e.dimensions,s=void 0===c?{}:c,f=e.autoResize,d=void 0===f?{}:f,l=e.allowedParentDomains,h=void 0===l?"*":l,p=e.attributes,w=void 0===p?{}:p,m=e.defaultContext,v=void 0===m?Vn.IFRAME:m,g=e.containerTemplate,y=void 0===g?st:g,b=e.prerenderTemplate,x=void 0===b?null:b,E=e.validate,_=e.eligible,P=void 0===_?function(){return{eligible:!0}}:_,C=e.logger,O=void 0===C?{info:le}:C,A=e.exports,T=void 0===A?le:A,W=e.method,D=e.children,k=void 0===D?function(){return{}}:D,R=n.replace(/-/g,"_"),I=a({},{window:{type:Jn.OBJECT,sendToChild:!1,required:!1,allowDelegate:!0,validate:function(e){var n=e.value;if(!H(n)&&!bn.isProxyWindow(n))throw new Error("Expected Window or ProxyWindow");if(H(n)){if(j(n))throw new Error("Window is closed");if(!S(n))throw new Error("Window is not same domain")}},decorate:function(e){return Ln(e.value)}},timeout:{type:Jn.NUMBER,required:!1,sendToChild:!1},cspNonce:{type:Jn.STRING,required:!1},onDisplay:{type:Jn.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:ot,decorate:it},onRendered:{type:Jn.FUNCTION,required:!1,sendToChild:!1,default:ot,decorate:it},onRender:{type:Jn.FUNCTION,required:!1,sendToChild:!1,default:ot,decorate:it},onClose:{type:Jn.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:ot,decorate:it},onDestroy:{type:Jn.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:ot,decorate:it},onResize:{type:Jn.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:ot},onFocus:{type:Jn.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:ot},close:{type:Jn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.close}},focus:{type:Jn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.focus}},resize:{type:Jn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.resize}},uid:{type:Jn.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.uid}},tag:{type:Jn.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.tag}},getParent:{type:Jn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParent}},getParentDomain:{type:Jn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParentDomain}},show:{type:Jn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.show}},hide:{type:Jn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.hide}},export:{type:Jn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.export}},onError:{type:Jn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onError}},onProps:{type:Jn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onProps}},getSiblings:{type:Jn.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getSiblings}}},u);if(!y)throw new Error("Container template required");return{name:R,tag:n,url:t,domain:r,bridgeUrl:o,method:W,propsDef:I,dimensions:s,autoResize:d,allowedParentDomains:h,attributes:w,defaultContext:v,containerTemplate:y,prerenderTemplate:x,validate:E,logger:O,eligible:P,children:k,exports:"function"==typeof T?T:function(e){for(var n=e.getExports,t={},r=function(e,r){var o=r[e],i=T[o].type,a=n().then((function(e){return e[o]}));t[o]=i===Jn.FUNCTION?function(){for(var e=arguments.length,n=new Array(e),t=0;t0?a-4:a;for(t=0;t>16&255,c[f++]=n>>8&255,c[f++]=255&n;2===u&&(n=o[e.charCodeAt(t)]<<2|o[e.charCodeAt(t+1)]>>4,c[f++]=255&n);1===u&&(n=o[e.charCodeAt(t)]<<10|o[e.charCodeAt(t+1)]<<4|o[e.charCodeAt(t+2)]>>2,c[f++]=n>>8&255,c[f++]=255&n);return c},n.fromByteArray=function(e){for(var n,t=e.length,o=t%3,i=[],a=0,u=t-o;au?u:a+16383));1===o?(n=e[t-1],i.push(r[n>>2]+r[n<<4&63]+"==")):2===o&&(n=(e[t-2]<<8)+e[t-1],i.push(r[n>>10]+r[n>>4&63]+r[n<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,c=a.length;u0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");return-1===t&&(t=n),[t,t===n?0:4-t%4]}function f(e,n,t){for(var o,i,a=[],u=n;u>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,n){n.read=function(e,n,t,r,o){var i,a,u=8*o-r-1,c=(1<>1,f=-7,d=t?o-1:0,l=t?-1:1,h=e[n+d];for(d+=l,i=h&(1<<-f)-1,h>>=-f,f+=u;f>0;i=256*i+e[n+d],d+=l,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=r;f>0;a=256*a+e[n+d],d+=l,f-=8);if(0===i)i=1-s;else{if(i===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=s}return(h?-1:1)*a*Math.pow(2,i-r)},n.write=function(e,n,t,r,o,i){var a,u,c,s=8*i-o-1,f=(1<>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,w=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(u=isNaN(n)?1:0,a=f):(a=Math.floor(Math.log(n)/Math.LN2),n*(c=Math.pow(2,-a))<1&&(a--,c*=2),(n+=a+d>=1?l/c:l*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=f?(u=0,a=f):a+d>=1?(u=(n*c-1)*Math.pow(2,o),a+=d):(u=n*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[t+h]=255&u,h+=p,u/=256,o-=8);for(a=a<0;e[t+h]=255&a,h+=p,a/=256,s-=8);e[t+h-p]|=128*w}},function(e,n){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},function(e,n,t){(function(n){"undefined"!=typeof self&&self,e.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return{}.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,t,r){"use strict";function o(e,n){return(o=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function i(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,o(e,n)}function a(){return(a=Object.assign||function(e){for(var n=1;n>>0)+"__",function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var e=new WeakMap,n={};return Object.freeze(n),e.set(n,"__testvalue__"),"__testvalue__"===e.get(n)}catch(e){return!1}}())try{this.weakmap=new WeakMap}catch(e){}this.keys=[],this.values=[]}var n=e.prototype;return n._cleanupClosedWindows=function(){for(var e=this.weakmap,n=this.keys,t=0;t=3)return"stringifyError stack overflow";try{if(!e)return"";if("string"==typeof e)return e;if(e instanceof Error){var t=e&&e.stack,r=e&&e.message;if(t&&r)return-1!==t.indexOf(r)?t:r+"\n"+t;if(t)return t;if(r)return r}return e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}catch(e){return"Error while stringifying error: "+ve(e,n+1)}}function ge(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function ye(e,n){if(!n)return e;if(Object.assign)return Object.assign(e,n);for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t]);return e}function be(e){return e}function xe(e,n){var t;return function r(){t=setTimeout((function(){e(),r()}),n)}(),{cancel:function(){clearTimeout(t)}}}function Ee(e){return[].slice.call(e)}function _e(e){return null!=e}function Pe(e){return"[object RegExp]"==={}.toString.call(e)}function Ce(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function Oe(e){var n,t=[],r=!1,o={set:function(n,t){return r||(e[n]=t,o.register((function(){delete e[n]}))),t},register:function(e){var o=me((function(){return e(n)}));return r?e(n):t.push(o),{cancel:function(){var e=t.indexOf(o);-1!==e&&t.splice(e,1)}}},all:function(e){n=e;var o=[];for(r=!0;t.length;){var i=t.shift();o.push(i())}return w.all(o).then(we)}};return o}function Se(e,n){if(null==n)throw new Error("Expected "+e+" to be present");return n}he.clear=function(){le=de},he((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}));var Ae=function(e){function n(n){var t;return(t=e.call(this,n)||this).name=t.constructor.name,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t),t.constructor):t.stack=new Error(n).stack,t}return i(n,e),n}(re(Error));function Te(){var e=document.body;if(!e)throw new Error("Body element not found");return e}function We(){return Boolean(document.body)&&"complete"===document.readyState}function De(){return Boolean(document.body)&&"interactive"===document.readyState}function ke(e){return encodeURIComponent(e)}function Re(e){return function(n,t,r){void 0===r&&(r=[]);var o=n.__inline_memoize_cache__=n.__inline_memoize_cache__||{},i=se(r);return o.hasOwnProperty(i)?o[i]:o[i]=function(){var n={};if(!e)return n;if(-1===e.indexOf("="))return n;for(var t=0,r=e.split("&");t { ... }":"<"+typeof e+">"})).join(", ")+") failed\n\n")+e.stack),e}))})).then((function(e){return{result:e,id:o,name:i}}))}))}));var c=t.__id__||ce();e=Fn.unwrap(e);var s=t.__name__||t.name||r;return"string"==typeof s&&"function"==typeof s.indexOf&&0===s.indexOf("anonymous::")&&(s=s.replace("anonymous::",r+"::")),Fn.isProxyWindow(e)?(Un(c,t,s,e,n),e.awaitWindow().then((function(e){Un(c,t,s,e,n)}))):Un(c,t,s,e,n),yn("cross_domain_function",{id:c,name:s})}function Yn(e,n,t,r){var o,i=r.on,a=r.send;return function(e,n){void 0===n&&(n=En);var t=JSON.stringify(e,(function(e){var t=this[e];if(vn(this))return t;var r=gn(t);if(!r)return t;var o=n[r]||xn[r];return o?o(t,e):t}));return void 0===t?"undefined":t}(t,((o={}).promise=function(t,r){return function(e,n,t,r,o){return yn("cross_domain_zalgo_promise",{then:qn(e,n,(function(e,n){return t.then(e,n)}),r,{on:o.on,send:o.send})})}(e,n,t,r,{on:i,send:a})},o.function=function(t,r){return qn(e,n,t,r,{on:i,send:a})},o.object=function(e){return G(e)||Fn.isProxyWindow(e)?yn("cross_domain_window",Fn.serialize(e,{send:a})):e},o))}function Hn(e,n,t,r){var o,i=r.send;return function(e,n){if(void 0===n&&(n=Pn),"undefined"!==e)return JSON.parse(e,(function(e,t){if(vn(this))return t;var r,o;if(vn(t)?(r=t.__type__,o=t.__val__):(r=gn(t),o=t),!r)return o;var i=n[r]||_n[r];return i?i(o,e):o}))}(t,((o={}).cross_domain_zalgo_promise=function(e){return function(e,n,t){return new w(t.then)}(0,0,e)},o.cross_domain_function=function(t){return function(e,n,t,r){var o=t.id,i=t.name,a=r.send,u=function(t){function r(){var u=arguments;return Fn.toProxyWindow(e,{send:a}).awaitWindow().then((function(e){var c=Bn(e,o);if(c&&c.val!==r)return c.val.apply({source:window,origin:O()},u);var s=[].slice.call(u);return t.fireAndForget?a(e,"postrobot_method",{id:o,name:i,args:s},{domain:n,fireAndForget:!0}):a(e,"postrobot_method",{id:o,name:i,args:s},{domain:n,fireAndForget:!1}).then((function(e){return e.data.result}))})).catch((function(e){throw e}))}return void 0===t&&(t={}),r.__name__=i,r.__origin__=n,r.__source__=e,r.__id__=o,r.origin=n,r},c=u();return c.fireAndForget=u({fireAndForget:!0}),c}(e,n,t,{send:i})},o.cross_domain_window=function(e){return Fn.deserialize(e,{send:i})},o))}var Jn={};function Gn(e,n,t,r){var o=r.on,i=r.send;return w.try((function(){var r=fn().getOrSet(e,(function(){return{}}));return r.buffer=r.buffer||[],r.buffer.push(t),r.flush=r.flush||w.flush().then((function(){if(j(e))throw new Error("Window is closed");var t,a=Yn(e,n,((t={}).__post_robot_11_0_0__=r.buffer||[],t),{on:o,send:i});delete r.buffer;for(var u=Object.keys(Jn),c=[],s=0;s1?n-1:0),o=1;o1?t-1:0),i=1;i iframe {\n display: inline-block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: opacity .2s ease-in-out;\n }\n\n #"+n+" > iframe.zoid-invisible {\n opacity: 0;\n }\n\n #"+n+" > iframe.zoid-visible {\n opacity: 1;\n }\n ")),f.appendChild(t),f.appendChild(r),f.appendChild(d),r.classList.add("zoid-visible"),t.classList.add("zoid-invisible"),a.on(vt.RENDERED,(function(){r.classList.remove("zoid-visible"),r.classList.add("zoid-invisible"),t.classList.remove("zoid-invisible"),t.classList.add("zoid-visible"),setTimeout((function(){He(r)}),1)})),a.on(vt.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=nn(n)),"number"==typeof t&&(f.style.height=nn(t))})),f}}function kt(e){var n=e.doc,t=e.props,r=n.createElement("html"),o=n.createElement("body"),i=n.createElement("style"),a=n.createElement("div");return a.classList.add("spinner"),t.cspNonce&&i.setAttribute("nonce",t.cspNonce),r.appendChild(o),o.appendChild(a),o.appendChild(i),i.appendChild(n.createTextNode("\n html, body {\n width: 100%;\n height: 100%;\n }\n\n .spinner {\n position: fixed;\n max-height: 60vmin;\n max-width: 60vmin;\n height: 40px;\n width: 40px;\n top: 50%;\n left: 50%;\n box-sizing: border-box;\n border: 3px solid rgba(0, 0, 0, .2);\n border-top-color: rgba(33, 128, 192, 0.8);\n border-radius: 100%;\n animation: rotation .7s infinite linear;\n }\n\n @keyframes rotation {\n from {\n transform: translateX(-50%) translateY(-50%) rotate(0deg);\n }\n to {\n transform: translateX(-50%) translateY(-50%) rotate(359deg);\n }\n }\n ")),r}var Rt=Oe(),It=Oe(),Nt=function(e){var n,t,r,o;rn().initialized||(rn().initialized=!0,t=(n={on:tt,send:ot}).on,r=n.send,(o=rn()).receiveMessage=o.receiveMessage||function(e){return nt(e,{on:t,send:r})},function(e){var n=e.on,t=e.send;an().getOrSet("postMessageListener",(function(){return Be(window,"message",(function(e){!function(e,n){var t=n.on,r=n.send;w.try((function(){var n=e.source||e.sourceElement,o=e.origin||e.originalEvent&&e.originalEvent.origin,i=e.data;if("null"===o&&(o="file://"),n){if(!o)throw new Error("Post message did not have origin domain");nt({source:n,origin:o,data:i},{on:t,send:r})}}))}(e,{on:n,send:t})}))}))}({on:tt,send:ot}),Mn({on:tt,send:ot,receiveMessage:nt}),function(e){var n=e.on,t=e.send;an("builtinListeners").getOrSet("helloListener",(function(){var e=n("postrobot_hello",{domain:"*"},(function(e){return ln(e.source,{domain:e.origin}),{instanceID:dn()}})),r=F();return r&&hn(r,{send:t}).catch((function(e){})),e}))}({on:tt,send:ot}));var i=function(e){var n,t,r=function(e){var n=e.tag,t=e.url,r=e.domain,o=e.bridgeUrl,i=e.props,u=void 0===i?{}:i,c=e.dimensions,s=void 0===c?{}:c,f=e.autoResize,d=void 0===f?{}:f,l=e.allowedParentDomains,h=void 0===l?"*":l,p=e.attributes,w=void 0===p?{}:p,m=e.defaultContext,v=void 0===m?mt.IFRAME:m,g=e.containerTemplate,y=void 0===g?Dt:g,b=e.prerenderTemplate,x=void 0===b?kt:b,E=e.validate,_=e.eligible,P=void 0===_?function(){return{eligible:!0}}:_,C=e.logger,O=void 0===C?{info:we}:C,A=e.exports,T=void 0===A?we:A,W=e.method,D=e.children,k=void 0===D?function(){return{}}:D,R=n.replace(/-/g,"_"),I=a({},{window:{type:pt.OBJECT,sendToChild:!1,required:!1,allowDelegate:!0,validate:function(e){var n=e.value;if(!G(n)&&!Fn.isProxyWindow(n))throw new Error("Expected Window or ProxyWindow");if(G(n)){if(j(n))throw new Error("Window is closed");if(!S(n))throw new Error("Window is not same domain")}},decorate:function(e){return it(e.value)}},timeout:{type:pt.NUMBER,required:!1,sendToChild:!1},cspNonce:{type:pt.STRING,required:!1},onDisplay:{type:pt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:Ot,decorate:St},onRendered:{type:pt.FUNCTION,required:!1,sendToChild:!1,default:Ot,decorate:St},onRender:{type:pt.FUNCTION,required:!1,sendToChild:!1,default:Ot,decorate:St},onClose:{type:pt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:Ot,decorate:St},onDestroy:{type:pt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:Ot,decorate:St},onResize:{type:pt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:Ot},onFocus:{type:pt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:Ot},close:{type:pt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.close}},focus:{type:pt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.focus}},resize:{type:pt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.resize}},uid:{type:pt.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.uid}},tag:{type:pt.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.tag}},getParent:{type:pt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParent}},getParentDomain:{type:pt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParentDomain}},show:{type:pt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.show}},hide:{type:pt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.hide}},export:{type:pt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.export}},onError:{type:pt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onError}},onProps:{type:pt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onProps}},getSiblings:{type:pt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getSiblings}}},u);if(!y)throw new Error("Container template required");return{name:R,tag:n,url:t,domain:r,bridgeUrl:o,method:W,propsDef:I,dimensions:s,autoResize:d,allowedParentDomains:h,attributes:w,defaultContext:v,containerTemplate:y,prerenderTemplate:x,validate:E,logger:O,eligible:P,children:k,exports:"function"==typeof T?T:function(e){for(var n=e.getExports,t={},r=function(e,r){var o=r[e],i=T[o].type,a=n().then((function(e){return e[o]}));t[o]=i===pt.FUNCTION?function(){for(var e=arguments.length,n=new Array(e),t=0;t