text: !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("belter",[],n):"object"==typeof exports?exports.belter=n():t.belter=n()}("undefined"!=typeof self?self:this,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return{}.hasOwnProperty.call(t,n)},e.p="",e(e.s=0)}([function(t,n,e){"use strict";function r(){return window.navigator.mockUserAgent||window.navigator.userAgent}function o(t){return void 0===t&&(t=r()),!!t.match(/Android|webOS|iPhone|iPad|iPod|bada|Symbian|Palm|CriOS|BlackBerry|IEMobile|WindowsMobile|Opera Mini/i)}function i(){var t=r();return/(iPhone|iPod|iPad|Macintosh).*AppleWebKit(?!.*Safari)/i.test(t)||/\bwv\b/.test(t)||/Android.*Version\/(\d)\.(\d)/i.test(t)}function u(){return!0===window.navigator.standalone||window.matchMedia("(display-mode: standalone)").matches}function c(t){return void 0===t&&(t=r()),-1!==t.indexOf("FBAN")||-1!==t.indexOf("FBAV")}function a(t){return void 0===t&&(t=r()),/FxiOS/i.test(t)}function f(t){return void 0===t&&(t=r()),/EdgiOS/i.test(t)}function s(t){return void 0===t&&(t=r()),t.indexOf("Opera Mini")>-1}function d(t){return void 0===t&&(t=r()),/Android/.test(t)}function l(t){return void 0===t&&(t=r()),/iPhone|iPod|iPad/.test(t)}function h(t){return void 0===t&&(t=r()),/\bGSA\b/.test(t)}function p(t){return void 0===t&&(t=r()),/QQBrowser/.test(t)}function v(t){return void 0===t&&(t=r()),!!l(t)&&(!!h(t)||/.+AppleWebKit(?!.*Safari)/.test(t))}function w(t){return void 0===t&&(t=r()),!!d(t)&&/Version\/[\d.]+/.test(t)&&!s(t)}function m(){return!!window.document.documentMode||Boolean(window.navigator&&window.navigator.userAgent&&/Edge|MSIE|rv:11/i.test(window.navigator.userAgent))}function y(){var t=window.document.querySelector('meta[http-equiv="X-UA-Compatible"]'),n=window.document.querySelector('meta[content="IE=edge"]');return!(!t||!n)}function g(){return!("undefined"==typeof process||!process.versions||!process.versions.electron)}function b(){if(window.document.documentMode)try{var t=window.status;return window.status="testIntranetMode","testIntranetMode"===window.status&&(window.status=t,!0)}catch(t){return!1}return!1}function E(){var t=r();return/Macintosh.*AppleWebKit(?!.*Safari)/i.test(t)}function S(t){return void 0===t&&(t=r()),!(v(t)||w(t)||s(t)||a(t)||f(t)||c(t)||p(t)||g()||E()||u())}function _(t){return void 0===t&&(t=r()),/Chrome|Chromium|CriOS/.test(t)}function j(t){return void 0===t&&(t=r()),/Safari/.test(t)&&!_(t)}function O(){return(O=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)({}).hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t}).apply(this,arguments)}function x(t){try{if(!t)return!1;if("undefined"!=typeof Promise&&t instanceof Promise)return!0;if("undefined"!=typeof window&&"function"==typeof window.Window&&t instanceof window.Window)return!1;if("undefined"!=typeof window&&"function"==typeof window.constructor&&t instanceof window.constructor)return!1;var n={}.toString;if(n){var e=n.call(t);if("[object Window]"===e||"[object global]"===e||"[object DOMWindow]"===e)return!1}if("function"==typeof t.then)return!0}catch(t){return!1}return!1}e.r(n),e.d(n,"getUserAgent",(function(){return r})),e.d(n,"isDevice",(function(){return o})),e.d(n,"isWebView",(function(){return i})),e.d(n,"isStandAlone",(function(){return u})),e.d(n,"isFacebookWebView",(function(){return c})),e.d(n,"isFirefoxIOS",(function(){return a})),e.d(n,"isEdgeIOS",(function(){return f})),e.d(n,"isOperaMini",(function(){return s})),e.d(n,"isAndroid",(function(){return d})),e.d(n,"isIos",(function(){return l})),e.d(n,"isGoogleSearchApp",(function(){return h})),e.d(n,"isQQBrowser",(function(){return p})),e.d(n,"isIosWebview",(function(){return v})),e.d(n,"isAndroidWebview",(function(){return w})),e.d(n,"isIE",(function(){return m})),e.d(n,"isIECompHeader",(function(){return y})),e.d(n,"isElectron",(function(){return g})),e.d(n,"isIEIntranet",(function(){return b})),e.d(n,"isMacOsCna",(function(){return E})),e.d(n,"supportsPopups",(function(){return S})),e.d(n,"isChrome",(function(){return _})),e.d(n,"isSafari",(function(){return j})),e.d(n,"isDocumentReady",(function(){return dn})),e.d(n,"urlEncode",(function(){return ln})),e.d(n,"waitForWindowReady",(function(){return hn})),e.d(n,"waitForDocumentReady",(function(){return pn})),e.d(n,"waitForDocumentBody",(function(){return vn})),e.d(n,"parseQuery",(function(){return wn})),e.d(n,"getQueryParam",(function(){return mn})),e.d(n,"urlWillRedirectPage",(function(){return yn})),e.d(n,"formatQuery",(function(){return gn})),e.d(n,"extendQuery",(function(){return bn})),e.d(n,"extendUrl",(function(){return En})),e.d(n,"redirect",(function(){return Sn})),e.d(n,"hasMetaViewPort",(function(){return _n})),e.d(n,"isElementVisible",(function(){return jn})),e.d(n,"getPerformance",(function(){return On})),e.d(n,"enablePerformance",(function(){return xn})),e.d(n,"getPageRenderTime",(function(){return Cn})),e.d(n,"htmlEncode",(function(){return Pn})),e.d(n,"isBrowser",(function(){return kn})),e.d(n,"querySelectorAll",(function(){return An})),e.d(n,"onClick",(function(){return Mn})),e.d(n,"getScript",(function(){return Tn})),e.d(n,"isLocalStorageEnabled",(function(){return Wn})),e.d(n,"getBrowserLocales",(function(){return In})),e.d(n,"appendChild",(function(){return Ln})),e.d(n,"isElement",(function(){return Nn})),e.d(n,"getElementSafe",(function(){return Rn})),e.d(n,"getElement",(function(){return zn})),e.d(n,"elementReady",(function(){return Dn})),e.d(n,"PopupOpenError",(function(){return Bn})),e.d(n,"popup",(function(){return Fn})),e.d(n,"writeToWindow",(function(){return Hn})),e.d(n,"writeElementToWindow",(function(){return qn})),e.d(n,"setStyle",(function(){return Un})),e.d(n,"awaitFrameLoad",(function(){return Vn})),e.d(n,"awaitFrameWindow",(function(){return Jn})),e.d(n,"createElement",(function(){return Qn})),e.d(n,"iframe",(function(){return $n})),e.d(n,"addEventListener",(function(){return Gn})),e.d(n,"bindEvents",(function(){return Kn})),e.d(n,"setVendorCSS",(function(){return Zn})),e.d(n,"animate",(function(){return ne})),e.d(n,"makeElementVisible",(function(){return ee})),e.d(n,"makeElementInvisible",(function(){return re})),e.d(n,"showElement",(function(){return oe})),e.d(n,"hideElement",(function(){return ie})),e.d(n,"destroyElement",(function(){return ue})),e.d(n,"showAndAnimate",(function(){return ce})),e.d(n,"animateAndHide",(function(){return ae})),e.d(n,"addClass",(function(){return fe})),e.d(n,"removeClass",(function(){return se})),e.d(n,"isElementClosed",(function(){return de})),e.d(n,"watchElementForClose",(function(){return le})),e.d(n,"fixScripts",(function(){return he})),e.d(n,"onResize",(function(){return pe})),e.d(n,"getResourceLoadTime",(function(){return ve})),e.d(n,"isShadowElement",(function(){return we})),e.d(n,"getShadowRoot",(function(){return me})),e.d(n,"getShadowHost",(function(){return ye})),e.d(n,"insertShadowSlot",(function(){return ge})),e.d(n,"preventClickFocus",(function(){return be})),e.d(n,"experiment",(function(){return je})),e.d(n,"getGlobalNameSpace",(function(){return Oe})),e.d(n,"getStorage",(function(){return Ee})),e.d(n,"getFunctionName",(function(){return Q})),e.d(n,"setFunctionName",(function(){return $})),e.d(n,"base64encode",(function(){return G})),e.d(n,"base64decode",(function(){return K})),e.d(n,"uniqueID",(function(){return X})),e.d(n,"getGlobal",(function(){return Z})),e.d(n,"getObjectID",(function(){return Y})),e.d(n,"memoize",(function(){return et})),e.d(n,"promiseIdentity",(function(){return rt})),e.d(n,"memoizePromise",(function(){return ot})),e.d(n,"promisify",(function(){return it})),e.d(n,"inlineMemoize",(function(){return ut})),e.d(n,"noop",(function(){return ct})),e.d(n,"once",(function(){return at})),e.d(n,"hashStr",(function(){return ft})),e.d(n,"strHashStr",(function(){return st})),e.d(n,"match",(function(){return dt})),e.d(n,"awaitKey",(function(){return lt})),e.d(n,"stringifyError",(function(){return ht})),e.d(n,"stringifyErrorMessage",(function(){return pt})),e.d(n,"stringify",(function(){return vt})),e.d(n,"domainMatches",(function(){return wt})),e.d(n,"patchMethod",(function(){return mt})),e.d(n,"extend",(function(){return yt})),e.d(n,"values",(function(){return gt})),e.d(n,"perc",(function(){return bt})),e.d(n,"min",(function(){return Et})),e.d(n,"max",(function(){return St})),e.d(n,"regexMap",(function(){return _t})),e.d(n,"svgToBase64",(function(){return jt})),e.d(n,"objFilter",(function(){return Ot})),e.d(n,"identity",(function(){return xt})),e.d(n,"regexTokenize",(function(){return Ct})),e.d(n,"promiseDebounce",(function(){return Pt})),e.d(n,"safeInterval",(function(){return kt})),e.d(n,"isInteger",(function(){return At})),e.d(n,"isFloat",(function(){return Mt})),e.d(n,"serializePrimitive",(function(){return Tt})),e.d(n,"deserializePrimitive",(function(){return Wt})),e.d(n,"dotify",(function(){return It})),e.d(n,"undotify",(function(){return Lt})),e.d(n,"eventEmitter",(function(){return Nt})),e.d(n,"camelToDasherize",(function(){return Rt})),e.d(n,"dasherizeToCamel",(function(){return zt})),e.d(n,"capitalizeFirstLetter",(function(){return Dt})),e.d(n,"get",(function(){return Bt})),e.d(n,"safeTimeout",(function(){return Ft})),e.d(n,"defineLazyProp",(function(){return Ht})),e.d(n,"arrayFrom",(function(){return qt})),e.d(n,"isObject",(function(){return Ut})),e.d(n,"isObjectObject",(function(){return Vt})),e.d(n,"isPlainObject",(function(){return Jt})),e.d(n,"replaceObject",(function(){return Qt})),e.d(n,"copyProp",(function(){return $t})),e.d(n,"regex",(function(){return Gt})),e.d(n,"regexAll",(function(){return Kt})),e.d(n,"isDefined",(function(){return Xt})),e.d(n,"cycle",(function(){return Zt})),e.d(n,"debounce",(function(){return Yt})),e.d(n,"isRegex",(function(){return tn})),e.d(n,"weakMapMemoize",(function(){return en})),e.d(n,"weakMapMemoizePromise",(function(){return rn})),e.d(n,"getOrSet",(function(){return on})),e.d(n,"cleanup",(function(){return un})),e.d(n,"tryCatch",(function(){return cn})),e.d(n,"removeFromArray",(function(){return an})),e.d(n,"assertExists",(function(){return fn})),e.d(n,"unique",(function(){return sn})),e.d(n,"request",(function(){return Ce})),e.d(n,"addHeaderBuilder",(function(){return Pe})),e.d(n,"TYPES",(function(){return ke})),e.d(n,"memoized",(function(){return Ae})),e.d(n,"promise",(function(){return Me})),e.d(n,"isPerc",(function(){return Te})),e.d(n,"isPx",(function(){return We})),e.d(n,"toNum",(function(){return Ie})),e.d(n,"toPx",(function(){return Le})),e.d(n,"toCSS",(function(){return Ne})),e.d(n,"percOf",(function(){return Re})),e.d(n,"normalizeDimension",(function(){return ze})),e.d(n,"wrapPromise",(function(){return De}));var C,P=[],k=[],A=0;function M(){if(!A&&C){var t=C;C=null,t.resolve()}}function T(){A+=1}function W(){A-=1,M()}var I=function(){function t(t){var n=this;if(this.resolved=void 0,this.rejected=void 0,this.errorHandled=void 0,this.value=void 0,this.error=void 0,this.handlers=void 0,this.dispatching=void 0,this.stack=void 0,this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],t){var e,r,o=!1,i=!1,u=!1;T();try{t((function(t){u?n.resolve(t):(o=!0,e=t)}),(function(t){u?n.reject(t):(i=!0,r=t)}))}catch(t){return W(),void this.reject(t)}W(),u=!0,o?this.resolve(e):i&&this.reject(r)}}var n=t.prototype;return n.resolve=function(t){if(this.resolved||this.rejected)return this;if(x(t))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=t,this.dispatch(),this},n.reject=function(t){var n=this;if(this.resolved||this.rejected)return this;if(x(t))throw new Error("Can not reject promise with another promise");if(!t){var e=t&&"function"==typeof t.toString?t.toString():{}.toString.call(t);t=new Error("Expected reject to be called with Error, got "+e)}return this.rejected=!0,this.error=t,this.errorHandled||setTimeout((function(){n.errorHandled||function(t,n){if(-1===P.indexOf(t)){P.push(t),setTimeout((function(){throw t}),1);for(var e=0;e<k.length;e++)k[e](t,n)}}(t,n)}),1),this.dispatch(),this},n.asyncReject=function(t){return this.errorHandled=!0,this.reject(t),this},n.dispatch=function(){var n=this.resolved,e=this.rejected,r=this.handlers;if(!this.dispatching&&(n||e)){this.dispatching=!0,T();for(var o=function(t,n){return t.then((function(t){n.resolve(t)}),(function(t){n.reject(t)}))},i=0;i<r.length;i++){var u=r[i],c=u.onSuccess,a=u.onError,f=u.promise,s=void 0;if(n)try{s=c?c(this.value):this.value}catch(t){f.reject(t);continue}else if(e){if(!a){f.reject(this.error);continue}try{s=a(this.error)}catch(t){f.reject(t);continue}}s instanceof t&&(s.resolved||s.rejected)?(s.resolved?f.resolve(s.value):f.reject(s.error),s.errorHandled=!0):x(s)?s instanceof t&&(s.resolved||s.rejected)?s.resolved?f.resolve(s.value):f.reject(s.error):o(s,f):f.resolve(s)}r.length=0,this.dispatching=!1,W()}},n.then=function(n,e){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.then expected a function for success handler");if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.then expected a function for error handler");var r=new t;return this.handlers.push({promise:r,onSuccess:n,onError:e}),this.errorHandled=!0,this.dispatch(),r},n.catch=function(t){return this.then(void 0,t)},n.finally=function(n){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.finally expected a function");return this.then((function(e){return t.try(n).then((function(){return e}))}),(function(e){return t.try(n).then((function(){throw e}))}))},n.timeout=function(t,n){var e=this;if(this.resolved||this.rejected)return this;var r=setTimeout((function(){e.resolved||e.rejected||e.reject(n||new Error("Promise timed out after "+t+"ms"))}),t);return this.then((function(t){return clearTimeout(r),t}))},n.toPromise=function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)},t.resolve=function(n){return n instanceof t?n:x(n)?new t((function(t,e){return n.then(t,e)})):(new t).resolve(n)},t.reject=function(n){return(new t).reject(n)},t.asyncReject=function(n){return(new t).asyncReject(n)},t.all=function(n){var e=new t,r=n.length,o=[];if(!r)return e.resolve(o),e;for(var i=function(t,n,i){return n.then((function(n){o[t]=n,0==(r-=1)&&e.resolve(o)}),(function(t){i.reject(t)}))},u=0;u<n.length;u++){var c=n[u];if(c instanceof t){if(c.resolved){o[u]=c.value,r-=1;continue}}else if(!x(c)){o[u]=c,r-=1;continue}i(u,t.resolve(c),e)}return 0===r&&e.resolve(o),e},t.hash=function(n){var e={};return t.all(Object.keys(n).map((function(r){return t.resolve(n[r]).then((function(t){e[r]=t}))}))).then((function(){return e}))},t.map=function(n,e){return t.all(n.map(e))},t.onPossiblyUnhandledException=function(t){return function(t){return k.push(t),{cancel:function(){k.splice(k.indexOf(t),1)}}}(t)},t.try=function(n,e,r){if(n&&"function"!=typeof n&&!n.call)throw new Error("Promise.try expected a function");var o;T();try{o=n.apply(e,r||[])}catch(n){return W(),t.reject(n)}return W(),t.resolve(o)},t.delay=function(n){return new t((function(t){setTimeout(t,n)}))},t.isPromise=function(n){return!!(n&&n instanceof t)||x(n)},t.flush=function(){return n=C=C||new t,M(),n;var n},t}(),L="Call was rejected by callee.\r\n";function N(t){return void 0===t&&(t=window),"about:"===t.location.protocol}function R(t){try{return!0}catch(t){}return!1}function z(t){void 0===t&&(t=window);var n=t.location;if(!n)throw new Error("Can not read window location");var e=n.protocol;if(!e)throw new Error("Can not read window protocol");if("file:"===e)return"file://";if("about:"===e){var r=function(t){if(void 0===t&&(t=window),t)try{if(t.parent&&t.parent!==t)return t.parent}catch(t){}}(t);return r&&R()?z(r):"about://"}var o=n.host;if(!o)throw new Error("Can not read window host");return e+"//"+o}function D(t){void 0===t&&(t=window);var n=z(t);return n&&t.mockDomain&&0===t.mockDomain.indexOf("mock:")?t.mockDomain:n}var B=[],F=[];function H(t,n){void 0===n&&(n=!0);try{if(t===window)return!1}catch(t){return!0}try{if(!t)return!0}catch(t){return!0}try{if(t.closed)return!0}catch(t){return!t||t.message!==L}if(n&&function(t){if(!function(t){try{if(t===window)return!0}catch(t){}try{var n=Object.getOwnPropertyDescriptor(t,"location");if(n&&!1===n.enumerable)return!1}catch(t){}try{if(N(t)&&R())return!0}catch(t){}try{if(z(t)===z(window))return!0}catch(t){}return!1}(t))return!1;try{if(t===window)return!0;if(N(t)&&R())return!0;if(D(window)===D(t))return!0}catch(t){}return!1}(t))try{if(t.mockclosed)return!0}catch(t){}try{if(!t.parent||!t.top)return!0}catch(t){}var e=function(t,n){for(var e=0;e<t.length;e++)try{if(t[e]===n)return e}catch(t){}return-1}(B,t);if(-1!==e){var r=F[e];if(r&&function(t){if(!t.contentWindow)return!0;if(!t.parentNode)return!0;var n=t.ownerDocument;if(n&&n.documentElement&&!n.documentElement.contains(t)){for(var e=t;e.parentNode&&e.parentNode!==e;)e=e.parentNode;if(!e.host||!n.documentElement.contains(e.host))return!0}return!1}(r))return!0}return!1}function q(t){try{if(t===window)return!0}catch(t){if(t&&t.message===L)return!0}try{if("[object Window]"==={}.toString.call(t))return!0}catch(t){if(t&&t.message===L)return!0}try{if(window.Window&&t instanceof window.Window)return!0}catch(t){if(t&&t.message===L)return!0}try{if(t&&t.self===t)return!0}catch(t){if(t&&t.message===L)return!0}try{if(t&&t.parent===t)return!0}catch(t){if(t&&t.message===L)return!0}try{if(t&&t.top===t)return!0}catch(t){if(t&&t.message===L)return!0}try{if(t&&"__unlikely_value__"===t.__cross_domain_utils_window_check__)return!1}catch(t){return!0}try{if("postMessage"in t&&"self"in t&&"location"in t)return!0}catch(t){}return!1}function U(t,n){for(var e=0;e<t.length;e++)try{if(t[e]===n)return e}catch(t){}return-1}var V,J=function(){function t(){if(this.name=void 0,this.weakmap=void 0,this.keys=void 0,this.values=void 0,this.name="__weakmap_"+(1e9*Math.random()>>>0)+"__",function(){if("undefined"==typeof WeakMap)return!1;if(void 0===Object.freeze)return!1;try{var t=new WeakMap,n={};return Object.freeze(n),t.set(n,"__testvalue__"),"__testvalue__"===t.get(n)}catch(t){return!1}}())try{this.weakmap=new WeakMap}catch(t){}this.keys=[],this.values=[]}var n=t.prototype;return n._cleanupClosedWindows=function(){for(var t=this.weakmap,n=this.keys,e=0;e<n.length;e++){var r=n[e];if(q(r)&&H(r)){if(t)try{t.delete(r)}catch(t){}n.splice(e,1),this.values.splice(e,1),e-=1}}},n.isSafeToReadWrite=function(t){return!q(t)},n.set=function(t,n){if(!t)throw new Error("WeakMap expected key");var e=this.weakmap;if(e)try{e.set(t,n)}catch(t){delete this.weakmap}if(this.isSafeToReadWrite(t))try{var r=this.name,o=t[r];return void(o&&o[0]===t?o[1]=n:Object.defineProperty(t,r,{value:[t,n],writable:!0}))}catch(t){}this._cleanupClosedWindows();var i=this.keys,u=this.values,c=U(i,t);-1===c?(i.push(t),u.push(n)):u[c]=n},n.get=function(t){if(!t)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(t))return n.get(t)}catch(t){delete this.weakmap}if(this.isSafeToReadWrite(t))try{var e=t[this.name];return e&&e[0]===t?e[1]:void 0}catch(t){}this._cleanupClosedWindows();var r=U(this.keys,t);if(-1!==r)return this.values[r]},n.delete=function(t){if(!t)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{n.delete(t)}catch(t){delete this.weakmap}if(this.isSafeToReadWrite(t))try{var e=t[this.name];e&&e[0]===t&&(e[0]=e[1]=void 0)}catch(t){}this._cleanupClosedWindows();var r=this.keys,o=U(r,t);-1!==o&&(r.splice(o,1),this.values.splice(o,1))},n.has=function(t){if(!t)throw new Error("WeakMap expected key");var n=this.weakmap;if(n)try{if(n.has(t))return!0}catch(t){delete this.weakmap}if(this.isSafeToReadWrite(t))try{var e=t[this.name];return!(!e||e[0]!==t)}catch(t){}return this._cleanupClosedWindows(),-1!==U(this.keys,t)},n.getOrSet=function(t,n){if(this.has(t))return this.get(t);var e=n();return this.set(t,e),e},t}();function Q(t){return t.name||t.__name__||t.displayName||"anonymous"}function $(t,n){try{delete t.name,t.name=n}catch(t){}return t.__name__=t.displayName=n,t}function G(t){if("function"==typeof btoa)return btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(function(t,n){return String.fromCharCode(parseInt(n,16))})));if("undefined"!=typeof Buffer)return Buffer.from(t,"utf8").toString("base64");throw new Error("Can not find window.btoa or Buffer")}function K(t){if("function"==typeof atob)return decodeURIComponent([].map.call(atob(t),(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)})).join(""));if("undefined"!=typeof Buffer)return Buffer.from(t,"base64").toString("utf8");throw new Error("Can not find window.atob or Buffer")}function X(){var t="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,(function(){return t.charAt(Math.floor(Math.random()*t.length))}))+"_"+G((new Date).toISOString().slice(11,19).replace("T",".")).replace(/[^a-zA-Z0-9]/g,"").toLowerCase()}function Z(){if("undefined"!=typeof window)return window;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("No global found")}function Y(t){if(V=V||new J,null==t||"object"!=typeof t&&"function"!=typeof t)throw new Error("Invalid object");var n=V.get(t);return n||(n=typeof t+":"+X(),V.set(t,n)),n}function tt(t){try{return JSON.stringify([].slice.call(t),(function(t,n){return"function"==typeof n?"memoize["+Y(n)+"]":n}))}catch(t){throw new Error("Arguments not serializable -- can not be used to memoize")}}var nt=[];function et(t,n){var e=this;void 0===n&&(n={});var r=new J,o=function(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];var u=r.getOrSet(n.thisNamespace?this:t,(function(){return{}})),c=tt(o),a=n.time;if(u[c]&&a&&Date.now()-u[c].time<a&&delete u[c],u[c])return u[c].value;var f=Date.now(),s=t.apply(this,arguments);return u[c]={time:f,value:s},u[c].value};return o.reset=function(){r.delete(n.thisNamespace?e:t)},nt.push(o),$(o,(n.name||Q(t))+"::memoized")}function rt(t){return I.resolve(t)}function ot(t){var n={};function e(){for(var e=arguments,r=this,o=arguments.length,i=new Array(o),u=0;u<o;u++)i[u]=arguments[u];var c=tt(i);return n.hasOwnProperty(c)||(n[c]=I.try((function(){return t.apply(r,e)})).finally((function(){delete n[c]}))),n[c]}return e.reset=function(){n={}},$(e,Q(t)+"::promiseMemoized")}function it(t,n){function e(){return I.try(t,this,arguments)}return void 0===n&&(n={}),n.name&&(e.displayName=n.name+":promisified"),$(e,Q(t)+"::promisified")}function ut(t,n,e){void 0===e&&(e=[]);var r=t.__inline_memoize_cache__=t.__inline_memoize_cache__||{},o=tt(e);return r.hasOwnProperty(o)?r[o]:r[o]=n.apply(void 0,e)}function ct(){}function at(t){var n=!1;return $((function(){if(!n)return n=!0,t.apply(this,arguments)}),Q(t)+"::once")}function ft(t){for(var n=0,e=0;e<t.length;e++)n+=t[e].charCodeAt(0)*Math.pow(e%10+1,5);return Math.floor(Math.pow(Math.sqrt(n),5))}function st(t){for(var n="",e=0;e<t.length;e++){var r=t[e].charCodeAt(0)*e;t[e+1]&&(r+=t[e+1].charCodeAt(0)*(e-1)),n+=String.fromCharCode(97+Math.abs(r)%26)}return n}function dt(t,n){var e=t.match(n);if(e)return e[1]}function lt(t,n){return new I((function(e){var r=t[n];if(r)return e(r);delete t[n],Object.defineProperty(t,n,{configurable:!0,set:function(t){(r=t)&&e(r)},get:function(){return r}})}))}function ht(t,n){if(void 0===n&&(n=1),n>=3)return"stringifyError stack overflow";try{if(!t)return"<unknown error: "+{}.toString.call(t)+">";if("string"==typeof t)return t;if(t instanceof Error){var e=t&&t.stack,r=t&&t.message;if(e&&r)return-1!==e.indexOf(r)?e:r+"\n"+e;if(e)return e;if(r)return r}return t&&t.toString&&"function"==typeof t.toString?t.toString():{}.toString.call(t)}catch(t){return"Error while stringifying error: "+ht(t,n+1)}}function pt(t){var n="<unknown error: "+{}.toString.call(t)+">";return t?t instanceof Error?t.message||n:"string"==typeof t.message&&t.message||n:n}function vt(t){return"string"==typeof t?t:t&&t.toString&&"function"==typeof t.toString?t.toString():{}.toString.call(t)}function wt(t,n){var e=(t=t.split("://")[1]).indexOf(n);return-1!==e&&t.slice(e)===n}function mt(t,n,e){var r=t[n];t[n]=function(){var t=arguments,n=this;return e({context:this,args:[].slice.call(arguments),original:r,callOriginal:function(){return r.apply(n,t)}})}}function yt(t,n){if(!n)return t;if(Object.assign)return Object.assign(t,n);for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);return t}function gt(t){var n=[];for(var e in t)t.hasOwnProperty(e)&&n.push(t[e]);return n}function bt(t,n){return Math.round(t*n/100)}function Et(){return Math.min.apply(Math,arguments)}function St(){return Math.max.apply(Math,arguments)}function _t(t,n,e){var r=[];return t.replace(n,(function(t){r.push(e?e.apply(null,arguments):t)})),r}function jt(t){return"data:image/svg+xml;base64,"+G(t)}function Ot(t,n){void 0===n&&(n=Boolean);var e={};for(var r in t)t.hasOwnProperty(r)&&n(t[r],r)&&(e[r]=t[r]);return e}function xt(t){return t}function Ct(t,n){var e=[];return t.replace(n,(function(t){return e.push(t),""})),e}function Pt(t,n){var e,r;return void 0===n&&(n=50),$((function(){r&&clearTimeout(r);var o=e=e||new I;return r=setTimeout((function(){e=null,r=null,I.try(t).then((function(t){o.resolve(t)}),(function(t){o.reject(t)}))}),n),o}),Q(t)+"::promiseDebounced")}function kt(t,n){var e;return function r(){e=setTimeout((function(){t(),r()}),n)}(),{cancel:function(){clearTimeout(e)}}}function At(t){return Boolean(t.match(/^[0-9]+$/))}function Mt(t){return Boolean(t.match(/^[0-9]+\.[0-9]+$/))}function Tt(t){return t.toString()}function Wt(t){return"true"===t||"false"!==t&&(At(t)?parseInt(t,10):Mt(t)?parseFloat(t):t)}function It(t,n,e){for(var r in void 0===n&&(n=""),void 0===e&&(e={}),n=n?n+".":n,t)t.hasOwnProperty(r)&&null!=t[r]&&"function"!=typeof t[r]&&(t[r]&&Array.isArray(t[r])&&t[r].length&&t[r].every((function(t){return"object"!=typeof t}))?e[""+n+r+"[]"]=t[r].join(","):t[r]&&"object"==typeof t[r]?e=It(t[r],""+n+r,e):e[""+n+r]=Tt(t[r]));return e}function Lt(t){var n={};for(var e in t)if(t.hasOwnProperty(e)&&"string"==typeof t[e]){var r=t[e];e.match(/^.+\[\]$/)?(e=e.slice(0,-2),r=r.split(",").map(Wt)):r=Wt(r);for(var o=n,i=e.split("."),u=0;u<i.length;u++){var c=i[u],a=u+1===i.length,f=!a&&At(i[u+1]);if("constructor"===c||"prototype"===c||"__proto__"===c)throw new Error("Disallowed key: "+c);a?o[c]=r:o=o[c]=o[c]||(f?[]:{})}}return n}function Nt(){var t={},n={};return{on:function(t,e){var r=n[t]=n[t]||[];r.push(e);var o=!1;return{cancel:function(){o||(o=!0,r.splice(r.indexOf(e),1))}}},once:function(t,n){var e=this.on(t,(function(){e.cancel(),n()}));return e},trigger:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];var i=n[t],u=[];if(i)for(var c=function(t){var n=i[t];u.push(I.try((function(){return n.apply(void 0,r)})))},a=0;a<i.length;a++)c(a);return I.all(u).then(ct)},triggerOnce:function(n){if(t[n])return I.resolve();t[n]=!0;for(var e=arguments.length,r=new Array(e>1?e-1:0),o=1;o<e;o++)r[o-1]=arguments[o];return this.trigger.apply(this,[n].concat(r))},reset:function(){n={}}}}function Rt(t){return t.replace(/([A-Z])/g,(function(t){return"-"+t.toLowerCase()}))}function zt(t){return t.replace(/-([a-z])/g,(function(t){return t[1].toUpperCase()}))}function Dt(t){return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()}function Bt(t,n,e){if(!n)return e;for(var r=n.split("."),o=0;o<r.length;o++){if("object"!=typeof t||null===t)return e;t=t[r[o]]}return void 0===t?e:t}function Ft(t,n){var e=kt((function(){(n-=100)<=0&&(e.cancel(),t())}),100)}function Ht(t,n,e){if(Array.isArray(t)){if("number"!=typeof n)throw new TypeError("Array key must be number")}else if("object"==typeof t&&null!==t&&"string"!=typeof n)throw new TypeError("Object key must be string");Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get:function(){delete t[n];var r=e();return t[n]=r,r},set:function(e){delete t[n],t[n]=e}})}function qt(t){return[].slice.call(t)}function Ut(t){return"object"==typeof t&&null!==t}function Vt(t){return Ut(t)&&"[object Object]"==={}.toString.call(t)}function Jt(t){if(!Vt(t))return!1;var n=t.constructor;if("function"!=typeof n)return!1;var e=n.prototype;return!!Vt(e)&&!!e.hasOwnProperty("isPrototypeOf")}function Qt(t,n,e){if(void 0===e&&(e=""),Array.isArray(t)){for(var r=t.length,o=[],i=function(r){Ht(o,r,(function(){var o=e?e+"."+r:""+r,i=n(t[r],r,o);return(Jt(i)||Array.isArray(i))&&(i=Qt(i,n,o)),i}))},u=0;u<r;u++)i(u);return o}if(Jt(t)){var c={},a=function(r){if(!t.hasOwnProperty(r))return"continue";Ht(c,r,(function(){var o=e?e+"."+r:""+r,i=n(t[r],r,o);return(Jt(i)||Array.isArray(i))&&(i=Qt(i,n,o)),i}))};for(var f in t)a(f);return c}throw new Error("Pass an object or array")}function $t(t,n,e,r){if(t.hasOwnProperty(e)){var o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,o)}else n[e]=r}function Gt(t,n,e){void 0===e&&(e=0),"string"==typeof t&&(t=new RegExp(t));var r=n.slice(e).match(t);if(r){var o=r.index,i=r[0];return{text:i,groups:r.slice(1),start:e+o,end:e+o+i.length,length:i.length,replace:function(t){return i?""+i.slice(0,e+o)+t+i.slice(o+i.length):""}}}}function Kt(t,n){for(var e=[],r=0;;){var o=Gt(t,n,r);if(!o)break;e.push(o),r=dt.end}return e}function Xt(t){return null!=t}function Zt(t){return I.try(t).then((function(){return Zt(t)}))}function Yt(t,n){var e;return void 0===n&&(n=100),$((function(){var r=arguments,o=this;clearTimeout(e),e=setTimeout((function(){return t.apply(o,r)}),n)}),Q(t)+"::debounced")}function tn(t){return"[object RegExp]"==={}.toString.call(t)}et.clear=function(){for(var t=0;t<nt.length;t++)nt[t].reset()};var nn,en=function(t){var n=new J;return function(e){var r=this;return n.getOrSet(e,(function(){return t.call(r,e)}))}},rn=function(t){var n=new J;return function(e){var r=this;return n.getOrSet(e,(function(){return t.call(r,e).finally((function(){n.delete(e)}))}))}};function on(t,n,e){if(t.hasOwnProperty(n))return t[n];var r=e();return t[n]=r,r}function un(t){var n=[],e=!1;return{set:function(n,r){return e||(t[n]=r,this.register((function(){delete t[n]}))),r},register:function(t){e?t():n.push(at(t))},all:function(){var t=[];for(e=!0;n.length;){var r=n.shift();t.push(r())}return I.all(t).then(ct)}}}function cn(t){var n,e;try{n=t()}catch(t){e=t}return{result:n,error:e}}function an(t,n){var e=t.indexOf(n);-1!==e&&t.splice(e,1)}function fn(t,n){if(null==n)throw new Error("Expected "+t+" to be present");return n}function sn(t){for(var n={},e=0;e<t.length;e++)n[t[e]]=!0;return Object.keys(n)}function dn(){return Boolean(document.body)&&"complete"===document.readyState}function ln(t){return t.replace(/\?/g,"%3F").replace(/&/g,"%26").replace(/#/g,"%23").replace(/\+/g,"%2B")}function hn(){return ut(hn,(function(){return new I((function(t){dn()&&t(),window.addEventListener("load",(function(){return t()}))}))}))}function pn(){return ut(pn,(function(){return new I((function(t){if(dn())return t();var n=setInterval((function(){if(dn())return clearInterval(n),t()}),10)}))}))}function vn(){return pn().then((function(){if(document.body)return document.body;throw new Error("Document ready but document.body not present")}))}function wn(t){return ut(wn,(function(){var n={};if(!t)return n;if(-1===t.indexOf("="))return n;for(var e=0,r=t.split("&");e<r.length;e++){var o=r[e];(o=o.split("="))[0]&&o[1]&&(n[decodeURIComponent(o[0])]=decodeURIComponent(o[1]))}return n}),[t])}function mn(t){return wn(window.location.search.slice(1))[t]}function yn(t){return-1===t.indexOf("#")||0!==t.indexOf("#")&&t.split("#")[0]!==window.location.href.split("#")[0]}function gn(t){return void 0===t&&(t={}),Object.keys(t).filter((function(n){return"string"==typeof t[n]})).map((function(n){return ln(n)+"="+ln(t[n])})).join("&")}function bn(t,n){return void 0===n&&(n={}),n&&Object.keys(n).length?gn(O({},wn(t),n)):t}function En(t,n){var e,r,o=n.query||{},i=n.hash||{},u=t.split("#");r=u[1];var c=(e=u[0]).split("?");e=c[0];var a=bn(c[1],o),f=bn(r,i);return a&&(e=e+"?"+a),f&&(e=e+"#"+f),e}function Sn(t,n){return void 0===n&&(n=window),new I((function(e){n.location=t,yn(t)||e()}))}function _n(){var t=document.querySelector("meta[name=viewport]");return!(o()&&window.screen.width<660&&!t)}function jn(t){return Boolean(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}function On(){return ut(On,(function(){var t=window.performance;if(t&&t.now&&t.timing&&t.timing.connectEnd&&t.timing.navigationStart&&Math.abs(t.now()-Date.now())>1e3&&t.now()-(t.timing.connectEnd-t.timing.navigationStart)>0)return t}))}function xn(){return Boolean(On())}function Cn(){return pn().then((function(){var t=On();if(t){var n=t.timing;return n.connectEnd&&n.domInteractive?n.domInteractive-n.connectEnd:void 0}}))}function Pn(t){return void 0===t&&(t=""),t.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/\//g,"&#x2F;")}function kn(){return"undefined"!=typeof window}function An(t,n){return void 0===n&&(n=window.document),[].slice.call(n.querySelectorAll(t))}function Mn(t,n){t.addEventListener("touchstart",ct),t.addEventListener("click",n),t.addEventListener("keypress",(function(t){if(13===t.keyCode||32===t.keyCode)return n(t)}))}function Tn(t){var n=t.host,e=void 0===n?window.location.host:n,r=t.path;return ut(Tn,(function(){for(var t=""+e+r,n=[].slice.call(document.getElementsByTagName("script")),o=0;o<n.length;o++){var i=n[o];if(i.src&&i.src.replace(/^https?:\/\//,"").split("?")[0]===t)return i}}),[r])}function Wn(){return ut(Wn,(function(){try{if("undefined"==typeof window)return!1;if(window.localStorage){var t=Math.random().toString();window.localStorage.setItem("__test__localStorage__",t);var n=window.localStorage.getItem("__test__localStorage__");if(window.localStorage.removeItem("__test__localStorage__"),t===n)return!0}}catch(t){}return!1}))}function In(){var t=window.navigator,n=t.languages?[].concat(t.languages):[];return t.language&&n.push(t.language),t.userLanguage&&n.push(t.userLanguage),n.map((function(t){if(t&&t.match(/^[a-z]{2}[-_][A-Z]{2}$/)){var n=t.split(/[-_]/);return{country:n[1],lang:n[0]}}return t&&t.match(/^[a-z]{2}$/)?{lang:t}:null})).filter(Boolean)}function Ln(t,n){t.appendChild(n)}function Nn(t){return t instanceof window.Element||null!==t&&"object"==typeof t&&1===t.nodeType&&"object"==typeof t.style&&"object"==typeof t.ownerDocument}function Rn(t,n){return void 0===n&&(n=document),Nn(t)?t:"string"==typeof t?n.querySelector(t):void 0}function zn(t,n){void 0===n&&(n=document);var e=Rn(t,n);if(e)return e;throw new Error("Can not find element: "+vt(t))}function Dn(t){return new I((function(n,e){var r=vt(t),o=Rn(t);if(o)return n(o);if(dn())return e(new Error("Document is ready and element "+r+" does not exist"));var i=setInterval((function(){return(o=Rn(t))?(clearInterval(i),n(o)):dn()?(clearInterval(i),e(new Error("Document is ready and element "+r+" does not exist"))):void 0}),10)}))}function Bn(t){this.message=t}function Fn(t,n){var e=(n=n||{}).width,r=n.height,o=0,i=0;e&&(window.outerWidth?i=Math.round((window.outerWidth-e)/2)+window.screenX:window.screen.width&&(i=Math.round((window.screen.width-e)/2))),r&&(window.outerHeight?o=Math.round((window.outerHeight-r)/2)+window.screenY:window.screen.height&&(o=Math.round((window.screen.height-r)/2))),e&&r&&(n=O({top:o,left:i,width:e,height:r,status:1,toolbar:0,menubar:0,resizable:1,scrollbars:1},n));var u=n.name||"";delete n.name;var c,a,f=Object.keys(n).map((function(t){if(null!=n[t])return t+"="+vt(n[t])})).filter(Boolean).join(",");try{c=window.open(t,u,f,!0)}catch(a){throw new Bn("Can not open popup window - "+(a.stack||a.message))}if(H(c))throw new Bn("Can not open popup window - blocked");return window.addEventListener("unload",(function(){return c.close()})),c}function Hn(t,n){try{t.document.open(),t.document.write(n),t.document.close()}catch(e){try{t.location="javascript: document.open(); document.write("+JSON.stringify(n)+"); document.close();"}catch(t){}}}function qn(t,n){var e=n.tagName.toLowerCase();if("html"!==e)throw new Error("Expected element to be html, got "+e);for(var r=t.document.documentElement,o=0,i=qt(r.children);o<i.length;o++)r.removeChild(i[o]);for(var u=0,c=qt(n.children);u<c.length;u++)r.appendChild(c[u])}function Un(t,n,e){void 0===e&&(e=window.document),t.styleSheet?t.styleSheet.cssText=n:t.appendChild(e.createTextNode(n))}function Vn(t){if((nn=nn||new J).has(t)){var n=nn.get(t);if(n)return n}var e=new I((function(n,e){t.addEventListener("load",(function(){(function(t){if(function(){for(var t=0;t<B.length;t++){var n=!1;try{n=B[t].closed}catch(t){}n&&(F.splice(t,1),B.splice(t,1))}}(),t&&t.contentWindow)try{B.push(t.contentWindow),F.push(t)}catch(t){}})(t),n(t)})),t.addEventListener("error",(function(r){t.contentWindow?n(t):e(r)}))}));return nn.set(t,e),e}function Jn(t){return Vn(t).then((function(t){if(!t.contentWindow)throw new Error("Could not find window in iframe");return t.contentWindow}))}function Qn(t,n,e){void 0===t&&(t="div"),void 0===n&&(n={}),t=t.toLowerCase();var r=document.createElement(t);if(n.style&&yt(r.style,n.style),n.class&&(r.className=n.class.join(" ")),n.id&&r.setAttribute("id",n.id),n.attributes)for(var o=0,i=Object.keys(n.attributes);o<i.length;o++){var u=i[o];r.setAttribute(u,n.attributes[u])}if(n.styleSheet&&Un(r,n.styleSheet),e&&Ln(e,r),n.html)if("iframe"===t){if(!e||!r.contentWindow)throw new Error("Iframe html can not be written unless container provided and iframe in DOM");Hn(r.contentWindow,n.html)}else r.innerHTML=n.html;return r}function $n(t,n){void 0===t&&(t={});var e=t.style||{},r=Qn("iframe",{attributes:O({allowTransparency:"true"},t.attributes||{}),style:O({backgroundColor:"transparent",border:"none"},e),html:t.html,class:t.class}),o=window.navigator.userAgent.match(/MSIE|Edge/i);return r.hasAttribute("id")||r.setAttribute("id",X()),Vn(r),n&&zn(n).appendChild(r),(t.url||o)&&r.setAttribute("src",t.url||"about:blank"),r}function Gn(t,n,e){return t.addEventListener(n,e),{cancel:function(){t.removeEventListener(n,e)}}}function Kn(t,n,e){e=at(e);for(var r=0;r<n.length;r++)t.addEventListener(n[r],e);return{cancel:at((function(){for(var r=0;r<n.length;r++)t.removeEventListener(n[r],e)}))}}Bn.prototype=Object.create(Error.prototype);var Xn=["webkit","moz","ms","o"];function Zn(t,n,e){t.style[n]=e;for(var r=Dt(n),o=0;o<Xn.length;o++)t.style[""+Xn[o]+r]=e}var Yn=["animationstart","webkitAnimationStart","oAnimationStart","MSAnimationStart"],te=["animationend","webkitAnimationEnd","oAnimationEnd","MSAnimationEnd"];function ne(t,n,e,r){return void 0===r&&(r=1e3),new I((function(o,i){var u=zn(t);if(!u)return o();var c,a,f,s,d=!1;function l(){clearTimeout(c),clearTimeout(a),f.cancel(),s.cancel()}f=Kn(u,Yn,(function(t){t.target===u&&t.animationName===n&&(clearTimeout(c),t.stopPropagation(),f.cancel(),d=!0,a=setTimeout((function(){l(),o()}),r))})),s=Kn(u,te,(function(t){if(t.target===u&&t.animationName===n)return l(),"string"==typeof t.animationName&&t.animationName!==n?i("Expected animation name to be "+n+", found "+t.animationName):o()})),Zn(u,"animationName",n),c=setTimeout((function(){if(!d)return l(),o()}),200),e&&e(l)}))}function ee(t){t.style.setProperty("visibility","")}function re(t){t.style.setProperty("visibility","hidden","important")}function oe(t){t.style.setProperty("display","")}function ie(t){t.style.setProperty("display","none","important")}function ue(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function ce(t,n,e){var r=ne(t,n,e);return oe(t),r}function ae(t,n,e){return ne(t,n,e).then((function(){ie(t)}))}function fe(t,n){t.classList.add(n)}function se(t,n){t.classList.remove(n)}function de(t){return!t||!t.parentNode}function le(t,n){var e;return n=at(n),de(t)?n():e=kt((function(){de(t)&&(e.cancel(),n())}),50),{cancel:function(){e&&e.cancel()}}}function he(t,n){void 0===n&&(n=window.document);for(var e=0,r=An("script",t);e<r.length;e++){var o=r[e],i=o.parentNode;if(i){var u=n.createElement("script");u.text=o.textContent,i.replaceChild(u,o)}}}function pe(t,n,e){var r=void 0===e?{}:e,o=r.width,i=void 0===o||o,u=r.height,c=void 0===u||u,a=r.interval,f=void 0===a?100:a,s=r.win,d=void 0===s?window:s,l=t.offsetWidth,h=t.offsetHeight;n({width:l,height:h});var p,v,w=function(){var e=t.offsetWidth,r=t.offsetHeight;(i&&e!==l||c&&r!==h)&&n({width:e,height:r}),l=e,h=r};return void 0!==d.ResizeObserver?(p=new d.ResizeObserver(w)).observe(t):void 0!==d.MutationObserver?((p=new d.MutationObserver(w)).observe(t,{attributes:!0,childList:!0,subtree:!0,characterData:!1}),d.addEventListener("resize",w)):function t(){w(),v=setTimeout(t,f)}(),{cancel:function(){p.disconnect(),window.removeEventListener("resize",w),clearTimeout(v)}}}function ve(t){var n=On();if(n&&"function"==typeof n.getEntries)for(var e=n.getEntries(),r=0;r<e.length;r++){var o=e[r];if(o&&o.name&&0===o.name.indexOf(t)&&"number"==typeof o.duration)return Math.floor(o.duration)}}function we(t){for(;t.parentNode;)t=t.parentNode;return"[object ShadowRoot]"===t.toString()}function me(t){for(;t.parentNode;)t=t.parentNode;if(we(t))return t}function ye(t){var n=me(t);if(n.host)return n.host}function ge(t){var n=ye(t);if(!n)throw new Error("Element is not in shadow dom");if(we(n))throw new Error("Host element is also in shadow dom");var e="shadow-slot-"+X(),r=document.createElement("slot");r.setAttribute("name",e),t.appendChild(r);var o=document.createElement("div");return o.setAttribute("slot",e),n.appendChild(o),o}function be(t){var n=function n(e){return t.removeEventListener("focus",n),e.preventDefault(),t.blur(),!1};t.addEventListener("mousedown",(function(){t.addEventListener("focus",n),setTimeout((function(){t.removeEventListener("focus",n)}),1)}))}function Ee(t){var n=t.name,e=t.lifetime,r=void 0===e?12e5:e;return ut(Ee,(function(){var t,e="__"+n+"_storage__";function o(n){var r,o=Wn();if(t&&(r=t),!r&&o){var i=window.localStorage.getItem(e);i&&(r=JSON.parse(i))}r||(r=Z()[e]),r||(r={id:X()}),r.id||(r.id=X()),t=r;var u=n(r);return o?window.localStorage.setItem(e,JSON.stringify(r)):Z()[e]=r,t=null,u}function i(t){return o((function(n){var e=n.__session__,o=Date.now();return e&&o-e.created>r&&(e=null),e||(e={guid:X(),created:o}),n.__session__=e,t(e)}))}return{getState:o,getID:function(){return o((function(t){return t.id}))},getSessionState:function(t){return i((function(n){return n.state=n.state||{},t(n.state)}))},getSessionID:function(){return i((function(t){return t.guid}))}}}),[{name:n,lifetime:r}])}function Se(){return Ee({name:"belter_experiment"})}function _e(t){return Se().getSessionState((function(n){return n.loggedBeacons=n.loggedBeacons||[],-1===n.loggedBeacons.indexOf(t)&&(n.loggedBeacons.push(t),!0)}))}function je(t){var n,e=t.name,r=t.sample,o=void 0===r?50:r,i=t.logTreatment,u=void 0===i?ct:i,c=t.logCheckpoint,a=void 0===c?ct:c,f=function(t){return Se().getState((function(n){return n.throttlePercentiles=n.throttlePercentiles||{},n.throttlePercentiles[t]=n.throttlePercentiles[t]||Math.floor(100*Math.random()),n.throttlePercentiles[t]}))}(e),s=e+"_"+(n=f<o?"test":o>=50||o<=f&&f<2*o?"control":"throttle"),d=!1,l=!1;try{window.localStorage&&window.localStorage.getItem(e)&&(l=!0)}catch(t){}return{isEnabled:function(){return"test"===n||l},isDisabled:function(){return"test"!==n&&!l},getTreatment:function(){return s},log:function(t,n){return void 0===n&&(n={}),d?(_e(e+"_"+s+"_"+JSON.stringify(n))&&u({name:e,treatment:s,payload:n}),_e(e+"_"+s+"_"+t+"_"+JSON.stringify(n))&&a({name:e,treatment:s,checkpoint:t,payload:n}),this):this},logStart:function(t){return void 0===t&&(t={}),d=!0,this.log("start",t)},logComplete:function(t){return void 0===t&&(t={}),this.log("complete",t)}}}function Oe(t){var n=t.name,e=t.version,r=void 0===e?"latest":e,o=Z(),i="__"+n+"__"+r+"_global__",u=o[i]=o[i]||{};return{get:function(t,n){return n=n||{},u[t]=u[t]||n}}}var xe=[];function Ce(t){var n=t.url,e=t.method,r=void 0===e?"get":e,o=t.headers,i=void 0===o?{}:o,u=t.json,c=t.data,a=t.body,f=t.win,s=void 0===f?window:f,d=t.timeout,l=void 0===d?0:d;return new I((function(t,e){if(u&&c||u&&a||c&&u)throw new Error("Only options.json or options.data or options.body should be passed");for(var o={},f=0,d=Object.keys(i);f<d.length;f++){var h=d[f];o[h.toLowerCase()]=i[h]}u?o["content-type"]=o["content-type"]||"application/json":(c||a)&&(o["content-type"]=o["content-type"]||"application/x-www-form-urlencoded; charset=utf-8"),o.accept=o.accept||"application/json";for(var p=0;p<xe.length;p++)for(var v=(0,xe[p])(),w=0,m=Object.keys(v);w<m.length;w++){var y=m[w];o[y.toLowerCase()]=v[y]}var g=new s.XMLHttpRequest;for(var b in g.addEventListener("load",(function(){var o=function(t){void 0===t&&(t="");for(var n={},e=0,r=t.trim().split("\n");e<r.length;e++){var o=r[e].split(":"),i=o[0],u=o.slice(1);n[i.toLowerCase()]=u.join(":").trim()}return n}(this.getAllResponseHeaders());if(!this.status)return e(new Error("Request to "+r.toLowerCase()+" "+n+" failed: no response status code."));var i=o["content-type"],u=i&&(0===i.indexOf("application/json")||0===i.indexOf("text/json")),c=this.responseText;try{c=JSON.parse(c)}catch(t){if(u)return e(new Error("Invalid json: "+this.responseText+"."))}return t({status:this.status,headers:o,body:c})}),!1),g.addEventListener("error",(function(t){e(new Error("Request to "+r.toLowerCase()+" "+n+" failed: "+t.toString()+"."))}),!1),g.open(r,n,!0),o)o.hasOwnProperty(b)&&g.setRequestHeader(b,o[b]);u?a=JSON.stringify(u):c&&(a=Object.keys(c).map((function(t){return encodeURIComponent(t)+"="+(c?encodeURIComponent(c[t]):"")})).join("&")),g.timeout=l,g.ontimeout=function(){e(new Error("Request to "+r.toLowerCase()+" "+n+" has timed out"))},g.send(a)}))}function Pe(t){xe.push(t)}var ke=!0;function Ae(t,n,e){e.value=et(e.value,{name:n,thisNamespace:!0})}function Me(t,n,e){e.value=it(e.value,{name:n})}function Te(t){return"string"==typeof t&&/^[0-9]+%$/.test(t)}function We(t){return"string"==typeof t&&/^[0-9]+px$/.test(t)}function Ie(t){if("number"==typeof t)return t;var n=t.match(/^([0-9]+)(px|%)$/);if(!n)throw new Error("Could not match css value from "+t);return parseInt(n[1],10)}function Le(t){return Ie(t)+"px"}function Ne(t){return"number"==typeof t?Le(t):Te(t)?t:Le(t)}function Re(t,n){return parseInt(t*Ie(n)/100,10)}function ze(t,n){if("number"==typeof t)return t;if(Te(t))return Re(n,t);if(We(t))return Ie(t);throw new Error("Can not normalize dimension: "+t)}function De(t,n){var e=(void 0===n?{}:n).timeout,r=[],o=[],i=setTimeout((function(){r.length&&o.push(I.asyncReject(new Error("Expected "+r[0]+" to be called")))}),void 0===e?5e3:e),u=function(t,n){return void 0===n&&(n=ct),r.push(t),function(){for(var e=this,i=arguments.length,u=new Array(i),c=0;c<i;c++)u[c]=arguments[c];an(r,t);var a=cn((function(){var t;return(t=n).call.apply(t,[e].concat(u))})),f=a.result,s=a.error;if(s)throw o.push(I.asyncReject(s)),s;return o.push(I.resolve(f)),f}},c=function(t,n){return void 0===n&&(n=ct),function(){var e;o.push(I.asyncReject(new Error("Expected "+t+" to not be called")));for(var r=arguments.length,i=new Array(r),u=0;u<r;u++)i[u]=arguments[u];return(e=n).call.apply(e,[this].concat(i))}},a=function(t,n){return void 0===n&&(n=ct),r.push(t),function(){for(var e=this,i=arguments.length,u=new Array(i),c=0;c<i;c++)u[c]=arguments[c];an(r,t);var a=cn((function(){var t;return(t=n).call.apply(t,[e].concat(u))})),f=a.result,s=a.error;if(s)throw s;return o.push(I.resolve(f).then((function(){throw new Error("Expected "+t+" to throw an error")}),ct)),f}},f=function t(){return I.try((function(){if(o.length)return o.pop()})).then((function(){return o.length?t():r.length?I.delay(10).then(t):void 0}))};return o.push(I.try((function(){return t({expect:u,avoid:c,expectError:a,error:c,wait:f})}))),f().then((function(){clearTimeout(i)}))}}])}));
  //# sourceMappingURL=belter.min.js.map