UNPKG

133 kBJavaScriptView Raw
1!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("zoid",[],t):"object"==typeof exports?exports.zoid=t():e.zoid=t()}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=15)}([function(e,t,n){"use strict";var r=n(16);n.d(t,"assertSameDomain",function(){return r.a}),n.d(t,"getActualDomain",function(){return r.b}),n.d(t,"getAllFramesInWindow",function(){return r.c}),n.d(t,"getAncestor",function(){return r.d}),n.d(t,"getDistanceFromTop",function(){return r.e}),n.d(t,"getDomain",function(){return r.f}),n.d(t,"getDomainFromUrl",function(){return r.g}),n.d(t,"getFrameByName",function(){return r.h}),n.d(t,"getNthParentFromTop",function(){return r.i}),n.d(t,"getOpener",function(){return r.j}),n.d(t,"getParent",function(){return r.k}),n.d(t,"getTop",function(){return r.l}),n.d(t,"getUserAgent",function(){return r.m}),n.d(t,"isActuallySameDomain",function(){return r.n}),n.d(t,"isAncestor",function(){return r.o}),n.d(t,"isBlankDomain",function(){return r.p}),n.d(t,"isOpener",function(){return r.q}),n.d(t,"isSameDomain",function(){return r.r}),n.d(t,"isSameTopWindow",function(){return r.s}),n.d(t,"isTop",function(){return r.t}),n.d(t,"isWindow",function(){return r.u}),n.d(t,"isWindowClosed",function(){return r.v}),n.d(t,"linkFrameWindow",function(){return r.w}),n.d(t,"matchDomain",function(){return r.x}),n.d(t,"normalizeMockUrl",function(){return r.y}),n.d(t,"onCloseWindow",function(){return r.z}),n.d(t,"stringifyDomainPattern",function(){return r.A});var o=n(17);n.n(o),n(9)},function(e,t,n){"use strict";n(10);var r=n(11);n.d(t,"PopupOpenError",function(){return r.a}),n.d(t,"addClass",function(){return r.b}),n.d(t,"addEventListener",function(){return r.c}),n.d(t,"animateAndHide",function(){return r.d}),n.d(t,"appendChild",function(){return r.e}),n.d(t,"awaitFrameLoad",function(){return r.f}),n.d(t,"awaitFrameWindow",function(){return r.g}),n.d(t,"destroyElement",function(){return r.h}),n.d(t,"elementReady",function(){return r.i}),n.d(t,"extendUrl",function(){return r.j}),n.d(t,"getElement",function(){return r.k}),n.d(t,"hideElement",function(){return r.l}),n.d(t,"iframe",function(){return r.m}),n.d(t,"onResize",function(){return r.o}),n.d(t,"removeClass",function(){return r.p}),n.d(t,"showAndAnimate",function(){return r.q}),n.d(t,"showElement",function(){return r.r}),n.d(t,"waitForDocumentBody",function(){return r.s}),n.d(t,"watchElementForClose",function(){return r.t}),n.d(t,"writeElementToWindow",function(){return r.u}),n(18),n(19),n(12);var o=n(7);n.d(t,"base64decode",function(){return o.a}),n.d(t,"base64encode",function(){return o.b}),n.d(t,"dasherizeToCamel",function(){return o.d}),n.d(t,"dotify",function(){return o.f}),n.d(t,"eventEmitter",function(){return o.g}),n.d(t,"extend",function(){return o.h}),n.d(t,"getOrSet",function(){return o.j}),n.d(t,"isDefined",function(){return o.l}),n.d(t,"isRegex",function(){return o.m}),n.d(t,"memoize",function(){return o.n}),n.d(t,"memoizePromise",function(){return o.o}),n.d(t,"noop",function(){return o.p}),n.d(t,"once",function(){return o.q}),n.d(t,"promisify",function(){return o.r}),n.d(t,"replaceObject",function(){return o.s}),n.d(t,"safeInterval",function(){return o.t}),n.d(t,"stringify",function(){return o.u}),n.d(t,"stringifyError",function(){return o.v}),n.d(t,"uniqueID",function(){return o.w}),n.d(t,"weakMapMemoize",function(){return o.x}),n.d(t,"weakMapMemoizePromise",function(){return o.y}),n(20);var i=n(21);n.n(i),n.o(i,"isPerc")&&n.d(t,"isPerc",function(){return i.isPerc}),n.o(i,"isPx")&&n.d(t,"isPx",function(){return i.isPx}),n.o(i,"memoized")&&n.d(t,"memoized",function(){return i.memoized}),n.o(i,"toCSS")&&n.d(t,"toCSS",function(){return i.toCSS});var a=n(22);n.d(t,"memoized",function(){return a.a});var u=n(23);n.d(t,"isPerc",function(){return u.a}),n.d(t,"isPx",function(){return u.b}),n.d(t,"toCSS",function(){return u.c}),n(24)},function(e,t,n){"use strict";function r(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&window.constructor&&e instanceof window.constructor)return!1;var t={}.toString;if(t){var n=t.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}function o(){var e=void 0;if("undefined"!=typeof window)e=window;else{if("undefined"==typeof window)throw new TypeError("Can not find global");e=window}var t=e.__zalgopromise__=e.__zalgopromise__||{};return t.flushPromises=t.flushPromises||[],t.activeCount=t.activeCount||0,t.possiblyUnhandledPromiseHandlers=t.possiblyUnhandledPromiseHandlers||[],t.dispatchedErrors=t.dispatchedErrors||[],t}var i=function(){function e(t){var n=this;if(function(t,n){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this),this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],t){var r=void 0,o=void 0,i=!1,a=!1,u=!1;try{t(function(e){u?n.resolve(e):(i=!0,r=e)},function(e){u?n.reject(e):(a=!0,o=e)})}catch(e){return void this.reject(e)}u=!0,i?this.resolve(r):a&&this.reject(o)}}return e.prototype.resolve=function(e){if(this.resolved||this.rejected)return this;if(r(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this},e.prototype.reject=function(e){var t=this;if(this.resolved||this.rejected)return this;if(r(e))throw new Error("Can not reject promise with another promise");if(!e){var n=e&&"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e);e=new Error("Expected reject to be called with Error, got "+n)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout(function(){t.errorHandled||function(e,t){if(-1===o().dispatchedErrors.indexOf(e)){o().dispatchedErrors.push(e),setTimeout(function(){throw e},1);for(var n=0;n<o().possiblyUnhandledPromiseHandlers.length;n++)o().possiblyUnhandledPromiseHandlers[n](e,t)}}(e,t)},1),this.dispatch(),this},e.prototype.asyncReject=function(e){this.errorHandled=!0,this.reject(e)},e.prototype.dispatch=function(){var t=this,n=this.dispatching,i=this.resolved,a=this.rejected,u=this.handlers;if(!n&&(i||a)){this.dispatching=!0,o().activeCount+=1;for(var c=function(n){var o=u[n],c=o.onSuccess,s=o.onError,d=o.promise,f=void 0;if(i)try{f=c?c(t.value):t.value}catch(e){return d.reject(e),"continue"}else if(a){if(!s)return d.reject(t.error),"continue";try{f=s(t.error)}catch(e){return d.reject(e),"continue"}}f instanceof e&&(f.resolved||f.rejected)?(f.resolved?d.resolve(f.value):d.reject(f.error),f.errorHandled=!0):r(f)?f instanceof e&&(f.resolved||f.rejected)?f.resolved?d.resolve(f.value):d.reject(f.error):f.then(function(e){d.resolve(e)},function(e){d.reject(e)}):d.resolve(f)},s=0;s<u.length;s++)c(s);u.length=0,this.dispatching=!1,o().activeCount-=1,0===o().activeCount&&e.flushQueue()}},e.prototype.then=function(t,n){if(t&&"function"!=typeof t&&!t.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 r=new e;return this.handlers.push({promise:r,onSuccess:t,onError:n}),this.errorHandled=!0,this.dispatch(),r},e.prototype.catch=function(e){return this.then(void 0,e)},e.prototype.finally=function(t){if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.finally expected a function");return this.then(function(n){return e.try(t).then(function(){return n})},function(n){return e.try(t).then(function(){throw n})})},e.prototype.timeout=function(e,t){var n=this;if(this.resolved||this.rejected)return this;var r=setTimeout(function(){n.resolved||n.rejected||n.reject(t||new Error("Promise timed out after "+e+"ms"))},e);return this.then(function(e){return clearTimeout(r),e})},e.prototype.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},e.resolve=function(t){return t instanceof e?t:r(t)?new e(function(e,n){return t.then(e,n)}):(new e).resolve(t)},e.reject=function(t){return(new e).reject(t)},e.all=function(t){var n=new e,o=t.length,i=[];if(!o)return n.resolve(i),n;for(var a=function(a){var u=t[a];if(u instanceof e){if(u.resolved)return i[a]=u.value,o-=1,"continue"}else if(!r(u))return i[a]=u,o-=1,"continue";e.resolve(u).then(function(e){i[a]=e,0==(o-=1)&&n.resolve(i)},function(e){n.reject(e)})},u=0;u<t.length;u++)a(u);return 0===o&&n.resolve(i),n},e.hash=function(t){var n={};return e.all(Object.keys(t).map(function(r){return e.resolve(t[r]).then(function(e){n[r]=e})})).then(function(){return n})},e.map=function(t,n){return e.all(t.map(n))},e.onPossiblyUnhandledException=function(e){return function(e){return o().possiblyUnhandledPromiseHandlers.push(e),{cancel:function(){o().possiblyUnhandledPromiseHandlers.splice(o().possiblyUnhandledPromiseHandlers.indexOf(e),1)}}}(e)},e.try=function(t,n,r){if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.try expected a function");var o=void 0;try{o=t.apply(n,r||[])}catch(t){return e.reject(t)}return e.resolve(o)},e.delay=function(t){return new e(function(e){setTimeout(e,t)})},e.isPromise=function(t){return!!(t&&t instanceof e)||r(t)},e.flush=function(){var t=new e;return o().flushPromises.push(t),0===o().activeCount&&e.flushQueue(),t},e.flushQueue=function(){var e=o().flushPromises;o().flushPromises=[];for(var t=0,n=null==e?0:e.length;t<n;t++)e[t].resolve()},e}();n.d(t,"a",function(){return i})},function(e,t,n){"use strict";var r,o={REQUEST:"postrobot_message_request",RESPONSE:"postrobot_message_response",ACK:"postrobot_message_ack"},i={SUCCESS:"success",ERROR:"error"},a={METHOD:"postrobot_method",HELLO:"postrobot_hello",OPEN_TUNNEL:"postrobot_open_tunnel"},u={POSTROBOT:"__postRobot__"},c={POST_MESSAGE:"postrobot_post_message",BRIDGE:"postrobot_bridge",GLOBAL:"postrobot_global"},s={MOCK:"mock:",FILE:"file:"},d={CROSS_DOMAIN_ZALGO_PROMISE:"cross_domain_zalgo_promise",CROSS_DOMAIN_FUNCTION:"cross_domain_function",CROSS_DOMAIN_WINDOW:"cross_domain_window"},f={ALLOW_POSTMESSAGE_POPUP:!("__ALLOW_POSTMESSAGE_POPUP__"in window)||window.__ALLOW_POSTMESSAGE_POPUP__,BRIDGE_TIMEOUT:5e3,CHILD_WINDOW_TIMEOUT:5e3,ACK_TIMEOUT:2e3,ACK_TIMEOUT_KNOWN:1e4,RES_TIMEOUT:-1,ALLOWED_POST_MESSAGE_METHODS:(r={},r[c.POST_MESSAGE]=!0,r[c.BRIDGE]=!0,r[c.GLOBAL]=!0,r)};0===window.location.href.indexOf(s.FILE)&&(f.ALLOW_POSTMESSAGE_POPUP=!0),n.d(t,"b",function(){return f}),n.d(t,"e",function(){return o}),n.d(t,"c",function(){return i}),n.d(t,"d",function(){return a}),n.d(t,"j",function(){return u}),n.d(t,"g",function(){return c}),n.d(t,"f",function(){return s}),n.d(t,"a",function(){return"__postrobot_bridge__"}),n.d(t,!1,function(){return"__postrobot_proxy__"}),n.d(t,"i",function(){return"*"}),n.d(t,"h",function(){return d})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"ZOID",function(){return r}),n.d(t,"__ZOID__",function(){return o}),n.d(t,"POST_MESSAGE",function(){return i}),n.d(t,"PROP_TYPES",function(){return a}),n.d(t,"INITIAL_PROPS",function(){return u}),n.d(t,"WINDOW_REFERENCES",function(){return c}),n.d(t,"PROP_SERIALIZATION",function(){return s}),n.d(t,"PROP_TYPES_LIST",function(){return d}),n.d(t,"CONTEXT",function(){return f}),n.d(t,"CLASS_NAMES",function(){return l}),n.d(t,"EVENTS",function(){return p}),n.d(t,"ATTRIBUTES",function(){return h}),n.d(t,"ANIMATION_NAMES",function(){return w}),n.d(t,"EVENT_NAMES",function(){return m}),n.d(t,"CLOSE_REASONS",function(){return y}),n.d(t,"CONTEXT_LIST",function(){return v}),n.d(t,"DELEGATE",function(){return g}),n.d(t,"WILDCARD",function(){return E}),n.d(t,"DEFAULT_DIMENSIONS",function(){return O});var r="zoid",o="__"+r+"__",i={DELEGATE:r+"_delegate",ALLOW_DELEGATE:r+"_allow_delegate"},a={STRING:"string",OBJECT:"object",FUNCTION:"function",BOOLEAN:"boolean",NUMBER:"number",ARRAY:"array"},u={RAW:"raw",UID:"uid"},c={OPENER:"opener",TOP:"top",PARENT:"parent",GLOBAL:"global"},s={JSON:"json",DOTIFY:"dotify",BASE64:"base64"},d=Object.keys(a).map(function(e){return a[e]}),f={IFRAME:"iframe",POPUP:"popup"},l={ZOID:""+r,OUTLET:r+"-outlet",COMPONENT_FRAME:r+"-component-frame",PRERENDER_FRAME:r+"-prerender-frame",VISIBLE:r+"-visible",INVISIBLE:r+"-invisible"},p={CLOSE:r+"-close"},h={IFRAME_PLACEHOLDER:"data-zoid-"+r+"-placeholder"},w={SHOW_CONTAINER:r+"-show-container",SHOW_COMPONENT:r+"-show-component",HIDE_CONTAINER:r+"-hide-container",HIDE_COMPONENT:r+"-hide-component"},m={CLICK:"click"},y={PARENT_CALL:"parent_call",CHILD_CALL:"child_call",CLOSE_DETECTED:"close_detected",USER_CLOSED:"user_closed",PARENT_CLOSE_DETECTED:"parent_close_detected"},v=Object.keys(f).map(function(e){return f[e]}),g={CALL_ORIGINAL:"call_original",CALL_DELEGATE:"call_delegate"},E="*",O={WIDTH:"300px",HEIGHT:"150px"}},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),t.c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;function n(e){return u.getOrSet(e,t)}return{has:function(t){return n(t).hasOwnProperty(e)},get:function(t,r){var o=n(t);return o.hasOwnProperty(e)?o[e]:r},set:function(t,r){return n(t)[e]=r,r},del:function(t){delete n(t)[e]},getOrSet:function(t,r){var o=n(t);if(o.hasOwnProperty(e))return o[e];var i=r();return o[e]=i,i}}},t.b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c,n=Object(o.getOrSet)(a,e,t);return{has:function(e){return n.hasOwnProperty(e)},get:function(e,t){return n.hasOwnProperty(e)?n[e]:t},set:function(e,t){return n[e]=t,t},del:function(e){delete n[e]},getOrSet:function(e,t){if(n.hasOwnProperty(e))return n[e];var r=t();return n[e]=r,r},reset:function(){n=t()},keys:function(){return Object.keys(n)}}},n(0);var r=n(8),o=n(1),i=n(3),a=window[i.j.POSTROBOT]=window[i.j.POSTROBOT]||{},u=a.windowStore=a.windowStore||new r.a,c=function(){return{}}},function(e,t,n){"use strict";var r=n(0),o=n(2),i=n(1),a=n(3),u=n(5);u.a.instanceID=u.a.instanceID||Object(i.uniqueID)();var c=Object(u.c)("helloPromises");function s(e){return c.getOrSet(e,function(){return new o.a})}var d=Object(i.once)(function(){u.a.on(a.d.HELLO,{domain:a.i},function(e){var t=e.source,n=e.origin;return s(t).resolve({win:t,domain:n}),{instanceID:u.a.instanceID}})});function f(e){return u.a.send(e,a.d.HELLO,{instanceID:u.a.instanceID},{domain:a.i,timeout:-1}).then(function(t){var n=t.origin,r=t.data.instanceID;return s(e).resolve({win:e,domain:n}),{win:e,domain:n,instanceID:r}})}var l=Object(i.weakMapMemoizePromise)(function(e){return f(e).then(function(e){return e.instanceID})});function p(){d();var e=Object(r.getAncestor)();e&&f(e).catch(i.noop)}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Window",r=s(e);return-1!==t&&(r=r.timeout(t,new Error(n+" did not load after "+t+"ms"))),r}function w(){return!!Object(r.getUserAgent)(window).match(/MSIE|trident|edge\/12|edge\/13/i)||!a.b.ALLOW_POSTMESSAGE_POPUP}var m=Object(u.c)("knownWindows");function y(e){m.set(e,!0)}function v(e){return m.get(e,!1)}n.d(t,"g",function(){return f}),n.d(t,"b",function(){return l}),n.d(t,"c",function(){return p}),n.d(t,"a",function(){return h}),n.d(t,"f",function(){return w}),n.d(t,"e",function(){return y}),n.d(t,"d",function(){return v})},function(e,t,n){"use strict";t.b=a,t.a=function(e){if("undefined"!=typeof window&&"function"==typeof window.atob)return window.atob(e);if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")},t.w=u,t.i=function(){if("undefined"!=typeof window)return window;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("No global found")},t.n=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new o.a;function i(){for(var t=arguments.length,o=Array(t),i=0;i<t;i++)o[i]=arguments[i];var a=r.getOrSet(n.thisNamespace?this:e,function(){return{}}),u=s(o),c=n.time;if(a[u]&&c&&Date.now()-a[u].time<c&&delete a[u],a[u])return a[u].value;var d=Date.now(),f=e.apply(this,arguments);return a[u]={time:d,value:f},a[u].value}return i.reset=function(){r.delete(n.thisNamespace?t:e)},n.name&&(i.displayName=n.name+":memoized"),i},t.o=function(e){var t={};function n(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=s(r);return t.hasOwnProperty(i)?t[i]:(t[i]=e.apply(this,arguments).finally(function(){delete t[i]}),t[i])}return n.reset=function(){t={}},n},t.r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};function n(){return r.a.try(e,this,arguments)}return t.name&&(n.displayName=t.name+":promisified"),n},t.k=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=e.__inline_memoize_cache__=e.__inline_memoize_cache__||{},o=s(n);return r.hasOwnProperty(o)?r[o]:r[o]=t.apply(void 0,n)},t.p=function(){},t.q=function(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}},t.v=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(n>=3)return"stringifyError stack overflow";try{if(!t)return"<unknown error: "+Object.prototype.toString.call(t)+">";if("string"==typeof t)return t;if(t instanceof Error){var r=t&&t.stack,o=t&&t.message;if(r&&o)return-1!==r.indexOf(o)?r:o+"\n"+r;if(r)return r;if(o)return o}return"function"==typeof t.toString?t.toString():Object.prototype.toString.call(t)}catch(t){return"Error while stringifying error: "+e(t,n+1)}},t.u=function(e){return"string"==typeof e?e:e&&"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)},t.h=function(e,t){if(!t)return e;if(Object.assign)return Object.assign(e,t);for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},t.t=function(e,t){var n=void 0;return function r(){n=setTimeout(function(){e(),r()},t)}(),{cancel:function(){clearTimeout(n)}}},t.f=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(var o in n=n?n+".":n,t)t.hasOwnProperty(o)&&void 0!==t[o]&&null!==t[o]&&"function"!=typeof t[o]&&(t[o]&&Array.isArray(t[o])&&t[o].length&&t[o].every(function(e){return"object"!==(void 0===e?"undefined":i(e))})?r[""+n+o+"[]"]=t[o].join(","):t[o]&&"object"===i(t[o])?r=e(t[o],""+n+o,r):r[""+n+o]=t[o].toString());return r},t.g=function(){var e={},t={};return{on:function(e,n){var r=t[e]=t[e]||[];r.push(n);var o=!1;return{cancel:function(){o||(o=!0,r.splice(r.indexOf(n),1))}}},once:function(e,t){var n=this.on(e,function(){n.cancel(),t()});return n},trigger:function(e){var n=t[e];if(n)for(var r=0,o=null==n?0:n.length;r<o;r++)(0,n[r])()},triggerOnce:function(t){e[t]||(e[t]=!0,this.trigger(t))}}},t.d=function(e){return e.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})},t.c=function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},t.s=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(Array.isArray(t)){for(var o=t.length,i=[],a=function(o){d(i,o,function(){var i=r?r+"."+o:""+o,a=t[o],u=n(a,o,i);return(l(u)||Array.isArray(u))&&(u=e(u,n,i)),u})},u=0;u<o;u++)a(u);return i}if(l(t)){var c={},s=function(o){if(!t.hasOwnProperty(o))return"continue";d(c,o,function(){var i=r?r+"."+o:""+o,a=t[o],u=n(a,o,i);return(l(u)||Array.isArray(u))&&(u=e(u,n,i)),u})};for(var f in t)s(f);return c}throw new Error("Pass an object or array")},t.l=function(e){return null!==e&&void 0!==e},t.e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=void 0;return function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout(function(){return e.apply(r,o)},t)}},t.m=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},n.d(t,"x",function(){return p}),n.d(t,"y",function(){return h}),t.j=function(e,t,n){if(e.hasOwnProperty(t))return e[t];var r=n();return e[t]=r,r};var r=n(2),o=n(8),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};function a(e){if("undefined"!=typeof window&&"function"==typeof window.btoa)return window.btoa(e);if("undefined"!=typeof Buffer)return Buffer.from(e,"utf8").toString("base64");throw new Error("Can not find window.btoa or Buffer")}function u(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,function(){return e.charAt(Math.floor(Math.random()*e.length))})+"_"+a((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}var c=void 0;function s(e){try{return JSON.stringify(Array.prototype.slice.call(e),function(e,t){return"function"==typeof t?"memoize["+function(e){if(c=c||new o.a,null===e||void 0===e||"object"!==(void 0===e?"undefined":i(e))&&"function"!=typeof e)throw new Error("Invalid object");var t=c.get(e);return t||(t=(void 0===e?"undefined":i(e))+":"+u(),c.set(e,t)),t}(t)+"]":t})}catch(e){throw new Error("Arguments not serializable -- can not be used to memoize")}}function d(e,t,n){if(Array.isArray(e)){if("number"!=typeof t)throw new TypeError("Array key must be number")}else if("object"===(void 0===e?"undefined":i(e))&&null!==e&&"string"!=typeof t)throw new TypeError("Object key must be string");Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){delete e[t];var r=n();return e[t]=r,r},set:function(n){delete e[t],e[t]=n}})}function f(e){return"object"===(void 0===(t=e)?"undefined":i(t))&&null!==t&&"[object Object]"===Object.prototype.toString.call(e);var t}function l(e){if(!f(e))return!1;var t=e.constructor;if("function"!=typeof t)return!1;var n=t.prototype;return!!f(n)&&!!n.hasOwnProperty("isPrototypeOf")}var p=function(e){var t=new o.a;return function(n){var r=this;return t.getOrSet(n,function(){return e.call(r,n)})}},h=function(e){var t=new o.a;return function(n){var r=this;return t.getOrSet(n,function(){return e.call(r,n).finally(function(){t.delete(n)})})}}},function(e,t,n){"use strict";n.d({},"WeakMap",function(){return u});var r=n(0);function o(e,t){for(var n=0;n<e.length;n++)try{if(e[n]===t)return n}catch(e){}return-1}var i=Object.defineProperty,a=Date.now()%1e9,u=function(){function e(){if(function(t,n){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this),a+=1,this.name="__weakmap_"+(1e9*Math.random()>>>0)+"__"+a,function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var e=new WeakMap,t={};return Object.freeze(t),e.set(t,"__testvalue__"),"__testvalue__"===e.get(t)}catch(e){return!1}}())try{this.weakmap=new WeakMap}catch(e){}this.keys=[],this.values=[]}return e.prototype._cleanupClosedWindows=function(){for(var e=this.weakmap,t=this.keys,n=0;n<t.length;n++){var o=t[n];if(Object(r.isWindow)(o)&&Object(r.isWindowClosed)(o)){if(e)try{e.delete(o)}catch(e){}t.splice(n,1),this.values.splice(n,1),n-=1}}},e.prototype.isSafeToReadWrite=function(e){if(Object(r.isWindow)(e))return!1;try{e&&e.self,e&&e[this.name]}catch(e){return!1}return!0},e.prototype.set=function(e,t){if(!e)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{n.set(e,t)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e)){var r=this.name,a=e[r];a&&a[0]===e?a[1]=t:i(e,r,{value:[e,t],writable:!0})}else{this._cleanupClosedWindows();var u=this.keys,c=this.values,s=o(u,e);-1===s?(u.push(e),c.push(t)):c[s]=t}},e.prototype.get=function(e){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{if(t.has(e))return t.get(e)}catch(e){delete this.weakmap}if(!this.isSafeToReadWrite(e)){this._cleanupClosedWindows();var n=o(this.keys,e);if(-1===n)return;return this.values[n]}var r=e[this.name];if(r&&r[0]===e)return r[1]},e.prototype.delete=function(e){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.delete(e)}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e)){var n=e[this.name];n&&n[0]===e&&(n[0]=n[1]=void 0)}else{this._cleanupClosedWindows();var r=this.keys,i=o(r,e);-1!==i&&(r.splice(i,1),this.values.splice(i,1))}},e.prototype.has=function(e){if(!e)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{if(t.has(e))return!0}catch(e){delete this.weakmap}if(this.isSafeToReadWrite(e)){var n=e[this.name];return!(!n||n[0]!==e)}return this._cleanupClosedWindows(),-1!==o(this.keys,e)},e.prototype.getOrSet=function(e,t){if(this.has(e))return this.get(e);var n=t();return this.set(e,n),n},e}();n.d(t,"a",function(){return u})},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return o});var r={MOCK:"mock:",FILE:"file:",ABOUT:"about:"},o="*"},function(e,t,n){"use strict";t.a=function(){return!!(window.navigator.mockUserAgent||window.navigator.userAgent).match(/Android|webOS|iPhone|iPad|iPod|bada|Symbian|Palm|CriOS|BlackBerry|IEMobile|WindowsMobile|Opera Mini/i)}},function(e,t,n){"use strict";var r=n(2),o=n(0),i=n(8),a=n(7);n(10),t.s=function(){return f().then(function(){if(document.body)return document.body;throw new Error("Document ready but document.body not present")})},t.j=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.query||{},o=n.hash||{},i=void 0,a=e.split("#");i=a[0],t=a[1];var u=i.split("?");i=u[0];var c=p(u[1],r),s=p(t,o);return c&&(i=i+"?"+c),s&&(i=i+"#"+s),i},t.n=function e(){return Object(a.k)(e,function(){try{if("undefined"==typeof window)return!1;if(window.localStorage){var e=Math.random().toString();window.localStorage.setItem("__test__localStorage__",e);var t=window.localStorage.getItem("__test__localStorage__");if(window.localStorage.removeItem("__test__localStorage__"),e===t)return!0}}catch(e){}return!1})},t.e=h,t.k=m,t.i=function(e){return new r.a(function(t,n){var r=Object(a.u)(e),o=w(e);if(o)return t(o);if(s())return n(new Error("Document is ready and element "+r+" does not exist"));var i=setInterval(function(){return(o=w(e))?(clearInterval(i),t(o)):s()?(clearInterval(i),n(new Error("Document is ready and element "+r+" does not exist"))):void 0},10)})},t.a=y,t.u=function(e,t){var n=t.tagName.toLowerCase();if("html"!==n)throw new Error("Expected element to be html, got "+n);for(var r=e.document.documentElement;r.children&&r.children.length;)r.removeChild(r.children[0]);for(;t.children.length;)r.appendChild(t.children[0])},t.f=g,t.g=function(e){return e.contentWindow?r.a.resolve(e.contentWindow):g(e).then(function(e){if(!e.contentWindow)throw new Error("Could not find window in iframe");return e.contentWindow})},t.m=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,o=m(n),i=t.attributes||{},u=t.style||{},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];e=e.toLowerCase();var r=document.createElement(e);if(t.style&&Object(a.h)(r.style,t.style),t.class&&(r.className=t.class.join(" ")),t.attributes)for(var o=0,i=Object.keys(t.attributes),u=null==i?0:i.length;o<u;o++){var c=i[o];r.setAttribute(c,t.attributes[c])}if(t.styleSheet&&function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.document;e.styleSheet?e.styleSheet.cssText=t:e.appendChild(n.createTextNode(t))}(r,t.styleSheet),n&&h(n,r),t.html)if("iframe"===e){if(!n||!r.contentWindow)throw new Error("Iframe html can not be written unless container provided and iframe in DOM");!function(e,t){try{e.document.open(),e.document.write(t),e.document.close()}catch(n){try{e.location="javascript: document.open(); document.write("+JSON.stringify(t)+"); document.close();"}catch(e){}}}(r.contentWindow,t.html)}else r.innerHTML=t.html;return r}("iframe",{attributes:c({frameBorder:"0",allowTransparency:"true"},i),style:c({backgroundColor:"transparent"},u),html:t.html,class:t.class});g(s),o.appendChild(s);var d=s.contentWindow;if(d)try{Object(a.p)(d.name)}catch(i){if(o.removeChild(s),!r)throw new Error("Frame is cross-domain: "+i.stack);return e(t,n,r-1)}return(t.url||window.navigator.userAgent.match(/MSIE|Edge/i))&&s.setAttribute("src",t.url||"about:blank"),s},t.c=function(e,t,n){return e.addEventListener(t,n),{cancel:function(){e.removeEventListener(t,n)}}},t.r=_,t.l=A,t.h=function(e){e.parentNode&&e.parentNode.removeChild(e)},t.q=function(e,t,n){var r=T(e,t,n);return _(e),r},t.d=function(e,t,n){return T(e,t,n).then(function(){A(e)})},t.b=function(e,t){e.classList?e.classList.add(t):-1===e.className.split(/\s+/).indexOf(t)&&(e.className+=" "+t)},t.p=function(e,t){e.classList?e.classList.remove(t):-1!==e.className.split(/\s+/).indexOf(t)&&(e.className=e.className.replace(t,""))},t.t=function(e,t){t=Object(a.q)(t);var n=void 0;return P(e)?t():n=Object(a.t)(function(){P(e)&&(n.cancel(),t())},50),{cancel:function(){n&&n.cancel()}}},t.o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.width,o=void 0===r||r,i=n.height,a=void 0===i||i,u=n.interval,c=void 0===u?100:u,s=n.win,d=void 0===s?window:s,f=e.offsetWidth,l=e.offsetHeight;t({width:f,height:l});var p=function(){var n=e.offsetWidth,r=e.offsetHeight;(o&&n!==f||a&&r!==l)&&t({width:n,height:r}),f=n,l=r},h=void 0,w=void 0;return void 0!==d.ResizeObserver?(h=new d.ResizeObserver(p)).observe(e):void 0!==d.MutationObserver?((h=new d.MutationObserver(p)).observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!1}),d.addEventListener("resize",p)):function e(){p(),w=setTimeout(e,c)}(),{cancel:function(){h.disconnect(),window.removeEventListener("resize",p),clearTimeout(w)}}};var u="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},c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function s(){return Boolean(document.body)&&"complete"===document.readyState}function d(e){return e.replace(/\?/g,"%3F").replace(/&/g,"%26").replace(/#/g,"%23").replace(/\+/g,"%2B")}function f(){return Object(a.k)(f,function(){return new r.a(function(e){if(s())return e();var t=setInterval(function(){if(s())return clearInterval(t),e()},10)})})}function l(e){return Object(a.k)(l,function(){var t={};if(!e)return t;if(-1===e.indexOf("="))return t;for(var n=0,r=e.split("&"),o=null==r?0:r.length;n<o;n++){var i=r[n];(i=i.split("="))[0]&&i[1]&&(t[decodeURIComponent(i[0])]=decodeURIComponent(i[1]))}return t},[e])}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t&&Object.keys(t).length?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).filter(function(t){return"string"==typeof e[t]}).map(function(t){return d(t)+"="+d(e[t])}).join("&")}(c({},l(e),t)):e}function h(e,t){e.appendChild(t)}function w(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return(t=e)instanceof window.Element||null!==t&&"object"===(void 0===t?"undefined":u(t))&&1===t.nodeType&&"object"===u(t.style)&&"object"===u(t.ownerDocument)?e:"string"==typeof e?n.querySelector(e):void 0}function m(e){var t=w(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:document);if(t)return t;throw new Error("Can not find element: "+Object(a.u)(e))}function y(e){this.message=e}y.prototype=Object.create(Error.prototype);var v=void 0;function g(e){if((v=v||new i.a).has(e)){var t=v.get(e);if(t)return t}var n=new r.a(function(t,n){e.addEventListener("load",function(){Object(o.linkFrameWindow)(e),t(e)}),e.addEventListener("error",function(r){e.contentWindow?t(e):n(r)})});return v.set(e,n),n}function E(e,t,n){n=Object(a.q)(n);for(var r=0,o=null==t?0:t.length;r<o;r++){var i=t[r];e.addEventListener(i,n)}return{cancel:Object(a.q)(function(){for(var r=0,o=null==t?0:t.length;r<o;r++){var i=t[r];e.removeEventListener(i,n)}})}}var O=["webkit","moz","ms","o"];function b(e,t,n){e.style[t]=n;for(var r=Object(a.c)(t),o=0,i=null==O?0:O.length;o<i;o++){var u=O[o];e.style[""+u+r]=n}}var S=["animationstart","webkitAnimationStart","oAnimationStart","MSAnimationStart"],C=["animationend","webkitAnimationEnd","oAnimationEnd","MSAnimationEnd"];function T(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3;return new r.a(function(r,i){var a=m(e);if(!a||!function(e,t){var n=window.CSSRule,r=n.KEYFRAMES_RULE||n.WEBKIT_KEYFRAMES_RULE||n.MOZ_KEYFRAMES_RULE||n.O_KEYFRAMES_RULE||n.MS_KEYFRAMES_RULE,o=e.ownerDocument.styleSheets;try{for(var i=0;i<o.length;i++){var a=o[i].cssRules;if(a)for(var u=0;u<a.length;u++){var c=a[u];if(c&&c.type===r&&c.name===t)return!0}}}catch(e){return!1}return!1}(a,t))return r();var u=!1,c=void 0,s=void 0,d=void 0,f=void 0;function l(){b(a,"animationName",""),clearTimeout(c),clearTimeout(s),d.cancel(),f.cancel()}d=E(a,S,function(e){e.target===a&&e.animationName===t&&(clearTimeout(c),e.stopPropagation(),d.cancel(),u=!0,s=setTimeout(function(){l(),r()},o))}),f=E(a,C,function(e){if(e.target===a&&e.animationName===t)return l(),"string"==typeof e.animationName&&e.animationName!==t?i("Expected animation name to be "+t+", found "+e.animationName):r()}),b(a,"animationName",t),c=setTimeout(function(){if(!u)return l(),r()},200),n&&n(l)})}var j={DISPLAY:{NONE:"none",BLOCK:"block"},VISIBILITY:{VISIBLE:"visible",HIDDEN:"hidden"},IMPORTANT:"important"};function _(e){e.style.setProperty("display","")}function A(e){e.style.setProperty("display",j.DISPLAY.NONE,j.IMPORTANT)}function P(e){return!e||!e.parentNode}},function(e,t,n){"use strict";t.a=function e(t){var n=t.name,i=t.version,a=void 0===i?"latest":i,u=t.lifetime,c=void 0===u?3e5:u;return Object(r.k)(e,function(){var e="__"+n+"_"+a+"_storage__",t=void 0;function i(n){var i=Object(o.n)(),a=void 0;if(t&&(a=t),!a&&i){var u=window.localStorage.getItem(e);u&&(a=JSON.parse(u))}a||(a=Object(r.i)()[e]),a||(a={id:Object(r.w)()}),a.id||(a.id=Object(r.w)()),t=a;var c=n(a);return i?window.localStorage.setItem(e,JSON.stringify(a)):Object(r.i)()[e]=a,t=null,c}function u(e){return i(function(t){var n=t.__session__,o=Date.now();return n&&o-n.created>c&&(n=null),n||(n={guid:Object(r.w)(),created:o}),t.__session__=n,e(n)})}return{getState:i,getID:function(){return i(function(e){return e.id})},getSessionState:function(e){return u(function(t){return t.state=t.state||{},e(t.state)})},getSessionID:function(){return u(function(e){return e.guid})}}},[{name:n,version:a,lifetime:c}])};var r=n(7),o=n(11)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(3);function i(e,t){if(!o.b.ALLOW_POSTMESSAGE_POPUP&&!1===Object(r.isSameTopWindow)(e,t))throw new Error("Can not send and receive post messages between two different windows (disabled to emulate IE)")}n.d(t,"emulateIERestrictions",function(){return i})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=n(0),i=n(1),a=n(3),u=n(5),c=Object(u.b)("tunnelWindows");function s(){return!!Object(o.getUserAgent)(window).match(/MSIE|trident|edge\/12|edge\/13/i)||!a.b.ALLOW_POSTMESSAGE_POPUP}function d(e){return!Object(o.isSameTopWindow)(window,e)}function f(e,t){if(e){if(Object(o.getDomain)()!==Object(o.getDomainFromUrl)(e))return!0}else if(t&&!Object(o.isSameDomain)(t))return!0;return!1}function l(e){var t=e.win,n=e.domain;return!(!s()||n&&!f(n,t)||t&&!d(t))}function p(e){var t=(e=e||Object(o.getDomainFromUrl)(e)).replace(/[^a-zA-Z0-9]+/g,"_");return a.a+"_"+t}function h(){return Boolean(window.name&&window.name===p(Object(o.getDomain)()))}u.a.openTunnelToParent=function(e){var t=e.name,n=e.source,r=e.canary,s=e.sendMessage,d=Object(o.getParent)(window);if(!d)throw new Error("No parent window found to open tunnel to");var f=function(e){var t=e.name,n=e.source,r=e.canary,a=e.sendMessage;!function(){for(var e=0,t=c.keys(),n=null==t?0:t.length;e<n;e++){var r=t[e],a=c[r];try{Object(i.noop)(a.source)}catch(e){c.del(r);continue}Object(o.isWindowClosed)(a.source)&&c.del(r)}}();var u=Object(i.uniqueID)();return c.set(u,{name:t,source:n,canary:r,sendMessage:a}),u}({name:t,source:n,canary:r,sendMessage:s});return u.a.send(d,a.d.OPEN_TUNNEL,{name:t,sendMessage:function(){var e=c.get(f);try{Object(i.noop)(e&&e.source)}catch(e){return void c.del(f)}if(e&&e.source&&!Object(o.isWindowClosed)(e.source)){try{e.canary()}catch(e){return}e.sendMessage.apply(this,arguments)}}},{domain:a.i})};var w=new r.a(function(e){if(window.document&&window.document.body)return e(window.document.body);var t=setInterval(function(){if(window.document&&window.document.body)return clearInterval(t),e(window.document.body)},10)}),m=Object(u.c)("remoteWindows");function y(e){m.getOrSet(e,function(){return new r.a})}function v(e){var t=m.get(e);if(!t)throw new Error("Remote window not found");return t}function g(e,t,n){v(e).resolve(function(r,i,a){if(r!==e)throw new Error("Remote window does not match window");if(!Object(o.matchDomain)(i,t))throw new Error("Remote domain "+i+" does not match domain "+t);n(a)})}function E(e,t){v(e).reject(t).catch(i.noop)}function O(e,t,n){var r=Object(o.isOpener)(window,e),i=Object(o.isOpener)(e,window);if(!r&&!i)throw new Error("Can only send messages to and from parent and popup windows");return v(e).then(function(r){return r(e,t,n)})}var b=Object(i.weakMapMemoize)(function(e){return r.a.try(function(){try{var t=Object(o.getFrameByName)(e,p(Object(o.getDomain)()));if(!t)return;return Object(o.isSameDomain)(t)&&t[a.j.POSTROBOT]?t:new r.a(function(e){var n=void 0,r=void 0;n=setInterval(function(){if(t&&Object(o.isSameDomain)(t)&&t[a.j.POSTROBOT])return clearInterval(n),clearTimeout(r),e(t)},100),r=setTimeout(function(){return clearInterval(n),e()},2e3)})}catch(e){}})});function S(){return r.a.try(function(){var e=Object(o.getOpener)(window);if(e&&l({win:e}))return y(e),b(e).then(function(t){return t?window.name?t[a.j.POSTROBOT].openTunnelToParent({name:window.name,source:window,canary:function(){},sendMessage:function(e){try{Object(i.noop)(window)}catch(e){return}if(window&&!window.closed)try{u.a.receiveMessage({data:e,origin:this.origin,source:this.source})}catch(e){r.a.reject(e)}}}).then(function(t){var n=t.source,r=t.origin,o=t.data;if(n!==e)throw new Error("Source does not match opener");g(n,r,o.sendMessage)}).catch(function(t){throw E(e,t),t}):E(e,new Error("Can not register with opener: window does not have a name")):E(e,new Error("Can not register with opener: no bridge found in opener"))})})}var C=n(6),T=Object(u.b)("bridges"),j=Object(u.b)("bridgeFrames"),_=Object(u.b)("popupWindowsByName"),A=Object(u.c)("popupWindowsByWin");function P(e,t){return T.has(t||Object(o.getDomainFromUrl)(e))}function D(e,t){return t=t||Object(o.getDomainFromUrl)(e),T.getOrSet(t,function(){return r.a.try(function(){if(Object(o.getDomain)()===t)throw new Error("Can not open bridge on the same domain as current domain: "+t);var n=p(t);if(Object(o.getFrameByName)(window,n))throw new Error("Frame with name "+n+" already exists on page");var i=function(e,t){var n=document.createElement("iframe");return n.setAttribute("name",e),n.setAttribute("id",e),n.setAttribute("style","display: none; margin: 0; padding: 0; border: 0px none; overflow: hidden;"),n.setAttribute("frameborder","0"),n.setAttribute("border","0"),n.setAttribute("scrolling","no"),n.setAttribute("allowTransparency","true"),n.setAttribute("tabindex","-1"),n.setAttribute("hidden","true"),n.setAttribute("title",""),n.setAttribute("role","presentation"),n.src=t,n}(n,e);return j.set(t,i),w.then(function(n){n.appendChild(i);var o=i.contentWindow;return function(e,t){u.a.on(a.d.OPEN_TUNNEL,{window:e,domain:t},function(e){var n=e.origin,o=e.data;if(n!==t)throw new Error("Domain "+t+" does not match origin "+n);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(!_.has(o.name))throw new Error("Window with name "+o.name+" does not exist, or was not opened by this window");if(!_.get(o.name).domain)throw new Error("We do not have a registered domain for window "+o.name);if(_.get(o.name).domain!==n)throw new Error("Message origin "+n+" does not matched registered window origin "+_.get(o.name).domain);return g(_.get(o.name).win,t,o.sendMessage),{sendMessage:function(e){if(window&&!window.closed){var t=_.get(o.name);if(t)try{u.a.receiveMessage({data:e,origin:t.domain,source:t.win})}catch(e){r.a.reject(e)}}}}})}(o,t),new r.a(function(e,t){i.onload=e,i.onerror=t}).then(function(){return Object(C.a)(o,a.b.BRIDGE_TIMEOUT,"Bridge "+e)}).then(function(){return o})})})})}var N=window.open;function I(e,t){A.has(e)&&(A.get(e).domain=Object(o.getDomainFromUrl)(t),y(e))}function R(){for(var e=0,t=j.keys(),n=null==t?0:t.length;e<n;e++){var r=t[e],o=j.get(r);o&&o.parentNode&&o.parentNode.removeChild(o)}j.reset(),T.reset()}window.open=function(e,t,n,r){var i=e;if(e&&0===e.indexOf(a.f.MOCK)){var u=e.split("|");i=u[0],e=u[1]}i&&(i=Object(o.getDomainFromUrl)(i));var c=N.call(this,e,t,n,r);if(!c)return c;e&&y(c);for(var s=0,d=_.keys(),f=null==d?0:d.length;s<f;s++){var l=d[s];Object(o.isWindowClosed)(_.get(l).win)&&_.del(l)}if(t&&c){var p=A.getOrSet(c,function(){return{}});p.name=p.name||t,p.win=p.win||c,p.domain=p.domain||i,A.set(c,p),_.set(t,p)}return c},n.d(t,"openTunnelToOpener",function(){return S}),n.d(t,"needsBridgeForBrowser",function(){return s}),n.d(t,"needsBridgeForWin",function(){return d}),n.d(t,"needsBridgeForDomain",function(){return f}),n.d(t,"needsBridge",function(){return l}),n.d(t,"getBridgeName",function(){return p}),n.d(t,"isBridge",function(){return h}),n.d(t,"documentBodyReady",function(){return w}),n.d(t,"registerRemoteWindow",function(){return y}),n.d(t,"findRemoteWindow",function(){return v}),n.d(t,"registerRemoteSendMessage",function(){return g}),n.d(t,"rejectRemoteSendMessage",function(){return E}),n.d(t,"sendBridgeMessage",function(){return O}),n.d(t,"hasBridge",function(){return P}),n.d(t,"openBridge",function(){return D}),n.d(t,"linkUrl",function(){return I}),n.d(t,"destroyBridges",function(){return R})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={};n.d(r,"markWindowKnown",function(){return c.e}),n.d(r,"serializeMessage",function(){return I}),n.d(r,"deserializeMessage",function(){return R}),n.d(r,"ProxyWindow",function(){return j}),n.d(r,"cleanUpWindow",function(){return he}),n.d(r,"Promise",function(){return u.a}),n.d(r,"bridge",function(){return we}),n.d(r,"parent",function(){return pe}),n.d(r,"send",function(){return oe}),n.d(r,"requestPromises",function(){return ne}),n.d(r,"request",function(){return re}),n.d(r,"sendToParent",function(){return ie}),n.d(r,"client",function(){return ae}),n.d(r,"on",function(){return se}),n.d(r,"listen",function(){return ce}),n.d(r,"once",function(){return de}),n.d(r,"listener",function(){return fe}),n.d(r,"CONFIG",function(){return f.b}),n.d(r,"disable",function(){return le});var o={};n.d(o,"default",function(){return me}),n.d(o,"markWindowKnown",function(){return c.e}),n.d(o,"serializeMessage",function(){return I}),n.d(o,"deserializeMessage",function(){return R}),n.d(o,"ProxyWindow",function(){return j}),n.d(o,"cleanUpWindow",function(){return he}),n.d(o,"Promise",function(){return u.a}),n.d(o,"bridge",function(){return we}),n.d(o,"parent",function(){return pe}),n.d(o,"send",function(){return oe}),n.d(o,"requestPromises",function(){return ne}),n.d(o,"request",function(){return re}),n.d(o,"sendToParent",function(){return ie}),n.d(o,"client",function(){return ae}),n.d(o,"on",function(){return se}),n.d(o,"listen",function(){return ce}),n.d(o,"once",function(){return de}),n.d(o,"listener",function(){return fe}),n.d(o,"CONFIG",function(){return f.b}),n.d(o,"disable",function(){return le});var i={};n.d(i,"PopupOpenError",function(){return d.PopupOpenError}),n.d(i,"create",function(){return St}),n.d(i,"getByTag",function(){return Ct}),n.d(i,"getCurrentScriptDir",function(){return Be}),n.d(i,"useLogger",function(){return qe}),n.d(i,"destroyAll",function(){return Tt}),n.d(i,"postRobot",function(){return jt}),n.d(i,"CONSTANTS",function(){return _t});var a,u=n(2),c=n(6),s=n(0),d=n(1),f=n(3),l={FUNCTION:"function",ERROR:"error",PROMISE:"promise",REGEX:"regex",DATE:"date",ARRAY:"array",OBJECT:"object",STRING:"string",NUMBER:"number",BOOLEAN:"boolean",NULL:"null",UNDEFINED:"undefined"},p="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 h(e){return"object"===(void 0===e?"undefined":p(e))&&null!==e&&"string"==typeof e.__type__}function w(e){return void 0===e?l.UNDEFINED:null===e?l.NULL:Array.isArray(e)?l.ARRAY:"function"==typeof e?l.FUNCTION:"object"===(void 0===e?"undefined":p(e))?e instanceof Error?l.ERROR:"function"==typeof e.then?l.PROMISE:"[object RegExp]"===Object.prototype.toString.call(e)?l.REGEX:"[object Date]"===Object.prototype.toString.call(e)?l.DATE:l.OBJECT:"string"==typeof e?l.STRING:"number"==typeof e?l.NUMBER:"boolean"==typeof e?l.BOOLEAN:void 0}function m(e,t){return{__type__:e,__val__:t}}var y,v=((a={})[l.FUNCTION]=function(){},a[l.ERROR]=function(e){var t=e.message,n=e.stack,r=e.code;return m(l.ERROR,{message:t,stack:n,code:r})},a[l.PROMISE]=function(){},a[l.REGEX]=function(e){return m(l.REGEX,e.source)},a[l.DATE]=function(e){return m(l.DATE,e.toJSON())},a[l.ARRAY]=function(e){return e},a[l.OBJECT]=function(e){return e},a[l.STRING]=function(e){return e},a[l.NUMBER]=function(e){return e},a[l.BOOLEAN]=function(e){return e},a[l.NULL]=function(e){return e},a),g={},E=((y={})[l.FUNCTION]=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},y[l.ERROR]=function(e){var t=e.message,n=e.stack,r=e.code,o=new Error(t);return o.code=r,o.stack=n+"\n\n"+o.stack,o},y[l.PROMISE]=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},y[l.REGEX]=function(e){return new RegExp(e)},y[l.DATE]=function(e){return new Date(e)},y[l.ARRAY]=function(e){return e},y[l.OBJECT]=function(e){return e},y[l.STRING]=function(e){return e},y[l.NUMBER]=function(e){return e},y[l.BOOLEAN]=function(e){return e},y[l.NULL]=function(e){return e},y),O={},b=n(5),S=Object(b.c)("winToProxyWindow"),C=Object(b.b)("idToProxyWindow");function T(){for(var e=0,t=C.keys(),n=null==t?0:t.length;e<n;e++){var r=t[e];C.get(r).shouldClean()&&C.del(r)}}var j=function(){function e(t,n){!function(t,n){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this),this.serializedWindow=t,this.actualWindowPromise=new u.a,n&&this.setWindow(n),this.serializedWindow.getInstanceID=Object(d.memoizePromise)(this.serializedWindow.getInstanceID)}return e.prototype.setLocation=function(e){var t=this;return u.a.try(function(){if(!t.actualWindow)return t.serializedWindow.setLocation(e);t.actualWindow.location=e}).then(function(){return t})},e.prototype.setName=function(e){var t=this;return u.a.try(function(){if(!t.actualWindow)return t.serializedWindow.setName(e);if(!Object(s.isSameDomain)(t.actualWindow))throw new Error("Can not set name for window on different domain");t.actualWindow.name=e,t.actualWindow.frameElement&&t.actualWindow.frameElement.setAttribute("name",e)}).then(function(){return t})},e.prototype.close=function(){var e=this;return u.a.try(function(){if(!e.actualWindow)return e.serializedWindow.close();e.actualWindow.close()}).then(function(){return e})},e.prototype.focus=function(){var e=this;return u.a.try(function(){return e.actualWindow&&e.actualWindow.focus(),e.serializedWindow.focus()}).then(function(){return e})},e.prototype.isClosed=function(){var e=this;return u.a.try(function(){return e.actualWindow?Object(s.isWindowClosed)(e.actualWindow):e.serializedWindow.isClosed()})},e.prototype.setWindow=function(e){this.actualWindow=e,this.actualWindowPromise.resolve(e)},e.prototype.matchWindow=function(e){var t=this;return u.a.try(function(){return t.actualWindow?e===t.actualWindow:u.a.all([t.getInstanceID(),Object(c.b)(e)]).then(function(n){var r=n[0]===n[1];return r&&t.setWindow(e),r})})},e.prototype.unwrap=function(){return this.actualWindow||this},e.prototype.awaitWindow=function(){return this.actualWindowPromise},e.prototype.getInstanceID=function(){return this.actualWindow?Object(c.b)(this.actualWindow):this.serializedWindow.getInstanceID()},e.prototype.serialize=function(){return this.serializedWindow},e.prototype.shouldClean=function(){return this.actualWindow&&Object(s.isWindowClosed)(this.actualWindow)},e.unwrap=function(t){return e.isProxyWindow(t)?t.unwrap():t},e.serialize=function(t){return T(),e.toProxyWindow(t).serialize()},e.deserialize=function(t){return T(),C.getOrSet(t.id,function(){return new e(t)})},e.isProxyWindow=function(t){return t instanceof e},e.toProxyWindow=function(t){return T(),e.isProxyWindow(t)?t:S.getOrSet(t,function(){var n=Object(d.uniqueID)();return C.set(n,new e({id:n,getInstanceID:function(){return Object(c.b)(t)},close:function(){return u.a.try(function(){t.close()})},focus:function(){return u.a.try(function(){t.focus()})},isClosed:function(){return u.a.try(function(){return Object(s.isWindowClosed)(t)})},setLocation:function(e){return u.a.try(function(){if(Object(s.isSameDomain)(t))try{if(t.location&&"function"==typeof t.location.replace)return void t.location.replace(e)}catch(e){}t.location=e})},setName:function(e){return u.a.try(function(){t.name=e})}},t))})},e}(),_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A=Object(b.c)("methodStore"),P=Object(b.b)("proxyWindowMethods");b.a.listeningForFunctions=b.a.listeningForFunctions||!1;var D=Object(d.once)(function(){b.a.listeningForFunctions||(b.a.listeningForFunctions=!0,b.a.on(f.d.METHOD,{origin:f.i},function(e){var t=e.source,n=e.origin,r=e.data,o=r.id,i=r.name;return u.a.try(function(){var e=A.getOrSet(t,function(){return{}})[r.id]||P.get(o);if(!e)throw new Error("Could not find method '"+r.name+"' with id: "+r.id+" in "+Object(s.getDomain)(window));var i=e.proxy,a=e.domain,u=e.val;if(!Object(s.matchDomain)(a,n))throw new Error("Method '"+r.name+"' domain "+JSON.stringify(e.domain)+" does not match origin "+n+" in "+Object(s.getDomain)(window));return i?i.matchWindow(t).then(function(e){if(!e)throw new Error("Method call '"+r.name+"' failed - proxy window does not match source in "+Object(s.getDomain)(window));return u}):u}).then(function(e){return e.apply({source:t,origin:n,data:r},r.args)}).then(function(e){return{result:e,id:o,name:i}})}))});function N(e,t,n,r){D();var o=Object(d.uniqueID)();return e=j.unwrap(e),j.isProxyWindow(e)?(P.set(o,{proxy:e,domain:t,val:n}),e.awaitWindow().then(function(e){P.del(o),A.getOrSet(e,function(){return{}})[o]={domain:t,val:n}})):A.getOrSet(e,function(){return{}})[o]={domain:t,val:n},m(f.h.CROSS_DOMAIN_FUNCTION,{id:o,name:n.name||r})}function I(e,t,n){var r;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g,n=JSON.stringify(e,function(e){var n=this[e];if(h(this))return n;var r=w(n);if(!r)return n;var o=t[r]||v[r];return o?o(n,e):n});return void 0===n?l.UNDEFINED:n}(n,((r={})[l.PROMISE]=function(n,r){return function(e,t,n,r){return m(f.h.CROSS_DOMAIN_ZALGO_PROMISE,{then:N(e,t,function(e,t){return n.then(e,t)},r)})}(e,t,n,r)},r[l.FUNCTION]=function(n,r){return N(e,t,n,r)},r[l.OBJECT]=function(e){return Object(s.isWindow)(e)||j.isProxyWindow(e)?(t=e,m(f.h.CROSS_DOMAIN_WINDOW,j.serialize(t))):e;var t},r))}function R(e,t,n){var r;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:O;if(e!==l.UNDEFINED)return JSON.parse(e,function(e,n){if(h(this))return n;var r=void 0,o=void 0;if(h(n)?(r=n.__type__,o=n.__val__):(r=w(n),o=n),!r)return o;var i=t[r]||E[r];return i?i(o,e):o})}(n,((r={})[f.h.CROSS_DOMAIN_ZALGO_PROMISE]=function(e){return t=e.then,new u.a(t);var t},r[f.h.CROSS_DOMAIN_FUNCTION]=function(n){return function(e,t,n){var r=n.id,o=n.name;function i(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u.a.try(function(){return j.isProxyWindow(e)?e.awaitWindow():e}).then(function(e){return b.a.send(e,f.d.METHOD,{id:r,name:o,args:n},_({domain:t},i))})}function a(){return i(Array.prototype.slice.call(arguments)).then(function(e){return e.data.result})}return a.fireAndForget=function(){return i(Array.prototype.slice.call(arguments),{fireAndForget:!0})},a.__name__=o,a.__xdomain__=!0,a.origin=t,a}(e,t,n)},r[f.h.CROSS_DOMAIN_WINDOW]=function(e){return t=e,j.deserialize(t);var t},r))}var x={};x[f.g.POST_MESSAGE]=function(e,t,r){try{n(13).emulateIERestrictions(window,e)}catch(e){return}(Array.isArray(r)?r:"string"==typeof r?[r]:[f.i]).map(function(t){if(0===t.indexOf(f.f.MOCK)){if(window.location.protocol===f.f.FILE)return f.i;if(!Object(s.isActuallySameDomain)(e))throw new Error("Attempting to send messsage to mock domain "+t+", but window is actually cross-domain");return Object(s.getActualDomain)(e)}return 0===t.indexOf(f.f.FILE)?f.i:t}).forEach(function(n){return e.postMessage(t,n)})};var L=n(14),W=L.sendBridgeMessage,M=L.needsBridgeForBrowser,k=L.isBridge;x[f.g.BRIDGE]=function(e,t,n){if(M()||k()){if(Object(s.isSameDomain)(e))throw new Error("Post message through bridge disabled between same domain windows");if(!1!==Object(s.isSameTopWindow)(window,e))throw new Error("Can only use bridge to communicate between two different windows, not between frames");return W(e,n,t)}},x[f.g.GLOBAL]=function(e,t){if(Object(c.f)()){if(!Object(s.isSameDomain)(e))throw new Error("Post message through global disabled between different domain windows");if(!1!==Object(s.isSameTopWindow)(window,e))throw new Error("Can only use global to communicate between two different windows, not between frames");var n=e[f.j.POSTROBOT];if(!n)throw new Error("Can not find postRobot global on foreign window");return n.receiveMessage({source:window,origin:Object(s.getDomain)(),data:t})}};var U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function z(e,t,n){return u.a.try(function(){var r;if(Object(s.isWindowClosed)(e))throw new Error("Window is closed");var o=I(e,t,((r={})[f.j.POSTROBOT]=U({id:Object(d.uniqueID)()},n),r)),i=[];return u.a.map(Object.keys(x),function(n){return u.a.try(function(){if(!f.b.ALLOWED_POST_MESSAGE_METHODS[n])throw new Error("Strategy disallowed: "+n);return x[n](e,o,t)}).then(function(){return i.push(n+": success"),!0},function(e){return i.push(n+": "+Object(d.stringifyError)(e)+"\n"),!1})}).then(function(e){var t=e.some(Boolean),r=n.type+" "+n.name+" "+(t?"success":"error")+":\n - "+i.join("\n - ")+"\n";if(!t)throw new Error(r)})})}var F=Object(b.b)("responseListeners"),B=Object(b.c)("requestListeners"),G=Object(b.b)("erroredResponseListeners");b.a.WINDOW_WILDCARD=b.a.WINDOW_WILDCARD||new function(){};var q,H="__domain_regex__";function X(e){return F.get(e)}function K(e){F.del(e)}function Z(e){return G.has(e)}function J(e){var t=e.name,n=e.win,r=e.domain;if(n===f.i&&(n=null),r===f.i&&(r=null),!t)throw new Error("Name required to get request listener");for(var o=0,i=[n,b.a.WINDOW_WILDCARD],a=null==i?0:i.length;o<a;o++){var u=i[o];if(u){var c=B.get(u);if(c){var d=c[t];if(d){if(r&&"string"==typeof r){if(d[r])return d[r];if(d[H])for(var l=0,p=d[H],h=null==p?0:p.length;l<h;l++){var w=p[l],m=w.regex,y=w.listener;if(Object(s.matchDomain)(m,r))return y}}if(d[f.i])return d[f.i]}}}}}var V=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$=((q={})[f.e.REQUEST]=function(e,t,n){var r=J({name:n.name,win:e,domain:t});function o(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n.fireAndForget||Object(s.isWindowClosed)(e)?u.a.resolve():z(e,t,V({type:r,hash:n.hash,name:n.name},o))}return u.a.all([o(f.e.ACK),u.a.try(function(){if(!r)throw new Error("No handler found for post message: "+n.name+" from "+t+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!Object(s.matchDomain)(r.domain,t))throw new Error("Request origin "+t+" does not match domain "+r.domain.toString());var o=n.data;return r.handler({source:e,origin:t,data:o})}).then(function(e){return o(f.e.RESPONSE,{ack:f.c.SUCCESS,data:e})},function(e){return o(f.e.RESPONSE,{ack:f.c.ERROR,error:e})})]).then(d.noop).catch(function(e){if(r&&r.handleError)return r.handleError(e);throw e})},q[f.e.ACK]=function(e,t,n){if(!Z(n.hash)){var r=X(n.hash);if(!r)throw new Error("No handler found for post message ack for message: "+n.name+" from "+t+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!Object(s.matchDomain)(r.domain,t))throw new Error("Ack origin "+t+" does not match domain "+r.domain.toString());r.ack=!0}},q[f.e.RESPONSE]=function(e,t,n){if(!Z(n.hash)){var r=X(n.hash);if(!r)throw new Error("No handler found for post message response for message: "+n.name+" from "+t+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!Object(s.matchDomain)(r.domain,t))throw new Error("Response origin "+t+" does not match domain "+Object(s.stringifyDomainPattern)(r.domain));if(K(n.hash),n.ack===f.c.ERROR)return r.respond(n.error,null);if(n.ack===f.c.SUCCESS){var o=n.data;return r.respond(null,{source:e,origin:t,data:o})}}},q),Y="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},Q=Object(b.b)("receivedMessages");function ee(e){if(!window||window.closed)throw new Error("Message recieved in closed window");try{if(!e.source)return}catch(e){return}var t=e.source,n=e.origin,r=function(e,t,n){var r=void 0;try{r=R(t,n,e)}catch(e){return}if(r&&"object"===(void 0===r?"undefined":Y(r))&&null!==r&&(r=r[f.j.POSTROBOT])&&"object"===(void 0===r?"undefined":Y(r))&&null!==r&&r.type&&"string"==typeof r.type&&$[r.type])return r}(e.data,t,n);r&&(Object(c.e)(t),Q.has(r.id)||(Q.set(r.id,!0),Object(s.isWindowClosed)(t)&&!r.fireAndForget||$[r.type](t,n,r)))}function te(e){try{Object(d.noop)(e.source)}catch(e){return}var t={source:e.source||e.sourceElement,origin:e.origin||e.originalEvent&&e.originalEvent.origin,data:e.data};try{n(13).emulateIERestrictions(t.source,window)}catch(e){return}ee(t)}b.a.receiveMessage=ee;var ne=Object(b.c)("requestPromises");function re(e){return u.a.try(function(){if(!e.name)throw new Error("Expected options.name");var t=e.name,n=void 0,r=void 0;if("string"==typeof e.window){var o=document.getElementById(e.window);if(!o)throw new Error("Expected options.window "+Object.prototype.toString.call(e.window)+" to be a valid element id");if("iframe"!==o.tagName.toLowerCase())throw new Error("Expected options.window "+Object.prototype.toString.call(e.window)+" to be an iframe");if(!o.contentWindow)throw new Error("Iframe must have contentWindow. Make sure it has a src attribute and is in the DOM.");n=o.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&&(n=e.window.contentWindow)}else n=e.window;if(!n)throw new Error("Expected options.window to be a window object, iframe, or iframe element id.");var i=n;r=e.domain||f.i;var a=e.name+"_"+Object(d.uniqueID)();if(Object(s.isWindowClosed)(i))throw new Error("Target window is closed");var l=!1,p=ne.getOrSet(i,function(){return[]}),h=u.a.try(function(){if(Object(s.isAncestor)(window,i))return Object(c.a)(i,e.timeout||f.b.CHILD_WINDOW_TIMEOUT)}).then(function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).domain;if(Object(d.isRegex)(r)&&!e)return Object(c.g)(i)}).then(function(){var n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).domain;if(Object(d.isRegex)(r)){if(!Object(s.matchDomain)(r,n))throw new Error("Remote window domain "+n+" does not match regex: "+r.toString());r=n}if("string"!=typeof r&&!Array.isArray(r))throw new TypeError("Expected domain to be a string or array");var o=r;return new u.a(function(n,r){var u=void 0;if(e.fireAndForget||function(e,t){F.set(e,t)}(a,u={name:t,window:i,domain:o,respond:function(e,t){e||(l=!0,p.splice(p.indexOf(h,1))),e?r(e):n(t)}}),z(i,o,{type:f.e.REQUEST,hash:a,name:t,data:e.data,fireAndForget:Boolean(e.fireAndForget)}).catch(r),e.fireAndForget)return n();var d=Object(c.d)(i)?f.b.ACK_TIMEOUT_KNOWN:f.b.ACK_TIMEOUT,w=e.timeout||f.b.RES_TIMEOUT,m=d,y=w,v=100;setTimeout(function e(){if(!l){if(Object(s.isWindowClosed)(i))return u.ack?r(new Error("Window closed for "+t+" before response")):r(new Error("Window closed for "+t+" before ack"));if(m=Math.max(m-v,0),-1!==y&&(y=Math.max(y-v,0)),u.ack){if(-1===y)return;v=Math.min(y,2e3)}else{if(0===m)return r(new Error("No ack for postMessage "+t+" in "+Object(s.getDomain)()+" in "+d+"ms"));if(0===y)return r(new Error("No response for postMessage "+t+" in "+Object(s.getDomain)()+" in "+w+"ms"))}setTimeout(e,v)}},v)})});return h.catch(function(){!function(e){G.set(e,!0)}(a),K(a)}),p.push(h),h})}function oe(e,t,n,r){return(r=r||{}).window=e,r.name=t,r.data=n,re(r)}function ie(e,t,n){var r=Object(s.getAncestor)();return r?oe(r,e,t,n):new u.a(function(e,t){return t(new Error("Window does not have a parent"))})}function ae(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.window)throw new Error("Expected options.window");var t=e.window;return{send:function(n,r){return oe(t,n,r,e)}}}b.a.send=oe;var ue="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 ce(e){if(!e.name)throw new Error("Expected options.name");if(!e.handler)throw new Error("Expected options.handler");var t=e.name,n=e.window,r=e.domain,o={handler:e.handler,handleError:e.errorHandler||function(e){throw e},window:n,domain:r||f.i,name:t},i=function e(t,n){var r=t.name,o=t.win,i=t.domain;if(!r||"string"!=typeof r)throw new Error("Name required to add request listener");if(Array.isArray(o)){for(var a=[],u=0,c=o,s=null==c?0:c.length;u<s;u++){var l=c[u];a.push(e({name:r,domain:i,win:l},n))}return{cancel:function(){for(var e=0,t=null==a?0:a.length;e<t;e++)a[e].cancel()}}}if(Array.isArray(i)){for(var p=[],h=0,w=i,m=null==w?0:w.length;h<m;h++){var y=w[h];p.push(e({name:r,win:o,domain:y},n))}return{cancel:function(){for(var e=0,t=null==p?0:p.length;e<t;e++)p[e].cancel()}}}var v=J({name:r,win:o,domain:i});if(o&&o!==f.i||(o=b.a.WINDOW_WILDCARD),i=i||f.i,v)throw o&&i?new Error("Request listener already exists for "+r+" on domain "+i.toString()+" for "+(o===b.a.WINDOW_WILDCARD?"wildcard":"specified")+" window"):o?new Error("Request listener already exists for "+r+" for "+(o===b.a.WINDOW_WILDCARD?"wildcard":"specified")+" window"):i?new Error("Request listener already exists for "+r+" on domain "+i.toString()):new Error("Request listener already exists for "+r);var g=B.getOrSet(o,function(){return{}}),E=Object(d.getOrSet)(g,r,function(){return{}}),O=i.toString(),S=void 0,C=void 0;return Object(d.isRegex)(i)?(S=Object(d.getOrSet)(E,H,function(){return[]}),C={regex:i,listener:n},S.push(C)):E[O]=n,{cancel:function(){delete E[O],C&&(S.splice(S.indexOf(C,1)),S.length||delete E[H]),Object.keys(E).length||delete g[r],o&&!Object.keys(g).length&&B.del(o)}}}({name:t,win:n,domain:r},o);if(e.once){var a=o.handler;o.handler=Object(d.once)(function(){return i.cancel(),a.apply(this,arguments)})}if(o.window&&e.errorOnClose)var u=Object(d.safeInterval)(function(){n&&"object"===(void 0===n?"undefined":ue(n))&&Object(s.isWindowClosed)(n)&&(u.cancel(),o.handleError(new Error("Post message target window is closed")))},50);return{cancel:function(){i.cancel()}}}function se(e,t,n){return"function"==typeof t&&(n=t,t={}),(t=t||{}).name=e,t.handler=n||t.handler,ce(t)}function de(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"function"==typeof t&&(n=t,t={}),t=t||{},n=n||t.handler;var r=t.errorHandler,o=new u.a(function(o,i){(t=t||{}).name=e,t.once=!0,t.handler=function(e){if(o(e),n)return n(e)},t.errorHandler=function(e){if(i(e),r)return r(e)}}),i=ce(t);return o.cancel=i.cancel,o}function fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{on:function(t,n){return se(t,e,n)}}}function le(){delete window[f.j.POSTROBOT],window.removeEventListener("message",te)}b.a.on=se;var pe=Object(s.getAncestor)();function he(e){for(var t=0,n=ne.get(e,[]),r=null==n?0:n.length;t<r;t++)n[t].reject(new Error("Window cleaned up before response"))}var we=n(25);b.a.initialized||(b.a.initialized=!0,Object(d.addEventListener)(window,"message",te),we&&we.openTunnelToOpener(),Object(c.c)());var me=r,ye="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 ve(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function ge(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function Ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Oe=function(){function e(){Ee(this,e)}return e.prototype.isElementNode=function(){return!1},e.prototype.isTextNode=function(){return!1},e.prototype.isFragmentNode=function(){return!1},e}(),be=function(e){function t(n,r,o){Ee(this,t);var i=ve(this,e.call(this));return i.name=n,i.props=r,i.children=o,"function"==typeof r.onRender&&(i.onRender=r.onRender,delete r.onRender),i}return ge(t,e),t.prototype.getTag=function(){return this.name},t.prototype.isTag=function(e){return e===this.name},t.prototype.isElementNode=function(){return!0},t.prototype.render=function(e){var t=e(this.name,this.props,this.children);return this.onRender&&this.onRender(t),t},t.prototype.getText=function(){throw new Error("Can not get text of an element node")},t}(Oe),Se=function(e){function t(n){Ee(this,t);var r=ve(this,e.call(this));return r.text=n,r}return ge(t,e),t.prototype.getTag=function(){throw new Error("Can not get tag of text node")},t.prototype.isTag=function(e){throw new Error("Can not check tag of text node")},t.prototype.isTextNode=function(){return!0},t.prototype.render=function(e){throw new Error("Can not render a text node")},t.prototype.getText=function(){return this.text},t}(Oe),Ce=function(e){function t(n){Ee(this,t);var r=ve(this,e.call(this));return r.children=n,r}return ge(t,e),t.prototype.getTag=function(){throw new Error("Can not get tag of fragment node")},t.prototype.isTag=function(e){throw new Error("Can not check tag of fragment node")},t.prototype.isFragmentNode=function(){return!0},t.prototype.render=function(e){throw new Error("Can not render a fragment node")},t.prototype.getText=function(){throw new Error("Can not get text of a fragment node")},t}(Oe);function Te(e){if("string"==typeof e)return new Se(e);if(e instanceof be||e instanceof Se||e instanceof Ce)return e;if(Array.isArray(e))return new Ce(je(e));if(null!==e&&void 0!==e)throw new Error("Child node must be string or instance of jsx-pragmatic node; got "+(void 0===e?"undefined":ye(e)))}function je(e){for(var t=[],n=0,r=null==e?0:e.length;n<r;n++){var o=Te(e[n]);if(o)if(o instanceof Ce)for(var i=0,a=o.children,u=null==a?0:a.length;i<u;i++){var c=a[i];t.push(c)}else t.push(o)}return t}var _e,Ae,Pe=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];if("string"==typeof e)return new be(e,t||{},je(r));if("function"==typeof e)return Te(e(t||{},je(r)));throw new TypeError("Expected jsx Element to be a string or a function")},De="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},Ne="html",Ie="iframe",Re="script",xe="node",Le="default",We="innerHTML",Me="el",ke={onBlur:"blur",onCancel:"cancel",onClick:"click",onClose:"close",onContextMenu:"contextMenu",onCopy:"copy",onCut:"cut",onAuxClick:"auxClick",onDoubleClick:"doubleClick",onDragEnd:"dragEnd",onDragStart:"dragStart",onDrop:"drop",onFocus:"focus",onInput:"input",onInvalid:"invalid",onKeyDown:"keyDown",onKeyPress:"keyPress",onKeyUp:"keyUp",onMouseDown:"mouseDown",onMouseUp:"mouseUp",onPaste:"paste",onPause:"pause",onPlay:"play",onPointerCancel:"pointerCancel",onPointerDown:"pointerDown",onPointerUp:"pointerUp",onRateChange:"rateChange",onReset:"reset",onSeeked:"seeked",onSubmit:"submit",onTouchCancel:"touchCancel",onTouchEnd:"touchEnd",onTouchStart:"touchStart",onVolumeChange:"volumeChange",onAbort:"abort",onAnimationEnd:"animationEnd",onAnimationIteration:"animationIteration",onAnimationStart:"animationStart",onCanPlay:"canPlay",onCanPlayThrough:"canPlayThrough",onDrag:"drag",onDragEnter:"dragEnter",onDragExit:"dragExit",onDragLeave:"dragLeave",onDragOver:"dragOver",onDurationChange:"durationChange",onEmptied:"emptied",onEncrypted:"encrypted",onEnded:"ended",onError:"error",onGotPointerCapture:"gotPointerCapture",onLoad:"load",onLoadedData:"loadedData",onLoadedMetadata:"loadedMetadata",onLoadStart:"loadStart",onLostPointerCapture:"lostPointerCapture",onMouseMove:"mouseMove",onMouseOut:"mouseOut",onMouseOver:"mouseOver",onPlaying:"playing",onPointerMove:"pointerMove",onPointerOut:"pointerOut",onPointerOver:"pointerOver",onProgress:"progress",onScroll:"scroll",onSeeking:"seeking",onStalled:"stalled",onSuspend:"suspend",onTimeUpdate:"timeUpdate",onToggle:"toggle",onTouchMove:"touchMove",onTransitionEnd:"transitionEnd",onWaiting:"waiting",onWheel:"wheel"},Ue=((_e={})[xe]=function(e){var t=e.props;if(!t[Me])throw new Error("Must pass "+Me+" prop to "+xe+" element");if(Object.keys(t).length>1)throw new Error("Must not pass any prop other than "+Me+" to "+xe+" element");return t[Me]},_e[Le]=function(e){var t=e.name;return e.doc.createElement(t)},_e),ze=((Ae={})[Ie]=function(e){var t=e.el,n=e.children,r=n[0];if(n.length>1||!r.isElementNode())throw new Error("Expected only single element node as child of "+Ie+" element");if(!r.isTag(Ne))throw new Error("Expected element to be inserted into frame to be html, got "+r.getTag());t.addEventListener("load",function(){var e=t.contentWindow;if(!e)throw new Error("Expected frame to have contentWindow");for(var n=e.document,o=n.documentElement;o.children&&o.children.length;)o.removeChild(o.children[0]);for(var i=r.render(Fe({doc:n}));i.children.length;)o.appendChild(i.children[0])})},Ae[Re]=function(e){var t=e.el,n=e.children,r=n[0];if(1!==n.length||!r.isTextNode())throw new Error("Expected only single text node as child of "+Re+" element");t.text=r.getText()},Ae[Le]=function(e){for(var t=e.el,n=e.children,r=e.doc,o=e.domRenderer,i=0,a=null==n?0:n.length;i<a;i++){var u=n[i];u.isTextNode()?t.appendChild(r.createTextNode(u.getText())):t.appendChild(u.render(o))}},Ae),Fe=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).doc,t=void 0===e?document:e;return function e(n,r,o){var i=function(e){var t=e.doc,n=e.name,r=e.props;return(Ue[n]||Ue[Le])({name:n,props:r,doc:t})}({name:n,props:r,doc:t});return function(e){for(var t=e.el,n=e.props,r=0,o=Object.keys(n),i=null==o?0:o.length;r<i;r++){var a=o[r],u=n[a];if(null!==u&&void 0!==u&&a!==Me&&a!==We)if(ke.hasOwnProperty(a)){if(void 0!==u&&"function"!=typeof u)throw new TypeError("Prop "+a+" must be function");t.addEventListener(ke[a],u)}else if("string"==typeof u||"number"==typeof u)t.setAttribute(a,u.toString());else{if("boolean"!=typeof u)throw new TypeError("Can not render prop "+a+" of type "+(void 0===u?"undefined":De(u)));!0===u&&t.setAttribute(a,"")}}}({el:i,props:r}),function(e){var t=e.el,n=e.name,r=e.props,o=e.children,i=e.doc,a=e.domRenderer;if(r.hasOwnProperty(We)){if(o.length>=1)throw new Error("Expected no children to be passed when "+We+" prop is set");var u=r[We];if("string"!=typeof u)throw new TypeError(We+" prop must be string");n===Re?t.text=u:(t.innerHTML=u,function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.document,n=0,r=e.querySelectorAll("script"),o=null==r?0:r.length;n<o;n++){var i=r[n],a=i.parentNode;if(a){var u=t.createElement("script");u.text=i.textContent,a.replaceChild(u,i)}}}(t,i))}else(ze[n]||ze[Le])({el:t,name:n,props:r,children:o,doc:i,domRenderer:a})}({el:i,name:n,props:r,children:o,doc:t,domRenderer:e}),i}};function Be(){return console.warn("Do not use zoid.getCurrentScriptDir() in production -- browser support is limited"),document.currentScript?document.currentScript.src.split("/").slice(0,-1).join("/"):"."}"function"==typeof Symbol&&Symbol.iterator;var Ge=void 0;function qe(e){Ge=e}var He=n(4);function Xe(e){if(Object(s.isSameDomain)(e))return e[He.__ZOID__]||(e[He.__ZOID__]={}),e[He.__ZOID__]}var Ke=function(){var e=Xe(window);if(!e)throw new Error("Could not get local global");return e}();function Ze(e){var t=[],n=!1;return{set:function(t,r){return n?r:(e[t]=r,this.register(function(){delete e[t]}),r)},register:function(e,r){if("function"==typeof e&&(r=e,e="<anonymous-cleanup-handler>"),"function"!=typeof r)throw new TypeError("Expected to be passed function to clean.register");n?r():t.push({complete:!1,name:e,run:function(){this.complete||(this.complete=!0,r&&r())}})},hasTasks:function(){return Boolean(t.filter(function(e){return!e.complete}).length)},all:function(){var e=[];for(n=!0;t.length;)e.push(t.pop().run());return u.a.all(e).then(function(){})},run:function(e){for(var n=[],r=0,o=null==t?0:t.length;r<o;r++){var i=t[r];i.name===e&&n.push(i.run())}return u.a.all(n).then(d.noop)}}}var Je,Ve=Object(d.memoize)(function(){if(!window.name)throw new Error("No window name");var e=window.name.split("__"),t=e[1],n=e[2],r=e[3];if(t!==He.ZOID)throw new Error("Window not rendered by zoid - got "+t);if(!n)throw new Error("Expected component name");if(!r)throw new Error("Expected encoded payload");try{return JSON.parse(Object(d.base64decode)(r))}catch(e){throw new Error("Can not decode window name payload: "+r+": "+Object(d.stringifyError)(e))}}),$e=Object(d.memoize)(function(){try{Ve()}catch(e){return!1}return!0});function Ye(e,t,n,r){var o=e.getProp(n);return o&&"function"==typeof o.childDecorate?o.childDecorate(r):r}var Qe,et,tt,nt,rt,ot=(Je=function(){function e(t){var n=this;!function(t,n){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this),u.a.try(function(){if(window.xchild||window.xprops)throw n.component.createError("Can not attach multiple components to the same window");n.component=t,n.onPropHandlers=[];var e=Ve(),r=e.parent,o=e.domain,i=e.exports,a=e.context,u=e.props;n.context=a,n.parentComponentWindow=n.getWindowByRef(r),n.parentExports=R(n.parentComponentWindow,o,i),n.checkParentDomain(o),window.xchild=n.component.xchild=n;var s=n.getPropsByRef(n.parentComponentWindow,o,u);return n.setProps(s,o),Object(c.e)(n.parentComponentWindow),n.watchForClose(),n.parentExports.init(n.buildExports())}).then(function(){return n.watchForResize()}).catch(function(e){n.error(e)})}return e.prototype.checkParentDomain=function(e){if(!Object(s.matchDomain)(this.component.allowedParentDomains,e))throw new Error("Can not be rendered by domain: "+e)},e.prototype.onProps=function(e){this.onPropHandlers.push(e)},e.prototype.getPropsByRef=function(e,t,n){var r=n.type,o=n.value,i=n.uid,a=void 0;if(r===He.INITIAL_PROPS.RAW)a=o;else if(r===He.INITIAL_PROPS.UID){if(!Object(s.isSameDomain)(e)){if("file:"===window.location.protocol)throw new Error("Can not get props from file:// domain");throw new Error("Parent component window is on a different domain - expected "+Object(s.getDomain)()+" - can not retrieve props")}var u=Xe(e);if(!u)throw new Error("Can not find global for parent component - can not retrieve props");a=u.props[i]}if(!a)throw new Error("Initial props not found");return R(e,t,a)},e.prototype.getWindowByRef=function(e){var t=e.type,n=void 0;if(t===He.WINDOW_REFERENCES.OPENER)n=Object(s.getOpener)(window);else if(t===He.WINDOW_REFERENCES.TOP)n=Object(s.getTop)(window);else if(t===He.WINDOW_REFERENCES.PARENT){var r=e.distance;n=r?Object(s.getNthParentFromTop)(window,r):Object(s.getParent)(window)}if(t===He.WINDOW_REFERENCES.GLOBAL){var o=e.uid,i=Object(s.getAncestor)(window);if(i)for(var a=0,u=Object(s.getAllFramesInWindow)(i),c=null==u?0:u.length;a<c;a++){var d=Xe(u[a]);if(d&&d.windows&&d.windows[o]){n=d.windows[o];break}}}if(!n)throw new Error("Unable to find "+t+" window");return n},e.prototype.setProps=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.props=this.props||{};var r=function(e,t,n,r){for(var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i={},a=0,u=Object.keys(n),c=null==u?0:u.length;a<c;a++){var d=u[a],f=t.getProp(d);if(!f||!f.sameDomain||r===Object(s.getDomain)(window)&&Object(s.isSameDomain)(e)){var l=Ye(t,0,d,n[d]);i[d]=l,f&&f.alias&&!i[f.alias]&&(i[f.alias]=l)}}if(o)for(var p=0,h=t.getPropNames(),w=null==h?0:h.length;p<w;p++){var m=h[p];n.hasOwnProperty(m)||(i[m]=Ye(t,0,m,n[m]))}return i}(this.parentComponentWindow,this.component,e,t,n);Object(d.extend)(this.props,r);for(var o=0,i=this.onPropHandlers,a=null==i?0:i.length;o<a;o++)i[o].call(this,this.props);window.xprops=this.component.xprops=this.props},e.prototype.watchForClose=function(){var e=this;window.addEventListener("unload",function(){return e.parentExports.checkClose.fireAndForget()})},e.prototype.enableAutoResize=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=void 0!==t&&t,r=e.height,o=void 0===r||r,i=e.element,a=void 0===i?"body":i;this.autoResize={width:n,height:o,element:a},this.watchForResize()},e.prototype.getAutoResize=function(){var e=this.autoResize||this.component.autoResize||{},t=e.width,n=void 0!==t&&t,r=e.height,o=void 0!==r&&r,i=e.element,a=void 0===i?"body":i;return{width:n,height:o,element:a=Object(d.getElement)(a)}},e.prototype.watchForResize=function(){var e=this;return Object(d.waitForDocumentBody)().then(function(){var t=e.getAutoResize(),n=t.width,r=t.height,o=t.element;(n||r)&&e.context!==He.CONTEXT.POPUP&&Object(d.onResize)(o,function(t){var o=t.width,i=t.height;e.resize({width:n?o:void 0,height:r?i:void 0})},{width:n,height:r})})},e.prototype.buildExports=function(){var e=this;return{updateProps:function(t){var n=this;return u.a.try(function(){return e.setProps(t,n.origin,!1)})},close:function(){return u.a.try(function(){return e.destroy()})}}},e.prototype.resize=function(e){var t=e.width,n=e.height;return this.parentExports.resize.fireAndForget({width:t,height:n})},e.prototype.hide=function(){return this.parentExports.hide()},e.prototype.show=function(){return this.parentExports.show()},e.prototype.userClose=function(){return this.close(He.CLOSE_REASONS.USER_CLOSED)},e.prototype.close=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:He.CLOSE_REASONS.CHILD_CALL;return this.parentExports.close(e)},e.prototype.destroy=function(){return u.a.try(function(){window.close()})},e.prototype.focus=function(){window.focus()},e.prototype.error=function(e){var t=this;return u.a.try(function(){if(t.parentExports.error)return t.parentExports.error(e)}).catch(d.noop).then(function(){throw e})},e}(),Qe=Je.prototype,et=[d.memoized],tt=Object.getOwnPropertyDescriptor(Je.prototype,"watchForResize"),nt=Je.prototype,rt={},Object.keys(tt).forEach(function(e){rt[e]=tt[e]}),rt.enumerable=!!rt.enumerable,rt.configurable=!!rt.configurable,("value"in rt||rt.initializer)&&(rt.writable=!0),rt=et.slice().reverse().reduce(function(e,t){return t(Qe,"watchForResize",e)||e},rt),nt&&void 0!==rt.initializer&&(rt.value=rt.initializer?rt.initializer.call(nt):void 0,rt.initializer=void 0),void 0===rt.initializer&&(Object.defineProperty(Qe,"watchForResize",rt),rt=null),Je),it=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},at={};at[He.CONTEXT.IFRAME]={renderedIntoContainer:!0,callChildToClose:!1,open:function(){var e=this,t=this.component.attributes.iframe||{},n=Object(d.iframe)({attributes:it({title:this.component.name},t),class:[He.CLASS_NAMES.COMPONENT_FRAME,He.CLASS_NAMES.INVISIBLE]},this.element);return this.clean.set("iframe",n),Object(d.awaitFrameWindow)(n).then(function(t){var r=function(){return u.a.try(function(){return e.props.onClose(He.CLOSE_REASONS.CLOSE_DETECTED)}).finally(function(){return e.destroy()})},o=Object(d.watchElementForClose)(n,r),i=Object(d.watchElementForClose)(e.element,r);return e.clean.register("destroyWindow",function(){o.cancel(),i.cancel(),he(t),Object(d.destroyElement)(n)}),j.toProxyWindow(t)})},openPrerender:function(){var e=this,t=this.component.attributes.iframe||{},n=Object(d.iframe)({attributes:it({name:"__zoid_prerender_frame__"+this.component.name+"_"+Object(d.uniqueID)()+"__"},t),class:[He.CLASS_NAMES.PRERENDER_FRAME,He.CLASS_NAMES.VISIBLE]},this.element);return this.clean.set("prerenderIframe",n),Object(d.awaitFrameLoad)(n).then(function(){var t=n.contentWindow;return e.clean.register("destroyPrerender",function(){Object(d.destroyElement)(n)}),Object(s.assertSameDomain)(t)})},switchPrerender:function(){var e=this;Object(d.addClass)(this.prerenderIframe,He.CLASS_NAMES.INVISIBLE),Object(d.removeClass)(this.prerenderIframe,He.CLASS_NAMES.VISIBLE),Object(d.addClass)(this.iframe,He.CLASS_NAMES.VISIBLE),Object(d.removeClass)(this.iframe,He.CLASS_NAMES.INVISIBLE),setTimeout(function(){e.prerenderIframe&&Object(d.destroyElement)(e.prerenderIframe)},1e3)},delegateOverrides:{openContainer:He.DELEGATE.CALL_DELEGATE,destroyComponent:He.DELEGATE.CALL_DELEGATE,destroyContainer:He.DELEGATE.CALL_DELEGATE,cancelContainerEvents:He.DELEGATE.CALL_DELEGATE,prerender:He.DELEGATE.CALL_DELEGATE,elementReady:He.DELEGATE.CALL_DELEGATE,showContainer:He.DELEGATE.CALL_DELEGATE,showComponent:He.DELEGATE.CALL_DELEGATE,hideContainer:He.DELEGATE.CALL_DELEGATE,hideComponent:He.DELEGATE.CALL_DELEGATE,hide:He.DELEGATE.CALL_DELEGATE,show:He.DELEGATE.CALL_DELEGATE,resize:He.DELEGATE.CALL_DELEGATE,loadUrl:He.DELEGATE.CALL_DELEGATE,openPrerender:He.DELEGATE.CALL_DELEGATE,switchPrerender:He.DELEGATE.CALL_DELEGATE,setWindowName:He.DELEGATE.CALL_DELEGATE,open:He.DELEGATE.CALL_DELEGATE},resize:function(e){var t=e.width,n=e.height;t&&(this.container.style.width=Object(d.toCSS)(t),this.element.style.width=Object(d.toCSS)(t)),n&&(this.container.style.height=Object(d.toCSS)(n),this.element.style.height=Object(d.toCSS)(n))},show:function(){Object(d.showElement)(this.element)},hide:function(){Object(d.hideElement)(this.element)}};var ut,ct="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},st=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dt="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 ft(e,t,n,r,o){var i={};return Object.keys(r).forEach(function(e){i[e]=r[e]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(e,t,i),i=null),i}Ke.props=Ke.props||{},Ke.windows=Ke.windows||{};var lt=(ft((ut=function(){function e(t,n,r){var o=this,i=r.props;!function(t,n){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this),u.a.try(function(){return o.onInit=new u.a,o.clean=Ze(o),o.event=Object(d.eventEmitter)(),o.component=t,o.driver=at[n],o.setProps(i),o.registerActiveComponent(),o.watchForUnload(),o.onInit}).catch(function(e){return o.error(e,i)})}return e.prototype.render=function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;return this.tryInit(function(){n.component.log("render");var o=Object(d.uniqueID)(),i={};i.onRender=n.props.onRender();var a=n.getDomain(),c=n.getInitialDomain();i.elementReady=u.a.try(function(){if(t)return n.elementReady(t)});var f=function(){return i.open.then(function(e){return e.focus()})};return i.openContainer=i.elementReady.then(function(){return n.openContainer(t,{context:e,uid:o,focus:f})}),i.open=n.driver.renderedIntoContainer?i.openContainer.then(function(){return n.open()}):n.open(),i.awaitWindow=i.open.then(function(e){return e.awaitWindow()}),i.showContainer=i.openContainer.then(function(){return n.showContainer()}),i.buildWindowName=i.open.then(function(t){return n.buildWindowName({proxyWin:t,initialDomain:c,domain:a,target:r,context:e,uid:o})}),i.setWindowName=u.a.all([i.open,i.buildWindowName]).then(function(e){var t=e[0],r=e[1];return n.setWindowName(t,r)}),i.watchForClose=u.a.all([i.awaitWindow,i.setWindowName]).then(function(e){var t=e[0];return n.watchForClose(t)}),i.prerender=u.a.all([i.awaitWindow,i.openContainer]).then(function(t){var r=t[0];return n.prerender(r,{context:e,uid:o})}),i.showComponent=i.prerender.then(function(){return n.showComponent()}),i.buildUrl=n.buildUrl(),i.openBridge=u.a.all([i.awaitWindow,i.buildUrl]).then(function(t){var r=t[0],o=t[1];return n.openBridge(r,Object(s.getDomainFromUrl)(o),e)}),i.loadUrl=u.a.all([i.open,i.buildUrl,i.setWindowName]).then(function(e){var t=e[0],r=e[1];return n.loadUrl(t,r)}),i.switchPrerender=u.a.all([i.prerender,n.onInit]).then(function(){return n.switchPrerender()}),i.runTimeout=i.loadUrl.then(function(){return n.runTimeout()}),u.a.hash(i)}).then(function(){return n.props.onEnter()}).then(function(){return n})},e.prototype.renderTo=function(e,t,n){var r=this;return this.tryInit(function(){if(t===window)return r.render(e,n);if(n&&"string"!=typeof n)throw new Error("Element passed to renderTo must be a string selector, got "+(void 0===n?"undefined":dt(n))+" "+n);return r.checkAllowRemoteRender(t),r.component.log("render_"+e+"_to_win",{element:Object(d.stringify)(n),context:e}),r.delegate(e,t),r.render(e,n,t)})},e.prototype.on=function(e,t){return this.event.on(e,t)},e.prototype.checkAllowRemoteRender=function(e){if(!e)throw this.component.createError("Must pass window to renderTo");if(!Object(s.isSameTopWindow)(window,e))throw new Error("Can only renderTo an adjacent frame");var t=Object(s.getDomain)(),n=this.getDomain();if(!Object(s.matchDomain)(n,t)&&!Object(s.isSameDomain)(e))throw new Error("Can not render remotely to "+n.toString()+" - can only render to "+t)},e.prototype.registerActiveComponent=function(){var t=this;e.activeComponents.push(this),this.clean.register(function(){e.activeComponents.splice(e.activeComponents.indexOf(t),1)})},e.prototype.getWindowRef=function(e,t,n,r){if(t===Object(s.getDomain)(window))return Ke.windows[n]=window,this.clean.register(function(){delete Ke.windows[n]}),{type:He.WINDOW_REFERENCES.GLOBAL,uid:n};if(e!==window)throw new Error("Can not currently create window reference for different target with a different domain");return r===He.CONTEXT.POPUP?{type:He.WINDOW_REFERENCES.OPENER}:Object(s.isTop)(window)?{type:He.WINDOW_REFERENCES.TOP}:{type:He.WINDOW_REFERENCES.PARENT,distance:Object(s.getDistanceFromTop)(window)}},e.prototype.buildWindowName=function(e){var t,n,r,o,i=e.proxyWin,a=e.initialDomain,u=e.domain,c=e.target,s=e.uid,f=e.context;return t=this.component.name,n=this.buildChildPayload({proxyWin:i,initialDomain:a,domain:u,target:c,context:f,uid:s}),r=t.replace(/^[^a-z0-9A-Z]+|[^a-z0-9A-Z]+$/g,"").replace(/[^a-z0-9A-Z]+/g,"_"),o=Object(d.base64encode)(JSON.stringify(n)),"__"+He.ZOID+"__"+r+"__"+o+"__"},e.prototype.getPropsRef=function(e,t,n,r){var o=I(e,n,this.getPropsForChild(n)),i=Object(s.isSameDomain)(t)?{type:He.INITIAL_PROPS.RAW,value:o}:{type:He.INITIAL_PROPS.UID,uid:r};return i.type===He.INITIAL_PROPS.UID&&(Ke.props[r]=o,this.clean.register(function(){delete Ke.props[r]})),i},e.prototype.buildChildPayload=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.proxyWin,n=e.initialDomain,r=e.domain,o=e.target,i=void 0===o?window:o,a=e.context,u=e.uid;return{uid:u,context:a,domain:Object(s.getDomain)(window),tag:this.component.tag,parent:this.getWindowRef(i,n,u,a),props:this.getPropsRef(t,i,r,u),exports:I(t,r,this.buildParentExports(t))}},e.prototype.setProps=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.component.validate&&this.component.validate(this.component,e),this.props=this.props||{},Object(d.extend)(this.props,function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o={};n=n||{};for(var i=r?[]:e.getPropNames(),a=0,u=Object.keys(n),c=null==u?0:u.length;a<c;a++){var s=u[a];-1===i.indexOf(s)&&i.push(s)}for(var f=[],l=0,p=null==i?0:i.length;l<p;l++){var h=i[l],w=e.getProp(h),m=n[h];if(w){var y=w.alias;if(y&&(!Object(d.isDefined)(m)&&Object(d.isDefined)(n[y])&&(m=n[y]),f.push(y)),w.value&&(m=w.value()),!Object(d.isDefined)(m)&&w.def&&(m=w.def(n,e)),Object(d.isDefined)(m)){if("array"===w.type?!Array.isArray(m):(void 0===m?"undefined":ct(m))!==w.type)throw new TypeError("Prop is not of type "+w.type+": "+h)}else if(!1!==w.required)throw new Error("Expected prop "+h+" to be passed");o[h]=m}else o[h]=m}for(var v=0,g=null==f?0:f.length;v<g;v++)delete o[f[v]];for(var E=0,O=Object.keys(o),b=null==O?0:O.length;E<b;E++){var S=O[E],C=e.getProp(S),T=o[S];C&&(Object(d.isDefined)(T)&&C.validate&&C.validate(T,o),C.decorate&&(o[S]=C.decorate(T,o)),o[S]&&"function"===C.type&&(o[S]=o[S].bind(t)))}return o}(this.component,this,e,t))},e.prototype.buildUrl=function(){var e,t,n,r=this;return(e=st({},this.component.props,this.component.builtinProps),t=this.props,n={},u.a.all(Object.keys(t).map(function(r){var o=e[r];if(o)return u.a.resolve().then(function(){var e=t[r];if(e&&o.queryParam)return e}).then(function(e){if(null!==e&&void 0!==e)return u.a.all([function(e,t,n){return u.a.try(function(){return"function"==typeof e.queryParam?e.queryParam(n):"string"==typeof e.queryParam?e.queryParam:t})}(o,r,e),function(e,t,n){return u.a.try(function(){return"function"==typeof e.queryValue?e.queryValue(n):n})}(o,0,e)]).then(function(e){var t=e[0],i=e[1],a=void 0;if("boolean"==typeof i)a=i.toString();else if("string"==typeof i)a=i.toString();else{if("function"==typeof i)return;if("object"===(void 0===i?"undefined":ct(i))&&null!==i){if(o.serialization===He.PROP_SERIALIZATION.JSON)a=JSON.stringify(i);else if(o.serialization===He.PROP_SERIALIZATION.BASE64)a=btoa(JSON.stringify(i));else if(o.serialization===He.PROP_SERIALIZATION.DOTIFY||!o.serialization){a=Object(d.dotify)(i,r);for(var u=0,c=Object.keys(a),s=null==c?0:c.length;u<s;u++){var f=c[u];n[f]=a[f]}return}}else"number"==typeof i&&(a=i.toString())}n[t]=a})})})).then(function(){return n})).then(function(e){var t=Object(s.normalizeMockUrl)(r.component.getUrl(r.props));return Object(d.extendUrl)(t,{query:st({},e)})})},e.prototype.getDomain=function(){return this.component.getDomain(this.props)},e.prototype.getInitialDomain=function(){return this.component.getInitialDomain(this.props)},e.prototype.getPropsForChild=function(e){for(var t={},n=0,r=Object.keys(this.props),o=null==r?0:r.length;n<o;n++){var i=r[n],a=this.component.getProp(i);a&&!1===a.sendToChild||a&&a.sameDomain&&!Object(s.matchDomain)(e,Object(s.getDomain)(window))||(t[i]=this.props[i])}return t},e.prototype.updateProps=function(e){var t=this;return this.setProps(e,!0),this.onInit.then(function(){if(t.childExports)return t.childExports.updateProps(t.getPropsForChild(t.getDomain()));throw new Error("Child exports were not available")})},e.prototype.openBridge=function(e,t,n){var r=this;return u.a.try(function(){if(we&&we.needsBridge({win:e,domain:t})&&!we.hasBridge(t,t)){var o=r.component.getBridgeUrl(r.props);if(!o)throw new Error("Bridge url and domain needed to render "+n);var i=Object(s.getDomainFromUrl)(o);return we.linkUrl(e,t),we.openBridge(o,i)}})},e.prototype.open=function(){var e=this;return u.a.try(function(){e.component.log("open");var t=e.props.window;return t?(e.clean.register("destroyProxyWindow",function(){return t.close()}),t):e.driver.open.call(e)})},e.prototype.setWindowName=function(e,t){return e.setName(t)},e.prototype.switchPrerender=function(){var e=this;return u.a.try(function(){if(e.component.prerenderTemplate&&e.driver.switchPrerender)return e.driver.switchPrerender.call(e)})},e.prototype.elementReady=function(e){return Object(d.elementReady)(e).then(d.noop)},e.prototype.delegate=function(e,t){var n=this;this.component.log("delegate");for(var r={window:this.props.window,onClose:this.props.onClose,onDisplay:this.props.onDisplay},o=0,i=this.component.getPropNames(),a=null==i?0:i.length;o<a;o++){var u=i[o];this.component.getProp(u).allowDelegate&&(r[u]=this.props[u])}for(var c=oe(t,He.POST_MESSAGE.DELEGATE+"_"+this.component.name,{context:e,props:r,overrides:{userClose:function(){return n.userClose()},error:function(e){return n.error(e)},on:function(e,t){return n.on(e,t)}}}).then(function(e){var t=e.data;return n.clean.register(t.destroy),t}).catch(function(e){throw new Error("Unable to delegate rendering. Possibly the component is not loaded in the target window.\n\n"+Object(d.stringifyError)(e))}),s=this.driver.delegateOverrides,f=function(e,t,r){var o=t[e];s[o]===He.DELEGATE.CALL_DELEGATE&&(n[o]=function(){var e=this,t=arguments;return c.then(function(n){return n.overrides[o].apply(e,t)})})},l=0,p=Object.keys(s),h=null==p?0:p.length;l<h;l++)f(l,p)},e.prototype.watchForClose=function(e){var t=this,n=Object(s.onCloseWindow)(e,function(){return t.component.log("detect_close_child"),u.a.try(function(){return t.props.onClose(He.CLOSE_REASONS.CLOSE_DETECTED)}).finally(function(){return t.destroy()})},3e3);this.clean.register("destroyCloseWindowListener",n.cancel)},e.prototype.watchForUnload=function(){var e=this,t=Object(d.once)(function(){e.component.log("navigate_away"),e.destroyComponent()}),n=Object(d.addEventListener)(window,"unload",t);this.clean.register("destroyUnloadWindowListener",n.cancel)},e.prototype.loadUrl=function(e,t){return this.component.log("load_url"),e.setLocation(t)},e.prototype.runTimeout=function(){var e=this,t=this.props.timeout;if(t){var n=this.timeout=setTimeout(function(){e.component.log("timed_out",{timeout:t.toString()}),e.error(e.component.createError("Loading component timed out after "+t+" milliseconds"))},t);this.clean.register(function(){clearTimeout(n),delete e.timeout})}},e.prototype.initChild=function(e){var t=this;return u.a.try(function(){t.childExports=e,t.onInit.resolve(t),t.timeout&&clearTimeout(t.timeout)})},e.prototype.buildParentExports=function(e){var t=this;return{init:function(e){return t.initChild(e)},close:function(e){return t.close(e)},checkClose:function(){return t.checkClose(e)},resize:function(e){var n=e.width,r=e.height;return t.resize({width:n,height:r})},trigger:function(e){return u.a.try(function(){return t.event.trigger(e)})},hide:function(){return u.a.try(function(){return t.hide()})},show:function(){return u.a.try(function(){return t.show()})},error:function(e){return t.error(e)}}},e.prototype.resize=function(e){var t=this,n=e.width,r=e.height;return u.a.try(function(){t.driver.resize.call(t,{width:n,height:r})})},e.prototype.hide=function(){return this.container&&Object(d.hideElement)(this.container),this.driver.hide.call(this)},e.prototype.show=function(){return this.container&&Object(d.showElement)(this.container),this.driver.show.call(this)},e.prototype.checkClose=function(e){var t=this;return e.isClosed().then(function(n){return n?t.userClose():u.a.delay(200).then(function(){return e.isClosed()}).then(function(e){if(e)return t.userClose()})})},e.prototype.userClose=function(){return this.close(He.CLOSE_REASONS.USER_CLOSED)},e.prototype.close=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:He.CLOSE_REASONS.PARENT_CALL;return u.a.try(function(){return e.component.log("close",{reason:t}),e.event.triggerOnce(He.EVENTS.CLOSE),e.props.onClose(t)}).then(function(){return u.a.all([e.closeComponent(),e.closeContainer()])}).then(function(){return e.destroy()})},e.prototype.closeContainer=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:He.CLOSE_REASONS.PARENT_CALL;return u.a.try(function(){return e.event.triggerOnce(He.EVENTS.CLOSE),e.props.onClose(t)}).then(function(){return u.a.all([e.closeComponent(t),e.hideContainer()])}).then(function(){return e.destroyContainer()})},e.prototype.destroyContainer=function(){var e=this;return u.a.try(function(){e.clean.run("destroyContainerEvents"),e.clean.run("destroyContainerTemplate")})},e.prototype.closeComponent=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:He.CLOSE_REASONS.PARENT_CALL;return u.a.try(function(){return e.cancelContainerEvents()}).then(function(){return e.event.triggerOnce(He.EVENTS.CLOSE),e.props.onClose(t)}).then(function(){return e.hideComponent()}).then(function(){return e.destroyComponent()}).then(function(){e.childExports&&e.driver.callChildToClose&&e.childExports.close().catch(d.noop)})},e.prototype.destroyComponent=function(){this.clean.run("destroyUnloadWindowListener"),this.clean.run("destroyCloseWindowListener"),this.clean.run("destroyContainerEvents"),this.clean.run("destroyWindow")},e.prototype.showContainer=function(){var e=this;return u.a.try(function(){if(e.props.onDisplay)return e.props.onDisplay()}).then(function(){if(e.container)return Object(d.showAndAnimate)(e.container,He.ANIMATION_NAMES.SHOW_CONTAINER,e.clean.register)})},e.prototype.showComponent=function(){var e=this;return u.a.try(function(){if(e.props.onDisplay)return e.props.onDisplay()}).then(function(){if(e.element)return Object(d.showAndAnimate)(e.element,He.ANIMATION_NAMES.SHOW_COMPONENT,e.clean.register)})},e.prototype.hideContainer=function(){var e=this;return u.a.try(function(){if(e.container)return Object(d.animateAndHide)(e.container,He.ANIMATION_NAMES.HIDE_CONTAINER,e.clean.register)})},e.prototype.hideComponent=function(){var e=this;return u.a.try(function(){if(e.element)return Object(d.animateAndHide)(e.element,He.ANIMATION_NAMES.HIDE_COMPONENT,e.clean.register)})},e.prototype.prerender=function(e,t){var n=this,r=t.context,o=t.uid;return u.a.try(function(){if(n.component.prerenderTemplate)return u.a.try(function(){return n.driver.openPrerender.call(n,e)}).then(function(e){if(e&&Object(s.isSameDomain)(e)&&Object(s.isBlankDomain)(e)){var t=e.document,i=n.renderTemplate(n.component.prerenderTemplate,{context:r,uid:o,document:t});i instanceof be&&(i=i.render(Fe({doc:t})));try{Object(d.writeElementToWindow)(e,i)}catch(e){return}var a=n.component.autoResize||{},u=a.width,c=void 0!==u&&u,f=a.height,l=void 0!==f&&f,p=a.element,h=void 0===p?"body":p;(c||l)&&Object(d.onResize)(Object(d.getElement)(h,e.document),function(e){var t=e.width,r=e.height;n.resize({width:c?t:void 0,height:l?r:void 0})},{width:c,height:l,win:e})}})})},e.prototype.renderTemplate=function(e,t){var n=this,r=t.context,o=t.uid,i=t.focus,a=t.container,c=t.document,s=t.outlet;return i=i||function(){return u.a.resolve()},e.call(this,{context:r,uid:o,id:He.CLASS_NAMES.ZOID+"-"+this.component.tag+"-"+o,props:e.__xdomain__?null:this.props,tag:this.component.tag,CLASS:He.CLASS_NAMES,ANIMATION:He.ANIMATION_NAMES,CONTEXT:He.CONTEXT,EVENT:He.EVENTS,actions:{focus:i,close:function(){return n.userClose()}},on:function(e,t){return n.on(e,t)},jsxDom:Pe,document:c,dimensions:this.component.dimensions,container:a,outlet:s})},e.prototype.openContainer=function(e,t){var n=this,r=t.context,o=t.uid,i=t.focus;return u.a.try(function(){var t;if(!(t=e?Object(d.getElement)(e):document.body))throw new Error("Could not find element to open container into");if(n.component.containerTemplate){var a=document.createElement("div");Object(d.addClass)(a,He.CLASS_NAMES.OUTLET);var u=n.renderTemplate(n.component.containerTemplate,{context:r,uid:o,container:t,focus:i,outlet:a});if(u instanceof be&&(u=u.render(Fe({doc:document}))),n.container=u,Object(d.hideElement)(n.container),Object(d.appendChild)(t,n.container),n.driver.renderedIntoContainer){if(n.element=a,Object(d.hideElement)(n.element),!n.element)throw new Error("Could not find element to render component into");Object(d.hideElement)(n.element)}n.clean.register("destroyContainerTemplate",function(){n.container&&n.container.parentNode&&n.container.parentNode.removeChild(n.container),delete n.container})}else if(n.driver.renderedIntoContainer)throw new Error("containerTemplate needed to render "+r)})},e.prototype.cancelContainerEvents=function(){this.clean.run("destroyContainerEvents")},e.prototype.destroy=function(){var e=this;return u.a.try(function(){if(e.clean.hasTasks())return e.component.log("destroy"),e.clean.all()})},e.prototype.tryInit=function(e){var t=this;return u.a.try(e).catch(function(e){t.onInit.reject(e)}).then(function(){return t.onInit})},e.prototype.error=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props;if(!this.errored)return this.errored=!0,u.a.try(function(){return t.onInit=t.onInit||new u.a,t.onInit.reject(e),t.destroy()}).then(function(){if(n.onError)return n.onError(e)}).catch(function(t){throw new Error("An error was encountered while handling error:\n\n "+Object(d.stringifyError)(e)+"\n\n"+Object(d.stringifyError)(t))}).then(function(){if(!n.onError)throw e})},e.destroyAll=function(){for(var t=[];e.activeComponents.length;)t.push(e.activeComponents[0].destroy());return u.a.all(t).then(d.noop)},e}()).prototype,"close",[d.memoized],Object.getOwnPropertyDescriptor(ut.prototype,"close"),ut.prototype),ft(ut.prototype,"closeContainer",[d.memoized],Object.getOwnPropertyDescriptor(ut.prototype,"closeContainer"),ut.prototype),ft(ut.prototype,"destroyContainer",[d.memoized],Object.getOwnPropertyDescriptor(ut.prototype,"destroyContainer"),ut.prototype),ft(ut.prototype,"closeComponent",[d.memoized],Object.getOwnPropertyDescriptor(ut.prototype,"closeComponent"),ut.prototype),ft(ut.prototype,"showContainer",[d.memoized],Object.getOwnPropertyDescriptor(ut.prototype,"showContainer"),ut.prototype),ft(ut.prototype,"showComponent",[d.memoized],Object.getOwnPropertyDescriptor(ut.prototype,"showComponent"),ut.prototype),ft(ut.prototype,"hideContainer",[d.memoized],Object.getOwnPropertyDescriptor(ut.prototype,"hideContainer"),ut.prototype),ft(ut.prototype,"hideComponent",[d.memoized],Object.getOwnPropertyDescriptor(ut.prototype,"hideComponent"),ut.prototype),ut);lt.activeComponents=[];var pt=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),ht=function(){function e(t,n,r){!function(t,n){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this),this.component=t,this.context=r.context,this.clean=Ze(this),this.event=Object(d.eventEmitter)(),this.destroyComponent=lt.prototype.destroyComponent,this.resize=lt.prototype.resize,this.renderTemplate=lt.prototype.renderTemplate,this.registerActiveComponent=lt.prototype.registerActiveComponent,this.props={window:r.props.window,onClose:r.props.onClose,onDisplay:r.props.onDisplay};for(var o=0,i=t.getPropNames(),a=null==i?0:i.length;o<a;o++){var u=i[o];this.component.getProp(u).allowDelegate&&(this.props[u]=r.props[u])}this.userClose=r.overrides.userClose,this.error=r.overrides.error,this.on=r.overrides.on,this.registerActiveComponent(),this.watchForClose(n)}return e.prototype.getDelegate=function(){var e=this;return{overrides:this.getOverrides(),destroy:function(){return e.destroy()}}},e.prototype.watchForClose=function(e){var t=this,n=Object(s.onCloseWindow)(e,function(){return t.destroy()},3e3);this.clean.register("destroyCloseWindowListener",n.cancel)},e.prototype.getOverrides=function(){for(var e=this.context,t=at[e].delegateOverrides,n={},r=this,o=function(e,t,o){var i=t[e];n[i]=function(){return lt.prototype[i].apply(r,arguments)}},i=0,a=Object.keys(t),u=null==a?0:a.length;i<u;i++)o(i,a);return n},e.prototype.destroy=function(){return this.clean.all()},pt(e,[{key:"driver",get:function(){return at[this.context]}}]),e}(),wt=n(26),mt="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 yt(e){var t=e.id,n=e.tag,r=e.context,o=e.CLASS,i=e.outlet,a=e.document,u=e.dimensions,c=u.width,s=u.height;return Pe("div",{id:t,class:o.ZOID+" "+o.ZOID+"-tag-"+n+" "+o.ZOID+"-context-"+r},Pe("style",null,"\n #"+t+", #"+t+" > ."+o.OUTLET+" {\n width: "+c+";\n height: "+s+";\n }\n\n #"+t+" > ."+o.OUTLET+" {\n display: inline-block;\n position: relative;\n }\n\n #"+t+" > ."+o.OUTLET+" > iframe {\n height: 100%;\n width: 100%;\n position: absolute;\n top: 0;\n left: 0;\n transition: opacity .2s ease-in-out;\n }\n\n #"+t+" > ."+o.OUTLET+" > iframe."+o.VISIBLE+" {\n opacity: 1;\n }\n\n #"+t+" > ."+o.OUTLET+" > iframe."+o.INVISIBLE+" {\n opacity: 0;\n }\n "),Pe("node",{el:i})).render(Fe({doc:a}))}function vt(e){var t=e.document;return Pe("html",null,Pe("head",null,Pe("style",null,"\n html, body {\n width: 100%;\n height: 100%;\n overflow: hidden;\n top: 0;\n left: 0;\n margin: 0;\n text-align: center;\n }\n\n .spinner {\n position: absolute;\n max-height: 60vmin;\n max-width: 60vmin;\n height: 40px;\n width: 40px;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateY(-50%);\n z-index: 10;\n }\n\n .spinner .loader {\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n border: 3px solid rgba(0, 0, 0, .2);\n border-top-color: rgba(33, 128, 192, 0.8);\n border-radius: 100%;\n animation: rotation .7s infinite linear;\n\n }\n\n @keyframes rotation {\n from {\n transform: rotate(0deg)\n }\n to {\n transform: rotate(359deg)\n }\n }\n ")),Pe("body",null,Pe("div",{class:"spinner"},Pe("div",{id:"loader",class:"loader"})))).render(Fe({doc:t}))}n(33);var gt,Et="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},Ot={angular:wt.angular,angular2:wt.angular2,glimmer:wt.glimmer,react:wt.react,vue:wt.vue},bt=(function(e,t,n,r,o){var i={};Object.keys(r).forEach(function(e){i[e]=r[e]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(t,n){return n(e,"getPropNames",t)||t},i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(e,"getPropNames",i),i=null)}((gt=function(){function e(t){if(function(t,n){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this),function(e){if(!e)throw new Error("Expected options to be passed");if(!e.tag||!e.tag.match(/^[a-z0-9-]+$/))throw new Error("Invalid options.tag: "+e.tag);if(function(e){if(e.props&&"object"!==mt(e.props))throw new Error("Expected options.props to be an object");if(e.props)for(var t=0,n=Object.keys(e.props),r=null==n?0:n.length;t<r;t++){var o=n[t],i=e.props[o];if(!i||"object"!==(void 0===i?"undefined":mt(i)))throw new Error("Expected options.props."+o+" to be an object");if(!i.type)throw new Error("Expected prop.type");if(-1===He.PROP_TYPES_LIST.indexOf(i.type))throw new Error("Expected prop.type to be one of "+He.PROP_TYPES_LIST.join(", "));if(i.required&&i.def)throw new Error("Required prop can not have a default value")}}(e),e.dimensions){if(e.dimensions&&!Object(d.isPx)(e.dimensions.width)&&!Object(d.isPerc)(e.dimensions.width))throw new Error("Expected options.dimensions.width to be a px or % string value");if(e.dimensions&&!Object(d.isPx)(e.dimensions.height)&&!Object(d.isPerc)(e.dimensions.height))throw new Error("Expected options.dimensions.height to be a px or % string value")}if(e.contexts){if(e.contexts.popup)throw new Error("Popups not supported in this build -- please use the full zoid.js build");for(var t=!1,n=0,r=Object.keys(e.contexts),o=null==r?0:r.length;n<o;n++){var i=r[n];if(-1===He.CONTEXT_LIST.indexOf(i))throw new Error("Unsupported context type: "+i);(e.contexts&&e.contexts[i]||e.contexts&&void 0===e.contexts[i])&&(t=!0)}if(!t)throw new Error("No context type is enabled")}if(e.defaultContext){if(-1===He.CONTEXT_LIST.indexOf(e.defaultContext))throw new Error("Unsupported context type: "+(e.defaultContext||"unknown"));if(e.contexts&&e.defaultContext&&!e.contexts[e.defaultContext])throw new Error("Disallowed default context type: "+(e.defaultContext||"unknown"))}if(e.defaultEnv){if("string"!=typeof e.defaultEnv)throw new TypeError("Expected options.defaultEnv to be a string");if("object"===mt(e.url)&&!e.url[e.defaultEnv])throw new Error("No url found for default env: "+e.defaultEnv)}if(!e.url&&!e.buildUrl)throw new Error("Must pass url");if("object"===mt(e.url)){if(!e.defaultEnv)throw new Error("Must pass options.defaultEnv with env->url mapping");for(var a=0,u=Object.keys(e.url),c=null==u?0:u.length;a<c;a++){var s=u[a];if(!e.url[s])throw new Error("No url specified for env: "+s)}}if(e.prerenderTemplate&&"function"!=typeof e.prerenderTemplate)throw new Error("Expected options.prerenderTemplate to be a function");if(e.containerTemplate&&"function"!=typeof e.containerTemplate)throw new Error("Expected options.containerTemplate to be a function")}(t),this.tag=t.tag,this.name=this.tag.replace(/-/g,"_"),this.allowedParentDomains=t.allowedParentDomains||He.WILDCARD,e.components[this.tag])throw new Error("Can not register multiple components with the same tag");this.builtinProps={env:{type:"string",queryParam:!0,required:!1,def:function(e,t){return t.defaultEnv}},window:{type:"object",sendToChild:!1,required:!1,validate:function(e){if(!Object(s.isWindow)(e)&&!j.isProxyWindow(e))throw new Error("Expected Window or ProxyWindow")},decorate:function(e){if(e)return j.toProxyWindow(e)}},dimensions:{type:"object",required:!1},timeout:{type:"number",required:!1,sendToChild:!1},onDisplay:{type:"function",required:!1,sendToChild:!1,def:function(){return d.noop},decorate:function(e){return Object(d.memoize)(Object(d.promisify)(e))}},onEnter:{type:"function",required:!1,sendToChild:!1,def:function(){return d.noop},decorate:function(e){return Object(d.promisify)(e)}},onRender:{type:"function",required:!1,sendToChild:!1,def:function(){return d.noop},decorate:function(e){return Object(d.promisify)(e)}},onClose:{type:"function",required:!1,sendToChild:!1,def:function(){return d.noop},decorate:function(e){return Object(d.once)(Object(d.promisify)(e))}},onError:{type:"function",required:!1,sendToChild:!0,def:function(){return function(e){setTimeout(function(){throw e})}},decorate:function(e){return Object(d.once)(Object(d.promisify)(e))}}},this.props=t.props||{};var n=t.dimensions||{},r=n.width,o=void 0===r?He.DEFAULT_DIMENSIONS.WIDTH:r,i=n.height,a=void 0===i?He.DEFAULT_DIMENSIONS.HEIGHT:i;this.dimensions={width:Object(d.toCSS)(o),height:Object(d.toCSS)(a)},this.defaultEnv=t.defaultEnv,this.url=t.url||t.buildUrl,this.domain=t.domain,this.bridgeUrl=t.bridgeUrl,this.attributes=t.attributes||{},this.contexts=t.contexts||{iframe:!0,popup:!1},this.defaultContext=t.defaultContext||He.CONTEXT.IFRAME,this.autoResize="object"===Et(t.autoResize)?t.autoResize:{width:Boolean(t.autoResize),height:Boolean(t.autoResize),element:"body"},this.containerTemplate=t.containerTemplate||yt,this.prerenderTemplate=t.prerenderTemplate||vt,this.validate=t.validate,e.components[this.tag]=this,this.registerDrivers(),this.registerChild(),this.listenDelegate()}return e.prototype.getPropNames=function(){for(var e=Object.keys(this.props),t=0,n=Object.keys(this.builtinProps),r=null==n?0:n.length;t<r;t++){var o=n[t];-1===e.indexOf(o)&&e.push(o)}return e},e.prototype.getProp=function(e){return this.props[e]||this.builtinProps[e]},e.prototype.registerDrivers=function(){this.driverCache={};for(var e=0,t=Object.keys(Ot),n=null==t?0:t.length;e<n;e++){var r=t[e];if(0!==r.indexOf("_")){var o=Ot[r].global();o&&this.driver(r,o)}}},e.prototype.driver=function(e,t){if(!Ot[e])throw new Error("Could not find driver for framework: "+e);return this.driverCache[e]||(this.driverCache[e]=Ot[e].register(this,t)),this.driverCache[e]},e.prototype.registerChild=function(){var e=this;return u.a.try(function(){if(e.isChild())return new ot(e)})},e.prototype.listenDelegate=function(){var e=this;se(He.POST_MESSAGE.ALLOW_DELEGATE+"_"+this.name,function(){return!0}),se(He.POST_MESSAGE.DELEGATE+"_"+this.name,function(t){var n=t.source,r=t.data,o=r.context,i=r.props,a=r.overrides;return e.delegate(n,{context:o,props:i,overrides:a}).getDelegate()})},e.prototype.canRenderTo=function(e){return oe(e,He.POST_MESSAGE.ALLOW_DELEGATE+"_"+this.name).then(function(e){return e.data}).catch(function(){return!1})},e.prototype.getUrl=function(e){if("function"==typeof this.url)return this.url(e);if("string"==typeof this.url)return this.url;var t=e.env||this.defaultEnv;if(t&&"object"===Et(this.url)&&this.url[t])return this.url[t];throw new Error("Can not find url")},e.prototype.getInitialDomain=function(e){if("string"==typeof this.domain)return this.domain;var t=e.env||this.defaultEnv;return t&&"object"===Et(this.domain)&&!Object(d.isRegex)(this.domain)&&this.domain[t]?this.domain[t]:Object(s.getDomainFromUrl)(this.getUrl(e))},e.prototype.getDomain=function(e){return Object(d.isRegex)(this.domain)?this.domain:this.getInitialDomain(e)},e.prototype.getBridgeUrl=function(e){if(this.bridgeUrl){if("string"==typeof this.bridgeUrl)return this.bridgeUrl;var t=e.env||this.defaultEnv;if(t&&"object"===Et(this.bridgeUrl)&&this.bridgeUrl[t])return this.bridgeUrl[t]}},e.prototype.isZoidComponent=function(){return $e()},e.prototype.isChild=function(){return $e()&&Ve().tag===this.tag},e.prototype.createError=function(e,t){return new Error("["+(t||this.tag)+"] "+e)},e.prototype.init=function(e,t,n){return new lt(this,this.getRenderContext(t,n),{props:e})},e.prototype.delegate=function(e,t){return new ht(this,e,t)},e.prototype.validateRenderContext=function(e,t){if(e&&!this.contexts[e])throw new Error("["+this.tag+"] Can not render to "+e);if(!t&&e===He.CONTEXT.IFRAME)throw new Error("["+this.tag+"] Context type "+He.CONTEXT.IFRAME+" requires an element selector")},e.prototype.getDefaultContext=function(){if(this.defaultContext&&this.contexts[this.defaultContext])return this.defaultContext;if(this.contexts[He.CONTEXT.IFRAME])return He.CONTEXT.IFRAME;if(this.contexts[He.CONTEXT.POPUP])return He.CONTEXT.POPUP;throw new Error("Can not determine default context")},e.prototype.getRenderContext=function(e,t){return e=e||this.getDefaultContext(),this.validateRenderContext(e,t),e},e.prototype.render=function(e,t){var n=this;return u.a.try(function(){var r=n.getRenderContext(null,t);return new lt(n,r,{props:e}).render(r,t)})},e.prototype.renderIframe=function(e,t){var n=this;return u.a.try(function(){var r=n.getRenderContext(He.CONTEXT.IFRAME,t);return new lt(n,r,{props:e}).render(r,t)})},e.prototype.renderPopup=function(e){var t=this;return u.a.try(function(){var n=t.getRenderContext(He.CONTEXT.POPUP);return new lt(t,n,{props:e}).render(n)})},e.prototype.renderTo=function(e,t,n){var r=this;return u.a.try(function(){var o=r.getRenderContext(null,n);return new lt(r,o,{props:t}).renderTo(o,e,n)})},e.prototype.renderIframeTo=function(e,t,n){var r=this;return u.a.try(function(){var o=r.getRenderContext(He.CONTEXT.IFRAME,n);return new lt(r,o,{props:t}).renderTo(o,e,n)})},e.prototype.renderPopupTo=function(e,t){var n=this;return u.a.try(function(){var r=n.getRenderContext(He.CONTEXT.POPUP);return new lt(n,r,{props:t}).renderTo(r,e)})},e.prototype.log=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ge&&Ge.info("xc_"+e+"_"+t,n)}(this.name,e,t)},e.prototype.logWarning=function(e,t){!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ge&&Ge.warn("xc_"+e+"_"+t,n)}(this.name,e,t)},e.prototype.logError=function(e,t){!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Ge&&Ge.error("xc_"+e+"_"+t,n)}(this.name,e,t)},e.getByTag=function(t){return e.components[t]},e}()).prototype,0,[d.memoize],Object.getOwnPropertyDescriptor(gt.prototype,"getPropNames"),gt.prototype),gt);function St(e){return new bt(e)}function Ct(e){return bt.getByTag(e)}function Tt(){return lt.destroyAll()}bt.components={};var jt=o,_t=He;n.d(t,"PopupOpenError",function(){return d.PopupOpenError}),n.d(t,"create",function(){return St}),n.d(t,"getByTag",function(){return Ct}),n.d(t,"getCurrentScriptDir",function(){return Be}),n.d(t,"useLogger",function(){return qe}),n.d(t,"destroyAll",function(){return Tt}),n.d(t,"postRobot",function(){return jt}),n.d(t,"CONSTANTS",function(){return _t}),t.default=i},function(e,t,n){"use strict";function r(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var o=n(9);t.k=u,t.j=c,t.b=d,t.f=f,t.p=function(e){try{if(!e.location.href)return!0;if("about:blank"===e.location.href)return!0}catch(e){}return!1},t.n=l,t.r=p,t.a=function(e){if(!p(e))throw new Error("Expected window to be same domain");return e},t.l=y,t.c=v,t.t=function(e){return e===y(e)},t.v=O,t.w=function(e){if(function(){for(var e=0;e<g.length;e++)O(g[e])&&(E.splice(e,1),g.splice(e,1))}(),e&&e.contentWindow)try{g.push(e.contentWindow),E.push(e)}catch(e){}},t.m=function(e){return(e=e||window).navigator.mockUserAgent||e.navigator.userAgent},t.h=function(e,t){for(var n=w(e),r=0,o=null==n?0:n.length;r<o;r++){var i=n[r];try{if(p(i)&&i.name===t&&-1!==n.indexOf(i))return i}catch(e){}}try{if(-1!==n.indexOf(e.frames[t]))return e.frames[t]}catch(e){}try{if(-1!==n.indexOf(e[t]))return e[t]}catch(e){}},t.q=function(e,t){return e===c(t)},t.d=b,t.o=function(e,t){var n=b(t);if(n)return n===e;if(t===e)return!1;if(y(t)===t)return!1;for(var r=0,o=w(e),i=null==o?0:o.length;r<i;r++)if(o[r]===t)return!0;return!1},t.e=C,t.i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e,r=0;r<t;r++){if(!n)return;n=u(n)}return n}(e,C(e)-t)},t.s=function(e,t){var n=y(e)||e,r=y(t)||t;try{if(n&&r)return n===r}catch(e){}var o=v(e),i=v(t);if(S(o,i))return!0;var a=c(n),u=c(r);return!(a&&S(v(a),i)||(u&&S(v(u),o),1))},t.x=function e(t,n){if("string"==typeof t){if("string"==typeof n)return t===o.b||n===t;if(r(n))return!1;if(Array.isArray(n))return!1}return r(t)?r(n)?t.toString()===n.toString():!Array.isArray(n)&&Boolean(n.match(t)):!!Array.isArray(t)&&(Array.isArray(n)?JSON.stringify(t)===JSON.stringify(n):!r(n)&&t.some(function(t){return e(t,n)}))},t.A=function(e){return Array.isArray(e)?"("+e.join(" | ")+")":r(e)?"RegExp("+e.toString():e.toString()},t.g=T,t.z=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1/0,o=void 0;return function i(){if(O(e))return o&&clearTimeout(o),t();r<=0?clearTimeout(o):(r-=n,o=setTimeout(i,n))}(),{cancel:function(){o&&clearTimeout(o)}}},t.u=function(e){try{if(e===window)return!0}catch(e){if(e&&e.message===i)return!0}try{if("[object Window]"===Object.prototype.toString.call(e))return!0}catch(e){if(e&&e.message===i)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(e){if(e&&e.message===i)return!0}try{if(e&&e.self===e)return!0}catch(e){if(e&&e.message===i)return!0}try{if(e&&e.parent===e)return!0}catch(e){if(e&&e.message===i)return!0}try{if(e&&e.top===e)return!0}catch(e){if(e&&e.message===i)return!0}try{e&&e.__cross_domain_utils_window_check__}catch(e){return!0}return!1},t.y=function(e){if(0!==T(e).indexOf(o.a.MOCK))return e;throw new Error("Mock urls not supported out of test mode")};var i="Call was rejected by callee.\r\n";function a(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).location.protocol===o.a.ABOUT}function u(e){if(e)try{if(e.parent&&e.parent!==e)return e.parent}catch(e){}}function c(e){if(e&&!u(e))try{return e.opener}catch(e){}}function s(e){try{return e&&e.location&&e.location.href,!0}catch(e){}return!1}function d(e){var t=(e=e||window).location;if(!t)throw new Error("Can not read window location");var n=t.protocol;if(!n)throw new Error("Can not read window protocol");if(n===o.a.FILE)return o.a.FILE+"//";if(n===o.a.ABOUT){var r=u(e);return r&&s(r)?d(r):o.a.ABOUT+"//"}var i=t.host;if(!i)throw new Error("Can not read window host");return n+"//"+i}function f(e){var t=d(e=e||window);return t&&e.mockDomain&&0===e.mockDomain.indexOf(o.a.MOCK)?e.mockDomain:t}function l(e){try{if(e===window)return!0}catch(e){}try{var t=Object.getOwnPropertyDescriptor(e,"location");if(t&&!1===t.enumerable)return!1}catch(e){}try{if(a(e)&&s(e))return!0}catch(e){}try{if(d(e)===d(window))return!0}catch(e){}return!1}function p(e){if(!l(e))return!1;try{if(e===window)return!0;if(a(e)&&s(e))return!0;if(f(window)===f(e))return!0}catch(e){}return!1}function h(e,t){if(!e||!t)return!1;var n=u(t);return n?n===e:-1!==function(e){var t=[];try{for(;e.parent!==e;)t.push(e.parent),e=e.parent}catch(e){}return t}(t).indexOf(e)}function w(e){var t=[],n=void 0;try{n=e.frames}catch(t){n=e}var r=void 0;try{r=n.length}catch(e){}if(0===r)return t;if(r){for(var o=0;o<r;o++){var i=void 0;try{i=n[o]}catch(e){continue}t.push(i)}return t}for(var a=0;a<100;a++){var u=void 0;try{u=n[a]}catch(e){return t}if(!u)return t;t.push(u)}return t}function m(e){for(var t=[],n=0,r=w(e),o=null==r?0:r.length;n<o;n++){var i=r[n];t.push(i);for(var a=0,u=m(i),c=null==u?0:u.length;a<c;a++){var s=u[a];t.push(s)}}return t}function y(e){if(e){try{if(e.top)return e.top}catch(e){}if(u(e)===e)return e;try{if(h(window,e)&&window.top)return window.top}catch(e){}try{if(h(e,window)&&window.top)return window.top}catch(e){}for(var t=0,n=m(e),r=null==n?0:n.length;t<r;t++){var o=n[t];try{if(o.top)return o.top}catch(e){}if(u(o)===o)return o}}}function v(e){var t=y(e);if(!t)throw new Error("Can not determine top window");return[].concat(m(t),[t])}var g=[],E=[];function O(e){var t=!(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!==i}if(t&&p(e))try{if(e.mockclosed)return!0}catch(e){}try{if(!e.parent||!e.top)return!0}catch(e){}var n=function(e,t){for(var n=0;n<e.length;n++)try{if(e[n]===t)return n}catch(e){}return-1}(g,e);if(-1!==n){var r=E[n];if(r&&function(e){if(!e.contentWindow)return!0;if(!e.parentNode)return!0;var t=e.ownerDocument;return!(!t||!t.documentElement||t.documentElement.contains(e))}(r))return!0}return!1}function b(e){return c(e=e||window)||u(e)||void 0}function S(e,t){for(var n=0,r=null==e?0:e.length;n<r;n++)for(var o=e[n],i=0,a=null==t?0:t.length;i<a;i++)if(o===t[i])return!0;return!1}function C(){for(var e=0,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;t;)(t=u(t))&&(e+=1);return e}function T(e){return e.match(/^(https?|mock|file):\/\//)?e.split("/").slice(0,3).join("/"):f()}},function(e,t){},function(e,t,n){"use strict";n(7),n(12)},function(e,t,n){"use strict";n(7)},function(e,t,n){"use strict";n(2),n(0)},function(e,t){},function(e,t,n){"use strict";t.a=function(e,t,n){n.value=Object(r.n)(n.value,{name:t,thisNamespace:!0})};var r=n(7)},function(e,t,n){"use strict";function r(e){return"string"==typeof e&&/^[0-9]+%$/.test(e)}function o(e){return function(e){if("number"==typeof e)return e;var t=e.match(/^([0-9]+)(px|%)$/);if(!t)throw new Error("Could not match css value from "+e);return parseInt(t[1],10)}(e)+"px"}t.a=r,t.b=function(e){return"string"==typeof e&&/^[0-9]+px$/.test(e)},t.c=function(e){return"number"==typeof e?o(e):r(e)?e:o(e)}},function(e,t,n){"use strict";n(2),n(7)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14);n.d(t,"openBridge",function(){return r.openBridge}),n.d(t,"linkUrl",function(){return r.linkUrl}),n.d(t,"isBridge",function(){return r.isBridge}),n.d(t,"needsBridge",function(){return r.needsBridge}),n.d(t,"needsBridgeForBrowser",function(){return r.needsBridgeForBrowser}),n.d(t,"hasBridge",function(){return r.hasBridge}),n.d(t,"needsBridgeForWin",function(){return r.needsBridgeForWin}),n.d(t,"needsBridgeForDomain",function(){return r.needsBridgeForDomain}),n.d(t,"openTunnelToOpener",function(){return r.openTunnelToOpener}),n.d(t,"destroyBridges",function(){return r.destroyBridges})},function(e,t,n){"use strict";var r=n(27);n.d(t,"react",function(){return r.a});var o=n(28);n.d(t,"vue",function(){return o.a});var i=n(29);n.d(t,"angular",function(){return i.a});var a=n(30);n.n(a),n.o(a,"angular2")&&n.d(t,"angular2",function(){return a.angular2}),n.o(a,"glimmer")&&n.d(t,"glimmer",function(){return a.glimmer});var u=n(31);n.d(t,"glimmer",function(){return u.a});var c=n(32);n.d(t,"angular2",function(){return c.a})},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(1),o=n(4),i={global:function(){if(window.React&&window.ReactDOM)return{React:window.React,ReactDOM:window.ReactDOM}},register:function(e,t){var n=t.React,i=t.ReactDOM;return n.createClass?e.react=n.createClass({render:function(){return n.createElement("div",null)},componentDidMount:function(){e.log("instantiate_react_component");var t=i.findDOMNode(this),n=e.init(Object(r.extend)({},this.props),null,t);this.setState({parent:n}),n.render(o.CONTEXT.IFRAME,t)},componentDidUpdate:function(){this.state&&this.state.parent&&this.state.parent.updateProps(Object(r.extend)({},this.props))}}):e.react=function(t){function a(){return function(e,t){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,t.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,t),a.prototype.render=function(){return n.createElement("div",null)},a.prototype.componentDidMount=function(){e.log("instantiate_react_component");var t=i.findDOMNode(this),n=e.init(Object(r.extend)({},this.props),null,t);this.setState({parent:n}),n.render(o.CONTEXT.IFRAME,t)},a.prototype.componentDidUpdate=function(){this.state&&this.state.parent&&this.state.parent.updateProps(Object(r.extend)({},this.props))},a}(n.Component),e.react}}},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(1),o=n(4),i={global:function(){},register:function(e){return{render:function(e){return e("div")},inheritAttrs:!1,mounted:function(){var t=this.$el;this.parent=e.init(Object(r.extend)({},this.$attrs),null,t),this.parent.render(o.CONTEXT.IFRAME,t)},beforeUpdate:function(){this.parent&&this.$attrs&&this.parent.updateProps(Object(r.extend)({},this.$attrs))}}}}},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(1),o=n(4),i={global:function(){return window.angular},register:function(e,t){return t.module(e.tag,[]).directive(Object(r.dasherizeToCamel)(e.tag),function(){for(var t={},n=0,i=e.getPropNames(),a=null==i?0:i.length;n<a;n++){var u=i[n];t[u]="="}return t.props="=",{scope:t,restrict:"E",controller:["$scope","$element",function(n,i){e.log("instantiate_angular_component");var a=function(){var e=void 0;if(n.props)e=n.props;else{e={};for(var o=0,i=Object.keys(t),a=null==i?0:i.length;o<a;o++){var u=i[o];void 0!==n[u]&&(e[u]=n[u])}}return Object(r.replaceObject)(e,function(e){return"function"==typeof e?function(){var t=e.apply(this,arguments);return function(){if("$apply"!==n.$root.$$phase&&"$digest"!==n.$root.$$phase)try{n.$apply()}catch(e){}}(),t}:e})},u=e.init(a(),null,i[0]);u.render(o.CONTEXT.IFRAME,i[0]),n.$watch(function(){u.updateProps(a())})}]}})}}},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o={global:function(){},register:function(e,t){return function(t){function n(){return function(e,t){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,t.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,t),n.prototype.didInsertElement=function(){e.render(r({},this.args),this.element)},n}(t)}}},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(1),o=n(4),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a={global:function(){},register:function(e,t){var n=t.Component,a=t.NgModule,u=t.ElementRef,c=t.NgZone;e.log("initializing angular2 component");var s=function(e){return Object(r.replaceObject)(i({},e.internalProps,e.props),function(t){return"function"==typeof t?function(){var n=this,r=arguments;return e.zone.run(function(){return t.apply(n,r)})}:t})},d=n({selector:e.tag,template:"<div></div>",inputs:["props"]}).Class({constructor:[u,c,function(e,t){this.elementRef=e,this.zone=t}],ngOnInit:function(){var t=this.elementRef.nativeElement,n=e.init(s(this),null,t);n.render(o.CONTEXT.IFRAME,t),this.parent=n},ngOnChanges:function(){this.parent&&this.parent.updateProps(s(this))}});return a({declarations:[d],exports:[d]}).Class({constructor:function(){}})}}},function(e,t){}])});
2//# sourceMappingURL=zoid.frame.min.js.map
\No newline at end of file