@dotcms/react 0.0.1-alpha.3 → 0.0.1-alpha.30

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,28 +1,10 @@
1
1
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
- import { useRef, useState, useEffect, createContext, useContext, createElement as createElement$1, forwardRef } from 'react';
3
- import { postMessageToEditor, CUSTOMER_ACTIONS } from '@dotcms/client';
2
+ import { useState, useEffect, createContext, useContext, createElement as createElement$1, forwardRef } from 'react';
3
+ import { isInsideEditor, initEditor, updateNavigation, destroyEditor, DotCmsClient, postMessageToEditor, CUSTOMER_ACTIONS } from '@dotcms/client';
4
4
 
5
5
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
6
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$g =
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$i = function (exec) {
7
+ var fails$c = function (exec) {
26
8
  try {
27
9
  return !!exec();
28
10
  } catch (error) {
@@ -30,17 +12,9 @@ var fails$i = function (exec) {
30
12
  }
31
13
  };
32
14
 
33
- var fails$h = fails$i;
34
-
35
- // Detect IE8's incomplete defineProperty implementation
36
- var descriptors = !fails$h(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$g = fails$i;
15
+ var fails$b = fails$c;
42
16
 
43
- var functionBindNative = !fails$g(function () {
17
+ var functionBindNative = !fails$b(function () {
44
18
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
45
19
  var test = (function () { /* empty */ }).bind();
46
20
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -49,139 +23,158 @@ var functionBindNative = !fails$g(function () {
49
23
 
50
24
  var NATIVE_BIND$2 = functionBindNative;
51
25
 
52
- var call$a = Function.prototype.call;
53
-
54
- var functionCall = NATIVE_BIND$2 ? call$a.bind(call$a) : function () {
55
- return call$a.apply(call$a, 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$1 = functionBindNative;
84
-
85
26
  var FunctionPrototype$2 = Function.prototype;
86
- var call$9 = FunctionPrototype$2.call;
87
- var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$2.bind.bind(call$9, call$9);
27
+ var call$8 = FunctionPrototype$2.call;
28
+ var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$8, call$8);
88
29
 
89
- var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
30
+ var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
90
31
  return function () {
91
- return call$9.apply(fn, arguments);
32
+ return call$8.apply(fn, arguments);
92
33
  };
93
34
  };
94
35
 
95
- var uncurryThis$h = functionUncurryThis;
36
+ var uncurryThis$d = functionUncurryThis;
96
37
 
97
- var toString$6 = uncurryThis$h({}.toString);
98
- var stringSlice$5 = uncurryThis$h(''.slice);
38
+ var toString$3 = uncurryThis$d({}.toString);
39
+ var stringSlice$1 = uncurryThis$d(''.slice);
99
40
 
100
- var classofRaw$2 = function (it) {
101
- return stringSlice$5(toString$6(it), 8, -1);
41
+ var classofRaw$1 = function (it) {
42
+ return stringSlice$1(toString$3(it), 8, -1);
102
43
  };
103
44
 
104
- var uncurryThis$g = functionUncurryThis;
105
- var fails$f = fails$i;
106
- var classof$5 = classofRaw$2;
45
+ var uncurryThis$c = functionUncurryThis;
46
+ var fails$a = fails$c;
47
+ var classof$4 = classofRaw$1;
107
48
 
108
49
  var $Object$4 = Object;
109
- var split = uncurryThis$g(''.split);
50
+ var split = uncurryThis$c(''.split);
110
51
 
111
52
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
112
- var indexedObject = fails$f(function () {
53
+ var indexedObject = fails$a(function () {
113
54
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
114
55
  // eslint-disable-next-line no-prototype-builtins -- safe
115
56
  return !$Object$4('z').propertyIsEnumerable(0);
116
57
  }) ? function (it) {
117
- return classof$5(it) === 'String' ? split(it, '') : $Object$4(it);
58
+ return classof$4(it) === 'String' ? split(it, '') : $Object$4(it);
118
59
  } : $Object$4;
119
60
 
120
61
  // we can't use just `it == null` since of `document.all` special case
121
62
  // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
122
- var isNullOrUndefined$3 = function (it) {
63
+ var isNullOrUndefined$2 = function (it) {
123
64
  return it === null || it === undefined;
124
65
  };
125
66
 
126
- var isNullOrUndefined$2 = isNullOrUndefined$3;
67
+ var isNullOrUndefined$1 = isNullOrUndefined$2;
127
68
 
128
- var $TypeError$9 = TypeError;
69
+ var $TypeError$6 = TypeError;
129
70
 
130
71
  // `RequireObjectCoercible` abstract operation
131
72
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
132
- var requireObjectCoercible$5 = function (it) {
133
- if (isNullOrUndefined$2(it)) throw new $TypeError$9("Can't call method on " + it);
73
+ var requireObjectCoercible$3 = function (it) {
74
+ if (isNullOrUndefined$1(it)) throw new $TypeError$6("Can't call method on " + it);
134
75
  return it;
135
76
  };
136
77
 
137
78
  // toObject with fallback for non-array-like ES3 strings
138
- var IndexedObject$2 = indexedObject;
139
- var requireObjectCoercible$4 = requireObjectCoercible$5;
79
+ var IndexedObject$1 = indexedObject;
80
+ var requireObjectCoercible$2 = requireObjectCoercible$3;
140
81
 
141
82
  var toIndexedObject$5 = function (it) {
142
- return IndexedObject$2(requireObjectCoercible$4(it));
83
+ return IndexedObject$1(requireObjectCoercible$2(it));
143
84
  };
144
85
 
145
- // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
146
- var documentAll = typeof document == 'object' && document.all;
86
+ var check = function (it) {
87
+ return it && it.Math === Math && it;
88
+ };
147
89
 
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$g = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
152
- return typeof argument == 'function' || argument === documentAll;
153
- } : function (argument) {
154
- return typeof argument == 'function';
90
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
91
+ var global$b =
92
+ // eslint-disable-next-line es/no-global-this -- safe
93
+ check(typeof globalThis == 'object' && globalThis) ||
94
+ check(typeof window == 'object' && window) ||
95
+ // eslint-disable-next-line no-restricted-globals -- safe
96
+ check(typeof self == 'object' && self) ||
97
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
98
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
99
+ // eslint-disable-next-line no-new-func -- fallback
100
+ (function () { return this; })() || Function('return this')();
101
+
102
+ var sharedStore = {exports: {}};
103
+
104
+ var global$a = global$b;
105
+
106
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
107
+ var defineProperty$5 = Object.defineProperty;
108
+
109
+ var defineGlobalProperty$3 = function (key, value) {
110
+ try {
111
+ defineProperty$5(global$a, key, { value: value, configurable: true, writable: true });
112
+ } catch (error) {
113
+ global$a[key] = value;
114
+ } return value;
155
115
  };
156
116
 
157
- var isCallable$f = isCallable$g;
117
+ var globalThis$1 = global$b;
118
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
158
119
 
159
- var isObject$8 = function (it) {
160
- return typeof it == 'object' ? it !== null : isCallable$f(it);
120
+ var SHARED = '__core-js_shared__';
121
+ var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
122
+
123
+ (store$3.versions || (store$3.versions = [])).push({
124
+ version: '3.36.1',
125
+ mode: 'global',
126
+ copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
127
+ license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE',
128
+ source: 'https://github.com/zloirock/core-js'
129
+ });
130
+
131
+ var sharedStoreExports = sharedStore.exports;
132
+
133
+ var store$2 = sharedStoreExports;
134
+
135
+ var shared$3 = function (key, value) {
136
+ return store$2[key] || (store$2[key] = value || {});
161
137
  };
162
138
 
163
- var global$f = global$g;
164
- var isCallable$e = isCallable$g;
139
+ var requireObjectCoercible$1 = requireObjectCoercible$3;
165
140
 
166
- var aFunction = function (argument) {
167
- return isCallable$e(argument) ? argument : undefined;
141
+ var $Object$3 = Object;
142
+
143
+ // `ToObject` abstract operation
144
+ // https://tc39.es/ecma262/#sec-toobject
145
+ var toObject$3 = function (argument) {
146
+ return $Object$3(requireObjectCoercible$1(argument));
168
147
  };
169
148
 
170
- var getBuiltIn$3 = function (namespace, method) {
171
- return arguments.length < 2 ? aFunction(global$f[namespace]) : global$f[namespace] && global$f[namespace][method];
149
+ var uncurryThis$b = functionUncurryThis;
150
+ var toObject$2 = toObject$3;
151
+
152
+ var hasOwnProperty = uncurryThis$b({}.hasOwnProperty);
153
+
154
+ // `HasOwnProperty` abstract operation
155
+ // https://tc39.es/ecma262/#sec-hasownproperty
156
+ // eslint-disable-next-line es/no-object-hasown -- safe
157
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
158
+ return hasOwnProperty(toObject$2(it), key);
172
159
  };
173
160
 
174
- var uncurryThis$f = functionUncurryThis;
161
+ var uncurryThis$a = functionUncurryThis;
162
+
163
+ var id = 0;
164
+ var postfix = Math.random();
165
+ var toString$2 = uncurryThis$a(1.0.toString);
175
166
 
176
- var objectIsPrototypeOf = uncurryThis$f({}.isPrototypeOf);
167
+ var uid$2 = function (key) {
168
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$2(++id + postfix, 36);
169
+ };
177
170
 
178
171
  var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
179
172
 
180
- var global$e = global$g;
173
+ var global$9 = global$b;
181
174
  var userAgent = engineUserAgent;
182
175
 
183
- var process = global$e.process;
184
- var Deno = global$e.Deno;
176
+ var process = global$9.process;
177
+ var Deno = global$9.Deno;
185
178
  var versions = process && process.versions || Deno && Deno.version;
186
179
  var v8 = versions && versions.v8;
187
180
  var match, version;
@@ -207,42 +200,161 @@ var engineV8Version = version;
207
200
 
208
201
  /* eslint-disable es/no-symbol -- required for testing */
209
202
  var V8_VERSION = engineV8Version;
210
- var fails$e = fails$i;
211
- var global$d = global$g;
203
+ var fails$9 = fails$c;
204
+ var global$8 = global$b;
212
205
 
213
- var $String$5 = global$d.String;
206
+ var $String$6 = global$8.String;
214
207
 
215
208
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
216
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$e(function () {
209
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$9(function () {
217
210
  var symbol = Symbol('symbol detection');
218
211
  // Chrome 38 Symbol has incorrect toString conversion
219
212
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
220
213
  // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
221
214
  // of course, fail.
222
- return !$String$5(symbol) || !(Object(symbol) instanceof Symbol) ||
215
+ return !$String$6(symbol) || !(Object(symbol) instanceof Symbol) ||
223
216
  // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
224
217
  !Symbol.sham && V8_VERSION && V8_VERSION < 41;
225
218
  });
226
219
 
227
220
  /* eslint-disable es/no-symbol -- required for testing */
228
- var NATIVE_SYMBOL$1 = symbolConstructorDetection;
221
+ var NATIVE_SYMBOL$2 = symbolConstructorDetection;
229
222
 
230
- var useSymbolAsUid = NATIVE_SYMBOL$1
223
+ var useSymbolAsUid = NATIVE_SYMBOL$2
231
224
  && !Symbol.sham
232
225
  && typeof Symbol.iterator == 'symbol';
233
226
 
234
- var getBuiltIn$2 = getBuiltIn$3;
227
+ var global$7 = global$b;
228
+ var shared$2 = shared$3;
229
+ var hasOwn$8 = hasOwnProperty_1;
230
+ var uid$1 = uid$2;
231
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
232
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
233
+
234
+ var Symbol$1 = global$7.Symbol;
235
+ var WellKnownSymbolsStore = shared$2('wks');
236
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
237
+
238
+ var wellKnownSymbol$8 = function (name) {
239
+ if (!hasOwn$8(WellKnownSymbolsStore, name)) {
240
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL$1 && hasOwn$8(Symbol$1, name)
241
+ ? Symbol$1[name]
242
+ : createWellKnownSymbol('Symbol.' + name);
243
+ } return WellKnownSymbolsStore[name];
244
+ };
245
+
246
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
247
+ var documentAll = typeof document == 'object' && document.all;
248
+
249
+ // `IsCallable` abstract operation
250
+ // https://tc39.es/ecma262/#sec-iscallable
251
+ // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
252
+ var isCallable$g = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
253
+ return typeof argument == 'function' || argument === documentAll;
254
+ } : function (argument) {
255
+ return typeof argument == 'function';
256
+ };
257
+
258
+ var isCallable$f = isCallable$g;
259
+
260
+ var isObject$8 = function (it) {
261
+ return typeof it == 'object' ? it !== null : isCallable$f(it);
262
+ };
263
+
264
+ var isObject$7 = isObject$8;
265
+
266
+ var $String$5 = String;
267
+ var $TypeError$5 = TypeError;
268
+
269
+ // `Assert: Type(argument) is Object`
270
+ var anObject$4 = function (argument) {
271
+ if (isObject$7(argument)) return argument;
272
+ throw new $TypeError$5($String$5(argument) + ' is not an object');
273
+ };
274
+
275
+ var objectDefineProperties = {};
276
+
277
+ var fails$8 = fails$c;
278
+
279
+ // Detect IE8's incomplete defineProperty implementation
280
+ var descriptors = !fails$8(function () {
281
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
282
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
283
+ });
284
+
285
+ var DESCRIPTORS$9 = descriptors;
286
+ var fails$7 = fails$c;
287
+
288
+ // V8 ~ Chrome 36-
289
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
290
+ var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$7(function () {
291
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
292
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
293
+ value: 42,
294
+ writable: false
295
+ }).prototype !== 42;
296
+ });
297
+
298
+ var objectDefineProperty = {};
299
+
300
+ var global$6 = global$b;
301
+ var isObject$6 = isObject$8;
302
+
303
+ var document$1 = global$6.document;
304
+ // typeof document.createElement is 'object' in old IE
305
+ var EXISTS$1 = isObject$6(document$1) && isObject$6(document$1.createElement);
306
+
307
+ var documentCreateElement$2 = function (it) {
308
+ return EXISTS$1 ? document$1.createElement(it) : {};
309
+ };
310
+
311
+ var DESCRIPTORS$8 = descriptors;
312
+ var fails$6 = fails$c;
313
+ var createElement = documentCreateElement$2;
314
+
315
+ // Thanks to IE8 for its funny defineProperty
316
+ var ie8DomDefine = !DESCRIPTORS$8 && !fails$6(function () {
317
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
318
+ return Object.defineProperty(createElement('div'), 'a', {
319
+ get: function () { return 7; }
320
+ }).a !== 7;
321
+ });
322
+
323
+ var NATIVE_BIND$1 = functionBindNative;
324
+
325
+ var call$7 = Function.prototype.call;
326
+
327
+ var functionCall = NATIVE_BIND$1 ? call$7.bind(call$7) : function () {
328
+ return call$7.apply(call$7, arguments);
329
+ };
330
+
331
+ var global$5 = global$b;
332
+ var isCallable$e = isCallable$g;
333
+
334
+ var aFunction = function (argument) {
335
+ return isCallable$e(argument) ? argument : undefined;
336
+ };
337
+
338
+ var getBuiltIn$4 = function (namespace, method) {
339
+ return arguments.length < 2 ? aFunction(global$5[namespace]) : global$5[namespace] && global$5[namespace][method];
340
+ };
341
+
342
+ var uncurryThis$9 = functionUncurryThis;
343
+
344
+ var objectIsPrototypeOf = uncurryThis$9({}.isPrototypeOf);
345
+
346
+ var getBuiltIn$3 = getBuiltIn$4;
235
347
  var isCallable$d = isCallable$g;
236
348
  var isPrototypeOf = objectIsPrototypeOf;
237
- var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
349
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
238
350
 
239
- var $Object$3 = Object;
351
+ var $Object$2 = Object;
240
352
 
241
- var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
353
+ var isSymbol$3 = USE_SYMBOL_AS_UID ? function (it) {
242
354
  return typeof it == 'symbol';
243
355
  } : function (it) {
244
- var $Symbol = getBuiltIn$2('Symbol');
245
- return isCallable$d($Symbol) && isPrototypeOf($Symbol.prototype, $Object$3(it));
356
+ var $Symbol = getBuiltIn$3('Symbol');
357
+ return isCallable$d($Symbol) && isPrototypeOf($Symbol.prototype, $Object$2(it));
246
358
  };
247
359
 
248
360
  var $String$4 = String;
@@ -258,257 +370,99 @@ var tryToString$1 = function (argument) {
258
370
  var isCallable$c = isCallable$g;
259
371
  var tryToString = tryToString$1;
260
372
 
261
- var $TypeError$8 = TypeError;
373
+ var $TypeError$4 = TypeError;
262
374
 
263
375
  // `Assert: IsCallable(argument) is true`
264
- var aCallable$3 = function (argument) {
376
+ var aCallable$2 = function (argument) {
265
377
  if (isCallable$c(argument)) return argument;
266
- throw new $TypeError$8(tryToString(argument) + ' is not a function');
378
+ throw new $TypeError$4(tryToString(argument) + ' is not a function');
267
379
  };
268
380
 
269
- var aCallable$2 = aCallable$3;
270
- var isNullOrUndefined$1 = isNullOrUndefined$3;
381
+ var aCallable$1 = aCallable$2;
382
+ var isNullOrUndefined = isNullOrUndefined$2;
271
383
 
272
384
  // `GetMethod` abstract operation
273
385
  // https://tc39.es/ecma262/#sec-getmethod
274
- var getMethod$2 = function (V, P) {
386
+ var getMethod$1 = function (V, P) {
275
387
  var func = V[P];
276
- return isNullOrUndefined$1(func) ? undefined : aCallable$2(func);
388
+ return isNullOrUndefined(func) ? undefined : aCallable$1(func);
277
389
  };
278
390
 
279
- var call$8 = functionCall;
391
+ var call$6 = functionCall;
280
392
  var isCallable$b = isCallable$g;
281
- var isObject$7 = isObject$8;
393
+ var isObject$5 = isObject$8;
282
394
 
283
- var $TypeError$7 = TypeError;
395
+ var $TypeError$3 = TypeError;
284
396
 
285
397
  // `OrdinaryToPrimitive` abstract operation
286
398
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
287
399
  var ordinaryToPrimitive$1 = function (input, pref) {
288
400
  var fn, val;
289
- if (pref === 'string' && isCallable$b(fn = input.toString) && !isObject$7(val = call$8(fn, input))) return val;
290
- if (isCallable$b(fn = input.valueOf) && !isObject$7(val = call$8(fn, input))) return val;
291
- if (pref !== 'string' && isCallable$b(fn = input.toString) && !isObject$7(val = call$8(fn, input))) return val;
292
- throw new $TypeError$7("Can't convert object to primitive value");
401
+ if (pref === 'string' && isCallable$b(fn = input.toString) && !isObject$5(val = call$6(fn, input))) return val;
402
+ if (isCallable$b(fn = input.valueOf) && !isObject$5(val = call$6(fn, input))) return val;
403
+ if (pref !== 'string' && isCallable$b(fn = input.toString) && !isObject$5(val = call$6(fn, input))) return val;
404
+ throw new $TypeError$3("Can't convert object to primitive value");
293
405
  };
294
406
 
295
- var shared$4 = {exports: {}};
296
-
297
- var global$c = global$g;
407
+ var call$5 = functionCall;
408
+ var isObject$4 = isObject$8;
409
+ var isSymbol$2 = isSymbol$3;
410
+ var getMethod = getMethod$1;
411
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
412
+ var wellKnownSymbol$7 = wellKnownSymbol$8;
298
413
 
299
- // eslint-disable-next-line es/no-object-defineproperty -- safe
300
- var defineProperty$5 = Object.defineProperty;
414
+ var $TypeError$2 = TypeError;
415
+ var TO_PRIMITIVE = wellKnownSymbol$7('toPrimitive');
301
416
 
302
- var defineGlobalProperty$3 = function (key, value) {
303
- try {
304
- defineProperty$5(global$c, key, { value: value, configurable: true, writable: true });
305
- } catch (error) {
306
- global$c[key] = value;
307
- } return value;
417
+ // `ToPrimitive` abstract operation
418
+ // https://tc39.es/ecma262/#sec-toprimitive
419
+ var toPrimitive$1 = function (input, pref) {
420
+ if (!isObject$4(input) || isSymbol$2(input)) return input;
421
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
422
+ var result;
423
+ if (exoticToPrim) {
424
+ if (pref === undefined) pref = 'default';
425
+ result = call$5(exoticToPrim, input, pref);
426
+ if (!isObject$4(result) || isSymbol$2(result)) return result;
427
+ throw new $TypeError$2("Can't convert object to primitive value");
428
+ }
429
+ if (pref === undefined) pref = 'number';
430
+ return ordinaryToPrimitive(input, pref);
308
431
  };
309
432
 
310
- var global$b = global$g;
311
- var defineGlobalProperty$2 = defineGlobalProperty$3;
312
-
313
- var SHARED = '__core-js_shared__';
314
- var store$3 = global$b[SHARED] || defineGlobalProperty$2(SHARED, {});
433
+ var toPrimitive = toPrimitive$1;
434
+ var isSymbol$1 = isSymbol$3;
315
435
 
316
- var sharedStore = store$3;
436
+ // `ToPropertyKey` abstract operation
437
+ // https://tc39.es/ecma262/#sec-topropertykey
438
+ var toPropertyKey$2 = function (argument) {
439
+ var key = toPrimitive(argument, 'string');
440
+ return isSymbol$1(key) ? key : key + '';
441
+ };
317
442
 
318
- var store$2 = sharedStore;
443
+ var DESCRIPTORS$7 = descriptors;
444
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
445
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
446
+ var anObject$3 = anObject$4;
447
+ var toPropertyKey$1 = toPropertyKey$2;
319
448
 
320
- (shared$4.exports = function (key, value) {
321
- return store$2[key] || (store$2[key] = value !== undefined ? value : {});
322
- })('versions', []).push({
323
- version: '3.35.0',
324
- mode: 'global',
325
- copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
326
- license: 'https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE',
327
- source: 'https://github.com/zloirock/core-js'
328
- });
329
-
330
- var requireObjectCoercible$3 = requireObjectCoercible$5;
331
-
332
- var $Object$2 = Object;
333
-
334
- // `ToObject` abstract operation
335
- // https://tc39.es/ecma262/#sec-toobject
336
- var toObject$5 = function (argument) {
337
- return $Object$2(requireObjectCoercible$3(argument));
338
- };
339
-
340
- var uncurryThis$e = functionUncurryThis;
341
- var toObject$4 = toObject$5;
342
-
343
- var hasOwnProperty = uncurryThis$e({}.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$4(it), key);
350
- };
351
-
352
- var uncurryThis$d = functionUncurryThis;
353
-
354
- var id = 0;
355
- var postfix = Math.random();
356
- var toString$5 = uncurryThis$d(1.0.toString);
357
-
358
- var uid$2 = function (key) {
359
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
360
- };
361
-
362
- var global$a = global$g;
363
- var shared$3 = shared$4.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$a.Symbol;
370
- var WellKnownSymbolsStore = shared$3('wks');
371
- var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
372
-
373
- var wellKnownSymbol$c = 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$7 = functionCall;
382
- var isObject$6 = isObject$8;
383
- var isSymbol$1 = isSymbol$2;
384
- var getMethod$1 = getMethod$2;
385
- var ordinaryToPrimitive = ordinaryToPrimitive$1;
386
- var wellKnownSymbol$b = wellKnownSymbol$c;
387
-
388
- var $TypeError$6 = TypeError;
389
- var TO_PRIMITIVE = wellKnownSymbol$b('toPrimitive');
390
-
391
- // `ToPrimitive` abstract operation
392
- // https://tc39.es/ecma262/#sec-toprimitive
393
- var toPrimitive$1 = function (input, pref) {
394
- if (!isObject$6(input) || isSymbol$1(input)) return input;
395
- var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
396
- var result;
397
- if (exoticToPrim) {
398
- if (pref === undefined) pref = 'default';
399
- result = call$7(exoticToPrim, input, pref);
400
- if (!isObject$6(result) || isSymbol$1(result)) return result;
401
- throw new $TypeError$6("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$9 = global$g;
418
- var isObject$5 = isObject$8;
419
-
420
- var document$1 = global$9.document;
421
- // typeof document.createElement is 'object' in old IE
422
- var EXISTS$1 = isObject$5(document$1) && isObject$5(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$d = fails$i;
430
- var createElement = documentCreateElement$2;
431
-
432
- // Thanks to IE8 for its funny defineProperty
433
- var ie8DomDefine = !DESCRIPTORS$9 && !fails$d(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$6 = 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$6(propertyIsEnumerableModule$1.f, O, P), O[P]);
461
- };
462
-
463
- var objectDefineProperty = {};
464
-
465
- var DESCRIPTORS$7 = descriptors;
466
- var fails$c = fails$i;
467
-
468
- // V8 ~ Chrome 36-
469
- // https://bugs.chromium.org/p/v8/issues/detail?id=3334
470
- var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$c(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$4 = isObject$8;
479
-
480
- var $String$3 = String;
481
- var $TypeError$5 = TypeError;
482
-
483
- // `Assert: Type(argument) is Object`
484
- var anObject$8 = function (argument) {
485
- if (isObject$4(argument)) return argument;
486
- throw new $TypeError$5($String$3(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$7 = anObject$8;
493
- var toPropertyKey = toPropertyKey$2;
494
-
495
- var $TypeError$4 = TypeError;
449
+ var $TypeError$1 = TypeError;
496
450
  // eslint-disable-next-line es/no-object-defineproperty -- safe
497
451
  var $defineProperty = Object.defineProperty;
498
452
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
499
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
453
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
500
454
  var ENUMERABLE = 'enumerable';
501
455
  var CONFIGURABLE$1 = 'configurable';
502
456
  var WRITABLE = 'writable';
503
457
 
504
458
  // `Object.defineProperty` method
505
459
  // https://tc39.es/ecma262/#sec-object.defineproperty
506
- objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
507
- anObject$7(O);
508
- P = toPropertyKey(P);
509
- anObject$7(Attributes);
460
+ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
461
+ anObject$3(O);
462
+ P = toPropertyKey$1(P);
463
+ anObject$3(Attributes);
510
464
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
511
- var current = $getOwnPropertyDescriptor(O, P);
465
+ var current = $getOwnPropertyDescriptor$1(O, P);
512
466
  if (current && current[WRITABLE]) {
513
467
  O[P] = Attributes.value;
514
468
  Attributes = {
@@ -519,141 +473,376 @@ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
519
473
  }
520
474
  } return $defineProperty(O, P, Attributes);
521
475
  } : $defineProperty : function defineProperty(O, P, Attributes) {
522
- anObject$7(O);
523
- P = toPropertyKey(P);
524
- anObject$7(Attributes);
525
- if (IE8_DOM_DEFINE) try {
476
+ anObject$3(O);
477
+ P = toPropertyKey$1(P);
478
+ anObject$3(Attributes);
479
+ if (IE8_DOM_DEFINE$1) try {
526
480
  return $defineProperty(O, P, Attributes);
527
481
  } catch (error) { /* empty */ }
528
- if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$4('Accessors not supported');
482
+ if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$1('Accessors not supported');
529
483
  if ('value' in Attributes) O[P] = Attributes.value;
530
484
  return O;
531
485
  };
532
486
 
533
- var DESCRIPTORS$5 = descriptors;
534
- var definePropertyModule$3 = objectDefineProperty;
535
- var createPropertyDescriptor$1 = createPropertyDescriptor$3;
487
+ var ceil = Math.ceil;
488
+ var floor = Math.floor;
536
489
 
537
- var createNonEnumerableProperty$5 = 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;
490
+ // `Math.trunc` method
491
+ // https://tc39.es/ecma262/#sec-math.trunc
492
+ // eslint-disable-next-line es/no-math-trunc -- safe
493
+ var mathTrunc = Math.trunc || function trunc(x) {
494
+ var n = +x;
495
+ return (n > 0 ? floor : ceil)(n);
542
496
  };
543
497
 
544
- var makeBuiltIn$2 = {exports: {}};
498
+ var trunc = mathTrunc;
545
499
 
546
- var DESCRIPTORS$4 = descriptors;
547
- var hasOwn$6 = hasOwnProperty_1;
500
+ // `ToIntegerOrInfinity` abstract operation
501
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
502
+ var toIntegerOrInfinity$2 = function (argument) {
503
+ var number = +argument;
504
+ // eslint-disable-next-line no-self-compare -- NaN check
505
+ return number !== number || number === 0 ? 0 : trunc(number);
506
+ };
548
507
 
549
- var FunctionPrototype$1 = Function.prototype;
550
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
551
- var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
508
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
552
509
 
553
- var EXISTS = hasOwn$6(FunctionPrototype$1, '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$1, 'name').configurable));
510
+ var max = Math.max;
511
+ var min$1 = Math.min;
557
512
 
558
- var functionName = {
559
- EXISTS: EXISTS,
560
- PROPER: PROPER,
561
- CONFIGURABLE: CONFIGURABLE
513
+ // Helper for a popular repeating case of the spec:
514
+ // Let integer be ? ToInteger(index).
515
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
516
+ var toAbsoluteIndex$1 = function (index, length) {
517
+ var integer = toIntegerOrInfinity$1(index);
518
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
562
519
  };
563
520
 
564
- var uncurryThis$c = functionUncurryThis;
565
- var isCallable$a = isCallable$g;
566
- var store$1 = sharedStore;
567
-
568
- var functionToString = uncurryThis$c(Function.toString);
521
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
569
522
 
570
- // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
571
- if (!isCallable$a(store$1.inspectSource)) {
572
- store$1.inspectSource = function (it) {
573
- return functionToString(it);
574
- };
575
- }
576
-
577
- var inspectSource$1 = store$1.inspectSource;
523
+ var min = Math.min;
578
524
 
579
- var global$8 = global$g;
580
- var isCallable$9 = isCallable$g;
525
+ // `ToLength` abstract operation
526
+ // https://tc39.es/ecma262/#sec-tolength
527
+ var toLength$1 = function (argument) {
528
+ var len = toIntegerOrInfinity(argument);
529
+ return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
530
+ };
581
531
 
582
- var WeakMap$1 = global$8.WeakMap;
532
+ var toLength = toLength$1;
583
533
 
584
- var weakMapBasicDetection = isCallable$9(WeakMap$1) && /native code/.test(String(WeakMap$1));
534
+ // `LengthOfArrayLike` abstract operation
535
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
536
+ var lengthOfArrayLike$1 = function (obj) {
537
+ return toLength(obj.length);
538
+ };
585
539
 
586
- var shared$2 = shared$4.exports;
587
- var uid = uid$2;
540
+ var toIndexedObject$4 = toIndexedObject$5;
541
+ var toAbsoluteIndex = toAbsoluteIndex$1;
542
+ var lengthOfArrayLike = lengthOfArrayLike$1;
588
543
 
589
- var keys = shared$2('keys');
544
+ // `Array.prototype.{ indexOf, includes }` methods implementation
545
+ var createMethod = function (IS_INCLUDES) {
546
+ return function ($this, el, fromIndex) {
547
+ var O = toIndexedObject$4($this);
548
+ var length = lengthOfArrayLike(O);
549
+ if (length === 0) return !IS_INCLUDES && -1;
550
+ var index = toAbsoluteIndex(fromIndex, length);
551
+ var value;
552
+ // Array#includes uses SameValueZero equality algorithm
553
+ // eslint-disable-next-line no-self-compare -- NaN check
554
+ if (IS_INCLUDES && el !== el) while (length > index) {
555
+ value = O[index++];
556
+ // eslint-disable-next-line no-self-compare -- NaN check
557
+ if (value !== value) return true;
558
+ // Array#indexOf ignores holes, Array#includes - not
559
+ } else for (;length > index; index++) {
560
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
561
+ } return !IS_INCLUDES && -1;
562
+ };
563
+ };
590
564
 
591
- var sharedKey$3 = function (key) {
592
- return keys[key] || (keys[key] = uid(key));
565
+ var arrayIncludes = {
566
+ // `Array.prototype.includes` method
567
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
568
+ includes: createMethod(true),
569
+ // `Array.prototype.indexOf` method
570
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
571
+ indexOf: createMethod(false)
593
572
  };
594
573
 
595
574
  var hiddenKeys$4 = {};
596
575
 
597
- var NATIVE_WEAK_MAP = weakMapBasicDetection;
598
- var global$7 = global$g;
599
- var isObject$3 = isObject$8;
600
- var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
601
- var hasOwn$5 = hasOwnProperty_1;
602
- var shared$1 = sharedStore;
603
- var sharedKey$2 = sharedKey$3;
576
+ var uncurryThis$8 = functionUncurryThis;
577
+ var hasOwn$7 = hasOwnProperty_1;
578
+ var toIndexedObject$3 = toIndexedObject$5;
579
+ var indexOf = arrayIncludes.indexOf;
604
580
  var hiddenKeys$3 = hiddenKeys$4;
605
581
 
606
- var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
607
- var TypeError$1 = global$7.TypeError;
608
- var WeakMap = global$7.WeakMap;
609
- var set, get, has;
582
+ var push$1 = uncurryThis$8([].push);
610
583
 
611
- var enforce = function (it) {
612
- return has(it) ? get(it) : set(it, {});
584
+ var objectKeysInternal = function (object, names) {
585
+ var O = toIndexedObject$3(object);
586
+ var i = 0;
587
+ var result = [];
588
+ var key;
589
+ for (key in O) !hasOwn$7(hiddenKeys$3, key) && hasOwn$7(O, key) && push$1(result, key);
590
+ // Don't enum bug & hidden keys
591
+ while (names.length > i) if (hasOwn$7(O, key = names[i++])) {
592
+ ~indexOf(result, key) || push$1(result, key);
593
+ }
594
+ return result;
613
595
  };
614
596
 
615
- var getterFor = function (TYPE) {
616
- return function (it) {
617
- var state;
618
- if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
619
- throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
620
- } return state;
621
- };
622
- };
597
+ // IE8- don't enum bug keys
598
+ var enumBugKeys$3 = [
599
+ 'constructor',
600
+ 'hasOwnProperty',
601
+ 'isPrototypeOf',
602
+ 'propertyIsEnumerable',
603
+ 'toLocaleString',
604
+ 'toString',
605
+ 'valueOf'
606
+ ];
623
607
 
624
- if (NATIVE_WEAK_MAP || shared$1.state) {
625
- var store = shared$1.state || (shared$1.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);
608
+ var internalObjectKeys$1 = objectKeysInternal;
609
+ var enumBugKeys$2 = enumBugKeys$3;
610
+
611
+ // `Object.keys` method
612
+ // https://tc39.es/ecma262/#sec-object.keys
613
+ // eslint-disable-next-line es/no-object-keys -- safe
614
+ var objectKeys$2 = Object.keys || function keys(O) {
615
+ return internalObjectKeys$1(O, enumBugKeys$2);
616
+ };
617
+
618
+ var DESCRIPTORS$6 = descriptors;
619
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
620
+ var definePropertyModule$3 = objectDefineProperty;
621
+ var anObject$2 = anObject$4;
622
+ var toIndexedObject$2 = toIndexedObject$5;
623
+ var objectKeys$1 = objectKeys$2;
624
+
625
+ // `Object.defineProperties` method
626
+ // https://tc39.es/ecma262/#sec-object.defineproperties
627
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
628
+ objectDefineProperties.f = DESCRIPTORS$6 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
629
+ anObject$2(O);
630
+ var props = toIndexedObject$2(Properties);
631
+ var keys = objectKeys$1(Properties);
632
+ var length = keys.length;
633
+ var index = 0;
634
+ var key;
635
+ while (length > index) definePropertyModule$3.f(O, key = keys[index++], props[key]);
636
+ return O;
637
+ };
638
+
639
+ var getBuiltIn$2 = getBuiltIn$4;
640
+
641
+ var html$1 = getBuiltIn$2('document', 'documentElement');
642
+
643
+ var shared$1 = shared$3;
644
+ var uid = uid$2;
645
+
646
+ var keys = shared$1('keys');
647
+
648
+ var sharedKey$3 = function (key) {
649
+ return keys[key] || (keys[key] = uid(key));
650
+ };
651
+
652
+ /* global ActiveXObject -- old IE, WSH */
653
+ var anObject$1 = anObject$4;
654
+ var definePropertiesModule = objectDefineProperties;
655
+ var enumBugKeys$1 = enumBugKeys$3;
656
+ var hiddenKeys$2 = hiddenKeys$4;
657
+ var html = html$1;
658
+ var documentCreateElement$1 = documentCreateElement$2;
659
+ var sharedKey$2 = sharedKey$3;
660
+
661
+ var GT = '>';
662
+ var LT = '<';
663
+ var PROTOTYPE = 'prototype';
664
+ var SCRIPT = 'script';
665
+ var IE_PROTO$1 = sharedKey$2('IE_PROTO');
666
+
667
+ var EmptyConstructor = function () { /* empty */ };
668
+
669
+ var scriptTag = function (content) {
670
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
671
+ };
672
+
673
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
674
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
675
+ activeXDocument.write(scriptTag(''));
676
+ activeXDocument.close();
677
+ var temp = activeXDocument.parentWindow.Object;
678
+ activeXDocument = null; // avoid memory leak
679
+ return temp;
680
+ };
681
+
682
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
683
+ var NullProtoObjectViaIFrame = function () {
684
+ // Thrash, waste and sodomy: IE GC bug
685
+ var iframe = documentCreateElement$1('iframe');
686
+ var JS = 'java' + SCRIPT + ':';
687
+ var iframeDocument;
688
+ iframe.style.display = 'none';
689
+ html.appendChild(iframe);
690
+ // https://github.com/zloirock/core-js/issues/475
691
+ iframe.src = String(JS);
692
+ iframeDocument = iframe.contentWindow.document;
693
+ iframeDocument.open();
694
+ iframeDocument.write(scriptTag('document.F=Object'));
695
+ iframeDocument.close();
696
+ return iframeDocument.F;
697
+ };
698
+
699
+ // Check for document.domain and active x support
700
+ // No need to use active x approach when document.domain is not set
701
+ // see https://github.com/es-shims/es5-shim/issues/150
702
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
703
+ // avoid IE GC bug
704
+ var activeXDocument;
705
+ var NullProtoObject = function () {
706
+ try {
707
+ activeXDocument = new ActiveXObject('htmlfile');
708
+ } catch (error) { /* ignore */ }
709
+ NullProtoObject = typeof document != 'undefined'
710
+ ? document.domain && activeXDocument
711
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
712
+ : NullProtoObjectViaIFrame()
713
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
714
+ var length = enumBugKeys$1.length;
715
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys$1[length]];
716
+ return NullProtoObject();
717
+ };
718
+
719
+ hiddenKeys$2[IE_PROTO$1] = true;
720
+
721
+ // `Object.create` method
722
+ // https://tc39.es/ecma262/#sec-object.create
723
+ // eslint-disable-next-line es/no-object-create -- safe
724
+ var objectCreate = Object.create || function create(O, Properties) {
725
+ var result;
726
+ if (O !== null) {
727
+ EmptyConstructor[PROTOTYPE] = anObject$1(O);
728
+ result = new EmptyConstructor();
729
+ EmptyConstructor[PROTOTYPE] = null;
730
+ // add "__proto__" for Object.getPrototypeOf polyfill
731
+ result[IE_PROTO$1] = O;
732
+ } else result = NullProtoObject();
733
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
734
+ };
735
+
736
+ var wellKnownSymbol$6 = wellKnownSymbol$8;
737
+ var create$1 = objectCreate;
738
+ var defineProperty$4 = objectDefineProperty.f;
739
+
740
+ var UNSCOPABLES = wellKnownSymbol$6('unscopables');
741
+ var ArrayPrototype = Array.prototype;
742
+
743
+ // Array.prototype[@@unscopables]
744
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
745
+ if (ArrayPrototype[UNSCOPABLES] === undefined) {
746
+ defineProperty$4(ArrayPrototype, UNSCOPABLES, {
747
+ configurable: true,
748
+ value: create$1(null)
749
+ });
750
+ }
751
+
752
+ // add a key to Array.prototype[@@unscopables]
753
+ var addToUnscopables$1 = function (key) {
754
+ ArrayPrototype[UNSCOPABLES][key] = true;
755
+ };
756
+
757
+ var iterators = {};
758
+
759
+ var global$4 = global$b;
760
+ var isCallable$a = isCallable$g;
761
+
762
+ var WeakMap$1 = global$4.WeakMap;
763
+
764
+ var weakMapBasicDetection = isCallable$a(WeakMap$1) && /native code/.test(String(WeakMap$1));
765
+
766
+ var createPropertyDescriptor$3 = function (bitmap, value) {
767
+ return {
768
+ enumerable: !(bitmap & 1),
769
+ configurable: !(bitmap & 2),
770
+ writable: !(bitmap & 4),
771
+ value: value
772
+ };
773
+ };
774
+
775
+ var DESCRIPTORS$5 = descriptors;
776
+ var definePropertyModule$2 = objectDefineProperty;
777
+ var createPropertyDescriptor$2 = createPropertyDescriptor$3;
778
+
779
+ var createNonEnumerableProperty$4 = DESCRIPTORS$5 ? function (object, key, value) {
780
+ return definePropertyModule$2.f(object, key, createPropertyDescriptor$2(1, value));
781
+ } : function (object, key, value) {
782
+ object[key] = value;
783
+ return object;
784
+ };
785
+
786
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
787
+ var global$3 = global$b;
788
+ var isObject$3 = isObject$8;
789
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
790
+ var hasOwn$6 = hasOwnProperty_1;
791
+ var shared = sharedStoreExports;
792
+ var sharedKey$1 = sharedKey$3;
793
+ var hiddenKeys$1 = hiddenKeys$4;
794
+
795
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
796
+ var TypeError$1 = global$3.TypeError;
797
+ var WeakMap = global$3.WeakMap;
798
+ var set, get, has;
799
+
800
+ var enforce = function (it) {
801
+ return has(it) ? get(it) : set(it, {});
802
+ };
803
+
804
+ var getterFor = function (TYPE) {
805
+ return function (it) {
806
+ var state;
807
+ if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
808
+ throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
809
+ } return state;
810
+ };
811
+ };
812
+
813
+ if (NATIVE_WEAK_MAP || shared.state) {
814
+ var store$1 = shared.state || (shared.state = new WeakMap());
815
+ /* eslint-disable no-self-assign -- prototype methods protection */
816
+ store$1.get = store$1.get;
817
+ store$1.has = store$1.has;
818
+ store$1.set = store$1.set;
819
+ /* eslint-enable no-self-assign -- prototype methods protection */
820
+ set = function (it, metadata) {
821
+ if (store$1.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
822
+ metadata.facade = it;
823
+ store$1.set(it, metadata);
635
824
  return metadata;
636
825
  };
637
826
  get = function (it) {
638
- return store.get(it) || {};
827
+ return store$1.get(it) || {};
639
828
  };
640
829
  has = function (it) {
641
- return store.has(it);
830
+ return store$1.has(it);
642
831
  };
643
832
  } else {
644
- var STATE = sharedKey$2('state');
645
- hiddenKeys$3[STATE] = true;
833
+ var STATE = sharedKey$1('state');
834
+ hiddenKeys$1[STATE] = true;
646
835
  set = function (it, metadata) {
647
- if (hasOwn$5(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
836
+ if (hasOwn$6(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
648
837
  metadata.facade = it;
649
- createNonEnumerableProperty$4(it, STATE, metadata);
838
+ createNonEnumerableProperty$3(it, STATE, metadata);
650
839
  return metadata;
651
840
  };
652
841
  get = function (it) {
653
- return hasOwn$5(it, STATE) ? it[STATE] : {};
842
+ return hasOwn$6(it, STATE) ? it[STATE] : {};
654
843
  };
655
844
  has = function (it) {
656
- return hasOwn$5(it, STATE);
845
+ return hasOwn$6(it, STATE);
657
846
  };
658
847
  }
659
848
 
@@ -665,51 +854,127 @@ var internalState = {
665
854
  getterFor: getterFor
666
855
  };
667
856
 
668
- var uncurryThis$b = functionUncurryThis;
669
- var fails$b = fails$i;
670
- var isCallable$8 = isCallable$g;
671
- var hasOwn$4 = hasOwnProperty_1;
857
+ var objectGetOwnPropertyDescriptor = {};
858
+
859
+ var objectPropertyIsEnumerable = {};
860
+
861
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
862
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
863
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
864
+
865
+ // Nashorn ~ JDK8 bug
866
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
867
+
868
+ // `Object.prototype.propertyIsEnumerable` method implementation
869
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
870
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
871
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
872
+ return !!descriptor && descriptor.enumerable;
873
+ } : $propertyIsEnumerable;
874
+
875
+ var DESCRIPTORS$4 = descriptors;
876
+ var call$4 = functionCall;
877
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
878
+ var createPropertyDescriptor$1 = createPropertyDescriptor$3;
879
+ var toIndexedObject$1 = toIndexedObject$5;
880
+ var toPropertyKey = toPropertyKey$2;
881
+ var hasOwn$5 = hasOwnProperty_1;
882
+ var IE8_DOM_DEFINE = ie8DomDefine;
883
+
884
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
885
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
886
+
887
+ // `Object.getOwnPropertyDescriptor` method
888
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
889
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$4 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
890
+ O = toIndexedObject$1(O);
891
+ P = toPropertyKey(P);
892
+ if (IE8_DOM_DEFINE) try {
893
+ return $getOwnPropertyDescriptor(O, P);
894
+ } catch (error) { /* empty */ }
895
+ if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$4(propertyIsEnumerableModule$1.f, O, P), O[P]);
896
+ };
897
+
898
+ var makeBuiltIn$2 = {exports: {}};
899
+
672
900
  var DESCRIPTORS$3 = descriptors;
901
+ var hasOwn$4 = hasOwnProperty_1;
902
+
903
+ var FunctionPrototype$1 = Function.prototype;
904
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
905
+ var getDescriptor = DESCRIPTORS$3 && Object.getOwnPropertyDescriptor;
906
+
907
+ var EXISTS = hasOwn$4(FunctionPrototype$1, 'name');
908
+ // additional protection from minified / mangled / dropped function names
909
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
910
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype$1, 'name').configurable));
911
+
912
+ var functionName = {
913
+ EXISTS: EXISTS,
914
+ PROPER: PROPER,
915
+ CONFIGURABLE: CONFIGURABLE
916
+ };
917
+
918
+ var uncurryThis$7 = functionUncurryThis;
919
+ var isCallable$9 = isCallable$g;
920
+ var store = sharedStoreExports;
921
+
922
+ var functionToString = uncurryThis$7(Function.toString);
923
+
924
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
925
+ if (!isCallable$9(store.inspectSource)) {
926
+ store.inspectSource = function (it) {
927
+ return functionToString(it);
928
+ };
929
+ }
930
+
931
+ var inspectSource$1 = store.inspectSource;
932
+
933
+ var uncurryThis$6 = functionUncurryThis;
934
+ var fails$5 = fails$c;
935
+ var isCallable$8 = isCallable$g;
936
+ var hasOwn$3 = hasOwnProperty_1;
937
+ var DESCRIPTORS$2 = descriptors;
673
938
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
674
939
  var inspectSource = inspectSource$1;
675
940
  var InternalStateModule$1 = internalState;
676
941
 
677
942
  var enforceInternalState = InternalStateModule$1.enforce;
678
- var getInternalState$2 = InternalStateModule$1.get;
679
- var $String$2 = String;
943
+ var getInternalState$1 = InternalStateModule$1.get;
944
+ var $String$3 = String;
680
945
  // eslint-disable-next-line es/no-object-defineproperty -- safe
681
- var defineProperty$4 = Object.defineProperty;
682
- var stringSlice$4 = uncurryThis$b(''.slice);
683
- var replace$2 = uncurryThis$b(''.replace);
684
- var join = uncurryThis$b([].join);
946
+ var defineProperty$3 = Object.defineProperty;
947
+ var stringSlice = uncurryThis$6(''.slice);
948
+ var replace$1 = uncurryThis$6(''.replace);
949
+ var join = uncurryThis$6([].join);
685
950
 
686
- var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$b(function () {
687
- return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
951
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$5(function () {
952
+ return defineProperty$3(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
688
953
  });
689
954
 
690
955
  var TEMPLATE = String(String).split('String');
691
956
 
692
957
  var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
693
- if (stringSlice$4($String$2(name), 0, 7) === 'Symbol(') {
694
- name = '[' + replace$2($String$2(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
958
+ if (stringSlice($String$3(name), 0, 7) === 'Symbol(') {
959
+ name = '[' + replace$1($String$3(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
695
960
  }
696
961
  if (options && options.getter) name = 'get ' + name;
697
962
  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 });
963
+ if (!hasOwn$3(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
964
+ if (DESCRIPTORS$2) defineProperty$3(value, 'name', { value: name, configurable: true });
700
965
  else value.name = name;
701
966
  }
702
- if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
703
- defineProperty$4(value, 'length', { value: options.arity });
967
+ if (CONFIGURABLE_LENGTH && options && hasOwn$3(options, 'arity') && value.length !== options.arity) {
968
+ defineProperty$3(value, 'length', { value: options.arity });
704
969
  }
705
970
  try {
706
- if (options && hasOwn$4(options, 'constructor') && options.constructor) {
707
- if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
971
+ if (options && hasOwn$3(options, 'constructor') && options.constructor) {
972
+ if (DESCRIPTORS$2) defineProperty$3(value, 'prototype', { writable: false });
708
973
  // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
709
974
  } else if (value.prototype) value.prototype = undefined;
710
975
  } catch (error) { /* empty */ }
711
976
  var state = enforceInternalState(value);
712
- if (!hasOwn$4(state, 'source')) {
977
+ if (!hasOwn$3(state, 'source')) {
713
978
  state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
714
979
  } return value;
715
980
  };
@@ -717,15 +982,17 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
717
982
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
718
983
  // eslint-disable-next-line no-extend-native -- required
719
984
  Function.prototype.toString = makeBuiltIn$1(function toString() {
720
- return isCallable$8(this) && getInternalState$2(this).source || inspectSource(this);
985
+ return isCallable$8(this) && getInternalState$1(this).source || inspectSource(this);
721
986
  }, 'toString');
722
987
 
988
+ var makeBuiltInExports = makeBuiltIn$2.exports;
989
+
723
990
  var isCallable$7 = isCallable$g;
724
- var definePropertyModule$2 = objectDefineProperty;
725
- var makeBuiltIn = makeBuiltIn$2.exports;
991
+ var definePropertyModule$1 = objectDefineProperty;
992
+ var makeBuiltIn = makeBuiltInExports;
726
993
  var defineGlobalProperty$1 = defineGlobalProperty$3;
727
994
 
728
- var defineBuiltIn$4 = function (O, key, value, options) {
995
+ var defineBuiltIn$3 = function (O, key, value, options) {
729
996
  if (!options) options = {};
730
997
  var simple = options.enumerable;
731
998
  var name = options.name !== undefined ? options.name : key;
@@ -739,7 +1006,7 @@ var defineBuiltIn$4 = function (O, key, value, options) {
739
1006
  else if (O[key]) simple = true;
740
1007
  } catch (error) { /* empty */ }
741
1008
  if (simple) O[key] = value;
742
- else definePropertyModule$2.f(O, key, {
1009
+ else definePropertyModule$1.f(O, key, {
743
1010
  value: value,
744
1011
  enumerable: false,
745
1012
  configurable: !options.nonConfigurable,
@@ -750,133 +1017,16 @@ var defineBuiltIn$4 = function (O, key, value, options) {
750
1017
 
751
1018
  var objectGetOwnPropertyNames = {};
752
1019
 
753
- var ceil = Math.ceil;
754
- var floor$1 = Math.floor;
1020
+ var internalObjectKeys = objectKeysInternal;
1021
+ var enumBugKeys = enumBugKeys$3;
755
1022
 
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$1 : ceil)(n);
762
- };
763
-
764
- var trunc = mathTrunc;
765
-
766
- // `ToIntegerOrInfinity` abstract operation
767
- // https://tc39.es/ecma262/#sec-tointegerorinfinity
768
- var toIntegerOrInfinity$4 = 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$3 = toIntegerOrInfinity$4;
775
-
776
- var max$1 = Math.max;
777
- var min$2 = 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$3(index);
784
- return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
785
- };
786
-
787
- var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
788
-
789
- var min$1 = Math.min;
790
-
791
- // `ToLength` abstract operation
792
- // https://tc39.es/ecma262/#sec-tolength
793
- var toLength$2 = function (argument) {
794
- return argument > 0 ? min$1(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
795
- };
796
-
797
- var toLength$1 = toLength$2;
798
-
799
- // `LengthOfArrayLike` abstract operation
800
- // https://tc39.es/ecma262/#sec-lengthofarraylike
801
- var lengthOfArrayLike$2 = function (obj) {
802
- return toLength$1(obj.length);
803
- };
804
-
805
- var toIndexedObject$3 = toIndexedObject$5;
806
- var toAbsoluteIndex = toAbsoluteIndex$1;
807
- var lengthOfArrayLike$1 = lengthOfArrayLike$2;
808
-
809
- // `Array.prototype.{ indexOf, includes }` methods implementation
810
- var createMethod$2 = function (IS_INCLUDES) {
811
- return function ($this, el, fromIndex) {
812
- var O = toIndexedObject$3($this);
813
- var length = lengthOfArrayLike$1(O);
814
- var index = toAbsoluteIndex(fromIndex, length);
815
- var value;
816
- // Array#includes uses SameValueZero equality algorithm
817
- // eslint-disable-next-line no-self-compare -- NaN check
818
- if (IS_INCLUDES && el !== el) while (length > index) {
819
- value = O[index++];
820
- // eslint-disable-next-line no-self-compare -- NaN check
821
- if (value !== value) return true;
822
- // Array#indexOf ignores holes, Array#includes - not
823
- } else for (;length > index; index++) {
824
- if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
825
- } return !IS_INCLUDES && -1;
826
- };
827
- };
828
-
829
- var arrayIncludes = {
830
- // `Array.prototype.includes` method
831
- // https://tc39.es/ecma262/#sec-array.prototype.includes
832
- includes: createMethod$2(true),
833
- // `Array.prototype.indexOf` method
834
- // https://tc39.es/ecma262/#sec-array.prototype.indexof
835
- indexOf: createMethod$2(false)
836
- };
837
-
838
- var uncurryThis$a = functionUncurryThis;
839
- var hasOwn$3 = hasOwnProperty_1;
840
- var toIndexedObject$2 = toIndexedObject$5;
841
- var indexOf$1 = arrayIncludes.indexOf;
842
- var hiddenKeys$2 = hiddenKeys$4;
843
-
844
- var push$1 = uncurryThis$a([].push);
845
-
846
- var objectKeysInternal = function (object, names) {
847
- var O = toIndexedObject$2(object);
848
- var i = 0;
849
- var result = [];
850
- var key;
851
- for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push$1(result, key);
852
- // Don't enum bug & hidden keys
853
- while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
854
- ~indexOf$1(result, key) || push$1(result, key);
855
- }
856
- return result;
857
- };
858
-
859
- // IE8- don't enum bug keys
860
- var enumBugKeys$3 = [
861
- 'constructor',
862
- 'hasOwnProperty',
863
- 'isPrototypeOf',
864
- 'propertyIsEnumerable',
865
- 'toLocaleString',
866
- 'toString',
867
- 'valueOf'
868
- ];
869
-
870
- var internalObjectKeys$1 = objectKeysInternal;
871
- var enumBugKeys$2 = enumBugKeys$3;
872
-
873
- var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
1023
+ var hiddenKeys = enumBugKeys.concat('length', 'prototype');
874
1024
 
875
1025
  // `Object.getOwnPropertyNames` method
876
1026
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
877
1027
  // eslint-disable-next-line es/no-object-getownpropertynames -- safe
878
1028
  objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
879
- return internalObjectKeys$1(O, hiddenKeys$1);
1029
+ return internalObjectKeys(O, hiddenKeys);
880
1030
  };
881
1031
 
882
1032
  var objectGetOwnPropertySymbols = {};
@@ -884,29 +1034,29 @@ var objectGetOwnPropertySymbols = {};
884
1034
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
885
1035
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
886
1036
 
887
- var getBuiltIn$1 = getBuiltIn$3;
888
- var uncurryThis$9 = functionUncurryThis;
1037
+ var getBuiltIn$1 = getBuiltIn$4;
1038
+ var uncurryThis$5 = functionUncurryThis;
889
1039
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
890
1040
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
891
- var anObject$6 = anObject$8;
1041
+ var anObject = anObject$4;
892
1042
 
893
- var concat$2 = uncurryThis$9([].concat);
1043
+ var concat$1 = uncurryThis$5([].concat);
894
1044
 
895
1045
  // all object keys, includes non-enumerable and symbols
896
1046
  var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
897
- var keys = getOwnPropertyNamesModule.f(anObject$6(it));
1047
+ var keys = getOwnPropertyNamesModule.f(anObject(it));
898
1048
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
899
- return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
1049
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
900
1050
  };
901
1051
 
902
1052
  var hasOwn$2 = hasOwnProperty_1;
903
1053
  var ownKeys = ownKeys$1;
904
1054
  var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
905
- var definePropertyModule$1 = objectDefineProperty;
1055
+ var definePropertyModule = objectDefineProperty;
906
1056
 
907
1057
  var copyConstructorProperties$1 = function (target, source, exceptions) {
908
1058
  var keys = ownKeys(source);
909
- var defineProperty = definePropertyModule$1.f;
1059
+ var defineProperty = definePropertyModule.f;
910
1060
  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
911
1061
  for (var i = 0; i < keys.length; i++) {
912
1062
  var key = keys[i];
@@ -916,7 +1066,7 @@ var copyConstructorProperties$1 = function (target, source, exceptions) {
916
1066
  }
917
1067
  };
918
1068
 
919
- var fails$a = fails$i;
1069
+ var fails$4 = fails$c;
920
1070
  var isCallable$6 = isCallable$g;
921
1071
 
922
1072
  var replacement = /#|\.prototype\./;
@@ -925,7 +1075,7 @@ var isForced$1 = function (feature, detection) {
925
1075
  var value = data[normalize(feature)];
926
1076
  return value === POLYFILL ? true
927
1077
  : value === NATIVE ? false
928
- : isCallable$6(detection) ? fails$a(detection)
1078
+ : isCallable$6(detection) ? fails$4(detection)
929
1079
  : !!detection;
930
1080
  };
931
1081
 
@@ -939,10 +1089,10 @@ var POLYFILL = isForced$1.POLYFILL = 'P';
939
1089
 
940
1090
  var isForced_1 = isForced$1;
941
1091
 
942
- var global$6 = global$g;
1092
+ var global$2 = global$b;
943
1093
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
944
- var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
945
- var defineBuiltIn$3 = defineBuiltIn$4;
1094
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
1095
+ var defineBuiltIn$2 = defineBuiltIn$3;
946
1096
  var defineGlobalProperty = defineGlobalProperty$3;
947
1097
  var copyConstructorProperties = copyConstructorProperties$1;
948
1098
  var isForced = isForced_1;
@@ -968,11 +1118,11 @@ var _export = function (options, source) {
968
1118
  var STATIC = options.stat;
969
1119
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
970
1120
  if (GLOBAL) {
971
- target = global$6;
1121
+ target = global$2;
972
1122
  } else if (STATIC) {
973
- target = global$6[TARGET] || defineGlobalProperty(TARGET, {});
1123
+ target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
974
1124
  } else {
975
- target = (global$6[TARGET] || {}).prototype;
1125
+ target = global$2[TARGET] && global$2[TARGET].prototype;
976
1126
  }
977
1127
  if (target) for (key in source) {
978
1128
  sourceProperty = source[key];
@@ -988,1340 +1138,359 @@ var _export = function (options, source) {
988
1138
  }
989
1139
  // add a flag to not completely full polyfills
990
1140
  if (options.sham || (targetProperty && targetProperty.sham)) {
991
- createNonEnumerableProperty$3(sourceProperty, 'sham', true);
1141
+ createNonEnumerableProperty$2(sourceProperty, 'sham', true);
992
1142
  }
993
- defineBuiltIn$3(target, key, sourceProperty, options);
1143
+ defineBuiltIn$2(target, key, sourceProperty, options);
994
1144
  }
995
1145
  };
996
1146
 
997
- var objectDefineProperties = {};
998
-
999
- var internalObjectKeys = objectKeysInternal;
1000
- var enumBugKeys$1 = enumBugKeys$3;
1001
-
1002
- // `Object.keys` method
1003
- // https://tc39.es/ecma262/#sec-object.keys
1004
- // eslint-disable-next-line es/no-object-keys -- safe
1005
- var objectKeys$2 = Object.keys || function keys(O) {
1006
- return internalObjectKeys(O, enumBugKeys$1);
1007
- };
1008
-
1009
- var DESCRIPTORS$2 = descriptors;
1010
- var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1011
- var definePropertyModule = objectDefineProperty;
1012
- var anObject$5 = anObject$8;
1013
- var toIndexedObject$1 = toIndexedObject$5;
1014
- var objectKeys$1 = objectKeys$2;
1015
-
1016
- // `Object.defineProperties` method
1017
- // https://tc39.es/ecma262/#sec-object.defineproperties
1018
- // eslint-disable-next-line es/no-object-defineproperties -- safe
1019
- objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1020
- anObject$5(O);
1021
- var props = toIndexedObject$1(Properties);
1022
- var keys = objectKeys$1(Properties);
1023
- var length = keys.length;
1024
- var index = 0;
1025
- var key;
1026
- while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
1027
- return O;
1028
- };
1029
-
1030
- var getBuiltIn = getBuiltIn$3;
1031
-
1032
- var html$1 = getBuiltIn('document', 'documentElement');
1033
-
1034
- /* global ActiveXObject -- old IE, WSH */
1035
- var anObject$4 = anObject$8;
1036
- var definePropertiesModule = objectDefineProperties;
1037
- var enumBugKeys = enumBugKeys$3;
1038
- var hiddenKeys = hiddenKeys$4;
1039
- var html = html$1;
1040
- var documentCreateElement$1 = documentCreateElement$2;
1041
- var sharedKey$1 = sharedKey$3;
1147
+ var fails$3 = fails$c;
1042
1148
 
1043
- var GT = '>';
1044
- var LT = '<';
1045
- var PROTOTYPE = 'prototype';
1046
- var SCRIPT = 'script';
1047
- var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1149
+ var correctPrototypeGetter = !fails$3(function () {
1150
+ function F() { /* empty */ }
1151
+ F.prototype.constructor = null;
1152
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1153
+ return Object.getPrototypeOf(new F()) !== F.prototype;
1154
+ });
1048
1155
 
1049
- var EmptyConstructor = function () { /* empty */ };
1156
+ var hasOwn$1 = hasOwnProperty_1;
1157
+ var isCallable$5 = isCallable$g;
1158
+ var toObject$1 = toObject$3;
1159
+ var sharedKey = sharedKey$3;
1160
+ var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1050
1161
 
1051
- var scriptTag = function (content) {
1052
- return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1053
- };
1162
+ var IE_PROTO = sharedKey('IE_PROTO');
1163
+ var $Object$1 = Object;
1164
+ var ObjectPrototype = $Object$1.prototype;
1054
1165
 
1055
- // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1056
- var NullProtoObjectViaActiveX = function (activeXDocument) {
1057
- activeXDocument.write(scriptTag(''));
1058
- activeXDocument.close();
1059
- var temp = activeXDocument.parentWindow.Object;
1060
- activeXDocument = null; // avoid memory leak
1061
- return temp;
1166
+ // `Object.getPrototypeOf` method
1167
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
1168
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
1169
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1170
+ var object = toObject$1(O);
1171
+ if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
1172
+ var constructor = object.constructor;
1173
+ if (isCallable$5(constructor) && object instanceof constructor) {
1174
+ return constructor.prototype;
1175
+ } return object instanceof $Object$1 ? ObjectPrototype : null;
1062
1176
  };
1063
1177
 
1064
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
1065
- var NullProtoObjectViaIFrame = function () {
1066
- // Thrash, waste and sodomy: IE GC bug
1067
- var iframe = documentCreateElement$1('iframe');
1068
- var JS = 'java' + SCRIPT + ':';
1069
- var iframeDocument;
1070
- iframe.style.display = 'none';
1071
- html.appendChild(iframe);
1072
- // https://github.com/zloirock/core-js/issues/475
1073
- iframe.src = String(JS);
1074
- iframeDocument = iframe.contentWindow.document;
1075
- iframeDocument.open();
1076
- iframeDocument.write(scriptTag('document.F=Object'));
1077
- iframeDocument.close();
1078
- return iframeDocument.F;
1079
- };
1178
+ var fails$2 = fails$c;
1179
+ var isCallable$4 = isCallable$g;
1180
+ var isObject$2 = isObject$8;
1181
+ var getPrototypeOf$1 = objectGetPrototypeOf;
1182
+ var defineBuiltIn$1 = defineBuiltIn$3;
1183
+ var wellKnownSymbol$5 = wellKnownSymbol$8;
1080
1184
 
1081
- // Check for document.domain and active x support
1082
- // No need to use active x approach when document.domain is not set
1083
- // see https://github.com/es-shims/es5-shim/issues/150
1084
- // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1085
- // avoid IE GC bug
1086
- var activeXDocument;
1087
- var NullProtoObject = function () {
1088
- try {
1089
- activeXDocument = new ActiveXObject('htmlfile');
1090
- } catch (error) { /* ignore */ }
1091
- NullProtoObject = typeof document != 'undefined'
1092
- ? document.domain && activeXDocument
1093
- ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1094
- : NullProtoObjectViaIFrame()
1095
- : NullProtoObjectViaActiveX(activeXDocument); // WSH
1096
- var length = enumBugKeys.length;
1097
- while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1098
- return NullProtoObject();
1099
- };
1185
+ var ITERATOR$2 = wellKnownSymbol$5('iterator');
1186
+ var BUGGY_SAFARI_ITERATORS$1 = false;
1100
1187
 
1101
- hiddenKeys[IE_PROTO$1] = true;
1188
+ // `%IteratorPrototype%` object
1189
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1190
+ var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1102
1191
 
1103
- // `Object.create` method
1104
- // https://tc39.es/ecma262/#sec-object.create
1105
- // eslint-disable-next-line es/no-object-create -- safe
1106
- var objectCreate = Object.create || function create(O, Properties) {
1107
- var result;
1108
- if (O !== null) {
1109
- EmptyConstructor[PROTOTYPE] = anObject$4(O);
1110
- result = new EmptyConstructor();
1111
- EmptyConstructor[PROTOTYPE] = null;
1112
- // add "__proto__" for Object.getPrototypeOf polyfill
1113
- result[IE_PROTO$1] = O;
1114
- } else result = NullProtoObject();
1115
- return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1116
- };
1192
+ /* eslint-disable es/no-array-prototype-keys -- safe */
1193
+ if ([].keys) {
1194
+ arrayIterator = [].keys();
1195
+ // Safari 8 has buggy iterators w/o `next`
1196
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
1197
+ else {
1198
+ PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
1199
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
1200
+ }
1201
+ }
1117
1202
 
1118
- var wellKnownSymbol$a = wellKnownSymbol$c;
1119
- var create$2 = objectCreate;
1120
- var defineProperty$3 = objectDefineProperty.f;
1203
+ var NEW_ITERATOR_PROTOTYPE = !isObject$2(IteratorPrototype$2) || fails$2(function () {
1204
+ var test = {};
1205
+ // FF44- legacy iterators case
1206
+ return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
1207
+ });
1121
1208
 
1122
- var UNSCOPABLES = wellKnownSymbol$a('unscopables');
1123
- var ArrayPrototype = Array.prototype;
1209
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1124
1210
 
1125
- // Array.prototype[@@unscopables]
1126
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1127
- if (ArrayPrototype[UNSCOPABLES] === undefined) {
1128
- defineProperty$3(ArrayPrototype, UNSCOPABLES, {
1129
- configurable: true,
1130
- value: create$2(null)
1211
+ // `%IteratorPrototype%[@@iterator]()` method
1212
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1213
+ if (!isCallable$4(IteratorPrototype$2[ITERATOR$2])) {
1214
+ defineBuiltIn$1(IteratorPrototype$2, ITERATOR$2, function () {
1215
+ return this;
1131
1216
  });
1132
1217
  }
1133
1218
 
1134
- // add a key to Array.prototype[@@unscopables]
1135
- var addToUnscopables$2 = function (key) {
1136
- ArrayPrototype[UNSCOPABLES][key] = true;
1219
+ var iteratorsCore = {
1220
+ IteratorPrototype: IteratorPrototype$2,
1221
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1137
1222
  };
1138
1223
 
1139
- var $$5 = _export;
1140
- var $includes = arrayIncludes.includes;
1141
- var fails$9 = fails$i;
1142
- var addToUnscopables$1 = addToUnscopables$2;
1224
+ var defineProperty$2 = objectDefineProperty.f;
1225
+ var hasOwn = hasOwnProperty_1;
1226
+ var wellKnownSymbol$4 = wellKnownSymbol$8;
1143
1227
 
1144
- // FF99+ bug
1145
- var BROKEN_ON_SPARSE = fails$9(function () {
1146
- // eslint-disable-next-line es/no-array-prototype-includes -- detection
1147
- return !Array(1).includes();
1148
- });
1228
+ var TO_STRING_TAG$2 = wellKnownSymbol$4('toStringTag');
1149
1229
 
1150
- // `Array.prototype.includes` method
1151
- // https://tc39.es/ecma262/#sec-array.prototype.includes
1152
- $$5({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
1153
- includes: function includes(el /* , fromIndex = 0 */) {
1154
- return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
1155
- }
1156
- });
1157
-
1158
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1159
- addToUnscopables$1('includes');
1160
-
1161
- var isObject$2 = isObject$8;
1162
- var classof$4 = classofRaw$2;
1163
- var wellKnownSymbol$9 = wellKnownSymbol$c;
1164
-
1165
- var MATCH$1 = wellKnownSymbol$9('match');
1166
-
1167
- // `IsRegExp` abstract operation
1168
- // https://tc39.es/ecma262/#sec-isregexp
1169
- var isRegexp = function (it) {
1170
- var isRegExp;
1171
- return isObject$2(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$4(it) === 'RegExp');
1172
- };
1173
-
1174
- var isRegExp = isRegexp;
1175
-
1176
- var $TypeError$3 = TypeError;
1177
-
1178
- var notARegexp = function (it) {
1179
- if (isRegExp(it)) {
1180
- throw new $TypeError$3("The method doesn't accept regular expressions");
1181
- } return it;
1182
- };
1183
-
1184
- var wellKnownSymbol$8 = wellKnownSymbol$c;
1185
-
1186
- var TO_STRING_TAG$2 = wellKnownSymbol$8('toStringTag');
1187
- var test = {};
1188
-
1189
- test[TO_STRING_TAG$2] = 'z';
1190
-
1191
- var toStringTagSupport = String(test) === '[object z]';
1192
-
1193
- var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1194
- var isCallable$5 = isCallable$g;
1195
- var classofRaw$1 = classofRaw$2;
1196
- var wellKnownSymbol$7 = wellKnownSymbol$c;
1197
-
1198
- var TO_STRING_TAG$1 = wellKnownSymbol$7('toStringTag');
1199
- var $Object$1 = Object;
1200
-
1201
- // ES3 wrong here
1202
- var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
1203
-
1204
- // fallback for IE11 Script Access Denied error
1205
- var tryGet = function (it, key) {
1206
- try {
1207
- return it[key];
1208
- } catch (error) { /* empty */ }
1209
- };
1210
-
1211
- // getting tag from ES6+ `Object.prototype.toString`
1212
- var classof$3 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1213
- var O, tag, result;
1214
- return it === undefined ? 'Undefined' : it === null ? 'Null'
1215
- // @@toStringTag case
1216
- : typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG$1)) == 'string' ? tag
1217
- // builtinTag case
1218
- : CORRECT_ARGUMENTS ? classofRaw$1(O)
1219
- // ES3 arguments fallback
1220
- : (result = classofRaw$1(O)) === 'Object' && isCallable$5(O.callee) ? 'Arguments' : result;
1221
- };
1222
-
1223
- var classof$2 = classof$3;
1224
-
1225
- var $String$1 = String;
1226
-
1227
- var toString$4 = function (argument) {
1228
- if (classof$2(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1229
- return $String$1(argument);
1230
- };
1231
-
1232
- var wellKnownSymbol$6 = wellKnownSymbol$c;
1233
-
1234
- var MATCH = wellKnownSymbol$6('match');
1235
-
1236
- var correctIsRegexpLogic = function (METHOD_NAME) {
1237
- var regexp = /./;
1238
- try {
1239
- '/./'[METHOD_NAME](regexp);
1240
- } catch (error1) {
1241
- try {
1242
- regexp[MATCH] = false;
1243
- return '/./'[METHOD_NAME](regexp);
1244
- } catch (error2) { /* empty */ }
1245
- } return false;
1246
- };
1247
-
1248
- var $$4 = _export;
1249
- var uncurryThis$8 = functionUncurryThis;
1250
- var notARegExp = notARegexp;
1251
- var requireObjectCoercible$2 = requireObjectCoercible$5;
1252
- var toString$3 = toString$4;
1253
- var correctIsRegExpLogic = correctIsRegexpLogic;
1254
-
1255
- var stringIndexOf$1 = uncurryThis$8(''.indexOf);
1256
-
1257
- // `String.prototype.includes` method
1258
- // https://tc39.es/ecma262/#sec-string.prototype.includes
1259
- $$4({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
1260
- includes: function includes(searchString /* , position = 0 */) {
1261
- return !!~stringIndexOf$1(
1262
- toString$3(requireObjectCoercible$2(this)),
1263
- toString$3(notARegExp(searchString)),
1264
- arguments.length > 1 ? arguments[1] : undefined
1265
- );
1266
- }
1267
- });
1268
-
1269
- var iterators = {};
1270
-
1271
- var fails$8 = fails$i;
1272
-
1273
- var correctPrototypeGetter = !fails$8(function () {
1274
- function F() { /* empty */ }
1275
- F.prototype.constructor = null;
1276
- // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1277
- return Object.getPrototypeOf(new F()) !== F.prototype;
1278
- });
1279
-
1280
- var hasOwn$1 = hasOwnProperty_1;
1281
- var isCallable$4 = isCallable$g;
1282
- var toObject$3 = toObject$5;
1283
- var sharedKey = sharedKey$3;
1284
- var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1285
-
1286
- var IE_PROTO = sharedKey('IE_PROTO');
1287
- var $Object = Object;
1288
- var ObjectPrototype = $Object.prototype;
1289
-
1290
- // `Object.getPrototypeOf` method
1291
- // https://tc39.es/ecma262/#sec-object.getprototypeof
1292
- // eslint-disable-next-line es/no-object-getprototypeof -- safe
1293
- var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
1294
- var object = toObject$3(O);
1295
- if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
1296
- var constructor = object.constructor;
1297
- if (isCallable$4(constructor) && object instanceof constructor) {
1298
- return constructor.prototype;
1299
- } return object instanceof $Object ? ObjectPrototype : null;
1300
- };
1301
-
1302
- var fails$7 = fails$i;
1303
- var isCallable$3 = isCallable$g;
1304
- var isObject$1 = isObject$8;
1305
- var getPrototypeOf$1 = objectGetPrototypeOf;
1306
- var defineBuiltIn$2 = defineBuiltIn$4;
1307
- var wellKnownSymbol$5 = wellKnownSymbol$c;
1308
-
1309
- var ITERATOR$2 = wellKnownSymbol$5('iterator');
1310
- var BUGGY_SAFARI_ITERATORS$1 = false;
1311
-
1312
- // `%IteratorPrototype%` object
1313
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1314
- var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1315
-
1316
- /* eslint-disable es/no-array-prototype-keys -- safe */
1317
- if ([].keys) {
1318
- arrayIterator = [].keys();
1319
- // Safari 8 has buggy iterators w/o `next`
1320
- if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
1321
- else {
1322
- PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
1323
- if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
1324
- }
1325
- }
1326
-
1327
- var NEW_ITERATOR_PROTOTYPE = !isObject$1(IteratorPrototype$2) || fails$7(function () {
1328
- var test = {};
1329
- // FF44- legacy iterators case
1330
- return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
1331
- });
1332
-
1333
- if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1334
-
1335
- // `%IteratorPrototype%[@@iterator]()` method
1336
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1337
- if (!isCallable$3(IteratorPrototype$2[ITERATOR$2])) {
1338
- defineBuiltIn$2(IteratorPrototype$2, ITERATOR$2, function () {
1339
- return this;
1340
- });
1341
- }
1342
-
1343
- var iteratorsCore = {
1344
- IteratorPrototype: IteratorPrototype$2,
1345
- BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1346
- };
1347
-
1348
- var defineProperty$2 = objectDefineProperty.f;
1349
- var hasOwn = hasOwnProperty_1;
1350
- var wellKnownSymbol$4 = wellKnownSymbol$c;
1351
-
1352
- var TO_STRING_TAG = wellKnownSymbol$4('toStringTag');
1353
-
1354
- var setToStringTag$3 = function (target, TAG, STATIC) {
1355
- if (target && !STATIC) target = target.prototype;
1356
- if (target && !hasOwn(target, TO_STRING_TAG)) {
1357
- defineProperty$2(target, TO_STRING_TAG, { configurable: true, value: TAG });
1230
+ var setToStringTag$3 = function (target, TAG, STATIC) {
1231
+ if (target && !STATIC) target = target.prototype;
1232
+ if (target && !hasOwn(target, TO_STRING_TAG$2)) {
1233
+ defineProperty$2(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
1358
1234
  }
1359
1235
  };
1360
1236
 
1361
1237
  var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1362
- var create$1 = objectCreate;
1238
+ var create = objectCreate;
1363
1239
  var createPropertyDescriptor = createPropertyDescriptor$3;
1364
1240
  var setToStringTag$2 = setToStringTag$3;
1365
- var Iterators$2 = iterators;
1366
-
1367
- var returnThis$1 = function () { return this; };
1368
-
1369
- var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1370
- var TO_STRING_TAG = NAME + ' Iterator';
1371
- IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1372
- setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
1373
- Iterators$2[TO_STRING_TAG] = returnThis$1;
1374
- return IteratorConstructor;
1375
- };
1376
-
1377
- var uncurryThis$7 = functionUncurryThis;
1378
- var aCallable$1 = aCallable$3;
1379
-
1380
- var functionUncurryThisAccessor = function (object, key, method) {
1381
- try {
1382
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1383
- return uncurryThis$7(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
1384
- } catch (error) { /* empty */ }
1385
- };
1386
-
1387
- var isObject = isObject$8;
1388
-
1389
- var isPossiblePrototype$1 = function (argument) {
1390
- return isObject(argument) || argument === null;
1391
- };
1392
-
1393
- var isPossiblePrototype = isPossiblePrototype$1;
1394
-
1395
- var $String = String;
1396
- var $TypeError$2 = TypeError;
1397
-
1398
- var aPossiblePrototype$1 = function (argument) {
1399
- if (isPossiblePrototype(argument)) return argument;
1400
- throw new $TypeError$2("Can't set " + $String(argument) + ' as a prototype');
1401
- };
1402
-
1403
- /* eslint-disable no-proto -- safe */
1404
- var uncurryThisAccessor = functionUncurryThisAccessor;
1405
- var anObject$3 = anObject$8;
1406
- var aPossiblePrototype = aPossiblePrototype$1;
1407
-
1408
- // `Object.setPrototypeOf` method
1409
- // https://tc39.es/ecma262/#sec-object.setprototypeof
1410
- // Works with __proto__ only. Old v8 can't work with null proto objects.
1411
- // eslint-disable-next-line es/no-object-setprototypeof -- safe
1412
- var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1413
- var CORRECT_SETTER = false;
1414
- var test = {};
1415
- var setter;
1416
- try {
1417
- setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
1418
- setter(test, []);
1419
- CORRECT_SETTER = test instanceof Array;
1420
- } catch (error) { /* empty */ }
1421
- return function setPrototypeOf(O, proto) {
1422
- anObject$3(O);
1423
- aPossiblePrototype(proto);
1424
- if (CORRECT_SETTER) setter(O, proto);
1425
- else O.__proto__ = proto;
1426
- return O;
1427
- };
1428
- }() : undefined);
1429
-
1430
- var $$3 = _export;
1431
- var call$5 = functionCall;
1432
- var FunctionName = functionName;
1433
- var isCallable$2 = isCallable$g;
1434
- var createIteratorConstructor = iteratorCreateConstructor;
1435
- var getPrototypeOf = objectGetPrototypeOf;
1436
- var setPrototypeOf = objectSetPrototypeOf;
1437
- var setToStringTag$1 = setToStringTag$3;
1438
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
1439
- var defineBuiltIn$1 = defineBuiltIn$4;
1440
- var wellKnownSymbol$3 = wellKnownSymbol$c;
1441
- var Iterators$1 = iterators;
1442
- var IteratorsCore = iteratorsCore;
1443
-
1444
- var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1445
- var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1446
- var IteratorPrototype = IteratorsCore.IteratorPrototype;
1447
- var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1448
- var ITERATOR$1 = wellKnownSymbol$3('iterator');
1449
- var KEYS = 'keys';
1450
- var VALUES = 'values';
1451
- var ENTRIES = 'entries';
1452
-
1453
- var returnThis = function () { return this; };
1454
-
1455
- var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1456
- createIteratorConstructor(IteratorConstructor, NAME, next);
1457
-
1458
- var getIterationMethod = function (KIND) {
1459
- if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1460
- if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
1461
-
1462
- switch (KIND) {
1463
- case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1464
- case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1465
- case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1466
- }
1467
-
1468
- return function () { return new IteratorConstructor(this); };
1469
- };
1470
-
1471
- var TO_STRING_TAG = NAME + ' Iterator';
1472
- var INCORRECT_VALUES_NAME = false;
1473
- var IterablePrototype = Iterable.prototype;
1474
- var nativeIterator = IterablePrototype[ITERATOR$1]
1475
- || IterablePrototype['@@iterator']
1476
- || DEFAULT && IterablePrototype[DEFAULT];
1477
- var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
1478
- var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1479
- var CurrentIteratorPrototype, methods, KEY;
1480
-
1481
- // fix native
1482
- if (anyNativeIterator) {
1483
- CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1484
- if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1485
- if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1486
- if (setPrototypeOf) {
1487
- setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1488
- } else if (!isCallable$2(CurrentIteratorPrototype[ITERATOR$1])) {
1489
- defineBuiltIn$1(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1490
- }
1491
- }
1492
- // Set @@toStringTag to native iterators
1493
- setToStringTag$1(CurrentIteratorPrototype, TO_STRING_TAG, true);
1494
- }
1495
- }
1496
-
1497
- // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1498
- if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1499
- if (CONFIGURABLE_FUNCTION_NAME) {
1500
- createNonEnumerableProperty$2(IterablePrototype, 'name', VALUES);
1501
- } else {
1502
- INCORRECT_VALUES_NAME = true;
1503
- defaultIterator = function values() { return call$5(nativeIterator, this); };
1504
- }
1505
- }
1506
-
1507
- // export additional methods
1508
- if (DEFAULT) {
1509
- methods = {
1510
- values: getIterationMethod(VALUES),
1511
- keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1512
- entries: getIterationMethod(ENTRIES)
1513
- };
1514
- if (FORCED) for (KEY in methods) {
1515
- if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1516
- defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
1517
- }
1518
- } else $$3({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1519
- }
1520
-
1521
- // define iterator
1522
- if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1523
- defineBuiltIn$1(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1524
- }
1525
- Iterators$1[NAME] = defaultIterator;
1526
-
1527
- return methods;
1528
- };
1529
-
1530
- // `CreateIterResultObject` abstract operation
1531
- // https://tc39.es/ecma262/#sec-createiterresultobject
1532
- var createIterResultObject$1 = function (value, done) {
1533
- return { value: value, done: done };
1534
- };
1535
-
1536
- var toIndexedObject = toIndexedObject$5;
1537
- var addToUnscopables = addToUnscopables$2;
1538
- var Iterators = iterators;
1539
- var InternalStateModule = internalState;
1540
- var defineProperty$1 = objectDefineProperty.f;
1541
- var defineIterator = iteratorDefine;
1542
- var createIterResultObject = createIterResultObject$1;
1543
- var DESCRIPTORS$1 = descriptors;
1544
-
1545
- var ARRAY_ITERATOR = 'Array Iterator';
1546
- var setInternalState = InternalStateModule.set;
1547
- var getInternalState$1 = InternalStateModule.getterFor(ARRAY_ITERATOR);
1548
-
1549
- // `Array.prototype.entries` method
1550
- // https://tc39.es/ecma262/#sec-array.prototype.entries
1551
- // `Array.prototype.keys` method
1552
- // https://tc39.es/ecma262/#sec-array.prototype.keys
1553
- // `Array.prototype.values` method
1554
- // https://tc39.es/ecma262/#sec-array.prototype.values
1555
- // `Array.prototype[@@iterator]` method
1556
- // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
1557
- // `CreateArrayIterator` internal method
1558
- // https://tc39.es/ecma262/#sec-createarrayiterator
1559
- var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1560
- setInternalState(this, {
1561
- type: ARRAY_ITERATOR,
1562
- target: toIndexedObject(iterated), // target
1563
- index: 0, // next index
1564
- kind: kind // kind
1565
- });
1566
- // `%ArrayIteratorPrototype%.next` method
1567
- // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1568
- }, function () {
1569
- var state = getInternalState$1(this);
1570
- var target = state.target;
1571
- var index = state.index++;
1572
- if (!target || index >= target.length) {
1573
- state.target = undefined;
1574
- return createIterResultObject(undefined, true);
1575
- }
1576
- switch (state.kind) {
1577
- case 'keys': return createIterResultObject(index, false);
1578
- case 'values': return createIterResultObject(target[index], false);
1579
- } return createIterResultObject([index, target[index]], false);
1580
- }, 'values');
1581
-
1582
- // argumentsList[@@iterator] is %ArrayProto_values%
1583
- // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
1584
- // https://tc39.es/ecma262/#sec-createmappedargumentsobject
1585
- var values = Iterators.Arguments = Iterators.Array;
1586
-
1587
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1588
- addToUnscopables('keys');
1589
- addToUnscopables('values');
1590
- addToUnscopables('entries');
1591
-
1592
- // V8 ~ Chrome 45- bug
1593
- if (DESCRIPTORS$1 && values.name !== 'values') try {
1594
- defineProperty$1(values, 'name', { value: 'values' });
1595
- } catch (error) { /* empty */ }
1596
-
1597
- // iterable DOM collections
1598
- // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1599
- var domIterables = {
1600
- CSSRuleList: 0,
1601
- CSSStyleDeclaration: 0,
1602
- CSSValueList: 0,
1603
- ClientRectList: 0,
1604
- DOMRectList: 0,
1605
- DOMStringList: 0,
1606
- DOMTokenList: 1,
1607
- DataTransferItemList: 0,
1608
- FileList: 0,
1609
- HTMLAllCollection: 0,
1610
- HTMLCollection: 0,
1611
- HTMLFormElement: 0,
1612
- HTMLSelectElement: 0,
1613
- MediaList: 0,
1614
- MimeTypeArray: 0,
1615
- NamedNodeMap: 0,
1616
- NodeList: 1,
1617
- PaintRequestList: 0,
1618
- Plugin: 0,
1619
- PluginArray: 0,
1620
- SVGLengthList: 0,
1621
- SVGNumberList: 0,
1622
- SVGPathSegList: 0,
1623
- SVGPointList: 0,
1624
- SVGStringList: 0,
1625
- SVGTransformList: 0,
1626
- SourceBufferList: 0,
1627
- StyleSheetList: 0,
1628
- TextTrackCueList: 0,
1629
- TextTrackList: 0,
1630
- TouchList: 0
1631
- };
1632
-
1633
- // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1634
- var documentCreateElement = documentCreateElement$2;
1635
-
1636
- var classList = documentCreateElement('span').classList;
1637
- var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
1638
-
1639
- var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1640
-
1641
- var global$5 = global$g;
1642
- var DOMIterables = domIterables;
1643
- var DOMTokenListPrototype = domTokenListPrototype;
1644
- var ArrayIteratorMethods = es_array_iterator;
1645
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
1646
- var setToStringTag = setToStringTag$3;
1647
- var wellKnownSymbol$2 = wellKnownSymbol$c;
1648
-
1649
- var ITERATOR = wellKnownSymbol$2('iterator');
1650
- var ArrayValues = ArrayIteratorMethods.values;
1651
-
1652
- var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1653
- if (CollectionPrototype) {
1654
- // some Chrome versions have non-configurable methods on DOMTokenList
1655
- if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1656
- createNonEnumerableProperty$1(CollectionPrototype, ITERATOR, ArrayValues);
1657
- } catch (error) {
1658
- CollectionPrototype[ITERATOR] = ArrayValues;
1659
- }
1660
- setToStringTag(CollectionPrototype, COLLECTION_NAME, true);
1661
- if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1662
- // some Chrome versions have non-configurable methods on DOMTokenList
1663
- if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1664
- createNonEnumerableProperty$1(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1665
- } catch (error) {
1666
- CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1667
- }
1668
- }
1669
- }
1670
- };
1671
-
1672
- for (var COLLECTION_NAME in DOMIterables) {
1673
- handlePrototype(global$5[COLLECTION_NAME] && global$5[COLLECTION_NAME].prototype, COLLECTION_NAME);
1674
- }
1675
-
1676
- handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1677
-
1678
- var anObject$2 = anObject$8;
1679
-
1680
- // `RegExp.prototype.flags` getter implementation
1681
- // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
1682
- var regexpFlags$1 = function () {
1683
- var that = anObject$2(this);
1684
- var result = '';
1685
- if (that.hasIndices) result += 'd';
1686
- if (that.global) result += 'g';
1687
- if (that.ignoreCase) result += 'i';
1688
- if (that.multiline) result += 'm';
1689
- if (that.dotAll) result += 's';
1690
- if (that.unicode) result += 'u';
1691
- if (that.unicodeSets) result += 'v';
1692
- if (that.sticky) result += 'y';
1693
- return result;
1694
- };
1695
-
1696
- var fails$6 = fails$i;
1697
- var global$4 = global$g;
1698
-
1699
- // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1700
- var $RegExp$2 = global$4.RegExp;
1701
-
1702
- var UNSUPPORTED_Y$1 = fails$6(function () {
1703
- var re = $RegExp$2('a', 'y');
1704
- re.lastIndex = 2;
1705
- return re.exec('abcd') !== null;
1706
- });
1707
-
1708
- // UC Browser bug
1709
- // https://github.com/zloirock/core-js/issues/1008
1710
- var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$6(function () {
1711
- return !$RegExp$2('a', 'y').sticky;
1712
- });
1713
-
1714
- var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$6(function () {
1715
- // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1716
- var re = $RegExp$2('^r', 'gy');
1717
- re.lastIndex = 2;
1718
- return re.exec('str') !== null;
1719
- });
1720
-
1721
- var regexpStickyHelpers = {
1722
- BROKEN_CARET: BROKEN_CARET,
1723
- MISSED_STICKY: MISSED_STICKY,
1724
- UNSUPPORTED_Y: UNSUPPORTED_Y$1
1725
- };
1726
-
1727
- var fails$5 = fails$i;
1728
- var global$3 = global$g;
1729
-
1730
- // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
1731
- var $RegExp$1 = global$3.RegExp;
1732
-
1733
- var regexpUnsupportedDotAll = fails$5(function () {
1734
- var re = $RegExp$1('.', 's');
1735
- return !(re.dotAll && re.test('\n') && re.flags === 's');
1736
- });
1737
-
1738
- var fails$4 = fails$i;
1739
- var global$2 = global$g;
1740
-
1741
- // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1742
- var $RegExp = global$2.RegExp;
1743
-
1744
- var regexpUnsupportedNcg = fails$4(function () {
1745
- var re = $RegExp('(?<a>b)', 'g');
1746
- return re.exec('b').groups.a !== 'b' ||
1747
- 'b'.replace(re, '$<a>c') !== 'bc';
1748
- });
1749
-
1750
- /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1751
- /* eslint-disable regexp/no-useless-quantifier -- testing */
1752
- var call$4 = functionCall;
1753
- var uncurryThis$6 = functionUncurryThis;
1754
- var toString$2 = toString$4;
1755
- var regexpFlags = regexpFlags$1;
1756
- var stickyHelpers = regexpStickyHelpers;
1757
- var shared = shared$4.exports;
1758
- var create = objectCreate;
1759
- var getInternalState = internalState.get;
1760
- var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
1761
- var UNSUPPORTED_NCG = regexpUnsupportedNcg;
1762
-
1763
- var nativeReplace = shared('native-string-replace', String.prototype.replace);
1764
- var nativeExec = RegExp.prototype.exec;
1765
- var patchedExec = nativeExec;
1766
- var charAt$3 = uncurryThis$6(''.charAt);
1767
- var indexOf = uncurryThis$6(''.indexOf);
1768
- var replace$1 = uncurryThis$6(''.replace);
1769
- var stringSlice$3 = uncurryThis$6(''.slice);
1770
-
1771
- var UPDATES_LAST_INDEX_WRONG = (function () {
1772
- var re1 = /a/;
1773
- var re2 = /b*/g;
1774
- call$4(nativeExec, re1, 'a');
1775
- call$4(nativeExec, re2, 'a');
1776
- return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1777
- })();
1778
-
1779
- var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
1780
-
1781
- // nonparticipating capturing group, copied from es5-shim's String#split patch.
1782
- var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1783
-
1784
- var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
1785
-
1786
- if (PATCH) {
1787
- patchedExec = function exec(string) {
1788
- var re = this;
1789
- var state = getInternalState(re);
1790
- var str = toString$2(string);
1791
- var raw = state.raw;
1792
- var result, reCopy, lastIndex, match, i, object, group;
1793
-
1794
- if (raw) {
1795
- raw.lastIndex = re.lastIndex;
1796
- result = call$4(patchedExec, raw, str);
1797
- re.lastIndex = raw.lastIndex;
1798
- return result;
1799
- }
1800
-
1801
- var groups = state.groups;
1802
- var sticky = UNSUPPORTED_Y && re.sticky;
1803
- var flags = call$4(regexpFlags, re);
1804
- var source = re.source;
1805
- var charsAdded = 0;
1806
- var strCopy = str;
1807
-
1808
- if (sticky) {
1809
- flags = replace$1(flags, 'y', '');
1810
- if (indexOf(flags, 'g') === -1) {
1811
- flags += 'g';
1812
- }
1813
-
1814
- strCopy = stringSlice$3(str, re.lastIndex);
1815
- // Support anchored sticky behavior.
1816
- if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
1817
- source = '(?: ' + source + ')';
1818
- strCopy = ' ' + strCopy;
1819
- charsAdded++;
1820
- }
1821
- // ^(? + rx + ) is needed, in combination with some str slicing, to
1822
- // simulate the 'y' flag.
1823
- reCopy = new RegExp('^(?:' + source + ')', flags);
1824
- }
1825
-
1826
- if (NPCG_INCLUDED) {
1827
- reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
1828
- }
1829
- if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
1830
-
1831
- match = call$4(nativeExec, sticky ? reCopy : re, strCopy);
1832
-
1833
- if (sticky) {
1834
- if (match) {
1835
- match.input = stringSlice$3(match.input, charsAdded);
1836
- match[0] = stringSlice$3(match[0], charsAdded);
1837
- match.index = re.lastIndex;
1838
- re.lastIndex += match[0].length;
1839
- } else re.lastIndex = 0;
1840
- } else if (UPDATES_LAST_INDEX_WRONG && match) {
1841
- re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
1842
- }
1843
- if (NPCG_INCLUDED && match && match.length > 1) {
1844
- // Fix browsers whose `exec` methods don't consistently return `undefined`
1845
- // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
1846
- call$4(nativeReplace, match[0], reCopy, function () {
1847
- for (i = 1; i < arguments.length - 2; i++) {
1848
- if (arguments[i] === undefined) match[i] = undefined;
1849
- }
1850
- });
1851
- }
1852
-
1853
- if (match && groups) {
1854
- match.groups = object = create(null);
1855
- for (i = 0; i < groups.length; i++) {
1856
- group = groups[i];
1857
- object[group[0]] = match[group[1]];
1858
- }
1859
- }
1860
-
1861
- return match;
1862
- };
1863
- }
1864
-
1865
- var regexpExec$2 = patchedExec;
1866
-
1867
- var $$2 = _export;
1868
- var exec = regexpExec$2;
1869
-
1870
- // `RegExp.prototype.exec` method
1871
- // https://tc39.es/ecma262/#sec-regexp.prototype.exec
1872
- $$2({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
1873
- exec: exec
1874
- });
1875
-
1876
- var NATIVE_BIND = functionBindNative;
1877
-
1878
- var FunctionPrototype = Function.prototype;
1879
- var apply$1 = FunctionPrototype.apply;
1880
- var call$3 = FunctionPrototype.call;
1881
-
1882
- // eslint-disable-next-line es/no-reflect -- safe
1883
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$3.bind(apply$1) : function () {
1884
- return call$3.apply(apply$1, arguments);
1885
- });
1886
-
1887
- var classofRaw = classofRaw$2;
1888
- var uncurryThis$5 = functionUncurryThis;
1889
-
1890
- var functionUncurryThisClause = function (fn) {
1891
- // Nashorn bug:
1892
- // https://github.com/zloirock/core-js/issues/1128
1893
- // https://github.com/zloirock/core-js/issues/1130
1894
- if (classofRaw(fn) === 'Function') return uncurryThis$5(fn);
1895
- };
1896
-
1897
- // TODO: Remove from `core-js@4` since it's moved to entry points
1898
-
1899
- var uncurryThis$4 = functionUncurryThisClause;
1900
- var defineBuiltIn = defineBuiltIn$4;
1901
- var regexpExec$1 = regexpExec$2;
1902
- var fails$3 = fails$i;
1903
- var wellKnownSymbol$1 = wellKnownSymbol$c;
1904
- var createNonEnumerableProperty = createNonEnumerableProperty$5;
1905
-
1906
- var SPECIES = wellKnownSymbol$1('species');
1907
- var RegExpPrototype = RegExp.prototype;
1908
-
1909
- var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
1910
- var SYMBOL = wellKnownSymbol$1(KEY);
1911
-
1912
- var DELEGATES_TO_SYMBOL = !fails$3(function () {
1913
- // String methods call symbol-named RegEp methods
1914
- var O = {};
1915
- O[SYMBOL] = function () { return 7; };
1916
- return ''[KEY](O) !== 7;
1917
- });
1918
-
1919
- var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$3(function () {
1920
- // Symbol-named RegExp methods call .exec
1921
- var execCalled = false;
1922
- var re = /a/;
1923
-
1924
- if (KEY === 'split') {
1925
- // We can't use real regex here since it causes deoptimization
1926
- // and serious performance degradation in V8
1927
- // https://github.com/zloirock/core-js/issues/306
1928
- re = {};
1929
- // RegExp[@@split] doesn't call the regex's exec method, but first creates
1930
- // a new one. We need to return the patched regex when creating the new one.
1931
- re.constructor = {};
1932
- re.constructor[SPECIES] = function () { return re; };
1933
- re.flags = '';
1934
- re[SYMBOL] = /./[SYMBOL];
1935
- }
1936
-
1937
- re.exec = function () {
1938
- execCalled = true;
1939
- return null;
1940
- };
1941
-
1942
- re[SYMBOL]('');
1943
- return !execCalled;
1944
- });
1945
-
1946
- if (
1947
- !DELEGATES_TO_SYMBOL ||
1948
- !DELEGATES_TO_EXEC ||
1949
- FORCED
1950
- ) {
1951
- var uncurriedNativeRegExpMethod = uncurryThis$4(/./[SYMBOL]);
1952
- var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
1953
- var uncurriedNativeMethod = uncurryThis$4(nativeMethod);
1954
- var $exec = regexp.exec;
1955
- if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
1956
- if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
1957
- // The native String method already delegates to @@method (this
1958
- // polyfilled function), leasing to infinite recursion.
1959
- // We avoid it by directly calling the native @@method method.
1960
- return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
1961
- }
1962
- return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
1963
- }
1964
- return { done: false };
1965
- });
1966
-
1967
- defineBuiltIn(String.prototype, KEY, methods[0]);
1968
- defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
1969
- }
1970
-
1971
- if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
1972
- };
1241
+ var Iterators$2 = iterators;
1973
1242
 
1974
- var uncurryThis$3 = functionUncurryThis;
1975
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
1976
- var toString$1 = toString$4;
1977
- var requireObjectCoercible$1 = requireObjectCoercible$5;
1978
-
1979
- var charAt$2 = uncurryThis$3(''.charAt);
1980
- var charCodeAt = uncurryThis$3(''.charCodeAt);
1981
- var stringSlice$2 = uncurryThis$3(''.slice);
1982
-
1983
- var createMethod$1 = function (CONVERT_TO_STRING) {
1984
- return function ($this, pos) {
1985
- var S = toString$1(requireObjectCoercible$1($this));
1986
- var position = toIntegerOrInfinity$1(pos);
1987
- var size = S.length;
1988
- var first, second;
1989
- if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
1990
- first = charCodeAt(S, position);
1991
- return first < 0xD800 || first > 0xDBFF || position + 1 === size
1992
- || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
1993
- ? CONVERT_TO_STRING
1994
- ? charAt$2(S, position)
1995
- : first
1996
- : CONVERT_TO_STRING
1997
- ? stringSlice$2(S, position, position + 2)
1998
- : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
1999
- };
2000
- };
1243
+ var returnThis$1 = function () { return this; };
2001
1244
 
2002
- var stringMultibyte = {
2003
- // `String.prototype.codePointAt` method
2004
- // https://tc39.es/ecma262/#sec-string.prototype.codepointat
2005
- codeAt: createMethod$1(false),
2006
- // `String.prototype.at` method
2007
- // https://github.com/mathiasbynens/String.prototype.at
2008
- charAt: createMethod$1(true)
1245
+ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1246
+ var TO_STRING_TAG = NAME + ' Iterator';
1247
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1248
+ setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
1249
+ Iterators$2[TO_STRING_TAG] = returnThis$1;
1250
+ return IteratorConstructor;
2009
1251
  };
2010
1252
 
2011
- var charAt$1 = stringMultibyte.charAt;
1253
+ var uncurryThis$4 = functionUncurryThis;
1254
+ var aCallable = aCallable$2;
2012
1255
 
2013
- // `AdvanceStringIndex` abstract operation
2014
- // https://tc39.es/ecma262/#sec-advancestringindex
2015
- var advanceStringIndex$1 = function (S, index, unicode) {
2016
- return index + (unicode ? charAt$1(S, index).length : 1);
1256
+ var functionUncurryThisAccessor = function (object, key, method) {
1257
+ try {
1258
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1259
+ return uncurryThis$4(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
1260
+ } catch (error) { /* empty */ }
2017
1261
  };
2018
1262
 
2019
- var uncurryThis$2 = functionUncurryThis;
2020
- var toObject$2 = toObject$5;
1263
+ var isObject$1 = isObject$8;
2021
1264
 
2022
- var floor = Math.floor;
2023
- var charAt = uncurryThis$2(''.charAt);
2024
- var replace = uncurryThis$2(''.replace);
2025
- var stringSlice$1 = uncurryThis$2(''.slice);
2026
- // eslint-disable-next-line redos/no-vulnerable -- safe
2027
- var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
2028
- var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
2029
-
2030
- // `GetSubstitution` abstract operation
2031
- // https://tc39.es/ecma262/#sec-getsubstitution
2032
- var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
2033
- var tailPos = position + matched.length;
2034
- var m = captures.length;
2035
- var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
2036
- if (namedCaptures !== undefined) {
2037
- namedCaptures = toObject$2(namedCaptures);
2038
- symbols = SUBSTITUTION_SYMBOLS;
2039
- }
2040
- return replace(replacement, symbols, function (match, ch) {
2041
- var capture;
2042
- switch (charAt(ch, 0)) {
2043
- case '$': return '$';
2044
- case '&': return matched;
2045
- case '`': return stringSlice$1(str, 0, position);
2046
- case "'": return stringSlice$1(str, tailPos);
2047
- case '<':
2048
- capture = namedCaptures[stringSlice$1(ch, 1, -1)];
2049
- break;
2050
- default: // \d\d?
2051
- var n = +ch;
2052
- if (n === 0) return match;
2053
- if (n > m) {
2054
- var f = floor(n / 10);
2055
- if (f === 0) return match;
2056
- if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
2057
- return match;
2058
- }
2059
- capture = captures[n - 1];
2060
- }
2061
- return capture === undefined ? '' : capture;
2062
- });
1265
+ var isPossiblePrototype$1 = function (argument) {
1266
+ return isObject$1(argument) || argument === null;
2063
1267
  };
2064
1268
 
2065
- var call$2 = functionCall;
2066
- var anObject$1 = anObject$8;
2067
- var isCallable$1 = isCallable$g;
2068
- var classof$1 = classofRaw$2;
2069
- var regexpExec = regexpExec$2;
1269
+ var isPossiblePrototype = isPossiblePrototype$1;
2070
1270
 
2071
- var $TypeError$1 = TypeError;
1271
+ var $String$2 = String;
1272
+ var $TypeError = TypeError;
2072
1273
 
2073
- // `RegExpExec` abstract operation
2074
- // https://tc39.es/ecma262/#sec-regexpexec
2075
- var regexpExecAbstract = function (R, S) {
2076
- var exec = R.exec;
2077
- if (isCallable$1(exec)) {
2078
- var result = call$2(exec, R, S);
2079
- if (result !== null) anObject$1(result);
2080
- return result;
2081
- }
2082
- if (classof$1(R) === 'RegExp') return call$2(regexpExec, R, S);
2083
- throw new $TypeError$1('RegExp#exec called on incompatible receiver');
1274
+ var aPossiblePrototype$1 = function (argument) {
1275
+ if (isPossiblePrototype(argument)) return argument;
1276
+ throw new $TypeError("Can't set " + $String$2(argument) + ' as a prototype');
2084
1277
  };
2085
1278
 
2086
- var apply = functionApply;
2087
- var call$1 = functionCall;
2088
- var uncurryThis$1 = functionUncurryThis;
2089
- var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
2090
- var fails$2 = fails$i;
2091
- var anObject = anObject$8;
2092
- var isCallable = isCallable$g;
2093
- var isNullOrUndefined = isNullOrUndefined$3;
2094
- var toIntegerOrInfinity = toIntegerOrInfinity$4;
2095
- var toLength = toLength$2;
2096
- var toString = toString$4;
2097
- var requireObjectCoercible = requireObjectCoercible$5;
2098
- var advanceStringIndex = advanceStringIndex$1;
2099
- var getMethod = getMethod$2;
2100
- var getSubstitution = getSubstitution$1;
2101
- var regExpExec = regexpExecAbstract;
2102
- var wellKnownSymbol = wellKnownSymbol$c;
2103
-
2104
- var REPLACE = wellKnownSymbol('replace');
2105
- var max = Math.max;
2106
- var min = Math.min;
2107
- var concat$1 = uncurryThis$1([].concat);
2108
- var push = uncurryThis$1([].push);
2109
- var stringIndexOf = uncurryThis$1(''.indexOf);
2110
- var stringSlice = uncurryThis$1(''.slice);
1279
+ /* eslint-disable no-proto -- safe */
1280
+ var uncurryThisAccessor = functionUncurryThisAccessor;
1281
+ var isObject = isObject$8;
1282
+ var requireObjectCoercible = requireObjectCoercible$3;
1283
+ var aPossiblePrototype = aPossiblePrototype$1;
2111
1284
 
2112
- var maybeToString = function (it) {
2113
- return it === undefined ? it : String(it);
2114
- };
1285
+ // `Object.setPrototypeOf` method
1286
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
1287
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
1288
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
1289
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1290
+ var CORRECT_SETTER = false;
1291
+ var test = {};
1292
+ var setter;
1293
+ try {
1294
+ setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
1295
+ setter(test, []);
1296
+ CORRECT_SETTER = test instanceof Array;
1297
+ } catch (error) { /* empty */ }
1298
+ return function setPrototypeOf(O, proto) {
1299
+ requireObjectCoercible(O);
1300
+ aPossiblePrototype(proto);
1301
+ if (!isObject(O)) return O;
1302
+ if (CORRECT_SETTER) setter(O, proto);
1303
+ else O.__proto__ = proto;
1304
+ return O;
1305
+ };
1306
+ }() : undefined);
2115
1307
 
2116
- // IE <= 11 replaces $0 with the whole match, as if it was $&
2117
- // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
2118
- var REPLACE_KEEPS_$0 = (function () {
2119
- // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
2120
- return 'a'.replace(/./, '$0') === '$0';
2121
- })();
1308
+ var $$2 = _export;
1309
+ var call$3 = functionCall;
1310
+ var FunctionName = functionName;
1311
+ var isCallable$3 = isCallable$g;
1312
+ var createIteratorConstructor = iteratorCreateConstructor;
1313
+ var getPrototypeOf = objectGetPrototypeOf;
1314
+ var setPrototypeOf = objectSetPrototypeOf;
1315
+ var setToStringTag$1 = setToStringTag$3;
1316
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
1317
+ var defineBuiltIn = defineBuiltIn$3;
1318
+ var wellKnownSymbol$3 = wellKnownSymbol$8;
1319
+ var Iterators$1 = iterators;
1320
+ var IteratorsCore = iteratorsCore;
2122
1321
 
2123
- // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
2124
- var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
2125
- if (/./[REPLACE]) {
2126
- return /./[REPLACE]('a', '$0') === '';
2127
- }
2128
- return false;
2129
- })();
2130
-
2131
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$2(function () {
2132
- var re = /./;
2133
- re.exec = function () {
2134
- var result = [];
2135
- result.groups = { a: '7' };
2136
- return result;
2137
- };
2138
- // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
2139
- return ''.replace(re, '$<a>') !== '7';
2140
- });
1322
+ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1323
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1324
+ var IteratorPrototype = IteratorsCore.IteratorPrototype;
1325
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1326
+ var ITERATOR$1 = wellKnownSymbol$3('iterator');
1327
+ var KEYS = 'keys';
1328
+ var VALUES = 'values';
1329
+ var ENTRIES = 'entries';
2141
1330
 
2142
- // @@replace logic
2143
- fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
2144
- var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
2145
-
2146
- return [
2147
- // `String.prototype.replace` method
2148
- // https://tc39.es/ecma262/#sec-string.prototype.replace
2149
- function replace(searchValue, replaceValue) {
2150
- var O = requireObjectCoercible(this);
2151
- var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
2152
- return replacer
2153
- ? call$1(replacer, searchValue, O, replaceValue)
2154
- : call$1(nativeReplace, toString(O), searchValue, replaceValue);
2155
- },
2156
- // `RegExp.prototype[@@replace]` method
2157
- // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
2158
- function (string, replaceValue) {
2159
- var rx = anObject(this);
2160
- var S = toString(string);
2161
-
2162
- if (
2163
- typeof replaceValue == 'string' &&
2164
- stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
2165
- stringIndexOf(replaceValue, '$<') === -1
2166
- ) {
2167
- var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
2168
- if (res.done) return res.value;
2169
- }
1331
+ var returnThis = function () { return this; };
2170
1332
 
2171
- var functionalReplace = isCallable(replaceValue);
2172
- if (!functionalReplace) replaceValue = toString(replaceValue);
1333
+ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1334
+ createIteratorConstructor(IteratorConstructor, NAME, next);
2173
1335
 
2174
- var global = rx.global;
2175
- var fullUnicode;
2176
- if (global) {
2177
- fullUnicode = rx.unicode;
2178
- rx.lastIndex = 0;
2179
- }
1336
+ var getIterationMethod = function (KIND) {
1337
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1338
+ if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
2180
1339
 
2181
- var results = [];
2182
- var result;
2183
- while (true) {
2184
- result = regExpExec(rx, S);
2185
- if (result === null) break;
1340
+ switch (KIND) {
1341
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1342
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1343
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1344
+ }
2186
1345
 
2187
- push(results, result);
2188
- if (!global) break;
1346
+ return function () { return new IteratorConstructor(this); };
1347
+ };
2189
1348
 
2190
- var matchStr = toString(result[0]);
2191
- if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
2192
- }
1349
+ var TO_STRING_TAG = NAME + ' Iterator';
1350
+ var INCORRECT_VALUES_NAME = false;
1351
+ var IterablePrototype = Iterable.prototype;
1352
+ var nativeIterator = IterablePrototype[ITERATOR$1]
1353
+ || IterablePrototype['@@iterator']
1354
+ || DEFAULT && IterablePrototype[DEFAULT];
1355
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
1356
+ var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1357
+ var CurrentIteratorPrototype, methods, KEY;
2193
1358
 
2194
- var accumulatedResult = '';
2195
- var nextSourcePosition = 0;
2196
- for (var i = 0; i < results.length; i++) {
2197
- result = results[i];
2198
-
2199
- var matched = toString(result[0]);
2200
- var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
2201
- var captures = [];
2202
- var replacement;
2203
- // NOTE: This is equivalent to
2204
- // captures = result.slice(1).map(maybeToString)
2205
- // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
2206
- // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
2207
- // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
2208
- for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
2209
- var namedCaptures = result.groups;
2210
- if (functionalReplace) {
2211
- var replacerArgs = concat$1([matched], captures, position, S);
2212
- if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
2213
- replacement = toString(apply(replaceValue, undefined, replacerArgs));
2214
- } else {
2215
- replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
2216
- }
2217
- if (position >= nextSourcePosition) {
2218
- accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
2219
- nextSourcePosition = position + matched.length;
1359
+ // fix native
1360
+ if (anyNativeIterator) {
1361
+ CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1362
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1363
+ if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1364
+ if (setPrototypeOf) {
1365
+ setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1366
+ } else if (!isCallable$3(CurrentIteratorPrototype[ITERATOR$1])) {
1367
+ defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
2220
1368
  }
2221
1369
  }
1370
+ // Set @@toStringTag to native iterators
1371
+ setToStringTag$1(CurrentIteratorPrototype, TO_STRING_TAG, true);
1372
+ }
1373
+ }
2222
1374
 
2223
- return accumulatedResult + stringSlice(S, nextSourcePosition);
1375
+ // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1376
+ if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1377
+ if (CONFIGURABLE_FUNCTION_NAME) {
1378
+ createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1379
+ } else {
1380
+ INCORRECT_VALUES_NAME = true;
1381
+ defaultIterator = function values() { return call$3(nativeIterator, this); };
2224
1382
  }
2225
- ];
2226
- }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
1383
+ }
2227
1384
 
2228
- var aCallable = aCallable$3;
2229
- var toObject$1 = toObject$5;
2230
- var IndexedObject$1 = indexedObject;
2231
- var lengthOfArrayLike = lengthOfArrayLike$2;
1385
+ // export additional methods
1386
+ if (DEFAULT) {
1387
+ methods = {
1388
+ values: getIterationMethod(VALUES),
1389
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1390
+ entries: getIterationMethod(ENTRIES)
1391
+ };
1392
+ if (FORCED) for (KEY in methods) {
1393
+ if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1394
+ defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
1395
+ }
1396
+ } else $$2({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1397
+ }
2232
1398
 
2233
- var $TypeError = TypeError;
1399
+ // define iterator
1400
+ if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1401
+ defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1402
+ }
1403
+ Iterators$1[NAME] = defaultIterator;
2234
1404
 
2235
- // `Array.prototype.{ reduce, reduceRight }` methods implementation
2236
- var createMethod = function (IS_RIGHT) {
2237
- return function (that, callbackfn, argumentsLength, memo) {
2238
- var O = toObject$1(that);
2239
- var self = IndexedObject$1(O);
2240
- var length = lengthOfArrayLike(O);
2241
- aCallable(callbackfn);
2242
- var index = IS_RIGHT ? length - 1 : 0;
2243
- var i = IS_RIGHT ? -1 : 1;
2244
- if (argumentsLength < 2) while (true) {
2245
- if (index in self) {
2246
- memo = self[index];
2247
- index += i;
2248
- break;
2249
- }
2250
- index += i;
2251
- if (IS_RIGHT ? index < 0 : length <= index) {
2252
- throw new $TypeError('Reduce of empty array with no initial value');
2253
- }
2254
- }
2255
- for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
2256
- memo = callbackfn(memo, self[index], index, O);
2257
- }
2258
- return memo;
2259
- };
1405
+ return methods;
2260
1406
  };
2261
1407
 
2262
- var arrayReduce = {
2263
- // `Array.prototype.reduce` method
2264
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
2265
- left: createMethod(false),
2266
- // `Array.prototype.reduceRight` method
2267
- // https://tc39.es/ecma262/#sec-array.prototype.reduceright
2268
- right: createMethod(true)
1408
+ // `CreateIterResultObject` abstract operation
1409
+ // https://tc39.es/ecma262/#sec-createiterresultobject
1410
+ var createIterResultObject$1 = function (value, done) {
1411
+ return { value: value, done: done };
2269
1412
  };
2270
1413
 
2271
- var fails$1 = fails$i;
1414
+ var toIndexedObject = toIndexedObject$5;
1415
+ var addToUnscopables = addToUnscopables$1;
1416
+ var Iterators = iterators;
1417
+ var InternalStateModule = internalState;
1418
+ var defineProperty$1 = objectDefineProperty.f;
1419
+ var defineIterator = iteratorDefine;
1420
+ var createIterResultObject = createIterResultObject$1;
1421
+ var DESCRIPTORS$1 = descriptors;
1422
+
1423
+ var ARRAY_ITERATOR = 'Array Iterator';
1424
+ var setInternalState = InternalStateModule.set;
1425
+ var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
2272
1426
 
2273
- var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
2274
- var method = [][METHOD_NAME];
2275
- return !!method && fails$1(function () {
2276
- // eslint-disable-next-line no-useless-call -- required for testing
2277
- method.call(null, argument || function () { return 1; }, 1);
1427
+ // `Array.prototype.entries` method
1428
+ // https://tc39.es/ecma262/#sec-array.prototype.entries
1429
+ // `Array.prototype.keys` method
1430
+ // https://tc39.es/ecma262/#sec-array.prototype.keys
1431
+ // `Array.prototype.values` method
1432
+ // https://tc39.es/ecma262/#sec-array.prototype.values
1433
+ // `Array.prototype[@@iterator]` method
1434
+ // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
1435
+ // `CreateArrayIterator` internal method
1436
+ // https://tc39.es/ecma262/#sec-createarrayiterator
1437
+ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1438
+ setInternalState(this, {
1439
+ type: ARRAY_ITERATOR,
1440
+ target: toIndexedObject(iterated), // target
1441
+ index: 0, // next index
1442
+ kind: kind // kind
2278
1443
  });
2279
- };
1444
+ // `%ArrayIteratorPrototype%.next` method
1445
+ // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1446
+ }, function () {
1447
+ var state = getInternalState(this);
1448
+ var target = state.target;
1449
+ var index = state.index++;
1450
+ if (!target || index >= target.length) {
1451
+ state.target = undefined;
1452
+ return createIterResultObject(undefined, true);
1453
+ }
1454
+ switch (state.kind) {
1455
+ case 'keys': return createIterResultObject(index, false);
1456
+ case 'values': return createIterResultObject(target[index], false);
1457
+ } return createIterResultObject([index, target[index]], false);
1458
+ }, 'values');
2280
1459
 
2281
- var global$1 = global$g;
2282
- var classof = classofRaw$2;
1460
+ // argumentsList[@@iterator] is %ArrayProto_values%
1461
+ // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
1462
+ // https://tc39.es/ecma262/#sec-createmappedargumentsobject
1463
+ var values = Iterators.Arguments = Iterators.Array;
2283
1464
 
2284
- var engineIsNode = classof(global$1.process) === 'process';
1465
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1466
+ addToUnscopables('keys');
1467
+ addToUnscopables('values');
1468
+ addToUnscopables('entries');
2285
1469
 
2286
- var $$1 = _export;
2287
- var $reduce = arrayReduce.left;
2288
- var arrayMethodIsStrict = arrayMethodIsStrict$1;
2289
- var CHROME_VERSION = engineV8Version;
2290
- var IS_NODE = engineIsNode;
2291
-
2292
- // Chrome 80-82 has a critical bug
2293
- // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
2294
- var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
2295
- var FORCED = CHROME_BUG || !arrayMethodIsStrict('reduce');
2296
-
2297
- // `Array.prototype.reduce` method
2298
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
2299
- $$1({ target: 'Array', proto: true, forced: FORCED }, {
2300
- reduce: function reduce(callbackfn /* , initialValue */) {
2301
- var length = arguments.length;
2302
- return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
2303
- }
2304
- });
1470
+ // V8 ~ Chrome 45- bug
1471
+ if (DESCRIPTORS$1 && values.name !== 'values') try {
1472
+ defineProperty$1(values, 'name', { value: 'values' });
1473
+ } catch (error) { /* empty */ }
2305
1474
 
2306
1475
  var DESCRIPTORS = descriptors;
2307
- var uncurryThis = functionUncurryThis;
2308
- var call = functionCall;
2309
- var fails = fails$i;
1476
+ var uncurryThis$3 = functionUncurryThis;
1477
+ var call$2 = functionCall;
1478
+ var fails$1 = fails$c;
2310
1479
  var objectKeys = objectKeys$2;
2311
1480
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
2312
1481
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
2313
- var toObject = toObject$5;
1482
+ var toObject = toObject$3;
2314
1483
  var IndexedObject = indexedObject;
2315
1484
 
2316
1485
  // eslint-disable-next-line es/no-object-assign -- safe
2317
1486
  var $assign = Object.assign;
2318
1487
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
2319
1488
  var defineProperty = Object.defineProperty;
2320
- var concat = uncurryThis([].concat);
1489
+ var concat = uncurryThis$3([].concat);
2321
1490
 
2322
1491
  // `Object.assign` method
2323
1492
  // https://tc39.es/ecma262/#sec-object.assign
2324
- var objectAssign = !$assign || fails(function () {
1493
+ var objectAssign = !$assign || fails$1(function () {
2325
1494
  // should have correct order of operations (Edge bug)
2326
1495
  if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
2327
1496
  enumerable: true,
@@ -2355,247 +1524,174 @@ var objectAssign = !$assign || fails(function () {
2355
1524
  var key;
2356
1525
  while (length > j) {
2357
1526
  key = keys[j++];
2358
- if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
1527
+ if (!DESCRIPTORS || call$2(propertyIsEnumerable, S, key)) T[key] = S[key];
2359
1528
  }
2360
1529
  } return T;
2361
1530
  } : $assign;
2362
1531
 
2363
- var $ = _export;
2364
- var assign = objectAssign;
1532
+ var $$1 = _export;
1533
+ var assign = objectAssign;
1534
+
1535
+ // `Object.assign` method
1536
+ // https://tc39.es/ecma262/#sec-object.assign
1537
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1538
+ $$1({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1539
+ assign: assign
1540
+ });
1541
+
1542
+ // iterable DOM collections
1543
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1544
+ var domIterables = {
1545
+ CSSRuleList: 0,
1546
+ CSSStyleDeclaration: 0,
1547
+ CSSValueList: 0,
1548
+ ClientRectList: 0,
1549
+ DOMRectList: 0,
1550
+ DOMStringList: 0,
1551
+ DOMTokenList: 1,
1552
+ DataTransferItemList: 0,
1553
+ FileList: 0,
1554
+ HTMLAllCollection: 0,
1555
+ HTMLCollection: 0,
1556
+ HTMLFormElement: 0,
1557
+ HTMLSelectElement: 0,
1558
+ MediaList: 0,
1559
+ MimeTypeArray: 0,
1560
+ NamedNodeMap: 0,
1561
+ NodeList: 1,
1562
+ PaintRequestList: 0,
1563
+ Plugin: 0,
1564
+ PluginArray: 0,
1565
+ SVGLengthList: 0,
1566
+ SVGNumberList: 0,
1567
+ SVGPathSegList: 0,
1568
+ SVGPointList: 0,
1569
+ SVGStringList: 0,
1570
+ SVGTransformList: 0,
1571
+ SourceBufferList: 0,
1572
+ StyleSheetList: 0,
1573
+ TextTrackCueList: 0,
1574
+ TextTrackList: 0,
1575
+ TouchList: 0
1576
+ };
1577
+
1578
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1579
+ var documentCreateElement = documentCreateElement$2;
2365
1580
 
2366
- // `Object.assign` method
2367
- // https://tc39.es/ecma262/#sec-object.assign
2368
- // eslint-disable-next-line es/no-object-assign -- required for testing
2369
- $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
2370
- assign: assign
2371
- });
1581
+ var classList = documentCreateElement('span').classList;
1582
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
2372
1583
 
2373
- const widthClassMap = {
2374
- 1: 'col-span-1',
2375
- 2: 'col-span-2',
2376
- 3: 'col-span-3',
2377
- 4: 'col-span-4',
2378
- 5: 'col-span-5',
2379
- 6: 'col-span-6',
2380
- 7: 'col-span-7',
2381
- 8: 'col-span-8',
2382
- 9: 'col-span-9',
2383
- 10: 'col-span-10',
2384
- 11: 'col-span-11',
2385
- 12: 'col-span-12'
2386
- };
2387
- const statrClassMap = {
2388
- 1: 'col-start-1',
2389
- 2: 'col-start-2',
2390
- 3: 'col-start-3',
2391
- 4: 'col-start-4',
2392
- 5: 'col-start-5',
2393
- 6: 'col-start-6',
2394
- 7: 'col-start-7',
2395
- 8: 'col-start-8',
2396
- 9: 'col-start-9',
2397
- 10: 'col-start-10',
2398
- 11: 'col-start-11',
2399
- 12: 'col-start-12'
2400
- };
2401
- function getPageElementBound(rowsNodes) {
2402
- if (!rowsNodes) {
2403
- return [];
1584
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1585
+
1586
+ var global$1 = global$b;
1587
+ var DOMIterables = domIterables;
1588
+ var DOMTokenListPrototype = domTokenListPrototype;
1589
+ var ArrayIteratorMethods = es_array_iterator;
1590
+ var createNonEnumerableProperty = createNonEnumerableProperty$4;
1591
+ var setToStringTag = setToStringTag$3;
1592
+ var wellKnownSymbol$2 = wellKnownSymbol$8;
1593
+
1594
+ var ITERATOR = wellKnownSymbol$2('iterator');
1595
+ var ArrayValues = ArrayIteratorMethods.values;
1596
+
1597
+ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1598
+ if (CollectionPrototype) {
1599
+ // some Chrome versions have non-configurable methods on DOMTokenList
1600
+ if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1601
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
1602
+ } catch (error) {
1603
+ CollectionPrototype[ITERATOR] = ArrayValues;
1604
+ }
1605
+ setToStringTag(CollectionPrototype, COLLECTION_NAME, true);
1606
+ if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1607
+ // some Chrome versions have non-configurable methods on DOMTokenList
1608
+ if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1609
+ createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1610
+ } catch (error) {
1611
+ CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1612
+ }
1613
+ }
2404
1614
  }
2405
- return rowsNodes.map(row => {
2406
- const rowRect = row.getBoundingClientRect();
2407
- const columns = row.children;
2408
- return {
2409
- x: rowRect.x,
2410
- y: rowRect.y,
2411
- width: rowRect.width,
2412
- height: rowRect.height,
2413
- columns: Array.from(columns).map(column => {
2414
- const columnRect = column.getBoundingClientRect();
2415
- const containers = Array.from(column.querySelectorAll('[data-dot="container"]'));
2416
- const columnX = columnRect.left - rowRect.left;
2417
- const columnY = columnRect.top - rowRect.top;
2418
- return {
2419
- x: columnX,
2420
- y: columnY,
2421
- width: columnRect.width,
2422
- height: columnRect.height,
2423
- containers: containers.map(container => {
2424
- const containerRect = container.getBoundingClientRect();
2425
- const contentlets = Array.from(container.querySelectorAll('[data-dot="contentlet"]'));
2426
- return {
2427
- x: 0,
2428
- y: containerRect.y - rowRect.top,
2429
- width: containerRect.width,
2430
- height: containerRect.height,
2431
- payload: container.dataset.content,
2432
- contentlets: contentlets.map(contentlet => {
2433
- const contentletRect = contentlet.getBoundingClientRect();
2434
- return {
2435
- x: 0,
2436
- y: contentletRect.y - containerRect.y,
2437
- width: contentletRect.width,
2438
- height: contentletRect.height,
2439
- payload: contentlet.dataset.content
2440
- };
2441
- })
2442
- };
2443
- })
2444
- };
2445
- })
2446
- };
2447
- });
2448
- }
2449
- const getPageContainers = containers => {
2450
- return Object.keys(containers).reduce((acc, container) => {
2451
- const contentlets = containers[container].contentlets;
2452
- const contentletsKeys = Object.keys(contentlets);
2453
- contentletsKeys.forEach(key => {
2454
- var _containers$container;
2455
- acc.push({
2456
- identifier: (_containers$container = containers[container].container.path) != null ? _containers$container : containers[container].container.identifier,
2457
- uuid: key.replace('uuid-', ''),
2458
- contentletsId: contentlets[key].map(contentlet => contentlet.identifier)
2459
- });
2460
- });
2461
- return acc;
2462
- }, []);
2463
- };
2464
- const getContainersData = (containers, containerRef) => {
2465
- const {
2466
- identifier,
2467
- uuid
2468
- } = containerRef;
2469
- const {
2470
- containerStructures
2471
- } = containers[identifier];
2472
- // Get accepts types of content types for this container
2473
- const acceptTypes = containerStructures.map(structure => structure.contentTypeVar).join(',');
2474
- // Get the contentlets for "this" container
2475
- const contentlets = containers[identifier].contentlets[`uuid-${uuid}`];
2476
- const pageContainers = getPageContainers(containers);
2477
- return Object.assign({}, containers[identifier].container, {
2478
- acceptTypes,
2479
- contentlets,
2480
- pageContainers
2481
- });
2482
- };
2483
- const combineClasses = classes => classes.filter(Boolean).join(' ');
2484
- const getPositionStyleClasses = (width, leftOffset) => {
2485
- const widthClass = widthClassMap[width];
2486
- const startClass = statrClassMap[leftOffset];
2487
- return {
2488
- widthClass,
2489
- startClass
2490
- };
2491
1615
  };
2492
1616
 
2493
- /**
2494
- * `usePageEditor` is a custom React hook that sets up the page editor for a DotCMS page.
2495
- * It takes a `PageEditorOptions` object as a parameter and returns a reference to the rows of the page.
2496
- *
2497
- * This hook is the main brigde between your webapp and the dotcms page editor.
2498
- *
2499
- *
2500
- * @category Hooks
2501
- * @param {PageEditorOptions} props - The options for the page editor. Includes a `reloadFunction` and a `pathname`.
2502
- * @returns {{rowsRef: React.RefObject<HTMLDivElement>[], isInsideEditor: boolean}} - Returns a reference to the rows of the page and a boolean that indicates if the page is inside the editor.
2503
- * @throws {Error} - Throws an error if the `pathname` is not provided.
2504
- */
2505
- const usePageEditor = props => {
2506
- const {
2507
- reloadFunction = window.location.reload,
2508
- pathname = null
2509
- } = props;
2510
- if (!pathname) {
2511
- throw new Error('Dotcms page editor required the pathname of your webapp');
2512
- }
1617
+ for (var COLLECTION_NAME in DOMIterables) {
1618
+ handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
1619
+ }
1620
+
1621
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1622
+
1623
+ const useDotcmsEditor = ({
1624
+ pageContext,
1625
+ config
1626
+ }) => {
2513
1627
  const {
2514
- rowsRef,
2515
- isInsideEditor
2516
- } = useEventMessageHandler({
2517
- reload: reloadFunction
2518
- });
2519
- usePostUrlToEditor(pathname, isInsideEditor);
2520
- useScrollEvent(isInsideEditor);
2521
- return {
2522
- rowsRef,
2523
- isInsideEditor
2524
- };
2525
- };
2526
- function useEventMessageHandler({
2527
- reload = window.location.reload
2528
- }) {
2529
- const rows = useRef([]);
2530
- const [isInsideEditor, setIsInsideEditor] = useState(false);
1628
+ pathname,
1629
+ onReload,
1630
+ editor
1631
+ } = config;
1632
+ const [state, setState] = useState(Object.assign({}, pageContext, {
1633
+ isInsideEditor: false
1634
+ }));
1635
+ /**
1636
+ * Initializes the DotCMS editor.
1637
+ *
1638
+ */
2531
1639
  useEffect(() => {
2532
- // If the page is not inside an iframe we do nothing.
2533
- if (window.parent === window) return;
2534
- postMessageToEditor({
2535
- action: CUSTOMER_ACTIONS.PING_EDITOR // This is to let the editor know that the page is ready
1640
+ if (!isInsideEditor()) {
1641
+ return;
1642
+ }
1643
+ initEditor({
1644
+ pathname
2536
1645
  });
2537
- }, []);
1646
+ updateNavigation(pathname || '/');
1647
+ setState(prevState => Object.assign({}, prevState, {
1648
+ isInsideEditor: true
1649
+ }));
1650
+ return () => destroyEditor();
1651
+ }, [pathname]);
1652
+ /**
1653
+ * Reloads the page when changes are made in the editor.
1654
+ *
1655
+ */
2538
1656
  useEffect(() => {
2539
- function eventMessageHandler(event) {
2540
- if (!isInsideEditor) {
2541
- // Editor is telling us that we can set ourselves into edit mode
2542
- if (event.data === 'ema-editor-pong') {
2543
- setIsInsideEditor(true);
2544
- }
2545
- return;
2546
- }
2547
- switch (event.data) {
2548
- case 'ema-request-bounds':
2549
- {
2550
- const positionData = getPageElementBound(rows.current);
2551
- postMessageToEditor({
2552
- action: CUSTOMER_ACTIONS.SET_BOUNDS,
2553
- payload: positionData
2554
- });
2555
- break;
2556
- }
2557
- case 'ema-reload-page':
2558
- {
2559
- reload();
2560
- break;
2561
- }
2562
- }
1657
+ const insideEditor = isInsideEditor();
1658
+ const client = DotCmsClient.instance;
1659
+ if (!insideEditor || !onReload) {
1660
+ return;
2563
1661
  }
2564
- window.addEventListener('message', eventMessageHandler);
2565
- return () => {
2566
- window.removeEventListener('message', eventMessageHandler);
2567
- };
2568
- }, [rows, reload, isInsideEditor]);
2569
- return {
2570
- rowsRef: rows,
2571
- isInsideEditor
2572
- };
2573
- }
2574
- function useScrollEvent(isInsideEditor) {
1662
+ client.editor.on('changes', () => onReload == null ? void 0 : onReload());
1663
+ return () => client.editor.off('changes');
1664
+ }, [onReload]);
1665
+ /**
1666
+ * Sends a message to the editor when the client is ready.
1667
+ */
2575
1668
  useEffect(() => {
2576
- if (!isInsideEditor) return;
2577
- function eventScrollHandler() {
2578
- postMessageToEditor({
2579
- action: CUSTOMER_ACTIONS.IFRAME_SCROLL
2580
- });
1669
+ if (!isInsideEditor()) {
1670
+ return;
2581
1671
  }
2582
- window.addEventListener('scroll', eventScrollHandler);
2583
- return () => {
2584
- window.removeEventListener('scroll', eventScrollHandler);
2585
- };
2586
- }, [isInsideEditor]);
2587
- }
2588
- function usePostUrlToEditor(pathname, isInsideEditor) {
2589
- useEffect(() => {
2590
- if (!isInsideEditor) return;
2591
1672
  postMessageToEditor({
2592
- action: CUSTOMER_ACTIONS.SET_URL,
2593
- payload: {
2594
- url: pathname === '/' ? 'index' : pathname == null ? void 0 : pathname.replace('/', '')
2595
- }
1673
+ action: CUSTOMER_ACTIONS.CLIENT_READY,
1674
+ payload: editor
2596
1675
  });
2597
- }, [pathname, isInsideEditor]);
2598
- }
1676
+ }, [pathname]);
1677
+ /**
1678
+ * Updates the page asset when changes are made in the editor.
1679
+ */
1680
+ useEffect(() => {
1681
+ if (!isInsideEditor()) {
1682
+ return;
1683
+ }
1684
+ const client = DotCmsClient.instance;
1685
+ client.editor.on('changes', data => {
1686
+ const pageAsset = data;
1687
+ setState(state => Object.assign({}, state, {
1688
+ pageAsset
1689
+ }));
1690
+ });
1691
+ return () => client.editor.off('changes');
1692
+ }, []);
1693
+ return state;
1694
+ };
2599
1695
 
2600
1696
  const PageContext = /*#__PURE__*/createContext(null);
2601
1697
 
@@ -2609,11 +1705,11 @@ const PageContext = /*#__PURE__*/createContext(null);
2609
1705
  */
2610
1706
  function PageProvider(props) {
2611
1707
  const {
2612
- entity,
1708
+ pageContext,
2613
1709
  children
2614
1710
  } = props;
2615
1711
  return jsx(PageContext.Provider, {
2616
- value: entity,
1712
+ value: pageContext,
2617
1713
  children: children
2618
1714
  });
2619
1715
  }
@@ -2649,11 +1745,248 @@ var css_248z$1 = ".row-module_row__8V7Eh {\n display: grid;\n grid-templat
2649
1745
  var styles$1 = {"row":"row-module_row__8V7Eh"};
2650
1746
  styleInject(css_248z$1);
2651
1747
 
2652
- 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-span-1__vOPKg {\n grid-column: span 1 / span 1;\n}\n\n.column-module_col-span-2__qVdyn {\n grid-column: span 2 / span 2;\n}\n\n.column-module_col-span-3__brcdA {\n grid-column: span 3 / span 3;\n}\n\n.column-module_col-span-4__1-c-f {\n grid-column: span 4 / span 4;\n}\n\n.column-module_col-span-5__nAGLD {\n grid-column: span 5 / span 5;\n}\n\n.column-module_col-span-6__emtw7 {\n grid-column: span 6 / span 6;\n}\n\n.column-module_col-span-7__Ad5-V {\n grid-column: span 7 / span 7;\n}\n\n.column-module_col-span-8__gEnsA {\n grid-column: span 8 / span 8;\n}\n\n.column-module_col-span-9__jWemC {\n grid-column: span 9 / span 9;\n}\n\n.column-module_col-span-10__Dzuph {\n grid-column: span 10 / span 10;\n}\n\n.column-module_col-span-11__Xgct2 {\n grid-column: span 11 / span 11;\n}\n\n.column-module_col-span-12__LvJrY {\n grid-column: span 12 / span 12;\n}\n";
2653
- 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-span-1":"column-module_col-span-1__vOPKg","col-span-2":"column-module_col-span-2__qVdyn","col-span-3":"column-module_col-span-3__brcdA","col-span-4":"column-module_col-span-4__1-c-f","col-span-5":"column-module_col-span-5__nAGLD","col-span-6":"column-module_col-span-6__emtw7","col-span-7":"column-module_col-span-7__Ad5-V","col-span-8":"column-module_col-span-8__gEnsA","col-span-9":"column-module_col-span-9__jWemC","col-span-10":"column-module_col-span-10__Dzuph","col-span-11":"column-module_col-span-11__Xgct2","col-span-12":"column-module_col-span-12__LvJrY"};
1748
+ const endClassMap = {
1749
+ 1: 'col-end-1',
1750
+ 2: 'col-end-2',
1751
+ 3: 'col-end-3',
1752
+ 4: 'col-end-4',
1753
+ 5: 'col-end-5',
1754
+ 6: 'col-end-6',
1755
+ 7: 'col-end-7',
1756
+ 8: 'col-end-8',
1757
+ 9: 'col-end-9',
1758
+ 10: 'col-end-10',
1759
+ 11: 'col-end-11',
1760
+ 12: 'col-end-12',
1761
+ 13: 'col-end-13'
1762
+ };
1763
+ const startClassMap = {
1764
+ 1: 'col-start-1',
1765
+ 2: 'col-start-2',
1766
+ 3: 'col-start-3',
1767
+ 4: 'col-start-4',
1768
+ 5: 'col-start-5',
1769
+ 6: 'col-start-6',
1770
+ 7: 'col-start-7',
1771
+ 8: 'col-start-8',
1772
+ 9: 'col-start-9',
1773
+ 10: 'col-start-10',
1774
+ 11: 'col-start-11',
1775
+ 12: 'col-start-12'
1776
+ };
1777
+ const getContainersData = (containers, containerRef) => {
1778
+ const {
1779
+ identifier,
1780
+ uuid
1781
+ } = containerRef;
1782
+ const {
1783
+ containerStructures,
1784
+ container
1785
+ } = containers[identifier];
1786
+ // Get the variant id
1787
+ const {
1788
+ variantId
1789
+ } = (container == null ? void 0 : container.parentPermissionable) || {};
1790
+ // Get accepts types of content types for this container
1791
+ const acceptTypes = containerStructures.map(structure => structure.contentTypeVar).join(',');
1792
+ // Get the contentlets for "this" container
1793
+ const contentlets = containers[identifier].contentlets[`uuid-${uuid}`];
1794
+ return Object.assign({}, containers[identifier].container, {
1795
+ acceptTypes,
1796
+ contentlets,
1797
+ variantId
1798
+ });
1799
+ };
1800
+ const combineClasses = classes => classes.filter(Boolean).join(' ');
1801
+ const getPositionStyleClasses = (start, end) => {
1802
+ const startClass = startClassMap[start];
1803
+ const endClass = endClassMap[end];
1804
+ return {
1805
+ startClass,
1806
+ endClass
1807
+ };
1808
+ };
1809
+
1810
+ 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";
1811
+ 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"};
2654
1812
  styleInject(css_248z);
2655
1813
 
2656
- function NoContent({
1814
+ var NATIVE_BIND = functionBindNative;
1815
+
1816
+ var FunctionPrototype = Function.prototype;
1817
+ var apply$1 = FunctionPrototype.apply;
1818
+ var call$1 = FunctionPrototype.call;
1819
+
1820
+ // eslint-disable-next-line es/no-reflect -- safe
1821
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$1.bind(apply$1) : function () {
1822
+ return call$1.apply(apply$1, arguments);
1823
+ });
1824
+
1825
+ var uncurryThis$2 = functionUncurryThis;
1826
+
1827
+ var arraySlice$1 = uncurryThis$2([].slice);
1828
+
1829
+ var classof$3 = classofRaw$1;
1830
+
1831
+ // `IsArray` abstract operation
1832
+ // https://tc39.es/ecma262/#sec-isarray
1833
+ // eslint-disable-next-line es/no-array-isarray -- safe
1834
+ var isArray$1 = Array.isArray || function isArray(argument) {
1835
+ return classof$3(argument) === 'Array';
1836
+ };
1837
+
1838
+ var wellKnownSymbol$1 = wellKnownSymbol$8;
1839
+
1840
+ var TO_STRING_TAG$1 = wellKnownSymbol$1('toStringTag');
1841
+ var test = {};
1842
+
1843
+ test[TO_STRING_TAG$1] = 'z';
1844
+
1845
+ var toStringTagSupport = String(test) === '[object z]';
1846
+
1847
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1848
+ var isCallable$2 = isCallable$g;
1849
+ var classofRaw = classofRaw$1;
1850
+ var wellKnownSymbol = wellKnownSymbol$8;
1851
+
1852
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
1853
+ var $Object = Object;
1854
+
1855
+ // ES3 wrong here
1856
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
1857
+
1858
+ // fallback for IE11 Script Access Denied error
1859
+ var tryGet = function (it, key) {
1860
+ try {
1861
+ return it[key];
1862
+ } catch (error) { /* empty */ }
1863
+ };
1864
+
1865
+ // getting tag from ES6+ `Object.prototype.toString`
1866
+ var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1867
+ var O, tag, result;
1868
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1869
+ // @@toStringTag case
1870
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1871
+ // builtinTag case
1872
+ : CORRECT_ARGUMENTS ? classofRaw(O)
1873
+ // ES3 arguments fallback
1874
+ : (result = classofRaw(O)) === 'Object' && isCallable$2(O.callee) ? 'Arguments' : result;
1875
+ };
1876
+
1877
+ var classof$1 = classof$2;
1878
+
1879
+ var $String$1 = String;
1880
+
1881
+ var toString$1 = function (argument) {
1882
+ if (classof$1(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1883
+ return $String$1(argument);
1884
+ };
1885
+
1886
+ var uncurryThis$1 = functionUncurryThis;
1887
+ var isArray = isArray$1;
1888
+ var isCallable$1 = isCallable$g;
1889
+ var classof = classofRaw$1;
1890
+ var toString = toString$1;
1891
+
1892
+ var push = uncurryThis$1([].push);
1893
+
1894
+ var getJsonReplacerFunction = function (replacer) {
1895
+ if (isCallable$1(replacer)) return replacer;
1896
+ if (!isArray(replacer)) return;
1897
+ var rawLength = replacer.length;
1898
+ var keys = [];
1899
+ for (var i = 0; i < rawLength; i++) {
1900
+ var element = replacer[i];
1901
+ if (typeof element == 'string') push(keys, element);
1902
+ else if (typeof element == 'number' || classof(element) === 'Number' || classof(element) === 'String') push(keys, toString(element));
1903
+ }
1904
+ var keysLength = keys.length;
1905
+ var root = true;
1906
+ return function (key, value) {
1907
+ if (root) {
1908
+ root = false;
1909
+ return value;
1910
+ }
1911
+ if (isArray(this)) return value;
1912
+ for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;
1913
+ };
1914
+ };
1915
+
1916
+ var $ = _export;
1917
+ var getBuiltIn = getBuiltIn$4;
1918
+ var apply = functionApply;
1919
+ var call = functionCall;
1920
+ var uncurryThis = functionUncurryThis;
1921
+ var fails = fails$c;
1922
+ var isCallable = isCallable$g;
1923
+ var isSymbol = isSymbol$3;
1924
+ var arraySlice = arraySlice$1;
1925
+ var getReplacerFunction = getJsonReplacerFunction;
1926
+ var NATIVE_SYMBOL = symbolConstructorDetection;
1927
+
1928
+ var $String = String;
1929
+ var $stringify = getBuiltIn('JSON', 'stringify');
1930
+ var exec = uncurryThis(/./.exec);
1931
+ var charAt = uncurryThis(''.charAt);
1932
+ var charCodeAt = uncurryThis(''.charCodeAt);
1933
+ var replace = uncurryThis(''.replace);
1934
+ var numberToString = uncurryThis(1.0.toString);
1935
+
1936
+ var tester = /[\uD800-\uDFFF]/g;
1937
+ var low = /^[\uD800-\uDBFF]$/;
1938
+ var hi = /^[\uDC00-\uDFFF]$/;
1939
+
1940
+ var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails(function () {
1941
+ var symbol = getBuiltIn('Symbol')('stringify detection');
1942
+ // MS Edge converts symbol values to JSON as {}
1943
+ return $stringify([symbol]) !== '[null]'
1944
+ // WebKit converts symbol values to JSON as null
1945
+ || $stringify({ a: symbol }) !== '{}'
1946
+ // V8 throws on boxed symbols
1947
+ || $stringify(Object(symbol)) !== '{}';
1948
+ });
1949
+
1950
+ // https://github.com/tc39/proposal-well-formed-stringify
1951
+ var ILL_FORMED_UNICODE = fails(function () {
1952
+ return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
1953
+ || $stringify('\uDEAD') !== '"\\udead"';
1954
+ });
1955
+
1956
+ var stringifyWithSymbolsFix = function (it, replacer) {
1957
+ var args = arraySlice(arguments);
1958
+ var $replacer = getReplacerFunction(replacer);
1959
+ if (!isCallable($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined
1960
+ args[1] = function (key, value) {
1961
+ // some old implementations (like WebKit) could pass numbers as keys
1962
+ if (isCallable($replacer)) value = call($replacer, this, $String(key), value);
1963
+ if (!isSymbol(value)) return value;
1964
+ };
1965
+ return apply($stringify, null, args);
1966
+ };
1967
+
1968
+ var fixIllFormed = function (match, offset, string) {
1969
+ var prev = charAt(string, offset - 1);
1970
+ var next = charAt(string, offset + 1);
1971
+ if ((exec(low, match) && !exec(hi, next)) || (exec(hi, match) && !exec(low, prev))) {
1972
+ return '\\u' + numberToString(charCodeAt(match, 0), 16);
1973
+ } return match;
1974
+ };
1975
+
1976
+ if ($stringify) {
1977
+ // `JSON.stringify` method
1978
+ // https://tc39.es/ecma262/#sec-json.stringify
1979
+ $({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
1980
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
1981
+ stringify: function stringify(it, replacer, space) {
1982
+ var args = arraySlice(arguments);
1983
+ var result = apply(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);
1984
+ return ILL_FORMED_UNICODE && typeof result == 'string' ? replace(result, tester, fixIllFormed) : result;
1985
+ }
1986
+ });
1987
+ }
1988
+
1989
+ function NoComponent({
2657
1990
  contentType
2658
1991
  }) {
2659
1992
  return jsxs("div", {
@@ -2661,103 +1994,81 @@ function NoContent({
2661
1994
  children: ["No Component for ", contentType]
2662
1995
  });
2663
1996
  }
1997
+ function EmptyContent() {
1998
+ return null;
1999
+ }
2664
2000
  function Container({
2665
2001
  containerRef
2666
2002
  }) {
2667
- var _viewAs$persona;
2003
+ const {
2004
+ isInsideEditor
2005
+ } = useContext(PageContext);
2668
2006
  const {
2669
2007
  identifier,
2670
2008
  uuid
2671
2009
  } = containerRef;
2672
2010
  // Get the containers from the global context
2673
2011
  const {
2674
- containers,
2675
- page,
2676
- viewAs,
2677
- components,
2678
- isInsideEditor
2012
+ pageAsset: {
2013
+ containers
2014
+ },
2015
+ components
2679
2016
  } = useContext(PageContext);
2680
2017
  const {
2681
2018
  acceptTypes,
2682
2019
  contentlets,
2683
2020
  maxContentlets,
2684
- pageContainers,
2021
+ variantId,
2685
2022
  path
2686
2023
  } = getContainersData(containers, containerRef);
2687
- const contentletsId = contentlets.map(contentlet => contentlet.identifier);
2688
2024
  const container = {
2689
2025
  acceptTypes,
2690
- contentletsId,
2691
2026
  identifier: path != null ? path : identifier,
2692
2027
  maxContentlets,
2028
+ variantId,
2693
2029
  uuid
2694
2030
  };
2695
- const containerPayload = {
2696
- container,
2697
- language_id: viewAs.language.id,
2698
- pageContainers,
2699
- pageId: page.identifier,
2700
- personaTag: (_viewAs$persona = viewAs.persona) == null ? void 0 : _viewAs$persona.keyTag
2031
+ const containerStyles = contentlets.length ? undefined : {
2032
+ width: '100%',
2033
+ backgroundColor: '#ECF0FD',
2034
+ display: 'flex',
2035
+ justifyContent: 'center',
2036
+ alignItems: 'center',
2037
+ color: '#030E32',
2038
+ height: '10rem'
2701
2039
  };
2702
- function onPointerEnterHandler(e) {
2703
- var _target$dataset$conte;
2704
- let target = e.target;
2705
- if (target.dataset.dot !== 'contentlet') {
2706
- target = target.closest('[data-dot="contentlet"]');
2707
- }
2708
- if (!target) {
2709
- return;
2710
- }
2711
- const {
2712
- x,
2713
- y,
2714
- width,
2715
- height
2716
- } = target.getBoundingClientRect();
2717
- const contentletPayload = JSON.parse((_target$dataset$conte = target.dataset.content) != null ? _target$dataset$conte : '{}');
2718
- postMessageToEditor({
2719
- action: CUSTOMER_ACTIONS.SET_CONTENTLET,
2720
- payload: {
2721
- x,
2722
- y,
2723
- width,
2724
- height,
2725
- payload: contentletPayload
2726
- }
2727
- });
2728
- }
2729
- const renderContentlets = contentlets.map(contentlet => {
2730
- var _viewAs$persona2;
2731
- const Component = components[contentlet.contentType] || NoContent;
2732
- const contentletPayload = {
2733
- container,
2734
- contentlet: {
2735
- identifier: contentlet.identifier,
2736
- title: contentlet.widgetTitle || contentlet.title,
2737
- inode: contentlet.inode
2738
- },
2739
- language_id: viewAs.language.id,
2740
- pageContainers,
2741
- pageId: page.identifier,
2742
- personaTag: (_viewAs$persona2 = viewAs.persona) == null ? void 0 : _viewAs$persona2.keyTag
2743
- };
2040
+ const ContainerChildren = contentlets.map(contentlet => {
2041
+ const ContentTypeComponent = components[contentlet.contentType];
2042
+ const DefaultComponent = components['CustomNoComponent'] || NoComponent;
2043
+ const Component = isInsideEditor ? ContentTypeComponent || DefaultComponent : ContentTypeComponent || EmptyContent;
2744
2044
  return isInsideEditor ? jsx("div", {
2745
- onPointerEnter: onPointerEnterHandler,
2746
- "data-dot": "contentlet",
2747
- "data-content": JSON.stringify(contentletPayload),
2045
+ "data-testid": "dot-contentlet",
2046
+ "data-dot-object": "contentlet",
2047
+ "data-dot-identifier": contentlet.identifier,
2048
+ "data-dot-basetype": contentlet.baseType,
2049
+ "data-dot-title": contentlet.widgetTitle || contentlet.title,
2050
+ "data-dot-inode": contentlet.inode,
2051
+ "data-dot-type": contentlet.contentType,
2052
+ "data-dot-container": JSON.stringify(container),
2053
+ "data-dot-on-number-of-pages": contentlet.onNumberOfPages,
2748
2054
  children: jsx(Component, Object.assign({}, contentlet))
2749
2055
  }, contentlet.identifier) : ( /*#__PURE__*/createElement$1(Component, Object.assign({}, contentlet, {
2750
2056
  key: contentlet.identifier
2751
2057
  })));
2752
2058
  });
2753
2059
  return isInsideEditor ? jsx("div", {
2754
- "data-dot": "container",
2755
- "data-content": JSON.stringify(containerPayload),
2756
- children: renderContentlets
2060
+ "data-testid": "dot-container",
2061
+ "data-dot-object": "container",
2062
+ "data-dot-accept-types": acceptTypes,
2063
+ "data-dot-identifier": path != null ? path : identifier,
2064
+ "data-max-contentlets": maxContentlets,
2065
+ "data-dot-uuid": uuid,
2066
+ style: containerStyles,
2067
+ children: ContainerChildren.length ? ContainerChildren : 'This container is empty.'
2757
2068
  }) :
2758
2069
  // eslint-disable-next-line react/jsx-no-useless-fragment
2759
2070
  jsx(Fragment, {
2760
- children: renderContentlets
2071
+ children: ContainerChildren
2761
2072
  });
2762
2073
  }
2763
2074
 
@@ -2768,10 +2079,10 @@ function Column({
2768
2079
  isInsideEditor
2769
2080
  } = useContext(PageContext);
2770
2081
  const {
2771
- widthClass,
2772
- startClass
2773
- } = getPositionStyleClasses(column.width, column.leftOffset);
2774
- const combinedClasses = combineClasses([styles[widthClass], styles[startClass], column.styleClass]);
2082
+ startClass,
2083
+ endClass
2084
+ } = getPositionStyleClasses(column.leftOffset, column.width + column.leftOffset);
2085
+ const combinedClasses = combineClasses([styles[endClass], styles[startClass], column.styleClass]);
2775
2086
  const columnProps = isInsideEditor ? {
2776
2087
  'data-dot': 'column',
2777
2088
  'data-testid': 'column'
@@ -2820,24 +2131,12 @@ const Row = /*#__PURE__*/forwardRef((props, ref) => {
2820
2131
  * @param {DotcmsPageProps} props - The properties for the DotCMS page.
2821
2132
  * @returns {JSX.Element} - A JSX element that represents the layout for a DotCMS page.
2822
2133
  */
2823
- function DotcmsLayout(props) {
2824
- const {
2825
- entity
2826
- } = props;
2827
- const {
2828
- rowsRef,
2829
- isInsideEditor
2830
- } = usePageEditor({});
2831
- const addRowRef = el => {
2832
- if (el && !rowsRef.current.includes(el)) {
2833
- rowsRef.current.push(el);
2834
- }
2835
- };
2836
- entity.isInsideEditor = isInsideEditor;
2134
+ function DotcmsLayout(dotPageProps) {
2135
+ var _pageContext$pageAsse;
2136
+ const pageContext = useDotcmsEditor(dotPageProps);
2837
2137
  return jsx(PageProvider, {
2838
- entity: entity,
2839
- children: entity.layout.body.rows.map((row, index) => jsx(Row, {
2840
- ref: addRowRef,
2138
+ pageContext: pageContext,
2139
+ children: (_pageContext$pageAsse = pageContext.pageAsset) == null || (_pageContext$pageAsse = _pageContext$pageAsse.layout) == null ? void 0 : _pageContext$pageAsse.body.rows.map((row, index) => jsx(Row, {
2841
2140
  row: row
2842
2141
  }, index))
2843
2142
  });
@@ -2848,10 +2147,10 @@ function DotcmsLayout(props) {
2848
2147
  * It takes no parameters and returns the context value or `null` if it's not available.
2849
2148
  *
2850
2149
  * @category Hooks
2851
- * @returns {PageProviderContext | null} - The context value or `null` if it's not available.
2150
+ * @returns {DotCMSPageContext | null} - The context value or `null` if it's not available.
2852
2151
  */
2853
2152
  function useDotcmsPageContext() {
2854
2153
  return useContext(PageContext);
2855
2154
  }
2856
2155
 
2857
- export { DotcmsLayout, PageProvider, Row, useDotcmsPageContext, usePageEditor };
2156
+ export { DotcmsLayout, PageProvider, Row, useDotcmsPageContext };