@dotcms/react 0.0.1-alpha.11 → 0.0.1-alpha.12

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.
Files changed (41) hide show
  1. package/index.esm.d.ts +1 -0
  2. package/index.esm.js +1928 -0
  3. package/package.json +30 -27
  4. package/src/lib/components/Column/Column.d.ts +5 -0
  5. package/src/lib/components/Container/Container.d.ts +5 -0
  6. package/src/lib/components/DotcmsLayout/{DotcmsLayout.tsx → DotcmsLayout.d.ts} +3 -17
  7. package/src/lib/components/PageProvider/{PageProvider.tsx → PageProvider.d.ts} +1 -12
  8. package/src/lib/components/Row/Row.d.ts +25 -0
  9. package/src/lib/contexts/PageContext.d.ts +3 -0
  10. package/src/lib/hooks/useDotcmsEditor.d.ts +2 -0
  11. package/src/lib/hooks/{useDotcmsPageContext.tsx → useDotcmsPageContext.d.ts} +1 -7
  12. package/src/lib/mocks/mockPageContext.d.ts +7 -0
  13. package/src/lib/utils/utils.d.ts +22 -0
  14. package/.babelrc +0 -12
  15. package/.eslintrc.json +0 -18
  16. package/jest.config.ts +0 -11
  17. package/project.json +0 -51
  18. package/src/lib/components/Column/Column.module.css +0 -99
  19. package/src/lib/components/Column/Column.spec.tsx +0 -78
  20. package/src/lib/components/Column/Column.tsx +0 -45
  21. package/src/lib/components/Container/Container.module.css +0 -7
  22. package/src/lib/components/Container/Container.spec.tsx +0 -82
  23. package/src/lib/components/Container/Container.tsx +0 -106
  24. package/src/lib/components/DotcmsLayout/DotcmsLayout.module.css +0 -7
  25. package/src/lib/components/DotcmsLayout/DotcmsLayout.spec.tsx +0 -41
  26. package/src/lib/components/PageProvider/PageProvider.module.css +0 -7
  27. package/src/lib/components/PageProvider/PageProvider.spec.tsx +0 -54
  28. package/src/lib/components/Row/Row.module.css +0 -5
  29. package/src/lib/components/Row/Row.spec.tsx +0 -92
  30. package/src/lib/components/Row/Row.tsx +0 -51
  31. package/src/lib/contexts/PageContext.tsx +0 -5
  32. package/src/lib/hooks/useDotcmsEditor.spec.ts +0 -56
  33. package/src/lib/hooks/useDotcmsEditor.ts +0 -29
  34. package/src/lib/hooks/useDotcmsPageContext.spec.tsx +0 -43
  35. package/src/lib/mocks/mockPageContext.tsx +0 -84
  36. package/src/lib/utils/utils.ts +0 -69
  37. package/tsconfig.json +0 -20
  38. package/tsconfig.lib.json +0 -23
  39. package/tsconfig.spec.json +0 -20
  40. /package/src/{index.ts → index.d.ts} +0 -0
  41. /package/src/lib/mocks/{index.ts → index.d.ts} +0 -0
package/index.esm.js ADDED
@@ -0,0 +1,1928 @@
1
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
+ import { useState, useEffect, createContext, useContext, createElement as createElement$1, forwardRef } from 'react';
3
+ import { isInsideEditor, initEditor, updateNavigation, destroyEditor } from '@dotcms/client';
4
+
5
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
6
+
7
+ var check = function (it) {
8
+ return it && it.Math === Math && it;
9
+ };
10
+
11
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
12
+ var global$c =
13
+ // eslint-disable-next-line es/no-global-this -- safe
14
+ check(typeof globalThis == 'object' && globalThis) ||
15
+ check(typeof window == 'object' && window) ||
16
+ // eslint-disable-next-line no-restricted-globals -- safe
17
+ check(typeof self == 'object' && self) ||
18
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
19
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
20
+ // eslint-disable-next-line no-new-func -- fallback
21
+ (function () { return this; })() || Function('return this')();
22
+
23
+ var objectGetOwnPropertyDescriptor = {};
24
+
25
+ var fails$b = function (exec) {
26
+ try {
27
+ return !!exec();
28
+ } catch (error) {
29
+ return true;
30
+ }
31
+ };
32
+
33
+ var fails$a = fails$b;
34
+
35
+ // Detect IE8's incomplete defineProperty implementation
36
+ var descriptors = !fails$a(function () {
37
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
38
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
39
+ });
40
+
41
+ var fails$9 = fails$b;
42
+
43
+ var functionBindNative = !fails$9(function () {
44
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
45
+ var test = (function () { /* empty */ }).bind();
46
+ // eslint-disable-next-line no-prototype-builtins -- safe
47
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
48
+ });
49
+
50
+ var NATIVE_BIND$1 = functionBindNative;
51
+
52
+ var call$6 = Function.prototype.call;
53
+
54
+ var functionCall = NATIVE_BIND$1 ? call$6.bind(call$6) : function () {
55
+ return call$6.apply(call$6, arguments);
56
+ };
57
+
58
+ var objectPropertyIsEnumerable = {};
59
+
60
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
61
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
62
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
63
+
64
+ // Nashorn ~ JDK8 bug
65
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
66
+
67
+ // `Object.prototype.propertyIsEnumerable` method implementation
68
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
69
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
70
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
71
+ return !!descriptor && descriptor.enumerable;
72
+ } : $propertyIsEnumerable;
73
+
74
+ var createPropertyDescriptor$3 = function (bitmap, value) {
75
+ return {
76
+ enumerable: !(bitmap & 1),
77
+ configurable: !(bitmap & 2),
78
+ writable: !(bitmap & 4),
79
+ value: value
80
+ };
81
+ };
82
+
83
+ var NATIVE_BIND = functionBindNative;
84
+
85
+ var FunctionPrototype$1 = Function.prototype;
86
+ var call$5 = FunctionPrototype$1.call;
87
+ var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$5, call$5);
88
+
89
+ var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
90
+ return function () {
91
+ return call$5.apply(fn, arguments);
92
+ };
93
+ };
94
+
95
+ var uncurryThis$a = functionUncurryThis;
96
+
97
+ var toString$1 = uncurryThis$a({}.toString);
98
+ var stringSlice$1 = uncurryThis$a(''.slice);
99
+
100
+ var classofRaw = function (it) {
101
+ return stringSlice$1(toString$1(it), 8, -1);
102
+ };
103
+
104
+ var uncurryThis$9 = functionUncurryThis;
105
+ var fails$8 = fails$b;
106
+ var classof = classofRaw;
107
+
108
+ var $Object$3 = Object;
109
+ var split = uncurryThis$9(''.split);
110
+
111
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
112
+ var indexedObject = fails$8(function () {
113
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
114
+ // eslint-disable-next-line no-prototype-builtins -- safe
115
+ return !$Object$3('z').propertyIsEnumerable(0);
116
+ }) ? function (it) {
117
+ return classof(it) === 'String' ? split(it, '') : $Object$3(it);
118
+ } : $Object$3;
119
+
120
+ // we can't use just `it == null` since of `document.all` special case
121
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
122
+ var isNullOrUndefined$2 = function (it) {
123
+ return it === null || it === undefined;
124
+ };
125
+
126
+ var isNullOrUndefined$1 = isNullOrUndefined$2;
127
+
128
+ var $TypeError$6 = TypeError;
129
+
130
+ // `RequireObjectCoercible` abstract operation
131
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
132
+ var requireObjectCoercible$2 = function (it) {
133
+ if (isNullOrUndefined$1(it)) throw new $TypeError$6("Can't call method on " + it);
134
+ return it;
135
+ };
136
+
137
+ // toObject with fallback for non-array-like ES3 strings
138
+ var IndexedObject$1 = indexedObject;
139
+ var requireObjectCoercible$1 = requireObjectCoercible$2;
140
+
141
+ var toIndexedObject$5 = function (it) {
142
+ return IndexedObject$1(requireObjectCoercible$1(it));
143
+ };
144
+
145
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
146
+ var documentAll = typeof document == 'object' && document.all;
147
+
148
+ // `IsCallable` abstract operation
149
+ // https://tc39.es/ecma262/#sec-iscallable
150
+ // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
151
+ var isCallable$d = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
152
+ return typeof argument == 'function' || argument === documentAll;
153
+ } : function (argument) {
154
+ return typeof argument == 'function';
155
+ };
156
+
157
+ var isCallable$c = isCallable$d;
158
+
159
+ var isObject$7 = function (it) {
160
+ return typeof it == 'object' ? it !== null : isCallable$c(it);
161
+ };
162
+
163
+ var global$b = global$c;
164
+ var isCallable$b = isCallable$d;
165
+
166
+ var aFunction = function (argument) {
167
+ return isCallable$b(argument) ? argument : undefined;
168
+ };
169
+
170
+ var getBuiltIn$3 = function (namespace, method) {
171
+ return arguments.length < 2 ? aFunction(global$b[namespace]) : global$b[namespace] && global$b[namespace][method];
172
+ };
173
+
174
+ var uncurryThis$8 = functionUncurryThis;
175
+
176
+ var objectIsPrototypeOf = uncurryThis$8({}.isPrototypeOf);
177
+
178
+ var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
179
+
180
+ var global$a = global$c;
181
+ var userAgent = engineUserAgent;
182
+
183
+ var process = global$a.process;
184
+ var Deno = global$a.Deno;
185
+ var versions = process && process.versions || Deno && Deno.version;
186
+ var v8 = versions && versions.v8;
187
+ var match, version;
188
+
189
+ if (v8) {
190
+ match = v8.split('.');
191
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
192
+ // but their correct versions are not interesting for us
193
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
194
+ }
195
+
196
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
197
+ // so check `userAgent` even if `.v8` exists, but 0
198
+ if (!version && userAgent) {
199
+ match = userAgent.match(/Edge\/(\d+)/);
200
+ if (!match || match[1] >= 74) {
201
+ match = userAgent.match(/Chrome\/(\d+)/);
202
+ if (match) version = +match[1];
203
+ }
204
+ }
205
+
206
+ var engineV8Version = version;
207
+
208
+ /* eslint-disable es/no-symbol -- required for testing */
209
+ var V8_VERSION = engineV8Version;
210
+ var fails$7 = fails$b;
211
+ var global$9 = global$c;
212
+
213
+ var $String$4 = global$9.String;
214
+
215
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
216
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$7(function () {
217
+ var symbol = Symbol('symbol detection');
218
+ // Chrome 38 Symbol has incorrect toString conversion
219
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
220
+ // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
221
+ // of course, fail.
222
+ return !$String$4(symbol) || !(Object(symbol) instanceof Symbol) ||
223
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
224
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
225
+ });
226
+
227
+ /* eslint-disable es/no-symbol -- required for testing */
228
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
229
+
230
+ var useSymbolAsUid = NATIVE_SYMBOL$1
231
+ && !Symbol.sham
232
+ && typeof Symbol.iterator == 'symbol';
233
+
234
+ var getBuiltIn$2 = getBuiltIn$3;
235
+ var isCallable$a = isCallable$d;
236
+ var isPrototypeOf = objectIsPrototypeOf;
237
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
238
+
239
+ var $Object$2 = Object;
240
+
241
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
242
+ return typeof it == 'symbol';
243
+ } : function (it) {
244
+ var $Symbol = getBuiltIn$2('Symbol');
245
+ return isCallable$a($Symbol) && isPrototypeOf($Symbol.prototype, $Object$2(it));
246
+ };
247
+
248
+ var $String$3 = String;
249
+
250
+ var tryToString$1 = function (argument) {
251
+ try {
252
+ return $String$3(argument);
253
+ } catch (error) {
254
+ return 'Object';
255
+ }
256
+ };
257
+
258
+ var isCallable$9 = isCallable$d;
259
+ var tryToString = tryToString$1;
260
+
261
+ var $TypeError$5 = TypeError;
262
+
263
+ // `Assert: IsCallable(argument) is true`
264
+ var aCallable$2 = function (argument) {
265
+ if (isCallable$9(argument)) return argument;
266
+ throw new $TypeError$5(tryToString(argument) + ' is not a function');
267
+ };
268
+
269
+ var aCallable$1 = aCallable$2;
270
+ var isNullOrUndefined = isNullOrUndefined$2;
271
+
272
+ // `GetMethod` abstract operation
273
+ // https://tc39.es/ecma262/#sec-getmethod
274
+ var getMethod$1 = function (V, P) {
275
+ var func = V[P];
276
+ return isNullOrUndefined(func) ? undefined : aCallable$1(func);
277
+ };
278
+
279
+ var call$4 = functionCall;
280
+ var isCallable$8 = isCallable$d;
281
+ var isObject$6 = isObject$7;
282
+
283
+ var $TypeError$4 = TypeError;
284
+
285
+ // `OrdinaryToPrimitive` abstract operation
286
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
287
+ var ordinaryToPrimitive$1 = function (input, pref) {
288
+ var fn, val;
289
+ if (pref === 'string' && isCallable$8(fn = input.toString) && !isObject$6(val = call$4(fn, input))) return val;
290
+ if (isCallable$8(fn = input.valueOf) && !isObject$6(val = call$4(fn, input))) return val;
291
+ if (pref !== 'string' && isCallable$8(fn = input.toString) && !isObject$6(val = call$4(fn, input))) return val;
292
+ throw new $TypeError$4("Can't convert object to primitive value");
293
+ };
294
+
295
+ var shared$3 = {exports: {}};
296
+
297
+ var global$8 = global$c;
298
+
299
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
300
+ var defineProperty$5 = Object.defineProperty;
301
+
302
+ var defineGlobalProperty$3 = function (key, value) {
303
+ try {
304
+ defineProperty$5(global$8, key, { value: value, configurable: true, writable: true });
305
+ } catch (error) {
306
+ global$8[key] = value;
307
+ } return value;
308
+ };
309
+
310
+ var global$7 = global$c;
311
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
312
+
313
+ var SHARED = '__core-js_shared__';
314
+ var store$3 = global$7[SHARED] || defineGlobalProperty$2(SHARED, {});
315
+
316
+ var sharedStore = store$3;
317
+
318
+ var store$2 = sharedStore;
319
+
320
+ (shared$3.exports = function (key, value) {
321
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
322
+ })('versions', []).push({
323
+ version: '3.35.1',
324
+ mode: 'global',
325
+ copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
326
+ license: 'https://github.com/zloirock/core-js/blob/v3.35.1/LICENSE',
327
+ source: 'https://github.com/zloirock/core-js'
328
+ });
329
+
330
+ var requireObjectCoercible = requireObjectCoercible$2;
331
+
332
+ var $Object$1 = Object;
333
+
334
+ // `ToObject` abstract operation
335
+ // https://tc39.es/ecma262/#sec-toobject
336
+ var toObject$3 = function (argument) {
337
+ return $Object$1(requireObjectCoercible(argument));
338
+ };
339
+
340
+ var uncurryThis$7 = functionUncurryThis;
341
+ var toObject$2 = toObject$3;
342
+
343
+ var hasOwnProperty = uncurryThis$7({}.hasOwnProperty);
344
+
345
+ // `HasOwnProperty` abstract operation
346
+ // https://tc39.es/ecma262/#sec-hasownproperty
347
+ // eslint-disable-next-line es/no-object-hasown -- safe
348
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
349
+ return hasOwnProperty(toObject$2(it), key);
350
+ };
351
+
352
+ var uncurryThis$6 = functionUncurryThis;
353
+
354
+ var id = 0;
355
+ var postfix = Math.random();
356
+ var toString = uncurryThis$6(1.0.toString);
357
+
358
+ var uid$2 = function (key) {
359
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
360
+ };
361
+
362
+ var global$6 = global$c;
363
+ var shared$2 = shared$3.exports;
364
+ var hasOwn$8 = hasOwnProperty_1;
365
+ var uid$1 = uid$2;
366
+ var NATIVE_SYMBOL = symbolConstructorDetection;
367
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
368
+
369
+ var Symbol$1 = global$6.Symbol;
370
+ var WellKnownSymbolsStore = shared$2('wks');
371
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
372
+
373
+ var wellKnownSymbol$6 = function (name) {
374
+ if (!hasOwn$8(WellKnownSymbolsStore, name)) {
375
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)
376
+ ? Symbol$1[name]
377
+ : createWellKnownSymbol('Symbol.' + name);
378
+ } return WellKnownSymbolsStore[name];
379
+ };
380
+
381
+ var call$3 = functionCall;
382
+ var isObject$5 = isObject$7;
383
+ var isSymbol$1 = isSymbol$2;
384
+ var getMethod = getMethod$1;
385
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
386
+ var wellKnownSymbol$5 = wellKnownSymbol$6;
387
+
388
+ var $TypeError$3 = TypeError;
389
+ var TO_PRIMITIVE = wellKnownSymbol$5('toPrimitive');
390
+
391
+ // `ToPrimitive` abstract operation
392
+ // https://tc39.es/ecma262/#sec-toprimitive
393
+ var toPrimitive$1 = function (input, pref) {
394
+ if (!isObject$5(input) || isSymbol$1(input)) return input;
395
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
396
+ var result;
397
+ if (exoticToPrim) {
398
+ if (pref === undefined) pref = 'default';
399
+ result = call$3(exoticToPrim, input, pref);
400
+ if (!isObject$5(result) || isSymbol$1(result)) return result;
401
+ throw new $TypeError$3("Can't convert object to primitive value");
402
+ }
403
+ if (pref === undefined) pref = 'number';
404
+ return ordinaryToPrimitive(input, pref);
405
+ };
406
+
407
+ var toPrimitive = toPrimitive$1;
408
+ var isSymbol = isSymbol$2;
409
+
410
+ // `ToPropertyKey` abstract operation
411
+ // https://tc39.es/ecma262/#sec-topropertykey
412
+ var toPropertyKey$2 = function (argument) {
413
+ var key = toPrimitive(argument, 'string');
414
+ return isSymbol(key) ? key : key + '';
415
+ };
416
+
417
+ var global$5 = global$c;
418
+ var isObject$4 = isObject$7;
419
+
420
+ var document$1 = global$5.document;
421
+ // typeof document.createElement is 'object' in old IE
422
+ var EXISTS$1 = isObject$4(document$1) && isObject$4(document$1.createElement);
423
+
424
+ var documentCreateElement$2 = function (it) {
425
+ return EXISTS$1 ? document$1.createElement(it) : {};
426
+ };
427
+
428
+ var DESCRIPTORS$9 = descriptors;
429
+ var fails$6 = fails$b;
430
+ var createElement = documentCreateElement$2;
431
+
432
+ // Thanks to IE8 for its funny defineProperty
433
+ var ie8DomDefine = !DESCRIPTORS$9 && !fails$6(function () {
434
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
435
+ return Object.defineProperty(createElement('div'), 'a', {
436
+ get: function () { return 7; }
437
+ }).a !== 7;
438
+ });
439
+
440
+ var DESCRIPTORS$8 = descriptors;
441
+ var call$2 = functionCall;
442
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
443
+ var createPropertyDescriptor$2 = createPropertyDescriptor$3;
444
+ var toIndexedObject$4 = toIndexedObject$5;
445
+ var toPropertyKey$1 = toPropertyKey$2;
446
+ var hasOwn$7 = hasOwnProperty_1;
447
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
448
+
449
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
450
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
451
+
452
+ // `Object.getOwnPropertyDescriptor` method
453
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
454
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
455
+ O = toIndexedObject$4(O);
456
+ P = toPropertyKey$1(P);
457
+ if (IE8_DOM_DEFINE$1) try {
458
+ return $getOwnPropertyDescriptor$1(O, P);
459
+ } catch (error) { /* empty */ }
460
+ if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
461
+ };
462
+
463
+ var objectDefineProperty = {};
464
+
465
+ var DESCRIPTORS$7 = descriptors;
466
+ var fails$5 = fails$b;
467
+
468
+ // V8 ~ Chrome 36-
469
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
470
+ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$5(function () {
471
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
472
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
473
+ value: 42,
474
+ writable: false
475
+ }).prototype !== 42;
476
+ });
477
+
478
+ var isObject$3 = isObject$7;
479
+
480
+ var $String$2 = String;
481
+ var $TypeError$2 = TypeError;
482
+
483
+ // `Assert: Type(argument) is Object`
484
+ var anObject$5 = function (argument) {
485
+ if (isObject$3(argument)) return argument;
486
+ throw new $TypeError$2($String$2(argument) + ' is not an object');
487
+ };
488
+
489
+ var DESCRIPTORS$6 = descriptors;
490
+ var IE8_DOM_DEFINE = ie8DomDefine;
491
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
492
+ var anObject$4 = anObject$5;
493
+ var toPropertyKey = toPropertyKey$2;
494
+
495
+ var $TypeError$1 = TypeError;
496
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
497
+ var $defineProperty = Object.defineProperty;
498
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
499
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
500
+ var ENUMERABLE = 'enumerable';
501
+ var CONFIGURABLE$1 = 'configurable';
502
+ var WRITABLE = 'writable';
503
+
504
+ // `Object.defineProperty` method
505
+ // https://tc39.es/ecma262/#sec-object.defineproperty
506
+ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
507
+ anObject$4(O);
508
+ P = toPropertyKey(P);
509
+ anObject$4(Attributes);
510
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
511
+ var current = $getOwnPropertyDescriptor(O, P);
512
+ if (current && current[WRITABLE]) {
513
+ O[P] = Attributes.value;
514
+ Attributes = {
515
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
516
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
517
+ writable: false
518
+ };
519
+ }
520
+ } return $defineProperty(O, P, Attributes);
521
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
522
+ anObject$4(O);
523
+ P = toPropertyKey(P);
524
+ anObject$4(Attributes);
525
+ if (IE8_DOM_DEFINE) try {
526
+ return $defineProperty(O, P, Attributes);
527
+ } catch (error) { /* empty */ }
528
+ if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$1('Accessors not supported');
529
+ if ('value' in Attributes) O[P] = Attributes.value;
530
+ return O;
531
+ };
532
+
533
+ var DESCRIPTORS$5 = descriptors;
534
+ var definePropertyModule$3 = objectDefineProperty;
535
+ var createPropertyDescriptor$1 = createPropertyDescriptor$3;
536
+
537
+ var createNonEnumerableProperty$4 = DESCRIPTORS$5 ? function (object, key, value) {
538
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
539
+ } : function (object, key, value) {
540
+ object[key] = value;
541
+ return object;
542
+ };
543
+
544
+ var makeBuiltIn$2 = {exports: {}};
545
+
546
+ var DESCRIPTORS$4 = descriptors;
547
+ var hasOwn$6 = hasOwnProperty_1;
548
+
549
+ var FunctionPrototype = Function.prototype;
550
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
551
+ var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
552
+
553
+ var EXISTS = hasOwn$6(FunctionPrototype, 'name');
554
+ // additional protection from minified / mangled / dropped function names
555
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
556
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
557
+
558
+ var functionName = {
559
+ EXISTS: EXISTS,
560
+ PROPER: PROPER,
561
+ CONFIGURABLE: CONFIGURABLE
562
+ };
563
+
564
+ var uncurryThis$5 = functionUncurryThis;
565
+ var isCallable$7 = isCallable$d;
566
+ var store$1 = sharedStore;
567
+
568
+ var functionToString = uncurryThis$5(Function.toString);
569
+
570
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
571
+ if (!isCallable$7(store$1.inspectSource)) {
572
+ store$1.inspectSource = function (it) {
573
+ return functionToString(it);
574
+ };
575
+ }
576
+
577
+ var inspectSource$1 = store$1.inspectSource;
578
+
579
+ var global$4 = global$c;
580
+ var isCallable$6 = isCallable$d;
581
+
582
+ var WeakMap$1 = global$4.WeakMap;
583
+
584
+ var weakMapBasicDetection = isCallable$6(WeakMap$1) && /native code/.test(String(WeakMap$1));
585
+
586
+ var shared$1 = shared$3.exports;
587
+ var uid = uid$2;
588
+
589
+ var keys = shared$1('keys');
590
+
591
+ var sharedKey$3 = function (key) {
592
+ return keys[key] || (keys[key] = uid(key));
593
+ };
594
+
595
+ var hiddenKeys$4 = {};
596
+
597
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
598
+ var global$3 = global$c;
599
+ var isObject$2 = isObject$7;
600
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
601
+ var hasOwn$5 = hasOwnProperty_1;
602
+ var shared = sharedStore;
603
+ var sharedKey$2 = sharedKey$3;
604
+ var hiddenKeys$3 = hiddenKeys$4;
605
+
606
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
607
+ var TypeError$1 = global$3.TypeError;
608
+ var WeakMap = global$3.WeakMap;
609
+ var set, get, has;
610
+
611
+ var enforce = function (it) {
612
+ return has(it) ? get(it) : set(it, {});
613
+ };
614
+
615
+ var getterFor = function (TYPE) {
616
+ return function (it) {
617
+ var state;
618
+ if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
619
+ throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
620
+ } return state;
621
+ };
622
+ };
623
+
624
+ if (NATIVE_WEAK_MAP || shared.state) {
625
+ var store = shared.state || (shared.state = new WeakMap());
626
+ /* eslint-disable no-self-assign -- prototype methods protection */
627
+ store.get = store.get;
628
+ store.has = store.has;
629
+ store.set = store.set;
630
+ /* eslint-enable no-self-assign -- prototype methods protection */
631
+ set = function (it, metadata) {
632
+ if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
633
+ metadata.facade = it;
634
+ store.set(it, metadata);
635
+ return metadata;
636
+ };
637
+ get = function (it) {
638
+ return store.get(it) || {};
639
+ };
640
+ has = function (it) {
641
+ return store.has(it);
642
+ };
643
+ } else {
644
+ var STATE = sharedKey$2('state');
645
+ hiddenKeys$3[STATE] = true;
646
+ set = function (it, metadata) {
647
+ if (hasOwn$5(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
648
+ metadata.facade = it;
649
+ createNonEnumerableProperty$3(it, STATE, metadata);
650
+ return metadata;
651
+ };
652
+ get = function (it) {
653
+ return hasOwn$5(it, STATE) ? it[STATE] : {};
654
+ };
655
+ has = function (it) {
656
+ return hasOwn$5(it, STATE);
657
+ };
658
+ }
659
+
660
+ var internalState = {
661
+ set: set,
662
+ get: get,
663
+ has: has,
664
+ enforce: enforce,
665
+ getterFor: getterFor
666
+ };
667
+
668
+ var uncurryThis$4 = functionUncurryThis;
669
+ var fails$4 = fails$b;
670
+ var isCallable$5 = isCallable$d;
671
+ var hasOwn$4 = hasOwnProperty_1;
672
+ var DESCRIPTORS$3 = descriptors;
673
+ var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
674
+ var inspectSource = inspectSource$1;
675
+ var InternalStateModule$1 = internalState;
676
+
677
+ var enforceInternalState = InternalStateModule$1.enforce;
678
+ var getInternalState$1 = InternalStateModule$1.get;
679
+ var $String$1 = String;
680
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
681
+ var defineProperty$4 = Object.defineProperty;
682
+ var stringSlice = uncurryThis$4(''.slice);
683
+ var replace = uncurryThis$4(''.replace);
684
+ var join = uncurryThis$4([].join);
685
+
686
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$4(function () {
687
+ return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
688
+ });
689
+
690
+ var TEMPLATE = String(String).split('String');
691
+
692
+ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
693
+ if (stringSlice($String$1(name), 0, 7) === 'Symbol(') {
694
+ name = '[' + replace($String$1(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
695
+ }
696
+ if (options && options.getter) name = 'get ' + name;
697
+ if (options && options.setter) name = 'set ' + name;
698
+ if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
699
+ if (DESCRIPTORS$3) defineProperty$4(value, 'name', { value: name, configurable: true });
700
+ else value.name = name;
701
+ }
702
+ if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
703
+ defineProperty$4(value, 'length', { value: options.arity });
704
+ }
705
+ try {
706
+ if (options && hasOwn$4(options, 'constructor') && options.constructor) {
707
+ if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
708
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
709
+ } else if (value.prototype) value.prototype = undefined;
710
+ } catch (error) { /* empty */ }
711
+ var state = enforceInternalState(value);
712
+ if (!hasOwn$4(state, 'source')) {
713
+ state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
714
+ } return value;
715
+ };
716
+
717
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
718
+ // eslint-disable-next-line no-extend-native -- required
719
+ Function.prototype.toString = makeBuiltIn$1(function toString() {
720
+ return isCallable$5(this) && getInternalState$1(this).source || inspectSource(this);
721
+ }, 'toString');
722
+
723
+ var isCallable$4 = isCallable$d;
724
+ var definePropertyModule$2 = objectDefineProperty;
725
+ var makeBuiltIn = makeBuiltIn$2.exports;
726
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
727
+
728
+ var defineBuiltIn$3 = function (O, key, value, options) {
729
+ if (!options) options = {};
730
+ var simple = options.enumerable;
731
+ var name = options.name !== undefined ? options.name : key;
732
+ if (isCallable$4(value)) makeBuiltIn(value, name, options);
733
+ if (options.global) {
734
+ if (simple) O[key] = value;
735
+ else defineGlobalProperty$1(key, value);
736
+ } else {
737
+ try {
738
+ if (!options.unsafe) delete O[key];
739
+ else if (O[key]) simple = true;
740
+ } catch (error) { /* empty */ }
741
+ if (simple) O[key] = value;
742
+ else definePropertyModule$2.f(O, key, {
743
+ value: value,
744
+ enumerable: false,
745
+ configurable: !options.nonConfigurable,
746
+ writable: !options.nonWritable
747
+ });
748
+ } return O;
749
+ };
750
+
751
+ var objectGetOwnPropertyNames = {};
752
+
753
+ var ceil = Math.ceil;
754
+ var floor = Math.floor;
755
+
756
+ // `Math.trunc` method
757
+ // https://tc39.es/ecma262/#sec-math.trunc
758
+ // eslint-disable-next-line es/no-math-trunc -- safe
759
+ var mathTrunc = Math.trunc || function trunc(x) {
760
+ var n = +x;
761
+ return (n > 0 ? floor : ceil)(n);
762
+ };
763
+
764
+ var trunc = mathTrunc;
765
+
766
+ // `ToIntegerOrInfinity` abstract operation
767
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
768
+ var toIntegerOrInfinity$2 = function (argument) {
769
+ var number = +argument;
770
+ // eslint-disable-next-line no-self-compare -- NaN check
771
+ return number !== number || number === 0 ? 0 : trunc(number);
772
+ };
773
+
774
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
775
+
776
+ var max = Math.max;
777
+ var min$1 = Math.min;
778
+
779
+ // Helper for a popular repeating case of the spec:
780
+ // Let integer be ? ToInteger(index).
781
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
782
+ var toAbsoluteIndex$1 = function (index, length) {
783
+ var integer = toIntegerOrInfinity$1(index);
784
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
785
+ };
786
+
787
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
788
+
789
+ var min = Math.min;
790
+
791
+ // `ToLength` abstract operation
792
+ // https://tc39.es/ecma262/#sec-tolength
793
+ var toLength$1 = function (argument) {
794
+ var len = toIntegerOrInfinity(argument);
795
+ return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
796
+ };
797
+
798
+ var toLength = toLength$1;
799
+
800
+ // `LengthOfArrayLike` abstract operation
801
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
802
+ var lengthOfArrayLike$1 = function (obj) {
803
+ return toLength(obj.length);
804
+ };
805
+
806
+ var toIndexedObject$3 = toIndexedObject$5;
807
+ var toAbsoluteIndex = toAbsoluteIndex$1;
808
+ var lengthOfArrayLike = lengthOfArrayLike$1;
809
+
810
+ // `Array.prototype.{ indexOf, includes }` methods implementation
811
+ var createMethod = function (IS_INCLUDES) {
812
+ return function ($this, el, fromIndex) {
813
+ var O = toIndexedObject$3($this);
814
+ var length = lengthOfArrayLike(O);
815
+ var index = toAbsoluteIndex(fromIndex, length);
816
+ var value;
817
+ // Array#includes uses SameValueZero equality algorithm
818
+ // eslint-disable-next-line no-self-compare -- NaN check
819
+ if (IS_INCLUDES && el !== el) while (length > index) {
820
+ value = O[index++];
821
+ // eslint-disable-next-line no-self-compare -- NaN check
822
+ if (value !== value) return true;
823
+ // Array#indexOf ignores holes, Array#includes - not
824
+ } else for (;length > index; index++) {
825
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
826
+ } return !IS_INCLUDES && -1;
827
+ };
828
+ };
829
+
830
+ var arrayIncludes = {
831
+ // `Array.prototype.includes` method
832
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
833
+ includes: createMethod(true),
834
+ // `Array.prototype.indexOf` method
835
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
836
+ indexOf: createMethod(false)
837
+ };
838
+
839
+ var uncurryThis$3 = functionUncurryThis;
840
+ var hasOwn$3 = hasOwnProperty_1;
841
+ var toIndexedObject$2 = toIndexedObject$5;
842
+ var indexOf = arrayIncludes.indexOf;
843
+ var hiddenKeys$2 = hiddenKeys$4;
844
+
845
+ var push = uncurryThis$3([].push);
846
+
847
+ var objectKeysInternal = function (object, names) {
848
+ var O = toIndexedObject$2(object);
849
+ var i = 0;
850
+ var result = [];
851
+ var key;
852
+ for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push(result, key);
853
+ // Don't enum bug & hidden keys
854
+ while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
855
+ ~indexOf(result, key) || push(result, key);
856
+ }
857
+ return result;
858
+ };
859
+
860
+ // IE8- don't enum bug keys
861
+ var enumBugKeys$3 = [
862
+ 'constructor',
863
+ 'hasOwnProperty',
864
+ 'isPrototypeOf',
865
+ 'propertyIsEnumerable',
866
+ 'toLocaleString',
867
+ 'toString',
868
+ 'valueOf'
869
+ ];
870
+
871
+ var internalObjectKeys$1 = objectKeysInternal;
872
+ var enumBugKeys$2 = enumBugKeys$3;
873
+
874
+ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
875
+
876
+ // `Object.getOwnPropertyNames` method
877
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
878
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
879
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
880
+ return internalObjectKeys$1(O, hiddenKeys$1);
881
+ };
882
+
883
+ var objectGetOwnPropertySymbols = {};
884
+
885
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
886
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
887
+
888
+ var getBuiltIn$1 = getBuiltIn$3;
889
+ var uncurryThis$2 = functionUncurryThis;
890
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
891
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
892
+ var anObject$3 = anObject$5;
893
+
894
+ var concat$1 = uncurryThis$2([].concat);
895
+
896
+ // all object keys, includes non-enumerable and symbols
897
+ var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
898
+ var keys = getOwnPropertyNamesModule.f(anObject$3(it));
899
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
900
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
901
+ };
902
+
903
+ var hasOwn$2 = hasOwnProperty_1;
904
+ var ownKeys = ownKeys$1;
905
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
906
+ var definePropertyModule$1 = objectDefineProperty;
907
+
908
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
909
+ var keys = ownKeys(source);
910
+ var defineProperty = definePropertyModule$1.f;
911
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
912
+ for (var i = 0; i < keys.length; i++) {
913
+ var key = keys[i];
914
+ if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
915
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
916
+ }
917
+ }
918
+ };
919
+
920
+ var fails$3 = fails$b;
921
+ var isCallable$3 = isCallable$d;
922
+
923
+ var replacement = /#|\.prototype\./;
924
+
925
+ var isForced$1 = function (feature, detection) {
926
+ var value = data[normalize(feature)];
927
+ return value === POLYFILL ? true
928
+ : value === NATIVE ? false
929
+ : isCallable$3(detection) ? fails$3(detection)
930
+ : !!detection;
931
+ };
932
+
933
+ var normalize = isForced$1.normalize = function (string) {
934
+ return String(string).replace(replacement, '.').toLowerCase();
935
+ };
936
+
937
+ var data = isForced$1.data = {};
938
+ var NATIVE = isForced$1.NATIVE = 'N';
939
+ var POLYFILL = isForced$1.POLYFILL = 'P';
940
+
941
+ var isForced_1 = isForced$1;
942
+
943
+ var global$2 = global$c;
944
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
945
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
946
+ var defineBuiltIn$2 = defineBuiltIn$3;
947
+ var defineGlobalProperty = defineGlobalProperty$3;
948
+ var copyConstructorProperties = copyConstructorProperties$1;
949
+ var isForced = isForced_1;
950
+
951
+ /*
952
+ options.target - name of the target object
953
+ options.global - target is the global object
954
+ options.stat - export as static methods of target
955
+ options.proto - export as prototype methods of target
956
+ options.real - real prototype method for the `pure` version
957
+ options.forced - export even if the native feature is available
958
+ options.bind - bind methods to the target, required for the `pure` version
959
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
960
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
961
+ options.sham - add a flag to not completely full polyfills
962
+ options.enumerable - export as enumerable property
963
+ options.dontCallGetSet - prevent calling a getter on target
964
+ options.name - the .name of the function if it does not match the key
965
+ */
966
+ var _export = function (options, source) {
967
+ var TARGET = options.target;
968
+ var GLOBAL = options.global;
969
+ var STATIC = options.stat;
970
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
971
+ if (GLOBAL) {
972
+ target = global$2;
973
+ } else if (STATIC) {
974
+ target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
975
+ } else {
976
+ target = global$2[TARGET] && global$2[TARGET].prototype;
977
+ }
978
+ if (target) for (key in source) {
979
+ sourceProperty = source[key];
980
+ if (options.dontCallGetSet) {
981
+ descriptor = getOwnPropertyDescriptor(target, key);
982
+ targetProperty = descriptor && descriptor.value;
983
+ } else targetProperty = target[key];
984
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
985
+ // contained in target
986
+ if (!FORCED && targetProperty !== undefined) {
987
+ if (typeof sourceProperty == typeof targetProperty) continue;
988
+ copyConstructorProperties(sourceProperty, targetProperty);
989
+ }
990
+ // add a flag to not completely full polyfills
991
+ if (options.sham || (targetProperty && targetProperty.sham)) {
992
+ createNonEnumerableProperty$2(sourceProperty, 'sham', true);
993
+ }
994
+ defineBuiltIn$2(target, key, sourceProperty, options);
995
+ }
996
+ };
997
+
998
+ var internalObjectKeys = objectKeysInternal;
999
+ var enumBugKeys$1 = enumBugKeys$3;
1000
+
1001
+ // `Object.keys` method
1002
+ // https://tc39.es/ecma262/#sec-object.keys
1003
+ // eslint-disable-next-line es/no-object-keys -- safe
1004
+ var objectKeys$2 = Object.keys || function keys(O) {
1005
+ return internalObjectKeys(O, enumBugKeys$1);
1006
+ };
1007
+
1008
+ var DESCRIPTORS$2 = descriptors;
1009
+ var uncurryThis$1 = functionUncurryThis;
1010
+ var call$1 = functionCall;
1011
+ var fails$2 = fails$b;
1012
+ var objectKeys$1 = objectKeys$2;
1013
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1014
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1015
+ var toObject$1 = toObject$3;
1016
+ var IndexedObject = indexedObject;
1017
+
1018
+ // eslint-disable-next-line es/no-object-assign -- safe
1019
+ var $assign = Object.assign;
1020
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1021
+ var defineProperty$3 = Object.defineProperty;
1022
+ var concat = uncurryThis$1([].concat);
1023
+
1024
+ // `Object.assign` method
1025
+ // https://tc39.es/ecma262/#sec-object.assign
1026
+ var objectAssign = !$assign || fails$2(function () {
1027
+ // should have correct order of operations (Edge bug)
1028
+ if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
1029
+ enumerable: true,
1030
+ get: function () {
1031
+ defineProperty$3(this, 'b', {
1032
+ value: 3,
1033
+ enumerable: false
1034
+ });
1035
+ }
1036
+ }), { b: 2 })).b !== 1) return true;
1037
+ // should work with symbols and should have deterministic property order (V8 bug)
1038
+ var A = {};
1039
+ var B = {};
1040
+ // eslint-disable-next-line es/no-symbol -- safe
1041
+ var symbol = Symbol('assign detection');
1042
+ var alphabet = 'abcdefghijklmnopqrst';
1043
+ A[symbol] = 7;
1044
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1045
+ return $assign({}, A)[symbol] !== 7 || objectKeys$1($assign({}, B)).join('') !== alphabet;
1046
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1047
+ var T = toObject$1(target);
1048
+ var argumentsLength = arguments.length;
1049
+ var index = 1;
1050
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1051
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1052
+ while (argumentsLength > index) {
1053
+ var S = IndexedObject(arguments[index++]);
1054
+ var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
1055
+ var length = keys.length;
1056
+ var j = 0;
1057
+ var key;
1058
+ while (length > j) {
1059
+ key = keys[j++];
1060
+ if (!DESCRIPTORS$2 || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
1061
+ }
1062
+ } return T;
1063
+ } : $assign;
1064
+
1065
+ var $$1 = _export;
1066
+ var assign = objectAssign;
1067
+
1068
+ // `Object.assign` method
1069
+ // https://tc39.es/ecma262/#sec-object.assign
1070
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1071
+ $$1({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1072
+ assign: assign
1073
+ });
1074
+
1075
+ var objectDefineProperties = {};
1076
+
1077
+ var DESCRIPTORS$1 = descriptors;
1078
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1079
+ var definePropertyModule = objectDefineProperty;
1080
+ var anObject$2 = anObject$5;
1081
+ var toIndexedObject$1 = toIndexedObject$5;
1082
+ var objectKeys = objectKeys$2;
1083
+
1084
+ // `Object.defineProperties` method
1085
+ // https://tc39.es/ecma262/#sec-object.defineproperties
1086
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
1087
+ objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1088
+ anObject$2(O);
1089
+ var props = toIndexedObject$1(Properties);
1090
+ var keys = objectKeys(Properties);
1091
+ var length = keys.length;
1092
+ var index = 0;
1093
+ var key;
1094
+ while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
1095
+ return O;
1096
+ };
1097
+
1098
+ var getBuiltIn = getBuiltIn$3;
1099
+
1100
+ var html$1 = getBuiltIn('document', 'documentElement');
1101
+
1102
+ /* global ActiveXObject -- old IE, WSH */
1103
+ var anObject$1 = anObject$5;
1104
+ var definePropertiesModule = objectDefineProperties;
1105
+ var enumBugKeys = enumBugKeys$3;
1106
+ var hiddenKeys = hiddenKeys$4;
1107
+ var html = html$1;
1108
+ var documentCreateElement$1 = documentCreateElement$2;
1109
+ var sharedKey$1 = sharedKey$3;
1110
+
1111
+ var GT = '>';
1112
+ var LT = '<';
1113
+ var PROTOTYPE = 'prototype';
1114
+ var SCRIPT = 'script';
1115
+ var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1116
+
1117
+ var EmptyConstructor = function () { /* empty */ };
1118
+
1119
+ var scriptTag = function (content) {
1120
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1121
+ };
1122
+
1123
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1124
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
1125
+ activeXDocument.write(scriptTag(''));
1126
+ activeXDocument.close();
1127
+ var temp = activeXDocument.parentWindow.Object;
1128
+ activeXDocument = null; // avoid memory leak
1129
+ return temp;
1130
+ };
1131
+
1132
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
1133
+ var NullProtoObjectViaIFrame = function () {
1134
+ // Thrash, waste and sodomy: IE GC bug
1135
+ var iframe = documentCreateElement$1('iframe');
1136
+ var JS = 'java' + SCRIPT + ':';
1137
+ var iframeDocument;
1138
+ iframe.style.display = 'none';
1139
+ html.appendChild(iframe);
1140
+ // https://github.com/zloirock/core-js/issues/475
1141
+ iframe.src = String(JS);
1142
+ iframeDocument = iframe.contentWindow.document;
1143
+ iframeDocument.open();
1144
+ iframeDocument.write(scriptTag('document.F=Object'));
1145
+ iframeDocument.close();
1146
+ return iframeDocument.F;
1147
+ };
1148
+
1149
+ // Check for document.domain and active x support
1150
+ // No need to use active x approach when document.domain is not set
1151
+ // see https://github.com/es-shims/es5-shim/issues/150
1152
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1153
+ // avoid IE GC bug
1154
+ var activeXDocument;
1155
+ var NullProtoObject = function () {
1156
+ try {
1157
+ activeXDocument = new ActiveXObject('htmlfile');
1158
+ } catch (error) { /* ignore */ }
1159
+ NullProtoObject = typeof document != 'undefined'
1160
+ ? document.domain && activeXDocument
1161
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1162
+ : NullProtoObjectViaIFrame()
1163
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
1164
+ var length = enumBugKeys.length;
1165
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1166
+ return NullProtoObject();
1167
+ };
1168
+
1169
+ hiddenKeys[IE_PROTO$1] = true;
1170
+
1171
+ // `Object.create` method
1172
+ // https://tc39.es/ecma262/#sec-object.create
1173
+ // eslint-disable-next-line es/no-object-create -- safe
1174
+ var objectCreate = Object.create || function create(O, Properties) {
1175
+ var result;
1176
+ if (O !== null) {
1177
+ EmptyConstructor[PROTOTYPE] = anObject$1(O);
1178
+ result = new EmptyConstructor();
1179
+ EmptyConstructor[PROTOTYPE] = null;
1180
+ // add "__proto__" for Object.getPrototypeOf polyfill
1181
+ result[IE_PROTO$1] = O;
1182
+ } else result = NullProtoObject();
1183
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1184
+ };
1185
+
1186
+ var wellKnownSymbol$4 = wellKnownSymbol$6;
1187
+ var create$1 = objectCreate;
1188
+ var defineProperty$2 = objectDefineProperty.f;
1189
+
1190
+ var UNSCOPABLES = wellKnownSymbol$4('unscopables');
1191
+ var ArrayPrototype = Array.prototype;
1192
+
1193
+ // Array.prototype[@@unscopables]
1194
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1195
+ if (ArrayPrototype[UNSCOPABLES] === undefined) {
1196
+ defineProperty$2(ArrayPrototype, UNSCOPABLES, {
1197
+ configurable: true,
1198
+ value: create$1(null)
1199
+ });
1200
+ }
1201
+
1202
+ // add a key to Array.prototype[@@unscopables]
1203
+ var addToUnscopables$1 = function (key) {
1204
+ ArrayPrototype[UNSCOPABLES][key] = true;
1205
+ };
1206
+
1207
+ var iterators = {};
1208
+
1209
+ var fails$1 = fails$b;
1210
+
1211
+ var correctPrototypeGetter = !fails$1(function () {
1212
+ function F() { /* empty */ }
1213
+ F.prototype.constructor = null;
1214
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1215
+ return Object.getPrototypeOf(new F()) !== F.prototype;
1216
+ });
1217
+
1218
+ var hasOwn$1 = hasOwnProperty_1;
1219
+ var isCallable$2 = isCallable$d;
1220
+ var toObject = toObject$3;
1221
+ var sharedKey = sharedKey$3;
1222
+ var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1223
+
1224
+ var IE_PROTO = sharedKey('IE_PROTO');
1225
+ var $Object = Object;
1226
+ var ObjectPrototype = $Object.prototype;
1227
+
1228
+ // `Object.getPrototypeOf` method
1229
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
1230
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
1231
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
1232
+ var object = toObject(O);
1233
+ if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
1234
+ var constructor = object.constructor;
1235
+ if (isCallable$2(constructor) && object instanceof constructor) {
1236
+ return constructor.prototype;
1237
+ } return object instanceof $Object ? ObjectPrototype : null;
1238
+ };
1239
+
1240
+ var fails = fails$b;
1241
+ var isCallable$1 = isCallable$d;
1242
+ var isObject$1 = isObject$7;
1243
+ var getPrototypeOf$1 = objectGetPrototypeOf;
1244
+ var defineBuiltIn$1 = defineBuiltIn$3;
1245
+ var wellKnownSymbol$3 = wellKnownSymbol$6;
1246
+
1247
+ var ITERATOR$2 = wellKnownSymbol$3('iterator');
1248
+ var BUGGY_SAFARI_ITERATORS$1 = false;
1249
+
1250
+ // `%IteratorPrototype%` object
1251
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1252
+ var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1253
+
1254
+ /* eslint-disable es/no-array-prototype-keys -- safe */
1255
+ if ([].keys) {
1256
+ arrayIterator = [].keys();
1257
+ // Safari 8 has buggy iterators w/o `next`
1258
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
1259
+ else {
1260
+ PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
1261
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
1262
+ }
1263
+ }
1264
+
1265
+ var NEW_ITERATOR_PROTOTYPE = !isObject$1(IteratorPrototype$2) || fails(function () {
1266
+ var test = {};
1267
+ // FF44- legacy iterators case
1268
+ return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
1269
+ });
1270
+
1271
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1272
+
1273
+ // `%IteratorPrototype%[@@iterator]()` method
1274
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1275
+ if (!isCallable$1(IteratorPrototype$2[ITERATOR$2])) {
1276
+ defineBuiltIn$1(IteratorPrototype$2, ITERATOR$2, function () {
1277
+ return this;
1278
+ });
1279
+ }
1280
+
1281
+ var iteratorsCore = {
1282
+ IteratorPrototype: IteratorPrototype$2,
1283
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1284
+ };
1285
+
1286
+ var defineProperty$1 = objectDefineProperty.f;
1287
+ var hasOwn = hasOwnProperty_1;
1288
+ var wellKnownSymbol$2 = wellKnownSymbol$6;
1289
+
1290
+ var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
1291
+
1292
+ var setToStringTag$3 = function (target, TAG, STATIC) {
1293
+ if (target && !STATIC) target = target.prototype;
1294
+ if (target && !hasOwn(target, TO_STRING_TAG)) {
1295
+ defineProperty$1(target, TO_STRING_TAG, { configurable: true, value: TAG });
1296
+ }
1297
+ };
1298
+
1299
+ var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1300
+ var create = objectCreate;
1301
+ var createPropertyDescriptor = createPropertyDescriptor$3;
1302
+ var setToStringTag$2 = setToStringTag$3;
1303
+ var Iterators$2 = iterators;
1304
+
1305
+ var returnThis$1 = function () { return this; };
1306
+
1307
+ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1308
+ var TO_STRING_TAG = NAME + ' Iterator';
1309
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1310
+ setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
1311
+ Iterators$2[TO_STRING_TAG] = returnThis$1;
1312
+ return IteratorConstructor;
1313
+ };
1314
+
1315
+ var uncurryThis = functionUncurryThis;
1316
+ var aCallable = aCallable$2;
1317
+
1318
+ var functionUncurryThisAccessor = function (object, key, method) {
1319
+ try {
1320
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1321
+ return uncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
1322
+ } catch (error) { /* empty */ }
1323
+ };
1324
+
1325
+ var isObject = isObject$7;
1326
+
1327
+ var isPossiblePrototype$1 = function (argument) {
1328
+ return isObject(argument) || argument === null;
1329
+ };
1330
+
1331
+ var isPossiblePrototype = isPossiblePrototype$1;
1332
+
1333
+ var $String = String;
1334
+ var $TypeError = TypeError;
1335
+
1336
+ var aPossiblePrototype$1 = function (argument) {
1337
+ if (isPossiblePrototype(argument)) return argument;
1338
+ throw new $TypeError("Can't set " + $String(argument) + ' as a prototype');
1339
+ };
1340
+
1341
+ /* eslint-disable no-proto -- safe */
1342
+ var uncurryThisAccessor = functionUncurryThisAccessor;
1343
+ var anObject = anObject$5;
1344
+ var aPossiblePrototype = aPossiblePrototype$1;
1345
+
1346
+ // `Object.setPrototypeOf` method
1347
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
1348
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
1349
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
1350
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1351
+ var CORRECT_SETTER = false;
1352
+ var test = {};
1353
+ var setter;
1354
+ try {
1355
+ setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
1356
+ setter(test, []);
1357
+ CORRECT_SETTER = test instanceof Array;
1358
+ } catch (error) { /* empty */ }
1359
+ return function setPrototypeOf(O, proto) {
1360
+ anObject(O);
1361
+ aPossiblePrototype(proto);
1362
+ if (CORRECT_SETTER) setter(O, proto);
1363
+ else O.__proto__ = proto;
1364
+ return O;
1365
+ };
1366
+ }() : undefined);
1367
+
1368
+ var $ = _export;
1369
+ var call = functionCall;
1370
+ var FunctionName = functionName;
1371
+ var isCallable = isCallable$d;
1372
+ var createIteratorConstructor = iteratorCreateConstructor;
1373
+ var getPrototypeOf = objectGetPrototypeOf;
1374
+ var setPrototypeOf = objectSetPrototypeOf;
1375
+ var setToStringTag$1 = setToStringTag$3;
1376
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
1377
+ var defineBuiltIn = defineBuiltIn$3;
1378
+ var wellKnownSymbol$1 = wellKnownSymbol$6;
1379
+ var Iterators$1 = iterators;
1380
+ var IteratorsCore = iteratorsCore;
1381
+
1382
+ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1383
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1384
+ var IteratorPrototype = IteratorsCore.IteratorPrototype;
1385
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1386
+ var ITERATOR$1 = wellKnownSymbol$1('iterator');
1387
+ var KEYS = 'keys';
1388
+ var VALUES = 'values';
1389
+ var ENTRIES = 'entries';
1390
+
1391
+ var returnThis = function () { return this; };
1392
+
1393
+ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1394
+ createIteratorConstructor(IteratorConstructor, NAME, next);
1395
+
1396
+ var getIterationMethod = function (KIND) {
1397
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1398
+ if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
1399
+
1400
+ switch (KIND) {
1401
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1402
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1403
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1404
+ }
1405
+
1406
+ return function () { return new IteratorConstructor(this); };
1407
+ };
1408
+
1409
+ var TO_STRING_TAG = NAME + ' Iterator';
1410
+ var INCORRECT_VALUES_NAME = false;
1411
+ var IterablePrototype = Iterable.prototype;
1412
+ var nativeIterator = IterablePrototype[ITERATOR$1]
1413
+ || IterablePrototype['@@iterator']
1414
+ || DEFAULT && IterablePrototype[DEFAULT];
1415
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
1416
+ var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1417
+ var CurrentIteratorPrototype, methods, KEY;
1418
+
1419
+ // fix native
1420
+ if (anyNativeIterator) {
1421
+ CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1422
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1423
+ if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1424
+ if (setPrototypeOf) {
1425
+ setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1426
+ } else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
1427
+ defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1428
+ }
1429
+ }
1430
+ // Set @@toStringTag to native iterators
1431
+ setToStringTag$1(CurrentIteratorPrototype, TO_STRING_TAG, true);
1432
+ }
1433
+ }
1434
+
1435
+ // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1436
+ if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1437
+ if (CONFIGURABLE_FUNCTION_NAME) {
1438
+ createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1439
+ } else {
1440
+ INCORRECT_VALUES_NAME = true;
1441
+ defaultIterator = function values() { return call(nativeIterator, this); };
1442
+ }
1443
+ }
1444
+
1445
+ // export additional methods
1446
+ if (DEFAULT) {
1447
+ methods = {
1448
+ values: getIterationMethod(VALUES),
1449
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1450
+ entries: getIterationMethod(ENTRIES)
1451
+ };
1452
+ if (FORCED) for (KEY in methods) {
1453
+ if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1454
+ defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
1455
+ }
1456
+ } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1457
+ }
1458
+
1459
+ // define iterator
1460
+ if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1461
+ defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1462
+ }
1463
+ Iterators$1[NAME] = defaultIterator;
1464
+
1465
+ return methods;
1466
+ };
1467
+
1468
+ // `CreateIterResultObject` abstract operation
1469
+ // https://tc39.es/ecma262/#sec-createiterresultobject
1470
+ var createIterResultObject$1 = function (value, done) {
1471
+ return { value: value, done: done };
1472
+ };
1473
+
1474
+ var toIndexedObject = toIndexedObject$5;
1475
+ var addToUnscopables = addToUnscopables$1;
1476
+ var Iterators = iterators;
1477
+ var InternalStateModule = internalState;
1478
+ var defineProperty = objectDefineProperty.f;
1479
+ var defineIterator = iteratorDefine;
1480
+ var createIterResultObject = createIterResultObject$1;
1481
+ var DESCRIPTORS = descriptors;
1482
+
1483
+ var ARRAY_ITERATOR = 'Array Iterator';
1484
+ var setInternalState = InternalStateModule.set;
1485
+ var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
1486
+
1487
+ // `Array.prototype.entries` method
1488
+ // https://tc39.es/ecma262/#sec-array.prototype.entries
1489
+ // `Array.prototype.keys` method
1490
+ // https://tc39.es/ecma262/#sec-array.prototype.keys
1491
+ // `Array.prototype.values` method
1492
+ // https://tc39.es/ecma262/#sec-array.prototype.values
1493
+ // `Array.prototype[@@iterator]` method
1494
+ // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
1495
+ // `CreateArrayIterator` internal method
1496
+ // https://tc39.es/ecma262/#sec-createarrayiterator
1497
+ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1498
+ setInternalState(this, {
1499
+ type: ARRAY_ITERATOR,
1500
+ target: toIndexedObject(iterated), // target
1501
+ index: 0, // next index
1502
+ kind: kind // kind
1503
+ });
1504
+ // `%ArrayIteratorPrototype%.next` method
1505
+ // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1506
+ }, function () {
1507
+ var state = getInternalState(this);
1508
+ var target = state.target;
1509
+ var index = state.index++;
1510
+ if (!target || index >= target.length) {
1511
+ state.target = undefined;
1512
+ return createIterResultObject(undefined, true);
1513
+ }
1514
+ switch (state.kind) {
1515
+ case 'keys': return createIterResultObject(index, false);
1516
+ case 'values': return createIterResultObject(target[index], false);
1517
+ } return createIterResultObject([index, target[index]], false);
1518
+ }, 'values');
1519
+
1520
+ // argumentsList[@@iterator] is %ArrayProto_values%
1521
+ // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
1522
+ // https://tc39.es/ecma262/#sec-createmappedargumentsobject
1523
+ var values = Iterators.Arguments = Iterators.Array;
1524
+
1525
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1526
+ addToUnscopables('keys');
1527
+ addToUnscopables('values');
1528
+ addToUnscopables('entries');
1529
+
1530
+ // V8 ~ Chrome 45- bug
1531
+ if (DESCRIPTORS && values.name !== 'values') try {
1532
+ defineProperty(values, 'name', { value: 'values' });
1533
+ } catch (error) { /* empty */ }
1534
+
1535
+ // iterable DOM collections
1536
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1537
+ var domIterables = {
1538
+ CSSRuleList: 0,
1539
+ CSSStyleDeclaration: 0,
1540
+ CSSValueList: 0,
1541
+ ClientRectList: 0,
1542
+ DOMRectList: 0,
1543
+ DOMStringList: 0,
1544
+ DOMTokenList: 1,
1545
+ DataTransferItemList: 0,
1546
+ FileList: 0,
1547
+ HTMLAllCollection: 0,
1548
+ HTMLCollection: 0,
1549
+ HTMLFormElement: 0,
1550
+ HTMLSelectElement: 0,
1551
+ MediaList: 0,
1552
+ MimeTypeArray: 0,
1553
+ NamedNodeMap: 0,
1554
+ NodeList: 1,
1555
+ PaintRequestList: 0,
1556
+ Plugin: 0,
1557
+ PluginArray: 0,
1558
+ SVGLengthList: 0,
1559
+ SVGNumberList: 0,
1560
+ SVGPathSegList: 0,
1561
+ SVGPointList: 0,
1562
+ SVGStringList: 0,
1563
+ SVGTransformList: 0,
1564
+ SourceBufferList: 0,
1565
+ StyleSheetList: 0,
1566
+ TextTrackCueList: 0,
1567
+ TextTrackList: 0,
1568
+ TouchList: 0
1569
+ };
1570
+
1571
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1572
+ var documentCreateElement = documentCreateElement$2;
1573
+
1574
+ var classList = documentCreateElement('span').classList;
1575
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
1576
+
1577
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1578
+
1579
+ var global$1 = global$c;
1580
+ var DOMIterables = domIterables;
1581
+ var DOMTokenListPrototype = domTokenListPrototype;
1582
+ var ArrayIteratorMethods = es_array_iterator;
1583
+ var createNonEnumerableProperty = createNonEnumerableProperty$4;
1584
+ var setToStringTag = setToStringTag$3;
1585
+ var wellKnownSymbol = wellKnownSymbol$6;
1586
+
1587
+ var ITERATOR = wellKnownSymbol('iterator');
1588
+ var ArrayValues = ArrayIteratorMethods.values;
1589
+
1590
+ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1591
+ if (CollectionPrototype) {
1592
+ // some Chrome versions have non-configurable methods on DOMTokenList
1593
+ if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1594
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
1595
+ } catch (error) {
1596
+ CollectionPrototype[ITERATOR] = ArrayValues;
1597
+ }
1598
+ setToStringTag(CollectionPrototype, COLLECTION_NAME, true);
1599
+ if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1600
+ // some Chrome versions have non-configurable methods on DOMTokenList
1601
+ if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1602
+ createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1603
+ } catch (error) {
1604
+ CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1605
+ }
1606
+ }
1607
+ }
1608
+ };
1609
+
1610
+ for (var COLLECTION_NAME in DOMIterables) {
1611
+ handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
1612
+ }
1613
+
1614
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1615
+
1616
+ const useDotcmsEditor = config => {
1617
+ const [isInsideEditorPage, setIsInsideEditorPage] = useState(false);
1618
+ useEffect(() => {
1619
+ const insideEditor = isInsideEditor();
1620
+ if (insideEditor) {
1621
+ initEditor(config);
1622
+ updateNavigation((config == null ? void 0 : config.pathname) || '/');
1623
+ }
1624
+ setIsInsideEditorPage(insideEditor);
1625
+ return () => {
1626
+ if (insideEditor) {
1627
+ destroyEditor();
1628
+ }
1629
+ };
1630
+ }, [config]);
1631
+ return isInsideEditorPage;
1632
+ };
1633
+
1634
+ const PageContext = /*#__PURE__*/createContext(null);
1635
+
1636
+ /**
1637
+ * `PageProvider` is a functional component that provides a context for a DotCMS page.
1638
+ * It takes a `PageProviderProps` object as a parameter and returns a JSX element.
1639
+ *
1640
+ * @category Components
1641
+ * @param {PageProviderProps} props - The properties for the PageProvider. Includes an `entity` and `children`.
1642
+ * @returns {JSX.Element} - A JSX element that provides a context for a DotCMS page.
1643
+ */
1644
+ function PageProvider(props) {
1645
+ const {
1646
+ entity,
1647
+ children
1648
+ } = props;
1649
+ return jsx(PageContext.Provider, {
1650
+ value: entity,
1651
+ children: children
1652
+ });
1653
+ }
1654
+
1655
+ function styleInject(css, ref) {
1656
+ if ( ref === void 0 ) ref = {};
1657
+ var insertAt = ref.insertAt;
1658
+
1659
+ if (!css || typeof document === 'undefined') { return; }
1660
+
1661
+ var head = document.head || document.getElementsByTagName('head')[0];
1662
+ var style = document.createElement('style');
1663
+ style.type = 'text/css';
1664
+
1665
+ if (insertAt === 'top') {
1666
+ if (head.firstChild) {
1667
+ head.insertBefore(style, head.firstChild);
1668
+ } else {
1669
+ head.appendChild(style);
1670
+ }
1671
+ } else {
1672
+ head.appendChild(style);
1673
+ }
1674
+
1675
+ if (style.styleSheet) {
1676
+ style.styleSheet.cssText = css;
1677
+ } else {
1678
+ style.appendChild(document.createTextNode(css));
1679
+ }
1680
+ }
1681
+
1682
+ var css_248z$1 = ".row-module_row__8V7Eh {\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n gap: 1rem;\n}\n";
1683
+ var styles$1 = {"row":"row-module_row__8V7Eh"};
1684
+ styleInject(css_248z$1);
1685
+
1686
+ const endClassMap = {
1687
+ 1: 'col-end-1',
1688
+ 2: 'col-end-2',
1689
+ 3: 'col-end-3',
1690
+ 4: 'col-end-4',
1691
+ 5: 'col-end-5',
1692
+ 6: 'col-end-6',
1693
+ 7: 'col-end-7',
1694
+ 8: 'col-end-8',
1695
+ 9: 'col-end-9',
1696
+ 10: 'col-end-10',
1697
+ 11: 'col-end-11',
1698
+ 12: 'col-end-12',
1699
+ 13: 'col-end-13'
1700
+ };
1701
+ const startClassMap = {
1702
+ 1: 'col-start-1',
1703
+ 2: 'col-start-2',
1704
+ 3: 'col-start-3',
1705
+ 4: 'col-start-4',
1706
+ 5: 'col-start-5',
1707
+ 6: 'col-start-6',
1708
+ 7: 'col-start-7',
1709
+ 8: 'col-start-8',
1710
+ 9: 'col-start-9',
1711
+ 10: 'col-start-10',
1712
+ 11: 'col-start-11',
1713
+ 12: 'col-start-12'
1714
+ };
1715
+ const getContainersData = (containers, containerRef) => {
1716
+ const {
1717
+ identifier,
1718
+ uuid
1719
+ } = containerRef;
1720
+ const {
1721
+ containerStructures,
1722
+ container
1723
+ } = containers[identifier];
1724
+ // Get the variant id
1725
+ const {
1726
+ variantId
1727
+ } = (container == null ? void 0 : container.parentPermissionable) || {};
1728
+ // Get accepts types of content types for this container
1729
+ const acceptTypes = containerStructures.map(structure => structure.contentTypeVar).join(',');
1730
+ // Get the contentlets for "this" container
1731
+ const contentlets = containers[identifier].contentlets[`uuid-${uuid}`];
1732
+ return Object.assign({}, containers[identifier].container, {
1733
+ acceptTypes,
1734
+ contentlets,
1735
+ variantId
1736
+ });
1737
+ };
1738
+ const combineClasses = classes => classes.filter(Boolean).join(' ');
1739
+ const getPositionStyleClasses = (start, end) => {
1740
+ const startClass = startClassMap[start];
1741
+ const endClass = endClassMap[end];
1742
+ return {
1743
+ startClass,
1744
+ endClass
1745
+ };
1746
+ };
1747
+
1748
+ var css_248z = ".column-module_col-start-1__GK-q- {\n grid-column-start: 1;\n}\n\n.column-module_col-start-2__1DmkY {\n grid-column-start: 2;\n}\n\n.column-module_col-start-3__HNEPh {\n grid-column-start: 3;\n}\n\n.column-module_col-start-4__oCAwh {\n grid-column-start: 4;\n}\n\n.column-module_col-start-5__re1rB {\n grid-column-start: 5;\n}\n\n.column-module_col-start-6__dkB4w {\n grid-column-start: 6;\n}\n\n.column-module_col-start-7__kEfJb {\n grid-column-start: 7;\n}\n\n.column-module_col-start-8__Yx31z {\n grid-column-start: 8;\n}\n\n.column-module_col-start-9__9YiVY {\n grid-column-start: 9;\n}\n\n.column-module_col-start-10__6AFbk {\n grid-column-start: 10;\n}\n\n.column-module_col-start-11__LP24D {\n grid-column-start: 11;\n}\n\n.column-module_col-start-12__8p0QS {\n grid-column-start: 12;\n}\n\n.column-module_col-end-1__G9axv {\n grid-column-end: 1;\n}\n\n.column-module_col-end-2__pYjHG {\n grid-column-end: 2;\n}\n\n.column-module_col-end-3__4woe6 {\n grid-column-end: 3;\n}\n\n.column-module_col-end-4__zlBaT {\n grid-column-end: 4;\n}\n\n.column-module_col-end-5__aC-y8 {\n grid-column-end: 5;\n}\n\n.column-module_col-end-6__YljAP {\n grid-column-end: 6;\n}\n\n.column-module_col-end-7__lpQrW {\n grid-column-end: 7;\n}\n\n.column-module_col-end-8__F6UVd {\n grid-column-end: 8;\n}\n\n.column-module_col-end-9__kvQ3T {\n grid-column-end: 9;\n}\n\n.column-module_col-end-10__XJhrd {\n grid-column-end: 10;\n}\n\n.column-module_col-end-11__nx-lF {\n grid-column-end: 11;\n}\n\n.column-module_col-end-12__LIRnk {\n grid-column-end: 12;\n}\n\n.column-module_col-end-13__0p7YI {\n grid-column-end: 13;\n}\n";
1749
+ var styles = {"col-start-1":"column-module_col-start-1__GK-q-","col-start-2":"column-module_col-start-2__1DmkY","col-start-3":"column-module_col-start-3__HNEPh","col-start-4":"column-module_col-start-4__oCAwh","col-start-5":"column-module_col-start-5__re1rB","col-start-6":"column-module_col-start-6__dkB4w","col-start-7":"column-module_col-start-7__kEfJb","col-start-8":"column-module_col-start-8__Yx31z","col-start-9":"column-module_col-start-9__9YiVY","col-start-10":"column-module_col-start-10__6AFbk","col-start-11":"column-module_col-start-11__LP24D","col-start-12":"column-module_col-start-12__8p0QS","col-end-1":"column-module_col-end-1__G9axv","col-end-2":"column-module_col-end-2__pYjHG","col-end-3":"column-module_col-end-3__4woe6","col-end-4":"column-module_col-end-4__zlBaT","col-end-5":"column-module_col-end-5__aC-y8","col-end-6":"column-module_col-end-6__YljAP","col-end-7":"column-module_col-end-7__lpQrW","col-end-8":"column-module_col-end-8__F6UVd","col-end-9":"column-module_col-end-9__kvQ3T","col-end-10":"column-module_col-end-10__XJhrd","col-end-11":"column-module_col-end-11__nx-lF","col-end-12":"column-module_col-end-12__LIRnk","col-end-13":"column-module_col-end-13__0p7YI"};
1750
+ styleInject(css_248z);
1751
+
1752
+ const FAKE_CONTENLET = {
1753
+ identifier: 'TEMP_EMPTY_CONTENTLET',
1754
+ title: 'TEMP_EMPTY_CONTENTLET',
1755
+ contentType: 'TEMP_EMPTY_CONTENTLET_TYPE',
1756
+ inode: 'TEMPY_EMPTY_CONTENTLET_INODE',
1757
+ widgetTitle: 'TEMP_EMPTY_CONTENTLET',
1758
+ onNumberOfPages: 1
1759
+ };
1760
+ function EmptyContainer() {
1761
+ return jsx("div", {
1762
+ "data-testid": "empty-container",
1763
+ style: {
1764
+ width: '100%',
1765
+ backgroundColor: '#ECF0FD',
1766
+ display: 'flex',
1767
+ justifyContent: 'center',
1768
+ alignItems: 'center',
1769
+ color: '#030E32',
1770
+ height: '10rem'
1771
+ },
1772
+ children: "This container is empty."
1773
+ });
1774
+ }
1775
+ function NoContent({
1776
+ contentType
1777
+ }) {
1778
+ return jsxs("div", {
1779
+ "data-testid": "no-component",
1780
+ children: ["No Component for ", contentType]
1781
+ });
1782
+ }
1783
+ function Container({
1784
+ containerRef
1785
+ }) {
1786
+ const {
1787
+ isInsideEditor
1788
+ } = useContext(PageContext);
1789
+ const {
1790
+ identifier,
1791
+ uuid
1792
+ } = containerRef;
1793
+ // Get the containers from the global context
1794
+ const {
1795
+ containers,
1796
+ components
1797
+ } = useContext(PageContext);
1798
+ const {
1799
+ acceptTypes,
1800
+ contentlets,
1801
+ maxContentlets,
1802
+ variantId,
1803
+ path
1804
+ } = getContainersData(containers, containerRef);
1805
+ const updatedContentlets = contentlets.length === 0 && isInsideEditor ? [FAKE_CONTENLET] : contentlets;
1806
+ const container = {
1807
+ acceptTypes,
1808
+ identifier: path != null ? path : identifier,
1809
+ maxContentlets,
1810
+ variantId,
1811
+ uuid
1812
+ };
1813
+ const renderContentlets = updatedContentlets.map(contentlet => {
1814
+ const ContentTypeComponent = components[contentlet.contentType] || NoContent;
1815
+ const Component = contentlet.identifier === 'TEMP_EMPTY_CONTENTLET' ? EmptyContainer : ContentTypeComponent;
1816
+ return isInsideEditor ? jsx("div", {
1817
+ "data-dot-object": "contentlet",
1818
+ "data-dot-identifier": contentlet.identifier,
1819
+ "data-dot-title": contentlet.widgetTitle || contentlet.title,
1820
+ "data-dot-inode": contentlet.inode,
1821
+ "data-dot-type": contentlet.contentType,
1822
+ "data-dot-container": JSON.stringify(container),
1823
+ "data-dot-on-number-of-pages": contentlet.onNumberOfPages,
1824
+ children: jsx(Component, Object.assign({}, contentlet))
1825
+ }, contentlet.identifier) : ( /*#__PURE__*/createElement$1(Component, Object.assign({}, contentlet, {
1826
+ key: contentlet.identifier
1827
+ })));
1828
+ });
1829
+ return isInsideEditor ? jsx("div", {
1830
+ "data-dot-object": "container",
1831
+ "data-dot-accept-types": acceptTypes,
1832
+ "data-dot-identifier": path != null ? path : identifier,
1833
+ "data-max-contentlets": maxContentlets,
1834
+ "data-uuid": uuid,
1835
+ children: renderContentlets
1836
+ }) :
1837
+ // eslint-disable-next-line react/jsx-no-useless-fragment
1838
+ jsx(Fragment, {
1839
+ children: renderContentlets
1840
+ });
1841
+ }
1842
+
1843
+ function Column({
1844
+ column
1845
+ }) {
1846
+ const {
1847
+ isInsideEditor
1848
+ } = useContext(PageContext);
1849
+ const {
1850
+ startClass,
1851
+ endClass
1852
+ } = getPositionStyleClasses(column.leftOffset, column.width + column.leftOffset);
1853
+ const combinedClasses = combineClasses([styles[endClass], styles[startClass], column.styleClass]);
1854
+ const columnProps = isInsideEditor ? {
1855
+ 'data-dot': 'column',
1856
+ 'data-testid': 'column'
1857
+ } : {};
1858
+ return jsx("div", Object.assign({}, columnProps, {
1859
+ className: combinedClasses,
1860
+ children: column.containers.map(container => jsx(Container, {
1861
+ containerRef: container
1862
+ }, `${container.identifier}-${container.uuid}`))
1863
+ }));
1864
+ }
1865
+
1866
+ /**
1867
+ * Renders a row
1868
+ *
1869
+ * @category Components
1870
+ * @param {React.ForwardedRef<HTMLDivElement, RowProps>} ref
1871
+ * @return {*}
1872
+ */
1873
+ const Row = /*#__PURE__*/forwardRef((props, ref) => {
1874
+ const {
1875
+ isInsideEditor
1876
+ } = useContext(PageContext);
1877
+ const {
1878
+ row
1879
+ } = props;
1880
+ const combinedClasses = combineClasses([styles$1.row, row.styleClass]);
1881
+ const rowProps = isInsideEditor ? {
1882
+ 'data-dot': 'row',
1883
+ 'data-testid': 'row',
1884
+ ref
1885
+ } : {};
1886
+ return jsx("div", Object.assign({}, rowProps, {
1887
+ className: combinedClasses,
1888
+ children: row.columns.map((column, index) => jsx(Column, {
1889
+ column: column
1890
+ }, index))
1891
+ }));
1892
+ });
1893
+
1894
+ /**
1895
+ * `DotcmsLayout` is a functional component that renders a layout for a DotCMS page.
1896
+ * It takes a `DotcmsPageProps` object as a parameter and returns a JSX element.
1897
+ *
1898
+ * @category Components
1899
+ * @param {DotcmsPageProps} props - The properties for the DotCMS page.
1900
+ * @returns {JSX.Element} - A JSX element that represents the layout for a DotCMS page.
1901
+ */
1902
+ function DotcmsLayout({
1903
+ entity,
1904
+ config
1905
+ }) {
1906
+ const isInsideEditor = useDotcmsEditor(config);
1907
+ return jsx(PageProvider, {
1908
+ entity: Object.assign({}, entity, {
1909
+ isInsideEditor
1910
+ }),
1911
+ children: entity.layout.body.rows.map((row, index) => jsx(Row, {
1912
+ row: row
1913
+ }, index))
1914
+ });
1915
+ }
1916
+
1917
+ /**
1918
+ * `useDotcmsPageContext` is a custom React hook that provides access to the `PageProviderContext`.
1919
+ * It takes no parameters and returns the context value or `null` if it's not available.
1920
+ *
1921
+ * @category Hooks
1922
+ * @returns {PageProviderContext | null} - The context value or `null` if it's not available.
1923
+ */
1924
+ function useDotcmsPageContext() {
1925
+ return useContext(PageContext);
1926
+ }
1927
+
1928
+ export { DotcmsLayout, PageProvider, Row, useDotcmsPageContext };