1/*! For license information please see init.d14c94a333a298606fff.js.LICENSE.txt */ 2!function(){"use strict";var e,t,r={55(e,t,r){r.d(t,{Q:function(){return n}});var n=function(e){return void 0===e.isTrusted||e.isTrusted}},135(e,t,r){var n;r.d(t,{R:function(){return i}}),function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR"}(n||(n={}));class o{groupLoggingIntervalId=null;groupsByKey=new Map;isGroupLoggingEnabled=!1;loggingLevel=null;middlewares=[];constructor(){}debug=(e,...t)=>{this.processMiddlewares("console","debug",e,...t),null!==this.loggingLevel&&n.DEBUG>=this.loggingLevel&&console.debug(e,...t)};debugGroup=(e,...t)=>{this.isGroupLoggingEnabled?null!==this.loggingLevel&&n.DEBUG>=this.loggingLevel&&this.pushToGroup("debug",e,...t):this.debug(e,...t)};debugNoConsole=(e,...t)=>{this.processMiddlewares("internal","debug",e,...t)};enableGroupLogging=()=>{this.isGroupLoggingEnabled=!0,null!==this.groupLoggingIntervalId&&(this.groupLoggingIntervalId=setInterval(()=>{const e=this.groupsByKey;this.groupsByKey=new Map;for(const[t,r]of e.entries()){console.groupCollapsed(t);for(const[e,...t]of r)console[e](...t);console.groupEnd()}},1e3))};error=(e,...t)=>{this.processMiddlewares("console","error",e,...t),null!==this.loggingLevel&&n.ERROR>=this.loggingLevel&&console.error(e,...t)};errorGroup=(e,...t)=>{this.isGroupLoggingEnabled?null!==this.loggingLevel&&n.ERROR>=this.loggingLevel&&this.pushToGroup("error",e,...t):this.error(e,...t)};errorNoConsole=(e,...t)=>{this.processMiddlewares("internal","error",e,...t)};info=(e,...t)=>{this.processMiddlewares("console","info",e,...t),null!==this.loggingLevel&&n.INFO>=this.loggingLevel&&console.log(e,...t)};infoGroup=(e,...t)=>{this.isGroupLoggingEnabled?null!==this.loggingLevel&&n.INFO>=this.loggingLevel&&this.pushToGroup("info",e,...t):this.info(e,...t)};infoNoConsole=(e,...t)=>{this.processMiddlewares("internal","info",e,...t)};setLoggingLevel=e=>{this.loggingLevel=o.convertLogLevelToNumber(e)};setMiddleware=e=>{this.middlewares.push(e)};warn=(e,...t)=>{this.processMiddlewares("console","warn",e,...t),null!==this.loggingLevel&&n.WARN>=this.loggingLevel&&console.warn(e,...t)};warnGroup=(e,...t)=>{this.isGroupLoggingEnabled?null!==this.loggingLevel&&n.WARN>=this.loggingLevel&&this.pushToGroup("warn",e,...t):this.warn(e,...t)};warnNoConsole=(e,...t)=>{this.processMiddlewares("internal","warn",e,...t)};static convertLogLevelToNumber=e=>{switch(e){case"debug":return n.DEBUG;case"info":return n.INFO;case"warn":return n.WARN;default:return n.ERROR}};processMiddlewares=(e,t,r,...n)=>
2{this.middlewares.forEach(o=>o(e,t,r,...n))};pushToGroup(e,t,...r){let n=this.groupsByKey.get(t);n||(n=[],this.groupsByKey.set(t,n)),n.push([e,...r])}}const i=new o},169(e,t,r){r.d(t,{VW:function(){return l},Wo:function(){return d},fj:function(){return u},l2:function(){return s},t9:function(){return c},w$:function(){return f}});var n=r(977),o=r(674),i=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},a=function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},s=function(e){return i(void 0,[e],void 0,function(e){var t,r,i,s,c=e.config,u=e.sessionId,l=e.visitorId;return a(this,function(e){switch(e.label){case 0:return t={key:c.projectKey,sessionId:u,visitorId:l},c.userId&&(t.userId=c.userId),[4,n.F("/rec/setup-recording/website",{method:"POST",abortPreviousRequest:!1,baseUrl:c.managerHost,body:JSON.stringify(t),credentials:"include",logPayloadOnError:!0,throwOnConvert:!0})];case 1:return r=e.sent(),i=r.data,s=r.response,i.ok&&i.recordingAllowed?(c.isRelayProxy&&(i.recording.assetsHost=o.c(c.host,"/assets").toString(),i.recording.writerHost=o.c(c.host,"/web-writer").toString()),[2,{response:s,setupData:i}]):[2,{response:s,setupData:i}]}})})},c=function(e){return i(void 0,[e],void 0,function(e){var t=e.managerHost,r=e.projectKey,o=e.sessionId;return a(this,function(e){switch(e.label){case 0:return[4,n.F("/rec/sessions/".concat(o,"/active?projectKey=").concat(r),{method:"GET",abortPreviousRequest:!0,baseUrl:t,throwOnConvert:!0})];case 1:return[2,e.sent().data]}})})},u=function(e){return i(void 0,[e],void 0,function(e){var t=e.assetsHost,r=e.urls;return a(this,function(e){switch(e.label){case 0:return[4,n.F("/cache",{method:"POST",abortPreviousRequest:!1,baseUrl:t,body:JSON.stringify(r),waitForOnlineStatus:!0})];case 1:return e.sent(),[2]}})})},l=function(e){var t=e.assetsHost,r=e.urls;return n.T("/cache",{baseUrl:t,body:JSON.stringify(r)})},d=function(e){return i(void 0,[e],void 0,function(e){var t,r,o=e.formData,i=e.isFromPreviousRecord,s=e.recordId,c=e.sessionId,u=e.visitorId,l=e.writerHost;return a(this,function(e){switch(e.label){case 0:return t="/rec/v3/write",window.URLSearchParams&&(r=new URLSearchParams([["rid",s],["sid",c],["vid",u]]),i&&r.append("isFromPreviousRecord","true"),t+="?".concat(r.toString())),[4,n.F(t,{method:"POST",abortPreviousRequest:!1,baseUrl:l,body:o,doNotRetryOnDocumentHidden:!0,headers:{},waitForOnlineStatus:!0})];case 1:return[2,e.sent().data]}})})},f=function(e){var t=e.formData,r=e.isPartialChunk,o=e.recordId,i=e.retryCount,a=e.sessionId,s=e.visitorId,c=e.writerHost,u="/rec/v3/write";if(window.URLSearchParams){var l=new URLSearchParams([["rid",o],["sid",a],["vid",s],["isPartialChunk",String(r)]]);r||l.delete("isPartialChunk"),u+="?".concat(l.toString())}return n.T(u,{baseUrl:c,body:t,retryCount:i,waitForOnlineStatus:!0})}},188(e,t,r){r.d(t,{$:function(){return n}});var n=function(){return((e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&r[e]];return t})()}},201(e,t,r){r.d(t,{EE:function(){return E},I2:function(){return O},M0:function(){return k},Nu:function(){return S},fB:function(){return R}});
2var n=r(938),o=r(604),i=r(829),a=r(911),s=r(831),c=r(358),u=function(){return u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},u.apply(this,arguments)},l=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},d="https://web.developer.smartlook.com/docs",f="".concat(d,"/custom-click-properties"),p="".concat(d,"/error-logging#custom-errors-api"),g="".concat(d,"/custom-events#creating-custom-events"),h="".concat(d,"/custom-event-properties"),y="".concat(d,"/identify-visitor"),v="".concat(d,"/custom-navigation-event"),b=function(e){return(0,n.Kg)(e)&&e.length>0&&e.length<=200},w=function(e){return(0,c.q)(e)<=5e3},m=function(e,t){var r=e.trim();return r!==e&&(0,i.o)("Invalid format of string '".concat(r,"'. Please remove spaces at the beginning or at the end of the string. See more at ").concat(I(t),".")),r},S=function(e,t){var r,n=o.NC(e);if(!(0,a.Qd)(n)){var s=(r=n,Object.prototype.toString.call(r).slice(8,-1).toLowerCase());(0,i.o)("Invalid type of ".concat(t," properties. Expected plain object, got ").concat(s,". See more at ").concat(I(t)))}},R=function(e,t,r){var n,o;void 0===r&&(r="");var a=u({},e);try{for(var s=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),c=s.next();!c.done;c=s.next()){var d=l(c.value,2),f=d[0],p=d[1],g=b(f),h=w(p);if(g&&h||delete a[f],g){var y=m(f,t);y!==f&&(a[y]=a[f],delete a[f])}else(0,i.o)("".concat(r?"".concat(r,": "):"","Invalid name of ").concat(t," property '").concat(f,"'. See more at ").concat(I(t)));h||(0,i.o)("".concat(r?"".concat(r,": "):"","Invalid value of ").concat(t," property '").concat(f,"' (").concat(typeof p,"). See more at ").concat(I(t)),p)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}return a},O=function(e){return b(e)?m(String(e),s.w.CUSTOM_EVENT):((0,i.o)("Invalid custom event name '".concat(e,"'. See more at ").concat(g)),e)},k=function(e){var t;if(t=e,(0,c.q)(t)<=5e3)return e;(0,i.o)("Invalid error message. See more at ".concat(p))},E=function(e){if(function(e){return(0,n.Kg)(e)&&e.length>0&&e.length<=1e3}(e))return e;(0,i.o)("Invalid navigation url '".concat(e,"'. See more at ").concat(v))},I=function(e){var t,r;return null!==(r=((t={})[s.w.CLICK]=f,t[s.w.CUSTOM_EVENT]=g,t[s.w.IDENTIFY]=y,t[s.w.PROPERTIES]=h,t)[e])&&void 0!==r?r:d}},358(e,t,r){r.d(t,{c:function(){return i},q:function(){return o}});var n=r(911),o=function(e){var t=(0,n.Qd)(e)?JSON.stringify(e):String(e);return new Blob([t]).size},i=function(e){var t=0;return e.forEach(function(e,r){t+=r.length,t+="string"==typeof e?e.length:e.size}),t}},403(e,t,r){r.d(t,{NM:function(){return i},VP:function(){return o},wp:function(){return n}});var n=function(){return window.top===window},o=function(e){try{return Boolean(e.location.href)}catch(e){return!1}},i=function(){if(n())return!1;try{return Boolean(window.frameElement)}catch(e){return!1}}},421(e,t,r){var n;r.d(t,{GX:function(){return o},MG:function(){return i},g4:function(){return n},o7:function(){return a}}),function(e){e.ACKNOWLEDGED="SL__ACKNOWLEDGED",e.DISCOVERY="SL__DISCOVERY",e.DISCOVERED="SL__DISCOVERED",e.USER_ACTIVITY="SL__USER_ACTIVITY",e.STOP_RECORDING="SL__STOP_RECORD",e.START_RECORDING="SL__START_RECORDING"}(n||(n={}));var o=function(e){if(e&&"object"==typeof e&&Object.hasOwn(e,"name")){var t=e.name;if("string"==typeof t&&t.startsWith("SL__"))return!0}return!1},i=function(e){return e.name===n.DISCOVERY},a=function(e){return e.name===n.DISCOVERED}},511(e,t,r){r.d(t,{ni:function(){return n},u5:function(){return i},xw:function(){return o}});var n=function(e){var t,r,n=null;try{n=null!==(r=null===(t=e.defaultView)||void 0===t?void 0:t.frameElement)&&void 0!==r?r:null}catch(e){}return n},o=function(e){try{return e.contentDocument}catch(e){}return null},i=function(e){var t,r=null;try{r=null!==(t=e.frameElement)&&void 0!==t?t:null}catch(e){}return r}},525(e,t,r){r.d(t,{bJ:function(){return n},eu:function(){return o},v2:function(){return i}});var n=function(e){var t,r;return null!==e&&"object"==typeof e&&(e instanceof Error||(null===(t=e.constructor.name)||void 0===t?void 0:t.endsWith("Error"))||(null===(r=e.constructor.name)||void 0===r?void 0:r.endsWith("Exception")))},o=function(e){return n(e)&&(e instanceof SyntaxError||"SyntaxError"===e.constructor.name)},i=function(e){return n(t=e)&&(t instanceof DOMException||"DOMException"===t.constructor.name)&&"SecurityError"===e.name;var t}},548(e,t,r){r.d(t,{OW:function(){return n},uX:function(){return i},wL:function(){return a}});var n=["card","credit","expiry","cvv","cvc"],o=["cc-name","cc-given-name","cc-additional-name","cc-family-name","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc","cc-type"],i=function(e,t){var r;void 0===t&&(t=n);var i=(null!==(r=e.getAttribute("autocomplete"))&&void 0!==r?r:"").toLowerCase();return!(!i||!o.some(function(e){return i.includes(e)}))||Array.from(e.attributes).filter(function(e){return"value"!==e.name}).flatMap(function(e){return[e.name,e.value]}).some(function(e){return t.some(function(t){return e.toLowerCase().includes(t)})})},a=new Set(["file","password"])},582(e,t,r){r.d(t,{q:function(){return u},t:function(){return c}});
2var n,o=r(675),i=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},s=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},c=function(e){function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=e.apply(this,s([],a(r),!1))||this;return Object.setPrototypeOf(o,t.prototype),o}return i(t,e),t}(o.f),u=function(e){function t(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var o=e.apply(this,s([],a(r),!1))||this;return Object.setPrototypeOf(o,t.prototype),o}return i(t,e),t}(o.f)},604(e,t,r){r.d(t,{NC:function(){return d},As:function(){return l},Fd:function(){return u},mS:function(){return h}});var n=r(525),o=r(869),i=r(965),a=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},s=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},c=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},u=function(e){try{if((0,n.bJ)(e)&&!Object.hasOwn(e,"toJSON"))return l(e);if("object"==typeof e&&null!==e){var t=Object.keys(e);if(1===t.length&&"isTrusted"===t[0])return l(e)}if(["function","symbol","bigint","undefined"].includes(typeof e))return l(e);var r=JSON.stringify(e);return(0,i.G)(r)}catch(t){return l(e)}},l=function(e,t){try{return(0,i.f)(d(e),t).stringified}catch(e){return JSON.stringify("[non-serializable object]")}},d=function(e,t){return void 0===t&&(t=new WeakMap),Array.isArray(e)?e.map(function(e){return d(e,t)}):"object"==typeof e&&null!==e?e instanceof Element?"[Element: ".concat(e.tagName,"]"):f(e,t):["function","symbol","bigint","undefined"].includes(typeof e)?typeof e:null===e||"number"==typeof e||"string"==typeof e||"boolean"==typeof e?e:JSON.stringify(e)},f=function(e,t){var r,i=Object.keys(e);if((0,o.V1)(e)){var c={};e.forEach(function(e,t){c[t]="string"==typeof e?e:"[file:".concat(e.type,"][").concat(e.name,"]")}),r=c}else if((0,n.bJ)(e)&&!Object.hasOwn(e,"toJSON"))r=g(e);else if(1===i.length&&"isTrusted"===i[0]){var u=Object.keys(Object.getPrototypeOf(e));r=JSON.parse(JSON.stringify(e,s(s([],a(i),!1),a(u),!1)))}else r=p(t,e);return r},p=function(e,t){var r,n;if(e.has(t))return"[circular]";e.set(t,!0);var o=[];try{for(var i=c(Object.entries(t)),s=i.next();!s.done;s=i.next()){var u=a(s.value,2),l=u[0],f=u[1];o.push([l,d(f,e)])}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return Object.fromEntries(o)},g=function(e){var t=JSON.parse(JSON.stringify(e));return t.name||(t.name=e.name),t.stack||(t.stack=e.stack),t.message||(t.message=e.message),t},h=function(e){var t,r,n,o;if(Array.isArray(e))n="["+e.map(function(e){return h(e)}).join(",")+"]";else if("function"==typeof e||(o=e)instanceof RegExp||"object"==typeof o&&null!==o&&"RegExp"===o.constructor.name)n=e.toString();else if("boolean"==typeof e||void 0===e)n=e;else if("object"==typeof e&&null!==e){var i=[];try{for(var s=c(Object.entries(e)),u=s.next();!u.done;u=s.next()){var l=a(u.value,2),d=l[0],f=l[1];i.push([d,h(f)])}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}n="{".concat(i.map(function(e){var t=a(e,2),r=t[0],n=t[1];return'"'.concat(r,'":').concat(n)}).join(","),"}")}else n=JSON.stringify(e);return n}},674(e,t,r){r.d(t,{L:function(){return i},c:function(){return n}});var n=function(e,t){var r,n=new URL(/^https?:\/\//.test(r=e)?r:"https://".concat(r));if(!t)return n;var o=n.pathname;return o.endsWith("/")&&t.startsWith("/")&&(o=o.slice(0,-1)),new URL("".concat(o).concat(t),n.origin)},o=[/:\/\/10(\.\w+){3}(:\w+)?\//,/:\/\/172\.(16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31).\w+\.\w+(:\w+)?\//,/:\/\/192\.168(\.\w+){2}(:\w+)?\//,/:\/\/localhost(:\w+)?\//,/:\/\/127\.0\.0\.1(:\w+)?\//,/^file:\/{3}/],i=function(e){return o.some(function(t){return t.test(e)})}},675(e,t,r){r.d(t,{f:function(){return i}});
2var n,o=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(r,n){var o=void 0===n?{}:n,i=o.additionalData,a=void 0===i?{}:i,s=o.originalError,c=o.shouldReport,u=void 0===c||c,l=e.call(this,r)||this;return Object.setPrototypeOf(l,t.prototype),l.name="WebSDKError",l.additionalData=a,l.shouldReport=u,s&&(l.originalName=s.name,l.originalStack=s.stack,l.originalMessage=s.message,l.originalError=s),s instanceof t&&(l.originalAdditionalData=s.additionalData),l}return o(t,e),t.prototype.toJSON=function(){return{name:this.name,additionalData:this.additionalData,message:this.message,originalAdditionalData:this.originalAdditionalData,originalError:this.originalError,originalMessage:this.originalMessage,originalName:this.originalName,originalStack:this.originalStack,shouldReport:this.shouldReport,stack:this.stack}},t}(Error)},779(e,t,r){r.d(t,{f4:function(){return d},vS:function(){return f}});var n=r(675),o=r(967),i=r(188),a=r(135),s=r(169),c=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},u=function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},l=function(e,t,r){return c(void 0,void 0,void 0,function(){var i;return u(this,function(c){switch(c.label){case 0:return c.trys.push([0,2,,3]),a.R.debug("Calling active endpoint in init."),[4,(0,s.t9)({managerHost:t.managerHost,projectKey:t.projectKey,sessionId:e})];case 1:return[2,c.sent()];case 2:return(i=c.sent())instanceof o.h?(i.isConnectionError||a.R.warn("/active call failed on network error.",i),404===i.status&&r.clearStorage()):i instanceof n.f?i.shouldReport&&a.R.warn("/active call failed on recorder error.",i):a.R.warn("/active call failed on unknown error.",i),[3,3];case 3:return[2,null]}})})},d=function(e,t){var r,n,o,i,a=[],s=t.getCookieMetadataForProjectKey(e.projectKey);a.push({sessionId:null!==(r=null==s?void 0:s.sessionId)&&void 0!==r?r:null,visitorId:null!==(n=null==s?void 0:s.visitorId)&&void 0!==n?n:null});var c=t.getLocalStorageMetadataForProjectKey(e.projectKey),u=null!==(o=null==c?void 0:c.sessionId)&&void 0!==o?o:null,l=null!==(i=null==c?void 0:c.visitorId)&&void 0!==i?i:null;return a[0].sessionId===u&&a[0].visitorId===l||a.push({sessionId:u,visitorId:l}),a},f=function(e,t,r){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o];return c(void 0,function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([e,t,r],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(n),!1),void 0,function(e,t,r,n){var o,a,s,c,d,f,p,g,h,y;return void 0===n&&(n=[]),u(this,function(u){switch(u.label){case 0:u.trys.push([0,5,6,7]),o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);
2if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),a=o.next(),u.label=1;case 1:return a.done?[3,4]:(s=a.value).sessionId?n.includes(s.sessionId)?[3,3]:[4,l(s.sessionId,t,r)]:[3,3];case 2:if(null==(c=u.sent())?void 0:c.isActive)return[2,{sessionId:s.sessionId,sessionTimeRemaining:c.sessionTimeRemaining,visitorId:null!==(g=s.visitorId)&&void 0!==g?g:i.$()}];u.label=3;case 3:return a=o.next(),[3,1];case 4:return[3,7];case 5:return d=u.sent(),f={error:d},[3,7];case 6:try{a&&!a.done&&(p=o.return)&&p.call(o)}finally{if(f)throw f.error}return[7];case 7:return r.clearAssetsStore(),[2,{sessionId:i.$(),visitorId:null!==(y=null===(h=e.find(function(e){return null!==e.visitorId}))||void 0===h?void 0:h.visitorId)&&void 0!==y?y:i.$()}]}})})}},783(e,t,r){r.d(t,{j:function(){return u}});var n=r(511),o=r(55),i=r(135),a=r(421),s=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},c=["mousemove","click","keypress","touchmove","drag","wheel","mouseover"],u=function(e){return r=function(){var t,r,u,l,d,f,p,g,h,y,v,b,w,m,S;return function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}(this,function(R){switch(R.label){case 0:t=Array.from(document.querySelectorAll("iframe")),r=[document];try{for(u=s(t),l=u.next();!l.done;l=u.next())d=l.value,(f=n.xw(d))&&r.push(f)}catch(e){b={error:e}}finally{try{l&&!l.done&&(w=u.return)&&w.call(u)}finally{if(b)throw b.error}}return p=[],g=c.map(function(e){return new Promise(function(t){var n,i,a=function(e){o.Q(e)&&t()},c=function(t){p.push(function(){return t.removeEventListener(e,a,!0)}),t.addEventListener(e,a,!0)};try{for(var u=s(r),l=u.next();!l.done;l=u.next())c(l.value)}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}})}),e&&g.push(e.waitForEventFromAnySource(a.g4.USER_ACTIVITY)),[4,Promise.any(g)];case 1:R.sent();try{for(h=s(p),y=h.next();!y.done;y=h.next()){v=y.value;try{v()}catch(e){i.R.debug("Listener could not be removed",e)}}}catch(e){m={error:e}}finally{try{y&&!y.done&&(S=h.return)&&S.call(h)}finally{if(m)throw m.error}}return[2]}})},new((t=void 0)||(t=Promise))(function(e,n){function o(e){try{a(r.next(e))}catch(e){n(e)}}function i(e){try{a(r.throw(e))}catch(e){n(e)}}function a(r){var n;r.done?e(r.value):(n=r.value,n instanceof t?n:new t(function(e){e(n)})).then(o,i)}a((r=r.apply(void 0,[])).next())});var t,r}},829(e,t,r){r.d(t,{o:function(){return n}});var n=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];window.smartlook.silent||console.warn.apply(console,function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}
2(["[Smartlook] ".concat(e)],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(t),!1))}},831(e,t,r){r.d(t,{e:function(){return a},w:function(){return n}});var n,o=r(911),i=r(201);!function(e){e.CLICK="click",e.CUSTOM_EVENT="custom event",e.IDENTIFY="identify",e.PROPERTIES="global event"}(n||(n={}));var a=function(e,t,r){(0,i.Nu)(e,t);var n=(0,o.NH)(e);return(0,i.fB)(n,t,r)}},869(e,t,r){r.d(t,{V1:function(){return n},ks:function(){return i},qf:function(){return o}});var n=function(e){return null!==e&&"object"==typeof e&&"FormData"===e.constructor.name},o=function(e){return null!==e&&"object"==typeof e&&"Blob"===e.constructor.name},i=function(e){return null!==e&&"object"==typeof e&&"Request"===e.constructor.name}},911(e,t,r){r.d(t,{$_:function(){return s},NH:function(){return a},Qd:function(){return i}});var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},i=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype},a=function(e){var t,r,n={};try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),a=i.next();!a.done;a=i.next()){var s=o(a.value,2),c=s[0],u=s[1];null!==u&&"number"!=typeof u&&"string"!=typeof u&&"boolean"!=typeof u||(n[c]=u)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return Object.entries(n).forEach(function(e){var t=o(e,2),r=t[0],i=t[1];("function"==typeof i||"object"==typeof i&&null!==i||"symbol"==typeof i)&&delete n[r]}),n},s=function(e){var t=n({},e);return Object.entries(t).forEach(function(e){var r=o(e,2),n=r[0],i=r[1];""!==i&&null!=i||delete t[n]}),t}},938(e,t,r){r.d(t,{Kg:function(){return n},b0:function(){return i},tR:function(){return o}});var n=function(e){return"string"==typeof e},o=function(e){return"number"==typeof(t=e)&&Number.isInteger(t)&&e>=0;var t},i=function(e){return void 0===e}},965(e,t,r){r.d(t,{G:function(){return c},f:function(){return s}});var n=r(604),o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},a="[smartlook-truncated]",s=function(e,t){void 0===t&&(t=16384);var r=JSON.stringify(e);return r.length<=t?{isTruncated:!1,stringified:r}:(Array.isArray(e)?r=function(e,t){var r,i,s="";try{for(var c=o(e),u=c.next();!u.done;u=c.next()){var l=u.value;if(t<=0){s+=JSON.stringify(a)+",";break}var d=(0,n.As)(l,t)+",";s+=d,t-=d.length}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}return"["+s.slice(0,Math.max(0,s.length-1))+"]"}(e,t):"object"==typeof e&&null!==e?r=function(e,t){var r,s,c="";try{for(var u=o(Object.entries(e)),l=u.next();!l.done;l=u.next()){var d=i(l.value,2),f=d[0],p=d[1];if(t<=0){c+=JSON.stringify(a)+":true,";break}var g='"'.concat(f,'":').concat((0,n.As)(p,t),",");c+=g,t-=g.length}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=u.return)&&s.call(u)}finally{if(r)throw r.error}}return"{"+c.slice(0,Math.max(0,c.length-1))+"}"}
2(e,t):"string"==typeof e?r=JSON.stringify(a+"[string] "+e.slice(0,Math.max(0,t))):"number"==typeof e&&(r=JSON.stringify(a+"[number] "+String(e).slice(0,Math.max(0,t)))),{isTruncated:!0,stringified:r})},c=function(e,t){return void 0===t&&(t=16384),e.length<=t?e:JSON.stringify(a+"[string] "+e.slice(0,Math.max(0,t)))}},967(e,t,r){r.d(t,{h:function(){return i}});var n,o=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(r,n,o,i,a,s,c,u,l){var d=e.call(this,r)||this;return d.status=n,d.responseTimingData=o,d.requestPayload=a,d.originalError=c,d.responseData=u,d.additionalData=l,d.name="ApiError",Object.setPrototypeOf(d,t.prototype),d.responseDebugData=s?function(e){return{type:e.type,bodyUsed:e.bodyUsed,headers:e.headers?Array.from(e.headers):void 0,ok:e.ok,redirected:e.redirected,url:e.url}}(s):void 0,d.isSignalAborted=null==i?void 0:i.aborted,d.visibilityState=document.visibilityState,d.isOffline=!1===navigator.onLine,d.wasBeaconFallbackUsed=!1,d}return o(t,e),Object.defineProperty(t.prototype,"isConnectionError",{get:function(){return this.status<0&&!this.isAbortedByRecorder&&!this.isAbortedByUserAgent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAbortedByRecorder",{get:function(){return this.isSignalAborted},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAbortedByUserAgent",{get:function(){var e;return this.originalError instanceof Error&&"AbortError"===(null===(e=this.originalError)||void 0===e?void 0:e.name)&&!this.isSignalAborted},enumerable:!1,configurable:!0}),t}(Error)},977(e,t,r){r.d(t,{F:function(){return p},T:function(){return g}});var n=r(675),o=r(135),i=r(674),a=function(){return t=function(){return function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}(this,function(e){switch(e.label){case 0:return navigator.onLine?[3,2]:[4,new Promise(function(e){var t=function(){window.removeEventListener("online",t),e()};window.addEventListener("online",t),navigator.onLine&&(e(),window.removeEventListener("online",t))})];case 1:e.sent(),e.label=2;case 2:return[2]}})},new((e=void 0)||(e=Promise))(function(r,n){function o(e){try{a(t.next(e))}catch(e){n(e)}}function i(e){try{a(t.throw(e))}catch(e){n(e)}}function a(t){var n;t.done?r(t.value):(n=t.value,n instanceof e?n:new e(function(e){e(n)})).then(o,i)}a((t=t.apply(void 0,[])).next())});var e,t},s=r(967),c=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},u=function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},l={headers:{}},d={"Content-Type":"text/plain;charset=UTF-8"},f=new Map,p=function(e,t){return c(void 0,void 0,void 0,function(){var r,c,p,g,h,y,v,b,w,m,S,R,O,k,E,I,A,T,M,j,x,L,P,C,_,D,N,K;return u(this,function(B){switch(B.label){case 0:r=t.abortPreviousRequest,c=t.baseUrl,p=t.body,g=t.doNotRetryOnDocumentHidden,h=void 0!==g&&g,y=t.headers,v=t.logPayloadOnError,b=void 0!==v&&v,w=t.retryCount,m=void 0===w?3:w,S=t.retryInterval,R=void 0===S?1e3:S,O=t.throwOnConvert,k=void 0!==O&&O,E=t.waitForOnlineStatus,I=void 0!==E&&E,A=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(t,["abortPreviousRequest","baseUrl","body","doNotRetryOnDocumentHidden","headers","logPayloadOnError","retryCount","retryInterval","throwOnConvert","waitForOnlineStatus"]),T=(0,i.c)(c,e),(M=f.get(T.href))&&r&&(
2o.R.debug("Aborting previous request",T),M.abort("Aborted previous request.")),M=new AbortController,f.set(T.href,M),j=Object.assign(Object.assign(Object.assign(Object.assign({},l),{body:p}),A),{headers:void 0===y?d:y,signal:M.signal}),L=null,P=performance.now(),C=0,_=-1,N=function(e){var t,r,o,i,c,l,d;return u(this,function(u){switch(u.label){case 0:return I?[4,a()]:[3,2];case 1:u.sent(),u.label=2;case 2:_=e,u.label=3;case 3:return u.trys.push([3,11,12,13]),1!==e?[3,5]:(P=performance.now(),[4,fetch(T.href,j)]);case 4:return x=u.sent(),[3,10];case 5:return t=[],r=new Promise(function(t){setTimeout(function(){t()},R*Math.pow(2,e-1))}),t.push(r),h&&(o=new Promise(function(e){var t=function(){"hidden"===document.visibilityState&&(document.removeEventListener("visibilitychange",t),e())};document.addEventListener("visibilitychange",t),"hidden"===document.visibilityState&&(document.removeEventListener("visibilitychange",t),e())}),t.push(o)),[4,Promise.race(t)];case 6:if(u.sent(),h&&"hidden"===document.visibilityState)throw new Error("Document is hidden and flag `doNotRetryOnDocumentHidden` is set to true.");return I?[4,a()]:[3,8];case 7:u.sent(),u.label=8;case 8:return P=performance.now(),[4,fetch(T.href,j)];case 9:x=u.sent(),u.label=10;case 10:return D=void 0,[3,13];case 11:if(i=u.sent(),D=i,i instanceof Error&&"AbortError"===i.name)throw f.delete(T.href),new s.h("Request was aborted.",-1,{fetchTotalMs:C,finalRetries:_},M.signal,b?JSON.stringify(p):"Payload not logged.",void 0,i);return e<m&&(!h||"hidden"!==document.visibilityState)?[2,"continue"]:[3,13];case 12:return C=performance.now()-P,[7];case 13:if(f.delete(T.href),!x)throw new s.h("API request to ".concat(T.href," failed due to connection error."),-1,{fetchTotalMs:C,finalRetries:_},M.signal,b?JSON.stringify(p):"Payload not logged.",void 0,D);if(!(x.status>399))return[3,22];u.label=14;case 14:return u.trys.push([14,16,,17]),[4,x.json()];case 15:return L=u.sent(),[3,17];case 16:if((c=u.sent())instanceof Error&&("AbortError"===c.name||"TypeError"===c.name))throw new s.h("API request to ".concat(T.href," failed with status code ").concat(x.status,"."),x.status,{fetchTotalMs:C,finalRetries:_},M.signal,"Payload not logged.",x,c);return[3,17];case 17:return u.trys.push([17,20,,21]),L?[3,19]:[4,x.text()];case 18:L=u.sent(),u.label=19;case 19:return[3,21];case 20:if((l=u.sent())instanceof Error&&("AbortError"===l.name||"TypeError"===l.name))throw new s.h("API request to ".concat(T.href," failed with status code ").concat(x.status,"."),x.status,{fetchTotalMs:C,finalRetries:_},M.signal,"Payload not logged.",x,l);return[3,21];case 21:throw new s.h("API request to ".concat(T.href," failed with status code ").concat(x.status),x.status,{fetchTotalMs:C,finalRetries:_},M.signal,b?JSON.stringify(p):"Payload not logged.",x,void 0,L);case 22:if(204===x.status)return[2,"break"];u.label=23;case 23:return u.trys.push([23,25,,26]),[4,x.json()];case 24:return L=u.sent(),[2,"break"];case 25:if((d=u.sent())instanceof Error&&("AbortError"===d.name||"TypeError"===d.name)&&e<m)return[2,"continue"];if(k&&d instanceof Error)throw"AbortError"===d.name||"TypeError"===d.name?new s.h("API request to ".concat(T.href," failed due to connection error."),-1,{fetchTotalMs:C,finalRetries:_},M.signal,b?JSON.stringify(p):"Payload not logged.",void 0,D):new n.f("Could not convert data to JSON in ".concat(T.href," request"),{additionalData:{type:x.type,bodyUsed:x.bodyUsed,fetchTotalMs:C,finalRetries:_,headers:x.headers?Array.from(x.headers):void 0,ok:x.ok,online:navigator.onLine,originalErrorMessage:d.message,originalErrorName:d.name,redirected:x.redirected,status:x.status,url:x.url,visibility:document.visibilityState},originalError:d});if(k)throw new n.f("Unknown error happened during API call. ".concat(JSON.stringify(d)));return[2,"break"];case 26:return[2]}})},K=1,B.label=1;case 1:return K<=m?[5,N(K)]:[3,4];case 2:if("break"===B.sent())return[3,4];B.label=3;case 3:return K++,[3,1];case 4:if(void 0===x)throw new n.f("Response object is undefined.",{shouldReport:!0});return[2,{data:L,response:x}]}})})},g=function(e,t){return c(void 0,[e,t],void 0,function(e,t){var r,n,o,s=t.baseUrl,c=t.body,l=t.retryCount,d=void 0===l?1:l,f=t.waitForOnlineStatus;return u(this,function(t){switch(t.label){case 0:r=(0,i.c)(s,e),n=navigator.sendBeacon.bind(navigator),t.label=1;case 1:return d>0?f?[4,a()]:[3,3]:[3,11];case 2:t.sent(),t.label=3;case 3:return t.trys.push([3,4,9,10]),n(r.href,c)?[2,!0]:[3,1];case 4:if(!((o=t.sent())instanceof TypeError&&"Illegal invocation"===o.message))return[3,8];t.label=5;case 5:return t.trys.push([5,7,,8]),[4,fetch(r.href,{method:"POST",body:c,keepalive:!0})];case 6:return t.sent(),[2,!0];case 7:return t.sent(),[2,!1];case 8:throw o;case 9:return d-=1,[7];case 10:return[3,1];case 11:return[2,!1]}})})}}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}};return r[e](i,i.exports,o),i.exports}o.m=r,o.d=function(e,t){for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=function(e){return Promise.all(Object.keys(o.f).reduce(function(t,r){return o.f[r](e,t),t},[]))},o.u=function(e){return"bundle.f5b982975789cc6008bb.js"},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e={},t="@smartlook/recorder:",o.l=function(r,n,i,a){if(e[r])e[r].push(n);else{var s,c;if(void 0!==i)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var d=u[l];
2if(d.getAttribute("src")==r||d.getAttribute("data-webpack")==t+i){s=d;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",o.nc&&s.setAttribute("nonce",o.nc),s.setAttribute("data-webpack",t+i),s.src=r),e[r]=[n];var f=function(t,n){s.onerror=s.onload=null,clearTimeout(p);var o=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach(function(e){return e(n)}),t)return t(n)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),c&&document.head.appendChild(s)}},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.p="",function(){var e={385:0};o.f.j=function(t,r){var n=o.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise(function(r,o){n=e[t]=[r,o]});r.push(n[2]=i);var a=o.p+o.u(t),s=new Error;o.l(a,function(r){if(o.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",s.name="ChunkLoadError",s.type=i,s.request=a,n[1](s)}},"chunk-"+t,t)}};var t=function(t,r){var n,i,a=r[0],s=r[1],c=r[2],u=0;if(a.some(function(t){return 0!==e[t]})){for(n in s)o.o(s,n)&&(o.m[n]=s[n]);c&&c(o)}for(t&&t(r);u<a.length;u++)i=a[u],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=window.webpackChunk_smartlook_recorder=window.webpackChunk_smartlook_recorder||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var i,a,s,c,u=o(135),l=o(403),d=o(675),f=o(188),p=o(967),g=o(169),h=o(674),y=o(548),v=function(){return v=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)},b={eu:"manager.eu.smartlook.cloud",us:"manager.us.smartlook.cloud"},w={additionalCreditCardsIdentifiers:y.OW,additionalPageParams:!1,advancedNetwork:!1,banTime:3e5,cookies:!0,enableCompression:!0,enableRecordingOfAutomationFrameworks:!1,externalLogging:!0,fallbackToAlternativeIds:!1,forceSetupData:null,host:b.eu,interceptors:{},isCrossOriginIframeMode:!1,isRelayProxy:!1,loggingLevel:"error",managerHost:b.eu,packAssets:!1,packAssetsToRecording:!1,persistentGlobalEventProperties:!1,proxyAllImages:!1,record:{},region:"eu",standalone:!1,startRecordingAfterUserActivity:!0,storageKeys:{SMARTLOOK_BAN_EXPIRE:"smartlook_ban_expire",SMARTLOOK_BAN_REASON:"smartlook_ban_reason",SMARTLOOK_COOKIE:"SL_C_23361dd035530_SID",SMARTLOOK_COOKIE_DOMAIN:"SL_C_23361dd035530_DOMAIN",SMARTLOOK_DEBUG:"smartlook_debug",SMARTLOOK_LS:"SL_L_23361dd035530_SID",SMARTLOOK_LS_GLOBAL_PROPERTIES:"smartlook_global_properties",SMARTLOOK_LS_QUEUED_CHUNKS:"smartlook_queued_chunks"},upload:function(){return null},uploadInterval:7500,userId:null},m=o(421),S=o(829),R=o(582),O=o(779),k=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},E=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},I=function(){return!!l.NM()&&window.parent&&void 0!==window.parent.smartlook},A=function(e){return!(!window.parent||!window.parent.smartlook||"string"!=typeof window.parent.smartlook.key||window.parent.smartlook.key!==e)},T=o(783),M=o(604),j=o(55),x=o(977),L=function(e){return t=[e],n=function(e){var t=e.datadogHost,r=e.payload,n=e.projectKey;return function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}(this,function(e){switch(e.label){case 0:return[4,(0,x.F)("/rec/log/".concat(n),{method:"POST",abortPreviousRequest:!1,baseUrl:t,body:JSON.stringify(r),throwOnConvert:!1})];case 1:return e.sent(),[2]}})},new((r=void 0)||(r=Promise))(function(e,o){function i(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r(function(e){e(n)})).then(i,a)}s((n=n.apply(void 0,t||[])).next())});var t,r,n},P=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},C=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},_=function(){function e(e,t,r,n,o,i){var a=this;this.projectKey=e,this.datadogHost=t,this.uploadInterval=r,this.version=n,this.additionalContext=o,this.logPrefix=i,this.isSendingLogsDisabled=!1,this.logMessagesCache=new Map,this.logsToSend=[],this.uuid=(0,f.$)(),this.sendLog=function(e,t,r){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o];if("error"===t||"internal"===e){var i=a.logMessagesCache.get(r),s=performance.now();if(a.logMessagesCache.set(r,s),void 0!==i&&s-i<1e3)return;a.logsToSend.push(a.createLog.apply(a,C([r,t],P(n),!1))),"hidden"===document.visibilityState&&a.processLogs()}},this.createLog=function(e,t){for(var r,n,o,i,s,c,u=[],l=2;l<arguments.length;l++)u[l-2]=arguments[l];var d=Object.fromEntries(u.map(function(e,t){return[t,JSON.parse((0,M.As)(e))]}));return{context:Object.assign(Object.assign(Object.assign({},null===(r=a.additionalContext)||void 0===r?void 0:r.call(a)),{isIframe:window.top!==window,isWindowOpened:null!==window.opener,origin:null!==(n=window.location.origin)&&void 0!==n?n:"unknown",referrer:document.referrer,url:null!==(i=null===(o=window.location)||void 0===o?void 0:o.href)&&void 0!==i?i:"unknown",userAgent:null!==(c=null===(s=window.navigator)||void 0===s?void 0:s.userAgent)&&void 0!==c?c:"unknown",uuid:a.uuid,visibilityState:document.visibilityState}),d),message:a.logPrefix?"".concat(a.logPrefix,": ").concat(e):e,severity:t,tags:{},timestamp:Date.now()}},this.handleError=function(e){e.error instanceof d.f&&e.error.shouldReport&&(a.logsToSend.push(a.createLog("Uncaught error: ".concat(e.error),"error",e.error)),"hidden"===document.visibilityState&&a.processLogs())},this.handlePromiseRejection=function(e){var t;if(e.reason instanceof d.f&&e.reason.shouldReport){if("string"==typeof(null===(t=e.reason.additionalData)||void 0===t?void 0:t.message)&&(e.reason.additionalData.message.includes("Cannot set properties of undefined (setting 'sessionManager')")||e.reason.additionalData.message.includes("undefined is not an object (evaluating 'this.sessionManager=e')")||e.reason.additionalData.message.includes("this is undefined")||e.reason.additionalData.message.includes("Unable to set property 'sessionManager' of undefined or null reference")))return;a.logsToSend.push(a.createLog("Unhandled promise rejection: ".concat(e.reason),"error",e.reason)),"hidden"===document.visibilityState&&a.processLogs()}},this.processLogIntervalId=window.setInterval(function(){a.processLogs()},this.uploadInterval),window.addEventListener("error",this.handleError,!0),window.addEventListener("unhandledrejection",this.handlePromiseRejection,!0),document.addEventListener("visibilitychange",function(e){(0,j.Q)(e)&&"hidden"===document.visibilityState&&(a.processLogs(),setTimeout(function(){a.processLogs()},500))},!0)}return e.prototype.processLogs=function(){return e=this,r=function(){var e,t,r,n;return function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}(this,function(o){switch(o.label){case 0:if(this.isSendingLogsDisabled)return[2];if(!(this.logsToSend.length>0))return[3,4];e=this.logsToSend,this.logsToSend=[],t={logs:e,tags:{platform:"web",sdkVersion:this.version,userAgent:navigator.userAgent}},o.label=1;case 1:return o.trys.push([1,3,,4]),[4,L({datadogHost:this.datadogHost,payload:t,projectKey:this.projectKey})];case 2:return o.sent(),[3,4];case 3:return(r=o.sent())instanceof p.h&&(422===r.status||404===r.status)?this.isSendingLogsDisabled=!0:(n=this.logsToSend).push.apply(n,C([],P(e),!1)),[3,4];case 4:return[2]}})},new((t=void 0)||(t=Promise))(function(n,o){function i(e){try{s(r.next(e))}catch(e){o(e)}}function a(e){try{s(r.throw(e))}catch(e){o(e)}}function s(e){var r;e.done?n(e.value):(r=e.value,r instanceof t?r:new t(function(e){e(r)})).then(i,a)}s((r=r.apply(e,[])).next())});var e,t,r},e}(),D=function(e,t){for(var r=e.domain,n=r.split("."),o=0;o<n.length-1&&!e.cookie.includes("".concat(t,"=true"));)o+=1,r=n.slice(-1-o).join("."),e.cookie="".concat(t,"=true;domain=").concat(r,";path=/;sameSite=strict;secure");return e.cookie="".concat(t,"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=").concat(r,";path=/;sameSite=strict;secure"),r},N=function(){function e(t,r){var n=this;this.storageKeys=t,this.useCookies=r,this.getCookieData=function(){var t=e.getCookie(n.storageKeys.SMARTLOOK_COOKIE);try{return JSON.parse(null!=t?t:"{}")}catch(e){return{}}}}return e.prototype.clearCookies=function(){this.useCookies&&this.removeCookie(this.storageKeys.SMARTLOOK_COOKIE)},e.prototype.getCookieMetadataForProjectKey=function(e){var t;return this.useCookies&&(null!==(t=this.getCookieData()[e])&&void 0!==t?t:null)||null},e.prototype.setCookieProjectMetadata=function(e,t){if(this.useCookies){var r=this.getCookieData();r[e]=t,this.setCookie(this.storageKeys.SMARTLOOK_COOKIE,JSON.stringify(r))}},e.getCookie=function(e){var t=document.cookie.split(";");try{for(var r=0;r<t.length;r+=1){var n=t[r].trim().split("=");if(n[0]===e)return n[1]}}catch(e){}return null},e.getCookieExpirationDate=function(){var e=new Date;return e.setMonth(e.getMonth()+13),e.toUTCString()},e.prototype.removeCookie=function(e){window.document.cookie="".concat(e,"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=").concat(D(document,this.storageKeys.SMARTLOOK_COOKIE_DOMAIN),";path=/")}
2,e.prototype.setCookie=function(t,r){r&&(window.document.cookie="".concat(t,"=").concat(r,";expires=").concat(e.getCookieExpirationDate(),";domain=").concat(D(document,this.storageKeys.SMARTLOOK_COOKIE_DOMAIN),";path=/;sameSite=strict;secure"))},e}(),K=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},B=function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},U="assets",G=function(){function e(){var e=this;this.database=null,this.initializeDatabasePromise=null,this.isDatabaseClosed=!1,this.numberOfUnexpectedCloses=0,this.clearAssetsStore=function(){return K(e,void 0,void 0,function(){var e,t=this;return B(this,function(r){switch(r.label){case 0:return[4,this.initializeIfNeeded()];case 1:if(r.sent(),this.isDatabaseClosed)return[2];r.label=2;case 2:return r.trys.push([2,4,,5]),[4,new Promise(function(e,r){if(t.database)if(t.database.objectStoreNames.contains(U)){var n=t.database.transaction(U,"readwrite").objectStore(U).clear();n.addEventListener("success",function(t){u.R.debug("Success clearing asset store",t),e()}),n.addEventListener("error",function(e){u.R.debug("Error clearing asset store",e),r("Error clearing store")})}else e();else r(new d.f("IndexDB: Database not initialized"))})];case 3:return r.sent(),[3,5];case 4:return e=r.sent(),u.R.debug("Error clearing asset store",e),[3,5];case 5:return[2]}})})},this.clearStorage=function(){return K(e,void 0,void 0,function(){return B(this,function(e){switch(e.label){case 0:return[4,this.clearAssetsStore()];case 1:return e.sent(),[2]}})})},this.getStoredAsset=function(t){return K(e,void 0,void 0,function(){var e,r=this;return B(this,function(n){switch(n.label){case 0:return[4,this.initializeIfNeeded()];case 1:if(n.sent(),this.isDatabaseClosed)return[2,null];n.label=2;case 2:return n.trys.push([2,4,,5]),[4,new Promise(function(e,n){if(r.database)if(r.database.objectStoreNames.contains(U)){var o=r.database.transaction(U,"readonly").objectStore(U).get(t);o.addEventListener("success",function(){u.R.debug("Success reading asset data",o.result),e(o.result)}),o.addEventListener("error",function(e){u.R.debug("Error reading asset data",e),n(new d.f("IndexDB: Error reading data"))})}else e(null);else n(new d.f("IndexDB: Database not initialized"))})];case 3:return[2,n.sent()];case 4:return e=n.sent(),u.R.debug("Error reading asset data",e),[2,null];case 5:return[2]}})})},this.storeAsset=function(t){return K(e,void 0,void 0,function(){var e,r=this;return B(this,function(n){switch(n.label){case 0:return[4,this.initializeIfNeeded()];case 1:if(n.sent(),this.isDatabaseClosed)return[2];if(!this.database)throw new Error("Database not initialized");if(!this.database.objectStoreNames.contains(U))throw new Error("Object store not found");return[4,this.getNumberOfStoredAssets()];case 2:if(n.sent()>=2e3)return u.R.debug("Max number of stored assets reached. Asset will not be stored."),[2];n.label=3;case 3:return n.trys.push([3,5,,6]),[4,new Promise(function(e,n){var o,i=null===(o=r.database)||void 0===o?void 0:o.transaction(U,"readwrite"),a=null==i?void 0:i.objectStore(U),s=null==a?void 0:a.put(t);null==s||s.addEventListener("success",function(t){u.R.debug("Success writing asset data",t),e()}),null==s||s.addEventListener("error",function(t){var o,i;u.R.debug("Error writing asset data",t),"QuotaExceededError"===(null===(o=s.error)||void 0===o?void 0:o.name)&&(u.R.debug("QuotaExceededError occurred while writing data. Asset will not be stored and store will be cleared."),r.clearAssetsStore()),"DataCloneError"===(null===(i=s.error)||void 0===i?void 0:i.name)&&s.error.message.includes("BlobURLs are not yet supported.")&&e(),n(new d.f("IndexDB: Error writing data"))})})];case 4:return n.sent(),[3,6];case 5:return e=n.sent(),u.R.debug("Error writing asset data",e),[3,6];case 6:return[2]}})})},this.getNumberOfStoredAssets=function(){return K(e,void 0,void 0,function(){var e,t=this;return B(this,function(r){switch(r.label){case 0:return[4,this.initializeIfNeeded()];case 1:if(r.sent(),this.isDatabaseClosed)return[2,0];r.label=2;case 2:return r.trys.push([2,4,,5]),[4,new Promise(function(e,r){if(t.database)if(t.database.objectStoreNames.contains(U)){var n=t.database.transaction(U,"readonly").objectStore(U).count();n.addEventListener("success",function(){u.R.debug("Success reading asset store size",n.result),e(n.result)}),n.addEventListener("error",function(e){u.R.debug("Error reading asset store size",e),r(new d.f("IndexDB: Error reading store size"))})}else e(0);else r(new d.f("IndexDB: Database not initialized"))})];case 3:return[2,r.sent()];case 4:return e=r.sent(),u.R.debug("Error reading asset store size",e),[2,0];case 5:return[2]}})})}}return e.prototype.initializeIfNeeded=function(){return K(this,void 0,void 0,function(){var e,t,r=this;return B(this,function(n){switch(n.label){case 0:if(this.numberOfUnexpectedClose
2s>5||this.isDatabaseClosed)return this.isDatabaseClosed=!0,[2];if(this.database)return[2];if(!this.initializeDatabasePromise)return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),e=this,[4,this.initializeDatabasePromise];case 2:return e.database=n.sent(),[3,4];case 3:return n.sent(),this.isDatabaseClosed=!0,[3,4];case 4:return[2];case 5:this.initializeDatabasePromise=new Promise(function(e,t){var n=indexedDB.open("smartlook_internal_db",1);n.addEventListener("error",function(e){u.R.debug("Error occurred while opening IndexedDB database. IndexedDB is not available.",e),t(new d.f("IndexDB: Error occurred while opening IndexedDB database. IndexedDB is not available."))}),n.addEventListener("success",function(t){u.R.debug("IndexedDB database opened successfully.",t);var o=n.result;o.addEventListener("close",function(){r.numberOfUnexpectedCloses+=1,r.database=null,r.initializeDatabasePromise=null}),e(o)}),n.addEventListener("upgradeneeded",function(e){u.R.debug("IndexedDB database upgrade needed.",e);var t=n.result;t.objectStoreNames.contains(U)||t.createObjectStore(U,{keyPath:"url"})})}),n.label=6;case 6:return n.trys.push([6,8,,9]),t=this,[4,this.initializeDatabasePromise];case 7:return t.database=n.sent(),[3,9];case 8:return n.sent(),this.isDatabaseClosed=!0,[2];case 9:return[2]}})})},e}(),F=function(e){var t=null;try{t=window.localStorage.getItem(e)}catch(e){}return t},z=function(e,t){try{return window.localStorage.setItem(e,t),!0}catch(e){return!1}},J=function(e){try{window.localStorage.removeItem(e)}catch(e){}},H=function(){return H=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},H.apply(this,arguments)},W=function(){function e(e,t){var r=this;this.projectKey=e,this.storageKeys=t,this.getLocalStorageData=function(){var e=F(r.storageKeys.SMARTLOOK_LS);try{return JSON.parse(null!=e?e:"{}")}catch(e){return{}}},this.getLocalStorageProjectMetadata=function(e){var t;return null!==(t=r.getLocalStorageData()[e])&&void 0!==t?t:null},this.removeFromLocalStorageProjectMetadata=function(e,t){var n=r.getLocalStorageData();n[e]&&(delete n[e][t],z(r.storageKeys.SMARTLOOK_LS,JSON.stringify(n)))},this.updateLocalStorageProjectMetadata=function(e,t){var n=r.getLocalStorageData();n[e]=H(H({},n[e]),t),z(r.storageKeys.SMARTLOOK_LS,JSON.stringify(n))}}return e.prototype.clearLocalStorage=function(){J(this.storageKeys.SMARTLOOK_LS),J(this.storageKeys.SMARTLOOK_BAN_REASON),J(this.storageKeys.SMARTLOOK_BAN_EXPIRE),J(this.storageKeys.SMARTLOOK_DEBUG),J(this.storageKeys.SMARTLOOK_LS_GLOBAL_PROPERTIES)},e.prototype.getBanExpire=function(){return F(this.storageKeys.SMARTLOOK_BAN_EXPIRE)},e.prototype.getBanReason=function(){return F(this.storageKeys.SMARTLOOK_BAN_REASON)},e.prototype.getGlobalProperties=function(){var e=F(this.storageKeys.SMARTLOOK_LS_GLOBAL_PROPERTIES);if(e)try{var t=JSON.parse(e);return t.projectKey!==this.projectKey?{}:t.props}catch(e){u.R.warnNoConsole("Cannot get global properties from local storage.",e)}return{}},e.prototype.getLocalStorageMetadataForProjectKey=function(e){var t=this.getLocalStorageProjectMetadata(e);return t?{sessionId:t.sessionId,visitorId:t.visitorId}:null},e.prototype.getQueuedChunks=function(){var e=F(this.storageKeys.SMARTLOOK_LS_QUEUED_CHUNKS);if(e)try{var t=JSON.parse(e);if(Array.isArray(t))return t}catch(e){u.R.warnNoConsole("Cannot get queued chunk from local storage.",e)}return null},e.prototype.getSetupRetryAfterExpire=function(){var e,t=this.getLocalStorageProjectMetadata(this.projectKey);return null!==(e=null==t?void 0:t.setupRetryAfter)&&void 0!==e?e:null},e.prototype.getSetupRetryAfterExpireReason=function(){var e,t=this.getLocalStorageProjectMetadata(this.projectKey);return null!==(e=null==t?void 0:t.setupRetryAfterReason)&&void 0!==e?e:null},e.prototype.isRecorderInDebugMode=function(){return Boolean(F(this.storageKeys.SMARTLOOK_DEBUG))},e.prototype.queueChunkToSend=function(e){var t=F(this.storageKeys.SMARTLOOK_LS_QUEUED_CHUNKS),r=[];if(t)try{var n=JSON.parse(t);Array.isArray(n)&&r.push.apply(r,function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}([],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(n),!1))}catch(e){u.R.warnNoConsole("Cannot parse queued chunk from local storage.",e)}return r.push(e),z(this.storageKeys.SMARTLOOK_LS_QUEUED_CHUNKS,JSON.stringify(r))},e.prototype.removeBanExpire=function(){J(this.storageKeys.SMARTLOOK_BAN_EXPIRE)},e.prototype.removeBanReason=function(){J(this.storageKeys.SMARTLOOK_BAN_REASON)},e.prototype.removeQueuedChunks=function(){J(this.storageKeys.SMARTLOOK_LS_QUEUED_CHUNKS)},e.prototype.removeSetupAfterExpire=function(){this.removeFromLocalStorageProjectMetadata(this.projectKey,"setupRetryAfter")},e.prototype.removeSetupAfterExpireReason=function(){this.removeFromLocalStorageProjectMetadata(this.projectKey,"setupRetryAfterReason")},e.prototype.setBanExpire=function(e){z(this.storageKeys.SMARTLOOK_BAN_EXPIRE,e)},e.prototype.setBanReason=function(e){z(this.storageKeys.SMARTLOOK_BAN_REASON,e)},e.prototype.setGlobalProperties=function(e){var t={projectKey:this.projectKey,props:e};z(this.storageKeys.SMARTLOOK_LS_GLOBAL_PROPERTIES,JSON.stringify(t))},e.prototype.setLocalStorageProjectMetadata=function(e,t){this.updateLocalStorageProjectMetadata(e,t)},e.prototype.setSetupRetryAfter=function(e){this.updateLocalStorageProjectMetadata(this.projectKey,{setupRetryAfter:e})},e.prototype.setSetupRetryAfterReason=function(e){this.updateLocalStorageProjectMetadata(this.projectKey,{setupRetryAfterReason:e})},e}(),q=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},V=function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},Q=function(){function e(e){var t=e.projectKey,r=e.storageKeys,n=e.useCookies,o=this;
2this.getStoredAsset=function(e){return q(o,void 0,void 0,function(){return V(this,function(t){return[2,this.idbStorageManager.getStoredAsset(e)]})})},this.storeAsset=function(e){return q(o,void 0,void 0,function(){return V(this,function(t){return[2,this.idbStorageManager.storeAsset(e)]})})},this.cookieManager=new N(r,n),this.localStorageManager=new W(t,r),this.idbStorageManager=new G}return e.prototype.clearAssetsStore=function(){return q(this,void 0,void 0,function(){return V(this,function(e){switch(e.label){case 0:return[4,this.idbStorageManager.clearAssetsStore()];case 1:return e.sent(),[2]}})})},e.prototype.clearStorage=function(){this.localStorageManager.clearLocalStorage(),this.cookieManager.clearCookies(),this.idbStorageManager.clearStorage()},e.prototype.getBanExpire=function(){return this.localStorageManager.getBanExpire()},e.prototype.getBanReason=function(){return this.localStorageManager.getBanReason()},e.prototype.getCookieMetadataForProjectKey=function(e){return this.cookieManager.getCookieMetadataForProjectKey(e)},e.prototype.getGlobalProperties=function(){return this.localStorageManager.getGlobalProperties()},e.prototype.getLocalStorageMetadataForProjectKey=function(e){return this.localStorageManager.getLocalStorageMetadataForProjectKey(e)},e.prototype.getQueuedChunks=function(){return this.localStorageManager.getQueuedChunks()},e.prototype.getSetupRetryAfterExpire=function(){return this.localStorageManager.getSetupRetryAfterExpire()},e.prototype.getSetupRetryAfterExpireReason=function(){return this.localStorageManager.getSetupRetryAfterExpireReason()},e.prototype.isRecorderInDebugMode=function(){return this.localStorageManager.isRecorderInDebugMode()},e.prototype.queueChunkToSend=function(e){return this.localStorageManager.queueChunkToSend(e)},e.prototype.removeBanExpire=function(){this.localStorageManager.removeBanExpire()},e.prototype.removeBanReason=function(){this.localStorageManager.removeBanReason()},e.prototype.removeQueuedChunks=function(){this.localStorageManager.removeQueuedChunks()},e.prototype.removeSetupAfterExpire=function(){this.localStorageManager.removeSetupAfterExpire()},e.prototype.removeSetupAfterExpireReason=function(){this.localStorageManager.removeSetupAfterExpireReason()},e.prototype.setBanExpire=function(e){this.localStorageManager.setBanExpire(e)},e.prototype.setBanReason=function(e){this.localStorageManager.setBanReason(e)},e.prototype.setGlobalProperties=function(e){this.localStorageManager.setGlobalProperties(e)},e.prototype.setMetadata=function(e,t){this.cookieManager.setCookieProjectMetadata(e,t),this.localStorageManager.setLocalStorageProjectMetadata(e,t)},e.prototype.setSetupRetryAfter=function(e){this.localStorageManager.setSetupRetryAfter(e)},e.prototype.setSetupRetryAfterReason=function(e){this.localStorageManager.setSetupRetryAfterReason(e)},e}(),Y=function(){function e(){}return e.prototype.getServerTime=function(){if(void 0===this.lastServerTime||void 0===this.relativeTimeSinceLastServerTimeSet)throw new d.f("Server time is undefined",{additionalData:{lastServerTime:this.lastServerTime,relativeTimeSinceLastServerTimeSet:this.relativeTimeSinceLastServerTimeSet},shouldReport:!0});return new Date(this.lastServerTime.getTime()+performance.now()-this.relativeTimeSinceLastServerTimeSet)},e.prototype.getServerTimestamp=function(){return this.getServerTime().getTime()},e.prototype.setServerTime=function(e){this.lastServerTime=new Date(e),this.relativeTimeSinceLastServerTimeSet=performance.now()},e}(),X=function(){var e=this;this.scrollPositionsByElement=new WeakMap,this.getPosition=function(t){return e.scrollPositionsByElement.get(t)},this.setPosition=function(t,r){e.scrollPositionsByElement.set(t,r)}},$=o(831),Z=function(){return Z=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Z.apply(this,arguments)},ee=function(){function e(e){this.persistentStorageManager=e.persistentStorageManager}return e.prototype.clear=function(){this.persistentStorageManager.setGlobalProperties({})},e.prototype.getProperties=function(){return this.persistentStorageManager.getGlobalProperties()},e.prototype.updateProperties=function(e){var t=Z(Z({},this.getProperties()),e);this.persistentStorageManager.setGlobalProperties((0,$.e)(t,$.w.PROPERTIES))},e}(),te=function(){return te=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},te.apply(this,arguments)},re=function(){function e(){this.properties={}}return e.prototype.clear=function(){this.properties={}},e.prototype.getProperties=function(){return this.properties},e.prototype.updateProperties=function(e){var t=te(te({},this.properties),e);this.properties=(0,$.e)(t,$.w.PROPERTIES)},e}(),ne=function(){function e(e,t,r,n){var o=this;if(this.persistentStorageManager=e,this.startRecording=t,this.stopRecording=r,this.config=n,this.isRecordingStopped=!1,this.isAppliedBan(!0)){var i=this.persistentStorageManager.getBanExpire();if(i){var a=Number.parseInt(i,10)-Date.now();a>
20&&(u.R.debug("BAN is applied. Waiting ".concat(a,"ms.")),this.banTimeoutId=setTimeout(function(){o.banTimeoutId=void 0,o.startRecording()},a))}}}return e.prototype.applyBan=function(e){var t=this;if("hidden"!==document.visibilityState)if(this.config.isCrossOriginIframeMode){if(u.R.debug("Ban is not applied. Cross-origin mode detected."),!this.isRecordingStopped)try{this.stopRecording()}catch(e){}finally{this.isRecordingStopped=!0}}else{e.shouldReport&&(u.R.warnNoConsole('Applying ban. Reason: "'.concat(e.message,'".'),e),u.R.warn('Applying ban. Reason: "'.concat(e.message,'".'),e));var r=Date.now()+this.config.banTime;if(this.persistentStorageManager.setBanExpire(r.toString()),this.persistentStorageManager.setBanReason(e.message),void 0===this.banTimeoutId){if(!this.isRecordingStopped)try{this.stopRecording()}catch(e){}finally{this.isRecordingStopped=!0}}else clearTimeout(this.banTimeoutId);this.banTimeoutId=setTimeout(function(){t.banTimeoutId=void 0;try{t.startRecording()}catch(t){u.R.error("Cannot start recording after BAN expired",t,{banReason:e.message})}},this.config.banTime)}},e.prototype.clearBanIfApplied=function(){this.persistentStorageManager.removeBanExpire(),this.persistentStorageManager.removeBanReason(),this.banTimeoutId&&clearTimeout(this.banTimeoutId)},e.prototype.getBanReason=function(){var e;return null!==(e=this.persistentStorageManager.getBanReason())&&void 0!==e?e:""},e.prototype.isAppliedBan=function(e){if(void 0===e&&(e=!1),!e)return void 0!==this.banTimeoutId;var t=this.persistentStorageManager.getBanExpire();return!!(t&&Number.parseInt(t,10)>Date.now())||(this.persistentStorageManager.removeBanExpire(),this.persistentStorageManager.removeBanReason(),!1)},e}(),oe=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},ie=function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},ae=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},se=window.parent===window.top?1e4:11e3,ce=function(e){var t=this;this.projectKey=e,this.discoveredIframeWindows=new Set,this.eventListenersByEventType=new Map,this.isClosed=!1,this.pendingEventsByMessageEventSource=new Map,this.waitingListenersByEventType=new Map,this.waitingListenersByEventTypeByMessageEventSource=new Map,this.addPostMessageEventListener=function(e,r){var n=t.eventListenersByEventType.get(e);n?n.push(r):t.eventListenersByEventType.set(e,[r])},this.broadcastEventToAllDiscoveredIframes=function(e){t.discoveredIframeWindows.forEach(function(t){t.postMessage(e,"*")})},this.clearDiscoveredIframeWindows=function(){t.discoveredIframeWindows.
2clear()},this.close=function(){t.isClosed=!0},this.isTherePendingEvent=function(e,r){var n,o=t.pendingEventsByMessageEventSource.get(r);if(o){var i=(null!==(n=o.get(e))&&void 0!==n?n:[]).filter(function(t){return t.name===e});if(i.length>0)return i.length>1&&u.R.warn("Received multiple events. Taking first received."),!0}return!1},this.sendEventToSource=function(e,t){u.R.debug("Sending ".concat(e.name," event to different source."),e),t.postMessage(e,"*")},this.waitForEventFromAnySource=function(e){return oe(t,void 0,void 0,function(){var t,r,n,o,i,a,s,c,l,d,f;return ie(this,function(p){switch(p.label){case 0:try{for(t=ae(this.pendingEventsByMessageEventSource.values()),r=t.next();!r.done;r=t.next())if(n=r.value,o=null!==(f=n.get(e))&&void 0!==f?f:[],(i=o.filter(function(t){return t.name===e})).length>0)return i.length>1&&u.R.warn("Received multiple events. Taking first received."),n.set(e,o.filter(function(t){return t.name!==e})),[2,i[0]]}catch(e){l={error:e}}finally{try{r&&!r.done&&(d=t.return)&&d.call(t)}finally{if(l)throw l.error}}return void 0===(a=this.waitingListenersByEventType.get(e))&&(a=[],this.waitingListenersByEventType.set(e,a)),[4,new Promise(function(e){a&&(s=e,a.push(e))})];case 1:return c=p.sent(),s&&(u.R.debug('Removing event listener for "'.concat(e,'".')),this.waitingListenersByEventType.set(e,a.filter(function(e){return e!==s}))),[2,c]}})})},this.waitForEventFromSource=function(e,r){return oe(t,void 0,void 0,function(){var t,n,o,i,a,s;return ie(this,function(c){switch(c.label){case 0:return(t=this.pendingEventsByMessageEventSource.get(r))&&(n=null!==(s=t.get(e))&&void 0!==s?s:[],(o=n.filter(function(t){return t.name===e})).length>0)?(o.length>1&&u.R.warn("Received multiple events. Taking first received."),t.set(e,n.filter(function(t){return t.name!==e})),[2,o[0]]):(void 0===(i=this.waitingListenersByEventTypeByMessageEventSource.get(r))&&(i=new Map,this.waitingListenersByEventTypeByMessageEventSource.set(r,i)),[4,new Promise(function(t){if(void 0===i)throw new d.f("listenersByWindow is undefined");i.set(e,t)})]);case 1:return a=c.sent(),i.delete(e),[2,a]}})})},this.waitForEventFromSourceOrThrowAfterGivenTime=function(e,r,n){void 0===n&&(n=se);var o=t.waitForEventFromSource(e,r),i=new Promise(function(t,r){setTimeout(function(){r(new R.t("Could not retrieve event ".concat(e," in given time (").concat(n,"ms)."),{shouldReport:!1}))},n)});return Promise.race([o,i])},this.postMessageEventListener=function(e){var r,n;if(j.Q(e)){var o=e.data;if((0,m.GX)(o)&&e.source){var i=e.source;if(o.key!==t.projectKey)return void u.R.debug("Received event with different key.",e);(0,m.MG)(o)&&!t.isClosed&&(u.R.debug("Received discovery. Sending discovered response",e),t.sendEventToSource({name:m.g4.DISCOVERED,key:t.projectKey,sessionId:window.smartlook.sessionId},i)),(0,m.o7)(o)&&!t.isClosed&&(u.R.debug("Received discovered. Sending acknowledged response",e),t.sendEventToSource({name:m.g4.ACKNOWLEDGED,key:t.projectKey},i),t.discoveredIframeWindows.add(e.source));var a=t.eventListenersByEventType.get(o.name);if(a){u.R.debug("Found listeners for event - ".concat(e.data.name,"."),e);try{for(var s=ae(a),c=s.next();!c.done;c=s.next())(0,c.value)(e.data)}catch(e){r={error:e}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}}var l=t.waitingListenersByEventTypeByMessageEventSource.get(e.source);if(l){var d=l.get(o.name);d&&(u.R.debug("Found waiting listener for event - ".concat(o.name,".")),d(o))}var f=t.waitingListenersByEventType.get(o.name);if(f&&f.length>0&&(u.R.debug("Found waiting listener from any source for event - ".concat(o.name,".")),f.forEach(function(e){return e(o)})),l||a||f&&f.length>0)return;u.R.debug("No pending listener found for ".concat(o.name,"."));var p=t.pendingEventsByMessageEventSource.get(e.source);if(p){var g=p.get(o.name);g?(g.push(o),p.set(o.name,g)):p.set(o.name,[o])}else{var h=new Map([[o.name,[o]]]);t.pendingEventsByMessageEventSource.set(e.source,h)}}}},window.addEventListener("message",this.postMessageEventListener)},ue=function(e){var t=this;this.persistentStorageManager=e,this.applyRetryAfter=function(e){var r=Date.now()+1e3*e;t.persistentStorageManager.setSetupRetryAfter(r.toString())},this.getAppliedRetryAfterReason=function(){return t.persistentStorageManager.getSetupRetryAfterExpireReason()},this.isAppliedRetryAfter=function(){var e=t.persistentStorageManager.getSetupRetryAfterExpire();return e&&Number.parseInt(e,10)>Date.now()?!(Number.parseInt(e,10)-Date.now()>6048e5&&(u.R.errorNoConsole("Value of `setupRetryAfterExpire` is greater than one week. Ignoring it.",{currentTime:Date.now(),currentTimeISO:(new Date).toISOString(),setupRetryAfterExpire:e}),t.removeRetryAfterValues(),1)):(t.removeRetryAfterValues(),!1)},this.removeRetryAfterValues=function(){t.persistentStorageManager.removeSetupAfterExpireReason(),t.persistentStorageManager.removeSetupAfterExpire()},this.setAppliedRetryAfterReason=function(e){t.persistentStorageManager.setSetupRetryAfterReason(e)}},le=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},de=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},fe=function(e,t,r){for(var n=[],o=3;o<arguments.length;o++)n[o-3]=arguments[o];return a=function(){var o,i,a,s,c,l,f,p,g,h,y,v,b;return function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}(this,function(w){switch(w.label){case 0:if(w.trys.push([0,24,,25]),r&&r.isCrossOriginIframeMode&&("string"!=typeof e||["track","properties","navigation","error"].includes(e)||console.debug("Smartlook is loaded in iframe. Calling '".concat(e,"' API in iframe is disabled. Please call it in parent page."))),"finish"===e)return o=n,window.smartlook.recorder?(a=window.smartlook.recorder).finishAllQueuedTasks.apply(a,de([],le(n),!1)):o[0](),[2];if("stop"===e)return window.smartlook.recorder&&(s=window.smartlook.recorder).stopRecording.apply(s,de([],le(n),!1)),[2];if(t.isAppliedBan())return u.R.warn("Cannot call smartlook API. Session is banned. Reason: ".concat(t.getBanReason(),".")),[2];if(!window.smartlook.recorder)return u.R.warn("Smartlook is not initialized. Cannot call public api."),[2];
2switch(e){case"record":return[3,1];case"resume":return[3,3];case"pause":return[3,5];case"error":return[3,6];case"track":return[3,8];case"navigation":return[3,10];case"disable":return[3,12];case"properties":return[3,16];case"identify":return[3,18];case"anonymize":return[3,20]}return[3,22];case 1:return[4,(c=window.smartlook.recorder).setRecording.apply(c,de([],le(n),!1))];case 2:return w.sent(),[3,23];case 3:return[4,(l=window.smartlook.recorder).resumeRecording.apply(l,de([],le(n),!1))];case 4:return w.sent(),[3,23];case 5:return(f=window.smartlook.recorder).pauseRecording.apply(f,de([],le(n),!1)),[3,23];case 6:return[4,(p=window.smartlook.recorder).logCustomError.apply(p,de([],le(n),!1))];case 7:return w.sent(),[3,23];case 8:return[4,(g=window.smartlook.recorder).logCustomEvent.apply(g,de([],le(n),!1))];case 9:return w.sent(),[3,23];case 10:return[4,(h=window.smartlook.recorder).changeUrl.apply(h,de([],le(n),!1))];case 11:return w.sent(),[3,23];case 12:return!0!==n[0]?[3,13]:(window.smartlook.recorder.pauseRecording(),[3,15]);case 13:return!1!==n[0]?[3,15]:[4,window.smartlook.recorder.resumeRecording()];case 14:w.sent(),w.label=15;case 15:return[3,23];case 16:return[4,(y=window.smartlook.recorder).setCustomEventProperties.apply(y,de([],le(n),!1))];case 17:return w.sent(),[3,23];case 18:return[4,(v=window.smartlook.recorder).identifyVisitor.apply(v,de([],le(n),!1))];case 19:return w.sent(),[3,23];case 20:return[4,(b=window.smartlook.recorder).anonymize.apply(b,de([],le(n),!1))];case 21:return w.sent(),[3,23];case 22:return"function"==typeof e?e():(0,S.o)('"'.concat(e,'" is not recognised by Smartlook. See available APIs at https://web.developer.smartlook.com/docs')),[3,23];case 23:return[3,25];case 24:return(i=w.sent())instanceof d.f&&!i.shouldReport?u.R.warn(i.message):i instanceof Error?console.warn(i.message,i):console.error(JSON.stringify(i)),[3,25];case 25:return[2]}})},new((i=void 0)||(i=Promise))(function(e,t){function r(e){try{o(a.next(e))}catch(e){t(e)}}function n(e){try{o(a.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof i?o:new i(function(e){e(o)})).then(r,n)}o((a=a.apply(void 0,[])).next())});var i,a},pe=function(){return pe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},pe.apply(this,arguments)},ge=function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})},he=function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},ye=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},ve=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))};o.p=null===document.currentScript?window.smartlook.scriptSource+"es6/":window.smartlook.scriptSource+"es5/";var be,we,me,Se,Re,Oe,ke,Ee,Ie,Ae,Te,Me,je=!1,xe=!1,Le=!0,Pe=[],Ce=[],_e=!1,De=!1,Ne=0,Ke=!1,Be=!1,Ue=!1,Ge=performance.now(),Fe=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return ge(void 0,void 0,void 0,function(){var r,n,i,a,s,y,M,j,x,L,P,C,D,N,K,B,U,G,F,z,J,H,W,q,V,$,Z,te,oe,ie,ae,se,le;return he(this,function(de){switch(de.label){case 0:if(window.smartlook._loadInfo=window.smartlook._loadInfo||[],function(e){void 0===window.smartlook._apiCallsHistory&&(window.smartlook._apiCallsHistory=[]),window.smartlook._apiCallsHistory.push(["function"==typeof e?"function":e,performance.now()-Ge]),window.smartlook._apiCallsHistory.length>15&&window.smartlook._apiCallsHistory.shift()}(e),window.navigator.userAgent.includes("BingPreview")||window.navigator.userAgent.includes("adidxbot")||window.navigator.userAgent.includes("Bingbot"))return(0,S.o)("Smartlook is disabled. Bot detected."),[2];if("init"===e&&Ne<1||"reinit"===e){if(Me=t[0],Te=null!==(te=t[1])&&void 0!==te?te:{},"string"==typeof Me&&(Me=Me.trim()),void 0===Me||"string"==typeof Me&&0===Me.length)return window.smartlook._loadInfo.push("Initialization unsuccessful. Project key is empty."),(0,S.o)("Smartlook could not be initialized. Provided project key is empty."),"reinit"===e&&(Ke=!1),[2];if(Ae=function(e,t,r){var n=Object.assign(w,v(v({},r),{projectKey:e,recorderVersion:"v1.93.16"}));if(r.host){n.managerHost=n.host;var o=h.c(r.host);(!o.host.endsWith("smartlook.cloud")&&!o.host.endsWith("smartlook.com")||o.host.endsWith("smartlook.cloud")&&o.host.includes("relay-proxy"))&&(n.managerHost=h.c(o.toString(),"/manager").toString(),n.isRelayProxy=!0)}else if(r.region){var i=b[r.region];if(void 0===i)throw new Error("Unknown region");n.host=i,n.managerHost=i}return"f2353f89c956e0b7a93a0ab1b5cfbf01725acab2"===e&&(n.host=b.us,n.managerHost=b.us),"5efe4ef82cf
2c817c84e66ce5fedee783e1af2acd"===e&&(n.packAssets=!0),n.packAssetsToRecording&&(n.packAssets={fonts:!0,images:!0,styles:!0}),["b0375d591e85b0affec1d581bfed3c760cb8c56d","ff68798c802965f6c79ab4a4f317fe02e778c847","263616316fc439f9ca1bfc939d7841ab0b310a19","57cac5996e97c209eb339793b7a1977c2ee9177d","2a5a223d674a1920334b75bb26b7a13ad2662dc3","f90c858c4670dc0d26743247a5a842e45f625f2d","22393f4f77a5629fcee1766cdb311183bd9332a7","1a9ce36284f2e7f3ddb8f853484dae73d2707f21","4ee6fddab7cd9a55effe0c9a551016d185ff2393","4c418d9e2b73aca33edceec3576791e207169cf3","aa14696252590ac72b8a32101b9b837430bfda56","cfd7a3e7a1f60352c1ffd4f7d0e01de2ec213c41","440ecd8e7f6c4e28524a6cdab4488a192187ba55","cce039e0a58a23378404b872c2c30a82c6e7753e","64a50e39976c60bbca1bb94ba3b3e2fe7b68b54b"].includes(e)&&(n.fallbackToAlternativeIds=!0),"051840f3c6e4c1a4fa02caacfbb89b05dc201643"===e&&(n.standalone=!0),n}(Me,0,null!=Te?Te:{}),!Ae.enableRecordingOfAutomationFrameworks&&navigator.webdriver)return window.smartlook._loadInfo.push("Initialization unsuccessful. Automation framework is detected."),(0,S.o)("Smartlook is stopped. Automation framework is detected."),[2];if(!Ue){!function(e){Object.defineProperties(window.smartlook,{_debugData:{get:function(){var t;try{return void 0===window.smartlook.recorderClass&&I()&&A(e.projectKey)&&window.parent&&window.parent.smartlook?window.parent.smartlook._debugData:null===(t=window.smartlook.recorder)||void 0===t?void 0:t.debugData}catch(e){u.R.debug("Cannot get _debugData: ".concat(e))}}},isIframeModeEnabled:{get:function(){return e.isCrossOriginIframeMode||void 0===window.smartlook.recorderClass&&I()&&A(e.projectKey)}},key:{get:function(){try{return e.projectKey}catch(e){u.R.debug("Cannot get key: ".concat(e))}}},playUrl:{get:function(){var t;try{return void 0===window.smartlook.recorderClass&&I()&&A(e.projectKey)&&window.parent&&window.parent.smartlook?window.parent.smartlook.playUrl:null===(t=window.smartlook.recorder)||void 0===t?void 0:t.playUrl}catch(e){u.R.debug("Cannot get playUrl: ".concat(e))}}},recordId:{get:function(){var t;try{return void 0===window.smartlook.recorderClass&&I()&&A(e.projectKey)&&window.parent&&window.parent.smartlook?window.parent.smartlook.recordId:null===(t=window.smartlook.recorder)||void 0===t?void 0:t.recordId}catch(e){u.R.debug("Cannot get recordId: ".concat(e))}}},sessionId:{get:function(){var t;try{return void 0===window.smartlook.recorderClass&&I()&&A(e.projectKey)&&window.parent&&window.parent.smartlook?window.parent.smartlook.sessionId:null===(t=window.smartlook.recorder)||void 0===t?void 0:t.sessionId}catch(e){u.R.debug("Cannot get sessionId: ".concat(e))}}},version:{get:function(){return e.recorderVersion}},visitorId:{get:function(){var t;try{return void 0===window.smartlook.recorderClass&&I()&&A(e.projectKey)&&window.parent&&window.parent.smartlook?window.parent.smartlook.visitorId:null===(t=window.smartlook.recorder)||void 0===t?void 0:t.visitorId}catch(e){u.R.debug("Cannot get visitorId: ".concat(e))}}}})}(Ae),_e||(r=function(e,t){var r,n=new Q({projectKey:e.projectKey,storageKeys:e.storageKeys,useCookies:e.cookies}),o=new Y,i=new X,a=e.persistentGlobalEventProperties?new ee({persistentStorageManager:n}):new re,s=new ne(n,function(){return window.smartlook("reinit",e.projectKey,t)},function(){return window.smartlook("stop")},e);e.externalLogging&&(r=new _(e.projectKey,e.managerHost,e.uploadInterval,e.recorderVersion,function(){e.userId;var t,r,n,o,i=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["userId"]);return{apiCallHistory:window.smartlook._apiCallsHistory,config:i,playUrl:null!==(t=window.smartlook.playUrl)&&void 0!==t?t:"unknown",recordId:null!==(r=window.smartlook.recordId)&&void 0!==r?r:"unknown",sessionId:null!==(n=window.smartlook.sessionId)&&void 0!==n?n:"unknown",visitorId:null!==(o=window.smartlook.visitorId)&&void 0!==o?o:"unknown"}})),!0!==window.smartlook.silent&&u.R.setLoggingLevel(n.isRecorderInDebugMode()?"debug":e.loggingLevel);var c=new ce(e.projectKey);return r&&u.R.setMiddleware(r.sendLog),{banService:s,persistentStorageManager:n,postMessageService:c,propertiesManager:a,scrollManager:i,setupRetryAfterService:new ue(n),timeManager:o}}(Ae,Te),Oe=r.persistentStorageManager,ke=r.propertiesManager,Se=r.banService,Ee=r.timeManager,Ie=r.scrollManager,me=r.postMessageService,Re=r.setupRetryAfterService,_e=!0),Ue=!0,n=Oe.getQueuedChunks();try{n&&function(e){0!==e.length&&requestIdleCallback(function(){var t,r,n=function(e){var t,r,n=new FormData;try{for(var o=(t=void 0,k(Object.entries(e.apiData))),i=o.next();!i.done;i=o.next()){var a=E(i.value,2),s=a[0],c=a[1],l=JSON.stringify(c);n.append(s,l)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}u.R.debug("Writing queued chunk.",{chunk:e}),(0,g.Wo)({formData:n,isFromPreviousRecord:!0,recordId:e.apiData.recordData.id,sessionId:e.apiData.sessionData.id,visitorId:e.apiData.visitorData.id,writerHost:e.writerHost}).catch(function(t){u.R.debug("Writing queued chunk failed.",{chunk:e,error:t})})};try{for(var o=k(e),i=o.next();!i.done;i=o.next())n(i.value)}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}})}(n)}catch(e){u.R.errorNoConsole("Sending queued chunks failed.")}finally{Oe.removeQueuedChunks()}}}return Me&&I()?(u.R.debug("Smartlook loaded in parent window."),je?(u.R.debug("Smartlook is already initialized in iframe. No API calls will be proxied."),[3,4]):[3,1]):[3,4];case 1:return A(Me)?(u.R.debug("Detected smartlook in parent window. API calls 'navigate', 'track', 'properties', 'navigation' and 'error' will be proxied there. All the other will be silently ignored."),"string"==typeof e&&["track","properties","navigation","error"].includes(e)?(u.R.debug("Sending API call ".concat(e," to parent window.")),[2,null===(oe=window.parent)||void 0===oe?void 0:oe.smartlook.apply(oe,ve([e],ye(t),!1))]):"init"===e?(u.R.debug("Smartlook in parent window is initialized and records to same project."),i=ve([],ye(Ce),!1),Ce=[],queueMicrotask(function(){i.forEac
2h(function(e){var t=ye(e,3),r=t[0],n=t[1],o=t[2];Fe.apply(void 0,ve([r],ye(o),!1)).finally(n)})}),[2]):(console.debug("Smartlook is loaded in same-origin iframe. Calling '".concat(e,"' API in iframe is disabled. Please call it in parent page.")),[2])):[3,2];case 2:return"init"!==e?[3,4]:(u.R.debug("Waiting for smartlook in parent window to initialize."),[4,(ze=void 0,Je=function(){var e;return function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}(this,function(t){switch(t.label){case 0:return[4,new Promise(function(t){e=setInterval(function(){var r,n;void 0!==(null===(n=null===(r=window.parent)||void 0===r?void 0:r.smartlook)||void 0===n?void 0:n.key)&&(void 0!==e&&(clearInterval(e),e=void 0),t())},100)})];case 1:return t.sent(),[2]}})},new(ze||(ze=Promise))(function(e,t){function r(e){try{o(Je.next(e))}catch(e){t(e)}}function n(e){try{o(Je.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof ze?o:new ze(function(e){e(o)})).then(r,n)}o((Je=Je.apply(void 0,[])).next())}))]);case 3:if(de.sent(),A(Me))return u.R.debug("Smartlook in parent window is initialized and records to same project."),a=ve([],ye(Ce),!1),Ce=[],queueMicrotask(function(){a.forEach(function(e){var t=ye(e,3),r=t[0],n=t[1],o=t[2];Fe.apply(void 0,ve([r],ye(o),!1)).finally(n)})}),[2];u.R.debug("Smartlook in parent window is initialized but records to different project."),de.label=4;case 4:return"visitor_blocked"!==we||!Ae||"identify"!==e||Be?[3,6]:(Be=!0,s=ye(t,1),"string"!=typeof(y=s[0])&&"number"!=typeof y||"string"==typeof y&&!y?((0,S.o)("Invalid user id passed to smartlook('identify', ...). Received: ".concat(y)),Be=!1,[2]):(M=new Promise(function(r){Ce.unshift([e,r,t]),Ce.unshift.apply(Ce,ve([],ye(Pe),!1))}).finally(function(){Be=!1}),void 0===Me||void 0===Te?(u.R.error("Cannot run reinit. Project key or init options are not defined.",{initOptions:Te,projectKey:Me}),[2]):[4,Fe("reinit",Me,pe(pe({},Te),{userId:String(y)}))]));case 5:return de.sent(),[2,M];case 6:return["init","finish","reinit"].includes(e)||je&&!Ke?"init"!==e&&"reinit"!==e?[3,31]:void 0===Ae?(u.R.warn("Config is undefined."),[2]):("reinit"===e&&(Ke=!0),"init"===e&&(Ne+=1),Ne>1?("string"==typeof(j=t[0])&&j.trim()!==Ae.projectKey?(window.smartlook._loadInfo.push("Initialization unsuccessful. Init API called twice with different project keys."),(0,S.o)("Smartlook init method called twice with different project keys (".concat(Ae.projectKey,", ").concat(j.trim(),")."))):(window.smartlook._loadInfo.push("Initialization unsuccessful. Init called twice."),u.R.debug("Init called ".concat(Ne,"x times. Skipping initialization."))),"reinit"===e&&(Ke=!1),[2]):(u.R.debug("Init called."),x=t[2],Se.isAppliedBan()?(window.smartlook._loadInfo.push("Initialization unsuccessful. BAN applied - ".concat(Se.getBanReason())),u.R.debug("BAN is applied. Initialization is postponed."),x&&x(),"reinit"===e&&(Ke=!1),[2]):(l.wp()||Ae.standalone)&&Ae.startRecordingAfterUserActivity?(window.smartlook._loadInfo.push("Initialization waiting for user activity. Start: ".concat(Date.now())),[4,(0,T.j)(me)]):[3,8])):[2,new Promise(function(r){Ce.push([e,r,t])})];case 7:de.sent(),window.smartlook._loadInfo.push("Initialization continues. User activity detected. Start: ".concat(Date.now())),de.label=8;case 8:return Ce.length>0&&"anonymize"===Ce[0][0]&&(window.smartlook._loadInfo.push("Anonymize called straight after init. Clearing storage."),u.R.debug("Anonymize called straight after init. Clearing storage."),Oe.clearStorage(),Ce.shift()),l.wp()||l.NM()||null===window.parent||Ae.standalone?[3,12]:(Se.clearBanIfApplied(),[4,(He=Ae,We=window.parent,ge(void 0,void 0,void 0,function(){var e;return he(this,function(t){switch(t.label){case 0:u.R.debug("Sending discovered event to parent window event.",window.location.href),me.sendEventToSource({name:m.g4.DISCOVERED,key:He.projectKey,sessionId:void 0},window.parent),t.label=1;case 1:return t.trys.push([1,4,,5]),u.R.debug("Waiting for acknowledged event from parent.",window.location.href),[4,me.waitForEventFromSourceOrThrowAfterGivenTime(m.g4.ACKNOWLEDGED,window.parent)];case 2:return t.sent(),(0,T.j)().then(function(){void 0!==Ae&&(u.R.debug("Sending user activity event to parent.",window.location.href),me.sendEventToSource({name:m.g4.USER_ACTIVITY,key:Ae.projectKey},window.parent))}),u.R.debug("Waiting for start recording event from parent.",window.location.href),[4,me.waitForEventFromSource(m.g4.START_RECORDING,We)];case 3:return[2,t.sent()];case 4:return(e=t.sent())instanceof R.t&&(u.R.debug("Could not receive post message in `init`. Timeout exceeded.",window.location.href),me.close()),u.R.warn("Error happened during receiving post message from parent in `init`. Continuing normal recording.",e,window.location.href,document.visibilityState),[3,5];case 5:return[2]}})}))]);case 9:return(c=de.sent())?(Ae.isCrossOriginIframeMode=!0,u.R.debug("Received start recording event",c,window.location.href),u.R.debug("Attaching START_RECORDING event listener.",window.location.href),me.addPostMessageEventListener(m.g4.START_RECORDING,function(e){var t;if(!Ae)throw new d.f("Config is undefined",{shouldReport:!0});Ae.isCrossOriginIframeMode=!0;try{null===(t=window.smartlook.recorder)||void 0===t||t.startRecording(e.sessionId,e.visitorId,e.recordId,e.setupData,void 0,{frameElementId:e.frameElementId,frameMetadata:e.frameMetadata,parentFrameElementId:e.parentFrameElementId,relativeParentTimeStart:e.relativeTime})}catch(e){u.R.errorNoConsole("Coudl not startRecording in cross-origin iframe",e)}}),u.R.debug("Attaching STOP_RECORDING event listener."),me.addPostMessageEventListener(m.g4.STOP_RECORDING,function(){var e;try{null===(e=window.smartlook.recorder)||void 0===e||e.stopRecording()}catch(e){if(e instanceof R.q)return;throw e}}),[3,12]):[3,10];case 10:return[4,(0,T.j)()];case 11:de.sent(),de.label=12;case 12:return window.smartlook._loadInfo.push("Initialization - retrieving active sessions/creating new one."),L=(0,O.f4)(Ae,Oe),P=void 0,C=void 0,D=void 0,N=void 0,K=void 0,void 0!==c?[3,14]:[4,(0,O.vS)(L,Ae,Oe)];case 13:return B=de.sent(),P=B.sessionId,C=B.visitorId,D=f.$(),N=B.sessionTimeRemaining,[3,15];case 14:P=c.sessionId,C=c.visitorId,D=c.recordId,K={frameElementId:c.frameElementId,frameMetadata:c.frameMetadata,parentFrameElementId:c.parentFrameElementId,relativeParentTimeStart:c.relativeTime},de.label=15;case 15:U=void 0,de.label=16;case 16:if(de.trys.push([16,28,29,30]),!Re.isAppliedRetryAfter()||Be)return[3,17];if(V=Re.getAppliedRetryAfterReason(),Le=!1,be="setup call is throttled",we="spamming_visitor",window.smartlook._loadInfo.push("Initialization - spamming visitor."),V)try{(G=JSON.parse(V)).code&&(we=G.code),G.message&&(be=G.message)}catch(e){}return(0,S.o)("Smartlook not recording. Reason: ".concat(be,".")),[3,27];case 17:return window.smartlook._loadInfo.push("Initialization - setup call. Timestamp - ".concat(Date.now())),c?(z={response:void 0,setupData:c.setupData}
2,[3,20]):[3,18];case 18:return[4,(0,g.l2)({config:Ae,sessionId:P,visitorId:C})];case 19:z=de.sent(),de.label=20;case 20:if(U=(F=z).setupData,window.smartlook._loadInfo.push("Initialization - setup call finished. Timestamp - ".concat(Date.now())),!U.recordingAllowed)return[3,26];if(window.smartlook._loadInfo.push("Initialization - recording allowed"),Re.removeRetryAfterValues(),Oe.setMetadata(Ae.projectKey,{sessionId:P,visitorId:C}),Ee.setServerTime(U.serverTime),Le=!0,we=void 0,be=void 0,xe)return[3,25];de.label=21;case 21:return de.trys.push([21,23,,24]),[4,o.e(23).then(o.bind(o,931))];case 22:return de.sent(),[3,24];case 23:return J=de.sent(),window.smartlook._loadInfo.push("Initialization - bundle failed to load."),J instanceof Error&&J.message.includes("is not a function")?(0,S.o)("Smartlook could not be initialized. This site uses unsupported version of Prototype.JS library which contains some bugs. We advise you to upgrade to latest version in order to make smartlook recording. For more information do not hesitate to contact our customer support."):(0,S.o)("Could not load smartlook bundle. Smartlook will not record this page.",{error:J}),De=!0,[3,24];case 24:De||(window.smartlook._loadInfo.push("Initialization - initializing recorder."),function(e,t,r,n,o,i,a,s){if(void 0===window.smartlook.recorderClass)throw new d.f("Cannot initialize Smartlook. Smartlook class is not present.");window.smartlook.recorder=new window.smartlook.recorderClass(e,t,r,n,o,i,a,s)}(Ae,Oe,Re,Se,Ee,me,Ie,ke),xe=!0),de.label=25;case 25:return De||(void 0!==N&&N<U.recording.maxRecordDuration/3&&(P=f.$()),null===(ie=window.smartlook.recorder)||void 0===ie||ie.startRecording(P,C,D,U,N,K)),[3,27];case 26:H=F.response,(W=null==H?void 0:H.headers.get("Retry-After"))&&(Re.applyRetryAfter(Number.parseInt(W,10)),Re.setAppliedRetryAfterReason(JSON.stringify(U.error))),Le=!1,be=null===(ae=U.error)||void 0===ae?void 0:ae.message,we=null===(se=U.error)||void 0===se?void 0:se.code,(null===(le=U.error)||void 0===le?void 0:le.message)?(0,S.o)("Smartlook not recording. Reason: ".concat(U.error.message,".")):(0,S.o)("Smartlook not recording."),de.label=27;case 27:return[3,30];case 28:return q=de.sent(),window.smartlook._loadInfo.push("Initialization - error happened."),V=q instanceof Error?q.message:"Unknown reason /setup",q instanceof p.h?($=q.isAbortedByUserAgent&&"hidden"===q.visibilityState,[404,422].includes(q.status)?(Le=!1,q.responseData&&"string"!=typeof q.responseData?(be="string"==typeof q.responseData.message?q.responseData.message:"Unknown reason",we="string"==typeof q.responseData.code?q.responseData.code:"unknown_code"):(be="Unknown reason",we="unknown_code"),(0,S.o)("Smartlook not recording. Reason: ".concat(be),q.responseData),"organization_not_found"!==we&&u.R.warnNoConsole("Setup failed. Reason: ".concat(V,"."),q,fetch.toString())):$||Se.applyBan(new d.f("Setup in init failed. Reason: ".concat(V,"."),{originalError:q,shouldReport:!q.isConnectionError}))):q instanceof Error&&(q.message.includes("Cannot set properties of undefined (setting 'sessionManager')")||q.message.includes("undefined is not an object (evaluating 'this.sessionManager=e')")||q.message.includes("this is undefined")||q.message.includes("Unable to set property 'sessionManager' of undefined or null reference"))?(De=!0,(0,S.o)("Smartlook could not be initialized. This site uses unsupported version of Prototype.JS library which contains some bugs. We advise you to upgrade to latest version in order to make smartlook recording. For more information do not hesitate to contact our customer support.")):Se.applyBan(new d.f('Setup in init failed. Reason: "'.concat(V,'".'),{originalError:q instanceof Error?q:void 0})),[3,30];case 29:return je=!0,[7];case 30:return"reinit"===e&&(Ke=!1),Z=ve([],ye(Ce),!1),Ce=[],queueMicrotask(function(){Z.forEach(function(e){var t=ye(e,3),r=t[0],n=t[1],o=t[2];Fe.apply(void 0,ve([r],ye(o),!1)).finally(n)})}),x&&x(),[2];case 31:return Le||"finish"===e?De?(u.R.debug("Cannot call ".concat(e,". Bundle failed to load.")),[2]):[3,32]:(u.R.warn("Cannot call ".concat(e,". Recording is disabled. Reason ").concat(null!=be?be:"unknown",".")),"visitor_blocked"===we&&Pe.push([e,function(){return null},t]),[2]);case 32:return[4,fe.apply(void 0,ve([e,Se,Ae],ye(t),!1))];case 33:de.sent(),de.label=34;case 34:return[2]}var ze,Je,He,We})})};window.smartlook._loadInfo=window.smartlook._loadInfo||[],window.smartlook._loadInfo.push("Init script loaded. Script source: ".concat(window.smartlook.scriptSource));var ze=null!==(a=null===(i=window.smartlook)||void 0===i?void 0:i.api)&&void 0!==a?a:[],Je=null===(s=window.smartlook)||void 0===s?void 0:s.isRecorderScriptLoaded,He=window.smartlook.scriptSource,We=window.smartlook._loadInfo,qe=window.smartlook.silent;window.smartlook=Fe,window.smartlook.isRecorderScriptLoaded=Je,window.smartlook.scriptSource=He,window.smartlook._loadInfo=We,window.smartlook.silent=qe,ze.forEach(function(e){var t=ye(ve([],ye(e),!1)),r=t[0],n=t.slice(1);window.smartlook.apply(window,ve([r],ye(n),!1))})}();
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.