From 81dbe6da7a56a5599a1e5cf93b69cee3083a28a2 Mon Sep 17 00:00:00 2001 From: dariuszlacheta Date: Wed, 3 Apr 2019 08:56:23 +0200 Subject: [PATCH] 4.4.0 --- dist/keen-tracking.js | 18 +++++++++++++++--- dist/keen-tracking.js.map | 2 +- dist/keen-tracking.min.js | 4 ++-- dist/keen-tracking.min.js.map | 2 +- dist/node/keen-tracking.js | 2 +- package-lock.json | 2 +- package.json | 2 +- 7 files changed, 22 insertions(+), 10 deletions(-) diff --git a/dist/keen-tracking.js b/dist/keen-tracking.js index 979c08ae..d9c4e918 100644 --- a/dist/keen-tracking.js +++ b/dist/keen-tracking.js @@ -693,8 +693,7 @@ module.exports = g; headers: parseHeaders(xhr.getAllResponseHeaders() || '') } options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL') - var body = 'response' in xhr ? xhr.response : xhr.responseText; - + var body = 'response' in xhr ? xhr.response : xhr.responseText resolve(new Response(body, options)) } @@ -733,7 +732,7 @@ module.exports = g; /* 7 */ /***/ (function(module) { -module.exports = {"name":"keen-tracking","version":"4.3.1","description":"Track events - custom user actions, clicks, pageviews, purchases.","main":"dist/node/keen-tracking.js","browser":"dist/keen-tracking.js","repository":{"type":"git","url":"https://github.com/keen/keen-tracking.js.git"},"scripts":{"start":"NODE_ENV=development webpack-dev-server","test":"NODE_ENV=test jest && npm run test:node","test:node":"NODE_ENV=test TEST_ENV=node jest","test:watch":"NODE_ENV=test jest --watch","test:node:watch":"NODE_ENV=test TEST_ENV=node jest --watch","build":"NODE_ENV=production webpack -p && NODE_ENV=production OPTIMIZE_MINIMIZE=1 webpack -p && npm run build:node","build:node":"TARGET=node NODE_ENV=production webpack -p","profile":"webpack --profile --json > stats.json","analyze":"webpack-bundle-analyzer stats.json /dist","preversion":"npm run build:node && npm run test","version":"npm run build && git add .","postversion":"git push && git push --tags","demo":"node ./test/demo/index.node.js"},"bugs":"https://github.com/keen/keen-tracking.js/issues","author":"Keen IO (https://keen.io/)","homepage":"https://keen.io","keywords":["Tracking","Tracker","Event Tracker","Event tracking","Track events","Page tracking","User tracking","Analytics event tracking","Analytics events","Analytics tracking","Custom events","Analytics","Stats","Statistics","Monitoring","Metrics","Pageviews","Segmentation","Funnel","Conversion","Log","Logger","Logging","Javascript events","Universal tracking","Click analytics"],"contributors":["Dustin Larimer (https://github.com/dustinlarimer)","Eric Anderson (https://github.com/aroc)","Joe Wegner (http://www.wegnerdesign.com)","Alex Kleissner (https://github.com/hex337)","Adam Kasprowicz (https://github.com/adamkasprowicz)","Dariusz Łacheta (https://github.com/dariuszlacheta)"],"license":"MIT","dependencies":{"component-emitter":"^1.2.0","js-cookie":"2.1.0","keen-core":"^0.1.3","promise-polyfill":"^8.0.0","whatwg-fetch":"^2.0.4"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.0.1","babel-loader":"^7.1.5","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-polyfill":"^6.26.0","babel-preset-env":"^1.7.0","babel-preset-es2015":"^6.24.1","babel-preset-stage-0":"^6.24.1","eslint":"^4.19.1","eslint-config-airbnb":"^16.1.0","eslint-loader":"^2.0.0","eslint-plugin-import":"^2.11.0","eslint-plugin-jsx-a11y":"^6.0.3","html-loader":"^0.5.5","html-webpack-plugin":"^3.2.0","jest":"^22.4.3","jest-fetch-mock":"^1.6.5","merge":"^1.2.1","nock":"^9.2.6","regenerator-runtime":"^0.11.1","replace-in-file":"^3.4.0","url-parse":"^1.4.3","webpack":"^4.5.0","webpack-bundle-analyzer":"^2.11.1","webpack-cli":"^2.0.13","webpack-dev-server":"^3.1.14","xhr-mock":"^2.3.2"}}; +module.exports = {"name":"keen-tracking","version":"4.4.0","description":"Track events - custom user actions, clicks, pageviews, purchases.","main":"dist/node/keen-tracking.js","browser":"dist/keen-tracking.js","repository":{"type":"git","url":"https://github.com/keen/keen-tracking.js.git"},"scripts":{"start":"NODE_ENV=development webpack-dev-server","test":"NODE_ENV=test jest && npm run test:node","test:node":"NODE_ENV=test TEST_ENV=node jest","test:watch":"NODE_ENV=test jest --watch","test:node:watch":"NODE_ENV=test TEST_ENV=node jest --watch","build":"NODE_ENV=production webpack -p && NODE_ENV=production OPTIMIZE_MINIMIZE=1 webpack -p && npm run build:node","build:node":"TARGET=node NODE_ENV=production webpack -p","profile":"webpack --profile --json > stats.json","analyze":"webpack-bundle-analyzer stats.json /dist","preversion":"npm run build:node && npm run test","version":"npm run build && git add .","postversion":"git push && git push --tags","demo":"node ./test/demo/index.node.js"},"bugs":"https://github.com/keen/keen-tracking.js/issues","author":"Keen IO (https://keen.io/)","homepage":"https://keen.io","keywords":["Tracking","Tracker","Event Tracker","Event tracking","Track events","Page tracking","User tracking","Analytics event tracking","Analytics events","Analytics tracking","Custom events","Analytics","Stats","Statistics","Monitoring","Metrics","Pageviews","Segmentation","Funnel","Conversion","Log","Logger","Logging","Javascript events","Universal tracking","Click analytics"],"contributors":["Dustin Larimer (https://github.com/dustinlarimer)","Eric Anderson (https://github.com/aroc)","Joe Wegner (http://www.wegnerdesign.com)","Alex Kleissner (https://github.com/hex337)","Adam Kasprowicz (https://github.com/adamkasprowicz)","Dariusz Łacheta (https://github.com/dariuszlacheta)"],"license":"MIT","dependencies":{"component-emitter":"^1.2.0","js-cookie":"2.1.0","keen-core":"^0.1.3","promise-polyfill":"^8.0.0","whatwg-fetch":"^2.0.4"},"devDependencies":{"babel-core":"^6.26.3","babel-jest":"^23.0.1","babel-loader":"^7.1.5","babel-plugin-transform-es2015-modules-commonjs":"^6.26.2","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-polyfill":"^6.26.0","babel-preset-env":"^1.7.0","babel-preset-es2015":"^6.24.1","babel-preset-stage-0":"^6.24.1","eslint":"^4.19.1","eslint-config-airbnb":"^16.1.0","eslint-loader":"^2.0.0","eslint-plugin-import":"^2.11.0","eslint-plugin-jsx-a11y":"^6.0.3","html-loader":"^0.5.5","html-webpack-plugin":"^3.2.0","jest":"^22.4.3","jest-fetch-mock":"^1.6.5","merge":"^1.2.1","nock":"^9.2.6","regenerator-runtime":"^0.11.1","replace-in-file":"^3.4.0","url-parse":"^1.4.3","webpack":"^4.5.0","webpack-bundle-analyzer":"^2.11.1","webpack-cli":"^2.0.13","webpack-dev-server":"^3.1.14","xhr-mock":"^2.3.2"}}; /***/ }), /* 8 */ @@ -2391,6 +2390,9 @@ function getDocumentDescription() { Object.defineProperty(exports, "__esModule", { value: true }); + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + exports.initAutoTrackingCore = initAutoTrackingCore; var _package = __webpack_require__(7); @@ -2409,6 +2411,7 @@ function initAutoTrackingCore(lib) { ignoreDisabledFormFields: false, ignoreFormFieldTypes: ['password'], recordClicks: true, + recordClicksPositionPointer: false, recordFormSubmits: true, recordPageViews: true, recordPageViewsOnExit: false, @@ -2592,6 +2595,15 @@ function initAutoTrackingCore(lib) { local_time_full: new Date().toISOString() }; + // pointer position tracking + if (options.recordClicksPositionPointer === true) { + var pointer = { + x_position: e.pageX, + y_position: e.pageY + }; + event = _extends({}, event, { pointer: pointer }); + } + if (options.catchError) { return client.recordEvent({ collection: 'clicks', diff --git a/dist/keen-tracking.js.map b/dist/keen-tracking.js.map index 27b24487..b0674b5a 100644 --- a/dist/keen-tracking.js.map +++ b/dist/keen-tracking.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///./node_modules/keen-core/lib/utils/each.js","webpack:///./node_modules/keen-core/lib/utils/extend.js","webpack:///./node_modules/promise-polyfill/src/polyfill.js","webpack:///./lib/config-default.js","webpack:///(webpack)/buildin/global.js","webpack:///./node_modules/promise-polyfill/src/finally.js","webpack:///./node_modules/whatwg-fetch/fetch.js","webpack:///./node_modules/component-emitter/index.js","webpack:///./lib/index.js","webpack:///./lib/helpers/getDomNodePath.js","webpack:///./lib/helpers/getWindowProfile.js","webpack:///./lib/helpers/getScreenProfile.js","webpack:///./lib/utils/md5.js","webpack:///./lib/utils/deepExtend.js","webpack:///./lib/extend-events.js","webpack:///./lib/utils/optOut.js","webpack:///./lib/utils/queue.js","webpack:///./node_modules/promise-polyfill/src/index.js","webpack:///./lib/utils/timer.js","webpack:///./lib/utils/serializeForm.js","webpack:///./node_modules/js-cookie/src/js.cookie.js","webpack:///./lib/utils/cookie.js","webpack:///./lib/helpers/getUniqueId.js","webpack:///./lib/helpers/getScrollState.js","webpack:///./lib/helpers/getDomNodeProfile.js","webpack:///./lib/helpers/getDomainName.js","webpack:///./lib/helpers/getDatetimeIndex.js","webpack:///./lib/helpers/getBrowserProfile.js","webpack:///./lib/browser-auto-tracking.js","webpack:///./lib/defer-events.js","webpack:///./lib/utils/cache-browser.js","webpack:///./lib/utils/unique.js","webpack:///./lib/utils/fetchRetry.js","webpack:///./node_modules/keen-core/lib/utils/base64.js","webpack:///./node_modules/process/browser.js","webpack:///./node_modules/setimmediate/setImmediate.js","webpack:///./node_modules/timers-browserify/main.js","webpack:///./lib/record-events-browser.js","webpack:///./lib/utils/listener.js","webpack:///./node_modules/keen-core/lib/utils/serialize.js","webpack:///./node_modules/keen-core/lib/utils/parse-params.js","webpack:///./node_modules/keen-core/lib/index.js","webpack:///./lib/browser.js"],"names":["configDefault","queue","capacity","interval","retry","limit","initialDelay","retryOnResponseStatuses","unique","cache","dbName","dbCollectionName","dbCollectionKey","maxAge","KeenCore","helpers","prototype","observers","on","client","extensions","events","collections","config","respectDoNotTrack","doNotTrack","optOut","optedOut","recordDeferredEvents","writeKey","str","arguments","length","String","referrerPolicy","setGlobalProperties","props","log","version","pkg","getDomNodePath","el","nodeName","stack","parentNode","sibCount","sibIndex","i","childNodes","sib","hasAttribute","id","unshift","toLowerCase","slice","join","getWindowProfile","body","html","output","document","documentElement","window","innerHeight","offsetHeight","innerWidth","offsetWidth","Math","max","scrollHeight","clientHeight","screen","ratio","availHeight","parseFloat","toFixed","availWidth","getScreenProfile","keys","orientation","MD5","d","result","M","V","Y","X","_","m","f","r","charCodeAt","charAt","Array","fromCharCode","n","h","t","g","e","md5_ii","md5_hh","md5_gg","md5_ff","safe_add","md5_cmn","bit_rol","deepExtend","target","j","indexOf","push","prop","clone","undefined","input","JSON","parse","stringify","extendEvent","extendEvents","getExtendedEventBody","eventCollection","eventModifier","handleValidationError","call","emit","eventsModifier","message","modifierResult","setOptOut","localStorage","setItem","removeItem","configQueue","timer","check","shouldFlushQueue","flush","pause","clearInterval","start","self","setInterval","num","count","value","clear","serializeForm","k_r_submitter","k_r_success_contrls","brackets","form","options","hash","serializer","hash_serializer","str_serialize","elements","radio_store","Object","create","element","ignoreTypes","type","disabled","name","test","key","val","checked","empty","selectOptions","isSelectedOptions","option","allowedEmpty","hasValue","selected","parse_keys","string","prefix","children","RegExp","match","exec","hash_assign","shift","between","isArray","_values","index","isNaN","matches","existing","replace","encodeURIComponent","cookie","expires","data","get","Cookies","getJSON","set","enabled","expire","daysUntilExpire","remove","obj","navigator","cookieEnabled","getUniqueId","crypto","getRandomValues","c","Uint8Array","toString","random","v","getScrollState","state","pixel","pixel_max","ratio_max","getScrollOffset","getWindowHeight","Number","getScrollableArea","pageYOffset","scrollTop","getDomNodeProfile","action","class","className","href","getElementProps","event_key","method","node_name","selector","text","title","x_position","offsetLeft","clientLeft","y_position","offsetTop","clientTop","getAttribute","getDomainName","extractHostname","url","hostname","split","domain","splitArr","arrLen","getDatetimeIndex","date","Date","getHours","parseInt","getDay","getDate","getMonth","getFullYear","getBrowserProfile","appCodeName","getDocumentDescription","language","appName","onLine","platform","userAgent","appVersion","querySelector","content","initAutoTrackingCore","lib","utils","extend","ignoreDisabledFormFields","ignoreFormFieldTypes","recordClicks","recordFormSubmits","recordPageViews","recordPageViewsOnExit","recordScrollState","shareUuidAcrossDomains","collectIpAddress","collectUuid","recordElementViews","catchError","requestType","now","allTimeOnSiteS","allTimeOnSiteMS","hidden","visibilityChange","msHidden","webkitHidden","handleVisibilityChange","getSecondsSinceDate","getMiliSecondsSinceDate","addEventListener","domainName","location","cookieDomain","uuid","initialReferrer","referrer","scrollState","listener","addons","ua_string","date_time","ip_address","ip","remove_ip_property","browserProfile","tracked_by","local_time_full","toISOString","user","page","description","scroll_state","time_on_page","time_on_page_ms","geo","user_agent","tech","profile","full","info","initial","time","local","utc","keen","timestamp","event","recordEvent","collection","catch","err","serializerOptions","fields","IntersectionObserver","elementViewsOptions","threshold","elementViewsCallback","observer","forEach","isIntersecting","querySelectorAll","observe","round","getTime","deferEvent","deferEvents","queueCapacity","queueInterval","eventBody","eventsHash","eventList","concat","clonedQueueConfig","clonedQueueEvents","recordEvents","res","console","indexedDBAvailable","cachingEnabled","db","cacheConfig","initializeIndexedDb","requestCacheConfig","Promise","resolve","reject","dbConnectionRequest","indexedDB","open","onerror","onupgradeneeded","objectStore","createObjectStore","keyPath","createIndex","onsuccess","saveToCache","configOptions","then","transactionSave","transaction","requestSave","add","expiryTime","getFromCache","transactionCleanUp","indexCleanUp","upperBoundOpenKeyRange","IDBKeyRange","upperBound","openCursor","cursor","transactionDelete","delete","continue","transactionIndex","responseFromCache","uniqueIds","isUnique","customCacheConfig","extendedEventBody","configCache","stringifiedEvent","hashingMethod","item","filter","alreadySentEvent","find","storage","retriesLimit","retryInitialDelay","retryOn","retriesCount","wrappedFetch","fetch","response","status","error","setTimeout","eventCollectionOrConfigObject","callback","useBeaconApi","configObject","clientConfig","event_collection","checkValidation","extendedEventsHash","isUniqueResult","created","Keen","send","sendBeacon","getRequestUrl","api_key","base64","encode","modified","getRequestUrlOkLength","getUrlMaxLength","sendFetch","mode","redirect","headers","connectionError","ok","json","error_code","responseJSON","statusText","eventsSavedSuccessfuly","checkEventsSavedSuccessfuly","responseKeys","notSavedEvents","map","success","projectId","img","createElement","loaded","onload","naturalHeight","naturalWidth","width","height","src","listenerCore","ctx","domListeners","fn","addListener","eventHandler","once","off","apply","survivors","handler","eventType","evt","srcElement","handlers","deferClickEvent","deferFormSubmit","attachEvent","elem","nodeList","anchor","timeout","targetAttr","cbResponse","defaultPrevented","returnValue","preventDefault","metaKey","submit","initAutoTracking","listenTo","listenerHash","keenGlobals","webpackKeenGlobals","getItem","extendLibrary","KeenTracking"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;ACnEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC1BA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACTA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,CAAC;AACD;AACA;;;;;;;;;;;;;;ACvBO,IAAMA,wCAAgB;;AAE3B;AACA;AACAC,SAAO;AACLC,cAAU,IADL;AAELC,cAAU;AAFL,GAJoB;;AAS3B;AACAC,SAAO;AACLC,WAAO,EADF;AAELC,kBAAc,GAFT;AAGLC,6BAAyB,CACvB,GADuB,EAEvB,GAFuB,EAGvB,GAHuB,EAIvB,GAJuB,EAKvB,GALuB;AAHpB,GAVoB;;AAsB3BC,UAAQ,KAtBmB,EAsBZ;AACf;AACAC,SAAO;AACL;;;AAGAC,YAAQ,cAJH,EAImB;AACxBC,sBAAkB,QALb;AAMLC,qBAAiB,MANZ;;AAQL;;;AAGAC,YAAQ,KAAK,IAXR,CAWc;AAXd;AAxBoB,CAAtB;;kBAuCQb,a;;;;;;ACvCf;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;;;;;;ACdA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,mBAAmB;AAC3D;AACA;;AAEA;AACA;AACA,kCAAkC,oBAAoB;AACtD;AACA;;AAEA;AACA;AACA,wCAAwC,4BAA4B;AACpE;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA,uDAAuD;AACvD,SAAS;AACT;AACA,SAAS;AACT,8EAA8E;AAC9E;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA8B,uBAAuB;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA,uCAAuC,0BAA0B;AACjE;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,+BAA+B,0BAA0B,eAAe;AACxE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;;AAEP;AACA,KAAK;AACL;AACA;AACA,CAAC;;;;;;;;;;;;;;ACjdD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,SAAS;AACpB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,MAAM;AACjB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,2CAA2C,SAAS;AACpD;AACA;AACA;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A;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA,mBAAmB,iBAAiB;AACpC;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA,wCAAwC,SAAS;AACjD;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,+DAA+D;AAC/D;AACA;;AAEA;;;;;;;;;;;;;;QCnOgBqI,K,GAAAA,K;AAAT,SAASA,KAAT,CAAeS,GAAf,EAAmB;AACxB,MAAI,gBAAgBT,KAAhB,KAA0B,KAA9B,EAAqC;AACnC,WAAO,IAAIA,KAAJ,CAAUS,GAAV,CAAP;AACD;AACD,OAAKC,KAAL,GAAaD,OAAO,CAApB;AACA,SAAO,IAAP;AACD;;AAEDT,MAAMvH,SAAN,CAAgB6H,KAAhB,GAAwB,YAAU;AAChC,MAAIC,OAAO,IAAX;AACA,OAAKH,KAAL;AACA,OAAKxI,QAAL,GAAgB4I,YAAY,YAAU;AACpCD,SAAKG,KAAL;AACD,GAFe,EAEb,IAFa,CAAhB;AAGA,SAAO,IAAP;AACD,CAPD;;AASAV,MAA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B;AACD,OAFH,EAEK,IAAEA,eAAeF,iBAFtB;AAGD;;AAEDG,iBAAaJ,eAAeG,YAA5B;AACD,GA/BM,CAAP;AAgCD,C;;AAvDD;;AACA;;AAEA;;;;;;AAoDC,C;;;;;;ACvDD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,wBAAwB;AACrD,qBAAqB,oCAAoC;AACzD;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC,oCAAoC;AACpC,iCAAiC;AACjC;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;;;;;;AC7CA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;ACvLtC;AACA;;AAEA;AACA;AACA;;AAEA,uBAAuB;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0CAA0C,sBAAsB,EAAE;AAClE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;;AAEA,KAAK;AACL;AACA;;AAEA,KAAK;AACL;AACA;;AAEA,KAAK;AACL;AACA;;AAEA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,CAAC;;;;;;;;ACzLD;AACA;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AL,mBAAW9G,IAAX,CAAgB,YAAM;AACpBhP,eAAKmW,MAAL;AACD,SAFD,EAEGpK,KAFH,CAES,eAAO;AACd;AACA/L,eAAKmW,MAAL;AACD,SALD;AAMD,OAZD,MAYO;AACL3E,mBAAW,YAAU;AACnBxR,eAAKmW,MAAL;AACD,SAFD,EAEGP,OAFH;AAGD;AACF;;AAED,SAAO,KAAP;AACD,C;;;;;;ACxRD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;ACdA;;AAEA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,6BAA6B,+CAA+C,EAAE;AAC9E;;AAEA;AACA;AACA;AACA;AACA;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA,oBAAoB,SAAS,IAAI,KAAK;AACtC,oBAAoB,SAAS,IAAI,KAAK;AACtC,oBAAoB,SAAS,IAAI,KAAK;AACtC,oBAAoB,SAAS,IAAI,KAAK,eAAe,UAAU;AAC/D,oBAAoB,SAAS,IAAI,KAAK,eAAe,UAAU;AAC/D,oBAAoB,SAAS,IAAI,KAAK,eAAe,UAAU;AAC/D,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA,kDAAkD,SAAS,IAAI,KAAK;AACpE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B,YAAY;AAC1C;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,CAAC,sIAAsI;;;;;;;;;;;;;;;;ACnOvI;;;;AACA;;;;AACA;;;;AACA;;AACA;;AAIA;;AAOA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA;AACA;AACA;AACA,sBAAOte,gBAASE,SAAhB,EAA2B;AACzBqU,+CADyB;AAEzB2B;AAFyB,CAA3B;;AAKA,sBAAOlW,gBAASE,SAAhB,EAA2B;AACzBsV,qCADyB;AAEzBC,uCAFyB;AAGzBC,2CAHyB;AAIzBC,2CAJyB;AAKzB7U,yDALyB;AAMzBsG;AANyB,CAA3B;AAQA,sBAAOpH,gBAASE,SAAhB,EAA2B;AACzBuG,wCADyB;AAEzBC;AAFyB,CAA3B;;AAKA;AACA;AACA;AACA,IAAMoY,mBAAmB,+CAAqB9e,eAArB,CAAzB;AACA,sBAAOA,gBAASE,SAAhB,EAA2B;AACzB4e;AADyB,CAA3B;;AAIA;AACA;AACA;AACA,sBAAO9e,gBAASC,OAAhB,EAAyB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,I","file":"keen-tracking.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 44);\n","module.exports = each;\n\nfunction each(o, cb, s){\n var n;\n if (!o){\n return 0;\n }\n s = !s ? o : s;\n if (o instanceof Array){\n // Indexed arrays, needed for Safari\n for (n=0; n -1\n }\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue+','+value : value\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n }\n\n Headers.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) { items.push(name) })\n return iteratorFor(items)\n }\n\n Headers.prototype.values = function() {\n var items = []\n this.forEach(function(value) { items.push(value) })\n return iteratorFor(items)\n }\n\n Headers.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) { items.push([name, value]) })\n return iteratorFor(items)\n }\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this, { body: this._bodyInit })\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers()\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ')\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = options.status === undefined ? 200 : options.status\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n var xhr = new XMLHttpRequest()\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n","\r\n/**\r\n * Expose `Emitter`.\r\n */\r\n\r\nif (typeof module !== 'undefined') {\r\n module.exports = Emitter;\r\n}\r\n\r\n/**\r\n * Initialize a new `Emitter`.\r\n *\r\n * @api public\r\n */\r\n\r\nfunction Emitter(obj) {\r\n if (obj) return mixin(obj);\r\n};\r\n\r\n/**\r\n * Mixin the emitter properties.\r\n *\r\n * @param {Object} obj\r\n * @return {Object}\r\n * @api private\r\n */\r\n\r\nfunction mixin(obj) {\r\n for (var key in Emitter.prototype) {\r\n obj[key] = Emitter.prototype[key];\r\n }\r\n return obj;\r\n}\r\n\r\n/**\r\n * Listen on the given `event` with `fn`.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.on =\r\nEmitter.prototype.addEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r\n .push(fn);\r\n return this;\r\n};\r\n\r\n/**\r\n * Adds an `event` listener that will be invoked a single\r\n * time then automatically removed.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.once = function(event, fn){\r\n function on() {\r\n this.off(event, on);\r\n fn.apply(this, arguments);\r\n }\r\n\r\n on.fn = fn;\r\n this.on(event, on);\r\n return this;\r\n};\r\n\r\n/**\r\n * Remove the given callback for `event` or all\r\n * registered callbacks.\r\n *\r\n * @param {String} event\r\n * @param {Function} fn\r\n * @return {Emitter}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.off =\r\nEmitter.prototype.removeListener =\r\nEmitter.prototype.removeAllListeners =\r\nEmitter.prototype.removeEventListener = function(event, fn){\r\n this._callbacks = this._callbacks || {};\r\n\r\n // all\r\n if (0 == arguments.length) {\r\n this._callbacks = {};\r\n return this;\r\n }\r\n\r\n // specific event\r\n var callbacks = this._callbacks['$' + event];\r\n if (!callbacks) return this;\r\n\r\n // remove all handlers\r\n if (1 == arguments.length) {\r\n delete this._callbacks['$' + event];\r\n return this;\r\n }\r\n\r\n // remove specific handler\r\n var cb;\r\n for (var i = 0; i < callbacks.length; i++) {\r\n cb = callbacks[i];\r\n if (cb === fn || cb.fn === fn) {\r\n callbacks.splice(i, 1);\r\n break;\r\n }\r\n }\r\n return this;\r\n};\r\n\r\n/**\r\n * Emit `event` with the given args.\r\n *\r\n * @param {String} event\r\n * @param {Mixed} ...\r\n * @return {Emitter}\r\n */\r\n\r\nEmitter.prototype.emit = function(event){\r\n this._callbacks = this._callbacks || {};\r\n var args = [].slice.call(arguments, 1)\r\n , callbacks = this._callbacks['$' + event];\r\n\r\n if (callbacks) {\r\n callbacks = callbacks.slice(0);\r\n for (var i = 0, len = callbacks.length; i < len; ++i) {\r\n callbacks[i].apply(this, args);\r\n }\r\n }\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Return array of callbacks for `event`.\r\n *\r\n * @param {String} event\r\n * @return {Array}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.listeners = function(event){\r\n this._callbacks = this._callbacks || {};\r\n return this._callbacks['$' + event] || [];\r\n};\r\n\r\n/**\r\n * Check if this emitter has `event` handlers.\r\n *\r\n * @param {String} event\r\n * @return {Boolean}\r\n * @api public\r\n */\r\n\r\nEmitter.prototype.hasListeners = function(event){\r\n return !! this.listeners(event).length;\r\n};\r\n","import KeenCore from 'keen-core';\nimport each from 'keen-core/lib/utils/each';\nimport extend from 'keen-core/lib/utils/extend';\nimport { queue } from './utils/queue';\nimport { setOptOut } from './utils/optOut';\nimport pkg from '../package.json';\n\nKeenCore.helpers = KeenCore.helpers || {};\nKeenCore.prototype.observers = KeenCore.observers || {};\n\n// Install internal queue\nKeenCore.on('client', function(client){\n client.extensions = {\n events: [],\n collections: {}\n };\n \n if (!client.config.respectDoNotTrack) {\n this.doNotTrack = false;\n }\n\n if (typeof client.config.optOut !== 'undefined') {\n setOptOut(client.config.optOut);\n this.optedOut = client.config.optOut;\n }\n \n client.queue = queue(client.config.queue);\n client.queue.on('flush', function(){\n client.recordDeferredEvents();\n });\n});\n\n// Accessors\nKeenCore.prototype.writeKey = function(str){\n if (!arguments.length) return this.config.writeKey;\n this.config.writeKey = (str ? String(str) : null);\n return this;\n};\n\nKeenCore.prototype.referrerPolicy = function(str){\n if (!arguments.length) return this.config.referrerPolicy;\n this.config.referrerPolicy = (str ? String(str) : null);\n return this;\n};\n\n// DEPRECATED\nKeenCore.prototype.setGlobalProperties = function(props){\n KeenCore.log('This method has been removed. Check out #extendEvents: https://github.com/keen/keen-tracking.js#extend-events');\n return this;\n};\n\nKeenCore.version = pkg.version;\n\nexport default KeenCore;\n","export function getDomNodePath(el){\n if (!el.nodeName) return '';\n\n var stack = [];\n while ( el.parentNode != null ) {\n // console.log(el.nodeName);\n var sibCount = 0;\n var sibIndex = 0;\n for ( var i = 0; i < el.parentNode.childNodes.length; i++ ) {\n var sib = el.parentNode.childNodes[i];\n if ( sib.nodeName == el.nodeName ) {\n if ( sib === el ) {\n sibIndex = sibCount;\n }\n sibCount++;\n }\n }\n if ( el.hasAttribute('id') && el.id != '' ) {\n stack.unshift(el.nodeName.toLowerCase() + '#' + el.id);\n } else if ( sibCount > 1 ) {\n stack.unshift(el.nodeName.toLowerCase() + ':eq(' + sibIndex + ')');\n } else {\n stack.unshift(el.nodeName.toLowerCase());\n }\n el = el.parentNode;\n }\n\n return stack.slice(1).join(' > ');\n}\n\n\n// via: http://stackoverflow.com/a/16742828/2511985\n","export function getWindowProfile(){\n var body, html, output;\n\n if ('undefined' == typeof document) return {};\n\n body = document.body || {};\n html = document.documentElement || {};\n\n output = {\n 'height': ('innerHeight' in window) ? window.innerHeight : document.documentElement.offsetHeight,\n 'width': ('innerWidth' in window) ? window.innerWidth : document.documentElement.offsetWidth,\n 'scrollHeight': Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight ) || null\n };\n\n if (window.screen) {\n output.ratio = {\n 'height': (window.screen.availHeight) ? parseFloat( (window.innerHeight/window.screen.availHeight).toFixed(2) ) : null,\n 'width': (window.screen.availWidth) ? parseFloat( (window.innerWidth/window.screen.availWidth).toFixed(2) ) : null\n };\n }\n\n return output;\n}\n\n/*\n Notes:\n document.documentElement.offsetHeight/Width is a workaround for IE8 and below, where window.innerHeight/Width is undefined\n*/\n","export function getScreenProfile(){\n var keys, output;\n\n if ('undefined' == typeof window || !window.screen) return {};\n\n keys = ['height', 'width', 'colorDepth', 'pixelDepth', 'availHeight', 'availWidth'];\n output = {};\n\n for (var i = 0; i < keys.length; i++) {\n output[keys[i]] = window.screen[keys[i]] ? window.screen[keys[i]] : null;\n }\n\n output.orientation = {\n 'angle' : window.screen.orientation ? window.screen.orientation['angle'] : 0,\n 'type' : window.innerWidth > window.innerHeight ? 'landscape': 'portrait'\n };\n\n return output;\n}\n","export const MD5 = function(d){const result = M(V(Y(X(d),8*d.length)));return result.toLowerCase()};function M(d){for(var _,m=\"0123456789ABCDEF\",f=\"\",r=0;r>>4&15)+m.charAt(15&_);return f}function X(d){for(var _=Array(d.length>>2),m=0;m<_.length;m++)_[m]=0;for(m=0;m<8*d.length;m+=8)_[m>>5]|=(255&d.charCodeAt(m/8))<>5]>>>m%32&255);return _}function Y(d,_){d[_>>5]|=128<<_%32,d[14+(_+64>>>9<<4)]=_;for(var m=1732584193,f=-271733879,r=-1732584194,i=271733878,n=0;n>16)+(_>>16)+(m>>16)<<16|65535&m}function bit_rol(d,_){return d<<_|d>>>32-_}\n\nexport default MD5;\n","export const deepExtend = function(target){\n for (var i = 1; i < arguments.length; i++) {\n // Copy unique items from incoming array\n if (target instanceof Array && arguments[i] instanceof Array) {\n for (var j = 0; j < arguments[i].length; j++) {\n if (target.indexOf(arguments[i][j]) < 0) {\n target.push(arguments[i][j]);\n }\n }\n }\n // Blend objects\n else {\n for (var prop in arguments[i]){\n // Recurse when both contain objects of same name\n // and incoming is not a null object\n if (typeof target[prop] !== 'undefined'\n && typeof target[prop] === 'object'\n && typeof arguments[i][prop] === 'object'\n && arguments[i][prop] !== null) {\n deepExtend(target[prop], clone(arguments[i][prop]));\n }\n // Otherwise just copy it over...\n else if (\n arguments[i][prop] !== undefined &&\n typeof arguments[i][prop] !== 'function') {\n target[prop] = clone(arguments[i][prop]);\n }\n }\n }\n }\n return target;\n}\n\nfunction clone(input){\n return JSON.parse( JSON.stringify(input) );\n}\n","import { deepExtend } from './utils/deepExtend';\nimport each from 'keen-core/lib/utils/each';\n\nexport function extendEvent(eventCollection, eventModifier){\n if (arguments.length !== 2 || typeof eventCollection !== 'string'\n || ('object' !== typeof eventModifier && 'function' !== typeof eventModifier)) {\n handleValidationError.call(this, 'Incorrect arguments provided to #extendEvent method');\n return;\n }\n this.extensions.collections[eventCollection] = this.extensions.collections[eventCollection] || [];\n this.extensions.collections[eventCollection].push(eventModifier);\n this.emit('extendEvent', eventCollection, eventModifier);\n return this;\n}\n\nexport function extendEvents(eventsModifier){\n if (arguments.length !== 1 || ('object' !== typeof eventsModifier && 'function' !== typeof eventsModifier)) {\n handleValidationError.call(this, 'Incorrect arguments provided to #extendEvents method');\n return;\n }\n this.extensions.events.push(eventsModifier);\n this.emit('extendEvents', eventsModifier);\n return this;\n}\n\nfunction handleValidationError(message){\n this.emit('error', `Event(s) not extended: ${message}`);\n}\n\nexport function getExtendedEventBody(result, queue){\n if (queue && queue.length > 0) {\n each(queue, function(eventModifier, i){\n let modifierResult = (typeof eventModifier === 'function') ? eventModifier() : eventModifier;\n deepExtend(result, modifierResult);\n });\n }\n return result;\n}\n","export function setOptOut(optOut = true) {\n if (optOut) {\n localStorage.setItem('optout', optOut);\n return;\n }\n\n localStorage.removeItem('optout');\n};\n","import Emitter from 'component-emitter';\n\nimport configDefault from '../config-default.js';\n\nexport function queue(configQueue = {}) {\n if (this instanceof queue === false) {\n return new queue(configQueue);\n }\n this.capacity = 0;\n this.config = {\n ...configDefault.queue,\n ...configQueue\n };\n this.events = {\n // \"collection-1\": [],\n // \"collection-2\": []\n };\n this.interval = 0;\n this.timer = null;\n return this;\n}\n\nEmitter(queue.prototype);\n\nqueue.prototype.check = function() {\n if (shouldFlushQueue(this)) {\n this.flush();\n }\n if (this.config.interval === 0 || this.capacity === 0) {\n this.pause();\n }\n return this;\n};\n\nqueue.prototype.flush = function() {\n this.emit('flush');\n this.interval = 0;\n return this;\n};\n\nqueue.prototype.pause = function() {\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n return this;\n};\n\nqueue.prototype.start = function() {\n var self = this;\n self.pause();\n self.timer = setInterval(function() {\n self.interval++;\n self.check();\n }, 1000);\n return self;\n};\n\nfunction shouldFlushQueue(props) {\n if (props.capacity > 0 && props.interval >= props.config.interval) {\n return true;\n }\n else if (props.capacity >= props.config.capacity) {\n return true;\n }\n return false;\n}\n","import promiseFinally from './finally';\n\n// Store setTimeout reference so promise-polyfill will be unaffected by\n// other code modifying setTimeout (like sinon.useFakeTimers())\nvar setTimeoutFunc = setTimeout;\n\nfunction noop() {}\n\n// Polyfill for Function.prototype.bind\nfunction bind(fn, thisArg) {\n return function() {\n fn.apply(thisArg, arguments);\n };\n}\n\nfunction Promise(fn) {\n if (!(this instanceof Promise))\n throw new TypeError('Promises must be constructed via new');\n if (typeof fn !== 'function') throw new TypeError('not a function');\n this._state = 0;\n this._handled = false;\n this._value = undefined;\n this._deferreds = [];\n\n doResolve(fn, this);\n}\n\nfunction handle(self, deferred) {\n while (self._state === 3) {\n self = self._value;\n }\n if (self._state === 0) {\n self._deferreds.push(deferred);\n return;\n }\n self._handled = true;\n Promise._immediateFn(function() {\n var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;\n if (cb === null) {\n (self._state === 1 ? resolve : reject)(deferred.promise, self._value);\n return;\n }\n var ret;\n try {\n ret = cb(self._value);\n } catch (e) {\n reject(deferred.promise, e);\n return;\n }\n resolve(deferred.promise, ret);\n });\n}\n\nfunction resolve(self, newValue) {\n try {\n // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n if (newValue === self)\n throw new TypeError('A promise cannot be resolved with itself.');\n if (\n newValue &&\n (typeof newValue === 'object' || typeof newValue === 'function')\n ) {\n var then = newValue.then;\n if (newValue instanceof Promise) {\n self._state = 3;\n self._value = newValue;\n finale(self);\n return;\n } else if (typeof then === 'function') {\n doResolve(bind(then, newValue), self);\n return;\n }\n }\n self._state = 1;\n self._value = newValue;\n finale(self);\n } catch (e) {\n reject(self, e);\n }\n}\n\nfunction reject(self, newValue) {\n self._state = 2;\n self._value = newValue;\n finale(self);\n}\n\nfunction finale(self) {\n if (self._state === 2 && self._deferreds.length === 0) {\n Promise._immediateFn(function() {\n if (!self._handled) {\n Promise._unhandledRejectionFn(self._value);\n }\n });\n }\n\n for (var i = 0, len = self._deferreds.length; i < len; i++) {\n handle(self, self._deferreds[i]);\n }\n self._deferreds = null;\n}\n\nfunction Handler(onFulfilled, onRejected, promise) {\n this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n this.onRejected = typeof onRejected === 'function' ? onRejected : null;\n this.promise = promise;\n}\n\n/**\n * Take a potentially misbehaving resolver function and make sure\n * onFulfilled and onRejected are only called once.\n *\n * Makes no guarantees about asynchrony.\n */\nfunction doResolve(fn, self) {\n var done = false;\n try {\n fn(\n function(value) {\n if (done) return;\n done = true;\n resolve(self, value);\n },\n function(reason) {\n if (done) return;\n done = true;\n reject(self, reason);\n }\n );\n } catch (ex) {\n if (done) return;\n done = true;\n reject(self, ex);\n }\n}\n\nPromise.prototype['catch'] = function(onRejected) {\n return this.then(null, onRejected);\n};\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n var prom = new this.constructor(noop);\n\n handle(this, new Handler(onFulfilled, onRejected, prom));\n return prom;\n};\n\nPromise.prototype['finally'] = promiseFinally;\n\nPromise.all = function(arr) {\n return new Promise(function(resolve, reject) {\n if (!arr || typeof arr.length === 'undefined')\n throw new TypeError('Promise.all accepts an array');\n var args = Array.prototype.slice.call(arr);\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n\n function res(i, val) {\n try {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n var then = val.then;\n if (typeof then === 'function') {\n then.call(\n val,\n function(val) {\n res(i, val);\n },\n reject\n );\n return;\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n } catch (ex) {\n reject(ex);\n }\n }\n\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.resolve = function(value) {\n if (value && typeof value === 'object' && value.constructor === Promise) {\n return value;\n }\n\n return new Promise(function(resolve) {\n resolve(value);\n });\n};\n\nPromise.reject = function(value) {\n return new Promise(function(resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function(values) {\n return new Promise(function(resolve, reject) {\n for (var i = 0, len = values.length; i < len; i++) {\n values[i].then(resolve, reject);\n }\n });\n};\n\n// Use polyfill for setImmediate for performance gains\nPromise._immediateFn =\n (typeof setImmediate === 'function' &&\n function(fn) {\n setImmediate(fn);\n }) ||\n function(fn) {\n setTimeoutFunc(fn, 0);\n };\n\nPromise._unhandledRejectionFn = function _unhandledRejectionFn(err) {\n if (typeof console !== 'undefined' && console) {\n console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console\n }\n};\n\nexport default Promise;\n","export function timer(num){\n if (this instanceof timer === false) {\n return new timer(num);\n }\n this.count = num || 0;\n return this;\n}\n\ntimer.prototype.start = function(){\n var self = this;\n this.pause();\n this.interval = setInterval(function(){\n self.count++;\n }, 1000);\n return this;\n};\n\ntimer.prototype.pause = function(){\n clearInterval(this.interval);\n return this;\n};\n\ntimer.prototype.value = function(){\n return this.count;\n};\n\ntimer.prototype.clear = function(){\n this.count = 0;\n return this;\n};\n","/*\n This is a modified copy of https://github.com/defunctzombie/form-serialize/ v0.7.1\n Includes a new configuration option:\n * ignoreTypes - Array, Default: [], Example: [ 'password' ]\n*/\n\n// types which indicate a submit action and are not successful controls\n// these will be ignored\nvar k_r_submitter = /^(?:submit|button|image|reset|file)$/i;\n\n// node names which could be successful controls\nvar k_r_success_contrls = /^(?:input|select|textarea|keygen)/i;\n\n// Matches bracket notation.\nvar brackets = /(\\[[^\\[\\]]*\\])/g;\n\n// serializes form fields\n// @param form MUST be an HTMLForm element\n// @param options is an optional argument to configure the serialization. Default output\n// with no options specified is a url encoded string\n// - hash: [true | false] Configure the output type. If true, the output will\n// be a js object.\n// - serializer: [function] Optional serializer function to override the default one.\n// The function takes 3 arguments (result, key, value) and should return new result\n// hash and url encoded str serializers are provided with this module\n// - disabled: [true | false]. If true serialize disabled fields.\n// - empty: [true | false]. If true serialize empty fields\nexport function serializeForm(form, options) {\n if (typeof options != 'object') {\n options = { hash: !!options };\n }\n else if (options.hash === undefined) {\n options.hash = true;\n }\n\n var result = (options.hash) ? {} : '';\n var serializer = options.serializer || ((options.hash) ? hash_serializer : str_serialize);\n\n var elements = form && form.elements ? form.elements : [];\n\n // Object store each radio and set if it's empty or not\n var radio_store = Object.create(null);\n\n for (var i=0 ; i -1) {\n continue;\n }\n // ingore disabled fields\n if ((!options.disabled && element.disabled) || !element.name) {\n continue;\n }\n // ignore anyhting that is not considered a success field\n if (!k_r_success_contrls.test(element.nodeName) ||\n k_r_submitter.test(element.type)) {\n continue;\n }\n\n var key = element.name;\n var val = element.value;\n\n // we can't just use element.value for checkboxes cause some browsers lie to us\n // they say \"on\" for value when the box isn't checked\n if ((element.type === 'checkbox' || element.type === 'radio') && !element.checked) {\n val = undefined;\n }\n\n // If we want empty elements\n if (options.empty) {\n if (element.type === 'checkbox' && !element.checked) {\n val = '';\n }\n\n // for radio\n if (element.type === 'radio') {\n if (!radio_store[element.name] && !element.checked) {\n radio_store[element.name] = false;\n }\n else if (element.checked) {\n radio_store[element.name] = true;\n }\n }\n\n // if options empty is true, continue only if its radio\n if (val == undefined && element.type == 'radio') {\n continue;\n }\n }\n else {\n // value-less fields are ignored unless options.empty is true\n if (!val) {\n continue;\n }\n }\n\n // multi select boxes\n if (element.type === 'select-multiple') {\n val = [];\n\n var selectOptions = element.options;\n var isSelectedOptions = false;\n for (var j=0 ; j 1) {\n\t\t\t\tattributes = extend({\n\t\t\t\t\tpath: '/'\n\t\t\t\t}, api.defaults, attributes);\n\n\t\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\t\tvar expires = new Date();\n\t\t\t\t\texpires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);\n\t\t\t\t\tattributes.expires = expires;\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tresult = JSON.stringify(value);\n\t\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\t\tvalue = result;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\n\t\t\t\tif (!converter.write) {\n\t\t\t\t\tvalue = encodeURIComponent(String(value))\n\t\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\t\t\t\t} else {\n\t\t\t\t\tvalue = converter.write(value, key);\n\t\t\t\t}\n\n\t\t\t\tkey = encodeURIComponent(String(key));\n\t\t\t\tkey = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);\n\t\t\t\tkey = key.replace(/[\\(\\)]/g, escape);\n\n\t\t\t\treturn (document.cookie = [\n\t\t\t\t\tkey, '=', value,\n\t\t\t\t\tattributes.expires && '; expires=' + attributes.expires.toUTCString(), // use expires attribute, max-age is not supported by IE\n\t\t\t\t\tattributes.path && '; path=' + attributes.path,\n\t\t\t\t\tattributes.domain && '; domain=' + attributes.domain,\n\t\t\t\t\tattributes.secure ? '; secure' : ''\n\t\t\t\t].join(''));\n\t\t\t}\n\n\t\t\t// Read\n\n\t\t\tif (!key) {\n\t\t\t\tresult = {};\n\t\t\t}\n\n\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t// in case there are no cookies at all. Also prevents odd result when\n\t\t\t// calling \"get()\"\n\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\tvar rdecode = /(%[0-9A-Z]{2})+/g;\n\t\t\tvar i = 0;\n\n\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\tvar name = parts[0].replace(rdecode, decodeURIComponent);\n\t\t\t\tvar cookie = parts.slice(1).join('=');\n\n\t\t\t\tif (cookie.charAt(0) === '\"') {\n\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tcookie = converter.read ?\n\t\t\t\t\t\tconverter.read(cookie, name) : converter(cookie, name) ||\n\t\t\t\t\t\tcookie.replace(rdecode, decodeURIComponent);\n\n\t\t\t\t\tif (this.json) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\tresult = cookie;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!key) {\n\t\t\t\t\t\tresult[name] = cookie;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\tapi.get = api.set = api;\n\t\tapi.getJSON = function () {\n\t\t\treturn api.apply({\n\t\t\t\tjson: true\n\t\t\t}, [].slice.call(arguments));\n\t\t};\n\t\tapi.defaults = {};\n\n\t\tapi.remove = function (key, attributes) {\n\t\t\tapi(key, '', extend(attributes, {\n\t\t\t\texpires: -1\n\t\t\t}));\n\t\t};\n\n\t\tapi.withConverter = init;\n\n\t\treturn api;\n\t}\n\n\treturn init(function () {});\n}));\n","import Cookies from 'js-cookie';\nimport extend from 'keen-core/lib/utils/extend';\n\nexport const cookie = function(str){\n if (!arguments.length) return;\n if (this instanceof cookie === false) {\n return new cookie(str);\n }\n\n this.config = {\n key: str,\n options: {\n expires: 365\n }\n };\n this.data = this.get();\n return this;\n}\n\ncookie.prototype.get = function(str){\n var data = {};\n\n if (Cookies.get(this.config.key)) {\n data = Cookies.getJSON(this.config.key);\n }\n if (str && typeof data === 'object' && typeof data !== null) {\n return (typeof data[str] !== 'undefined') ? data[str] : null;\n }\n else {\n return data;\n }\n};\n\ncookie.prototype.set = function(str, value, options){\n if (!arguments.length || !this.enabled()) return this;\n if (typeof str === 'string' && arguments.length >= 2) {\n this.data[str] = value ? value : null;\n }\n else if (typeof str === 'object' && arguments.length === 1) {\n extend(this.data, str);\n }\n Cookies.set(\n this.config.key,\n this.data,\n extend(this.config.options, options || {})\n );\n return this;\n};\n\ncookie.prototype.expire = function(daysUntilExpire){\n if (daysUntilExpire) {\n Cookies.set(\n this.config.key,\n this.data,\n extend(this.config.options, { expires: daysUntilExpire })\n );\n } else {\n Cookies.remove(this.config.key);\n this.data = {};\n }\n return this;\n};\n\ncookie.prototype.options = function(obj){\n if (!arguments.length) return this.config.options;\n this.config.options = (typeof obj === 'object') ? obj : {};\n return this;\n};\n\ncookie.prototype.enabled = function(){\n return navigator.cookieEnabled;\n};\n","export function getUniqueId() {\n // uuidv4\n if (typeof crypto !== 'undefined' && crypto.getRandomValues) {\n // browser\n return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c =>\n (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)\n )\n } else {\n // node & older browsers\n let str = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx';\n return str.replace(/[xy]/g, function(c) {\n let r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);\n return v.toString(16);\n });\n }\n}\n","import extend from 'keen-core/lib/utils/extend';\n\nexport function getScrollState(obj){\n var config = typeof obj === 'object' ? obj : {};\n var state = extend({\n pixel: 0,\n pixel_max: 0,\n ratio: null,\n ratio_max: null\n }, config);\n\n if (typeof window !== undefined || typeof document !== undefined) {\n state.pixel = getScrollOffset() + getWindowHeight();\n if (state.pixel > state.pixel_max) {\n state.pixel_max = state.pixel;\n }\n state.ratio = parseFloat(Number(state.pixel / getScrollableArea()).toFixed(2));\n state.ratio_max = parseFloat(Number(state.pixel_max / getScrollableArea()).toFixed(2));\n }\n\n return state;\n}\n\nfunction getScrollableArea() {\n var body = document.body;\n var html = document.documentElement;\n return Math.max( body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight ) || null;\n}\n\nfunction getScrollOffset() {\n return (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;\n}\n\nfunction getWindowHeight() {\n return window.innerHeight || document.documentElement.clientHeight;\n}\n","import { getDomNodePath } from './getDomNodePath';\n\nexport function getDomNodeProfile(el) {\n return {\n action: el.action,\n class: el.className,\n href: getElementProps(el, 'href'),\n id: getElementProps(el, 'id'),\n event_key: getElementProps(el, 'data-event-key'),\n method: el.method,\n name: el.name,\n node_name: el.nodeName,\n selector: getDomNodePath(el),\n text: getElementProps(el, 'text'),\n title: getElementProps(el, 'title'),\n type: el.type,\n x_position: el.offsetLeft || el.clientLeft || null,\n y_position: el.offsetTop || el.clientTop || null\n };\n}\n\nconst getElementProps = (el, prop) => {\n if (el[prop]) {\n return el[prop];\n }\n if (el.hasAttribute && el.hasAttribute(prop)) {\n return el.getAttribute(prop);\n }\n if (el.parentNode) {\n return getElementProps(el.parentNode, prop);\n }\n return null;\n};\n","function extractHostname(url) {\n var hostname;\n //find & remove protocol (http, ftp, etc.) and get hostname\n\n if (url.indexOf(\"://\") > -1) {\n hostname = url.split('/')[2];\n }\n else {\n hostname = url.split('/')[0];\n }\n\n //find & remove port number\n hostname = hostname.split(':')[0];\n //find & remove \"?\"\n hostname = hostname.split('?')[0];\n\n return hostname;\n}\n\n// To address those who want the \"root domain,\" use this function:\nexport function getDomainName(url) {\n var domain = extractHostname(url),\n splitArr = domain.split('.'),\n arrLen = splitArr.length;\n\n //extracting the root domain here\n //if there is a subdomain\n if (arrLen > 2) {\n domain = splitArr[arrLen - 2] + '.' + splitArr[arrLen - 1];\n //check to see if it's using a Country Code Top Level Domain (ccTLD) (i.e. \".me.uk\")\n if (splitArr[arrLen - 2].length == 2 && splitArr[arrLen - 1].length == 2) {\n //this is using a ccTLD\n domain = splitArr[arrLen - 3] + '.' + domain;\n }\n }\n return domain;\n}\n","export function getDatetimeIndex(input){\n var date = input || new Date();\n return {\n 'hour_of_day' : date.getHours(),\n 'day_of_week' : parseInt( 1 + date.getDay() ),\n 'day_of_month' : date.getDate(),\n 'month' : parseInt( 1 + date.getMonth() ),\n 'year' : date.getFullYear()\n };\n}\n","import { getScreenProfile } from './getScreenProfile';\nimport { getWindowProfile } from './getWindowProfile';\n\nexport function getBrowserProfile() {\n return {\n 'cookies' : ('undefined' !== typeof navigator.cookieEnabled) ? navigator.cookieEnabled : false,\n 'codeName' : navigator.appCodeName,\n 'description': getDocumentDescription(),\n 'language' : navigator.language,\n 'name' : navigator.appName,\n 'online' : navigator.onLine,\n 'platform' : navigator.platform,\n 'useragent' : navigator.userAgent,\n 'version' : navigator.appVersion,\n 'doNotTrack' : navigator.doNotTrack,\n 'screen' : getScreenProfile(),\n 'window' : getWindowProfile()\n }\n}\n\nfunction getDocumentDescription() {\n var el;\n if (document && typeof document.querySelector === 'function') {\n el = document.querySelector('meta[name=\"description\"]');\n }\n return el ? el.content : '';\n}\n","import pkg from '../package.json';\n\nexport function initAutoTrackingCore(lib) {\n return function(obj) {\n const client = this;\n const helpers = lib.helpers;\n const utils = lib.utils;\n\n const options = utils.extend({\n ignoreDisabledFormFields: false,\n ignoreFormFieldTypes: ['password'],\n recordClicks: true,\n recordFormSubmits: true,\n recordPageViews: true,\n recordPageViewsOnExit: false,\n recordScrollState: true,\n shareUuidAcrossDomains: false,\n collectIpAddress: true,\n collectUuid: true,\n recordElementViews: true,\n catchError: undefined // optional, function(someError) - error handler\n }, obj);\n\n if (client.config.requestType === 'beaconAPI' && options.catchError) {\n throw `You cannot use the BeaconAPI and catchError function in the same time, because BeaconAPI ignores errors. For requests with error handling - use requestType: 'fetch'`;\n return;\n }\n\n if (\n client.config.requestType === 'jsonp' // jsonp is deprecated, it's the default value from old keen's client\n ) {\n if (options.catchError) {\n client.config.requestType = 'fetch';\n } else {\n client.config.requestType = 'beaconAPI';\n }\n }\n\n let now = new Date();\n let allTimeOnSiteS = 0;\n let allTimeOnSiteMS = 0;\n if(typeof document !== 'undefined') {\n let hidden;\n let visibilityChange;\n if (typeof document.hidden !== \"undefined\") {\n hidden = \"hidden\";\n visibilityChange = \"visibilitychange\";\n } else if (typeof document.msHidden !== \"undefined\") {\n hidden = \"msHidden\";\n visibilityChange = \"msvisibilitychange\";\n } else if (typeof document.webkitHidden !== \"undefined\") {\n hidden = \"webkitHidden\";\n visibilityChange = \"webkitvisibilitychange\";\n }\n\n const handleVisibilityChange = () => {\n if(document[hidden]) {\n allTimeOnSiteS += getSecondsSinceDate(now);\n allTimeOnSiteMS += getMiliSecondsSinceDate(now);\n return;\n } \n now = new Date();\n }\n if(typeof document.addEventListener !== \"undefined\" ||\n hidden !== undefined){\n document.addEventListener(visibilityChange, handleVisibilityChange, false);\n }\n }\n\n const cookie = new utils.cookie('keen');\n\n const domainName = helpers.getDomainName(window.location.hostname);\n const cookieDomain = domainName && options.shareUuidAcrossDomains ? {\n domain: '.' + domainName\n } : {};\n\n let uuid;\n if (options.collectUuid) {\n uuid = cookie.get('uuid');\n if (!uuid) {\n uuid = helpers.getUniqueId();\n cookie.set('uuid', uuid, cookieDomain);\n }\n }\n\n let initialReferrer = cookie.get('initialReferrer');\n if (!initialReferrer){\n initialReferrer = document && document.referrer || undefined;\n cookie.set('initialReferrer', initialReferrer, cookieDomain);\n }\n\n let scrollState = {};\n if (options.recordScrollState) {\n scrollState = helpers.getScrollState();\n utils.listener('window').on('scroll', () => {\n scrollState = helpers.getScrollState(scrollState);\n });\n }\n\n const addons = [\n {\n name: 'keen:ua_parser',\n input: {\n ua_string: 'user_agent'\n },\n output: 'tech'\n },\n {\n name: 'keen:url_parser',\n input: {\n url: 'url.full'\n },\n output: 'url.info'\n },\n {\n name: 'keen:url_parser',\n input: {\n url: 'referrer.full'\n },\n output: 'referrer.info'\n },\n {\n name: 'keen:date_time_parser',\n input: {\n date_time: 'keen.timestamp'\n },\n output: 'time.utc'\n },\n {\n name: 'keen:date_time_parser',\n input: {\n date_time: 'local_time_full'\n },\n output: 'time.local'\n }\n ];\n\n let ip_address = '${keen.ip}';\n addons.push({\n name: 'keen:ip_to_geo',\n input: {\n ip: 'ip_address',\n remove_ip_property: !options.collectIpAddress\n },\n output : 'geo'\n });\n\n client.extendEvents(function() {\n const browserProfile = helpers.getBrowserProfile();\n return {\n tracked_by: pkg.name + '-' + pkg.version,\n local_time_full: new Date().toISOString(),\n user: {\n uuid\n },\n page: {\n title: document ? document.title : null,\n description: browserProfile.description,\n scroll_state: scrollState,\n time_on_page: allTimeOnSiteS > 0 ? allTimeOnSiteS : getSecondsSinceDate(now),\n time_on_page_ms: allTimeOnSiteMS > 0 ? allTimeOnSiteMS : getMiliSecondsSinceDate(now)\n },\n\n ip_address,\n geo: { /* Enriched */ },\n\n user_agent: '${keen.user_agent}',\n tech: {\n profile: browserProfile\n /* Enriched */\n },\n\n url: {\n full: window ? window.location.href : '',\n info: { /* Enriched */ }\n },\n\n referrer: {\n initial: initialReferrer,\n full: document ? document.referrer : '',\n info: { /* Enriched */ }\n },\n\n time: {\n local: { /* Enriched */ },\n utc: { /* Enriched */ }\n },\n\n keen: {\n timestamp: new Date().toISOString(),\n addons,\n }\n };\n });\n\n if (options.recordClicks === true) {\n utils.listener('a, a *').on('click', function(e) {\n const el = e.target;\n const event = {\n element: helpers.getDomNodeProfile(el),\n local_time_full: new Date().toISOString()\n };\n\n if (options.catchError) {\n return client\n .recordEvent({\n collection: 'clicks',\n event\n }).catch(err => {\n options.catchError(err);\n });\n }\n\n return client\n .recordEvent({\n collection: 'clicks',\n event\n });\n });\n }\n\n if (options.recordFormSubmits === true) {\n utils.listener('form').on('submit', function(e) {\n const el = e.target;\n const serializerOptions = {\n disabled: options.ignoreDisabledFormFields,\n ignoreTypes: options.ignoreFormFieldTypes\n };\n const event = {\n form: {\n action: el.action,\n fields: utils.serializeForm(el, serializerOptions),\n method: el.method\n },\n element: helpers.getDomNodeProfile(el),\n local_time_full: new Date().toISOString()\n };\n\n if (options.catchError) {\n return client\n .recordEvent({\n collection: 'form_submissions',\n event\n })\n .catch(err => {\n options.catchError(err);\n });\n }\n\n return client.recordEvent({\n collection: 'form_submissions',\n event\n });\n });\n }\n\n if (options.recordPageViews === true && !options.recordPageViewsOnExit) {\n if (options.catchError) {\n client\n .recordEvent({\n collection: 'pageviews'\n })\n .catch(err => {\n options.catchError(err);\n });\n } else {\n client\n .recordEvent({\n collection: 'pageviews'\n });\n }\n }\n\n if (options.recordPageViewsOnExit && typeof window !== 'undefined') {\n window.addEventListener('beforeunload', () => {\n client.config.requestType = 'beaconAPI'; // you can run beforeunload only with beaconAPI\n client.recordEvent({\n collection: 'pageviews'\n });\n });\n }\n\n if(options.recordElementViews === true){\n if(typeof IntersectionObserver !== 'undefined'){\n const elementViewsOptions = {\n threshold: 1.0,\n }\n const elementViewsCallback = (events, observer) => {\n events.forEach(el => {\n if(el.isIntersecting){\n const event = {\n element: helpers.getDomNodeProfile(el.target),\n local_time_full: new Date().toISOString()\n }\n if (options.catchError) {\n return client\n .recordEvent({\n collection: 'element_views',\n event\n }).catch(err => {\n options.catchError(err);\n });\n }\n\n return client\n .recordEvent({\n collection: 'element_views',\n event\n });\n }\n })\n }\n const observer = new IntersectionObserver(elementViewsCallback, elementViewsOptions);\n const target = document.querySelectorAll('.track-element-view');\n target.forEach(el => {\n observer.observe(el);\n });\n client.observers.IntersectionObserver = observer;\n }\n }\n\n return client;\n };\n}\n\nfunction getSecondsSinceDate(date) {\n return Math.round(getMiliSecondsSinceDate(date) / 1000);\n}\n\nfunction getMiliSecondsSinceDate(date) {\n return new Date().getTime() - date.getTime();\n}\n","import Keen from './index';\nimport each from 'keen-core/lib/utils/each';\nimport { queue } from './utils/queue';\n\nexport function deferEvent(eventCollection, eventBody){\n\n if (arguments.length !== 2 || typeof eventCollection !== 'string') {\n handleValidationError.call(this, 'Incorrect arguments provided to #deferEvent method');\n return;\n }\n\n this.queue.events[eventCollection] = this.queue.events[eventCollection] || [];\n this.queue.events[eventCollection].push(eventBody);\n this.queue.capacity++;\n if (!this.queue.timer) {\n this.queue.start();\n }\n this.emit('deferEvent', eventCollection, eventBody);\n return this;\n}\n\nexport function deferEvents(eventsHash){\n var self = this;\n\n if (arguments.length !== 1 || typeof eventsHash !== 'object') {\n handleValidationError.call(this, 'Incorrect arguments provided to #deferEvents method');\n return;\n }\n\n each(eventsHash, function(eventList, eventCollection){\n self.queue.events[eventCollection] = self.queue.events[eventCollection] || [];\n self.queue.events[eventCollection] = self.queue.events[eventCollection].concat(eventList);\n self.queue.capacity = self.queue.capacity + eventList.length;\n if (!self.queue.timer) {\n self.queue.start();\n }\n });\n self.emit('deferEvents', eventsHash);\n return self;\n}\n\nexport function queueCapacity(num){\n if (!arguments.length) return this.queue.config.capacity;\n this.queue.config.capacity = num ? Number(num): 0;\n this.queue.check();\n return this;\n}\n\nexport function queueInterval(num){\n if (!arguments.length) return this.queue.config.interval;\n this.queue.config.interval = num ? Number(num): 0;\n this.queue.check();\n return this;\n}\n\nexport function recordDeferredEvents(){\n const self = this;\n\n if (self.queue.capacity > 0) {\n self.queue.pause();\n let clonedQueueConfig = { ...self.queue.config };\n let clonedQueueEvents = { ...self.queue.events };\n self.queue = queue();\n self.queue.config = clonedQueueConfig;\n self.queue.on('flush', function(){\n self.recordDeferredEvents();\n });\n self.emit('recordDeferredEvents', clonedQueueEvents);\n self.recordEvents(clonedQueueEvents, (err, res) => {\n if (err) {\n self.emit('recordDeferredEventsError', err, clonedQueueEvents);\n }\n });\n }\n return self;\n}\n\nfunction handleValidationError(message){\n this.emit('error', `Event(s) not deferred: ${message}`);\n}\n","import 'promise-polyfill/src/polyfill';\nimport 'whatwg-fetch';\n\nimport md5 from './md5';\n\nimport configDefault from '../config-default.js';\n\nif (typeof self === 'undefined') {\n console.log('IndexedDB is available only in Browser ENV');\n}\n\nconst indexedDBAvailable = typeof self !== 'undefined' && 'indexedDB' in self;\n\nlet cachingEnabled = true;\n\nif (!indexedDBAvailable) {\n // console.log(\"Your browser doesn't support a stable version of IndexedDB.\");\n cachingEnabled = false; // graceful degradation\n}\n\nlet db;\nlet cacheConfig = {\n ...configDefault.cache\n};\n\nfunction initializeIndexedDb(requestCacheConfig = {}){\n if (db) { return Promise.resolve(); }\n if (!cachingEnabled) { return Promise.resolve(); }\n cacheConfig = {\n ...cacheConfig,\n ...requestCacheConfig\n };\n return new Promise((resolve, reject) => {\n const dbConnectionRequest = self.indexedDB.open(cacheConfig.dbName);\n dbConnectionRequest.onerror = function(event) {\n cachingEnabled = false;\n resolve();\n };\n\n dbConnectionRequest.onupgradeneeded = function(event) {\n const db = event.target.result;\n const objectStore = db\n .createObjectStore(cacheConfig.dbCollectionName,\n { keyPath: cacheConfig.dbCollectionKey });\n objectStore.createIndex(\n cacheConfig.dbCollectionKey,\n cacheConfig.dbCollectionKey,\n { unique: true }\n );\n objectStore.createIndex('expiryTime', 'expiryTime', { unique: false });\n };\n\n dbConnectionRequest.onsuccess = function(event) {\n db = event.target.result;\n db.onerror = function(event) {\n cachingEnabled = false; // graceful degradation\n };\n resolve(db);\n };\n });\n}\n\nexport const saveToCache = (hash, configOptions = {}) => {\n return initializeIndexedDb(configOptions).then(() => {\n const transactionSave = db\n .transaction(cacheConfig.dbCollectionName, \"readwrite\")\n .objectStore(cacheConfig.dbCollectionName);\n const requestSave = transactionSave.add({\n hash,\n expiryTime: Date.now() + cacheConfig.maxAge\n });\n requestSave.onsuccess = function(event) {\n };\n requestSave.onerror = function(event) {\n cachingEnabled = false;\n };\n });\n}\n\nexport const getFromCache = (hash, configOptions = {}) => {\n return initializeIndexedDb(configOptions).then(() => {\n return new Promise((resolve, reject) => {\n if (!cachingEnabled) {\n return resolve(null);\n }\n\n const transactionCleanUp = db\n .transaction(cacheConfig.dbCollectionName, \"readwrite\")\n .objectStore(cacheConfig.dbCollectionName);\n const indexCleanUp = transactionCleanUp.index('expiryTime');\n const upperBoundOpenKeyRange = IDBKeyRange.upperBound(Date.now(), true);\n indexCleanUp.openCursor(upperBoundOpenKeyRange).onsuccess = function(event) {\n let cursor = event.target.result;\n if (cursor) {\n let transactionDelete = db\n .transaction(cacheConfig.dbCollectionName, \"readwrite\")\n .objectStore(cacheConfig.dbCollectionName)\n .delete(event.target.result.value[cacheConfig.dbCollectionKey]);\n cursor.continue();\n }\n };\n\n const transactionIndex = db\n .transaction(cacheConfig.dbCollectionName, \"readwrite\")\n .objectStore(cacheConfig.dbCollectionName);\n const index = transactionIndex.index(cacheConfig.dbCollectionKey);\n const responseFromCache = index.get(hash);\n responseFromCache.onsuccess = function(event) {\n if (!event.target.result ||\n event.target.result.expiryTime < Date.now()\n ) {\n if (event.target.result && event.target.result.expiryTime < Date.now()){\n const transactionDelete = db\n .transaction(cacheConfig.dbCollectionName, \"readwrite\")\n .objectStore(cacheConfig.dbCollectionName)\n .delete(event.target.result[cacheConfig.dbCollectionKey]);\n transactionDelete.onsuccess = (event) => {\n resolve(getFromCache(hash, configOptions));\n };\n transactionDelete.onerror = (event) => {\n cachingEnabled = false;\n resolve(getFromCache(hash, configOptions));\n };\n return resolve(null);\n }\n return resolve(null);\n } else {\n return resolve(event.target.result);\n }\n };\n responseFromCache.onerror = function(event) {\n cachingEnabled = false;\n resolve(getFromCache(hash, configOptions));\n };\n });\n });\n}\n","import 'promise-polyfill/src/polyfill';\n\nimport md5 from './md5';\nimport { getFromCache, saveToCache } from './cache-browser';\n\nimport configDefault from '../config-default.js';\n\nlet uniqueIds = [];\n\nexport const isUnique = (customCacheConfig, extendedEventBody) => {\n const configCache = { ...configDefault.cache, ...customCacheConfig.cache };\n const stringifiedEvent = JSON.stringify(extendedEventBody);\n const { hashingMethod } = configCache;\n const hash = hashingMethod && hashingMethod.toLowerCase() === 'md5'\n ? md5(stringifiedEvent) : stringifiedEvent;\n const expiryTime = configCache.maxAge ? (Date.now() + configCache.maxAge) : undefined;\n const item = {\n hash,\n expiryTime\n };\n if (expiryTime){\n const now = Date.now();\n uniqueIds = uniqueIds.filter(item => item.expiryTime > now);\n }\n\n const alreadySentEvent = uniqueIds.find(item => item.hash === hash);\n if (alreadySentEvent) {\n if (alreadySentEvent.expiryTime && alreadySentEvent.expiryTime < Date.now()) {\n uniqueIds = uniqueIds.filter(item => item.hash !== hash);\n } else {\n return Promise.resolve(false);\n }\n }\n uniqueIds.push(item);\n if (configCache.storage && configCache.storage.toLowerCase() === 'indexeddb') {\n return getFromCache(hash, configCache).then(alreadySentEvent => {\n if (alreadySentEvent) {\n return false;\n }\n saveToCache(hash, configCache);\n return true;\n });\n }\n\n return Promise.resolve(true);\n}\n\nexport default isUnique;\n","import 'promise-polyfill/src/polyfill';\nimport 'whatwg-fetch';\n\nimport configDefault from '../config-default.js';\n\nexport default function(url, options) {\n const config = {\n ...configDefault,\n ...(options.retry || {})\n };\n\n const retriesLimit = config.retry.limit;\n const retryInitialDelay = config.retry.initialDelay;\n const retryOn = config.retry.retryOnResponseStatuses;\n let retriesCount = 0;\n\n if (retryOn && !(retryOn instanceof Array)) {\n throw {\n name: 'ArgumentError',\n message: 'retryOn property expects an array'\n }\n }\n\n return new Promise(function(resolve, reject) {\n const wrappedFetch = function(n) {\n fetch(url, options)\n .then(function(response) {\n if (retryOn.indexOf(response.status) === -1) {\n resolve(response);\n } else {\n if (n > 0) {\n retry();\n } else {\n reject(response);\n }\n }\n })\n .catch(function(error) {\n if (n > 0) {\n retry();\n } else {\n reject(error);\n }\n });\n };\n\n function retry() {\n retriesCount = retriesCount + 1;\n setTimeout(function() {\n wrappedFetch(retriesLimit - retriesCount);\n }, 2^retriesCount * retryInitialDelay);\n }\n\n wrappedFetch(retriesLimit - retriesCount);\n });\n};\n","module.exports = {\n map: \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",\n encode: function (n) {\n \"use strict\";\n var o = \"\", i = 0, m = this.map, i1, i2, i3, e1, e2, e3, e4;\n n = this.utf8.encode(n);\n while (i < n.length) {\n i1 = n.charCodeAt(i++); i2 = n.charCodeAt(i++); i3 = n.charCodeAt(i++);\n e1 = (i1 >> 2); e2 = (((i1 & 3) << 4) | (i2 >> 4)); e3 = (isNaN(i2) ? 64 : ((i2 & 15) << 2) | (i3 >> 6));\n e4 = (isNaN(i2) || isNaN(i3)) ? 64 : i3 & 63;\n o = o + m.charAt(e1) + m.charAt(e2) + m.charAt(e3) + m.charAt(e4);\n } return o;\n },\n decode: function (n) {\n \"use strict\";\n var o = \"\", i = 0, m = this.map, cc = String.fromCharCode, e1, e2, e3, e4, c1, c2, c3;\n n = n.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\n while (i < n.length) {\n e1 = m.indexOf(n.charAt(i++)); e2 = m.indexOf(n.charAt(i++));\n e3 = m.indexOf(n.charAt(i++)); e4 = m.indexOf(n.charAt(i++));\n c1 = (e1 << 2) | (e2 >> 4); c2 = ((e2 & 15) << 4) | (e3 >> 2);\n c3 = ((e3 & 3) << 6) | e4;\n o = o + (cc(c1) + ((e3 != 64) ? cc(c2) : \"\")) + (((e4 != 64) ? cc(c3) : \"\"));\n } return this.utf8.decode(o);\n },\n utf8: {\n encode: function (n) {\n \"use strict\";\n var o = \"\", i = 0, cc = String.fromCharCode, c;\n while (i < n.length) {\n c = n.charCodeAt(i++); o = o + ((c < 128) ? cc(c) : ((c > 127) && (c < 2048)) ?\n (cc((c >> 6) | 192) + cc((c & 63) | 128)) : (cc((c >> 12) | 224) + cc(((c >> 6) & 63) | 128) + cc((c & 63) | 128)));\n } return o;\n },\n decode: function (n) {\n \"use strict\";\n var o = \"\", i = 0, cc = String.fromCharCode, c2, c;\n while (i < n.length) {\n c = n.charCodeAt(i);\n o = o + ((c < 128) ? [cc(c), i++][0] : ((c > 191) && (c < 224)) ?\n [cc(((c & 31) << 6) | ((c2 = n.charCodeAt(i + 1)) & 63)), (i += 2)][0] :\n [cc(((c & 15) << 12) | (((c2 = n.charCodeAt(i + 1)) & 63) << 6) | ((c3 = n.charCodeAt(i + 2)) & 63)), (i += 3)][0]);\n } return o;\n }\n }\n};\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function(handle) {\n process.nextTick(function () { runIfPresent(handle); });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function() {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function(event) {\n if (event.source === global &&\n typeof event.data === \"string\" &&\n event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function(event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function(handle) {\n // Create a