!function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function o(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(r)?r:String(r)}var i,u=["longtask","resource"],a=function(){function e(n){var o=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.measures=[],this.subscription=new Map,!("PerformanceObserver"in window)||!("performance"in window)||!function(){return"PerformanceObserver"in window&&u.every((function(e){return PerformanceObserver.supportedEntryTypes.includes(e)}))})return console.warn("Performance API not supported."),void(this.observer={observe:function(){return null},takeRecords:function(){return[]},disconnect:function(){return null}});this.observer=new PerformanceObserver((function(e){e.getEntries().forEach((function(e){var i,u,a=[];if("longtask"===e.entryType)i="longtask",a.push({name:i,startTime:e.startTime,duration:e.duration,detail:{name:e.name}});else{var s=null==n?void 0:n.some((function(t){return e.name.includes(t)}));"script"===e.initiatorType&&s?(i="resource_timing",a.push({name:i,startTime:e.fetchStart,duration:e.responseEnd-e.fetchStart,detail:{name:e.name}}),a.push({name:"resource_prefetch",startTime:e.domainLookupStart,duration:e.requestStart-e.domainLookupStart,detail:{name:e.name}})):"xmlhttprequest"===e.initiatorType&&s&&(i=!e.responseStatus||e.responseStatus>=200&&e.responseStatus<400?"request_latency":"request_error",a.push({name:i,startTime:e.fetchStart,duration:e.responseEnd-e.fetchStart,detail:{name:e.name,responseStatus:e.responseStatus}}))}a.length&&(o.measures=[].concat(a,function(e,t,n){if(t&&!Array.isArray(t)&&"number"==typeof t.length){var o=t.length;return r(t,o)}return e(t,n)}(t,o.measures)),i&&o.subscription.has(i)&&(null===(u=o.subscription.get(i))||void 0===u||u(a,e)))}))}))}var o,i;return o=e,i=[{key:"start",value:function(e){var t=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];r?e.forEach((function(e){t.observer.observe({type:e,buffered:r})})):this.observer.observe({entryTypes:e})}},{key:"stop",value:function(){this.observer.disconnect()}},{key:"get",value:function(e){return this.measures.filter((function(t){return t.name===e}))}},{key:"report",value:function(){return this.measures}},{key:"clear",value:function(){this.measures=[]}},{key:"subscribe",value:function(e,t){this.subscription.set(e,t)}},{key:"unsubscribe",value:function(e){this.subscription.delete(e)}}],i&&n(o.prototype,i),Object.defineProperty(o,"prototype",{writable:!1}),e}(),s=function(e){var t={"content.hotjar.io":"page-content-upload","verify-installation/auto":"verify-installation","vc.hotjar.io/sessions":"view-counter"},r=Object.keys(t).find((function(t){return e.includes(t)}));return r&&t[r]},c=function(e){e.forEach((function(e){var t,r,n=(t=e.detail.name).substring(t.lastIndexOf("/")+1).split("?")[0],o={resource_timing:"resource-fetch-time",resource_prefetch:"resource-prefetch-time"}[e.name];null!=n&&n.includes("hotjar")?r="hotjar-js":null!=n&&n.includes("modules")&&(r="modules-js"),r&&o&&e.startTime>0&&hj.metrics.timeEnd(o,{tag:{resource:r},total:e.duration,type:"lab"})}))},l=function(e){e.forEach((function(e){var t=s(e.detail.name);t&&e.startTime>0&&hj.metrics.timeEnd("api-request-latency",{tag:{request:t},total:e.duration})}))},f=function(e){e.forEach((function(e){var t,r=s(e.detail.name);r&&hj.metrics.count("api-request-error",{tag:{request:r},extraTags:{"status-code":(null===(t=e.detail.responseStatus)||void 0===t?void 0:t.toString())||""}})}))};!function(){try{!function(){i=new a(["hotjar.com","hotjar.io"]);var e=function(){i.subscribe("resource_timing",c),i.subscribe("request_latency",l),i.subscribe("request_error",f),i.start(["resource"])};"requestIdleCallback"in window?requestIdleCallback((function(){return e()})):"requestAnimationFrame"in window?requestAnimationFrame((function(){return e()})):setTimeout((function(){return e()}),100)}()}catch(e){}}()}();