@openfeature/flagd-provider 0.5.0 → 0.6.0
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.cjs +845 -844
- package/index.js +831 -830
- package/lib/flagd-provider.d.ts +7 -6
- package/lib/service/grpc/service.d.ts +13 -5
- package/lib/service/service.d.ts +5 -5
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,34 +1,26 @@
|
|
|
1
1
|
import * as grpc from '@grpc/grpc-js';
|
|
2
|
-
import { ParseError } from '@openfeature/js-sdk';
|
|
2
|
+
import { GeneralError, FlagNotFoundError, TypeMismatchError, ParseError } from '@openfeature/js-sdk';
|
|
3
3
|
import { GrpcTransport } from '@protobuf-ts/grpc-transport';
|
|
4
4
|
|
|
5
|
-
/******************************************************************************
|
|
6
|
-
Copyright (c) Microsoft Corporation.
|
|
7
|
-
|
|
8
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
9
|
-
purpose with or without fee is hereby granted.
|
|
10
|
-
|
|
11
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
12
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
13
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
14
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
15
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
16
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
17
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
18
|
-
***************************************************************************** */
|
|
19
|
-
|
|
20
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
21
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
22
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
23
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
24
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
25
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
26
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
5
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
31
6
|
|
|
7
|
+
var check = function (it) {
|
|
8
|
+
return it && it.Math == Math && it;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
12
|
+
var global$c =
|
|
13
|
+
// eslint-disable-next-line es-x/no-global-this -- safe
|
|
14
|
+
check(typeof globalThis == 'object' && globalThis) ||
|
|
15
|
+
check(typeof window == 'object' && window) ||
|
|
16
|
+
// eslint-disable-next-line no-restricted-globals -- safe
|
|
17
|
+
check(typeof self == 'object' && self) ||
|
|
18
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
19
|
+
// eslint-disable-next-line no-new-func -- fallback
|
|
20
|
+
(function () { return this; })() || Function('return this')();
|
|
21
|
+
|
|
22
|
+
var objectGetOwnPropertyDescriptor = {};
|
|
23
|
+
|
|
32
24
|
var fails$c = function (exec) {
|
|
33
25
|
try {
|
|
34
26
|
return !!exec();
|
|
@@ -39,7 +31,15 @@ var fails$c = function (exec) {
|
|
|
39
31
|
|
|
40
32
|
var fails$b = fails$c;
|
|
41
33
|
|
|
42
|
-
|
|
34
|
+
// Detect IE8's incomplete defineProperty implementation
|
|
35
|
+
var descriptors = !fails$b(function () {
|
|
36
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
37
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
var fails$a = fails$c;
|
|
41
|
+
|
|
42
|
+
var functionBindNative = !fails$a(function () {
|
|
43
43
|
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe
|
|
44
44
|
var test = (function () { /* empty */ }).bind();
|
|
45
45
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
@@ -48,16 +48,49 @@ var functionBindNative = !fails$b(function () {
|
|
|
48
48
|
|
|
49
49
|
var NATIVE_BIND$1 = functionBindNative;
|
|
50
50
|
|
|
51
|
+
var call$7 = Function.prototype.call;
|
|
52
|
+
|
|
53
|
+
var functionCall = NATIVE_BIND$1 ? call$7.bind(call$7) : function () {
|
|
54
|
+
return call$7.apply(call$7, arguments);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
var objectPropertyIsEnumerable = {};
|
|
58
|
+
|
|
59
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
60
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
61
|
+
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
62
|
+
|
|
63
|
+
// Nashorn ~ JDK8 bug
|
|
64
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
65
|
+
|
|
66
|
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
67
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
68
|
+
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
69
|
+
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
|
70
|
+
return !!descriptor && descriptor.enumerable;
|
|
71
|
+
} : $propertyIsEnumerable;
|
|
72
|
+
|
|
73
|
+
var createPropertyDescriptor$3 = function (bitmap, value) {
|
|
74
|
+
return {
|
|
75
|
+
enumerable: !(bitmap & 1),
|
|
76
|
+
configurable: !(bitmap & 2),
|
|
77
|
+
writable: !(bitmap & 4),
|
|
78
|
+
value: value
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
var NATIVE_BIND = functionBindNative;
|
|
83
|
+
|
|
51
84
|
var FunctionPrototype$1 = Function.prototype;
|
|
52
85
|
var bind = FunctionPrototype$1.bind;
|
|
53
|
-
var call$
|
|
54
|
-
var uncurryThis$b = NATIVE_BIND
|
|
86
|
+
var call$6 = FunctionPrototype$1.call;
|
|
87
|
+
var uncurryThis$b = NATIVE_BIND && bind.bind(call$6, call$6);
|
|
55
88
|
|
|
56
|
-
var functionUncurryThis = NATIVE_BIND
|
|
89
|
+
var functionUncurryThis = NATIVE_BIND ? function (fn) {
|
|
57
90
|
return fn && uncurryThis$b(fn);
|
|
58
91
|
} : function (fn) {
|
|
59
92
|
return fn && function () {
|
|
60
|
-
return call$
|
|
93
|
+
return call$6.apply(fn, arguments);
|
|
61
94
|
};
|
|
62
95
|
};
|
|
63
96
|
|
|
@@ -71,14 +104,14 @@ var classofRaw$1 = function (it) {
|
|
|
71
104
|
};
|
|
72
105
|
|
|
73
106
|
var uncurryThis$9 = functionUncurryThis;
|
|
74
|
-
var fails$
|
|
107
|
+
var fails$9 = fails$c;
|
|
75
108
|
var classof$2 = classofRaw$1;
|
|
76
109
|
|
|
77
110
|
var $Object$4 = Object;
|
|
78
111
|
var split = uncurryThis$9(''.split);
|
|
79
112
|
|
|
80
113
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
81
|
-
var indexedObject = fails$
|
|
114
|
+
var indexedObject = fails$9(function () {
|
|
82
115
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
83
116
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
84
117
|
return !$Object$4('z').propertyIsEnumerable(0);
|
|
@@ -103,114 +136,42 @@ var toIndexedObject$5 = function (it) {
|
|
|
103
136
|
return IndexedObject$1(requireObjectCoercible$1(it));
|
|
104
137
|
};
|
|
105
138
|
|
|
106
|
-
var check = function (it) {
|
|
107
|
-
return it && it.Math == Math && it;
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
111
|
-
var global$c =
|
|
112
|
-
// eslint-disable-next-line es-x/no-global-this -- safe
|
|
113
|
-
check(typeof globalThis == 'object' && globalThis) ||
|
|
114
|
-
check(typeof window == 'object' && window) ||
|
|
115
|
-
// eslint-disable-next-line no-restricted-globals -- safe
|
|
116
|
-
check(typeof self == 'object' && self) ||
|
|
117
|
-
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
118
|
-
// eslint-disable-next-line no-new-func -- fallback
|
|
119
|
-
(function () { return this; })() || Function('return this')();
|
|
120
|
-
|
|
121
|
-
var shared$3 = {exports: {}};
|
|
122
|
-
|
|
123
|
-
var global$b = global$c;
|
|
124
|
-
|
|
125
|
-
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
126
|
-
var defineProperty$5 = Object.defineProperty;
|
|
127
|
-
|
|
128
|
-
var defineGlobalProperty$3 = function (key, value) {
|
|
129
|
-
try {
|
|
130
|
-
defineProperty$5(global$b, key, { value: value, configurable: true, writable: true });
|
|
131
|
-
} catch (error) {
|
|
132
|
-
global$b[key] = value;
|
|
133
|
-
} return value;
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
var global$a = global$c;
|
|
137
|
-
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
138
|
-
|
|
139
|
-
var SHARED = '__core-js_shared__';
|
|
140
|
-
var store$3 = global$a[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
141
|
-
|
|
142
|
-
var sharedStore = store$3;
|
|
143
|
-
|
|
144
|
-
var store$2 = sharedStore;
|
|
145
|
-
|
|
146
|
-
(shared$3.exports = function (key, value) {
|
|
147
|
-
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
148
|
-
})('versions', []).push({
|
|
149
|
-
version: '3.22.8',
|
|
150
|
-
mode: 'global',
|
|
151
|
-
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
152
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.22.8/LICENSE',
|
|
153
|
-
source: 'https://github.com/zloirock/core-js'
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
var requireObjectCoercible = requireObjectCoercible$2;
|
|
157
|
-
|
|
158
|
-
var $Object$3 = Object;
|
|
159
|
-
|
|
160
|
-
// `ToObject` abstract operation
|
|
161
|
-
// https://tc39.es/ecma262/#sec-toobject
|
|
162
|
-
var toObject$3 = function (argument) {
|
|
163
|
-
return $Object$3(requireObjectCoercible(argument));
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
var uncurryThis$8 = functionUncurryThis;
|
|
167
|
-
var toObject$2 = toObject$3;
|
|
168
|
-
|
|
169
|
-
var hasOwnProperty = uncurryThis$8({}.hasOwnProperty);
|
|
170
|
-
|
|
171
|
-
// `HasOwnProperty` abstract operation
|
|
172
|
-
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
173
|
-
// eslint-disable-next-line es-x/no-object-hasown -- safe
|
|
174
|
-
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
175
|
-
return hasOwnProperty(toObject$2(it), key);
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
var uncurryThis$7 = functionUncurryThis;
|
|
179
|
-
|
|
180
|
-
var id = 0;
|
|
181
|
-
var postfix = Math.random();
|
|
182
|
-
var toString$1 = uncurryThis$7(1.0.toString);
|
|
183
|
-
|
|
184
|
-
var uid$2 = function (key) {
|
|
185
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$1(++id + postfix, 36);
|
|
186
|
-
};
|
|
187
|
-
|
|
188
139
|
// `IsCallable` abstract operation
|
|
189
140
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
190
141
|
var isCallable$f = function (argument) {
|
|
191
142
|
return typeof argument == 'function';
|
|
192
143
|
};
|
|
193
144
|
|
|
194
|
-
var global$9 = global$c;
|
|
195
145
|
var isCallable$e = isCallable$f;
|
|
196
146
|
|
|
147
|
+
var isObject$5 = function (it) {
|
|
148
|
+
return typeof it == 'object' ? it !== null : isCallable$e(it);
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
var global$b = global$c;
|
|
152
|
+
var isCallable$d = isCallable$f;
|
|
153
|
+
|
|
197
154
|
var aFunction = function (argument) {
|
|
198
|
-
return isCallable$
|
|
155
|
+
return isCallable$d(argument) ? argument : undefined;
|
|
199
156
|
};
|
|
200
157
|
|
|
201
158
|
var getBuiltIn$4 = function (namespace, method) {
|
|
202
|
-
return arguments.length < 2 ? aFunction(global$
|
|
159
|
+
return arguments.length < 2 ? aFunction(global$b[namespace]) : global$b[namespace] && global$b[namespace][method];
|
|
203
160
|
};
|
|
204
161
|
|
|
162
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
163
|
+
|
|
164
|
+
var objectIsPrototypeOf = uncurryThis$8({}.isPrototypeOf);
|
|
165
|
+
|
|
205
166
|
var getBuiltIn$3 = getBuiltIn$4;
|
|
206
167
|
|
|
207
168
|
var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
|
|
208
169
|
|
|
209
|
-
var global$
|
|
170
|
+
var global$a = global$c;
|
|
210
171
|
var userAgent = engineUserAgent;
|
|
211
172
|
|
|
212
|
-
var process$1 = global$
|
|
213
|
-
var Deno = global$
|
|
173
|
+
var process$1 = global$a.process;
|
|
174
|
+
var Deno = global$a.Deno;
|
|
214
175
|
var versions = process$1 && process$1.versions || Deno && Deno.version;
|
|
215
176
|
var v8 = versions && versions.v8;
|
|
216
177
|
var match, version;
|
|
@@ -237,10 +198,10 @@ var engineV8Version = version;
|
|
|
237
198
|
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
238
199
|
|
|
239
200
|
var V8_VERSION = engineV8Version;
|
|
240
|
-
var fails$
|
|
201
|
+
var fails$8 = fails$c;
|
|
241
202
|
|
|
242
203
|
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
|
|
243
|
-
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$
|
|
204
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$8(function () {
|
|
244
205
|
var symbol = Symbol();
|
|
245
206
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
246
207
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -257,189 +218,179 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
|
257
218
|
&& !Symbol.sham
|
|
258
219
|
&& typeof Symbol.iterator == 'symbol';
|
|
259
220
|
|
|
260
|
-
var
|
|
261
|
-
var
|
|
262
|
-
var
|
|
263
|
-
var uid$1 = uid$2;
|
|
264
|
-
var NATIVE_SYMBOL = nativeSymbol;
|
|
221
|
+
var getBuiltIn$2 = getBuiltIn$4;
|
|
222
|
+
var isCallable$c = isCallable$f;
|
|
223
|
+
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
265
224
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
266
225
|
|
|
267
|
-
var
|
|
268
|
-
var Symbol$1 = global$7.Symbol;
|
|
269
|
-
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
270
|
-
var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
226
|
+
var $Object$3 = Object;
|
|
271
227
|
|
|
272
|
-
var
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
} else if (USE_SYMBOL_AS_UID$1 && symbolFor) {
|
|
278
|
-
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
279
|
-
} else {
|
|
280
|
-
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
281
|
-
}
|
|
282
|
-
} return WellKnownSymbolsStore[name];
|
|
228
|
+
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
229
|
+
return typeof it == 'symbol';
|
|
230
|
+
} : function (it) {
|
|
231
|
+
var $Symbol = getBuiltIn$2('Symbol');
|
|
232
|
+
return isCallable$c($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$3(it));
|
|
283
233
|
};
|
|
284
234
|
|
|
285
|
-
var
|
|
235
|
+
var $String$3 = String;
|
|
286
236
|
|
|
287
|
-
var
|
|
288
|
-
|
|
237
|
+
var tryToString$1 = function (argument) {
|
|
238
|
+
try {
|
|
239
|
+
return $String$3(argument);
|
|
240
|
+
} catch (error) {
|
|
241
|
+
return 'Object';
|
|
242
|
+
}
|
|
289
243
|
};
|
|
290
244
|
|
|
291
|
-
var
|
|
245
|
+
var isCallable$b = isCallable$f;
|
|
246
|
+
var tryToString = tryToString$1;
|
|
292
247
|
|
|
293
|
-
var $String$3 = String;
|
|
294
248
|
var $TypeError$5 = TypeError;
|
|
295
249
|
|
|
296
|
-
// `Assert:
|
|
297
|
-
var
|
|
298
|
-
if (
|
|
299
|
-
throw $TypeError$5(
|
|
250
|
+
// `Assert: IsCallable(argument) is true`
|
|
251
|
+
var aCallable$1 = function (argument) {
|
|
252
|
+
if (isCallable$b(argument)) return argument;
|
|
253
|
+
throw $TypeError$5(tryToString(argument) + ' is not a function');
|
|
300
254
|
};
|
|
301
255
|
|
|
302
|
-
var
|
|
256
|
+
var aCallable = aCallable$1;
|
|
303
257
|
|
|
304
|
-
|
|
258
|
+
// `GetMethod` abstract operation
|
|
259
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
|
260
|
+
var getMethod$1 = function (V, P) {
|
|
261
|
+
var func = V[P];
|
|
262
|
+
return func == null ? undefined : aCallable(func);
|
|
263
|
+
};
|
|
305
264
|
|
|
306
|
-
|
|
307
|
-
var
|
|
308
|
-
|
|
309
|
-
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
310
|
-
});
|
|
265
|
+
var call$5 = functionCall;
|
|
266
|
+
var isCallable$a = isCallable$f;
|
|
267
|
+
var isObject$4 = isObject$5;
|
|
311
268
|
|
|
312
|
-
var
|
|
313
|
-
var fails$7 = fails$c;
|
|
269
|
+
var $TypeError$4 = TypeError;
|
|
314
270
|
|
|
315
|
-
//
|
|
316
|
-
// https://
|
|
317
|
-
var
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
}
|
|
271
|
+
// `OrdinaryToPrimitive` abstract operation
|
|
272
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
273
|
+
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
274
|
+
var fn, val;
|
|
275
|
+
if (pref === 'string' && isCallable$a(fn = input.toString) && !isObject$4(val = call$5(fn, input))) return val;
|
|
276
|
+
if (isCallable$a(fn = input.valueOf) && !isObject$4(val = call$5(fn, input))) return val;
|
|
277
|
+
if (pref !== 'string' && isCallable$a(fn = input.toString) && !isObject$4(val = call$5(fn, input))) return val;
|
|
278
|
+
throw $TypeError$4("Can't convert object to primitive value");
|
|
279
|
+
};
|
|
324
280
|
|
|
325
|
-
var
|
|
281
|
+
var shared$3 = {exports: {}};
|
|
326
282
|
|
|
327
|
-
var global$
|
|
328
|
-
var isObject$3 = isObject$5;
|
|
283
|
+
var global$9 = global$c;
|
|
329
284
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
|
|
285
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
286
|
+
var defineProperty$5 = Object.defineProperty;
|
|
333
287
|
|
|
334
|
-
var
|
|
335
|
-
|
|
288
|
+
var defineGlobalProperty$3 = function (key, value) {
|
|
289
|
+
try {
|
|
290
|
+
defineProperty$5(global$9, key, { value: value, configurable: true, writable: true });
|
|
291
|
+
} catch (error) {
|
|
292
|
+
global$9[key] = value;
|
|
293
|
+
} return value;
|
|
336
294
|
};
|
|
337
295
|
|
|
338
|
-
var
|
|
339
|
-
var
|
|
340
|
-
var createElement = documentCreateElement$2;
|
|
341
|
-
|
|
342
|
-
// Thanks to IE8 for its funny defineProperty
|
|
343
|
-
var ie8DomDefine = !DESCRIPTORS$8 && !fails$6(function () {
|
|
344
|
-
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
345
|
-
return Object.defineProperty(createElement('div'), 'a', {
|
|
346
|
-
get: function () { return 7; }
|
|
347
|
-
}).a != 7;
|
|
348
|
-
});
|
|
349
|
-
|
|
350
|
-
var NATIVE_BIND = functionBindNative;
|
|
296
|
+
var global$8 = global$c;
|
|
297
|
+
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
351
298
|
|
|
352
|
-
var
|
|
299
|
+
var SHARED = '__core-js_shared__';
|
|
300
|
+
var store$3 = global$8[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
353
301
|
|
|
354
|
-
var
|
|
355
|
-
return call$6.apply(call$6, arguments);
|
|
356
|
-
};
|
|
302
|
+
var sharedStore = store$3;
|
|
357
303
|
|
|
358
|
-
var
|
|
304
|
+
var store$2 = sharedStore;
|
|
359
305
|
|
|
360
|
-
|
|
306
|
+
(shared$3.exports = function (key, value) {
|
|
307
|
+
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
308
|
+
})('versions', []).push({
|
|
309
|
+
version: '3.22.8',
|
|
310
|
+
mode: 'global',
|
|
311
|
+
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
312
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.22.8/LICENSE',
|
|
313
|
+
source: 'https://github.com/zloirock/core-js'
|
|
314
|
+
});
|
|
361
315
|
|
|
362
|
-
var
|
|
363
|
-
var isCallable$c = isCallable$f;
|
|
364
|
-
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
365
|
-
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
316
|
+
var requireObjectCoercible = requireObjectCoercible$2;
|
|
366
317
|
|
|
367
318
|
var $Object$2 = Object;
|
|
368
319
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
return isCallable$c($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$2(it));
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
var $String$2 = String;
|
|
377
|
-
|
|
378
|
-
var tryToString$1 = function (argument) {
|
|
379
|
-
try {
|
|
380
|
-
return $String$2(argument);
|
|
381
|
-
} catch (error) {
|
|
382
|
-
return 'Object';
|
|
383
|
-
}
|
|
320
|
+
// `ToObject` abstract operation
|
|
321
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
322
|
+
var toObject$3 = function (argument) {
|
|
323
|
+
return $Object$2(requireObjectCoercible(argument));
|
|
384
324
|
};
|
|
385
325
|
|
|
386
|
-
var
|
|
387
|
-
var
|
|
326
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
327
|
+
var toObject$2 = toObject$3;
|
|
388
328
|
|
|
389
|
-
var
|
|
329
|
+
var hasOwnProperty = uncurryThis$7({}.hasOwnProperty);
|
|
390
330
|
|
|
391
|
-
// `
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
331
|
+
// `HasOwnProperty` abstract operation
|
|
332
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
333
|
+
// eslint-disable-next-line es-x/no-object-hasown -- safe
|
|
334
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
335
|
+
return hasOwnProperty(toObject$2(it), key);
|
|
395
336
|
};
|
|
396
337
|
|
|
397
|
-
var
|
|
338
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
398
339
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
var
|
|
402
|
-
|
|
403
|
-
|
|
340
|
+
var id = 0;
|
|
341
|
+
var postfix = Math.random();
|
|
342
|
+
var toString$1 = uncurryThis$6(1.0.toString);
|
|
343
|
+
|
|
344
|
+
var uid$2 = function (key) {
|
|
345
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$1(++id + postfix, 36);
|
|
404
346
|
};
|
|
405
347
|
|
|
406
|
-
var
|
|
407
|
-
var
|
|
408
|
-
var
|
|
348
|
+
var global$7 = global$c;
|
|
349
|
+
var shared$2 = shared$3.exports;
|
|
350
|
+
var hasOwn$9 = hasOwnProperty_1;
|
|
351
|
+
var uid$1 = uid$2;
|
|
352
|
+
var NATIVE_SYMBOL = nativeSymbol;
|
|
353
|
+
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
409
354
|
|
|
410
|
-
var
|
|
355
|
+
var WellKnownSymbolsStore = shared$2('wks');
|
|
356
|
+
var Symbol$1 = global$7.Symbol;
|
|
357
|
+
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
358
|
+
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
411
359
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
var
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
360
|
+
var wellKnownSymbol$8 = function (name) {
|
|
361
|
+
if (!hasOwn$9(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
362
|
+
var description = 'Symbol.' + name;
|
|
363
|
+
if (NATIVE_SYMBOL && hasOwn$9(Symbol$1, name)) {
|
|
364
|
+
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
365
|
+
} else if (USE_SYMBOL_AS_UID && symbolFor) {
|
|
366
|
+
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
367
|
+
} else {
|
|
368
|
+
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
369
|
+
}
|
|
370
|
+
} return WellKnownSymbolsStore[name];
|
|
420
371
|
};
|
|
421
372
|
|
|
422
373
|
var call$4 = functionCall;
|
|
423
|
-
var isObject$
|
|
374
|
+
var isObject$3 = isObject$5;
|
|
424
375
|
var isSymbol$1 = isSymbol$2;
|
|
425
376
|
var getMethod = getMethod$1;
|
|
426
377
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
427
378
|
var wellKnownSymbol$7 = wellKnownSymbol$8;
|
|
428
379
|
|
|
429
|
-
var $TypeError$
|
|
380
|
+
var $TypeError$3 = TypeError;
|
|
430
381
|
var TO_PRIMITIVE = wellKnownSymbol$7('toPrimitive');
|
|
431
382
|
|
|
432
383
|
// `ToPrimitive` abstract operation
|
|
433
384
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
434
385
|
var toPrimitive$1 = function (input, pref) {
|
|
435
|
-
if (!isObject$
|
|
386
|
+
if (!isObject$3(input) || isSymbol$1(input)) return input;
|
|
436
387
|
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
437
388
|
var result;
|
|
438
389
|
if (exoticToPrim) {
|
|
439
390
|
if (pref === undefined) pref = 'default';
|
|
440
391
|
result = call$4(exoticToPrim, input, pref);
|
|
441
|
-
if (!isObject$
|
|
442
|
-
throw $TypeError$
|
|
392
|
+
if (!isObject$3(result) || isSymbol$1(result)) return result;
|
|
393
|
+
throw $TypeError$3("Can't convert object to primitive value");
|
|
443
394
|
}
|
|
444
395
|
if (pref === undefined) pref = 'number';
|
|
445
396
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -455,29 +406,101 @@ var toPropertyKey$2 = function (argument) {
|
|
|
455
406
|
return isSymbol(key) ? key : key + '';
|
|
456
407
|
};
|
|
457
408
|
|
|
458
|
-
var
|
|
409
|
+
var global$6 = global$c;
|
|
410
|
+
var isObject$2 = isObject$5;
|
|
411
|
+
|
|
412
|
+
var document$1 = global$6.document;
|
|
413
|
+
// typeof document.createElement is 'object' in old IE
|
|
414
|
+
var EXISTS$1 = isObject$2(document$1) && isObject$2(document$1.createElement);
|
|
415
|
+
|
|
416
|
+
var documentCreateElement$2 = function (it) {
|
|
417
|
+
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
var DESCRIPTORS$9 = descriptors;
|
|
421
|
+
var fails$7 = fails$c;
|
|
422
|
+
var createElement = documentCreateElement$2;
|
|
423
|
+
|
|
424
|
+
// Thanks to IE8 for its funny defineProperty
|
|
425
|
+
var ie8DomDefine = !DESCRIPTORS$9 && !fails$7(function () {
|
|
426
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
427
|
+
return Object.defineProperty(createElement('div'), 'a', {
|
|
428
|
+
get: function () { return 7; }
|
|
429
|
+
}).a != 7;
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
var DESCRIPTORS$8 = descriptors;
|
|
433
|
+
var call$3 = functionCall;
|
|
434
|
+
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
435
|
+
var createPropertyDescriptor$2 = createPropertyDescriptor$3;
|
|
436
|
+
var toIndexedObject$4 = toIndexedObject$5;
|
|
437
|
+
var toPropertyKey$1 = toPropertyKey$2;
|
|
438
|
+
var hasOwn$8 = hasOwnProperty_1;
|
|
459
439
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
440
|
+
|
|
441
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
442
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
443
|
+
|
|
444
|
+
// `Object.getOwnPropertyDescriptor` method
|
|
445
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
446
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
447
|
+
O = toIndexedObject$4(O);
|
|
448
|
+
P = toPropertyKey$1(P);
|
|
449
|
+
if (IE8_DOM_DEFINE$1) try {
|
|
450
|
+
return $getOwnPropertyDescriptor$1(O, P);
|
|
451
|
+
} catch (error) { /* empty */ }
|
|
452
|
+
if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$3(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
var objectDefineProperty = {};
|
|
456
|
+
|
|
457
|
+
var DESCRIPTORS$7 = descriptors;
|
|
458
|
+
var fails$6 = fails$c;
|
|
459
|
+
|
|
460
|
+
// V8 ~ Chrome 36-
|
|
461
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
462
|
+
var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$6(function () {
|
|
463
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
464
|
+
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
465
|
+
value: 42,
|
|
466
|
+
writable: false
|
|
467
|
+
}).prototype != 42;
|
|
468
|
+
});
|
|
469
|
+
|
|
470
|
+
var isObject$1 = isObject$5;
|
|
471
|
+
|
|
472
|
+
var $String$2 = String;
|
|
473
|
+
var $TypeError$2 = TypeError;
|
|
474
|
+
|
|
475
|
+
// `Assert: Type(argument) is Object`
|
|
476
|
+
var anObject$7 = function (argument) {
|
|
477
|
+
if (isObject$1(argument)) return argument;
|
|
478
|
+
throw $TypeError$2($String$2(argument) + ' is not an object');
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
var DESCRIPTORS$6 = descriptors;
|
|
482
|
+
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
460
483
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
461
484
|
var anObject$6 = anObject$7;
|
|
462
|
-
var toPropertyKey
|
|
485
|
+
var toPropertyKey = toPropertyKey$2;
|
|
463
486
|
|
|
464
487
|
var $TypeError$1 = TypeError;
|
|
465
488
|
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
466
489
|
var $defineProperty = Object.defineProperty;
|
|
467
490
|
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
468
|
-
var $getOwnPropertyDescriptor
|
|
491
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
469
492
|
var ENUMERABLE = 'enumerable';
|
|
470
493
|
var CONFIGURABLE$1 = 'configurable';
|
|
471
494
|
var WRITABLE = 'writable';
|
|
472
495
|
|
|
473
496
|
// `Object.defineProperty` method
|
|
474
497
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
475
|
-
objectDefineProperty.f = DESCRIPTORS$
|
|
498
|
+
objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
476
499
|
anObject$6(O);
|
|
477
|
-
P = toPropertyKey
|
|
500
|
+
P = toPropertyKey(P);
|
|
478
501
|
anObject$6(Attributes);
|
|
479
502
|
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
480
|
-
var current = $getOwnPropertyDescriptor
|
|
503
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
|
481
504
|
if (current && current[WRITABLE]) {
|
|
482
505
|
O[P] = Attributes.value;
|
|
483
506
|
Attributes = {
|
|
@@ -489,9 +512,9 @@ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
489
512
|
} return $defineProperty(O, P, Attributes);
|
|
490
513
|
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
491
514
|
anObject$6(O);
|
|
492
|
-
P = toPropertyKey
|
|
515
|
+
P = toPropertyKey(P);
|
|
493
516
|
anObject$6(Attributes);
|
|
494
|
-
if (IE8_DOM_DEFINE
|
|
517
|
+
if (IE8_DOM_DEFINE) try {
|
|
495
518
|
return $defineProperty(O, P, Attributes);
|
|
496
519
|
} catch (error) { /* empty */ }
|
|
497
520
|
if ('get' in Attributes || 'set' in Attributes) throw $TypeError$1('Accessors not supported');
|
|
@@ -499,159 +522,59 @@ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
499
522
|
return O;
|
|
500
523
|
};
|
|
501
524
|
|
|
502
|
-
var
|
|
503
|
-
var
|
|
525
|
+
var DESCRIPTORS$5 = descriptors;
|
|
526
|
+
var definePropertyModule$2 = objectDefineProperty;
|
|
527
|
+
var createPropertyDescriptor$1 = createPropertyDescriptor$3;
|
|
504
528
|
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
return (n > 0 ? floor : ceil)(n);
|
|
529
|
+
var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value) {
|
|
530
|
+
return definePropertyModule$2.f(object, key, createPropertyDescriptor$1(1, value));
|
|
531
|
+
} : function (object, key, value) {
|
|
532
|
+
object[key] = value;
|
|
533
|
+
return object;
|
|
511
534
|
};
|
|
512
535
|
|
|
513
|
-
var
|
|
536
|
+
var makeBuiltIn$2 = {exports: {}};
|
|
514
537
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
var toIntegerOrInfinity$2 = function (argument) {
|
|
518
|
-
var number = +argument;
|
|
519
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
520
|
-
return number !== number || number === 0 ? 0 : trunc(number);
|
|
521
|
-
};
|
|
538
|
+
var DESCRIPTORS$4 = descriptors;
|
|
539
|
+
var hasOwn$7 = hasOwnProperty_1;
|
|
522
540
|
|
|
523
|
-
var
|
|
541
|
+
var FunctionPrototype = Function.prototype;
|
|
542
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
543
|
+
var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
|
|
524
544
|
|
|
525
|
-
var
|
|
526
|
-
|
|
545
|
+
var EXISTS = hasOwn$7(FunctionPrototype, 'name');
|
|
546
|
+
// additional protection from minified / mangled / dropped function names
|
|
547
|
+
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
548
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
527
549
|
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
var integer = toIntegerOrInfinity$1(index);
|
|
533
|
-
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
550
|
+
var functionName = {
|
|
551
|
+
EXISTS: EXISTS,
|
|
552
|
+
PROPER: PROPER,
|
|
553
|
+
CONFIGURABLE: CONFIGURABLE
|
|
534
554
|
};
|
|
535
555
|
|
|
536
|
-
var
|
|
556
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
557
|
+
var isCallable$9 = isCallable$f;
|
|
558
|
+
var store$1 = sharedStore;
|
|
537
559
|
|
|
538
|
-
var
|
|
560
|
+
var functionToString = uncurryThis$5(Function.toString);
|
|
539
561
|
|
|
540
|
-
// `
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
};
|
|
562
|
+
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
563
|
+
if (!isCallable$9(store$1.inspectSource)) {
|
|
564
|
+
store$1.inspectSource = function (it) {
|
|
565
|
+
return functionToString(it);
|
|
566
|
+
};
|
|
567
|
+
}
|
|
545
568
|
|
|
546
|
-
var
|
|
569
|
+
var inspectSource$2 = store$1.inspectSource;
|
|
547
570
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
var
|
|
551
|
-
return toLength(obj.length);
|
|
552
|
-
};
|
|
571
|
+
var global$5 = global$c;
|
|
572
|
+
var isCallable$8 = isCallable$f;
|
|
573
|
+
var inspectSource$1 = inspectSource$2;
|
|
553
574
|
|
|
554
|
-
var
|
|
555
|
-
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
556
|
-
var lengthOfArrayLike = lengthOfArrayLike$1;
|
|
575
|
+
var WeakMap$1 = global$5.WeakMap;
|
|
557
576
|
|
|
558
|
-
|
|
559
|
-
var createMethod = function (IS_INCLUDES) {
|
|
560
|
-
return function ($this, el, fromIndex) {
|
|
561
|
-
var O = toIndexedObject$4($this);
|
|
562
|
-
var length = lengthOfArrayLike(O);
|
|
563
|
-
var index = toAbsoluteIndex(fromIndex, length);
|
|
564
|
-
var value;
|
|
565
|
-
// Array#includes uses SameValueZero equality algorithm
|
|
566
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
567
|
-
if (IS_INCLUDES && el != el) while (length > index) {
|
|
568
|
-
value = O[index++];
|
|
569
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
570
|
-
if (value != value) return true;
|
|
571
|
-
// Array#indexOf ignores holes, Array#includes - not
|
|
572
|
-
} else for (;length > index; index++) {
|
|
573
|
-
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
574
|
-
} return !IS_INCLUDES && -1;
|
|
575
|
-
};
|
|
576
|
-
};
|
|
577
|
-
|
|
578
|
-
var arrayIncludes = {
|
|
579
|
-
// `Array.prototype.includes` method
|
|
580
|
-
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
581
|
-
includes: createMethod(true),
|
|
582
|
-
// `Array.prototype.indexOf` method
|
|
583
|
-
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
584
|
-
indexOf: createMethod(false)
|
|
585
|
-
};
|
|
586
|
-
|
|
587
|
-
var hiddenKeys$4 = {};
|
|
588
|
-
|
|
589
|
-
var uncurryThis$5 = functionUncurryThis;
|
|
590
|
-
var hasOwn$8 = hasOwnProperty_1;
|
|
591
|
-
var toIndexedObject$3 = toIndexedObject$5;
|
|
592
|
-
var indexOf = arrayIncludes.indexOf;
|
|
593
|
-
var hiddenKeys$3 = hiddenKeys$4;
|
|
594
|
-
|
|
595
|
-
var push = uncurryThis$5([].push);
|
|
596
|
-
|
|
597
|
-
var objectKeysInternal = function (object, names) {
|
|
598
|
-
var O = toIndexedObject$3(object);
|
|
599
|
-
var i = 0;
|
|
600
|
-
var result = [];
|
|
601
|
-
var key;
|
|
602
|
-
for (key in O) !hasOwn$8(hiddenKeys$3, key) && hasOwn$8(O, key) && push(result, key);
|
|
603
|
-
// Don't enum bug & hidden keys
|
|
604
|
-
while (names.length > i) if (hasOwn$8(O, key = names[i++])) {
|
|
605
|
-
~indexOf(result, key) || push(result, key);
|
|
606
|
-
}
|
|
607
|
-
return result;
|
|
608
|
-
};
|
|
609
|
-
|
|
610
|
-
// IE8- don't enum bug keys
|
|
611
|
-
var enumBugKeys$3 = [
|
|
612
|
-
'constructor',
|
|
613
|
-
'hasOwnProperty',
|
|
614
|
-
'isPrototypeOf',
|
|
615
|
-
'propertyIsEnumerable',
|
|
616
|
-
'toLocaleString',
|
|
617
|
-
'toString',
|
|
618
|
-
'valueOf'
|
|
619
|
-
];
|
|
620
|
-
|
|
621
|
-
var internalObjectKeys$1 = objectKeysInternal;
|
|
622
|
-
var enumBugKeys$2 = enumBugKeys$3;
|
|
623
|
-
|
|
624
|
-
// `Object.keys` method
|
|
625
|
-
// https://tc39.es/ecma262/#sec-object.keys
|
|
626
|
-
// eslint-disable-next-line es-x/no-object-keys -- safe
|
|
627
|
-
var objectKeys$2 = Object.keys || function keys(O) {
|
|
628
|
-
return internalObjectKeys$1(O, enumBugKeys$2);
|
|
629
|
-
};
|
|
630
|
-
|
|
631
|
-
var DESCRIPTORS$6 = descriptors;
|
|
632
|
-
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
633
|
-
var definePropertyModule$2 = objectDefineProperty;
|
|
634
|
-
var anObject$5 = anObject$7;
|
|
635
|
-
var toIndexedObject$2 = toIndexedObject$5;
|
|
636
|
-
var objectKeys$1 = objectKeys$2;
|
|
637
|
-
|
|
638
|
-
// `Object.defineProperties` method
|
|
639
|
-
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
640
|
-
// eslint-disable-next-line es-x/no-object-defineproperties -- safe
|
|
641
|
-
objectDefineProperties.f = DESCRIPTORS$6 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
642
|
-
anObject$5(O);
|
|
643
|
-
var props = toIndexedObject$2(Properties);
|
|
644
|
-
var keys = objectKeys$1(Properties);
|
|
645
|
-
var length = keys.length;
|
|
646
|
-
var index = 0;
|
|
647
|
-
var key;
|
|
648
|
-
while (length > index) definePropertyModule$2.f(O, key = keys[index++], props[key]);
|
|
649
|
-
return O;
|
|
650
|
-
};
|
|
651
|
-
|
|
652
|
-
var getBuiltIn$1 = getBuiltIn$4;
|
|
653
|
-
|
|
654
|
-
var html$1 = getBuiltIn$1('document', 'documentElement');
|
|
577
|
+
var nativeWeakMap = isCallable$8(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
|
|
655
578
|
|
|
656
579
|
var shared$1 = shared$3.exports;
|
|
657
580
|
var uid = uid$2;
|
|
@@ -662,166 +585,17 @@ var sharedKey$3 = function (key) {
|
|
|
662
585
|
return keys[key] || (keys[key] = uid(key));
|
|
663
586
|
};
|
|
664
587
|
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
var anObject$4 = anObject$7;
|
|
668
|
-
var definePropertiesModule = objectDefineProperties;
|
|
669
|
-
var enumBugKeys$1 = enumBugKeys$3;
|
|
670
|
-
var hiddenKeys$2 = hiddenKeys$4;
|
|
671
|
-
var html = html$1;
|
|
672
|
-
var documentCreateElement$1 = documentCreateElement$2;
|
|
673
|
-
var sharedKey$2 = sharedKey$3;
|
|
674
|
-
|
|
675
|
-
var GT = '>';
|
|
676
|
-
var LT = '<';
|
|
677
|
-
var PROTOTYPE = 'prototype';
|
|
678
|
-
var SCRIPT = 'script';
|
|
679
|
-
var IE_PROTO$1 = sharedKey$2('IE_PROTO');
|
|
680
|
-
|
|
681
|
-
var EmptyConstructor = function () { /* empty */ };
|
|
682
|
-
|
|
683
|
-
var scriptTag = function (content) {
|
|
684
|
-
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
685
|
-
};
|
|
686
|
-
|
|
687
|
-
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
688
|
-
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
689
|
-
activeXDocument.write(scriptTag(''));
|
|
690
|
-
activeXDocument.close();
|
|
691
|
-
var temp = activeXDocument.parentWindow.Object;
|
|
692
|
-
activeXDocument = null; // avoid memory leak
|
|
693
|
-
return temp;
|
|
694
|
-
};
|
|
695
|
-
|
|
696
|
-
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
697
|
-
var NullProtoObjectViaIFrame = function () {
|
|
698
|
-
// Thrash, waste and sodomy: IE GC bug
|
|
699
|
-
var iframe = documentCreateElement$1('iframe');
|
|
700
|
-
var JS = 'java' + SCRIPT + ':';
|
|
701
|
-
var iframeDocument;
|
|
702
|
-
iframe.style.display = 'none';
|
|
703
|
-
html.appendChild(iframe);
|
|
704
|
-
// https://github.com/zloirock/core-js/issues/475
|
|
705
|
-
iframe.src = String(JS);
|
|
706
|
-
iframeDocument = iframe.contentWindow.document;
|
|
707
|
-
iframeDocument.open();
|
|
708
|
-
iframeDocument.write(scriptTag('document.F=Object'));
|
|
709
|
-
iframeDocument.close();
|
|
710
|
-
return iframeDocument.F;
|
|
711
|
-
};
|
|
712
|
-
|
|
713
|
-
// Check for document.domain and active x support
|
|
714
|
-
// No need to use active x approach when document.domain is not set
|
|
715
|
-
// see https://github.com/es-shims/es5-shim/issues/150
|
|
716
|
-
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
717
|
-
// avoid IE GC bug
|
|
718
|
-
var activeXDocument;
|
|
719
|
-
var NullProtoObject = function () {
|
|
720
|
-
try {
|
|
721
|
-
activeXDocument = new ActiveXObject('htmlfile');
|
|
722
|
-
} catch (error) { /* ignore */ }
|
|
723
|
-
NullProtoObject = typeof document != 'undefined'
|
|
724
|
-
? document.domain && activeXDocument
|
|
725
|
-
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
726
|
-
: NullProtoObjectViaIFrame()
|
|
727
|
-
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
728
|
-
var length = enumBugKeys$1.length;
|
|
729
|
-
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys$1[length]];
|
|
730
|
-
return NullProtoObject();
|
|
731
|
-
};
|
|
732
|
-
|
|
733
|
-
hiddenKeys$2[IE_PROTO$1] = true;
|
|
734
|
-
|
|
735
|
-
// `Object.create` method
|
|
736
|
-
// https://tc39.es/ecma262/#sec-object.create
|
|
737
|
-
// eslint-disable-next-line es-x/no-object-create -- safe
|
|
738
|
-
var objectCreate = Object.create || function create(O, Properties) {
|
|
739
|
-
var result;
|
|
740
|
-
if (O !== null) {
|
|
741
|
-
EmptyConstructor[PROTOTYPE] = anObject$4(O);
|
|
742
|
-
result = new EmptyConstructor();
|
|
743
|
-
EmptyConstructor[PROTOTYPE] = null;
|
|
744
|
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
745
|
-
result[IE_PROTO$1] = O;
|
|
746
|
-
} else result = NullProtoObject();
|
|
747
|
-
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
748
|
-
};
|
|
749
|
-
|
|
750
|
-
var wellKnownSymbol$6 = wellKnownSymbol$8;
|
|
751
|
-
var create$1 = objectCreate;
|
|
752
|
-
var defineProperty$4 = objectDefineProperty.f;
|
|
753
|
-
|
|
754
|
-
var UNSCOPABLES = wellKnownSymbol$6('unscopables');
|
|
755
|
-
var ArrayPrototype = Array.prototype;
|
|
756
|
-
|
|
757
|
-
// Array.prototype[@@unscopables]
|
|
758
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
759
|
-
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
760
|
-
defineProperty$4(ArrayPrototype, UNSCOPABLES, {
|
|
761
|
-
configurable: true,
|
|
762
|
-
value: create$1(null)
|
|
763
|
-
});
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
// add a key to Array.prototype[@@unscopables]
|
|
767
|
-
var addToUnscopables$1 = function (key) {
|
|
768
|
-
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
769
|
-
};
|
|
770
|
-
|
|
771
|
-
var iterators = {};
|
|
772
|
-
|
|
773
|
-
var uncurryThis$4 = functionUncurryThis;
|
|
774
|
-
var isCallable$9 = isCallable$f;
|
|
775
|
-
var store$1 = sharedStore;
|
|
776
|
-
|
|
777
|
-
var functionToString = uncurryThis$4(Function.toString);
|
|
778
|
-
|
|
779
|
-
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
780
|
-
if (!isCallable$9(store$1.inspectSource)) {
|
|
781
|
-
store$1.inspectSource = function (it) {
|
|
782
|
-
return functionToString(it);
|
|
783
|
-
};
|
|
784
|
-
}
|
|
785
|
-
|
|
786
|
-
var inspectSource$2 = store$1.inspectSource;
|
|
787
|
-
|
|
788
|
-
var global$5 = global$c;
|
|
789
|
-
var isCallable$8 = isCallable$f;
|
|
790
|
-
var inspectSource$1 = inspectSource$2;
|
|
791
|
-
|
|
792
|
-
var WeakMap$1 = global$5.WeakMap;
|
|
793
|
-
|
|
794
|
-
var nativeWeakMap = isCallable$8(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
|
|
795
|
-
|
|
796
|
-
var createPropertyDescriptor$3 = function (bitmap, value) {
|
|
797
|
-
return {
|
|
798
|
-
enumerable: !(bitmap & 1),
|
|
799
|
-
configurable: !(bitmap & 2),
|
|
800
|
-
writable: !(bitmap & 4),
|
|
801
|
-
value: value
|
|
802
|
-
};
|
|
803
|
-
};
|
|
804
|
-
|
|
805
|
-
var DESCRIPTORS$5 = descriptors;
|
|
806
|
-
var definePropertyModule$1 = objectDefineProperty;
|
|
807
|
-
var createPropertyDescriptor$2 = createPropertyDescriptor$3;
|
|
808
|
-
|
|
809
|
-
var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value) {
|
|
810
|
-
return definePropertyModule$1.f(object, key, createPropertyDescriptor$2(1, value));
|
|
811
|
-
} : function (object, key, value) {
|
|
812
|
-
object[key] = value;
|
|
813
|
-
return object;
|
|
814
|
-
};
|
|
588
|
+
var hiddenKeys$4 = {};
|
|
815
589
|
|
|
816
590
|
var NATIVE_WEAK_MAP = nativeWeakMap;
|
|
817
591
|
var global$4 = global$c;
|
|
818
|
-
var uncurryThis$
|
|
592
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
819
593
|
var isObject = isObject$5;
|
|
820
594
|
var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
|
|
821
|
-
var hasOwn$
|
|
595
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
822
596
|
var shared = sharedStore;
|
|
823
|
-
var sharedKey$
|
|
824
|
-
var hiddenKeys$
|
|
597
|
+
var sharedKey$2 = sharedKey$3;
|
|
598
|
+
var hiddenKeys$3 = hiddenKeys$4;
|
|
825
599
|
|
|
826
600
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
827
601
|
var TypeError$1 = global$4.TypeError;
|
|
@@ -843,9 +617,9 @@ var getterFor = function (TYPE) {
|
|
|
843
617
|
|
|
844
618
|
if (NATIVE_WEAK_MAP || shared.state) {
|
|
845
619
|
var store = shared.state || (shared.state = new WeakMap());
|
|
846
|
-
var wmget = uncurryThis$
|
|
847
|
-
var wmhas = uncurryThis$
|
|
848
|
-
var wmset = uncurryThis$
|
|
620
|
+
var wmget = uncurryThis$4(store.get);
|
|
621
|
+
var wmhas = uncurryThis$4(store.has);
|
|
622
|
+
var wmset = uncurryThis$4(store.set);
|
|
849
623
|
set = function (it, metadata) {
|
|
850
624
|
if (wmhas(store, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
851
625
|
metadata.facade = it;
|
|
@@ -859,19 +633,19 @@ if (NATIVE_WEAK_MAP || shared.state) {
|
|
|
859
633
|
return wmhas(store, it);
|
|
860
634
|
};
|
|
861
635
|
} else {
|
|
862
|
-
var STATE = sharedKey$
|
|
863
|
-
hiddenKeys$
|
|
636
|
+
var STATE = sharedKey$2('state');
|
|
637
|
+
hiddenKeys$3[STATE] = true;
|
|
864
638
|
set = function (it, metadata) {
|
|
865
|
-
if (hasOwn$
|
|
639
|
+
if (hasOwn$6(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
866
640
|
metadata.facade = it;
|
|
867
641
|
createNonEnumerableProperty$4(it, STATE, metadata);
|
|
868
642
|
return metadata;
|
|
869
643
|
};
|
|
870
644
|
get = function (it) {
|
|
871
|
-
return hasOwn$
|
|
645
|
+
return hasOwn$6(it, STATE) ? it[STATE] : {};
|
|
872
646
|
};
|
|
873
647
|
has = function (it) {
|
|
874
|
-
return hasOwn$
|
|
648
|
+
return hasOwn$6(it, STATE);
|
|
875
649
|
};
|
|
876
650
|
}
|
|
877
651
|
|
|
@@ -883,85 +657,24 @@ var internalState = {
|
|
|
883
657
|
getterFor: getterFor
|
|
884
658
|
};
|
|
885
659
|
|
|
886
|
-
var
|
|
660
|
+
var fails$5 = fails$c;
|
|
661
|
+
var isCallable$7 = isCallable$f;
|
|
662
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
663
|
+
var DESCRIPTORS$3 = descriptors;
|
|
664
|
+
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
665
|
+
var inspectSource = inspectSource$2;
|
|
666
|
+
var InternalStateModule$1 = internalState;
|
|
887
667
|
|
|
888
|
-
var
|
|
668
|
+
var enforceInternalState = InternalStateModule$1.enforce;
|
|
669
|
+
var getInternalState$1 = InternalStateModule$1.get;
|
|
670
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
671
|
+
var defineProperty$4 = Object.defineProperty;
|
|
889
672
|
|
|
890
|
-
var
|
|
891
|
-
|
|
892
|
-
|
|
673
|
+
var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$5(function () {
|
|
674
|
+
return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
675
|
+
});
|
|
893
676
|
|
|
894
|
-
|
|
895
|
-
var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
896
|
-
|
|
897
|
-
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
898
|
-
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
899
|
-
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
900
|
-
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
|
901
|
-
return !!descriptor && descriptor.enumerable;
|
|
902
|
-
} : $propertyIsEnumerable;
|
|
903
|
-
|
|
904
|
-
var DESCRIPTORS$4 = descriptors;
|
|
905
|
-
var call$3 = functionCall;
|
|
906
|
-
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
907
|
-
var createPropertyDescriptor$1 = createPropertyDescriptor$3;
|
|
908
|
-
var toIndexedObject$1 = toIndexedObject$5;
|
|
909
|
-
var toPropertyKey = toPropertyKey$2;
|
|
910
|
-
var hasOwn$6 = hasOwnProperty_1;
|
|
911
|
-
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
912
|
-
|
|
913
|
-
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
914
|
-
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
915
|
-
|
|
916
|
-
// `Object.getOwnPropertyDescriptor` method
|
|
917
|
-
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
918
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$4 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
919
|
-
O = toIndexedObject$1(O);
|
|
920
|
-
P = toPropertyKey(P);
|
|
921
|
-
if (IE8_DOM_DEFINE) try {
|
|
922
|
-
return $getOwnPropertyDescriptor(O, P);
|
|
923
|
-
} catch (error) { /* empty */ }
|
|
924
|
-
if (hasOwn$6(O, P)) return createPropertyDescriptor$1(!call$3(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
925
|
-
};
|
|
926
|
-
|
|
927
|
-
var makeBuiltIn$2 = {exports: {}};
|
|
928
|
-
|
|
929
|
-
var DESCRIPTORS$3 = descriptors;
|
|
930
|
-
var hasOwn$5 = hasOwnProperty_1;
|
|
931
|
-
|
|
932
|
-
var FunctionPrototype = Function.prototype;
|
|
933
|
-
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
934
|
-
var getDescriptor = DESCRIPTORS$3 && Object.getOwnPropertyDescriptor;
|
|
935
|
-
|
|
936
|
-
var EXISTS = hasOwn$5(FunctionPrototype, 'name');
|
|
937
|
-
// additional protection from minified / mangled / dropped function names
|
|
938
|
-
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
939
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
940
|
-
|
|
941
|
-
var functionName = {
|
|
942
|
-
EXISTS: EXISTS,
|
|
943
|
-
PROPER: PROPER,
|
|
944
|
-
CONFIGURABLE: CONFIGURABLE
|
|
945
|
-
};
|
|
946
|
-
|
|
947
|
-
var fails$5 = fails$c;
|
|
948
|
-
var isCallable$7 = isCallable$f;
|
|
949
|
-
var hasOwn$4 = hasOwnProperty_1;
|
|
950
|
-
var DESCRIPTORS$2 = descriptors;
|
|
951
|
-
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
952
|
-
var inspectSource = inspectSource$2;
|
|
953
|
-
var InternalStateModule$1 = internalState;
|
|
954
|
-
|
|
955
|
-
var enforceInternalState = InternalStateModule$1.enforce;
|
|
956
|
-
var getInternalState$1 = InternalStateModule$1.get;
|
|
957
|
-
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
958
|
-
var defineProperty$3 = Object.defineProperty;
|
|
959
|
-
|
|
960
|
-
var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$5(function () {
|
|
961
|
-
return defineProperty$3(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
962
|
-
});
|
|
963
|
-
|
|
964
|
-
var TEMPLATE = String(String).split('String');
|
|
677
|
+
var TEMPLATE = String(String).split('String');
|
|
965
678
|
|
|
966
679
|
var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
967
680
|
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
@@ -969,20 +682,20 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
|
969
682
|
}
|
|
970
683
|
if (options && options.getter) name = 'get ' + name;
|
|
971
684
|
if (options && options.setter) name = 'set ' + name;
|
|
972
|
-
if (!hasOwn$
|
|
973
|
-
defineProperty$
|
|
685
|
+
if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
686
|
+
defineProperty$4(value, 'name', { value: name, configurable: true });
|
|
974
687
|
}
|
|
975
|
-
if (CONFIGURABLE_LENGTH && options && hasOwn$
|
|
976
|
-
defineProperty$
|
|
688
|
+
if (CONFIGURABLE_LENGTH && options && hasOwn$5(options, 'arity') && value.length !== options.arity) {
|
|
689
|
+
defineProperty$4(value, 'length', { value: options.arity });
|
|
977
690
|
}
|
|
978
691
|
try {
|
|
979
|
-
if (options && hasOwn$
|
|
980
|
-
if (DESCRIPTORS$
|
|
692
|
+
if (options && hasOwn$5(options, 'constructor') && options.constructor) {
|
|
693
|
+
if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
|
|
981
694
|
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
982
695
|
} else if (value.prototype) value.prototype = undefined;
|
|
983
696
|
} catch (error) { /* empty */ }
|
|
984
697
|
var state = enforceInternalState(value);
|
|
985
|
-
if (!hasOwn$
|
|
698
|
+
if (!hasOwn$5(state, 'source')) {
|
|
986
699
|
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
987
700
|
} return value;
|
|
988
701
|
};
|
|
@@ -1016,16 +729,133 @@ var defineBuiltIn$4 = function (O, key, value, options) {
|
|
|
1016
729
|
|
|
1017
730
|
var objectGetOwnPropertyNames = {};
|
|
1018
731
|
|
|
1019
|
-
var
|
|
1020
|
-
var
|
|
732
|
+
var ceil = Math.ceil;
|
|
733
|
+
var floor = Math.floor;
|
|
734
|
+
|
|
735
|
+
// `Math.trunc` method
|
|
736
|
+
// https://tc39.es/ecma262/#sec-math.trunc
|
|
737
|
+
// eslint-disable-next-line es-x/no-math-trunc -- safe
|
|
738
|
+
var mathTrunc = Math.trunc || function trunc(x) {
|
|
739
|
+
var n = +x;
|
|
740
|
+
return (n > 0 ? floor : ceil)(n);
|
|
741
|
+
};
|
|
742
|
+
|
|
743
|
+
var trunc = mathTrunc;
|
|
744
|
+
|
|
745
|
+
// `ToIntegerOrInfinity` abstract operation
|
|
746
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
747
|
+
var toIntegerOrInfinity$2 = function (argument) {
|
|
748
|
+
var number = +argument;
|
|
749
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
750
|
+
return number !== number || number === 0 ? 0 : trunc(number);
|
|
751
|
+
};
|
|
752
|
+
|
|
753
|
+
var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
|
|
754
|
+
|
|
755
|
+
var max = Math.max;
|
|
756
|
+
var min$1 = Math.min;
|
|
757
|
+
|
|
758
|
+
// Helper for a popular repeating case of the spec:
|
|
759
|
+
// Let integer be ? ToInteger(index).
|
|
760
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
761
|
+
var toAbsoluteIndex$1 = function (index, length) {
|
|
762
|
+
var integer = toIntegerOrInfinity$1(index);
|
|
763
|
+
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
764
|
+
};
|
|
765
|
+
|
|
766
|
+
var toIntegerOrInfinity = toIntegerOrInfinity$2;
|
|
767
|
+
|
|
768
|
+
var min = Math.min;
|
|
769
|
+
|
|
770
|
+
// `ToLength` abstract operation
|
|
771
|
+
// https://tc39.es/ecma262/#sec-tolength
|
|
772
|
+
var toLength$1 = function (argument) {
|
|
773
|
+
return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
774
|
+
};
|
|
775
|
+
|
|
776
|
+
var toLength = toLength$1;
|
|
777
|
+
|
|
778
|
+
// `LengthOfArrayLike` abstract operation
|
|
779
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
780
|
+
var lengthOfArrayLike$1 = function (obj) {
|
|
781
|
+
return toLength(obj.length);
|
|
782
|
+
};
|
|
783
|
+
|
|
784
|
+
var toIndexedObject$3 = toIndexedObject$5;
|
|
785
|
+
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
786
|
+
var lengthOfArrayLike = lengthOfArrayLike$1;
|
|
787
|
+
|
|
788
|
+
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
789
|
+
var createMethod = function (IS_INCLUDES) {
|
|
790
|
+
return function ($this, el, fromIndex) {
|
|
791
|
+
var O = toIndexedObject$3($this);
|
|
792
|
+
var length = lengthOfArrayLike(O);
|
|
793
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
794
|
+
var value;
|
|
795
|
+
// Array#includes uses SameValueZero equality algorithm
|
|
796
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
797
|
+
if (IS_INCLUDES && el != el) while (length > index) {
|
|
798
|
+
value = O[index++];
|
|
799
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
800
|
+
if (value != value) return true;
|
|
801
|
+
// Array#indexOf ignores holes, Array#includes - not
|
|
802
|
+
} else for (;length > index; index++) {
|
|
803
|
+
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
804
|
+
} return !IS_INCLUDES && -1;
|
|
805
|
+
};
|
|
806
|
+
};
|
|
807
|
+
|
|
808
|
+
var arrayIncludes = {
|
|
809
|
+
// `Array.prototype.includes` method
|
|
810
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
811
|
+
includes: createMethod(true),
|
|
812
|
+
// `Array.prototype.indexOf` method
|
|
813
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
814
|
+
indexOf: createMethod(false)
|
|
815
|
+
};
|
|
816
|
+
|
|
817
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
818
|
+
var hasOwn$4 = hasOwnProperty_1;
|
|
819
|
+
var toIndexedObject$2 = toIndexedObject$5;
|
|
820
|
+
var indexOf = arrayIncludes.indexOf;
|
|
821
|
+
var hiddenKeys$2 = hiddenKeys$4;
|
|
1021
822
|
|
|
1022
|
-
var
|
|
823
|
+
var push = uncurryThis$3([].push);
|
|
824
|
+
|
|
825
|
+
var objectKeysInternal = function (object, names) {
|
|
826
|
+
var O = toIndexedObject$2(object);
|
|
827
|
+
var i = 0;
|
|
828
|
+
var result = [];
|
|
829
|
+
var key;
|
|
830
|
+
for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push(result, key);
|
|
831
|
+
// Don't enum bug & hidden keys
|
|
832
|
+
while (names.length > i) if (hasOwn$4(O, key = names[i++])) {
|
|
833
|
+
~indexOf(result, key) || push(result, key);
|
|
834
|
+
}
|
|
835
|
+
return result;
|
|
836
|
+
};
|
|
837
|
+
|
|
838
|
+
// IE8- don't enum bug keys
|
|
839
|
+
var enumBugKeys$3 = [
|
|
840
|
+
'constructor',
|
|
841
|
+
'hasOwnProperty',
|
|
842
|
+
'isPrototypeOf',
|
|
843
|
+
'propertyIsEnumerable',
|
|
844
|
+
'toLocaleString',
|
|
845
|
+
'toString',
|
|
846
|
+
'valueOf'
|
|
847
|
+
];
|
|
848
|
+
|
|
849
|
+
var internalObjectKeys$1 = objectKeysInternal;
|
|
850
|
+
var enumBugKeys$2 = enumBugKeys$3;
|
|
851
|
+
|
|
852
|
+
var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
|
|
1023
853
|
|
|
1024
854
|
// `Object.getOwnPropertyNames` method
|
|
1025
855
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
1026
856
|
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
|
|
1027
857
|
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
1028
|
-
return internalObjectKeys(O, hiddenKeys);
|
|
858
|
+
return internalObjectKeys$1(O, hiddenKeys$1);
|
|
1029
859
|
};
|
|
1030
860
|
|
|
1031
861
|
var objectGetOwnPropertySymbols = {};
|
|
@@ -1033,119 +863,358 @@ var objectGetOwnPropertySymbols = {};
|
|
|
1033
863
|
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
|
|
1034
864
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
1035
865
|
|
|
1036
|
-
var getBuiltIn = getBuiltIn$4;
|
|
1037
|
-
var uncurryThis$2 = functionUncurryThis;
|
|
1038
|
-
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
1039
|
-
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
1040
|
-
var anObject$
|
|
866
|
+
var getBuiltIn$1 = getBuiltIn$4;
|
|
867
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
868
|
+
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
869
|
+
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
870
|
+
var anObject$5 = anObject$7;
|
|
871
|
+
|
|
872
|
+
var concat$1 = uncurryThis$2([].concat);
|
|
873
|
+
|
|
874
|
+
// all object keys, includes non-enumerable and symbols
|
|
875
|
+
var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
876
|
+
var keys = getOwnPropertyNamesModule.f(anObject$5(it));
|
|
877
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
878
|
+
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
879
|
+
};
|
|
880
|
+
|
|
881
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
882
|
+
var ownKeys = ownKeys$1;
|
|
883
|
+
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
884
|
+
var definePropertyModule$1 = objectDefineProperty;
|
|
885
|
+
|
|
886
|
+
var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
887
|
+
var keys = ownKeys(source);
|
|
888
|
+
var defineProperty = definePropertyModule$1.f;
|
|
889
|
+
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
890
|
+
for (var i = 0; i < keys.length; i++) {
|
|
891
|
+
var key = keys[i];
|
|
892
|
+
if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
|
|
893
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
};
|
|
897
|
+
|
|
898
|
+
var fails$4 = fails$c;
|
|
899
|
+
var isCallable$5 = isCallable$f;
|
|
900
|
+
|
|
901
|
+
var replacement = /#|\.prototype\./;
|
|
902
|
+
|
|
903
|
+
var isForced$1 = function (feature, detection) {
|
|
904
|
+
var value = data[normalize(feature)];
|
|
905
|
+
return value == POLYFILL ? true
|
|
906
|
+
: value == NATIVE ? false
|
|
907
|
+
: isCallable$5(detection) ? fails$4(detection)
|
|
908
|
+
: !!detection;
|
|
909
|
+
};
|
|
910
|
+
|
|
911
|
+
var normalize = isForced$1.normalize = function (string) {
|
|
912
|
+
return String(string).replace(replacement, '.').toLowerCase();
|
|
913
|
+
};
|
|
914
|
+
|
|
915
|
+
var data = isForced$1.data = {};
|
|
916
|
+
var NATIVE = isForced$1.NATIVE = 'N';
|
|
917
|
+
var POLYFILL = isForced$1.POLYFILL = 'P';
|
|
918
|
+
|
|
919
|
+
var isForced_1 = isForced$1;
|
|
920
|
+
|
|
921
|
+
var global$3 = global$c;
|
|
922
|
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
923
|
+
var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
|
|
924
|
+
var defineBuiltIn$3 = defineBuiltIn$4;
|
|
925
|
+
var defineGlobalProperty = defineGlobalProperty$3;
|
|
926
|
+
var copyConstructorProperties = copyConstructorProperties$1;
|
|
927
|
+
var isForced = isForced_1;
|
|
928
|
+
|
|
929
|
+
/*
|
|
930
|
+
options.target - name of the target object
|
|
931
|
+
options.global - target is the global object
|
|
932
|
+
options.stat - export as static methods of target
|
|
933
|
+
options.proto - export as prototype methods of target
|
|
934
|
+
options.real - real prototype method for the `pure` version
|
|
935
|
+
options.forced - export even if the native feature is available
|
|
936
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
937
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
938
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
939
|
+
options.sham - add a flag to not completely full polyfills
|
|
940
|
+
options.enumerable - export as enumerable property
|
|
941
|
+
options.dontCallGetSet - prevent calling a getter on target
|
|
942
|
+
options.name - the .name of the function if it does not match the key
|
|
943
|
+
*/
|
|
944
|
+
var _export = function (options, source) {
|
|
945
|
+
var TARGET = options.target;
|
|
946
|
+
var GLOBAL = options.global;
|
|
947
|
+
var STATIC = options.stat;
|
|
948
|
+
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
949
|
+
if (GLOBAL) {
|
|
950
|
+
target = global$3;
|
|
951
|
+
} else if (STATIC) {
|
|
952
|
+
target = global$3[TARGET] || defineGlobalProperty(TARGET, {});
|
|
953
|
+
} else {
|
|
954
|
+
target = (global$3[TARGET] || {}).prototype;
|
|
955
|
+
}
|
|
956
|
+
if (target) for (key in source) {
|
|
957
|
+
sourceProperty = source[key];
|
|
958
|
+
if (options.dontCallGetSet) {
|
|
959
|
+
descriptor = getOwnPropertyDescriptor(target, key);
|
|
960
|
+
targetProperty = descriptor && descriptor.value;
|
|
961
|
+
} else targetProperty = target[key];
|
|
962
|
+
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
963
|
+
// contained in target
|
|
964
|
+
if (!FORCED && targetProperty !== undefined) {
|
|
965
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
966
|
+
copyConstructorProperties(sourceProperty, targetProperty);
|
|
967
|
+
}
|
|
968
|
+
// add a flag to not completely full polyfills
|
|
969
|
+
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
970
|
+
createNonEnumerableProperty$2(sourceProperty, 'sham', true);
|
|
971
|
+
}
|
|
972
|
+
defineBuiltIn$3(target, key, sourceProperty, options);
|
|
973
|
+
}
|
|
974
|
+
};
|
|
975
|
+
|
|
976
|
+
var internalObjectKeys = objectKeysInternal;
|
|
977
|
+
var enumBugKeys$1 = enumBugKeys$3;
|
|
978
|
+
|
|
979
|
+
// `Object.keys` method
|
|
980
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
981
|
+
// eslint-disable-next-line es-x/no-object-keys -- safe
|
|
982
|
+
var objectKeys$2 = Object.keys || function keys(O) {
|
|
983
|
+
return internalObjectKeys(O, enumBugKeys$1);
|
|
984
|
+
};
|
|
985
|
+
|
|
986
|
+
var DESCRIPTORS$2 = descriptors;
|
|
987
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
988
|
+
var call$2 = functionCall;
|
|
989
|
+
var fails$3 = fails$c;
|
|
990
|
+
var objectKeys$1 = objectKeys$2;
|
|
991
|
+
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
992
|
+
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
993
|
+
var toObject$1 = toObject$3;
|
|
994
|
+
var IndexedObject = indexedObject;
|
|
995
|
+
|
|
996
|
+
// eslint-disable-next-line es-x/no-object-assign -- safe
|
|
997
|
+
var $assign = Object.assign;
|
|
998
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
999
|
+
var defineProperty$3 = Object.defineProperty;
|
|
1000
|
+
var concat = uncurryThis$1([].concat);
|
|
1001
|
+
|
|
1002
|
+
// `Object.assign` method
|
|
1003
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
1004
|
+
var objectAssign = !$assign || fails$3(function () {
|
|
1005
|
+
// should have correct order of operations (Edge bug)
|
|
1006
|
+
if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
|
|
1007
|
+
enumerable: true,
|
|
1008
|
+
get: function () {
|
|
1009
|
+
defineProperty$3(this, 'b', {
|
|
1010
|
+
value: 3,
|
|
1011
|
+
enumerable: false
|
|
1012
|
+
});
|
|
1013
|
+
}
|
|
1014
|
+
}), { b: 2 })).b !== 1) return true;
|
|
1015
|
+
// should work with symbols and should have deterministic property order (V8 bug)
|
|
1016
|
+
var A = {};
|
|
1017
|
+
var B = {};
|
|
1018
|
+
// eslint-disable-next-line es-x/no-symbol -- safe
|
|
1019
|
+
var symbol = Symbol();
|
|
1020
|
+
var alphabet = 'abcdefghijklmnopqrst';
|
|
1021
|
+
A[symbol] = 7;
|
|
1022
|
+
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1023
|
+
return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
|
|
1024
|
+
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1025
|
+
var T = toObject$1(target);
|
|
1026
|
+
var argumentsLength = arguments.length;
|
|
1027
|
+
var index = 1;
|
|
1028
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1029
|
+
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
1030
|
+
while (argumentsLength > index) {
|
|
1031
|
+
var S = IndexedObject(arguments[index++]);
|
|
1032
|
+
var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
|
|
1033
|
+
var length = keys.length;
|
|
1034
|
+
var j = 0;
|
|
1035
|
+
var key;
|
|
1036
|
+
while (length > j) {
|
|
1037
|
+
key = keys[j++];
|
|
1038
|
+
if (!DESCRIPTORS$2 || call$2(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1039
|
+
}
|
|
1040
|
+
} return T;
|
|
1041
|
+
} : $assign;
|
|
1042
|
+
|
|
1043
|
+
var $$2 = _export;
|
|
1044
|
+
var assign = objectAssign;
|
|
1045
|
+
|
|
1046
|
+
// `Object.assign` method
|
|
1047
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
1048
|
+
// eslint-disable-next-line es-x/no-object-assign -- required for testing
|
|
1049
|
+
$$2({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
1050
|
+
assign: assign
|
|
1051
|
+
});
|
|
1052
|
+
|
|
1053
|
+
const DEFAULT_CONFIG={host:"localhost",port:8013,tls:!1};var ENV_VAR;(function(a){a.FLAGD_HOST="FLAGD_HOST",a.FLAGD_PORT="FLAGD_PORT",a.FLAGD_TLS="FLAGD_TLS",a.FLAGD_SOCKET_PATH="FLAGD_SOCKET_PATH";})(ENV_VAR||(ENV_VAR={}));const getEnvVarConfig=()=>{var a;return Object.assign(Object.assign(Object.assign(Object.assign({},process.env[ENV_VAR.FLAGD_HOST]&&{host:process.env[ENV_VAR.FLAGD_HOST]}),+process.env[ENV_VAR.FLAGD_PORT]&&{port:+process.env[ENV_VAR.FLAGD_PORT]}),process.env[ENV_VAR.FLAGD_TLS]&&{tls:"true"===(null===(a=process.env[ENV_VAR.FLAGD_TLS])||void 0===a?void 0:a.toLowerCase())}),process.env[ENV_VAR.FLAGD_SOCKET_PATH]&&{socketPath:process.env[ENV_VAR.FLAGD_SOCKET_PATH]})};function getConfig(a={}){return Object.assign(Object.assign(Object.assign({},DEFAULT_CONFIG),getEnvVarConfig()),a)}
|
|
1054
|
+
|
|
1055
|
+
/******************************************************************************
|
|
1056
|
+
Copyright (c) Microsoft Corporation.
|
|
1057
|
+
|
|
1058
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
1059
|
+
purpose with or without fee is hereby granted.
|
|
1060
|
+
|
|
1061
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1062
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1063
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1064
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1065
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1066
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1067
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
1068
|
+
***************************************************************************** */
|
|
1069
|
+
|
|
1070
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
1071
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1072
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1073
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
1074
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
1075
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
1076
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1077
|
+
});
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
var objectDefineProperties = {};
|
|
1081
|
+
|
|
1082
|
+
var DESCRIPTORS$1 = descriptors;
|
|
1083
|
+
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1084
|
+
var definePropertyModule = objectDefineProperty;
|
|
1085
|
+
var anObject$4 = anObject$7;
|
|
1086
|
+
var toIndexedObject$1 = toIndexedObject$5;
|
|
1087
|
+
var objectKeys = objectKeys$2;
|
|
1088
|
+
|
|
1089
|
+
// `Object.defineProperties` method
|
|
1090
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1091
|
+
// eslint-disable-next-line es-x/no-object-defineproperties -- safe
|
|
1092
|
+
objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1093
|
+
anObject$4(O);
|
|
1094
|
+
var props = toIndexedObject$1(Properties);
|
|
1095
|
+
var keys = objectKeys(Properties);
|
|
1096
|
+
var length = keys.length;
|
|
1097
|
+
var index = 0;
|
|
1098
|
+
var key;
|
|
1099
|
+
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
1100
|
+
return O;
|
|
1101
|
+
};
|
|
1102
|
+
|
|
1103
|
+
var getBuiltIn = getBuiltIn$4;
|
|
1104
|
+
|
|
1105
|
+
var html$1 = getBuiltIn('document', 'documentElement');
|
|
1106
|
+
|
|
1107
|
+
/* global ActiveXObject -- old IE, WSH */
|
|
1041
1108
|
|
|
1042
|
-
var
|
|
1109
|
+
var anObject$3 = anObject$7;
|
|
1110
|
+
var definePropertiesModule = objectDefineProperties;
|
|
1111
|
+
var enumBugKeys = enumBugKeys$3;
|
|
1112
|
+
var hiddenKeys = hiddenKeys$4;
|
|
1113
|
+
var html = html$1;
|
|
1114
|
+
var documentCreateElement$1 = documentCreateElement$2;
|
|
1115
|
+
var sharedKey$1 = sharedKey$3;
|
|
1043
1116
|
|
|
1044
|
-
|
|
1045
|
-
var
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
};
|
|
1117
|
+
var GT = '>';
|
|
1118
|
+
var LT = '<';
|
|
1119
|
+
var PROTOTYPE = 'prototype';
|
|
1120
|
+
var SCRIPT = 'script';
|
|
1121
|
+
var IE_PROTO$1 = sharedKey$1('IE_PROTO');
|
|
1050
1122
|
|
|
1051
|
-
var
|
|
1052
|
-
var ownKeys = ownKeys$1;
|
|
1053
|
-
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
1054
|
-
var definePropertyModule = objectDefineProperty;
|
|
1123
|
+
var EmptyConstructor = function () { /* empty */ };
|
|
1055
1124
|
|
|
1056
|
-
var
|
|
1057
|
-
|
|
1058
|
-
var defineProperty = definePropertyModule.f;
|
|
1059
|
-
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
1060
|
-
for (var i = 0; i < keys.length; i++) {
|
|
1061
|
-
var key = keys[i];
|
|
1062
|
-
if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
|
|
1063
|
-
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
1064
|
-
}
|
|
1065
|
-
}
|
|
1125
|
+
var scriptTag = function (content) {
|
|
1126
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
1066
1127
|
};
|
|
1067
1128
|
|
|
1068
|
-
|
|
1069
|
-
var
|
|
1129
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
1130
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
1131
|
+
activeXDocument.write(scriptTag(''));
|
|
1132
|
+
activeXDocument.close();
|
|
1133
|
+
var temp = activeXDocument.parentWindow.Object;
|
|
1134
|
+
activeXDocument = null; // avoid memory leak
|
|
1135
|
+
return temp;
|
|
1136
|
+
};
|
|
1070
1137
|
|
|
1071
|
-
|
|
1138
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
1139
|
+
var NullProtoObjectViaIFrame = function () {
|
|
1140
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
1141
|
+
var iframe = documentCreateElement$1('iframe');
|
|
1142
|
+
var JS = 'java' + SCRIPT + ':';
|
|
1143
|
+
var iframeDocument;
|
|
1144
|
+
iframe.style.display = 'none';
|
|
1145
|
+
html.appendChild(iframe);
|
|
1146
|
+
// https://github.com/zloirock/core-js/issues/475
|
|
1147
|
+
iframe.src = String(JS);
|
|
1148
|
+
iframeDocument = iframe.contentWindow.document;
|
|
1149
|
+
iframeDocument.open();
|
|
1150
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
|
1151
|
+
iframeDocument.close();
|
|
1152
|
+
return iframeDocument.F;
|
|
1153
|
+
};
|
|
1072
1154
|
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1155
|
+
// Check for document.domain and active x support
|
|
1156
|
+
// No need to use active x approach when document.domain is not set
|
|
1157
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
|
1158
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
1159
|
+
// avoid IE GC bug
|
|
1160
|
+
var activeXDocument;
|
|
1161
|
+
var NullProtoObject = function () {
|
|
1162
|
+
try {
|
|
1163
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
|
1164
|
+
} catch (error) { /* ignore */ }
|
|
1165
|
+
NullProtoObject = typeof document != 'undefined'
|
|
1166
|
+
? document.domain && activeXDocument
|
|
1167
|
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
1168
|
+
: NullProtoObjectViaIFrame()
|
|
1169
|
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
1170
|
+
var length = enumBugKeys.length;
|
|
1171
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
1172
|
+
return NullProtoObject();
|
|
1079
1173
|
};
|
|
1080
1174
|
|
|
1081
|
-
|
|
1082
|
-
|
|
1175
|
+
hiddenKeys[IE_PROTO$1] = true;
|
|
1176
|
+
|
|
1177
|
+
// `Object.create` method
|
|
1178
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
1179
|
+
// eslint-disable-next-line es-x/no-object-create -- safe
|
|
1180
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
|
1181
|
+
var result;
|
|
1182
|
+
if (O !== null) {
|
|
1183
|
+
EmptyConstructor[PROTOTYPE] = anObject$3(O);
|
|
1184
|
+
result = new EmptyConstructor();
|
|
1185
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
1186
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
1187
|
+
result[IE_PROTO$1] = O;
|
|
1188
|
+
} else result = NullProtoObject();
|
|
1189
|
+
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
1083
1190
|
};
|
|
1084
1191
|
|
|
1085
|
-
var
|
|
1086
|
-
var
|
|
1087
|
-
var
|
|
1192
|
+
var wellKnownSymbol$6 = wellKnownSymbol$8;
|
|
1193
|
+
var create$1 = objectCreate;
|
|
1194
|
+
var defineProperty$2 = objectDefineProperty.f;
|
|
1088
1195
|
|
|
1089
|
-
var
|
|
1196
|
+
var UNSCOPABLES = wellKnownSymbol$6('unscopables');
|
|
1197
|
+
var ArrayPrototype = Array.prototype;
|
|
1090
1198
|
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1199
|
+
// Array.prototype[@@unscopables]
|
|
1200
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1201
|
+
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
1202
|
+
defineProperty$2(ArrayPrototype, UNSCOPABLES, {
|
|
1203
|
+
configurable: true,
|
|
1204
|
+
value: create$1(null)
|
|
1205
|
+
});
|
|
1206
|
+
}
|
|
1098
1207
|
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
options.stat - export as static methods of target
|
|
1103
|
-
options.proto - export as prototype methods of target
|
|
1104
|
-
options.real - real prototype method for the `pure` version
|
|
1105
|
-
options.forced - export even if the native feature is available
|
|
1106
|
-
options.bind - bind methods to the target, required for the `pure` version
|
|
1107
|
-
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
1108
|
-
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
1109
|
-
options.sham - add a flag to not completely full polyfills
|
|
1110
|
-
options.enumerable - export as enumerable property
|
|
1111
|
-
options.dontCallGetSet - prevent calling a getter on target
|
|
1112
|
-
options.name - the .name of the function if it does not match the key
|
|
1113
|
-
*/
|
|
1114
|
-
var _export = function (options, source) {
|
|
1115
|
-
var TARGET = options.target;
|
|
1116
|
-
var GLOBAL = options.global;
|
|
1117
|
-
var STATIC = options.stat;
|
|
1118
|
-
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
1119
|
-
if (GLOBAL) {
|
|
1120
|
-
target = global$3;
|
|
1121
|
-
} else if (STATIC) {
|
|
1122
|
-
target = global$3[TARGET] || defineGlobalProperty(TARGET, {});
|
|
1123
|
-
} else {
|
|
1124
|
-
target = (global$3[TARGET] || {}).prototype;
|
|
1125
|
-
}
|
|
1126
|
-
if (target) for (key in source) {
|
|
1127
|
-
sourceProperty = source[key];
|
|
1128
|
-
if (options.dontCallGetSet) {
|
|
1129
|
-
descriptor = getOwnPropertyDescriptor(target, key);
|
|
1130
|
-
targetProperty = descriptor && descriptor.value;
|
|
1131
|
-
} else targetProperty = target[key];
|
|
1132
|
-
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
1133
|
-
// contained in target
|
|
1134
|
-
if (!FORCED && targetProperty !== undefined) {
|
|
1135
|
-
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
1136
|
-
copyConstructorProperties(sourceProperty, targetProperty);
|
|
1137
|
-
}
|
|
1138
|
-
// add a flag to not completely full polyfills
|
|
1139
|
-
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
1140
|
-
createNonEnumerableProperty$2(sourceProperty, 'sham', true);
|
|
1141
|
-
}
|
|
1142
|
-
defineBuiltIn$3(target, key, sourceProperty, options);
|
|
1143
|
-
}
|
|
1208
|
+
// add a key to Array.prototype[@@unscopables]
|
|
1209
|
+
var addToUnscopables$1 = function (key) {
|
|
1210
|
+
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
1144
1211
|
};
|
|
1145
1212
|
|
|
1146
|
-
var
|
|
1213
|
+
var iterators = {};
|
|
1214
|
+
|
|
1215
|
+
var fails$2 = fails$c;
|
|
1147
1216
|
|
|
1148
|
-
var correctPrototypeGetter = !fails$
|
|
1217
|
+
var correctPrototypeGetter = !fails$2(function () {
|
|
1149
1218
|
function F() { /* empty */ }
|
|
1150
1219
|
F.prototype.constructor = null;
|
|
1151
1220
|
// eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
|
|
@@ -1154,7 +1223,7 @@ var correctPrototypeGetter = !fails$3(function () {
|
|
|
1154
1223
|
|
|
1155
1224
|
var hasOwn$2 = hasOwnProperty_1;
|
|
1156
1225
|
var isCallable$4 = isCallable$f;
|
|
1157
|
-
var toObject
|
|
1226
|
+
var toObject = toObject$3;
|
|
1158
1227
|
var sharedKey = sharedKey$3;
|
|
1159
1228
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
1160
1229
|
|
|
@@ -1166,7 +1235,7 @@ var ObjectPrototype = $Object$1.prototype;
|
|
|
1166
1235
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1167
1236
|
// eslint-disable-next-line es-x/no-object-getprototypeof -- safe
|
|
1168
1237
|
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
|
|
1169
|
-
var object = toObject
|
|
1238
|
+
var object = toObject(O);
|
|
1170
1239
|
if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO];
|
|
1171
1240
|
var constructor = object.constructor;
|
|
1172
1241
|
if (isCallable$4(constructor) && object instanceof constructor) {
|
|
@@ -1174,7 +1243,7 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
|
|
|
1174
1243
|
} return object instanceof $Object$1 ? ObjectPrototype : null;
|
|
1175
1244
|
};
|
|
1176
1245
|
|
|
1177
|
-
var fails$
|
|
1246
|
+
var fails$1 = fails$c;
|
|
1178
1247
|
var isCallable$3 = isCallable$f;
|
|
1179
1248
|
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
1180
1249
|
var defineBuiltIn$2 = defineBuiltIn$4;
|
|
@@ -1198,7 +1267,7 @@ if ([].keys) {
|
|
|
1198
1267
|
}
|
|
1199
1268
|
}
|
|
1200
1269
|
|
|
1201
|
-
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails$
|
|
1270
|
+
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails$1(function () {
|
|
1202
1271
|
var test = {};
|
|
1203
1272
|
// FF44- legacy iterators case
|
|
1204
1273
|
return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
|
|
@@ -1219,7 +1288,7 @@ var iteratorsCore = {
|
|
|
1219
1288
|
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
1220
1289
|
};
|
|
1221
1290
|
|
|
1222
|
-
var defineProperty$
|
|
1291
|
+
var defineProperty$1 = objectDefineProperty.f;
|
|
1223
1292
|
var hasOwn$1 = hasOwnProperty_1;
|
|
1224
1293
|
var wellKnownSymbol$4 = wellKnownSymbol$8;
|
|
1225
1294
|
|
|
@@ -1228,7 +1297,7 @@ var TO_STRING_TAG$3 = wellKnownSymbol$4('toStringTag');
|
|
|
1228
1297
|
var setToStringTag$2 = function (target, TAG, STATIC) {
|
|
1229
1298
|
if (target && !STATIC) target = target.prototype;
|
|
1230
1299
|
if (target && !hasOwn$1(target, TO_STRING_TAG$3)) {
|
|
1231
|
-
defineProperty$
|
|
1300
|
+
defineProperty$1(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
|
|
1232
1301
|
}
|
|
1233
1302
|
};
|
|
1234
1303
|
|
|
@@ -1260,7 +1329,7 @@ var aPossiblePrototype$1 = function (argument) {
|
|
|
1260
1329
|
|
|
1261
1330
|
/* eslint-disable no-proto -- safe */
|
|
1262
1331
|
|
|
1263
|
-
var uncurryThis
|
|
1332
|
+
var uncurryThis = functionUncurryThis;
|
|
1264
1333
|
var anObject$2 = anObject$7;
|
|
1265
1334
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1266
1335
|
|
|
@@ -1274,7 +1343,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1274
1343
|
var setter;
|
|
1275
1344
|
try {
|
|
1276
1345
|
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
1277
|
-
setter = uncurryThis
|
|
1346
|
+
setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
1278
1347
|
setter(test, []);
|
|
1279
1348
|
CORRECT_SETTER = test instanceof Array;
|
|
1280
1349
|
} catch (error) { /* empty */ }
|
|
@@ -1287,8 +1356,8 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1287
1356
|
};
|
|
1288
1357
|
}() : undefined);
|
|
1289
1358
|
|
|
1290
|
-
var $$
|
|
1291
|
-
var call$
|
|
1359
|
+
var $$1 = _export;
|
|
1360
|
+
var call$1 = functionCall;
|
|
1292
1361
|
var FunctionName = functionName;
|
|
1293
1362
|
var isCallable$1 = isCallable$f;
|
|
1294
1363
|
var createIteratorConstructor = createIteratorConstructor$1;
|
|
@@ -1357,7 +1426,7 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
|
|
|
1357
1426
|
createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
|
|
1358
1427
|
} else {
|
|
1359
1428
|
INCORRECT_VALUES_NAME = true;
|
|
1360
|
-
defaultIterator = function values() { return call$
|
|
1429
|
+
defaultIterator = function values() { return call$1(nativeIterator, this); };
|
|
1361
1430
|
}
|
|
1362
1431
|
}
|
|
1363
1432
|
|
|
@@ -1372,7 +1441,7 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
|
|
|
1372
1441
|
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1373
1442
|
defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
|
|
1374
1443
|
}
|
|
1375
|
-
} else $$
|
|
1444
|
+
} else $$1({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
1376
1445
|
}
|
|
1377
1446
|
|
|
1378
1447
|
// define iterator
|
|
@@ -1388,9 +1457,9 @@ var toIndexedObject = toIndexedObject$5;
|
|
|
1388
1457
|
var addToUnscopables = addToUnscopables$1;
|
|
1389
1458
|
var Iterators = iterators;
|
|
1390
1459
|
var InternalStateModule = internalState;
|
|
1391
|
-
var defineProperty
|
|
1460
|
+
var defineProperty = objectDefineProperty.f;
|
|
1392
1461
|
var defineIterator = defineIterator$1;
|
|
1393
|
-
var DESCRIPTORS
|
|
1462
|
+
var DESCRIPTORS = descriptors;
|
|
1394
1463
|
|
|
1395
1464
|
var ARRAY_ITERATOR = 'Array Iterator';
|
|
1396
1465
|
var setInternalState = InternalStateModule.set;
|
|
@@ -1440,8 +1509,8 @@ addToUnscopables('values');
|
|
|
1440
1509
|
addToUnscopables('entries');
|
|
1441
1510
|
|
|
1442
1511
|
// V8 ~ Chrome 45- bug
|
|
1443
|
-
if (DESCRIPTORS
|
|
1444
|
-
defineProperty
|
|
1512
|
+
if (DESCRIPTORS && values.name !== 'values') try {
|
|
1513
|
+
defineProperty(values, 'name', { value: 'values' });
|
|
1445
1514
|
} catch (error) { /* empty */ }
|
|
1446
1515
|
|
|
1447
1516
|
// iterable DOM collections
|
|
@@ -1527,12 +1596,12 @@ for (var COLLECTION_NAME in DOMIterables) {
|
|
|
1527
1596
|
|
|
1528
1597
|
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
1529
1598
|
|
|
1530
|
-
var
|
|
1599
|
+
var $ = _export;
|
|
1531
1600
|
var global$1 = global$c;
|
|
1532
1601
|
|
|
1533
1602
|
// `globalThis` object
|
|
1534
1603
|
// https://tc39.es/ecma262/#sec-globalthis
|
|
1535
|
-
|
|
1604
|
+
$({ global: true }, {
|
|
1536
1605
|
globalThis: global$1
|
|
1537
1606
|
});
|
|
1538
1607
|
|
|
@@ -4551,7 +4620,7 @@ var regexpFlags = function () {
|
|
|
4551
4620
|
return result;
|
|
4552
4621
|
};
|
|
4553
4622
|
|
|
4554
|
-
var call
|
|
4623
|
+
var call = functionCall;
|
|
4555
4624
|
var hasOwn = hasOwnProperty_1;
|
|
4556
4625
|
var isPrototypeOf = objectIsPrototypeOf;
|
|
4557
4626
|
var regExpFlags = regexpFlags;
|
|
@@ -4561,21 +4630,21 @@ var RegExpPrototype$1 = RegExp.prototype;
|
|
|
4561
4630
|
var regexpGetFlags = function (R) {
|
|
4562
4631
|
var flags = R.flags;
|
|
4563
4632
|
return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
|
|
4564
|
-
? call
|
|
4633
|
+
? call(regExpFlags, R) : flags;
|
|
4565
4634
|
};
|
|
4566
4635
|
|
|
4567
4636
|
var PROPER_FUNCTION_NAME = functionName.PROPER;
|
|
4568
4637
|
var defineBuiltIn = defineBuiltIn$4;
|
|
4569
4638
|
var anObject = anObject$7;
|
|
4570
4639
|
var $toString = toString;
|
|
4571
|
-
var fails
|
|
4640
|
+
var fails = fails$c;
|
|
4572
4641
|
var getRegExpFlags = regexpGetFlags;
|
|
4573
4642
|
|
|
4574
4643
|
var TO_STRING = 'toString';
|
|
4575
4644
|
var RegExpPrototype = RegExp.prototype;
|
|
4576
4645
|
var n$ToString = RegExpPrototype[TO_STRING];
|
|
4577
4646
|
|
|
4578
|
-
var NOT_GENERIC = fails
|
|
4647
|
+
var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
|
|
4579
4648
|
// FF44- RegExp#toString has a wrong name
|
|
4580
4649
|
var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING;
|
|
4581
4650
|
|
|
@@ -4707,78 +4776,10 @@ class ResolveObjectResponse$Type extends MessageType{constructor(){super("schema
|
|
|
4707
4776
|
* @generated from protobuf rpc: ResolveObject(schema.v1.ResolveObjectRequest) returns (schema.v1.ResolveObjectResponse);
|
|
4708
4777
|
*/resolveObject(a,b){const c=this.methods[4],d=this._transport.mergeOptions(b);return stackIntercept("unary",this._transport,c,d,a)}}
|
|
4709
4778
|
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
var DESCRIPTORS = descriptors;
|
|
4714
|
-
var uncurryThis = functionUncurryThis;
|
|
4715
|
-
var call = functionCall;
|
|
4716
|
-
var fails = fails$c;
|
|
4717
|
-
var objectKeys = objectKeys$2;
|
|
4718
|
-
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
4719
|
-
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
4720
|
-
var toObject = toObject$3;
|
|
4721
|
-
var IndexedObject = indexedObject;
|
|
4722
|
-
|
|
4723
|
-
// eslint-disable-next-line es-x/no-object-assign -- safe
|
|
4724
|
-
var $assign = Object.assign;
|
|
4725
|
-
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
4726
|
-
var defineProperty = Object.defineProperty;
|
|
4727
|
-
var concat = uncurryThis([].concat);
|
|
4728
|
-
|
|
4729
|
-
// `Object.assign` method
|
|
4730
|
-
// https://tc39.es/ecma262/#sec-object.assign
|
|
4731
|
-
var objectAssign = !$assign || fails(function () {
|
|
4732
|
-
// should have correct order of operations (Edge bug)
|
|
4733
|
-
if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
|
|
4734
|
-
enumerable: true,
|
|
4735
|
-
get: function () {
|
|
4736
|
-
defineProperty(this, 'b', {
|
|
4737
|
-
value: 3,
|
|
4738
|
-
enumerable: false
|
|
4739
|
-
});
|
|
4740
|
-
}
|
|
4741
|
-
}), { b: 2 })).b !== 1) return true;
|
|
4742
|
-
// should work with symbols and should have deterministic property order (V8 bug)
|
|
4743
|
-
var A = {};
|
|
4744
|
-
var B = {};
|
|
4745
|
-
// eslint-disable-next-line es-x/no-symbol -- safe
|
|
4746
|
-
var symbol = Symbol();
|
|
4747
|
-
var alphabet = 'abcdefghijklmnopqrst';
|
|
4748
|
-
A[symbol] = 7;
|
|
4749
|
-
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
4750
|
-
return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
|
|
4751
|
-
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
4752
|
-
var T = toObject(target);
|
|
4753
|
-
var argumentsLength = arguments.length;
|
|
4754
|
-
var index = 1;
|
|
4755
|
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
4756
|
-
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
4757
|
-
while (argumentsLength > index) {
|
|
4758
|
-
var S = IndexedObject(arguments[index++]);
|
|
4759
|
-
var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
4760
|
-
var length = keys.length;
|
|
4761
|
-
var j = 0;
|
|
4762
|
-
var key;
|
|
4763
|
-
while (length > j) {
|
|
4764
|
-
key = keys[j++];
|
|
4765
|
-
if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
4766
|
-
}
|
|
4767
|
-
} return T;
|
|
4768
|
-
} : $assign;
|
|
4769
|
-
|
|
4770
|
-
var $ = _export;
|
|
4771
|
-
var assign = objectAssign;
|
|
4772
|
-
|
|
4773
|
-
// `Object.assign` method
|
|
4774
|
-
// https://tc39.es/ecma262/#sec-object.assign
|
|
4775
|
-
// eslint-disable-next-line es-x/no-object-assign -- required for testing
|
|
4776
|
-
$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
4777
|
-
assign: assign
|
|
4778
|
-
});
|
|
4779
|
-
|
|
4780
|
-
const DEFAULT_CONFIG={host:"localhost",port:8013,tls:!1};var ENV_VAR;(function(a){a.FLAGD_HOST="FLAGD_HOST",a.FLAGD_PORT="FLAGD_PORT",a.FLAGD_TLS="FLAGD_TLS",a.FLAGD_SOCKET_PATH="FLAGD_SOCKET_PATH";})(ENV_VAR||(ENV_VAR={}));const getEnvVarConfig=()=>{var a;return Object.assign(Object.assign(Object.assign(Object.assign({},process.env[ENV_VAR.FLAGD_HOST]&&{host:process.env[ENV_VAR.FLAGD_HOST]}),+process.env[ENV_VAR.FLAGD_PORT]&&{port:+process.env[ENV_VAR.FLAGD_PORT]}),process.env[ENV_VAR.FLAGD_TLS]&&{tls:"true"===(null===(a=process.env[ENV_VAR.FLAGD_TLS])||void 0===a?void 0:a.toLowerCase())}),process.env[ENV_VAR.FLAGD_SOCKET_PATH]&&{socketPath:process.env[ENV_VAR.FLAGD_SOCKET_PATH]})};function getConfig(a={}){return Object.assign(Object.assign(Object.assign({},DEFAULT_CONFIG),getEnvVarConfig()),a)}
|
|
4779
|
+
const Codes={InvalidArgument:"INVALID_ARGUMENT",NotFound:"NOT_FOUND",DataLoss:"DATA_LOSS",Unavailable:"UNAVAILABLE"};class GRPCService{constructor(a,b){this.onFulfilled=a=>a,this.onRejected=a=>{// map the errors
|
|
4780
|
+
switch(null===a||void 0===a?void 0:a.code){case Codes.DataLoss:throw new ParseError(a.message);case Codes.InvalidArgument:throw new TypeMismatchError(a.message);case Codes.NotFound:throw new FlagNotFoundError(a.message);case Codes.Unavailable:throw new FlagNotFoundError(a.message);default:throw new GeneralError(a.message);}};const{host:c,port:d,tls:e,socketPath:f}=a;this.client=b?b:new ServiceClient(new GrpcTransport({host:f?`unix://${f}`:`${c}:${d}`,channelCredentials:e?grpc.credentials.createSsl():grpc.credentials.createInsecure()}));}resolveBoolean(a,b,c){return __awaiter(this,void 0,void 0,function*(){const{response:d}=yield this.client.resolveBoolean({flagKey:a,context:this.convertContext(b,c)}).then(this.onFulfilled,this.onRejected);return {value:d.value,reason:d.reason,variant:d.variant}})}resolveString(a,b,c){return __awaiter(this,void 0,void 0,function*(){const{response:d}=yield this.client.resolveString({flagKey:a,context:this.convertContext(b,c)}).then(this.onFulfilled,this.onRejected);return {value:d.value,reason:d.reason,variant:d.variant}})}resolveNumber(a,b,c){return __awaiter(this,void 0,void 0,function*(){const{response:d}=yield this.client.resolveFloat({flagKey:a,context:this.convertContext(b,c)}).then(this.onFulfilled,this.onRejected);return {value:d.value,reason:d.reason,variant:d.variant}})}resolveObject(a,b,c){return __awaiter(this,void 0,void 0,function*(){const{response:d}=yield this.client.resolveObject({flagKey:a,context:this.convertContext(b,c)}).then(this.onFulfilled,this.onRejected);if(d.value!==void 0)return {value:Struct.toJson(d.value),reason:d.reason,variant:d.variant};throw new ParseError("Object value undefined or missing.")})}convertContext(a,b){try{// stringify to remove invalid js props
|
|
4781
|
+
return Struct.fromJsonString(JSON.stringify(a))}catch(a){const c=a;throw b.error(`${"Error serializing context."}: ${null===c||void 0===c?void 0:c.message}`),b.error(null===c||void 0===c?void 0:c.stack),new ParseError("Error serializing context.")}}}
|
|
4781
4782
|
|
|
4782
|
-
class FlagdProvider{constructor(a,b){this.metadata={name:"flagd Provider"},this._service=b?b:new GRPCService(getConfig(a));}resolveBooleanEvaluation(a,b,c){return this._service.resolveBoolean(a,c)}resolveStringEvaluation(a,b,c){return this._service.resolveString(a,c)}resolveNumberEvaluation(a,b,c){return this._service.resolveNumber(a,c)}resolveObjectEvaluation(a,b,c){return this._service.resolveObject(a,c)}}
|
|
4783
|
+
class FlagdProvider{constructor(a,b){this.metadata={name:"flagd Provider"},this.logRejected=(a,b,c)=>{throw c.error(`Error resolving flag ${b}: ${null===a||void 0===a?void 0:a.message}`),c.error(null===a||void 0===a?void 0:a.stack),a},this._service=b?b:new GRPCService(getConfig(a));}resolveBooleanEvaluation(a,b,c,d){return this._service.resolveBoolean(a,c,d).catch(b=>this.logRejected(b,a,d))}resolveStringEvaluation(a,b,c,d){return this._service.resolveString(a,c,d).catch(b=>this.logRejected(b,a,d))}resolveNumberEvaluation(a,b,c,d){return this._service.resolveNumber(a,c,d).catch(b=>this.logRejected(b,a,d))}resolveObjectEvaluation(a,b,c,d){return this._service.resolveObject(a,c,d).catch(b=>this.logRejected(b,a,d))}}
|
|
4783
4784
|
|
|
4784
4785
|
export { FlagdProvider };
|