@ninetailed/experience.js-plugin-preview 1.4.0 → 1.6.1

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.esm.js CHANGED
@@ -1,7 +1,4 @@
1
1
  import union from 'lodash/union';
2
- import isEqual from 'lodash/isEqual';
3
- import get$1 from 'lodash/get';
4
- import { createAction, createReducer, configureStore, bindActionCreators } from '@reduxjs/toolkit';
5
2
 
6
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
7
4
 
@@ -10,7 +7,7 @@ var check = function (it) {
10
7
  };
11
8
 
12
9
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
13
- var global$r =
10
+ var global$l =
14
11
  // eslint-disable-next-line es/no-global-this -- safe
15
12
  check(typeof globalThis == 'object' && globalThis) ||
16
13
  check(typeof window == 'object' && window) ||
@@ -22,7 +19,7 @@ var global$r =
22
19
 
23
20
  var objectGetOwnPropertyDescriptor = {};
24
21
 
25
- var fails$a = function (exec) {
22
+ var fails$8 = function (exec) {
26
23
  try {
27
24
  return !!exec();
28
25
  } catch (error) {
@@ -30,17 +27,17 @@ var fails$a = function (exec) {
30
27
  }
31
28
  };
32
29
 
33
- var fails$9 = fails$a;
30
+ var fails$7 = fails$8;
34
31
 
35
32
  // Detect IE8's incomplete defineProperty implementation
36
- var descriptors = !fails$9(function () {
33
+ var descriptors = !fails$7(function () {
37
34
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
38
35
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
39
36
  });
40
37
 
41
- var fails$8 = fails$a;
38
+ var fails$6 = fails$8;
42
39
 
43
- var functionBindNative = !fails$8(function () {
40
+ var functionBindNative = !fails$6(function () {
44
41
  var test = (function () { /* empty */ }).bind();
45
42
  // eslint-disable-next-line no-prototype-builtins -- safe
46
43
  return typeof test != 'function' || test.hasOwnProperty('prototype');
@@ -48,10 +45,10 @@ var functionBindNative = !fails$8(function () {
48
45
 
49
46
  var NATIVE_BIND$1 = functionBindNative;
50
47
 
51
- var call$6 = Function.prototype.call;
48
+ var call$5 = Function.prototype.call;
52
49
 
53
- var functionCall = NATIVE_BIND$1 ? call$6.bind(call$6) : function () {
54
- return call$6.apply(call$6, arguments);
50
+ var functionCall = NATIVE_BIND$1 ? call$5.bind(call$5) : function () {
51
+ return call$5.apply(call$5, arguments);
55
52
  };
56
53
 
57
54
  var objectPropertyIsEnumerable = {};
@@ -70,7 +67,7 @@ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
70
67
  return !!descriptor && descriptor.enumerable;
71
68
  } : $propertyIsEnumerable;
72
69
 
73
- var createPropertyDescriptor$3 = function (bitmap, value) {
70
+ var createPropertyDescriptor$2 = function (bitmap, value) {
74
71
  return {
75
72
  enumerable: !(bitmap & 1),
76
73
  configurable: !(bitmap & 2),
@@ -83,98 +80,98 @@ var NATIVE_BIND = functionBindNative;
83
80
 
84
81
  var FunctionPrototype$1 = Function.prototype;
85
82
  var bind = FunctionPrototype$1.bind;
86
- var call$5 = FunctionPrototype$1.call;
87
- var uncurryThis$c = NATIVE_BIND && bind.bind(call$5, call$5);
83
+ var call$4 = FunctionPrototype$1.call;
84
+ var uncurryThis$a = NATIVE_BIND && bind.bind(call$4, call$4);
88
85
 
89
86
  var functionUncurryThis = NATIVE_BIND ? function (fn) {
90
- return fn && uncurryThis$c(fn);
87
+ return fn && uncurryThis$a(fn);
91
88
  } : function (fn) {
92
89
  return fn && function () {
93
- return call$5.apply(fn, arguments);
90
+ return call$4.apply(fn, arguments);
94
91
  };
95
92
  };
96
93
 
97
- var uncurryThis$b = functionUncurryThis;
94
+ var uncurryThis$9 = functionUncurryThis;
98
95
 
99
- var toString$3 = uncurryThis$b({}.toString);
100
- var stringSlice = uncurryThis$b(''.slice);
96
+ var toString$1 = uncurryThis$9({}.toString);
97
+ var stringSlice = uncurryThis$9(''.slice);
101
98
 
102
- var classofRaw$1 = function (it) {
103
- return stringSlice(toString$3(it), 8, -1);
99
+ var classofRaw = function (it) {
100
+ return stringSlice(toString$1(it), 8, -1);
104
101
  };
105
102
 
106
- var global$q = global$r;
107
- var uncurryThis$a = functionUncurryThis;
108
- var fails$7 = fails$a;
109
- var classof$3 = classofRaw$1;
103
+ var global$k = global$l;
104
+ var uncurryThis$8 = functionUncurryThis;
105
+ var fails$5 = fails$8;
106
+ var classof = classofRaw;
110
107
 
111
- var Object$5 = global$q.Object;
112
- var split = uncurryThis$a(''.split);
108
+ var Object$3 = global$k.Object;
109
+ var split = uncurryThis$8(''.split);
113
110
 
114
111
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
115
- var indexedObject = fails$7(function () {
112
+ var indexedObject = fails$5(function () {
116
113
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
117
114
  // eslint-disable-next-line no-prototype-builtins -- safe
118
- return !Object$5('z').propertyIsEnumerable(0);
115
+ return !Object$3('z').propertyIsEnumerable(0);
119
116
  }) ? function (it) {
120
- return classof$3(it) == 'String' ? split(it, '') : Object$5(it);
121
- } : Object$5;
117
+ return classof(it) == 'String' ? split(it, '') : Object$3(it);
118
+ } : Object$3;
122
119
 
123
- var global$p = global$r;
120
+ var global$j = global$l;
124
121
 
125
- var TypeError$9 = global$p.TypeError;
122
+ var TypeError$6 = global$j.TypeError;
126
123
 
127
124
  // `RequireObjectCoercible` abstract operation
128
125
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
129
- var requireObjectCoercible$3 = function (it) {
130
- if (it == undefined) throw TypeError$9("Can't call method on " + it);
126
+ var requireObjectCoercible$2 = function (it) {
127
+ if (it == undefined) throw TypeError$6("Can't call method on " + it);
131
128
  return it;
132
129
  };
133
130
 
134
131
  // toObject with fallback for non-array-like ES3 strings
135
132
  var IndexedObject$1 = indexedObject;
136
- var requireObjectCoercible$2 = requireObjectCoercible$3;
133
+ var requireObjectCoercible$1 = requireObjectCoercible$2;
137
134
 
138
- var toIndexedObject$5 = function (it) {
139
- return IndexedObject$1(requireObjectCoercible$2(it));
135
+ var toIndexedObject$3 = function (it) {
136
+ return IndexedObject$1(requireObjectCoercible$1(it));
140
137
  };
141
138
 
142
139
  // `IsCallable` abstract operation
143
140
  // https://tc39.es/ecma262/#sec-iscallable
144
- var isCallable$e = function (argument) {
141
+ var isCallable$9 = function (argument) {
145
142
  return typeof argument == 'function';
146
143
  };
147
144
 
148
- var isCallable$d = isCallable$e;
145
+ var isCallable$8 = isCallable$9;
149
146
 
150
- var isObject$6 = function (it) {
151
- return typeof it == 'object' ? it !== null : isCallable$d(it);
147
+ var isObject$5 = function (it) {
148
+ return typeof it == 'object' ? it !== null : isCallable$8(it);
152
149
  };
153
150
 
154
- var global$o = global$r;
155
- var isCallable$c = isCallable$e;
151
+ var global$i = global$l;
152
+ var isCallable$7 = isCallable$9;
156
153
 
157
154
  var aFunction = function (argument) {
158
- return isCallable$c(argument) ? argument : undefined;
155
+ return isCallable$7(argument) ? argument : undefined;
159
156
  };
160
157
 
161
- var getBuiltIn$4 = function (namespace, method) {
162
- return arguments.length < 2 ? aFunction(global$o[namespace]) : global$o[namespace] && global$o[namespace][method];
158
+ var getBuiltIn$3 = function (namespace, method) {
159
+ return arguments.length < 2 ? aFunction(global$i[namespace]) : global$i[namespace] && global$i[namespace][method];
163
160
  };
164
161
 
165
- var uncurryThis$9 = functionUncurryThis;
162
+ var uncurryThis$7 = functionUncurryThis;
166
163
 
167
- var objectIsPrototypeOf = uncurryThis$9({}.isPrototypeOf);
164
+ var objectIsPrototypeOf = uncurryThis$7({}.isPrototypeOf);
168
165
 
169
- var getBuiltIn$3 = getBuiltIn$4;
166
+ var getBuiltIn$2 = getBuiltIn$3;
170
167
 
171
- var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
168
+ var engineUserAgent = getBuiltIn$2('navigator', 'userAgent') || '';
172
169
 
173
- var global$n = global$r;
170
+ var global$h = global$l;
174
171
  var userAgent = engineUserAgent;
175
172
 
176
- var process = global$n.process;
177
- var Deno = global$n.Deno;
173
+ var process = global$h.process;
174
+ var Deno = global$h.Deno;
178
175
  var versions = process && process.versions || Deno && Deno.version;
179
176
  var v8 = versions && versions.v8;
180
177
  var match, version;
@@ -201,10 +198,10 @@ var engineV8Version = version;
201
198
  /* eslint-disable es/no-symbol -- required for testing */
202
199
 
203
200
  var V8_VERSION = engineV8Version;
204
- var fails$6 = fails$a;
201
+ var fails$4 = fails$8;
205
202
 
206
203
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
207
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$6(function () {
204
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$4(function () {
208
205
  var symbol = Symbol();
209
206
  // Chrome 38 Symbol has incorrect toString conversion
210
207
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -221,43 +218,43 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
221
218
  && !Symbol.sham
222
219
  && typeof Symbol.iterator == 'symbol';
223
220
 
224
- var global$m = global$r;
225
- var getBuiltIn$2 = getBuiltIn$4;
226
- var isCallable$b = isCallable$e;
221
+ var global$g = global$l;
222
+ var getBuiltIn$1 = getBuiltIn$3;
223
+ var isCallable$6 = isCallable$9;
227
224
  var isPrototypeOf = objectIsPrototypeOf;
228
225
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
229
226
 
230
- var Object$4 = global$m.Object;
227
+ var Object$2 = global$g.Object;
231
228
 
232
229
  var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
233
230
  return typeof it == 'symbol';
234
231
  } : function (it) {
235
- var $Symbol = getBuiltIn$2('Symbol');
236
- return isCallable$b($Symbol) && isPrototypeOf($Symbol.prototype, Object$4(it));
232
+ var $Symbol = getBuiltIn$1('Symbol');
233
+ return isCallable$6($Symbol) && isPrototypeOf($Symbol.prototype, Object$2(it));
237
234
  };
238
235
 
239
- var global$l = global$r;
236
+ var global$f = global$l;
240
237
 
241
- var String$4 = global$l.String;
238
+ var String$2 = global$f.String;
242
239
 
243
240
  var tryToString$1 = function (argument) {
244
241
  try {
245
- return String$4(argument);
242
+ return String$2(argument);
246
243
  } catch (error) {
247
244
  return 'Object';
248
245
  }
249
246
  };
250
247
 
251
- var global$k = global$r;
252
- var isCallable$a = isCallable$e;
248
+ var global$e = global$l;
249
+ var isCallable$5 = isCallable$9;
253
250
  var tryToString = tryToString$1;
254
251
 
255
- var TypeError$8 = global$k.TypeError;
252
+ var TypeError$5 = global$e.TypeError;
256
253
 
257
254
  // `Assert: IsCallable(argument) is true`
258
255
  var aCallable$1 = function (argument) {
259
- if (isCallable$a(argument)) return argument;
260
- throw TypeError$8(tryToString(argument) + ' is not a function');
256
+ if (isCallable$5(argument)) return argument;
257
+ throw TypeError$5(tryToString(argument) + ' is not a function');
261
258
  };
262
259
 
263
260
  var aCallable = aCallable$1;
@@ -269,50 +266,50 @@ var getMethod$1 = function (V, P) {
269
266
  return func == null ? undefined : aCallable(func);
270
267
  };
271
268
 
272
- var global$j = global$r;
273
- var call$4 = functionCall;
274
- var isCallable$9 = isCallable$e;
275
- var isObject$5 = isObject$6;
269
+ var global$d = global$l;
270
+ var call$3 = functionCall;
271
+ var isCallable$4 = isCallable$9;
272
+ var isObject$4 = isObject$5;
276
273
 
277
- var TypeError$7 = global$j.TypeError;
274
+ var TypeError$4 = global$d.TypeError;
278
275
 
279
276
  // `OrdinaryToPrimitive` abstract operation
280
277
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
281
278
  var ordinaryToPrimitive$1 = function (input, pref) {
282
279
  var fn, val;
283
- if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$5(val = call$4(fn, input))) return val;
284
- if (isCallable$9(fn = input.valueOf) && !isObject$5(val = call$4(fn, input))) return val;
285
- if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$5(val = call$4(fn, input))) return val;
286
- throw TypeError$7("Can't convert object to primitive value");
280
+ if (pref === 'string' && isCallable$4(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
281
+ if (isCallable$4(fn = input.valueOf) && !isObject$4(val = call$3(fn, input))) return val;
282
+ if (pref !== 'string' && isCallable$4(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
283
+ throw TypeError$4("Can't convert object to primitive value");
287
284
  };
288
285
 
289
286
  var shared$3 = {exports: {}};
290
287
 
291
- var global$i = global$r;
288
+ var global$c = global$l;
292
289
 
293
290
  // eslint-disable-next-line es/no-object-defineproperty -- safe
294
- var defineProperty$3 = Object.defineProperty;
291
+ var defineProperty$1 = Object.defineProperty;
295
292
 
296
293
  var setGlobal$3 = function (key, value) {
297
294
  try {
298
- defineProperty$3(global$i, key, { value: value, configurable: true, writable: true });
295
+ defineProperty$1(global$c, key, { value: value, configurable: true, writable: true });
299
296
  } catch (error) {
300
- global$i[key] = value;
297
+ global$c[key] = value;
301
298
  } return value;
302
299
  };
303
300
 
304
- var global$h = global$r;
301
+ var global$b = global$l;
305
302
  var setGlobal$2 = setGlobal$3;
306
303
 
307
304
  var SHARED = '__core-js_shared__';
308
- var store$4 = global$h[SHARED] || setGlobal$2(SHARED, {});
305
+ var store$3 = global$b[SHARED] || setGlobal$2(SHARED, {});
309
306
 
310
- var sharedStore = store$4;
307
+ var sharedStore = store$3;
311
308
 
312
- var store$3 = sharedStore;
309
+ var store$2 = sharedStore;
313
310
 
314
311
  (shared$3.exports = function (key, value) {
315
- return store$3[key] || (store$3[key] = value !== undefined ? value : {});
312
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
316
313
  })('versions', []).push({
317
314
  version: '3.21.1',
318
315
  mode: 'global',
@@ -321,54 +318,54 @@ var store$3 = sharedStore;
321
318
  source: 'https://github.com/zloirock/core-js'
322
319
  });
323
320
 
324
- var global$g = global$r;
325
- var requireObjectCoercible$1 = requireObjectCoercible$3;
321
+ var global$a = global$l;
322
+ var requireObjectCoercible = requireObjectCoercible$2;
326
323
 
327
- var Object$3 = global$g.Object;
324
+ var Object$1 = global$a.Object;
328
325
 
329
326
  // `ToObject` abstract operation
330
327
  // https://tc39.es/ecma262/#sec-toobject
331
- var toObject$3 = function (argument) {
332
- return Object$3(requireObjectCoercible$1(argument));
328
+ var toObject$2 = function (argument) {
329
+ return Object$1(requireObjectCoercible(argument));
333
330
  };
334
331
 
335
- var uncurryThis$8 = functionUncurryThis;
336
- var toObject$2 = toObject$3;
332
+ var uncurryThis$6 = functionUncurryThis;
333
+ var toObject$1 = toObject$2;
337
334
 
338
- var hasOwnProperty = uncurryThis$8({}.hasOwnProperty);
335
+ var hasOwnProperty = uncurryThis$6({}.hasOwnProperty);
339
336
 
340
337
  // `HasOwnProperty` abstract operation
341
338
  // https://tc39.es/ecma262/#sec-hasownproperty
342
339
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
343
- return hasOwnProperty(toObject$2(it), key);
340
+ return hasOwnProperty(toObject$1(it), key);
344
341
  };
345
342
 
346
- var uncurryThis$7 = functionUncurryThis;
343
+ var uncurryThis$5 = functionUncurryThis;
347
344
 
348
345
  var id = 0;
349
346
  var postfix = Math.random();
350
- var toString$2 = uncurryThis$7(1.0.toString);
347
+ var toString = uncurryThis$5(1.0.toString);
351
348
 
352
349
  var uid$2 = function (key) {
353
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$2(++id + postfix, 36);
350
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
354
351
  };
355
352
 
356
- var global$f = global$r;
353
+ var global$9 = global$l;
357
354
  var shared$2 = shared$3.exports;
358
- var hasOwn$8 = hasOwnProperty_1;
355
+ var hasOwn$6 = hasOwnProperty_1;
359
356
  var uid$1 = uid$2;
360
357
  var NATIVE_SYMBOL = nativeSymbol;
361
358
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
362
359
 
363
360
  var WellKnownSymbolsStore = shared$2('wks');
364
- var Symbol$1 = global$f.Symbol;
361
+ var Symbol$1 = global$9.Symbol;
365
362
  var symbolFor = Symbol$1 && Symbol$1['for'];
366
363
  var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
367
364
 
368
- var wellKnownSymbol$a = function (name) {
369
- if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
365
+ var wellKnownSymbol$1 = function (name) {
366
+ if (!hasOwn$6(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
370
367
  var description = 'Symbol.' + name;
371
- if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
368
+ if (NATIVE_SYMBOL && hasOwn$6(Symbol$1, name)) {
372
369
  WellKnownSymbolsStore[name] = Symbol$1[name];
373
370
  } else if (USE_SYMBOL_AS_UID && symbolFor) {
374
371
  WellKnownSymbolsStore[name] = symbolFor(description);
@@ -378,28 +375,28 @@ var wellKnownSymbol$a = function (name) {
378
375
  } return WellKnownSymbolsStore[name];
379
376
  };
380
377
 
381
- var global$e = global$r;
382
- var call$3 = functionCall;
383
- var isObject$4 = isObject$6;
378
+ var global$8 = global$l;
379
+ var call$2 = functionCall;
380
+ var isObject$3 = isObject$5;
384
381
  var isSymbol$1 = isSymbol$2;
385
382
  var getMethod = getMethod$1;
386
383
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
387
- var wellKnownSymbol$9 = wellKnownSymbol$a;
384
+ var wellKnownSymbol = wellKnownSymbol$1;
388
385
 
389
- var TypeError$6 = global$e.TypeError;
390
- var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
386
+ var TypeError$3 = global$8.TypeError;
387
+ var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
391
388
 
392
389
  // `ToPrimitive` abstract operation
393
390
  // https://tc39.es/ecma262/#sec-toprimitive
394
391
  var toPrimitive$1 = function (input, pref) {
395
- if (!isObject$4(input) || isSymbol$1(input)) return input;
392
+ if (!isObject$3(input) || isSymbol$1(input)) return input;
396
393
  var exoticToPrim = getMethod(input, TO_PRIMITIVE);
397
394
  var result;
398
395
  if (exoticToPrim) {
399
396
  if (pref === undefined) pref = 'default';
400
- result = call$3(exoticToPrim, input, pref);
401
- if (!isObject$4(result) || isSymbol$1(result)) return result;
402
- throw TypeError$6("Can't convert object to primitive value");
397
+ result = call$2(exoticToPrim, input, pref);
398
+ if (!isObject$3(result) || isSymbol$1(result)) return result;
399
+ throw TypeError$3("Can't convert object to primitive value");
403
400
  }
404
401
  if (pref === undefined) pref = 'number';
405
402
  return ordinaryToPrimitive(input, pref);
@@ -415,36 +412,36 @@ var toPropertyKey$2 = function (argument) {
415
412
  return isSymbol(key) ? key : key + '';
416
413
  };
417
414
 
418
- var global$d = global$r;
419
- var isObject$3 = isObject$6;
415
+ var global$7 = global$l;
416
+ var isObject$2 = isObject$5;
420
417
 
421
- var document$1 = global$d.document;
418
+ var document$1 = global$7.document;
422
419
  // typeof document.createElement is 'object' in old IE
423
- var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
420
+ var EXISTS$1 = isObject$2(document$1) && isObject$2(document$1.createElement);
424
421
 
425
- var documentCreateElement$2 = function (it) {
422
+ var documentCreateElement = function (it) {
426
423
  return EXISTS$1 ? document$1.createElement(it) : {};
427
424
  };
428
425
 
429
- var DESCRIPTORS$8 = descriptors;
430
- var fails$5 = fails$a;
431
- var createElement = documentCreateElement$2;
426
+ var DESCRIPTORS$6 = descriptors;
427
+ var fails$3 = fails$8;
428
+ var createElement = documentCreateElement;
432
429
 
433
430
  // Thanks to IE8 for its funny defineProperty
434
- var ie8DomDefine = !DESCRIPTORS$8 && !fails$5(function () {
431
+ var ie8DomDefine = !DESCRIPTORS$6 && !fails$3(function () {
435
432
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
436
433
  return Object.defineProperty(createElement('div'), 'a', {
437
434
  get: function () { return 7; }
438
435
  }).a != 7;
439
436
  });
440
437
 
441
- var DESCRIPTORS$7 = descriptors;
442
- var call$2 = functionCall;
438
+ var DESCRIPTORS$5 = descriptors;
439
+ var call$1 = functionCall;
443
440
  var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
444
- var createPropertyDescriptor$2 = createPropertyDescriptor$3;
445
- var toIndexedObject$4 = toIndexedObject$5;
441
+ var createPropertyDescriptor$1 = createPropertyDescriptor$2;
442
+ var toIndexedObject$2 = toIndexedObject$3;
446
443
  var toPropertyKey$1 = toPropertyKey$2;
447
- var hasOwn$7 = hasOwnProperty_1;
444
+ var hasOwn$5 = hasOwnProperty_1;
448
445
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
449
446
 
450
447
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -452,23 +449,23 @@ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
452
449
 
453
450
  // `Object.getOwnPropertyDescriptor` method
454
451
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
455
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$7 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
456
- O = toIndexedObject$4(O);
452
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$5 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
453
+ O = toIndexedObject$2(O);
457
454
  P = toPropertyKey$1(P);
458
455
  if (IE8_DOM_DEFINE$1) try {
459
456
  return $getOwnPropertyDescriptor$1(O, P);
460
457
  } catch (error) { /* empty */ }
461
- if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
458
+ if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$1(propertyIsEnumerableModule$1.f, O, P), O[P]);
462
459
  };
463
460
 
464
461
  var objectDefineProperty = {};
465
462
 
466
- var DESCRIPTORS$6 = descriptors;
467
- var fails$4 = fails$a;
463
+ var DESCRIPTORS$4 = descriptors;
464
+ var fails$2 = fails$8;
468
465
 
469
466
  // V8 ~ Chrome 36-
470
467
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
471
- var v8PrototypeDefineBug = DESCRIPTORS$6 && fails$4(function () {
468
+ var v8PrototypeDefineBug = DESCRIPTORS$4 && fails$2(function () {
472
469
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
473
470
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
474
471
  value: 42,
@@ -476,26 +473,26 @@ var v8PrototypeDefineBug = DESCRIPTORS$6 && fails$4(function () {
476
473
  }).prototype != 42;
477
474
  });
478
475
 
479
- var global$c = global$r;
480
- var isObject$2 = isObject$6;
476
+ var global$6 = global$l;
477
+ var isObject$1 = isObject$5;
481
478
 
482
- var String$3 = global$c.String;
483
- var TypeError$5 = global$c.TypeError;
479
+ var String$1 = global$6.String;
480
+ var TypeError$2 = global$6.TypeError;
484
481
 
485
482
  // `Assert: Type(argument) is Object`
486
- var anObject$5 = function (argument) {
487
- if (isObject$2(argument)) return argument;
488
- throw TypeError$5(String$3(argument) + ' is not an object');
483
+ var anObject$2 = function (argument) {
484
+ if (isObject$1(argument)) return argument;
485
+ throw TypeError$2(String$1(argument) + ' is not an object');
489
486
  };
490
487
 
491
- var global$b = global$r;
492
- var DESCRIPTORS$5 = descriptors;
488
+ var global$5 = global$l;
489
+ var DESCRIPTORS$3 = descriptors;
493
490
  var IE8_DOM_DEFINE = ie8DomDefine;
494
- var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
495
- var anObject$4 = anObject$5;
491
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
492
+ var anObject$1 = anObject$2;
496
493
  var toPropertyKey = toPropertyKey$2;
497
494
 
498
- var TypeError$4 = global$b.TypeError;
495
+ var TypeError$1 = global$5.TypeError;
499
496
  // eslint-disable-next-line es/no-object-defineproperty -- safe
500
497
  var $defineProperty = Object.defineProperty;
501
498
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -506,10 +503,10 @@ var WRITABLE = 'writable';
506
503
 
507
504
  // `Object.defineProperty` method
508
505
  // https://tc39.es/ecma262/#sec-object.defineproperty
509
- objectDefineProperty.f = DESCRIPTORS$5 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
510
- anObject$4(O);
506
+ objectDefineProperty.f = DESCRIPTORS$3 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
507
+ anObject$1(O);
511
508
  P = toPropertyKey(P);
512
- anObject$4(Attributes);
509
+ anObject$1(Attributes);
513
510
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
514
511
  var current = $getOwnPropertyDescriptor(O, P);
515
512
  if (current && current[WRITABLE]) {
@@ -522,77 +519,77 @@ objectDefineProperty.f = DESCRIPTORS$5 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
522
519
  }
523
520
  } return $defineProperty(O, P, Attributes);
524
521
  } : $defineProperty : function defineProperty(O, P, Attributes) {
525
- anObject$4(O);
522
+ anObject$1(O);
526
523
  P = toPropertyKey(P);
527
- anObject$4(Attributes);
524
+ anObject$1(Attributes);
528
525
  if (IE8_DOM_DEFINE) try {
529
526
  return $defineProperty(O, P, Attributes);
530
527
  } catch (error) { /* empty */ }
531
- if ('get' in Attributes || 'set' in Attributes) throw TypeError$4('Accessors not supported');
528
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError$1('Accessors not supported');
532
529
  if ('value' in Attributes) O[P] = Attributes.value;
533
530
  return O;
534
531
  };
535
532
 
536
- var DESCRIPTORS$4 = descriptors;
537
- var definePropertyModule$3 = objectDefineProperty;
538
- var createPropertyDescriptor$1 = createPropertyDescriptor$3;
533
+ var DESCRIPTORS$2 = descriptors;
534
+ var definePropertyModule$1 = objectDefineProperty;
535
+ var createPropertyDescriptor = createPropertyDescriptor$2;
539
536
 
540
- var createNonEnumerableProperty$5 = DESCRIPTORS$4 ? function (object, key, value) {
541
- return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
537
+ var createNonEnumerableProperty$3 = DESCRIPTORS$2 ? function (object, key, value) {
538
+ return definePropertyModule$1.f(object, key, createPropertyDescriptor(1, value));
542
539
  } : function (object, key, value) {
543
540
  object[key] = value;
544
541
  return object;
545
542
  };
546
543
 
547
- var redefine$3 = {exports: {}};
544
+ var redefine$1 = {exports: {}};
548
545
 
549
- var uncurryThis$6 = functionUncurryThis;
550
- var isCallable$8 = isCallable$e;
551
- var store$2 = sharedStore;
546
+ var uncurryThis$4 = functionUncurryThis;
547
+ var isCallable$3 = isCallable$9;
548
+ var store$1 = sharedStore;
552
549
 
553
- var functionToString = uncurryThis$6(Function.toString);
550
+ var functionToString = uncurryThis$4(Function.toString);
554
551
 
555
552
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
556
- if (!isCallable$8(store$2.inspectSource)) {
557
- store$2.inspectSource = function (it) {
553
+ if (!isCallable$3(store$1.inspectSource)) {
554
+ store$1.inspectSource = function (it) {
558
555
  return functionToString(it);
559
556
  };
560
557
  }
561
558
 
562
- var inspectSource$2 = store$2.inspectSource;
559
+ var inspectSource$2 = store$1.inspectSource;
563
560
 
564
- var global$a = global$r;
565
- var isCallable$7 = isCallable$e;
561
+ var global$4 = global$l;
562
+ var isCallable$2 = isCallable$9;
566
563
  var inspectSource$1 = inspectSource$2;
567
564
 
568
- var WeakMap$1 = global$a.WeakMap;
565
+ var WeakMap$1 = global$4.WeakMap;
569
566
 
570
- var nativeWeakMap = isCallable$7(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
567
+ var nativeWeakMap = isCallable$2(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
571
568
 
572
569
  var shared$1 = shared$3.exports;
573
570
  var uid = uid$2;
574
571
 
575
572
  var keys = shared$1('keys');
576
573
 
577
- var sharedKey$3 = function (key) {
574
+ var sharedKey$1 = function (key) {
578
575
  return keys[key] || (keys[key] = uid(key));
579
576
  };
580
577
 
581
- var hiddenKeys$4 = {};
578
+ var hiddenKeys$3 = {};
582
579
 
583
580
  var NATIVE_WEAK_MAP = nativeWeakMap;
584
- var global$9 = global$r;
585
- var uncurryThis$5 = functionUncurryThis;
586
- var isObject$1 = isObject$6;
587
- var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
588
- var hasOwn$6 = hasOwnProperty_1;
581
+ var global$3 = global$l;
582
+ var uncurryThis$3 = functionUncurryThis;
583
+ var isObject = isObject$5;
584
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
585
+ var hasOwn$4 = hasOwnProperty_1;
589
586
  var shared = sharedStore;
590
- var sharedKey$2 = sharedKey$3;
591
- var hiddenKeys$3 = hiddenKeys$4;
587
+ var sharedKey = sharedKey$1;
588
+ var hiddenKeys$2 = hiddenKeys$3;
592
589
 
593
590
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
594
- var TypeError$3 = global$9.TypeError;
595
- var WeakMap = global$9.WeakMap;
591
+ var TypeError = global$3.TypeError;
592
+ var WeakMap = global$3.WeakMap;
596
593
  var set, get, has;
597
594
 
598
595
  var enforce = function (it) {
@@ -602,43 +599,43 @@ var enforce = function (it) {
602
599
  var getterFor = function (TYPE) {
603
600
  return function (it) {
604
601
  var state;
605
- if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
606
- throw TypeError$3('Incompatible receiver, ' + TYPE + ' required');
602
+ if (!isObject(it) || (state = get(it)).type !== TYPE) {
603
+ throw TypeError('Incompatible receiver, ' + TYPE + ' required');
607
604
  } return state;
608
605
  };
609
606
  };
610
607
 
611
608
  if (NATIVE_WEAK_MAP || shared.state) {
612
- var store$1 = shared.state || (shared.state = new WeakMap());
613
- var wmget = uncurryThis$5(store$1.get);
614
- var wmhas = uncurryThis$5(store$1.has);
615
- var wmset = uncurryThis$5(store$1.set);
609
+ var store = shared.state || (shared.state = new WeakMap());
610
+ var wmget = uncurryThis$3(store.get);
611
+ var wmhas = uncurryThis$3(store.has);
612
+ var wmset = uncurryThis$3(store.set);
616
613
  set = function (it, metadata) {
617
- if (wmhas(store$1, it)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED);
614
+ if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
618
615
  metadata.facade = it;
619
- wmset(store$1, it, metadata);
616
+ wmset(store, it, metadata);
620
617
  return metadata;
621
618
  };
622
619
  get = function (it) {
623
- return wmget(store$1, it) || {};
620
+ return wmget(store, it) || {};
624
621
  };
625
622
  has = function (it) {
626
- return wmhas(store$1, it);
623
+ return wmhas(store, it);
627
624
  };
628
625
  } else {
629
- var STATE = sharedKey$2('state');
630
- hiddenKeys$3[STATE] = true;
626
+ var STATE = sharedKey('state');
627
+ hiddenKeys$2[STATE] = true;
631
628
  set = function (it, metadata) {
632
- if (hasOwn$6(it, STATE)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED);
629
+ if (hasOwn$4(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
633
630
  metadata.facade = it;
634
- createNonEnumerableProperty$4(it, STATE, metadata);
631
+ createNonEnumerableProperty$2(it, STATE, metadata);
635
632
  return metadata;
636
633
  };
637
634
  get = function (it) {
638
- return hasOwn$6(it, STATE) ? it[STATE] : {};
635
+ return hasOwn$4(it, STATE) ? it[STATE] : {};
639
636
  };
640
637
  has = function (it) {
641
- return hasOwn$6(it, STATE);
638
+ return hasOwn$4(it, STATE);
642
639
  };
643
640
  }
644
641
 
@@ -650,17 +647,17 @@ var internalState = {
650
647
  getterFor: getterFor
651
648
  };
652
649
 
653
- var DESCRIPTORS$3 = descriptors;
654
- var hasOwn$5 = hasOwnProperty_1;
650
+ var DESCRIPTORS$1 = descriptors;
651
+ var hasOwn$3 = hasOwnProperty_1;
655
652
 
656
653
  var FunctionPrototype = Function.prototype;
657
654
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
658
- var getDescriptor = DESCRIPTORS$3 && Object.getOwnPropertyDescriptor;
655
+ var getDescriptor = DESCRIPTORS$1 && Object.getOwnPropertyDescriptor;
659
656
 
660
- var EXISTS = hasOwn$5(FunctionPrototype, 'name');
657
+ var EXISTS = hasOwn$3(FunctionPrototype, 'name');
661
658
  // additional protection from minified / mangled / dropped function names
662
659
  var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
663
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype, 'name').configurable));
660
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$1 || (DESCRIPTORS$1 && getDescriptor(FunctionPrototype, 'name').configurable));
664
661
 
665
662
  var functionName = {
666
663
  EXISTS: EXISTS,
@@ -668,38 +665,38 @@ var functionName = {
668
665
  CONFIGURABLE: CONFIGURABLE
669
666
  };
670
667
 
671
- var global$8 = global$r;
672
- var isCallable$6 = isCallable$e;
673
- var hasOwn$4 = hasOwnProperty_1;
674
- var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
668
+ var global$2 = global$l;
669
+ var isCallable$1 = isCallable$9;
670
+ var hasOwn$2 = hasOwnProperty_1;
671
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$3;
675
672
  var setGlobal$1 = setGlobal$3;
676
673
  var inspectSource = inspectSource$2;
677
- var InternalStateModule$1 = internalState;
678
- var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
674
+ var InternalStateModule = internalState;
675
+ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
679
676
 
680
- var getInternalState$1 = InternalStateModule$1.get;
681
- var enforceInternalState = InternalStateModule$1.enforce;
677
+ var getInternalState = InternalStateModule.get;
678
+ var enforceInternalState = InternalStateModule.enforce;
682
679
  var TEMPLATE = String(String).split('String');
683
680
 
684
- (redefine$3.exports = function (O, key, value, options) {
681
+ (redefine$1.exports = function (O, key, value, options) {
685
682
  var unsafe = options ? !!options.unsafe : false;
686
683
  var simple = options ? !!options.enumerable : false;
687
684
  var noTargetGet = options ? !!options.noTargetGet : false;
688
685
  var name = options && options.name !== undefined ? options.name : key;
689
686
  var state;
690
- if (isCallable$6(value)) {
687
+ if (isCallable$1(value)) {
691
688
  if (String(name).slice(0, 7) === 'Symbol(') {
692
689
  name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
693
690
  }
694
- if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
695
- createNonEnumerableProperty$3(value, 'name', name);
691
+ if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
692
+ createNonEnumerableProperty$1(value, 'name', name);
696
693
  }
697
694
  state = enforceInternalState(value);
698
695
  if (!state.source) {
699
696
  state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
700
697
  }
701
698
  }
702
- if (O === global$8) {
699
+ if (O === global$2) {
703
700
  if (simple) O[key] = value;
704
701
  else setGlobal$1(key, value);
705
702
  return;
@@ -709,10 +706,10 @@ var TEMPLATE = String(String).split('String');
709
706
  simple = true;
710
707
  }
711
708
  if (simple) O[key] = value;
712
- else createNonEnumerableProperty$3(O, key, value);
709
+ else createNonEnumerableProperty$1(O, key, value);
713
710
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
714
711
  })(Function.prototype, 'toString', function toString() {
715
- return isCallable$6(this) && getInternalState$1(this).source || inspectSource(this);
712
+ return isCallable$1(this) && getInternalState(this).source || inspectSource(this);
716
713
  });
717
714
 
718
715
  var objectGetOwnPropertyNames = {};
@@ -759,14 +756,14 @@ var lengthOfArrayLike$1 = function (obj) {
759
756
  return toLength(obj.length);
760
757
  };
761
758
 
762
- var toIndexedObject$3 = toIndexedObject$5;
759
+ var toIndexedObject$1 = toIndexedObject$3;
763
760
  var toAbsoluteIndex = toAbsoluteIndex$1;
764
761
  var lengthOfArrayLike = lengthOfArrayLike$1;
765
762
 
766
763
  // `Array.prototype.{ indexOf, includes }` methods implementation
767
764
  var createMethod = function (IS_INCLUDES) {
768
765
  return function ($this, el, fromIndex) {
769
- var O = toIndexedObject$3($this);
766
+ var O = toIndexedObject$1($this);
770
767
  var length = lengthOfArrayLike(O);
771
768
  var index = toAbsoluteIndex(fromIndex, length);
772
769
  var value;
@@ -792,29 +789,29 @@ var arrayIncludes = {
792
789
  indexOf: createMethod(false)
793
790
  };
794
791
 
795
- var uncurryThis$4 = functionUncurryThis;
796
- var hasOwn$3 = hasOwnProperty_1;
797
- var toIndexedObject$2 = toIndexedObject$5;
792
+ var uncurryThis$2 = functionUncurryThis;
793
+ var hasOwn$1 = hasOwnProperty_1;
794
+ var toIndexedObject = toIndexedObject$3;
798
795
  var indexOf = arrayIncludes.indexOf;
799
- var hiddenKeys$2 = hiddenKeys$4;
796
+ var hiddenKeys$1 = hiddenKeys$3;
800
797
 
801
- var push = uncurryThis$4([].push);
798
+ var push = uncurryThis$2([].push);
802
799
 
803
800
  var objectKeysInternal = function (object, names) {
804
- var O = toIndexedObject$2(object);
801
+ var O = toIndexedObject(object);
805
802
  var i = 0;
806
803
  var result = [];
807
804
  var key;
808
- for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push(result, key);
805
+ for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && push(result, key);
809
806
  // Don't enum bug & hidden keys
810
- while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
807
+ while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
811
808
  ~indexOf(result, key) || push(result, key);
812
809
  }
813
810
  return result;
814
811
  };
815
812
 
816
813
  // IE8- don't enum bug keys
817
- var enumBugKeys$3 = [
814
+ var enumBugKeys$2 = [
818
815
  'constructor',
819
816
  'hasOwnProperty',
820
817
  'isPrototypeOf',
@@ -825,15 +822,15 @@ var enumBugKeys$3 = [
825
822
  ];
826
823
 
827
824
  var internalObjectKeys$1 = objectKeysInternal;
828
- var enumBugKeys$2 = enumBugKeys$3;
825
+ var enumBugKeys$1 = enumBugKeys$2;
829
826
 
830
- var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
827
+ var hiddenKeys = enumBugKeys$1.concat('length', 'prototype');
831
828
 
832
829
  // `Object.getOwnPropertyNames` method
833
830
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
834
831
  // eslint-disable-next-line es/no-object-getownpropertynames -- safe
835
832
  objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
836
- return internalObjectKeys$1(O, hiddenKeys$1);
833
+ return internalObjectKeys$1(O, hiddenKeys);
837
834
  };
838
835
 
839
836
  var objectGetOwnPropertySymbols = {};
@@ -841,40 +838,40 @@ var objectGetOwnPropertySymbols = {};
841
838
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
842
839
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
843
840
 
844
- var getBuiltIn$1 = getBuiltIn$4;
845
- var uncurryThis$3 = functionUncurryThis;
841
+ var getBuiltIn = getBuiltIn$3;
842
+ var uncurryThis$1 = functionUncurryThis;
846
843
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
847
844
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
848
- var anObject$3 = anObject$5;
845
+ var anObject = anObject$2;
849
846
 
850
- var concat$1 = uncurryThis$3([].concat);
847
+ var concat$1 = uncurryThis$1([].concat);
851
848
 
852
849
  // all object keys, includes non-enumerable and symbols
853
- var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
854
- var keys = getOwnPropertyNamesModule.f(anObject$3(it));
850
+ var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
851
+ var keys = getOwnPropertyNamesModule.f(anObject(it));
855
852
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
856
853
  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
857
854
  };
858
855
 
859
- var hasOwn$2 = hasOwnProperty_1;
856
+ var hasOwn = hasOwnProperty_1;
860
857
  var ownKeys = ownKeys$1;
861
858
  var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
862
- var definePropertyModule$2 = objectDefineProperty;
859
+ var definePropertyModule = objectDefineProperty;
863
860
 
864
861
  var copyConstructorProperties$1 = function (target, source, exceptions) {
865
862
  var keys = ownKeys(source);
866
- var defineProperty = definePropertyModule$2.f;
863
+ var defineProperty = definePropertyModule.f;
867
864
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
868
865
  for (var i = 0; i < keys.length; i++) {
869
866
  var key = keys[i];
870
- if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
867
+ if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
871
868
  defineProperty(target, key, getOwnPropertyDescriptor(source, key));
872
869
  }
873
870
  }
874
871
  };
875
872
 
876
- var fails$3 = fails$a;
877
- var isCallable$5 = isCallable$e;
873
+ var fails$1 = fails$8;
874
+ var isCallable = isCallable$9;
878
875
 
879
876
  var replacement = /#|\.prototype\./;
880
877
 
@@ -882,7 +879,7 @@ var isForced$1 = function (feature, detection) {
882
879
  var value = data[normalize(feature)];
883
880
  return value == POLYFILL ? true
884
881
  : value == NATIVE ? false
885
- : isCallable$5(detection) ? fails$3(detection)
882
+ : isCallable(detection) ? fails$1(detection)
886
883
  : !!detection;
887
884
  };
888
885
 
@@ -896,10 +893,10 @@ var POLYFILL = isForced$1.POLYFILL = 'P';
896
893
 
897
894
  var isForced_1 = isForced$1;
898
895
 
899
- var global$7 = global$r;
896
+ var global$1 = global$l;
900
897
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
901
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
902
- var redefine$2 = redefine$3.exports;
898
+ var createNonEnumerableProperty = createNonEnumerableProperty$3;
899
+ var redefine = redefine$1.exports;
903
900
  var setGlobal = setGlobal$3;
904
901
  var copyConstructorProperties = copyConstructorProperties$1;
905
902
  var isForced = isForced_1;
@@ -925,11 +922,11 @@ var _export = function (options, source) {
925
922
  var STATIC = options.stat;
926
923
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
927
924
  if (GLOBAL) {
928
- target = global$7;
925
+ target = global$1;
929
926
  } else if (STATIC) {
930
- target = global$7[TARGET] || setGlobal(TARGET, {});
927
+ target = global$1[TARGET] || setGlobal(TARGET, {});
931
928
  } else {
932
- target = (global$7[TARGET] || {}).prototype;
929
+ target = (global$1[TARGET] || {}).prototype;
933
930
  }
934
931
  if (target) for (key in source) {
935
932
  sourceProperty = source[key];
@@ -945,47 +942,47 @@ var _export = function (options, source) {
945
942
  }
946
943
  // add a flag to not completely full polyfills
947
944
  if (options.sham || (targetProperty && targetProperty.sham)) {
948
- createNonEnumerableProperty$2(sourceProperty, 'sham', true);
945
+ createNonEnumerableProperty(sourceProperty, 'sham', true);
949
946
  }
950
947
  // extend global
951
- redefine$2(target, key, sourceProperty, options);
948
+ redefine(target, key, sourceProperty, options);
952
949
  }
953
950
  };
954
951
 
955
952
  var internalObjectKeys = objectKeysInternal;
956
- var enumBugKeys$1 = enumBugKeys$3;
953
+ var enumBugKeys = enumBugKeys$2;
957
954
 
958
955
  // `Object.keys` method
959
956
  // https://tc39.es/ecma262/#sec-object.keys
960
957
  // eslint-disable-next-line es/no-object-keys -- safe
961
- var objectKeys$2 = Object.keys || function keys(O) {
962
- return internalObjectKeys(O, enumBugKeys$1);
958
+ var objectKeys$1 = Object.keys || function keys(O) {
959
+ return internalObjectKeys(O, enumBugKeys);
963
960
  };
964
961
 
965
- var DESCRIPTORS$2 = descriptors;
966
- var uncurryThis$2 = functionUncurryThis;
967
- var call$1 = functionCall;
968
- var fails$2 = fails$a;
969
- var objectKeys$1 = objectKeys$2;
962
+ var DESCRIPTORS = descriptors;
963
+ var uncurryThis = functionUncurryThis;
964
+ var call = functionCall;
965
+ var fails = fails$8;
966
+ var objectKeys = objectKeys$1;
970
967
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
971
968
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
972
- var toObject$1 = toObject$3;
969
+ var toObject = toObject$2;
973
970
  var IndexedObject = indexedObject;
974
971
 
975
972
  // eslint-disable-next-line es/no-object-assign -- safe
976
973
  var $assign = Object.assign;
977
974
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
978
- var defineProperty$2 = Object.defineProperty;
979
- var concat = uncurryThis$2([].concat);
975
+ var defineProperty = Object.defineProperty;
976
+ var concat = uncurryThis([].concat);
980
977
 
981
978
  // `Object.assign` method
982
979
  // https://tc39.es/ecma262/#sec-object.assign
983
- var objectAssign = !$assign || fails$2(function () {
980
+ var objectAssign = !$assign || fails(function () {
984
981
  // should have correct order of operations (Edge bug)
985
- if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
982
+ if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
986
983
  enumerable: true,
987
984
  get: function () {
988
- defineProperty$2(this, 'b', {
985
+ defineProperty(this, 'b', {
989
986
  value: 3,
990
987
  enumerable: false
991
988
  });
@@ -999,820 +996,90 @@ var objectAssign = !$assign || fails$2(function () {
999
996
  var alphabet = 'abcdefghijklmnopqrst';
1000
997
  A[symbol] = 7;
1001
998
  alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1002
- return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
999
+ return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
1003
1000
  }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1004
- var T = toObject$1(target);
1001
+ var T = toObject(target);
1005
1002
  var argumentsLength = arguments.length;
1006
1003
  var index = 1;
1007
1004
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1008
1005
  var propertyIsEnumerable = propertyIsEnumerableModule.f;
1009
1006
  while (argumentsLength > index) {
1010
1007
  var S = IndexedObject(arguments[index++]);
1011
- var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
1008
+ var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1012
1009
  var length = keys.length;
1013
1010
  var j = 0;
1014
1011
  var key;
1015
1012
  while (length > j) {
1016
1013
  key = keys[j++];
1017
- if (!DESCRIPTORS$2 || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
1014
+ if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
1018
1015
  }
1019
1016
  } return T;
1020
1017
  } : $assign;
1021
1018
 
1022
- var $$2 = _export;
1019
+ var $ = _export;
1023
1020
  var assign = objectAssign;
1024
1021
 
1025
1022
  // `Object.assign` method
1026
1023
  // https://tc39.es/ecma262/#sec-object.assign
1027
1024
  // eslint-disable-next-line es/no-object-assign -- required for testing
1028
- $$2({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
1025
+ $({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
1029
1026
  assign: assign
1030
1027
  });
1031
1028
 
1032
- const DRAWER_OPEN = 'drawer/open';
1033
- const DRAWER_CLOSE = 'drawer/close';
1034
- const DRAWER_TOGGLE = 'drawer/toggle';
1035
- const openDrawer$1 = createAction(DRAWER_OPEN);
1036
- const closeDrawer$1 = createAction(DRAWER_CLOSE);
1037
- const toggleDrawer$1 = createAction(DRAWER_TOGGLE);
1038
-
1039
- const initialState$1 = {
1040
- isOpen: false
1041
- }; // DRAWER REDUCER
1042
-
1043
- const reducer$1 = createReducer(initialState$1, builder => {
1044
- builder.addCase(openDrawer$1, state => {
1045
- state.isOpen = true;
1046
- });
1047
- builder.addCase(closeDrawer$1, state => {
1048
- state.isOpen = false;
1049
- });
1050
- builder.addCase(toggleDrawer$1, state => {
1051
- state.isOpen = !state.isOpen;
1052
- });
1053
- });
1054
-
1055
- var isObject = isObject$6;
1056
- var classof$2 = classofRaw$1;
1057
- var wellKnownSymbol$8 = wellKnownSymbol$a;
1058
-
1059
- var MATCH$1 = wellKnownSymbol$8('match');
1060
-
1061
- // `IsRegExp` abstract operation
1062
- // https://tc39.es/ecma262/#sec-isregexp
1063
- var isRegexp = function (it) {
1064
- var isRegExp;
1065
- return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$2(it) == 'RegExp');
1066
- };
1067
-
1068
- var global$6 = global$r;
1069
- var isRegExp = isRegexp;
1070
-
1071
- var TypeError$2 = global$6.TypeError;
1072
-
1073
- var notARegexp = function (it) {
1074
- if (isRegExp(it)) {
1075
- throw TypeError$2("The method doesn't accept regular expressions");
1076
- } return it;
1077
- };
1078
-
1079
- var wellKnownSymbol$7 = wellKnownSymbol$a;
1080
-
1081
- var TO_STRING_TAG$3 = wellKnownSymbol$7('toStringTag');
1082
- var test = {};
1083
-
1084
- test[TO_STRING_TAG$3] = 'z';
1085
-
1086
- var toStringTagSupport = String(test) === '[object z]';
1087
-
1088
- var global$5 = global$r;
1089
- var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1090
- var isCallable$4 = isCallable$e;
1091
- var classofRaw = classofRaw$1;
1092
- var wellKnownSymbol$6 = wellKnownSymbol$a;
1093
-
1094
- var TO_STRING_TAG$2 = wellKnownSymbol$6('toStringTag');
1095
- var Object$2 = global$5.Object;
1096
-
1097
- // ES3 wrong here
1098
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1099
-
1100
- // fallback for IE11 Script Access Denied error
1101
- var tryGet = function (it, key) {
1102
- try {
1103
- return it[key];
1104
- } catch (error) { /* empty */ }
1105
- };
1106
-
1107
- // getting tag from ES6+ `Object.prototype.toString`
1108
- var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1109
- var O, tag, result;
1110
- return it === undefined ? 'Undefined' : it === null ? 'Null'
1111
- // @@toStringTag case
1112
- : typeof (tag = tryGet(O = Object$2(it), TO_STRING_TAG$2)) == 'string' ? tag
1113
- // builtinTag case
1114
- : CORRECT_ARGUMENTS ? classofRaw(O)
1115
- // ES3 arguments fallback
1116
- : (result = classofRaw(O)) == 'Object' && isCallable$4(O.callee) ? 'Arguments' : result;
1117
- };
1118
-
1119
- var global$4 = global$r;
1120
- var classof = classof$1;
1121
-
1122
- var String$2 = global$4.String;
1123
-
1124
- var toString$1 = function (argument) {
1125
- if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1126
- return String$2(argument);
1127
- };
1128
-
1129
- var wellKnownSymbol$5 = wellKnownSymbol$a;
1130
-
1131
- var MATCH = wellKnownSymbol$5('match');
1132
-
1133
- var correctIsRegexpLogic = function (METHOD_NAME) {
1134
- var regexp = /./;
1135
- try {
1136
- '/./'[METHOD_NAME](regexp);
1137
- } catch (error1) {
1138
- try {
1139
- regexp[MATCH] = false;
1140
- return '/./'[METHOD_NAME](regexp);
1141
- } catch (error2) { /* empty */ }
1142
- } return false;
1143
- };
1144
-
1145
- var $$1 = _export;
1146
- var uncurryThis$1 = functionUncurryThis;
1147
- var notARegExp = notARegexp;
1148
- var requireObjectCoercible = requireObjectCoercible$3;
1149
- var toString = toString$1;
1150
- var correctIsRegExpLogic = correctIsRegexpLogic;
1151
-
1152
- var stringIndexOf = uncurryThis$1(''.indexOf);
1153
-
1154
- // `String.prototype.includes` method
1155
- // https://tc39.es/ecma262/#sec-string.prototype.includes
1156
- $$1({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
1157
- includes: function includes(searchString /* , position = 0 */) {
1158
- return !!~stringIndexOf(
1159
- toString(requireObjectCoercible(this)),
1160
- toString(notARegExp(searchString)),
1161
- arguments.length > 1 ? arguments[1] : undefined
1162
- );
1163
- }
1164
- });
1165
-
1166
- var objectDefineProperties = {};
1167
-
1168
- var DESCRIPTORS$1 = descriptors;
1169
- var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1170
- var definePropertyModule$1 = objectDefineProperty;
1171
- var anObject$2 = anObject$5;
1172
- var toIndexedObject$1 = toIndexedObject$5;
1173
- var objectKeys = objectKeys$2;
1174
-
1175
- // `Object.defineProperties` method
1176
- // https://tc39.es/ecma262/#sec-object.defineproperties
1177
- // eslint-disable-next-line es/no-object-defineproperties -- safe
1178
- objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1179
- anObject$2(O);
1180
- var props = toIndexedObject$1(Properties);
1181
- var keys = objectKeys(Properties);
1182
- var length = keys.length;
1183
- var index = 0;
1184
- var key;
1185
- while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]);
1186
- return O;
1187
- };
1188
-
1189
- var getBuiltIn = getBuiltIn$4;
1190
-
1191
- var html$1 = getBuiltIn('document', 'documentElement');
1192
-
1193
- /* global ActiveXObject -- old IE, WSH */
1194
-
1195
- var anObject$1 = anObject$5;
1196
- var definePropertiesModule = objectDefineProperties;
1197
- var enumBugKeys = enumBugKeys$3;
1198
- var hiddenKeys = hiddenKeys$4;
1199
- var html = html$1;
1200
- var documentCreateElement$1 = documentCreateElement$2;
1201
- var sharedKey$1 = sharedKey$3;
1202
-
1203
- var GT = '>';
1204
- var LT = '<';
1205
- var PROTOTYPE = 'prototype';
1206
- var SCRIPT = 'script';
1207
- var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1208
-
1209
- var EmptyConstructor = function () { /* empty */ };
1210
-
1211
- var scriptTag = function (content) {
1212
- return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1213
- };
1214
-
1215
- // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1216
- var NullProtoObjectViaActiveX = function (activeXDocument) {
1217
- activeXDocument.write(scriptTag(''));
1218
- activeXDocument.close();
1219
- var temp = activeXDocument.parentWindow.Object;
1220
- activeXDocument = null; // avoid memory leak
1221
- return temp;
1222
- };
1223
-
1224
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
1225
- var NullProtoObjectViaIFrame = function () {
1226
- // Thrash, waste and sodomy: IE GC bug
1227
- var iframe = documentCreateElement$1('iframe');
1228
- var JS = 'java' + SCRIPT + ':';
1229
- var iframeDocument;
1230
- iframe.style.display = 'none';
1231
- html.appendChild(iframe);
1232
- // https://github.com/zloirock/core-js/issues/475
1233
- iframe.src = String(JS);
1234
- iframeDocument = iframe.contentWindow.document;
1235
- iframeDocument.open();
1236
- iframeDocument.write(scriptTag('document.F=Object'));
1237
- iframeDocument.close();
1238
- return iframeDocument.F;
1239
- };
1240
-
1241
- // Check for document.domain and active x support
1242
- // No need to use active x approach when document.domain is not set
1243
- // see https://github.com/es-shims/es5-shim/issues/150
1244
- // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1245
- // avoid IE GC bug
1246
- var activeXDocument;
1247
- var NullProtoObject = function () {
1248
- try {
1249
- activeXDocument = new ActiveXObject('htmlfile');
1250
- } catch (error) { /* ignore */ }
1251
- NullProtoObject = typeof document != 'undefined'
1252
- ? document.domain && activeXDocument
1253
- ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1254
- : NullProtoObjectViaIFrame()
1255
- : NullProtoObjectViaActiveX(activeXDocument); // WSH
1256
- var length = enumBugKeys.length;
1257
- while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1258
- return NullProtoObject();
1259
- };
1260
-
1261
- hiddenKeys[IE_PROTO$1] = true;
1262
-
1263
- // `Object.create` method
1264
- // https://tc39.es/ecma262/#sec-object.create
1265
- var objectCreate = Object.create || function create(O, Properties) {
1266
- var result;
1267
- if (O !== null) {
1268
- EmptyConstructor[PROTOTYPE] = anObject$1(O);
1269
- result = new EmptyConstructor();
1270
- EmptyConstructor[PROTOTYPE] = null;
1271
- // add "__proto__" for Object.getPrototypeOf polyfill
1272
- result[IE_PROTO$1] = O;
1273
- } else result = NullProtoObject();
1274
- return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1275
- };
1276
-
1277
- var wellKnownSymbol$4 = wellKnownSymbol$a;
1278
- var create$1 = objectCreate;
1279
- var definePropertyModule = objectDefineProperty;
1280
-
1281
- var UNSCOPABLES = wellKnownSymbol$4('unscopables');
1282
- var ArrayPrototype = Array.prototype;
1283
-
1284
- // Array.prototype[@@unscopables]
1285
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1286
- if (ArrayPrototype[UNSCOPABLES] == undefined) {
1287
- definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
1288
- configurable: true,
1289
- value: create$1(null)
1290
- });
1291
- }
1292
-
1293
- // add a key to Array.prototype[@@unscopables]
1294
- var addToUnscopables$1 = function (key) {
1295
- ArrayPrototype[UNSCOPABLES][key] = true;
1296
- };
1297
-
1298
- var iterators = {};
1299
-
1300
- var fails$1 = fails$a;
1301
-
1302
- var correctPrototypeGetter = !fails$1(function () {
1303
- function F() { /* empty */ }
1304
- F.prototype.constructor = null;
1305
- // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1306
- return Object.getPrototypeOf(new F()) !== F.prototype;
1307
- });
1308
-
1309
- var global$3 = global$r;
1310
- var hasOwn$1 = hasOwnProperty_1;
1311
- var isCallable$3 = isCallable$e;
1312
- var toObject = toObject$3;
1313
- var sharedKey = sharedKey$3;
1314
- var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1315
-
1316
- var IE_PROTO = sharedKey('IE_PROTO');
1317
- var Object$1 = global$3.Object;
1318
- var ObjectPrototype = Object$1.prototype;
1319
-
1320
- // `Object.getPrototypeOf` method
1321
- // https://tc39.es/ecma262/#sec-object.getprototypeof
1322
- var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? Object$1.getPrototypeOf : function (O) {
1323
- var object = toObject(O);
1324
- if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
1325
- var constructor = object.constructor;
1326
- if (isCallable$3(constructor) && object instanceof constructor) {
1327
- return constructor.prototype;
1328
- } return object instanceof Object$1 ? ObjectPrototype : null;
1329
- };
1330
-
1331
- var fails = fails$a;
1332
- var isCallable$2 = isCallable$e;
1333
- var getPrototypeOf$1 = objectGetPrototypeOf;
1334
- var redefine$1 = redefine$3.exports;
1335
- var wellKnownSymbol$3 = wellKnownSymbol$a;
1336
-
1337
- var ITERATOR$2 = wellKnownSymbol$3('iterator');
1338
- var BUGGY_SAFARI_ITERATORS$1 = false;
1339
-
1340
- // `%IteratorPrototype%` object
1341
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1342
- var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1343
-
1344
- /* eslint-disable es/no-array-prototype-keys -- safe */
1345
- if ([].keys) {
1346
- arrayIterator = [].keys();
1347
- // Safari 8 has buggy iterators w/o `next`
1348
- if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
1349
- else {
1350
- PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
1351
- if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
1352
- }
1353
- }
1354
-
1355
- var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails(function () {
1356
- var test = {};
1357
- // FF44- legacy iterators case
1358
- return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
1359
- });
1360
-
1361
- if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1362
-
1363
- // `%IteratorPrototype%[@@iterator]()` method
1364
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1365
- if (!isCallable$2(IteratorPrototype$2[ITERATOR$2])) {
1366
- redefine$1(IteratorPrototype$2, ITERATOR$2, function () {
1367
- return this;
1368
- });
1369
- }
1370
-
1371
- var iteratorsCore = {
1372
- IteratorPrototype: IteratorPrototype$2,
1373
- BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1374
- };
1375
-
1376
- var defineProperty$1 = objectDefineProperty.f;
1377
- var hasOwn = hasOwnProperty_1;
1378
- var wellKnownSymbol$2 = wellKnownSymbol$a;
1379
-
1380
- var TO_STRING_TAG$1 = wellKnownSymbol$2('toStringTag');
1381
-
1382
- var setToStringTag$2 = function (target, TAG, STATIC) {
1383
- if (target && !STATIC) target = target.prototype;
1384
- if (target && !hasOwn(target, TO_STRING_TAG$1)) {
1385
- defineProperty$1(target, TO_STRING_TAG$1, { configurable: true, value: TAG });
1386
- }
1387
- };
1388
-
1389
- var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1390
- var create = objectCreate;
1391
- var createPropertyDescriptor = createPropertyDescriptor$3;
1392
- var setToStringTag$1 = setToStringTag$2;
1393
- var Iterators$2 = iterators;
1394
-
1395
- var returnThis$1 = function () { return this; };
1396
-
1397
- var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1398
- var TO_STRING_TAG = NAME + ' Iterator';
1399
- IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1400
- setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
1401
- Iterators$2[TO_STRING_TAG] = returnThis$1;
1402
- return IteratorConstructor;
1403
- };
1404
-
1405
- var global$2 = global$r;
1406
- var isCallable$1 = isCallable$e;
1407
-
1408
- var String$1 = global$2.String;
1409
- var TypeError$1 = global$2.TypeError;
1410
-
1411
- var aPossiblePrototype$1 = function (argument) {
1412
- if (typeof argument == 'object' || isCallable$1(argument)) return argument;
1413
- throw TypeError$1("Can't set " + String$1(argument) + ' as a prototype');
1414
- };
1415
-
1416
- /* eslint-disable no-proto -- safe */
1417
-
1418
- var uncurryThis = functionUncurryThis;
1419
- var anObject = anObject$5;
1420
- var aPossiblePrototype = aPossiblePrototype$1;
1421
-
1422
- // `Object.setPrototypeOf` method
1423
- // https://tc39.es/ecma262/#sec-object.setprototypeof
1424
- // Works with __proto__ only. Old v8 can't work with null proto objects.
1425
- // eslint-disable-next-line es/no-object-setprototypeof -- safe
1426
- var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1427
- var CORRECT_SETTER = false;
1428
- var test = {};
1429
- var setter;
1430
- try {
1431
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1432
- setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1433
- setter(test, []);
1434
- CORRECT_SETTER = test instanceof Array;
1435
- } catch (error) { /* empty */ }
1436
- return function setPrototypeOf(O, proto) {
1437
- anObject(O);
1438
- aPossiblePrototype(proto);
1439
- if (CORRECT_SETTER) setter(O, proto);
1440
- else O.__proto__ = proto;
1441
- return O;
1442
- };
1443
- }() : undefined);
1444
-
1445
- var $ = _export;
1446
- var call = functionCall;
1447
- var FunctionName = functionName;
1448
- var isCallable = isCallable$e;
1449
- var createIteratorConstructor = createIteratorConstructor$1;
1450
- var getPrototypeOf = objectGetPrototypeOf;
1451
- var setPrototypeOf = objectSetPrototypeOf;
1452
- var setToStringTag = setToStringTag$2;
1453
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
1454
- var redefine = redefine$3.exports;
1455
- var wellKnownSymbol$1 = wellKnownSymbol$a;
1456
- var Iterators$1 = iterators;
1457
- var IteratorsCore = iteratorsCore;
1458
-
1459
- var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1460
- var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1461
- var IteratorPrototype = IteratorsCore.IteratorPrototype;
1462
- var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1463
- var ITERATOR$1 = wellKnownSymbol$1('iterator');
1464
- var KEYS = 'keys';
1465
- var VALUES = 'values';
1466
- var ENTRIES = 'entries';
1467
-
1468
- var returnThis = function () { return this; };
1469
-
1470
- var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1471
- createIteratorConstructor(IteratorConstructor, NAME, next);
1472
-
1473
- var getIterationMethod = function (KIND) {
1474
- if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1475
- if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
1476
- switch (KIND) {
1477
- case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1478
- case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1479
- case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1480
- } return function () { return new IteratorConstructor(this); };
1481
- };
1482
-
1483
- var TO_STRING_TAG = NAME + ' Iterator';
1484
- var INCORRECT_VALUES_NAME = false;
1485
- var IterablePrototype = Iterable.prototype;
1486
- var nativeIterator = IterablePrototype[ITERATOR$1]
1487
- || IterablePrototype['@@iterator']
1488
- || DEFAULT && IterablePrototype[DEFAULT];
1489
- var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
1490
- var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1491
- var CurrentIteratorPrototype, methods, KEY;
1492
-
1493
- // fix native
1494
- if (anyNativeIterator) {
1495
- CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1496
- if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1497
- if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1498
- if (setPrototypeOf) {
1499
- setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1500
- } else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
1501
- redefine(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1502
- }
1503
- }
1504
- // Set @@toStringTag to native iterators
1505
- setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
1506
- }
1507
- }
1508
-
1509
- // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1510
- if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1511
- if (CONFIGURABLE_FUNCTION_NAME) {
1512
- createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1029
+ const CONTAINER_WIDTH = 432;
1030
+ const BUTTON_WIDTH = 48;
1031
+ const BUTTON_HEIGHT = 192;
1032
+ const BUTTON_BOTTOM_POSITION = 128;
1033
+ const TRANSFORM_CLOSED = `translate(${CONTAINER_WIDTH - BUTTON_WIDTH}px, 0px)`;
1034
+ const TRANSFORM_CLOSED_HIDE = `translate(${CONTAINER_WIDTH}px, 0px)`;
1035
+ const TRANSFORM_OPEN = `translate(0px, 0px)`;
1036
+ class WidgetContainer {
1037
+ constructor(options) {
1038
+ this.options = options;
1039
+ this.container = document.createElement('div');
1040
+ this.container.style.position = 'fixed';
1041
+ this.container.style.zIndex = '999999';
1042
+ this.container.style.right = '0px';
1043
+ this.container.style.bottom = `${BUTTON_BOTTOM_POSITION}px`;
1044
+ this.container.style.width = `${CONTAINER_WIDTH}px`;
1045
+ this.container.style.height = `${BUTTON_HEIGHT}px`;
1046
+
1047
+ if (options.ui.opener.hide) {
1048
+ this.container.style.transform = TRANSFORM_CLOSED_HIDE;
1513
1049
  } else {
1514
- INCORRECT_VALUES_NAME = true;
1515
- defaultIterator = function values() { return call(nativeIterator, this); };
1050
+ this.container.style.transform = TRANSFORM_CLOSED;
1516
1051
  }
1517
- }
1518
-
1519
- // export additional methods
1520
- if (DEFAULT) {
1521
- methods = {
1522
- values: getIterationMethod(VALUES),
1523
- keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1524
- entries: getIterationMethod(ENTRIES)
1525
- };
1526
- if (FORCED) for (KEY in methods) {
1527
- if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1528
- redefine(IterablePrototype, KEY, methods[KEY]);
1529
- }
1530
- } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1531
- }
1532
1052
 
1533
- // define iterator
1534
- if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1535
- redefine(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1053
+ this.container.style.transitionTimingFunction = 'cubic-bezier(0.4, 0, 0.2, 1)';
1054
+ this.container.style.transitionDuration = '700ms';
1055
+ this.container.style.transitionProperty = 'transform';
1056
+ document.body.appendChild(this.container);
1536
1057
  }
1537
- Iterators$1[NAME] = defaultIterator;
1538
-
1539
- return methods;
1540
- };
1541
-
1542
- var toIndexedObject = toIndexedObject$5;
1543
- var addToUnscopables = addToUnscopables$1;
1544
- var Iterators = iterators;
1545
- var InternalStateModule = internalState;
1546
- var defineProperty = objectDefineProperty.f;
1547
- var defineIterator = defineIterator$1;
1548
- var DESCRIPTORS = descriptors;
1549
1058
 
1550
- var ARRAY_ITERATOR = 'Array Iterator';
1551
- var setInternalState = InternalStateModule.set;
1552
- var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
1553
-
1554
- // `Array.prototype.entries` method
1555
- // https://tc39.es/ecma262/#sec-array.prototype.entries
1556
- // `Array.prototype.keys` method
1557
- // https://tc39.es/ecma262/#sec-array.prototype.keys
1558
- // `Array.prototype.values` method
1559
- // https://tc39.es/ecma262/#sec-array.prototype.values
1560
- // `Array.prototype[@@iterator]` method
1561
- // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
1562
- // `CreateArrayIterator` internal method
1563
- // https://tc39.es/ecma262/#sec-createarrayiterator
1564
- var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1565
- setInternalState(this, {
1566
- type: ARRAY_ITERATOR,
1567
- target: toIndexedObject(iterated), // target
1568
- index: 0, // next index
1569
- kind: kind // kind
1570
- });
1571
- // `%ArrayIteratorPrototype%.next` method
1572
- // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1573
- }, function () {
1574
- var state = getInternalState(this);
1575
- var target = state.target;
1576
- var kind = state.kind;
1577
- var index = state.index++;
1578
- if (!target || index >= target.length) {
1579
- state.target = undefined;
1580
- return { value: undefined, done: true };
1059
+ open() {
1060
+ this.container.style.transform = TRANSFORM_OPEN;
1061
+ this.container.style.height = '100vh';
1062
+ this.container.style.bottom = `0px`;
1581
1063
  }
1582
- if (kind == 'keys') return { value: index, done: false };
1583
- if (kind == 'values') return { value: target[index], done: false };
1584
- return { value: [index, target[index]], done: false };
1585
- }, 'values');
1586
-
1587
- // argumentsList[@@iterator] is %ArrayProto_values%
1588
- // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
1589
- // https://tc39.es/ecma262/#sec-createmappedargumentsobject
1590
- var values = Iterators.Arguments = Iterators.Array;
1591
-
1592
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1593
- addToUnscopables('keys');
1594
- addToUnscopables('values');
1595
- addToUnscopables('entries');
1596
-
1597
- // V8 ~ Chrome 45- bug
1598
- if (DESCRIPTORS && values.name !== 'values') try {
1599
- defineProperty(values, 'name', { value: 'values' });
1600
- } catch (error) { /* empty */ }
1601
-
1602
- // iterable DOM collections
1603
- // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1604
- var domIterables = {
1605
- CSSRuleList: 0,
1606
- CSSStyleDeclaration: 0,
1607
- CSSValueList: 0,
1608
- ClientRectList: 0,
1609
- DOMRectList: 0,
1610
- DOMStringList: 0,
1611
- DOMTokenList: 1,
1612
- DataTransferItemList: 0,
1613
- FileList: 0,
1614
- HTMLAllCollection: 0,
1615
- HTMLCollection: 0,
1616
- HTMLFormElement: 0,
1617
- HTMLSelectElement: 0,
1618
- MediaList: 0,
1619
- MimeTypeArray: 0,
1620
- NamedNodeMap: 0,
1621
- NodeList: 1,
1622
- PaintRequestList: 0,
1623
- Plugin: 0,
1624
- PluginArray: 0,
1625
- SVGLengthList: 0,
1626
- SVGNumberList: 0,
1627
- SVGPathSegList: 0,
1628
- SVGPointList: 0,
1629
- SVGStringList: 0,
1630
- SVGTransformList: 0,
1631
- SourceBufferList: 0,
1632
- StyleSheetList: 0,
1633
- TextTrackCueList: 0,
1634
- TextTrackList: 0,
1635
- TouchList: 0
1636
- };
1637
-
1638
- // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1639
- var documentCreateElement = documentCreateElement$2;
1640
1064
 
1641
- var classList = documentCreateElement('span').classList;
1642
- var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
1643
-
1644
- var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1645
-
1646
- var global$1 = global$r;
1647
- var DOMIterables = domIterables;
1648
- var DOMTokenListPrototype = domTokenListPrototype;
1649
- var ArrayIteratorMethods = es_array_iterator;
1650
- var createNonEnumerableProperty = createNonEnumerableProperty$5;
1651
- var wellKnownSymbol = wellKnownSymbol$a;
1652
-
1653
- var ITERATOR = wellKnownSymbol('iterator');
1654
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
1655
- var ArrayValues = ArrayIteratorMethods.values;
1656
-
1657
- var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1658
- if (CollectionPrototype) {
1659
- // some Chrome versions have non-configurable methods on DOMTokenList
1660
- if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1661
- createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
1662
- } catch (error) {
1663
- CollectionPrototype[ITERATOR] = ArrayValues;
1664
- }
1665
- if (!CollectionPrototype[TO_STRING_TAG]) {
1666
- createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
1667
- }
1668
- if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1669
- // some Chrome versions have non-configurable methods on DOMTokenList
1670
- if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1671
- createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1672
- } catch (error) {
1673
- CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1674
- }
1675
- }
1676
- }
1677
- };
1678
-
1679
- for (var COLLECTION_NAME in DOMIterables) {
1680
- handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
1681
- }
1682
-
1683
- handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1684
-
1685
- const SET_ACTIVE_AUDIENCES = 'audiences/set-active-audiences';
1686
- const FORCE_ACTIVATE_AUDIENCE = 'audiences/force-activate-audience';
1687
- const FORCE_DEACTIVATE_AUDIENCE = 'audiences/force-deactivate-audience';
1688
- const RESET_AUDIENCES = 'audiences/reset-audiences';
1689
- const setActiveAudiences$1 = createAction(SET_ACTIVE_AUDIENCES);
1690
- const forceActivateAudience$1 = createAction(FORCE_ACTIVATE_AUDIENCE);
1691
- const forceDeactivateAudience = createAction(FORCE_DEACTIVATE_AUDIENCE);
1692
- const resetAudiences$1 = createAction(RESET_AUDIENCES);
1693
-
1694
- /*
1695
- forced and forcedDeactivated are arrays containing the ids that are coming from the active array
1696
- and they exchange data whenever an audience is activated or deactivated by clie
1697
- */
1698
-
1699
- const initialState = {
1700
- active: [],
1701
- forced: [],
1702
- deactivatedForced: []
1703
- };
1704
- const reducer = createReducer(initialState, builder => {
1705
- builder.addCase(setActiveAudiences$1, (state, action) => {
1706
- state.active = action.payload;
1707
- });
1708
- builder.addCase(forceActivateAudience$1, (state, action) => {
1709
- if (state.forced.includes(action.payload)) {
1710
- const filtered = state.forced.filter(id => id !== action.payload);
1711
- state.forced = filtered;
1712
- return;
1065
+ close() {
1066
+ if (this.options.ui.opener.hide) {
1067
+ this.container.style.transform = TRANSFORM_CLOSED_HIDE;
1068
+ } else {
1069
+ this.container.style.transform = TRANSFORM_CLOSED;
1713
1070
  }
1714
1071
 
1715
- state.forced = [...new Set([...state.forced, action.payload])];
1716
- });
1717
- builder.addCase(resetAudiences$1, state => {
1718
- state.forced = [];
1719
- });
1720
- });
1721
-
1722
- const store = configureStore({
1723
- reducer: {
1724
- drawer: reducer$1,
1725
- audiences: reducer
1072
+ setTimeout(() => {
1073
+ this.container.style.height = `${BUTTON_HEIGHT}px`;
1074
+ this.container.style.bottom = `${BUTTON_BOTTOM_POSITION}px`;
1075
+ }, 700);
1726
1076
  }
1727
- });
1728
-
1729
- const openDrawer = bindActionCreators(openDrawer$1, store.dispatch);
1730
- const closeDrawer = bindActionCreators(closeDrawer$1, store.dispatch);
1731
- const toggleDrawer = bindActionCreators(toggleDrawer$1, store.dispatch);
1732
-
1733
- const setActiveAudiences = bindActionCreators(setActiveAudiences$1, store.dispatch);
1734
- const forceActivateAudience = bindActionCreators(forceActivateAudience$1, store.dispatch);
1735
- bindActionCreators(forceDeactivateAudience, store.dispatch);
1736
- const resetAudiences = bindActionCreators(resetAudiences$1, store.dispatch);
1737
1077
 
1738
- const buildPreviewSdk = ({
1739
- clientId,
1740
- secret,
1741
- environment,
1742
- ninetailed
1743
- }) => {
1744
- const state = store.getState();
1745
- return {
1746
- version: '0.0.1',
1747
- credentials: {
1748
- clientId,
1749
- secret
1750
- },
1751
- connection: {
1752
- environment
1753
- },
1754
- drawer: Object.assign(Object.assign({}, state.drawer), {
1755
- open: openDrawer,
1756
- close: closeDrawer,
1757
- toggle: toggleDrawer
1758
- }),
1759
- audiences: Object.assign(Object.assign({}, state.audiences), {
1760
- forceActivateAudience,
1761
- resetAudiences
1762
- }),
1763
- ninetailed
1764
- };
1765
- }; //subscribePreviewSdk watches for changes in the state and send them to the buildPreviewSdk
1766
-
1767
-
1768
- const subscribePreviewSdk = (previewSdkArgs, handler) => {
1769
- handler(buildPreviewSdk(previewSdkArgs));
1770
- store.subscribe(() => {
1771
- handler(buildPreviewSdk(previewSdkArgs));
1772
- });
1773
- };
1774
-
1775
- const BUTTON_VARIABLES = {
1776
- bottom: '128px',
1777
- right: '0px',
1778
- width: '48px',
1779
- height: '184px'
1780
- };
1781
- const PREVIEW_VARIABLES = {
1782
- bottom: '0px',
1783
- right: '0px',
1784
- width: '432px',
1785
- height: '100vh'
1786
- };
1787
-
1788
- const registerWindowHandlers = previewSdk => {
1789
- var _a;
1790
-
1791
- if (typeof window !== 'undefined') {
1792
- window.ninetailed = Object.assign({}, window.ninetailed, {
1793
- plugins: Object.assign(Object.assign({}, (_a = window.ninetailed) === null || _a === void 0 ? void 0 : _a.plugins), {
1794
- preview: {
1795
- open: previewSdk.drawer.open,
1796
- close: previewSdk.drawer.close
1797
- }
1798
- })
1799
- });
1078
+ get element() {
1079
+ return this.container;
1800
1080
  }
1801
- };
1802
1081
 
1803
- const enrichProfile = (previewSdk, profile) => {
1804
- if (previewSdk) {
1805
- const audiences = union(profile === null || profile === void 0 ? void 0 : profile.audiences, previewSdk.audiences.forced);
1806
-
1807
- if (!isEqual(profile === null || profile === void 0 ? void 0 : profile.audiences, previewSdk.audiences.forced)) {
1808
- return Object.assign(Object.assign({}, profile), {
1809
- audiences
1810
- });
1811
- }
1812
- }
1813
-
1814
- return profile;
1815
- };
1082
+ }
1816
1083
 
1817
1084
  const NinetailedPreviewPlugin = ({
1818
1085
  clientId,
@@ -1821,7 +1088,9 @@ const NinetailedPreviewPlugin = ({
1821
1088
  environment,
1822
1089
  ui
1823
1090
  }) => {
1824
- let previewSdk;
1091
+ let isOpen = false;
1092
+ let activatedAudiences = [];
1093
+ let audiences = [];
1825
1094
  let lastProfile;
1826
1095
  return {
1827
1096
  name: 'ninetailed:preview',
@@ -1829,64 +1098,119 @@ const NinetailedPreviewPlugin = ({
1829
1098
  initialize: ({
1830
1099
  instance
1831
1100
  }) => {
1101
+ var _a;
1102
+
1832
1103
  if (typeof window !== 'undefined') {
1833
1104
  const {
1834
1105
  PreviewBridge
1835
1106
  } = require('@ninetailed/experience.js-preview-bridge');
1836
1107
 
1837
- const container = document.createElement('div');
1838
- container.style.cssText = `position:fixed; z-index:999999;
1839
- bottom: ${BUTTON_VARIABLES.bottom}; right: ${BUTTON_VARIABLES.right};
1840
- width: ${BUTTON_VARIABLES.width}; height: ${BUTTON_VARIABLES.height};`;
1841
- document.body.appendChild(container);
1108
+ const container = new WidgetContainer({
1109
+ ui
1110
+ });
1842
1111
  const preview = PreviewBridge({
1843
1112
  url
1844
1113
  });
1845
- preview.render(container);
1846
- subscribePreviewSdk({
1847
- clientId,
1848
- secret,
1849
- environment,
1850
- ninetailed: window.ninetailed
1851
- }, updatedPreviewSdk => {
1852
- previewSdk = updatedPreviewSdk;
1853
-
1854
- if (updatedPreviewSdk.drawer.isOpen) {
1855
- container.style.right = PREVIEW_VARIABLES.right;
1856
- container.style.bottom = PREVIEW_VARIABLES.bottom;
1857
- container.style.width = PREVIEW_VARIABLES.width;
1858
- container.style.height = PREVIEW_VARIABLES.height;
1114
+ preview.render(container.element);
1115
+
1116
+ const open = () => {
1117
+ container.open();
1118
+ isOpen = true;
1119
+ instance.dispatch({
1120
+ type: 'preview:change'
1121
+ });
1122
+ };
1123
+
1124
+ const close = () => {
1125
+ container.close();
1126
+ setTimeout(() => {
1127
+ isOpen = false;
1128
+ instance.dispatch({
1129
+ type: 'preview:change'
1130
+ });
1131
+ }, 700);
1132
+ };
1133
+
1134
+ const toggle = () => {
1135
+ if (isOpen) {
1136
+ close();
1859
1137
  } else {
1860
- container.style.right = BUTTON_VARIABLES.right;
1861
- container.style.bottom = BUTTON_VARIABLES.bottom;
1862
- container.style.width = get$1(ui, 'opener.hide', false) ? '0px' : BUTTON_VARIABLES.width;
1863
- container.style.height = get$1(ui, 'opener.hide', false) ? '0px' : BUTTON_VARIABLES.height;
1138
+ open();
1864
1139
  }
1140
+ };
1865
1141
 
1866
- preview.updateProps({
1867
- props: updatedPreviewSdk
1142
+ const activateAudience = id => {
1143
+ activatedAudiences = union(activatedAudiences, [id]);
1144
+ instance.dispatch({
1145
+ type: 'profile',
1146
+ profile: lastProfile
1868
1147
  });
1148
+ };
1149
+
1150
+ const deactivateAudience = id => {
1151
+ activatedAudiences = activatedAudiences.filter(activatedAudience => activatedAudience !== id);
1869
1152
  instance.dispatch({
1870
1153
  type: 'profile',
1871
1154
  profile: lastProfile
1872
1155
  });
1873
- registerWindowHandlers(updatedPreviewSdk);
1156
+ };
1157
+
1158
+ const buildPreviewPlugin = () => ({
1159
+ open: () => open(),
1160
+ close: () => close(),
1161
+ toggle: () => toggle(),
1162
+ isOpen,
1163
+ activateAudience: id => activateAudience(id),
1164
+ deactivateAudience: id => deactivateAudience(id),
1165
+ activatedAudiences,
1166
+ audiences
1167
+ });
1168
+
1169
+ window.ninetailed = Object.assign({}, window.ninetailed, {
1170
+ plugins: Object.assign(Object.assign({}, (_a = window.ninetailed) === null || _a === void 0 ? void 0 : _a.plugins), {
1171
+ preview: buildPreviewPlugin()
1172
+ })
1173
+ });
1174
+
1175
+ const buildNinetailed = () => {
1176
+ var _a;
1177
+
1178
+ return Object.assign({}, window.ninetailed, {
1179
+ version: '1.5.1',
1180
+ plugins: Object.assign(Object.assign({}, (_a = window.ninetailed) === null || _a === void 0 ? void 0 : _a.plugins), {
1181
+ preview: buildPreviewPlugin()
1182
+ }),
1183
+ credentials: {
1184
+ clientId,
1185
+ secret,
1186
+ environment
1187
+ }
1188
+ });
1189
+ };
1190
+
1191
+ instance.on('profile', () => {
1192
+ preview.updateProps({
1193
+ props: buildNinetailed()
1194
+ });
1195
+ });
1196
+ instance.on('preview:change', () => {
1197
+ preview.updateProps({
1198
+ props: buildNinetailed()
1199
+ });
1874
1200
  });
1875
1201
  }
1876
1202
  },
1877
1203
  profile: ({
1878
1204
  payload
1879
1205
  }) => {
1880
- var _a, _b;
1206
+ var _a;
1881
1207
 
1208
+ audiences = ((_a = payload === null || payload === void 0 ? void 0 : payload.profile) === null || _a === void 0 ? void 0 : _a.audiences) || [];
1882
1209
  lastProfile = payload.profile;
1883
-
1884
- if (!isEqual(previewSdk.audiences.active, (_a = payload.profile) === null || _a === void 0 ? void 0 : _a.audiences)) {
1885
- setActiveAudiences((_b = payload.profile) === null || _b === void 0 ? void 0 : _b.audiences);
1886
- }
1887
-
1888
1210
  return Object.assign(Object.assign({}, payload), {
1889
- profile: enrichProfile(previewSdk, lastProfile)
1211
+ profile: Object.assign(Object.assign({}, payload.profile), {
1212
+ audiences: union(audiences, activatedAudiences)
1213
+ })
1890
1214
  });
1891
1215
  },
1892
1216
  loaded: () => true