@rudderstack/analytics-js 3.0.0-beta.6 → 3.0.0-beta.8
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +22 -3
- package/dist/npm/index.d.ts +1229 -0
- package/{legacy → dist/npm/legacy}/cjs/index.js +369 -508
- package/{legacy → dist/npm/legacy}/esm/index.js +369 -508
- package/{legacy → dist/npm/legacy}/umd/index.js +369 -508
- package/{modern → dist/npm/modern}/cjs/index.js +164 -289
- package/{modern → dist/npm/modern}/esm/index.js +164 -289
- package/{modern → dist/npm/modern}/umd/index.js +164 -289
- package/package.json +28 -107
- package/index.d.ts +0 -387
@@ -2,21 +2,24 @@ var UaChTrackLevel=/*#__PURE__*/function(UaChTrackLevel){UaChTrackLevel["None"]=
|
|
2
2
|
* Represents the options parameter for anonymousId
|
3
3
|
*/ /**
|
4
4
|
* Represents the beacon queue options parameter in loadOptions type
|
5
|
-
*/
|
5
|
+
*/ /**
|
6
6
|
* Represents the queue options parameter in loadOptions type
|
7
7
|
*/ /**
|
8
8
|
* Represents the destinations queue options parameter in loadOptions type
|
9
|
-
*/
|
9
|
+
*/var DeliveryType=/*#__PURE__*/function(DeliveryType){DeliveryType["Immediate"]="immediate";DeliveryType["Buffer"]="buffer";return DeliveryType;}({});var StorageStrategy=/*#__PURE__*/function(StorageStrategy){StorageStrategy["None"]="none";StorageStrategy["Session"]="session";StorageStrategy["AnonymousId"]="anonymousId";return StorageStrategy;}({});/**
|
10
10
|
* Represents the options parameter in the load API
|
11
11
|
*/
|
12
12
|
|
13
|
+
var StorageEncryptionVersion=/*#__PURE__*/function(StorageEncryptionVersion){StorageEncryptionVersion["Legacy"]="legacy";StorageEncryptionVersion["V3"]="v3";return StorageEncryptionVersion;}({});// default
|
14
|
+
var SUPPORTED_STORAGE_TYPES=['localStorage','memoryStorage','cookieStorage','sessionStorage','none'];var DEFAULT_STORAGE_TYPE='cookieStorage';var CookieSameSite=/*#__PURE__*/function(CookieSameSite){CookieSameSite["Strict"]="Strict";CookieSameSite["Lax"]="Lax";CookieSameSite["None"]="None";return CookieSameSite;}({});
|
15
|
+
|
13
16
|
/**
|
14
17
|
* Represents residency server input the options
|
15
18
|
*/var ResidencyServerRegion=/*#__PURE__*/function(ResidencyServerRegion){ResidencyServerRegion["US"]="US";ResidencyServerRegion["EU"]="EU";return ResidencyServerRegion;}({});
|
16
19
|
|
17
20
|
var LogLevel=/*#__PURE__*/function(LogLevel){LogLevel["Log"]="LOG";LogLevel["Info"]="INFO";LogLevel["Debug"]="DEBUG";LogLevel["Warn"]="WARN";LogLevel["Error"]="ERROR";LogLevel["None"]="NONE";return LogLevel;}({});
|
18
21
|
|
19
|
-
var PluginName=/*#__PURE__*/function(PluginName){PluginName["BeaconQueue"]="BeaconQueue";PluginName["DeviceModeDestinations"]="DeviceModeDestinations";PluginName["DeviceModeTransformation"]="DeviceModeTransformation";PluginName["ErrorReporting"]="ErrorReporting";PluginName["ExternalAnonymousId"]="ExternalAnonymousId";PluginName["GoogleLinker"]="GoogleLinker";PluginName["
|
22
|
+
var PluginName=/*#__PURE__*/function(PluginName){PluginName["BeaconQueue"]="BeaconQueue";PluginName["Bugsnag"]="Bugsnag";PluginName["DeviceModeDestinations"]="DeviceModeDestinations";PluginName["DeviceModeTransformation"]="DeviceModeTransformation";PluginName["ErrorReporting"]="ErrorReporting";PluginName["ExternalAnonymousId"]="ExternalAnonymousId";PluginName["GoogleLinker"]="GoogleLinker";PluginName["KetchConsentManager"]="KetchConsentManager";PluginName["NativeDestinationQueue"]="NativeDestinationQueue";PluginName["OneTrustConsentManager"]="OneTrustConsentManager";PluginName["StorageEncryption"]="StorageEncryption";PluginName["StorageEncryptionLegacy"]="StorageEncryptionLegacy";PluginName["StorageMigrator"]="StorageMigrator";PluginName["XhrQueue"]="XhrQueue";return PluginName;}({});
|
20
23
|
|
21
24
|
function ownKeys(e, r) {
|
22
25
|
var t = Object.keys(e);
|
@@ -484,57 +487,8 @@ function _isPlaceholder(a){return a!=null&&_typeof(a)==='object'&&a['@@functiona
|
|
484
487
|
* @return {Function} The curried function.
|
485
488
|
*/function _curry3(fn){return function f3(a,b,c){switch(arguments.length){case 0:return f3;case 1:return _isPlaceholder(a)?f3:_curry2(function(_b,_c){return fn(a,_b,_c);});case 2:return _isPlaceholder(a)&&_isPlaceholder(b)?f3:_isPlaceholder(a)?_curry2(function(_a,_c){return fn(_a,b,_c);}):_isPlaceholder(b)?_curry2(function(_b,_c){return fn(a,_b,_c);}):_curry1(function(_c){return fn(a,b,_c);});default:return _isPlaceholder(a)&&_isPlaceholder(b)&&_isPlaceholder(c)?f3:_isPlaceholder(a)&&_isPlaceholder(b)?_curry2(function(_a,_b){return fn(_a,_b,c);}):_isPlaceholder(a)&&_isPlaceholder(c)?_curry2(function(_a,_c){return fn(_a,b,_c);}):_isPlaceholder(b)&&_isPlaceholder(c)?_curry2(function(_b,_c){return fn(a,_b,_c);}):_isPlaceholder(a)?_curry1(function(_a){return fn(_a,b,c);}):_isPlaceholder(b)?_curry1(function(_b){return fn(a,_b,c);}):_isPlaceholder(c)?_curry1(function(_c){return fn(a,b,_c);}):fn(a,b,c);}};}
|
486
489
|
|
487
|
-
/**
|
488
|
-
* Tests whether or not an object is an array.
|
489
|
-
*
|
490
|
-
* @private
|
491
|
-
* @param {*} val The object to test.
|
492
|
-
* @return {Boolean} `true` if `val` is an array, `false` otherwise.
|
493
|
-
* @example
|
494
|
-
*
|
495
|
-
* _isArray([]); //=> true
|
496
|
-
* _isArray(null); //=> false
|
497
|
-
* _isArray({}); //=> false
|
498
|
-
*/var _isArray = Array.isArray||function _isArray(val){return val!=null&&val.length>=0&&Object.prototype.toString.call(val)==='[object Array]';};
|
499
|
-
|
500
|
-
function _arrayFromIterator(iter){var list=[];var next;while(!(next=iter.next()).done){list.push(next.value);}return list;}
|
501
|
-
|
502
|
-
function _includesWith(pred,x,list){var idx=0;var len=list.length;while(idx<len){if(pred(x,list[idx])){return true;}idx+=1;}return false;}
|
503
|
-
|
504
|
-
function _functionName(f){// String(x => x) evaluates to "x => x", so the pattern may not match.
|
505
|
-
var match=String(f).match(/^function (\w*)/);return match==null?'':match[1];}
|
506
|
-
|
507
490
|
function _has(prop,obj){return Object.prototype.hasOwnProperty.call(obj,prop);}
|
508
491
|
|
509
|
-
// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
510
|
-
function _objectIs(a,b){// SameValue algorithm
|
511
|
-
if(a===b){// Steps 1-5, 7-10
|
512
|
-
// Steps 6.b-6.e: +0 != -0
|
513
|
-
return a!==0||1/a===1/b;}else {// Step 6.a: NaN == NaN
|
514
|
-
return a!==a&&b!==b;}}var _objectIs$1 = typeof Object.is==='function'?Object.is:_objectIs;
|
515
|
-
|
516
|
-
var toString=Object.prototype.toString;var _isArguments=/*#__PURE__*/function(){return toString.call(arguments)==='[object Arguments]'?function _isArguments(x){return toString.call(x)==='[object Arguments]';}:function _isArguments(x){return _has('callee',x);};}();
|
517
|
-
|
518
|
-
var hasEnumBug=!/*#__PURE__*/{toString:null}.propertyIsEnumerable('toString');var nonEnumerableProps=['constructor','valueOf','isPrototypeOf','toString','propertyIsEnumerable','hasOwnProperty','toLocaleString'];// Safari bug
|
519
|
-
var hasArgsEnumBug=/*#__PURE__*/function(){return arguments.propertyIsEnumerable('length');}();var contains=function contains(list,item){var idx=0;while(idx<list.length){if(list[idx]===item){return true;}idx+=1;}return false;};/**
|
520
|
-
* Returns a list containing the names of all the enumerable own properties of
|
521
|
-
* the supplied object.
|
522
|
-
* Note that the order of the output array is not guaranteed to be consistent
|
523
|
-
* across different JS platforms.
|
524
|
-
*
|
525
|
-
* @func
|
526
|
-
* @memberOf R
|
527
|
-
* @since v0.1.0
|
528
|
-
* @category Object
|
529
|
-
* @sig {k: v} -> [k]
|
530
|
-
* @param {Object} obj The object to extract properties from
|
531
|
-
* @return {Array} An array of the object's own properties.
|
532
|
-
* @see R.keysIn, R.values, R.toPairs
|
533
|
-
* @example
|
534
|
-
*
|
535
|
-
* R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']
|
536
|
-
*/var keys=typeof Object.keys==='function'&&!hasArgsEnumBug?/*#__PURE__*/_curry1(function keys(obj){return Object(obj)!==obj?[]:Object.keys(obj);}):/*#__PURE__*/_curry1(function keys(obj){if(Object(obj)!==obj){return [];}var prop,nIdx;var ks=[];var checkArgsLength=hasArgsEnumBug&&_isArguments(obj);for(prop in obj){if(_has(prop,obj)&&(!checkArgsLength||prop!=='length')){ks[ks.length]=prop;}}if(hasEnumBug){nIdx=nonEnumerableProps.length-1;while(nIdx>=0){prop=nonEnumerableProps[nIdx];if(_has(prop,obj)&&!contains(ks,prop)){ks[ks.length]=prop;}nIdx-=1;}}return ks;});
|
537
|
-
|
538
492
|
/**
|
539
493
|
* Gives a single-word string description of the (native) type of a value,
|
540
494
|
* returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not
|
@@ -561,45 +515,6 @@ var hasArgsEnumBug=/*#__PURE__*/function(){return arguments.propertyIsEnumerable
|
|
561
515
|
* R.type(undefined); //=> "Undefined"
|
562
516
|
*/var type=/*#__PURE__*/_curry1(function type(val){return val===null?'Null':val===undefined?'Undefined':Object.prototype.toString.call(val).slice(8,-1);});
|
563
517
|
|
564
|
-
/**
|
565
|
-
* private _uniqContentEquals function.
|
566
|
-
* That function is checking equality of 2 iterator contents with 2 assumptions
|
567
|
-
* - iterators lengths are the same
|
568
|
-
* - iterators values are unique
|
569
|
-
*
|
570
|
-
* false-positive result will be returned for comparison of, e.g.
|
571
|
-
* - [1,2,3] and [1,2,3,4]
|
572
|
-
* - [1,1,1] and [1,2,3]
|
573
|
-
* */function _uniqContentEquals(aIterator,bIterator,stackA,stackB){var a=_arrayFromIterator(aIterator);var b=_arrayFromIterator(bIterator);function eq(_a,_b){return _equals(_a,_b,stackA.slice(),stackB.slice());}// if *a* array contains any element that is not included in *b*
|
574
|
-
return !_includesWith(function(b,aItem){return !_includesWith(eq,aItem,b);},b,a);}function _equals(a,b,stackA,stackB){if(_objectIs$1(a,b)){return true;}var typeA=type(a);if(typeA!==type(b)){return false;}if(typeof a['fantasy-land/equals']==='function'||typeof b['fantasy-land/equals']==='function'){return typeof a['fantasy-land/equals']==='function'&&a['fantasy-land/equals'](b)&&typeof b['fantasy-land/equals']==='function'&&b['fantasy-land/equals'](a);}if(typeof a.equals==='function'||typeof b.equals==='function'){return typeof a.equals==='function'&&a.equals(b)&&typeof b.equals==='function'&&b.equals(a);}switch(typeA){case'Arguments':case'Array':case'Object':if(typeof a.constructor==='function'&&_functionName(a.constructor)==='Promise'){return a===b;}break;case'Boolean':case'Number':case'String':if(!(_typeof(a)===_typeof(b)&&_objectIs$1(a.valueOf(),b.valueOf()))){return false;}break;case'Date':if(!_objectIs$1(a.valueOf(),b.valueOf())){return false;}break;case'Error':return a.name===b.name&&a.message===b.message;case'RegExp':if(!(a.source===b.source&&a.global===b.global&&a.ignoreCase===b.ignoreCase&&a.multiline===b.multiline&&a.sticky===b.sticky&&a.unicode===b.unicode)){return false;}break;}var idx=stackA.length-1;while(idx>=0){if(stackA[idx]===a){return stackB[idx]===b;}idx-=1;}switch(typeA){case'Map':if(a.size!==b.size){return false;}return _uniqContentEquals(a.entries(),b.entries(),stackA.concat([a]),stackB.concat([b]));case'Set':if(a.size!==b.size){return false;}return _uniqContentEquals(a.values(),b.values(),stackA.concat([a]),stackB.concat([b]));case'Arguments':case'Array':case'Object':case'Boolean':case'Number':case'String':case'Date':case'Error':case'RegExp':case'Int8Array':case'Uint8Array':case'Uint8ClampedArray':case'Int16Array':case'Uint16Array':case'Int32Array':case'Uint32Array':case'Float32Array':case'Float64Array':case'ArrayBuffer':break;default:// Values of other types are only equal if identical.
|
575
|
-
return false;}var keysA=keys(a);if(keysA.length!==keys(b).length){return false;}var extendedStackA=stackA.concat([a]);var extendedStackB=stackB.concat([b]);idx=keysA.length-1;while(idx>=0){var key=keysA[idx];if(!(_has(key,b)&&_equals(b[key],a[key],extendedStackA,extendedStackB))){return false;}idx-=1;}return true;}
|
576
|
-
|
577
|
-
/**
|
578
|
-
* Returns `true` if its arguments are equivalent, `false` otherwise. Handles
|
579
|
-
* cyclical data structures.
|
580
|
-
*
|
581
|
-
* Dispatches symmetrically to the `equals` methods of both arguments, if
|
582
|
-
* present.
|
583
|
-
*
|
584
|
-
* @func
|
585
|
-
* @memberOf R
|
586
|
-
* @since v0.15.0
|
587
|
-
* @category Relation
|
588
|
-
* @sig a -> b -> Boolean
|
589
|
-
* @param {*} a
|
590
|
-
* @param {*} b
|
591
|
-
* @return {Boolean}
|
592
|
-
* @example
|
593
|
-
*
|
594
|
-
* R.equals(1, 1); //=> true
|
595
|
-
* R.equals(1, '1'); //=> false
|
596
|
-
* R.equals([1, 2, 3], [1, 2, 3]); //=> true
|
597
|
-
*
|
598
|
-
* const a = {}; a.v = a;
|
599
|
-
* const b = {}; b.v = b;
|
600
|
-
* R.equals(a, b); //=> true
|
601
|
-
*/var equals=/*#__PURE__*/_curry2(function equals(a,b){return _equals(a,b,[],[]);});
|
602
|
-
|
603
518
|
function _isObject(x){return Object.prototype.toString.call(x)==='[object Object]';}
|
604
519
|
|
605
520
|
/**
|
@@ -684,71 +599,6 @@ var cachedCopy=map.get(value);if(cachedCopy){return cachedCopy;}map.set(value,co
|
|
684
599
|
* objects[0] === objectsClone[0]; //=> false
|
685
600
|
*/var clone=/*#__PURE__*/_curry1(function clone(value){return value!=null&&typeof value.clone==='function'?value.clone():_clone(value,true);});var clone$1 = clone;
|
686
601
|
|
687
|
-
/**
|
688
|
-
* Tests whether or not an object is a typed array.
|
689
|
-
*
|
690
|
-
* @private
|
691
|
-
* @param {*} val The object to test.
|
692
|
-
* @return {Boolean} `true` if `val` is a typed array, `false` otherwise.
|
693
|
-
* @example
|
694
|
-
*
|
695
|
-
* _isTypedArray(new Uint8Array([])); //=> true
|
696
|
-
* _isTypedArray(new Float32Array([])); //=> true
|
697
|
-
* _isTypedArray([]); //=> false
|
698
|
-
* _isTypedArray(null); //=> false
|
699
|
-
* _isTypedArray({}); //=> false
|
700
|
-
*/function _isTypedArray(val){var type=Object.prototype.toString.call(val);return type==='[object Uint8ClampedArray]'||type==='[object Int8Array]'||type==='[object Uint8Array]'||type==='[object Int16Array]'||type==='[object Uint16Array]'||type==='[object Int32Array]'||type==='[object Uint32Array]'||type==='[object Float32Array]'||type==='[object Float64Array]'||type==='[object BigInt64Array]'||type==='[object BigUint64Array]';}
|
701
|
-
|
702
|
-
/**
|
703
|
-
* Returns the empty value of its argument's type. Ramda defines the empty
|
704
|
-
* value of Array (`[]`), Object (`{}`), String (`''`),
|
705
|
-
* TypedArray (`Uint8Array []`, `Float32Array []`, etc), and Arguments. Other
|
706
|
-
* types are supported if they define `<Type>.empty`,
|
707
|
-
* `<Type>.prototype.empty` or implement the
|
708
|
-
* [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid).
|
709
|
-
*
|
710
|
-
* Dispatches to the `empty` method of the first argument, if present.
|
711
|
-
*
|
712
|
-
* @func
|
713
|
-
* @memberOf R
|
714
|
-
* @since v0.3.0
|
715
|
-
* @category Function
|
716
|
-
* @sig a -> a
|
717
|
-
* @param {*} x
|
718
|
-
* @return {*}
|
719
|
-
* @example
|
720
|
-
*
|
721
|
-
* R.empty(Just(42)); //=> Nothing()
|
722
|
-
* R.empty([1, 2, 3]); //=> []
|
723
|
-
* R.empty('unicorns'); //=> ''
|
724
|
-
* R.empty({x: 1, y: 2}); //=> {}
|
725
|
-
* R.empty(Uint8Array.from('123')); //=> Uint8Array []
|
726
|
-
*/var empty=/*#__PURE__*/_curry1(function empty(x){return x!=null&&typeof x['fantasy-land/empty']==='function'?x['fantasy-land/empty']():x!=null&&x.constructor!=null&&typeof x.constructor['fantasy-land/empty']==='function'?x.constructor['fantasy-land/empty']():x!=null&&typeof x.empty==='function'?x.empty():x!=null&&x.constructor!=null&&typeof x.constructor.empty==='function'?x.constructor.empty():_isArray(x)?[]:_isString(x)?'':_isObject(x)?{}:_isArguments(x)?function(){return arguments;}():_isTypedArray(x)?x.constructor.from(''):void 0// else
|
727
|
-
;});
|
728
|
-
|
729
|
-
/**
|
730
|
-
* Returns `true` if the given value is its type's empty value; `false`
|
731
|
-
* otherwise.
|
732
|
-
*
|
733
|
-
* @func
|
734
|
-
* @memberOf R
|
735
|
-
* @since v0.1.0
|
736
|
-
* @category Logic
|
737
|
-
* @sig a -> Boolean
|
738
|
-
* @param {*} x
|
739
|
-
* @return {Boolean}
|
740
|
-
* @see R.empty
|
741
|
-
* @example
|
742
|
-
*
|
743
|
-
* R.isEmpty([1, 2, 3]); //=> false
|
744
|
-
* R.isEmpty([]); //=> true
|
745
|
-
* R.isEmpty(''); //=> true
|
746
|
-
* R.isEmpty(null); //=> false
|
747
|
-
* R.isEmpty({}); //=> true
|
748
|
-
* R.isEmpty({length: 0}); //=> false
|
749
|
-
* R.isEmpty(Uint8Array.from('')); //=> true
|
750
|
-
*/var isEmpty=/*#__PURE__*/_curry1(function isEmpty(x){return x!=null&&equals(x,empty(x));});var isEmpty$1 = isEmpty;
|
751
|
-
|
752
602
|
/**
|
753
603
|
* Retrieves the values at given paths of an object.
|
754
604
|
*
|
@@ -926,6 +776,10 @@ var cachedCopy=map.get(value);if(cachedCopy){return cachedCopy;}map.set(value,co
|
|
926
776
|
* @param value input value
|
927
777
|
* @returns boolean
|
928
778
|
*/var isDefinedAndNotNull=function isDefinedAndNotNull(value){return !isNullOrUndefined(value);};/**
|
779
|
+
* A function to check given value is defined and not null
|
780
|
+
* @param value input value
|
781
|
+
* @returns boolean
|
782
|
+
*/var isDefinedNotNullAndNotEmptyString=function isDefinedNotNullAndNotEmptyString(value){return isDefinedAndNotNull(value)&&value!=='';};/**
|
929
783
|
* Determines if the input is an instance of Error
|
930
784
|
* @param obj input value
|
931
785
|
* @returns true if the input is an instance of Error and false otherwise
|
@@ -1021,7 +875,7 @@ if(isDefined(payload.groupId)){payload.groupId=tryStringify(payload.groupId);}el
|
|
1021
875
|
|
1022
876
|
var CAPABILITIES_MANAGER='CapabilitiesManager';var CONFIG_MANAGER='ConfigManager';var EVENT_MANAGER='EventManager';var PLUGINS_MANAGER='PluginsManager';var USER_SESSION_MANAGER='UserSessionManager';var ERROR_HANDLER='ErrorHandler';var PLUGIN_ENGINE='PluginEngine';var STORE_MANAGER='StoreManager';var READY_API='readyApi';var LOAD_CONFIGURATION='LoadConfiguration';var EVENT_REPOSITORY='EventRepository';var EXTERNAL_SRC_LOADER='ExternalSrcLoader';var HTTP_CLIENT='HttpClient';var RS_APP='RudderStackApplication';var ANALYTICS_CORE='AnalyticsCore';
|
1023
877
|
|
1024
|
-
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.0.0-beta.
|
878
|
+
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.0.0-beta.8';var APP_NAMESPACE='com.rudderlabs.javascript';var MODULE_TYPE='npm';var ADBLOCK_PAGE_CATEGORY='RudderJS-Initiated';var ADBLOCK_PAGE_NAME='ad-block page request';var ADBLOCK_PAGE_PATH='/ad-blocked';var GLOBAL_PRELOAD_BUFFER='preloadedEventsBuffer';
|
1025
879
|
|
1026
880
|
var QUERY_PARAM_TRAIT_PREFIX='ajs_trait_';var QUERY_PARAM_PROPERTY_PREFIX='ajs_prop_';var QUERY_PARAM_ANONYMOUS_ID_KEY='ajs_aid';var QUERY_PARAM_USER_ID_KEY='ajs_uid';var QUERY_PARAM_TRACK_EVENT_NAME_KEY='ajs_event';
|
1027
881
|
|
@@ -1129,7 +983,7 @@ timeoutID=globalThis.setTimeout(function(){reject(new Error(SCRIPT_LOAD_TIMEOUT_
|
|
1129
983
|
* Handle errors
|
1130
984
|
*/},{key:"onError",value:function onError(error){if(this.hasErrorHandler){var _this$errorHandler;(_this$errorHandler=this.errorHandler)===null||_this$errorHandler===void 0||_this$errorHandler.onError(error,EXTERNAL_SRC_LOADER);}else {throw error;}}}]);return ExternalSrcLoader;}();
|
1131
985
|
|
1132
|
-
function i(){throw new Error("Cycle detected");}function t(){if(!(
|
986
|
+
function i(){throw new Error("Cycle detected");}function t(){if(!(f>1)){var i,t=!1;while(void 0!==s){var r=s;s=void 0;v++;while(void 0!==r){var n=r.o;r.o=void 0;r.f&=-3;if(!(8&r.f)&&a(r))try{r.c();}catch(r){if(!t){i=r;t=!0;}}r=n;}}v=0;f--;if(t)throw i;}else f--;}function r(i){if(f>0)return i();f++;try{return i();}finally{t();}}var n=void 0;var s=void 0,f=0,v=0,e=0;function u(i){if(void 0!==n){var t=i.n;if(void 0===t||t.t!==n){t={i:0,S:i,p:n.s,n:void 0,t:n,e:void 0,x:void 0,r:t};if(void 0!==n.s)n.s.n=t;n.s=t;i.n=t;if(32&n.f)i.S(t);return t;}else if(-1===t.i){t.i=0;if(void 0!==t.n){t.n.p=t.p;if(void 0!==t.p)t.p.n=t.n;t.p=n.s;t.n=void 0;n.s.n=t;n.s=t;}return t;}}}function c(i){this.v=i;this.i=0;this.n=void 0;this.t=void 0;}c.prototype.h=function(){return !0;};c.prototype.S=function(i){if(this.t!==i&&void 0===i.e){i.x=this.t;if(void 0!==this.t)this.t.e=i;this.t=i;}};c.prototype.U=function(i){if(void 0!==this.t){var t=i.e,r=i.x;if(void 0!==t){t.x=r;i.e=void 0;}if(void 0!==r){r.e=t;i.x=void 0;}if(i===this.t)this.t=r;}};c.prototype.subscribe=function(i){var t=this;return E(function(){var r=t.value,n=32&this.f;this.f&=-33;try{i(r);}finally{this.f|=n;}});};c.prototype.valueOf=function(){return this.value;};c.prototype.toString=function(){return this.value+"";};c.prototype.toJSON=function(){return this.value;};c.prototype.peek=function(){return this.v;};Object.defineProperty(c.prototype,"value",{get:function get(){var i=u(this);if(void 0!==i)i.i=this.i;return this.v;},set:function set(r){if(n instanceof y)!function(){throw new Error("Computed cannot have side-effects");}();if(r!==this.v){if(v>100)i();this.v=r;this.i++;e++;f++;try{for(var o=this.t;void 0!==o;o=o.x)o.t.N();}finally{t();}}}});function d(i){return new c(i);}function a(i){for(var t=i.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return !0;return !1;}function l(i){for(var t=i.s;void 0!==t;t=t.n){var r=t.S.n;if(void 0!==r)t.r=r;t.S.n=t;t.i=-1;if(void 0===t.n){i.s=t;break;}}}function w(i){var t=i.s,r=void 0;while(void 0!==t){var n=t.p;if(-1===t.i){t.S.U(t);if(void 0!==n)n.n=t.n;if(void 0!==t.n)t.n.p=n;}else r=t;t.S.n=t.r;if(void 0!==t.r)t.r=void 0;t=n;}i.s=r;}function y(i){c.call(this,void 0);this.x=i;this.s=void 0;this.g=e-1;this.f=4;}(y.prototype=new c()).h=function(){this.f&=-3;if(1&this.f)return !1;if(32==(36&this.f))return !0;this.f&=-5;if(this.g===e)return !0;this.g=e;this.f|=1;if(this.i>0&&!a(this)){this.f&=-2;return !0;}var i=n;try{l(this);n=this;var t=this.x();if(16&this.f||this.v!==t||0===this.i){this.v=t;this.f&=-17;this.i++;}}catch(i){this.v=i;this.f|=16;this.i++;}n=i;w(this);this.f&=-2;return !0;};y.prototype.S=function(i){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t);}c.prototype.S.call(this,i);};y.prototype.U=function(i){if(void 0!==this.t){c.prototype.U.call(this,i);if(void 0===this.t){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t);}}};y.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var i=this.t;void 0!==i;i=i.x)i.t.N();}};y.prototype.peek=function(){if(!this.h())i();if(16&this.f)throw this.v;return this.v;};Object.defineProperty(y.prototype,"value",{get:function get(){if(1&this.f)i();var t=u(this);this.h();if(void 0!==t)t.i=this.i;if(16&this.f)throw this.v;return this.v;}});function p(i){var r=i.u;i.u=void 0;if("function"==typeof r){f++;var o=n;n=void 0;try{r();}catch(t){i.f&=-2;i.f|=8;g(i);throw t;}finally{n=o;t();}}}function g(i){for(var t=i.s;void 0!==t;t=t.n)t.S.U(t);i.x=void 0;i.s=void 0;p(i);}function b(i){if(n!==this)throw new Error("Out-of-order effect");w(this);n=i;this.f&=-2;if(8&this.f)g(this);t();}function x(i){this.x=i;this.u=void 0;this.s=void 0;this.o=void 0;this.f=32;}x.prototype.c=function(){var i=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();if("function"==typeof t)this.u=t;}finally{i();}};x.prototype.S=function(){if(1&this.f)i();this.f|=1;this.f&=-9;p(this);l(this);f++;var t=n;n=this;return b.bind(this,t);};x.prototype.N=function(){if(!(2&this.f)){this.f|=2;this.o=s;s=this;}};x.prototype.d=function(){this.f|=8;if(!(1&this.f))g(this);};function E(i){var t=new x(i);try{t.c();}catch(i){t.d();throw i;}return t.d.bind(t);}
|
1133
987
|
|
1134
988
|
var LifecycleStatus=/*#__PURE__*/function(LifecycleStatus){LifecycleStatus["Mounted"]="mounted";LifecycleStatus["BrowserCapabilitiesReady"]="browserCapabilitiesReady";LifecycleStatus["Configured"]="configured";LifecycleStatus["PluginsLoading"]="pluginsLoading";LifecycleStatus["PluginsReady"]="pluginsReady";LifecycleStatus["Initialized"]="initialized";LifecycleStatus["Loaded"]="loaded";LifecycleStatus["DestinationsLoading"]="destinationsLoading";LifecycleStatus["DestinationsReady"]="destinationsReady";LifecycleStatus["Ready"]="ready";return LifecycleStatus;}({});
|
1135
989
|
|
@@ -1155,45 +1009,46 @@ LOG_MSG_STYLE// reset the style for the actual message
|
|
1155
1009
|
if(!isString(data[0])){styledLogArgs.push(data[0]);}// append rest of the original arguments
|
1156
1010
|
styledLogArgs.push.apply(styledLogArgs,_toConsumableArray(data.slice(1)));return styledLogArgs;}return data;}}]);return Logger;}();var defaultLogger=new Logger();
|
1157
1011
|
|
1158
|
-
var StorageEncryptionVersion=/*#__PURE__*/function(StorageEncryptionVersion){StorageEncryptionVersion["Legacy"]="legacy";StorageEncryptionVersion["V3"]="v3";return StorageEncryptionVersion;}({});// default
|
1159
|
-
var SUPPORTED_STORAGE_TYPES=['localStorage','memoryStorage','cookieStorage','sessionStorage','none'];var DEFAULT_STORAGE_TYPE='cookieStorage';
|
1160
|
-
|
1161
1012
|
var SOURCE_CONFIG_OPTION_ERROR="\"getSourceConfig\" must be a function. Please make sure that it is defined and returns a valid source configuration object.";var INTG_CDN_BASE_URL_ERROR="Failed to load the SDK as the CDN base URL for integrations is not valid.";var PLUGINS_CDN_BASE_URL_ERROR="Failed to load the SDK as the CDN base URL for plugins is not valid.";var DATA_PLANE_URL_ERROR="Failed to load the SDK as the data plane URL could not be determined. Please check that the data plane URL is set correctly and try again.";var XHR_PAYLOAD_PREP_ERROR="Failed to prepare data for the request.";var EVENT_OBJECT_GENERATION_ERROR="Failed to generate the event object.";var PLUGIN_EXT_POINT_MISSING_ERROR="Failed to invoke plugin because the extension point name is missing.";var PLUGIN_EXT_POINT_INVALID_ERROR="Failed to invoke plugin because the extension point name is invalid.";// ERROR
|
1162
1013
|
var UNSUPPORTED_CONSENT_MANAGER_ERROR=function UNSUPPORTED_CONSENT_MANAGER_ERROR(context,selectedConsentManager,consentManagersToPluginNameMap){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The consent manager \"").concat(selectedConsentManager,"\" is not supported. Please choose one of the following supported consent managers: \"").concat(Object.keys(consentManagersToPluginNameMap),"\".");};var REPORTING_PLUGIN_INIT_FAILURE_ERROR=function REPORTING_PLUGIN_INIT_FAILURE_ERROR(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"Failed to initialize the error reporting plugin.");};var NOTIFY_FAILURE_ERROR=function NOTIFY_FAILURE_ERROR(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"Failed to notify the error.");};var PLUGIN_NAME_MISSING_ERROR=function PLUGIN_NAME_MISSING_ERROR(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"Plugin name is missing.");};var PLUGIN_ALREADY_EXISTS_ERROR=function PLUGIN_ALREADY_EXISTS_ERROR(context,pluginName){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"Plugin \"").concat(pluginName,"\" already exists.");};var PLUGIN_NOT_FOUND_ERROR=function PLUGIN_NOT_FOUND_ERROR(context,pluginName){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"Plugin \"").concat(pluginName,"\" not found.");};var PLUGIN_ENGINE_BUG_ERROR=function PLUGIN_ENGINE_BUG_ERROR(context,pluginName){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"Plugin \"").concat(pluginName,"\" not found in plugins but found in byName. This indicates a bug in the plugin engine. Please report this issue to the development team.");};var PLUGIN_DEPS_ERROR=function PLUGIN_DEPS_ERROR(context,pluginName,notExistDeps){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"Plugin \"").concat(pluginName,"\" could not be loaded because some of its dependencies \"").concat(notExistDeps,"\" do not exist.");};var PLUGIN_INVOCATION_ERROR=function PLUGIN_INVOCATION_ERROR(context,extPoint,pluginName){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"Failed to invoke the \"").concat(extPoint,"\" extension point of plugin \"").concat(pluginName,"\".");};var STORAGE_UNAVAILABILITY_ERROR_PREFIX=function STORAGE_UNAVAILABILITY_ERROR_PREFIX(context,storageType){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The \"").concat(storageType,"\" storage type is ");};var SOURCE_CONFIG_FETCH_ERROR=function SOURCE_CONFIG_FETCH_ERROR(reason){return "Failed to fetch the source config. Reason: ".concat(reason);};var WRITE_KEY_VALIDATION_ERROR=function WRITE_KEY_VALIDATION_ERROR(writeKey){return "The write key \"".concat(writeKey,"\" is invalid. It must be a non-empty string. Please check that the write key is correct and try again.");};var DATA_PLANE_URL_VALIDATION_ERROR=function DATA_PLANE_URL_VALIDATION_ERROR(dataPlaneUrl){return "The data plane URL \"".concat(dataPlaneUrl,"\" is invalid. It must be a valid URL string. Please check that the data plane URL is correct and try again.");};var READY_API_CALLBACK_ERROR=function READY_API_CALLBACK_ERROR(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The callback is not a function.");};var XHR_DELIVERY_ERROR=function XHR_DELIVERY_ERROR(prefix,status,statusText,url){return "".concat(prefix," with status: ").concat(status,", ").concat(statusText," for URL: ").concat(url,".");};var XHR_REQUEST_ERROR=function XHR_REQUEST_ERROR(prefix,e,url){return "".concat(prefix," due to timeout or no connection (").concat(e?e.type:'',") for URL: ").concat(url,".");};var XHR_SEND_ERROR=function XHR_SEND_ERROR(prefix,url){return "".concat(prefix," for URL: ").concat(url);};var STORE_DATA_SAVE_ERROR=function STORE_DATA_SAVE_ERROR(key){return "Failed to save the value for \"".concat(key,"\" to storage");};var STORE_DATA_FETCH_ERROR=function STORE_DATA_FETCH_ERROR(key){return "Failed to retrieve or parse data for \"".concat(key,"\" from storage");};// WARNING
|
1163
|
-
var STORAGE_TYPE_VALIDATION_WARNING=function STORAGE_TYPE_VALIDATION_WARNING(context,storageType,defaultStorageType){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The storage type \"").concat(storageType,"\" is not supported. Please choose one of the following supported
|
1014
|
+
var STORAGE_TYPE_VALIDATION_WARNING=function STORAGE_TYPE_VALIDATION_WARNING(context,storageType,defaultStorageType){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The storage type \"").concat(storageType,"\" is not supported. Please choose one of the following supported types: \"").concat(SUPPORTED_STORAGE_TYPES,"\". The default type \"").concat(defaultStorageType,"\" will be used instead.");};var UNSUPPORTED_ERROR_REPORTING_PROVIDER_WARNING=function UNSUPPORTED_ERROR_REPORTING_PROVIDER_WARNING(context,selectedErrorReportingProvider,errorReportingProvidersToPluginNameMap,defaultProvider){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The error reporting provider \"").concat(selectedErrorReportingProvider,"\" is not supported. Please choose one of the following supported providers: \"").concat(Object.keys(errorReportingProvidersToPluginNameMap),"\". The default provider \"").concat(defaultProvider,"\" will be used instead.");};var UNSUPPORTED_STORAGE_ENCRYPTION_VERSION_WARNING=function UNSUPPORTED_STORAGE_ENCRYPTION_VERSION_WARNING(context,selectedStorageEncryptionVersion,storageEncryptionVersionsToPluginNameMap,defaultVersion){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The storage encryption version \"").concat(selectedStorageEncryptionVersion,"\" is not supported. Please choose one of the following supported versions: \"").concat(Object.keys(storageEncryptionVersionsToPluginNameMap),"\". The default version \"").concat(defaultVersion,"\" will be used instead.");};var STORAGE_DATA_MIGRATION_OVERRIDE_WARNING=function STORAGE_DATA_MIGRATION_OVERRIDE_WARNING(context,storageEncryptionVersion,defaultVersion){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The storage data migration has been disabled because the configured storage encryption version (").concat(storageEncryptionVersion,") is not the latest (").concat(defaultVersion,"). To enable storage data migration, please update the storage encryption version to the latest version.");};var UNSUPPORTED_RESIDENCY_SERVER_REGION_WARNING=function UNSUPPORTED_RESIDENCY_SERVER_REGION_WARNING(context,selectedResidencyServerRegion,defaultRegion){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The residency server region \"").concat(selectedResidencyServerRegion,"\" is not supported. Please choose one of the following supported regions: \"").concat(Object.values(ResidencyServerRegion),"\". The default region \"").concat(defaultRegion,"\" will be used instead.");};var RESERVED_KEYWORD_WARNING=function RESERVED_KEYWORD_WARNING(context,property,parentKeyPath,reservedElements){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The \"").concat(property,"\" property defined under \"").concat(parentKeyPath,"\" is a reserved keyword. Please choose a different property name to avoid conflicts with reserved keywords (").concat(reservedElements,").");};var INVALID_CONTEXT_OBJECT_WARNING=function INVALID_CONTEXT_OBJECT_WARNING(logContext){return "".concat(logContext).concat(LOG_CONTEXT_SEPARATOR,"Please make sure that the \"context\" property in the event API's \"options\" argument is a valid object literal with key-value pairs.");};var UNSUPPORTED_BEACON_API_WARNING=function UNSUPPORTED_BEACON_API_WARNING(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The Beacon API is not supported by your browser. The events will be sent using XHR instead.");};var TIMEOUT_NOT_NUMBER_WARNING=function TIMEOUT_NOT_NUMBER_WARNING(context,timeout,defaultValue){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The session timeout value \"").concat(timeout,"\" is not a number. The default timeout of ").concat(defaultValue," ms will be used instead.");};var TIMEOUT_ZERO_WARNING=function TIMEOUT_ZERO_WARNING(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The session timeout value is 0, which disables the automatic session tracking feature. If you want to enable session tracking, please provide a positive integer value for the timeout.");};var TIMEOUT_NOT_RECOMMENDED_WARNING=function TIMEOUT_NOT_RECOMMENDED_WARNING(context,timeout,minTimeout){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The session timeout value ").concat(timeout," ms is less than the recommended minimum of ").concat(minTimeout," ms. Please consider increasing the timeout value to ensure optimal performance and reliability.");};var INVALID_SESSION_ID_WARNING=function INVALID_SESSION_ID_WARNING(context,sessionId,minSessionIdLength){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The provided session ID (").concat(sessionId,") is either invalid, not a positive integer, or not at least \"").concat(minSessionIdLength,"\" digits long. A new session ID will be auto-generated instead.");};var STORAGE_QUOTA_EXCEEDED_WARNING=function STORAGE_QUOTA_EXCEEDED_WARNING(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The storage is either full or unavailable, so the data will not be persisted. Switching to in-memory storage.");};var STORAGE_UNAVAILABLE_WARNING=function STORAGE_UNAVAILABLE_WARNING(context,selectedStorageType,finalStorageType){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The storage type \"").concat(selectedStorageType,"\" is not available. The SDK will be initialized with \"").concat(finalStorageType,"\" instead.");};var WRITE_KEY_NOT_A_STRING_ERROR=function WRITE_KEY_NOT_A_STRING_ERROR(context,writeKey){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The write key \"").concat(writeKey,"\" is not a string. Please check that the write key is correct and try again.");};var EMPTY_GROUP_CALL_ERROR=function EMPTY_GROUP_CALL_ERROR(context){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The group() method must be called with at least one argument.");};var READY_CALLBACK_INVOKE_ERROR="Failed to invoke the ready callback";var API_CALLBACK_INVOKE_ERROR="API Callback Invocation Failed";var INVALID_CONFIG_URL_WARNING=function INVALID_CONFIG_URL_WARNING(context,configUrl){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The provided config URL \"").concat(configUrl,"\" is invalid. Using the default value instead.");};var POLYFILL_SCRIPT_LOAD_ERROR=function POLYFILL_SCRIPT_LOAD_ERROR(scriptId,url){return "Failed to load the polyfill script with ID \"".concat(scriptId,"\" from URL ").concat(url,".");};var COOKIE_DATA_ENCODING_ERROR="Failed to encode the cookie data.";var UNSUPPORTED_PRE_CONSENT_STORAGE_STRATEGY=function UNSUPPORTED_PRE_CONSENT_STORAGE_STRATEGY(context,selectedStrategy,defaultStrategy){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The pre-consent storage strategy \"").concat(selectedStrategy,"\" is not supported. Please choose one of the following supported strategies: \"").concat(Object.values(StorageStrategy),"\". The default strategy \"").concat(defaultStrategy,"\" will be used instead.");};var UNSUPPORTED_PRE_CONSENT_EVENTS_DELIVERY_TYPE=function UNSUPPORTED_PRE_CONSENT_EVENTS_DELIVERY_TYPE(context,selectedDeliveryType,defaultDeliveryType){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"The pre-consent events delivery type \"").concat(selectedDeliveryType,"\" is not supported. Please choose one of the following supported types: \"").concat(Object.values(DeliveryType),"\". The default type \"").concat(defaultDeliveryType,"\" will be used instead.");};// DEBUG
|
1015
|
+
|
1016
|
+
var CDN_INT_DIR='js-integrations';var CDN_PLUGINS_DIR='plugins';
|
1164
1017
|
|
1165
|
-
var BUILD_TYPE='legacy';var SDK_CDN_BASE_URL='https://cdn.rudderlabs.com';var CDN_ARCH_VERSION_DIR='v3';var
|
1018
|
+
var BUILD_TYPE='legacy';var SDK_CDN_BASE_URL='https://cdn.rudderlabs.com';var CDN_ARCH_VERSION_DIR='v3';var DEST_SDK_BASE_URL="".concat(SDK_CDN_BASE_URL,"/beta/3.0.0-beta/").concat(BUILD_TYPE,"/").concat(CDN_INT_DIR);var PLUGINS_BASE_URL="".concat(SDK_CDN_BASE_URL,"/beta/3.0.0-beta/").concat(BUILD_TYPE,"/").concat(CDN_PLUGINS_DIR);// TODO: change the above to production URLs when beta phase is done
|
1166
1019
|
// const DEST_SDK_BASE_URL = `${SDK_CDN_BASE_URL}/latest/${CDN_ARCH_VERSION_DIR}/${BUILD_TYPE}/${CDN_INT_DIR}`;
|
1167
1020
|
// const PLUGINS_BASE_URL = `${SDK_CDN_BASE_URL}/latest/${CDN_ARCH_VERSION_DIR}/${BUILD_TYPE}/${CDN_PLUGINS_DIR}`;
|
1168
1021
|
var DEFAULT_CONFIG_BE_URL='https://api.rudderstack.com';
|
1169
1022
|
|
1170
1023
|
var _StorageEncryptionVer;var DEFAULT_ERROR_REPORTING_PROVIDER='bugsnag';var DEFAULT_STORAGE_ENCRYPTION_VERSION=StorageEncryptionVersion.V3;var ConsentManagersToPluginNameMap={oneTrust:PluginName.OneTrustConsentManager,ketch:PluginName.KetchConsentManager};var ErrorReportingProvidersToPluginNameMap=_defineProperty({},DEFAULT_ERROR_REPORTING_PROVIDER,PluginName.Bugsnag);var StorageEncryptionVersionsToPluginNameMap=(_StorageEncryptionVer={},_defineProperty(_StorageEncryptionVer,DEFAULT_STORAGE_ENCRYPTION_VERSION,PluginName.StorageEncryption),_defineProperty(_StorageEncryptionVer,StorageEncryptionVersion.Legacy,PluginName.StorageEncryptionLegacy),_StorageEncryptionVer);
|
1171
1024
|
|
1172
|
-
var defaultLoadOptions={logLevel:LogLevel.Error,configUrl:DEFAULT_CONFIG_BE_URL,loadIntegration:true,sessions:{autoTrack:true,timeout:DEFAULT_SESSION_TIMEOUT_MS},sameSiteCookie:CookieSameSite.Lax,polyfillIfRequired:true,integrations:{All:true},useBeacon:false,beaconQueueOptions:{},destinationsQueueOptions:{},queueOptions:{},lockIntegrationsVersion:false,uaChTrackLevel:UaChTrackLevel.None,plugins:[],useGlobalIntegrationsConfigInEvents:false,bufferDataPlaneEventsUntilReady:false,dataPlaneEventsBufferTimeout:DEFAULT_DATA_PLANE_EVENTS_BUFFER_TIMEOUT_MS,storage:{encryption:{version:DEFAULT_STORAGE_ENCRYPTION_VERSION},migrate:false},sendAdblockPageOptions:{}};var loadOptionsState=
|
1025
|
+
var defaultLoadOptions={logLevel:LogLevel.Error,configUrl:DEFAULT_CONFIG_BE_URL,loadIntegration:true,sessions:{autoTrack:true,timeout:DEFAULT_SESSION_TIMEOUT_MS},sameSiteCookie:CookieSameSite.Lax,polyfillIfRequired:true,integrations:{All:true},useBeacon:false,beaconQueueOptions:{},destinationsQueueOptions:{},queueOptions:{},lockIntegrationsVersion:false,uaChTrackLevel:UaChTrackLevel.None,plugins:[],useGlobalIntegrationsConfigInEvents:false,bufferDataPlaneEventsUntilReady:false,dataPlaneEventsBufferTimeout:DEFAULT_DATA_PLANE_EVENTS_BUFFER_TIMEOUT_MS,storage:{encryption:{version:DEFAULT_STORAGE_ENCRYPTION_VERSION},migrate:false},sendAdblockPageOptions:{}};var loadOptionsState=d(clone$1(defaultLoadOptions));
|
1173
1026
|
|
1174
|
-
var
|
1027
|
+
var userSessionStorageKeys={userId:'rl_user_id',userTraits:'rl_trait',anonymousId:'rl_anonymous_id',groupId:'rl_group_id',groupTraits:'rl_group_trait',initialReferrer:'rl_page_init_referrer',initialReferringDomain:'rl_page_init_referring_domain',sessionInfo:'rl_session'};var defaultUserSessionValues={userId:'',userTraits:{},anonymousId:'',groupId:'',groupTraits:{},initialReferrer:'',initialReferringDomain:'',sessionInfo:{}};
|
1175
1028
|
|
1176
|
-
var
|
1029
|
+
var defaultSessionInfo={autoTrack:true,timeout:DEFAULT_SESSION_TIMEOUT_MS};var sessionState={userId:d(defaultUserSessionValues.userId),userTraits:d(defaultUserSessionValues.userTraits),anonymousId:d(defaultUserSessionValues.anonymousId),groupId:d(defaultUserSessionValues.groupId),groupTraits:d(defaultUserSessionValues.groupTraits),initialReferrer:d(defaultUserSessionValues.initialReferrer),initialReferringDomain:d(defaultUserSessionValues.initialReferringDomain),sessionInfo:d(defaultUserSessionValues.sessionInfo)};
|
1177
1030
|
|
1178
|
-
var
|
1031
|
+
var capabilitiesState={isOnline:d(true),storage:{isLocalStorageAvailable:d(false),isCookieStorageAvailable:d(false),isSessionStorageAvailable:d(false)},isBeaconAvailable:d(false),isLegacyDOM:d(false),isUaCHAvailable:d(false),isCryptoAvailable:d(false),isIE11:d(false),isAdBlocked:d(false)};
|
1179
1032
|
|
1180
|
-
var
|
1033
|
+
var reportingState={isErrorReportingEnabled:d(false),isMetricsReportingEnabled:d(false),errorReportingProviderPluginName:d(undefined)};
|
1181
1034
|
|
1182
|
-
var
|
1035
|
+
var sourceConfigState=d(undefined);
|
1183
1036
|
|
1184
|
-
var
|
1037
|
+
var lifecycleState={activeDataplaneUrl:d(undefined),integrationsCDNPath:d(DEST_SDK_BASE_URL),pluginsCDNPath:d(PLUGINS_BASE_URL),sourceConfigUrl:d(undefined),status:d(undefined),initialized:d(false),logLevel:d(LogLevel.Error),loaded:d(false),readyCallbacks:d([]),writeKey:d(undefined),dataPlaneUrl:d(undefined)};
|
1185
1038
|
|
1186
|
-
var
|
1039
|
+
var consentsState={data:d({initialized:false}),activeConsentManagerPluginName:d(undefined),preConsentOptions:d({enabled:false})};
|
1187
1040
|
|
1188
|
-
var
|
1041
|
+
var metricsState={retries:d(0),dropped:d(0),sent:d(0),queued:d(0),triggered:d(0)};
|
1189
1042
|
|
1190
|
-
var
|
1043
|
+
var contextState={app:d({name:APP_NAME,namespace:APP_NAMESPACE,version:APP_VERSION}),traits:d(null),library:d({name:APP_NAME,version:APP_VERSION}),userAgent:d(''),device:d(null),network:d(null),os:d({name:'',version:''}),locale:d(null),screen:d({density:0,width:0,height:0,innerWidth:0,innerHeight:0}),'ua-ch':d(undefined)};
|
1191
1044
|
|
1192
|
-
var
|
1045
|
+
var nativeDestinationsState={configuredDestinations:d([]),activeDestinations:d([]),loadOnlyIntegrations:d({}),failedDestinations:d([]),loadIntegration:d(true),initializedDestinations:d([]),clientDestinationsReady:d(false),integrationsConfig:d({})};
|
1193
1046
|
|
1194
|
-
var
|
1047
|
+
var eventBufferState={toBeProcessedArray:d([]),readyCallbacksArray:d([])};
|
1195
1048
|
|
1196
|
-
var
|
1049
|
+
var pluginsState={ready:d(false),loadedPlugins:d([]),failedPlugins:d([]),pluginsToLoadFromConfig:d([]),activePlugins:d([]),totalPluginsToLoad:d(0)};
|
1050
|
+
|
1051
|
+
var storageState={encryptionPluginName:d(undefined),migrate:d(false),type:d(undefined),cookie:d(undefined),entries:d({}),trulyAnonymousTracking:d(false)};
|
1197
1052
|
|
1198
1053
|
var defaultStateValues={capabilities:capabilitiesState,consents:consentsState,context:contextState,eventBuffer:eventBufferState,lifecycle:lifecycleState,loadOptions:loadOptionsState,metrics:metricsState,nativeDestinations:nativeDestinationsState,plugins:pluginsState,reporting:reportingState,session:sessionState,source:sourceConfigState,storage:storageState};var state=_objectSpread2({},clone$1(defaultStateValues));
|
1199
1054
|
|
@@ -1259,173 +1114,6 @@ destination.config.useNativeSDK===true);};var isHybridModeDestination=function i
|
|
1259
1114
|
* @returns ISO formatted timestamp string
|
1260
1115
|
*/var getCurrentTimeFormatted=function getCurrentTimeFormatted(){var curDateTime=new Date().toISOString();return curDateTime;};
|
1261
1116
|
|
1262
|
-
function random(len){return crypto.getRandomValues(new Uint8Array(len));}
|
1263
|
-
|
1264
|
-
var SIZE=4096,HEX$1=[],IDX$1=0,BUFFER$1;for(;IDX$1<256;IDX$1++){HEX$1[IDX$1]=(IDX$1+256).toString(16).substring(1);}function v4$1(){if(!BUFFER$1||IDX$1+16>SIZE){BUFFER$1=random(SIZE);IDX$1=0;}var i=0,tmp,out='';for(;i<16;i++){tmp=BUFFER$1[IDX$1+i];if(i==6)out+=HEX$1[tmp&15|64];else if(i==8)out+=HEX$1[tmp&63|128];else out+=HEX$1[tmp];if(i&1&&i>1&&i<11)out+='-';}IDX$1+=16;return out;}
|
1265
|
-
|
1266
|
-
var IDX=256,HEX=[],BUFFER;while(IDX--)HEX[IDX]=(IDX+256).toString(16).substring(1);function v4(){var i=0,num,out='';if(!BUFFER||IDX+16>256){BUFFER=Array(i=256);while(i--)BUFFER[i]=256*Math.random()|0;i=IDX=0;}for(;i<16;i++){num=BUFFER[IDX+i];if(i==6)out+=HEX[num&15|64];else if(i==8)out+=HEX[num&63|128];else out+=HEX[num];if(i&1&&i>1&&i<11)out+='-';}IDX++;return out;}
|
1267
|
-
|
1268
|
-
var hasCrypto$1=function hasCrypto(){return !isNullOrUndefined(globalThis.crypto)&&isFunction(globalThis.crypto.getRandomValues);};
|
1269
|
-
|
1270
|
-
var generateUUID=function generateUUID(){if(hasCrypto$1()){return v4$1();}return v4();};
|
1271
|
-
|
1272
|
-
var QueueStatuses={IN_PROGRESS:'inProgress',QUEUE:'queue',RECLAIM_START:'reclaimStart',RECLAIM_END:'reclaimEnd',ACK:'ack',BATCH_QUEUE:'batchQueue'};
|
1273
|
-
|
1274
|
-
var _CNameMapping$18;var DIR_NAME$18='AdobeAnalytics';var NAME$18='ADOBE_ANALYTICS';var DISPLAY_NAME$18='Adobe Analytics';var DISPLAY_NAME_TO_DIR_NAME_MAP$18=_defineProperty({},DISPLAY_NAME$18,DIR_NAME$18);var CNameMapping$18=(_CNameMapping$18={'Adobe Analytics':NAME$18,ADOBEANALYTICS:NAME$18,'ADOBE ANALYTICS':NAME$18},_defineProperty(_CNameMapping$18,NAME$18,NAME$18),_defineProperty(_CNameMapping$18,"AdobeAnalytics",NAME$18),_defineProperty(_CNameMapping$18,"adobeanalytics",NAME$18),_defineProperty(_CNameMapping$18,'adobe analytics',NAME$18),_defineProperty(_CNameMapping$18,'Adobe analytics',NAME$18),_defineProperty(_CNameMapping$18,'adobe Analytics',NAME$18),_CNameMapping$18);
|
1275
|
-
|
1276
|
-
var _CNameMapping$17;var DIR_NAME$17='Amplitude';var NAME$17='AM';var DISPLAY_NAME$17='Amplitude';var DISPLAY_NAME_TO_DIR_NAME_MAP$17=_defineProperty({},DISPLAY_NAME$17,DIR_NAME$17);var CNameMapping$17=(_CNameMapping$17={},_defineProperty(_CNameMapping$17,NAME$17,NAME$17),_defineProperty(_CNameMapping$17,"AMPLITUDE",NAME$17),_defineProperty(_CNameMapping$17,"Amplitude",NAME$17),_defineProperty(_CNameMapping$17,"am",NAME$17),_CNameMapping$17);
|
1277
|
-
|
1278
|
-
var _CNameMapping$16;var DIR_NAME$16='Appcues';var NAME$16='APPCUES';var DISPLAY_NAME$16='Appcues';var DISPLAY_NAME_TO_DIR_NAME_MAP$16=_defineProperty({},DISPLAY_NAME$16,DIR_NAME$16);var CNameMapping$16=(_CNameMapping$16={},_defineProperty(_CNameMapping$16,NAME$16,NAME$16),_defineProperty(_CNameMapping$16,"Appcues",NAME$16),_defineProperty(_CNameMapping$16,'App Cues',NAME$16),_defineProperty(_CNameMapping$16,"appcues",NAME$16),_CNameMapping$16);
|
1279
|
-
|
1280
|
-
var _CNameMapping$15;var DIR_NAME$15='BingAds';var NAME$15='BINGADS';var DISPLAY_NAME$15='Bing Ads';var DISPLAY_NAME_TO_DIR_NAME_MAP$15=_defineProperty({},DISPLAY_NAME$15,DIR_NAME$15);var CNameMapping$15=(_CNameMapping$15={},_defineProperty(_CNameMapping$15,NAME$15,NAME$15),_defineProperty(_CNameMapping$15,"BingAds",NAME$15),_defineProperty(_CNameMapping$15,"bingads",NAME$15),_defineProperty(_CNameMapping$15,'Bing Ads',NAME$15),_defineProperty(_CNameMapping$15,'Bing ads',NAME$15),_defineProperty(_CNameMapping$15,'bing Ads',NAME$15),_defineProperty(_CNameMapping$15,'bing ads',NAME$15),_CNameMapping$15);
|
1281
|
-
|
1282
|
-
var _CNameMapping$14;var DIR_NAME$14='Braze';var NAME$14='BRAZE';var DISPLAY_NAME$14='Braze';var DISPLAY_NAME_TO_DIR_NAME_MAP$14=_defineProperty({},DISPLAY_NAME$14,DIR_NAME$14);var CNameMapping$14=(_CNameMapping$14={},_defineProperty(_CNameMapping$14,NAME$14,NAME$14),_defineProperty(_CNameMapping$14,"Braze",NAME$14),_defineProperty(_CNameMapping$14,"braze",NAME$14),_CNameMapping$14);
|
1283
|
-
|
1284
|
-
var _CNameMapping$13;var DIR_NAME$13='Bugsnag';var NAME$13='BUGSNAG';var DISPLAY_NAME$13='Bugsnag';var DISPLAY_NAME_TO_DIR_NAME_MAP$13=_defineProperty({},DISPLAY_NAME$13,DIR_NAME$13);var CNameMapping$13=(_CNameMapping$13={},_defineProperty(_CNameMapping$13,NAME$13,NAME$13),_defineProperty(_CNameMapping$13,"bugsnag",NAME$13),_defineProperty(_CNameMapping$13,"Bugsnag",NAME$13),_CNameMapping$13);
|
1285
|
-
|
1286
|
-
var _CNameMapping$12;var DIR_NAME$12='Chartbeat';var NAME$12='CHARTBEAT';var DISPLAY_NAME$12='Chartbeat';var DISPLAY_NAME_TO_DIR_NAME_MAP$12=_defineProperty({},DISPLAY_NAME$12,DIR_NAME$12);var CNameMapping$12=(_CNameMapping$12={},_defineProperty(_CNameMapping$12,NAME$12,NAME$12),_defineProperty(_CNameMapping$12,"Chartbeat",NAME$12),_defineProperty(_CNameMapping$12,"chartbeat",NAME$12),_defineProperty(_CNameMapping$12,'Chart Beat',NAME$12),_defineProperty(_CNameMapping$12,'chart beat',NAME$12),_CNameMapping$12);
|
1287
|
-
|
1288
|
-
var _CNameMapping$11;var DIR_NAME$11='Clevertap';var NAME$11='CLEVERTAP';var DISPLAY_NAME$11='CleverTap';var DISPLAY_NAME_TO_DIR_NAME_MAP$11=_defineProperty({},DISPLAY_NAME$11,DIR_NAME$11);var CNameMapping$11=(_CNameMapping$11={},_defineProperty(_CNameMapping$11,NAME$11,NAME$11),_defineProperty(_CNameMapping$11,"Clevertap",NAME$11),_defineProperty(_CNameMapping$11,"clevertap",NAME$11),_CNameMapping$11);
|
1289
|
-
|
1290
|
-
var _CNameMapping$10;var DIR_NAME$10='Comscore';var NAME$10='COMSCORE';var DISPLAY_NAME$10='Comscore';var DISPLAY_NAME_TO_DIR_NAME_MAP$10=_defineProperty({},DISPLAY_NAME$10,DIR_NAME$10);var CNameMapping$10=(_CNameMapping$10={},_defineProperty(_CNameMapping$10,NAME$10,NAME$10),_defineProperty(_CNameMapping$10,"Comscore",NAME$10),_defineProperty(_CNameMapping$10,'Com Score',NAME$10),_defineProperty(_CNameMapping$10,'com Score',NAME$10),_defineProperty(_CNameMapping$10,'com score',NAME$10),_defineProperty(_CNameMapping$10,'Com score',NAME$10),_CNameMapping$10);
|
1291
|
-
|
1292
|
-
var _CNameMapping$$;var DIR_NAME$$='Criteo';var NAME$$='CRITEO';var DISPLAY_NAME$$='Criteo';var DISPLAY_NAME_TO_DIR_NAME_MAP$$=_defineProperty({},DISPLAY_NAME$$,DIR_NAME$$);var CNameMapping$$=(_CNameMapping$$={},_defineProperty(_CNameMapping$$,NAME$$,NAME$$),_defineProperty(_CNameMapping$$,"Criteo",NAME$$),_defineProperty(_CNameMapping$$,"criteo",NAME$$),_CNameMapping$$);
|
1293
|
-
|
1294
|
-
var _CNameMapping$_;var DIR_NAME$_='CustomerIO';var NAME$_='CUSTOMERIO';var DISPLAY_NAME$_='Customer IO';var DISPLAY_NAME_TO_DIR_NAME_MAP$_=_defineProperty({},DISPLAY_NAME$_,DIR_NAME$_);var CNameMapping$_=(_CNameMapping$_={},_defineProperty(_CNameMapping$_,NAME$_,NAME$_),_defineProperty(_CNameMapping$_,"Customerio",NAME$_),_defineProperty(_CNameMapping$_,'Customer.io',NAME$_),_defineProperty(_CNameMapping$_,'CUSTOMER.IO',NAME$_),_defineProperty(_CNameMapping$_,'customer.io',NAME$_),_CNameMapping$_);
|
1295
|
-
|
1296
|
-
var _CNameMapping$Z;var DIR_NAME$Z='Drip';var NAME$Z='DRIP';var DISPLAY_NAME$Z='Drip';var DISPLAY_NAME_TO_DIR_NAME_MAP$Z=_defineProperty({},DISPLAY_NAME$Z,DIR_NAME$Z);var CNameMapping$Z=(_CNameMapping$Z={},_defineProperty(_CNameMapping$Z,NAME$Z,NAME$Z),_defineProperty(_CNameMapping$Z,"Drip",NAME$Z),_defineProperty(_CNameMapping$Z,"drip",NAME$Z),_CNameMapping$Z);
|
1297
|
-
|
1298
|
-
var _CNameMapping$Y;var DIR_NAME$Y='FacebookPixel';var NAME$Y='FACEBOOK_PIXEL';var DISPLAY_NAME$Y='Facebook Pixel';var DISPLAY_NAME_TO_DIR_NAME_MAP$Y=_defineProperty({},DISPLAY_NAME$Y,DIR_NAME$Y);var CNameMapping$Y=(_CNameMapping$Y={},_defineProperty(_CNameMapping$Y,NAME$Y,NAME$Y),_defineProperty(_CNameMapping$Y,'FB Pixel',NAME$Y),_defineProperty(_CNameMapping$Y,'Facebook Pixel',NAME$Y),_defineProperty(_CNameMapping$Y,'facebook pixel',NAME$Y),_defineProperty(_CNameMapping$Y,"fbpixel",NAME$Y),_defineProperty(_CNameMapping$Y,"FBPIXEL",NAME$Y),_defineProperty(_CNameMapping$Y,"FB_PIXEL",NAME$Y),_CNameMapping$Y);
|
1299
|
-
|
1300
|
-
var _CNameMapping$X;var DIR_NAME$X='Fullstory';var NAME$X='FULLSTORY';var DISPLAY_NAME$X='Fullstory';var DISPLAY_NAME_TO_DIR_NAME_MAP$X=_defineProperty({},DISPLAY_NAME$X,DIR_NAME$X);var CNameMapping$X=(_CNameMapping$X={},_defineProperty(_CNameMapping$X,NAME$X,NAME$X),_defineProperty(_CNameMapping$X,"Fullstory",NAME$X),_defineProperty(_CNameMapping$X,"FullStory",NAME$X),_defineProperty(_CNameMapping$X,'full Story',NAME$X),_defineProperty(_CNameMapping$X,'Full Story',NAME$X),_defineProperty(_CNameMapping$X,'Full story',NAME$X),_defineProperty(_CNameMapping$X,'full story',NAME$X),_defineProperty(_CNameMapping$X,"fullstory",NAME$X),_CNameMapping$X);
|
1301
|
-
|
1302
|
-
var _CNameMapping$W;var DIR_NAME$W='GA';var NAME$W='GA';var DISPLAY_NAME$W='Google Analytics';var DISPLAY_NAME_TO_DIR_NAME_MAP$W=_defineProperty({},DISPLAY_NAME$W,DIR_NAME$W);var CNameMapping$W=(_CNameMapping$W={},_defineProperty(_CNameMapping$W,NAME$W,NAME$W),_defineProperty(_CNameMapping$W,'Google Analytics',NAME$W),_defineProperty(_CNameMapping$W,"GoogleAnalytics",NAME$W),_defineProperty(_CNameMapping$W,'GOOGLE ANALYTICS',NAME$W),_defineProperty(_CNameMapping$W,'google analytics',NAME$W),_CNameMapping$W);
|
1303
|
-
|
1304
|
-
var _CNameMapping$V;var DIR_NAME$V='GA4';var NAME$V='GA4';var DISPLAY_NAME$V='Google Analytics 4 (GA4)';var DISPLAY_NAME_TO_DIR_NAME_MAP$V=_defineProperty({},DISPLAY_NAME$V,DIR_NAME$V);var CNameMapping$V=(_CNameMapping$V={},_defineProperty(_CNameMapping$V,NAME$V,NAME$V),_defineProperty(_CNameMapping$V,'Google Analytics 4',NAME$V),_defineProperty(_CNameMapping$V,'Google analytics 4',NAME$V),_defineProperty(_CNameMapping$V,'google analytics 4',NAME$V),_defineProperty(_CNameMapping$V,'Google Analytics4',NAME$V),_defineProperty(_CNameMapping$V,'Google analytics4',NAME$V),_defineProperty(_CNameMapping$V,'google analytics4',NAME$V),_defineProperty(_CNameMapping$V,"GoogleAnalytics4",NAME$V),_CNameMapping$V);
|
1305
|
-
|
1306
|
-
var _CNameMapping$U;var DIR_NAME$U='GoogleAds';var NAME$U='GOOGLEADS';var DISPLAY_NAME$U='Google Ads';var DISPLAY_NAME_TO_DIR_NAME_MAP$U=_defineProperty({},DISPLAY_NAME$U,DIR_NAME$U);var CNameMapping$U=(_CNameMapping$U={},_defineProperty(_CNameMapping$U,NAME$U,NAME$U),_defineProperty(_CNameMapping$U,'Google Ads',NAME$U),_defineProperty(_CNameMapping$U,"GoogleAds",NAME$U),_defineProperty(_CNameMapping$U,'GOOGLE ADS',NAME$U),_defineProperty(_CNameMapping$U,'google ads',NAME$U),_defineProperty(_CNameMapping$U,"googleads",NAME$U),_CNameMapping$U);
|
1307
|
-
|
1308
|
-
var _CNameMapping$T;var DIR_NAME$T='GoogleOptimize';var NAME$T='GOOGLE_OPTIMIZE';var DISPLAY_NAME$T='Google Optimize';var DISPLAY_NAME_TO_DIR_NAME_MAP$T=_defineProperty({},DISPLAY_NAME$T,DIR_NAME$T);var CNameMapping$T=(_CNameMapping$T={},_defineProperty(_CNameMapping$T,NAME$T,NAME$T),_defineProperty(_CNameMapping$T,'Google Optimize',NAME$T),_defineProperty(_CNameMapping$T,"GoogleOptimize",NAME$T),_defineProperty(_CNameMapping$T,"Googleoptimize",NAME$T),_defineProperty(_CNameMapping$T,"GOOGLEOPTIMIZE",NAME$T),_defineProperty(_CNameMapping$T,'google optimize',NAME$T),_defineProperty(_CNameMapping$T,'Google optimize',NAME$T),_defineProperty(_CNameMapping$T,'GOOGLE OPTIMIZE',NAME$T),_CNameMapping$T);
|
1309
|
-
|
1310
|
-
var _CNameMapping$S;var DIR_NAME$S='GoogleTagManager';var NAME$S='GTM';var DISPLAY_NAME$S='Google Tag Manager';var DISPLAY_NAME_TO_DIR_NAME_MAP$S=_defineProperty({},DISPLAY_NAME$S,DIR_NAME$S);var CNameMapping$S=(_CNameMapping$S={},_defineProperty(_CNameMapping$S,NAME$S,NAME$S),_defineProperty(_CNameMapping$S,'Google Tag Manager',NAME$S),_defineProperty(_CNameMapping$S,'google tag manager',NAME$S),_defineProperty(_CNameMapping$S,'googletag manager',NAME$S),_defineProperty(_CNameMapping$S,"googletagmanager",NAME$S),_CNameMapping$S);
|
1311
|
-
|
1312
|
-
var _CNameMapping$R;var DIR_NAME$R='Heap';var NAME$R='HEAP';var DISPLAY_NAME$R='Heap.io';var DISPLAY_NAME_TO_DIR_NAME_MAP$R=_defineProperty({},DISPLAY_NAME$R,DIR_NAME$R);var CNameMapping$R=(_CNameMapping$R={},_defineProperty(_CNameMapping$R,NAME$R,NAME$R),_defineProperty(_CNameMapping$R,"Heap",NAME$R),_defineProperty(_CNameMapping$R,"heap",NAME$R),_defineProperty(_CNameMapping$R,'Heap.io',NAME$R),_CNameMapping$R);
|
1313
|
-
|
1314
|
-
var _CNameMapping$Q;var DIR_NAME$Q='Hotjar';var NAME$Q='HOTJAR';var DISPLAY_NAME$Q='Hotjar';var DISPLAY_NAME_TO_DIR_NAME_MAP$Q=_defineProperty({},DISPLAY_NAME$Q,DIR_NAME$Q);var CNameMapping$Q=(_CNameMapping$Q={},_defineProperty(_CNameMapping$Q,NAME$Q,NAME$Q),_defineProperty(_CNameMapping$Q,"Hotjar",NAME$Q),_defineProperty(_CNameMapping$Q,"hotjar",NAME$Q),_defineProperty(_CNameMapping$Q,'Hot Jar',NAME$Q),_defineProperty(_CNameMapping$Q,'hot jar',NAME$Q),_CNameMapping$Q);
|
1315
|
-
|
1316
|
-
var _CNameMapping$P;var DIR_NAME$P='HubSpot';var NAME$P='HS';var DISPLAY_NAME$P='HubSpot';var DISPLAY_NAME_TO_DIR_NAME_MAP$P=_defineProperty({},DISPLAY_NAME$P,DIR_NAME$P);var CNameMapping$P=(_CNameMapping$P={},_defineProperty(_CNameMapping$P,NAME$P,NAME$P),_defineProperty(_CNameMapping$P,"Hubspot",NAME$P),_defineProperty(_CNameMapping$P,"HUBSPOT",NAME$P),_defineProperty(_CNameMapping$P,'hub spot',NAME$P),_defineProperty(_CNameMapping$P,'Hub Spot',NAME$P),_defineProperty(_CNameMapping$P,'Hub spot',NAME$P),_CNameMapping$P);
|
1317
|
-
|
1318
|
-
var _CNameMapping$O;var DIR_NAME$O='INTERCOM';var NAME$O='INTERCOM';var DISPLAY_NAME$O='Intercom';var DISPLAY_NAME_TO_DIR_NAME_MAP$O=_defineProperty({},DISPLAY_NAME$O,DIR_NAME$O);var CNameMapping$O=(_CNameMapping$O={},_defineProperty(_CNameMapping$O,NAME$O,NAME$O),_defineProperty(_CNameMapping$O,"Intercom",NAME$O),_defineProperty(_CNameMapping$O,"intercom",NAME$O),_CNameMapping$O);
|
1319
|
-
|
1320
|
-
var _CNameMapping$N;var DIR_NAME$N='Keen';var NAME$N='KEEN';var DISPLAY_NAME$N='Keen';var DISPLAY_NAME_TO_DIR_NAME_MAP$N=_defineProperty({},DISPLAY_NAME$N,DIR_NAME$N);var CNameMapping$N=(_CNameMapping$N={},_defineProperty(_CNameMapping$N,NAME$N,NAME$N),_defineProperty(_CNameMapping$N,"Keen",NAME$N),_defineProperty(_CNameMapping$N,'Keen.io',NAME$N),_defineProperty(_CNameMapping$N,"keen",NAME$N),_defineProperty(_CNameMapping$N,'keen.io',NAME$N),_CNameMapping$N);
|
1321
|
-
|
1322
|
-
var _CNameMapping$M;var DIR_NAME$M='Kissmetrics';var NAME$M='KISSMETRICS';var DISPLAY_NAME$M='Kiss Metrics';var DISPLAY_NAME_TO_DIR_NAME_MAP$M=_defineProperty({},DISPLAY_NAME$M,DIR_NAME$M);var CNameMapping$M=(_CNameMapping$M={},_defineProperty(_CNameMapping$M,NAME$M,NAME$M),_defineProperty(_CNameMapping$M,"Kissmetrics",NAME$M),_defineProperty(_CNameMapping$M,"kissmetrics",NAME$M),_CNameMapping$M);
|
1323
|
-
|
1324
|
-
var _CNameMapping$L;var DIR_NAME$L='Klaviyo';var NAME$L='KLAVIYO';var DISPLAY_NAME$L='Klaviyo';var DISPLAY_NAME_TO_DIR_NAME_MAP$L=_defineProperty({},DISPLAY_NAME$L,DIR_NAME$L);var CNameMapping$L=(_CNameMapping$L={},_defineProperty(_CNameMapping$L,NAME$L,NAME$L),_defineProperty(_CNameMapping$L,"Klaviyo",NAME$L),_defineProperty(_CNameMapping$L,"klaviyo",NAME$L),_CNameMapping$L);
|
1325
|
-
|
1326
|
-
var _CNameMapping$K;var DIR_NAME$K='LaunchDarkly';var NAME$K='LAUNCHDARKLY';var DISPLAY_NAME$K='LaunchDarkly';var DISPLAY_NAME_TO_DIR_NAME_MAP$K=_defineProperty({},DISPLAY_NAME$K,DIR_NAME$K);var CNameMapping$K=(_CNameMapping$K={},_defineProperty(_CNameMapping$K,NAME$K,NAME$K),_defineProperty(_CNameMapping$K,"LaunchDarkly",NAME$K),_defineProperty(_CNameMapping$K,"Launch_Darkly",NAME$K),_defineProperty(_CNameMapping$K,'Launch Darkly',NAME$K),_defineProperty(_CNameMapping$K,"launchDarkly",NAME$K),_defineProperty(_CNameMapping$K,'launch darkly',NAME$K),_CNameMapping$K);
|
1327
|
-
|
1328
|
-
var _CNameMapping$J;var DIR_NAME$J='LinkedInInsightTag';var NAME$J='LINKEDIN_INSIGHT_TAG';var DISPLAY_NAME$J='Linkedin Insight Tag';var DISPLAY_NAME_TO_DIR_NAME_MAP$J=_defineProperty({},DISPLAY_NAME$J,DIR_NAME$J);var CNameMapping$J=(_CNameMapping$J={},_defineProperty(_CNameMapping$J,NAME$J,NAME$J),_defineProperty(_CNameMapping$J,'LinkedIn Insight Tag',NAME$J),_defineProperty(_CNameMapping$J,'LinkedIn insight tag',NAME$J),_defineProperty(_CNameMapping$J,'linkedIn insight tag',NAME$J),_defineProperty(_CNameMapping$J,"Linkedin_insight_tag",NAME$J),_defineProperty(_CNameMapping$J,"LinkedinInsighttag",NAME$J),_defineProperty(_CNameMapping$J,"LinkedinInsightTag",NAME$J),_defineProperty(_CNameMapping$J,"LinkedInInsightTag",NAME$J),_defineProperty(_CNameMapping$J,"Linkedininsighttag",NAME$J),_defineProperty(_CNameMapping$J,"LINKEDININSIGHTTAG",NAME$J),_defineProperty(_CNameMapping$J,"linkedininsighttag",NAME$J),_CNameMapping$J);
|
1329
|
-
|
1330
|
-
var _CNameMapping$I;var DIR_NAME$I='Lotame';var NAME$I='LOTAME';var DISPLAY_NAME$I='Lotame';var DISPLAY_NAME_TO_DIR_NAME_MAP$I=_defineProperty({},DISPLAY_NAME$I,DIR_NAME$I);var CNameMapping$I=(_CNameMapping$I={},_defineProperty(_CNameMapping$I,NAME$I,NAME$I),_defineProperty(_CNameMapping$I,"Lotame",NAME$I),_defineProperty(_CNameMapping$I,"lotame",NAME$I),_CNameMapping$I);
|
1331
|
-
|
1332
|
-
var _CNameMapping$H;var DIR_NAME$H='Lytics';var NAME$H='LYTICS';var DISPLAY_NAME$H='Lytics';var DISPLAY_NAME_TO_DIR_NAME_MAP$H=_defineProperty({},DISPLAY_NAME$H,DIR_NAME$H);var CNameMapping$H=(_CNameMapping$H={},_defineProperty(_CNameMapping$H,NAME$H,NAME$H),_defineProperty(_CNameMapping$H,"Lytics",NAME$H),_defineProperty(_CNameMapping$H,"lytics",NAME$H),_CNameMapping$H);
|
1333
|
-
|
1334
|
-
var _CNameMapping$G;var DIR_NAME$G='Mixpanel';var NAME$G='MP';var DISPLAY_NAME$G='Mixpanel';var DISPLAY_NAME_TO_DIR_NAME_MAP$G=_defineProperty({},DISPLAY_NAME$G,DIR_NAME$G);var CNameMapping$G=(_CNameMapping$G={},_defineProperty(_CNameMapping$G,NAME$G,NAME$G),_defineProperty(_CNameMapping$G,"MIXPANEL",NAME$G),_defineProperty(_CNameMapping$G,"Mixpanel",NAME$G),_defineProperty(_CNameMapping$G,'MIX PANEL',NAME$G),_defineProperty(_CNameMapping$G,'Mix panel',NAME$G),_defineProperty(_CNameMapping$G,'Mix Panel',NAME$G),_CNameMapping$G);
|
1335
|
-
|
1336
|
-
var _CNameMapping$F;var DIR_NAME$F='MoEngage';var NAME$F='MOENGAGE';var DISPLAY_NAME$F='MoEngage';var DISPLAY_NAME_TO_DIR_NAME_MAP$F=_defineProperty({},DISPLAY_NAME$F,DIR_NAME$F);var CNameMapping$F=(_CNameMapping$F={},_defineProperty(_CNameMapping$F,NAME$F,NAME$F),_defineProperty(_CNameMapping$F,"MoEngage",NAME$F),_defineProperty(_CNameMapping$F,"moengage",NAME$F),_defineProperty(_CNameMapping$F,"Moengage",NAME$F),_defineProperty(_CNameMapping$F,'Mo Engage',NAME$F),_defineProperty(_CNameMapping$F,'mo engage',NAME$F),_defineProperty(_CNameMapping$F,'Mo engage',NAME$F),_CNameMapping$F);
|
1337
|
-
|
1338
|
-
var _CNameMapping$E;var DIR_NAME$E='Optimizely';var NAME$E='OPTIMIZELY';var DISPLAY_NAME$E='Optimizely Web';var DISPLAY_NAME_TO_DIR_NAME_MAP$E=_defineProperty({},DISPLAY_NAME$E,DIR_NAME$E);var CNameMapping$E=(_CNameMapping$E={},_defineProperty(_CNameMapping$E,NAME$E,NAME$E),_defineProperty(_CNameMapping$E,"Optimizely",NAME$E),_defineProperty(_CNameMapping$E,"optimizely",NAME$E),_CNameMapping$E);
|
1339
|
-
|
1340
|
-
var _CNameMapping$D;var DIR_NAME$D='Pendo';var NAME$D='PENDO';var DISPLAY_NAME$D='Pendo';var DISPLAY_NAME_TO_DIR_NAME_MAP$D=_defineProperty({},DISPLAY_NAME$D,DIR_NAME$D);var CNameMapping$D=(_CNameMapping$D={},_defineProperty(_CNameMapping$D,NAME$D,NAME$D),_defineProperty(_CNameMapping$D,"Pendo",NAME$D),_defineProperty(_CNameMapping$D,"pendo",NAME$D),_CNameMapping$D);
|
1341
|
-
|
1342
|
-
var _CNameMapping$C;var DIR_NAME$C='PinterestTag';var NAME$C='PINTEREST_TAG';var DISPLAY_NAME$C='Pinterest Tag';var DISPLAY_NAME_TO_DIR_NAME_MAP$C=_defineProperty({},DISPLAY_NAME$C,DIR_NAME$C);var CNameMapping$C=(_CNameMapping$C={},_defineProperty(_CNameMapping$C,NAME$C,NAME$C),_defineProperty(_CNameMapping$C,"PinterestTag",NAME$C),_defineProperty(_CNameMapping$C,"Pinterest_Tag",NAME$C),_defineProperty(_CNameMapping$C,"PINTERESTTAG",NAME$C),_defineProperty(_CNameMapping$C,"pinterest",NAME$C),_defineProperty(_CNameMapping$C,"PinterestAds",NAME$C),_defineProperty(_CNameMapping$C,"Pinterest_Ads",NAME$C),_defineProperty(_CNameMapping$C,"Pinterest",NAME$C),_defineProperty(_CNameMapping$C,'Pinterest Tag',NAME$C),_defineProperty(_CNameMapping$C,'Pinterest tag',NAME$C),_defineProperty(_CNameMapping$C,'PINTEREST TAG',NAME$C),_defineProperty(_CNameMapping$C,'pinterest tag',NAME$C),_defineProperty(_CNameMapping$C,'Pinterest Ads',NAME$C),_defineProperty(_CNameMapping$C,'Pinterest ads',NAME$C),_CNameMapping$C);
|
1343
|
-
|
1344
|
-
var _CNameMapping$B;var DIR_NAME$B='PostAffiliatePro';var NAME$B='POST_AFFILIATE_PRO';var DISPLAY_NAME$B='Post Affiliate Pro';var DISPLAY_NAME_TO_DIR_NAME_MAP$B=_defineProperty({},DISPLAY_NAME$B,DIR_NAME$B);var CNameMapping$B=(_CNameMapping$B={},_defineProperty(_CNameMapping$B,NAME$B,NAME$B),_defineProperty(_CNameMapping$B,"PostAffiliatePro",NAME$B),_defineProperty(_CNameMapping$B,"Post_affiliate_pro",NAME$B),_defineProperty(_CNameMapping$B,'Post Affiliate Pro',NAME$B),_defineProperty(_CNameMapping$B,'Post affiliate pro',NAME$B),_defineProperty(_CNameMapping$B,'post affiliate pro',NAME$B),_defineProperty(_CNameMapping$B,"postaffiliatepro",NAME$B),_defineProperty(_CNameMapping$B,"POSTAFFILIATEPRO",NAME$B),_CNameMapping$B);
|
1345
|
-
|
1346
|
-
var _CNameMapping$A;var DIR_NAME$A='Posthog';var NAME$A='POSTHOG';var DISPLAY_NAME$A='PostHog';var DISPLAY_NAME_TO_DIR_NAME_MAP$A=_defineProperty({},DISPLAY_NAME$A,DIR_NAME$A);var CNameMapping$A=(_CNameMapping$A={},_defineProperty(_CNameMapping$A,NAME$A,NAME$A),_defineProperty(_CNameMapping$A,"PostHog",NAME$A),_defineProperty(_CNameMapping$A,"Posthog",NAME$A),_defineProperty(_CNameMapping$A,"posthog",NAME$A),_defineProperty(_CNameMapping$A,'Post Hog',NAME$A),_defineProperty(_CNameMapping$A,'Post hog',NAME$A),_defineProperty(_CNameMapping$A,'post hog',NAME$A),_CNameMapping$A);
|
1347
|
-
|
1348
|
-
var _CNameMapping$z;var DIR_NAME$z='ProfitWell';var NAME$z='PROFITWELL';var DISPLAY_NAME$z='ProfitWell';var DISPLAY_NAME_TO_DIR_NAME_MAP$z=_defineProperty({},DISPLAY_NAME$z,DIR_NAME$z);var CNameMapping$z=(_CNameMapping$z={},_defineProperty(_CNameMapping$z,NAME$z,NAME$z),_defineProperty(_CNameMapping$z,"ProfitWell",NAME$z),_defineProperty(_CNameMapping$z,"profitwell",NAME$z),_defineProperty(_CNameMapping$z,"Profitwell",NAME$z),_defineProperty(_CNameMapping$z,'Profit Well',NAME$z),_defineProperty(_CNameMapping$z,'profit well',NAME$z),_defineProperty(_CNameMapping$z,'Profit well',NAME$z),_CNameMapping$z);
|
1349
|
-
|
1350
|
-
var _CNameMapping$y;var DIR_NAME$y='Qualtrics';var NAME$y='QUALTRICS';var DISPLAY_NAME$y='Qualtrics';var DISPLAY_NAME_TO_DIR_NAME_MAP$y=_defineProperty({},DISPLAY_NAME$y,DIR_NAME$y);var CNameMapping$y=(_CNameMapping$y={},_defineProperty(_CNameMapping$y,NAME$y,NAME$y),_defineProperty(_CNameMapping$y,"Qualtrics",NAME$y),_defineProperty(_CNameMapping$y,"qualtrics",NAME$y),_CNameMapping$y);
|
1351
|
-
|
1352
|
-
var _CNameMapping$x;var DIR_NAME$x='QuantumMetric';var NAME$x='QUANTUMMETRIC';var DISPLAY_NAME$x='Quantum Metric';var DISPLAY_NAME_TO_DIR_NAME_MAP$x=_defineProperty({},DISPLAY_NAME$x,DIR_NAME$x);var CNameMapping$x=(_CNameMapping$x={},_defineProperty(_CNameMapping$x,NAME$x,NAME$x),_defineProperty(_CNameMapping$x,'Quantum Metric',NAME$x),_defineProperty(_CNameMapping$x,'quantum Metric',NAME$x),_defineProperty(_CNameMapping$x,'quantum metric',NAME$x),_defineProperty(_CNameMapping$x,"QuantumMetric",NAME$x),_defineProperty(_CNameMapping$x,"quantumMetric",NAME$x),_defineProperty(_CNameMapping$x,"quantummetric",NAME$x),_defineProperty(_CNameMapping$x,"Quantum_Metric",NAME$x),_CNameMapping$x);
|
1353
|
-
|
1354
|
-
var _CNameMapping$w;var DIR_NAME$w='RedditPixel';var NAME$w='REDDIT_PIXEL';var DISPLAY_NAME$w='Reddit Pixel';var DISPLAY_NAME_TO_DIR_NAME_MAP$w=_defineProperty({},DISPLAY_NAME$w,DIR_NAME$w);var CNameMapping$w=(_CNameMapping$w={},_defineProperty(_CNameMapping$w,NAME$w,NAME$w),_defineProperty(_CNameMapping$w,"Reddit_Pixel",NAME$w),_defineProperty(_CNameMapping$w,"RedditPixel",NAME$w),_defineProperty(_CNameMapping$w,"REDDITPIXEL",NAME$w),_defineProperty(_CNameMapping$w,"redditpixel",NAME$w),_defineProperty(_CNameMapping$w,'Reddit Pixel',NAME$w),_defineProperty(_CNameMapping$w,'REDDIT PIXEL',NAME$w),_defineProperty(_CNameMapping$w,'reddit pixel',NAME$w),_CNameMapping$w);
|
1355
|
-
|
1356
|
-
var _CNameMapping$v;var DIR_NAME$v='Sentry';var NAME$v='SENTRY';var DISPLAY_NAME$v='Sentry';var DISPLAY_NAME_TO_DIR_NAME_MAP$v=_defineProperty({},DISPLAY_NAME$v,DIR_NAME$v);var CNameMapping$v=(_CNameMapping$v={},_defineProperty(_CNameMapping$v,NAME$v,NAME$v),_defineProperty(_CNameMapping$v,"sentry",NAME$v),_defineProperty(_CNameMapping$v,"Sentry",NAME$v),_CNameMapping$v);
|
1357
|
-
|
1358
|
-
var _CNameMapping$u;var DIR_NAME$u='SnapPixel';var NAME$u='SNAP_PIXEL';var DISPLAY_NAME$u='Snap Pixel';var DISPLAY_NAME_TO_DIR_NAME_MAP$u=_defineProperty({},DISPLAY_NAME$u,DIR_NAME$u);var CNameMapping$u=(_CNameMapping$u={},_defineProperty(_CNameMapping$u,NAME$u,NAME$u),_defineProperty(_CNameMapping$u,"Snap_Pixel",NAME$u),_defineProperty(_CNameMapping$u,"SnapPixel",NAME$u),_defineProperty(_CNameMapping$u,"SNAPPIXEL",NAME$u),_defineProperty(_CNameMapping$u,"snappixel",NAME$u),_defineProperty(_CNameMapping$u,'Snap Pixel',NAME$u),_defineProperty(_CNameMapping$u,'SNAP PIXEL',NAME$u),_defineProperty(_CNameMapping$u,'snap pixel',NAME$u),_CNameMapping$u);
|
1359
|
-
|
1360
|
-
var _CNameMapping$t;var DIR_NAME$t='TVSquared';var NAME$t='TVSQUARED';var DISPLAY_NAME$t='TVSquared';var DISPLAY_NAME_TO_DIR_NAME_MAP$t=_defineProperty({},DISPLAY_NAME$t,DIR_NAME$t);var CNameMapping$t=(_CNameMapping$t={},_defineProperty(_CNameMapping$t,NAME$t,NAME$t),_defineProperty(_CNameMapping$t,"TVSquared",NAME$t),_defineProperty(_CNameMapping$t,"tvsquared",NAME$t),_defineProperty(_CNameMapping$t,"tvSquared",NAME$t),_defineProperty(_CNameMapping$t,"TvSquared",NAME$t),_defineProperty(_CNameMapping$t,"Tvsquared",NAME$t),_defineProperty(_CNameMapping$t,'TV Squared',NAME$t),_defineProperty(_CNameMapping$t,'tv squared',NAME$t),_defineProperty(_CNameMapping$t,'tv Squared',NAME$t),_CNameMapping$t);
|
1361
|
-
|
1362
|
-
var _CNameMapping$s;var DIR_NAME$s='VWO';var NAME$s='VWO';var DISPLAY_NAME$s='VWO';var DISPLAY_NAME_TO_DIR_NAME_MAP$s=_defineProperty({},DISPLAY_NAME$s,DIR_NAME$s);var CNameMapping$s=(_CNameMapping$s={},_defineProperty(_CNameMapping$s,NAME$s,NAME$s),_defineProperty(_CNameMapping$s,"VisualWebsiteOptimizer",NAME$s),_defineProperty(_CNameMapping$s,"Visualwebsiteoptimizer",NAME$s),_defineProperty(_CNameMapping$s,"visualwebsiteoptimizer",NAME$s),_defineProperty(_CNameMapping$s,"vwo",NAME$s),_defineProperty(_CNameMapping$s,'Visual Website Optimizer',NAME$s),_defineProperty(_CNameMapping$s,'Visual website optimizer',NAME$s),_defineProperty(_CNameMapping$s,'visual website optimizer',NAME$s),_CNameMapping$s);
|
1363
|
-
|
1364
|
-
var _CNameMapping$r;var DIR_NAME$r='GA360';var NAME$r='GA360';var DISPLAY_NAME$r='Google Analytics 360';var DISPLAY_NAME_TO_DIR_NAME_MAP$r=_defineProperty({},DISPLAY_NAME$r,DIR_NAME$r);var CNameMapping$r=(_CNameMapping$r={},_defineProperty(_CNameMapping$r,NAME$r,NAME$r),_defineProperty(_CNameMapping$r,'Google Analytics 360',NAME$r),_defineProperty(_CNameMapping$r,'Google analytics 360',NAME$r),_defineProperty(_CNameMapping$r,'google analytics 360',NAME$r),_defineProperty(_CNameMapping$r,'Google Analytics360',NAME$r),_defineProperty(_CNameMapping$r,'Google analytics360',NAME$r),_defineProperty(_CNameMapping$r,'google analytics360',NAME$r),_defineProperty(_CNameMapping$r,"GoogleAnalytics360",NAME$r),_defineProperty(_CNameMapping$r,'GA 360',NAME$r),_CNameMapping$r);
|
1365
|
-
|
1366
|
-
var _CNameMapping$q;var DIR_NAME$q='Adroll';var NAME$q='ADROLL';var DISPLAY_NAME$q='Adroll';var DISPLAY_NAME_TO_DIR_NAME_MAP$q=_defineProperty({},DISPLAY_NAME$q,DIR_NAME$q);var CNameMapping$q=(_CNameMapping$q={},_defineProperty(_CNameMapping$q,NAME$q,NAME$q),_defineProperty(_CNameMapping$q,"Adroll",NAME$q),_defineProperty(_CNameMapping$q,'Ad roll',NAME$q),_defineProperty(_CNameMapping$q,'ad roll',NAME$q),_defineProperty(_CNameMapping$q,"adroll",NAME$q),_CNameMapping$q);
|
1367
|
-
|
1368
|
-
var _CNameMapping$p;var DIR_NAME$p='DCMFloodlight';var NAME$p='DCM_FLOODLIGHT';var DISPLAY_NAME$p='DCM Floodlight';var DISPLAY_NAME_TO_DIR_NAME_MAP$p=_defineProperty({},DISPLAY_NAME$p,DIR_NAME$p);var CNameMapping$p=(_CNameMapping$p={},_defineProperty(_CNameMapping$p,NAME$p,NAME$p),_defineProperty(_CNameMapping$p,'DCM Floodlight',NAME$p),_defineProperty(_CNameMapping$p,'dcm floodlight',NAME$p),_defineProperty(_CNameMapping$p,'Dcm Floodlight',NAME$p),_defineProperty(_CNameMapping$p,"DCMFloodlight",NAME$p),_defineProperty(_CNameMapping$p,"dcmfloodlight",NAME$p),_defineProperty(_CNameMapping$p,"DcmFloodlight",NAME$p),_defineProperty(_CNameMapping$p,"dcm_floodlight",NAME$p),_defineProperty(_CNameMapping$p,"DCM_Floodlight",NAME$p),_CNameMapping$p);
|
1369
|
-
|
1370
|
-
var _CNameMapping$o;var DIR_NAME$o='Matomo';var NAME$o='MATOMO';var DISPLAY_NAME$o='Matomo';var DISPLAY_NAME_TO_DIR_NAME_MAP$o=_defineProperty({},DISPLAY_NAME$o,DIR_NAME$o);var CNameMapping$o=(_CNameMapping$o={},_defineProperty(_CNameMapping$o,NAME$o,NAME$o),_defineProperty(_CNameMapping$o,"Matomo",NAME$o),_defineProperty(_CNameMapping$o,"matomo",NAME$o),_CNameMapping$o);
|
1371
|
-
|
1372
|
-
var _CNameMapping$n;var DIR_NAME$n='Vero';var NAME$n='VERO';var DISPLAY_NAME$n='Vero';var DISPLAY_NAME_TO_DIR_NAME_MAP$n=_defineProperty({},DISPLAY_NAME$n,DIR_NAME$n);var CNameMapping$n=(_CNameMapping$n={},_defineProperty(_CNameMapping$n,NAME$n,NAME$n),_defineProperty(_CNameMapping$n,"Vero",NAME$n),_defineProperty(_CNameMapping$n,"vero",NAME$n),_CNameMapping$n);
|
1373
|
-
|
1374
|
-
var _CNameMapping$m;var DIR_NAME$m='Mouseflow';var NAME$m='MOUSEFLOW';var DISPLAY_NAME$m='Mouseflow';var DISPLAY_NAME_TO_DIR_NAME_MAP$m=_defineProperty({},DISPLAY_NAME$m,DIR_NAME$m);var CNameMapping$m=(_CNameMapping$m={},_defineProperty(_CNameMapping$m,NAME$m,NAME$m),_defineProperty(_CNameMapping$m,"Mouseflow",NAME$m),_defineProperty(_CNameMapping$m,"mouseflow",NAME$m),_defineProperty(_CNameMapping$m,"mouseFlow",NAME$m),_defineProperty(_CNameMapping$m,"MouseFlow",NAME$m),_defineProperty(_CNameMapping$m,'Mouse flow',NAME$m),_defineProperty(_CNameMapping$m,'mouse flow',NAME$m),_defineProperty(_CNameMapping$m,'mouse Flow',NAME$m),_defineProperty(_CNameMapping$m,'Mouse Flow',NAME$m),_CNameMapping$m);
|
1375
|
-
|
1376
|
-
var _CNameMapping$l;var DIR_NAME$l='Rockerbox';var NAME$l='ROCKERBOX';var DISPLAY_NAME$l='Rockerbox';var DISPLAY_NAME_TO_DIR_NAME_MAP$l=_defineProperty({},DISPLAY_NAME$l,DIR_NAME$l);var CNameMapping$l=(_CNameMapping$l={},_defineProperty(_CNameMapping$l,NAME$l,NAME$l),_defineProperty(_CNameMapping$l,"Rockerbox",NAME$l),_defineProperty(_CNameMapping$l,"rockerbox",NAME$l),_defineProperty(_CNameMapping$l,"RockerBox",NAME$l),_defineProperty(_CNameMapping$l,'Rocker box',NAME$l),_defineProperty(_CNameMapping$l,'rocker box',NAME$l),_defineProperty(_CNameMapping$l,'Rocker Box',NAME$l),_CNameMapping$l);
|
1377
|
-
|
1378
|
-
var _CNameMapping$k;var DIR_NAME$k='ConvertFlow';var NAME$k='CONVERTFLOW';var DISPLAY_NAME$k='ConvertFlow';var DISPLAY_NAME_TO_DIR_NAME_MAP$k=_defineProperty({},DISPLAY_NAME$k,DIR_NAME$k);var CNameMapping$k=(_CNameMapping$k={},_defineProperty(_CNameMapping$k,NAME$k,NAME$k),_defineProperty(_CNameMapping$k,"Convertflow",NAME$k),_defineProperty(_CNameMapping$k,"convertflow",NAME$k),_defineProperty(_CNameMapping$k,"convertFlow",NAME$k),_defineProperty(_CNameMapping$k,"ConvertFlow",NAME$k),_defineProperty(_CNameMapping$k,'Convert flow',NAME$k),_defineProperty(_CNameMapping$k,'convert flow',NAME$k),_defineProperty(_CNameMapping$k,'convert Flow',NAME$k),_defineProperty(_CNameMapping$k,'Convert Flow',NAME$k),_defineProperty(_CNameMapping$k,'CONVERT FLOW',NAME$k),_CNameMapping$k);
|
1379
|
-
|
1380
|
-
var _CNameMapping$j;var DIR_NAME$j='SnapEngage';var NAME$j='SNAPENGAGE';var DISPLAY_NAME$j='SnapEngage';var DISPLAY_NAME_TO_DIR_NAME_MAP$j=_defineProperty({},DISPLAY_NAME$j,DIR_NAME$j);var CNameMapping$j=(_CNameMapping$j={},_defineProperty(_CNameMapping$j,NAME$j,NAME$j),_defineProperty(_CNameMapping$j,"SnapEngage",NAME$j),_defineProperty(_CNameMapping$j,"Snap_Engage",NAME$j),_defineProperty(_CNameMapping$j,"snapengage",NAME$j),_defineProperty(_CNameMapping$j,'SNAP ENGAGE',NAME$j),_defineProperty(_CNameMapping$j,'Snap Engage',NAME$j),_defineProperty(_CNameMapping$j,'snap engage',NAME$j),_CNameMapping$j);
|
1381
|
-
|
1382
|
-
var _CNameMapping$i;var DIR_NAME$i='LiveChat';var NAME$i='LIVECHAT';var DISPLAY_NAME$i='LiveChat';var DISPLAY_NAME_TO_DIR_NAME_MAP$i=_defineProperty({},DISPLAY_NAME$i,DIR_NAME$i);var CNameMapping$i=(_CNameMapping$i={},_defineProperty(_CNameMapping$i,NAME$i,NAME$i),_defineProperty(_CNameMapping$i,"LiveChat",NAME$i),_defineProperty(_CNameMapping$i,"Live_Chat",NAME$i),_defineProperty(_CNameMapping$i,"livechat",NAME$i),_defineProperty(_CNameMapping$i,'LIVE CHAT',NAME$i),_defineProperty(_CNameMapping$i,'Live Chat',NAME$i),_defineProperty(_CNameMapping$i,'live chat',NAME$i),_CNameMapping$i);
|
1383
|
-
|
1384
|
-
var _CNameMapping$h;var DIR_NAME$h='Shynet';var NAME$h='SHYNET';var DISPLAY_NAME$h='Shynet';var DISPLAY_NAME_TO_DIR_NAME_MAP$h=_defineProperty({},DISPLAY_NAME$h,DIR_NAME$h);var CNameMapping$h=(_CNameMapping$h={},_defineProperty(_CNameMapping$h,NAME$h,NAME$h),_defineProperty(_CNameMapping$h,"shynet",NAME$h),_defineProperty(_CNameMapping$h,"ShyNet",NAME$h),_defineProperty(_CNameMapping$h,"shyNet",NAME$h),_defineProperty(_CNameMapping$h,"Shynet",NAME$h),_defineProperty(_CNameMapping$h,'shy net',NAME$h),_defineProperty(_CNameMapping$h,'Shy Net',NAME$h),_defineProperty(_CNameMapping$h,'shy Net',NAME$h),_defineProperty(_CNameMapping$h,'Shy net',NAME$h),_CNameMapping$h);
|
1385
|
-
|
1386
|
-
var _CNameMapping$g;var DIR_NAME$g='Woopra';var NAME$g='WOOPRA';var DISPLAY_NAME$g='Woopra';var DISPLAY_NAME_TO_DIR_NAME_MAP$g=_defineProperty({},DISPLAY_NAME$g,DIR_NAME$g);var CNameMapping$g=(_CNameMapping$g={},_defineProperty(_CNameMapping$g,NAME$g,NAME$g),_defineProperty(_CNameMapping$g,"Woopra",NAME$g),_defineProperty(_CNameMapping$g,"woopra",NAME$g),_CNameMapping$g);
|
1387
|
-
|
1388
|
-
var _CNameMapping$f;var DIR_NAME$f='RollBar';var NAME$f='ROLLBAR';var DISPLAY_NAME$f='RollBar';var DISPLAY_NAME_TO_DIR_NAME_MAP$f=_defineProperty({},DISPLAY_NAME$f,DIR_NAME$f);var CNameMapping$f=(_CNameMapping$f={},_defineProperty(_CNameMapping$f,NAME$f,NAME$f),_defineProperty(_CNameMapping$f,"RollBar",NAME$f),_defineProperty(_CNameMapping$f,"Roll_Bar",NAME$f),_defineProperty(_CNameMapping$f,"rollbar",NAME$f),_defineProperty(_CNameMapping$f,"Rollbar",NAME$f),_defineProperty(_CNameMapping$f,'ROLL BAR',NAME$f),_defineProperty(_CNameMapping$f,'Roll Bar',NAME$f),_defineProperty(_CNameMapping$f,'roll bar',NAME$f),_CNameMapping$f);
|
1389
|
-
|
1390
|
-
var _CNameMapping$e;var DIR_NAME$e='QuoraPixel';var NAME$e='QUORA_PIXEL';var DISPLAY_NAME$e='Quora Pixel';var DISPLAY_NAME_TO_DIR_NAME_MAP$e=_defineProperty({},DISPLAY_NAME$e,DIR_NAME$e);var CNameMapping$e=(_CNameMapping$e={},_defineProperty(_CNameMapping$e,NAME$e,NAME$e),_defineProperty(_CNameMapping$e,'Quora Pixel',NAME$e),_defineProperty(_CNameMapping$e,'Quora pixel',NAME$e),_defineProperty(_CNameMapping$e,'QUORA PIXEL',NAME$e),_defineProperty(_CNameMapping$e,"QuoraPixel",NAME$e),_defineProperty(_CNameMapping$e,"Quorapixel",NAME$e),_defineProperty(_CNameMapping$e,"QUORAPIXEL",NAME$e),_defineProperty(_CNameMapping$e,"Quora_Pixel",NAME$e),_defineProperty(_CNameMapping$e,"quora_pixel",NAME$e),_defineProperty(_CNameMapping$e,"Quora",NAME$e),_CNameMapping$e);
|
1391
|
-
|
1392
|
-
var _CNameMapping$d;var DIR_NAME$d='June';var NAME$d='JUNE';var DISPLAY_NAME$d='June';var DISPLAY_NAME_TO_DIR_NAME_MAP$d=_defineProperty({},DISPLAY_NAME$d,DIR_NAME$d);var CNameMapping$d=(_CNameMapping$d={},_defineProperty(_CNameMapping$d,NAME$d,NAME$d),_defineProperty(_CNameMapping$d,"June",NAME$d),_defineProperty(_CNameMapping$d,"june",NAME$d),_CNameMapping$d);
|
1393
|
-
|
1394
|
-
var _CNameMapping$c;var DIR_NAME$c='Engage';var NAME$c='ENGAGE';var DISPLAY_NAME$c='Engage';var DISPLAY_NAME_TO_DIR_NAME_MAP$c=_defineProperty({},DISPLAY_NAME$c,DIR_NAME$c);var CNameMapping$c=(_CNameMapping$c={},_defineProperty(_CNameMapping$c,NAME$c,NAME$c),_defineProperty(_CNameMapping$c,"Engage",NAME$c),_defineProperty(_CNameMapping$c,"engage",NAME$c),_CNameMapping$c);
|
1395
|
-
|
1396
|
-
var _CNameMapping$b;var DIR_NAME$b='Iterable';var NAME$b='ITERABLE';var DISPLAY_NAME$b='Iterable';var DISPLAY_NAME_TO_DIR_NAME_MAP$b=_defineProperty({},DISPLAY_NAME$b,DIR_NAME$b);var CNameMapping$b=(_CNameMapping$b={},_defineProperty(_CNameMapping$b,NAME$b,NAME$b),_defineProperty(_CNameMapping$b,"Iterable",NAME$b),_defineProperty(_CNameMapping$b,"iterable",NAME$b),_CNameMapping$b);
|
1397
|
-
|
1398
|
-
var _CNameMapping$a;var DIR_NAME$a='YandexMetrica';var NAME$a='YANDEX_METRICA';var DISPLAY_NAME$a='Yandex.Metrica';var DISPLAY_NAME_TO_DIR_NAME_MAP$a=_defineProperty({},DISPLAY_NAME$a,DIR_NAME$a);var CNameMapping$a=(_CNameMapping$a={},_defineProperty(_CNameMapping$a,NAME$a,NAME$a),_defineProperty(_CNameMapping$a,"Yandexmetrica",NAME$a),_defineProperty(_CNameMapping$a,"yandexmetrica",NAME$a),_defineProperty(_CNameMapping$a,"yandexMetrica",NAME$a),_defineProperty(_CNameMapping$a,"YandexMetrica",NAME$a),_CNameMapping$a);
|
1399
|
-
|
1400
|
-
var _CNameMapping$9;var DIR_NAME$9='Refiner';var NAME$9='REFINER';var DISPLAY_NAME$9='Refiner';var DISPLAY_NAME_TO_DIR_NAME_MAP$9=_defineProperty({},DISPLAY_NAME$9,DIR_NAME$9);var CNameMapping$9=(_CNameMapping$9={},_defineProperty(_CNameMapping$9,NAME$9,NAME$9),_defineProperty(_CNameMapping$9,"Refiner",NAME$9),_defineProperty(_CNameMapping$9,"refiner",NAME$9),_CNameMapping$9);
|
1401
|
-
|
1402
|
-
var _CNameMapping$8;var DIR_NAME$8='Qualaroo';var NAME$8='QUALAROO';var DISPLAY_NAME$8='Qualaroo';var DISPLAY_NAME_TO_DIR_NAME_MAP$8=_defineProperty({},DISPLAY_NAME$8,DIR_NAME$8);var CNameMapping$8=(_CNameMapping$8={},_defineProperty(_CNameMapping$8,NAME$8,NAME$8),_defineProperty(_CNameMapping$8,"Qualaroo",NAME$8),_defineProperty(_CNameMapping$8,"qualaroo",NAME$8),_CNameMapping$8);
|
1403
|
-
|
1404
|
-
var _CNameMapping$7;var DIR_NAME$7='Podsights';var NAME$7='PODSIGHTS';var DISPLAY_NAME$7='Podsights';var DISPLAY_NAME_TO_DIR_NAME_MAP$7=_defineProperty({},DISPLAY_NAME$7,DIR_NAME$7);var CNameMapping$7=(_CNameMapping$7={},_defineProperty(_CNameMapping$7,NAME$7,NAME$7),_defineProperty(_CNameMapping$7,"Podsights",NAME$7),_defineProperty(_CNameMapping$7,"PodSights",NAME$7),_defineProperty(_CNameMapping$7,'pod Sights',NAME$7),_defineProperty(_CNameMapping$7,'Pod Sights',NAME$7),_defineProperty(_CNameMapping$7,'pod sights',NAME$7),_defineProperty(_CNameMapping$7,'POD SIGHTS',NAME$7),_defineProperty(_CNameMapping$7,'Pod sights',NAME$7),_CNameMapping$7);// default mapping for the events
|
1405
|
-
|
1406
|
-
var _CNameMapping$6;var DIR_NAME$6='Axeptio';var NAME$6='AXEPTIO';var DISPLAY_NAME$6='Axeptio';var DISPLAY_NAME_TO_DIR_NAME_MAP$6=_defineProperty({},DISPLAY_NAME$6,DIR_NAME$6);var CNameMapping$6=(_CNameMapping$6={},_defineProperty(_CNameMapping$6,NAME$6,NAME$6),_defineProperty(_CNameMapping$6,"Axeptio",NAME$6),_defineProperty(_CNameMapping$6,"axeptio",NAME$6),_CNameMapping$6);
|
1407
|
-
|
1408
|
-
var _CNameMapping$5;var DIR_NAME$5='Satismeter';var NAME$5='SATISMETER';var DISPLAY_NAME$5='Satismeter';var DISPLAY_NAME_TO_DIR_NAME_MAP$5=_defineProperty({},DISPLAY_NAME$5,DIR_NAME$5);var CNameMapping$5=(_CNameMapping$5={},_defineProperty(_CNameMapping$5,NAME$5,NAME$5),_defineProperty(_CNameMapping$5,"Satismeter",NAME$5),_defineProperty(_CNameMapping$5,"SatisMeter",NAME$5),_CNameMapping$5);
|
1409
|
-
|
1410
|
-
var _CNameMapping$4;var DIR_NAME$4='MicrosoftClarity';var NAME$4='MICROSOFT_CLARITY';var DISPLAY_NAME$4='Microsoft Clarity';var DISPLAY_NAME_TO_DIR_NAME_MAP$4=_defineProperty({},DISPLAY_NAME$4,DIR_NAME$4);var CNameMapping$4=(_CNameMapping$4={},_defineProperty(_CNameMapping$4,NAME$4,NAME$4),_defineProperty(_CNameMapping$4,'Microsoft Clarity',NAME$4),_defineProperty(_CNameMapping$4,'Microsoft clarity',NAME$4),_defineProperty(_CNameMapping$4,'microsoft clarity',NAME$4),_defineProperty(_CNameMapping$4,"Microsoft_clarity",NAME$4),_defineProperty(_CNameMapping$4,"MicrosoftClarity",NAME$4),_defineProperty(_CNameMapping$4,"MICROSOFTCLARITY",NAME$4),_defineProperty(_CNameMapping$4,"microsoftclarity",NAME$4),_defineProperty(_CNameMapping$4,"microsoftClarity",NAME$4),_CNameMapping$4);
|
1411
|
-
|
1412
|
-
var _CNameMapping$3;var DIR_NAME$3='Sendinblue';var NAME$3='SENDINBLUE';var DISPLAY_NAME$3='Sendinblue';var DISPLAY_NAME_TO_DIR_NAME_MAP$3=_defineProperty({},DISPLAY_NAME$3,DIR_NAME$3);var CNameMapping$3=(_CNameMapping$3={},_defineProperty(_CNameMapping$3,NAME$3,NAME$3),_defineProperty(_CNameMapping$3,"Sendinblue",NAME$3),_defineProperty(_CNameMapping$3,"sendinblue",NAME$3),_defineProperty(_CNameMapping$3,"SendinBlue",NAME$3),_CNameMapping$3);
|
1413
|
-
|
1414
|
-
var _CNameMapping$2;var DIR_NAME$2='Olark';var NAME$2='OLARK';var DISPLAY_NAME$2='Olark';var DISPLAY_NAME_TO_DIR_NAME_MAP$2=_defineProperty({},DISPLAY_NAME$2,DIR_NAME$2);var CNameMapping$2=(_CNameMapping$2={},_defineProperty(_CNameMapping$2,NAME$2,NAME$2),_defineProperty(_CNameMapping$2,"Olark",NAME$2),_defineProperty(_CNameMapping$2,"olark",NAME$2),_CNameMapping$2);
|
1415
|
-
|
1416
|
-
var _CNameMapping$1;var DIR_NAME$1='Lemnisk';var NAME$1='LEMNISK';var DISPLAY_NAME$1='Lemnisk';var DISPLAY_NAME_TO_DIR_NAME_MAP$1=_defineProperty({},DISPLAY_NAME$1,DIR_NAME$1);var CNameMapping$1=(_CNameMapping$1={},_defineProperty(_CNameMapping$1,NAME$1,NAME$1),_defineProperty(_CNameMapping$1,"LEMNISK_MARKETING_AUTOMATION",NAME$1),_defineProperty(_CNameMapping$1,'Lemnisk Marketing Automation',NAME$1),_defineProperty(_CNameMapping$1,"LemniskMarketingAutomation",NAME$1),_defineProperty(_CNameMapping$1,"lemniskmarketingautomation",NAME$1),_defineProperty(_CNameMapping$1,"lemniskMarketingAutomation",NAME$1),_defineProperty(_CNameMapping$1,"lemnisk",NAME$1),_defineProperty(_CNameMapping$1,"Lemnisk",NAME$1),_CNameMapping$1);
|
1417
|
-
|
1418
|
-
var _CNameMapping;var DIR_NAME='TiktokAds';var NAME='TIKTOK_ADS';var DISPLAY_NAME='TikTok Ads';var DISPLAY_NAME_TO_DIR_NAME_MAP=_defineProperty({},DISPLAY_NAME,DIR_NAME);var CNameMapping=(_CNameMapping={},_defineProperty(_CNameMapping,NAME,NAME),_defineProperty(_CNameMapping,"TiktokAds",NAME),_defineProperty(_CNameMapping,'Tiktok ads',NAME),_defineProperty(_CNameMapping,'Tiktok Ads',NAME),_defineProperty(_CNameMapping,'Tik Tok Ads',NAME),_defineProperty(_CNameMapping,'tik tok ads',NAME),_defineProperty(_CNameMapping,"tiktokads",NAME),_CNameMapping);
|
1419
|
-
|
1420
|
-
var replaceValuesWithDisplayName=function replaceValuesWithDisplayName(CNameMapping,displayName){var updatedCNameMapping={};Object.keys(CNameMapping).forEach(function(key){updatedCNameMapping[key]=displayName;});return updatedCNameMapping;};// As the common names mapping in v1.1 is mapped to the definition name
|
1421
|
-
// we're converting the definition name to display names temporarily
|
1422
|
-
var destCNamesToDisplayNamesMap=_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},replaceValuesWithDisplayName(CNameMapping$18,DISPLAY_NAME$18)),replaceValuesWithDisplayName(CNameMapping$17,DISPLAY_NAME$17)),replaceValuesWithDisplayName(CNameMapping$16,DISPLAY_NAME$16)),replaceValuesWithDisplayName(CNameMapping$15,DISPLAY_NAME$15)),replaceValuesWithDisplayName(CNameMapping$14,DISPLAY_NAME$14)),replaceValuesWithDisplayName(CNameMapping$13,DISPLAY_NAME$13)),replaceValuesWithDisplayName(CNameMapping$12,DISPLAY_NAME$12)),replaceValuesWithDisplayName(CNameMapping$11,DISPLAY_NAME$11)),replaceValuesWithDisplayName(CNameMapping$10,DISPLAY_NAME$10)),replaceValuesWithDisplayName(CNameMapping$$,DISPLAY_NAME$$)),replaceValuesWithDisplayName(CNameMapping$_,DISPLAY_NAME$_)),replaceValuesWithDisplayName(CNameMapping$Z,DISPLAY_NAME$Z)),replaceValuesWithDisplayName(CNameMapping$Y,DISPLAY_NAME$Y)),replaceValuesWithDisplayName(CNameMapping$X,DISPLAY_NAME$X)),replaceValuesWithDisplayName(CNameMapping$W,DISPLAY_NAME$W)),replaceValuesWithDisplayName(CNameMapping$V,DISPLAY_NAME$V)),replaceValuesWithDisplayName(CNameMapping$r,DISPLAY_NAME$r)),replaceValuesWithDisplayName(CNameMapping$U,DISPLAY_NAME$U)),replaceValuesWithDisplayName(CNameMapping$T,DISPLAY_NAME$T)),replaceValuesWithDisplayName(CNameMapping$S,DISPLAY_NAME$S)),replaceValuesWithDisplayName(CNameMapping$R,DISPLAY_NAME$R)),replaceValuesWithDisplayName(CNameMapping$Q,DISPLAY_NAME$Q)),replaceValuesWithDisplayName(CNameMapping$P,DISPLAY_NAME$P)),replaceValuesWithDisplayName(CNameMapping$O,DISPLAY_NAME$O)),replaceValuesWithDisplayName(CNameMapping$N,DISPLAY_NAME$N)),replaceValuesWithDisplayName(CNameMapping$M,DISPLAY_NAME$M)),replaceValuesWithDisplayName(CNameMapping$L,DISPLAY_NAME$L)),replaceValuesWithDisplayName(CNameMapping$K,DISPLAY_NAME$K)),replaceValuesWithDisplayName(CNameMapping$J,DISPLAY_NAME$J)),replaceValuesWithDisplayName(CNameMapping$I,DISPLAY_NAME$I)),replaceValuesWithDisplayName(CNameMapping$H,DISPLAY_NAME$H)),replaceValuesWithDisplayName(CNameMapping$G,DISPLAY_NAME$G)),replaceValuesWithDisplayName(CNameMapping$F,DISPLAY_NAME$F)),replaceValuesWithDisplayName(CNameMapping$E,DISPLAY_NAME$E)),replaceValuesWithDisplayName(CNameMapping$D,DISPLAY_NAME$D)),replaceValuesWithDisplayName(CNameMapping$C,DISPLAY_NAME$C)),replaceValuesWithDisplayName(CNameMapping$B,DISPLAY_NAME$B)),replaceValuesWithDisplayName(CNameMapping$A,DISPLAY_NAME$A)),replaceValuesWithDisplayName(CNameMapping$z,DISPLAY_NAME$z)),replaceValuesWithDisplayName(CNameMapping$y,DISPLAY_NAME$y)),replaceValuesWithDisplayName(CNameMapping$x,DISPLAY_NAME$x)),replaceValuesWithDisplayName(CNameMapping$w,DISPLAY_NAME$w)),replaceValuesWithDisplayName(CNameMapping$v,DISPLAY_NAME$v)),replaceValuesWithDisplayName(CNameMapping$u,DISPLAY_NAME$u)),replaceValuesWithDisplayName(CNameMapping$t,DISPLAY_NAME$t)),replaceValuesWithDisplayName(CNameMapping$s,DISPLAY_NAME$s)),replaceValuesWithDisplayName(CNameMapping$q,DISPLAY_NAME$q)),replaceValuesWithDisplayName(CNameMapping$p,DISPLAY_NAME$p)),replaceValuesWithDisplayName(CNameMapping$o,DISPLAY_NAME$o)),replaceValuesWithDisplayName(CNameMapping$n,DISPLAY_NAME$n)),replaceValuesWithDisplayName(CNameMapping$m,DISPLAY_NAME$m)),replaceValuesWithDisplayName(CNameMapping$k,DISPLAY_NAME$k)),replaceValuesWithDisplayName(CNameMapping$j,DISPLAY_NAME$j)),replaceValuesWithDisplayName(CNameMapping$i,DISPLAY_NAME$i)),replaceValuesWithDisplayName(CNameMapping$h,DISPLAY_NAME$h)),replaceValuesWithDisplayName(CNameMapping$g,DISPLAY_NAME$g)),replaceValuesWithDisplayName(CNameMapping$f,DISPLAY_NAME$f)),replaceValuesWithDisplayName(CNameMapping$e,DISPLAY_NAME$e)),replaceValuesWithDisplayName(CNameMapping$d,DISPLAY_NAME$d)),replaceValuesWithDisplayName(CNameMapping$c,DISPLAY_NAME$c)),replaceValuesWithDisplayName(CNameMapping$b,DISPLAY_NAME$b)),replaceValuesWithDisplayName(CNameMapping$l,DISPLAY_NAME$l)),replaceValuesWithDisplayName(CNameMapping$a,DISPLAY_NAME$a)),replaceValuesWithDisplayName(CNameMapping$9,DISPLAY_NAME$9)),replaceValuesWithDisplayName(CNameMapping$8,DISPLAY_NAME$8)),replaceValuesWithDisplayName(CNameMapping$7,DISPLAY_NAME$7)),replaceValuesWithDisplayName(CNameMapping$6,DISPLAY_NAME$6)),replaceValuesWithDisplayName(CNameMapping$5,DISPLAY_NAME$5)),replaceValuesWithDisplayName(CNameMapping$4,DISPLAY_NAME$4)),replaceValuesWithDisplayName(CNameMapping$3,DISPLAY_NAME$3)),replaceValuesWithDisplayName(CNameMapping$2,DISPLAY_NAME$2)),replaceValuesWithDisplayName(CNameMapping$1,DISPLAY_NAME$1)),replaceValuesWithDisplayName(CNameMapping,DISPLAY_NAME));
|
1423
|
-
|
1424
|
-
/**
|
1425
|
-
* Converts the common names of the destinations to their display names
|
1426
|
-
* @param intgOptions Load or API integration options
|
1427
|
-
*/var normalizeIntegrationOptions=function normalizeIntegrationOptions(intgOptions){var normalizedIntegrationOptions={};if(intgOptions){Object.keys(intgOptions).forEach(function(key){var destOpts=clone$1(intgOptions[key]);if(key==='All'){normalizedIntegrationOptions[key]=Boolean(destOpts);}else {var displayName=destCNamesToDisplayNamesMap[key];if(displayName){normalizedIntegrationOptions[displayName]=destOpts;}else {normalizedIntegrationOptions[key]=destOpts;}}});}if(isUndefined(normalizedIntegrationOptions.All)){normalizedIntegrationOptions.All=true;}return normalizedIntegrationOptions;};
|
1428
|
-
|
1429
1117
|
var EVENT_PAYLOAD_SIZE_BYTES_LIMIT=32*1024;// 32 KB
|
1430
1118
|
|
1431
1119
|
var INVALID_SOURCE_CONFIG_ERROR="Invalid source configuration or source id.";// ERROR
|
@@ -1443,20 +1131,13 @@ var QUEUE_UTILITIES='QueueUtilities';/**
|
|
1443
1131
|
* @param event RudderEvent object
|
1444
1132
|
* @param logger Logger instance
|
1445
1133
|
*/var validateEventPayloadSize=function validateEventPayloadSize(event,logger){var payloadStr=getDeliveryPayload$1(event,logger);if(payloadStr){var payloadSize=payloadStr.length;if(payloadSize>EVENT_PAYLOAD_SIZE_BYTES_LIMIT){logger===null||logger===void 0||logger.warn(EVENT_PAYLOAD_SIZE_CHECK_FAIL_WARNING(QUEUE_UTILITIES,payloadSize,EVENT_PAYLOAD_SIZE_BYTES_LIMIT));}}else {logger===null||logger===void 0||logger.warn(EVENT_PAYLOAD_SIZE_VALIDATION_WARNING(QUEUE_UTILITIES));}};/**
|
1446
|
-
* Filters and returns the user supplied integrations config that should take preference over the destination specific integrations config
|
1447
|
-
* @param eventIntgConfig User supplied integrations config at event level
|
1448
|
-
* @param destinationsIntgConfig Cumulative integrations config from all destinations
|
1449
|
-
* @returns Filtered user supplied integrations config
|
1450
|
-
*/var getOverriddenIntegrationOptions=function getOverriddenIntegrationOptions(eventIntgConfig,destinationsIntgConfig){return Object.keys(eventIntgConfig).filter(function(intgName){return eventIntgConfig[intgName]!==true||!destinationsIntgConfig[intgName];}).reduce(function(obj,key){var retVal=clone$1(obj);retVal[key]=eventIntgConfig[key];return retVal;},{});};/**
|
1451
1134
|
* Mutates the event and return final event for delivery
|
1452
1135
|
* Updates certain parameters like sentAt timestamp, integrations config etc.
|
1453
1136
|
* @param event RudderEvent object
|
1454
1137
|
* @param state Application state
|
1455
1138
|
* @returns Final event ready to be delivered
|
1456
|
-
*/var getFinalEventForDeliveryMutator=function getFinalEventForDeliveryMutator(event
|
1457
|
-
finalEvent.sentAt=getCurrentTimeFormatted()
|
1458
|
-
// In general, the preference is given to the event's integrations config
|
1459
|
-
var eventIntgConfig=normalizeIntegrationOptions(event.integrations);var destinationsIntgConfig=state.nativeDestinations.integrationsConfig.value;var overriddenIntgOpts=getOverriddenIntegrationOptions(eventIntgConfig,destinationsIntgConfig);finalEvent.integrations=mergeDeepRight(destinationsIntgConfig,overriddenIntgOpts);return finalEvent;};
|
1139
|
+
*/var getFinalEventForDeliveryMutator=function getFinalEventForDeliveryMutator(event){var finalEvent=clone$1(event);// Update sentAt timestamp to the latest timestamp
|
1140
|
+
finalEvent.sentAt=getCurrentTimeFormatted();return finalEvent;};
|
1460
1141
|
|
1461
1142
|
var removeDuplicateSlashes=function removeDuplicateSlashes(str){return str.replace(/\/{2,}/g,'/');};
|
1462
1143
|
|
@@ -1472,13 +1153,23 @@ var DEFAULT_BEACON_QUEUE_OPTIONS={maxItems:DEFAULT_BEACON_QUEUE_MAX_SIZE,flushQu
|
|
1472
1153
|
* @returns stringified events payload as Blob, undefined if error occurs.
|
1473
1154
|
*/var getDeliveryPayload=function getDeliveryPayload(events,logger){var data={batch:events};try{var blobPayload=stringifyWithoutCircular(data,true);var blobOptions={type:'text/plain'};if(blobPayload){return new Blob([blobPayload],blobOptions);}logger===null||logger===void 0||logger.error(BEACON_QUEUE_STRING_CONVERSION_FAILURE_ERROR(BEACON_QUEUE_PLUGIN));}catch(err){logger===null||logger===void 0||logger.error(BEACON_QUEUE_BLOB_CONVERSION_FAILURE_ERROR(BEACON_QUEUE_PLUGIN),err);}return undefined;};var getNormalizedBeaconQueueOptions=function getNormalizedBeaconQueueOptions(queueOpts){return mergeDeepRight(DEFAULT_BEACON_QUEUE_OPTIONS,queueOpts);};var getDeliveryUrl$1=function getDeliveryUrl(dataplaneUrl,writeKey){var dpUrl=new URL(dataplaneUrl);return new URL(removeDuplicateSlashes([dpUrl.pathname,'/','beacon','/',DATA_PLANE_API_VERSION$1,'/',"batch?writeKey=".concat(writeKey)].join('')),dpUrl).href;};
|
1474
1155
|
|
1156
|
+
function random(len){return crypto.getRandomValues(new Uint8Array(len));}
|
1157
|
+
|
1158
|
+
var SIZE=4096,HEX$1=[],IDX$1=0,BUFFER$1;for(;IDX$1<256;IDX$1++){HEX$1[IDX$1]=(IDX$1+256).toString(16).substring(1);}function v4$1(){if(!BUFFER$1||IDX$1+16>SIZE){BUFFER$1=random(SIZE);IDX$1=0;}var i=0,tmp,out='';for(;i<16;i++){tmp=BUFFER$1[IDX$1+i];if(i==6)out+=HEX$1[tmp&15|64];else if(i==8)out+=HEX$1[tmp&63|128];else out+=HEX$1[tmp];if(i&1&&i>1&&i<11)out+='-';}IDX$1+=16;return out;}
|
1159
|
+
|
1160
|
+
var IDX=256,HEX=[],BUFFER;while(IDX--)HEX[IDX]=(IDX+256).toString(16).substring(1);function v4(){var i=0,num,out='';if(!BUFFER||IDX+16>256){BUFFER=Array(i=256);while(i--)BUFFER[i]=256*Math.random()|0;i=IDX=0;}for(;i<16;i++){num=BUFFER[IDX+i];if(i==6)out+=HEX[num&15|64];else if(i==8)out+=HEX[num&63|128];else out+=HEX[num];if(i&1&&i>1&&i<11)out+='-';}IDX++;return out;}
|
1161
|
+
|
1162
|
+
var hasCrypto$1=function hasCrypto(){return !isNullOrUndefined(globalThis.crypto)&&isFunction(globalThis.crypto.getRandomValues);};
|
1163
|
+
|
1164
|
+
var generateUUID=function generateUUID(){if(hasCrypto$1()){return v4$1();}return v4();};
|
1165
|
+
|
1475
1166
|
var COOKIE_STORAGE='cookieStorage';var LOCAL_STORAGE='localStorage';var SESSION_STORAGE='sessionStorage';var MEMORY_STORAGE='memoryStorage';var NO_STORAGE='none';
|
1476
1167
|
|
1477
1168
|
var sortByTime$1=function sortByTime(a,b){return a.time-b.time;};var BeaconItemsQueue=/*#__PURE__*/function(){function BeaconItemsQueue(name,options,queueProcessCb,storeManager){var _options$maxItems,_options$flushQueueIn;var storageType=arguments.length>4&&arguments[4]!==undefined?arguments[4]:MEMORY_STORAGE;_classCallCheck(this,BeaconItemsQueue);this.storeManager=storeManager;this.name=name;this.id=generateUUID();this.processQueueCb=queueProcessCb;this.maxItems=(_options$maxItems=options.maxItems)!==null&&_options$maxItems!==void 0?_options$maxItems:DEFAULT_BEACON_QUEUE_OPTIONS.maxItems;this.timeouts={flushQueueTimeOutInterval:(_options$flushQueueIn=options.flushQueueInterval)!==null&&_options$flushQueueIn!==void 0?_options$flushQueueIn:DEFAULT_BEACON_QUEUE_OPTIONS.flushQueueInterval};this.flushInProgress=false;this.nextFlushPending=false;// Set up our empty queues
|
1478
1169
|
this.store=this.storeManager.setStore({id:this.id,name:this.name,type:storageType});this.flushQueue=this.flushQueue.bind(this);this.attachListeners();this.flushQueueTimeOut=undefined;this.scheduleTimeoutActive=false;}_createClass(BeaconItemsQueue,[{key:"attachListeners",value:function attachListeners(){var _this=this;globalThis.addEventListener('visibilitychange',function(){if(document.visibilityState==='hidden'){_this.flushQueue();}});}},{key:"getQueue",value:function getQueue(name){var _this$store$get;return (_this$store$get=this.store.get(name!==null&&name!==void 0?name:this.name))!==null&&_this$store$get!==void 0?_this$store$get:[];}},{key:"setQueue",value:function setQueue(name,value){this.store.set(name!==null&&name!==void 0?name:this.name,value!==null&&value!==void 0?value:[]);}},{key:"start",value:function start(){if(!this.scheduleTimeoutActive){this.flushQueueTimeOut=globalThis.setTimeout(this.flushQueue,this.timeouts.flushQueueTimeOutInterval);this.scheduleTimeoutActive=true;}}},{key:"stop",value:function stop(){if(this.scheduleTimeoutActive){clearTimeout(this.flushQueueTimeOut);this.scheduleTimeoutActive=false;}}},{key:"enqueue",value:function enqueue(entry){var queue=this.getQueue();// Get max items from the queue minus one
|
1479
1170
|
queue=queue.slice(-(this.maxItems-1));queue.push(entry);queue=queue.sort(sortByTime$1);// Calculate response payload size after the addition of new event
|
1480
1171
|
var eventsToSend=queue.slice(0);var batchData=getDeliveryPayload(eventsToSend.map(function(queueItem){return queueItem.item.event;}));// Send events that existed in the queue if totaling more max payload size
|
1481
|
-
var isExceededMaxPayloadSize=Boolean(batchData&&batchData.
|
1172
|
+
var isExceededMaxPayloadSize=Boolean(batchData&&batchData.size>MAX_BATCH_PAYLOAD_SIZE_BYTES);if(isExceededMaxPayloadSize){// Flush all previous items
|
1482
1173
|
eventsToSend=queue.slice(0,queue.length-1);this.flushQueue(eventsToSend);// Add only latest item in the remaining queue that is cleared appropriately in flushQueue
|
1483
1174
|
queue=this.getQueue();queue.push(entry);}this.setQueue(this.name,queue);// If queue has total of max items then flush
|
1484
1175
|
if(queue.length===this.maxItems){this.flushQueue();}this.start();}},{key:"addItem",value:function addItem(itemData){this.enqueue({item:itemData,attemptNumber:0,time:Date.now(),id:generateUUID()});}},{key:"flushQueue",value:function flushQueue(queueItems){var _this2=this;if(!this.flushInProgress){this.flushInProgress=true;var batchItems=queueItems!==null&&queueItems!==void 0?queueItems:this.getQueue();var batchData=batchItems&&batchItems.length>0?batchItems.slice(0,batchItems.length):[];// TODO: add retry mechanism here
|
@@ -1494,7 +1185,7 @@ var pluginName$d='BeaconQueue';var BeaconQueue=function BeaconQueue(){return {na
|
|
1494
1185
|
* @param errorHandler Error handler instance
|
1495
1186
|
* @param logger Logger instance
|
1496
1187
|
* @returns BeaconItemsQueue instance
|
1497
|
-
*/init:function init(state,httpClient,storeManager,errorHandler,logger){var _state$loadOptions$va;var writeKey=state.lifecycle.writeKey.value;var dataplaneUrl=state.lifecycle.activeDataplaneUrl.value;var url=getDeliveryUrl$1(dataplaneUrl,writeKey);var finalQOpts=getNormalizedBeaconQueueOptions((_state$loadOptions$va=state.loadOptions.value.beaconQueueOptions)!==null&&_state$loadOptions$va!==void 0?_state$loadOptions$va:{});var queueProcessCallback=function queueProcessCallback(queueItems,done){logger===null||logger===void 0||logger.debug(BEACON_PLUGIN_EVENTS_QUEUE_DEBUG(BEACON_QUEUE_PLUGIN));var finalEvents=queueItems.map(function(queueItem){return getFinalEventForDeliveryMutator(queueItem.item.event
|
1188
|
+
*/init:function init(state,httpClient,storeManager,errorHandler,logger){var _state$loadOptions$va;var writeKey=state.lifecycle.writeKey.value;var dataplaneUrl=state.lifecycle.activeDataplaneUrl.value;var url=getDeliveryUrl$1(dataplaneUrl,writeKey);var finalQOpts=getNormalizedBeaconQueueOptions((_state$loadOptions$va=state.loadOptions.value.beaconQueueOptions)!==null&&_state$loadOptions$va!==void 0?_state$loadOptions$va:{});var queueProcessCallback=function queueProcessCallback(queueItems,done){logger===null||logger===void 0||logger.debug(BEACON_PLUGIN_EVENTS_QUEUE_DEBUG(BEACON_QUEUE_PLUGIN));var finalEvents=queueItems.map(function(queueItem){return getFinalEventForDeliveryMutator(queueItem.item.event);});var data=getDeliveryPayload(finalEvents);if(data){try{var isEnqueuedInBeacon=navigator.sendBeacon(url,data);if(!isEnqueuedInBeacon){logger===null||logger===void 0||logger.error(BEACON_QUEUE_SEND_ERROR(BEACON_QUEUE_PLUGIN));}done(null,isEnqueuedInBeacon);}catch(err){errorHandler===null||errorHandler===void 0||errorHandler.onError(err,BEACON_QUEUE_PLUGIN,BEACON_QUEUE_DELIVERY_ERROR(url));done(err);}}else {// Mark the item as done so that it can be removed from the queue
|
1498
1189
|
done(null);}};var eventsQueue=new BeaconItemsQueue("".concat(QUEUE_NAME$2,"_").concat(writeKey,"}"),finalQOpts,queueProcessCallback,storeManager);return eventsQueue;},/**
|
1499
1190
|
* Add event to the queue for delivery
|
1500
1191
|
* @param state Application state
|
@@ -1507,24 +1198,24 @@ done(null);}};var eventsQueue=new BeaconItemsQueue("".concat(QUEUE_NAME$2,"_").c
|
|
1507
1198
|
// It'll be updated to the latest timestamp during actual delivery
|
1508
1199
|
event.sentAt=getCurrentTimeFormatted();validateEventPayloadSize(event,logger);eventsQueue.addItem({event:event});}}};};
|
1509
1200
|
|
1510
|
-
var destDisplayNamesToFileNamesMap=_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},DISPLAY_NAME_TO_DIR_NAME_MAP$P),DISPLAY_NAME_TO_DIR_NAME_MAP$W),DISPLAY_NAME_TO_DIR_NAME_MAP$Q),DISPLAY_NAME_TO_DIR_NAME_MAP$U),DISPLAY_NAME_TO_DIR_NAME_MAP$s),DISPLAY_NAME_TO_DIR_NAME_MAP$S),DISPLAY_NAME_TO_DIR_NAME_MAP$14),DISPLAY_NAME_TO_DIR_NAME_MAP$O),DISPLAY_NAME_TO_DIR_NAME_MAP$N),DISPLAY_NAME_TO_DIR_NAME_MAP$M),DISPLAY_NAME_TO_DIR_NAME_MAP$_),DISPLAY_NAME_TO_DIR_NAME_MAP$12),DISPLAY_NAME_TO_DIR_NAME_MAP$10),DISPLAY_NAME_TO_DIR_NAME_MAP$Y),DISPLAY_NAME_TO_DIR_NAME_MAP$I),DISPLAY_NAME_TO_DIR_NAME_MAP$E),DISPLAY_NAME_TO_DIR_NAME_MAP$13),DISPLAY_NAME_TO_DIR_NAME_MAP$X),DISPLAY_NAME_TO_DIR_NAME_MAP$t),DISPLAY_NAME_TO_DIR_NAME_MAP$V),DISPLAY_NAME_TO_DIR_NAME_MAP$F),DISPLAY_NAME_TO_DIR_NAME_MAP$17),DISPLAY_NAME_TO_DIR_NAME_MAP$D),DISPLAY_NAME_TO_DIR_NAME_MAP$H),DISPLAY_NAME_TO_DIR_NAME_MAP$16),DISPLAY_NAME_TO_DIR_NAME_MAP$A),DISPLAY_NAME_TO_DIR_NAME_MAP$L),DISPLAY_NAME_TO_DIR_NAME_MAP$11),DISPLAY_NAME_TO_DIR_NAME_MAP$15),DISPLAY_NAME_TO_DIR_NAME_MAP$C),DISPLAY_NAME_TO_DIR_NAME_MAP$18),DISPLAY_NAME_TO_DIR_NAME_MAP$J),DISPLAY_NAME_TO_DIR_NAME_MAP$w),DISPLAY_NAME_TO_DIR_NAME_MAP$Z),DISPLAY_NAME_TO_DIR_NAME_MAP$R),DISPLAY_NAME_TO_DIR_NAME_MAP$$),DISPLAY_NAME_TO_DIR_NAME_MAP$G),DISPLAY_NAME_TO_DIR_NAME_MAP$y),DISPLAY_NAME_TO_DIR_NAME_MAP$z),DISPLAY_NAME_TO_DIR_NAME_MAP$v),DISPLAY_NAME_TO_DIR_NAME_MAP$x),DISPLAY_NAME_TO_DIR_NAME_MAP$u),DISPLAY_NAME_TO_DIR_NAME_MAP$B),DISPLAY_NAME_TO_DIR_NAME_MAP$T),DISPLAY_NAME_TO_DIR_NAME_MAP$K),DISPLAY_NAME_TO_DIR_NAME_MAP$r),DISPLAY_NAME_TO_DIR_NAME_MAP$q),DISPLAY_NAME_TO_DIR_NAME_MAP$p),DISPLAY_NAME_TO_DIR_NAME_MAP$o),DISPLAY_NAME_TO_DIR_NAME_MAP$n),DISPLAY_NAME_TO_DIR_NAME_MAP$m),DISPLAY_NAME_TO_DIR_NAME_MAP$l),DISPLAY_NAME_TO_DIR_NAME_MAP$k),DISPLAY_NAME_TO_DIR_NAME_MAP$j),DISPLAY_NAME_TO_DIR_NAME_MAP$i),DISPLAY_NAME_TO_DIR_NAME_MAP$h),DISPLAY_NAME_TO_DIR_NAME_MAP$g),DISPLAY_NAME_TO_DIR_NAME_MAP$f),DISPLAY_NAME_TO_DIR_NAME_MAP$e),DISPLAY_NAME_TO_DIR_NAME_MAP$d),DISPLAY_NAME_TO_DIR_NAME_MAP$c),DISPLAY_NAME_TO_DIR_NAME_MAP$b),DISPLAY_NAME_TO_DIR_NAME_MAP$a),DISPLAY_NAME_TO_DIR_NAME_MAP$9),DISPLAY_NAME_TO_DIR_NAME_MAP$8),DISPLAY_NAME_TO_DIR_NAME_MAP$7),DISPLAY_NAME_TO_DIR_NAME_MAP$6),DISPLAY_NAME_TO_DIR_NAME_MAP$5),DISPLAY_NAME_TO_DIR_NAME_MAP$4),DISPLAY_NAME_TO_DIR_NAME_MAP$3),DISPLAY_NAME_TO_DIR_NAME_MAP$2),DISPLAY_NAME_TO_DIR_NAME_MAP$1),DISPLAY_NAME_TO_DIR_NAME_MAP);
|
1511
|
-
|
1512
1201
|
var BUGSNAG_LIB_INSTANCE_GLOBAL_KEY_NAME='bugsnag';// For version 6 and below
|
1513
1202
|
var BUGSNAG_LIB_V7_INSTANCE_GLOBAL_KEY_NAME='Bugsnag';var GLOBAL_LIBRARY_OBJECT_NAMES=[BUGSNAG_LIB_V7_INSTANCE_GLOBAL_KEY_NAME,BUGSNAG_LIB_INSTANCE_GLOBAL_KEY_NAME];var BUGSNAG_CDN_URL='https://d2wy8f7a9ursnm.cloudfront.net/v6/bugsnag.min.js';var ERROR_REPORT_PROVIDER_NAME_BUGSNAG='rs-bugsnag';// This API key token is parsed in the CI pipeline
|
1514
1203
|
var API_KEY='0d96a60df267f4a13f808bbaa54e535c';var BUGSNAG_VALID_MAJOR_VERSION='6';var SDK_LOAD_POLL_INTERVAL_MS=100;// ms
|
1515
1204
|
var MAX_WAIT_FOR_SDK_LOAD_MS=100*SDK_LOAD_POLL_INTERVAL_MS;// ms
|
1516
1205
|
// Errors from the below scripts are NOT allowed to reach Bugsnag
|
1517
|
-
var SDK_FILE_NAME_PREFIXES=function SDK_FILE_NAME_PREFIXES(){return ['rsa'
|
1206
|
+
var SDK_FILE_NAME_PREFIXES=function SDK_FILE_NAME_PREFIXES(){return ['rsa'// Prefix for all the SDK scripts including plugins and module federated chunks
|
1207
|
+
];};var DEV_HOSTS=['www.test-host.com','localhost','127.0.0.1','[::1]'];// List of keys to exclude from the metadata
|
1518
1208
|
// Potential PII or sensitive data
|
1519
1209
|
var APP_STATE_EXCLUDE_KEYS=['userId','userTraits','groupId','groupTraits','anonymousId','config','instance',// destination instance objects
|
1520
|
-
'
|
1210
|
+
'eventBuffer',// pre-load event buffer (may contain PII)
|
1521
1211
|
'traits'];var BUGSNAG_PLUGIN='BugsnagPlugin';
|
1522
1212
|
|
1523
1213
|
var isValidVersion=function isValidVersion(globalLibInstance){var _globalLibInstance$_c;// For version 7
|
1524
1214
|
// eslint-disable-next-line no-underscore-dangle
|
1525
1215
|
var version=globalLibInstance===null||globalLibInstance===void 0||(_globalLibInstance$_c=globalLibInstance._client)===null||_globalLibInstance$_c===void 0||(_globalLibInstance$_c=_globalLibInstance$_c._notifier)===null||_globalLibInstance$_c===void 0?void 0:_globalLibInstance$_c.version;// For versions older than 7
|
1526
1216
|
if(!version){var _tempInstance$notifie;var tempInstance=globalLibInstance({apiKey:API_KEY,releaseStage:'version-test',// eslint-disable-next-line func-names, object-shorthand
|
1527
|
-
beforeSend:function beforeSend(){return false;}});version=(_tempInstance$notifie=tempInstance.notifier)===null||_tempInstance$notifie===void 0?void 0:_tempInstance$notifie.version;}return version&&version.charAt(0)===BUGSNAG_VALID_MAJOR_VERSION;};var isRudderSDKError=function isRudderSDKError(event){var _event$stacktrace;var errorOrigin=(_event$stacktrace=event.stacktrace)===null||_event$stacktrace===void 0||(_event$stacktrace=_event$stacktrace[0])===null||_event$stacktrace===void 0?void 0:_event$stacktrace.file;if(!errorOrigin||typeof errorOrigin!=='string'){return false;}
|
1217
|
+
beforeSend:function beforeSend(){return false;}});version=(_tempInstance$notifie=tempInstance.notifier)===null||_tempInstance$notifie===void 0?void 0:_tempInstance$notifie.version;}return version&&version.charAt(0)===BUGSNAG_VALID_MAJOR_VERSION;};var isRudderSDKError=function isRudderSDKError(event){var _event$stacktrace;var errorOrigin=(_event$stacktrace=event.stacktrace)===null||_event$stacktrace===void 0||(_event$stacktrace=_event$stacktrace[0])===null||_event$stacktrace===void 0?void 0:_event$stacktrace.file;if(!errorOrigin||typeof errorOrigin!=='string'){return false;}// Prefix folder for all the destination SDK scripts
|
1218
|
+
var isDestinationIntegrationBundle=errorOrigin.includes(CDN_INT_DIR);var srcFileName=errorOrigin.substring(errorOrigin.lastIndexOf('/')+1);return isDestinationIntegrationBundle||SDK_FILE_NAME_PREFIXES().some(function(prefix){return srcFileName.startsWith(prefix)&&srcFileName.endsWith('.js');});};var enhanceErrorEventMutator=function enhanceErrorEventMutator(event,metadataSource){event.updateMetaData('source',{metadataSource:metadataSource});var errorMessage=event.errorMessage;// eslint-disable-next-line no-param-reassign
|
1528
1219
|
event.context=errorMessage;// Hack for easily grouping the script load errors
|
1529
1220
|
// on the dashboard
|
1530
1221
|
if(errorMessage.includes('error in script loading')){// eslint-disable-next-line no-param-reassign
|
@@ -1532,7 +1223,7 @@ event.context='Script load failures';}// eslint-disable-next-line no-param-reass
|
|
1532
1223
|
event.severity='error';};var onError=function onError(state){var _state$source$value;var metadataSource=(_state$source$value=state.source.value)===null||_state$source$value===void 0?void 0:_state$source$value.id;return function(event){try{// Discard the event if it's not originated at the SDK
|
1533
1224
|
if(!isRudderSDKError(event)){return false;}enhanceErrorEventMutator(event,metadataSource);return true;}catch(_unused){// Drop the error event if it couldn't be filtered as
|
1534
1225
|
// it is most likely a non-SDK error
|
1535
|
-
return false;}};};var getReleaseStage=function getReleaseStage(){var host=globalThis.location.hostname;return host&&DEV_HOSTS.includes(host)?'development':'production';};var getGlobalBugsnagLibInstance=function getGlobalBugsnagLibInstance(){return globalThis[BUGSNAG_LIB_INSTANCE_GLOBAL_KEY_NAME];};var getNewClient=function getNewClient(state,logger){var globalBugsnagLibInstance=getGlobalBugsnagLibInstance();var clientConfig={apiKey:API_KEY,appVersion:'3.0.0-beta.
|
1226
|
+
return false;}};};var getReleaseStage=function getReleaseStage(){var host=globalThis.location.hostname;return host&&DEV_HOSTS.includes(host)?'development':'production';};var getGlobalBugsnagLibInstance=function getGlobalBugsnagLibInstance(){return globalThis[BUGSNAG_LIB_INSTANCE_GLOBAL_KEY_NAME];};var getNewClient=function getNewClient(state,logger){var globalBugsnagLibInstance=getGlobalBugsnagLibInstance();var clientConfig={apiKey:API_KEY,appVersion:'3.0.0-beta.8',// Set SDK version as the app version from build config
|
1536
1227
|
metaData:{SDK:{name:'JS',installType:'npm'}},beforeSend:onError(state),autoCaptureSessions:false,// auto capture sessions is disabled
|
1537
1228
|
collectUserIp:false,// collecting user's IP is disabled
|
1538
1229
|
// enabledBreadcrumbTypes: ['error', 'log', 'user'], // for v7 and above
|
@@ -1542,12 +1233,162 @@ globalThis.setTimeout(initBugsnagClient,SDK_LOAD_POLL_INTERVAL_MS,state,promiseR
|
|
1542
1233
|
var pluginName$c='Bugsnag';var Bugsnag=function Bugsnag(){return {name:pluginName$c,deps:[],initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName$c]);},errorReportingProvider:{init:function init(state,externalSrcLoader,logger){return new Promise(function(resolve,reject){// If API key token is not parsed or invalid, don't proceed to initialize the client
|
1543
1234
|
if(!isApiKeyValid(API_KEY)){reject(new Error(BUGSNAG_API_KEY_VALIDATION_ERROR(API_KEY)));return;}loadBugsnagSDK(externalSrcLoader,logger);initBugsnagClient(state,resolve,reject,logger);});},notify:function notify(client,error,state,logger){client===null||client===void 0||client.notify(error,{metaData:{state:getAppStateForMetadata(state)}});},breadcrumb:function breadcrumb(client,message,logger){client===null||client===void 0||client.leaveBreadcrumb(message);}}};};
|
1544
1235
|
|
1236
|
+
var _CNameMapping$19;var DIR_NAME$19='AdobeAnalytics';var NAME$19='ADOBE_ANALYTICS';var DISPLAY_NAME$19='Adobe Analytics';var DISPLAY_NAME_TO_DIR_NAME_MAP$19=_defineProperty({},DISPLAY_NAME$19,DIR_NAME$19);(_CNameMapping$19={'Adobe Analytics':NAME$19,ADOBEANALYTICS:NAME$19,'ADOBE ANALYTICS':NAME$19},_defineProperty(_CNameMapping$19,NAME$19,NAME$19),_defineProperty(_CNameMapping$19,"AdobeAnalytics",NAME$19),_defineProperty(_CNameMapping$19,"adobeanalytics",NAME$19),_defineProperty(_CNameMapping$19,'adobe analytics',NAME$19),_defineProperty(_CNameMapping$19,'Adobe analytics',NAME$19),_defineProperty(_CNameMapping$19,'adobe Analytics',NAME$19),_CNameMapping$19);
|
1237
|
+
|
1238
|
+
var _CNameMapping$18;var DIR_NAME$18='Amplitude';var NAME$18='AM';var DISPLAY_NAME$18='Amplitude';var DISPLAY_NAME_TO_DIR_NAME_MAP$18=_defineProperty({},DISPLAY_NAME$18,DIR_NAME$18);(_CNameMapping$18={},_defineProperty(_CNameMapping$18,NAME$18,NAME$18),_defineProperty(_CNameMapping$18,"AMPLITUDE",NAME$18),_defineProperty(_CNameMapping$18,"Amplitude",NAME$18),_defineProperty(_CNameMapping$18,"am",NAME$18),_CNameMapping$18);
|
1239
|
+
|
1240
|
+
var _CNameMapping$17;var DIR_NAME$17='Appcues';var NAME$17='APPCUES';var DISPLAY_NAME$17='Appcues';var DISPLAY_NAME_TO_DIR_NAME_MAP$17=_defineProperty({},DISPLAY_NAME$17,DIR_NAME$17);(_CNameMapping$17={},_defineProperty(_CNameMapping$17,NAME$17,NAME$17),_defineProperty(_CNameMapping$17,"Appcues",NAME$17),_defineProperty(_CNameMapping$17,'App Cues',NAME$17),_defineProperty(_CNameMapping$17,"appcues",NAME$17),_CNameMapping$17);
|
1241
|
+
|
1242
|
+
var _CNameMapping$16;var DIR_NAME$16='BingAds';var NAME$16='BINGADS';var DISPLAY_NAME$16='Bing Ads';var DISPLAY_NAME_TO_DIR_NAME_MAP$16=_defineProperty({},DISPLAY_NAME$16,DIR_NAME$16);(_CNameMapping$16={},_defineProperty(_CNameMapping$16,NAME$16,NAME$16),_defineProperty(_CNameMapping$16,"BingAds",NAME$16),_defineProperty(_CNameMapping$16,"bingads",NAME$16),_defineProperty(_CNameMapping$16,'Bing Ads',NAME$16),_defineProperty(_CNameMapping$16,'Bing ads',NAME$16),_defineProperty(_CNameMapping$16,'bing Ads',NAME$16),_defineProperty(_CNameMapping$16,'bing ads',NAME$16),_CNameMapping$16);
|
1243
|
+
|
1244
|
+
var _CNameMapping$15;var DIR_NAME$15='Braze';var NAME$15='BRAZE';var DISPLAY_NAME$15='Braze';var DISPLAY_NAME_TO_DIR_NAME_MAP$15=_defineProperty({},DISPLAY_NAME$15,DIR_NAME$15);(_CNameMapping$15={},_defineProperty(_CNameMapping$15,NAME$15,NAME$15),_defineProperty(_CNameMapping$15,"Braze",NAME$15),_defineProperty(_CNameMapping$15,"braze",NAME$15),_CNameMapping$15);
|
1245
|
+
|
1246
|
+
var _CNameMapping$14;var DIR_NAME$14='Bugsnag';var NAME$14='BUGSNAG';var DISPLAY_NAME$14='Bugsnag';var DISPLAY_NAME_TO_DIR_NAME_MAP$14=_defineProperty({},DISPLAY_NAME$14,DIR_NAME$14);(_CNameMapping$14={},_defineProperty(_CNameMapping$14,NAME$14,NAME$14),_defineProperty(_CNameMapping$14,"bugsnag",NAME$14),_defineProperty(_CNameMapping$14,"Bugsnag",NAME$14),_CNameMapping$14);
|
1247
|
+
|
1248
|
+
var _CNameMapping$13;var DIR_NAME$13='Chartbeat';var NAME$13='CHARTBEAT';var DISPLAY_NAME$13='Chartbeat';var DISPLAY_NAME_TO_DIR_NAME_MAP$13=_defineProperty({},DISPLAY_NAME$13,DIR_NAME$13);(_CNameMapping$13={},_defineProperty(_CNameMapping$13,NAME$13,NAME$13),_defineProperty(_CNameMapping$13,"Chartbeat",NAME$13),_defineProperty(_CNameMapping$13,"chartbeat",NAME$13),_defineProperty(_CNameMapping$13,'Chart Beat',NAME$13),_defineProperty(_CNameMapping$13,'chart beat',NAME$13),_CNameMapping$13);
|
1249
|
+
|
1250
|
+
var _CNameMapping$12;var DIR_NAME$12='Clevertap';var NAME$12='CLEVERTAP';var DISPLAY_NAME$12='CleverTap';var DISPLAY_NAME_TO_DIR_NAME_MAP$12=_defineProperty({},DISPLAY_NAME$12,DIR_NAME$12);(_CNameMapping$12={},_defineProperty(_CNameMapping$12,NAME$12,NAME$12),_defineProperty(_CNameMapping$12,"Clevertap",NAME$12),_defineProperty(_CNameMapping$12,"clevertap",NAME$12),_CNameMapping$12);
|
1251
|
+
|
1252
|
+
var _CNameMapping$11;var DIR_NAME$11='Comscore';var NAME$11='COMSCORE';var DISPLAY_NAME$11='Comscore';var DISPLAY_NAME_TO_DIR_NAME_MAP$11=_defineProperty({},DISPLAY_NAME$11,DIR_NAME$11);(_CNameMapping$11={},_defineProperty(_CNameMapping$11,NAME$11,NAME$11),_defineProperty(_CNameMapping$11,"Comscore",NAME$11),_defineProperty(_CNameMapping$11,'Com Score',NAME$11),_defineProperty(_CNameMapping$11,'com Score',NAME$11),_defineProperty(_CNameMapping$11,'com score',NAME$11),_defineProperty(_CNameMapping$11,'Com score',NAME$11),_CNameMapping$11);
|
1253
|
+
|
1254
|
+
var _CNameMapping$10;var DIR_NAME$10='Criteo';var NAME$10='CRITEO';var DISPLAY_NAME$10='Criteo';var DISPLAY_NAME_TO_DIR_NAME_MAP$10=_defineProperty({},DISPLAY_NAME$10,DIR_NAME$10);(_CNameMapping$10={},_defineProperty(_CNameMapping$10,NAME$10,NAME$10),_defineProperty(_CNameMapping$10,"Criteo",NAME$10),_defineProperty(_CNameMapping$10,"criteo",NAME$10),_CNameMapping$10);
|
1255
|
+
|
1256
|
+
var _CNameMapping$$;var DIR_NAME$$='CustomerIO';var NAME$$='CUSTOMERIO';var DISPLAY_NAME$$='Customer IO';var DISPLAY_NAME_TO_DIR_NAME_MAP$$=_defineProperty({},DISPLAY_NAME$$,DIR_NAME$$);(_CNameMapping$$={},_defineProperty(_CNameMapping$$,NAME$$,NAME$$),_defineProperty(_CNameMapping$$,"Customerio",NAME$$),_defineProperty(_CNameMapping$$,'Customer.io',NAME$$),_defineProperty(_CNameMapping$$,'CUSTOMER.IO',NAME$$),_defineProperty(_CNameMapping$$,'customer.io',NAME$$),_CNameMapping$$);
|
1257
|
+
|
1258
|
+
var _CNameMapping$_;var DIR_NAME$_='Drip';var NAME$_='DRIP';var DISPLAY_NAME$_='Drip';var DISPLAY_NAME_TO_DIR_NAME_MAP$_=_defineProperty({},DISPLAY_NAME$_,DIR_NAME$_);(_CNameMapping$_={},_defineProperty(_CNameMapping$_,NAME$_,NAME$_),_defineProperty(_CNameMapping$_,"Drip",NAME$_),_defineProperty(_CNameMapping$_,"drip",NAME$_),_CNameMapping$_);
|
1259
|
+
|
1260
|
+
var _CNameMapping$Z;var DIR_NAME$Z='FacebookPixel';var NAME$Z='FACEBOOK_PIXEL';var DISPLAY_NAME$Z='Facebook Pixel';var DISPLAY_NAME_TO_DIR_NAME_MAP$Z=_defineProperty({},DISPLAY_NAME$Z,DIR_NAME$Z);(_CNameMapping$Z={},_defineProperty(_CNameMapping$Z,NAME$Z,NAME$Z),_defineProperty(_CNameMapping$Z,'FB Pixel',NAME$Z),_defineProperty(_CNameMapping$Z,'Facebook Pixel',NAME$Z),_defineProperty(_CNameMapping$Z,'facebook pixel',NAME$Z),_defineProperty(_CNameMapping$Z,"fbpixel",NAME$Z),_defineProperty(_CNameMapping$Z,"FBPIXEL",NAME$Z),_defineProperty(_CNameMapping$Z,"FB_PIXEL",NAME$Z),_CNameMapping$Z);
|
1261
|
+
|
1262
|
+
var _CNameMapping$Y;var DIR_NAME$Y='Fullstory';var NAME$Y='FULLSTORY';var DISPLAY_NAME$Y='Fullstory';var DISPLAY_NAME_TO_DIR_NAME_MAP$Y=_defineProperty({},DISPLAY_NAME$Y,DIR_NAME$Y);(_CNameMapping$Y={},_defineProperty(_CNameMapping$Y,NAME$Y,NAME$Y),_defineProperty(_CNameMapping$Y,"Fullstory",NAME$Y),_defineProperty(_CNameMapping$Y,"FullStory",NAME$Y),_defineProperty(_CNameMapping$Y,'full Story',NAME$Y),_defineProperty(_CNameMapping$Y,'Full Story',NAME$Y),_defineProperty(_CNameMapping$Y,'Full story',NAME$Y),_defineProperty(_CNameMapping$Y,'full story',NAME$Y),_defineProperty(_CNameMapping$Y,"fullstory",NAME$Y),_CNameMapping$Y);
|
1263
|
+
|
1264
|
+
var _CNameMapping$X;var DIR_NAME$X='GA';var NAME$X='GA';var DISPLAY_NAME$X='Google Analytics';var DISPLAY_NAME_TO_DIR_NAME_MAP$X=_defineProperty({},DISPLAY_NAME$X,DIR_NAME$X);(_CNameMapping$X={},_defineProperty(_CNameMapping$X,NAME$X,NAME$X),_defineProperty(_CNameMapping$X,'Google Analytics',NAME$X),_defineProperty(_CNameMapping$X,"GoogleAnalytics",NAME$X),_defineProperty(_CNameMapping$X,'GOOGLE ANALYTICS',NAME$X),_defineProperty(_CNameMapping$X,'google analytics',NAME$X),_CNameMapping$X);
|
1265
|
+
|
1266
|
+
var _CNameMapping$W;var DIR_NAME$W='GA4';var NAME$W='GA4';var DISPLAY_NAME$W='Google Analytics 4 (GA4)';var DISPLAY_NAME_TO_DIR_NAME_MAP$W=_defineProperty({},DISPLAY_NAME$W,DIR_NAME$W);(_CNameMapping$W={},_defineProperty(_CNameMapping$W,NAME$W,NAME$W),_defineProperty(_CNameMapping$W,'Google Analytics 4',NAME$W),_defineProperty(_CNameMapping$W,'Google analytics 4',NAME$W),_defineProperty(_CNameMapping$W,'google analytics 4',NAME$W),_defineProperty(_CNameMapping$W,'Google Analytics4',NAME$W),_defineProperty(_CNameMapping$W,'Google analytics4',NAME$W),_defineProperty(_CNameMapping$W,'google analytics4',NAME$W),_defineProperty(_CNameMapping$W,'Google Analytics 4 (GA4)',NAME$W),_defineProperty(_CNameMapping$W,'google analytics 4 (ga4)',NAME$W),_defineProperty(_CNameMapping$W,"GoogleAnalytics4",NAME$W),_CNameMapping$W);
|
1267
|
+
|
1268
|
+
var _CNameMapping$V;var DIR_NAME$V='GoogleAds';var NAME$V='GOOGLEADS';var DISPLAY_NAME$V='Google Ads';var DISPLAY_NAME_TO_DIR_NAME_MAP$V=_defineProperty({},DISPLAY_NAME$V,DIR_NAME$V);(_CNameMapping$V={},_defineProperty(_CNameMapping$V,NAME$V,NAME$V),_defineProperty(_CNameMapping$V,'Google Ads',NAME$V),_defineProperty(_CNameMapping$V,"GoogleAds",NAME$V),_defineProperty(_CNameMapping$V,'GOOGLE ADS',NAME$V),_defineProperty(_CNameMapping$V,'google ads',NAME$V),_defineProperty(_CNameMapping$V,"googleads",NAME$V),_CNameMapping$V);
|
1269
|
+
|
1270
|
+
var _CNameMapping$U;var DIR_NAME$U='GoogleOptimize';var NAME$U='GOOGLE_OPTIMIZE';var DISPLAY_NAME$U='Google Optimize';var DISPLAY_NAME_TO_DIR_NAME_MAP$U=_defineProperty({},DISPLAY_NAME$U,DIR_NAME$U);(_CNameMapping$U={},_defineProperty(_CNameMapping$U,NAME$U,NAME$U),_defineProperty(_CNameMapping$U,'Google Optimize',NAME$U),_defineProperty(_CNameMapping$U,"GoogleOptimize",NAME$U),_defineProperty(_CNameMapping$U,"Googleoptimize",NAME$U),_defineProperty(_CNameMapping$U,"GOOGLEOPTIMIZE",NAME$U),_defineProperty(_CNameMapping$U,'google optimize',NAME$U),_defineProperty(_CNameMapping$U,'Google optimize',NAME$U),_defineProperty(_CNameMapping$U,'GOOGLE OPTIMIZE',NAME$U),_CNameMapping$U);
|
1271
|
+
|
1272
|
+
var _CNameMapping$T;var DIR_NAME$T='GoogleTagManager';var NAME$T='GTM';var DISPLAY_NAME$T='Google Tag Manager';var DISPLAY_NAME_TO_DIR_NAME_MAP$T=_defineProperty({},DISPLAY_NAME$T,DIR_NAME$T);(_CNameMapping$T={},_defineProperty(_CNameMapping$T,NAME$T,NAME$T),_defineProperty(_CNameMapping$T,'Google Tag Manager',NAME$T),_defineProperty(_CNameMapping$T,'google tag manager',NAME$T),_defineProperty(_CNameMapping$T,'googletag manager',NAME$T),_defineProperty(_CNameMapping$T,"googletagmanager",NAME$T),_CNameMapping$T);
|
1273
|
+
|
1274
|
+
var _CNameMapping$S;var DIR_NAME$S='Heap';var NAME$S='HEAP';var DISPLAY_NAME$S='Heap.io';var DISPLAY_NAME_TO_DIR_NAME_MAP$S=_defineProperty({},DISPLAY_NAME$S,DIR_NAME$S);(_CNameMapping$S={},_defineProperty(_CNameMapping$S,NAME$S,NAME$S),_defineProperty(_CNameMapping$S,"Heap",NAME$S),_defineProperty(_CNameMapping$S,"heap",NAME$S),_defineProperty(_CNameMapping$S,'Heap.io',NAME$S),_CNameMapping$S);
|
1275
|
+
|
1276
|
+
var _CNameMapping$R;var DIR_NAME$R='Hotjar';var NAME$R='HOTJAR';var DISPLAY_NAME$R='Hotjar';var DISPLAY_NAME_TO_DIR_NAME_MAP$R=_defineProperty({},DISPLAY_NAME$R,DIR_NAME$R);(_CNameMapping$R={},_defineProperty(_CNameMapping$R,NAME$R,NAME$R),_defineProperty(_CNameMapping$R,"Hotjar",NAME$R),_defineProperty(_CNameMapping$R,"hotjar",NAME$R),_defineProperty(_CNameMapping$R,'Hot Jar',NAME$R),_defineProperty(_CNameMapping$R,'hot jar',NAME$R),_CNameMapping$R);
|
1277
|
+
|
1278
|
+
var _CNameMapping$Q;var DIR_NAME$Q='HubSpot';var NAME$Q='HS';var DISPLAY_NAME$Q='HubSpot';var DISPLAY_NAME_TO_DIR_NAME_MAP$Q=_defineProperty({},DISPLAY_NAME$Q,DIR_NAME$Q);(_CNameMapping$Q={},_defineProperty(_CNameMapping$Q,NAME$Q,NAME$Q),_defineProperty(_CNameMapping$Q,"Hubspot",NAME$Q),_defineProperty(_CNameMapping$Q,"HUBSPOT",NAME$Q),_defineProperty(_CNameMapping$Q,'hub spot',NAME$Q),_defineProperty(_CNameMapping$Q,'Hub Spot',NAME$Q),_defineProperty(_CNameMapping$Q,'Hub spot',NAME$Q),_CNameMapping$Q);
|
1279
|
+
|
1280
|
+
var _CNameMapping$P;var DIR_NAME$P='INTERCOM';var NAME$P='INTERCOM';var DISPLAY_NAME$P='Intercom';var DISPLAY_NAME_TO_DIR_NAME_MAP$P=_defineProperty({},DISPLAY_NAME$P,DIR_NAME$P);(_CNameMapping$P={},_defineProperty(_CNameMapping$P,NAME$P,NAME$P),_defineProperty(_CNameMapping$P,"Intercom",NAME$P),_defineProperty(_CNameMapping$P,"intercom",NAME$P),_CNameMapping$P);
|
1281
|
+
|
1282
|
+
var _CNameMapping$O;var DIR_NAME$O='Keen';var NAME$O='KEEN';var DISPLAY_NAME$O='Keen';var DISPLAY_NAME_TO_DIR_NAME_MAP$O=_defineProperty({},DISPLAY_NAME$O,DIR_NAME$O);(_CNameMapping$O={},_defineProperty(_CNameMapping$O,NAME$O,NAME$O),_defineProperty(_CNameMapping$O,"Keen",NAME$O),_defineProperty(_CNameMapping$O,'Keen.io',NAME$O),_defineProperty(_CNameMapping$O,"keen",NAME$O),_defineProperty(_CNameMapping$O,'keen.io',NAME$O),_CNameMapping$O);
|
1283
|
+
|
1284
|
+
var _CNameMapping$N;var DIR_NAME$N='Kissmetrics';var NAME$N='KISSMETRICS';var DISPLAY_NAME$N='Kiss Metrics';var DISPLAY_NAME_TO_DIR_NAME_MAP$N=_defineProperty({},DISPLAY_NAME$N,DIR_NAME$N);(_CNameMapping$N={},_defineProperty(_CNameMapping$N,NAME$N,NAME$N),_defineProperty(_CNameMapping$N,"Kissmetrics",NAME$N),_defineProperty(_CNameMapping$N,"kissmetrics",NAME$N),_CNameMapping$N);
|
1285
|
+
|
1286
|
+
var _CNameMapping$M;var DIR_NAME$M='Klaviyo';var NAME$M='KLAVIYO';var DISPLAY_NAME$M='Klaviyo';var DISPLAY_NAME_TO_DIR_NAME_MAP$M=_defineProperty({},DISPLAY_NAME$M,DIR_NAME$M);(_CNameMapping$M={},_defineProperty(_CNameMapping$M,NAME$M,NAME$M),_defineProperty(_CNameMapping$M,"Klaviyo",NAME$M),_defineProperty(_CNameMapping$M,"klaviyo",NAME$M),_CNameMapping$M);
|
1287
|
+
|
1288
|
+
var _CNameMapping$L;var DIR_NAME$L='LaunchDarkly';var NAME$L='LAUNCHDARKLY';var DISPLAY_NAME$L='LaunchDarkly';var DISPLAY_NAME_TO_DIR_NAME_MAP$L=_defineProperty({},DISPLAY_NAME$L,DIR_NAME$L);(_CNameMapping$L={},_defineProperty(_CNameMapping$L,NAME$L,NAME$L),_defineProperty(_CNameMapping$L,"LaunchDarkly",NAME$L),_defineProperty(_CNameMapping$L,"Launch_Darkly",NAME$L),_defineProperty(_CNameMapping$L,'Launch Darkly',NAME$L),_defineProperty(_CNameMapping$L,"launchDarkly",NAME$L),_defineProperty(_CNameMapping$L,'launch darkly',NAME$L),_CNameMapping$L);
|
1289
|
+
|
1290
|
+
var _CNameMapping$K;var DIR_NAME$K='LinkedInInsightTag';var NAME$K='LINKEDIN_INSIGHT_TAG';var DISPLAY_NAME$K='Linkedin Insight Tag';var DISPLAY_NAME_TO_DIR_NAME_MAP$K=_defineProperty({},DISPLAY_NAME$K,DIR_NAME$K);(_CNameMapping$K={},_defineProperty(_CNameMapping$K,NAME$K,NAME$K),_defineProperty(_CNameMapping$K,'LinkedIn Insight Tag',NAME$K),_defineProperty(_CNameMapping$K,'LinkedIn insight tag',NAME$K),_defineProperty(_CNameMapping$K,'linkedIn insight tag',NAME$K),_defineProperty(_CNameMapping$K,"Linkedin_insight_tag",NAME$K),_defineProperty(_CNameMapping$K,"LinkedinInsighttag",NAME$K),_defineProperty(_CNameMapping$K,"LinkedinInsightTag",NAME$K),_defineProperty(_CNameMapping$K,"LinkedInInsightTag",NAME$K),_defineProperty(_CNameMapping$K,"Linkedininsighttag",NAME$K),_defineProperty(_CNameMapping$K,"LINKEDININSIGHTTAG",NAME$K),_defineProperty(_CNameMapping$K,"linkedininsighttag",NAME$K),_CNameMapping$K);
|
1291
|
+
|
1292
|
+
var _CNameMapping$J;var DIR_NAME$J='Lotame';var NAME$J='LOTAME';var DISPLAY_NAME$J='Lotame';var DISPLAY_NAME_TO_DIR_NAME_MAP$J=_defineProperty({},DISPLAY_NAME$J,DIR_NAME$J);(_CNameMapping$J={},_defineProperty(_CNameMapping$J,NAME$J,NAME$J),_defineProperty(_CNameMapping$J,"Lotame",NAME$J),_defineProperty(_CNameMapping$J,"lotame",NAME$J),_CNameMapping$J);
|
1293
|
+
|
1294
|
+
var _CNameMapping$I;var DIR_NAME$I='Lytics';var NAME$I='LYTICS';var DISPLAY_NAME$I='Lytics';var DISPLAY_NAME_TO_DIR_NAME_MAP$I=_defineProperty({},DISPLAY_NAME$I,DIR_NAME$I);(_CNameMapping$I={},_defineProperty(_CNameMapping$I,NAME$I,NAME$I),_defineProperty(_CNameMapping$I,"Lytics",NAME$I),_defineProperty(_CNameMapping$I,"lytics",NAME$I),_CNameMapping$I);
|
1295
|
+
|
1296
|
+
var _CNameMapping$H;var DIR_NAME$H='Mixpanel';var NAME$H='MP';var DISPLAY_NAME$H='Mixpanel';var DISPLAY_NAME_TO_DIR_NAME_MAP$H=_defineProperty({},DISPLAY_NAME$H,DIR_NAME$H);(_CNameMapping$H={},_defineProperty(_CNameMapping$H,NAME$H,NAME$H),_defineProperty(_CNameMapping$H,"MIXPANEL",NAME$H),_defineProperty(_CNameMapping$H,"Mixpanel",NAME$H),_defineProperty(_CNameMapping$H,'MIX PANEL',NAME$H),_defineProperty(_CNameMapping$H,'Mix panel',NAME$H),_defineProperty(_CNameMapping$H,'Mix Panel',NAME$H),_CNameMapping$H);
|
1297
|
+
|
1298
|
+
var _CNameMapping$G;var DIR_NAME$G='MoEngage';var NAME$G='MOENGAGE';var DISPLAY_NAME$G='MoEngage';var DISPLAY_NAME_TO_DIR_NAME_MAP$G=_defineProperty({},DISPLAY_NAME$G,DIR_NAME$G);(_CNameMapping$G={},_defineProperty(_CNameMapping$G,NAME$G,NAME$G),_defineProperty(_CNameMapping$G,"MoEngage",NAME$G),_defineProperty(_CNameMapping$G,"moengage",NAME$G),_defineProperty(_CNameMapping$G,"Moengage",NAME$G),_defineProperty(_CNameMapping$G,'Mo Engage',NAME$G),_defineProperty(_CNameMapping$G,'mo engage',NAME$G),_defineProperty(_CNameMapping$G,'Mo engage',NAME$G),_CNameMapping$G);
|
1299
|
+
|
1300
|
+
var _CNameMapping$F;var DIR_NAME$F='Optimizely';var NAME$F='OPTIMIZELY';var DISPLAY_NAME$F='Optimizely Web';var DISPLAY_NAME_TO_DIR_NAME_MAP$F=_defineProperty({},DISPLAY_NAME$F,DIR_NAME$F);(_CNameMapping$F={},_defineProperty(_CNameMapping$F,NAME$F,NAME$F),_defineProperty(_CNameMapping$F,"Optimizely",NAME$F),_defineProperty(_CNameMapping$F,"optimizely",NAME$F),_CNameMapping$F);
|
1301
|
+
|
1302
|
+
var _CNameMapping$E;var DIR_NAME$E='Pendo';var NAME$E='PENDO';var DISPLAY_NAME$E='Pendo';var DISPLAY_NAME_TO_DIR_NAME_MAP$E=_defineProperty({},DISPLAY_NAME$E,DIR_NAME$E);(_CNameMapping$E={},_defineProperty(_CNameMapping$E,NAME$E,NAME$E),_defineProperty(_CNameMapping$E,"Pendo",NAME$E),_defineProperty(_CNameMapping$E,"pendo",NAME$E),_CNameMapping$E);
|
1303
|
+
|
1304
|
+
var _CNameMapping$D;var DIR_NAME$D='PinterestTag';var NAME$D='PINTEREST_TAG';var DISPLAY_NAME$D='Pinterest Tag';var DISPLAY_NAME_TO_DIR_NAME_MAP$D=_defineProperty({},DISPLAY_NAME$D,DIR_NAME$D);(_CNameMapping$D={},_defineProperty(_CNameMapping$D,NAME$D,NAME$D),_defineProperty(_CNameMapping$D,"PinterestTag",NAME$D),_defineProperty(_CNameMapping$D,"Pinterest_Tag",NAME$D),_defineProperty(_CNameMapping$D,"PINTERESTTAG",NAME$D),_defineProperty(_CNameMapping$D,"pinterest",NAME$D),_defineProperty(_CNameMapping$D,"PinterestAds",NAME$D),_defineProperty(_CNameMapping$D,"Pinterest_Ads",NAME$D),_defineProperty(_CNameMapping$D,"Pinterest",NAME$D),_defineProperty(_CNameMapping$D,'Pinterest Tag',NAME$D),_defineProperty(_CNameMapping$D,'Pinterest tag',NAME$D),_defineProperty(_CNameMapping$D,'PINTEREST TAG',NAME$D),_defineProperty(_CNameMapping$D,'pinterest tag',NAME$D),_defineProperty(_CNameMapping$D,'Pinterest Ads',NAME$D),_defineProperty(_CNameMapping$D,'Pinterest ads',NAME$D),_CNameMapping$D);
|
1305
|
+
|
1306
|
+
var _CNameMapping$C;var DIR_NAME$C='PostAffiliatePro';var NAME$C='POST_AFFILIATE_PRO';var DISPLAY_NAME$C='Post Affiliate Pro';var DISPLAY_NAME_TO_DIR_NAME_MAP$C=_defineProperty({},DISPLAY_NAME$C,DIR_NAME$C);(_CNameMapping$C={},_defineProperty(_CNameMapping$C,NAME$C,NAME$C),_defineProperty(_CNameMapping$C,"PostAffiliatePro",NAME$C),_defineProperty(_CNameMapping$C,"Post_affiliate_pro",NAME$C),_defineProperty(_CNameMapping$C,'Post Affiliate Pro',NAME$C),_defineProperty(_CNameMapping$C,'Post affiliate pro',NAME$C),_defineProperty(_CNameMapping$C,'post affiliate pro',NAME$C),_defineProperty(_CNameMapping$C,"postaffiliatepro",NAME$C),_defineProperty(_CNameMapping$C,"POSTAFFILIATEPRO",NAME$C),_CNameMapping$C);
|
1307
|
+
|
1308
|
+
var _CNameMapping$B;var DIR_NAME$B='Posthog';var NAME$B='POSTHOG';var DISPLAY_NAME$B='PostHog';var DISPLAY_NAME_TO_DIR_NAME_MAP$B=_defineProperty({},DISPLAY_NAME$B,DIR_NAME$B);(_CNameMapping$B={},_defineProperty(_CNameMapping$B,NAME$B,NAME$B),_defineProperty(_CNameMapping$B,"PostHog",NAME$B),_defineProperty(_CNameMapping$B,"Posthog",NAME$B),_defineProperty(_CNameMapping$B,"posthog",NAME$B),_defineProperty(_CNameMapping$B,'Post Hog',NAME$B),_defineProperty(_CNameMapping$B,'Post hog',NAME$B),_defineProperty(_CNameMapping$B,'post hog',NAME$B),_CNameMapping$B);
|
1309
|
+
|
1310
|
+
var _CNameMapping$A;var DIR_NAME$A='ProfitWell';var NAME$A='PROFITWELL';var DISPLAY_NAME$A='ProfitWell';var DISPLAY_NAME_TO_DIR_NAME_MAP$A=_defineProperty({},DISPLAY_NAME$A,DIR_NAME$A);(_CNameMapping$A={},_defineProperty(_CNameMapping$A,NAME$A,NAME$A),_defineProperty(_CNameMapping$A,"ProfitWell",NAME$A),_defineProperty(_CNameMapping$A,"profitwell",NAME$A),_defineProperty(_CNameMapping$A,"Profitwell",NAME$A),_defineProperty(_CNameMapping$A,'Profit Well',NAME$A),_defineProperty(_CNameMapping$A,'profit well',NAME$A),_defineProperty(_CNameMapping$A,'Profit well',NAME$A),_CNameMapping$A);
|
1311
|
+
|
1312
|
+
var _CNameMapping$z;var DIR_NAME$z='Qualtrics';var NAME$z='QUALTRICS';var DISPLAY_NAME$z='Qualtrics';var DISPLAY_NAME_TO_DIR_NAME_MAP$z=_defineProperty({},DISPLAY_NAME$z,DIR_NAME$z);(_CNameMapping$z={},_defineProperty(_CNameMapping$z,NAME$z,NAME$z),_defineProperty(_CNameMapping$z,"Qualtrics",NAME$z),_defineProperty(_CNameMapping$z,"qualtrics",NAME$z),_CNameMapping$z);
|
1313
|
+
|
1314
|
+
var _CNameMapping$y;var DIR_NAME$y='QuantumMetric';var NAME$y='QUANTUMMETRIC';var DISPLAY_NAME$y='Quantum Metric';var DISPLAY_NAME_TO_DIR_NAME_MAP$y=_defineProperty({},DISPLAY_NAME$y,DIR_NAME$y);(_CNameMapping$y={},_defineProperty(_CNameMapping$y,NAME$y,NAME$y),_defineProperty(_CNameMapping$y,'Quantum Metric',NAME$y),_defineProperty(_CNameMapping$y,'quantum Metric',NAME$y),_defineProperty(_CNameMapping$y,'quantum metric',NAME$y),_defineProperty(_CNameMapping$y,"QuantumMetric",NAME$y),_defineProperty(_CNameMapping$y,"quantumMetric",NAME$y),_defineProperty(_CNameMapping$y,"quantummetric",NAME$y),_defineProperty(_CNameMapping$y,"Quantum_Metric",NAME$y),_CNameMapping$y);
|
1315
|
+
|
1316
|
+
var _CNameMapping$x;var DIR_NAME$x='RedditPixel';var NAME$x='REDDIT_PIXEL';var DISPLAY_NAME$x='Reddit Pixel';var DISPLAY_NAME_TO_DIR_NAME_MAP$x=_defineProperty({},DISPLAY_NAME$x,DIR_NAME$x);(_CNameMapping$x={},_defineProperty(_CNameMapping$x,NAME$x,NAME$x),_defineProperty(_CNameMapping$x,"Reddit_Pixel",NAME$x),_defineProperty(_CNameMapping$x,"RedditPixel",NAME$x),_defineProperty(_CNameMapping$x,"REDDITPIXEL",NAME$x),_defineProperty(_CNameMapping$x,"redditpixel",NAME$x),_defineProperty(_CNameMapping$x,'Reddit Pixel',NAME$x),_defineProperty(_CNameMapping$x,'REDDIT PIXEL',NAME$x),_defineProperty(_CNameMapping$x,'reddit pixel',NAME$x),_CNameMapping$x);
|
1317
|
+
|
1318
|
+
var _CNameMapping$w;var DIR_NAME$w='Sentry';var NAME$w='SENTRY';var DISPLAY_NAME$w='Sentry';var DISPLAY_NAME_TO_DIR_NAME_MAP$w=_defineProperty({},DISPLAY_NAME$w,DIR_NAME$w);(_CNameMapping$w={},_defineProperty(_CNameMapping$w,NAME$w,NAME$w),_defineProperty(_CNameMapping$w,"sentry",NAME$w),_defineProperty(_CNameMapping$w,"Sentry",NAME$w),_CNameMapping$w);
|
1319
|
+
|
1320
|
+
var _CNameMapping$v;var DIR_NAME$v='SnapPixel';var NAME$v='SNAP_PIXEL';var DISPLAY_NAME$v='Snap Pixel';var DISPLAY_NAME_TO_DIR_NAME_MAP$v=_defineProperty({},DISPLAY_NAME$v,DIR_NAME$v);(_CNameMapping$v={},_defineProperty(_CNameMapping$v,NAME$v,NAME$v),_defineProperty(_CNameMapping$v,"Snap_Pixel",NAME$v),_defineProperty(_CNameMapping$v,"SnapPixel",NAME$v),_defineProperty(_CNameMapping$v,"SNAPPIXEL",NAME$v),_defineProperty(_CNameMapping$v,"snappixel",NAME$v),_defineProperty(_CNameMapping$v,'Snap Pixel',NAME$v),_defineProperty(_CNameMapping$v,'SNAP PIXEL',NAME$v),_defineProperty(_CNameMapping$v,'snap pixel',NAME$v),_CNameMapping$v);
|
1321
|
+
|
1322
|
+
var _CNameMapping$u;var DIR_NAME$u='TVSquared';var NAME$u='TVSQUARED';var DISPLAY_NAME$u='TVSquared';var DISPLAY_NAME_TO_DIR_NAME_MAP$u=_defineProperty({},DISPLAY_NAME$u,DIR_NAME$u);(_CNameMapping$u={},_defineProperty(_CNameMapping$u,NAME$u,NAME$u),_defineProperty(_CNameMapping$u,"TVSquared",NAME$u),_defineProperty(_CNameMapping$u,"tvsquared",NAME$u),_defineProperty(_CNameMapping$u,"tvSquared",NAME$u),_defineProperty(_CNameMapping$u,"TvSquared",NAME$u),_defineProperty(_CNameMapping$u,"Tvsquared",NAME$u),_defineProperty(_CNameMapping$u,'TV Squared',NAME$u),_defineProperty(_CNameMapping$u,'tv squared',NAME$u),_defineProperty(_CNameMapping$u,'tv Squared',NAME$u),_CNameMapping$u);
|
1323
|
+
|
1324
|
+
var _CNameMapping$t;var DIR_NAME$t='VWO';var NAME$t='VWO';var DISPLAY_NAME$t='VWO';var DISPLAY_NAME_TO_DIR_NAME_MAP$t=_defineProperty({},DISPLAY_NAME$t,DIR_NAME$t);(_CNameMapping$t={},_defineProperty(_CNameMapping$t,NAME$t,NAME$t),_defineProperty(_CNameMapping$t,"VisualWebsiteOptimizer",NAME$t),_defineProperty(_CNameMapping$t,"Visualwebsiteoptimizer",NAME$t),_defineProperty(_CNameMapping$t,"visualwebsiteoptimizer",NAME$t),_defineProperty(_CNameMapping$t,"vwo",NAME$t),_defineProperty(_CNameMapping$t,'Visual Website Optimizer',NAME$t),_defineProperty(_CNameMapping$t,'Visual website optimizer',NAME$t),_defineProperty(_CNameMapping$t,'visual website optimizer',NAME$t),_CNameMapping$t);
|
1325
|
+
|
1326
|
+
var _CNameMapping$s;var DIR_NAME$s='GA360';var NAME$s='GA360';var DISPLAY_NAME$s='Google Analytics 360';var DISPLAY_NAME_TO_DIR_NAME_MAP$s=_defineProperty({},DISPLAY_NAME$s,DIR_NAME$s);(_CNameMapping$s={},_defineProperty(_CNameMapping$s,NAME$s,NAME$s),_defineProperty(_CNameMapping$s,'Google Analytics 360',NAME$s),_defineProperty(_CNameMapping$s,'Google analytics 360',NAME$s),_defineProperty(_CNameMapping$s,'google analytics 360',NAME$s),_defineProperty(_CNameMapping$s,'Google Analytics360',NAME$s),_defineProperty(_CNameMapping$s,'Google analytics360',NAME$s),_defineProperty(_CNameMapping$s,'google analytics360',NAME$s),_defineProperty(_CNameMapping$s,"GoogleAnalytics360",NAME$s),_defineProperty(_CNameMapping$s,'GA 360',NAME$s),_CNameMapping$s);
|
1327
|
+
|
1328
|
+
var _CNameMapping$r;var DIR_NAME$r='Adroll';var NAME$r='ADROLL';var DISPLAY_NAME$r='Adroll';var DISPLAY_NAME_TO_DIR_NAME_MAP$r=_defineProperty({},DISPLAY_NAME$r,DIR_NAME$r);(_CNameMapping$r={},_defineProperty(_CNameMapping$r,NAME$r,NAME$r),_defineProperty(_CNameMapping$r,"Adroll",NAME$r),_defineProperty(_CNameMapping$r,'Ad roll',NAME$r),_defineProperty(_CNameMapping$r,'ad roll',NAME$r),_defineProperty(_CNameMapping$r,"adroll",NAME$r),_CNameMapping$r);
|
1329
|
+
|
1330
|
+
var _CNameMapping$q;var DIR_NAME$q='DCMFloodlight';var NAME$q='DCM_FLOODLIGHT';var DISPLAY_NAME$q='DCM Floodlight';var DISPLAY_NAME_TO_DIR_NAME_MAP$q=_defineProperty({},DISPLAY_NAME$q,DIR_NAME$q);(_CNameMapping$q={},_defineProperty(_CNameMapping$q,NAME$q,NAME$q),_defineProperty(_CNameMapping$q,'DCM Floodlight',NAME$q),_defineProperty(_CNameMapping$q,'dcm floodlight',NAME$q),_defineProperty(_CNameMapping$q,'Dcm Floodlight',NAME$q),_defineProperty(_CNameMapping$q,"DCMFloodlight",NAME$q),_defineProperty(_CNameMapping$q,"dcmfloodlight",NAME$q),_defineProperty(_CNameMapping$q,"DcmFloodlight",NAME$q),_defineProperty(_CNameMapping$q,"dcm_floodlight",NAME$q),_defineProperty(_CNameMapping$q,"DCM_Floodlight",NAME$q),_CNameMapping$q);
|
1331
|
+
|
1332
|
+
var _CNameMapping$p;var DIR_NAME$p='Matomo';var NAME$p='MATOMO';var DISPLAY_NAME$p='Matomo';var DISPLAY_NAME_TO_DIR_NAME_MAP$p=_defineProperty({},DISPLAY_NAME$p,DIR_NAME$p);(_CNameMapping$p={},_defineProperty(_CNameMapping$p,NAME$p,NAME$p),_defineProperty(_CNameMapping$p,"Matomo",NAME$p),_defineProperty(_CNameMapping$p,"matomo",NAME$p),_CNameMapping$p);
|
1333
|
+
|
1334
|
+
var _CNameMapping$o;var DIR_NAME$o='Vero';var NAME$o='VERO';var DISPLAY_NAME$o='Vero';var DISPLAY_NAME_TO_DIR_NAME_MAP$o=_defineProperty({},DISPLAY_NAME$o,DIR_NAME$o);(_CNameMapping$o={},_defineProperty(_CNameMapping$o,NAME$o,NAME$o),_defineProperty(_CNameMapping$o,"Vero",NAME$o),_defineProperty(_CNameMapping$o,"vero",NAME$o),_CNameMapping$o);
|
1335
|
+
|
1336
|
+
var _CNameMapping$n;var DIR_NAME$n='Mouseflow';var NAME$n='MOUSEFLOW';var DISPLAY_NAME$n='Mouseflow';var DISPLAY_NAME_TO_DIR_NAME_MAP$n=_defineProperty({},DISPLAY_NAME$n,DIR_NAME$n);(_CNameMapping$n={},_defineProperty(_CNameMapping$n,NAME$n,NAME$n),_defineProperty(_CNameMapping$n,"Mouseflow",NAME$n),_defineProperty(_CNameMapping$n,"mouseflow",NAME$n),_defineProperty(_CNameMapping$n,"mouseFlow",NAME$n),_defineProperty(_CNameMapping$n,"MouseFlow",NAME$n),_defineProperty(_CNameMapping$n,'Mouse flow',NAME$n),_defineProperty(_CNameMapping$n,'mouse flow',NAME$n),_defineProperty(_CNameMapping$n,'mouse Flow',NAME$n),_defineProperty(_CNameMapping$n,'Mouse Flow',NAME$n),_CNameMapping$n);
|
1337
|
+
|
1338
|
+
var _CNameMapping$m;var DIR_NAME$m='Rockerbox';var NAME$m='ROCKERBOX';var DISPLAY_NAME$m='Rockerbox';var DISPLAY_NAME_TO_DIR_NAME_MAP$m=_defineProperty({},DISPLAY_NAME$m,DIR_NAME$m);(_CNameMapping$m={},_defineProperty(_CNameMapping$m,NAME$m,NAME$m),_defineProperty(_CNameMapping$m,"Rockerbox",NAME$m),_defineProperty(_CNameMapping$m,"rockerbox",NAME$m),_defineProperty(_CNameMapping$m,"RockerBox",NAME$m),_defineProperty(_CNameMapping$m,'Rocker box',NAME$m),_defineProperty(_CNameMapping$m,'rocker box',NAME$m),_defineProperty(_CNameMapping$m,'Rocker Box',NAME$m),_CNameMapping$m);
|
1339
|
+
|
1340
|
+
var _CNameMapping$l;var DIR_NAME$l='ConvertFlow';var NAME$l='CONVERTFLOW';var DISPLAY_NAME$l='ConvertFlow';var DISPLAY_NAME_TO_DIR_NAME_MAP$l=_defineProperty({},DISPLAY_NAME$l,DIR_NAME$l);(_CNameMapping$l={},_defineProperty(_CNameMapping$l,NAME$l,NAME$l),_defineProperty(_CNameMapping$l,"Convertflow",NAME$l),_defineProperty(_CNameMapping$l,"convertflow",NAME$l),_defineProperty(_CNameMapping$l,"convertFlow",NAME$l),_defineProperty(_CNameMapping$l,"ConvertFlow",NAME$l),_defineProperty(_CNameMapping$l,'Convert flow',NAME$l),_defineProperty(_CNameMapping$l,'convert flow',NAME$l),_defineProperty(_CNameMapping$l,'convert Flow',NAME$l),_defineProperty(_CNameMapping$l,'Convert Flow',NAME$l),_defineProperty(_CNameMapping$l,'CONVERT FLOW',NAME$l),_CNameMapping$l);
|
1341
|
+
|
1342
|
+
var _CNameMapping$k;var DIR_NAME$k='SnapEngage';var NAME$k='SNAPENGAGE';var DISPLAY_NAME$k='SnapEngage';var DISPLAY_NAME_TO_DIR_NAME_MAP$k=_defineProperty({},DISPLAY_NAME$k,DIR_NAME$k);(_CNameMapping$k={},_defineProperty(_CNameMapping$k,NAME$k,NAME$k),_defineProperty(_CNameMapping$k,"SnapEngage",NAME$k),_defineProperty(_CNameMapping$k,"Snap_Engage",NAME$k),_defineProperty(_CNameMapping$k,"snapengage",NAME$k),_defineProperty(_CNameMapping$k,'SNAP ENGAGE',NAME$k),_defineProperty(_CNameMapping$k,'Snap Engage',NAME$k),_defineProperty(_CNameMapping$k,'snap engage',NAME$k),_CNameMapping$k);
|
1343
|
+
|
1344
|
+
var _CNameMapping$j;var DIR_NAME$j='LiveChat';var NAME$j='LIVECHAT';var DISPLAY_NAME$j='LiveChat';var DISPLAY_NAME_TO_DIR_NAME_MAP$j=_defineProperty({},DISPLAY_NAME$j,DIR_NAME$j);(_CNameMapping$j={},_defineProperty(_CNameMapping$j,NAME$j,NAME$j),_defineProperty(_CNameMapping$j,"LiveChat",NAME$j),_defineProperty(_CNameMapping$j,"Live_Chat",NAME$j),_defineProperty(_CNameMapping$j,"livechat",NAME$j),_defineProperty(_CNameMapping$j,'LIVE CHAT',NAME$j),_defineProperty(_CNameMapping$j,'Live Chat',NAME$j),_defineProperty(_CNameMapping$j,'live chat',NAME$j),_CNameMapping$j);
|
1345
|
+
|
1346
|
+
var _CNameMapping$i;var DIR_NAME$i='Shynet';var NAME$i='SHYNET';var DISPLAY_NAME$i='Shynet';var DISPLAY_NAME_TO_DIR_NAME_MAP$i=_defineProperty({},DISPLAY_NAME$i,DIR_NAME$i);(_CNameMapping$i={},_defineProperty(_CNameMapping$i,NAME$i,NAME$i),_defineProperty(_CNameMapping$i,"shynet",NAME$i),_defineProperty(_CNameMapping$i,"ShyNet",NAME$i),_defineProperty(_CNameMapping$i,"shyNet",NAME$i),_defineProperty(_CNameMapping$i,"Shynet",NAME$i),_defineProperty(_CNameMapping$i,'shy net',NAME$i),_defineProperty(_CNameMapping$i,'Shy Net',NAME$i),_defineProperty(_CNameMapping$i,'shy Net',NAME$i),_defineProperty(_CNameMapping$i,'Shy net',NAME$i),_CNameMapping$i);
|
1347
|
+
|
1348
|
+
var _CNameMapping$h;var DIR_NAME$h='Woopra';var NAME$h='WOOPRA';var DISPLAY_NAME$h='Woopra';var DISPLAY_NAME_TO_DIR_NAME_MAP$h=_defineProperty({},DISPLAY_NAME$h,DIR_NAME$h);(_CNameMapping$h={},_defineProperty(_CNameMapping$h,NAME$h,NAME$h),_defineProperty(_CNameMapping$h,"Woopra",NAME$h),_defineProperty(_CNameMapping$h,"woopra",NAME$h),_CNameMapping$h);
|
1349
|
+
|
1350
|
+
var _CNameMapping$g;var DIR_NAME$g='RollBar';var NAME$g='ROLLBAR';var DISPLAY_NAME$g='RollBar';var DISPLAY_NAME_TO_DIR_NAME_MAP$g=_defineProperty({},DISPLAY_NAME$g,DIR_NAME$g);(_CNameMapping$g={},_defineProperty(_CNameMapping$g,NAME$g,NAME$g),_defineProperty(_CNameMapping$g,"RollBar",NAME$g),_defineProperty(_CNameMapping$g,"Roll_Bar",NAME$g),_defineProperty(_CNameMapping$g,"rollbar",NAME$g),_defineProperty(_CNameMapping$g,"Rollbar",NAME$g),_defineProperty(_CNameMapping$g,'ROLL BAR',NAME$g),_defineProperty(_CNameMapping$g,'Roll Bar',NAME$g),_defineProperty(_CNameMapping$g,'roll bar',NAME$g),_CNameMapping$g);
|
1351
|
+
|
1352
|
+
var _CNameMapping$f;var DIR_NAME$f='QuoraPixel';var NAME$f='QUORA_PIXEL';var DISPLAY_NAME$f='Quora Pixel';var DISPLAY_NAME_TO_DIR_NAME_MAP$f=_defineProperty({},DISPLAY_NAME$f,DIR_NAME$f);(_CNameMapping$f={},_defineProperty(_CNameMapping$f,NAME$f,NAME$f),_defineProperty(_CNameMapping$f,'Quora Pixel',NAME$f),_defineProperty(_CNameMapping$f,'Quora pixel',NAME$f),_defineProperty(_CNameMapping$f,'QUORA PIXEL',NAME$f),_defineProperty(_CNameMapping$f,"QuoraPixel",NAME$f),_defineProperty(_CNameMapping$f,"Quorapixel",NAME$f),_defineProperty(_CNameMapping$f,"QUORAPIXEL",NAME$f),_defineProperty(_CNameMapping$f,"Quora_Pixel",NAME$f),_defineProperty(_CNameMapping$f,"quora_pixel",NAME$f),_defineProperty(_CNameMapping$f,"Quora",NAME$f),_CNameMapping$f);
|
1353
|
+
|
1354
|
+
var _CNameMapping$e;var DIR_NAME$e='June';var NAME$e='JUNE';var DISPLAY_NAME$e='June';var DISPLAY_NAME_TO_DIR_NAME_MAP$e=_defineProperty({},DISPLAY_NAME$e,DIR_NAME$e);(_CNameMapping$e={},_defineProperty(_CNameMapping$e,NAME$e,NAME$e),_defineProperty(_CNameMapping$e,"June",NAME$e),_defineProperty(_CNameMapping$e,"june",NAME$e),_CNameMapping$e);
|
1355
|
+
|
1356
|
+
var _CNameMapping$d;var DIR_NAME$d='Engage';var NAME$d='ENGAGE';var DISPLAY_NAME$d='Engage';var DISPLAY_NAME_TO_DIR_NAME_MAP$d=_defineProperty({},DISPLAY_NAME$d,DIR_NAME$d);(_CNameMapping$d={},_defineProperty(_CNameMapping$d,NAME$d,NAME$d),_defineProperty(_CNameMapping$d,"Engage",NAME$d),_defineProperty(_CNameMapping$d,"engage",NAME$d),_CNameMapping$d);
|
1357
|
+
|
1358
|
+
var _CNameMapping$c;var DIR_NAME$c='Iterable';var NAME$c='ITERABLE';var DISPLAY_NAME$c='Iterable';var DISPLAY_NAME_TO_DIR_NAME_MAP$c=_defineProperty({},DISPLAY_NAME$c,DIR_NAME$c);(_CNameMapping$c={},_defineProperty(_CNameMapping$c,NAME$c,NAME$c),_defineProperty(_CNameMapping$c,"Iterable",NAME$c),_defineProperty(_CNameMapping$c,"iterable",NAME$c),_CNameMapping$c);
|
1359
|
+
|
1360
|
+
var _CNameMapping$b;var DIR_NAME$b='YandexMetrica';var NAME$b='YANDEX_METRICA';var DISPLAY_NAME$b='Yandex.Metrica';var DISPLAY_NAME_TO_DIR_NAME_MAP$b=_defineProperty({},DISPLAY_NAME$b,DIR_NAME$b);(_CNameMapping$b={},_defineProperty(_CNameMapping$b,NAME$b,NAME$b),_defineProperty(_CNameMapping$b,"Yandexmetrica",NAME$b),_defineProperty(_CNameMapping$b,"yandexmetrica",NAME$b),_defineProperty(_CNameMapping$b,"yandexMetrica",NAME$b),_defineProperty(_CNameMapping$b,"YandexMetrica",NAME$b),_CNameMapping$b);
|
1361
|
+
|
1362
|
+
var _CNameMapping$a;var DIR_NAME$a='Refiner';var NAME$a='REFINER';var DISPLAY_NAME$a='Refiner';var DISPLAY_NAME_TO_DIR_NAME_MAP$a=_defineProperty({},DISPLAY_NAME$a,DIR_NAME$a);(_CNameMapping$a={},_defineProperty(_CNameMapping$a,NAME$a,NAME$a),_defineProperty(_CNameMapping$a,"Refiner",NAME$a),_defineProperty(_CNameMapping$a,"refiner",NAME$a),_CNameMapping$a);
|
1363
|
+
|
1364
|
+
var _CNameMapping$9;var DIR_NAME$9='Qualaroo';var NAME$9='QUALAROO';var DISPLAY_NAME$9='Qualaroo';var DISPLAY_NAME_TO_DIR_NAME_MAP$9=_defineProperty({},DISPLAY_NAME$9,DIR_NAME$9);(_CNameMapping$9={},_defineProperty(_CNameMapping$9,NAME$9,NAME$9),_defineProperty(_CNameMapping$9,"Qualaroo",NAME$9),_defineProperty(_CNameMapping$9,"qualaroo",NAME$9),_CNameMapping$9);
|
1365
|
+
|
1366
|
+
var _CNameMapping$8;var DIR_NAME$8='Podsights';var NAME$8='PODSIGHTS';var DISPLAY_NAME$8='Podsights';var DISPLAY_NAME_TO_DIR_NAME_MAP$8=_defineProperty({},DISPLAY_NAME$8,DIR_NAME$8);(_CNameMapping$8={},_defineProperty(_CNameMapping$8,NAME$8,NAME$8),_defineProperty(_CNameMapping$8,"Podsights",NAME$8),_defineProperty(_CNameMapping$8,"PodSights",NAME$8),_defineProperty(_CNameMapping$8,'pod Sights',NAME$8),_defineProperty(_CNameMapping$8,'Pod Sights',NAME$8),_defineProperty(_CNameMapping$8,'pod sights',NAME$8),_defineProperty(_CNameMapping$8,'POD SIGHTS',NAME$8),_defineProperty(_CNameMapping$8,'Pod sights',NAME$8),_CNameMapping$8);// default mapping for the events
|
1367
|
+
|
1368
|
+
var _CNameMapping$7;var DIR_NAME$7='Axeptio';var NAME$7='AXEPTIO';var DISPLAY_NAME$7='Axeptio';var DISPLAY_NAME_TO_DIR_NAME_MAP$7=_defineProperty({},DISPLAY_NAME$7,DIR_NAME$7);(_CNameMapping$7={},_defineProperty(_CNameMapping$7,NAME$7,NAME$7),_defineProperty(_CNameMapping$7,"Axeptio",NAME$7),_defineProperty(_CNameMapping$7,"axeptio",NAME$7),_CNameMapping$7);
|
1369
|
+
|
1370
|
+
var _CNameMapping$6;var DIR_NAME$6='Satismeter';var NAME$6='SATISMETER';var DISPLAY_NAME$6='Satismeter';var DISPLAY_NAME_TO_DIR_NAME_MAP$6=_defineProperty({},DISPLAY_NAME$6,DIR_NAME$6);(_CNameMapping$6={},_defineProperty(_CNameMapping$6,NAME$6,NAME$6),_defineProperty(_CNameMapping$6,"Satismeter",NAME$6),_defineProperty(_CNameMapping$6,"SatisMeter",NAME$6),_CNameMapping$6);
|
1371
|
+
|
1372
|
+
var _CNameMapping$5;var DIR_NAME$5='MicrosoftClarity';var NAME$5='MICROSOFT_CLARITY';var DISPLAY_NAME$5='Microsoft Clarity';var DISPLAY_NAME_TO_DIR_NAME_MAP$5=_defineProperty({},DISPLAY_NAME$5,DIR_NAME$5);(_CNameMapping$5={},_defineProperty(_CNameMapping$5,NAME$5,NAME$5),_defineProperty(_CNameMapping$5,'Microsoft Clarity',NAME$5),_defineProperty(_CNameMapping$5,'Microsoft clarity',NAME$5),_defineProperty(_CNameMapping$5,'microsoft clarity',NAME$5),_defineProperty(_CNameMapping$5,"Microsoft_clarity",NAME$5),_defineProperty(_CNameMapping$5,"MicrosoftClarity",NAME$5),_defineProperty(_CNameMapping$5,"MICROSOFTCLARITY",NAME$5),_defineProperty(_CNameMapping$5,"microsoftclarity",NAME$5),_defineProperty(_CNameMapping$5,"microsoftClarity",NAME$5),_CNameMapping$5);
|
1373
|
+
|
1374
|
+
var _CNameMapping$4;var DIR_NAME$4='Sendinblue';var NAME$4='SENDINBLUE';var DISPLAY_NAME$4='Sendinblue';var DISPLAY_NAME_TO_DIR_NAME_MAP$4=_defineProperty({},DISPLAY_NAME$4,DIR_NAME$4);(_CNameMapping$4={},_defineProperty(_CNameMapping$4,NAME$4,NAME$4),_defineProperty(_CNameMapping$4,"Sendinblue",NAME$4),_defineProperty(_CNameMapping$4,"sendinblue",NAME$4),_defineProperty(_CNameMapping$4,"SendinBlue",NAME$4),_CNameMapping$4);
|
1375
|
+
|
1376
|
+
var _CNameMapping$3;var DIR_NAME$3='Olark';var NAME$3='OLARK';var DISPLAY_NAME$3='Olark';var DISPLAY_NAME_TO_DIR_NAME_MAP$3=_defineProperty({},DISPLAY_NAME$3,DIR_NAME$3);(_CNameMapping$3={},_defineProperty(_CNameMapping$3,NAME$3,NAME$3),_defineProperty(_CNameMapping$3,"Olark",NAME$3),_defineProperty(_CNameMapping$3,"olark",NAME$3),_CNameMapping$3);
|
1377
|
+
|
1378
|
+
var _CNameMapping$2;var DIR_NAME$2='Lemnisk';var NAME$2='LEMNISK';var DISPLAY_NAME$2='Lemnisk';var DISPLAY_NAME_TO_DIR_NAME_MAP$2=_defineProperty({},DISPLAY_NAME$2,DIR_NAME$2);(_CNameMapping$2={},_defineProperty(_CNameMapping$2,NAME$2,NAME$2),_defineProperty(_CNameMapping$2,"LEMNISK_MARKETING_AUTOMATION",NAME$2),_defineProperty(_CNameMapping$2,'Lemnisk Marketing Automation',NAME$2),_defineProperty(_CNameMapping$2,"LemniskMarketingAutomation",NAME$2),_defineProperty(_CNameMapping$2,"lemniskmarketingautomation",NAME$2),_defineProperty(_CNameMapping$2,"lemniskMarketingAutomation",NAME$2),_defineProperty(_CNameMapping$2,"lemnisk",NAME$2),_defineProperty(_CNameMapping$2,"Lemnisk",NAME$2),_CNameMapping$2);
|
1379
|
+
|
1380
|
+
var _CNameMapping$1;var DIR_NAME$1='TiktokAds';var NAME$1='TIKTOK_ADS';var DISPLAY_NAME$1='TikTok Ads';var DISPLAY_NAME_TO_DIR_NAME_MAP$1=_defineProperty({},DISPLAY_NAME$1,DIR_NAME$1);(_CNameMapping$1={},_defineProperty(_CNameMapping$1,NAME$1,NAME$1),_defineProperty(_CNameMapping$1,"TiktokAds",NAME$1),_defineProperty(_CNameMapping$1,'Tiktok ads',NAME$1),_defineProperty(_CNameMapping$1,'Tiktok Ads',NAME$1),_defineProperty(_CNameMapping$1,'Tik Tok Ads',NAME$1),_defineProperty(_CNameMapping$1,'tik tok ads',NAME$1),_defineProperty(_CNameMapping$1,"tiktokads",NAME$1),_CNameMapping$1);
|
1381
|
+
|
1382
|
+
var _CNameMapping;var DIR_NAME='ActiveCampaign';var NAME='ACTIVE_CAMPAIGN';var DISPLAY_NAME='Active Campaign';var DISPLAY_NAME_TO_DIR_NAME_MAP=_defineProperty({},DISPLAY_NAME,DIR_NAME);(_CNameMapping={ActiveCampaign:NAME,'Active Campaign':NAME,'ACTIVE CAMPAIGN':NAME},_defineProperty(_CNameMapping,NAME,NAME),_defineProperty(_CNameMapping,"activecampaign",NAME),_defineProperty(_CNameMapping,'active campaign',NAME),_defineProperty(_CNameMapping,'Active campaign',NAME),_defineProperty(_CNameMapping,'active Campaign',NAME),_defineProperty(_CNameMapping,"active_campaign",NAME),_CNameMapping);
|
1383
|
+
|
1384
|
+
var destDisplayNamesToFileNamesMap=_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({},DISPLAY_NAME_TO_DIR_NAME_MAP$Q),DISPLAY_NAME_TO_DIR_NAME_MAP$X),DISPLAY_NAME_TO_DIR_NAME_MAP$R),DISPLAY_NAME_TO_DIR_NAME_MAP$V),DISPLAY_NAME_TO_DIR_NAME_MAP$t),DISPLAY_NAME_TO_DIR_NAME_MAP$T),DISPLAY_NAME_TO_DIR_NAME_MAP$15),DISPLAY_NAME_TO_DIR_NAME_MAP$P),DISPLAY_NAME_TO_DIR_NAME_MAP$O),DISPLAY_NAME_TO_DIR_NAME_MAP$N),DISPLAY_NAME_TO_DIR_NAME_MAP$$),DISPLAY_NAME_TO_DIR_NAME_MAP$13),DISPLAY_NAME_TO_DIR_NAME_MAP$11),DISPLAY_NAME_TO_DIR_NAME_MAP$Z),DISPLAY_NAME_TO_DIR_NAME_MAP$J),DISPLAY_NAME_TO_DIR_NAME_MAP$F),DISPLAY_NAME_TO_DIR_NAME_MAP$14),DISPLAY_NAME_TO_DIR_NAME_MAP$Y),DISPLAY_NAME_TO_DIR_NAME_MAP$u),DISPLAY_NAME_TO_DIR_NAME_MAP$W),DISPLAY_NAME_TO_DIR_NAME_MAP$G),DISPLAY_NAME_TO_DIR_NAME_MAP$18),DISPLAY_NAME_TO_DIR_NAME_MAP$E),DISPLAY_NAME_TO_DIR_NAME_MAP$I),DISPLAY_NAME_TO_DIR_NAME_MAP$17),DISPLAY_NAME_TO_DIR_NAME_MAP$B),DISPLAY_NAME_TO_DIR_NAME_MAP$M),DISPLAY_NAME_TO_DIR_NAME_MAP$12),DISPLAY_NAME_TO_DIR_NAME_MAP$16),DISPLAY_NAME_TO_DIR_NAME_MAP$D),DISPLAY_NAME_TO_DIR_NAME_MAP$19),DISPLAY_NAME_TO_DIR_NAME_MAP$K),DISPLAY_NAME_TO_DIR_NAME_MAP$x),DISPLAY_NAME_TO_DIR_NAME_MAP$_),DISPLAY_NAME_TO_DIR_NAME_MAP$S),DISPLAY_NAME_TO_DIR_NAME_MAP$10),DISPLAY_NAME_TO_DIR_NAME_MAP$H),DISPLAY_NAME_TO_DIR_NAME_MAP$z),DISPLAY_NAME_TO_DIR_NAME_MAP$A),DISPLAY_NAME_TO_DIR_NAME_MAP$w),DISPLAY_NAME_TO_DIR_NAME_MAP$y),DISPLAY_NAME_TO_DIR_NAME_MAP$v),DISPLAY_NAME_TO_DIR_NAME_MAP$C),DISPLAY_NAME_TO_DIR_NAME_MAP$U),DISPLAY_NAME_TO_DIR_NAME_MAP$L),DISPLAY_NAME_TO_DIR_NAME_MAP$s),DISPLAY_NAME_TO_DIR_NAME_MAP$r),DISPLAY_NAME_TO_DIR_NAME_MAP$q),DISPLAY_NAME_TO_DIR_NAME_MAP$p),DISPLAY_NAME_TO_DIR_NAME_MAP$o),DISPLAY_NAME_TO_DIR_NAME_MAP$n),DISPLAY_NAME_TO_DIR_NAME_MAP$m),DISPLAY_NAME_TO_DIR_NAME_MAP$l),DISPLAY_NAME_TO_DIR_NAME_MAP$k),DISPLAY_NAME_TO_DIR_NAME_MAP$j),DISPLAY_NAME_TO_DIR_NAME_MAP$i),DISPLAY_NAME_TO_DIR_NAME_MAP$h),DISPLAY_NAME_TO_DIR_NAME_MAP$g),DISPLAY_NAME_TO_DIR_NAME_MAP$f),DISPLAY_NAME_TO_DIR_NAME_MAP$e),DISPLAY_NAME_TO_DIR_NAME_MAP$d),DISPLAY_NAME_TO_DIR_NAME_MAP$c),DISPLAY_NAME_TO_DIR_NAME_MAP$b),DISPLAY_NAME_TO_DIR_NAME_MAP$a),DISPLAY_NAME_TO_DIR_NAME_MAP$9),DISPLAY_NAME_TO_DIR_NAME_MAP$8),DISPLAY_NAME_TO_DIR_NAME_MAP$7),DISPLAY_NAME_TO_DIR_NAME_MAP$6),DISPLAY_NAME_TO_DIR_NAME_MAP$5),DISPLAY_NAME_TO_DIR_NAME_MAP$4),DISPLAY_NAME_TO_DIR_NAME_MAP$3),DISPLAY_NAME_TO_DIR_NAME_MAP$2),DISPLAY_NAME_TO_DIR_NAME_MAP$1),DISPLAY_NAME_TO_DIR_NAME_MAP);
|
1385
|
+
|
1386
|
+
var DEFAULT_INTEGRATIONS_CONFIG={All:true};
|
1387
|
+
|
1545
1388
|
var READY_CHECK_TIMEOUT_MS=11*1000;// 11 seconds
|
1546
1389
|
var SCRIPT_LOAD_TIMEOUT_MS=10*1000;// 10 seconds
|
1547
1390
|
var DEVICE_MODE_DESTINATIONS_PLUGIN='DeviceModeDestinationsPlugin';
|
1548
1391
|
|
1549
|
-
var isDestIntgConfigTruthy=function isDestIntgConfigTruthy(destIntgConfig){return !isUndefined(destIntgConfig)&&Boolean(destIntgConfig)===true;};var isDestIntgConfigFalsy=function isDestIntgConfigFalsy(destIntgConfig){return !isUndefined(destIntgConfig)&&Boolean(destIntgConfig)===false;};
|
1550
|
-
|
1551
1392
|
/**
|
1552
1393
|
* Determines if the destination SDK code is evaluated
|
1553
1394
|
* @param destSDKIdentifier The name of the global globalThis object that contains the destination SDK
|
@@ -1555,23 +1396,25 @@ var isDestIntgConfigTruthy=function isDestIntgConfigTruthy(destIntgConfig){retur
|
|
1555
1396
|
* @param logger Logger instance
|
1556
1397
|
* @returns true if the destination SDK code is evaluated, false otherwise
|
1557
1398
|
*/var isDestinationSDKMounted=function isDestinationSDKMounted(destSDKIdentifier,sdkTypeName,logger){return Boolean(globalThis[destSDKIdentifier]&&globalThis[destSDKIdentifier][sdkTypeName]&&globalThis[destSDKIdentifier][sdkTypeName].prototype&&typeof globalThis[destSDKIdentifier][sdkTypeName].prototype.constructor!=='undefined');};var createDestinationInstance=function createDestinationInstance(destSDKIdentifier,sdkTypeName,dest,state){var rAnalytics=globalThis.rudderanalytics;var analytics=rAnalytics.getAnalyticsInstance(state.lifecycle.writeKey.value);return new globalThis[destSDKIdentifier][sdkTypeName](clone$1(dest.config),{loadIntegration:state.nativeDestinations.loadIntegration.value,logLevel:state.lifecycle.logLevel.value,loadOnlyIntegrations:state.nativeDestinations.loadOnlyIntegrations.value,page:function page(category,name,properties,options,callback){return analytics.page(pageArgumentsToCallOptions(category,name,properties,options,callback));},track:function track(event,properties,options,callback){return analytics.track(trackArgumentsToCallOptions(event,properties,options,callback));},identify:function identify(userId,traits,options,callback){return analytics.identify(identifyArgumentsToCallOptions(userId,traits,options,callback));},alias:function alias(to,from,options,callback){return analytics.alias(aliasArgumentsToCallOptions(to,from,options,callback));},group:function group(groupId,traits,options,callback){return analytics.group(groupArgumentsToCallOptions(groupId,traits,options,callback));},getAnonymousId:function getAnonymousId(){return analytics.getAnonymousId();},getUserId:function getUserId(){return analytics.getUserId();},getUserTraits:function getUserTraits(){return analytics.getUserTraits();},getGroupId:function getGroupId(){return analytics.getGroupId();},getGroupTraits:function getGroupTraits(){return analytics.getGroupTraits();},getSessionId:function getSessionId(){return analytics.getSessionId();}},{shouldApplyDeviceModeTransformation:dest.shouldApplyDeviceModeTransformation,propagateEventsUntransformedOnError:dest.propagateEventsUntransformedOnError,destinationId:dest.id});};var isDestinationReady=function isDestinationReady(dest){return new Promise(function(resolve,reject){var instance=dest.instance;var handleNumber;var checkReady=function checkReady(){if(instance.isLoaded()&&(!instance.isReady||instance.isReady())){resolve(true);}else {handleNumber=globalThis.requestAnimationFrame(checkReady);}};checkReady();setTimeout(function(){globalThis.cancelAnimationFrame(handleNumber);reject(new Error(DESTINATION_READY_TIMEOUT_ERROR(READY_CHECK_TIMEOUT_MS,dest.userFriendlyId)));},READY_CHECK_TIMEOUT_MS);});};/**
|
1558
|
-
* Filters the destinations that should not be loaded or forwarded events to based on the integration options (load or events API)
|
1559
|
-
* @param intgOpts Integration options object
|
1560
|
-
* @param destinations Destinations array
|
1561
|
-
* @returns Destinations array filtered based on the integration options
|
1562
|
-
*/var filterDestinations=function filterDestinations(intgOpts,destinations){var allOptVal=intgOpts.All;return destinations.filter(function(dest){var destDisplayName=dest.displayName;var isDestEnabled;if(allOptVal){isDestEnabled=true;if(isDestIntgConfigFalsy(intgOpts[destDisplayName])){isDestEnabled=false;}}else {isDestEnabled=false;if(isDestIntgConfigTruthy(intgOpts[destDisplayName])){isDestEnabled=true;}}return isDestEnabled;});};/**
|
1563
1399
|
* Extracts the integration config, if any, from the given destination
|
1564
1400
|
* and merges it with the current integrations config
|
1565
1401
|
* @param dest Destination object
|
1566
1402
|
* @param curDestIntgConfig Current destinations integration config
|
1567
1403
|
* @param logger Logger object
|
1568
1404
|
* @returns Combined destinations integrations config
|
1569
|
-
*/var getCumulativeIntegrationsConfig=function getCumulativeIntegrationsConfig(dest,curDestIntgConfig,errorHandler){var _dest$instance;var integrationsConfig=curDestIntgConfig;if(isFunction((_dest$instance=dest.instance)===null||_dest$instance===void 0?void 0:_dest$instance.getDataForIntegrationsObject)){try{var _dest$instance2;integrationsConfig=mergeDeepRight(curDestIntgConfig,
|
1405
|
+
*/var getCumulativeIntegrationsConfig=function getCumulativeIntegrationsConfig(dest,curDestIntgConfig,errorHandler){var _dest$instance;var integrationsConfig=curDestIntgConfig;if(isFunction((_dest$instance=dest.instance)===null||_dest$instance===void 0?void 0:_dest$instance.getDataForIntegrationsObject)){try{var _dest$instance2;integrationsConfig=mergeDeepRight(curDestIntgConfig,(_dest$instance2=dest.instance)===null||_dest$instance2===void 0?void 0:_dest$instance2.getDataForIntegrationsObject());}catch(err){errorHandler===null||errorHandler===void 0||errorHandler.onError(err,DEVICE_MODE_DESTINATIONS_PLUGIN,DESTINATION_INTEGRATIONS_DATA_ERROR(dest.userFriendlyId));}}return integrationsConfig;};var initializeDestination=function initializeDestination(dest,state,destSDKIdentifier,sdkTypeName,errorHandler,logger){try{var initializedDestination=clone$1(dest);var destInstance=createDestinationInstance(destSDKIdentifier,sdkTypeName,dest,state);initializedDestination.instance=destInstance;destInstance.init();isDestinationReady(initializedDestination).then(function(){// Collect the integrations data for the hybrid mode destinations
|
1570
1406
|
if(isHybridModeDestination(initializedDestination)){state.nativeDestinations.integrationsConfig.value=getCumulativeIntegrationsConfig(initializedDestination,state.nativeDestinations.integrationsConfig.value,errorHandler);}state.nativeDestinations.initializedDestinations.value=[].concat(_toConsumableArray(state.nativeDestinations.initializedDestinations.value),[initializedDestination]);}).catch(function(err){state.nativeDestinations.failedDestinations.value=[].concat(_toConsumableArray(state.nativeDestinations.failedDestinations.value),[dest]);// The error message is already formatted in the isDestinationReady function
|
1571
1407
|
logger===null||logger===void 0||logger.error(err);});}catch(err){state.nativeDestinations.failedDestinations.value=[].concat(_toConsumableArray(state.nativeDestinations.failedDestinations.value),[dest]);errorHandler===null||errorHandler===void 0||errorHandler.onError(err,DEVICE_MODE_DESTINATIONS_PLUGIN,DESTINATION_INIT_ERROR(dest.userFriendlyId));}};
|
1572
1408
|
|
1573
|
-
var
|
1574
|
-
|
1409
|
+
var isDestIntgConfigTruthy=function isDestIntgConfigTruthy(destIntgConfig){return !isUndefined(destIntgConfig)&&Boolean(destIntgConfig)===true;};var isDestIntgConfigFalsy=function isDestIntgConfigFalsy(destIntgConfig){return !isUndefined(destIntgConfig)&&Boolean(destIntgConfig)===false;};/**
|
1410
|
+
* Filters the destinations that should not be loaded or forwarded events to based on the integration options (load or events API)
|
1411
|
+
* @param intgOpts Integration options object
|
1412
|
+
* @param destinations Destinations array
|
1413
|
+
* @returns Destinations array filtered based on the integration options
|
1414
|
+
*/var filterDestinations=function filterDestinations(intgOpts,destinations){var allOptVal=intgOpts.All;return destinations.filter(function(dest){var destDisplayName=dest.displayName;var isDestEnabled;if(allOptVal){isDestEnabled=true;if(isDestIntgConfigFalsy(intgOpts[destDisplayName])){isDestEnabled=false;}}else {isDestEnabled=false;if(isDestIntgConfigTruthy(intgOpts[destDisplayName])){isDestEnabled=true;}}return isDestEnabled;});};
|
1415
|
+
|
1416
|
+
var pluginName$b='DeviceModeDestinations';var DeviceModeDestinations=function DeviceModeDestinations(){return {name:pluginName$b,initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName$b]);},nativeDestinations:{setActiveDestinations:function setActiveDestinations(state,pluginsManager,errorHandler,logger){var _clone;// Normalize the integration options from the load API call
|
1417
|
+
state.nativeDestinations.loadOnlyIntegrations.value=(_clone=clone$1(state.loadOptions.value.integrations))!==null&&_clone!==void 0?_clone:DEFAULT_INTEGRATIONS_CONFIG;state.nativeDestinations.loadIntegration.value=state.loadOptions.value.loadIntegration;// Filter destination that doesn't have mapping config-->Integration names
|
1575
1418
|
var configSupportedDestinations=state.nativeDestinations.configuredDestinations.value.filter(function(configDest){if(destDisplayNamesToFileNamesMap[configDest.displayName]){return true;}errorHandler===null||errorHandler===void 0||errorHandler.onError(new Error(DESTINATION_NOT_SUPPORTED_ERROR(configDest.userFriendlyId)),DEVICE_MODE_DESTINATIONS_PLUGIN);return false;});// Filter destinations that are disabled through load options
|
1576
1419
|
var destinationsToLoad=filterDestinations(state.nativeDestinations.loadOnlyIntegrations.value,configSupportedDestinations);var consentedDestinations=destinationsToLoad.filter(function(dest){var _pluginsManager$invok;return(// if consent manager is not configured, then default to load the destination
|
1577
1420
|
(_pluginsManager$invok=pluginsManager.invokeSingle("consentManager.isDestinationConsented",state,dest.config,errorHandler,logger))!==null&&_pluginsManager$invok!==void 0?_pluginsManager$invok:true);});state.nativeDestinations.activeDestinations.value=consentedDestinations;},load:function load(state,externalSrcLoader,errorHandler,logger,externalScriptOnLoad){var integrationsCDNPath=state.lifecycle.integrationsCDNPath.value;var activeDestinations=state.nativeDestinations.activeDestinations.value;activeDestinations.forEach(function(dest){var sdkName=destDisplayNamesToFileNamesMap[dest.displayName];var destSDKIdentifier="".concat(sdkName,"_RS");// this is the name of the object loaded on the window
|
@@ -1680,8 +1523,36 @@ return crc.toString(36);};/**
|
|
1680
1523
|
* @return {?Object<string, string>}
|
1681
1524
|
*/var parseLinker=function parseLinker(value){var linkerObj=parseLinkerParamValue(value);if(!linkerObj){return null;}var checksum=linkerObj.checksum,serializedIds=linkerObj.serializedIds;if(!isCheckSumValid(serializedIds,checksum)){return null;}return deserialize(serializedIds);};
|
1682
1525
|
|
1683
|
-
var pluginName$7='GoogleLinker'
|
1684
|
-
|
1526
|
+
var pluginName$7='GoogleLinker';var GoogleLinker=function GoogleLinker(){return {name:pluginName$7,initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName$7]);},userSession:{anonymousIdGoogleLinker:function anonymousIdGoogleLinker(rudderAmpLinkerParam){if(!rudderAmpLinkerParam){return null;}var parsedAnonymousIdObj=rudderAmpLinkerParam?parseLinker(rudderAmpLinkerParam):null;return parsedAnonymousIdObj?parsedAnonymousIdObj[AMP_LINKER_ANONYMOUS_ID_KEY]:null;}}};};
|
1527
|
+
|
1528
|
+
var KETCH_CONSENT_MANAGER_PLUGIN='KetchConsentManagerPlugin';var KETCH_CONSENT_COOKIE_NAME_V1='_ketch_consent_v1_';
|
1529
|
+
|
1530
|
+
/**
|
1531
|
+
* Gets the consent data from the Ketch's consent cookie
|
1532
|
+
* @param storeManager Store manager instance
|
1533
|
+
* @param logger Logger instance
|
1534
|
+
* @returns Consent data from the consent cookie
|
1535
|
+
*/var getKetchConsentData=function getKetchConsentData(storeManager,logger){var rawConsentCookieData=null;try{// Create a data store instance to read the consent cookie
|
1536
|
+
var dataStore=storeManager===null||storeManager===void 0?void 0:storeManager.setStore({id:KETCH_CONSENT_MANAGER_PLUGIN,name:KETCH_CONSENT_MANAGER_PLUGIN,type:COOKIE_STORAGE});rawConsentCookieData=dataStore===null||dataStore===void 0?void 0:dataStore.engine.getItem(KETCH_CONSENT_COOKIE_NAME_V1);}catch(err){logger===null||logger===void 0||logger.error(KETCH_CONSENT_COOKIE_READ_ERROR(KETCH_CONSENT_MANAGER_PLUGIN),err);return undefined;}if(isNullOrUndefined(rawConsentCookieData)){return undefined;}// Decode and parse the cookie data to JSON
|
1537
|
+
var consentCookieData;try{consentCookieData=JSON.parse(fromBase64(rawConsentCookieData));}catch(err){logger===null||logger===void 0||logger.error(KETCH_CONSENT_COOKIE_PARSE_ERROR(KETCH_CONSENT_MANAGER_PLUGIN),err);return undefined;}if(!consentCookieData){return undefined;}// Convert the cookie data to consent data
|
1538
|
+
var consentPurposes={};Object.entries(consentCookieData).forEach(function(pEntry){var purposeCode=pEntry[0];var purposeValue=pEntry[1];consentPurposes[purposeCode]=(purposeValue===null||purposeValue===void 0?void 0:purposeValue.status)==='granted';});return consentPurposes;};/**
|
1539
|
+
* Gets the consent data in the format expected by the application state
|
1540
|
+
* @param ketchConsentData Consent data derived from the consent cookie
|
1541
|
+
* @returns Consent data
|
1542
|
+
*/var getConsentData=function getConsentData(ketchConsentData){var allowedConsents=[];var deniedConsentIds=[];var initialized=false;if(ketchConsentData){Object.entries(ketchConsentData).forEach(function(e){var purposeCode=e[0];var isConsented=e[1];if(isConsented){allowedConsents.push(purposeCode);}else {deniedConsentIds.push(purposeCode);}});initialized=true;}return {initialized:initialized,allowedConsents:allowedConsents,deniedConsentIds:deniedConsentIds};};var updateConsentStateFromData=function updateConsentStateFromData(state,ketchConsentData){var consentData=getConsentData(ketchConsentData);state.consents.data.value=consentData;};
|
1543
|
+
|
1544
|
+
var pluginName$6='KetchConsentManager';var KetchConsentManager=function KetchConsentManager(){return {name:pluginName$6,deps:[],initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName$6]);},consentManager:{init:function init(state,storeManager,logger){// getKetchUserConsentedPurposes returns current ketch opted-in purposes
|
1545
|
+
// This will be helpful for debugging
|
1546
|
+
globalThis.getKetchUserConsentedPurposes=function(){var _state$consents$data$;return (_state$consents$data$=state.consents.data.value.allowedConsents)===null||_state$consents$data$===void 0?void 0:_state$consents$data$.slice();};// getKetchUserDeniedPurposes returns current ketch opted-out purposes
|
1547
|
+
// This will be helpful for debugging
|
1548
|
+
globalThis.getKetchUserDeniedPurposes=function(){var _state$consents$data$2;return (_state$consents$data$2=state.consents.data.value.deniedConsentIds)===null||_state$consents$data$2===void 0?void 0:_state$consents$data$2.slice();};// updateKetchConsent callback function to update current consent purpose state
|
1549
|
+
// this will be called from ketch rudderstack plugin
|
1550
|
+
globalThis.updateKetchConsent=function(ketchConsentData){updateConsentStateFromData(state,ketchConsentData);};// retrieve consent data and update the state
|
1551
|
+
var ketchConsentData;if(!isUndefined(globalThis.ketchConsent)){ketchConsentData=globalThis.ketchConsent;}else {ketchConsentData=getKetchConsentData(storeManager,logger);}updateConsentStateFromData(state,ketchConsentData);},isDestinationConsented:function isDestinationConsented(state,destConfig,errorHandler,logger){var consentData=state.consents.data.value;if(!consentData.initialized){return true;}var allowedConsents=consentData.allowedConsents;try{var ketchConsentPurposes=destConfig.ketchConsentPurposes;// If the destination do not have this mapping events will be sent.
|
1552
|
+
if(!ketchConsentPurposes||ketchConsentPurposes.length===0){return true;}var purposes=ketchConsentPurposes.map(function(p){return p.purpose;}).filter(function(n){return n;});// Check if any of the destination's mapped ketch purposes are consented by the user in the browser.
|
1553
|
+
var containsAnyOfConsent=purposes.some(function(element){return allowedConsents.includes(element.trim());});return containsAnyOfConsent;}catch(err){errorHandler===null||errorHandler===void 0||errorHandler.onError(err,KETCH_CONSENT_MANAGER_PLUGIN,DESTINATION_CONSENT_STATUS_ERROR);return true;}}}};};
|
1554
|
+
|
1555
|
+
var QueueStatuses={IN_PROGRESS:'inProgress',QUEUE:'queue',RECLAIM_START:'reclaimStart',RECLAIM_END:'reclaimEnd',ACK:'ack',BATCH_QUEUE:'batchQueue'};
|
1685
1556
|
|
1686
1557
|
var ScheduleModes=/*#__PURE__*/function(ScheduleModes){ScheduleModes[ScheduleModes["ASAP"]=1]="ASAP";ScheduleModes[ScheduleModes["RESCHEDULE"]=2]="RESCHEDULE";ScheduleModes[ScheduleModes["ABANDON"]=3]="ABANDON";return ScheduleModes;}({});var DEFAULT_CLOCK_LATE_FACTOR=2;var DEFAULT_CLOCK={setTimeout:function setTimeout(fn,ms){return globalThis.setTimeout(fn,ms);},clearTimeout:function clearTimeout(id){return globalThis.clearTimeout(id);},Date:globalThis.Date,clockLateFactor:DEFAULT_CLOCK_LATE_FACTOR};var Schedule=/*#__PURE__*/function(){function Schedule(){_classCallCheck(this,Schedule);_defineProperty(this,"tasks",{});_defineProperty(this,"nextId",1);_defineProperty(this,"clock",DEFAULT_CLOCK);}_createClass(Schedule,[{key:"now",value:function now(){return +new this.clock.Date();}},{key:"run",value:function run(task,timeout,mode){var id=(this.nextId+1).toString();this.tasks[id]=this.clock.setTimeout(this.handle(id,task,timeout,mode||ScheduleModes.ASAP),timeout);return id;}},{key:"handle",value:function handle(id,callback,timeout,mode){var _this=this;var start=this.now();return function(){delete _this.tasks[id];var elapsedTimeoutTime=start+timeout*(_this.clock.clockLateFactor||DEFAULT_CLOCK_LATE_FACTOR);var currentTime=_this.now();var notCompletedOrTimedOut=mode>=ScheduleModes.RESCHEDULE&&elapsedTimeoutTime<currentTime;if(notCompletedOrTimedOut){if(mode===ScheduleModes.RESCHEDULE){_this.run(callback,timeout,mode);}return undefined;}return callback();};}},{key:"cancel",value:function cancel(id){if(this.tasks[id]){this.clock.clearTimeout(this.tasks[id]);delete this.tasks[id];}}},{key:"cancelAll",value:function cancelAll(){Object.values(this.tasks).forEach(this.clock.clearTimeout);this.tasks={};}},{key:"setClock",value:function setClock(newClock){this.clock=newClock;}},{key:"resetClock",value:function resetClock(){this.clock=DEFAULT_CLOCK;}}]);return Schedule;}();
|
1687
1558
|
|
@@ -1756,7 +1627,7 @@ case'whitelistedEvents':{if(!isValidEventName(eventName)){return true;}var _trim
|
|
1756
1627
|
// This will remain until we update the destinations to accept the event directly
|
1757
1628
|
(_dest$instance=dest.instance)===null||_dest$instance===void 0||(_dest$instance$method=_dest$instance[methodName])===null||_dest$instance$method===void 0||_dest$instance$method.call(_dest$instance,{message:item});}catch(err){errorHandler===null||errorHandler===void 0||errorHandler.onError(err,NATIVE_DESTINATION_QUEUE_PLUGIN,DESTINATION_EVENT_FORWARDING_ERROR(dest.userFriendlyId));}};
|
1758
1629
|
|
1759
|
-
var pluginName$
|
1630
|
+
var pluginName$5='NativeDestinationQueue';var NativeDestinationQueue=function NativeDestinationQueue(){return {name:pluginName$5,deps:[],initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName$5]);},destinationsEventsQueue:{/**
|
1760
1631
|
* Initialize the queue for delivery to destinations
|
1761
1632
|
* @param state Application state
|
1762
1633
|
* @param pluginsManager PluginsManager instance
|
@@ -1780,7 +1651,7 @@ return eventsQueue;},/**
|
|
1780
1651
|
* @param errorHandler Error handler instance
|
1781
1652
|
* @param logger Logger instance
|
1782
1653
|
* @returns none
|
1783
|
-
*/enqueue:function enqueue(state,eventsQueue,event,errorHandler,logger){
|
1654
|
+
*/enqueue:function enqueue(state,eventsQueue,event,errorHandler,logger){eventsQueue.addItem(event);},/**
|
1784
1655
|
* This extension point is used to directly send the transformed event to the destination
|
1785
1656
|
* @param state Application state
|
1786
1657
|
* @param event RudderEvent Object
|
@@ -1791,7 +1662,7 @@ return eventsQueue;},/**
|
|
1791
1662
|
|
1792
1663
|
var ONETRUST_CONSENT_MANAGER_PLUGIN='OneTrustConsentManagerPlugin';
|
1793
1664
|
|
1794
|
-
var pluginName$
|
1665
|
+
var pluginName$4='OneTrustConsentManager';var OneTrustConsentManager=function OneTrustConsentManager(){return {name:pluginName$4,deps:[],initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName$4]);},consentManager:{init:function init(state,storeManager,logger){if(!globalThis.OneTrust||!globalThis.OnetrustActiveGroups){logger===null||logger===void 0||logger.error(ONETRUST_ACCESS_ERROR(ONETRUST_CONSENT_MANAGER_PLUGIN));state.consents.data.value={initialized:false};return;}// OneTrustConsentManager SDK populates a data layer object OnetrustActiveGroups with
|
1795
1666
|
// the cookie categories Ids that the user has consented to.
|
1796
1667
|
// Eg: ',C0001,C0003,'
|
1797
1668
|
// We split it and save it as an array.
|
@@ -1804,33 +1675,6 @@ if(!oneTrustCookieCategories){return true;}// Change the structure of oneTrustCo
|
|
1804
1675
|
var validOneTrustCookieCategories=oneTrustCookieCategories.map(function(c){return c.oneTrustCookieCategory;}).filter(function(n){return n;});var containsAllConsent=true;// Check if all the destination's mapped cookie categories are consented by the user in the browser.
|
1805
1676
|
containsAllConsent=validOneTrustCookieCategories.every(function(element){return Object.keys(allowedConsents).includes(element.trim())||Object.values(allowedConsents).includes(element.trim());});return containsAllConsent;}catch(err){errorHandler===null||errorHandler===void 0||errorHandler.onError(err,ONETRUST_CONSENT_MANAGER_PLUGIN,DESTINATION_CONSENT_STATUS_ERROR);return true;}}}};};
|
1806
1677
|
|
1807
|
-
var KETCH_CONSENT_MANAGER_PLUGIN='KetchConsentManagerPlugin';var KETCH_CONSENT_COOKIE_NAME_V1='_ketch_consent_v1_';
|
1808
|
-
|
1809
|
-
/**
|
1810
|
-
* Gets the consent data from the Ketch's consent cookie
|
1811
|
-
* @param storeManager Store manager instance
|
1812
|
-
* @param logger Logger instance
|
1813
|
-
* @returns Consent data from the consent cookie
|
1814
|
-
*/var getKetchConsentData=function getKetchConsentData(storeManager,logger){var rawConsentCookieData=null;try{// Create a data store instance to read the consent cookie
|
1815
|
-
var dataStore=storeManager===null||storeManager===void 0?void 0:storeManager.setStore({id:KETCH_CONSENT_MANAGER_PLUGIN,name:KETCH_CONSENT_MANAGER_PLUGIN,type:COOKIE_STORAGE});rawConsentCookieData=dataStore===null||dataStore===void 0?void 0:dataStore.engine.getItem(KETCH_CONSENT_COOKIE_NAME_V1);}catch(err){logger===null||logger===void 0||logger.error(KETCH_CONSENT_COOKIE_READ_ERROR(KETCH_CONSENT_MANAGER_PLUGIN),err);return undefined;}if(isNullOrUndefined(rawConsentCookieData)){return undefined;}// Decode and parse the cookie data to JSON
|
1816
|
-
var consentCookieData;try{consentCookieData=JSON.parse(fromBase64(rawConsentCookieData));}catch(err){logger===null||logger===void 0||logger.error(KETCH_CONSENT_COOKIE_PARSE_ERROR(KETCH_CONSENT_MANAGER_PLUGIN),err);return undefined;}if(!consentCookieData){return undefined;}// Convert the cookie data to consent data
|
1817
|
-
var consentPurposes={};Object.entries(consentCookieData).forEach(function(pEntry){var purposeCode=pEntry[0];var purposeValue=pEntry[1];consentPurposes[purposeCode]=(purposeValue===null||purposeValue===void 0?void 0:purposeValue.status)==='granted';});return consentPurposes;};/**
|
1818
|
-
* Gets the consent data in the format expected by the application state
|
1819
|
-
* @param ketchConsentData Consent data derived from the consent cookie
|
1820
|
-
* @returns Consent data
|
1821
|
-
*/var getConsentData=function getConsentData(ketchConsentData){var allowedConsents=[];var deniedConsentIds=[];var initialized=false;if(ketchConsentData){Object.entries(ketchConsentData).forEach(function(e){var purposeCode=e[0];var isConsented=e[1];if(isConsented){allowedConsents.push(purposeCode);}else {deniedConsentIds.push(purposeCode);}});initialized=true;}return {initialized:initialized,allowedConsents:allowedConsents,deniedConsentIds:deniedConsentIds};};var updateConsentStateFromData=function updateConsentStateFromData(state,ketchConsentData){var consentData=getConsentData(ketchConsentData);state.consents.data.value=consentData;};
|
1822
|
-
|
1823
|
-
var pluginName$4='KetchConsentManager';var KetchConsentManager=function KetchConsentManager(){return {name:pluginName$4,deps:[],initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName$4]);},consentManager:{init:function init(state,storeManager,logger){// getKetchUserConsentedPurposes returns current ketch opted-in purposes
|
1824
|
-
// This will be helpful for debugging
|
1825
|
-
globalThis.getKetchUserConsentedPurposes=function(){var _state$consents$data$;return (_state$consents$data$=state.consents.data.value.allowedConsents)===null||_state$consents$data$===void 0?void 0:_state$consents$data$.slice();};// getKetchUserDeniedPurposes returns current ketch opted-out purposes
|
1826
|
-
// This will be helpful for debugging
|
1827
|
-
globalThis.getKetchUserDeniedPurposes=function(){var _state$consents$data$2;return (_state$consents$data$2=state.consents.data.value.deniedConsentIds)===null||_state$consents$data$2===void 0?void 0:_state$consents$data$2.slice();};// updateKetchConsent callback function to update current consent purpose state
|
1828
|
-
// this will be called from ketch rudderstack plugin
|
1829
|
-
globalThis.updateKetchConsent=function(ketchConsentData){updateConsentStateFromData(state,ketchConsentData);};// retrieve consent data and update the state
|
1830
|
-
var ketchConsentData;if(!isUndefined(globalThis.ketchConsent)){ketchConsentData=globalThis.ketchConsent;}else {ketchConsentData=getKetchConsentData(storeManager,logger);}updateConsentStateFromData(state,ketchConsentData);},isDestinationConsented:function isDestinationConsented(state,destConfig,errorHandler,logger){var consentData=state.consents.data.value;if(!consentData.initialized){return true;}var allowedConsents=consentData.allowedConsents;try{var ketchConsentPurposes=destConfig.ketchConsentPurposes;// If the destination do not have this mapping events will be sent.
|
1831
|
-
if(!ketchConsentPurposes||ketchConsentPurposes.length===0){return true;}var purposes=ketchConsentPurposes.map(function(p){return p.purpose;}).filter(function(n){return n;});// Check if any of the destination's mapped ketch purposes are consented by the user in the browser.
|
1832
|
-
var containsAnyOfConsent=purposes.some(function(element){return allowedConsents.includes(element.trim());});return containsAnyOfConsent;}catch(err){errorHandler===null||errorHandler===void 0||errorHandler.onError(err,KETCH_CONSENT_MANAGER_PLUGIN,DESTINATION_CONSENT_STATUS_ERROR);return true;}}}};};
|
1833
|
-
|
1834
1678
|
var ENCRYPTION_PREFIX_V3='RS_ENC_v3_';
|
1835
1679
|
|
1836
1680
|
var encrypt$1=function encrypt(value){return "".concat(ENCRYPTION_PREFIX_V3).concat(toBase64(value));};var decrypt$1=function decrypt(value){if(value.startsWith(ENCRYPTION_PREFIX_V3)){return fromBase64(value.substring(ENCRYPTION_PREFIX_V3.length));}return value;};
|
@@ -3011,7 +2855,7 @@ isRetryableNWFailure=xhrStatus===429||xhrStatus>=500&&xhrStatus<600;}return isRe
|
|
3011
2855
|
var DEFAULT_RETRY_QUEUE_OPTIONS={maxRetryDelay:360000,minRetryDelay:1000,backoffFactor:2,maxAttempts:10,maxItems:100};var REQUEST_TIMEOUT_MS=10*1000;// 10 seconds
|
3012
2856
|
var DATA_PLANE_API_VERSION='v1';var QUEUE_NAME='rudder';var XHR_QUEUE_PLUGIN='XhrQueuePlugin';
|
3013
2857
|
|
3014
|
-
var getNormalizedQueueOptions=function getNormalizedQueueOptions(queueOpts){return mergeDeepRight(DEFAULT_RETRY_QUEUE_OPTIONS,queueOpts);};var getDeliveryUrl=function getDeliveryUrl(dataplaneUrl,endpoint){var dpUrl=new URL(dataplaneUrl);return new URL(removeDuplicateSlashes([dpUrl.pathname,'/',DATA_PLANE_API_VERSION,'/',endpoint].join('')),dpUrl).href;};var getBatchDeliveryUrl=function getBatchDeliveryUrl(dataplaneUrl){return getDeliveryUrl(dataplaneUrl,'batch');};var logErrorOnFailure=function logErrorOnFailure(details,url,willBeRetried,attemptNumber,maxRetryAttempts,logger){if(isUndefined(details===null||details===void 0?void 0:details.error)||isUndefined(logger)){return;}var isRetryableFailure=isErrRetryable(details);var errMsg=EVENT_DELIVERY_FAILURE_ERROR_PREFIX(XHR_QUEUE_PLUGIN,url);var dropMsg="The event(s) will be dropped.";if(isRetryableFailure){if(willBeRetried){errMsg="".concat(errMsg," It/they will be retried.");if(attemptNumber>0){errMsg="".concat(errMsg," Retry attempt ").concat(attemptNumber," of ").concat(maxRetryAttempts,".");}}else {errMsg="".concat(errMsg," Retries exhausted (").concat(maxRetryAttempts,"). ").concat(dropMsg);}}else {errMsg="".concat(errMsg," ").concat(dropMsg);}logger===null||logger===void 0||logger.error(errMsg);};var getRequestInfo=function getRequestInfo(itemData,state,logger){var data;var headers;var url;if(Array.isArray(itemData)){var finalEvents=itemData.map(function(queueItemData){return getFinalEventForDeliveryMutator(queueItemData.event
|
2858
|
+
var getNormalizedQueueOptions=function getNormalizedQueueOptions(queueOpts){return mergeDeepRight(DEFAULT_RETRY_QUEUE_OPTIONS,queueOpts);};var getDeliveryUrl=function getDeliveryUrl(dataplaneUrl,endpoint){var dpUrl=new URL(dataplaneUrl);return new URL(removeDuplicateSlashes([dpUrl.pathname,'/',DATA_PLANE_API_VERSION,'/',endpoint].join('')),dpUrl).href;};var getBatchDeliveryUrl=function getBatchDeliveryUrl(dataplaneUrl){return getDeliveryUrl(dataplaneUrl,'batch');};var logErrorOnFailure=function logErrorOnFailure(details,url,willBeRetried,attemptNumber,maxRetryAttempts,logger){if(isUndefined(details===null||details===void 0?void 0:details.error)||isUndefined(logger)){return;}var isRetryableFailure=isErrRetryable(details);var errMsg=EVENT_DELIVERY_FAILURE_ERROR_PREFIX(XHR_QUEUE_PLUGIN,url);var dropMsg="The event(s) will be dropped.";if(isRetryableFailure){if(willBeRetried){errMsg="".concat(errMsg," It/they will be retried.");if(attemptNumber>0){errMsg="".concat(errMsg," Retry attempt ").concat(attemptNumber," of ").concat(maxRetryAttempts,".");}}else {errMsg="".concat(errMsg," Retries exhausted (").concat(maxRetryAttempts,"). ").concat(dropMsg);}}else {errMsg="".concat(errMsg," ").concat(dropMsg);}logger===null||logger===void 0||logger.error(errMsg);};var getRequestInfo=function getRequestInfo(itemData,state,logger){var data;var headers;var url;if(Array.isArray(itemData)){var finalEvents=itemData.map(function(queueItemData){return getFinalEventForDeliveryMutator(queueItemData.event);});data=getBatchDeliveryPayload(finalEvents,logger);headers=_objectSpread2({},itemData[0].headers);url=getBatchDeliveryUrl(state.lifecycle.activeDataplaneUrl.value);}else {var eventUrl=itemData.url,event=itemData.event,eventHeaders=itemData.headers;var finalEvent=getFinalEventForDeliveryMutator(event);data=getDeliveryPayload$1(finalEvent,logger);headers=_objectSpread2({},eventHeaders);url=eventUrl;}return {data:data,headers:headers,url:url};};
|
3015
2859
|
|
3016
2860
|
var pluginName='XhrQueue';var XhrQueue=function XhrQueue(){return {name:pluginName,deps:[],initialize:function initialize(state){state.plugins.loadedPlugins.value=[].concat(_toConsumableArray(state.plugins.loadedPlugins.value),[pluginName]);},dataplaneEventsQueue:{/**
|
3017
2861
|
* Initialize the queue for delivery
|
@@ -3038,10 +2882,9 @@ event.sentAt=getCurrentTimeFormatted();validateEventPayloadSize(event,logger);va
|
|
3038
2882
|
var headers={// TODO: why do we need this header value?
|
3039
2883
|
AnonymousId:toBase64(event.anonymousId)};eventsQueue.addItem({url:url,headers:headers,event:event});}}};};
|
3040
2884
|
|
3041
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
3042
2885
|
/**
|
3043
2886
|
* Map plugin names to direct code imports from plugins package
|
3044
|
-
*/var legacyBuildPluginImports=function legacyBuildPluginImports(){return {Bugsnag:Bugsnag,
|
2887
|
+
*/var legacyBuildPluginImports=function legacyBuildPluginImports(){return {BeaconQueue:BeaconQueue,Bugsnag:Bugsnag,DeviceModeDestinations:DeviceModeDestinations,DeviceModeTransformation:DeviceModeTransformation,ErrorReporting:ErrorReporting,ExternalAnonymousId:ExternalAnonymousId,GoogleLinker:GoogleLinker,KetchConsentManager:KetchConsentManager,NativeDestinationQueue:NativeDestinationQueue,OneTrustConsentManager:OneTrustConsentManager,StorageEncryption:StorageEncryption,StorageEncryptionLegacy:StorageEncryptionLegacy,StorageMigrator:StorageMigrator,XhrQueue:XhrQueue};};
|
3045
2888
|
|
3046
2889
|
/**
|
3047
2890
|
* Map of mandatory plugin names and direct imports
|
@@ -3059,7 +2902,7 @@ var PluginsManager=/*#__PURE__*/function(){function PluginsManager(engine,errorH
|
|
3059
2902
|
this.setActivePlugins();this.registerLocalPlugins();this.registerRemotePlugins();this.attachEffects();}/**
|
3060
2903
|
* Update state based on plugin loaded status
|
3061
2904
|
*/ // eslint-disable-next-line class-methods-use-this
|
3062
|
-
},{key:"attachEffects",value:function attachEffects(){
|
2905
|
+
},{key:"attachEffects",value:function attachEffects(){E(function(){var isAllPluginsReady=state.plugins.activePlugins.value.length===0||state.plugins.loadedPlugins.value.length+state.plugins.failedPlugins.value.length===state.plugins.totalPluginsToLoad.value;if(isAllPluginsReady){r(function(){state.plugins.ready.value=true;// TODO: decide what to do if a plugin fails to load for any reason.
|
3063
2906
|
// Should we stop here or should we progress?
|
3064
2907
|
state.lifecycle.status.value=LifecycleStatus.PluginsReady;});}});}/**
|
3065
2908
|
* Determine the list of plugins that should be loaded based on sourceConfig & load options
|
@@ -3074,7 +2917,7 @@ var supportedStorageEncryptionPlugins=Object.values(StorageEncryptionVersionsToP
|
|
3074
2917
|
if(!state.storage.migrate.value){pluginsToLoadFromConfig=pluginsToLoadFromConfig.filter(function(pluginName){return pluginName!==PluginName.StorageMigrator;});}return [].concat(_toConsumableArray(Object.keys(getMandatoryPluginsMap())),_toConsumableArray(pluginsToLoadFromConfig));}/**
|
3075
2918
|
* Determine the list of plugins that should be activated
|
3076
2919
|
*/},{key:"setActivePlugins",value:function setActivePlugins(){var pluginsToLoad=this.getPluginsToLoadBasedOnConfig();// Merging available mandatory and optional plugin name list
|
3077
|
-
var availablePlugins=[].concat(_toConsumableArray(Object.keys(pluginsInventory)),_toConsumableArray(remotePluginNames));var activePlugins=[];var failedPlugins=[];pluginsToLoad.forEach(function(pluginName){if(availablePlugins.includes(pluginName)){activePlugins.push(pluginName);}else {failedPlugins.push(pluginName);}});if(failedPlugins.length>0){this.onError(new Error("Ignoring loading of unknown plugins: ".concat(failedPlugins.join(','),". Mandatory plugins: ").concat(Object.keys(getMandatoryPluginsMap()).join(','),". Load option plugins: ").concat(state.plugins.pluginsToLoadFromConfig.value.join(','))));}
|
2920
|
+
var availablePlugins=[].concat(_toConsumableArray(Object.keys(pluginsInventory)),_toConsumableArray(remotePluginNames));var activePlugins=[];var failedPlugins=[];pluginsToLoad.forEach(function(pluginName){if(availablePlugins.includes(pluginName)){activePlugins.push(pluginName);}else {failedPlugins.push(pluginName);}});if(failedPlugins.length>0){this.onError(new Error("Ignoring loading of unknown plugins: ".concat(failedPlugins.join(','),". Mandatory plugins: ").concat(Object.keys(getMandatoryPluginsMap()).join(','),". Load option plugins: ").concat(state.plugins.pluginsToLoadFromConfig.value.join(','))));}r(function(){state.plugins.totalPluginsToLoad.value=pluginsToLoad.length;state.plugins.activePlugins.value=activePlugins;state.plugins.failedPlugins.value=failedPlugins;});}/**
|
3078
2921
|
* Register plugins that are direct imports to PluginEngine
|
3079
2922
|
*/},{key:"registerLocalPlugins",value:function registerLocalPlugins(){var _this=this;Object.values(pluginsInventory).forEach(function(localPlugin){if(state.plugins.activePlugins.value.includes(localPlugin().name)){_this.register([localPlugin()]);}});}/**
|
3080
2923
|
* Register plugins that are dynamic imports to PluginEngine
|
@@ -3120,7 +2963,11 @@ xhr.timeout=timeout;Object.keys(options.headers).forEach(function(headerName){if
|
|
3120
2963
|
* Clear basic authentication header
|
3121
2964
|
*/},{key:"resetAuthHeader",value:function resetAuthHeader(){this.basicAuthHeader=undefined;}}]);return HttpClient;}();var defaultHttpClient=new HttpClient(defaultErrorHandler,defaultLogger);
|
3122
2965
|
|
3123
|
-
var
|
2966
|
+
var UserSessionKeys=/*#__PURE__*/function(UserSessionKeys){UserSessionKeys["userId"]="userId";UserSessionKeys["userTraits"]="userTraits";UserSessionKeys["anonymousId"]="anonymousId";UserSessionKeys["groupId"]="groupId";UserSessionKeys["groupTraits"]="groupTraits";UserSessionKeys["initialReferrer"]="initialReferrer";UserSessionKeys["initialReferringDomain"]="initialReferringDomain";UserSessionKeys["sessionInfo"]="sessionInfo";return UserSessionKeys;}({});
|
2967
|
+
|
2968
|
+
var STORAGE_TEST_COOKIE='test_rudder_cookie';var STORAGE_TEST_LOCAL_STORAGE='test_rudder_ls';var STORAGE_TEST_SESSION_STORAGE='test_rudder_ss';var STORAGE_TEST_TOP_LEVEL_DOMAIN='__tld__';var CLIENT_DATA_STORE_COOKIE='clientDataInCookie';var CLIENT_DATA_STORE_LS='clientDataInLocalStorage';var CLIENT_DATA_STORE_MEMORY='clientDataInMemory';
|
2969
|
+
|
2970
|
+
var _storageClientDataSto;var storageClientDataStoreNameMap=(_storageClientDataSto={},_defineProperty(_storageClientDataSto,COOKIE_STORAGE,CLIENT_DATA_STORE_COOKIE),_defineProperty(_storageClientDataSto,LOCAL_STORAGE,CLIENT_DATA_STORE_LS),_defineProperty(_storageClientDataSto,MEMORY_STORAGE,CLIENT_DATA_STORE_MEMORY),_storageClientDataSto);
|
3124
2971
|
|
3125
2972
|
var detectAdBlockers=function detectAdBlockers(errorHandler,logger){// Apparently, '?view=ad' is a query param that is blocked by majority of adblockers
|
3126
2973
|
// Use source config URL here as it is very unlikely to be blocked by adblockers
|
@@ -3275,12 +3122,14 @@ return JSON.parse(str);}catch(err){this.onError(new Error("".concat(STORE_DATA_F
|
|
3275
3122
|
* A service to manage stores & available storage client configurations
|
3276
3123
|
*/var StoreManager=/*#__PURE__*/function(){function StoreManager(pluginsManager,errorHandler,logger){_classCallCheck(this,StoreManager);_defineProperty(this,"stores",{});_defineProperty(this,"isInitialized",false);_defineProperty(this,"hasErrorHandler",false);this.errorHandler=errorHandler;this.logger=logger;this.hasErrorHandler=Boolean(this.errorHandler);this.pluginsManager=pluginsManager;this.onError=this.onError.bind(this);}/**
|
3277
3124
|
* Configure available storage client instances
|
3278
|
-
*/_createClass(StoreManager,[{key:"init",value:function init(){if(this.isInitialized){return;}var config={cookieOptions:{samesite:state.loadOptions.value.sameSiteCookie,secure:state.loadOptions.value.secureCookie,domain:state.loadOptions.value.setCookieDomain,enabled:true},localStorageOptions:{enabled:true},inMemoryStorageOptions:{enabled:true}};configureStorageEngines(removeUndefinedValues(config.cookieOptions),removeUndefinedValues(config.localStorageOptions),removeUndefinedValues(config.inMemoryStorageOptions));this.initClientDataStore();this.isInitialized=true;}/**
|
3125
|
+
*/_createClass(StoreManager,[{key:"init",value:function init(){var _state$storage$cookie;if(this.isInitialized){return;}var config={cookieOptions:{samesite:state.loadOptions.value.sameSiteCookie,secure:state.loadOptions.value.secureCookie,domain:state.loadOptions.value.setCookieDomain,enabled:true},localStorageOptions:{enabled:true},inMemoryStorageOptions:{enabled:true}};configureStorageEngines(removeUndefinedValues(mergeDeepRight(config.cookieOptions||{},((_state$storage$cookie=state.storage.cookie)===null||_state$storage$cookie===void 0?void 0:_state$storage$cookie.value)||{})),removeUndefinedValues(config.localStorageOptions),removeUndefinedValues(config.inMemoryStorageOptions));this.initClientDataStore();this.isInitialized=true;}/**
|
3279
3126
|
* Create store to persist data used by the SDK like session, used details etc
|
3280
|
-
*/},{key:"initClientDataStore",value:function initClientDataStore(){var
|
3281
|
-
if((_getStorageEngine2=getStorageEngine(COOKIE_STORAGE))!==null&&_getStorageEngine2!==void 0&&_getStorageEngine2.isEnabled){finalStorageType=COOKIE_STORAGE;}else if((_getStorageEngine3=getStorageEngine(LOCAL_STORAGE))!==null&&_getStorageEngine3!==void 0&&_getStorageEngine3.isEnabled){finalStorageType=LOCAL_STORAGE;}else {finalStorageType=MEMORY_STORAGE;}break;}if(finalStorageType!==storageType){var _this$logger;(_this$logger=
|
3127
|
+
*/},{key:"initClientDataStore",value:function initClientDataStore(){var _state$loadOptions$va,_this=this,_getStorageEngine4,_getStorageEngine5;var globalStorageType=state.storage.type.value;var trulyAnonymousTracking=true;var entries=(_state$loadOptions$va=state.loadOptions.value.storage)===null||_state$loadOptions$va===void 0?void 0:_state$loadOptions$va.entries;Object.keys(UserSessionKeys).forEach(function(sessionKey){var _entries$key,_getStorageEngine,_getStorageEngine2,_getStorageEngine3;var key=sessionKey;var storageKey=sessionKey;var providedStorageType=entries===null||entries===void 0||(_entries$key=entries[key])===null||_entries$key===void 0?void 0:_entries$key.type;var storageType=providedStorageType||globalStorageType||DEFAULT_STORAGE_TYPE;var finalStorageType=storageType;switch(storageType){case LOCAL_STORAGE:if(!((_getStorageEngine=getStorageEngine(LOCAL_STORAGE))!==null&&_getStorageEngine!==void 0&&_getStorageEngine.isEnabled)){finalStorageType=MEMORY_STORAGE;}break;case MEMORY_STORAGE:case NO_STORAGE:break;case COOKIE_STORAGE:default:// First try setting the storage to cookie else to local storage
|
3128
|
+
if((_getStorageEngine2=getStorageEngine(COOKIE_STORAGE))!==null&&_getStorageEngine2!==void 0&&_getStorageEngine2.isEnabled){finalStorageType=COOKIE_STORAGE;}else if((_getStorageEngine3=getStorageEngine(LOCAL_STORAGE))!==null&&_getStorageEngine3!==void 0&&_getStorageEngine3.isEnabled){finalStorageType=LOCAL_STORAGE;}else {finalStorageType=MEMORY_STORAGE;}break;}if(finalStorageType!==storageType){var _this$logger;(_this$logger=_this.logger)===null||_this$logger===void 0||_this$logger.warn(STORAGE_UNAVAILABLE_WARNING(STORE_MANAGER,storageType,finalStorageType));}if(finalStorageType!==NO_STORAGE){trulyAnonymousTracking=false;}var storageState=state.storage.entries.value;state.storage.entries.value=_objectSpread2(_objectSpread2({},storageState),{},_defineProperty({},sessionKey,{type:finalStorageType,key:userSessionStorageKeys[storageKey]}));});state.storage.trulyAnonymousTracking.value=trulyAnonymousTracking;// TODO: fill in extra config values and bring them in from StoreManagerOptions if needed
|
3282
3129
|
// TODO: should we pass the keys for all in order to validate or leave free as v1.1?
|
3283
|
-
|
3130
|
+
// Initializing all the enabled store because previous user data might be in different storage
|
3131
|
+
// that needs auto migration
|
3132
|
+
var storageTypesRequiringInitialization=[MEMORY_STORAGE];if((_getStorageEngine4=getStorageEngine(LOCAL_STORAGE))!==null&&_getStorageEngine4!==void 0&&_getStorageEngine4.isEnabled){storageTypesRequiringInitialization.push(LOCAL_STORAGE);}if((_getStorageEngine5=getStorageEngine(COOKIE_STORAGE))!==null&&_getStorageEngine5!==void 0&&_getStorageEngine5.isEnabled){storageTypesRequiringInitialization.push(COOKIE_STORAGE);}storageTypesRequiringInitialization.forEach(function(storageType){_this.setStore({id:storageClientDataStoreNameMap[storageType],name:storageClientDataStoreNameMap[storageType],isEncrypted:true,noCompoundKey:true,type:storageType});});}/**
|
3284
3133
|
* Create a new store
|
3285
3134
|
*/},{key:"setStore",value:function setStore(storeConfig){var storageEngine=getStorageEngine(storeConfig.type);this.stores[storeConfig.id]=new Store(storeConfig,storageEngine,this.pluginsManager);return this.stores[storeConfig.id];}/**
|
3286
3135
|
* Retrieve a store
|
@@ -3333,8 +3182,8 @@ var defaultOptionalPluginsList=[PluginName.Bugsnag,PluginName.DeviceModeDestinat
|
|
3333
3182
|
* @returns boolean
|
3334
3183
|
*/var isPositiveInteger=function isPositiveInteger(num){return isNumber(num)&&num>=0&&Number.isInteger(num);};
|
3335
3184
|
|
3336
|
-
var normalizeLoadOptions=function normalizeLoadOptions(loadOptionsFromState,loadOptions){var _normalizedLoadOpts$p;// TODO: Maybe add warnings for invalid values
|
3337
|
-
var normalizedLoadOpts=clone$1(loadOptions);if(!isString(normalizedLoadOpts.setCookieDomain)){delete normalizedLoadOpts.setCookieDomain;}if(!getObjectValues(CookieSameSite).includes(normalizedLoadOpts.sameSiteCookie)){delete normalizedLoadOpts.sameSiteCookie;}normalizedLoadOpts.secureCookie=normalizedLoadOpts.secureCookie===true;if(!getObjectValues(UaChTrackLevel).includes(normalizedLoadOpts.uaChTrackLevel)){delete normalizedLoadOpts.uaChTrackLevel;}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.integrations)){delete normalizedLoadOpts.integrations;}normalizedLoadOpts.plugins=(_normalizedLoadOpts$p=normalizedLoadOpts.plugins)!==null&&_normalizedLoadOpts$p!==void 0?_normalizedLoadOpts$p:defaultOptionalPluginsList;normalizedLoadOpts.useGlobalIntegrationsConfigInEvents=normalizedLoadOpts.useGlobalIntegrationsConfigInEvents===true;normalizedLoadOpts.bufferDataPlaneEventsUntilReady=normalizedLoadOpts.bufferDataPlaneEventsUntilReady===true;normalizedLoadOpts.sendAdblockPage=normalizedLoadOpts.sendAdblockPage===true;if(!isObjectLiteralAndNotNull(normalizedLoadOpts.sendAdblockPageOptions)){delete normalizedLoadOpts.sendAdblockPageOptions;}if(!isDefined(normalizedLoadOpts.loadIntegration)){delete normalizedLoadOpts.loadIntegration;}else {normalizedLoadOpts.loadIntegration=normalizedLoadOpts.loadIntegration===true;}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.storage)){delete normalizedLoadOpts.storage;}else {var _normalizedLoadOpts$s;normalizedLoadOpts.storage=removeUndefinedAndNullValues(normalizedLoadOpts.storage);normalizedLoadOpts.storage.migrate=((_normalizedLoadOpts$s=normalizedLoadOpts.storage)===null||_normalizedLoadOpts$s===void 0?void 0:_normalizedLoadOpts$s.migrate)===true;}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.beaconQueueOptions)){delete normalizedLoadOpts.beaconQueueOptions;}else {normalizedLoadOpts.beaconQueueOptions=removeUndefinedAndNullValues(normalizedLoadOpts.beaconQueueOptions);}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.destinationsQueueOptions)){delete normalizedLoadOpts.destinationsQueueOptions;}else {normalizedLoadOpts.destinationsQueueOptions=removeUndefinedAndNullValues(normalizedLoadOpts.destinationsQueueOptions);}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.queueOptions)){delete normalizedLoadOpts.queueOptions;}else {normalizedLoadOpts.queueOptions=removeUndefinedAndNullValues(normalizedLoadOpts.queueOptions);}normalizedLoadOpts.lockIntegrationsVersion=normalizedLoadOpts.lockIntegrationsVersion===true;if(!isNumber(normalizedLoadOpts.dataPlaneEventsBufferTimeout)){delete normalizedLoadOpts.dataPlaneEventsBufferTimeout;}var mergedLoadOptions=mergeDeepRight(loadOptionsFromState,normalizedLoadOpts);return mergedLoadOptions;};var getSourceConfigURL=function getSourceConfigURL(configUrl,writeKey,lockIntegrationsVersion,logger){var defSearchParams=new URLSearchParams({p:MODULE_TYPE,v:APP_VERSION,build:BUILD_TYPE,writeKey:writeKey,lockIntegrationsVersion:lockIntegrationsVersion.toString()});var origin=DEFAULT_CONFIG_BE_URL;var searchParams=defSearchParams;var pathname='/sourceConfig/';var hash='';// Ideally, this check is not required but URL polyfill
|
3185
|
+
var normalizeLoadOptions=function normalizeLoadOptions(loadOptionsFromState,loadOptions){var _normalizedLoadOpts$p,_normalizedLoadOpts$s2;// TODO: Maybe add warnings for invalid values
|
3186
|
+
var normalizedLoadOpts=clone$1(loadOptions);if(!isString(normalizedLoadOpts.setCookieDomain)){delete normalizedLoadOpts.setCookieDomain;}if(!getObjectValues(CookieSameSite).includes(normalizedLoadOpts.sameSiteCookie)){delete normalizedLoadOpts.sameSiteCookie;}normalizedLoadOpts.secureCookie=normalizedLoadOpts.secureCookie===true;if(!getObjectValues(UaChTrackLevel).includes(normalizedLoadOpts.uaChTrackLevel)){delete normalizedLoadOpts.uaChTrackLevel;}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.integrations)){delete normalizedLoadOpts.integrations;}normalizedLoadOpts.plugins=(_normalizedLoadOpts$p=normalizedLoadOpts.plugins)!==null&&_normalizedLoadOpts$p!==void 0?_normalizedLoadOpts$p:defaultOptionalPluginsList;normalizedLoadOpts.useGlobalIntegrationsConfigInEvents=normalizedLoadOpts.useGlobalIntegrationsConfigInEvents===true;normalizedLoadOpts.bufferDataPlaneEventsUntilReady=normalizedLoadOpts.bufferDataPlaneEventsUntilReady===true;normalizedLoadOpts.sendAdblockPage=normalizedLoadOpts.sendAdblockPage===true;if(!isObjectLiteralAndNotNull(normalizedLoadOpts.sendAdblockPageOptions)){delete normalizedLoadOpts.sendAdblockPageOptions;}if(!isDefined(normalizedLoadOpts.loadIntegration)){delete normalizedLoadOpts.loadIntegration;}else {normalizedLoadOpts.loadIntegration=normalizedLoadOpts.loadIntegration===true;}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.storage)){delete normalizedLoadOpts.storage;}else {var _normalizedLoadOpts$s;normalizedLoadOpts.storage=removeUndefinedAndNullValues(normalizedLoadOpts.storage);normalizedLoadOpts.storage.migrate=((_normalizedLoadOpts$s=normalizedLoadOpts.storage)===null||_normalizedLoadOpts$s===void 0?void 0:_normalizedLoadOpts$s.migrate)===true;}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.beaconQueueOptions)){delete normalizedLoadOpts.beaconQueueOptions;}else {normalizedLoadOpts.beaconQueueOptions=removeUndefinedAndNullValues(normalizedLoadOpts.beaconQueueOptions);}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.destinationsQueueOptions)){delete normalizedLoadOpts.destinationsQueueOptions;}else {normalizedLoadOpts.destinationsQueueOptions=removeUndefinedAndNullValues(normalizedLoadOpts.destinationsQueueOptions);}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.queueOptions)){delete normalizedLoadOpts.queueOptions;}else {normalizedLoadOpts.queueOptions=removeUndefinedAndNullValues(normalizedLoadOpts.queueOptions);}normalizedLoadOpts.lockIntegrationsVersion=normalizedLoadOpts.lockIntegrationsVersion===true;if(!isNumber(normalizedLoadOpts.dataPlaneEventsBufferTimeout)){delete normalizedLoadOpts.dataPlaneEventsBufferTimeout;}if(!isObjectLiteralAndNotNull((_normalizedLoadOpts$s2=normalizedLoadOpts.storage)===null||_normalizedLoadOpts$s2===void 0?void 0:_normalizedLoadOpts$s2.cookie)){var _normalizedLoadOpts$s3;(_normalizedLoadOpts$s3=normalizedLoadOpts.storage)===null||_normalizedLoadOpts$s3===void 0||delete _normalizedLoadOpts$s3.cookie;}else {var _normalizedLoadOpts$s4;normalizedLoadOpts.storage.cookie=removeUndefinedAndNullValues((_normalizedLoadOpts$s4=normalizedLoadOpts.storage)===null||_normalizedLoadOpts$s4===void 0?void 0:_normalizedLoadOpts$s4.cookie);}if(!isObjectLiteralAndNotNull(normalizedLoadOpts.preConsent)){delete normalizedLoadOpts.preConsent;}else {normalizedLoadOpts.preConsent=removeUndefinedAndNullValues(normalizedLoadOpts.preConsent);}var mergedLoadOptions=mergeDeepRight(loadOptionsFromState,normalizedLoadOpts);return mergedLoadOptions;};var getSourceConfigURL=function getSourceConfigURL(configUrl,writeKey,lockIntegrationsVersion,logger){var defSearchParams=new URLSearchParams({p:MODULE_TYPE,v:APP_VERSION,build:BUILD_TYPE,writeKey:writeKey,lockIntegrationsVersion:lockIntegrationsVersion.toString()});var origin=DEFAULT_CONFIG_BE_URL;var searchParams=defSearchParams;var pathname='/sourceConfig/';var hash='';// Ideally, this check is not required but URL polyfill
|
3338
3187
|
// doesn't seem to throw errors for empty URLs
|
3339
3188
|
// TODO: Need to improve this check to find out if the URL is valid or not
|
3340
3189
|
if(configUrl){try{var configUrlInstance=new URL(configUrl);if(!removeTrailingSlashes(configUrlInstance.pathname).endsWith('/sourceConfig')){configUrlInstance.pathname="".concat(removeTrailingSlashes(configUrlInstance.pathname),"/sourceConfig/");}configUrlInstance.pathname=removeDuplicateSlashes(configUrlInstance.pathname);defSearchParams.forEach(function(value,key){if(configUrlInstance.searchParams.get(key)===null){configUrlInstance.searchParams.set(key,value);}});origin=configUrlInstance.origin;pathname=configUrlInstance.pathname;searchParams=configUrlInstance.searchParams;hash=configUrlInstance.hash;}catch(err){logger===null||logger===void 0||logger.warn(INVALID_CONFIG_URL_WARNING(CONFIG_MANAGER,configUrl));}}return "".concat(origin).concat(pathname,"?").concat(searchParams).concat(hash);};
|
@@ -3362,21 +3211,39 @@ if(dataplanes&&Object.keys(dataplanes).length>0){var _validateResidencySer;var r
|
|
3362
3211
|
if(serverUrl){return serverUrl;}// return undefined if data plane url can not be determined
|
3363
3212
|
return undefined;};
|
3364
3213
|
|
3214
|
+
var DEFAULT_PRE_CONSENT_STORAGE_STRATEGY=StorageStrategy.None;var DEFAULT_PRE_CONSENT_EVENTS_DELIVERY_TYPE=DeliveryType.Immediate;
|
3215
|
+
|
3365
3216
|
var isErrorReportingEnabled=function isErrorReportingEnabled(sourceConfig){var _sourceConfig$statsCo;return (sourceConfig===null||sourceConfig===void 0||(_sourceConfig$statsCo=sourceConfig.statsCollection)===null||_sourceConfig$statsCo===void 0||(_sourceConfig$statsCo=_sourceConfig$statsCo.errors)===null||_sourceConfig$statsCo===void 0?void 0:_sourceConfig$statsCo.enabled)===true;};var getErrorReportingProviderNameFromConfig=function getErrorReportingProviderNameFromConfig(sourceConfig){var _sourceConfig$statsCo2;return sourceConfig===null||sourceConfig===void 0||(_sourceConfig$statsCo2=sourceConfig.statsCollection)===null||_sourceConfig$statsCo2===void 0||(_sourceConfig$statsCo2=_sourceConfig$statsCo2.errors)===null||_sourceConfig$statsCo2===void 0?void 0:_sourceConfig$statsCo2.provider;};var isMetricsReportingEnabled=function isMetricsReportingEnabled(sourceConfig){var _sourceConfig$statsCo3;return (sourceConfig===null||sourceConfig===void 0||(_sourceConfig$statsCo3=sourceConfig.statsCollection)===null||_sourceConfig$statsCo3===void 0||(_sourceConfig$statsCo3=_sourceConfig$statsCo3.metrics)===null||_sourceConfig$statsCo3===void 0?void 0:_sourceConfig$statsCo3.enabled)===true;};
|
3366
3217
|
|
3218
|
+
/**
|
3219
|
+
* A function to get the name of the consent manager with enabled true set in the load options
|
3220
|
+
* @param cookieConsentOptions Input provided as load option
|
3221
|
+
* @returns string|undefined
|
3222
|
+
*
|
3223
|
+
* Example input: {
|
3224
|
+
* oneTrust:{
|
3225
|
+
* enabled: true
|
3226
|
+
* }
|
3227
|
+
* }
|
3228
|
+
*
|
3229
|
+
* Output: 'oneTrust'
|
3230
|
+
*/var getUserSelectedConsentManager=function getUserSelectedConsentManager(cookieConsentOptions){if(!isNonEmptyObject(cookieConsentOptions)){return undefined;}var validCookieConsentOptions=cookieConsentOptions;return Object.keys(validCookieConsentOptions).find(function(e){return e&&validCookieConsentOptions[e].enabled===true;});};
|
3231
|
+
|
3367
3232
|
/**
|
3368
3233
|
* Determines the SDK url
|
3369
3234
|
* @returns sdkURL
|
3370
|
-
*/var getSDKUrl=function getSDKUrl(){var scripts=document.getElementsByTagName('script');var sdkURL;var scriptList=Array.prototype.slice.call(scripts);scriptList.some(function(script){var curScriptSrc=removeTrailingSlashes(script.getAttribute('src'));if(curScriptSrc){var urlMatches=curScriptSrc.match(/^.*rsa?(\.min)?\.js$/);if(urlMatches){sdkURL=curScriptSrc;return true;}}return false;})
|
3371
|
-
return sdkURL;};/**
|
3235
|
+
*/var getSDKUrl=function getSDKUrl(){var scripts=document.getElementsByTagName('script');var sdkURL;var scriptList=Array.prototype.slice.call(scripts);scriptList.some(function(script){var curScriptSrc=removeTrailingSlashes(script.getAttribute('src'));if(curScriptSrc){var urlMatches=curScriptSrc.match(/^.*rsa?(\.min)?\.js$/);if(urlMatches){sdkURL=curScriptSrc;return true;}}return false;});return sdkURL;};/**
|
3372
3236
|
* Updates the reporting state variables from the source config data
|
3373
3237
|
* @param res Source config
|
3374
3238
|
* @param logger Logger instance
|
3375
3239
|
*/var updateReportingState=function updateReportingState(res,logger){state.reporting.isErrorReportingEnabled.value=isErrorReportingEnabled(res.source.config);state.reporting.isMetricsReportingEnabled.value=isMetricsReportingEnabled(res.source.config);if(state.reporting.isErrorReportingEnabled.value){var errReportingProvider=getErrorReportingProviderNameFromConfig(res.source.config);// Get the corresponding plugin name of the selected error reporting provider from the supported error reporting providers
|
3376
3240
|
var errReportingProviderPlugin=errReportingProvider?ErrorReportingProvidersToPluginNameMap[errReportingProvider]:undefined;if(!isUndefined(errReportingProvider)&&!errReportingProviderPlugin){// set the default error reporting provider
|
3377
|
-
logger===null||logger===void 0||logger.warn(UNSUPPORTED_ERROR_REPORTING_PROVIDER_WARNING(CONFIG_MANAGER,errReportingProvider,ErrorReportingProvidersToPluginNameMap,DEFAULT_ERROR_REPORTING_PROVIDER));}state.reporting.errorReportingProviderPluginName.value=errReportingProviderPlugin!==null&&errReportingProviderPlugin!==void 0?errReportingProviderPlugin:ErrorReportingProvidersToPluginNameMap[DEFAULT_ERROR_REPORTING_PROVIDER];}};var updateStorageState=function updateStorageState(logger){var
|
3378
|
-
logger===null||logger===void 0||logger.warn(UNSUPPORTED_STORAGE_ENCRYPTION_VERSION_WARNING(CONFIG_MANAGER,storageEncryptionVersion,StorageEncryptionVersionsToPluginNameMap,DEFAULT_STORAGE_ENCRYPTION_VERSION));storageEncryptionVersion=DEFAULT_STORAGE_ENCRYPTION_VERSION;}else if(isUndefined(storageEncryptionVersion)){storageEncryptionVersion=DEFAULT_STORAGE_ENCRYPTION_VERSION;}
|
3379
|
-
var configuredMigrationValue=
|
3241
|
+
logger===null||logger===void 0||logger.warn(UNSUPPORTED_ERROR_REPORTING_PROVIDER_WARNING(CONFIG_MANAGER,errReportingProvider,ErrorReportingProvidersToPluginNameMap,DEFAULT_ERROR_REPORTING_PROVIDER));}state.reporting.errorReportingProviderPluginName.value=errReportingProviderPlugin!==null&&errReportingProviderPlugin!==void 0?errReportingProviderPlugin:ErrorReportingProvidersToPluginNameMap[DEFAULT_ERROR_REPORTING_PROVIDER];}};var updateStorageState=function updateStorageState(logger){var _storageOptsFromLoad$;var storageOptsFromLoad=state.loadOptions.value.storage;var storageType=storageOptsFromLoad===null||storageOptsFromLoad===void 0?void 0:storageOptsFromLoad.type;if(isDefined(storageType)&&!isValidStorageType(storageType)){logger===null||logger===void 0||logger.warn(STORAGE_TYPE_VALIDATION_WARNING(CONFIG_MANAGER,storageType,DEFAULT_STORAGE_TYPE));storageType=DEFAULT_STORAGE_TYPE;}var storageEncryptionVersion=storageOptsFromLoad===null||storageOptsFromLoad===void 0||(_storageOptsFromLoad$=storageOptsFromLoad.encryption)===null||_storageOptsFromLoad$===void 0?void 0:_storageOptsFromLoad$.version;var encryptionPluginName=storageEncryptionVersion&&StorageEncryptionVersionsToPluginNameMap[storageEncryptionVersion];if(!isUndefined(storageEncryptionVersion)&&isUndefined(encryptionPluginName)){// set the default encryption plugin
|
3242
|
+
logger===null||logger===void 0||logger.warn(UNSUPPORTED_STORAGE_ENCRYPTION_VERSION_WARNING(CONFIG_MANAGER,storageEncryptionVersion,StorageEncryptionVersionsToPluginNameMap,DEFAULT_STORAGE_ENCRYPTION_VERSION));storageEncryptionVersion=DEFAULT_STORAGE_ENCRYPTION_VERSION;}else if(isUndefined(storageEncryptionVersion)){storageEncryptionVersion=DEFAULT_STORAGE_ENCRYPTION_VERSION;}// Allow migration only if the configured encryption version is the default encryption version
|
3243
|
+
var configuredMigrationValue=storageOptsFromLoad===null||storageOptsFromLoad===void 0?void 0:storageOptsFromLoad.migrate;var finalMigrationVal=configuredMigrationValue&&storageEncryptionVersion===DEFAULT_STORAGE_ENCRYPTION_VERSION;if(configuredMigrationValue===true&&state.storage.migrate.value!==configuredMigrationValue){logger===null||logger===void 0||logger.warn(STORAGE_DATA_MIGRATION_OVERRIDE_WARNING(CONFIG_MANAGER,storageEncryptionVersion,DEFAULT_STORAGE_ENCRYPTION_VERSION));}r(function(){state.storage.type.value=storageType;state.storage.cookie.value=storageOptsFromLoad===null||storageOptsFromLoad===void 0?void 0:storageOptsFromLoad.cookie;state.storage.encryptionPluginName.value=StorageEncryptionVersionsToPluginNameMap[storageEncryptionVersion];state.storage.migrate.value=finalMigrationVal;});};var updateConsentsState=function updateConsentsState(logger){var _preConsentOpts$stora,_preConsentOpts$stora2,_preConsentOpts$event,_preConsentOpts$event2;// Get the consent manager if provided as load option
|
3244
|
+
var selectedConsentManager=getUserSelectedConsentManager(state.loadOptions.value.cookieConsentManager);var consentManagerPluginName;if(selectedConsentManager){// Get the corresponding plugin name of the selected consent manager from the supported consent managers
|
3245
|
+
consentManagerPluginName=ConsentManagersToPluginNameMap[selectedConsentManager];if(!consentManagerPluginName){logger===null||logger===void 0||logger.error(UNSUPPORTED_CONSENT_MANAGER_ERROR(CONFIG_MANAGER,selectedConsentManager,ConsentManagersToPluginNameMap));}}// Pre-consent
|
3246
|
+
var preConsentOpts=state.loadOptions.value.preConsent;var storageStrategy=(_preConsentOpts$stora=preConsentOpts===null||preConsentOpts===void 0||(_preConsentOpts$stora2=preConsentOpts.storage)===null||_preConsentOpts$stora2===void 0?void 0:_preConsentOpts$stora2.strategy)!==null&&_preConsentOpts$stora!==void 0?_preConsentOpts$stora:DEFAULT_PRE_CONSENT_STORAGE_STRATEGY;if(isDefined(storageStrategy)&&!Object.values(StorageStrategy).includes(storageStrategy)){var _preConsentOpts$stora3;storageStrategy=DEFAULT_PRE_CONSENT_STORAGE_STRATEGY;logger===null||logger===void 0||logger.warn(UNSUPPORTED_PRE_CONSENT_STORAGE_STRATEGY(CONFIG_MANAGER,preConsentOpts===null||preConsentOpts===void 0||(_preConsentOpts$stora3=preConsentOpts.storage)===null||_preConsentOpts$stora3===void 0?void 0:_preConsentOpts$stora3.strategy,DEFAULT_PRE_CONSENT_STORAGE_STRATEGY));}var eventsDeliveryType=(_preConsentOpts$event=preConsentOpts===null||preConsentOpts===void 0||(_preConsentOpts$event2=preConsentOpts.events)===null||_preConsentOpts$event2===void 0?void 0:_preConsentOpts$event2.delivery)!==null&&_preConsentOpts$event!==void 0?_preConsentOpts$event:DEFAULT_PRE_CONSENT_EVENTS_DELIVERY_TYPE;if(isDefined(eventsDeliveryType)&&!Object.values(DeliveryType).includes(eventsDeliveryType)){var _preConsentOpts$event3;eventsDeliveryType=DEFAULT_PRE_CONSENT_EVENTS_DELIVERY_TYPE;logger===null||logger===void 0||logger.warn(UNSUPPORTED_PRE_CONSENT_EVENTS_DELIVERY_TYPE(CONFIG_MANAGER,preConsentOpts===null||preConsentOpts===void 0||(_preConsentOpts$event3=preConsentOpts.events)===null||_preConsentOpts$event3===void 0?void 0:_preConsentOpts$event3.delivery,DEFAULT_PRE_CONSENT_EVENTS_DELIVERY_TYPE));}r(function(){var _state$loadOptions$va,_state$loadOptions$va2;state.consents.activeConsentManagerPluginName.value=consentManagerPluginName;state.consents.preConsentOptions.value={enabled:((_state$loadOptions$va=state.loadOptions.value.preConsent)===null||_state$loadOptions$va===void 0?void 0:_state$loadOptions$va.enabled)===true,storage:{strategy:storageStrategy},events:{delivery:eventsDeliveryType},trackConsent:((_state$loadOptions$va2=state.loadOptions.value.preConsent)===null||_state$loadOptions$va2===void 0?void 0:_state$loadOptions$va2.trackConsent)===true};});};
|
3380
3247
|
|
3381
3248
|
/**
|
3382
3249
|
* A function that determines integration SDK loading path
|
@@ -3395,51 +3262,33 @@ if(lockIntegrationsVersion){integrationsCDNPath=integrationsCDNPath.replace(CDN_
|
|
3395
3262
|
if(customPluginsCDNPath){pluginsCDNPath=removeTrailingSlashes(customPluginsCDNPath);if(!pluginsCDNPath||pluginsCDNPath&&!isValidUrl(pluginsCDNPath)){throw new Error(PLUGINS_CDN_BASE_URL_ERROR);}return pluginsCDNPath;}// Get the base path from the SDK script tag src attribute or use the default path
|
3396
3263
|
var sdkURL=getSDKUrl();pluginsCDNPath=sdkURL&&isString(sdkURL)?sdkURL.split('/').slice(0,-1).concat(CDN_PLUGINS_DIR).join('/'):PLUGINS_BASE_URL;return pluginsCDNPath;};
|
3397
3264
|
|
3398
|
-
/**
|
3399
|
-
* A function to get the name of the consent manager with enabled true set in the load options
|
3400
|
-
* @param cookieConsentOptions Input provided as load option
|
3401
|
-
* @returns string|undefined
|
3402
|
-
*
|
3403
|
-
* Example input: {
|
3404
|
-
* oneTrust:{
|
3405
|
-
* enabled: true
|
3406
|
-
* }
|
3407
|
-
* }
|
3408
|
-
*
|
3409
|
-
* Output: 'oneTrust'
|
3410
|
-
*/var getUserSelectedConsentManager=function getUserSelectedConsentManager(cookieConsentOptions){if(!isNonEmptyObject(cookieConsentOptions)){return undefined;}var validCookieConsentOptions=cookieConsentOptions;return Object.keys(validCookieConsentOptions).find(function(e){return e&&validCookieConsentOptions[e].enabled===true;});};
|
3411
|
-
|
3412
|
-
var ConfigManager=/*#__PURE__*/function(){function ConfigManager(httpClient,errorHandler,logger){_classCallCheck(this,ConfigManager);_defineProperty(this,"hasErrorHandler",false);this.errorHandler=errorHandler;this.logger=logger;this.httpClient=httpClient;this.hasErrorHandler=Boolean(this.errorHandler);this.onError=this.onError.bind(this);this.processConfig=this.processConfig.bind(this);}_createClass(ConfigManager,[{key:"attachEffects",value:function attachEffects(){var _this=this;b(function(){var _this$logger;(_this$logger=_this.logger)===null||_this$logger===void 0||_this$logger.setMinLogLevel(state.lifecycle.logLevel.value);});}/**
|
3265
|
+
var ConfigManager=/*#__PURE__*/function(){function ConfigManager(httpClient,errorHandler,logger){_classCallCheck(this,ConfigManager);_defineProperty(this,"hasErrorHandler",false);this.errorHandler=errorHandler;this.logger=logger;this.httpClient=httpClient;this.hasErrorHandler=Boolean(this.errorHandler);this.onError=this.onError.bind(this);this.processConfig=this.processConfig.bind(this);}_createClass(ConfigManager,[{key:"attachEffects",value:function attachEffects(){var _this=this;E(function(){var _this$logger;(_this$logger=_this.logger)===null||_this$logger===void 0||_this$logger.setMinLogLevel(state.lifecycle.logLevel.value);});}/**
|
3413
3266
|
* A function to validate, construct and store loadOption, lifecycle, source and destination
|
3414
3267
|
* config related information in global state
|
3415
|
-
*/},{key:"init",value:function init(){var _this2=this;
|
3268
|
+
*/},{key:"init",value:function init(){var _this2=this;this.attachEffects();var lockIntegrationsVersion=state.loadOptions.value.lockIntegrationsVersion;validateLoadArgs(state.lifecycle.writeKey.value,state.lifecycle.dataPlaneUrl.value);// determine the path to fetch integration SDK from
|
3416
3269
|
var intgCdnUrl=getIntegrationsCDNPath(APP_VERSION,lockIntegrationsVersion,state.loadOptions.value.destSDKBaseURL);// determine the path to fetch remote plugins from
|
3417
|
-
var pluginsCDNPath=getPluginsCDNPath(state.loadOptions.value.pluginsSDKBaseURL);//
|
3418
|
-
|
3419
|
-
consentManagerPluginName=ConsentManagersToPluginNameMap[selectedConsentManager];if(!consentManagerPluginName){var _this$logger2;(_this$logger2=this.logger)===null||_this$logger2===void 0||_this$logger2.error(UNSUPPORTED_CONSENT_MANAGER_ERROR(CONFIG_MANAGER,selectedConsentManager,ConsentManagersToPluginNameMap));}}updateStorageState(this.logger);// set application lifecycle state in global state
|
3420
|
-
o(function(){var _state$loadOptions$va;state.lifecycle.integrationsCDNPath.value=intgCdnUrl;state.lifecycle.pluginsCDNPath.value=pluginsCDNPath;if(state.loadOptions.value.logLevel){state.lifecycle.logLevel.value=state.loadOptions.value.logLevel;}state.lifecycle.sourceConfigUrl.value=getSourceConfigURL(state.loadOptions.value.configUrl,state.lifecycle.writeKey.value,lockIntegrationsVersion,_this2.logger);// Set consent manager plugin name in state
|
3421
|
-
state.consents.activeConsentManagerPluginName.value=consentManagerPluginName;// set storage type in state
|
3422
|
-
var storageType=(_state$loadOptions$va=state.loadOptions.value.storage)===null||_state$loadOptions$va===void 0?void 0:_state$loadOptions$va.type;if(!isValidStorageType(storageType)){var _this2$logger;(_this2$logger=_this2.logger)===null||_this2$logger===void 0||_this2$logger.warn(STORAGE_TYPE_VALIDATION_WARNING(CONFIG_MANAGER,storageType,DEFAULT_STORAGE_TYPE));state.storage.type.value=DEFAULT_STORAGE_TYPE;}else {state.storage.type.value=storageType;}});this.getConfig();}/**
|
3270
|
+
var pluginsCDNPath=getPluginsCDNPath(state.loadOptions.value.pluginsSDKBaseURL);updateStorageState(this.logger);updateConsentsState(this.logger);// set application lifecycle state in global state
|
3271
|
+
r(function(){state.lifecycle.integrationsCDNPath.value=intgCdnUrl;state.lifecycle.pluginsCDNPath.value=pluginsCDNPath;if(state.loadOptions.value.logLevel){state.lifecycle.logLevel.value=state.loadOptions.value.logLevel;}state.lifecycle.sourceConfigUrl.value=getSourceConfigURL(state.loadOptions.value.configUrl,state.lifecycle.writeKey.value,lockIntegrationsVersion,_this2.logger);});this.getConfig();}/**
|
3423
3272
|
* Handle errors
|
3424
3273
|
*/},{key:"onError",value:function onError(error,customMessage,shouldAlwaysThrow){if(this.hasErrorHandler){var _this$errorHandler;(_this$errorHandler=this.errorHandler)===null||_this$errorHandler===void 0||_this$errorHandler.onError(error,CONFIG_MANAGER,customMessage,shouldAlwaysThrow);}else {throw error;}}/**
|
3425
3274
|
* A callback function that is executed once we fetch the source config response.
|
3426
3275
|
* Use to construct and store information that are dependent on the sourceConfig.
|
3427
|
-
*/},{key:"processConfig",value:function processConfig(response,details){
|
3276
|
+
*/},{key:"processConfig",value:function processConfig(response,details){// TODO: add retry logic with backoff based on rejectionDetails.xhr.status
|
3428
3277
|
// We can use isErrRetryable utility method
|
3429
|
-
if(!response){this.onError(SOURCE_CONFIG_FETCH_ERROR(details===null||details===void 0?void 0:details.error));return;}var res;var errMessage='Unable to process/parse source config';try{if(isString(response)){res=JSON.parse(response);}else {res=response;}}catch(e){this.onError(e,errMessage,true);return;}if(!isValidSourceConfig(res)){this.onError(new Error(errMessage),undefined,true);return;}//
|
3278
|
+
if(!response){this.onError(SOURCE_CONFIG_FETCH_ERROR(details===null||details===void 0?void 0:details.error));return;}var res;var errMessage='Unable to process/parse source config';try{if(isString(response)){res=JSON.parse(response);}else {res=response;}}catch(e){this.onError(e,errMessage,true);return;}if(!isValidSourceConfig(res)){this.onError(new Error(errMessage),undefined,true);return;}// set the values in state for reporting slice
|
3279
|
+
updateReportingState(res,this.logger);// determine the dataPlane url
|
3430
3280
|
var dataPlaneUrl=resolveDataPlaneUrl(res.source.dataplanes,state.lifecycle.dataPlaneUrl.value,state.loadOptions.value.residencyServer,this.logger);if(!dataPlaneUrl){this.onError(new Error(DATA_PLANE_URL_ERROR),undefined,true);return;}var nativeDestinations=res.source.destinations.length>0?filterEnabledDestination(res.source.destinations):[];// set in the state --> source, destination, lifecycle, reporting
|
3431
|
-
|
3281
|
+
r(function(){var _state$loadOptions$va;// set source related information in state
|
3432
3282
|
state.source.value={config:res.source.config,id:res.source.id};// set device mode destination related information in state
|
3433
|
-
state.nativeDestinations.configuredDestinations.value=nativeDestinations;// set the
|
3434
|
-
|
3435
|
-
state.plugins.pluginsToLoadFromConfig.value=(_state$loadOptions$va2=state.loadOptions.value.plugins)!==null&&_state$loadOptions$va2!==void 0?_state$loadOptions$va2:[];// set application lifecycle state
|
3283
|
+
state.nativeDestinations.configuredDestinations.value=nativeDestinations;// set the desired optional plugins
|
3284
|
+
state.plugins.pluginsToLoadFromConfig.value=(_state$loadOptions$va=state.loadOptions.value.plugins)!==null&&_state$loadOptions$va!==void 0?_state$loadOptions$va:[];// set application lifecycle state
|
3436
3285
|
// Cast to string as we are sure that the value is not undefined
|
3437
3286
|
state.lifecycle.activeDataplaneUrl.value=removeTrailingSlashes(dataPlaneUrl);state.lifecycle.status.value=LifecycleStatus.Configured;});}/**
|
3438
3287
|
* A function to fetch source config either from /sourceConfig endpoint
|
3439
3288
|
* or from getSourceConfig load option
|
3440
3289
|
* @returns
|
3441
|
-
*/},{key:"getConfig",value:function getConfig(){var
|
3442
|
-
var res=sourceConfigFunc();if(res instanceof Promise){res.then(function(pRes){return
|
3290
|
+
*/},{key:"getConfig",value:function getConfig(){var _this3=this;var sourceConfigFunc=state.loadOptions.value.getSourceConfig;if(sourceConfigFunc){if(!isFunction(sourceConfigFunc)){throw new Error(SOURCE_CONFIG_OPTION_ERROR);}// fetch source config from the function
|
3291
|
+
var res=sourceConfigFunc();if(res instanceof Promise){res.then(function(pRes){return _this3.processConfig(pRes);}).catch(function(err){_this3.onError(err,'SourceConfig');});}else {this.processConfig(res);}}else {// fetch source config from config url API
|
3443
3292
|
this.httpClient.getAsyncData({url:state.lifecycle.sourceConfigUrl.value,options:{headers:{'Content-Type':undefined}},callback:this.processConfig});}}}]);return ConfigManager;}();
|
3444
3293
|
|
3445
3294
|
/**
|
@@ -3466,11 +3315,11 @@ var POLYFILL_SCRIPT_ID='rudderstackPolyfill';
|
|
3466
3315
|
var CapabilitiesManager=/*#__PURE__*/function(){function CapabilitiesManager(errorHandler,logger){_classCallCheck(this,CapabilitiesManager);this.logger=logger;this.errorHandler=errorHandler;this.externalSrcLoader=new ExternalSrcLoader(this.errorHandler,this.logger);this.onError=this.onError.bind(this);this.onReady=this.onReady.bind(this);}_createClass(CapabilitiesManager,[{key:"init",value:function init(){try{this.prepareBrowserCapabilities();this.attachWindowListeners();}catch(err){this.onError(err);}}/**
|
3467
3316
|
* Detect supported capabilities and set values in state
|
3468
3317
|
*/ // eslint-disable-next-line class-methods-use-this
|
3469
|
-
},{key:"detectBrowserCapabilities",value:function detectBrowserCapabilities(){var _this=this;
|
3318
|
+
},{key:"detectBrowserCapabilities",value:function detectBrowserCapabilities(){var _this=this;r(function(){// Storage related details
|
3470
3319
|
state.capabilities.storage.isCookieStorageAvailable.value=isStorageAvailable(COOKIE_STORAGE,getStorageEngine(COOKIE_STORAGE),_this.logger);state.capabilities.storage.isLocalStorageAvailable.value=isStorageAvailable(LOCAL_STORAGE,undefined,_this.logger);state.capabilities.storage.isSessionStorageAvailable.value=isStorageAvailable(SESSION_STORAGE,undefined,_this.logger);// Browser feature detection details
|
3471
3320
|
state.capabilities.isBeaconAvailable.value=hasBeacon();state.capabilities.isUaCHAvailable.value=hasUAClientHints();state.capabilities.isCryptoAvailable.value=hasCrypto();state.capabilities.isIE11.value=isIE11();state.capabilities.isOnline.value=globalThis.navigator.onLine;// Get page context details
|
3472
3321
|
state.context.userAgent.value=getUserAgent();state.context.locale.value=getLanguage();state.context.screen.value=getScreenDetails();if(hasUAClientHints()){getUserAgentClientHint(function(uach){state.context['ua-ch'].value=uach;},state.loadOptions.value.uaChTrackLevel);}});// Ad blocker detection
|
3473
|
-
|
3322
|
+
E(function(){if(state.loadOptions.value.sendAdblockPage===true&&state.lifecycle.sourceConfigUrl.value!==undefined){detectAdBlockers(_this.errorHandler,_this.logger);}});}/**
|
3474
3323
|
* Detect if polyfills are required and then load script from polyfill URL
|
3475
3324
|
*/},{key:"prepareBrowserCapabilities",value:function prepareBrowserCapabilities(){var _state$loadOptions$va,_this2=this;state.capabilities.isLegacyDOM.value=isLegacyJSEngine();var polyfillUrl=(_state$loadOptions$va=state.loadOptions.value.polyfillURL)!==null&&_state$loadOptions$va!==void 0?_state$loadOptions$va:POLYFILL_URL;var shouldLoadPolyfill=state.loadOptions.value.polyfillIfRequired&&state.capabilities.isLegacyDOM.value&&Boolean(polyfillUrl);if(shouldLoadPolyfill){var _this$externalSrcLoad;var isDefaultPolyfillService=polyfillUrl!==state.loadOptions.value.polyfillURL;if(isDefaultPolyfillService){var polyfillCallback=function polyfillCallback(){return _this2.onReady();};// write key specific callback
|
3476
3325
|
// NOTE: we're not putting this into RudderStackGlobals as providing the property path to the callback function in the polyfill URL is not possible
|
@@ -3489,7 +3338,7 @@ var CHANNEL='web';// These are the top-level elements in the standard RudderStac
|
|
3489
3338
|
var TOP_LEVEL_ELEMENTS=['integrations','anonymousId','originalTimestamp'];// Reserved elements in the context of standard RudderStack event spec
|
3490
3339
|
// Typically, these elements are not allowed to be overridden by the user
|
3491
3340
|
var CONTEXT_RESERVED_ELEMENTS=['library','consentManagement','userAgent','ua-ch','screen'];// Reserved elements in the standard RudderStack event spec
|
3492
|
-
var RESERVED_ELEMENTS=['anonymousId','sentAt','receivedAt','timestamp','originalTimestamp','event','messageId','channel'];
|
3341
|
+
var RESERVED_ELEMENTS=['anonymousId','sentAt','receivedAt','timestamp','originalTimestamp','event','messageId','channel'];
|
3493
3342
|
|
3494
3343
|
/**
|
3495
3344
|
* To get the page properties for context object
|
@@ -3504,7 +3353,6 @@ var curPageProps=getDefaultPageProperties();var ctxPageProps={};Object.keys(curP
|
|
3504
3353
|
var curPageProps=getDefaultPageProperties();Object.keys(curPageProps).forEach(function(key){if(isUndefined(pageProps[key])){pageProps[key]=optionsPageProps[key]||curPageProps[key];}});if(isUndefined(pageProps.initial_referrer)){pageProps.initial_referrer=optionsPageProps.initial_referrer||state.session.initialReferrer.value;}if(isUndefined(pageProps.initial_referring_domain)){pageProps.initial_referring_domain=optionsPageProps.initial_referring_domain||state.session.initialReferringDomain.value;}return pageProps;};/**
|
3505
3354
|
* Utility to check for reserved keys in the input object
|
3506
3355
|
* @param obj Generic object
|
3507
|
-
* @param eventType Rudder event type
|
3508
3356
|
* @param parentKeyPath Object's parent key path
|
3509
3357
|
* @param logger Logger instance
|
3510
3358
|
*/var checkForReservedElementsInObject=function checkForReservedElementsInObject(obj,parentKeyPath,logger){if(isObjectLiteralAndNotNull(obj)){Object.keys(obj).forEach(function(property){if(RESERVED_ELEMENTS.includes(property)||RESERVED_ELEMENTS.includes(property.toLowerCase())){logger===null||logger===void 0||logger.warn(RESERVED_KEYWORD_WARNING(EVENT_MANAGER,property,parentKeyPath,RESERVED_ELEMENTS));}});}};/**
|
@@ -3544,9 +3392,10 @@ rudderEvent.context=getMergedContext(rudderEvent.context,options);}};/**
|
|
3544
3392
|
* @param pageProps Page properties
|
3545
3393
|
* @param logger logger
|
3546
3394
|
* @returns Enriched RudderEvent object
|
3547
|
-
*/var getEnrichedEvent=function getEnrichedEvent(rudderEvent,options,pageProps,logger){var commonEventData={channel:CHANNEL,context:{traits:clone$1(state.session.userTraits.value),sessionId:state.session.sessionInfo.value.id||undefined,sessionStart:state.session.sessionInfo.value.sessionStart||undefined,consentManagement:{deniedConsentIds:clone$1(state.consents.data.value.deniedConsentIds)},'ua-ch':state.context['ua-ch'].value,app:state.context.app.value,library:state.context.library.value,userAgent:state.context.userAgent.value,os:state.context.os.value,locale:state.context.locale.value,screen:state.context.screen.value,campaign:extractUTMParameters(globalThis.location.href),page:getContextPageProperties(pageProps)},originalTimestamp:getCurrentTimeFormatted(),integrations:DEFAULT_INTEGRATIONS_CONFIG,messageId:generateUUID(),userId:rudderEvent.userId||state.session.userId.value};if(state.storage.
|
3548
|
-
commonEventData.anonymousId=generateUUID();
|
3549
|
-
commonEventData.anonymousId=state.session.
|
3395
|
+
*/var getEnrichedEvent=function getEnrichedEvent(rudderEvent,options,pageProps,logger){var _state$storage$entrie;var commonEventData={channel:CHANNEL,context:{traits:clone$1(state.session.userTraits.value),sessionId:state.session.sessionInfo.value.id||undefined,sessionStart:state.session.sessionInfo.value.sessionStart||undefined,consentManagement:{deniedConsentIds:clone$1(state.consents.data.value.deniedConsentIds)},'ua-ch':state.context['ua-ch'].value,app:state.context.app.value,library:state.context.library.value,userAgent:state.context.userAgent.value,os:state.context.os.value,locale:state.context.locale.value,screen:state.context.screen.value,campaign:extractUTMParameters(globalThis.location.href),page:getContextPageProperties(pageProps)},originalTimestamp:getCurrentTimeFormatted(),integrations:DEFAULT_INTEGRATIONS_CONFIG,messageId:generateUUID(),userId:rudderEvent.userId||state.session.userId.value};if(((_state$storage$entrie=state.storage.entries.value.anonymousId)===null||_state$storage$entrie===void 0?void 0:_state$storage$entrie.type)===NO_STORAGE){// Generate new anonymous id for each request
|
3396
|
+
commonEventData.anonymousId=generateUUID();}else {// Type casting to string as the user session manager will take care of initializing the value
|
3397
|
+
commonEventData.anonymousId=state.session.anonymousId.value;}// set truly anonymous tracking flag
|
3398
|
+
if(state.storage.trulyAnonymousTracking.value){commonEventData.context.trulyAnonymousTracking=true;}if(rudderEvent.type===RudderEventType.Identify){var _state$storage$entrie2;commonEventData.context.traits=((_state$storage$entrie2=state.storage.entries.value.userTraits)===null||_state$storage$entrie2===void 0?void 0:_state$storage$entrie2.type)!==NO_STORAGE?clone$1(state.session.userTraits.value):rudderEvent.context.traits;}if(rudderEvent.type===RudderEventType.Group){if(rudderEvent.groupId||state.session.groupId.value){commonEventData.groupId=rudderEvent.groupId||state.session.groupId.value;}if(rudderEvent.traits||state.session.groupTraits.value){var _state$storage$entrie3;commonEventData.traits=((_state$storage$entrie3=state.storage.entries.value.groupTraits)===null||_state$storage$entrie3===void 0?void 0:_state$storage$entrie3.type)!==NO_STORAGE?clone$1(state.session.groupTraits.value):rudderEvent.traits;}}var processedEvent=mergeDeepRight(rudderEvent,commonEventData);// Set the default values for the event properties
|
3550
3399
|
// matching with v1.1 payload
|
3551
3400
|
if(processedEvent.event===undefined){processedEvent.event=null;}if(processedEvent.properties===undefined){processedEvent.properties=null;}processOptions(processedEvent,options);// TODO: We might not need this check altogether
|
3552
3401
|
checkForReservedElements(processedEvent,logger);// Update the integrations config for the event
|
@@ -3620,17 +3469,15 @@ timeout:timeout,sessionStart:undefined,autoTrack:true};};/**
|
|
3620
3469
|
* @param id Provided sessionId
|
3621
3470
|
* @param logger Logger module
|
3622
3471
|
* @returns SessionInfo
|
3623
|
-
*/var generateManualTrackingSession=function generateManualTrackingSession(id,logger){var sessionId=isManualSessionIdValid(id,logger)?id:generateSessionId();return {id:sessionId,sessionStart:undefined,manualTrack:true};};
|
3472
|
+
*/var generateManualTrackingSession=function generateManualTrackingSession(id,logger){var sessionId=isManualSessionIdValid(id,logger)?id:generateSessionId();return {id:sessionId,sessionStart:undefined,manualTrack:true};};var isStorageTypeValidForStoringData=function isStorageTypeValidForStoringData(storageType){return !!(storageType===COOKIE_STORAGE||storageType===LOCAL_STORAGE||storageType===MEMORY_STORAGE);};
|
3624
3473
|
|
3625
|
-
var
|
3626
|
-
|
3627
|
-
var UserSessionManager=/*#__PURE__*/function(){function UserSessionManager(errorHandler,logger,pluginsManager,store){_classCallCheck(this,UserSessionManager);this.store=store;this.pluginsManager=pluginsManager;this.logger=logger;this.errorHandler=errorHandler;this.onError=this.onError.bind(this);}/**
|
3474
|
+
var UserSessionManager=/*#__PURE__*/function(){function UserSessionManager(errorHandler,logger,pluginsManager,storeManager){_classCallCheck(this,UserSessionManager);this.storeManager=storeManager;this.pluginsManager=pluginsManager;this.logger=logger;this.errorHandler=errorHandler;this.onError=this.onError.bind(this);}/**
|
3628
3475
|
* Initialize User session with values from storage
|
3629
3476
|
* @param store Selected store
|
3630
|
-
*/_createClass(UserSessionManager,[{key:"init",value:function init(
|
3631
|
-
|
3632
|
-
this.initializeSessionTracking()
|
3633
|
-
this.registerEffects();}}
|
3477
|
+
*/_createClass(UserSessionManager,[{key:"init",value:function init(){this.migrateStorageIfNeeded();this.migrateDataFromPreviousStorage();// get the values from storage and set it again
|
3478
|
+
var userId=this.getUserId();var userTraits=this.getUserTraits();var groupId=this.getGroupId();var groupTraits=this.getGroupTraits();var anonymousId=this.getAnonymousId();if(userId){this.setUserId(userId);}if(userTraits){this.setUserTraits(userTraits);}if(groupId){this.setGroupId(groupId);}if(groupTraits){this.setGroupTraits(groupTraits);}if(anonymousId){this.setAnonymousId(anonymousId);}var initialReferrer=this.getInitialReferrer();var initialReferringDomain=this.getInitialReferringDomain();if(initialReferrer&&initialReferringDomain){this.setInitialReferrer(initialReferrer);this.setInitialReferringDomain(initialReferringDomain);}else if(initialReferrer){this.setInitialReferrer(initialReferrer);this.setInitialReferringDomain(getReferringDomain(initialReferrer));}else {var referrer=getReferrer();this.setInitialReferrer(referrer);this.setInitialReferringDomain(getReferringDomain(referrer));}// Initialize session tracking
|
3479
|
+
if(this.isPersistenceEnabledForStorageEntry(UserSessionKeys.sessionInfo)){this.initializeSessionTracking();}// Register the effect to sync with storage
|
3480
|
+
this.registerEffects();}},{key:"isPersistenceEnabledForStorageEntry",value:function isPersistenceEnabledForStorageEntry(entryName){var _entries$entryName;var entries=state.storage.entries.value;return isStorageTypeValidForStoringData((_entries$entryName=entries[entryName])===null||_entries$entryName===void 0?void 0:_entries$entryName.type);}},{key:"migrateDataFromPreviousStorage",value:function migrateDataFromPreviousStorage(){var _this=this;var entries=state.storage.entries.value;Object.keys(entries).forEach(function(entry){var _entries$key,_this$storeManager;var key=entry;var currentStorage=(_entries$key=entries[key])===null||_entries$key===void 0?void 0:_entries$key.type;var curStore=(_this$storeManager=_this.storeManager)===null||_this$storeManager===void 0?void 0:_this$storeManager.getStore(storageClientDataStoreNameMap[currentStorage]);var storages=[COOKIE_STORAGE,LOCAL_STORAGE];storages.forEach(function(storage){var _this$storeManager2;var store=(_this$storeManager2=_this.storeManager)===null||_this$storeManager2===void 0?void 0:_this$storeManager2.getStore(storageClientDataStoreNameMap[storage]);if(storage!==currentStorage&&store){if(curStore){var value=store===null||store===void 0?void 0:store.get(userSessionStorageKeys[key]);if(isDefinedNotNullAndNotEmptyString(value)){curStore===null||curStore===void 0||curStore.set(userSessionStorageKeys[key],value);}}store===null||store===void 0||store.remove(userSessionStorageKeys[key]);}});});}},{key:"migrateStorageIfNeeded",value:function migrateStorageIfNeeded(){var _this$storeManager3,_this$storeManager4,_this2=this;if(!state.storage.migrate.value){return;}var cookieStorage=(_this$storeManager3=this.storeManager)===null||_this$storeManager3===void 0?void 0:_this$storeManager3.getStore(CLIENT_DATA_STORE_COOKIE);var localStorage=(_this$storeManager4=this.storeManager)===null||_this$storeManager4===void 0?void 0:_this$storeManager4.getStore(CLIENT_DATA_STORE_LS);var stores=[];if(cookieStorage){stores.push(cookieStorage);}if(localStorage){stores.push(localStorage);}Object.keys(userSessionStorageKeys).forEach(function(storageEntryKey){var key=storageEntryKey;var storageEntry=userSessionStorageKeys[key];stores.forEach(function(store){var _this2$pluginsManager;var migratedVal=(_this2$pluginsManager=_this2.pluginsManager)===null||_this2$pluginsManager===void 0?void 0:_this2$pluginsManager.invokeSingle('storage.migrate',storageEntry,store.engine,_this2.errorHandler,_this2.logger);if(migratedVal){store.set(storageEntry,migratedVal);}});});}/**
|
3634
3481
|
* A function to initialize sessionTracking
|
3635
3482
|
*/},{key:"initializeSessionTracking",value:function initializeSessionTracking(){var _this$getSessionFromS;var sessionInfo=(_this$getSessionFromS=this.getSessionFromStorage())!==null&&_this$getSessionFromS!==void 0?_this$getSessionFromS:defaultSessionInfo;var finalAutoTrackingStatus=!(state.loadOptions.value.sessions.autoTrack===false||sessionInfo.manualTrack===true);var sessionTimeout;var configuredSessionTimeout=state.loadOptions.value.sessions.timeout;if(!isPositiveInteger(configuredSessionTimeout)){var _this$logger;(_this$logger=this.logger)===null||_this$logger===void 0||_this$logger.warn(TIMEOUT_NOT_NUMBER_WARNING(USER_SESSION_MANAGER,configuredSessionTimeout,DEFAULT_SESSION_TIMEOUT_MS));sessionTimeout=DEFAULT_SESSION_TIMEOUT_MS;}else {sessionTimeout=configuredSessionTimeout;}if(sessionTimeout===0){var _this$logger2;(_this$logger2=this.logger)===null||_this$logger2===void 0||_this$logger2.warn(TIMEOUT_ZERO_WARNING(USER_SESSION_MANAGER));finalAutoTrackingStatus=false;}// In case user provides a timeout value greater than 0 but less than 10 seconds SDK will show a warning
|
3636
3483
|
// and will proceed with it
|
@@ -3642,87 +3489,90 @@ if(state.session.sessionInfo.value.autoTrack){this.startOrRenewAutoTracking();}}
|
|
3642
3489
|
* A function to sync values in storage
|
3643
3490
|
* @param key
|
3644
3491
|
* @param value
|
3645
|
-
*/},{key:"syncValueToStorage",value:function syncValueToStorage(
|
3492
|
+
*/},{key:"syncValueToStorage",value:function syncValueToStorage(sessionKey,value){var _entries$sessionKey,_entries$sessionKey2;var entries=state.storage.entries.value;var storage=(_entries$sessionKey=entries[sessionKey])===null||_entries$sessionKey===void 0?void 0:_entries$sessionKey.type;var key=(_entries$sessionKey2=entries[sessionKey])===null||_entries$sessionKey2===void 0?void 0:_entries$sessionKey2.key;if(isStorageTypeValidForStoringData(storage)){var _this$storeManager5;var curStore=(_this$storeManager5=this.storeManager)===null||_this$storeManager5===void 0?void 0:_this$storeManager5.getStore(storageClientDataStoreNameMap[storage]);if(value&&isString(value)||isNonEmptyObject(value)){curStore===null||curStore===void 0||curStore.set(key,value);}else {curStore===null||curStore===void 0||curStore.remove(key);}}}/**
|
3646
3493
|
* Function to update storage whenever state value changes
|
3647
|
-
*/},{key:"registerEffects",value:function registerEffects(){var
|
3494
|
+
*/},{key:"registerEffects",value:function registerEffects(){var _this3=this;/**
|
3648
3495
|
* Update userId in storage automatically when userId is updated in state
|
3649
|
-
*/
|
3496
|
+
*/E(function(){_this3.syncValueToStorage(UserSessionKeys.userId,state.session.userId.value);});/**
|
3650
3497
|
* Update user traits in storage automatically when it is updated in state
|
3651
|
-
*/
|
3498
|
+
*/E(function(){_this3.syncValueToStorage(UserSessionKeys.userTraits,state.session.userTraits.value);});/**
|
3652
3499
|
* Update group id in storage automatically when it is updated in state
|
3653
|
-
*/
|
3500
|
+
*/E(function(){_this3.syncValueToStorage(UserSessionKeys.groupId,state.session.groupId.value);});/**
|
3654
3501
|
* Update group traits in storage automatically when it is updated in state
|
3655
|
-
*/
|
3502
|
+
*/E(function(){_this3.syncValueToStorage(UserSessionKeys.groupTraits,state.session.groupTraits.value);});/**
|
3656
3503
|
* Update anonymous user id in storage automatically when it is updated in state
|
3657
|
-
*/
|
3504
|
+
*/E(function(){_this3.syncValueToStorage(UserSessionKeys.anonymousId,state.session.anonymousId.value);});/**
|
3658
3505
|
* Update initial referrer in storage automatically when it is updated in state
|
3659
|
-
*/
|
3506
|
+
*/E(function(){_this3.syncValueToStorage(UserSessionKeys.initialReferrer,state.session.initialReferrer.value);});/**
|
3660
3507
|
* Update initial referring domain in storage automatically when it is updated in state
|
3661
|
-
*/
|
3508
|
+
*/E(function(){_this3.syncValueToStorage(UserSessionKeys.initialReferringDomain,state.session.initialReferringDomain.value);});/**
|
3662
3509
|
* Update session tracking info in storage automatically when it is updated in state
|
3663
|
-
*/
|
3510
|
+
*/E(function(){_this3.syncValueToStorage(UserSessionKeys.sessionInfo,state.session.sessionInfo.value);});}/**
|
3664
3511
|
* Sets anonymous id in the following precedence:
|
3665
3512
|
*
|
3666
3513
|
* 1. anonymousId: Id directly provided to the function.
|
3667
3514
|
* 2. rudderAmpLinkerParam: value generated from linker query parm (rudderstack)
|
3668
3515
|
* using parseLinker util.
|
3669
3516
|
* 3. generateUUID: A new unique id is generated and assigned.
|
3670
|
-
*/},{key:"setAnonymousId",value:function setAnonymousId(anonymousId,rudderAmpLinkerParam){
|
3517
|
+
*/},{key:"setAnonymousId",value:function setAnonymousId(anonymousId,rudderAmpLinkerParam){var _state$storage$entrie;var finalAnonymousId=anonymousId;var storage=(_state$storage$entrie=state.storage.entries.value.anonymousId)===null||_state$storage$entrie===void 0?void 0:_state$storage$entrie.type;if(isStorageTypeValidForStoringData(storage)){if(!finalAnonymousId&&rudderAmpLinkerParam){var _this$pluginsManager;var linkerPluginsResult=(_this$pluginsManager=this.pluginsManager)===null||_this$pluginsManager===void 0?void 0:_this$pluginsManager.invokeMultiple('userSession.anonymousIdGoogleLinker',rudderAmpLinkerParam);finalAnonymousId=linkerPluginsResult===null||linkerPluginsResult===void 0?void 0:linkerPluginsResult[0];}state.session.anonymousId.value=finalAnonymousId||this.generateAnonymousId();}}/**
|
3671
3518
|
* Generate a new anonymousId
|
3672
3519
|
* @returns string anonymousID
|
3673
3520
|
*/},{key:"generateAnonymousId",value:function generateAnonymousId(){return generateUUID();}/**
|
3674
3521
|
* Fetches anonymousId
|
3675
3522
|
* @param options option to fetch it from external source
|
3676
3523
|
* @returns anonymousId
|
3677
|
-
*/},{key:"getAnonymousId",value:function getAnonymousId(options){var
|
3678
|
-
var
|
3679
|
-
var autoCapturedAnonymousId=(_this$
|
3524
|
+
*/},{key:"getAnonymousId",value:function getAnonymousId(options){var _state$storage$entrie2,_state$storage$entrie3;var storage=(_state$storage$entrie2=state.storage.entries.value.anonymousId)===null||_state$storage$entrie2===void 0?void 0:_state$storage$entrie2.type;var key=(_state$storage$entrie3=state.storage.entries.value.anonymousId)===null||_state$storage$entrie3===void 0?void 0:_state$storage$entrie3.key;var persistedAnonymousId;// fetch the anonymousId from storage
|
3525
|
+
if(isStorageTypeValidForStoringData(storage)){var _this$storeManager6;var store=(_this$storeManager6=this.storeManager)===null||_this$storeManager6===void 0?void 0:_this$storeManager6.getStore(storageClientDataStoreNameMap[storage]);persistedAnonymousId=store===null||store===void 0?void 0:store.get(key);if(!persistedAnonymousId&&options){var _this$pluginsManager2;// fetch anonymousId from external source
|
3526
|
+
var autoCapturedAnonymousId=(_this$pluginsManager2=this.pluginsManager)===null||_this$pluginsManager2===void 0?void 0:_this$pluginsManager2.invokeSingle('storage.getAnonymousId',getStorageEngine,options);persistedAnonymousId=autoCapturedAnonymousId;}state.session.anonymousId.value=persistedAnonymousId||this.generateAnonymousId();}return state.session.anonymousId.value;}},{key:"getItem",value:function getItem(sessionKey){var _entries$sessionKey3,_entries$sessionKey4;var entries=state.storage.entries.value;var storage=(_entries$sessionKey3=entries[sessionKey])===null||_entries$sessionKey3===void 0?void 0:_entries$sessionKey3.type;var key=(_entries$sessionKey4=entries[sessionKey])===null||_entries$sessionKey4===void 0?void 0:_entries$sessionKey4.key;if(isStorageTypeValidForStoringData(storage)){var _this$storeManager7,_store$get;var store=(_this$storeManager7=this.storeManager)===null||_this$storeManager7===void 0?void 0:_this$storeManager7.getStore(storageClientDataStoreNameMap[storage]);return (_store$get=store===null||store===void 0?void 0:store.get(key))!==null&&_store$get!==void 0?_store$get:null;}return null;}/**
|
3680
3527
|
* Fetches User Id
|
3681
3528
|
* @returns
|
3682
|
-
*/},{key:"getUserId",value:function getUserId(){
|
3529
|
+
*/},{key:"getUserId",value:function getUserId(){return this.getItem(UserSessionKeys.userId);}/**
|
3683
3530
|
* Fetches User Traits
|
3684
3531
|
* @returns
|
3685
|
-
*/},{key:"getUserTraits",value:function getUserTraits(){
|
3532
|
+
*/},{key:"getUserTraits",value:function getUserTraits(){return this.getItem(UserSessionKeys.userTraits);}/**
|
3686
3533
|
* Fetches Group Id
|
3687
3534
|
* @returns
|
3688
|
-
*/},{key:"getGroupId",value:function getGroupId(){
|
3535
|
+
*/},{key:"getGroupId",value:function getGroupId(){return this.getItem(UserSessionKeys.groupId);}/**
|
3689
3536
|
* Fetches Group Traits
|
3690
3537
|
* @returns
|
3691
|
-
*/},{key:"getGroupTraits",value:function getGroupTraits(){
|
3538
|
+
*/},{key:"getGroupTraits",value:function getGroupTraits(){return this.getItem(UserSessionKeys.groupTraits);}/**
|
3692
3539
|
* Fetches Initial Referrer
|
3693
3540
|
* @returns
|
3694
|
-
*/},{key:"getInitialReferrer",value:function getInitialReferrer(){
|
3541
|
+
*/},{key:"getInitialReferrer",value:function getInitialReferrer(){return this.getItem(UserSessionKeys.initialReferrer);}/**
|
3695
3542
|
* Fetches Initial Referring domain
|
3696
3543
|
* @returns
|
3697
|
-
*/},{key:"getInitialReferringDomain",value:function getInitialReferringDomain(){
|
3544
|
+
*/},{key:"getInitialReferringDomain",value:function getInitialReferringDomain(){return this.getItem(UserSessionKeys.initialReferringDomain);}/**
|
3698
3545
|
* Fetches session tracking information from storage
|
3699
3546
|
* @returns
|
3700
|
-
*/},{key:"getSessionFromStorage",value:function getSessionFromStorage(){
|
3547
|
+
*/},{key:"getSessionFromStorage",value:function getSessionFromStorage(){return this.getItem(UserSessionKeys.sessionInfo);}/**
|
3548
|
+
* If session is active it returns the sessionId
|
3549
|
+
* @returns
|
3550
|
+
*/},{key:"getSessionId",value:function getSessionId(){if(state.session.sessionInfo.value.autoTrack&&!hasSessionExpired(state.session.sessionInfo.value.expiresAt)||state.session.sessionInfo.value.manualTrack){return state.session.sessionInfo.value.id||null;}return null;}/**
|
3701
3551
|
* A function to update current session info after each event call
|
3702
3552
|
*/},{key:"refreshSession",value:function refreshSession(){if(state.session.sessionInfo.value.autoTrack||state.session.sessionInfo.value.manualTrack){if(state.session.sessionInfo.value.autoTrack){this.startOrRenewAutoTracking();}if(state.session.sessionInfo.value.sessionStart===undefined){state.session.sessionInfo.value=_objectSpread2(_objectSpread2({},state.session.sessionInfo.value),{},{sessionStart:true});}else if(state.session.sessionInfo.value.sessionStart){state.session.sessionInfo.value=_objectSpread2(_objectSpread2({},state.session.sessionInfo.value),{},{sessionStart:false});}}}/**
|
3703
3553
|
* Reset state values
|
3704
3554
|
* @param resetAnonymousId
|
3705
3555
|
* @param noNewSessionStart
|
3706
3556
|
* @returns
|
3707
|
-
*/},{key:"reset",value:function reset(resetAnonymousId,noNewSessionStart){var
|
3557
|
+
*/},{key:"reset",value:function reset(resetAnonymousId,noNewSessionStart){var _this4=this;var _state$session$sessio=state.session.sessionInfo.value,manualTrack=_state$session$sessio.manualTrack,autoTrack=_state$session$sessio.autoTrack;r(function(){state.session.userId.value=defaultUserSessionValues.userId;state.session.userTraits.value=defaultUserSessionValues.userTraits;state.session.groupId.value=defaultUserSessionValues.groupId;state.session.groupTraits.value=defaultUserSessionValues.groupTraits;if(resetAnonymousId){state.session.anonymousId.value=defaultUserSessionValues.anonymousId;}if(noNewSessionStart){return;}if(autoTrack){state.session.sessionInfo.value=defaultUserSessionValues.sessionInfo;_this4.startOrRenewAutoTracking();}else if(manualTrack){_this4.startManualTrackingInternal();}});}/**
|
3708
3558
|
* Set user Id
|
3709
3559
|
* @param userId
|
3710
|
-
*/},{key:"setUserId",value:function setUserId(userId){if(this.
|
3560
|
+
*/},{key:"setUserId",value:function setUserId(userId){if(this.isPersistenceEnabledForStorageEntry(UserSessionKeys.userId)){state.session.userId.value=userId;}}/**
|
3711
3561
|
* Set user traits
|
3712
3562
|
* @param traits
|
3713
|
-
*/},{key:"setUserTraits",value:function setUserTraits(traits){if(
|
3563
|
+
*/},{key:"setUserTraits",value:function setUserTraits(traits){if(this.isPersistenceEnabledForStorageEntry(UserSessionKeys.userTraits)&&traits){var _state$session$userTr;state.session.userTraits.value=mergeDeepRight((_state$session$userTr=state.session.userTraits.value)!==null&&_state$session$userTr!==void 0?_state$session$userTr:{},traits);}}/**
|
3714
3564
|
* Set group Id
|
3715
3565
|
* @param groupId
|
3716
|
-
*/},{key:"setGroupId",value:function setGroupId(groupId){if(this.
|
3566
|
+
*/},{key:"setGroupId",value:function setGroupId(groupId){if(this.isPersistenceEnabledForStorageEntry(UserSessionKeys.groupId)){state.session.groupId.value=groupId;}}/**
|
3717
3567
|
* Set group traits
|
3718
3568
|
* @param traits
|
3719
|
-
*/},{key:"setGroupTraits",value:function setGroupTraits(traits){if(
|
3569
|
+
*/},{key:"setGroupTraits",value:function setGroupTraits(traits){if(this.isPersistenceEnabledForStorageEntry(UserSessionKeys.groupTraits)&&traits){var _state$session$groupT;state.session.groupTraits.value=mergeDeepRight((_state$session$groupT=state.session.groupTraits.value)!==null&&_state$session$groupT!==void 0?_state$session$groupT:{},traits);}}/**
|
3720
3570
|
* Set initial referrer
|
3721
3571
|
* @param referrer
|
3722
|
-
*/},{key:"setInitialReferrer",value:function setInitialReferrer(referrer){if(this.
|
3572
|
+
*/},{key:"setInitialReferrer",value:function setInitialReferrer(referrer){if(this.isPersistenceEnabledForStorageEntry(UserSessionKeys.initialReferrer)){state.session.initialReferrer.value=referrer;}}/**
|
3723
3573
|
* Set initial referring domain
|
3724
3574
|
* @param referrer
|
3725
|
-
*/},{key:"setInitialReferringDomain",value:function setInitialReferringDomain(
|
3575
|
+
*/},{key:"setInitialReferringDomain",value:function setInitialReferringDomain(referringDomain){if(this.isPersistenceEnabledForStorageEntry(UserSessionKeys.initialReferringDomain)){state.session.initialReferringDomain.value=referringDomain;}}/**
|
3726
3576
|
* A function to check for existing session details and depending on that create a new session.
|
3727
3577
|
*/},{key:"startOrRenewAutoTracking",value:function startOrRenewAutoTracking(){if(hasSessionExpired(state.session.sessionInfo.value.expiresAt)){state.session.sessionInfo.value=generateAutoTrackingSession(state.session.sessionInfo.value.timeout);}else {var timestamp=Date.now();var timeout=state.session.sessionInfo.value.timeout;state.session.sessionInfo.value=mergeDeepRight(state.session.sessionInfo.value,{expiresAt:timestamp+timeout// set the expiry time of the session
|
3728
3578
|
});}}/**
|
@@ -3733,10 +3583,7 @@ var autoCapturedAnonymousId=(_this$pluginsManager3=this.pluginsManager)===null||
|
|
3733
3583
|
* An internal function to start manual session
|
3734
3584
|
*/},{key:"startManualTrackingInternal",value:function startManualTrackingInternal(){this.start(Date.now());}/**
|
3735
3585
|
* A public method to end an ongoing session.
|
3736
|
-
*/},{key:"end",value:function end(){state.session.sessionInfo.value={};}
|
3737
|
-
* Clear storage
|
3738
|
-
* @param resetAnonymousId
|
3739
|
-
*/},{key:"clearUserSessionStorage",value:function clearUserSessionStorage(resetAnonymousId){var _this$store12,_this$store13,_this$store14,_this$store15;(_this$store12=this.store)===null||_this$store12===void 0||_this$store12.remove(userSessionStorageKeys.userId);(_this$store13=this.store)===null||_this$store13===void 0||_this$store13.remove(userSessionStorageKeys.userTraits);(_this$store14=this.store)===null||_this$store14===void 0||_this$store14.remove(userSessionStorageKeys.groupId);(_this$store15=this.store)===null||_this$store15===void 0||_this$store15.remove(userSessionStorageKeys.groupTraits);if(resetAnonymousId){var _this$store16;(_this$store16=this.store)===null||_this$store16===void 0||_this$store16.remove(userSessionStorageKeys.anonymousUserId);}}}]);return UserSessionManager;}();
|
3586
|
+
*/},{key:"end",value:function end(){state.session.sessionInfo.value={};}}]);return UserSessionManager;}();
|
3740
3587
|
|
3741
3588
|
/**
|
3742
3589
|
* A buffer queue to serve as a store for any type of data
|
@@ -3744,6 +3591,20 @@ var autoCapturedAnonymousId=(_this$pluginsManager3=this.pluginsManager)===null||
|
|
3744
3591
|
|
3745
3592
|
var DATA_PLANE_QUEUE_EXT_POINT_PREFIX='dataplaneEventsQueue';var DESTINATIONS_QUEUE_EXT_POINT_PREFIX='destinationsEventsQueue';
|
3746
3593
|
|
3594
|
+
/**
|
3595
|
+
* Filters and returns the user supplied integrations config that should take preference over the destination specific integrations config
|
3596
|
+
* @param eventIntgConfig User supplied integrations config at event level
|
3597
|
+
* @param destinationsIntgConfig Cumulative integrations config from all destinations
|
3598
|
+
* @returns Filtered user supplied integrations config
|
3599
|
+
*/var getOverriddenIntegrationOptions=function getOverriddenIntegrationOptions(eventIntgConfig,destinationsIntgConfig){return Object.keys(eventIntgConfig).filter(function(intgName){return eventIntgConfig[intgName]!==true||!destinationsIntgConfig[intgName];}).reduce(function(obj,key){var retVal=clone$1(obj);retVal[key]=eventIntgConfig[key];return retVal;},{});};/**
|
3600
|
+
* Returns the event object with final integrations config
|
3601
|
+
* @param event RudderEvent object
|
3602
|
+
* @param state Application state
|
3603
|
+
* @returns Mutated event with final integrations config
|
3604
|
+
*/var getFinalEvent=function getFinalEvent(event,state){var _event$integrations;var finalEvent=clone$1(event);// Merge the destination specific integrations config with the event's integrations config
|
3605
|
+
// In general, the preference is given to the event's integrations config
|
3606
|
+
var eventIntgConfig=(_event$integrations=event.integrations)!==null&&_event$integrations!==void 0?_event$integrations:DEFAULT_INTEGRATIONS_CONFIG;var destinationsIntgConfig=state.nativeDestinations.integrationsConfig.value;var overriddenIntgOpts=getOverriddenIntegrationOptions(eventIntgConfig,destinationsIntgConfig);finalEvent.integrations=mergeDeepRight(destinationsIntgConfig,overriddenIntgOpts);return finalEvent;};
|
3607
|
+
|
3747
3608
|
/**
|
3748
3609
|
* Event repository class responsible for queuing events for further processing and delivery
|
3749
3610
|
*/var EventRepository=/*#__PURE__*/function(){/**
|
@@ -3755,16 +3616,16 @@ var DATA_PLANE_QUEUE_EXT_POINT_PREFIX='dataplaneEventsQueue';var DESTINATIONS_QU
|
|
3755
3616
|
*/function EventRepository(pluginsManager,storeManager,errorHandler,logger){_classCallCheck(this,EventRepository);this.pluginsManager=pluginsManager;this.errorHandler=errorHandler;this.logger=logger;this.httpClient=new HttpClient(errorHandler,logger);this.storeManager=storeManager;this.onError=this.onError.bind(this);}/**
|
3756
3617
|
* Initializes the event repository
|
3757
3618
|
*/_createClass(EventRepository,[{key:"init",value:function init(){var _this=this;this.dataplaneEventsQueue=this.pluginsManager.invokeSingle("".concat(DATA_PLANE_QUEUE_EXT_POINT_PREFIX,".init"),state,this.httpClient,this.storeManager,this.errorHandler,this.logger);this.destinationsEventsQueue=this.pluginsManager.invokeSingle("".concat(DESTINATIONS_QUEUE_EXT_POINT_PREFIX,".init"),state,this.pluginsManager,this.storeManager,this.errorHandler,this.logger);// Start the queue once the client destinations are ready
|
3758
|
-
|
3619
|
+
E(function(){if(state.nativeDestinations.clientDestinationsReady.value===true){var _this$destinationsEve;(_this$destinationsEve=_this.destinationsEventsQueue)===null||_this$destinationsEve===void 0||_this$destinationsEve.start();}});// Start the queue processing only when the destinations are ready or hybrid mode destinations exist
|
3759
3620
|
// However, events will be enqueued for now.
|
3760
3621
|
// At the time of processing the events, the integrations config data from destinations
|
3761
3622
|
// is merged into the event object
|
3762
|
-
var timeoutId;
|
3623
|
+
var timeoutId;E(function(){var _this$dataplaneEvents;var shouldBufferDpEvents=state.loadOptions.value.bufferDataPlaneEventsUntilReady===true&&state.nativeDestinations.clientDestinationsReady.value===false;var hybridDestExist=state.nativeDestinations.activeDestinations.value.some(function(dest){return isHybridModeDestination(dest);});if((hybridDestExist===false||shouldBufferDpEvents===false)&&((_this$dataplaneEvents=_this.dataplaneEventsQueue)===null||_this$dataplaneEvents===void 0?void 0:_this$dataplaneEvents.scheduleTimeoutActive)!==true){var _this$dataplaneEvents2;globalThis.clearTimeout(timeoutId);(_this$dataplaneEvents2=_this.dataplaneEventsQueue)===null||_this$dataplaneEvents2===void 0||_this$dataplaneEvents2.start();}});// Force start the data plane events queue processing after a timeout
|
3763
3624
|
if(state.loadOptions.value.bufferDataPlaneEventsUntilReady===true){timeoutId=globalThis.setTimeout(function(){var _this$dataplaneEvents3;if(((_this$dataplaneEvents3=_this.dataplaneEventsQueue)===null||_this$dataplaneEvents3===void 0?void 0:_this$dataplaneEvents3.scheduleTimeoutActive)!==true){var _this$dataplaneEvents4;(_this$dataplaneEvents4=_this.dataplaneEventsQueue)===null||_this$dataplaneEvents4===void 0||_this$dataplaneEvents4.start();}},state.loadOptions.value.dataPlaneEventsBufferTimeout);}}/**
|
3764
3625
|
* Enqueues the event for processing
|
3765
3626
|
* @param event RudderEvent object
|
3766
3627
|
* @param callback API callback function
|
3767
|
-
*/},{key:"enqueue",value:function enqueue(event,callback){var dpQEvent=
|
3628
|
+
*/},{key:"enqueue",value:function enqueue(event,callback){var dpQEvent=getFinalEvent(event,state);this.pluginsManager.invokeSingle("".concat(DATA_PLANE_QUEUE_EXT_POINT_PREFIX,".enqueue"),state,this.dataplaneEventsQueue,dpQEvent,this.errorHandler,this.logger);var dQEvent=clone$1(event);this.pluginsManager.invokeSingle("".concat(DESTINATIONS_QUEUE_EXT_POINT_PREFIX,".enqueue"),state,this.destinationsEventsQueue,dQEvent,this.errorHandler,this.logger);// Invoke the callback if it exists
|
3768
3629
|
try{// Using the event sent to the data plane queue here
|
3769
3630
|
// to ensure the mutated (if any) event is sent to the callback
|
3770
3631
|
callback===null||callback===void 0||callback(dpQEvent);}catch(error){this.onError(error,API_CALLBACK_INVOKE_ERROR);}}/**
|
@@ -3782,25 +3643,25 @@ callback===null||callback===void 0||callback(dpQEvent);}catch(error){this.onErro
|
|
3782
3643
|
* Start application lifecycle if not already started
|
3783
3644
|
*/_createClass(Analytics,[{key:"load",value:function load(writeKey,dataPlaneUrl){var loadOptions=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(state.lifecycle.status.value){return;}var clonedDataPlaneUrl=clone$1(dataPlaneUrl);var clonedLoadOptions=clone$1(loadOptions);// dataPlaneUrl is not provided
|
3784
3645
|
if(isObjectAndNotNull(dataPlaneUrl)){clonedLoadOptions=dataPlaneUrl;clonedDataPlaneUrl=undefined;}// Set initial state values
|
3785
|
-
|
3646
|
+
r(function(){state.lifecycle.writeKey.value=writeKey;state.lifecycle.dataPlaneUrl.value=clonedDataPlaneUrl;state.loadOptions.value=normalizeLoadOptions(state.loadOptions.value,clonedLoadOptions);state.lifecycle.status.value=LifecycleStatus.Mounted;});// Expose state to global objects
|
3786
3647
|
setExposedGlobal('state',state,writeKey);// Configure initial config of any services or components here
|
3787
3648
|
// State application lifecycle
|
3788
3649
|
this.startLifecycle();}// Start lifecycle methods
|
3789
3650
|
/**
|
3790
3651
|
* Orchestrate the lifecycle of the application phases/status
|
3791
|
-
*/},{key:"startLifecycle",value:function startLifecycle(){var _this=this;
|
3652
|
+
*/},{key:"startLifecycle",value:function startLifecycle(){var _this=this;E(function(){try{switch(state.lifecycle.status.value){case LifecycleStatus.Mounted:_this.prepareBrowserCapabilities();break;case LifecycleStatus.BrowserCapabilitiesReady:// initialize the preloaded events enqueuing
|
3792
3653
|
retrievePreloadBufferEvents(_this);_this.prepareInternalServices();_this.loadConfig();break;case LifecycleStatus.Configured:_this.loadPlugins();break;case LifecycleStatus.PluginsLoading:break;case LifecycleStatus.PluginsReady:_this.init();break;case LifecycleStatus.Initialized:_this.onInitialized();break;case LifecycleStatus.Loaded:_this.loadDestinations();_this.processBufferedEvents();break;case LifecycleStatus.DestinationsLoading:break;case LifecycleStatus.DestinationsReady:_this.onDestinationsReady();break;case LifecycleStatus.Ready:_this.onReady();break;default:break;}}catch(err){var issue='Failed to load the SDK';_this.errorHandler.onError(getMutatedError(err,issue),ANALYTICS_CORE);}});}/**
|
3793
3654
|
* Load browser polyfill if required
|
3794
3655
|
*/},{key:"prepareBrowserCapabilities",value:function prepareBrowserCapabilities(){this.capabilitiesManager.init();}/**
|
3795
3656
|
* Enqueue in SDK preload buffer events, used from preloadBuffer component
|
3796
3657
|
*/},{key:"enqueuePreloadBufferEvents",value:function enqueuePreloadBufferEvents(bufferedEvents){var _this2=this;if(Array.isArray(bufferedEvents)){bufferedEvents.forEach(function(bufferedEvent){return _this2.preloadBuffer.enqueue(clone$1(bufferedEvent));});}}/**
|
3797
3658
|
* Process the buffer preloaded events by passing their arguments to the respective facade methods
|
3798
|
-
*/},{key:"processDataInPreloadBuffer",value:function processDataInPreloadBuffer(){while(this.preloadBuffer.size()>0){var eventToProcess=this.preloadBuffer.dequeue();if(eventToProcess){consumePreloadBufferedEvent(_toConsumableArray(eventToProcess),this);}}}},{key:"prepareInternalServices",value:function prepareInternalServices(){this.pluginsManager=new PluginsManager(defaultPluginEngine,this.errorHandler,this.logger);this.storeManager=new StoreManager(this.pluginsManager,this.errorHandler,this.logger);this.configManager=new ConfigManager(this.httpClient,this.errorHandler,this.logger);this.userSessionManager=new UserSessionManager(this.errorHandler,this.logger,this.pluginsManager);this.eventRepository=new EventRepository(this.pluginsManager,this.storeManager,this.errorHandler,this.logger);this.eventManager=new EventManager(this.eventRepository,this.userSessionManager,this.errorHandler,this.logger);}/**
|
3659
|
+
*/},{key:"processDataInPreloadBuffer",value:function processDataInPreloadBuffer(){while(this.preloadBuffer.size()>0){var eventToProcess=this.preloadBuffer.dequeue();if(eventToProcess){consumePreloadBufferedEvent(_toConsumableArray(eventToProcess),this);}}}},{key:"prepareInternalServices",value:function prepareInternalServices(){this.pluginsManager=new PluginsManager(defaultPluginEngine,this.errorHandler,this.logger);this.storeManager=new StoreManager(this.pluginsManager,this.errorHandler,this.logger);this.configManager=new ConfigManager(this.httpClient,this.errorHandler,this.logger);this.userSessionManager=new UserSessionManager(this.errorHandler,this.logger,this.pluginsManager,this.storeManager);this.eventRepository=new EventRepository(this.pluginsManager,this.storeManager,this.errorHandler,this.logger);this.eventManager=new EventManager(this.eventRepository,this.userSessionManager,this.errorHandler,this.logger);}/**
|
3799
3660
|
* Load configuration
|
3800
3661
|
*/},{key:"loadConfig",value:function loadConfig(){var _this$configManager;if(!state.lifecycle.writeKey.value){this.errorHandler.onError(new Error('A write key is required to load the SDK. Please provide a valid write key.'),LOAD_CONFIGURATION);return;}this.httpClient.setAuthHeader(state.lifecycle.writeKey.value);(_this$configManager=this.configManager)===null||_this$configManager===void 0||_this$configManager.init();}/**
|
3801
3662
|
* Initialize the storage and event queue
|
3802
|
-
*/},{key:"init",value:function init(){var _this$storeManager,_this$
|
3803
|
-
(_this$storeManager=this.storeManager)===null||_this$storeManager===void 0||_this$storeManager.init();
|
3663
|
+
*/},{key:"init",value:function init(){var _this$storeManager,_this$userSessionMana,_this$eventManager;this.errorHandler.init(this.externalSrcLoader);// Initialize storage
|
3664
|
+
(_this$storeManager=this.storeManager)===null||_this$storeManager===void 0||_this$storeManager.init();(_this$userSessionMana=this.userSessionManager)===null||_this$userSessionMana===void 0||_this$userSessionMana.init();// Initialize consent manager
|
3804
3665
|
if(state.consents.activeConsentManagerPluginName.value){var _this$pluginsManager;(_this$pluginsManager=this.pluginsManager)===null||_this$pluginsManager===void 0||_this$pluginsManager.invokeSingle("consentManager.init",state,this.storeManager,this.logger);}// Initialize event manager
|
3805
3666
|
(_this$eventManager=this.eventManager)===null||_this$eventManager===void 0||_this$eventManager.init();// Mark the SDK as initialized
|
3806
3667
|
state.lifecycle.status.value=LifecycleStatus.Initialized;}/**
|
@@ -3814,7 +3675,7 @@ this.processDataInPreloadBuffer();// TODO: we need to avoid passing the window o
|
|
3814
3675
|
// as this will prevent us from supporting multiple SDK instances in the same page
|
3815
3676
|
// Execute onLoaded callback if provided in load options
|
3816
3677
|
if(isFunction(state.loadOptions.value.onLoaded)){state.loadOptions.value.onLoaded(globalThis.rudderanalytics);}// Set lifecycle state
|
3817
|
-
|
3678
|
+
r(function(){state.lifecycle.loaded.value=true;state.lifecycle.status.value=LifecycleStatus.Loaded;});this.initialized=true;// Emit an event to use as substitute to the onLoaded callback
|
3818
3679
|
var initializedEvent=new CustomEvent('RSA_Initialised',{detail:{analyticsInstance:globalThis.rudderanalytics},bubbles:true,cancelable:true,composed:true});globalThis.document.dispatchEvent(initializedEvent);}/**
|
3819
3680
|
* Emit ready event
|
3820
3681
|
*/ // eslint-disable-next-line class-methods-use-this
|
@@ -3827,7 +3688,7 @@ state.eventBuffer.toBeProcessedArray.value.forEach(function(bufferedItem){var me
|
|
3827
3688
|
*/},{key:"loadDestinations",value:function loadDestinations(){var _this$pluginsManager3,_this$pluginsManager4;// Set in state the desired activeDestinations to inject in DOM
|
3828
3689
|
(_this$pluginsManager3=this.pluginsManager)===null||_this$pluginsManager3===void 0||_this$pluginsManager3.invokeSingle('nativeDestinations.setActiveDestinations',state,this.pluginsManager,this.errorHandler,this.logger);var totalDestinationsToLoad=state.nativeDestinations.activeDestinations.value.length;if(totalDestinationsToLoad===0){state.lifecycle.status.value=LifecycleStatus.DestinationsReady;return;}// Start loading native integration scripts and create instances
|
3829
3690
|
state.lifecycle.status.value=LifecycleStatus.DestinationsLoading;(_this$pluginsManager4=this.pluginsManager)===null||_this$pluginsManager4===void 0||_this$pluginsManager4.invokeSingle('nativeDestinations.load',state,this.externalSrcLoader,this.errorHandler,this.logger);// Progress to next lifecycle phase if all native destinations are initialized or failed
|
3830
|
-
|
3691
|
+
E(function(){var areAllDestinationsReady=totalDestinationsToLoad===0||state.nativeDestinations.initializedDestinations.value.length+state.nativeDestinations.failedDestinations.value.length===totalDestinationsToLoad;if(areAllDestinationsReady){r(function(){state.lifecycle.status.value=LifecycleStatus.DestinationsReady;state.nativeDestinations.clientDestinationsReady.value=true;});}});}/**
|
3831
3692
|
* Invoke the ready callbacks if any exist
|
3832
3693
|
*/ // eslint-disable-next-line class-methods-use-this
|
3833
3694
|
},{key:"onDestinationsReady",value:function onDestinationsReady(){var _this4=this;state.eventBuffer.readyCallbacksArray.value.forEach(function(callback){try{callback();}catch(err){_this4.errorHandler.onError(err,ANALYTICS_CORE,READY_CALLBACK_INVOKE_ERROR);}});state.lifecycle.status.value=LifecycleStatus.Ready;}// End lifecycle methods
|
@@ -3849,7 +3710,7 @@ if(!state.lifecycle.loaded.value){state.eventBuffer.toBeProcessedArray.value.pus
|
|
3849
3710
|
},{key:"getUserTraits",value:function getUserTraits(){return state.session.userTraits.value;}// eslint-disable-next-line class-methods-use-this
|
3850
3711
|
},{key:"getGroupId",value:function getGroupId(){return state.session.groupId.value;}// eslint-disable-next-line class-methods-use-this
|
3851
3712
|
},{key:"getGroupTraits",value:function getGroupTraits(){return state.session.groupTraits.value;}},{key:"startSession",value:function startSession(sessionId){var _this$userSessionMana11;var type='startSession';this.errorHandler.leaveBreadcrumb("New ".concat(type," invocation"));if(!state.lifecycle.loaded.value){state.eventBuffer.toBeProcessedArray.value.push([type,sessionId]);return;}(_this$userSessionMana11=this.userSessionManager)===null||_this$userSessionMana11===void 0||_this$userSessionMana11.start(sessionId);}},{key:"endSession",value:function endSession(){var _this$userSessionMana12;var type='endSession';this.errorHandler.leaveBreadcrumb("New ".concat(type," invocation"));if(!state.lifecycle.loaded.value){state.eventBuffer.toBeProcessedArray.value.push([type]);return;}(_this$userSessionMana12=this.userSessionManager)===null||_this$userSessionMana12===void 0||_this$userSessionMana12.end();}// eslint-disable-next-line class-methods-use-this
|
3852
|
-
},{key:"getSessionId",value:function getSessionId(){var _this$userSessionMana13
|
3713
|
+
},{key:"getSessionId",value:function getSessionId(){var _this$userSessionMana13;var sessionId=(_this$userSessionMana13=this.userSessionManager)===null||_this$userSessionMana13===void 0?void 0:_this$userSessionMana13.getSessionId();return sessionId!==null&&sessionId!==void 0?sessionId:null;}// End consumer exposed methods
|
3853
3714
|
}]);return Analytics;}();
|
3854
3715
|
|
3855
3716
|
/*
|
@@ -3867,7 +3728,7 @@ this.triggerBufferedLoadEvent();}/**
|
|
3867
3728
|
* Set instance to use if no specific writeKey is provided in methods
|
3868
3729
|
* automatically for the first created instance
|
3869
3730
|
* TODO: to support multiple analytics instances in the near future
|
3870
|
-
*/_createClass(RudderAnalytics,[{key:"setDefaultInstanceKey",value:function setDefaultInstanceKey(writeKey){if(
|
3731
|
+
*/_createClass(RudderAnalytics,[{key:"setDefaultInstanceKey",value:function setDefaultInstanceKey(writeKey){if(writeKey){this.defaultAnalyticsKey=writeKey;}}/**
|
3871
3732
|
* Retrieve an existing analytics instance
|
3872
3733
|
*/},{key:"getAnalyticsInstance",value:function getAnalyticsInstance(writeKey){var instanceId=writeKey!==null&&writeKey!==void 0?writeKey:this.defaultAnalyticsKey;var analyticsInstanceExists=Boolean(this.analyticsInstances[instanceId]);if(!analyticsInstanceExists){this.analyticsInstances[instanceId]=new Analytics();}return this.analyticsInstances[instanceId];}/**
|
3873
3734
|
* Create new analytics instance and trigger application lifecycle start
|