rudder-sdk-js 1.0.20 → 1.2.4
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/README.md +103 -157
- package/index.d.ts +2 -1
- package/index.js +2372 -483
- package/package.json +1 -1
package/index.js
CHANGED
@@ -2678,6 +2678,1853 @@
|
|
2678
2678
|
module.exports = merge;
|
2679
2679
|
});
|
2680
2680
|
|
2681
|
+
var lodash_clonedeep = createCommonjsModule(function (module, exports) {
|
2682
|
+
/**
|
2683
|
+
* lodash (Custom Build) <https://lodash.com/>
|
2684
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
2685
|
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
2686
|
+
* Released under MIT license <https://lodash.com/license>
|
2687
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
2688
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
2689
|
+
*/
|
2690
|
+
|
2691
|
+
/** Used as the size to enable large array optimizations. */
|
2692
|
+
var LARGE_ARRAY_SIZE = 200;
|
2693
|
+
/** Used to stand-in for `undefined` hash values. */
|
2694
|
+
|
2695
|
+
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
2696
|
+
/** Used as references for various `Number` constants. */
|
2697
|
+
|
2698
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
2699
|
+
/** `Object#toString` result references. */
|
2700
|
+
|
2701
|
+
var argsTag = '[object Arguments]',
|
2702
|
+
arrayTag = '[object Array]',
|
2703
|
+
boolTag = '[object Boolean]',
|
2704
|
+
dateTag = '[object Date]',
|
2705
|
+
errorTag = '[object Error]',
|
2706
|
+
funcTag = '[object Function]',
|
2707
|
+
genTag = '[object GeneratorFunction]',
|
2708
|
+
mapTag = '[object Map]',
|
2709
|
+
numberTag = '[object Number]',
|
2710
|
+
objectTag = '[object Object]',
|
2711
|
+
promiseTag = '[object Promise]',
|
2712
|
+
regexpTag = '[object RegExp]',
|
2713
|
+
setTag = '[object Set]',
|
2714
|
+
stringTag = '[object String]',
|
2715
|
+
symbolTag = '[object Symbol]',
|
2716
|
+
weakMapTag = '[object WeakMap]';
|
2717
|
+
var arrayBufferTag = '[object ArrayBuffer]',
|
2718
|
+
dataViewTag = '[object DataView]',
|
2719
|
+
float32Tag = '[object Float32Array]',
|
2720
|
+
float64Tag = '[object Float64Array]',
|
2721
|
+
int8Tag = '[object Int8Array]',
|
2722
|
+
int16Tag = '[object Int16Array]',
|
2723
|
+
int32Tag = '[object Int32Array]',
|
2724
|
+
uint8Tag = '[object Uint8Array]',
|
2725
|
+
uint8ClampedTag = '[object Uint8ClampedArray]',
|
2726
|
+
uint16Tag = '[object Uint16Array]',
|
2727
|
+
uint32Tag = '[object Uint32Array]';
|
2728
|
+
/**
|
2729
|
+
* Used to match `RegExp`
|
2730
|
+
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
2731
|
+
*/
|
2732
|
+
|
2733
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
2734
|
+
/** Used to match `RegExp` flags from their coerced string values. */
|
2735
|
+
|
2736
|
+
var reFlags = /\w*$/;
|
2737
|
+
/** Used to detect host constructors (Safari). */
|
2738
|
+
|
2739
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
2740
|
+
/** Used to detect unsigned integer values. */
|
2741
|
+
|
2742
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
2743
|
+
/** Used to identify `toStringTag` values supported by `_.clone`. */
|
2744
|
+
|
2745
|
+
var cloneableTags = {};
|
2746
|
+
cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
2747
|
+
cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
|
2748
|
+
/** Detect free variable `global` from Node.js. */
|
2749
|
+
|
2750
|
+
var freeGlobal = _typeof(commonjsGlobal) == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
2751
|
+
/** Detect free variable `self`. */
|
2752
|
+
|
2753
|
+
var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof(self)) == 'object' && self && self.Object === Object && self;
|
2754
|
+
/** Used as a reference to the global object. */
|
2755
|
+
|
2756
|
+
var root = freeGlobal || freeSelf || Function('return this')();
|
2757
|
+
/** Detect free variable `exports`. */
|
2758
|
+
|
2759
|
+
var freeExports = exports && !exports.nodeType && exports;
|
2760
|
+
/** Detect free variable `module`. */
|
2761
|
+
|
2762
|
+
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
2763
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
2764
|
+
|
2765
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
2766
|
+
/**
|
2767
|
+
* Adds the key-value `pair` to `map`.
|
2768
|
+
*
|
2769
|
+
* @private
|
2770
|
+
* @param {Object} map The map to modify.
|
2771
|
+
* @param {Array} pair The key-value pair to add.
|
2772
|
+
* @returns {Object} Returns `map`.
|
2773
|
+
*/
|
2774
|
+
|
2775
|
+
function addMapEntry(map, pair) {
|
2776
|
+
// Don't return `map.set` because it's not chainable in IE 11.
|
2777
|
+
map.set(pair[0], pair[1]);
|
2778
|
+
return map;
|
2779
|
+
}
|
2780
|
+
/**
|
2781
|
+
* Adds `value` to `set`.
|
2782
|
+
*
|
2783
|
+
* @private
|
2784
|
+
* @param {Object} set The set to modify.
|
2785
|
+
* @param {*} value The value to add.
|
2786
|
+
* @returns {Object} Returns `set`.
|
2787
|
+
*/
|
2788
|
+
|
2789
|
+
|
2790
|
+
function addSetEntry(set, value) {
|
2791
|
+
// Don't return `set.add` because it's not chainable in IE 11.
|
2792
|
+
set.add(value);
|
2793
|
+
return set;
|
2794
|
+
}
|
2795
|
+
/**
|
2796
|
+
* A specialized version of `_.forEach` for arrays without support for
|
2797
|
+
* iteratee shorthands.
|
2798
|
+
*
|
2799
|
+
* @private
|
2800
|
+
* @param {Array} [array] The array to iterate over.
|
2801
|
+
* @param {Function} iteratee The function invoked per iteration.
|
2802
|
+
* @returns {Array} Returns `array`.
|
2803
|
+
*/
|
2804
|
+
|
2805
|
+
|
2806
|
+
function arrayEach(array, iteratee) {
|
2807
|
+
var index = -1,
|
2808
|
+
length = array ? array.length : 0;
|
2809
|
+
|
2810
|
+
while (++index < length) {
|
2811
|
+
if (iteratee(array[index], index, array) === false) {
|
2812
|
+
break;
|
2813
|
+
}
|
2814
|
+
}
|
2815
|
+
|
2816
|
+
return array;
|
2817
|
+
}
|
2818
|
+
/**
|
2819
|
+
* Appends the elements of `values` to `array`.
|
2820
|
+
*
|
2821
|
+
* @private
|
2822
|
+
* @param {Array} array The array to modify.
|
2823
|
+
* @param {Array} values The values to append.
|
2824
|
+
* @returns {Array} Returns `array`.
|
2825
|
+
*/
|
2826
|
+
|
2827
|
+
|
2828
|
+
function arrayPush(array, values) {
|
2829
|
+
var index = -1,
|
2830
|
+
length = values.length,
|
2831
|
+
offset = array.length;
|
2832
|
+
|
2833
|
+
while (++index < length) {
|
2834
|
+
array[offset + index] = values[index];
|
2835
|
+
}
|
2836
|
+
|
2837
|
+
return array;
|
2838
|
+
}
|
2839
|
+
/**
|
2840
|
+
* A specialized version of `_.reduce` for arrays without support for
|
2841
|
+
* iteratee shorthands.
|
2842
|
+
*
|
2843
|
+
* @private
|
2844
|
+
* @param {Array} [array] The array to iterate over.
|
2845
|
+
* @param {Function} iteratee The function invoked per iteration.
|
2846
|
+
* @param {*} [accumulator] The initial value.
|
2847
|
+
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
2848
|
+
* the initial value.
|
2849
|
+
* @returns {*} Returns the accumulated value.
|
2850
|
+
*/
|
2851
|
+
|
2852
|
+
|
2853
|
+
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
2854
|
+
var index = -1,
|
2855
|
+
length = array ? array.length : 0;
|
2856
|
+
|
2857
|
+
if (initAccum && length) {
|
2858
|
+
accumulator = array[++index];
|
2859
|
+
}
|
2860
|
+
|
2861
|
+
while (++index < length) {
|
2862
|
+
accumulator = iteratee(accumulator, array[index], index, array);
|
2863
|
+
}
|
2864
|
+
|
2865
|
+
return accumulator;
|
2866
|
+
}
|
2867
|
+
/**
|
2868
|
+
* The base implementation of `_.times` without support for iteratee shorthands
|
2869
|
+
* or max array length checks.
|
2870
|
+
*
|
2871
|
+
* @private
|
2872
|
+
* @param {number} n The number of times to invoke `iteratee`.
|
2873
|
+
* @param {Function} iteratee The function invoked per iteration.
|
2874
|
+
* @returns {Array} Returns the array of results.
|
2875
|
+
*/
|
2876
|
+
|
2877
|
+
|
2878
|
+
function baseTimes(n, iteratee) {
|
2879
|
+
var index = -1,
|
2880
|
+
result = Array(n);
|
2881
|
+
|
2882
|
+
while (++index < n) {
|
2883
|
+
result[index] = iteratee(index);
|
2884
|
+
}
|
2885
|
+
|
2886
|
+
return result;
|
2887
|
+
}
|
2888
|
+
/**
|
2889
|
+
* Gets the value at `key` of `object`.
|
2890
|
+
*
|
2891
|
+
* @private
|
2892
|
+
* @param {Object} [object] The object to query.
|
2893
|
+
* @param {string} key The key of the property to get.
|
2894
|
+
* @returns {*} Returns the property value.
|
2895
|
+
*/
|
2896
|
+
|
2897
|
+
|
2898
|
+
function getValue(object, key) {
|
2899
|
+
return object == null ? undefined : object[key];
|
2900
|
+
}
|
2901
|
+
/**
|
2902
|
+
* Checks if `value` is a host object in IE < 9.
|
2903
|
+
*
|
2904
|
+
* @private
|
2905
|
+
* @param {*} value The value to check.
|
2906
|
+
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
2907
|
+
*/
|
2908
|
+
|
2909
|
+
|
2910
|
+
function isHostObject(value) {
|
2911
|
+
// Many host objects are `Object` objects that can coerce to strings
|
2912
|
+
// despite having improperly defined `toString` methods.
|
2913
|
+
var result = false;
|
2914
|
+
|
2915
|
+
if (value != null && typeof value.toString != 'function') {
|
2916
|
+
try {
|
2917
|
+
result = !!(value + '');
|
2918
|
+
} catch (e) {}
|
2919
|
+
}
|
2920
|
+
|
2921
|
+
return result;
|
2922
|
+
}
|
2923
|
+
/**
|
2924
|
+
* Converts `map` to its key-value pairs.
|
2925
|
+
*
|
2926
|
+
* @private
|
2927
|
+
* @param {Object} map The map to convert.
|
2928
|
+
* @returns {Array} Returns the key-value pairs.
|
2929
|
+
*/
|
2930
|
+
|
2931
|
+
|
2932
|
+
function mapToArray(map) {
|
2933
|
+
var index = -1,
|
2934
|
+
result = Array(map.size);
|
2935
|
+
map.forEach(function (value, key) {
|
2936
|
+
result[++index] = [key, value];
|
2937
|
+
});
|
2938
|
+
return result;
|
2939
|
+
}
|
2940
|
+
/**
|
2941
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
2942
|
+
*
|
2943
|
+
* @private
|
2944
|
+
* @param {Function} func The function to wrap.
|
2945
|
+
* @param {Function} transform The argument transform.
|
2946
|
+
* @returns {Function} Returns the new function.
|
2947
|
+
*/
|
2948
|
+
|
2949
|
+
|
2950
|
+
function overArg(func, transform) {
|
2951
|
+
return function (arg) {
|
2952
|
+
return func(transform(arg));
|
2953
|
+
};
|
2954
|
+
}
|
2955
|
+
/**
|
2956
|
+
* Converts `set` to an array of its values.
|
2957
|
+
*
|
2958
|
+
* @private
|
2959
|
+
* @param {Object} set The set to convert.
|
2960
|
+
* @returns {Array} Returns the values.
|
2961
|
+
*/
|
2962
|
+
|
2963
|
+
|
2964
|
+
function setToArray(set) {
|
2965
|
+
var index = -1,
|
2966
|
+
result = Array(set.size);
|
2967
|
+
set.forEach(function (value) {
|
2968
|
+
result[++index] = value;
|
2969
|
+
});
|
2970
|
+
return result;
|
2971
|
+
}
|
2972
|
+
/** Used for built-in method references. */
|
2973
|
+
|
2974
|
+
|
2975
|
+
var arrayProto = Array.prototype,
|
2976
|
+
funcProto = Function.prototype,
|
2977
|
+
objectProto = Object.prototype;
|
2978
|
+
/** Used to detect overreaching core-js shims. */
|
2979
|
+
|
2980
|
+
var coreJsData = root['__core-js_shared__'];
|
2981
|
+
/** Used to detect methods masquerading as native. */
|
2982
|
+
|
2983
|
+
var maskSrcKey = function () {
|
2984
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
2985
|
+
return uid ? 'Symbol(src)_1.' + uid : '';
|
2986
|
+
}();
|
2987
|
+
/** Used to resolve the decompiled source of functions. */
|
2988
|
+
|
2989
|
+
|
2990
|
+
var funcToString = funcProto.toString;
|
2991
|
+
/** Used to check objects for own properties. */
|
2992
|
+
|
2993
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
2994
|
+
/**
|
2995
|
+
* Used to resolve the
|
2996
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
2997
|
+
* of values.
|
2998
|
+
*/
|
2999
|
+
|
3000
|
+
var objectToString = objectProto.toString;
|
3001
|
+
/** Used to detect if a method is native. */
|
3002
|
+
|
3003
|
+
var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
|
3004
|
+
/** Built-in value references. */
|
3005
|
+
|
3006
|
+
var Buffer = moduleExports ? root.Buffer : undefined,
|
3007
|
+
_Symbol = root.Symbol,
|
3008
|
+
Uint8Array = root.Uint8Array,
|
3009
|
+
getPrototype = overArg(Object.getPrototypeOf, Object),
|
3010
|
+
objectCreate = Object.create,
|
3011
|
+
propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
3012
|
+
splice = arrayProto.splice;
|
3013
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
3014
|
+
|
3015
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols,
|
3016
|
+
nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
|
3017
|
+
nativeKeys = overArg(Object.keys, Object);
|
3018
|
+
/* Built-in method references that are verified to be native. */
|
3019
|
+
|
3020
|
+
var DataView = getNative(root, 'DataView'),
|
3021
|
+
Map = getNative(root, 'Map'),
|
3022
|
+
Promise = getNative(root, 'Promise'),
|
3023
|
+
Set = getNative(root, 'Set'),
|
3024
|
+
WeakMap = getNative(root, 'WeakMap'),
|
3025
|
+
nativeCreate = getNative(Object, 'create');
|
3026
|
+
/** Used to detect maps, sets, and weakmaps. */
|
3027
|
+
|
3028
|
+
var dataViewCtorString = toSource(DataView),
|
3029
|
+
mapCtorString = toSource(Map),
|
3030
|
+
promiseCtorString = toSource(Promise),
|
3031
|
+
setCtorString = toSource(Set),
|
3032
|
+
weakMapCtorString = toSource(WeakMap);
|
3033
|
+
/** Used to convert symbols to primitives and strings. */
|
3034
|
+
|
3035
|
+
var symbolProto = _Symbol ? _Symbol.prototype : undefined,
|
3036
|
+
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
3037
|
+
/**
|
3038
|
+
* Creates a hash object.
|
3039
|
+
*
|
3040
|
+
* @private
|
3041
|
+
* @constructor
|
3042
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
3043
|
+
*/
|
3044
|
+
|
3045
|
+
function Hash(entries) {
|
3046
|
+
var index = -1,
|
3047
|
+
length = entries ? entries.length : 0;
|
3048
|
+
this.clear();
|
3049
|
+
|
3050
|
+
while (++index < length) {
|
3051
|
+
var entry = entries[index];
|
3052
|
+
this.set(entry[0], entry[1]);
|
3053
|
+
}
|
3054
|
+
}
|
3055
|
+
/**
|
3056
|
+
* Removes all key-value entries from the hash.
|
3057
|
+
*
|
3058
|
+
* @private
|
3059
|
+
* @name clear
|
3060
|
+
* @memberOf Hash
|
3061
|
+
*/
|
3062
|
+
|
3063
|
+
|
3064
|
+
function hashClear() {
|
3065
|
+
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
3066
|
+
}
|
3067
|
+
/**
|
3068
|
+
* Removes `key` and its value from the hash.
|
3069
|
+
*
|
3070
|
+
* @private
|
3071
|
+
* @name delete
|
3072
|
+
* @memberOf Hash
|
3073
|
+
* @param {Object} hash The hash to modify.
|
3074
|
+
* @param {string} key The key of the value to remove.
|
3075
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
3076
|
+
*/
|
3077
|
+
|
3078
|
+
|
3079
|
+
function hashDelete(key) {
|
3080
|
+
return this.has(key) && delete this.__data__[key];
|
3081
|
+
}
|
3082
|
+
/**
|
3083
|
+
* Gets the hash value for `key`.
|
3084
|
+
*
|
3085
|
+
* @private
|
3086
|
+
* @name get
|
3087
|
+
* @memberOf Hash
|
3088
|
+
* @param {string} key The key of the value to get.
|
3089
|
+
* @returns {*} Returns the entry value.
|
3090
|
+
*/
|
3091
|
+
|
3092
|
+
|
3093
|
+
function hashGet(key) {
|
3094
|
+
var data = this.__data__;
|
3095
|
+
|
3096
|
+
if (nativeCreate) {
|
3097
|
+
var result = data[key];
|
3098
|
+
return result === HASH_UNDEFINED ? undefined : result;
|
3099
|
+
}
|
3100
|
+
|
3101
|
+
return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
3102
|
+
}
|
3103
|
+
/**
|
3104
|
+
* Checks if a hash value for `key` exists.
|
3105
|
+
*
|
3106
|
+
* @private
|
3107
|
+
* @name has
|
3108
|
+
* @memberOf Hash
|
3109
|
+
* @param {string} key The key of the entry to check.
|
3110
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
3111
|
+
*/
|
3112
|
+
|
3113
|
+
|
3114
|
+
function hashHas(key) {
|
3115
|
+
var data = this.__data__;
|
3116
|
+
return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
|
3117
|
+
}
|
3118
|
+
/**
|
3119
|
+
* Sets the hash `key` to `value`.
|
3120
|
+
*
|
3121
|
+
* @private
|
3122
|
+
* @name set
|
3123
|
+
* @memberOf Hash
|
3124
|
+
* @param {string} key The key of the value to set.
|
3125
|
+
* @param {*} value The value to set.
|
3126
|
+
* @returns {Object} Returns the hash instance.
|
3127
|
+
*/
|
3128
|
+
|
3129
|
+
|
3130
|
+
function hashSet(key, value) {
|
3131
|
+
var data = this.__data__;
|
3132
|
+
data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
|
3133
|
+
return this;
|
3134
|
+
} // Add methods to `Hash`.
|
3135
|
+
|
3136
|
+
|
3137
|
+
Hash.prototype.clear = hashClear;
|
3138
|
+
Hash.prototype['delete'] = hashDelete;
|
3139
|
+
Hash.prototype.get = hashGet;
|
3140
|
+
Hash.prototype.has = hashHas;
|
3141
|
+
Hash.prototype.set = hashSet;
|
3142
|
+
/**
|
3143
|
+
* Creates an list cache object.
|
3144
|
+
*
|
3145
|
+
* @private
|
3146
|
+
* @constructor
|
3147
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
3148
|
+
*/
|
3149
|
+
|
3150
|
+
function ListCache(entries) {
|
3151
|
+
var index = -1,
|
3152
|
+
length = entries ? entries.length : 0;
|
3153
|
+
this.clear();
|
3154
|
+
|
3155
|
+
while (++index < length) {
|
3156
|
+
var entry = entries[index];
|
3157
|
+
this.set(entry[0], entry[1]);
|
3158
|
+
}
|
3159
|
+
}
|
3160
|
+
/**
|
3161
|
+
* Removes all key-value entries from the list cache.
|
3162
|
+
*
|
3163
|
+
* @private
|
3164
|
+
* @name clear
|
3165
|
+
* @memberOf ListCache
|
3166
|
+
*/
|
3167
|
+
|
3168
|
+
|
3169
|
+
function listCacheClear() {
|
3170
|
+
this.__data__ = [];
|
3171
|
+
}
|
3172
|
+
/**
|
3173
|
+
* Removes `key` and its value from the list cache.
|
3174
|
+
*
|
3175
|
+
* @private
|
3176
|
+
* @name delete
|
3177
|
+
* @memberOf ListCache
|
3178
|
+
* @param {string} key The key of the value to remove.
|
3179
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
3180
|
+
*/
|
3181
|
+
|
3182
|
+
|
3183
|
+
function listCacheDelete(key) {
|
3184
|
+
var data = this.__data__,
|
3185
|
+
index = assocIndexOf(data, key);
|
3186
|
+
|
3187
|
+
if (index < 0) {
|
3188
|
+
return false;
|
3189
|
+
}
|
3190
|
+
|
3191
|
+
var lastIndex = data.length - 1;
|
3192
|
+
|
3193
|
+
if (index == lastIndex) {
|
3194
|
+
data.pop();
|
3195
|
+
} else {
|
3196
|
+
splice.call(data, index, 1);
|
3197
|
+
}
|
3198
|
+
|
3199
|
+
return true;
|
3200
|
+
}
|
3201
|
+
/**
|
3202
|
+
* Gets the list cache value for `key`.
|
3203
|
+
*
|
3204
|
+
* @private
|
3205
|
+
* @name get
|
3206
|
+
* @memberOf ListCache
|
3207
|
+
* @param {string} key The key of the value to get.
|
3208
|
+
* @returns {*} Returns the entry value.
|
3209
|
+
*/
|
3210
|
+
|
3211
|
+
|
3212
|
+
function listCacheGet(key) {
|
3213
|
+
var data = this.__data__,
|
3214
|
+
index = assocIndexOf(data, key);
|
3215
|
+
return index < 0 ? undefined : data[index][1];
|
3216
|
+
}
|
3217
|
+
/**
|
3218
|
+
* Checks if a list cache value for `key` exists.
|
3219
|
+
*
|
3220
|
+
* @private
|
3221
|
+
* @name has
|
3222
|
+
* @memberOf ListCache
|
3223
|
+
* @param {string} key The key of the entry to check.
|
3224
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
3225
|
+
*/
|
3226
|
+
|
3227
|
+
|
3228
|
+
function listCacheHas(key) {
|
3229
|
+
return assocIndexOf(this.__data__, key) > -1;
|
3230
|
+
}
|
3231
|
+
/**
|
3232
|
+
* Sets the list cache `key` to `value`.
|
3233
|
+
*
|
3234
|
+
* @private
|
3235
|
+
* @name set
|
3236
|
+
* @memberOf ListCache
|
3237
|
+
* @param {string} key The key of the value to set.
|
3238
|
+
* @param {*} value The value to set.
|
3239
|
+
* @returns {Object} Returns the list cache instance.
|
3240
|
+
*/
|
3241
|
+
|
3242
|
+
|
3243
|
+
function listCacheSet(key, value) {
|
3244
|
+
var data = this.__data__,
|
3245
|
+
index = assocIndexOf(data, key);
|
3246
|
+
|
3247
|
+
if (index < 0) {
|
3248
|
+
data.push([key, value]);
|
3249
|
+
} else {
|
3250
|
+
data[index][1] = value;
|
3251
|
+
}
|
3252
|
+
|
3253
|
+
return this;
|
3254
|
+
} // Add methods to `ListCache`.
|
3255
|
+
|
3256
|
+
|
3257
|
+
ListCache.prototype.clear = listCacheClear;
|
3258
|
+
ListCache.prototype['delete'] = listCacheDelete;
|
3259
|
+
ListCache.prototype.get = listCacheGet;
|
3260
|
+
ListCache.prototype.has = listCacheHas;
|
3261
|
+
ListCache.prototype.set = listCacheSet;
|
3262
|
+
/**
|
3263
|
+
* Creates a map cache object to store key-value pairs.
|
3264
|
+
*
|
3265
|
+
* @private
|
3266
|
+
* @constructor
|
3267
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
3268
|
+
*/
|
3269
|
+
|
3270
|
+
function MapCache(entries) {
|
3271
|
+
var index = -1,
|
3272
|
+
length = entries ? entries.length : 0;
|
3273
|
+
this.clear();
|
3274
|
+
|
3275
|
+
while (++index < length) {
|
3276
|
+
var entry = entries[index];
|
3277
|
+
this.set(entry[0], entry[1]);
|
3278
|
+
}
|
3279
|
+
}
|
3280
|
+
/**
|
3281
|
+
* Removes all key-value entries from the map.
|
3282
|
+
*
|
3283
|
+
* @private
|
3284
|
+
* @name clear
|
3285
|
+
* @memberOf MapCache
|
3286
|
+
*/
|
3287
|
+
|
3288
|
+
|
3289
|
+
function mapCacheClear() {
|
3290
|
+
this.__data__ = {
|
3291
|
+
'hash': new Hash(),
|
3292
|
+
'map': new (Map || ListCache)(),
|
3293
|
+
'string': new Hash()
|
3294
|
+
};
|
3295
|
+
}
|
3296
|
+
/**
|
3297
|
+
* Removes `key` and its value from the map.
|
3298
|
+
*
|
3299
|
+
* @private
|
3300
|
+
* @name delete
|
3301
|
+
* @memberOf MapCache
|
3302
|
+
* @param {string} key The key of the value to remove.
|
3303
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
3304
|
+
*/
|
3305
|
+
|
3306
|
+
|
3307
|
+
function mapCacheDelete(key) {
|
3308
|
+
return getMapData(this, key)['delete'](key);
|
3309
|
+
}
|
3310
|
+
/**
|
3311
|
+
* Gets the map value for `key`.
|
3312
|
+
*
|
3313
|
+
* @private
|
3314
|
+
* @name get
|
3315
|
+
* @memberOf MapCache
|
3316
|
+
* @param {string} key The key of the value to get.
|
3317
|
+
* @returns {*} Returns the entry value.
|
3318
|
+
*/
|
3319
|
+
|
3320
|
+
|
3321
|
+
function mapCacheGet(key) {
|
3322
|
+
return getMapData(this, key).get(key);
|
3323
|
+
}
|
3324
|
+
/**
|
3325
|
+
* Checks if a map value for `key` exists.
|
3326
|
+
*
|
3327
|
+
* @private
|
3328
|
+
* @name has
|
3329
|
+
* @memberOf MapCache
|
3330
|
+
* @param {string} key The key of the entry to check.
|
3331
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
3332
|
+
*/
|
3333
|
+
|
3334
|
+
|
3335
|
+
function mapCacheHas(key) {
|
3336
|
+
return getMapData(this, key).has(key);
|
3337
|
+
}
|
3338
|
+
/**
|
3339
|
+
* Sets the map `key` to `value`.
|
3340
|
+
*
|
3341
|
+
* @private
|
3342
|
+
* @name set
|
3343
|
+
* @memberOf MapCache
|
3344
|
+
* @param {string} key The key of the value to set.
|
3345
|
+
* @param {*} value The value to set.
|
3346
|
+
* @returns {Object} Returns the map cache instance.
|
3347
|
+
*/
|
3348
|
+
|
3349
|
+
|
3350
|
+
function mapCacheSet(key, value) {
|
3351
|
+
getMapData(this, key).set(key, value);
|
3352
|
+
return this;
|
3353
|
+
} // Add methods to `MapCache`.
|
3354
|
+
|
3355
|
+
|
3356
|
+
MapCache.prototype.clear = mapCacheClear;
|
3357
|
+
MapCache.prototype['delete'] = mapCacheDelete;
|
3358
|
+
MapCache.prototype.get = mapCacheGet;
|
3359
|
+
MapCache.prototype.has = mapCacheHas;
|
3360
|
+
MapCache.prototype.set = mapCacheSet;
|
3361
|
+
/**
|
3362
|
+
* Creates a stack cache object to store key-value pairs.
|
3363
|
+
*
|
3364
|
+
* @private
|
3365
|
+
* @constructor
|
3366
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
3367
|
+
*/
|
3368
|
+
|
3369
|
+
function Stack(entries) {
|
3370
|
+
this.__data__ = new ListCache(entries);
|
3371
|
+
}
|
3372
|
+
/**
|
3373
|
+
* Removes all key-value entries from the stack.
|
3374
|
+
*
|
3375
|
+
* @private
|
3376
|
+
* @name clear
|
3377
|
+
* @memberOf Stack
|
3378
|
+
*/
|
3379
|
+
|
3380
|
+
|
3381
|
+
function stackClear() {
|
3382
|
+
this.__data__ = new ListCache();
|
3383
|
+
}
|
3384
|
+
/**
|
3385
|
+
* Removes `key` and its value from the stack.
|
3386
|
+
*
|
3387
|
+
* @private
|
3388
|
+
* @name delete
|
3389
|
+
* @memberOf Stack
|
3390
|
+
* @param {string} key The key of the value to remove.
|
3391
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
3392
|
+
*/
|
3393
|
+
|
3394
|
+
|
3395
|
+
function stackDelete(key) {
|
3396
|
+
return this.__data__['delete'](key);
|
3397
|
+
}
|
3398
|
+
/**
|
3399
|
+
* Gets the stack value for `key`.
|
3400
|
+
*
|
3401
|
+
* @private
|
3402
|
+
* @name get
|
3403
|
+
* @memberOf Stack
|
3404
|
+
* @param {string} key The key of the value to get.
|
3405
|
+
* @returns {*} Returns the entry value.
|
3406
|
+
*/
|
3407
|
+
|
3408
|
+
|
3409
|
+
function stackGet(key) {
|
3410
|
+
return this.__data__.get(key);
|
3411
|
+
}
|
3412
|
+
/**
|
3413
|
+
* Checks if a stack value for `key` exists.
|
3414
|
+
*
|
3415
|
+
* @private
|
3416
|
+
* @name has
|
3417
|
+
* @memberOf Stack
|
3418
|
+
* @param {string} key The key of the entry to check.
|
3419
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
3420
|
+
*/
|
3421
|
+
|
3422
|
+
|
3423
|
+
function stackHas(key) {
|
3424
|
+
return this.__data__.has(key);
|
3425
|
+
}
|
3426
|
+
/**
|
3427
|
+
* Sets the stack `key` to `value`.
|
3428
|
+
*
|
3429
|
+
* @private
|
3430
|
+
* @name set
|
3431
|
+
* @memberOf Stack
|
3432
|
+
* @param {string} key The key of the value to set.
|
3433
|
+
* @param {*} value The value to set.
|
3434
|
+
* @returns {Object} Returns the stack cache instance.
|
3435
|
+
*/
|
3436
|
+
|
3437
|
+
|
3438
|
+
function stackSet(key, value) {
|
3439
|
+
var cache = this.__data__;
|
3440
|
+
|
3441
|
+
if (cache instanceof ListCache) {
|
3442
|
+
var pairs = cache.__data__;
|
3443
|
+
|
3444
|
+
if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
3445
|
+
pairs.push([key, value]);
|
3446
|
+
return this;
|
3447
|
+
}
|
3448
|
+
|
3449
|
+
cache = this.__data__ = new MapCache(pairs);
|
3450
|
+
}
|
3451
|
+
|
3452
|
+
cache.set(key, value);
|
3453
|
+
return this;
|
3454
|
+
} // Add methods to `Stack`.
|
3455
|
+
|
3456
|
+
|
3457
|
+
Stack.prototype.clear = stackClear;
|
3458
|
+
Stack.prototype['delete'] = stackDelete;
|
3459
|
+
Stack.prototype.get = stackGet;
|
3460
|
+
Stack.prototype.has = stackHas;
|
3461
|
+
Stack.prototype.set = stackSet;
|
3462
|
+
/**
|
3463
|
+
* Creates an array of the enumerable property names of the array-like `value`.
|
3464
|
+
*
|
3465
|
+
* @private
|
3466
|
+
* @param {*} value The value to query.
|
3467
|
+
* @param {boolean} inherited Specify returning inherited property names.
|
3468
|
+
* @returns {Array} Returns the array of property names.
|
3469
|
+
*/
|
3470
|
+
|
3471
|
+
function arrayLikeKeys(value, inherited) {
|
3472
|
+
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
3473
|
+
// Safari 9 makes `arguments.length` enumerable in strict mode.
|
3474
|
+
var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : [];
|
3475
|
+
var length = result.length,
|
3476
|
+
skipIndexes = !!length;
|
3477
|
+
|
3478
|
+
for (var key in value) {
|
3479
|
+
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
|
3480
|
+
result.push(key);
|
3481
|
+
}
|
3482
|
+
}
|
3483
|
+
|
3484
|
+
return result;
|
3485
|
+
}
|
3486
|
+
/**
|
3487
|
+
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
3488
|
+
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
3489
|
+
* for equality comparisons.
|
3490
|
+
*
|
3491
|
+
* @private
|
3492
|
+
* @param {Object} object The object to modify.
|
3493
|
+
* @param {string} key The key of the property to assign.
|
3494
|
+
* @param {*} value The value to assign.
|
3495
|
+
*/
|
3496
|
+
|
3497
|
+
|
3498
|
+
function assignValue(object, key, value) {
|
3499
|
+
var objValue = object[key];
|
3500
|
+
|
3501
|
+
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {
|
3502
|
+
object[key] = value;
|
3503
|
+
}
|
3504
|
+
}
|
3505
|
+
/**
|
3506
|
+
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
3507
|
+
*
|
3508
|
+
* @private
|
3509
|
+
* @param {Array} array The array to inspect.
|
3510
|
+
* @param {*} key The key to search for.
|
3511
|
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
3512
|
+
*/
|
3513
|
+
|
3514
|
+
|
3515
|
+
function assocIndexOf(array, key) {
|
3516
|
+
var length = array.length;
|
3517
|
+
|
3518
|
+
while (length--) {
|
3519
|
+
if (eq(array[length][0], key)) {
|
3520
|
+
return length;
|
3521
|
+
}
|
3522
|
+
}
|
3523
|
+
|
3524
|
+
return -1;
|
3525
|
+
}
|
3526
|
+
/**
|
3527
|
+
* The base implementation of `_.assign` without support for multiple sources
|
3528
|
+
* or `customizer` functions.
|
3529
|
+
*
|
3530
|
+
* @private
|
3531
|
+
* @param {Object} object The destination object.
|
3532
|
+
* @param {Object} source The source object.
|
3533
|
+
* @returns {Object} Returns `object`.
|
3534
|
+
*/
|
3535
|
+
|
3536
|
+
|
3537
|
+
function baseAssign(object, source) {
|
3538
|
+
return object && copyObject(source, keys(source), object);
|
3539
|
+
}
|
3540
|
+
/**
|
3541
|
+
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
|
3542
|
+
* traversed objects.
|
3543
|
+
*
|
3544
|
+
* @private
|
3545
|
+
* @param {*} value The value to clone.
|
3546
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
3547
|
+
* @param {boolean} [isFull] Specify a clone including symbols.
|
3548
|
+
* @param {Function} [customizer] The function to customize cloning.
|
3549
|
+
* @param {string} [key] The key of `value`.
|
3550
|
+
* @param {Object} [object] The parent object of `value`.
|
3551
|
+
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
|
3552
|
+
* @returns {*} Returns the cloned value.
|
3553
|
+
*/
|
3554
|
+
|
3555
|
+
|
3556
|
+
function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
|
3557
|
+
var result;
|
3558
|
+
|
3559
|
+
if (customizer) {
|
3560
|
+
result = object ? customizer(value, key, object, stack) : customizer(value);
|
3561
|
+
}
|
3562
|
+
|
3563
|
+
if (result !== undefined) {
|
3564
|
+
return result;
|
3565
|
+
}
|
3566
|
+
|
3567
|
+
if (!isObject(value)) {
|
3568
|
+
return value;
|
3569
|
+
}
|
3570
|
+
|
3571
|
+
var isArr = isArray(value);
|
3572
|
+
|
3573
|
+
if (isArr) {
|
3574
|
+
result = initCloneArray(value);
|
3575
|
+
|
3576
|
+
if (!isDeep) {
|
3577
|
+
return copyArray(value, result);
|
3578
|
+
}
|
3579
|
+
} else {
|
3580
|
+
var tag = getTag(value),
|
3581
|
+
isFunc = tag == funcTag || tag == genTag;
|
3582
|
+
|
3583
|
+
if (isBuffer(value)) {
|
3584
|
+
return cloneBuffer(value, isDeep);
|
3585
|
+
}
|
3586
|
+
|
3587
|
+
if (tag == objectTag || tag == argsTag || isFunc && !object) {
|
3588
|
+
if (isHostObject(value)) {
|
3589
|
+
return object ? value : {};
|
3590
|
+
}
|
3591
|
+
|
3592
|
+
result = initCloneObject(isFunc ? {} : value);
|
3593
|
+
|
3594
|
+
if (!isDeep) {
|
3595
|
+
return copySymbols(value, baseAssign(result, value));
|
3596
|
+
}
|
3597
|
+
} else {
|
3598
|
+
if (!cloneableTags[tag]) {
|
3599
|
+
return object ? value : {};
|
3600
|
+
}
|
3601
|
+
|
3602
|
+
result = initCloneByTag(value, tag, baseClone, isDeep);
|
3603
|
+
}
|
3604
|
+
} // Check for circular references and return its corresponding clone.
|
3605
|
+
|
3606
|
+
|
3607
|
+
stack || (stack = new Stack());
|
3608
|
+
var stacked = stack.get(value);
|
3609
|
+
|
3610
|
+
if (stacked) {
|
3611
|
+
return stacked;
|
3612
|
+
}
|
3613
|
+
|
3614
|
+
stack.set(value, result);
|
3615
|
+
|
3616
|
+
if (!isArr) {
|
3617
|
+
var props = isFull ? getAllKeys(value) : keys(value);
|
3618
|
+
}
|
3619
|
+
|
3620
|
+
arrayEach(props || value, function (subValue, key) {
|
3621
|
+
if (props) {
|
3622
|
+
key = subValue;
|
3623
|
+
subValue = value[key];
|
3624
|
+
} // Recursively populate clone (susceptible to call stack limits).
|
3625
|
+
|
3626
|
+
|
3627
|
+
assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
|
3628
|
+
});
|
3629
|
+
return result;
|
3630
|
+
}
|
3631
|
+
/**
|
3632
|
+
* The base implementation of `_.create` without support for assigning
|
3633
|
+
* properties to the created object.
|
3634
|
+
*
|
3635
|
+
* @private
|
3636
|
+
* @param {Object} prototype The object to inherit from.
|
3637
|
+
* @returns {Object} Returns the new object.
|
3638
|
+
*/
|
3639
|
+
|
3640
|
+
|
3641
|
+
function baseCreate(proto) {
|
3642
|
+
return isObject(proto) ? objectCreate(proto) : {};
|
3643
|
+
}
|
3644
|
+
/**
|
3645
|
+
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
3646
|
+
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
|
3647
|
+
* symbols of `object`.
|
3648
|
+
*
|
3649
|
+
* @private
|
3650
|
+
* @param {Object} object The object to query.
|
3651
|
+
* @param {Function} keysFunc The function to get the keys of `object`.
|
3652
|
+
* @param {Function} symbolsFunc The function to get the symbols of `object`.
|
3653
|
+
* @returns {Array} Returns the array of property names and symbols.
|
3654
|
+
*/
|
3655
|
+
|
3656
|
+
|
3657
|
+
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
3658
|
+
var result = keysFunc(object);
|
3659
|
+
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
3660
|
+
}
|
3661
|
+
/**
|
3662
|
+
* The base implementation of `getTag`.
|
3663
|
+
*
|
3664
|
+
* @private
|
3665
|
+
* @param {*} value The value to query.
|
3666
|
+
* @returns {string} Returns the `toStringTag`.
|
3667
|
+
*/
|
3668
|
+
|
3669
|
+
|
3670
|
+
function baseGetTag(value) {
|
3671
|
+
return objectToString.call(value);
|
3672
|
+
}
|
3673
|
+
/**
|
3674
|
+
* The base implementation of `_.isNative` without bad shim checks.
|
3675
|
+
*
|
3676
|
+
* @private
|
3677
|
+
* @param {*} value The value to check.
|
3678
|
+
* @returns {boolean} Returns `true` if `value` is a native function,
|
3679
|
+
* else `false`.
|
3680
|
+
*/
|
3681
|
+
|
3682
|
+
|
3683
|
+
function baseIsNative(value) {
|
3684
|
+
if (!isObject(value) || isMasked(value)) {
|
3685
|
+
return false;
|
3686
|
+
}
|
3687
|
+
|
3688
|
+
var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
|
3689
|
+
return pattern.test(toSource(value));
|
3690
|
+
}
|
3691
|
+
/**
|
3692
|
+
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
3693
|
+
*
|
3694
|
+
* @private
|
3695
|
+
* @param {Object} object The object to query.
|
3696
|
+
* @returns {Array} Returns the array of property names.
|
3697
|
+
*/
|
3698
|
+
|
3699
|
+
|
3700
|
+
function baseKeys(object) {
|
3701
|
+
if (!isPrototype(object)) {
|
3702
|
+
return nativeKeys(object);
|
3703
|
+
}
|
3704
|
+
|
3705
|
+
var result = [];
|
3706
|
+
|
3707
|
+
for (var key in Object(object)) {
|
3708
|
+
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
3709
|
+
result.push(key);
|
3710
|
+
}
|
3711
|
+
}
|
3712
|
+
|
3713
|
+
return result;
|
3714
|
+
}
|
3715
|
+
/**
|
3716
|
+
* Creates a clone of `buffer`.
|
3717
|
+
*
|
3718
|
+
* @private
|
3719
|
+
* @param {Buffer} buffer The buffer to clone.
|
3720
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
3721
|
+
* @returns {Buffer} Returns the cloned buffer.
|
3722
|
+
*/
|
3723
|
+
|
3724
|
+
|
3725
|
+
function cloneBuffer(buffer, isDeep) {
|
3726
|
+
if (isDeep) {
|
3727
|
+
return buffer.slice();
|
3728
|
+
}
|
3729
|
+
|
3730
|
+
var result = new buffer.constructor(buffer.length);
|
3731
|
+
buffer.copy(result);
|
3732
|
+
return result;
|
3733
|
+
}
|
3734
|
+
/**
|
3735
|
+
* Creates a clone of `arrayBuffer`.
|
3736
|
+
*
|
3737
|
+
* @private
|
3738
|
+
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
|
3739
|
+
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
3740
|
+
*/
|
3741
|
+
|
3742
|
+
|
3743
|
+
function cloneArrayBuffer(arrayBuffer) {
|
3744
|
+
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
3745
|
+
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
|
3746
|
+
return result;
|
3747
|
+
}
|
3748
|
+
/**
|
3749
|
+
* Creates a clone of `dataView`.
|
3750
|
+
*
|
3751
|
+
* @private
|
3752
|
+
* @param {Object} dataView The data view to clone.
|
3753
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
3754
|
+
* @returns {Object} Returns the cloned data view.
|
3755
|
+
*/
|
3756
|
+
|
3757
|
+
|
3758
|
+
function cloneDataView(dataView, isDeep) {
|
3759
|
+
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
3760
|
+
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
3761
|
+
}
|
3762
|
+
/**
|
3763
|
+
* Creates a clone of `map`.
|
3764
|
+
*
|
3765
|
+
* @private
|
3766
|
+
* @param {Object} map The map to clone.
|
3767
|
+
* @param {Function} cloneFunc The function to clone values.
|
3768
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
3769
|
+
* @returns {Object} Returns the cloned map.
|
3770
|
+
*/
|
3771
|
+
|
3772
|
+
|
3773
|
+
function cloneMap(map, isDeep, cloneFunc) {
|
3774
|
+
var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
|
3775
|
+
return arrayReduce(array, addMapEntry, new map.constructor());
|
3776
|
+
}
|
3777
|
+
/**
|
3778
|
+
* Creates a clone of `regexp`.
|
3779
|
+
*
|
3780
|
+
* @private
|
3781
|
+
* @param {Object} regexp The regexp to clone.
|
3782
|
+
* @returns {Object} Returns the cloned regexp.
|
3783
|
+
*/
|
3784
|
+
|
3785
|
+
|
3786
|
+
function cloneRegExp(regexp) {
|
3787
|
+
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
3788
|
+
result.lastIndex = regexp.lastIndex;
|
3789
|
+
return result;
|
3790
|
+
}
|
3791
|
+
/**
|
3792
|
+
* Creates a clone of `set`.
|
3793
|
+
*
|
3794
|
+
* @private
|
3795
|
+
* @param {Object} set The set to clone.
|
3796
|
+
* @param {Function} cloneFunc The function to clone values.
|
3797
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
3798
|
+
* @returns {Object} Returns the cloned set.
|
3799
|
+
*/
|
3800
|
+
|
3801
|
+
|
3802
|
+
function cloneSet(set, isDeep, cloneFunc) {
|
3803
|
+
var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
|
3804
|
+
return arrayReduce(array, addSetEntry, new set.constructor());
|
3805
|
+
}
|
3806
|
+
/**
|
3807
|
+
* Creates a clone of the `symbol` object.
|
3808
|
+
*
|
3809
|
+
* @private
|
3810
|
+
* @param {Object} symbol The symbol object to clone.
|
3811
|
+
* @returns {Object} Returns the cloned symbol object.
|
3812
|
+
*/
|
3813
|
+
|
3814
|
+
|
3815
|
+
function cloneSymbol(symbol) {
|
3816
|
+
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
|
3817
|
+
}
|
3818
|
+
/**
|
3819
|
+
* Creates a clone of `typedArray`.
|
3820
|
+
*
|
3821
|
+
* @private
|
3822
|
+
* @param {Object} typedArray The typed array to clone.
|
3823
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
3824
|
+
* @returns {Object} Returns the cloned typed array.
|
3825
|
+
*/
|
3826
|
+
|
3827
|
+
|
3828
|
+
function cloneTypedArray(typedArray, isDeep) {
|
3829
|
+
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
3830
|
+
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
3831
|
+
}
|
3832
|
+
/**
|
3833
|
+
* Copies the values of `source` to `array`.
|
3834
|
+
*
|
3835
|
+
* @private
|
3836
|
+
* @param {Array} source The array to copy values from.
|
3837
|
+
* @param {Array} [array=[]] The array to copy values to.
|
3838
|
+
* @returns {Array} Returns `array`.
|
3839
|
+
*/
|
3840
|
+
|
3841
|
+
|
3842
|
+
function copyArray(source, array) {
|
3843
|
+
var index = -1,
|
3844
|
+
length = source.length;
|
3845
|
+
array || (array = Array(length));
|
3846
|
+
|
3847
|
+
while (++index < length) {
|
3848
|
+
array[index] = source[index];
|
3849
|
+
}
|
3850
|
+
|
3851
|
+
return array;
|
3852
|
+
}
|
3853
|
+
/**
|
3854
|
+
* Copies properties of `source` to `object`.
|
3855
|
+
*
|
3856
|
+
* @private
|
3857
|
+
* @param {Object} source The object to copy properties from.
|
3858
|
+
* @param {Array} props The property identifiers to copy.
|
3859
|
+
* @param {Object} [object={}] The object to copy properties to.
|
3860
|
+
* @param {Function} [customizer] The function to customize copied values.
|
3861
|
+
* @returns {Object} Returns `object`.
|
3862
|
+
*/
|
3863
|
+
|
3864
|
+
|
3865
|
+
function copyObject(source, props, object, customizer) {
|
3866
|
+
object || (object = {});
|
3867
|
+
var index = -1,
|
3868
|
+
length = props.length;
|
3869
|
+
|
3870
|
+
while (++index < length) {
|
3871
|
+
var key = props[index];
|
3872
|
+
var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
|
3873
|
+
assignValue(object, key, newValue === undefined ? source[key] : newValue);
|
3874
|
+
}
|
3875
|
+
|
3876
|
+
return object;
|
3877
|
+
}
|
3878
|
+
/**
|
3879
|
+
* Copies own symbol properties of `source` to `object`.
|
3880
|
+
*
|
3881
|
+
* @private
|
3882
|
+
* @param {Object} source The object to copy symbols from.
|
3883
|
+
* @param {Object} [object={}] The object to copy symbols to.
|
3884
|
+
* @returns {Object} Returns `object`.
|
3885
|
+
*/
|
3886
|
+
|
3887
|
+
|
3888
|
+
function copySymbols(source, object) {
|
3889
|
+
return copyObject(source, getSymbols(source), object);
|
3890
|
+
}
|
3891
|
+
/**
|
3892
|
+
* Creates an array of own enumerable property names and symbols of `object`.
|
3893
|
+
*
|
3894
|
+
* @private
|
3895
|
+
* @param {Object} object The object to query.
|
3896
|
+
* @returns {Array} Returns the array of property names and symbols.
|
3897
|
+
*/
|
3898
|
+
|
3899
|
+
|
3900
|
+
function getAllKeys(object) {
|
3901
|
+
return baseGetAllKeys(object, keys, getSymbols);
|
3902
|
+
}
|
3903
|
+
/**
|
3904
|
+
* Gets the data for `map`.
|
3905
|
+
*
|
3906
|
+
* @private
|
3907
|
+
* @param {Object} map The map to query.
|
3908
|
+
* @param {string} key The reference key.
|
3909
|
+
* @returns {*} Returns the map data.
|
3910
|
+
*/
|
3911
|
+
|
3912
|
+
|
3913
|
+
function getMapData(map, key) {
|
3914
|
+
var data = map.__data__;
|
3915
|
+
return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
|
3916
|
+
}
|
3917
|
+
/**
|
3918
|
+
* Gets the native function at `key` of `object`.
|
3919
|
+
*
|
3920
|
+
* @private
|
3921
|
+
* @param {Object} object The object to query.
|
3922
|
+
* @param {string} key The key of the method to get.
|
3923
|
+
* @returns {*} Returns the function if it's native, else `undefined`.
|
3924
|
+
*/
|
3925
|
+
|
3926
|
+
|
3927
|
+
function getNative(object, key) {
|
3928
|
+
var value = getValue(object, key);
|
3929
|
+
return baseIsNative(value) ? value : undefined;
|
3930
|
+
}
|
3931
|
+
/**
|
3932
|
+
* Creates an array of the own enumerable symbol properties of `object`.
|
3933
|
+
*
|
3934
|
+
* @private
|
3935
|
+
* @param {Object} object The object to query.
|
3936
|
+
* @returns {Array} Returns the array of symbols.
|
3937
|
+
*/
|
3938
|
+
|
3939
|
+
|
3940
|
+
var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
|
3941
|
+
/**
|
3942
|
+
* Gets the `toStringTag` of `value`.
|
3943
|
+
*
|
3944
|
+
* @private
|
3945
|
+
* @param {*} value The value to query.
|
3946
|
+
* @returns {string} Returns the `toStringTag`.
|
3947
|
+
*/
|
3948
|
+
|
3949
|
+
var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11,
|
3950
|
+
// for data views in Edge < 14, and promises in Node.js.
|
3951
|
+
|
3952
|
+
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
|
3953
|
+
getTag = function getTag(value) {
|
3954
|
+
var result = objectToString.call(value),
|
3955
|
+
Ctor = result == objectTag ? value.constructor : undefined,
|
3956
|
+
ctorString = Ctor ? toSource(Ctor) : undefined;
|
3957
|
+
|
3958
|
+
if (ctorString) {
|
3959
|
+
switch (ctorString) {
|
3960
|
+
case dataViewCtorString:
|
3961
|
+
return dataViewTag;
|
3962
|
+
|
3963
|
+
case mapCtorString:
|
3964
|
+
return mapTag;
|
3965
|
+
|
3966
|
+
case promiseCtorString:
|
3967
|
+
return promiseTag;
|
3968
|
+
|
3969
|
+
case setCtorString:
|
3970
|
+
return setTag;
|
3971
|
+
|
3972
|
+
case weakMapCtorString:
|
3973
|
+
return weakMapTag;
|
3974
|
+
}
|
3975
|
+
}
|
3976
|
+
|
3977
|
+
return result;
|
3978
|
+
};
|
3979
|
+
}
|
3980
|
+
/**
|
3981
|
+
* Initializes an array clone.
|
3982
|
+
*
|
3983
|
+
* @private
|
3984
|
+
* @param {Array} array The array to clone.
|
3985
|
+
* @returns {Array} Returns the initialized clone.
|
3986
|
+
*/
|
3987
|
+
|
3988
|
+
|
3989
|
+
function initCloneArray(array) {
|
3990
|
+
var length = array.length,
|
3991
|
+
result = array.constructor(length); // Add properties assigned by `RegExp#exec`.
|
3992
|
+
|
3993
|
+
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
3994
|
+
result.index = array.index;
|
3995
|
+
result.input = array.input;
|
3996
|
+
}
|
3997
|
+
|
3998
|
+
return result;
|
3999
|
+
}
|
4000
|
+
/**
|
4001
|
+
* Initializes an object clone.
|
4002
|
+
*
|
4003
|
+
* @private
|
4004
|
+
* @param {Object} object The object to clone.
|
4005
|
+
* @returns {Object} Returns the initialized clone.
|
4006
|
+
*/
|
4007
|
+
|
4008
|
+
|
4009
|
+
function initCloneObject(object) {
|
4010
|
+
return typeof object.constructor == 'function' && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
|
4011
|
+
}
|
4012
|
+
/**
|
4013
|
+
* Initializes an object clone based on its `toStringTag`.
|
4014
|
+
*
|
4015
|
+
* **Note:** This function only supports cloning values with tags of
|
4016
|
+
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
4017
|
+
*
|
4018
|
+
* @private
|
4019
|
+
* @param {Object} object The object to clone.
|
4020
|
+
* @param {string} tag The `toStringTag` of the object to clone.
|
4021
|
+
* @param {Function} cloneFunc The function to clone values.
|
4022
|
+
* @param {boolean} [isDeep] Specify a deep clone.
|
4023
|
+
* @returns {Object} Returns the initialized clone.
|
4024
|
+
*/
|
4025
|
+
|
4026
|
+
|
4027
|
+
function initCloneByTag(object, tag, cloneFunc, isDeep) {
|
4028
|
+
var Ctor = object.constructor;
|
4029
|
+
|
4030
|
+
switch (tag) {
|
4031
|
+
case arrayBufferTag:
|
4032
|
+
return cloneArrayBuffer(object);
|
4033
|
+
|
4034
|
+
case boolTag:
|
4035
|
+
case dateTag:
|
4036
|
+
return new Ctor(+object);
|
4037
|
+
|
4038
|
+
case dataViewTag:
|
4039
|
+
return cloneDataView(object, isDeep);
|
4040
|
+
|
4041
|
+
case float32Tag:
|
4042
|
+
case float64Tag:
|
4043
|
+
case int8Tag:
|
4044
|
+
case int16Tag:
|
4045
|
+
case int32Tag:
|
4046
|
+
case uint8Tag:
|
4047
|
+
case uint8ClampedTag:
|
4048
|
+
case uint16Tag:
|
4049
|
+
case uint32Tag:
|
4050
|
+
return cloneTypedArray(object, isDeep);
|
4051
|
+
|
4052
|
+
case mapTag:
|
4053
|
+
return cloneMap(object, isDeep, cloneFunc);
|
4054
|
+
|
4055
|
+
case numberTag:
|
4056
|
+
case stringTag:
|
4057
|
+
return new Ctor(object);
|
4058
|
+
|
4059
|
+
case regexpTag:
|
4060
|
+
return cloneRegExp(object);
|
4061
|
+
|
4062
|
+
case setTag:
|
4063
|
+
return cloneSet(object, isDeep, cloneFunc);
|
4064
|
+
|
4065
|
+
case symbolTag:
|
4066
|
+
return cloneSymbol(object);
|
4067
|
+
}
|
4068
|
+
}
|
4069
|
+
/**
|
4070
|
+
* Checks if `value` is a valid array-like index.
|
4071
|
+
*
|
4072
|
+
* @private
|
4073
|
+
* @param {*} value The value to check.
|
4074
|
+
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
4075
|
+
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
4076
|
+
*/
|
4077
|
+
|
4078
|
+
|
4079
|
+
function isIndex(value, length) {
|
4080
|
+
length = length == null ? MAX_SAFE_INTEGER : length;
|
4081
|
+
return !!length && (typeof value == 'number' || reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;
|
4082
|
+
}
|
4083
|
+
/**
|
4084
|
+
* Checks if `value` is suitable for use as unique object key.
|
4085
|
+
*
|
4086
|
+
* @private
|
4087
|
+
* @param {*} value The value to check.
|
4088
|
+
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
4089
|
+
*/
|
4090
|
+
|
4091
|
+
|
4092
|
+
function isKeyable(value) {
|
4093
|
+
var type = _typeof(value);
|
4094
|
+
|
4095
|
+
return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;
|
4096
|
+
}
|
4097
|
+
/**
|
4098
|
+
* Checks if `func` has its source masked.
|
4099
|
+
*
|
4100
|
+
* @private
|
4101
|
+
* @param {Function} func The function to check.
|
4102
|
+
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
4103
|
+
*/
|
4104
|
+
|
4105
|
+
|
4106
|
+
function isMasked(func) {
|
4107
|
+
return !!maskSrcKey && maskSrcKey in func;
|
4108
|
+
}
|
4109
|
+
/**
|
4110
|
+
* Checks if `value` is likely a prototype object.
|
4111
|
+
*
|
4112
|
+
* @private
|
4113
|
+
* @param {*} value The value to check.
|
4114
|
+
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
4115
|
+
*/
|
4116
|
+
|
4117
|
+
|
4118
|
+
function isPrototype(value) {
|
4119
|
+
var Ctor = value && value.constructor,
|
4120
|
+
proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;
|
4121
|
+
return value === proto;
|
4122
|
+
}
|
4123
|
+
/**
|
4124
|
+
* Converts `func` to its source code.
|
4125
|
+
*
|
4126
|
+
* @private
|
4127
|
+
* @param {Function} func The function to process.
|
4128
|
+
* @returns {string} Returns the source code.
|
4129
|
+
*/
|
4130
|
+
|
4131
|
+
|
4132
|
+
function toSource(func) {
|
4133
|
+
if (func != null) {
|
4134
|
+
try {
|
4135
|
+
return funcToString.call(func);
|
4136
|
+
} catch (e) {}
|
4137
|
+
|
4138
|
+
try {
|
4139
|
+
return func + '';
|
4140
|
+
} catch (e) {}
|
4141
|
+
}
|
4142
|
+
|
4143
|
+
return '';
|
4144
|
+
}
|
4145
|
+
/**
|
4146
|
+
* This method is like `_.clone` except that it recursively clones `value`.
|
4147
|
+
*
|
4148
|
+
* @static
|
4149
|
+
* @memberOf _
|
4150
|
+
* @since 1.0.0
|
4151
|
+
* @category Lang
|
4152
|
+
* @param {*} value The value to recursively clone.
|
4153
|
+
* @returns {*} Returns the deep cloned value.
|
4154
|
+
* @see _.clone
|
4155
|
+
* @example
|
4156
|
+
*
|
4157
|
+
* var objects = [{ 'a': 1 }, { 'b': 2 }];
|
4158
|
+
*
|
4159
|
+
* var deep = _.cloneDeep(objects);
|
4160
|
+
* console.log(deep[0] === objects[0]);
|
4161
|
+
* // => false
|
4162
|
+
*/
|
4163
|
+
|
4164
|
+
|
4165
|
+
function cloneDeep(value) {
|
4166
|
+
return baseClone(value, true, true);
|
4167
|
+
}
|
4168
|
+
/**
|
4169
|
+
* Performs a
|
4170
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
4171
|
+
* comparison between two values to determine if they are equivalent.
|
4172
|
+
*
|
4173
|
+
* @static
|
4174
|
+
* @memberOf _
|
4175
|
+
* @since 4.0.0
|
4176
|
+
* @category Lang
|
4177
|
+
* @param {*} value The value to compare.
|
4178
|
+
* @param {*} other The other value to compare.
|
4179
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
4180
|
+
* @example
|
4181
|
+
*
|
4182
|
+
* var object = { 'a': 1 };
|
4183
|
+
* var other = { 'a': 1 };
|
4184
|
+
*
|
4185
|
+
* _.eq(object, object);
|
4186
|
+
* // => true
|
4187
|
+
*
|
4188
|
+
* _.eq(object, other);
|
4189
|
+
* // => false
|
4190
|
+
*
|
4191
|
+
* _.eq('a', 'a');
|
4192
|
+
* // => true
|
4193
|
+
*
|
4194
|
+
* _.eq('a', Object('a'));
|
4195
|
+
* // => false
|
4196
|
+
*
|
4197
|
+
* _.eq(NaN, NaN);
|
4198
|
+
* // => true
|
4199
|
+
*/
|
4200
|
+
|
4201
|
+
|
4202
|
+
function eq(value, other) {
|
4203
|
+
return value === other || value !== value && other !== other;
|
4204
|
+
}
|
4205
|
+
/**
|
4206
|
+
* Checks if `value` is likely an `arguments` object.
|
4207
|
+
*
|
4208
|
+
* @static
|
4209
|
+
* @memberOf _
|
4210
|
+
* @since 0.1.0
|
4211
|
+
* @category Lang
|
4212
|
+
* @param {*} value The value to check.
|
4213
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
4214
|
+
* else `false`.
|
4215
|
+
* @example
|
4216
|
+
*
|
4217
|
+
* _.isArguments(function() { return arguments; }());
|
4218
|
+
* // => true
|
4219
|
+
*
|
4220
|
+
* _.isArguments([1, 2, 3]);
|
4221
|
+
* // => false
|
4222
|
+
*/
|
4223
|
+
|
4224
|
+
|
4225
|
+
function isArguments(value) {
|
4226
|
+
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
4227
|
+
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
4228
|
+
}
|
4229
|
+
/**
|
4230
|
+
* Checks if `value` is classified as an `Array` object.
|
4231
|
+
*
|
4232
|
+
* @static
|
4233
|
+
* @memberOf _
|
4234
|
+
* @since 0.1.0
|
4235
|
+
* @category Lang
|
4236
|
+
* @param {*} value The value to check.
|
4237
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
4238
|
+
* @example
|
4239
|
+
*
|
4240
|
+
* _.isArray([1, 2, 3]);
|
4241
|
+
* // => true
|
4242
|
+
*
|
4243
|
+
* _.isArray(document.body.children);
|
4244
|
+
* // => false
|
4245
|
+
*
|
4246
|
+
* _.isArray('abc');
|
4247
|
+
* // => false
|
4248
|
+
*
|
4249
|
+
* _.isArray(_.noop);
|
4250
|
+
* // => false
|
4251
|
+
*/
|
4252
|
+
|
4253
|
+
|
4254
|
+
var isArray = Array.isArray;
|
4255
|
+
/**
|
4256
|
+
* Checks if `value` is array-like. A value is considered array-like if it's
|
4257
|
+
* not a function and has a `value.length` that's an integer greater than or
|
4258
|
+
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
4259
|
+
*
|
4260
|
+
* @static
|
4261
|
+
* @memberOf _
|
4262
|
+
* @since 4.0.0
|
4263
|
+
* @category Lang
|
4264
|
+
* @param {*} value The value to check.
|
4265
|
+
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
4266
|
+
* @example
|
4267
|
+
*
|
4268
|
+
* _.isArrayLike([1, 2, 3]);
|
4269
|
+
* // => true
|
4270
|
+
*
|
4271
|
+
* _.isArrayLike(document.body.children);
|
4272
|
+
* // => true
|
4273
|
+
*
|
4274
|
+
* _.isArrayLike('abc');
|
4275
|
+
* // => true
|
4276
|
+
*
|
4277
|
+
* _.isArrayLike(_.noop);
|
4278
|
+
* // => false
|
4279
|
+
*/
|
4280
|
+
|
4281
|
+
function isArrayLike(value) {
|
4282
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
4283
|
+
}
|
4284
|
+
/**
|
4285
|
+
* This method is like `_.isArrayLike` except that it also checks if `value`
|
4286
|
+
* is an object.
|
4287
|
+
*
|
4288
|
+
* @static
|
4289
|
+
* @memberOf _
|
4290
|
+
* @since 4.0.0
|
4291
|
+
* @category Lang
|
4292
|
+
* @param {*} value The value to check.
|
4293
|
+
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
4294
|
+
* else `false`.
|
4295
|
+
* @example
|
4296
|
+
*
|
4297
|
+
* _.isArrayLikeObject([1, 2, 3]);
|
4298
|
+
* // => true
|
4299
|
+
*
|
4300
|
+
* _.isArrayLikeObject(document.body.children);
|
4301
|
+
* // => true
|
4302
|
+
*
|
4303
|
+
* _.isArrayLikeObject('abc');
|
4304
|
+
* // => false
|
4305
|
+
*
|
4306
|
+
* _.isArrayLikeObject(_.noop);
|
4307
|
+
* // => false
|
4308
|
+
*/
|
4309
|
+
|
4310
|
+
|
4311
|
+
function isArrayLikeObject(value) {
|
4312
|
+
return isObjectLike(value) && isArrayLike(value);
|
4313
|
+
}
|
4314
|
+
/**
|
4315
|
+
* Checks if `value` is a buffer.
|
4316
|
+
*
|
4317
|
+
* @static
|
4318
|
+
* @memberOf _
|
4319
|
+
* @since 4.3.0
|
4320
|
+
* @category Lang
|
4321
|
+
* @param {*} value The value to check.
|
4322
|
+
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
4323
|
+
* @example
|
4324
|
+
*
|
4325
|
+
* _.isBuffer(new Buffer(2));
|
4326
|
+
* // => true
|
4327
|
+
*
|
4328
|
+
* _.isBuffer(new Uint8Array(2));
|
4329
|
+
* // => false
|
4330
|
+
*/
|
4331
|
+
|
4332
|
+
|
4333
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
4334
|
+
/**
|
4335
|
+
* Checks if `value` is classified as a `Function` object.
|
4336
|
+
*
|
4337
|
+
* @static
|
4338
|
+
* @memberOf _
|
4339
|
+
* @since 0.1.0
|
4340
|
+
* @category Lang
|
4341
|
+
* @param {*} value The value to check.
|
4342
|
+
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
4343
|
+
* @example
|
4344
|
+
*
|
4345
|
+
* _.isFunction(_);
|
4346
|
+
* // => true
|
4347
|
+
*
|
4348
|
+
* _.isFunction(/abc/);
|
4349
|
+
* // => false
|
4350
|
+
*/
|
4351
|
+
|
4352
|
+
function isFunction(value) {
|
4353
|
+
// The use of `Object#toString` avoids issues with the `typeof` operator
|
4354
|
+
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
4355
|
+
var tag = isObject(value) ? objectToString.call(value) : '';
|
4356
|
+
return tag == funcTag || tag == genTag;
|
4357
|
+
}
|
4358
|
+
/**
|
4359
|
+
* Checks if `value` is a valid array-like length.
|
4360
|
+
*
|
4361
|
+
* **Note:** This method is loosely based on
|
4362
|
+
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
4363
|
+
*
|
4364
|
+
* @static
|
4365
|
+
* @memberOf _
|
4366
|
+
* @since 4.0.0
|
4367
|
+
* @category Lang
|
4368
|
+
* @param {*} value The value to check.
|
4369
|
+
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
4370
|
+
* @example
|
4371
|
+
*
|
4372
|
+
* _.isLength(3);
|
4373
|
+
* // => true
|
4374
|
+
*
|
4375
|
+
* _.isLength(Number.MIN_VALUE);
|
4376
|
+
* // => false
|
4377
|
+
*
|
4378
|
+
* _.isLength(Infinity);
|
4379
|
+
* // => false
|
4380
|
+
*
|
4381
|
+
* _.isLength('3');
|
4382
|
+
* // => false
|
4383
|
+
*/
|
4384
|
+
|
4385
|
+
|
4386
|
+
function isLength(value) {
|
4387
|
+
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
4388
|
+
}
|
4389
|
+
/**
|
4390
|
+
* Checks if `value` is the
|
4391
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
4392
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
4393
|
+
*
|
4394
|
+
* @static
|
4395
|
+
* @memberOf _
|
4396
|
+
* @since 0.1.0
|
4397
|
+
* @category Lang
|
4398
|
+
* @param {*} value The value to check.
|
4399
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
4400
|
+
* @example
|
4401
|
+
*
|
4402
|
+
* _.isObject({});
|
4403
|
+
* // => true
|
4404
|
+
*
|
4405
|
+
* _.isObject([1, 2, 3]);
|
4406
|
+
* // => true
|
4407
|
+
*
|
4408
|
+
* _.isObject(_.noop);
|
4409
|
+
* // => true
|
4410
|
+
*
|
4411
|
+
* _.isObject(null);
|
4412
|
+
* // => false
|
4413
|
+
*/
|
4414
|
+
|
4415
|
+
|
4416
|
+
function isObject(value) {
|
4417
|
+
var type = _typeof(value);
|
4418
|
+
|
4419
|
+
return !!value && (type == 'object' || type == 'function');
|
4420
|
+
}
|
4421
|
+
/**
|
4422
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
4423
|
+
* and has a `typeof` result of "object".
|
4424
|
+
*
|
4425
|
+
* @static
|
4426
|
+
* @memberOf _
|
4427
|
+
* @since 4.0.0
|
4428
|
+
* @category Lang
|
4429
|
+
* @param {*} value The value to check.
|
4430
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
4431
|
+
* @example
|
4432
|
+
*
|
4433
|
+
* _.isObjectLike({});
|
4434
|
+
* // => true
|
4435
|
+
*
|
4436
|
+
* _.isObjectLike([1, 2, 3]);
|
4437
|
+
* // => true
|
4438
|
+
*
|
4439
|
+
* _.isObjectLike(_.noop);
|
4440
|
+
* // => false
|
4441
|
+
*
|
4442
|
+
* _.isObjectLike(null);
|
4443
|
+
* // => false
|
4444
|
+
*/
|
4445
|
+
|
4446
|
+
|
4447
|
+
function isObjectLike(value) {
|
4448
|
+
return !!value && _typeof(value) == 'object';
|
4449
|
+
}
|
4450
|
+
/**
|
4451
|
+
* Creates an array of the own enumerable property names of `object`.
|
4452
|
+
*
|
4453
|
+
* **Note:** Non-object values are coerced to objects. See the
|
4454
|
+
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
4455
|
+
* for more details.
|
4456
|
+
*
|
4457
|
+
* @static
|
4458
|
+
* @since 0.1.0
|
4459
|
+
* @memberOf _
|
4460
|
+
* @category Object
|
4461
|
+
* @param {Object} object The object to query.
|
4462
|
+
* @returns {Array} Returns the array of property names.
|
4463
|
+
* @example
|
4464
|
+
*
|
4465
|
+
* function Foo() {
|
4466
|
+
* this.a = 1;
|
4467
|
+
* this.b = 2;
|
4468
|
+
* }
|
4469
|
+
*
|
4470
|
+
* Foo.prototype.c = 3;
|
4471
|
+
*
|
4472
|
+
* _.keys(new Foo);
|
4473
|
+
* // => ['a', 'b'] (iteration order is not guaranteed)
|
4474
|
+
*
|
4475
|
+
* _.keys('hi');
|
4476
|
+
* // => ['0', '1']
|
4477
|
+
*/
|
4478
|
+
|
4479
|
+
|
4480
|
+
function keys(object) {
|
4481
|
+
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
4482
|
+
}
|
4483
|
+
/**
|
4484
|
+
* This method returns a new empty array.
|
4485
|
+
*
|
4486
|
+
* @static
|
4487
|
+
* @memberOf _
|
4488
|
+
* @since 4.13.0
|
4489
|
+
* @category Util
|
4490
|
+
* @returns {Array} Returns the new empty array.
|
4491
|
+
* @example
|
4492
|
+
*
|
4493
|
+
* var arrays = _.times(2, _.stubArray);
|
4494
|
+
*
|
4495
|
+
* console.log(arrays);
|
4496
|
+
* // => [[], []]
|
4497
|
+
*
|
4498
|
+
* console.log(arrays[0] === arrays[1]);
|
4499
|
+
* // => false
|
4500
|
+
*/
|
4501
|
+
|
4502
|
+
|
4503
|
+
function stubArray() {
|
4504
|
+
return [];
|
4505
|
+
}
|
4506
|
+
/**
|
4507
|
+
* This method returns `false`.
|
4508
|
+
*
|
4509
|
+
* @static
|
4510
|
+
* @memberOf _
|
4511
|
+
* @since 4.13.0
|
4512
|
+
* @category Util
|
4513
|
+
* @returns {boolean} Returns `false`.
|
4514
|
+
* @example
|
4515
|
+
*
|
4516
|
+
* _.times(2, _.stubFalse);
|
4517
|
+
* // => [false, false]
|
4518
|
+
*/
|
4519
|
+
|
4520
|
+
|
4521
|
+
function stubFalse() {
|
4522
|
+
return false;
|
4523
|
+
}
|
4524
|
+
|
4525
|
+
module.exports = cloneDeep;
|
4526
|
+
});
|
4527
|
+
|
2681
4528
|
var hop = Object.prototype.hasOwnProperty;
|
2682
4529
|
var strCharAt = String.prototype.charAt;
|
2683
4530
|
var toStr = Object.prototype.toString;
|
@@ -3209,12 +5056,12 @@
|
|
3209
5056
|
var getValue = function getValue(target, path, options) {
|
3210
5057
|
if (!isobject(options)) {
|
3211
5058
|
options = {
|
3212
|
-
|
5059
|
+
default: options
|
3213
5060
|
};
|
3214
5061
|
}
|
3215
5062
|
|
3216
5063
|
if (!isValidObject(target)) {
|
3217
|
-
return typeof options
|
5064
|
+
return typeof options.default !== 'undefined' ? options.default : target;
|
3218
5065
|
}
|
3219
5066
|
|
3220
5067
|
if (typeof path === 'number') {
|
@@ -3231,7 +5078,7 @@
|
|
3231
5078
|
}
|
3232
5079
|
|
3233
5080
|
if (isString && path in target) {
|
3234
|
-
return isValid(path, target, options) ? target[path] : options
|
5081
|
+
return isValid(path, target, options) ? target[path] : options.default;
|
3235
5082
|
}
|
3236
5083
|
|
3237
5084
|
var segs = isArray ? path : split(path, splitChar, options);
|
@@ -3251,7 +5098,7 @@
|
|
3251
5098
|
|
3252
5099
|
if (prop in target) {
|
3253
5100
|
if (!isValid(prop, target, options)) {
|
3254
|
-
return options
|
5101
|
+
return options.default;
|
3255
5102
|
}
|
3256
5103
|
|
3257
5104
|
target = target[prop];
|
@@ -3264,7 +5111,7 @@
|
|
3264
5111
|
|
3265
5112
|
if (hasProp = prop in target) {
|
3266
5113
|
if (!isValid(prop, target, options)) {
|
3267
|
-
return options
|
5114
|
+
return options.default;
|
3268
5115
|
}
|
3269
5116
|
|
3270
5117
|
target = target[prop];
|
@@ -3274,7 +5121,7 @@
|
|
3274
5121
|
}
|
3275
5122
|
|
3276
5123
|
if (!hasProp) {
|
3277
|
-
return options
|
5124
|
+
return options.default;
|
3278
5125
|
}
|
3279
5126
|
}
|
3280
5127
|
} while (++idx < len && isValidObject(target));
|
@@ -3283,7 +5130,7 @@
|
|
3283
5130
|
return target;
|
3284
5131
|
}
|
3285
5132
|
|
3286
|
-
return options
|
5133
|
+
return options.default;
|
3287
5134
|
};
|
3288
5135
|
|
3289
5136
|
function join(segs, joinChar, options) {
|
@@ -3392,23 +5239,21 @@
|
|
3392
5239
|
function split$1(path, options) {
|
3393
5240
|
var id = createKey(path, options);
|
3394
5241
|
if (set.memo[id]) return set.memo[id];
|
3395
|
-
|
3396
|
-
var _char = options && options.separator ? options.separator : '.';
|
3397
|
-
|
5242
|
+
var char = options && options.separator ? options.separator : '.';
|
3398
5243
|
var keys = [];
|
3399
5244
|
var res = [];
|
3400
5245
|
|
3401
5246
|
if (options && typeof options.split === 'function') {
|
3402
5247
|
keys = options.split(path);
|
3403
5248
|
} else {
|
3404
|
-
keys = path.split(
|
5249
|
+
keys = path.split(char);
|
3405
5250
|
}
|
3406
5251
|
|
3407
5252
|
for (var i = 0; i < keys.length; i++) {
|
3408
5253
|
var prop = keys[i];
|
3409
5254
|
|
3410
5255
|
while (prop && prop.slice(-1) === '\\' && keys[i + 1] != null) {
|
3411
|
-
prop = prop.slice(0, -1) +
|
5256
|
+
prop = prop.slice(0, -1) + char + keys[++i];
|
3412
5257
|
}
|
3413
5258
|
|
3414
5259
|
res.push(prop);
|
@@ -3710,7 +5555,7 @@
|
|
3710
5555
|
PRODUCT_REVIEWED: "Product Reviewed"
|
3711
5556
|
}; // Enumeration for integrations supported
|
3712
5557
|
|
3713
|
-
var CONFIG_URL = "https://api.rudderlabs.com/sourceConfig/?p=npm&v=1.
|
5558
|
+
var CONFIG_URL = "https://api.rudderlabs.com/sourceConfig/?p=npm&v=1.2.4";
|
3714
5559
|
var MAX_WAIT_FOR_INTEGRATION_LOAD = 10000;
|
3715
5560
|
var INTEGRATION_LOAD_CHECK_INTERVAL = 1000;
|
3716
5561
|
/* module.exports = {
|
@@ -6379,7 +8224,7 @@
|
|
6379
8224
|
var ms = function ms(val, options) {
|
6380
8225
|
options = options || {};
|
6381
8226
|
if ('string' == typeof val) return parse$2(val);
|
6382
|
-
return options
|
8227
|
+
return options.long ? long(val) : short(val);
|
6383
8228
|
};
|
6384
8229
|
/**
|
6385
8230
|
* Parse the given `str` and return milliseconds.
|
@@ -6449,7 +8294,7 @@
|
|
6449
8294
|
*/
|
6450
8295
|
|
6451
8296
|
|
6452
|
-
function
|
8297
|
+
function short(ms) {
|
6453
8298
|
if (ms >= d) return Math.round(ms / d) + 'd';
|
6454
8299
|
if (ms >= h) return Math.round(ms / h) + 'h';
|
6455
8300
|
if (ms >= m) return Math.round(ms / m) + 'm';
|
@@ -6465,7 +8310,7 @@
|
|
6465
8310
|
*/
|
6466
8311
|
|
6467
8312
|
|
6468
|
-
function
|
8313
|
+
function long(ms) {
|
6469
8314
|
return plural(ms, d, 'day') || plural(ms, h, 'hour') || plural(ms, m, 'minute') || plural(ms, s, 'second') || ms + ' ms';
|
6470
8315
|
}
|
6471
8316
|
/**
|
@@ -8511,7 +10356,7 @@
|
|
8511
10356
|
if (type === 'string' && val.length > 0) {
|
8512
10357
|
return parse$4(val);
|
8513
10358
|
} else if (type === 'number' && isNaN(val) === false) {
|
8514
|
-
return options
|
10359
|
+
return options.long ? fmtLong(val) : fmtShort(val);
|
8515
10360
|
}
|
8516
10361
|
|
8517
10362
|
throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
|
@@ -10524,13 +12369,13 @@
|
|
10524
12369
|
return isDefined(x) && isNotNull(x);
|
10525
12370
|
};
|
10526
12371
|
|
10527
|
-
var getDataFromSource = function getDataFromSource(src, dest,
|
12372
|
+
var getDataFromSource = function getDataFromSource(src, dest, properties) {
|
10528
12373
|
var data = {};
|
10529
12374
|
|
10530
12375
|
if (isArray$1(src)) {
|
10531
12376
|
for (var index = 0; index < src.length; index += 1) {
|
10532
|
-
if (src[index]
|
10533
|
-
data[dest] = properties[
|
12377
|
+
if (properties[src[index]]) {
|
12378
|
+
data[dest] = properties[src[index]];
|
10534
12379
|
|
10535
12380
|
if (data) {
|
10536
12381
|
// return only if the value is valid.
|
@@ -10539,13 +12384,19 @@
|
|
10539
12384
|
}
|
10540
12385
|
}
|
10541
12386
|
}
|
10542
|
-
} else if (typeof src === "string")
|
10543
|
-
|
12387
|
+
} else if (typeof src === "string") {
|
12388
|
+
if (properties[src]) {
|
12389
|
+
data[dest] = properties[src];
|
12390
|
+
}
|
10544
12391
|
}
|
10545
12392
|
|
10546
12393
|
return data;
|
10547
12394
|
};
|
10548
12395
|
|
12396
|
+
var removeTrailingSlashes = function removeTrailingSlashes(str) {
|
12397
|
+
return str && str.endsWith("/") ? str.replace(/\/+$/, "") : str;
|
12398
|
+
};
|
12399
|
+
|
10549
12400
|
var lodash=createCommonjsModule(function(module,exports){(function(){/** Used as a safe reference for `undefined` in pre-ES5 environments. */var undefined$1;/** Used as the semantic version number. */var VERSION='4.17.21';/** Used as the size to enable large array optimizations. */var LARGE_ARRAY_SIZE=200;/** Error message constants. */var CORE_ERROR_TEXT='Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',FUNC_ERROR_TEXT='Expected a function',INVALID_TEMPL_VAR_ERROR_TEXT='Invalid `variable` option passed into `_.template`';/** Used to stand-in for `undefined` hash values. */var HASH_UNDEFINED='__lodash_hash_undefined__';/** Used as the maximum memoize cache size. */var MAX_MEMOIZE_SIZE=500;/** Used as the internal argument placeholder. */var PLACEHOLDER='__lodash_placeholder__';/** Used to compose bitmasks for cloning. */var CLONE_DEEP_FLAG=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG=4;/** Used to compose bitmasks for value comparisons. */var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;/** Used to compose bitmasks for function metadata. */var WRAP_BIND_FLAG=1,WRAP_BIND_KEY_FLAG=2,WRAP_CURRY_BOUND_FLAG=4,WRAP_CURRY_FLAG=8,WRAP_CURRY_RIGHT_FLAG=16,WRAP_PARTIAL_FLAG=32,WRAP_PARTIAL_RIGHT_FLAG=64,WRAP_ARY_FLAG=128,WRAP_REARG_FLAG=256,WRAP_FLIP_FLAG=512;/** Used as default options for `_.truncate`. */var DEFAULT_TRUNC_LENGTH=30,DEFAULT_TRUNC_OMISSION='...';/** Used to detect hot functions by number of calls within a span of milliseconds. */var HOT_COUNT=800,HOT_SPAN=16;/** Used to indicate the type of lazy iteratees. */var LAZY_FILTER_FLAG=1,LAZY_MAP_FLAG=2,LAZY_WHILE_FLAG=3;/** Used as references for various `Number` constants. */var INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991,MAX_INTEGER=1.7976931348623157e+308,NAN=0/0;/** Used as references for the maximum length and index of an array. */var MAX_ARRAY_LENGTH=4294967295,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH-1,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1;/** Used to associate wrap methods with their bit flags. */var wrapFlags=[['ary',WRAP_ARY_FLAG],['bind',WRAP_BIND_FLAG],['bindKey',WRAP_BIND_KEY_FLAG],['curry',WRAP_CURRY_FLAG],['curryRight',WRAP_CURRY_RIGHT_FLAG],['flip',WRAP_FLIP_FLAG],['partial',WRAP_PARTIAL_FLAG],['partialRight',WRAP_PARTIAL_RIGHT_FLAG],['rearg',WRAP_REARG_FLAG]];/** `Object#toString` result references. */var argsTag='[object Arguments]',arrayTag='[object Array]',asyncTag='[object AsyncFunction]',boolTag='[object Boolean]',dateTag='[object Date]',domExcTag='[object DOMException]',errorTag='[object Error]',funcTag='[object Function]',genTag='[object GeneratorFunction]',mapTag='[object Map]',numberTag='[object Number]',nullTag='[object Null]',objectTag='[object Object]',promiseTag='[object Promise]',proxyTag='[object Proxy]',regexpTag='[object RegExp]',setTag='[object Set]',stringTag='[object String]',symbolTag='[object Symbol]',undefinedTag='[object Undefined]',weakMapTag='[object WeakMap]',weakSetTag='[object WeakSet]';var arrayBufferTag='[object ArrayBuffer]',dataViewTag='[object DataView]',float32Tag='[object Float32Array]',float64Tag='[object Float64Array]',int8Tag='[object Int8Array]',int16Tag='[object Int16Array]',int32Tag='[object Int32Array]',uint8Tag='[object Uint8Array]',uint8ClampedTag='[object Uint8ClampedArray]',uint16Tag='[object Uint16Array]',uint32Tag='[object Uint32Array]';/** Used to match empty string literals in compiled template source. */var reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g;/** Used to match HTML entities and HTML characters. */var reEscapedHtml=/&(?:amp|lt|gt|quot|#39);/g,reUnescapedHtml=/[&<>"']/g,reHasEscapedHtml=RegExp(reEscapedHtml.source),reHasUnescapedHtml=RegExp(reUnescapedHtml.source);/** Used to match template delimiters. */var reEscape=/<%-([\s\S]+?)%>/g,reEvaluate=/<%([\s\S]+?)%>/g,reInterpolate=/<%=([\s\S]+?)%>/g;/** Used to match property names within property paths. */var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;/**
|
10550
12401
|
* Used to match `RegExp`
|
10551
12402
|
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
@@ -25397,10 +27248,10 @@
|
|
25397
27248
|
logger.error("No product array found");
|
25398
27249
|
}
|
25399
27250
|
} else {
|
25400
|
-
|
27251
|
+
logger.debug("inside custom");
|
25401
27252
|
|
25402
27253
|
if (!standardTo[event.toLowerCase()] && !legacyTo[event.toLowerCase()]) {
|
25403
|
-
|
27254
|
+
logger.debug("inside custom not mapped");
|
25404
27255
|
var payloadVal = this.buildPayLoad(rudderElement, false);
|
25405
27256
|
payloadVal.value = revValue;
|
25406
27257
|
window.fbq("trackSingleCustom", self.pixelId, event, payloadVal, {
|
@@ -25428,40 +27279,41 @@
|
|
25428
27279
|
}
|
25429
27280
|
}
|
25430
27281
|
}
|
27282
|
+
/**
|
27283
|
+
* Get the Facebook Content Type
|
27284
|
+
*
|
27285
|
+
* Can be `product`, `destination`, `flight` or `hotel`.
|
27286
|
+
*
|
27287
|
+
* This can be overridden within the message
|
27288
|
+
* `options.integrations.FACEBOOK_PIXEL.contentType`, or alternatively you can
|
27289
|
+
* set the "Map Categories to Facebook Content Types" setting within
|
27290
|
+
* RudderStack config and then set the corresponding commerce category in
|
27291
|
+
* `track()` properties.
|
27292
|
+
*
|
27293
|
+
* https://www.facebook.com/business/help/606577526529702?id=1205376682832142
|
27294
|
+
*/
|
27295
|
+
|
25431
27296
|
}, {
|
25432
27297
|
key: "getContentType",
|
25433
27298
|
value: function getContentType(rudderElement, defaultValue) {
|
25434
|
-
var _rudderElement$messag2
|
25435
|
-
options = _rudderElement$messag2.options,
|
25436
|
-
properties = _rudderElement$messag2.properties;
|
25437
|
-
|
25438
|
-
if (options && options.contentType) {
|
25439
|
-
return [options.contentType];
|
25440
|
-
}
|
27299
|
+
var _rudderElement$messag2, _rudderElement$messag3;
|
25441
27300
|
|
25442
|
-
|
25443
|
-
var
|
27301
|
+
// Get the message-specific override if it exists in the options parameter of `track()`
|
27302
|
+
var contentTypeMessageOverride = (_rudderElement$messag2 = rudderElement.message.integrations) === null || _rudderElement$messag2 === void 0 ? void 0 : (_rudderElement$messag3 = _rudderElement$messag2.FACEBOOK_PIXEL) === null || _rudderElement$messag3 === void 0 ? void 0 : _rudderElement$messag3.contentType;
|
27303
|
+
if (contentTypeMessageOverride) return [contentTypeMessageOverride]; // Otherwise check if there is a replacement set for all Facebook Pixel
|
27304
|
+
// track calls of this category
|
25444
27305
|
|
25445
|
-
|
25446
|
-
if (products && products.length) {
|
25447
|
-
category = products[0].category;
|
25448
|
-
}
|
25449
|
-
}
|
27306
|
+
var category = rudderElement.message.properties.category;
|
25450
27307
|
|
25451
27308
|
if (category) {
|
25452
|
-
var
|
25453
|
-
var mappedTo = mapped.reduce(function (filtered, mappedVal) {
|
25454
|
-
if (mappedVal.from === category) {
|
25455
|
-
filtered.push(mappedVal.to);
|
25456
|
-
}
|
27309
|
+
var _this$categoryToConte;
|
25457
27310
|
|
25458
|
-
|
25459
|
-
|
27311
|
+
var categoryMapping = (_this$categoryToConte = this.categoryToContent) === null || _this$categoryToConte === void 0 ? void 0 : _this$categoryToConte.find(function (i) {
|
27312
|
+
return i.from === category;
|
27313
|
+
});
|
27314
|
+
if (categoryMapping !== null && categoryMapping !== void 0 && categoryMapping.to) return [categoryMapping.to];
|
27315
|
+
} // Otherwise return the default value
|
25460
27316
|
|
25461
|
-
if (mappedTo.length) {
|
25462
|
-
return mappedTo;
|
25463
|
-
}
|
25464
|
-
}
|
25465
27317
|
|
25466
27318
|
return defaultValue;
|
25467
27319
|
}
|
@@ -25648,7 +27500,7 @@
|
|
25648
27500
|
var camelcase = camelCase; // TODO: Remove this for the next major release
|
25649
27501
|
|
25650
27502
|
var default_1 = camelCase;
|
25651
|
-
camelcase
|
27503
|
+
camelcase.default = default_1;
|
25652
27504
|
|
25653
27505
|
var Fullstory = /*#__PURE__*/function () {
|
25654
27506
|
function Fullstory(config) {
|
@@ -26398,7 +28250,7 @@
|
|
26398
28250
|
componentEach([metrics, dimensions, contentGroupings], function (group) {
|
26399
28251
|
componentEach(group, function (prop, key) {
|
26400
28252
|
var value = obj[prop];
|
26401
|
-
if (is_1
|
28253
|
+
if (is_1.boolean(value)) value = value.toString();
|
26402
28254
|
if (value || value === 0) ret[key] = value;
|
26403
28255
|
});
|
26404
28256
|
});
|
@@ -26814,8 +28666,12 @@
|
|
26814
28666
|
dest: "share",
|
26815
28667
|
hasItem: false,
|
26816
28668
|
onlyIncludeParams: includeParams.CartShare
|
26817
|
-
} //---------
|
26818
|
-
|
28669
|
+
}, //---------
|
28670
|
+
{
|
28671
|
+
src: ["group"],
|
28672
|
+
dest: "join_group",
|
28673
|
+
hasItem: false
|
28674
|
+
}];
|
26819
28675
|
|
26820
28676
|
var pageEventParametersConfigArray = [{
|
26821
28677
|
src: "path",
|
@@ -26935,9 +28791,7 @@
|
|
26935
28791
|
destinationProperties = createItemProperty(destinationProperties, param.dest, props[key]);
|
26936
28792
|
}
|
26937
28793
|
|
26938
|
-
destinationProperties[param.dest] = props[key];
|
26939
|
-
|
26940
|
-
delete props[key];
|
28794
|
+
destinationProperties[param.dest] = props[key];
|
26941
28795
|
}
|
26942
28796
|
});
|
26943
28797
|
});
|
@@ -26986,6 +28840,7 @@
|
|
26986
28840
|
this.sendUserId = config.sendUserId || false;
|
26987
28841
|
this.blockPageView = config.blockPageViewEvent || false;
|
26988
28842
|
this.extendPageViewParams = config.extendPageViewParams || false;
|
28843
|
+
this.extendGroupPayload = config.extendGroupPayload || false;
|
26989
28844
|
this.name = "GA4";
|
26990
28845
|
}
|
26991
28846
|
|
@@ -27189,6 +29044,19 @@
|
|
27189
29044
|
window.gtag("event", "page_view", getPageViewProperty(pageProps));
|
27190
29045
|
}
|
27191
29046
|
}
|
29047
|
+
}, {
|
29048
|
+
key: "group",
|
29049
|
+
value: function group(rudderElement) {
|
29050
|
+
var _this2 = this;
|
29051
|
+
|
29052
|
+
var groupId = rudderElement.message.groupId;
|
29053
|
+
var traits = rudderElement.message.traits;
|
29054
|
+
getDestinationEventName(rudderElement.message.type).forEach(function (events) {
|
29055
|
+
_this2.sendGAEvent(events.dest, _objectSpread2({
|
29056
|
+
group_id: groupId
|
29057
|
+
}, _this2.extendGroupPayload ? traits : {}));
|
29058
|
+
});
|
29059
|
+
}
|
27192
29060
|
}]);
|
27193
29061
|
|
27194
29062
|
return GA4;
|
@@ -28985,7 +30853,12 @@
|
|
28985
30853
|
blocked: this.blockload,
|
28986
30854
|
stream: this.stream,
|
28987
30855
|
sessecs: 1800,
|
28988
|
-
src: document.location.protocol === "https:" ? "https://c.lytics.io/api/tag/".concat(this.accountId, "/latest.min.js") : "http://c.lytics.io/api/tag/".concat(this.accountId, "/latest.min.js")
|
30856
|
+
src: document.location.protocol === "https:" ? "https://c.lytics.io/api/tag/".concat(this.accountId, "/latest.min.js") : "http://c.lytics.io/api/tag/".concat(this.accountId, "/latest.min.js"),
|
30857
|
+
pageAnalysis: {
|
30858
|
+
dataLayerPull: {
|
30859
|
+
disabled: true
|
30860
|
+
}
|
30861
|
+
}
|
28989
30862
|
});
|
28990
30863
|
}
|
28991
30864
|
}, {
|
@@ -30259,6 +32132,10 @@
|
|
30259
32132
|
src: "brand",
|
30260
32133
|
dest: "product_brand"
|
30261
32134
|
}];
|
32135
|
+
var propertyMapping = [{
|
32136
|
+
src: "revenue",
|
32137
|
+
dest: "value"
|
32138
|
+
}];
|
30262
32139
|
var pinterestPropertySupport = ["value", "order_quantity", "currency", "order_id", "product_name", "product_id", "product_category", "product_variant", "product_variant_id", "product_price", "product_quantity", "product_brand", "promo_code", "property", "video_title", "lead_type", "coupon"];
|
30263
32140
|
|
30264
32141
|
var PinterestTag = /*#__PURE__*/function () {
|
@@ -30345,12 +32222,16 @@
|
|
30345
32222
|
}, {
|
30346
32223
|
key: "getMappingObject",
|
30347
32224
|
value: function getMappingObject(properties, mappings) {
|
32225
|
+
var isPersist = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
30348
32226
|
var pinterestObject = {};
|
30349
32227
|
mappings.forEach(function (mapping) {
|
30350
|
-
|
30351
|
-
pinterestObject = _objectSpread2(_objectSpread2({}, getDataFromSource(mapping.src, mapping.dest, p, properties)), pinterestObject);
|
30352
|
-
});
|
32228
|
+
pinterestObject = _objectSpread2(_objectSpread2({}, getDataFromSource(mapping.src, mapping.dest, properties)), pinterestObject);
|
30353
32229
|
});
|
32230
|
+
|
32231
|
+
if (isPersist) {
|
32232
|
+
return _objectSpread2(_objectSpread2({}, pinterestObject), properties);
|
32233
|
+
}
|
32234
|
+
|
30354
32235
|
return pinterestObject;
|
30355
32236
|
}
|
30356
32237
|
/**
|
@@ -30364,9 +32245,10 @@
|
|
30364
32245
|
key: "getRawPayload",
|
30365
32246
|
value: function getRawPayload(properties) {
|
30366
32247
|
var data = {};
|
30367
|
-
|
32248
|
+
var mappedProps = this.getMappingObject(properties, propertyMapping, true);
|
32249
|
+
Object.keys(mappedProps).forEach(function (p) {
|
30368
32250
|
if (pinterestPropertySupport.includes(p)) {
|
30369
|
-
data[p] =
|
32251
|
+
data[p] = mappedProps[p];
|
30370
32252
|
}
|
30371
32253
|
}); // This logic maps rudder query to search_query for Products Searched events
|
30372
32254
|
|
@@ -30508,418 +32390,6 @@
|
|
30508
32390
|
return PinterestTag;
|
30509
32391
|
}();
|
30510
32392
|
|
30511
|
-
var Posthog = /*#__PURE__*/function () {
|
30512
|
-
function Posthog(config, analytics) {
|
30513
|
-
var _this = this;
|
30514
|
-
|
30515
|
-
_classCallCheck(this, Posthog);
|
30516
|
-
|
30517
|
-
this.name = "POSTHOG";
|
30518
|
-
this.analytics = analytics;
|
30519
|
-
this.teamApiKey = config.teamApiKey;
|
30520
|
-
this.yourInstance = config.yourInstance || "https://app.posthog.com";
|
30521
|
-
this.autocapture = config.autocapture || false;
|
30522
|
-
this.capturePageView = config.capturePageView || false;
|
30523
|
-
this.disableSessionRecording = config.disableSessionRecording || false;
|
30524
|
-
this.disableCookie = config.disableCookie || false;
|
30525
|
-
this.propertyBlackList = [];
|
30526
|
-
this.xhrHeaders = {};
|
30527
|
-
|
30528
|
-
if (config.xhrHeaders && config.xhrHeaders.length > 0) {
|
30529
|
-
config.xhrHeaders.forEach(function (header) {
|
30530
|
-
if (header && header.key && header.value && header.key.trim() != "" && header.value.trim() != "") {
|
30531
|
-
_this.xhrHeaders[header.key] = header.value;
|
30532
|
-
}
|
30533
|
-
});
|
30534
|
-
}
|
30535
|
-
|
30536
|
-
if (config.propertyBlackList && config.propertyBlackList.length > 0) {
|
30537
|
-
config.propertyBlackList.forEach(function (element) {
|
30538
|
-
if (element && element.property && element.property.trim() != "") {
|
30539
|
-
_this.propertyBlackList.push(element.property);
|
30540
|
-
}
|
30541
|
-
});
|
30542
|
-
}
|
30543
|
-
}
|
30544
|
-
|
30545
|
-
_createClass(Posthog, [{
|
30546
|
-
key: "init",
|
30547
|
-
value: function init() {
|
30548
|
-
!function (t, e) {
|
30549
|
-
var o, n, p, r;
|
30550
|
-
e.__SV || (window.posthog = e, e._i = [], e.init = function (i, s, a) {
|
30551
|
-
function g(t, e) {
|
30552
|
-
var o = e.split(".");
|
30553
|
-
2 == o.length && (t = t[o[0]], e = o[1]), t[e] = function () {
|
30554
|
-
t.push([e].concat(Array.prototype.slice.call(arguments, 0)));
|
30555
|
-
};
|
30556
|
-
}
|
30557
|
-
|
30558
|
-
(p = t.createElement("script")).type = "text/javascript", p.async = !0, p.src = s.api_host + "/static/array.js", (r = t.getElementsByTagName("script")[0]).parentNode.insertBefore(p, r);
|
30559
|
-
var u = e;
|
30560
|
-
|
30561
|
-
for (void 0 !== a ? u = e[a] = [] : a = "posthog", u.people = u.people || [], u.toString = function (t) {
|
30562
|
-
var e = "posthog";
|
30563
|
-
return "posthog" !== a && (e += "." + a), t || (e += " (stub)"), e;
|
30564
|
-
}, u.people.toString = function () {
|
30565
|
-
return u.toString(1) + ".people (stub)";
|
30566
|
-
}, o = "capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags".split(" "), n = 0; n < o.length; n++) {
|
30567
|
-
g(u, o[n]);
|
30568
|
-
}
|
30569
|
-
|
30570
|
-
e._i.push([i, s, a]);
|
30571
|
-
}, e.__SV = 1);
|
30572
|
-
}(document, window.posthog || []);
|
30573
|
-
var configObject = {
|
30574
|
-
api_host: this.yourInstance,
|
30575
|
-
autocapture: this.autocapture,
|
30576
|
-
capture_pageview: this.capturePageView,
|
30577
|
-
disable_session_recording: this.disableSessionRecording,
|
30578
|
-
property_blacklist: this.propertyBlackList,
|
30579
|
-
disable_cookie: this.disableCookie
|
30580
|
-
};
|
30581
|
-
|
30582
|
-
if (this.xhrHeaders && Object.keys(this.xhrHeaders).length > 0) {
|
30583
|
-
configObject.xhr_headers = this.xhrHeaders;
|
30584
|
-
}
|
30585
|
-
|
30586
|
-
posthog.init(this.teamApiKey, configObject);
|
30587
|
-
}
|
30588
|
-
/**
|
30589
|
-
* superproperties should be part of rudderelement.message.integrations.POSTHOG object.
|
30590
|
-
* Once we call the posthog.register api, the corresponding property will be sent along with subsequent capture calls.
|
30591
|
-
* To remove the superproperties, we call unregister api.
|
30592
|
-
*/
|
30593
|
-
|
30594
|
-
}, {
|
30595
|
-
key: "processSuperProperties",
|
30596
|
-
value: function processSuperProperties(rudderElement) {
|
30597
|
-
var integrations = rudderElement.message.integrations;
|
30598
|
-
|
30599
|
-
if (integrations && integrations.POSTHOG) {
|
30600
|
-
var _integrations$POSTHOG = integrations.POSTHOG,
|
30601
|
-
superProperties = _integrations$POSTHOG.superProperties,
|
30602
|
-
setOnceProperties = _integrations$POSTHOG.setOnceProperties,
|
30603
|
-
unsetProperties = _integrations$POSTHOG.unsetProperties;
|
30604
|
-
|
30605
|
-
if (superProperties && Object.keys(superProperties).length > 0) {
|
30606
|
-
posthog.register(superProperties);
|
30607
|
-
}
|
30608
|
-
|
30609
|
-
if (setOnceProperties && Object.keys(setOnceProperties).length > 0) {
|
30610
|
-
posthog.register_once(setOnceProperties);
|
30611
|
-
}
|
30612
|
-
|
30613
|
-
if (unsetProperties && unsetProperties.length > 0) {
|
30614
|
-
unsetProperties.forEach(function (property) {
|
30615
|
-
if (property && property.trim() != "") {
|
30616
|
-
posthog.unregister(property);
|
30617
|
-
}
|
30618
|
-
});
|
30619
|
-
}
|
30620
|
-
}
|
30621
|
-
}
|
30622
|
-
}, {
|
30623
|
-
key: "identify",
|
30624
|
-
value: function identify(rudderElement) {
|
30625
|
-
logger.debug("in Posthog identify"); // rudderElement.message.context will always be present as part of identify event payload.
|
30626
|
-
|
30627
|
-
var traits = rudderElement.message.context.traits;
|
30628
|
-
var userId = rudderElement.message.userId;
|
30629
|
-
|
30630
|
-
if (userId) {
|
30631
|
-
posthog.identify(userId, traits);
|
30632
|
-
}
|
30633
|
-
|
30634
|
-
this.processSuperProperties(rudderElement);
|
30635
|
-
}
|
30636
|
-
}, {
|
30637
|
-
key: "track",
|
30638
|
-
value: function track(rudderElement) {
|
30639
|
-
logger.debug("in Posthog track");
|
30640
|
-
var _rudderElement$messag = rudderElement.message,
|
30641
|
-
event = _rudderElement$messag.event,
|
30642
|
-
properties = _rudderElement$messag.properties;
|
30643
|
-
this.processSuperProperties(rudderElement);
|
30644
|
-
posthog.capture(event, properties);
|
30645
|
-
}
|
30646
|
-
/**
|
30647
|
-
*
|
30648
|
-
*
|
30649
|
-
* @memberof Posthog
|
30650
|
-
*/
|
30651
|
-
|
30652
|
-
}, {
|
30653
|
-
key: "page",
|
30654
|
-
value: function page(rudderElement) {
|
30655
|
-
logger.debug("in Posthog page");
|
30656
|
-
this.processSuperProperties(rudderElement);
|
30657
|
-
posthog.capture('$pageview');
|
30658
|
-
}
|
30659
|
-
}, {
|
30660
|
-
key: "isLoaded",
|
30661
|
-
value: function isLoaded() {
|
30662
|
-
logger.debug("in Posthog isLoaded");
|
30663
|
-
return !!(window.posthog && window.posthog.__loaded);
|
30664
|
-
}
|
30665
|
-
}, {
|
30666
|
-
key: "isReady",
|
30667
|
-
value: function isReady() {
|
30668
|
-
return !!(window.posthog && window.posthog.__loaded);
|
30669
|
-
}
|
30670
|
-
}]);
|
30671
|
-
|
30672
|
-
return Posthog;
|
30673
|
-
}();
|
30674
|
-
|
30675
|
-
var ProfitWell = /*#__PURE__*/function () {
|
30676
|
-
function ProfitWell(config) {
|
30677
|
-
_classCallCheck(this, ProfitWell);
|
30678
|
-
|
30679
|
-
this.publicApiKey = config.publicApiKey;
|
30680
|
-
this.siteType = config.siteType;
|
30681
|
-
this.name = "ProfitWell";
|
30682
|
-
}
|
30683
|
-
|
30684
|
-
_createClass(ProfitWell, [{
|
30685
|
-
key: "init",
|
30686
|
-
value: function init() {
|
30687
|
-
logger.debug("===In init ProfitWell===");
|
30688
|
-
|
30689
|
-
if (!this.publicApiKey) {
|
30690
|
-
logger.debug("===[ProfitWell]: Public API Key not found===");
|
30691
|
-
return;
|
30692
|
-
}
|
30693
|
-
|
30694
|
-
window.publicApiKey = this.publicApiKey;
|
30695
|
-
var scriptTag = document.createElement("script");
|
30696
|
-
scriptTag.setAttribute("id", "profitwell-js");
|
30697
|
-
scriptTag.setAttribute("data-pw-auth", window.publicApiKey);
|
30698
|
-
document.body.appendChild(scriptTag);
|
30699
|
-
|
30700
|
-
(function (i, s, o, g, r, a, m) {
|
30701
|
-
i[o] = i[o] || function () {
|
30702
|
-
(i[o].q = i[o].q || []).push(arguments);
|
30703
|
-
};
|
30704
|
-
|
30705
|
-
a = s.createElement(g);
|
30706
|
-
m = s.getElementsByTagName(g)[0];
|
30707
|
-
a.async = 1;
|
30708
|
-
a.src = r + "?auth=" + window.publicApiKey;
|
30709
|
-
m.parentNode.insertBefore(a, m);
|
30710
|
-
})(window, document, "profitwell", "script", "https://public.profitwell.com/js/profitwell.js");
|
30711
|
-
}
|
30712
|
-
}, {
|
30713
|
-
key: "isLoaded",
|
30714
|
-
value: function isLoaded() {
|
30715
|
-
logger.debug("===In isLoaded ProfitWell===");
|
30716
|
-
return !!(window.profitwell && window.profitwell.length !== 0);
|
30717
|
-
}
|
30718
|
-
}, {
|
30719
|
-
key: "isReady",
|
30720
|
-
value: function isReady() {
|
30721
|
-
logger.debug("===In isReady ProfitWell===");
|
30722
|
-
return !!(window.profitwell && window.profitwell.length !== 0);
|
30723
|
-
}
|
30724
|
-
}, {
|
30725
|
-
key: "identify",
|
30726
|
-
value: function identify(rudderElement) {
|
30727
|
-
logger.debug("===In ProfitWell identify===");
|
30728
|
-
|
30729
|
-
if (this.siteType === "marketing") {
|
30730
|
-
window.profitwell("start", {});
|
30731
|
-
return;
|
30732
|
-
}
|
30733
|
-
|
30734
|
-
var message = rudderElement.message;
|
30735
|
-
var email = getValue(message, "context.traits.email");
|
30736
|
-
|
30737
|
-
if (email) {
|
30738
|
-
window.profitwell("start", {
|
30739
|
-
user_email: email
|
30740
|
-
});
|
30741
|
-
return;
|
30742
|
-
}
|
30743
|
-
|
30744
|
-
var userId = getValue(message, "userId");
|
30745
|
-
|
30746
|
-
if (userId) {
|
30747
|
-
window.profitwell("start", {
|
30748
|
-
user_id: userId
|
30749
|
-
});
|
30750
|
-
return;
|
30751
|
-
}
|
30752
|
-
|
30753
|
-
logger.debug("===[ProfitWell]: email or userId is required for identify===");
|
30754
|
-
}
|
30755
|
-
}]);
|
30756
|
-
|
30757
|
-
return ProfitWell;
|
30758
|
-
}();
|
30759
|
-
|
30760
|
-
var Qualtrics = /*#__PURE__*/function () {
|
30761
|
-
function Qualtrics(config) {
|
30762
|
-
_classCallCheck(this, Qualtrics);
|
30763
|
-
|
30764
|
-
this.name = "Qualtrics";
|
30765
|
-
this.projectId = config.projectId;
|
30766
|
-
this.brandId = config.brandId;
|
30767
|
-
this.enableGenericPageTitle = config.enableGenericPageTitle;
|
30768
|
-
}
|
30769
|
-
|
30770
|
-
_createClass(Qualtrics, [{
|
30771
|
-
key: "init",
|
30772
|
-
value: function init() {
|
30773
|
-
logger.debug("===in init Qualtrics===");
|
30774
|
-
|
30775
|
-
if (!this.projectId) {
|
30776
|
-
logger.debug("Project ID missing");
|
30777
|
-
return;
|
30778
|
-
}
|
30779
|
-
|
30780
|
-
if (!this.brandId) {
|
30781
|
-
logger.debug("Brand ID missing");
|
30782
|
-
return;
|
30783
|
-
}
|
30784
|
-
|
30785
|
-
var projectIdFormatted = this.projectId.replace(/_/g, "").toLowerCase().trim();
|
30786
|
-
var requestUrlFormatted = "https://".concat(projectIdFormatted, "-").concat(this.brandId, ".siteintercept.qualtrics.com/SIE/?Q_ZID=").concat(this.projectId);
|
30787
|
-
var requestIdFormatted = "QSI_S_".concat(this.projectId);
|
30788
|
-
|
30789
|
-
(function () {
|
30790
|
-
var g = function g(e, h, f, _g) {
|
30791
|
-
this.get = function (a) {
|
30792
|
-
for (var a = a + "=", c = document.cookie.split(";"), b = 0, e = c.length; b < e; b++) {
|
30793
|
-
for (var d = c[b]; " " == d.charAt(0);) {
|
30794
|
-
d = d.substring(1, d.length);
|
30795
|
-
}
|
30796
|
-
|
30797
|
-
if (0 == d.indexOf(a)) return d.substring(a.length, d.length);
|
30798
|
-
}
|
30799
|
-
|
30800
|
-
return null;
|
30801
|
-
};
|
30802
|
-
|
30803
|
-
this.set = function (a, c) {
|
30804
|
-
var b = "",
|
30805
|
-
b = new Date();
|
30806
|
-
b.setTime(b.getTime() + 6048E5);
|
30807
|
-
b = "; expires=" + b.toGMTString();
|
30808
|
-
document.cookie = a + "=" + c + b + "; path=/; ";
|
30809
|
-
};
|
30810
|
-
|
30811
|
-
this.check = function () {
|
30812
|
-
var a = this.get(f);
|
30813
|
-
if (a) a = a.split(":");else if (100 != e) "v" == h && (e = Math.random() >= e / 100 ? 0 : 100), a = [h, e, 0], this.set(f, a.join(":"));else return !0;
|
30814
|
-
var c = a[1];
|
30815
|
-
if (100 == c) return !0;
|
30816
|
-
|
30817
|
-
switch (a[0]) {
|
30818
|
-
case "v":
|
30819
|
-
return !1;
|
30820
|
-
|
30821
|
-
case "r":
|
30822
|
-
return c = a[2] % Math.floor(100 / c), a[2]++, this.set(f, a.join(":")), !c;
|
30823
|
-
}
|
30824
|
-
|
30825
|
-
return !0;
|
30826
|
-
};
|
30827
|
-
|
30828
|
-
this.go = function () {
|
30829
|
-
if (this.check()) {
|
30830
|
-
var a = document.createElement("script");
|
30831
|
-
a.type = "text/javascript";
|
30832
|
-
a.src = _g;
|
30833
|
-
document.body && document.body.appendChild(a);
|
30834
|
-
}
|
30835
|
-
};
|
30836
|
-
|
30837
|
-
this.start = function () {
|
30838
|
-
var t = this;
|
30839
|
-
"complete" !== document.readyState ? window.addEventListener ? window.addEventListener("load", function () {
|
30840
|
-
t.go();
|
30841
|
-
}, !1) : window.attachEvent && window.attachEvent("onload", function () {
|
30842
|
-
t.go();
|
30843
|
-
}) : t.go();
|
30844
|
-
};
|
30845
|
-
};
|
30846
|
-
|
30847
|
-
try {
|
30848
|
-
new g(100, "r", requestIdFormatted, requestUrlFormatted).start();
|
30849
|
-
} catch (i) {}
|
30850
|
-
})();
|
30851
|
-
|
30852
|
-
var div = document.createElement("div");
|
30853
|
-
div.setAttribute("id", String(this.projectId));
|
30854
|
-
window._qsie = window._qsie || [];
|
30855
|
-
document.getElementsByTagName("head")[0].appendChild(div);
|
30856
|
-
}
|
30857
|
-
}, {
|
30858
|
-
key: "isLoaded",
|
30859
|
-
value: function isLoaded() {
|
30860
|
-
logger.debug("===in Qualtrics isLoaded===");
|
30861
|
-
return !!(window._qsie && window.QSI && window.QSI.API);
|
30862
|
-
}
|
30863
|
-
}, {
|
30864
|
-
key: "isReady",
|
30865
|
-
value: function isReady() {
|
30866
|
-
logger.debug("===in Qualtrics isReady===");
|
30867
|
-
return !!(window._qsie && window.QSI && window.QSI.API);
|
30868
|
-
}
|
30869
|
-
}, {
|
30870
|
-
key: "page",
|
30871
|
-
value: function page(rudderElement) {
|
30872
|
-
logger.debug("===in Qualtrics page===");
|
30873
|
-
var message = rudderElement.message;
|
30874
|
-
|
30875
|
-
if (!message) {
|
30876
|
-
logger.debug("Message field is missing");
|
30877
|
-
return;
|
30878
|
-
}
|
30879
|
-
|
30880
|
-
if (this.enableGenericPageTitle) {
|
30881
|
-
window._qsie.push("Viewed a Page");
|
30882
|
-
|
30883
|
-
return;
|
30884
|
-
}
|
30885
|
-
|
30886
|
-
var name = message.name,
|
30887
|
-
category = message.category,
|
30888
|
-
properties = message.properties;
|
30889
|
-
var categoryField = category || (properties && properties.category ? properties.category : null);
|
30890
|
-
|
30891
|
-
if (!categoryField && !name) {
|
30892
|
-
logger.debug("generic title is disabled and no name or category field found");
|
30893
|
-
return;
|
30894
|
-
}
|
30895
|
-
|
30896
|
-
var dynamicTitle = categoryField && name ? "Viewed ".concat(categoryField, " ").concat(name, " Page") : "Viewed ".concat(name, " Page");
|
30897
|
-
|
30898
|
-
window._qsie.push(dynamicTitle);
|
30899
|
-
}
|
30900
|
-
}, {
|
30901
|
-
key: "track",
|
30902
|
-
value: function track(rudderElement) {
|
30903
|
-
logger.debug("===in Qualtrics track===");
|
30904
|
-
var message = rudderElement.message;
|
30905
|
-
|
30906
|
-
if (!message) {
|
30907
|
-
logger.debug("Message field is missing");
|
30908
|
-
return;
|
30909
|
-
}
|
30910
|
-
|
30911
|
-
if (!message.event) {
|
30912
|
-
logger.debug("Event field is undefined");
|
30913
|
-
return;
|
30914
|
-
}
|
30915
|
-
|
30916
|
-
window._qsie.push(message.event);
|
30917
|
-
}
|
30918
|
-
}]);
|
30919
|
-
|
30920
|
-
return Qualtrics;
|
30921
|
-
}();
|
30922
|
-
|
30923
32393
|
var QuantumMetric = /*#__PURE__*/function () {
|
30924
32394
|
function QuantumMetric(config) {
|
30925
32395
|
_classCallCheck(this, QuantumMetric);
|
@@ -30979,6 +32449,418 @@
|
|
30979
32449
|
return QuantumMetric;
|
30980
32450
|
}();
|
30981
32451
|
|
32452
|
+
var Posthog = /*#__PURE__*/function () {
|
32453
|
+
function Posthog(config, analytics) {
|
32454
|
+
var _this = this;
|
32455
|
+
|
32456
|
+
_classCallCheck(this, Posthog);
|
32457
|
+
|
32458
|
+
this.name = "POSTHOG";
|
32459
|
+
this.analytics = analytics;
|
32460
|
+
this.teamApiKey = config.teamApiKey;
|
32461
|
+
this.yourInstance = removeTrailingSlashes(config.yourInstance) || "https://app.posthog.com";
|
32462
|
+
this.autocapture = config.autocapture || false;
|
32463
|
+
this.capturePageView = config.capturePageView || false;
|
32464
|
+
this.disableSessionRecording = config.disableSessionRecording || false;
|
32465
|
+
this.disableCookie = config.disableCookie || false;
|
32466
|
+
this.propertyBlackList = [];
|
32467
|
+
this.xhrHeaders = {};
|
32468
|
+
|
32469
|
+
if (config.xhrHeaders && config.xhrHeaders.length > 0) {
|
32470
|
+
config.xhrHeaders.forEach(function (header) {
|
32471
|
+
if (header && header.key && header.value && header.key.trim() != "" && header.value.trim() != "") {
|
32472
|
+
_this.xhrHeaders[header.key] = header.value;
|
32473
|
+
}
|
32474
|
+
});
|
32475
|
+
}
|
32476
|
+
|
32477
|
+
if (config.propertyBlackList && config.propertyBlackList.length > 0) {
|
32478
|
+
config.propertyBlackList.forEach(function (element) {
|
32479
|
+
if (element && element.property && element.property.trim() != "") {
|
32480
|
+
_this.propertyBlackList.push(element.property);
|
32481
|
+
}
|
32482
|
+
});
|
32483
|
+
}
|
32484
|
+
}
|
32485
|
+
|
32486
|
+
_createClass(Posthog, [{
|
32487
|
+
key: "init",
|
32488
|
+
value: function init() {
|
32489
|
+
!function (t, e) {
|
32490
|
+
var o, n, p, r;
|
32491
|
+
e.__SV || (window.posthog = e, e._i = [], e.init = function (i, s, a) {
|
32492
|
+
function g(t, e) {
|
32493
|
+
var o = e.split(".");
|
32494
|
+
2 == o.length && (t = t[o[0]], e = o[1]), t[e] = function () {
|
32495
|
+
t.push([e].concat(Array.prototype.slice.call(arguments, 0)));
|
32496
|
+
};
|
32497
|
+
}
|
32498
|
+
|
32499
|
+
(p = t.createElement("script")).type = "text/javascript", p.async = !0, p.src = s.api_host + "/static/array.js", (r = t.getElementsByTagName("script")[0]).parentNode.insertBefore(p, r);
|
32500
|
+
var u = e;
|
32501
|
+
|
32502
|
+
for (void 0 !== a ? u = e[a] = [] : a = "posthog", u.people = u.people || [], u.toString = function (t) {
|
32503
|
+
var e = "posthog";
|
32504
|
+
return "posthog" !== a && (e += "." + a), t || (e += " (stub)"), e;
|
32505
|
+
}, u.people.toString = function () {
|
32506
|
+
return u.toString(1) + ".people (stub)";
|
32507
|
+
}, o = "capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags".split(" "), n = 0; n < o.length; n++) {
|
32508
|
+
g(u, o[n]);
|
32509
|
+
}
|
32510
|
+
|
32511
|
+
e._i.push([i, s, a]);
|
32512
|
+
}, e.__SV = 1);
|
32513
|
+
}(document, window.posthog || []);
|
32514
|
+
var configObject = {
|
32515
|
+
api_host: this.yourInstance,
|
32516
|
+
autocapture: this.autocapture,
|
32517
|
+
capture_pageview: this.capturePageView,
|
32518
|
+
disable_session_recording: this.disableSessionRecording,
|
32519
|
+
property_blacklist: this.propertyBlackList,
|
32520
|
+
disable_cookie: this.disableCookie
|
32521
|
+
};
|
32522
|
+
|
32523
|
+
if (this.xhrHeaders && Object.keys(this.xhrHeaders).length > 0) {
|
32524
|
+
configObject.xhr_headers = this.xhrHeaders;
|
32525
|
+
}
|
32526
|
+
|
32527
|
+
posthog.init(this.teamApiKey, configObject);
|
32528
|
+
}
|
32529
|
+
/**
|
32530
|
+
* superproperties should be part of rudderelement.message.integrations.POSTHOG object.
|
32531
|
+
* Once we call the posthog.register api, the corresponding property will be sent along with subsequent capture calls.
|
32532
|
+
* To remove the superproperties, we call unregister api.
|
32533
|
+
*/
|
32534
|
+
|
32535
|
+
}, {
|
32536
|
+
key: "processSuperProperties",
|
32537
|
+
value: function processSuperProperties(rudderElement) {
|
32538
|
+
var integrations = rudderElement.message.integrations;
|
32539
|
+
|
32540
|
+
if (integrations && integrations.POSTHOG) {
|
32541
|
+
var _integrations$POSTHOG = integrations.POSTHOG,
|
32542
|
+
superProperties = _integrations$POSTHOG.superProperties,
|
32543
|
+
setOnceProperties = _integrations$POSTHOG.setOnceProperties,
|
32544
|
+
unsetProperties = _integrations$POSTHOG.unsetProperties;
|
32545
|
+
|
32546
|
+
if (superProperties && Object.keys(superProperties).length > 0) {
|
32547
|
+
posthog.register(superProperties);
|
32548
|
+
}
|
32549
|
+
|
32550
|
+
if (setOnceProperties && Object.keys(setOnceProperties).length > 0) {
|
32551
|
+
posthog.register_once(setOnceProperties);
|
32552
|
+
}
|
32553
|
+
|
32554
|
+
if (unsetProperties && unsetProperties.length > 0) {
|
32555
|
+
unsetProperties.forEach(function (property) {
|
32556
|
+
if (property && property.trim() != "") {
|
32557
|
+
posthog.unregister(property);
|
32558
|
+
}
|
32559
|
+
});
|
32560
|
+
}
|
32561
|
+
}
|
32562
|
+
}
|
32563
|
+
}, {
|
32564
|
+
key: "identify",
|
32565
|
+
value: function identify(rudderElement) {
|
32566
|
+
logger.debug("in Posthog identify"); // rudderElement.message.context will always be present as part of identify event payload.
|
32567
|
+
|
32568
|
+
var traits = rudderElement.message.context.traits;
|
32569
|
+
var userId = rudderElement.message.userId;
|
32570
|
+
|
32571
|
+
if (userId) {
|
32572
|
+
posthog.identify(userId, traits);
|
32573
|
+
}
|
32574
|
+
|
32575
|
+
this.processSuperProperties(rudderElement);
|
32576
|
+
}
|
32577
|
+
}, {
|
32578
|
+
key: "track",
|
32579
|
+
value: function track(rudderElement) {
|
32580
|
+
logger.debug("in Posthog track");
|
32581
|
+
var _rudderElement$messag = rudderElement.message,
|
32582
|
+
event = _rudderElement$messag.event,
|
32583
|
+
properties = _rudderElement$messag.properties;
|
32584
|
+
this.processSuperProperties(rudderElement);
|
32585
|
+
posthog.capture(event, properties);
|
32586
|
+
}
|
32587
|
+
/**
|
32588
|
+
*
|
32589
|
+
*
|
32590
|
+
* @memberof Posthog
|
32591
|
+
*/
|
32592
|
+
|
32593
|
+
}, {
|
32594
|
+
key: "page",
|
32595
|
+
value: function page(rudderElement) {
|
32596
|
+
logger.debug("in Posthog page");
|
32597
|
+
this.processSuperProperties(rudderElement);
|
32598
|
+
posthog.capture('$pageview');
|
32599
|
+
}
|
32600
|
+
}, {
|
32601
|
+
key: "isLoaded",
|
32602
|
+
value: function isLoaded() {
|
32603
|
+
logger.debug("in Posthog isLoaded");
|
32604
|
+
return !!(window.posthog && window.posthog.__loaded);
|
32605
|
+
}
|
32606
|
+
}, {
|
32607
|
+
key: "isReady",
|
32608
|
+
value: function isReady() {
|
32609
|
+
return !!(window.posthog && window.posthog.__loaded);
|
32610
|
+
}
|
32611
|
+
}]);
|
32612
|
+
|
32613
|
+
return Posthog;
|
32614
|
+
}();
|
32615
|
+
|
32616
|
+
var ProfitWell = /*#__PURE__*/function () {
|
32617
|
+
function ProfitWell(config) {
|
32618
|
+
_classCallCheck(this, ProfitWell);
|
32619
|
+
|
32620
|
+
this.publicApiKey = config.publicApiKey;
|
32621
|
+
this.siteType = config.siteType;
|
32622
|
+
this.name = "ProfitWell";
|
32623
|
+
}
|
32624
|
+
|
32625
|
+
_createClass(ProfitWell, [{
|
32626
|
+
key: "init",
|
32627
|
+
value: function init() {
|
32628
|
+
logger.debug("===In init ProfitWell===");
|
32629
|
+
|
32630
|
+
if (!this.publicApiKey) {
|
32631
|
+
logger.debug("===[ProfitWell]: Public API Key not found===");
|
32632
|
+
return;
|
32633
|
+
}
|
32634
|
+
|
32635
|
+
window.publicApiKey = this.publicApiKey;
|
32636
|
+
var scriptTag = document.createElement("script");
|
32637
|
+
scriptTag.setAttribute("id", "profitwell-js");
|
32638
|
+
scriptTag.setAttribute("data-pw-auth", window.publicApiKey);
|
32639
|
+
document.body.appendChild(scriptTag);
|
32640
|
+
|
32641
|
+
(function (i, s, o, g, r, a, m) {
|
32642
|
+
i[o] = i[o] || function () {
|
32643
|
+
(i[o].q = i[o].q || []).push(arguments);
|
32644
|
+
};
|
32645
|
+
|
32646
|
+
a = s.createElement(g);
|
32647
|
+
m = s.getElementsByTagName(g)[0];
|
32648
|
+
a.async = 1;
|
32649
|
+
a.src = r + "?auth=" + window.publicApiKey;
|
32650
|
+
m.parentNode.insertBefore(a, m);
|
32651
|
+
})(window, document, "profitwell", "script", "https://public.profitwell.com/js/profitwell.js");
|
32652
|
+
}
|
32653
|
+
}, {
|
32654
|
+
key: "isLoaded",
|
32655
|
+
value: function isLoaded() {
|
32656
|
+
logger.debug("===In isLoaded ProfitWell===");
|
32657
|
+
return !!(window.profitwell && window.profitwell.length !== 0);
|
32658
|
+
}
|
32659
|
+
}, {
|
32660
|
+
key: "isReady",
|
32661
|
+
value: function isReady() {
|
32662
|
+
logger.debug("===In isReady ProfitWell===");
|
32663
|
+
return !!(window.profitwell && window.profitwell.length !== 0);
|
32664
|
+
}
|
32665
|
+
}, {
|
32666
|
+
key: "identify",
|
32667
|
+
value: function identify(rudderElement) {
|
32668
|
+
logger.debug("===In ProfitWell identify===");
|
32669
|
+
|
32670
|
+
if (this.siteType === "marketing") {
|
32671
|
+
window.profitwell("start", {});
|
32672
|
+
return;
|
32673
|
+
}
|
32674
|
+
|
32675
|
+
var message = rudderElement.message;
|
32676
|
+
var email = getValue(message, "context.traits.email");
|
32677
|
+
|
32678
|
+
if (email) {
|
32679
|
+
window.profitwell("start", {
|
32680
|
+
user_email: email
|
32681
|
+
});
|
32682
|
+
return;
|
32683
|
+
}
|
32684
|
+
|
32685
|
+
var userId = getValue(message, "userId");
|
32686
|
+
|
32687
|
+
if (userId) {
|
32688
|
+
window.profitwell("start", {
|
32689
|
+
user_id: userId
|
32690
|
+
});
|
32691
|
+
return;
|
32692
|
+
}
|
32693
|
+
|
32694
|
+
logger.debug("===[ProfitWell]: email or userId is required for identify===");
|
32695
|
+
}
|
32696
|
+
}]);
|
32697
|
+
|
32698
|
+
return ProfitWell;
|
32699
|
+
}();
|
32700
|
+
|
32701
|
+
var Qualtrics = /*#__PURE__*/function () {
|
32702
|
+
function Qualtrics(config) {
|
32703
|
+
_classCallCheck(this, Qualtrics);
|
32704
|
+
|
32705
|
+
this.name = "Qualtrics";
|
32706
|
+
this.projectId = config.projectId;
|
32707
|
+
this.brandId = config.brandId;
|
32708
|
+
this.enableGenericPageTitle = config.enableGenericPageTitle;
|
32709
|
+
}
|
32710
|
+
|
32711
|
+
_createClass(Qualtrics, [{
|
32712
|
+
key: "init",
|
32713
|
+
value: function init() {
|
32714
|
+
logger.debug("===in init Qualtrics===");
|
32715
|
+
|
32716
|
+
if (!this.projectId) {
|
32717
|
+
logger.debug("Project ID missing");
|
32718
|
+
return;
|
32719
|
+
}
|
32720
|
+
|
32721
|
+
if (!this.brandId) {
|
32722
|
+
logger.debug("Brand ID missing");
|
32723
|
+
return;
|
32724
|
+
}
|
32725
|
+
|
32726
|
+
var projectIdFormatted = this.projectId.replace(/_/g, "").toLowerCase().trim();
|
32727
|
+
var requestUrlFormatted = "https://".concat(projectIdFormatted, "-").concat(this.brandId, ".siteintercept.qualtrics.com/SIE/?Q_ZID=").concat(this.projectId);
|
32728
|
+
var requestIdFormatted = "QSI_S_".concat(this.projectId);
|
32729
|
+
|
32730
|
+
(function () {
|
32731
|
+
var g = function g(e, h, f, _g) {
|
32732
|
+
this.get = function (a) {
|
32733
|
+
for (var a = a + "=", c = document.cookie.split(";"), b = 0, e = c.length; b < e; b++) {
|
32734
|
+
for (var d = c[b]; " " == d.charAt(0);) {
|
32735
|
+
d = d.substring(1, d.length);
|
32736
|
+
}
|
32737
|
+
|
32738
|
+
if (0 == d.indexOf(a)) return d.substring(a.length, d.length);
|
32739
|
+
}
|
32740
|
+
|
32741
|
+
return null;
|
32742
|
+
};
|
32743
|
+
|
32744
|
+
this.set = function (a, c) {
|
32745
|
+
var b = "",
|
32746
|
+
b = new Date();
|
32747
|
+
b.setTime(b.getTime() + 6048E5);
|
32748
|
+
b = "; expires=" + b.toGMTString();
|
32749
|
+
document.cookie = a + "=" + c + b + "; path=/; ";
|
32750
|
+
};
|
32751
|
+
|
32752
|
+
this.check = function () {
|
32753
|
+
var a = this.get(f);
|
32754
|
+
if (a) a = a.split(":");else if (100 != e) "v" == h && (e = Math.random() >= e / 100 ? 0 : 100), a = [h, e, 0], this.set(f, a.join(":"));else return !0;
|
32755
|
+
var c = a[1];
|
32756
|
+
if (100 == c) return !0;
|
32757
|
+
|
32758
|
+
switch (a[0]) {
|
32759
|
+
case "v":
|
32760
|
+
return !1;
|
32761
|
+
|
32762
|
+
case "r":
|
32763
|
+
return c = a[2] % Math.floor(100 / c), a[2]++, this.set(f, a.join(":")), !c;
|
32764
|
+
}
|
32765
|
+
|
32766
|
+
return !0;
|
32767
|
+
};
|
32768
|
+
|
32769
|
+
this.go = function () {
|
32770
|
+
if (this.check()) {
|
32771
|
+
var a = document.createElement("script");
|
32772
|
+
a.type = "text/javascript";
|
32773
|
+
a.src = _g;
|
32774
|
+
document.body && document.body.appendChild(a);
|
32775
|
+
}
|
32776
|
+
};
|
32777
|
+
|
32778
|
+
this.start = function () {
|
32779
|
+
var t = this;
|
32780
|
+
"complete" !== document.readyState ? window.addEventListener ? window.addEventListener("load", function () {
|
32781
|
+
t.go();
|
32782
|
+
}, !1) : window.attachEvent && window.attachEvent("onload", function () {
|
32783
|
+
t.go();
|
32784
|
+
}) : t.go();
|
32785
|
+
};
|
32786
|
+
};
|
32787
|
+
|
32788
|
+
try {
|
32789
|
+
new g(100, "r", requestIdFormatted, requestUrlFormatted).start();
|
32790
|
+
} catch (i) {}
|
32791
|
+
})();
|
32792
|
+
|
32793
|
+
var div = document.createElement("div");
|
32794
|
+
div.setAttribute("id", String(this.projectId));
|
32795
|
+
window._qsie = window._qsie || [];
|
32796
|
+
document.getElementsByTagName("head")[0].appendChild(div);
|
32797
|
+
}
|
32798
|
+
}, {
|
32799
|
+
key: "isLoaded",
|
32800
|
+
value: function isLoaded() {
|
32801
|
+
logger.debug("===in Qualtrics isLoaded===");
|
32802
|
+
return !!(window._qsie && window.QSI && window.QSI.API);
|
32803
|
+
}
|
32804
|
+
}, {
|
32805
|
+
key: "isReady",
|
32806
|
+
value: function isReady() {
|
32807
|
+
logger.debug("===in Qualtrics isReady===");
|
32808
|
+
return !!(window._qsie && window.QSI && window.QSI.API);
|
32809
|
+
}
|
32810
|
+
}, {
|
32811
|
+
key: "page",
|
32812
|
+
value: function page(rudderElement) {
|
32813
|
+
logger.debug("===in Qualtrics page===");
|
32814
|
+
var message = rudderElement.message;
|
32815
|
+
|
32816
|
+
if (!message) {
|
32817
|
+
logger.debug("Message field is missing");
|
32818
|
+
return;
|
32819
|
+
}
|
32820
|
+
|
32821
|
+
if (this.enableGenericPageTitle) {
|
32822
|
+
window._qsie.push("Viewed a Page");
|
32823
|
+
|
32824
|
+
return;
|
32825
|
+
}
|
32826
|
+
|
32827
|
+
var name = message.name,
|
32828
|
+
category = message.category,
|
32829
|
+
properties = message.properties;
|
32830
|
+
var categoryField = category || (properties && properties.category ? properties.category : null);
|
32831
|
+
|
32832
|
+
if (!categoryField && !name) {
|
32833
|
+
logger.debug("generic title is disabled and no name or category field found");
|
32834
|
+
return;
|
32835
|
+
}
|
32836
|
+
|
32837
|
+
var dynamicTitle = categoryField && name ? "Viewed ".concat(categoryField, " ").concat(name, " Page") : "Viewed ".concat(name, " Page");
|
32838
|
+
|
32839
|
+
window._qsie.push(dynamicTitle);
|
32840
|
+
}
|
32841
|
+
}, {
|
32842
|
+
key: "track",
|
32843
|
+
value: function track(rudderElement) {
|
32844
|
+
logger.debug("===in Qualtrics track===");
|
32845
|
+
var message = rudderElement.message;
|
32846
|
+
|
32847
|
+
if (!message) {
|
32848
|
+
logger.debug("Message field is missing");
|
32849
|
+
return;
|
32850
|
+
}
|
32851
|
+
|
32852
|
+
if (!message.event) {
|
32853
|
+
logger.debug("Event field is undefined");
|
32854
|
+
return;
|
32855
|
+
}
|
32856
|
+
|
32857
|
+
window._qsie.push(message.event);
|
32858
|
+
}
|
32859
|
+
}]);
|
32860
|
+
|
32861
|
+
return Qualtrics;
|
32862
|
+
}();
|
32863
|
+
|
30982
32864
|
var RedditPixel = /*#__PURE__*/function () {
|
30983
32865
|
function RedditPixel(config) {
|
30984
32866
|
_classCallCheck(this, RedditPixel);
|
@@ -31195,13 +33077,15 @@
|
|
31195
33077
|
|
31196
33078
|
SentryScriptLoader("sentry", "https://browser.sentry-cdn.com/6.13.1/bundle.min.js", "sha384-vUP3nL55ipf9vVr3gDgKyDuYwcwOC8nZGAksntVhezPcr2QXl1Ls81oolaVSkPm+");
|
31197
33079
|
SentryScriptLoader("plugin", "https://browser.sentry-cdn.com/6.13.1/rewriteframes.min.js", "sha384-WOm9k3kzVt1COFAB/zCXOFx4lDMtJh/2vmEizIwgog7OW0P/dPwl3s8f6MdwrD7q");
|
31198
|
-
}
|
33080
|
+
} // eslint-disable-next-line class-methods-use-this
|
33081
|
+
|
31199
33082
|
}, {
|
31200
33083
|
key: "isLoaded",
|
31201
33084
|
value: function isLoaded() {
|
31202
33085
|
logger.debug("===in Sentry isLoaded===");
|
31203
33086
|
return !!(window.Sentry && isObject$2(window.Sentry) && window.Sentry.setUser && window.Sentry.Integrations.RewriteFrames);
|
31204
|
-
}
|
33087
|
+
} // eslint-disable-next-line class-methods-use-this
|
33088
|
+
|
31205
33089
|
}, {
|
31206
33090
|
key: "isReady",
|
31207
33091
|
value: function isReady() {
|
@@ -31228,12 +33112,14 @@
|
|
31228
33112
|
|
31229
33113
|
var _getDefinedTraits = getDefinedTraits(message),
|
31230
33114
|
email = _getDefinedTraits.email,
|
31231
|
-
name = _getDefinedTraits.name;
|
33115
|
+
name = _getDefinedTraits.name; // userId sent as id and username sent as name
|
33116
|
+
|
31232
33117
|
|
31233
33118
|
var userId = getValue(message, "userId");
|
31234
33119
|
var ipAddress = getValue(message, "context.traits.ip_address");
|
31235
33120
|
|
31236
33121
|
if (!userId && !email && !name && !ipAddress) {
|
33122
|
+
// if no user identification property is present the event will be dropped
|
31237
33123
|
logger.debug("===[Sentry]: Any one of userId, email, name and ip_address is mandatory===");
|
31238
33124
|
return;
|
31239
33125
|
}
|
@@ -31908,10 +33794,10 @@
|
|
31908
33794
|
OPTIMIZELY: Optimizely,
|
31909
33795
|
PENDO: Pendo,
|
31910
33796
|
PINTEREST_TAG: PinterestTag,
|
33797
|
+
QUANTUMMETRIC: QuantumMetric,
|
31911
33798
|
POSTHOG: Posthog,
|
31912
33799
|
PROFITWELL: ProfitWell,
|
31913
33800
|
QUALTRICS: Qualtrics,
|
31914
|
-
QUANTUMMETRIC: QuantumMetric,
|
31915
33801
|
REDDIT_PIXEL: RedditPixel,
|
31916
33802
|
SENTRY: Sentry,
|
31917
33803
|
SNAP_PIXEL: SnapPixel,
|
@@ -31926,7 +33812,7 @@
|
|
31926
33812
|
this.build = "1.0.0";
|
31927
33813
|
this.name = "RudderLabs JavaScript SDK";
|
31928
33814
|
this.namespace = "com.rudderlabs.javascript";
|
31929
|
-
this.version = "1.
|
33815
|
+
this.version = "1.2.4";
|
31930
33816
|
};
|
31931
33817
|
|
31932
33818
|
// Library information class
|
@@ -31934,7 +33820,7 @@
|
|
31934
33820
|
_classCallCheck(this, RudderLibraryInfo);
|
31935
33821
|
|
31936
33822
|
this.name = "RudderLabs JavaScript SDK";
|
31937
|
-
this.version = "1.
|
33823
|
+
this.version = "1.2.4";
|
31938
33824
|
}; // Operating System information class
|
31939
33825
|
|
31940
33826
|
|
@@ -34689,7 +36575,9 @@
|
|
34689
36575
|
if (succesfulLoadedIntersectClientSuppliedIntegrations[i][methodName]) {
|
34690
36576
|
var _succesfulLoadedInter;
|
34691
36577
|
|
34692
|
-
|
36578
|
+
var clonedBufferEvent = lodash_clonedeep(event);
|
36579
|
+
|
36580
|
+
(_succesfulLoadedInter = succesfulLoadedIntersectClientSuppliedIntegrations[i])[methodName].apply(_succesfulLoadedInter, _toConsumableArray(clonedBufferEvent));
|
34693
36581
|
}
|
34694
36582
|
}
|
34695
36583
|
} catch (error) {
|
@@ -35049,7 +36937,8 @@
|
|
35049
36937
|
succesfulLoadedIntersectClientSuppliedIntegrations.forEach(function (obj) {
|
35050
36938
|
if (!obj.isFailed || !obj.isFailed()) {
|
35051
36939
|
if (obj[type]) {
|
35052
|
-
|
36940
|
+
var clonedRudderElement = lodash_clonedeep(rudderElement);
|
36941
|
+
obj[type](clonedRudderElement);
|
35053
36942
|
}
|
35054
36943
|
}
|
35055
36944
|
});
|
@@ -35354,7 +37243,7 @@
|
|
35354
37243
|
if (res instanceof Promise) {
|
35355
37244
|
res.then(function (res) {
|
35356
37245
|
return _this3.processResponse(200, res);
|
35357
|
-
})
|
37246
|
+
}).catch(errorHandler);
|
35358
37247
|
} else {
|
35359
37248
|
this.processResponse(200, res);
|
35360
37249
|
}
|