1import{c as gi,g as yi}from"./jsx-runtime-Cmk2DK1E.js";(function(){try{var Re=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};Re.SENTRY_RELEASE={id:"58fa8a93aa1057c062760682bcee73e6609c1b05"}}catch{}})();try{(function(){var Re=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},Kr=new Re.Error().stack;Kr&&(Re._sentryDebugIds=Re._sentryDebugIds||{},Re._sentryDebugIds[Kr]="93f703ce-3d96-4626-98ef-930f884c8a7c",Re._sentryDebugIdIdentifier="sentry-dbid-93f703ce-3d96-4626-98ef-930f884c8a7c")})()}catch{}var Ro={exports:{}},Io={exports:{}};(function(Re,Kr){(function(Qr,Se){Re.exports=Se()})(typeof self<"u"?self:gi,function(){return function(Qr){var Se={};function X(j){if(Se[j])return Se[j].exports;var re=Se[j]={i:j,l:!1,exports:{}};return Qr[j].call(re.exports,re,re.exports,X),re.l=!0,re.exports}return X.m=Qr,X.c=Se,X.d=function(j,re,fe){X.o(j,re)||Object.defineProperty(j,re,{enumerable:!0,get:fe})},X.r=function(j){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(j,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(j,"__esModule",{value:!0})},X.t=function(j,re){if(1&re&&(j=X(j)),8&re||4&re&&typeof j=="object"&&j&&j.__esModule)return j;var fe=Object.create(null);if(X.r(fe),Object.defineProperty(fe,"default",{enumerable:!0,value:j}),2&re&&typeof j!="string")for(var Xe in j)X.d(fe,Xe,(function(Tr){return j[Tr]}).bind(null,Xe));return fe},X.n=function(j){var re=j&&j.__esModule?function(){return j.default}:function(){return j};return X.d(re,"a",re),re},X.o=function(j,re){return{}.hasOwnProperty.call(j,re)},X.p="",X(X.s=0)}([function(Qr,Se,X){X.r(Se),X.d(Se,"PopupOpenError",function(){return An}),X.d(Se,"create",function(){return ti}),X.d(Se,"destroy",function(){return oi}),X.d(Se,"destroyComponents",function(){return ho}),X.d(Se,"destroyAll",function(){return vo}),X.d(Se,"PROP_TYPE",function(){return Q}),X.d(Se,"PROP_SERIALIZATION",function(){return bn}),X.d(Se,"CONTEXT",function(){return Ie}),X.d(Se,"EVENT",function(){return ue});function j(e,r){return(j=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n})(e,r)}function re(e,r){e.prototype=Object.create(r.prototype),e.prototype.constructor=e,j(e,r)}function fe(){return(fe=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)({}).hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e}).apply(this,arguments)}function Xe(e){try{if(!e)return!1;if(typeof Promise<"u"&&e instanceof Promise)return!0;if(typeof window<"u"&&typeof window.Window=="function"&&e instanceof window.Window||typeof window<"u"&&typeof window.constructor=="function"&&e instanceof window.constructor)return!1;var r={}.toString;if(r){var n=r.call(e);if(n==="[object Window]"||n==="[object global]"||n==="[object DOMWindow]")return!1}if(typeof e.then=="function")return!0}catch{return!1}return!1}var Tr=0,zr;function tt(){if(!Tr&&zr){var e=zr;zr=null,e.resolve()}}function Pn(){Tr+=1}function Ar(){Tr-=1,tt()}var w=function(){function e(n){var t=this;if(this.resolved=void 0,this.rejected=void 0,this.errorHandled=void 0,this.value=void 0,this.error=void 0,this.handlers=void 0,this.dispatching=void 0,this.stack=void 0,this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],n){var o,i,a=!1,s=!1,c=!1;Pn();try{n(function(d){c?t.resolve(d):(a=!0,o=d)},function(d){c?t.reject(d):(s=!0,i=d)})}catch(d){Ar(),this.reject(d);return}Ar(),c=!0,a?this.resolve(o):s&&this.reject(i)}}var r=e.prototype;return r.resolve=function(n){if(this.resolved||this.rejected)return this;if(Xe(n))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=n,this.dispatch(),this},r.reject=function(n){if(this.resolved||this.rejected)return this;if(Xe(n))throw new Error("Can not reject promise with another promise");if(!n){var t=n&&typeof n.toString=="function"?n.toString():{}.toString.call(n);n=new Error("Expected reject to be called with Error, got "+t)}return this.rejected=!0,this.error=n,this.dispatch(),this},r.asyncReject=function(n){return this.errorHandled=!0,this.reject(n),this},r.dispatch=function(){var n=this.resolved,t=this.rejected,o=this.handlers;if(!this.dispatching&&(n||t)){this.dispatching=!0,Pn();for(var i=function(h,m){return h.then(function(p){m.resolve(p)},function(p){m.reject(p)})},a=0;a<o.length;a++){var s=o[a],c=s.onSuccess,d=s.onError,f=s.promise,u=void 0;if(n)try{u=c?c(this.value):this.value}catch(h){f.reject(h);continue}else if(t){if(!d){f.reject(this.error);continue}try{u=d(this.error)}catch(h){f.reject(h);continue}}if(u instanceof e&&(u.resolved||u.rejected)){var l=u;l.resolved?f.resolve(l.value):f.reject(l.error),l.errorHandled=!0}else Xe(u)?u instanceof e&&(u.resolved||u.rejected)?u.resolved?f.resolve(u.value):f.reject(u.error):i(u,f):f.resolve(u)}o.length=0,this.dispatching=!1,Ar()}},r.then=function(n,t){if(n&&typeof n!="function"&&!n.call)throw new Error("Promise.then expected a function for success handler");if(t&&typeof t!="function"&&!t.call)throw new Error("Promise.then expected a function for error handler");var o=new e;return this.handlers.push({promise:o,onSuccess:n,onError:t}),this.errorHandled=!0,this.dispatch(),o},r.catch=function(n){return this.then(void 0,n)},r.finally=function(n){if(n&&typeof n!="function"&&!n.call)throw new Error("Promise.finally expected a function");return this.then(function(t){return e.try(n).then(function(){return t})},function(t){return e.try(n).then(function(){throw t})})},r.timeout=function(n,t){var o=this;if(this.resolved||this.rejected)return this;var i=setTimeout(function(){o.resolved||o.rejected||o.reject(t||new Error("Promise timed out after "+n+"ms"))},n);return this.then(function(a){return clearTimeout(i),a})},r.toPromise=function(){if(typeof Promise>"u")throw new TypeError("Could not find Promise");return Promise.resolve(this)},r.lazy=function(){return this.errorHandled=!0,this},e.resolve=function(n){return n instanceof e?n:Xe(n)?new e(function(t,o){return n.then(t,o)}):new e().resolve(n)},e.reject=function(n){return new e().reject(n)},e.asyncReject=function(n){return new e().asyncReject(n)},e.all=function(n){var t=new e,o=n.length,i=[].slice();if(!o)return t.resolve(i),t;for(var a=function(d,f,u){return f.then(function(l){i[d]=l,(o-=1)==0&&t.resolve(i)},function(l){u.reject(l)})},s=0;s<n.length;s++){var c=n[s];if(c instanceof e){if(c.resolved){i[s]=c.value,o-=1;continue}}else if(!Xe(c)){i[s]=c,o-=1;continue}a(s,e.resolve(c),t)}return o===0&&t.resolve(i),t},e.hash=function(n){var t={},o=[],i=function(s){if(n.hasOwnProperty(s)){var c=n[s];Xe(c)?o.push(c.then(function(d){t[s]=d})):t[s]=c}};for(var a in n)i(a);return e.all(o).then(function(){return t})},e.map=function(n,t){return e.all(n.map(t))},e.onPossiblyUnhandledException=function(n){return function(t){return{cancel:function(){}}}()},e.try=function(n,t,o){if(n&&typeof n!="function"&&!n.call)throw new Error("Promise.try expected a function");var i;Pn();try{i=n.apply(t,o||[])}catch(a){return Ar(),e.reject(a)}return Ar(),e.resolve(i)},e.delay=function(n){return new e(function(t){setTimeout(t,n)})},e.isPromise=function(n){return!!(n&&n instanceof e)||Xe(n)},e.flush=function(){return function(n){var t=zr=zr||new n;return tt(),t}(e)},e}();function Fr(e){return{}.toString.call(e)==="[object RegExp]"}var _r={IFRAME:"iframe",POPUP:"popup"},pr=`Call was rejected by callee.\r 2`;function ot(e){return e===void 0&&(e=window),e.location.protocol}function it(e){if(e===void 0&&(e=window),e.mockDomain){var r=e.mockDomain.split("//")[0];if(r)return r}return ot(e)}function at(e){return e===void 0&&(e=window),it(e)==="about:"}function $e(e){if(e===void 0&&(e=window),e)try{if(e.parent&&e.parent!==e)return e.parent}catch{}}function ur(e){if(e===void 0&&(e=window),e&&!$e(e))try{return e.opener}catch{}}function kr(e){try{return!0}catch{}return!1}function en(e){e===void 0&&(e=window);var r=e.location;if(!r)throw new Error("Can not read window location");var n=ot(e);
2if(!n)throw new Error("Can not read window protocol");if(n==="file:")return"file://";if(n==="about:"){var t=$e(e);return t&&kr()?en(t):"about://"}var o=r.host;if(!o)throw new Error("Can not read window host");return n+"//"+o}function Z(e){e===void 0&&(e=window);var r=en(e);return r&&e.mockDomain&&e.mockDomain.indexOf("mock:")===0?e.mockDomain:r}function ne(e){if(!function(r){try{if(r===window)return!0}catch{}try{var n=Object.getOwnPropertyDescriptor(r,"location");if(n&&n.enumerable===!1)return!1}catch{}try{if(at(r)&&kr())return!0}catch{}try{if(function(t){return t===void 0&&(t=window),it(t)==="mock:"}(r)&&kr())return!0}catch{}try{if(en(r)===en(window))return!0}catch{}return!1}(e))return!1;try{if(e===window||at(e)&&kr()||Z(window)===Z(e))return!0}catch{}return!1}function He(e){if(!ne(e))throw new Error("Expected window to be same domain");return e}function ut(e,r){if(!e||!r)return!1;var n=$e(r);return n?n===e:function(t){var o=[];try{for(;t.parent!==t;)o.push(t.parent),t=t.parent}catch{}return o}(r).indexOf(e)!==-1}function rn(e){var r=[],n;try{n=e.frames}catch{n=e}var t;try{t=n.length}catch{}if(t===0)return r;if(t){for(var o=0;o<t;o++){var i=void 0;try{i=n[o]}catch{continue}r.push(i)}return r}for(var a=0;a<100;a++){var s=void 0;try{s=n[a]}catch{return r}if(!s)return r;r.push(s)}return r}function nn(e){for(var r=[],n=0,t=rn(e);n<t.length;n++){var o=t[n];r.push(o);for(var i=0,a=nn(o);i<a.length;i++)r.push(a[i])}return r}function Or(e){e===void 0&&(e=window);try{if(e.top)return e.top}catch{}if($e(e)===e)return e;try{if(ut(window,e)&&window.top)return window.top}catch{}try{if(ut(e,window)&&window.top)return window.top}catch{}for(var r=0,n=nn(e);r<n.length;r++){var t=n[r];try{if(t.top)return t.top}catch{}if($e(t)===t)return t}}function Sr(e){var r=Or(e);if(!r)throw new Error("Can not determine top window");var n=[].concat(nn(r),[r]);return n.indexOf(e)===-1&&(n=[].concat(n,[e],nn(e))),n}var Mr=[],xn=[];function ae(e,r){r===void 0&&(r=!0);try{if(e===window)return!1}catch{return!0}try{if(!e)return!0}catch{return!0}try{if(e.closed)return!0}catch(o){return!o||o.message!==pr}if(r&&ne(e))try{if(e.mockclosed)return!0}catch{}try{if(!e.parent||!e.top)return!0}catch{}var n=function(o,i){for(var a=0;a<o.length;a++)try{if(o[a]===i)return a}catch{}return-1}(Mr,e);if(n!==-1){var t=xn[n];if(t&&function(o){if(!o.contentWindow||!o.parentNode)return!0;var i=o.ownerDocument;if(i&&i.documentElement&&!i.documentElement.contains(o)){for(var a=o;a.parentNode&&a.parentNode!==a;)a=a.parentNode;if(!a.host||!i.documentElement.contains(a.host))return!0}return!1}(t))return!0}return!1}function ct(e){return(e=e||window).navigator.mockUserAgent||e.navigator.userAgent}function tn(e,r){for(var n=rn(e),t=0;t<n.length;t++){var o=n[t];try{if(ne(o)&&o.name===r&&n.indexOf(o)!==-1)return o}catch{}}try{if(n.indexOf(e.frames[r])!==-1)return e.frames[r]}catch{}try{if(n.indexOf(e[r])!==-1)return e[r]}catch{}}function dt(e,r){return e===ur(r)}function Ur(e){return e===void 0&&(e=window),ur(e=e||window)||$e(e)||void 0}function Wn(e,r){for(var n=0;n<e.length;n++)for(var t=e[n],o=0;o<r.length;o++)if(t===r[o])return!0;return!1}function Cn(e){e===void 0&&(e=window);for(var r=0,n=e;n;)(n=$e(n))&&(r+=1);return r}function on(e,r){var n=Or(e)||e,t=Or(r)||r;try{if(n&&t)return n===t}catch{}var o=Sr(e),i=Sr(r);if(Wn(o,i))return!0;var a=ur(n),s=ur(t);return a&&Wn(Sr(a),i)||s&&Wn(Sr(s),o),!1}function Je(e,r){if(typeof e=="string"){if(typeof r=="string")return e==="*"||r===e;if(Fr(r)||Array.isArray(r))return!1}return Fr(e)?Fr(r)?e.toString()===r.toString():!Array.isArray(r)&&!!r.match(e):!!Array.isArray(e)&&(Array.isArray(r)?JSON.stringify(e)===JSON.stringify(r):!Fr(r)&&e.some(function(n){return Je(n,r)}))}function nr(e){return e.match(/^(https?|mock|file):\/\//)?e.split("/").slice(0,3).join("/"):Z()}function st(e,r,n,t){n===void 0&&(n=1e3),t===void 0&&(t=1/0);var o;return function i(){if(ae(e))return o&&clearTimeout(o),r();t<=0?clearTimeout(o):(t-=n,o=setTimeout(i,n))}(),{cancel:function(){o&&clearTimeout(o)}}}function mr(e){try{if(e===window)return!0}catch(r){if(r&&r.message===pr)return!0}
2try{if({}.toString.call(e)==="[object Window]")return!0}catch(r){if(r&&r.message===pr)return!0}try{if(window.Window&&e instanceof window.Window)return!0}catch(r){if(r&&r.message===pr)return!0}try{if(e&&e.self===e)return!0}catch(r){if(r&&r.message===pr)return!0}try{if(e&&e.parent===e)return!0}catch(r){if(r&&r.message===pr)return!0}try{if(e&&e.top===e)return!0}catch(r){if(r&&r.message===pr)return!0}try{if(e&&e.__cross_domain_utils_window_check__==="__unlikely_value__")return!1}catch{return!0}try{if("postMessage"in e&&"self"in e&&"location"in e)return!0}catch{}return!1}function On(e){if(r=nr(e),r.indexOf("mock:")!==0)return e;var r;throw new Error("Mock urls not supported out of test mode")}function ft(e){if(ne(e))return He(e).frameElement;for(var r=0,n=document.querySelectorAll("iframe");r<n.length;r++){var t=n[r];if(t&&t.contentWindow&&t.contentWindow===e)return t}}function lt(e){if(function(n){return n===void 0&&(n=window),!!$e(n)}(e)){var r=ft(e);if(r&&r.parentElement){r.parentElement.removeChild(r);return}}try{e.close()}catch{}}function an(e,r){for(var n=0;n<e.length;n++)try{if(e[n]===r)return n}catch{}return-1}var un=function(){function e(){if(this.name=void 0,this.weakmap=void 0,this.keys=void 0,this.values=void 0,this.name="__weakmap_"+(1e9*Math.random()>>>0)+"__",function(){if(typeof WeakMap>"u"||Object.freeze===void 0)return!1;try{var n=new WeakMap,t={};return Object.freeze(t),n.set(t,"__testvalue__"),n.get(t)==="__testvalue__"}catch{return!1}}())try{this.weakmap=new WeakMap}catch{}this.keys=[],this.values=[]}var r=e.prototype;return r._cleanupClosedWindows=function(){for(var n=this.weakmap,t=this.keys,o=0;o<t.length;o++){var i=t[o];if(mr(i)&&ae(i)){if(n)try{n.delete(i)}catch{}t.splice(o,1),this.values.splice(o,1),o-=1}}},r.isSafeToReadWrite=function(n){return!mr(n)},r.set=function(n,t){if(!n)throw new Error("WeakMap expected key");var o=this.weakmap;if(o)try{o.set(n,t)}catch{delete this.weakmap}if(this.isSafeToReadWrite(n))try{var i=this.name,a=n[i];a&&a[0]===n?a[1]=t:Object.defineProperty(n,i,{value:[n,t],writable:!0});return}catch{}this._cleanupClosedWindows();var s=this.keys,c=this.values,d=an(s,n);d===-1?(s.push(n),c.push(t)):c[d]=t},r.get=function(n){if(!n)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{if(t.has(n))return t.get(n)}catch{delete this.weakmap}if(this.isSafeToReadWrite(n))try{var o=n[this.name];return o&&o[0]===n?o[1]:void 0}catch{}this._cleanupClosedWindows();var i=an(this.keys,n);if(i!==-1)return this.values[i]},r.delete=function(n){if(!n)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{t.delete(n)}catch{delete this.weakmap}if(this.isSafeToReadWrite(n))try{var o=n[this.name];o&&o[0]===n&&(o[0]=o[1]=void 0)}catch{}this._cleanupClosedWindows();var i=this.keys,a=an(i,n);a!==-1&&(i.splice(a,1),this.values.splice(a,1))},r.has=function(n){if(!n)throw new Error("WeakMap expected key");var t=this.weakmap;if(t)try{if(t.has(n))return!0}catch{delete this.weakmap}if(this.isSafeToReadWrite(n))try{var o=n[this.name];return!(!o||o[0]!==n)}catch{}return this._cleanupClosedWindows(),an(this.keys,n)!==-1},r.getOrSet=function(n,t){if(this.has(n))return this.get(n);var o=t();return this.set(n,o),o},e}();function ht(e){return(ht=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(e)}function To(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function vt(e,r,n){return(vt=To()?Reflect.construct:function(t,o,i){var a=[null];a.push.apply(a,o);var s=new(Function.bind.apply(t,a));return i&&j(s,i.prototype),s}).apply(null,arguments)}function wt(e){var r=typeof Map=="function"?new Map:void 0;return(wt=function(n){if(n===null||(t=n,Function.toString.call(t).indexOf("[native code]")===-1))return n;var t;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(n))return r.get(n);r.set(n,o)}function o(){return vt(n,arguments,ht(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),j(o,n)})(e)}function Sn(e){return e.name||e.__name__||e.displayName||"anonymous"}function Dn(e,r){try{delete e.name,e.name=r}catch{}return e.__name__=e.displayName=r,e}function Nn(e){if(typeof btoa=="function")return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(r,n){return String.fromCharCode(parseInt(n,16))})).replace(/[=]/g,"");if(typeof Buffer<"u")return Buffer.from(e,"utf8").toString("base64").replace(/[=]/g,"");throw new Error("Can not find window.btoa or Buffer")}function De(){var e="0123456789abcdef";return"uid_"+"xxxxxxxxxx".replace(/./g,function(){return e.charAt(Math.floor(Math.random()*e.length))})+"_"+Nn(new Date().toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}var cn;function Rn(e){try{return JSON.stringify([].slice.call(e),function(r,n){return typeof n=="function"?"memoize["+function(t){if(cn=cn||new un,t==null||typeof t!="object"&&typeof t!="function")throw new Error("Invalid object");var o=cn.get(t);return o||(o=typeof t+":"+De(),cn.set(t,o)),o}(n)+"]":n})}catch{throw new Error("Arguments not serializable -- can not be used to memoize")}}function zo(){return{}}var Lr=0,pt=0;function cr(e,r){r===void 0&&(r={});var n=r.thisNamespace,t=n!==void 0&&n,o=r.time,i,a,s=Lr;Lr+=1;var c=function(){for(var d=arguments.length,f=new Array(d),u=0;u<d;u++)f[u]=arguments[u];
2s<pt&&(i=null,a=null,s=Lr,Lr+=1);var l;l=t?(a=a||new un).getOrSet(this,zo):i=i||{};var h=Rn(f),m=l[h];if(m&&o&&Date.now()-m.time<o&&(delete l[h],m=null),m)return m.value;var p=Date.now(),b=e.apply(this,arguments);return l[h]={time:p,value:b},b};return c.reset=function(){i=null,a=null},Dn(c,(r.name||Sn(e))+"::memoized")}cr.clear=function(){pt=Lr};function Ao(e){var r={};function n(){for(var t=arguments,o=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var c=Rn(a);return r.hasOwnProperty(c)||(r[c]=w.try(function(){return e.apply(o,t)}).finally(function(){delete r[c]})),r[c]}return n.reset=function(){r={}},Dn(n,Sn(e)+"::promiseMemoized")}function le(){}function dn(e){var r=!1;return Dn(function(){if(!r)return r=!0,e.apply(this,arguments)},Sn(e)+"::once")}function Dr(e,r){if(r===void 0&&(r=1),r>=3)return"stringifyError stack overflow";try{if(!e)return"<unknown error: "+{}.toString.call(e)+">";if(typeof e=="string")return e;if(e instanceof Error){var n=e&&e.stack,t=e&&e.message;if(n&&t)return n.indexOf(t)!==-1?n:t+` 3`+n;if(n)return n;if(t)return t}return e&&e.toString&&typeof e.toString=="function"?e.toString():{}.toString.call(e)}catch(o){return"Error while stringifying error: "+Dr(o,r+1)}}function sn(e){return typeof e=="string"?e:e&&e.toString&&typeof e.toString=="function"?e.toString():{}.toString.call(e)}function fn(e,r){if(!r)return e;if(Object.assign)return Object.assign(e,r);for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n]);return e}cr(function(e){if(Object.values)return Object.values(e);var r=[];for(var n in e)e.hasOwnProperty(n)&&r.push(e[n]);return r});function Fo(e){return e}function Br(e,r){var n;return function t(){n=setTimeout(function(){e(),t()},r)}(),{cancel:function(){clearTimeout(n)}}}function In(e){return[].slice.call(e)}function dr(e){return e!=null}function Tn(e){return{}.toString.call(e)==="[object RegExp]"}function jr(e,r,n){if(e.hasOwnProperty(r))return e[r];var t=n();return e[r]=t,t}function ln(e){var r=[],n=!1,t,o={set:function(i,a){return n||(e[i]=a,o.register(function(){delete e[i]})),a},register:function(i){var a=dn(function(){return i(t)});return n?i(t):r.push(a),{cancel:function(){var s=r.indexOf(a);s!==-1&&r.splice(s,1)}}},all:function(i){t=i;var a=[];for(n=!0;r.length;){var s=r.shift();a.push(s())}return w.all(a).then(le)}};return o}function hn(e,r){if(r==null)throw new Error("Expected "+e+" to be present");return r}var Mo=function(e){re(r,e);function r(n){var t;return(t=e.call(this,n)||this).name=t.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(t),t.constructor):t.stack=new Error(n).stack,t}return r}(wt(Error));function mt(){var e=document.body;if(!e)throw new Error("Body element not found");return e}function vn(){return!!document.body&&document.readyState==="complete"}function gt(){return!!document.body&&document.readyState==="interactive"}function yt(e){return encodeURIComponent(e)}cr(function(){return new w(function(e){if(vn()||gt())return e();var r=setInterval(function(){if(vn()||gt())return clearInterval(r),e()},10)})});function Et(e){return function(r,n,t){t===void 0&&(t=[]);var o=r.__inline_memoize_cache__=r.__inline_memoize_cache__||{},i=Rn(t);return o.hasOwnProperty(i)?o[i]:o[i]=(function(){var a={};if(!e||e.indexOf("=")===-1)return a;for(var s=0,c=e.split("&");s<c.length;s++){var d=c[s];(d=d.split("="))[0]&&d[1]&&(a[decodeURIComponent(d[0])]=decodeURIComponent(d[1]))}return a}).apply(void 0,t)}(Et,0,[e])}function bt(e,r){return r===void 0&&(r={}),r&&Object.keys(r).length?function(n){return n===void 0&&(n={}),Object.keys(n).filter(function(t){return typeof n[t]=="string"||typeof n[t]=="boolean"}).map(function(t){var o=n[t];if(typeof o!="string"&&typeof o!="boolean")throw new TypeError("Invalid type for query");return yt(t)+"="+yt(o.toString())}).join("&")}(fe({},Et(e),r)):e}function Uo(e,r){e.appendChild(r)}function Pt(e){return e instanceof window.Element||e!==null&&typeof e=="object"&&e.nodeType===1&&typeof e.style=="object"&&typeof e.ownerDocument=="object"}function zn(e,r){return r===void 0&&(r=document),Pt(e)?e:typeof e=="string"?r.querySelector(e):void 0}function xt(e){return new w(function(r,n){var t=sn(e),o=zn(e);if(o)return r(o);if(vn())return n(new Error("Document is ready and element "+t+" does not exist"));var i=setInterval(function(){if(o=zn(e))r(o),clearInterval(i);else if(vn())return clearInterval(i),n(new Error("Document is ready and element "+t+" does not exist"))},10)})}var An=function(e){re(r,e);function r(){return e.apply(this,arguments)||this}return r}
3(Mo),wn;function Wt(e){if((wn=wn||new un).has(e)){var r=wn.get(e);if(r)return r}var n=new w(function(t,o){e.addEventListener("load",function(){(function(i){if(function(){for(var a=0;a<Mr.length;a++){var s=!1;try{s=Mr[a].closed}catch{}s&&(xn.splice(a,1),Mr.splice(a,1))}}(),i&&i.contentWindow)try{Mr.push(i.contentWindow),xn.push(i)}catch{}})(e),t(e)}),e.addEventListener("error",function(i){e.contentWindow?t(e):o(i)})});return wn.set(e,n),n}function Fn(e){return Wt(e).then(function(r){if(!r.contentWindow)throw new Error("Could not find window in iframe");return r.contentWindow})}function Ct(e,r){e===void 0&&(e={});var n=e.style||{},t=function(i,a,s){i===void 0&&(i="div"),a===void 0&&(a={}),i=i.toLowerCase();var c=document.createElement(i);if(a.style&&fn(c.style,a.style),a.class&&(c.className=a.class.join(" ")),a.id&&c.setAttribute("id",a.id),a.attributes)for(var d=0,f=Object.keys(a.attributes);d<f.length;d++){var u=f[d];c.setAttribute(u,a.attributes[u])}if(a.styleSheet&&function(l,h,m){m===void 0&&(m=window.document),l.styleSheet?l.styleSheet.cssText=h:l.appendChild(m.createTextNode(h))}(c,a.styleSheet),a.html){if(i==="iframe")throw new Error("Iframe html can not be written unless container provided and iframe in DOM");c.innerHTML=a.html}return c}("iframe",{attributes:fe({allowTransparency:"true"},e.attributes||{}),style:fe({backgroundColor:"transparent",border:"none"},n),html:e.html,class:e.class}),o=window.navigator.userAgent.match(/MSIE|Edge/i);return t.hasAttribute("id")||t.setAttribute("id",De()),Wt(t),(e.url||o)&&t.setAttribute("src",e.url||"about:blank"),t}function Ot(e,r,n){return e.addEventListener(r,n),{cancel:function(){e.removeEventListener(r,n)}}}function Lo(e){e.style.setProperty("display","")}function St(e){e.style.setProperty("display","none","important")}function qr(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function pn(e){return!(e&&e.parentNode&&e.ownerDocument&&e.ownerDocument.documentElement&&e.ownerDocument.documentElement.contains(e))}function Dt(e,r,n){var t=n===void 0?{}:n,o=t.width,i=o===void 0||o,a=t.height,s=a===void 0||a,c=t.interval,d=c===void 0?100:c,f=t.win,u=f===void 0?window:f,l=e.offsetWidth,h=e.offsetHeight,m=!1;r({width:l,height:h});var p=function(){if(!m&&function(g){return!!(g.offsetWidth||g.offsetHeight||g.getClientRects().length)}(e)){var I=e.offsetWidth,M=e.offsetHeight;(i&&I!==l||s&&M!==h)&&r({width:I,height:M}),l=I,h=M}},b,P;return u.addEventListener("resize",p),u.ResizeObserver!==void 0?((b=new u.ResizeObserver(p)).observe(e),P=Br(p,10*d)):u.MutationObserver!==void 0?((b=new u.MutationObserver(p)).observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!1}),P=Br(p,10*d)):P=Br(p,d),{cancel:function(){m=!0,b.disconnect(),window.removeEventListener("resize",p),P.cancel()}}}function Mn(e){for(;e.parentNode;)e=e.parentNode;return e.toString()==="[object ShadowRoot]"}var mn=typeof document<"u"?document.currentScript:null,Bo=cr(function(){if(mn||(mn=function(){try{var e=function(){try{throw new Error("_")}catch(a){return a.stack||""}}(),r=/.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e),n=r&&r[1];if(!n)return;for(var t=0,o=[].slice.call(document.getElementsByTagName("script")).reverse();t<o.length;t++){var i=o[t];if(i.src&&i.src===n)return i}}catch{}}()))return mn;throw new Error("Can not determine current script")}),jo=De();cr(function(){var e;try{e=Bo()}catch{return jo}var r=e.getAttribute("data-uid");if(r&&typeof r=="string"||(r=e.getAttribute("data-uid-auto"))&&typeof r=="string")return r;if(e.src){var n=function(t){for(var o="",i=0;i<t.length;i++){var a=t[i].charCodeAt(0)*i;t[i+1]&&(a+=t[i+1].charCodeAt(0)*(i-1)),o+=String.fromCharCode(97+Math.abs(a)%26)}return o}(JSON.stringify({src:e.src,dataset:e.dataset}));r="uid_"+n.slice(n.length-30)}else r=De();return e.setAttribute("data-uid-auto",r),r});function Nt(e){return typeof e=="string"&&/^[0-9]+%$/.test(e)}function Un(e){if(typeof e=="number")return e;var r=e.match(/^([0-9]+)(px|%)$/);if(!r)throw new Error("Could not match css value from "+e);return parseInt(r[1],10)}function Rt(e){return Un(e)+"px"}function It(e){return typeof e=="number"?Rt(e):Nt(e)?e:Rt(e)}function Tt(e,r){if(typeof e=="number")return e;if(Nt(e))return parseInt(r*Un(e)/100,10);if(typeof(n=e)=="string"&&/^[0-9]+px$/.test(n))return Un(e);var n;throw new Error("Can not normalize dimension: "+e)}function Ke(e){e===void 0&&(e=window);var r="__post_robot_10_0_44__";return e!==window?e[r]:e[r]=e[r]||{}}var zt=function(){return{}};function J(e,r){return e===void 0&&(e="store"),r===void 0&&(r=zt),jr(Ke(),e,function(){var n=r();return{has:function(t){return n.hasOwnProperty(t)},get:function(t,o){return n.hasOwnProperty(t)?n[t]:o},set:function(t,o){return n[t]=o,o},del:function(t){delete n[t]},getOrSet:function(t,o){return jr(n,t,o)},reset:function(){n=r()},keys:function(){return Object.keys(n)}}})}var qo=function(){};function gn(){var e=Ke();return e.WINDOW_WILDCARD=e.WINDOW_WILDCARD||new qo,e.WINDOW_WILDCARD}function xe(e,r){return e===void 0&&(e="store"),r===void 0&&(r=zt),J("windowStore").getOrSet(e,function(){var n=new un,t=function(o){return n.getOrSet(o,r)};return{has:function(o){return t(o).hasOwnProperty(e)},get:function(o,i){var a=t(o);return a.hasOwnProperty(e)?a[e]:i},set:function(o,i){return t(o)[e]=i,i},del:function(o){delete t(o)[e]},getOrSet:function(o,i){return jr(t(o),e,i)}}})}function At(){return J("instance").getOrSet("instanceID",De)}function Ft(e,r){var n=r.domain,t=xe("helloPromises"),o=t.get(e);o&&o.resolve({domain:n});var i=w.resolve({domain:n});return t.set(e,i),i}function Ln(e,r){return(0,r.send)(e,"postrobot_hello",{instanceID:At()},{domain:"*",timeout:-1}).then(function(n){var t=n.origin,o=n.data.instanceID;return Ft(e,{domain:t}),{win:e,domain:t,instanceID:o}})}function Mt(e,r){var n=r.send;return xe("windowInstanceIDPromises").getOrSet(e,function(){return Ln(e,{send:n}).then(function(t){return t.instanceID})})}function Ut(e,r,n){r===void 0&&(r=5e3),n===void 0&&(n="Window");var t=function(o){return xe("helloPromises").getOrSet(o,function(){return new w})}(e);
3return r!==-1&&(t=t.timeout(r,new Error(n+" did not load after "+r+"ms"))),t}function Lt(e){xe("knownWindows").set(e,!0)}function Bn(e){return typeof e=="object"&&e!==null&&typeof e.__type__=="string"}function Bt(e){return e===void 0?"undefined":e===null?"null":Array.isArray(e)?"array":typeof e=="function"?"function":typeof e=="object"?e instanceof Error?"error":typeof e.then=="function"?"promise":{}.toString.call(e)==="[object RegExp]"?"regex":{}.toString.call(e)==="[object Date]"?"date":"object":typeof e=="string"?"string":typeof e=="number"?"number":typeof e=="boolean"?"boolean":void 0}function gr(e,r){return{__type__:e,__val__:r}}var Me,Ho=((Me={}).function=function(){},Me.error=function(e){return gr("error",{message:e.message,stack:e.stack,code:e.code,data:e.data})},Me.promise=function(){},Me.regex=function(e){return gr("regex",e.source)},Me.date=function(e){return gr("date",e.toJSON())},Me.array=function(e){return e},Me.object=function(e){return e},Me.string=function(e){return e},Me.number=function(e){return e},Me.boolean=function(e){return e},Me.null=function(e){return e},Me[void 0]=function(e){return gr("undefined",e)},Me),Jo={},Ue,$o=((Ue={}).function=function(){throw new Error("Function serialization is not implemented; nothing to deserialize")},Ue.error=function(e){var r=e.stack,n=e.code,t=e.data,o=new Error(e.message);return o.code=n,t&&(o.data=t),o.stack=r+` 4 5`+o.stack,o},Ue.promise=function(){throw new Error("Promise serialization is not implemented; nothing to deserialize")},Ue.regex=function(e){return new RegExp(e)},Ue.date=function(e){return new Date(e)},Ue.array=function(e){return e},Ue.object=function(e){return e},Ue.string=function(e){return e},Ue.number=function(e){return e},Ue.boolean=function(e){return e},Ue.null=function(e){return e},Ue[void 0]=function(){},Ue),Yo={};function jn(){return!!ct(window).match(/MSIE|trident|edge\/12|edge\/13/i)}function jt(e){return!on(window,e)}function qt(e,r){if(e){if(Z()!==nr(e))return!0}else if(r&&!ne(r))return!0;return!1}function Ht(e){var r=e.win,n=e.domain;return!(!jn()||n&&!qt(n,r)||r&&!jt(r))}function qn(e){return"__postrobot_bridge___"+(e=e||nr(e)).replace(/[^a-zA-Z0-9]+/g,"_")}function Jt(){return!!(window.name&&window.name===qn(Z()))}var Go=new w(function(e){if(window.document&&window.document.body)return e(window.document.body);var r=setInterval(function(){if(window.document&&window.document.body)return clearInterval(r),e(window.document.body)},10)});function $t(e){xe("remoteWindowPromises").getOrSet(e,function(){return new w})}function Hn(e){var r=xe("remoteWindowPromises").get(e);if(!r)throw new Error("Remote window promise not found");return r}function Yt(e,r,n){Hn(e).resolve(function(t,o,i){if(t!==e)throw new Error("Remote window does not match window");if(!Je(o,r))throw new Error("Remote domain "+o+" does not match domain "+r);n.fireAndForget(i)})}function Jn(e,r){Hn(e).reject(r).catch(le)}function yn(e){for(var r=e.win,n=e.name,t=e.domain,o=J("popupWindowsByName"),i=xe("popupWindowsByWin"),a=0,s=o.keys();a<s.length;a++){var c=s[a],d=o.get(c);d&&!ae(d.win)||o.del(c)}if(ae(r))return{win:r,name:n,domain:t};var f=i.getOrSet(r,function(){return n?o.getOrSet(n,function(){return{win:r,name:n}}):{win:r}});if(f.win&&f.win!==r)throw new Error("Different window already linked for window: "+(n||"undefined"));return n&&(f.name=n,o.set(n,f)),t&&(f.domain=t,$t(r)),i.set(r,f),f}function Gt(e){var r=e.on,n=e.send,t=e.receiveMessage;o=window.open,window.open=function(i,a,s,c){var d=o.call(this,On(i),a,s,c);return d&&(yn({win:d,name:a,domain:i?nr(i):null}),d)};var o;(function(i){var a=i.on,s=i.send,c=i.receiveMessage,d=J("popupWindowsByName");a("postrobot_open_tunnel",function(f){var u=f.source,l=f.origin,h=f.data,m=J("bridges").get(l);if(!m)throw new Error("Can not find bridge promise for domain "+l);return m.then(function(p){if(u!==p)throw new Error("Message source does not matched registered bridge for domain "+l);if(!h.name)throw new Error("Register window expected to be passed window name");if(!h.sendMessage)throw new Error("Register window expected to be passed sendMessage method");if(!d.has(h.name))throw new Error("Window with name "+h.name+" does not exist, or was not opened by this window");var b=function(){return d.get(h.name)};if(!b().domain)throw new Error("We do not have a registered domain for window "+h.name);if(b().domain!==l)throw new Error("Message origin "+l+" does not matched registered window origin "+(b().domain||"unknown"));return Yt(b().win,l,h.sendMessage),{sendMessage:function(P){if(window&&!window.closed&&b()){var I=b().domain;if(I)try{c({data:P,origin:I,source:b().win},{on:a,send:s})}catch(M){w.reject(M)}}}}})})})({on:r,send:n,receiveMessage:t}),function(i){var a=i.send;Ke(window).openTunnelToParent=function(s){var c=s.name,d=s.source,f=s.canary,u=s.sendMessage,l=J("tunnelWindows"),h=$e(window);if(!h)throw new Error("No parent window found to open tunnel to");var m=function(p){var b=p.name,P=p.source,I=p.canary,M=p.sendMessage;(function(){for(var S=J("tunnelWindows"),O=0,R=S.keys();O<R.length;O++){var x=R[O];ae(S[x].source)&&S.del(x)}})();var g=De();return J("tunnelWindows").set(g,{name:b,source:P,canary:I,sendMessage:M}),g}({name:c,source:d,canary:f,sendMessage:u});return a(h,"postrobot_open_tunnel",{name:c,sendMessage:function(){var p=l.get(m);
5if(p&&p.source&&!ae(p.source)){try{p.canary()}catch{return}p.sendMessage.apply(this,arguments)}}},{domain:"*"})}}({send:n}),function(i){var a=i.on,s=i.send,c=i.receiveMessage;w.try(function(){var d=ur(window);if(d&&Ht({win:d})){return $t(d),(f=d,xe("remoteBridgeAwaiters").getOrSet(f,function(){return w.try(function(){var u=tn(f,qn(Z()));if(u)return ne(u)&&Ke(He(u))?u:new w(function(l){var h,m;h=setInterval(function(){if(u&&ne(u)&&Ke(He(u)))return clearInterval(h),clearTimeout(m),l(u)},100),m=setTimeout(function(){return clearInterval(h),l()},2e3)})})})).then(function(u){return u?window.name?Ke(He(u)).openTunnelToParent({name:window.name,source:window,canary:function(){},sendMessage:function(l){try{}catch{return}if(window&&!window.closed)try{c({data:l,origin:this.origin,source:this.source},{on:a,send:s})}catch(h){w.reject(h)}}}).then(function(l){var h=l.source,m=l.origin,p=l.data;if(h!==d)throw new Error("Source does not match opener");Yt(h,m,p.sendMessage)}).catch(function(l){throw Jn(d,l),l}):Jn(d,new Error("Can not register with opener: window does not have a name")):Jn(d,new Error("Can not register with opener: no bridge found in opener"))});var f}})}({on:r,send:n,receiveMessage:t})}function $n(){for(var e=J("idToProxyWindow"),r=0,n=e.keys();r<n.length;r++){var t=n[r];e.get(t).shouldClean()&&e.del(t)}}function Zt(e,r){var n=r.send,t=r.id,o=t===void 0?De():t,i=e.then(function(c){if(ne(c))return He(c).name}),a=e.then(function(c){if(ae(c))throw new Error("Window is closed, can not determine type");return ur(c)?_r.POPUP:_r.IFRAME});i.catch(le),a.catch(le);var s=function(){return e.then(function(c){if(!ae(c))return ne(c)?He(c).name:i})};return{id:o,getType:function(){return a},getInstanceID:Ao(function(){return e.then(function(c){return Mt(c,{send:n})})}),close:function(){return e.then(lt)},getName:s,focus:function(){return e.then(function(c){c.focus()})},isClosed:function(){return e.then(function(c){return ae(c)})}
5,setLocation:function(c,d){return d===void 0&&(d={}),e.then(function(f){var u=window.location.protocol+"//"+window.location.host,l=d.method,h=l===void 0?"get":l,m=d.body;if(c.indexOf("/")===0)c=""+u+c;else if(!c.match(/^https?:\/\//)&&c.indexOf(u)!==0)throw new Error("Expected url to be http or https url, or absolute path, got "+JSON.stringify(c));if(h==="post")return s().then(function(p){if(!p)throw new Error("Can not post to window without target name");(function(b){var P=b.url,I=b.target,M=b.body,g=b.method,S=g===void 0?"post":g,O=document.createElement("form");if(O.setAttribute("target",I),O.setAttribute("method",S),O.setAttribute("action",P),O.style.display="none",M)for(var R=0,x=Object.keys(M);R<x.length;R++){var $,V=x[R],T=document.createElement("input");T.setAttribute("name",V),T.setAttribute("value",($=M[V])==null?void 0:$.toString()),O.appendChild(T)}mt().appendChild(O),O.submit(),mt().removeChild(O)})({url:c,target:p,method:h,body:m})});if(h!=="get")throw new Error("Unsupported method: "+h);if(ne(f))try{if(f.location&&typeof f.location.replace=="function"){f.location.replace(c);return}}catch{}f.location=c})},setName:function(c){return e.then(function(d){yn({win:d,name:c});var f=ne(d),u=ft(d);if(!f)throw new Error("Can not set name for cross-domain window: "+c);He(d).name=c,u&&u.setAttribute("name",c),i=w.resolve(c)})}}}var Ye=function(){function e(n){var t=n.send,o=n.win,i=n.serializedWindow;this.id=void 0,this.isProxyWindow=!0,this.serializedWindow=void 0,this.actualWindow=void 0,this.actualWindowPromise=void 0,this.send=void 0,this.name=void 0,this.actualWindowPromise=new w,this.serializedWindow=i||Zt(this.actualWindowPromise,{send:t}),J("idToProxyWindow").set(this.getID(),this),o&&this.setWindow(o,{send:t})}var r=e.prototype;return r.getID=function(){return this.serializedWindow.id},r.getType=function(){return this.serializedWindow.getType()},r.isPopup=function(){return this.getType().then(function(n){return n===_r.POPUP})},r.setLocation=function(n,t){var o=this;return this.serializedWindow.setLocation(n,t).then(function(){return o})},r.getName=function(){return this.serializedWindow.getName()},r.setName=function(n){var t=this;return this.serializedWindow.setName(n).then(function(){return t})},r.close=function(){var n=this;return this.serializedWindow.close().then(function(){return n})},r.focus=function(){var n=this,t=this.isPopup(),o=this.getName(),i=w.hash({isPopup:t,name:o}).then(function(s){var c=s.name;s.isPopup&&c&&window.open("",c)}),a=this.serializedWindow.focus();return w.all([i,a]).then(function(){return n})},r.isClosed=function(){return this.serializedWindow.isClosed()},r.getWindow=function(){return this.actualWindow},r.setWindow=function(n,t){var o=t.send;this.actualWindow=n,this.actualWindowPromise.resolve(this.actualWindow),this.serializedWindow=Zt(this.actualWindowPromise,{send:o,id:this.getID()}),xe("winToProxyWindow").set(n,this)},r.awaitWindow=function(){return this.actualWindowPromise},r.matchWindow=function(n,t){var o=this,i=t.send;return w.try(function(){return o.actualWindow?n===o.actualWindow:w.hash({proxyInstanceID:o.getInstanceID(),knownWindowInstanceID:Mt(n,{send:i})}).then(function(a){var s=a.proxyInstanceID===a.knownWindowInstanceID;return s&&o.setWindow(n,{send:i}),s})})},r.unwrap=function(){return this.actualWindow||this},r.getInstanceID=function(){return this.serializedWindow.getInstanceID()},r.shouldClean=function(){return!!(this.actualWindow&&ae(this.actualWindow))},r.serialize=function(){return this.serializedWindow},e.unwrap=function(n){return e.isProxyWindow(n)?n.unwrap():n},e.serialize=function(n,t){var o=t.send;return $n(),e.toProxyWindow(n,{send:o}).serialize()},e.deserialize=function(n,t){var o=t.send;return $n(),J("idToProxyWindow").get(n.id)||new e({serializedWindow:n,send:o})},e.isProxyWindow=function(n){return!!(n&&!mr(n)&&n.isProxyWindow)},e.toProxyWindow=function(n,t){var o=t.send;if($n(),e.isProxyWindow(n))return n;var i=n;return xe("winToProxyWindow").get(i)||new e({win:i,send:o})},e}();function Yn(e,r,n,t,o){var i=xe("methodStore"),a=J("proxyWindowMethods");Ye.isProxyWindow(t)?a.set(e,{val:r,name:n,domain:o,source:t}):(a.del(e),i.getOrSet(t,function(){return{}})[e]={domain:o,name:n,val:r,source:t})}function Vt(e,r){var n=xe("methodStore"),t=J("proxyWindowMethods");return n.getOrSet(e,function(){return{}})[r]||t.get(r)}function Xt(e,r,n,t,o){a=(i={on:o.on,send:o.send}).on,s=i.send,J("builtinListeners").getOrSet("functionCalls",function(){return a("postrobot_method",{domain:"*"},function(f){var u=f.source,l=f.origin,h=f.data,m=h.id,p=h.name,b=Vt(u,m);
5if(!b)throw new Error("Could not find method '"+p+"' with id: "+h.id+" in "+Z(window));var P=b.source,I=b.domain,M=b.val;return w.try(function(){if(!Je(I,l))throw new Error("Method '"+h.name+"' domain "+JSON.stringify(Tn(b.domain)?b.domain.source:b.domain)+" does not match origin "+l+" in "+Z(window));if(Ye.isProxyWindow(P))return P.matchWindow(u,{send:s}).then(function(g){if(!g)throw new Error("Method call '"+h.name+"' failed - proxy window does not match source in "+Z(window))})}).then(function(){return M.apply({source:u,origin:l},h.args)},function(g){return w.try(function(){if(M.onError)return M.onError(g)}).then(function(){throw g.stack&&(g.stack="Remote call to "+p+"("+function(S){return S===void 0&&(S=[]),In(S).map(function(O){return typeof O=="string"?"'"+O+"'":O===void 0?"undefined":O===null?"null":typeof O=="boolean"?O.toString():Array.isArray(O)?"[ ... ]":typeof O=="object"?"{ ... }":typeof O=="function"?"() => { ... }":"<"+typeof O+">"}).join(", ")}(h.args)+`) failed 6 7`+g.stack),g})}).then(function(g){return{result:g,id:m,name:p}})})});var i,a,s,c=n.__id__||De();e=Ye.unwrap(e);var d=n.__name__||n.name||t;return typeof d=="string"&&typeof d.indexOf=="function"&&d.indexOf("anonymous::")===0&&(d=d.replace("anonymous::",t+"::")),Ye.isProxyWindow(e)?(Yn(c,n,d,e,r),e.awaitWindow().then(function(f){Yn(c,n,d,f,r)})):Yn(c,n,d,e,r),gr("cross_domain_function",{id:c,name:d})}function Kt(e,r,n,t){var o,i=t.on,a=t.send;return function(s,c){c===void 0&&(c=Jo);var d=JSON.stringify(s,function(f){var u=this[f];if(Bn(this))return u;var l=Bt(u);if(!l)return u;var h=c[l]||Ho[l];return h?h(u,f):u});return d===void 0?"undefined":d}(n,((o={}).promise=function(s,c){return function(d,f,u,l,h){return gr("cross_domain_zalgo_promise",{then:Xt(d,f,function(m,p){return u.then(m,p)},l,{on:h.on,send:h.send})})}(e,r,s,c,{on:i,send:a})},o.function=function(s,c){return Xt(e,r,s,c,{on:i,send:a})},o.object=function(s){return mr(s)||Ye.isProxyWindow(s)?gr("cross_domain_window",Ye.serialize(s,{send:a})):s},o))}function Qt(e,r,n,t){var o,i=t.send;return function(a,s){if(s===void 0&&(s=Yo),a!=="undefined")return JSON.parse(a,function(c,d){if(Bn(this))return d;var f,u;if(Bn(d)?(f=d.__type__,u=d.__val__):(f=Bt(d),u=d),!f)return u;var l=s[f]||$o[f];return l?l(u,c):u})}(n,((o={}).cross_domain_zalgo_promise=function(a){return function(s,c,d){return new w(d.then)}(0,0,a)},o.cross_domain_function=function(a){return function(s,c,d,f){var u=d.id,l=d.name,h=f.send,m=function(b){b===void 0&&(b={});function P(){var I=arguments;return Ye.toProxyWindow(s,{send:h}).awaitWindow().then(function(M){var g=Vt(M,u);if(g&&g.val!==P)return g.val.apply({source:window,origin:Z()},I);var S=[].slice.call(I);return b.fireAndForget?h(M,"postrobot_method",{id:u,name:l,args:S},{domain:c,fireAndForget:!0}):h(M,"postrobot_method",{id:u,name:l,args:S},{domain:c,fireAndForget:!1}).then(function(O){return O.data.result})}).catch(function(M){throw M})}return P.__name__=l,P.__origin__=c,P.__source__=s,P.__id__=u,P.origin=c,P},p=m();return p.fireAndForget=m({fireAndForget:!0}),p}(e,r,a,{send:i})},o.cross_domain_window=function(a){return Ye.deserialize(a,{send:i})},o))}var Hr={};Hr.postrobot_post_message=function(e,r,n){n.indexOf("file:")===0&&(n="*"),e.postMessage(r,n)},Hr.postrobot_bridge=function(e,r,n){if(!jn()&&!Jt())throw new Error("Bridge not needed for browser");if(ne(e))throw new Error("Post message through bridge disabled between same domain windows");if(on(window,e)!==!1)throw new Error("Can only use bridge to communicate between two different windows, not between frames");(function(t,o,i){var a=dt(window,t),s=dt(t,window);if(!a&&!s)throw new Error("Can only send messages to and from parent and popup windows");Hn(t).then(function(c){return c(t,o,i)})})(e,n,r)},Hr.postrobot_global=function(e,r){if(!ct(window).match(/MSIE|rv:11|trident|edge\/12|edge\/13/i))throw new Error("Global messaging not needed for browser");if(!ne(e))throw new Error("Post message through global disabled between different domain windows");if(on(window,e)!==!1)throw new Error("Can only use global to communicate between two different windows, not between frames");var n=Ke(e);if(!n)throw new Error("Can not find postRobot global on foreign window");n.receiveMessage({source:window,origin:Z(),data:r})};function Gn(e,r,n,t){var o=t.on,i=t.send;return w.try(function(){var a=xe().getOrSet(e,function(){return{}});return a.buffer=a.buffer||[],a.buffer.push(n),a.flush=a.flush||w.flush().then(function(){if(ae(e))throw new Error("Window is closed");var s=Kt(e,r,((c={}).__post_robot_10_0_44__=a.buffer||[],c),{on:o,send:i}),c;delete a.buffer;for(var d=Object.keys(Hr),f=[],u=0;u<d.length;u++){var l=d[u];try{Hr[l](e,s,r)}catch(h){f.push(h)}}if(f.length===d.length)throw new Error(`All post-robot messaging strategies failed: 8 9`+f.map(function(h,m){return m+". "+Dr(h)}).join(` 10 11`))}),a.flush.then(function(){delete a.flush})}).then(le)}function _t(e){return J("responseListeners").get(e)}function kt(e){J("responseListeners").del(e)}function eo(e){return J("erroredResponseListeners").has(e)}function ro(e){var r=e.name,n=e.win,t=e.domain,o=xe("requestListeners");if(n==="*"&&(n=null),t==="*"&&(t=null),!r)throw new Error("Name required to get request listener");for(var i=0,a=[n,gn()];i<a.length;i++){var s=a[i];if(s){var c=o.get(s);if(c){var d=c[r];if(d){if(t&&typeof t=="string"){if(d[t])return d[t];if(d.__domain_regex__)for(var f=0,u=d.__domain_regex__;f<u.length;f++){var l=u[f],h=l.listener;if(Je(l.regex,t))return h}}if(d["*"])return d["*"]}}}}}function Zo(e,r,n,t){var o=t.on,i=t.send,a=ro({name:n.name,win:e,domain:r}),s=n.name==="postrobot_method"&&n.data&&typeof n.data.name=="string"?n.data.name+"()":n.name;function c(d,f,u){return w.flush().then(function(){if(!n.fireAndForget&&!ae(e))try{return Gn(e,r,{id:De(),origin:Z(window),type:"postrobot_message_response",hash:n.hash,name:n.name,ack:d,data:f,error:u},{on:o,send:i})}catch(l){throw new Error("Send response message failed for "+s+" in "+Z()+` 12 13`+Dr(l))}})}return w.all([w.flush().then(function(){if(!n.fireAndForget&&!ae(e))try{return Gn(e,r,{id:De(),origin:Z(window),type:"postrobot_message_ack",hash:n.hash,name:n.name},{on:o,send:i})}catch(d){throw new Error("Send ack message failed for "+s+" in "+Z()+` 14 15`+Dr(d))}}),w.try(function(){if(!a)throw new Error("No handler found for post message: "+n.name+" from "+r+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!Je(a.domain,r))throw new Error("Request origin "+r+" does not match domain "+a.domain.toString());return a.handler({source:e,origin:r,data:n.data})}).then(function(d){return c("success",d)},function(d){return c("error",null,d)})]).then(le).catch(function(d){if(a&&a.handleError)return a.handleError(d);throw d})}function Vo(e,r,n){if(!eo(n.hash)){var t=_t(n.hash);if(!t)throw new Error("No handler found for post message ack for message: "+n.name+" from "+r+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);try{if(!Je(t.domain,r))throw new Error("Ack origin "+r+" does not match domain "+t.domain.toString());if(e!==t.win)throw new Error("Ack source does not match registered window")}catch(o){t.promise.reject(o)}t.ack=!0}}function Xo(e,r,n){if(!eo(n.hash)){var t=_t(n.hash);if(!t)throw new Error("No handler found for post message response for message: "+n.name+" from "+r+" in "+window.location.protocol+"//"+window.location.host+window.location.pathname);if(!Je(t.domain,r))throw new Error("Response origin "+r+" does not match domain "+(o=t.domain,Array.isArray(o)?"("+o.join(" | ")+")":Fr(
15o)?"RegExp("+o.toString()+")":o.toString()));var o;if(e!==t.win)throw new Error("Response source does not match registered window");kt(n.hash),n.ack==="error"?t.promise.reject(n.error):n.ack==="success"&&t.promise.resolve({source:e,origin:r,data:n.data})}}function Zn(e,r){var n=r.on,t=r.send,o=J("receivedMessages");try{if(!window||window.closed||!e.source)return}catch{return}var i=e.source,a=e.origin,s=function(f,u,l,h){var m=h.on,p=h.send,b;try{b=Qt(u,l,f,{on:m,send:p})}catch{return}if(b&&typeof b=="object"&&b!==null){var P=b.__post_robot_10_0_44__;if(Array.isArray(P))return P}}(e.data,i,a,{on:n,send:t});if(s){Lt(i);for(var c=0;c<s.length;c++){var d=s[c];if(o.has(d.id)||(o.set(d.id,!0),ae(i)&&!d.fireAndForget))return;d.origin.indexOf("file:")===0&&(a="file://");try{d.type==="postrobot_message_request"?Zo(i,a,d,{on:n,send:t}):d.type==="postrobot_message_response"?Xo(i,a,d):d.type==="postrobot_message_ack"&&Vo(i,a,d)}catch(f){setTimeout(function(){throw f},0)}}}}function tr(e,r,n){if(!e)throw new Error("Expected name");if(typeof(r=r||{})=="function"&&(n=r,r={}),!n)throw new Error("Expected handler");(r=r||{}).name=e,r.handler=n||r.handler;var t=r.window,o=r.domain,i=function a(s,c){var d=s.name,f=s.win,u=s.domain,l=xe("requestListeners");if(!d||typeof d!="string")throw new Error("Name required to add request listener");if(Array.isArray(f)){for(var h=[],m=0,p=f;m<p.length;m++)h.push(a({name:d,domain:u,win:p[m]},c));return{cancel:function(){for(var $=0;$<h.length;$++)h[$].cancel()}}}if(Array.isArray(u)){for(var b=[],P=0,I=u;P<I.length;P++)b.push(a({name:d,win:f,domain:I[P]},c));return{cancel:function(){for(var $=0;$<b.length;$++)b[$].cancel()}}}var M=ro({name:d,win:f,domain:u});if(f&&f!=="*"||(f=gn()),u=u||"*",M)throw f&&u?new Error("Request listener already exists for "+d+" on domain "+u.toString()+" for "+(f===gn()?"wildcard":"specified")+" window"):f?new Error("Request listener already exists for "+d+" for "+(f===gn()?"wildcard":"specified")+" window"):u?new Error("Request listener already exists for "+d+" on domain "+u.toString()):new Error("Request listener already exists for "+d);var g=l.getOrSet(f,function(){return{}}),S=jr(g,d,function(){return{}}),O=u.toString(),R,x;return Tn(u)?(R=jr(S,"__domain_regex__",function(){return[]})).push(x={regex:u,listener:c}):S[O]=c,{cancel:function(){delete S[O],x&&(R.splice(R.indexOf(x,1)),R.length||delete S.__domain_regex__),Object.keys(S).length||delete g[d],f&&!Object.keys(g).length&&l.del(f)}}}({name:e,win:t,domain:o},{handler:r.handler,handleError:r.errorHandler||function(a){throw a},window:t,domain:o||"*",name:e});return{cancel:function(){i.cancel()}}}var Ge=function e(r,n,t,o){var i=(o=o||{}).domain||"*",a=o.timeout||-1,s=o.timeout||5e3,c=o.fireAndForget||!1;return w.try(function(){if(function(d,f,u){if(!d)throw new Error("Expected name");if(u&&typeof u!="string"&&!Array.isArray(u)&&!Tn(u))throw new TypeError("Can not send "+d+". Expected domain "+JSON.stringify(u)+" to be a string, array, or regex");if(ae(f))throw new Error("Can not send "+d+". Target window is closed")}(n,r,i),function(d,f){var u=Ur(f);if(u)return u===d;if(f===d||Or(f)===f)return!1;for(var l=0,h=rn(d);l<h.length;l++)if(h[l]===f)return!0;return!1}(window,r))return Ut(r,s)}).then(function(d){return function(f,u,l,h){var m=h.send;return w.try(function(){return typeof u=="string"?u:w.try(function(){return l||Ln(f,{send:m}).then(function(p){return p.domain})}).then(function(p){if(!Je(u,u))throw new Error("Domain "+sn(u)+" does not match "+sn(u));return p})})}(r,i,(d===void 0?{}:d).domain,{send:e})}).then(function(d){var f=d,u=n==="postrobot_method"&&t&&typeof t.name=="string"?t.name+"()":n,l=new w,h=n+"_"+De();if(!c){var m={name:n,win:r,domain:f,promise:l};(function(S,O){J("responseListeners").set(S,O)})(h,m);var p=xe("requestPromises").getOrSet(r,function(){return[]});p.push(l),l.catch(function(){(function(S){J("erroredResponseListeners").set(S,!0)})(h),kt(h)});var b=function(S){return xe("knownWindows").get(S,!1)}(r)?1e4:2e3,P=a,I=b,M=P,g=Br(function(){return ae(r)?l.reject(new Error("Window closed for "+n+" before "+(m.ack?"response":"ack"))):m.cancelled?l.reject(new Error("Response listener was cancelled for "+n)):(I=Math.max(I-500,0),M!==-1&&(M=Math.max(M-500,0)),m.ack||I!==0?M===0?l.reject(new Error("No response for postMessage "+u+" in "+Z()+" in "+P+"ms")):void 0:l.reject(new Error("No ack for postMessage "+u+" in "+Z()+" in "+b+"ms")))},500);l.finally(function(){g.cancel(),p.splice(p.indexOf(l,1))}).catch(le)}return Gn(r,f,{id:De(),origin:Z(window),type:"postrobot_message_request",hash:h,name:n,data:t,fireAndForget:c},{on:tr,send:e}).then(function(){return c?l.resolve():l},function(S){throw new Error("Send request message failed for "+u+" in "+Z()+` 16 17`+Dr(S))})})};function Jr(e){return Ye.toProxyWindow(e,{send:Ge})}function no(e){for(var r=0,n=xe("requestPromises").get(e,[]);r<n.length;r++)n[r].reject(new Error("Window "+(ae(e)?"closed":"cleaned up")+" before response")).catch(le)}var sr;sr={setupBridge:Gt,openBridge:function(e,r){var n=J("bridges"),t=J("bridgeFrames");return r=r||nr(e),n.getOrSet(r,function(){return w.try(function(){if(Z()===r)throw new Error("Can not open bridge on the same domain as current domain: "+r);var o=qn(r);if(tn(window,o))throw new Error("Frame with name "+o+" already exists on page");var i=function(a,s){var c=document.createElement("iframe");return c.setAttribute("name",a),c.setAttribute("id",a),c.setAttribute("style","display: none; margin: 0; padding: 0; border: 0px none; overflow: hidden;"),c.setAttribute("frameborder","0"),c.setAttribute("border","0"),c.setAttribute("scrolling","no"),c.setAttribute("allowTransparency","true"),c.setAttribute("tabindex","-1"),c.setAttribute("hidden","true"),c.setAttribute("title",""),c.setAttribute("role","presentation"),c.src=s,c}(o,e);return t.set(r,i),Go.then(function(a){a.appendChild(i);var s=i.contentWindow;return new w(function(c,d){i.addEventListener("load",c),i.addEventListener("error",d)}).then(function(){return Ut(s,5e3,"Bridge "+e)}).then(function(){return s})})})})},linkWindow:yn,linkUrl:function(e,r){yn({win:e,domain:nr(r)})},isBridge:Jt,needsBridge:Ht,needsBridgeForBrowser:jn,hasBridge:function(e,r){return J("bridges").has(r||nr(e))},needsBridgeForWin:jt,needsBridgeForDomain:qt,destroyBridges:function(){for(var e=J("bridges"),r=J("bridgeFrames"),n=0,t=r.keys();n<t.length;n++){var o=r.get(t[n]);o&&o.parentNode&&o.parentNode.removeChild(o)}r.reset(),e.reset()}};function $r(e){if(!ne(e))throw new Error("Can not get global for window on different domain");return e.__zoid_9_0_86__||(e.__zoid_9_0_86__={}),e.__zoid_9_0_86__}function to(e,r){try{return r($r(e))}catch{}}function En(e){return{get:function(){var r=this;return w.try(function(){if(r.source&&r.source!==window)throw new Error("Can not call get on proxy object from a remote window");return e})}}}function Ko(e){return Nn(JSON.stringify(e))}function Vn(e){var r=$r(e);return r.references=r.references||{},r.references}function oo(e){var r=e.data,n=e.metaData,t=e.sender,o=e.receiver,i=e.passByReference,a=i!==void 0&&i,s=e.basic,c=s!==void 0&&s,d=Jr(o.win),f=c?JSON.stringify(r):Kt(d,o.domain,r,{on:tr,send:Ge}),u=a?function(l){var h=De();return Vn(window)[h]=l,{type:"uid",uid:h}}(f):{type:"raw",val:f};return{serializedData:Ko({sender:{domain:t.domain},metaData:n,reference:u}),cleanReference:function(){l=window,(h=u).type==="uid"&&delete Vn(l)[h.uid];var l,h}}}function io(e){var r=e.sender,n=e.basic,t=n!==void 0&&n,o=function(f){return JSON.parse(function(u){if(typeof atob=="function")return decodeURIComponent([].map.call(atob(u),function(l){return"%"+("00"+l.charCodeAt(0).toString(16)).slice(-2)}).join(""));if(typeof Buffer<"u")return Buffer.from(u,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")}(f))}(e.data),i=o.reference,a=o.metaData,s;s=typeof r.win=="function"?r.win({metaData:a}):r.win;var c;c=typeof r.domain=="function"?r.domain({metaData:a}):typeof r.domain=="string"?r.domain:o.sender.domain;var d=function(f,u){if(u.type==="raw")return u.val;if(u.type==="uid")return Vn(f)[u.uid];throw new Error("Unsupported ref type: "+u.type)}(s,i);return{data:t?JSON.parse(d):function(f,u,l){return Qt(f,u,l,{on:tr,send:Ge})}(s,c,d),metaData:a,sender:{win:s,domain:c},reference:i}}var Q={STRING:"string",OBJECT:"object",FUNCTION:"function",BOOLEAN:"boolean",NUMBER:"number",ARRAY:"array"},bn={JSON:"json",DOTIFY:"dotify",BASE64:"base64"},Ie=_r,ue={RENDER:"zoid-render",RENDERED:"zoid-rendered",DISPLAY:"zoid-display",ERROR:"zoid-error",CLOSE:"zoid-close",DESTROY:"zoid-destroy",PROP
17S:"zoid-props",RESIZE:"zoid-resize",FOCUS:"zoid-focus"};function ao(e){return"__zoid__"+e.name+"__"+e.serializedPayload+"__"}function Xn(e){if(!e)throw new Error("No window name");var r=e.split("__"),n=r[1],t=r[2],o=r[3];if(n!=="zoid")throw new Error("Window not rendered by zoid - got "+n);if(!t)throw new Error("Expected component name");if(!o)throw new Error("Expected serialized payload ref");return{name:t,serializedInitialPayload:o}}var Qo=cr(function(e){var r=io({data:Xn(e).serializedInitialPayload,sender:{win:function(n){return function(t){if(t.type==="opener")return hn("opener",ur(window));if(t.type==="parent"&&typeof t.distance=="number")return hn("parent",function(a,s){return s===void 0&&(s=1),function(c,d){d===void 0&&(d=1);for(var f=c,u=0;u<d;u++){if(!f)return;f=$e(f)}return f}(a,Cn(a)-s)}(window,t.distance));if(t.type==="global"&&t.uid&&typeof t.uid=="string"){var o=function(){var a=t.uid,s=Ur(window);if(!s)throw new Error("Can not find ancestor window");for(var c=0,d=Sr(s);c<d.length;c++){var f=d[c];if(ne(f)){var u=to(f,function(l){return l.windows&&l.windows[a]});if(u)return{v:u}}}}();if(typeof o=="object")return o.v}else if(t.type==="name"){var i=t.name;return hn("namedWindow",function(a,s){return tn(a,s)||function c(d,f){var u=tn(d,f);if(u)return u;for(var l=0,h=rn(d);l<h.length;l++){var m=c(h[l],f);if(m)return m}}(Or(a)||a,s)}(hn("ancestor",Ur(window)),i))}throw new Error("Unable to find "+t.type+" parent component window")}(n.metaData.windowRef)}}});return{parent:r.sender,payload:r.data,reference:r.reference}});function uo(){return Qo(window.name)}function _o(e,r){if(r===void 0&&(r=window),e===$e(r))return{type:"parent",distance:Cn(e)};if(e===ur(r))return{type:"opener"};if(ne(e)&&(t=e,t!==Or(t))){var n=He(e).name;if(n)return{type:"name",name:n}}var t}function co(e,r,n,t,o){if(!e.hasOwnProperty(n))return t;var i=e[n];return typeof i.childDecorate=="function"?i.childDecorate({value:t,uid:o.uid,tag:o.tag,close:o.close,focus:o.focus,onError:o.onError,onProps:o.onProps,resize:o.resize,getParent:o.getParent,getParentDomain:o.getParentDomain,show:o.show,hide:o.hide,export:o.export,getSiblings:o.getSiblings}):t}function ko(){return w.try(function(){window.focus()})}function so(){return w.try(function(){window.close()})}var yr=function(){return le},Yr=function(e){return dn(e.value)};function Kn(e,r,n){for(var t=0,o=Object.keys(fe({},e,r));t<o.length;t++){var i=o[t];n(i,r[i],e[i])}}function fo(e,r,n){var t={};return w.all(function(o,i,a){var s=[];return Kn(o,i,function(c,d,f){var u=function(l,h,m){return w.resolve().then(function(){var p,b;if(m!=null&&h){var P=(p={},p.get=h.queryParam,p.post=h.bodyParam,p)[n],I=(b={},b.get=h.queryValue,b.post=h.bodyValue,b)[n];if(P)return w.hash({finalParam:w.try(function(){return typeof P=="function"?P({value:m}):typeof P=="string"?P:l}),finalValue:w.try(function(){return typeof I=="function"&&dr(m)?I({value:m}):m})}).then(function(M){var g=M.finalParam,S=M.finalValue,O;if(typeof S=="boolean")O=S.toString();else if(typeof S=="string")O=S.toString();else if(typeof S=="object"&&S!==null){if(h.serialization===bn.JSON)O=JSON.stringify(S);else if(h.serialization===bn.BASE64)O=Nn(JSON.stringify(S));else if(h.serialization===bn.DOTIFY||!h.serialization){O=function V(T,C,he){C===void 0&&(C=""),he===void 0&&(he={}),C=C&&C+".";for(var Y in T)T.hasOwnProperty(Y)&&T[Y]!=null&&typeof T[Y]!="function"&&(T[Y]&&Array.isArray(T[Y])&&T[Y].length&&T[Y].every(function(Qe){return typeof Qe!="object"})?he[""+C+Y+"[]"]=T[Y].join(","):T[Y]&&typeof T[Y]=="object"?he=V(T[Y],""+C+Y,he):he[""+C+Y]=T[Y].toString());return he}(S,l);for(var R=0,x=Object.keys(O);R<x.length;R++){var $=x[R];t[$]=O[$]}return}}else typeof S=="number"&&(O=S.toString());t[g]=O})}})}(c,d,f);s.push(u)}),s}(r,e)).then(function(){return t})}function lo(e){var r=e.uid,n=e.options,t=e.overrides,o=t===void 0?{}:t,i=e.parentWin,a=i===void 0?window:i,s=n.propsDef,c=n.containerTemplate,d=n.prerenderTemplate,f=n.tag,u=n.name,l=n.attributes,h=n.dimensions,m=n.autoResize,p=n.url,b=n.domain,P=n.exports,I=new w,M=[],g=ln(),S={},O={},R={visible:!0},x=o.event?o.event:($={},V={},T={on:function(v,E){var D=V[v]=V[v]||[];D.push(E);var W=!1;return{cancel:function(){W||(W=!0,D.splice(D.indexOf(E),1))}}},once:function(v,E){var D=T.on(v,function(){D.cancel(),E()});return D},trigger:function(v){for(var E=arguments.length,D=new Array(E>1?E-1:0),W=1;W<E;W++)D[W-1]=arguments[W];var U=V[v],B=[];if(U)for(var ee=function(Oe){var K=U[Oe];B.push(w.try(function(){return K.apply(void 0,D)}))},_=0;_<U.length;_++)ee(_);return w.all(B).then(le)},triggerOnce:function(v){if($[v])return w.resolve();$[v]=!0;for(var E=arguments.length,D=new Array(E>1?E-1:0),W=1;W<E;W++)D[W-1]=arguments[W];return T.trigger.apply(T,[v].concat(D))},reset:function(){V={}}}),$,V,T,C=o.props?o.props:{},he,Y,Qe,or,_e,ir=o.onError,fr=o.getProxyContainer,Er=o.show,lr=o.hide,Ze=o.close,br=o.renderContainer,hr=o.getProxyWindow,vr=o.setProxyWin,Pr=o.openFrame,xr=o.openPrerenderFrame,L=o.prerender,Le=o.open,q=o.openPrerender,ve=o.watchForUnload,we=o.getInternalState,ce=o.setInternalState,We=function(){return typeof h=="function"?h({props:C}):h},Ce=function(){return w.try(function(){return o.resolveInitPromise?o.resolveInitPromise():I.resolve()})},pe=function(v){return w.try(function(){return o.rejectInitPromise?o.rejectInitPromise(v):I.reject(v)})},Ne=function(v){for(var E={},D=0,W=Object.keys(C);D<W.length;D++){var U=W[D],B=s[U];
17B&&B.sendToChild===!1||B&&B.sameDomain&&!Je(v,Z(window))||(E[U]=C[U])}return w.hash(E)},Be=function(){return w.try(function(){return we?we():R})},Te=function(v){return w.try(function(){return ce?ce(v):R=fe({},R,v)})},Ve=function(){return hr?hr():w.try(function(){var v=C.window;if(v){var E=Jr(v);return g.register(function(){return v.close()}),E}return new Ye({send:Ge})})},je=function(v){return vr?vr(v):w.try(function(){he=v})},ar=function(){return Er?Er():w.hash({setState:Te({visible:!0}),showElement:Y?Y.get().then(Lo):null}).then(le)},Nr=function(){return lr?lr():w.hash({setState:Te({visible:!1}),showElement:Y?Y.get().then(St):null}).then(le)},Wr=function(){return typeof p=="function"?p({props:C}):p},ke=function(){return typeof l=="function"?l({props:C}):l},Gr=function(){return nr(Wr())},Rr=function(v,E){var D=E.windowName;return Pr?Pr(v,{windowName:D}):w.try(function(){if(v===Ie.IFRAME)return En(Ct({attributes:fe({name:D,title:u},ke().iframe)}))})},Zr=function(v){return xr?xr(v):w.try(function(){if(v===Ie.IFRAME)return En(Ct({attributes:fe({name:"__zoid_prerender_frame__"+u+"_"+De()+"__",title:"prerender__"+u},ke().iframe)}))})},Ir=function(v,E,D){return q?q(v,E,D):w.try(function(){if(v===Ie.IFRAME){if(!D)throw new Error("Expected proxy frame to be passed");return D.get().then(function(W){return g.register(function(){return qr(W)}),Fn(W).then(function(U){return He(U)}).then(function(U){return Jr(U)})})}if(v===Ie.POPUP)return E;throw new Error("No render context available for "+v)})},wo=function(){return w.try(function(){if(he)return w.all([x.trigger(ue.FOCUS),he.focus()]).then(le)})},ii=function(){var v=$r(window);return v.windows=v.windows||{},v.windows[r]=window,g.register(function(){delete v.windows[r]}),r},ai=function(v,E,D,W){if(E===Z(window))return{type:"global",uid:ii()};if(v!==window)throw new Error("Can not construct cross-domain window reference for different target window");if(C.window){var U=W.getWindow();if(!U)throw new Error("Can not construct cross-domain window reference for lazy window prop");if(Ur(U)!==window)throw new Error("Can not construct cross-domain window reference for window prop with different ancestor")}if(D===Ie.POPUP)return{type:"opener"};if(D===Ie.IFRAME)return{type:"parent",distance:Cn(window)};throw new Error("Can not construct window reference for child")},po=function(v,E){return w.try(function(){or=v,Qe=E,Ce(),g.register(function(){return E.close.fireAndForget().catch(le)})})},kn=function(v){var E=v.width,D=v.height;return w.try(function(){x.trigger(ue.RESIZE,{width:E,height:D})})},Vr=function(v){return w.try(function(){return x.trigger(ue.DESTROY)}).catch(le).then(function(){return g.all(v)}).then(function(){I.asyncReject(v||new Error("Component destroyed"))})},wr=cr(function(v){return w.try(function(){return Ze?ae(Ze.__source__)?void 0:Ze():w.try(function(){return x.trigger(ue.CLOSE)}).then(function(){return Vr(v||new Error("Component closed"))})})}),mo=function(v,E){var D=E.proxyWin,W=E.proxyFrame,U=E.windowName;return Le?Le(v,{proxyWin:D,proxyFrame:W,windowName:U}):w.try(function(){if(v===Ie.IFRAME){if(!W)throw new Error("Expected proxy frame to be passed");return W.get().then(function(te){return Fn(te).then(function(G){return g.register(function(){return qr(te)}),g.register(function(){return no(G)}),G})})}if(v===Ie.POPUP){var B=We(),ee=B.width,_=ee===void 0?"300px":ee,Oe=B.height,K=Oe===void 0?"150px":Oe;_=Tt(_,window.outerWidth),K=Tt(K,window.outerWidth);var de=function(te,G){var oe=(G=G||{}).closeOnUnload,k=oe===void 0?1:oe,Ae=G.name,me=Ae===void 0?"":Ae,H=G.width,ge=G.height,ze=0,Ee=0;H&&(window.outerWidth?Ee=Math.round((window.outerWidth-H)/2)+window.screenX:window.screen.width&&(Ee=Math.round((window.screen.width-H)/2))),ge&&(window.outerHeight?ze=Math.round((window.outerHeight-ge)/2)+window.screenY:window.screen.height&&(ze=Math.round((window.screen.height-ge)/2))),delete G.closeOnUnload,delete G.name,H&&ge&&(G=fe({top:ze,left:Ee,width:H,height:ge,status:1,toolbar:0,menubar:0,resizable:1,scrollbars:1},G));var Cr=Object.keys(G).map(function(er){if(G[er]!=null)return er+"="+sn(G[er])}
17).filter(Boolean).join(","),qe;try{qe=window.open("",me,Cr)}catch(er){throw new An("Can not open popup window - "+(er.stack||er.message))}if(ae(qe))throw new An("Can not open popup window - blocked");return k&&window.addEventListener("unload",function(){return qe.close()}),qe}(0,fe({name:U,width:_,height:K},ke().popup));return g.register(function(){return lt(de)}),g.register(function(){return no(de)}),de}throw new Error("No render context available for "+v)}).then(function(B){return D.setWindow(B,{send:Ge}),D.setName(U).then(function(){return D})})},go=function(){return w.try(function(){var v=Ot(window,"unload",dn(function(){Vr(new Error("Window navigated away"))})),E=st(a,Vr,3e3);if(g.register(E.cancel),g.register(v.cancel),ve)return ve()})},yo=function(v){var E=!1;return v.isClosed().then(function(D){return D?(E=!0,wr(new Error("Detected component window close"))):w.delay(200).then(function(){return v.isClosed()}).then(function(W){if(W)return E=!0,wr(new Error("Detected component window close"))})}).then(function(){return E})},Xr=function(v){return ir?ir(v):w.try(function(){if(M.indexOf(v)===-1)return M.push(v),I.asyncReject(v),x.trigger(ue.ERROR,v)})},Eo=new w,bo=function(v){return w.try(function(){Eo.resolve(v)})};po.onError=Xr;var Po=function(v,E){return v({uid:r,container:E.container,context:E.context,doc:E.doc,frame:E.frame,prerenderFrame:E.prerenderFrame,focus:wo,close:wr,state:S,props:C,tag:f,dimensions:We(),event:x})},xo=function(v,E){var D=E.context;return L?L(v,{context:D}):w.try(function(){if(d){var W=v.getWindow();if(W&&ne(W)&&function(oe){try{if(!oe.location.href||oe.location.href==="about:blank")return!0}catch{}return!1}(W)){var U=(W=He(W)).document,B=Po(d,{context:D,doc:U});if(B){if(B.ownerDocument!==U)throw new Error("Expected prerender template to have been created with document from child window");(function(oe,k){var Ae=k.tagName.toLowerCase();if(Ae!=="html")throw new Error("Expected element to be html, got "+Ae);for(var me=oe.document.documentElement,H=0,ge=In(me.children);H<ge.length;H++)me.removeChild(ge[H]);for(var ze=0,Ee=In(k.children);ze<Ee.length;ze++)me.appendChild(Ee[ze])})(W,B);var ee=m.width,_=ee!==void 0&&ee,Oe=m.height,K=Oe!==void 0&&Oe,de=m.element,te=de===void 0?"body":de;if((te=zn(te,U))&&(_||K)){var G=Dt(te,function(oe){kn({width:_?oe.width:void 0,height:K?oe.height:void 0})},{width:_,height:K,win:W});x.on(ue.RENDERED,G.cancel)}}}}})},Wo=function(v,E){var D=E.proxyFrame,W=E.proxyPrerenderFrame,U=E.context,B=E.rerender;return br?br(v,{proxyFrame:D,proxyPrerenderFrame:W,context:U,rerender:B}):w.hash({container:v.get(),frame:D?D.get():null,prerenderFrame:W?W.get():null,internalState:Be()}).then(function(ee){var _=ee.container,Oe=ee.internalState.visible,K=Po(c,{context:U,container:_,frame:ee.frame,prerenderFrame:ee.prerenderFrame,doc:document});if(K){Oe||St(K),Uo(_,K);var de=function(te,G){G=dn(G);var oe=!1,k=[],Ae,me,H,ge=function(){oe=!0;for(var qe=0;qe<k.length;qe++)k[qe].disconnect();Ae&&Ae.cancel(),H&&H.removeEventListener("unload",ze),me&&qr(me)},ze=function(){oe||(G(),ge())};if(pn(te))return ze(),{cancel:ge};if(window.MutationObserver)for(var Ee=te.parentElement;Ee;){var Cr=new window.MutationObserver(function(){pn(te)&&ze()});Cr.observe(Ee,{childList:!0}),k.push(Cr),Ee=Ee.parentElement}return(me=document.createElement("iframe")).setAttribute("name","__detect_close_"+De()+"__"),me.style.display="none",Fn(me).then(function(qe){(H=He(qe)).addEventListener("unload",ze)}),te.appendChild(me),Ae=Br(function(){pn(te)&&ze()},1e3),{cancel:ge}}(K,function(){var te=new Error("Detected container element removed from DOM");return w.delay(1).then(function(){if(!pn(K))return g.all(te),B().then(Ce,pe);wr(te)})});return g.register(function(){return de.cancel()}),g.register(function(){return qr(K)}),Y=En(K)}})},Co=function(){return{state:S,event:x,close:wr,focus:wo,resize:kn,onError:Xr,updateProps:ui,show:ar,hide:Nr}},et=function(v){v===void 0&&(v={});var E=_e,D=Co();fn(O,v),function(W,U,B,ee,_){var Oe=ee.state,K=ee.close,de=ee.focus,te=ee.event,G=ee.onError;Kn(B,W,function(oe,k,Ae){var me=!1,H=Ae;Object.defineProperty(U,oe,{configurable:!0,enumerable:!0,get:function(){return me?H:(me=!0,function(){if(!k)return H;var ge=k.alias;if(ge&&!dr(Ae)&&dr(B[ge])&&(H=B[ge]),k.value&&(H=k.value({props:U,state:Oe,close:K,focus:de,event:te,onError:G,container:_})),!k.default||dr(H)||dr(B[oe])||(H=k.default({props:U,state:Oe,close:K,focus:de,event:te,onError:G,container:_})),dr(H)){if(k.type===Q.ARRAY?!Array.isArray(H):typeof H!==k.type)throw new TypeError("Prop is not of type "+k.type+": "+oe)}else if(k.required!==!1&&!dr(B[oe]))throw new Error('Expected prop "'+oe+'" to be defined');return dr(H)&&k.decorate&&(H=k.decorate({value:H,props:U,state:Oe,close:K,focus:de,event:te,onError:G,container:_})),H}())}})}),Kn(U,W,le)}(s,C,O,D,E)},ui=function(v){return et(v),I.then(function(){var E=Qe,D=he;if(E&&D&&or)return Ne(or).then(function(W){return E.updateProps(W).cat
17ch(function(U){return yo(D).then(function(B){if(!B)throw U})})})})},Oo=function(v){return fr?fr(v):w.try(function(){return xt(v)}).then(function(E){return Mn(E)&&(E=function D(W){var U=function(Oe){var K=function(de){for(;de.parentNode;)de=de.parentNode;if(Mn(de))return de}(Oe);if(K&&K.host)return K.host}(W);if(!U)throw new Error("Element is not in shadow dom");var B="shadow-slot-"+De(),ee=document.createElement("slot");ee.setAttribute("name",B),W.appendChild(ee);var _=document.createElement("div");return _.setAttribute("slot",B),U.appendChild(_),Mn(U)?D(_):_}(E)),_e=E,En(E)})};return{init:function(){(function(){x.on(ue.RENDER,function(){return C.onRender()}),x.on(ue.DISPLAY,function(){return C.onDisplay()}),x.on(ue.RENDERED,function(){return C.onRendered()}),x.on(ue.CLOSE,function(){return C.onClose()}),x.on(ue.DESTROY,function(){return C.onDestroy()}),x.on(ue.RESIZE,function(){return C.onResize()}),x.on(ue.FOCUS,function(){return C.onFocus()}),x.on(ue.PROPS,function(v){return C.onProps(v)}),x.on(ue.ERROR,function(v){return C&&C.onError?C.onError(v):pe(v).then(function(){setTimeout(function(){throw v},1)})}),g.register(x.reset)})()},render:function(v){var E=v.target,D=v.container,W=v.context,U=v.rerender;return w.try(function(){var B=Gr(),ee=b||Gr();(function(N,ye,ie){if(N!==window){if(!on(window,N))throw new Error("Can only renderTo an adjacent frame");var be=Z();if(!Je(ye,be)&&!ne(N))throw new Error("Can not render remotely to "+ye.toString()+" - can only render to "+be);if(ie&&typeof ie!="string")throw new Error("Container passed to renderTo must be a string selector, got "+typeof ie+" }")}})(E,ee,D);var _=w.try(function(){if(E!==window)return function(N,ye){for(var ie={},be=0,Fe=Object.keys(C);be<Fe.length;be++){var se=Fe[be],rr=s[se];rr&&rr.allowDelegate&&(ie[se]=C[se])}var Pe=Ge(ye,"zoid_delegate_"+u,{uid:r,overrides:{props:ie,event:x,close:wr,onError:Xr,getInternalState:Be,setInternalState:Te,resolveInitPromise:Ce,rejectInitPromise:pe}}).then(function(z){var A=z.data.parent;return g.register(function(y){if(!ae(ye))return A.destroy(y)}),A.getDelegateOverrides()}).catch(function(z){throw new Error(`Unable to delegate rendering. Possibly the component is not loaded in the target window. 18 19`+Dr(z))});return fr=function(){for(var z=arguments.length,A=new Array(z),y=0;y<z;y++)A[y]=arguments[y];return Pe.then(function(F){return F.getProxyContainer.apply(F,A)})},br=function(){for(var z=arguments.length,A=new Array(z),y=0;y<z;y++)A[y]=arguments[y];return Pe.then(function(F){return F.renderContainer.apply(F,A)})},Er=function(){for(var z=arguments.length,A=new Array(z),y=0;y<z;y++)A[y]=arguments[y];return Pe.then(function(F){return F.show.apply(F,A)})},lr=function(){for(var z=arguments.length,A=new Array(z),y=0;y<z;y++)A[y]=arguments[y];return Pe.then(function(F){return F.hide.apply(F,A)})},ve=function(){for(var z=arguments.length,A=new Array(z),y=0;y<z;y++)A[y]=arguments[y];return Pe.then(function(F){return F.watchForUnload.apply(F,A)})},N===Ie.IFRAME?(hr=function(){for(var z=arguments.length,A=new Array(z),y=0;y<z;y++)A[y]=arguments[y];return Pe.then(function(F){return F.getProxyWindow.apply(F,A)})},Pr=function(){for(var z=arguments.length,A=new Array(z),y=0;y<z;y++)A[y]=arguments[y];return Pe.then(function(F){return F.openFrame.apply(F,A)})},xr=function(){for(var z=arguments.length,A=new Array(z),y=0;y<z;y++)A[y]=arguments[y];return Pe.then(function(F){return F.openPrerenderFrame.apply(F,A)})},L=function(){for(var z=arguments.length,A=new Array(z),y=0;y<z;y++)A[y]=arguments[y];return Pe.then(function(F){return F.prerender.apply(F,A)})},Le=function(){for(var z=arguments.length,A=new Array(z),y=0;y<z;y++)A[y]=arguments[y];return Pe.then(function(F){return F.open.apply(F,A)})},q=function(){for(var z=arguments.length,A=new Array(z),y=0;y<z;y++)A[y]=arguments[y];return Pe.then(function(F){return F.openPrerender.apply(F,A)})}):N===Ie.POPUP&&(vr=function(){for(var z=arguments.length,A=new Array(z),y=0;y<z;y++)A[y]=arguments[y];return Pe.then(function(F){return F.setProxyWin.apply(F,A)})}),Pe}(W,E)}),Oe=C.window,K=go(),de=fo(s,C,"post"),te=x.trigger(ue.RENDER),G=Oo(D),oe=Ve(),k=G.then(function(){return et()}),Ae=k.then(function(){return fo(s,C,"get").then(function(N){return function(ye,ie){var be=ie.query||{},Fe=ie.hash||{},se,rr,Pe=ye.split("#");rr=Pe[1];var z=(se=Pe[0]).split("?");se=z[0];var A=bt(z[1],be),y=bt(rr,Fe);return A&&(se=se+"?"+A),y&&(se=se+"#"+y),se}(On(Wr()),{query:N})})}),me=oe.then(function(N){return function(ie){var be=ie===void 0?{}:ie,Fe=be.proxyWin,se=be.initialChildDomain,rr=be.childDomainMatch,Pe=be.target,z=Pe===void 0?window:Pe,A=be.context;return function(y){var F=y===void 0?{}:y,rt=F.proxyWin,vi=F.childDomainMatch,wi=F.context;return Ne(F.initialChildDomain).then(function(pi){return{uid:r,context:wi,tag:f,childDomainMatch:v
19i,version:"9_0_86",props:pi,exports:(No=rt,{init:function(mi){return po(this.origin,mi)},close:wr,checkClose:function(){return yo(No)},resize:kn,onError:Xr,show:ar,hide:Nr,export:bo})};var No})}({proxyWin:Fe,initialChildDomain:se,childDomainMatch:rr,context:A}).then(function(y){var F=oo({data:y,metaData:{windowRef:ai(z,se,A,Fe)},sender:{domain:Z(window)},receiver:{win:Fe,domain:rr},passByReference:se===Z()}),rt=F.serializedData;return g.register(F.cleanReference),rt})}({proxyWin:(ye={proxyWin:N,initialChildDomain:B,childDomainMatch:ee,target:E,context:W}).proxyWin,initialChildDomain:ye.initialChildDomain,childDomainMatch:ye.childDomainMatch,target:ye.target,context:ye.context}).then(function(ie){return ao({name:u,serializedPayload:ie})});var ye}),H=me.then(function(N){return Rr(W,{windowName:N})}),ge=Zr(W),ze=w.hash({proxyContainer:G,proxyFrame:H,proxyPrerenderFrame:ge}).then(function(N){return Wo(N.proxyContainer,{context:W,proxyFrame:N.proxyFrame,proxyPrerenderFrame:N.proxyPrerenderFrame,rerender:U})}).then(function(N){return N}),Ee=w.hash({windowName:me,proxyFrame:H,proxyWin:oe}).then(function(N){var ye=N.proxyWin;return Oe?ye:mo(W,{windowName:N.windowName,proxyWin:ye,proxyFrame:N.proxyFrame})}),Cr=w.hash({proxyWin:Ee,proxyPrerenderFrame:ge}).then(function(N){return Ir(W,N.proxyWin,N.proxyPrerenderFrame)}),qe=Ee.then(function(N){return he=N,je(N)}),er=w.hash({proxyPrerenderWin:Cr,state:qe}).then(function(N){return xo(N.proxyPrerenderWin,{context:W})}),So=w.hash({proxyWin:Ee,windowName:me}).then(function(N){if(Oe)return N.proxyWin.setName(N.windowName)}),ci=w.hash({body:de}).then(function(N){return n.method?n.method:Object.keys(N.body).length?"post":"get"}),Do=w.hash({proxyWin:Ee,windowUrl:Ae,body:de,method:ci,windowName:So,prerender:er}).then(function(N){return N.proxyWin.setLocation(N.windowUrl,{method:N.method,body:N.body})}),di=Ee.then(function(N){(function ye(ie,be){var Fe=!1;return g.register(function(){Fe=!0}),w.delay(2e3).then(function(){return ie.isClosed()}).then(function(se){if(!Fe)return se?wr(new Error("Detected "+be+" close")):ye(ie,be)})})(N,W)}),si=w.hash({container:ze,prerender:er}).then(function(){return x.trigger(ue.DISPLAY)}),fi=Ee.then(function(N){return function(ye,ie,be){return w.try(function(){return ye.awaitWindow()}).then(function(Fe){if(sr&&sr.needsBridge({win:Fe,domain:ie})&&!sr.hasBridge(ie,ie)){var se=typeof n.bridgeUrl=="function"?n.bridgeUrl({props:C}):n.bridgeUrl;if(!se)throw new Error("Bridge needed to render "+be);var rr=nr(se);return sr.linkUrl(Fe,ie),sr.openBridge(On(se),rr)}})}(N,B,W)}),li=Do.then(function(){return w.try(function(){var N=C.timeout;if(N)return I.timeout(N,new Error("Loading component timed out after "+N+" milliseconds"))})}),hi=I.then(function(){return x.trigger(ue.RENDERED)});return w.hash({initPromise:I,buildUrlPromise:Ae,onRenderPromise:te,getProxyContainerPromise:G,openFramePromise:H,openPrerenderFramePromise:ge,renderContainerPromise:ze,openPromise:Ee,openPrerenderPromise:Cr,setStatePromise:qe,prerenderPromise:er,loadUrlPromise:Do,buildWindowNamePromise:me,setWindowNamePromise:So,watchForClosePromise:di,onDisplayPromise:si,openBridgePromise:fi,runTimeoutPromise:li,onRenderedPromise:hi,delegatePromise:_,watchForUnloadPromise:K,finalSetPropsPromise:k})}).catch(function(B){return w.all([Xr(B),Vr(B)]).then(function(){throw B},function(){throw B})}).then(le)},destroy:Vr,getProps:function(){return C},setProps:et,export:bo,getHelpers:Co,getDelegateOverrides:function(){return w.try(function(){return{getProxyContainer:Oo,show:ar,hide:Nr,renderContainer:Wo,getProxyWindow:Ve,watchForUnload:go,openFrame:Rr,openPrerenderFrame:Zr,prerender:xo,open:mo,openPrerender:Ir,setProxyWin:je}})},getExports:function(){return P({getExports:function(){return Eo}})}}}function ei(e){var r=e.uid,n=e.frame,t=e.prerenderFrame,o=e.doc,i=e.props,a=e.event,s=e.dimensions,c=s.width,d=s.height;if(n&&t){var f=o.createElement("div");f.setAttribute("id",r);var u=o.createElement("style");return i.cspNonce&&u.setAttribute("nonce",i.cspNonce),u.appendChild(o.createTextNode(` 20 #`+r+` { 21 display: inline-block; 22 position: relative; 23 width: `+c+`; 24 height: `+d+`; 25 } 26 27 #`+r+` > iframe { 28 display: inline-block; 29 position: absolute; 30 width: 100%; 31 height: 100%; 32 top: 0; 33 left: 0; 34 transition: opacity .2s ease-in-out; 35 } 36 37 #`+r+` > iframe.zoid-invisible { 38 opacity: 0; 39 } 40 41 #`+r+` > iframe.zoid-visible { 42 opacity: 1; 43 } 44 `)),f.appendChild(n),f.appendChild(t),f.appendChild(u),t.classList.add("zoid-visible"),n.classList.add("zoid-invisible"),a.on(ue.RENDERED,function(){t.classList.remove("zoid-visible"),t.classList.add("zoid-invisible"),n.classList.remove("zoid-invisible"),n.classList.add("zoid-visible"),setTimeout(function(){qr(t)},1)}),a.on(ue.RESIZE,function(l){var h=l.width,m=l.height;typeof h=="number"&&(f.style.width=It(h)),typeof m=="number"&&(f.style.height=It(m))}),f}}function ri(e){var r=e.doc,n=e.props,t=r.createElement("html"),o=r.createElement("body"),i=r.createElement("style"),a=r.createElement("div");return a.classList.add("spinner"),n.cspNonce&&i.setAttribute("nonce",n.cspNonce),t.appendChild(o),o.appendChild(a),o.appendChild(i),i.appendChild(r.createTextNode(` 45 html, body { 46 width: 100%; 47 height: 100%; 48 } 49 50 .spinner { 51 position: fixed; 52 max-height: 60vmin; 53 max-width: 60vmin; 54 height: 40px; 55 width: 40px; 56 top: 50%; 57 left: 50%; 58 box-sizing: border-box; 59 border: 3px solid rgba(0, 0, 0, .2); 60 border-top-color: rgba(33, 128, 192, 0.8); 61 border-radius: 100%; 62 animation: rotation .7s infinite linear; 63 } 64 65 @keyframes rotation { 66 from { 67 transform: translateX(-50%) translateY(-50%) rotate(0deg); 68 } 69 to { 70 transform: translateX(-50%) translateY(-50%) rotate(359deg); 71 } 72 } 73 `)),t}var Qn=ln(),_n=ln();function ni(e){var r=function(u){var l=u.tag,h=u.url,m=u.domain,p=u.bridgeUrl,b=u.props,P=b===void 0?{}:b,I=u.dimensions,M=I===void 0?{}:I,g=u.autoResize,S=g===void 0?{}:g,O=u.allowedParentDomains,R=O===void 0?"*":O,x=u.attributes,$=x===void 0?{}:x,V=u.defaultContext,T=V===void 0?Ie.IFRAME:V,C=u.containerTemplate,he=C===void 0?ei:C,Y=u.prerenderTemplate,Qe=Y===void 0?ri:Y,or=u.validate,_e=u.eligible,ir=_e===void 0?function(){return{eligible:!0}}:_e,fr=u.logger,Er=fr===void 0?{info:le}:fr,lr=u.exports,Ze=lr===void 0?le:lr,br=u.method,hr=u.children,vr=hr===void 0?function(){return{}}:hr,Pr=l.replace(/-/g,"_"),xr=fe({},{window:{type:Q.OBJECT,sendToChild:!1,required:!1,allowDelegate:!0,validate:function(L){var Le=L.value;if(!mr(Le)&&!Ye.isProxyWindow(Le))throw new Error("Expected Window or ProxyWindow");if(mr(Le)){if(ae(Le))throw new Error("Window is closed");if(!ne(Le))throw new Error("Window is not same domain")}},decorate:function(L){return Jr(L.value)}},timeout:{type:Q.NUMBER,required:!1,sendToChild:!1},cspNonce:{type:Q.STRING,required:!1},onDisplay:{type:Q.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:yr,decorate:Yr},onRendered:{type:Q.FUNCTION,required:!1,sendToChild:!1,default:yr,decorate:Yr},onRender:{type:Q.FUNCTION,required:!1,sendToChild:!1,default:yr,decorate:Yr},onClose:{type:Q.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:yr,decorate:Yr},onDestroy:{type:Q.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:yr,decorate:Yr},onResize:{type:Q.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:yr},onFocus:{type:Q.FUNCTION,required:!1,sendToChild:!1,allowDelegate:!0,default:yr},close:{type:Q.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(L){return L.close}},focus:{type:Q.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(L){return L.focus}},resize:{type:Q.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(L){return L.resize}},uid:{type:Q.STRING,required:!1,sendToChild:!1,childDecorate:function(L){return L.uid}},tag:{type:Q.STRING,required:!1,sendToChild:!1,childDecorate:function(L){return L.tag}},getParent:{type:Q.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(L){return L.getParent}},getParentDomain:{type:Q.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(L){return L.getParentDomain}},show:{type:Q.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(L){return L.show}},hide:{type:Q.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(L){return L.hide}},export:{type:Q.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(L){return L.export}}
73,onError:{type:Q.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(L){return L.onError}},onProps:{type:Q.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(L){return L.onProps}},getSiblings:{type:Q.FUNCTION,required:!1,sendToChild:!1,childDecorate:function(L){return L.getSiblings}}},P);if(!he)throw new Error("Container template required");return{name:Pr,tag:l,url:h,domain:m,bridgeUrl:p,method:br,propsDef:xr,dimensions:M,autoResize:S,allowedParentDomains:R,attributes:$,defaultContext:T,containerTemplate:he,prerenderTemplate:Qe,validate:or,logger:Er,eligible:ir,children:vr,exports:typeof Ze=="function"?Ze:function(L){for(var Le=L.getExports,q={},ve=function(We,Ce){var pe=Ce[We],Ne=Ze[pe].type,Be=Le().then(function(Te){return Te[pe]});q[pe]=Ne===Q.FUNCTION?function(){for(var Te=arguments.length,Ve=new Array(Te),je=0;je<Te;je++)Ve[je]=arguments[je];return Be.then(function(ar){return ar.apply(void 0,Ve)})}:Be},we=0,ce=Object.keys(Ze);we<ce.length;we++)ve(we,ce);return q}}}(e),n=r.name,t=r.tag,o=r.defaultContext,i=r.eligible,a=r.children,s=$r(window),c=[],d=function(){if(function(l){try{return Xn(window.name).name===l}catch{}return!1}(n)){var u=uo().payload;if(u.tag===t&&Je(u.childDomainMatch,Z()))return!0}return!1},f=cr(function(){if(d()){if(window.xprops)throw delete s.components[t],new Error("Can not register "+n+" as child - child already registered");var u=function(l){var h=l.tag,m=l.propsDef,p=l.autoResize,b=l.allowedParentDomains,P=[],I=uo(),M=I.parent,g=I.payload,S=M.win,O=M.domain,R,x=new w,$=g.version,V=g.uid,T=g.exports,C=g.context,he=g.props;if($!=="9_0_86")throw new Error("Parent window has zoid version "+$+", child window has version 9_0_86");var Y=T.show,Qe=T.hide,or=T.close,_e=T.onError,ir=T.checkClose,fr=T.export,Er=T.resize,lr=T.init,Ze=function(){return S},br=function(){return O},hr=function(q){return P.push(q),{cancel:function(){P.splice(P.indexOf(q),1)}}},vr=function(q){return Er.fireAndForget({width:q.width,height:q.height})},Pr=function(q){return x.resolve(q),fr(q)},xr=function(q){var ve=(q===void 0?{}:q).anyParent,we=[],ce=R.parent;if(ve===void 0&&(ve=!ce),!ve&&!ce)throw new Error("No parent found for "+h+" child");for(var We=0,Ce=Sr(window);We<Ce.length;We++){var pe=Ce[We];if(ne(pe)){var Ne=He(pe).xprops;if(Ne&&Ze()===Ne.getParent()){var Be=Ne.parent;if(ve||!ce||Be&&Be.uid===ce.uid){var Te=to(pe,function(Ve){return Ve.exports});we.push({props:Ne,exports:Te})}}}}return we},L=function(q,ve,we){we===void 0&&(we=!1);var ce=function(Ce,pe,Ne,Be,Te,Ve){Ve===void 0&&(Ve=!1);for(var je={},ar=0,Nr=Object.keys(Ne);ar<Nr.length;ar++){var Wr=Nr[ar],ke=pe[Wr];if(!ke||!ke.sameDomain||Be===Z(window)&&ne(Ce)){var Gr=co(pe,0,Wr,Ne[Wr],Te);je[Wr]=Gr,ke&&ke.alias&&!je[ke.alias]&&(je[ke.alias]=Gr)}}if(!Ve)for(var Rr=0,Zr=Object.keys(pe);Rr<Zr.length;Rr++){var Ir=Zr[Rr];Ne.hasOwnProperty(Ir)||(je[Ir]=co(pe,0,Ir,void 0,Te))}return je}(S,m,q,ve,{tag:h,show:Y,hide:Qe,close:or,focus:ko,onError:_e,resize:vr,getSiblings:xr,onProps:hr,getParent:Ze,getParentDomain:br,uid:V,export:Pr},we);R?fn(R,ce):R=ce;for(var We=0;We<P.length;We++)(0,P[We])(R)},Le=function(q){return w.try(function(){return L(q,O,!0)})};return{init:function(){return w.try(function(){return ne(S)&&function(q){var ve=q.componentName,we=q.parentComponentWindow,ce=io({data:Xn(window.name).serializedInitialPayload,sender:{win:we},basic:!0}),We=ce.sender;if(ce.reference.type==="uid"||ce.metaData.windowRef.type==="global"){var Ce=oo({data:ce.data,metaData:{windowRef:_o(we)},sender:{domain:We.domain},receiver:{win:window,domain:Z()},basic:!0});window.name=ao({name:ve,serializedPayload:Ce.serializedData})}}({componentName:l.name,parentComponentWindow:S}),$r(window).exports=l.exports({getExports:function(){return x}}),function(q,ve){if(!Je(q,ve))throw new Error("Can not be rendered by domain: "+ve)}(b,O),Lt(S),function(){window.addEventListener("beforeunload",function(){ir.fireAndForget()}),window.addEventListener("unload",function(){ir.fireAndForget()}),st(S,function(){so()})}(),lr({updateProps:Le,close:so})}).then(function(){return(q=p.width,ve=q!==void 0&&q,we=p.height,ce=we!==void 0&&we,We=p.element,xt(We===void 0?"body":We).cat
73ch(le).then(function(Ce){return{width:ve,height:ce,element:Ce}})).then(function(Ce){var pe=Ce.width,Ne=Ce.height,Be=Ce.element;Be&&(pe||Ne)&&C!==Ie.POPUP&&Dt(Be,function(Te){vr({width:pe?Te.width:void 0,height:Ne?Te.height:void 0})},{width:pe,height:Ne})});var q,ve,we,ce,We}).catch(function(q){_e(q)})},getProps:function(){return R||(L(he,O),R)}}}(r);return u.init(),u}});if(f(),function(){var u=tr("zoid_allow_delegate_"+n,function(){return!0}),l=tr("zoid_delegate_"+n,function(h){var m=h.data;return{parent:lo({uid:m.uid,options:r,overrides:m.overrides,parentWin:h.source})}});_n.register(u.cancel),_n.register(l.cancel)}(),s.components=s.components||{},s.components[t])throw new Error("Can not register multiple components with the same tag: "+t);return s.components[t]=!0,{init:function u(l){var h,m="zoid-"+t+"-"+De(),p=l||{},b=i({props:p}),P=b.eligible,I=b.reason,M=p.onDestroy;p.onDestroy=function(){if(h&&P&&c.splice(c.indexOf(h),1),M)return M.apply(void 0,arguments)};var g=lo({uid:m,options:r});g.init(),P?g.setProps(p):p.onDestroy&&p.onDestroy(),Qn.register(function(R){return g.destroy(R||new Error("zoid destroyed all components"))});var S=function(R){var x=(R===void 0?{}:R).decorate;return u((x===void 0?Fo:x)(p))},O=function(R,x,$){return w.try(function(){if(!P){var V=new Error(I||n+" component is not eligible");return g.destroy(V).then(function(){throw V})}
73if(!mr(R))throw new Error("Must pass window to renderTo");return function(T,C){return w.try(function(){if(T.window)return Jr(T.window).getType();if(C){if(C!==Ie.IFRAME&&C!==Ie.POPUP)throw new Error("Unrecognized context: "+C);return C}return o})}(p,$)}).then(function(V){if(x=function(T,C){if(C){if(typeof C!="string"&&!Pt(C))throw new TypeError("Expected string or element selector to be passed");return C}if(T===Ie.POPUP)return"body";throw new Error("Expected element to be passed to render iframe")}(V,x),R!==window&&typeof x!="string")throw new Error("Must pass string element when rendering to another window");return g.render({target:R,container:x,context:V,rerender:function(){var T=S();return fn(h,T),T.renderTo(R,x,$)}})}).catch(function(V){return g.destroy(V).then(function(){throw V})})};return h=fe({},g.getExports(),g.getHelpers(),function(){for(var R=a(),x={},$=function(C,he){var Y=he[C],Qe=R[Y];x[Y]=function(or){var _e=g.getProps(),ir=fe({},or,{parent:{uid:m,props:_e,export:g.export}});return Qe(ir)}},V=0,T=Object.keys(R);V<T.length;V++)$(V,T);return x}(),{isEligible:function(){return P},clone:S,render:function(R,x){return O(window,R,x)},renderTo:function(R,x,$){return O(R,x,$)}}),P&&c.push(h),h},instances:c,driver:function(u,l){throw new Error("Driver support not enabled")},isChild:d,canRenderTo:function(u){return Ge(u,"zoid_allow_delegate_"+n).then(function(l){return l.data}).catch(function(){return!1})},registerChild:f}}var ti=function(e){(function(){Ke().initialized||(Ke().initialized=!0,i=(o={on:tr,send:Ge}).on,a=o.send,(s=Ke()).receiveMessage=s.receiveMessage||function(c){return Zn(c,{on:i,send:a})},function(c){var d=c.on,f=c.send;J().getOrSet("postMessageListener",function(){return Ot(window,"message",function(u){(function(l,h){var m=h.on,p=h.send;w.try(function(){var b=l.source||l.sourceElement,P=l.origin||l.originalEvent&&l.originalEvent.origin,I=l.data;if(P==="null"&&(P="file://"),b){if(!P)throw new Error("Post message did not have origin domain");Zn({source:b,origin:P,data:I},{on:m,send:p})}})})(u,{on:d,send:f})})})}({on:tr,send:Ge}),Gt({on:tr,send:Ge,receiveMessage:Zn}),function(c){var d=c.on,f=c.send;J("builtinListeners").getOrSet("helloListener",function(){var u=d("postrobot_hello",{domain:"*"},function(h){return Ft(h.source,{domain:h.origin}),{instanceID:At()}}),l=Ur();return l&&Ln(l,{send:f}).catch(function(h){}),u})}({on:tr,send:Ge}));var o,i,a,s})();var r=ni(e),n=function(o){return r.init(o)};n.driver=function(o,i){return r.driver(o,i)},n.isChild=function(){return r.isChild()},n.canRenderTo=function(o){return r.canRenderTo(o)},n.instances=r.instances;var t=r.registerChild();return t&&(window.xprops=n.xprops=t.getProps()),n};function ho(e){sr&&sr.destroyBridges();var r=Qn.all(e);return Qn=ln(),r}var vo=ho;function oi(e){return vo(),delete window.__zoid_9_0_86__,function(){(function(){for(var n=J("responseListeners"),t=0,o=n.keys();t<o.length;t++){var i=o[t],a=n.get(i);
73a&&(a.cancelled=!0),n.del(i)}})(),(r=J().get("postMessageListener"))&&r.cancel();var r;delete window.__post_robot_10_0_44__}(),_n.all(e)}}])})})(Io);var Ei=Io.exports;(function(Re){Re.exports=Ei,Re.exports.default=Re.exports})(Ro);var bi=Ro.exports;const Pi=yi(bi),xi="https://preview.widgets.ninetailed.io/v2";let nt;const Ci=({url:Re=xi})=>(nt||(nt=Pi.create({tag:"ninetailed-preview",url:Re,dimensions:{width:"432px",height:"100vh"}})),nt());export{Ci as PreviewBridge};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.