!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.NN=t():e.NN=t()}(this,function(){return n={877:function(e,t,n){"use strict";function c(e){return(c="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)}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);nthis._maxDataSize&&(e.pop(),t--);for(var n=0;nthis._maxDataSize;)this._chunkedStore.push(this._extractSingleChunkFromRawStore());return this._chunkedStore}},{key:"peek",value:function(e){switch(e){case this.types.HTTPall:var t=this._chunkedStore,n=this._extractSingleChunkFromRawStore();return n.length&&t.push(n),this._chunkedStore=[],t.length?(this._nonBeacon_HTTPOnly_BackupStore=t.reduce(function(e,t){return e.concat(t)},[]),this._updateHTTPOnlyBackupLocalStorage(),this._nonBeacon_HTTPOnly_BackupStore):t;case this.types.BeaconCHUNK:if(0!==this._chunkedStore.length)return this._chunkedStore[0];var r=this._extractSingleChunkFromRawStore();return r.length?(this._chunkedStore.push(r),this._chunkedStore[0]):[];default:return[]}}},{key:"getAllData",value:function(){var e=this._chunkedStore,t=this._extractSingleChunkFromRawStore();t.length&&e.push(t),this._chunkedStore=[];var n=e.reduce(function(e,t){return e.concat(t)},[]);return e.length&&(this._nonBeacon_HTTPOnly_BackupStore.length?this._nonBeacon_HTTPOnly_BackupStore=this._nonBeacon_HTTPOnly_BackupStore.concat(n):this._nonBeacon_HTTPOnly_BackupStore=n,this._updateHTTPOnlyBackupLocalStorage()),n}},{key:"getChunkData",value:function(){if(0!==this._chunkedStore.length)return this._chunkedStore[0];var e=this._extractSingleChunkFromRawStore();return e.length?(this._chunkedStore.push(e),this._chunkedStore[0]):[]}},{key:"Beaconlength",get:function(){return this._rawStore.length+this._chunkedStore.length}},{key:"HTTPlength",get:function(){return this._nonBeacon_HTTPOnly_BackupStore.length}}]),a}();function z(){return"undefined"!=typeof localStorage&&"function"==typeof localStorage.getItem}function F(){return"undefined"!=typeof localStorage&&"function"==typeof localStorage.setItem}function J(e){var o=(new Date).getTime();"undefined"!=typeof performance&&"function"==typeof performance.now&&(o+=performance.now());var t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random();if("undefined"!=typeof crypto&&"function"==typeof crypto.getRandomValues){var n=new Uint32Array(2);crypto.getRandomValues(n),t=parseFloat("".concat(n[0]).concat(n[1]))/1e20}var r=(o+16*t)%16|0;return o=Math.floor(o/16),("x"===e?r:3&r|8).toString(16)});return e&&(t=t.concat("-",e)),t}function U(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function W(){var e={userAgent:navigator.userAgent,browserVendor:navigator.vendor,cookieEnabled:navigator.cookieEnabled,doNotTrack:navigator.doNotTrack,languages:navigator.languages,connection:navigator.connection||navigator.mozConnection||navigator.webkitConnection,screenWidth:window.innerWidth,screenHeight:window.innerHeight};return V.log("Technical data collected",e),e}function Q(){var e=function(){var e={};return window.performance&&("object"===c(window.performance.timing)&&(e.page=window.performance.timing),"function"==typeof window.performance.getEntriesByType&&(e.resources=window.performance.getEntriesByType("resource"),e.paint=window.performance.getEntriesByType("paint"))),e}();return V.log("Performance data collected",e),e}function Y(e){var t=e.config,n=e.state;if(t.trackScrollDepth){var r=function(){var e=document.body,t=document.documentElement;return Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight)}();n.documentHeight=r,V.log("Document height updated",n.documentHeight),r<=window.innerHeight&&(n.maxYScroll=window.innerHeight,V.log("Document height <= window height, scroll depth set to window height"))}}function K(e){var t=e.config,n=e.key,r={};return n&&"object"===c(t.dictionary)&&"object"===c(t.dictionary[n])?(r=function(t){for(var e=1;et.clientIdRotationPeriod;if(V.log("Retrivd clientId from the local storage",n),!i)return n}var a=J((new Date).getTime().toString());return V.log("New clientId is generated",a),F()&&(localStorage.setItem(q,a),V.log("ClientId saved to local storage",a)),a}({config:t}),msgId:J(),externalClientId:function(e){if(!e.config.externalClientId)return null;try{for(var t=null,n=["s_vi","s_fid"],r=0;null===t&&rthis._config.inactivityClientIdRotationInterval){var c=J(a.toString());localStorage.setItem(q,c),V.log("ClientId saved to local storage",c)}}this._queue.add(ne({},o)),V.log("Data added to the queue",JSON.stringify(ne({},o)))}else V.log("Unable to prepare data")}else V.log("urlValidator found. URL is disabled.")}},{key:"gatherDataAndPostToNetwork",value:function(e){var t=e.eventType,n=e.extraData,r=e.flushData,o=void 0!==r&&r,i=e.state;this.gatherDataAndPushToQueue({eventType:t,extraData:n,state:i}),this._config.batching&&!o||this.postDataToNetwork()}},{key:"gatherDataAndResetTimer",value:function(e){var t=e.eventType,n=e.extraData,r=e.state,o=e.timer,i=null;if(this._config.batching){var a=localStorage.getItem(this._queue.queueName(this._queue.queueTypes.RAW));switch(t){case"app:load":case"app:unload":this._config.batchingInterruptionEvents.some(function(e){return"app:load"===e||"app:unload"===e})?(this.gatherDataAndPostToNetwork({eventType:t,flushData:!0,state:r}),a&&0le.maxYScroll&&(le.maxYScroll=e,V.log("Maximun Y scroll distance updated",e))}),V.log("Scroll tracking started"))}({cfg:s}),function(e){var t=e.cfg;t.trackViewportChanges&&(window.addEventListener("resize",function(){se.gatherDataAndPushToQueue({state:le,eventType:H.systemEvent,extraData:{name:"Viewport changed",width:window.innerWidth,height:window.innerHeight}}),V.log("Viewport changed"),ge({cfg:t})}),V.log("Viewport change tracking started"))}({cfg:s}),le.initialized=!0,V.log("intializing state to true")}"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),r=1;r