@ninetailed/experience.js 5.0.0-beta.2 → 6.0.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +305 -183
- package/index.d.ts +4 -0
- package/index.js +301 -180
- package/lib/ElementSeenObserver.d.ts +16 -0
- package/lib/Ninetailed.d.ts +21 -3
- package/lib/analytics/constants.d.ts +0 -1
- package/lib/analytics/index.d.ts +1 -0
- package/lib/constants.d.ts +2 -1
- package/lib/experience/index.d.ts +1 -1
- package/lib/experience/makeExperienceSelectMiddleware.d.ts +3 -2
- package/lib/guards/acceptsCredentials.d.ts +2 -0
- package/lib/guards/isInterestedInHiddenPage.d.ts +2 -0
- package/lib/guards/isInterestedInSeenElements.d.ts +2 -0
- package/lib/types/Credentials.d.ts +4 -0
- package/lib/types/ElementSeenPayload.d.ts +82 -0
- package/lib/types/NinetailedPlugin.d.ts +9 -0
- package/lib/types/ProfileChangedPayload.d.ts +4 -0
- package/lib/types/TrackingProperties.d.ts +4 -83
- package/lib/types/index.d.ts +14 -8
- package/lib/types/interfaces/AcceptsCredentials.d.ts +4 -0
- package/lib/types/interfaces/HasExperienceSelectionMiddleware.d.ts +2 -1
- package/lib/types/interfaces/InterestedInHiddenPage.d.ts +5 -0
- package/lib/types/interfaces/InterestedInProfileChange.d.ts +6 -0
- package/lib/types/interfaces/InterestedInSeenElements.d.ts +6 -0
- package/package.json +2 -2
package/index.cjs
CHANGED
|
@@ -10,8 +10,9 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
|
|
11
11
|
var Analytics__default = /*#__PURE__*/_interopDefaultLegacy(Analytics);
|
|
12
12
|
|
|
13
|
-
const HAS_SEEN_EXPERIENCE = 'has_seen_experience';
|
|
14
13
|
const HAS_SEEN_COMPONENT = 'has_seen_component';
|
|
14
|
+
const HAS_SEEN_ELEMENT = 'has_seen_element';
|
|
15
|
+
const PAGE_HIDDEN = 'page_hidden';
|
|
15
16
|
|
|
16
17
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
17
18
|
|
|
@@ -609,9 +610,9 @@ var inspectSource$3 = store$1.inspectSource;
|
|
|
609
610
|
var global$d = global$k;
|
|
610
611
|
var isCallable$d = isCallable$k;
|
|
611
612
|
|
|
612
|
-
var WeakMap$
|
|
613
|
+
var WeakMap$2 = global$d.WeakMap;
|
|
613
614
|
|
|
614
|
-
var weakMapBasicDetection = isCallable$d(WeakMap$
|
|
615
|
+
var weakMapBasicDetection = isCallable$d(WeakMap$2) && /native code/.test(String(WeakMap$2));
|
|
615
616
|
|
|
616
617
|
var shared$1 = shared$3.exports;
|
|
617
618
|
var uid = uid$2;
|
|
@@ -635,7 +636,7 @@ var hiddenKeys$3 = hiddenKeys$4;
|
|
|
635
636
|
|
|
636
637
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
637
638
|
var TypeError$2 = global$c.TypeError;
|
|
638
|
-
var WeakMap = global$c.WeakMap;
|
|
639
|
+
var WeakMap$1 = global$c.WeakMap;
|
|
639
640
|
var set$1, get, has;
|
|
640
641
|
|
|
641
642
|
var enforce = function (it) {
|
|
@@ -652,7 +653,7 @@ var getterFor = function (TYPE) {
|
|
|
652
653
|
};
|
|
653
654
|
|
|
654
655
|
if (NATIVE_WEAK_MAP || shared.state) {
|
|
655
|
-
var store = shared.state || (shared.state = new WeakMap());
|
|
656
|
+
var store = shared.state || (shared.state = new WeakMap$1());
|
|
656
657
|
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
657
658
|
store.get = store.get;
|
|
658
659
|
store.has = store.has;
|
|
@@ -2524,6 +2525,18 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
2524
2525
|
PERFORMANCE OF THIS SOFTWARE.
|
|
2525
2526
|
***************************************************************************** */
|
|
2526
2527
|
|
|
2528
|
+
function __rest(s, e) {
|
|
2529
|
+
var t = {};
|
|
2530
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2531
|
+
t[p] = s[p];
|
|
2532
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
2533
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
2534
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
2535
|
+
t[p[i]] = s[p[i]];
|
|
2536
|
+
}
|
|
2537
|
+
return t;
|
|
2538
|
+
}
|
|
2539
|
+
|
|
2527
2540
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
2528
2541
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2529
2542
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -2579,7 +2592,6 @@ const LEGACY_ANONYMOUS_ID = '__anon_id';
|
|
|
2579
2592
|
const ANONYMOUS_ID = '__nt_anonymous_id__';
|
|
2580
2593
|
const DEBUG_FLAG = '__nt_debug__';
|
|
2581
2594
|
const PROFILE_FALLBACK_CACHE = '__nt_profile__';
|
|
2582
|
-
const EXPERIENCES_FALLBACK_CACHE = '__nt_experiences__';
|
|
2583
2595
|
const PROFILE_CHANGE = 'profile-change';
|
|
2584
2596
|
const PROFILE_RESET = 'profile-reset';
|
|
2585
2597
|
const CONSENT = '__nt-consent__';
|
|
@@ -2608,10 +2620,7 @@ const ninetailedPlugin = ({
|
|
|
2608
2620
|
}
|
|
2609
2621
|
try {
|
|
2610
2622
|
const anonymousId = _instance.storage.getItem(ANONYMOUS_ID);
|
|
2611
|
-
const {
|
|
2612
|
-
profile,
|
|
2613
|
-
experiences
|
|
2614
|
-
} = yield apiClient.upsertProfile({
|
|
2623
|
+
const profile = yield apiClient.upsertProfile({
|
|
2615
2624
|
profileId: anonymousId,
|
|
2616
2625
|
events
|
|
2617
2626
|
}, {
|
|
@@ -2620,13 +2629,10 @@ const ninetailedPlugin = ({
|
|
|
2620
2629
|
});
|
|
2621
2630
|
_instance.storage.setItem(ANONYMOUS_ID, profile.id);
|
|
2622
2631
|
_instance.storage.setItem(PROFILE_FALLBACK_CACHE, profile);
|
|
2623
|
-
_instance.storage.setItem(EXPERIENCES_FALLBACK_CACHE, experiences);
|
|
2624
2632
|
experience_jsShared.logger.debug('Profile from api: ', profile);
|
|
2625
|
-
experience_jsShared.logger.debug('Experiences from api: ', experiences);
|
|
2626
2633
|
_instance.dispatch({
|
|
2627
2634
|
type: PROFILE_CHANGE,
|
|
2628
|
-
profile
|
|
2629
|
-
experiences
|
|
2635
|
+
profile
|
|
2630
2636
|
});
|
|
2631
2637
|
yield delay(20);
|
|
2632
2638
|
return {
|
|
@@ -2635,27 +2641,27 @@ const ninetailedPlugin = ({
|
|
|
2635
2641
|
} catch (error) {
|
|
2636
2642
|
experience_jsShared.logger.debug('An error occurred during flushing the events: ', error);
|
|
2637
2643
|
const fallbackProfile = _instance.storage.getItem(PROFILE_FALLBACK_CACHE);
|
|
2638
|
-
const fallbackExperiences = _instance.storage.getItem(EXPERIENCES_FALLBACK_CACHE) || [];
|
|
2639
2644
|
if (fallbackProfile) {
|
|
2640
2645
|
experience_jsShared.logger.debug('Found a fallback profile - will use this.');
|
|
2641
2646
|
_instance.dispatch({
|
|
2642
2647
|
type: PROFILE_CHANGE,
|
|
2643
|
-
profile: fallbackProfile
|
|
2644
|
-
experiences: fallbackExperiences
|
|
2648
|
+
profile: fallbackProfile
|
|
2645
2649
|
});
|
|
2650
|
+
return {
|
|
2651
|
+
success: false
|
|
2652
|
+
};
|
|
2646
2653
|
} else {
|
|
2647
2654
|
experience_jsShared.logger.debug('No fallback profile found - setting profile to null.');
|
|
2648
2655
|
_instance.dispatch({
|
|
2649
2656
|
type: PROFILE_CHANGE,
|
|
2650
2657
|
// TODO is it a good idea to set the profile to null?
|
|
2651
2658
|
profile: null,
|
|
2652
|
-
experiences: fallbackExperiences,
|
|
2653
2659
|
error
|
|
2654
2660
|
});
|
|
2661
|
+
return {
|
|
2662
|
+
success: false
|
|
2663
|
+
};
|
|
2655
2664
|
}
|
|
2656
|
-
return {
|
|
2657
|
-
success: false
|
|
2658
|
-
};
|
|
2659
2665
|
}
|
|
2660
2666
|
});
|
|
2661
2667
|
const enqueueEvent = event => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -2754,7 +2760,7 @@ const ninetailedPlugin = ({
|
|
|
2754
2760
|
abort,
|
|
2755
2761
|
payload
|
|
2756
2762
|
}) => {
|
|
2757
|
-
if (![ANONYMOUS_ID, DEBUG_FLAG, PROFILE_FALLBACK_CACHE,
|
|
2763
|
+
if (![ANONYMOUS_ID, DEBUG_FLAG, PROFILE_FALLBACK_CACHE, CONSENT].includes(payload.key)) {
|
|
2758
2764
|
return abort();
|
|
2759
2765
|
}
|
|
2760
2766
|
return payload;
|
|
@@ -2769,7 +2775,6 @@ const ninetailedPlugin = ({
|
|
|
2769
2775
|
});
|
|
2770
2776
|
instance.storage.removeItem(ANONYMOUS_ID);
|
|
2771
2777
|
instance.storage.removeItem(PROFILE_FALLBACK_CACHE);
|
|
2772
|
-
instance.storage.removeItem(EXPERIENCES_FALLBACK_CACHE);
|
|
2773
2778
|
experience_jsShared.logger.debug('Removed old profile data from localstorage.');
|
|
2774
2779
|
yield ninetailed.track('nt_reset');
|
|
2775
2780
|
experience_jsShared.logger.info('Profile reset successful.');
|
|
@@ -2850,6 +2855,115 @@ if (NOT_GENERIC || INCORRECT_NAME) {
|
|
|
2850
2855
|
}, { unsafe: true });
|
|
2851
2856
|
}
|
|
2852
2857
|
|
|
2858
|
+
var classof = classofRaw$2;
|
|
2859
|
+
|
|
2860
|
+
// `IsArray` abstract operation
|
|
2861
|
+
// https://tc39.es/ecma262/#sec-isarray
|
|
2862
|
+
// eslint-disable-next-line es/no-array-isarray -- safe
|
|
2863
|
+
var isArray$2 = Array.isArray || function isArray(argument) {
|
|
2864
|
+
return classof(argument) == 'Array';
|
|
2865
|
+
};
|
|
2866
|
+
|
|
2867
|
+
var $TypeError$1 = TypeError;
|
|
2868
|
+
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
|
|
2869
|
+
|
|
2870
|
+
var doesNotExceedSafeInteger$1 = function (it) {
|
|
2871
|
+
if (it > MAX_SAFE_INTEGER) throw $TypeError$1('Maximum allowed index exceeded');
|
|
2872
|
+
return it;
|
|
2873
|
+
};
|
|
2874
|
+
|
|
2875
|
+
var isArray$1 = isArray$2;
|
|
2876
|
+
var lengthOfArrayLike$2 = lengthOfArrayLike$5;
|
|
2877
|
+
var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
|
|
2878
|
+
var bind = functionBindContext;
|
|
2879
|
+
|
|
2880
|
+
// `FlattenIntoArray` abstract operation
|
|
2881
|
+
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
2882
|
+
var flattenIntoArray$1 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
2883
|
+
var targetIndex = start;
|
|
2884
|
+
var sourceIndex = 0;
|
|
2885
|
+
var mapFn = mapper ? bind(mapper, thisArg) : false;
|
|
2886
|
+
var element, elementLen;
|
|
2887
|
+
|
|
2888
|
+
while (sourceIndex < sourceLen) {
|
|
2889
|
+
if (sourceIndex in source) {
|
|
2890
|
+
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
2891
|
+
|
|
2892
|
+
if (depth > 0 && isArray$1(element)) {
|
|
2893
|
+
elementLen = lengthOfArrayLike$2(element);
|
|
2894
|
+
targetIndex = flattenIntoArray$1(target, original, element, elementLen, targetIndex, depth - 1) - 1;
|
|
2895
|
+
} else {
|
|
2896
|
+
doesNotExceedSafeInteger(targetIndex + 1);
|
|
2897
|
+
target[targetIndex] = element;
|
|
2898
|
+
}
|
|
2899
|
+
|
|
2900
|
+
targetIndex++;
|
|
2901
|
+
}
|
|
2902
|
+
sourceIndex++;
|
|
2903
|
+
}
|
|
2904
|
+
return targetIndex;
|
|
2905
|
+
};
|
|
2906
|
+
|
|
2907
|
+
var flattenIntoArray_1 = flattenIntoArray$1;
|
|
2908
|
+
|
|
2909
|
+
var isArray = isArray$2;
|
|
2910
|
+
var isConstructor = isConstructor$2;
|
|
2911
|
+
var isObject$1 = isObject$a;
|
|
2912
|
+
var wellKnownSymbol$3 = wellKnownSymbol$h;
|
|
2913
|
+
|
|
2914
|
+
var SPECIES = wellKnownSymbol$3('species');
|
|
2915
|
+
var $Array = Array;
|
|
2916
|
+
|
|
2917
|
+
// a part of `ArraySpeciesCreate` abstract operation
|
|
2918
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
2919
|
+
var arraySpeciesConstructor$1 = function (originalArray) {
|
|
2920
|
+
var C;
|
|
2921
|
+
if (isArray(originalArray)) {
|
|
2922
|
+
C = originalArray.constructor;
|
|
2923
|
+
// cross-realm fallback
|
|
2924
|
+
if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
|
|
2925
|
+
else if (isObject$1(C)) {
|
|
2926
|
+
C = C[SPECIES];
|
|
2927
|
+
if (C === null) C = undefined;
|
|
2928
|
+
}
|
|
2929
|
+
} return C === undefined ? $Array : C;
|
|
2930
|
+
};
|
|
2931
|
+
|
|
2932
|
+
var arraySpeciesConstructor = arraySpeciesConstructor$1;
|
|
2933
|
+
|
|
2934
|
+
// `ArraySpeciesCreate` abstract operation
|
|
2935
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
2936
|
+
var arraySpeciesCreate$1 = function (originalArray, length) {
|
|
2937
|
+
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
|
|
2938
|
+
};
|
|
2939
|
+
|
|
2940
|
+
var $$3 = _export;
|
|
2941
|
+
var flattenIntoArray = flattenIntoArray_1;
|
|
2942
|
+
var toObject$2 = toObject$5;
|
|
2943
|
+
var lengthOfArrayLike$1 = lengthOfArrayLike$5;
|
|
2944
|
+
var toIntegerOrInfinity = toIntegerOrInfinity$3;
|
|
2945
|
+
var arraySpeciesCreate = arraySpeciesCreate$1;
|
|
2946
|
+
|
|
2947
|
+
// `Array.prototype.flat` method
|
|
2948
|
+
// https://tc39.es/ecma262/#sec-array.prototype.flat
|
|
2949
|
+
$$3({ target: 'Array', proto: true }, {
|
|
2950
|
+
flat: function flat(/* depthArg = 1 */) {
|
|
2951
|
+
var depthArg = arguments.length ? arguments[0] : undefined;
|
|
2952
|
+
var O = toObject$2(this);
|
|
2953
|
+
var sourceLen = lengthOfArrayLike$1(O);
|
|
2954
|
+
var A = arraySpeciesCreate(O, 0);
|
|
2955
|
+
A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toIntegerOrInfinity(depthArg));
|
|
2956
|
+
return A;
|
|
2957
|
+
}
|
|
2958
|
+
});
|
|
2959
|
+
|
|
2960
|
+
// this method was added to unscopables after implementation
|
|
2961
|
+
// in popular engines, so it's moved to a separate module
|
|
2962
|
+
var addToUnscopables$1 = addToUnscopables$3;
|
|
2963
|
+
|
|
2964
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
2965
|
+
addToUnscopables$1('flat');
|
|
2966
|
+
|
|
2853
2967
|
var fails$3 = fails$h;
|
|
2854
2968
|
|
|
2855
2969
|
var correctPrototypeGetter = !fails$3(function () {
|
|
@@ -2861,7 +2975,7 @@ var correctPrototypeGetter = !fails$3(function () {
|
|
|
2861
2975
|
|
|
2862
2976
|
var hasOwn = hasOwnProperty_1;
|
|
2863
2977
|
var isCallable$2 = isCallable$k;
|
|
2864
|
-
var toObject$
|
|
2978
|
+
var toObject$1 = toObject$5;
|
|
2865
2979
|
var sharedKey = sharedKey$3;
|
|
2866
2980
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
2867
2981
|
|
|
@@ -2873,7 +2987,7 @@ var ObjectPrototype = $Object.prototype;
|
|
|
2873
2987
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
2874
2988
|
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
2875
2989
|
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
|
|
2876
|
-
var object = toObject$
|
|
2990
|
+
var object = toObject$1(O);
|
|
2877
2991
|
if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
|
|
2878
2992
|
var constructor = object.constructor;
|
|
2879
2993
|
if (isCallable$2(constructor) && object instanceof constructor) {
|
|
@@ -2883,12 +2997,12 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : f
|
|
|
2883
2997
|
|
|
2884
2998
|
var fails$2 = fails$h;
|
|
2885
2999
|
var isCallable$1 = isCallable$k;
|
|
2886
|
-
var isObject
|
|
3000
|
+
var isObject = isObject$a;
|
|
2887
3001
|
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
2888
3002
|
var defineBuiltIn$1 = defineBuiltIn$6;
|
|
2889
|
-
var wellKnownSymbol$
|
|
3003
|
+
var wellKnownSymbol$2 = wellKnownSymbol$h;
|
|
2890
3004
|
|
|
2891
|
-
var ITERATOR$3 = wellKnownSymbol$
|
|
3005
|
+
var ITERATOR$3 = wellKnownSymbol$2('iterator');
|
|
2892
3006
|
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
2893
3007
|
|
|
2894
3008
|
// `%IteratorPrototype%` object
|
|
@@ -2906,7 +3020,7 @@ if ([].keys) {
|
|
|
2906
3020
|
}
|
|
2907
3021
|
}
|
|
2908
3022
|
|
|
2909
|
-
var NEW_ITERATOR_PROTOTYPE = !isObject
|
|
3023
|
+
var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails$2(function () {
|
|
2910
3024
|
var test = {};
|
|
2911
3025
|
// FF44- legacy iterators case
|
|
2912
3026
|
return IteratorPrototype$2[ITERATOR$3].call(test) !== test;
|
|
@@ -2943,7 +3057,7 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
|
|
|
2943
3057
|
return IteratorConstructor;
|
|
2944
3058
|
};
|
|
2945
3059
|
|
|
2946
|
-
var $$
|
|
3060
|
+
var $$2 = _export;
|
|
2947
3061
|
var call = functionCall;
|
|
2948
3062
|
var FunctionName = functionName;
|
|
2949
3063
|
var isCallable = isCallable$k;
|
|
@@ -2953,7 +3067,7 @@ var setPrototypeOf = objectSetPrototypeOf;
|
|
|
2953
3067
|
var setToStringTag = setToStringTag$3;
|
|
2954
3068
|
var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
|
|
2955
3069
|
var defineBuiltIn = defineBuiltIn$6;
|
|
2956
|
-
var wellKnownSymbol$
|
|
3070
|
+
var wellKnownSymbol$1 = wellKnownSymbol$h;
|
|
2957
3071
|
var Iterators$1 = iterators;
|
|
2958
3072
|
var IteratorsCore = iteratorsCore;
|
|
2959
3073
|
|
|
@@ -2961,7 +3075,7 @@ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
|
|
|
2961
3075
|
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
|
2962
3076
|
var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
|
2963
3077
|
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
2964
|
-
var ITERATOR$2 = wellKnownSymbol$
|
|
3078
|
+
var ITERATOR$2 = wellKnownSymbol$1('iterator');
|
|
2965
3079
|
var KEYS = 'keys';
|
|
2966
3080
|
var VALUES = 'values';
|
|
2967
3081
|
var ENTRIES = 'entries';
|
|
@@ -3028,7 +3142,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
3028
3142
|
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
3029
3143
|
defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
|
|
3030
3144
|
}
|
|
3031
|
-
} else $$
|
|
3145
|
+
} else $$2({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
3032
3146
|
}
|
|
3033
3147
|
|
|
3034
3148
|
// define iterator
|
|
@@ -3047,7 +3161,7 @@ var createIterResultObject$1 = function (value, done) {
|
|
|
3047
3161
|
};
|
|
3048
3162
|
|
|
3049
3163
|
var toIndexedObject = toIndexedObject$5;
|
|
3050
|
-
var addToUnscopables
|
|
3164
|
+
var addToUnscopables = addToUnscopables$3;
|
|
3051
3165
|
var Iterators = iterators;
|
|
3052
3166
|
var InternalStateModule = internalState;
|
|
3053
3167
|
var defineProperty = objectDefineProperty.f;
|
|
@@ -3098,9 +3212,9 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
|
|
|
3098
3212
|
var values = Iterators.Arguments = Iterators.Array;
|
|
3099
3213
|
|
|
3100
3214
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
3101
|
-
addToUnscopables
|
|
3102
|
-
addToUnscopables
|
|
3103
|
-
addToUnscopables
|
|
3215
|
+
addToUnscopables('keys');
|
|
3216
|
+
addToUnscopables('values');
|
|
3217
|
+
addToUnscopables('entries');
|
|
3104
3218
|
|
|
3105
3219
|
// V8 ~ Chrome 45- bug
|
|
3106
3220
|
if (DESCRIPTORS && values.name !== 'values') try {
|
|
@@ -3156,10 +3270,10 @@ var DOMIterables = domIterables;
|
|
|
3156
3270
|
var DOMTokenListPrototype = domTokenListPrototype;
|
|
3157
3271
|
var ArrayIteratorMethods = es_array_iterator;
|
|
3158
3272
|
var createNonEnumerableProperty = createNonEnumerableProperty$4;
|
|
3159
|
-
var wellKnownSymbol
|
|
3273
|
+
var wellKnownSymbol = wellKnownSymbol$h;
|
|
3160
3274
|
|
|
3161
|
-
var ITERATOR$1 = wellKnownSymbol
|
|
3162
|
-
var TO_STRING_TAG = wellKnownSymbol
|
|
3275
|
+
var ITERATOR$1 = wellKnownSymbol('iterator');
|
|
3276
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
3163
3277
|
var ArrayValues = ArrayIteratorMethods.values;
|
|
3164
3278
|
|
|
3165
3279
|
var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
@@ -3190,123 +3304,64 @@ for (var COLLECTION_NAME in DOMIterables) {
|
|
|
3190
3304
|
|
|
3191
3305
|
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
3192
3306
|
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
}
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
// `FlattenIntoArray` abstract operation
|
|
3216
|
-
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
3217
|
-
var flattenIntoArray$1 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
3218
|
-
var targetIndex = start;
|
|
3219
|
-
var sourceIndex = 0;
|
|
3220
|
-
var mapFn = mapper ? bind(mapper, thisArg) : false;
|
|
3221
|
-
var element, elementLen;
|
|
3222
|
-
|
|
3223
|
-
while (sourceIndex < sourceLen) {
|
|
3224
|
-
if (sourceIndex in source) {
|
|
3225
|
-
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
3226
|
-
|
|
3227
|
-
if (depth > 0 && isArray$1(element)) {
|
|
3228
|
-
elementLen = lengthOfArrayLike$2(element);
|
|
3229
|
-
targetIndex = flattenIntoArray$1(target, original, element, elementLen, targetIndex, depth - 1) - 1;
|
|
3307
|
+
class ElementSeenObserver {
|
|
3308
|
+
constructor(_options) {
|
|
3309
|
+
this._options = _options;
|
|
3310
|
+
this._elementDelays = new WeakMap();
|
|
3311
|
+
this._intersectionTimers = new WeakMap();
|
|
3312
|
+
if (typeof IntersectionObserver !== 'undefined') {
|
|
3313
|
+
this._intersectionObserver = new IntersectionObserver(this.onIntersection.bind(this));
|
|
3314
|
+
}
|
|
3315
|
+
}
|
|
3316
|
+
onIntersection(entries) {
|
|
3317
|
+
entries.forEach(entry => {
|
|
3318
|
+
const {
|
|
3319
|
+
isIntersecting,
|
|
3320
|
+
target
|
|
3321
|
+
} = entry;
|
|
3322
|
+
if (isIntersecting) {
|
|
3323
|
+
const delay = this._elementDelays.get(target);
|
|
3324
|
+
const timeOut = window.setTimeout(() => {
|
|
3325
|
+
this._options.onElementSeen(target);
|
|
3326
|
+
}, delay);
|
|
3327
|
+
this._intersectionTimers.set(target, timeOut);
|
|
3230
3328
|
} else {
|
|
3231
|
-
|
|
3232
|
-
|
|
3329
|
+
const timeOut = this._intersectionTimers.get(target);
|
|
3330
|
+
if (typeof timeOut !== 'undefined') {
|
|
3331
|
+
window.clearTimeout(timeOut);
|
|
3332
|
+
}
|
|
3233
3333
|
}
|
|
3234
|
-
|
|
3235
|
-
targetIndex++;
|
|
3236
|
-
}
|
|
3237
|
-
sourceIndex++;
|
|
3334
|
+
});
|
|
3238
3335
|
}
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
var
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
var SPECIES = wellKnownSymbol('species');
|
|
3250
|
-
var $Array = Array;
|
|
3336
|
+
observe(element, options) {
|
|
3337
|
+
var _a, _b;
|
|
3338
|
+
this._elementDelays.set(element, (_a = options === null || options === void 0 ? void 0 : options.delay) !== null && _a !== void 0 ? _a : 2000);
|
|
3339
|
+
(_b = this._intersectionObserver) === null || _b === void 0 ? void 0 : _b.observe(element);
|
|
3340
|
+
}
|
|
3341
|
+
unobserve(element) {
|
|
3342
|
+
var _a;
|
|
3343
|
+
(_a = this._intersectionObserver) === null || _a === void 0 ? void 0 : _a.unobserve(element);
|
|
3344
|
+
}
|
|
3345
|
+
}
|
|
3251
3346
|
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
var arraySpeciesConstructor$1 = function (originalArray) {
|
|
3255
|
-
var C;
|
|
3256
|
-
if (isArray(originalArray)) {
|
|
3257
|
-
C = originalArray.constructor;
|
|
3258
|
-
// cross-realm fallback
|
|
3259
|
-
if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
|
|
3260
|
-
else if (isObject(C)) {
|
|
3261
|
-
C = C[SPECIES];
|
|
3262
|
-
if (C === null) C = undefined;
|
|
3263
|
-
}
|
|
3264
|
-
} return C === undefined ? $Array : C;
|
|
3347
|
+
const acceptsCredentials = plugin => {
|
|
3348
|
+
return typeof plugin === 'object' && plugin !== null && 'setCredentials' in plugin && typeof plugin.setCredentials === 'function';
|
|
3265
3349
|
};
|
|
3266
3350
|
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
// `ArraySpeciesCreate` abstract operation
|
|
3270
|
-
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
3271
|
-
var arraySpeciesCreate$1 = function (originalArray, length) {
|
|
3272
|
-
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
|
|
3351
|
+
const isInterestedInHiddenPage = arg => {
|
|
3352
|
+
return typeof arg === 'object' && arg !== null && PAGE_HIDDEN in arg && typeof arg[PAGE_HIDDEN] === 'function';
|
|
3273
3353
|
};
|
|
3274
3354
|
|
|
3275
|
-
var $$2 = _export;
|
|
3276
|
-
var flattenIntoArray = flattenIntoArray_1;
|
|
3277
|
-
var toObject$1 = toObject$5;
|
|
3278
|
-
var lengthOfArrayLike$1 = lengthOfArrayLike$5;
|
|
3279
|
-
var toIntegerOrInfinity = toIntegerOrInfinity$3;
|
|
3280
|
-
var arraySpeciesCreate = arraySpeciesCreate$1;
|
|
3281
|
-
|
|
3282
|
-
// `Array.prototype.flat` method
|
|
3283
|
-
// https://tc39.es/ecma262/#sec-array.prototype.flat
|
|
3284
|
-
$$2({ target: 'Array', proto: true }, {
|
|
3285
|
-
flat: function flat(/* depthArg = 1 */) {
|
|
3286
|
-
var depthArg = arguments.length ? arguments[0] : undefined;
|
|
3287
|
-
var O = toObject$1(this);
|
|
3288
|
-
var sourceLen = lengthOfArrayLike$1(O);
|
|
3289
|
-
var A = arraySpeciesCreate(O, 0);
|
|
3290
|
-
A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toIntegerOrInfinity(depthArg));
|
|
3291
|
-
return A;
|
|
3292
|
-
}
|
|
3293
|
-
});
|
|
3294
|
-
|
|
3295
|
-
// this method was added to unscopables after implementation
|
|
3296
|
-
// in popular engines, so it's moved to a separate module
|
|
3297
|
-
var addToUnscopables = addToUnscopables$3;
|
|
3298
|
-
|
|
3299
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
3300
|
-
addToUnscopables('flat');
|
|
3301
|
-
|
|
3302
3355
|
class Ninetailed {
|
|
3303
3356
|
constructor(ninetailedApiClientInstanceOrOptions, {
|
|
3304
3357
|
plugins,
|
|
3305
3358
|
url,
|
|
3359
|
+
profile,
|
|
3306
3360
|
locale,
|
|
3307
3361
|
requestTimeout,
|
|
3308
3362
|
onLog,
|
|
3309
|
-
onError
|
|
3363
|
+
onError,
|
|
3364
|
+
componentViewTrackingThreshold = 2000
|
|
3310
3365
|
} = {}) {
|
|
3311
3366
|
this.isInitialized = false;
|
|
3312
3367
|
this.page = (data, options) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -3343,16 +3398,48 @@ class Ninetailed {
|
|
|
3343
3398
|
throw error;
|
|
3344
3399
|
}
|
|
3345
3400
|
});
|
|
3401
|
+
/**
|
|
3402
|
+
* @deprecated The legacy datamodel is not recommended anymore
|
|
3403
|
+
* Will be removed in version 5 of the SDK
|
|
3404
|
+
*/
|
|
3346
3405
|
this.trackHasSeenComponent = properties => __awaiter(this, void 0, void 0, function* () {
|
|
3347
3406
|
return this.instance.dispatch(Object.assign(Object.assign({}, properties), {
|
|
3348
3407
|
type: HAS_SEEN_COMPONENT
|
|
3349
3408
|
}));
|
|
3350
3409
|
});
|
|
3410
|
+
/**
|
|
3411
|
+
* @deprecated Use the Ninetailed provided observers instead
|
|
3412
|
+
* Will be removed in version 5 of the SDK
|
|
3413
|
+
*/
|
|
3351
3414
|
this.trackHasSeenExperience = properties => {
|
|
3352
3415
|
return this.instance.dispatch(Object.assign(Object.assign({}, properties), {
|
|
3353
|
-
type:
|
|
3416
|
+
type: HAS_SEEN_ELEMENT
|
|
3354
3417
|
}));
|
|
3355
3418
|
};
|
|
3419
|
+
this.observeElement = (payload, options) => {
|
|
3420
|
+
const {
|
|
3421
|
+
element
|
|
3422
|
+
} = payload,
|
|
3423
|
+
remaingPayload = __rest(payload, ["element"]);
|
|
3424
|
+
this.observedElements.set(element, remaingPayload);
|
|
3425
|
+
this.elementSeenObserver.observe(element, Object.assign({
|
|
3426
|
+
delay: this.componentViewTrackingThreshold
|
|
3427
|
+
}, options));
|
|
3428
|
+
};
|
|
3429
|
+
this.unobserveElement = element => {
|
|
3430
|
+
this.observedElements.delete(element);
|
|
3431
|
+
this.elementSeenObserver.unobserve(element);
|
|
3432
|
+
};
|
|
3433
|
+
this.onElementSeen = element => {
|
|
3434
|
+
const payload = this.observedElements.get(element);
|
|
3435
|
+
if (typeof payload !== 'undefined') {
|
|
3436
|
+
this.instance.dispatch(Object.assign(Object.assign({
|
|
3437
|
+
element
|
|
3438
|
+
}, payload), {
|
|
3439
|
+
type: HAS_SEEN_ELEMENT
|
|
3440
|
+
}));
|
|
3441
|
+
}
|
|
3442
|
+
};
|
|
3356
3443
|
this.identify = (uid, traits, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3357
3444
|
try {
|
|
3358
3445
|
const result = experience_jsShared.Traits.default({}).safeParse(traits);
|
|
@@ -3391,14 +3478,12 @@ class Ninetailed {
|
|
|
3391
3478
|
cb(Object.assign(Object.assign({}, this._profileState), {
|
|
3392
3479
|
status: 'error',
|
|
3393
3480
|
profile: payload.profile,
|
|
3394
|
-
experiences: payload.experiences,
|
|
3395
3481
|
error: payload.error
|
|
3396
3482
|
}));
|
|
3397
3483
|
} else {
|
|
3398
3484
|
cb(Object.assign(Object.assign({}, this._profileState), {
|
|
3399
3485
|
status: 'success',
|
|
3400
3486
|
profile: payload.profile,
|
|
3401
|
-
experiences: payload.experiences,
|
|
3402
3487
|
error: null
|
|
3403
3488
|
}));
|
|
3404
3489
|
}
|
|
@@ -3422,6 +3507,18 @@ class Ninetailed {
|
|
|
3422
3507
|
this.onIsInitialized(resolve);
|
|
3423
3508
|
});
|
|
3424
3509
|
};
|
|
3510
|
+
this.onVisibilityChange = () => {
|
|
3511
|
+
if (typeof document === 'undefined') {
|
|
3512
|
+
return;
|
|
3513
|
+
}
|
|
3514
|
+
document.addEventListener('visibilitychange', () => {
|
|
3515
|
+
if (document.visibilityState === 'hidden') {
|
|
3516
|
+
this.instance.dispatch({
|
|
3517
|
+
type: PAGE_HIDDEN
|
|
3518
|
+
});
|
|
3519
|
+
}
|
|
3520
|
+
});
|
|
3521
|
+
};
|
|
3425
3522
|
if (ninetailedApiClientInstanceOrOptions instanceof experience_jsShared.NinetailedApiClient) {
|
|
3426
3523
|
this.apiClient = ninetailedApiClientInstanceOrOptions;
|
|
3427
3524
|
} else {
|
|
@@ -3439,22 +3536,30 @@ class Ninetailed {
|
|
|
3439
3536
|
preview
|
|
3440
3537
|
});
|
|
3441
3538
|
}
|
|
3442
|
-
this.plugins =
|
|
3443
|
-
|
|
3444
|
-
|
|
3539
|
+
this.plugins = (plugins !== null && plugins !== void 0 ? plugins : []).flat();
|
|
3540
|
+
this.plugins.forEach(plugin => {
|
|
3541
|
+
if (acceptsCredentials(plugin) && this.clientId && this.environment) {
|
|
3542
|
+
plugin.setCredentials({
|
|
3445
3543
|
clientId: this.clientId,
|
|
3446
3544
|
environment: this.environment
|
|
3447
3545
|
});
|
|
3448
3546
|
}
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
}
|
|
3547
|
+
});
|
|
3548
|
+
if (profile) {
|
|
3549
|
+
this._profileState = {
|
|
3550
|
+
status: 'success',
|
|
3551
|
+
profile,
|
|
3552
|
+
error: null,
|
|
3553
|
+
from: 'hydrated'
|
|
3554
|
+
};
|
|
3555
|
+
} else {
|
|
3556
|
+
this._profileState = {
|
|
3557
|
+
status: 'loading',
|
|
3558
|
+
profile: null,
|
|
3559
|
+
error: null,
|
|
3560
|
+
from: 'api'
|
|
3561
|
+
};
|
|
3562
|
+
}
|
|
3458
3563
|
if (typeof onLog === 'function') {
|
|
3459
3564
|
experience_jsShared.logger.addSink(new experience_jsShared.OnLogLogSink(onLog));
|
|
3460
3565
|
}
|
|
@@ -3464,6 +3569,7 @@ class Ninetailed {
|
|
|
3464
3569
|
this.logger = experience_jsShared.logger;
|
|
3465
3570
|
this.eventQueue = ninetailedPlugin({
|
|
3466
3571
|
apiClient: this.apiClient,
|
|
3572
|
+
profile,
|
|
3467
3573
|
locale,
|
|
3468
3574
|
requestTimeout,
|
|
3469
3575
|
ninetailed: this
|
|
@@ -3482,11 +3588,19 @@ class Ninetailed {
|
|
|
3482
3588
|
this._profileState = profileState;
|
|
3483
3589
|
if (typeof window !== 'undefined') {
|
|
3484
3590
|
window.ninetailed = Object.assign({}, window.ninetailed, {
|
|
3485
|
-
profile: this.profileState.profile
|
|
3486
|
-
experiences: this.profileState.experiences
|
|
3591
|
+
profile: this.profileState.profile
|
|
3487
3592
|
});
|
|
3488
3593
|
}
|
|
3489
3594
|
});
|
|
3595
|
+
this.observedElements = new WeakMap();
|
|
3596
|
+
this.elementSeenObserver = new ElementSeenObserver({
|
|
3597
|
+
onElementSeen: this.onElementSeen.bind(this)
|
|
3598
|
+
});
|
|
3599
|
+
this.componentViewTrackingThreshold = componentViewTrackingThreshold;
|
|
3600
|
+
const hasPluginsInterestedInHiddenPage = this.plugins.some(isInterestedInHiddenPage);
|
|
3601
|
+
if (hasPluginsInterestedInHiddenPage) {
|
|
3602
|
+
this.onVisibilityChange();
|
|
3603
|
+
}
|
|
3490
3604
|
this.registerWindowHandlers();
|
|
3491
3605
|
}
|
|
3492
3606
|
get profileState() {
|
|
@@ -3599,39 +3713,44 @@ const selectVariant = (baseline, variants, {
|
|
|
3599
3713
|
};
|
|
3600
3714
|
};
|
|
3601
3715
|
|
|
3602
|
-
const
|
|
3716
|
+
const TrackComponentProperties = zod.z.object({
|
|
3717
|
+
variant: zod.z.object({
|
|
3718
|
+
id: zod.z.string()
|
|
3719
|
+
}),
|
|
3720
|
+
audience: zod.z.object({
|
|
3721
|
+
id: zod.z.string()
|
|
3722
|
+
}),
|
|
3723
|
+
isPersonalized: zod.z.boolean()
|
|
3724
|
+
});
|
|
3725
|
+
|
|
3726
|
+
/**
|
|
3727
|
+
* @deprecated Use `NinetailedPlugin` from the sdks/javascript package instead.
|
|
3728
|
+
*/
|
|
3729
|
+
class NinetailedPlugin {}
|
|
3730
|
+
|
|
3731
|
+
const ElementSeenPayloadSchema = zod.z.object({
|
|
3732
|
+
element: zod.z.any(),
|
|
3603
3733
|
experience: zod.z.object({
|
|
3604
3734
|
id: zod.z.string(),
|
|
3605
3735
|
type: zod.z.union([zod.z.literal('nt_experiment'), zod.z.literal('nt_personalization')]),
|
|
3606
|
-
name: zod.z.string(),
|
|
3736
|
+
name: zod.z.string().optional(),
|
|
3607
3737
|
description: zod.z.string().optional()
|
|
3608
|
-
}),
|
|
3738
|
+
}).optional().nullable(),
|
|
3609
3739
|
audience: zod.z.object({
|
|
3610
3740
|
id: zod.z.string(),
|
|
3611
3741
|
name: zod.z.string().optional(),
|
|
3612
3742
|
description: zod.z.string().optional()
|
|
3613
|
-
}).optional().default({
|
|
3743
|
+
}).optional().nullable().default({
|
|
3614
3744
|
id: 'ALL_VISITORS',
|
|
3615
3745
|
name: 'All Visitors',
|
|
3616
3746
|
description: 'This is the default all visitors audience as no audience was set.'
|
|
3617
3747
|
}),
|
|
3618
|
-
selectedVariant: zod.z.object({
|
|
3619
|
-
id: zod.z.string()
|
|
3620
|
-
}).catchall(zod.z.unknown()),
|
|
3621
|
-
selectedVariantIndex: zod.z.number()
|
|
3622
|
-
});
|
|
3623
|
-
const TrackComponentProperties = zod.z.object({
|
|
3624
3748
|
variant: zod.z.object({
|
|
3625
3749
|
id: zod.z.string()
|
|
3626
|
-
}),
|
|
3627
|
-
|
|
3628
|
-
id: zod.z.string()
|
|
3629
|
-
}),
|
|
3630
|
-
isPersonalized: zod.z.boolean()
|
|
3750
|
+
}).catchall(zod.z.unknown()),
|
|
3751
|
+
variantIndex: zod.z.number()
|
|
3631
3752
|
});
|
|
3632
3753
|
|
|
3633
|
-
class NinetailedPlugin {}
|
|
3634
|
-
|
|
3635
3754
|
var aCallable = aCallable$8;
|
|
3636
3755
|
var toObject = toObject$5;
|
|
3637
3756
|
var IndexedObject = indexedObject;
|
|
@@ -3838,11 +3957,13 @@ const selectPluginsHavingExperienceSelectionMiddleware = plugins => {
|
|
|
3838
3957
|
const createPassThroughMiddleware = () => {
|
|
3839
3958
|
return ({
|
|
3840
3959
|
experience,
|
|
3841
|
-
variant
|
|
3960
|
+
variant,
|
|
3961
|
+
variantIndex
|
|
3842
3962
|
}) => {
|
|
3843
3963
|
return {
|
|
3844
3964
|
experience,
|
|
3845
|
-
variant
|
|
3965
|
+
variant,
|
|
3966
|
+
variantIndex
|
|
3846
3967
|
};
|
|
3847
3968
|
};
|
|
3848
3969
|
};
|
|
@@ -3913,9 +4034,9 @@ Object.defineProperty(exports, 'selectExperienceBaselineWithVariants', {
|
|
|
3913
4034
|
enumerable: true,
|
|
3914
4035
|
get: function () { return experience_jsShared.selectBaselineWithVariants; }
|
|
3915
4036
|
});
|
|
3916
|
-
Object.defineProperty(exports, '
|
|
4037
|
+
Object.defineProperty(exports, 'selectExperienceVariant', {
|
|
3917
4038
|
enumerable: true,
|
|
3918
|
-
get: function () { return experience_jsShared.
|
|
4039
|
+
get: function () { return experience_jsShared.selectVariant; }
|
|
3919
4040
|
});
|
|
3920
4041
|
Object.defineProperty(exports, 'selectExperienceVariants', {
|
|
3921
4042
|
enumerable: true,
|
|
@@ -3929,20 +4050,21 @@ exports.ANONYMOUS_ID = ANONYMOUS_ID;
|
|
|
3929
4050
|
exports.CONSENT = CONSENT;
|
|
3930
4051
|
exports.DEBUG_FLAG = DEBUG_FLAG;
|
|
3931
4052
|
exports.EMPTY_MERGE_ID = EMPTY_MERGE_ID;
|
|
3932
|
-
exports.
|
|
4053
|
+
exports.ElementSeenPayloadSchema = ElementSeenPayloadSchema;
|
|
3933
4054
|
exports.HAS_SEEN_COMPONENT = HAS_SEEN_COMPONENT;
|
|
3934
|
-
exports.
|
|
4055
|
+
exports.HAS_SEEN_ELEMENT = HAS_SEEN_ELEMENT;
|
|
3935
4056
|
exports.LEGACY_ANONYMOUS_ID = LEGACY_ANONYMOUS_ID;
|
|
3936
4057
|
exports.Ninetailed = Ninetailed;
|
|
3937
4058
|
exports.NinetailedPlugin = NinetailedPlugin;
|
|
3938
4059
|
exports.OnChangeEmitter = OnChangeEmitter;
|
|
4060
|
+
exports.PAGE_HIDDEN = PAGE_HIDDEN;
|
|
3939
4061
|
exports.PLUGIN_NAME = PLUGIN_NAME;
|
|
3940
4062
|
exports.PROFILE_CHANGE = PROFILE_CHANGE;
|
|
3941
4063
|
exports.PROFILE_FALLBACK_CACHE = PROFILE_FALLBACK_CACHE;
|
|
3942
4064
|
exports.PROFILE_RESET = PROFILE_RESET;
|
|
3943
4065
|
exports.SET_ENABLED_FEATURES = SET_ENABLED_FEATURES;
|
|
3944
4066
|
exports.TrackComponentProperties = TrackComponentProperties;
|
|
3945
|
-
exports.
|
|
4067
|
+
exports.buildClientNinetailedRequestContext = buildClientNinetailedRequestContext;
|
|
3946
4068
|
exports.decodeExperienceVariantsMap = decodeExperienceVariantsMap;
|
|
3947
4069
|
exports.makeExperienceSelectMiddleware = makeExperienceSelectMiddleware;
|
|
3948
4070
|
exports.ninetailedPlugin = ninetailedPlugin;
|