@bcrumbs.net/bc-shared 0.0.6 → 0.0.8
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.d.ts +1 -1
- package/index.esm.js +1387 -1352
- package/package.json +1 -1
- package/src/lib/config/routes.d.ts +24 -0
- package/src/lib/hooks/usePermissions.d.ts +2 -2
- package/src/lib/types/index.d.ts +7 -0
package/index.esm.js
CHANGED
|
@@ -13,8 +13,9 @@ const InboxPortalRoot = '/inbox';
|
|
|
13
13
|
const SearchPortalRoot = '/search';
|
|
14
14
|
const BroadcastRoot = '/broadcast';
|
|
15
15
|
const ResourcesRoot = '/resources';
|
|
16
|
+
const ManagemnetRoot = '/management';
|
|
16
17
|
const ContactRoot = '/contact';
|
|
17
|
-
const
|
|
18
|
+
const AiRoot = '/ai';
|
|
18
19
|
const BCRoutes = {
|
|
19
20
|
AccountDashboard: AccountPortalRoot,
|
|
20
21
|
Subscriptions: `${AccountPortalRoot}/workspace`,
|
|
@@ -26,13 +27,17 @@ const BCRoutes = {
|
|
|
26
27
|
Guide: `${AccountPortalRoot}/guide`,
|
|
27
28
|
Welcome: `${AccountPortalRoot}/welcome`,
|
|
28
29
|
Login: `${AccountPortalRoot}/login`,
|
|
30
|
+
// It should be like that while it's used by BC-API
|
|
29
31
|
Register: `${AccountPortalRoot}/register`,
|
|
30
32
|
Password: `${AccountPortalRoot}/reset/:token`,
|
|
33
|
+
PartnerLogin: `${AccountPortalRoot}/partner-login`,
|
|
31
34
|
Profile: `${AccountPortalRoot}/profile`,
|
|
32
35
|
Logout: `${AccountPortalRoot}/logout`,
|
|
33
36
|
NotFound: `${AccountPortalRoot}/404`,
|
|
34
37
|
Error: `/error`,
|
|
38
|
+
// It should be like that while it's used by BC-API
|
|
35
39
|
NoPermissions: `/403`,
|
|
40
|
+
// It should be like that while it's used by BC-API
|
|
36
41
|
ShowcaseDashboard: ShowcasePortalRoot,
|
|
37
42
|
ShowcasePages: `${ShowcasePortalRoot}/pages`,
|
|
38
43
|
ShowcaseSections: `${ShowcasePortalRoot}/pages/:pageId/:templateId/:modelId/sections`,
|
|
@@ -50,15 +55,38 @@ const BCRoutes = {
|
|
|
50
55
|
PatchResource: `${ResourcesRoot}/patch`,
|
|
51
56
|
DeleteResource: `${ResourcesRoot}/delete`,
|
|
52
57
|
ResourcesNotFound: `${ResourcesRoot}/404`,
|
|
58
|
+
Ai: AiRoot,
|
|
59
|
+
AiPlayground: `${AiRoot}/playground`,
|
|
60
|
+
AiSourcesFiles: `${AiRoot}/sources/files`,
|
|
61
|
+
AiSourcesText: `${AiRoot}/sources/text`,
|
|
62
|
+
AiSourcesWebsites: `${AiRoot}/sources/websites`,
|
|
63
|
+
AiSourcesIntegrations: `${AiRoot}/sources/integrations`,
|
|
64
|
+
AiPreferencesModels: `${AiRoot}/preferences/models`,
|
|
65
|
+
AiPreferencesFineTuning: `${AiRoot}/preferences/fine-tuning`,
|
|
66
|
+
AiPreferencesPrompts: `${AiRoot}/preferences/prompts`,
|
|
67
|
+
AiPreferencesTestNumber: `${AiRoot}/preferences/test-number`,
|
|
68
|
+
AiPreferencesSuggestedQs: `${AiRoot}/preferences/suggested-qs`,
|
|
53
69
|
Inbox: `${InboxPortalRoot}`,
|
|
54
70
|
EmbeddedInbox: `${InboxPortalRoot}/embedded`,
|
|
55
71
|
Broadcast: `${BroadcastRoot}`,
|
|
72
|
+
BroadcastAnalysis: `${BroadcastRoot}/analysis/:id`,
|
|
56
73
|
BroadcastEdit: `${BroadcastRoot}/edit/:id`,
|
|
57
74
|
BroadcastCreate: `${BroadcastRoot}/create`,
|
|
75
|
+
BroadcastHistory: `${BroadcastRoot}/history`,
|
|
58
76
|
ConvsSearch: `${SearchPortalRoot}`,
|
|
59
77
|
Dashboard: `${Dashboard}`,
|
|
78
|
+
Managemnet: `${ManagemnetRoot}`,
|
|
79
|
+
AgentManagemnet: `${ManagemnetRoot}/agent`,
|
|
80
|
+
AiManagemnet: `${ManagemnetRoot}/ai`,
|
|
81
|
+
ApikeyManagemnet: `${ManagemnetRoot}/apikey`,
|
|
82
|
+
WebhookManagemnet: `${ManagemnetRoot}/webhook`,
|
|
83
|
+
ConvstageManagemnet: `${ManagemnetRoot}/convstage`,
|
|
84
|
+
IntegrationManagemnet: `${ManagemnetRoot}/integration`,
|
|
60
85
|
Contact: `${ContactRoot}`,
|
|
61
|
-
ContactLifeCycle: `${
|
|
86
|
+
ContactLifeCycle: `${ContactRoot}/contact-life-cycle`,
|
|
87
|
+
AiAutomation: `${ManagemnetRoot}/ai-automation`,
|
|
88
|
+
ConversationManagement: `${ManagemnetRoot}/conversation-management`,
|
|
89
|
+
Root: '/'
|
|
62
90
|
};
|
|
63
91
|
|
|
64
92
|
var commonjsGlobal$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -6374,246 +6402,17 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
6374
6402
|
}
|
|
6375
6403
|
}
|
|
6376
6404
|
|
|
6377
|
-
var
|
|
6378
|
-
|
|
6379
|
-
var DESCRIPTORS$5 = descriptors;
|
|
6380
|
-
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
6381
|
-
var definePropertyModule$1 = objectDefineProperty;
|
|
6382
|
-
var anObject$7 = anObject$a;
|
|
6383
|
-
var toIndexedObject$1 = toIndexedObject$5;
|
|
6384
|
-
var objectKeys = objectKeys$2;
|
|
6385
|
-
|
|
6386
|
-
// `Object.defineProperties` method
|
|
6387
|
-
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
6388
|
-
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
6389
|
-
objectDefineProperties.f = DESCRIPTORS$5 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
6390
|
-
anObject$7(O);
|
|
6391
|
-
var props = toIndexedObject$1(Properties);
|
|
6392
|
-
var keys = objectKeys(Properties);
|
|
6393
|
-
var length = keys.length;
|
|
6394
|
-
var index = 0;
|
|
6395
|
-
var key;
|
|
6396
|
-
while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]);
|
|
6397
|
-
return O;
|
|
6398
|
-
};
|
|
6399
|
-
|
|
6400
|
-
var getBuiltIn$3 = getBuiltIn$6;
|
|
6401
|
-
|
|
6402
|
-
var html$1 = getBuiltIn$3('document', 'documentElement');
|
|
6403
|
-
|
|
6404
|
-
/* global ActiveXObject -- old IE, WSH */
|
|
6405
|
-
var anObject$6 = anObject$a;
|
|
6406
|
-
var definePropertiesModule = objectDefineProperties;
|
|
6407
|
-
var enumBugKeys = enumBugKeys$3;
|
|
6408
|
-
var hiddenKeys = hiddenKeys$4;
|
|
6409
|
-
var html = html$1;
|
|
6410
|
-
var documentCreateElement$1 = documentCreateElement$2;
|
|
6411
|
-
var sharedKey$1 = sharedKey$3;
|
|
6412
|
-
|
|
6413
|
-
var GT = '>';
|
|
6414
|
-
var LT = '<';
|
|
6415
|
-
var PROTOTYPE = 'prototype';
|
|
6416
|
-
var SCRIPT = 'script';
|
|
6417
|
-
var IE_PROTO$1 = sharedKey$1('IE_PROTO');
|
|
6418
|
-
|
|
6419
|
-
var EmptyConstructor = function () { /* empty */ };
|
|
6420
|
-
|
|
6421
|
-
var scriptTag = function (content) {
|
|
6422
|
-
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
6423
|
-
};
|
|
6424
|
-
|
|
6425
|
-
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
6426
|
-
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
6427
|
-
activeXDocument.write(scriptTag(''));
|
|
6428
|
-
activeXDocument.close();
|
|
6429
|
-
var temp = activeXDocument.parentWindow.Object;
|
|
6430
|
-
activeXDocument = null; // avoid memory leak
|
|
6431
|
-
return temp;
|
|
6432
|
-
};
|
|
6433
|
-
|
|
6434
|
-
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
6435
|
-
var NullProtoObjectViaIFrame = function () {
|
|
6436
|
-
// Thrash, waste and sodomy: IE GC bug
|
|
6437
|
-
var iframe = documentCreateElement$1('iframe');
|
|
6438
|
-
var JS = 'java' + SCRIPT + ':';
|
|
6439
|
-
var iframeDocument;
|
|
6440
|
-
iframe.style.display = 'none';
|
|
6441
|
-
html.appendChild(iframe);
|
|
6442
|
-
// https://github.com/zloirock/core-js/issues/475
|
|
6443
|
-
iframe.src = String(JS);
|
|
6444
|
-
iframeDocument = iframe.contentWindow.document;
|
|
6445
|
-
iframeDocument.open();
|
|
6446
|
-
iframeDocument.write(scriptTag('document.F=Object'));
|
|
6447
|
-
iframeDocument.close();
|
|
6448
|
-
return iframeDocument.F;
|
|
6449
|
-
};
|
|
6450
|
-
|
|
6451
|
-
// Check for document.domain and active x support
|
|
6452
|
-
// No need to use active x approach when document.domain is not set
|
|
6453
|
-
// see https://github.com/es-shims/es5-shim/issues/150
|
|
6454
|
-
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
6455
|
-
// avoid IE GC bug
|
|
6456
|
-
var activeXDocument;
|
|
6457
|
-
var NullProtoObject = function () {
|
|
6458
|
-
try {
|
|
6459
|
-
activeXDocument = new ActiveXObject('htmlfile');
|
|
6460
|
-
} catch (error) { /* ignore */ }
|
|
6461
|
-
NullProtoObject = typeof document != 'undefined'
|
|
6462
|
-
? document.domain && activeXDocument
|
|
6463
|
-
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
6464
|
-
: NullProtoObjectViaIFrame()
|
|
6465
|
-
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
6466
|
-
var length = enumBugKeys.length;
|
|
6467
|
-
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
6468
|
-
return NullProtoObject();
|
|
6469
|
-
};
|
|
6470
|
-
|
|
6471
|
-
hiddenKeys[IE_PROTO$1] = true;
|
|
6472
|
-
|
|
6473
|
-
// `Object.create` method
|
|
6474
|
-
// https://tc39.es/ecma262/#sec-object.create
|
|
6475
|
-
// eslint-disable-next-line es/no-object-create -- safe
|
|
6476
|
-
var objectCreate = Object.create || function create(O, Properties) {
|
|
6477
|
-
var result;
|
|
6478
|
-
if (O !== null) {
|
|
6479
|
-
EmptyConstructor[PROTOTYPE] = anObject$6(O);
|
|
6480
|
-
result = new EmptyConstructor();
|
|
6481
|
-
EmptyConstructor[PROTOTYPE] = null;
|
|
6482
|
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
6483
|
-
result[IE_PROTO$1] = O;
|
|
6484
|
-
} else result = NullProtoObject();
|
|
6485
|
-
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
6486
|
-
};
|
|
6487
|
-
|
|
6488
|
-
var wellKnownSymbol$b = wellKnownSymbol$d;
|
|
6489
|
-
var create$1 = objectCreate;
|
|
6490
|
-
var defineProperty$4 = objectDefineProperty.f;
|
|
6491
|
-
|
|
6492
|
-
var UNSCOPABLES = wellKnownSymbol$b('unscopables');
|
|
6493
|
-
var ArrayPrototype$1 = Array.prototype;
|
|
6494
|
-
|
|
6495
|
-
// Array.prototype[@@unscopables]
|
|
6496
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
6497
|
-
if (ArrayPrototype$1[UNSCOPABLES] === undefined) {
|
|
6498
|
-
defineProperty$4(ArrayPrototype$1, UNSCOPABLES, {
|
|
6499
|
-
configurable: true,
|
|
6500
|
-
value: create$1(null)
|
|
6501
|
-
});
|
|
6502
|
-
}
|
|
6503
|
-
|
|
6504
|
-
// add a key to Array.prototype[@@unscopables]
|
|
6505
|
-
var addToUnscopables$2 = function (key) {
|
|
6506
|
-
ArrayPrototype$1[UNSCOPABLES][key] = true;
|
|
6507
|
-
};
|
|
6508
|
-
|
|
6509
|
-
var iterators = {};
|
|
6510
|
-
|
|
6511
|
-
var fails$8 = fails$i;
|
|
6512
|
-
|
|
6513
|
-
var correctPrototypeGetter = !fails$8(function () {
|
|
6514
|
-
function F() { /* empty */ }
|
|
6515
|
-
F.prototype.constructor = null;
|
|
6516
|
-
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
6517
|
-
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
6518
|
-
});
|
|
6519
|
-
|
|
6520
|
-
var hasOwn$3 = hasOwnProperty_1;
|
|
6521
|
-
var isCallable$7 = isCallable$i;
|
|
6522
|
-
var toObject$1 = toObject$4;
|
|
6523
|
-
var sharedKey = sharedKey$3;
|
|
6524
|
-
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
6525
|
-
|
|
6526
|
-
var IE_PROTO = sharedKey('IE_PROTO');
|
|
6527
|
-
var $Object$1 = Object;
|
|
6528
|
-
var ObjectPrototype = $Object$1.prototype;
|
|
6529
|
-
|
|
6530
|
-
// `Object.getPrototypeOf` method
|
|
6531
|
-
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
6532
|
-
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
6533
|
-
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
|
|
6534
|
-
var object = toObject$1(O);
|
|
6535
|
-
if (hasOwn$3(object, IE_PROTO)) return object[IE_PROTO];
|
|
6536
|
-
var constructor = object.constructor;
|
|
6537
|
-
if (isCallable$7(constructor) && object instanceof constructor) {
|
|
6538
|
-
return constructor.prototype;
|
|
6539
|
-
} return object instanceof $Object$1 ? ObjectPrototype : null;
|
|
6540
|
-
};
|
|
6541
|
-
|
|
6542
|
-
var fails$7 = fails$i;
|
|
6543
|
-
var isCallable$6 = isCallable$i;
|
|
6544
|
-
var isObject$5 = isObject$b;
|
|
6545
|
-
var getPrototypeOf$2 = objectGetPrototypeOf;
|
|
6546
|
-
var defineBuiltIn$1 = defineBuiltIn$3;
|
|
6547
|
-
var wellKnownSymbol$a = wellKnownSymbol$d;
|
|
6548
|
-
|
|
6549
|
-
var ITERATOR$6 = wellKnownSymbol$a('iterator');
|
|
6550
|
-
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
6551
|
-
|
|
6552
|
-
// `%IteratorPrototype%` object
|
|
6553
|
-
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
6554
|
-
var IteratorPrototype$3, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
6405
|
+
var NATIVE_BIND$1 = functionBindNative;
|
|
6555
6406
|
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
// Safari 8 has buggy iterators w/o `next`
|
|
6560
|
-
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
|
|
6561
|
-
else {
|
|
6562
|
-
PrototypeOfArrayIteratorPrototype = getPrototypeOf$2(getPrototypeOf$2(arrayIterator));
|
|
6563
|
-
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$3 = PrototypeOfArrayIteratorPrototype;
|
|
6564
|
-
}
|
|
6565
|
-
}
|
|
6407
|
+
var FunctionPrototype = Function.prototype;
|
|
6408
|
+
var apply$2 = FunctionPrototype.apply;
|
|
6409
|
+
var call$7 = FunctionPrototype.call;
|
|
6566
6410
|
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
return IteratorPrototype$3[ITERATOR$6].call(test) !== test;
|
|
6411
|
+
// eslint-disable-next-line es/no-reflect -- safe
|
|
6412
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$7.bind(apply$2) : function () {
|
|
6413
|
+
return call$7.apply(apply$2, arguments);
|
|
6571
6414
|
});
|
|
6572
6415
|
|
|
6573
|
-
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$3 = {};
|
|
6574
|
-
|
|
6575
|
-
// `%IteratorPrototype%[@@iterator]()` method
|
|
6576
|
-
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
6577
|
-
if (!isCallable$6(IteratorPrototype$3[ITERATOR$6])) {
|
|
6578
|
-
defineBuiltIn$1(IteratorPrototype$3, ITERATOR$6, function () {
|
|
6579
|
-
return this;
|
|
6580
|
-
});
|
|
6581
|
-
}
|
|
6582
|
-
|
|
6583
|
-
var iteratorsCore = {
|
|
6584
|
-
IteratorPrototype: IteratorPrototype$3,
|
|
6585
|
-
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
6586
|
-
};
|
|
6587
|
-
|
|
6588
|
-
var defineProperty$3 = objectDefineProperty.f;
|
|
6589
|
-
var hasOwn$2 = hasOwnProperty_1;
|
|
6590
|
-
var wellKnownSymbol$9 = wellKnownSymbol$d;
|
|
6591
|
-
|
|
6592
|
-
var TO_STRING_TAG$3 = wellKnownSymbol$9('toStringTag');
|
|
6593
|
-
|
|
6594
|
-
var setToStringTag$3 = function (target, TAG, STATIC) {
|
|
6595
|
-
if (target && !STATIC) target = target.prototype;
|
|
6596
|
-
if (target && !hasOwn$2(target, TO_STRING_TAG$3)) {
|
|
6597
|
-
defineProperty$3(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
|
|
6598
|
-
}
|
|
6599
|
-
};
|
|
6600
|
-
|
|
6601
|
-
var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
|
|
6602
|
-
var create = objectCreate;
|
|
6603
|
-
var createPropertyDescriptor$2 = createPropertyDescriptor$5;
|
|
6604
|
-
var setToStringTag$2 = setToStringTag$3;
|
|
6605
|
-
var Iterators$4 = iterators;
|
|
6606
|
-
|
|
6607
|
-
var returnThis$1 = function () { return this; };
|
|
6608
|
-
|
|
6609
|
-
var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
6610
|
-
var TO_STRING_TAG = NAME + ' Iterator';
|
|
6611
|
-
IteratorConstructor.prototype = create(IteratorPrototype$2, { next: createPropertyDescriptor$2(+!ENUMERABLE_NEXT, next) });
|
|
6612
|
-
setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
|
|
6613
|
-
Iterators$4[TO_STRING_TAG] = returnThis$1;
|
|
6614
|
-
return IteratorConstructor;
|
|
6615
|
-
};
|
|
6616
|
-
|
|
6617
6416
|
var uncurryThis$b = functionUncurryThis;
|
|
6618
6417
|
var aCallable$4 = aCallable$6;
|
|
6619
6418
|
|
|
@@ -6624,10 +6423,10 @@ var functionUncurryThisAccessor = function (object, key, method) {
|
|
|
6624
6423
|
} catch (error) { /* empty */ }
|
|
6625
6424
|
};
|
|
6626
6425
|
|
|
6627
|
-
var isObject$
|
|
6426
|
+
var isObject$5 = isObject$b;
|
|
6628
6427
|
|
|
6629
6428
|
var isPossiblePrototype$1 = function (argument) {
|
|
6630
|
-
return isObject$
|
|
6429
|
+
return isObject$5(argument) || argument === null;
|
|
6631
6430
|
};
|
|
6632
6431
|
|
|
6633
6432
|
var isPossiblePrototype = isPossiblePrototype$1;
|
|
@@ -6642,7 +6441,7 @@ var aPossiblePrototype$1 = function (argument) {
|
|
|
6642
6441
|
|
|
6643
6442
|
/* eslint-disable no-proto -- safe */
|
|
6644
6443
|
var uncurryThisAccessor$1 = functionUncurryThisAccessor;
|
|
6645
|
-
var isObject$
|
|
6444
|
+
var isObject$4 = isObject$b;
|
|
6646
6445
|
var requireObjectCoercible$2 = requireObjectCoercible$5;
|
|
6647
6446
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
6648
6447
|
|
|
@@ -6662,970 +6461,445 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
6662
6461
|
return function setPrototypeOf(O, proto) {
|
|
6663
6462
|
requireObjectCoercible$2(O);
|
|
6664
6463
|
aPossiblePrototype(proto);
|
|
6665
|
-
if (!isObject$
|
|
6464
|
+
if (!isObject$4(O)) return O;
|
|
6666
6465
|
if (CORRECT_SETTER) setter(O, proto);
|
|
6667
6466
|
else O.__proto__ = proto;
|
|
6668
6467
|
return O;
|
|
6669
6468
|
};
|
|
6670
6469
|
}() : undefined);
|
|
6671
6470
|
|
|
6672
|
-
var
|
|
6673
|
-
var call$7 = functionCall;
|
|
6674
|
-
var FunctionName = functionName;
|
|
6675
|
-
var isCallable$5 = isCallable$i;
|
|
6676
|
-
var createIteratorConstructor = iteratorCreateConstructor;
|
|
6677
|
-
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
6678
|
-
var setPrototypeOf$2 = objectSetPrototypeOf;
|
|
6679
|
-
var setToStringTag$1 = setToStringTag$3;
|
|
6680
|
-
var createNonEnumerableProperty$4 = createNonEnumerableProperty$7;
|
|
6681
|
-
var defineBuiltIn = defineBuiltIn$3;
|
|
6682
|
-
var wellKnownSymbol$8 = wellKnownSymbol$d;
|
|
6683
|
-
var Iterators$3 = iterators;
|
|
6684
|
-
var IteratorsCore = iteratorsCore;
|
|
6685
|
-
|
|
6686
|
-
var PROPER_FUNCTION_NAME = FunctionName.PROPER;
|
|
6687
|
-
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
|
6688
|
-
var IteratorPrototype$1 = IteratorsCore.IteratorPrototype;
|
|
6689
|
-
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
6690
|
-
var ITERATOR$5 = wellKnownSymbol$8('iterator');
|
|
6691
|
-
var KEYS = 'keys';
|
|
6692
|
-
var VALUES = 'values';
|
|
6693
|
-
var ENTRIES = 'entries';
|
|
6694
|
-
|
|
6695
|
-
var returnThis = function () { return this; };
|
|
6471
|
+
var defineProperty$4 = objectDefineProperty.f;
|
|
6696
6472
|
|
|
6697
|
-
var
|
|
6698
|
-
|
|
6473
|
+
var proxyAccessor$1 = function (Target, Source, key) {
|
|
6474
|
+
key in Target || defineProperty$4(Target, key, {
|
|
6475
|
+
configurable: true,
|
|
6476
|
+
get: function () { return Source[key]; },
|
|
6477
|
+
set: function (it) { Source[key] = it; }
|
|
6478
|
+
});
|
|
6479
|
+
};
|
|
6699
6480
|
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6481
|
+
var isCallable$7 = isCallable$i;
|
|
6482
|
+
var isObject$3 = isObject$b;
|
|
6483
|
+
var setPrototypeOf$2 = objectSetPrototypeOf;
|
|
6703
6484
|
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6485
|
+
// makes subclassing work correct for wrapped built-ins
|
|
6486
|
+
var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
|
|
6487
|
+
var NewTarget, NewTargetPrototype;
|
|
6488
|
+
if (
|
|
6489
|
+
// it can work only with native `setPrototypeOf`
|
|
6490
|
+
setPrototypeOf$2 &&
|
|
6491
|
+
// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
|
|
6492
|
+
isCallable$7(NewTarget = dummy.constructor) &&
|
|
6493
|
+
NewTarget !== Wrapper &&
|
|
6494
|
+
isObject$3(NewTargetPrototype = NewTarget.prototype) &&
|
|
6495
|
+
NewTargetPrototype !== Wrapper.prototype
|
|
6496
|
+
) setPrototypeOf$2($this, NewTargetPrototype);
|
|
6497
|
+
return $this;
|
|
6498
|
+
};
|
|
6709
6499
|
|
|
6710
|
-
|
|
6711
|
-
};
|
|
6500
|
+
var wellKnownSymbol$b = wellKnownSymbol$d;
|
|
6712
6501
|
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
var IterablePrototype = Iterable.prototype;
|
|
6716
|
-
var nativeIterator = IterablePrototype[ITERATOR$5]
|
|
6717
|
-
|| IterablePrototype['@@iterator']
|
|
6718
|
-
|| DEFAULT && IterablePrototype[DEFAULT];
|
|
6719
|
-
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
|
|
6720
|
-
var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
|
|
6721
|
-
var CurrentIteratorPrototype, methods, KEY;
|
|
6502
|
+
var TO_STRING_TAG$3 = wellKnownSymbol$b('toStringTag');
|
|
6503
|
+
var test = {};
|
|
6722
6504
|
|
|
6723
|
-
|
|
6724
|
-
if (anyNativeIterator) {
|
|
6725
|
-
CurrentIteratorPrototype = getPrototypeOf$1(anyNativeIterator.call(new Iterable()));
|
|
6726
|
-
if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
|
|
6727
|
-
if (getPrototypeOf$1(CurrentIteratorPrototype) !== IteratorPrototype$1) {
|
|
6728
|
-
if (setPrototypeOf$2) {
|
|
6729
|
-
setPrototypeOf$2(CurrentIteratorPrototype, IteratorPrototype$1);
|
|
6730
|
-
} else if (!isCallable$5(CurrentIteratorPrototype[ITERATOR$5])) {
|
|
6731
|
-
defineBuiltIn(CurrentIteratorPrototype, ITERATOR$5, returnThis);
|
|
6732
|
-
}
|
|
6733
|
-
}
|
|
6734
|
-
// Set @@toStringTag to native iterators
|
|
6735
|
-
setToStringTag$1(CurrentIteratorPrototype, TO_STRING_TAG, true);
|
|
6736
|
-
}
|
|
6737
|
-
}
|
|
6505
|
+
test[TO_STRING_TAG$3] = 'z';
|
|
6738
6506
|
|
|
6739
|
-
|
|
6740
|
-
if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
6741
|
-
if (CONFIGURABLE_FUNCTION_NAME) {
|
|
6742
|
-
createNonEnumerableProperty$4(IterablePrototype, 'name', VALUES);
|
|
6743
|
-
} else {
|
|
6744
|
-
INCORRECT_VALUES_NAME = true;
|
|
6745
|
-
defaultIterator = function values() { return call$7(nativeIterator, this); };
|
|
6746
|
-
}
|
|
6747
|
-
}
|
|
6507
|
+
var toStringTagSupport = String(test) === '[object z]';
|
|
6748
6508
|
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
|
|
6754
|
-
entries: getIterationMethod(ENTRIES)
|
|
6755
|
-
};
|
|
6756
|
-
if (FORCED) for (KEY in methods) {
|
|
6757
|
-
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
6758
|
-
defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
|
|
6759
|
-
}
|
|
6760
|
-
} else $$f({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
6761
|
-
}
|
|
6509
|
+
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
6510
|
+
var isCallable$6 = isCallable$i;
|
|
6511
|
+
var classofRaw$1 = classofRaw$2;
|
|
6512
|
+
var wellKnownSymbol$a = wellKnownSymbol$d;
|
|
6762
6513
|
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
defineBuiltIn(IterablePrototype, ITERATOR$5, defaultIterator, { name: DEFAULT });
|
|
6766
|
-
}
|
|
6767
|
-
Iterators$3[NAME] = defaultIterator;
|
|
6514
|
+
var TO_STRING_TAG$2 = wellKnownSymbol$a('toStringTag');
|
|
6515
|
+
var $Object$1 = Object;
|
|
6768
6516
|
|
|
6769
|
-
|
|
6770
|
-
};
|
|
6517
|
+
// ES3 wrong here
|
|
6518
|
+
var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
|
|
6771
6519
|
|
|
6772
|
-
//
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6520
|
+
// fallback for IE11 Script Access Denied error
|
|
6521
|
+
var tryGet = function (it, key) {
|
|
6522
|
+
try {
|
|
6523
|
+
return it[key];
|
|
6524
|
+
} catch (error) { /* empty */ }
|
|
6776
6525
|
};
|
|
6777
6526
|
|
|
6778
|
-
|
|
6779
|
-
var
|
|
6780
|
-
var
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6527
|
+
// getting tag from ES6+ `Object.prototype.toString`
|
|
6528
|
+
var classof$5 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
|
|
6529
|
+
var O, tag, result;
|
|
6530
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
6531
|
+
// @@toStringTag case
|
|
6532
|
+
: typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG$2)) == 'string' ? tag
|
|
6533
|
+
// builtinTag case
|
|
6534
|
+
: CORRECT_ARGUMENTS ? classofRaw$1(O)
|
|
6535
|
+
// ES3 arguments fallback
|
|
6536
|
+
: (result = classofRaw$1(O)) === 'Object' && isCallable$6(O.callee) ? 'Arguments' : result;
|
|
6537
|
+
};
|
|
6786
6538
|
|
|
6787
|
-
var
|
|
6788
|
-
var setInternalState = InternalStateModule.set;
|
|
6789
|
-
var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
|
|
6539
|
+
var classof$4 = classof$5;
|
|
6790
6540
|
|
|
6791
|
-
|
|
6792
|
-
// https://tc39.es/ecma262/#sec-array.prototype.entries
|
|
6793
|
-
// `Array.prototype.keys` method
|
|
6794
|
-
// https://tc39.es/ecma262/#sec-array.prototype.keys
|
|
6795
|
-
// `Array.prototype.values` method
|
|
6796
|
-
// https://tc39.es/ecma262/#sec-array.prototype.values
|
|
6797
|
-
// `Array.prototype[@@iterator]` method
|
|
6798
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
|
|
6799
|
-
// `CreateArrayIterator` internal method
|
|
6800
|
-
// https://tc39.es/ecma262/#sec-createarrayiterator
|
|
6801
|
-
var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
|
|
6802
|
-
setInternalState(this, {
|
|
6803
|
-
type: ARRAY_ITERATOR,
|
|
6804
|
-
target: toIndexedObject(iterated), // target
|
|
6805
|
-
index: 0, // next index
|
|
6806
|
-
kind: kind // kind
|
|
6807
|
-
});
|
|
6808
|
-
// `%ArrayIteratorPrototype%.next` method
|
|
6809
|
-
// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
|
|
6810
|
-
}, function () {
|
|
6811
|
-
var state = getInternalState(this);
|
|
6812
|
-
var target = state.target;
|
|
6813
|
-
var index = state.index++;
|
|
6814
|
-
if (!target || index >= target.length) {
|
|
6815
|
-
state.target = undefined;
|
|
6816
|
-
return createIterResultObject(undefined, true);
|
|
6817
|
-
}
|
|
6818
|
-
switch (state.kind) {
|
|
6819
|
-
case 'keys': return createIterResultObject(index, false);
|
|
6820
|
-
case 'values': return createIterResultObject(target[index], false);
|
|
6821
|
-
} return createIterResultObject([index, target[index]], false);
|
|
6822
|
-
}, 'values');
|
|
6541
|
+
var $String$1 = String;
|
|
6823
6542
|
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6543
|
+
var toString$5 = function (argument) {
|
|
6544
|
+
if (classof$4(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
|
|
6545
|
+
return $String$1(argument);
|
|
6546
|
+
};
|
|
6828
6547
|
|
|
6829
|
-
|
|
6830
|
-
addToUnscopables$1('keys');
|
|
6831
|
-
addToUnscopables$1('values');
|
|
6832
|
-
addToUnscopables$1('entries');
|
|
6548
|
+
var toString$4 = toString$5;
|
|
6833
6549
|
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
} catch (error) { /* empty */ }
|
|
6550
|
+
var normalizeStringArgument$1 = function (argument, $default) {
|
|
6551
|
+
return argument === undefined ? arguments.length < 2 ? '' : $default : toString$4(argument);
|
|
6552
|
+
};
|
|
6838
6553
|
|
|
6839
|
-
var
|
|
6554
|
+
var isObject$2 = isObject$b;
|
|
6555
|
+
var createNonEnumerableProperty$4 = createNonEnumerableProperty$7;
|
|
6840
6556
|
|
|
6841
|
-
// `
|
|
6842
|
-
// https://tc39.es/
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6557
|
+
// `InstallErrorCause` abstract operation
|
|
6558
|
+
// https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
|
|
6559
|
+
var installErrorCause$1 = function (O, options) {
|
|
6560
|
+
if (isObject$2(options) && 'cause' in options) {
|
|
6561
|
+
createNonEnumerableProperty$4(O, 'cause', options.cause);
|
|
6562
|
+
}
|
|
6846
6563
|
};
|
|
6847
6564
|
|
|
6848
|
-
var
|
|
6849
|
-
var isArray$1 = isArray$2;
|
|
6565
|
+
var uncurryThis$a = functionUncurryThis;
|
|
6850
6566
|
|
|
6851
|
-
var $
|
|
6852
|
-
|
|
6853
|
-
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
6567
|
+
var $Error = Error;
|
|
6568
|
+
var replace$2 = uncurryThis$a(''.replace);
|
|
6854
6569
|
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
try {
|
|
6860
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
6861
|
-
Object.defineProperty([], 'length', { writable: false }).length = 1;
|
|
6862
|
-
} catch (error) {
|
|
6863
|
-
return error instanceof TypeError;
|
|
6864
|
-
}
|
|
6865
|
-
}();
|
|
6570
|
+
var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
|
|
6571
|
+
// eslint-disable-next-line redos/no-vulnerable -- safe
|
|
6572
|
+
var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
|
|
6573
|
+
var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
|
|
6866
6574
|
|
|
6867
|
-
var
|
|
6868
|
-
if (
|
|
6869
|
-
|
|
6870
|
-
} return
|
|
6871
|
-
} : function (O, length) {
|
|
6872
|
-
return O.length = length;
|
|
6575
|
+
var errorStackClear = function (stack, dropEntries) {
|
|
6576
|
+
if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
|
|
6577
|
+
while (dropEntries--) stack = replace$2(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
|
|
6578
|
+
} return stack;
|
|
6873
6579
|
};
|
|
6874
6580
|
|
|
6875
|
-
var $
|
|
6876
|
-
var
|
|
6581
|
+
var fails$8 = fails$i;
|
|
6582
|
+
var createPropertyDescriptor$2 = createPropertyDescriptor$5;
|
|
6877
6583
|
|
|
6878
|
-
var
|
|
6879
|
-
|
|
6880
|
-
return
|
|
6881
|
-
|
|
6584
|
+
var errorStackInstallable = !fails$8(function () {
|
|
6585
|
+
var error = new Error('a');
|
|
6586
|
+
if (!('stack' in error)) return true;
|
|
6587
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
6588
|
+
Object.defineProperty(error, 'stack', createPropertyDescriptor$2(1, 7));
|
|
6589
|
+
return error.stack !== 7;
|
|
6590
|
+
});
|
|
6882
6591
|
|
|
6883
|
-
var
|
|
6884
|
-
var
|
|
6885
|
-
var
|
|
6886
|
-
var setArrayLength = arraySetLength;
|
|
6887
|
-
var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
|
|
6888
|
-
var fails$6 = fails$i;
|
|
6592
|
+
var createNonEnumerableProperty$3 = createNonEnumerableProperty$7;
|
|
6593
|
+
var clearErrorStack = errorStackClear;
|
|
6594
|
+
var ERROR_STACK_INSTALLABLE = errorStackInstallable;
|
|
6889
6595
|
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
});
|
|
6596
|
+
// non-standard V8
|
|
6597
|
+
var captureStackTrace = Error.captureStackTrace;
|
|
6893
6598
|
|
|
6894
|
-
|
|
6895
|
-
|
|
6896
|
-
|
|
6897
|
-
|
|
6898
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
6899
|
-
Object.defineProperty([], 'length', { writable: false }).push();
|
|
6900
|
-
} catch (error) {
|
|
6901
|
-
return error instanceof TypeError;
|
|
6599
|
+
var errorStackInstall = function (error, C, stack, dropEntries) {
|
|
6600
|
+
if (ERROR_STACK_INSTALLABLE) {
|
|
6601
|
+
if (captureStackTrace) captureStackTrace(error, C);
|
|
6602
|
+
else createNonEnumerableProperty$3(error, 'stack', clearErrorStack(stack, dropEntries));
|
|
6902
6603
|
}
|
|
6903
6604
|
};
|
|
6904
6605
|
|
|
6905
|
-
var
|
|
6606
|
+
var getBuiltIn$3 = getBuiltIn$6;
|
|
6607
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
6608
|
+
var createNonEnumerableProperty$2 = createNonEnumerableProperty$7;
|
|
6609
|
+
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
6610
|
+
var setPrototypeOf$1 = objectSetPrototypeOf;
|
|
6611
|
+
var copyConstructorProperties = copyConstructorProperties$2;
|
|
6612
|
+
var proxyAccessor = proxyAccessor$1;
|
|
6613
|
+
var inheritIfRequired = inheritIfRequired$1;
|
|
6614
|
+
var normalizeStringArgument = normalizeStringArgument$1;
|
|
6615
|
+
var installErrorCause = installErrorCause$1;
|
|
6616
|
+
var installErrorStack = errorStackInstall;
|
|
6617
|
+
var DESCRIPTORS$5 = descriptors;
|
|
6906
6618
|
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
var len = lengthOfArrayLike$1(O);
|
|
6914
|
-
var argCount = arguments.length;
|
|
6915
|
-
doesNotExceedSafeInteger(len + argCount);
|
|
6916
|
-
for (var i = 0; i < argCount; i++) {
|
|
6917
|
-
O[len] = arguments[i];
|
|
6918
|
-
len++;
|
|
6919
|
-
}
|
|
6920
|
-
setArrayLength(O, len);
|
|
6921
|
-
return len;
|
|
6922
|
-
}
|
|
6923
|
-
});
|
|
6619
|
+
var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
|
|
6620
|
+
var STACK_TRACE_LIMIT = 'stackTraceLimit';
|
|
6621
|
+
var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
|
|
6622
|
+
var path = FULL_NAME.split('.');
|
|
6623
|
+
var ERROR_NAME = path[path.length - 1];
|
|
6624
|
+
var OriginalError = getBuiltIn$3.apply(null, path);
|
|
6924
6625
|
|
|
6925
|
-
|
|
6926
|
-
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
6927
|
-
var domIterables = {
|
|
6928
|
-
CSSRuleList: 0,
|
|
6929
|
-
CSSStyleDeclaration: 0,
|
|
6930
|
-
CSSValueList: 0,
|
|
6931
|
-
ClientRectList: 0,
|
|
6932
|
-
DOMRectList: 0,
|
|
6933
|
-
DOMStringList: 0,
|
|
6934
|
-
DOMTokenList: 1,
|
|
6935
|
-
DataTransferItemList: 0,
|
|
6936
|
-
FileList: 0,
|
|
6937
|
-
HTMLAllCollection: 0,
|
|
6938
|
-
HTMLCollection: 0,
|
|
6939
|
-
HTMLFormElement: 0,
|
|
6940
|
-
HTMLSelectElement: 0,
|
|
6941
|
-
MediaList: 0,
|
|
6942
|
-
MimeTypeArray: 0,
|
|
6943
|
-
NamedNodeMap: 0,
|
|
6944
|
-
NodeList: 1,
|
|
6945
|
-
PaintRequestList: 0,
|
|
6946
|
-
Plugin: 0,
|
|
6947
|
-
PluginArray: 0,
|
|
6948
|
-
SVGLengthList: 0,
|
|
6949
|
-
SVGNumberList: 0,
|
|
6950
|
-
SVGPathSegList: 0,
|
|
6951
|
-
SVGPointList: 0,
|
|
6952
|
-
SVGStringList: 0,
|
|
6953
|
-
SVGTransformList: 0,
|
|
6954
|
-
SourceBufferList: 0,
|
|
6955
|
-
StyleSheetList: 0,
|
|
6956
|
-
TextTrackCueList: 0,
|
|
6957
|
-
TextTrackList: 0,
|
|
6958
|
-
TouchList: 0
|
|
6959
|
-
};
|
|
6626
|
+
if (!OriginalError) return;
|
|
6960
6627
|
|
|
6961
|
-
|
|
6962
|
-
var documentCreateElement = documentCreateElement$2;
|
|
6628
|
+
var OriginalErrorPrototype = OriginalError.prototype;
|
|
6963
6629
|
|
|
6964
|
-
|
|
6965
|
-
|
|
6630
|
+
// V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
|
|
6631
|
+
if (hasOwn$3(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
|
|
6966
6632
|
|
|
6967
|
-
|
|
6633
|
+
if (!FORCED) return OriginalError;
|
|
6968
6634
|
|
|
6969
|
-
var
|
|
6970
|
-
var DOMIterables = domIterables;
|
|
6971
|
-
var DOMTokenListPrototype = domTokenListPrototype;
|
|
6972
|
-
var ArrayIteratorMethods = es_array_iterator;
|
|
6973
|
-
var createNonEnumerableProperty$3 = createNonEnumerableProperty$7;
|
|
6974
|
-
var setToStringTag = setToStringTag$3;
|
|
6975
|
-
var wellKnownSymbol$7 = wellKnownSymbol$d;
|
|
6635
|
+
var BaseError = getBuiltIn$3('Error');
|
|
6976
6636
|
|
|
6977
|
-
var
|
|
6978
|
-
var
|
|
6637
|
+
var WrappedError = wrapper(function (a, b) {
|
|
6638
|
+
var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
|
|
6639
|
+
var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
|
|
6640
|
+
if (message !== undefined) createNonEnumerableProperty$2(result, 'message', message);
|
|
6641
|
+
installErrorStack(result, WrappedError, result.stack, 2);
|
|
6642
|
+
if (this && isPrototypeOf$2(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
|
|
6643
|
+
if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
|
|
6644
|
+
return result;
|
|
6645
|
+
});
|
|
6979
6646
|
|
|
6980
|
-
|
|
6981
|
-
if (CollectionPrototype) {
|
|
6982
|
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
6983
|
-
if (CollectionPrototype[ITERATOR$4] !== ArrayValues) try {
|
|
6984
|
-
createNonEnumerableProperty$3(CollectionPrototype, ITERATOR$4, ArrayValues);
|
|
6985
|
-
} catch (error) {
|
|
6986
|
-
CollectionPrototype[ITERATOR$4] = ArrayValues;
|
|
6987
|
-
}
|
|
6988
|
-
setToStringTag(CollectionPrototype, COLLECTION_NAME, true);
|
|
6989
|
-
if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
|
|
6990
|
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
6991
|
-
if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
|
|
6992
|
-
createNonEnumerableProperty$3(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
|
|
6993
|
-
} catch (error) {
|
|
6994
|
-
CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
|
|
6995
|
-
}
|
|
6996
|
-
}
|
|
6997
|
-
}
|
|
6998
|
-
};
|
|
6647
|
+
WrappedError.prototype = OriginalErrorPrototype;
|
|
6999
6648
|
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
}
|
|
6649
|
+
if (ERROR_NAME !== 'Error') {
|
|
6650
|
+
if (setPrototypeOf$1) setPrototypeOf$1(WrappedError, BaseError);
|
|
6651
|
+
else copyConstructorProperties(WrappedError, BaseError, { name: true });
|
|
6652
|
+
} else if (DESCRIPTORS$5 && STACK_TRACE_LIMIT in OriginalError) {
|
|
6653
|
+
proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
|
|
6654
|
+
proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
|
|
6655
|
+
}
|
|
7003
6656
|
|
|
7004
|
-
|
|
6657
|
+
copyConstructorProperties(WrappedError, OriginalError);
|
|
7005
6658
|
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
results.push(yield resolvable());
|
|
6659
|
+
try {
|
|
6660
|
+
// Safari 13- bug: WebAssembly errors does not have a proper `.name`
|
|
6661
|
+
if (OriginalErrorPrototype.name !== ERROR_NAME) {
|
|
6662
|
+
createNonEnumerableProperty$2(OriginalErrorPrototype, 'name', ERROR_NAME);
|
|
7011
6663
|
}
|
|
7012
|
-
|
|
7013
|
-
})
|
|
7014
|
-
}
|
|
6664
|
+
OriginalErrorPrototype.constructor = WrappedError;
|
|
6665
|
+
} catch (error) { /* empty */ }
|
|
7015
6666
|
|
|
7016
|
-
|
|
6667
|
+
return WrappedError;
|
|
6668
|
+
};
|
|
7017
6669
|
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
if (ArraysUtils.isArrayAndContainItems(array)) array.push(object);else array = [object];
|
|
7024
|
-
}
|
|
7025
|
-
}
|
|
6670
|
+
/* eslint-disable no-unused-vars -- required for functions `.length` */
|
|
6671
|
+
var $$f = _export;
|
|
6672
|
+
var global$4 = global$f;
|
|
6673
|
+
var apply$1 = functionApply;
|
|
6674
|
+
var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
|
|
7026
6675
|
|
|
7027
|
-
var
|
|
7028
|
-
var
|
|
7029
|
-
var fails$5 = fails$i;
|
|
7030
|
-
var addToUnscopables = addToUnscopables$2;
|
|
6676
|
+
var WEB_ASSEMBLY = 'WebAssembly';
|
|
6677
|
+
var WebAssembly = global$4[WEB_ASSEMBLY];
|
|
7031
6678
|
|
|
7032
|
-
//
|
|
7033
|
-
var
|
|
7034
|
-
// eslint-disable-next-line es/no-array-prototype-includes -- detection
|
|
7035
|
-
return !Array(1).includes();
|
|
7036
|
-
});
|
|
6679
|
+
// eslint-disable-next-line es/no-error-cause -- feature detection
|
|
6680
|
+
var FORCED$3 = new Error('e', { cause: 7 }).cause !== 7;
|
|
7037
6681
|
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
6682
|
+
var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
|
|
6683
|
+
var O = {};
|
|
6684
|
+
O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$3);
|
|
6685
|
+
$$f({ global: true, constructor: true, arity: 1, forced: FORCED$3 }, O);
|
|
6686
|
+
};
|
|
6687
|
+
|
|
6688
|
+
var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
|
|
6689
|
+
if (WebAssembly && WebAssembly[ERROR_NAME]) {
|
|
6690
|
+
var O = {};
|
|
6691
|
+
O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$3);
|
|
6692
|
+
$$f({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$3 }, O);
|
|
7043
6693
|
}
|
|
6694
|
+
};
|
|
6695
|
+
|
|
6696
|
+
// https://tc39.es/ecma262/#sec-nativeerror
|
|
6697
|
+
exportGlobalErrorCauseWrapper('Error', function (init) {
|
|
6698
|
+
return function Error(message) { return apply$1(init, this, arguments); };
|
|
6699
|
+
});
|
|
6700
|
+
exportGlobalErrorCauseWrapper('EvalError', function (init) {
|
|
6701
|
+
return function EvalError(message) { return apply$1(init, this, arguments); };
|
|
6702
|
+
});
|
|
6703
|
+
exportGlobalErrorCauseWrapper('RangeError', function (init) {
|
|
6704
|
+
return function RangeError(message) { return apply$1(init, this, arguments); };
|
|
6705
|
+
});
|
|
6706
|
+
exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
|
|
6707
|
+
return function ReferenceError(message) { return apply$1(init, this, arguments); };
|
|
6708
|
+
});
|
|
6709
|
+
exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
|
|
6710
|
+
return function SyntaxError(message) { return apply$1(init, this, arguments); };
|
|
6711
|
+
});
|
|
6712
|
+
exportGlobalErrorCauseWrapper('TypeError', function (init) {
|
|
6713
|
+
return function TypeError(message) { return apply$1(init, this, arguments); };
|
|
6714
|
+
});
|
|
6715
|
+
exportGlobalErrorCauseWrapper('URIError', function (init) {
|
|
6716
|
+
return function URIError(message) { return apply$1(init, this, arguments); };
|
|
6717
|
+
});
|
|
6718
|
+
exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
|
|
6719
|
+
return function CompileError(message) { return apply$1(init, this, arguments); };
|
|
6720
|
+
});
|
|
6721
|
+
exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
|
|
6722
|
+
return function LinkError(message) { return apply$1(init, this, arguments); };
|
|
6723
|
+
});
|
|
6724
|
+
exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
|
|
6725
|
+
return function RuntimeError(message) { return apply$1(init, this, arguments); };
|
|
7044
6726
|
});
|
|
7045
6727
|
|
|
7046
|
-
|
|
7047
|
-
addToUnscopables('includes');
|
|
6728
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
7048
6729
|
|
|
7049
|
-
var
|
|
7050
|
-
var classof$4 = classofRaw$2;
|
|
7051
|
-
var wellKnownSymbol$6 = wellKnownSymbol$d;
|
|
6730
|
+
var arraySlice$1 = uncurryThis$9([].slice);
|
|
7052
6731
|
|
|
7053
|
-
var
|
|
6732
|
+
var classof$3 = classofRaw$2;
|
|
7054
6733
|
|
|
7055
|
-
// `
|
|
7056
|
-
// https://tc39.es/ecma262/#sec-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
return
|
|
6734
|
+
// `IsArray` abstract operation
|
|
6735
|
+
// https://tc39.es/ecma262/#sec-isarray
|
|
6736
|
+
// eslint-disable-next-line es/no-array-isarray -- safe
|
|
6737
|
+
var isArray$2 = Array.isArray || function isArray(argument) {
|
|
6738
|
+
return classof$3(argument) === 'Array';
|
|
7060
6739
|
};
|
|
7061
6740
|
|
|
7062
|
-
var
|
|
6741
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
6742
|
+
var isArray$1 = isArray$2;
|
|
6743
|
+
var isCallable$5 = isCallable$i;
|
|
6744
|
+
var classof$2 = classofRaw$2;
|
|
6745
|
+
var toString$3 = toString$5;
|
|
7063
6746
|
|
|
7064
|
-
var
|
|
6747
|
+
var push = uncurryThis$8([].push);
|
|
7065
6748
|
|
|
7066
|
-
var
|
|
7067
|
-
if (
|
|
7068
|
-
|
|
7069
|
-
|
|
6749
|
+
var getJsonReplacerFunction = function (replacer) {
|
|
6750
|
+
if (isCallable$5(replacer)) return replacer;
|
|
6751
|
+
if (!isArray$1(replacer)) return;
|
|
6752
|
+
var rawLength = replacer.length;
|
|
6753
|
+
var keys = [];
|
|
6754
|
+
for (var i = 0; i < rawLength; i++) {
|
|
6755
|
+
var element = replacer[i];
|
|
6756
|
+
if (typeof element == 'string') push(keys, element);
|
|
6757
|
+
else if (typeof element == 'number' || classof$2(element) === 'Number' || classof$2(element) === 'String') push(keys, toString$3(element));
|
|
6758
|
+
}
|
|
6759
|
+
var keysLength = keys.length;
|
|
6760
|
+
var root = true;
|
|
6761
|
+
return function (key, value) {
|
|
6762
|
+
if (root) {
|
|
6763
|
+
root = false;
|
|
6764
|
+
return value;
|
|
6765
|
+
}
|
|
6766
|
+
if (isArray$1(this)) return value;
|
|
6767
|
+
for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;
|
|
6768
|
+
};
|
|
7070
6769
|
};
|
|
7071
6770
|
|
|
7072
|
-
var
|
|
7073
|
-
|
|
7074
|
-
var
|
|
7075
|
-
var
|
|
6771
|
+
var $$e = _export;
|
|
6772
|
+
var getBuiltIn$2 = getBuiltIn$6;
|
|
6773
|
+
var apply = functionApply;
|
|
6774
|
+
var call$6 = functionCall;
|
|
6775
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
6776
|
+
var fails$7 = fails$i;
|
|
6777
|
+
var isCallable$4 = isCallable$i;
|
|
6778
|
+
var isSymbol = isSymbol$3;
|
|
6779
|
+
var arraySlice = arraySlice$1;
|
|
6780
|
+
var getReplacerFunction = getJsonReplacerFunction;
|
|
6781
|
+
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
7076
6782
|
|
|
7077
|
-
|
|
6783
|
+
var $String = String;
|
|
6784
|
+
var $stringify = getBuiltIn$2('JSON', 'stringify');
|
|
6785
|
+
var exec$1 = uncurryThis$7(/./.exec);
|
|
6786
|
+
var charAt = uncurryThis$7(''.charAt);
|
|
6787
|
+
var charCodeAt = uncurryThis$7(''.charCodeAt);
|
|
6788
|
+
var replace$1 = uncurryThis$7(''.replace);
|
|
6789
|
+
var numberToString = uncurryThis$7(1.0.toString);
|
|
7078
6790
|
|
|
7079
|
-
var
|
|
6791
|
+
var tester = /[\uD800-\uDFFF]/g;
|
|
6792
|
+
var low = /^[\uD800-\uDBFF]$/;
|
|
6793
|
+
var hi = /^[\uDC00-\uDFFF]$/;
|
|
7080
6794
|
|
|
7081
|
-
var
|
|
7082
|
-
var
|
|
7083
|
-
|
|
7084
|
-
|
|
6795
|
+
var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$7(function () {
|
|
6796
|
+
var symbol = getBuiltIn$2('Symbol')('stringify detection');
|
|
6797
|
+
// MS Edge converts symbol values to JSON as {}
|
|
6798
|
+
return $stringify([symbol]) !== '[null]'
|
|
6799
|
+
// WebKit converts symbol values to JSON as null
|
|
6800
|
+
|| $stringify({ a: symbol }) !== '{}'
|
|
6801
|
+
// V8 throws on boxed symbols
|
|
6802
|
+
|| $stringify(Object(symbol)) !== '{}';
|
|
6803
|
+
});
|
|
7085
6804
|
|
|
7086
|
-
|
|
7087
|
-
var
|
|
6805
|
+
// https://github.com/tc39/proposal-well-formed-stringify
|
|
6806
|
+
var ILL_FORMED_UNICODE = fails$7(function () {
|
|
6807
|
+
return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
|
|
6808
|
+
|| $stringify('\uDEAD') !== '"\\udead"';
|
|
6809
|
+
});
|
|
7088
6810
|
|
|
7089
|
-
|
|
7090
|
-
var
|
|
6811
|
+
var stringifyWithSymbolsFix = function (it, replacer) {
|
|
6812
|
+
var args = arraySlice(arguments);
|
|
6813
|
+
var $replacer = getReplacerFunction(replacer);
|
|
6814
|
+
if (!isCallable$4($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined
|
|
6815
|
+
args[1] = function (key, value) {
|
|
6816
|
+
// some old implementations (like WebKit) could pass numbers as keys
|
|
6817
|
+
if (isCallable$4($replacer)) value = call$6($replacer, this, $String(key), value);
|
|
6818
|
+
if (!isSymbol(value)) return value;
|
|
6819
|
+
};
|
|
6820
|
+
return apply($stringify, null, args);
|
|
6821
|
+
};
|
|
7091
6822
|
|
|
7092
|
-
|
|
7093
|
-
var
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
6823
|
+
var fixIllFormed = function (match, offset, string) {
|
|
6824
|
+
var prev = charAt(string, offset - 1);
|
|
6825
|
+
var next = charAt(string, offset + 1);
|
|
6826
|
+
if ((exec$1(low, match) && !exec$1(hi, next)) || (exec$1(hi, match) && !exec$1(low, prev))) {
|
|
6827
|
+
return '\\u' + numberToString(charCodeAt(match, 0), 16);
|
|
6828
|
+
} return match;
|
|
7097
6829
|
};
|
|
7098
6830
|
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
|
|
7102
|
-
|
|
7103
|
-
//
|
|
7104
|
-
:
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
: (result = classofRaw$1(O)) === 'Object' && isCallable$4(O.callee) ? 'Arguments' : result;
|
|
7109
|
-
};
|
|
7110
|
-
|
|
7111
|
-
var classof$2 = classof$3;
|
|
7112
|
-
|
|
7113
|
-
var $String$1 = String;
|
|
7114
|
-
|
|
7115
|
-
var toString$5 = function (argument) {
|
|
7116
|
-
if (classof$2(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
|
|
7117
|
-
return $String$1(argument);
|
|
7118
|
-
};
|
|
7119
|
-
|
|
7120
|
-
var wellKnownSymbol$3 = wellKnownSymbol$d;
|
|
7121
|
-
|
|
7122
|
-
var MATCH = wellKnownSymbol$3('match');
|
|
7123
|
-
|
|
7124
|
-
var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
7125
|
-
var regexp = /./;
|
|
7126
|
-
try {
|
|
7127
|
-
'/./'[METHOD_NAME](regexp);
|
|
7128
|
-
} catch (error1) {
|
|
7129
|
-
try {
|
|
7130
|
-
regexp[MATCH] = false;
|
|
7131
|
-
return '/./'[METHOD_NAME](regexp);
|
|
7132
|
-
} catch (error2) { /* empty */ }
|
|
7133
|
-
} return false;
|
|
7134
|
-
};
|
|
7135
|
-
|
|
7136
|
-
var $$c = _export;
|
|
7137
|
-
var uncurryThis$a = functionUncurryThis;
|
|
7138
|
-
var notARegExp = notARegexp;
|
|
7139
|
-
var requireObjectCoercible$1 = requireObjectCoercible$5;
|
|
7140
|
-
var toString$4 = toString$5;
|
|
7141
|
-
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
7142
|
-
|
|
7143
|
-
var stringIndexOf = uncurryThis$a(''.indexOf);
|
|
7144
|
-
|
|
7145
|
-
// `String.prototype.includes` method
|
|
7146
|
-
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
7147
|
-
$$c({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
|
|
7148
|
-
includes: function includes(searchString /* , position = 0 */) {
|
|
7149
|
-
return !!~stringIndexOf(
|
|
7150
|
-
toString$4(requireObjectCoercible$1(this)),
|
|
7151
|
-
toString$4(notARegExp(searchString)),
|
|
7152
|
-
arguments.length > 1 ? arguments[1] : undefined
|
|
7153
|
-
);
|
|
7154
|
-
}
|
|
7155
|
-
});
|
|
7156
|
-
|
|
7157
|
-
// import LanguageDetector from 'i18next-browser-languagedetector';
|
|
7158
|
-
const LOCAL_STORAGE_I18N_STRING = 'I18N_SELECTION';
|
|
7159
|
-
const systemDefaultLang = 'en';
|
|
7160
|
-
const init = ({
|
|
7161
|
-
version,
|
|
7162
|
-
customPath
|
|
7163
|
-
}) => {
|
|
7164
|
-
const currentLng = localStorage.getItem(LOCAL_STORAGE_I18N_STRING) || systemDefaultLang;
|
|
7165
|
-
i18n.use(Backend) // load translation using http
|
|
7166
|
-
// .use(LanguageDetector) // detect user language
|
|
7167
|
-
.use(initReactI18next) // passes i18n down to react-i18next
|
|
7168
|
-
.init({
|
|
7169
|
-
lng: currentLng,
|
|
7170
|
-
fallbackLng: systemDefaultLang,
|
|
7171
|
-
ns: ['common', 'inbox'],
|
|
7172
|
-
// define your namespaces
|
|
7173
|
-
defaultNS: 'common',
|
|
7174
|
-
interpolation: {
|
|
7175
|
-
escapeValue: false
|
|
7176
|
-
},
|
|
7177
|
-
load: 'languageOnly',
|
|
7178
|
-
backend: {
|
|
7179
|
-
loadPath: customPath ? customPath : `/assets/locales/{{lng}}/{{ns}}.json?v=${version !== null && version !== void 0 ? version : ''}`
|
|
6831
|
+
if ($stringify) {
|
|
6832
|
+
// `JSON.stringify` method
|
|
6833
|
+
// https://tc39.es/ecma262/#sec-json.stringify
|
|
6834
|
+
$$e({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
|
|
6835
|
+
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
6836
|
+
stringify: function stringify(it, replacer, space) {
|
|
6837
|
+
var args = arraySlice(arguments);
|
|
6838
|
+
var result = apply(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);
|
|
6839
|
+
return ILL_FORMED_UNICODE && typeof result == 'string' ? replace$1(result, tester, fixIllFormed) : result;
|
|
7180
6840
|
}
|
|
7181
6841
|
});
|
|
7182
|
-
};
|
|
7183
|
-
const changeLang = lang => {
|
|
7184
|
-
localStorage.setItem(LOCAL_STORAGE_I18N_STRING, lang);
|
|
7185
|
-
i18n.changeLanguage(lang);
|
|
7186
|
-
};
|
|
7187
|
-
const getLang = () => {
|
|
7188
|
-
var _a;
|
|
7189
|
-
return (_a = localStorage.getItem(LOCAL_STORAGE_I18N_STRING)) !== null && _a !== void 0 ? _a : systemDefaultLang;
|
|
7190
|
-
};
|
|
7191
|
-
const LangService = {
|
|
7192
|
-
init,
|
|
7193
|
-
changeLang,
|
|
7194
|
-
getLang
|
|
7195
|
-
};
|
|
7196
|
-
var Languages;
|
|
7197
|
-
(function (Languages) {
|
|
7198
|
-
Languages["EN"] = "en";
|
|
7199
|
-
Languages["AR"] = "ar";
|
|
7200
|
-
Languages["TR"] = "tr";
|
|
7201
|
-
})(Languages || (Languages = {}));
|
|
7202
|
-
|
|
7203
|
-
class StringsUtils {
|
|
7204
|
-
static localCompareStrings(a, b) {
|
|
7205
|
-
const language = LangService.getLang();
|
|
7206
|
-
return a.toLocaleLowerCase(language !== null && language !== void 0 ? language : 'tr').localeCompare(b.toLocaleLowerCase(language !== null && language !== void 0 ? language : 'tr'), language !== null && language !== void 0 ? language : 'tr');
|
|
7207
|
-
}
|
|
7208
|
-
static localeIncludeString(a, b) {
|
|
7209
|
-
const language = LangService.getLang();
|
|
7210
|
-
return a.toLocaleLowerCase(language !== null && language !== void 0 ? language : 'tr').includes(b.toLocaleLowerCase(language !== null && language !== void 0 ? language : 'tr'));
|
|
7211
|
-
}
|
|
7212
|
-
static isStringHasCharacters(text) {
|
|
7213
|
-
return text && text.length > 0;
|
|
7214
|
-
}
|
|
7215
6842
|
}
|
|
7216
6843
|
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
component: BaseComponent,
|
|
7221
|
-
location
|
|
7222
|
-
} = props,
|
|
7223
|
-
rest = __rest(props, ["component", "location"]);
|
|
7224
|
-
const isUserAuthenticated = !!(auth.getToken() && StringsUtils.isStringHasCharacters((_a = auth.getUserInfo()) === null || _a === void 0 ? void 0 : _a.id));
|
|
7225
|
-
const currentToken = auth.getToken();
|
|
7226
|
-
function CheckNavigation() {
|
|
7227
|
-
// if Unauthenticated go to login page
|
|
7228
|
-
if (!currentToken || !isUserAuthenticated) return jsx(Redirect, {
|
|
7229
|
-
to: {
|
|
7230
|
-
pathname: BCRoutes.Login,
|
|
7231
|
-
state: {
|
|
7232
|
-
from: location
|
|
7233
|
-
}
|
|
7234
|
-
}
|
|
7235
|
-
});
|
|
7236
|
-
return jsx(BaseComponent, Object.assign({}, props));
|
|
7237
|
-
}
|
|
7238
|
-
return jsx(Route, Object.assign({}, rest, {
|
|
7239
|
-
render: CheckNavigation
|
|
7240
|
-
}));
|
|
7241
|
-
};
|
|
7242
|
-
|
|
7243
|
-
var NATIVE_BIND$1 = functionBindNative;
|
|
7244
|
-
|
|
7245
|
-
var FunctionPrototype = Function.prototype;
|
|
7246
|
-
var apply$2 = FunctionPrototype.apply;
|
|
7247
|
-
var call$6 = FunctionPrototype.call;
|
|
7248
|
-
|
|
7249
|
-
// eslint-disable-next-line es/no-reflect -- safe
|
|
7250
|
-
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$6.bind(apply$2) : function () {
|
|
7251
|
-
return call$6.apply(apply$2, arguments);
|
|
7252
|
-
});
|
|
7253
|
-
|
|
7254
|
-
var defineProperty$1 = objectDefineProperty.f;
|
|
7255
|
-
|
|
7256
|
-
var proxyAccessor$1 = function (Target, Source, key) {
|
|
7257
|
-
key in Target || defineProperty$1(Target, key, {
|
|
7258
|
-
configurable: true,
|
|
7259
|
-
get: function () { return Source[key]; },
|
|
7260
|
-
set: function (it) { Source[key] = it; }
|
|
7261
|
-
});
|
|
7262
|
-
};
|
|
7263
|
-
|
|
7264
|
-
var isCallable$3 = isCallable$i;
|
|
7265
|
-
var isObject$1 = isObject$b;
|
|
7266
|
-
var setPrototypeOf$1 = objectSetPrototypeOf;
|
|
6844
|
+
// a string of all valid unicode whitespaces
|
|
6845
|
+
var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
|
6846
|
+
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
7267
6847
|
|
|
7268
|
-
|
|
7269
|
-
var
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
// it can work only with native `setPrototypeOf`
|
|
7273
|
-
setPrototypeOf$1 &&
|
|
7274
|
-
// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
|
|
7275
|
-
isCallable$3(NewTarget = dummy.constructor) &&
|
|
7276
|
-
NewTarget !== Wrapper &&
|
|
7277
|
-
isObject$1(NewTargetPrototype = NewTarget.prototype) &&
|
|
7278
|
-
NewTargetPrototype !== Wrapper.prototype
|
|
7279
|
-
) setPrototypeOf$1($this, NewTargetPrototype);
|
|
7280
|
-
return $this;
|
|
7281
|
-
};
|
|
6848
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
6849
|
+
var requireObjectCoercible$1 = requireObjectCoercible$5;
|
|
6850
|
+
var toString$2 = toString$5;
|
|
6851
|
+
var whitespaces$1 = whitespaces$2;
|
|
7282
6852
|
|
|
7283
|
-
var
|
|
6853
|
+
var replace = uncurryThis$6(''.replace);
|
|
6854
|
+
var ltrim = RegExp('^[' + whitespaces$1 + ']+');
|
|
6855
|
+
var rtrim = RegExp('(^|[^' + whitespaces$1 + '])[' + whitespaces$1 + ']+$');
|
|
7284
6856
|
|
|
7285
|
-
|
|
7286
|
-
|
|
6857
|
+
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
6858
|
+
var createMethod = function (TYPE) {
|
|
6859
|
+
return function ($this) {
|
|
6860
|
+
var string = toString$2(requireObjectCoercible$1($this));
|
|
6861
|
+
if (TYPE & 1) string = replace(string, ltrim, '');
|
|
6862
|
+
if (TYPE & 2) string = replace(string, rtrim, '$1');
|
|
6863
|
+
return string;
|
|
6864
|
+
};
|
|
7287
6865
|
};
|
|
7288
6866
|
|
|
7289
|
-
var
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
// https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
|
|
7294
|
-
var installErrorCause$1 = function (O, options) {
|
|
7295
|
-
if (isObject(options) && 'cause' in options) {
|
|
7296
|
-
createNonEnumerableProperty$2(O, 'cause', options.cause);
|
|
7297
|
-
}
|
|
6867
|
+
var stringTrim = {
|
|
6868
|
+
// `String.prototype.trim` method
|
|
6869
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
6870
|
+
trim: createMethod(3)
|
|
7298
6871
|
};
|
|
7299
6872
|
|
|
7300
|
-
var
|
|
7301
|
-
|
|
7302
|
-
var $
|
|
7303
|
-
var
|
|
6873
|
+
var global$3 = global$f;
|
|
6874
|
+
var fails$6 = fails$i;
|
|
6875
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
6876
|
+
var toString$1 = toString$5;
|
|
6877
|
+
var trim = stringTrim.trim;
|
|
6878
|
+
var whitespaces = whitespaces$2;
|
|
7304
6879
|
|
|
7305
|
-
var
|
|
7306
|
-
|
|
7307
|
-
var
|
|
7308
|
-
var
|
|
6880
|
+
var $parseInt$1 = global$3.parseInt;
|
|
6881
|
+
var Symbol$1 = global$3.Symbol;
|
|
6882
|
+
var ITERATOR$6 = Symbol$1 && Symbol$1.iterator;
|
|
6883
|
+
var hex = /^[+-]?0x/i;
|
|
6884
|
+
var exec = uncurryThis$5(hex.exec);
|
|
6885
|
+
var FORCED$2 = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
|
|
6886
|
+
// MS Edge 18- broken with boxed symbols
|
|
6887
|
+
|| (ITERATOR$6 && !fails$6(function () { $parseInt$1(Object(ITERATOR$6)); }));
|
|
7309
6888
|
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
6889
|
+
// `parseInt` method
|
|
6890
|
+
// https://tc39.es/ecma262/#sec-parseint-string-radix
|
|
6891
|
+
var numberParseInt = FORCED$2 ? function parseInt(string, radix) {
|
|
6892
|
+
var S = trim(toString$1(string));
|
|
6893
|
+
return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
|
|
6894
|
+
} : $parseInt$1;
|
|
7315
6895
|
|
|
7316
|
-
var
|
|
7317
|
-
var
|
|
6896
|
+
var $$d = _export;
|
|
6897
|
+
var $parseInt = numberParseInt;
|
|
7318
6898
|
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
|
|
7323
|
-
Object.defineProperty(error, 'stack', createPropertyDescriptor$1(1, 7));
|
|
7324
|
-
return error.stack !== 7;
|
|
7325
|
-
});
|
|
7326
|
-
|
|
7327
|
-
var createNonEnumerableProperty$1 = createNonEnumerableProperty$7;
|
|
7328
|
-
var clearErrorStack = errorStackClear;
|
|
7329
|
-
var ERROR_STACK_INSTALLABLE = errorStackInstallable;
|
|
7330
|
-
|
|
7331
|
-
// non-standard V8
|
|
7332
|
-
var captureStackTrace = Error.captureStackTrace;
|
|
7333
|
-
|
|
7334
|
-
var errorStackInstall = function (error, C, stack, dropEntries) {
|
|
7335
|
-
if (ERROR_STACK_INSTALLABLE) {
|
|
7336
|
-
if (captureStackTrace) captureStackTrace(error, C);
|
|
7337
|
-
else createNonEnumerableProperty$1(error, 'stack', clearErrorStack(stack, dropEntries));
|
|
7338
|
-
}
|
|
7339
|
-
};
|
|
7340
|
-
|
|
7341
|
-
var getBuiltIn$2 = getBuiltIn$6;
|
|
7342
|
-
var hasOwn$1 = hasOwnProperty_1;
|
|
7343
|
-
var createNonEnumerableProperty = createNonEnumerableProperty$7;
|
|
7344
|
-
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
7345
|
-
var setPrototypeOf = objectSetPrototypeOf;
|
|
7346
|
-
var copyConstructorProperties = copyConstructorProperties$2;
|
|
7347
|
-
var proxyAccessor = proxyAccessor$1;
|
|
7348
|
-
var inheritIfRequired = inheritIfRequired$1;
|
|
7349
|
-
var normalizeStringArgument = normalizeStringArgument$1;
|
|
7350
|
-
var installErrorCause = installErrorCause$1;
|
|
7351
|
-
var installErrorStack = errorStackInstall;
|
|
7352
|
-
var DESCRIPTORS$2 = descriptors;
|
|
7353
|
-
|
|
7354
|
-
var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
|
|
7355
|
-
var STACK_TRACE_LIMIT = 'stackTraceLimit';
|
|
7356
|
-
var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
|
|
7357
|
-
var path = FULL_NAME.split('.');
|
|
7358
|
-
var ERROR_NAME = path[path.length - 1];
|
|
7359
|
-
var OriginalError = getBuiltIn$2.apply(null, path);
|
|
7360
|
-
|
|
7361
|
-
if (!OriginalError) return;
|
|
7362
|
-
|
|
7363
|
-
var OriginalErrorPrototype = OriginalError.prototype;
|
|
7364
|
-
|
|
7365
|
-
// V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
|
|
7366
|
-
if (hasOwn$1(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
|
|
7367
|
-
|
|
7368
|
-
if (!FORCED) return OriginalError;
|
|
7369
|
-
|
|
7370
|
-
var BaseError = getBuiltIn$2('Error');
|
|
7371
|
-
|
|
7372
|
-
var WrappedError = wrapper(function (a, b) {
|
|
7373
|
-
var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
|
|
7374
|
-
var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
|
|
7375
|
-
if (message !== undefined) createNonEnumerableProperty(result, 'message', message);
|
|
7376
|
-
installErrorStack(result, WrappedError, result.stack, 2);
|
|
7377
|
-
if (this && isPrototypeOf$2(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
|
|
7378
|
-
if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
|
|
7379
|
-
return result;
|
|
7380
|
-
});
|
|
7381
|
-
|
|
7382
|
-
WrappedError.prototype = OriginalErrorPrototype;
|
|
7383
|
-
|
|
7384
|
-
if (ERROR_NAME !== 'Error') {
|
|
7385
|
-
if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);
|
|
7386
|
-
else copyConstructorProperties(WrappedError, BaseError, { name: true });
|
|
7387
|
-
} else if (DESCRIPTORS$2 && STACK_TRACE_LIMIT in OriginalError) {
|
|
7388
|
-
proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
|
|
7389
|
-
proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
|
|
7390
|
-
}
|
|
7391
|
-
|
|
7392
|
-
copyConstructorProperties(WrappedError, OriginalError);
|
|
7393
|
-
|
|
7394
|
-
try {
|
|
7395
|
-
// Safari 13- bug: WebAssembly errors does not have a proper `.name`
|
|
7396
|
-
if (OriginalErrorPrototype.name !== ERROR_NAME) {
|
|
7397
|
-
createNonEnumerableProperty(OriginalErrorPrototype, 'name', ERROR_NAME);
|
|
7398
|
-
}
|
|
7399
|
-
OriginalErrorPrototype.constructor = WrappedError;
|
|
7400
|
-
} catch (error) { /* empty */ }
|
|
7401
|
-
|
|
7402
|
-
return WrappedError;
|
|
7403
|
-
};
|
|
7404
|
-
|
|
7405
|
-
/* eslint-disable no-unused-vars -- required for functions `.length` */
|
|
7406
|
-
var $$b = _export;
|
|
7407
|
-
var global$3 = global$f;
|
|
7408
|
-
var apply$1 = functionApply;
|
|
7409
|
-
var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
|
|
7410
|
-
|
|
7411
|
-
var WEB_ASSEMBLY = 'WebAssembly';
|
|
7412
|
-
var WebAssembly = global$3[WEB_ASSEMBLY];
|
|
7413
|
-
|
|
7414
|
-
// eslint-disable-next-line es/no-error-cause -- feature detection
|
|
7415
|
-
var FORCED$2 = new Error('e', { cause: 7 }).cause !== 7;
|
|
7416
|
-
|
|
7417
|
-
var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
|
|
7418
|
-
var O = {};
|
|
7419
|
-
O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$2);
|
|
7420
|
-
$$b({ global: true, constructor: true, arity: 1, forced: FORCED$2 }, O);
|
|
7421
|
-
};
|
|
7422
|
-
|
|
7423
|
-
var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
|
|
7424
|
-
if (WebAssembly && WebAssembly[ERROR_NAME]) {
|
|
7425
|
-
var O = {};
|
|
7426
|
-
O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$2);
|
|
7427
|
-
$$b({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$2 }, O);
|
|
7428
|
-
}
|
|
7429
|
-
};
|
|
7430
|
-
|
|
7431
|
-
// https://tc39.es/ecma262/#sec-nativeerror
|
|
7432
|
-
exportGlobalErrorCauseWrapper('Error', function (init) {
|
|
7433
|
-
return function Error(message) { return apply$1(init, this, arguments); };
|
|
7434
|
-
});
|
|
7435
|
-
exportGlobalErrorCauseWrapper('EvalError', function (init) {
|
|
7436
|
-
return function EvalError(message) { return apply$1(init, this, arguments); };
|
|
7437
|
-
});
|
|
7438
|
-
exportGlobalErrorCauseWrapper('RangeError', function (init) {
|
|
7439
|
-
return function RangeError(message) { return apply$1(init, this, arguments); };
|
|
7440
|
-
});
|
|
7441
|
-
exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
|
|
7442
|
-
return function ReferenceError(message) { return apply$1(init, this, arguments); };
|
|
7443
|
-
});
|
|
7444
|
-
exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
|
|
7445
|
-
return function SyntaxError(message) { return apply$1(init, this, arguments); };
|
|
7446
|
-
});
|
|
7447
|
-
exportGlobalErrorCauseWrapper('TypeError', function (init) {
|
|
7448
|
-
return function TypeError(message) { return apply$1(init, this, arguments); };
|
|
7449
|
-
});
|
|
7450
|
-
exportGlobalErrorCauseWrapper('URIError', function (init) {
|
|
7451
|
-
return function URIError(message) { return apply$1(init, this, arguments); };
|
|
7452
|
-
});
|
|
7453
|
-
exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
|
|
7454
|
-
return function CompileError(message) { return apply$1(init, this, arguments); };
|
|
7455
|
-
});
|
|
7456
|
-
exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
|
|
7457
|
-
return function LinkError(message) { return apply$1(init, this, arguments); };
|
|
7458
|
-
});
|
|
7459
|
-
exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
|
|
7460
|
-
return function RuntimeError(message) { return apply$1(init, this, arguments); };
|
|
7461
|
-
});
|
|
7462
|
-
|
|
7463
|
-
var uncurryThis$8 = functionUncurryThis;
|
|
7464
|
-
|
|
7465
|
-
var arraySlice$1 = uncurryThis$8([].slice);
|
|
7466
|
-
|
|
7467
|
-
var uncurryThis$7 = functionUncurryThis;
|
|
7468
|
-
var isArray = isArray$2;
|
|
7469
|
-
var isCallable$2 = isCallable$i;
|
|
7470
|
-
var classof$1 = classofRaw$2;
|
|
7471
|
-
var toString$2 = toString$5;
|
|
7472
|
-
|
|
7473
|
-
var push = uncurryThis$7([].push);
|
|
7474
|
-
|
|
7475
|
-
var getJsonReplacerFunction = function (replacer) {
|
|
7476
|
-
if (isCallable$2(replacer)) return replacer;
|
|
7477
|
-
if (!isArray(replacer)) return;
|
|
7478
|
-
var rawLength = replacer.length;
|
|
7479
|
-
var keys = [];
|
|
7480
|
-
for (var i = 0; i < rawLength; i++) {
|
|
7481
|
-
var element = replacer[i];
|
|
7482
|
-
if (typeof element == 'string') push(keys, element);
|
|
7483
|
-
else if (typeof element == 'number' || classof$1(element) === 'Number' || classof$1(element) === 'String') push(keys, toString$2(element));
|
|
7484
|
-
}
|
|
7485
|
-
var keysLength = keys.length;
|
|
7486
|
-
var root = true;
|
|
7487
|
-
return function (key, value) {
|
|
7488
|
-
if (root) {
|
|
7489
|
-
root = false;
|
|
7490
|
-
return value;
|
|
7491
|
-
}
|
|
7492
|
-
if (isArray(this)) return value;
|
|
7493
|
-
for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;
|
|
7494
|
-
};
|
|
7495
|
-
};
|
|
7496
|
-
|
|
7497
|
-
var $$a = _export;
|
|
7498
|
-
var getBuiltIn$1 = getBuiltIn$6;
|
|
7499
|
-
var apply = functionApply;
|
|
7500
|
-
var call$5 = functionCall;
|
|
7501
|
-
var uncurryThis$6 = functionUncurryThis;
|
|
7502
|
-
var fails$3 = fails$i;
|
|
7503
|
-
var isCallable$1 = isCallable$i;
|
|
7504
|
-
var isSymbol = isSymbol$3;
|
|
7505
|
-
var arraySlice = arraySlice$1;
|
|
7506
|
-
var getReplacerFunction = getJsonReplacerFunction;
|
|
7507
|
-
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
7508
|
-
|
|
7509
|
-
var $String = String;
|
|
7510
|
-
var $stringify = getBuiltIn$1('JSON', 'stringify');
|
|
7511
|
-
var exec$1 = uncurryThis$6(/./.exec);
|
|
7512
|
-
var charAt = uncurryThis$6(''.charAt);
|
|
7513
|
-
var charCodeAt = uncurryThis$6(''.charCodeAt);
|
|
7514
|
-
var replace$1 = uncurryThis$6(''.replace);
|
|
7515
|
-
var numberToString = uncurryThis$6(1.0.toString);
|
|
7516
|
-
|
|
7517
|
-
var tester = /[\uD800-\uDFFF]/g;
|
|
7518
|
-
var low = /^[\uD800-\uDBFF]$/;
|
|
7519
|
-
var hi = /^[\uDC00-\uDFFF]$/;
|
|
7520
|
-
|
|
7521
|
-
var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$3(function () {
|
|
7522
|
-
var symbol = getBuiltIn$1('Symbol')('stringify detection');
|
|
7523
|
-
// MS Edge converts symbol values to JSON as {}
|
|
7524
|
-
return $stringify([symbol]) !== '[null]'
|
|
7525
|
-
// WebKit converts symbol values to JSON as null
|
|
7526
|
-
|| $stringify({ a: symbol }) !== '{}'
|
|
7527
|
-
// V8 throws on boxed symbols
|
|
7528
|
-
|| $stringify(Object(symbol)) !== '{}';
|
|
7529
|
-
});
|
|
7530
|
-
|
|
7531
|
-
// https://github.com/tc39/proposal-well-formed-stringify
|
|
7532
|
-
var ILL_FORMED_UNICODE = fails$3(function () {
|
|
7533
|
-
return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
|
|
7534
|
-
|| $stringify('\uDEAD') !== '"\\udead"';
|
|
7535
|
-
});
|
|
7536
|
-
|
|
7537
|
-
var stringifyWithSymbolsFix = function (it, replacer) {
|
|
7538
|
-
var args = arraySlice(arguments);
|
|
7539
|
-
var $replacer = getReplacerFunction(replacer);
|
|
7540
|
-
if (!isCallable$1($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined
|
|
7541
|
-
args[1] = function (key, value) {
|
|
7542
|
-
// some old implementations (like WebKit) could pass numbers as keys
|
|
7543
|
-
if (isCallable$1($replacer)) value = call$5($replacer, this, $String(key), value);
|
|
7544
|
-
if (!isSymbol(value)) return value;
|
|
7545
|
-
};
|
|
7546
|
-
return apply($stringify, null, args);
|
|
7547
|
-
};
|
|
7548
|
-
|
|
7549
|
-
var fixIllFormed = function (match, offset, string) {
|
|
7550
|
-
var prev = charAt(string, offset - 1);
|
|
7551
|
-
var next = charAt(string, offset + 1);
|
|
7552
|
-
if ((exec$1(low, match) && !exec$1(hi, next)) || (exec$1(hi, match) && !exec$1(low, prev))) {
|
|
7553
|
-
return '\\u' + numberToString(charCodeAt(match, 0), 16);
|
|
7554
|
-
} return match;
|
|
7555
|
-
};
|
|
7556
|
-
|
|
7557
|
-
if ($stringify) {
|
|
7558
|
-
// `JSON.stringify` method
|
|
7559
|
-
// https://tc39.es/ecma262/#sec-json.stringify
|
|
7560
|
-
$$a({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
|
|
7561
|
-
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
7562
|
-
stringify: function stringify(it, replacer, space) {
|
|
7563
|
-
var args = arraySlice(arguments);
|
|
7564
|
-
var result = apply(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);
|
|
7565
|
-
return ILL_FORMED_UNICODE && typeof result == 'string' ? replace$1(result, tester, fixIllFormed) : result;
|
|
7566
|
-
}
|
|
7567
|
-
});
|
|
7568
|
-
}
|
|
7569
|
-
|
|
7570
|
-
// a string of all valid unicode whitespaces
|
|
7571
|
-
var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
|
7572
|
-
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
7573
|
-
|
|
7574
|
-
var uncurryThis$5 = functionUncurryThis;
|
|
7575
|
-
var requireObjectCoercible = requireObjectCoercible$5;
|
|
7576
|
-
var toString$1 = toString$5;
|
|
7577
|
-
var whitespaces$1 = whitespaces$2;
|
|
7578
|
-
|
|
7579
|
-
var replace = uncurryThis$5(''.replace);
|
|
7580
|
-
var ltrim = RegExp('^[' + whitespaces$1 + ']+');
|
|
7581
|
-
var rtrim = RegExp('(^|[^' + whitespaces$1 + '])[' + whitespaces$1 + ']+$');
|
|
7582
|
-
|
|
7583
|
-
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
7584
|
-
var createMethod = function (TYPE) {
|
|
7585
|
-
return function ($this) {
|
|
7586
|
-
var string = toString$1(requireObjectCoercible($this));
|
|
7587
|
-
if (TYPE & 1) string = replace(string, ltrim, '');
|
|
7588
|
-
if (TYPE & 2) string = replace(string, rtrim, '$1');
|
|
7589
|
-
return string;
|
|
7590
|
-
};
|
|
7591
|
-
};
|
|
7592
|
-
|
|
7593
|
-
var stringTrim = {
|
|
7594
|
-
// `String.prototype.trim` method
|
|
7595
|
-
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
7596
|
-
trim: createMethod(3)
|
|
7597
|
-
};
|
|
7598
|
-
|
|
7599
|
-
var global$2 = global$f;
|
|
7600
|
-
var fails$2 = fails$i;
|
|
7601
|
-
var uncurryThis$4 = functionUncurryThis;
|
|
7602
|
-
var toString = toString$5;
|
|
7603
|
-
var trim = stringTrim.trim;
|
|
7604
|
-
var whitespaces = whitespaces$2;
|
|
7605
|
-
|
|
7606
|
-
var $parseInt$1 = global$2.parseInt;
|
|
7607
|
-
var Symbol$1 = global$2.Symbol;
|
|
7608
|
-
var ITERATOR$3 = Symbol$1 && Symbol$1.iterator;
|
|
7609
|
-
var hex = /^[+-]?0x/i;
|
|
7610
|
-
var exec = uncurryThis$4(hex.exec);
|
|
7611
|
-
var FORCED$1 = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
|
|
7612
|
-
// MS Edge 18- broken with boxed symbols
|
|
7613
|
-
|| (ITERATOR$3 && !fails$2(function () { $parseInt$1(Object(ITERATOR$3)); }));
|
|
7614
|
-
|
|
7615
|
-
// `parseInt` method
|
|
7616
|
-
// https://tc39.es/ecma262/#sec-parseint-string-radix
|
|
7617
|
-
var numberParseInt = FORCED$1 ? function parseInt(string, radix) {
|
|
7618
|
-
var S = trim(toString(string));
|
|
7619
|
-
return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
|
|
7620
|
-
} : $parseInt$1;
|
|
7621
|
-
|
|
7622
|
-
var $$9 = _export;
|
|
7623
|
-
var $parseInt = numberParseInt;
|
|
7624
|
-
|
|
7625
|
-
// `parseInt` method
|
|
7626
|
-
// https://tc39.es/ecma262/#sec-parseint-string-radix
|
|
7627
|
-
$$9({ global: true, forced: parseInt !== $parseInt }, {
|
|
7628
|
-
parseInt: $parseInt
|
|
6899
|
+
// `parseInt` method
|
|
6900
|
+
// https://tc39.es/ecma262/#sec-parseint-string-radix
|
|
6901
|
+
$$d({ global: true, forced: parseInt !== $parseInt }, {
|
|
6902
|
+
parseInt: $parseInt
|
|
7629
6903
|
});
|
|
7630
6904
|
|
|
7631
6905
|
const CONTEXT_KEY = 'ContextId';
|
|
@@ -7952,291 +7226,1043 @@ const auth = {
|
|
|
7952
7226
|
}
|
|
7953
7227
|
};
|
|
7954
7228
|
|
|
7955
|
-
const
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
|
|
7962
|
-
|
|
7229
|
+
const BCRoutesGuard = props => {
|
|
7230
|
+
const {
|
|
7231
|
+
component: BaseComponent,
|
|
7232
|
+
location
|
|
7233
|
+
} = props,
|
|
7234
|
+
rest = __rest(props, ["component", "location"]);
|
|
7235
|
+
const currentToken = auth.getToken();
|
|
7236
|
+
function CheckNavigation() {
|
|
7237
|
+
// if Unauthenticated go to login page
|
|
7238
|
+
if (!currentToken) return jsx(Redirect, {
|
|
7239
|
+
to: {
|
|
7240
|
+
pathname: BCRoutes.Login,
|
|
7241
|
+
state: {
|
|
7242
|
+
from: location
|
|
7243
|
+
}
|
|
7244
|
+
}
|
|
7245
|
+
});
|
|
7246
|
+
return jsx(BaseComponent, Object.assign({}, props));
|
|
7247
|
+
}
|
|
7248
|
+
return jsx(Route, Object.assign({}, rest, {
|
|
7249
|
+
render: CheckNavigation
|
|
7250
|
+
}));
|
|
7251
|
+
};
|
|
7252
|
+
|
|
7253
|
+
const LogoutRoute = _a => {
|
|
7254
|
+
var props = __rest(_a, []);
|
|
7255
|
+
auth.clearAllAppStorage();
|
|
7256
|
+
return jsx(Route, Object.assign({}, props, {
|
|
7257
|
+
children: jsx(Redirect, {
|
|
7258
|
+
to: BCRoutes.Login
|
|
7259
|
+
})
|
|
7260
|
+
}));
|
|
7261
|
+
};
|
|
7262
|
+
|
|
7263
|
+
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
7264
|
+
|
|
7265
|
+
var $TypeError$7 = TypeError;
|
|
7266
|
+
|
|
7267
|
+
var anInstance$1 = function (it, Prototype) {
|
|
7268
|
+
if (isPrototypeOf$1(Prototype, it)) return it;
|
|
7269
|
+
throw new $TypeError$7('Incorrect invocation');
|
|
7270
|
+
};
|
|
7271
|
+
|
|
7272
|
+
var fails$5 = fails$i;
|
|
7273
|
+
|
|
7274
|
+
var correctPrototypeGetter = !fails$5(function () {
|
|
7275
|
+
function F() { /* empty */ }
|
|
7276
|
+
F.prototype.constructor = null;
|
|
7277
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
7278
|
+
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
7279
|
+
});
|
|
7280
|
+
|
|
7281
|
+
var hasOwn$2 = hasOwnProperty_1;
|
|
7282
|
+
var isCallable$3 = isCallable$i;
|
|
7283
|
+
var toObject$1 = toObject$4;
|
|
7284
|
+
var sharedKey$1 = sharedKey$3;
|
|
7285
|
+
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
7286
|
+
|
|
7287
|
+
var IE_PROTO$1 = sharedKey$1('IE_PROTO');
|
|
7288
|
+
var $Object = Object;
|
|
7289
|
+
var ObjectPrototype = $Object.prototype;
|
|
7290
|
+
|
|
7291
|
+
// `Object.getPrototypeOf` method
|
|
7292
|
+
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
7293
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
7294
|
+
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
|
|
7295
|
+
var object = toObject$1(O);
|
|
7296
|
+
if (hasOwn$2(object, IE_PROTO$1)) return object[IE_PROTO$1];
|
|
7297
|
+
var constructor = object.constructor;
|
|
7298
|
+
if (isCallable$3(constructor) && object instanceof constructor) {
|
|
7299
|
+
return constructor.prototype;
|
|
7300
|
+
} return object instanceof $Object ? ObjectPrototype : null;
|
|
7301
|
+
};
|
|
7302
|
+
|
|
7303
|
+
var makeBuiltIn = makeBuiltInExports;
|
|
7304
|
+
var defineProperty$3 = objectDefineProperty;
|
|
7305
|
+
|
|
7306
|
+
var defineBuiltInAccessor$1 = function (target, name, descriptor) {
|
|
7307
|
+
if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
|
|
7308
|
+
if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
|
|
7309
|
+
return defineProperty$3.f(target, name, descriptor);
|
|
7310
|
+
};
|
|
7311
|
+
|
|
7312
|
+
var DESCRIPTORS$4 = descriptors;
|
|
7313
|
+
var definePropertyModule$1 = objectDefineProperty;
|
|
7314
|
+
var createPropertyDescriptor$1 = createPropertyDescriptor$5;
|
|
7315
|
+
|
|
7316
|
+
var createProperty$1 = function (object, key, value) {
|
|
7317
|
+
if (DESCRIPTORS$4) definePropertyModule$1.f(object, key, createPropertyDescriptor$1(0, value));
|
|
7318
|
+
else object[key] = value;
|
|
7319
|
+
};
|
|
7320
|
+
|
|
7321
|
+
var objectDefineProperties = {};
|
|
7322
|
+
|
|
7323
|
+
var DESCRIPTORS$3 = descriptors;
|
|
7324
|
+
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
7325
|
+
var definePropertyModule = objectDefineProperty;
|
|
7326
|
+
var anObject$7 = anObject$a;
|
|
7327
|
+
var toIndexedObject$1 = toIndexedObject$5;
|
|
7328
|
+
var objectKeys = objectKeys$2;
|
|
7329
|
+
|
|
7330
|
+
// `Object.defineProperties` method
|
|
7331
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
7332
|
+
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
7333
|
+
objectDefineProperties.f = DESCRIPTORS$3 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
7334
|
+
anObject$7(O);
|
|
7335
|
+
var props = toIndexedObject$1(Properties);
|
|
7336
|
+
var keys = objectKeys(Properties);
|
|
7337
|
+
var length = keys.length;
|
|
7338
|
+
var index = 0;
|
|
7339
|
+
var key;
|
|
7340
|
+
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
7341
|
+
return O;
|
|
7342
|
+
};
|
|
7343
|
+
|
|
7344
|
+
var getBuiltIn$1 = getBuiltIn$6;
|
|
7345
|
+
|
|
7346
|
+
var html$1 = getBuiltIn$1('document', 'documentElement');
|
|
7347
|
+
|
|
7348
|
+
/* global ActiveXObject -- old IE, WSH */
|
|
7349
|
+
var anObject$6 = anObject$a;
|
|
7350
|
+
var definePropertiesModule = objectDefineProperties;
|
|
7351
|
+
var enumBugKeys = enumBugKeys$3;
|
|
7352
|
+
var hiddenKeys = hiddenKeys$4;
|
|
7353
|
+
var html = html$1;
|
|
7354
|
+
var documentCreateElement$1 = documentCreateElement$2;
|
|
7355
|
+
var sharedKey = sharedKey$3;
|
|
7356
|
+
|
|
7357
|
+
var GT = '>';
|
|
7358
|
+
var LT = '<';
|
|
7359
|
+
var PROTOTYPE = 'prototype';
|
|
7360
|
+
var SCRIPT = 'script';
|
|
7361
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
|
7362
|
+
|
|
7363
|
+
var EmptyConstructor = function () { /* empty */ };
|
|
7364
|
+
|
|
7365
|
+
var scriptTag = function (content) {
|
|
7366
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
7367
|
+
};
|
|
7368
|
+
|
|
7369
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
7370
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
7371
|
+
activeXDocument.write(scriptTag(''));
|
|
7372
|
+
activeXDocument.close();
|
|
7373
|
+
var temp = activeXDocument.parentWindow.Object;
|
|
7374
|
+
activeXDocument = null; // avoid memory leak
|
|
7375
|
+
return temp;
|
|
7376
|
+
};
|
|
7377
|
+
|
|
7378
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
7379
|
+
var NullProtoObjectViaIFrame = function () {
|
|
7380
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
7381
|
+
var iframe = documentCreateElement$1('iframe');
|
|
7382
|
+
var JS = 'java' + SCRIPT + ':';
|
|
7383
|
+
var iframeDocument;
|
|
7384
|
+
iframe.style.display = 'none';
|
|
7385
|
+
html.appendChild(iframe);
|
|
7386
|
+
// https://github.com/zloirock/core-js/issues/475
|
|
7387
|
+
iframe.src = String(JS);
|
|
7388
|
+
iframeDocument = iframe.contentWindow.document;
|
|
7389
|
+
iframeDocument.open();
|
|
7390
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
|
7391
|
+
iframeDocument.close();
|
|
7392
|
+
return iframeDocument.F;
|
|
7393
|
+
};
|
|
7394
|
+
|
|
7395
|
+
// Check for document.domain and active x support
|
|
7396
|
+
// No need to use active x approach when document.domain is not set
|
|
7397
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
|
7398
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
7399
|
+
// avoid IE GC bug
|
|
7400
|
+
var activeXDocument;
|
|
7401
|
+
var NullProtoObject = function () {
|
|
7402
|
+
try {
|
|
7403
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
|
7404
|
+
} catch (error) { /* ignore */ }
|
|
7405
|
+
NullProtoObject = typeof document != 'undefined'
|
|
7406
|
+
? document.domain && activeXDocument
|
|
7407
|
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
7408
|
+
: NullProtoObjectViaIFrame()
|
|
7409
|
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
7410
|
+
var length = enumBugKeys.length;
|
|
7411
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
7412
|
+
return NullProtoObject();
|
|
7413
|
+
};
|
|
7414
|
+
|
|
7415
|
+
hiddenKeys[IE_PROTO] = true;
|
|
7416
|
+
|
|
7417
|
+
// `Object.create` method
|
|
7418
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
7419
|
+
// eslint-disable-next-line es/no-object-create -- safe
|
|
7420
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
|
7421
|
+
var result;
|
|
7422
|
+
if (O !== null) {
|
|
7423
|
+
EmptyConstructor[PROTOTYPE] = anObject$6(O);
|
|
7424
|
+
result = new EmptyConstructor();
|
|
7425
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
7426
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
7427
|
+
result[IE_PROTO] = O;
|
|
7428
|
+
} else result = NullProtoObject();
|
|
7429
|
+
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
7430
|
+
};
|
|
7431
|
+
|
|
7432
|
+
var fails$4 = fails$i;
|
|
7433
|
+
var isCallable$2 = isCallable$i;
|
|
7434
|
+
var isObject$1 = isObject$b;
|
|
7435
|
+
var getPrototypeOf$2 = objectGetPrototypeOf;
|
|
7436
|
+
var defineBuiltIn$1 = defineBuiltIn$3;
|
|
7437
|
+
var wellKnownSymbol$9 = wellKnownSymbol$d;
|
|
7438
|
+
|
|
7439
|
+
var ITERATOR$5 = wellKnownSymbol$9('iterator');
|
|
7440
|
+
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
7441
|
+
|
|
7442
|
+
// `%IteratorPrototype%` object
|
|
7443
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
7444
|
+
var IteratorPrototype$3, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
7445
|
+
|
|
7446
|
+
/* eslint-disable es/no-array-prototype-keys -- safe */
|
|
7447
|
+
if ([].keys) {
|
|
7448
|
+
arrayIterator = [].keys();
|
|
7449
|
+
// Safari 8 has buggy iterators w/o `next`
|
|
7450
|
+
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
|
|
7451
|
+
else {
|
|
7452
|
+
PrototypeOfArrayIteratorPrototype = getPrototypeOf$2(getPrototypeOf$2(arrayIterator));
|
|
7453
|
+
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$3 = PrototypeOfArrayIteratorPrototype;
|
|
7454
|
+
}
|
|
7455
|
+
}
|
|
7456
|
+
|
|
7457
|
+
var NEW_ITERATOR_PROTOTYPE = !isObject$1(IteratorPrototype$3) || fails$4(function () {
|
|
7458
|
+
var test = {};
|
|
7459
|
+
// FF44- legacy iterators case
|
|
7460
|
+
return IteratorPrototype$3[ITERATOR$5].call(test) !== test;
|
|
7461
|
+
});
|
|
7462
|
+
|
|
7463
|
+
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$3 = {};
|
|
7464
|
+
|
|
7465
|
+
// `%IteratorPrototype%[@@iterator]()` method
|
|
7466
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
7467
|
+
if (!isCallable$2(IteratorPrototype$3[ITERATOR$5])) {
|
|
7468
|
+
defineBuiltIn$1(IteratorPrototype$3, ITERATOR$5, function () {
|
|
7469
|
+
return this;
|
|
7470
|
+
});
|
|
7471
|
+
}
|
|
7472
|
+
|
|
7473
|
+
var iteratorsCore = {
|
|
7474
|
+
IteratorPrototype: IteratorPrototype$3,
|
|
7475
|
+
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
7476
|
+
};
|
|
7477
|
+
|
|
7478
|
+
var $$c = _export;
|
|
7479
|
+
var global$2 = global$f;
|
|
7480
|
+
var anInstance = anInstance$1;
|
|
7481
|
+
var anObject$5 = anObject$a;
|
|
7482
|
+
var isCallable$1 = isCallable$i;
|
|
7483
|
+
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
7484
|
+
var defineBuiltInAccessor = defineBuiltInAccessor$1;
|
|
7485
|
+
var createProperty = createProperty$1;
|
|
7486
|
+
var fails$3 = fails$i;
|
|
7487
|
+
var hasOwn$1 = hasOwnProperty_1;
|
|
7488
|
+
var wellKnownSymbol$8 = wellKnownSymbol$d;
|
|
7489
|
+
var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
|
|
7490
|
+
var DESCRIPTORS$2 = descriptors;
|
|
7491
|
+
|
|
7492
|
+
var CONSTRUCTOR = 'constructor';
|
|
7493
|
+
var ITERATOR$4 = 'Iterator';
|
|
7494
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$8('toStringTag');
|
|
7495
|
+
|
|
7496
|
+
var $TypeError$6 = TypeError;
|
|
7497
|
+
var NativeIterator = global$2[ITERATOR$4];
|
|
7498
|
+
|
|
7499
|
+
// FF56- have non-standard global helper `Iterator`
|
|
7500
|
+
var FORCED$1 = !isCallable$1(NativeIterator)
|
|
7501
|
+
|| NativeIterator.prototype !== IteratorPrototype$2
|
|
7502
|
+
// FF44- non-standard `Iterator` passes previous tests
|
|
7503
|
+
|| !fails$3(function () { NativeIterator({}); });
|
|
7504
|
+
|
|
7505
|
+
var IteratorConstructor = function Iterator() {
|
|
7506
|
+
anInstance(this, IteratorPrototype$2);
|
|
7507
|
+
if (getPrototypeOf$1(this) === IteratorPrototype$2) throw new $TypeError$6('Abstract class Iterator not directly constructable');
|
|
7508
|
+
};
|
|
7509
|
+
|
|
7510
|
+
var defineIteratorPrototypeAccessor = function (key, value) {
|
|
7511
|
+
if (DESCRIPTORS$2) {
|
|
7512
|
+
defineBuiltInAccessor(IteratorPrototype$2, key, {
|
|
7513
|
+
configurable: true,
|
|
7514
|
+
get: function () {
|
|
7515
|
+
return value;
|
|
7516
|
+
},
|
|
7517
|
+
set: function (replacement) {
|
|
7518
|
+
anObject$5(this);
|
|
7519
|
+
if (this === IteratorPrototype$2) throw new $TypeError$6("You can't redefine this property");
|
|
7520
|
+
if (hasOwn$1(this, key)) this[key] = replacement;
|
|
7521
|
+
else createProperty(this, key, replacement);
|
|
7522
|
+
}
|
|
7523
|
+
});
|
|
7524
|
+
} else IteratorPrototype$2[key] = value;
|
|
7525
|
+
};
|
|
7526
|
+
|
|
7527
|
+
if (!hasOwn$1(IteratorPrototype$2, TO_STRING_TAG$1)) defineIteratorPrototypeAccessor(TO_STRING_TAG$1, ITERATOR$4);
|
|
7528
|
+
|
|
7529
|
+
if (FORCED$1 || !hasOwn$1(IteratorPrototype$2, CONSTRUCTOR) || IteratorPrototype$2[CONSTRUCTOR] === Object) {
|
|
7530
|
+
defineIteratorPrototypeAccessor(CONSTRUCTOR, IteratorConstructor);
|
|
7531
|
+
}
|
|
7532
|
+
|
|
7533
|
+
IteratorConstructor.prototype = IteratorPrototype$2;
|
|
7534
|
+
|
|
7535
|
+
// `Iterator` constructor
|
|
7536
|
+
// https://github.com/tc39/proposal-iterator-helpers
|
|
7537
|
+
$$c({ global: true, constructor: true, forced: FORCED$1 }, {
|
|
7538
|
+
Iterator: IteratorConstructor
|
|
7539
|
+
});
|
|
7540
|
+
|
|
7541
|
+
var classofRaw = classofRaw$2;
|
|
7542
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
7543
|
+
|
|
7544
|
+
var functionUncurryThisClause = function (fn) {
|
|
7545
|
+
// Nashorn bug:
|
|
7546
|
+
// https://github.com/zloirock/core-js/issues/1128
|
|
7547
|
+
// https://github.com/zloirock/core-js/issues/1130
|
|
7548
|
+
if (classofRaw(fn) === 'Function') return uncurryThis$4(fn);
|
|
7549
|
+
};
|
|
7550
|
+
|
|
7551
|
+
var uncurryThis$3 = functionUncurryThisClause;
|
|
7552
|
+
var aCallable$3 = aCallable$6;
|
|
7553
|
+
var NATIVE_BIND = functionBindNative;
|
|
7554
|
+
|
|
7555
|
+
var bind$1 = uncurryThis$3(uncurryThis$3.bind);
|
|
7556
|
+
|
|
7557
|
+
// optional / simple context binding
|
|
7558
|
+
var functionBindContext = function (fn, that) {
|
|
7559
|
+
aCallable$3(fn);
|
|
7560
|
+
return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
|
|
7561
|
+
return fn.apply(that, arguments);
|
|
7562
|
+
};
|
|
7563
|
+
};
|
|
7564
|
+
|
|
7565
|
+
var iterators = {};
|
|
7566
|
+
|
|
7567
|
+
var wellKnownSymbol$7 = wellKnownSymbol$d;
|
|
7568
|
+
var Iterators$4 = iterators;
|
|
7569
|
+
|
|
7570
|
+
var ITERATOR$3 = wellKnownSymbol$7('iterator');
|
|
7571
|
+
var ArrayPrototype$1 = Array.prototype;
|
|
7572
|
+
|
|
7573
|
+
// check on default Array iterator
|
|
7574
|
+
var isArrayIteratorMethod$1 = function (it) {
|
|
7575
|
+
return it !== undefined && (Iterators$4.Array === it || ArrayPrototype$1[ITERATOR$3] === it);
|
|
7576
|
+
};
|
|
7577
|
+
|
|
7578
|
+
var classof$1 = classof$5;
|
|
7579
|
+
var getMethod$1 = getMethod$3;
|
|
7580
|
+
var isNullOrUndefined = isNullOrUndefined$3;
|
|
7581
|
+
var Iterators$3 = iterators;
|
|
7582
|
+
var wellKnownSymbol$6 = wellKnownSymbol$d;
|
|
7583
|
+
|
|
7584
|
+
var ITERATOR$2 = wellKnownSymbol$6('iterator');
|
|
7585
|
+
|
|
7586
|
+
var getIteratorMethod$2 = function (it) {
|
|
7587
|
+
if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$2)
|
|
7588
|
+
|| getMethod$1(it, '@@iterator')
|
|
7589
|
+
|| Iterators$3[classof$1(it)];
|
|
7590
|
+
};
|
|
7591
|
+
|
|
7592
|
+
var call$5 = functionCall;
|
|
7593
|
+
var aCallable$2 = aCallable$6;
|
|
7594
|
+
var anObject$4 = anObject$a;
|
|
7595
|
+
var tryToString$1 = tryToString$3;
|
|
7596
|
+
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
7597
|
+
|
|
7598
|
+
var $TypeError$5 = TypeError;
|
|
7599
|
+
|
|
7600
|
+
var getIterator$1 = function (argument, usingIterator) {
|
|
7601
|
+
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
|
|
7602
|
+
if (aCallable$2(iteratorMethod)) return anObject$4(call$5(iteratorMethod, argument));
|
|
7603
|
+
throw new $TypeError$5(tryToString$1(argument) + ' is not iterable');
|
|
7604
|
+
};
|
|
7605
|
+
|
|
7606
|
+
var call$4 = functionCall;
|
|
7607
|
+
var anObject$3 = anObject$a;
|
|
7608
|
+
var getMethod = getMethod$3;
|
|
7609
|
+
|
|
7610
|
+
var iteratorClose$3 = function (iterator, kind, value) {
|
|
7611
|
+
var innerResult, innerError;
|
|
7612
|
+
anObject$3(iterator);
|
|
7613
|
+
try {
|
|
7614
|
+
innerResult = getMethod(iterator, 'return');
|
|
7615
|
+
if (!innerResult) {
|
|
7616
|
+
if (kind === 'throw') throw value;
|
|
7617
|
+
return value;
|
|
7618
|
+
}
|
|
7619
|
+
innerResult = call$4(innerResult, iterator);
|
|
7620
|
+
} catch (error) {
|
|
7621
|
+
innerError = true;
|
|
7622
|
+
innerResult = error;
|
|
7623
|
+
}
|
|
7624
|
+
if (kind === 'throw') throw value;
|
|
7625
|
+
if (innerError) throw innerResult;
|
|
7626
|
+
anObject$3(innerResult);
|
|
7627
|
+
return value;
|
|
7628
|
+
};
|
|
7629
|
+
|
|
7630
|
+
var bind = functionBindContext;
|
|
7631
|
+
var call$3 = functionCall;
|
|
7632
|
+
var anObject$2 = anObject$a;
|
|
7633
|
+
var tryToString = tryToString$3;
|
|
7634
|
+
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
7635
|
+
var lengthOfArrayLike$1 = lengthOfArrayLike$3;
|
|
7636
|
+
var isPrototypeOf = objectIsPrototypeOf;
|
|
7637
|
+
var getIterator = getIterator$1;
|
|
7638
|
+
var getIteratorMethod = getIteratorMethod$2;
|
|
7639
|
+
var iteratorClose$2 = iteratorClose$3;
|
|
7640
|
+
|
|
7641
|
+
var $TypeError$4 = TypeError;
|
|
7642
|
+
|
|
7643
|
+
var Result = function (stopped, result) {
|
|
7644
|
+
this.stopped = stopped;
|
|
7645
|
+
this.result = result;
|
|
7646
|
+
};
|
|
7647
|
+
|
|
7648
|
+
var ResultPrototype = Result.prototype;
|
|
7649
|
+
|
|
7650
|
+
var iterate$3 = function (iterable, unboundFunction, options) {
|
|
7651
|
+
var that = options && options.that;
|
|
7652
|
+
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
7653
|
+
var IS_RECORD = !!(options && options.IS_RECORD);
|
|
7654
|
+
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
7655
|
+
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
7656
|
+
var fn = bind(unboundFunction, that);
|
|
7657
|
+
var iterator, iterFn, index, length, result, next, step;
|
|
7658
|
+
|
|
7659
|
+
var stop = function (condition) {
|
|
7660
|
+
if (iterator) iteratorClose$2(iterator, 'normal', condition);
|
|
7661
|
+
return new Result(true, condition);
|
|
7662
|
+
};
|
|
7663
|
+
|
|
7664
|
+
var callFn = function (value) {
|
|
7665
|
+
if (AS_ENTRIES) {
|
|
7666
|
+
anObject$2(value);
|
|
7667
|
+
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
7668
|
+
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
7669
|
+
};
|
|
7670
|
+
|
|
7671
|
+
if (IS_RECORD) {
|
|
7672
|
+
iterator = iterable.iterator;
|
|
7673
|
+
} else if (IS_ITERATOR) {
|
|
7674
|
+
iterator = iterable;
|
|
7675
|
+
} else {
|
|
7676
|
+
iterFn = getIteratorMethod(iterable);
|
|
7677
|
+
if (!iterFn) throw new $TypeError$4(tryToString(iterable) + ' is not iterable');
|
|
7678
|
+
// optimisation for array iterators
|
|
7679
|
+
if (isArrayIteratorMethod(iterFn)) {
|
|
7680
|
+
for (index = 0, length = lengthOfArrayLike$1(iterable); length > index; index++) {
|
|
7681
|
+
result = callFn(iterable[index]);
|
|
7682
|
+
if (result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
7683
|
+
} return new Result(false);
|
|
7684
|
+
}
|
|
7685
|
+
iterator = getIterator(iterable, iterFn);
|
|
7686
|
+
}
|
|
7687
|
+
|
|
7688
|
+
next = IS_RECORD ? iterable.next : iterator.next;
|
|
7689
|
+
while (!(step = call$3(next, iterator)).done) {
|
|
7690
|
+
try {
|
|
7691
|
+
result = callFn(step.value);
|
|
7692
|
+
} catch (error) {
|
|
7693
|
+
iteratorClose$2(iterator, 'throw', error);
|
|
7694
|
+
}
|
|
7695
|
+
if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
7696
|
+
} return new Result(false);
|
|
7697
|
+
};
|
|
7698
|
+
|
|
7699
|
+
// `GetIteratorDirect(obj)` abstract operation
|
|
7700
|
+
// https://tc39.es/proposal-iterator-helpers/#sec-getiteratordirect
|
|
7701
|
+
var getIteratorDirect$2 = function (obj) {
|
|
7702
|
+
return {
|
|
7703
|
+
iterator: obj,
|
|
7704
|
+
next: obj.next,
|
|
7705
|
+
done: false
|
|
7706
|
+
};
|
|
7707
|
+
};
|
|
7708
|
+
|
|
7709
|
+
var $$b = _export;
|
|
7710
|
+
var iterate$2 = iterate$3;
|
|
7711
|
+
var aCallable$1 = aCallable$6;
|
|
7712
|
+
var anObject$1 = anObject$a;
|
|
7713
|
+
var getIteratorDirect$1 = getIteratorDirect$2;
|
|
7714
|
+
|
|
7715
|
+
// `Iterator.prototype.every` method
|
|
7716
|
+
// https://github.com/tc39/proposal-iterator-helpers
|
|
7717
|
+
$$b({ target: 'Iterator', proto: true, real: true }, {
|
|
7718
|
+
every: function every(predicate) {
|
|
7719
|
+
anObject$1(this);
|
|
7720
|
+
aCallable$1(predicate);
|
|
7721
|
+
var record = getIteratorDirect$1(this);
|
|
7722
|
+
var counter = 0;
|
|
7723
|
+
return !iterate$2(record, function (value, stop) {
|
|
7724
|
+
if (!predicate(value, counter++)) return stop();
|
|
7725
|
+
}, { IS_RECORD: true, INTERRUPTED: true }).stopped;
|
|
7726
|
+
}
|
|
7727
|
+
});
|
|
7728
|
+
|
|
7729
|
+
var wellKnownSymbol$5 = wellKnownSymbol$d;
|
|
7730
|
+
var create$1 = objectCreate;
|
|
7731
|
+
var defineProperty$2 = objectDefineProperty.f;
|
|
7732
|
+
|
|
7733
|
+
var UNSCOPABLES = wellKnownSymbol$5('unscopables');
|
|
7734
|
+
var ArrayPrototype = Array.prototype;
|
|
7735
|
+
|
|
7736
|
+
// Array.prototype[@@unscopables]
|
|
7737
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
7738
|
+
if (ArrayPrototype[UNSCOPABLES] === undefined) {
|
|
7739
|
+
defineProperty$2(ArrayPrototype, UNSCOPABLES, {
|
|
7740
|
+
configurable: true,
|
|
7741
|
+
value: create$1(null)
|
|
7742
|
+
});
|
|
7743
|
+
}
|
|
7744
|
+
|
|
7745
|
+
// add a key to Array.prototype[@@unscopables]
|
|
7746
|
+
var addToUnscopables$2 = function (key) {
|
|
7747
|
+
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
7748
|
+
};
|
|
7749
|
+
|
|
7750
|
+
var defineProperty$1 = objectDefineProperty.f;
|
|
7751
|
+
var hasOwn = hasOwnProperty_1;
|
|
7752
|
+
var wellKnownSymbol$4 = wellKnownSymbol$d;
|
|
7753
|
+
|
|
7754
|
+
var TO_STRING_TAG = wellKnownSymbol$4('toStringTag');
|
|
7755
|
+
|
|
7756
|
+
var setToStringTag$3 = function (target, TAG, STATIC) {
|
|
7757
|
+
if (target && !STATIC) target = target.prototype;
|
|
7758
|
+
if (target && !hasOwn(target, TO_STRING_TAG)) {
|
|
7759
|
+
defineProperty$1(target, TO_STRING_TAG, { configurable: true, value: TAG });
|
|
7760
|
+
}
|
|
7761
|
+
};
|
|
7762
|
+
|
|
7763
|
+
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
|
7764
|
+
var create = objectCreate;
|
|
7765
|
+
var createPropertyDescriptor = createPropertyDescriptor$5;
|
|
7766
|
+
var setToStringTag$2 = setToStringTag$3;
|
|
7767
|
+
var Iterators$2 = iterators;
|
|
7768
|
+
|
|
7769
|
+
var returnThis$1 = function () { return this; };
|
|
7770
|
+
|
|
7771
|
+
var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
7772
|
+
var TO_STRING_TAG = NAME + ' Iterator';
|
|
7773
|
+
IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
|
|
7774
|
+
setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
|
|
7775
|
+
Iterators$2[TO_STRING_TAG] = returnThis$1;
|
|
7776
|
+
return IteratorConstructor;
|
|
7777
|
+
};
|
|
7778
|
+
|
|
7779
|
+
var $$a = _export;
|
|
7780
|
+
var call$2 = functionCall;
|
|
7781
|
+
var FunctionName = functionName;
|
|
7782
|
+
var isCallable = isCallable$i;
|
|
7783
|
+
var createIteratorConstructor = iteratorCreateConstructor;
|
|
7784
|
+
var getPrototypeOf = objectGetPrototypeOf;
|
|
7785
|
+
var setPrototypeOf = objectSetPrototypeOf;
|
|
7786
|
+
var setToStringTag$1 = setToStringTag$3;
|
|
7787
|
+
var createNonEnumerableProperty$1 = createNonEnumerableProperty$7;
|
|
7788
|
+
var defineBuiltIn = defineBuiltIn$3;
|
|
7789
|
+
var wellKnownSymbol$3 = wellKnownSymbol$d;
|
|
7790
|
+
var Iterators$1 = iterators;
|
|
7791
|
+
var IteratorsCore = iteratorsCore;
|
|
7792
|
+
|
|
7793
|
+
var PROPER_FUNCTION_NAME = FunctionName.PROPER;
|
|
7794
|
+
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
|
7795
|
+
var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
|
7796
|
+
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
7797
|
+
var ITERATOR$1 = wellKnownSymbol$3('iterator');
|
|
7798
|
+
var KEYS = 'keys';
|
|
7799
|
+
var VALUES = 'values';
|
|
7800
|
+
var ENTRIES = 'entries';
|
|
7801
|
+
|
|
7802
|
+
var returnThis = function () { return this; };
|
|
7803
|
+
|
|
7804
|
+
var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
|
|
7805
|
+
createIteratorConstructor(IteratorConstructor, NAME, next);
|
|
7806
|
+
|
|
7807
|
+
var getIterationMethod = function (KIND) {
|
|
7808
|
+
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
|
|
7809
|
+
if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
|
|
7810
|
+
|
|
7811
|
+
switch (KIND) {
|
|
7812
|
+
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
|
|
7813
|
+
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
|
|
7814
|
+
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
|
|
7815
|
+
}
|
|
7816
|
+
|
|
7817
|
+
return function () { return new IteratorConstructor(this); };
|
|
7818
|
+
};
|
|
7819
|
+
|
|
7820
|
+
var TO_STRING_TAG = NAME + ' Iterator';
|
|
7821
|
+
var INCORRECT_VALUES_NAME = false;
|
|
7822
|
+
var IterablePrototype = Iterable.prototype;
|
|
7823
|
+
var nativeIterator = IterablePrototype[ITERATOR$1]
|
|
7824
|
+
|| IterablePrototype['@@iterator']
|
|
7825
|
+
|| DEFAULT && IterablePrototype[DEFAULT];
|
|
7826
|
+
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
|
|
7827
|
+
var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
|
|
7828
|
+
var CurrentIteratorPrototype, methods, KEY;
|
|
7829
|
+
|
|
7830
|
+
// fix native
|
|
7831
|
+
if (anyNativeIterator) {
|
|
7832
|
+
CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
|
|
7833
|
+
if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
|
|
7834
|
+
if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
|
|
7835
|
+
if (setPrototypeOf) {
|
|
7836
|
+
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
|
|
7837
|
+
} else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
|
|
7838
|
+
defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
|
|
7839
|
+
}
|
|
7840
|
+
}
|
|
7841
|
+
// Set @@toStringTag to native iterators
|
|
7842
|
+
setToStringTag$1(CurrentIteratorPrototype, TO_STRING_TAG, true);
|
|
7843
|
+
}
|
|
7844
|
+
}
|
|
7845
|
+
|
|
7846
|
+
// fix Array.prototype.{ values, @@iterator }.name in V8 / FF
|
|
7847
|
+
if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
7848
|
+
if (CONFIGURABLE_FUNCTION_NAME) {
|
|
7849
|
+
createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
|
|
7850
|
+
} else {
|
|
7851
|
+
INCORRECT_VALUES_NAME = true;
|
|
7852
|
+
defaultIterator = function values() { return call$2(nativeIterator, this); };
|
|
7853
|
+
}
|
|
7854
|
+
}
|
|
7855
|
+
|
|
7856
|
+
// export additional methods
|
|
7857
|
+
if (DEFAULT) {
|
|
7858
|
+
methods = {
|
|
7859
|
+
values: getIterationMethod(VALUES),
|
|
7860
|
+
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
|
|
7861
|
+
entries: getIterationMethod(ENTRIES)
|
|
7862
|
+
};
|
|
7863
|
+
if (FORCED) for (KEY in methods) {
|
|
7864
|
+
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
7865
|
+
defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
|
|
7866
|
+
}
|
|
7867
|
+
} else $$a({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
7868
|
+
}
|
|
7869
|
+
|
|
7870
|
+
// define iterator
|
|
7871
|
+
if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
|
|
7872
|
+
defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
|
|
7873
|
+
}
|
|
7874
|
+
Iterators$1[NAME] = defaultIterator;
|
|
7875
|
+
|
|
7876
|
+
return methods;
|
|
7877
|
+
};
|
|
7878
|
+
|
|
7879
|
+
// `CreateIterResultObject` abstract operation
|
|
7880
|
+
// https://tc39.es/ecma262/#sec-createiterresultobject
|
|
7881
|
+
var createIterResultObject$1 = function (value, done) {
|
|
7882
|
+
return { value: value, done: done };
|
|
7963
7883
|
};
|
|
7964
7884
|
|
|
7965
|
-
var
|
|
7885
|
+
var toIndexedObject = toIndexedObject$5;
|
|
7886
|
+
var addToUnscopables$1 = addToUnscopables$2;
|
|
7887
|
+
var Iterators = iterators;
|
|
7888
|
+
var InternalStateModule = internalState;
|
|
7889
|
+
var defineProperty = objectDefineProperty.f;
|
|
7890
|
+
var defineIterator = iteratorDefine;
|
|
7891
|
+
var createIterResultObject = createIterResultObject$1;
|
|
7892
|
+
var DESCRIPTORS$1 = descriptors;
|
|
7966
7893
|
|
|
7967
|
-
var
|
|
7894
|
+
var ARRAY_ITERATOR = 'Array Iterator';
|
|
7895
|
+
var setInternalState = InternalStateModule.set;
|
|
7896
|
+
var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
|
|
7968
7897
|
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7898
|
+
// `Array.prototype.entries` method
|
|
7899
|
+
// https://tc39.es/ecma262/#sec-array.prototype.entries
|
|
7900
|
+
// `Array.prototype.keys` method
|
|
7901
|
+
// https://tc39.es/ecma262/#sec-array.prototype.keys
|
|
7902
|
+
// `Array.prototype.values` method
|
|
7903
|
+
// https://tc39.es/ecma262/#sec-array.prototype.values
|
|
7904
|
+
// `Array.prototype[@@iterator]` method
|
|
7905
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
|
|
7906
|
+
// `CreateArrayIterator` internal method
|
|
7907
|
+
// https://tc39.es/ecma262/#sec-createarrayiterator
|
|
7908
|
+
var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
|
|
7909
|
+
setInternalState(this, {
|
|
7910
|
+
type: ARRAY_ITERATOR,
|
|
7911
|
+
target: toIndexedObject(iterated), // target
|
|
7912
|
+
index: 0, // next index
|
|
7913
|
+
kind: kind // kind
|
|
7914
|
+
});
|
|
7915
|
+
// `%ArrayIteratorPrototype%.next` method
|
|
7916
|
+
// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
|
|
7917
|
+
}, function () {
|
|
7918
|
+
var state = getInternalState(this);
|
|
7919
|
+
var target = state.target;
|
|
7920
|
+
var index = state.index++;
|
|
7921
|
+
if (!target || index >= target.length) {
|
|
7922
|
+
state.target = undefined;
|
|
7923
|
+
return createIterResultObject(undefined, true);
|
|
7924
|
+
}
|
|
7925
|
+
switch (state.kind) {
|
|
7926
|
+
case 'keys': return createIterResultObject(index, false);
|
|
7927
|
+
case 'values': return createIterResultObject(target[index], false);
|
|
7928
|
+
} return createIterResultObject([index, target[index]], false);
|
|
7929
|
+
}, 'values');
|
|
7973
7930
|
|
|
7974
|
-
|
|
7975
|
-
|
|
7931
|
+
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
7932
|
+
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
|
|
7933
|
+
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
|
|
7934
|
+
var values = Iterators.Arguments = Iterators.Array;
|
|
7976
7935
|
|
|
7977
|
-
|
|
7978
|
-
|
|
7979
|
-
|
|
7980
|
-
|
|
7936
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
7937
|
+
addToUnscopables$1('keys');
|
|
7938
|
+
addToUnscopables$1('values');
|
|
7939
|
+
addToUnscopables$1('entries');
|
|
7940
|
+
|
|
7941
|
+
// V8 ~ Chrome 45- bug
|
|
7942
|
+
if (DESCRIPTORS$1 && values.name !== 'values') try {
|
|
7943
|
+
defineProperty(values, 'name', { value: 'values' });
|
|
7944
|
+
} catch (error) { /* empty */ }
|
|
7945
|
+
|
|
7946
|
+
var DESCRIPTORS = descriptors;
|
|
7947
|
+
var isArray = isArray$2;
|
|
7948
|
+
|
|
7949
|
+
var $TypeError$3 = TypeError;
|
|
7950
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
7951
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
7952
|
+
|
|
7953
|
+
// Safari < 13 does not throw an error in this case
|
|
7954
|
+
var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {
|
|
7955
|
+
// makes no sense without proper strict mode support
|
|
7956
|
+
if (this !== undefined) return true;
|
|
7957
|
+
try {
|
|
7958
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
7959
|
+
Object.defineProperty([], 'length', { writable: false }).length = 1;
|
|
7960
|
+
} catch (error) {
|
|
7961
|
+
return error instanceof TypeError;
|
|
7962
|
+
}
|
|
7963
|
+
}();
|
|
7964
|
+
|
|
7965
|
+
var arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
|
|
7966
|
+
if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
|
|
7967
|
+
throw new $TypeError$3('Cannot set read only .length');
|
|
7968
|
+
} return O.length = length;
|
|
7969
|
+
} : function (O, length) {
|
|
7970
|
+
return O.length = length;
|
|
7981
7971
|
};
|
|
7982
7972
|
|
|
7983
|
-
var
|
|
7984
|
-
var
|
|
7985
|
-
var createPropertyDescriptor = createPropertyDescriptor$5;
|
|
7973
|
+
var $TypeError$2 = TypeError;
|
|
7974
|
+
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
|
|
7986
7975
|
|
|
7987
|
-
var
|
|
7988
|
-
if (
|
|
7989
|
-
|
|
7976
|
+
var doesNotExceedSafeInteger$1 = function (it) {
|
|
7977
|
+
if (it > MAX_SAFE_INTEGER) throw $TypeError$2('Maximum allowed index exceeded');
|
|
7978
|
+
return it;
|
|
7990
7979
|
};
|
|
7991
7980
|
|
|
7992
|
-
var $$
|
|
7993
|
-
var
|
|
7994
|
-
var
|
|
7995
|
-
var
|
|
7996
|
-
var
|
|
7997
|
-
var
|
|
7998
|
-
var defineBuiltInAccessor = defineBuiltInAccessor$1;
|
|
7999
|
-
var createProperty = createProperty$1;
|
|
8000
|
-
var fails$1 = fails$i;
|
|
8001
|
-
var hasOwn = hasOwnProperty_1;
|
|
8002
|
-
var wellKnownSymbol$2 = wellKnownSymbol$d;
|
|
8003
|
-
var IteratorPrototype = iteratorsCore.IteratorPrototype;
|
|
8004
|
-
var DESCRIPTORS = descriptors;
|
|
7981
|
+
var $$9 = _export;
|
|
7982
|
+
var toObject = toObject$4;
|
|
7983
|
+
var lengthOfArrayLike = lengthOfArrayLike$3;
|
|
7984
|
+
var setArrayLength = arraySetLength;
|
|
7985
|
+
var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
|
|
7986
|
+
var fails$2 = fails$i;
|
|
8005
7987
|
|
|
8006
|
-
var
|
|
8007
|
-
|
|
8008
|
-
|
|
7988
|
+
var INCORRECT_TO_LENGTH = fails$2(function () {
|
|
7989
|
+
return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
|
|
7990
|
+
});
|
|
8009
7991
|
|
|
8010
|
-
|
|
8011
|
-
|
|
7992
|
+
// V8 <= 121 and Safari <= 15.4; FF < 23 throws InternalError
|
|
7993
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=12681
|
|
7994
|
+
var properErrorOnNonWritableLength = function () {
|
|
7995
|
+
try {
|
|
7996
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
7997
|
+
Object.defineProperty([], 'length', { writable: false }).push();
|
|
7998
|
+
} catch (error) {
|
|
7999
|
+
return error instanceof TypeError;
|
|
8000
|
+
}
|
|
8001
|
+
};
|
|
8012
8002
|
|
|
8013
|
-
|
|
8014
|
-
var FORCED = !isCallable(NativeIterator)
|
|
8015
|
-
|| NativeIterator.prototype !== IteratorPrototype
|
|
8016
|
-
// FF44- non-standard `Iterator` passes previous tests
|
|
8017
|
-
|| !fails$1(function () { NativeIterator({}); });
|
|
8003
|
+
var FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
|
|
8018
8004
|
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8005
|
+
// `Array.prototype.push` method
|
|
8006
|
+
// https://tc39.es/ecma262/#sec-array.prototype.push
|
|
8007
|
+
$$9({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
|
|
8008
|
+
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
8009
|
+
push: function push(item) {
|
|
8010
|
+
var O = toObject(this);
|
|
8011
|
+
var len = lengthOfArrayLike(O);
|
|
8012
|
+
var argCount = arguments.length;
|
|
8013
|
+
doesNotExceedSafeInteger(len + argCount);
|
|
8014
|
+
for (var i = 0; i < argCount; i++) {
|
|
8015
|
+
O[len] = arguments[i];
|
|
8016
|
+
len++;
|
|
8017
|
+
}
|
|
8018
|
+
setArrayLength(O, len);
|
|
8019
|
+
return len;
|
|
8020
|
+
}
|
|
8021
|
+
});
|
|
8022
|
+
|
|
8023
|
+
// iterable DOM collections
|
|
8024
|
+
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
8025
|
+
var domIterables = {
|
|
8026
|
+
CSSRuleList: 0,
|
|
8027
|
+
CSSStyleDeclaration: 0,
|
|
8028
|
+
CSSValueList: 0,
|
|
8029
|
+
ClientRectList: 0,
|
|
8030
|
+
DOMRectList: 0,
|
|
8031
|
+
DOMStringList: 0,
|
|
8032
|
+
DOMTokenList: 1,
|
|
8033
|
+
DataTransferItemList: 0,
|
|
8034
|
+
FileList: 0,
|
|
8035
|
+
HTMLAllCollection: 0,
|
|
8036
|
+
HTMLCollection: 0,
|
|
8037
|
+
HTMLFormElement: 0,
|
|
8038
|
+
HTMLSelectElement: 0,
|
|
8039
|
+
MediaList: 0,
|
|
8040
|
+
MimeTypeArray: 0,
|
|
8041
|
+
NamedNodeMap: 0,
|
|
8042
|
+
NodeList: 1,
|
|
8043
|
+
PaintRequestList: 0,
|
|
8044
|
+
Plugin: 0,
|
|
8045
|
+
PluginArray: 0,
|
|
8046
|
+
SVGLengthList: 0,
|
|
8047
|
+
SVGNumberList: 0,
|
|
8048
|
+
SVGPathSegList: 0,
|
|
8049
|
+
SVGPointList: 0,
|
|
8050
|
+
SVGStringList: 0,
|
|
8051
|
+
SVGTransformList: 0,
|
|
8052
|
+
SourceBufferList: 0,
|
|
8053
|
+
StyleSheetList: 0,
|
|
8054
|
+
TextTrackCueList: 0,
|
|
8055
|
+
TextTrackList: 0,
|
|
8056
|
+
TouchList: 0
|
|
8022
8057
|
};
|
|
8023
8058
|
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8059
|
+
// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
|
|
8060
|
+
var documentCreateElement = documentCreateElement$2;
|
|
8061
|
+
|
|
8062
|
+
var classList = documentCreateElement('span').classList;
|
|
8063
|
+
var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
|
|
8064
|
+
|
|
8065
|
+
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
8066
|
+
|
|
8067
|
+
var global$1 = global$f;
|
|
8068
|
+
var DOMIterables = domIterables;
|
|
8069
|
+
var DOMTokenListPrototype = domTokenListPrototype;
|
|
8070
|
+
var ArrayIteratorMethods = es_array_iterator;
|
|
8071
|
+
var createNonEnumerableProperty = createNonEnumerableProperty$7;
|
|
8072
|
+
var setToStringTag = setToStringTag$3;
|
|
8073
|
+
var wellKnownSymbol$2 = wellKnownSymbol$d;
|
|
8074
|
+
|
|
8075
|
+
var ITERATOR = wellKnownSymbol$2('iterator');
|
|
8076
|
+
var ArrayValues = ArrayIteratorMethods.values;
|
|
8077
|
+
|
|
8078
|
+
var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
8079
|
+
if (CollectionPrototype) {
|
|
8080
|
+
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
8081
|
+
if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
|
|
8082
|
+
createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
|
|
8083
|
+
} catch (error) {
|
|
8084
|
+
CollectionPrototype[ITERATOR] = ArrayValues;
|
|
8085
|
+
}
|
|
8086
|
+
setToStringTag(CollectionPrototype, COLLECTION_NAME, true);
|
|
8087
|
+
if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
|
|
8088
|
+
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
8089
|
+
if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
|
|
8090
|
+
createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
|
|
8091
|
+
} catch (error) {
|
|
8092
|
+
CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
|
|
8036
8093
|
}
|
|
8037
|
-
}
|
|
8038
|
-
}
|
|
8094
|
+
}
|
|
8095
|
+
}
|
|
8039
8096
|
};
|
|
8040
8097
|
|
|
8041
|
-
|
|
8098
|
+
for (var COLLECTION_NAME in DOMIterables) {
|
|
8099
|
+
handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
|
|
8100
|
+
}
|
|
8101
|
+
|
|
8102
|
+
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
8103
|
+
|
|
8104
|
+
function allSynchronously(resolvables) {
|
|
8105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
8106
|
+
const results = [];
|
|
8107
|
+
for (const resolvable of resolvables) {
|
|
8108
|
+
results.push(yield resolvable());
|
|
8109
|
+
}
|
|
8110
|
+
return results;
|
|
8111
|
+
});
|
|
8112
|
+
}
|
|
8113
|
+
|
|
8114
|
+
const propertyOf = name => name;
|
|
8042
8115
|
|
|
8043
|
-
|
|
8044
|
-
|
|
8116
|
+
class ArraysUtils {
|
|
8117
|
+
static isArrayAndContainItems(dataList) {
|
|
8118
|
+
return dataList && Array.isArray(dataList) && dataList.length > 0;
|
|
8119
|
+
}
|
|
8120
|
+
static pushToArray(array, object) {
|
|
8121
|
+
if (ArraysUtils.isArrayAndContainItems(array)) array.push(object);else array = [object];
|
|
8122
|
+
}
|
|
8045
8123
|
}
|
|
8046
8124
|
|
|
8047
|
-
|
|
8125
|
+
var $$8 = _export;
|
|
8126
|
+
var $includes = arrayIncludes.includes;
|
|
8127
|
+
var fails$1 = fails$i;
|
|
8128
|
+
var addToUnscopables = addToUnscopables$2;
|
|
8048
8129
|
|
|
8049
|
-
//
|
|
8050
|
-
|
|
8051
|
-
|
|
8052
|
-
|
|
8130
|
+
// FF99+ bug
|
|
8131
|
+
var BROKEN_ON_SPARSE = fails$1(function () {
|
|
8132
|
+
// eslint-disable-next-line es/no-array-prototype-includes -- detection
|
|
8133
|
+
return !Array(1).includes();
|
|
8053
8134
|
});
|
|
8054
8135
|
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
if (classofRaw(fn) === 'Function') return uncurryThis$3(fn);
|
|
8063
|
-
};
|
|
8064
|
-
|
|
8065
|
-
var uncurryThis$2 = functionUncurryThisClause;
|
|
8066
|
-
var aCallable$3 = aCallable$6;
|
|
8067
|
-
var NATIVE_BIND = functionBindNative;
|
|
8068
|
-
|
|
8069
|
-
var bind$1 = uncurryThis$2(uncurryThis$2.bind);
|
|
8136
|
+
// `Array.prototype.includes` method
|
|
8137
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
8138
|
+
$$8({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
|
|
8139
|
+
includes: function includes(el /* , fromIndex = 0 */) {
|
|
8140
|
+
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
8141
|
+
}
|
|
8142
|
+
});
|
|
8070
8143
|
|
|
8071
|
-
//
|
|
8072
|
-
|
|
8073
|
-
aCallable$3(fn);
|
|
8074
|
-
return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
|
|
8075
|
-
return fn.apply(that, arguments);
|
|
8076
|
-
};
|
|
8077
|
-
};
|
|
8144
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
8145
|
+
addToUnscopables('includes');
|
|
8078
8146
|
|
|
8147
|
+
var isObject = isObject$b;
|
|
8148
|
+
var classof = classofRaw$2;
|
|
8079
8149
|
var wellKnownSymbol$1 = wellKnownSymbol$d;
|
|
8080
|
-
var Iterators$1 = iterators;
|
|
8081
8150
|
|
|
8082
|
-
var
|
|
8083
|
-
var ArrayPrototype = Array.prototype;
|
|
8151
|
+
var MATCH$1 = wellKnownSymbol$1('match');
|
|
8084
8152
|
|
|
8085
|
-
//
|
|
8086
|
-
|
|
8087
|
-
|
|
8153
|
+
// `IsRegExp` abstract operation
|
|
8154
|
+
// https://tc39.es/ecma262/#sec-isregexp
|
|
8155
|
+
var isRegexp = function (it) {
|
|
8156
|
+
var isRegExp;
|
|
8157
|
+
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');
|
|
8088
8158
|
};
|
|
8089
8159
|
|
|
8090
|
-
var
|
|
8091
|
-
var getMethod$1 = getMethod$3;
|
|
8092
|
-
var isNullOrUndefined = isNullOrUndefined$3;
|
|
8093
|
-
var Iterators = iterators;
|
|
8094
|
-
var wellKnownSymbol = wellKnownSymbol$d;
|
|
8160
|
+
var isRegExp = isRegexp;
|
|
8095
8161
|
|
|
8096
|
-
var
|
|
8162
|
+
var $TypeError$1 = TypeError;
|
|
8097
8163
|
|
|
8098
|
-
var
|
|
8099
|
-
if (
|
|
8100
|
-
|
|
8101
|
-
|
|
8164
|
+
var notARegexp = function (it) {
|
|
8165
|
+
if (isRegExp(it)) {
|
|
8166
|
+
throw new $TypeError$1("The method doesn't accept regular expressions");
|
|
8167
|
+
} return it;
|
|
8102
8168
|
};
|
|
8103
8169
|
|
|
8104
|
-
var
|
|
8105
|
-
var aCallable$2 = aCallable$6;
|
|
8106
|
-
var anObject$4 = anObject$a;
|
|
8107
|
-
var tryToString$1 = tryToString$3;
|
|
8108
|
-
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
8109
|
-
|
|
8110
|
-
var $TypeError$2 = TypeError;
|
|
8111
|
-
|
|
8112
|
-
var getIterator$1 = function (argument, usingIterator) {
|
|
8113
|
-
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
|
|
8114
|
-
if (aCallable$2(iteratorMethod)) return anObject$4(call$4(iteratorMethod, argument));
|
|
8115
|
-
throw new $TypeError$2(tryToString$1(argument) + ' is not iterable');
|
|
8116
|
-
};
|
|
8170
|
+
var wellKnownSymbol = wellKnownSymbol$d;
|
|
8117
8171
|
|
|
8118
|
-
var
|
|
8119
|
-
var anObject$3 = anObject$a;
|
|
8120
|
-
var getMethod = getMethod$3;
|
|
8172
|
+
var MATCH = wellKnownSymbol('match');
|
|
8121
8173
|
|
|
8122
|
-
var
|
|
8123
|
-
var
|
|
8124
|
-
anObject$3(iterator);
|
|
8174
|
+
var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
8175
|
+
var regexp = /./;
|
|
8125
8176
|
try {
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
}
|
|
8133
|
-
innerError = true;
|
|
8134
|
-
innerResult = error;
|
|
8135
|
-
}
|
|
8136
|
-
if (kind === 'throw') throw value;
|
|
8137
|
-
if (innerError) throw innerResult;
|
|
8138
|
-
anObject$3(innerResult);
|
|
8139
|
-
return value;
|
|
8140
|
-
};
|
|
8141
|
-
|
|
8142
|
-
var bind = functionBindContext;
|
|
8143
|
-
var call$2 = functionCall;
|
|
8144
|
-
var anObject$2 = anObject$a;
|
|
8145
|
-
var tryToString = tryToString$3;
|
|
8146
|
-
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
8147
|
-
var lengthOfArrayLike = lengthOfArrayLike$3;
|
|
8148
|
-
var isPrototypeOf = objectIsPrototypeOf;
|
|
8149
|
-
var getIterator = getIterator$1;
|
|
8150
|
-
var getIteratorMethod = getIteratorMethod$2;
|
|
8151
|
-
var iteratorClose$2 = iteratorClose$3;
|
|
8152
|
-
|
|
8153
|
-
var $TypeError$1 = TypeError;
|
|
8154
|
-
|
|
8155
|
-
var Result = function (stopped, result) {
|
|
8156
|
-
this.stopped = stopped;
|
|
8157
|
-
this.result = result;
|
|
8177
|
+
'/./'[METHOD_NAME](regexp);
|
|
8178
|
+
} catch (error1) {
|
|
8179
|
+
try {
|
|
8180
|
+
regexp[MATCH] = false;
|
|
8181
|
+
return '/./'[METHOD_NAME](regexp);
|
|
8182
|
+
} catch (error2) { /* empty */ }
|
|
8183
|
+
} return false;
|
|
8158
8184
|
};
|
|
8159
8185
|
|
|
8160
|
-
var
|
|
8161
|
-
|
|
8162
|
-
var
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
8167
|
-
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
8168
|
-
var fn = bind(unboundFunction, that);
|
|
8169
|
-
var iterator, iterFn, index, length, result, next, step;
|
|
8170
|
-
|
|
8171
|
-
var stop = function (condition) {
|
|
8172
|
-
if (iterator) iteratorClose$2(iterator, 'normal', condition);
|
|
8173
|
-
return new Result(true, condition);
|
|
8174
|
-
};
|
|
8186
|
+
var $$7 = _export;
|
|
8187
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
8188
|
+
var notARegExp = notARegexp;
|
|
8189
|
+
var requireObjectCoercible = requireObjectCoercible$5;
|
|
8190
|
+
var toString = toString$5;
|
|
8191
|
+
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
8175
8192
|
|
|
8176
|
-
|
|
8177
|
-
if (AS_ENTRIES) {
|
|
8178
|
-
anObject$2(value);
|
|
8179
|
-
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
8180
|
-
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
8181
|
-
};
|
|
8193
|
+
var stringIndexOf = uncurryThis$2(''.indexOf);
|
|
8182
8194
|
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
|
|
8186
|
-
|
|
8187
|
-
|
|
8188
|
-
|
|
8189
|
-
|
|
8190
|
-
|
|
8191
|
-
|
|
8192
|
-
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
|
8193
|
-
result = callFn(iterable[index]);
|
|
8194
|
-
if (result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
8195
|
-
} return new Result(false);
|
|
8196
|
-
}
|
|
8197
|
-
iterator = getIterator(iterable, iterFn);
|
|
8195
|
+
// `String.prototype.includes` method
|
|
8196
|
+
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
8197
|
+
$$7({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
|
|
8198
|
+
includes: function includes(searchString /* , position = 0 */) {
|
|
8199
|
+
return !!~stringIndexOf(
|
|
8200
|
+
toString(requireObjectCoercible(this)),
|
|
8201
|
+
toString(notARegExp(searchString)),
|
|
8202
|
+
arguments.length > 1 ? arguments[1] : undefined
|
|
8203
|
+
);
|
|
8198
8204
|
}
|
|
8205
|
+
});
|
|
8199
8206
|
|
|
8200
|
-
|
|
8201
|
-
|
|
8202
|
-
|
|
8203
|
-
|
|
8204
|
-
|
|
8205
|
-
|
|
8207
|
+
// import LanguageDetector from 'i18next-browser-languagedetector';
|
|
8208
|
+
const LOCAL_STORAGE_I18N_STRING = 'I18N_SELECTION';
|
|
8209
|
+
const systemDefaultLang = 'en';
|
|
8210
|
+
const init = ({
|
|
8211
|
+
version,
|
|
8212
|
+
customPath
|
|
8213
|
+
}) => {
|
|
8214
|
+
const currentLng = localStorage.getItem(LOCAL_STORAGE_I18N_STRING) || systemDefaultLang;
|
|
8215
|
+
i18n.use(Backend) // load translation using http
|
|
8216
|
+
// .use(LanguageDetector) // detect user language
|
|
8217
|
+
.use(initReactI18next) // passes i18n down to react-i18next
|
|
8218
|
+
.init({
|
|
8219
|
+
lng: currentLng,
|
|
8220
|
+
fallbackLng: systemDefaultLang,
|
|
8221
|
+
ns: ['common', 'inbox'],
|
|
8222
|
+
// define your namespaces
|
|
8223
|
+
defaultNS: 'common',
|
|
8224
|
+
interpolation: {
|
|
8225
|
+
escapeValue: false
|
|
8226
|
+
},
|
|
8227
|
+
load: 'languageOnly',
|
|
8228
|
+
backend: {
|
|
8229
|
+
loadPath: customPath ? customPath : `/assets/locales/{{lng}}/{{ns}}.json?v=${version !== null && version !== void 0 ? version : ''}`
|
|
8206
8230
|
}
|
|
8207
|
-
|
|
8208
|
-
} return new Result(false);
|
|
8231
|
+
});
|
|
8209
8232
|
};
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
var getIteratorDirect$2 = function (obj) {
|
|
8214
|
-
return {
|
|
8215
|
-
iterator: obj,
|
|
8216
|
-
next: obj.next,
|
|
8217
|
-
done: false
|
|
8218
|
-
};
|
|
8233
|
+
const changeLang = lang => {
|
|
8234
|
+
localStorage.setItem(LOCAL_STORAGE_I18N_STRING, lang);
|
|
8235
|
+
i18n.changeLanguage(lang);
|
|
8219
8236
|
};
|
|
8237
|
+
const getLang = () => {
|
|
8238
|
+
var _a;
|
|
8239
|
+
return (_a = localStorage.getItem(LOCAL_STORAGE_I18N_STRING)) !== null && _a !== void 0 ? _a : systemDefaultLang;
|
|
8240
|
+
};
|
|
8241
|
+
const LangService = {
|
|
8242
|
+
init,
|
|
8243
|
+
changeLang,
|
|
8244
|
+
getLang
|
|
8245
|
+
};
|
|
8246
|
+
var Languages;
|
|
8247
|
+
(function (Languages) {
|
|
8248
|
+
Languages["EN"] = "en";
|
|
8249
|
+
Languages["AR"] = "ar";
|
|
8250
|
+
Languages["TR"] = "tr";
|
|
8251
|
+
})(Languages || (Languages = {}));
|
|
8220
8252
|
|
|
8221
|
-
|
|
8222
|
-
|
|
8223
|
-
|
|
8224
|
-
|
|
8225
|
-
var getIteratorDirect$1 = getIteratorDirect$2;
|
|
8226
|
-
|
|
8227
|
-
// `Iterator.prototype.every` method
|
|
8228
|
-
// https://github.com/tc39/proposal-iterator-helpers
|
|
8229
|
-
$$7({ target: 'Iterator', proto: true, real: true }, {
|
|
8230
|
-
every: function every(predicate) {
|
|
8231
|
-
anObject$1(this);
|
|
8232
|
-
aCallable$1(predicate);
|
|
8233
|
-
var record = getIteratorDirect$1(this);
|
|
8234
|
-
var counter = 0;
|
|
8235
|
-
return !iterate$2(record, function (value, stop) {
|
|
8236
|
-
if (!predicate(value, counter++)) return stop();
|
|
8237
|
-
}, { IS_RECORD: true, INTERRUPTED: true }).stopped;
|
|
8253
|
+
class StringsUtils {
|
|
8254
|
+
static localCompareStrings(a, b) {
|
|
8255
|
+
const language = LangService.getLang();
|
|
8256
|
+
return a.toLocaleLowerCase(language !== null && language !== void 0 ? language : 'tr').localeCompare(b.toLocaleLowerCase(language !== null && language !== void 0 ? language : 'tr'), language !== null && language !== void 0 ? language : 'tr');
|
|
8238
8257
|
}
|
|
8239
|
-
|
|
8258
|
+
static localeIncludeString(a, b) {
|
|
8259
|
+
const language = LangService.getLang();
|
|
8260
|
+
return a.toLocaleLowerCase(language !== null && language !== void 0 ? language : 'tr').includes(b.toLocaleLowerCase(language !== null && language !== void 0 ? language : 'tr'));
|
|
8261
|
+
}
|
|
8262
|
+
static isStringHasCharacters(text) {
|
|
8263
|
+
return text && text.length > 0;
|
|
8264
|
+
}
|
|
8265
|
+
}
|
|
8240
8266
|
|
|
8241
8267
|
var uncurryThis$1 = functionUncurryThis;
|
|
8242
8268
|
|
|
@@ -8626,6 +8652,14 @@ var Permission;
|
|
|
8626
8652
|
Permission["MANAGE_CONVS"] = "MANAGE_CONVS";
|
|
8627
8653
|
Permission["MANAGE_CLIENTS"] = "MANAGE_CLIENTS";
|
|
8628
8654
|
})(Permission || (Permission = {}));
|
|
8655
|
+
var Role;
|
|
8656
|
+
(function (Role) {
|
|
8657
|
+
Role["OWNER"] = "OWNER";
|
|
8658
|
+
Role["ADMIN"] = "ADMIN";
|
|
8659
|
+
Role["MANAGER"] = "MANAGER";
|
|
8660
|
+
Role["AGENT_PLUS"] = "AGENT_PLUS";
|
|
8661
|
+
Role["AGENT"] = "AGENT";
|
|
8662
|
+
})(Role || (Role = {}));
|
|
8629
8663
|
|
|
8630
8664
|
const usePermissions = () => {
|
|
8631
8665
|
var _a;
|
|
@@ -8633,25 +8667,26 @@ const usePermissions = () => {
|
|
|
8633
8667
|
const permissions = useMemo(() => {
|
|
8634
8668
|
const grants = new Set();
|
|
8635
8669
|
switch (role) {
|
|
8636
|
-
case
|
|
8637
|
-
case
|
|
8670
|
+
case Role.OWNER:
|
|
8671
|
+
case Role.ADMIN:
|
|
8638
8672
|
{
|
|
8639
8673
|
grants.add(Permission.MANAGE_WORKSPACE);
|
|
8640
8674
|
grants.add(Permission.MANAGE_CONVS);
|
|
8641
8675
|
grants.add(Permission.MANAGE_CLIENTS);
|
|
8642
8676
|
break;
|
|
8643
8677
|
}
|
|
8644
|
-
case
|
|
8678
|
+
case Role.MANAGER:
|
|
8645
8679
|
{
|
|
8646
8680
|
grants.add(Permission.MANAGE_CONVS);
|
|
8647
8681
|
grants.add(Permission.MANAGE_CLIENTS);
|
|
8648
8682
|
break;
|
|
8649
8683
|
}
|
|
8650
|
-
case
|
|
8684
|
+
case Role.AGENT_PLUS:
|
|
8651
8685
|
{
|
|
8652
8686
|
grants.add(Permission.MANAGE_CLIENTS);
|
|
8653
8687
|
break;
|
|
8654
8688
|
}
|
|
8689
|
+
case Role.AGENT:
|
|
8655
8690
|
}
|
|
8656
8691
|
return grants;
|
|
8657
8692
|
}, [role]);
|
|
@@ -8707,4 +8742,4 @@ const PermissionGuard = _a => {
|
|
|
8707
8742
|
}));
|
|
8708
8743
|
};
|
|
8709
8744
|
|
|
8710
|
-
export { ArraysUtils, BCRoutes, BCRoutesGuard, LOCAL_STORAGE_I18N_STRING, LangService, Languages, Loading, LogoutRoute, Permission, PermissionGuard, StringsUtils, allSynchronously, auth, propertyOf, usePermissions };
|
|
8745
|
+
export { ArraysUtils, BCRoutes, BCRoutesGuard, LOCAL_STORAGE_I18N_STRING, LangService, Languages, Loading, LogoutRoute, Permission, PermissionGuard, Role, StringsUtils, allSynchronously, auth, propertyOf, usePermissions };
|