@dereekb/model 12.1.2 → 12.1.4
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.js +443 -3448
- package/index.esm.js +443 -3448
- package/package.json +2 -3
package/index.cjs.js
CHANGED
|
@@ -4,3419 +4,477 @@ var util = require('@dereekb/util');
|
|
|
4
4
|
var classTransformer = require('class-transformer');
|
|
5
5
|
var classValidator = require('class-validator');
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
55
|
-
var indexedObject = fails$e(function () {
|
|
56
|
-
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
57
|
-
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
58
|
-
return !$Object$4('z').propertyIsEnumerable(0);
|
|
59
|
-
}) ? function (it) {
|
|
60
|
-
return classof$5(it) === 'String' ? split(it, '') : $Object$4(it);
|
|
61
|
-
} : $Object$4;
|
|
62
|
-
|
|
63
|
-
// we can't use just `it == null` since of `document.all` special case
|
|
64
|
-
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
65
|
-
var isNullOrUndefined$4 = function (it) {
|
|
66
|
-
return it === null || it === undefined;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
var isNullOrUndefined$3 = isNullOrUndefined$4;
|
|
70
|
-
|
|
71
|
-
var $TypeError$c = TypeError;
|
|
72
|
-
|
|
73
|
-
// `RequireObjectCoercible` abstract operation
|
|
74
|
-
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
75
|
-
var requireObjectCoercible$3 = function (it) {
|
|
76
|
-
if (isNullOrUndefined$3(it)) throw new $TypeError$c("Can't call method on " + it);
|
|
77
|
-
return it;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
// toObject with fallback for non-array-like ES3 strings
|
|
81
|
-
var IndexedObject$1 = indexedObject;
|
|
82
|
-
var requireObjectCoercible$2 = requireObjectCoercible$3;
|
|
83
|
-
|
|
84
|
-
var toIndexedObject$5 = function (it) {
|
|
85
|
-
return IndexedObject$1(requireObjectCoercible$2(it));
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
var check = function (it) {
|
|
89
|
-
return it && it.Math === Math && it;
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
93
|
-
var global$l =
|
|
94
|
-
// eslint-disable-next-line es/no-global-this -- safe
|
|
95
|
-
check(typeof globalThis == 'object' && globalThis) ||
|
|
96
|
-
check(typeof window == 'object' && window) ||
|
|
97
|
-
// eslint-disable-next-line no-restricted-globals -- safe
|
|
98
|
-
check(typeof self == 'object' && self) ||
|
|
99
|
-
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
100
|
-
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
101
|
-
// eslint-disable-next-line no-new-func -- fallback
|
|
102
|
-
(function () { return this; })() || Function('return this')();
|
|
103
|
-
|
|
104
|
-
var sharedStore = {exports: {}};
|
|
105
|
-
|
|
106
|
-
var global$k = global$l;
|
|
107
|
-
|
|
108
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
109
|
-
var defineProperty$6 = Object.defineProperty;
|
|
110
|
-
|
|
111
|
-
var defineGlobalProperty$3 = function (key, value) {
|
|
112
|
-
try {
|
|
113
|
-
defineProperty$6(global$k, key, { value: value, configurable: true, writable: true });
|
|
114
|
-
} catch (error) {
|
|
115
|
-
global$k[key] = value;
|
|
116
|
-
} return value;
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
var globalThis$1 = global$l;
|
|
120
|
-
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
121
|
-
|
|
122
|
-
var SHARED = '__core-js_shared__';
|
|
123
|
-
var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
124
|
-
|
|
125
|
-
(store$3.versions || (store$3.versions = [])).push({
|
|
126
|
-
version: '3.36.1',
|
|
127
|
-
mode: 'global',
|
|
128
|
-
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
|
|
129
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE',
|
|
130
|
-
source: 'https://github.com/zloirock/core-js'
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
var sharedStoreExports = sharedStore.exports;
|
|
134
|
-
|
|
135
|
-
var store$2 = sharedStoreExports;
|
|
136
|
-
|
|
137
|
-
var shared$4 = function (key, value) {
|
|
138
|
-
return store$2[key] || (store$2[key] = value || {});
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
var requireObjectCoercible$1 = requireObjectCoercible$3;
|
|
142
|
-
|
|
143
|
-
var $Object$3 = Object;
|
|
144
|
-
|
|
145
|
-
// `ToObject` abstract operation
|
|
146
|
-
// https://tc39.es/ecma262/#sec-toobject
|
|
147
|
-
var toObject$3 = function (argument) {
|
|
148
|
-
return $Object$3(requireObjectCoercible$1(argument));
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
var uncurryThis$d = functionUncurryThis;
|
|
152
|
-
var toObject$2 = toObject$3;
|
|
153
|
-
|
|
154
|
-
var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
|
|
155
|
-
|
|
156
|
-
// `HasOwnProperty` abstract operation
|
|
157
|
-
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
158
|
-
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
159
|
-
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
160
|
-
return hasOwnProperty(toObject$2(it), key);
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
var uncurryThis$c = functionUncurryThis;
|
|
164
|
-
|
|
165
|
-
var id = 0;
|
|
166
|
-
var postfix = Math.random();
|
|
167
|
-
var toString$3 = uncurryThis$c(1.0.toString);
|
|
168
|
-
|
|
169
|
-
var uid$2 = function (key) {
|
|
170
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
|
174
|
-
|
|
175
|
-
var global$j = global$l;
|
|
176
|
-
var userAgent$3 = engineUserAgent;
|
|
177
|
-
|
|
178
|
-
var process$3 = global$j.process;
|
|
179
|
-
var Deno$1 = global$j.Deno;
|
|
180
|
-
var versions = process$3 && process$3.versions || Deno$1 && Deno$1.version;
|
|
181
|
-
var v8 = versions && versions.v8;
|
|
182
|
-
var match, version;
|
|
183
|
-
|
|
184
|
-
if (v8) {
|
|
185
|
-
match = v8.split('.');
|
|
186
|
-
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
187
|
-
// but their correct versions are not interesting for us
|
|
188
|
-
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
192
|
-
// so check `userAgent` even if `.v8` exists, but 0
|
|
193
|
-
if (!version && userAgent$3) {
|
|
194
|
-
match = userAgent$3.match(/Edge\/(\d+)/);
|
|
195
|
-
if (!match || match[1] >= 74) {
|
|
196
|
-
match = userAgent$3.match(/Chrome\/(\d+)/);
|
|
197
|
-
if (match) version = +match[1];
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
var engineV8Version = version;
|
|
202
|
-
|
|
203
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
204
|
-
var V8_VERSION$1 = engineV8Version;
|
|
205
|
-
var fails$d = fails$g;
|
|
206
|
-
var global$i = global$l;
|
|
207
|
-
|
|
208
|
-
var $String$5 = global$i.String;
|
|
209
|
-
|
|
210
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
211
|
-
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(function () {
|
|
212
|
-
var symbol = Symbol('symbol detection');
|
|
213
|
-
// Chrome 38 Symbol has incorrect toString conversion
|
|
214
|
-
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
215
|
-
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
|
216
|
-
// of course, fail.
|
|
217
|
-
return !$String$5(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
218
|
-
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
219
|
-
!Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41;
|
|
220
|
-
});
|
|
221
|
-
|
|
222
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
223
|
-
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
224
|
-
|
|
225
|
-
var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
226
|
-
&& !Symbol.sham
|
|
227
|
-
&& typeof Symbol.iterator == 'symbol';
|
|
228
|
-
|
|
229
|
-
var global$h = global$l;
|
|
230
|
-
var shared$3 = shared$4;
|
|
231
|
-
var hasOwn$9 = hasOwnProperty_1;
|
|
232
|
-
var uid$1 = uid$2;
|
|
233
|
-
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
234
|
-
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
235
|
-
|
|
236
|
-
var Symbol$1 = global$h.Symbol;
|
|
237
|
-
var WellKnownSymbolsStore = shared$3('wks');
|
|
238
|
-
var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
239
|
-
|
|
240
|
-
var wellKnownSymbol$e = function (name) {
|
|
241
|
-
if (!hasOwn$9(WellKnownSymbolsStore, name)) {
|
|
242
|
-
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$9(Symbol$1, name)
|
|
243
|
-
? Symbol$1[name]
|
|
244
|
-
: createWellKnownSymbol('Symbol.' + name);
|
|
245
|
-
} return WellKnownSymbolsStore[name];
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
249
|
-
var documentAll = typeof document == 'object' && document.all;
|
|
250
|
-
|
|
251
|
-
// `IsCallable` abstract operation
|
|
252
|
-
// https://tc39.es/ecma262/#sec-iscallable
|
|
253
|
-
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
254
|
-
var isCallable$k = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
255
|
-
return typeof argument == 'function' || argument === documentAll;
|
|
256
|
-
} : function (argument) {
|
|
257
|
-
return typeof argument == 'function';
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
var isCallable$j = isCallable$k;
|
|
261
|
-
|
|
262
|
-
var isObject$a = function (it) {
|
|
263
|
-
return typeof it == 'object' ? it !== null : isCallable$j(it);
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
var isObject$9 = isObject$a;
|
|
267
|
-
|
|
268
|
-
var $String$4 = String;
|
|
269
|
-
var $TypeError$b = TypeError;
|
|
270
|
-
|
|
271
|
-
// `Assert: Type(argument) is Object`
|
|
272
|
-
var anObject$b = function (argument) {
|
|
273
|
-
if (isObject$9(argument)) return argument;
|
|
274
|
-
throw new $TypeError$b($String$4(argument) + ' is not an object');
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
var objectDefineProperties = {};
|
|
278
|
-
|
|
279
|
-
var fails$c = fails$g;
|
|
280
|
-
|
|
281
|
-
// Detect IE8's incomplete defineProperty implementation
|
|
282
|
-
var descriptors = !fails$c(function () {
|
|
283
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
284
|
-
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
285
|
-
});
|
|
286
|
-
|
|
287
|
-
var DESCRIPTORS$b = descriptors;
|
|
288
|
-
var fails$b = fails$g;
|
|
289
|
-
|
|
290
|
-
// V8 ~ Chrome 36-
|
|
291
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
292
|
-
var v8PrototypeDefineBug = DESCRIPTORS$b && fails$b(function () {
|
|
293
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
294
|
-
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
295
|
-
value: 42,
|
|
296
|
-
writable: false
|
|
297
|
-
}).prototype !== 42;
|
|
298
|
-
});
|
|
299
|
-
|
|
300
|
-
var objectDefineProperty = {};
|
|
301
|
-
|
|
302
|
-
var global$g = global$l;
|
|
303
|
-
var isObject$8 = isObject$a;
|
|
304
|
-
|
|
305
|
-
var document$3 = global$g.document;
|
|
306
|
-
// typeof document.createElement is 'object' in old IE
|
|
307
|
-
var EXISTS$1 = isObject$8(document$3) && isObject$8(document$3.createElement);
|
|
308
|
-
|
|
309
|
-
var documentCreateElement$2 = function (it) {
|
|
310
|
-
return EXISTS$1 ? document$3.createElement(it) : {};
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
var DESCRIPTORS$a = descriptors;
|
|
314
|
-
var fails$a = fails$g;
|
|
315
|
-
var createElement$1 = documentCreateElement$2;
|
|
316
|
-
|
|
317
|
-
// Thanks to IE8 for its funny defineProperty
|
|
318
|
-
var ie8DomDefine = !DESCRIPTORS$a && !fails$a(function () {
|
|
319
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
320
|
-
return Object.defineProperty(createElement$1('div'), 'a', {
|
|
321
|
-
get: function () { return 7; }
|
|
322
|
-
}).a !== 7;
|
|
323
|
-
});
|
|
324
|
-
|
|
325
|
-
var NATIVE_BIND$2 = functionBindNative;
|
|
326
|
-
|
|
327
|
-
var call$e = Function.prototype.call;
|
|
328
|
-
|
|
329
|
-
var functionCall = NATIVE_BIND$2 ? call$e.bind(call$e) : function () {
|
|
330
|
-
return call$e.apply(call$e, arguments);
|
|
331
|
-
};
|
|
332
|
-
|
|
333
|
-
var global$f = global$l;
|
|
334
|
-
var isCallable$i = isCallable$k;
|
|
335
|
-
|
|
336
|
-
var aFunction = function (argument) {
|
|
337
|
-
return isCallable$i(argument) ? argument : undefined;
|
|
338
|
-
};
|
|
339
|
-
|
|
340
|
-
var getBuiltIn$7 = function (namespace, method) {
|
|
341
|
-
return arguments.length < 2 ? aFunction(global$f[namespace]) : global$f[namespace] && global$f[namespace][method];
|
|
342
|
-
};
|
|
343
|
-
|
|
344
|
-
var uncurryThis$b = functionUncurryThis;
|
|
345
|
-
|
|
346
|
-
var objectIsPrototypeOf = uncurryThis$b({}.isPrototypeOf);
|
|
347
|
-
|
|
348
|
-
var getBuiltIn$6 = getBuiltIn$7;
|
|
349
|
-
var isCallable$h = isCallable$k;
|
|
350
|
-
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
351
|
-
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
352
|
-
|
|
353
|
-
var $Object$2 = Object;
|
|
354
|
-
|
|
355
|
-
var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
|
|
356
|
-
return typeof it == 'symbol';
|
|
357
|
-
} : function (it) {
|
|
358
|
-
var $Symbol = getBuiltIn$6('Symbol');
|
|
359
|
-
return isCallable$h($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$2(it));
|
|
360
|
-
};
|
|
361
|
-
|
|
362
|
-
var $String$3 = String;
|
|
363
|
-
|
|
364
|
-
var tryToString$4 = function (argument) {
|
|
365
|
-
try {
|
|
366
|
-
return $String$3(argument);
|
|
367
|
-
} catch (error) {
|
|
368
|
-
return 'Object';
|
|
369
|
-
}
|
|
370
|
-
};
|
|
371
|
-
|
|
372
|
-
var isCallable$g = isCallable$k;
|
|
373
|
-
var tryToString$3 = tryToString$4;
|
|
374
|
-
|
|
375
|
-
var $TypeError$a = TypeError;
|
|
376
|
-
|
|
377
|
-
// `Assert: IsCallable(argument) is true`
|
|
378
|
-
var aCallable$8 = function (argument) {
|
|
379
|
-
if (isCallable$g(argument)) return argument;
|
|
380
|
-
throw new $TypeError$a(tryToString$3(argument) + ' is not a function');
|
|
381
|
-
};
|
|
382
|
-
|
|
383
|
-
var aCallable$7 = aCallable$8;
|
|
384
|
-
var isNullOrUndefined$2 = isNullOrUndefined$4;
|
|
385
|
-
|
|
386
|
-
// `GetMethod` abstract operation
|
|
387
|
-
// https://tc39.es/ecma262/#sec-getmethod
|
|
388
|
-
var getMethod$3 = function (V, P) {
|
|
389
|
-
var func = V[P];
|
|
390
|
-
return isNullOrUndefined$2(func) ? undefined : aCallable$7(func);
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
var call$d = functionCall;
|
|
394
|
-
var isCallable$f = isCallable$k;
|
|
395
|
-
var isObject$7 = isObject$a;
|
|
396
|
-
|
|
397
|
-
var $TypeError$9 = TypeError;
|
|
398
|
-
|
|
399
|
-
// `OrdinaryToPrimitive` abstract operation
|
|
400
|
-
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
401
|
-
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
402
|
-
var fn, val;
|
|
403
|
-
if (pref === 'string' && isCallable$f(fn = input.toString) && !isObject$7(val = call$d(fn, input))) return val;
|
|
404
|
-
if (isCallable$f(fn = input.valueOf) && !isObject$7(val = call$d(fn, input))) return val;
|
|
405
|
-
if (pref !== 'string' && isCallable$f(fn = input.toString) && !isObject$7(val = call$d(fn, input))) return val;
|
|
406
|
-
throw new $TypeError$9("Can't convert object to primitive value");
|
|
407
|
-
};
|
|
408
|
-
|
|
409
|
-
var call$c = functionCall;
|
|
410
|
-
var isObject$6 = isObject$a;
|
|
411
|
-
var isSymbol$1 = isSymbol$2;
|
|
412
|
-
var getMethod$2 = getMethod$3;
|
|
413
|
-
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
414
|
-
var wellKnownSymbol$d = wellKnownSymbol$e;
|
|
415
|
-
|
|
416
|
-
var $TypeError$8 = TypeError;
|
|
417
|
-
var TO_PRIMITIVE = wellKnownSymbol$d('toPrimitive');
|
|
418
|
-
|
|
419
|
-
// `ToPrimitive` abstract operation
|
|
420
|
-
// https://tc39.es/ecma262/#sec-toprimitive
|
|
421
|
-
var toPrimitive$1 = function (input, pref) {
|
|
422
|
-
if (!isObject$6(input) || isSymbol$1(input)) return input;
|
|
423
|
-
var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
|
|
424
|
-
var result;
|
|
425
|
-
if (exoticToPrim) {
|
|
426
|
-
if (pref === undefined) pref = 'default';
|
|
427
|
-
result = call$c(exoticToPrim, input, pref);
|
|
428
|
-
if (!isObject$6(result) || isSymbol$1(result)) return result;
|
|
429
|
-
throw new $TypeError$8("Can't convert object to primitive value");
|
|
430
|
-
}
|
|
431
|
-
if (pref === undefined) pref = 'number';
|
|
432
|
-
return ordinaryToPrimitive(input, pref);
|
|
433
|
-
};
|
|
434
|
-
|
|
435
|
-
var toPrimitive = toPrimitive$1;
|
|
436
|
-
var isSymbol = isSymbol$2;
|
|
437
|
-
|
|
438
|
-
// `ToPropertyKey` abstract operation
|
|
439
|
-
// https://tc39.es/ecma262/#sec-topropertykey
|
|
440
|
-
var toPropertyKey$2 = function (argument) {
|
|
441
|
-
var key = toPrimitive(argument, 'string');
|
|
442
|
-
return isSymbol(key) ? key : key + '';
|
|
443
|
-
};
|
|
444
|
-
|
|
445
|
-
var DESCRIPTORS$9 = descriptors;
|
|
446
|
-
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
447
|
-
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
448
|
-
var anObject$a = anObject$b;
|
|
449
|
-
var toPropertyKey$1 = toPropertyKey$2;
|
|
450
|
-
|
|
451
|
-
var $TypeError$7 = TypeError;
|
|
452
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
453
|
-
var $defineProperty = Object.defineProperty;
|
|
454
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
455
|
-
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
456
|
-
var ENUMERABLE = 'enumerable';
|
|
457
|
-
var CONFIGURABLE$1 = 'configurable';
|
|
458
|
-
var WRITABLE = 'writable';
|
|
459
|
-
|
|
460
|
-
// `Object.defineProperty` method
|
|
461
|
-
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
462
|
-
objectDefineProperty.f = DESCRIPTORS$9 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
463
|
-
anObject$a(O);
|
|
464
|
-
P = toPropertyKey$1(P);
|
|
465
|
-
anObject$a(Attributes);
|
|
466
|
-
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
467
|
-
var current = $getOwnPropertyDescriptor$1(O, P);
|
|
468
|
-
if (current && current[WRITABLE]) {
|
|
469
|
-
O[P] = Attributes.value;
|
|
470
|
-
Attributes = {
|
|
471
|
-
configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
|
|
472
|
-
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
473
|
-
writable: false
|
|
474
|
-
};
|
|
475
|
-
}
|
|
476
|
-
} return $defineProperty(O, P, Attributes);
|
|
477
|
-
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
478
|
-
anObject$a(O);
|
|
479
|
-
P = toPropertyKey$1(P);
|
|
480
|
-
anObject$a(Attributes);
|
|
481
|
-
if (IE8_DOM_DEFINE$1) try {
|
|
482
|
-
return $defineProperty(O, P, Attributes);
|
|
483
|
-
} catch (error) { /* empty */ }
|
|
484
|
-
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$7('Accessors not supported');
|
|
485
|
-
if ('value' in Attributes) O[P] = Attributes.value;
|
|
486
|
-
return O;
|
|
487
|
-
};
|
|
488
|
-
|
|
489
|
-
var ceil = Math.ceil;
|
|
490
|
-
var floor = Math.floor;
|
|
491
|
-
|
|
492
|
-
// `Math.trunc` method
|
|
493
|
-
// https://tc39.es/ecma262/#sec-math.trunc
|
|
494
|
-
// eslint-disable-next-line es/no-math-trunc -- safe
|
|
495
|
-
var mathTrunc = Math.trunc || function trunc(x) {
|
|
496
|
-
var n = +x;
|
|
497
|
-
return (n > 0 ? floor : ceil)(n);
|
|
498
|
-
};
|
|
499
|
-
|
|
500
|
-
var trunc = mathTrunc;
|
|
501
|
-
|
|
502
|
-
// `ToIntegerOrInfinity` abstract operation
|
|
503
|
-
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
504
|
-
var toIntegerOrInfinity$2 = function (argument) {
|
|
505
|
-
var number = +argument;
|
|
506
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
507
|
-
return number !== number || number === 0 ? 0 : trunc(number);
|
|
508
|
-
};
|
|
509
|
-
|
|
510
|
-
var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
|
|
511
|
-
|
|
512
|
-
var max = Math.max;
|
|
513
|
-
var min$1 = Math.min;
|
|
514
|
-
|
|
515
|
-
// Helper for a popular repeating case of the spec:
|
|
516
|
-
// Let integer be ? ToInteger(index).
|
|
517
|
-
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
518
|
-
var toAbsoluteIndex$1 = function (index, length) {
|
|
519
|
-
var integer = toIntegerOrInfinity$1(index);
|
|
520
|
-
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
521
|
-
};
|
|
522
|
-
|
|
523
|
-
var toIntegerOrInfinity = toIntegerOrInfinity$2;
|
|
524
|
-
|
|
525
|
-
var min = Math.min;
|
|
526
|
-
|
|
527
|
-
// `ToLength` abstract operation
|
|
528
|
-
// https://tc39.es/ecma262/#sec-tolength
|
|
529
|
-
var toLength$1 = function (argument) {
|
|
530
|
-
var len = toIntegerOrInfinity(argument);
|
|
531
|
-
return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
532
|
-
};
|
|
533
|
-
|
|
534
|
-
var toLength = toLength$1;
|
|
535
|
-
|
|
536
|
-
// `LengthOfArrayLike` abstract operation
|
|
537
|
-
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
538
|
-
var lengthOfArrayLike$2 = function (obj) {
|
|
539
|
-
return toLength(obj.length);
|
|
540
|
-
};
|
|
541
|
-
|
|
542
|
-
var toIndexedObject$4 = toIndexedObject$5;
|
|
543
|
-
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
544
|
-
var lengthOfArrayLike$1 = lengthOfArrayLike$2;
|
|
545
|
-
|
|
546
|
-
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
547
|
-
var createMethod = function (IS_INCLUDES) {
|
|
548
|
-
return function ($this, el, fromIndex) {
|
|
549
|
-
var O = toIndexedObject$4($this);
|
|
550
|
-
var length = lengthOfArrayLike$1(O);
|
|
551
|
-
if (length === 0) return !IS_INCLUDES && -1;
|
|
552
|
-
var index = toAbsoluteIndex(fromIndex, length);
|
|
553
|
-
var value;
|
|
554
|
-
// Array#includes uses SameValueZero equality algorithm
|
|
555
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
556
|
-
if (IS_INCLUDES && el !== el) while (length > index) {
|
|
557
|
-
value = O[index++];
|
|
558
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
559
|
-
if (value !== value) return true;
|
|
560
|
-
// Array#indexOf ignores holes, Array#includes - not
|
|
561
|
-
} else for (;length > index; index++) {
|
|
562
|
-
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
563
|
-
} return !IS_INCLUDES && -1;
|
|
564
|
-
};
|
|
565
|
-
};
|
|
566
|
-
|
|
567
|
-
var arrayIncludes = {
|
|
568
|
-
// `Array.prototype.includes` method
|
|
569
|
-
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
570
|
-
includes: createMethod(true),
|
|
571
|
-
// `Array.prototype.indexOf` method
|
|
572
|
-
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
573
|
-
indexOf: createMethod(false)
|
|
574
|
-
};
|
|
575
|
-
|
|
576
|
-
var hiddenKeys$4 = {};
|
|
577
|
-
|
|
578
|
-
var uncurryThis$a = functionUncurryThis;
|
|
579
|
-
var hasOwn$8 = hasOwnProperty_1;
|
|
580
|
-
var toIndexedObject$3 = toIndexedObject$5;
|
|
581
|
-
var indexOf$1 = arrayIncludes.indexOf;
|
|
582
|
-
var hiddenKeys$3 = hiddenKeys$4;
|
|
583
|
-
|
|
584
|
-
var push = uncurryThis$a([].push);
|
|
585
|
-
|
|
586
|
-
var objectKeysInternal = function (object, names) {
|
|
587
|
-
var O = toIndexedObject$3(object);
|
|
588
|
-
var i = 0;
|
|
589
|
-
var result = [];
|
|
590
|
-
var key;
|
|
591
|
-
for (key in O) !hasOwn$8(hiddenKeys$3, key) && hasOwn$8(O, key) && push(result, key);
|
|
592
|
-
// Don't enum bug & hidden keys
|
|
593
|
-
while (names.length > i) if (hasOwn$8(O, key = names[i++])) {
|
|
594
|
-
~indexOf$1(result, key) || push(result, key);
|
|
595
|
-
}
|
|
596
|
-
return result;
|
|
597
|
-
};
|
|
598
|
-
|
|
599
|
-
// IE8- don't enum bug keys
|
|
600
|
-
var enumBugKeys$3 = [
|
|
601
|
-
'constructor',
|
|
602
|
-
'hasOwnProperty',
|
|
603
|
-
'isPrototypeOf',
|
|
604
|
-
'propertyIsEnumerable',
|
|
605
|
-
'toLocaleString',
|
|
606
|
-
'toString',
|
|
607
|
-
'valueOf'
|
|
608
|
-
];
|
|
609
|
-
|
|
610
|
-
var internalObjectKeys$1 = objectKeysInternal;
|
|
611
|
-
var enumBugKeys$2 = enumBugKeys$3;
|
|
612
|
-
|
|
613
|
-
// `Object.keys` method
|
|
614
|
-
// https://tc39.es/ecma262/#sec-object.keys
|
|
615
|
-
// eslint-disable-next-line es/no-object-keys -- safe
|
|
616
|
-
var objectKeys$2 = Object.keys || function keys(O) {
|
|
617
|
-
return internalObjectKeys$1(O, enumBugKeys$2);
|
|
618
|
-
};
|
|
619
|
-
|
|
620
|
-
var DESCRIPTORS$8 = descriptors;
|
|
621
|
-
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
622
|
-
var definePropertyModule$3 = objectDefineProperty;
|
|
623
|
-
var anObject$9 = anObject$b;
|
|
624
|
-
var toIndexedObject$2 = toIndexedObject$5;
|
|
625
|
-
var objectKeys$1 = objectKeys$2;
|
|
626
|
-
|
|
627
|
-
// `Object.defineProperties` method
|
|
628
|
-
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
629
|
-
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
630
|
-
objectDefineProperties.f = DESCRIPTORS$8 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
631
|
-
anObject$9(O);
|
|
632
|
-
var props = toIndexedObject$2(Properties);
|
|
633
|
-
var keys = objectKeys$1(Properties);
|
|
634
|
-
var length = keys.length;
|
|
635
|
-
var index = 0;
|
|
636
|
-
var key;
|
|
637
|
-
while (length > index) definePropertyModule$3.f(O, key = keys[index++], props[key]);
|
|
638
|
-
return O;
|
|
639
|
-
};
|
|
640
|
-
|
|
641
|
-
var getBuiltIn$5 = getBuiltIn$7;
|
|
642
|
-
|
|
643
|
-
var html$2 = getBuiltIn$5('document', 'documentElement');
|
|
644
|
-
|
|
645
|
-
var shared$2 = shared$4;
|
|
646
|
-
var uid = uid$2;
|
|
647
|
-
|
|
648
|
-
var keys = shared$2('keys');
|
|
649
|
-
|
|
650
|
-
var sharedKey$3 = function (key) {
|
|
651
|
-
return keys[key] || (keys[key] = uid(key));
|
|
652
|
-
};
|
|
653
|
-
|
|
654
|
-
/* global ActiveXObject -- old IE, WSH */
|
|
655
|
-
var anObject$8 = anObject$b;
|
|
656
|
-
var definePropertiesModule = objectDefineProperties;
|
|
657
|
-
var enumBugKeys$1 = enumBugKeys$3;
|
|
658
|
-
var hiddenKeys$2 = hiddenKeys$4;
|
|
659
|
-
var html$1 = html$2;
|
|
660
|
-
var documentCreateElement$1 = documentCreateElement$2;
|
|
661
|
-
var sharedKey$2 = sharedKey$3;
|
|
662
|
-
|
|
663
|
-
var GT = '>';
|
|
664
|
-
var LT = '<';
|
|
665
|
-
var PROTOTYPE = 'prototype';
|
|
666
|
-
var SCRIPT = 'script';
|
|
667
|
-
var IE_PROTO$1 = sharedKey$2('IE_PROTO');
|
|
668
|
-
|
|
669
|
-
var EmptyConstructor = function () { /* empty */ };
|
|
670
|
-
|
|
671
|
-
var scriptTag = function (content) {
|
|
672
|
-
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
673
|
-
};
|
|
674
|
-
|
|
675
|
-
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
676
|
-
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
677
|
-
activeXDocument.write(scriptTag(''));
|
|
678
|
-
activeXDocument.close();
|
|
679
|
-
var temp = activeXDocument.parentWindow.Object;
|
|
680
|
-
activeXDocument = null; // avoid memory leak
|
|
681
|
-
return temp;
|
|
682
|
-
};
|
|
683
|
-
|
|
684
|
-
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
685
|
-
var NullProtoObjectViaIFrame = function () {
|
|
686
|
-
// Thrash, waste and sodomy: IE GC bug
|
|
687
|
-
var iframe = documentCreateElement$1('iframe');
|
|
688
|
-
var JS = 'java' + SCRIPT + ':';
|
|
689
|
-
var iframeDocument;
|
|
690
|
-
iframe.style.display = 'none';
|
|
691
|
-
html$1.appendChild(iframe);
|
|
692
|
-
// https://github.com/zloirock/core-js/issues/475
|
|
693
|
-
iframe.src = String(JS);
|
|
694
|
-
iframeDocument = iframe.contentWindow.document;
|
|
695
|
-
iframeDocument.open();
|
|
696
|
-
iframeDocument.write(scriptTag('document.F=Object'));
|
|
697
|
-
iframeDocument.close();
|
|
698
|
-
return iframeDocument.F;
|
|
699
|
-
};
|
|
700
|
-
|
|
701
|
-
// Check for document.domain and active x support
|
|
702
|
-
// No need to use active x approach when document.domain is not set
|
|
703
|
-
// see https://github.com/es-shims/es5-shim/issues/150
|
|
704
|
-
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
705
|
-
// avoid IE GC bug
|
|
706
|
-
var activeXDocument;
|
|
707
|
-
var NullProtoObject = function () {
|
|
708
|
-
try {
|
|
709
|
-
activeXDocument = new ActiveXObject('htmlfile');
|
|
710
|
-
} catch (error) { /* ignore */ }
|
|
711
|
-
NullProtoObject = typeof document != 'undefined'
|
|
712
|
-
? document.domain && activeXDocument
|
|
713
|
-
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
714
|
-
: NullProtoObjectViaIFrame()
|
|
715
|
-
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
716
|
-
var length = enumBugKeys$1.length;
|
|
717
|
-
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys$1[length]];
|
|
718
|
-
return NullProtoObject();
|
|
719
|
-
};
|
|
720
|
-
|
|
721
|
-
hiddenKeys$2[IE_PROTO$1] = true;
|
|
722
|
-
|
|
723
|
-
// `Object.create` method
|
|
724
|
-
// https://tc39.es/ecma262/#sec-object.create
|
|
725
|
-
// eslint-disable-next-line es/no-object-create -- safe
|
|
726
|
-
var objectCreate = Object.create || function create(O, Properties) {
|
|
727
|
-
var result;
|
|
728
|
-
if (O !== null) {
|
|
729
|
-
EmptyConstructor[PROTOTYPE] = anObject$8(O);
|
|
730
|
-
result = new EmptyConstructor();
|
|
731
|
-
EmptyConstructor[PROTOTYPE] = null;
|
|
732
|
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
733
|
-
result[IE_PROTO$1] = O;
|
|
734
|
-
} else result = NullProtoObject();
|
|
735
|
-
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
736
|
-
};
|
|
737
|
-
|
|
738
|
-
var wellKnownSymbol$c = wellKnownSymbol$e;
|
|
739
|
-
var create$2 = objectCreate;
|
|
740
|
-
var defineProperty$5 = objectDefineProperty.f;
|
|
741
|
-
|
|
742
|
-
var UNSCOPABLES = wellKnownSymbol$c('unscopables');
|
|
743
|
-
var ArrayPrototype$1 = Array.prototype;
|
|
744
|
-
|
|
745
|
-
// Array.prototype[@@unscopables]
|
|
746
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
747
|
-
if (ArrayPrototype$1[UNSCOPABLES] === undefined) {
|
|
748
|
-
defineProperty$5(ArrayPrototype$1, UNSCOPABLES, {
|
|
749
|
-
configurable: true,
|
|
750
|
-
value: create$2(null)
|
|
751
|
-
});
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
// add a key to Array.prototype[@@unscopables]
|
|
755
|
-
var addToUnscopables$1 = function (key) {
|
|
756
|
-
ArrayPrototype$1[UNSCOPABLES][key] = true;
|
|
757
|
-
};
|
|
758
|
-
|
|
759
|
-
var iterators = {};
|
|
760
|
-
|
|
761
|
-
var global$e = global$l;
|
|
762
|
-
var isCallable$e = isCallable$k;
|
|
763
|
-
|
|
764
|
-
var WeakMap$1 = global$e.WeakMap;
|
|
765
|
-
|
|
766
|
-
var weakMapBasicDetection = isCallable$e(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
767
|
-
|
|
768
|
-
var createPropertyDescriptor$3 = function (bitmap, value) {
|
|
769
|
-
return {
|
|
770
|
-
enumerable: !(bitmap & 1),
|
|
771
|
-
configurable: !(bitmap & 2),
|
|
772
|
-
writable: !(bitmap & 4),
|
|
773
|
-
value: value
|
|
774
|
-
};
|
|
775
|
-
};
|
|
776
|
-
|
|
777
|
-
var DESCRIPTORS$7 = descriptors;
|
|
778
|
-
var definePropertyModule$2 = objectDefineProperty;
|
|
779
|
-
var createPropertyDescriptor$2 = createPropertyDescriptor$3;
|
|
780
|
-
|
|
781
|
-
var createNonEnumerableProperty$4 = DESCRIPTORS$7 ? function (object, key, value) {
|
|
782
|
-
return definePropertyModule$2.f(object, key, createPropertyDescriptor$2(1, value));
|
|
783
|
-
} : function (object, key, value) {
|
|
784
|
-
object[key] = value;
|
|
785
|
-
return object;
|
|
786
|
-
};
|
|
787
|
-
|
|
788
|
-
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
789
|
-
var global$d = global$l;
|
|
790
|
-
var isObject$5 = isObject$a;
|
|
791
|
-
var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
|
|
792
|
-
var hasOwn$7 = hasOwnProperty_1;
|
|
793
|
-
var shared$1 = sharedStoreExports;
|
|
794
|
-
var sharedKey$1 = sharedKey$3;
|
|
795
|
-
var hiddenKeys$1 = hiddenKeys$4;
|
|
796
|
-
|
|
797
|
-
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
798
|
-
var TypeError$2 = global$d.TypeError;
|
|
799
|
-
var WeakMap = global$d.WeakMap;
|
|
800
|
-
var set$1, get, has;
|
|
801
|
-
|
|
802
|
-
var enforce = function (it) {
|
|
803
|
-
return has(it) ? get(it) : set$1(it, {});
|
|
804
|
-
};
|
|
805
|
-
|
|
806
|
-
var getterFor = function (TYPE) {
|
|
807
|
-
return function (it) {
|
|
808
|
-
var state;
|
|
809
|
-
if (!isObject$5(it) || (state = get(it)).type !== TYPE) {
|
|
810
|
-
throw new TypeError$2('Incompatible receiver, ' + TYPE + ' required');
|
|
811
|
-
} return state;
|
|
812
|
-
};
|
|
813
|
-
};
|
|
814
|
-
|
|
815
|
-
if (NATIVE_WEAK_MAP || shared$1.state) {
|
|
816
|
-
var store$1 = shared$1.state || (shared$1.state = new WeakMap());
|
|
817
|
-
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
818
|
-
store$1.get = store$1.get;
|
|
819
|
-
store$1.has = store$1.has;
|
|
820
|
-
store$1.set = store$1.set;
|
|
821
|
-
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
822
|
-
set$1 = function (it, metadata) {
|
|
823
|
-
if (store$1.has(it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
824
|
-
metadata.facade = it;
|
|
825
|
-
store$1.set(it, metadata);
|
|
826
|
-
return metadata;
|
|
827
|
-
};
|
|
828
|
-
get = function (it) {
|
|
829
|
-
return store$1.get(it) || {};
|
|
830
|
-
};
|
|
831
|
-
has = function (it) {
|
|
832
|
-
return store$1.has(it);
|
|
833
|
-
};
|
|
834
|
-
} else {
|
|
835
|
-
var STATE = sharedKey$1('state');
|
|
836
|
-
hiddenKeys$1[STATE] = true;
|
|
837
|
-
set$1 = function (it, metadata) {
|
|
838
|
-
if (hasOwn$7(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
839
|
-
metadata.facade = it;
|
|
840
|
-
createNonEnumerableProperty$3(it, STATE, metadata);
|
|
841
|
-
return metadata;
|
|
842
|
-
};
|
|
843
|
-
get = function (it) {
|
|
844
|
-
return hasOwn$7(it, STATE) ? it[STATE] : {};
|
|
845
|
-
};
|
|
846
|
-
has = function (it) {
|
|
847
|
-
return hasOwn$7(it, STATE);
|
|
848
|
-
};
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
var internalState = {
|
|
852
|
-
set: set$1,
|
|
853
|
-
get: get,
|
|
854
|
-
has: has,
|
|
855
|
-
enforce: enforce,
|
|
856
|
-
getterFor: getterFor
|
|
857
|
-
};
|
|
858
|
-
|
|
859
|
-
var objectGetOwnPropertyDescriptor = {};
|
|
860
|
-
|
|
861
|
-
var objectPropertyIsEnumerable = {};
|
|
862
|
-
|
|
863
|
-
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
864
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
865
|
-
var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
|
|
866
|
-
|
|
867
|
-
// Nashorn ~ JDK8 bug
|
|
868
|
-
var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
869
|
-
|
|
870
|
-
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
871
|
-
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
872
|
-
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
873
|
-
var descriptor = getOwnPropertyDescriptor$2(this, V);
|
|
874
|
-
return !!descriptor && descriptor.enumerable;
|
|
875
|
-
} : $propertyIsEnumerable;
|
|
876
|
-
|
|
877
|
-
var DESCRIPTORS$6 = descriptors;
|
|
878
|
-
var call$b = functionCall;
|
|
879
|
-
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
880
|
-
var createPropertyDescriptor$1 = createPropertyDescriptor$3;
|
|
881
|
-
var toIndexedObject$1 = toIndexedObject$5;
|
|
882
|
-
var toPropertyKey = toPropertyKey$2;
|
|
883
|
-
var hasOwn$6 = hasOwnProperty_1;
|
|
884
|
-
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
885
|
-
|
|
886
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
887
|
-
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
888
|
-
|
|
889
|
-
// `Object.getOwnPropertyDescriptor` method
|
|
890
|
-
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
891
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$6 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
892
|
-
O = toIndexedObject$1(O);
|
|
893
|
-
P = toPropertyKey(P);
|
|
894
|
-
if (IE8_DOM_DEFINE) try {
|
|
895
|
-
return $getOwnPropertyDescriptor(O, P);
|
|
896
|
-
} catch (error) { /* empty */ }
|
|
897
|
-
if (hasOwn$6(O, P)) return createPropertyDescriptor$1(!call$b(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
898
|
-
};
|
|
899
|
-
|
|
900
|
-
var makeBuiltIn$3 = {exports: {}};
|
|
901
|
-
|
|
902
|
-
var DESCRIPTORS$5 = descriptors;
|
|
903
|
-
var hasOwn$5 = hasOwnProperty_1;
|
|
904
|
-
|
|
905
|
-
var FunctionPrototype$1 = Function.prototype;
|
|
906
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
907
|
-
var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
|
|
908
|
-
|
|
909
|
-
var EXISTS = hasOwn$5(FunctionPrototype$1, 'name');
|
|
910
|
-
// additional protection from minified / mangled / dropped function names
|
|
911
|
-
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
912
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
913
|
-
|
|
914
|
-
var functionName = {
|
|
915
|
-
EXISTS: EXISTS,
|
|
916
|
-
PROPER: PROPER,
|
|
917
|
-
CONFIGURABLE: CONFIGURABLE
|
|
918
|
-
};
|
|
919
|
-
|
|
920
|
-
var uncurryThis$9 = functionUncurryThis;
|
|
921
|
-
var isCallable$d = isCallable$k;
|
|
922
|
-
var store = sharedStoreExports;
|
|
923
|
-
|
|
924
|
-
var functionToString = uncurryThis$9(Function.toString);
|
|
925
|
-
|
|
926
|
-
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
927
|
-
if (!isCallable$d(store.inspectSource)) {
|
|
928
|
-
store.inspectSource = function (it) {
|
|
929
|
-
return functionToString(it);
|
|
930
|
-
};
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
var inspectSource$3 = store.inspectSource;
|
|
934
|
-
|
|
935
|
-
var uncurryThis$8 = functionUncurryThis;
|
|
936
|
-
var fails$9 = fails$g;
|
|
937
|
-
var isCallable$c = isCallable$k;
|
|
938
|
-
var hasOwn$4 = hasOwnProperty_1;
|
|
939
|
-
var DESCRIPTORS$4 = descriptors;
|
|
940
|
-
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
941
|
-
var inspectSource$2 = inspectSource$3;
|
|
942
|
-
var InternalStateModule$2 = internalState;
|
|
943
|
-
|
|
944
|
-
var enforceInternalState = InternalStateModule$2.enforce;
|
|
945
|
-
var getInternalState$2 = InternalStateModule$2.get;
|
|
946
|
-
var $String$2 = String;
|
|
947
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
948
|
-
var defineProperty$4 = Object.defineProperty;
|
|
949
|
-
var stringSlice$1 = uncurryThis$8(''.slice);
|
|
950
|
-
var replace$1 = uncurryThis$8(''.replace);
|
|
951
|
-
var join = uncurryThis$8([].join);
|
|
952
|
-
|
|
953
|
-
var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$9(function () {
|
|
954
|
-
return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
955
|
-
});
|
|
956
|
-
|
|
957
|
-
var TEMPLATE = String(String).split('String');
|
|
958
|
-
|
|
959
|
-
var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
|
|
960
|
-
if (stringSlice$1($String$2(name), 0, 7) === 'Symbol(') {
|
|
961
|
-
name = '[' + replace$1($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
962
|
-
}
|
|
963
|
-
if (options && options.getter) name = 'get ' + name;
|
|
964
|
-
if (options && options.setter) name = 'set ' + name;
|
|
965
|
-
if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
966
|
-
if (DESCRIPTORS$4) defineProperty$4(value, 'name', { value: name, configurable: true });
|
|
967
|
-
else value.name = name;
|
|
968
|
-
}
|
|
969
|
-
if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
|
|
970
|
-
defineProperty$4(value, 'length', { value: options.arity });
|
|
971
|
-
}
|
|
972
|
-
try {
|
|
973
|
-
if (options && hasOwn$4(options, 'constructor') && options.constructor) {
|
|
974
|
-
if (DESCRIPTORS$4) defineProperty$4(value, 'prototype', { writable: false });
|
|
975
|
-
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
976
|
-
} else if (value.prototype) value.prototype = undefined;
|
|
977
|
-
} catch (error) { /* empty */ }
|
|
978
|
-
var state = enforceInternalState(value);
|
|
979
|
-
if (!hasOwn$4(state, 'source')) {
|
|
980
|
-
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
|
|
981
|
-
} return value;
|
|
982
|
-
};
|
|
983
|
-
|
|
984
|
-
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
985
|
-
// eslint-disable-next-line no-extend-native -- required
|
|
986
|
-
Function.prototype.toString = makeBuiltIn$2(function toString() {
|
|
987
|
-
return isCallable$c(this) && getInternalState$2(this).source || inspectSource$2(this);
|
|
988
|
-
}, 'toString');
|
|
989
|
-
|
|
990
|
-
var makeBuiltInExports = makeBuiltIn$3.exports;
|
|
991
|
-
|
|
992
|
-
var isCallable$b = isCallable$k;
|
|
993
|
-
var definePropertyModule$1 = objectDefineProperty;
|
|
994
|
-
var makeBuiltIn$1 = makeBuiltInExports;
|
|
995
|
-
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
996
|
-
|
|
997
|
-
var defineBuiltIn$5 = function (O, key, value, options) {
|
|
998
|
-
if (!options) options = {};
|
|
999
|
-
var simple = options.enumerable;
|
|
1000
|
-
var name = options.name !== undefined ? options.name : key;
|
|
1001
|
-
if (isCallable$b(value)) makeBuiltIn$1(value, name, options);
|
|
1002
|
-
if (options.global) {
|
|
1003
|
-
if (simple) O[key] = value;
|
|
1004
|
-
else defineGlobalProperty$1(key, value);
|
|
1005
|
-
} else {
|
|
1006
|
-
try {
|
|
1007
|
-
if (!options.unsafe) delete O[key];
|
|
1008
|
-
else if (O[key]) simple = true;
|
|
1009
|
-
} catch (error) { /* empty */ }
|
|
1010
|
-
if (simple) O[key] = value;
|
|
1011
|
-
else definePropertyModule$1.f(O, key, {
|
|
1012
|
-
value: value,
|
|
1013
|
-
enumerable: false,
|
|
1014
|
-
configurable: !options.nonConfigurable,
|
|
1015
|
-
writable: !options.nonWritable
|
|
1016
|
-
});
|
|
1017
|
-
} return O;
|
|
1018
|
-
};
|
|
1019
|
-
|
|
1020
|
-
var objectGetOwnPropertyNames = {};
|
|
1021
|
-
|
|
1022
|
-
var internalObjectKeys = objectKeysInternal;
|
|
1023
|
-
var enumBugKeys = enumBugKeys$3;
|
|
1024
|
-
|
|
1025
|
-
var hiddenKeys = enumBugKeys.concat('length', 'prototype');
|
|
1026
|
-
|
|
1027
|
-
// `Object.getOwnPropertyNames` method
|
|
1028
|
-
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
1029
|
-
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
1030
|
-
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
1031
|
-
return internalObjectKeys(O, hiddenKeys);
|
|
1032
|
-
};
|
|
1033
|
-
|
|
1034
|
-
var objectGetOwnPropertySymbols = {};
|
|
1035
|
-
|
|
1036
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
1037
|
-
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
1038
|
-
|
|
1039
|
-
var getBuiltIn$4 = getBuiltIn$7;
|
|
1040
|
-
var uncurryThis$7 = functionUncurryThis;
|
|
1041
|
-
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
1042
|
-
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
1043
|
-
var anObject$7 = anObject$b;
|
|
1044
|
-
|
|
1045
|
-
var concat$1 = uncurryThis$7([].concat);
|
|
1046
|
-
|
|
1047
|
-
// all object keys, includes non-enumerable and symbols
|
|
1048
|
-
var ownKeys$1 = getBuiltIn$4('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
1049
|
-
var keys = getOwnPropertyNamesModule.f(anObject$7(it));
|
|
1050
|
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
1051
|
-
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
1052
|
-
};
|
|
1053
|
-
|
|
1054
|
-
var hasOwn$3 = hasOwnProperty_1;
|
|
1055
|
-
var ownKeys = ownKeys$1;
|
|
1056
|
-
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
1057
|
-
var definePropertyModule = objectDefineProperty;
|
|
1058
|
-
|
|
1059
|
-
var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
1060
|
-
var keys = ownKeys(source);
|
|
1061
|
-
var defineProperty = definePropertyModule.f;
|
|
1062
|
-
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
1063
|
-
for (var i = 0; i < keys.length; i++) {
|
|
1064
|
-
var key = keys[i];
|
|
1065
|
-
if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
|
|
1066
|
-
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
1067
|
-
}
|
|
1068
|
-
}
|
|
1069
|
-
};
|
|
1070
|
-
|
|
1071
|
-
var fails$8 = fails$g;
|
|
1072
|
-
var isCallable$a = isCallable$k;
|
|
1073
|
-
|
|
1074
|
-
var replacement = /#|\.prototype\./;
|
|
1075
|
-
|
|
1076
|
-
var isForced$2 = function (feature, detection) {
|
|
1077
|
-
var value = data[normalize(feature)];
|
|
1078
|
-
return value === POLYFILL ? true
|
|
1079
|
-
: value === NATIVE ? false
|
|
1080
|
-
: isCallable$a(detection) ? fails$8(detection)
|
|
1081
|
-
: !!detection;
|
|
1082
|
-
};
|
|
1083
|
-
|
|
1084
|
-
var normalize = isForced$2.normalize = function (string) {
|
|
1085
|
-
return String(string).replace(replacement, '.').toLowerCase();
|
|
1086
|
-
};
|
|
1087
|
-
|
|
1088
|
-
var data = isForced$2.data = {};
|
|
1089
|
-
var NATIVE = isForced$2.NATIVE = 'N';
|
|
1090
|
-
var POLYFILL = isForced$2.POLYFILL = 'P';
|
|
1091
|
-
|
|
1092
|
-
var isForced_1 = isForced$2;
|
|
1093
|
-
|
|
1094
|
-
var global$c = global$l;
|
|
1095
|
-
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
1096
|
-
var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
|
|
1097
|
-
var defineBuiltIn$4 = defineBuiltIn$5;
|
|
1098
|
-
var defineGlobalProperty = defineGlobalProperty$3;
|
|
1099
|
-
var copyConstructorProperties = copyConstructorProperties$1;
|
|
1100
|
-
var isForced$1 = isForced_1;
|
|
1101
|
-
|
|
1102
|
-
/*
|
|
1103
|
-
options.target - name of the target object
|
|
1104
|
-
options.global - target is the global object
|
|
1105
|
-
options.stat - export as static methods of target
|
|
1106
|
-
options.proto - export as prototype methods of target
|
|
1107
|
-
options.real - real prototype method for the `pure` version
|
|
1108
|
-
options.forced - export even if the native feature is available
|
|
1109
|
-
options.bind - bind methods to the target, required for the `pure` version
|
|
1110
|
-
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
1111
|
-
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
1112
|
-
options.sham - add a flag to not completely full polyfills
|
|
1113
|
-
options.enumerable - export as enumerable property
|
|
1114
|
-
options.dontCallGetSet - prevent calling a getter on target
|
|
1115
|
-
options.name - the .name of the function if it does not match the key
|
|
1116
|
-
*/
|
|
1117
|
-
var _export = function (options, source) {
|
|
1118
|
-
var TARGET = options.target;
|
|
1119
|
-
var GLOBAL = options.global;
|
|
1120
|
-
var STATIC = options.stat;
|
|
1121
|
-
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
1122
|
-
if (GLOBAL) {
|
|
1123
|
-
target = global$c;
|
|
1124
|
-
} else if (STATIC) {
|
|
1125
|
-
target = global$c[TARGET] || defineGlobalProperty(TARGET, {});
|
|
1126
|
-
} else {
|
|
1127
|
-
target = global$c[TARGET] && global$c[TARGET].prototype;
|
|
1128
|
-
}
|
|
1129
|
-
if (target) for (key in source) {
|
|
1130
|
-
sourceProperty = source[key];
|
|
1131
|
-
if (options.dontCallGetSet) {
|
|
1132
|
-
descriptor = getOwnPropertyDescriptor$1(target, key);
|
|
1133
|
-
targetProperty = descriptor && descriptor.value;
|
|
1134
|
-
} else targetProperty = target[key];
|
|
1135
|
-
FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
1136
|
-
// contained in target
|
|
1137
|
-
if (!FORCED && targetProperty !== undefined) {
|
|
1138
|
-
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
1139
|
-
copyConstructorProperties(sourceProperty, targetProperty);
|
|
1140
|
-
}
|
|
1141
|
-
// add a flag to not completely full polyfills
|
|
1142
|
-
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
1143
|
-
createNonEnumerableProperty$2(sourceProperty, 'sham', true);
|
|
1144
|
-
}
|
|
1145
|
-
defineBuiltIn$4(target, key, sourceProperty, options);
|
|
1146
|
-
}
|
|
1147
|
-
};
|
|
1148
|
-
|
|
1149
|
-
var fails$7 = fails$g;
|
|
1150
|
-
|
|
1151
|
-
var correctPrototypeGetter = !fails$7(function () {
|
|
1152
|
-
function F() { /* empty */ }
|
|
1153
|
-
F.prototype.constructor = null;
|
|
1154
|
-
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
1155
|
-
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
1156
|
-
});
|
|
1157
|
-
|
|
1158
|
-
var hasOwn$2 = hasOwnProperty_1;
|
|
1159
|
-
var isCallable$9 = isCallable$k;
|
|
1160
|
-
var toObject$1 = toObject$3;
|
|
1161
|
-
var sharedKey = sharedKey$3;
|
|
1162
|
-
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
1163
|
-
|
|
1164
|
-
var IE_PROTO = sharedKey('IE_PROTO');
|
|
1165
|
-
var $Object$1 = Object;
|
|
1166
|
-
var ObjectPrototype = $Object$1.prototype;
|
|
1167
|
-
|
|
1168
|
-
// `Object.getPrototypeOf` method
|
|
1169
|
-
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1170
|
-
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
1171
|
-
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
|
|
1172
|
-
var object = toObject$1(O);
|
|
1173
|
-
if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO];
|
|
1174
|
-
var constructor = object.constructor;
|
|
1175
|
-
if (isCallable$9(constructor) && object instanceof constructor) {
|
|
1176
|
-
return constructor.prototype;
|
|
1177
|
-
} return object instanceof $Object$1 ? ObjectPrototype : null;
|
|
1178
|
-
};
|
|
1179
|
-
|
|
1180
|
-
var fails$6 = fails$g;
|
|
1181
|
-
var isCallable$8 = isCallable$k;
|
|
1182
|
-
var isObject$4 = isObject$a;
|
|
1183
|
-
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
1184
|
-
var defineBuiltIn$3 = defineBuiltIn$5;
|
|
1185
|
-
var wellKnownSymbol$b = wellKnownSymbol$e;
|
|
1186
|
-
|
|
1187
|
-
var ITERATOR$5 = wellKnownSymbol$b('iterator');
|
|
1188
|
-
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
1189
|
-
|
|
1190
|
-
// `%IteratorPrototype%` object
|
|
1191
|
-
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
1192
|
-
var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
1193
|
-
|
|
1194
|
-
/* eslint-disable es/no-array-prototype-keys -- safe */
|
|
1195
|
-
if ([].keys) {
|
|
1196
|
-
arrayIterator = [].keys();
|
|
1197
|
-
// Safari 8 has buggy iterators w/o `next`
|
|
1198
|
-
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
|
|
1199
|
-
else {
|
|
1200
|
-
PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
|
|
1201
|
-
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
|
|
1202
|
-
}
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1205
|
-
var NEW_ITERATOR_PROTOTYPE = !isObject$4(IteratorPrototype$2) || fails$6(function () {
|
|
1206
|
-
var test = {};
|
|
1207
|
-
// FF44- legacy iterators case
|
|
1208
|
-
return IteratorPrototype$2[ITERATOR$5].call(test) !== test;
|
|
1209
|
-
});
|
|
1210
|
-
|
|
1211
|
-
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
|
|
1212
|
-
|
|
1213
|
-
// `%IteratorPrototype%[@@iterator]()` method
|
|
1214
|
-
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
1215
|
-
if (!isCallable$8(IteratorPrototype$2[ITERATOR$5])) {
|
|
1216
|
-
defineBuiltIn$3(IteratorPrototype$2, ITERATOR$5, function () {
|
|
1217
|
-
return this;
|
|
1218
|
-
});
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
var iteratorsCore = {
|
|
1222
|
-
IteratorPrototype: IteratorPrototype$2,
|
|
1223
|
-
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
1224
|
-
};
|
|
1225
|
-
|
|
1226
|
-
var defineProperty$3 = objectDefineProperty.f;
|
|
1227
|
-
var hasOwn$1 = hasOwnProperty_1;
|
|
1228
|
-
var wellKnownSymbol$a = wellKnownSymbol$e;
|
|
1229
|
-
|
|
1230
|
-
var TO_STRING_TAG$2 = wellKnownSymbol$a('toStringTag');
|
|
1231
|
-
|
|
1232
|
-
var setToStringTag$4 = function (target, TAG, STATIC) {
|
|
1233
|
-
if (target && !STATIC) target = target.prototype;
|
|
1234
|
-
if (target && !hasOwn$1(target, TO_STRING_TAG$2)) {
|
|
1235
|
-
defineProperty$3(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
|
|
1236
|
-
}
|
|
1237
|
-
};
|
|
1238
|
-
|
|
1239
|
-
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
|
1240
|
-
var create$1 = objectCreate;
|
|
1241
|
-
var createPropertyDescriptor = createPropertyDescriptor$3;
|
|
1242
|
-
var setToStringTag$3 = setToStringTag$4;
|
|
1243
|
-
var Iterators$4 = iterators;
|
|
1244
|
-
|
|
1245
|
-
var returnThis$1 = function () { return this; };
|
|
1246
|
-
|
|
1247
|
-
var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
1248
|
-
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1249
|
-
IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
|
|
1250
|
-
setToStringTag$3(IteratorConstructor, TO_STRING_TAG, false);
|
|
1251
|
-
Iterators$4[TO_STRING_TAG] = returnThis$1;
|
|
1252
|
-
return IteratorConstructor;
|
|
1253
|
-
};
|
|
1254
|
-
|
|
1255
|
-
var uncurryThis$6 = functionUncurryThis;
|
|
1256
|
-
var aCallable$6 = aCallable$8;
|
|
1257
|
-
|
|
1258
|
-
var functionUncurryThisAccessor = function (object, key, method) {
|
|
1259
|
-
try {
|
|
1260
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1261
|
-
return uncurryThis$6(aCallable$6(Object.getOwnPropertyDescriptor(object, key)[method]));
|
|
1262
|
-
} catch (error) { /* empty */ }
|
|
1263
|
-
};
|
|
1264
|
-
|
|
1265
|
-
var isObject$3 = isObject$a;
|
|
1266
|
-
|
|
1267
|
-
var isPossiblePrototype$1 = function (argument) {
|
|
1268
|
-
return isObject$3(argument) || argument === null;
|
|
1269
|
-
};
|
|
1270
|
-
|
|
1271
|
-
var isPossiblePrototype = isPossiblePrototype$1;
|
|
1272
|
-
|
|
1273
|
-
var $String$1 = String;
|
|
1274
|
-
var $TypeError$6 = TypeError;
|
|
1275
|
-
|
|
1276
|
-
var aPossiblePrototype$1 = function (argument) {
|
|
1277
|
-
if (isPossiblePrototype(argument)) return argument;
|
|
1278
|
-
throw new $TypeError$6("Can't set " + $String$1(argument) + ' as a prototype');
|
|
1279
|
-
};
|
|
1280
|
-
|
|
1281
|
-
/* eslint-disable no-proto -- safe */
|
|
1282
|
-
var uncurryThisAccessor = functionUncurryThisAccessor;
|
|
1283
|
-
var isObject$2 = isObject$a;
|
|
1284
|
-
var requireObjectCoercible = requireObjectCoercible$3;
|
|
1285
|
-
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1286
|
-
|
|
1287
|
-
// `Object.setPrototypeOf` method
|
|
1288
|
-
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
1289
|
-
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
1290
|
-
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
1291
|
-
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
1292
|
-
var CORRECT_SETTER = false;
|
|
1293
|
-
var test = {};
|
|
1294
|
-
var setter;
|
|
1295
|
-
try {
|
|
1296
|
-
setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
|
|
1297
|
-
setter(test, []);
|
|
1298
|
-
CORRECT_SETTER = test instanceof Array;
|
|
1299
|
-
} catch (error) { /* empty */ }
|
|
1300
|
-
return function setPrototypeOf(O, proto) {
|
|
1301
|
-
requireObjectCoercible(O);
|
|
1302
|
-
aPossiblePrototype(proto);
|
|
1303
|
-
if (!isObject$2(O)) return O;
|
|
1304
|
-
if (CORRECT_SETTER) setter(O, proto);
|
|
1305
|
-
else O.__proto__ = proto;
|
|
1306
|
-
return O;
|
|
1307
|
-
};
|
|
1308
|
-
}() : undefined);
|
|
1309
|
-
|
|
1310
|
-
var $$9 = _export;
|
|
1311
|
-
var call$a = functionCall;
|
|
1312
|
-
var FunctionName = functionName;
|
|
1313
|
-
var isCallable$7 = isCallable$k;
|
|
1314
|
-
var createIteratorConstructor = iteratorCreateConstructor;
|
|
1315
|
-
var getPrototypeOf = objectGetPrototypeOf;
|
|
1316
|
-
var setPrototypeOf$1 = objectSetPrototypeOf;
|
|
1317
|
-
var setToStringTag$2 = setToStringTag$4;
|
|
1318
|
-
var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
|
|
1319
|
-
var defineBuiltIn$2 = defineBuiltIn$5;
|
|
1320
|
-
var wellKnownSymbol$9 = wellKnownSymbol$e;
|
|
1321
|
-
var Iterators$3 = iterators;
|
|
1322
|
-
var IteratorsCore = iteratorsCore;
|
|
1323
|
-
|
|
1324
|
-
var PROPER_FUNCTION_NAME = FunctionName.PROPER;
|
|
1325
|
-
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
|
1326
|
-
var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
|
1327
|
-
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
1328
|
-
var ITERATOR$4 = wellKnownSymbol$9('iterator');
|
|
1329
|
-
var KEYS = 'keys';
|
|
1330
|
-
var VALUES = 'values';
|
|
1331
|
-
var ENTRIES = 'entries';
|
|
1332
|
-
|
|
1333
|
-
var returnThis = function () { return this; };
|
|
1334
|
-
|
|
1335
|
-
var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
|
|
1336
|
-
createIteratorConstructor(IteratorConstructor, NAME, next);
|
|
1337
|
-
|
|
1338
|
-
var getIterationMethod = function (KIND) {
|
|
1339
|
-
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
|
|
1340
|
-
if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
|
|
1341
|
-
|
|
1342
|
-
switch (KIND) {
|
|
1343
|
-
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
|
|
1344
|
-
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
|
|
1345
|
-
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
|
|
1346
|
-
}
|
|
1347
|
-
|
|
1348
|
-
return function () { return new IteratorConstructor(this); };
|
|
1349
|
-
};
|
|
1350
|
-
|
|
1351
|
-
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1352
|
-
var INCORRECT_VALUES_NAME = false;
|
|
1353
|
-
var IterablePrototype = Iterable.prototype;
|
|
1354
|
-
var nativeIterator = IterablePrototype[ITERATOR$4]
|
|
1355
|
-
|| IterablePrototype['@@iterator']
|
|
1356
|
-
|| DEFAULT && IterablePrototype[DEFAULT];
|
|
1357
|
-
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
|
|
1358
|
-
var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
|
|
1359
|
-
var CurrentIteratorPrototype, methods, KEY;
|
|
1360
|
-
|
|
1361
|
-
// fix native
|
|
1362
|
-
if (anyNativeIterator) {
|
|
1363
|
-
CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
|
|
1364
|
-
if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
|
|
1365
|
-
if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
|
|
1366
|
-
if (setPrototypeOf$1) {
|
|
1367
|
-
setPrototypeOf$1(CurrentIteratorPrototype, IteratorPrototype);
|
|
1368
|
-
} else if (!isCallable$7(CurrentIteratorPrototype[ITERATOR$4])) {
|
|
1369
|
-
defineBuiltIn$2(CurrentIteratorPrototype, ITERATOR$4, returnThis);
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
// Set @@toStringTag to native iterators
|
|
1373
|
-
setToStringTag$2(CurrentIteratorPrototype, TO_STRING_TAG, true);
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1376
|
-
|
|
1377
|
-
// fix Array.prototype.{ values, @@iterator }.name in V8 / FF
|
|
1378
|
-
if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
1379
|
-
if (CONFIGURABLE_FUNCTION_NAME) {
|
|
1380
|
-
createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
|
|
1381
|
-
} else {
|
|
1382
|
-
INCORRECT_VALUES_NAME = true;
|
|
1383
|
-
defaultIterator = function values() { return call$a(nativeIterator, this); };
|
|
1384
|
-
}
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
// export additional methods
|
|
1388
|
-
if (DEFAULT) {
|
|
1389
|
-
methods = {
|
|
1390
|
-
values: getIterationMethod(VALUES),
|
|
1391
|
-
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
|
|
1392
|
-
entries: getIterationMethod(ENTRIES)
|
|
1393
|
-
};
|
|
1394
|
-
if (FORCED) for (KEY in methods) {
|
|
1395
|
-
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1396
|
-
defineBuiltIn$2(IterablePrototype, KEY, methods[KEY]);
|
|
1397
|
-
}
|
|
1398
|
-
} else $$9({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
1399
|
-
}
|
|
1400
|
-
|
|
1401
|
-
// define iterator
|
|
1402
|
-
if (IterablePrototype[ITERATOR$4] !== defaultIterator) {
|
|
1403
|
-
defineBuiltIn$2(IterablePrototype, ITERATOR$4, defaultIterator, { name: DEFAULT });
|
|
1404
|
-
}
|
|
1405
|
-
Iterators$3[NAME] = defaultIterator;
|
|
1406
|
-
|
|
1407
|
-
return methods;
|
|
1408
|
-
};
|
|
1409
|
-
|
|
1410
|
-
// `CreateIterResultObject` abstract operation
|
|
1411
|
-
// https://tc39.es/ecma262/#sec-createiterresultobject
|
|
1412
|
-
var createIterResultObject$1 = function (value, done) {
|
|
1413
|
-
return { value: value, done: done };
|
|
1414
|
-
};
|
|
1415
|
-
|
|
1416
|
-
var toIndexedObject = toIndexedObject$5;
|
|
1417
|
-
var addToUnscopables = addToUnscopables$1;
|
|
1418
|
-
var Iterators$2 = iterators;
|
|
1419
|
-
var InternalStateModule$1 = internalState;
|
|
1420
|
-
var defineProperty$2 = objectDefineProperty.f;
|
|
1421
|
-
var defineIterator = iteratorDefine;
|
|
1422
|
-
var createIterResultObject = createIterResultObject$1;
|
|
1423
|
-
var DESCRIPTORS$3 = descriptors;
|
|
1424
|
-
|
|
1425
|
-
var ARRAY_ITERATOR = 'Array Iterator';
|
|
1426
|
-
var setInternalState$1 = InternalStateModule$1.set;
|
|
1427
|
-
var getInternalState$1 = InternalStateModule$1.getterFor(ARRAY_ITERATOR);
|
|
1428
|
-
|
|
1429
|
-
// `Array.prototype.entries` method
|
|
1430
|
-
// https://tc39.es/ecma262/#sec-array.prototype.entries
|
|
1431
|
-
// `Array.prototype.keys` method
|
|
1432
|
-
// https://tc39.es/ecma262/#sec-array.prototype.keys
|
|
1433
|
-
// `Array.prototype.values` method
|
|
1434
|
-
// https://tc39.es/ecma262/#sec-array.prototype.values
|
|
1435
|
-
// `Array.prototype[@@iterator]` method
|
|
1436
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
|
|
1437
|
-
// `CreateArrayIterator` internal method
|
|
1438
|
-
// https://tc39.es/ecma262/#sec-createarrayiterator
|
|
1439
|
-
var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
|
|
1440
|
-
setInternalState$1(this, {
|
|
1441
|
-
type: ARRAY_ITERATOR,
|
|
1442
|
-
target: toIndexedObject(iterated), // target
|
|
1443
|
-
index: 0, // next index
|
|
1444
|
-
kind: kind // kind
|
|
1445
|
-
});
|
|
1446
|
-
// `%ArrayIteratorPrototype%.next` method
|
|
1447
|
-
// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
|
|
1448
|
-
}, function () {
|
|
1449
|
-
var state = getInternalState$1(this);
|
|
1450
|
-
var target = state.target;
|
|
1451
|
-
var index = state.index++;
|
|
1452
|
-
if (!target || index >= target.length) {
|
|
1453
|
-
state.target = undefined;
|
|
1454
|
-
return createIterResultObject(undefined, true);
|
|
1455
|
-
}
|
|
1456
|
-
switch (state.kind) {
|
|
1457
|
-
case 'keys': return createIterResultObject(index, false);
|
|
1458
|
-
case 'values': return createIterResultObject(target[index], false);
|
|
1459
|
-
} return createIterResultObject([index, target[index]], false);
|
|
1460
|
-
}, 'values');
|
|
1461
|
-
|
|
1462
|
-
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
1463
|
-
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
|
|
1464
|
-
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
|
|
1465
|
-
var values = Iterators$2.Arguments = Iterators$2.Array;
|
|
1466
|
-
|
|
1467
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1468
|
-
addToUnscopables('keys');
|
|
1469
|
-
addToUnscopables('values');
|
|
1470
|
-
addToUnscopables('entries');
|
|
1471
|
-
|
|
1472
|
-
// V8 ~ Chrome 45- bug
|
|
1473
|
-
if (DESCRIPTORS$3 && values.name !== 'values') try {
|
|
1474
|
-
defineProperty$2(values, 'name', { value: 'values' });
|
|
1475
|
-
} catch (error) { /* empty */ }
|
|
1476
|
-
|
|
1477
|
-
// iterable DOM collections
|
|
1478
|
-
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
1479
|
-
var domIterables = {
|
|
1480
|
-
CSSRuleList: 0,
|
|
1481
|
-
CSSStyleDeclaration: 0,
|
|
1482
|
-
CSSValueList: 0,
|
|
1483
|
-
ClientRectList: 0,
|
|
1484
|
-
DOMRectList: 0,
|
|
1485
|
-
DOMStringList: 0,
|
|
1486
|
-
DOMTokenList: 1,
|
|
1487
|
-
DataTransferItemList: 0,
|
|
1488
|
-
FileList: 0,
|
|
1489
|
-
HTMLAllCollection: 0,
|
|
1490
|
-
HTMLCollection: 0,
|
|
1491
|
-
HTMLFormElement: 0,
|
|
1492
|
-
HTMLSelectElement: 0,
|
|
1493
|
-
MediaList: 0,
|
|
1494
|
-
MimeTypeArray: 0,
|
|
1495
|
-
NamedNodeMap: 0,
|
|
1496
|
-
NodeList: 1,
|
|
1497
|
-
PaintRequestList: 0,
|
|
1498
|
-
Plugin: 0,
|
|
1499
|
-
PluginArray: 0,
|
|
1500
|
-
SVGLengthList: 0,
|
|
1501
|
-
SVGNumberList: 0,
|
|
1502
|
-
SVGPathSegList: 0,
|
|
1503
|
-
SVGPointList: 0,
|
|
1504
|
-
SVGStringList: 0,
|
|
1505
|
-
SVGTransformList: 0,
|
|
1506
|
-
SourceBufferList: 0,
|
|
1507
|
-
StyleSheetList: 0,
|
|
1508
|
-
TextTrackCueList: 0,
|
|
1509
|
-
TextTrackList: 0,
|
|
1510
|
-
TouchList: 0
|
|
1511
|
-
};
|
|
1512
|
-
|
|
1513
|
-
// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
|
|
1514
|
-
var documentCreateElement = documentCreateElement$2;
|
|
1515
|
-
|
|
1516
|
-
var classList = documentCreateElement('span').classList;
|
|
1517
|
-
var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
|
|
1518
|
-
|
|
1519
|
-
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
1520
|
-
|
|
1521
|
-
var global$b = global$l;
|
|
1522
|
-
var DOMIterables = domIterables;
|
|
1523
|
-
var DOMTokenListPrototype = domTokenListPrototype;
|
|
1524
|
-
var ArrayIteratorMethods = es_array_iterator;
|
|
1525
|
-
var createNonEnumerableProperty = createNonEnumerableProperty$4;
|
|
1526
|
-
var setToStringTag$1 = setToStringTag$4;
|
|
1527
|
-
var wellKnownSymbol$8 = wellKnownSymbol$e;
|
|
1528
|
-
|
|
1529
|
-
var ITERATOR$3 = wellKnownSymbol$8('iterator');
|
|
1530
|
-
var ArrayValues = ArrayIteratorMethods.values;
|
|
1531
|
-
|
|
1532
|
-
var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
1533
|
-
if (CollectionPrototype) {
|
|
1534
|
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
1535
|
-
if (CollectionPrototype[ITERATOR$3] !== ArrayValues) try {
|
|
1536
|
-
createNonEnumerableProperty(CollectionPrototype, ITERATOR$3, ArrayValues);
|
|
1537
|
-
} catch (error) {
|
|
1538
|
-
CollectionPrototype[ITERATOR$3] = ArrayValues;
|
|
1539
|
-
}
|
|
1540
|
-
setToStringTag$1(CollectionPrototype, COLLECTION_NAME, true);
|
|
1541
|
-
if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
|
|
1542
|
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
1543
|
-
if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
|
|
1544
|
-
createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
|
|
1545
|
-
} catch (error) {
|
|
1546
|
-
CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
|
|
1547
|
-
}
|
|
1548
|
-
}
|
|
1549
|
-
}
|
|
1550
|
-
};
|
|
1551
|
-
|
|
1552
|
-
for (var COLLECTION_NAME in DOMIterables) {
|
|
1553
|
-
handlePrototype(global$b[COLLECTION_NAME] && global$b[COLLECTION_NAME].prototype, COLLECTION_NAME);
|
|
1554
|
-
}
|
|
1555
|
-
|
|
1556
|
-
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
1557
|
-
|
|
1558
|
-
/******************************************************************************
|
|
1559
|
-
Copyright (c) Microsoft Corporation.
|
|
1560
|
-
|
|
1561
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
1562
|
-
purpose with or without fee is hereby granted.
|
|
1563
|
-
|
|
1564
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
1565
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
1566
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
1567
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
1568
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
1569
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1570
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
1571
|
-
***************************************************************************** */
|
|
1572
|
-
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
function __decorate(decorators, target, key, desc) {
|
|
1576
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
1577
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
1578
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
1579
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
|
-
function __metadata(metadataKey, metadataValue) {
|
|
1583
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
1587
|
-
var e = new Error(message);
|
|
1588
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
1589
|
-
};
|
|
1590
|
-
|
|
1591
|
-
const ADDRESS_LINE_MAX_LENGTH = 50;
|
|
1592
|
-
const ADDRESS_CITY_MAX_LENGTH = 80;
|
|
1593
|
-
const ADDRESS_STATE_MAX_LENGTH = 30;
|
|
1594
|
-
const ADDRESS_STATE_CODE_MAX_LENGTH = 2;
|
|
1595
|
-
const ADDRESS_ZIP_MAX_LENGTH = 11;
|
|
1596
|
-
const ADDRESS_COUNTRY_MAX_LENGTH = 80;
|
|
1597
|
-
class AbstractUnitedStatesAddressWithoutStateParams {
|
|
1598
|
-
constructor() {
|
|
1599
|
-
this.line1 = void 0;
|
|
1600
|
-
this.line2 = void 0;
|
|
1601
|
-
this.city = void 0;
|
|
1602
|
-
this.zip = void 0;
|
|
1603
|
-
}
|
|
1604
|
-
}
|
|
1605
|
-
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.MaxLength(ADDRESS_LINE_MAX_LENGTH), __metadata("design:type", String)], AbstractUnitedStatesAddressWithoutStateParams.prototype, "line1", void 0);
|
|
1606
|
-
__decorate([classTransformer.Expose(), classValidator.IsOptional(), classValidator.IsString(), classValidator.MaxLength(ADDRESS_LINE_MAX_LENGTH), __metadata("design:type", String)], AbstractUnitedStatesAddressWithoutStateParams.prototype, "line2", void 0);
|
|
1607
|
-
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.MaxLength(ADDRESS_CITY_MAX_LENGTH), __metadata("design:type", String)], AbstractUnitedStatesAddressWithoutStateParams.prototype, "city", void 0);
|
|
1608
|
-
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.Matches(util.ZIP_CODE_STRING_REGEX), classValidator.MaxLength(ADDRESS_ZIP_MAX_LENGTH), __metadata("design:type", String)], AbstractUnitedStatesAddressWithoutStateParams.prototype, "zip", void 0);
|
|
1609
|
-
/**
|
|
1610
|
-
* UnitedStatesAddress that enforces a StateCode for the state value.
|
|
1611
|
-
*/
|
|
1612
|
-
class UnitedStatesAddressWithStateCodeParams extends AbstractUnitedStatesAddressWithoutStateParams {
|
|
1613
|
-
constructor(...args) {
|
|
1614
|
-
super(...args);
|
|
1615
|
-
this.state = void 0;
|
|
1616
|
-
}
|
|
1617
|
-
}
|
|
1618
|
-
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.Matches(util.US_STATE_CODE_STRING_REGEX), classValidator.MinLength(ADDRESS_STATE_CODE_MAX_LENGTH), classValidator.MaxLength(ADDRESS_STATE_CODE_MAX_LENGTH), __metadata("design:type", String)], UnitedStatesAddressWithStateCodeParams.prototype, "state", void 0);
|
|
1619
|
-
/**
|
|
1620
|
-
* UnitedStatesAddress that enforces a State for the state value.
|
|
1621
|
-
*/
|
|
1622
|
-
class UnitedStatesAddressWithStateStringParams extends AbstractUnitedStatesAddressWithoutStateParams {
|
|
1623
|
-
constructor(...args) {
|
|
1624
|
-
super(...args);
|
|
1625
|
-
this.state = void 0;
|
|
1626
|
-
}
|
|
1627
|
-
}
|
|
1628
|
-
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.MaxLength(ADDRESS_STATE_MAX_LENGTH), __metadata("design:type", String)], UnitedStatesAddressWithStateStringParams.prototype, "state", void 0);
|
|
1629
|
-
|
|
1630
|
-
var wellKnownSymbol$7 = wellKnownSymbol$e;
|
|
1631
|
-
|
|
1632
|
-
var TO_STRING_TAG$1 = wellKnownSymbol$7('toStringTag');
|
|
1633
|
-
var test = {};
|
|
1634
|
-
|
|
1635
|
-
test[TO_STRING_TAG$1] = 'z';
|
|
1636
|
-
|
|
1637
|
-
var toStringTagSupport = String(test) === '[object z]';
|
|
1638
|
-
|
|
1639
|
-
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
1640
|
-
var isCallable$6 = isCallable$k;
|
|
1641
|
-
var classofRaw$1 = classofRaw$2;
|
|
1642
|
-
var wellKnownSymbol$6 = wellKnownSymbol$e;
|
|
1643
|
-
|
|
1644
|
-
var TO_STRING_TAG = wellKnownSymbol$6('toStringTag');
|
|
1645
|
-
var $Object = Object;
|
|
1646
|
-
|
|
1647
|
-
// ES3 wrong here
|
|
1648
|
-
var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
|
|
1649
|
-
|
|
1650
|
-
// fallback for IE11 Script Access Denied error
|
|
1651
|
-
var tryGet = function (it, key) {
|
|
1652
|
-
try {
|
|
1653
|
-
return it[key];
|
|
1654
|
-
} catch (error) { /* empty */ }
|
|
1655
|
-
};
|
|
1656
|
-
|
|
1657
|
-
// getting tag from ES6+ `Object.prototype.toString`
|
|
1658
|
-
var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
|
|
1659
|
-
var O, tag, result;
|
|
1660
|
-
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
1661
|
-
// @@toStringTag case
|
|
1662
|
-
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
|
|
1663
|
-
// builtinTag case
|
|
1664
|
-
: CORRECT_ARGUMENTS ? classofRaw$1(O)
|
|
1665
|
-
// ES3 arguments fallback
|
|
1666
|
-
: (result = classofRaw$1(O)) === 'Object' && isCallable$6(O.callee) ? 'Arguments' : result;
|
|
1667
|
-
};
|
|
1668
|
-
|
|
1669
|
-
var classof$3 = classof$4;
|
|
1670
|
-
|
|
1671
|
-
var $String = String;
|
|
1672
|
-
|
|
1673
|
-
var toString$2 = function (argument) {
|
|
1674
|
-
if (classof$3(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
|
|
1675
|
-
return $String(argument);
|
|
1676
|
-
};
|
|
1677
|
-
|
|
1678
|
-
var anObject$6 = anObject$b;
|
|
1679
|
-
|
|
1680
|
-
// `RegExp.prototype.flags` getter implementation
|
|
1681
|
-
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
1682
|
-
var regexpFlags$1 = function () {
|
|
1683
|
-
var that = anObject$6(this);
|
|
1684
|
-
var result = '';
|
|
1685
|
-
if (that.hasIndices) result += 'd';
|
|
1686
|
-
if (that.global) result += 'g';
|
|
1687
|
-
if (that.ignoreCase) result += 'i';
|
|
1688
|
-
if (that.multiline) result += 'm';
|
|
1689
|
-
if (that.dotAll) result += 's';
|
|
1690
|
-
if (that.unicode) result += 'u';
|
|
1691
|
-
if (that.unicodeSets) result += 'v';
|
|
1692
|
-
if (that.sticky) result += 'y';
|
|
1693
|
-
return result;
|
|
1694
|
-
};
|
|
1695
|
-
|
|
1696
|
-
var fails$5 = fails$g;
|
|
1697
|
-
var global$a = global$l;
|
|
1698
|
-
|
|
1699
|
-
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
1700
|
-
var $RegExp$2 = global$a.RegExp;
|
|
1701
|
-
|
|
1702
|
-
var UNSUPPORTED_Y$1 = fails$5(function () {
|
|
1703
|
-
var re = $RegExp$2('a', 'y');
|
|
1704
|
-
re.lastIndex = 2;
|
|
1705
|
-
return re.exec('abcd') !== null;
|
|
1706
|
-
});
|
|
1707
|
-
|
|
1708
|
-
// UC Browser bug
|
|
1709
|
-
// https://github.com/zloirock/core-js/issues/1008
|
|
1710
|
-
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$5(function () {
|
|
1711
|
-
return !$RegExp$2('a', 'y').sticky;
|
|
1712
|
-
});
|
|
1713
|
-
|
|
1714
|
-
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$5(function () {
|
|
1715
|
-
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
1716
|
-
var re = $RegExp$2('^r', 'gy');
|
|
1717
|
-
re.lastIndex = 2;
|
|
1718
|
-
return re.exec('str') !== null;
|
|
1719
|
-
});
|
|
1720
|
-
|
|
1721
|
-
var regexpStickyHelpers = {
|
|
1722
|
-
BROKEN_CARET: BROKEN_CARET,
|
|
1723
|
-
MISSED_STICKY: MISSED_STICKY,
|
|
1724
|
-
UNSUPPORTED_Y: UNSUPPORTED_Y$1
|
|
1725
|
-
};
|
|
1726
|
-
|
|
1727
|
-
var fails$4 = fails$g;
|
|
1728
|
-
var global$9 = global$l;
|
|
1729
|
-
|
|
1730
|
-
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
1731
|
-
var $RegExp$1 = global$9.RegExp;
|
|
1732
|
-
|
|
1733
|
-
var regexpUnsupportedDotAll = fails$4(function () {
|
|
1734
|
-
var re = $RegExp$1('.', 's');
|
|
1735
|
-
return !(re.dotAll && re.test('\n') && re.flags === 's');
|
|
1736
|
-
});
|
|
1737
|
-
|
|
1738
|
-
var fails$3 = fails$g;
|
|
1739
|
-
var global$8 = global$l;
|
|
1740
|
-
|
|
1741
|
-
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
1742
|
-
var $RegExp = global$8.RegExp;
|
|
1743
|
-
|
|
1744
|
-
var regexpUnsupportedNcg = fails$3(function () {
|
|
1745
|
-
var re = $RegExp('(?<a>b)', 'g');
|
|
1746
|
-
return re.exec('b').groups.a !== 'b' ||
|
|
1747
|
-
'b'.replace(re, '$<a>c') !== 'bc';
|
|
1748
|
-
});
|
|
1749
|
-
|
|
1750
|
-
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
1751
|
-
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
1752
|
-
var call$9 = functionCall;
|
|
1753
|
-
var uncurryThis$5 = functionUncurryThis;
|
|
1754
|
-
var toString$1 = toString$2;
|
|
1755
|
-
var regexpFlags = regexpFlags$1;
|
|
1756
|
-
var stickyHelpers = regexpStickyHelpers;
|
|
1757
|
-
var shared = shared$4;
|
|
1758
|
-
var create = objectCreate;
|
|
1759
|
-
var getInternalState = internalState.get;
|
|
1760
|
-
var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
|
|
1761
|
-
var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
1762
|
-
|
|
1763
|
-
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
1764
|
-
var nativeExec = RegExp.prototype.exec;
|
|
1765
|
-
var patchedExec = nativeExec;
|
|
1766
|
-
var charAt = uncurryThis$5(''.charAt);
|
|
1767
|
-
var indexOf = uncurryThis$5(''.indexOf);
|
|
1768
|
-
var replace = uncurryThis$5(''.replace);
|
|
1769
|
-
var stringSlice = uncurryThis$5(''.slice);
|
|
1770
|
-
|
|
1771
|
-
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
1772
|
-
var re1 = /a/;
|
|
1773
|
-
var re2 = /b*/g;
|
|
1774
|
-
call$9(nativeExec, re1, 'a');
|
|
1775
|
-
call$9(nativeExec, re2, 'a');
|
|
1776
|
-
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
1777
|
-
})();
|
|
1778
|
-
|
|
1779
|
-
var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
|
|
1780
|
-
|
|
1781
|
-
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
|
1782
|
-
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
|
1783
|
-
|
|
1784
|
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
|
|
1785
|
-
|
|
1786
|
-
if (PATCH) {
|
|
1787
|
-
patchedExec = function exec(string) {
|
|
1788
|
-
var re = this;
|
|
1789
|
-
var state = getInternalState(re);
|
|
1790
|
-
var str = toString$1(string);
|
|
1791
|
-
var raw = state.raw;
|
|
1792
|
-
var result, reCopy, lastIndex, match, i, object, group;
|
|
1793
|
-
|
|
1794
|
-
if (raw) {
|
|
1795
|
-
raw.lastIndex = re.lastIndex;
|
|
1796
|
-
result = call$9(patchedExec, raw, str);
|
|
1797
|
-
re.lastIndex = raw.lastIndex;
|
|
1798
|
-
return result;
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1801
|
-
var groups = state.groups;
|
|
1802
|
-
var sticky = UNSUPPORTED_Y && re.sticky;
|
|
1803
|
-
var flags = call$9(regexpFlags, re);
|
|
1804
|
-
var source = re.source;
|
|
1805
|
-
var charsAdded = 0;
|
|
1806
|
-
var strCopy = str;
|
|
1807
|
-
|
|
1808
|
-
if (sticky) {
|
|
1809
|
-
flags = replace(flags, 'y', '');
|
|
1810
|
-
if (indexOf(flags, 'g') === -1) {
|
|
1811
|
-
flags += 'g';
|
|
1812
|
-
}
|
|
1813
|
-
|
|
1814
|
-
strCopy = stringSlice(str, re.lastIndex);
|
|
1815
|
-
// Support anchored sticky behavior.
|
|
1816
|
-
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
|
|
1817
|
-
source = '(?: ' + source + ')';
|
|
1818
|
-
strCopy = ' ' + strCopy;
|
|
1819
|
-
charsAdded++;
|
|
1820
|
-
}
|
|
1821
|
-
// ^(? + rx + ) is needed, in combination with some str slicing, to
|
|
1822
|
-
// simulate the 'y' flag.
|
|
1823
|
-
reCopy = new RegExp('^(?:' + source + ')', flags);
|
|
1824
|
-
}
|
|
1825
|
-
|
|
1826
|
-
if (NPCG_INCLUDED) {
|
|
1827
|
-
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
|
|
1828
|
-
}
|
|
1829
|
-
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
1830
|
-
|
|
1831
|
-
match = call$9(nativeExec, sticky ? reCopy : re, strCopy);
|
|
1832
|
-
|
|
1833
|
-
if (sticky) {
|
|
1834
|
-
if (match) {
|
|
1835
|
-
match.input = stringSlice(match.input, charsAdded);
|
|
1836
|
-
match[0] = stringSlice(match[0], charsAdded);
|
|
1837
|
-
match.index = re.lastIndex;
|
|
1838
|
-
re.lastIndex += match[0].length;
|
|
1839
|
-
} else re.lastIndex = 0;
|
|
1840
|
-
} else if (UPDATES_LAST_INDEX_WRONG && match) {
|
|
1841
|
-
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
|
1842
|
-
}
|
|
1843
|
-
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
1844
|
-
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
1845
|
-
// for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
|
|
1846
|
-
call$9(nativeReplace, match[0], reCopy, function () {
|
|
1847
|
-
for (i = 1; i < arguments.length - 2; i++) {
|
|
1848
|
-
if (arguments[i] === undefined) match[i] = undefined;
|
|
1849
|
-
}
|
|
1850
|
-
});
|
|
1851
|
-
}
|
|
1852
|
-
|
|
1853
|
-
if (match && groups) {
|
|
1854
|
-
match.groups = object = create(null);
|
|
1855
|
-
for (i = 0; i < groups.length; i++) {
|
|
1856
|
-
group = groups[i];
|
|
1857
|
-
object[group[0]] = match[group[1]];
|
|
1858
|
-
}
|
|
1859
|
-
}
|
|
1860
|
-
|
|
1861
|
-
return match;
|
|
1862
|
-
};
|
|
1863
|
-
}
|
|
1864
|
-
|
|
1865
|
-
var regexpExec = patchedExec;
|
|
1866
|
-
|
|
1867
|
-
var $$8 = _export;
|
|
1868
|
-
var exec$1 = regexpExec;
|
|
1869
|
-
|
|
1870
|
-
// `RegExp.prototype.exec` method
|
|
1871
|
-
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
1872
|
-
$$8({ target: 'RegExp', proto: true, forced: /./.exec !== exec$1 }, {
|
|
1873
|
-
exec: exec$1
|
|
1874
|
-
});
|
|
1875
|
-
|
|
1876
|
-
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
1877
|
-
|
|
1878
|
-
var $$7 = _export;
|
|
1879
|
-
var call$8 = functionCall;
|
|
1880
|
-
var isCallable$5 = isCallable$k;
|
|
1881
|
-
var anObject$5 = anObject$b;
|
|
1882
|
-
var toString = toString$2;
|
|
1883
|
-
|
|
1884
|
-
var DELEGATES_TO_EXEC = function () {
|
|
1885
|
-
var execCalled = false;
|
|
1886
|
-
var re = /[ac]/;
|
|
1887
|
-
re.exec = function () {
|
|
1888
|
-
execCalled = true;
|
|
1889
|
-
return /./.exec.apply(this, arguments);
|
|
1890
|
-
};
|
|
1891
|
-
return re.test('abc') === true && execCalled;
|
|
1892
|
-
}();
|
|
1893
|
-
|
|
1894
|
-
var nativeTest = /./.test;
|
|
1895
|
-
|
|
1896
|
-
// `RegExp.prototype.test` method
|
|
1897
|
-
// https://tc39.es/ecma262/#sec-regexp.prototype.test
|
|
1898
|
-
$$7({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
|
|
1899
|
-
test: function (S) {
|
|
1900
|
-
var R = anObject$5(this);
|
|
1901
|
-
var string = toString(S);
|
|
1902
|
-
var exec = R.exec;
|
|
1903
|
-
if (!isCallable$5(exec)) return call$8(nativeTest, R, string);
|
|
1904
|
-
var result = call$8(exec, R, string);
|
|
1905
|
-
if (result === null) return false;
|
|
1906
|
-
anObject$5(result);
|
|
1907
|
-
return true;
|
|
1908
|
-
}
|
|
1909
|
-
});
|
|
1910
|
-
|
|
1911
|
-
const UNKNOWN_WEBSITE_LINK_TYPE = 'u';
|
|
1912
|
-
/**
|
|
1913
|
-
* Max length of WebsiteLink's data type.
|
|
1914
|
-
*/
|
|
1915
|
-
const WEBSITE_LINK_TYPE_MAX_LENGTH = 32;
|
|
1916
|
-
/**
|
|
1917
|
-
* Alpha-numeric type between 1 and 32 characters only allowed.
|
|
1918
|
-
*/
|
|
1919
|
-
const WEBSITE_LINK_TYPE_REGEX = /^[a-zA-Z0-9]{1,32}$/;
|
|
1920
|
-
function isValidWebsiteLinkType(input) {
|
|
1921
|
-
return WEBSITE_LINK_TYPE_REGEX.test(input);
|
|
1922
|
-
}
|
|
1923
|
-
/**
|
|
1924
|
-
* Default max length of WebsiteLink's data string.
|
|
1925
|
-
*/
|
|
1926
|
-
const WEBSITE_LINK_ENCODED_DATA_MAX_LENGTH = 1000;
|
|
1927
|
-
class WebsiteLink {
|
|
1928
|
-
constructor(template) {
|
|
1929
|
-
this.t = void 0;
|
|
1930
|
-
this.d = void 0;
|
|
1931
|
-
if (template != null) {
|
|
1932
|
-
this.t = template.t;
|
|
1933
|
-
this.d = template.d;
|
|
1934
|
-
}
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
|
-
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.Matches(WEBSITE_LINK_TYPE_REGEX), classValidator.MaxLength(WEBSITE_LINK_TYPE_MAX_LENGTH), __metadata("design:type", String)], WebsiteLink.prototype, "t", void 0);
|
|
1938
|
-
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.MaxLength(WEBSITE_LINK_ENCODED_DATA_MAX_LENGTH), __metadata("design:type", String)], WebsiteLink.prototype, "d", void 0);
|
|
1939
|
-
|
|
1940
|
-
/**
|
|
1941
|
-
* Max length of WebsiteLink's data type.
|
|
1942
|
-
*/
|
|
1943
|
-
const WEBSITE_FILE_LINK_TYPE_MAX_LENGTH = WEBSITE_LINK_TYPE_MAX_LENGTH;
|
|
1944
|
-
/**
|
|
1945
|
-
* Has the same regex as WebsiteLinkType
|
|
1946
|
-
*/
|
|
1947
|
-
const WEBSITE_FILE_LINK_TYPE_REGEX = WEBSITE_LINK_TYPE_REGEX;
|
|
1948
|
-
/**
|
|
1949
|
-
* Max length of WebsiteLink's data type.
|
|
1950
|
-
*/
|
|
1951
|
-
const WEBSITE_FILE_LINK_MIME_TYPE_MAX_LENGTH = 128;
|
|
1952
|
-
/**
|
|
1953
|
-
* Default max length of WebsiteLink's data string.
|
|
1954
|
-
*/
|
|
1955
|
-
const WEBSITE_FILE_LINK_MIME_TYPE_REGEX = /^\w+\/[-+.\w]+$/;
|
|
1956
|
-
/**
|
|
1957
|
-
* Max length of WebsiteLink's data type.
|
|
1958
|
-
*/
|
|
1959
|
-
const WEBSITE_FILE_LINK_NAME_MAX_LENGTH = 128;
|
|
1960
|
-
/**
|
|
1961
|
-
* Max length of WebsiteLink's data type.
|
|
1962
|
-
*/
|
|
1963
|
-
const WEBSITE_FILE_LINK_DATA_MAX_LENGTH = WEBSITE_LINK_ENCODED_DATA_MAX_LENGTH - 3 - WEBSITE_FILE_LINK_TYPE_MAX_LENGTH - WEBSITE_FILE_LINK_MIME_TYPE_MAX_LENGTH - WEBSITE_FILE_LINK_NAME_MAX_LENGTH;
|
|
1964
|
-
const WEBSITE_FILE_LINK_DATA_REGEX = /^[^|]+$/;
|
|
1965
|
-
class WebsiteFileLink {
|
|
1966
|
-
constructor(template) {
|
|
1967
|
-
this.type = void 0;
|
|
1968
|
-
this.mime = void 0;
|
|
1969
|
-
this.name = void 0;
|
|
1970
|
-
this.data = void 0;
|
|
1971
|
-
if (template != null) {
|
|
1972
|
-
this.type = template.type;
|
|
1973
|
-
this.mime = template.mime;
|
|
1974
|
-
this.name = template.name;
|
|
1975
|
-
this.data = template.data;
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
}
|
|
1979
|
-
__decorate([classTransformer.Expose(), classValidator.IsOptional(), classValidator.IsString(), classValidator.Matches(WEBSITE_FILE_LINK_TYPE_REGEX), classValidator.MaxLength(WEBSITE_LINK_TYPE_MAX_LENGTH), __metadata("design:type", String)], WebsiteFileLink.prototype, "type", void 0);
|
|
1980
|
-
__decorate([classTransformer.Expose(), classValidator.IsOptional(), classValidator.IsString(), classValidator.Matches(WEBSITE_FILE_LINK_MIME_TYPE_REGEX), classValidator.MaxLength(WEBSITE_FILE_LINK_MIME_TYPE_MAX_LENGTH), __metadata("design:type", String)], WebsiteFileLink.prototype, "mime", void 0);
|
|
1981
|
-
__decorate([classTransformer.Expose(), classValidator.IsOptional(), classValidator.IsString(), classValidator.MaxLength(WEBSITE_FILE_LINK_NAME_MAX_LENGTH), __metadata("design:type", String)], WebsiteFileLink.prototype, "name", void 0);
|
|
1982
|
-
__decorate([classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.Matches(WEBSITE_FILE_LINK_DATA_REGEX), classValidator.MaxLength(WEBSITE_FILE_LINK_DATA_MAX_LENGTH), __metadata("design:type", String)], WebsiteFileLink.prototype, "data", void 0);
|
|
1983
|
-
const WEBSITE_FILE_LINK_WEBSITE_LINK_TYPE = 'f';
|
|
1984
|
-
function websiteFileLinkToWebsiteLink(input) {
|
|
1985
|
-
return {
|
|
1986
|
-
t: WEBSITE_FILE_LINK_WEBSITE_LINK_TYPE,
|
|
1987
|
-
d: encodeWebsiteFileLinkToWebsiteLinkEncodedData(input)
|
|
1988
|
-
};
|
|
1989
|
-
}
|
|
1990
|
-
function websiteLinkToWebsiteLinkFile(input) {
|
|
1991
|
-
const encodedData = input.d;
|
|
1992
|
-
return decodeWebsiteLinkEncodedDataToWebsiteFileLink(encodedData);
|
|
1993
|
-
}
|
|
1994
|
-
const WEBSITE_FILE_LINK_ENCODE_SEPARATOR = '|';
|
|
1995
|
-
function encodeWebsiteFileLinkToWebsiteLinkEncodedData(input) {
|
|
1996
|
-
const encoded = [input.type, input.mime, input.data, input.name].map(x => x || '').join(WEBSITE_FILE_LINK_ENCODE_SEPARATOR);
|
|
1997
|
-
return encoded;
|
|
1998
|
-
}
|
|
1999
|
-
function decodeWebsiteLinkEncodedDataToWebsiteFileLink(input) {
|
|
2000
|
-
const [type, mime, data, name] = util.splitJoinRemainder(input, WEBSITE_FILE_LINK_ENCODE_SEPARATOR, 4);
|
|
2001
|
-
return util.filterFalsyAndEmptyValues({
|
|
2002
|
-
type,
|
|
2003
|
-
mime,
|
|
2004
|
-
name,
|
|
2005
|
-
data
|
|
2006
|
-
});
|
|
2007
|
-
}
|
|
2008
|
-
|
|
2009
|
-
/**
|
|
2010
|
-
* Used for isolating a username from a website that has the username as the base url.
|
|
2011
|
-
*
|
|
2012
|
-
* Example:
|
|
2013
|
-
* - https://facebook.com/facebook
|
|
2014
|
-
*/
|
|
2015
|
-
const WEBSITE_LINK_ISOLATE_BASE_URL_PROFILE_ID = util.isolateWebsitePathFunction({
|
|
2016
|
-
isolatePathComponents: 0,
|
|
2017
|
-
removeTrailingSlash: true,
|
|
2018
|
-
removeQueryParameters: true
|
|
2019
|
-
});
|
|
2020
|
-
function usernameFromUsernameOrWebsiteWithBaseUrlUsername(input, prefix) {
|
|
2021
|
-
const username = util.toRelativeSlashPathStartType(WEBSITE_LINK_ISOLATE_BASE_URL_PROFILE_ID(usernameOrWebsiteUrlToWebsiteUrl(input)));
|
|
2022
|
-
if (prefix) {
|
|
2023
|
-
return util.addPrefix(prefix, username);
|
|
2024
|
-
} else {
|
|
2025
|
-
return username;
|
|
2026
|
-
}
|
|
2027
|
-
}
|
|
2028
|
-
function usernameFromUsernameOrWebsiteWithOneOffBaseUrlUsername(input, isolateFn) {
|
|
2029
|
-
return util.toRelativeSlashPathStartType(isolateFn(usernameOrWebsiteUrlToWebsiteUrl(input)));
|
|
2030
|
-
}
|
|
2031
|
-
function usernameOrWebsiteUrlToWebsiteUrl(input) {
|
|
2032
|
-
return util.hasWebsiteDomain(input) ? input : util.toAbsoluteSlashPathStartType(util.removeHttpFromUrl(input));
|
|
2033
|
-
}
|
|
2034
|
-
// MARK: Website
|
|
2035
|
-
const WEBSITE_URL_WEBSITE_LINK_TYPE = 'w';
|
|
2036
|
-
function websiteUrlToWebsiteLink(input) {
|
|
2037
|
-
return {
|
|
2038
|
-
t: WEBSITE_URL_WEBSITE_LINK_TYPE,
|
|
2039
|
-
d: util.removeHttpFromUrl(input) // website urls are stored as-is without http/https
|
|
2040
|
-
};
|
|
2041
|
-
}
|
|
2042
|
-
// MARK: Email
|
|
2043
|
-
const EMAIL_URL_WEBSITE_LINK_TYPE = 'e';
|
|
2044
|
-
function emailAddressToWebsiteLink(input) {
|
|
2045
|
-
return {
|
|
2046
|
-
t: EMAIL_URL_WEBSITE_LINK_TYPE,
|
|
2047
|
-
d: input
|
|
2048
|
-
};
|
|
2049
|
-
}
|
|
2050
|
-
// MARK: Phone
|
|
2051
|
-
const PHONE_URL_WEBSITE_LINK_TYPE = 'p';
|
|
2052
|
-
function phoneNumberToWebsiteLink(input) {
|
|
2053
|
-
return {
|
|
2054
|
-
t: PHONE_URL_WEBSITE_LINK_TYPE,
|
|
2055
|
-
d: input
|
|
2056
|
-
};
|
|
2057
|
-
}
|
|
2058
|
-
// MARK: Facebook
|
|
2059
|
-
const FACEBOOK_BASE_URL = `https://www.facebook.com`;
|
|
2060
|
-
const FACEBOOK_WEBSITE_LINK_TYPE = 'fb';
|
|
2061
|
-
function facebookProfileUrlToWebsiteLink(input) {
|
|
2062
|
-
return {
|
|
2063
|
-
t: FACEBOOK_WEBSITE_LINK_TYPE,
|
|
2064
|
-
d: usernameFromUsernameOrWebsiteWithBaseUrlUsername(input)
|
|
2065
|
-
};
|
|
2066
|
-
}
|
|
2067
|
-
function facebookProfileUrl(profileId) {
|
|
2068
|
-
return `${FACEBOOK_BASE_URL}/${profileId}`;
|
|
2069
|
-
}
|
|
2070
|
-
// MARK: Instagram
|
|
2071
|
-
const INSTAGRAM_BASE_URL = `https://www.instagram.com`;
|
|
2072
|
-
const INSTAGRAM_WEBSITE_LINK_TYPE = 'ig';
|
|
2073
|
-
function instagramProfileUrlToWebsiteLink(input) {
|
|
2074
|
-
return {
|
|
2075
|
-
t: INSTAGRAM_WEBSITE_LINK_TYPE,
|
|
2076
|
-
d: usernameFromUsernameOrWebsiteWithBaseUrlUsername(input)
|
|
2077
|
-
};
|
|
2078
|
-
}
|
|
2079
|
-
function instagramProfileUrl(profileId) {
|
|
2080
|
-
return `${INSTAGRAM_BASE_URL}/${profileId}`;
|
|
2081
|
-
}
|
|
2082
|
-
// MARK: Twitter
|
|
2083
|
-
const TWITTER_BASE_URL = `https://www.twitter.com`;
|
|
2084
|
-
const TWITTER_WEBSITE_LINK_TYPE = 'tw';
|
|
2085
|
-
function twitterProfileUrlToWebsiteLink(input) {
|
|
2086
|
-
return {
|
|
2087
|
-
t: TWITTER_WEBSITE_LINK_TYPE,
|
|
2088
|
-
d: usernameFromUsernameOrWebsiteWithBaseUrlUsername(input)
|
|
2089
|
-
};
|
|
2090
|
-
}
|
|
2091
|
-
function twitterProfileUrl(profileId) {
|
|
2092
|
-
return `${TWITTER_BASE_URL}/${profileId}`;
|
|
2093
|
-
}
|
|
2094
|
-
// MARK: Tiktok
|
|
2095
|
-
const TIKTOK_BASE_URL = `https://tiktok.com`;
|
|
2096
|
-
const TIKTOK_USERNAME_PREFIX = '@';
|
|
2097
|
-
const TIKTOK_WEBSITE_LINK_TYPE = 'tt';
|
|
2098
|
-
function tiktokProfileUrlToWebsiteLink(input) {
|
|
2099
|
-
return {
|
|
2100
|
-
t: TIKTOK_WEBSITE_LINK_TYPE,
|
|
2101
|
-
d: usernameFromUsernameOrWebsiteWithBaseUrlUsername(input, TIKTOK_USERNAME_PREFIX)
|
|
2102
|
-
};
|
|
2103
|
-
}
|
|
2104
|
-
function tiktokProfileUrl(profileId) {
|
|
2105
|
-
return `${TIKTOK_BASE_URL}/@${profileId}`;
|
|
2106
|
-
}
|
|
2107
|
-
// MARK: Snapchat
|
|
2108
|
-
const SNAPCHAT_BASE_URL = `https://snapchat.com`;
|
|
2109
|
-
const SNAPCHAT_WEBSITE_LINK_TYPE = 'sc';
|
|
2110
|
-
const SNAPCHAT_WEBSITE_LINK_ISOLATE_PROFILE_ID = util.isolateWebsitePathFunction({
|
|
2111
|
-
ignoredBasePath: 'add',
|
|
2112
|
-
isolatePathComponents: 0,
|
|
2113
|
-
removeTrailingSlash: true,
|
|
2114
|
-
removeQueryParameters: true
|
|
2115
|
-
});
|
|
2116
|
-
function snapchatProfileUrlToWebsiteLink(input) {
|
|
2117
|
-
return {
|
|
2118
|
-
t: SNAPCHAT_WEBSITE_LINK_TYPE,
|
|
2119
|
-
d: usernameFromUsernameOrWebsiteWithOneOffBaseUrlUsername(input, SNAPCHAT_WEBSITE_LINK_ISOLATE_PROFILE_ID)
|
|
2120
|
-
};
|
|
2121
|
-
}
|
|
2122
|
-
function snapchatProfileUrl(profileId) {
|
|
2123
|
-
return `${SNAPCHAT_BASE_URL}/add/${profileId}`;
|
|
2124
|
-
}
|
|
2125
|
-
// MARK: YouTube
|
|
2126
|
-
const YOUTUBE_BASE_URL = `https://youtube.com`;
|
|
2127
|
-
const YOUTUBE_WEBSITE_LINK_TYPE = 'yt';
|
|
2128
|
-
const YOUTUBE_WEBSITE_LINK_ISOLATE_PROFILE_ID = util.isolateWebsitePathFunction({
|
|
2129
|
-
ignoredBasePath: 'c',
|
|
2130
|
-
isolatePathComponents: 0,
|
|
2131
|
-
removeTrailingSlash: true,
|
|
2132
|
-
removeQueryParameters: true
|
|
2133
|
-
});
|
|
2134
|
-
function youtubeProfileUrlToWebsiteLink(input) {
|
|
2135
|
-
return {
|
|
2136
|
-
t: YOUTUBE_WEBSITE_LINK_TYPE,
|
|
2137
|
-
d: usernameFromUsernameOrWebsiteWithOneOffBaseUrlUsername(input, YOUTUBE_WEBSITE_LINK_ISOLATE_PROFILE_ID)
|
|
2138
|
-
};
|
|
2139
|
-
}
|
|
2140
|
-
function youtubeProfileUrl(profileId) {
|
|
2141
|
-
return `${YOUTUBE_BASE_URL}/c/${profileId}`;
|
|
2142
|
-
}
|
|
2143
|
-
// MARK: PayPal
|
|
2144
|
-
const PAYPAL_BASE_URL = `https://paypal.me`;
|
|
2145
|
-
const PAYPAL_WEBSITE_LINK_TYPE = 'pp';
|
|
2146
|
-
function paypalProfileUrlToWebsiteLink(input) {
|
|
2147
|
-
return {
|
|
2148
|
-
t: PAYPAL_WEBSITE_LINK_TYPE,
|
|
2149
|
-
d: usernameFromUsernameOrWebsiteWithBaseUrlUsername(input)
|
|
2150
|
-
};
|
|
2151
|
-
}
|
|
2152
|
-
function paypalProfileUrl(profileId) {
|
|
2153
|
-
return `${PAYPAL_BASE_URL}/${profileId}`;
|
|
2154
|
-
}
|
|
2155
|
-
// MARK: Cashapp
|
|
2156
|
-
const CASHAPP_BASE_URL = `https://cash.app`;
|
|
2157
|
-
const CASHAPP_USERNAME_PREFIX = '$';
|
|
2158
|
-
const CASHAPP_WEBSITE_LINK_TYPE = 'ca';
|
|
2159
|
-
function cashappProfileUrlToWebsiteLink(input) {
|
|
2160
|
-
return {
|
|
2161
|
-
t: CASHAPP_WEBSITE_LINK_TYPE,
|
|
2162
|
-
d: usernameFromUsernameOrWebsiteWithBaseUrlUsername(input, CASHAPP_USERNAME_PREFIX)
|
|
2163
|
-
};
|
|
2164
|
-
}
|
|
2165
|
-
function cashappProfileUrl(profileId) {
|
|
2166
|
-
return `${CASHAPP_BASE_URL}/$${profileId}`;
|
|
2167
|
-
}
|
|
2168
|
-
// MARK: Venmo
|
|
2169
|
-
const VENMO_BASE_URL = `https://account.venmo.com`;
|
|
2170
|
-
const VENMO_WEBSITE_LINK_TYPE = 'vn';
|
|
2171
|
-
const VENMO_WEBSITE_LINK_ISOLATE_PROFILE_ID = util.isolateWebsitePathFunction({
|
|
2172
|
-
ignoredBasePath: 'u',
|
|
2173
|
-
isolatePathComponents: 0,
|
|
2174
|
-
removeTrailingSlash: true,
|
|
2175
|
-
removeQueryParameters: true
|
|
2176
|
-
});
|
|
2177
|
-
function venmoProfileUrlToWebsiteLink(input) {
|
|
2178
|
-
return {
|
|
2179
|
-
t: VENMO_WEBSITE_LINK_TYPE,
|
|
2180
|
-
d: usernameFromUsernameOrWebsiteWithOneOffBaseUrlUsername(input, VENMO_WEBSITE_LINK_ISOLATE_PROFILE_ID)
|
|
2181
|
-
};
|
|
2182
|
-
}
|
|
2183
|
-
function venmoProfileUrl(profileId) {
|
|
2184
|
-
return `${VENMO_BASE_URL}/u/${profileId}`;
|
|
7
|
+
/******************************************************************************
|
|
8
|
+
Copyright (c) Microsoft Corporation.
|
|
9
|
+
|
|
10
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
11
|
+
purpose with or without fee is hereby granted.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
14
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
15
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
17
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
20
|
+
***************************************************************************** */
|
|
21
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
function __decorate(decorators, target, key, desc) {
|
|
25
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
26
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
27
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
28
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function __metadata(metadataKey, metadataValue) {
|
|
32
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
36
|
+
var e = new Error(message);
|
|
37
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const ADDRESS_LINE_MAX_LENGTH = 50;
|
|
41
|
+
const ADDRESS_CITY_MAX_LENGTH = 80;
|
|
42
|
+
const ADDRESS_STATE_MAX_LENGTH = 30;
|
|
43
|
+
const ADDRESS_STATE_CODE_MAX_LENGTH = 2;
|
|
44
|
+
const ADDRESS_ZIP_MAX_LENGTH = 11;
|
|
45
|
+
const ADDRESS_COUNTRY_MAX_LENGTH = 80;
|
|
46
|
+
class AbstractUnitedStatesAddressWithoutStateParams {
|
|
47
|
+
constructor() {
|
|
48
|
+
this.line1 = void 0;
|
|
49
|
+
this.line2 = void 0;
|
|
50
|
+
this.city = void 0;
|
|
51
|
+
this.zip = void 0;
|
|
52
|
+
}
|
|
2185
53
|
}
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
d: usernameFromUsernameOrWebsiteWithOneOffBaseUrlUsername(input, SPOTIFY_WEBSITE_LINK_ISOLATE_PROFILE_ID)
|
|
2199
|
-
};
|
|
54
|
+
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.MaxLength(ADDRESS_LINE_MAX_LENGTH), __metadata("design:type", String)], AbstractUnitedStatesAddressWithoutStateParams.prototype, "line1", void 0);
|
|
55
|
+
__decorate([classTransformer.Expose(), classValidator.IsOptional(), classValidator.IsString(), classValidator.MaxLength(ADDRESS_LINE_MAX_LENGTH), __metadata("design:type", String)], AbstractUnitedStatesAddressWithoutStateParams.prototype, "line2", void 0);
|
|
56
|
+
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.MaxLength(ADDRESS_CITY_MAX_LENGTH), __metadata("design:type", String)], AbstractUnitedStatesAddressWithoutStateParams.prototype, "city", void 0);
|
|
57
|
+
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.Matches(util.ZIP_CODE_STRING_REGEX), classValidator.MaxLength(ADDRESS_ZIP_MAX_LENGTH), __metadata("design:type", String)], AbstractUnitedStatesAddressWithoutStateParams.prototype, "zip", void 0);
|
|
58
|
+
/**
|
|
59
|
+
* UnitedStatesAddress that enforces a StateCode for the state value.
|
|
60
|
+
*/
|
|
61
|
+
class UnitedStatesAddressWithStateCodeParams extends AbstractUnitedStatesAddressWithoutStateParams {
|
|
62
|
+
constructor(...args) {
|
|
63
|
+
super(...args);
|
|
64
|
+
this.state = void 0;
|
|
65
|
+
}
|
|
2200
66
|
}
|
|
2201
|
-
|
|
2202
|
-
|
|
67
|
+
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.Matches(util.US_STATE_CODE_STRING_REGEX), classValidator.MinLength(ADDRESS_STATE_CODE_MAX_LENGTH), classValidator.MaxLength(ADDRESS_STATE_CODE_MAX_LENGTH), __metadata("design:type", String)], UnitedStatesAddressWithStateCodeParams.prototype, "state", void 0);
|
|
68
|
+
/**
|
|
69
|
+
* UnitedStatesAddress that enforces a State for the state value.
|
|
70
|
+
*/
|
|
71
|
+
class UnitedStatesAddressWithStateStringParams extends AbstractUnitedStatesAddressWithoutStateParams {
|
|
72
|
+
constructor(...args) {
|
|
73
|
+
super(...args);
|
|
74
|
+
this.state = void 0;
|
|
75
|
+
}
|
|
2203
76
|
}
|
|
77
|
+
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.MaxLength(ADDRESS_STATE_MAX_LENGTH), __metadata("design:type", String)], UnitedStatesAddressWithStateStringParams.prototype, "state", void 0);
|
|
2204
78
|
|
|
2205
|
-
const
|
|
2206
|
-
const GRANTED_OWNER_ROLE_KEY = 'owner';
|
|
2207
|
-
const GRANTED_ADMIN_ROLE_KEY = 'admin';
|
|
79
|
+
const UNKNOWN_WEBSITE_LINK_TYPE = 'u';
|
|
2208
80
|
/**
|
|
2209
|
-
*
|
|
2210
|
-
*
|
|
2211
|
-
* @param role
|
|
2212
|
-
* @returns
|
|
81
|
+
* Max length of WebsiteLink's data type.
|
|
2213
82
|
*/
|
|
2214
|
-
|
|
2215
|
-
return role === GRANTED_ADMIN_ROLE_KEY || role === GRANTED_OWNER_ROLE_KEY;
|
|
2216
|
-
}
|
|
2217
|
-
const GRANTED_READ_ROLE_KEY = 'read';
|
|
2218
|
-
const GRANTED_UPDATE_ROLE_KEY = 'update';
|
|
2219
|
-
const GRANTED_DELETE_ROLE_KEY = 'delete';
|
|
2220
|
-
const FULL_ACCESS_ROLE_KEY = '__FULL__';
|
|
2221
|
-
const NO_ACCESS_ROLE_KEY = '__EMPTY__';
|
|
2222
|
-
function noAccessRoleMap() {
|
|
2223
|
-
return {
|
|
2224
|
-
[NO_ACCESS_ROLE_KEY]: true
|
|
2225
|
-
};
|
|
2226
|
-
}
|
|
2227
|
-
function isNoAccessRoleMap(input) {
|
|
2228
|
-
return input[NO_ACCESS_ROLE_KEY] === true;
|
|
2229
|
-
}
|
|
2230
|
-
function fullAccessRoleMap() {
|
|
2231
|
-
return {
|
|
2232
|
-
[FULL_ACCESS_ROLE_KEY]: true
|
|
2233
|
-
};
|
|
2234
|
-
}
|
|
2235
|
-
function isFullAccessRoleMap(input) {
|
|
2236
|
-
return input[FULL_ACCESS_ROLE_KEY] === true;
|
|
2237
|
-
}
|
|
83
|
+
const WEBSITE_LINK_TYPE_MAX_LENGTH = 32;
|
|
2238
84
|
/**
|
|
2239
|
-
*
|
|
2240
|
-
*
|
|
2241
|
-
* @param map
|
|
2242
|
-
* @returns
|
|
85
|
+
* Alpha-numeric type between 1 and 32 characters only allowed.
|
|
2243
86
|
*/
|
|
2244
|
-
|
|
2245
|
-
|
|
87
|
+
const WEBSITE_LINK_TYPE_REGEX = /^[a-zA-Z0-9]{1,32}$/;
|
|
88
|
+
function isValidWebsiteLinkType(input) {
|
|
89
|
+
return WEBSITE_LINK_TYPE_REGEX.test(input);
|
|
2246
90
|
}
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
forEach: ([role, value]) => {
|
|
2259
|
-
if (this.hasRole(role)) {
|
|
2260
|
-
result[role] = value;
|
|
2261
|
-
}
|
|
2262
|
-
}
|
|
2263
|
-
});
|
|
2264
|
-
return result;
|
|
2265
|
-
}
|
|
2266
|
-
hasRole(role) {
|
|
2267
|
-
return this.hasRoles('any', role);
|
|
2268
|
-
}
|
|
2269
|
-
hasRoles(setIncludes, inputRoles) {
|
|
2270
|
-
if (this._map[FULL_ACCESS_ROLE_KEY]) {
|
|
2271
|
-
return true;
|
|
2272
|
-
} else {
|
|
2273
|
-
return this.containsRoles(setIncludes, inputRoles);
|
|
2274
|
-
}
|
|
2275
|
-
}
|
|
2276
|
-
containsRoles(setIncludes, inputRoles) {
|
|
2277
|
-
const roles = util.iterableToArray(inputRoles);
|
|
2278
|
-
if (setIncludes === 'any') {
|
|
2279
|
-
return this.containsAnyRole(roles);
|
|
2280
|
-
} else {
|
|
2281
|
-
return this.containsEachRole(roles);
|
|
2282
|
-
}
|
|
2283
|
-
}
|
|
2284
|
-
containsAnyRole(roles) {
|
|
2285
|
-
for (const role of roles) {
|
|
2286
|
-
if (this._map[role]) {
|
|
2287
|
-
return true;
|
|
2288
|
-
}
|
|
2289
|
-
}
|
|
2290
|
-
return false;
|
|
2291
|
-
}
|
|
2292
|
-
containsEachRole(roles) {
|
|
2293
|
-
for (const role of roles) {
|
|
2294
|
-
if (!this._map[role]) {
|
|
2295
|
-
return false;
|
|
2296
|
-
}
|
|
91
|
+
/**
|
|
92
|
+
* Default max length of WebsiteLink's data string.
|
|
93
|
+
*/
|
|
94
|
+
const WEBSITE_LINK_ENCODED_DATA_MAX_LENGTH = 1000;
|
|
95
|
+
class WebsiteLink {
|
|
96
|
+
constructor(template) {
|
|
97
|
+
this.t = void 0;
|
|
98
|
+
this.d = void 0;
|
|
99
|
+
if (template != null) {
|
|
100
|
+
this.t = template.t;
|
|
101
|
+
this.d = template.d;
|
|
2297
102
|
}
|
|
2298
|
-
return true;
|
|
2299
103
|
}
|
|
2300
104
|
}
|
|
105
|
+
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.Matches(WEBSITE_LINK_TYPE_REGEX), classValidator.MaxLength(WEBSITE_LINK_TYPE_MAX_LENGTH), __metadata("design:type", String)], WebsiteLink.prototype, "t", void 0);
|
|
106
|
+
__decorate([classTransformer.Expose(), classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.MaxLength(WEBSITE_LINK_ENCODED_DATA_MAX_LENGTH), __metadata("design:type", String)], WebsiteLink.prototype, "d", void 0);
|
|
107
|
+
|
|
2301
108
|
/**
|
|
2302
|
-
*
|
|
2303
|
-
*
|
|
2304
|
-
* @param roles
|
|
2305
|
-
* @returns
|
|
109
|
+
* Max length of WebsiteLink's data type.
|
|
2306
110
|
*/
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
};
|
|
2342
|
-
|
|
2343
|
-
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
2344
|
-
|
|
2345
|
-
var $TypeError$5 = TypeError;
|
|
2346
|
-
|
|
2347
|
-
var anInstance$1 = function (it, Prototype) {
|
|
2348
|
-
if (isPrototypeOf$1(Prototype, it)) return it;
|
|
2349
|
-
throw new $TypeError$5('Incorrect invocation');
|
|
2350
|
-
};
|
|
2351
|
-
|
|
2352
|
-
var uncurryThis$4 = functionUncurryThis;
|
|
2353
|
-
var fails$2 = fails$g;
|
|
2354
|
-
var isCallable$4 = isCallable$k;
|
|
2355
|
-
var classof$1 = classof$4;
|
|
2356
|
-
var getBuiltIn$2 = getBuiltIn$7;
|
|
2357
|
-
var inspectSource$1 = inspectSource$3;
|
|
2358
|
-
|
|
2359
|
-
var noop = function () { /* empty */ };
|
|
2360
|
-
var construct = getBuiltIn$2('Reflect', 'construct');
|
|
2361
|
-
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
2362
|
-
var exec = uncurryThis$4(constructorRegExp.exec);
|
|
2363
|
-
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
|
|
2364
|
-
|
|
2365
|
-
var isConstructorModern = function isConstructor(argument) {
|
|
2366
|
-
if (!isCallable$4(argument)) return false;
|
|
2367
|
-
try {
|
|
2368
|
-
construct(noop, [], argument);
|
|
2369
|
-
return true;
|
|
2370
|
-
} catch (error) {
|
|
2371
|
-
return false;
|
|
2372
|
-
}
|
|
2373
|
-
};
|
|
2374
|
-
|
|
2375
|
-
var isConstructorLegacy = function isConstructor(argument) {
|
|
2376
|
-
if (!isCallable$4(argument)) return false;
|
|
2377
|
-
switch (classof$1(argument)) {
|
|
2378
|
-
case 'AsyncFunction':
|
|
2379
|
-
case 'GeneratorFunction':
|
|
2380
|
-
case 'AsyncGeneratorFunction': return false;
|
|
2381
|
-
}
|
|
2382
|
-
try {
|
|
2383
|
-
// we can't check .prototype since constructors produced by .bind haven't it
|
|
2384
|
-
// `Function#toString` throws on some built-it function in some legacy engines
|
|
2385
|
-
// (for example, `DOMQuad` and similar in FF41-)
|
|
2386
|
-
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource$1(argument));
|
|
2387
|
-
} catch (error) {
|
|
2388
|
-
return true;
|
|
111
|
+
const WEBSITE_FILE_LINK_TYPE_MAX_LENGTH = WEBSITE_LINK_TYPE_MAX_LENGTH;
|
|
112
|
+
/**
|
|
113
|
+
* Has the same regex as WebsiteLinkType
|
|
114
|
+
*/
|
|
115
|
+
const WEBSITE_FILE_LINK_TYPE_REGEX = WEBSITE_LINK_TYPE_REGEX;
|
|
116
|
+
/**
|
|
117
|
+
* Max length of WebsiteLink's data type.
|
|
118
|
+
*/
|
|
119
|
+
const WEBSITE_FILE_LINK_MIME_TYPE_MAX_LENGTH = 128;
|
|
120
|
+
/**
|
|
121
|
+
* Default max length of WebsiteLink's data string.
|
|
122
|
+
*/
|
|
123
|
+
const WEBSITE_FILE_LINK_MIME_TYPE_REGEX = /^\w+\/[-+.\w]+$/;
|
|
124
|
+
/**
|
|
125
|
+
* Max length of WebsiteLink's data type.
|
|
126
|
+
*/
|
|
127
|
+
const WEBSITE_FILE_LINK_NAME_MAX_LENGTH = 128;
|
|
128
|
+
/**
|
|
129
|
+
* Max length of WebsiteLink's data type.
|
|
130
|
+
*/
|
|
131
|
+
const WEBSITE_FILE_LINK_DATA_MAX_LENGTH = WEBSITE_LINK_ENCODED_DATA_MAX_LENGTH - 3 - WEBSITE_FILE_LINK_TYPE_MAX_LENGTH - WEBSITE_FILE_LINK_MIME_TYPE_MAX_LENGTH - WEBSITE_FILE_LINK_NAME_MAX_LENGTH;
|
|
132
|
+
const WEBSITE_FILE_LINK_DATA_REGEX = /^[^|]+$/;
|
|
133
|
+
class WebsiteFileLink {
|
|
134
|
+
constructor(template) {
|
|
135
|
+
this.type = void 0;
|
|
136
|
+
this.mime = void 0;
|
|
137
|
+
this.name = void 0;
|
|
138
|
+
this.data = void 0;
|
|
139
|
+
if (template != null) {
|
|
140
|
+
this.type = template.type;
|
|
141
|
+
this.mime = template.mime;
|
|
142
|
+
this.name = template.name;
|
|
143
|
+
this.data = template.data;
|
|
144
|
+
}
|
|
2389
145
|
}
|
|
2390
|
-
}
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|| !isConstructorModern(function () { called = true; })
|
|
2401
|
-
|| called;
|
|
2402
|
-
}) ? isConstructorLegacy : isConstructorModern;
|
|
2403
|
-
|
|
2404
|
-
var isConstructor = isConstructor$1;
|
|
2405
|
-
var tryToString$2 = tryToString$4;
|
|
2406
|
-
|
|
2407
|
-
var $TypeError$4 = TypeError;
|
|
2408
|
-
|
|
2409
|
-
// `Assert: IsConstructor(argument) is true`
|
|
2410
|
-
var aConstructor$1 = function (argument) {
|
|
2411
|
-
if (isConstructor(argument)) return argument;
|
|
2412
|
-
throw new $TypeError$4(tryToString$2(argument) + ' is not a constructor');
|
|
2413
|
-
};
|
|
2414
|
-
|
|
2415
|
-
var anObject$4 = anObject$b;
|
|
2416
|
-
var aConstructor = aConstructor$1;
|
|
2417
|
-
var isNullOrUndefined$1 = isNullOrUndefined$4;
|
|
2418
|
-
var wellKnownSymbol$4 = wellKnownSymbol$e;
|
|
2419
|
-
|
|
2420
|
-
var SPECIES$1 = wellKnownSymbol$4('species');
|
|
2421
|
-
|
|
2422
|
-
// `SpeciesConstructor` abstract operation
|
|
2423
|
-
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
2424
|
-
var speciesConstructor$1 = function (O, defaultConstructor) {
|
|
2425
|
-
var C = anObject$4(O).constructor;
|
|
2426
|
-
var S;
|
|
2427
|
-
return C === undefined || isNullOrUndefined$1(S = anObject$4(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
|
|
2428
|
-
};
|
|
2429
|
-
|
|
2430
|
-
var NATIVE_BIND$1 = functionBindNative;
|
|
2431
|
-
|
|
2432
|
-
var FunctionPrototype = Function.prototype;
|
|
2433
|
-
var apply$1 = FunctionPrototype.apply;
|
|
2434
|
-
var call$7 = FunctionPrototype.call;
|
|
2435
|
-
|
|
2436
|
-
// eslint-disable-next-line es/no-reflect -- safe
|
|
2437
|
-
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$7.bind(apply$1) : function () {
|
|
2438
|
-
return call$7.apply(apply$1, arguments);
|
|
2439
|
-
});
|
|
2440
|
-
|
|
2441
|
-
var classofRaw = classofRaw$2;
|
|
2442
|
-
var uncurryThis$3 = functionUncurryThis;
|
|
2443
|
-
|
|
2444
|
-
var functionUncurryThisClause = function (fn) {
|
|
2445
|
-
// Nashorn bug:
|
|
2446
|
-
// https://github.com/zloirock/core-js/issues/1128
|
|
2447
|
-
// https://github.com/zloirock/core-js/issues/1130
|
|
2448
|
-
if (classofRaw(fn) === 'Function') return uncurryThis$3(fn);
|
|
2449
|
-
};
|
|
2450
|
-
|
|
2451
|
-
var uncurryThis$2 = functionUncurryThisClause;
|
|
2452
|
-
var aCallable$5 = aCallable$8;
|
|
2453
|
-
var NATIVE_BIND = functionBindNative;
|
|
2454
|
-
|
|
2455
|
-
var bind$4 = uncurryThis$2(uncurryThis$2.bind);
|
|
2456
|
-
|
|
2457
|
-
// optional / simple context binding
|
|
2458
|
-
var functionBindContext = function (fn, that) {
|
|
2459
|
-
aCallable$5(fn);
|
|
2460
|
-
return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
|
|
2461
|
-
return fn.apply(that, arguments);
|
|
146
|
+
}
|
|
147
|
+
__decorate([classTransformer.Expose(), classValidator.IsOptional(), classValidator.IsString(), classValidator.Matches(WEBSITE_FILE_LINK_TYPE_REGEX), classValidator.MaxLength(WEBSITE_LINK_TYPE_MAX_LENGTH), __metadata("design:type", String)], WebsiteFileLink.prototype, "type", void 0);
|
|
148
|
+
__decorate([classTransformer.Expose(), classValidator.IsOptional(), classValidator.IsString(), classValidator.Matches(WEBSITE_FILE_LINK_MIME_TYPE_REGEX), classValidator.MaxLength(WEBSITE_FILE_LINK_MIME_TYPE_MAX_LENGTH), __metadata("design:type", String)], WebsiteFileLink.prototype, "mime", void 0);
|
|
149
|
+
__decorate([classTransformer.Expose(), classValidator.IsOptional(), classValidator.IsString(), classValidator.MaxLength(WEBSITE_FILE_LINK_NAME_MAX_LENGTH), __metadata("design:type", String)], WebsiteFileLink.prototype, "name", void 0);
|
|
150
|
+
__decorate([classValidator.IsString(), classValidator.IsNotEmpty(), classValidator.Matches(WEBSITE_FILE_LINK_DATA_REGEX), classValidator.MaxLength(WEBSITE_FILE_LINK_DATA_MAX_LENGTH), __metadata("design:type", String)], WebsiteFileLink.prototype, "data", void 0);
|
|
151
|
+
const WEBSITE_FILE_LINK_WEBSITE_LINK_TYPE = 'f';
|
|
152
|
+
function websiteFileLinkToWebsiteLink(input) {
|
|
153
|
+
return {
|
|
154
|
+
t: WEBSITE_FILE_LINK_WEBSITE_LINK_TYPE,
|
|
155
|
+
d: encodeWebsiteFileLinkToWebsiteLinkEncodedData(input)
|
|
2462
156
|
};
|
|
2463
|
-
}
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
var apply = functionApply;
|
|
2483
|
-
var bind$3 = functionBindContext;
|
|
2484
|
-
var isCallable$3 = isCallable$k;
|
|
2485
|
-
var hasOwn = hasOwnProperty_1;
|
|
2486
|
-
var fails$1 = fails$g;
|
|
2487
|
-
var html = html$2;
|
|
2488
|
-
var arraySlice = arraySlice$1;
|
|
2489
|
-
var createElement = documentCreateElement$2;
|
|
2490
|
-
var validateArgumentsLength = validateArgumentsLength$1;
|
|
2491
|
-
var IS_IOS$1 = engineIsIos;
|
|
2492
|
-
var IS_NODE$3 = engineIsNode;
|
|
2493
|
-
|
|
2494
|
-
var set = global$6.setImmediate;
|
|
2495
|
-
var clear = global$6.clearImmediate;
|
|
2496
|
-
var process$2 = global$6.process;
|
|
2497
|
-
var Dispatch = global$6.Dispatch;
|
|
2498
|
-
var Function$1 = global$6.Function;
|
|
2499
|
-
var MessageChannel = global$6.MessageChannel;
|
|
2500
|
-
var String$1 = global$6.String;
|
|
2501
|
-
var counter = 0;
|
|
2502
|
-
var queue$2 = {};
|
|
2503
|
-
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
2504
|
-
var $location, defer, channel, port;
|
|
157
|
+
}
|
|
158
|
+
function websiteLinkToWebsiteLinkFile(input) {
|
|
159
|
+
const encodedData = input.d;
|
|
160
|
+
return decodeWebsiteLinkEncodedDataToWebsiteFileLink(encodedData);
|
|
161
|
+
}
|
|
162
|
+
const WEBSITE_FILE_LINK_ENCODE_SEPARATOR = '|';
|
|
163
|
+
function encodeWebsiteFileLinkToWebsiteLinkEncodedData(input) {
|
|
164
|
+
const encoded = [input.type, input.mime, input.data, input.name].map(x => x || '').join(WEBSITE_FILE_LINK_ENCODE_SEPARATOR);
|
|
165
|
+
return encoded;
|
|
166
|
+
}
|
|
167
|
+
function decodeWebsiteLinkEncodedDataToWebsiteFileLink(input) {
|
|
168
|
+
const [type, mime, data, name] = util.splitJoinRemainder(input, WEBSITE_FILE_LINK_ENCODE_SEPARATOR, 4);
|
|
169
|
+
return util.filterFalsyAndEmptyValues({
|
|
170
|
+
type,
|
|
171
|
+
mime,
|
|
172
|
+
name,
|
|
173
|
+
data
|
|
174
|
+
});
|
|
175
|
+
}
|
|
2505
176
|
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
177
|
+
/**
|
|
178
|
+
* Used for isolating a username from a website that has the username as the base url.
|
|
179
|
+
*
|
|
180
|
+
* Example:
|
|
181
|
+
* - https://facebook.com/facebook
|
|
182
|
+
*/
|
|
183
|
+
const WEBSITE_LINK_ISOLATE_BASE_URL_PROFILE_ID = util.isolateWebsitePathFunction({
|
|
184
|
+
isolatePathComponents: 0,
|
|
185
|
+
removeTrailingSlash: true,
|
|
186
|
+
removeQueryParameters: true
|
|
2509
187
|
});
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
if (
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
188
|
+
function usernameFromUsernameOrWebsiteWithBaseUrlUsername(input, prefix) {
|
|
189
|
+
const username = util.toRelativeSlashPathStartType(WEBSITE_LINK_ISOLATE_BASE_URL_PROFILE_ID(usernameOrWebsiteUrlToWebsiteUrl(input)));
|
|
190
|
+
if (prefix) {
|
|
191
|
+
return util.addPrefix(prefix, username);
|
|
192
|
+
} else {
|
|
193
|
+
return username;
|
|
2516
194
|
}
|
|
2517
|
-
}
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
195
|
+
}
|
|
196
|
+
function usernameFromUsernameOrWebsiteWithOneOffBaseUrlUsername(input, isolateFn) {
|
|
197
|
+
return util.toRelativeSlashPathStartType(isolateFn(usernameOrWebsiteUrlToWebsiteUrl(input)));
|
|
198
|
+
}
|
|
199
|
+
function usernameOrWebsiteUrlToWebsiteUrl(input) {
|
|
200
|
+
return util.hasWebsiteDomain(input) ? input : util.toAbsoluteSlashPathStartType(util.removeHttpFromUrl(input));
|
|
201
|
+
}
|
|
202
|
+
// MARK: Website
|
|
203
|
+
const WEBSITE_URL_WEBSITE_LINK_TYPE = 'w';
|
|
204
|
+
function websiteUrlToWebsiteLink(input) {
|
|
205
|
+
return {
|
|
206
|
+
t: WEBSITE_URL_WEBSITE_LINK_TYPE,
|
|
207
|
+
d: util.removeHttpFromUrl(input) // website urls are stored as-is without http/https
|
|
2522
208
|
};
|
|
2523
|
-
}
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
// old engines have not location.origin
|
|
2531
|
-
global$6.postMessage(String$1(id), $location.protocol + '//' + $location.host);
|
|
2532
|
-
};
|
|
2533
|
-
|
|
2534
|
-
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
2535
|
-
if (!set || !clear) {
|
|
2536
|
-
set = function setImmediate(handler) {
|
|
2537
|
-
validateArgumentsLength(arguments.length, 1);
|
|
2538
|
-
var fn = isCallable$3(handler) ? handler : Function$1(handler);
|
|
2539
|
-
var args = arraySlice(arguments, 1);
|
|
2540
|
-
queue$2[++counter] = function () {
|
|
2541
|
-
apply(fn, undefined, args);
|
|
2542
|
-
};
|
|
2543
|
-
defer(counter);
|
|
2544
|
-
return counter;
|
|
209
|
+
}
|
|
210
|
+
// MARK: Email
|
|
211
|
+
const EMAIL_URL_WEBSITE_LINK_TYPE = 'e';
|
|
212
|
+
function emailAddressToWebsiteLink(input) {
|
|
213
|
+
return {
|
|
214
|
+
t: EMAIL_URL_WEBSITE_LINK_TYPE,
|
|
215
|
+
d: input
|
|
2545
216
|
};
|
|
2546
|
-
|
|
2547
|
-
|
|
217
|
+
}
|
|
218
|
+
// MARK: Phone
|
|
219
|
+
const PHONE_URL_WEBSITE_LINK_TYPE = 'p';
|
|
220
|
+
function phoneNumberToWebsiteLink(input) {
|
|
221
|
+
return {
|
|
222
|
+
t: PHONE_URL_WEBSITE_LINK_TYPE,
|
|
223
|
+
d: input
|
|
2548
224
|
};
|
|
2549
|
-
// Node.js 0.8-
|
|
2550
|
-
if (IS_NODE$3) {
|
|
2551
|
-
defer = function (id) {
|
|
2552
|
-
process$2.nextTick(runner(id));
|
|
2553
|
-
};
|
|
2554
|
-
// Sphere (JS game engine) Dispatch API
|
|
2555
|
-
} else if (Dispatch && Dispatch.now) {
|
|
2556
|
-
defer = function (id) {
|
|
2557
|
-
Dispatch.now(runner(id));
|
|
2558
|
-
};
|
|
2559
|
-
// Browsers with MessageChannel, includes WebWorkers
|
|
2560
|
-
// except iOS - https://github.com/zloirock/core-js/issues/624
|
|
2561
|
-
} else if (MessageChannel && !IS_IOS$1) {
|
|
2562
|
-
channel = new MessageChannel();
|
|
2563
|
-
port = channel.port2;
|
|
2564
|
-
channel.port1.onmessage = eventListener;
|
|
2565
|
-
defer = bind$3(port.postMessage, port);
|
|
2566
|
-
// Browsers with postMessage, skip WebWorkers
|
|
2567
|
-
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
2568
|
-
} else if (
|
|
2569
|
-
global$6.addEventListener &&
|
|
2570
|
-
isCallable$3(global$6.postMessage) &&
|
|
2571
|
-
!global$6.importScripts &&
|
|
2572
|
-
$location && $location.protocol !== 'file:' &&
|
|
2573
|
-
!fails$1(globalPostMessageDefer)
|
|
2574
|
-
) {
|
|
2575
|
-
defer = globalPostMessageDefer;
|
|
2576
|
-
global$6.addEventListener('message', eventListener, false);
|
|
2577
|
-
// IE8-
|
|
2578
|
-
} else if (ONREADYSTATECHANGE in createElement('script')) {
|
|
2579
|
-
defer = function (id) {
|
|
2580
|
-
html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
|
|
2581
|
-
html.removeChild(this);
|
|
2582
|
-
run(id);
|
|
2583
|
-
};
|
|
2584
|
-
};
|
|
2585
|
-
// Rest old browsers
|
|
2586
|
-
} else {
|
|
2587
|
-
defer = function (id) {
|
|
2588
|
-
setTimeout(runner(id), 0);
|
|
2589
|
-
};
|
|
2590
|
-
}
|
|
2591
225
|
}
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
var DESCRIPTORS$1 = descriptors;
|
|
2600
|
-
|
|
2601
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
2602
|
-
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
2603
|
-
|
|
2604
|
-
// Avoid NodeJS experimental warning
|
|
2605
|
-
var safeGetBuiltIn$1 = function (name) {
|
|
2606
|
-
if (!DESCRIPTORS$1) return global$5[name];
|
|
2607
|
-
var descriptor = getOwnPropertyDescriptor(global$5, name);
|
|
2608
|
-
return descriptor && descriptor.value;
|
|
2609
|
-
};
|
|
2610
|
-
|
|
2611
|
-
var Queue$2 = function () {
|
|
2612
|
-
this.head = null;
|
|
2613
|
-
this.tail = null;
|
|
2614
|
-
};
|
|
2615
|
-
|
|
2616
|
-
Queue$2.prototype = {
|
|
2617
|
-
add: function (item) {
|
|
2618
|
-
var entry = { item: item, next: null };
|
|
2619
|
-
var tail = this.tail;
|
|
2620
|
-
if (tail) tail.next = entry;
|
|
2621
|
-
else this.head = entry;
|
|
2622
|
-
this.tail = entry;
|
|
2623
|
-
},
|
|
2624
|
-
get: function () {
|
|
2625
|
-
var entry = this.head;
|
|
2626
|
-
if (entry) {
|
|
2627
|
-
var next = this.head = entry.next;
|
|
2628
|
-
if (next === null) this.tail = null;
|
|
2629
|
-
return entry.item;
|
|
2630
|
-
}
|
|
2631
|
-
}
|
|
2632
|
-
};
|
|
2633
|
-
|
|
2634
|
-
var queue$1 = Queue$2;
|
|
2635
|
-
|
|
2636
|
-
var userAgent$1 = engineUserAgent;
|
|
2637
|
-
|
|
2638
|
-
var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && typeof Pebble != 'undefined';
|
|
2639
|
-
|
|
2640
|
-
var userAgent = engineUserAgent;
|
|
2641
|
-
|
|
2642
|
-
var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
|
|
2643
|
-
|
|
2644
|
-
var global$4 = global$l;
|
|
2645
|
-
var safeGetBuiltIn = safeGetBuiltIn$1;
|
|
2646
|
-
var bind$2 = functionBindContext;
|
|
2647
|
-
var macrotask = task$1.set;
|
|
2648
|
-
var Queue$1 = queue$1;
|
|
2649
|
-
var IS_IOS = engineIsIos;
|
|
2650
|
-
var IS_IOS_PEBBLE = engineIsIosPebble;
|
|
2651
|
-
var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
|
|
2652
|
-
var IS_NODE$2 = engineIsNode;
|
|
2653
|
-
|
|
2654
|
-
var MutationObserver = global$4.MutationObserver || global$4.WebKitMutationObserver;
|
|
2655
|
-
var document$2 = global$4.document;
|
|
2656
|
-
var process$1 = global$4.process;
|
|
2657
|
-
var Promise$1 = global$4.Promise;
|
|
2658
|
-
var microtask$1 = safeGetBuiltIn('queueMicrotask');
|
|
2659
|
-
var notify$1, toggle, node, promise, then;
|
|
2660
|
-
|
|
2661
|
-
// modern engines have queueMicrotask method
|
|
2662
|
-
if (!microtask$1) {
|
|
2663
|
-
var queue = new Queue$1();
|
|
2664
|
-
|
|
2665
|
-
var flush = function () {
|
|
2666
|
-
var parent, fn;
|
|
2667
|
-
if (IS_NODE$2 && (parent = process$1.domain)) parent.exit();
|
|
2668
|
-
while (fn = queue.get()) try {
|
|
2669
|
-
fn();
|
|
2670
|
-
} catch (error) {
|
|
2671
|
-
if (queue.head) notify$1();
|
|
2672
|
-
throw error;
|
|
2673
|
-
}
|
|
2674
|
-
if (parent) parent.enter();
|
|
226
|
+
// MARK: Facebook
|
|
227
|
+
const FACEBOOK_BASE_URL = `https://www.facebook.com`;
|
|
228
|
+
const FACEBOOK_WEBSITE_LINK_TYPE = 'fb';
|
|
229
|
+
function facebookProfileUrlToWebsiteLink(input) {
|
|
230
|
+
return {
|
|
231
|
+
t: FACEBOOK_WEBSITE_LINK_TYPE,
|
|
232
|
+
d: usernameFromUsernameOrWebsiteWithBaseUrlUsername(input)
|
|
2675
233
|
};
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
} else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
|
|
2688
|
-
// Promise.resolve without an argument throws an error in LG WebOS 2
|
|
2689
|
-
promise = Promise$1.resolve(undefined);
|
|
2690
|
-
// workaround of WebKit ~ iOS Safari 10.1 bug
|
|
2691
|
-
promise.constructor = Promise$1;
|
|
2692
|
-
then = bind$2(promise.then, promise);
|
|
2693
|
-
notify$1 = function () {
|
|
2694
|
-
then(flush);
|
|
2695
|
-
};
|
|
2696
|
-
// Node.js without promises
|
|
2697
|
-
} else if (IS_NODE$2) {
|
|
2698
|
-
notify$1 = function () {
|
|
2699
|
-
process$1.nextTick(flush);
|
|
2700
|
-
};
|
|
2701
|
-
// for other environments - macrotask based on:
|
|
2702
|
-
// - setImmediate
|
|
2703
|
-
// - MessageChannel
|
|
2704
|
-
// - window.postMessage
|
|
2705
|
-
// - onreadystatechange
|
|
2706
|
-
// - setTimeout
|
|
2707
|
-
} else {
|
|
2708
|
-
// `webpack` dev server bug on IE global methods - use bind(fn, global)
|
|
2709
|
-
macrotask = bind$2(macrotask, global$4);
|
|
2710
|
-
notify$1 = function () {
|
|
2711
|
-
macrotask(flush);
|
|
2712
|
-
};
|
|
2713
|
-
}
|
|
2714
|
-
|
|
2715
|
-
microtask$1 = function (fn) {
|
|
2716
|
-
if (!queue.head) notify$1();
|
|
2717
|
-
queue.add(fn);
|
|
234
|
+
}
|
|
235
|
+
function facebookProfileUrl(profileId) {
|
|
236
|
+
return `${FACEBOOK_BASE_URL}/${profileId}`;
|
|
237
|
+
}
|
|
238
|
+
// MARK: Instagram
|
|
239
|
+
const INSTAGRAM_BASE_URL = `https://www.instagram.com`;
|
|
240
|
+
const INSTAGRAM_WEBSITE_LINK_TYPE = 'ig';
|
|
241
|
+
function instagramProfileUrlToWebsiteLink(input) {
|
|
242
|
+
return {
|
|
243
|
+
t: INSTAGRAM_WEBSITE_LINK_TYPE,
|
|
244
|
+
d: usernameFromUsernameOrWebsiteWithBaseUrlUsername(input)
|
|
2718
245
|
};
|
|
2719
246
|
}
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
var perform$3 = function (exec) {
|
|
2731
|
-
try {
|
|
2732
|
-
return { error: false, value: exec() };
|
|
2733
|
-
} catch (error) {
|
|
2734
|
-
return { error: true, value: error };
|
|
2735
|
-
}
|
|
2736
|
-
};
|
|
2737
|
-
|
|
2738
|
-
var global$3 = global$l;
|
|
2739
|
-
|
|
2740
|
-
var promiseNativeConstructor = global$3.Promise;
|
|
2741
|
-
|
|
2742
|
-
/* global Deno -- Deno case */
|
|
2743
|
-
var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
|
|
2744
|
-
|
|
2745
|
-
var IS_DENO$1 = engineIsDeno;
|
|
2746
|
-
var IS_NODE$1 = engineIsNode;
|
|
2747
|
-
|
|
2748
|
-
var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
|
|
2749
|
-
&& typeof window == 'object'
|
|
2750
|
-
&& typeof document == 'object';
|
|
2751
|
-
|
|
2752
|
-
var global$2 = global$l;
|
|
2753
|
-
var NativePromiseConstructor$3 = promiseNativeConstructor;
|
|
2754
|
-
var isCallable$2 = isCallable$k;
|
|
2755
|
-
var isForced = isForced_1;
|
|
2756
|
-
var inspectSource = inspectSource$3;
|
|
2757
|
-
var wellKnownSymbol$3 = wellKnownSymbol$e;
|
|
2758
|
-
var IS_BROWSER = engineIsBrowser;
|
|
2759
|
-
var IS_DENO = engineIsDeno;
|
|
2760
|
-
var V8_VERSION = engineV8Version;
|
|
2761
|
-
|
|
2762
|
-
NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
|
|
2763
|
-
var SPECIES = wellKnownSymbol$3('species');
|
|
2764
|
-
var SUBCLASSING = false;
|
|
2765
|
-
var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$2(global$2.PromiseRejectionEvent);
|
|
2766
|
-
|
|
2767
|
-
var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
|
|
2768
|
-
var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
|
|
2769
|
-
var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
|
|
2770
|
-
// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
2771
|
-
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
2772
|
-
// We can't detect it synchronously, so just check versions
|
|
2773
|
-
if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
|
|
2774
|
-
// We can't use @@species feature detection in V8 since it causes
|
|
2775
|
-
// deoptimization and performance degradation
|
|
2776
|
-
// https://github.com/zloirock/core-js/issues/679
|
|
2777
|
-
if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
|
|
2778
|
-
// Detect correctness of subclassing with @@species support
|
|
2779
|
-
var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
|
|
2780
|
-
var FakePromise = function (exec) {
|
|
2781
|
-
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
2782
|
-
};
|
|
2783
|
-
var constructor = promise.constructor = {};
|
|
2784
|
-
constructor[SPECIES] = FakePromise;
|
|
2785
|
-
SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
|
|
2786
|
-
if (!SUBCLASSING) return true;
|
|
2787
|
-
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
2788
|
-
} return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
|
|
2789
|
-
});
|
|
2790
|
-
|
|
2791
|
-
var promiseConstructorDetection = {
|
|
2792
|
-
CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
|
|
2793
|
-
REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
|
|
2794
|
-
SUBCLASSING: SUBCLASSING
|
|
2795
|
-
};
|
|
2796
|
-
|
|
2797
|
-
var newPromiseCapability$2 = {};
|
|
2798
|
-
|
|
2799
|
-
var aCallable$4 = aCallable$8;
|
|
2800
|
-
|
|
2801
|
-
var $TypeError$2 = TypeError;
|
|
2802
|
-
|
|
2803
|
-
var PromiseCapability = function (C) {
|
|
2804
|
-
var resolve, reject;
|
|
2805
|
-
this.promise = new C(function ($$resolve, $$reject) {
|
|
2806
|
-
if (resolve !== undefined || reject !== undefined) throw new $TypeError$2('Bad Promise constructor');
|
|
2807
|
-
resolve = $$resolve;
|
|
2808
|
-
reject = $$reject;
|
|
2809
|
-
});
|
|
2810
|
-
this.resolve = aCallable$4(resolve);
|
|
2811
|
-
this.reject = aCallable$4(reject);
|
|
2812
|
-
};
|
|
2813
|
-
|
|
2814
|
-
// `NewPromiseCapability` abstract operation
|
|
2815
|
-
// https://tc39.es/ecma262/#sec-newpromisecapability
|
|
2816
|
-
newPromiseCapability$2.f = function (C) {
|
|
2817
|
-
return new PromiseCapability(C);
|
|
2818
|
-
};
|
|
2819
|
-
|
|
2820
|
-
var $$6 = _export;
|
|
2821
|
-
var IS_NODE = engineIsNode;
|
|
2822
|
-
var global$1 = global$l;
|
|
2823
|
-
var call$6 = functionCall;
|
|
2824
|
-
var defineBuiltIn$1 = defineBuiltIn$5;
|
|
2825
|
-
var setPrototypeOf = objectSetPrototypeOf;
|
|
2826
|
-
var setToStringTag = setToStringTag$4;
|
|
2827
|
-
var setSpecies = setSpecies$1;
|
|
2828
|
-
var aCallable$3 = aCallable$8;
|
|
2829
|
-
var isCallable$1 = isCallable$k;
|
|
2830
|
-
var isObject$1 = isObject$a;
|
|
2831
|
-
var anInstance = anInstance$1;
|
|
2832
|
-
var speciesConstructor = speciesConstructor$1;
|
|
2833
|
-
var task = task$1.set;
|
|
2834
|
-
var microtask = microtask_1;
|
|
2835
|
-
var hostReportErrors = hostReportErrors$1;
|
|
2836
|
-
var perform$2 = perform$3;
|
|
2837
|
-
var Queue = queue$1;
|
|
2838
|
-
var InternalStateModule = internalState;
|
|
2839
|
-
var NativePromiseConstructor$2 = promiseNativeConstructor;
|
|
2840
|
-
var PromiseConstructorDetection = promiseConstructorDetection;
|
|
2841
|
-
var newPromiseCapabilityModule$3 = newPromiseCapability$2;
|
|
2842
|
-
|
|
2843
|
-
var PROMISE = 'Promise';
|
|
2844
|
-
var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
|
|
2845
|
-
var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
|
|
2846
|
-
var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
|
|
2847
|
-
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
|
|
2848
|
-
var setInternalState = InternalStateModule.set;
|
|
2849
|
-
var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
|
|
2850
|
-
var PromiseConstructor = NativePromiseConstructor$2;
|
|
2851
|
-
var PromisePrototype = NativePromisePrototype$1;
|
|
2852
|
-
var TypeError$1 = global$1.TypeError;
|
|
2853
|
-
var document$1 = global$1.document;
|
|
2854
|
-
var process = global$1.process;
|
|
2855
|
-
var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
|
|
2856
|
-
var newGenericPromiseCapability = newPromiseCapability$1;
|
|
2857
|
-
|
|
2858
|
-
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$1.dispatchEvent);
|
|
2859
|
-
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
2860
|
-
var REJECTION_HANDLED = 'rejectionhandled';
|
|
2861
|
-
var PENDING = 0;
|
|
2862
|
-
var FULFILLED = 1;
|
|
2863
|
-
var REJECTED = 2;
|
|
2864
|
-
var HANDLED = 1;
|
|
2865
|
-
var UNHANDLED = 2;
|
|
2866
|
-
|
|
2867
|
-
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
|
|
2868
|
-
|
|
2869
|
-
// helpers
|
|
2870
|
-
var isThenable = function (it) {
|
|
2871
|
-
var then;
|
|
2872
|
-
return isObject$1(it) && isCallable$1(then = it.then) ? then : false;
|
|
2873
|
-
};
|
|
2874
|
-
|
|
2875
|
-
var callReaction = function (reaction, state) {
|
|
2876
|
-
var value = state.value;
|
|
2877
|
-
var ok = state.state === FULFILLED;
|
|
2878
|
-
var handler = ok ? reaction.ok : reaction.fail;
|
|
2879
|
-
var resolve = reaction.resolve;
|
|
2880
|
-
var reject = reaction.reject;
|
|
2881
|
-
var domain = reaction.domain;
|
|
2882
|
-
var result, then, exited;
|
|
2883
|
-
try {
|
|
2884
|
-
if (handler) {
|
|
2885
|
-
if (!ok) {
|
|
2886
|
-
if (state.rejection === UNHANDLED) onHandleUnhandled(state);
|
|
2887
|
-
state.rejection = HANDLED;
|
|
2888
|
-
}
|
|
2889
|
-
if (handler === true) result = value;
|
|
2890
|
-
else {
|
|
2891
|
-
if (domain) domain.enter();
|
|
2892
|
-
result = handler(value); // can throw
|
|
2893
|
-
if (domain) {
|
|
2894
|
-
domain.exit();
|
|
2895
|
-
exited = true;
|
|
2896
|
-
}
|
|
2897
|
-
}
|
|
2898
|
-
if (result === reaction.promise) {
|
|
2899
|
-
reject(new TypeError$1('Promise-chain cycle'));
|
|
2900
|
-
} else if (then = isThenable(result)) {
|
|
2901
|
-
call$6(then, result, resolve, reject);
|
|
2902
|
-
} else resolve(result);
|
|
2903
|
-
} else reject(value);
|
|
2904
|
-
} catch (error) {
|
|
2905
|
-
if (domain && !exited) domain.exit();
|
|
2906
|
-
reject(error);
|
|
2907
|
-
}
|
|
2908
|
-
};
|
|
2909
|
-
|
|
2910
|
-
var notify = function (state, isReject) {
|
|
2911
|
-
if (state.notified) return;
|
|
2912
|
-
state.notified = true;
|
|
2913
|
-
microtask(function () {
|
|
2914
|
-
var reactions = state.reactions;
|
|
2915
|
-
var reaction;
|
|
2916
|
-
while (reaction = reactions.get()) {
|
|
2917
|
-
callReaction(reaction, state);
|
|
2918
|
-
}
|
|
2919
|
-
state.notified = false;
|
|
2920
|
-
if (isReject && !state.rejection) onUnhandled(state);
|
|
2921
|
-
});
|
|
2922
|
-
};
|
|
2923
|
-
|
|
2924
|
-
var dispatchEvent = function (name, promise, reason) {
|
|
2925
|
-
var event, handler;
|
|
2926
|
-
if (DISPATCH_EVENT) {
|
|
2927
|
-
event = document$1.createEvent('Event');
|
|
2928
|
-
event.promise = promise;
|
|
2929
|
-
event.reason = reason;
|
|
2930
|
-
event.initEvent(name, false, true);
|
|
2931
|
-
global$1.dispatchEvent(event);
|
|
2932
|
-
} else event = { promise: promise, reason: reason };
|
|
2933
|
-
if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$1['on' + name])) handler(event);
|
|
2934
|
-
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
|
2935
|
-
};
|
|
2936
|
-
|
|
2937
|
-
var onUnhandled = function (state) {
|
|
2938
|
-
call$6(task, global$1, function () {
|
|
2939
|
-
var promise = state.facade;
|
|
2940
|
-
var value = state.value;
|
|
2941
|
-
var IS_UNHANDLED = isUnhandled(state);
|
|
2942
|
-
var result;
|
|
2943
|
-
if (IS_UNHANDLED) {
|
|
2944
|
-
result = perform$2(function () {
|
|
2945
|
-
if (IS_NODE) {
|
|
2946
|
-
process.emit('unhandledRejection', value, promise);
|
|
2947
|
-
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
|
|
2948
|
-
});
|
|
2949
|
-
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
|
|
2950
|
-
state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
|
|
2951
|
-
if (result.error) throw result.value;
|
|
2952
|
-
}
|
|
2953
|
-
});
|
|
2954
|
-
};
|
|
2955
|
-
|
|
2956
|
-
var isUnhandled = function (state) {
|
|
2957
|
-
return state.rejection !== HANDLED && !state.parent;
|
|
2958
|
-
};
|
|
2959
|
-
|
|
2960
|
-
var onHandleUnhandled = function (state) {
|
|
2961
|
-
call$6(task, global$1, function () {
|
|
2962
|
-
var promise = state.facade;
|
|
2963
|
-
if (IS_NODE) {
|
|
2964
|
-
process.emit('rejectionHandled', promise);
|
|
2965
|
-
} else dispatchEvent(REJECTION_HANDLED, promise, state.value);
|
|
2966
|
-
});
|
|
2967
|
-
};
|
|
2968
|
-
|
|
2969
|
-
var bind$1 = function (fn, state, unwrap) {
|
|
2970
|
-
return function (value) {
|
|
2971
|
-
fn(state, value, unwrap);
|
|
247
|
+
function instagramProfileUrl(profileId) {
|
|
248
|
+
return `${INSTAGRAM_BASE_URL}/${profileId}`;
|
|
249
|
+
}
|
|
250
|
+
// MARK: Twitter
|
|
251
|
+
const TWITTER_BASE_URL = `https://www.twitter.com`;
|
|
252
|
+
const TWITTER_WEBSITE_LINK_TYPE = 'tw';
|
|
253
|
+
function twitterProfileUrlToWebsiteLink(input) {
|
|
254
|
+
return {
|
|
255
|
+
t: TWITTER_WEBSITE_LINK_TYPE,
|
|
256
|
+
d: usernameFromUsernameOrWebsiteWithBaseUrlUsername(input)
|
|
2972
257
|
};
|
|
2973
|
-
}
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
if (state.done) return;
|
|
2986
|
-
state.done = true;
|
|
2987
|
-
if (unwrap) state = unwrap;
|
|
2988
|
-
try {
|
|
2989
|
-
if (state.facade === value) throw new TypeError$1("Promise can't be resolved itself");
|
|
2990
|
-
var then = isThenable(value);
|
|
2991
|
-
if (then) {
|
|
2992
|
-
microtask(function () {
|
|
2993
|
-
var wrapper = { done: false };
|
|
2994
|
-
try {
|
|
2995
|
-
call$6(then, value,
|
|
2996
|
-
bind$1(internalResolve, wrapper, state),
|
|
2997
|
-
bind$1(internalReject, wrapper, state)
|
|
2998
|
-
);
|
|
2999
|
-
} catch (error) {
|
|
3000
|
-
internalReject(wrapper, error, state);
|
|
3001
|
-
}
|
|
3002
|
-
});
|
|
3003
|
-
} else {
|
|
3004
|
-
state.value = value;
|
|
3005
|
-
state.state = FULFILLED;
|
|
3006
|
-
notify(state, false);
|
|
3007
|
-
}
|
|
3008
|
-
} catch (error) {
|
|
3009
|
-
internalReject({ done: false }, error, state);
|
|
3010
|
-
}
|
|
3011
|
-
};
|
|
3012
|
-
|
|
3013
|
-
// constructor polyfill
|
|
3014
|
-
if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
3015
|
-
// 25.4.3.1 Promise(executor)
|
|
3016
|
-
PromiseConstructor = function Promise(executor) {
|
|
3017
|
-
anInstance(this, PromisePrototype);
|
|
3018
|
-
aCallable$3(executor);
|
|
3019
|
-
call$6(Internal, this);
|
|
3020
|
-
var state = getInternalPromiseState(this);
|
|
3021
|
-
try {
|
|
3022
|
-
executor(bind$1(internalResolve, state), bind$1(internalReject, state));
|
|
3023
|
-
} catch (error) {
|
|
3024
|
-
internalReject(state, error);
|
|
3025
|
-
}
|
|
258
|
+
}
|
|
259
|
+
function twitterProfileUrl(profileId) {
|
|
260
|
+
return `${TWITTER_BASE_URL}/${profileId}`;
|
|
261
|
+
}
|
|
262
|
+
// MARK: Tiktok
|
|
263
|
+
const TIKTOK_BASE_URL = `https://tiktok.com`;
|
|
264
|
+
const TIKTOK_USERNAME_PREFIX = '@';
|
|
265
|
+
const TIKTOK_WEBSITE_LINK_TYPE = 'tt';
|
|
266
|
+
function tiktokProfileUrlToWebsiteLink(input) {
|
|
267
|
+
return {
|
|
268
|
+
t: TIKTOK_WEBSITE_LINK_TYPE,
|
|
269
|
+
d: usernameFromUsernameOrWebsiteWithBaseUrlUsername(input, TIKTOK_USERNAME_PREFIX)
|
|
3026
270
|
};
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
271
|
+
}
|
|
272
|
+
function tiktokProfileUrl(profileId) {
|
|
273
|
+
return `${TIKTOK_BASE_URL}/@${profileId}`;
|
|
274
|
+
}
|
|
275
|
+
// MARK: Snapchat
|
|
276
|
+
const SNAPCHAT_BASE_URL = `https://snapchat.com`;
|
|
277
|
+
const SNAPCHAT_WEBSITE_LINK_TYPE = 'sc';
|
|
278
|
+
const SNAPCHAT_WEBSITE_LINK_ISOLATE_PROFILE_ID = util.isolateWebsitePathFunction({
|
|
279
|
+
ignoredBasePath: 'add',
|
|
280
|
+
isolatePathComponents: 0,
|
|
281
|
+
removeTrailingSlash: true,
|
|
282
|
+
removeQueryParameters: true
|
|
283
|
+
});
|
|
284
|
+
function snapchatProfileUrlToWebsiteLink(input) {
|
|
285
|
+
return {
|
|
286
|
+
t: SNAPCHAT_WEBSITE_LINK_TYPE,
|
|
287
|
+
d: usernameFromUsernameOrWebsiteWithOneOffBaseUrlUsername(input, SNAPCHAT_WEBSITE_LINK_ISOLATE_PROFILE_ID)
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
function snapchatProfileUrl(profileId) {
|
|
291
|
+
return `${SNAPCHAT_BASE_URL}/add/${profileId}`;
|
|
292
|
+
}
|
|
293
|
+
// MARK: YouTube
|
|
294
|
+
const YOUTUBE_BASE_URL = `https://youtube.com`;
|
|
295
|
+
const YOUTUBE_WEBSITE_LINK_TYPE = 'yt';
|
|
296
|
+
const YOUTUBE_WEBSITE_LINK_ISOLATE_PROFILE_ID = util.isolateWebsitePathFunction({
|
|
297
|
+
ignoredBasePath: 'c',
|
|
298
|
+
isolatePathComponents: 0,
|
|
299
|
+
removeTrailingSlash: true,
|
|
300
|
+
removeQueryParameters: true
|
|
301
|
+
});
|
|
302
|
+
function youtubeProfileUrlToWebsiteLink(input) {
|
|
303
|
+
return {
|
|
304
|
+
t: YOUTUBE_WEBSITE_LINK_TYPE,
|
|
305
|
+
d: usernameFromUsernameOrWebsiteWithOneOffBaseUrlUsername(input, YOUTUBE_WEBSITE_LINK_ISOLATE_PROFILE_ID)
|
|
3042
306
|
};
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
else microtask(function () {
|
|
3055
|
-
callReaction(reaction, state);
|
|
3056
|
-
});
|
|
3057
|
-
return reaction.promise;
|
|
3058
|
-
});
|
|
3059
|
-
|
|
3060
|
-
OwnPromiseCapability = function () {
|
|
3061
|
-
var promise = new Internal();
|
|
3062
|
-
var state = getInternalPromiseState(promise);
|
|
3063
|
-
this.promise = promise;
|
|
3064
|
-
this.resolve = bind$1(internalResolve, state);
|
|
3065
|
-
this.reject = bind$1(internalReject, state);
|
|
307
|
+
}
|
|
308
|
+
function youtubeProfileUrl(profileId) {
|
|
309
|
+
return `${YOUTUBE_BASE_URL}/c/${profileId}`;
|
|
310
|
+
}
|
|
311
|
+
// MARK: PayPal
|
|
312
|
+
const PAYPAL_BASE_URL = `https://paypal.me`;
|
|
313
|
+
const PAYPAL_WEBSITE_LINK_TYPE = 'pp';
|
|
314
|
+
function paypalProfileUrlToWebsiteLink(input) {
|
|
315
|
+
return {
|
|
316
|
+
t: PAYPAL_WEBSITE_LINK_TYPE,
|
|
317
|
+
d: usernameFromUsernameOrWebsiteWithBaseUrlUsername(input)
|
|
3066
318
|
};
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
319
|
+
}
|
|
320
|
+
function paypalProfileUrl(profileId) {
|
|
321
|
+
return `${PAYPAL_BASE_URL}/${profileId}`;
|
|
322
|
+
}
|
|
323
|
+
// MARK: Cashapp
|
|
324
|
+
const CASHAPP_BASE_URL = `https://cash.app`;
|
|
325
|
+
const CASHAPP_USERNAME_PREFIX = '$';
|
|
326
|
+
const CASHAPP_WEBSITE_LINK_TYPE = 'ca';
|
|
327
|
+
function cashappProfileUrlToWebsiteLink(input) {
|
|
328
|
+
return {
|
|
329
|
+
t: CASHAPP_WEBSITE_LINK_TYPE,
|
|
330
|
+
d: usernameFromUsernameOrWebsiteWithBaseUrlUsername(input, CASHAPP_USERNAME_PREFIX)
|
|
3072
331
|
};
|
|
3073
|
-
|
|
3074
|
-
if (isCallable$1(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
|
|
3075
|
-
nativeThen = NativePromisePrototype$1.then;
|
|
3076
|
-
|
|
3077
|
-
if (!NATIVE_PROMISE_SUBCLASSING) {
|
|
3078
|
-
// make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
|
|
3079
|
-
defineBuiltIn$1(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
|
|
3080
|
-
var that = this;
|
|
3081
|
-
return new PromiseConstructor(function (resolve, reject) {
|
|
3082
|
-
call$6(nativeThen, that, resolve, reject);
|
|
3083
|
-
}).then(onFulfilled, onRejected);
|
|
3084
|
-
// https://github.com/zloirock/core-js/issues/640
|
|
3085
|
-
}, { unsafe: true });
|
|
3086
|
-
}
|
|
3087
|
-
|
|
3088
|
-
// make `.constructor === Promise` work for native promise-based APIs
|
|
3089
|
-
try {
|
|
3090
|
-
delete NativePromisePrototype$1.constructor;
|
|
3091
|
-
} catch (error) { /* empty */ }
|
|
3092
|
-
|
|
3093
|
-
// make `instanceof Promise` work for native promise-based APIs
|
|
3094
|
-
if (setPrototypeOf) {
|
|
3095
|
-
setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
|
|
3096
|
-
}
|
|
3097
|
-
}
|
|
3098
332
|
}
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
333
|
+
function cashappProfileUrl(profileId) {
|
|
334
|
+
return `${CASHAPP_BASE_URL}/$${profileId}`;
|
|
335
|
+
}
|
|
336
|
+
// MARK: Venmo
|
|
337
|
+
const VENMO_BASE_URL = `https://account.venmo.com`;
|
|
338
|
+
const VENMO_WEBSITE_LINK_TYPE = 'vn';
|
|
339
|
+
const VENMO_WEBSITE_LINK_ISOLATE_PROFILE_ID = util.isolateWebsitePathFunction({
|
|
340
|
+
ignoredBasePath: 'u',
|
|
341
|
+
isolatePathComponents: 0,
|
|
342
|
+
removeTrailingSlash: true,
|
|
343
|
+
removeQueryParameters: true
|
|
3102
344
|
});
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
var wellKnownSymbol$2 = wellKnownSymbol$e;
|
|
3108
|
-
var Iterators$1 = iterators;
|
|
3109
|
-
|
|
3110
|
-
var ITERATOR$2 = wellKnownSymbol$2('iterator');
|
|
3111
|
-
var ArrayPrototype = Array.prototype;
|
|
3112
|
-
|
|
3113
|
-
// check on default Array iterator
|
|
3114
|
-
var isArrayIteratorMethod$1 = function (it) {
|
|
3115
|
-
return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
|
|
3116
|
-
};
|
|
3117
|
-
|
|
3118
|
-
var classof = classof$4;
|
|
3119
|
-
var getMethod$1 = getMethod$3;
|
|
3120
|
-
var isNullOrUndefined = isNullOrUndefined$4;
|
|
3121
|
-
var Iterators = iterators;
|
|
3122
|
-
var wellKnownSymbol$1 = wellKnownSymbol$e;
|
|
3123
|
-
|
|
3124
|
-
var ITERATOR$1 = wellKnownSymbol$1('iterator');
|
|
3125
|
-
|
|
3126
|
-
var getIteratorMethod$2 = function (it) {
|
|
3127
|
-
if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$1)
|
|
3128
|
-
|| getMethod$1(it, '@@iterator')
|
|
3129
|
-
|| Iterators[classof(it)];
|
|
3130
|
-
};
|
|
3131
|
-
|
|
3132
|
-
var call$5 = functionCall;
|
|
3133
|
-
var aCallable$2 = aCallable$8;
|
|
3134
|
-
var anObject$3 = anObject$b;
|
|
3135
|
-
var tryToString$1 = tryToString$4;
|
|
3136
|
-
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
3137
|
-
|
|
3138
|
-
var $TypeError$1 = TypeError;
|
|
3139
|
-
|
|
3140
|
-
var getIterator$1 = function (argument, usingIterator) {
|
|
3141
|
-
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
|
|
3142
|
-
if (aCallable$2(iteratorMethod)) return anObject$3(call$5(iteratorMethod, argument));
|
|
3143
|
-
throw new $TypeError$1(tryToString$1(argument) + ' is not iterable');
|
|
3144
|
-
};
|
|
3145
|
-
|
|
3146
|
-
var call$4 = functionCall;
|
|
3147
|
-
var anObject$2 = anObject$b;
|
|
3148
|
-
var getMethod = getMethod$3;
|
|
3149
|
-
|
|
3150
|
-
var iteratorClose$1 = function (iterator, kind, value) {
|
|
3151
|
-
var innerResult, innerError;
|
|
3152
|
-
anObject$2(iterator);
|
|
3153
|
-
try {
|
|
3154
|
-
innerResult = getMethod(iterator, 'return');
|
|
3155
|
-
if (!innerResult) {
|
|
3156
|
-
if (kind === 'throw') throw value;
|
|
3157
|
-
return value;
|
|
3158
|
-
}
|
|
3159
|
-
innerResult = call$4(innerResult, iterator);
|
|
3160
|
-
} catch (error) {
|
|
3161
|
-
innerError = true;
|
|
3162
|
-
innerResult = error;
|
|
3163
|
-
}
|
|
3164
|
-
if (kind === 'throw') throw value;
|
|
3165
|
-
if (innerError) throw innerResult;
|
|
3166
|
-
anObject$2(innerResult);
|
|
3167
|
-
return value;
|
|
3168
|
-
};
|
|
3169
|
-
|
|
3170
|
-
var bind = functionBindContext;
|
|
3171
|
-
var call$3 = functionCall;
|
|
3172
|
-
var anObject$1 = anObject$b;
|
|
3173
|
-
var tryToString = tryToString$4;
|
|
3174
|
-
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
3175
|
-
var lengthOfArrayLike = lengthOfArrayLike$2;
|
|
3176
|
-
var isPrototypeOf = objectIsPrototypeOf;
|
|
3177
|
-
var getIterator = getIterator$1;
|
|
3178
|
-
var getIteratorMethod = getIteratorMethod$2;
|
|
3179
|
-
var iteratorClose = iteratorClose$1;
|
|
3180
|
-
|
|
3181
|
-
var $TypeError = TypeError;
|
|
3182
|
-
|
|
3183
|
-
var Result = function (stopped, result) {
|
|
3184
|
-
this.stopped = stopped;
|
|
3185
|
-
this.result = result;
|
|
3186
|
-
};
|
|
3187
|
-
|
|
3188
|
-
var ResultPrototype = Result.prototype;
|
|
3189
|
-
|
|
3190
|
-
var iterate$2 = function (iterable, unboundFunction, options) {
|
|
3191
|
-
var that = options && options.that;
|
|
3192
|
-
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
3193
|
-
var IS_RECORD = !!(options && options.IS_RECORD);
|
|
3194
|
-
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
3195
|
-
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
3196
|
-
var fn = bind(unboundFunction, that);
|
|
3197
|
-
var iterator, iterFn, index, length, result, next, step;
|
|
3198
|
-
|
|
3199
|
-
var stop = function (condition) {
|
|
3200
|
-
if (iterator) iteratorClose(iterator, 'normal', condition);
|
|
3201
|
-
return new Result(true, condition);
|
|
345
|
+
function venmoProfileUrlToWebsiteLink(input) {
|
|
346
|
+
return {
|
|
347
|
+
t: VENMO_WEBSITE_LINK_TYPE,
|
|
348
|
+
d: usernameFromUsernameOrWebsiteWithOneOffBaseUrlUsername(input, VENMO_WEBSITE_LINK_ISOLATE_PROFILE_ID)
|
|
3202
349
|
};
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
350
|
+
}
|
|
351
|
+
function venmoProfileUrl(profileId) {
|
|
352
|
+
return `${VENMO_BASE_URL}/u/${profileId}`;
|
|
353
|
+
}
|
|
354
|
+
// MARK: Spotify
|
|
355
|
+
const SPOTIFY_BASE_URL = `https://open.spotify.com/`;
|
|
356
|
+
const SPOTIFY_WEBSITE_LINK_TYPE = 'sp';
|
|
357
|
+
const SPOTIFY_WEBSITE_LINK_ISOLATE_PROFILE_ID = util.isolateWebsitePathFunction({
|
|
358
|
+
ignoredBasePath: 'user',
|
|
359
|
+
isolatePathComponents: 0,
|
|
360
|
+
removeTrailingSlash: true,
|
|
361
|
+
removeQueryParameters: true
|
|
362
|
+
});
|
|
363
|
+
function spotifyProfileUrlToWebsiteLink(input) {
|
|
364
|
+
return {
|
|
365
|
+
t: SPOTIFY_WEBSITE_LINK_TYPE,
|
|
366
|
+
d: usernameFromUsernameOrWebsiteWithOneOffBaseUrlUsername(input, SPOTIFY_WEBSITE_LINK_ISOLATE_PROFILE_ID)
|
|
3209
367
|
};
|
|
368
|
+
}
|
|
369
|
+
function spotifyProfileUrl(profileId) {
|
|
370
|
+
return `${SPOTIFY_BASE_URL}/user/${profileId}`;
|
|
371
|
+
}
|
|
3210
372
|
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
result = callFn(step.value);
|
|
3232
|
-
} catch (error) {
|
|
3233
|
-
iteratorClose(iterator, 'throw', error);
|
|
3234
|
-
}
|
|
3235
|
-
if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
3236
|
-
} return new Result(false);
|
|
3237
|
-
};
|
|
3238
|
-
|
|
3239
|
-
var wellKnownSymbol = wellKnownSymbol$e;
|
|
3240
|
-
|
|
3241
|
-
var ITERATOR = wellKnownSymbol('iterator');
|
|
3242
|
-
var SAFE_CLOSING = false;
|
|
3243
|
-
|
|
3244
|
-
try {
|
|
3245
|
-
var called = 0;
|
|
3246
|
-
var iteratorWithReturn = {
|
|
3247
|
-
next: function () {
|
|
3248
|
-
return { done: !!called++ };
|
|
3249
|
-
},
|
|
3250
|
-
'return': function () {
|
|
3251
|
-
SAFE_CLOSING = true;
|
|
3252
|
-
}
|
|
373
|
+
const GRANTED_SYS_ADMIN_ROLE_KEY = 'sysadmin';
|
|
374
|
+
const GRANTED_OWNER_ROLE_KEY = 'owner';
|
|
375
|
+
const GRANTED_ADMIN_ROLE_KEY = 'admin';
|
|
376
|
+
/**
|
|
377
|
+
* Returns true if the input role is a GrantedAdminRole or a GrantedOwnerRole.
|
|
378
|
+
*
|
|
379
|
+
* @param role
|
|
380
|
+
* @returns
|
|
381
|
+
*/
|
|
382
|
+
function isGrantedAdminLevelRole(role) {
|
|
383
|
+
return role === GRANTED_ADMIN_ROLE_KEY || role === GRANTED_OWNER_ROLE_KEY;
|
|
384
|
+
}
|
|
385
|
+
const GRANTED_READ_ROLE_KEY = 'read';
|
|
386
|
+
const GRANTED_UPDATE_ROLE_KEY = 'update';
|
|
387
|
+
const GRANTED_DELETE_ROLE_KEY = 'delete';
|
|
388
|
+
const FULL_ACCESS_ROLE_KEY = '__FULL__';
|
|
389
|
+
const NO_ACCESS_ROLE_KEY = '__EMPTY__';
|
|
390
|
+
function noAccessRoleMap() {
|
|
391
|
+
return {
|
|
392
|
+
[NO_ACCESS_ROLE_KEY]: true
|
|
3253
393
|
};
|
|
3254
|
-
|
|
3255
|
-
|
|
394
|
+
}
|
|
395
|
+
function isNoAccessRoleMap(input) {
|
|
396
|
+
return input[NO_ACCESS_ROLE_KEY] === true;
|
|
397
|
+
}
|
|
398
|
+
function fullAccessRoleMap() {
|
|
399
|
+
return {
|
|
400
|
+
[FULL_ACCESS_ROLE_KEY]: true
|
|
3256
401
|
};
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
402
|
+
}
|
|
403
|
+
function isFullAccessRoleMap(input) {
|
|
404
|
+
return input[FULL_ACCESS_ROLE_KEY] === true;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Creates a GrantedRoleMapReader.
|
|
408
|
+
*
|
|
409
|
+
* @param map
|
|
410
|
+
* @returns
|
|
411
|
+
*/
|
|
412
|
+
function grantedRoleMapReader(map) {
|
|
413
|
+
return new GrantedRoleMapReaderInstance(map);
|
|
414
|
+
}
|
|
415
|
+
class GrantedRoleMapReaderInstance {
|
|
416
|
+
constructor(map) {
|
|
417
|
+
this._map = void 0;
|
|
418
|
+
this._map = map;
|
|
419
|
+
}
|
|
420
|
+
hasNoAccess() {
|
|
421
|
+
return this._map[NO_ACCESS_ROLE_KEY];
|
|
422
|
+
}
|
|
423
|
+
truthMap(input) {
|
|
424
|
+
const result = {};
|
|
425
|
+
util.forEachKeyValue(input, {
|
|
426
|
+
forEach: ([role, value]) => {
|
|
427
|
+
if (this.hasRole(role)) {
|
|
428
|
+
result[role] = value;
|
|
3272
429
|
}
|
|
3273
|
-
}
|
|
3274
|
-
};
|
|
3275
|
-
exec(object);
|
|
3276
|
-
} catch (error) { /* empty */ }
|
|
3277
|
-
return ITERATION_SUPPORT;
|
|
3278
|
-
};
|
|
3279
|
-
|
|
3280
|
-
var NativePromiseConstructor$1 = promiseNativeConstructor;
|
|
3281
|
-
var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
|
|
3282
|
-
var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
|
|
3283
|
-
|
|
3284
|
-
var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
|
|
3285
|
-
NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
|
|
3286
|
-
});
|
|
3287
|
-
|
|
3288
|
-
var $$5 = _export;
|
|
3289
|
-
var call$2 = functionCall;
|
|
3290
|
-
var aCallable$1 = aCallable$8;
|
|
3291
|
-
var newPromiseCapabilityModule$2 = newPromiseCapability$2;
|
|
3292
|
-
var perform$1 = perform$3;
|
|
3293
|
-
var iterate$1 = iterate$2;
|
|
3294
|
-
var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
|
|
3295
|
-
|
|
3296
|
-
// `Promise.all` method
|
|
3297
|
-
// https://tc39.es/ecma262/#sec-promise.all
|
|
3298
|
-
$$5({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
|
|
3299
|
-
all: function all(iterable) {
|
|
3300
|
-
var C = this;
|
|
3301
|
-
var capability = newPromiseCapabilityModule$2.f(C);
|
|
3302
|
-
var resolve = capability.resolve;
|
|
3303
|
-
var reject = capability.reject;
|
|
3304
|
-
var result = perform$1(function () {
|
|
3305
|
-
var $promiseResolve = aCallable$1(C.resolve);
|
|
3306
|
-
var values = [];
|
|
3307
|
-
var counter = 0;
|
|
3308
|
-
var remaining = 1;
|
|
3309
|
-
iterate$1(iterable, function (promise) {
|
|
3310
|
-
var index = counter++;
|
|
3311
|
-
var alreadyCalled = false;
|
|
3312
|
-
remaining++;
|
|
3313
|
-
call$2($promiseResolve, C, promise).then(function (value) {
|
|
3314
|
-
if (alreadyCalled) return;
|
|
3315
|
-
alreadyCalled = true;
|
|
3316
|
-
values[index] = value;
|
|
3317
|
-
--remaining || resolve(values);
|
|
3318
|
-
}, reject);
|
|
3319
|
-
});
|
|
3320
|
-
--remaining || resolve(values);
|
|
430
|
+
}
|
|
3321
431
|
});
|
|
3322
|
-
|
|
3323
|
-
return capability.promise;
|
|
432
|
+
return result;
|
|
3324
433
|
}
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
var $$4 = _export;
|
|
3328
|
-
var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
|
|
3329
|
-
var NativePromiseConstructor = promiseNativeConstructor;
|
|
3330
|
-
var getBuiltIn$1 = getBuiltIn$7;
|
|
3331
|
-
var isCallable = isCallable$k;
|
|
3332
|
-
var defineBuiltIn = defineBuiltIn$5;
|
|
3333
|
-
|
|
3334
|
-
var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
|
|
3335
|
-
|
|
3336
|
-
// `Promise.prototype.catch` method
|
|
3337
|
-
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
|
3338
|
-
$$4({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
|
|
3339
|
-
'catch': function (onRejected) {
|
|
3340
|
-
return this.then(undefined, onRejected);
|
|
434
|
+
hasRole(role) {
|
|
435
|
+
return this.hasRoles('any', role);
|
|
3341
436
|
}
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });
|
|
437
|
+
hasRoles(setIncludes, inputRoles) {
|
|
438
|
+
if (this._map[FULL_ACCESS_ROLE_KEY]) {
|
|
439
|
+
return true;
|
|
440
|
+
} else {
|
|
441
|
+
return this.containsRoles(setIncludes, inputRoles);
|
|
442
|
+
}
|
|
3349
443
|
}
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
var iterate = iterate$2;
|
|
3358
|
-
var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
|
|
3359
|
-
|
|
3360
|
-
// `Promise.race` method
|
|
3361
|
-
// https://tc39.es/ecma262/#sec-promise.race
|
|
3362
|
-
$$3({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
|
|
3363
|
-
race: function race(iterable) {
|
|
3364
|
-
var C = this;
|
|
3365
|
-
var capability = newPromiseCapabilityModule$1.f(C);
|
|
3366
|
-
var reject = capability.reject;
|
|
3367
|
-
var result = perform(function () {
|
|
3368
|
-
var $promiseResolve = aCallable(C.resolve);
|
|
3369
|
-
iterate(iterable, function (promise) {
|
|
3370
|
-
call$1($promiseResolve, C, promise).then(capability.resolve, reject);
|
|
3371
|
-
});
|
|
3372
|
-
});
|
|
3373
|
-
if (result.error) reject(result.value);
|
|
3374
|
-
return capability.promise;
|
|
444
|
+
containsRoles(setIncludes, inputRoles) {
|
|
445
|
+
const roles = util.iterableToArray(inputRoles);
|
|
446
|
+
if (setIncludes === 'any') {
|
|
447
|
+
return this.containsAnyRole(roles);
|
|
448
|
+
} else {
|
|
449
|
+
return this.containsEachRole(roles);
|
|
450
|
+
}
|
|
3375
451
|
}
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
// https://tc39.es/ecma262/#sec-promise.reject
|
|
3384
|
-
$$2({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
|
|
3385
|
-
reject: function reject(r) {
|
|
3386
|
-
var capability = newPromiseCapabilityModule.f(this);
|
|
3387
|
-
var capabilityReject = capability.reject;
|
|
3388
|
-
capabilityReject(r);
|
|
3389
|
-
return capability.promise;
|
|
452
|
+
containsAnyRole(roles) {
|
|
453
|
+
for (const role of roles) {
|
|
454
|
+
if (this._map[role]) {
|
|
455
|
+
return true;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
return false;
|
|
3390
459
|
}
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
anObject(C);
|
|
3399
|
-
if (isObject(x) && x.constructor === C) return x;
|
|
3400
|
-
var promiseCapability = newPromiseCapability.f(C);
|
|
3401
|
-
var resolve = promiseCapability.resolve;
|
|
3402
|
-
resolve(x);
|
|
3403
|
-
return promiseCapability.promise;
|
|
3404
|
-
};
|
|
3405
|
-
|
|
3406
|
-
var $$1 = _export;
|
|
3407
|
-
var getBuiltIn = getBuiltIn$7;
|
|
3408
|
-
var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
|
|
3409
|
-
var promiseResolve = promiseResolve$1;
|
|
3410
|
-
|
|
3411
|
-
getBuiltIn('Promise');
|
|
3412
|
-
|
|
3413
|
-
// `Promise.resolve` method
|
|
3414
|
-
// https://tc39.es/ecma262/#sec-promise.resolve
|
|
3415
|
-
$$1({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
|
3416
|
-
resolve: function resolve(x) {
|
|
3417
|
-
return promiseResolve(this, x);
|
|
460
|
+
containsEachRole(roles) {
|
|
461
|
+
for (const role of roles) {
|
|
462
|
+
if (!this._map[role]) {
|
|
463
|
+
return false;
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
return true;
|
|
3418
467
|
}
|
|
3419
|
-
}
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Converts the input array of roles to a GrantedRoleKeysMap.
|
|
471
|
+
*
|
|
472
|
+
* @param roles
|
|
473
|
+
* @returns
|
|
474
|
+
*/
|
|
475
|
+
function grantedRoleKeysMapFromArray(roles, value = true) {
|
|
476
|
+
return util.arrayToObject(roles, x => x, () => value);
|
|
477
|
+
}
|
|
3420
478
|
|
|
3421
479
|
function noAccessContextGrantedModelRoles(context, data) {
|
|
3422
480
|
return contextGrantedModelRoles(context, data, noAccessRoleMap());
|
|
@@ -3516,73 +574,6 @@ const TransformCommaSeparatedStringValueToArray = () => classTransformer.Transfo
|
|
|
3516
574
|
const TransformCommaSeparatedNumberValueToArray = () => classTransformer.Transform(transformCommaSeparatedNumberValueToArray);
|
|
3517
575
|
const TransformStringValueToBoolean = () => classTransformer.Transform(transformStringToBoolean());
|
|
3518
576
|
|
|
3519
|
-
var DESCRIPTORS = descriptors;
|
|
3520
|
-
var uncurryThis = functionUncurryThis;
|
|
3521
|
-
var call = functionCall;
|
|
3522
|
-
var fails = fails$g;
|
|
3523
|
-
var objectKeys = objectKeys$2;
|
|
3524
|
-
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
3525
|
-
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
3526
|
-
var toObject = toObject$3;
|
|
3527
|
-
var IndexedObject = indexedObject;
|
|
3528
|
-
|
|
3529
|
-
// eslint-disable-next-line es/no-object-assign -- safe
|
|
3530
|
-
var $assign = Object.assign;
|
|
3531
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
3532
|
-
var defineProperty = Object.defineProperty;
|
|
3533
|
-
var concat = uncurryThis([].concat);
|
|
3534
|
-
|
|
3535
|
-
// `Object.assign` method
|
|
3536
|
-
// https://tc39.es/ecma262/#sec-object.assign
|
|
3537
|
-
var objectAssign = !$assign || fails(function () {
|
|
3538
|
-
// should have correct order of operations (Edge bug)
|
|
3539
|
-
if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
|
|
3540
|
-
enumerable: true,
|
|
3541
|
-
get: function () {
|
|
3542
|
-
defineProperty(this, 'b', {
|
|
3543
|
-
value: 3,
|
|
3544
|
-
enumerable: false
|
|
3545
|
-
});
|
|
3546
|
-
}
|
|
3547
|
-
}), { b: 2 })).b !== 1) return true;
|
|
3548
|
-
// should work with symbols and should have deterministic property order (V8 bug)
|
|
3549
|
-
var A = {};
|
|
3550
|
-
var B = {};
|
|
3551
|
-
// eslint-disable-next-line es/no-symbol -- safe
|
|
3552
|
-
var symbol = Symbol('assign detection');
|
|
3553
|
-
var alphabet = 'abcdefghijklmnopqrst';
|
|
3554
|
-
A[symbol] = 7;
|
|
3555
|
-
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
3556
|
-
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
3557
|
-
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
3558
|
-
var T = toObject(target);
|
|
3559
|
-
var argumentsLength = arguments.length;
|
|
3560
|
-
var index = 1;
|
|
3561
|
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
3562
|
-
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
3563
|
-
while (argumentsLength > index) {
|
|
3564
|
-
var S = IndexedObject(arguments[index++]);
|
|
3565
|
-
var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
3566
|
-
var length = keys.length;
|
|
3567
|
-
var j = 0;
|
|
3568
|
-
var key;
|
|
3569
|
-
while (length > j) {
|
|
3570
|
-
key = keys[j++];
|
|
3571
|
-
if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
3572
|
-
}
|
|
3573
|
-
} return T;
|
|
3574
|
-
} : $assign;
|
|
3575
|
-
|
|
3576
|
-
var $ = _export;
|
|
3577
|
-
var assign = objectAssign;
|
|
3578
|
-
|
|
3579
|
-
// `Object.assign` method
|
|
3580
|
-
// https://tc39.es/ecma262/#sec-object.assign
|
|
3581
|
-
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
3582
|
-
$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
3583
|
-
assign: assign
|
|
3584
|
-
});
|
|
3585
|
-
|
|
3586
577
|
function transformAndValidateObject(config) {
|
|
3587
578
|
const transformToResult = transformAndValidateObjectResult(config);
|
|
3588
579
|
const {
|
|
@@ -3618,7 +609,7 @@ function transformAndValidateObjectFactory(defaults) {
|
|
|
3618
609
|
const config = {
|
|
3619
610
|
classType,
|
|
3620
611
|
fn,
|
|
3621
|
-
handleValidationError: handleValidationError
|
|
612
|
+
handleValidationError: handleValidationError ?? defaultHandleValidationError,
|
|
3622
613
|
optionsForContext,
|
|
3623
614
|
defaultValidationOptions
|
|
3624
615
|
};
|
|
@@ -3639,19 +630,23 @@ function transformAndValidateObjectResult(config) {
|
|
|
3639
630
|
fn,
|
|
3640
631
|
optionsForContext: inputOptionsForContext
|
|
3641
632
|
} = config;
|
|
3642
|
-
const optionsForContext = inputOptionsForContext
|
|
633
|
+
const optionsForContext = inputOptionsForContext ?? (() => ({}));
|
|
3643
634
|
return async (input, context) => {
|
|
3644
635
|
const {
|
|
3645
636
|
transform: transformOptions,
|
|
3646
637
|
validate: validateOptions
|
|
3647
638
|
} = optionsForContext(context);
|
|
3648
|
-
const object = classTransformer.plainToInstance(classType, input,
|
|
639
|
+
const object = classTransformer.plainToInstance(classType, input, {
|
|
640
|
+
...transformOptions,
|
|
3649
641
|
// Note: Each variable on the target class must be marked with the @Expose() annotation.
|
|
3650
642
|
excludeExtraneousValues: true
|
|
3651
|
-
})
|
|
3652
|
-
const validationErrors = await classValidator.validate(object,
|
|
3653
|
-
forbidUnknownValues: false
|
|
3654
|
-
|
|
643
|
+
});
|
|
644
|
+
const validationErrors = await classValidator.validate(object, {
|
|
645
|
+
forbidUnknownValues: false,
|
|
646
|
+
// allow classes without annotations by default
|
|
647
|
+
...defaultValidationOptions,
|
|
648
|
+
...validateOptions
|
|
649
|
+
});
|
|
3655
650
|
if (validationErrors.length) {
|
|
3656
651
|
return {
|
|
3657
652
|
object,
|
|
@@ -3717,7 +712,7 @@ function IsISO8601DayString(validationOptions) {
|
|
|
3717
712
|
options: validationOptions,
|
|
3718
713
|
validator: {
|
|
3719
714
|
validate: util.isISO8601DayString,
|
|
3720
|
-
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args
|
|
715
|
+
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args?.value}" is not a ISO8601DayString.`, validationOptions)
|
|
3721
716
|
}
|
|
3722
717
|
});
|
|
3723
718
|
};
|
|
@@ -3735,7 +730,7 @@ function IsMinuteOfDay(validationOptions) {
|
|
|
3735
730
|
options: validationOptions,
|
|
3736
731
|
validator: {
|
|
3737
732
|
validate: util.isMinuteOfDay,
|
|
3738
|
-
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args
|
|
733
|
+
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args?.value}" is not a valid minute of the day.`, validationOptions)
|
|
3739
734
|
}
|
|
3740
735
|
});
|
|
3741
736
|
};
|
|
@@ -3753,7 +748,7 @@ function IsE164PhoneNumber(validationOptions) {
|
|
|
3753
748
|
options: validationOptions,
|
|
3754
749
|
validator: {
|
|
3755
750
|
validate: x => util.isE164PhoneNumber(x, false),
|
|
3756
|
-
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args
|
|
751
|
+
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args?.value}" is not a E164PhoneNumber with no extension.`, validationOptions)
|
|
3757
752
|
}
|
|
3758
753
|
});
|
|
3759
754
|
};
|
|
@@ -3773,7 +768,7 @@ function IsE164PhoneNumberWithOptionalExtension(validationOptions) {
|
|
|
3773
768
|
options: validationOptions,
|
|
3774
769
|
validator: {
|
|
3775
770
|
validate: x => util.isE164PhoneNumber(x, true),
|
|
3776
|
-
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args
|
|
771
|
+
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args?.value}" is not an E164PhoneNumber or has an invalid extension.`, validationOptions)
|
|
3777
772
|
}
|
|
3778
773
|
});
|
|
3779
774
|
};
|
|
@@ -3793,7 +788,7 @@ function IsE164PhoneNumberWithExtension(validationOptions) {
|
|
|
3793
788
|
options: validationOptions,
|
|
3794
789
|
validator: {
|
|
3795
790
|
validate: util.isE164PhoneNumberWithExtension,
|
|
3796
|
-
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args
|
|
791
|
+
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args?.value}" is not a E164PhoneNumberWithExtension.`, validationOptions)
|
|
3797
792
|
}
|
|
3798
793
|
});
|
|
3799
794
|
};
|
|
@@ -3830,7 +825,7 @@ function IsWebsiteUrl(validationOptions) {
|
|
|
3830
825
|
options: validationOptions,
|
|
3831
826
|
validator: {
|
|
3832
827
|
validate: util.isWebsiteUrl,
|
|
3833
|
-
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args
|
|
828
|
+
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args?.value}" is not a valid website url.`, validationOptions)
|
|
3834
829
|
}
|
|
3835
830
|
});
|
|
3836
831
|
};
|
|
@@ -3847,7 +842,7 @@ function IsWebsiteUrlWithPrefix(validationOptions) {
|
|
|
3847
842
|
options: validationOptions,
|
|
3848
843
|
validator: {
|
|
3849
844
|
validate: util.isWebsiteUrlWithPrefix,
|
|
3850
|
-
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args
|
|
845
|
+
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args?.value}" is not a valid website url that starts with a http/https prefix.`, validationOptions)
|
|
3851
846
|
}
|
|
3852
847
|
});
|
|
3853
848
|
};
|