UNPKG

61.6 kBJavaScriptView Raw
1(function (global, factory) {
2 typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
3 typeof define === 'function' && define.amd ? define(['jquery'], factory) :
4 (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
5})(this, (function ($$4) { 'use strict';
6
7 function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
9 var $__default = /*#__PURE__*/_interopDefaultLegacy($$4);
10
11 var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
12
13 var check = function (it) {
14 return it && it.Math == Math && it;
15 };
16
17 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
18 var global$b =
19 // eslint-disable-next-line es-x/no-global-this -- safe
20 check(typeof globalThis == 'object' && globalThis) ||
21 check(typeof window == 'object' && window) ||
22 // eslint-disable-next-line no-restricted-globals -- safe
23 check(typeof self == 'object' && self) ||
24 check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
25 // eslint-disable-next-line no-new-func -- fallback
26 (function () { return this; })() || Function('return this')();
27
28 var objectGetOwnPropertyDescriptor = {};
29
30 var fails$c = function (exec) {
31 try {
32 return !!exec();
33 } catch (error) {
34 return true;
35 }
36 };
37
38 var fails$b = fails$c;
39
40 // Detect IE8's incomplete defineProperty implementation
41 var descriptors = !fails$b(function () {
42 // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
43 return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
44 });
45
46 var fails$a = fails$c;
47
48 var functionBindNative = !fails$a(function () {
49 // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
50 var test = (function () { /* empty */ }).bind();
51 // eslint-disable-next-line no-prototype-builtins -- safe
52 return typeof test != 'function' || test.hasOwnProperty('prototype');
53 });
54
55 var NATIVE_BIND$2 = functionBindNative;
56
57 var call$4 = Function.prototype.call;
58
59 var functionCall = NATIVE_BIND$2 ? call$4.bind(call$4) : function () {
60 return call$4.apply(call$4, arguments);
61 };
62
63 var objectPropertyIsEnumerable = {};
64
65 var $propertyIsEnumerable = {}.propertyIsEnumerable;
66 // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
67 var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
68
69 // Nashorn ~ JDK8 bug
70 var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
71
72 // `Object.prototype.propertyIsEnumerable` method implementation
73 // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
74 objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
75 var descriptor = getOwnPropertyDescriptor$1(this, V);
76 return !!descriptor && descriptor.enumerable;
77 } : $propertyIsEnumerable;
78
79 var createPropertyDescriptor$3 = function (bitmap, value) {
80 return {
81 enumerable: !(bitmap & 1),
82 configurable: !(bitmap & 2),
83 writable: !(bitmap & 4),
84 value: value
85 };
86 };
87
88 var NATIVE_BIND$1 = functionBindNative;
89
90 var FunctionPrototype$1 = Function.prototype;
91 var bind$2 = FunctionPrototype$1.bind;
92 var call$3 = FunctionPrototype$1.call;
93 var uncurryThis$g = NATIVE_BIND$1 && bind$2.bind(call$3, call$3);
94
95 var functionUncurryThis = NATIVE_BIND$1 ? function (fn) {
96 return fn && uncurryThis$g(fn);
97 } : function (fn) {
98 return fn && function () {
99 return call$3.apply(fn, arguments);
100 };
101 };
102
103 var uncurryThis$f = functionUncurryThis;
104
105 var toString$5 = uncurryThis$f({}.toString);
106 var stringSlice = uncurryThis$f(''.slice);
107
108 var classofRaw$1 = function (it) {
109 return stringSlice(toString$5(it), 8, -1);
110 };
111
112 var uncurryThis$e = functionUncurryThis;
113 var fails$9 = fails$c;
114 var classof$5 = classofRaw$1;
115
116 var $Object$3 = Object;
117 var split = uncurryThis$e(''.split);
118
119 // fallback for non-array-like ES3 and non-enumerable old V8 strings
120 var indexedObject = fails$9(function () {
121 // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
122 // eslint-disable-next-line no-prototype-builtins -- safe
123 return !$Object$3('z').propertyIsEnumerable(0);
124 }) ? function (it) {
125 return classof$5(it) == 'String' ? split(it, '') : $Object$3(it);
126 } : $Object$3;
127
128 var $TypeError$5 = TypeError;
129
130 // `RequireObjectCoercible` abstract operation
131 // https://tc39.es/ecma262/#sec-requireobjectcoercible
132 var requireObjectCoercible$3 = function (it) {
133 if (it == undefined) throw $TypeError$5("Can't call method on " + it);
134 return it;
135 };
136
137 // toObject with fallback for non-array-like ES3 strings
138 var IndexedObject$1 = indexedObject;
139 var requireObjectCoercible$2 = requireObjectCoercible$3;
140
141 var toIndexedObject$4 = function (it) {
142 return IndexedObject$1(requireObjectCoercible$2(it));
143 };
144
145 // `IsCallable` abstract operation
146 // https://tc39.es/ecma262/#sec-iscallable
147 var isCallable$c = function (argument) {
148 return typeof argument == 'function';
149 };
150
151 var isCallable$b = isCallable$c;
152
153 var isObject$7 = function (it) {
154 return typeof it == 'object' ? it !== null : isCallable$b(it);
155 };
156
157 var global$a = global$b;
158 var isCallable$a = isCallable$c;
159
160 var aFunction = function (argument) {
161 return isCallable$a(argument) ? argument : undefined;
162 };
163
164 var getBuiltIn$4 = function (namespace, method) {
165 return arguments.length < 2 ? aFunction(global$a[namespace]) : global$a[namespace] && global$a[namespace][method];
166 };
167
168 var uncurryThis$d = functionUncurryThis;
169
170 var objectIsPrototypeOf = uncurryThis$d({}.isPrototypeOf);
171
172 var getBuiltIn$3 = getBuiltIn$4;
173
174 var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
175
176 var global$9 = global$b;
177 var userAgent = engineUserAgent;
178
179 var process = global$9.process;
180 var Deno = global$9.Deno;
181 var versions = process && process.versions || Deno && Deno.version;
182 var v8 = versions && versions.v8;
183 var match, version;
184
185 if (v8) {
186 match = v8.split('.');
187 // in old Chrome, versions of V8 isn't V8 = Chrome / 10
188 // but their correct versions are not interesting for us
189 version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
190 }
191
192 // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
193 // so check `userAgent` even if `.v8` exists, but 0
194 if (!version && userAgent) {
195 match = userAgent.match(/Edge\/(\d+)/);
196 if (!match || match[1] >= 74) {
197 match = userAgent.match(/Chrome\/(\d+)/);
198 if (match) version = +match[1];
199 }
200 }
201
202 var engineV8Version = version;
203
204 /* eslint-disable es-x/no-symbol -- required for testing */
205
206 var V8_VERSION$1 = engineV8Version;
207 var fails$8 = fails$c;
208
209 // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
210 var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$8(function () {
211 var symbol = Symbol();
212 // Chrome 38 Symbol has incorrect toString conversion
213 // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
214 return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
215 // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
216 !Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41;
217 });
218
219 /* eslint-disable es-x/no-symbol -- required for testing */
220
221 var NATIVE_SYMBOL$1 = nativeSymbol;
222
223 var useSymbolAsUid = NATIVE_SYMBOL$1
224 && !Symbol.sham
225 && typeof Symbol.iterator == 'symbol';
226
227 var getBuiltIn$2 = getBuiltIn$4;
228 var isCallable$9 = isCallable$c;
229 var isPrototypeOf = objectIsPrototypeOf;
230 var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
231
232 var $Object$2 = Object;
233
234 var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
235 return typeof it == 'symbol';
236 } : function (it) {
237 var $Symbol = getBuiltIn$2('Symbol');
238 return isCallable$9($Symbol) && isPrototypeOf($Symbol.prototype, $Object$2(it));
239 };
240
241 var $String$2 = String;
242
243 var tryToString$1 = function (argument) {
244 try {
245 return $String$2(argument);
246 } catch (error) {
247 return 'Object';
248 }
249 };
250
251 var isCallable$8 = isCallable$c;
252 var tryToString = tryToString$1;
253
254 var $TypeError$4 = TypeError;
255
256 // `Assert: IsCallable(argument) is true`
257 var aCallable$2 = function (argument) {
258 if (isCallable$8(argument)) return argument;
259 throw $TypeError$4(tryToString(argument) + ' is not a function');
260 };
261
262 var aCallable$1 = aCallable$2;
263
264 // `GetMethod` abstract operation
265 // https://tc39.es/ecma262/#sec-getmethod
266 var getMethod$1 = function (V, P) {
267 var func = V[P];
268 return func == null ? undefined : aCallable$1(func);
269 };
270
271 var call$2 = functionCall;
272 var isCallable$7 = isCallable$c;
273 var isObject$6 = isObject$7;
274
275 var $TypeError$3 = TypeError;
276
277 // `OrdinaryToPrimitive` abstract operation
278 // https://tc39.es/ecma262/#sec-ordinarytoprimitive
279 var ordinaryToPrimitive$1 = function (input, pref) {
280 var fn, val;
281 if (pref === 'string' && isCallable$7(fn = input.toString) && !isObject$6(val = call$2(fn, input))) return val;
282 if (isCallable$7(fn = input.valueOf) && !isObject$6(val = call$2(fn, input))) return val;
283 if (pref !== 'string' && isCallable$7(fn = input.toString) && !isObject$6(val = call$2(fn, input))) return val;
284 throw $TypeError$3("Can't convert object to primitive value");
285 };
286
287 var shared$3 = {exports: {}};
288
289 var global$8 = global$b;
290
291 // eslint-disable-next-line es-x/no-object-defineproperty -- safe
292 var defineProperty$1 = Object.defineProperty;
293
294 var defineGlobalProperty$3 = function (key, value) {
295 try {
296 defineProperty$1(global$8, key, { value: value, configurable: true, writable: true });
297 } catch (error) {
298 global$8[key] = value;
299 } return value;
300 };
301
302 var global$7 = global$b;
303 var defineGlobalProperty$2 = defineGlobalProperty$3;
304
305 var SHARED = '__core-js_shared__';
306 var store$3 = global$7[SHARED] || defineGlobalProperty$2(SHARED, {});
307
308 var sharedStore = store$3;
309
310 var store$2 = sharedStore;
311
312 (shared$3.exports = function (key, value) {
313 return store$2[key] || (store$2[key] = value !== undefined ? value : {});
314 })('versions', []).push({
315 version: '3.22.8',
316 mode: 'global',
317 copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
318 license: 'https://github.com/zloirock/core-js/blob/v3.22.8/LICENSE',
319 source: 'https://github.com/zloirock/core-js'
320 });
321
322 var requireObjectCoercible$1 = requireObjectCoercible$3;
323
324 var $Object$1 = Object;
325
326 // `ToObject` abstract operation
327 // https://tc39.es/ecma262/#sec-toobject
328 var toObject$2 = function (argument) {
329 return $Object$1(requireObjectCoercible$1(argument));
330 };
331
332 var uncurryThis$c = functionUncurryThis;
333 var toObject$1 = toObject$2;
334
335 var hasOwnProperty = uncurryThis$c({}.hasOwnProperty);
336
337 // `HasOwnProperty` abstract operation
338 // https://tc39.es/ecma262/#sec-hasownproperty
339 // eslint-disable-next-line es-x/no-object-hasown -- safe
340 var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
341 return hasOwnProperty(toObject$1(it), key);
342 };
343
344 var uncurryThis$b = functionUncurryThis;
345
346 var id = 0;
347 var postfix = Math.random();
348 var toString$4 = uncurryThis$b(1.0.toString);
349
350 var uid$2 = function (key) {
351 return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
352 };
353
354 var global$6 = global$b;
355 var shared$2 = shared$3.exports;
356 var hasOwn$6 = hasOwnProperty_1;
357 var uid$1 = uid$2;
358 var NATIVE_SYMBOL = nativeSymbol;
359 var USE_SYMBOL_AS_UID = useSymbolAsUid;
360
361 var WellKnownSymbolsStore = shared$2('wks');
362 var Symbol$2 = global$6.Symbol;
363 var symbolFor = Symbol$2 && Symbol$2['for'];
364 var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
365
366 var wellKnownSymbol$6 = function (name) {
367 if (!hasOwn$6(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
368 var description = 'Symbol.' + name;
369 if (NATIVE_SYMBOL && hasOwn$6(Symbol$2, name)) {
370 WellKnownSymbolsStore[name] = Symbol$2[name];
371 } else if (USE_SYMBOL_AS_UID && symbolFor) {
372 WellKnownSymbolsStore[name] = symbolFor(description);
373 } else {
374 WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
375 }
376 } return WellKnownSymbolsStore[name];
377 };
378
379 var call$1 = functionCall;
380 var isObject$5 = isObject$7;
381 var isSymbol$1 = isSymbol$2;
382 var getMethod = getMethod$1;
383 var ordinaryToPrimitive = ordinaryToPrimitive$1;
384 var wellKnownSymbol$5 = wellKnownSymbol$6;
385
386 var $TypeError$2 = TypeError;
387 var TO_PRIMITIVE = wellKnownSymbol$5('toPrimitive');
388
389 // `ToPrimitive` abstract operation
390 // https://tc39.es/ecma262/#sec-toprimitive
391 var toPrimitive$1 = function (input, pref) {
392 if (!isObject$5(input) || isSymbol$1(input)) return input;
393 var exoticToPrim = getMethod(input, TO_PRIMITIVE);
394 var result;
395 if (exoticToPrim) {
396 if (pref === undefined) pref = 'default';
397 result = call$1(exoticToPrim, input, pref);
398 if (!isObject$5(result) || isSymbol$1(result)) return result;
399 throw $TypeError$2("Can't convert object to primitive value");
400 }
401 if (pref === undefined) pref = 'number';
402 return ordinaryToPrimitive(input, pref);
403 };
404
405 var toPrimitive = toPrimitive$1;
406 var isSymbol = isSymbol$2;
407
408 // `ToPropertyKey` abstract operation
409 // https://tc39.es/ecma262/#sec-topropertykey
410 var toPropertyKey$3 = function (argument) {
411 var key = toPrimitive(argument, 'string');
412 return isSymbol(key) ? key : key + '';
413 };
414
415 var global$5 = global$b;
416 var isObject$4 = isObject$7;
417
418 var document = global$5.document;
419 // typeof document.createElement is 'object' in old IE
420 var EXISTS$1 = isObject$4(document) && isObject$4(document.createElement);
421
422 var documentCreateElement = function (it) {
423 return EXISTS$1 ? document.createElement(it) : {};
424 };
425
426 var DESCRIPTORS$6 = descriptors;
427 var fails$7 = fails$c;
428 var createElement = documentCreateElement;
429
430 // Thanks to IE8 for its funny defineProperty
431 var ie8DomDefine = !DESCRIPTORS$6 && !fails$7(function () {
432 // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
433 return Object.defineProperty(createElement('div'), 'a', {
434 get: function () { return 7; }
435 }).a != 7;
436 });
437
438 var DESCRIPTORS$5 = descriptors;
439 var call = functionCall;
440 var propertyIsEnumerableModule = objectPropertyIsEnumerable;
441 var createPropertyDescriptor$2 = createPropertyDescriptor$3;
442 var toIndexedObject$3 = toIndexedObject$4;
443 var toPropertyKey$2 = toPropertyKey$3;
444 var hasOwn$5 = hasOwnProperty_1;
445 var IE8_DOM_DEFINE$1 = ie8DomDefine;
446
447 // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
448 var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
449
450 // `Object.getOwnPropertyDescriptor` method
451 // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
452 objectGetOwnPropertyDescriptor.f = DESCRIPTORS$5 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
453 O = toIndexedObject$3(O);
454 P = toPropertyKey$2(P);
455 if (IE8_DOM_DEFINE$1) try {
456 return $getOwnPropertyDescriptor$1(O, P);
457 } catch (error) { /* empty */ }
458 if (hasOwn$5(O, P)) return createPropertyDescriptor$2(!call(propertyIsEnumerableModule.f, O, P), O[P]);
459 };
460
461 var objectDefineProperty = {};
462
463 var DESCRIPTORS$4 = descriptors;
464 var fails$6 = fails$c;
465
466 // V8 ~ Chrome 36-
467 // https://bugs.chromium.org/p/v8/issues/detail?id=3334
468 var v8PrototypeDefineBug = DESCRIPTORS$4 && fails$6(function () {
469 // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
470 return Object.defineProperty(function () { /* empty */ }, 'prototype', {
471 value: 42,
472 writable: false
473 }).prototype != 42;
474 });
475
476 var isObject$3 = isObject$7;
477
478 var $String$1 = String;
479 var $TypeError$1 = TypeError;
480
481 // `Assert: Type(argument) is Object`
482 var anObject$2 = function (argument) {
483 if (isObject$3(argument)) return argument;
484 throw $TypeError$1($String$1(argument) + ' is not an object');
485 };
486
487 var DESCRIPTORS$3 = descriptors;
488 var IE8_DOM_DEFINE = ie8DomDefine;
489 var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
490 var anObject$1 = anObject$2;
491 var toPropertyKey$1 = toPropertyKey$3;
492
493 var $TypeError = TypeError;
494 // eslint-disable-next-line es-x/no-object-defineproperty -- safe
495 var $defineProperty = Object.defineProperty;
496 // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
497 var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
498 var ENUMERABLE = 'enumerable';
499 var CONFIGURABLE$1 = 'configurable';
500 var WRITABLE = 'writable';
501
502 // `Object.defineProperty` method
503 // https://tc39.es/ecma262/#sec-object.defineproperty
504 objectDefineProperty.f = DESCRIPTORS$3 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
505 anObject$1(O);
506 P = toPropertyKey$1(P);
507 anObject$1(Attributes);
508 if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
509 var current = $getOwnPropertyDescriptor(O, P);
510 if (current && current[WRITABLE]) {
511 O[P] = Attributes.value;
512 Attributes = {
513 configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
514 enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
515 writable: false
516 };
517 }
518 } return $defineProperty(O, P, Attributes);
519 } : $defineProperty : function defineProperty(O, P, Attributes) {
520 anObject$1(O);
521 P = toPropertyKey$1(P);
522 anObject$1(Attributes);
523 if (IE8_DOM_DEFINE) try {
524 return $defineProperty(O, P, Attributes);
525 } catch (error) { /* empty */ }
526 if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');
527 if ('value' in Attributes) O[P] = Attributes.value;
528 return O;
529 };
530
531 var DESCRIPTORS$2 = descriptors;
532 var definePropertyModule$2 = objectDefineProperty;
533 var createPropertyDescriptor$1 = createPropertyDescriptor$3;
534
535 var createNonEnumerableProperty$3 = DESCRIPTORS$2 ? function (object, key, value) {
536 return definePropertyModule$2.f(object, key, createPropertyDescriptor$1(1, value));
537 } : function (object, key, value) {
538 object[key] = value;
539 return object;
540 };
541
542 var makeBuiltIn$2 = {exports: {}};
543
544 var DESCRIPTORS$1 = descriptors;
545 var hasOwn$4 = hasOwnProperty_1;
546
547 var FunctionPrototype = Function.prototype;
548 // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
549 var getDescriptor = DESCRIPTORS$1 && Object.getOwnPropertyDescriptor;
550
551 var EXISTS = hasOwn$4(FunctionPrototype, 'name');
552 // additional protection from minified / mangled / dropped function names
553 var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
554 var CONFIGURABLE = EXISTS && (!DESCRIPTORS$1 || (DESCRIPTORS$1 && getDescriptor(FunctionPrototype, 'name').configurable));
555
556 var functionName = {
557 EXISTS: EXISTS,
558 PROPER: PROPER,
559 CONFIGURABLE: CONFIGURABLE
560 };
561
562 var uncurryThis$a = functionUncurryThis;
563 var isCallable$6 = isCallable$c;
564 var store$1 = sharedStore;
565
566 var functionToString = uncurryThis$a(Function.toString);
567
568 // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
569 if (!isCallable$6(store$1.inspectSource)) {
570 store$1.inspectSource = function (it) {
571 return functionToString(it);
572 };
573 }
574
575 var inspectSource$3 = store$1.inspectSource;
576
577 var global$4 = global$b;
578 var isCallable$5 = isCallable$c;
579 var inspectSource$2 = inspectSource$3;
580
581 var WeakMap$1 = global$4.WeakMap;
582
583 var nativeWeakMap = isCallable$5(WeakMap$1) && /native code/.test(inspectSource$2(WeakMap$1));
584
585 var shared$1 = shared$3.exports;
586 var uid = uid$2;
587
588 var keys = shared$1('keys');
589
590 var sharedKey$1 = function (key) {
591 return keys[key] || (keys[key] = uid(key));
592 };
593
594 var hiddenKeys$3 = {};
595
596 var NATIVE_WEAK_MAP = nativeWeakMap;
597 var global$3 = global$b;
598 var uncurryThis$9 = functionUncurryThis;
599 var isObject$2 = isObject$7;
600 var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
601 var hasOwn$3 = hasOwnProperty_1;
602 var shared = sharedStore;
603 var sharedKey = sharedKey$1;
604 var hiddenKeys$2 = hiddenKeys$3;
605
606 var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
607 var TypeError$1 = global$3.TypeError;
608 var WeakMap = global$3.WeakMap;
609 var set, get, has;
610
611 var enforce = function (it) {
612 return has(it) ? get(it) : set(it, {});
613 };
614
615 var getterFor = function (TYPE) {
616 return function (it) {
617 var state;
618 if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
619 throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
620 } return state;
621 };
622 };
623
624 if (NATIVE_WEAK_MAP || shared.state) {
625 var store = shared.state || (shared.state = new WeakMap());
626 var wmget = uncurryThis$9(store.get);
627 var wmhas = uncurryThis$9(store.has);
628 var wmset = uncurryThis$9(store.set);
629 set = function (it, metadata) {
630 if (wmhas(store, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
631 metadata.facade = it;
632 wmset(store, it, metadata);
633 return metadata;
634 };
635 get = function (it) {
636 return wmget(store, it) || {};
637 };
638 has = function (it) {
639 return wmhas(store, it);
640 };
641 } else {
642 var STATE = sharedKey('state');
643 hiddenKeys$2[STATE] = true;
644 set = function (it, metadata) {
645 if (hasOwn$3(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
646 metadata.facade = it;
647 createNonEnumerableProperty$2(it, STATE, metadata);
648 return metadata;
649 };
650 get = function (it) {
651 return hasOwn$3(it, STATE) ? it[STATE] : {};
652 };
653 has = function (it) {
654 return hasOwn$3(it, STATE);
655 };
656 }
657
658 var internalState = {
659 set: set,
660 get: get,
661 has: has,
662 enforce: enforce,
663 getterFor: getterFor
664 };
665
666 var fails$5 = fails$c;
667 var isCallable$4 = isCallable$c;
668 var hasOwn$2 = hasOwnProperty_1;
669 var DESCRIPTORS = descriptors;
670 var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
671 var inspectSource$1 = inspectSource$3;
672 var InternalStateModule = internalState;
673
674 var enforceInternalState = InternalStateModule.enforce;
675 var getInternalState = InternalStateModule.get;
676 // eslint-disable-next-line es-x/no-object-defineproperty -- safe
677 var defineProperty = Object.defineProperty;
678
679 var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails$5(function () {
680 return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
681 });
682
683 var TEMPLATE = String(String).split('String');
684
685 var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
686 if (String(name).slice(0, 7) === 'Symbol(') {
687 name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
688 }
689 if (options && options.getter) name = 'get ' + name;
690 if (options && options.setter) name = 'set ' + name;
691 if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
692 defineProperty(value, 'name', { value: name, configurable: true });
693 }
694 if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) {
695 defineProperty(value, 'length', { value: options.arity });
696 }
697 try {
698 if (options && hasOwn$2(options, 'constructor') && options.constructor) {
699 if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
700 // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
701 } else if (value.prototype) value.prototype = undefined;
702 } catch (error) { /* empty */ }
703 var state = enforceInternalState(value);
704 if (!hasOwn$2(state, 'source')) {
705 state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
706 } return value;
707 };
708
709 // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
710 // eslint-disable-next-line no-extend-native -- required
711 Function.prototype.toString = makeBuiltIn$1(function toString() {
712 return isCallable$4(this) && getInternalState(this).source || inspectSource$1(this);
713 }, 'toString');
714
715 var isCallable$3 = isCallable$c;
716 var createNonEnumerableProperty$1 = createNonEnumerableProperty$3;
717 var makeBuiltIn = makeBuiltIn$2.exports;
718 var defineGlobalProperty$1 = defineGlobalProperty$3;
719
720 var defineBuiltIn$2 = function (O, key, value, options) {
721 if (!options) options = {};
722 var simple = options.enumerable;
723 var name = options.name !== undefined ? options.name : key;
724 if (isCallable$3(value)) makeBuiltIn(value, name, options);
725 if (options.global) {
726 if (simple) O[key] = value;
727 else defineGlobalProperty$1(key, value);
728 } else {
729 if (!options.unsafe) delete O[key];
730 else if (O[key]) simple = true;
731 if (simple) O[key] = value;
732 else createNonEnumerableProperty$1(O, key, value);
733 } return O;
734 };
735
736 var objectGetOwnPropertyNames = {};
737
738 var ceil = Math.ceil;
739 var floor = Math.floor;
740
741 // `Math.trunc` method
742 // https://tc39.es/ecma262/#sec-math.trunc
743 // eslint-disable-next-line es-x/no-math-trunc -- safe
744 var mathTrunc = Math.trunc || function trunc(x) {
745 var n = +x;
746 return (n > 0 ? floor : ceil)(n);
747 };
748
749 var trunc = mathTrunc;
750
751 // `ToIntegerOrInfinity` abstract operation
752 // https://tc39.es/ecma262/#sec-tointegerorinfinity
753 var toIntegerOrInfinity$2 = function (argument) {
754 var number = +argument;
755 // eslint-disable-next-line no-self-compare -- NaN check
756 return number !== number || number === 0 ? 0 : trunc(number);
757 };
758
759 var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
760
761 var max$1 = Math.max;
762 var min$1 = Math.min;
763
764 // Helper for a popular repeating case of the spec:
765 // Let integer be ? ToInteger(index).
766 // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
767 var toAbsoluteIndex$2 = function (index, length) {
768 var integer = toIntegerOrInfinity$1(index);
769 return integer < 0 ? max$1(integer + length, 0) : min$1(integer, length);
770 };
771
772 var toIntegerOrInfinity = toIntegerOrInfinity$2;
773
774 var min = Math.min;
775
776 // `ToLength` abstract operation
777 // https://tc39.es/ecma262/#sec-tolength
778 var toLength$1 = function (argument) {
779 return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
780 };
781
782 var toLength = toLength$1;
783
784 // `LengthOfArrayLike` abstract operation
785 // https://tc39.es/ecma262/#sec-lengthofarraylike
786 var lengthOfArrayLike$3 = function (obj) {
787 return toLength(obj.length);
788 };
789
790 var toIndexedObject$2 = toIndexedObject$4;
791 var toAbsoluteIndex$1 = toAbsoluteIndex$2;
792 var lengthOfArrayLike$2 = lengthOfArrayLike$3;
793
794 // `Array.prototype.{ indexOf, includes }` methods implementation
795 var createMethod$2 = function (IS_INCLUDES) {
796 return function ($this, el, fromIndex) {
797 var O = toIndexedObject$2($this);
798 var length = lengthOfArrayLike$2(O);
799 var index = toAbsoluteIndex$1(fromIndex, length);
800 var value;
801 // Array#includes uses SameValueZero equality algorithm
802 // eslint-disable-next-line no-self-compare -- NaN check
803 if (IS_INCLUDES && el != el) while (length > index) {
804 value = O[index++];
805 // eslint-disable-next-line no-self-compare -- NaN check
806 if (value != value) return true;
807 // Array#indexOf ignores holes, Array#includes - not
808 } else for (;length > index; index++) {
809 if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
810 } return !IS_INCLUDES && -1;
811 };
812 };
813
814 var arrayIncludes = {
815 // `Array.prototype.includes` method
816 // https://tc39.es/ecma262/#sec-array.prototype.includes
817 includes: createMethod$2(true),
818 // `Array.prototype.indexOf` method
819 // https://tc39.es/ecma262/#sec-array.prototype.indexof
820 indexOf: createMethod$2(false)
821 };
822
823 var uncurryThis$8 = functionUncurryThis;
824 var hasOwn$1 = hasOwnProperty_1;
825 var toIndexedObject$1 = toIndexedObject$4;
826 var indexOf = arrayIncludes.indexOf;
827 var hiddenKeys$1 = hiddenKeys$3;
828
829 var push$1 = uncurryThis$8([].push);
830
831 var objectKeysInternal = function (object, names) {
832 var O = toIndexedObject$1(object);
833 var i = 0;
834 var result = [];
835 var key;
836 for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && push$1(result, key);
837 // Don't enum bug & hidden keys
838 while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
839 ~indexOf(result, key) || push$1(result, key);
840 }
841 return result;
842 };
843
844 // IE8- don't enum bug keys
845 var enumBugKeys$1 = [
846 'constructor',
847 'hasOwnProperty',
848 'isPrototypeOf',
849 'propertyIsEnumerable',
850 'toLocaleString',
851 'toString',
852 'valueOf'
853 ];
854
855 var internalObjectKeys = objectKeysInternal;
856 var enumBugKeys = enumBugKeys$1;
857
858 var hiddenKeys = enumBugKeys.concat('length', 'prototype');
859
860 // `Object.getOwnPropertyNames` method
861 // https://tc39.es/ecma262/#sec-object.getownpropertynames
862 // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
863 objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
864 return internalObjectKeys(O, hiddenKeys);
865 };
866
867 var objectGetOwnPropertySymbols = {};
868
869 // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
870 objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
871
872 var getBuiltIn$1 = getBuiltIn$4;
873 var uncurryThis$7 = functionUncurryThis;
874 var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
875 var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
876 var anObject = anObject$2;
877
878 var concat = uncurryThis$7([].concat);
879
880 // all object keys, includes non-enumerable and symbols
881 var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
882 var keys = getOwnPropertyNamesModule.f(anObject(it));
883 var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
884 return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
885 };
886
887 var hasOwn = hasOwnProperty_1;
888 var ownKeys = ownKeys$1;
889 var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
890 var definePropertyModule$1 = objectDefineProperty;
891
892 var copyConstructorProperties$1 = function (target, source, exceptions) {
893 var keys = ownKeys(source);
894 var defineProperty = definePropertyModule$1.f;
895 var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
896 for (var i = 0; i < keys.length; i++) {
897 var key = keys[i];
898 if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
899 defineProperty(target, key, getOwnPropertyDescriptor(source, key));
900 }
901 }
902 };
903
904 var fails$4 = fails$c;
905 var isCallable$2 = isCallable$c;
906
907 var replacement = /#|\.prototype\./;
908
909 var isForced$1 = function (feature, detection) {
910 var value = data[normalize(feature)];
911 return value == POLYFILL ? true
912 : value == NATIVE ? false
913 : isCallable$2(detection) ? fails$4(detection)
914 : !!detection;
915 };
916
917 var normalize = isForced$1.normalize = function (string) {
918 return String(string).replace(replacement, '.').toLowerCase();
919 };
920
921 var data = isForced$1.data = {};
922 var NATIVE = isForced$1.NATIVE = 'N';
923 var POLYFILL = isForced$1.POLYFILL = 'P';
924
925 var isForced_1 = isForced$1;
926
927 var global$2 = global$b;
928 var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
929 var createNonEnumerableProperty = createNonEnumerableProperty$3;
930 var defineBuiltIn$1 = defineBuiltIn$2;
931 var defineGlobalProperty = defineGlobalProperty$3;
932 var copyConstructorProperties = copyConstructorProperties$1;
933 var isForced = isForced_1;
934
935 /*
936 options.target - name of the target object
937 options.global - target is the global object
938 options.stat - export as static methods of target
939 options.proto - export as prototype methods of target
940 options.real - real prototype method for the `pure` version
941 options.forced - export even if the native feature is available
942 options.bind - bind methods to the target, required for the `pure` version
943 options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
944 options.unsafe - use the simple assignment of property instead of delete + defineProperty
945 options.sham - add a flag to not completely full polyfills
946 options.enumerable - export as enumerable property
947 options.dontCallGetSet - prevent calling a getter on target
948 options.name - the .name of the function if it does not match the key
949 */
950 var _export = function (options, source) {
951 var TARGET = options.target;
952 var GLOBAL = options.global;
953 var STATIC = options.stat;
954 var FORCED, target, key, targetProperty, sourceProperty, descriptor;
955 if (GLOBAL) {
956 target = global$2;
957 } else if (STATIC) {
958 target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
959 } else {
960 target = (global$2[TARGET] || {}).prototype;
961 }
962 if (target) for (key in source) {
963 sourceProperty = source[key];
964 if (options.dontCallGetSet) {
965 descriptor = getOwnPropertyDescriptor(target, key);
966 targetProperty = descriptor && descriptor.value;
967 } else targetProperty = target[key];
968 FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
969 // contained in target
970 if (!FORCED && targetProperty !== undefined) {
971 if (typeof sourceProperty == typeof targetProperty) continue;
972 copyConstructorProperties(sourceProperty, targetProperty);
973 }
974 // add a flag to not completely full polyfills
975 if (options.sham || (targetProperty && targetProperty.sham)) {
976 createNonEnumerableProperty(sourceProperty, 'sham', true);
977 }
978 defineBuiltIn$1(target, key, sourceProperty, options);
979 }
980 };
981
982 var classof$4 = classofRaw$1;
983
984 // `IsArray` abstract operation
985 // https://tc39.es/ecma262/#sec-isarray
986 // eslint-disable-next-line es-x/no-array-isarray -- safe
987 var isArray$2 = Array.isArray || function isArray(argument) {
988 return classof$4(argument) == 'Array';
989 };
990
991 var wellKnownSymbol$4 = wellKnownSymbol$6;
992
993 var TO_STRING_TAG$1 = wellKnownSymbol$4('toStringTag');
994 var test = {};
995
996 test[TO_STRING_TAG$1] = 'z';
997
998 var toStringTagSupport = String(test) === '[object z]';
999
1000 var TO_STRING_TAG_SUPPORT$2 = toStringTagSupport;
1001 var isCallable$1 = isCallable$c;
1002 var classofRaw = classofRaw$1;
1003 var wellKnownSymbol$3 = wellKnownSymbol$6;
1004
1005 var TO_STRING_TAG = wellKnownSymbol$3('toStringTag');
1006 var $Object = Object;
1007
1008 // ES3 wrong here
1009 var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1010
1011 // fallback for IE11 Script Access Denied error
1012 var tryGet = function (it, key) {
1013 try {
1014 return it[key];
1015 } catch (error) { /* empty */ }
1016 };
1017
1018 // getting tag from ES6+ `Object.prototype.toString`
1019 var classof$3 = TO_STRING_TAG_SUPPORT$2 ? classofRaw : function (it) {
1020 var O, tag, result;
1021 return it === undefined ? 'Undefined' : it === null ? 'Null'
1022 // @@toStringTag case
1023 : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1024 // builtinTag case
1025 : CORRECT_ARGUMENTS ? classofRaw(O)
1026 // ES3 arguments fallback
1027 : (result = classofRaw(O)) == 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
1028 };
1029
1030 var uncurryThis$6 = functionUncurryThis;
1031 var fails$3 = fails$c;
1032 var isCallable = isCallable$c;
1033 var classof$2 = classof$3;
1034 var getBuiltIn = getBuiltIn$4;
1035 var inspectSource = inspectSource$3;
1036
1037 var noop = function () { /* empty */ };
1038 var empty = [];
1039 var construct = getBuiltIn('Reflect', 'construct');
1040 var constructorRegExp = /^\s*(?:class|function)\b/;
1041 var exec$1 = uncurryThis$6(constructorRegExp.exec);
1042 var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
1043
1044 var isConstructorModern = function isConstructor(argument) {
1045 if (!isCallable(argument)) return false;
1046 try {
1047 construct(noop, empty, argument);
1048 return true;
1049 } catch (error) {
1050 return false;
1051 }
1052 };
1053
1054 var isConstructorLegacy = function isConstructor(argument) {
1055 if (!isCallable(argument)) return false;
1056 switch (classof$2(argument)) {
1057 case 'AsyncFunction':
1058 case 'GeneratorFunction':
1059 case 'AsyncGeneratorFunction': return false;
1060 }
1061 try {
1062 // we can't check .prototype since constructors produced by .bind haven't it
1063 // `Function#toString` throws on some built-it function in some legacy engines
1064 // (for example, `DOMQuad` and similar in FF41-)
1065 return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource(argument));
1066 } catch (error) {
1067 return true;
1068 }
1069 };
1070
1071 isConstructorLegacy.sham = true;
1072
1073 // `IsConstructor` abstract operation
1074 // https://tc39.es/ecma262/#sec-isconstructor
1075 var isConstructor$2 = !construct || fails$3(function () {
1076 var called;
1077 return isConstructorModern(isConstructorModern.call)
1078 || !isConstructorModern(Object)
1079 || !isConstructorModern(function () { called = true; })
1080 || called;
1081 }) ? isConstructorLegacy : isConstructorModern;
1082
1083 var toPropertyKey = toPropertyKey$3;
1084 var definePropertyModule = objectDefineProperty;
1085 var createPropertyDescriptor = createPropertyDescriptor$3;
1086
1087 var createProperty$1 = function (object, key, value) {
1088 var propertyKey = toPropertyKey(key);
1089 if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
1090 else object[propertyKey] = value;
1091 };
1092
1093 var fails$2 = fails$c;
1094 var wellKnownSymbol$2 = wellKnownSymbol$6;
1095 var V8_VERSION = engineV8Version;
1096
1097 var SPECIES$2 = wellKnownSymbol$2('species');
1098
1099 var arrayMethodHasSpeciesSupport$2 = function (METHOD_NAME) {
1100 // We can't use this feature detection in V8 since it causes
1101 // deoptimization and serious performance degradation
1102 // https://github.com/zloirock/core-js/issues/677
1103 return V8_VERSION >= 51 || !fails$2(function () {
1104 var array = [];
1105 var constructor = array.constructor = {};
1106 constructor[SPECIES$2] = function () {
1107 return { foo: 1 };
1108 };
1109 return array[METHOD_NAME](Boolean).foo !== 1;
1110 });
1111 };
1112
1113 var uncurryThis$5 = functionUncurryThis;
1114
1115 var arraySlice = uncurryThis$5([].slice);
1116
1117 var $$3 = _export;
1118 var isArray$1 = isArray$2;
1119 var isConstructor$1 = isConstructor$2;
1120 var isObject$1 = isObject$7;
1121 var toAbsoluteIndex = toAbsoluteIndex$2;
1122 var lengthOfArrayLike$1 = lengthOfArrayLike$3;
1123 var toIndexedObject = toIndexedObject$4;
1124 var createProperty = createProperty$1;
1125 var wellKnownSymbol$1 = wellKnownSymbol$6;
1126 var arrayMethodHasSpeciesSupport$1 = arrayMethodHasSpeciesSupport$2;
1127 var un$Slice = arraySlice;
1128
1129 var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport$1('slice');
1130
1131 var SPECIES$1 = wellKnownSymbol$1('species');
1132 var $Array$1 = Array;
1133 var max = Math.max;
1134
1135 // `Array.prototype.slice` method
1136 // https://tc39.es/ecma262/#sec-array.prototype.slice
1137 // fallback for not array-like ES3 strings and DOM objects
1138 $$3({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 }, {
1139 slice: function slice(start, end) {
1140 var O = toIndexedObject(this);
1141 var length = lengthOfArrayLike$1(O);
1142 var k = toAbsoluteIndex(start, length);
1143 var fin = toAbsoluteIndex(end === undefined ? length : end, length);
1144 // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
1145 var Constructor, result, n;
1146 if (isArray$1(O)) {
1147 Constructor = O.constructor;
1148 // cross-realm fallback
1149 if (isConstructor$1(Constructor) && (Constructor === $Array$1 || isArray$1(Constructor.prototype))) {
1150 Constructor = undefined;
1151 } else if (isObject$1(Constructor)) {
1152 Constructor = Constructor[SPECIES$1];
1153 if (Constructor === null) Constructor = undefined;
1154 }
1155 if (Constructor === $Array$1 || Constructor === undefined) {
1156 return un$Slice(O, k, fin);
1157 }
1158 }
1159 result = new (Constructor === undefined ? $Array$1 : Constructor)(max(fin - k, 0));
1160 for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
1161 result.length = n;
1162 return result;
1163 }
1164 });
1165
1166 var classof$1 = classof$3;
1167
1168 var $String = String;
1169
1170 var toString$3 = function (argument) {
1171 if (classof$1(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1172 return $String(argument);
1173 };
1174
1175 // a string of all valid unicode whitespaces
1176 var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
1177 '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
1178
1179 var uncurryThis$4 = functionUncurryThis;
1180 var requireObjectCoercible = requireObjectCoercible$3;
1181 var toString$2 = toString$3;
1182 var whitespaces$1 = whitespaces$2;
1183
1184 var replace = uncurryThis$4(''.replace);
1185 var whitespace = '[' + whitespaces$1 + ']';
1186 var ltrim = RegExp('^' + whitespace + whitespace + '*');
1187 var rtrim = RegExp(whitespace + whitespace + '*$');
1188
1189 // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
1190 var createMethod$1 = function (TYPE) {
1191 return function ($this) {
1192 var string = toString$2(requireObjectCoercible($this));
1193 if (TYPE & 1) string = replace(string, ltrim, '');
1194 if (TYPE & 2) string = replace(string, rtrim, '');
1195 return string;
1196 };
1197 };
1198
1199 var stringTrim = {
1200 // `String.prototype.{ trimLeft, trimStart }` methods
1201 // https://tc39.es/ecma262/#sec-string.prototype.trimstart
1202 start: createMethod$1(1),
1203 // `String.prototype.{ trimRight, trimEnd }` methods
1204 // https://tc39.es/ecma262/#sec-string.prototype.trimend
1205 end: createMethod$1(2),
1206 // `String.prototype.trim` method
1207 // https://tc39.es/ecma262/#sec-string.prototype.trim
1208 trim: createMethod$1(3)
1209 };
1210
1211 var global$1 = global$b;
1212 var fails$1 = fails$c;
1213 var uncurryThis$3 = functionUncurryThis;
1214 var toString$1 = toString$3;
1215 var trim = stringTrim.trim;
1216 var whitespaces = whitespaces$2;
1217
1218 var $parseInt$1 = global$1.parseInt;
1219 var Symbol$1 = global$1.Symbol;
1220 var ITERATOR = Symbol$1 && Symbol$1.iterator;
1221 var hex = /^[+-]?0x/i;
1222 var exec = uncurryThis$3(hex.exec);
1223 var FORCED = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
1224 // MS Edge 18- broken with boxed symbols
1225 || (ITERATOR && !fails$1(function () { $parseInt$1(Object(ITERATOR)); }));
1226
1227 // `parseInt` method
1228 // https://tc39.es/ecma262/#sec-parseint-string-radix
1229 var numberParseInt = FORCED ? function parseInt(string, radix) {
1230 var S = trim(toString$1(string));
1231 return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
1232 } : $parseInt$1;
1233
1234 var $$2 = _export;
1235 var $parseInt = numberParseInt;
1236
1237 // `parseInt` method
1238 // https://tc39.es/ecma262/#sec-parseint-string-radix
1239 $$2({ global: true, forced: parseInt != $parseInt }, {
1240 parseInt: $parseInt
1241 });
1242
1243 var fails = fails$c;
1244
1245 var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
1246 var method = [][METHOD_NAME];
1247 return !!method && fails(function () {
1248 // eslint-disable-next-line no-useless-call -- required for testing
1249 method.call(null, argument || function () { return 1; }, 1);
1250 });
1251 };
1252
1253 /* eslint-disable es-x/no-array-prototype-indexof -- required for testing */
1254 var $$1 = _export;
1255 var uncurryThis$2 = functionUncurryThis;
1256 var $IndexOf = arrayIncludes.indexOf;
1257 var arrayMethodIsStrict = arrayMethodIsStrict$1;
1258
1259 var un$IndexOf = uncurryThis$2([].indexOf);
1260
1261 var NEGATIVE_ZERO = !!un$IndexOf && 1 / un$IndexOf([1], 1, -0) < 0;
1262 var STRICT_METHOD = arrayMethodIsStrict('indexOf');
1263
1264 // `Array.prototype.indexOf` method
1265 // https://tc39.es/ecma262/#sec-array.prototype.indexof
1266 $$1({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {
1267 indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
1268 var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
1269 return NEGATIVE_ZERO
1270 // convert -0 to +0
1271 ? un$IndexOf(this, searchElement, fromIndex) || 0
1272 : $IndexOf(this, searchElement, fromIndex);
1273 }
1274 });
1275
1276 var uncurryThis$1 = functionUncurryThis;
1277 var aCallable = aCallable$2;
1278 var NATIVE_BIND = functionBindNative;
1279
1280 var bind$1 = uncurryThis$1(uncurryThis$1.bind);
1281
1282 // optional / simple context binding
1283 var functionBindContext = function (fn, that) {
1284 aCallable(fn);
1285 return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
1286 return fn.apply(that, arguments);
1287 };
1288 };
1289
1290 var isArray = isArray$2;
1291 var isConstructor = isConstructor$2;
1292 var isObject = isObject$7;
1293 var wellKnownSymbol = wellKnownSymbol$6;
1294
1295 var SPECIES = wellKnownSymbol('species');
1296 var $Array = Array;
1297
1298 // a part of `ArraySpeciesCreate` abstract operation
1299 // https://tc39.es/ecma262/#sec-arrayspeciescreate
1300 var arraySpeciesConstructor$1 = function (originalArray) {
1301 var C;
1302 if (isArray(originalArray)) {
1303 C = originalArray.constructor;
1304 // cross-realm fallback
1305 if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
1306 else if (isObject(C)) {
1307 C = C[SPECIES];
1308 if (C === null) C = undefined;
1309 }
1310 } return C === undefined ? $Array : C;
1311 };
1312
1313 var arraySpeciesConstructor = arraySpeciesConstructor$1;
1314
1315 // `ArraySpeciesCreate` abstract operation
1316 // https://tc39.es/ecma262/#sec-arrayspeciescreate
1317 var arraySpeciesCreate$1 = function (originalArray, length) {
1318 return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
1319 };
1320
1321 var bind = functionBindContext;
1322 var uncurryThis = functionUncurryThis;
1323 var IndexedObject = indexedObject;
1324 var toObject = toObject$2;
1325 var lengthOfArrayLike = lengthOfArrayLike$3;
1326 var arraySpeciesCreate = arraySpeciesCreate$1;
1327
1328 var push = uncurryThis([].push);
1329
1330 // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
1331 var createMethod = function (TYPE) {
1332 var IS_MAP = TYPE == 1;
1333 var IS_FILTER = TYPE == 2;
1334 var IS_SOME = TYPE == 3;
1335 var IS_EVERY = TYPE == 4;
1336 var IS_FIND_INDEX = TYPE == 6;
1337 var IS_FILTER_REJECT = TYPE == 7;
1338 var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
1339 return function ($this, callbackfn, that, specificCreate) {
1340 var O = toObject($this);
1341 var self = IndexedObject(O);
1342 var boundFunction = bind(callbackfn, that);
1343 var length = lengthOfArrayLike(self);
1344 var index = 0;
1345 var create = specificCreate || arraySpeciesCreate;
1346 var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
1347 var value, result;
1348 for (;length > index; index++) if (NO_HOLES || index in self) {
1349 value = self[index];
1350 result = boundFunction(value, index, O);
1351 if (TYPE) {
1352 if (IS_MAP) target[index] = result; // map
1353 else if (result) switch (TYPE) {
1354 case 3: return true; // some
1355 case 5: return value; // find
1356 case 6: return index; // findIndex
1357 case 2: push(target, value); // filter
1358 } else switch (TYPE) {
1359 case 4: return false; // every
1360 case 7: push(target, value); // filterReject
1361 }
1362 }
1363 }
1364 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
1365 };
1366 };
1367
1368 var arrayIteration = {
1369 // `Array.prototype.forEach` method
1370 // https://tc39.es/ecma262/#sec-array.prototype.foreach
1371 forEach: createMethod(0),
1372 // `Array.prototype.map` method
1373 // https://tc39.es/ecma262/#sec-array.prototype.map
1374 map: createMethod(1),
1375 // `Array.prototype.filter` method
1376 // https://tc39.es/ecma262/#sec-array.prototype.filter
1377 filter: createMethod(2),
1378 // `Array.prototype.some` method
1379 // https://tc39.es/ecma262/#sec-array.prototype.some
1380 some: createMethod(3),
1381 // `Array.prototype.every` method
1382 // https://tc39.es/ecma262/#sec-array.prototype.every
1383 every: createMethod(4),
1384 // `Array.prototype.find` method
1385 // https://tc39.es/ecma262/#sec-array.prototype.find
1386 find: createMethod(5),
1387 // `Array.prototype.findIndex` method
1388 // https://tc39.es/ecma262/#sec-array.prototype.findIndex
1389 findIndex: createMethod(6),
1390 // `Array.prototype.filterReject` method
1391 // https://github.com/tc39/proposal-array-filtering
1392 filterReject: createMethod(7)
1393 };
1394
1395 var $ = _export;
1396 var $filter = arrayIteration.filter;
1397 var arrayMethodHasSpeciesSupport = arrayMethodHasSpeciesSupport$2;
1398
1399 var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
1400
1401 // `Array.prototype.filter` method
1402 // https://tc39.es/ecma262/#sec-array.prototype.filter
1403 // with adding support of @@species
1404 $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
1405 filter: function filter(callbackfn /* , thisArg */) {
1406 return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1407 }
1408 });
1409
1410 var TO_STRING_TAG_SUPPORT$1 = toStringTagSupport;
1411 var classof = classof$3;
1412
1413 // `Object.prototype.toString` method implementation
1414 // https://tc39.es/ecma262/#sec-object.prototype.tostring
1415 var objectToString = TO_STRING_TAG_SUPPORT$1 ? {}.toString : function toString() {
1416 return '[object ' + classof(this) + ']';
1417 };
1418
1419 var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1420 var defineBuiltIn = defineBuiltIn$2;
1421 var toString = objectToString;
1422
1423 // `Object.prototype.toString` method
1424 // https://tc39.es/ecma262/#sec-object.prototype.tostring
1425 if (!TO_STRING_TAG_SUPPORT) {
1426 defineBuiltIn(Object.prototype, 'toString', toString, { unsafe: true });
1427 }
1428
1429 /**
1430 * @author doug-the-guy
1431 * @version v1.0.0
1432 *
1433 * Bootstrap Table Pipeline
1434 * -----------------------
1435 *
1436 * This plugin enables client side data caching for server side requests which will
1437 * eliminate the need to issue a new request every page change. This will allow
1438 * for a performance balance for a large data set between returning all data at once
1439 * (client side paging) and a new server side request (server side paging).
1440 *
1441 * There are two new options:
1442 * - usePipeline: enables this feature
1443 * - pipelineSize: the size of each cache window
1444 *
1445 * The size of the pipeline must be evenly divisible by the current page size. This is
1446 * assured by rounding up to the nearest evenly divisible value. For example, if
1447 * the pipeline size is 4990 and the current page size is 25, then pipeline size will
1448 * be dynamically set to 5000.
1449 *
1450 * The cache windows are computed based on the pipeline size and the total number of rows
1451 * returned by the server side query. For example, with pipeline size 500 and total rows
1452 * 1300, the cache windows will be:
1453 *
1454 * [{'lower': 0, 'upper': 499}, {'lower': 500, 'upper': 999}, {'lower': 1000, 'upper': 1499}]
1455 *
1456 * Using the limit (i.e. the pipelineSize) and offset parameters, the server side request
1457 * **MUST** return only the data in the requested cache window **AND** the total number of rows.
1458 * To wit, the server side code must use the offset and limit parameters to prepare the response
1459 * data.
1460 *
1461 * On a page change, the new offset is checked if it is within the current cache window. If so,
1462 * the requested page data is returned from the cached data set. Otherwise, a new server side
1463 * request will be issued for the new cache window.
1464 *
1465 * The current cached data is only invalidated on these events:
1466 * * sorting
1467 * * searching
1468 * * page size change
1469 * * page change moves into a new cache window
1470 *
1471 * There are two new events:
1472 * - cached-data-hit.bs.table: issued when cached data is used on a page change
1473 * - cached-data-reset.bs.table: issued when the cached data is invalidated and a
1474 * new server side request is issued
1475 *
1476 **/
1477
1478 var Utils = $__default["default"].fn.bootstrapTable.utils;
1479 $__default["default"].extend($__default["default"].fn.bootstrapTable.defaults, {
1480 usePipeline: false,
1481 pipelineSize: 1000,
1482 // eslint-disable-next-line no-unused-vars
1483 onCachedDataHit: function onCachedDataHit(data) {
1484 return false;
1485 },
1486 // eslint-disable-next-line no-unused-vars
1487 onCachedDataReset: function onCachedDataReset(data) {
1488 return false;
1489 }
1490 });
1491 $__default["default"].extend($__default["default"].fn.bootstrapTable.Constructor.EVENTS, {
1492 'cached-data-hit.bs.table': 'onCachedDataHit',
1493 'cached-data-reset.bs.table': 'onCachedDataReset'
1494 });
1495 var BootstrapTable = $__default["default"].fn.bootstrapTable.Constructor;
1496 var _init = BootstrapTable.prototype.init;
1497 var _onSearch = BootstrapTable.prototype.onSearch;
1498 var _onSort = BootstrapTable.prototype.onSort;
1499 var _onPageListChange = BootstrapTable.prototype.onPageListChange;
1500
1501 BootstrapTable.prototype.init = function () {
1502 // needs to be called before initServer()
1503 this.initPipeline();
1504
1505 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1506 args[_key] = arguments[_key];
1507 }
1508
1509 _init.apply(this, Array.prototype.slice.apply(args));
1510 };
1511
1512 BootstrapTable.prototype.initPipeline = function () {
1513 this.cacheRequestJSON = {};
1514 this.cacheWindows = [];
1515 this.currWindow = 0;
1516 this.resetCache = true;
1517 };
1518
1519 BootstrapTable.prototype.onSearch = function () {
1520 /* force a cache reset on search */
1521 if (this.options.usePipeline) {
1522 this.resetCache = true;
1523 }
1524
1525 _onSearch.apply(this, Array.prototype.slice.apply(arguments));
1526 };
1527
1528 BootstrapTable.prototype.onSort = function () {
1529 /* force a cache reset on sort */
1530 if (this.options.usePipeline) {
1531 this.resetCache = true;
1532 }
1533
1534 _onSort.apply(this, Array.prototype.slice.apply(arguments));
1535 };
1536
1537 BootstrapTable.prototype.onPageListChange = function (event) {
1538 /* rebuild cache window on page size change */
1539 var target = $__default["default"](event.currentTarget);
1540 var newPageSize = parseInt(target.text(), 10);
1541 this.options.pipelineSize = this.calculatePipelineSize(this.options.pipelineSize, newPageSize);
1542 this.resetCache = true;
1543
1544 _onPageListChange.apply(this, Array.prototype.slice.apply(arguments));
1545 };
1546
1547 BootstrapTable.prototype.calculatePipelineSize = function (pipelineSize, pageSize) {
1548 /* calculate pipeline size by rounding up to the nearest value evenly divisible
1549 * by the pageSize */
1550 if (pageSize === 0) return 0;
1551 return Math.ceil(pipelineSize / pageSize) * pageSize;
1552 };
1553
1554 BootstrapTable.prototype.setCacheWindows = function () {
1555 /* set cache windows based on the total number of rows returned by server side
1556 * request and the pipelineSize */
1557 this.cacheWindows = [];
1558 var numWindows = this.options.totalRows / this.options.pipelineSize;
1559
1560 for (var i = 0; i <= numWindows; i++) {
1561 var b = i * this.options.pipelineSize;
1562 this.cacheWindows[i] = {
1563 lower: b,
1564 upper: b + this.options.pipelineSize - 1
1565 };
1566 }
1567 };
1568
1569 BootstrapTable.prototype.setCurrWindow = function (offset) {
1570 /* set the current cache window index, based on where the current offset falls */
1571 this.currWindow = 0;
1572
1573 for (var i = 0; i < this.cacheWindows.length; i++) {
1574 if (this.cacheWindows[i].lower <= offset && offset <= this.cacheWindows[i].upper) {
1575 this.currWindow = i;
1576 break;
1577 }
1578 }
1579 };
1580
1581 BootstrapTable.prototype.drawFromCache = function (offset, limit) {
1582 /* draw rows from the cache using offset and limit */
1583 var res = $__default["default"].extend(true, {}, this.cacheRequestJSON);
1584 var drawStart = offset - this.cacheWindows[this.currWindow].lower;
1585 var drawEnd = drawStart + limit;
1586 res.rows = res.rows.slice(drawStart, drawEnd);
1587 return res;
1588 };
1589
1590 BootstrapTable.prototype.initServer = function (silent, query, url) {
1591 /* determine if requested data is in cache (on paging) or if
1592 * a new ajax request needs to be issued (sorting, searching, paging
1593 * moving outside of cached data, page size change)
1594 * initial version of this extension will entirely override base initServer
1595 **/
1596 var data = {};
1597 var index = this.header.fields.indexOf(this.options.sortName);
1598 var params = {
1599 searchText: this.searchText,
1600 sortName: this.options.sortName,
1601 sortOrder: this.options.sortOrder
1602 };
1603 var request = null;
1604
1605 if (this.header.sortNames[index]) {
1606 params.sortName = this.header.sortNames[index];
1607 }
1608
1609 if (this.options.pagination && this.options.sidePagination === 'server') {
1610 params.pageSize = this.options.pageSize === this.options.formatAllRows() ? this.options.totalRows : this.options.pageSize;
1611 params.pageNumber = this.options.pageNumber;
1612 }
1613
1614 if (!(url || this.options.url) && !this.options.ajax) {
1615 return;
1616 }
1617
1618 var useAjax = true;
1619
1620 if (this.options.queryParamsType === 'limit') {
1621 params = {
1622 searchText: params.searchText,
1623 sortName: params.sortName,
1624 sortOrder: params.sortOrder
1625 };
1626
1627 if (this.options.pagination && this.options.sidePagination === 'server') {
1628 params.limit = this.options.pageSize === this.options.formatAllRows() ? this.options.totalRows : this.options.pageSize;
1629 params.offset = (this.options.pageSize === this.options.formatAllRows() ? this.options.totalRows : this.options.pageSize) * (this.options.pageNumber - 1);
1630
1631 if (this.options.usePipeline) {
1632 // if cacheWindows is empty, this is the initial request
1633 if (!this.cacheWindows.length) {
1634 useAjax = true;
1635 params.drawOffset = params.offset; // cache exists: determine if the page request is entirely within the current cached window
1636 } else {
1637 var w = this.cacheWindows[this.currWindow]; // case 1: reset cache but stay within current window (e.g. column sort)
1638 // case 2: move outside of the current window (e.g. search or paging)
1639 // since each cache window is aligned with the current page size
1640 // checking if params.offset is outside the current window is sufficient.
1641 // need to requery for preceding or succeeding cache window
1642 // also handle case
1643
1644 if (this.resetCache || params.offset < w.lower || params.offset > w.upper) {
1645 useAjax = true;
1646 this.setCurrWindow(params.offset); // store the relative offset for drawing the page data afterwards
1647
1648 params.drawOffset = params.offset; // now set params.offset to the lower bound of the new cache window
1649 // the server will return that whole cache window
1650
1651 params.offset = this.cacheWindows[this.currWindow].lower; // within current cache window
1652 } else {
1653 useAjax = false;
1654 }
1655 }
1656 } else if (params.limit === 0) {
1657 delete params.limit;
1658 }
1659 }
1660 } // force an ajax call - this is on search, sort or page size change
1661
1662
1663 if (this.resetCache) {
1664 useAjax = true;
1665 this.resetCache = false;
1666 }
1667
1668 if (this.options.usePipeline && useAjax) {
1669 /* in this scenario limit is used on the server to get the cache window
1670 * and drawLimit is used to get the page data afterwards */
1671 params.drawLimit = params.limit;
1672 params.limit = this.options.pipelineSize;
1673 } // cached results can be used
1674
1675
1676 if (!useAjax) {
1677 var res = this.drawFromCache(params.offset, params.limit);
1678 this.load(res);
1679 this.trigger('load-success', res);
1680 this.trigger('cached-data-hit', res);
1681 return;
1682 } // cached results can't be used
1683 // continue base initServer code
1684
1685
1686 if (!$__default["default"].isEmptyObject(this.filterColumnsPartial)) {
1687 params.filter = JSON.stringify(this.filterColumnsPartial, null);
1688 }
1689
1690 data = Utils.calculateObjectValue(this.options, this.options.queryParams, [params], data);
1691 $__default["default"].extend(data, query || {}); // false to stop request
1692
1693 if (data === false) {
1694 return;
1695 }
1696
1697 if (!silent) {
1698 this.$tableLoading.show();
1699 }
1700
1701 var self = this;
1702 request = $__default["default"].extend({}, Utils.calculateObjectValue(null, this.options.ajaxOptions), {
1703 type: this.options.method,
1704 url: url || this.options.url,
1705 data: this.options.contentType === 'application/json' && this.options.method === 'post' ? JSON.stringify(data) : data,
1706 cache: this.options.cache,
1707 contentType: this.options.contentType,
1708 dataType: this.options.dataType,
1709 success: function success(res) {
1710 res = Utils.calculateObjectValue(self.options, self.options.responseHandler, [res], res); // cache results if using pipelining
1711
1712 if (self.options.usePipeline) {
1713 // store entire request in cache
1714 self.cacheRequestJSON = $__default["default"].extend(true, {}, res); // this gets set in load() also but needs to be set before
1715 // setting cacheWindows
1716
1717 self.options.totalRows = res[self.options.totalField]; // if this is a search, potentially less results will be returned
1718 // so cache windows need to be rebuilt. Otherwise it
1719 // will come out the same
1720
1721 self.setCacheWindows();
1722 self.setCurrWindow(params.drawOffset); // just load data for the page
1723
1724 res = self.drawFromCache(params.drawOffset, params.drawLimit);
1725 self.trigger('cached-data-reset', res);
1726 }
1727
1728 self.load(res);
1729 self.trigger('load-success', res);
1730
1731 if (!silent) {
1732 self.hideLoading();
1733 }
1734 },
1735 error: function error(res) {
1736 var data = [];
1737
1738 if (self.options.sidePagination === 'server') {
1739 data = {};
1740 data[self.options.totalField] = 0;
1741 data[self.options.dataField] = [];
1742 }
1743
1744 self.load(data);
1745 self.trigger('load-error', res.status, res);
1746
1747 if (!silent) {
1748 self.hideLoading();
1749 }
1750 }
1751 });
1752
1753 if (this.options.ajax) {
1754 Utils.calculateObjectValue(this, this.options.ajax, [request], null);
1755 } else {
1756 if (this._xhr && this._xhr.readyState !== 4) {
1757 this._xhr.abort();
1758 }
1759
1760 this._xhr = $__default["default"].ajax(request);
1761 }
1762 };
1763
1764}));