@rudderstack/analytics-js 3.0.0-beta.19 → 3.0.0-beta.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/npm/index.d.ts +30 -16
- package/dist/npm/legacy/cjs/index.js +193 -206
- package/dist/npm/legacy/esm/index.js +193 -206
- package/dist/npm/legacy/umd/index.js +193 -206
- package/dist/npm/modern/bundled/cjs/index.js +139 -130
- package/dist/npm/modern/bundled/esm/index.js +139 -130
- package/dist/npm/modern/bundled/umd/index.js +139 -130
- package/dist/npm/modern/cjs/index.js +55 -48
- package/dist/npm/modern/content-script/cjs/index.js +138 -129
- package/dist/npm/modern/content-script/esm/index.js +138 -129
- package/dist/npm/modern/content-script/umd/index.js +138 -129
- package/dist/npm/modern/esm/index.js +55 -48
- package/dist/npm/modern/umd/index.js +55 -48
- package/package.json +1 -1
@@ -4,6 +4,24 @@
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.rudderanalytics = {}));
|
5
5
|
})(this, (function (exports) { 'use strict';
|
6
6
|
|
7
|
+
function _callSuper(t, o, e) {
|
8
|
+
return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));
|
9
|
+
}
|
10
|
+
function _construct(t, e, r) {
|
11
|
+
if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
|
12
|
+
var o = [null];
|
13
|
+
o.push.apply(o, e);
|
14
|
+
var p = new (t.bind.apply(t, o))();
|
15
|
+
return r && _setPrototypeOf(p, r.prototype), p;
|
16
|
+
}
|
17
|
+
function _isNativeReflectConstruct() {
|
18
|
+
try {
|
19
|
+
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
20
|
+
} catch (t) {}
|
21
|
+
return (_isNativeReflectConstruct = function () {
|
22
|
+
return !!t;
|
23
|
+
})();
|
24
|
+
}
|
7
25
|
function ownKeys(e, r) {
|
8
26
|
var t = Object.keys(e);
|
9
27
|
if (Object.getOwnPropertySymbols) {
|
@@ -326,6 +344,20 @@
|
|
326
344
|
}
|
327
345
|
}, e;
|
328
346
|
}
|
347
|
+
function _toPrimitive(t, r) {
|
348
|
+
if ("object" != typeof t || !t) return t;
|
349
|
+
var e = t[Symbol.toPrimitive];
|
350
|
+
if (void 0 !== e) {
|
351
|
+
var i = e.call(t, r || "default");
|
352
|
+
if ("object" != typeof i) return i;
|
353
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
354
|
+
}
|
355
|
+
return ("string" === r ? String : Number)(t);
|
356
|
+
}
|
357
|
+
function _toPropertyKey(t) {
|
358
|
+
var i = _toPrimitive(t, "string");
|
359
|
+
return "symbol" == typeof i ? i : String(i);
|
360
|
+
}
|
329
361
|
function _typeof(o) {
|
330
362
|
"@babel/helpers - typeof";
|
331
363
|
|
@@ -430,32 +462,6 @@
|
|
430
462
|
};
|
431
463
|
return _setPrototypeOf(o, p);
|
432
464
|
}
|
433
|
-
function _isNativeReflectConstruct() {
|
434
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
435
|
-
if (Reflect.construct.sham) return false;
|
436
|
-
if (typeof Proxy === "function") return true;
|
437
|
-
try {
|
438
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
439
|
-
return true;
|
440
|
-
} catch (e) {
|
441
|
-
return false;
|
442
|
-
}
|
443
|
-
}
|
444
|
-
function _construct(Parent, args, Class) {
|
445
|
-
if (_isNativeReflectConstruct()) {
|
446
|
-
_construct = Reflect.construct.bind();
|
447
|
-
} else {
|
448
|
-
_construct = function _construct(Parent, args, Class) {
|
449
|
-
var a = [null];
|
450
|
-
a.push.apply(a, args);
|
451
|
-
var Constructor = Function.bind.apply(Parent, a);
|
452
|
-
var instance = new Constructor();
|
453
|
-
if (Class) _setPrototypeOf(instance, Class.prototype);
|
454
|
-
return instance;
|
455
|
-
};
|
456
|
-
}
|
457
|
-
return _construct.apply(null, arguments);
|
458
|
-
}
|
459
465
|
function _assertThisInitialized(self) {
|
460
466
|
if (self === void 0) {
|
461
467
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
@@ -470,20 +476,6 @@
|
|
470
476
|
}
|
471
477
|
return _assertThisInitialized(self);
|
472
478
|
}
|
473
|
-
function _createSuper(Derived) {
|
474
|
-
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
475
|
-
return function _createSuperInternal() {
|
476
|
-
var Super = _getPrototypeOf(Derived),
|
477
|
-
result;
|
478
|
-
if (hasNativeReflectConstruct) {
|
479
|
-
var NewTarget = _getPrototypeOf(this).constructor;
|
480
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
481
|
-
} else {
|
482
|
-
result = Super.apply(this, arguments);
|
483
|
-
}
|
484
|
-
return _possibleConstructorReturn(this, result);
|
485
|
-
};
|
486
|
-
}
|
487
479
|
function _superPropBase(object, property) {
|
488
480
|
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
489
481
|
object = _getPrototypeOf(object);
|
@@ -532,20 +524,6 @@
|
|
532
524
|
function _nonIterableSpread() {
|
533
525
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
534
526
|
}
|
535
|
-
function _toPrimitive(input, hint) {
|
536
|
-
if (typeof input !== "object" || input === null) return input;
|
537
|
-
var prim = input[Symbol.toPrimitive];
|
538
|
-
if (prim !== undefined) {
|
539
|
-
var res = prim.call(input, hint || "default");
|
540
|
-
if (typeof res !== "object") return res;
|
541
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
542
|
-
}
|
543
|
-
return (hint === "string" ? String : Number)(input);
|
544
|
-
}
|
545
|
-
function _toPropertyKey(arg) {
|
546
|
-
var key = _toPrimitive(arg, "string");
|
547
|
-
return typeof key === "symbol" ? key : String(key);
|
548
|
-
}
|
549
527
|
|
550
528
|
function _isPlaceholder(a){return a!=null&&_typeof(a)==='object'&&a['@@functional/placeholder']===true;}
|
551
529
|
|
@@ -603,7 +581,7 @@
|
|
603
581
|
* R.type(() => {}); //=> "Function"
|
604
582
|
* R.type(async () => {}); //=> "AsyncFunction"
|
605
583
|
* R.type(undefined); //=> "Undefined"
|
606
|
-
*/var type=/*#__PURE__*/_curry1(function type(val){return val===null?'Null':val===undefined?'Undefined':Object.prototype.toString.call(val).slice(8,-1);});
|
584
|
+
*/var type=/*#__PURE__*/_curry1(function type(val){return val===null?'Null':val===undefined?'Undefined':Object.prototype.toString.call(val).slice(8,-1);});
|
607
585
|
|
608
586
|
function _isObject(x){return Object.prototype.toString.call(x)==='[object Object]';}
|
609
587
|
|
@@ -643,7 +621,7 @@
|
|
643
621
|
* @symb R.nth(-1, [a, b, c]) = c
|
644
622
|
* @symb R.nth(0, [a, b, c]) = a
|
645
623
|
* @symb R.nth(1, [a, b, c]) = b
|
646
|
-
*/var nth=/*#__PURE__*/_curry2(function nth(offset,list){var idx=offset<0?list.length+offset:offset;return _isString(list)?list.charAt(idx):list[idx];});
|
624
|
+
*/var nth=/*#__PURE__*/_curry2(function nth(offset,list){var idx=offset<0?list.length+offset:offset;return _isString(list)?list.charAt(idx):list[idx];});
|
647
625
|
|
648
626
|
function _cloneRegExp(pattern){return new RegExp(pattern.source,pattern.flags?pattern.flags:(pattern.global?'g':'')+(pattern.ignoreCase?'i':'')+(pattern.multiline?'m':'')+(pattern.sticky?'y':'')+(pattern.unicode?'u':'')+(pattern.dotAll?'s':''));}
|
649
627
|
|
@@ -656,7 +634,7 @@
|
|
656
634
|
* @return {*} The copied value.
|
657
635
|
*/function _clone(value,deep,map){map||(map=new _ObjectMap());// this avoids the slower switch with a quick if decision removing some milliseconds in each run.
|
658
636
|
if(_isPrimitive(value)){return value;}var copy=function copy(copiedValue){// Check for circular and same references on the object graph and return its corresponding clone.
|
659
|
-
var cachedCopy=map.get(value);if(cachedCopy){return cachedCopy;}map.set(value,copiedValue);for(var key in value){if(Object.prototype.hasOwnProperty.call(value,key)){copiedValue[key]=deep?_clone(value[key],true,map):value[key];}}return copiedValue;};switch(type
|
637
|
+
var cachedCopy=map.get(value);if(cachedCopy){return cachedCopy;}map.set(value,copiedValue);for(var key in value){if(Object.prototype.hasOwnProperty.call(value,key)){copiedValue[key]=deep?_clone(value[key],true,map):value[key];}}return copiedValue;};switch(type(value)){case'Object':return copy(Object.create(Object.getPrototypeOf(value)));case'Array':return copy([]);case'Date':return new Date(value.valueOf());case'RegExp':return _cloneRegExp(value);case'Int8Array':case'Uint8Array':case'Uint8ClampedArray':case'Int16Array':case'Uint16Array':case'Int32Array':case'Uint32Array':case'Float32Array':case'Float64Array':case'BigInt64Array':case'BigUint64Array':return value.slice();default:return value;}}function _isPrimitive(param){var type=_typeof(param);return param==null||type!='object'&&type!='function';}var _ObjectMap=/*#__PURE__*/function(){function _ObjectMap(){this.map={};this.length=0;}_ObjectMap.prototype.set=function(key,value){var hashedKey=this.hash(key);var bucket=this.map[hashedKey];if(!bucket){this.map[hashedKey]=bucket=[];}bucket.push([key,value]);this.length+=1;};_ObjectMap.prototype.hash=function(key){var hashedKey=[];for(var value in key){hashedKey.push(Object.prototype.toString.call(key[value]));}return hashedKey.join();};_ObjectMap.prototype.get=function(key){/**
|
660
638
|
* depending on the number of objects to be cloned is faster to just iterate over the items in the map just because the hash function is so costly,
|
661
639
|
* on my tests this number is 180, anything above that using the hash function is faster.
|
662
640
|
*/if(this.length<=180){for(var p in this.map){var _bucket=this.map[p];for(var i=0;i<_bucket.length;i+=1){var element=_bucket[i];if(element[0]===key){return element[1];}}}return;}var hashedKey=this.hash(key);var bucket=this.map[hashedKey];if(!bucket){return;}for(var _i=0;_i<bucket.length;_i+=1){var _element=bucket[_i];if(_element[0]===key){return _element[1];}}};return _ObjectMap;}();
|
@@ -687,7 +665,7 @@
|
|
687
665
|
* const objectsClone = R.clone(objects);
|
688
666
|
* objects === objectsClone; //=> false
|
689
667
|
* objects[0] === objectsClone[0]; //=> false
|
690
|
-
*/var clone=/*#__PURE__*/_curry1(function clone(value){return value!=null&&typeof value.clone==='function'?value.clone():_clone(value,true);});
|
668
|
+
*/var clone=/*#__PURE__*/_curry1(function clone(value){return value!=null&&typeof value.clone==='function'?value.clone():_clone(value,true);});
|
691
669
|
|
692
670
|
/**
|
693
671
|
* Retrieves the values at given paths of an object.
|
@@ -706,7 +684,7 @@
|
|
706
684
|
*
|
707
685
|
* R.paths([['a', 'b'], ['p', 0, 'q']], {a: {b: 2}, p: [{q: 3}]}); //=> [2, 3]
|
708
686
|
* R.paths([['a', 'b'], ['p', 'r']], {a: {b: 2}, p: [{q: 3}]}); //=> [2, undefined]
|
709
|
-
*/var paths=/*#__PURE__*/_curry2(function paths(pathsArray,obj){return pathsArray.map(function(paths){var val=obj;var idx=0;var p;while(idx<paths.length){if(val==null){return;}p=paths[idx];val=_isInteger(p)?nth
|
687
|
+
*/var paths=/*#__PURE__*/_curry2(function paths(pathsArray,obj){return pathsArray.map(function(paths){var val=obj;var idx=0;var p;while(idx<paths.length){if(val==null){return;}p=paths[idx];val=_isInteger(p)?nth(p,val):val[p];idx+=1;}return val;});});
|
710
688
|
|
711
689
|
/**
|
712
690
|
* Retrieves the value at a given path. The nodes of the path can be arbitrary strings or non-negative integers.
|
@@ -731,7 +709,7 @@
|
|
731
709
|
* R.path(['a', 'b', -2], {a: {b: [1, 2, 3]}}); //=> 2
|
732
710
|
* R.path([2], {'2': 2}); //=> 2
|
733
711
|
* R.path([-2], {'-2': 'a'}); //=> undefined
|
734
|
-
*/var path=/*#__PURE__*/_curry2(function path(pathAr,obj){return paths
|
712
|
+
*/var path=/*#__PURE__*/_curry2(function path(pathAr,obj){return paths([pathAr],obj)[0];});
|
735
713
|
|
736
714
|
/**
|
737
715
|
* Creates a new object with the own properties of the two provided objects. If
|
@@ -757,7 +735,7 @@
|
|
757
735
|
* { b: true, thing: 'bar', values: [15, 35] });
|
758
736
|
* //=> { a: true, b: true, thing: 'bar', values: [10, 20, 15, 35] }
|
759
737
|
* @symb R.mergeWithKey(f, { x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: f('y', 2, 5), z: 3 }
|
760
|
-
*/var mergeWithKey=/*#__PURE__*/_curry3(function mergeWithKey(fn,l,r){var result={};var k;l=l||{};r=r||{};for(k in l){if(_has(k,l)){result[k]=_has(k,r)?fn(k,l[k],r[k]):l[k];}}for(k in r){if(_has(k,r)&&!_has(k,result)){result[k]=r[k];}}return result;});
|
738
|
+
*/var mergeWithKey=/*#__PURE__*/_curry3(function mergeWithKey(fn,l,r){var result={};var k;l=l||{};r=r||{};for(k in l){if(_has(k,l)){result[k]=_has(k,r)?fn(k,l[k],r[k]):l[k];}}for(k in r){if(_has(k,r)&&!_has(k,result)){result[k]=r[k];}}return result;});
|
761
739
|
|
762
740
|
/**
|
763
741
|
* Creates a new object with the own properties of the two provided objects.
|
@@ -786,7 +764,7 @@
|
|
786
764
|
* { a: true, c: { thing: 'foo', values: [10, 20] }},
|
787
765
|
* { b: true, c: { thing: 'bar', values: [15, 35] }});
|
788
766
|
* //=> { a: true, b: true, c: { thing: 'bar', values: [10, 20, 15, 35] }}
|
789
|
-
*/var mergeDeepWithKey=/*#__PURE__*/_curry3(function mergeDeepWithKey(fn,lObj,rObj){return mergeWithKey
|
767
|
+
*/var mergeDeepWithKey=/*#__PURE__*/_curry3(function mergeDeepWithKey(fn,lObj,rObj){return mergeWithKey(function(k,lVal,rVal){if(_isObject(lVal)&&_isObject(rVal)){return mergeDeepWithKey(fn,lVal,rVal);}else {return fn(k,lVal,rVal);}},lObj,rObj);});
|
790
768
|
|
791
769
|
/**
|
792
770
|
* Creates a new object with the own properties of the two provided objects.
|
@@ -814,7 +792,7 @@
|
|
814
792
|
* { a: true, c: { values: [10, 20] }},
|
815
793
|
* { b: true, c: { values: [15, 35] }});
|
816
794
|
* //=> { a: true, b: true, c: { values: [10, 20, 15, 35] }}
|
817
|
-
*/var mergeDeepWith=/*#__PURE__*/_curry3(function mergeDeepWith(fn,lObj,rObj){return mergeDeepWithKey
|
795
|
+
*/var mergeDeepWith=/*#__PURE__*/_curry3(function mergeDeepWith(fn,lObj,rObj){return mergeDeepWithKey(function(k,lVal,rVal){return fn(lVal,rVal);},lObj,rObj);});
|
818
796
|
|
819
797
|
/**
|
820
798
|
* Returns a partial copy of an object containing only the keys that satisfy
|
@@ -835,7 +813,7 @@
|
|
835
813
|
*
|
836
814
|
* const isUpperCase = (val, key) => key.toUpperCase() === key;
|
837
815
|
* R.pickBy(isUpperCase, {a: 1, b: 2, A: 3, B: 4}); //=> {A: 3, B: 4}
|
838
|
-
*/var pickBy=/*#__PURE__*/_curry2(function pickBy(test,obj){var result={};for(var prop in obj){if(test(obj[prop],prop,obj)){result[prop]=obj[prop];}}return result;});
|
816
|
+
*/var pickBy=/*#__PURE__*/_curry2(function pickBy(test,obj){var result={};for(var prop in obj){if(test(obj[prop],prop,obj)){result[prop]=obj[prop];}}return result;});
|
839
817
|
|
840
818
|
/**
|
841
819
|
* A function to check given value is a function
|
@@ -876,7 +854,7 @@
|
|
876
854
|
* @returns true if the input is an instance of Error and false otherwise
|
877
855
|
*/var isTypeOfError=function isTypeOfError(obj){return obj instanceof Error;};
|
878
856
|
|
879
|
-
var getValueByPath=function getValueByPath(obj,keyPath){var pathParts=keyPath.split('.');return path
|
857
|
+
var getValueByPath=function getValueByPath(obj,keyPath){var pathParts=keyPath.split('.');return path(pathParts,obj);};var hasValueByPath=function hasValueByPath(obj,path){return Boolean(getValueByPath(obj,path));};/**
|
880
858
|
* Checks if the input is an object literal or built-in object type and not null
|
881
859
|
* @param value Input value
|
882
860
|
* @returns true if the input is an object and not null
|
@@ -884,8 +862,8 @@
|
|
884
862
|
* Checks if the input is an object literal and not null
|
885
863
|
* @param value Input value
|
886
864
|
* @returns true if the input is an object and not null
|
887
|
-
*/var isObjectLiteralAndNotNull=function isObjectLiteralAndNotNull(value){return !isNull(value)&&Object.prototype.toString.call(value)==='[object Object]';};var mergeDeepRightObjectArrays=function mergeDeepRightObjectArrays(leftValue,rightValue){if(!Array.isArray(leftValue)||!Array.isArray(rightValue)){return clone
|
888
|
-
mergeDeepRight(mergedArray[index],value):value;});return mergedArray;};var mergeDeepRight=function mergeDeepRight(leftObject,rightObject){return mergeDeepWith
|
865
|
+
*/var isObjectLiteralAndNotNull=function isObjectLiteralAndNotNull(value){return !isNull(value)&&Object.prototype.toString.call(value)==='[object Object]';};var mergeDeepRightObjectArrays=function mergeDeepRightObjectArrays(leftValue,rightValue){if(!Array.isArray(leftValue)||!Array.isArray(rightValue)){return clone(rightValue);}var mergedArray=clone(leftValue);rightValue.forEach(function(value,index){mergedArray[index]=Array.isArray(value)||isObjectAndNotNull(value)?// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
866
|
+
mergeDeepRight(mergedArray[index],value):value;});return mergedArray;};var mergeDeepRight=function mergeDeepRight(leftObject,rightObject){return mergeDeepWith(mergeDeepRightObjectArrays,leftObject,rightObject);};/**
|
889
867
|
Checks if the input is a non-empty object literal type and not undefined or null
|
890
868
|
* @param value input any
|
891
869
|
* @returns boolean
|
@@ -893,11 +871,11 @@
|
|
893
871
|
* A utility to recursively remove undefined values from an object
|
894
872
|
* @param obj input object
|
895
873
|
* @returns a new object
|
896
|
-
*/var removeUndefinedValues=function removeUndefinedValues(obj){var result=pickBy
|
874
|
+
*/var removeUndefinedValues=function removeUndefinedValues(obj){var result=pickBy(isDefined,obj);Object.keys(result).forEach(function(key){var value=result[key];if(isObjectLiteralAndNotNull(value)){result[key]=removeUndefinedValues(value);}});return result;};/**
|
897
875
|
* A utility to recursively remove undefined and null values from an object
|
898
876
|
* @param obj input object
|
899
877
|
* @returns a new object
|
900
|
-
*/var removeUndefinedAndNullValues=function removeUndefinedAndNullValues(obj){var result=pickBy
|
878
|
+
*/var removeUndefinedAndNullValues=function removeUndefinedAndNullValues(obj){var result=pickBy(isDefinedAndNotNull,obj);Object.keys(result).forEach(function(key){var value=result[key];if(isObjectLiteralAndNotNull(value)){result[key]=removeUndefinedAndNullValues(value);}});return result;};
|
901
879
|
|
902
880
|
var trim=function trim(value){return value.replace(/^\s+|\s+$/gm,'');};var removeDoubleSpaces=function removeDoubleSpaces(value){return value.replace(/ {2,}/g,' ');};/**
|
903
881
|
* A function to convert values to string
|
@@ -931,25 +909,25 @@
|
|
931
909
|
if(isString(category)&&!isString(name)){delete payload.category;payload.name=category;}// Rest of the code is just to clean up undefined values
|
932
910
|
// and set some proper defaults
|
933
911
|
// Also, to clone the incoming object type arguments
|
934
|
-
if(!isDefined(payload.category)){delete payload.category;}if(!isDefined(payload.name)){delete payload.name;}payload.properties=payload.properties?clone
|
912
|
+
if(!isDefined(payload.category)){delete payload.category;}if(!isDefined(payload.name)){delete payload.name;}payload.properties=payload.properties?clone(payload.properties):{};if(isDefined(payload.options)){payload.options=clone(payload.options);}else {delete payload.options;}// add name and category to properties
|
935
913
|
payload.properties=mergeDeepRight(isObjectLiteralAndNotNull(payload.properties)?payload.properties:{},{name:isString(payload.name)?payload.name:null,category:isString(payload.category)?payload.category:null});return payload;};/*
|
936
914
|
* Normalise the overloaded arguments of the track call facade
|
937
915
|
*/var trackArgumentsToCallOptions=function trackArgumentsToCallOptions(event,properties,options,callback){var payload={name:event,properties:properties,options:options};if(isFunction(callback)){payload.callback=callback;}if(isFunction(options)){payload.properties=properties;delete payload.options;payload.callback=options;}if(isFunction(properties)){delete payload.properties;delete payload.options;payload.callback=properties;}// Rest of the code is just to clean up undefined values
|
938
916
|
// and set some proper defaults
|
939
917
|
// Also, to clone the incoming object type arguments
|
940
|
-
payload.properties=isDefinedAndNotNull(payload.properties)?clone
|
918
|
+
payload.properties=isDefinedAndNotNull(payload.properties)?clone(payload.properties):{};if(isDefined(payload.options)){payload.options=clone(payload.options);}else {delete payload.options;}return payload;};/*
|
941
919
|
* Normalise the overloaded arguments of the identify call facade
|
942
920
|
*/var identifyArgumentsToCallOptions=function identifyArgumentsToCallOptions(userId,traits,options,callback){var payload={userId:userId,traits:traits,options:options};if(isFunction(callback)){payload.callback=callback;}if(isFunction(options)){payload.userId=userId;payload.traits=traits;delete payload.options;payload.callback=options;}if(isFunction(traits)){payload.userId=userId;delete payload.traits;delete payload.options;payload.callback=traits;}if(isObjectLiteralAndNotNull(userId)||isNull(userId)){// Explicitly set null to prevent resetting the existing value
|
943
921
|
// in the Analytics class
|
944
922
|
payload.userId=null;payload.traits=userId;payload.options=traits;}// Rest of the code is just to clean up undefined values
|
945
923
|
// and set some proper defaults
|
946
924
|
// Also, to clone the incoming object type arguments
|
947
|
-
if(isDefined(payload.userId)){payload.userId=tryStringify(payload.userId);}else {delete payload.userId;}if(isObjectLiteralAndNotNull(payload.traits)){payload.traits=clone
|
925
|
+
if(isDefined(payload.userId)){payload.userId=tryStringify(payload.userId);}else {delete payload.userId;}if(isObjectLiteralAndNotNull(payload.traits)){payload.traits=clone(payload.traits);}else {delete payload.traits;}if(isDefined(payload.options)){payload.options=clone(payload.options);}else {delete payload.options;}return payload;};/*
|
948
926
|
* Normalise the overloaded arguments of the alias call facade
|
949
927
|
*/var aliasArgumentsToCallOptions=function aliasArgumentsToCallOptions(to,from,options,callback){var payload={to:to,from:from,options:options};if(isFunction(callback)){payload.callback=callback;}if(isFunction(options)){payload.to=to;payload.from=from;delete payload.options;payload.callback=options;}if(isFunction(from)){payload.to=to;delete payload.from;delete payload.options;payload.callback=from;}else if(isObjectLiteralAndNotNull(from)||isNull(from)){payload.to=to;delete payload.from;payload.options=from;}if(isFunction(to)){delete payload.to;delete payload.from;delete payload.options;payload.callback=to;}else if(isObjectLiteralAndNotNull(to)||isNull(to)){delete payload.to;delete payload.from;payload.options=to;}// Rest of the code is just to clean up undefined values
|
950
928
|
// and set some proper defaults
|
951
929
|
// Also, to clone the incoming object type arguments
|
952
|
-
if(isDefined(payload.to)){payload.to=tryStringify(payload.to);}else {delete payload.to;}if(isDefined(payload.from)){payload.from=tryStringify(payload.from);}else {delete payload.from;}if(isDefined(payload.options)){payload.options=clone
|
930
|
+
if(isDefined(payload.to)){payload.to=tryStringify(payload.to);}else {delete payload.to;}if(isDefined(payload.from)){payload.from=tryStringify(payload.from);}else {delete payload.from;}if(isDefined(payload.options)){payload.options=clone(payload.options);}else {delete payload.options;}return payload;};/*
|
953
931
|
* Normalise the overloaded arguments of the group call facade
|
954
932
|
*/var groupArgumentsToCallOptions=function groupArgumentsToCallOptions(groupId,traits,options,callback){var payload={groupId:groupId,traits:traits,options:options};if(isFunction(callback)){payload.callback=callback;}if(isFunction(options)){payload.groupId=groupId;payload.traits=traits;delete payload.options;payload.callback=options;}if(isFunction(traits)){payload.groupId=groupId;delete payload.traits;delete payload.options;payload.callback=traits;}// TODO: why do we enable overload for group that only passes callback? is there any use case?
|
955
933
|
if(isFunction(groupId)){// Explicitly set null to prevent resetting the existing value
|
@@ -958,11 +936,11 @@
|
|
958
936
|
payload.groupId=null;payload.traits=groupId;payload.options=!isFunction(traits)?traits:null;}// Rest of the code is just to clean up undefined values
|
959
937
|
// and set some proper defaults
|
960
938
|
// Also, to clone the incoming object type arguments
|
961
|
-
if(isDefined(payload.groupId)){payload.groupId=tryStringify(payload.groupId);}else {delete payload.groupId;}payload.traits=isObjectLiteralAndNotNull(payload.traits)?clone
|
939
|
+
if(isDefined(payload.groupId)){payload.groupId=tryStringify(payload.groupId);}else {delete payload.groupId;}payload.traits=isObjectLiteralAndNotNull(payload.traits)?clone(payload.traits):{};if(isDefined(payload.options)){payload.options=clone(payload.options);}else {delete payload.options;}return payload;};
|
962
940
|
|
963
941
|
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 EVENT_REPOSITORY='EventRepository';var EXTERNAL_SRC_LOADER='ExternalSrcLoader';var HTTP_CLIENT='HttpClient';var RS_APP='RudderStackApplication';var ANALYTICS_CORE='AnalyticsCore';
|
964
942
|
|
965
|
-
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.0.0-beta.
|
943
|
+
var APP_NAME='RudderLabs JavaScript SDK';var APP_VERSION='3.0.0-beta.20';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';var CONSENT_TRACK_EVENT_NAME='Consent Management Interaction';
|
966
944
|
|
967
945
|
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';
|
968
946
|
|
@@ -995,7 +973,7 @@
|
|
995
973
|
* Retrieve an existing buffered load method call and remove from the existing array
|
996
974
|
*/var getPreloadedLoadEvent=function getPreloadedLoadEvent(preloadedEventsArray){var loadMethodName='load';var loadEvent=[];/**
|
997
975
|
* Iterate the buffered API calls until we find load call and process it separately
|
998
|
-
*/var i=0;while(i<preloadedEventsArray.length){if(preloadedEventsArray[i]&&preloadedEventsArray[i][0]===loadMethodName){loadEvent=clone
|
976
|
+
*/var i=0;while(i<preloadedEventsArray.length){if(preloadedEventsArray[i]&&preloadedEventsArray[i][0]===loadMethodName){loadEvent=clone(preloadedEventsArray[i]);preloadedEventsArray.splice(i,1);break;}i+=1;}return loadEvent;};/**
|
999
977
|
* Promote consent events to the top of the preloaded events array
|
1000
978
|
* @param preloadedEventsArray Preloaded events array
|
1001
979
|
* @returns None
|
@@ -1078,6 +1056,10 @@
|
|
1078
1056
|
|
1079
1057
|
function i$2(){throw new Error("Cycle detected");}var t$1=Symbol.for("preact-signals");function r(){if(!(v>1)){var i,t=!1;while(void 0!==f){var r=f;f=void 0;e++;while(void 0!==r){var n=r.o;r.o=void 0;r.f&=-3;if(!(8&r.f)&&l(r))try{r.c();}catch(r){if(!t){i=r;t=!0;}}r=n;}}e=0;v--;if(t)throw i;}else v--;}function n(i){if(v>0)return i();v++;try{return i();}finally{r();}}var o=void 0;var f=void 0,v=0,e=0,u=0;function c(i){if(void 0!==o){var t=i.n;if(void 0===t||t.t!==o){t={i:0,S:i,p:o.s,n:void 0,t:o,e:void 0,x:void 0,r:t};if(void 0!==o.s)o.s.n=t;o.s=t;i.n=t;if(32&o.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=o.s;t.n=void 0;o.s.n=t;o.s=t;}return t;}}}function d$1(i){this.v=i;this.i=0;this.n=void 0;this.t=void 0;}d$1.prototype.brand=t$1;d$1.prototype.h=function(){return !0;};d$1.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;}};d$1.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;}};d$1.prototype.subscribe=function(i){var t=this;return O(function(){var r=t.value,n=32&this.f;this.f&=-33;try{i(r);}finally{this.f|=n;}});};d$1.prototype.valueOf=function(){return this.value;};d$1.prototype.toString=function(){return this.value+"";};d$1.prototype.toJSON=function(){return this.value;};d$1.prototype.peek=function(){return this.v;};Object.defineProperty(d$1.prototype,"value",{get:function get(){var i=c(this);if(void 0!==i)i.i=this.i;return this.v;},set:function set(t){if(o instanceof _)!function(){throw new Error("Computed cannot have side-effects");}();if(t!==this.v){if(e>100)i$2();this.v=t;this.i++;u++;v++;try{for(var n=this.t;void 0!==n;n=n.x)n.t.N();}finally{r();}}}});function a(i){return new d$1(i);}function l(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 y(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 _(i){d$1.call(this,void 0);this.x=i;this.s=void 0;this.g=u-1;this.f=4;}(_.prototype=new d$1()).h=function(){this.f&=-3;if(1&this.f)return !1;if(32==(36&this.f))return !0;this.f&=-5;if(this.g===u)return !0;this.g=u;this.f|=1;if(this.i>0&&!l(this)){this.f&=-2;return !0;}var i=o;try{y(this);o=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++;}o=i;w(this);this.f&=-2;return !0;};_.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);}d$1.prototype.S.call(this,i);};_.prototype.U=function(i){if(void 0!==this.t){d$1.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);}}};_.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var i=this.t;void 0!==i;i=i.x)i.t.N();}};_.prototype.peek=function(){if(!this.h())i$2();if(16&this.f)throw this.v;return this.v;};Object.defineProperty(_.prototype,"value",{get:function get(){if(1&this.f)i$2();var t=c(this);this.h();if(void 0!==t)t.i=this.i;if(16&this.f)throw this.v;return this.v;}});function g(i){var t=i.u;i.u=void 0;if("function"==typeof t){v++;var n=o;o=void 0;try{t();}catch(t){i.f&=-2;i.f|=8;b(i);throw t;}finally{o=n;r();}}}function b(i){for(var t=i.s;void 0!==t;t=t.n)t.S.U(t);i.x=void 0;i.s=void 0;g(i);}function x$1(i){if(o!==this)throw new Error("Out-of-order effect");w(this);o=i;this.f&=-2;if(8&this.f)b(this);r();}function E(i){this.x=i;this.u=void 0;this.s=void 0;this.o=void 0;this.f=32;}E.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();}};E.prototype.S=function(){if(1&this.f)i$2();this.f|=1;this.f&=-9;g(this);y(this);v++;var t=o;o=this;return x$1.bind(this,t);};E.prototype.N=function(){if(!(2&this.f)){this.f|=2;this.o=f;f=this;}};E.prototype.d=function(){this.f|=8;if(!(1&this.f))b(this);};function O(i){var t=new E(i);try{t.c();}catch(i){t.d();throw i;}return t.d.bind(t);}
|
1080
1058
|
|
1059
|
+
/**
|
1060
|
+
* A buffer queue to serve as a store for any type of data
|
1061
|
+
*/var BufferQueue=/*#__PURE__*/function(){function BufferQueue(){_classCallCheck(this,BufferQueue);this.items=[];}_createClass(BufferQueue,[{key:"enqueue",value:function enqueue(item){this.items.push(item);}},{key:"dequeue",value:function dequeue(){if(this.items.length===0){return null;}return this.items.shift();}},{key:"isEmpty",value:function isEmpty(){return this.items.length===0;}},{key:"size",value:function size(){return this.items.length;}},{key:"clear",value:function clear(){this.items=[];}}]);return BufferQueue;}();
|
1062
|
+
|
1081
1063
|
var LOG_LEVEL_MAP={LOG:0,INFO:1,DEBUG:2,WARN:3,ERROR:4,NONE:5};var DEFAULT_LOG_LEVEL='ERROR';var LOG_MSG_PREFIX='RS SDK';var LOG_MSG_PREFIX_STYLE='font-weight: bold; background: black; color: white;';var LOG_MSG_STYLE='font-weight: normal;';/**
|
1082
1064
|
* Service to log messages/data to output provider, default is console
|
1083
1065
|
*/var Logger=/*#__PURE__*/function(){function Logger(){var minLogLevel=arguments.length>0&&arguments[0]!==undefined?arguments[0]:DEFAULT_LOG_LEVEL;var scope=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'';var logProvider=arguments.length>2&&arguments[2]!==undefined?arguments[2]:console;_classCallCheck(this,Logger);this.minLogLevel=LOG_LEVEL_MAP[minLogLevel];this.scope=scope;this.logProvider=logProvider;}_createClass(Logger,[{key:"log",value:function log(){for(var _len=arguments.length,data=new Array(_len),_key=0;_key<_len;_key++){data[_key]=arguments[_key];}this.outputLog('LOG',data);}},{key:"info",value:function info(){for(var _len2=arguments.length,data=new Array(_len2),_key2=0;_key2<_len2;_key2++){data[_key2]=arguments[_key2];}this.outputLog('INFO',data);}},{key:"debug",value:function debug(){for(var _len3=arguments.length,data=new Array(_len3),_key3=0;_key3<_len3;_key3++){data[_key3]=arguments[_key3];}this.outputLog('DEBUG',data);}},{key:"warn",value:function warn(){for(var _len4=arguments.length,data=new Array(_len4),_key4=0;_key4<_len4;_key4++){data[_key4]=arguments[_key4];}this.outputLog('WARN',data);}},{key:"error",value:function error(){for(var _len5=arguments.length,data=new Array(_len5),_key5=0;_key5<_len5;_key5++){data[_key5]=arguments[_key5];}this.outputLog('ERROR',data);}},{key:"outputLog",value:function outputLog(logMethod,data){if(this.minLogLevel<=LOG_LEVEL_MAP[logMethod]){var _this$logProvider,_this$logProvider2;(_this$logProvider=(_this$logProvider2=this.logProvider)[logMethod.toLowerCase()])===null||_this$logProvider===void 0||_this$logProvider.call.apply(_this$logProvider,[_this$logProvider2].concat(_toConsumableArray(this.formatLogData(data))));}}},{key:"setScope",value:function setScope(scopeVal){this.scope=scopeVal||this.scope;}// TODO: should we allow to change the level via global variable on run time
|
@@ -1110,7 +1092,7 @@
|
|
1110
1092
|
|
1111
1093
|
var DEFAULT_ERROR_REPORTING_PROVIDER='bugsnag';var DEFAULT_STORAGE_ENCRYPTION_VERSION='v3';var ConsentManagersToPluginNameMap={oneTrust:'OneTrustConsentManager',ketch:'KetchConsentManager',custom:'CustomConsentManager'};var ErrorReportingProvidersToPluginNameMap=_defineProperty({},DEFAULT_ERROR_REPORTING_PROVIDER,'Bugsnag');var StorageEncryptionVersionsToPluginNameMap=_defineProperty(_defineProperty({},DEFAULT_STORAGE_ENCRYPTION_VERSION,'StorageEncryption'),"legacy",'StorageEncryptionLegacy');
|
1112
1094
|
|
1113
|
-
var defaultLoadOptions={logLevel:'ERROR',configUrl:DEFAULT_CONFIG_BE_URL,loadIntegration:true,sessions:{autoTrack:true,timeout:DEFAULT_SESSION_TIMEOUT_MS},sameSiteCookie:'Lax',polyfillIfRequired:true,integrations:{All:true},useBeacon:false,beaconQueueOptions:{},destinationsQueueOptions:{},queueOptions:{},lockIntegrationsVersion:false,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=a(clone
|
1095
|
+
var defaultLoadOptions={logLevel:'ERROR',configUrl:DEFAULT_CONFIG_BE_URL,loadIntegration:true,sessions:{autoTrack:true,timeout:DEFAULT_SESSION_TIMEOUT_MS},sameSiteCookie:'Lax',polyfillIfRequired:true,integrations:{All:true},useBeacon:false,beaconQueueOptions:{},destinationsQueueOptions:{},queueOptions:{},lockIntegrationsVersion:false,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=a(clone(defaultLoadOptions));
|
1114
1096
|
|
1115
1097
|
var USER_SESSION_STORAGE_KEYS={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',authToken:'rl_auth_token'};var DEFAULT_USER_SESSION_VALUES={userId:'',userTraits:{},anonymousId:'',groupId:'',groupTraits:{},initialReferrer:'',initialReferringDomain:'',sessionInfo:{},authToken:null};
|
1116
1098
|
|
@@ -1118,7 +1100,7 @@
|
|
1118
1100
|
|
1119
1101
|
var capabilitiesState={isOnline:a(true),storage:{isLocalStorageAvailable:a(false),isCookieStorageAvailable:a(false),isSessionStorageAvailable:a(false)},isBeaconAvailable:a(false),isLegacyDOM:a(false),isUaCHAvailable:a(false),isCryptoAvailable:a(false),isIE11:a(false),isAdBlocked:a(false)};
|
1120
1102
|
|
1121
|
-
var reportingState={isErrorReportingEnabled:a(false),isMetricsReportingEnabled:a(false),errorReportingProviderPluginName:a(undefined)};
|
1103
|
+
var reportingState={isErrorReportingEnabled:a(false),isMetricsReportingEnabled:a(false),errorReportingProviderPluginName:a(undefined),isErrorReportingPluginLoaded:a(false)};
|
1122
1104
|
|
1123
1105
|
var sourceConfigState=a(undefined);
|
1124
1106
|
|
@@ -1138,7 +1120,7 @@
|
|
1138
1120
|
|
1139
1121
|
var storageState={encryptionPluginName:a(undefined),migrate:a(false),type:a(undefined),cookie:a(undefined),entries:a({}),trulyAnonymousTracking:a(false)};
|
1140
1122
|
|
1141
|
-
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
|
1123
|
+
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(defaultStateValues));
|
1142
1124
|
|
1143
1125
|
// to next or return the value if it is the last one instead of an array per
|
1144
1126
|
// plugin that is the normal invoke
|
@@ -1152,9 +1134,14 @@
|
|
1152
1134
|
|
1153
1135
|
var FAILED_REQUEST_ERR_MSG_PREFIX='The request failed';var ERROR_MESSAGES_TO_BE_FILTERED=[FAILED_REQUEST_ERR_MSG_PREFIX];
|
1154
1136
|
|
1137
|
+
var LOAD_ORIGIN='RS_JS_SDK';
|
1138
|
+
|
1155
1139
|
/**
|
1156
1140
|
* Utility method to normalise errors
|
1157
|
-
*/var processError=function processError(error){var errorMessage;try{if(isString(error)){errorMessage=error;}else if(error instanceof Error){errorMessage=error.message;}else {errorMessage=error.message
|
1141
|
+
*/var processError=function processError(error){var errorMessage;try{if(isString(error)){errorMessage=error;}else if(error instanceof Error){errorMessage=error.message;}else if(error instanceof ErrorEvent){errorMessage=error.message;}// TODO: remove this block once all device mode integrations start using the v3 script loader module (TS)
|
1142
|
+
else if(error instanceof Event){var eventTarget=error.target;// Discard all the non-script loading errors
|
1143
|
+
if(eventTarget&&eventTarget.localName!=='script'){return '';}// Discard script errors that are not originated at SDK or from native SDKs
|
1144
|
+
if(eventTarget!==null&&eventTarget!==void 0&&eventTarget.dataset&&(eventTarget.dataset.loader!==LOAD_ORIGIN||eventTarget.dataset.isnonnativesdk!=='true')){return '';}errorMessage="Error in loading a third-party script from URL ".concat(eventTarget===null||eventTarget===void 0?void 0:eventTarget.src," with ID ").concat(eventTarget===null||eventTarget===void 0?void 0:eventTarget.id,".");}else {errorMessage=error.message?error.message:stringifyWithoutCircular(error);}}catch(e){errorMessage="Unknown error: ".concat(e.message);}return errorMessage;};/**
|
1158
1145
|
* A function to determine whether the error should be promoted to notify or not
|
1159
1146
|
* @param {Error} error
|
1160
1147
|
* @returns
|
@@ -1163,10 +1150,12 @@
|
|
1163
1150
|
/**
|
1164
1151
|
* A service to handle errors
|
1165
1152
|
*/var ErrorHandler=/*#__PURE__*/function(){// If no logger is passed errors will be thrown as unhandled error
|
1166
|
-
function ErrorHandler(logger,pluginEngine){_classCallCheck(this,ErrorHandler);this.logger=logger;this.pluginEngine=pluginEngine;}_createClass(ErrorHandler,[{key:"init",value:function init(externalSrcLoader){var
|
1153
|
+
function ErrorHandler(logger,pluginEngine){_classCallCheck(this,ErrorHandler);this.logger=logger;this.pluginEngine=pluginEngine;this.errorBuffer=new BufferQueue();this.attachEffect();}_createClass(ErrorHandler,[{key:"attachEffect",value:function attachEffect(){if(state.reporting.isErrorReportingPluginLoaded.value===true){while(this.errorBuffer.size()>0){this.errorBuffer.dequeue();}}}},{key:"attachErrorListeners",value:function attachErrorListeners(){var _this=this;if('addEventListener'in globalThis){globalThis.addEventListener('error',function(event){_this.onError(event,undefined,undefined,undefined,'unhandledException');});globalThis.addEventListener('unhandledrejection',function(event){_this.onError(event,undefined,undefined,undefined,'unhandledPromiseRejection');});}else {var _this$logger;(_this$logger=this.logger)===null||_this$logger===void 0||_this$logger.debug("Failed to attach global error listeners.");}}},{key:"init",value:function init(externalSrcLoader){var _this2=this;if(!this.pluginEngine){return;}try{var extPoint='errorReporting.init';var errReportingInitVal=this.pluginEngine.invokeSingle(extPoint,state,this.pluginEngine,externalSrcLoader,this.logger);if(errReportingInitVal instanceof Promise){errReportingInitVal.then(function(client){_this2.errReportingClient=client;}).catch(function(err){var _this2$logger;(_this2$logger=_this2.logger)===null||_this2$logger===void 0||_this2$logger.error(REPORTING_PLUGIN_INIT_FAILURE_ERROR(ERROR_HANDLER),err);});}}catch(err){this.onError(err,ERROR_HANDLER);}}},{key:"onError",value:function onError(error){var context=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'';var customMessage=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'';var shouldAlwaysThrow=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;var errorType=arguments.length>4&&arguments[4]!==undefined?arguments[4]:'handled';// Error handling is already implemented in processError method
|
1167
1154
|
var errorMessage=processError(error);// If no error message after we normalize, then we swallow/ignore the errors
|
1168
|
-
if(!errorMessage){return;}
|
1169
|
-
|
1155
|
+
if(!errorMessage){return;}// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
1156
|
+
errorMessage=removeDoubleSpaces("".concat(context).concat(LOG_CONTEXT_SEPARATOR).concat(customMessage," ").concat(errorMessage));var normalizedError=new Error(errorMessage);if(isTypeOfError(error)){normalizedError=Object.create(error,{message:{value:errorMessage}});}if(errorType==='handled'){// TODO: Remove the below line once the new Reporting plugin is ready
|
1157
|
+
this.notifyError(normalizedError);if(this.logger){this.logger.error(errorMessage);if(shouldAlwaysThrow){throw normalizedError;}}else {throw normalizedError;}}// eslint-disable-next-line sonarjs/no-all-duplicated-branches
|
1158
|
+
if(state.reporting.isErrorReportingEnabled.value&&!state.reporting.isErrorReportingPluginLoaded.value);}/**
|
1170
1159
|
* Add breadcrumbs to add insight of a user's journey before an error
|
1171
1160
|
* occurred and send to external error monitoring service via a plugin
|
1172
1161
|
*
|
@@ -1233,7 +1222,7 @@
|
|
1233
1222
|
* Updates certain parameters like sentAt timestamp, integrations config etc.
|
1234
1223
|
* @param event RudderEvent object
|
1235
1224
|
* @returns Final event ready to be delivered
|
1236
|
-
*/var getFinalEventForDeliveryMutator=function getFinalEventForDeliveryMutator(event,currentTime){var finalEvent=clone
|
1225
|
+
*/var getFinalEventForDeliveryMutator=function getFinalEventForDeliveryMutator(event,currentTime){var finalEvent=clone(event);// Update sentAt timestamp to the latest timestamp
|
1237
1226
|
finalEvent.sentAt=currentTime;return finalEvent;};
|
1238
1227
|
|
1239
1228
|
var ENCRYPTION_PREFIX_V3='RS_ENC_v3_';
|
@@ -1398,7 +1387,7 @@
|
|
1398
1387
|
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
|
1399
1388
|
if(!isRudderSDKError(event)){return false;}enhanceErrorEventMutator(event,metadataSource);return true;}catch(_unused){// Drop the error event if it couldn't be filtered as
|
1400
1389
|
// it is most likely a non-SDK error
|
1401
|
-
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.
|
1390
|
+
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.20',// Set SDK version as the app version from build config
|
1402
1391
|
metaData:{SDK:{name:'JS',installType:'npm'}},beforeSend:onError(state),autoCaptureSessions:false,// auto capture sessions is disabled
|
1403
1392
|
collectUserIp:false,// collecting user's IP is disabled
|
1404
1393
|
// enabledBreadcrumbTypes: ['error', 'log', 'user'], // for v7 and above
|
@@ -1422,158 +1411,160 @@
|
|
1422
1411
|
// the configured resolution strategy
|
1423
1412
|
var matchPredicate=function matchPredicate(consent){return allowedConsentIds.includes(consent);};switch(resolutionStrategy){case'or':return configuredConsents.some(matchPredicate)||configuredConsents.length===0;case'and':default:return configuredConsents.every(matchPredicate);}}catch(err){errorHandler===null||errorHandler===void 0||errorHandler.onError(err,CUSTOM_CONSENT_MANAGER_PLUGIN,DESTINATION_CONSENT_STATUS_ERROR$2);return true;}}}};};
|
1424
1413
|
|
1425
|
-
var DIR_NAME$
|
1414
|
+
var DIR_NAME$1b='AdobeAnalytics';var NAME$1b='ADOBE_ANALYTICS';var DISPLAY_NAME$1b='Adobe Analytics';_defineProperty({},DISPLAY_NAME$1b,DIR_NAME$1b);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({'Adobe Analytics':NAME$1b,ADOBEANALYTICS:NAME$1b,'ADOBE ANALYTICS':NAME$1b},NAME$1b,NAME$1b),"AdobeAnalytics",NAME$1b),"adobeanalytics",NAME$1b),'adobe analytics',NAME$1b),'Adobe analytics',NAME$1b),'adobe Analytics',NAME$1b);
|
1415
|
+
|
1416
|
+
var DIR_NAME$1a='Amplitude';var NAME$1a='AM';var DISPLAY_NAME$1a='Amplitude';_defineProperty({},DISPLAY_NAME$1a,DIR_NAME$1a);_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$1a,NAME$1a),"AMPLITUDE",NAME$1a),"Amplitude",NAME$1a),"am",NAME$1a);
|
1426
1417
|
|
1427
|
-
var DIR_NAME$19='
|
1418
|
+
var DIR_NAME$19='Appcues';var NAME$19='APPCUES';var DISPLAY_NAME$19='Appcues';_defineProperty({},DISPLAY_NAME$19,DIR_NAME$19);_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$19,NAME$19),"Appcues",NAME$19),'App Cues',NAME$19),"appcues",NAME$19);
|
1428
1419
|
|
1429
|
-
var DIR_NAME$18='
|
1420
|
+
var DIR_NAME$18='BingAds';var NAME$18='BINGADS';var DISPLAY_NAME$18='Bing Ads';_defineProperty({},DISPLAY_NAME$18,DIR_NAME$18);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$18,NAME$18),"BingAds",NAME$18),"bingads",NAME$18),'Bing Ads',NAME$18),'Bing ads',NAME$18),'bing Ads',NAME$18),'bing ads',NAME$18);
|
1430
1421
|
|
1431
|
-
var DIR_NAME$17='
|
1422
|
+
var DIR_NAME$17='Braze';var NAME$17='BRAZE';var DISPLAY_NAME$17='Braze';_defineProperty({},DISPLAY_NAME$17,DIR_NAME$17);_defineProperty(_defineProperty(_defineProperty({},NAME$17,NAME$17),"Braze",NAME$17),"braze",NAME$17);
|
1432
1423
|
|
1433
|
-
var DIR_NAME$16='
|
1424
|
+
var DIR_NAME$16='Bugsnag';var NAME$16='BUGSNAG';var DISPLAY_NAME$16='Bugsnag';_defineProperty({},DISPLAY_NAME$16,DIR_NAME$16);_defineProperty(_defineProperty(_defineProperty({},NAME$16,NAME$16),"bugsnag",NAME$16),"Bugsnag",NAME$16);
|
1434
1425
|
|
1435
|
-
var DIR_NAME$15='
|
1426
|
+
var DIR_NAME$15='Chartbeat';var NAME$15='CHARTBEAT';var DISPLAY_NAME$15='Chartbeat';_defineProperty({},DISPLAY_NAME$15,DIR_NAME$15);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$15,NAME$15),"Chartbeat",NAME$15),"chartbeat",NAME$15),'Chart Beat',NAME$15),'chart beat',NAME$15);
|
1436
1427
|
|
1437
|
-
var DIR_NAME$14='
|
1428
|
+
var DIR_NAME$14='Clevertap';var NAME$14='CLEVERTAP';var DISPLAY_NAME$14='CleverTap';_defineProperty({},DISPLAY_NAME$14,DIR_NAME$14);_defineProperty(_defineProperty(_defineProperty({},NAME$14,NAME$14),"Clevertap",NAME$14),"clevertap",NAME$14);
|
1438
1429
|
|
1439
|
-
var DIR_NAME$13='
|
1430
|
+
var DIR_NAME$13='Comscore';var NAME$13='COMSCORE';var DISPLAY_NAME$13='Comscore';_defineProperty({},DISPLAY_NAME$13,DIR_NAME$13);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$13,NAME$13),"Comscore",NAME$13),'Com Score',NAME$13),'com Score',NAME$13),'com score',NAME$13),'Com score',NAME$13);
|
1440
1431
|
|
1441
|
-
var DIR_NAME$12='
|
1432
|
+
var DIR_NAME$12='Criteo';var NAME$12='CRITEO';var DISPLAY_NAME$12='Criteo';_defineProperty({},DISPLAY_NAME$12,DIR_NAME$12);_defineProperty(_defineProperty(_defineProperty({},NAME$12,NAME$12),"Criteo",NAME$12),"criteo",NAME$12);
|
1442
1433
|
|
1443
|
-
var DIR_NAME$11='
|
1434
|
+
var DIR_NAME$11='CustomerIO';var NAME$11='CUSTOMERIO';var DISPLAY_NAME$11='Customer IO';_defineProperty({},DISPLAY_NAME$11,DIR_NAME$11);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$11,NAME$11),"Customerio",NAME$11),'Customer.io',NAME$11),'CUSTOMER.IO',NAME$11),'customer.io',NAME$11);
|
1444
1435
|
|
1445
|
-
var DIR_NAME$10='
|
1436
|
+
var DIR_NAME$10='Drip';var NAME$10='DRIP';var DISPLAY_NAME$10='Drip';_defineProperty({},DISPLAY_NAME$10,DIR_NAME$10);_defineProperty(_defineProperty(_defineProperty({},NAME$10,NAME$10),"Drip",NAME$10),"drip",NAME$10);
|
1446
1437
|
|
1447
|
-
var DIR_NAME$$='
|
1438
|
+
var DIR_NAME$$='FacebookPixel';var NAME$$='FACEBOOK_PIXEL';var DISPLAY_NAME$$='Facebook Pixel';_defineProperty({},DISPLAY_NAME$$,DIR_NAME$$);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$$,NAME$$),'FB Pixel',NAME$$),'Facebook Pixel',NAME$$),'facebook pixel',NAME$$),"fbpixel",NAME$$),"FBPIXEL",NAME$$),"FB_PIXEL",NAME$$);
|
1448
1439
|
|
1449
|
-
var DIR_NAME$_='
|
1440
|
+
var DIR_NAME$_='Fullstory';var NAME$_='FULLSTORY';var DISPLAY_NAME$_='Fullstory';_defineProperty({},DISPLAY_NAME$_,DIR_NAME$_);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$_,NAME$_),"Fullstory",NAME$_),"FullStory",NAME$_),'full Story',NAME$_),'Full Story',NAME$_),'Full story',NAME$_),'full story',NAME$_),"fullstory",NAME$_);
|
1450
1441
|
|
1451
|
-
var DIR_NAME$Z='
|
1442
|
+
var DIR_NAME$Z='GA';var NAME$Z='GA';var DISPLAY_NAME$Z='Google Analytics';_defineProperty({},DISPLAY_NAME$Z,DIR_NAME$Z);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$Z,NAME$Z),'Google Analytics',NAME$Z),"GoogleAnalytics",NAME$Z),'GOOGLE ANALYTICS',NAME$Z),'google analytics',NAME$Z);
|
1452
1443
|
|
1453
|
-
var DIR_NAME$Y='
|
1444
|
+
var DIR_NAME$Y='GA4';var NAME$Y='GA4';var DISPLAY_NAME$Y='Google Analytics 4 (GA4)';_defineProperty({},DISPLAY_NAME$Y,DIR_NAME$Y);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$Y,NAME$Y),'Google Analytics 4',NAME$Y),'Google analytics 4',NAME$Y),'google analytics 4',NAME$Y),'Google Analytics4',NAME$Y),'Google analytics4',NAME$Y),'google analytics4',NAME$Y),'Google Analytics 4 (GA4)',NAME$Y),'google analytics 4 (ga4)',NAME$Y),"GoogleAnalytics4",NAME$Y);
|
1454
1445
|
|
1455
|
-
var DIR_NAME$X='
|
1446
|
+
var DIR_NAME$X='GoogleAds';var NAME$X='GOOGLEADS';var DISPLAY_NAME$X='Google Ads';_defineProperty({},DISPLAY_NAME$X,DIR_NAME$X);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$X,NAME$X),'Google Ads',NAME$X),"GoogleAds",NAME$X),'GOOGLE ADS',NAME$X),'google ads',NAME$X),"googleads",NAME$X);
|
1456
1447
|
|
1457
|
-
var DIR_NAME$W='
|
1448
|
+
var DIR_NAME$W='GoogleOptimize';var NAME$W='GOOGLE_OPTIMIZE';var DISPLAY_NAME$W='Google Optimize';_defineProperty({},DISPLAY_NAME$W,DIR_NAME$W);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$W,NAME$W),'Google Optimize',NAME$W),"GoogleOptimize",NAME$W),"Googleoptimize",NAME$W),"GOOGLEOPTIMIZE",NAME$W),'google optimize',NAME$W),'Google optimize',NAME$W),'GOOGLE OPTIMIZE',NAME$W);
|
1458
1449
|
|
1459
|
-
var DIR_NAME$V='
|
1450
|
+
var DIR_NAME$V='GoogleTagManager';var NAME$V='GTM';var DISPLAY_NAME$V='Google Tag Manager';_defineProperty({},DISPLAY_NAME$V,DIR_NAME$V);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$V,NAME$V),'Google Tag Manager',NAME$V),'google tag manager',NAME$V),'googletag manager',NAME$V),"googletagmanager",NAME$V);
|
1460
1451
|
|
1461
|
-
var DIR_NAME$U='
|
1452
|
+
var DIR_NAME$U='Heap';var NAME$U='HEAP';var DISPLAY_NAME$U='Heap.io';_defineProperty({},DISPLAY_NAME$U,DIR_NAME$U);_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$U,NAME$U),"Heap",NAME$U),"heap",NAME$U),'Heap.io',NAME$U);
|
1462
1453
|
|
1463
|
-
var DIR_NAME$T='
|
1454
|
+
var DIR_NAME$T='Hotjar';var NAME$T='HOTJAR';var DISPLAY_NAME$T='Hotjar';_defineProperty({},DISPLAY_NAME$T,DIR_NAME$T);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$T,NAME$T),"Hotjar",NAME$T),"hotjar",NAME$T),'Hot Jar',NAME$T),'hot jar',NAME$T);
|
1464
1455
|
|
1465
|
-
var DIR_NAME$S='
|
1456
|
+
var DIR_NAME$S='HubSpot';var NAME$S='HS';var DISPLAY_NAME$S='HubSpot';_defineProperty({},DISPLAY_NAME$S,DIR_NAME$S);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$S,NAME$S),"Hubspot",NAME$S),"HUBSPOT",NAME$S),'hub spot',NAME$S),'Hub Spot',NAME$S),'Hub spot',NAME$S);
|
1466
1457
|
|
1467
|
-
var DIR_NAME$R='
|
1458
|
+
var DIR_NAME$R='INTERCOM';var NAME$R='INTERCOM';var DISPLAY_NAME$R='Intercom';_defineProperty({},DISPLAY_NAME$R,DIR_NAME$R);_defineProperty(_defineProperty(_defineProperty({},NAME$R,NAME$R),"Intercom",NAME$R),"intercom",NAME$R);
|
1468
1459
|
|
1469
|
-
var DIR_NAME$Q='
|
1460
|
+
var DIR_NAME$Q='Keen';var NAME$Q='KEEN';var DISPLAY_NAME$Q='Keen';_defineProperty({},DISPLAY_NAME$Q,DIR_NAME$Q);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$Q,NAME$Q),"Keen",NAME$Q),'Keen.io',NAME$Q),"keen",NAME$Q),'keen.io',NAME$Q);
|
1470
1461
|
|
1471
|
-
var DIR_NAME$P='
|
1462
|
+
var DIR_NAME$P='Kissmetrics';var NAME$P='KISSMETRICS';var DISPLAY_NAME$P='Kiss Metrics';_defineProperty({},DISPLAY_NAME$P,DIR_NAME$P);_defineProperty(_defineProperty(_defineProperty({},NAME$P,NAME$P),"Kissmetrics",NAME$P),"kissmetrics",NAME$P);
|
1472
1463
|
|
1473
|
-
var DIR_NAME$O='
|
1464
|
+
var DIR_NAME$O='Klaviyo';var NAME$O='KLAVIYO';var DISPLAY_NAME$O='Klaviyo';_defineProperty({},DISPLAY_NAME$O,DIR_NAME$O);_defineProperty(_defineProperty(_defineProperty({},NAME$O,NAME$O),"Klaviyo",NAME$O),"klaviyo",NAME$O);
|
1474
1465
|
|
1475
|
-
var DIR_NAME$N='
|
1466
|
+
var DIR_NAME$N='LaunchDarkly';var NAME$N='LAUNCHDARKLY';var DISPLAY_NAME$N='LaunchDarkly';_defineProperty({},DISPLAY_NAME$N,DIR_NAME$N);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$N,NAME$N),"LaunchDarkly",NAME$N),"Launch_Darkly",NAME$N),'Launch Darkly',NAME$N),"launchDarkly",NAME$N),'launch darkly',NAME$N);
|
1476
1467
|
|
1477
|
-
var DIR_NAME$M='
|
1468
|
+
var _CNameMapping$1;var DIR_NAME$M='LinkedInInsightTag';var NAME$M='LINKEDIN_INSIGHT_TAG';var DISPLAY_NAME$M='Linkedin Insight Tag';_defineProperty({},DISPLAY_NAME$M,DIR_NAME$M);(_CNameMapping$1={},_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_CNameMapping$1,NAME$M,NAME$M),'LinkedIn Insight Tag',NAME$M),'LinkedIn insight tag',NAME$M),'linkedIn insight tag',NAME$M),"Linkedin_insight_tag",NAME$M),"LinkedinInsighttag",NAME$M),"LinkedinInsightTag",NAME$M),"LinkedInInsightTag",NAME$M),"Linkedininsighttag",NAME$M),"LINKEDININSIGHTTAG",NAME$M),_defineProperty(_CNameMapping$1,"linkedininsighttag",NAME$M));
|
1478
1469
|
|
1479
|
-
var
|
1470
|
+
var DIR_NAME$L='Lotame';var NAME$L='LOTAME';var DISPLAY_NAME$L='Lotame';_defineProperty({},DISPLAY_NAME$L,DIR_NAME$L);_defineProperty(_defineProperty(_defineProperty({},NAME$L,NAME$L),"Lotame",NAME$L),"lotame",NAME$L);
|
1480
1471
|
|
1481
|
-
var DIR_NAME$K='
|
1472
|
+
var DIR_NAME$K='Lytics';var NAME$K='LYTICS';var DISPLAY_NAME$K='Lytics';_defineProperty({},DISPLAY_NAME$K,DIR_NAME$K);_defineProperty(_defineProperty(_defineProperty({},NAME$K,NAME$K),"Lytics",NAME$K),"lytics",NAME$K);
|
1482
1473
|
|
1483
|
-
var DIR_NAME$J='
|
1474
|
+
var DIR_NAME$J='Mixpanel';var NAME$J='MP';var DISPLAY_NAME$J='Mixpanel';_defineProperty({},DISPLAY_NAME$J,DIR_NAME$J);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$J,NAME$J),"MIXPANEL",NAME$J),"Mixpanel",NAME$J),'MIX PANEL',NAME$J),'Mix panel',NAME$J),'Mix Panel',NAME$J);
|
1484
1475
|
|
1485
|
-
var DIR_NAME$I='
|
1476
|
+
var DIR_NAME$I='MoEngage';var NAME$I='MOENGAGE';var DISPLAY_NAME$I='MoEngage';_defineProperty({},DISPLAY_NAME$I,DIR_NAME$I);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$I,NAME$I),"MoEngage",NAME$I),"moengage",NAME$I),"Moengage",NAME$I),'Mo Engage',NAME$I),'mo engage',NAME$I),'Mo engage',NAME$I);
|
1486
1477
|
|
1487
|
-
var DIR_NAME$H='
|
1478
|
+
var DIR_NAME$H='Optimizely';var NAME$H='OPTIMIZELY';var DISPLAY_NAME$H='Optimizely Web';_defineProperty({},DISPLAY_NAME$H,DIR_NAME$H);_defineProperty(_defineProperty(_defineProperty({},NAME$H,NAME$H),"Optimizely",NAME$H),"optimizely",NAME$H);
|
1488
1479
|
|
1489
|
-
var DIR_NAME$G='
|
1480
|
+
var DIR_NAME$G='Pendo';var NAME$G='PENDO';var DISPLAY_NAME$G='Pendo';_defineProperty({},DISPLAY_NAME$G,DIR_NAME$G);_defineProperty(_defineProperty(_defineProperty({},NAME$G,NAME$G),"Pendo",NAME$G),"pendo",NAME$G);
|
1490
1481
|
|
1491
|
-
var DIR_NAME$F='
|
1482
|
+
var _CNameMapping;var DIR_NAME$F='PinterestTag';var NAME$F='PINTEREST_TAG';var DISPLAY_NAME$F='Pinterest Tag';_defineProperty({},DISPLAY_NAME$F,DIR_NAME$F);(_CNameMapping={},_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_CNameMapping,NAME$F,NAME$F),"PinterestTag",NAME$F),"Pinterest_Tag",NAME$F),"PINTERESTTAG",NAME$F),"pinterest",NAME$F),"PinterestAds",NAME$F),"Pinterest_Ads",NAME$F),"Pinterest",NAME$F),'Pinterest Tag',NAME$F),'Pinterest tag',NAME$F),_defineProperty(_defineProperty(_defineProperty(_defineProperty(_CNameMapping,'PINTEREST TAG',NAME$F),'pinterest tag',NAME$F),'Pinterest Ads',NAME$F),'Pinterest ads',NAME$F));
|
1492
1483
|
|
1493
|
-
var
|
1484
|
+
var DIR_NAME$E='PostAffiliatePro';var NAME$E='POST_AFFILIATE_PRO';var DISPLAY_NAME$E='Post Affiliate Pro';_defineProperty({},DISPLAY_NAME$E,DIR_NAME$E);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$E,NAME$E),"PostAffiliatePro",NAME$E),"Post_affiliate_pro",NAME$E),'Post Affiliate Pro',NAME$E),'Post affiliate pro',NAME$E),'post affiliate pro',NAME$E),"postaffiliatepro",NAME$E),"POSTAFFILIATEPRO",NAME$E);
|
1494
1485
|
|
1495
|
-
var DIR_NAME$D='
|
1486
|
+
var DIR_NAME$D='Posthog';var NAME$D='POSTHOG';var DISPLAY_NAME$D='PostHog';_defineProperty({},DISPLAY_NAME$D,DIR_NAME$D);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$D,NAME$D),"PostHog",NAME$D),"Posthog",NAME$D),"posthog",NAME$D),'Post Hog',NAME$D),'Post hog',NAME$D),'post hog',NAME$D);
|
1496
1487
|
|
1497
|
-
var DIR_NAME$C='
|
1488
|
+
var DIR_NAME$C='ProfitWell';var NAME$C='PROFITWELL';var DISPLAY_NAME$C='ProfitWell';_defineProperty({},DISPLAY_NAME$C,DIR_NAME$C);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$C,NAME$C),"ProfitWell",NAME$C),"profitwell",NAME$C),"Profitwell",NAME$C),'Profit Well',NAME$C),'profit well',NAME$C),'Profit well',NAME$C);
|
1498
1489
|
|
1499
|
-
var DIR_NAME$B='
|
1490
|
+
var DIR_NAME$B='Qualtrics';var NAME$B='QUALTRICS';var DISPLAY_NAME$B='Qualtrics';_defineProperty({},DISPLAY_NAME$B,DIR_NAME$B);_defineProperty(_defineProperty(_defineProperty({},NAME$B,NAME$B),"Qualtrics",NAME$B),"qualtrics",NAME$B);
|
1500
1491
|
|
1501
|
-
var DIR_NAME$A='
|
1492
|
+
var DIR_NAME$A='QuantumMetric';var NAME$A='QUANTUMMETRIC';var DISPLAY_NAME$A='Quantum Metric';_defineProperty({},DISPLAY_NAME$A,DIR_NAME$A);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$A,NAME$A),'Quantum Metric',NAME$A),'quantum Metric',NAME$A),'quantum metric',NAME$A),"QuantumMetric",NAME$A),"quantumMetric",NAME$A),"quantummetric",NAME$A),"Quantum_Metric",NAME$A);
|
1502
1493
|
|
1503
|
-
var DIR_NAME$z='
|
1494
|
+
var DIR_NAME$z='RedditPixel';var NAME$z='REDDIT_PIXEL';var DISPLAY_NAME$z='Reddit Pixel';_defineProperty({},DISPLAY_NAME$z,DIR_NAME$z);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$z,NAME$z),"Reddit_Pixel",NAME$z),"RedditPixel",NAME$z),"REDDITPIXEL",NAME$z),"redditpixel",NAME$z),'Reddit Pixel',NAME$z),'REDDIT PIXEL',NAME$z),'reddit pixel',NAME$z);
|
1504
1495
|
|
1505
|
-
var DIR_NAME$y='
|
1496
|
+
var DIR_NAME$y='Sentry';var NAME$y='SENTRY';var DISPLAY_NAME$y='Sentry';_defineProperty({},DISPLAY_NAME$y,DIR_NAME$y);_defineProperty(_defineProperty(_defineProperty({},NAME$y,NAME$y),"sentry",NAME$y),"Sentry",NAME$y);
|
1506
1497
|
|
1507
|
-
var DIR_NAME$x='
|
1498
|
+
var DIR_NAME$x='SnapPixel';var NAME$x='SNAP_PIXEL';var DISPLAY_NAME$x='Snap Pixel';_defineProperty({},DISPLAY_NAME$x,DIR_NAME$x);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$x,NAME$x),"Snap_Pixel",NAME$x),"SnapPixel",NAME$x),"SNAPPIXEL",NAME$x),"snappixel",NAME$x),'Snap Pixel',NAME$x),'SNAP PIXEL',NAME$x),'snap pixel',NAME$x);
|
1508
1499
|
|
1509
|
-
var DIR_NAME$w='
|
1500
|
+
var DIR_NAME$w='TVSquared';var NAME$w='TVSQUARED';var DISPLAY_NAME$w='TVSquared';_defineProperty({},DISPLAY_NAME$w,DIR_NAME$w);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$w,NAME$w),"TVSquared",NAME$w),"tvsquared",NAME$w),"tvSquared",NAME$w),"TvSquared",NAME$w),"Tvsquared",NAME$w),'TV Squared',NAME$w),'tv squared',NAME$w),'tv Squared',NAME$w);
|
1510
1501
|
|
1511
|
-
var DIR_NAME$v='
|
1502
|
+
var DIR_NAME$v='VWO';var NAME$v='VWO';var DISPLAY_NAME$v='VWO';_defineProperty({},DISPLAY_NAME$v,DIR_NAME$v);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$v,NAME$v),"VisualWebsiteOptimizer",NAME$v),"Visualwebsiteoptimizer",NAME$v),"visualwebsiteoptimizer",NAME$v),"vwo",NAME$v),'Visual Website Optimizer',NAME$v),'Visual website optimizer',NAME$v),'visual website optimizer',NAME$v);
|
1512
1503
|
|
1513
|
-
var DIR_NAME$u='
|
1504
|
+
var DIR_NAME$u='GA360';var NAME$u='GA360';var DISPLAY_NAME$u='Google Analytics 360';_defineProperty({},DISPLAY_NAME$u,DIR_NAME$u);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$u,NAME$u),'Google Analytics 360',NAME$u),'Google analytics 360',NAME$u),'google analytics 360',NAME$u),'Google Analytics360',NAME$u),'Google analytics360',NAME$u),'google analytics360',NAME$u),"GoogleAnalytics360",NAME$u),'GA 360',NAME$u);
|
1514
1505
|
|
1515
|
-
var DIR_NAME$t='
|
1506
|
+
var DIR_NAME$t='Adroll';var NAME$t='ADROLL';var DISPLAY_NAME$t='Adroll';_defineProperty({},DISPLAY_NAME$t,DIR_NAME$t);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$t,NAME$t),"Adroll",NAME$t),'Ad roll',NAME$t),'ad roll',NAME$t),"adroll",NAME$t);
|
1516
1507
|
|
1517
|
-
var DIR_NAME$s='
|
1508
|
+
var DIR_NAME$s='DCMFloodlight';var NAME$s='DCM_FLOODLIGHT';var DISPLAY_NAME$s='DCM Floodlight';_defineProperty({},DISPLAY_NAME$s,DIR_NAME$s);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$s,NAME$s),'DCM Floodlight',NAME$s),'dcm floodlight',NAME$s),'Dcm Floodlight',NAME$s),"DCMFloodlight",NAME$s),"dcmfloodlight",NAME$s),"DcmFloodlight",NAME$s),"dcm_floodlight",NAME$s),"DCM_Floodlight",NAME$s);
|
1518
1509
|
|
1519
|
-
var DIR_NAME$r='
|
1510
|
+
var DIR_NAME$r='Matomo';var NAME$r='MATOMO';var DISPLAY_NAME$r='Matomo';_defineProperty({},DISPLAY_NAME$r,DIR_NAME$r);_defineProperty(_defineProperty(_defineProperty({},NAME$r,NAME$r),"Matomo",NAME$r),"matomo",NAME$r);
|
1520
1511
|
|
1521
|
-
var DIR_NAME$q='
|
1512
|
+
var DIR_NAME$q='Vero';var NAME$q='VERO';var DISPLAY_NAME$q='Vero';_defineProperty({},DISPLAY_NAME$q,DIR_NAME$q);_defineProperty(_defineProperty(_defineProperty({},NAME$q,NAME$q),"Vero",NAME$q),"vero",NAME$q);
|
1522
1513
|
|
1523
|
-
var DIR_NAME$p='
|
1514
|
+
var DIR_NAME$p='Mouseflow';var NAME$p='MOUSEFLOW';var DISPLAY_NAME$p='Mouseflow';_defineProperty({},DISPLAY_NAME$p,DIR_NAME$p);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$p,NAME$p),"Mouseflow",NAME$p),"mouseflow",NAME$p),"mouseFlow",NAME$p),"MouseFlow",NAME$p),'Mouse flow',NAME$p),'mouse flow',NAME$p),'mouse Flow',NAME$p),'Mouse Flow',NAME$p);
|
1524
1515
|
|
1525
|
-
var DIR_NAME$o='
|
1516
|
+
var DIR_NAME$o='Rockerbox';var NAME$o='ROCKERBOX';var DISPLAY_NAME$o='Rockerbox';_defineProperty({},DISPLAY_NAME$o,DIR_NAME$o);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$o,NAME$o),"Rockerbox",NAME$o),"rockerbox",NAME$o),"RockerBox",NAME$o),'Rocker box',NAME$o),'rocker box',NAME$o),'Rocker Box',NAME$o);
|
1526
1517
|
|
1527
|
-
var DIR_NAME$n='
|
1518
|
+
var DIR_NAME$n='ConvertFlow';var NAME$n='CONVERTFLOW';var DISPLAY_NAME$n='ConvertFlow';_defineProperty({},DISPLAY_NAME$n,DIR_NAME$n);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$n,NAME$n),"Convertflow",NAME$n),"convertflow",NAME$n),"convertFlow",NAME$n),"ConvertFlow",NAME$n),'Convert flow',NAME$n),'convert flow',NAME$n),'convert Flow',NAME$n),'Convert Flow',NAME$n),'CONVERT FLOW',NAME$n);
|
1528
1519
|
|
1529
|
-
var DIR_NAME$m='
|
1520
|
+
var DIR_NAME$m='SnapEngage';var NAME$m='SNAPENGAGE';var DISPLAY_NAME$m='SnapEngage';_defineProperty({},DISPLAY_NAME$m,DIR_NAME$m);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$m,NAME$m),"SnapEngage",NAME$m),"Snap_Engage",NAME$m),"snapengage",NAME$m),'SNAP ENGAGE',NAME$m),'Snap Engage',NAME$m),'snap engage',NAME$m);
|
1530
1521
|
|
1531
|
-
var DIR_NAME$l='
|
1522
|
+
var DIR_NAME$l='LiveChat';var NAME$l='LIVECHAT';var DISPLAY_NAME$l='LiveChat';_defineProperty({},DISPLAY_NAME$l,DIR_NAME$l);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$l,NAME$l),"LiveChat",NAME$l),"Live_Chat",NAME$l),"livechat",NAME$l),'LIVE CHAT',NAME$l),'Live Chat',NAME$l),'live chat',NAME$l);
|
1532
1523
|
|
1533
|
-
var DIR_NAME$k='
|
1524
|
+
var DIR_NAME$k='Shynet';var NAME$k='SHYNET';var DISPLAY_NAME$k='Shynet';_defineProperty({},DISPLAY_NAME$k,DIR_NAME$k);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$k,NAME$k),"shynet",NAME$k),"ShyNet",NAME$k),"shyNet",NAME$k),"Shynet",NAME$k),'shy net',NAME$k),'Shy Net',NAME$k),'shy Net',NAME$k),'Shy net',NAME$k);
|
1534
1525
|
|
1535
|
-
var DIR_NAME$j='
|
1526
|
+
var DIR_NAME$j='Woopra';var NAME$j='WOOPRA';var DISPLAY_NAME$j='Woopra';_defineProperty({},DISPLAY_NAME$j,DIR_NAME$j);_defineProperty(_defineProperty(_defineProperty({},NAME$j,NAME$j),"Woopra",NAME$j),"woopra",NAME$j);
|
1536
1527
|
|
1537
|
-
var DIR_NAME$i='
|
1528
|
+
var DIR_NAME$i='RollBar';var NAME$i='ROLLBAR';var DISPLAY_NAME$i='RollBar';_defineProperty({},DISPLAY_NAME$i,DIR_NAME$i);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$i,NAME$i),"RollBar",NAME$i),"Roll_Bar",NAME$i),"rollbar",NAME$i),"Rollbar",NAME$i),'ROLL BAR',NAME$i),'Roll Bar',NAME$i),'roll bar',NAME$i);
|
1538
1529
|
|
1539
|
-
var DIR_NAME$h='
|
1530
|
+
var DIR_NAME$h='QuoraPixel';var NAME$h='QUORA_PIXEL';var DISPLAY_NAME$h='Quora Pixel';_defineProperty({},DISPLAY_NAME$h,DIR_NAME$h);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$h,NAME$h),'Quora Pixel',NAME$h),'Quora pixel',NAME$h),'QUORA PIXEL',NAME$h),"QuoraPixel",NAME$h),"Quorapixel",NAME$h),"QUORAPIXEL",NAME$h),"Quora_Pixel",NAME$h),"quora_pixel",NAME$h),"Quora",NAME$h);
|
1540
1531
|
|
1541
|
-
var DIR_NAME$g='
|
1532
|
+
var DIR_NAME$g='June';var NAME$g='JUNE';var DISPLAY_NAME$g='June';_defineProperty({},DISPLAY_NAME$g,DIR_NAME$g);_defineProperty(_defineProperty(_defineProperty({},NAME$g,NAME$g),"June",NAME$g),"june",NAME$g);
|
1542
1533
|
|
1543
|
-
var DIR_NAME$f='
|
1534
|
+
var DIR_NAME$f='Engage';var NAME$f='ENGAGE';var DISPLAY_NAME$f='Engage';_defineProperty({},DISPLAY_NAME$f,DIR_NAME$f);_defineProperty(_defineProperty(_defineProperty({},NAME$f,NAME$f),"Engage",NAME$f),"engage",NAME$f);
|
1544
1535
|
|
1545
|
-
var DIR_NAME$e='
|
1536
|
+
var DIR_NAME$e='Iterable';var NAME$e='ITERABLE';var DISPLAY_NAME$e='Iterable';_defineProperty({},DISPLAY_NAME$e,DIR_NAME$e);_defineProperty(_defineProperty(_defineProperty({},NAME$e,NAME$e),"Iterable",NAME$e),"iterable",NAME$e);
|
1546
1537
|
|
1547
|
-
var DIR_NAME$d='
|
1538
|
+
var DIR_NAME$d='YandexMetrica';var NAME$d='YANDEX_METRICA';var DISPLAY_NAME$d='Yandex.Metrica';_defineProperty({},DISPLAY_NAME$d,DIR_NAME$d);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$d,NAME$d),"Yandexmetrica",NAME$d),"yandexmetrica",NAME$d),"yandexMetrica",NAME$d),"YandexMetrica",NAME$d);
|
1548
1539
|
|
1549
|
-
var DIR_NAME$c='
|
1540
|
+
var DIR_NAME$c='Refiner';var NAME$c='REFINER';var DISPLAY_NAME$c='Refiner';_defineProperty({},DISPLAY_NAME$c,DIR_NAME$c);_defineProperty(_defineProperty(_defineProperty({},NAME$c,NAME$c),"Refiner",NAME$c),"refiner",NAME$c);
|
1550
1541
|
|
1551
|
-
var DIR_NAME$b='
|
1542
|
+
var DIR_NAME$b='Qualaroo';var NAME$b='QUALAROO';var DISPLAY_NAME$b='Qualaroo';_defineProperty({},DISPLAY_NAME$b,DIR_NAME$b);_defineProperty(_defineProperty(_defineProperty({},NAME$b,NAME$b),"Qualaroo",NAME$b),"qualaroo",NAME$b);
|
1552
1543
|
|
1553
|
-
var DIR_NAME$a='
|
1544
|
+
var DIR_NAME$a='Podsights';var NAME$a='PODSIGHTS';var DISPLAY_NAME$a='Podsights';_defineProperty({},DISPLAY_NAME$a,DIR_NAME$a);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$a,NAME$a),"Podsights",NAME$a),"PodSights",NAME$a),'pod Sights',NAME$a),'Pod Sights',NAME$a),'pod sights',NAME$a),'POD SIGHTS',NAME$a),'Pod sights',NAME$a);
|
1554
1545
|
|
1555
|
-
var DIR_NAME$9='
|
1546
|
+
var DIR_NAME$9='Axeptio';var NAME$9='AXEPTIO';var DISPLAY_NAME$9='Axeptio';_defineProperty({},DISPLAY_NAME$9,DIR_NAME$9);_defineProperty(_defineProperty(_defineProperty({},NAME$9,NAME$9),"Axeptio",NAME$9),"axeptio",NAME$9);
|
1556
1547
|
|
1557
|
-
var DIR_NAME$8='
|
1548
|
+
var DIR_NAME$8='Satismeter';var NAME$8='SATISMETER';var DISPLAY_NAME$8='Satismeter';_defineProperty({},DISPLAY_NAME$8,DIR_NAME$8);_defineProperty(_defineProperty(_defineProperty({},NAME$8,NAME$8),"Satismeter",NAME$8),"SatisMeter",NAME$8);
|
1558
1549
|
|
1559
|
-
var DIR_NAME$7='
|
1550
|
+
var DIR_NAME$7='MicrosoftClarity';var NAME$7='MICROSOFT_CLARITY';var DISPLAY_NAME$7='Microsoft Clarity';_defineProperty({},DISPLAY_NAME$7,DIR_NAME$7);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$7,NAME$7),'Microsoft Clarity',NAME$7),'Microsoft clarity',NAME$7),'microsoft clarity',NAME$7),"Microsoft_clarity",NAME$7),"MicrosoftClarity",NAME$7),"MICROSOFTCLARITY",NAME$7),"microsoftclarity",NAME$7),"microsoftClarity",NAME$7);
|
1560
1551
|
|
1561
|
-
var DIR_NAME$6='
|
1552
|
+
var DIR_NAME$6='Sendinblue';var NAME$6='SENDINBLUE';var DISPLAY_NAME$6='Sendinblue';_defineProperty({},DISPLAY_NAME$6,DIR_NAME$6);_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$6,NAME$6),"Sendinblue",NAME$6),"sendinblue",NAME$6),"SendinBlue",NAME$6);
|
1562
1553
|
|
1563
|
-
var DIR_NAME$5='
|
1554
|
+
var DIR_NAME$5='Olark';var NAME$5='OLARK';var DISPLAY_NAME$5='Olark';_defineProperty({},DISPLAY_NAME$5,DIR_NAME$5);_defineProperty(_defineProperty(_defineProperty({},NAME$5,NAME$5),"Olark",NAME$5),"olark",NAME$5);
|
1564
1555
|
|
1565
|
-
var DIR_NAME$4='
|
1556
|
+
var DIR_NAME$4='Lemnisk';var NAME$4='LEMNISK';var DISPLAY_NAME$4='Lemnisk';_defineProperty({},DISPLAY_NAME$4,DIR_NAME$4);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$4,NAME$4),"LEMNISK_MARKETING_AUTOMATION",NAME$4),'Lemnisk Marketing Automation',NAME$4),"LemniskMarketingAutomation",NAME$4),"lemniskmarketingautomation",NAME$4),"lemniskMarketingAutomation",NAME$4),"lemnisk",NAME$4),"Lemnisk",NAME$4);
|
1566
1557
|
|
1567
|
-
var DIR_NAME$3='
|
1558
|
+
var DIR_NAME$3='TiktokAds';var NAME$3='TIKTOK_ADS';var DISPLAY_NAME$3='TikTok Ads';_defineProperty({},DISPLAY_NAME$3,DIR_NAME$3);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME$3,NAME$3),"TiktokAds",NAME$3),'Tiktok ads',NAME$3),'Tiktok Ads',NAME$3),'Tik Tok Ads',NAME$3),'tik tok ads',NAME$3),"tiktokads",NAME$3);
|
1568
1559
|
|
1569
|
-
var DIR_NAME$2='
|
1560
|
+
var DIR_NAME$2='ActiveCampaign';var NAME$2='ACTIVE_CAMPAIGN';var DISPLAY_NAME$2='Active Campaign';_defineProperty({},DISPLAY_NAME$2,DIR_NAME$2);_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({ActiveCampaign:NAME$2,'Active Campaign':NAME$2,'ACTIVE CAMPAIGN':NAME$2},NAME$2,NAME$2),"activecampaign",NAME$2),'active campaign',NAME$2),'Active campaign',NAME$2),'active Campaign',NAME$2),"active_campaign",NAME$2);
|
1570
1561
|
|
1571
|
-
var DIR_NAME$1='
|
1562
|
+
var DIR_NAME$1='Sprig';var NAME$1='SPRIG';var DISPLAY_NAME$1='Sprig';_defineProperty({},DISPLAY_NAME$1,DIR_NAME$1);_defineProperty(_defineProperty(_defineProperty({},NAME$1,NAME$1),"Sprig",NAME$1),"sprig",NAME$1);
|
1572
1563
|
|
1573
|
-
var DIR_NAME='
|
1564
|
+
var DIR_NAME='SpotifyPixel';var NAME='SPOTIFYPIXEL';var DISPLAY_NAME='Spotify Pixel';_defineProperty({},DISPLAY_NAME,DIR_NAME);_defineProperty(_defineProperty(_defineProperty(_defineProperty({},NAME,NAME),'Spotify Pixel',NAME),'spotify pixel',NAME),"SPOTIFY_PIXEL",NAME);
|
1574
1565
|
|
1575
1566
|
var _destDisplayNamesToFi;// map of the destination display names to the destination directory names
|
1576
|
-
var destDisplayNamesToFileNamesMap=(_destDisplayNamesToFi={},_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_destDisplayNamesToFi,DISPLAY_NAME$
|
1567
|
+
var destDisplayNamesToFileNamesMap=(_destDisplayNamesToFi={},_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_destDisplayNamesToFi,DISPLAY_NAME$S,DIR_NAME$S),DISPLAY_NAME$Z,DIR_NAME$Z),DISPLAY_NAME$T,DIR_NAME$T),DISPLAY_NAME$X,DIR_NAME$X),DISPLAY_NAME$v,DIR_NAME$v),DISPLAY_NAME$V,DIR_NAME$V),DISPLAY_NAME$17,DIR_NAME$17),DISPLAY_NAME$R,DIR_NAME$R),DISPLAY_NAME$Q,DIR_NAME$Q),DISPLAY_NAME$P,DIR_NAME$P),_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_destDisplayNamesToFi,DISPLAY_NAME$11,DIR_NAME$11),DISPLAY_NAME$15,DIR_NAME$15),DISPLAY_NAME$13,DIR_NAME$13),DISPLAY_NAME$$,DIR_NAME$$),DISPLAY_NAME$L,DIR_NAME$L),DISPLAY_NAME$H,DIR_NAME$H),DISPLAY_NAME$16,DIR_NAME$16),DISPLAY_NAME$_,DIR_NAME$_),DISPLAY_NAME$w,DIR_NAME$w),DISPLAY_NAME$Y,DIR_NAME$Y),_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_destDisplayNamesToFi,DISPLAY_NAME$I,DIR_NAME$I),DISPLAY_NAME$1a,DIR_NAME$1a),DISPLAY_NAME$G,DIR_NAME$G),DISPLAY_NAME$K,DIR_NAME$K),DISPLAY_NAME$19,DIR_NAME$19),DISPLAY_NAME$D,DIR_NAME$D),DISPLAY_NAME$O,DIR_NAME$O),DISPLAY_NAME$14,DIR_NAME$14),DISPLAY_NAME$18,DIR_NAME$18),DISPLAY_NAME$F,DIR_NAME$F),_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_destDisplayNamesToFi,DISPLAY_NAME$1b,DIR_NAME$1b),DISPLAY_NAME$M,DIR_NAME$M),DISPLAY_NAME$z,DIR_NAME$z),DISPLAY_NAME$10,DIR_NAME$10),DISPLAY_NAME$U,DIR_NAME$U),DISPLAY_NAME$12,DIR_NAME$12),DISPLAY_NAME$J,DIR_NAME$J),DISPLAY_NAME$B,DIR_NAME$B),DISPLAY_NAME$C,DIR_NAME$C),DISPLAY_NAME$y,DIR_NAME$y),_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_destDisplayNamesToFi,DISPLAY_NAME$A,DIR_NAME$A),DISPLAY_NAME$x,DIR_NAME$x),DISPLAY_NAME$E,DIR_NAME$E),DISPLAY_NAME$W,DIR_NAME$W),DISPLAY_NAME$N,DIR_NAME$N),DISPLAY_NAME$u,DIR_NAME$u),DISPLAY_NAME$t,DIR_NAME$t),DISPLAY_NAME$s,DIR_NAME$s),DISPLAY_NAME$r,DIR_NAME$r),DISPLAY_NAME$q,DIR_NAME$q),_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_destDisplayNamesToFi,DISPLAY_NAME$p,DIR_NAME$p),DISPLAY_NAME$o,DIR_NAME$o),DISPLAY_NAME$n,DIR_NAME$n),DISPLAY_NAME$m,DIR_NAME$m),DISPLAY_NAME$l,DIR_NAME$l),DISPLAY_NAME$k,DIR_NAME$k),DISPLAY_NAME$j,DIR_NAME$j),DISPLAY_NAME$i,DIR_NAME$i),DISPLAY_NAME$h,DIR_NAME$h),DISPLAY_NAME$g,DIR_NAME$g),_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_destDisplayNamesToFi,DISPLAY_NAME$f,DIR_NAME$f),DISPLAY_NAME$e,DIR_NAME$e),DISPLAY_NAME$d,DIR_NAME$d),DISPLAY_NAME$c,DIR_NAME$c),DISPLAY_NAME$b,DIR_NAME$b),DISPLAY_NAME$a,DIR_NAME$a),DISPLAY_NAME$9,DIR_NAME$9),DISPLAY_NAME$8,DIR_NAME$8),DISPLAY_NAME$7,DIR_NAME$7),DISPLAY_NAME$6,DIR_NAME$6),_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_destDisplayNamesToFi,DISPLAY_NAME$5,DIR_NAME$5),DISPLAY_NAME$4,DIR_NAME$4),DISPLAY_NAME$3,DIR_NAME$3),DISPLAY_NAME$2,DIR_NAME$2),DISPLAY_NAME$1,DIR_NAME$1),DISPLAY_NAME,DIR_NAME));
|
1577
1568
|
|
1578
1569
|
var DEFAULT_INTEGRATIONS_CONFIG={All:true};
|
1579
1570
|
|
@@ -1596,19 +1587,19 @@
|
|
1596
1587
|
* @param sdkTypeName The name of the destination SDK type
|
1597
1588
|
* @param logger Logger instance
|
1598
1589
|
* @returns true if the destination SDK code is evaluated, false otherwise
|
1599
|
-
*/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 _state$consents$postC,_state$consents$postC2;var rAnalytics=globalThis.rudderanalytics;var analytics=rAnalytics.getAnalyticsInstance(state.lifecycle.writeKey.value);return new globalThis[destSDKIdentifier][sdkTypeName](clone
|
1590
|
+
*/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 _state$consents$postC,_state$consents$postC2;var rAnalytics=globalThis.rudderanalytics;var analytics=rAnalytics.getAnalyticsInstance(state.lifecycle.writeKey.value);return new globalThis[destSDKIdentifier][sdkTypeName](clone(dest.config),{loadIntegration:state.nativeDestinations.loadIntegration.value,logLevel:state.lifecycle.logLevel.value,loadOnlyIntegrations:(_state$consents$postC=(_state$consents$postC2=state.consents.postConsent.value)===null||_state$consents$postC2===void 0?void 0:_state$consents$postC2.integrations)!==null&&_state$consents$postC!==void 0?_state$consents$postC: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);});};/**
|
1600
1591
|
* Extracts the integration config, if any, from the given destination
|
1601
1592
|
* and merges it with the current integrations config
|
1602
1593
|
* @param dest Destination object
|
1603
1594
|
* @param curDestIntgConfig Current destinations integration config
|
1604
1595
|
* @param logger Logger object
|
1605
1596
|
* @returns Combined destinations integrations config
|
1606
|
-
*/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
|
1597
|
+
*/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(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
|
1607
1598
|
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
|
1608
1599
|
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));}};
|
1609
1600
|
|
1610
1601
|
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,_state$consents$postC,_state$consents$postC2;// Normalize the integration options from the load API call
|
1611
|
-
state.nativeDestinations.loadOnlyIntegrations.value=(_clone=clone
|
1602
|
+
state.nativeDestinations.loadOnlyIntegrations.value=(_clone=clone(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
|
1612
1603
|
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 or consent API options
|
1613
1604
|
var destinationsToLoad=filterDestinations((_state$consents$postC=(_state$consents$postC2=state.consents.postConsent.value)===null||_state$consents$postC2===void 0?void 0:_state$consents$postC2.integrations)!==null&&_state$consents$postC!==void 0?_state$consents$postC: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
|
1614
1605
|
(_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
|
@@ -1791,7 +1782,7 @@
|
|
1791
1782
|
* @returns IQueue instance
|
1792
1783
|
*/init:function init(state,pluginsManager,storeManager,dmtQueue,errorHandler,logger){var finalQOpts=getNormalizedQueueOptions$1(state.loadOptions.value.destinationsQueueOptions);var writeKey=state.lifecycle.writeKey.value;var eventsQueue=new RetryQueue(// adding write key to the queue name to avoid conflicts
|
1793
1784
|
"".concat(QUEUE_NAME$1,"_").concat(writeKey),finalQOpts,function(rudderEvent,done){var destinationsToSend=filterDestinations(rudderEvent.integrations,state.nativeDestinations.initializedDestinations.value);// list of destinations which are enable for DMT
|
1794
|
-
var destWithTransformationEnabled=[];var clonedRudderEvent=clone
|
1785
|
+
var destWithTransformationEnabled=[];var clonedRudderEvent=clone(rudderEvent);destinationsToSend.forEach(function(dest){try{var sendEvent=!isEventDenyListed(clonedRudderEvent.type,clonedRudderEvent.event,dest);if(!sendEvent){logger===null||logger===void 0||logger.warn(DESTINATION_EVENT_FILTERING_WARNING(NATIVE_DESTINATION_QUEUE_PLUGIN,clonedRudderEvent.event,dest.userFriendlyId));return;}if(dest.shouldApplyDeviceModeTransformation){destWithTransformationEnabled.push(dest);}else {sendEventToDestination(clonedRudderEvent,dest,errorHandler,logger);}}catch(e){errorHandler===null||errorHandler===void 0||errorHandler.onError(e,NATIVE_DESTINATION_QUEUE_PLUGIN);}});if(destWithTransformationEnabled.length>0){pluginsManager.invokeSingle('transformEvent.enqueue',state,dmtQueue,clonedRudderEvent,destWithTransformationEnabled,errorHandler,logger);}// Mark success always
|
1795
1786
|
done(null);},storeManager,MEMORY_STORAGE);// TODO: This seems to not work as expected. Need to investigate
|
1796
1787
|
// effect(() => {
|
1797
1788
|
// if (state.nativeDestinations.clientDestinationsReady.value === true) {
|
@@ -1879,7 +1870,7 @@
|
|
1879
1870
|
*
|
1880
1871
|
* @property {Array} words The array of 32-bit words.
|
1881
1872
|
* @property {number} sigBytes The number of significant bytes in this word array.
|
1882
|
-
*/var WordArray=/*#__PURE__*/function(_Base){_inherits(WordArray,_Base)
|
1873
|
+
*/var WordArray=/*#__PURE__*/function(_Base){_inherits(WordArray,_Base);/**
|
1883
1874
|
* Initializes a newly created word array.
|
1884
1875
|
*
|
1885
1876
|
* @param {Array} words (Optional) An array of 32-bit words.
|
@@ -1890,7 +1881,7 @@
|
|
1890
1881
|
* var wordArray = CryptoJS.lib.WordArray.create();
|
1891
1882
|
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
|
1892
1883
|
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
|
1893
|
-
*/function WordArray(){var _this;var words=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];var sigBytes=arguments.length>1&&arguments[1]!==undefined?arguments[1]:words.length*4;_classCallCheck(this,WordArray);_this=
|
1884
|
+
*/function WordArray(){var _this;var words=arguments.length>0&&arguments[0]!==undefined?arguments[0]:[];var sigBytes=arguments.length>1&&arguments[1]!==undefined?arguments[1]:words.length*4;_classCallCheck(this,WordArray);_this=_callSuper(this,WordArray);var typedArray=words;// Convert buffers to uint8
|
1894
1885
|
if(typedArray instanceof ArrayBuffer){typedArray=new Uint8Array(typedArray);}// Convert other array views to uint8
|
1895
1886
|
if(typedArray instanceof Int8Array||typedArray instanceof Uint8ClampedArray||typedArray instanceof Int16Array||typedArray instanceof Uint16Array||typedArray instanceof Int32Array||typedArray instanceof Uint32Array||typedArray instanceof Float32Array||typedArray instanceof Float64Array){typedArray=new Uint8Array(typedArray.buffer,typedArray.byteOffset,typedArray.byteLength);}// Handle Uint8Array
|
1896
1887
|
if(typedArray instanceof Uint8Array){// Shortcut
|
@@ -2047,7 +2038,7 @@
|
|
2047
2038
|
* @property {number} _minBufferSize
|
2048
2039
|
*
|
2049
2040
|
* The number of blocks that should be kept unprocessed in the buffer. Default: 0
|
2050
|
-
*/var BufferedBlockAlgorithm=/*#__PURE__*/function(_Base2){_inherits(BufferedBlockAlgorithm,_Base2);
|
2041
|
+
*/var BufferedBlockAlgorithm=/*#__PURE__*/function(_Base2){_inherits(BufferedBlockAlgorithm,_Base2);function BufferedBlockAlgorithm(){var _this2;_classCallCheck(this,BufferedBlockAlgorithm);_this2=_callSuper(this,BufferedBlockAlgorithm);_this2._minBufferSize=0;return _this2;}/**
|
2051
2042
|
* Resets this block algorithm's data buffer to its initial state.
|
2052
2043
|
*
|
2053
2044
|
* @example
|
@@ -2105,7 +2096,7 @@
|
|
2105
2096
|
* @property {number} blockSize
|
2106
2097
|
*
|
2107
2098
|
* The number of 32-bit words this hasher operates on. Default: 16 (512 bits)
|
2108
|
-
*/var Hasher=/*#__PURE__*/function(_BufferedBlockAlgorit){_inherits(Hasher,_BufferedBlockAlgorit);
|
2099
|
+
*/var Hasher=/*#__PURE__*/function(_BufferedBlockAlgorit){_inherits(Hasher,_BufferedBlockAlgorit);function Hasher(cfg){var _this3;_classCallCheck(this,Hasher);_this3=_callSuper(this,Hasher);_this3.blockSize=512/32;/**
|
2109
2100
|
* Configuration options.
|
2110
2101
|
*/_this3.cfg=Object.assign(new Base(),cfg);// Set initial values
|
2111
2102
|
_this3.reset();return _this3;}/**
|
@@ -2171,7 +2162,7 @@
|
|
2171
2162
|
* var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
|
2172
2163
|
*/},{key:"_createHmacHelper",value:function _createHmacHelper(SubHasher){return function(message,key){return new HMAC(SubHasher,key).finalize(message);};}}]);return Hasher;}(BufferedBlockAlgorithm);/**
|
2173
2164
|
* HMAC algorithm.
|
2174
|
-
*/var HMAC=/*#__PURE__*/function(_Base3){_inherits(HMAC,_Base3)
|
2165
|
+
*/var HMAC=/*#__PURE__*/function(_Base3){_inherits(HMAC,_Base3);/**
|
2175
2166
|
* Initializes a newly created HMAC.
|
2176
2167
|
*
|
2177
2168
|
* @param {Hasher} SubHasher The hash algorithm to use.
|
@@ -2180,7 +2171,7 @@
|
|
2180
2171
|
* @example
|
2181
2172
|
*
|
2182
2173
|
* var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
|
2183
|
-
*/function HMAC(SubHasher,key){var _this4;_classCallCheck(this,HMAC);_this4=
|
2174
|
+
*/function HMAC(SubHasher,key){var _this4;_classCallCheck(this,HMAC);_this4=_callSuper(this,HMAC);var hasher=new SubHasher();_this4._hasher=hasher;// Convert string to WordArray, else assume WordArray already
|
2184
2175
|
var _key=key;if(typeof _key==='string'){_key=Utf8.parse(_key);}// Shortcuts
|
2185
2176
|
var hasherBlockSize=hasher.blockSize;var hasherBlockSizeBytes=hasherBlockSize*4;// Allow arbitrary length keys
|
2186
2177
|
if(_key.sigBytes>hasherBlockSizeBytes){_key=hasher.finalize(key);}// Clamp excess bits
|
@@ -2263,7 +2254,7 @@
|
|
2263
2254
|
var T=[];// Compute constants
|
2264
2255
|
for(var i$1=0;i$1<64;i$1+=1){T[i$1]=Math.abs(Math.sin(i$1+1))*0x100000000|0;}var FF=function FF(a,b,c,d,x,s,t){var n=a+(b&c|~b&d)+x+t;return (n<<s|n>>>32-s)+b;};var GG=function GG(a,b,c,d,x,s,t){var n=a+(b&d|c&~d)+x+t;return (n<<s|n>>>32-s)+b;};var HH=function HH(a,b,c,d,x,s,t){var n=a+(b^c^d)+x+t;return (n<<s|n>>>32-s)+b;};var II=function II(a,b,c,d,x,s,t){var n=a+(c^(b|~d))+x+t;return (n<<s|n>>>32-s)+b;};/**
|
2265
2256
|
* MD5 hash algorithm.
|
2266
|
-
*/var MD5Algo=/*#__PURE__*/function(_Hasher){_inherits(MD5Algo,_Hasher);
|
2257
|
+
*/var MD5Algo=/*#__PURE__*/function(_Hasher){_inherits(MD5Algo,_Hasher);function MD5Algo(){_classCallCheck(this,MD5Algo);return _callSuper(this,MD5Algo,arguments);}_createClass(MD5Algo,[{key:"_doReset",value:function _doReset(){this._hash=new WordArray([0x67452301,0xefcdab89,0x98badcfe,0x10325476]);}},{key:"_doProcessBlock",value:function _doProcessBlock(M,offset){var _M=M;// Swap endian
|
2267
2258
|
for(var _i=0;_i<16;_i+=1){// Shortcuts
|
2268
2259
|
var offset_i=offset+_i;var M_offset_i=M[offset_i];_M[offset_i]=(M_offset_i<<8|M_offset_i>>>24)&0x00ff00ff|(M_offset_i<<24|M_offset_i>>>8)&0xff00ff00;}// Shortcuts
|
2269
2260
|
var H=this._hash.words;var M_offset_0=_M[offset+0];var M_offset_1=_M[offset+1];var M_offset_2=_M[offset+2];var M_offset_3=_M[offset+3];var M_offset_4=_M[offset+4];var M_offset_5=_M[offset+5];var M_offset_6=_M[offset+6];var M_offset_7=_M[offset+7];var M_offset_8=_M[offset+8];var M_offset_9=_M[offset+9];var M_offset_10=_M[offset+10];var M_offset_11=_M[offset+11];var M_offset_12=_M[offset+12];var M_offset_13=_M[offset+13];var M_offset_14=_M[offset+14];var M_offset_15=_M[offset+15];// Working varialbes
|
@@ -2307,7 +2298,7 @@
|
|
2307
2298
|
/**
|
2308
2299
|
* This key derivation function is meant to conform with EVP_BytesToKey.
|
2309
2300
|
* www.openssl.org/docs/crypto/EVP_BytesToKey.html
|
2310
|
-
*/var EvpKDFAlgo=/*#__PURE__*/function(_Base){_inherits(EvpKDFAlgo,_Base)
|
2301
|
+
*/var EvpKDFAlgo=/*#__PURE__*/function(_Base){_inherits(EvpKDFAlgo,_Base);/**
|
2311
2302
|
* Initializes a newly created key derivation function.
|
2312
2303
|
*
|
2313
2304
|
* @param {Object} cfg (Optional) The configuration options to use for the derivation.
|
@@ -2317,7 +2308,7 @@
|
|
2317
2308
|
* const kdf = CryptoJS.algo.EvpKDF.create();
|
2318
2309
|
* const kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });
|
2319
2310
|
* const kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });
|
2320
|
-
*/function EvpKDFAlgo(cfg){var _this;_classCallCheck(this,EvpKDFAlgo);_this=
|
2311
|
+
*/function EvpKDFAlgo(cfg){var _this;_classCallCheck(this,EvpKDFAlgo);_this=_callSuper(this,EvpKDFAlgo);/**
|
2321
2312
|
* Configuration options.
|
2322
2313
|
*
|
2323
2314
|
* @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
|
@@ -2349,7 +2340,7 @@
|
|
2349
2340
|
* @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)
|
2350
2341
|
* @property {number} _ENC_XFORM_MODE A constant representing encryption mode.
|
2351
2342
|
* @property {number} _DEC_XFORM_MODE A constant representing decryption mode.
|
2352
|
-
*/var Cipher=/*#__PURE__*/function(_BufferedBlockAlgorit){_inherits(Cipher,_BufferedBlockAlgorit)
|
2343
|
+
*/var Cipher=/*#__PURE__*/function(_BufferedBlockAlgorit){_inherits(Cipher,_BufferedBlockAlgorit);/**
|
2353
2344
|
* Initializes a newly created cipher.
|
2354
2345
|
*
|
2355
2346
|
* @param {number} xformMode Either the encryption or decryption transormation mode constant.
|
@@ -2361,7 +2352,7 @@
|
|
2361
2352
|
* const cipher = CryptoJS.algo.AES.create(
|
2362
2353
|
* CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }
|
2363
2354
|
* );
|
2364
|
-
*/function Cipher(xformMode,key,cfg){var _this;_classCallCheck(this,Cipher);_this=
|
2355
|
+
*/function Cipher(xformMode,key,cfg){var _this;_classCallCheck(this,Cipher);_this=_callSuper(this,Cipher);/**
|
2365
2356
|
* Configuration options.
|
2366
2357
|
*
|
2367
2358
|
* @property {WordArray} iv The IV to use for this operation.
|
@@ -2443,7 +2434,7 @@
|
|
2443
2434
|
* const AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);
|
2444
2435
|
*/},{key:"_createHelper",value:function _createHelper(SubCipher){var selectCipherStrategy=function selectCipherStrategy(key){if(typeof key==='string'){return PasswordBasedCipher;}return SerializableCipher;};return {encrypt:function encrypt(message,key,cfg){return selectCipherStrategy(key).encrypt(SubCipher,message,key,cfg);},decrypt:function decrypt(ciphertext,key,cfg){return selectCipherStrategy(key).decrypt(SubCipher,ciphertext,key,cfg);}};}}]);return Cipher;}(BufferedBlockAlgorithm);Cipher._ENC_XFORM_MODE=1;Cipher._DEC_XFORM_MODE=2;Cipher.keySize=128/32;Cipher.ivSize=128/32;/**
|
2445
2436
|
* Abstract base block cipher mode template.
|
2446
|
-
*/var BlockCipherMode=/*#__PURE__*/function(_Base){_inherits(BlockCipherMode,_Base)
|
2437
|
+
*/var BlockCipherMode=/*#__PURE__*/function(_Base){_inherits(BlockCipherMode,_Base);/**
|
2447
2438
|
* Initializes a newly created mode.
|
2448
2439
|
*
|
2449
2440
|
* @param {Cipher} cipher A block cipher instance.
|
@@ -2452,7 +2443,7 @@
|
|
2452
2443
|
* @example
|
2453
2444
|
*
|
2454
2445
|
* const mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);
|
2455
|
-
*/function BlockCipherMode(cipher,iv){var _this3;_classCallCheck(this,BlockCipherMode);_this3=
|
2446
|
+
*/function BlockCipherMode(cipher,iv){var _this3;_classCallCheck(this,BlockCipherMode);_this3=_callSuper(this,BlockCipherMode);_this3._cipher=cipher;_this3._iv=iv;return _this3;}/**
|
2456
2447
|
* Creates this mode for encryption.
|
2457
2448
|
*
|
2458
2449
|
* @param {Cipher} cipher A block cipher instance.
|
@@ -2482,9 +2473,9 @@
|
|
2482
2473
|
* Cipher Block Chaining mode.
|
2483
2474
|
*/ /**
|
2484
2475
|
* Abstract base CBC mode.
|
2485
|
-
*/var CBC=/*#__PURE__*/function(_BlockCipherMode){_inherits(CBC,_BlockCipherMode);
|
2476
|
+
*/var CBC=/*#__PURE__*/function(_BlockCipherMode){_inherits(CBC,_BlockCipherMode);function CBC(){_classCallCheck(this,CBC);return _callSuper(this,CBC,arguments);}return _createClass(CBC);}(BlockCipherMode);/**
|
2486
2477
|
* CBC encryptor.
|
2487
|
-
*/CBC.Encryptor=/*#__PURE__*/function(_CBC){_inherits(_class,_CBC);
|
2478
|
+
*/CBC.Encryptor=/*#__PURE__*/function(_CBC){_inherits(_class,_CBC);function _class(){_classCallCheck(this,_class);return _callSuper(this,_class,arguments);}_createClass(_class,[{key:"processBlock",value:/**
|
2488
2479
|
* Processes the data block at offset.
|
2489
2480
|
*
|
2490
2481
|
* @param {Array} words The data words to operate on.
|
@@ -2498,7 +2489,7 @@
|
|
2498
2489
|
xorBlock.call(this,words,offset,blockSize);cipher.encryptBlock(words,offset);// Remember this block to use with next block
|
2499
2490
|
this._prevBlock=words.slice(offset,offset+blockSize);}}]);return _class;}(CBC);/**
|
2500
2491
|
* CBC decryptor.
|
2501
|
-
*/CBC.Decryptor=/*#__PURE__*/function(_CBC2){_inherits(_class2,_CBC2);
|
2492
|
+
*/CBC.Decryptor=/*#__PURE__*/function(_CBC2){_inherits(_class2,_CBC2);function _class2(){_classCallCheck(this,_class2);return _callSuper(this,_class2,arguments);}_createClass(_class2,[{key:"processBlock",value:/**
|
2502
2493
|
* Processes the data block at offset.
|
2503
2494
|
*
|
2504
2495
|
* @param {Array} words The data words to operate on.
|
@@ -2547,12 +2538,12 @@
|
|
2547
2538
|
* @property {number} blockSize
|
2548
2539
|
*
|
2549
2540
|
* The number of 32-bit words this cipher operates on. Default: 4 (128 bits)
|
2550
|
-
*/var BlockCipher=/*#__PURE__*/function(_Cipher2){_inherits(BlockCipher,_Cipher2);
|
2541
|
+
*/var BlockCipher=/*#__PURE__*/function(_Cipher2){_inherits(BlockCipher,_Cipher2);function BlockCipher(xformMode,key,cfg){var _this4;_classCallCheck(this,BlockCipher);/**
|
2551
2542
|
* Configuration options.
|
2552
2543
|
*
|
2553
2544
|
* @property {Mode} mode The block mode to use. Default: CBC
|
2554
2545
|
* @property {Padding} padding The padding strategy to use. Default: Pkcs7
|
2555
|
-
*/_this4=
|
2546
|
+
*/_this4=_callSuper(this,BlockCipher,[xformMode,key,ObjectAssign({mode:CBC,padding:Pkcs7},cfg)]);_this4.blockSize=128/32;return _this4;}_createClass(BlockCipher,[{key:"reset",value:function reset(){var modeCreator;// Reset cipher
|
2556
2547
|
_get(_getPrototypeOf(BlockCipher.prototype),"reset",this).call(this);// Shortcuts
|
2557
2548
|
var cfg=this.cfg;var iv=cfg.iv,mode=cfg.mode;// Reset block mode
|
2558
2549
|
if(this._xformMode===this.constructor._ENC_XFORM_MODE){modeCreator=mode.createEncryptor;}else/* if (this._xformMode == this._DEC_XFORM_MODE) */{modeCreator=mode.createDecryptor;// Keep at least one block in the buffer for unpadding
|
@@ -2575,7 +2566,7 @@
|
|
2575
2566
|
* @property {number} blockSize The block size of the cipher.
|
2576
2567
|
* @property {Format} formatter
|
2577
2568
|
* The default formatting strategy to convert this cipher params object to a string.
|
2578
|
-
*/var CipherParams=/*#__PURE__*/function(_Base2){_inherits(CipherParams,_Base2)
|
2569
|
+
*/var CipherParams=/*#__PURE__*/function(_Base2){_inherits(CipherParams,_Base2);/**
|
2579
2570
|
* Initializes a newly created cipher params object.
|
2580
2571
|
*
|
2581
2572
|
* @param {Object} cipherParams An object with any of the possible cipher parameters.
|
@@ -2593,7 +2584,7 @@
|
|
2593
2584
|
* blockSize: 4,
|
2594
2585
|
* formatter: CryptoJS.format.OpenSSL
|
2595
2586
|
* });
|
2596
|
-
*/function CipherParams(cipherParams){var _this5;_classCallCheck(this,CipherParams);_this5=
|
2587
|
+
*/function CipherParams(cipherParams){var _this5;_classCallCheck(this,CipherParams);_this5=_callSuper(this,CipherParams);_this5.mixIn(cipherParams);return _this5;}/**
|
2597
2588
|
* Converts this cipher params object to a string.
|
2598
2589
|
*
|
2599
2590
|
* @param {Format} formatter (Optional) The formatting strategy to use.
|
@@ -2642,7 +2633,7 @@
|
|
2642
2633
|
salt=WordArray.create(ciphertextWords.slice(2,4));// Remove salt from ciphertext
|
2643
2634
|
ciphertextWords.splice(0,4);ciphertext.sigBytes-=16;}return CipherParams.create({ciphertext:ciphertext,salt:salt});}};/**
|
2644
2635
|
* A cipher wrapper that returns ciphertext as a serializable cipher params object.
|
2645
|
-
*/var SerializableCipher=/*#__PURE__*/function(_Base3){_inherits(SerializableCipher,_Base3);
|
2636
|
+
*/var SerializableCipher=/*#__PURE__*/function(_Base3){_inherits(SerializableCipher,_Base3);function SerializableCipher(){_classCallCheck(this,SerializableCipher);return _callSuper(this,SerializableCipher,arguments);}_createClass(SerializableCipher,null,[{key:"encrypt",value:/**
|
2646
2637
|
* Encrypts a message.
|
2647
2638
|
*
|
2648
2639
|
* @param {Cipher} cipher The cipher algorithm to use.
|
@@ -2737,7 +2728,7 @@
|
|
2737
2728
|
return CipherParams.create({key:key,iv:iv,salt:_salt});}};/**
|
2738
2729
|
* A serializable cipher wrapper that derives the key from a password,
|
2739
2730
|
* and returns ciphertext as a serializable cipher params object.
|
2740
|
-
*/var PasswordBasedCipher=/*#__PURE__*/function(_SerializableCipher){_inherits(PasswordBasedCipher,_SerializableCipher);
|
2731
|
+
*/var PasswordBasedCipher=/*#__PURE__*/function(_SerializableCipher){_inherits(PasswordBasedCipher,_SerializableCipher);function PasswordBasedCipher(){_classCallCheck(this,PasswordBasedCipher);return _callSuper(this,PasswordBasedCipher,arguments);}_createClass(PasswordBasedCipher,null,[{key:"encrypt",value:/**
|
2741
2732
|
* Encrypts a message using a password.
|
2742
2733
|
*
|
2743
2734
|
* @param {Cipher} cipher The cipher algorithm to use.
|
@@ -2804,7 +2795,7 @@
|
|
2804
2795
|
if(!x){xi=1;x=xi;}else {x=x2^d[d[d[x8^x2]]];xi^=d[d[xi]];}}// Precomputed Rcon lookup
|
2805
2796
|
var RCON=[0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,0x1b,0x36];/**
|
2806
2797
|
* AES block cipher algorithm.
|
2807
|
-
*/var AESAlgo=/*#__PURE__*/function(_BlockCipher){_inherits(AESAlgo,_BlockCipher);
|
2798
|
+
*/var AESAlgo=/*#__PURE__*/function(_BlockCipher){_inherits(AESAlgo,_BlockCipher);function AESAlgo(){_classCallCheck(this,AESAlgo);return _callSuper(this,AESAlgo,arguments);}_createClass(AESAlgo,[{key:"_doReset",value:function _doReset(){var t;// Skip reset of nRounds has been set before and key did not change
|
2808
2799
|
if(this._nRounds&&this._keyPriorReset===this._key){return;}// Shortcuts
|
2809
2800
|
this._keyPriorReset=this._key;var key=this._keyPriorReset;var keyWords=key.words;var keySize=key.sigBytes/4;// Compute number of rounds
|
2810
2801
|
this._nRounds=keySize+6;var nRounds=this._nRounds;// Compute number of key schedule rows
|
@@ -2853,7 +2844,7 @@
|
|
2853
2844
|
|
2854
2845
|
var EVENT_DELIVERY_FAILURE_ERROR_PREFIX=function EVENT_DELIVERY_FAILURE_ERROR_PREFIX(context,url){return "".concat(context).concat(LOG_CONTEXT_SEPARATOR,"Failed to deliver event(s) to ").concat(url,".");};
|
2855
2846
|
|
2856
|
-
var getBatchDeliveryPayload=function getBatchDeliveryPayload(events,currentTime,logger){var batchPayload={batch:events,sentAt:currentTime};return stringifyWithoutCircular(batchPayload,true,undefined,logger);};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;var currentTime=getCurrentTimeFormatted();if(Array.isArray(itemData)){var finalEvents=itemData.map(function(queueItemData){return getFinalEventForDeliveryMutator(queueItemData.event,currentTime);});data=getBatchDeliveryPayload(finalEvents,currentTime,logger);headers=itemData[0]?clone
|
2847
|
+
var getBatchDeliveryPayload=function getBatchDeliveryPayload(events,currentTime,logger){var batchPayload={batch:events,sentAt:currentTime};return stringifyWithoutCircular(batchPayload,true,undefined,logger);};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;var currentTime=getCurrentTimeFormatted();if(Array.isArray(itemData)){var finalEvents=itemData.map(function(queueItemData){return getFinalEventForDeliveryMutator(queueItemData.event,currentTime);});data=getBatchDeliveryPayload(finalEvents,currentTime,logger);headers=itemData[0]?clone(itemData[0].headers):{};url=getBatchDeliveryUrl(state.lifecycle.activeDataplaneUrl.value);}else {var eventUrl=itemData.url,event=itemData.event,eventHeaders=itemData.headers;var finalEvent=getFinalEventForDeliveryMutator(event,currentTime);data=getDeliveryPayload(finalEvent,logger);headers=clone(eventHeaders);url=eventUrl;}return {data:data,headers:headers,url:url};};
|
2857
2848
|
|
2858
2849
|
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:{/**
|
2859
2850
|
* Initialize the queue for delivery
|
@@ -3201,7 +3192,7 @@
|
|
3201
3192
|
*/var isPositiveInteger=function isPositiveInteger(num){return isNumber(num)&&num>=0&&Number.isInteger(num);};
|
3202
3193
|
|
3203
3194
|
var normalizeLoadOptions=function normalizeLoadOptions(loadOptionsFromState,loadOptions){var _normalizedLoadOpts$p,_normalizedLoadOpts$s2;// TODO: Maybe add warnings for invalid values
|
3204
|
-
var normalizedLoadOpts=clone
|
3195
|
+
var normalizedLoadOpts=clone(loadOptions);if(!isString(normalizedLoadOpts.setCookieDomain)){delete normalizedLoadOpts.setCookieDomain;}var cookieSameSiteValues=['Strict','Lax','None'];if(!cookieSameSiteValues.includes(normalizedLoadOpts.sameSiteCookie)){delete normalizedLoadOpts.sameSiteCookie;}normalizedLoadOpts.secureCookie=normalizedLoadOpts.secureCookie===true;var uaChTrackLevels=['none','default','full'];if(!uaChTrackLevels.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
|
3205
3196
|
// doesn't seem to throw errors for empty URLs
|
3206
3197
|
// TODO: Need to improve this check to find out if the URL is valid or not
|
3207
3198
|
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);};
|
@@ -3242,7 +3233,7 @@
|
|
3242
3233
|
* Validates and normalizes the consent options provided by the user
|
3243
3234
|
* @param options Consent options provided by the user
|
3244
3235
|
* @returns Validated and normalized consent options
|
3245
|
-
*/var getValidPostConsentOptions=function getValidPostConsentOptions(options){var validOptions={sendPageEvent:false,trackConsent:false,discardPreConsentEvents:false};if(isObjectLiteralAndNotNull(options)){var clonedOptions=clone
|
3236
|
+
*/var getValidPostConsentOptions=function getValidPostConsentOptions(options){var validOptions={sendPageEvent:false,trackConsent:false,discardPreConsentEvents:false};if(isObjectLiteralAndNotNull(options)){var clonedOptions=clone(options);validOptions.storage=clonedOptions.storage;if(isDefined(clonedOptions.integrations)){validOptions.integrations=isObjectLiteralAndNotNull(clonedOptions.integrations)?clonedOptions.integrations:DEFAULT_INTEGRATIONS_CONFIG;}validOptions.discardPreConsentEvents=clonedOptions.discardPreConsentEvents===true;validOptions.sendPageEvent=clonedOptions.sendPageEvent===true;validOptions.trackConsent=clonedOptions.trackConsent===true;if(isNonEmptyObject(clonedOptions.consentManagement)){// Override enabled value with the current state value
|
3246
3237
|
validOptions.consentManagement=mergeDeepRight(clonedOptions.consentManagement,{enabled:state.consents.enabled.value});}}return validOptions;};/**
|
3247
3238
|
* Validates if the input is a valid consents data
|
3248
3239
|
* @param value Input consents data
|
@@ -3282,7 +3273,7 @@
|
|
3282
3273
|
* @param resp Source config response
|
3283
3274
|
* @param logger Logger instance
|
3284
3275
|
*/var updateConsentsState=function updateConsentsState(resp){var resolutionStrategy=state.consents.resolutionStrategy.value;var cmpMetadata;if(isObjectLiteralAndNotNull(resp.consentManagementMetadata)){if(state.consents.provider.value){var _resp$consentManageme,_resp$consentManageme2;resolutionStrategy=(_resp$consentManageme=(_resp$consentManageme2=resp.consentManagementMetadata.providers.find(function(p){return p.provider===state.consents.provider.value;}))===null||_resp$consentManageme2===void 0?void 0:_resp$consentManageme2.resolutionStrategy)!==null&&_resp$consentManageme!==void 0?_resp$consentManageme:state.consents.resolutionStrategy.value;}cmpMetadata=resp.consentManagementMetadata;}// If the provider is custom, then the resolution strategy is not applicable
|
3285
|
-
if(state.consents.provider.value==='custom'){resolutionStrategy=undefined;}n(function(){state.consents.metadata.value=clone
|
3276
|
+
if(state.consents.provider.value==='custom'){resolutionStrategy=undefined;}n(function(){state.consents.metadata.value=clone(cmpMetadata);state.consents.resolutionStrategy.value=resolutionStrategy;});};
|
3286
3277
|
|
3287
3278
|
/**
|
3288
3279
|
* A function that determines integration SDK loading path
|
@@ -3457,17 +3448,17 @@
|
|
3457
3448
|
* Returns the final integrations config for the event based on the global config and event's config
|
3458
3449
|
* @param integrationsConfig Event's integrations config
|
3459
3450
|
* @returns Final integrations config
|
3460
|
-
*/var getEventIntegrationsConfig=function getEventIntegrationsConfig(integrationsConfig){var finalIntgConfig;if(shouldUseGlobalIntegrationsConfigInEvents()){var _state$consents$postC2,_state$consents$postC3;finalIntgConfig=clone
|
3451
|
+
*/var getEventIntegrationsConfig=function getEventIntegrationsConfig(integrationsConfig){var finalIntgConfig;if(shouldUseGlobalIntegrationsConfigInEvents()){var _state$consents$postC2,_state$consents$postC3;finalIntgConfig=clone((_state$consents$postC2=(_state$consents$postC3=state.consents.postConsent.value)===null||_state$consents$postC3===void 0?void 0:_state$consents$postC3.integrations)!==null&&_state$consents$postC2!==void 0?_state$consents$postC2:state.nativeDestinations.loadOnlyIntegrations.value);}else if(isObjectLiteralAndNotNull(integrationsConfig)){finalIntgConfig=integrationsConfig;}else {finalIntgConfig=DEFAULT_INTEGRATIONS_CONFIG;}return finalIntgConfig;};/**
|
3461
3452
|
* Enrich the base event object with data from state and the API options
|
3462
3453
|
* @param rudderEvent RudderEvent object
|
3463
3454
|
* @param options API options
|
3464
3455
|
* @param pageProps Page properties
|
3465
3456
|
* @param logger logger
|
3466
3457
|
* @returns Enriched RudderEvent object
|
3467
|
-
*/var getEnrichedEvent=function getEnrichedEvent(rudderEvent,options,pageProps,logger){var _state$storage$entrie;var commonEventData={channel:CHANNEL,context:_objectSpread2(_objectSpread2({traits:clone
|
3458
|
+
*/var getEnrichedEvent=function getEnrichedEvent(rudderEvent,options,pageProps,logger){var _state$storage$entrie;var commonEventData={channel:CHANNEL,context:_objectSpread2(_objectSpread2({traits:clone(state.session.userTraits.value),sessionId:state.session.sessionInfo.value.id||undefined,sessionStart:state.session.sessionInfo.value.sessionStart||undefined},state.consents.enabled.value&&{consentManagement:{deniedConsentIds:clone(state.consents.data.value.deniedConsentIds),allowedConsentIds:clone(state.consents.data.value.allowedConsentIds),provider:state.consents.provider.value,resolutionStrategy:state.consents.resolutionStrategy.value}}),{},{'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),timezone:state.context.timezone.value}),originalTimestamp:getCurrentTimeFormatted(),integrations:DEFAULT_INTEGRATIONS_CONFIG,messageId:generateUUID(),userId:rudderEvent.userId||state.session.userId.value};if(!isStorageTypeValidForStoringData((_state$storage$entrie=state.storage.entries.value.anonymousId)===null||_state$storage$entrie===void 0?void 0:_state$storage$entrie.type)){// Generate new anonymous id for each request
|
3468
3459
|
commonEventData.anonymousId=generateAnonymousId();}else {// Type casting to string as the user session manager will take care of initializing the value
|
3469
3460
|
commonEventData.anonymousId=state.session.anonymousId.value;}// set truly anonymous tracking flag
|
3470
|
-
if(state.storage.trulyAnonymousTracking.value){commonEventData.context.trulyAnonymousTracking=true;}if(rudderEvent.type==='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
|
3461
|
+
if(state.storage.trulyAnonymousTracking.value){commonEventData.context.trulyAnonymousTracking=true;}if(rudderEvent.type==='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(state.session.userTraits.value):rudderEvent.context.traits;}if(rudderEvent.type==='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(state.session.groupTraits.value):rudderEvent.traits;}}var processedEvent=mergeDeepRight(rudderEvent,commonEventData);// Set the default values for the event properties
|
3471
3462
|
// matching with v1.1 payload
|
3472
3463
|
if(processedEvent.event===undefined){processedEvent.event=null;}if(processedEvent.properties===undefined){processedEvent.properties=null;}processOptions(processedEvent,options);checkForReservedElements(processedEvent,logger);// Update the integrations config for the event
|
3473
3464
|
processedEvent.integrations=getEventIntegrationsConfig(processedEvent.integrations);return processedEvent;};
|
@@ -3628,10 +3619,6 @@
|
|
3628
3619
|
* @param userId
|
3629
3620
|
*/},{key:"setAuthToken",value:function setAuthToken(token){state.session.authToken.value=this.isPersistenceEnabledForStorageEntry('authToken')&&token?token:DEFAULT_USER_SESSION_VALUES.authToken;}}]);return UserSessionManager;}();
|
3630
3621
|
|
3631
|
-
/**
|
3632
|
-
* A buffer queue to serve as a store for any type of data
|
3633
|
-
*/var BufferQueue=/*#__PURE__*/function(){function BufferQueue(){_classCallCheck(this,BufferQueue);this.items=[];}_createClass(BufferQueue,[{key:"enqueue",value:function enqueue(item){this.items.push(item);}},{key:"dequeue",value:function dequeue(){if(this.items.length===0){return null;}return this.items.shift();}},{key:"isEmpty",value:function isEmpty(){return this.items.length===0;}},{key:"size",value:function size(){return this.items.length;}},{key:"clear",value:function clear(){this.items=[];}}]);return BufferQueue;}();
|
3634
|
-
|
3635
3622
|
var DATA_PLANE_QUEUE_EXT_POINT_PREFIX='dataplaneEventsQueue';var DESTINATIONS_QUEUE_EXT_POINT_PREFIX='destinationsEventsQueue';var DMT_EXT_POINT_PREFIX='transformEvent';
|
3636
3623
|
|
3637
3624
|
/**
|
@@ -3639,12 +3626,12 @@
|
|
3639
3626
|
* @param eventIntgConfig User supplied integrations config at event level
|
3640
3627
|
* @param destinationsIntgConfig Cumulative integrations config from all destinations
|
3641
3628
|
* @returns Filtered user supplied integrations config
|
3642
|
-
*/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
|
3629
|
+
*/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(obj);retVal[key]=eventIntgConfig[key];return retVal;},{});};/**
|
3643
3630
|
* Returns the event object with final integrations config
|
3644
3631
|
* @param event RudderEvent object
|
3645
3632
|
* @param state Application state
|
3646
3633
|
* @returns Mutated event with final integrations config
|
3647
|
-
*/var getFinalEvent=function getFinalEvent(event,state){var _event$integrations;var finalEvent=clone
|
3634
|
+
*/var getFinalEvent=function getFinalEvent(event,state){var _event$integrations;var finalEvent=clone(event);// Merge the destination specific integrations config with the event's integrations config
|
3648
3635
|
// In general, the preference is given to the event's integrations config
|
3649
3636
|
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;};var shouldBufferEventsForPreConsent=function shouldBufferEventsForPreConsent(state){var _state$consents$preCo,_state$consents$preCo2,_state$consents$preCo3;return state.consents.preConsent.value.enabled&&((_state$consents$preCo=state.consents.preConsent.value.events)===null||_state$consents$preCo===void 0?void 0:_state$consents$preCo.delivery)==='buffer'&&(((_state$consents$preCo2=state.consents.preConsent.value.storage)===null||_state$consents$preCo2===void 0?void 0:_state$consents$preCo2.strategy)==='session'||((_state$consents$preCo3=state.consents.preConsent.value.storage)===null||_state$consents$preCo3===void 0?void 0:_state$consents$preCo3.strategy)==='none');};
|
3650
3637
|
|
@@ -3668,7 +3655,7 @@
|
|
3668
3655
|
* Enqueues the event for processing
|
3669
3656
|
* @param event RudderEvent object
|
3670
3657
|
* @param callback API callback function
|
3671
|
-
*/},{key:"enqueue",value:function enqueue(event,callback){var dpQEvent;try{dpQEvent=getFinalEvent(event,state);this.pluginsManager.invokeSingle("".concat(DATA_PLANE_QUEUE_EXT_POINT_PREFIX,".enqueue"),state,this.dataplaneEventsQueue,dpQEvent,this.errorHandler,this.logger);}catch(e){this.onError(e,DATAPLANE_PLUGIN_ENQUEUE_ERROR);}try{var dQEvent=clone
|
3658
|
+
*/},{key:"enqueue",value:function enqueue(event,callback){var dpQEvent;try{dpQEvent=getFinalEvent(event,state);this.pluginsManager.invokeSingle("".concat(DATA_PLANE_QUEUE_EXT_POINT_PREFIX,".enqueue"),state,this.dataplaneEventsQueue,dpQEvent,this.errorHandler,this.logger);}catch(e){this.onError(e,DATAPLANE_PLUGIN_ENQUEUE_ERROR);}try{var dQEvent=clone(event);this.pluginsManager.invokeSingle("".concat(DESTINATIONS_QUEUE_EXT_POINT_PREFIX,".enqueue"),state,this.destinationsEventsQueue,dQEvent,this.errorHandler,this.logger);}catch(e){this.onError(e,NATIVE_DEST_PLUGIN_ENQUEUE_ERROR);}// Invoke the callback if it exists
|
3672
3659
|
try{// Using the event sent to the data plane queue here
|
3673
3660
|
// to ensure the mutated (if any) event is sent to the callback
|
3674
3661
|
callback===null||callback===void 0||callback(dpQEvent);}catch(error){this.onError(error,API_CALLBACK_INVOKE_ERROR);}}/**
|
@@ -3686,7 +3673,7 @@
|
|
3686
3673
|
* Initialize services and components or use default ones if singletons
|
3687
3674
|
*/function Analytics(){_classCallCheck(this,Analytics);this.preloadBuffer=new BufferQueue();this.initialized=false;this.errorHandler=defaultErrorHandler;this.logger=defaultLogger;this.externalSrcLoader=new ExternalSrcLoader(this.errorHandler,this.logger);this.capabilitiesManager=new CapabilitiesManager(this.errorHandler,this.logger);this.httpClient=defaultHttpClient;}/**
|
3688
3675
|
* Start application lifecycle if not already started
|
3689
|
-
*/_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
|
3676
|
+
*/_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(dataPlaneUrl);var clonedLoadOptions=clone(loadOptions);// dataPlaneUrl is not provided
|
3690
3677
|
if(isObjectAndNotNull(dataPlaneUrl)){clonedLoadOptions=dataPlaneUrl;clonedDataPlaneUrl=undefined;}// Set initial state values
|
3691
3678
|
n(function(){state.lifecycle.writeKey.value=writeKey;state.lifecycle.dataPlaneUrl.value=clonedDataPlaneUrl;state.loadOptions.value=normalizeLoadOptions(state.loadOptions.value,clonedLoadOptions);state.lifecycle.status.value='mounted';});// set log level as early as possible
|
3692
3679
|
if(state.loadOptions.value.logLevel){var _this$logger;(_this$logger=this.logger)===null||_this$logger===void 0||_this$logger.setMinLogLevel(state.loadOptions.value.logLevel);}// Expose state to global objects
|
@@ -3701,7 +3688,7 @@
|
|
3701
3688
|
* Load browser polyfill if required
|
3702
3689
|
*/},{key:"onMounted",value:function onMounted(){this.capabilitiesManager.init();}/**
|
3703
3690
|
* Enqueue in SDK preload buffer events, used from preloadBuffer component
|
3704
|
-
*/},{key:"enqueuePreloadBufferEvents",value:function enqueuePreloadBufferEvents(bufferedEvents){var _this2=this;if(Array.isArray(bufferedEvents)){bufferedEvents.forEach(function(bufferedEvent){return _this2.preloadBuffer.enqueue(clone
|
3691
|
+
*/},{key:"enqueuePreloadBufferEvents",value:function enqueuePreloadBufferEvents(bufferedEvents){var _this2=this;if(Array.isArray(bufferedEvents)){bufferedEvents.forEach(function(bufferedEvent){return _this2.preloadBuffer.enqueue(clone(bufferedEvent));});}}/**
|
3705
3692
|
* Process the buffer preloaded events by passing their arguments to the respective facade methods
|
3706
3693
|
*/},{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);}/**
|
3707
3694
|
* Load configuration
|
@@ -3780,7 +3767,7 @@
|
|
3780
3767
|
function RudderAnalytics(){_classCallCheck(this,RudderAnalytics);_defineProperty(this,"analyticsInstances",{});_defineProperty(this,"defaultAnalyticsKey",'');_defineProperty(this,"logger",defaultLogger);if(RudderAnalytics.globalSingleton){// START-NO-SONAR-SCAN
|
3781
3768
|
// eslint-disable-next-line no-constructor-return
|
3782
3769
|
return RudderAnalytics.globalSingleton;// END-NO-SONAR-SCAN
|
3783
|
-
}this.setDefaultInstanceKey=this.setDefaultInstanceKey.bind(this);this.getAnalyticsInstance=this.getAnalyticsInstance.bind(this);this.load=this.load.bind(this);this.ready=this.ready.bind(this);this.triggerBufferedLoadEvent=this.triggerBufferedLoadEvent.bind(this);this.page=this.page.bind(this);this.track=this.track.bind(this);this.identify=this.identify.bind(this);this.alias=this.alias.bind(this);this.group=this.group.bind(this);this.reset=this.reset.bind(this);this.getAnonymousId=this.getAnonymousId.bind(this);this.setAnonymousId=this.setAnonymousId.bind(this);this.getUserId=this.getUserId.bind(this);this.getUserTraits=this.getUserTraits.bind(this);this.getGroupId=this.getGroupId.bind(this);this.getGroupTraits=this.getGroupTraits.bind(this);this.startSession=this.startSession.bind(this);this.endSession=this.endSession.bind(this);this.getSessionId=this.getSessionId.bind(this);this.setAuthToken=this.setAuthToken.bind(this);this.consent=this.consent.bind(this);RudderAnalytics.globalSingleton=this;// start loading if a load event was buffered or wait for explicit load call
|
3770
|
+
}defaultErrorHandler.attachErrorListeners();this.setDefaultInstanceKey=this.setDefaultInstanceKey.bind(this);this.getAnalyticsInstance=this.getAnalyticsInstance.bind(this);this.load=this.load.bind(this);this.ready=this.ready.bind(this);this.triggerBufferedLoadEvent=this.triggerBufferedLoadEvent.bind(this);this.page=this.page.bind(this);this.track=this.track.bind(this);this.identify=this.identify.bind(this);this.alias=this.alias.bind(this);this.group=this.group.bind(this);this.reset=this.reset.bind(this);this.getAnonymousId=this.getAnonymousId.bind(this);this.setAnonymousId=this.setAnonymousId.bind(this);this.getUserId=this.getUserId.bind(this);this.getUserTraits=this.getUserTraits.bind(this);this.getGroupId=this.getGroupId.bind(this);this.getGroupTraits=this.getGroupTraits.bind(this);this.startSession=this.startSession.bind(this);this.endSession=this.endSession.bind(this);this.getSessionId=this.getSessionId.bind(this);this.setAuthToken=this.setAuthToken.bind(this);this.consent=this.consent.bind(this);RudderAnalytics.globalSingleton=this;// start loading if a load event was buffered or wait for explicit load call
|
3784
3771
|
this.triggerBufferedLoadEvent();}/**
|
3785
3772
|
* Set instance to use if no specific writeKey is provided in methods
|
3786
3773
|
* automatically for the first created instance
|
@@ -3797,7 +3784,7 @@
|
|
3797
3784
|
// BTW, load method is also removed from the array
|
3798
3785
|
// So, the Analytics object can directly consume the remaining events
|
3799
3786
|
var loadEvent=getPreloadedLoadEvent(preloadedEventsArray);// Set the final preloaded events array in global object
|
3800
|
-
setExposedGlobal(GLOBAL_PRELOAD_BUFFER,clone
|
3787
|
+
setExposedGlobal(GLOBAL_PRELOAD_BUFFER,clone(preloadedEventsArray));// Process load method if present in the buffered requests
|
3801
3788
|
if(loadEvent.length>0){// Remove the event name from the Buffered Event array and keep only arguments
|
3802
3789
|
loadEvent.shift();// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
3803
3790
|
// @ts-ignore
|