@monei-js/components 1.7.6 → 1.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.cjs.development.js +20 -5
- package/dist/components.cjs.development.js.map +1 -1
- package/dist/components.cjs.production.min.js +1 -1
- package/dist/components.cjs.production.min.js.map +1 -1
- package/dist/components.esm.js +20 -5
- package/dist/components.esm.js.map +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";function e(e,n,t,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void t(e)}u.done?n(c):Promise.resolve(c).then(r,o)}function n(n){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=n.apply(t,r);function u(n){e(a,o,i,u,c,"next",n)}function c(n){e(a,o,i,u,c,"throw",n)}u(void 0)}))}}function t(){return(t=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function r(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n.indexOf(t=i[r])>=0||(o[t]=e[t]);return o}Object.defineProperty(exports,"__esModule",{value:!0});var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e,n){return e(n={exports:{}},n.exports),n.exports}function u(e){return e&&e.default||e}var c,s=a((function(e){var n=function(e){var n=Object.prototype,t=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function u(e,n,t){return Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}),e[n]}try{u({},"")}catch(e){u=function(e,n,t){return e[n]=t}}function c(e,n,t,r){var o=Object.create((n&&n.prototype instanceof f?n:f).prototype),i=new _(r||[]);return o._invoke=function(e,n,t){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(t.method=o,t.arg=i;;){var a=t.delegate;if(a){var u=E(a,t);if(u){if(u===d)continue;return u}}if("next"===t.method)t.sent=t._sent=t.arg;else if("throw"===t.method){if("suspendedStart"===r)throw r="completed",t.arg;t.dispatchException(t.arg)}else"return"===t.method&&t.abrupt("return",t.arg);r="executing";var c=s(e,n,t);if("normal"===c.type){if(r=t.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:t.done}}"throw"===c.type&&(r="completed",t.method="throw",t.arg=c.arg)}}}(e,t,i),o}function s(e,n,t){try{return{type:"normal",arg:e.call(n,t)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d={};function f(){}function l(){}function p(){}var h={};h[o]=function(){return this};var w=Object.getPrototypeOf,v=w&&w(w(O([])));v&&v!==n&&t.call(v,o)&&(h=v);var m=p.prototype=f.prototype=Object.create(h);function y(e){["next","throw","return"].forEach((function(n){u(e,n,(function(e){return this._invoke(n,e)}))}))}function g(e,n){var r;this._invoke=function(o,i){function a(){return new n((function(r,a){!function r(o,i,a,u){var c=s(e[o],e,i);if("throw"!==c.type){var d=c.arg,f=d.value;return f&&"object"==typeof f&&t.call(f,"__await")?n.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):n.resolve(f).then((function(e){d.value=e,a(d)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function E(e,n){var t=e.iterator[n.method];if(void 0===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,E(e,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=s(t,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,d;var o=r.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,d):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function P(e){var n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),this.tryEntries.push(n)}function b(e){var n=e.completion||{};n.type="normal",delete n.arg,e.completion=n}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function O(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function n(){for(;++r<e.length;)if(t.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=void 0,n.done=!0,n};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return l.prototype=m.constructor=p,p.constructor=l,l.displayName=u(p,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var n="function"==typeof e&&e.constructor;return!!n&&(n===l||"GeneratorFunction"===(n.displayName||n.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,u(e,a,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},y(g.prototype),g.prototype[i]=function(){return this},e.AsyncIterator=g,e.async=function(n,t,r,o,i){void 0===i&&(i=Promise);var a=new g(c(n,t,r,o),i);return e.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(m),u(m,a,"Generator"),m[o]=function(){return this},m.toString=function(){return"[object Generator]"},e.keys=function(e){var n=[];for(var t in e)n.push(t);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=O,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!e)for(var n in this)"t"===n.charAt(0)&&t.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=t.call(i,"catchLoc"),c=t.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,n){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&t.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=n&&n<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=n,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(e,n){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&n&&(this.next=n),d},finish:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var t=this.tryEntries[n];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),b(t),d}},catch:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var t=this.tryEntries[n];if(t.tryLoc===e){var r=t.completion;if("throw"===r.type){var o=r.arg;b(t)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,t){return this.delegate={iterator:O(e),resultName:n,nextLoc:t},"next"===this.method&&(this.arg=void 0),d}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}})),d=function(e){return Object.keys(e).reduce((function(n,t){return n[t]="string"==typeof e[t]?e[t]:e[t]+"px",n}),{})},f=function(e,n,t,r){return new Promise((function(o,i){var a=Array.from(document.scripts).find((function(n){return n.src===e}));if(a){if(!r)return void o();a.remove()}var u=document.createElement("script");u.src=e,u.onload=function(){return o()},u.onerror=function(e){return i(e)},n&&u.setAttribute("nonce",n),t&&Object.keys(t).forEach((function(e){t[e]&&(u.dataset[e]=t[e])})),document.head.appendChild(u)}))},l=function(e){return Object.keys(e).reduce((function(n,t){return void 0!==e[t]&&n.push(t+"="+e[t]),n}),[]).join("&")},p=function(){var e,n;try{e=window.localStorage}catch(r){var t=(n=new Map,{getItem:function(e){return n.get(e)},setItem:function(e,t){n.set(e,t)},clear:function(){n=new Map},removeItem:function(e){n.delete(e)}});Object.defineProperty(window,"localStorage",{value:t}),e=t}return e},h=function(){var e,n=p();try{e=n.getItem("i18nextLng")}catch(e){}return e?e.split("-")[0]:""},w=function(){var e=[window.screen.colorDepth,window.screen.height,window.screen.width,(new Date).getTimezoneOffset(),h()].join("|");return window.btoa(e)},v=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.t0=void 0,e.next=4,n;case 4:return e.t1=e.sent,e.abrupt("return",[e.t0,e.t1]);case 8:return e.prev=8,e.t2=e.catch(0),e.abrupt("return",[e.t2,void 0]);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(n){return e.apply(this,arguments)}}(),m=function(e){if(!(e.paymentId||e.accountId&&e.amount&&e.currency))throw new Error("You need to provide paymentId or accountId amount and currency")},y={__proto__:null,transformStyle:d,loadScript:f,stringify:l,fixLocalstorage:p,getClientEnv:w,withError:v,isMethodSupported:function(e,n){return e.paymentMethods&&e.paymentMethods.includes(n)},validateComponentProps:m},g="https://js.monei.com",E=t({},{domain:g,version:"v2",stage:"prod",isProduction:!0,paymentPageUrl:g+"/v2/payment-page/",posPaymentPageUrl:g+"/v2/pos-payment-page/",cardInputUrl:g+"/v2/inner-card-input/",paymentModalUrl:g+"/v2/inner-payment-modal/",paypalUrl:g+"/v2/inner-paypal/",bizumUrl:g+"/v2/inner-bizum/",bizumButtonUrl:g+"/v2/inner-bizum-button/",cofidisUrl:g+"/v2/inner-cofidis/",cofidisButtonUrl:g+"/v2/inner-cofidis-button/",cofidisWidgetUrl:g+"/v2/inner-cofidis-widget/",cofidisLoanUrl:g+"/v2/inner-cofidis-loan/",cofidisLoanButtonUrl:g+"/v2/inner-cofidis-loan-button/",cofidisLoanWidgetUrl:g+"/v2/inner-cofidis-loan-widget/",googlePayUrl:g+"/v2/inner-google-pay/",paymentRequestUrl:g+"/v2/inner-payment-request/",click2PayUrl:g+"/v2/inner-click2pay/",click2PayButtonUrl:g+"/v2/inner-click2pay-button/"},{apiUrl:"https://api.monei.com/v1",secureDomain:"https://secure.monei.com",rootDomain:"monei.com"}),P=function(){var e=n(s.mark((function e(n,r){var o,i,a,u,c,d,f;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=(o=void 0===r?{}:r).headers,c=o.body,"POST"===(a=void 0===(i=o.method)?"GET":i)&&(u=t({"Content-Type":"application/json"},u)),e.next=4,fetch(""+E.apiUrl+n,{method:a,headers:u,body:c?JSON.stringify(c):void 0});case 4:return d=e.sent,e.next=7,v(d.json());case 7:if(f=e.sent[1],d.ok){e.next=11;break}throw f||new Error(d.statusText);case 11:return e.abrupt("return",f);case 12:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),b={},_=function(){var e=n(s.mark((function e(n){var t,r,o,i,a;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.accountId,!(r=n.paymentId)){e.next=5;break}o={paymentId:r},e.next=10;break;case 5:if(!t){e.next=9;break}o={accountId:t},e.next=10;break;case 9:throw new Error("You need to provide paymentId or accountId");case 10:if(i=l(o),!b[i]){e.next=13;break}return e.abrupt("return",b[i]);case 13:return a=P("/payment-methods?"+i),b[i]=a,e.abrupt("return",a);case 16:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),O=function(){var e=n(s.mark((function e(n){var t,r,o,i,a,u,c;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.paymentMethod,o=n.sessionId,i=n.amount,a=n.currency,u=n.accountId,!(r=n.paymentId)){e.next=5;break}c={paymentId:r,paymentMethod:t},e.next=10;break;case 5:if(!u){e.next=9;break}c={accountId:u,paymentMethod:t,sessionId:o,amount:i,currency:a},e.next=10;break;case 9:throw new Error("You need to provide paymentId or accountId");case 10:return e.abrupt("return",P("/tokens",{method:"POST",headers:{"Client-Env":w()},body:c}));case 11:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/payments/"+n+"/client-get"));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),S=function(){var e=n(s.mark((function e(n){var t,o;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.paymentId,o=r(n,["paymentId"]),e.abrupt("return",P("/payments/"+t+"/client-confirm",{method:"POST",headers:{"Client-Env":w()},body:o}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),x=function(){var e=n(s.mark((function e(n){var t,o;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.signature,o=r(n,["signature"]),e.abrupt("return",P("/client-payments",{method:"POST",headers:{"Client-Env":w(),"Client-Signature":t},body:o}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),I=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/payments/"+n.paymentId+"/client-receipt",{method:"POST",body:{customerEmail:n.customerEmail,signature:n.signature,language:n.language}}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),N=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/apple-pay/sessions",{method:"POST",body:n}));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),R={__proto__:null,getPaymentMethods:_,createToken:O,getPayment:T,confirmPayment:S,createPayment:x,sendPaymentReceipt:I,createApplePaySession:N,calculateFinancing:function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/cofidis/calculate-financing",{method:"POST",body:n}));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),validateBizumPhone:function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/bizum/validate-phone",{method:"POST",body:n}));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()},C=a((function(e,n){var t;"undefined"!=typeof self&&self,t=function(){return 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,n,t){function r(e){return"[object RegExp]"==={}.toString.call(e)}t.r(n),t.d(n,"Promise",(function(){return R})),t.d(n,"TYPES",(function(){return Ge})),t.d(n,"ProxyWindow",(function(){return Pe})),t.d(n,"setup",(function(){return Ye})),t.d(n,"destroy",(function(){return He})),t.d(n,"serializeMessage",(function(){return Fe})),t.d(n,"deserializeMessage",(function(){return ze})),t.d(n,"createProxyWindow",(function(){return Be})),t.d(n,"toProxyWindow",(function(){return Ue})),t.d(n,"on",(function(){return De})),t.d(n,"once",(function(){return Me})),t.d(n,"send",(function(){return qe})),t.d(n,"markWindowKnown",(function(){return de})),t.d(n,"cleanUpWindow",(function(){return Ve})),t.d(n,"bridge",(function(){}));var o="Call was rejected by callee.\r\n";function i(e){return void 0===e&&(e=window),"about:"===e.location.protocol}function a(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}function u(e){if(void 0===e&&(e=window),e&&!a(e))try{return e.opener}catch(e){}}function c(e){try{return!0}catch(e){}return!1}function s(e){void 0===e&&(e=window);var n=e.location;if(!n)throw new Error("Can not read window location");var t=n.protocol;if(!t)throw new Error("Can not read window protocol");if("file:"===t)return"file://";if("about:"===t){var r=a(e);return r&&c()?s(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function d(e){void 0===e&&(e=window);var n=s(e);return n&&e.mockDomain&&0===e.mockDomain.indexOf("mock:")?e.mockDomain:n}function f(e){if(!function(e){try{if(e===window)return!0}catch(e){}try{var n=Object.getOwnPropertyDescriptor(e,"location");if(n&&!1===n.enumerable)return!1}catch(e){}try{if(i(e)&&c())return!0}catch(e){}try{if(s(e)===s(window))return!0}catch(e){}return!1}(e))return!1;try{if(e===window)return!0;if(i(e)&&c())return!0;if(d(window)===d(e))return!0}catch(e){}return!1}function l(e){if(!f(e))throw new Error("Expected window to be same domain");return e}function p(e,n){if(!e||!n)return!1;var t=a(n);return t?t===e:-1!==function(e){var n=[];try{for(;e.parent!==e;)n.push(e.parent),e=e.parent}catch(e){}return n}(n).indexOf(e)}function h(e){var n,t,r=[];try{n=e.frames}catch(t){n=e}try{t=n.length}catch(e){}if(0===t)return r;if(t){for(var o=0;o<t;o++){var i=void 0;try{i=n[o]}catch(e){continue}r.push(i)}return r}for(var a=0;a<100;a++){var u=void 0;try{u=n[a]}catch(e){return r}if(!u)return r;r.push(u)}return r}var w=[],v=[];function m(e,n){void 0===n&&(n=!0);try{if(e===window)return!1}catch(e){return!0}try{if(!e)return!0}catch(e){return!0}try{if(e.closed)return!0}catch(e){return!e||e.message!==o}if(n&&f(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}var t=function(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}(w,e);if(-1!==t){var r=v[t];if(r&&function(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var n=e.ownerDocument;if(n&&n.documentElement&&!n.documentElement.contains(e)){for(var t=e;t.parentNode&&t.parentNode!==t;)t=t.parentNode;if(!t.host||!n.documentElement.contains(t.host))return!0}return!1}(r))return!0}return!1}function y(e){return void 0===e&&(e=window),u(e=e||window)||a(e)||void 0}function g(e,n){if("string"==typeof e){if("string"==typeof n)return"*"===e||n===e;if(r(n))return!1;if(Array.isArray(n))return!1}return r(e)?r(n)?e.toString()===n.toString():!Array.isArray(n)&&Boolean(n.match(e)):!!Array.isArray(e)&&(Array.isArray(n)?JSON.stringify(e)===JSON.stringify(n):!r(n)&&e.some((function(e){return g(e,n)})))}function E(e){try{if(e===window)return!0}catch(e){if(e&&e.message===o)return!0}try{if("[object Window]"==={}.toString.call(e))return!0}catch(e){if(e&&e.message===o)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===o)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===o)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===o)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===o)return!0}try{if(e&&"__unlikely_value__"===e.__cross_domain_utils_window_check__)return!1}catch(e){return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch(e){}return!1}function P(e){try{e.close()}catch(e){}}function b(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&e instanceof window.constructor)return!1;var n={}.toString;if(n){var t=n.call(e);if("[object Window]"===t||"[object global]"===t||"[object DOMWindow]"===t)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}var _,O=[],T=[],S=0;function x(){if(!S&&_){var e=_;_=null,e.resolve()}}function I(){S+=1}function N(){S-=1,x()}var R=function(){function e(e){var n=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=[],e){var t,r,o=!1,i=!1,a=!1;I();try{e((function(e){a?n.resolve(e):(o=!0,t=e)}),(function(e){a?n.reject(e):(i=!0,r=e)}))}catch(e){return N(),void this.reject(e)}N(),a=!0,o?this.resolve(t):i&&this.reject(r)}}var n=e.prototype;return n.resolve=function(e){if(this.resolved||this.rejected)return this;if(b(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},n.reject=function(e){var n=this;if(this.resolved||this.rejected)return this;if(b(e))throw new Error("Can not reject promise with another promise");if(!e){var t=e&&"function"==typeof e.toString?e.toString():{}.toString.call(e);e=new Error("Expected reject to be called with Error, got "+t)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout((function(){n.errorHandled||function(e,n){if(-1===O.indexOf(e)){O.push(e),setTimeout((function(){throw e}),1);for(var t=0;t<T.length;t++)T[t](e,n)}}(e,n)}),1),this.dispatch(),this},n.asyncReject=function(e){return this.errorHandled=!0,this.reject(e),this},n.dispatch=function(){var n=this.resolved,t=this.rejected,r=this.handlers;if(!this.dispatching&&(n||t)){this.dispatching=!0,I();for(var o=function(e,n){return e.then((function(e){n.resolve(e)}),(function(e){n.reject(e)}))},i=0;i<r.length;i++){var a=r[i],u=a.onSuccess,c=a.onError,s=a.promise,d=void 0;if(n)try{d=u?u(this.value):this.value}catch(e){s.reject(e);continue}else if(t){if(!c){s.reject(this.error);continue}try{d=c(this.error)}catch(e){s.reject(e);continue}}d instanceof e&&(d.resolved||d.rejected)?(d.resolved?s.resolve(d.value):s.reject(d.error),d.errorHandled=!0):b(d)?d instanceof e&&(d.resolved||d.rejected)?d.resolved?s.resolve(d.value):s.reject(d.error):o(d,s):s.resolve(d)}r.length=0,this.dispatching=!1,N()}},n.then=function(n,t){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for success handler");if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for error handler");var r=new e;return this.handlers.push({promise:r,onSuccess:n,onError:t}),this.errorHandled=!0,this.dispatch(),r},n.catch=function(e){return this.then(void 0,e)},n.finally=function(n){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.finally expected a function");return this.then((function(t){return e.try(n).then((function(){return t}))}),(function(t){return e.try(n).then((function(){throw t}))}))},n.timeout=function(e,n){var t=this;if(this.resolved||this.rejected)return this;var r=setTimeout((function(){t.resolved||t.rejected||t.reject(n||new Error("Promise timed out after "+e+"ms"))}),e);return this.then((function(e){return clearTimeout(r),e}))},n.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},e.resolve=function(n){return n instanceof e?n:b(n)?new e((function(e,t){return n.then(e,t)})):(new e).resolve(n)},e.reject=function(n){return(new e).reject(n)},e.asyncReject=function(n){return(new e).asyncReject(n)},e.all=function(n){var t=new e,r=n.length,o=[];if(!r)return t.resolve(o),t;for(var i=function(e,n,i){return n.then((function(n){o[e]=n,0==(r-=1)&&t.resolve(o)}),(function(e){i.reject(e)}))},a=0;a<n.length;a++){var u=n[a];if(u instanceof e){if(u.resolved){o[a]=u.value,r-=1;continue}}else if(!b(u)){o[a]=u,r-=1;continue}i(a,e.resolve(u),t)}return 0===r&&t.resolve(o),t},e.hash=function(n){var t={},r=[],o=function(e){if(n.hasOwnProperty(e)){var o=n[e];b(o)?r.push(o.then((function(n){t[e]=n}))):t[e]=o}};for(var i in n)o(i);return e.all(r).then((function(){return t}))},e.map=function(n,t){return e.all(n.map(t))},e.onPossiblyUnhandledException=function(e){return function(e){return T.push(e),{cancel:function(){T.splice(T.indexOf(e),1)}}}(e)},e.try=function(n,t,r){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.try expected a function");var o;I();try{o=n.apply(t,r||[])}catch(n){return N(),e.reject(n)}return N(),e.resolve(o)},e.delay=function(n){return new e((function(e){setTimeout(e,n)}))},e.isPromise=function(n){return!!(n&&n instanceof e)||b(n)},e.flush=function(){return n=_=_||new e,x(),n;var n},e}();function C(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}var k,j=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("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<n.length;t++){var r=n[t];if(E(r)&&m(r)){if(e)try{e.delete(r)}catch(e){}n.splice(t,1),this.values.splice(t,1),t-=1}}},n.isSafeToReadWrite=function(e){return!E(e)},n.set=function(e,n){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.set(e,n)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var r=this.name,o=e[r];return void(o&&o[0]===e?o[1]=n:Object.defineProperty(e,r,{value:[e,n],writable:!0}))}catch(e){}this._cleanupClosedWindows();var i=this.keys,a=this.values,u=C(i,e);-1===u?(i.push(e),a.push(n)):a[u]=n},n.get=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return n.get(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return t&&t[0]===e?t[1]:void 0}catch(e){}this._cleanupClosedWindows();var r=C(this.keys,e);if(-1!==r)return this.values[r]},n.delete=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{n.delete(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];t&&t[0]===e&&(t[0]=t[1]=void 0)}catch(e){}this._cleanupClosedWindows();var r=this.keys,o=C(r,e);-1!==o&&(r.splice(o,1),this.values.splice(o,1))},n.has=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return!0}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return!(!t||t[0]!==e)}catch(e){}return this._cleanupClosedWindows(),-1!==C(this.keys,e)},n.getOrSet=function(e,n){if(this.has(e))return this.get(e);var t=n();return this.set(e,t),t},e}();function W(e){return e.name||e.__name__||e.displayName||"anonymous"}function A(e,n){try{delete e.name,e.name=n}catch(e){}return e.__name__=e.displayName=n,e}function L(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,(function(){return e.charAt(Math.floor(Math.random()*e.length))}))+"_"+function(e){if("function"==typeof btoa)return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,n){return String.fromCharCode(parseInt(n,16))})));if("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64");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()}function D(e){try{return JSON.stringify([].slice.call(e),(function(e,n){return"function"==typeof n?"memoize["+function(e){if(k=k||new j,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");var n=k.get(e);return n||(n=typeof e+":"+L(),k.set(e,n)),n}(n)+"]":n}))}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function M(){return{}}var q=0,F=0;function z(e,n){void 0===n&&(n={});var t,r,o=n.thisNamespace,i=void 0!==o&&o,a=n.time,u=q;q+=1;var c=function(){for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];var s;u<F&&(t=null,r=null,u=q,q+=1),s=i?(r=r||new j).getOrSet(this,M):t=t||{};var d=D(o),f=s[d];if(f&&a&&Date.now()-f.time<a&&(delete s[d],f=null),f)return f.value;var l=Date.now(),p=e.apply(this,arguments);return s[d]={time:l,value:p},p};return c.reset=function(){t=null,r=null},A(c,(n.name||W(e))+"::memoized")}function B(e){var n={};function t(){for(var t=arguments,r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var u=D(i);return n.hasOwnProperty(u)||(n[u]=R.try((function(){return e.apply(r,t)})).finally((function(){delete n[u]}))),n[u]}return t.reset=function(){n={}},A(t,W(e)+"::promiseMemoized")}function U(){}function Y(e,n){if(void 0===n&&(n=1),n>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";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: "+Y(e,n+1)}}function H(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function G(e){return"[object RegExp]"==={}.toString.call(e)}function V(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function J(){return Boolean(document.body)&&"complete"===document.readyState}function $(){return Boolean(document.body)&&"interactive"===document.readyState}z.clear=function(){F=q},z((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})),z((function(){return new R((function(e){if(J()||$())return e();var n=setInterval((function(){if(J()||$())return clearInterval(n),e()}),10)}))}));var Z="undefined"!=typeof document?document.currentScript:null,X=z((function(){if(Z)return Z;if(Z=function(){try{var e=function(){try{throw new Error("_")}catch(e){return e.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(e){}}())return Z;throw new Error("Can not determine current script")})),K=L();function Q(e){void 0===e&&(e=window);var n="__post_robot_10_0_42__";return e!==window?e[n]:e[n]=e[n]||{}}z((function(){var e;try{e=X()}catch(e){return K}var n=e.getAttribute("data-uid");return n&&"string"==typeof n||(n=e.getAttribute("data-uid-auto"))&&"string"==typeof n||(n=L(),e.setAttribute("data-uid-auto",n)),n}));var ee=function(){return{}};function ne(e,n){return void 0===e&&(e="store"),void 0===n&&(n=ee),V(Q(),e,(function(){var e=n();return{has:function(n){return e.hasOwnProperty(n)},get:function(n,t){return e.hasOwnProperty(n)?e[n]:t},set:function(n,t){return e[n]=t,t},del:function(n){delete e[n]},getOrSet:function(n,t){return V(e,n,t)},reset:function(){e=n()},keys:function(){return Object.keys(e)}}}))}var te,re=function(){};function oe(){var e=Q();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new re,e.WINDOW_WILDCARD}function ie(e,n){return void 0===e&&(e="store"),void 0===n&&(n=ee),ne("windowStore").getOrSet(e,(function(){var t=new j,r=function(e){return t.getOrSet(e,n)};return{has:function(n){return r(n).hasOwnProperty(e)},get:function(n,t){var o=r(n);return o.hasOwnProperty(e)?o[e]:t},set:function(n,t){return r(n)[e]=t,t},del:function(n){delete r(n)[e]},getOrSet:function(n,t){return V(r(n),e,t)}}}))}function ae(){return ne("instance").getOrSet("instanceID",L)}function ue(e,n){var t=n.domain,r=ie("helloPromises"),o=r.get(e);o&&o.resolve({domain:t});var i=R.resolve({domain:t});return r.set(e,i),i}function ce(e,n){return(0,n.send)(e,"postrobot_hello",{instanceID:ae()},{domain:"*",timeout:-1}).then((function(n){var t=n.origin,r=n.data.instanceID;return ue(e,{domain:t}),{win:e,domain:t,instanceID:r}}))}function se(e,n){var t=n.send;return ie("windowInstanceIDPromises").getOrSet(e,(function(){return ce(e,{send:t}).then((function(e){return e.instanceID}))}))}function de(e){ie("knownWindows").set(e,!0)}function fe(e){return"object"==typeof e&&null!==e&&"string"==typeof e.__type__}function le(e){return void 0===e?"undefined":null===e?"null":Array.isArray(e)?"array":"function"==typeof e?"function":"object"==typeof e?e instanceof Error?"error":"function"==typeof e.then?"promise":"[object RegExp]"==={}.toString.call(e)?"regex":"[object Date]"==={}.toString.call(e)?"date":"object":"string"==typeof e?"string":"number"==typeof e?"number":"boolean"==typeof e?"boolean":void 0}function pe(e,n){return{__type__:e,__val__:n}}var he,we=((te={}).function=function(){},te.error=function(e){return pe("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},te.promise=function(){},te.regex=function(e){return pe("regex",e.source)},te.date=function(e){return pe("date",e.toJSON())},te.array=function(e){return e},te.object=function(e){return e},te.string=function(e){return e},te.number=function(e){return e},te.boolean=function(e){return e},te.null=function(e){return e},te),ve={},me=((he={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},he.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+"\n\n"+o.stack,o},he.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},he.regex=function(e){return new RegExp(e)},he.date=function(e){return new Date(e)},he.array=function(e){return e},he.object=function(e){return e},he.string=function(e){return e},he.number=function(e){return e},he.boolean=function(e){return e},he.null=function(e){return e},he),ye={};function ge(){for(var e=ne("idToProxyWindow"),n=0,t=e.keys();n<t.length;n++){var r=t[n];e.get(r).shouldClean()&&e.del(r)}}function Ee(e,n){var t=n.send,r=n.id,o=void 0===r?L():r,i=e.then((function(e){if(f(e))return l(e).name})),a=e.then((function(e){if(m(e))throw new Error("Window is closed, can not determine type");return u(e)?"popup":"iframe"}));return i.catch(U),a.catch(U),{id:o,getType:function(){return a},getInstanceID:B((function(){return e.then((function(e){return se(e,{send:t})}))})),close:function(){return e.then(P)},getName:function(){return e.then((function(e){if(!m(e))return f(e)?l(e).name:i}))},focus:function(){return e.then((function(e){e.focus()}))},isClosed:function(){return e.then((function(e){return m(e)}))},setLocation:function(n){return e.then((function(e){var t=window.location.protocol+"//"+window.location.host;if(0===n.indexOf("/"))n=""+t+n;else if(!n.match(/^https?:\/\//)&&0!==n.indexOf(t))throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(n));if(f(e))try{if(e.location&&"function"==typeof e.location.replace)return void e.location.replace(n)}catch(e){}e.location=n}))},setName:function(n){return e.then((function(e){var t=f(e),r=function(e){if(f(e))return l(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}}(e);if(!t)throw new Error("Can not set name for cross-domain window: "+n);l(e).name=n,r&&r.setAttribute("name",n),i=R.resolve(n)}))}}}new R((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)}));var Pe=function(){function e(e){var n=e.send,t=e.win,r=e.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 R,this.serializedWindow=r||Ee(this.actualWindowPromise,{send:n}),ne("idToProxyWindow").set(this.getID(),this),t&&this.setWindow(t,{send:n})}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(e){return"popup"===e}))},n.setLocation=function(e){var n=this;return this.serializedWindow.setLocation(e).then((function(){return n}))},n.getName=function(){return this.serializedWindow.getName()},n.setName=function(e){var n=this;return this.serializedWindow.setName(e).then((function(){return n}))},n.close=function(){var e=this;return this.serializedWindow.close().then((function(){return e}))},n.focus=function(){var e=this,n=this.isPopup(),t=this.getName(),r=R.hash({isPopup:n,name:t}).then((function(e){var n=e.name;e.isPopup&&n&&window.open("",n)})),o=this.serializedWindow.focus();return R.all([r,o]).then((function(){return e}))},n.isClosed=function(){return this.serializedWindow.isClosed()},n.getWindow=function(){return this.actualWindow},n.setWindow=function(e,n){var t=n.send;this.actualWindow=e,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=Ee(this.actualWindowPromise,{send:t,id:this.getID()}),ie("winToProxyWindow").set(e,this)},n.awaitWindow=function(){return this.actualWindowPromise},n.matchWindow=function(e,n){var t=this,r=n.send;return R.try((function(){return t.actualWindow?e===t.actualWindow:R.hash({proxyInstanceID:t.getInstanceID(),knownWindowInstanceID:se(e,{send:r})}).then((function(n){var o=n.proxyInstanceID===n.knownWindowInstanceID;return o&&t.setWindow(e,{send:r}),o}))}))},n.unwrap=function(){return this.actualWindow||this},n.getInstanceID=function(){return this.serializedWindow.getInstanceID()},n.shouldClean=function(){return Boolean(this.actualWindow&&m(this.actualWindow))},n.serialize=function(){return this.serializedWindow},e.unwrap=function(n){return e.isProxyWindow(n)?n.unwrap():n},e.serialize=function(n,t){var r=t.send;return ge(),e.toProxyWindow(n,{send:r}).serialize()},e.deserialize=function(n,t){var r=t.send;return ge(),ne("idToProxyWindow").get(n.id)||new e({serializedWindow:n,send:r})},e.isProxyWindow=function(e){return Boolean(e&&!E(e)&&e.isProxyWindow)},e.toProxyWindow=function(n,t){var r=t.send;if(ge(),e.isProxyWindow(n))return n;var o=n;return ie("winToProxyWindow").get(o)||new e({win:o,send:r})},e}();function be(e,n,t,r,o){var i=ie("methodStore"),a=ne("proxyWindowMethods");Pe.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 _e(e,n){var t=ie("methodStore"),r=ne("proxyWindowMethods");return t.getOrSet(e,(function(){return{}}))[n]||r.get(n)}function Oe(e,n,t,r,o){var i,a,u;a=(i={on:o.on,send:o.send}).on,u=i.send,ne("builtinListeners").getOrSet("functionCalls",(function(){return a("postrobot_method",{domain:"*"},(function(e){var n=e.source,t=e.origin,r=e.data,o=r.id,i=r.name,a=_e(n,o);if(!a)throw new Error("Could not find method '"+i+"' with id: "+r.id+" in "+d(window));var c=a.source,s=a.domain,f=a.val;return R.try((function(){if(!g(s,t))throw new Error("Method '"+r.name+"' domain "+JSON.stringify(G(a.domain)?a.domain.source:a.domain)+" does not match origin "+t+" in "+d(window));if(Pe.isProxyWindow(c))return c.matchWindow(n,{send:u}).then((function(e){if(!e)throw new Error("Method call '"+r.name+"' failed - proxy window does not match source in "+d(window))}))})).then((function(){return f.apply({source:n,origin:t},r.args)}),(function(e){return R.try((function(){if(f.onError)return f.onError(e)})).then((function(){var n,t;throw e.stack&&(e.stack="Remote call to "+i+"("+(void 0===(n=r.args)&&(n=[]),(t=n,[].slice.call(t)).map((function(e){return"string"==typeof e?"'"+e+"'":void 0===e?"undefined":null===e?"null":"boolean"==typeof e?e.toString():Array.isArray(e)?"[ ... ]":"object"==typeof e?"{ ... }":"function"==typeof e?"() => { ... }":"<"+typeof e+">"})).join(", ")+") failed\n\n")+e.stack),e}))})).then((function(e){return{result:e,id:o,name:i}}))}))}));var c=t.__id__||L();e=Pe.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+"::")),Pe.isProxyWindow(e)?(be(c,t,s,e,n),e.awaitWindow().then((function(e){be(c,t,s,e,n)}))):be(c,t,s,e,n),pe("cross_domain_function",{id:c,name:s})}function Te(e,n,t,r){var o,i=r.on,a=r.send;return function(e,n){void 0===n&&(n=ve);var t=JSON.stringify(e,(function(e){var t=this[e];if(fe(this))return t;var r=le(t);if(!r)return t;var o=n[r]||we[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 pe("cross_domain_zalgo_promise",{then:Oe(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 Oe(e,n,t,r,{on:i,send:a})},o.object=function(e){return E(e)||Pe.isProxyWindow(e)?pe("cross_domain_window",Pe.serialize(e,{send:a})):e},o))}function Se(e,n,t,r){var o,i=r.send;return function(e,n){if(void 0===n&&(n=ye),"undefined"!==e)return JSON.parse(e,(function(e,t){if(fe(this))return t;var r,o;if(fe(t)?(r=t.__type__,o=t.__val__):(r=le(t),o=t),!r)return o;var i=n[r]||me[r];return i?i(o,e):o}))}(t,((o={}).cross_domain_zalgo_promise=function(e){return function(e,n,t){return new R(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 Pe.toProxyWindow(e,{send:a}).awaitWindow().then((function(e){var c=_e(e,o);if(c&&c.val!==r)return c.val.apply({source:window,origin:d()},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 Pe.deserialize(e,{send:i})},o))}var xe={};function Ie(e,n,t,r){var o=r.on,i=r.send;return R.try((function(){var r=ie().getOrSet(e,(function(){return{}}));return r.buffer=r.buffer||[],r.buffer.push(t),r.flush=r.flush||R.flush().then((function(){if(m(e))throw new Error("Window is closed");var t,a=Te(e,n,((t={}).__post_robot_10_0_42__=r.buffer||[],t),{on:o,send:i});delete r.buffer;for(var u=Object.keys(xe),c=[],s=0;s<u.length;s++){var d=u[s];try{xe[d](e,a,n)}catch(e){c.push(e)}}if(c.length===u.length)throw new Error("All post-robot messaging strategies failed:\n\n"+c.map((function(e,n){return n+". "+Y(e)})).join("\n\n"))})),r.flush.then((function(){delete r.flush}))})).then(U)}function Ne(e){return ne("responseListeners").get(e)}function Re(e){ne("responseListeners").del(e)}function Ce(e){return ne("erroredResponseListeners").has(e)}function ke(e){var n=e.name,t=e.win,r=e.domain,o=ie("requestListeners");if("*"===t&&(t=null),"*"===r&&(r=null),!n)throw new Error("Name required to get request listener");for(var i=0,a=[t,oe()];i<a.length;i++){var u=a[i];if(u){var c=o.get(u);if(c){var s=c[n];if(s){if(r&&"string"==typeof r){if(s[r])return s[r];if(s.__domain_regex__)for(var d=0,f=s.__domain_regex__;d<f.length;d++){var l=f[d],p=l.listener;if(g(l.regex,r))return p}}if(s["*"])return s["*"]}}}}}function je(e,n,t,r){var o=r.on,i=r.send,a=ke({name:t.name,win:e,domain:n}),u="postrobot_method"===t.name&&t.data&&"string"==typeof t.data.name?t.data.name+"()":t.name;function c(r,a,c){return R.flush().then((function(){if(!t.fireAndForget&&!m(e))try{return Ie(e,n,{id:L(),origin:d(window),type:"postrobot_message_response",hash:t.hash,name:t.name,ack:r,data:a,error:c},{on:o,send:i})}catch(e){throw new Error("Send response message failed for "+u+" in "+d()+"\n\n"+Y(e))}}))}return R.all([R.flush().then((function(){if(!t.fireAndForget&&!m(e))try{return Ie(e,n,{id:L(),origin:d(window),type:"postrobot_message_ack",hash:t.hash,name:t.name},{on:o,send:i})}catch(e){throw new Error("Send ack message failed for "+u+" in "+d()+"\n\n"+Y(e))}})),R.try((function(){if(!a)throw new Error("No handler found for post message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!g(a.domain,n))throw new Error("Request origin "+n+" does not match domain "+a.domain.toString());return a.handler({source:e,origin:n,data:t.data})})).then((function(e){return c("success",e)}),(function(e){return c("error",null,e)}))]).then(U).catch((function(e){if(a&&a.handleError)return a.handleError(e);throw e}))}function We(e,n,t){if(!Ce(t.hash)){var r=Ne(t.hash);if(!r)throw new Error("No handler found for post message ack for message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);try{if(!g(r.domain,n))throw new Error("Ack origin "+n+" does not match domain "+r.domain.toString());if(e!==r.win)throw new Error("Ack source does not match registered window")}catch(e){r.promise.reject(e)}r.ack=!0}}function Ae(e,n,t){if(!Ce(t.hash)){var o,i=Ne(t.hash);if(!i)throw new Error("No handler found for post message response for message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!g(i.domain,n))throw new Error("Response origin "+n+" does not match domain "+(o=i.domain,Array.isArray(o)?"("+o.join(" | ")+")":r(o)?"RegExp("+o.toString():o.toString()));if(e!==i.win)throw new Error("Response source does not match registered window");Re(t.hash),"error"===t.ack?i.promise.reject(t.error):"success"===t.ack&&i.promise.resolve({source:e,origin:n,data:t.data})}}function Le(e,n){var t=n.on,r=n.send,o=ne("receivedMessages");try{if(!window||window.closed||!e.source)return}catch(e){return}var i=e.source,a=e.origin,u=function(e,n,t,r){var o,i=r.on,a=r.send;try{o=Se(n,t,e,{on:i,send:a})}catch(e){return}if(o&&"object"==typeof o&&null!==o){var u=o.__post_robot_10_0_42__;if(Array.isArray(u))return u}}(e.data,i,a,{on:t,send:r});if(u){de(i);for(var c=0;c<u.length;c++){var s=u[c];if(o.has(s.id))return;if(o.set(s.id,!0),m(i)&&!s.fireAndForget)return;0===s.origin.indexOf("file:")&&(a="file://");try{"postrobot_message_request"===s.type?je(i,a,s,{on:t,send:r}):"postrobot_message_response"===s.type?Ae(i,a,s):"postrobot_message_ack"===s.type&&We(i,a,s)}catch(e){setTimeout((function(){throw e}),0)}}}}function De(e,n,t){if(!e)throw new Error("Expected name");if("function"==typeof(n=n||{})&&(t=n,n={}),!t)throw new Error("Expected handler");(n=n||{}).name=e,n.handler=t||n.handler;var r=n.window,o=n.domain,i=function e(n,t){var r=n.name,o=n.win,i=n.domain,a=ie("requestListeners");if(!r||"string"!=typeof r)throw new Error("Name required to add request listener");if(Array.isArray(o)){for(var u=[],c=0,s=o;c<s.length;c++)u.push(e({name:r,domain:i,win:s[c]},t));return{cancel:function(){for(var e=0;e<u.length;e++)u[e].cancel()}}}if(Array.isArray(i)){for(var d=[],f=0,l=i;f<l.length;f++)d.push(e({name:r,win:o,domain:l[f]},t));return{cancel:function(){for(var e=0;e<d.length;e++)d[e].cancel()}}}var p=ke({name:r,win:o,domain:i});if(o&&"*"!==o||(o=oe()),i=i||"*",p)throw o&&i?new Error("Request listener already exists for "+r+" on domain "+i.toString()+" for "+(o===oe()?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+r+" for "+(o===oe()?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+r+" on domain "+i.toString()):new Error("Request listener already exists for "+r);var h,w,v=a.getOrSet(o,(function(){return{}})),m=V(v,r,(function(){return{}})),y=i.toString();return G(i)?(h=V(m,"__domain_regex__",(function(){return[]}))).push(w={regex:i,listener:t}):m[y]=t,{cancel:function(){delete m[y],w&&(h.splice(h.indexOf(w,1)),h.length||delete m.__domain_regex__),Object.keys(m).length||delete v[r],o&&!Object.keys(v).length&&a.del(o)}}}({name:e,win:r,domain:o},{handler:n.handler,handleError:n.errorHandler||function(e){throw e},window:r,domain:o||"*",name:e});return{cancel:function(){i.cancel()}}}function Me(e,n,t){"function"==typeof(n=n||{})&&(t=n,n={});var r,o=new R;return n.errorHandler=function(e){r.cancel(),o.reject(e)},r=De(e,n,(function(e){if(r.cancel(),o.resolve(e),t)return t(e)})),o.cancel=r.cancel,o}xe.postrobot_post_message=function(e,n,t){0===t.indexOf("file:")&&(t="*"),e.postMessage(n,t)};var qe=function e(n,t,r,o){var i=(o=o||{}).domain||"*",u=o.timeout||-1,c=o.timeout||5e3,s=o.fireAndForget||!1;return R.try((function(){if(function(e,n,t){if(!e)throw new Error("Expected name");if(t&&"string"!=typeof t&&!Array.isArray(t)&&!G(t))throw new TypeError("Can not send "+e+". Expected domain "+JSON.stringify(t)+" to be a string, array, or regex");if(m(n))throw new Error("Can not send "+e+". Target window is closed")}(t,n,i),function(e,n){var t=y(n);if(t)return t===e;if(n===e)return!1;if(function(e){void 0===e&&(e=window);try{if(e.top)return e.top}catch(e){}if(a(e)===e)return e;try{if(p(window,e)&&window.top)return window.top}catch(e){}try{if(p(e,window)&&window.top)return window.top}catch(e){}for(var n=0,t=function e(n){for(var t=[],r=0,o=h(n);r<o.length;r++){var i=o[r];t.push(i);for(var a=0,u=e(i);a<u.length;a++)t.push(u[a])}return t}(e);n<t.length;n++){var r=t[n];try{if(r.top)return r.top}catch(e){}if(a(r)===r)return r}}(n)===n)return!1;for(var r=0,o=h(e);r<o.length;r++)if(o[r]===n)return!0;return!1}(window,n))return function(e,n,t){void 0===n&&(n=5e3),void 0===t&&(t="Window");var r=function(e){return ie("helloPromises").getOrSet(e,(function(){return new R}))}(e);return-1!==n&&(r=r.timeout(n,new Error(t+" did not load after "+n+"ms"))),r}(n,c)})).then((function(t){return function(e,n,t,r){var o=r.send;return R.try((function(){return"string"==typeof n?n:R.try((function(){return t||ce(e,{send:o}).then((function(e){return e.domain}))})).then((function(e){if(!g(n,n))throw new Error("Domain "+H(n)+" does not match "+H(n));return e}))}))}(n,i,(void 0===t?{}:t).domain,{send:e})})).then((function(o){var i,a=o,c="postrobot_method"===t&&r&&"string"==typeof r.name?r.name+"()":t,f=new R,l=t+"_"+L();if(!s){var p={name:t,win:n,domain:a,promise:f};!function(e,n){ne("responseListeners").set(e,n)}(l,p);var h=ie("requestPromises").getOrSet(n,(function(){return[]}));h.push(f),f.catch((function(){!function(e){ne("erroredResponseListeners").set(e,!0)}(l),Re(l)}));var w=function(e){return ie("knownWindows").get(e,!1)}(n)?1e4:2e3,v=u,y=w,g=v,E=(function e(){i=setTimeout((function(){m(n)?f.reject(new Error("Window closed for "+t+" before "+(p.ack?"response":"ack"))):p.cancelled?f.reject(new Error("Response listener was cancelled for "+t)):(y=Math.max(y-500,0),-1!==g&&(g=Math.max(g-500,0)),p.ack||0!==y?0===g&&f.reject(new Error("No response for postMessage "+c+" in "+d()+" in "+v+"ms")):f.reject(new Error("No ack for postMessage "+c+" in "+d()+" in "+w+"ms"))),e()}),500)}(),{cancel:function(){clearTimeout(i)}});f.finally((function(){E.cancel(),h.splice(h.indexOf(f,1))})).catch(U)}return Ie(n,a,{id:L(),origin:d(window),type:"postrobot_message_request",hash:l,name:t,data:r,fireAndForget:s},{on:De,send:e}).then((function(){return s?f.resolve():f}),(function(e){throw new Error("Send request message failed for "+c+" in "+d()+"\n\n"+Y(e))}))}))};function Fe(e,n,t){return Te(e,n,t,{on:De,send:qe})}function ze(e,n,t){return Se(e,n,t,{on:De,send:qe})}function Be(e){return new Pe({send:qe,win:e})}function Ue(e){return Pe.toProxyWindow(e,{send:qe})}function Ye(){var e,n,t,r;Q().initialized||(Q().initialized=!0,n=(e={on:De,send:qe}).on,t=e.send,(r=Q()).receiveMessage=r.receiveMessage||function(e){return Le(e,{on:n,send:t})},function(e){var n=e.on,t=e.send;ne().getOrSet("postMessageListener",(function(){return(e=window).addEventListener("message",r=function(e){!function(e,n){var t=n.on,r=n.send;R.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");Le({source:n,origin:o,data:i},{on:t,send:r})}}))}(e,{on:n,send:t})}),{cancel:function(){e.removeEventListener("message",r)}};var e,r}))}({on:De,send:qe}),function(e){var n=e.on,t=e.send;ne("builtinListeners").getOrSet("helloListener",(function(){var e=n("postrobot_hello",{domain:"*"},(function(e){return ue(e.source,{domain:e.origin}),{instanceID:ae()}})),r=y();return r&&ce(r,{send:t}).catch((function(e){})),e}))}({on:De,send:qe}))}function He(){var e;!function(){for(var e=ne("responseListeners"),n=0,t=e.keys();n<t.length;n++){var r=t[n],o=e.get(r);o&&(o.cancelled=!0),e.del(r)}}(),(e=ne().get("postMessageListener"))&&e.cancel(),delete window.__post_robot_10_0_42__}var Ge=!0;function Ve(e){for(var n=0,t=ie("requestPromises").get(e,[]);n<t.length;n++)t[n].reject(new Error("Window "+(m(e)?"closed":"cleaned up")+" before response")).catch(U)}Ye()}])},e.exports=t()})),k=i(C),j=u(Object.assign({__proto__:null,default:k,__moduleExports:C},k)),W=a((function(e){e.exports=j,e.exports.default=e.exports})),A=i(a((function(e,n){var t;"undefined"!=typeof self&&self,t=function(){return 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,n,t){function r(e,n){return(r=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function o(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n)}function i(){return(i=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function a(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&e instanceof window.constructor)return!1;var n={}.toString;if(n){var t=n.call(e);if("[object Window]"===t||"[object global]"===t||"[object DOMWindow]"===t)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}t.r(n),t.d(n,"PopupOpenError",(function(){return Be})),t.d(n,"create",(function(){return zt})),t.d(n,"destroy",(function(){return Yt})),t.d(n,"destroyComponents",(function(){return Bt})),t.d(n,"destroyAll",(function(){return Ut})),t.d(n,"PROP_TYPE",(function(){return wt})),t.d(n,"PROP_SERIALIZATION",(function(){return vt})),t.d(n,"CONTEXT",(function(){return mt})),t.d(n,"EVENT",(function(){return yt}));var u,c=[],s=[],d=0;function f(){if(!d&&u){var e=u;u=null,e.resolve()}}function l(){d+=1}function p(){d-=1,f()}var h=function(){function e(e){var n=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=[],e){var t,r,o=!1,i=!1,a=!1;l();try{e((function(e){a?n.resolve(e):(o=!0,t=e)}),(function(e){a?n.reject(e):(i=!0,r=e)}))}catch(e){return p(),void this.reject(e)}p(),a=!0,o?this.resolve(t):i&&this.reject(r)}}var n=e.prototype;return n.resolve=function(e){if(this.resolved||this.rejected)return this;if(a(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},n.reject=function(e){var n=this;if(this.resolved||this.rejected)return this;if(a(e))throw new Error("Can not reject promise with another promise");if(!e){var t=e&&"function"==typeof e.toString?e.toString():{}.toString.call(e);e=new Error("Expected reject to be called with Error, got "+t)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout((function(){n.errorHandled||function(e,n){if(-1===c.indexOf(e)){c.push(e),setTimeout((function(){throw e}),1);for(var t=0;t<s.length;t++)s[t](e,n)}}(e,n)}),1),this.dispatch(),this},n.asyncReject=function(e){return this.errorHandled=!0,this.reject(e),this},n.dispatch=function(){var n=this.resolved,t=this.rejected,r=this.handlers;if(!this.dispatching&&(n||t)){this.dispatching=!0,l();for(var o=function(e,n){return e.then((function(e){n.resolve(e)}),(function(e){n.reject(e)}))},i=0;i<r.length;i++){var u=r[i],c=u.onSuccess,s=u.onError,d=u.promise,f=void 0;if(n)try{f=c?c(this.value):this.value}catch(e){d.reject(e);continue}else if(t){if(!s){d.reject(this.error);continue}try{f=s(this.error)}catch(e){d.reject(e);continue}}if(f instanceof e&&(f.resolved||f.rejected)){var h=f;h.resolved?d.resolve(h.value):d.reject(h.error),h.errorHandled=!0}else a(f)?f instanceof e&&(f.resolved||f.rejected)?f.resolved?d.resolve(f.value):d.reject(f.error):o(f,d):d.resolve(f)}r.length=0,this.dispatching=!1,p()}},n.then=function(n,t){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for success handler");if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for error handler");var r=new e;return this.handlers.push({promise:r,onSuccess:n,onError:t}),this.errorHandled=!0,this.dispatch(),r},n.catch=function(e){return this.then(void 0,e)},n.finally=function(n){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.finally expected a function");return this.then((function(t){return e.try(n).then((function(){return t}))}),(function(t){return e.try(n).then((function(){throw t}))}))},n.timeout=function(e,n){var t=this;if(this.resolved||this.rejected)return this;var r=setTimeout((function(){t.resolved||t.rejected||t.reject(n||new Error("Promise timed out after "+e+"ms"))}),e);return this.then((function(e){return clearTimeout(r),e}))},n.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},n.lazy=function(){return this.errorHandled=!0,this},e.resolve=function(n){return n instanceof e?n:a(n)?new e((function(e,t){return n.then(e,t)})):(new e).resolve(n)},e.reject=function(n){return(new e).reject(n)},e.asyncReject=function(n){return(new e).asyncReject(n)},e.all=function(n){var t=new e,r=n.length,o=[].slice();if(!r)return t.resolve(o),t;for(var i=function(e,n,i){return n.then((function(n){o[e]=n,0==(r-=1)&&t.resolve(o)}),(function(e){i.reject(e)}))},u=0;u<n.length;u++){var c=n[u];if(c instanceof e){if(c.resolved){o[u]=c.value,r-=1;continue}}else if(!a(c)){o[u]=c,r-=1;continue}i(u,e.resolve(c),t)}return 0===r&&t.resolve(o),t},e.hash=function(n){var t={},r=[],o=function(e){if(n.hasOwnProperty(e)){var o=n[e];a(o)?r.push(o.then((function(n){t[e]=n}))):t[e]=o}};for(var i in n)o(i);return e.all(r).then((function(){return t}))},e.map=function(n,t){return e.all(n.map(t))},e.onPossiblyUnhandledException=function(e){return function(e){return s.push(e),{cancel:function(){s.splice(s.indexOf(e),1)}}}(e)},e.try=function(n,t,r){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.try expected a function");var o;l();try{o=n.apply(t,r||[])}catch(n){return p(),e.reject(n)}return p(),e.resolve(o)},e.delay=function(n){return new e((function(e){setTimeout(e,n)}))},e.isPromise=function(n){return!!(n&&n instanceof e)||a(n)},e.flush=function(){return n=u=u||new e,f(),n;var n},e}();function w(e){return"[object RegExp]"==={}.toString.call(e)}var v={IFRAME:"iframe",POPUP:"popup"},m="Call was rejected by callee.\r\n";function y(e){return void 0===e&&(e=window),e.location.protocol}function g(e){if(void 0===e&&(e=window),e.mockDomain){var n=e.mockDomain.split("//")[0];if(n)return n}return y(e)}function E(e){return void 0===e&&(e=window),"about:"===g(e)}function P(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}function b(e){if(void 0===e&&(e=window),e&&!P(e))try{return e.opener}catch(e){}}function _(e){try{return!0}catch(e){}return!1}function O(e){void 0===e&&(e=window);var n=e.location;if(!n)throw new Error("Can not read window location");var t=y(e);if(!t)throw new Error("Can not read window protocol");if("file:"===t)return"file://";if("about:"===t){var r=P(e);return r&&_()?O(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function T(e){void 0===e&&(e=window);var n=O(e);return n&&e.mockDomain&&0===e.mockDomain.indexOf("mock:")?e.mockDomain:n}function S(e){if(!function(e){try{if(e===window)return!0}catch(e){}try{var n=Object.getOwnPropertyDescriptor(e,"location");if(n&&!1===n.enumerable)return!1}catch(e){}try{if(E(e)&&_())return!0}catch(e){}try{if(function(e){return void 0===e&&(e=window),"mock:"===g(e)}(e)&&_())return!0}catch(e){}try{if(O(e)===O(window))return!0}catch(e){}return!1}(e))return!1;try{if(e===window)return!0;if(E(e)&&_())return!0;if(T(window)===T(e))return!0}catch(e){}return!1}function x(e){if(!S(e))throw new Error("Expected window to be same domain");return e}function I(e,n){if(!e||!n)return!1;var t=P(n);return t?t===e:-1!==function(e){var n=[];try{for(;e.parent!==e;)n.push(e.parent),e=e.parent}catch(e){}return n}(n).indexOf(e)}function N(e){var n,t,r=[];try{n=e.frames}catch(t){n=e}try{t=n.length}catch(e){}if(0===t)return r;if(t){for(var o=0;o<t;o++){var i=void 0;try{i=n[o]}catch(e){continue}r.push(i)}return r}for(var a=0;a<100;a++){var u=void 0;try{u=n[a]}catch(e){return r}if(!u)return r;r.push(u)}return r}function R(e){for(var n=[],t=0,r=N(e);t<r.length;t++){var o=r[t];n.push(o);for(var i=0,a=R(o);i<a.length;i++)n.push(a[i])}return n}function C(e){void 0===e&&(e=window);try{if(e.top)return e.top}catch(e){}if(P(e)===e)return e;try{if(I(window,e)&&window.top)return window.top}catch(e){}try{if(I(e,window)&&window.top)return window.top}catch(e){}for(var n=0,t=R(e);n<t.length;n++){var r=t[n];try{if(r.top)return r.top}catch(e){}if(P(r)===r)return r}}function k(e){var n=C(e);if(!n)throw new Error("Can not determine top window");var t=[].concat(R(n),[n]);return-1===t.indexOf(e)&&(t=[].concat(t,[e],R(e))),t}var j=[],W=[];function A(e,n){void 0===n&&(n=!0);try{if(e===window)return!1}catch(e){return!0}try{if(!e)return!0}catch(e){return!0}try{if(e.closed)return!0}catch(e){return!e||e.message!==m}if(n&&S(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}var t=function(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}(j,e);if(-1!==t){var r=W[t];if(r&&function(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var n=e.ownerDocument;if(n&&n.documentElement&&!n.documentElement.contains(e)){for(var t=e;t.parentNode&&t.parentNode!==t;)t=t.parentNode;if(!t.host||!n.documentElement.contains(t.host))return!0}return!1}(r))return!0}return!1}function L(e){return(e=e||window).navigator.mockUserAgent||e.navigator.userAgent}function D(e,n){for(var t=N(e),r=0;r<t.length;r++){var o=t[r];try{if(S(o)&&o.name===n&&-1!==t.indexOf(o))return o}catch(e){}}try{if(-1!==t.indexOf(e.frames[n]))return e.frames[n]}catch(e){}try{if(-1!==t.indexOf(e[n]))return e[n]}catch(e){}}function M(e,n){return e===b(n)}function q(e){return void 0===e&&(e=window),b(e=e||window)||P(e)||void 0}function F(e,n){for(var t=0;t<e.length;t++)for(var r=e[t],o=0;o<n.length;o++)if(r===n[o])return!0;return!1}function z(e){void 0===e&&(e=window);for(var n=0,t=e;t;)(t=P(t))&&(n+=1);return n}function B(e,n){var t=C(e)||e,r=C(n)||n;try{if(t&&r)return t===r}catch(e){}var o=k(e),i=k(n);if(F(o,i))return!0;var a=b(t),u=b(r);return a&&F(k(a),i)||u&&F(k(u),o),!1}function U(e,n){if("string"==typeof e){if("string"==typeof n)return"*"===e||n===e;if(w(n))return!1;if(Array.isArray(n))return!1}return w(e)?w(n)?e.toString()===n.toString():!Array.isArray(n)&&Boolean(n.match(e)):!!Array.isArray(e)&&(Array.isArray(n)?JSON.stringify(e)===JSON.stringify(n):!w(n)&&e.some((function(e){return U(e,n)})))}function Y(e){return e.match(/^(https?|mock|file):\/\//)?e.split("/").slice(0,3).join("/"):T()}function H(e,n,t,r){var o;return void 0===t&&(t=1e3),void 0===r&&(r=1/0),function i(){if(A(e))return o&&clearTimeout(o),n();r<=0?clearTimeout(o):(r-=t,o=setTimeout(i,t))}(),{cancel:function(){o&&clearTimeout(o)}}}function G(e){try{if(e===window)return!0}catch(e){if(e&&e.message===m)return!0}try{if("[object Window]"==={}.toString.call(e))return!0}catch(e){if(e&&e.message===m)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===m)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===m)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===m)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===m)return!0}try{if(e&&"__unlikely_value__"===e.__cross_domain_utils_window_check__)return!1}catch(e){return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch(e){}return!1}function V(e){if(0!==Y(e).indexOf("mock:"))return e;throw new Error("Mock urls not supported out of test mode")}function J(e){if(S(e))return x(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 $(e){if(function(e){return void 0===e&&(e=window),Boolean(P(e))}(e)){var n=J(e);if(n&&n.parentElement)return void n.parentElement.removeChild(n)}try{e.close()}catch(e){}}function Z(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}var X,K=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("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<n.length;t++){var r=n[t];if(G(r)&&A(r)){if(e)try{e.delete(r)}catch(e){}n.splice(t,1),this.values.splice(t,1),t-=1}}},n.isSafeToReadWrite=function(e){return!G(e)},n.set=function(e,n){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.set(e,n)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var r=this.name,o=e[r];return void(o&&o[0]===e?o[1]=n:Object.defineProperty(e,r,{value:[e,n],writable:!0}))}catch(e){}this._cleanupClosedWindows();var i=this.keys,a=this.values,u=Z(i,e);-1===u?(i.push(e),a.push(n)):a[u]=n},n.get=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return n.get(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return t&&t[0]===e?t[1]:void 0}catch(e){}this._cleanupClosedWindows();var r=Z(this.keys,e);if(-1!==r)return this.values[r]},n.delete=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{n.delete(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];t&&t[0]===e&&(t[0]=t[1]=void 0)}catch(e){}this._cleanupClosedWindows();var r=this.keys,o=Z(r,e);-1!==o&&(r.splice(o,1),this.values.splice(o,1))},n.has=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return!0}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return!(!t||t[0]!==e)}catch(e){}return this._cleanupClosedWindows(),-1!==Z(this.keys,e)},n.getOrSet=function(e,n){if(this.has(e))return this.get(e);var t=n();return this.set(e,t),t},e}();function Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ee(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function ne(e,n,t){return(ne=ee()?Reflect.construct:function(e,n,t){var o=[null];o.push.apply(o,n);var i=new(Function.bind.apply(e,o));return t&&r(i,t.prototype),i}).apply(null,arguments)}function te(e){var n="function"==typeof Map?new Map:void 0;return(te=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return ne(e,arguments,Q(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),r(t,e)})(e)}function re(e){var n=!1;try{(e instanceof window.Element||null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument)&&(n=!0)}catch(e){}return n}function oe(e){return e.name||e.__name__||e.displayName||"anonymous"}function ie(e,n){try{delete e.name,e.name=n}catch(e){}return e.__name__=e.displayName=n,e}function ae(e){if("function"==typeof btoa)return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,n){return String.fromCharCode(parseInt(n,16))}))).replace(/[=]/g,"");if("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64").replace(/[=]/g,"");throw new Error("Can not find window.btoa or Buffer")}function ue(){var e="0123456789abcdef";return"uid_"+"xxxxxxxxxx".replace(/./g,(function(){return e.charAt(Math.floor(Math.random()*e.length))}))+"_"+ae((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function ce(e){try{return JSON.stringify([].slice.call(e),(function(e,n){return"function"==typeof n?"memoize["+function(e){if(X=X||new K,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");var n=X.get(e);return n||(n=typeof e+":"+ue(),X.set(e,n)),n}(n)+"]":re(n)?{}:n}))}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function se(){return{}}var de=0,fe=0;function le(e,n){void 0===n&&(n={});var t,r,o=n.thisNamespace,i=void 0!==o&&o,a=n.time,u=de;de+=1;var c=function(){for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];var s,d;u<fe&&(t=null,r=null,u=de,de+=1),s=i?(r=r||new K).getOrSet(this,se):t=t||{};try{d=ce(o)}catch(n){return e.apply(this,arguments)}var f=s[d];if(f&&a&&Date.now()-f.time<a&&(delete s[d],f=null),f)return f.value;var l=Date.now(),p=e.apply(this,arguments);return s[d]={time:l,value:p},p};return c.reset=function(){t=null,r=null},ie(c,(n.name||oe(e))+"::memoized")}function pe(e){var n={};function t(){for(var t=arguments,r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var u=ce(i);return n.hasOwnProperty(u)||(n[u]=h.try((function(){return e.apply(r,t)})).finally((function(){delete n[u]}))),n[u]}return t.reset=function(){n={}},ie(t,oe(e)+"::promiseMemoized")}function he(){}function we(e){var n=!1;return ie((function(){if(!n)return n=!0,e.apply(this,arguments)}),oe(e)+"::once")}function ve(e,n){if(void 0===n&&(n=1),n>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";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 me(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 ge(e){return e}function Ee(e,n){var t;return function r(){t=setTimeout((function(){e(),r()}),n)}(),{cancel:function(){clearTimeout(t)}}}function Pe(e){return e.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))}function be(e,n,t){if(Array.isArray(e)){if("number"!=typeof n)throw new TypeError("Array key must be number")}else if("object"==typeof e&&null!==e&&"string"!=typeof n)throw new TypeError("Object key must be string");Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get:function(){delete e[n];var r=t();return e[n]=r,r},set:function(t){delete e[n],e[n]=t}})}function _e(e){return[].slice.call(e)}function Oe(e){return"object"==typeof(n=e)&&null!==n&&"[object Object]"==={}.toString.call(e);var n}function Te(e){if(!Oe(e))return!1;var n=e.constructor;if("function"!=typeof n)return!1;var t=n.prototype;return!!Oe(t)&&!!t.hasOwnProperty("isPrototypeOf")}function Se(e,n,t){if(void 0===t&&(t=""),Array.isArray(e)){for(var r=e.length,o=[],i=function(r){be(o,r,(function(){var o=t?t+"."+r:""+r,i=n(e[r],r,o);return(Te(i)||Array.isArray(i))&&(i=Se(i,n,o)),i}))},a=0;a<r;a++)i(a);return o}if(Te(e)){var u={},c=function(r){if(!e.hasOwnProperty(r))return 1;be(u,r,(function(){var o=t?t+"."+r:""+r,i=n(e[r],r,o);return(Te(i)||Array.isArray(i))&&(i=Se(i,n,o)),i}))};for(var s in e)c(s);return u}throw new Error("Pass an object or array")}function xe(e){return null!=e}function Ie(e){return"[object RegExp]"==={}.toString.call(e)}function Ne(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function Re(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=we((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 h.all(o).then(he)}};return o}function Ce(e,n){if(null==n)throw new Error("Expected "+e+" to be present");return n}le.clear=function(){fe=de},le((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 ke=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 o(n,e),n}(te(Error));function je(){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 Ae(){return Boolean(document.body)&&"interactive"===document.readyState}function Le(e){return encodeURIComponent(e)}function De(e){return function(n,t,r){void 0===r&&(r=[]);var o=n.__inline_memoize_cache__=n.__inline_memoize_cache__||{},i=ce(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<r.length;t++){var o=r[t];(o=o.split("="))[0]&&o[1]&&(n[decodeURIComponent(o[0])]=decodeURIComponent(o[1]))}return n}.apply(void 0,r)}(De,0,[e])}function Me(e,n){return void 0===n&&(n={}),n&&Object.keys(n).length?(void 0===(t=i({},De(e),n))&&(t={}),Object.keys(t).filter((function(e){return"string"==typeof t[e]||"boolean"==typeof t[e]})).map((function(e){var n=t[e];if("string"!=typeof n&&"boolean"!=typeof n)throw new TypeError("Invalid type for query");return Le(e)+"="+Le(n.toString())})).join("&")):e;var t}function qe(e,n){return void 0===n&&(n=document),re(e)?e:"string"==typeof e?n.querySelector(e):void 0}function Fe(e){return new h((function(n,t){var r=me(e),o=qe(e);if(o)return n(o);if(We())return t(new Error("Document is ready and element "+r+" does not exist"));var i=setInterval((function(){if(o=qe(e))n(o),clearInterval(i);else if(We())return clearInterval(i),t(new Error("Document is ready and element "+r+" does not exist"))}),10)}))}le((function(){return new h((function(e){if(We()||Ae())return e();var n=setInterval((function(){if(We()||Ae())return clearInterval(n),e()}),10)}))}));var ze,Be=function(e){function n(){return e.apply(this,arguments)||this}return o(n,e),n}(ke);function Ue(e){if((ze=ze||new K).has(e)){var n=ze.get(e);if(n)return n}var t=new h((function(n,t){e.addEventListener("load",(function(){!function(e){if(function(){for(var e=0;e<j.length;e++){var n=!1;try{n=j[e].closed}catch(e){}n&&(W.splice(e,1),j.splice(e,1))}}(),e&&e.contentWindow)try{j.push(e.contentWindow),W.push(e)}catch(e){}}(e),n(e)})),e.addEventListener("error",(function(r){e.contentWindow?n(e):t(r)}))}));return ze.set(e,t),t}function Ye(e){return Ue(e).then((function(e){if(!e.contentWindow)throw new Error("Could not find window in iframe");return e.contentWindow}))}function He(e,n){void 0===e&&(e={});var t=e.style||{},r=function(e,n,t){void 0===e&&(e="div"),void 0===n&&(n={}),e=e.toLowerCase();var r,o,i,a=document.createElement(e);if(n.style&&ye(a.style,n.style),n.class&&(a.className=n.class.join(" ")),n.id&&a.setAttribute("id",n.id),n.attributes)for(var u=0,c=Object.keys(n.attributes);u<c.length;u++){var s=c[u];a.setAttribute(s,n.attributes[s])}if(n.styleSheet&&(r=a,o=n.styleSheet,void 0===i&&(i=window.document),r.styleSheet?r.styleSheet.cssText=o:r.appendChild(i.createTextNode(o))),n.html){if("iframe"===e)throw new Error("Iframe html can not be written unless container provided and iframe in DOM");a.innerHTML=n.html}return a}("iframe",{attributes:i({allowTransparency:"true"},e.attributes||{}),style:i({backgroundColor:"transparent",border:"none"},t),html:e.html,class:e.class}),o=window.navigator.userAgent.match(/MSIE|Edge/i);return r.hasAttribute("id")||r.setAttribute("id",ue()),Ue(r),n&&function(e,n){void 0===n&&(n=document);var t=qe(e,n);if(t)return t;throw new Error("Can not find element: "+me(e))}(n).appendChild(r),(e.url||o)&&r.setAttribute("src",e.url||"about:blank"),r}function Ge(e,n,t){return e.addEventListener(n,t),{cancel:function(){e.removeEventListener(n,t)}}}function Ve(e){e.style.setProperty("display","")}function Je(e){e.style.setProperty("display","none","important")}function $e(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Ze(e){return!(e&&e.parentNode&&e.ownerDocument&&e.ownerDocument.documentElement&&e.ownerDocument.documentElement.contains(e))}function Xe(e,n,t){var r=void 0===t?{}:t,o=r.width,i=void 0===o||o,a=r.height,u=void 0===a||a,c=r.interval,s=void 0===c?100:c,d=r.win,f=void 0===d?window:d,l=e.offsetWidth,p=e.offsetHeight,h=!1;n({width:l,height:p});var w,v,m=function(){if(!h&&function(e){return Boolean(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}(e)){var t=e.offsetWidth,r=e.offsetHeight;(i&&t!==l||u&&r!==p)&&n({width:t,height:r}),l=t,p=r}};return f.addEventListener("resize",m),void 0!==f.ResizeObserver?((w=new f.ResizeObserver(m)).observe(e),v=Ee(m,10*s)):void 0!==f.MutationObserver?((w=new f.MutationObserver(m)).observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!1}),v=Ee(m,10*s)):v=Ee(m,s),{cancel:function(){h=!0,w.disconnect(),window.removeEventListener("resize",m),v.cancel()}}}function Ke(e){for(;e.parentNode;)e=e.parentNode;return"[object ShadowRoot]"===e.toString()}var Qe="undefined"!=typeof document?document.currentScript:null,en=le((function(){if(Qe)return Qe;if(Qe=function(){try{var e=function(){try{throw new Error("_")}catch(e){return e.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(e){}}())return Qe;throw new Error("Can not determine current script")})),nn=ue();function tn(e){return"string"==typeof e&&/^[0-9]+%$/.test(e)}function rn(e){if("number"==typeof e)return e;var n=e.match(/^([0-9]+)(px|%)$/);if(!n)throw new Error("Could not match css value from "+e);return parseInt(n[1],10)}function on(e){return rn(e)+"px"}function an(e){return"number"==typeof e?on(e):tn(e)?e:on(e)}function un(e,n){if("number"==typeof e)return e;if(tn(e))return parseInt(n*rn(e)/100,10);if("string"==typeof(t=e)&&/^[0-9]+px$/.test(t))return rn(e);var t;throw new Error("Can not normalize dimension: "+e)}function cn(e){void 0===e&&(e=window);var n="__post_robot_11_0_0__";return e!==window?e[n]:e[n]=e[n]||{}}le((function(){var e;try{e=en()}catch(e){return nn}var n=e.getAttribute("data-uid");if(n&&"string"==typeof n)return n;if((n=e.getAttribute("data-uid-auto"))&&"string"==typeof n)return n;if(e.src){var t=function(e){for(var n="",t=0;t<e.length;t++){var r=e[t].charCodeAt(0)*t;e[t+1]&&(r+=e[t+1].charCodeAt(0)*(t-1)),n+=String.fromCharCode(97+Math.abs(r)%26)}return n}(JSON.stringify({src:e.src,dataset:e.dataset}));n="uid_"+t.slice(t.length-30)}else n=ue();return e.setAttribute("data-uid-auto",n),n}));var sn=function(){return{}};function dn(e,n){return void 0===e&&(e="store"),void 0===n&&(n=sn),Ne(cn(),e,(function(){var e=n();return{has:function(n){return e.hasOwnProperty(n)},get:function(n,t){return e.hasOwnProperty(n)?e[n]:t},set:function(n,t){return e[n]=t,t},del:function(n){delete e[n]},getOrSet:function(n,t){return Ne(e,n,t)},reset:function(){e=n()},keys:function(){return Object.keys(e)}}}))}var fn,ln=function(){};function pn(){var e=cn();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new ln,e.WINDOW_WILDCARD}function hn(e,n){return void 0===e&&(e="store"),void 0===n&&(n=sn),dn("windowStore").getOrSet(e,(function(){var t=new K,r=function(e){return t.getOrSet(e,n)};return{has:function(n){return r(n).hasOwnProperty(e)},get:function(n,t){var o=r(n);return o.hasOwnProperty(e)?o[e]:t},set:function(n,t){return r(n)[e]=t,t},del:function(n){delete r(n)[e]},getOrSet:function(n,t){return Ne(r(n),e,t)}}}))}function wn(){return dn("instance").getOrSet("instanceID",ue)}function vn(e,n){var t=n.domain,r=hn("helloPromises"),o=r.get(e);o&&o.resolve({domain:t});var i=h.resolve({domain:t});return r.set(e,i),i}function mn(e,n){return(0,n.send)(e,"postrobot_hello",{instanceID:wn()},{domain:"*",timeout:-1}).then((function(n){var t=n.origin,r=n.data.instanceID;return vn(e,{domain:t}),{win:e,domain:t,instanceID:r}}))}function yn(e,n){var t=n.send;return hn("windowInstanceIDPromises").getOrSet(e,(function(){return mn(e,{send:t}).then((function(e){return e.instanceID}))}))}function gn(e,n,t){void 0===n&&(n=5e3),void 0===t&&(t="Window");var r=function(e){return hn("helloPromises").getOrSet(e,(function(){return new h}))}(e);return-1!==n&&(r=r.timeout(n,new Error(t+" did not load after "+n+"ms"))),r}function En(e){hn("knownWindows").set(e,!0)}function Pn(e){return"object"==typeof e&&null!==e&&"string"==typeof e.__type__}function bn(e){return void 0===e?"undefined":null===e?"null":Array.isArray(e)?"array":"function"==typeof e?"function":"object"==typeof e?e instanceof Error?"error":"function"==typeof e.then?"promise":"[object RegExp]"==={}.toString.call(e)?"regex":"[object Date]"==={}.toString.call(e)?"date":"object":"string"==typeof e?"string":"number"==typeof e?"number":"boolean"==typeof e?"boolean":void 0}function _n(e,n){return{__type__:e,__val__:n}}var On,Tn=((fn={}).function=function(){},fn.error=function(e){return _n("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},fn.promise=function(){},fn.regex=function(e){return _n("regex",e.source)},fn.date=function(e){return _n("date",e.toJSON())},fn.array=function(e){return e},fn.object=function(e){return e},fn.string=function(e){return e},fn.number=function(e){return e},fn.boolean=function(e){return e},fn.null=function(e){return e},fn[void 0]=function(e){return _n("undefined",e)},fn),Sn={},xn=((On={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},On.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+"\n\n"+o.stack,o},On.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},On.regex=function(e){return new RegExp(e)},On.date=function(e){return new Date(e)},On.array=function(e){return e},On.object=function(e){return e},On.string=function(e){return e},On.number=function(e){return e},On.boolean=function(e){return e},On.null=function(e){return e},On[void 0]=function(){},On),In={};function Nn(){return!!L(window).match(/MSIE|trident|edge\/12|edge\/13/i)}function Rn(e){return!B(window,e)}function Cn(e,n){if(e){if(T()!==Y(e))return!0}else if(n&&!S(n))return!0;return!1}function kn(e){var n=e.win,t=e.domain;return!(!Nn()||t&&!Cn(t,n)||n&&!Rn(n))}function jn(e){return"__postrobot_bridge___"+(e=e||Y(e)).replace(/[^a-zA-Z0-9]+/g,"_")}function Wn(){return Boolean(window.name&&window.name===jn(T()))}var An=new h((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 Ln(e){hn("remoteWindowPromises").getOrSet(e,(function(){return new h}))}function Dn(e){var n=hn("remoteWindowPromises").get(e);if(!n)throw new Error("Remote window promise not found");return n}function Mn(e,n,t){Dn(e).resolve((function(r,o,i){if(r!==e)throw new Error("Remote window does not match window");if(!U(o,n))throw new Error("Remote domain "+o+" does not match domain "+n);t.fireAndForget(i)}))}function qn(e,n){Dn(e).reject(n).catch(he)}function Fn(e){for(var n=e.win,t=e.name,r=e.domain,o=dn("popupWindowsByName"),i=hn("popupWindowsByWin"),a=0,u=o.keys();a<u.length;a++){var c=u[a],s=o.get(c);s&&!A(s.win)||o.del(c)}if(A(n))return{win:n,name:t,domain:r};var d=i.getOrSet(n,(function(){return t?o.getOrSet(t,(function(){return{win:n,name:t}})):{win:n}}));if(d.win&&d.win!==n)throw new Error("Different window already linked for window: "+(t||"undefined"));return t&&(d.name=t,o.set(t,d)),r&&(d.domain=r,Ln(n)),i.set(n,d),d}function zn(e){var n,t=e.on,r=e.send,o=e.receiveMessage;n=window.open,window.open=function(e,t,r,o){var i=n.call(this,V(e),t,r,o);return i?(Fn({win:i,name:t,domain:e?Y(e):null}),i):i},function(e){var n=e.on,t=e.send,r=e.receiveMessage,o=dn("popupWindowsByName");n("postrobot_open_tunnel",(function(e){var i=e.source,a=e.origin,u=e.data,c=dn("bridges").get(a);if(!c)throw new Error("Can not find bridge promise for domain "+a);return c.then((function(e){if(i!==e)throw new Error("Message source does not matched registered bridge for domain "+a);if(!u.name)throw new Error("Register window expected to be passed window name");if(!u.sendMessage)throw new Error("Register window expected to be passed sendMessage method");if(!o.has(u.name))throw new Error("Window with name "+u.name+" does not exist, or was not opened by this window");var c=function(){return o.get(u.name)};if(!c().domain)throw new Error("We do not have a registered domain for window "+u.name);if(c().domain!==a)throw new Error("Message origin "+a+" does not matched registered window origin "+(c().domain||"unknown"));return Mn(c().win,a,u.sendMessage),{sendMessage:function(e){if(window&&!window.closed&&c()){var o=c().domain;if(o)try{r({data:e,origin:o,source:c().win},{on:n,send:t})}catch(e){h.reject(e)}}}}}))}))}({on:t,send:r,receiveMessage:o}),function(e){var n=e.send;cn(window).openTunnelToParent=function(e){var t=e.name,r=e.source,o=e.canary,i=e.sendMessage,a=dn("tunnelWindows"),u=P(window);if(!u)throw new Error("No parent window found to open tunnel to");var c=function(e){var n=e.name,t=e.source,r=e.canary,o=e.sendMessage;!function(){for(var e=dn("tunnelWindows"),n=0,t=e.keys();n<t.length;n++){var r=t[n];A(e[r].source)&&e.del(r)}}();var i=ue();return dn("tunnelWindows").set(i,{name:n,source:t,canary:r,sendMessage:o}),i}({name:t,source:r,canary:o,sendMessage:i});return n(u,"postrobot_open_tunnel",{name:t,sendMessage:function(){var e=a.get(c);if(e&&e.source&&!A(e.source)){try{e.canary()}catch(e){return}e.sendMessage.apply(this,arguments)}}},{domain:"*"})}}({send:r}),function(e){var n=e.on,t=e.send,r=e.receiveMessage;h.try((function(){var e,o=b(window);if(o&&kn({win:o}))return Ln(o),(e=o,hn("remoteBridgeAwaiters").getOrSet(e,(function(){return h.try((function(){var n=D(e,jn(T()));if(n)return S(n)&&cn(x(n))?n:new h((function(e){var t,r;t=setInterval((function(){if(n&&S(n)&&cn(x(n)))return clearInterval(t),clearTimeout(r),e(n)}),100),r=setTimeout((function(){return clearInterval(t),e()}),2e3)}))}))}))).then((function(e){return e?window.name?cn(x(e)).openTunnelToParent({name:window.name,source:window,canary:function(){},sendMessage:function(e){try{window}catch(e){return}if(window&&!window.closed)try{r({data:e,origin:this.origin,source:this.source},{on:n,send:t})}catch(e){h.reject(e)}}}).then((function(e){var n=e.source,t=e.origin,r=e.data;if(n!==o)throw new Error("Source does not match opener");Mn(n,t,r.sendMessage)})).catch((function(e){throw qn(o,e),e})):qn(o,new Error("Can not register with opener: window does not have a name")):qn(o,new Error("Can not register with opener: no bridge found in opener"))}))}))}({on:t,send:r,receiveMessage:o})}function Bn(){for(var e=dn("idToProxyWindow"),n=0,t=e.keys();n<t.length;n++){var r=t[n];e.get(r).shouldClean()&&e.del(r)}}function Un(e,n){var t=n.send,r=n.id,o=void 0===r?ue():r,i=e.then((function(e){if(S(e))return x(e).name})),a=e.then((function(e){if(A(e))throw new Error("Window is closed, can not determine type");return b(e)?v.POPUP:v.IFRAME}));i.catch(he),a.catch(he);var u=function(){return e.then((function(e){if(!A(e))return S(e)?x(e).name:i}))};return{id:o,getType:function(){return a},getInstanceID:pe((function(){return e.then((function(e){return yn(e,{send:t})}))})),close:function(){return e.then($)},getName:u,focus:function(){return e.then((function(e){e.focus()}))},isClosed:function(){return e.then((function(e){return A(e)}))},setLocation:function(n,t){return void 0===t&&(t={}),e.then((function(e){var r=window.location.protocol+"//"+window.location.host,o=t.method,i=void 0===o?"get":o,a=t.body;if(0===n.indexOf("/"))n=""+r+n;else if(!n.match(/^https?:\/\//)&&0!==n.indexOf(r))throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(n));if("post"===i)return u().then((function(e){if(!e)throw new Error("Can not post to window without target name");!function(e){var n=e.url,t=e.target,r=e.body,o=e.method,i=void 0===o?"post":o,a=document.createElement("form");if(a.setAttribute("target",t),a.setAttribute("method",i),a.setAttribute("action",n),a.style.display="none",r)for(var u=0,c=Object.keys(r);u<c.length;u++){var s,d=c[u],f=document.createElement("input");f.setAttribute("name",d),f.setAttribute("value",null==(s=r[d])?void 0:s.toString()),a.appendChild(f)}je().appendChild(a),a.submit(),je().removeChild(a)}({url:n,target:e,method:i,body:a})}));if("get"!==i)throw new Error("Unsupported method: "+i);if(S(e))try{if(e.location&&"function"==typeof e.location.replace)return void e.location.replace(n)}catch(e){}e.location=n}))},setName:function(n){return e.then((function(e){Fn({win:e,name:n});var t=S(e),r=J(e);if(!t)throw new Error("Can not set name for cross-domain window: "+n);x(e).name=n,r&&r.setAttribute("name",n),i=h.resolve(n)}))}}}var Yn=function(){function e(e){var n=e.send,t=e.win,r=e.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 h,this.serializedWindow=r||Un(this.actualWindowPromise,{send:n}),dn("idToProxyWindow").set(this.getID(),this),t&&this.setWindow(t,{send:n})}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(e){return e===v.POPUP}))},n.setLocation=function(e,n){var t=this;return this.serializedWindow.setLocation(e,n).then((function(){return t}))},n.getName=function(){return this.serializedWindow.getName()},n.setName=function(e){var n=this;return this.serializedWindow.setName(e).then((function(){return n}))},n.close=function(){var e=this;return this.serializedWindow.close().then((function(){return e}))},n.focus=function(){var e=this,n=this.isPopup(),t=this.getName(),r=h.hash({isPopup:n,name:t}).then((function(e){var n=e.name;e.isPopup&&n&&window.open("",n,"noopener")})),o=this.serializedWindow.focus();return h.all([r,o]).then((function(){return e}))},n.isClosed=function(){return this.serializedWindow.isClosed()},n.getWindow=function(){return this.actualWindow},n.setWindow=function(e,n){var t=n.send;this.actualWindow=e,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=Un(this.actualWindowPromise,{send:t,id:this.getID()}),hn("winToProxyWindow").set(e,this)},n.awaitWindow=function(){return this.actualWindowPromise},n.matchWindow=function(e,n){var t=this,r=n.send;return h.try((function(){return t.actualWindow?e===t.actualWindow:h.hash({proxyInstanceID:t.getInstanceID(),knownWindowInstanceID:yn(e,{send:r})}).then((function(n){var o=n.proxyInstanceID===n.knownWindowInstanceID;return o&&t.setWindow(e,{send:r}),o}))}))},n.unwrap=function(){return this.actualWindow||this},n.getInstanceID=function(){return this.serializedWindow.getInstanceID()},n.shouldClean=function(){return Boolean(this.actualWindow&&A(this.actualWindow))},n.serialize=function(){return this.serializedWindow},e.unwrap=function(n){return e.isProxyWindow(n)?n.unwrap():n},e.serialize=function(n,t){var r=t.send;return Bn(),e.toProxyWindow(n,{send:r}).serialize()},e.deserialize=function(n,t){var r=t.send;return Bn(),dn("idToProxyWindow").get(n.id)||new e({serializedWindow:n,send:r})},e.isProxyWindow=function(e){return Boolean(e&&!G(e)&&e.isProxyWindow)},e.toProxyWindow=function(n,t){var r=t.send;if(Bn(),e.isProxyWindow(n))return n;var o=n;return hn("winToProxyWindow").get(o)||new e({win:o,send:r})},e}();function Hn(e,n,t,r,o){var i=hn("methodStore"),a=dn("proxyWindowMethods");Yn.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 Gn(e,n){var t=hn("methodStore"),r=dn("proxyWindowMethods");return t.getOrSet(e,(function(){return{}}))[n]||r.get(n)}function Vn(e,n,t,r,o){var i,a,u;a=(i={on:o.on,send:o.send}).on,u=i.send,dn("builtinListeners").getOrSet("functionCalls",(function(){return a("postrobot_method",{domain:"*"},(function(e){var n=e.source,t=e.origin,r=e.data,o=r.id,i=r.name,a=Gn(n,o);if(!a)throw new Error("Could not find method '"+i+"' with id: "+r.id+" in "+T(window));var c=a.source,s=a.domain,d=a.val;return h.try((function(){if(!U(s,t))throw new Error("Method '"+r.name+"' domain "+JSON.stringify(Ie(a.domain)?a.domain.source:a.domain)+" does not match origin "+t+" in "+T(window));if(Yn.isProxyWindow(c))return c.matchWindow(n,{send:u}).then((function(e){if(!e)throw new Error("Method call '"+r.name+"' failed - proxy window does not match source in "+T(window))}))})).then((function(){return d.apply({source:n,origin:t},r.args)}),(function(e){return h.try((function(){if(d.onError)return d.onError(e)})).then((function(){var n;throw e.stack&&(e.stack="Remote call to "+i+"("+(void 0===(n=r.args)&&(n=[]),_e(n).map((function(e){return"string"==typeof e?"'"+e+"'":void 0===e?"undefined":null===e?"null":"boolean"==typeof e?e.toString():Array.isArray(e)?"[ ... ]":"object"==typeof e?"{ ... }":"function"==typeof e?"() => { ... }":"<"+typeof e+">"})).join(", ")+") failed\n\n")+e.stack),e}))})).then((function(e){return{result:e,id:o,name:i}}))}))}));var c=t.__id__||ue();e=Yn.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+"::")),Yn.isProxyWindow(e)?(Hn(c,t,s,e,n),e.awaitWindow().then((function(e){Hn(c,t,s,e,n)}))):Hn(c,t,s,e,n),_n("cross_domain_function",{id:c,name:s})}function Jn(e,n,t,r){var o,i=r.on,a=r.send;return function(e,n){void 0===n&&(n=Sn);var t=JSON.stringify(e,(function(e){var t=this[e];if(Pn(this))return t;var r=bn(t);if(!r)return t;var o=n[r]||Tn[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 _n("cross_domain_zalgo_promise",{then:Vn(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 Vn(e,n,t,r,{on:i,send:a})},o.object=function(e){return G(e)||Yn.isProxyWindow(e)?_n("cross_domain_window",Yn.serialize(e,{send:a})):e},o))}function $n(e,n,t,r){var o,i=r.send;return function(e,n){if(void 0===n&&(n=In),"undefined"!==e)return JSON.parse(e,(function(e,t){if(Pn(this))return t;var r,o;if(Pn(t)?(r=t.__type__,o=t.__val__):(r=bn(t),o=t),!r)return o;var i=n[r]||xn[r];return i?i(o,e):o}))}(t,((o={}).cross_domain_zalgo_promise=function(e){return function(e,n,t){return new h(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 Yn.toProxyWindow(e,{send:a}).awaitWindow().then((function(e){var c=Gn(e,o);if(c&&c.val!==r)return c.val.apply({source:window,origin:T()},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 Yn.deserialize(e,{send:i})},o))}var Zn={};function Xn(e,n,t,r){var o=r.on,i=r.send;return h.try((function(){var r=hn().getOrSet(e,(function(){return{}}));return r.buffer=r.buffer||[],r.buffer.push(t),r.flush=r.flush||h.flush().then((function(){if(A(e))throw new Error("Window is closed");var t,a=Jn(e,n,((t={}).__post_robot_11_0_0__=r.buffer||[],t),{on:o,send:i});delete r.buffer;for(var u=Object.keys(Zn),c=[],s=0;s<u.length;s++){var d=u[s];try{Zn[d](e,a,n)}catch(e){c.push(e)}}if(c.length===u.length)throw new Error("All post-robot messaging strategies failed:\n\n"+c.map((function(e,n){return n+". "+ve(e)})).join("\n\n"))})),r.flush.then((function(){delete r.flush}))})).then(he)}function Kn(e){return dn("responseListeners").get(e)}function Qn(e){dn("responseListeners").del(e)}function et(e){return dn("erroredResponseListeners").has(e)}function nt(e){var n=e.name,t=e.win,r=e.domain,o=hn("requestListeners");if("*"===t&&(t=null),"*"===r&&(r=null),!n)throw new Error("Name required to get request listener");for(var i=0,a=[t,pn()];i<a.length;i++){var u=a[i];if(u){var c=o.get(u);if(c){var s=c[n];if(s){if(r&&"string"==typeof r){if(s[r])return s[r];if(s.__domain_regex__)for(var d=0,f=s.__domain_regex__;d<f.length;d++){var l=f[d],p=l.listener;if(U(l.regex,r))return p}}if(s["*"])return s["*"]}}}}}function tt(e,n){var t=n.on,r=n.send,o=dn("receivedMessages");try{if(!window||window.closed||!e.source)return}catch(e){return}var i=e.source,a=e.origin,u=function(e,n,t,r){var o,i=r.on,a=r.send;try{o=$n(n,t,e,{on:i,send:a})}catch(e){return}if(o&&"object"==typeof o&&null!==o){var u=o.__post_robot_11_0_0__;if(Array.isArray(u))return u}}(e.data,i,a,{on:t,send:r});if(u){En(i);for(var c,s=function(){var e=u[d];if(o.has(e.id))return{v:void 0};if(o.set(e.id,!0),A(i)&&!e.fireAndForget)return{v:void 0};0===e.origin.indexOf("file:")&&(a="file://");try{"postrobot_message_request"===e.type?function(e,n,t,r){var o=r.on,i=r.send,a=nt({name:t.name,win:e,domain:n}),u="postrobot_method"===t.name&&t.data&&"string"==typeof t.data.name?t.data.name+"()":t.name;function c(r,a,c){return h.flush().then((function(){if(!t.fireAndForget&&!A(e))try{return Xn(e,n,{id:ue(),origin:T(window),type:"postrobot_message_response",hash:t.hash,name:t.name,ack:r,data:a,error:c},{on:o,send:i})}catch(e){throw new Error("Send response message failed for "+u+" in "+T()+"\n\n"+ve(e))}}))}h.all([h.flush().then((function(){if(!t.fireAndForget&&!A(e))try{return Xn(e,n,{id:ue(),origin:T(window),type:"postrobot_message_ack",hash:t.hash,name:t.name},{on:o,send:i})}catch(e){throw new Error("Send ack message failed for "+u+" in "+T()+"\n\n"+ve(e))}})),h.try((function(){if(!a)throw new Error("No handler found for post message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);return a.handler({source:e,origin:n,data:t.data})})).then((function(e){return c("success",e)}),(function(e){return c("error",null,e)}))]).then(he).catch((function(e){if(a&&a.handleError)return a.handleError(e);throw e}))}(i,a,e,{on:t,send:r}):"postrobot_message_response"===e.type?function(e,n,t){if(!et(t.hash)){var r,o=Kn(t.hash);if(!o)throw new Error("No handler found for post message response for message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!U(o.domain,n))throw new Error("Response origin "+n+" does not match domain "+(r=o.domain,Array.isArray(r)?"("+r.join(" | ")+")":w(r)?"RegExp("+r.toString()+")":r.toString()));if(e!==o.win)throw new Error("Response source does not match registered window");Qn(t.hash),"error"===t.ack?o.promise.reject(t.error):"success"===t.ack&&o.promise.resolve({source:e,origin:n,data:t.data})}}(i,a,e):"postrobot_message_ack"===e.type&&function(e,n,t){if(!et(t.hash)){var r=Kn(t.hash);if(!r)throw new Error("No handler found for post message ack for message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);try{if(!U(r.domain,n))throw new Error("Ack origin "+n+" does not match domain "+r.domain.toString());if(e!==r.win)throw new Error("Ack source does not match registered window")}catch(e){r.promise.reject(e)}r.ack=!0}}(i,a,e)}catch(e){setTimeout((function(){throw e}),0)}},d=0;d<u.length;d++)if(c=s())return c.v}}function rt(e,n,t){if(!e)throw new Error("Expected name");if("function"==typeof(n=n||{})&&(t=n,n={}),!t)throw new Error("Expected handler");var r=function e(n,t){var r=n.name,o=n.win,i=n.domain,a=hn("requestListeners");if(!r||"string"!=typeof r)throw new Error("Name required to add request listener");if(o&&"*"!==o&&Yn.isProxyWindow(o)){var u=o.awaitWindow().then((function(n){return e({name:r,win:n,domain:i},t)}));return{cancel:function(){u.then((function(e){return e.cancel()}),he)}}}var c=o;if(Array.isArray(c)){for(var s=[],d=0,f=c;d<f.length;d++)s.push(e({name:r,domain:i,win:f[d]},t));return{cancel:function(){for(var e=0;e<s.length;e++)s[e].cancel()}}}if(Array.isArray(i)){for(var l=[],p=0,h=i;p<h.length;p++)l.push(e({name:r,win:c,domain:h[p]},t));return{cancel:function(){for(var e=0;e<l.length;e++)l[e].cancel()}}}var w=nt({name:r,win:c,domain:i});c&&"*"!==c||(c=pn());var v=(i=i||"*").toString();if(w)throw c&&i?new Error("Request listener already exists for "+r+" on domain "+i.toString()+" for "+(c===pn()?"wildcard":"specified")+" window"):c?new Error("Request listener already exists for "+r+" for "+(c===pn()?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+r+" on domain "+i.toString()):new Error("Request listener already exists for "+r);var m,y,g=a.getOrSet(c,(function(){return{}})),E=Ne(g,r,(function(){return{}}));return Ie(i)?(m=Ne(E,"__domain_regex__",(function(){return[]}))).push(y={regex:i,listener:t}):E[v]=t,{cancel:function(){delete E[v],y&&(m.splice(m.indexOf(y,1)),m.length||delete E.__domain_regex__),Object.keys(E).length||delete g[r],c&&!Object.keys(g).length&&a.del(c)}}}({name:e,win:n.window,domain:n.domain||"*"},{handler:t||n.handler,handleError:n.errorHandler||function(e){throw e}});return{cancel:function(){r.cancel()}}}Zn.postrobot_post_message=function(e,n,t){0===t.indexOf("file:")&&(t="*"),e.postMessage(n,t)},Zn.postrobot_bridge=function(e,n,t){if(!Nn()&&!Wn())throw new Error("Bridge not needed for browser");if(S(e))throw new Error("Post message through bridge disabled between same domain windows");if(!1!==B(window,e))throw new Error("Can only use bridge to communicate between two different windows, not between frames");!function(e,n,t){var r=M(window,e),o=M(e,window);if(!r&&!o)throw new Error("Can only send messages to and from parent and popup windows");Dn(e).then((function(r){return r(e,n,t)}))}(e,t,n)},Zn.postrobot_global=function(e,n){if(!L(window).match(/MSIE|rv:11|trident|edge\/12|edge\/13/i))throw new Error("Global messaging not needed for browser");if(!S(e))throw new Error("Post message through global disabled between different domain windows");if(!1!==B(window,e))throw new Error("Can only use global to communicate between two different windows, not between frames");var t=cn(e);if(!t)throw new Error("Can not find postRobot global on foreign window");t.receiveMessage({source:window,origin:T(),data:n})};var ot,it=function e(n,t,r,o){var i=(o=o||{}).domain||"*",a=o.timeout||-1,u=o.timeout||5e3,c=o.fireAndForget||!1;return Yn.toProxyWindow(n,{send:e}).awaitWindow().then((function(n){return h.try((function(){if(function(e,n,t){if(!e)throw new Error("Expected name");if(t&&"string"!=typeof t&&!Array.isArray(t)&&!Ie(t))throw new TypeError("Can not send "+e+". Expected domain "+JSON.stringify(t)+" to be a string, array, or regex");if(A(n))throw new Error("Can not send "+e+". Target window is closed")}(t,n,i),function(e,n){var t=q(n);if(t)return t===e;if(n===e)return!1;if(C(n)===n)return!1;for(var r=0,o=N(e);r<o.length;r++)if(o[r]===n)return!0;return!1}(window,n))return gn(n,u)})).then((function(t){return function(e,n,t,r){var o=r.send;return h.try((function(){return"string"==typeof n?n:h.try((function(){return t||mn(e,{send:o}).then((function(e){return e.domain}))})).then((function(e){if(!U(n,n))throw new Error("Domain "+me(n)+" does not match "+me(n));return e}))}))}(n,i,(void 0===t?{}:t).domain,{send:e})})).then((function(o){var i=o,u="postrobot_method"===t&&r&&"string"==typeof r.name?r.name+"()":t,s=new h,d=t+"_"+ue();if(!c){var f={name:t,win:n,domain:i,promise:s};!function(e,n){dn("responseListeners").set(e,n)}(d,f);var l=hn("requestPromises").getOrSet(n,(function(){return[]}));l.push(s),s.catch((function(){!function(e){dn("erroredResponseListeners").set(e,!0)}(d),Qn(d)}));var p=function(e){return hn("knownWindows").get(e,!1)}(n)?1e4:2e3,w=a,v=p,m=w,y=Ee((function(){return A(n)?s.reject(new Error("Window closed for "+t+" before "+(f.ack?"response":"ack"))):f.cancelled?s.reject(new Error("Response listener was cancelled for "+t)):(v=Math.max(v-500,0),-1!==m&&(m=Math.max(m-500,0)),f.ack||0!==v?0===m?s.reject(new Error("No response for postMessage "+u+" in "+T()+" in "+w+"ms")):void 0:s.reject(new Error("No ack for postMessage "+u+" in "+T()+" in "+p+"ms")))}),500);s.finally((function(){y.cancel(),l.splice(l.indexOf(s,1))})).catch(he)}return Xn(n,i,{id:ue(),origin:T(window),type:"postrobot_message_request",hash:d,name:t,data:r,fireAndForget:c},{on:rt,send:e}).then((function(){return c?s.resolve():s}),(function(e){throw new Error("Send request message failed for "+u+" in "+T()+"\n\n"+ve(e))}))}))}))};function at(e){return Yn.toProxyWindow(e,{send:it})}function ut(e){for(var n=0,t=hn("requestPromises").get(e,[]);n<t.length;n++)t[n].reject(new Error("Window "+(A(e)?"closed":"cleaned up")+" before response")).catch(he)}function ct(e){if(!S(e))throw new Error("Can not get global for window on different domain");return e.__zoid_10_3_3__||(e.__zoid_10_3_3__={}),e.__zoid_10_3_3__}function st(e,n){try{return n(ct(e))}catch(e){}}function dt(e){return{get:function(){var n=this;return h.try((function(){if(n.source&&n.source!==window)throw new Error("Can not call get on proxy object from a remote window");return e}))}}}function ft(e){return ae(JSON.stringify(e))}function lt(e){var n=ct(e);return n.references=n.references||{},n.references}function pt(e){var n,t,r=e.data,o=e.metaData,i=e.sender,a=e.receiver,u=e.passByReference,c=void 0!==u&&u,s=e.basic,d=void 0!==s&&s,f=at(a.win),l=d?JSON.stringify(r):Jn(f,a.domain,r,{on:rt,send:it}),p=c?(n=l,t=ue(),lt(window)[t]=n,{type:"uid",uid:t}):{type:"raw",val:l};return{serializedData:ft({sender:{domain:i.domain},metaData:o,reference:p}),cleanReference:function(){var e,n;e=window,"uid"===(n=p).type&&delete lt(e)[n.uid]}}}function ht(e){var n,t,r=e.sender,o=e.basic,i=void 0!==o&&o,a=function(e){return JSON.parse(function(e){if("function"==typeof atob)return decodeURIComponent([].map.call(atob(e),(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")}(e))}(e.data),u=a.reference,c=a.metaData;n="function"==typeof r.win?r.win({metaData:c}):r.win,t="function"==typeof r.domain?r.domain({metaData:c}):"string"==typeof r.domain?r.domain:a.sender.domain;var s=function(e,n){if("raw"===n.type)return n.val;if("uid"===n.type)return lt(e)[n.uid];throw new Error("Unsupported ref type: "+n.type)}(n,u);return{data:i?JSON.parse(s):function(e,n,t){return $n(e,n,t,{on:rt,send:it})}(n,t,s),metaData:c,sender:{win:n,domain:t},reference:u}}ot={setupBridge:zn,openBridge:function(e,n){var t=dn("bridges"),r=dn("bridgeFrames");return n=n||Y(e),t.getOrSet(n,(function(){return h.try((function(){if(T()===n)throw new Error("Can not open bridge on the same domain as current domain: "+n);var t=jn(n);if(D(window,t))throw new Error("Frame with name "+t+" already exists on page");var o=function(e,n){var t=document.createElement("iframe");return t.setAttribute("name",e),t.setAttribute("id",e),t.setAttribute("style","display: none; margin: 0; padding: 0; border: 0px none; overflow: hidden;"),t.setAttribute("frameborder","0"),t.setAttribute("border","0"),t.setAttribute("scrolling","no"),t.setAttribute("allowTransparency","true"),t.setAttribute("tabindex","-1"),t.setAttribute("hidden","true"),t.setAttribute("title",""),t.setAttribute("role","presentation"),t.src=n,t}(t,e);return r.set(n,o),An.then((function(n){n.appendChild(o);var t=o.contentWindow;return new h((function(e,n){o.addEventListener("load",e),o.addEventListener("error",n)})).then((function(){return gn(t,5e3,"Bridge "+e)})).then((function(){return t}))}))}))}))},linkWindow:Fn,linkUrl:function(e,n){Fn({win:e,domain:Y(n)})},isBridge:Wn,needsBridge:kn,needsBridgeForBrowser:Nn,hasBridge:function(e,n){return dn("bridges").has(n||Y(e))},needsBridgeForWin:Rn,needsBridgeForDomain:Cn,destroyBridges:function(){for(var e=dn("bridges"),n=dn("bridgeFrames"),t=0,r=n.keys();t<r.length;t++){var o=n.get(r[t]);o&&o.parentNode&&o.parentNode.removeChild(o)}n.reset(),e.reset()}};var wt={STRING:"string",OBJECT:"object",FUNCTION:"function",BOOLEAN:"boolean",NUMBER:"number",ARRAY:"array"},vt={JSON:"json",DOTIFY:"dotify",BASE64:"base64"},mt=v,yt={RENDER:"zoid-render",RENDERED:"zoid-rendered",PRERENDER:"zoid-prerender",PRERENDERED:"zoid-prerendered",DISPLAY:"zoid-display",ERROR:"zoid-error",CLOSE:"zoid-close",DESTROY:"zoid-destroy",PROPS:"zoid-props",RESIZE:"zoid-resize",FOCUS:"zoid-focus"};function gt(e){return"__zoid__"+e.name+"__"+e.serializedPayload+"__"}function Et(e){if(!e)throw new Error("No window name");var n=e.split("__"),t=n[1],r=n[2],o=n[3];if("zoid"!==t)throw new Error("Window not rendered by zoid - got "+t);if(!r)throw new Error("Expected component name");if(!o)throw new Error("Expected serialized payload ref");return{name:r,serializedInitialPayload:o}}var Pt=le((function(e){var n=ht({data:Et(e).serializedInitialPayload,sender:{win:function(e){return function(e){if("opener"===e.type)return Ce("opener",b(window));if("parent"===e.type&&"number"==typeof e.distance)return Ce("parent",function(e,n){return void 0===n&&(n=1),function(e,n){void 0===n&&(n=1);for(var t=e,r=0;r<n;r++){if(!t)return;t=P(t)}return t}(e,z(e)-n)}(window,e.distance));if("global"===e.type&&e.uid&&"string"==typeof e.uid){var n=e.uid,t=q(window);if(!t)throw new Error("Can not find ancestor window");for(var r=0,o=k(t);r<o.length;r++){var i=o[r];if(S(i)){var a=st(i,(function(e){return e.windows&&e.windows[n]}));if(a)return a}}}else if("name"===e.type){var u=e.name;return Ce("namedWindow",function(e,n){return D(e,n)||function e(n,t){var r=D(n,t);if(r)return r;for(var o=0,i=N(n);o<i.length;o++){var a=e(i[o],t);if(a)return a}}(C(e)||e,n)}(Ce("ancestor",q(window)),u))}throw new Error("Unable to find "+e.type+" parent component window")}(e.metaData.windowRef)}}});return{parent:n.sender,payload:n.data,reference:n.reference}}));function bt(){return Pt(window.name)}function _t(e,n){if(void 0===n&&(n=window),e===P(n))return{type:"parent",distance:z(e)};if(e===b(n))return{type:"opener"};if(S(e)&&(r=e)!==C(r)){var t=x(e).name;if(t)return{type:"name",name:t}}var r}function Ot(e,n,t,r,o){if(!e.hasOwnProperty(t))return r;var i=e[t];return"function"==typeof i.childDecorate?i.childDecorate({value:r,uid:o.uid,tag:o.tag,close:o.close,focus:o.focus,onError:o.onError,onProps:o.onProps,resize:o.resize,getParent:o.getParent,getParentDomain:o.getParentDomain,show:o.show,hide:o.hide,export:o.export,getSiblings:o.getSiblings}):r}function Tt(){return h.try((function(){window.focus()}))}function St(){return h.try((function(){window.close()}))}var xt=function(){return he},It=function(e){return we(e.value)};function Nt(e,n,t){for(var r=0,o=Object.keys(i({},e,n));r<o.length;r++){var a=o[r];t(a,n[a],e[a])}}function Rt(e,n,t){var r={};return h.all(function(e,n,o){var i=[];return Nt(e,n,(function(e,n,o){var a=function(e,n,o){return h.resolve().then((function(){var i,a;if(null!=o&&n){var u=(i={},i.get=n.queryParam,i.post=n.bodyParam,i)[t],c=(a={},a.get=n.queryValue,a.post=n.bodyValue,a)[t];if(u)return h.hash({finalParam:h.try((function(){return"function"==typeof u?u({value:o}):"string"==typeof u?u:e})),finalValue:h.try((function(){return"function"==typeof c&&xe(o)?c({value:o}):o}))}).then((function(t){var o,i=t.finalParam,a=t.finalValue;if("boolean"==typeof a)o=a.toString();else if("string"==typeof a)o=a.toString();else if("object"==typeof a&&null!==a){if(n.serialization===vt.JSON)o=JSON.stringify(a);else if(n.serialization===vt.BASE64)o=ae(JSON.stringify(a));else if(n.serialization===vt.DOTIFY||!n.serialization){o=function e(n,t,r){for(var o in void 0===t&&(t=""),void 0===r&&(r={}),t=t?t+".":t,n)n.hasOwnProperty(o)&&null!=n[o]&&"function"!=typeof n[o]&&(n[o]&&Array.isArray(n[o])&&n[o].length&&n[o].every((function(e){return"object"!=typeof e}))?r[""+t+o+"[]"]=n[o].join(","):n[o]&&"object"==typeof n[o]?r=e(n[o],""+t+o,r):r[""+t+o]=n[o].toString());return r}(a,e);for(var u=0,c=Object.keys(o);u<c.length;u++){var s=c[u];r[s]=o[s]}return}}else"number"==typeof a&&(o=a.toString());r[i]=o}))}}))}(e,n,o);i.push(a)})),i}(n,e)).then((function(){return r}))}function Ct(e){var n,t,r,o,a,u,c,s,d=e.uid,f=e.options,l=e.overrides,p=void 0===l?{}:l,w=e.parentWin,v=void 0===w?window:w,m=f.propsDef,y=f.containerTemplate,g=f.prerenderTemplate,E=f.tag,P=f.name,b=f.attributes,_=f.dimensions,O=f.autoResize,I=f.url,N=f.domain,R=f.exports,C=new h,k=[],j=Re(),W={},L={},D={visible:!0},M=p.event?p.event:(n={},t={},r={on:function(e,n){var r=t[e]=t[e]||[];r.push(n);var o=!1;return{cancel:function(){o||(o=!0,r.splice(r.indexOf(n),1))}}},once:function(e,n){var t=r.on(e,(function(){t.cancel(),n()}));return t},trigger:function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=t[e],a=[];if(i)for(var u=function(){var e=i[c];a.push(h.try((function(){return e.apply(void 0,r)})))},c=0;c<i.length;c++)u();return h.all(a).then(he)},triggerOnce:function(e){if(n[e])return h.resolve();n[e]=!0;for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];return r.trigger.apply(r,[e].concat(o))},reset:function(){t={}}}),F=p.props?p.props:{},G=!1,J=p.onError,Z=p.getProxyContainer,X=p.show,K=p.hide,Q=p.close,ee=p.renderContainer,ne=p.getProxyWindow,te=p.setProxyWin,re=p.openFrame,oe=p.openPrerenderFrame,ie=p.prerender,ae=p.open,ce=p.openPrerender,se=p.watchForUnload,de=p.getInternalState,fe=p.setInternalState,pe=function(){return"function"==typeof _?_({props:F}):_},ge=function(){return h.try((function(){return p.resolveInitPromise?p.resolveInitPromise():C.resolve()}))},Pe=function(e){return h.try((function(){return p.rejectInitPromise?p.rejectInitPromise(e):C.reject(e)}))},be=function(e){for(var n={},t=0,r=Object.keys(F);t<r.length;t++){var o=r[t],i=m[o];if(!i||!1!==i.sendToChild){var a=i&&i.trustedDomains&&i.trustedDomains.length>0?i.trustedDomains.reduce((function(n,t){return n||U(t,e)}),!1):U(e,T(window));i&&i.sameDomain&&!a||i&&i.trustedDomains&&!a||(n[o]=F[o])}}return h.hash(n)},Oe=function(){return h.try((function(){return de?de():D}))},Te=function(e){return h.try((function(){return fe?fe(e):D=i({},D,e)}))},Se=function(){return ne?ne():h.try((function(){var e=F.window;if(e){var n=at(e);return j.register((function(){return e.close()})),n}return new Yn({send:it})}))},Ie=function(e){return te?te(e):h.try((function(){o=e}))},Ne=function(){return X?X():h.hash({setState:Te({visible:!0}),showElement:a?a.get().then(Ve):null}).then(he)},Ce=function(){return K?K():h.hash({setState:Te({visible:!1}),showElement:a?a.get().then(Je):null}).then(he)},ke=function(){return"function"==typeof I?I({props:F}):I},je=function(){return"function"==typeof b?b({props:F}):b},We=function(){return Y(ke())},Ae=function(e,n){var t=n.windowName;return re?re(e,{windowName:t}):h.try((function(){if(e===mt.IFRAME)return dt(He({attributes:i({name:t,title:P},je().iframe)}))}))},Le=function(e){return oe?oe(e):h.try((function(){if(e===mt.IFRAME)return dt(He({attributes:i({name:"__zoid_prerender_frame__"+P+"_"+ue()+"__",title:"prerender__"+P},je().iframe)}))}))},De=function(e,n,t){return ce?ce(e,n,t):h.try((function(){if(e===mt.IFRAME){if(!t)throw new Error("Expected proxy frame to be passed");return t.get().then((function(e){return j.register((function(){return $e(e)})),Ye(e).then((function(e){return x(e)})).then((function(e){return at(e)}))}))}if(e===mt.POPUP)return n;throw new Error("No render context available for "+e)}))},ze=function(){return h.try((function(){if(o)return h.all([M.trigger(yt.FOCUS),o.focus()]).then(he)}))},Ue=function(){var e=ct(window);return e.windows=e.windows||{},e.windows[d]=window,j.register((function(){delete e.windows[d]})),d},Qe=function(e,n,t,r){if(n===T(window))return{type:"global",uid:Ue()};if(e!==window)throw new Error("Can not construct cross-domain window reference for different target window");if(F.window){var o=r.getWindow();if(!o)throw new Error("Can not construct cross-domain window reference for lazy window prop");if(q(o)!==window)throw new Error("Can not construct cross-domain window reference for window prop with different ancestor")}if(t===mt.POPUP)return{type:"opener"};if(t===mt.IFRAME)return{type:"parent",distance:z(window)};throw new Error("Can not construct window reference for child")},en=function(e,n){return h.try((function(){var t;c=e,u=n,null==(t=o)||t.isPopup().then((function(e){var t;""!==(null==n?void 0:n.name)&&e&&(null==(t=o)||t.setName(null==n?void 0:n.name))})).finally((function(){ge(),j.register((function(){return n.close.fireAndForget().catch(he)}))}))}))},nn=function(e){var n=e.width,t=e.height;return h.try((function(){M.trigger(yt.RESIZE,{width:n,height:t})}))},tn=function(e){return h.try((function(){return M.trigger(yt.DESTROY)})).catch(he).then((function(){return j.all(e)})).then((function(){var n=e||new Error("Component destroyed");s&&Ze(s)||"Window navigated away"===n.message?C.resolve():C.asyncReject(n)}))},rn=le((function(e){return h.try((function(){if(Q){if(A(Q.__source__))return;return Q()}return h.try((function(){return M.trigger(yt.CLOSE)})).then((function(){return tn(e||new Error("Component closed"))}))}))})),on=function(e,n){var t=n.proxyWin,r=n.proxyFrame,o=n.windowName;return ae?ae(e,{proxyWin:t,proxyFrame:r,windowName:o}):h.try((function(){if(e===mt.IFRAME){if(!r)throw new Error("Expected proxy frame to be passed");return r.get().then((function(e){return Ye(e).then((function(n){return j.register((function(){return $e(e)})),j.register((function(){return ut(n)})),n}))}))}if(e===mt.POPUP){var n=pe(),t=n.width,a=void 0===t?"300px":t,u=n.height,c=void 0===u?"150px":u;a=un(a,window.outerWidth),c=un(c,window.outerWidth);var s=function(e,n){var t=(n=n||{}).closeOnUnload,r=void 0===t?1:t,o=n.name,a=void 0===o?"":o,u=n.width,c=n.height,s=0,d=0;u&&(window.outerWidth?d=Math.round((window.outerWidth-u)/2)+window.screenX:window.screen.width&&(d=Math.round((window.screen.width-u)/2))),c&&(window.outerHeight?s=Math.round((window.outerHeight-c)/2)+window.screenY:window.screen.height&&(s=Math.round((window.screen.height-c)/2))),delete n.closeOnUnload,delete n.name,u&&c&&(n=i({top:s,left:d,width:u,height:c,status:1,toolbar:0,menubar:0,resizable:1,scrollbars:1},n));var f,l=Object.keys(n).map((function(e){if(null!=n[e])return e+"="+me(n[e])})).filter(Boolean).join(",");try{f=window.open("",a,l)}catch(e){throw new Be("Can not open popup window - "+(e.stack||e.message))}if(A(f))throw new Be("Can not open popup window - blocked");return r&&window.addEventListener("unload",(function(){return f.close()})),f}(0,i({name:o,width:a,height:c},je().popup));return j.register((function(){return $(s)})),j.register((function(){return ut(s)})),s}throw new Error("No render context available for "+e)})).then((function(e){return t.setWindow(e,{send:it}),t.setName(o).then((function(){return t}))}))},an=function(){return h.try((function(){var e=Ge(window,"unload",we((function(){tn(new Error("Window navigated away"))}))),n=H(v,tn,3e3);if(j.register(n.cancel),j.register(e.cancel),se)return se()}))},cn=function(e){var n=!1;return e.isClosed().then((function(t){return t?(n=!0,rn(new Error("Detected component window close"))):h.delay(200).then((function(){return e.isClosed()})).then((function(e){if(e)return n=!0,rn(new Error("Detected component window close"))}))})).then((function(){return n}))},sn=function(e){return J?J(e):h.try((function(){if(-1===k.indexOf(e))return k.push(e),C.asyncReject(e),M.trigger(yt.ERROR,e)}))},dn=new h,fn=function(e){return h.try((function(){dn.resolve(e)}))};en.onError=sn;var ln=function(e,n){return e({uid:d,container:n.container,context:n.context,doc:n.doc,frame:n.frame,prerenderFrame:n.prerenderFrame,focus:ze,close:rn,state:W,props:F,tag:E,dimensions:pe(),event:M})},pn=function(e,n){var t=n.context;return ie?ie(e,{context:t}):h.try((function(){if(g){M.trigger(yt.PRERENDER);var n=e.getWindow();if(n&&S(n)&&function(e){try{if(!e.location.href)return!0;if("about:blank"===e.location.href)return!0}catch(e){}return!1}(n)){var r=(n=x(n)).document,o=ln(g,{context:t,doc:r});if(o){if(o.ownerDocument!==r)throw new Error("Expected prerender template to have been created with document from child window");!function(e,n){var t=n.tagName.toLowerCase();if("html"!==t)throw new Error("Expected element to be html, got "+t);for(var r=e.document.documentElement,o=0,i=_e(r.children);o<i.length;o++)r.removeChild(i[o]);for(var a=0,u=_e(n.children);a<u.length;a++)r.appendChild(u[a])}(n,o);var i=O.width,a=void 0!==i&&i,u=O.height,c=void 0!==u&&u,s=O.element,d=void 0===s?"body":s;if((d=qe(d,r))&&(a||c)){var f=Xe(d,(function(e){nn({width:a?e.width:void 0,height:c?e.height:void 0})}),{width:a,height:c,win:n});M.on(yt.RENDERED,f.cancel)}M.trigger(yt.PRERENDERED)}}}}))},hn=function(e,n){var t=n.proxyFrame,r=n.proxyPrerenderFrame,o=n.context,i=n.rerender;return ee?ee(e,{proxyFrame:t,proxyPrerenderFrame:r,context:o,rerender:i}):h.hash({container:e.get(),frame:t?t.get():null,prerenderFrame:r?r.get():null,internalState:Oe()}).then((function(e){var n=e.container,t=e.internalState.visible,r=ln(y,{context:o,container:n,frame:e.frame,prerenderFrame:e.prerenderFrame,doc:document});if(r){t||Je(r),function(e,n){e.appendChild(n)}(n,r);var u=function(e,n){n=we(n);var t,r,o,i=!1,a=[],u=function(){i=!0;for(var e=0;e<a.length;e++)a[e].disconnect();t&&t.cancel(),o&&o.removeEventListener("unload",c),r&&$e(r)},c=function(){i||(n(),u())};if(Ze(e))return c(),{cancel:u};if(window.MutationObserver)for(var s=e.parentElement;s;){var d=new window.MutationObserver((function(){Ze(e)&&c()}));d.observe(s,{childList:!0}),a.push(d),s=s.parentElement}return(r=document.createElement("iframe")).setAttribute("name","__detect_close_"+ue()+"__"),r.style.display="none",Ye(r).then((function(e){(o=x(e)).addEventListener("unload",c)})),e.appendChild(r),t=Ee((function(){Ze(e)&&c()}),1e3),{cancel:u}}(r,(function(){var e=new Error("Detected container element removed from DOM");return h.delay(1).then((function(){if(!Ze(r))return j.all(e),i().then(ge,Pe);rn(e)}))}));return j.register((function(){return u.cancel()})),j.register((function(){return $e(r)})),a=dt(r)}}))},wn=function(){return{state:W,event:M,close:rn,focus:ze,resize:nn,onError:sn,updateProps:mn,show:Ne,hide:Ce}},vn=function(e){void 0===e&&(e={});var n=s,t=wn();ye(L,e),function(e,n,t,r,o){var i=r.state,a=r.close,u=r.focus,c=r.event,s=r.onError;Nt(t,e,(function(e,r,d){var f=!1,l=d;Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){return f?l:(f=!0,function(){if(!r)return l;var f=r.alias;if(f&&!xe(d)&&xe(t[f])&&(l=t[f]),r.value&&(l=r.value({props:n,state:i,close:a,focus:u,event:c,onError:s,container:o})),!r.default||xe(l)||xe(t[e])||(l=r.default({props:n,state:i,close:a,focus:u,event:c,onError:s,container:o})),xe(l)){if(r.type===wt.ARRAY?!Array.isArray(l):typeof l!==r.type)throw new TypeError("Prop is not of type "+r.type+": "+e)}else if(!1!==r.required&&!xe(t[e]))throw new Error('Expected prop "'+e+'" to be defined');return xe(l)&&r.decorate&&(l=r.decorate({value:l,props:n,state:i,close:a,focus:u,event:c,onError:s,container:o})),l}())}})})),Nt(n,e,he)}(m,F,L,t,n)},mn=function(e){return vn(e),C.then((function(){var e=u,n=o;if(e&&n&&c)return be(c).then((function(t){return e.updateProps(t).catch((function(e){return cn(n).then((function(n){if(!n)throw e}))}))}))}))},yn=function(e){return Z?Z(e):h.try((function(){return Fe(e)})).then((function(e){return Ke(e)&&(e=function e(n){var t=function(e){var n=function(e){for(;e.parentNode;)e=e.parentNode;if(Ke(e))return e}(e);if(n&&n.host)return n.host}(n);if(!t)throw new Error("Element is not in shadow dom");var r="shadow-slot-"+ue(),o=document.createElement("slot");o.setAttribute("name",r),n.appendChild(o);var i=document.createElement("div");return i.setAttribute("slot",r),t.appendChild(i),Ke(t)?e(i):i}(e)),s=e,dt(e)}))};return{init:function(){M.on(yt.RENDER,(function(){return F.onRender()})),M.on(yt.PRERENDER,(function(){return F.onPrerender()})),M.on(yt.DISPLAY,(function(){return F.onDisplay()})),M.on(yt.RENDERED,(function(){return F.onRendered()})),M.on(yt.PRERENDERED,(function(){return F.onPrerendered()})),M.on(yt.CLOSE,(function(){return F.onClose()})),M.on(yt.DESTROY,(function(){return F.onDestroy()})),M.on(yt.RESIZE,(function(){return F.onResize()})),M.on(yt.FOCUS,(function(){return F.onFocus()})),M.on(yt.PROPS,(function(e){return F.onProps(e)})),M.on(yt.ERROR,(function(e){return F&&F.onError?F.onError(e):Pe(e).then((function(){setTimeout((function(){throw e}),1)}))})),j.register(M.reset)},render:function(e){var n=e.target,t=e.container,r=e.context,i=e.rerender;return h.try((function(){var e=We(),a=N||We();!function(e,n,t){if(e!==window){if(!B(window,e))throw new Error("Can only renderTo an adjacent frame");var r=T();if(!U(n,r)&&!S(e))throw new Error("Can not render remotely to "+n.toString()+" - can only render to "+r);if(t&&"string"!=typeof t)throw new Error("Container passed to renderTo must be a string selector, got "+typeof t+" }")}}(n,a,t);var u=h.try((function(){if(n!==window)return function(e,n){for(var t={},r=0,o=Object.keys(F);r<o.length;r++){var i=o[r],a=m[i];a&&a.allowDelegate&&(t[i]=F[i])}var u=it(n,"zoid_delegate_"+P,{uid:d,overrides:{props:t,event:M,close:rn,onError:sn,getInternalState:Oe,setInternalState:Te,resolveInitPromise:ge,rejectInitPromise:Pe}}).then((function(e){var t=e.data.parent;return j.register((function(e){if(!A(n))return t.destroy(e)})),t.getDelegateOverrides()})).catch((function(e){throw new Error("Unable to delegate rendering. Possibly the component is not loaded in the target window.\n\n"+ve(e))}));return Z=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.getProxyContainer.apply(e,n)}))},ee=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.renderContainer.apply(e,n)}))},X=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.show.apply(e,n)}))},K=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.hide.apply(e,n)}))},se=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.watchForUnload.apply(e,n)}))},e===mt.IFRAME?(ne=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.getProxyWindow.apply(e,n)}))},re=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.openFrame.apply(e,n)}))},oe=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.openPrerenderFrame.apply(e,n)}))},ie=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.prerender.apply(e,n)}))},ae=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.open.apply(e,n)}))},ce=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.openPrerender.apply(e,n)}))}):e===mt.POPUP&&(te=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.setProxyWin.apply(e,n)}))}),u}(r,n)})),c=F.window,l=an(),p=Rt(m,F,"post"),w=M.trigger(yt.RENDER),v=yn(t),y=Se(),g=v.then((function(){return vn()})),b=g.then((function(){return Rt(m,F,"get").then((function(e){return function(e,n){var t,r,o=n.query||{},i=n.hash||{},a=e.split("#");r=a[1];var u=(t=a[0]).split("?");t=u[0];var c=Me(u[1],o),s=Me(r,i);return c&&(t=t+"?"+c),s&&(t=t+"#"+s),t}(V(ke()),{query:e})}))})),_=y.then((function(t){return function(e){var n=void 0===e?{}:e,t=n.proxyWin,r=n.initialChildDomain,o=n.childDomainMatch,i=n.target,a=void 0===i?window:i,u=n.context;return function(e){var n=void 0===e?{}:e,t=n.proxyWin,r=n.childDomainMatch,o=n.context;return be(n.initialChildDomain).then((function(e){return{uid:d,context:o,tag:E,childDomainMatch:r,version:"10_3_3",props:e,exports:(n=t,{init:function(e){return en(this.origin,e)},close:rn,checkClose:function(){return cn(n)},resize:nn,onError:sn,show:Ne,hide:Ce,export:fn})};var n}))}({proxyWin:t,initialChildDomain:r,childDomainMatch:o,context:u}).then((function(e){var n=pt({data:e,metaData:{windowRef:Qe(a,r,u,t)},sender:{domain:T(window)},receiver:{win:t,domain:o},passByReference:r===T()}),i=n.serializedData;return j.register(n.cleanReference),i}))}({proxyWin:(o={proxyWin:t,initialChildDomain:e,childDomainMatch:a,target:n,context:r}).proxyWin,initialChildDomain:o.initialChildDomain,childDomainMatch:o.childDomainMatch,target:o.target,context:o.context}).then((function(e){return gt({name:P,serializedPayload:e})}));var o})),O=_.then((function(e){return Ae(r,{windowName:e})})),x=Le(r),I=h.hash({proxyContainer:v,proxyFrame:O,proxyPrerenderFrame:x}).then((function(e){return hn(e.proxyContainer,{context:r,proxyFrame:e.proxyFrame,proxyPrerenderFrame:e.proxyPrerenderFrame,rerender:i})})).then((function(e){return e})),R=h.hash({windowName:_,proxyFrame:O,proxyWin:y}).then((function(e){var n=e.proxyWin;return c?n:on(r,{windowName:e.windowName,proxyWin:n,proxyFrame:e.proxyFrame})})),k=h.hash({proxyWin:R,proxyPrerenderFrame:x}).then((function(e){return De(r,e.proxyWin,e.proxyPrerenderFrame)})),W=R.then((function(e){return o=e,Ie(e)})),L=h.hash({proxyPrerenderWin:k,state:W}).then((function(e){return pn(e.proxyPrerenderWin,{context:r})})),D=h.hash({proxyWin:R,windowName:_}).then((function(e){if(c)return e.proxyWin.setName(e.windowName)})),q=h.hash({body:p}).then((function(e){return f.method?f.method:Object.keys(e.body).length?"post":"get"})),z=h.hash({proxyWin:R,windowUrl:b,body:p,method:q,windowName:D,prerender:L}).then((function(e){return e.proxyWin.setLocation(e.windowUrl,{method:e.method,body:e.body})})),H=R.then((function(e){!function e(n,t){var r=!1;return j.register((function(){r=!0})),h.delay(2e3).then((function(){return n.isClosed()})).then((function(o){if(!r){if(t===mt.POPUP&&o)return rn(new Error("Detected popup close"));var i=Boolean(s&&Ze(s));return t===mt.IFRAME&&o&&(i||G)?rn(new Error("Detected iframe close")):e(n,t)}}))}(e,r)})),J=h.hash({container:I,prerender:L}).then((function(){return M.trigger(yt.DISPLAY)})),$=R.then((function(n){return function(e,n,t){return h.try((function(){return e.awaitWindow()})).then((function(e){if(ot&&ot.needsBridge({win:e,domain:n})&&!ot.hasBridge(n,n)){var r="function"==typeof f.bridgeUrl?f.bridgeUrl({props:F}):f.bridgeUrl;if(!r)throw new Error("Bridge needed to render "+t);var o=Y(r);return ot.linkUrl(e,n),ot.openBridge(V(r),o)}}))}(n,e,r)})),Q=z.then((function(){return h.try((function(){var e=F.timeout;if(e)return C.timeout(e,new Error("Loading component timed out after "+e+" milliseconds"))}))})),ue=C.then((function(){return G=!0,M.trigger(yt.RENDERED)}));return h.hash({initPromise:C,buildUrlPromise:b,onRenderPromise:w,getProxyContainerPromise:v,openFramePromise:O,openPrerenderFramePromise:x,renderContainerPromise:I,openPromise:R,openPrerenderPromise:k,setStatePromise:W,prerenderPromise:L,loadUrlPromise:z,buildWindowNamePromise:_,setWindowNamePromise:D,watchForClosePromise:H,onDisplayPromise:J,openBridgePromise:$,runTimeoutPromise:Q,onRenderedPromise:ue,delegatePromise:u,watchForUnloadPromise:l,finalSetPropsPromise:g})})).catch((function(e){return h.all([sn(e),tn(e)]).then((function(){throw e}),(function(){throw e}))})).then(he)},destroy:tn,getProps:function(){return F},setProps:vn,export:fn,getHelpers:wn,getDelegateOverrides:function(){return h.try((function(){return{getProxyContainer:yn,show:Ne,hide:Ce,renderContainer:hn,getProxyWindow:Se,watchForUnload:an,openFrame:Ae,openPrerenderFrame:Le,prerender:pn,open:on,openPrerender:De,setProxyWin:Ie}}))},getExports:function(){return R({getExports:function(){return dn}})}}}var kt={register:function(e,n,t,r){var i=r.React,a=r.ReactDOM;return function(e){function n(){return e.apply(this,arguments)||this}o(n,e);var r=n.prototype;return r.render=function(){return i.createElement("div",null)},r.componentDidMount=function(){var e=a.findDOMNode(this),n=t(ye({},this.props));n.render(e,mt.IFRAME),this.setState({parent:n})},r.componentDidUpdate=function(){this.state&&this.state.parent&&this.state.parent.updateProps(ye({},this.props)).catch(he)},n}(i.Component)}},jt={register:function(e,n,t,r){return r.component(e,{render:function(e){return e("div")},inheritAttrs:!1,mounted:function(){var e,n=this.$el;this.parent=t(i({},(e=this.$attrs,Object.keys(e).reduce((function(n,t){var r=e[t];return"style-object"===t||"styleObject"===t?(n.style=r,n.styleObject=r):t.includes("-")?n[Pe(t)]=r:n[t]=r,n}),{})))),this.parent.render(n,mt.IFRAME)},watch:{$attrs:{handler:function(){this.parent&&this.$attrs&&this.parent.updateProps(i({},this.$attrs)).catch(he)},deep:!0}}})}},Wt={register:function(e,n,t){return{template:"<div></div>",inheritAttrs:!1,mounted:function(){var e,n=this.$el;this.parent=t(i({},(e=this.$attrs,Object.keys(e).reduce((function(n,t){var r=e[t];return"style-object"===t||"styleObject"===t?(n.style=r,n.styleObject=r):t.includes("-")?n[Pe(t)]=r:n[t]=r,n}),{})))),this.parent.render(n,mt.IFRAME)},watch:{$attrs:{handler:function(){this.parent&&this.$attrs&&this.parent.updateProps(i({},this.$attrs)).catch(he)},deep:!0}}}}},At={register:function(e,n,t,r){return r.module(e,[]).directive(Pe(e),(function(){for(var e={},r=0,o=Object.keys(n);r<o.length;r++)e[o[r]]="=";return e.props="=",{scope:e,restrict:"E",controller:["$scope","$element",function(e,n){function r(){if("$apply"!==e.$root.$$phase&&"$digest"!==e.$root.$$phase)try{e.$apply()}catch(e){}}var o=function(){return Se(e.props,(function(e){return"function"==typeof e?function(){var n=e.apply(this,arguments);return r(),n}:e}))},i=t(o());i.render(n[0],mt.IFRAME),e.$watch((function(){i.updateProps(o()).catch(he)}))}]}}))}},Lt={register:function(e,n,t,r){var o=r.Component,a=r.NgModule,u=r.ElementRef,c=r.NgZone,s=r.Inject,d=function(){function e(e,n){this.elementRef=void 0,this.internalProps=void 0,this.parent=void 0,this.props=void 0,this.zone=void 0,this._props=void 0,this._props={},this.elementRef=e,this.zone=n}var n=e.prototype;return n.getProps=function(){var e=this;return Se(i({},this.internalProps,this.props),(function(n){if("function"==typeof n){var t=e.zone;return function(){var e=arguments,r=this;return t.run((function(){return n.apply(r,e)}))}}return n}))},n.ngOnInit=function(){var e=this.elementRef.nativeElement;this.parent=t(this.getProps()),this.parent.render(e,mt.IFRAME)},n.ngDoCheck=function(){this.parent&&!function(e,n){var t={};for(var r in e)if(e.hasOwnProperty(r)&&(t[r]=!0,e[r]!==n[r]))return!1;for(var o in n)if(!t[o])return!1;return!0}(this._props,this.props)&&(this._props=i({},this.props),this.parent.updateProps(this.getProps()))},e}();d.annotations=void 0,d.parameters=void 0,d.parameters=[[new s(u)],[new s(c)]],d.annotations=[new o({selector:e,template:"<div></div>",inputs:["props"]})];var f=function(){};return f.annotations=void 0,f.annotations=[new a({declarations:[d],exports:[d]})],f}};function Dt(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,a=e.event,u=e.dimensions,c=u.width,s=u.height;if(t&&r){var d=o.createElement("div");d.setAttribute("id",n);var f=o.createElement("style");return i.cspNonce&&f.setAttribute("nonce",i.cspNonce),f.appendChild(o.createTextNode("\n #"+n+" {\n display: inline-block;\n position: relative;\n width: "+c+";\n height: "+s+";\n }\n\n #"+n+" > 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 ")),d.appendChild(t),d.appendChild(r),d.appendChild(f),r.classList.add("zoid-visible"),t.classList.add("zoid-invisible"),a.on(yt.RENDERED,(function(){r.classList.remove("zoid-visible"),r.classList.add("zoid-invisible"),t.classList.remove("zoid-invisible"),t.classList.add("zoid-visible"),setTimeout((function(){$e(r)}),1)})),a.on(yt.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(d.style.width=an(n)),"number"==typeof t&&(d.style.height=an(t))})),d}}function Mt(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 qt=Re(),Ft=Re(),zt=function(e){!function(){var e,n,t,r;cn().initialized||(cn().initialized=!0,n=(e={on:rt,send:it}).on,t=e.send,(r=cn()).receiveMessage=r.receiveMessage||function(e){return tt(e,{on:n,send:t})},function(e){var n=e.on,t=e.send;dn().getOrSet("postMessageListener",(function(){return Ge(window,"message",(function(e){!function(e,n){var t=n.on,r=n.send;h.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");tt({source:n,origin:o,data:i},{on:t,send:r})}}))}(e,{on:n,send:t})}))}))}({on:rt,send:it}),zn({on:rt,send:it,receiveMessage:tt}),function(e){var n=e.on,t=e.send;dn("builtinListeners").getOrSet("helloListener",(function(){var e=n("postrobot_hello",{domain:"*"},(function(e){return vn(e.source,{domain:e.origin}),{instanceID:wn()}})),r=q();return r&&mn(r,{send:t}).catch((function(e){})),e}))}({on:rt,send:it}))}();var n=function(e){var n,t,r=function(e){var n=e.tag,t=e.url,r=e.domain,o=e.bridgeUrl,a=e.props,u=void 0===a?{}:a,c=e.dimensions,s=void 0===c?{}:c,d=e.autoResize,f=void 0===d?{}:d,l=e.allowedParentDomains,p=void 0===l?"*":l,h=e.attributes,w=void 0===h?{}:h,v=e.defaultContext,m=void 0===v?mt.IFRAME:v,y=e.containerTemplate,g=void 0===y?Dt:y,E=e.prerenderTemplate,P=void 0===E?Mt:E,b=e.validate,_=e.eligible,O=void 0===_?function(){return{eligible:!0}}:_,T=e.logger,x=void 0===T?{info:he}:T,I=e.exports,N=void 0===I?he:I,R=e.method,C=e.children,k=void 0===C?function(){return{}}:C,j=n.replace(/-/g,"_"),W=i({},{window:{type:wt.OBJECT,sendToChild:!1,required:!1,allowDelegate:!0,validate:function(e){var n=e.value;if(!G(n)&&!Yn.isProxyWindow(n))throw new Error("Expected Window or ProxyWindow");if(G(n)){if(A(n))throw new Error("Window is closed");if(!S(n))throw new Error("Window is not same domain")}},decorate:function(e){return at(e.value)}},timeout:{type:wt.NUMBER,required:!1,sendToChild:!1},cspNonce:{type:wt.STRING,required:!1},onDisplay:{type:wt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:xt,decorate:It},onRendered:{type:wt.FUNCTION,required:!1,sendToChild:!1,default:xt,decorate:It},onRender:{type:wt.FUNCTION,required:!1,sendToChild:!1,default:xt,decorate:It},onPrerendered:{type:wt.FUNCTION,required:!1,sendToChild:!1,default:xt,decorate:It},onPrerender:{type:wt.FUNCTION,required:!1,sendToChild:!1,default:xt,decorate:It},onClose:{type:wt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:xt,decorate:It},onDestroy:{type:wt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:xt,decorate:It},onResize:{type:wt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:xt},onFocus:{type:wt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:xt},close:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.close}},focus:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.focus}},resize:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.resize}},uid:{type:wt.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.uid}},tag:{type:wt.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.tag}},getParent:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParent}},getParentDomain:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParentDomain}},show:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.show}},hide:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.hide}},export:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.export}},onError:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onError}},onProps:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onProps}},getSiblings:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getSiblings}}},u);if(!g)throw new Error("Container template required");return{name:j,tag:n,url:t,domain:r,bridgeUrl:o,method:R,propsDef:W,dimensions:s,autoResize:f,allowedParentDomains:p,attributes:w,defaultContext:m,containerTemplate:g,prerenderTemplate:P,validate:b,logger:x,eligible:O,children:k,exports:"function"==typeof N?N:function(e){for(var n=e.getExports,t={},r=function(){var e=i[o],r=N[e].type,a=n().then((function(n){return n[e]}));t[e]=r===wt.FUNCTION?function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return a.then((function(e){return e.apply(void 0,n)}))}:a},o=0,i=Object.keys(N);o<i.length;o++)r();return t}}}(e),o=r.name,a=r.tag,u=r.defaultContext,c=r.propsDef,s=r.eligible,d=r.children,f=ct(window),l={},p=[],w=function(){if(function(e){try{return Et(window.name).name===e}catch(e){}return!1}(o)){var e=bt().payload;if(e.tag===a&&U(e.childDomainMatch,T()))return!0}return!1},v=le((function(){if(w()){if(window.xprops)throw delete f.components[a],new Error("Can not register "+o+" as child - child already registered");var e=function(e){var n,t=e.tag,r=e.propsDef,o=e.autoResize,i=e.allowedParentDomains,a=[],u=bt(),c=u.parent,s=u.payload,d=c.win,f=c.domain,l=new h,p=s.version,w=s.uid,v=s.exports,m=s.context,y=s.props;if(!function(e,n){if(!/_/.test(e)||!/_/.test("10_3_3"))throw new Error("Versions are in an invalid format ("+e+", 10_3_3)");return e.split("_")[0]==="10_3_3".split("_")[0]}(p))throw new Error("Parent window has zoid version "+p+", child window has version 10_3_3");var g=v.show,E=v.hide,P=v.close,b=v.onError,_=v.checkClose,O=v.export,I=v.resize,N=v.init,R=function(){return d},C=function(){return f},j=function(e){return a.push(e),{cancel:function(){a.splice(a.indexOf(e),1)}}},W=function(e){return I.fireAndForget({width:e.width,height:e.height})},A=function(e){return l.resolve(e),O(e)},L=function(e){var r=(void 0===e?{}:e).anyParent,o=[],i=n.parent;if(void 0===r&&(r=!i),!r&&!i)throw new Error("No parent found for "+t+" child");for(var a=0,u=k(window);a<u.length;a++){var c=u[a];if(S(c)){var s=x(c).xprops;if(s&&R()===s.getParent()){var d=s.parent;if(r||!i||d&&d.uid===i.uid){var f=st(c,(function(e){return e.exports}));o.push({props:s,exports:f})}}}}return o},D=function(e,o,i){void 0===i&&(i=!1);var u=function(e,n,t,r,o,i){void 0===i&&(i=!1);for(var a={},u=0,c=Object.keys(t);u<c.length;u++){var s=c[u],d=n[s],f=d&&d.trustedDomains&&d.trustedDomains.length>0?d.trustedDomains.reduce((function(e,n){return e||U(n,T(window))}),!1):r===T(window)||S(e);if((!d||!d.sameDomain||f)&&(!d||!d.trustedDomains||f)){var l=Ot(n,0,s,t[s],o);a[s]=l,d&&d.alias&&!a[d.alias]&&(a[d.alias]=l)}}if(!i)for(var p=0,h=Object.keys(n);p<h.length;p++){var w=h[p];t.hasOwnProperty(w)||(a[w]=Ot(n,0,w,void 0,o))}return a}(d,r,e,o,{tag:t,show:g,hide:E,close:P,focus:Tt,onError:b,resize:W,getSiblings:L,onProps:j,getParent:R,getParentDomain:C,uid:w,export:A},i);n?ye(n,u):n=u;for(var c=0;c<a.length;c++)(0,a[c])(n)},M=function(e){return h.try((function(){return D(e,f,!0)}))};return{init:function(){return h.try((function(){var n="";return S(d)&&(n=function(e){var n=e.componentName,t=e.parentComponentWindow,r=ht({data:Et(window.name).serializedInitialPayload,sender:{win:t},basic:!0}),o=r.sender;if("uid"===r.reference.type||"global"===r.metaData.windowRef.type){var i=gt({name:n,serializedPayload:pt({data:r.data,metaData:{windowRef:_t(t)},sender:{domain:o.domain},receiver:{win:window,domain:T()},basic:!0}).serializedData});return window.name=i,i}}({componentName:e.name,parentComponentWindow:d})||""),ct(window).exports=e.exports({getExports:function(){return l}}),function(e,n){if(!U(e,n))throw new Error("Can not be rendered by domain: "+n)}(i,f),En(d),window.addEventListener("beforeunload",(function(){_.fireAndForget()})),window.addEventListener("unload",(function(){_.fireAndForget()})),H(d,(function(){St()})),N({name:n,updateProps:M,close:St})})).then((function(){return(e=o.width,n=void 0!==e&&e,t=o.height,r=void 0!==t&&t,i=o.element,Fe(void 0===i?"body":i).catch(he).then((function(e){return{width:n,height:r,element:e}}))).then((function(e){var n=e.width,t=e.height,r=e.element;r&&(n||t)&&m!==mt.POPUP&&Xe(r,(function(e){W({width:n?e.width:void 0,height:t?e.height:void 0})}),{width:n,height:t})}));var e,n,t,r,i})).catch((function(e){b(e)}))},getProps:function(){return n||(D(y,f),n)}}}(r);return e.init(),e}})),m=function e(n){var t,c="zoid-"+a+"-"+ue(),f=n||{},l=s({props:f}),w=l.eligible,v=l.reason,m=f.onDestroy;f.onDestroy=function(){if(t&&w&&p.splice(p.indexOf(t),1),m)return m.apply(void 0,arguments)};var y=Ct({uid:c,options:r});y.init(),w?y.setProps(f):f.onDestroy&&f.onDestroy(),qt.register((function(e){return y.destroy(e||new Error("zoid destroyed all components"))}));var g=function(n){var t=(void 0===n?{}:n).decorate;return e((void 0===t?ge:t)(f))},E=function(e,n,r){return h.try((function(){if(!w){var n=new Error(v||o+" component is not eligible");return y.destroy(n).then((function(){throw n}))}if(!G(e))throw new Error("Must pass window to renderTo");return function(e,n){return h.try((function(){if(e.window)return at(e.window).getType();if(n){if(n!==mt.IFRAME&&n!==mt.POPUP)throw new Error("Unrecognized context: "+n);return n}return u}))}(f,r)})).then((function(o){if(n=function(e,n){if(n){if("string"!=typeof n&&!re(n))throw new TypeError("Expected string or element selector to be passed");return n}if(e===mt.POPUP)return"body";throw new Error("Expected element to be passed to render iframe")}(o,n),e!==window&&"string"!=typeof n)throw new Error("Must pass string element when rendering to another window");return y.render({target:e,container:n,context:o,rerender:function(){var o=g();return ye(t,o),o.renderTo(e,n,r)}})})).catch((function(e){return y.destroy(e).then((function(){throw e}))}))};return t=i({},y.getExports(),y.getHelpers(),function(){for(var e=d(),n={},t=function(){var t=o[r],a=e[t];n[t]=function(e){var n=y.getProps(),t=i({},e,{parent:{uid:c,props:n,export:y.export}});return a(t)}},r=0,o=Object.keys(e);r<o.length;r++)t();return n}(),{isEligible:function(){return w},clone:g,render:function(e,n){return E(window,e,n)},renderTo:function(e,n,t){return E(e,n,t)}}),w&&p.push(t),t};if(v(),n=rt("zoid_allow_delegate_"+o,(function(){return!0})),t=rt("zoid_delegate_"+o,(function(e){var n=e.data;return{parent:Ct({uid:n.uid,options:r,overrides:n.overrides,parentWin:e.source})}})),Ft.register(n.cancel),Ft.register(t.cancel),f.components=f.components||{},f.components[a])throw new Error("Can not register multiple components with the same tag: "+a);return f.components[a]=!0,{init:m,instances:p,driver:function(e,n){var t={react:kt,angular:At,vue:jt,vue3:Wt,angular2:Lt};if(!t[e])throw new Error("Could not find driver for framework: "+e);return l[e]||(l[e]=t[e].register(a,c,m,n)),l[e]},isChild:w,canRenderTo:function(e){return it(e,"zoid_allow_delegate_"+o).then((function(e){return e.data})).catch((function(){return!1}))},registerChild:v}}(e),t=function(e){return n.init(e)};t.driver=function(e,t){return n.driver(e,t)},t.isChild=function(){return n.isChild()},t.canRenderTo=function(e){return n.canRenderTo(e)},t.instances=n.instances;var r=n.registerChild();return r&&(window.xprops=t.xprops=r.getProps()),t};function Bt(e){ot&&ot.destroyBridges();var n=qt.all(e);return qt=Re(),n}var Ut=Bt;function Yt(e){var n;return Ut(),delete window.__zoid_10_3_3__,function(){for(var e=dn("responseListeners"),n=0,t=e.keys();n<t.length;n++){var r=t[n],o=e.get(r);o&&(o.cancelled=!0),e.del(r)}}(),(n=dn().get("postMessageListener"))&&n.cancel(),delete window.__post_robot_11_0_0__,Ft.all(e)}}])},e.exports=t()}))),L=a((function(e,n){var t;"undefined"!=typeof self&&self,t=function(){return 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,n,t){t.r(n),t.d(n,"getUserAgent",(function(){return i})),t.d(n,"isDevice",(function(){return a})),t.d(n,"isWebView",(function(){return u})),t.d(n,"isStandAlone",(function(){return c})),t.d(n,"isFacebookWebView",(function(){return s})),t.d(n,"isFirefoxIOS",(function(){return d})),t.d(n,"isEdgeIOS",(function(){return f})),t.d(n,"isOperaMini",(function(){return l})),t.d(n,"isAndroid",(function(){return p})),t.d(n,"isIos",(function(){return h})),t.d(n,"isGoogleSearchApp",(function(){return w})),t.d(n,"isQQBrowser",(function(){return v})),t.d(n,"isIosWebview",(function(){return m})),t.d(n,"isSFVC",(function(){return y})),t.d(n,"isSFVCorSafari",(function(){return g})),t.d(n,"isAndroidWebview",(function(){return E})),t.d(n,"isIE",(function(){return P})),t.d(n,"isIECompHeader",(function(){return b})),t.d(n,"isElectron",(function(){return _})),t.d(n,"isIEIntranet",(function(){return O})),t.d(n,"isMacOsCna",(function(){return T})),t.d(n,"supportsPopups",(function(){return S})),t.d(n,"isChrome",(function(){return x})),t.d(n,"isSafari",(function(){return I})),t.d(n,"isApplePaySupported",(function(){return N})),t.d(n,"isDocumentReady",(function(){return Cn})),t.d(n,"isDocumentInteractive",(function(){return kn})),t.d(n,"urlEncode",(function(){return jn})),t.d(n,"waitForWindowReady",(function(){return Wn})),t.d(n,"waitForDocumentReady",(function(){return An})),t.d(n,"waitForDocumentBody",(function(){return Ln})),t.d(n,"parseQuery",(function(){return Dn})),t.d(n,"getQueryParam",(function(){return Mn})),t.d(n,"urlWillRedirectPage",(function(){return qn})),t.d(n,"formatQuery",(function(){return Fn})),t.d(n,"extendQuery",(function(){return zn})),t.d(n,"extendUrl",(function(){return Bn})),t.d(n,"redirect",(function(){return Un})),t.d(n,"hasMetaViewPort",(function(){return Yn})),t.d(n,"isElementVisible",(function(){return Hn})),t.d(n,"getPerformance",(function(){return Gn})),t.d(n,"enablePerformance",(function(){return Vn})),t.d(n,"getPageRenderTime",(function(){return Jn})),t.d(n,"htmlEncode",(function(){return $n})),t.d(n,"isBrowser",(function(){return Zn})),t.d(n,"querySelectorAll",(function(){return Xn})),t.d(n,"onClick",(function(){return Kn})),t.d(n,"getScript",(function(){return Qn})),t.d(n,"isLocalStorageEnabled",(function(){return et})),t.d(n,"getBrowserLocales",(function(){return nt})),t.d(n,"appendChild",(function(){return tt})),t.d(n,"isElement",(function(){return rt})),t.d(n,"getElementSafe",(function(){return ot})),t.d(n,"getElement",(function(){return it})),t.d(n,"elementReady",(function(){return at})),t.d(n,"PopupOpenError",(function(){return ct})),t.d(n,"popup",(function(){return st})),t.d(n,"writeToWindow",(function(){return dt})),t.d(n,"writeElementToWindow",(function(){return ft})),t.d(n,"setStyle",(function(){return lt})),t.d(n,"awaitFrameLoad",(function(){return pt})),t.d(n,"awaitFrameWindow",(function(){return ht})),t.d(n,"createElement",(function(){return wt})),t.d(n,"iframe",(function(){return vt})),t.d(n,"addEventListener",(function(){return mt})),t.d(n,"bindEvents",(function(){return yt})),t.d(n,"setVendorCSS",(function(){return Et})),t.d(n,"animate",(function(){return _t})),t.d(n,"makeElementVisible",(function(){return Ot})),t.d(n,"makeElementInvisible",(function(){return Tt})),t.d(n,"showElement",(function(){return St})),t.d(n,"hideElement",(function(){return xt})),t.d(n,"destroyElement",(function(){return It})),t.d(n,"showAndAnimate",(function(){return Nt})),t.d(n,"animateAndHide",(function(){return Rt})),t.d(n,"addClass",(function(){return Ct})),t.d(n,"removeClass",(function(){return kt})),t.d(n,"isElementClosed",(function(){return jt})),t.d(n,"watchElementForClose",(function(){return Wt})),t.d(n,"fixScripts",(function(){return At})),t.d(n,"onResize",(function(){return Lt})),t.d(n,"getResourceLoadTime",(function(){return Dt})),t.d(n,"isShadowElement",(function(){return Mt})),t.d(n,"getShadowRoot",(function(){return qt})),t.d(n,"getShadowHost",(function(){return Ft})),t.d(n,"insertShadowSlot",(function(){return zt})),t.d(n,"preventClickFocus",(function(){return Bt})),t.d(n,"getStackTrace",(function(){return Ut})),t.d(n,"getCurrentScript",(function(){return Ht})),t.d(n,"getCurrentScriptUID",(function(){return Vt})),t.d(n,"experiment",(function(){return Kt})),t.d(n,"getGlobalNameSpace",(function(){return Qt})),t.d(n,"getStorage",(function(){return Jt})),t.d(n,"getFunctionName",(function(){return ie})),t.d(n,"setFunctionName",(function(){return ae})),t.d(n,"base64encode",(function(){return ue})),t.d(n,"base64decode",(function(){return ce})),t.d(n,"uniqueID",(function(){return se})),t.d(n,"getGlobal",(function(){return de})),t.d(n,"getObjectID",(function(){return fe})),t.d(n,"getEmptyObject",(function(){return pe})),t.d(n,"memoize",(function(){return ve})),t.d(n,"promiseIdentity",(function(){return me})),t.d(n,"memoizePromise",(function(){return ye})),t.d(n,"promisify",(function(){return ge})),t.d(n,"inlineMemoize",(function(){return Ee})),t.d(n,"noop",(function(){return Pe})),t.d(n,"once",(function(){return be})),t.d(n,"hashStr",(function(){return _e})),t.d(n,"strHashStr",(function(){return Oe})),t.d(n,"match",(function(){return Te})),t.d(n,"awaitKey",(function(){return Se})),t.d(n,"stringifyError",(function(){return xe})),t.d(n,"stringifyErrorMessage",(function(){return Ie})),t.d(n,"stringify",(function(){return Ne})),t.d(n,"domainMatches",(function(){return Re})),t.d(n,"patchMethod",(function(){return Ce})),t.d(n,"extend",(function(){return ke})),t.d(n,"values",(function(){return je})),t.d(n,"memoizedValues",(function(){return We})),t.d(n,"perc",(function(){return Ae})),t.d(n,"min",(function(){return Le})),t.d(n,"max",(function(){return De})),t.d(n,"roundUp",(function(){return Me})),t.d(n,"regexMap",(function(){return qe})),t.d(n,"svgToBase64",(function(){return Fe})),t.d(n,"objFilter",(function(){return ze})),t.d(n,"identity",(function(){return Be})),t.d(n,"regexTokenize",(function(){return Ue})),t.d(n,"promiseDebounce",(function(){return Ye})),t.d(n,"safeInterval",(function(){return He})),t.d(n,"isInteger",(function(){return Ge})),t.d(n,"isFloat",(function(){return Ve})),t.d(n,"serializePrimitive",(function(){return Je})),t.d(n,"deserializePrimitive",(function(){return $e})),t.d(n,"dotify",(function(){return Ze})),t.d(n,"undotify",(function(){return Xe})),t.d(n,"eventEmitter",(function(){return Ke})),t.d(n,"camelToDasherize",(function(){return Qe})),t.d(n,"dasherizeToCamel",(function(){return en})),t.d(n,"capitalizeFirstLetter",(function(){return nn})),t.d(n,"get",(function(){return tn})),t.d(n,"safeTimeout",(function(){return rn})),t.d(n,"defineLazyProp",(function(){return on})),t.d(n,"arrayFrom",(function(){return an})),t.d(n,"isObject",(function(){return un})),t.d(n,"isObjectObject",(function(){return cn})),t.d(n,"isPlainObject",(function(){return sn})),t.d(n,"replaceObject",(function(){return dn})),t.d(n,"copyProp",(function(){return fn})),t.d(n,"regex",(function(){return ln})),t.d(n,"regexAll",(function(){return pn})),t.d(n,"isDefined",(function(){return hn})),t.d(n,"cycle",(function(){return wn})),t.d(n,"debounce",(function(){return vn})),t.d(n,"isRegex",(function(){return mn})),t.d(n,"weakMapMemoize",(function(){return yn})),t.d(n,"weakMapMemoizePromise",(function(){return gn})),t.d(n,"getOrSet",(function(){return En})),t.d(n,"cleanup",(function(){return Pn})),t.d(n,"tryCatch",(function(){return bn})),t.d(n,"removeFromArray",(function(){return _n})),t.d(n,"assertExists",(function(){return On})),t.d(n,"unique",(function(){return Tn})),t.d(n,"constHas",(function(){return Sn})),t.d(n,"dedupeErrors",(function(){return xn})),t.d(n,"ExtendableError",(function(){return In})),t.d(n,"request",(function(){return nr})),t.d(n,"addHeaderBuilder",(function(){return tr})),t.d(n,"TYPES",(function(){return rr})),t.d(n,"memoized",(function(){return or})),t.d(n,"promise",(function(){return ir})),t.d(n,"isPerc",(function(){return ar})),t.d(n,"isPx",(function(){return ur})),t.d(n,"toNum",(function(){return cr})),t.d(n,"toPx",(function(){return sr})),t.d(n,"toCSS",(function(){return dr})),t.d(n,"percOf",(function(){return fr})),t.d(n,"normalizeDimension",(function(){return lr})),t.d(n,"wrapPromise",(function(){return pr})),t.d(n,"KEY_CODES",(function(){return Nn})),t.d(n,"ATTRIBUTES",(function(){return Rn})),t.d(n,"iPhoneScreenHeightMatrix",(function(){return r}));var r={926:{device:"iPhone 12 Pro Max",textSizeHeights:[752,748,744,738],zoomHeight:{1.15:[752,747,744,738],1.25:[753,748,744,738],1.5:[752,749,744,738],1.75:[753,747,744,739],2:[752,748,744],2.5:[753,748],3:[753,744]},maybeSafari:{2:[738],2.5:[745,738],3:[747,738]}},896:{device:"iPhone XS Max, iPhone 11 Pro Max, iPhone XR, iPhone 11",textSizeHeights:[721,717,713,707],zoomHeight:{1.15:[721,716,713,707],1.25:[721,718,713,708],1.5:[722,717,713],1.75:[721,718,712,707],2:[722,718,714,708],2.5:[720,718,713,708],3:[720,717,708]},maybeSafari:{1.5:[707],3:[714]}},844:{device:"iPhone 12, iPhone 12 Pro",textSizeHeights:[670,666,662,656],zoomHeight:{1.15:[670,666,662],1.25:[670,666,663,656],1.5:[671,666,662],1.75:[670,667,662,656],2:[670,666,662],2.5:[670,663],3:[669,666,663,657]},maybeSafari:{1.15:[656],1.5:[656],2:[656],2.5:[665,655],3:[663]}},812:{device:"iPhone X, iPhone XS, iPhone 11 Pro, iPhone 12 Mini",textSizeHeights:[641,637,633,627],zoomHeight:{1.15:[641,637,633,627],1.25:[641,638,633,628],1.5:[641,638,633,627],1.75:[641,637,634],2:[642,638,634,628],2.5:[640,638,633,628],3:[642,633]},maybeSafari:{1.75:[627],3:[636,627]}},736:{device:"iPhone 6 Plus, iPhone 6S Plus, iPhone 7 Plus, iPhone 8 Plus",textSizeHeights:[628,624,620,614],zoomHeight:{1.15:[628,624,620,614],1.25:[628,624,620,614],1.5:[629,624,620],1.75:[628,625,620,614],2:[628,624,620],2.5:[628,625,620,615],3:[627,624,615]},maybeSafari:{1.5:[614],2:[614],3:[621]}},667:{device:"iPhone 6, iPhone 6S, iPhone 7, iPhone 8, iPhone SE2",textSizeHeights:[559,555,551,545],zoomHeight:{1.15:[559,555,551,545],1.25:[559,555,551,545],1.5:[560,555,551],1.75:[558,555,551],2:[560,556,552,546],2.5:[560,555,550],3:[558,555,546]},maybeSafari:{1.5:[545],1.75:[544],2.5:[545],3:[552]}}};function i(){return window.navigator.mockUserAgent||window.navigator.userAgent}function a(e){return void 0===e&&(e=i()),!!e.match(/Android|webOS|iPhone|iPad|iPod|bada|Symbian|Palm|CriOS|BlackBerry|IEMobile|WindowsMobile|Opera Mini/i)}function u(){var e=i();return/(iPhone|iPod|iPad|Macintosh).*AppleWebKit(?!.*Safari)|.*WKWebView/i.test(e)||/\bwv\b/.test(e)||/Android.*Version\/(\d)\.(\d)/i.test(e)}function c(){return!0===window.navigator.standalone||window.matchMedia("(display-mode: standalone)").matches}function s(e){return void 0===e&&(e=i()),/FBAN/.test(e)||/FBAV/.test(e)}function d(e){return void 0===e&&(e=i()),/FxiOS/i.test(e)}function f(e){return void 0===e&&(e=i()),/EdgiOS/i.test(e)}function l(e){return void 0===e&&(e=i()),/Opera Mini/i.test(e)}function p(e){return void 0===e&&(e=i()),/Android/.test(e)}function h(e){return void 0===e&&(e=i()),/iPhone|iPod|iPad/.test(e)}function w(e){return void 0===e&&(e=i()),/\bGSA\b/.test(e)}function v(e){return void 0===e&&(e=i()),/QQBrowser/.test(e)}function m(e){return void 0===e&&(e=i()),!!h(e)&&(!!w(e)||/.+AppleWebKit(?!.*Safari)|.*WKWebView/.test(e))}function y(e){if(void 0===e&&(e=i()),h(e)){var n=r[window.outerHeight];if(!n)return!1;var t=window.innerHeight,o=Math.round(window.screen.width/window.innerWidth*100)/100,a=Math.round(t*o);return o>1&&n.zoomHeight[o]?-1!==n.zoomHeight[o].indexOf(a):-1!==n.textSizeHeights.indexOf(a)}return!1}function g(e){if(void 0===e&&(e=i()),h(e)){var n=y(e),t=r[window.outerHeight];if(!t)return!1;var o=window.innerHeight,a=Math.round(window.screen.width/window.innerWidth*100)/100,u=Math.round(o*a),c=t.maybeSafari,s=!1;return a>1&&c[a]&&-1!==c[a].indexOf(u)&&(s=!0),n||s}return!1}function E(e){return void 0===e&&(e=i()),!!p(e)&&/Version\/[\d.]+/.test(e)&&!l(e)}function P(){return!!window.document.documentMode||Boolean(window.navigator&&window.navigator.userAgent&&/Edge|MSIE|rv:11/i.test(window.navigator.userAgent))}function b(){var e=window.document.querySelector('meta[http-equiv="X-UA-Compatible"]'),n=window.document.querySelector('meta[content="IE=edge"]');return!(!e||!n)}function _(){return!("undefined"==typeof process||!process.versions||!process.versions.electron)}function O(){if(window.document.documentMode)try{var e=window.status;return window.status="testIntranetMode","testIntranetMode"===window.status&&(window.status=e,!0)}catch(e){return!1}return!1}function T(){var e=i();return/Macintosh.*AppleWebKit(?!.*Safari)/i.test(e)}function S(e){return void 0===e&&(e=i()),!(m(e)||E(e)||l(e)||d(e)||f(e)||s(e)||v(e)||_()||T()||c())}function x(e){return void 0===e&&(e=i()),/Chrome|Chromium|CriOS/.test(e)}function I(e){return void 0===e&&(e=i()),/Safari/.test(e)&&!x(e)}function N(){try{if(window.ApplePaySession&&window.ApplePaySession.supportsVersion(3)&&window.ApplePaySession.canMakePayments())return!0}catch(e){return!1}return!1}function R(e,n){return(R=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function C(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,R(e,n)}function k(){return(k=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function j(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&e instanceof window.constructor)return!1;var n={}.toString;if(n){var t=n.call(e);if("[object Window]"===t||"[object global]"===t||"[object DOMWindow]"===t)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}var W,A=[],L=[],D=0;function M(){if(!D&&W){var e=W;W=null,e.resolve()}}function q(){D+=1}function F(){D-=1,M()}var z=function(){function e(e){var n=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=[],e){var t,r,o=!1,i=!1,a=!1;q();try{e((function(e){a?n.resolve(e):(o=!0,t=e)}),(function(e){a?n.reject(e):(i=!0,r=e)}))}catch(e){return F(),void this.reject(e)}F(),a=!0,o?this.resolve(t):i&&this.reject(r)}}var n=e.prototype;return n.resolve=function(e){if(this.resolved||this.rejected)return this;if(j(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},n.reject=function(e){var n=this;if(this.resolved||this.rejected)return this;if(j(e))throw new Error("Can not reject promise with another promise");if(!e){var t=e&&"function"==typeof e.toString?e.toString():{}.toString.call(e);e=new Error("Expected reject to be called with Error, got "+t)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout((function(){n.errorHandled||function(e,n){if(-1===A.indexOf(e)){A.push(e),setTimeout((function(){throw e}),1);for(var t=0;t<L.length;t++)L[t](e,n)}}(e,n)}),1),this.dispatch(),this},n.asyncReject=function(e){return this.errorHandled=!0,this.reject(e),this},n.dispatch=function(){var n=this.resolved,t=this.rejected,r=this.handlers;if(!this.dispatching&&(n||t)){this.dispatching=!0,q();for(var o=function(e,n){return e.then((function(e){n.resolve(e)}),(function(e){n.reject(e)}))},i=0;i<r.length;i++){var a=r[i],u=a.onSuccess,c=a.onError,s=a.promise,d=void 0;if(n)try{d=u?u(this.value):this.value}catch(e){s.reject(e);continue}else if(t){if(!c){s.reject(this.error);continue}try{d=c(this.error)}catch(e){s.reject(e);continue}}d instanceof e&&(d.resolved||d.rejected)?(d.resolved?s.resolve(d.value):s.reject(d.error),d.errorHandled=!0):j(d)?d instanceof e&&(d.resolved||d.rejected)?d.resolved?s.resolve(d.value):s.reject(d.error):o(d,s):s.resolve(d)}r.length=0,this.dispatching=!1,F()}},n.then=function(n,t){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for success handler");if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for error handler");var r=new e;return this.handlers.push({promise:r,onSuccess:n,onError:t}),this.errorHandled=!0,this.dispatch(),r},n.catch=function(e){return this.then(void 0,e)},n.finally=function(n){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.finally expected a function");return this.then((function(t){return e.try(n).then((function(){return t}))}),(function(t){return e.try(n).then((function(){throw t}))}))},n.timeout=function(e,n){var t=this;if(this.resolved||this.rejected)return this;var r=setTimeout((function(){t.resolved||t.rejected||t.reject(n||new Error("Promise timed out after "+e+"ms"))}),e);return this.then((function(e){return clearTimeout(r),e}))},n.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},e.resolve=function(n){return n instanceof e?n:j(n)?new e((function(e,t){return n.then(e,t)})):(new e).resolve(n)},e.reject=function(n){return(new e).reject(n)},e.asyncReject=function(n){return(new e).asyncReject(n)},e.all=function(n){var t=new e,r=n.length,o=[];if(!r)return t.resolve(o),t;for(var i=function(e,n,i){return n.then((function(n){o[e]=n,0==(r-=1)&&t.resolve(o)}),(function(e){i.reject(e)}))},a=0;a<n.length;a++){var u=n[a];if(u instanceof e){if(u.resolved){o[a]=u.value,r-=1;continue}}else if(!j(u)){o[a]=u,r-=1;continue}i(a,e.resolve(u),t)}return 0===r&&t.resolve(o),t},e.hash=function(n){var t={},r=[],o=function(e){if(n.hasOwnProperty(e)){var o=n[e];j(o)?r.push(o.then((function(n){t[e]=n}))):t[e]=o}};for(var i in n)o(i);return e.all(r).then((function(){return t}))},e.map=function(n,t){return e.all(n.map(t))},e.onPossiblyUnhandledException=function(e){return function(e){return L.push(e),{cancel:function(){L.splice(L.indexOf(e),1)}}}(e)},e.try=function(n,t,r){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.try expected a function");var o;q();try{o=n.apply(t,r||[])}catch(n){return F(),e.reject(n)}return F(),e.resolve(o)},e.delay=function(n){return new e((function(e){setTimeout(e,n)}))},e.isPromise=function(n){return!!(n&&n instanceof e)||j(n)},e.flush=function(){return n=W=W||new e,M(),n;var n},e}(),B="Call was rejected by callee.\r\n";function U(e){return void 0===e&&(e=window),"about:"===e.location.protocol}function Y(e){try{return!0}catch(e){}return!1}function H(e){void 0===e&&(e=window);var n=e.location;if(!n)throw new Error("Can not read window location");var t=n.protocol;if(!t)throw new Error("Can not read window protocol");if("file:"===t)return"file://";if("about:"===t){var r=function(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}(e);return r&&Y()?H(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function G(e){void 0===e&&(e=window);var n=H(e);return n&&e.mockDomain&&0===e.mockDomain.indexOf("mock:")?e.mockDomain:n}function V(e){if(!function(e){try{if(e===window)return!0}catch(e){}try{var n=Object.getOwnPropertyDescriptor(e,"location");if(n&&!1===n.enumerable)return!1}catch(e){}try{if(U(e)&&Y())return!0}catch(e){}try{if(H(e)===H(window))return!0}catch(e){}return!1}(e))return!1;try{if(e===window)return!0;if(U(e)&&Y())return!0;if(G(window)===G(e))return!0}catch(e){}return!1}var J=[],$=[];function Z(e,n){void 0===n&&(n=!0);try{if(e===window)return!1}catch(e){return!0}try{if(!e)return!0}catch(e){return!0}try{if(e.closed)return!0}catch(e){return!e||e.message!==B}if(n&&V(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}var t=function(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}(J,e);if(-1!==t){var r=$[t];if(r&&function(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var n=e.ownerDocument;if(n&&n.documentElement&&!n.documentElement.contains(e)){for(var t=e;t.parentNode&&t.parentNode!==t;)t=t.parentNode;if(!t.host||!n.documentElement.contains(t.host))return!0}return!1}(r))return!0}return!1}function X(e){try{if(e===window)return!0}catch(e){if(e&&e.message===B)return!0}try{if("[object Window]"==={}.toString.call(e))return!0}catch(e){if(e&&e.message===B)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===B)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===B)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===B)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===B)return!0}try{if(e&&"__unlikely_value__"===e.__cross_domain_utils_window_check__)return!1}catch(e){return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch(e){}return!1}function K(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}var Q,ee=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("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<n.length;t++){var r=n[t];if(X(r)&&Z(r)){if(e)try{e.delete(r)}catch(e){}n.splice(t,1),this.values.splice(t,1),t-=1}}},n.isSafeToReadWrite=function(e){return!X(e)},n.set=function(e,n){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.set(e,n)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var r=this.name,o=e[r];return void(o&&o[0]===e?o[1]=n:Object.defineProperty(e,r,{value:[e,n],writable:!0}))}catch(e){}this._cleanupClosedWindows();var i=this.keys,a=this.values,u=K(i,e);-1===u?(i.push(e),a.push(n)):a[u]=n},n.get=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return n.get(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return t&&t[0]===e?t[1]:void 0}catch(e){}this._cleanupClosedWindows();var r=K(this.keys,e);if(-1!==r)return this.values[r]},n.delete=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{n.delete(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];t&&t[0]===e&&(t[0]=t[1]=void 0)}catch(e){}this._cleanupClosedWindows();var r=this.keys,o=K(r,e);-1!==o&&(r.splice(o,1),this.values.splice(o,1))},n.has=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return!0}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return!(!t||t[0]!==e)}catch(e){}return this._cleanupClosedWindows(),-1!==K(this.keys,e)},n.getOrSet=function(e,n){if(this.has(e))return this.get(e);var t=n();return this.set(e,t),t},e}();function ne(e){return(ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function te(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function re(e,n,t){return(re=te()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var o=new(Function.bind.apply(e,r));return t&&R(o,t.prototype),o}).apply(null,arguments)}function oe(e){var n="function"==typeof Map?new Map:void 0;return(oe=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return re(e,arguments,ne(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),R(t,e)})(e)}function ie(e){return e.name||e.__name__||e.displayName||"anonymous"}function ae(e,n){try{delete e.name,e.name=n}catch(e){}return e.__name__=e.displayName=n,e}function ue(e){if("function"==typeof btoa)return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,n){return String.fromCharCode(parseInt(n,16))})));if("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64");throw new Error("Can not find window.btoa or Buffer")}function ce(e){if("function"==typeof atob)return decodeURIComponent([].map.call(atob(e),(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")}function se(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,(function(){return e.charAt(Math.floor(Math.random()*e.length))}))+"_"+ue((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function de(){if("undefined"!=typeof window)return window;if("undefined"!=typeof window)return window;if(void 0!==o)return o;throw new Error("No global found")}function fe(e){if(Q=Q||new ee,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");var n=Q.get(e);return n||(n=typeof e+":"+se(),Q.set(e,n)),n}function le(e){try{return JSON.stringify([].slice.call(e),(function(e,n){return"function"==typeof n?"memoize["+fe(n)+"]":n}))}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function pe(){return{}}var he=0,we=0;function ve(e,n){void 0===n&&(n={});var t,r,o=n.thisNamespace,i=void 0!==o&&o,a=n.time,u=he;he+=1;var c=function(){for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];var s;u<we&&(t=null,r=null,u=he,he+=1),s=i?(r=r||new ee).getOrSet(this,pe):t=t||{};var d=le(o),f=s[d];if(f&&a&&Date.now()-f.time<a&&(delete s[d],f=null),f)return f.value;var l=Date.now(),p=e.apply(this,arguments);return s[d]={time:l,value:p},p};return c.reset=function(){t=null,r=null},ae(c,(n.name||ie(e))+"::memoized")}function me(e){return z.resolve(e)}function ye(e){var n={};function t(){for(var t=arguments,r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var u=le(i);return n.hasOwnProperty(u)||(n[u]=z.try((function(){return e.apply(r,t)})).finally((function(){delete n[u]}))),n[u]}return t.reset=function(){n={}},ae(t,ie(e)+"::promiseMemoized")}function ge(e,n){function t(){return z.try(e,this,arguments)}return void 0===n&&(n={}),n.name&&(t.displayName=n.name+":promisified"),ae(t,ie(e)+"::promisified")}function Ee(e,n,t){void 0===t&&(t=[]);var r=e.__inline_memoize_cache__=e.__inline_memoize_cache__||{},o=le(t);return r.hasOwnProperty(o)?r[o]:r[o]=n.apply(void 0,t)}function Pe(){}function be(e){var n=!1;return ae((function(){if(!n)return n=!0,e.apply(this,arguments)}),ie(e)+"::once")}function _e(e){for(var n=0,t=0;t<e.length;t++)n+=e[t].charCodeAt(0)*Math.pow(t%10+1,5);return Math.floor(Math.pow(Math.sqrt(n),5))}function Oe(e){for(var n="",t=0;t<e.length;t++){var r=e[t].charCodeAt(0)*t;e[t+1]&&(r+=e[t+1].charCodeAt(0)*(t-1)),n+=String.fromCharCode(97+Math.abs(r)%26)}return n}function Te(e,n){var t=e.match(n);if(t)return t[1]}function Se(e,n){return new z((function(t){var r=e[n];if(r)return t(r);delete e[n],Object.defineProperty(e,n,{configurable:!0,set:function(e){(r=e)&&t(r)},get:function(){return r}})}))}function xe(e,n){if(void 0===n&&(n=1),n>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";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: "+xe(e,n+1)}}function Ie(e){var n="<unknown error: "+{}.toString.call(e)+">";return e?e instanceof Error?e.message||n:"string"==typeof e.message&&e.message||n:n}function Ne(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function Re(e,n){var t=(e=e.split("://")[1]).indexOf(n);return-1!==t&&e.slice(t)===n}function Ce(e,n,t){var r=e[n];e[n]=function(){var e=arguments,n=this;return t({context:this,args:[].slice.call(arguments),original:r,callOriginal:function(){return r.apply(n,e)}})}}function ke(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}ve.clear=function(){we=he};var je=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},We=ve(je);function Ae(e,n){return Math.round(e*n/100)}function Le(){return Math.min.apply(Math,arguments)}function De(){return Math.max.apply(Math,arguments)}function Me(e,n){var t=e%n;return t?e-t+n:e}function qe(e,n,t){var r=[];return e.replace(n,(function(e){r.push(t?t.apply(null,arguments):e)})),r}function Fe(e){return"data:image/svg+xml;base64,"+ue(e)}function ze(e,n){void 0===n&&(n=Boolean);var t={};for(var r in e)e.hasOwnProperty(r)&&n(e[r],r)&&(t[r]=e[r]);return t}function Be(e){return e}function Ue(e,n){var t=[];return e.replace(n,(function(e){return t.push(e),""})),t}function Ye(e,n){var t,r;return void 0===n&&(n=50),ae((function(){r&&clearTimeout(r);var o=t=t||new z;return r=setTimeout((function(){t=null,r=null,z.try(e).then((function(e){o.resolve(e)}),(function(e){o.reject(e)}))}),n),o}),ie(e)+"::promiseDebounced")}function He(e,n){var t;return function r(){t=setTimeout((function(){e(),r()}),n)}(),{cancel:function(){clearTimeout(t)}}}function Ge(e){return Boolean(e.match(/^[0-9]+$/))}function Ve(e){return Boolean(e.match(/^[0-9]+\.[0-9]+$/))}function Je(e){return e.toString()}function $e(e){return"true"===e||"false"!==e&&(Ge(e)?parseInt(e,10):Ve(e)?parseFloat(e):e)}function Ze(e,n,t){for(var r in void 0===n&&(n=""),void 0===t&&(t={}),n=n?n+".":n,e)e.hasOwnProperty(r)&&null!=e[r]&&"function"!=typeof e[r]&&(e[r]&&Array.isArray(e[r])&&e[r].length&&e[r].every((function(e){return"object"!=typeof e}))?t[""+n+r+"[]"]=e[r].join(","):e[r]&&"object"==typeof e[r]?t=Ze(e[r],""+n+r,t):t[""+n+r]=Je(e[r]));return t}function Xe(e){var n={};for(var t in e)if(e.hasOwnProperty(t)&&"string"==typeof e[t]){var r=e[t];t.match(/^.+\[\]$/)?(t=t.slice(0,-2),r=r.split(",").map($e)):r=$e(r);for(var o=n,i=t.split("."),a=0;a<i.length;a++){var u=i[a],c=a+1===i.length,s=!c&&Ge(i[a+1]);if("constructor"===u||"prototype"===u||"__proto__"===u)throw new Error("Disallowed key: "+u);c?o[u]=r:o=o[u]=o[u]||(s?[]:{})}}return n}function Ke(){var e={},n={};return{on:function(e,t){var r=n[e]=n[e]||[];r.push(t);var o=!1;return{cancel:function(){o||(o=!0,r.splice(r.indexOf(t),1))}}},once:function(e,n){var t=this.on(e,(function(){t.cancel(),n()}));return t},trigger:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];var i=n[e],a=[];if(i)for(var u=function(e){var n=i[e];a.push(z.try((function(){return n.apply(void 0,r)})))},c=0;c<i.length;c++)u(c);return z.all(a).then(Pe)},triggerOnce:function(n){if(e[n])return z.resolve();e[n]=!0;for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];return this.trigger.apply(this,[n].concat(r))},reset:function(){n={}}}}function Qe(e){return e.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))}function en(e){return e.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))}function nn(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function tn(e,n,t){if(!n)return t;for(var r=n.split("."),o=0;o<r.length;o++){if("object"!=typeof e||null===e)return t;e=e[r[o]]}return void 0===e?t:e}function rn(e,n){var t=He((function(){(n-=100)<=0&&(t.cancel(),e())}),100)}function on(e,n,t){if(Array.isArray(e)){if("number"!=typeof n)throw new TypeError("Array key must be number")}else if("object"==typeof e&&null!==e&&"string"!=typeof n)throw new TypeError("Object key must be string");Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get:function(){delete e[n];var r=t();return e[n]=r,r},set:function(t){delete e[n],e[n]=t}})}function an(e){return[].slice.call(e)}function un(e){return"object"==typeof e&&null!==e}function cn(e){return un(e)&&"[object Object]"==={}.toString.call(e)}function sn(e){if(!cn(e))return!1;var n=e.constructor;if("function"!=typeof n)return!1;var t=n.prototype;return!!cn(t)&&!!t.hasOwnProperty("isPrototypeOf")}function dn(e,n,t){if(void 0===t&&(t=""),Array.isArray(e)){for(var r=e.length,o=[],i=function(r){on(o,r,(function(){var o=t?t+"."+r:""+r,i=n(e[r],r,o);return(sn(i)||Array.isArray(i))&&(i=dn(i,n,o)),i}))},a=0;a<r;a++)i(a);return o}if(sn(e)){var u={},c=function(r){if(!e.hasOwnProperty(r))return"continue";on(u,r,(function(){var o=t?t+"."+r:""+r,i=n(e[r],r,o);return(sn(i)||Array.isArray(i))&&(i=dn(i,n,o)),i}))};for(var s in e)c(s);return u}throw new Error("Pass an object or array")}function fn(e,n,t,r){if(e.hasOwnProperty(t)){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o)}else n[t]=r}function ln(e,n,t){void 0===t&&(t=0),"string"==typeof e&&(e=new RegExp(e));var r=n.slice(t).match(e);if(r){var o=r.index,i=r[0];return{text:i,groups:r.slice(1),start:t+o,end:t+o+i.length,length:i.length,replace:function(e){return i?""+i.slice(0,t+o)+e+i.slice(o+i.length):""}}}}function pn(e,n){for(var t=[],r=0;;){var o=ln(e,n,r);if(!o)break;t.push(o),r=Te.end}return t}function hn(e){return null!=e}function wn(e){return z.try(e).then((function(){return wn(e)}))}function vn(e,n){var t;return void 0===n&&(n=100),ae((function(){var r=arguments,o=this;clearTimeout(t),t=setTimeout((function(){return e.apply(o,r)}),n)}),ie(e)+"::debounced")}function mn(e){return"[object RegExp]"==={}.toString.call(e)}var yn=function(e){var n=new ee;return function(t){var r=this;return n.getOrSet(t,(function(){return e.call(r,t)}))}},gn=function(e){var n=new ee;return function(t){var r=this;return n.getOrSet(t,(function(){return e.call(r,t).finally((function(){n.delete(t)}))}))}};function En(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function Pn(e){var n,t=[],r=!1;return{set:function(n,t){return r||(e[n]=t,this.register((function(){delete e[n]}))),t},register:function(e){r?e(n):t.push(be((function(){return e(n)})))},all:function(e){n=e;var o=[];for(r=!0;t.length;){var i=t.shift();o.push(i())}return z.all(o).then(Pe)}}}function bn(e){var n,t;try{n=e()}catch(e){t=e}return{result:n,error:t}}function _n(e,n){var t=e.indexOf(n);-1!==t&&e.splice(t,1)}function On(e,n){if(null==n)throw new Error("Expected "+e+" to be present");return n}function Tn(e){for(var n={},t=0;t<e.length;t++)n[e[t]]=!0;return Object.keys(n)}var Sn=function(e,n){return-1!==We(e).indexOf(n)};function xn(e){var n=[],t={};return function(r){if(-1===n.indexOf(r)){n.push(r);var o=xe(r);if(!t[o])return t[o]=!0,e(r)}}}var In=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 C(n,e),n}(oe(Error)),Nn={ENTER:13,SPACE:32},Rn={UID:"data-uid"};function Cn(){return Boolean(document.body)&&"complete"===document.readyState}function kn(){return Boolean(document.body)&&"interactive"===document.readyState}function jn(e){return encodeURIComponent(e)}function Wn(){return Ee(Wn,(function(){return new z((function(e){Cn()&&e(),window.addEventListener("load",(function(){return e()}))}))}))}var An=ve((function(){return new z((function(e){if(Cn()||kn())return e();var n=setInterval((function(){if(Cn()||kn())return clearInterval(n),e()}),10)}))}));function Ln(){return z.try((function(){return document.body?document.body:An().then((function(){if(document.body)return document.body;throw new Error("Document ready but document.body not present")}))}))}function Dn(e){return Ee(Dn,(function(){var n={};if(!e)return n;if(-1===e.indexOf("="))return n;for(var t=0,r=e.split("&");t<r.length;t++){var o=r[t];(o=o.split("="))[0]&&o[1]&&(n[decodeURIComponent(o[0])]=decodeURIComponent(o[1]))}return n}),[e])}function Mn(e){return Dn(window.location.search.slice(1))[e]}function qn(e){return-1===e.indexOf("#")||0!==e.indexOf("#")&&e.split("#")[0]!==window.location.href.split("#")[0]}function Fn(e){return void 0===e&&(e={}),Object.keys(e).filter((function(n){return"string"==typeof e[n]||"boolean"==typeof e[n]})).map((function(n){var t=e[n];if("string"!=typeof t&&"boolean"!=typeof t)throw new TypeError("Invalid type for query");return jn(n)+"="+jn(t.toString())})).join("&")}function zn(e,n){return void 0===n&&(n={}),n&&Object.keys(n).length?Fn(k({},Dn(e),n)):e}function Bn(e,n){var t,r,o=n.query||{},i=n.hash||{},a=e.split("#");r=a[1];var u=(t=a[0]).split("?");t=u[0];var c=zn(u[1],o),s=zn(r,i);return c&&(t=t+"?"+c),s&&(t=t+"#"+s),t}function Un(e,n){return void 0===n&&(n=window),new z((function(t){n.location=e,qn(e)||t()}))}function Yn(){var e=document.querySelector("meta[name=viewport]");return!(a()&&window.screen.width<660&&!e)}function Hn(e){return Boolean(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function Gn(){return Ee(Gn,(function(){var e=window.performance;if(e&&e.now&&e.timing&&e.timing.connectEnd&&e.timing.navigationStart&&Math.abs(e.now()-Date.now())>1e3&&e.now()-(e.timing.connectEnd-e.timing.navigationStart)>0)return e}))}function Vn(){return Boolean(Gn())}function Jn(){return An().then((function(){var e=Gn();if(e){var n=e.timing;return n.connectEnd&&n.domInteractive?n.domInteractive-n.connectEnd:void 0}}))}function $n(e){return void 0===e&&(e=""),e.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function Zn(){return"undefined"!=typeof window&&void 0!==window.location}function Xn(e,n){return void 0===n&&(n=window.document),[].slice.call(n.querySelectorAll(e))}function Kn(e,n){e.addEventListener("touchstart",Pe),e.addEventListener("click",n),e.addEventListener("keypress",(function(e){if(e.keyCode===Nn.ENTER||e.keyCode===Nn.SPACE)return n(e)}))}function Qn(e){var n=e.host,t=void 0===n?window.location.host:n,r=e.path,o=e.reverse,i=void 0!==o&&o;return Ee(Qn,(function(){var e=""+t+r,n=[].slice.call(document.getElementsByTagName("script"));i&&n.reverse();for(var o=0;o<n.length;o++){var a=n[o];if(a.src&&a.src.replace(/^https?:\/\//,"").split("?")[0]===e)return a}}),[r])}function et(){return Ee(et,(function(){try{if("undefined"==typeof window)return!1;if(window.localStorage){var e=Math.random().toString();window.localStorage.setItem("__test__localStorage__",e);var n=window.localStorage.getItem("__test__localStorage__");if(window.localStorage.removeItem("__test__localStorage__"),e===n)return!0}}catch(e){}return!1}))}function nt(){var e=window.navigator,n=e.languages?[].concat(e.languages):[];return e.language&&n.push(e.language),e.userLanguage&&n.push(e.userLanguage),n.map((function(e){if(e&&e.match(/^[a-z]{2}[-_][A-Z]{2}$/)){var n=e.split(/[-_]/);return{country:n[1],lang:n[0]}}return e&&e.match(/^[a-z]{2}$/)?{lang:e}:null})).filter(Boolean)}function tt(e,n){e.appendChild(n)}function rt(e){return e instanceof window.Element||null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument}function ot(e,n){return void 0===n&&(n=document),rt(e)?e:"string"==typeof e?n.querySelector(e):void 0}function it(e,n){void 0===n&&(n=document);var t=ot(e,n);if(t)return t;throw new Error("Can not find element: "+Ne(e))}function at(e){return new z((function(n,t){var r=Ne(e),o=ot(e);if(o)return n(o);if(Cn())return t(new Error("Document is ready and element "+r+" does not exist"));var i=setInterval((function(){return(o=ot(e))?(clearInterval(i),n(o)):Cn()?(clearInterval(i),t(new Error("Document is ready and element "+r+" does not exist"))):void 0}),10)}))}var ut,ct=function(e){function n(){return e.apply(this,arguments)||this}return C(n,e),n}(In);function st(e,n){var t=(n=n||{}).width,r=n.height,o=0,i=0;t&&(window.outerWidth?i=Math.round((window.outerWidth-t)/2)+window.screenX:window.screen.width&&(i=Math.round((window.screen.width-t)/2))),r&&(window.outerHeight?o=Math.round((window.outerHeight-r)/2)+window.screenY:window.screen.height&&(o=Math.round((window.screen.height-r)/2))),t&&r&&(n=k({top:o,left:i,width:t,height:r,status:1,toolbar:0,menubar:0,resizable:1,scrollbars:1},n));var a=n.name||"";delete n.name;var u,c=Object.keys(n).map((function(e){if(null!=n[e])return e+"="+Ne(n[e])})).filter(Boolean).join(",");try{u=window.open(e,a,c)}catch(e){throw new ct("Can not open popup window - "+(e.stack||e.message))}if(Z(u))throw new ct("Can not open popup window - blocked");return window.addEventListener("unload",(function(){return u.close()})),u}function dt(e,n){try{e.document.open(),e.document.write(n),e.document.close()}catch(t){try{e.location="javascript: document.open(); document.write("+JSON.stringify(n)+"); document.close();"}catch(e){}}}function ft(e,n){var t=n.tagName.toLowerCase();if("html"!==t)throw new Error("Expected element to be html, got "+t);for(var r=e.document.documentElement,o=0,i=an(r.children);o<i.length;o++)r.removeChild(i[o]);for(var a=0,u=an(n.children);a<u.length;a++)r.appendChild(u[a])}function lt(e,n,t){void 0===t&&(t=window.document),e.styleSheet?e.styleSheet.cssText=n:e.appendChild(t.createTextNode(n))}function pt(e){if((ut=ut||new ee).has(e)){var n=ut.get(e);if(n)return n}var t=new z((function(n,t){e.addEventListener("load",(function(){!function(e){if(function(){for(var e=0;e<J.length;e++){var n=!1;try{n=J[e].closed}catch(e){}n&&($.splice(e,1),J.splice(e,1))}}(),e&&e.contentWindow)try{J.push(e.contentWindow),$.push(e)}catch(e){}}(e),n(e)})),e.addEventListener("error",(function(r){e.contentWindow?n(e):t(r)}))}));return ut.set(e,t),t}function ht(e){return pt(e).then((function(e){if(!e.contentWindow)throw new Error("Could not find window in iframe");return e.contentWindow}))}function wt(e,n,t){void 0===e&&(e="div"),void 0===n&&(n={}),e=e.toLowerCase();var r=document.createElement(e);if(n.style&&ke(r.style,n.style),n.class&&(r.className=n.class.join(" ")),n.id&&r.setAttribute("id",n.id),n.attributes)for(var o=0,i=Object.keys(n.attributes);o<i.length;o++){var a=i[o];r.setAttribute(a,n.attributes[a])}if(n.styleSheet&<(r,n.styleSheet),t&&tt(t,r),n.html)if("iframe"===e){if(!t||!r.contentWindow)throw new Error("Iframe html can not be written unless container provided and iframe in DOM");dt(r.contentWindow,n.html)}else r.innerHTML=n.html;return r}function vt(e,n){void 0===e&&(e={});var t=e.style||{},r=wt("iframe",{attributes:k({allowTransparency:"true"},e.attributes||{}),style:k({backgroundColor:"transparent",border:"none"},t),html:e.html,class:e.class}),o=window.navigator.userAgent.match(/MSIE|Edge/i);return r.hasAttribute("id")||r.setAttribute("id",se()),pt(r),n&&it(n).appendChild(r),(e.url||o)&&r.setAttribute("src",e.url||"about:blank"),r}function mt(e,n,t){return e.addEventListener(n,t),{cancel:function(){e.removeEventListener(n,t)}}}function yt(e,n,t){t=be(t);for(var r=0;r<n.length;r++)e.addEventListener(n[r],t);return{cancel:be((function(){for(var r=0;r<n.length;r++)e.removeEventListener(n[r],t)}))}}var gt=["webkit","moz","ms","o"];function Et(e,n,t){e.style[n]=t;for(var r=nn(n),o=0;o<gt.length;o++)e.style[""+gt[o]+r]=t}var Pt=["animationstart","webkitAnimationStart","oAnimationStart","MSAnimationStart"],bt=["animationend","webkitAnimationEnd","oAnimationEnd","MSAnimationEnd"];function _t(e,n,t,r){return void 0===r&&(r=1e3),new z((function(o,i){var a=it(e);if(!a)return o();var u,c,s,d,f=!1;function l(){clearTimeout(u),clearTimeout(c),s.cancel(),d.cancel()}s=yt(a,Pt,(function(e){e.target===a&&e.animationName===n&&(clearTimeout(u),e.stopPropagation(),s.cancel(),f=!0,c=setTimeout((function(){l(),o()}),r))})),d=yt(a,bt,(function(e){if(e.target===a&&e.animationName===n)return l(),"string"==typeof e.animationName&&e.animationName!==n?i("Expected animation name to be "+n+", found "+e.animationName):o()})),Et(a,"animationName",n),u=setTimeout((function(){if(!f)return l(),o()}),200),t&&t(l)}))}function Ot(e){e.style.setProperty("visibility","")}function Tt(e){e.style.setProperty("visibility","hidden","important")}function St(e){e.style.setProperty("display","")}function xt(e){e.style.setProperty("display","none","important")}function It(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Nt(e,n,t){var r=_t(e,n,t);return St(e),r}function Rt(e,n,t){return _t(e,n,t).then((function(){xt(e)}))}function Ct(e,n){e.classList.add(n)}function kt(e,n){e.classList.remove(n)}function jt(e){return!(e&&e.parentNode&&e.ownerDocument&&e.ownerDocument.documentElement&&e.ownerDocument.documentElement.contains(e))}function Wt(e,n){n=be(n);var t,r,o,i=!1,a=[],u=function(){i=!0;for(var e=0;e<a.length;e++)a[e].disconnect();t&&t.cancel(),o&&o.removeEventListener("unload",c),r&&It(r)},c=function(){i||(n(),u())};if(jt(e))return c(),{cancel:u};if(window.MutationObserver)for(var s=e.parentElement;s;){var d=new window.MutationObserver((function(){jt(e)&&c()}));d.observe(s,{childList:!0}),a.push(d),s=s.parentElement}return(r=document.createElement("iframe")).setAttribute("name","__detect_close_"+se()+"__"),r.style.display="none",ht(r).then((function(e){(o=function(e){if(!V(e))throw new Error("Expected window to be same domain");return e}(e)).addEventListener("unload",c)})),e.appendChild(r),t=He((function(){jt(e)&&c()}),1e3),{cancel:u}}function At(e,n){void 0===n&&(n=window.document);for(var t=0,r=Xn("script",e);t<r.length;t++){var o=r[t],i=o.parentNode;if(i){var a=n.createElement("script");a.text=o.textContent,i.replaceChild(a,o)}}}function Lt(e,n,t){var r=void 0===t?{}:t,o=r.width,i=void 0===o||o,a=r.height,u=void 0===a||a,c=r.interval,s=void 0===c?100:c,d=r.win,f=void 0===d?window:d,l=e.offsetWidth,p=e.offsetHeight,h=!1;n({width:l,height:p});var w,v,m=function(){if(!h&&Hn(e)){var t=e.offsetWidth,r=e.offsetHeight;(i&&t!==l||u&&r!==p)&&n({width:t,height:r}),l=t,p=r}};return f.addEventListener("resize",m),void 0!==f.ResizeObserver?((w=new f.ResizeObserver(m)).observe(e),v=He(m,10*s)):void 0!==f.MutationObserver?((w=new f.MutationObserver(m)).observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!1}),v=He(m,10*s)):v=He(m,s),{cancel:function(){h=!0,w.disconnect(),window.removeEventListener("resize",m),v.cancel()}}}function Dt(e){var n=Gn();if(n&&"function"==typeof n.getEntries)for(var t=n.getEntries(),r=0;r<t.length;r++){var o=t[r];if(o&&o.name&&0===o.name.indexOf(e)&&"number"==typeof o.duration)return Math.floor(o.duration)}}function Mt(e){for(;e.parentNode;)e=e.parentNode;return"[object ShadowRoot]"===e.toString()}function qt(e){for(;e.parentNode;)e=e.parentNode;if(Mt(e))return e}function Ft(e){var n=qt(e);if(n.host)return n.host}function zt(e){var n=Ft(e);if(!n)throw new Error("Element is not in shadow dom");if(Mt(n))throw new Error("Host element is also in shadow dom");var t="shadow-slot-"+se(),r=document.createElement("slot");r.setAttribute("name",t),e.appendChild(r);var o=document.createElement("div");return o.setAttribute("slot",t),n.appendChild(o),o}function Bt(e){var n=function n(t){return e.removeEventListener("focus",n),t.preventDefault(),e.blur(),!1};e.addEventListener("mousedown",(function(){e.addEventListener("focus",n),setTimeout((function(){e.removeEventListener("focus",n)}),1)}))}function Ut(){try{throw new Error("_")}catch(e){return e.stack||""}}var Yt="undefined"!=typeof document?document.currentScript:null,Ht=ve((function(){if(Yt)return Yt;if(Yt=function(){try{var e=Ut(),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(e){}}())return Yt;throw new Error("Can not determine current script")})),Gt=se(),Vt=ve((function(){var e;try{e=Ht()}catch(e){return Gt}var n=e.getAttribute(Rn.UID);return n&&"string"==typeof n||(n=e.getAttribute(Rn.UID+"-auto"))&&"string"==typeof n||(n=se(),e.setAttribute(Rn.UID+"-auto",n)),n}));function Jt(e){var n=e.name,t=e.lifetime,r=void 0===t?12e5:t;return Ee(Jt,(function(){var e,t="__"+n+"_storage__",o=se();function i(n){var r,i=et();if(e&&(r=e),!r&&i){var a=window.localStorage.getItem(t);a&&(r=JSON.parse(a))}r||(r=de()[t]),r||(r={id:o}),r.id||(r.id=o),e=r;var u=n(r);return i?window.localStorage.setItem(t,JSON.stringify(r)):de()[t]=r,e=null,u}function a(){return i((function(e){return e.id}))}function u(e){return i((function(n){var t=n.__session__,o=Date.now();return t&&o-t.created>r&&(t=null),t||(t={guid:se(),created:o}),n.__session__=t,e(t)}))}return{getState:i,getID:a,isStateFresh:function(){return a()===o},getSessionState:function(e){return u((function(n){return n.state=n.state||{},e(n.state)}))},getSessionID:function(){return u((function(e){return e.guid}))}}}),[{name:n,lifetime:r}])}function $t(){return Jt({name:"belter_experiment"})}function Zt(e){return $t().getSessionState((function(n){return n.loggedBeacons=n.loggedBeacons||[],-1===n.loggedBeacons.indexOf(e)&&(n.loggedBeacons.push(e),!0)}))}function Xt(e){return Math.floor(Math.random()*e)}function Kt(e){var n,t=e.name,r=e.sample,o=void 0===r?50:r,i=e.logTreatment,a=void 0===i?Pe:i,u=e.logCheckpoint,c=void 0===u?Pe:u,s=e.sticky,d=void 0===s||s?function(e){return $t().getState((function(n){return n.throttlePercentiles=n.throttlePercentiles||{},n.throttlePercentiles[e]=n.throttlePercentiles[e]||Xt(100),n.throttlePercentiles[e]}))}(t):Xt(100),f=t+"_"+(n=d<o?"test":o>=50||o<=d&&d<2*o?"control":"throttle"),l=!1,p=!1;try{window.localStorage&&window.localStorage.getItem(t)&&(p=!0)}catch(e){}return{isEnabled:function(){return"test"===n||p},isDisabled:function(){return"test"!==n&&!p},getTreatment:function(){return f},log:function(e,n){return void 0===n&&(n={}),l?(Zt(f+"_"+JSON.stringify(n))&&a({name:t,treatment:f,payload:n,throttle:d}),Zt(f+"_"+e+"_"+JSON.stringify(n))&&c({name:t,treatment:f,checkpoint:e,payload:n,throttle:d}),this):this},logStart:function(e){return void 0===e&&(e={}),l=!0,this.log("start",e)},logComplete:function(e){return void 0===e&&(e={}),this.log("complete",e)}}}function Qt(e){var n=e.name,t=e.version,r=void 0===t?"latest":t,o=de(),i="__"+n+"__"+r+"_global__",a=o[i]=o[i]||{};return{get:function(e,n){return n=n||{},a[e]=a[e]||n}}}var er=[];function nr(e){var n=e.url,t=e.method,r=void 0===t?"get":t,o=e.headers,i=void 0===o?{}:o,a=e.json,u=e.data,c=e.body,s=e.win,d=void 0===s?window:s,f=e.timeout,l=void 0===f?0:f;return new z((function(e,t){if(a&&u||a&&c||u&&a)throw new Error("Only options.json or options.data or options.body should be passed");for(var o={},s=0,f=Object.keys(i);s<f.length;s++){var p=f[s];o[p.toLowerCase()]=i[p]}a?o["content-type"]=o["content-type"]||"application/json":(u||c)&&(o["content-type"]=o["content-type"]||"application/x-www-form-urlencoded; charset=utf-8"),o.accept=o.accept||"application/json";for(var h=0;h<er.length;h++)for(var w=(0,er[h])(),v=0,m=Object.keys(w);v<m.length;v++){var y=m[v];o[y.toLowerCase()]=w[y]}var g=new d.XMLHttpRequest;for(var E in g.addEventListener("load",(function(){var o=function(e){void 0===e&&(e="");for(var n={},t=0,r=e.trim().split("\n");t<r.length;t++){var o=r[t].split(":"),i=o[0],a=o.slice(1);n[i.toLowerCase()]=a.join(":").trim()}return n}(this.getAllResponseHeaders());if(!this.status)return t(new Error("Request to "+r.toLowerCase()+" "+n+" failed: no response status code."));var i=o["content-type"],a=i&&(0===i.indexOf("application/json")||0===i.indexOf("text/json")),u=this.responseText;try{u=JSON.parse(u)}catch(e){if(a)return t(new Error("Invalid json: "+this.responseText+"."))}return e({status:this.status,headers:o,body:u})}),!1),g.addEventListener("error",(function(e){t(new Error("Request to "+r.toLowerCase()+" "+n+" failed: "+e.toString()+"."))}),!1),g.open(r,n,!0),o)o.hasOwnProperty(E)&&g.setRequestHeader(E,o[E]);a?c=JSON.stringify(a):u&&(c=Object.keys(u).map((function(e){return encodeURIComponent(e)+"="+(u?encodeURIComponent(u[e]):"")})).join("&")),g.timeout=l,g.ontimeout=function(){t(new Error("Request to "+r.toLowerCase()+" "+n+" has timed out"))},g.send(c)}))}function tr(e){er.push(e)}var rr=!0;function or(e,n,t){t.value=ve(t.value,{name:n,thisNamespace:!0})}function ir(e,n,t){t.value=ge(t.value,{name:n})}function ar(e){return"string"==typeof e&&/^[0-9]+%$/.test(e)}function ur(e){return"string"==typeof e&&/^[0-9]+px$/.test(e)}function cr(e){if("number"==typeof e)return e;var n=e.match(/^([0-9]+)(px|%)$/);if(!n)throw new Error("Could not match css value from "+e);return parseInt(n[1],10)}function sr(e){return cr(e)+"px"}function dr(e){return"number"==typeof e?sr(e):ar(e)?e:sr(e)}function fr(e,n){return parseInt(e*cr(n)/100,10)}function lr(e,n){if("number"==typeof e)return e;if(ar(e))return fr(n,e);if(ur(e))return cr(e);throw new Error("Can not normalize dimension: "+e)}function pr(e,n){var t=(void 0===n?{}:n).timeout,r=[],o=[],i=setTimeout((function(){r.length&&o.push(z.asyncReject(new Error("Expected "+r[0]+" to be called")))}),void 0===t?5e3:t),a=function(e,n){return void 0===n&&(n=Pe),r.push(e),function(){for(var t=this,i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];_n(r,e);var c=bn((function(){var e;return(e=n).call.apply(e,[t].concat(a))})),s=c.result,d=c.error;if(d)throw o.push(z.asyncReject(d)),d;return o.push(z.resolve(s)),s}},u=function(e,n){return void 0===n&&(n=Pe),function(){var t;o.push(z.asyncReject(new Error("Expected "+e+" to not be called")));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(t=n).call.apply(t,[this].concat(i))}},c=function(e,n){return void 0===n&&(n=Pe),r.push(e),function(){for(var t=this,i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];_n(r,e);var c=bn((function(){var e;return(e=n).call.apply(e,[t].concat(a))})),s=c.result,d=c.error;if(d)throw d;return o.push(z.resolve(s).then((function(){throw new Error("Expected "+e+" to throw an error")}),Pe)),s}},s=function e(){return z.try((function(){if(o.length)return o.pop()})).then((function(){return o.length?e():r.length?z.delay(10).then(e):void 0}))};return o.push(z.try((function(){return e({expect:a,avoid:u,expectError:c,error:u,wait:s})}))),s().then((function(){clearTimeout(i)}))}}])},e.exports=t()})),D=i(L),M=u(Object.assign({__proto__:null,default:D,__moduleExports:L},D));function q(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,a=e.event,u=e.dimensions,s=u.width,d=u.height;if(t&&r){var f=o.createElement("div");f.setAttribute("id",n);var l=o.createElement("style");return i.cspNonce&&l.setAttribute("nonce",i.cspNonce),l.appendChild(o.createTextNode("\n #"+n+" {\n display: block;\n position: relative;\n width: "+s+";\n height: "+d+";\n }\n #"+n+" > iframe {\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: all .2s ease-in-out;\n }\n #"+n+" > iframe."+c.INVISIBLE+" {\n opacity: 0;\n }\n #"+n+" > iframe."+c.VISIBLE+" {\n opacity: 1;\n }\n ")),t.allowPaymentRequest="true",f.appendChild(t),f.appendChild(r),f.appendChild(l),r.classList.add(c.VISIBLE),t.classList.add(c.INVISIBLE),a.on(A.EVENT.RENDERED,(function(){r.classList.remove(c.VISIBLE),r.classList.add(c.INVISIBLE),t.classList.remove(c.INVISIBLE),t.classList.add(c.VISIBLE),setTimeout((function(){M.destroyElement(r)}),1)})),a.on(A.EVENT.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=M.toCSS(n)),"number"==typeof t&&(f.style.height=M.toCSS(t))})),f}}!function(e){e.VISIBLE="is-visible",e.INVISIBLE="is-invisible"}(c||(c={}));var F,z=function(e){var n,t,r,o,i,a;if(null!=(n=e.state)&&n.__createToken)return e.state.__createToken;if(null!=(t=e.parent)&&null!=(r=t.state)&&r.__createToken)return e.parent.state.__createToken;if(null!=(o=e.state)&&null!=(i=o.parent)&&null!=(a=i.state)&&a.__createToken)return e.state.parent.state.__createToken;throw new Error("Index is not registered")},B=function(){var e=n(s.mark((function e(n,t){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z(n)(t);case 2:return e.abrupt("return",e.sent.data);case 5:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),U=A.create({tag:"monei-card-input",url:E.cardInputUrl,dimensions:{width:"100%",height:"auto"},autoResize:{width:!1,height:!0},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1,alias:"orderId"},paymentId:{type:A.PROP_TYPE.STRING,required:!1},onBlur:{type:A.PROP_TYPE.FUNCTION,required:!1},onEnter:{type:A.PROP_TYPE.FUNCTION,required:!1},onChange:{type:A.PROP_TYPE.FUNCTION,required:!1},onFocus:{type:A.PROP_TYPE.FUNCTION,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},placeholders:{type:A.PROP_TYPE.OBJECT,required:!1},errorMessages:{type:A.PROP_TYPE.OBJECT,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}}},validate:m,containerTemplate:function(e){return e.state.__createToken=function(n){if(void 0===n&&(n={}),!e.frame)throw new Error("CardInput instance is not registered");return W.send(e.frame.contentWindow,"CREATE_TOKEN",n,{domain:E.domain})},q(e)},prerenderTemplate:function(e){var n=e.doc,t=e.props,r=n.createElement("html"),o=n.createElement("body");o.style.margin="0";var i=n.createElement("div");i.style.height="36px",i.style.boxSizing="border-box";var a=t.style||t.innerStyle;return null!=a&&a.base&&Object.assign(i.style,d(a.base)),null!=a&&a.loading&&Object.assign(i.style,d(a.loading)),o.appendChild(i),r.appendChild(o),r}}),Y=A.create({tag:"monei-payment-modal",url:E.paymentModalUrl,dimensions:{width:"100%",height:"100%"},autoResize:{width:!1,height:!1},containerTemplate:q,prerenderTemplate:function(){},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!0},isOpen:{type:A.PROP_TYPE.BOOLEAN,required:!0},language:{type:A.PROP_TYPE.STRING,required:!1},generatePaymentToken:{type:A.PROP_TYPE.BOOLEAN,required:!1},fullscreen:{type:A.PROP_TYPE.BOOLEAN,required:!1},customer:{type:A.PROP_TYPE.OBJECT,required:!1},paymentMethod:{type:A.PROP_TYPE.OBJECT,required:!1},allowedPaymentMethods:{type:A.PROP_TYPE.ARRAY,required:!1},customDomain:{type:A.PROP_TYPE.STRING,required:!1},billingDetails:{type:A.PROP_TYPE.OBJECT,required:!1},shippingDetails:{type:A.PROP_TYPE.OBJECT,required:!1},onResult:{type:A.PROP_TYPE.FUNCTION,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1}}}),H=function(){var e=n(s.mark((function e(r){var o,i;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=document.createElement("div"),i=document.body.style.overflow,document.body.appendChild(o),e.abrupt("return",new Promise(function(){var e=n(s.mark((function e(n,a){var u;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=new Y(t({},r,{isOpen:!0,onOpen:function(){Object.assign(document.body.style,{overflow:"hidden"}),Object.assign(o.style,{position:"fixed",overflow:"hidden",display:"block",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%",zIndex:99999})},onResult:function(e){n(e),Object.assign(document.body.style,{overflow:i}),document.body.removeChild(o)},onError:function(e){a(e),Object.assign(document.body.style,{overflow:i}),document.body.removeChild(o)}})),e.next=3,u.render(o);case 3:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}()));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),G=function(){var e=n(s.mark((function e(r,o,i){var a,u;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f(i,r.cspNonce,{namespace:"monei-paypal",cspNonce:r.cspNonce},!0);case 2:return a={layout:"horizontal",tagline:!1},null==r.onLoad||r.onLoad(!0),e.next=6,window["monei-paypal"].Buttons({createOrder:function(){var e=n(s.mark((function e(){var n,t;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,O({paymentId:r.paymentId,accountId:r.accountId,sessionId:r.sessionId,amount:r.amount,currency:r.currency,paymentMethod:{paypal:{}}});case 3:return u=(t=e.sent).paymentToken,e.abrupt("return",null==(n=t.paypal)?void 0:n.orderId);case 8:return e.prev=8,e.t0=e.catch(0),null==r.onError||r.onError(e.t0),e.abrupt("return");case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),onApprove:function(e){e.orderID?r.onSubmit({token:u}):null==r.onError||r.onError(e)},onClick:function(e,n){var t=!0;if(r.onBeforeOpen&&(t=r.onBeforeOpen()),!t)return n.reject()},style:t({},a,r.style)}).render(o.__container);case 6:case"end":return e.stop()}}),e)})));return function(n,t,r){return e.apply(this,arguments)}}(),V=A.create({tag:"monei-paypal",url:E.paypalUrl,dimensions:{width:"100%",height:"0"},autoResize:{width:!1,height:!1},prerenderTemplate:function(){},containerTemplate:function(e){if(e.state.__container=e.container,!e.props.accountId&&!e.props.paymentId)throw new Error("You need to provide paymentId or accountId");var n=q(e);return e.event.on(A.EVENT.DESTROY,(function(){window["monei-paypal"].Buttons.instances.forEach((function(e){e.close()}))})),n},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},transactionType:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},cspNonce:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__onLoadPayPal:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return G.bind(null,e.props,e.state)}}}});!function(e){e.BEFORE_CLOSE="BEFORE_CLOSE"}(F||(F={}));var J,$=A.create({tag:"monei-bizum",url:E.bizumUrl,dimensions:{width:"100%",height:"100%"},autoResize:{width:!1,height:!1},prerenderTemplate:function(){},containerTemplate:function(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,a=e.event,u=e.dimensions,s=u.width,d=u.height;if(t&&r){var f=o.createElement("div");if(i.isHidden)return f.setAttribute("id",n),f.style.display="none",f.appendChild(t),f.appendChild(r),f;var l=o.createElement("div");f.setAttribute("id",n),l.classList.add("backdrop"),f.appendChild(l);var p=o.createElement("style");return i.cspNonce&&p.setAttribute("nonce",i.cspNonce),p.appendChild(o.createTextNode("\n #"+n+" {\n position: fixed;\n overflow: hidden;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: "+s+";\n height: "+d+";\n z-index: 99999;\n }\n #"+n+" > .backdrop {\n position: fixed;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(40, 40, 40, 0.7);\n transition: opacity 0.35s ease-in-out;\n opacity: 0;\n will-change: opacity;\n }\n #"+n+" > .backdrop."+c.VISIBLE+" {\n opacity: 1;\n }\n #"+n+" > iframe {\n display: inline-block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: all .2s ease-in-out;\n }\n #"+n+" > iframe."+c.INVISIBLE+" {\n opacity: 0;\n }\n #"+n+" > iframe."+c.VISIBLE+" {\n opacity: 1;\n }\n ")),f.appendChild(t),f.appendChild(r),f.appendChild(p),r.classList.add(c.VISIBLE),t.classList.add(c.INVISIBLE),setTimeout((function(){l.classList.add(c.VISIBLE)}),1),a.on(A.EVENT.RENDERED,(function(){r.classList.remove(c.VISIBLE),r.classList.add(c.INVISIBLE),t.classList.remove(c.INVISIBLE),t.classList.add(c.VISIBLE),setTimeout((function(){M.destroyElement(r)}),1)})),a.on(F.BEFORE_CLOSE,(function(){l.classList.remove(c.VISIBLE)})),a.on(A.EVENT.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=M.toCSS(n)),"number"==typeof t&&(f.style.height=M.toCSS(t))})),f}},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},transactionType:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},phoneNumber:{type:A.PROP_TYPE.STRING,required:!1},isHidden:{type:A.PROP_TYPE.BOOLEAN,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeClose:{type:A.PROP_TYPE.FUNCTION,required:!1,default:function(e){var n=e.event;return function(){n.trigger(F.BEFORE_CLOSE)}}}},exports:{setPhoneNumber:{type:"function"},getPhoneNumber:{type:"function"}}}),Z=A.create({tag:"monei-bizum-button",url:E.bizumButtonUrl,dimensions:{width:"100%",height:"45px"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:q,prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},transactionType:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},phoneNumber:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){var n=e.props,r=e.state,o=document.createElement("div");return document.body.appendChild(o),function(e){var i=e.amount,a=e.currency;if(!r.isOpen){var u=!0;if(n.onBeforeOpen&&(u=n.onBeforeOpen()),u){r.isOpen=!0;var c=new $(t({amount:i,currency:a},n,{onClose:function(){r.isOpen=!1,window.onpopstate=null,document.body.style.overflow=""},isOpen:!0}));return window.history.pushState(null,"",window.location.href),window.onpopstate=function(){return c.updateProps({isOpen:!1})},Object.assign(document.body.style,{overflow:"hidden"}),c.render(o)}}}}}}});(J||(J={})).BEFORE_CLOSE="BEFORE_CLOSE";var X,K=A.create({tag:"monei-cofidis",url:E.cofidisUrl,dimensions:{width:"100%",height:"100%"},autoResize:{width:!1,height:!1},prerenderTemplate:function(){},containerTemplate:function(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,a=e.event,u=e.dimensions,s=u.width,d=u.height;if(t&&r){var f=o.createElement("div"),l=o.createElement("div");f.setAttribute("id",n),l.classList.add("backdrop"),f.appendChild(l);var p=o.createElement("style");return i.cspNonce&&p.setAttribute("nonce",i.cspNonce),p.appendChild(o.createTextNode("\n #"+n+" {\n position: fixed;\n overflow: hidden;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: "+s+";\n height: "+d+";\n z-index: 99999;\n }\n #"+n+" > .backdrop {\n position: fixed;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(40, 40, 40, 0.7);\n transition: opacity 0.35s ease-in-out;\n opacity: 0;\n will-change: opacity;\n }\n #"+n+" > .backdrop."+c.VISIBLE+" {\n opacity: 1;\n }\n #"+n+" > iframe {\n display: inline-block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: all .2s ease-in-out;\n }\n #"+n+" > iframe."+c.INVISIBLE+" {\n opacity: 0;\n }\n #"+n+" > iframe."+c.VISIBLE+" {\n opacity: 1;\n }\n ")),f.appendChild(t),f.appendChild(r),f.appendChild(p),r.classList.add(c.VISIBLE),t.classList.add(c.INVISIBLE),setTimeout((function(){l.classList.add(c.VISIBLE)}),1),a.on(A.EVENT.RENDERED,(function(){r.classList.remove(c.VISIBLE),r.classList.add(c.INVISIBLE),t.classList.remove(c.INVISIBLE),t.classList.add(c.VISIBLE),setTimeout((function(){M.destroyElement(r)}),1)})),a.on(J.BEFORE_CLOSE,(function(){l.classList.remove(c.VISIBLE)})),a.on(A.EVENT.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=M.toCSS(n)),"number"==typeof t&&(f.style.height=M.toCSS(t))})),f}},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeClose:{type:A.PROP_TYPE.FUNCTION,required:!1,default:function(e){var n=e.event;return function(){n.trigger(J.BEFORE_CLOSE)}}}}}),Q=A.create({tag:"monei-cofidis-widget",url:E.cofidisWidgetUrl,dimensions:{width:"100%",height:"46px"},autoResize:{width:!1,height:!0},prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!0},amount:{type:A.PROP_TYPE.NUMBER,required:!1},amountInt:{type:A.PROP_TYPE.NUMBER,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1,default:function(){return"es"}},showLogo:{type:A.PROP_TYPE.BOOLEAN,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(){return function(e){window.open(e,"_blank")}}}}}),ee=A.create({tag:"monei-cofidis-button",url:E.cofidisButtonUrl,dimensions:{width:"100%",height:"45px"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:q,prerenderTemplate:function(){},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},hint:{type:A.PROP_TYPE.BOOLEAN,default:function(){return!0},required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__onHintClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(){return function(e){window.open(e,"_blank")}}},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){var n=e.props,r=document.createElement("div");return document.body.appendChild(r),function(e){var o=e.amount,i=e.currency,a=e.accountId,u=!0;if(n.onBeforeOpen&&(u=n.onBeforeOpen()),u){var c=new K(t({},n,{amount:o,currency:i,accountId:a,onClose:function(){window.onpopstate=null,document.body.style.overflow=""},isOpen:!0}));return window.history.pushState(null,"",window.location.href),window.onpopstate=function(){return c.updateProps({isOpen:!1})},Object.assign(document.body.style,{overflow:"hidden"}),c.render(r)}}}}}});(X||(X={})).BEFORE_CLOSE="BEFORE_CLOSE";var ne,te,re,oe=A.create({tag:"monei-cofidis-loan",url:E.cofidisLoanUrl,dimensions:{width:"100%",height:"100%"},autoResize:{width:!1,height:!1},prerenderTemplate:function(){},containerTemplate:function(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,a=e.event,u=e.dimensions,s=u.width,d=u.height;if(t&&r){var f=o.createElement("div"),l=o.createElement("div");f.setAttribute("id",n),l.classList.add("backdrop"),f.appendChild(l);var p=o.createElement("style");return i.cspNonce&&p.setAttribute("nonce",i.cspNonce),p.appendChild(o.createTextNode("\n #"+n+" {\n position: fixed;\n overflow: hidden;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: "+s+";\n height: "+d+";\n z-index: 99999;\n }\n #"+n+" > .backdrop {\n position: fixed;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(40, 40, 40, 0.7);\n transition: opacity 0.35s ease-in-out;\n opacity: 0;\n will-change: opacity;\n }\n #"+n+" > .backdrop."+c.VISIBLE+" {\n opacity: 1;\n }\n #"+n+" > iframe {\n display: inline-block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: all .2s ease-in-out;\n }\n #"+n+" > iframe."+c.INVISIBLE+" {\n opacity: 0;\n }\n #"+n+" > iframe."+c.VISIBLE+" {\n opacity: 1;\n }\n ")),f.appendChild(t),f.appendChild(r),f.appendChild(p),r.classList.add(c.VISIBLE),t.classList.add(c.INVISIBLE),setTimeout((function(){l.classList.add(c.VISIBLE)}),1),a.on(A.EVENT.RENDERED,(function(){r.classList.remove(c.VISIBLE),r.classList.add(c.INVISIBLE),t.classList.remove(c.INVISIBLE),t.classList.add(c.VISIBLE),setTimeout((function(){M.destroyElement(r)}),1)})),a.on(X.BEFORE_CLOSE,(function(){l.classList.remove(c.VISIBLE)})),a.on(A.EVENT.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=M.toCSS(n)),"number"==typeof t&&(f.style.height=M.toCSS(t))})),f}},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeClose:{type:A.PROP_TYPE.FUNCTION,required:!1,default:function(e){var n=e.event;return function(){n.trigger(X.BEFORE_CLOSE)}}}}}),ie=oe,ae=A.create({tag:"monei-cofidis-loan-widget",url:E.cofidisLoanWidgetUrl,dimensions:{width:"100%",height:"46px"},autoResize:{width:!1,height:!0},prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!0},amount:{type:A.PROP_TYPE.NUMBER,required:!1},amountInt:{type:A.PROP_TYPE.NUMBER,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1,default:function(){return"es"}},showLogo:{type:A.PROP_TYPE.BOOLEAN,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(){return function(e){window.open(e,"_blank")}}}}}),ue=ae,ce=A.create({tag:"monei-cofidis-loan-button",url:E.cofidisLoanButtonUrl,dimensions:{width:"100%",height:"45px"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:q,prerenderTemplate:function(){},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},hint:{type:A.PROP_TYPE.BOOLEAN,default:function(){return!0},required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__onHintClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(){return function(e){window.open(e,"_blank")}}},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){var n=e.props,r=document.createElement("div");return document.body.appendChild(r),function(e){var o=e.amount,i=e.currency,a=e.accountId,u=!0;if(n.onBeforeOpen&&(u=n.onBeforeOpen()),u){var c=new oe(t({},n,{amount:o,currency:i,accountId:a,onClose:function(){window.onpopstate=null,document.body.style.overflow=""},isOpen:!0}));return window.history.pushState(null,"",window.location.href),window.onpopstate=function(){return c.updateProps({isOpen:!1})},Object.assign(document.body.style,{overflow:"hidden"}),c.render(r)}}}}}}),se=ce,de=A.create({tag:"monei-google-pay",url:E.googlePayUrl,dimensions:{width:"100%",height:"0"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:q,prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}}}}),fe=function(){var e=n(s.mark((function e(r,o,i){var a;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(a=new window.ApplePaySession(3,o)).onvalidatemerchant=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,N(t({},i,{validationUrl:n.validationURL}));case 3:a.completeMerchantValidation(e.sent),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),a.abort();case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(n){return e.apply(this,arguments)}}(),a.onpaymentauthorized=function(){var e=n(s.mark((function e(n){var t,o,i;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=JSON.stringify(n.payment.token),o=window.btoa(t),e.prev=2,e.next=5,O({accountId:r.accountId,paymentId:r.paymentId,sessionId:r.sessionId,paymentMethod:{applePay:{token:o}}});case 5:r.onSubmit({token:(i=e.sent).paymentToken,error:i.error}),a.completePayment({status:window.ApplePaySession.STATUS_SUCCESS}),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(2),null==r.onError||r.onError(e.t0),a.completePayment({status:window.ApplePaySession.STATUS_FAILURE});case 14:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(n){return e.apply(this,arguments)}}(),a.begin();case 4:case"end":return e.stop()}}),e)})));return function(n,t,r){return e.apply(this,arguments)}}(),le=A.create({tag:"monei-payment-request",url:E.paymentRequestUrl,dimensions:{width:"100%",height:"0"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:q,prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__isApplePaySupported:{type:A.PROP_TYPE.BOOLEAN,required:!1,value:function(){try{var e;return null==(e=window.ApplePaySession)?void 0:e.canMakePayments()}catch(e){return!1}}},__onApplePayButtonClicked:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return fe.bind(null,e.props)}}}});(ne=exports.NextActionType||(exports.NextActionType={})).CONFIRM="CONFIRM",ne.FRICTIONLESS_CHALLENGE="FRICTIONLESS_CHALLENGE",ne.BIZUM_CHALLENGE="BIZUM_CHALLENGE",ne.CHALLENGE="CHALLENGE",ne.COMPLETE="COMPLETE",(te=exports.CardBrand||(exports.CardBrand={})).Visa="visa",te.Mastercard="mastercard",te.Amex="amex",te.Discover="discover",te.Diners="diners",te.JCB="jcb",te.Maestro="maestro",te.UnionPay="unionpay",te.Elo="elo",te.Hipercard="hipercard",(re=exports.TransactionType||(exports.TransactionType={})).AUTH="AUTH",re.SALE="SALE",re.PAYOUT="PAYOUT",re.VERIF="VERIF";var pe=R,he=y;exports.Bizum=Z,exports.BizumModal=$,exports.CardInput=U,exports.Cofidis=ee,exports.CofidisLoan=ce,exports.CofidisLoanModal=oe,exports.CofidisLoanWidget=ae,exports.CofidisModal=K,exports.CofidisPay=se,exports.CofidisPayModal=ie,exports.CofidisPayWidget=ue,exports.CofidisWidget=Q,exports.GooglePay=de,exports.PayPal=V,exports.PaymentModal=Y,exports.PaymentRequest=le,exports.api=pe,exports.config=E,exports.confirmPayment=H,exports.createToken=B,exports.utils=he;
|
|
1
|
+
"use strict";function e(e,n,t,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void t(e)}u.done?n(c):Promise.resolve(c).then(r,o)}function n(n){return function(){var t=this,r=arguments;return new Promise((function(o,i){var a=n.apply(t,r);function u(n){e(a,o,i,u,c,"next",n)}function c(n){e(a,o,i,u,c,"throw",n)}u(void 0)}))}}function t(){return(t=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function r(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n.indexOf(t=i[r])>=0||(o[t]=e[t]);return o}Object.defineProperty(exports,"__esModule",{value:!0});var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e,n){return e(n={exports:{}},n.exports),n.exports}function u(e){return e&&e.default||e}var c,s=a((function(e){var n=function(e){var n=Object.prototype,t=n.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function u(e,n,t){return Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}),e[n]}try{u({},"")}catch(e){u=function(e,n,t){return e[n]=t}}function c(e,n,t,r){var o=Object.create((n&&n.prototype instanceof f?n:f).prototype),i=new _(r||[]);return o._invoke=function(e,n,t){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(t.method=o,t.arg=i;;){var a=t.delegate;if(a){var u=E(a,t);if(u){if(u===d)continue;return u}}if("next"===t.method)t.sent=t._sent=t.arg;else if("throw"===t.method){if("suspendedStart"===r)throw r="completed",t.arg;t.dispatchException(t.arg)}else"return"===t.method&&t.abrupt("return",t.arg);r="executing";var c=s(e,n,t);if("normal"===c.type){if(r=t.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:t.done}}"throw"===c.type&&(r="completed",t.method="throw",t.arg=c.arg)}}}(e,t,i),o}function s(e,n,t){try{return{type:"normal",arg:e.call(n,t)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var d={};function f(){}function l(){}function p(){}var h={};h[o]=function(){return this};var w=Object.getPrototypeOf,v=w&&w(w(O([])));v&&v!==n&&t.call(v,o)&&(h=v);var m=p.prototype=f.prototype=Object.create(h);function y(e){["next","throw","return"].forEach((function(n){u(e,n,(function(e){return this._invoke(n,e)}))}))}function g(e,n){var r;this._invoke=function(o,i){function a(){return new n((function(r,a){!function r(o,i,a,u){var c=s(e[o],e,i);if("throw"!==c.type){var d=c.arg,f=d.value;return f&&"object"==typeof f&&t.call(f,"__await")?n.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):n.resolve(f).then((function(e){d.value=e,a(d)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function E(e,n){var t=e.iterator[n.method];if(void 0===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,E(e,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=s(t,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,d;var o=r.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,d):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function P(e){var n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),this.tryEntries.push(n)}function b(e){var n=e.completion||{};n.type="normal",delete n.arg,e.completion=n}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function O(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function n(){for(;++r<e.length;)if(t.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=void 0,n.done=!0,n};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return l.prototype=m.constructor=p,p.constructor=l,l.displayName=u(p,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var n="function"==typeof e&&e.constructor;return!!n&&(n===l||"GeneratorFunction"===(n.displayName||n.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,u(e,a,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},y(g.prototype),g.prototype[i]=function(){return this},e.AsyncIterator=g,e.async=function(n,t,r,o,i){void 0===i&&(i=Promise);var a=new g(c(n,t,r,o),i);return e.isGeneratorFunction(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(m),u(m,a,"Generator"),m[o]=function(){return this},m.toString=function(){return"[object Generator]"},e.keys=function(e){var n=[];for(var t in e)n.push(t);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=O,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!e)for(var n in this)"t"===n.charAt(0)&&t.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(t,r){return a.type="throw",a.arg=e,n.next=t,r&&(n.method="next",n.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=t.call(i,"catchLoc"),c=t.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,n){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&t.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=n&&n<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=n,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(e,n){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&n&&(this.next=n),d},finish:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var t=this.tryEntries[n];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),b(t),d}},catch:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var t=this.tryEntries[n];if(t.tryLoc===e){var r=t.completion;if("throw"===r.type){var o=r.arg;b(t)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,t){return this.delegate={iterator:O(e),resultName:n,nextLoc:t},"next"===this.method&&(this.arg=void 0),d}},e}(e.exports);try{regeneratorRuntime=n}catch(e){Function("r","regeneratorRuntime = r")(n)}})),d=function(e){return Object.keys(e).reduce((function(n,t){return n[t]="string"==typeof e[t]?e[t]:e[t]+"px",n}),{})},f=function(e,n,t,r){return new Promise((function(o,i){var a=Array.from(document.scripts).find((function(n){return n.src===e}));if(a){if(!r)return void o(a);a.remove()}var u=document.createElement("script");u.src=e,u.onload=function(){return o(u)},u.onerror=function(e){return i(e)},n&&u.setAttribute("nonce",n),t&&Object.keys(t).forEach((function(e){t[e]&&(u.dataset[e]=t[e])})),document.head.appendChild(u)}))},l=function(e){return Object.keys(e).reduce((function(n,t){return void 0!==e[t]&&n.push(t+"="+e[t]),n}),[]).join("&")},p=function(){var e,n;try{e=window.localStorage}catch(r){var t=(n=new Map,{getItem:function(e){return n.get(e)},setItem:function(e,t){n.set(e,t)},clear:function(){n=new Map},removeItem:function(e){n.delete(e)}});Object.defineProperty(window,"localStorage",{value:t}),e=t}return e},h=function(){var e,n=p();try{e=n.getItem("i18nextLng")}catch(e){}return e?e.split("-")[0]:""},w=function(){var e=[window.screen.colorDepth,window.screen.height,window.screen.width,(new Date).getTimezoneOffset(),h()].join("|");return window.btoa(e)},v=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.t0=void 0,e.next=4,n;case 4:return e.t1=e.sent,e.abrupt("return",[e.t0,e.t1]);case 8:return e.prev=8,e.t2=e.catch(0),e.abrupt("return",[e.t2,void 0]);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(n){return e.apply(this,arguments)}}(),m=function(e){if(!(e.paymentId||e.accountId&&e.amount&&e.currency))throw new Error("You need to provide paymentId or accountId amount and currency")},y={__proto__:null,transformStyle:d,loadScript:f,stringify:l,fixLocalstorage:p,getClientEnv:w,withError:v,isMethodSupported:function(e,n){return e.paymentMethods&&e.paymentMethods.includes(n)},validateComponentProps:m},g="https://js.monei.com",E=t({},{domain:g,version:"v2",stage:"prod",isProduction:!0,paymentPageUrl:g+"/v2/payment-page/",posPaymentPageUrl:g+"/v2/pos-payment-page/",cardInputUrl:g+"/v2/inner-card-input/",paymentModalUrl:g+"/v2/inner-payment-modal/",paypalUrl:g+"/v2/inner-paypal/",bizumUrl:g+"/v2/inner-bizum/",bizumButtonUrl:g+"/v2/inner-bizum-button/",cofidisUrl:g+"/v2/inner-cofidis/",cofidisButtonUrl:g+"/v2/inner-cofidis-button/",cofidisWidgetUrl:g+"/v2/inner-cofidis-widget/",cofidisLoanUrl:g+"/v2/inner-cofidis-loan/",cofidisLoanButtonUrl:g+"/v2/inner-cofidis-loan-button/",cofidisLoanWidgetUrl:g+"/v2/inner-cofidis-loan-widget/",googlePayUrl:g+"/v2/inner-google-pay/",paymentRequestUrl:g+"/v2/inner-payment-request/",click2PayUrl:g+"/v2/inner-click2pay/",click2PayButtonUrl:g+"/v2/inner-click2pay-button/"},{apiUrl:"https://api.monei.com/v1",secureDomain:"https://secure.monei.com",rootDomain:"monei.com"}),P=function(){var e=n(s.mark((function e(n,r){var o,i,a,u,c,d,f;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=(o=void 0===r?{}:r).headers,c=o.body,"POST"===(a=void 0===(i=o.method)?"GET":i)&&(u=t({"Content-Type":"application/json"},u)),e.next=4,fetch(""+E.apiUrl+n,{method:a,headers:u,body:c?JSON.stringify(c):void 0});case 4:return d=e.sent,e.next=7,v(d.json());case 7:if(f=e.sent[1],d.ok){e.next=11;break}throw f||new Error(d.statusText);case 11:return e.abrupt("return",f);case 12:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),b={},_=function(){var e=n(s.mark((function e(n){var t,r,o,i,a;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.accountId,!(r=n.paymentId)){e.next=5;break}o={paymentId:r},e.next=10;break;case 5:if(!t){e.next=9;break}o={accountId:t},e.next=10;break;case 9:throw new Error("You need to provide paymentId or accountId");case 10:if(i=l(o),!b[i]){e.next=13;break}return e.abrupt("return",b[i]);case 13:return a=P("/payment-methods?"+i),b[i]=a,e.abrupt("return",a);case 16:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),O=function(){var e=n(s.mark((function e(n){var t,r,o,i,a,u,c;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.paymentMethod,o=n.sessionId,i=n.amount,a=n.currency,u=n.accountId,!(r=n.paymentId)){e.next=5;break}c={paymentId:r,paymentMethod:t},e.next=10;break;case 5:if(!u){e.next=9;break}c={accountId:u,paymentMethod:t,sessionId:o,amount:i,currency:a},e.next=10;break;case 9:throw new Error("You need to provide paymentId or accountId");case 10:return e.abrupt("return",P("/tokens",{method:"POST",headers:{"Client-Env":w()},body:c}));case 11:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/payments/"+n+"/client-get"));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),S=function(){var e=n(s.mark((function e(n){var t,o;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.paymentId,o=r(n,["paymentId"]),e.abrupt("return",P("/payments/"+t+"/client-confirm",{method:"POST",headers:{"Client-Env":w()},body:o}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),x=function(){var e=n(s.mark((function e(n){var t,o;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.signature,o=r(n,["signature"]),e.abrupt("return",P("/client-payments",{method:"POST",headers:{"Client-Env":w(),"Client-Signature":t},body:o}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),I=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/payments/"+n.paymentId+"/client-receipt",{method:"POST",body:{customerEmail:n.customerEmail,signature:n.signature,language:n.language}}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),N=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/apple-pay/sessions",{method:"POST",body:n}));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),R={__proto__:null,getPaymentMethods:_,createToken:O,getPayment:T,confirmPayment:S,createPayment:x,sendPaymentReceipt:I,createApplePaySession:N,calculateFinancing:function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/cofidis/calculate-financing",{method:"POST",body:n}));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),validateBizumPhone:function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",P("/bizum/validate-phone",{method:"POST",body:n}));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()},C=a((function(e,n){var t;"undefined"!=typeof self&&self,t=function(){return 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,n,t){function r(e){return"[object RegExp]"==={}.toString.call(e)}t.r(n),t.d(n,"Promise",(function(){return R})),t.d(n,"TYPES",(function(){return Ge})),t.d(n,"ProxyWindow",(function(){return Pe})),t.d(n,"setup",(function(){return Ye})),t.d(n,"destroy",(function(){return He})),t.d(n,"serializeMessage",(function(){return Fe})),t.d(n,"deserializeMessage",(function(){return ze})),t.d(n,"createProxyWindow",(function(){return Be})),t.d(n,"toProxyWindow",(function(){return Ue})),t.d(n,"on",(function(){return De})),t.d(n,"once",(function(){return Me})),t.d(n,"send",(function(){return qe})),t.d(n,"markWindowKnown",(function(){return de})),t.d(n,"cleanUpWindow",(function(){return Ve})),t.d(n,"bridge",(function(){}));var o="Call was rejected by callee.\r\n";function i(e){return void 0===e&&(e=window),"about:"===e.location.protocol}function a(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}function u(e){if(void 0===e&&(e=window),e&&!a(e))try{return e.opener}catch(e){}}function c(e){try{return!0}catch(e){}return!1}function s(e){void 0===e&&(e=window);var n=e.location;if(!n)throw new Error("Can not read window location");var t=n.protocol;if(!t)throw new Error("Can not read window protocol");if("file:"===t)return"file://";if("about:"===t){var r=a(e);return r&&c()?s(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function d(e){void 0===e&&(e=window);var n=s(e);return n&&e.mockDomain&&0===e.mockDomain.indexOf("mock:")?e.mockDomain:n}function f(e){if(!function(e){try{if(e===window)return!0}catch(e){}try{var n=Object.getOwnPropertyDescriptor(e,"location");if(n&&!1===n.enumerable)return!1}catch(e){}try{if(i(e)&&c())return!0}catch(e){}try{if(s(e)===s(window))return!0}catch(e){}return!1}(e))return!1;try{if(e===window)return!0;if(i(e)&&c())return!0;if(d(window)===d(e))return!0}catch(e){}return!1}function l(e){if(!f(e))throw new Error("Expected window to be same domain");return e}function p(e,n){if(!e||!n)return!1;var t=a(n);return t?t===e:-1!==function(e){var n=[];try{for(;e.parent!==e;)n.push(e.parent),e=e.parent}catch(e){}return n}(n).indexOf(e)}function h(e){var n,t,r=[];try{n=e.frames}catch(t){n=e}try{t=n.length}catch(e){}if(0===t)return r;if(t){for(var o=0;o<t;o++){var i=void 0;try{i=n[o]}catch(e){continue}r.push(i)}return r}for(var a=0;a<100;a++){var u=void 0;try{u=n[a]}catch(e){return r}if(!u)return r;r.push(u)}return r}var w=[],v=[];function m(e,n){void 0===n&&(n=!0);try{if(e===window)return!1}catch(e){return!0}try{if(!e)return!0}catch(e){return!0}try{if(e.closed)return!0}catch(e){return!e||e.message!==o}if(n&&f(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}var t=function(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}(w,e);if(-1!==t){var r=v[t];if(r&&function(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var n=e.ownerDocument;if(n&&n.documentElement&&!n.documentElement.contains(e)){for(var t=e;t.parentNode&&t.parentNode!==t;)t=t.parentNode;if(!t.host||!n.documentElement.contains(t.host))return!0}return!1}(r))return!0}return!1}function y(e){return void 0===e&&(e=window),u(e=e||window)||a(e)||void 0}function g(e,n){if("string"==typeof e){if("string"==typeof n)return"*"===e||n===e;if(r(n))return!1;if(Array.isArray(n))return!1}return r(e)?r(n)?e.toString()===n.toString():!Array.isArray(n)&&Boolean(n.match(e)):!!Array.isArray(e)&&(Array.isArray(n)?JSON.stringify(e)===JSON.stringify(n):!r(n)&&e.some((function(e){return g(e,n)})))}function E(e){try{if(e===window)return!0}catch(e){if(e&&e.message===o)return!0}try{if("[object Window]"==={}.toString.call(e))return!0}catch(e){if(e&&e.message===o)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===o)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===o)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===o)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===o)return!0}try{if(e&&"__unlikely_value__"===e.__cross_domain_utils_window_check__)return!1}catch(e){return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch(e){}return!1}function P(e){try{e.close()}catch(e){}}function b(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&e instanceof window.constructor)return!1;var n={}.toString;if(n){var t=n.call(e);if("[object Window]"===t||"[object global]"===t||"[object DOMWindow]"===t)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}var _,O=[],T=[],S=0;function x(){if(!S&&_){var e=_;_=null,e.resolve()}}function I(){S+=1}function N(){S-=1,x()}var R=function(){function e(e){var n=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=[],e){var t,r,o=!1,i=!1,a=!1;I();try{e((function(e){a?n.resolve(e):(o=!0,t=e)}),(function(e){a?n.reject(e):(i=!0,r=e)}))}catch(e){return N(),void this.reject(e)}N(),a=!0,o?this.resolve(t):i&&this.reject(r)}}var n=e.prototype;return n.resolve=function(e){if(this.resolved||this.rejected)return this;if(b(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},n.reject=function(e){var n=this;if(this.resolved||this.rejected)return this;if(b(e))throw new Error("Can not reject promise with another promise");if(!e){var t=e&&"function"==typeof e.toString?e.toString():{}.toString.call(e);e=new Error("Expected reject to be called with Error, got "+t)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout((function(){n.errorHandled||function(e,n){if(-1===O.indexOf(e)){O.push(e),setTimeout((function(){throw e}),1);for(var t=0;t<T.length;t++)T[t](e,n)}}(e,n)}),1),this.dispatch(),this},n.asyncReject=function(e){return this.errorHandled=!0,this.reject(e),this},n.dispatch=function(){var n=this.resolved,t=this.rejected,r=this.handlers;if(!this.dispatching&&(n||t)){this.dispatching=!0,I();for(var o=function(e,n){return e.then((function(e){n.resolve(e)}),(function(e){n.reject(e)}))},i=0;i<r.length;i++){var a=r[i],u=a.onSuccess,c=a.onError,s=a.promise,d=void 0;if(n)try{d=u?u(this.value):this.value}catch(e){s.reject(e);continue}else if(t){if(!c){s.reject(this.error);continue}try{d=c(this.error)}catch(e){s.reject(e);continue}}d instanceof e&&(d.resolved||d.rejected)?(d.resolved?s.resolve(d.value):s.reject(d.error),d.errorHandled=!0):b(d)?d instanceof e&&(d.resolved||d.rejected)?d.resolved?s.resolve(d.value):s.reject(d.error):o(d,s):s.resolve(d)}r.length=0,this.dispatching=!1,N()}},n.then=function(n,t){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for success handler");if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for error handler");var r=new e;return this.handlers.push({promise:r,onSuccess:n,onError:t}),this.errorHandled=!0,this.dispatch(),r},n.catch=function(e){return this.then(void 0,e)},n.finally=function(n){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.finally expected a function");return this.then((function(t){return e.try(n).then((function(){return t}))}),(function(t){return e.try(n).then((function(){throw t}))}))},n.timeout=function(e,n){var t=this;if(this.resolved||this.rejected)return this;var r=setTimeout((function(){t.resolved||t.rejected||t.reject(n||new Error("Promise timed out after "+e+"ms"))}),e);return this.then((function(e){return clearTimeout(r),e}))},n.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},e.resolve=function(n){return n instanceof e?n:b(n)?new e((function(e,t){return n.then(e,t)})):(new e).resolve(n)},e.reject=function(n){return(new e).reject(n)},e.asyncReject=function(n){return(new e).asyncReject(n)},e.all=function(n){var t=new e,r=n.length,o=[];if(!r)return t.resolve(o),t;for(var i=function(e,n,i){return n.then((function(n){o[e]=n,0==(r-=1)&&t.resolve(o)}),(function(e){i.reject(e)}))},a=0;a<n.length;a++){var u=n[a];if(u instanceof e){if(u.resolved){o[a]=u.value,r-=1;continue}}else if(!b(u)){o[a]=u,r-=1;continue}i(a,e.resolve(u),t)}return 0===r&&t.resolve(o),t},e.hash=function(n){var t={},r=[],o=function(e){if(n.hasOwnProperty(e)){var o=n[e];b(o)?r.push(o.then((function(n){t[e]=n}))):t[e]=o}};for(var i in n)o(i);return e.all(r).then((function(){return t}))},e.map=function(n,t){return e.all(n.map(t))},e.onPossiblyUnhandledException=function(e){return function(e){return T.push(e),{cancel:function(){T.splice(T.indexOf(e),1)}}}(e)},e.try=function(n,t,r){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.try expected a function");var o;I();try{o=n.apply(t,r||[])}catch(n){return N(),e.reject(n)}return N(),e.resolve(o)},e.delay=function(n){return new e((function(e){setTimeout(e,n)}))},e.isPromise=function(n){return!!(n&&n instanceof e)||b(n)},e.flush=function(){return n=_=_||new e,x(),n;var n},e}();function C(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}var k,j=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("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<n.length;t++){var r=n[t];if(E(r)&&m(r)){if(e)try{e.delete(r)}catch(e){}n.splice(t,1),this.values.splice(t,1),t-=1}}},n.isSafeToReadWrite=function(e){return!E(e)},n.set=function(e,n){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.set(e,n)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var r=this.name,o=e[r];return void(o&&o[0]===e?o[1]=n:Object.defineProperty(e,r,{value:[e,n],writable:!0}))}catch(e){}this._cleanupClosedWindows();var i=this.keys,a=this.values,u=C(i,e);-1===u?(i.push(e),a.push(n)):a[u]=n},n.get=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return n.get(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return t&&t[0]===e?t[1]:void 0}catch(e){}this._cleanupClosedWindows();var r=C(this.keys,e);if(-1!==r)return this.values[r]},n.delete=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{n.delete(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];t&&t[0]===e&&(t[0]=t[1]=void 0)}catch(e){}this._cleanupClosedWindows();var r=this.keys,o=C(r,e);-1!==o&&(r.splice(o,1),this.values.splice(o,1))},n.has=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return!0}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return!(!t||t[0]!==e)}catch(e){}return this._cleanupClosedWindows(),-1!==C(this.keys,e)},n.getOrSet=function(e,n){if(this.has(e))return this.get(e);var t=n();return this.set(e,t),t},e}();function W(e){return e.name||e.__name__||e.displayName||"anonymous"}function A(e,n){try{delete e.name,e.name=n}catch(e){}return e.__name__=e.displayName=n,e}function L(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,(function(){return e.charAt(Math.floor(Math.random()*e.length))}))+"_"+function(e){if("function"==typeof btoa)return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,n){return String.fromCharCode(parseInt(n,16))})));if("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64");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()}function D(e){try{return JSON.stringify([].slice.call(e),(function(e,n){return"function"==typeof n?"memoize["+function(e){if(k=k||new j,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");var n=k.get(e);return n||(n=typeof e+":"+L(),k.set(e,n)),n}(n)+"]":n}))}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function M(){return{}}var q=0,F=0;function z(e,n){void 0===n&&(n={});var t,r,o=n.thisNamespace,i=void 0!==o&&o,a=n.time,u=q;q+=1;var c=function(){for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];var s;u<F&&(t=null,r=null,u=q,q+=1),s=i?(r=r||new j).getOrSet(this,M):t=t||{};var d=D(o),f=s[d];if(f&&a&&Date.now()-f.time<a&&(delete s[d],f=null),f)return f.value;var l=Date.now(),p=e.apply(this,arguments);return s[d]={time:l,value:p},p};return c.reset=function(){t=null,r=null},A(c,(n.name||W(e))+"::memoized")}function B(e){var n={};function t(){for(var t=arguments,r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var u=D(i);return n.hasOwnProperty(u)||(n[u]=R.try((function(){return e.apply(r,t)})).finally((function(){delete n[u]}))),n[u]}return t.reset=function(){n={}},A(t,W(e)+"::promiseMemoized")}function U(){}function Y(e,n){if(void 0===n&&(n=1),n>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";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: "+Y(e,n+1)}}function H(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function G(e){return"[object RegExp]"==={}.toString.call(e)}function V(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function J(){return Boolean(document.body)&&"complete"===document.readyState}function $(){return Boolean(document.body)&&"interactive"===document.readyState}z.clear=function(){F=q},z((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})),z((function(){return new R((function(e){if(J()||$())return e();var n=setInterval((function(){if(J()||$())return clearInterval(n),e()}),10)}))}));var Z="undefined"!=typeof document?document.currentScript:null,X=z((function(){if(Z)return Z;if(Z=function(){try{var e=function(){try{throw new Error("_")}catch(e){return e.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(e){}}())return Z;throw new Error("Can not determine current script")})),K=L();function Q(e){void 0===e&&(e=window);var n="__post_robot_10_0_42__";return e!==window?e[n]:e[n]=e[n]||{}}z((function(){var e;try{e=X()}catch(e){return K}var n=e.getAttribute("data-uid");return n&&"string"==typeof n||(n=e.getAttribute("data-uid-auto"))&&"string"==typeof n||(n=L(),e.setAttribute("data-uid-auto",n)),n}));var ee=function(){return{}};function ne(e,n){return void 0===e&&(e="store"),void 0===n&&(n=ee),V(Q(),e,(function(){var e=n();return{has:function(n){return e.hasOwnProperty(n)},get:function(n,t){return e.hasOwnProperty(n)?e[n]:t},set:function(n,t){return e[n]=t,t},del:function(n){delete e[n]},getOrSet:function(n,t){return V(e,n,t)},reset:function(){e=n()},keys:function(){return Object.keys(e)}}}))}var te,re=function(){};function oe(){var e=Q();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new re,e.WINDOW_WILDCARD}function ie(e,n){return void 0===e&&(e="store"),void 0===n&&(n=ee),ne("windowStore").getOrSet(e,(function(){var t=new j,r=function(e){return t.getOrSet(e,n)};return{has:function(n){return r(n).hasOwnProperty(e)},get:function(n,t){var o=r(n);return o.hasOwnProperty(e)?o[e]:t},set:function(n,t){return r(n)[e]=t,t},del:function(n){delete r(n)[e]},getOrSet:function(n,t){return V(r(n),e,t)}}}))}function ae(){return ne("instance").getOrSet("instanceID",L)}function ue(e,n){var t=n.domain,r=ie("helloPromises"),o=r.get(e);o&&o.resolve({domain:t});var i=R.resolve({domain:t});return r.set(e,i),i}function ce(e,n){return(0,n.send)(e,"postrobot_hello",{instanceID:ae()},{domain:"*",timeout:-1}).then((function(n){var t=n.origin,r=n.data.instanceID;return ue(e,{domain:t}),{win:e,domain:t,instanceID:r}}))}function se(e,n){var t=n.send;return ie("windowInstanceIDPromises").getOrSet(e,(function(){return ce(e,{send:t}).then((function(e){return e.instanceID}))}))}function de(e){ie("knownWindows").set(e,!0)}function fe(e){return"object"==typeof e&&null!==e&&"string"==typeof e.__type__}function le(e){return void 0===e?"undefined":null===e?"null":Array.isArray(e)?"array":"function"==typeof e?"function":"object"==typeof e?e instanceof Error?"error":"function"==typeof e.then?"promise":"[object RegExp]"==={}.toString.call(e)?"regex":"[object Date]"==={}.toString.call(e)?"date":"object":"string"==typeof e?"string":"number"==typeof e?"number":"boolean"==typeof e?"boolean":void 0}function pe(e,n){return{__type__:e,__val__:n}}var he,we=((te={}).function=function(){},te.error=function(e){return pe("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},te.promise=function(){},te.regex=function(e){return pe("regex",e.source)},te.date=function(e){return pe("date",e.toJSON())},te.array=function(e){return e},te.object=function(e){return e},te.string=function(e){return e},te.number=function(e){return e},te.boolean=function(e){return e},te.null=function(e){return e},te),ve={},me=((he={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},he.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+"\n\n"+o.stack,o},he.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},he.regex=function(e){return new RegExp(e)},he.date=function(e){return new Date(e)},he.array=function(e){return e},he.object=function(e){return e},he.string=function(e){return e},he.number=function(e){return e},he.boolean=function(e){return e},he.null=function(e){return e},he),ye={};function ge(){for(var e=ne("idToProxyWindow"),n=0,t=e.keys();n<t.length;n++){var r=t[n];e.get(r).shouldClean()&&e.del(r)}}function Ee(e,n){var t=n.send,r=n.id,o=void 0===r?L():r,i=e.then((function(e){if(f(e))return l(e).name})),a=e.then((function(e){if(m(e))throw new Error("Window is closed, can not determine type");return u(e)?"popup":"iframe"}));return i.catch(U),a.catch(U),{id:o,getType:function(){return a},getInstanceID:B((function(){return e.then((function(e){return se(e,{send:t})}))})),close:function(){return e.then(P)},getName:function(){return e.then((function(e){if(!m(e))return f(e)?l(e).name:i}))},focus:function(){return e.then((function(e){e.focus()}))},isClosed:function(){return e.then((function(e){return m(e)}))},setLocation:function(n){return e.then((function(e){var t=window.location.protocol+"//"+window.location.host;if(0===n.indexOf("/"))n=""+t+n;else if(!n.match(/^https?:\/\//)&&0!==n.indexOf(t))throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(n));if(f(e))try{if(e.location&&"function"==typeof e.location.replace)return void e.location.replace(n)}catch(e){}e.location=n}))},setName:function(n){return e.then((function(e){var t=f(e),r=function(e){if(f(e))return l(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}}(e);if(!t)throw new Error("Can not set name for cross-domain window: "+n);l(e).name=n,r&&r.setAttribute("name",n),i=R.resolve(n)}))}}}new R((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)}));var Pe=function(){function e(e){var n=e.send,t=e.win,r=e.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 R,this.serializedWindow=r||Ee(this.actualWindowPromise,{send:n}),ne("idToProxyWindow").set(this.getID(),this),t&&this.setWindow(t,{send:n})}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(e){return"popup"===e}))},n.setLocation=function(e){var n=this;return this.serializedWindow.setLocation(e).then((function(){return n}))},n.getName=function(){return this.serializedWindow.getName()},n.setName=function(e){var n=this;return this.serializedWindow.setName(e).then((function(){return n}))},n.close=function(){var e=this;return this.serializedWindow.close().then((function(){return e}))},n.focus=function(){var e=this,n=this.isPopup(),t=this.getName(),r=R.hash({isPopup:n,name:t}).then((function(e){var n=e.name;e.isPopup&&n&&window.open("",n)})),o=this.serializedWindow.focus();return R.all([r,o]).then((function(){return e}))},n.isClosed=function(){return this.serializedWindow.isClosed()},n.getWindow=function(){return this.actualWindow},n.setWindow=function(e,n){var t=n.send;this.actualWindow=e,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=Ee(this.actualWindowPromise,{send:t,id:this.getID()}),ie("winToProxyWindow").set(e,this)},n.awaitWindow=function(){return this.actualWindowPromise},n.matchWindow=function(e,n){var t=this,r=n.send;return R.try((function(){return t.actualWindow?e===t.actualWindow:R.hash({proxyInstanceID:t.getInstanceID(),knownWindowInstanceID:se(e,{send:r})}).then((function(n){var o=n.proxyInstanceID===n.knownWindowInstanceID;return o&&t.setWindow(e,{send:r}),o}))}))},n.unwrap=function(){return this.actualWindow||this},n.getInstanceID=function(){return this.serializedWindow.getInstanceID()},n.shouldClean=function(){return Boolean(this.actualWindow&&m(this.actualWindow))},n.serialize=function(){return this.serializedWindow},e.unwrap=function(n){return e.isProxyWindow(n)?n.unwrap():n},e.serialize=function(n,t){var r=t.send;return ge(),e.toProxyWindow(n,{send:r}).serialize()},e.deserialize=function(n,t){var r=t.send;return ge(),ne("idToProxyWindow").get(n.id)||new e({serializedWindow:n,send:r})},e.isProxyWindow=function(e){return Boolean(e&&!E(e)&&e.isProxyWindow)},e.toProxyWindow=function(n,t){var r=t.send;if(ge(),e.isProxyWindow(n))return n;var o=n;return ie("winToProxyWindow").get(o)||new e({win:o,send:r})},e}();function be(e,n,t,r,o){var i=ie("methodStore"),a=ne("proxyWindowMethods");Pe.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 _e(e,n){var t=ie("methodStore"),r=ne("proxyWindowMethods");return t.getOrSet(e,(function(){return{}}))[n]||r.get(n)}function Oe(e,n,t,r,o){var i,a,u;a=(i={on:o.on,send:o.send}).on,u=i.send,ne("builtinListeners").getOrSet("functionCalls",(function(){return a("postrobot_method",{domain:"*"},(function(e){var n=e.source,t=e.origin,r=e.data,o=r.id,i=r.name,a=_e(n,o);if(!a)throw new Error("Could not find method '"+i+"' with id: "+r.id+" in "+d(window));var c=a.source,s=a.domain,f=a.val;return R.try((function(){if(!g(s,t))throw new Error("Method '"+r.name+"' domain "+JSON.stringify(G(a.domain)?a.domain.source:a.domain)+" does not match origin "+t+" in "+d(window));if(Pe.isProxyWindow(c))return c.matchWindow(n,{send:u}).then((function(e){if(!e)throw new Error("Method call '"+r.name+"' failed - proxy window does not match source in "+d(window))}))})).then((function(){return f.apply({source:n,origin:t},r.args)}),(function(e){return R.try((function(){if(f.onError)return f.onError(e)})).then((function(){var n,t;throw e.stack&&(e.stack="Remote call to "+i+"("+(void 0===(n=r.args)&&(n=[]),(t=n,[].slice.call(t)).map((function(e){return"string"==typeof e?"'"+e+"'":void 0===e?"undefined":null===e?"null":"boolean"==typeof e?e.toString():Array.isArray(e)?"[ ... ]":"object"==typeof e?"{ ... }":"function"==typeof e?"() => { ... }":"<"+typeof e+">"})).join(", ")+") failed\n\n")+e.stack),e}))})).then((function(e){return{result:e,id:o,name:i}}))}))}));var c=t.__id__||L();e=Pe.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+"::")),Pe.isProxyWindow(e)?(be(c,t,s,e,n),e.awaitWindow().then((function(e){be(c,t,s,e,n)}))):be(c,t,s,e,n),pe("cross_domain_function",{id:c,name:s})}function Te(e,n,t,r){var o,i=r.on,a=r.send;return function(e,n){void 0===n&&(n=ve);var t=JSON.stringify(e,(function(e){var t=this[e];if(fe(this))return t;var r=le(t);if(!r)return t;var o=n[r]||we[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 pe("cross_domain_zalgo_promise",{then:Oe(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 Oe(e,n,t,r,{on:i,send:a})},o.object=function(e){return E(e)||Pe.isProxyWindow(e)?pe("cross_domain_window",Pe.serialize(e,{send:a})):e},o))}function Se(e,n,t,r){var o,i=r.send;return function(e,n){if(void 0===n&&(n=ye),"undefined"!==e)return JSON.parse(e,(function(e,t){if(fe(this))return t;var r,o;if(fe(t)?(r=t.__type__,o=t.__val__):(r=le(t),o=t),!r)return o;var i=n[r]||me[r];return i?i(o,e):o}))}(t,((o={}).cross_domain_zalgo_promise=function(e){return function(e,n,t){return new R(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 Pe.toProxyWindow(e,{send:a}).awaitWindow().then((function(e){var c=_e(e,o);if(c&&c.val!==r)return c.val.apply({source:window,origin:d()},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 Pe.deserialize(e,{send:i})},o))}var xe={};function Ie(e,n,t,r){var o=r.on,i=r.send;return R.try((function(){var r=ie().getOrSet(e,(function(){return{}}));return r.buffer=r.buffer||[],r.buffer.push(t),r.flush=r.flush||R.flush().then((function(){if(m(e))throw new Error("Window is closed");var t,a=Te(e,n,((t={}).__post_robot_10_0_42__=r.buffer||[],t),{on:o,send:i});delete r.buffer;for(var u=Object.keys(xe),c=[],s=0;s<u.length;s++){var d=u[s];try{xe[d](e,a,n)}catch(e){c.push(e)}}if(c.length===u.length)throw new Error("All post-robot messaging strategies failed:\n\n"+c.map((function(e,n){return n+". "+Y(e)})).join("\n\n"))})),r.flush.then((function(){delete r.flush}))})).then(U)}function Ne(e){return ne("responseListeners").get(e)}function Re(e){ne("responseListeners").del(e)}function Ce(e){return ne("erroredResponseListeners").has(e)}function ke(e){var n=e.name,t=e.win,r=e.domain,o=ie("requestListeners");if("*"===t&&(t=null),"*"===r&&(r=null),!n)throw new Error("Name required to get request listener");for(var i=0,a=[t,oe()];i<a.length;i++){var u=a[i];if(u){var c=o.get(u);if(c){var s=c[n];if(s){if(r&&"string"==typeof r){if(s[r])return s[r];if(s.__domain_regex__)for(var d=0,f=s.__domain_regex__;d<f.length;d++){var l=f[d],p=l.listener;if(g(l.regex,r))return p}}if(s["*"])return s["*"]}}}}}function je(e,n,t,r){var o=r.on,i=r.send,a=ke({name:t.name,win:e,domain:n}),u="postrobot_method"===t.name&&t.data&&"string"==typeof t.data.name?t.data.name+"()":t.name;function c(r,a,c){return R.flush().then((function(){if(!t.fireAndForget&&!m(e))try{return Ie(e,n,{id:L(),origin:d(window),type:"postrobot_message_response",hash:t.hash,name:t.name,ack:r,data:a,error:c},{on:o,send:i})}catch(e){throw new Error("Send response message failed for "+u+" in "+d()+"\n\n"+Y(e))}}))}return R.all([R.flush().then((function(){if(!t.fireAndForget&&!m(e))try{return Ie(e,n,{id:L(),origin:d(window),type:"postrobot_message_ack",hash:t.hash,name:t.name},{on:o,send:i})}catch(e){throw new Error("Send ack message failed for "+u+" in "+d()+"\n\n"+Y(e))}})),R.try((function(){if(!a)throw new Error("No handler found for post message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!g(a.domain,n))throw new Error("Request origin "+n+" does not match domain "+a.domain.toString());return a.handler({source:e,origin:n,data:t.data})})).then((function(e){return c("success",e)}),(function(e){return c("error",null,e)}))]).then(U).catch((function(e){if(a&&a.handleError)return a.handleError(e);throw e}))}function We(e,n,t){if(!Ce(t.hash)){var r=Ne(t.hash);if(!r)throw new Error("No handler found for post message ack for message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);try{if(!g(r.domain,n))throw new Error("Ack origin "+n+" does not match domain "+r.domain.toString());if(e!==r.win)throw new Error("Ack source does not match registered window")}catch(e){r.promise.reject(e)}r.ack=!0}}function Ae(e,n,t){if(!Ce(t.hash)){var o,i=Ne(t.hash);if(!i)throw new Error("No handler found for post message response for message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!g(i.domain,n))throw new Error("Response origin "+n+" does not match domain "+(o=i.domain,Array.isArray(o)?"("+o.join(" | ")+")":r(o)?"RegExp("+o.toString():o.toString()));if(e!==i.win)throw new Error("Response source does not match registered window");Re(t.hash),"error"===t.ack?i.promise.reject(t.error):"success"===t.ack&&i.promise.resolve({source:e,origin:n,data:t.data})}}function Le(e,n){var t=n.on,r=n.send,o=ne("receivedMessages");try{if(!window||window.closed||!e.source)return}catch(e){return}var i=e.source,a=e.origin,u=function(e,n,t,r){var o,i=r.on,a=r.send;try{o=Se(n,t,e,{on:i,send:a})}catch(e){return}if(o&&"object"==typeof o&&null!==o){var u=o.__post_robot_10_0_42__;if(Array.isArray(u))return u}}(e.data,i,a,{on:t,send:r});if(u){de(i);for(var c=0;c<u.length;c++){var s=u[c];if(o.has(s.id))return;if(o.set(s.id,!0),m(i)&&!s.fireAndForget)return;0===s.origin.indexOf("file:")&&(a="file://");try{"postrobot_message_request"===s.type?je(i,a,s,{on:t,send:r}):"postrobot_message_response"===s.type?Ae(i,a,s):"postrobot_message_ack"===s.type&&We(i,a,s)}catch(e){setTimeout((function(){throw e}),0)}}}}function De(e,n,t){if(!e)throw new Error("Expected name");if("function"==typeof(n=n||{})&&(t=n,n={}),!t)throw new Error("Expected handler");(n=n||{}).name=e,n.handler=t||n.handler;var r=n.window,o=n.domain,i=function e(n,t){var r=n.name,o=n.win,i=n.domain,a=ie("requestListeners");if(!r||"string"!=typeof r)throw new Error("Name required to add request listener");if(Array.isArray(o)){for(var u=[],c=0,s=o;c<s.length;c++)u.push(e({name:r,domain:i,win:s[c]},t));return{cancel:function(){for(var e=0;e<u.length;e++)u[e].cancel()}}}if(Array.isArray(i)){for(var d=[],f=0,l=i;f<l.length;f++)d.push(e({name:r,win:o,domain:l[f]},t));return{cancel:function(){for(var e=0;e<d.length;e++)d[e].cancel()}}}var p=ke({name:r,win:o,domain:i});if(o&&"*"!==o||(o=oe()),i=i||"*",p)throw o&&i?new Error("Request listener already exists for "+r+" on domain "+i.toString()+" for "+(o===oe()?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+r+" for "+(o===oe()?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+r+" on domain "+i.toString()):new Error("Request listener already exists for "+r);var h,w,v=a.getOrSet(o,(function(){return{}})),m=V(v,r,(function(){return{}})),y=i.toString();return G(i)?(h=V(m,"__domain_regex__",(function(){return[]}))).push(w={regex:i,listener:t}):m[y]=t,{cancel:function(){delete m[y],w&&(h.splice(h.indexOf(w,1)),h.length||delete m.__domain_regex__),Object.keys(m).length||delete v[r],o&&!Object.keys(v).length&&a.del(o)}}}({name:e,win:r,domain:o},{handler:n.handler,handleError:n.errorHandler||function(e){throw e},window:r,domain:o||"*",name:e});return{cancel:function(){i.cancel()}}}function Me(e,n,t){"function"==typeof(n=n||{})&&(t=n,n={});var r,o=new R;return n.errorHandler=function(e){r.cancel(),o.reject(e)},r=De(e,n,(function(e){if(r.cancel(),o.resolve(e),t)return t(e)})),o.cancel=r.cancel,o}xe.postrobot_post_message=function(e,n,t){0===t.indexOf("file:")&&(t="*"),e.postMessage(n,t)};var qe=function e(n,t,r,o){var i=(o=o||{}).domain||"*",u=o.timeout||-1,c=o.timeout||5e3,s=o.fireAndForget||!1;return R.try((function(){if(function(e,n,t){if(!e)throw new Error("Expected name");if(t&&"string"!=typeof t&&!Array.isArray(t)&&!G(t))throw new TypeError("Can not send "+e+". Expected domain "+JSON.stringify(t)+" to be a string, array, or regex");if(m(n))throw new Error("Can not send "+e+". Target window is closed")}(t,n,i),function(e,n){var t=y(n);if(t)return t===e;if(n===e)return!1;if(function(e){void 0===e&&(e=window);try{if(e.top)return e.top}catch(e){}if(a(e)===e)return e;try{if(p(window,e)&&window.top)return window.top}catch(e){}try{if(p(e,window)&&window.top)return window.top}catch(e){}for(var n=0,t=function e(n){for(var t=[],r=0,o=h(n);r<o.length;r++){var i=o[r];t.push(i);for(var a=0,u=e(i);a<u.length;a++)t.push(u[a])}return t}(e);n<t.length;n++){var r=t[n];try{if(r.top)return r.top}catch(e){}if(a(r)===r)return r}}(n)===n)return!1;for(var r=0,o=h(e);r<o.length;r++)if(o[r]===n)return!0;return!1}(window,n))return function(e,n,t){void 0===n&&(n=5e3),void 0===t&&(t="Window");var r=function(e){return ie("helloPromises").getOrSet(e,(function(){return new R}))}(e);return-1!==n&&(r=r.timeout(n,new Error(t+" did not load after "+n+"ms"))),r}(n,c)})).then((function(t){return function(e,n,t,r){var o=r.send;return R.try((function(){return"string"==typeof n?n:R.try((function(){return t||ce(e,{send:o}).then((function(e){return e.domain}))})).then((function(e){if(!g(n,n))throw new Error("Domain "+H(n)+" does not match "+H(n));return e}))}))}(n,i,(void 0===t?{}:t).domain,{send:e})})).then((function(o){var i,a=o,c="postrobot_method"===t&&r&&"string"==typeof r.name?r.name+"()":t,f=new R,l=t+"_"+L();if(!s){var p={name:t,win:n,domain:a,promise:f};!function(e,n){ne("responseListeners").set(e,n)}(l,p);var h=ie("requestPromises").getOrSet(n,(function(){return[]}));h.push(f),f.catch((function(){!function(e){ne("erroredResponseListeners").set(e,!0)}(l),Re(l)}));var w=function(e){return ie("knownWindows").get(e,!1)}(n)?1e4:2e3,v=u,y=w,g=v,E=(function e(){i=setTimeout((function(){m(n)?f.reject(new Error("Window closed for "+t+" before "+(p.ack?"response":"ack"))):p.cancelled?f.reject(new Error("Response listener was cancelled for "+t)):(y=Math.max(y-500,0),-1!==g&&(g=Math.max(g-500,0)),p.ack||0!==y?0===g&&f.reject(new Error("No response for postMessage "+c+" in "+d()+" in "+v+"ms")):f.reject(new Error("No ack for postMessage "+c+" in "+d()+" in "+w+"ms"))),e()}),500)}(),{cancel:function(){clearTimeout(i)}});f.finally((function(){E.cancel(),h.splice(h.indexOf(f,1))})).catch(U)}return Ie(n,a,{id:L(),origin:d(window),type:"postrobot_message_request",hash:l,name:t,data:r,fireAndForget:s},{on:De,send:e}).then((function(){return s?f.resolve():f}),(function(e){throw new Error("Send request message failed for "+c+" in "+d()+"\n\n"+Y(e))}))}))};function Fe(e,n,t){return Te(e,n,t,{on:De,send:qe})}function ze(e,n,t){return Se(e,n,t,{on:De,send:qe})}function Be(e){return new Pe({send:qe,win:e})}function Ue(e){return Pe.toProxyWindow(e,{send:qe})}function Ye(){var e,n,t,r;Q().initialized||(Q().initialized=!0,n=(e={on:De,send:qe}).on,t=e.send,(r=Q()).receiveMessage=r.receiveMessage||function(e){return Le(e,{on:n,send:t})},function(e){var n=e.on,t=e.send;ne().getOrSet("postMessageListener",(function(){return(e=window).addEventListener("message",r=function(e){!function(e,n){var t=n.on,r=n.send;R.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");Le({source:n,origin:o,data:i},{on:t,send:r})}}))}(e,{on:n,send:t})}),{cancel:function(){e.removeEventListener("message",r)}};var e,r}))}({on:De,send:qe}),function(e){var n=e.on,t=e.send;ne("builtinListeners").getOrSet("helloListener",(function(){var e=n("postrobot_hello",{domain:"*"},(function(e){return ue(e.source,{domain:e.origin}),{instanceID:ae()}})),r=y();return r&&ce(r,{send:t}).catch((function(e){})),e}))}({on:De,send:qe}))}function He(){var e;!function(){for(var e=ne("responseListeners"),n=0,t=e.keys();n<t.length;n++){var r=t[n],o=e.get(r);o&&(o.cancelled=!0),e.del(r)}}(),(e=ne().get("postMessageListener"))&&e.cancel(),delete window.__post_robot_10_0_42__}var Ge=!0;function Ve(e){for(var n=0,t=ie("requestPromises").get(e,[]);n<t.length;n++)t[n].reject(new Error("Window "+(m(e)?"closed":"cleaned up")+" before response")).catch(U)}Ye()}])},e.exports=t()})),k=i(C),j=u(Object.assign({__proto__:null,default:k,__moduleExports:C},k)),W=a((function(e){e.exports=j,e.exports.default=e.exports})),A=i(a((function(e,n){var t;"undefined"!=typeof self&&self,t=function(){return 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,n,t){function r(e,n){return(r=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function o(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,r(e,n)}function i(){return(i=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function a(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&e instanceof window.constructor)return!1;var n={}.toString;if(n){var t=n.call(e);if("[object Window]"===t||"[object global]"===t||"[object DOMWindow]"===t)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}t.r(n),t.d(n,"PopupOpenError",(function(){return Be})),t.d(n,"create",(function(){return zt})),t.d(n,"destroy",(function(){return Yt})),t.d(n,"destroyComponents",(function(){return Bt})),t.d(n,"destroyAll",(function(){return Ut})),t.d(n,"PROP_TYPE",(function(){return wt})),t.d(n,"PROP_SERIALIZATION",(function(){return vt})),t.d(n,"CONTEXT",(function(){return mt})),t.d(n,"EVENT",(function(){return yt}));var u,c=[],s=[],d=0;function f(){if(!d&&u){var e=u;u=null,e.resolve()}}function l(){d+=1}function p(){d-=1,f()}var h=function(){function e(e){var n=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=[],e){var t,r,o=!1,i=!1,a=!1;l();try{e((function(e){a?n.resolve(e):(o=!0,t=e)}),(function(e){a?n.reject(e):(i=!0,r=e)}))}catch(e){return p(),void this.reject(e)}p(),a=!0,o?this.resolve(t):i&&this.reject(r)}}var n=e.prototype;return n.resolve=function(e){if(this.resolved||this.rejected)return this;if(a(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},n.reject=function(e){var n=this;if(this.resolved||this.rejected)return this;if(a(e))throw new Error("Can not reject promise with another promise");if(!e){var t=e&&"function"==typeof e.toString?e.toString():{}.toString.call(e);e=new Error("Expected reject to be called with Error, got "+t)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout((function(){n.errorHandled||function(e,n){if(-1===c.indexOf(e)){c.push(e),setTimeout((function(){throw e}),1);for(var t=0;t<s.length;t++)s[t](e,n)}}(e,n)}),1),this.dispatch(),this},n.asyncReject=function(e){return this.errorHandled=!0,this.reject(e),this},n.dispatch=function(){var n=this.resolved,t=this.rejected,r=this.handlers;if(!this.dispatching&&(n||t)){this.dispatching=!0,l();for(var o=function(e,n){return e.then((function(e){n.resolve(e)}),(function(e){n.reject(e)}))},i=0;i<r.length;i++){var u=r[i],c=u.onSuccess,s=u.onError,d=u.promise,f=void 0;if(n)try{f=c?c(this.value):this.value}catch(e){d.reject(e);continue}else if(t){if(!s){d.reject(this.error);continue}try{f=s(this.error)}catch(e){d.reject(e);continue}}if(f instanceof e&&(f.resolved||f.rejected)){var h=f;h.resolved?d.resolve(h.value):d.reject(h.error),h.errorHandled=!0}else a(f)?f instanceof e&&(f.resolved||f.rejected)?f.resolved?d.resolve(f.value):d.reject(f.error):o(f,d):d.resolve(f)}r.length=0,this.dispatching=!1,p()}},n.then=function(n,t){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for success handler");if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for error handler");var r=new e;return this.handlers.push({promise:r,onSuccess:n,onError:t}),this.errorHandled=!0,this.dispatch(),r},n.catch=function(e){return this.then(void 0,e)},n.finally=function(n){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.finally expected a function");return this.then((function(t){return e.try(n).then((function(){return t}))}),(function(t){return e.try(n).then((function(){throw t}))}))},n.timeout=function(e,n){var t=this;if(this.resolved||this.rejected)return this;var r=setTimeout((function(){t.resolved||t.rejected||t.reject(n||new Error("Promise timed out after "+e+"ms"))}),e);return this.then((function(e){return clearTimeout(r),e}))},n.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},n.lazy=function(){return this.errorHandled=!0,this},e.resolve=function(n){return n instanceof e?n:a(n)?new e((function(e,t){return n.then(e,t)})):(new e).resolve(n)},e.reject=function(n){return(new e).reject(n)},e.asyncReject=function(n){return(new e).asyncReject(n)},e.all=function(n){var t=new e,r=n.length,o=[].slice();if(!r)return t.resolve(o),t;for(var i=function(e,n,i){return n.then((function(n){o[e]=n,0==(r-=1)&&t.resolve(o)}),(function(e){i.reject(e)}))},u=0;u<n.length;u++){var c=n[u];if(c instanceof e){if(c.resolved){o[u]=c.value,r-=1;continue}}else if(!a(c)){o[u]=c,r-=1;continue}i(u,e.resolve(c),t)}return 0===r&&t.resolve(o),t},e.hash=function(n){var t={},r=[],o=function(e){if(n.hasOwnProperty(e)){var o=n[e];a(o)?r.push(o.then((function(n){t[e]=n}))):t[e]=o}};for(var i in n)o(i);return e.all(r).then((function(){return t}))},e.map=function(n,t){return e.all(n.map(t))},e.onPossiblyUnhandledException=function(e){return function(e){return s.push(e),{cancel:function(){s.splice(s.indexOf(e),1)}}}(e)},e.try=function(n,t,r){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.try expected a function");var o;l();try{o=n.apply(t,r||[])}catch(n){return p(),e.reject(n)}return p(),e.resolve(o)},e.delay=function(n){return new e((function(e){setTimeout(e,n)}))},e.isPromise=function(n){return!!(n&&n instanceof e)||a(n)},e.flush=function(){return n=u=u||new e,f(),n;var n},e}();function w(e){return"[object RegExp]"==={}.toString.call(e)}var v={IFRAME:"iframe",POPUP:"popup"},m="Call was rejected by callee.\r\n";function y(e){return void 0===e&&(e=window),e.location.protocol}function g(e){if(void 0===e&&(e=window),e.mockDomain){var n=e.mockDomain.split("//")[0];if(n)return n}return y(e)}function E(e){return void 0===e&&(e=window),"about:"===g(e)}function P(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}function b(e){if(void 0===e&&(e=window),e&&!P(e))try{return e.opener}catch(e){}}function _(e){try{return!0}catch(e){}return!1}function O(e){void 0===e&&(e=window);var n=e.location;if(!n)throw new Error("Can not read window location");var t=y(e);if(!t)throw new Error("Can not read window protocol");if("file:"===t)return"file://";if("about:"===t){var r=P(e);return r&&_()?O(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function T(e){void 0===e&&(e=window);var n=O(e);return n&&e.mockDomain&&0===e.mockDomain.indexOf("mock:")?e.mockDomain:n}function S(e){if(!function(e){try{if(e===window)return!0}catch(e){}try{var n=Object.getOwnPropertyDescriptor(e,"location");if(n&&!1===n.enumerable)return!1}catch(e){}try{if(E(e)&&_())return!0}catch(e){}try{if(function(e){return void 0===e&&(e=window),"mock:"===g(e)}(e)&&_())return!0}catch(e){}try{if(O(e)===O(window))return!0}catch(e){}return!1}(e))return!1;try{if(e===window)return!0;if(E(e)&&_())return!0;if(T(window)===T(e))return!0}catch(e){}return!1}function x(e){if(!S(e))throw new Error("Expected window to be same domain");return e}function I(e,n){if(!e||!n)return!1;var t=P(n);return t?t===e:-1!==function(e){var n=[];try{for(;e.parent!==e;)n.push(e.parent),e=e.parent}catch(e){}return n}(n).indexOf(e)}function N(e){var n,t,r=[];try{n=e.frames}catch(t){n=e}try{t=n.length}catch(e){}if(0===t)return r;if(t){for(var o=0;o<t;o++){var i=void 0;try{i=n[o]}catch(e){continue}r.push(i)}return r}for(var a=0;a<100;a++){var u=void 0;try{u=n[a]}catch(e){return r}if(!u)return r;r.push(u)}return r}function R(e){for(var n=[],t=0,r=N(e);t<r.length;t++){var o=r[t];n.push(o);for(var i=0,a=R(o);i<a.length;i++)n.push(a[i])}return n}function C(e){void 0===e&&(e=window);try{if(e.top)return e.top}catch(e){}if(P(e)===e)return e;try{if(I(window,e)&&window.top)return window.top}catch(e){}try{if(I(e,window)&&window.top)return window.top}catch(e){}for(var n=0,t=R(e);n<t.length;n++){var r=t[n];try{if(r.top)return r.top}catch(e){}if(P(r)===r)return r}}function k(e){var n=C(e);if(!n)throw new Error("Can not determine top window");var t=[].concat(R(n),[n]);return-1===t.indexOf(e)&&(t=[].concat(t,[e],R(e))),t}var j=[],W=[];function A(e,n){void 0===n&&(n=!0);try{if(e===window)return!1}catch(e){return!0}try{if(!e)return!0}catch(e){return!0}try{if(e.closed)return!0}catch(e){return!e||e.message!==m}if(n&&S(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}var t=function(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}(j,e);if(-1!==t){var r=W[t];if(r&&function(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var n=e.ownerDocument;if(n&&n.documentElement&&!n.documentElement.contains(e)){for(var t=e;t.parentNode&&t.parentNode!==t;)t=t.parentNode;if(!t.host||!n.documentElement.contains(t.host))return!0}return!1}(r))return!0}return!1}function L(e){return(e=e||window).navigator.mockUserAgent||e.navigator.userAgent}function D(e,n){for(var t=N(e),r=0;r<t.length;r++){var o=t[r];try{if(S(o)&&o.name===n&&-1!==t.indexOf(o))return o}catch(e){}}try{if(-1!==t.indexOf(e.frames[n]))return e.frames[n]}catch(e){}try{if(-1!==t.indexOf(e[n]))return e[n]}catch(e){}}function M(e,n){return e===b(n)}function q(e){return void 0===e&&(e=window),b(e=e||window)||P(e)||void 0}function F(e,n){for(var t=0;t<e.length;t++)for(var r=e[t],o=0;o<n.length;o++)if(r===n[o])return!0;return!1}function z(e){void 0===e&&(e=window);for(var n=0,t=e;t;)(t=P(t))&&(n+=1);return n}function B(e,n){var t=C(e)||e,r=C(n)||n;try{if(t&&r)return t===r}catch(e){}var o=k(e),i=k(n);if(F(o,i))return!0;var a=b(t),u=b(r);return a&&F(k(a),i)||u&&F(k(u),o),!1}function U(e,n){if("string"==typeof e){if("string"==typeof n)return"*"===e||n===e;if(w(n))return!1;if(Array.isArray(n))return!1}return w(e)?w(n)?e.toString()===n.toString():!Array.isArray(n)&&Boolean(n.match(e)):!!Array.isArray(e)&&(Array.isArray(n)?JSON.stringify(e)===JSON.stringify(n):!w(n)&&e.some((function(e){return U(e,n)})))}function Y(e){return e.match(/^(https?|mock|file):\/\//)?e.split("/").slice(0,3).join("/"):T()}function H(e,n,t,r){var o;return void 0===t&&(t=1e3),void 0===r&&(r=1/0),function i(){if(A(e))return o&&clearTimeout(o),n();r<=0?clearTimeout(o):(r-=t,o=setTimeout(i,t))}(),{cancel:function(){o&&clearTimeout(o)}}}function G(e){try{if(e===window)return!0}catch(e){if(e&&e.message===m)return!0}try{if("[object Window]"==={}.toString.call(e))return!0}catch(e){if(e&&e.message===m)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===m)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===m)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===m)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===m)return!0}try{if(e&&"__unlikely_value__"===e.__cross_domain_utils_window_check__)return!1}catch(e){return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch(e){}return!1}function V(e){if(0!==Y(e).indexOf("mock:"))return e;throw new Error("Mock urls not supported out of test mode")}function J(e){if(S(e))return x(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 $(e){if(function(e){return void 0===e&&(e=window),Boolean(P(e))}(e)){var n=J(e);if(n&&n.parentElement)return void n.parentElement.removeChild(n)}try{e.close()}catch(e){}}function Z(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}var X,K=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("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<n.length;t++){var r=n[t];if(G(r)&&A(r)){if(e)try{e.delete(r)}catch(e){}n.splice(t,1),this.values.splice(t,1),t-=1}}},n.isSafeToReadWrite=function(e){return!G(e)},n.set=function(e,n){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.set(e,n)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var r=this.name,o=e[r];return void(o&&o[0]===e?o[1]=n:Object.defineProperty(e,r,{value:[e,n],writable:!0}))}catch(e){}this._cleanupClosedWindows();var i=this.keys,a=this.values,u=Z(i,e);-1===u?(i.push(e),a.push(n)):a[u]=n},n.get=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return n.get(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return t&&t[0]===e?t[1]:void 0}catch(e){}this._cleanupClosedWindows();var r=Z(this.keys,e);if(-1!==r)return this.values[r]},n.delete=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{n.delete(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];t&&t[0]===e&&(t[0]=t[1]=void 0)}catch(e){}this._cleanupClosedWindows();var r=this.keys,o=Z(r,e);-1!==o&&(r.splice(o,1),this.values.splice(o,1))},n.has=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return!0}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return!(!t||t[0]!==e)}catch(e){}return this._cleanupClosedWindows(),-1!==Z(this.keys,e)},n.getOrSet=function(e,n){if(this.has(e))return this.get(e);var t=n();return this.set(e,t),t},e}();function Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ee(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function ne(e,n,t){return(ne=ee()?Reflect.construct:function(e,n,t){var o=[null];o.push.apply(o,n);var i=new(Function.bind.apply(e,o));return t&&r(i,t.prototype),i}).apply(null,arguments)}function te(e){var n="function"==typeof Map?new Map:void 0;return(te=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return ne(e,arguments,Q(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),r(t,e)})(e)}function re(e){var n=!1;try{(e instanceof window.Element||null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument)&&(n=!0)}catch(e){}return n}function oe(e){return e.name||e.__name__||e.displayName||"anonymous"}function ie(e,n){try{delete e.name,e.name=n}catch(e){}return e.__name__=e.displayName=n,e}function ae(e){if("function"==typeof btoa)return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,n){return String.fromCharCode(parseInt(n,16))}))).replace(/[=]/g,"");if("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64").replace(/[=]/g,"");throw new Error("Can not find window.btoa or Buffer")}function ue(){var e="0123456789abcdef";return"uid_"+"xxxxxxxxxx".replace(/./g,(function(){return e.charAt(Math.floor(Math.random()*e.length))}))+"_"+ae((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function ce(e){try{return JSON.stringify([].slice.call(e),(function(e,n){return"function"==typeof n?"memoize["+function(e){if(X=X||new K,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");var n=X.get(e);return n||(n=typeof e+":"+ue(),X.set(e,n)),n}(n)+"]":re(n)?{}:n}))}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function se(){return{}}var de=0,fe=0;function le(e,n){void 0===n&&(n={});var t,r,o=n.thisNamespace,i=void 0!==o&&o,a=n.time,u=de;de+=1;var c=function(){for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];var s,d;u<fe&&(t=null,r=null,u=de,de+=1),s=i?(r=r||new K).getOrSet(this,se):t=t||{};try{d=ce(o)}catch(n){return e.apply(this,arguments)}var f=s[d];if(f&&a&&Date.now()-f.time<a&&(delete s[d],f=null),f)return f.value;var l=Date.now(),p=e.apply(this,arguments);return s[d]={time:l,value:p},p};return c.reset=function(){t=null,r=null},ie(c,(n.name||oe(e))+"::memoized")}function pe(e){var n={};function t(){for(var t=arguments,r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var u=ce(i);return n.hasOwnProperty(u)||(n[u]=h.try((function(){return e.apply(r,t)})).finally((function(){delete n[u]}))),n[u]}return t.reset=function(){n={}},ie(t,oe(e)+"::promiseMemoized")}function he(){}function we(e){var n=!1;return ie((function(){if(!n)return n=!0,e.apply(this,arguments)}),oe(e)+"::once")}function ve(e,n){if(void 0===n&&(n=1),n>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";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 me(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 ge(e){return e}function Ee(e,n){var t;return function r(){t=setTimeout((function(){e(),r()}),n)}(),{cancel:function(){clearTimeout(t)}}}function Pe(e){return e.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))}function be(e,n,t){if(Array.isArray(e)){if("number"!=typeof n)throw new TypeError("Array key must be number")}else if("object"==typeof e&&null!==e&&"string"!=typeof n)throw new TypeError("Object key must be string");Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get:function(){delete e[n];var r=t();return e[n]=r,r},set:function(t){delete e[n],e[n]=t}})}function _e(e){return[].slice.call(e)}function Oe(e){return"object"==typeof(n=e)&&null!==n&&"[object Object]"==={}.toString.call(e);var n}function Te(e){if(!Oe(e))return!1;var n=e.constructor;if("function"!=typeof n)return!1;var t=n.prototype;return!!Oe(t)&&!!t.hasOwnProperty("isPrototypeOf")}function Se(e,n,t){if(void 0===t&&(t=""),Array.isArray(e)){for(var r=e.length,o=[],i=function(r){be(o,r,(function(){var o=t?t+"."+r:""+r,i=n(e[r],r,o);return(Te(i)||Array.isArray(i))&&(i=Se(i,n,o)),i}))},a=0;a<r;a++)i(a);return o}if(Te(e)){var u={},c=function(r){if(!e.hasOwnProperty(r))return 1;be(u,r,(function(){var o=t?t+"."+r:""+r,i=n(e[r],r,o);return(Te(i)||Array.isArray(i))&&(i=Se(i,n,o)),i}))};for(var s in e)c(s);return u}throw new Error("Pass an object or array")}function xe(e){return null!=e}function Ie(e){return"[object RegExp]"==={}.toString.call(e)}function Ne(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function Re(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=we((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 h.all(o).then(he)}};return o}function Ce(e,n){if(null==n)throw new Error("Expected "+e+" to be present");return n}le.clear=function(){fe=de},le((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 ke=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 o(n,e),n}(te(Error));function je(){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 Ae(){return Boolean(document.body)&&"interactive"===document.readyState}function Le(e){return encodeURIComponent(e)}function De(e){return function(n,t,r){void 0===r&&(r=[]);var o=n.__inline_memoize_cache__=n.__inline_memoize_cache__||{},i=ce(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<r.length;t++){var o=r[t];(o=o.split("="))[0]&&o[1]&&(n[decodeURIComponent(o[0])]=decodeURIComponent(o[1]))}return n}.apply(void 0,r)}(De,0,[e])}function Me(e,n){return void 0===n&&(n={}),n&&Object.keys(n).length?(void 0===(t=i({},De(e),n))&&(t={}),Object.keys(t).filter((function(e){return"string"==typeof t[e]||"boolean"==typeof t[e]})).map((function(e){var n=t[e];if("string"!=typeof n&&"boolean"!=typeof n)throw new TypeError("Invalid type for query");return Le(e)+"="+Le(n.toString())})).join("&")):e;var t}function qe(e,n){return void 0===n&&(n=document),re(e)?e:"string"==typeof e?n.querySelector(e):void 0}function Fe(e){return new h((function(n,t){var r=me(e),o=qe(e);if(o)return n(o);if(We())return t(new Error("Document is ready and element "+r+" does not exist"));var i=setInterval((function(){if(o=qe(e))n(o),clearInterval(i);else if(We())return clearInterval(i),t(new Error("Document is ready and element "+r+" does not exist"))}),10)}))}le((function(){return new h((function(e){if(We()||Ae())return e();var n=setInterval((function(){if(We()||Ae())return clearInterval(n),e()}),10)}))}));var ze,Be=function(e){function n(){return e.apply(this,arguments)||this}return o(n,e),n}(ke);function Ue(e){if((ze=ze||new K).has(e)){var n=ze.get(e);if(n)return n}var t=new h((function(n,t){e.addEventListener("load",(function(){!function(e){if(function(){for(var e=0;e<j.length;e++){var n=!1;try{n=j[e].closed}catch(e){}n&&(W.splice(e,1),j.splice(e,1))}}(),e&&e.contentWindow)try{j.push(e.contentWindow),W.push(e)}catch(e){}}(e),n(e)})),e.addEventListener("error",(function(r){e.contentWindow?n(e):t(r)}))}));return ze.set(e,t),t}function Ye(e){return Ue(e).then((function(e){if(!e.contentWindow)throw new Error("Could not find window in iframe");return e.contentWindow}))}function He(e,n){void 0===e&&(e={});var t=e.style||{},r=function(e,n,t){void 0===e&&(e="div"),void 0===n&&(n={}),e=e.toLowerCase();var r,o,i,a=document.createElement(e);if(n.style&&ye(a.style,n.style),n.class&&(a.className=n.class.join(" ")),n.id&&a.setAttribute("id",n.id),n.attributes)for(var u=0,c=Object.keys(n.attributes);u<c.length;u++){var s=c[u];a.setAttribute(s,n.attributes[s])}if(n.styleSheet&&(r=a,o=n.styleSheet,void 0===i&&(i=window.document),r.styleSheet?r.styleSheet.cssText=o:r.appendChild(i.createTextNode(o))),n.html){if("iframe"===e)throw new Error("Iframe html can not be written unless container provided and iframe in DOM");a.innerHTML=n.html}return a}("iframe",{attributes:i({allowTransparency:"true"},e.attributes||{}),style:i({backgroundColor:"transparent",border:"none"},t),html:e.html,class:e.class}),o=window.navigator.userAgent.match(/MSIE|Edge/i);return r.hasAttribute("id")||r.setAttribute("id",ue()),Ue(r),n&&function(e,n){void 0===n&&(n=document);var t=qe(e,n);if(t)return t;throw new Error("Can not find element: "+me(e))}(n).appendChild(r),(e.url||o)&&r.setAttribute("src",e.url||"about:blank"),r}function Ge(e,n,t){return e.addEventListener(n,t),{cancel:function(){e.removeEventListener(n,t)}}}function Ve(e){e.style.setProperty("display","")}function Je(e){e.style.setProperty("display","none","important")}function $e(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Ze(e){return!(e&&e.parentNode&&e.ownerDocument&&e.ownerDocument.documentElement&&e.ownerDocument.documentElement.contains(e))}function Xe(e,n,t){var r=void 0===t?{}:t,o=r.width,i=void 0===o||o,a=r.height,u=void 0===a||a,c=r.interval,s=void 0===c?100:c,d=r.win,f=void 0===d?window:d,l=e.offsetWidth,p=e.offsetHeight,h=!1;n({width:l,height:p});var w,v,m=function(){if(!h&&function(e){return Boolean(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}(e)){var t=e.offsetWidth,r=e.offsetHeight;(i&&t!==l||u&&r!==p)&&n({width:t,height:r}),l=t,p=r}};return f.addEventListener("resize",m),void 0!==f.ResizeObserver?((w=new f.ResizeObserver(m)).observe(e),v=Ee(m,10*s)):void 0!==f.MutationObserver?((w=new f.MutationObserver(m)).observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!1}),v=Ee(m,10*s)):v=Ee(m,s),{cancel:function(){h=!0,w.disconnect(),window.removeEventListener("resize",m),v.cancel()}}}function Ke(e){for(;e.parentNode;)e=e.parentNode;return"[object ShadowRoot]"===e.toString()}var Qe="undefined"!=typeof document?document.currentScript:null,en=le((function(){if(Qe)return Qe;if(Qe=function(){try{var e=function(){try{throw new Error("_")}catch(e){return e.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(e){}}())return Qe;throw new Error("Can not determine current script")})),nn=ue();function tn(e){return"string"==typeof e&&/^[0-9]+%$/.test(e)}function rn(e){if("number"==typeof e)return e;var n=e.match(/^([0-9]+)(px|%)$/);if(!n)throw new Error("Could not match css value from "+e);return parseInt(n[1],10)}function on(e){return rn(e)+"px"}function an(e){return"number"==typeof e?on(e):tn(e)?e:on(e)}function un(e,n){if("number"==typeof e)return e;if(tn(e))return parseInt(n*rn(e)/100,10);if("string"==typeof(t=e)&&/^[0-9]+px$/.test(t))return rn(e);var t;throw new Error("Can not normalize dimension: "+e)}function cn(e){void 0===e&&(e=window);var n="__post_robot_11_0_0__";return e!==window?e[n]:e[n]=e[n]||{}}le((function(){var e;try{e=en()}catch(e){return nn}var n=e.getAttribute("data-uid");if(n&&"string"==typeof n)return n;if((n=e.getAttribute("data-uid-auto"))&&"string"==typeof n)return n;if(e.src){var t=function(e){for(var n="",t=0;t<e.length;t++){var r=e[t].charCodeAt(0)*t;e[t+1]&&(r+=e[t+1].charCodeAt(0)*(t-1)),n+=String.fromCharCode(97+Math.abs(r)%26)}return n}(JSON.stringify({src:e.src,dataset:e.dataset}));n="uid_"+t.slice(t.length-30)}else n=ue();return e.setAttribute("data-uid-auto",n),n}));var sn=function(){return{}};function dn(e,n){return void 0===e&&(e="store"),void 0===n&&(n=sn),Ne(cn(),e,(function(){var e=n();return{has:function(n){return e.hasOwnProperty(n)},get:function(n,t){return e.hasOwnProperty(n)?e[n]:t},set:function(n,t){return e[n]=t,t},del:function(n){delete e[n]},getOrSet:function(n,t){return Ne(e,n,t)},reset:function(){e=n()},keys:function(){return Object.keys(e)}}}))}var fn,ln=function(){};function pn(){var e=cn();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new ln,e.WINDOW_WILDCARD}function hn(e,n){return void 0===e&&(e="store"),void 0===n&&(n=sn),dn("windowStore").getOrSet(e,(function(){var t=new K,r=function(e){return t.getOrSet(e,n)};return{has:function(n){return r(n).hasOwnProperty(e)},get:function(n,t){var o=r(n);return o.hasOwnProperty(e)?o[e]:t},set:function(n,t){return r(n)[e]=t,t},del:function(n){delete r(n)[e]},getOrSet:function(n,t){return Ne(r(n),e,t)}}}))}function wn(){return dn("instance").getOrSet("instanceID",ue)}function vn(e,n){var t=n.domain,r=hn("helloPromises"),o=r.get(e);o&&o.resolve({domain:t});var i=h.resolve({domain:t});return r.set(e,i),i}function mn(e,n){return(0,n.send)(e,"postrobot_hello",{instanceID:wn()},{domain:"*",timeout:-1}).then((function(n){var t=n.origin,r=n.data.instanceID;return vn(e,{domain:t}),{win:e,domain:t,instanceID:r}}))}function yn(e,n){var t=n.send;return hn("windowInstanceIDPromises").getOrSet(e,(function(){return mn(e,{send:t}).then((function(e){return e.instanceID}))}))}function gn(e,n,t){void 0===n&&(n=5e3),void 0===t&&(t="Window");var r=function(e){return hn("helloPromises").getOrSet(e,(function(){return new h}))}(e);return-1!==n&&(r=r.timeout(n,new Error(t+" did not load after "+n+"ms"))),r}function En(e){hn("knownWindows").set(e,!0)}function Pn(e){return"object"==typeof e&&null!==e&&"string"==typeof e.__type__}function bn(e){return void 0===e?"undefined":null===e?"null":Array.isArray(e)?"array":"function"==typeof e?"function":"object"==typeof e?e instanceof Error?"error":"function"==typeof e.then?"promise":"[object RegExp]"==={}.toString.call(e)?"regex":"[object Date]"==={}.toString.call(e)?"date":"object":"string"==typeof e?"string":"number"==typeof e?"number":"boolean"==typeof e?"boolean":void 0}function _n(e,n){return{__type__:e,__val__:n}}var On,Tn=((fn={}).function=function(){},fn.error=function(e){return _n("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},fn.promise=function(){},fn.regex=function(e){return _n("regex",e.source)},fn.date=function(e){return _n("date",e.toJSON())},fn.array=function(e){return e},fn.object=function(e){return e},fn.string=function(e){return e},fn.number=function(e){return e},fn.boolean=function(e){return e},fn.null=function(e){return e},fn[void 0]=function(e){return _n("undefined",e)},fn),Sn={},xn=((On={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},On.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+"\n\n"+o.stack,o},On.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},On.regex=function(e){return new RegExp(e)},On.date=function(e){return new Date(e)},On.array=function(e){return e},On.object=function(e){return e},On.string=function(e){return e},On.number=function(e){return e},On.boolean=function(e){return e},On.null=function(e){return e},On[void 0]=function(){},On),In={};function Nn(){return!!L(window).match(/MSIE|trident|edge\/12|edge\/13/i)}function Rn(e){return!B(window,e)}function Cn(e,n){if(e){if(T()!==Y(e))return!0}else if(n&&!S(n))return!0;return!1}function kn(e){var n=e.win,t=e.domain;return!(!Nn()||t&&!Cn(t,n)||n&&!Rn(n))}function jn(e){return"__postrobot_bridge___"+(e=e||Y(e)).replace(/[^a-zA-Z0-9]+/g,"_")}function Wn(){return Boolean(window.name&&window.name===jn(T()))}var An=new h((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 Ln(e){hn("remoteWindowPromises").getOrSet(e,(function(){return new h}))}function Dn(e){var n=hn("remoteWindowPromises").get(e);if(!n)throw new Error("Remote window promise not found");return n}function Mn(e,n,t){Dn(e).resolve((function(r,o,i){if(r!==e)throw new Error("Remote window does not match window");if(!U(o,n))throw new Error("Remote domain "+o+" does not match domain "+n);t.fireAndForget(i)}))}function qn(e,n){Dn(e).reject(n).catch(he)}function Fn(e){for(var n=e.win,t=e.name,r=e.domain,o=dn("popupWindowsByName"),i=hn("popupWindowsByWin"),a=0,u=o.keys();a<u.length;a++){var c=u[a],s=o.get(c);s&&!A(s.win)||o.del(c)}if(A(n))return{win:n,name:t,domain:r};var d=i.getOrSet(n,(function(){return t?o.getOrSet(t,(function(){return{win:n,name:t}})):{win:n}}));if(d.win&&d.win!==n)throw new Error("Different window already linked for window: "+(t||"undefined"));return t&&(d.name=t,o.set(t,d)),r&&(d.domain=r,Ln(n)),i.set(n,d),d}function zn(e){var n,t=e.on,r=e.send,o=e.receiveMessage;n=window.open,window.open=function(e,t,r,o){var i=n.call(this,V(e),t,r,o);return i?(Fn({win:i,name:t,domain:e?Y(e):null}),i):i},function(e){var n=e.on,t=e.send,r=e.receiveMessage,o=dn("popupWindowsByName");n("postrobot_open_tunnel",(function(e){var i=e.source,a=e.origin,u=e.data,c=dn("bridges").get(a);if(!c)throw new Error("Can not find bridge promise for domain "+a);return c.then((function(e){if(i!==e)throw new Error("Message source does not matched registered bridge for domain "+a);if(!u.name)throw new Error("Register window expected to be passed window name");if(!u.sendMessage)throw new Error("Register window expected to be passed sendMessage method");if(!o.has(u.name))throw new Error("Window with name "+u.name+" does not exist, or was not opened by this window");var c=function(){return o.get(u.name)};if(!c().domain)throw new Error("We do not have a registered domain for window "+u.name);if(c().domain!==a)throw new Error("Message origin "+a+" does not matched registered window origin "+(c().domain||"unknown"));return Mn(c().win,a,u.sendMessage),{sendMessage:function(e){if(window&&!window.closed&&c()){var o=c().domain;if(o)try{r({data:e,origin:o,source:c().win},{on:n,send:t})}catch(e){h.reject(e)}}}}}))}))}({on:t,send:r,receiveMessage:o}),function(e){var n=e.send;cn(window).openTunnelToParent=function(e){var t=e.name,r=e.source,o=e.canary,i=e.sendMessage,a=dn("tunnelWindows"),u=P(window);if(!u)throw new Error("No parent window found to open tunnel to");var c=function(e){var n=e.name,t=e.source,r=e.canary,o=e.sendMessage;!function(){for(var e=dn("tunnelWindows"),n=0,t=e.keys();n<t.length;n++){var r=t[n];A(e[r].source)&&e.del(r)}}();var i=ue();return dn("tunnelWindows").set(i,{name:n,source:t,canary:r,sendMessage:o}),i}({name:t,source:r,canary:o,sendMessage:i});return n(u,"postrobot_open_tunnel",{name:t,sendMessage:function(){var e=a.get(c);if(e&&e.source&&!A(e.source)){try{e.canary()}catch(e){return}e.sendMessage.apply(this,arguments)}}},{domain:"*"})}}({send:r}),function(e){var n=e.on,t=e.send,r=e.receiveMessage;h.try((function(){var e,o=b(window);if(o&&kn({win:o}))return Ln(o),(e=o,hn("remoteBridgeAwaiters").getOrSet(e,(function(){return h.try((function(){var n=D(e,jn(T()));if(n)return S(n)&&cn(x(n))?n:new h((function(e){var t,r;t=setInterval((function(){if(n&&S(n)&&cn(x(n)))return clearInterval(t),clearTimeout(r),e(n)}),100),r=setTimeout((function(){return clearInterval(t),e()}),2e3)}))}))}))).then((function(e){return e?window.name?cn(x(e)).openTunnelToParent({name:window.name,source:window,canary:function(){},sendMessage:function(e){try{window}catch(e){return}if(window&&!window.closed)try{r({data:e,origin:this.origin,source:this.source},{on:n,send:t})}catch(e){h.reject(e)}}}).then((function(e){var n=e.source,t=e.origin,r=e.data;if(n!==o)throw new Error("Source does not match opener");Mn(n,t,r.sendMessage)})).catch((function(e){throw qn(o,e),e})):qn(o,new Error("Can not register with opener: window does not have a name")):qn(o,new Error("Can not register with opener: no bridge found in opener"))}))}))}({on:t,send:r,receiveMessage:o})}function Bn(){for(var e=dn("idToProxyWindow"),n=0,t=e.keys();n<t.length;n++){var r=t[n];e.get(r).shouldClean()&&e.del(r)}}function Un(e,n){var t=n.send,r=n.id,o=void 0===r?ue():r,i=e.then((function(e){if(S(e))return x(e).name})),a=e.then((function(e){if(A(e))throw new Error("Window is closed, can not determine type");return b(e)?v.POPUP:v.IFRAME}));i.catch(he),a.catch(he);var u=function(){return e.then((function(e){if(!A(e))return S(e)?x(e).name:i}))};return{id:o,getType:function(){return a},getInstanceID:pe((function(){return e.then((function(e){return yn(e,{send:t})}))})),close:function(){return e.then($)},getName:u,focus:function(){return e.then((function(e){e.focus()}))},isClosed:function(){return e.then((function(e){return A(e)}))},setLocation:function(n,t){return void 0===t&&(t={}),e.then((function(e){var r=window.location.protocol+"//"+window.location.host,o=t.method,i=void 0===o?"get":o,a=t.body;if(0===n.indexOf("/"))n=""+r+n;else if(!n.match(/^https?:\/\//)&&0!==n.indexOf(r))throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(n));if("post"===i)return u().then((function(e){if(!e)throw new Error("Can not post to window without target name");!function(e){var n=e.url,t=e.target,r=e.body,o=e.method,i=void 0===o?"post":o,a=document.createElement("form");if(a.setAttribute("target",t),a.setAttribute("method",i),a.setAttribute("action",n),a.style.display="none",r)for(var u=0,c=Object.keys(r);u<c.length;u++){var s,d=c[u],f=document.createElement("input");f.setAttribute("name",d),f.setAttribute("value",null==(s=r[d])?void 0:s.toString()),a.appendChild(f)}je().appendChild(a),a.submit(),je().removeChild(a)}({url:n,target:e,method:i,body:a})}));if("get"!==i)throw new Error("Unsupported method: "+i);if(S(e))try{if(e.location&&"function"==typeof e.location.replace)return void e.location.replace(n)}catch(e){}e.location=n}))},setName:function(n){return e.then((function(e){Fn({win:e,name:n});var t=S(e),r=J(e);if(!t)throw new Error("Can not set name for cross-domain window: "+n);x(e).name=n,r&&r.setAttribute("name",n),i=h.resolve(n)}))}}}var Yn=function(){function e(e){var n=e.send,t=e.win,r=e.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 h,this.serializedWindow=r||Un(this.actualWindowPromise,{send:n}),dn("idToProxyWindow").set(this.getID(),this),t&&this.setWindow(t,{send:n})}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(e){return e===v.POPUP}))},n.setLocation=function(e,n){var t=this;return this.serializedWindow.setLocation(e,n).then((function(){return t}))},n.getName=function(){return this.serializedWindow.getName()},n.setName=function(e){var n=this;return this.serializedWindow.setName(e).then((function(){return n}))},n.close=function(){var e=this;return this.serializedWindow.close().then((function(){return e}))},n.focus=function(){var e=this,n=this.isPopup(),t=this.getName(),r=h.hash({isPopup:n,name:t}).then((function(e){var n=e.name;e.isPopup&&n&&window.open("",n,"noopener")})),o=this.serializedWindow.focus();return h.all([r,o]).then((function(){return e}))},n.isClosed=function(){return this.serializedWindow.isClosed()},n.getWindow=function(){return this.actualWindow},n.setWindow=function(e,n){var t=n.send;this.actualWindow=e,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=Un(this.actualWindowPromise,{send:t,id:this.getID()}),hn("winToProxyWindow").set(e,this)},n.awaitWindow=function(){return this.actualWindowPromise},n.matchWindow=function(e,n){var t=this,r=n.send;return h.try((function(){return t.actualWindow?e===t.actualWindow:h.hash({proxyInstanceID:t.getInstanceID(),knownWindowInstanceID:yn(e,{send:r})}).then((function(n){var o=n.proxyInstanceID===n.knownWindowInstanceID;return o&&t.setWindow(e,{send:r}),o}))}))},n.unwrap=function(){return this.actualWindow||this},n.getInstanceID=function(){return this.serializedWindow.getInstanceID()},n.shouldClean=function(){return Boolean(this.actualWindow&&A(this.actualWindow))},n.serialize=function(){return this.serializedWindow},e.unwrap=function(n){return e.isProxyWindow(n)?n.unwrap():n},e.serialize=function(n,t){var r=t.send;return Bn(),e.toProxyWindow(n,{send:r}).serialize()},e.deserialize=function(n,t){var r=t.send;return Bn(),dn("idToProxyWindow").get(n.id)||new e({serializedWindow:n,send:r})},e.isProxyWindow=function(e){return Boolean(e&&!G(e)&&e.isProxyWindow)},e.toProxyWindow=function(n,t){var r=t.send;if(Bn(),e.isProxyWindow(n))return n;var o=n;return hn("winToProxyWindow").get(o)||new e({win:o,send:r})},e}();function Hn(e,n,t,r,o){var i=hn("methodStore"),a=dn("proxyWindowMethods");Yn.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 Gn(e,n){var t=hn("methodStore"),r=dn("proxyWindowMethods");return t.getOrSet(e,(function(){return{}}))[n]||r.get(n)}function Vn(e,n,t,r,o){var i,a,u;a=(i={on:o.on,send:o.send}).on,u=i.send,dn("builtinListeners").getOrSet("functionCalls",(function(){return a("postrobot_method",{domain:"*"},(function(e){var n=e.source,t=e.origin,r=e.data,o=r.id,i=r.name,a=Gn(n,o);if(!a)throw new Error("Could not find method '"+i+"' with id: "+r.id+" in "+T(window));var c=a.source,s=a.domain,d=a.val;return h.try((function(){if(!U(s,t))throw new Error("Method '"+r.name+"' domain "+JSON.stringify(Ie(a.domain)?a.domain.source:a.domain)+" does not match origin "+t+" in "+T(window));if(Yn.isProxyWindow(c))return c.matchWindow(n,{send:u}).then((function(e){if(!e)throw new Error("Method call '"+r.name+"' failed - proxy window does not match source in "+T(window))}))})).then((function(){return d.apply({source:n,origin:t},r.args)}),(function(e){return h.try((function(){if(d.onError)return d.onError(e)})).then((function(){var n;throw e.stack&&(e.stack="Remote call to "+i+"("+(void 0===(n=r.args)&&(n=[]),_e(n).map((function(e){return"string"==typeof e?"'"+e+"'":void 0===e?"undefined":null===e?"null":"boolean"==typeof e?e.toString():Array.isArray(e)?"[ ... ]":"object"==typeof e?"{ ... }":"function"==typeof e?"() => { ... }":"<"+typeof e+">"})).join(", ")+") failed\n\n")+e.stack),e}))})).then((function(e){return{result:e,id:o,name:i}}))}))}));var c=t.__id__||ue();e=Yn.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+"::")),Yn.isProxyWindow(e)?(Hn(c,t,s,e,n),e.awaitWindow().then((function(e){Hn(c,t,s,e,n)}))):Hn(c,t,s,e,n),_n("cross_domain_function",{id:c,name:s})}function Jn(e,n,t,r){var o,i=r.on,a=r.send;return function(e,n){void 0===n&&(n=Sn);var t=JSON.stringify(e,(function(e){var t=this[e];if(Pn(this))return t;var r=bn(t);if(!r)return t;var o=n[r]||Tn[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 _n("cross_domain_zalgo_promise",{then:Vn(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 Vn(e,n,t,r,{on:i,send:a})},o.object=function(e){return G(e)||Yn.isProxyWindow(e)?_n("cross_domain_window",Yn.serialize(e,{send:a})):e},o))}function $n(e,n,t,r){var o,i=r.send;return function(e,n){if(void 0===n&&(n=In),"undefined"!==e)return JSON.parse(e,(function(e,t){if(Pn(this))return t;var r,o;if(Pn(t)?(r=t.__type__,o=t.__val__):(r=bn(t),o=t),!r)return o;var i=n[r]||xn[r];return i?i(o,e):o}))}(t,((o={}).cross_domain_zalgo_promise=function(e){return function(e,n,t){return new h(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 Yn.toProxyWindow(e,{send:a}).awaitWindow().then((function(e){var c=Gn(e,o);if(c&&c.val!==r)return c.val.apply({source:window,origin:T()},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 Yn.deserialize(e,{send:i})},o))}var Zn={};function Xn(e,n,t,r){var o=r.on,i=r.send;return h.try((function(){var r=hn().getOrSet(e,(function(){return{}}));return r.buffer=r.buffer||[],r.buffer.push(t),r.flush=r.flush||h.flush().then((function(){if(A(e))throw new Error("Window is closed");var t,a=Jn(e,n,((t={}).__post_robot_11_0_0__=r.buffer||[],t),{on:o,send:i});delete r.buffer;for(var u=Object.keys(Zn),c=[],s=0;s<u.length;s++){var d=u[s];try{Zn[d](e,a,n)}catch(e){c.push(e)}}if(c.length===u.length)throw new Error("All post-robot messaging strategies failed:\n\n"+c.map((function(e,n){return n+". "+ve(e)})).join("\n\n"))})),r.flush.then((function(){delete r.flush}))})).then(he)}function Kn(e){return dn("responseListeners").get(e)}function Qn(e){dn("responseListeners").del(e)}function et(e){return dn("erroredResponseListeners").has(e)}function nt(e){var n=e.name,t=e.win,r=e.domain,o=hn("requestListeners");if("*"===t&&(t=null),"*"===r&&(r=null),!n)throw new Error("Name required to get request listener");for(var i=0,a=[t,pn()];i<a.length;i++){var u=a[i];if(u){var c=o.get(u);if(c){var s=c[n];if(s){if(r&&"string"==typeof r){if(s[r])return s[r];if(s.__domain_regex__)for(var d=0,f=s.__domain_regex__;d<f.length;d++){var l=f[d],p=l.listener;if(U(l.regex,r))return p}}if(s["*"])return s["*"]}}}}}function tt(e,n){var t=n.on,r=n.send,o=dn("receivedMessages");try{if(!window||window.closed||!e.source)return}catch(e){return}var i=e.source,a=e.origin,u=function(e,n,t,r){var o,i=r.on,a=r.send;try{o=$n(n,t,e,{on:i,send:a})}catch(e){return}if(o&&"object"==typeof o&&null!==o){var u=o.__post_robot_11_0_0__;if(Array.isArray(u))return u}}(e.data,i,a,{on:t,send:r});if(u){En(i);for(var c,s=function(){var e=u[d];if(o.has(e.id))return{v:void 0};if(o.set(e.id,!0),A(i)&&!e.fireAndForget)return{v:void 0};0===e.origin.indexOf("file:")&&(a="file://");try{"postrobot_message_request"===e.type?function(e,n,t,r){var o=r.on,i=r.send,a=nt({name:t.name,win:e,domain:n}),u="postrobot_method"===t.name&&t.data&&"string"==typeof t.data.name?t.data.name+"()":t.name;function c(r,a,c){return h.flush().then((function(){if(!t.fireAndForget&&!A(e))try{return Xn(e,n,{id:ue(),origin:T(window),type:"postrobot_message_response",hash:t.hash,name:t.name,ack:r,data:a,error:c},{on:o,send:i})}catch(e){throw new Error("Send response message failed for "+u+" in "+T()+"\n\n"+ve(e))}}))}h.all([h.flush().then((function(){if(!t.fireAndForget&&!A(e))try{return Xn(e,n,{id:ue(),origin:T(window),type:"postrobot_message_ack",hash:t.hash,name:t.name},{on:o,send:i})}catch(e){throw new Error("Send ack message failed for "+u+" in "+T()+"\n\n"+ve(e))}})),h.try((function(){if(!a)throw new Error("No handler found for post message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);return a.handler({source:e,origin:n,data:t.data})})).then((function(e){return c("success",e)}),(function(e){return c("error",null,e)}))]).then(he).catch((function(e){if(a&&a.handleError)return a.handleError(e);throw e}))}(i,a,e,{on:t,send:r}):"postrobot_message_response"===e.type?function(e,n,t){if(!et(t.hash)){var r,o=Kn(t.hash);if(!o)throw new Error("No handler found for post message response for message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!U(o.domain,n))throw new Error("Response origin "+n+" does not match domain "+(r=o.domain,Array.isArray(r)?"("+r.join(" | ")+")":w(r)?"RegExp("+r.toString()+")":r.toString()));if(e!==o.win)throw new Error("Response source does not match registered window");Qn(t.hash),"error"===t.ack?o.promise.reject(t.error):"success"===t.ack&&o.promise.resolve({source:e,origin:n,data:t.data})}}(i,a,e):"postrobot_message_ack"===e.type&&function(e,n,t){if(!et(t.hash)){var r=Kn(t.hash);if(!r)throw new Error("No handler found for post message ack for message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);try{if(!U(r.domain,n))throw new Error("Ack origin "+n+" does not match domain "+r.domain.toString());if(e!==r.win)throw new Error("Ack source does not match registered window")}catch(e){r.promise.reject(e)}r.ack=!0}}(i,a,e)}catch(e){setTimeout((function(){throw e}),0)}},d=0;d<u.length;d++)if(c=s())return c.v}}function rt(e,n,t){if(!e)throw new Error("Expected name");if("function"==typeof(n=n||{})&&(t=n,n={}),!t)throw new Error("Expected handler");var r=function e(n,t){var r=n.name,o=n.win,i=n.domain,a=hn("requestListeners");if(!r||"string"!=typeof r)throw new Error("Name required to add request listener");if(o&&"*"!==o&&Yn.isProxyWindow(o)){var u=o.awaitWindow().then((function(n){return e({name:r,win:n,domain:i},t)}));return{cancel:function(){u.then((function(e){return e.cancel()}),he)}}}var c=o;if(Array.isArray(c)){for(var s=[],d=0,f=c;d<f.length;d++)s.push(e({name:r,domain:i,win:f[d]},t));return{cancel:function(){for(var e=0;e<s.length;e++)s[e].cancel()}}}if(Array.isArray(i)){for(var l=[],p=0,h=i;p<h.length;p++)l.push(e({name:r,win:c,domain:h[p]},t));return{cancel:function(){for(var e=0;e<l.length;e++)l[e].cancel()}}}var w=nt({name:r,win:c,domain:i});c&&"*"!==c||(c=pn());var v=(i=i||"*").toString();if(w)throw c&&i?new Error("Request listener already exists for "+r+" on domain "+i.toString()+" for "+(c===pn()?"wildcard":"specified")+" window"):c?new Error("Request listener already exists for "+r+" for "+(c===pn()?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+r+" on domain "+i.toString()):new Error("Request listener already exists for "+r);var m,y,g=a.getOrSet(c,(function(){return{}})),E=Ne(g,r,(function(){return{}}));return Ie(i)?(m=Ne(E,"__domain_regex__",(function(){return[]}))).push(y={regex:i,listener:t}):E[v]=t,{cancel:function(){delete E[v],y&&(m.splice(m.indexOf(y,1)),m.length||delete E.__domain_regex__),Object.keys(E).length||delete g[r],c&&!Object.keys(g).length&&a.del(c)}}}({name:e,win:n.window,domain:n.domain||"*"},{handler:t||n.handler,handleError:n.errorHandler||function(e){throw e}});return{cancel:function(){r.cancel()}}}Zn.postrobot_post_message=function(e,n,t){0===t.indexOf("file:")&&(t="*"),e.postMessage(n,t)},Zn.postrobot_bridge=function(e,n,t){if(!Nn()&&!Wn())throw new Error("Bridge not needed for browser");if(S(e))throw new Error("Post message through bridge disabled between same domain windows");if(!1!==B(window,e))throw new Error("Can only use bridge to communicate between two different windows, not between frames");!function(e,n,t){var r=M(window,e),o=M(e,window);if(!r&&!o)throw new Error("Can only send messages to and from parent and popup windows");Dn(e).then((function(r){return r(e,n,t)}))}(e,t,n)},Zn.postrobot_global=function(e,n){if(!L(window).match(/MSIE|rv:11|trident|edge\/12|edge\/13/i))throw new Error("Global messaging not needed for browser");if(!S(e))throw new Error("Post message through global disabled between different domain windows");if(!1!==B(window,e))throw new Error("Can only use global to communicate between two different windows, not between frames");var t=cn(e);if(!t)throw new Error("Can not find postRobot global on foreign window");t.receiveMessage({source:window,origin:T(),data:n})};var ot,it=function e(n,t,r,o){var i=(o=o||{}).domain||"*",a=o.timeout||-1,u=o.timeout||5e3,c=o.fireAndForget||!1;return Yn.toProxyWindow(n,{send:e}).awaitWindow().then((function(n){return h.try((function(){if(function(e,n,t){if(!e)throw new Error("Expected name");if(t&&"string"!=typeof t&&!Array.isArray(t)&&!Ie(t))throw new TypeError("Can not send "+e+". Expected domain "+JSON.stringify(t)+" to be a string, array, or regex");if(A(n))throw new Error("Can not send "+e+". Target window is closed")}(t,n,i),function(e,n){var t=q(n);if(t)return t===e;if(n===e)return!1;if(C(n)===n)return!1;for(var r=0,o=N(e);r<o.length;r++)if(o[r]===n)return!0;return!1}(window,n))return gn(n,u)})).then((function(t){return function(e,n,t,r){var o=r.send;return h.try((function(){return"string"==typeof n?n:h.try((function(){return t||mn(e,{send:o}).then((function(e){return e.domain}))})).then((function(e){if(!U(n,n))throw new Error("Domain "+me(n)+" does not match "+me(n));return e}))}))}(n,i,(void 0===t?{}:t).domain,{send:e})})).then((function(o){var i=o,u="postrobot_method"===t&&r&&"string"==typeof r.name?r.name+"()":t,s=new h,d=t+"_"+ue();if(!c){var f={name:t,win:n,domain:i,promise:s};!function(e,n){dn("responseListeners").set(e,n)}(d,f);var l=hn("requestPromises").getOrSet(n,(function(){return[]}));l.push(s),s.catch((function(){!function(e){dn("erroredResponseListeners").set(e,!0)}(d),Qn(d)}));var p=function(e){return hn("knownWindows").get(e,!1)}(n)?1e4:2e3,w=a,v=p,m=w,y=Ee((function(){return A(n)?s.reject(new Error("Window closed for "+t+" before "+(f.ack?"response":"ack"))):f.cancelled?s.reject(new Error("Response listener was cancelled for "+t)):(v=Math.max(v-500,0),-1!==m&&(m=Math.max(m-500,0)),f.ack||0!==v?0===m?s.reject(new Error("No response for postMessage "+u+" in "+T()+" in "+w+"ms")):void 0:s.reject(new Error("No ack for postMessage "+u+" in "+T()+" in "+p+"ms")))}),500);s.finally((function(){y.cancel(),l.splice(l.indexOf(s,1))})).catch(he)}return Xn(n,i,{id:ue(),origin:T(window),type:"postrobot_message_request",hash:d,name:t,data:r,fireAndForget:c},{on:rt,send:e}).then((function(){return c?s.resolve():s}),(function(e){throw new Error("Send request message failed for "+u+" in "+T()+"\n\n"+ve(e))}))}))}))};function at(e){return Yn.toProxyWindow(e,{send:it})}function ut(e){for(var n=0,t=hn("requestPromises").get(e,[]);n<t.length;n++)t[n].reject(new Error("Window "+(A(e)?"closed":"cleaned up")+" before response")).catch(he)}function ct(e){if(!S(e))throw new Error("Can not get global for window on different domain");return e.__zoid_10_3_3__||(e.__zoid_10_3_3__={}),e.__zoid_10_3_3__}function st(e,n){try{return n(ct(e))}catch(e){}}function dt(e){return{get:function(){var n=this;return h.try((function(){if(n.source&&n.source!==window)throw new Error("Can not call get on proxy object from a remote window");return e}))}}}function ft(e){return ae(JSON.stringify(e))}function lt(e){var n=ct(e);return n.references=n.references||{},n.references}function pt(e){var n,t,r=e.data,o=e.metaData,i=e.sender,a=e.receiver,u=e.passByReference,c=void 0!==u&&u,s=e.basic,d=void 0!==s&&s,f=at(a.win),l=d?JSON.stringify(r):Jn(f,a.domain,r,{on:rt,send:it}),p=c?(n=l,t=ue(),lt(window)[t]=n,{type:"uid",uid:t}):{type:"raw",val:l};return{serializedData:ft({sender:{domain:i.domain},metaData:o,reference:p}),cleanReference:function(){var e,n;e=window,"uid"===(n=p).type&&delete lt(e)[n.uid]}}}function ht(e){var n,t,r=e.sender,o=e.basic,i=void 0!==o&&o,a=function(e){return JSON.parse(function(e){if("function"==typeof atob)return decodeURIComponent([].map.call(atob(e),(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")}(e))}(e.data),u=a.reference,c=a.metaData;n="function"==typeof r.win?r.win({metaData:c}):r.win,t="function"==typeof r.domain?r.domain({metaData:c}):"string"==typeof r.domain?r.domain:a.sender.domain;var s=function(e,n){if("raw"===n.type)return n.val;if("uid"===n.type)return lt(e)[n.uid];throw new Error("Unsupported ref type: "+n.type)}(n,u);return{data:i?JSON.parse(s):function(e,n,t){return $n(e,n,t,{on:rt,send:it})}(n,t,s),metaData:c,sender:{win:n,domain:t},reference:u}}ot={setupBridge:zn,openBridge:function(e,n){var t=dn("bridges"),r=dn("bridgeFrames");return n=n||Y(e),t.getOrSet(n,(function(){return h.try((function(){if(T()===n)throw new Error("Can not open bridge on the same domain as current domain: "+n);var t=jn(n);if(D(window,t))throw new Error("Frame with name "+t+" already exists on page");var o=function(e,n){var t=document.createElement("iframe");return t.setAttribute("name",e),t.setAttribute("id",e),t.setAttribute("style","display: none; margin: 0; padding: 0; border: 0px none; overflow: hidden;"),t.setAttribute("frameborder","0"),t.setAttribute("border","0"),t.setAttribute("scrolling","no"),t.setAttribute("allowTransparency","true"),t.setAttribute("tabindex","-1"),t.setAttribute("hidden","true"),t.setAttribute("title",""),t.setAttribute("role","presentation"),t.src=n,t}(t,e);return r.set(n,o),An.then((function(n){n.appendChild(o);var t=o.contentWindow;return new h((function(e,n){o.addEventListener("load",e),o.addEventListener("error",n)})).then((function(){return gn(t,5e3,"Bridge "+e)})).then((function(){return t}))}))}))}))},linkWindow:Fn,linkUrl:function(e,n){Fn({win:e,domain:Y(n)})},isBridge:Wn,needsBridge:kn,needsBridgeForBrowser:Nn,hasBridge:function(e,n){return dn("bridges").has(n||Y(e))},needsBridgeForWin:Rn,needsBridgeForDomain:Cn,destroyBridges:function(){for(var e=dn("bridges"),n=dn("bridgeFrames"),t=0,r=n.keys();t<r.length;t++){var o=n.get(r[t]);o&&o.parentNode&&o.parentNode.removeChild(o)}n.reset(),e.reset()}};var wt={STRING:"string",OBJECT:"object",FUNCTION:"function",BOOLEAN:"boolean",NUMBER:"number",ARRAY:"array"},vt={JSON:"json",DOTIFY:"dotify",BASE64:"base64"},mt=v,yt={RENDER:"zoid-render",RENDERED:"zoid-rendered",PRERENDER:"zoid-prerender",PRERENDERED:"zoid-prerendered",DISPLAY:"zoid-display",ERROR:"zoid-error",CLOSE:"zoid-close",DESTROY:"zoid-destroy",PROPS:"zoid-props",RESIZE:"zoid-resize",FOCUS:"zoid-focus"};function gt(e){return"__zoid__"+e.name+"__"+e.serializedPayload+"__"}function Et(e){if(!e)throw new Error("No window name");var n=e.split("__"),t=n[1],r=n[2],o=n[3];if("zoid"!==t)throw new Error("Window not rendered by zoid - got "+t);if(!r)throw new Error("Expected component name");if(!o)throw new Error("Expected serialized payload ref");return{name:r,serializedInitialPayload:o}}var Pt=le((function(e){var n=ht({data:Et(e).serializedInitialPayload,sender:{win:function(e){return function(e){if("opener"===e.type)return Ce("opener",b(window));if("parent"===e.type&&"number"==typeof e.distance)return Ce("parent",function(e,n){return void 0===n&&(n=1),function(e,n){void 0===n&&(n=1);for(var t=e,r=0;r<n;r++){if(!t)return;t=P(t)}return t}(e,z(e)-n)}(window,e.distance));if("global"===e.type&&e.uid&&"string"==typeof e.uid){var n=e.uid,t=q(window);if(!t)throw new Error("Can not find ancestor window");for(var r=0,o=k(t);r<o.length;r++){var i=o[r];if(S(i)){var a=st(i,(function(e){return e.windows&&e.windows[n]}));if(a)return a}}}else if("name"===e.type){var u=e.name;return Ce("namedWindow",function(e,n){return D(e,n)||function e(n,t){var r=D(n,t);if(r)return r;for(var o=0,i=N(n);o<i.length;o++){var a=e(i[o],t);if(a)return a}}(C(e)||e,n)}(Ce("ancestor",q(window)),u))}throw new Error("Unable to find "+e.type+" parent component window")}(e.metaData.windowRef)}}});return{parent:n.sender,payload:n.data,reference:n.reference}}));function bt(){return Pt(window.name)}function _t(e,n){if(void 0===n&&(n=window),e===P(n))return{type:"parent",distance:z(e)};if(e===b(n))return{type:"opener"};if(S(e)&&(r=e)!==C(r)){var t=x(e).name;if(t)return{type:"name",name:t}}var r}function Ot(e,n,t,r,o){if(!e.hasOwnProperty(t))return r;var i=e[t];return"function"==typeof i.childDecorate?i.childDecorate({value:r,uid:o.uid,tag:o.tag,close:o.close,focus:o.focus,onError:o.onError,onProps:o.onProps,resize:o.resize,getParent:o.getParent,getParentDomain:o.getParentDomain,show:o.show,hide:o.hide,export:o.export,getSiblings:o.getSiblings}):r}function Tt(){return h.try((function(){window.focus()}))}function St(){return h.try((function(){window.close()}))}var xt=function(){return he},It=function(e){return we(e.value)};function Nt(e,n,t){for(var r=0,o=Object.keys(i({},e,n));r<o.length;r++){var a=o[r];t(a,n[a],e[a])}}function Rt(e,n,t){var r={};return h.all(function(e,n,o){var i=[];return Nt(e,n,(function(e,n,o){var a=function(e,n,o){return h.resolve().then((function(){var i,a;if(null!=o&&n){var u=(i={},i.get=n.queryParam,i.post=n.bodyParam,i)[t],c=(a={},a.get=n.queryValue,a.post=n.bodyValue,a)[t];if(u)return h.hash({finalParam:h.try((function(){return"function"==typeof u?u({value:o}):"string"==typeof u?u:e})),finalValue:h.try((function(){return"function"==typeof c&&xe(o)?c({value:o}):o}))}).then((function(t){var o,i=t.finalParam,a=t.finalValue;if("boolean"==typeof a)o=a.toString();else if("string"==typeof a)o=a.toString();else if("object"==typeof a&&null!==a){if(n.serialization===vt.JSON)o=JSON.stringify(a);else if(n.serialization===vt.BASE64)o=ae(JSON.stringify(a));else if(n.serialization===vt.DOTIFY||!n.serialization){o=function e(n,t,r){for(var o in void 0===t&&(t=""),void 0===r&&(r={}),t=t?t+".":t,n)n.hasOwnProperty(o)&&null!=n[o]&&"function"!=typeof n[o]&&(n[o]&&Array.isArray(n[o])&&n[o].length&&n[o].every((function(e){return"object"!=typeof e}))?r[""+t+o+"[]"]=n[o].join(","):n[o]&&"object"==typeof n[o]?r=e(n[o],""+t+o,r):r[""+t+o]=n[o].toString());return r}(a,e);for(var u=0,c=Object.keys(o);u<c.length;u++){var s=c[u];r[s]=o[s]}return}}else"number"==typeof a&&(o=a.toString());r[i]=o}))}}))}(e,n,o);i.push(a)})),i}(n,e)).then((function(){return r}))}function Ct(e){var n,t,r,o,a,u,c,s,d=e.uid,f=e.options,l=e.overrides,p=void 0===l?{}:l,w=e.parentWin,v=void 0===w?window:w,m=f.propsDef,y=f.containerTemplate,g=f.prerenderTemplate,E=f.tag,P=f.name,b=f.attributes,_=f.dimensions,O=f.autoResize,I=f.url,N=f.domain,R=f.exports,C=new h,k=[],j=Re(),W={},L={},D={visible:!0},M=p.event?p.event:(n={},t={},r={on:function(e,n){var r=t[e]=t[e]||[];r.push(n);var o=!1;return{cancel:function(){o||(o=!0,r.splice(r.indexOf(n),1))}}},once:function(e,n){var t=r.on(e,(function(){t.cancel(),n()}));return t},trigger:function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=t[e],a=[];if(i)for(var u=function(){var e=i[c];a.push(h.try((function(){return e.apply(void 0,r)})))},c=0;c<i.length;c++)u();return h.all(a).then(he)},triggerOnce:function(e){if(n[e])return h.resolve();n[e]=!0;for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;i<t;i++)o[i-1]=arguments[i];return r.trigger.apply(r,[e].concat(o))},reset:function(){t={}}}),F=p.props?p.props:{},G=!1,J=p.onError,Z=p.getProxyContainer,X=p.show,K=p.hide,Q=p.close,ee=p.renderContainer,ne=p.getProxyWindow,te=p.setProxyWin,re=p.openFrame,oe=p.openPrerenderFrame,ie=p.prerender,ae=p.open,ce=p.openPrerender,se=p.watchForUnload,de=p.getInternalState,fe=p.setInternalState,pe=function(){return"function"==typeof _?_({props:F}):_},ge=function(){return h.try((function(){return p.resolveInitPromise?p.resolveInitPromise():C.resolve()}))},Pe=function(e){return h.try((function(){return p.rejectInitPromise?p.rejectInitPromise(e):C.reject(e)}))},be=function(e){for(var n={},t=0,r=Object.keys(F);t<r.length;t++){var o=r[t],i=m[o];if(!i||!1!==i.sendToChild){var a=i&&i.trustedDomains&&i.trustedDomains.length>0?i.trustedDomains.reduce((function(n,t){return n||U(t,e)}),!1):U(e,T(window));i&&i.sameDomain&&!a||i&&i.trustedDomains&&!a||(n[o]=F[o])}}return h.hash(n)},Oe=function(){return h.try((function(){return de?de():D}))},Te=function(e){return h.try((function(){return fe?fe(e):D=i({},D,e)}))},Se=function(){return ne?ne():h.try((function(){var e=F.window;if(e){var n=at(e);return j.register((function(){return e.close()})),n}return new Yn({send:it})}))},Ie=function(e){return te?te(e):h.try((function(){o=e}))},Ne=function(){return X?X():h.hash({setState:Te({visible:!0}),showElement:a?a.get().then(Ve):null}).then(he)},Ce=function(){return K?K():h.hash({setState:Te({visible:!1}),showElement:a?a.get().then(Je):null}).then(he)},ke=function(){return"function"==typeof I?I({props:F}):I},je=function(){return"function"==typeof b?b({props:F}):b},We=function(){return Y(ke())},Ae=function(e,n){var t=n.windowName;return re?re(e,{windowName:t}):h.try((function(){if(e===mt.IFRAME)return dt(He({attributes:i({name:t,title:P},je().iframe)}))}))},Le=function(e){return oe?oe(e):h.try((function(){if(e===mt.IFRAME)return dt(He({attributes:i({name:"__zoid_prerender_frame__"+P+"_"+ue()+"__",title:"prerender__"+P},je().iframe)}))}))},De=function(e,n,t){return ce?ce(e,n,t):h.try((function(){if(e===mt.IFRAME){if(!t)throw new Error("Expected proxy frame to be passed");return t.get().then((function(e){return j.register((function(){return $e(e)})),Ye(e).then((function(e){return x(e)})).then((function(e){return at(e)}))}))}if(e===mt.POPUP)return n;throw new Error("No render context available for "+e)}))},ze=function(){return h.try((function(){if(o)return h.all([M.trigger(yt.FOCUS),o.focus()]).then(he)}))},Ue=function(){var e=ct(window);return e.windows=e.windows||{},e.windows[d]=window,j.register((function(){delete e.windows[d]})),d},Qe=function(e,n,t,r){if(n===T(window))return{type:"global",uid:Ue()};if(e!==window)throw new Error("Can not construct cross-domain window reference for different target window");if(F.window){var o=r.getWindow();if(!o)throw new Error("Can not construct cross-domain window reference for lazy window prop");if(q(o)!==window)throw new Error("Can not construct cross-domain window reference for window prop with different ancestor")}if(t===mt.POPUP)return{type:"opener"};if(t===mt.IFRAME)return{type:"parent",distance:z(window)};throw new Error("Can not construct window reference for child")},en=function(e,n){return h.try((function(){var t;c=e,u=n,null==(t=o)||t.isPopup().then((function(e){var t;""!==(null==n?void 0:n.name)&&e&&(null==(t=o)||t.setName(null==n?void 0:n.name))})).finally((function(){ge(),j.register((function(){return n.close.fireAndForget().catch(he)}))}))}))},nn=function(e){var n=e.width,t=e.height;return h.try((function(){M.trigger(yt.RESIZE,{width:n,height:t})}))},tn=function(e){return h.try((function(){return M.trigger(yt.DESTROY)})).catch(he).then((function(){return j.all(e)})).then((function(){var n=e||new Error("Component destroyed");s&&Ze(s)||"Window navigated away"===n.message?C.resolve():C.asyncReject(n)}))},rn=le((function(e){return h.try((function(){if(Q){if(A(Q.__source__))return;return Q()}return h.try((function(){return M.trigger(yt.CLOSE)})).then((function(){return tn(e||new Error("Component closed"))}))}))})),on=function(e,n){var t=n.proxyWin,r=n.proxyFrame,o=n.windowName;return ae?ae(e,{proxyWin:t,proxyFrame:r,windowName:o}):h.try((function(){if(e===mt.IFRAME){if(!r)throw new Error("Expected proxy frame to be passed");return r.get().then((function(e){return Ye(e).then((function(n){return j.register((function(){return $e(e)})),j.register((function(){return ut(n)})),n}))}))}if(e===mt.POPUP){var n=pe(),t=n.width,a=void 0===t?"300px":t,u=n.height,c=void 0===u?"150px":u;a=un(a,window.outerWidth),c=un(c,window.outerWidth);var s=function(e,n){var t=(n=n||{}).closeOnUnload,r=void 0===t?1:t,o=n.name,a=void 0===o?"":o,u=n.width,c=n.height,s=0,d=0;u&&(window.outerWidth?d=Math.round((window.outerWidth-u)/2)+window.screenX:window.screen.width&&(d=Math.round((window.screen.width-u)/2))),c&&(window.outerHeight?s=Math.round((window.outerHeight-c)/2)+window.screenY:window.screen.height&&(s=Math.round((window.screen.height-c)/2))),delete n.closeOnUnload,delete n.name,u&&c&&(n=i({top:s,left:d,width:u,height:c,status:1,toolbar:0,menubar:0,resizable:1,scrollbars:1},n));var f,l=Object.keys(n).map((function(e){if(null!=n[e])return e+"="+me(n[e])})).filter(Boolean).join(",");try{f=window.open("",a,l)}catch(e){throw new Be("Can not open popup window - "+(e.stack||e.message))}if(A(f))throw new Be("Can not open popup window - blocked");return r&&window.addEventListener("unload",(function(){return f.close()})),f}(0,i({name:o,width:a,height:c},je().popup));return j.register((function(){return $(s)})),j.register((function(){return ut(s)})),s}throw new Error("No render context available for "+e)})).then((function(e){return t.setWindow(e,{send:it}),t.setName(o).then((function(){return t}))}))},an=function(){return h.try((function(){var e=Ge(window,"unload",we((function(){tn(new Error("Window navigated away"))}))),n=H(v,tn,3e3);if(j.register(n.cancel),j.register(e.cancel),se)return se()}))},cn=function(e){var n=!1;return e.isClosed().then((function(t){return t?(n=!0,rn(new Error("Detected component window close"))):h.delay(200).then((function(){return e.isClosed()})).then((function(e){if(e)return n=!0,rn(new Error("Detected component window close"))}))})).then((function(){return n}))},sn=function(e){return J?J(e):h.try((function(){if(-1===k.indexOf(e))return k.push(e),C.asyncReject(e),M.trigger(yt.ERROR,e)}))},dn=new h,fn=function(e){return h.try((function(){dn.resolve(e)}))};en.onError=sn;var ln=function(e,n){return e({uid:d,container:n.container,context:n.context,doc:n.doc,frame:n.frame,prerenderFrame:n.prerenderFrame,focus:ze,close:rn,state:W,props:F,tag:E,dimensions:pe(),event:M})},pn=function(e,n){var t=n.context;return ie?ie(e,{context:t}):h.try((function(){if(g){M.trigger(yt.PRERENDER);var n=e.getWindow();if(n&&S(n)&&function(e){try{if(!e.location.href)return!0;if("about:blank"===e.location.href)return!0}catch(e){}return!1}(n)){var r=(n=x(n)).document,o=ln(g,{context:t,doc:r});if(o){if(o.ownerDocument!==r)throw new Error("Expected prerender template to have been created with document from child window");!function(e,n){var t=n.tagName.toLowerCase();if("html"!==t)throw new Error("Expected element to be html, got "+t);for(var r=e.document.documentElement,o=0,i=_e(r.children);o<i.length;o++)r.removeChild(i[o]);for(var a=0,u=_e(n.children);a<u.length;a++)r.appendChild(u[a])}(n,o);var i=O.width,a=void 0!==i&&i,u=O.height,c=void 0!==u&&u,s=O.element,d=void 0===s?"body":s;if((d=qe(d,r))&&(a||c)){var f=Xe(d,(function(e){nn({width:a?e.width:void 0,height:c?e.height:void 0})}),{width:a,height:c,win:n});M.on(yt.RENDERED,f.cancel)}M.trigger(yt.PRERENDERED)}}}}))},hn=function(e,n){var t=n.proxyFrame,r=n.proxyPrerenderFrame,o=n.context,i=n.rerender;return ee?ee(e,{proxyFrame:t,proxyPrerenderFrame:r,context:o,rerender:i}):h.hash({container:e.get(),frame:t?t.get():null,prerenderFrame:r?r.get():null,internalState:Oe()}).then((function(e){var n=e.container,t=e.internalState.visible,r=ln(y,{context:o,container:n,frame:e.frame,prerenderFrame:e.prerenderFrame,doc:document});if(r){t||Je(r),function(e,n){e.appendChild(n)}(n,r);var u=function(e,n){n=we(n);var t,r,o,i=!1,a=[],u=function(){i=!0;for(var e=0;e<a.length;e++)a[e].disconnect();t&&t.cancel(),o&&o.removeEventListener("unload",c),r&&$e(r)},c=function(){i||(n(),u())};if(Ze(e))return c(),{cancel:u};if(window.MutationObserver)for(var s=e.parentElement;s;){var d=new window.MutationObserver((function(){Ze(e)&&c()}));d.observe(s,{childList:!0}),a.push(d),s=s.parentElement}return(r=document.createElement("iframe")).setAttribute("name","__detect_close_"+ue()+"__"),r.style.display="none",Ye(r).then((function(e){(o=x(e)).addEventListener("unload",c)})),e.appendChild(r),t=Ee((function(){Ze(e)&&c()}),1e3),{cancel:u}}(r,(function(){var e=new Error("Detected container element removed from DOM");return h.delay(1).then((function(){if(!Ze(r))return j.all(e),i().then(ge,Pe);rn(e)}))}));return j.register((function(){return u.cancel()})),j.register((function(){return $e(r)})),a=dt(r)}}))},wn=function(){return{state:W,event:M,close:rn,focus:ze,resize:nn,onError:sn,updateProps:mn,show:Ne,hide:Ce}},vn=function(e){void 0===e&&(e={});var n=s,t=wn();ye(L,e),function(e,n,t,r,o){var i=r.state,a=r.close,u=r.focus,c=r.event,s=r.onError;Nt(t,e,(function(e,r,d){var f=!1,l=d;Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){return f?l:(f=!0,function(){if(!r)return l;var f=r.alias;if(f&&!xe(d)&&xe(t[f])&&(l=t[f]),r.value&&(l=r.value({props:n,state:i,close:a,focus:u,event:c,onError:s,container:o})),!r.default||xe(l)||xe(t[e])||(l=r.default({props:n,state:i,close:a,focus:u,event:c,onError:s,container:o})),xe(l)){if(r.type===wt.ARRAY?!Array.isArray(l):typeof l!==r.type)throw new TypeError("Prop is not of type "+r.type+": "+e)}else if(!1!==r.required&&!xe(t[e]))throw new Error('Expected prop "'+e+'" to be defined');return xe(l)&&r.decorate&&(l=r.decorate({value:l,props:n,state:i,close:a,focus:u,event:c,onError:s,container:o})),l}())}})})),Nt(n,e,he)}(m,F,L,t,n)},mn=function(e){return vn(e),C.then((function(){var e=u,n=o;if(e&&n&&c)return be(c).then((function(t){return e.updateProps(t).catch((function(e){return cn(n).then((function(n){if(!n)throw e}))}))}))}))},yn=function(e){return Z?Z(e):h.try((function(){return Fe(e)})).then((function(e){return Ke(e)&&(e=function e(n){var t=function(e){var n=function(e){for(;e.parentNode;)e=e.parentNode;if(Ke(e))return e}(e);if(n&&n.host)return n.host}(n);if(!t)throw new Error("Element is not in shadow dom");var r="shadow-slot-"+ue(),o=document.createElement("slot");o.setAttribute("name",r),n.appendChild(o);var i=document.createElement("div");return i.setAttribute("slot",r),t.appendChild(i),Ke(t)?e(i):i}(e)),s=e,dt(e)}))};return{init:function(){M.on(yt.RENDER,(function(){return F.onRender()})),M.on(yt.PRERENDER,(function(){return F.onPrerender()})),M.on(yt.DISPLAY,(function(){return F.onDisplay()})),M.on(yt.RENDERED,(function(){return F.onRendered()})),M.on(yt.PRERENDERED,(function(){return F.onPrerendered()})),M.on(yt.CLOSE,(function(){return F.onClose()})),M.on(yt.DESTROY,(function(){return F.onDestroy()})),M.on(yt.RESIZE,(function(){return F.onResize()})),M.on(yt.FOCUS,(function(){return F.onFocus()})),M.on(yt.PROPS,(function(e){return F.onProps(e)})),M.on(yt.ERROR,(function(e){return F&&F.onError?F.onError(e):Pe(e).then((function(){setTimeout((function(){throw e}),1)}))})),j.register(M.reset)},render:function(e){var n=e.target,t=e.container,r=e.context,i=e.rerender;return h.try((function(){var e=We(),a=N||We();!function(e,n,t){if(e!==window){if(!B(window,e))throw new Error("Can only renderTo an adjacent frame");var r=T();if(!U(n,r)&&!S(e))throw new Error("Can not render remotely to "+n.toString()+" - can only render to "+r);if(t&&"string"!=typeof t)throw new Error("Container passed to renderTo must be a string selector, got "+typeof t+" }")}}(n,a,t);var u=h.try((function(){if(n!==window)return function(e,n){for(var t={},r=0,o=Object.keys(F);r<o.length;r++){var i=o[r],a=m[i];a&&a.allowDelegate&&(t[i]=F[i])}var u=it(n,"zoid_delegate_"+P,{uid:d,overrides:{props:t,event:M,close:rn,onError:sn,getInternalState:Oe,setInternalState:Te,resolveInitPromise:ge,rejectInitPromise:Pe}}).then((function(e){var t=e.data.parent;return j.register((function(e){if(!A(n))return t.destroy(e)})),t.getDelegateOverrides()})).catch((function(e){throw new Error("Unable to delegate rendering. Possibly the component is not loaded in the target window.\n\n"+ve(e))}));return Z=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.getProxyContainer.apply(e,n)}))},ee=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.renderContainer.apply(e,n)}))},X=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.show.apply(e,n)}))},K=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.hide.apply(e,n)}))},se=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.watchForUnload.apply(e,n)}))},e===mt.IFRAME?(ne=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.getProxyWindow.apply(e,n)}))},re=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.openFrame.apply(e,n)}))},oe=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.openPrerenderFrame.apply(e,n)}))},ie=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.prerender.apply(e,n)}))},ae=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.open.apply(e,n)}))},ce=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.openPrerender.apply(e,n)}))}):e===mt.POPUP&&(te=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return u.then((function(e){return e.setProxyWin.apply(e,n)}))}),u}(r,n)})),c=F.window,l=an(),p=Rt(m,F,"post"),w=M.trigger(yt.RENDER),v=yn(t),y=Se(),g=v.then((function(){return vn()})),b=g.then((function(){return Rt(m,F,"get").then((function(e){return function(e,n){var t,r,o=n.query||{},i=n.hash||{},a=e.split("#");r=a[1];var u=(t=a[0]).split("?");t=u[0];var c=Me(u[1],o),s=Me(r,i);return c&&(t=t+"?"+c),s&&(t=t+"#"+s),t}(V(ke()),{query:e})}))})),_=y.then((function(t){return function(e){var n=void 0===e?{}:e,t=n.proxyWin,r=n.initialChildDomain,o=n.childDomainMatch,i=n.target,a=void 0===i?window:i,u=n.context;return function(e){var n=void 0===e?{}:e,t=n.proxyWin,r=n.childDomainMatch,o=n.context;return be(n.initialChildDomain).then((function(e){return{uid:d,context:o,tag:E,childDomainMatch:r,version:"10_3_3",props:e,exports:(n=t,{init:function(e){return en(this.origin,e)},close:rn,checkClose:function(){return cn(n)},resize:nn,onError:sn,show:Ne,hide:Ce,export:fn})};var n}))}({proxyWin:t,initialChildDomain:r,childDomainMatch:o,context:u}).then((function(e){var n=pt({data:e,metaData:{windowRef:Qe(a,r,u,t)},sender:{domain:T(window)},receiver:{win:t,domain:o},passByReference:r===T()}),i=n.serializedData;return j.register(n.cleanReference),i}))}({proxyWin:(o={proxyWin:t,initialChildDomain:e,childDomainMatch:a,target:n,context:r}).proxyWin,initialChildDomain:o.initialChildDomain,childDomainMatch:o.childDomainMatch,target:o.target,context:o.context}).then((function(e){return gt({name:P,serializedPayload:e})}));var o})),O=_.then((function(e){return Ae(r,{windowName:e})})),x=Le(r),I=h.hash({proxyContainer:v,proxyFrame:O,proxyPrerenderFrame:x}).then((function(e){return hn(e.proxyContainer,{context:r,proxyFrame:e.proxyFrame,proxyPrerenderFrame:e.proxyPrerenderFrame,rerender:i})})).then((function(e){return e})),R=h.hash({windowName:_,proxyFrame:O,proxyWin:y}).then((function(e){var n=e.proxyWin;return c?n:on(r,{windowName:e.windowName,proxyWin:n,proxyFrame:e.proxyFrame})})),k=h.hash({proxyWin:R,proxyPrerenderFrame:x}).then((function(e){return De(r,e.proxyWin,e.proxyPrerenderFrame)})),W=R.then((function(e){return o=e,Ie(e)})),L=h.hash({proxyPrerenderWin:k,state:W}).then((function(e){return pn(e.proxyPrerenderWin,{context:r})})),D=h.hash({proxyWin:R,windowName:_}).then((function(e){if(c)return e.proxyWin.setName(e.windowName)})),q=h.hash({body:p}).then((function(e){return f.method?f.method:Object.keys(e.body).length?"post":"get"})),z=h.hash({proxyWin:R,windowUrl:b,body:p,method:q,windowName:D,prerender:L}).then((function(e){return e.proxyWin.setLocation(e.windowUrl,{method:e.method,body:e.body})})),H=R.then((function(e){!function e(n,t){var r=!1;return j.register((function(){r=!0})),h.delay(2e3).then((function(){return n.isClosed()})).then((function(o){if(!r){if(t===mt.POPUP&&o)return rn(new Error("Detected popup close"));var i=Boolean(s&&Ze(s));return t===mt.IFRAME&&o&&(i||G)?rn(new Error("Detected iframe close")):e(n,t)}}))}(e,r)})),J=h.hash({container:I,prerender:L}).then((function(){return M.trigger(yt.DISPLAY)})),$=R.then((function(n){return function(e,n,t){return h.try((function(){return e.awaitWindow()})).then((function(e){if(ot&&ot.needsBridge({win:e,domain:n})&&!ot.hasBridge(n,n)){var r="function"==typeof f.bridgeUrl?f.bridgeUrl({props:F}):f.bridgeUrl;if(!r)throw new Error("Bridge needed to render "+t);var o=Y(r);return ot.linkUrl(e,n),ot.openBridge(V(r),o)}}))}(n,e,r)})),Q=z.then((function(){return h.try((function(){var e=F.timeout;if(e)return C.timeout(e,new Error("Loading component timed out after "+e+" milliseconds"))}))})),ue=C.then((function(){return G=!0,M.trigger(yt.RENDERED)}));return h.hash({initPromise:C,buildUrlPromise:b,onRenderPromise:w,getProxyContainerPromise:v,openFramePromise:O,openPrerenderFramePromise:x,renderContainerPromise:I,openPromise:R,openPrerenderPromise:k,setStatePromise:W,prerenderPromise:L,loadUrlPromise:z,buildWindowNamePromise:_,setWindowNamePromise:D,watchForClosePromise:H,onDisplayPromise:J,openBridgePromise:$,runTimeoutPromise:Q,onRenderedPromise:ue,delegatePromise:u,watchForUnloadPromise:l,finalSetPropsPromise:g})})).catch((function(e){return h.all([sn(e),tn(e)]).then((function(){throw e}),(function(){throw e}))})).then(he)},destroy:tn,getProps:function(){return F},setProps:vn,export:fn,getHelpers:wn,getDelegateOverrides:function(){return h.try((function(){return{getProxyContainer:yn,show:Ne,hide:Ce,renderContainer:hn,getProxyWindow:Se,watchForUnload:an,openFrame:Ae,openPrerenderFrame:Le,prerender:pn,open:on,openPrerender:De,setProxyWin:Ie}}))},getExports:function(){return R({getExports:function(){return dn}})}}}var kt={register:function(e,n,t,r){var i=r.React,a=r.ReactDOM;return function(e){function n(){return e.apply(this,arguments)||this}o(n,e);var r=n.prototype;return r.render=function(){return i.createElement("div",null)},r.componentDidMount=function(){var e=a.findDOMNode(this),n=t(ye({},this.props));n.render(e,mt.IFRAME),this.setState({parent:n})},r.componentDidUpdate=function(){this.state&&this.state.parent&&this.state.parent.updateProps(ye({},this.props)).catch(he)},n}(i.Component)}},jt={register:function(e,n,t,r){return r.component(e,{render:function(e){return e("div")},inheritAttrs:!1,mounted:function(){var e,n=this.$el;this.parent=t(i({},(e=this.$attrs,Object.keys(e).reduce((function(n,t){var r=e[t];return"style-object"===t||"styleObject"===t?(n.style=r,n.styleObject=r):t.includes("-")?n[Pe(t)]=r:n[t]=r,n}),{})))),this.parent.render(n,mt.IFRAME)},watch:{$attrs:{handler:function(){this.parent&&this.$attrs&&this.parent.updateProps(i({},this.$attrs)).catch(he)},deep:!0}}})}},Wt={register:function(e,n,t){return{template:"<div></div>",inheritAttrs:!1,mounted:function(){var e,n=this.$el;this.parent=t(i({},(e=this.$attrs,Object.keys(e).reduce((function(n,t){var r=e[t];return"style-object"===t||"styleObject"===t?(n.style=r,n.styleObject=r):t.includes("-")?n[Pe(t)]=r:n[t]=r,n}),{})))),this.parent.render(n,mt.IFRAME)},watch:{$attrs:{handler:function(){this.parent&&this.$attrs&&this.parent.updateProps(i({},this.$attrs)).catch(he)},deep:!0}}}}},At={register:function(e,n,t,r){return r.module(e,[]).directive(Pe(e),(function(){for(var e={},r=0,o=Object.keys(n);r<o.length;r++)e[o[r]]="=";return e.props="=",{scope:e,restrict:"E",controller:["$scope","$element",function(e,n){function r(){if("$apply"!==e.$root.$$phase&&"$digest"!==e.$root.$$phase)try{e.$apply()}catch(e){}}var o=function(){return Se(e.props,(function(e){return"function"==typeof e?function(){var n=e.apply(this,arguments);return r(),n}:e}))},i=t(o());i.render(n[0],mt.IFRAME),e.$watch((function(){i.updateProps(o()).catch(he)}))}]}}))}},Lt={register:function(e,n,t,r){var o=r.Component,a=r.NgModule,u=r.ElementRef,c=r.NgZone,s=r.Inject,d=function(){function e(e,n){this.elementRef=void 0,this.internalProps=void 0,this.parent=void 0,this.props=void 0,this.zone=void 0,this._props=void 0,this._props={},this.elementRef=e,this.zone=n}var n=e.prototype;return n.getProps=function(){var e=this;return Se(i({},this.internalProps,this.props),(function(n){if("function"==typeof n){var t=e.zone;return function(){var e=arguments,r=this;return t.run((function(){return n.apply(r,e)}))}}return n}))},n.ngOnInit=function(){var e=this.elementRef.nativeElement;this.parent=t(this.getProps()),this.parent.render(e,mt.IFRAME)},n.ngDoCheck=function(){this.parent&&!function(e,n){var t={};for(var r in e)if(e.hasOwnProperty(r)&&(t[r]=!0,e[r]!==n[r]))return!1;for(var o in n)if(!t[o])return!1;return!0}(this._props,this.props)&&(this._props=i({},this.props),this.parent.updateProps(this.getProps()))},e}();d.annotations=void 0,d.parameters=void 0,d.parameters=[[new s(u)],[new s(c)]],d.annotations=[new o({selector:e,template:"<div></div>",inputs:["props"]})];var f=function(){};return f.annotations=void 0,f.annotations=[new a({declarations:[d],exports:[d]})],f}};function Dt(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,a=e.event,u=e.dimensions,c=u.width,s=u.height;if(t&&r){var d=o.createElement("div");d.setAttribute("id",n);var f=o.createElement("style");return i.cspNonce&&f.setAttribute("nonce",i.cspNonce),f.appendChild(o.createTextNode("\n #"+n+" {\n display: inline-block;\n position: relative;\n width: "+c+";\n height: "+s+";\n }\n\n #"+n+" > 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 ")),d.appendChild(t),d.appendChild(r),d.appendChild(f),r.classList.add("zoid-visible"),t.classList.add("zoid-invisible"),a.on(yt.RENDERED,(function(){r.classList.remove("zoid-visible"),r.classList.add("zoid-invisible"),t.classList.remove("zoid-invisible"),t.classList.add("zoid-visible"),setTimeout((function(){$e(r)}),1)})),a.on(yt.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(d.style.width=an(n)),"number"==typeof t&&(d.style.height=an(t))})),d}}function Mt(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 qt=Re(),Ft=Re(),zt=function(e){!function(){var e,n,t,r;cn().initialized||(cn().initialized=!0,n=(e={on:rt,send:it}).on,t=e.send,(r=cn()).receiveMessage=r.receiveMessage||function(e){return tt(e,{on:n,send:t})},function(e){var n=e.on,t=e.send;dn().getOrSet("postMessageListener",(function(){return Ge(window,"message",(function(e){!function(e,n){var t=n.on,r=n.send;h.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");tt({source:n,origin:o,data:i},{on:t,send:r})}}))}(e,{on:n,send:t})}))}))}({on:rt,send:it}),zn({on:rt,send:it,receiveMessage:tt}),function(e){var n=e.on,t=e.send;dn("builtinListeners").getOrSet("helloListener",(function(){var e=n("postrobot_hello",{domain:"*"},(function(e){return vn(e.source,{domain:e.origin}),{instanceID:wn()}})),r=q();return r&&mn(r,{send:t}).catch((function(e){})),e}))}({on:rt,send:it}))}();var n=function(e){var n,t,r=function(e){var n=e.tag,t=e.url,r=e.domain,o=e.bridgeUrl,a=e.props,u=void 0===a?{}:a,c=e.dimensions,s=void 0===c?{}:c,d=e.autoResize,f=void 0===d?{}:d,l=e.allowedParentDomains,p=void 0===l?"*":l,h=e.attributes,w=void 0===h?{}:h,v=e.defaultContext,m=void 0===v?mt.IFRAME:v,y=e.containerTemplate,g=void 0===y?Dt:y,E=e.prerenderTemplate,P=void 0===E?Mt:E,b=e.validate,_=e.eligible,O=void 0===_?function(){return{eligible:!0}}:_,T=e.logger,x=void 0===T?{info:he}:T,I=e.exports,N=void 0===I?he:I,R=e.method,C=e.children,k=void 0===C?function(){return{}}:C,j=n.replace(/-/g,"_"),W=i({},{window:{type:wt.OBJECT,sendToChild:!1,required:!1,allowDelegate:!0,validate:function(e){var n=e.value;if(!G(n)&&!Yn.isProxyWindow(n))throw new Error("Expected Window or ProxyWindow");if(G(n)){if(A(n))throw new Error("Window is closed");if(!S(n))throw new Error("Window is not same domain")}},decorate:function(e){return at(e.value)}},timeout:{type:wt.NUMBER,required:!1,sendToChild:!1},cspNonce:{type:wt.STRING,required:!1},onDisplay:{type:wt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:xt,decorate:It},onRendered:{type:wt.FUNCTION,required:!1,sendToChild:!1,default:xt,decorate:It},onRender:{type:wt.FUNCTION,required:!1,sendToChild:!1,default:xt,decorate:It},onPrerendered:{type:wt.FUNCTION,required:!1,sendToChild:!1,default:xt,decorate:It},onPrerender:{type:wt.FUNCTION,required:!1,sendToChild:!1,default:xt,decorate:It},onClose:{type:wt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:xt,decorate:It},onDestroy:{type:wt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:xt,decorate:It},onResize:{type:wt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:xt},onFocus:{type:wt.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:xt},close:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.close}},focus:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.focus}},resize:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.resize}},uid:{type:wt.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.uid}},tag:{type:wt.STRING,required:!1,sendToChild:!1,childDecorate:function(e){return e.tag}},getParent:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParent}},getParentDomain:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getParentDomain}},show:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.show}},hide:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.hide}},export:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.export}},onError:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onError}},onProps:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.onProps}},getSiblings:{type:wt.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(e){return e.getSiblings}}},u);if(!g)throw new Error("Container template required");return{name:j,tag:n,url:t,domain:r,bridgeUrl:o,method:R,propsDef:W,dimensions:s,autoResize:f,allowedParentDomains:p,attributes:w,defaultContext:m,containerTemplate:g,prerenderTemplate:P,validate:b,logger:x,eligible:O,children:k,exports:"function"==typeof N?N:function(e){for(var n=e.getExports,t={},r=function(){var e=i[o],r=N[e].type,a=n().then((function(n){return n[e]}));t[e]=r===wt.FUNCTION?function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return a.then((function(e){return e.apply(void 0,n)}))}:a},o=0,i=Object.keys(N);o<i.length;o++)r();return t}}}(e),o=r.name,a=r.tag,u=r.defaultContext,c=r.propsDef,s=r.eligible,d=r.children,f=ct(window),l={},p=[],w=function(){if(function(e){try{return Et(window.name).name===e}catch(e){}return!1}(o)){var e=bt().payload;if(e.tag===a&&U(e.childDomainMatch,T()))return!0}return!1},v=le((function(){if(w()){if(window.xprops)throw delete f.components[a],new Error("Can not register "+o+" as child - child already registered");var e=function(e){var n,t=e.tag,r=e.propsDef,o=e.autoResize,i=e.allowedParentDomains,a=[],u=bt(),c=u.parent,s=u.payload,d=c.win,f=c.domain,l=new h,p=s.version,w=s.uid,v=s.exports,m=s.context,y=s.props;if(!function(e,n){if(!/_/.test(e)||!/_/.test("10_3_3"))throw new Error("Versions are in an invalid format ("+e+", 10_3_3)");return e.split("_")[0]==="10_3_3".split("_")[0]}(p))throw new Error("Parent window has zoid version "+p+", child window has version 10_3_3");var g=v.show,E=v.hide,P=v.close,b=v.onError,_=v.checkClose,O=v.export,I=v.resize,N=v.init,R=function(){return d},C=function(){return f},j=function(e){return a.push(e),{cancel:function(){a.splice(a.indexOf(e),1)}}},W=function(e){return I.fireAndForget({width:e.width,height:e.height})},A=function(e){return l.resolve(e),O(e)},L=function(e){var r=(void 0===e?{}:e).anyParent,o=[],i=n.parent;if(void 0===r&&(r=!i),!r&&!i)throw new Error("No parent found for "+t+" child");for(var a=0,u=k(window);a<u.length;a++){var c=u[a];if(S(c)){var s=x(c).xprops;if(s&&R()===s.getParent()){var d=s.parent;if(r||!i||d&&d.uid===i.uid){var f=st(c,(function(e){return e.exports}));o.push({props:s,exports:f})}}}}return o},D=function(e,o,i){void 0===i&&(i=!1);var u=function(e,n,t,r,o,i){void 0===i&&(i=!1);for(var a={},u=0,c=Object.keys(t);u<c.length;u++){var s=c[u],d=n[s],f=d&&d.trustedDomains&&d.trustedDomains.length>0?d.trustedDomains.reduce((function(e,n){return e||U(n,T(window))}),!1):r===T(window)||S(e);if((!d||!d.sameDomain||f)&&(!d||!d.trustedDomains||f)){var l=Ot(n,0,s,t[s],o);a[s]=l,d&&d.alias&&!a[d.alias]&&(a[d.alias]=l)}}if(!i)for(var p=0,h=Object.keys(n);p<h.length;p++){var w=h[p];t.hasOwnProperty(w)||(a[w]=Ot(n,0,w,void 0,o))}return a}(d,r,e,o,{tag:t,show:g,hide:E,close:P,focus:Tt,onError:b,resize:W,getSiblings:L,onProps:j,getParent:R,getParentDomain:C,uid:w,export:A},i);n?ye(n,u):n=u;for(var c=0;c<a.length;c++)(0,a[c])(n)},M=function(e){return h.try((function(){return D(e,f,!0)}))};return{init:function(){return h.try((function(){var n="";return S(d)&&(n=function(e){var n=e.componentName,t=e.parentComponentWindow,r=ht({data:Et(window.name).serializedInitialPayload,sender:{win:t},basic:!0}),o=r.sender;if("uid"===r.reference.type||"global"===r.metaData.windowRef.type){var i=gt({name:n,serializedPayload:pt({data:r.data,metaData:{windowRef:_t(t)},sender:{domain:o.domain},receiver:{win:window,domain:T()},basic:!0}).serializedData});return window.name=i,i}}({componentName:e.name,parentComponentWindow:d})||""),ct(window).exports=e.exports({getExports:function(){return l}}),function(e,n){if(!U(e,n))throw new Error("Can not be rendered by domain: "+n)}(i,f),En(d),window.addEventListener("beforeunload",(function(){_.fireAndForget()})),window.addEventListener("unload",(function(){_.fireAndForget()})),H(d,(function(){St()})),N({name:n,updateProps:M,close:St})})).then((function(){return(e=o.width,n=void 0!==e&&e,t=o.height,r=void 0!==t&&t,i=o.element,Fe(void 0===i?"body":i).catch(he).then((function(e){return{width:n,height:r,element:e}}))).then((function(e){var n=e.width,t=e.height,r=e.element;r&&(n||t)&&m!==mt.POPUP&&Xe(r,(function(e){W({width:n?e.width:void 0,height:t?e.height:void 0})}),{width:n,height:t})}));var e,n,t,r,i})).catch((function(e){b(e)}))},getProps:function(){return n||(D(y,f),n)}}}(r);return e.init(),e}})),m=function e(n){var t,c="zoid-"+a+"-"+ue(),f=n||{},l=s({props:f}),w=l.eligible,v=l.reason,m=f.onDestroy;f.onDestroy=function(){if(t&&w&&p.splice(p.indexOf(t),1),m)return m.apply(void 0,arguments)};var y=Ct({uid:c,options:r});y.init(),w?y.setProps(f):f.onDestroy&&f.onDestroy(),qt.register((function(e){return y.destroy(e||new Error("zoid destroyed all components"))}));var g=function(n){var t=(void 0===n?{}:n).decorate;return e((void 0===t?ge:t)(f))},E=function(e,n,r){return h.try((function(){if(!w){var n=new Error(v||o+" component is not eligible");return y.destroy(n).then((function(){throw n}))}if(!G(e))throw new Error("Must pass window to renderTo");return function(e,n){return h.try((function(){if(e.window)return at(e.window).getType();if(n){if(n!==mt.IFRAME&&n!==mt.POPUP)throw new Error("Unrecognized context: "+n);return n}return u}))}(f,r)})).then((function(o){if(n=function(e,n){if(n){if("string"!=typeof n&&!re(n))throw new TypeError("Expected string or element selector to be passed");return n}if(e===mt.POPUP)return"body";throw new Error("Expected element to be passed to render iframe")}(o,n),e!==window&&"string"!=typeof n)throw new Error("Must pass string element when rendering to another window");return y.render({target:e,container:n,context:o,rerender:function(){var o=g();return ye(t,o),o.renderTo(e,n,r)}})})).catch((function(e){return y.destroy(e).then((function(){throw e}))}))};return t=i({},y.getExports(),y.getHelpers(),function(){for(var e=d(),n={},t=function(){var t=o[r],a=e[t];n[t]=function(e){var n=y.getProps(),t=i({},e,{parent:{uid:c,props:n,export:y.export}});return a(t)}},r=0,o=Object.keys(e);r<o.length;r++)t();return n}(),{isEligible:function(){return w},clone:g,render:function(e,n){return E(window,e,n)},renderTo:function(e,n,t){return E(e,n,t)}}),w&&p.push(t),t};if(v(),n=rt("zoid_allow_delegate_"+o,(function(){return!0})),t=rt("zoid_delegate_"+o,(function(e){var n=e.data;return{parent:Ct({uid:n.uid,options:r,overrides:n.overrides,parentWin:e.source})}})),Ft.register(n.cancel),Ft.register(t.cancel),f.components=f.components||{},f.components[a])throw new Error("Can not register multiple components with the same tag: "+a);return f.components[a]=!0,{init:m,instances:p,driver:function(e,n){var t={react:kt,angular:At,vue:jt,vue3:Wt,angular2:Lt};if(!t[e])throw new Error("Could not find driver for framework: "+e);return l[e]||(l[e]=t[e].register(a,c,m,n)),l[e]},isChild:w,canRenderTo:function(e){return it(e,"zoid_allow_delegate_"+o).then((function(e){return e.data})).catch((function(){return!1}))},registerChild:v}}(e),t=function(e){return n.init(e)};t.driver=function(e,t){return n.driver(e,t)},t.isChild=function(){return n.isChild()},t.canRenderTo=function(e){return n.canRenderTo(e)},t.instances=n.instances;var r=n.registerChild();return r&&(window.xprops=t.xprops=r.getProps()),t};function Bt(e){ot&&ot.destroyBridges();var n=qt.all(e);return qt=Re(),n}var Ut=Bt;function Yt(e){var n;return Ut(),delete window.__zoid_10_3_3__,function(){for(var e=dn("responseListeners"),n=0,t=e.keys();n<t.length;n++){var r=t[n],o=e.get(r);o&&(o.cancelled=!0),e.del(r)}}(),(n=dn().get("postMessageListener"))&&n.cancel(),delete window.__post_robot_11_0_0__,Ft.all(e)}}])},e.exports=t()}))),L=a((function(e,n){var t;"undefined"!=typeof self&&self,t=function(){return 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,n,t){t.r(n),t.d(n,"getUserAgent",(function(){return i})),t.d(n,"isDevice",(function(){return a})),t.d(n,"isWebView",(function(){return u})),t.d(n,"isStandAlone",(function(){return c})),t.d(n,"isFacebookWebView",(function(){return s})),t.d(n,"isFirefoxIOS",(function(){return d})),t.d(n,"isEdgeIOS",(function(){return f})),t.d(n,"isOperaMini",(function(){return l})),t.d(n,"isAndroid",(function(){return p})),t.d(n,"isIos",(function(){return h})),t.d(n,"isGoogleSearchApp",(function(){return w})),t.d(n,"isQQBrowser",(function(){return v})),t.d(n,"isIosWebview",(function(){return m})),t.d(n,"isSFVC",(function(){return y})),t.d(n,"isSFVCorSafari",(function(){return g})),t.d(n,"isAndroidWebview",(function(){return E})),t.d(n,"isIE",(function(){return P})),t.d(n,"isIECompHeader",(function(){return b})),t.d(n,"isElectron",(function(){return _})),t.d(n,"isIEIntranet",(function(){return O})),t.d(n,"isMacOsCna",(function(){return T})),t.d(n,"supportsPopups",(function(){return S})),t.d(n,"isChrome",(function(){return x})),t.d(n,"isSafari",(function(){return I})),t.d(n,"isApplePaySupported",(function(){return N})),t.d(n,"isDocumentReady",(function(){return Cn})),t.d(n,"isDocumentInteractive",(function(){return kn})),t.d(n,"urlEncode",(function(){return jn})),t.d(n,"waitForWindowReady",(function(){return Wn})),t.d(n,"waitForDocumentReady",(function(){return An})),t.d(n,"waitForDocumentBody",(function(){return Ln})),t.d(n,"parseQuery",(function(){return Dn})),t.d(n,"getQueryParam",(function(){return Mn})),t.d(n,"urlWillRedirectPage",(function(){return qn})),t.d(n,"formatQuery",(function(){return Fn})),t.d(n,"extendQuery",(function(){return zn})),t.d(n,"extendUrl",(function(){return Bn})),t.d(n,"redirect",(function(){return Un})),t.d(n,"hasMetaViewPort",(function(){return Yn})),t.d(n,"isElementVisible",(function(){return Hn})),t.d(n,"getPerformance",(function(){return Gn})),t.d(n,"enablePerformance",(function(){return Vn})),t.d(n,"getPageRenderTime",(function(){return Jn})),t.d(n,"htmlEncode",(function(){return $n})),t.d(n,"isBrowser",(function(){return Zn})),t.d(n,"querySelectorAll",(function(){return Xn})),t.d(n,"onClick",(function(){return Kn})),t.d(n,"getScript",(function(){return Qn})),t.d(n,"isLocalStorageEnabled",(function(){return et})),t.d(n,"getBrowserLocales",(function(){return nt})),t.d(n,"appendChild",(function(){return tt})),t.d(n,"isElement",(function(){return rt})),t.d(n,"getElementSafe",(function(){return ot})),t.d(n,"getElement",(function(){return it})),t.d(n,"elementReady",(function(){return at})),t.d(n,"PopupOpenError",(function(){return ct})),t.d(n,"popup",(function(){return st})),t.d(n,"writeToWindow",(function(){return dt})),t.d(n,"writeElementToWindow",(function(){return ft})),t.d(n,"setStyle",(function(){return lt})),t.d(n,"awaitFrameLoad",(function(){return pt})),t.d(n,"awaitFrameWindow",(function(){return ht})),t.d(n,"createElement",(function(){return wt})),t.d(n,"iframe",(function(){return vt})),t.d(n,"addEventListener",(function(){return mt})),t.d(n,"bindEvents",(function(){return yt})),t.d(n,"setVendorCSS",(function(){return Et})),t.d(n,"animate",(function(){return _t})),t.d(n,"makeElementVisible",(function(){return Ot})),t.d(n,"makeElementInvisible",(function(){return Tt})),t.d(n,"showElement",(function(){return St})),t.d(n,"hideElement",(function(){return xt})),t.d(n,"destroyElement",(function(){return It})),t.d(n,"showAndAnimate",(function(){return Nt})),t.d(n,"animateAndHide",(function(){return Rt})),t.d(n,"addClass",(function(){return Ct})),t.d(n,"removeClass",(function(){return kt})),t.d(n,"isElementClosed",(function(){return jt})),t.d(n,"watchElementForClose",(function(){return Wt})),t.d(n,"fixScripts",(function(){return At})),t.d(n,"onResize",(function(){return Lt})),t.d(n,"getResourceLoadTime",(function(){return Dt})),t.d(n,"isShadowElement",(function(){return Mt})),t.d(n,"getShadowRoot",(function(){return qt})),t.d(n,"getShadowHost",(function(){return Ft})),t.d(n,"insertShadowSlot",(function(){return zt})),t.d(n,"preventClickFocus",(function(){return Bt})),t.d(n,"getStackTrace",(function(){return Ut})),t.d(n,"getCurrentScript",(function(){return Ht})),t.d(n,"getCurrentScriptUID",(function(){return Vt})),t.d(n,"experiment",(function(){return Kt})),t.d(n,"getGlobalNameSpace",(function(){return Qt})),t.d(n,"getStorage",(function(){return Jt})),t.d(n,"getFunctionName",(function(){return ie})),t.d(n,"setFunctionName",(function(){return ae})),t.d(n,"base64encode",(function(){return ue})),t.d(n,"base64decode",(function(){return ce})),t.d(n,"uniqueID",(function(){return se})),t.d(n,"getGlobal",(function(){return de})),t.d(n,"getObjectID",(function(){return fe})),t.d(n,"getEmptyObject",(function(){return pe})),t.d(n,"memoize",(function(){return ve})),t.d(n,"promiseIdentity",(function(){return me})),t.d(n,"memoizePromise",(function(){return ye})),t.d(n,"promisify",(function(){return ge})),t.d(n,"inlineMemoize",(function(){return Ee})),t.d(n,"noop",(function(){return Pe})),t.d(n,"once",(function(){return be})),t.d(n,"hashStr",(function(){return _e})),t.d(n,"strHashStr",(function(){return Oe})),t.d(n,"match",(function(){return Te})),t.d(n,"awaitKey",(function(){return Se})),t.d(n,"stringifyError",(function(){return xe})),t.d(n,"stringifyErrorMessage",(function(){return Ie})),t.d(n,"stringify",(function(){return Ne})),t.d(n,"domainMatches",(function(){return Re})),t.d(n,"patchMethod",(function(){return Ce})),t.d(n,"extend",(function(){return ke})),t.d(n,"values",(function(){return je})),t.d(n,"memoizedValues",(function(){return We})),t.d(n,"perc",(function(){return Ae})),t.d(n,"min",(function(){return Le})),t.d(n,"max",(function(){return De})),t.d(n,"roundUp",(function(){return Me})),t.d(n,"regexMap",(function(){return qe})),t.d(n,"svgToBase64",(function(){return Fe})),t.d(n,"objFilter",(function(){return ze})),t.d(n,"identity",(function(){return Be})),t.d(n,"regexTokenize",(function(){return Ue})),t.d(n,"promiseDebounce",(function(){return Ye})),t.d(n,"safeInterval",(function(){return He})),t.d(n,"isInteger",(function(){return Ge})),t.d(n,"isFloat",(function(){return Ve})),t.d(n,"serializePrimitive",(function(){return Je})),t.d(n,"deserializePrimitive",(function(){return $e})),t.d(n,"dotify",(function(){return Ze})),t.d(n,"undotify",(function(){return Xe})),t.d(n,"eventEmitter",(function(){return Ke})),t.d(n,"camelToDasherize",(function(){return Qe})),t.d(n,"dasherizeToCamel",(function(){return en})),t.d(n,"capitalizeFirstLetter",(function(){return nn})),t.d(n,"get",(function(){return tn})),t.d(n,"safeTimeout",(function(){return rn})),t.d(n,"defineLazyProp",(function(){return on})),t.d(n,"arrayFrom",(function(){return an})),t.d(n,"isObject",(function(){return un})),t.d(n,"isObjectObject",(function(){return cn})),t.d(n,"isPlainObject",(function(){return sn})),t.d(n,"replaceObject",(function(){return dn})),t.d(n,"copyProp",(function(){return fn})),t.d(n,"regex",(function(){return ln})),t.d(n,"regexAll",(function(){return pn})),t.d(n,"isDefined",(function(){return hn})),t.d(n,"cycle",(function(){return wn})),t.d(n,"debounce",(function(){return vn})),t.d(n,"isRegex",(function(){return mn})),t.d(n,"weakMapMemoize",(function(){return yn})),t.d(n,"weakMapMemoizePromise",(function(){return gn})),t.d(n,"getOrSet",(function(){return En})),t.d(n,"cleanup",(function(){return Pn})),t.d(n,"tryCatch",(function(){return bn})),t.d(n,"removeFromArray",(function(){return _n})),t.d(n,"assertExists",(function(){return On})),t.d(n,"unique",(function(){return Tn})),t.d(n,"constHas",(function(){return Sn})),t.d(n,"dedupeErrors",(function(){return xn})),t.d(n,"ExtendableError",(function(){return In})),t.d(n,"request",(function(){return nr})),t.d(n,"addHeaderBuilder",(function(){return tr})),t.d(n,"TYPES",(function(){return rr})),t.d(n,"memoized",(function(){return or})),t.d(n,"promise",(function(){return ir})),t.d(n,"isPerc",(function(){return ar})),t.d(n,"isPx",(function(){return ur})),t.d(n,"toNum",(function(){return cr})),t.d(n,"toPx",(function(){return sr})),t.d(n,"toCSS",(function(){return dr})),t.d(n,"percOf",(function(){return fr})),t.d(n,"normalizeDimension",(function(){return lr})),t.d(n,"wrapPromise",(function(){return pr})),t.d(n,"KEY_CODES",(function(){return Nn})),t.d(n,"ATTRIBUTES",(function(){return Rn})),t.d(n,"iPhoneScreenHeightMatrix",(function(){return r}));var r={926:{device:"iPhone 12 Pro Max",textSizeHeights:[752,748,744,738],zoomHeight:{1.15:[752,747,744,738],1.25:[753,748,744,738],1.5:[752,749,744,738],1.75:[753,747,744,739],2:[752,748,744],2.5:[753,748],3:[753,744]},maybeSafari:{2:[738],2.5:[745,738],3:[747,738]}},896:{device:"iPhone XS Max, iPhone 11 Pro Max, iPhone XR, iPhone 11",textSizeHeights:[721,717,713,707],zoomHeight:{1.15:[721,716,713,707],1.25:[721,718,713,708],1.5:[722,717,713],1.75:[721,718,712,707],2:[722,718,714,708],2.5:[720,718,713,708],3:[720,717,708]},maybeSafari:{1.5:[707],3:[714]}},844:{device:"iPhone 12, iPhone 12 Pro",textSizeHeights:[670,666,662,656],zoomHeight:{1.15:[670,666,662],1.25:[670,666,663,656],1.5:[671,666,662],1.75:[670,667,662,656],2:[670,666,662],2.5:[670,663],3:[669,666,663,657]},maybeSafari:{1.15:[656],1.5:[656],2:[656],2.5:[665,655],3:[663]}},812:{device:"iPhone X, iPhone XS, iPhone 11 Pro, iPhone 12 Mini",textSizeHeights:[641,637,633,627],zoomHeight:{1.15:[641,637,633,627],1.25:[641,638,633,628],1.5:[641,638,633,627],1.75:[641,637,634],2:[642,638,634,628],2.5:[640,638,633,628],3:[642,633]},maybeSafari:{1.75:[627],3:[636,627]}},736:{device:"iPhone 6 Plus, iPhone 6S Plus, iPhone 7 Plus, iPhone 8 Plus",textSizeHeights:[628,624,620,614],zoomHeight:{1.15:[628,624,620,614],1.25:[628,624,620,614],1.5:[629,624,620],1.75:[628,625,620,614],2:[628,624,620],2.5:[628,625,620,615],3:[627,624,615]},maybeSafari:{1.5:[614],2:[614],3:[621]}},667:{device:"iPhone 6, iPhone 6S, iPhone 7, iPhone 8, iPhone SE2",textSizeHeights:[559,555,551,545],zoomHeight:{1.15:[559,555,551,545],1.25:[559,555,551,545],1.5:[560,555,551],1.75:[558,555,551],2:[560,556,552,546],2.5:[560,555,550],3:[558,555,546]},maybeSafari:{1.5:[545],1.75:[544],2.5:[545],3:[552]}}};function i(){return window.navigator.mockUserAgent||window.navigator.userAgent}function a(e){return void 0===e&&(e=i()),!!e.match(/Android|webOS|iPhone|iPad|iPod|bada|Symbian|Palm|CriOS|BlackBerry|IEMobile|WindowsMobile|Opera Mini/i)}function u(){var e=i();return/(iPhone|iPod|iPad|Macintosh).*AppleWebKit(?!.*Safari)|.*WKWebView/i.test(e)||/\bwv\b/.test(e)||/Android.*Version\/(\d)\.(\d)/i.test(e)}function c(){return!0===window.navigator.standalone||window.matchMedia("(display-mode: standalone)").matches}function s(e){return void 0===e&&(e=i()),/FBAN/.test(e)||/FBAV/.test(e)}function d(e){return void 0===e&&(e=i()),/FxiOS/i.test(e)}function f(e){return void 0===e&&(e=i()),/EdgiOS/i.test(e)}function l(e){return void 0===e&&(e=i()),/Opera Mini/i.test(e)}function p(e){return void 0===e&&(e=i()),/Android/.test(e)}function h(e){return void 0===e&&(e=i()),/iPhone|iPod|iPad/.test(e)}function w(e){return void 0===e&&(e=i()),/\bGSA\b/.test(e)}function v(e){return void 0===e&&(e=i()),/QQBrowser/.test(e)}function m(e){return void 0===e&&(e=i()),!!h(e)&&(!!w(e)||/.+AppleWebKit(?!.*Safari)|.*WKWebView/.test(e))}function y(e){if(void 0===e&&(e=i()),h(e)){var n=r[window.outerHeight];if(!n)return!1;var t=window.innerHeight,o=Math.round(window.screen.width/window.innerWidth*100)/100,a=Math.round(t*o);return o>1&&n.zoomHeight[o]?-1!==n.zoomHeight[o].indexOf(a):-1!==n.textSizeHeights.indexOf(a)}return!1}function g(e){if(void 0===e&&(e=i()),h(e)){var n=y(e),t=r[window.outerHeight];if(!t)return!1;var o=window.innerHeight,a=Math.round(window.screen.width/window.innerWidth*100)/100,u=Math.round(o*a),c=t.maybeSafari,s=!1;return a>1&&c[a]&&-1!==c[a].indexOf(u)&&(s=!0),n||s}return!1}function E(e){return void 0===e&&(e=i()),!!p(e)&&/Version\/[\d.]+/.test(e)&&!l(e)}function P(){return!!window.document.documentMode||Boolean(window.navigator&&window.navigator.userAgent&&/Edge|MSIE|rv:11/i.test(window.navigator.userAgent))}function b(){var e=window.document.querySelector('meta[http-equiv="X-UA-Compatible"]'),n=window.document.querySelector('meta[content="IE=edge"]');return!(!e||!n)}function _(){return!("undefined"==typeof process||!process.versions||!process.versions.electron)}function O(){if(window.document.documentMode)try{var e=window.status;return window.status="testIntranetMode","testIntranetMode"===window.status&&(window.status=e,!0)}catch(e){return!1}return!1}function T(){var e=i();return/Macintosh.*AppleWebKit(?!.*Safari)/i.test(e)}function S(e){return void 0===e&&(e=i()),!(m(e)||E(e)||l(e)||d(e)||f(e)||s(e)||v(e)||_()||T()||c())}function x(e){return void 0===e&&(e=i()),/Chrome|Chromium|CriOS/.test(e)}function I(e){return void 0===e&&(e=i()),/Safari/.test(e)&&!x(e)}function N(){try{if(window.ApplePaySession&&window.ApplePaySession.supportsVersion(3)&&window.ApplePaySession.canMakePayments())return!0}catch(e){return!1}return!1}function R(e,n){return(R=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function C(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,R(e,n)}function k(){return(k=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function j(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&e instanceof window.constructor)return!1;var n={}.toString;if(n){var t=n.call(e);if("[object Window]"===t||"[object global]"===t||"[object DOMWindow]"===t)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}var W,A=[],L=[],D=0;function M(){if(!D&&W){var e=W;W=null,e.resolve()}}function q(){D+=1}function F(){D-=1,M()}var z=function(){function e(e){var n=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=[],e){var t,r,o=!1,i=!1,a=!1;q();try{e((function(e){a?n.resolve(e):(o=!0,t=e)}),(function(e){a?n.reject(e):(i=!0,r=e)}))}catch(e){return F(),void this.reject(e)}F(),a=!0,o?this.resolve(t):i&&this.reject(r)}}var n=e.prototype;return n.resolve=function(e){if(this.resolved||this.rejected)return this;if(j(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},n.reject=function(e){var n=this;if(this.resolved||this.rejected)return this;if(j(e))throw new Error("Can not reject promise with another promise");if(!e){var t=e&&"function"==typeof e.toString?e.toString():{}.toString.call(e);e=new Error("Expected reject to be called with Error, got "+t)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout((function(){n.errorHandled||function(e,n){if(-1===A.indexOf(e)){A.push(e),setTimeout((function(){throw e}),1);for(var t=0;t<L.length;t++)L[t](e,n)}}(e,n)}),1),this.dispatch(),this},n.asyncReject=function(e){return this.errorHandled=!0,this.reject(e),this},n.dispatch=function(){var n=this.resolved,t=this.rejected,r=this.handlers;if(!this.dispatching&&(n||t)){this.dispatching=!0,q();for(var o=function(e,n){return e.then((function(e){n.resolve(e)}),(function(e){n.reject(e)}))},i=0;i<r.length;i++){var a=r[i],u=a.onSuccess,c=a.onError,s=a.promise,d=void 0;if(n)try{d=u?u(this.value):this.value}catch(e){s.reject(e);continue}else if(t){if(!c){s.reject(this.error);continue}try{d=c(this.error)}catch(e){s.reject(e);continue}}d instanceof e&&(d.resolved||d.rejected)?(d.resolved?s.resolve(d.value):s.reject(d.error),d.errorHandled=!0):j(d)?d instanceof e&&(d.resolved||d.rejected)?d.resolved?s.resolve(d.value):s.reject(d.error):o(d,s):s.resolve(d)}r.length=0,this.dispatching=!1,F()}},n.then=function(n,t){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for success handler");if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for error handler");var r=new e;return this.handlers.push({promise:r,onSuccess:n,onError:t}),this.errorHandled=!0,this.dispatch(),r},n.catch=function(e){return this.then(void 0,e)},n.finally=function(n){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.finally expected a function");return this.then((function(t){return e.try(n).then((function(){return t}))}),(function(t){return e.try(n).then((function(){throw t}))}))},n.timeout=function(e,n){var t=this;if(this.resolved||this.rejected)return this;var r=setTimeout((function(){t.resolved||t.rejected||t.reject(n||new Error("Promise timed out after "+e+"ms"))}),e);return this.then((function(e){return clearTimeout(r),e}))},n.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},e.resolve=function(n){return n instanceof e?n:j(n)?new e((function(e,t){return n.then(e,t)})):(new e).resolve(n)},e.reject=function(n){return(new e).reject(n)},e.asyncReject=function(n){return(new e).asyncReject(n)},e.all=function(n){var t=new e,r=n.length,o=[];if(!r)return t.resolve(o),t;for(var i=function(e,n,i){return n.then((function(n){o[e]=n,0==(r-=1)&&t.resolve(o)}),(function(e){i.reject(e)}))},a=0;a<n.length;a++){var u=n[a];if(u instanceof e){if(u.resolved){o[a]=u.value,r-=1;continue}}else if(!j(u)){o[a]=u,r-=1;continue}i(a,e.resolve(u),t)}return 0===r&&t.resolve(o),t},e.hash=function(n){var t={},r=[],o=function(e){if(n.hasOwnProperty(e)){var o=n[e];j(o)?r.push(o.then((function(n){t[e]=n}))):t[e]=o}};for(var i in n)o(i);return e.all(r).then((function(){return t}))},e.map=function(n,t){return e.all(n.map(t))},e.onPossiblyUnhandledException=function(e){return function(e){return L.push(e),{cancel:function(){L.splice(L.indexOf(e),1)}}}(e)},e.try=function(n,t,r){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.try expected a function");var o;q();try{o=n.apply(t,r||[])}catch(n){return F(),e.reject(n)}return F(),e.resolve(o)},e.delay=function(n){return new e((function(e){setTimeout(e,n)}))},e.isPromise=function(n){return!!(n&&n instanceof e)||j(n)},e.flush=function(){return n=W=W||new e,M(),n;var n},e}(),B="Call was rejected by callee.\r\n";function U(e){return void 0===e&&(e=window),"about:"===e.location.protocol}function Y(e){try{return!0}catch(e){}return!1}function H(e){void 0===e&&(e=window);var n=e.location;if(!n)throw new Error("Can not read window location");var t=n.protocol;if(!t)throw new Error("Can not read window protocol");if("file:"===t)return"file://";if("about:"===t){var r=function(e){if(void 0===e&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}(e);return r&&Y()?H(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return t+"//"+o}function G(e){void 0===e&&(e=window);var n=H(e);return n&&e.mockDomain&&0===e.mockDomain.indexOf("mock:")?e.mockDomain:n}function V(e){if(!function(e){try{if(e===window)return!0}catch(e){}try{var n=Object.getOwnPropertyDescriptor(e,"location");if(n&&!1===n.enumerable)return!1}catch(e){}try{if(U(e)&&Y())return!0}catch(e){}try{if(H(e)===H(window))return!0}catch(e){}return!1}(e))return!1;try{if(e===window)return!0;if(U(e)&&Y())return!0;if(G(window)===G(e))return!0}catch(e){}return!1}var J=[],$=[];function Z(e,n){void 0===n&&(n=!0);try{if(e===window)return!1}catch(e){return!0}try{if(!e)return!0}catch(e){return!0}try{if(e.closed)return!0}catch(e){return!e||e.message!==B}if(n&&V(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}var t=function(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}(J,e);if(-1!==t){var r=$[t];if(r&&function(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var n=e.ownerDocument;if(n&&n.documentElement&&!n.documentElement.contains(e)){for(var t=e;t.parentNode&&t.parentNode!==t;)t=t.parentNode;if(!t.host||!n.documentElement.contains(t.host))return!0}return!1}(r))return!0}return!1}function X(e){try{if(e===window)return!0}catch(e){if(e&&e.message===B)return!0}try{if("[object Window]"==={}.toString.call(e))return!0}catch(e){if(e&&e.message===B)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===B)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===B)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===B)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===B)return!0}try{if(e&&"__unlikely_value__"===e.__cross_domain_utils_window_check__)return!1}catch(e){return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch(e){}return!1}function K(e,n){for(var t=0;t<e.length;t++)try{if(e[t]===n)return t}catch(e){}return-1}var Q,ee=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("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<n.length;t++){var r=n[t];if(X(r)&&Z(r)){if(e)try{e.delete(r)}catch(e){}n.splice(t,1),this.values.splice(t,1),t-=1}}},n.isSafeToReadWrite=function(e){return!X(e)},n.set=function(e,n){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.set(e,n)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var r=this.name,o=e[r];return void(o&&o[0]===e?o[1]=n:Object.defineProperty(e,r,{value:[e,n],writable:!0}))}catch(e){}this._cleanupClosedWindows();var i=this.keys,a=this.values,u=K(i,e);-1===u?(i.push(e),a.push(n)):a[u]=n},n.get=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return n.get(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return t&&t[0]===e?t[1]:void 0}catch(e){}this._cleanupClosedWindows();var r=K(this.keys,e);if(-1!==r)return this.values[r]},n.delete=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{n.delete(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];t&&t[0]===e&&(t[0]=t[1]=void 0)}catch(e){}this._cleanupClosedWindows();var r=this.keys,o=K(r,e);-1!==o&&(r.splice(o,1),this.values.splice(o,1))},n.has=function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(e))return!0}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e))try{var t=e[this.name];return!(!t||t[0]!==e)}catch(e){}return this._cleanupClosedWindows(),-1!==K(this.keys,e)},n.getOrSet=function(e,n){if(this.has(e))return this.get(e);var t=n();return this.set(e,t),t},e}();function ne(e){return(ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function te(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function re(e,n,t){return(re=te()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var o=new(Function.bind.apply(e,r));return t&&R(o,t.prototype),o}).apply(null,arguments)}function oe(e){var n="function"==typeof Map?new Map:void 0;return(oe=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return re(e,arguments,ne(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),R(t,e)})(e)}function ie(e){return e.name||e.__name__||e.displayName||"anonymous"}function ae(e,n){try{delete e.name,e.name=n}catch(e){}return e.__name__=e.displayName=n,e}function ue(e){if("function"==typeof btoa)return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,n){return String.fromCharCode(parseInt(n,16))})));if("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64");throw new Error("Can not find window.btoa or Buffer")}function ce(e){if("function"==typeof atob)return decodeURIComponent([].map.call(atob(e),(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""));if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")}function se(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,(function(){return e.charAt(Math.floor(Math.random()*e.length))}))+"_"+ue((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function de(){if("undefined"!=typeof window)return window;if("undefined"!=typeof window)return window;if(void 0!==o)return o;throw new Error("No global found")}function fe(e){if(Q=Q||new ee,null==e||"object"!=typeof e&&"function"!=typeof e)throw new Error("Invalid object");var n=Q.get(e);return n||(n=typeof e+":"+se(),Q.set(e,n)),n}function le(e){try{return JSON.stringify([].slice.call(e),(function(e,n){return"function"==typeof n?"memoize["+fe(n)+"]":n}))}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function pe(){return{}}var he=0,we=0;function ve(e,n){void 0===n&&(n={});var t,r,o=n.thisNamespace,i=void 0!==o&&o,a=n.time,u=he;he+=1;var c=function(){for(var n=arguments.length,o=new Array(n),c=0;c<n;c++)o[c]=arguments[c];var s;u<we&&(t=null,r=null,u=he,he+=1),s=i?(r=r||new ee).getOrSet(this,pe):t=t||{};var d=le(o),f=s[d];if(f&&a&&Date.now()-f.time<a&&(delete s[d],f=null),f)return f.value;var l=Date.now(),p=e.apply(this,arguments);return s[d]={time:l,value:p},p};return c.reset=function(){t=null,r=null},ae(c,(n.name||ie(e))+"::memoized")}function me(e){return z.resolve(e)}function ye(e){var n={};function t(){for(var t=arguments,r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var u=le(i);return n.hasOwnProperty(u)||(n[u]=z.try((function(){return e.apply(r,t)})).finally((function(){delete n[u]}))),n[u]}return t.reset=function(){n={}},ae(t,ie(e)+"::promiseMemoized")}function ge(e,n){function t(){return z.try(e,this,arguments)}return void 0===n&&(n={}),n.name&&(t.displayName=n.name+":promisified"),ae(t,ie(e)+"::promisified")}function Ee(e,n,t){void 0===t&&(t=[]);var r=e.__inline_memoize_cache__=e.__inline_memoize_cache__||{},o=le(t);return r.hasOwnProperty(o)?r[o]:r[o]=n.apply(void 0,t)}function Pe(){}function be(e){var n=!1;return ae((function(){if(!n)return n=!0,e.apply(this,arguments)}),ie(e)+"::once")}function _e(e){for(var n=0,t=0;t<e.length;t++)n+=e[t].charCodeAt(0)*Math.pow(t%10+1,5);return Math.floor(Math.pow(Math.sqrt(n),5))}function Oe(e){for(var n="",t=0;t<e.length;t++){var r=e[t].charCodeAt(0)*t;e[t+1]&&(r+=e[t+1].charCodeAt(0)*(t-1)),n+=String.fromCharCode(97+Math.abs(r)%26)}return n}function Te(e,n){var t=e.match(n);if(t)return t[1]}function Se(e,n){return new z((function(t){var r=e[n];if(r)return t(r);delete e[n],Object.defineProperty(e,n,{configurable:!0,set:function(e){(r=e)&&t(r)},get:function(){return r}})}))}function xe(e,n){if(void 0===n&&(n=1),n>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";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: "+xe(e,n+1)}}function Ie(e){var n="<unknown error: "+{}.toString.call(e)+">";return e?e instanceof Error?e.message||n:"string"==typeof e.message&&e.message||n:n}function Ne(e){return"string"==typeof e?e:e&&e.toString&&"function"==typeof e.toString?e.toString():{}.toString.call(e)}function Re(e,n){var t=(e=e.split("://")[1]).indexOf(n);return-1!==t&&e.slice(t)===n}function Ce(e,n,t){var r=e[n];e[n]=function(){var e=arguments,n=this;return t({context:this,args:[].slice.call(arguments),original:r,callOriginal:function(){return r.apply(n,e)}})}}function ke(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}ve.clear=function(){we=he};var je=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},We=ve(je);function Ae(e,n){return Math.round(e*n/100)}function Le(){return Math.min.apply(Math,arguments)}function De(){return Math.max.apply(Math,arguments)}function Me(e,n){var t=e%n;return t?e-t+n:e}function qe(e,n,t){var r=[];return e.replace(n,(function(e){r.push(t?t.apply(null,arguments):e)})),r}function Fe(e){return"data:image/svg+xml;base64,"+ue(e)}function ze(e,n){void 0===n&&(n=Boolean);var t={};for(var r in e)e.hasOwnProperty(r)&&n(e[r],r)&&(t[r]=e[r]);return t}function Be(e){return e}function Ue(e,n){var t=[];return e.replace(n,(function(e){return t.push(e),""})),t}function Ye(e,n){var t,r;return void 0===n&&(n=50),ae((function(){r&&clearTimeout(r);var o=t=t||new z;return r=setTimeout((function(){t=null,r=null,z.try(e).then((function(e){o.resolve(e)}),(function(e){o.reject(e)}))}),n),o}),ie(e)+"::promiseDebounced")}function He(e,n){var t;return function r(){t=setTimeout((function(){e(),r()}),n)}(),{cancel:function(){clearTimeout(t)}}}function Ge(e){return Boolean(e.match(/^[0-9]+$/))}function Ve(e){return Boolean(e.match(/^[0-9]+\.[0-9]+$/))}function Je(e){return e.toString()}function $e(e){return"true"===e||"false"!==e&&(Ge(e)?parseInt(e,10):Ve(e)?parseFloat(e):e)}function Ze(e,n,t){for(var r in void 0===n&&(n=""),void 0===t&&(t={}),n=n?n+".":n,e)e.hasOwnProperty(r)&&null!=e[r]&&"function"!=typeof e[r]&&(e[r]&&Array.isArray(e[r])&&e[r].length&&e[r].every((function(e){return"object"!=typeof e}))?t[""+n+r+"[]"]=e[r].join(","):e[r]&&"object"==typeof e[r]?t=Ze(e[r],""+n+r,t):t[""+n+r]=Je(e[r]));return t}function Xe(e){var n={};for(var t in e)if(e.hasOwnProperty(t)&&"string"==typeof e[t]){var r=e[t];t.match(/^.+\[\]$/)?(t=t.slice(0,-2),r=r.split(",").map($e)):r=$e(r);for(var o=n,i=t.split("."),a=0;a<i.length;a++){var u=i[a],c=a+1===i.length,s=!c&&Ge(i[a+1]);if("constructor"===u||"prototype"===u||"__proto__"===u)throw new Error("Disallowed key: "+u);c?o[u]=r:o=o[u]=o[u]||(s?[]:{})}}return n}function Ke(){var e={},n={};return{on:function(e,t){var r=n[e]=n[e]||[];r.push(t);var o=!1;return{cancel:function(){o||(o=!0,r.splice(r.indexOf(t),1))}}},once:function(e,n){var t=this.on(e,(function(){t.cancel(),n()}));return t},trigger:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];var i=n[e],a=[];if(i)for(var u=function(e){var n=i[e];a.push(z.try((function(){return n.apply(void 0,r)})))},c=0;c<i.length;c++)u(c);return z.all(a).then(Pe)},triggerOnce:function(n){if(e[n])return z.resolve();e[n]=!0;for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];return this.trigger.apply(this,[n].concat(r))},reset:function(){n={}}}}function Qe(e){return e.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()}))}function en(e){return e.replace(/-([a-z])/g,(function(e){return e[1].toUpperCase()}))}function nn(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function tn(e,n,t){if(!n)return t;for(var r=n.split("."),o=0;o<r.length;o++){if("object"!=typeof e||null===e)return t;e=e[r[o]]}return void 0===e?t:e}function rn(e,n){var t=He((function(){(n-=100)<=0&&(t.cancel(),e())}),100)}function on(e,n,t){if(Array.isArray(e)){if("number"!=typeof n)throw new TypeError("Array key must be number")}else if("object"==typeof e&&null!==e&&"string"!=typeof n)throw new TypeError("Object key must be string");Object.defineProperty(e,n,{configurable:!0,enumerable:!0,get:function(){delete e[n];var r=t();return e[n]=r,r},set:function(t){delete e[n],e[n]=t}})}function an(e){return[].slice.call(e)}function un(e){return"object"==typeof e&&null!==e}function cn(e){return un(e)&&"[object Object]"==={}.toString.call(e)}function sn(e){if(!cn(e))return!1;var n=e.constructor;if("function"!=typeof n)return!1;var t=n.prototype;return!!cn(t)&&!!t.hasOwnProperty("isPrototypeOf")}function dn(e,n,t){if(void 0===t&&(t=""),Array.isArray(e)){for(var r=e.length,o=[],i=function(r){on(o,r,(function(){var o=t?t+"."+r:""+r,i=n(e[r],r,o);return(sn(i)||Array.isArray(i))&&(i=dn(i,n,o)),i}))},a=0;a<r;a++)i(a);return o}if(sn(e)){var u={},c=function(r){if(!e.hasOwnProperty(r))return"continue";on(u,r,(function(){var o=t?t+"."+r:""+r,i=n(e[r],r,o);return(sn(i)||Array.isArray(i))&&(i=dn(i,n,o)),i}))};for(var s in e)c(s);return u}throw new Error("Pass an object or array")}function fn(e,n,t,r){if(e.hasOwnProperty(t)){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o)}else n[t]=r}function ln(e,n,t){void 0===t&&(t=0),"string"==typeof e&&(e=new RegExp(e));var r=n.slice(t).match(e);if(r){var o=r.index,i=r[0];return{text:i,groups:r.slice(1),start:t+o,end:t+o+i.length,length:i.length,replace:function(e){return i?""+i.slice(0,t+o)+e+i.slice(o+i.length):""}}}}function pn(e,n){for(var t=[],r=0;;){var o=ln(e,n,r);if(!o)break;t.push(o),r=Te.end}return t}function hn(e){return null!=e}function wn(e){return z.try(e).then((function(){return wn(e)}))}function vn(e,n){var t;return void 0===n&&(n=100),ae((function(){var r=arguments,o=this;clearTimeout(t),t=setTimeout((function(){return e.apply(o,r)}),n)}),ie(e)+"::debounced")}function mn(e){return"[object RegExp]"==={}.toString.call(e)}var yn=function(e){var n=new ee;return function(t){var r=this;return n.getOrSet(t,(function(){return e.call(r,t)}))}},gn=function(e){var n=new ee;return function(t){var r=this;return n.getOrSet(t,(function(){return e.call(r,t).finally((function(){n.delete(t)}))}))}};function En(e,n,t){if(e.hasOwnProperty(n))return e[n];var r=t();return e[n]=r,r}function Pn(e){var n,t=[],r=!1;return{set:function(n,t){return r||(e[n]=t,this.register((function(){delete e[n]}))),t},register:function(e){r?e(n):t.push(be((function(){return e(n)})))},all:function(e){n=e;var o=[];for(r=!0;t.length;){var i=t.shift();o.push(i())}return z.all(o).then(Pe)}}}function bn(e){var n,t;try{n=e()}catch(e){t=e}return{result:n,error:t}}function _n(e,n){var t=e.indexOf(n);-1!==t&&e.splice(t,1)}function On(e,n){if(null==n)throw new Error("Expected "+e+" to be present");return n}function Tn(e){for(var n={},t=0;t<e.length;t++)n[e[t]]=!0;return Object.keys(n)}var Sn=function(e,n){return-1!==We(e).indexOf(n)};function xn(e){var n=[],t={};return function(r){if(-1===n.indexOf(r)){n.push(r);var o=xe(r);if(!t[o])return t[o]=!0,e(r)}}}var In=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 C(n,e),n}(oe(Error)),Nn={ENTER:13,SPACE:32},Rn={UID:"data-uid"};function Cn(){return Boolean(document.body)&&"complete"===document.readyState}function kn(){return Boolean(document.body)&&"interactive"===document.readyState}function jn(e){return encodeURIComponent(e)}function Wn(){return Ee(Wn,(function(){return new z((function(e){Cn()&&e(),window.addEventListener("load",(function(){return e()}))}))}))}var An=ve((function(){return new z((function(e){if(Cn()||kn())return e();var n=setInterval((function(){if(Cn()||kn())return clearInterval(n),e()}),10)}))}));function Ln(){return z.try((function(){return document.body?document.body:An().then((function(){if(document.body)return document.body;throw new Error("Document ready but document.body not present")}))}))}function Dn(e){return Ee(Dn,(function(){var n={};if(!e)return n;if(-1===e.indexOf("="))return n;for(var t=0,r=e.split("&");t<r.length;t++){var o=r[t];(o=o.split("="))[0]&&o[1]&&(n[decodeURIComponent(o[0])]=decodeURIComponent(o[1]))}return n}),[e])}function Mn(e){return Dn(window.location.search.slice(1))[e]}function qn(e){return-1===e.indexOf("#")||0!==e.indexOf("#")&&e.split("#")[0]!==window.location.href.split("#")[0]}function Fn(e){return void 0===e&&(e={}),Object.keys(e).filter((function(n){return"string"==typeof e[n]||"boolean"==typeof e[n]})).map((function(n){var t=e[n];if("string"!=typeof t&&"boolean"!=typeof t)throw new TypeError("Invalid type for query");return jn(n)+"="+jn(t.toString())})).join("&")}function zn(e,n){return void 0===n&&(n={}),n&&Object.keys(n).length?Fn(k({},Dn(e),n)):e}function Bn(e,n){var t,r,o=n.query||{},i=n.hash||{},a=e.split("#");r=a[1];var u=(t=a[0]).split("?");t=u[0];var c=zn(u[1],o),s=zn(r,i);return c&&(t=t+"?"+c),s&&(t=t+"#"+s),t}function Un(e,n){return void 0===n&&(n=window),new z((function(t){n.location=e,qn(e)||t()}))}function Yn(){var e=document.querySelector("meta[name=viewport]");return!(a()&&window.screen.width<660&&!e)}function Hn(e){return Boolean(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function Gn(){return Ee(Gn,(function(){var e=window.performance;if(e&&e.now&&e.timing&&e.timing.connectEnd&&e.timing.navigationStart&&Math.abs(e.now()-Date.now())>1e3&&e.now()-(e.timing.connectEnd-e.timing.navigationStart)>0)return e}))}function Vn(){return Boolean(Gn())}function Jn(){return An().then((function(){var e=Gn();if(e){var n=e.timing;return n.connectEnd&&n.domInteractive?n.domInteractive-n.connectEnd:void 0}}))}function $n(e){return void 0===e&&(e=""),e.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function Zn(){return"undefined"!=typeof window&&void 0!==window.location}function Xn(e,n){return void 0===n&&(n=window.document),[].slice.call(n.querySelectorAll(e))}function Kn(e,n){e.addEventListener("touchstart",Pe),e.addEventListener("click",n),e.addEventListener("keypress",(function(e){if(e.keyCode===Nn.ENTER||e.keyCode===Nn.SPACE)return n(e)}))}function Qn(e){var n=e.host,t=void 0===n?window.location.host:n,r=e.path,o=e.reverse,i=void 0!==o&&o;return Ee(Qn,(function(){var e=""+t+r,n=[].slice.call(document.getElementsByTagName("script"));i&&n.reverse();for(var o=0;o<n.length;o++){var a=n[o];if(a.src&&a.src.replace(/^https?:\/\//,"").split("?")[0]===e)return a}}),[r])}function et(){return Ee(et,(function(){try{if("undefined"==typeof window)return!1;if(window.localStorage){var e=Math.random().toString();window.localStorage.setItem("__test__localStorage__",e);var n=window.localStorage.getItem("__test__localStorage__");if(window.localStorage.removeItem("__test__localStorage__"),e===n)return!0}}catch(e){}return!1}))}function nt(){var e=window.navigator,n=e.languages?[].concat(e.languages):[];return e.language&&n.push(e.language),e.userLanguage&&n.push(e.userLanguage),n.map((function(e){if(e&&e.match(/^[a-z]{2}[-_][A-Z]{2}$/)){var n=e.split(/[-_]/);return{country:n[1],lang:n[0]}}return e&&e.match(/^[a-z]{2}$/)?{lang:e}:null})).filter(Boolean)}function tt(e,n){e.appendChild(n)}function rt(e){return e instanceof window.Element||null!==e&&"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument}function ot(e,n){return void 0===n&&(n=document),rt(e)?e:"string"==typeof e?n.querySelector(e):void 0}function it(e,n){void 0===n&&(n=document);var t=ot(e,n);if(t)return t;throw new Error("Can not find element: "+Ne(e))}function at(e){return new z((function(n,t){var r=Ne(e),o=ot(e);if(o)return n(o);if(Cn())return t(new Error("Document is ready and element "+r+" does not exist"));var i=setInterval((function(){return(o=ot(e))?(clearInterval(i),n(o)):Cn()?(clearInterval(i),t(new Error("Document is ready and element "+r+" does not exist"))):void 0}),10)}))}var ut,ct=function(e){function n(){return e.apply(this,arguments)||this}return C(n,e),n}(In);function st(e,n){var t=(n=n||{}).width,r=n.height,o=0,i=0;t&&(window.outerWidth?i=Math.round((window.outerWidth-t)/2)+window.screenX:window.screen.width&&(i=Math.round((window.screen.width-t)/2))),r&&(window.outerHeight?o=Math.round((window.outerHeight-r)/2)+window.screenY:window.screen.height&&(o=Math.round((window.screen.height-r)/2))),t&&r&&(n=k({top:o,left:i,width:t,height:r,status:1,toolbar:0,menubar:0,resizable:1,scrollbars:1},n));var a=n.name||"";delete n.name;var u,c=Object.keys(n).map((function(e){if(null!=n[e])return e+"="+Ne(n[e])})).filter(Boolean).join(",");try{u=window.open(e,a,c)}catch(e){throw new ct("Can not open popup window - "+(e.stack||e.message))}if(Z(u))throw new ct("Can not open popup window - blocked");return window.addEventListener("unload",(function(){return u.close()})),u}function dt(e,n){try{e.document.open(),e.document.write(n),e.document.close()}catch(t){try{e.location="javascript: document.open(); document.write("+JSON.stringify(n)+"); document.close();"}catch(e){}}}function ft(e,n){var t=n.tagName.toLowerCase();if("html"!==t)throw new Error("Expected element to be html, got "+t);for(var r=e.document.documentElement,o=0,i=an(r.children);o<i.length;o++)r.removeChild(i[o]);for(var a=0,u=an(n.children);a<u.length;a++)r.appendChild(u[a])}function lt(e,n,t){void 0===t&&(t=window.document),e.styleSheet?e.styleSheet.cssText=n:e.appendChild(t.createTextNode(n))}function pt(e){if((ut=ut||new ee).has(e)){var n=ut.get(e);if(n)return n}var t=new z((function(n,t){e.addEventListener("load",(function(){!function(e){if(function(){for(var e=0;e<J.length;e++){var n=!1;try{n=J[e].closed}catch(e){}n&&($.splice(e,1),J.splice(e,1))}}(),e&&e.contentWindow)try{J.push(e.contentWindow),$.push(e)}catch(e){}}(e),n(e)})),e.addEventListener("error",(function(r){e.contentWindow?n(e):t(r)}))}));return ut.set(e,t),t}function ht(e){return pt(e).then((function(e){if(!e.contentWindow)throw new Error("Could not find window in iframe");return e.contentWindow}))}function wt(e,n,t){void 0===e&&(e="div"),void 0===n&&(n={}),e=e.toLowerCase();var r=document.createElement(e);if(n.style&&ke(r.style,n.style),n.class&&(r.className=n.class.join(" ")),n.id&&r.setAttribute("id",n.id),n.attributes)for(var o=0,i=Object.keys(n.attributes);o<i.length;o++){var a=i[o];r.setAttribute(a,n.attributes[a])}if(n.styleSheet&<(r,n.styleSheet),t&&tt(t,r),n.html)if("iframe"===e){if(!t||!r.contentWindow)throw new Error("Iframe html can not be written unless container provided and iframe in DOM");dt(r.contentWindow,n.html)}else r.innerHTML=n.html;return r}function vt(e,n){void 0===e&&(e={});var t=e.style||{},r=wt("iframe",{attributes:k({allowTransparency:"true"},e.attributes||{}),style:k({backgroundColor:"transparent",border:"none"},t),html:e.html,class:e.class}),o=window.navigator.userAgent.match(/MSIE|Edge/i);return r.hasAttribute("id")||r.setAttribute("id",se()),pt(r),n&&it(n).appendChild(r),(e.url||o)&&r.setAttribute("src",e.url||"about:blank"),r}function mt(e,n,t){return e.addEventListener(n,t),{cancel:function(){e.removeEventListener(n,t)}}}function yt(e,n,t){t=be(t);for(var r=0;r<n.length;r++)e.addEventListener(n[r],t);return{cancel:be((function(){for(var r=0;r<n.length;r++)e.removeEventListener(n[r],t)}))}}var gt=["webkit","moz","ms","o"];function Et(e,n,t){e.style[n]=t;for(var r=nn(n),o=0;o<gt.length;o++)e.style[""+gt[o]+r]=t}var Pt=["animationstart","webkitAnimationStart","oAnimationStart","MSAnimationStart"],bt=["animationend","webkitAnimationEnd","oAnimationEnd","MSAnimationEnd"];function _t(e,n,t,r){return void 0===r&&(r=1e3),new z((function(o,i){var a=it(e);if(!a)return o();var u,c,s,d,f=!1;function l(){clearTimeout(u),clearTimeout(c),s.cancel(),d.cancel()}s=yt(a,Pt,(function(e){e.target===a&&e.animationName===n&&(clearTimeout(u),e.stopPropagation(),s.cancel(),f=!0,c=setTimeout((function(){l(),o()}),r))})),d=yt(a,bt,(function(e){if(e.target===a&&e.animationName===n)return l(),"string"==typeof e.animationName&&e.animationName!==n?i("Expected animation name to be "+n+", found "+e.animationName):o()})),Et(a,"animationName",n),u=setTimeout((function(){if(!f)return l(),o()}),200),t&&t(l)}))}function Ot(e){e.style.setProperty("visibility","")}function Tt(e){e.style.setProperty("visibility","hidden","important")}function St(e){e.style.setProperty("display","")}function xt(e){e.style.setProperty("display","none","important")}function It(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Nt(e,n,t){var r=_t(e,n,t);return St(e),r}function Rt(e,n,t){return _t(e,n,t).then((function(){xt(e)}))}function Ct(e,n){e.classList.add(n)}function kt(e,n){e.classList.remove(n)}function jt(e){return!(e&&e.parentNode&&e.ownerDocument&&e.ownerDocument.documentElement&&e.ownerDocument.documentElement.contains(e))}function Wt(e,n){n=be(n);var t,r,o,i=!1,a=[],u=function(){i=!0;for(var e=0;e<a.length;e++)a[e].disconnect();t&&t.cancel(),o&&o.removeEventListener("unload",c),r&&It(r)},c=function(){i||(n(),u())};if(jt(e))return c(),{cancel:u};if(window.MutationObserver)for(var s=e.parentElement;s;){var d=new window.MutationObserver((function(){jt(e)&&c()}));d.observe(s,{childList:!0}),a.push(d),s=s.parentElement}return(r=document.createElement("iframe")).setAttribute("name","__detect_close_"+se()+"__"),r.style.display="none",ht(r).then((function(e){(o=function(e){if(!V(e))throw new Error("Expected window to be same domain");return e}(e)).addEventListener("unload",c)})),e.appendChild(r),t=He((function(){jt(e)&&c()}),1e3),{cancel:u}}function At(e,n){void 0===n&&(n=window.document);for(var t=0,r=Xn("script",e);t<r.length;t++){var o=r[t],i=o.parentNode;if(i){var a=n.createElement("script");a.text=o.textContent,i.replaceChild(a,o)}}}function Lt(e,n,t){var r=void 0===t?{}:t,o=r.width,i=void 0===o||o,a=r.height,u=void 0===a||a,c=r.interval,s=void 0===c?100:c,d=r.win,f=void 0===d?window:d,l=e.offsetWidth,p=e.offsetHeight,h=!1;n({width:l,height:p});var w,v,m=function(){if(!h&&Hn(e)){var t=e.offsetWidth,r=e.offsetHeight;(i&&t!==l||u&&r!==p)&&n({width:t,height:r}),l=t,p=r}};return f.addEventListener("resize",m),void 0!==f.ResizeObserver?((w=new f.ResizeObserver(m)).observe(e),v=He(m,10*s)):void 0!==f.MutationObserver?((w=new f.MutationObserver(m)).observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!1}),v=He(m,10*s)):v=He(m,s),{cancel:function(){h=!0,w.disconnect(),window.removeEventListener("resize",m),v.cancel()}}}function Dt(e){var n=Gn();if(n&&"function"==typeof n.getEntries)for(var t=n.getEntries(),r=0;r<t.length;r++){var o=t[r];if(o&&o.name&&0===o.name.indexOf(e)&&"number"==typeof o.duration)return Math.floor(o.duration)}}function Mt(e){for(;e.parentNode;)e=e.parentNode;return"[object ShadowRoot]"===e.toString()}function qt(e){for(;e.parentNode;)e=e.parentNode;if(Mt(e))return e}function Ft(e){var n=qt(e);if(n.host)return n.host}function zt(e){var n=Ft(e);if(!n)throw new Error("Element is not in shadow dom");if(Mt(n))throw new Error("Host element is also in shadow dom");var t="shadow-slot-"+se(),r=document.createElement("slot");r.setAttribute("name",t),e.appendChild(r);var o=document.createElement("div");return o.setAttribute("slot",t),n.appendChild(o),o}function Bt(e){var n=function n(t){return e.removeEventListener("focus",n),t.preventDefault(),e.blur(),!1};e.addEventListener("mousedown",(function(){e.addEventListener("focus",n),setTimeout((function(){e.removeEventListener("focus",n)}),1)}))}function Ut(){try{throw new Error("_")}catch(e){return e.stack||""}}var Yt="undefined"!=typeof document?document.currentScript:null,Ht=ve((function(){if(Yt)return Yt;if(Yt=function(){try{var e=Ut(),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(e){}}())return Yt;throw new Error("Can not determine current script")})),Gt=se(),Vt=ve((function(){var e;try{e=Ht()}catch(e){return Gt}var n=e.getAttribute(Rn.UID);return n&&"string"==typeof n||(n=e.getAttribute(Rn.UID+"-auto"))&&"string"==typeof n||(n=se(),e.setAttribute(Rn.UID+"-auto",n)),n}));function Jt(e){var n=e.name,t=e.lifetime,r=void 0===t?12e5:t;return Ee(Jt,(function(){var e,t="__"+n+"_storage__",o=se();function i(n){var r,i=et();if(e&&(r=e),!r&&i){var a=window.localStorage.getItem(t);a&&(r=JSON.parse(a))}r||(r=de()[t]),r||(r={id:o}),r.id||(r.id=o),e=r;var u=n(r);return i?window.localStorage.setItem(t,JSON.stringify(r)):de()[t]=r,e=null,u}function a(){return i((function(e){return e.id}))}function u(e){return i((function(n){var t=n.__session__,o=Date.now();return t&&o-t.created>r&&(t=null),t||(t={guid:se(),created:o}),n.__session__=t,e(t)}))}return{getState:i,getID:a,isStateFresh:function(){return a()===o},getSessionState:function(e){return u((function(n){return n.state=n.state||{},e(n.state)}))},getSessionID:function(){return u((function(e){return e.guid}))}}}),[{name:n,lifetime:r}])}function $t(){return Jt({name:"belter_experiment"})}function Zt(e){return $t().getSessionState((function(n){return n.loggedBeacons=n.loggedBeacons||[],-1===n.loggedBeacons.indexOf(e)&&(n.loggedBeacons.push(e),!0)}))}function Xt(e){return Math.floor(Math.random()*e)}function Kt(e){var n,t=e.name,r=e.sample,o=void 0===r?50:r,i=e.logTreatment,a=void 0===i?Pe:i,u=e.logCheckpoint,c=void 0===u?Pe:u,s=e.sticky,d=void 0===s||s?function(e){return $t().getState((function(n){return n.throttlePercentiles=n.throttlePercentiles||{},n.throttlePercentiles[e]=n.throttlePercentiles[e]||Xt(100),n.throttlePercentiles[e]}))}(t):Xt(100),f=t+"_"+(n=d<o?"test":o>=50||o<=d&&d<2*o?"control":"throttle"),l=!1,p=!1;try{window.localStorage&&window.localStorage.getItem(t)&&(p=!0)}catch(e){}return{isEnabled:function(){return"test"===n||p},isDisabled:function(){return"test"!==n&&!p},getTreatment:function(){return f},log:function(e,n){return void 0===n&&(n={}),l?(Zt(f+"_"+JSON.stringify(n))&&a({name:t,treatment:f,payload:n,throttle:d}),Zt(f+"_"+e+"_"+JSON.stringify(n))&&c({name:t,treatment:f,checkpoint:e,payload:n,throttle:d}),this):this},logStart:function(e){return void 0===e&&(e={}),l=!0,this.log("start",e)},logComplete:function(e){return void 0===e&&(e={}),this.log("complete",e)}}}function Qt(e){var n=e.name,t=e.version,r=void 0===t?"latest":t,o=de(),i="__"+n+"__"+r+"_global__",a=o[i]=o[i]||{};return{get:function(e,n){return n=n||{},a[e]=a[e]||n}}}var er=[];function nr(e){var n=e.url,t=e.method,r=void 0===t?"get":t,o=e.headers,i=void 0===o?{}:o,a=e.json,u=e.data,c=e.body,s=e.win,d=void 0===s?window:s,f=e.timeout,l=void 0===f?0:f;return new z((function(e,t){if(a&&u||a&&c||u&&a)throw new Error("Only options.json or options.data or options.body should be passed");for(var o={},s=0,f=Object.keys(i);s<f.length;s++){var p=f[s];o[p.toLowerCase()]=i[p]}a?o["content-type"]=o["content-type"]||"application/json":(u||c)&&(o["content-type"]=o["content-type"]||"application/x-www-form-urlencoded; charset=utf-8"),o.accept=o.accept||"application/json";for(var h=0;h<er.length;h++)for(var w=(0,er[h])(),v=0,m=Object.keys(w);v<m.length;v++){var y=m[v];o[y.toLowerCase()]=w[y]}var g=new d.XMLHttpRequest;for(var E in g.addEventListener("load",(function(){var o=function(e){void 0===e&&(e="");for(var n={},t=0,r=e.trim().split("\n");t<r.length;t++){var o=r[t].split(":"),i=o[0],a=o.slice(1);n[i.toLowerCase()]=a.join(":").trim()}return n}(this.getAllResponseHeaders());if(!this.status)return t(new Error("Request to "+r.toLowerCase()+" "+n+" failed: no response status code."));var i=o["content-type"],a=i&&(0===i.indexOf("application/json")||0===i.indexOf("text/json")),u=this.responseText;try{u=JSON.parse(u)}catch(e){if(a)return t(new Error("Invalid json: "+this.responseText+"."))}return e({status:this.status,headers:o,body:u})}),!1),g.addEventListener("error",(function(e){t(new Error("Request to "+r.toLowerCase()+" "+n+" failed: "+e.toString()+"."))}),!1),g.open(r,n,!0),o)o.hasOwnProperty(E)&&g.setRequestHeader(E,o[E]);a?c=JSON.stringify(a):u&&(c=Object.keys(u).map((function(e){return encodeURIComponent(e)+"="+(u?encodeURIComponent(u[e]):"")})).join("&")),g.timeout=l,g.ontimeout=function(){t(new Error("Request to "+r.toLowerCase()+" "+n+" has timed out"))},g.send(c)}))}function tr(e){er.push(e)}var rr=!0;function or(e,n,t){t.value=ve(t.value,{name:n,thisNamespace:!0})}function ir(e,n,t){t.value=ge(t.value,{name:n})}function ar(e){return"string"==typeof e&&/^[0-9]+%$/.test(e)}function ur(e){return"string"==typeof e&&/^[0-9]+px$/.test(e)}function cr(e){if("number"==typeof e)return e;var n=e.match(/^([0-9]+)(px|%)$/);if(!n)throw new Error("Could not match css value from "+e);return parseInt(n[1],10)}function sr(e){return cr(e)+"px"}function dr(e){return"number"==typeof e?sr(e):ar(e)?e:sr(e)}function fr(e,n){return parseInt(e*cr(n)/100,10)}function lr(e,n){if("number"==typeof e)return e;if(ar(e))return fr(n,e);if(ur(e))return cr(e);throw new Error("Can not normalize dimension: "+e)}function pr(e,n){var t=(void 0===n?{}:n).timeout,r=[],o=[],i=setTimeout((function(){r.length&&o.push(z.asyncReject(new Error("Expected "+r[0]+" to be called")))}),void 0===t?5e3:t),a=function(e,n){return void 0===n&&(n=Pe),r.push(e),function(){for(var t=this,i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];_n(r,e);var c=bn((function(){var e;return(e=n).call.apply(e,[t].concat(a))})),s=c.result,d=c.error;if(d)throw o.push(z.asyncReject(d)),d;return o.push(z.resolve(s)),s}},u=function(e,n){return void 0===n&&(n=Pe),function(){var t;o.push(z.asyncReject(new Error("Expected "+e+" to not be called")));for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(t=n).call.apply(t,[this].concat(i))}},c=function(e,n){return void 0===n&&(n=Pe),r.push(e),function(){for(var t=this,i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];_n(r,e);var c=bn((function(){var e;return(e=n).call.apply(e,[t].concat(a))})),s=c.result,d=c.error;if(d)throw d;return o.push(z.resolve(s).then((function(){throw new Error("Expected "+e+" to throw an error")}),Pe)),s}},s=function e(){return z.try((function(){if(o.length)return o.pop()})).then((function(){return o.length?e():r.length?z.delay(10).then(e):void 0}))};return o.push(z.try((function(){return e({expect:a,avoid:u,expectError:c,error:u,wait:s})}))),s().then((function(){clearTimeout(i)}))}}])},e.exports=t()})),D=i(L),M=u(Object.assign({__proto__:null,default:D,__moduleExports:L},D));function q(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,a=e.event,u=e.dimensions,s=u.width,d=u.height;if(t&&r){var f=o.createElement("div");f.setAttribute("id",n);var l=o.createElement("style");return i.cspNonce&&l.setAttribute("nonce",i.cspNonce),l.appendChild(o.createTextNode("\n #"+n+" {\n display: block;\n position: relative;\n width: "+s+";\n height: "+d+";\n }\n #"+n+" > iframe {\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: all .2s ease-in-out;\n }\n #"+n+" > iframe."+c.INVISIBLE+" {\n opacity: 0;\n }\n #"+n+" > iframe."+c.VISIBLE+" {\n opacity: 1;\n }\n ")),t.allowPaymentRequest="true",f.appendChild(t),f.appendChild(r),f.appendChild(l),r.classList.add(c.VISIBLE),t.classList.add(c.INVISIBLE),a.on(A.EVENT.RENDERED,(function(){r.classList.remove(c.VISIBLE),r.classList.add(c.INVISIBLE),t.classList.remove(c.INVISIBLE),t.classList.add(c.VISIBLE),setTimeout((function(){M.destroyElement(r)}),1)})),a.on(A.EVENT.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=M.toCSS(n)),"number"==typeof t&&(f.style.height=M.toCSS(t))})),f}}!function(e){e.VISIBLE="is-visible",e.INVISIBLE="is-invisible"}(c||(c={}));var F,z=function(e){var n,t,r,o,i,a;if(null!=(n=e.state)&&n.__createToken)return e.state.__createToken;if(null!=(t=e.parent)&&null!=(r=t.state)&&r.__createToken)return e.parent.state.__createToken;if(null!=(o=e.state)&&null!=(i=o.parent)&&null!=(a=i.state)&&a.__createToken)return e.state.parent.state.__createToken;throw new Error("Index is not registered")},B=function(){var e=n(s.mark((function e(n,t){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,z(n)(t);case 2:return e.abrupt("return",e.sent.data);case 5:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),U=A.create({tag:"monei-card-input",url:E.cardInputUrl,dimensions:{width:"100%",height:"auto"},autoResize:{width:!1,height:!0},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1,alias:"orderId"},paymentId:{type:A.PROP_TYPE.STRING,required:!1},onBlur:{type:A.PROP_TYPE.FUNCTION,required:!1},onEnter:{type:A.PROP_TYPE.FUNCTION,required:!1},onChange:{type:A.PROP_TYPE.FUNCTION,required:!1},onFocus:{type:A.PROP_TYPE.FUNCTION,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},placeholders:{type:A.PROP_TYPE.OBJECT,required:!1},errorMessages:{type:A.PROP_TYPE.OBJECT,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}}},validate:m,containerTemplate:function(e){return e.state.__createToken=function(n){if(void 0===n&&(n={}),!e.frame)throw new Error("CardInput instance is not registered");return W.send(e.frame.contentWindow,"CREATE_TOKEN",n,{domain:E.domain})},q(e)},prerenderTemplate:function(e){var n=e.doc,t=e.props,r=n.createElement("html"),o=n.createElement("body");o.style.margin="0";var i=n.createElement("div");i.style.height="36px",i.style.boxSizing="border-box";var a=t.style||t.innerStyle;return null!=a&&a.base&&Object.assign(i.style,d(a.base)),null!=a&&a.loading&&Object.assign(i.style,d(a.loading)),o.appendChild(i),r.appendChild(o),r}}),Y=A.create({tag:"monei-payment-modal",url:E.paymentModalUrl,dimensions:{width:"100%",height:"100%"},autoResize:{width:!1,height:!1},containerTemplate:q,prerenderTemplate:function(){},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!0},isOpen:{type:A.PROP_TYPE.BOOLEAN,required:!0},language:{type:A.PROP_TYPE.STRING,required:!1},generatePaymentToken:{type:A.PROP_TYPE.BOOLEAN,required:!1},fullscreen:{type:A.PROP_TYPE.BOOLEAN,required:!1},customer:{type:A.PROP_TYPE.OBJECT,required:!1},paymentMethod:{type:A.PROP_TYPE.OBJECT,required:!1},allowedPaymentMethods:{type:A.PROP_TYPE.ARRAY,required:!1},customDomain:{type:A.PROP_TYPE.STRING,required:!1},billingDetails:{type:A.PROP_TYPE.OBJECT,required:!1},shippingDetails:{type:A.PROP_TYPE.OBJECT,required:!1},onResult:{type:A.PROP_TYPE.FUNCTION,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1}}}),H=function(){var e=n(s.mark((function e(r){var o,i;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=document.createElement("div"),i=document.body.style.overflow,document.body.appendChild(o),e.abrupt("return",new Promise(function(){var e=n(s.mark((function e(n,a){var u;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=new Y(t({},r,{isOpen:!0,onOpen:function(){Object.assign(document.body.style,{overflow:"hidden"}),Object.assign(o.style,{position:"fixed",overflow:"hidden",display:"block",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%",zIndex:99999})},onResult:function(e){n(e),Object.assign(document.body.style,{overflow:i}),document.body.removeChild(o)},onError:function(e){a(e),Object.assign(document.body.style,{overflow:i}),document.body.removeChild(o)}})),e.next=3,u.render(o);case 3:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}()));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),G=function(){var e=n(s.mark((function e(r,o,i){var a,u;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f(i,r.cspNonce,{namespace:"monei-paypal",cspNonce:r.cspNonce},!0);case 2:return o.__scriptId=e.sent.dataset.uidAuto,a={layout:"horizontal",tagline:!1},null==r.onLoad||r.onLoad(!0),e.next=8,window["monei-paypal"].Buttons({createOrder:function(){var e=n(s.mark((function e(){var n,t;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,O({paymentId:r.paymentId,accountId:r.accountId,sessionId:r.sessionId,amount:r.amount,currency:r.currency,paymentMethod:{paypal:{}}});case 3:return u=(t=e.sent).paymentToken,e.abrupt("return",null==(n=t.paypal)?void 0:n.orderId);case 8:return e.prev=8,e.t0=e.catch(0),null==r.onError||r.onError(e.t0),e.abrupt("return");case 12:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),onApprove:function(e){e.orderID?r.onSubmit({token:u}):null==r.onError||r.onError(e)},onClick:function(e,n){var t=!0;if(r.onBeforeOpen&&(t=r.onBeforeOpen()),!t)return n.reject()},style:t({},a,r.style)}).render(o.__container);case 8:case"end":return e.stop()}}),e)})));return function(n,t,r){return e.apply(this,arguments)}}(),V=A.create({tag:"monei-paypal",url:E.paypalUrl,dimensions:{width:"100%",height:"0"},autoResize:{width:!1,height:!1},prerenderTemplate:function(){},containerTemplate:function(e){if(console.log({params:e}),e.state.__container=e.container,!e.props.accountId&&!e.props.paymentId)throw new Error("You need to provide paymentId or accountId");var n=q(e);return e.event.on(A.EVENT.DESTROY,(function(){console.log("destroy"),window["monei-paypal"].Buttons.instances.forEach((function(e){e.close()}));var n=e.state.__scriptId;if(n){var t=document.querySelector('script[data-uid-auto="'+n+'"]');t&&t.remove()}})),n},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},transactionType:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},cspNonce:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__onLoadPayPal:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return G.bind(null,e.props,e.state)}}}});!function(e){e.BEFORE_CLOSE="BEFORE_CLOSE"}(F||(F={}));var J,$=A.create({tag:"monei-bizum",url:E.bizumUrl,dimensions:{width:"100%",height:"100%"},autoResize:{width:!1,height:!1},prerenderTemplate:function(){},containerTemplate:function(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,a=e.event,u=e.dimensions,s=u.width,d=u.height;if(t&&r){var f=o.createElement("div");if(i.isHidden)return f.setAttribute("id",n),f.style.display="none",f.appendChild(t),f.appendChild(r),f;var l=o.createElement("div");f.setAttribute("id",n),l.classList.add("backdrop"),f.appendChild(l);var p=o.createElement("style");return i.cspNonce&&p.setAttribute("nonce",i.cspNonce),p.appendChild(o.createTextNode("\n #"+n+" {\n position: fixed;\n overflow: hidden;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: "+s+";\n height: "+d+";\n z-index: 99999;\n }\n #"+n+" > .backdrop {\n position: fixed;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(40, 40, 40, 0.7);\n transition: opacity 0.35s ease-in-out;\n opacity: 0;\n will-change: opacity;\n }\n #"+n+" > .backdrop."+c.VISIBLE+" {\n opacity: 1;\n }\n #"+n+" > iframe {\n display: inline-block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: all .2s ease-in-out;\n }\n #"+n+" > iframe."+c.INVISIBLE+" {\n opacity: 0;\n }\n #"+n+" > iframe."+c.VISIBLE+" {\n opacity: 1;\n }\n ")),f.appendChild(t),f.appendChild(r),f.appendChild(p),r.classList.add(c.VISIBLE),t.classList.add(c.INVISIBLE),setTimeout((function(){l.classList.add(c.VISIBLE)}),1),a.on(A.EVENT.RENDERED,(function(){r.classList.remove(c.VISIBLE),r.classList.add(c.INVISIBLE),t.classList.remove(c.INVISIBLE),t.classList.add(c.VISIBLE),setTimeout((function(){M.destroyElement(r)}),1)})),a.on(F.BEFORE_CLOSE,(function(){l.classList.remove(c.VISIBLE)})),a.on(A.EVENT.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=M.toCSS(n)),"number"==typeof t&&(f.style.height=M.toCSS(t))})),f}},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},transactionType:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},phoneNumber:{type:A.PROP_TYPE.STRING,required:!1},isHidden:{type:A.PROP_TYPE.BOOLEAN,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeClose:{type:A.PROP_TYPE.FUNCTION,required:!1,default:function(e){var n=e.event;return function(){n.trigger(F.BEFORE_CLOSE)}}}},exports:{setPhoneNumber:{type:"function"},getPhoneNumber:{type:"function"}}}),Z=A.create({tag:"monei-bizum-button",url:E.bizumButtonUrl,dimensions:{width:"100%",height:"45px"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:q,prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},transactionType:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},phoneNumber:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){var n=e.props,r=e.state,o=document.createElement("div");return document.body.appendChild(o),function(e){var i=e.amount,a=e.currency;if(!r.isOpen){var u=!0;if(n.onBeforeOpen&&(u=n.onBeforeOpen()),u){r.isOpen=!0;var c=new $(t({amount:i,currency:a},n,{onClose:function(){r.isOpen=!1,window.onpopstate=null,document.body.style.overflow=""},isOpen:!0}));return window.history.pushState(null,"",window.location.href),window.onpopstate=function(){return c.updateProps({isOpen:!1})},Object.assign(document.body.style,{overflow:"hidden"}),c.render(o)}}}}}}});(J||(J={})).BEFORE_CLOSE="BEFORE_CLOSE";var X,K=A.create({tag:"monei-cofidis",url:E.cofidisUrl,dimensions:{width:"100%",height:"100%"},autoResize:{width:!1,height:!1},prerenderTemplate:function(){},containerTemplate:function(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,a=e.event,u=e.dimensions,s=u.width,d=u.height;if(t&&r){var f=o.createElement("div"),l=o.createElement("div");f.setAttribute("id",n),l.classList.add("backdrop"),f.appendChild(l);var p=o.createElement("style");return i.cspNonce&&p.setAttribute("nonce",i.cspNonce),p.appendChild(o.createTextNode("\n #"+n+" {\n position: fixed;\n overflow: hidden;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: "+s+";\n height: "+d+";\n z-index: 99999;\n }\n #"+n+" > .backdrop {\n position: fixed;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(40, 40, 40, 0.7);\n transition: opacity 0.35s ease-in-out;\n opacity: 0;\n will-change: opacity;\n }\n #"+n+" > .backdrop."+c.VISIBLE+" {\n opacity: 1;\n }\n #"+n+" > iframe {\n display: inline-block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: all .2s ease-in-out;\n }\n #"+n+" > iframe."+c.INVISIBLE+" {\n opacity: 0;\n }\n #"+n+" > iframe."+c.VISIBLE+" {\n opacity: 1;\n }\n ")),f.appendChild(t),f.appendChild(r),f.appendChild(p),r.classList.add(c.VISIBLE),t.classList.add(c.INVISIBLE),setTimeout((function(){l.classList.add(c.VISIBLE)}),1),a.on(A.EVENT.RENDERED,(function(){r.classList.remove(c.VISIBLE),r.classList.add(c.INVISIBLE),t.classList.remove(c.INVISIBLE),t.classList.add(c.VISIBLE),setTimeout((function(){M.destroyElement(r)}),1)})),a.on(J.BEFORE_CLOSE,(function(){l.classList.remove(c.VISIBLE)})),a.on(A.EVENT.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=M.toCSS(n)),"number"==typeof t&&(f.style.height=M.toCSS(t))})),f}},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeClose:{type:A.PROP_TYPE.FUNCTION,required:!1,default:function(e){var n=e.event;return function(){n.trigger(J.BEFORE_CLOSE)}}}}}),Q=A.create({tag:"monei-cofidis-widget",url:E.cofidisWidgetUrl,dimensions:{width:"100%",height:"46px"},autoResize:{width:!1,height:!0},prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!0},amount:{type:A.PROP_TYPE.NUMBER,required:!1},amountInt:{type:A.PROP_TYPE.NUMBER,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1,default:function(){return"es"}},showLogo:{type:A.PROP_TYPE.BOOLEAN,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(){return function(e){window.open(e,"_blank")}}}}}),ee=A.create({tag:"monei-cofidis-button",url:E.cofidisButtonUrl,dimensions:{width:"100%",height:"45px"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:q,prerenderTemplate:function(){},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},hint:{type:A.PROP_TYPE.BOOLEAN,default:function(){return!0},required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__onHintClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(){return function(e){window.open(e,"_blank")}}},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){var n=e.props,r=document.createElement("div");return document.body.appendChild(r),function(e){var o=e.amount,i=e.currency,a=e.accountId,u=!0;if(n.onBeforeOpen&&(u=n.onBeforeOpen()),u){var c=new K(t({},n,{amount:o,currency:i,accountId:a,onClose:function(){window.onpopstate=null,document.body.style.overflow=""},isOpen:!0}));return window.history.pushState(null,"",window.location.href),window.onpopstate=function(){return c.updateProps({isOpen:!1})},Object.assign(document.body.style,{overflow:"hidden"}),c.render(r)}}}}}});(X||(X={})).BEFORE_CLOSE="BEFORE_CLOSE";var ne,te,re,oe=A.create({tag:"monei-cofidis-loan",url:E.cofidisLoanUrl,dimensions:{width:"100%",height:"100%"},autoResize:{width:!1,height:!1},prerenderTemplate:function(){},containerTemplate:function(e){var n=e.uid,t=e.frame,r=e.prerenderFrame,o=e.doc,i=e.props,a=e.event,u=e.dimensions,s=u.width,d=u.height;if(t&&r){var f=o.createElement("div"),l=o.createElement("div");f.setAttribute("id",n),l.classList.add("backdrop"),f.appendChild(l);var p=o.createElement("style");return i.cspNonce&&p.setAttribute("nonce",i.cspNonce),p.appendChild(o.createTextNode("\n #"+n+" {\n position: fixed;\n overflow: hidden;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: "+s+";\n height: "+d+";\n z-index: 99999;\n }\n #"+n+" > .backdrop {\n position: fixed;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(40, 40, 40, 0.7);\n transition: opacity 0.35s ease-in-out;\n opacity: 0;\n will-change: opacity;\n }\n #"+n+" > .backdrop."+c.VISIBLE+" {\n opacity: 1;\n }\n #"+n+" > iframe {\n display: inline-block;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n transition: all .2s ease-in-out;\n }\n #"+n+" > iframe."+c.INVISIBLE+" {\n opacity: 0;\n }\n #"+n+" > iframe."+c.VISIBLE+" {\n opacity: 1;\n }\n ")),f.appendChild(t),f.appendChild(r),f.appendChild(p),r.classList.add(c.VISIBLE),t.classList.add(c.INVISIBLE),setTimeout((function(){l.classList.add(c.VISIBLE)}),1),a.on(A.EVENT.RENDERED,(function(){r.classList.remove(c.VISIBLE),r.classList.add(c.INVISIBLE),t.classList.remove(c.INVISIBLE),t.classList.add(c.VISIBLE),setTimeout((function(){M.destroyElement(r)}),1)})),a.on(X.BEFORE_CLOSE,(function(){l.classList.remove(c.VISIBLE)})),a.on(A.EVENT.RESIZE,(function(e){var n=e.width,t=e.height;"number"==typeof n&&(f.style.width=M.toCSS(n)),"number"==typeof t&&(f.style.height=M.toCSS(t))})),f}},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeClose:{type:A.PROP_TYPE.FUNCTION,required:!1,default:function(e){var n=e.event;return function(){n.trigger(X.BEFORE_CLOSE)}}}}}),ie=oe,ae=A.create({tag:"monei-cofidis-loan-widget",url:E.cofidisLoanWidgetUrl,dimensions:{width:"100%",height:"46px"},autoResize:{width:!1,height:!0},prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!0},amount:{type:A.PROP_TYPE.NUMBER,required:!1},amountInt:{type:A.PROP_TYPE.NUMBER,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1,default:function(){return"es"}},showLogo:{type:A.PROP_TYPE.BOOLEAN,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(){return function(e){window.open(e,"_blank")}}}}}),ue=ae,ce=A.create({tag:"monei-cofidis-loan-button",url:E.cofidisLoanButtonUrl,dimensions:{width:"100%",height:"45px"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:q,prerenderTemplate:function(){},props:{paymentId:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},hint:{type:A.PROP_TYPE.BOOLEAN,default:function(){return!0},required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__onHintClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(){return function(e){window.open(e,"_blank")}}},__onClick:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){var n=e.props,r=document.createElement("div");return document.body.appendChild(r),function(e){var o=e.amount,i=e.currency,a=e.accountId,u=!0;if(n.onBeforeOpen&&(u=n.onBeforeOpen()),u){var c=new oe(t({},n,{amount:o,currency:i,accountId:a,onClose:function(){window.onpopstate=null,document.body.style.overflow=""},isOpen:!0}));return window.history.pushState(null,"",window.location.href),window.onpopstate=function(){return c.updateProps({isOpen:!1})},Object.assign(document.body.style,{overflow:"hidden"}),c.render(r)}}}}}}),se=ce,de=A.create({tag:"monei-google-pay",url:E.googlePayUrl,dimensions:{width:"100%",height:"0"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:q,prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}}}}),fe=function(){var e=n(s.mark((function e(r,o,i){var a;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(a=new window.ApplePaySession(3,o)).onvalidatemerchant=function(){var e=n(s.mark((function e(n){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,N(t({},i,{validationUrl:n.validationURL}));case 3:a.completeMerchantValidation(e.sent),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),a.abort();case 10:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(n){return e.apply(this,arguments)}}(),a.onpaymentauthorized=function(){var e=n(s.mark((function e(n){var t,o,i;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=JSON.stringify(n.payment.token),o=window.btoa(t),e.prev=2,e.next=5,O({accountId:r.accountId,paymentId:r.paymentId,sessionId:r.sessionId,paymentMethod:{applePay:{token:o}}});case 5:r.onSubmit({token:(i=e.sent).paymentToken,error:i.error}),a.completePayment({status:window.ApplePaySession.STATUS_SUCCESS}),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(2),null==r.onError||r.onError(e.t0),a.completePayment({status:window.ApplePaySession.STATUS_FAILURE});case 14:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(n){return e.apply(this,arguments)}}(),a.begin();case 4:case"end":return e.stop()}}),e)})));return function(n,t,r){return e.apply(this,arguments)}}(),le=A.create({tag:"monei-payment-request",url:E.paymentRequestUrl,dimensions:{width:"100%",height:"0"},autoResize:{width:!1,height:!0},validate:m,containerTemplate:q,prerenderTemplate:function(){},props:{accountId:{type:A.PROP_TYPE.STRING,required:!1},sessionId:{type:A.PROP_TYPE.STRING,required:!1},paymentId:{type:A.PROP_TYPE.STRING,required:!1},amount:{type:A.PROP_TYPE.NUMBER,required:!1},currency:{type:A.PROP_TYPE.STRING,required:!1},language:{type:A.PROP_TYPE.STRING,required:!1},onError:{type:A.PROP_TYPE.FUNCTION,required:!1},onLoad:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeOpen:{type:A.PROP_TYPE.FUNCTION,required:!1},onSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},onBeforeSubmit:{type:A.PROP_TYPE.FUNCTION,required:!1},style:{type:A.PROP_TYPE.OBJECT,alias:"innerStyle",required:!1},__getConfig:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return _.bind(null,e.props)}},__isApplePaySupported:{type:A.PROP_TYPE.BOOLEAN,required:!1,value:function(){try{var e;return null==(e=window.ApplePaySession)?void 0:e.canMakePayments()}catch(e){return!1}}},__onApplePayButtonClicked:{type:A.PROP_TYPE.FUNCTION,required:!1,value:function(e){return fe.bind(null,e.props)}}}});(ne=exports.NextActionType||(exports.NextActionType={})).CONFIRM="CONFIRM",ne.FRICTIONLESS_CHALLENGE="FRICTIONLESS_CHALLENGE",ne.BIZUM_CHALLENGE="BIZUM_CHALLENGE",ne.CHALLENGE="CHALLENGE",ne.COMPLETE="COMPLETE",(te=exports.CardBrand||(exports.CardBrand={})).Visa="visa",te.Mastercard="mastercard",te.Amex="amex",te.Discover="discover",te.Diners="diners",te.JCB="jcb",te.Maestro="maestro",te.UnionPay="unionpay",te.Elo="elo",te.Hipercard="hipercard",(re=exports.TransactionType||(exports.TransactionType={})).AUTH="AUTH",re.SALE="SALE",re.PAYOUT="PAYOUT",re.VERIF="VERIF";var pe=R,he=y;exports.Bizum=Z,exports.BizumModal=$,exports.CardInput=U,exports.Cofidis=ee,exports.CofidisLoan=ce,exports.CofidisLoanModal=oe,exports.CofidisLoanWidget=ae,exports.CofidisModal=K,exports.CofidisPay=se,exports.CofidisPayModal=ie,exports.CofidisPayWidget=ue,exports.CofidisWidget=Q,exports.GooglePay=de,exports.PayPal=V,exports.PaymentModal=Y,exports.PaymentRequest=le,exports.api=pe,exports.config=E,exports.confirmPayment=H,exports.createToken=B,exports.utils=he;
|
|
2
2
|
//# sourceMappingURL=components.cjs.production.min.js.map
|