mixpanel-browser 2.78.0 → 2.80.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/.eslintrc.json +12 -0
  2. package/.github/workflows/integration-tests.yml +1 -0
  3. package/.github/workflows/openfeature-provider-tests.yml +31 -0
  4. package/CHANGELOG.md +14 -1
  5. package/build.sh +2 -2
  6. package/dist/async-modules/{mixpanel-recorder-BjSlYaNJ.min.js → mixpanel-recorder-B61POiHc.min.js} +2 -2
  7. package/dist/async-modules/mixpanel-recorder-B61POiHc.min.js.map +1 -0
  8. package/dist/async-modules/{mixpanel-recorder-zMBXIyeG.js → mixpanel-recorder-C3AW7mPl.js} +63 -35
  9. package/dist/async-modules/{mixpanel-targeting-UHf4eBfC.js → mixpanel-targeting-CBwOQJZw.js} +24 -13
  10. package/dist/async-modules/mixpanel-targeting-kdl-eE-1.min.js +2 -0
  11. package/dist/async-modules/mixpanel-targeting-kdl-eE-1.min.js.map +1 -0
  12. package/dist/mixpanel-core.cjs.d.ts +45 -1
  13. package/dist/mixpanel-core.cjs.js +577 -209
  14. package/dist/mixpanel-recorder.js +63 -35
  15. package/dist/mixpanel-recorder.min.js +1 -1
  16. package/dist/mixpanel-recorder.min.js.map +1 -1
  17. package/dist/mixpanel-targeting.js +24 -13
  18. package/dist/mixpanel-targeting.min.js +1 -1
  19. package/dist/mixpanel-targeting.min.js.map +1 -1
  20. package/dist/mixpanel-with-async-modules.cjs.d.ts +45 -1
  21. package/dist/mixpanel-with-async-modules.cjs.js +579 -211
  22. package/dist/mixpanel-with-async-recorder.cjs.d.ts +45 -1
  23. package/dist/mixpanel-with-async-recorder.cjs.js +579 -211
  24. package/dist/mixpanel-with-recorder.d.ts +45 -1
  25. package/dist/mixpanel-with-recorder.js +508 -136
  26. package/dist/mixpanel-with-recorder.min.d.ts +45 -1
  27. package/dist/mixpanel-with-recorder.min.js +1 -1
  28. package/dist/mixpanel.amd.d.ts +45 -1
  29. package/dist/mixpanel.amd.js +508 -136
  30. package/dist/mixpanel.cjs.d.ts +45 -1
  31. package/dist/mixpanel.cjs.js +508 -136
  32. package/dist/mixpanel.globals.js +579 -211
  33. package/dist/mixpanel.min.js +200 -190
  34. package/dist/mixpanel.module.d.ts +45 -1
  35. package/dist/mixpanel.module.js +508 -136
  36. package/dist/mixpanel.umd.d.ts +45 -1
  37. package/dist/mixpanel.umd.js +508 -136
  38. package/package.json +1 -1
  39. package/packages/openfeature-web-provider/README.md +357 -0
  40. package/packages/openfeature-web-provider/package-lock.json +1636 -0
  41. package/packages/openfeature-web-provider/package.json +51 -0
  42. package/packages/openfeature-web-provider/rollup.config.browser.mjs +26 -0
  43. package/packages/openfeature-web-provider/src/MixpanelProvider.ts +302 -0
  44. package/packages/openfeature-web-provider/src/index.ts +1 -0
  45. package/packages/openfeature-web-provider/src/types.ts +72 -0
  46. package/packages/openfeature-web-provider/test/MixpanelProvider.spec.ts +484 -0
  47. package/packages/openfeature-web-provider/tsconfig.json +15 -0
  48. package/src/autocapture/index.js +17 -12
  49. package/src/config.js +1 -1
  50. package/src/flags/flags-persistence.js +176 -0
  51. package/src/flags/index.js +176 -25
  52. package/src/index.d.ts +45 -1
  53. package/src/mixpanel-core.js +24 -7
  54. package/src/recorder/idb-config.js +16 -0
  55. package/src/recorder/recording-registry.js +7 -2
  56. package/src/recorder/session-recording.js +15 -6
  57. package/src/recorder-manager.js +7 -2
  58. package/src/request-queue.js +1 -2
  59. package/src/shared-lock.js +2 -3
  60. package/src/storage/indexed-db.js +16 -15
  61. package/src/storage/local-storage.js +5 -3
  62. package/src/utils.js +25 -12
  63. package/tsconfig.base.json +9 -0
  64. package/.claude/settings.local.json +0 -16
  65. package/dist/async-modules/mixpanel-recorder-BjSlYaNJ.min.js.map +0 -1
  66. package/dist/async-modules/mixpanel-targeting-BSHal4N9.min.js +0 -2
  67. package/dist/async-modules/mixpanel-targeting-BSHal4N9.min.js.map +0 -1
@@ -27,7 +27,7 @@
27
27
  }
28
28
 
29
29
  var Config = {
30
- LIB_VERSION: '2.78.0'
30
+ LIB_VERSION: '2.80.0'
31
31
  };
32
32
  var RECORDER_GLOBAL_NAME = '__mp_recorder';
33
33
 
@@ -19089,6 +19089,7 @@
19089
19089
  var console_with_prefix = function(prefix) {
19090
19090
  return {
19091
19091
  log: log_func_with_prefix(console$1.log, prefix),
19092
+ warn: log_func_with_prefix(console$1.warn, prefix),
19092
19093
  error: log_func_with_prefix(console$1.error, prefix),
19093
19094
  critical: log_func_with_prefix(console$1.critical, prefix)
19094
19095
  };
@@ -20012,7 +20013,8 @@
20012
20013
  if (_localStorageSupported !== null && !forceCheck) {
20013
20014
  return _localStorageSupported;
20014
20015
  }
20015
- return _localStorageSupported = _testStorageSupported(storage || win.localStorage);
20016
+
20017
+ return _localStorageSupported = _testStorageSupported(storage);
20016
20018
  };
20017
20019
 
20018
20020
  var _sessionStorageSupported = null;
@@ -20020,7 +20022,8 @@
20020
20022
  if (_sessionStorageSupported !== null && !forceCheck) {
20021
20023
  return _sessionStorageSupported;
20022
20024
  }
20023
- return _sessionStorageSupported = _testStorageSupported(storage || win.sessionStorage);
20025
+
20026
+ return _sessionStorageSupported = _testStorageSupported(storage);
20024
20027
  };
20025
20028
 
20026
20029
  function _storageWrapper(storage, name, is_supported_fn) {
@@ -20070,17 +20073,26 @@
20070
20073
  };
20071
20074
  }
20072
20075
 
20073
- // Safari errors out accessing localStorage/sessionStorage when cookies are disabled,
20074
- // so create dummy storage wrappers that silently fail as a fallback.
20075
- var windowLocalStorage = null, windowSessionStorage = null;
20076
- try {
20077
- windowLocalStorage = win.localStorage;
20078
- windowSessionStorage = win.sessionStorage;
20079
- // eslint-disable-next-line no-empty
20080
- } catch (_err) {}
20076
+ // Safari and other browsers may error out accessing localStorage/sessionStorage
20077
+ // when cookies are disabled, so wrap access in a try-catch.
20078
+ var getLocalStorage = function() {
20079
+ try {
20080
+ return win.localStorage; // eslint-disable-line no-restricted-properties
20081
+ } catch (_err) {
20082
+ return null;
20083
+ }
20084
+ };
20081
20085
 
20082
- _.localStorage = _storageWrapper(windowLocalStorage, 'localStorage', localStorageSupported);
20083
- _.sessionStorage = _storageWrapper(windowSessionStorage, 'sessionStorage', sessionStorageSupported);
20086
+ var getSessionStorage = function() {
20087
+ try {
20088
+ return win.sessionStorage; // eslint-disable-line no-restricted-properties
20089
+ } catch (_err) {
20090
+ return null;
20091
+ }
20092
+ };
20093
+
20094
+ _.localStorage = _storageWrapper(getLocalStorage(), 'localStorage', localStorageSupported);
20095
+ _.sessionStorage = _storageWrapper(getSessionStorage(), 'sessionStorage', sessionStorageSupported);
20084
20096
 
20085
20097
  _.register_event = (function() {
20086
20098
  // written by Dean Edwards, 2005
@@ -20735,29 +20747,26 @@
20735
20747
  _['toArray'] = _.toArray;
20736
20748
  _['NPO'] = NpoPromise;
20737
20749
 
20738
- var MIXPANEL_DB_NAME = 'mixpanelBrowserDb';
20739
-
20740
- var RECORDING_EVENTS_STORE_NAME = 'mixpanelRecordingEvents';
20741
- var RECORDING_REGISTRY_STORE_NAME = 'mixpanelRecordingRegistry';
20742
-
20743
- // note: increment the version number when adding new object stores
20744
- var DB_VERSION = 1;
20745
- var OBJECT_STORES = [RECORDING_EVENTS_STORE_NAME, RECORDING_REGISTRY_STORE_NAME];
20746
-
20747
20750
  /**
20748
20751
  * @type {import('./wrapper').StorageWrapper}
20749
20752
  */
20750
- var IDBStorageWrapper = function (storeName) {
20753
+ var IDBStorageWrapper = function (dbName, storeName, versionData) {
20754
+ this.dbName = dbName;
20755
+ this.storeName = storeName;
20756
+ this.version = versionData.version;
20757
+ this.storeNamesInDb = versionData.storeNames;
20751
20758
  /**
20752
20759
  * @type {Promise<IDBDatabase>|null}
20753
20760
  */
20754
20761
  this.dbPromise = null;
20755
- this.storeName = storeName;
20756
20762
  };
20757
20763
 
20758
20764
  IDBStorageWrapper.prototype._openDb = function () {
20765
+ var dbName = this.dbName;
20766
+ var version = this.version;
20767
+ var storeNamesInDb = this.storeNamesInDb;
20759
20768
  return new PromisePolyfill(function (resolve, reject) {
20760
- var openRequest = win.indexedDB.open(MIXPANEL_DB_NAME, DB_VERSION);
20769
+ var openRequest = win.indexedDB.open(dbName, version);
20761
20770
  openRequest['onerror'] = function () {
20762
20771
  reject(openRequest.error);
20763
20772
  };
@@ -20769,8 +20778,10 @@
20769
20778
  openRequest['onupgradeneeded'] = function (ev) {
20770
20779
  var db = ev.target.result;
20771
20780
 
20772
- OBJECT_STORES.forEach(function (storeName) {
20773
- db.createObjectStore(storeName);
20781
+ storeNamesInDb.forEach(function (storeName) {
20782
+ if (!db.objectStoreNames.contains(storeName)) {
20783
+ db.createObjectStore(storeName);
20784
+ }
20774
20785
  });
20775
20786
  };
20776
20787
  });
@@ -20862,6 +20873,16 @@
20862
20873
  });
20863
20874
  };
20864
20875
 
20876
+ var MIXPANEL_BROWSER_DB_NAME = 'mixpanelBrowserDb';
20877
+ var RECORDING_EVENTS_STORE_NAME = 'mixpanelRecordingEvents';
20878
+ var RECORDING_REGISTRY_STORE_NAME = 'mixpanelRecordingRegistry';
20879
+
20880
+ // Keeping these two properties closeby, as adding additional stores to a DB in IndexedDB requires a version increment
20881
+ var RECORDER_VERSION_DATA = {
20882
+ version: 1,
20883
+ storeNames: [RECORDING_EVENTS_STORE_NAME, RECORDING_REGISTRY_STORE_NAME]
20884
+ };
20885
+
20865
20886
  /**
20866
20887
  * GDPR utils
20867
20888
  *
@@ -21056,7 +21077,7 @@
21056
21077
  options = options || {};
21057
21078
 
21058
21079
  this.storageKey = key;
21059
- this.storage = options.storage || win.localStorage;
21080
+ this.storage = options.storage || getLocalStorage();
21060
21081
  this.pollIntervalMS = options.pollIntervalMS || 100;
21061
21082
  this.timeoutMS = options.timeoutMS || 2000;
21062
21083
 
@@ -21184,10 +21205,13 @@
21184
21205
  * @type {import('./wrapper').StorageWrapper}
21185
21206
  */
21186
21207
  var LocalStorageWrapper = function (storageOverride) {
21187
- this.storage = storageOverride || win.localStorage;
21208
+ this.storage = storageOverride || getLocalStorage();
21188
21209
  };
21189
21210
 
21190
21211
  LocalStorageWrapper.prototype.init = function () {
21212
+ if (!this.storage) {
21213
+ return PromisePolyfill.reject(new Error('localStorage is not available'));
21214
+ }
21191
21215
  return PromisePolyfill.resolve();
21192
21216
  };
21193
21217
 
@@ -21254,7 +21278,7 @@
21254
21278
  if (this.usePersistence) {
21255
21279
  this.queueStorage = options.queueStorage || new LocalStorageWrapper();
21256
21280
  this.lock = new SharedLock(storageKey, {
21257
- storage: options.sharedLockStorage || win.localStorage,
21281
+ storage: options.sharedLockStorage,
21258
21282
  timeoutMS: options.sharedLockTimeoutMS,
21259
21283
  });
21260
21284
  }
@@ -22906,14 +22930,15 @@
22906
22930
 
22907
22931
  this.recordMaxMs = MAX_RECORDING_MS;
22908
22932
  this.recordMinMs = 0;
22933
+ this._recordMinMsCheckStart = null;
22909
22934
 
22910
22935
  // disable persistence if localStorage is not supported
22911
22936
  // request-queue will automatically disable persistence if indexedDB fails to initialize
22912
- var usePersistence = localStorageSupported(options.sharedLockStorage, true) && !this.getConfig('disable_persistence');
22937
+ var usePersistence = localStorageSupported(options.sharedLockStorage || getLocalStorage(), true) && !this.getConfig('disable_persistence');
22913
22938
 
22914
22939
  // each replay has its own batcher key to avoid conflicts between rrweb events of different recordings
22915
22940
  this.batcherKey = '__mprec_' + this.getConfig('name') + '_' + this.getConfig('token') + '_' + this.replayId;
22916
- this.queueStorage = new IDBStorageWrapper(RECORDING_EVENTS_STORE_NAME);
22941
+ this.queueStorage = new IDBStorageWrapper(MIXPANEL_BROWSER_DB_NAME, RECORDING_EVENTS_STORE_NAME, RECORDER_VERSION_DATA);
22917
22942
  this.batcher = new RequestBatcher(this.batcherKey, {
22918
22943
  errorReporter: this.reportError.bind(this),
22919
22944
  flushOnlyOnInterval: true,
@@ -23021,6 +23046,7 @@
23021
23046
  // this also applies if the minimum recording length has not been hit yet
23022
23047
  // so that we don't send data until we know the recording will be long enough
23023
23048
  this.batcher.stop();
23049
+ this._recordMinMsCheckStart = null;
23024
23050
  } else {
23025
23051
  this.batcher.start();
23026
23052
  }
@@ -23072,9 +23098,11 @@
23072
23098
  this._onIdleTimeout();
23073
23099
  return;
23074
23100
  }
23101
+ if (this._recordMinMsCheckStart === null) {
23102
+ this._recordMinMsCheckStart = ev.timestamp;
23103
+ }
23075
23104
  if (isUserEvent(ev)) {
23076
- if (this.batcher.stopped && new Date().getTime() - this.replayStartTime >= this.recordMinMs) {
23077
- // start flushing again after user activity
23105
+ if (this.batcher.stopped && ev.timestamp - this._recordMinMsCheckStart >= this.recordMinMs) {
23078
23106
  this.batcher.start();
23079
23107
  }
23080
23108
  resetIdleTimeout();
@@ -23403,7 +23431,7 @@
23403
23431
  */
23404
23432
  var RecordingRegistry = function (options) {
23405
23433
  /** @type {IDBStorageWrapper} */
23406
- this.idb = new IDBStorageWrapper(RECORDING_REGISTRY_STORE_NAME);
23434
+ this.idb = new IDBStorageWrapper(MIXPANEL_BROWSER_DB_NAME, RECORDING_REGISTRY_STORE_NAME, RECORDER_VERSION_DATA);
23407
23435
  this.errorReporter = options.errorReporter;
23408
23436
  this.mixpanelInstance = options.mixpanelInstance;
23409
23437
  this.sharedLockStorage = options.sharedLockStorage;
@@ -27,7 +27,7 @@
27
27
  }
28
28
 
29
29
  var Config = {
30
- LIB_VERSION: '2.78.0'
30
+ LIB_VERSION: '2.80.0'
31
31
  };
32
32
 
33
33
  // Window global names for async modules
@@ -1340,7 +1340,8 @@
1340
1340
  if (_localStorageSupported !== null && !forceCheck) {
1341
1341
  return _localStorageSupported;
1342
1342
  }
1343
- return _localStorageSupported = _testStorageSupported(storage || win.localStorage);
1343
+
1344
+ return _localStorageSupported = _testStorageSupported(storage);
1344
1345
  };
1345
1346
 
1346
1347
  var _sessionStorageSupported = null;
@@ -1348,7 +1349,8 @@
1348
1349
  if (_sessionStorageSupported !== null && !forceCheck) {
1349
1350
  return _sessionStorageSupported;
1350
1351
  }
1351
- return _sessionStorageSupported = _testStorageSupported(storage || win.sessionStorage);
1352
+
1353
+ return _sessionStorageSupported = _testStorageSupported(storage);
1352
1354
  };
1353
1355
 
1354
1356
  function _storageWrapper(storage, name, is_supported_fn) {
@@ -1391,17 +1393,26 @@
1391
1393
  };
1392
1394
  }
1393
1395
 
1394
- // Safari errors out accessing localStorage/sessionStorage when cookies are disabled,
1395
- // so create dummy storage wrappers that silently fail as a fallback.
1396
- var windowLocalStorage = null, windowSessionStorage = null;
1397
- try {
1398
- windowLocalStorage = win.localStorage;
1399
- windowSessionStorage = win.sessionStorage;
1400
- // eslint-disable-next-line no-empty
1401
- } catch (_err) {}
1396
+ // Safari and other browsers may error out accessing localStorage/sessionStorage
1397
+ // when cookies are disabled, so wrap access in a try-catch.
1398
+ var getLocalStorage = function() {
1399
+ try {
1400
+ return win.localStorage; // eslint-disable-line no-restricted-properties
1401
+ } catch (_err) {
1402
+ return null;
1403
+ }
1404
+ };
1405
+
1406
+ var getSessionStorage = function() {
1407
+ try {
1408
+ return win.sessionStorage; // eslint-disable-line no-restricted-properties
1409
+ } catch (_err) {
1410
+ return null;
1411
+ }
1412
+ };
1402
1413
 
1403
- _.localStorage = _storageWrapper(windowLocalStorage, 'localStorage', localStorageSupported);
1404
- _.sessionStorage = _storageWrapper(windowSessionStorage, 'sessionStorage', sessionStorageSupported);
1414
+ _.localStorage = _storageWrapper(getLocalStorage(), 'localStorage', localStorageSupported);
1415
+ _.sessionStorage = _storageWrapper(getSessionStorage(), 'sessionStorage', sessionStorageSupported);
1405
1416
 
1406
1417
  _.register_event = (function() {
1407
1418
  // written by Dean Edwards, 2005
@@ -0,0 +1,2 @@
1
+ (function(){"use strict";var v;if(typeof window=="undefined"){var H={hostname:""};v={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:H,referrer:""},screen:{width:0,height:0},location:H,addEventListener:function(){},removeEventListener:function(){},dispatchEvent:function(){},CustomEvent:function(){}}}else v=window;var de={LIB_VERSION:"2.80.0"},ge="__mp_targeting",q=v.setImmediate,S,$,F,V=Object.prototype.toString,ye=typeof q!="undefined"?function(r){return q(r)}:setTimeout;try{Object.defineProperty({},"x",{}),S=function(r,o,n,f){return Object.defineProperty(r,o,{value:n,writable:!0,configurable:f!==!1})}}catch(e){S=function(o,n,f){return o[n]=f,o}}F=(function(){var r,o,n;function f(t,i){this.fn=t,this.self=i,this.next=void 0}return{add:function(i,c){n=new f(i,c),o?o.next=n:r=n,o=n,n=void 0},drain:function(){var i=r;for(r=o=$=void 0;i;)i.fn.call(i.self),i=i.next}}})();function T(e,r){F.add(e,r),$||($=ye(F.drain))}function X(e){var r,o=typeof e;return e!==null&&(o==="object"||o==="function")&&(r=e.then),typeof r=="function"?r:!1}function j(){for(var e=0;e<this.chain.length;e++)ve(this,this.state===1?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function ve(e,r,o){var n,f;try{r===!1?o.reject(e.msg):(r===!0?n=e.msg:n=r.call(void 0,e.msg),n===o.promise?o.reject(TypeError("Promise-chain cycle")):(f=X(n))?f.call(n,o.resolve,o.reject):o.resolve(n))}catch(t){o.reject(t)}}function Y(e){var r,o=this;if(!o.triggered){o.triggered=!0,o.def&&(o=o.def);try{(r=X(e))?T(function(){var n=new ee(o);try{r.call(e,function(){Y.apply(n,arguments)},function(){C.apply(n,arguments)})}catch(f){C.call(n,f)}}):(o.msg=e,o.state=1,o.chain.length>0&&T(j,o))}catch(n){C.call(new ee(o),n)}}}function C(e){var r=this;r.triggered||(r.triggered=!0,r.def&&(r=r.def),r.msg=e,r.state=2,r.chain.length>0&&T(j,r))}function Z(e,r,o,n){for(var f=0;f<r.length;f++)(function(i){e.resolve(r[i]).then(function(a){o(i,a)},n)})(f)}function ee(e){this.def=e,this.triggered=!1}function me(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function b(e){if(typeof e!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var r=new me(this);this.then=function(n,f){var t={success:typeof n=="function"?n:!0,failure:typeof f=="function"?f:!1};return t.promise=new this.constructor(function(c,a){if(typeof c!="function"||typeof a!="function")throw TypeError("Not a function");t.resolve=c,t.reject=a}),r.chain.push(t),r.state!==0&&T(j,r),t.promise},this.catch=function(n){return this.then(void 0,n)};try{e.call(void 0,function(n){Y.call(r,n)},function(n){C.call(r,n)})}catch(o){C.call(r,o)}}var re=S({},"constructor",b,!1);b.prototype=re,S(re,"__NPO__",0,!1),S(b,"resolve",function(r){var o=this;return r&&typeof r=="object"&&r.__NPO__===1?r:new o(function(f,t){if(typeof f!="function"||typeof t!="function")throw TypeError("Not a function");f(r)})}),S(b,"reject",function(r){return new this(function(n,f){if(typeof n!="function"||typeof f!="function")throw TypeError("Not a function");f(r)})}),S(b,"all",function(r){var o=this;return V.call(r)!=="[object Array]"?o.reject(TypeError("Not an array")):r.length===0?o.resolve([]):new o(function(f,t){if(typeof f!="function"||typeof t!="function")throw TypeError("Not a function");var i=r.length,c=Array(i),a=0;Z(o,r,function(d,g){c[d]=g,++a===i&&f(c)},t)})}),S(b,"race",function(r){var o=this;return V.call(r)!=="[object Array]"?o.reject(TypeError("Not an array")):new o(function(f,t){if(typeof f!="function"||typeof t!="function")throw TypeError("Not a function");Z(o,r,function(c,a){f(a)},t)})}),typeof Promise!="undefined"&&Promise.toString().indexOf("[native code]");var k=Array.prototype,we=Function.prototype,te=Object.prototype,E=k.slice,B=te.toString,M=te.hasOwnProperty;v.console;var I=v.navigator,A=v.document,D=v.opera,ne=v.screen,P=I.userAgent,R=we.bind,ie=k.forEach,oe=k.indexOf,ue=k.map,Ae=Array.isArray,L={},u={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}};u.bind=function(e,r){var o,n;if(R&&e.bind===R)return R.apply(e,E.call(arguments,1));if(!u.isFunction(e))throw new TypeError;return o=E.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(r,o.concat(E.call(arguments)));var f={};f.prototype=e.prototype;var t=new f;f.prototype=null;var i=e.apply(t,o.concat(E.call(arguments)));return Object(i)===i?i:t},n},u.each=function(e,r,o){if(e!=null){if(ie&&e.forEach===ie)e.forEach(r,o);else if(e.length===+e.length){for(var n=0,f=e.length;n<f;n++)if(n in e&&r.call(o,e[n],n,e)===L)return}else for(var t in e)if(M.call(e,t)&&r.call(o,e[t],t,e)===L)return}},u.extend=function(e){return u.each(E.call(arguments,1),function(r){for(var o in r)r[o]!==void 0&&(e[o]=r[o])}),e},u.isArray=Ae||function(e){return B.call(e)==="[object Array]"},u.isFunction=function(e){return typeof e=="function"},u.isArguments=function(e){return!!(e&&M.call(e,"callee"))},u.toArray=function(e){return e?e.toArray?e.toArray():u.isArray(e)||u.isArguments(e)?E.call(e):u.values(e):[]},u.map=function(e,r,o){if(ue&&e.map===ue)return e.map(r,o);var n=[];return u.each(e,function(f){n.push(r.call(o,f))}),n},u.keys=function(e){var r=[];return e===null||u.each(e,function(o,n){r[r.length]=n}),r},u.values=function(e){var r=[];return e===null||u.each(e,function(o){r[r.length]=o}),r},u.include=function(e,r){var o=!1;return e===null?o:oe&&e.indexOf===oe?e.indexOf(r)!=-1:(u.each(e,function(n){if(o||(o=n===r))return L}),o)},u.includes=function(e,r){return e.indexOf(r)!==-1},u.inherit=function(e,r){return e.prototype=new r,e.prototype.constructor=e,e.superclass=r.prototype,e},u.isObject=function(e){return e===Object(e)&&!u.isArray(e)},u.isEmptyObject=function(e){if(u.isObject(e)){for(var r in e)if(M.call(e,r))return!1;return!0}return!1},u.isUndefined=function(e){return e===void 0},u.isString=function(e){return B.call(e)=="[object String]"},u.isDate=function(e){return B.call(e)=="[object Date]"},u.isNumber=function(e){return B.call(e)=="[object Number]"},u.isElement=function(e){return!!(e&&e.nodeType===1)},u.encodeDates=function(e){return u.each(e,function(r,o){u.isDate(r)?e[o]=u.formatDate(r):u.isObject(r)&&(e[o]=u.encodeDates(r))}),e},u.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},u.formatDate=function(e){function r(o){return o<10?"0"+o:o}return e.getUTCFullYear()+"-"+r(e.getUTCMonth()+1)+"-"+r(e.getUTCDate())+"T"+r(e.getUTCHours())+":"+r(e.getUTCMinutes())+":"+r(e.getUTCSeconds())},u.strip_empty_properties=function(e){var r={};return u.each(e,function(o,n){u.isString(o)&&o.length>0&&(r[n]=o)}),r},u.truncate=function(e,r){var o;return typeof e=="string"?o=e.slice(0,r):u.isArray(e)?(o=[],u.each(e,function(n){o.push(u.truncate(n,r))})):u.isObject(e)?(o={},u.each(e,function(n,f){o[f]=u.truncate(n,r)})):o=e,o},u.JSONEncode=(function(){return function(e){var r=e,o=function(f){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,i={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(f)?'"'+f.replace(t,function(c){var a=i[c];return typeof a=="string"?a:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'},n=function(f,t){var i="",c=" ",a=0,s="",d="",g=0,l=i,h=[],p=t[f];switch(p&&typeof p=="object"&&typeof p.toJSON=="function"&&(p=p.toJSON(f)),typeof p){case"string":return o(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(i+=c,h=[],B.apply(p)==="[object Array]"){for(g=p.length,a=0;a<g;a+=1)h[a]=n(a,p)||"null";return d=h.length===0?"[]":i?"[\n"+i+h.join(",\n"+i)+"\n"+l+"]":"["+h.join(",")+"]",i=l,d}for(s in p)M.call(p,s)&&(d=n(s,p),d&&h.push(o(s)+(i?": ":":")+d));return d=h.length===0?"{}":i?"{"+h.join(",")+l+"}":"{"+h.join(",")+"}",i=l,d}};return n("",{"":r})}})(),u.JSONDecode=(function(){var e,r,o={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},n,f=function(h){var p=new SyntaxError(h);throw p.at=e,p.text=n,p},t=function(h){return h&&h!==r&&f("Expected '"+h+"' instead of '"+r+"'"),r=n.charAt(e),e+=1,r},i=function(){var h,p="";for(r==="-"&&(p="-",t("-"));r>="0"&&r<="9";)p+=r,t();if(r===".")for(p+=".";t()&&r>="0"&&r<="9";)p+=r;if(r==="e"||r==="E")for(p+=r,t(),(r==="-"||r==="+")&&(p+=r,t());r>="0"&&r<="9";)p+=r,t();if(h=+p,!isFinite(h))f("Bad number");else return h},c=function(){var h,p,m="",y;if(r==='"')for(;t();){if(r==='"')return t(),m;if(r==="\\")if(t(),r==="u"){for(y=0,p=0;p<4&&(h=parseInt(t(),16),!!isFinite(h));p+=1)y=y*16+h;m+=String.fromCharCode(y)}else if(typeof o[r]=="string")m+=o[r];else break;else m+=r}f("Bad string")},a=function(){for(;r&&r<=" ";)t()},s=function(){switch(r){case"t":return t("t"),t("r"),t("u"),t("e"),!0;case"f":return t("f"),t("a"),t("l"),t("s"),t("e"),!1;case"n":return t("n"),t("u"),t("l"),t("l"),null}f('Unexpected "'+r+'"')},d,g=function(){var h=[];if(r==="["){if(t("["),a(),r==="]")return t("]"),h;for(;r;){if(h.push(d()),a(),r==="]")return t("]"),h;t(","),a()}}f("Bad array")},l=function(){var h,p={};if(r==="{"){if(t("{"),a(),r==="}")return t("}"),p;for(;r;){if(h=c(),a(),t(":"),Object.hasOwnProperty.call(p,h)&&f('Duplicate key "'+h+'"'),p[h]=d(),a(),r==="}")return t("}"),p;t(","),a()}}f("Bad object")};return d=function(){switch(a(),r){case"{":return l();case"[":return g();case'"':return c();case"-":return i();default:return r>="0"&&r<="9"?i():s()}},function(h){var p;return n=h,e=0,r=" ",p=d(),a(),r&&f("Syntax error"),p}})(),u.base64Encode=function(e){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o,n,f,t,i,c,a,s,d=0,g=0,l="",h=[];if(!e)return e;e=u.utf8Encode(e);do o=e.charCodeAt(d++),n=e.charCodeAt(d++),f=e.charCodeAt(d++),s=o<<16|n<<8|f,t=s>>18&63,i=s>>12&63,c=s>>6&63,a=s&63,h[g++]=r.charAt(t)+r.charAt(i)+r.charAt(c)+r.charAt(a);while(d<e.length);switch(l=h.join(""),e.length%3){case 1:l=l.slice(0,-2)+"==";break;case 2:l=l.slice(0,-1)+"=";break}return l},u.utf8Encode=function(e){e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n");var r="",o,n,f=0,t;for(o=n=0,f=e.length,t=0;t<f;t++){var i=e.charCodeAt(t),c=null;i<128?n++:i>127&&i<2048?c=String.fromCharCode(i>>6|192,i&63|128):c=String.fromCharCode(i>>12|224,i>>6&63|128,i&63|128),c!==null&&(n>o&&(r+=e.substring(o,n)),r+=c,o=n=t+1)}return n>o&&(r+=e.substring(o,e.length)),r},u.UUID=function(){try{return v.crypto.randomUUID()}catch(o){for(var e=new Array(36),r=0;r<36;r++)e[r]=Math.floor(Math.random()*16);return e[14]=4,e[19]=e[19]&=-5,e[19]=e[19]|=8,e[8]=e[13]=e[18]=e[23]="-",u.map(e,function(n){return n.toString(16)}).join("")}};var fe=["ahrefsbot","ahrefssiteaudit","amazonbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandex","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];u.isBlockedUA=function(e){var r;for(e=e.toLowerCase(),r=0;r<fe.length;r++)if(e.indexOf(fe[r])!==-1)return!0;return!1},u.HTTPBuildQuery=function(e,r){var o,n,f=[];return u.isUndefined(r)&&(r="&"),u.each(e,function(t,i){o=encodeURIComponent(t.toString()),n=encodeURIComponent(i),f[f.length]=n+"="+o}),f.join(r)},u.getQueryParam=function(e,r){r=r.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var o="[\\?&]"+r+"=([^&#]*)",n=new RegExp(o),f=n.exec(e);if(f===null||f&&typeof f[1]!="string"&&f[1].length)return"";var t=f[1];try{t=decodeURIComponent(t)}catch(i){}return t.replace(/\+/g," ")},u.cookie={get:function(e){for(var r=e+"=",o=A.cookie.split(";"),n=0;n<o.length;n++){for(var f=o[n];f.charAt(0)==" ";)f=f.substring(1,f.length);if(f.indexOf(r)===0)return decodeURIComponent(f.substring(r.length,f.length))}return null},parse:function(e){var r;try{r=u.JSONDecode(u.cookie.get(e))||{}}catch(o){}return r},set_seconds:function(e,r,o,n,f,t,i){var c="",a="",s="";if(i)c="; domain="+i;else if(n){var d=le(A.location.hostname);c=d?"; domain=."+d:""}if(o){var g=new Date;g.setTime(g.getTime()+o*1e3),a="; expires="+g.toGMTString()}t&&(f=!0,s="; SameSite=None"),f&&(s+="; secure"),A.cookie=e+"="+encodeURIComponent(r)+a+"; path=/"+c+s},set:function(e,r,o,n,f,t,i){var c="",a="",s="";if(i)c="; domain="+i;else if(n){var d=le(A.location.hostname);c=d?"; domain=."+d:""}if(o){var g=new Date;g.setTime(g.getTime()+o*24*60*60*1e3),a="; expires="+g.toGMTString()}t&&(f=!0,s="; SameSite=None"),f&&(s+="; secure");var l=e+"="+encodeURIComponent(r)+a+"; path=/"+c+s;return A.cookie=l,l},remove:function(e,r,o){u.cookie.set(e,"",-1,r,!1,!1,o)}};var ae=function(e){var r=!0;try{var o="__mplss_"+se(8),n="xyz";e.setItem(o,n),e.getItem(o)!==n&&(r=!1),e.removeItem(o)}catch(f){r=!1}return r},W=null,Se=function(e,r){return W!==null&&!r?W:W=ae(e)},J=null,_e=function(e,r){return J!==null&&!r?J:J=ae(e)};function ce(e,r,o){var n=function(f){};return{is_supported:function(f){var t=o(e,f);return t},error:n,get:function(f){try{return e.getItem(f)}catch(t){}return null},parse:function(f){try{return u.JSONDecode(e.getItem(f))||{}}catch(t){}return null},set:function(f,t){try{e.setItem(f,t)}catch(i){}},remove:function(f){try{e.removeItem(f)}catch(t){}}}}var Oe=function(){try{return v.localStorage}catch(e){return null}},be=function(){try{return v.sessionStorage}catch(e){return null}};u.localStorage=ce(Oe(),"localStorage",Se),u.sessionStorage=ce(be(),"sessionStorage",_e),u.register_event=(function(){var e=function(n,f,t,i,c){if(n)if(n.addEventListener&&!i)n.addEventListener(f,t,!!c);else{var a="on"+f,s=n[a];n[a]=r(n,t,s)}};function r(n,f,t){var i=function(c){if(c=c||o(v.event),!!c){var a=!0,s,d;return u.isFunction(t)&&(s=t(c)),d=f.call(n,c),(s===!1||d===!1)&&(a=!1),a}};return i}function o(n){return n&&(n.preventDefault=o.preventDefault,n.stopPropagation=o.stopPropagation),n}return o.preventDefault=function(){this.returnValue=!1},o.stopPropagation=function(){this.cancelBubble=!0},e})();var Ee=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');u.dom_query=(function(){function e(f){return f.all?f.all:f.getElementsByTagName("*")}var r=/[\t\r\n]/g;function o(f,t){var i=" "+t+" ";return(" "+f.className+" ").replace(r," ").indexOf(i)>=0}function n(f){if(!A.getElementsByTagName)return[];var t=f.split(" "),i,c,a,s,d,g,l,h,p,m,y=[A];for(g=0;g<t.length;g++){if(i=t[g].replace(/^\s+/,"").replace(/\s+$/,""),i.indexOf("#")>-1){c=i.split("#"),a=c[0];var K=c[1],Q=A.getElementById(K);if(!Q||a&&Q.nodeName.toLowerCase()!=a)return[];y=[Q];continue}if(i.indexOf(".")>-1){c=i.split("."),a=c[0];var Ue=c[1];for(a||(a="*"),s=[],d=0,l=0;l<y.length;l++)for(a=="*"?p=e(y[l]):p=y[l].getElementsByTagName(a),h=0;h<p.length;h++)s[d++]=p[h];for(y=[],m=0,l=0;l<s.length;l++)s[l].className&&u.isString(s[l].className)&&o(s[l],Ue)&&(y[m++]=s[l]);continue}var N=i.match(Ee);if(N){a=N[1];var _=N[2],$e=N[3],x=N[4];for(a||(a="*"),s=[],d=0,l=0;l<y.length;l++)for(a=="*"?p=e(y[l]):p=y[l].getElementsByTagName(a),h=0;h<p.length;h++)s[d++]=p[h];y=[],m=0;var O;switch($e){case"=":O=function(w){return w.getAttribute(_)==x};break;case"~":O=function(w){return w.getAttribute(_).match(new RegExp("\\b"+x+"\\b"))};break;case"|":O=function(w){return w.getAttribute(_).match(new RegExp("^"+x+"-?"))};break;case"^":O=function(w){return w.getAttribute(_).indexOf(x)===0};break;case"$":O=function(w){return w.getAttribute(_).lastIndexOf(x)==w.getAttribute(_).length-x.length};break;case"*":O=function(w){return w.getAttribute(_).indexOf(x)>-1};break;default:O=function(w){return w.getAttribute(_)}}for(y=[],m=0,l=0;l<s.length;l++)O(s[l])&&(y[m++]=s[l]);continue}for(a=i,s=[],d=0,l=0;l<y.length;l++)for(p=y[l].getElementsByTagName(a),h=0;h<p.length;h++)s[d++]=p[h];y=s}return y}return function(f){return u.isElement(f)?[f]:u.isObject(f)&&!u.isUndefined(f.length)?f:n.call(this,f)}})();var xe=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],Pe=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];u.info={campaignParams:function(e){var r="",o={};return u.each(xe,function(n){r=u.getQueryParam(A.URL,n),r.length?o[n]=r:e!==void 0&&(o[n]=e)}),o},clickParams:function(){var e="",r={};return u.each(Pe,function(o){e=u.getQueryParam(A.URL,o),e.length&&(r[o]=e)}),r},marketingParams:function(){return u.extend(u.info.campaignParams(),u.info.clickParams())},searchEngine:function(e){return e.search("https?://(.*)google.([^/?]*)")===0?"google":e.search("https?://(.*)bing.com")===0?"bing":e.search("https?://(.*)yahoo.com")===0?"yahoo":e.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null},searchInfo:function(e){var r=u.info.searchEngine(e),o=r!="yahoo"?"q":"p",n={};if(r!==null){n.$search_engine=r;var f=u.getQueryParam(e,o);f.length&&(n.mp_keyword=f)}return n},browser:function(e,r,o){return r=r||"",o||u.includes(e," OPR/")?u.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":u.includes(e,"IEMobile")||u.includes(e,"WPDesktop")?"Internet Explorer Mobile":u.includes(e,"SamsungBrowser/")?"Samsung Internet":u.includes(e,"Edge")||u.includes(e,"Edg/")?"Microsoft Edge":u.includes(e,"FBIOS")?"Facebook Mobile":u.includes(e,"Whale/")?"Whale Browser":u.includes(e,"Chrome")?"Chrome":u.includes(e,"CriOS")?"Chrome iOS":u.includes(e,"UCWEB")||u.includes(e,"UCBrowser")?"UC Browser":u.includes(e,"FxiOS")?"Firefox iOS":u.includes(r,"Apple")?u.includes(e,"Mobile")?"Mobile Safari":"Safari":u.includes(e,"Android")?"Android Mobile":u.includes(e,"Konqueror")?"Konqueror":u.includes(e,"Firefox")?"Firefox":u.includes(e,"MSIE")||u.includes(e,"Trident/")?"Internet Explorer":u.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,r,o){var n=u.info.browser(e,r,o),f={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/},t=f[n];if(t===void 0)return null;var i=e.match(t);return i?parseFloat(i[i.length-2]):null},os:function(){var e=P;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var r=e.split("/");return r.length>=3?r[2]:""},currentUrl:function(){return v.location.href},properties:function(e){return typeof e!="object"&&(e={}),u.extend(u.strip_empty_properties({$os:u.info.os(),$browser:u.info.browser(P,I.vendor,D),$referrer:A.referrer,$referring_domain:u.info.referringDomain(A.referrer),$device:u.info.device(P)}),{$current_url:u.info.currentUrl(),$browser_version:u.info.browserVersion(P,I.vendor,D),$screen_height:ne.height,$screen_width:ne.width,mp_lib:"web",$lib_version:de.LIB_VERSION,$insert_id:se(),time:u.timestamp()/1e3},u.strip_empty_properties(e))},people_properties:function(){return u.extend(u.strip_empty_properties({$os:u.info.os(),$browser:u.info.browser(P,I.vendor,D)}),{$browser_version:u.info.browserVersion(P,I.vendor,D)})},mpPageViewProperties:function(){return u.strip_empty_properties({current_page_title:A.title,current_domain:v.location.hostname,current_url_path:v.location.pathname,current_url_protocol:v.location.protocol,current_url_search:v.location.search})}};var se=function(e){var r=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?r.substring(0,e):r},Ce=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,Be=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,le=function(e){var r=Be,o=e.split("."),n=o[o.length-1];(n.length>4||n==="com"||n==="org")&&(r=Ce);var f=e.match(r);return f?f[0]:""},z=null,G=null;typeof JSON!="undefined"&&(z=JSON.stringify,G=JSON.parse),z=z||u.JSONEncode,G=G||u.JSONDecode,u.info=u.info,u.info.browser=u.info.browser,u.info.browserVersion=u.info.browserVersion,u.info.device=u.info.device,u.info.properties=u.info.properties,u.isBlockedUA=u.isBlockedUA,u.isEmptyObject=u.isEmptyObject,u.isObject=u.isObject,u.JSONDecode=u.JSONDecode,u.JSONEncode=u.JSONEncode,u.toArray=u.toArray,u.NPO=b;function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var U={exports:{}},Ne=U.exports,pe;function Te(){return pe||(pe=1,(function(e,r){(function(o,n){e.exports=n()})(Ne,function(){Array.isArray||(Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"});function o(t){for(var i=[],c=0,a=t.length;c<a;c++)i.indexOf(t[c])===-1&&i.push(t[c]);return i}var n={},f={"==":function(t,i){return t==i},"===":function(t,i){return t===i},"!=":function(t,i){return t!=i},"!==":function(t,i){return t!==i},">":function(t,i){return t>i},">=":function(t,i){return t>=i},"<":function(t,i,c){return c===void 0?t<i:t<i&&i<c},"<=":function(t,i,c){return c===void 0?t<=i:t<=i&&i<=c},"!!":function(t){return n.truthy(t)},"!":function(t){return!n.truthy(t)},"%":function(t,i){return t%i},log:function(t){return console.log(t),t},in:function(t,i){return!i||typeof i.indexOf=="undefined"?!1:i.indexOf(t)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(t,i,c){if(c<0){var a=String(t).substr(i);return a.substr(0,a.length+c)}return String(t).substr(i,c)},"+":function(){return Array.prototype.reduce.call(arguments,function(t,i){return parseFloat(t,10)+parseFloat(i,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(t,i){return parseFloat(t,10)*parseFloat(i,10)})},"-":function(t,i){return i===void 0?-t:t-i},"/":function(t,i){return t/i},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(t,i){return t.concat(i)},[])},var:function(t,i){var c=i===void 0?null:i,a=this;if(typeof t=="undefined"||t===""||t===null)return a;for(var s=String(t).split("."),d=0;d<s.length;d++)if(a==null||(a=a[s[d]],a===void 0))return c;return a},missing:function(){for(var t=[],i=Array.isArray(arguments[0])?arguments[0]:arguments,c=0;c<i.length;c++){var a=i[c],s=n.apply({var:a},this);(s===null||s==="")&&t.push(a)}return t},missing_some:function(t,i){var c=n.apply({missing:i},this);return i.length-c.length>=t?[]:c}};return n.is_logic=function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length===1},n.truthy=function(t){return Array.isArray(t)&&t.length===0?!1:!!t},n.get_operator=function(t){return Object.keys(t)[0]},n.get_values=function(t){return t[n.get_operator(t)]},n.apply=function(t,i){if(Array.isArray(t))return t.map(function(y){return n.apply(y,i)});if(!n.is_logic(t))return t;var c=n.get_operator(t),a=t[c],s,d,g,l,h;if(Array.isArray(a)||(a=[a]),c==="if"||c=="?:"){for(s=0;s<a.length-1;s+=2)if(n.truthy(n.apply(a[s],i)))return n.apply(a[s+1],i);return a.length===s+1?n.apply(a[s],i):null}else if(c==="and"){for(s=0;s<a.length;s+=1)if(d=n.apply(a[s],i),!n.truthy(d))return d;return d}else if(c==="or"){for(s=0;s<a.length;s+=1)if(d=n.apply(a[s],i),n.truthy(d))return d;return d}else{if(c==="filter")return l=n.apply(a[0],i),g=a[1],Array.isArray(l)?l.filter(function(y){return n.truthy(n.apply(g,y))}):[];if(c==="map")return l=n.apply(a[0],i),g=a[1],Array.isArray(l)?l.map(function(y){return n.apply(g,y)}):[];if(c==="reduce")return l=n.apply(a[0],i),g=a[1],h=typeof a[2]!="undefined"?n.apply(a[2],i):null,Array.isArray(l)?l.reduce(function(y,K){return n.apply(g,{current:K,accumulator:y})},h):h;if(c==="all"){if(l=n.apply(a[0],i),g=a[1],!Array.isArray(l)||!l.length)return!1;for(s=0;s<l.length;s+=1)if(!n.truthy(n.apply(g,l[s])))return!1;return!0}else if(c==="none"){if(l=n.apply(a[0],i),g=a[1],!Array.isArray(l)||!l.length)return!0;for(s=0;s<l.length;s+=1)if(n.truthy(n.apply(g,l[s])))return!1;return!0}else if(c==="some"){if(l=n.apply(a[0],i),g=a[1],!Array.isArray(l)||!l.length)return!1;for(s=0;s<l.length;s+=1)if(n.truthy(n.apply(g,l[s])))return!0;return!1}}if(a=a.map(function(y){return n.apply(y,i)}),f.hasOwnProperty(c)&&typeof f[c]=="function")return f[c].apply(i,a);if(c.indexOf(".")>0){var p=String(c).split("."),m=f;for(s=0;s<p.length;s++){if(!m.hasOwnProperty(p[s]))throw new Error("Unrecognized operation "+c+" (failed at "+p.slice(0,s+1).join(".")+")");m=m[p[s]]}return m.apply(i,a)}throw new Error("Unrecognized operation "+c)},n.uses_data=function(t){var i=[];if(n.is_logic(t)){var c=n.get_operator(t),a=t[c];Array.isArray(a)||(a=[a]),c==="var"?i.push(a[0]):a.forEach(function(s){i.push.apply(i,n.uses_data(s))})}return o(i)},n.add_operation=function(t,i){f[t]=i},n.rm_operation=function(t){delete f[t]},n.rule_like=function(t,i){if(i===t||i==="@")return!0;if(i==="number")return typeof t=="number";if(i==="string")return typeof t=="string";if(i==="array")return Array.isArray(t)&&!n.is_logic(t);if(n.is_logic(i)){if(n.is_logic(t)){var c=n.get_operator(i),a=n.get_operator(t);if(c==="@"||c===a)return n.rule_like(n.get_values(t,!1),n.get_values(i,!1))}return!1}if(Array.isArray(i))if(Array.isArray(t)){if(i.length!==t.length)return!1;for(var s=0;s<i.length;s+=1)if(!n.rule_like(t[s],i[s]))return!1;return!0}else return!1;return!1},n})})(U)),U.exports}var ke=Te(),Me=Ie(ke),De=function(e,r,o){if(e!==o.event_name)return{matches:!1};var n=o.property_filters,f=!0;if(n&&!u.isEmptyObject(n))try{f=Me.apply(n,r||{})}catch(t){return{matches:!1,error:t.toString()}}return{matches:f}},he={};he.eventMatchesCriteria=De,v[ge]=Promise.resolve(he)})();
2
+ //# sourceMappingURL=mixpanel-targeting-kdl-eE-1.min.js.map