New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

post-robot

Package Overview
Dependencies
Maintainers
2
Versions
246
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

post-robot - npm Package Compare versions

Comparing version 8.0.15 to 8.0.16

2

dist/post-robot.ie.min.js

@@ -1,2 +0,2 @@

!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("postRobot",[],n):"object"==typeof exports?exports.postRobot=n():e.postRobot=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r={};return n.m=e,n.c=r,n.i=function(e){return e},n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=34)}([function(e,n,r){"use strict";var t=r(30);r.d(n,"a",function(){return t.a});var o=r(14);r.d(n,"b",function(){return o.a}),r.d(n,"c",function(){return o.b})},function(e,n,r){"use strict";function t(e){var n=e.location;if(!n)throw new Error("Can not read window location");var r=n.protocol;if(!r)throw new Error("Can not read window protocol");if(r===M.FILE_PROTOCOL)return M.FILE_PROTOCOL+"//";var t=n.host;if(!t)throw new Error("Can not read window host");return r+"//"+t}function o(e){e=e||window;var n=t(e);return n&&e.mockDomain&&0===e.mockDomain.indexOf(M.MOCK_PROTOCOL)?e.mockDomain:n}function i(e){try{if(!e.location.href)return!0;if("about:blank"===e.location.href)return!0}catch(e){}return!1}function a(e){try{var n=Object.getOwnPropertyDescriptor(e,"location");if(n&&!1===n.enumerable)return!1}catch(e){}try{if(i(e))return!0;if(t(e)===t(window))return!0}catch(e){}return!1}function u(e){if(!a(e))return!1;try{if(i(e))return!0;if(o(window)===o(e))return!0}catch(e){}return!1}function s(e){if(e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){return}}function c(e){if(e&&!s(e))try{return e.opener}catch(e){return}}function f(e){var n=[];try{for(;e.parent!==e;)n.push(e.parent),e=e.parent}catch(e){}return n}function d(e,n){if(!e||!n)return!1;var r=s(n);return r?r===e:-1!==f(n).indexOf(e)}function l(e){var n=[],r=void 0;try{r=e.frames}catch(n){r=e}var t=void 0;try{t=r.length}catch(e){}if(0===t)return n;if(t){for(var o=0;o<t;o++){var i=void 0;try{i=r[o]}catch(e){continue}n.push(i)}return n}for(var a=0;a<100;a++){var u=void 0;try{u=r[a]}catch(e){return n}if(!u)return n;n.push(u)}return n}function w(e){for(var n=[],r=l(e),t=Array.isArray(r),o=0,r=t?r:r[Symbol.iterator]();;){var i;if(t){if(o>=r.length)break;i=r[o++]}else{if(o=r.next(),o.done)break;i=o.value}var a=i;n.push(a);for(var u=w(a),s=Array.isArray(u),c=0,u=s?u:u[Symbol.iterator]();;){var f;if(s){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var d=f;n.push(d)}}return n}function h(e){if(e){try{if(e.top)return e.top}catch(e){}if(s(e)===e)return e;try{if(d(window,e)&&window.top)return window.top}catch(e){}try{if(d(e,window)&&window.top)return window.top}catch(e){}for(var n=w(e),r=Array.isArray(n),t=0,n=r?n:n[Symbol.iterator]();;){var o;if(r){if(t>=n.length)break;o=n[t++]}else{if(t=n.next(),t.done)break;o=t.value}var i=o;try{if(i.top)return i.top}catch(e){}if(s(i)===i)return i}}}function p(e){var n=h(e);return w(n).concat(n)}function m(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var n=e.ownerDocument;return!(!n||!n.body||n.body.contains(e))}function v(e,n){for(var r=0;r<e.length;r++)try{if(e[r]===n)return r}catch(e){}return-1}function y(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];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!==L}if(n&&u(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}try{r.i(I.a)(e===e)}catch(e){return!0}var t=v(j,e);if(-1!==t){var o=N[t];if(o&&m(o))return!0}return!1}function b(e){return e=e||window,e.navigator.mockUserAgent||e.navigator.userAgent}function g(e,n){for(var r=l(e),t=r,o=Array.isArray(t),i=0,t=o?t:t[Symbol.iterator]();;){var a;if(o){if(i>=t.length)break;a=t[i++]}else{if(i=t.next(),i.done)break;a=i.value}var s=a;try{if(u(s)&&s.name===n&&-1!==r.indexOf(s))return s}catch(e){}}try{if(-1!==r.indexOf(e.frames[n]))return e.frames[n]}catch(e){}try{if(-1!==r.indexOf(e[n]))return e[n]}catch(e){}}function E(e,n){return e===c(n)}function _(e){e=e||window;var n=c(e);if(n)return n;var r=s(e);return r||void 0}function O(e,n){var r=_(n);if(r)return r===e;if(n===e)return!1;if(h(n)===n)return!1;for(var t=l(e),o=Array.isArray(t),i=0,t=o?t:t[Symbol.iterator]();;){var a;if(o){if(i>=t.length)break;a=t[i++]}else{if(i=t.next(),i.done)break;a=i.value}if(a===n)return!0}return!1}function S(){return Boolean(c(window))}function A(){return Boolean(s(window))}function P(e,n){for(var r=e,t=Array.isArray(r),o=0,r=t?r:r[Symbol.iterator]();;){var i;if(t){if(o>=r.length)break;i=r[o++]}else{if(o=r.next(),o.done)break;i=o.value}for(var a=i,u=n,s=Array.isArray(u),c=0,u=s?u:u[Symbol.iterator]();;){var f;if(s){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}if(a===f)return!0}}return!1}function T(e,n){var r=h(e)||e,t=h(n)||n;try{if(r&&t)return r===t}catch(e){}var o=p(e),i=p(n);if(P(o,i))return!0;var a=c(r),u=c(t);return(!a||!P(p(a),i))&&(u&&P(p(u),o),!1)}function R(e,n){if("string"==typeof e){if("string"==typeof n)return e===M.WILDCARD||n===e;if(r.i(I.b)(n))return!1;if(Array.isArray(n))return!1}return r.i(I.b)(e)?r.i(I.b)(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.i(I.b)(n)&&e.some(function(e){return R(e,n)}))}function W(e){var n=void 0;return e.match(/^(https?|mock|file):\/\//)?(n=e,n=n.split("/").slice(0,3).join("/")):o()}function k(e){try{if(e===window)return!0}catch(e){if(e&&e.message===L)return!0}try{if("[object Window]"===Object.prototype.toString.call(e))return!0}catch(e){if(e&&e.message===L)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===L)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===L)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===L)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===L)return!0}try{r.i(I.a)(e===e)}catch(e){return!0}try{r.i(I.a)(e&&e.__cross_domain_utils_window_check__)}catch(e){return!0}return!1}n.i=t,n.g=o,n.h=a,n.j=u,n.s=s,n.r=c,n.q=l,n.f=y,n.o=b,n.n=g,n.p=E,n.a=_,n.l=O,n.c=S,n.d=A,n.k=T,n.b=R,n.m=W,n.e=k;var I=r(20),M={MOCK_PROTOCOL:"mock:",FILE_PROTOCOL:"file:",WILDCARD:"*"},L="Call was rejected by callee.\r\n",j=[],N=[]},function(e,n,r){"use strict";var t=r(22);r.d(n,"a",function(){return t.a})},function(e,n,r){"use strict";r.d(n,"a",function(){return o});var t=r(0),o=window[t.b.WINDOW_PROPS.POSTROBOT]=window[t.b.WINDOW_PROPS.POSTROBOT]||{};o.registerSelf=function(){}},function(e,n,r){"use strict";var t=r(8);r.d(n,"c",function(){return t.a}),r.d(n,"d",function(){return t.f}),r.d(n,"e",function(){return t.d}),r.d(n,"h",function(){return t.c}),r.d(n,"i",function(){return t.b}),r.d(n,"j",function(){return t.h}),r.d(n,"l",function(){return t.i}),r.d(n,"m",function(){return t.j}),r.d(n,"n",function(){return t.e}),r.d(n,"o",function(){return t.k}),r.d(n,"q",function(){return t.l});var o=r(11);r.d(n,"g",function(){return o.a});var i=r(36);r.d(n,"b",function(){return i.a}),r.d(n,"f",function(){return i.b}),r.d(n,"k",function(){return i.c});var a=r(35);r.d(n,"a",function(){return a.a}),r.d(n,"p",function(){return a.b})},function(e,n,r){"use strict";var t=r(31);r.d(n,"a",function(){return t.a}),r.d(n,"b",function(){return t.b}),r.d(n,"h",function(){return t.c});var o=r(16);r.d(n,"e",function(){return o.a});var i=r(15);r.d(n,"c",function(){return i.e}),r.d(n,"d",function(){return i.f}),r.d(n,"f",function(){return i.g}),r.d(n,"g",function(){return i.d})},function(e,n,r){"use strict";function t(){a.a.initialized||(r.i(i.a)(),r(10).openTunnelToOpener(),r.i(o.a)(),r.i(o.b)()),a.a.initialized=!0}Object.defineProperty(n,"__esModule",{value:!0}),n.init=t,r.d(n,"bridge",function(){return d});var o=r(4),i=r(5),a=r(3),u=r(28);r.d(n,"cleanUpWindow",function(){return u.a});var s=r(26),c=r(39);r.d(n,"parent",function(){return c.a}),r.d(n,"send",function(){return c.b}),r.d(n,"request",function(){return c.c}),r.d(n,"sendToParent",function(){return c.d}),r.d(n,"client",function(){return c.e}),r.d(n,"on",function(){return c.f}),r.d(n,"listen",function(){return c.g}),r.d(n,"once",function(){return c.h}),r.d(n,"listener",function(){return c.i}),r.d(n,"CONFIG",function(){return c.j}),r.d(n,"CONSTANTS",function(){return c.k}),r.d(n,"disable",function(){return c.l});var f=r(2);r.d(n,"Promise",function(){return f.a}),t();var d=s},function(e,n,r){"use strict";var t=r(12);r.d(n,"a",function(){return t.WeakMap})},function(e,n,r){"use strict";function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(n>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+Object.prototype.toString.call(e)+">";if("string"==typeof e)return e;if(e instanceof Error){var r=e&&e.stack,o=e&&e.message;if(r&&o)return-1!==r.indexOf(o)?r:o+"\n"+r;if(r)return r;if(o)return o}return"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}catch(e){return"Error while stringifying error: "+t(e,n+1)}}function o(){}function i(e,n,r){return e.addEventListener?e.addEventListener(n,r):e.attachEvent("on"+n,r),{cancel:function(){e.removeEventListener?e.removeEventListener(n,r):e.detachEvent("on"+n,r)}}}function a(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,function(){return e.charAt(Math.floor(Math.random()*e.length))})}function u(e,n){for(var r=0;r<e.length;r++)n(e[r],r)}function s(e,n){for(var r in e)e.hasOwnProperty(r)&&n(e[r],r)}function c(e,n){Array.isArray(e)?u(e,n):"object"===(void 0===e?"undefined":b(e))&&null!==e&&s(e,n)}function f(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(r>=100)throw new Error("Self-referential object passed, or object contained too many layers");var t=void 0;if("object"!==(void 0===e?"undefined":b(e))||null===e||Array.isArray(e)){if(!Array.isArray(e))throw new Error("Invalid type: "+(void 0===e?"undefined":b(e)));t=[]}else t={};return c(e,function(e,o){var i=n(e,o);void 0!==i?t[o]=i:"object"===(void 0===e?"undefined":b(e))&&null!==e?t[o]=f(e,n,r+1):t[o]=e}),t}function d(e,n){function r(){t=setTimeout(r,n),e.call()}var t=void 0;return t=setTimeout(r,n),{cancel:function(){clearTimeout(t)}}}function l(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function w(){return r.i(v.c)()?y.b.WINDOW_TYPES.POPUP:r.i(v.d)()?y.b.WINDOW_TYPES.IFRAME:y.b.WINDOW_TYPES.FULLPAGE}function h(e,n,r){var t=void 0,o=void 0;try{if("{}"!==JSON.stringify({})&&(t=Object.prototype.toJSON,delete Object.prototype.toJSON),"{}"!==JSON.stringify({}))throw new Error("Can not correctly serialize JSON objects");if("[]"!==JSON.stringify([])&&(o=Array.prototype.toJSON,delete Array.prototype.toJSON),"[]"!==JSON.stringify([]))throw new Error("Can not correctly serialize JSON objects")}catch(e){throw new Error("Can not repair JSON.stringify: "+e.message)}var i=JSON.stringify.call(this,e,n,r);try{t&&(Object.prototype.toJSON=t),o&&(Array.prototype.toJSON=o)}catch(e){throw new Error("Can not repair JSON.stringify: "+e.message)}return i}function p(e){return JSON.parse(e)}n.b=t,r.d(n,"e",function(){return g}),n.j=o,n.i=i,n.f=a,n.g=f,n.k=d,n.a=l,r.d(n,"l",function(){return E}),n.d=w,n.c=h,n.h=p;var m=r(7),v=r(1),y=r(0),b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g=function(e){if(!e)return e;var n=!1;return function(){if(!n)return n=!0,e.apply(this,arguments)}},E=function(e){var n=new m.a;return function(r){var t=n.get(r);return void 0!==t?t:(t=e.call(this,r),void 0!==t&&n.set(r,t),t)}}},function(e,n,r){"use strict";function t(){return!!r.i(m.o)(window).match(/MSIE|trident|edge\/12|edge\/13/i)||!v.a.ALLOW_POSTMESSAGE_POPUP}function o(e){return!r.i(m.k)(window,e)}function i(e,n){if(e){if(r.i(m.g)()!==r.i(m.m)(e))return!0}else if(n&&!r.i(m.j)(n))return!0;return!1}function a(e){var n=e.win,r=e.domain;return!!t()&&(!(r&&!i(r,n))&&!(n&&!o(n)))}function u(e){e=e||r.i(m.m)(e);var n=e.replace(/[^a-zA-Z0-9]+/g,"_");return v.b.BRIDGE_NAME_PREFIX+"_"+n}function s(){return Boolean(window.name&&window.name===u(r.i(m.g)()))}function c(e){arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.a.BRIDGE_TIMEOUT;y.a.remoteWindows.set(e,{sendMessagePromise:new p.a})}function f(e){return y.a.remoteWindows.get(e)}function d(e,n,t){var o=f(e);if(!o)throw new Error("Window not found to register sendMessage to");var i=function(o,i,a){if(o!==e)throw new Error("Remote window does not match window");if(!r.i(m.b)(a,n))throw new Error("Remote domain "+a+" does not match domain "+n);t(i)};o.sendMessagePromise.resolve(i),o.sendMessagePromise=p.a.resolve(i)}function l(e,n){var r=f(e);if(!r)throw new Error("Window not found on which to reject sendMessage");r.sendMessagePromise.asyncReject(n)}function w(e,n,t){var o=r.i(m.p)(window,e),i=r.i(m.p)(e,window);if(!o&&!i)throw new Error("Can only send messages to and from parent and popup windows");var a=f(e);if(!a)throw new Error("Window not found to send message to");return a.sendMessagePromise.then(function(r){return r(e,n,t)})}n.a=t,n.b=o,n.c=i,n.d=a,n.e=u,n.f=s,r.d(n,"g",function(){return g}),n.h=c,n.i=f,n.j=d,n.k=l,n.l=w;var h=r(7),p=r(2),m=r(1),v=r(0),y=r(3),b=r(5),g=new p.a(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)});y.a.remoteWindows=y.a.remoteWindows||new h.a,y.a.receiveMessage=function(e){r.i(b.h)(e)}},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(24);for(var o in t)"default"!==o&&function(e){r.d(n,e,function(){return t[e]})}(o);var i=r(25);r.d(n,"openTunnelToOpener",function(){return i.a});var a=r(9);r.d(n,"needsBridgeForBrowser",function(){return a.a}),r.d(n,"needsBridgeForWin",function(){return a.b}),r.d(n,"needsBridgeForDomain",function(){return a.c}),r.d(n,"needsBridge",function(){return a.d}),r.d(n,"getBridgeName",function(){return a.e}),r.d(n,"isBridge",function(){return a.f}),r.d(n,"documentBodyReady",function(){return a.g}),r.d(n,"registerRemoteWindow",function(){return a.h}),r.d(n,"findRemoteWindow",function(){return a.i}),r.d(n,"registerRemoteSendMessage",function(){return a.j}),r.d(n,"rejectRemoteSendMessage",function(){return a.k}),r.d(n,"sendBridgeMessage",function(){return a.l});var u=r(27);r.d(n,"hasBridge",function(){return u.a}),r.d(n,"openBridge",function(){return u.b}),r.d(n,"linkUrl",function(){return u.c}),r.d(n,"destroyBridges",function(){return u.d})},function(e,n,r){"use strict";r.d(n,"a",function(){return u});var t=r(8),o=r(0),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=["debug","info","warn","error"];Function.prototype.bind&&window.console&&"object"===i(console.log)&&["log","info","warn","error"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call);var u={clearLogs:function(){if(window.console&&window.console.clear&&window.console.clear(),o.a.LOG_TO_PAGE){var e=document.getElementById("postRobotLogs");e&&e.parentNode&&e.parentNode.removeChild(e)}},writeToPage:function(e,n){setTimeout(function(){var o=document.getElementById("postRobotLogs");o||(o=document.createElement("div"),o.id="postRobotLogs",o.style.cssText="width: 800px; font-family: monospace; white-space: pre-wrap;",document.body&&document.body.appendChild(o));var i=document.createElement("div"),a=(new Date).toString().split(" ")[4],u=Array.prototype.slice.call(n).map(function(e){if("string"==typeof e)return e;if(!e)return Object.prototype.toString.call(e);var n=void 0;try{n=r.i(t.c)(e,null,2)}catch(e){n="[object]"}return"\n\n"+n+"\n\n"}).join(" "),s=a+" "+e+" "+u;i.innerHTML=s;var c={log:"#ddd",warn:"orange",error:"red",info:"blue",debug:"#aaa"}[e];i.style.cssText="margin-top: 10px; color: "+c+";",o.childNodes.length?o.insertBefore(i,o.childNodes[0]):o.appendChild(i)})},logLevel:function(e,n){setTimeout(function(){try{var i=window.LOG_LEVEL||o.a.LOG_LEVEL;if(a.indexOf(e)<a.indexOf(i))return;if(n=Array.prototype.slice.call(n),n.unshift(""+window.location.host+window.location.pathname),n.unshift("::"),n.unshift(""+r.i(t.d)().toLowerCase()),n.unshift("[post-robot]"),o.a.LOG_TO_PAGE&&u.writeToPage(e,n),!window.console)return;if(window.console[e]||(e="log"),!window.console[e])return;window.console[e].apply(window.console,n)}catch(e){}},1)},debug:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];u.logLevel("debug",n)},info:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];u.logLevel("info",n)},warn:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];u.logLevel("warn",n)},error:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];u.logLevel("error",n)}}},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(19);r.d(n,"WeakMap",function(){return t.a})},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(29);r.d(n,"emulateIERestrictions",function(){return t.a})},function(e,n,r){"use strict";r.d(n,"a",function(){return t}),r.d(n,"b",function(){return o});var t={POST_MESSAGE_TYPE:{REQUEST:"postrobot_message_request",RESPONSE:"postrobot_message_response",ACK:"postrobot_message_ack"},POST_MESSAGE_ACK:{SUCCESS:"success",ERROR:"error"},POST_MESSAGE_NAMES:{METHOD:"postrobot_method",READY:"postrobot_ready",OPEN_TUNNEL:"postrobot_open_tunnel"},WINDOW_TYPES:{FULLPAGE:"fullpage",POPUP:"popup",IFRAME:"iframe"},WINDOW_PROPS:{POSTROBOT:"__postRobot__"},SERIALIZATION_TYPES:{METHOD:"postrobot_method",ERROR:"postrobot_error",PROMISE:"postrobot_promise",ZALGO_PROMISE:"postrobot_zalgo_promise",REGEX:"regex"},SEND_STRATEGIES:{POST_MESSAGE:"postrobot_post_message",BRIDGE:"postrobot_bridge",GLOBAL:"postrobot_global"},MOCK_PROTOCOL:"mock:",FILE_PROTOCOL:"file:",BRIDGE_NAME_PREFIX:"__postrobot_bridge__",POSTROBOT_PROXY:"__postrobot_proxy__",WILDCARD:"*"},o=Object.keys(t.POST_MESSAGE_NAMES).map(function(e){return t.POST_MESSAGE_NAMES[e]})},function(e,n,r){"use strict";function t(e,n){l.a.responseListeners[e]=n}function o(e){return l.a.responseListeners[e]}function i(e){delete l.a.responseListeners[e]}function a(e){l.a.erroredResponseListeners[e]=!0}function u(e){return Boolean(l.a.erroredResponseListeners[e])}function s(e){var n=e.name,t=e.win,o=e.domain;if(t===h.b.WILDCARD&&(t=null),o===h.b.WILDCARD&&(o=null),!n)throw new Error("Name required to get request listener");var i=l.a.requestListeners[n];if(i)for(var a=[t,l.a.WINDOW_WILDCARD],u=0;u<a.length;u++){var s=a[u],c=s&&i.get(s);if(c){if(o&&"string"==typeof o){if(c[o])return c[o];if(c[p])for(var f=c[p],w=Array.isArray(f),m=0,f=w?f:f[Symbol.iterator]();;){var v;if(w){if(m>=f.length)break;v=f[m++]}else{if(m=f.next(),m.done)break;v=m.value}var y=v,b=y.regex,g=y.listener;if(r.i(d.b)(b,o))return g}}if(c[h.b.WILDCARD])return c[h.b.WILDCARD]}}}function c(e,n){var t=e.name,o=e.win,i=e.domain;if(!t||"string"!=typeof t)throw new Error("Name required to add request listener");if(Array.isArray(o)){for(var a=[],u=o,d=Array.isArray(u),m=0,u=d?u:u[Symbol.iterator]();;){var v;if(d){if(m>=u.length)break;v=u[m++]}else{if(m=u.next(),m.done)break;v=m.value}var y=v;a.push(c({name:t,domain:i,win:y},n))}return{cancel:function(){for(var e=a,n=Array.isArray(e),r=0,e=n?e:e[Symbol.iterator]();;){var t;if(n){if(r>=e.length)break;t=e[r++]}else{if(r=e.next(),r.done)break;t=r.value}t.cancel()}}}}if(Array.isArray(i)){for(var b=[],g=i,E=Array.isArray(g),_=0,g=E?g:g[Symbol.iterator]();;){var O;if(E){if(_>=g.length)break;O=g[_++]}else{if(_=g.next(),_.done)break;O=_.value}var S=O;b.push(c({name:t,win:o,domain:S},n))}return{cancel:function(){for(var e=b,n=Array.isArray(e),r=0,e=n?e:e[Symbol.iterator]();;){var t;if(n){if(r>=e.length)break;t=e[r++]}else{if(r=e.next(),r.done)break;t=r.value}t.cancel()}}}}var A=s({name:t,win:o,domain:i});if(o&&o!==h.b.WILDCARD||(o=l.a.WINDOW_WILDCARD),i=i||h.b.WILDCARD,A)throw o&&i?new Error("Request listener already exists for "+t+" on domain "+i.toString()+" for "+(o===l.a.WINDOW_WILDCARD?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+t+" for "+(o===l.a.WINDOW_WILDCARD?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+t+" on domain "+i.toString()):new Error("Request listener already exists for "+t);var P=l.a.requestListeners,T=P[t];T||(T=new f.a,P[t]=T);var R=T.get(o);R||(R={},T.set(o,R));var W=i.toString(),k=R[p],I=void 0;return r.i(w.c)(i)?(k||(k=[],R[p]=k),I={regex:i,listener:n},k.push(I)):R[W]=n,{cancel:function(){R&&(delete R[W],o&&0===Object.keys(R).length&&T.delete(o),I&&k.splice(k.indexOf(I,1)))}}}n.f=t,n.b=o,n.d=i,n.g=a,n.a=u,n.c=s,n.e=c;var f=(r(2),r(7)),d=r(1),l=r(3),w=r(4),h=r(0);l.a.responseListeners=l.a.responseListeners||{},l.a.requestListeners=l.a.requestListeners||{},l.a.WINDOW_WILDCARD=l.a.WINDOW_WILDCARD||new function(){},l.a.erroredResponseListeners=l.a.erroredResponseListeners||{};var p="__domain_regex__"},function(e,n,r){"use strict";function t(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function o(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.i(c.d)(),i=r.i(c.e)(),u=r.i(a.g)(window);return d({},n,t,{sourceDomain:u,id:n.id||o,windowType:i})}function i(e,n,i){return u.a.try(function(){n=o(e,n,{data:r.i(c.f)(e,i,n.data),domain:i});var d=void 0;if(d=-1!==s.c.indexOf(n.name)||n.type===s.b.POST_MESSAGE_TYPE.ACK?"debug":"error"===n.ack?"error":"info",c.g.logLevel(d,["\n\n\t","#send",n.type.replace(/^postrobot_message_/,""),"::",n.name,"::",i||s.b.WILDCARD,"\n\n",n]),e===window&&!s.a.ALLOW_SAME_ORIGIN)throw new Error("Attemping to send message to self");if(r.i(a.f)(e))throw new Error("Window is closed");c.g.debug("Running send message strategies",n);var l=[],w=r.i(c.h)(t({},s.b.WINDOW_PROPS.POSTROBOT,n),null,2);return u.a.map(Object.keys(f.a),function(n){return u.a.try(function(){if(!s.a.ALLOWED_POST_MESSAGE_METHODS[n])throw new Error("Strategy disallowed: "+n);return f.a[n](e,w,i)}).then(function(){return l.push(n+": success"),!0},function(e){return l.push(n+": "+r.i(c.i)(e)+"\n"),!1})}).then(function(e){var r=e.some(Boolean),t=n.type+" "+n.name+" "+(r?"success":"error")+":\n - "+l.join("\n - ")+"\n";if(c.g.debug(t),!r)throw new Error(t)})})}n.a=i;var a=r(1),u=r(2),s=r(0),c=r(4),f=r(33),d=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}},function(e,n,r){"use strict";function t(){if(!window.WeakMap)return!1;if(!window.Object.freeze)return!1;try{var e=new window.WeakMap,n={};return window.Object.freeze(n),e.set(n,"__testvalue__"),"__testvalue__"===e.get(n)}catch(e){return!1}}n.a=t},function(e,n,r){"use strict";function t(e,n){for(var r=0;r<e.length;r++)try{if(e[r]===n)return r}catch(e){}return-1}function o(){}n.b=t,n.a=o},function(e,n,r){"use strict";function t(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}r.d(n,"a",function(){return f});var o=r(1),i=r(17),a=r(18),u=function(){function e(e,n){for(var r=0;r<n.length;r++){var t=n[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(n,r,t){return r&&e(n.prototype,r),t&&e(n,t),n}}(),s=Object.defineProperty,c=Date.now()%1e9,f=function(){function e(){if(t(this,e),c+=1,this.name="__weakmap_"+(1e9*Math.random()>>>0)+"__"+c,r.i(i.a)())try{this.weakmap=new window.WeakMap}catch(e){}this.keys=[],this.values=[]}return u(e,[{key:"_cleanupClosedWindows",value:function(){for(var e=this.weakmap,n=this.keys,t=0;t<n.length;t++){var i=n[t];if(r.i(o.e)(i)&&r.i(o.f)(i)){if(e)try{e.delete(i)}catch(e){}n.splice(t,1),this.values.splice(t,1),t-=1}}}},{key:"isSafeToReadWrite",value:function(e){if(r.i(o.e)(e))return!1;try{r.i(a.a)(e&&e.self),r.i(a.a)(e&&e[this.name])}catch(e){return!1}return!0}},{key:"set",value: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)){var o=this.name,i=e[o];i&&i[0]===e?i[1]=n:s(e,o,{value:[e,n],writable:!0})}else{this._cleanupClosedWindows();var u=this.keys,c=this.values,f=r.i(a.b)(u,e);-1===f?(u.push(e),c.push(n)):c[f]=n}}},{key:"get",value: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)){this._cleanupClosedWindows();var t=this.keys,o=r.i(a.b)(t,e);if(-1===o)return;return this.values[o]}var i=e[this.name];if(i&&i[0]===e)return i[1]}},{key:"delete",value: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)){var t=e[this.name];t&&t[0]===e&&(t[0]=t[1]=void 0)}else{this._cleanupClosedWindows();var o=this.keys,i=r.i(a.b)(o,e);-1!==i&&(o.splice(i,1),this.values.splice(i,1))}}},{key:"has",value:function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{return n.has(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e)){var t=e[this.name];return!(!t||t[0]!==e)}return this._cleanupClosedWindows(),-1!==r.i(a.b)(this.keys,e)}}]),e}()},function(e,n,r){"use strict";function t(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function o(){}n.b=t,n.a=o},function(e,n,r){"use strict";function t(e){if(-1===a.indexOf(e)){a.push(e),setTimeout(function(){throw e},1);for(var n=0;n<i.length;n++)i[n](e)}}function o(e){return i.push(e),{cancel:function(){i.splice(i.indexOf(e),1)}}}n.a=t,n.b=o;var i=[],a=[]},function(e,n,r){"use strict";function t(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}r.d(n,"a",function(){return s});var o=r(23),i=r(21),a=function(){function e(e,n){for(var r=0;r<n.length;r++){var t=n[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(n,r,t){return r&&e(n.prototype,r),t&&e(n,t),n}}(),u=window.__zalgopromise__=window.__zalgopromise__||{flushPromises:[],activeCount:0},s=function(){function e(n){var r=this;if(t(this,e),this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],n){var o=void 0,i=void 0,a=!1,u=!1,s=!1;try{n(function(e){s?r.resolve(e):(a=!0,o=e)},function(e){s?r.reject(e):(u=!0,i=e)})}catch(e){return void this.reject(e)}s=!0,a?this.resolve(o):u&&this.reject(i)}}return a(e,[{key:"resolve",value:function(e){if(this.resolved||this.rejected)return this;if(r.i(o.a)(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this}},{key:"reject",value:function(e){var n=this;if(this.resolved||this.rejected)return this;if(r.i(o.a)(e))throw new Error("Can not reject promise with another promise");if(!e){var t=e&&"function"==typeof e.toString?e.toString():Object.prototype.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||r.i(i.a)(e)},1),this.dispatch(),this}},{key:"asyncReject",value:function(e){this.errorHandled=!0,this.reject(e)}},{key:"dispatch",value:function(){var n=this,t=this.dispatching,i=this.resolved,a=this.rejected,s=this.handlers;if(!t&&(i||a)){this.dispatching=!0,u.activeCount+=1;for(var c=0;c<s.length;c++){(function(t){var u=s[t],c=u.onSuccess,f=u.onError,d=u.promise,l=void 0;if(i)try{l=c?c(n.value):n.value}catch(e){return d.reject(e),"continue"}else if(a){if(!f)return d.reject(n.error),"continue";try{l=f(n.error)}catch(e){return d.reject(e),"continue"}}l instanceof e&&(l.resolved||l.rejected)?(l.resolved?d.resolve(l.value):d.reject(l.error),l.errorHandled=!0):r.i(o.a)(l)?l instanceof e&&(l.resolved||l.rejected)?l.resolved?d.resolve(l.value):d.reject(l.error):l.then(function(e){d.resolve(e)},function(e){d.reject(e)}):d.resolve(l)})(c)}s.length=0,this.dispatching=!1,u.activeCount-=1,0===u.activeCount&&e.flushQueue()}}},{key:"then",value:function(n,r){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for success handler");if(r&&"function"!=typeof r&&!r.call)throw new Error("Promise.then expected a function for error handler");var t=new e;return this.handlers.push({promise:t,onSuccess:n,onError:r}),this.errorHandled=!0,this.dispatch(),t}},{key:"catch",value:function(e){return this.then(void 0,e)}},{key:"finally",value:function(n){return this.then(function(r){return e.try(n).then(function(){return r})},function(r){return e.try(n).then(function(){throw r})})}},{key:"timeout",value:function(e,n){var r=this;if(this.resolved||this.rejected)return this;var t=setTimeout(function(){r.resolved||r.rejected||r.reject(n||new Error("Promise timed out after "+e+"ms"))},e);return this.then(function(e){return clearTimeout(t),e})}},{key:"toPromise",value:function(){if(!window.Promise)throw new Error("Could not find window.Promise");return window.Promise.resolve(this)}}],[{key:"resolve",value:function(n){return n instanceof e?n:r.i(o.a)(n)?new e(function(e,r){return n.then(e,r)}):(new e).resolve(n)}},{key:"reject",value:function(n){return(new e).reject(n)}},{key:"all",value:function(n){var t=new e,i=n.length,a=[];if(!i)return t.resolve(a),t;for(var u=0;u<n.length;u++){(function(u){var s=n[u];if(s instanceof e){if(s.resolved)return a[u]=s.value,i-=1,"continue"}else if(!r.i(o.a)(s))return a[u]=s,i-=1,"continue";e.resolve(s).then(function(e){a[u]=e,0===(i-=1)&&t.resolve(a)},function(e){t.reject(e)})})(u)}return 0===i&&t.resolve(a),t}},{key:"hash",value:function(n){var r={};return e.all(Object.keys(n).map(function(t){return e.resolve(n[t]).then(function(e){r[t]=e})})).then(function(){return r})}},{key:"map",value:function(n,r){return e.all(n.map(r))}},{key:"onPossiblyUnhandledException",value:function(e){return r.i(i.b)(e)}},{key:"try",value:function(n,r,t){var o=void 0;try{o=n.apply(r,t||[])}catch(n){return e.reject(n)}return e.resolve(o)}},{key:"delay",value:function(n){return new e(function(e){setTimeout(e,n)})}},{key:"isPromise",value:function(n){return!!(n&&n instanceof e)||r.i(o.a)(n)}},{key:"flush",value:function(){var n=new e;return u.flushPromises.push(n),0===u.activeCount&&e.flushQueue(),n}},{key:"flushQueue",value:function(){var e=u.flushPromises;u.flushPromises=[];for(var n=e,r=Array.isArray(n),t=0,n=r?n:n[Symbol.iterator]();;){var o;if(r){if(t>=n.length)break;o=n[t++]}else{if(t=n.next(),t.done)break;o=t.value}o.resolve()}}}]),e}()},function(e,n,r){"use strict";function t(e){try{if(!e)return!1;if(window.Promise&&e instanceof window.Promise)return!0;if(window.Window&&e instanceof window.Window)return!1;if(window.constructor&&e instanceof window.constructor)return!1;if(o){var n=o.call(e);if("[object Window]"===n||"[object global]"===n||"[object DOMWindow]"===n)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}n.a=t;var o={}.toString},function(e,n,r){"use strict";function t(e){try{f.a.tunnelWindows[e]&&delete f.a.tunnelWindows[e].source}catch(e){}delete f.a.tunnelWindows[e]}function o(){for(var e=f.a.tunnelWindows,n=Object.keys(e),o=Array.isArray(n),i=0,n=o?n:n[Symbol.iterator]();;){var a;if(o){if(i>=n.length)break;a=n[i++]}else{if(i=n.next(),i.done)break;a=i.value}var u=a,d=e[u];try{r.i(c.m)(d.source)}catch(e){t(u);continue}r.i(s.f)(d.source)&&t(u)}}function i(e){var n=e.name,r=e.source,t=e.canary,i=e.sendMessage;return o(),f.a.tunnelWindowId+=1,f.a.tunnelWindows[f.a.tunnelWindowId]={name:n,source:r,canary:t,sendMessage:i},f.a.tunnelWindowId}function a(e){return f.a.tunnelWindows[e]}Object.defineProperty(n,"__esModule",{value:!0});var u=(r(2),r(0)),s=r(1),c=r(4),f=r(3),d=r(6);f.a.tunnelWindows=f.a.tunnelWindows||{},f.a.tunnelWindowId=0,f.a.openTunnelToParent=function(e){var n=e.name,o=e.source,f=e.canary,l=e.sendMessage,w=r.i(s.s)(window);if(!w)throw new Error("No parent window found to open tunnel to");var h=i({name:n,source:o,canary:f,sendMessage:l});return r.i(d.send)(w,u.b.POST_MESSAGE_NAMES.OPEN_TUNNEL,{name:n,sendMessage:function(){var e=a(h);try{r.i(c.m)(e&&e.source)}catch(e){return void t(h)}if(e&&e.source&&!r.i(s.f)(e.source)){try{e.canary()}catch(e){return}e.sendMessage.apply(this,arguments)}}},{domain:u.b.WILDCARD})}},function(e,n,r){"use strict";function t(){return o.a.try(function(){var e=r.i(i.r)(window);if(e&&r.i(c.d)({win:e}))return r.i(c.h)(e),f(e).then(function(n){return n?window.name?n[a.b.WINDOW_PROPS.POSTROBOT].openTunnelToParent({name:window.name,source:window,canary:function(){},sendMessage:function(e){try{r.i(u.m)(window)}catch(e){return}if(window&&!window.closed)try{r.i(s.h)({data:e,origin:this.origin,source:this.source})}catch(e){o.a.reject(e)}}}).then(function(n){var t=n.source,o=n.origin,i=n.data;if(t!==e)throw new Error("Source does not match opener");r.i(c.j)(t,o,i.sendMessage)}).catch(function(n){throw r.i(c.k)(e,n),n}):r.i(c.k)(e,new Error("Can not register with opener: window does not have a name")):r.i(c.k)(e,new Error("Can not register with opener: no bridge found in opener"))})})}n.a=t;var o=r(2),i=r(1),a=r(0),u=r(4),s=r(5),c=r(9),f=r.i(u.q)(function(e){return o.a.try(function(){for(var n=r.i(i.q)(e),t=Array.isArray(n),u=0,n=t?n:n[Symbol.iterator]();;){var s;if(t){if(u>=n.length)break;s=n[u++]}else{if(u=n.next(),u.done)break;s=u.value}var f=s;try{if(f&&f!==window&&r.i(i.j)(f)&&f[a.b.WINDOW_PROPS.POSTROBOT])return f}catch(e){continue}}try{var d=r.i(i.n)(e,r.i(c.e)(r.i(i.g)()));if(!d)return;return r.i(i.j)(d)&&d[a.b.WINDOW_PROPS.POSTROBOT]?d:new o.a(function(e){var n=void 0,t=void 0;n=setInterval(function(){if(d&&r.i(i.j)(d)&&d[a.b.WINDOW_PROPS.POSTROBOT])return clearInterval(n),clearTimeout(t),e(d)},100),t=setTimeout(function(){return clearInterval(n),e()},2e3)})}catch(e){return}})})},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(10);r.o(t,"openBridge")&&r.d(n,"openBridge",function(){return t.openBridge}),r.o(t,"linkUrl")&&r.d(n,"linkUrl",function(){return t.linkUrl}),r.o(t,"isBridge")&&r.d(n,"isBridge",function(){return t.isBridge}),r.o(t,"needsBridge")&&r.d(n,"needsBridge",function(){return t.needsBridge}),r.o(t,"needsBridgeForBrowser")&&r.d(n,"needsBridgeForBrowser",function(){return t.needsBridgeForBrowser}),r.o(t,"hasBridge")&&r.d(n,"hasBridge",function(){return t.hasBridge}),r.o(t,"needsBridgeForWin")&&r.d(n,"needsBridgeForWin",function(){return t.needsBridgeForWin}),r.o(t,"needsBridgeForDomain")&&r.d(n,"needsBridgeForDomain",function(){return t.needsBridgeForDomain}),r.o(t,"openTunnelToOpener")&&r.d(n,"openTunnelToOpener",function(){return t.openTunnelToOpener}),r.o(t,"destroyBridges")&&r.d(n,"destroyBridges",function(){return t.destroyBridges})},function(e,n,r){"use strict";function t(e,n){r.i(p.on)(l.b.POST_MESSAGE_NAMES.OPEN_TUNNEL,{window:e,domain:n},function(e){var t=e.origin,o=e.data;if(t!==n)throw new Error("Domain "+n+" does not match origin "+t);if(!o.name)throw new Error("Register window expected to be passed window name");if(!o.sendMessage)throw new Error("Register window expected to be passed sendMessage method");if(!h.a.popupWindowsByName[o.name])throw new Error("Window with name "+o.name+" does not exist, or was not opened by this window");if(!h.a.popupWindowsByName[o.name].domain)throw new Error("We do not have a registered domain for window "+o.name);if(h.a.popupWindowsByName[o.name].domain!==t)throw new Error("Message origin "+t+" does not matched registered window origin "+h.a.popupWindowsByName[o.name].domain);return r.i(v.j)(h.a.popupWindowsByName[o.name].win,n,o.sendMessage),{sendMessage:function(e){if(window&&!window.closed){var n=h.a.popupWindowsByName[o.name];if(n)try{r.i(m.h)({data:e,origin:n.domain,source:n.win})}catch(e){f.a.reject(e)}}}}})}function o(e,n){w.g.debug("Opening bridge:",e,n);var r=document.createElement("iframe");return r.setAttribute("name",e),r.setAttribute("id",e),r.setAttribute("style","display: none; margin: 0; padding: 0; border: 0px none; overflow: hidden;"),r.setAttribute("frameborder","0"),r.setAttribute("border","0"),r.setAttribute("scrolling","no"),r.setAttribute("allowTransparency","true"),r.setAttribute("tabindex","-1"),r.setAttribute("hidden","true"),r.setAttribute("title",""),r.setAttribute("role","presentation"),r.src=n,r}function i(e,n){return n=n||r.i(d.m)(e),Boolean(h.a.bridges[n])}function a(e,n){return n=n||r.i(d.m)(e),h.a.bridges[n]?h.a.bridges[n]:(h.a.bridges[n]=f.a.try(function(){if(r.i(d.g)()===n)throw new Error("Can not open bridge on the same domain as current domain: "+n);var i=r.i(v.e)(n);if(r.i(d.n)(window,i))throw new Error("Frame with name "+i+" already exists on page");var a=o(i,e);return h.a.bridgeFrames[n]=a,v.g.then(function(o){o.appendChild(a);var i=a.contentWindow;return t(i,n),new f.a(function(e,n){a.onload=e,a.onerror=n}).then(function(){return r.i(w.p)(i,l.a.BRIDGE_TIMEOUT,"Bridge "+e)}).then(function(){return i})})}),h.a.bridges[n])}function u(e,n){var t=h.a.popupWindowsByWin.get(e);t&&(t.domain=r.i(d.m)(n),r.i(v.h)(e))}function s(){for(var e=Object.keys(h.a.bridgeFrames),n=Array.isArray(e),r=0,e=n?e:e[Symbol.iterator]();;){var t;if(n){if(r>=e.length)break;t=e[r++]}else{if(r=e.next(),r.done)break;t=r.value}var o=t,i=h.a.bridgeFrames[o];i.parentNode&&i.parentNode.removeChild(i)}h.a.bridgeFrames={},h.a.bridges={}}n.a=i,n.b=a,n.c=u,n.d=s;var c=r(7),f=r(2),d=r(1),l=r(0),w=r(4),h=r(3),p=r(6),m=r(5),v=r(9),y=function(){function e(e,n){var r=[],t=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(t=(a=u.next()).done)&&(r.push(a.value),!n||r.length!==n);t=!0);}catch(e){o=!0,i=e}finally{try{!t&&u.return&&u.return()}finally{if(o)throw i}}return r}return function(n,r){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return e(n,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();h.a.bridges=h.a.bridges||{},h.a.bridgeFrames=h.a.bridgeFrames||{},h.a.popupWindowsByWin=h.a.popupWindowsByWin||new c.a,h.a.popupWindowsByName=h.a.popupWindowsByName||{};var b=window.open;window.open=function(e,n,t,o){var i=e;if(e&&0===e.indexOf(l.b.MOCK_PROTOCOL)){var a=e.split("|"),u=y(a,2);i=u[0],e=u[1]}i&&(i=r.i(d.m)(i));var s=b.call(this,e,n,t,o);if(!s)return s;e&&r.i(v.h)(s);for(var c=Object.keys(h.a.popupWindowsByName),f=Array.isArray(c),w=0,c=f?c:c[Symbol.iterator]();;){var p;if(f){if(w>=c.length)break;p=c[w++]}else{if(w=c.next(),w.done)break;p=w.value}var m=p;r.i(d.f)(h.a.popupWindowsByName[m].win)&&delete h.a.popupWindowsByName[m]}if(n&&s){var g=h.a.popupWindowsByWin.get(s)||h.a.popupWindowsByName[n]||{};g.name=g.name||n,g.win=g.win||s,g.domain=g.domain||i,h.a.popupWindowsByWin.set(s,g),h.a.popupWindowsByName[n]=g}return s}},function(e,n,r){"use strict";function t(e){var n=o.a.requestPromises.get(e);if(n)for(var r=n,t=Array.isArray(r),i=0,r=t?r:r[Symbol.iterator]();;){var a;if(t){if(i>=r.length)break;a=r[i++]}else{if(i=r.next(),i.done)break;a=i.value}var u=a;u.reject(new Error("No response from window - cleaned up"))}o.a.popupWindowsByWin&&o.a.popupWindowsByWin.delete(e),o.a.remoteWindows&&o.a.remoteWindows.delete(e),o.a.requestPromises.delete(e),o.a.methods.delete(e),o.a.readyPromises.delete(e)}n.a=t;var o=r(3)},function(e,n,r){"use strict";function t(e,n){if(!i.a.ALLOW_POSTMESSAGE_POPUP&&!1===r.i(o.k)(e,n))throw new Error("Can not send and receive post messages between two different windows (disabled to emulate IE)")}n.a=t;var o=r(1),i=r(0)},function(e,n,r){"use strict";function t(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}r.d(n,"a",function(){return a});var o,i=r(14),a={ALLOW_POSTMESSAGE_POPUP:!("__ALLOW_POSTMESSAGE_POPUP__"in window)||window.__ALLOW_POSTMESSAGE_POPUP__,LOG_LEVEL:"info",BRIDGE_TIMEOUT:5e3,ACK_TIMEOUT:-1!==window.navigator.userAgent.match(/MSIE/i)?2e3:1e3,RES_TIMEOUT:1/0,LOG_TO_PAGE:!1,ALLOWED_POST_MESSAGE_METHODS:(o={},t(o,i.a.SEND_STRATEGIES.POST_MESSAGE,!0),t(o,i.a.SEND_STRATEGIES.BRIDGE,!0),t(o,i.a.SEND_STRATEGIES.GLOBAL,!0),o),ALLOW_SAME_ORIGIN:!1};0===window.location.href.indexOf(i.a.FILE_PROTOCOL)&&(a.ALLOW_POSTMESSAGE_POPUP=!0)},function(e,n,r){"use strict";function t(e){var n=void 0;try{n=r.i(c.j)(e)}catch(e){return}if(n&&"object"===(void 0===n?"undefined":l(n))&&null!==n&&(n=n[s.b.WINDOW_PROPS.POSTROBOT])&&"object"===(void 0===n?"undefined":l(n))&&null!==n&&n.type&&"string"==typeof n.type&&d.a[n.type])return n}function o(e){if(!window||window.closed)throw new Error("Message recieved in closed window");try{if(!e.source)return}catch(e){return}var n=e.source,o=e.origin,i=e.data,a=t(i);if(a){if(!a.sourceDomain||"string"!=typeof a.sourceDomain)throw new Error("Expected message to have sourceDomain");if(0!==a.sourceDomain.indexOf(s.b.MOCK_PROTOCOL)&&0!==a.sourceDomain.indexOf(s.b.FILE_PROTOCOL)||(o=a.sourceDomain),-1===f.a.receivedMessages.indexOf(a.id)){f.a.receivedMessages.push(a.id);var l=void 0;if(l=-1!==s.c.indexOf(a.name)||a.type===s.b.POST_MESSAGE_TYPE.ACK?"debug":"error"===a.ack?"error":"info",c.g.logLevel(l,["\n\n\t","#receive",a.type.replace(/^postrobot_message_/,""),"::",a.name,"::",o,"\n\n",a]),r.i(u.f)(n))return void c.g.debug("Source window is closed - can not send "+a.type+" "+a.name);a.data&&(a.data=r.i(c.k)(n,o,a.data)),d.a[a.type](n,o,a)}}}function i(e){try{e.source}catch(e){return}var n={source:e.source||e.sourceElement,origin:e.origin||e.originalEvent&&e.originalEvent.origin,data:e.data};try{r(13).emulateIERestrictions(n.source,window)}catch(e){return}o(n)}function a(){r.i(c.l)(window,"message",i)}n.c=o,n.b=i,n.a=a;var u=r(1),s=r(0),c=r(4),f=r(3),d=r(32),l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};f.a.receivedMessages=f.a.receivedMessages||[]},function(e,n,r){"use strict";function t(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}r.d(n,"a",function(){return l});var o,i=r(2),a=r(1),u=r(0),s=r(4),c=r(16),f=r(15),d=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},l=(o={},t(o,u.b.POST_MESSAGE_TYPE.ACK,function(e,n,t){if(!r.i(f.a)(t.hash)){var o=r.i(f.b)(t.hash);if(!o)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);if(!r.i(a.b)(o.domain,n))throw new Error("Ack origin "+n+" does not match domain "+o.domain.toString());o.ack=!0}}),t(o,u.b.POST_MESSAGE_TYPE.REQUEST,function(e,n,t){function o(o){return t.fireAndForget||r.i(a.f)(e)?i.a.resolve():r.i(c.a)(e,d({target:t.originalSource,hash:t.hash,name:t.name},o),n)}var l=r.i(f.c)({name:t.name,win:e,domain:n});return i.a.all([o({type:u.b.POST_MESSAGE_TYPE.ACK}),i.a.try(function(){if(!l)throw new Error("No handler found for post message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!r.i(a.b)(l.domain,n))throw new Error("Request origin "+n+" does not match domain "+l.domain.toString());var o=t.data;return l.handler({source:e,origin:n,data:o})}).then(function(e){return o({type:u.b.POST_MESSAGE_TYPE.RESPONSE,ack:u.b.POST_MESSAGE_ACK.SUCCESS,data:e})},function(e){var n=r.i(s.i)(e).replace(/^Error: /,"");return o({type:u.b.POST_MESSAGE_TYPE.RESPONSE,ack:u.b.POST_MESSAGE_ACK.ERROR,error:n})})]).then(s.m).catch(function(e){if(l&&l.handleError)return l.handleError(e);s.g.error(r.i(s.i)(e))})}),t(o,u.b.POST_MESSAGE_TYPE.RESPONSE,function(e,n,t){if(!r.i(f.a)(t.hash)){var o=r.i(f.b)(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(!r.i(a.b)(o.domain,n))throw new Error("Response origin "+n+" does not match domain "+o.domain);if(r.i(f.d)(t.hash),t.ack===u.b.POST_MESSAGE_ACK.ERROR)return o.respond(new Error(t.error),null);if(t.ack===u.b.POST_MESSAGE_ACK.SUCCESS){var i=t.data||t.response;return o.respond(null,{source:e,origin:n,data:i})}}}),o)},function(e,n,r){"use strict";r.d(n,"a",function(){return i});var t=r(1),o=r(0),i={};i[o.b.SEND_STRATEGIES.POST_MESSAGE]=function(e,n,i){try{r(13).emulateIERestrictions(window,e)}catch(e){return}var a=void 0;a=Array.isArray(i)?i:i?[i]:[o.b.WILDCARD],a=a.map(function(n){if(0===n.indexOf(o.b.MOCK_PROTOCOL)){if(window.location.protocol===o.b.FILE_PROTOCOL)return o.b.WILDCARD;if(!r.i(t.h)(e))throw new Error("Attempting to send messsage to mock domain "+n+", but window is actually cross-domain");return r.i(t.i)(e)}return 0===n.indexOf(o.b.FILE_PROTOCOL)?o.b.WILDCARD:n}),a.forEach(function(r){return e.postMessage(n,r)})};var a=r(10),u=a.sendBridgeMessage,s=a.needsBridgeForBrowser,c=a.isBridge;i[o.b.SEND_STRATEGIES.BRIDGE]=function(e,n,o){if(s()||c()){if(r.i(t.j)(e))throw new Error("Post message through bridge disabled between same domain windows");if(!1!==r.i(t.k)(window,e))throw new Error("Can only use bridge to communicate between two different windows, not between frames");return u(e,n,o)}},i[o.b.SEND_STRATEGIES.GLOBAL]=function(e,n,i){if(s()){if(!r.i(t.j)(e))throw new Error("Post message through global disabled between different domain windows");if(!1!==r.i(t.k)(window,e))throw new Error("Can only use global to communicate between two different windows, not between frames");var a=e[o.b.WINDOW_PROPS.POSTROBOT];if(!a)throw new Error("Can not find postRobot global on foreign window");return a.receiveMessage({source:window,origin:r.i(t.g)(),data:n})}}},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(6);r.d(n,"cleanUpWindow",function(){return t.cleanUpWindow}),r.d(n,"init",function(){return t.init}),r.d(n,"bridge",function(){return t.bridge}),r.d(n,"Promise",function(){return t.Promise}),r.d(n,"parent",function(){return t.parent}),r.d(n,"send",function(){return t.send}),r.d(n,"request",function(){return t.request}),r.d(n,"sendToParent",function(){return t.sendToParent}),r.d(n,"client",function(){return t.client}),r.d(n,"on",function(){return t.on}),r.d(n,"listen",function(){return t.listen}),r.d(n,"once",function(){return t.once}),r.d(n,"listener",function(){return t.listener}),r.d(n,"CONFIG",function(){return t.CONFIG}),r.d(n,"CONSTANTS",function(){return t.CONSTANTS}),r.d(n,"disable",function(){return t.disable}),n.default=t},function(e,n,r){"use strict";function t(){r.i(c.on)(s.b.POST_MESSAGE_NAMES.READY,{domain:s.b.WILDCARD},function(e){var n=e.source,r=d.a.readyPromises.get(n);r?r.resolve(e):(r=(new u.a).resolve(e),d.a.readyPromises.set(n,r))});var e=r.i(a.a)();e&&r.i(c.send)(e,s.b.POST_MESSAGE_NAMES.READY,{},{domain:s.b.WILDCARD,timeout:1/0}).catch(function(e){f.a.debug(r.i(l.b)(e))})}function o(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Window",t=d.a.readyPromises.get(e);return t||(t=new u.a,d.a.readyPromises.set(e,t),setTimeout(function(){return t.reject(new Error(r+" did not load after "+n+"ms"))},n),t)}n.a=t,n.b=o;var i=r(7),a=r(1),u=r(2),s=r(0),c=r(6),f=r(11),d=r(3),l=r(8);d.a.readyPromises=d.a.readyPromises||new i.a},function(e,n,r){"use strict";function t(e,n){return"object"===(void 0===e?"undefined":S(e))&&null!==e&&e.__type__===n}function o(e,n,t,o){var i=r.i(g.f)(),a=O.a.methods.get(e);return a||(a={},O.a.methods.set(e,a)),a[i]={domain:n,method:t},{__type__:b.b.SERIALIZATION_TYPES.METHOD,__id__:i,__name__:o}}function i(e){return{__type__:b.b.SERIALIZATION_TYPES.ERROR,__message__:r.i(g.b)(e)}}function a(e,n,r,t){return{__type__:b.b.SERIALIZATION_TYPES.PROMISE,__then__:o(e,n,function(e,n){return r.then(e,n)},t+".then")}}function u(e,n,r,t){return{__type__:b.b.SERIALIZATION_TYPES.ZALGO_PROMISE,__then__:o(e,n,function(e,n){return r.then(e,n)},t+".then")}}function s(e){return{__type__:b.b.SERIALIZATION_TYPES.REGEX,__source__:e.source}}function c(e,n,t){return r.i(g.g)({obj:t},function(t,c){return"function"==typeof t?o(e,n,t,c.toString()):t instanceof Error?i(t):window.Promise&&t instanceof window.Promise?a(e,n,t,c.toString()):y.a.isPromise(t)?u(e,n,t,c.toString()):r.i(g.a)(t)?s(t):void 0}).obj}function f(e,n,t){function o(){var o=Array.prototype.slice.call(arguments);return _.a.debug("Call foreign method",t.__name__,o),r.i(E.send)(e,b.b.POST_MESSAGE_NAMES.METHOD,{id:t.__id__,name:t.__name__,args:o},{domain:n,timeout:1/0}).then(function(e){var n=e.data;return _.a.debug("Got foreign method result",t.__name__,n.result),n.result},function(e){throw _.a.debug("Got foreign method error",r.i(g.b)(e)),e})}return o.__name__=t.__name__,o.__xdomain__=!0,o.source=e,o.origin=n,o}function d(e,n,r){return new Error(r.__message__)}function l(e,n,r){return new y.a(function(t,o){return f(e,n,r.__then__)(t,o)})}function w(e,n,r){return window.Promise?new window.Promise(function(t,o){return f(e,n,r.__then__)(t,o)}):l(e,n,r)}function h(e,n,r){return new RegExp(r.__source__)}function p(e,n,o){return r.i(g.g)({obj:o},function(r,o){if("object"===(void 0===r?"undefined":S(r))&&null!==r)return t(r,b.b.SERIALIZATION_TYPES.METHOD)?f(e,n,r):t(r,b.b.SERIALIZATION_TYPES.ERROR)?d(e,n,r):t(r,b.b.SERIALIZATION_TYPES.PROMISE)?w(e,n,r):t(r,b.b.SERIALIZATION_TYPES.ZALGO_PROMISE)?l(e,n,r):t(r,b.b.SERIALIZATION_TYPES.REGEX)?h(e,n,r):void 0}).obj}r.d(n,"a",function(){return A}),n.b=c,n.c=p;var m=r(7),v=r(1),y=r(2),b=r(0),g=r(8),E=r(6),_=r(11),O=r(3),S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};O.a.methods=O.a.methods||new m.a;var A=r.i(g.e)(function(){r.i(E.on)(b.b.POST_MESSAGE_NAMES.METHOD,{origin:b.b.WILDCARD},function(e){var n=e.source,t=e.origin,o=e.data,i=O.a.methods.get(n);if(!i)throw new Error("Could not find any methods this window has privileges to call");var a=i[o.id];if(!a)throw new Error("Could not find method with id: "+o.id);if(!r.i(v.b)(a.domain,t))throw new Error("Method domain "+a.domain+" does not match origin "+t);return _.a.debug("Call local method",o.name,o.args),y.a.try(function(){return a.method.apply({source:n,origin:t,data:o},o.args)}).then(function(e){return{result:e,id:o.id,name:o.name}})})})},function(e,n,r){"use strict";function t(e){return s.a.try(function(){if(!e.name)throw new Error("Expected options.name");var n=e.name,t=void 0,o=void 0;if("string"==typeof e.window){var i=document.getElementById(e.window);if(!i)throw new Error("Expected options.window "+Object.prototype.toString.call(e.window)+" to be a valid element id");if("iframe"!==i.tagName.toLowerCase())throw new Error("Expected options.window "+Object.prototype.toString.call(e.window)+" to be an iframe");if(!i.contentWindow)throw new Error("Iframe must have contentWindow. Make sure it has a src attribute and is in the DOM.");t=i.contentWindow}else if(e.window instanceof HTMLIFrameElement){if("iframe"!==e.window.tagName.toLowerCase())throw new Error("Expected options.window "+Object.prototype.toString.call(e.window)+" to be an iframe");if(e.window&&!e.window.contentWindow)throw new Error("Iframe must have contentWindow. Make sure it has a src attribute and is in the DOM.");e.window&&e.window.contentWindow&&(t=e.window.contentWindow)}else t=e.window;if(!t)throw new Error("Expected options.window to be a window object, iframe, or iframe element id.");var a=t;o=e.domain||f.b.WILDCARD;var u=e.name+"_"+r.i(l.d)();if(r.i(c.f)(a))throw new Error("Target window is closed");var h=!1,p=w.a.requestPromises.get(a);p||(p=[],w.a.requestPromises.set(a,p));var m=s.a.try(function(){if(r.i(c.l)(window,a))return s.a.resolve(r.i(l.p)(a))}).then(function(){return new s.a(function(t,i){var s=void 0;if(e.fireAndForget||(s={name:n,window:a,domain:o,respond:function(e,n){e||(h=!0,p.splice(p.indexOf(m,1))),e?i(e):t(n)}},r.i(d.d)(u,s)),r.i(d.e)(a,{type:f.b.POST_MESSAGE_TYPE.REQUEST,hash:u,name:n,data:e.data,fireAndForget:e.fireAndForget},o).catch(i),e.fireAndForget)return t();var l=f.a.ACK_TIMEOUT,w=e.timeout||f.a.RES_TIMEOUT,v=100,y=function t(){if(!h){if(r.i(c.f)(a))return i(s.ack?new Error("Window closed for "+n+" before response"):new Error("Window closed for "+n+" before ack"));l-=v,w-=v;if(s.ack){if(w===1/0)return;v=Math.min(w,2e3)}else{if(l<=0)return i(new Error("No ack for postMessage "+n+" in "+r.i(c.g)()+" in "+f.a.ACK_TIMEOUT+"ms"));if(w<=0)return i(new Error("No response for postMessage "+n+" in "+r.i(c.g)()+" in "+(e.timeout||f.a.RES_TIMEOUT)+"ms"))}setTimeout(t,v)}};setTimeout(y,v)})});return m.catch(function(){r.i(d.f)(u),r.i(d.g)(u)}),p.push(m),m})}function o(e,n,r,o){return o=o||{},o.window=e,o.name=n,o.data=r,t(o)}function i(e,n,t){var i=r.i(c.a)();return i?o(i,e,n,t):new s.a(function(e,n){return n(new Error("Window does not have a parent"))})}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.window)throw new Error("Expected options.window");var n=e.window;return{send:function(r,t){return o(n,r,t,e)}}}r.d(n,"a",function(){return o}),n.b=t,n.c=i,n.d=a;var u=r(7),s=r(2),c=r(1),f=r(0),d=r(5),l=r(4),w=r(3);w.a.requestPromises=w.a.requestPromises||new u.a},function(e,n,r){"use strict";function t(){delete window[o.b.WINDOW_PROPS.POSTROBOT],window.removeEventListener("message",i.b)}n.c=t;var o=r(0),i=r(5);r.d(n,"a",function(){return o.a}),r.d(n,"b",function(){return o.b})},function(e,n,r){"use strict";r.d(n,"a",function(){return u});var t=r(1),o=r(37);r.d(n,"b",function(){return o.a}),r.d(n,"c",function(){return o.b}),r.d(n,"d",function(){return o.c}),r.d(n,"e",function(){return o.d});var i=r(40);r.d(n,"f",function(){return i.a}),r.d(n,"g",function(){return i.b}),r.d(n,"h",function(){return i.c}),r.d(n,"i",function(){return i.d});var a=r(38);r.d(n,"j",function(){return a.a}),r.d(n,"k",function(){return a.b}),r.d(n,"l",function(){return a.c});var u=r.i(t.a)()},function(e,n,r){"use strict";function t(e){if(!e.name)throw new Error("Expected options.name");if(!e.handler)throw new Error("Expected options.handler");var n=e.name,t=e.window,o=e.domain,i={handler:e.handler,handleError:e.errorHandler||function(e){throw e},window:t,domain:o||d.b.WILDCARD,name:n},a=r.i(f.c)({name:n,win:t,domain:o},i);if(e.once){var s=i.handler;i.handler=r.i(c.n)(function(){return a.cancel(),s.apply(this,arguments)})}if(i.window&&e.errorOnClose)var w=r.i(c.o)(function(){t&&"object"===(void 0===t?"undefined":l(t))&&r.i(u.f)(t)&&(w.cancel(),i.handleError(new Error("Post message target window is closed")))},50);return{cancel:function(){a.cancel()}}}function o(e,n,r){return"function"==typeof n&&(r=n,n={}),n=n||{},n.name=e,n.handler=r||n.handler,t(n)}function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2];"function"==typeof n&&(r=n,n={}),n=n||{},r=r||n.handler;var o=n.errorHandler,i=new s.a(function(t,i){n=n||{},n.name=e,n.once=!0,n.handler=function(e){if(t(e),r)return r(e)},n.errorHandler=function(e){if(i(e),o)return o(e)}}),a=t(n);return i.cancel=a.cancel,i}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{on:function(n,r){return o(n,e,r)}}}r.d(n,"a",function(){return o}),n.b=t,n.c=i,n.d=a;var u=r(1),s=r(2),c=r(4),f=r(5),d=r(0),l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}])});
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("postRobot",[],n):"object"==typeof exports?exports.postRobot=n():e.postRobot=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r={};return n.m=e,n.c=r,n.i=function(e){return e},n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=34)}([function(e,n,r){"use strict";var t=r(30);r.d(n,"a",function(){return t.a});var o=r(14);r.d(n,"b",function(){return o.a}),r.d(n,"c",function(){return o.b})},function(e,n,r){"use strict";function t(e){var n=e.location;if(!n)throw new Error("Can not read window location");var r=n.protocol;if(!r)throw new Error("Can not read window protocol");if(r===M.FILE_PROTOCOL)return M.FILE_PROTOCOL+"//";var t=n.host;if(!t)throw new Error("Can not read window host");return r+"//"+t}function o(e){e=e||window;var n=t(e);return n&&e.mockDomain&&0===e.mockDomain.indexOf(M.MOCK_PROTOCOL)?e.mockDomain:n}function i(e){try{if(!e.location.href)return!0;if("about:blank"===e.location.href)return!0}catch(e){}return!1}function a(e){try{var n=Object.getOwnPropertyDescriptor(e,"location");if(n&&!1===n.enumerable)return!1}catch(e){}try{if(i(e))return!0;if(t(e)===t(window))return!0}catch(e){}return!1}function u(e){if(!a(e))return!1;try{if(i(e))return!0;if(o(window)===o(e))return!0}catch(e){}return!1}function s(e){if(e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){return}}function c(e){if(e&&!s(e))try{return e.opener}catch(e){return}}function f(e){var n=[];try{for(;e.parent!==e;)n.push(e.parent),e=e.parent}catch(e){}return n}function d(e,n){if(!e||!n)return!1;var r=s(n);return r?r===e:-1!==f(n).indexOf(e)}function l(e){var n=[],r=void 0;try{r=e.frames}catch(n){r=e}var t=void 0;try{t=r.length}catch(e){}if(0===t)return n;if(t){for(var o=0;o<t;o++){var i=void 0;try{i=r[o]}catch(e){continue}n.push(i)}return n}for(var a=0;a<100;a++){var u=void 0;try{u=r[a]}catch(e){return n}if(!u)return n;n.push(u)}return n}function w(e){for(var n=[],r=l(e),t=Array.isArray(r),o=0,r=t?r:r[Symbol.iterator]();;){var i;if(t){if(o>=r.length)break;i=r[o++]}else{if(o=r.next(),o.done)break;i=o.value}var a=i;n.push(a);for(var u=w(a),s=Array.isArray(u),c=0,u=s?u:u[Symbol.iterator]();;){var f;if(s){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var d=f;n.push(d)}}return n}function h(e){if(e){try{if(e.top)return e.top}catch(e){}if(s(e)===e)return e;try{if(d(window,e)&&window.top)return window.top}catch(e){}try{if(d(e,window)&&window.top)return window.top}catch(e){}for(var n=w(e),r=Array.isArray(n),t=0,n=r?n:n[Symbol.iterator]();;){var o;if(r){if(t>=n.length)break;o=n[t++]}else{if(t=n.next(),t.done)break;o=t.value}var i=o;try{if(i.top)return i.top}catch(e){}if(s(i)===i)return i}}}function p(e){var n=h(e);return w(n).concat(n)}function m(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var n=e.ownerDocument;return!(!n||!n.body||n.body.contains(e))}function v(e,n){for(var r=0;r<e.length;r++)try{if(e[r]===n)return r}catch(e){}return-1}function y(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];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!==L}if(n&&u(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}try{r.i(k.a)(e===e)}catch(e){return!0}var t=v(j,e);if(-1!==t){var o=N[t];if(o&&m(o))return!0}return!1}function b(e){return e=e||window,e.navigator.mockUserAgent||e.navigator.userAgent}function g(e,n){for(var r=l(e),t=r,o=Array.isArray(t),i=0,t=o?t:t[Symbol.iterator]();;){var a;if(o){if(i>=t.length)break;a=t[i++]}else{if(i=t.next(),i.done)break;a=i.value}var s=a;try{if(u(s)&&s.name===n&&-1!==r.indexOf(s))return s}catch(e){}}try{if(-1!==r.indexOf(e.frames[n]))return e.frames[n]}catch(e){}try{if(-1!==r.indexOf(e[n]))return e[n]}catch(e){}}function E(e,n){return e===c(n)}function _(e){e=e||window;var n=c(e);if(n)return n;var r=s(e);return r||void 0}function O(e,n){var r=_(n);if(r)return r===e;if(n===e)return!1;if(h(n)===n)return!1;for(var t=l(e),o=Array.isArray(t),i=0,t=o?t:t[Symbol.iterator]();;){var a;if(o){if(i>=t.length)break;a=t[i++]}else{if(i=t.next(),i.done)break;a=i.value}if(a===n)return!0}return!1}function S(){return Boolean(c(window))}function A(){return Boolean(s(window))}function P(e,n){for(var r=e,t=Array.isArray(r),o=0,r=t?r:r[Symbol.iterator]();;){var i;if(t){if(o>=r.length)break;i=r[o++]}else{if(o=r.next(),o.done)break;i=o.value}for(var a=i,u=n,s=Array.isArray(u),c=0,u=s?u:u[Symbol.iterator]();;){var f;if(s){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}if(a===f)return!0}}return!1}function T(e,n){var r=h(e)||e,t=h(n)||n;try{if(r&&t)return r===t}catch(e){}var o=p(e),i=p(n);if(P(o,i))return!0;var a=c(r),u=c(t);return(!a||!P(p(a),i))&&(u&&P(p(u),o),!1)}function W(e,n){if("string"==typeof e){if("string"==typeof n)return e===M.WILDCARD||n===e;if(r.i(k.b)(n))return!1;if(Array.isArray(n))return!1}return r.i(k.b)(e)?r.i(k.b)(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.i(k.b)(n)&&e.some(function(e){return W(e,n)}))}function R(e){var n=void 0;return e.match(/^(https?|mock|file):\/\//)?(n=e,n=n.split("/").slice(0,3).join("/")):o()}function I(e){try{if(e===window)return!0}catch(e){if(e&&e.message===L)return!0}try{if("[object Window]"===Object.prototype.toString.call(e))return!0}catch(e){if(e&&e.message===L)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===L)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===L)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===L)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===L)return!0}try{r.i(k.a)(e===e)}catch(e){return!0}try{r.i(k.a)(e&&e.__cross_domain_utils_window_check__)}catch(e){return!0}return!1}n.i=t,n.g=o,n.h=a,n.j=u,n.s=s,n.r=c,n.q=l,n.f=y,n.o=b,n.n=g,n.p=E,n.a=_,n.l=O,n.c=S,n.d=A,n.k=T,n.b=W,n.m=R,n.e=I;var k=r(20),M={MOCK_PROTOCOL:"mock:",FILE_PROTOCOL:"file:",WILDCARD:"*"},L="Call was rejected by callee.\r\n",j=[],N=[]},function(e,n,r){"use strict";var t=r(22);r.d(n,"a",function(){return t.a})},function(e,n,r){"use strict";r.d(n,"a",function(){return o});var t=r(0),o=window[t.b.WINDOW_PROPS.POSTROBOT]=window[t.b.WINDOW_PROPS.POSTROBOT]||{};o.registerSelf=function(){}},function(e,n,r){"use strict";var t=r(8);r.d(n,"c",function(){return t.a}),r.d(n,"d",function(){return t.f}),r.d(n,"e",function(){return t.d}),r.d(n,"h",function(){return t.c}),r.d(n,"i",function(){return t.b}),r.d(n,"j",function(){return t.h}),r.d(n,"l",function(){return t.i}),r.d(n,"m",function(){return t.j}),r.d(n,"n",function(){return t.e}),r.d(n,"o",function(){return t.k}),r.d(n,"q",function(){return t.l});var o=r(11);r.d(n,"g",function(){return o.a});var i=r(36);r.d(n,"b",function(){return i.a}),r.d(n,"f",function(){return i.b}),r.d(n,"k",function(){return i.c});var a=r(35);r.d(n,"a",function(){return a.a}),r.d(n,"p",function(){return a.b})},function(e,n,r){"use strict";var t=r(31);r.d(n,"a",function(){return t.a}),r.d(n,"b",function(){return t.b}),r.d(n,"h",function(){return t.c});var o=r(16);r.d(n,"e",function(){return o.a});var i=r(15);r.d(n,"c",function(){return i.e}),r.d(n,"d",function(){return i.f}),r.d(n,"f",function(){return i.g}),r.d(n,"g",function(){return i.d})},function(e,n,r){"use strict";function t(){a.a.initialized||(r.i(i.a)(),r(10).openTunnelToOpener(),r.i(o.a)(),r.i(o.b)()),a.a.initialized=!0}Object.defineProperty(n,"__esModule",{value:!0}),n.init=t,r.d(n,"bridge",function(){return d});var o=r(4),i=r(5),a=r(3),u=r(28);r.d(n,"cleanUpWindow",function(){return u.a});var s=r(26),c=r(39);r.d(n,"parent",function(){return c.a}),r.d(n,"send",function(){return c.b}),r.d(n,"request",function(){return c.c}),r.d(n,"sendToParent",function(){return c.d}),r.d(n,"client",function(){return c.e}),r.d(n,"on",function(){return c.f}),r.d(n,"listen",function(){return c.g}),r.d(n,"once",function(){return c.h}),r.d(n,"listener",function(){return c.i}),r.d(n,"CONFIG",function(){return c.j}),r.d(n,"CONSTANTS",function(){return c.k}),r.d(n,"disable",function(){return c.l});var f=r(2);r.d(n,"Promise",function(){return f.a}),t();var d=s},function(e,n,r){"use strict";var t=r(12);r.d(n,"a",function(){return t.WeakMap})},function(e,n,r){"use strict";function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(n>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+Object.prototype.toString.call(e)+">";if("string"==typeof e)return e;if(e instanceof Error){var r=e&&e.stack,o=e&&e.message;if(r&&o)return-1!==r.indexOf(o)?r:o+"\n"+r;if(r)return r;if(o)return o}return"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}catch(e){return"Error while stringifying error: "+t(e,n+1)}}function o(){}function i(e,n,r){return e.addEventListener?e.addEventListener(n,r):e.attachEvent("on"+n,r),{cancel:function(){e.removeEventListener?e.removeEventListener(n,r):e.detachEvent("on"+n,r)}}}function a(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,function(){return e.charAt(Math.floor(Math.random()*e.length))})}function u(e,n){for(var r=0;r<e.length;r++)n(e[r],r)}function s(e,n){for(var r in e)e.hasOwnProperty(r)&&n(e[r],r)}function c(e,n){Array.isArray(e)?u(e,n):"object"===(void 0===e?"undefined":b(e))&&null!==e&&s(e,n)}function f(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(r>=100)throw new Error("Self-referential object passed, or object contained too many layers");var t=void 0;if("object"!==(void 0===e?"undefined":b(e))||null===e||Array.isArray(e)){if(!Array.isArray(e))throw new Error("Invalid type: "+(void 0===e?"undefined":b(e)));t=[]}else t={};return c(e,function(e,o){var i=n(e,o);void 0!==i?t[o]=i:"object"===(void 0===e?"undefined":b(e))&&null!==e?t[o]=f(e,n,r+1):t[o]=e}),t}function d(e,n){function r(){t=setTimeout(r,n),e.call()}var t=void 0;return t=setTimeout(r,n),{cancel:function(){clearTimeout(t)}}}function l(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function w(){return r.i(v.c)()?y.b.WINDOW_TYPES.POPUP:r.i(v.d)()?y.b.WINDOW_TYPES.IFRAME:y.b.WINDOW_TYPES.FULLPAGE}function h(e,n,r){var t=void 0,o=void 0;try{if("{}"!==JSON.stringify({})&&(t=Object.prototype.toJSON,delete Object.prototype.toJSON),"{}"!==JSON.stringify({}))throw new Error("Can not correctly serialize JSON objects");if("[]"!==JSON.stringify([])&&(o=Array.prototype.toJSON,delete Array.prototype.toJSON),"[]"!==JSON.stringify([]))throw new Error("Can not correctly serialize JSON objects")}catch(e){throw new Error("Can not repair JSON.stringify: "+e.message)}var i=JSON.stringify.call(this,e,n,r);try{t&&(Object.prototype.toJSON=t),o&&(Array.prototype.toJSON=o)}catch(e){throw new Error("Can not repair JSON.stringify: "+e.message)}return i}function p(e){return JSON.parse(e)}n.b=t,r.d(n,"e",function(){return g}),n.j=o,n.i=i,n.f=a,n.g=f,n.k=d,n.a=l,r.d(n,"l",function(){return E}),n.d=w,n.c=h,n.h=p;var m=r(7),v=r(1),y=r(0),b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g=function(e){if(!e)return e;var n=!1;return function(){if(!n)return n=!0,e.apply(this,arguments)}},E=function(e){var n=new m.a;return function(r){var t=n.get(r);return void 0!==t?t:(t=e.call(this,r),void 0!==t&&n.set(r,t),t)}}},function(e,n,r){"use strict";function t(){return!!r.i(m.o)(window).match(/MSIE|trident|edge\/12|edge\/13/i)||!v.a.ALLOW_POSTMESSAGE_POPUP}function o(e){return!r.i(m.k)(window,e)}function i(e,n){if(e){if(r.i(m.g)()!==r.i(m.m)(e))return!0}else if(n&&!r.i(m.j)(n))return!0;return!1}function a(e){var n=e.win,r=e.domain;return!!t()&&(!(r&&!i(r,n))&&!(n&&!o(n)))}function u(e){e=e||r.i(m.m)(e);var n=e.replace(/[^a-zA-Z0-9]+/g,"_");return v.b.BRIDGE_NAME_PREFIX+"_"+n}function s(){return Boolean(window.name&&window.name===u(r.i(m.g)()))}function c(e){arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.a.BRIDGE_TIMEOUT;y.a.remoteWindows.set(e,{sendMessagePromise:new p.a})}function f(e){return y.a.remoteWindows.get(e)}function d(e,n,t){var o=f(e);if(!o)throw new Error("Window not found to register sendMessage to");var i=function(o,i,a){if(o!==e)throw new Error("Remote window does not match window");if(!r.i(m.b)(a,n))throw new Error("Remote domain "+a+" does not match domain "+n);t(i)};o.sendMessagePromise.resolve(i),o.sendMessagePromise=p.a.resolve(i)}function l(e,n){var r=f(e);if(!r)throw new Error("Window not found on which to reject sendMessage");r.sendMessagePromise.asyncReject(n)}function w(e,n,t){var o=r.i(m.p)(window,e),i=r.i(m.p)(e,window);if(!o&&!i)throw new Error("Can only send messages to and from parent and popup windows");var a=f(e);if(!a)throw new Error("Window not found to send message to");return a.sendMessagePromise.then(function(r){return r(e,n,t)})}n.a=t,n.b=o,n.c=i,n.d=a,n.e=u,n.f=s,r.d(n,"g",function(){return g}),n.h=c,n.i=f,n.j=d,n.k=l,n.l=w;var h=r(7),p=r(2),m=r(1),v=r(0),y=r(3),b=r(5),g=new p.a(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)});y.a.remoteWindows=y.a.remoteWindows||new h.a,y.a.receiveMessage=function(e){r.i(b.h)(e)}},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(24);for(var o in t)"default"!==o&&function(e){r.d(n,e,function(){return t[e]})}(o);var i=r(25);r.d(n,"openTunnelToOpener",function(){return i.a});var a=r(9);r.d(n,"needsBridgeForBrowser",function(){return a.a}),r.d(n,"needsBridgeForWin",function(){return a.b}),r.d(n,"needsBridgeForDomain",function(){return a.c}),r.d(n,"needsBridge",function(){return a.d}),r.d(n,"getBridgeName",function(){return a.e}),r.d(n,"isBridge",function(){return a.f}),r.d(n,"documentBodyReady",function(){return a.g}),r.d(n,"registerRemoteWindow",function(){return a.h}),r.d(n,"findRemoteWindow",function(){return a.i}),r.d(n,"registerRemoteSendMessage",function(){return a.j}),r.d(n,"rejectRemoteSendMessage",function(){return a.k}),r.d(n,"sendBridgeMessage",function(){return a.l});var u=r(27);r.d(n,"hasBridge",function(){return u.a}),r.d(n,"openBridge",function(){return u.b}),r.d(n,"linkUrl",function(){return u.c}),r.d(n,"destroyBridges",function(){return u.d})},function(e,n,r){"use strict";r.d(n,"a",function(){return u});var t=r(8),o=r(0),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=["debug","info","warn","error"];Function.prototype.bind&&window.console&&"object"===i(console.log)&&["log","info","warn","error"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call);var u={clearLogs:function(){if(window.console&&window.console.clear&&window.console.clear(),o.a.LOG_TO_PAGE){var e=document.getElementById("postRobotLogs");e&&e.parentNode&&e.parentNode.removeChild(e)}},writeToPage:function(e,n){setTimeout(function(){var o=document.getElementById("postRobotLogs");o||(o=document.createElement("div"),o.id="postRobotLogs",o.style.cssText="width: 800px; font-family: monospace; white-space: pre-wrap;",document.body&&document.body.appendChild(o));var i=document.createElement("div"),a=(new Date).toString().split(" ")[4],u=Array.prototype.slice.call(n).map(function(e){if("string"==typeof e)return e;if(!e)return Object.prototype.toString.call(e);var n=void 0;try{n=r.i(t.c)(e,null,2)}catch(e){n="[object]"}return"\n\n"+n+"\n\n"}).join(" "),s=a+" "+e+" "+u;i.innerHTML=s;var c={log:"#ddd",warn:"orange",error:"red",info:"blue",debug:"#aaa"}[e];i.style.cssText="margin-top: 10px; color: "+c+";",o.childNodes.length?o.insertBefore(i,o.childNodes[0]):o.appendChild(i)})},logLevel:function(e,n){setTimeout(function(){try{var i=window.LOG_LEVEL||o.a.LOG_LEVEL;if(a.indexOf(e)<a.indexOf(i))return;if(n=Array.prototype.slice.call(n),n.unshift(""+window.location.host+window.location.pathname),n.unshift("::"),n.unshift(""+r.i(t.d)().toLowerCase()),n.unshift("[post-robot]"),o.a.LOG_TO_PAGE&&u.writeToPage(e,n),!window.console)return;if(window.console[e]||(e="log"),!window.console[e])return;window.console[e].apply(window.console,n)}catch(e){}},1)},debug:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];u.logLevel("debug",n)},info:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];u.logLevel("info",n)},warn:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];u.logLevel("warn",n)},error:function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];u.logLevel("error",n)}}},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(19);r.d(n,"WeakMap",function(){return t.a})},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(29);r.d(n,"emulateIERestrictions",function(){return t.a})},function(e,n,r){"use strict";r.d(n,"a",function(){return t}),r.d(n,"b",function(){return o});var t={POST_MESSAGE_TYPE:{REQUEST:"postrobot_message_request",RESPONSE:"postrobot_message_response",ACK:"postrobot_message_ack"},POST_MESSAGE_ACK:{SUCCESS:"success",ERROR:"error"},POST_MESSAGE_NAMES:{METHOD:"postrobot_method",READY:"postrobot_ready",OPEN_TUNNEL:"postrobot_open_tunnel"},WINDOW_TYPES:{FULLPAGE:"fullpage",POPUP:"popup",IFRAME:"iframe"},WINDOW_PROPS:{POSTROBOT:"__postRobot__"},SERIALIZATION_TYPES:{METHOD:"postrobot_method",ERROR:"postrobot_error",PROMISE:"postrobot_promise",ZALGO_PROMISE:"postrobot_zalgo_promise",REGEX:"regex"},SEND_STRATEGIES:{POST_MESSAGE:"postrobot_post_message",BRIDGE:"postrobot_bridge",GLOBAL:"postrobot_global"},MOCK_PROTOCOL:"mock:",FILE_PROTOCOL:"file:",BRIDGE_NAME_PREFIX:"__postrobot_bridge__",POSTROBOT_PROXY:"__postrobot_proxy__",WILDCARD:"*"},o=Object.keys(t.POST_MESSAGE_NAMES).map(function(e){return t.POST_MESSAGE_NAMES[e]})},function(e,n,r){"use strict";function t(e,n){l.a.responseListeners[e]=n}function o(e){return l.a.responseListeners[e]}function i(e){delete l.a.responseListeners[e]}function a(e){l.a.erroredResponseListeners[e]=!0}function u(e){return Boolean(l.a.erroredResponseListeners[e])}function s(e){var n=e.name,t=e.win,o=e.domain;if(t===h.b.WILDCARD&&(t=null),o===h.b.WILDCARD&&(o=null),!n)throw new Error("Name required to get request listener");var i=l.a.requestListeners[n];if(i)for(var a=[t,l.a.WINDOW_WILDCARD],u=0;u<a.length;u++){var s=a[u],c=s&&i.get(s);if(c){if(o&&"string"==typeof o){if(c[o])return c[o];if(c[p])for(var f=c[p],w=Array.isArray(f),m=0,f=w?f:f[Symbol.iterator]();;){var v;if(w){if(m>=f.length)break;v=f[m++]}else{if(m=f.next(),m.done)break;v=m.value}var y=v,b=y.regex,g=y.listener;if(r.i(d.b)(b,o))return g}}if(c[h.b.WILDCARD])return c[h.b.WILDCARD]}}}function c(e,n){var t=e.name,o=e.win,i=e.domain;if(!t||"string"!=typeof t)throw new Error("Name required to add request listener");if(Array.isArray(o)){for(var a=[],u=o,d=Array.isArray(u),m=0,u=d?u:u[Symbol.iterator]();;){var v;if(d){if(m>=u.length)break;v=u[m++]}else{if(m=u.next(),m.done)break;v=m.value}var y=v;a.push(c({name:t,domain:i,win:y},n))}return{cancel:function(){for(var e=a,n=Array.isArray(e),r=0,e=n?e:e[Symbol.iterator]();;){var t;if(n){if(r>=e.length)break;t=e[r++]}else{if(r=e.next(),r.done)break;t=r.value}t.cancel()}}}}if(Array.isArray(i)){for(var b=[],g=i,E=Array.isArray(g),_=0,g=E?g:g[Symbol.iterator]();;){var O;if(E){if(_>=g.length)break;O=g[_++]}else{if(_=g.next(),_.done)break;O=_.value}var S=O;b.push(c({name:t,win:o,domain:S},n))}return{cancel:function(){for(var e=b,n=Array.isArray(e),r=0,e=n?e:e[Symbol.iterator]();;){var t;if(n){if(r>=e.length)break;t=e[r++]}else{if(r=e.next(),r.done)break;t=r.value}t.cancel()}}}}var A=s({name:t,win:o,domain:i});if(o&&o!==h.b.WILDCARD||(o=l.a.WINDOW_WILDCARD),i=i||h.b.WILDCARD,A)throw o&&i?new Error("Request listener already exists for "+t+" on domain "+i.toString()+" for "+(o===l.a.WINDOW_WILDCARD?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+t+" for "+(o===l.a.WINDOW_WILDCARD?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+t+" on domain "+i.toString()):new Error("Request listener already exists for "+t);var P=l.a.requestListeners,T=P[t];T||(T=new f.a,P[t]=T);var W=T.get(o);W||(W={},T.set(o,W));var R=i.toString(),I=W[p],k=void 0;return r.i(w.c)(i)?(I||(I=[],W[p]=I),k={regex:i,listener:n},I.push(k)):W[R]=n,{cancel:function(){W&&(delete W[R],o&&0===Object.keys(W).length&&T.delete(o),k&&I.splice(I.indexOf(k,1)))}}}n.f=t,n.b=o,n.d=i,n.g=a,n.a=u,n.c=s,n.e=c;var f=(r(2),r(7)),d=r(1),l=r(3),w=r(4),h=r(0);l.a.responseListeners=l.a.responseListeners||{},l.a.requestListeners=l.a.requestListeners||{},l.a.WINDOW_WILDCARD=l.a.WINDOW_WILDCARD||new function(){},l.a.erroredResponseListeners=l.a.erroredResponseListeners||{};var p="__domain_regex__"},function(e,n,r){"use strict";function t(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function o(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.i(c.d)(),i=r.i(c.e)(),u=r.i(a.g)(window);return d({},n,t,{sourceDomain:u,id:n.id||o,windowType:i})}function i(e,n,i){return u.a.try(function(){n=o(e,n,{data:r.i(c.f)(e,i,n.data),domain:i});var d=void 0;if(d=-1!==s.c.indexOf(n.name)||n.type===s.b.POST_MESSAGE_TYPE.ACK?"debug":"error"===n.ack?"error":"info",c.g.logLevel(d,["\n\n\t","#send",n.type.replace(/^postrobot_message_/,""),"::",n.name,"::",i||s.b.WILDCARD,"\n\n",n]),e===window&&!s.a.ALLOW_SAME_ORIGIN)throw new Error("Attemping to send message to self");if(r.i(a.f)(e))throw new Error("Window is closed");c.g.debug("Running send message strategies",n);var l=[],w=r.i(c.h)(t({},s.b.WINDOW_PROPS.POSTROBOT,n),null,2);return u.a.map(Object.keys(f.a),function(n){return u.a.try(function(){if(!s.a.ALLOWED_POST_MESSAGE_METHODS[n])throw new Error("Strategy disallowed: "+n);return f.a[n](e,w,i)}).then(function(){return l.push(n+": success"),!0},function(e){return l.push(n+": "+r.i(c.i)(e)+"\n"),!1})}).then(function(e){var r=e.some(Boolean),t=n.type+" "+n.name+" "+(r?"success":"error")+":\n - "+l.join("\n - ")+"\n";if(c.g.debug(t),!r)throw new Error(t)})})}n.a=i;var a=r(1),u=r(2),s=r(0),c=r(4),f=r(33),d=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e}},function(e,n,r){"use strict";function t(){if(!window.WeakMap)return!1;if(!window.Object.freeze)return!1;try{var e=new window.WeakMap,n={};return window.Object.freeze(n),e.set(n,"__testvalue__"),"__testvalue__"===e.get(n)}catch(e){return!1}}n.a=t},function(e,n,r){"use strict";function t(e,n){for(var r=0;r<e.length;r++)try{if(e[r]===n)return r}catch(e){}return-1}function o(){}n.b=t,n.a=o},function(e,n,r){"use strict";function t(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}r.d(n,"a",function(){return f});var o=r(1),i=r(17),a=r(18),u=function(){function e(e,n){for(var r=0;r<n.length;r++){var t=n[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(n,r,t){return r&&e(n.prototype,r),t&&e(n,t),n}}(),s=Object.defineProperty,c=Date.now()%1e9,f=function(){function e(){if(t(this,e),c+=1,this.name="__weakmap_"+(1e9*Math.random()>>>0)+"__"+c,r.i(i.a)())try{this.weakmap=new window.WeakMap}catch(e){}this.keys=[],this.values=[]}return u(e,[{key:"_cleanupClosedWindows",value:function(){for(var e=this.weakmap,n=this.keys,t=0;t<n.length;t++){var i=n[t];if(r.i(o.e)(i)&&r.i(o.f)(i)){if(e)try{e.delete(i)}catch(e){}n.splice(t,1),this.values.splice(t,1),t-=1}}}},{key:"isSafeToReadWrite",value:function(e){if(r.i(o.e)(e))return!1;try{r.i(a.a)(e&&e.self),r.i(a.a)(e&&e[this.name])}catch(e){return!1}return!0}},{key:"set",value: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)){var o=this.name,i=e[o];i&&i[0]===e?i[1]=n:s(e,o,{value:[e,n],writable:!0})}else{this._cleanupClosedWindows();var u=this.keys,c=this.values,f=r.i(a.b)(u,e);-1===f?(u.push(e),c.push(n)):c[f]=n}}},{key:"get",value: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)){this._cleanupClosedWindows();var t=this.keys,o=r.i(a.b)(t,e);if(-1===o)return;return this.values[o]}var i=e[this.name];if(i&&i[0]===e)return i[1]}},{key:"delete",value: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)){var t=e[this.name];t&&t[0]===e&&(t[0]=t[1]=void 0)}else{this._cleanupClosedWindows();var o=this.keys,i=r.i(a.b)(o,e);-1!==i&&(o.splice(i,1),this.values.splice(i,1))}}},{key:"has",value:function(e){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{return n.has(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e)){var t=e[this.name];return!(!t||t[0]!==e)}return this._cleanupClosedWindows(),-1!==r.i(a.b)(this.keys,e)}}]),e}()},function(e,n,r){"use strict";function t(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function o(){}n.b=t,n.a=o},function(e,n,r){"use strict";function t(e){if(-1===a.indexOf(e)){a.push(e),setTimeout(function(){throw e},1);for(var n=0;n<i.length;n++)i[n](e)}}function o(e){return i.push(e),{cancel:function(){i.splice(i.indexOf(e),1)}}}n.a=t,n.b=o;var i=[],a=[]},function(e,n,r){"use strict";function t(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}r.d(n,"a",function(){return s});var o=r(23),i=r(21),a=function(){function e(e,n){for(var r=0;r<n.length;r++){var t=n[r];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(n,r,t){return r&&e(n.prototype,r),t&&e(n,t),n}}(),u=window.__zalgopromise__=window.__zalgopromise__||{flushPromises:[],activeCount:0},s=function(){function e(n){var r=this;if(t(this,e),this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],n){var o=void 0,i=void 0,a=!1,u=!1,s=!1;try{n(function(e){s?r.resolve(e):(a=!0,o=e)},function(e){s?r.reject(e):(u=!0,i=e)})}catch(e){return void this.reject(e)}s=!0,a?this.resolve(o):u&&this.reject(i)}}return a(e,[{key:"resolve",value:function(e){if(this.resolved||this.rejected)return this;if(r.i(o.a)(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this}},{key:"reject",value:function(e){var n=this;if(this.resolved||this.rejected)return this;if(r.i(o.a)(e))throw new Error("Can not reject promise with another promise");if(!e){var t=e&&"function"==typeof e.toString?e.toString():Object.prototype.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||r.i(i.a)(e)},1),this.dispatch(),this}},{key:"asyncReject",value:function(e){this.errorHandled=!0,this.reject(e)}},{key:"dispatch",value:function(){var n=this,t=this.dispatching,i=this.resolved,a=this.rejected,s=this.handlers;if(!t&&(i||a)){this.dispatching=!0,u.activeCount+=1;for(var c=0;c<s.length;c++){(function(t){var u=s[t],c=u.onSuccess,f=u.onError,d=u.promise,l=void 0;if(i)try{l=c?c(n.value):n.value}catch(e){return d.reject(e),"continue"}else if(a){if(!f)return d.reject(n.error),"continue";try{l=f(n.error)}catch(e){return d.reject(e),"continue"}}l instanceof e&&(l.resolved||l.rejected)?(l.resolved?d.resolve(l.value):d.reject(l.error),l.errorHandled=!0):r.i(o.a)(l)?l instanceof e&&(l.resolved||l.rejected)?l.resolved?d.resolve(l.value):d.reject(l.error):l.then(function(e){d.resolve(e)},function(e){d.reject(e)}):d.resolve(l)})(c)}s.length=0,this.dispatching=!1,u.activeCount-=1,0===u.activeCount&&e.flushQueue()}}},{key:"then",value:function(n,r){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for success handler");if(r&&"function"!=typeof r&&!r.call)throw new Error("Promise.then expected a function for error handler");var t=new e;return this.handlers.push({promise:t,onSuccess:n,onError:r}),this.errorHandled=!0,this.dispatch(),t}},{key:"catch",value:function(e){return this.then(void 0,e)}},{key:"finally",value:function(n){return this.then(function(r){return e.try(n).then(function(){return r})},function(r){return e.try(n).then(function(){throw r})})}},{key:"timeout",value:function(e,n){var r=this;if(this.resolved||this.rejected)return this;var t=setTimeout(function(){r.resolved||r.rejected||r.reject(n||new Error("Promise timed out after "+e+"ms"))},e);return this.then(function(e){return clearTimeout(t),e})}},{key:"toPromise",value:function(){if(!window.Promise)throw new Error("Could not find window.Promise");return window.Promise.resolve(this)}}],[{key:"resolve",value:function(n){return n instanceof e?n:r.i(o.a)(n)?new e(function(e,r){return n.then(e,r)}):(new e).resolve(n)}},{key:"reject",value:function(n){return(new e).reject(n)}},{key:"all",value:function(n){var t=new e,i=n.length,a=[];if(!i)return t.resolve(a),t;for(var u=0;u<n.length;u++){(function(u){var s=n[u];if(s instanceof e){if(s.resolved)return a[u]=s.value,i-=1,"continue"}else if(!r.i(o.a)(s))return a[u]=s,i-=1,"continue";e.resolve(s).then(function(e){a[u]=e,0===(i-=1)&&t.resolve(a)},function(e){t.reject(e)})})(u)}return 0===i&&t.resolve(a),t}},{key:"hash",value:function(n){var r={};return e.all(Object.keys(n).map(function(t){return e.resolve(n[t]).then(function(e){r[t]=e})})).then(function(){return r})}},{key:"map",value:function(n,r){return e.all(n.map(r))}},{key:"onPossiblyUnhandledException",value:function(e){return r.i(i.b)(e)}},{key:"try",value:function(n,r,t){var o=void 0;try{o=n.apply(r,t||[])}catch(n){return e.reject(n)}return e.resolve(o)}},{key:"delay",value:function(n){return new e(function(e){setTimeout(e,n)})}},{key:"isPromise",value:function(n){return!!(n&&n instanceof e)||r.i(o.a)(n)}},{key:"flush",value:function(){var n=new e;return u.flushPromises.push(n),0===u.activeCount&&e.flushQueue(),n}},{key:"flushQueue",value:function(){var e=u.flushPromises;u.flushPromises=[];for(var n=e,r=Array.isArray(n),t=0,n=r?n:n[Symbol.iterator]();;){var o;if(r){if(t>=n.length)break;o=n[t++]}else{if(t=n.next(),t.done)break;o=t.value}o.resolve()}}}]),e}()},function(e,n,r){"use strict";function t(e){try{if(!e)return!1;if(window.Promise&&e instanceof window.Promise)return!0;if(window.Window&&e instanceof window.Window)return!1;if(window.constructor&&e instanceof window.constructor)return!1;if(o){var n=o.call(e);if("[object Window]"===n||"[object global]"===n||"[object DOMWindow]"===n)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}n.a=t;var o={}.toString},function(e,n,r){"use strict";function t(e){try{f.a.tunnelWindows[e]&&delete f.a.tunnelWindows[e].source}catch(e){}delete f.a.tunnelWindows[e]}function o(){for(var e=f.a.tunnelWindows,n=Object.keys(e),o=Array.isArray(n),i=0,n=o?n:n[Symbol.iterator]();;){var a;if(o){if(i>=n.length)break;a=n[i++]}else{if(i=n.next(),i.done)break;a=i.value}var u=a,d=e[u];try{r.i(c.m)(d.source)}catch(e){t(u);continue}r.i(s.f)(d.source)&&t(u)}}function i(e){var n=e.name,r=e.source,t=e.canary,i=e.sendMessage;return o(),f.a.tunnelWindowId+=1,f.a.tunnelWindows[f.a.tunnelWindowId]={name:n,source:r,canary:t,sendMessage:i},f.a.tunnelWindowId}function a(e){return f.a.tunnelWindows[e]}Object.defineProperty(n,"__esModule",{value:!0});var u=(r(2),r(0)),s=r(1),c=r(4),f=r(3),d=r(6);f.a.tunnelWindows=f.a.tunnelWindows||{},f.a.tunnelWindowId=0,f.a.openTunnelToParent=function(e){var n=e.name,o=e.source,f=e.canary,l=e.sendMessage,w=r.i(s.s)(window);if(!w)throw new Error("No parent window found to open tunnel to");var h=i({name:n,source:o,canary:f,sendMessage:l});return r.i(d.send)(w,u.b.POST_MESSAGE_NAMES.OPEN_TUNNEL,{name:n,sendMessage:function(){var e=a(h);try{r.i(c.m)(e&&e.source)}catch(e){return void t(h)}if(e&&e.source&&!r.i(s.f)(e.source)){try{e.canary()}catch(e){return}e.sendMessage.apply(this,arguments)}}},{domain:u.b.WILDCARD})}},function(e,n,r){"use strict";function t(){return o.a.try(function(){var e=r.i(i.r)(window);if(e&&r.i(c.d)({win:e}))return r.i(c.h)(e),f(e).then(function(n){return n?window.name?n[a.b.WINDOW_PROPS.POSTROBOT].openTunnelToParent({name:window.name,source:window,canary:function(){},sendMessage:function(e){try{r.i(u.m)(window)}catch(e){return}if(window&&!window.closed)try{r.i(s.h)({data:e,origin:this.origin,source:this.source})}catch(e){o.a.reject(e)}}}).then(function(n){var t=n.source,o=n.origin,i=n.data;if(t!==e)throw new Error("Source does not match opener");r.i(c.j)(t,o,i.sendMessage)}).catch(function(n){throw r.i(c.k)(e,n),n}):r.i(c.k)(e,new Error("Can not register with opener: window does not have a name")):r.i(c.k)(e,new Error("Can not register with opener: no bridge found in opener"))})})}n.a=t;var o=r(2),i=r(1),a=r(0),u=r(4),s=r(5),c=r(9),f=r.i(u.q)(function(e){return o.a.try(function(){for(var n=r.i(i.q)(e),t=Array.isArray(n),u=0,n=t?n:n[Symbol.iterator]();;){var s;if(t){if(u>=n.length)break;s=n[u++]}else{if(u=n.next(),u.done)break;s=u.value}var f=s;try{if(f&&f!==window&&r.i(i.j)(f)&&f[a.b.WINDOW_PROPS.POSTROBOT])return f}catch(e){continue}}try{var d=r.i(i.n)(e,r.i(c.e)(r.i(i.g)()));if(!d)return;return r.i(i.j)(d)&&d[a.b.WINDOW_PROPS.POSTROBOT]?d:new o.a(function(e){var n=void 0,t=void 0;n=setInterval(function(){if(d&&r.i(i.j)(d)&&d[a.b.WINDOW_PROPS.POSTROBOT])return clearInterval(n),clearTimeout(t),e(d)},100),t=setTimeout(function(){return clearInterval(n),e()},2e3)})}catch(e){return}})})},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(10);r.o(t,"openBridge")&&r.d(n,"openBridge",function(){return t.openBridge}),r.o(t,"linkUrl")&&r.d(n,"linkUrl",function(){return t.linkUrl}),r.o(t,"isBridge")&&r.d(n,"isBridge",function(){return t.isBridge}),r.o(t,"needsBridge")&&r.d(n,"needsBridge",function(){return t.needsBridge}),r.o(t,"needsBridgeForBrowser")&&r.d(n,"needsBridgeForBrowser",function(){return t.needsBridgeForBrowser}),r.o(t,"hasBridge")&&r.d(n,"hasBridge",function(){return t.hasBridge}),r.o(t,"needsBridgeForWin")&&r.d(n,"needsBridgeForWin",function(){return t.needsBridgeForWin}),r.o(t,"needsBridgeForDomain")&&r.d(n,"needsBridgeForDomain",function(){return t.needsBridgeForDomain}),r.o(t,"openTunnelToOpener")&&r.d(n,"openTunnelToOpener",function(){return t.openTunnelToOpener}),r.o(t,"destroyBridges")&&r.d(n,"destroyBridges",function(){return t.destroyBridges})},function(e,n,r){"use strict";function t(e,n){r.i(p.on)(l.b.POST_MESSAGE_NAMES.OPEN_TUNNEL,{window:e,domain:n},function(e){var t=e.origin,o=e.data;if(t!==n)throw new Error("Domain "+n+" does not match origin "+t);if(!o.name)throw new Error("Register window expected to be passed window name");if(!o.sendMessage)throw new Error("Register window expected to be passed sendMessage method");if(!h.a.popupWindowsByName[o.name])throw new Error("Window with name "+o.name+" does not exist, or was not opened by this window");if(!h.a.popupWindowsByName[o.name].domain)throw new Error("We do not have a registered domain for window "+o.name);if(h.a.popupWindowsByName[o.name].domain!==t)throw new Error("Message origin "+t+" does not matched registered window origin "+h.a.popupWindowsByName[o.name].domain);return r.i(v.j)(h.a.popupWindowsByName[o.name].win,n,o.sendMessage),{sendMessage:function(e){if(window&&!window.closed){var n=h.a.popupWindowsByName[o.name];if(n)try{r.i(m.h)({data:e,origin:n.domain,source:n.win})}catch(e){f.a.reject(e)}}}}})}function o(e,n){w.g.debug("Opening bridge:",e,n);var r=document.createElement("iframe");return r.setAttribute("name",e),r.setAttribute("id",e),r.setAttribute("style","display: none; margin: 0; padding: 0; border: 0px none; overflow: hidden;"),r.setAttribute("frameborder","0"),r.setAttribute("border","0"),r.setAttribute("scrolling","no"),r.setAttribute("allowTransparency","true"),r.setAttribute("tabindex","-1"),r.setAttribute("hidden","true"),r.setAttribute("title",""),r.setAttribute("role","presentation"),r.src=n,r}function i(e,n){return n=n||r.i(d.m)(e),Boolean(h.a.bridges[n])}function a(e,n){return n=n||r.i(d.m)(e),h.a.bridges[n]?h.a.bridges[n]:(h.a.bridges[n]=f.a.try(function(){if(r.i(d.g)()===n)throw new Error("Can not open bridge on the same domain as current domain: "+n);var i=r.i(v.e)(n);if(r.i(d.n)(window,i))throw new Error("Frame with name "+i+" already exists on page");var a=o(i,e);return h.a.bridgeFrames[n]=a,v.g.then(function(o){o.appendChild(a);var i=a.contentWindow;return t(i,n),new f.a(function(e,n){a.onload=e,a.onerror=n}).then(function(){return r.i(w.p)(i,l.a.BRIDGE_TIMEOUT,"Bridge "+e)}).then(function(){return i})})}),h.a.bridges[n])}function u(e,n){var t=h.a.popupWindowsByWin.get(e);t&&(t.domain=r.i(d.m)(n),r.i(v.h)(e))}function s(){for(var e=Object.keys(h.a.bridgeFrames),n=Array.isArray(e),r=0,e=n?e:e[Symbol.iterator]();;){var t;if(n){if(r>=e.length)break;t=e[r++]}else{if(r=e.next(),r.done)break;t=r.value}var o=t,i=h.a.bridgeFrames[o];i.parentNode&&i.parentNode.removeChild(i)}h.a.bridgeFrames={},h.a.bridges={}}n.a=i,n.b=a,n.c=u,n.d=s;var c=r(7),f=r(2),d=r(1),l=r(0),w=r(4),h=r(3),p=r(6),m=r(5),v=r(9),y=function(){function e(e,n){var r=[],t=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(t=(a=u.next()).done)&&(r.push(a.value),!n||r.length!==n);t=!0);}catch(e){o=!0,i=e}finally{try{!t&&u.return&&u.return()}finally{if(o)throw i}}return r}return function(n,r){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return e(n,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();h.a.bridges=h.a.bridges||{},h.a.bridgeFrames=h.a.bridgeFrames||{},h.a.popupWindowsByWin=h.a.popupWindowsByWin||new c.a,h.a.popupWindowsByName=h.a.popupWindowsByName||{};var b=window.open;window.open=function(e,n,t,o){var i=e;if(e&&0===e.indexOf(l.b.MOCK_PROTOCOL)){var a=e.split("|"),u=y(a,2);i=u[0],e=u[1]}i&&(i=r.i(d.m)(i));var s=b.call(this,e,n,t,o);if(!s)return s;e&&r.i(v.h)(s);for(var c=Object.keys(h.a.popupWindowsByName),f=Array.isArray(c),w=0,c=f?c:c[Symbol.iterator]();;){var p;if(f){if(w>=c.length)break;p=c[w++]}else{if(w=c.next(),w.done)break;p=w.value}var m=p;r.i(d.f)(h.a.popupWindowsByName[m].win)&&delete h.a.popupWindowsByName[m]}if(n&&s){var g=h.a.popupWindowsByWin.get(s)||h.a.popupWindowsByName[n]||{};g.name=g.name||n,g.win=g.win||s,g.domain=g.domain||i,h.a.popupWindowsByWin.set(s,g),h.a.popupWindowsByName[n]=g}return s}},function(e,n,r){"use strict";function t(e){var n=o.a.requestPromises.get(e);if(n)for(var r=n,t=Array.isArray(r),i=0,r=t?r:r[Symbol.iterator]();;){var a;if(t){if(i>=r.length)break;a=r[i++]}else{if(i=r.next(),i.done)break;a=i.value}var u=a;u.reject(new Error("No response from window - cleaned up"))}o.a.popupWindowsByWin&&o.a.popupWindowsByWin.delete(e),o.a.remoteWindows&&o.a.remoteWindows.delete(e),o.a.requestPromises.delete(e),o.a.methods.delete(e),o.a.readyPromises.delete(e)}n.a=t;var o=r(3)},function(e,n,r){"use strict";function t(e,n){if(!i.a.ALLOW_POSTMESSAGE_POPUP&&!1===r.i(o.k)(e,n))throw new Error("Can not send and receive post messages between two different windows (disabled to emulate IE)")}n.a=t;var o=r(1),i=r(0)},function(e,n,r){"use strict";function t(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}r.d(n,"a",function(){return a});var o,i=r(14),a={ALLOW_POSTMESSAGE_POPUP:!("__ALLOW_POSTMESSAGE_POPUP__"in window)||window.__ALLOW_POSTMESSAGE_POPUP__,LOG_LEVEL:"info",BRIDGE_TIMEOUT:5e3,CHILD_WINDOW_TIMEOUT:5e3,ACK_TIMEOUT:-1!==window.navigator.userAgent.match(/MSIE/i)?2e3:1e3,RES_TIMEOUT:1/0,LOG_TO_PAGE:!1,ALLOWED_POST_MESSAGE_METHODS:(o={},t(o,i.a.SEND_STRATEGIES.POST_MESSAGE,!0),t(o,i.a.SEND_STRATEGIES.BRIDGE,!0),t(o,i.a.SEND_STRATEGIES.GLOBAL,!0),o),ALLOW_SAME_ORIGIN:!1};0===window.location.href.indexOf(i.a.FILE_PROTOCOL)&&(a.ALLOW_POSTMESSAGE_POPUP=!0)},function(e,n,r){"use strict";function t(e){var n=void 0;try{n=r.i(c.j)(e)}catch(e){return}if(n&&"object"===(void 0===n?"undefined":l(n))&&null!==n&&(n=n[s.b.WINDOW_PROPS.POSTROBOT])&&"object"===(void 0===n?"undefined":l(n))&&null!==n&&n.type&&"string"==typeof n.type&&d.a[n.type])return n}function o(e){if(!window||window.closed)throw new Error("Message recieved in closed window");try{if(!e.source)return}catch(e){return}var n=e.source,o=e.origin,i=e.data,a=t(i);if(a){if(!a.sourceDomain||"string"!=typeof a.sourceDomain)throw new Error("Expected message to have sourceDomain");if(0!==a.sourceDomain.indexOf(s.b.MOCK_PROTOCOL)&&0!==a.sourceDomain.indexOf(s.b.FILE_PROTOCOL)||(o=a.sourceDomain),-1===f.a.receivedMessages.indexOf(a.id)){f.a.receivedMessages.push(a.id);var l=void 0;if(l=-1!==s.c.indexOf(a.name)||a.type===s.b.POST_MESSAGE_TYPE.ACK?"debug":"error"===a.ack?"error":"info",c.g.logLevel(l,["\n\n\t","#receive",a.type.replace(/^postrobot_message_/,""),"::",a.name,"::",o,"\n\n",a]),r.i(u.f)(n))return void c.g.debug("Source window is closed - can not send "+a.type+" "+a.name);a.data&&(a.data=r.i(c.k)(n,o,a.data)),d.a[a.type](n,o,a)}}}function i(e){try{e.source}catch(e){return}var n={source:e.source||e.sourceElement,origin:e.origin||e.originalEvent&&e.originalEvent.origin,data:e.data};try{r(13).emulateIERestrictions(n.source,window)}catch(e){return}o(n)}function a(){r.i(c.l)(window,"message",i)}n.c=o,n.b=i,n.a=a;var u=r(1),s=r(0),c=r(4),f=r(3),d=r(32),l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};f.a.receivedMessages=f.a.receivedMessages||[]},function(e,n,r){"use strict";function t(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}r.d(n,"a",function(){return l});var o,i=r(2),a=r(1),u=r(0),s=r(4),c=r(16),f=r(15),d=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},l=(o={},t(o,u.b.POST_MESSAGE_TYPE.ACK,function(e,n,t){if(!r.i(f.a)(t.hash)){var o=r.i(f.b)(t.hash);if(!o)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);if(!r.i(a.b)(o.domain,n))throw new Error("Ack origin "+n+" does not match domain "+o.domain.toString());o.ack=!0}}),t(o,u.b.POST_MESSAGE_TYPE.REQUEST,function(e,n,t){function o(o){return t.fireAndForget||r.i(a.f)(e)?i.a.resolve():r.i(c.a)(e,d({target:t.originalSource,hash:t.hash,name:t.name},o),n)}var l=r.i(f.c)({name:t.name,win:e,domain:n});return i.a.all([o({type:u.b.POST_MESSAGE_TYPE.ACK}),i.a.try(function(){if(!l)throw new Error("No handler found for post message: "+t.name+" from "+n+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!r.i(a.b)(l.domain,n))throw new Error("Request origin "+n+" does not match domain "+l.domain.toString());var o=t.data;return l.handler({source:e,origin:n,data:o})}).then(function(e){return o({type:u.b.POST_MESSAGE_TYPE.RESPONSE,ack:u.b.POST_MESSAGE_ACK.SUCCESS,data:e})},function(e){var n=r.i(s.i)(e).replace(/^Error: /,"");return o({type:u.b.POST_MESSAGE_TYPE.RESPONSE,ack:u.b.POST_MESSAGE_ACK.ERROR,error:n})})]).then(s.m).catch(function(e){if(l&&l.handleError)return l.handleError(e);s.g.error(r.i(s.i)(e))})}),t(o,u.b.POST_MESSAGE_TYPE.RESPONSE,function(e,n,t){if(!r.i(f.a)(t.hash)){var o=r.i(f.b)(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(!r.i(a.b)(o.domain,n))throw new Error("Response origin "+n+" does not match domain "+o.domain);if(r.i(f.d)(t.hash),t.ack===u.b.POST_MESSAGE_ACK.ERROR)return o.respond(new Error(t.error),null);if(t.ack===u.b.POST_MESSAGE_ACK.SUCCESS){var i=t.data||t.response;return o.respond(null,{source:e,origin:n,data:i})}}}),o)},function(e,n,r){"use strict";r.d(n,"a",function(){return i});var t=r(1),o=r(0),i={};i[o.b.SEND_STRATEGIES.POST_MESSAGE]=function(e,n,i){try{r(13).emulateIERestrictions(window,e)}catch(e){return}var a=void 0;a=Array.isArray(i)?i:i?[i]:[o.b.WILDCARD],a=a.map(function(n){if(0===n.indexOf(o.b.MOCK_PROTOCOL)){if(window.location.protocol===o.b.FILE_PROTOCOL)return o.b.WILDCARD;if(!r.i(t.h)(e))throw new Error("Attempting to send messsage to mock domain "+n+", but window is actually cross-domain");return r.i(t.i)(e)}return 0===n.indexOf(o.b.FILE_PROTOCOL)?o.b.WILDCARD:n}),a.forEach(function(r){return e.postMessage(n,r)})};var a=r(10),u=a.sendBridgeMessage,s=a.needsBridgeForBrowser,c=a.isBridge;i[o.b.SEND_STRATEGIES.BRIDGE]=function(e,n,o){if(s()||c()){if(r.i(t.j)(e))throw new Error("Post message through bridge disabled between same domain windows");if(!1!==r.i(t.k)(window,e))throw new Error("Can only use bridge to communicate between two different windows, not between frames");return u(e,n,o)}},i[o.b.SEND_STRATEGIES.GLOBAL]=function(e,n,i){if(s()){if(!r.i(t.j)(e))throw new Error("Post message through global disabled between different domain windows");if(!1!==r.i(t.k)(window,e))throw new Error("Can only use global to communicate between two different windows, not between frames");var a=e[o.b.WINDOW_PROPS.POSTROBOT];if(!a)throw new Error("Can not find postRobot global on foreign window");return a.receiveMessage({source:window,origin:r.i(t.g)(),data:n})}}},function(e,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=r(6);r.d(n,"cleanUpWindow",function(){return t.cleanUpWindow}),r.d(n,"init",function(){return t.init}),r.d(n,"bridge",function(){return t.bridge}),r.d(n,"Promise",function(){return t.Promise}),r.d(n,"parent",function(){return t.parent}),r.d(n,"send",function(){return t.send}),r.d(n,"request",function(){return t.request}),r.d(n,"sendToParent",function(){return t.sendToParent}),r.d(n,"client",function(){return t.client}),r.d(n,"on",function(){return t.on}),r.d(n,"listen",function(){return t.listen}),r.d(n,"once",function(){return t.once}),r.d(n,"listener",function(){return t.listener}),r.d(n,"CONFIG",function(){return t.CONFIG}),r.d(n,"CONSTANTS",function(){return t.CONSTANTS}),r.d(n,"disable",function(){return t.disable}),n.default=t},function(e,n,r){"use strict";function t(){r.i(c.on)(s.b.POST_MESSAGE_NAMES.READY,{domain:s.b.WILDCARD},function(e){var n=e.source,r=d.a.readyPromises.get(n);r?r.resolve(e):(r=(new u.a).resolve(e),d.a.readyPromises.set(n,r))});var e=r.i(a.a)();e&&r.i(c.send)(e,s.b.POST_MESSAGE_NAMES.READY,{},{domain:s.b.WILDCARD,timeout:1/0}).catch(function(e){f.a.debug(r.i(l.b)(e))})}function o(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Window",t=d.a.readyPromises.get(e);return t||(t=new u.a,d.a.readyPromises.set(e,t),-1!==n&&setTimeout(function(){return t.reject(new Error(r+" did not load after "+n+"ms"))},n),t)}n.a=t,n.b=o;var i=r(7),a=r(1),u=r(2),s=r(0),c=r(6),f=r(11),d=r(3),l=r(8);d.a.readyPromises=d.a.readyPromises||new i.a},function(e,n,r){"use strict";function t(e,n){return"object"===(void 0===e?"undefined":S(e))&&null!==e&&e.__type__===n}function o(e,n,t,o){var i=r.i(g.f)(),a=O.a.methods.get(e);return a||(a={},O.a.methods.set(e,a)),a[i]={domain:n,method:t},{__type__:b.b.SERIALIZATION_TYPES.METHOD,__id__:i,__name__:o}}function i(e){return{__type__:b.b.SERIALIZATION_TYPES.ERROR,__message__:r.i(g.b)(e)}}function a(e,n,r,t){return{__type__:b.b.SERIALIZATION_TYPES.PROMISE,__then__:o(e,n,function(e,n){return r.then(e,n)},t+".then")}}function u(e,n,r,t){return{__type__:b.b.SERIALIZATION_TYPES.ZALGO_PROMISE,__then__:o(e,n,function(e,n){return r.then(e,n)},t+".then")}}function s(e){return{__type__:b.b.SERIALIZATION_TYPES.REGEX,__source__:e.source}}function c(e,n,t){return r.i(g.g)({obj:t},function(t,c){return"function"==typeof t?o(e,n,t,c.toString()):t instanceof Error?i(t):window.Promise&&t instanceof window.Promise?a(e,n,t,c.toString()):y.a.isPromise(t)?u(e,n,t,c.toString()):r.i(g.a)(t)?s(t):void 0}).obj}function f(e,n,t){function o(){var o=Array.prototype.slice.call(arguments);return _.a.debug("Call foreign method",t.__name__,o),r.i(E.send)(e,b.b.POST_MESSAGE_NAMES.METHOD,{id:t.__id__,name:t.__name__,args:o},{domain:n,timeout:1/0}).then(function(e){var n=e.data;return _.a.debug("Got foreign method result",t.__name__,n.result),n.result},function(e){throw _.a.debug("Got foreign method error",r.i(g.b)(e)),e})}return o.__name__=t.__name__,o.__xdomain__=!0,o.source=e,o.origin=n,o}function d(e,n,r){return new Error(r.__message__)}function l(e,n,r){return new y.a(function(t,o){return f(e,n,r.__then__)(t,o)})}function w(e,n,r){return window.Promise?new window.Promise(function(t,o){return f(e,n,r.__then__)(t,o)}):l(e,n,r)}function h(e,n,r){return new RegExp(r.__source__)}function p(e,n,o){return r.i(g.g)({obj:o},function(r,o){if("object"===(void 0===r?"undefined":S(r))&&null!==r)return t(r,b.b.SERIALIZATION_TYPES.METHOD)?f(e,n,r):t(r,b.b.SERIALIZATION_TYPES.ERROR)?d(e,n,r):t(r,b.b.SERIALIZATION_TYPES.PROMISE)?w(e,n,r):t(r,b.b.SERIALIZATION_TYPES.ZALGO_PROMISE)?l(e,n,r):t(r,b.b.SERIALIZATION_TYPES.REGEX)?h(e,n,r):void 0}).obj}r.d(n,"a",function(){return A}),n.b=c,n.c=p;var m=r(7),v=r(1),y=r(2),b=r(0),g=r(8),E=r(6),_=r(11),O=r(3),S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};O.a.methods=O.a.methods||new m.a;var A=r.i(g.e)(function(){r.i(E.on)(b.b.POST_MESSAGE_NAMES.METHOD,{origin:b.b.WILDCARD},function(e){var n=e.source,t=e.origin,o=e.data,i=O.a.methods.get(n);if(!i)throw new Error("Could not find any methods this window has privileges to call");var a=i[o.id];if(!a)throw new Error("Could not find method with id: "+o.id);if(!r.i(v.b)(a.domain,t))throw new Error("Method domain "+a.domain+" does not match origin "+t);return _.a.debug("Call local method",o.name,o.args),y.a.try(function(){return a.method.apply({source:n,origin:t,data:o},o.args)}).then(function(e){return{result:e,id:o.id,name:o.name}})})})},function(e,n,r){"use strict";function t(e){return s.a.try(function(){if(!e.name)throw new Error("Expected options.name");var n=e.name,t=void 0,o=void 0;if("string"==typeof e.window){var i=document.getElementById(e.window);if(!i)throw new Error("Expected options.window "+Object.prototype.toString.call(e.window)+" to be a valid element id");if("iframe"!==i.tagName.toLowerCase())throw new Error("Expected options.window "+Object.prototype.toString.call(e.window)+" to be an iframe");if(!i.contentWindow)throw new Error("Iframe must have contentWindow. Make sure it has a src attribute and is in the DOM.");t=i.contentWindow}else if(e.window instanceof HTMLIFrameElement){if("iframe"!==e.window.tagName.toLowerCase())throw new Error("Expected options.window "+Object.prototype.toString.call(e.window)+" to be an iframe");if(e.window&&!e.window.contentWindow)throw new Error("Iframe must have contentWindow. Make sure it has a src attribute and is in the DOM.");e.window&&e.window.contentWindow&&(t=e.window.contentWindow)}else t=e.window;if(!t)throw new Error("Expected options.window to be a window object, iframe, or iframe element id.");var a=t;o=e.domain||f.b.WILDCARD;var u=e.name+"_"+r.i(l.d)();if(r.i(c.f)(a))throw new Error("Target window is closed");var h=!1,p=w.a.requestPromises.get(a);p||(p=[],w.a.requestPromises.set(a,p));var m=s.a.try(function(){if(r.i(c.l)(window,a))return s.a.resolve(r.i(l.p)(a,e.timeout||f.a.CHILD_WINDOW_TIMEOUT))}).then(function(){return new s.a(function(t,i){var s=void 0;if(e.fireAndForget||(s={name:n,window:a,domain:o,respond:function(e,n){e||(h=!0,p.splice(p.indexOf(m,1))),e?i(e):t(n)}},r.i(d.d)(u,s)),r.i(d.e)(a,{type:f.b.POST_MESSAGE_TYPE.REQUEST,hash:u,name:n,data:e.data,fireAndForget:e.fireAndForget},o).catch(i),e.fireAndForget)return t();var l=f.a.ACK_TIMEOUT,w=e.timeout||f.a.RES_TIMEOUT,v=100,y=function t(){if(!h){if(r.i(c.f)(a))return i(s.ack?new Error("Window closed for "+n+" before response"):new Error("Window closed for "+n+" before ack"));l-=v,w-=v;if(s.ack){if(w===1/0)return;v=Math.min(w,2e3)}else{if(l<=0)return i(new Error("No ack for postMessage "+n+" in "+r.i(c.g)()+" in "+f.a.ACK_TIMEOUT+"ms"));if(w<=0)return i(new Error("No response for postMessage "+n+" in "+r.i(c.g)()+" in "+(e.timeout||f.a.RES_TIMEOUT)+"ms"))}setTimeout(t,v)}};setTimeout(y,v)})});return m.catch(function(){r.i(d.f)(u),r.i(d.g)(u)}),p.push(m),m})}function o(e,n,r,o){return o=o||{},o.window=e,o.name=n,o.data=r,t(o)}function i(e,n,t){var i=r.i(c.a)();return i?o(i,e,n,t):new s.a(function(e,n){return n(new Error("Window does not have a parent"))})}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.window)throw new Error("Expected options.window");var n=e.window;return{send:function(r,t){return o(n,r,t,e)}}}r.d(n,"a",function(){return o}),n.b=t,n.c=i,n.d=a;var u=r(7),s=r(2),c=r(1),f=r(0),d=r(5),l=r(4),w=r(3);w.a.requestPromises=w.a.requestPromises||new u.a},function(e,n,r){"use strict";function t(){delete window[o.b.WINDOW_PROPS.POSTROBOT],window.removeEventListener("message",i.b)}n.c=t;var o=r(0),i=r(5);r.d(n,"a",function(){return o.a}),r.d(n,"b",function(){return o.b})},function(e,n,r){"use strict";r.d(n,"a",function(){return u});var t=r(1),o=r(37);r.d(n,"b",function(){return o.a}),r.d(n,"c",function(){return o.b}),r.d(n,"d",function(){return o.c}),r.d(n,"e",function(){return o.d});var i=r(40);r.d(n,"f",function(){return i.a}),r.d(n,"g",function(){return i.b}),r.d(n,"h",function(){return i.c}),r.d(n,"i",function(){return i.d});var a=r(38);r.d(n,"j",function(){return a.a}),r.d(n,"k",function(){return a.b}),r.d(n,"l",function(){return a.c});var u=r.i(t.a)()},function(e,n,r){"use strict";function t(e){if(!e.name)throw new Error("Expected options.name");if(!e.handler)throw new Error("Expected options.handler");var n=e.name,t=e.window,o=e.domain,i={handler:e.handler,handleError:e.errorHandler||function(e){throw e},window:t,domain:o||d.b.WILDCARD,name:n},a=r.i(f.c)({name:n,win:t,domain:o},i);if(e.once){var s=i.handler;i.handler=r.i(c.n)(function(){return a.cancel(),s.apply(this,arguments)})}if(i.window&&e.errorOnClose)var w=r.i(c.o)(function(){t&&"object"===(void 0===t?"undefined":l(t))&&r.i(u.f)(t)&&(w.cancel(),i.handleError(new Error("Post message target window is closed")))},50);return{cancel:function(){a.cancel()}}}function o(e,n,r){return"function"==typeof n&&(r=n,n={}),n=n||{},n.name=e,n.handler=r||n.handler,t(n)}function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2];"function"==typeof n&&(r=n,n={}),n=n||{},r=r||n.handler;var o=n.errorHandler,i=new s.a(function(t,i){n=n||{},n.name=e,n.once=!0,n.handler=function(e){if(t(e),r)return r(e)},n.errorHandler=function(e){if(i(e),o)return o(e)}}),a=t(n);return i.cancel=a.cancel,i}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{on:function(n,r){return o(n,e,r)}}}r.d(n,"a",function(){return o}),n.b=t,n.c=i,n.d=a;var u=r(1),s=r(2),c=r(4),f=r(5),d=r(0),l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}])});
//# sourceMappingURL=post-robot.ie.min.js.map

@@ -1,2 +0,2 @@

!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("postRobot",[],r):"object"==typeof exports?exports.postRobot=r():e.postRobot=r()}(this,function(){return function(e){function r(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var n={};return r.m=e,r.c=n,r.i=function(e){return e},r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r(r.s=26)}([function(e,r,n){"use strict";var t=n(22);n.d(r,"a",function(){return t.a});var o=n(11);n.d(r,"b",function(){return o.a}),n.d(r,"c",function(){return o.b})},function(e,r,n){"use strict";function t(e){var r=e.location;if(!r)throw new Error("Can not read window location");var n=r.protocol;if(!n)throw new Error("Can not read window protocol");if(n===A.FILE_PROTOCOL)return A.FILE_PROTOCOL+"//";var t=r.host;if(!t)throw new Error("Can not read window host");return n+"//"+t}function o(e){e=e||window;var r=t(e);return r&&e.mockDomain&&0===e.mockDomain.indexOf(A.MOCK_PROTOCOL)?e.mockDomain:r}function i(e){try{if(!e.location.href)return!0;if("about:blank"===e.location.href)return!0}catch(e){}return!1}function a(e){try{var r=Object.getOwnPropertyDescriptor(e,"location");if(r&&!1===r.enumerable)return!1}catch(e){}try{if(i(e))return!0;if(t(e)===t(window))return!0}catch(e){}return!1}function u(e){if(!a(e))return!1;try{if(i(e))return!0;if(o(window)===o(e))return!0}catch(e){}return!1}function c(e){if(e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){return}}function s(e){if(e&&!c(e))try{return e.opener}catch(e){return}}function f(e){var r=[];try{for(;e.parent!==e;)r.push(e.parent),e=e.parent}catch(e){}return r}function d(e,r){if(!e||!r)return!1;var n=c(r);return n?n===e:-1!==f(r).indexOf(e)}function l(e){var r=[],n=void 0;try{n=e.frames}catch(r){n=e}var t=void 0;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 w(e){for(var r=[],n=l(e),t=Array.isArray(n),o=0,n=t?n:n[Symbol.iterator]();;){var i;if(t){if(o>=n.length)break;i=n[o++]}else{if(o=n.next(),o.done)break;i=o.value}var a=i;r.push(a);for(var u=w(a),c=Array.isArray(u),s=0,u=c?u:u[Symbol.iterator]();;){var f;if(c){if(s>=u.length)break;f=u[s++]}else{if(s=u.next(),s.done)break;f=s.value}var d=f;r.push(d)}}return r}function h(e){if(e){try{if(e.top)return e.top}catch(e){}if(c(e)===e)return e;try{if(d(window,e)&&window.top)return window.top}catch(e){}try{if(d(e,window)&&window.top)return window.top}catch(e){}for(var r=w(e),n=Array.isArray(r),t=0,r=n?r:r[Symbol.iterator]();;){var o;if(n){if(t>=r.length)break;o=r[t++]}else{if(t=r.next(),t.done)break;o=t.value}var i=o;try{if(i.top)return i.top}catch(e){}if(c(i)===i)return i}}}function p(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var r=e.ownerDocument;return!(!r||!r.body||r.body.contains(e))}function v(e,r){for(var n=0;n<e.length;n++)try{if(e[n]===r)return n}catch(e){}return-1}function y(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];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!==P}if(r&&u(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}try{n.i(g.a)(e===e)}catch(e){return!0}var t=v(T,e);if(-1!==t){var o=R[t];if(o&&p(o))return!0}return!1}function m(e){e=e||window;var r=s(e);if(r)return r;var n=c(e);return n||void 0}function b(e,r){var n=m(r);if(n)return n===e;if(r===e)return!1;if(h(r)===r)return!1;for(var t=l(e),o=Array.isArray(t),i=0,t=o?t:t[Symbol.iterator]();;){var a;if(o){if(i>=t.length)break;a=t[i++]}else{if(i=t.next(),i.done)break;a=i.value}if(a===r)return!0}return!1}function E(){return Boolean(s(window))}function _(){return Boolean(c(window))}function S(e,r){if("string"==typeof e){if("string"==typeof r)return e===A.WILDCARD||r===e;if(n.i(g.b)(r))return!1;if(Array.isArray(r))return!1}return n.i(g.b)(e)?n.i(g.b)(r)?e.toString()===r.toString():!Array.isArray(r)&&Boolean(r.match(e)):!!Array.isArray(e)&&(Array.isArray(r)?JSON.stringify(e)===JSON.stringify(r):!n.i(g.b)(r)&&e.some(function(e){return S(e,r)}))}function O(e){try{if(e===window)return!0}catch(e){if(e&&e.message===P)return!0}try{if("[object Window]"===Object.prototype.toString.call(e))return!0}catch(e){if(e&&e.message===P)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===P)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===P)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===P)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===P)return!0}try{n.i(g.a)(e===e)}catch(e){return!0}try{n.i(g.a)(e&&e.__cross_domain_utils_window_check__)}catch(e){return!0}return!1}r.i=t,r.g=o,r.h=a,r.f=y,r.a=m,r.j=b,r.c=E,r.d=_,r.b=S,r.e=O;var g=n(17),A={MOCK_PROTOCOL:"mock:",FILE_PROTOCOL:"file:",WILDCARD:"*"},P="Call was rejected by callee.\r\n",T=[],R=[]},function(e,r,n){"use strict";var t=n(19);n.d(r,"a",function(){return t.a})},function(e,r,n){"use strict";n.d(r,"a",function(){return o});var t=n(0),o=window[t.b.WINDOW_PROPS.POSTROBOT]=window[t.b.WINDOW_PROPS.POSTROBOT]||{};o.registerSelf=function(){}},function(e,r,n){"use strict";var t=n(8);n.d(r,"c",function(){return t.a}),n.d(r,"d",function(){return t.f}),n.d(r,"e",function(){return t.d}),n.d(r,"h",function(){return t.c}),n.d(r,"i",function(){return t.b}),n.d(r,"j",function(){return t.h}),n.d(r,"l",function(){return t.i}),n.d(r,"m",function(){return t.j}),n.d(r,"n",function(){return t.e}),n.d(r,"o",function(){return t.k});var o=n(9);n.d(r,"g",function(){return o.a});var i=n(28);n.d(r,"b",function(){return i.a}),n.d(r,"f",function(){return i.b}),n.d(r,"k",function(){return i.c});var a=n(27);n.d(r,"a",function(){return a.a}),n.d(r,"p",function(){return a.b})},function(e,r,n){"use strict";var t=n(23);n.d(r,"a",function(){return t.a}),n.d(r,"b",function(){return t.b});var o=n(13);n.d(r,"e",function(){return o.a});var i=n(12);n.d(r,"c",function(){return i.e}),n.d(r,"d",function(){return i.f}),n.d(r,"f",function(){return i.g}),n.d(r,"g",function(){return i.d})},function(e,r,n){"use strict";function t(){a.a.initialized||(n.i(i.a)(),n.i(o.a)(),n.i(o.b)()),a.a.initialized=!0}Object.defineProperty(r,"__esModule",{value:!0}),r.init=t,n.d(r,"bridge",function(){return f});var o=n(4),i=n(5),a=n(3),u=n(21);n.d(r,"cleanUpWindow",function(){return u.a});var c=n(31);n.d(r,"parent",function(){return c.a}),n.d(r,"send",function(){return c.b}),n.d(r,"request",function(){return c.c}),n.d(r,"sendToParent",function(){return c.d}),n.d(r,"client",function(){return c.e}),n.d(r,"on",function(){return c.f}),n.d(r,"listen",function(){return c.g}),n.d(r,"once",function(){return c.h}),n.d(r,"listener",function(){return c.i}),n.d(r,"CONFIG",function(){return c.j}),n.d(r,"CONSTANTS",function(){return c.k}),n.d(r,"disable",function(){return c.l});var s=n(2);n.d(r,"Promise",function(){return s.a}),t();var f=null},function(e,r,n){"use strict";var t=n(10);n.d(r,"a",function(){return t.WeakMap})},function(e,r,n){"use strict";function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(r>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+Object.prototype.toString.call(e)+">";if("string"==typeof e)return e;if(e instanceof Error){var n=e&&e.stack,o=e&&e.message;if(n&&o)return-1!==n.indexOf(o)?n:o+"\n"+n;if(n)return n;if(o)return o}return"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}catch(e){return"Error while stringifying error: "+t(e,r+1)}}function o(){}function i(e,r,n){return e.addEventListener?e.addEventListener(r,n):e.attachEvent("on"+r,n),{cancel:function(){e.removeEventListener?e.removeEventListener(r,n):e.detachEvent("on"+r,n)}}}function a(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,function(){return e.charAt(Math.floor(Math.random()*e.length))})}function u(e,r){for(var n=0;n<e.length;n++)r(e[n],n)}function c(e,r){for(var n in e)e.hasOwnProperty(n)&&r(e[n],n)}function s(e,r){Array.isArray(e)?u(e,r):"object"===(void 0===e?"undefined":m(e))&&null!==e&&c(e,r)}function f(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(n>=100)throw new Error("Self-referential object passed, or object contained too many layers");var t=void 0;if("object"!==(void 0===e?"undefined":m(e))||null===e||Array.isArray(e)){if(!Array.isArray(e))throw new Error("Invalid type: "+(void 0===e?"undefined":m(e)));t=[]}else t={};return s(e,function(e,o){var i=r(e,o);void 0!==i?t[o]=i:"object"===(void 0===e?"undefined":m(e))&&null!==e?t[o]=f(e,r,n+1):t[o]=e}),t}function d(e,r){function n(){t=setTimeout(n,r),e.call()}var t=void 0;return t=setTimeout(n,r),{cancel:function(){clearTimeout(t)}}}function l(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function w(){return n.i(v.c)()?y.b.WINDOW_TYPES.POPUP:n.i(v.d)()?y.b.WINDOW_TYPES.IFRAME:y.b.WINDOW_TYPES.FULLPAGE}function h(e,r,n){var t=void 0,o=void 0;try{if("{}"!==JSON.stringify({})&&(t=Object.prototype.toJSON,delete Object.prototype.toJSON),"{}"!==JSON.stringify({}))throw new Error("Can not correctly serialize JSON objects");if("[]"!==JSON.stringify([])&&(o=Array.prototype.toJSON,delete Array.prototype.toJSON),"[]"!==JSON.stringify([]))throw new Error("Can not correctly serialize JSON objects")}catch(e){throw new Error("Can not repair JSON.stringify: "+e.message)}var i=JSON.stringify.call(this,e,r,n);try{t&&(Object.prototype.toJSON=t),o&&(Array.prototype.toJSON=o)}catch(e){throw new Error("Can not repair JSON.stringify: "+e.message)}return i}function p(e){return JSON.parse(e)}r.b=t,n.d(r,"e",function(){return b}),r.j=o,r.i=i,r.f=a,r.g=f,r.k=d,r.a=l,r.d=w,r.c=h,r.h=p;var v=(n(7),n(1)),y=n(0),m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b=function(e){if(!e)return e;var r=!1;return function(){if(!r)return r=!0,e.apply(this,arguments)}}},function(e,r,n){"use strict";n.d(r,"a",function(){return u});var t=n(8),o=n(0),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=["debug","info","warn","error"];Function.prototype.bind&&window.console&&"object"===i(console.log)&&["log","info","warn","error"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call);var u={clearLogs:function(){if(window.console&&window.console.clear&&window.console.clear(),o.a.LOG_TO_PAGE){var e=document.getElementById("postRobotLogs");e&&e.parentNode&&e.parentNode.removeChild(e)}},writeToPage:function(e,r){setTimeout(function(){var o=document.getElementById("postRobotLogs");o||(o=document.createElement("div"),o.id="postRobotLogs",o.style.cssText="width: 800px; font-family: monospace; white-space: pre-wrap;",document.body&&document.body.appendChild(o));var i=document.createElement("div"),a=(new Date).toString().split(" ")[4],u=Array.prototype.slice.call(r).map(function(e){if("string"==typeof e)return e;if(!e)return Object.prototype.toString.call(e);var r=void 0;try{r=n.i(t.c)(e,null,2)}catch(e){r="[object]"}return"\n\n"+r+"\n\n"}).join(" "),c=a+" "+e+" "+u;i.innerHTML=c;var s={log:"#ddd",warn:"orange",error:"red",info:"blue",debug:"#aaa"}[e];i.style.cssText="margin-top: 10px; color: "+s+";",o.childNodes.length?o.insertBefore(i,o.childNodes[0]):o.appendChild(i)})},logLevel:function(e,r){setTimeout(function(){try{var i=window.LOG_LEVEL||o.a.LOG_LEVEL;if(a.indexOf(e)<a.indexOf(i))return;if(r=Array.prototype.slice.call(r),r.unshift(""+window.location.host+window.location.pathname),r.unshift("::"),r.unshift(""+n.i(t.d)().toLowerCase()),r.unshift("[post-robot]"),o.a.LOG_TO_PAGE&&u.writeToPage(e,r),!window.console)return;if(window.console[e]||(e="log"),!window.console[e])return;window.console[e].apply(window.console,r)}catch(e){}},1)},debug:function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];u.logLevel("debug",r)},info:function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];u.logLevel("info",r)},warn:function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];u.logLevel("warn",r)},error:function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];u.logLevel("error",r)}}},function(e,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=n(16);n.d(r,"WeakMap",function(){return t.a})},function(e,r,n){"use strict";n.d(r,"a",function(){return t}),n.d(r,"b",function(){return o});var t={POST_MESSAGE_TYPE:{REQUEST:"postrobot_message_request",RESPONSE:"postrobot_message_response",ACK:"postrobot_message_ack"},POST_MESSAGE_ACK:{SUCCESS:"success",ERROR:"error"},POST_MESSAGE_NAMES:{METHOD:"postrobot_method",READY:"postrobot_ready",OPEN_TUNNEL:"postrobot_open_tunnel"},WINDOW_TYPES:{FULLPAGE:"fullpage",POPUP:"popup",IFRAME:"iframe"},WINDOW_PROPS:{POSTROBOT:"__postRobot__"},SERIALIZATION_TYPES:{METHOD:"postrobot_method",ERROR:"postrobot_error",PROMISE:"postrobot_promise",ZALGO_PROMISE:"postrobot_zalgo_promise",REGEX:"regex"},SEND_STRATEGIES:{POST_MESSAGE:"postrobot_post_message",BRIDGE:"postrobot_bridge",GLOBAL:"postrobot_global"},MOCK_PROTOCOL:"mock:",FILE_PROTOCOL:"file:",BRIDGE_NAME_PREFIX:"__postrobot_bridge__",POSTROBOT_PROXY:"__postrobot_proxy__",WILDCARD:"*"},o=Object.keys(t.POST_MESSAGE_NAMES).map(function(e){return t.POST_MESSAGE_NAMES[e]})},function(e,r,n){"use strict";function t(e,r){l.a.responseListeners[e]=r}function o(e){return l.a.responseListeners[e]}function i(e){delete l.a.responseListeners[e]}function a(e){l.a.erroredResponseListeners[e]=!0}function u(e){return Boolean(l.a.erroredResponseListeners[e])}function c(e){var r=e.name,t=e.win,o=e.domain;if(t===h.b.WILDCARD&&(t=null),o===h.b.WILDCARD&&(o=null),!r)throw new Error("Name required to get request listener");var i=l.a.requestListeners[r];if(i)for(var a=[t,l.a.WINDOW_WILDCARD],u=0;u<a.length;u++){var c=a[u],s=c&&i.get(c);if(s){if(o&&"string"==typeof o){if(s[o])return s[o];if(s[p])for(var f=s[p],w=Array.isArray(f),v=0,f=w?f:f[Symbol.iterator]();;){var y;if(w){if(v>=f.length)break;y=f[v++]}else{if(v=f.next(),v.done)break;y=v.value}var m=y,b=m.regex,E=m.listener;if(n.i(d.b)(b,o))return E}}if(s[h.b.WILDCARD])return s[h.b.WILDCARD]}}}function s(e,r){var t=e.name,o=e.win,i=e.domain;if(!t||"string"!=typeof t)throw new Error("Name required to add request listener");if(Array.isArray(o)){for(var a=[],u=o,d=Array.isArray(u),v=0,u=d?u:u[Symbol.iterator]();;){var y;if(d){if(v>=u.length)break;y=u[v++]}else{if(v=u.next(),v.done)break;y=v.value}var m=y;a.push(s({name:t,domain:i,win:m},r))}return{cancel:function(){for(var e=a,r=Array.isArray(e),n=0,e=r?e:e[Symbol.iterator]();;){var t;if(r){if(n>=e.length)break;t=e[n++]}else{if(n=e.next(),n.done)break;t=n.value}t.cancel()}}}}if(Array.isArray(i)){for(var b=[],E=i,_=Array.isArray(E),S=0,E=_?E:E[Symbol.iterator]();;){var O;if(_){if(S>=E.length)break;O=E[S++]}else{if(S=E.next(),S.done)break;O=S.value}var g=O;b.push(s({name:t,win:o,domain:g},r))}return{cancel:function(){for(var e=b,r=Array.isArray(e),n=0,e=r?e:e[Symbol.iterator]();;){var t;if(r){if(n>=e.length)break;t=e[n++]}else{if(n=e.next(),n.done)break;t=n.value}t.cancel()}}}}var A=c({name:t,win:o,domain:i});if(o&&o!==h.b.WILDCARD||(o=l.a.WINDOW_WILDCARD),i=i||h.b.WILDCARD,A)throw o&&i?new Error("Request listener already exists for "+t+" on domain "+i.toString()+" for "+(o===l.a.WINDOW_WILDCARD?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+t+" for "+(o===l.a.WINDOW_WILDCARD?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+t+" on domain "+i.toString()):new Error("Request listener already exists for "+t);var P=l.a.requestListeners,T=P[t];T||(T=new f.a,P[t]=T);var R=T.get(o);R||(R={},T.set(o,R));var L=i.toString(),I=R[p],k=void 0;return n.i(w.c)(i)?(I||(I=[],R[p]=I),k={regex:i,listener:r},I.push(k)):R[L]=r,{cancel:function(){R&&(delete R[L],o&&0===Object.keys(R).length&&T.delete(o),k&&I.splice(I.indexOf(k,1)))}}}r.f=t,r.b=o,r.d=i,r.g=a,r.a=u,r.c=c,r.e=s;var f=(n(2),n(7)),d=n(1),l=n(3),w=n(4),h=n(0);l.a.responseListeners=l.a.responseListeners||{},l.a.requestListeners=l.a.requestListeners||{},l.a.WINDOW_WILDCARD=l.a.WINDOW_WILDCARD||new function(){},l.a.erroredResponseListeners=l.a.erroredResponseListeners||{};var p="__domain_regex__"},function(e,r,n){"use strict";function t(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function o(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.i(s.d)(),i=n.i(s.e)(),u=n.i(a.g)(window);return d({},r,t,{sourceDomain:u,id:r.id||o,windowType:i})}function i(e,r,i){return u.a.try(function(){r=o(e,r,{data:n.i(s.f)(e,i,r.data),domain:i});var d=void 0;if(d=-1!==c.c.indexOf(r.name)||r.type===c.b.POST_MESSAGE_TYPE.ACK?"debug":"error"===r.ack?"error":"info",s.g.logLevel(d,["\n\n\t","#send",r.type.replace(/^postrobot_message_/,""),"::",r.name,"::",i||c.b.WILDCARD,"\n\n",r]),e===window&&!c.a.ALLOW_SAME_ORIGIN)throw new Error("Attemping to send message to self");if(n.i(a.f)(e))throw new Error("Window is closed");s.g.debug("Running send message strategies",r);var l=[],w=n.i(s.h)(t({},c.b.WINDOW_PROPS.POSTROBOT,r),null,2);return u.a.map(Object.keys(f.a),function(r){return u.a.try(function(){if(!c.a.ALLOWED_POST_MESSAGE_METHODS[r])throw new Error("Strategy disallowed: "+r);return f.a[r](e,w,i)}).then(function(){return l.push(r+": success"),!0},function(e){return l.push(r+": "+n.i(s.i)(e)+"\n"),!1})}).then(function(e){var n=e.some(Boolean),t=r.type+" "+r.name+" "+(n?"success":"error")+":\n - "+l.join("\n - ")+"\n";if(s.g.debug(t),!n)throw new Error(t)})})}r.a=i;var a=n(1),u=n(2),c=n(0),s=n(4),f=n(25),d=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e}},function(e,r,n){"use strict";function t(){if(!window.WeakMap)return!1;if(!window.Object.freeze)return!1;try{var e=new window.WeakMap,r={};return window.Object.freeze(r),e.set(r,"__testvalue__"),"__testvalue__"===e.get(r)}catch(e){return!1}}r.a=t},function(e,r,n){"use strict";function t(e,r){for(var n=0;n<e.length;n++)try{if(e[n]===r)return n}catch(e){}return-1}function o(){}r.b=t,r.a=o},function(e,r,n){"use strict";function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}n.d(r,"a",function(){return f});var o=n(1),i=n(14),a=n(15),u=function(){function e(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(r,n,t){return n&&e(r.prototype,n),t&&e(r,t),r}}(),c=Object.defineProperty,s=Date.now()%1e9,f=function(){function e(){if(t(this,e),s+=1,this.name="__weakmap_"+(1e9*Math.random()>>>0)+"__"+s,n.i(i.a)())try{this.weakmap=new window.WeakMap}catch(e){}this.keys=[],this.values=[]}return u(e,[{key:"_cleanupClosedWindows",value:function(){for(var e=this.weakmap,r=this.keys,t=0;t<r.length;t++){var i=r[t];if(n.i(o.e)(i)&&n.i(o.f)(i)){if(e)try{e.delete(i)}catch(e){}r.splice(t,1),this.values.splice(t,1),t-=1}}}},{key:"isSafeToReadWrite",value:function(e){if(n.i(o.e)(e))return!1;try{n.i(a.a)(e&&e.self),n.i(a.a)(e&&e[this.name])}catch(e){return!1}return!0}},{key:"set",value:function(e,r){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.set(e,r)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e)){var o=this.name,i=e[o];i&&i[0]===e?i[1]=r:c(e,o,{value:[e,r],writable:!0})}else{this._cleanupClosedWindows();var u=this.keys,s=this.values,f=n.i(a.b)(u,e);-1===f?(u.push(e),s.push(r)):s[f]=r}}},{key:"get",value:function(e){if(!e)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{if(r.has(e))return r.get(e)}catch(e){delete this.weakmap}if(!this.isSafeToReadWrite(e)){this._cleanupClosedWindows();var t=this.keys,o=n.i(a.b)(t,e);if(-1===o)return;return this.values[o]}var i=e[this.name];if(i&&i[0]===e)return i[1]}},{key:"delete",value:function(e){if(!e)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{r.delete(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e)){var t=e[this.name];t&&t[0]===e&&(t[0]=t[1]=void 0)}else{this._cleanupClosedWindows();var o=this.keys,i=n.i(a.b)(o,e);-1!==i&&(o.splice(i,1),this.values.splice(i,1))}}},{key:"has",value:function(e){if(!e)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{return r.has(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e)){var t=e[this.name];return!(!t||t[0]!==e)}return this._cleanupClosedWindows(),-1!==n.i(a.b)(this.keys,e)}}]),e}()},function(e,r,n){"use strict";function t(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function o(){}r.b=t,r.a=o},function(e,r,n){"use strict";function t(e){if(-1===a.indexOf(e)){a.push(e),setTimeout(function(){throw e},1);for(var r=0;r<i.length;r++)i[r](e)}}function o(e){return i.push(e),{cancel:function(){i.splice(i.indexOf(e),1)}}}r.a=t,r.b=o;var i=[],a=[]},function(e,r,n){"use strict";function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}n.d(r,"a",function(){return c});var o=n(20),i=n(18),a=function(){function e(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(r,n,t){return n&&e(r.prototype,n),t&&e(r,t),r}}(),u=window.__zalgopromise__=window.__zalgopromise__||{flushPromises:[],activeCount:0},c=function(){function e(r){var n=this;if(t(this,e),this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],r){var o=void 0,i=void 0,a=!1,u=!1,c=!1;try{r(function(e){c?n.resolve(e):(a=!0,o=e)},function(e){c?n.reject(e):(u=!0,i=e)})}catch(e){return void this.reject(e)}c=!0,a?this.resolve(o):u&&this.reject(i)}}return a(e,[{key:"resolve",value:function(e){if(this.resolved||this.rejected)return this;if(n.i(o.a)(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this}},{key:"reject",value:function(e){var r=this;if(this.resolved||this.rejected)return this;if(n.i(o.a)(e))throw new Error("Can not reject promise with another promise");if(!e){var t=e&&"function"==typeof e.toString?e.toString():Object.prototype.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(){r.errorHandled||n.i(i.a)(e)},1),this.dispatch(),this}},{key:"asyncReject",value:function(e){this.errorHandled=!0,this.reject(e)}},{key:"dispatch",value:function(){var r=this,t=this.dispatching,i=this.resolved,a=this.rejected,c=this.handlers;if(!t&&(i||a)){this.dispatching=!0,u.activeCount+=1;for(var s=0;s<c.length;s++){(function(t){var u=c[t],s=u.onSuccess,f=u.onError,d=u.promise,l=void 0;if(i)try{l=s?s(r.value):r.value}catch(e){return d.reject(e),"continue"}else if(a){if(!f)return d.reject(r.error),"continue";try{l=f(r.error)}catch(e){return d.reject(e),"continue"}}l instanceof e&&(l.resolved||l.rejected)?(l.resolved?d.resolve(l.value):d.reject(l.error),l.errorHandled=!0):n.i(o.a)(l)?l instanceof e&&(l.resolved||l.rejected)?l.resolved?d.resolve(l.value):d.reject(l.error):l.then(function(e){d.resolve(e)},function(e){d.reject(e)}):d.resolve(l)})(s)}c.length=0,this.dispatching=!1,u.activeCount-=1,0===u.activeCount&&e.flushQueue()}}},{key:"then",value:function(r,n){if(r&&"function"!=typeof r&&!r.call)throw new Error("Promise.then expected a function for success handler");if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for error handler");var t=new e;return this.handlers.push({promise:t,onSuccess:r,onError:n}),this.errorHandled=!0,this.dispatch(),t}},{key:"catch",value:function(e){return this.then(void 0,e)}},{key:"finally",value:function(r){return this.then(function(n){return e.try(r).then(function(){return n})},function(n){return e.try(r).then(function(){throw n})})}},{key:"timeout",value:function(e,r){var n=this;if(this.resolved||this.rejected)return this;var t=setTimeout(function(){n.resolved||n.rejected||n.reject(r||new Error("Promise timed out after "+e+"ms"))},e);return this.then(function(e){return clearTimeout(t),e})}},{key:"toPromise",value:function(){if(!window.Promise)throw new Error("Could not find window.Promise");return window.Promise.resolve(this)}}],[{key:"resolve",value:function(r){return r instanceof e?r:n.i(o.a)(r)?new e(function(e,n){return r.then(e,n)}):(new e).resolve(r)}},{key:"reject",value:function(r){return(new e).reject(r)}},{key:"all",value:function(r){var t=new e,i=r.length,a=[];if(!i)return t.resolve(a),t;for(var u=0;u<r.length;u++){(function(u){var c=r[u];if(c instanceof e){if(c.resolved)return a[u]=c.value,i-=1,"continue"}else if(!n.i(o.a)(c))return a[u]=c,i-=1,"continue";e.resolve(c).then(function(e){a[u]=e,0===(i-=1)&&t.resolve(a)},function(e){t.reject(e)})})(u)}return 0===i&&t.resolve(a),t}},{key:"hash",value:function(r){var n={};return e.all(Object.keys(r).map(function(t){return e.resolve(r[t]).then(function(e){n[t]=e})})).then(function(){return n})}},{key:"map",value:function(r,n){return e.all(r.map(n))}},{key:"onPossiblyUnhandledException",value:function(e){return n.i(i.b)(e)}},{key:"try",value:function(r,n,t){var o=void 0;try{o=r.apply(n,t||[])}catch(r){return e.reject(r)}return e.resolve(o)}},{key:"delay",value:function(r){return new e(function(e){setTimeout(e,r)})}},{key:"isPromise",value:function(r){return!!(r&&r instanceof e)||n.i(o.a)(r)}},{key:"flush",value:function(){var r=new e;return u.flushPromises.push(r),0===u.activeCount&&e.flushQueue(),r}},{key:"flushQueue",value:function(){var e=u.flushPromises;u.flushPromises=[];for(var r=e,n=Array.isArray(r),t=0,r=n?r:r[Symbol.iterator]();;){var o;if(n){if(t>=r.length)break;o=r[t++]}else{if(t=r.next(),t.done)break;o=t.value}o.resolve()}}}]),e}()},function(e,r,n){"use strict";function t(e){try{if(!e)return!1;if(window.Promise&&e instanceof window.Promise)return!0;if(window.Window&&e instanceof window.Window)return!1;if(window.constructor&&e instanceof window.constructor)return!1;if(o){var r=o.call(e);if("[object Window]"===r||"[object global]"===r||"[object DOMWindow]"===r)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}r.a=t;var o={}.toString},function(e,r,n){"use strict";function t(e){var r=o.a.requestPromises.get(e);if(r)for(var n=r,t=Array.isArray(n),i=0,n=t?n:n[Symbol.iterator]();;){var a;if(t){if(i>=n.length)break;a=n[i++]}else{if(i=n.next(),i.done)break;a=i.value}var u=a;u.reject(new Error("No response from window - cleaned up"))}o.a.popupWindowsByWin&&o.a.popupWindowsByWin.delete(e),o.a.remoteWindows&&o.a.remoteWindows.delete(e),o.a.requestPromises.delete(e),o.a.methods.delete(e),o.a.readyPromises.delete(e)}r.a=t;var o=n(3)},function(e,r,n){"use strict";function t(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}n.d(r,"a",function(){return a});var o,i=n(11),a={ALLOW_POSTMESSAGE_POPUP:!("__ALLOW_POSTMESSAGE_POPUP__"in window)||window.__ALLOW_POSTMESSAGE_POPUP__,LOG_LEVEL:"info",BRIDGE_TIMEOUT:5e3,ACK_TIMEOUT:-1!==window.navigator.userAgent.match(/MSIE/i)?2e3:1e3,RES_TIMEOUT:1/0,LOG_TO_PAGE:!1,ALLOWED_POST_MESSAGE_METHODS:(o={},t(o,i.a.SEND_STRATEGIES.POST_MESSAGE,!0),t(o,i.a.SEND_STRATEGIES.BRIDGE,!0),t(o,i.a.SEND_STRATEGIES.GLOBAL,!0),o),ALLOW_SAME_ORIGIN:!1};0===window.location.href.indexOf(i.a.FILE_PROTOCOL)&&(a.ALLOW_POSTMESSAGE_POPUP=!0)},function(e,r,n){"use strict";function t(e){var r=void 0;try{r=n.i(s.j)(e)}catch(e){return}if(r&&"object"===(void 0===r?"undefined":l(r))&&null!==r&&(r=r[c.b.WINDOW_PROPS.POSTROBOT])&&"object"===(void 0===r?"undefined":l(r))&&null!==r&&r.type&&"string"==typeof r.type&&d.a[r.type])return r}function o(e){if(!window||window.closed)throw new Error("Message recieved in closed window");try{if(!e.source)return}catch(e){return}var r=e.source,o=e.origin,i=e.data,a=t(i);if(a){if(!a.sourceDomain||"string"!=typeof a.sourceDomain)throw new Error("Expected message to have sourceDomain");if(0!==a.sourceDomain.indexOf(c.b.MOCK_PROTOCOL)&&0!==a.sourceDomain.indexOf(c.b.FILE_PROTOCOL)||(o=a.sourceDomain),-1===f.a.receivedMessages.indexOf(a.id)){f.a.receivedMessages.push(a.id);var l=void 0;if(l=-1!==c.c.indexOf(a.name)||a.type===c.b.POST_MESSAGE_TYPE.ACK?"debug":"error"===a.ack?"error":"info",s.g.logLevel(l,["\n\n\t","#receive",a.type.replace(/^postrobot_message_/,""),"::",a.name,"::",o,"\n\n",a]),n.i(u.f)(r))return void s.g.debug("Source window is closed - can not send "+a.type+" "+a.name);a.data&&(a.data=n.i(s.k)(r,o,a.data)),d.a[a.type](r,o,a)}}}function i(e){try{e.source}catch(e){return}var r={source:e.source||e.sourceElement,origin:e.origin||e.originalEvent&&e.originalEvent.origin,data:e.data};o(r)}function a(){n.i(s.l)(window,"message",i)}r.b=i,r.a=a;var u=n(1),c=n(0),s=n(4),f=n(3),d=n(24),l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};f.a.receivedMessages=f.a.receivedMessages||[]},function(e,r,n){"use strict";function t(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}n.d(r,"a",function(){return l});var o,i=n(2),a=n(1),u=n(0),c=n(4),s=n(13),f=n(12),d=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},l=(o={},t(o,u.b.POST_MESSAGE_TYPE.ACK,function(e,r,t){if(!n.i(f.a)(t.hash)){var o=n.i(f.b)(t.hash);if(!o)throw new Error("No handler found for post message ack for message: "+t.name+" from "+r+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!n.i(a.b)(o.domain,r))throw new Error("Ack origin "+r+" does not match domain "+o.domain.toString());o.ack=!0}}),t(o,u.b.POST_MESSAGE_TYPE.REQUEST,function(e,r,t){function o(o){return t.fireAndForget||n.i(a.f)(e)?i.a.resolve():n.i(s.a)(e,d({target:t.originalSource,hash:t.hash,name:t.name},o),r)}var l=n.i(f.c)({name:t.name,win:e,domain:r});return i.a.all([o({type:u.b.POST_MESSAGE_TYPE.ACK}),i.a.try(function(){if(!l)throw new Error("No handler found for post message: "+t.name+" from "+r+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!n.i(a.b)(l.domain,r))throw new Error("Request origin "+r+" does not match domain "+l.domain.toString());var o=t.data;return l.handler({source:e,origin:r,data:o})}).then(function(e){return o({type:u.b.POST_MESSAGE_TYPE.RESPONSE,ack:u.b.POST_MESSAGE_ACK.SUCCESS,data:e})},function(e){var r=n.i(c.i)(e).replace(/^Error: /,"");return o({type:u.b.POST_MESSAGE_TYPE.RESPONSE,ack:u.b.POST_MESSAGE_ACK.ERROR,error:r})})]).then(c.m).catch(function(e){if(l&&l.handleError)return l.handleError(e);c.g.error(n.i(c.i)(e))})}),t(o,u.b.POST_MESSAGE_TYPE.RESPONSE,function(e,r,t){if(!n.i(f.a)(t.hash)){var o=n.i(f.b)(t.hash);if(!o)throw new Error("No handler found for post message response for message: "+t.name+" from "+r+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!n.i(a.b)(o.domain,r))throw new Error("Response origin "+r+" does not match domain "+o.domain);if(n.i(f.d)(t.hash),t.ack===u.b.POST_MESSAGE_ACK.ERROR)return o.respond(new Error(t.error),null);if(t.ack===u.b.POST_MESSAGE_ACK.SUCCESS){var i=t.data||t.response;return o.respond(null,{source:e,origin:r,data:i})}}}),o)},function(e,r,n){"use strict";n.d(r,"a",function(){return i});var t=n(1),o=n(0),i={};i[o.b.SEND_STRATEGIES.POST_MESSAGE]=function(e,r,i){var a=void 0;a=Array.isArray(i)?i:i?[i]:[o.b.WILDCARD],a=a.map(function(r){if(0===r.indexOf(o.b.MOCK_PROTOCOL)){if(window.location.protocol===o.b.FILE_PROTOCOL)return o.b.WILDCARD;if(!n.i(t.h)(e))throw new Error("Attempting to send messsage to mock domain "+r+", but window is actually cross-domain");return n.i(t.i)(e)}return 0===r.indexOf(o.b.FILE_PROTOCOL)?o.b.WILDCARD:r}),a.forEach(function(n){return e.postMessage(r,n)})}},function(e,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=n(6);n.d(r,"cleanUpWindow",function(){return t.cleanUpWindow}),n.d(r,"init",function(){return t.init}),n.d(r,"bridge",function(){return t.bridge}),n.d(r,"Promise",function(){return t.Promise}),n.d(r,"parent",function(){return t.parent}),n.d(r,"send",function(){return t.send}),n.d(r,"request",function(){return t.request}),n.d(r,"sendToParent",function(){return t.sendToParent}),n.d(r,"client",function(){return t.client}),n.d(r,"on",function(){return t.on}),n.d(r,"listen",function(){return t.listen}),n.d(r,"once",function(){return t.once}),n.d(r,"listener",function(){return t.listener}),n.d(r,"CONFIG",function(){return t.CONFIG}),n.d(r,"CONSTANTS",function(){return t.CONSTANTS}),n.d(r,"disable",function(){return t.disable}),r.default=t},function(e,r,n){"use strict";function t(){n.i(s.on)(c.b.POST_MESSAGE_NAMES.READY,{domain:c.b.WILDCARD},function(e){var r=e.source,n=d.a.readyPromises.get(r);n?n.resolve(e):(n=(new u.a).resolve(e),d.a.readyPromises.set(r,n))});var e=n.i(a.a)();e&&n.i(s.send)(e,c.b.POST_MESSAGE_NAMES.READY,{},{domain:c.b.WILDCARD,timeout:1/0}).catch(function(e){f.a.debug(n.i(l.b)(e))})}function o(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Window",t=d.a.readyPromises.get(e);return t||(t=new u.a,d.a.readyPromises.set(e,t),setTimeout(function(){return t.reject(new Error(n+" did not load after "+r+"ms"))},r),t)}r.a=t,r.b=o;var i=n(7),a=n(1),u=n(2),c=n(0),s=n(6),f=n(9),d=n(3),l=n(8);d.a.readyPromises=d.a.readyPromises||new i.a},function(e,r,n){"use strict";function t(e,r){return"object"===(void 0===e?"undefined":g(e))&&null!==e&&e.__type__===r}function o(e,r,t,o){var i=n.i(E.f)(),a=O.a.methods.get(e);return a||(a={},O.a.methods.set(e,a)),a[i]={domain:r,method:t},{__type__:b.b.SERIALIZATION_TYPES.METHOD,__id__:i,__name__:o}}function i(e){return{__type__:b.b.SERIALIZATION_TYPES.ERROR,__message__:n.i(E.b)(e)}}function a(e,r,n,t){return{__type__:b.b.SERIALIZATION_TYPES.PROMISE,__then__:o(e,r,function(e,r){return n.then(e,r)},t+".then")}}function u(e,r,n,t){return{__type__:b.b.SERIALIZATION_TYPES.ZALGO_PROMISE,__then__:o(e,r,function(e,r){return n.then(e,r)},t+".then")}}function c(e){return{__type__:b.b.SERIALIZATION_TYPES.REGEX,__source__:e.source}}function s(e,r,t){return n.i(E.g)({obj:t},function(t,s){return"function"==typeof t?o(e,r,t,s.toString()):t instanceof Error?i(t):window.Promise&&t instanceof window.Promise?a(e,r,t,s.toString()):m.a.isPromise(t)?u(e,r,t,s.toString()):n.i(E.a)(t)?c(t):void 0}).obj}function f(e,r,t){function o(){var o=Array.prototype.slice.call(arguments);return S.a.debug("Call foreign method",t.__name__,o),n.i(_.send)(e,b.b.POST_MESSAGE_NAMES.METHOD,{id:t.__id__,name:t.__name__,args:o},{domain:r,timeout:1/0}).then(function(e){var r=e.data;return S.a.debug("Got foreign method result",t.__name__,r.result),r.result},function(e){throw S.a.debug("Got foreign method error",n.i(E.b)(e)),e})}return o.__name__=t.__name__,o.__xdomain__=!0,o.source=e,o.origin=r,o}function d(e,r,n){return new Error(n.__message__)}function l(e,r,n){return new m.a(function(t,o){return f(e,r,n.__then__)(t,o)})}function w(e,r,n){return window.Promise?new window.Promise(function(t,o){return f(e,r,n.__then__)(t,o)}):l(e,r,n)}function h(e,r,n){return new RegExp(n.__source__)}function p(e,r,o){return n.i(E.g)({obj:o},function(n,o){if("object"===(void 0===n?"undefined":g(n))&&null!==n)return t(n,b.b.SERIALIZATION_TYPES.METHOD)?f(e,r,n):t(n,b.b.SERIALIZATION_TYPES.ERROR)?d(e,r,n):t(n,b.b.SERIALIZATION_TYPES.PROMISE)?w(e,r,n):t(n,b.b.SERIALIZATION_TYPES.ZALGO_PROMISE)?l(e,r,n):t(n,b.b.SERIALIZATION_TYPES.REGEX)?h(e,r,n):void 0}).obj}n.d(r,"a",function(){return A}),r.b=s,r.c=p;var v=n(7),y=n(1),m=n(2),b=n(0),E=n(8),_=n(6),S=n(9),O=n(3),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};O.a.methods=O.a.methods||new v.a;var A=n.i(E.e)(function(){n.i(_.on)(b.b.POST_MESSAGE_NAMES.METHOD,{origin:b.b.WILDCARD},function(e){var r=e.source,t=e.origin,o=e.data,i=O.a.methods.get(r);if(!i)throw new Error("Could not find any methods this window has privileges to call");var a=i[o.id];if(!a)throw new Error("Could not find method with id: "+o.id);if(!n.i(y.b)(a.domain,t))throw new Error("Method domain "+a.domain+" does not match origin "+t);return S.a.debug("Call local method",o.name,o.args),m.a.try(function(){return a.method.apply({source:r,origin:t,data:o},o.args)}).then(function(e){return{result:e,id:o.id,name:o.name}})})})},function(e,r,n){"use strict";function t(e){return c.a.try(function(){if(!e.name)throw new Error("Expected options.name");var r=e.name,t=void 0,o=void 0;if("string"==typeof e.window){var i=document.getElementById(e.window);if(!i)throw new Error("Expected options.window "+Object.prototype.toString.call(e.window)+" to be a valid element id");if("iframe"!==i.tagName.toLowerCase())throw new Error("Expected options.window "+Object.prototype.toString.call(e.window)+" to be an iframe");if(!i.contentWindow)throw new Error("Iframe must have contentWindow. Make sure it has a src attribute and is in the DOM.");t=i.contentWindow}else if(e.window instanceof HTMLIFrameElement){if("iframe"!==e.window.tagName.toLowerCase())throw new Error("Expected options.window "+Object.prototype.toString.call(e.window)+" to be an iframe");if(e.window&&!e.window.contentWindow)throw new Error("Iframe must have contentWindow. Make sure it has a src attribute and is in the DOM.");e.window&&e.window.contentWindow&&(t=e.window.contentWindow)}else t=e.window;if(!t)throw new Error("Expected options.window to be a window object, iframe, or iframe element id.");var a=t;o=e.domain||f.b.WILDCARD;var u=e.name+"_"+n.i(l.d)();if(n.i(s.f)(a))throw new Error("Target window is closed");var h=!1,p=w.a.requestPromises.get(a);p||(p=[],w.a.requestPromises.set(a,p));var v=c.a.try(function(){if(n.i(s.j)(window,a))return c.a.resolve(n.i(l.p)(a))}).then(function(){return new c.a(function(t,i){var c=void 0;if(e.fireAndForget||(c={name:r,window:a,domain:o,respond:function(e,r){e||(h=!0,p.splice(p.indexOf(v,1))),e?i(e):t(r)}},n.i(d.d)(u,c)),n.i(d.e)(a,{type:f.b.POST_MESSAGE_TYPE.REQUEST,hash:u,name:r,data:e.data,fireAndForget:e.fireAndForget},o).catch(i),e.fireAndForget)return t();var l=f.a.ACK_TIMEOUT,w=e.timeout||f.a.RES_TIMEOUT,y=100,m=function t(){if(!h){if(n.i(s.f)(a))return i(c.ack?new Error("Window closed for "+r+" before response"):new Error("Window closed for "+r+" before ack"));l-=y,w-=y;if(c.ack){if(w===1/0)return;y=Math.min(w,2e3)}else{if(l<=0)return i(new Error("No ack for postMessage "+r+" in "+n.i(s.g)()+" in "+f.a.ACK_TIMEOUT+"ms"));if(w<=0)return i(new Error("No response for postMessage "+r+" in "+n.i(s.g)()+" in "+(e.timeout||f.a.RES_TIMEOUT)+"ms"))}setTimeout(t,y)}};setTimeout(m,y)})});return v.catch(function(){n.i(d.f)(u),n.i(d.g)(u)}),p.push(v),v})}function o(e,r,n,o){return o=o||{},o.window=e,o.name=r,o.data=n,t(o)}function i(e,r,t){var i=n.i(s.a)();return i?o(i,e,r,t):new c.a(function(e,r){return r(new Error("Window does not have a parent"))})}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.window)throw new Error("Expected options.window");var r=e.window;return{send:function(n,t){return o(r,n,t,e)}}}n.d(r,"a",function(){return o}),r.b=t,r.c=i,r.d=a;var u=n(7),c=n(2),s=n(1),f=n(0),d=n(5),l=n(4),w=n(3);w.a.requestPromises=w.a.requestPromises||new u.a},function(e,r,n){"use strict";function t(){delete window[o.b.WINDOW_PROPS.POSTROBOT],window.removeEventListener("message",i.b)}r.c=t;var o=n(0),i=n(5);n.d(r,"a",function(){return o.a}),n.d(r,"b",function(){return o.b})},function(e,r,n){"use strict";n.d(r,"a",function(){return u});var t=n(1),o=n(29);n.d(r,"b",function(){return o.a}),n.d(r,"c",function(){return o.b}),n.d(r,"d",function(){return o.c}),n.d(r,"e",function(){return o.d});var i=n(32);n.d(r,"f",function(){return i.a}),n.d(r,"g",function(){return i.b}),n.d(r,"h",function(){return i.c}),n.d(r,"i",function(){return i.d});var a=n(30);n.d(r,"j",function(){return a.a}),n.d(r,"k",function(){return a.b}),n.d(r,"l",function(){return a.c});var u=n.i(t.a)()},function(e,r,n){"use strict";function t(e){if(!e.name)throw new Error("Expected options.name");if(!e.handler)throw new Error("Expected options.handler");var r=e.name,t=e.window,o=e.domain,i={handler:e.handler,handleError:e.errorHandler||function(e){throw e},window:t,domain:o||d.b.WILDCARD,name:r},a=n.i(f.c)({name:r,win:t,domain:o},i);if(e.once){var c=i.handler;i.handler=n.i(s.n)(function(){return a.cancel(),c.apply(this,arguments)})}if(i.window&&e.errorOnClose)var w=n.i(s.o)(function(){t&&"object"===(void 0===t?"undefined":l(t))&&n.i(u.f)(t)&&(w.cancel(),i.handleError(new Error("Post message target window is closed")))},50);return{cancel:function(){a.cancel()}}}function o(e,r,n){return"function"==typeof r&&(n=r,r={}),r=r||{},r.name=e,r.handler=n||r.handler,t(r)}function i(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"function"==typeof r&&(n=r,r={}),r=r||{},n=n||r.handler;var o=r.errorHandler,i=new c.a(function(t,i){r=r||{},r.name=e,r.once=!0,r.handler=function(e){if(t(e),n)return n(e)},r.errorHandler=function(e){if(i(e),o)return o(e)}}),a=t(r);return i.cancel=a.cancel,i}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{on:function(r,n){return o(r,e,n)}}}n.d(r,"a",function(){return o}),r.b=t,r.c=i,r.d=a;var u=n(1),c=n(2),s=n(4),f=n(5),d=n(0),l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}])});
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("postRobot",[],r):"object"==typeof exports?exports.postRobot=r():e.postRobot=r()}(this,function(){return function(e){function r(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var n={};return r.m=e,r.c=n,r.i=function(e){return e},r.d=function(e,n,t){r.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:t})},r.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(n,"a",n),n},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r(r.s=26)}([function(e,r,n){"use strict";var t=n(22);n.d(r,"a",function(){return t.a});var o=n(11);n.d(r,"b",function(){return o.a}),n.d(r,"c",function(){return o.b})},function(e,r,n){"use strict";function t(e){var r=e.location;if(!r)throw new Error("Can not read window location");var n=r.protocol;if(!n)throw new Error("Can not read window protocol");if(n===A.FILE_PROTOCOL)return A.FILE_PROTOCOL+"//";var t=r.host;if(!t)throw new Error("Can not read window host");return n+"//"+t}function o(e){e=e||window;var r=t(e);return r&&e.mockDomain&&0===e.mockDomain.indexOf(A.MOCK_PROTOCOL)?e.mockDomain:r}function i(e){try{if(!e.location.href)return!0;if("about:blank"===e.location.href)return!0}catch(e){}return!1}function a(e){try{var r=Object.getOwnPropertyDescriptor(e,"location");if(r&&!1===r.enumerable)return!1}catch(e){}try{if(i(e))return!0;if(t(e)===t(window))return!0}catch(e){}return!1}function u(e){if(!a(e))return!1;try{if(i(e))return!0;if(o(window)===o(e))return!0}catch(e){}return!1}function c(e){if(e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){return}}function s(e){if(e&&!c(e))try{return e.opener}catch(e){return}}function f(e){var r=[];try{for(;e.parent!==e;)r.push(e.parent),e=e.parent}catch(e){}return r}function d(e,r){if(!e||!r)return!1;var n=c(r);return n?n===e:-1!==f(r).indexOf(e)}function l(e){var r=[],n=void 0;try{n=e.frames}catch(r){n=e}var t=void 0;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 w(e){for(var r=[],n=l(e),t=Array.isArray(n),o=0,n=t?n:n[Symbol.iterator]();;){var i;if(t){if(o>=n.length)break;i=n[o++]}else{if(o=n.next(),o.done)break;i=o.value}var a=i;r.push(a);for(var u=w(a),c=Array.isArray(u),s=0,u=c?u:u[Symbol.iterator]();;){var f;if(c){if(s>=u.length)break;f=u[s++]}else{if(s=u.next(),s.done)break;f=s.value}var d=f;r.push(d)}}return r}function h(e){if(e){try{if(e.top)return e.top}catch(e){}if(c(e)===e)return e;try{if(d(window,e)&&window.top)return window.top}catch(e){}try{if(d(e,window)&&window.top)return window.top}catch(e){}for(var r=w(e),n=Array.isArray(r),t=0,r=n?r:r[Symbol.iterator]();;){var o;if(n){if(t>=r.length)break;o=r[t++]}else{if(t=r.next(),t.done)break;o=t.value}var i=o;try{if(i.top)return i.top}catch(e){}if(c(i)===i)return i}}}function p(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var r=e.ownerDocument;return!(!r||!r.body||r.body.contains(e))}function v(e,r){for(var n=0;n<e.length;n++)try{if(e[n]===r)return n}catch(e){}return-1}function y(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];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!==P}if(r&&u(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}try{n.i(g.a)(e===e)}catch(e){return!0}var t=v(T,e);if(-1!==t){var o=R[t];if(o&&p(o))return!0}return!1}function m(e){e=e||window;var r=s(e);if(r)return r;var n=c(e);return n||void 0}function b(e,r){var n=m(r);if(n)return n===e;if(r===e)return!1;if(h(r)===r)return!1;for(var t=l(e),o=Array.isArray(t),i=0,t=o?t:t[Symbol.iterator]();;){var a;if(o){if(i>=t.length)break;a=t[i++]}else{if(i=t.next(),i.done)break;a=i.value}if(a===r)return!0}return!1}function _(){return Boolean(s(window))}function E(){return Boolean(c(window))}function S(e,r){if("string"==typeof e){if("string"==typeof r)return e===A.WILDCARD||r===e;if(n.i(g.b)(r))return!1;if(Array.isArray(r))return!1}return n.i(g.b)(e)?n.i(g.b)(r)?e.toString()===r.toString():!Array.isArray(r)&&Boolean(r.match(e)):!!Array.isArray(e)&&(Array.isArray(r)?JSON.stringify(e)===JSON.stringify(r):!n.i(g.b)(r)&&e.some(function(e){return S(e,r)}))}function O(e){try{if(e===window)return!0}catch(e){if(e&&e.message===P)return!0}try{if("[object Window]"===Object.prototype.toString.call(e))return!0}catch(e){if(e&&e.message===P)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===P)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===P)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===P)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===P)return!0}try{n.i(g.a)(e===e)}catch(e){return!0}try{n.i(g.a)(e&&e.__cross_domain_utils_window_check__)}catch(e){return!0}return!1}r.i=t,r.g=o,r.h=a,r.f=y,r.a=m,r.j=b,r.c=_,r.d=E,r.b=S,r.e=O;var g=n(17),A={MOCK_PROTOCOL:"mock:",FILE_PROTOCOL:"file:",WILDCARD:"*"},P="Call was rejected by callee.\r\n",T=[],R=[]},function(e,r,n){"use strict";var t=n(19);n.d(r,"a",function(){return t.a})},function(e,r,n){"use strict";n.d(r,"a",function(){return o});var t=n(0),o=window[t.b.WINDOW_PROPS.POSTROBOT]=window[t.b.WINDOW_PROPS.POSTROBOT]||{};o.registerSelf=function(){}},function(e,r,n){"use strict";var t=n(8);n.d(r,"c",function(){return t.a}),n.d(r,"d",function(){return t.f}),n.d(r,"e",function(){return t.d}),n.d(r,"h",function(){return t.c}),n.d(r,"i",function(){return t.b}),n.d(r,"j",function(){return t.h}),n.d(r,"l",function(){return t.i}),n.d(r,"m",function(){return t.j}),n.d(r,"n",function(){return t.e}),n.d(r,"o",function(){return t.k});var o=n(9);n.d(r,"g",function(){return o.a});var i=n(28);n.d(r,"b",function(){return i.a}),n.d(r,"f",function(){return i.b}),n.d(r,"k",function(){return i.c});var a=n(27);n.d(r,"a",function(){return a.a}),n.d(r,"p",function(){return a.b})},function(e,r,n){"use strict";var t=n(23);n.d(r,"a",function(){return t.a}),n.d(r,"b",function(){return t.b});var o=n(13);n.d(r,"e",function(){return o.a});var i=n(12);n.d(r,"c",function(){return i.e}),n.d(r,"d",function(){return i.f}),n.d(r,"f",function(){return i.g}),n.d(r,"g",function(){return i.d})},function(e,r,n){"use strict";function t(){a.a.initialized||(n.i(i.a)(),n.i(o.a)(),n.i(o.b)()),a.a.initialized=!0}Object.defineProperty(r,"__esModule",{value:!0}),r.init=t,n.d(r,"bridge",function(){return f});var o=n(4),i=n(5),a=n(3),u=n(21);n.d(r,"cleanUpWindow",function(){return u.a});var c=n(31);n.d(r,"parent",function(){return c.a}),n.d(r,"send",function(){return c.b}),n.d(r,"request",function(){return c.c}),n.d(r,"sendToParent",function(){return c.d}),n.d(r,"client",function(){return c.e}),n.d(r,"on",function(){return c.f}),n.d(r,"listen",function(){return c.g}),n.d(r,"once",function(){return c.h}),n.d(r,"listener",function(){return c.i}),n.d(r,"CONFIG",function(){return c.j}),n.d(r,"CONSTANTS",function(){return c.k}),n.d(r,"disable",function(){return c.l});var s=n(2);n.d(r,"Promise",function(){return s.a}),t();var f=null},function(e,r,n){"use strict";var t=n(10);n.d(r,"a",function(){return t.WeakMap})},function(e,r,n){"use strict";function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(r>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+Object.prototype.toString.call(e)+">";if("string"==typeof e)return e;if(e instanceof Error){var n=e&&e.stack,o=e&&e.message;if(n&&o)return-1!==n.indexOf(o)?n:o+"\n"+n;if(n)return n;if(o)return o}return"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}catch(e){return"Error while stringifying error: "+t(e,r+1)}}function o(){}function i(e,r,n){return e.addEventListener?e.addEventListener(r,n):e.attachEvent("on"+r,n),{cancel:function(){e.removeEventListener?e.removeEventListener(r,n):e.detachEvent("on"+r,n)}}}function a(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,function(){return e.charAt(Math.floor(Math.random()*e.length))})}function u(e,r){for(var n=0;n<e.length;n++)r(e[n],n)}function c(e,r){for(var n in e)e.hasOwnProperty(n)&&r(e[n],n)}function s(e,r){Array.isArray(e)?u(e,r):"object"===(void 0===e?"undefined":m(e))&&null!==e&&c(e,r)}function f(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(n>=100)throw new Error("Self-referential object passed, or object contained too many layers");var t=void 0;if("object"!==(void 0===e?"undefined":m(e))||null===e||Array.isArray(e)){if(!Array.isArray(e))throw new Error("Invalid type: "+(void 0===e?"undefined":m(e)));t=[]}else t={};return s(e,function(e,o){var i=r(e,o);void 0!==i?t[o]=i:"object"===(void 0===e?"undefined":m(e))&&null!==e?t[o]=f(e,r,n+1):t[o]=e}),t}function d(e,r){function n(){t=setTimeout(n,r),e.call()}var t=void 0;return t=setTimeout(n,r),{cancel:function(){clearTimeout(t)}}}function l(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function w(){return n.i(v.c)()?y.b.WINDOW_TYPES.POPUP:n.i(v.d)()?y.b.WINDOW_TYPES.IFRAME:y.b.WINDOW_TYPES.FULLPAGE}function h(e,r,n){var t=void 0,o=void 0;try{if("{}"!==JSON.stringify({})&&(t=Object.prototype.toJSON,delete Object.prototype.toJSON),"{}"!==JSON.stringify({}))throw new Error("Can not correctly serialize JSON objects");if("[]"!==JSON.stringify([])&&(o=Array.prototype.toJSON,delete Array.prototype.toJSON),"[]"!==JSON.stringify([]))throw new Error("Can not correctly serialize JSON objects")}catch(e){throw new Error("Can not repair JSON.stringify: "+e.message)}var i=JSON.stringify.call(this,e,r,n);try{t&&(Object.prototype.toJSON=t),o&&(Array.prototype.toJSON=o)}catch(e){throw new Error("Can not repair JSON.stringify: "+e.message)}return i}function p(e){return JSON.parse(e)}r.b=t,n.d(r,"e",function(){return b}),r.j=o,r.i=i,r.f=a,r.g=f,r.k=d,r.a=l,r.d=w,r.c=h,r.h=p;var v=(n(7),n(1)),y=n(0),m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b=function(e){if(!e)return e;var r=!1;return function(){if(!r)return r=!0,e.apply(this,arguments)}}},function(e,r,n){"use strict";n.d(r,"a",function(){return u});var t=n(8),o=n(0),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=["debug","info","warn","error"];Function.prototype.bind&&window.console&&"object"===i(console.log)&&["log","info","warn","error"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call);var u={clearLogs:function(){if(window.console&&window.console.clear&&window.console.clear(),o.a.LOG_TO_PAGE){var e=document.getElementById("postRobotLogs");e&&e.parentNode&&e.parentNode.removeChild(e)}},writeToPage:function(e,r){setTimeout(function(){var o=document.getElementById("postRobotLogs");o||(o=document.createElement("div"),o.id="postRobotLogs",o.style.cssText="width: 800px; font-family: monospace; white-space: pre-wrap;",document.body&&document.body.appendChild(o));var i=document.createElement("div"),a=(new Date).toString().split(" ")[4],u=Array.prototype.slice.call(r).map(function(e){if("string"==typeof e)return e;if(!e)return Object.prototype.toString.call(e);var r=void 0;try{r=n.i(t.c)(e,null,2)}catch(e){r="[object]"}return"\n\n"+r+"\n\n"}).join(" "),c=a+" "+e+" "+u;i.innerHTML=c;var s={log:"#ddd",warn:"orange",error:"red",info:"blue",debug:"#aaa"}[e];i.style.cssText="margin-top: 10px; color: "+s+";",o.childNodes.length?o.insertBefore(i,o.childNodes[0]):o.appendChild(i)})},logLevel:function(e,r){setTimeout(function(){try{var i=window.LOG_LEVEL||o.a.LOG_LEVEL;if(a.indexOf(e)<a.indexOf(i))return;if(r=Array.prototype.slice.call(r),r.unshift(""+window.location.host+window.location.pathname),r.unshift("::"),r.unshift(""+n.i(t.d)().toLowerCase()),r.unshift("[post-robot]"),o.a.LOG_TO_PAGE&&u.writeToPage(e,r),!window.console)return;if(window.console[e]||(e="log"),!window.console[e])return;window.console[e].apply(window.console,r)}catch(e){}},1)},debug:function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];u.logLevel("debug",r)},info:function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];u.logLevel("info",r)},warn:function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];u.logLevel("warn",r)},error:function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];u.logLevel("error",r)}}},function(e,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=n(16);n.d(r,"WeakMap",function(){return t.a})},function(e,r,n){"use strict";n.d(r,"a",function(){return t}),n.d(r,"b",function(){return o});var t={POST_MESSAGE_TYPE:{REQUEST:"postrobot_message_request",RESPONSE:"postrobot_message_response",ACK:"postrobot_message_ack"},POST_MESSAGE_ACK:{SUCCESS:"success",ERROR:"error"},POST_MESSAGE_NAMES:{METHOD:"postrobot_method",READY:"postrobot_ready",OPEN_TUNNEL:"postrobot_open_tunnel"},WINDOW_TYPES:{FULLPAGE:"fullpage",POPUP:"popup",IFRAME:"iframe"},WINDOW_PROPS:{POSTROBOT:"__postRobot__"},SERIALIZATION_TYPES:{METHOD:"postrobot_method",ERROR:"postrobot_error",PROMISE:"postrobot_promise",ZALGO_PROMISE:"postrobot_zalgo_promise",REGEX:"regex"},SEND_STRATEGIES:{POST_MESSAGE:"postrobot_post_message",BRIDGE:"postrobot_bridge",GLOBAL:"postrobot_global"},MOCK_PROTOCOL:"mock:",FILE_PROTOCOL:"file:",BRIDGE_NAME_PREFIX:"__postrobot_bridge__",POSTROBOT_PROXY:"__postrobot_proxy__",WILDCARD:"*"},o=Object.keys(t.POST_MESSAGE_NAMES).map(function(e){return t.POST_MESSAGE_NAMES[e]})},function(e,r,n){"use strict";function t(e,r){l.a.responseListeners[e]=r}function o(e){return l.a.responseListeners[e]}function i(e){delete l.a.responseListeners[e]}function a(e){l.a.erroredResponseListeners[e]=!0}function u(e){return Boolean(l.a.erroredResponseListeners[e])}function c(e){var r=e.name,t=e.win,o=e.domain;if(t===h.b.WILDCARD&&(t=null),o===h.b.WILDCARD&&(o=null),!r)throw new Error("Name required to get request listener");var i=l.a.requestListeners[r];if(i)for(var a=[t,l.a.WINDOW_WILDCARD],u=0;u<a.length;u++){var c=a[u],s=c&&i.get(c);if(s){if(o&&"string"==typeof o){if(s[o])return s[o];if(s[p])for(var f=s[p],w=Array.isArray(f),v=0,f=w?f:f[Symbol.iterator]();;){var y;if(w){if(v>=f.length)break;y=f[v++]}else{if(v=f.next(),v.done)break;y=v.value}var m=y,b=m.regex,_=m.listener;if(n.i(d.b)(b,o))return _}}if(s[h.b.WILDCARD])return s[h.b.WILDCARD]}}}function s(e,r){var t=e.name,o=e.win,i=e.domain;if(!t||"string"!=typeof t)throw new Error("Name required to add request listener");if(Array.isArray(o)){for(var a=[],u=o,d=Array.isArray(u),v=0,u=d?u:u[Symbol.iterator]();;){var y;if(d){if(v>=u.length)break;y=u[v++]}else{if(v=u.next(),v.done)break;y=v.value}var m=y;a.push(s({name:t,domain:i,win:m},r))}return{cancel:function(){for(var e=a,r=Array.isArray(e),n=0,e=r?e:e[Symbol.iterator]();;){var t;if(r){if(n>=e.length)break;t=e[n++]}else{if(n=e.next(),n.done)break;t=n.value}t.cancel()}}}}if(Array.isArray(i)){for(var b=[],_=i,E=Array.isArray(_),S=0,_=E?_:_[Symbol.iterator]();;){var O;if(E){if(S>=_.length)break;O=_[S++]}else{if(S=_.next(),S.done)break;O=S.value}var g=O;b.push(s({name:t,win:o,domain:g},r))}return{cancel:function(){for(var e=b,r=Array.isArray(e),n=0,e=r?e:e[Symbol.iterator]();;){var t;if(r){if(n>=e.length)break;t=e[n++]}else{if(n=e.next(),n.done)break;t=n.value}t.cancel()}}}}var A=c({name:t,win:o,domain:i});if(o&&o!==h.b.WILDCARD||(o=l.a.WINDOW_WILDCARD),i=i||h.b.WILDCARD,A)throw o&&i?new Error("Request listener already exists for "+t+" on domain "+i.toString()+" for "+(o===l.a.WINDOW_WILDCARD?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+t+" for "+(o===l.a.WINDOW_WILDCARD?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+t+" on domain "+i.toString()):new Error("Request listener already exists for "+t);var P=l.a.requestListeners,T=P[t];T||(T=new f.a,P[t]=T);var R=T.get(o);R||(R={},T.set(o,R));var L=i.toString(),I=R[p],k=void 0;return n.i(w.c)(i)?(I||(I=[],R[p]=I),k={regex:i,listener:r},I.push(k)):R[L]=r,{cancel:function(){R&&(delete R[L],o&&0===Object.keys(R).length&&T.delete(o),k&&I.splice(I.indexOf(k,1)))}}}r.f=t,r.b=o,r.d=i,r.g=a,r.a=u,r.c=c,r.e=s;var f=(n(2),n(7)),d=n(1),l=n(3),w=n(4),h=n(0);l.a.responseListeners=l.a.responseListeners||{},l.a.requestListeners=l.a.requestListeners||{},l.a.WINDOW_WILDCARD=l.a.WINDOW_WILDCARD||new function(){},l.a.erroredResponseListeners=l.a.erroredResponseListeners||{};var p="__domain_regex__"},function(e,r,n){"use strict";function t(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function o(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.i(s.d)(),i=n.i(s.e)(),u=n.i(a.g)(window);return d({},r,t,{sourceDomain:u,id:r.id||o,windowType:i})}function i(e,r,i){return u.a.try(function(){r=o(e,r,{data:n.i(s.f)(e,i,r.data),domain:i});var d=void 0;if(d=-1!==c.c.indexOf(r.name)||r.type===c.b.POST_MESSAGE_TYPE.ACK?"debug":"error"===r.ack?"error":"info",s.g.logLevel(d,["\n\n\t","#send",r.type.replace(/^postrobot_message_/,""),"::",r.name,"::",i||c.b.WILDCARD,"\n\n",r]),e===window&&!c.a.ALLOW_SAME_ORIGIN)throw new Error("Attemping to send message to self");if(n.i(a.f)(e))throw new Error("Window is closed");s.g.debug("Running send message strategies",r);var l=[],w=n.i(s.h)(t({},c.b.WINDOW_PROPS.POSTROBOT,r),null,2);return u.a.map(Object.keys(f.a),function(r){return u.a.try(function(){if(!c.a.ALLOWED_POST_MESSAGE_METHODS[r])throw new Error("Strategy disallowed: "+r);return f.a[r](e,w,i)}).then(function(){return l.push(r+": success"),!0},function(e){return l.push(r+": "+n.i(s.i)(e)+"\n"),!1})}).then(function(e){var n=e.some(Boolean),t=r.type+" "+r.name+" "+(n?"success":"error")+":\n - "+l.join("\n - ")+"\n";if(s.g.debug(t),!n)throw new Error(t)})})}r.a=i;var a=n(1),u=n(2),c=n(0),s=n(4),f=n(25),d=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e}},function(e,r,n){"use strict";function t(){if(!window.WeakMap)return!1;if(!window.Object.freeze)return!1;try{var e=new window.WeakMap,r={};return window.Object.freeze(r),e.set(r,"__testvalue__"),"__testvalue__"===e.get(r)}catch(e){return!1}}r.a=t},function(e,r,n){"use strict";function t(e,r){for(var n=0;n<e.length;n++)try{if(e[n]===r)return n}catch(e){}return-1}function o(){}r.b=t,r.a=o},function(e,r,n){"use strict";function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}n.d(r,"a",function(){return f});var o=n(1),i=n(14),a=n(15),u=function(){function e(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(r,n,t){return n&&e(r.prototype,n),t&&e(r,t),r}}(),c=Object.defineProperty,s=Date.now()%1e9,f=function(){function e(){if(t(this,e),s+=1,this.name="__weakmap_"+(1e9*Math.random()>>>0)+"__"+s,n.i(i.a)())try{this.weakmap=new window.WeakMap}catch(e){}this.keys=[],this.values=[]}return u(e,[{key:"_cleanupClosedWindows",value:function(){for(var e=this.weakmap,r=this.keys,t=0;t<r.length;t++){var i=r[t];if(n.i(o.e)(i)&&n.i(o.f)(i)){if(e)try{e.delete(i)}catch(e){}r.splice(t,1),this.values.splice(t,1),t-=1}}}},{key:"isSafeToReadWrite",value:function(e){if(n.i(o.e)(e))return!1;try{n.i(a.a)(e&&e.self),n.i(a.a)(e&&e[this.name])}catch(e){return!1}return!0}},{key:"set",value:function(e,r){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.set(e,r)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e)){var o=this.name,i=e[o];i&&i[0]===e?i[1]=r:c(e,o,{value:[e,r],writable:!0})}else{this._cleanupClosedWindows();var u=this.keys,s=this.values,f=n.i(a.b)(u,e);-1===f?(u.push(e),s.push(r)):s[f]=r}}},{key:"get",value:function(e){if(!e)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{if(r.has(e))return r.get(e)}catch(e){delete this.weakmap}if(!this.isSafeToReadWrite(e)){this._cleanupClosedWindows();var t=this.keys,o=n.i(a.b)(t,e);if(-1===o)return;return this.values[o]}var i=e[this.name];if(i&&i[0]===e)return i[1]}},{key:"delete",value:function(e){if(!e)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{r.delete(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e)){var t=e[this.name];t&&t[0]===e&&(t[0]=t[1]=void 0)}else{this._cleanupClosedWindows();var o=this.keys,i=n.i(a.b)(o,e);-1!==i&&(o.splice(i,1),this.values.splice(i,1))}}},{key:"has",value:function(e){if(!e)throw new Error("WeakMap expected key");var r=this.weakmap;if(r)try{return r.has(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e)){var t=e[this.name];return!(!t||t[0]!==e)}return this._cleanupClosedWindows(),-1!==n.i(a.b)(this.keys,e)}}]),e}()},function(e,r,n){"use strict";function t(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function o(){}r.b=t,r.a=o},function(e,r,n){"use strict";function t(e){if(-1===a.indexOf(e)){a.push(e),setTimeout(function(){throw e},1);for(var r=0;r<i.length;r++)i[r](e)}}function o(e){return i.push(e),{cancel:function(){i.splice(i.indexOf(e),1)}}}r.a=t,r.b=o;var i=[],a=[]},function(e,r,n){"use strict";function t(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}n.d(r,"a",function(){return c});var o=n(20),i=n(18),a=function(){function e(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(r,n,t){return n&&e(r.prototype,n),t&&e(r,t),r}}(),u=window.__zalgopromise__=window.__zalgopromise__||{flushPromises:[],activeCount:0},c=function(){function e(r){var n=this;if(t(this,e),this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],r){var o=void 0,i=void 0,a=!1,u=!1,c=!1;try{r(function(e){c?n.resolve(e):(a=!0,o=e)},function(e){c?n.reject(e):(u=!0,i=e)})}catch(e){return void this.reject(e)}c=!0,a?this.resolve(o):u&&this.reject(i)}}return a(e,[{key:"resolve",value:function(e){if(this.resolved||this.rejected)return this;if(n.i(o.a)(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this}},{key:"reject",value:function(e){var r=this;if(this.resolved||this.rejected)return this;if(n.i(o.a)(e))throw new Error("Can not reject promise with another promise");if(!e){var t=e&&"function"==typeof e.toString?e.toString():Object.prototype.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(){r.errorHandled||n.i(i.a)(e)},1),this.dispatch(),this}},{key:"asyncReject",value:function(e){this.errorHandled=!0,this.reject(e)}},{key:"dispatch",value:function(){var r=this,t=this.dispatching,i=this.resolved,a=this.rejected,c=this.handlers;if(!t&&(i||a)){this.dispatching=!0,u.activeCount+=1;for(var s=0;s<c.length;s++){(function(t){var u=c[t],s=u.onSuccess,f=u.onError,d=u.promise,l=void 0;if(i)try{l=s?s(r.value):r.value}catch(e){return d.reject(e),"continue"}else if(a){if(!f)return d.reject(r.error),"continue";try{l=f(r.error)}catch(e){return d.reject(e),"continue"}}l instanceof e&&(l.resolved||l.rejected)?(l.resolved?d.resolve(l.value):d.reject(l.error),l.errorHandled=!0):n.i(o.a)(l)?l instanceof e&&(l.resolved||l.rejected)?l.resolved?d.resolve(l.value):d.reject(l.error):l.then(function(e){d.resolve(e)},function(e){d.reject(e)}):d.resolve(l)})(s)}c.length=0,this.dispatching=!1,u.activeCount-=1,0===u.activeCount&&e.flushQueue()}}},{key:"then",value:function(r,n){if(r&&"function"!=typeof r&&!r.call)throw new Error("Promise.then expected a function for success handler");if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for error handler");var t=new e;return this.handlers.push({promise:t,onSuccess:r,onError:n}),this.errorHandled=!0,this.dispatch(),t}},{key:"catch",value:function(e){return this.then(void 0,e)}},{key:"finally",value:function(r){return this.then(function(n){return e.try(r).then(function(){return n})},function(n){return e.try(r).then(function(){throw n})})}},{key:"timeout",value:function(e,r){var n=this;if(this.resolved||this.rejected)return this;var t=setTimeout(function(){n.resolved||n.rejected||n.reject(r||new Error("Promise timed out after "+e+"ms"))},e);return this.then(function(e){return clearTimeout(t),e})}},{key:"toPromise",value:function(){if(!window.Promise)throw new Error("Could not find window.Promise");return window.Promise.resolve(this)}}],[{key:"resolve",value:function(r){return r instanceof e?r:n.i(o.a)(r)?new e(function(e,n){return r.then(e,n)}):(new e).resolve(r)}},{key:"reject",value:function(r){return(new e).reject(r)}},{key:"all",value:function(r){var t=new e,i=r.length,a=[];if(!i)return t.resolve(a),t;for(var u=0;u<r.length;u++){(function(u){var c=r[u];if(c instanceof e){if(c.resolved)return a[u]=c.value,i-=1,"continue"}else if(!n.i(o.a)(c))return a[u]=c,i-=1,"continue";e.resolve(c).then(function(e){a[u]=e,0===(i-=1)&&t.resolve(a)},function(e){t.reject(e)})})(u)}return 0===i&&t.resolve(a),t}},{key:"hash",value:function(r){var n={};return e.all(Object.keys(r).map(function(t){return e.resolve(r[t]).then(function(e){n[t]=e})})).then(function(){return n})}},{key:"map",value:function(r,n){return e.all(r.map(n))}},{key:"onPossiblyUnhandledException",value:function(e){return n.i(i.b)(e)}},{key:"try",value:function(r,n,t){var o=void 0;try{o=r.apply(n,t||[])}catch(r){return e.reject(r)}return e.resolve(o)}},{key:"delay",value:function(r){return new e(function(e){setTimeout(e,r)})}},{key:"isPromise",value:function(r){return!!(r&&r instanceof e)||n.i(o.a)(r)}},{key:"flush",value:function(){var r=new e;return u.flushPromises.push(r),0===u.activeCount&&e.flushQueue(),r}},{key:"flushQueue",value:function(){var e=u.flushPromises;u.flushPromises=[];for(var r=e,n=Array.isArray(r),t=0,r=n?r:r[Symbol.iterator]();;){var o;if(n){if(t>=r.length)break;o=r[t++]}else{if(t=r.next(),t.done)break;o=t.value}o.resolve()}}}]),e}()},function(e,r,n){"use strict";function t(e){try{if(!e)return!1;if(window.Promise&&e instanceof window.Promise)return!0;if(window.Window&&e instanceof window.Window)return!1;if(window.constructor&&e instanceof window.constructor)return!1;if(o){var r=o.call(e);if("[object Window]"===r||"[object global]"===r||"[object DOMWindow]"===r)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}r.a=t;var o={}.toString},function(e,r,n){"use strict";function t(e){var r=o.a.requestPromises.get(e);if(r)for(var n=r,t=Array.isArray(n),i=0,n=t?n:n[Symbol.iterator]();;){var a;if(t){if(i>=n.length)break;a=n[i++]}else{if(i=n.next(),i.done)break;a=i.value}var u=a;u.reject(new Error("No response from window - cleaned up"))}o.a.popupWindowsByWin&&o.a.popupWindowsByWin.delete(e),o.a.remoteWindows&&o.a.remoteWindows.delete(e),o.a.requestPromises.delete(e),o.a.methods.delete(e),o.a.readyPromises.delete(e)}r.a=t;var o=n(3)},function(e,r,n){"use strict";function t(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}n.d(r,"a",function(){return a});var o,i=n(11),a={ALLOW_POSTMESSAGE_POPUP:!("__ALLOW_POSTMESSAGE_POPUP__"in window)||window.__ALLOW_POSTMESSAGE_POPUP__,LOG_LEVEL:"info",BRIDGE_TIMEOUT:5e3,CHILD_WINDOW_TIMEOUT:5e3,ACK_TIMEOUT:-1!==window.navigator.userAgent.match(/MSIE/i)?2e3:1e3,RES_TIMEOUT:1/0,LOG_TO_PAGE:!1,ALLOWED_POST_MESSAGE_METHODS:(o={},t(o,i.a.SEND_STRATEGIES.POST_MESSAGE,!0),t(o,i.a.SEND_STRATEGIES.BRIDGE,!0),t(o,i.a.SEND_STRATEGIES.GLOBAL,!0),o),ALLOW_SAME_ORIGIN:!1};0===window.location.href.indexOf(i.a.FILE_PROTOCOL)&&(a.ALLOW_POSTMESSAGE_POPUP=!0)},function(e,r,n){"use strict";function t(e){var r=void 0;try{r=n.i(s.j)(e)}catch(e){return}if(r&&"object"===(void 0===r?"undefined":l(r))&&null!==r&&(r=r[c.b.WINDOW_PROPS.POSTROBOT])&&"object"===(void 0===r?"undefined":l(r))&&null!==r&&r.type&&"string"==typeof r.type&&d.a[r.type])return r}function o(e){if(!window||window.closed)throw new Error("Message recieved in closed window");try{if(!e.source)return}catch(e){return}var r=e.source,o=e.origin,i=e.data,a=t(i);if(a){if(!a.sourceDomain||"string"!=typeof a.sourceDomain)throw new Error("Expected message to have sourceDomain");if(0!==a.sourceDomain.indexOf(c.b.MOCK_PROTOCOL)&&0!==a.sourceDomain.indexOf(c.b.FILE_PROTOCOL)||(o=a.sourceDomain),-1===f.a.receivedMessages.indexOf(a.id)){f.a.receivedMessages.push(a.id);var l=void 0;if(l=-1!==c.c.indexOf(a.name)||a.type===c.b.POST_MESSAGE_TYPE.ACK?"debug":"error"===a.ack?"error":"info",s.g.logLevel(l,["\n\n\t","#receive",a.type.replace(/^postrobot_message_/,""),"::",a.name,"::",o,"\n\n",a]),n.i(u.f)(r))return void s.g.debug("Source window is closed - can not send "+a.type+" "+a.name);a.data&&(a.data=n.i(s.k)(r,o,a.data)),d.a[a.type](r,o,a)}}}function i(e){try{e.source}catch(e){return}var r={source:e.source||e.sourceElement,origin:e.origin||e.originalEvent&&e.originalEvent.origin,data:e.data};o(r)}function a(){n.i(s.l)(window,"message",i)}r.b=i,r.a=a;var u=n(1),c=n(0),s=n(4),f=n(3),d=n(24),l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};f.a.receivedMessages=f.a.receivedMessages||[]},function(e,r,n){"use strict";function t(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}n.d(r,"a",function(){return l});var o,i=n(2),a=n(1),u=n(0),c=n(4),s=n(13),f=n(12),d=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},l=(o={},t(o,u.b.POST_MESSAGE_TYPE.ACK,function(e,r,t){if(!n.i(f.a)(t.hash)){var o=n.i(f.b)(t.hash);if(!o)throw new Error("No handler found for post message ack for message: "+t.name+" from "+r+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!n.i(a.b)(o.domain,r))throw new Error("Ack origin "+r+" does not match domain "+o.domain.toString());o.ack=!0}}),t(o,u.b.POST_MESSAGE_TYPE.REQUEST,function(e,r,t){function o(o){return t.fireAndForget||n.i(a.f)(e)?i.a.resolve():n.i(s.a)(e,d({target:t.originalSource,hash:t.hash,name:t.name},o),r)}var l=n.i(f.c)({name:t.name,win:e,domain:r});return i.a.all([o({type:u.b.POST_MESSAGE_TYPE.ACK}),i.a.try(function(){if(!l)throw new Error("No handler found for post message: "+t.name+" from "+r+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!n.i(a.b)(l.domain,r))throw new Error("Request origin "+r+" does not match domain "+l.domain.toString());var o=t.data;return l.handler({source:e,origin:r,data:o})}).then(function(e){return o({type:u.b.POST_MESSAGE_TYPE.RESPONSE,ack:u.b.POST_MESSAGE_ACK.SUCCESS,data:e})},function(e){var r=n.i(c.i)(e).replace(/^Error: /,"");return o({type:u.b.POST_MESSAGE_TYPE.RESPONSE,ack:u.b.POST_MESSAGE_ACK.ERROR,error:r})})]).then(c.m).catch(function(e){if(l&&l.handleError)return l.handleError(e);c.g.error(n.i(c.i)(e))})}),t(o,u.b.POST_MESSAGE_TYPE.RESPONSE,function(e,r,t){if(!n.i(f.a)(t.hash)){var o=n.i(f.b)(t.hash);if(!o)throw new Error("No handler found for post message response for message: "+t.name+" from "+r+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!n.i(a.b)(o.domain,r))throw new Error("Response origin "+r+" does not match domain "+o.domain);if(n.i(f.d)(t.hash),t.ack===u.b.POST_MESSAGE_ACK.ERROR)return o.respond(new Error(t.error),null);if(t.ack===u.b.POST_MESSAGE_ACK.SUCCESS){var i=t.data||t.response;return o.respond(null,{source:e,origin:r,data:i})}}}),o)},function(e,r,n){"use strict";n.d(r,"a",function(){return i});var t=n(1),o=n(0),i={};i[o.b.SEND_STRATEGIES.POST_MESSAGE]=function(e,r,i){var a=void 0;a=Array.isArray(i)?i:i?[i]:[o.b.WILDCARD],a=a.map(function(r){if(0===r.indexOf(o.b.MOCK_PROTOCOL)){if(window.location.protocol===o.b.FILE_PROTOCOL)return o.b.WILDCARD;if(!n.i(t.h)(e))throw new Error("Attempting to send messsage to mock domain "+r+", but window is actually cross-domain");return n.i(t.i)(e)}return 0===r.indexOf(o.b.FILE_PROTOCOL)?o.b.WILDCARD:r}),a.forEach(function(n){return e.postMessage(r,n)})}},function(e,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=n(6);n.d(r,"cleanUpWindow",function(){return t.cleanUpWindow}),n.d(r,"init",function(){return t.init}),n.d(r,"bridge",function(){return t.bridge}),n.d(r,"Promise",function(){return t.Promise}),n.d(r,"parent",function(){return t.parent}),n.d(r,"send",function(){return t.send}),n.d(r,"request",function(){return t.request}),n.d(r,"sendToParent",function(){return t.sendToParent}),n.d(r,"client",function(){return t.client}),n.d(r,"on",function(){return t.on}),n.d(r,"listen",function(){return t.listen}),n.d(r,"once",function(){return t.once}),n.d(r,"listener",function(){return t.listener}),n.d(r,"CONFIG",function(){return t.CONFIG}),n.d(r,"CONSTANTS",function(){return t.CONSTANTS}),n.d(r,"disable",function(){return t.disable}),r.default=t},function(e,r,n){"use strict";function t(){n.i(s.on)(c.b.POST_MESSAGE_NAMES.READY,{domain:c.b.WILDCARD},function(e){var r=e.source,n=d.a.readyPromises.get(r);n?n.resolve(e):(n=(new u.a).resolve(e),d.a.readyPromises.set(r,n))});var e=n.i(a.a)();e&&n.i(s.send)(e,c.b.POST_MESSAGE_NAMES.READY,{},{domain:c.b.WILDCARD,timeout:1/0}).catch(function(e){f.a.debug(n.i(l.b)(e))})}function o(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Window",t=d.a.readyPromises.get(e);return t||(t=new u.a,d.a.readyPromises.set(e,t),-1!==r&&setTimeout(function(){return t.reject(new Error(n+" did not load after "+r+"ms"))},r),t)}r.a=t,r.b=o;var i=n(7),a=n(1),u=n(2),c=n(0),s=n(6),f=n(9),d=n(3),l=n(8);d.a.readyPromises=d.a.readyPromises||new i.a},function(e,r,n){"use strict";function t(e,r){return"object"===(void 0===e?"undefined":g(e))&&null!==e&&e.__type__===r}function o(e,r,t,o){var i=n.i(_.f)(),a=O.a.methods.get(e);return a||(a={},O.a.methods.set(e,a)),a[i]={domain:r,method:t},{__type__:b.b.SERIALIZATION_TYPES.METHOD,__id__:i,__name__:o}}function i(e){return{__type__:b.b.SERIALIZATION_TYPES.ERROR,__message__:n.i(_.b)(e)}}function a(e,r,n,t){return{__type__:b.b.SERIALIZATION_TYPES.PROMISE,__then__:o(e,r,function(e,r){return n.then(e,r)},t+".then")}}function u(e,r,n,t){return{__type__:b.b.SERIALIZATION_TYPES.ZALGO_PROMISE,__then__:o(e,r,function(e,r){return n.then(e,r)},t+".then")}}function c(e){return{__type__:b.b.SERIALIZATION_TYPES.REGEX,__source__:e.source}}function s(e,r,t){return n.i(_.g)({obj:t},function(t,s){return"function"==typeof t?o(e,r,t,s.toString()):t instanceof Error?i(t):window.Promise&&t instanceof window.Promise?a(e,r,t,s.toString()):m.a.isPromise(t)?u(e,r,t,s.toString()):n.i(_.a)(t)?c(t):void 0}).obj}function f(e,r,t){function o(){var o=Array.prototype.slice.call(arguments);return S.a.debug("Call foreign method",t.__name__,o),n.i(E.send)(e,b.b.POST_MESSAGE_NAMES.METHOD,{id:t.__id__,name:t.__name__,args:o},{domain:r,timeout:1/0}).then(function(e){var r=e.data;return S.a.debug("Got foreign method result",t.__name__,r.result),r.result},function(e){throw S.a.debug("Got foreign method error",n.i(_.b)(e)),e})}return o.__name__=t.__name__,o.__xdomain__=!0,o.source=e,o.origin=r,o}function d(e,r,n){return new Error(n.__message__)}function l(e,r,n){return new m.a(function(t,o){return f(e,r,n.__then__)(t,o)})}function w(e,r,n){return window.Promise?new window.Promise(function(t,o){return f(e,r,n.__then__)(t,o)}):l(e,r,n)}function h(e,r,n){return new RegExp(n.__source__)}function p(e,r,o){return n.i(_.g)({obj:o},function(n,o){if("object"===(void 0===n?"undefined":g(n))&&null!==n)return t(n,b.b.SERIALIZATION_TYPES.METHOD)?f(e,r,n):t(n,b.b.SERIALIZATION_TYPES.ERROR)?d(e,r,n):t(n,b.b.SERIALIZATION_TYPES.PROMISE)?w(e,r,n):t(n,b.b.SERIALIZATION_TYPES.ZALGO_PROMISE)?l(e,r,n):t(n,b.b.SERIALIZATION_TYPES.REGEX)?h(e,r,n):void 0}).obj}n.d(r,"a",function(){return A}),r.b=s,r.c=p;var v=n(7),y=n(1),m=n(2),b=n(0),_=n(8),E=n(6),S=n(9),O=n(3),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};O.a.methods=O.a.methods||new v.a;var A=n.i(_.e)(function(){n.i(E.on)(b.b.POST_MESSAGE_NAMES.METHOD,{origin:b.b.WILDCARD},function(e){var r=e.source,t=e.origin,o=e.data,i=O.a.methods.get(r);if(!i)throw new Error("Could not find any methods this window has privileges to call");var a=i[o.id];if(!a)throw new Error("Could not find method with id: "+o.id);if(!n.i(y.b)(a.domain,t))throw new Error("Method domain "+a.domain+" does not match origin "+t);return S.a.debug("Call local method",o.name,o.args),m.a.try(function(){return a.method.apply({source:r,origin:t,data:o},o.args)}).then(function(e){return{result:e,id:o.id,name:o.name}})})})},function(e,r,n){"use strict";function t(e){return c.a.try(function(){if(!e.name)throw new Error("Expected options.name");var r=e.name,t=void 0,o=void 0;if("string"==typeof e.window){var i=document.getElementById(e.window);if(!i)throw new Error("Expected options.window "+Object.prototype.toString.call(e.window)+" to be a valid element id");if("iframe"!==i.tagName.toLowerCase())throw new Error("Expected options.window "+Object.prototype.toString.call(e.window)+" to be an iframe");if(!i.contentWindow)throw new Error("Iframe must have contentWindow. Make sure it has a src attribute and is in the DOM.");t=i.contentWindow}else if(e.window instanceof HTMLIFrameElement){if("iframe"!==e.window.tagName.toLowerCase())throw new Error("Expected options.window "+Object.prototype.toString.call(e.window)+" to be an iframe");if(e.window&&!e.window.contentWindow)throw new Error("Iframe must have contentWindow. Make sure it has a src attribute and is in the DOM.");e.window&&e.window.contentWindow&&(t=e.window.contentWindow)}else t=e.window;if(!t)throw new Error("Expected options.window to be a window object, iframe, or iframe element id.");var a=t;o=e.domain||f.b.WILDCARD;var u=e.name+"_"+n.i(l.d)();if(n.i(s.f)(a))throw new Error("Target window is closed");var h=!1,p=w.a.requestPromises.get(a);p||(p=[],w.a.requestPromises.set(a,p));var v=c.a.try(function(){if(n.i(s.j)(window,a))return c.a.resolve(n.i(l.p)(a,e.timeout||f.a.CHILD_WINDOW_TIMEOUT))}).then(function(){return new c.a(function(t,i){var c=void 0;if(e.fireAndForget||(c={name:r,window:a,domain:o,respond:function(e,r){e||(h=!0,p.splice(p.indexOf(v,1))),e?i(e):t(r)}},n.i(d.d)(u,c)),n.i(d.e)(a,{type:f.b.POST_MESSAGE_TYPE.REQUEST,hash:u,name:r,data:e.data,fireAndForget:e.fireAndForget},o).catch(i),e.fireAndForget)return t();var l=f.a.ACK_TIMEOUT,w=e.timeout||f.a.RES_TIMEOUT,y=100,m=function t(){if(!h){if(n.i(s.f)(a))return i(c.ack?new Error("Window closed for "+r+" before response"):new Error("Window closed for "+r+" before ack"));l-=y,w-=y;if(c.ack){if(w===1/0)return;y=Math.min(w,2e3)}else{if(l<=0)return i(new Error("No ack for postMessage "+r+" in "+n.i(s.g)()+" in "+f.a.ACK_TIMEOUT+"ms"));if(w<=0)return i(new Error("No response for postMessage "+r+" in "+n.i(s.g)()+" in "+(e.timeout||f.a.RES_TIMEOUT)+"ms"))}setTimeout(t,y)}};setTimeout(m,y)})});return v.catch(function(){n.i(d.f)(u),n.i(d.g)(u)}),p.push(v),v})}function o(e,r,n,o){return o=o||{},o.window=e,o.name=r,o.data=n,t(o)}function i(e,r,t){var i=n.i(s.a)();return i?o(i,e,r,t):new c.a(function(e,r){return r(new Error("Window does not have a parent"))})}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.window)throw new Error("Expected options.window");var r=e.window;return{send:function(n,t){return o(r,n,t,e)}}}n.d(r,"a",function(){return o}),r.b=t,r.c=i,r.d=a;var u=n(7),c=n(2),s=n(1),f=n(0),d=n(5),l=n(4),w=n(3);w.a.requestPromises=w.a.requestPromises||new u.a},function(e,r,n){"use strict";function t(){delete window[o.b.WINDOW_PROPS.POSTROBOT],window.removeEventListener("message",i.b)}r.c=t;var o=n(0),i=n(5);n.d(r,"a",function(){return o.a}),n.d(r,"b",function(){return o.b})},function(e,r,n){"use strict";n.d(r,"a",function(){return u});var t=n(1),o=n(29);n.d(r,"b",function(){return o.a}),n.d(r,"c",function(){return o.b}),n.d(r,"d",function(){return o.c}),n.d(r,"e",function(){return o.d});var i=n(32);n.d(r,"f",function(){return i.a}),n.d(r,"g",function(){return i.b}),n.d(r,"h",function(){return i.c}),n.d(r,"i",function(){return i.d});var a=n(30);n.d(r,"j",function(){return a.a}),n.d(r,"k",function(){return a.b}),n.d(r,"l",function(){return a.c});var u=n.i(t.a)()},function(e,r,n){"use strict";function t(e){if(!e.name)throw new Error("Expected options.name");if(!e.handler)throw new Error("Expected options.handler");var r=e.name,t=e.window,o=e.domain,i={handler:e.handler,handleError:e.errorHandler||function(e){throw e},window:t,domain:o||d.b.WILDCARD,name:r},a=n.i(f.c)({name:r,win:t,domain:o},i);if(e.once){var c=i.handler;i.handler=n.i(s.n)(function(){return a.cancel(),c.apply(this,arguments)})}if(i.window&&e.errorOnClose)var w=n.i(s.o)(function(){t&&"object"===(void 0===t?"undefined":l(t))&&n.i(u.f)(t)&&(w.cancel(),i.handleError(new Error("Post message target window is closed")))},50);return{cancel:function(){a.cancel()}}}function o(e,r,n){return"function"==typeof r&&(n=r,r={}),r=r||{},r.name=e,r.handler=n||r.handler,t(r)}function i(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"function"==typeof r&&(n=r,r={}),r=r||{},n=n||r.handler;var o=r.errorHandler,i=new c.a(function(t,i){r=r||{},r.name=e,r.once=!0,r.handler=function(e){if(t(e),n)return n(e)},r.errorHandler=function(e){if(i(e),o)return o(e)}}),a=t(r);return i.cancel=a.cancel,i}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{on:function(r,n){return o(r,e,n)}}}n.d(r,"a",function(){return o}),r.b=t,r.c=i,r.d=a;var u=n(1),c=n(2),s=n(4),f=n(5),d=n(0),l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}}])});
//# sourceMappingURL=post-robot.min.js.map
{
"name": "post-robot",
"version": "8.0.15",
"version": "8.0.16",
"description": "Simple postMessage based server.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -14,2 +14,3 @@ /* @flow */

BRIDGE_TIMEOUT: 5000,
CHILD_WINDOW_TIMEOUT: 5000,

@@ -16,0 +17,0 @@ ACK_TIMEOUT: (window.navigator.userAgent.match(/MSIE/i) !== -1 && !__TEST__) ? 2000 : 1000,

@@ -49,5 +49,8 @@ /* @flow */

global.readyPromises.set(win, promise);
setTimeout(() => promise.reject(new Error(`${name} did not load after ${timeout}ms`)), timeout);
if (timeout !== -1) {
setTimeout(() => promise.reject(new Error(`${name} did not load after ${timeout}ms`)), timeout);
}
return promise;
}

@@ -106,3 +106,3 @@ /* @flow */

if (isAncestor(window, win)) {
return ZalgoPromise.resolve(onWindowReady(win));
return ZalgoPromise.resolve(onWindowReady(win, options.timeout || CONFIG.CHILD_WINDOW_TIMEOUT));
}

@@ -109,0 +109,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc