@localazy/cdn-client 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
5
5
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
6
6
  return value;
7
7
  };
8
- /* @localazy/cdn-client@1.2.1
8
+ /* @localazy/cdn-client@1.3.0
9
9
  * (c) 2024 Localazy <team@localazy.com>
10
10
  * @license MIT */
11
11
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
@@ -27,468 +27,22 @@ class Api {
27
27
  return await this.context.client.get(this.context.metafile.params.jsonPath);
28
28
  }
29
29
  }
30
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
31
- function getDefaultExportFromCjs(x) {
32
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
33
- }
34
- var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
35
- var _freeGlobal = freeGlobal$1;
36
- var freeGlobal = _freeGlobal;
37
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
38
- var root$8 = freeGlobal || freeSelf || Function("return this")();
39
- var _root = root$8;
40
- var root$7 = _root;
41
- var Symbol$6 = root$7.Symbol;
42
- var _Symbol = Symbol$6;
43
- var Symbol$5 = _Symbol;
44
- var objectProto$f = Object.prototype;
45
- var hasOwnProperty$c = objectProto$f.hasOwnProperty;
46
- var nativeObjectToString$1 = objectProto$f.toString;
47
- var symToStringTag$1 = Symbol$5 ? Symbol$5.toStringTag : void 0;
48
- function getRawTag$1(value) {
49
- var isOwn = hasOwnProperty$c.call(value, symToStringTag$1), tag = value[symToStringTag$1];
50
- try {
51
- value[symToStringTag$1] = void 0;
52
- var unmasked = true;
53
- } catch (e) {
54
- }
55
- var result = nativeObjectToString$1.call(value);
56
- if (unmasked) {
57
- if (isOwn) {
58
- value[symToStringTag$1] = tag;
59
- } else {
60
- delete value[symToStringTag$1];
61
- }
62
- }
63
- return result;
64
- }
65
- var _getRawTag = getRawTag$1;
66
- var objectProto$e = Object.prototype;
67
- var nativeObjectToString = objectProto$e.toString;
68
- function objectToString$1(value) {
69
- return nativeObjectToString.call(value);
70
- }
71
- var _objectToString = objectToString$1;
72
- var Symbol$4 = _Symbol, getRawTag = _getRawTag, objectToString = _objectToString;
73
- var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
74
- var symToStringTag = Symbol$4 ? Symbol$4.toStringTag : void 0;
75
- function baseGetTag$7(value) {
76
- if (value == null) {
77
- return value === void 0 ? undefinedTag : nullTag;
78
- }
79
- return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
80
- }
81
- var _baseGetTag = baseGetTag$7;
82
- function isObject$7(value) {
83
- var type = typeof value;
84
- return value != null && (type == "object" || type == "function");
85
- }
86
- var isObject_1 = isObject$7;
87
- var baseGetTag$6 = _baseGetTag, isObject$6 = isObject_1;
88
- var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
89
- function isFunction$2(value) {
90
- if (!isObject$6(value)) {
91
- return false;
92
- }
93
- var tag = baseGetTag$6(value);
94
- return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
95
- }
96
- var isFunction_1 = isFunction$2;
97
- const isFunction$3 = /* @__PURE__ */ getDefaultExportFromCjs(isFunction_1);
98
- var root$6 = _root;
99
- var coreJsData$1 = root$6["__core-js_shared__"];
100
- var _coreJsData = coreJsData$1;
101
- var coreJsData = _coreJsData;
102
- var maskSrcKey = function() {
103
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
104
- return uid ? "Symbol(src)_1." + uid : "";
105
- }();
106
- function isMasked$1(func) {
107
- return !!maskSrcKey && maskSrcKey in func;
108
- }
109
- var _isMasked = isMasked$1;
110
- var funcProto$2 = Function.prototype;
111
- var funcToString$2 = funcProto$2.toString;
112
- function toSource$2(func) {
113
- if (func != null) {
114
- try {
115
- return funcToString$2.call(func);
116
- } catch (e) {
117
- }
118
- try {
119
- return func + "";
120
- } catch (e) {
121
- }
122
- }
123
- return "";
124
- }
125
- var _toSource = toSource$2;
126
- var isFunction$1 = isFunction_1, isMasked = _isMasked, isObject$5 = isObject_1, toSource$1 = _toSource;
127
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
128
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
129
- var funcProto$1 = Function.prototype, objectProto$d = Object.prototype;
130
- var funcToString$1 = funcProto$1.toString;
131
- var hasOwnProperty$b = objectProto$d.hasOwnProperty;
132
- var reIsNative = RegExp(
133
- "^" + funcToString$1.call(hasOwnProperty$b).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
134
- );
135
- function baseIsNative$1(value) {
136
- if (!isObject$5(value) || isMasked(value)) {
137
- return false;
138
- }
139
- var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
140
- return pattern.test(toSource$1(value));
141
- }
142
- var _baseIsNative = baseIsNative$1;
143
- function getValue$1(object, key) {
144
- return object == null ? void 0 : object[key];
145
- }
146
- var _getValue = getValue$1;
147
- var baseIsNative = _baseIsNative, getValue = _getValue;
148
- function getNative$7(object, key) {
149
- var value = getValue(object, key);
150
- return baseIsNative(value) ? value : void 0;
151
- }
152
- var _getNative = getNative$7;
153
- var getNative$6 = _getNative;
154
- var nativeCreate$4 = getNative$6(Object, "create");
155
- var _nativeCreate = nativeCreate$4;
156
- var nativeCreate$3 = _nativeCreate;
157
- function hashClear$1() {
158
- this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
159
- this.size = 0;
160
- }
161
- var _hashClear = hashClear$1;
162
- function hashDelete$1(key) {
163
- var result = this.has(key) && delete this.__data__[key];
164
- this.size -= result ? 1 : 0;
165
- return result;
166
- }
167
- var _hashDelete = hashDelete$1;
168
- var nativeCreate$2 = _nativeCreate;
169
- var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
170
- var objectProto$c = Object.prototype;
171
- var hasOwnProperty$a = objectProto$c.hasOwnProperty;
172
- function hashGet$1(key) {
173
- var data = this.__data__;
174
- if (nativeCreate$2) {
175
- var result = data[key];
176
- return result === HASH_UNDEFINED$2 ? void 0 : result;
177
- }
178
- return hasOwnProperty$a.call(data, key) ? data[key] : void 0;
179
- }
180
- var _hashGet = hashGet$1;
181
- var nativeCreate$1 = _nativeCreate;
182
- var objectProto$b = Object.prototype;
183
- var hasOwnProperty$9 = objectProto$b.hasOwnProperty;
184
- function hashHas$1(key) {
185
- var data = this.__data__;
186
- return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$9.call(data, key);
187
- }
188
- var _hashHas = hashHas$1;
189
- var nativeCreate = _nativeCreate;
190
- var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
191
- function hashSet$1(key, value) {
192
- var data = this.__data__;
193
- this.size += this.has(key) ? 0 : 1;
194
- data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value;
195
- return this;
196
- }
197
- var _hashSet = hashSet$1;
198
- var hashClear = _hashClear, hashDelete = _hashDelete, hashGet = _hashGet, hashHas = _hashHas, hashSet = _hashSet;
199
- function Hash$1(entries) {
200
- var index = -1, length = entries == null ? 0 : entries.length;
201
- this.clear();
202
- while (++index < length) {
203
- var entry = entries[index];
204
- this.set(entry[0], entry[1]);
205
- }
206
- }
207
- Hash$1.prototype.clear = hashClear;
208
- Hash$1.prototype["delete"] = hashDelete;
209
- Hash$1.prototype.get = hashGet;
210
- Hash$1.prototype.has = hashHas;
211
- Hash$1.prototype.set = hashSet;
212
- var _Hash = Hash$1;
213
- function listCacheClear$1() {
214
- this.__data__ = [];
215
- this.size = 0;
216
- }
217
- var _listCacheClear = listCacheClear$1;
218
- function eq$3(value, other) {
219
- return value === other || value !== value && other !== other;
220
- }
221
- var eq_1 = eq$3;
222
- var eq$2 = eq_1;
223
- function assocIndexOf$4(array, key) {
224
- var length = array.length;
225
- while (length--) {
226
- if (eq$2(array[length][0], key)) {
227
- return length;
228
- }
229
- }
230
- return -1;
231
- }
232
- var _assocIndexOf = assocIndexOf$4;
233
- var assocIndexOf$3 = _assocIndexOf;
234
- var arrayProto = Array.prototype;
235
- var splice = arrayProto.splice;
236
- function listCacheDelete$1(key) {
237
- var data = this.__data__, index = assocIndexOf$3(data, key);
238
- if (index < 0) {
239
- return false;
240
- }
241
- var lastIndex = data.length - 1;
242
- if (index == lastIndex) {
243
- data.pop();
244
- } else {
245
- splice.call(data, index, 1);
246
- }
247
- --this.size;
248
- return true;
249
- }
250
- var _listCacheDelete = listCacheDelete$1;
251
- var assocIndexOf$2 = _assocIndexOf;
252
- function listCacheGet$1(key) {
253
- var data = this.__data__, index = assocIndexOf$2(data, key);
254
- return index < 0 ? void 0 : data[index][1];
255
- }
256
- var _listCacheGet = listCacheGet$1;
257
- var assocIndexOf$1 = _assocIndexOf;
258
- function listCacheHas$1(key) {
259
- return assocIndexOf$1(this.__data__, key) > -1;
260
- }
261
- var _listCacheHas = listCacheHas$1;
262
- var assocIndexOf = _assocIndexOf;
263
- function listCacheSet$1(key, value) {
264
- var data = this.__data__, index = assocIndexOf(data, key);
265
- if (index < 0) {
266
- ++this.size;
267
- data.push([key, value]);
268
- } else {
269
- data[index][1] = value;
270
- }
271
- return this;
272
- }
273
- var _listCacheSet = listCacheSet$1;
274
- var listCacheClear = _listCacheClear, listCacheDelete = _listCacheDelete, listCacheGet = _listCacheGet, listCacheHas = _listCacheHas, listCacheSet = _listCacheSet;
275
- function ListCache$4(entries) {
276
- var index = -1, length = entries == null ? 0 : entries.length;
277
- this.clear();
278
- while (++index < length) {
279
- var entry = entries[index];
280
- this.set(entry[0], entry[1]);
281
- }
282
- }
283
- ListCache$4.prototype.clear = listCacheClear;
284
- ListCache$4.prototype["delete"] = listCacheDelete;
285
- ListCache$4.prototype.get = listCacheGet;
286
- ListCache$4.prototype.has = listCacheHas;
287
- ListCache$4.prototype.set = listCacheSet;
288
- var _ListCache = ListCache$4;
289
- var getNative$5 = _getNative, root$5 = _root;
290
- var Map$4 = getNative$5(root$5, "Map");
291
- var _Map = Map$4;
292
- var Hash = _Hash, ListCache$3 = _ListCache, Map$3 = _Map;
293
- function mapCacheClear$1() {
294
- this.size = 0;
295
- this.__data__ = {
296
- "hash": new Hash(),
297
- "map": new (Map$3 || ListCache$3)(),
298
- "string": new Hash()
299
- };
300
- }
301
- var _mapCacheClear = mapCacheClear$1;
302
- function isKeyable$1(value) {
303
- var type = typeof value;
304
- return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
305
- }
306
- var _isKeyable = isKeyable$1;
307
- var isKeyable = _isKeyable;
308
- function getMapData$4(map, key) {
309
- var data = map.__data__;
310
- return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
311
- }
312
- var _getMapData = getMapData$4;
313
- var getMapData$3 = _getMapData;
314
- function mapCacheDelete$1(key) {
315
- var result = getMapData$3(this, key)["delete"](key);
316
- this.size -= result ? 1 : 0;
317
- return result;
318
- }
319
- var _mapCacheDelete = mapCacheDelete$1;
320
- var getMapData$2 = _getMapData;
321
- function mapCacheGet$1(key) {
322
- return getMapData$2(this, key).get(key);
323
- }
324
- var _mapCacheGet = mapCacheGet$1;
325
- var getMapData$1 = _getMapData;
326
- function mapCacheHas$1(key) {
327
- return getMapData$1(this, key).has(key);
328
- }
329
- var _mapCacheHas = mapCacheHas$1;
330
- var getMapData = _getMapData;
331
- function mapCacheSet$1(key, value) {
332
- var data = getMapData(this, key), size = data.size;
333
- data.set(key, value);
334
- this.size += data.size == size ? 0 : 1;
335
- return this;
336
- }
337
- var _mapCacheSet = mapCacheSet$1;
338
- var mapCacheClear = _mapCacheClear, mapCacheDelete = _mapCacheDelete, mapCacheGet = _mapCacheGet, mapCacheHas = _mapCacheHas, mapCacheSet = _mapCacheSet;
339
- function MapCache$3(entries) {
340
- var index = -1, length = entries == null ? 0 : entries.length;
341
- this.clear();
342
- while (++index < length) {
343
- var entry = entries[index];
344
- this.set(entry[0], entry[1]);
345
- }
346
- }
347
- MapCache$3.prototype.clear = mapCacheClear;
348
- MapCache$3.prototype["delete"] = mapCacheDelete;
349
- MapCache$3.prototype.get = mapCacheGet;
350
- MapCache$3.prototype.has = mapCacheHas;
351
- MapCache$3.prototype.set = mapCacheSet;
352
- var _MapCache = MapCache$3;
353
- var HASH_UNDEFINED = "__lodash_hash_undefined__";
354
- function setCacheAdd$1(value) {
355
- this.__data__.set(value, HASH_UNDEFINED);
356
- return this;
357
- }
358
- var _setCacheAdd = setCacheAdd$1;
359
- function setCacheHas$1(value) {
360
- return this.__data__.has(value);
361
- }
362
- var _setCacheHas = setCacheHas$1;
363
- var MapCache$2 = _MapCache, setCacheAdd = _setCacheAdd, setCacheHas = _setCacheHas;
364
- function SetCache$2(values) {
365
- var index = -1, length = values == null ? 0 : values.length;
366
- this.__data__ = new MapCache$2();
367
- while (++index < length) {
368
- this.add(values[index]);
369
- }
370
- }
371
- SetCache$2.prototype.add = SetCache$2.prototype.push = setCacheAdd;
372
- SetCache$2.prototype.has = setCacheHas;
373
- var _SetCache = SetCache$2;
374
- function baseFindIndex$2(array, predicate, fromIndex, fromRight) {
375
- var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
376
- while (fromRight ? index-- : ++index < length) {
377
- if (predicate(array[index], index, array)) {
378
- return index;
379
- }
380
- }
381
- return -1;
382
- }
383
- var _baseFindIndex = baseFindIndex$2;
384
- function baseIsNaN$1(value) {
385
- return value !== value;
386
- }
387
- var _baseIsNaN = baseIsNaN$1;
388
- function strictIndexOf$1(array, value, fromIndex) {
389
- var index = fromIndex - 1, length = array.length;
390
- while (++index < length) {
391
- if (array[index] === value) {
392
- return index;
393
- }
394
- }
395
- return -1;
396
- }
397
- var _strictIndexOf = strictIndexOf$1;
398
- var baseFindIndex$1 = _baseFindIndex, baseIsNaN = _baseIsNaN, strictIndexOf = _strictIndexOf;
399
- function baseIndexOf$1(array, value, fromIndex) {
400
- return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex$1(array, baseIsNaN, fromIndex);
401
- }
402
- var _baseIndexOf = baseIndexOf$1;
403
- var baseIndexOf = _baseIndexOf;
404
- function arrayIncludes$1(array, value) {
405
- var length = array == null ? 0 : array.length;
406
- return !!length && baseIndexOf(array, value, 0) > -1;
407
- }
408
- var _arrayIncludes = arrayIncludes$1;
409
- function arrayIncludesWith$1(array, value, comparator) {
410
- var index = -1, length = array == null ? 0 : array.length;
411
- while (++index < length) {
412
- if (comparator(value, array[index])) {
30
+ const isString = (value) => typeof value === "string";
31
+ const isUndefined = (value) => typeof value === "undefined";
32
+ const isArray = (value) => Array.isArray(value);
33
+ const isPlainObject = (value) => Object.prototype.toString.call(value) === "[object Object]";
34
+ const uniq = (array) => [...new Set(array)];
35
+ const uniqBy = (array, predicate) => {
36
+ const seen = {};
37
+ return array.filter((item) => {
38
+ const key = predicate(item);
39
+ if (!Object.hasOwn(seen, key)) {
40
+ seen[key] = true;
413
41
  return true;
414
42
  }
415
- }
416
- return false;
417
- }
418
- var _arrayIncludesWith = arrayIncludesWith$1;
419
- function cacheHas$2(cache, key) {
420
- return cache.has(key);
421
- }
422
- var _cacheHas = cacheHas$2;
423
- var getNative$4 = _getNative, root$4 = _root;
424
- var Set$2 = getNative$4(root$4, "Set");
425
- var _Set = Set$2;
426
- function noop$1() {
427
- }
428
- var noop_1 = noop$1;
429
- function setToArray$3(set) {
430
- var index = -1, result = Array(set.size);
431
- set.forEach(function(value) {
432
- result[++index] = value;
43
+ return false;
433
44
  });
434
- return result;
435
- }
436
- var _setToArray = setToArray$3;
437
- var Set$1 = _Set, noop = noop_1, setToArray$2 = _setToArray;
438
- var INFINITY$3 = 1 / 0;
439
- var createSet$1 = !(Set$1 && 1 / setToArray$2(new Set$1([, -0]))[1] == INFINITY$3) ? noop : function(values) {
440
- return new Set$1(values);
441
45
  };
442
- var _createSet = createSet$1;
443
- var SetCache$1 = _SetCache, arrayIncludes = _arrayIncludes, arrayIncludesWith = _arrayIncludesWith, cacheHas$1 = _cacheHas, createSet = _createSet, setToArray$1 = _setToArray;
444
- var LARGE_ARRAY_SIZE$1 = 200;
445
- function baseUniq$2(array, iteratee, comparator) {
446
- var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result;
447
- if (comparator) {
448
- isCommon = false;
449
- includes = arrayIncludesWith;
450
- } else if (length >= LARGE_ARRAY_SIZE$1) {
451
- var set = iteratee ? null : createSet(array);
452
- if (set) {
453
- return setToArray$1(set);
454
- }
455
- isCommon = false;
456
- includes = cacheHas$1;
457
- seen = new SetCache$1();
458
- } else {
459
- seen = iteratee ? [] : result;
460
- }
461
- outer:
462
- while (++index < length) {
463
- var value = array[index], computed = iteratee ? iteratee(value) : value;
464
- value = comparator || value !== 0 ? value : 0;
465
- if (isCommon && computed === computed) {
466
- var seenIndex = seen.length;
467
- while (seenIndex--) {
468
- if (seen[seenIndex] === computed) {
469
- continue outer;
470
- }
471
- }
472
- if (iteratee) {
473
- seen.push(computed);
474
- }
475
- result.push(value);
476
- } else if (!includes(seen, computed, comparator)) {
477
- if (seen !== result) {
478
- seen.push(computed);
479
- }
480
- result.push(value);
481
- }
482
- }
483
- return result;
484
- }
485
- var _baseUniq = baseUniq$2;
486
- var baseUniq$1 = _baseUniq;
487
- function uniq(array) {
488
- return array && array.length ? baseUniq$1(array) : [];
489
- }
490
- var uniq_1 = uniq;
491
- const uniq$1 = /* @__PURE__ */ getDefaultExportFromCjs(uniq_1);
492
46
  class MemoryCacheAdapter {
493
47
  constructor() {
494
48
  __publicField(this, "map");
@@ -537,7 +91,7 @@ class LocalesCache {
537
91
  }
538
92
  keyFromMetafile(options) {
539
93
  const { metafileFile, metafileLocale } = options;
540
- const productFlavors = [...uniq$1(metafileFile.productFlavors)].sort().join("-");
94
+ const productFlavors = [...uniq(metafileFile.productFlavors)].sort().join("-");
541
95
  const indices = [
542
96
  this.context.metafile.params.cdnId,
543
97
  metafileFile.id,
@@ -553,20 +107,6 @@ class LocalesCache {
553
107
  return indices.filter((key) => key !== "").join("-");
554
108
  }
555
109
  }
556
- var isArray$b = Array.isArray;
557
- var isArray_1 = isArray$b;
558
- const isArray$c = /* @__PURE__ */ getDefaultExportFromCjs(isArray_1);
559
- function isObjectLike$9(value) {
560
- return value != null && typeof value == "object";
561
- }
562
- var isObjectLike_1 = isObjectLike$9;
563
- var baseGetTag$5 = _baseGetTag, isArray$a = isArray_1, isObjectLike$8 = isObjectLike_1;
564
- var stringTag$4 = "[object String]";
565
- function isString(value) {
566
- return typeof value == "string" || !isArray$a(value) && isObjectLike$8(value) && baseGetTag$5(value) == stringTag$4;
567
- }
568
- var isString_1 = isString;
569
- const isString$1 = /* @__PURE__ */ getDefaultExportFromCjs(isString_1);
570
110
  class CdnBase {
571
111
  constructor(context) {
572
112
  __publicField(this, "context");
@@ -581,785 +121,6 @@ class CdnCache extends CdnBase {
581
121
  });
582
122
  }
583
123
  }
584
- var ListCache$2 = _ListCache;
585
- function stackClear$1() {
586
- this.__data__ = new ListCache$2();
587
- this.size = 0;
588
- }
589
- var _stackClear = stackClear$1;
590
- function stackDelete$1(key) {
591
- var data = this.__data__, result = data["delete"](key);
592
- this.size = data.size;
593
- return result;
594
- }
595
- var _stackDelete = stackDelete$1;
596
- function stackGet$1(key) {
597
- return this.__data__.get(key);
598
- }
599
- var _stackGet = stackGet$1;
600
- function stackHas$1(key) {
601
- return this.__data__.has(key);
602
- }
603
- var _stackHas = stackHas$1;
604
- var ListCache$1 = _ListCache, Map$2 = _Map, MapCache$1 = _MapCache;
605
- var LARGE_ARRAY_SIZE = 200;
606
- function stackSet$1(key, value) {
607
- var data = this.__data__;
608
- if (data instanceof ListCache$1) {
609
- var pairs = data.__data__;
610
- if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
611
- pairs.push([key, value]);
612
- this.size = ++data.size;
613
- return this;
614
- }
615
- data = this.__data__ = new MapCache$1(pairs);
616
- }
617
- data.set(key, value);
618
- this.size = data.size;
619
- return this;
620
- }
621
- var _stackSet = stackSet$1;
622
- var ListCache = _ListCache, stackClear = _stackClear, stackDelete = _stackDelete, stackGet = _stackGet, stackHas = _stackHas, stackSet = _stackSet;
623
- function Stack$3(entries) {
624
- var data = this.__data__ = new ListCache(entries);
625
- this.size = data.size;
626
- }
627
- Stack$3.prototype.clear = stackClear;
628
- Stack$3.prototype["delete"] = stackDelete;
629
- Stack$3.prototype.get = stackGet;
630
- Stack$3.prototype.has = stackHas;
631
- Stack$3.prototype.set = stackSet;
632
- var _Stack = Stack$3;
633
- function arraySome$1(array, predicate) {
634
- var index = -1, length = array == null ? 0 : array.length;
635
- while (++index < length) {
636
- if (predicate(array[index], index, array)) {
637
- return true;
638
- }
639
- }
640
- return false;
641
- }
642
- var _arraySome = arraySome$1;
643
- var SetCache = _SetCache, arraySome = _arraySome, cacheHas = _cacheHas;
644
- var COMPARE_PARTIAL_FLAG$5 = 1, COMPARE_UNORDERED_FLAG$3 = 2;
645
- function equalArrays$2(array, other, bitmask, customizer, equalFunc, stack) {
646
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5, arrLength = array.length, othLength = other.length;
647
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
648
- return false;
649
- }
650
- var arrStacked = stack.get(array);
651
- var othStacked = stack.get(other);
652
- if (arrStacked && othStacked) {
653
- return arrStacked == other && othStacked == array;
654
- }
655
- var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache() : void 0;
656
- stack.set(array, other);
657
- stack.set(other, array);
658
- while (++index < arrLength) {
659
- var arrValue = array[index], othValue = other[index];
660
- if (customizer) {
661
- var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
662
- }
663
- if (compared !== void 0) {
664
- if (compared) {
665
- continue;
666
- }
667
- result = false;
668
- break;
669
- }
670
- if (seen) {
671
- if (!arraySome(other, function(othValue2, othIndex) {
672
- if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
673
- return seen.push(othIndex);
674
- }
675
- })) {
676
- result = false;
677
- break;
678
- }
679
- } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
680
- result = false;
681
- break;
682
- }
683
- }
684
- stack["delete"](array);
685
- stack["delete"](other);
686
- return result;
687
- }
688
- var _equalArrays = equalArrays$2;
689
- var root$3 = _root;
690
- var Uint8Array$2 = root$3.Uint8Array;
691
- var _Uint8Array = Uint8Array$2;
692
- function mapToArray$1(map) {
693
- var index = -1, result = Array(map.size);
694
- map.forEach(function(value, key) {
695
- result[++index] = [key, value];
696
- });
697
- return result;
698
- }
699
- var _mapToArray = mapToArray$1;
700
- var Symbol$3 = _Symbol, Uint8Array$1 = _Uint8Array, eq$1 = eq_1, equalArrays$1 = _equalArrays, mapToArray = _mapToArray, setToArray = _setToArray;
701
- var COMPARE_PARTIAL_FLAG$4 = 1, COMPARE_UNORDERED_FLAG$2 = 2;
702
- var boolTag$3 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", mapTag$5 = "[object Map]", numberTag$3 = "[object Number]", regexpTag$3 = "[object RegExp]", setTag$5 = "[object Set]", stringTag$3 = "[object String]", symbolTag$3 = "[object Symbol]";
703
- var arrayBufferTag$3 = "[object ArrayBuffer]", dataViewTag$4 = "[object DataView]";
704
- var symbolProto$2 = Symbol$3 ? Symbol$3.prototype : void 0, symbolValueOf$1 = symbolProto$2 ? symbolProto$2.valueOf : void 0;
705
- function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack) {
706
- switch (tag) {
707
- case dataViewTag$4:
708
- if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
709
- return false;
710
- }
711
- object = object.buffer;
712
- other = other.buffer;
713
- case arrayBufferTag$3:
714
- if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
715
- return false;
716
- }
717
- return true;
718
- case boolTag$3:
719
- case dateTag$3:
720
- case numberTag$3:
721
- return eq$1(+object, +other);
722
- case errorTag$2:
723
- return object.name == other.name && object.message == other.message;
724
- case regexpTag$3:
725
- case stringTag$3:
726
- return object == other + "";
727
- case mapTag$5:
728
- var convert = mapToArray;
729
- case setTag$5:
730
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
731
- convert || (convert = setToArray);
732
- if (object.size != other.size && !isPartial) {
733
- return false;
734
- }
735
- var stacked = stack.get(object);
736
- if (stacked) {
737
- return stacked == other;
738
- }
739
- bitmask |= COMPARE_UNORDERED_FLAG$2;
740
- stack.set(object, other);
741
- var result = equalArrays$1(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
742
- stack["delete"](object);
743
- return result;
744
- case symbolTag$3:
745
- if (symbolValueOf$1) {
746
- return symbolValueOf$1.call(object) == symbolValueOf$1.call(other);
747
- }
748
- }
749
- return false;
750
- }
751
- var _equalByTag = equalByTag$1;
752
- function arrayPush$2(array, values) {
753
- var index = -1, length = values.length, offset = array.length;
754
- while (++index < length) {
755
- array[offset + index] = values[index];
756
- }
757
- return array;
758
- }
759
- var _arrayPush = arrayPush$2;
760
- var arrayPush$1 = _arrayPush, isArray$9 = isArray_1;
761
- function baseGetAllKeys$2(object, keysFunc, symbolsFunc) {
762
- var result = keysFunc(object);
763
- return isArray$9(object) ? result : arrayPush$1(result, symbolsFunc(object));
764
- }
765
- var _baseGetAllKeys = baseGetAllKeys$2;
766
- function arrayFilter$2(array, predicate) {
767
- var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
768
- while (++index < length) {
769
- var value = array[index];
770
- if (predicate(value, index, array)) {
771
- result[resIndex++] = value;
772
- }
773
- }
774
- return result;
775
- }
776
- var _arrayFilter = arrayFilter$2;
777
- function stubArray$2() {
778
- return [];
779
- }
780
- var stubArray_1 = stubArray$2;
781
- var arrayFilter$1 = _arrayFilter, stubArray$1 = stubArray_1;
782
- var objectProto$a = Object.prototype;
783
- var propertyIsEnumerable$1 = objectProto$a.propertyIsEnumerable;
784
- var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
785
- var getSymbols$3 = !nativeGetSymbols$1 ? stubArray$1 : function(object) {
786
- if (object == null) {
787
- return [];
788
- }
789
- object = Object(object);
790
- return arrayFilter$1(nativeGetSymbols$1(object), function(symbol) {
791
- return propertyIsEnumerable$1.call(object, symbol);
792
- });
793
- };
794
- var _getSymbols = getSymbols$3;
795
- function baseTimes$1(n, iteratee) {
796
- var index = -1, result = Array(n);
797
- while (++index < n) {
798
- result[index] = iteratee(index);
799
- }
800
- return result;
801
- }
802
- var _baseTimes = baseTimes$1;
803
- var baseGetTag$4 = _baseGetTag, isObjectLike$7 = isObjectLike_1;
804
- var argsTag$3 = "[object Arguments]";
805
- function baseIsArguments$1(value) {
806
- return isObjectLike$7(value) && baseGetTag$4(value) == argsTag$3;
807
- }
808
- var _baseIsArguments = baseIsArguments$1;
809
- var baseIsArguments = _baseIsArguments, isObjectLike$6 = isObjectLike_1;
810
- var objectProto$9 = Object.prototype;
811
- var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
812
- var propertyIsEnumerable = objectProto$9.propertyIsEnumerable;
813
- var isArguments$2 = baseIsArguments(/* @__PURE__ */ function() {
814
- return arguments;
815
- }()) ? baseIsArguments : function(value) {
816
- return isObjectLike$6(value) && hasOwnProperty$8.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
817
- };
818
- var isArguments_1 = isArguments$2;
819
- var isBuffer$3 = { exports: {} };
820
- function stubFalse() {
821
- return false;
822
- }
823
- var stubFalse_1 = stubFalse;
824
- isBuffer$3.exports;
825
- (function(module2, exports2) {
826
- var root2 = _root, stubFalse2 = stubFalse_1;
827
- var freeExports = exports2 && !exports2.nodeType && exports2;
828
- var freeModule = freeExports && true && module2 && !module2.nodeType && module2;
829
- var moduleExports = freeModule && freeModule.exports === freeExports;
830
- var Buffer2 = moduleExports ? root2.Buffer : void 0;
831
- var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
832
- var isBuffer2 = nativeIsBuffer || stubFalse2;
833
- module2.exports = isBuffer2;
834
- })(isBuffer$3, isBuffer$3.exports);
835
- var isBufferExports = isBuffer$3.exports;
836
- var MAX_SAFE_INTEGER$1 = 9007199254740991;
837
- var reIsUint = /^(?:0|[1-9]\d*)$/;
838
- function isIndex$2(value, length) {
839
- var type = typeof value;
840
- length = length == null ? MAX_SAFE_INTEGER$1 : length;
841
- return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
842
- }
843
- var _isIndex = isIndex$2;
844
- var MAX_SAFE_INTEGER = 9007199254740991;
845
- function isLength$3(value) {
846
- return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
847
- }
848
- var isLength_1 = isLength$3;
849
- var baseGetTag$3 = _baseGetTag, isLength$2 = isLength_1, isObjectLike$5 = isObjectLike_1;
850
- var argsTag$2 = "[object Arguments]", arrayTag$2 = "[object Array]", boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", errorTag$1 = "[object Error]", funcTag$1 = "[object Function]", mapTag$4 = "[object Map]", numberTag$2 = "[object Number]", objectTag$4 = "[object Object]", regexpTag$2 = "[object RegExp]", setTag$4 = "[object Set]", stringTag$2 = "[object String]", weakMapTag$2 = "[object WeakMap]";
851
- var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$3 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]";
852
- var typedArrayTags = {};
853
- typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;
854
- typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] = typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] = typedArrayTags[objectTag$4] = typedArrayTags[regexpTag$2] = typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] = typedArrayTags[weakMapTag$2] = false;
855
- function baseIsTypedArray$1(value) {
856
- return isObjectLike$5(value) && isLength$2(value.length) && !!typedArrayTags[baseGetTag$3(value)];
857
- }
858
- var _baseIsTypedArray = baseIsTypedArray$1;
859
- function baseUnary$3(func) {
860
- return function(value) {
861
- return func(value);
862
- };
863
- }
864
- var _baseUnary = baseUnary$3;
865
- var _nodeUtil = { exports: {} };
866
- _nodeUtil.exports;
867
- (function(module2, exports2) {
868
- var freeGlobal2 = _freeGlobal;
869
- var freeExports = exports2 && !exports2.nodeType && exports2;
870
- var freeModule = freeExports && true && module2 && !module2.nodeType && module2;
871
- var moduleExports = freeModule && freeModule.exports === freeExports;
872
- var freeProcess = moduleExports && freeGlobal2.process;
873
- var nodeUtil2 = function() {
874
- try {
875
- var types = freeModule && freeModule.require && freeModule.require("util").types;
876
- if (types) {
877
- return types;
878
- }
879
- return freeProcess && freeProcess.binding && freeProcess.binding("util");
880
- } catch (e) {
881
- }
882
- }();
883
- module2.exports = nodeUtil2;
884
- })(_nodeUtil, _nodeUtil.exports);
885
- var _nodeUtilExports = _nodeUtil.exports;
886
- var baseIsTypedArray = _baseIsTypedArray, baseUnary$2 = _baseUnary, nodeUtil$2 = _nodeUtilExports;
887
- var nodeIsTypedArray = nodeUtil$2 && nodeUtil$2.isTypedArray;
888
- var isTypedArray$2 = nodeIsTypedArray ? baseUnary$2(nodeIsTypedArray) : baseIsTypedArray;
889
- var isTypedArray_1 = isTypedArray$2;
890
- var baseTimes = _baseTimes, isArguments$1 = isArguments_1, isArray$8 = isArray_1, isBuffer$2 = isBufferExports, isIndex$1 = _isIndex, isTypedArray$1 = isTypedArray_1;
891
- var objectProto$8 = Object.prototype;
892
- var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
893
- function arrayLikeKeys$2(value, inherited) {
894
- var isArr = isArray$8(value), isArg = !isArr && isArguments$1(value), isBuff = !isArr && !isArg && isBuffer$2(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
895
- for (var key in value) {
896
- if ((inherited || hasOwnProperty$7.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
897
- (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
898
- isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
899
- isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
900
- isIndex$1(key, length)))) {
901
- result.push(key);
902
- }
903
- }
904
- return result;
905
- }
906
- var _arrayLikeKeys = arrayLikeKeys$2;
907
- var objectProto$7 = Object.prototype;
908
- function isPrototype$3(value) {
909
- var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$7;
910
- return value === proto;
911
- }
912
- var _isPrototype = isPrototype$3;
913
- function overArg$2(func, transform) {
914
- return function(arg) {
915
- return func(transform(arg));
916
- };
917
- }
918
- var _overArg = overArg$2;
919
- var overArg$1 = _overArg;
920
- var nativeKeys$1 = overArg$1(Object.keys, Object);
921
- var _nativeKeys = nativeKeys$1;
922
- var isPrototype$2 = _isPrototype, nativeKeys = _nativeKeys;
923
- var objectProto$6 = Object.prototype;
924
- var hasOwnProperty$6 = objectProto$6.hasOwnProperty;
925
- function baseKeys$1(object) {
926
- if (!isPrototype$2(object)) {
927
- return nativeKeys(object);
928
- }
929
- var result = [];
930
- for (var key in Object(object)) {
931
- if (hasOwnProperty$6.call(object, key) && key != "constructor") {
932
- result.push(key);
933
- }
934
- }
935
- return result;
936
- }
937
- var _baseKeys = baseKeys$1;
938
- var isFunction = isFunction_1, isLength$1 = isLength_1;
939
- function isArrayLike$4(value) {
940
- return value != null && isLength$1(value.length) && !isFunction(value);
941
- }
942
- var isArrayLike_1 = isArrayLike$4;
943
- var arrayLikeKeys$1 = _arrayLikeKeys, baseKeys = _baseKeys, isArrayLike$3 = isArrayLike_1;
944
- function keys$6(object) {
945
- return isArrayLike$3(object) ? arrayLikeKeys$1(object) : baseKeys(object);
946
- }
947
- var keys_1 = keys$6;
948
- var baseGetAllKeys$1 = _baseGetAllKeys, getSymbols$2 = _getSymbols, keys$5 = keys_1;
949
- function getAllKeys$2(object) {
950
- return baseGetAllKeys$1(object, keys$5, getSymbols$2);
951
- }
952
- var _getAllKeys = getAllKeys$2;
953
- var getAllKeys$1 = _getAllKeys;
954
- var COMPARE_PARTIAL_FLAG$3 = 1;
955
- var objectProto$5 = Object.prototype;
956
- var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
957
- function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
958
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys$1(object), objLength = objProps.length, othProps = getAllKeys$1(other), othLength = othProps.length;
959
- if (objLength != othLength && !isPartial) {
960
- return false;
961
- }
962
- var index = objLength;
963
- while (index--) {
964
- var key = objProps[index];
965
- if (!(isPartial ? key in other : hasOwnProperty$5.call(other, key))) {
966
- return false;
967
- }
968
- }
969
- var objStacked = stack.get(object);
970
- var othStacked = stack.get(other);
971
- if (objStacked && othStacked) {
972
- return objStacked == other && othStacked == object;
973
- }
974
- var result = true;
975
- stack.set(object, other);
976
- stack.set(other, object);
977
- var skipCtor = isPartial;
978
- while (++index < objLength) {
979
- key = objProps[index];
980
- var objValue = object[key], othValue = other[key];
981
- if (customizer) {
982
- var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
983
- }
984
- if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
985
- result = false;
986
- break;
987
- }
988
- skipCtor || (skipCtor = key == "constructor");
989
- }
990
- if (result && !skipCtor) {
991
- var objCtor = object.constructor, othCtor = other.constructor;
992
- if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
993
- result = false;
994
- }
995
- }
996
- stack["delete"](object);
997
- stack["delete"](other);
998
- return result;
999
- }
1000
- var _equalObjects = equalObjects$1;
1001
- var getNative$3 = _getNative, root$2 = _root;
1002
- var DataView$1 = getNative$3(root$2, "DataView");
1003
- var _DataView = DataView$1;
1004
- var getNative$2 = _getNative, root$1 = _root;
1005
- var Promise$2 = getNative$2(root$1, "Promise");
1006
- var _Promise = Promise$2;
1007
- var getNative$1 = _getNative, root = _root;
1008
- var WeakMap$1 = getNative$1(root, "WeakMap");
1009
- var _WeakMap = WeakMap$1;
1010
- var DataView = _DataView, Map$1 = _Map, Promise$1 = _Promise, Set = _Set, WeakMap = _WeakMap, baseGetTag$2 = _baseGetTag, toSource = _toSource;
1011
- var mapTag$3 = "[object Map]", objectTag$3 = "[object Object]", promiseTag = "[object Promise]", setTag$3 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
1012
- var dataViewTag$2 = "[object DataView]";
1013
- var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
1014
- var getTag$4 = baseGetTag$2;
1015
- if (DataView && getTag$4(new DataView(new ArrayBuffer(1))) != dataViewTag$2 || Map$1 && getTag$4(new Map$1()) != mapTag$3 || Promise$1 && getTag$4(Promise$1.resolve()) != promiseTag || Set && getTag$4(new Set()) != setTag$3 || WeakMap && getTag$4(new WeakMap()) != weakMapTag$1) {
1016
- getTag$4 = function(value) {
1017
- var result = baseGetTag$2(value), Ctor = result == objectTag$3 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
1018
- if (ctorString) {
1019
- switch (ctorString) {
1020
- case dataViewCtorString:
1021
- return dataViewTag$2;
1022
- case mapCtorString:
1023
- return mapTag$3;
1024
- case promiseCtorString:
1025
- return promiseTag;
1026
- case setCtorString:
1027
- return setTag$3;
1028
- case weakMapCtorString:
1029
- return weakMapTag$1;
1030
- }
1031
- }
1032
- return result;
1033
- };
1034
- }
1035
- var _getTag = getTag$4;
1036
- var Stack$2 = _Stack, equalArrays = _equalArrays, equalByTag = _equalByTag, equalObjects = _equalObjects, getTag$3 = _getTag, isArray$7 = isArray_1, isBuffer$1 = isBufferExports, isTypedArray = isTypedArray_1;
1037
- var COMPARE_PARTIAL_FLAG$2 = 1;
1038
- var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", objectTag$2 = "[object Object]";
1039
- var objectProto$4 = Object.prototype;
1040
- var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
1041
- function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack) {
1042
- var objIsArr = isArray$7(object), othIsArr = isArray$7(other), objTag = objIsArr ? arrayTag$1 : getTag$3(object), othTag = othIsArr ? arrayTag$1 : getTag$3(other);
1043
- objTag = objTag == argsTag$1 ? objectTag$2 : objTag;
1044
- othTag = othTag == argsTag$1 ? objectTag$2 : othTag;
1045
- var objIsObj = objTag == objectTag$2, othIsObj = othTag == objectTag$2, isSameTag = objTag == othTag;
1046
- if (isSameTag && isBuffer$1(object)) {
1047
- if (!isBuffer$1(other)) {
1048
- return false;
1049
- }
1050
- objIsArr = true;
1051
- objIsObj = false;
1052
- }
1053
- if (isSameTag && !objIsObj) {
1054
- stack || (stack = new Stack$2());
1055
- return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
1056
- }
1057
- if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
1058
- var objIsWrapped = objIsObj && hasOwnProperty$4.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$4.call(other, "__wrapped__");
1059
- if (objIsWrapped || othIsWrapped) {
1060
- var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
1061
- stack || (stack = new Stack$2());
1062
- return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
1063
- }
1064
- }
1065
- if (!isSameTag) {
1066
- return false;
1067
- }
1068
- stack || (stack = new Stack$2());
1069
- return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
1070
- }
1071
- var _baseIsEqualDeep = baseIsEqualDeep$1;
1072
- var baseIsEqualDeep = _baseIsEqualDeep, isObjectLike$4 = isObjectLike_1;
1073
- function baseIsEqual$2(value, other, bitmask, customizer, stack) {
1074
- if (value === other) {
1075
- return true;
1076
- }
1077
- if (value == null || other == null || !isObjectLike$4(value) && !isObjectLike$4(other)) {
1078
- return value !== value && other !== other;
1079
- }
1080
- return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual$2, stack);
1081
- }
1082
- var _baseIsEqual = baseIsEqual$2;
1083
- var Stack$1 = _Stack, baseIsEqual$1 = _baseIsEqual;
1084
- var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
1085
- function baseIsMatch$1(object, source, matchData, customizer) {
1086
- var index = matchData.length, length = index, noCustomizer = !customizer;
1087
- if (object == null) {
1088
- return !length;
1089
- }
1090
- object = Object(object);
1091
- while (index--) {
1092
- var data = matchData[index];
1093
- if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
1094
- return false;
1095
- }
1096
- }
1097
- while (++index < length) {
1098
- data = matchData[index];
1099
- var key = data[0], objValue = object[key], srcValue = data[1];
1100
- if (noCustomizer && data[2]) {
1101
- if (objValue === void 0 && !(key in object)) {
1102
- return false;
1103
- }
1104
- } else {
1105
- var stack = new Stack$1();
1106
- if (customizer) {
1107
- var result = customizer(objValue, srcValue, key, object, source, stack);
1108
- }
1109
- if (!(result === void 0 ? baseIsEqual$1(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) {
1110
- return false;
1111
- }
1112
- }
1113
- }
1114
- return true;
1115
- }
1116
- var _baseIsMatch = baseIsMatch$1;
1117
- var isObject$4 = isObject_1;
1118
- function isStrictComparable$2(value) {
1119
- return value === value && !isObject$4(value);
1120
- }
1121
- var _isStrictComparable = isStrictComparable$2;
1122
- var isStrictComparable$1 = _isStrictComparable, keys$4 = keys_1;
1123
- function getMatchData$1(object) {
1124
- var result = keys$4(object), length = result.length;
1125
- while (length--) {
1126
- var key = result[length], value = object[key];
1127
- result[length] = [key, value, isStrictComparable$1(value)];
1128
- }
1129
- return result;
1130
- }
1131
- var _getMatchData = getMatchData$1;
1132
- function matchesStrictComparable$2(key, srcValue) {
1133
- return function(object) {
1134
- if (object == null) {
1135
- return false;
1136
- }
1137
- return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
1138
- };
1139
- }
1140
- var _matchesStrictComparable = matchesStrictComparable$2;
1141
- var baseIsMatch = _baseIsMatch, getMatchData = _getMatchData, matchesStrictComparable$1 = _matchesStrictComparable;
1142
- function baseMatches$2(source) {
1143
- var matchData = getMatchData(source);
1144
- if (matchData.length == 1 && matchData[0][2]) {
1145
- return matchesStrictComparable$1(matchData[0][0], matchData[0][1]);
1146
- }
1147
- return function(object) {
1148
- return object === source || baseIsMatch(object, source, matchData);
1149
- };
1150
- }
1151
- var _baseMatches = baseMatches$2;
1152
- var baseGetTag$1 = _baseGetTag, isObjectLike$3 = isObjectLike_1;
1153
- var symbolTag$2 = "[object Symbol]";
1154
- function isSymbol$4(value) {
1155
- return typeof value == "symbol" || isObjectLike$3(value) && baseGetTag$1(value) == symbolTag$2;
1156
- }
1157
- var isSymbol_1 = isSymbol$4;
1158
- var isArray$6 = isArray_1, isSymbol$3 = isSymbol_1;
1159
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
1160
- function isKey$3(value, object) {
1161
- if (isArray$6(value)) {
1162
- return false;
1163
- }
1164
- var type = typeof value;
1165
- if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol$3(value)) {
1166
- return true;
1167
- }
1168
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
1169
- }
1170
- var _isKey = isKey$3;
1171
- var MapCache = _MapCache;
1172
- var FUNC_ERROR_TEXT = "Expected a function";
1173
- function memoize$1(func, resolver) {
1174
- if (typeof func != "function" || resolver != null && typeof resolver != "function") {
1175
- throw new TypeError(FUNC_ERROR_TEXT);
1176
- }
1177
- var memoized = function() {
1178
- var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
1179
- if (cache.has(key)) {
1180
- return cache.get(key);
1181
- }
1182
- var result = func.apply(this, args);
1183
- memoized.cache = cache.set(key, result) || cache;
1184
- return result;
1185
- };
1186
- memoized.cache = new (memoize$1.Cache || MapCache)();
1187
- return memoized;
1188
- }
1189
- memoize$1.Cache = MapCache;
1190
- var memoize_1 = memoize$1;
1191
- var memoize = memoize_1;
1192
- var MAX_MEMOIZE_SIZE = 500;
1193
- function memoizeCapped$1(func) {
1194
- var result = memoize(func, function(key) {
1195
- if (cache.size === MAX_MEMOIZE_SIZE) {
1196
- cache.clear();
1197
- }
1198
- return key;
1199
- });
1200
- var cache = result.cache;
1201
- return result;
1202
- }
1203
- var _memoizeCapped = memoizeCapped$1;
1204
- var memoizeCapped = _memoizeCapped;
1205
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1206
- var reEscapeChar = /\\(\\)?/g;
1207
- var stringToPath$1 = memoizeCapped(function(string) {
1208
- var result = [];
1209
- if (string.charCodeAt(0) === 46) {
1210
- result.push("");
1211
- }
1212
- string.replace(rePropName, function(match, number, quote, subString) {
1213
- result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
1214
- });
1215
- return result;
1216
- });
1217
- var _stringToPath = stringToPath$1;
1218
- function arrayMap$1(array, iteratee) {
1219
- var index = -1, length = array == null ? 0 : array.length, result = Array(length);
1220
- while (++index < length) {
1221
- result[index] = iteratee(array[index], index, array);
1222
- }
1223
- return result;
1224
- }
1225
- var _arrayMap = arrayMap$1;
1226
- var Symbol$2 = _Symbol, arrayMap = _arrayMap, isArray$5 = isArray_1, isSymbol$2 = isSymbol_1;
1227
- var INFINITY$2 = 1 / 0;
1228
- var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : void 0, symbolToString = symbolProto$1 ? symbolProto$1.toString : void 0;
1229
- function baseToString$1(value) {
1230
- if (typeof value == "string") {
1231
- return value;
1232
- }
1233
- if (isArray$5(value)) {
1234
- return arrayMap(value, baseToString$1) + "";
1235
- }
1236
- if (isSymbol$2(value)) {
1237
- return symbolToString ? symbolToString.call(value) : "";
1238
- }
1239
- var result = value + "";
1240
- return result == "0" && 1 / value == -INFINITY$2 ? "-0" : result;
1241
- }
1242
- var _baseToString = baseToString$1;
1243
- var baseToString = _baseToString;
1244
- function toString$1(value) {
1245
- return value == null ? "" : baseToString(value);
1246
- }
1247
- var toString_1 = toString$1;
1248
- var isArray$4 = isArray_1, isKey$2 = _isKey, stringToPath = _stringToPath, toString = toString_1;
1249
- function castPath$2(value, object) {
1250
- if (isArray$4(value)) {
1251
- return value;
1252
- }
1253
- return isKey$2(value, object) ? [value] : stringToPath(toString(value));
1254
- }
1255
- var _castPath = castPath$2;
1256
- var isSymbol$1 = isSymbol_1;
1257
- var INFINITY$1 = 1 / 0;
1258
- function toKey$4(value) {
1259
- if (typeof value == "string" || isSymbol$1(value)) {
1260
- return value;
1261
- }
1262
- var result = value + "";
1263
- return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
1264
- }
1265
- var _toKey = toKey$4;
1266
- var castPath$1 = _castPath, toKey$3 = _toKey;
1267
- function baseGet$2(object, path) {
1268
- path = castPath$1(path, object);
1269
- var index = 0, length = path.length;
1270
- while (object != null && index < length) {
1271
- object = object[toKey$3(path[index++])];
1272
- }
1273
- return index && index == length ? object : void 0;
1274
- }
1275
- var _baseGet = baseGet$2;
1276
- var baseGet$1 = _baseGet;
1277
- function get$1(object, path, defaultValue) {
1278
- var result = object == null ? void 0 : baseGet$1(object, path);
1279
- return result === void 0 ? defaultValue : result;
1280
- }
1281
- var get_1 = get$1;
1282
- function baseHasIn$1(object, key) {
1283
- return object != null && key in Object(object);
1284
- }
1285
- var _baseHasIn = baseHasIn$1;
1286
- var castPath = _castPath, isArguments = isArguments_1, isArray$3 = isArray_1, isIndex = _isIndex, isLength = isLength_1, toKey$2 = _toKey;
1287
- function hasPath$1(object, path, hasFunc) {
1288
- path = castPath(path, object);
1289
- var index = -1, length = path.length, result = false;
1290
- while (++index < length) {
1291
- var key = toKey$2(path[index]);
1292
- if (!(result = object != null && hasFunc(object, key))) {
1293
- break;
1294
- }
1295
- object = object[key];
1296
- }
1297
- if (result || ++index != length) {
1298
- return result;
1299
- }
1300
- length = object == null ? 0 : object.length;
1301
- return !!length && isLength(length) && isIndex(key, length) && (isArray$3(object) || isArguments(object));
1302
- }
1303
- var _hasPath = hasPath$1;
1304
- var baseHasIn = _baseHasIn, hasPath = _hasPath;
1305
- function hasIn$1(object, path) {
1306
- return object != null && hasPath(object, path, baseHasIn);
1307
- }
1308
- var hasIn_1 = hasIn$1;
1309
- var baseIsEqual = _baseIsEqual, get = get_1, hasIn = hasIn_1, isKey$1 = _isKey, isStrictComparable = _isStrictComparable, matchesStrictComparable = _matchesStrictComparable, toKey$1 = _toKey;
1310
- var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
1311
- function baseMatchesProperty$1(path, srcValue) {
1312
- if (isKey$1(path) && isStrictComparable(srcValue)) {
1313
- return matchesStrictComparable(toKey$1(path), srcValue);
1314
- }
1315
- return function(object) {
1316
- var objValue = get(object, path);
1317
- return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
1318
- };
1319
- }
1320
- var _baseMatchesProperty = baseMatchesProperty$1;
1321
- function identity$1(value) {
1322
- return value;
1323
- }
1324
- var identity_1 = identity$1;
1325
- function baseProperty$1(key) {
1326
- return function(object) {
1327
- return object == null ? void 0 : object[key];
1328
- };
1329
- }
1330
- var _baseProperty = baseProperty$1;
1331
- var baseGet = _baseGet;
1332
- function basePropertyDeep$1(path) {
1333
- return function(object) {
1334
- return baseGet(object, path);
1335
- };
1336
- }
1337
- var _basePropertyDeep = basePropertyDeep$1;
1338
- var baseProperty = _baseProperty, basePropertyDeep = _basePropertyDeep, isKey = _isKey, toKey = _toKey;
1339
- function property$1(path) {
1340
- return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
1341
- }
1342
- var property_1 = property$1;
1343
- var baseMatches$1 = _baseMatches, baseMatchesProperty = _baseMatchesProperty, identity = identity_1, isArray$2 = isArray_1, property = property_1;
1344
- function baseIteratee$4(value) {
1345
- if (typeof value == "function") {
1346
- return value;
1347
- }
1348
- if (value == null) {
1349
- return identity;
1350
- }
1351
- if (typeof value == "object") {
1352
- return isArray$2(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches$1(value);
1353
- }
1354
- return property(value);
1355
- }
1356
- var _baseIteratee = baseIteratee$4;
1357
- var baseIteratee$3 = _baseIteratee, baseUniq = _baseUniq;
1358
- function uniqBy(array, iteratee) {
1359
- return array && array.length ? baseUniq(array, baseIteratee$3(iteratee)) : [];
1360
- }
1361
- var uniqBy_1 = uniqBy;
1362
- const uniqBy$1 = /* @__PURE__ */ getDefaultExportFromCjs(uniqBy_1);
1363
124
  class MetafileLocale {
1364
125
  constructor(options, baseLocale) {
1365
126
  __publicField(this, "language");
@@ -1515,7 +276,7 @@ class MetafileData {
1515
276
  },
1516
277
  []
1517
278
  );
1518
- return uniqBy$1(locales, (cdnLocale) => cdnLocale.locale);
279
+ return uniqBy(locales, (cdnLocale) => cdnLocale.locale);
1519
280
  }
1520
281
  }
1521
282
  class MetafileParams {
@@ -1542,12 +303,12 @@ class MetafileParams {
1542
303
  } catch (e) {
1543
304
  throw new Error('Invalid param: "options.metafile" cannot be parsed as url.');
1544
305
  }
1545
- const matches2 = url.pathname.match(/^\/(.*?)\/(.*?)\.(v2.json|js|ts)$/);
1546
- if (matches2 === null || matches2.length !== 4) {
306
+ const matches = url.pathname.match(/^\/(.*?)\/(.*?)\.(v2.json|js|ts)$/);
307
+ if (matches === null || matches.length !== 4) {
1547
308
  throw new Error('Invalid param: "options.metafile" contains invalid metafile url.');
1548
309
  }
1549
- const cdnId = matches2[1];
1550
- const tagId = matches2[2];
310
+ const cdnId = matches[1];
311
+ const tagId = matches[2];
1551
312
  return {
1552
313
  url: metafileUrl,
1553
314
  baseUrl: url.origin,
@@ -1639,587 +400,9 @@ class Context {
1639
400
  this.responseFactory = new ResponseFactory(this);
1640
401
  }
1641
402
  }
1642
- function createBaseFor$1(fromRight) {
1643
- return function(object, iteratee, keysFunc) {
1644
- var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
1645
- while (length--) {
1646
- var key = props[fromRight ? length : ++index];
1647
- if (iteratee(iterable[key], key, iterable) === false) {
1648
- break;
1649
- }
1650
- }
1651
- return object;
1652
- };
1653
- }
1654
- var _createBaseFor = createBaseFor$1;
1655
- var createBaseFor = _createBaseFor;
1656
- var baseFor$1 = createBaseFor();
1657
- var _baseFor = baseFor$1;
1658
- var baseFor = _baseFor, keys$3 = keys_1;
1659
- function baseForOwn$1(object, iteratee) {
1660
- return object && baseFor(object, iteratee, keys$3);
1661
- }
1662
- var _baseForOwn = baseForOwn$1;
1663
- var isArrayLike$2 = isArrayLike_1;
1664
- function createBaseEach$1(eachFunc, fromRight) {
1665
- return function(collection, iteratee) {
1666
- if (collection == null) {
1667
- return collection;
1668
- }
1669
- if (!isArrayLike$2(collection)) {
1670
- return eachFunc(collection, iteratee);
1671
- }
1672
- var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
1673
- while (fromRight ? index-- : ++index < length) {
1674
- if (iteratee(iterable[index], index, iterable) === false) {
1675
- break;
1676
- }
1677
- }
1678
- return collection;
1679
- };
1680
- }
1681
- var _createBaseEach = createBaseEach$1;
1682
- var baseForOwn = _baseForOwn, createBaseEach = _createBaseEach;
1683
- var baseEach$1 = createBaseEach(baseForOwn);
1684
- var _baseEach = baseEach$1;
1685
- var baseEach = _baseEach;
1686
- function baseFilter$1(collection, predicate) {
1687
- var result = [];
1688
- baseEach(collection, function(value, index, collection2) {
1689
- if (predicate(value, index, collection2)) {
1690
- result.push(value);
1691
- }
1692
- });
1693
- return result;
1694
- }
1695
- var _baseFilter = baseFilter$1;
1696
- var arrayFilter = _arrayFilter, baseFilter = _baseFilter, baseIteratee$2 = _baseIteratee, isArray$1 = isArray_1;
1697
- function filter(collection, predicate) {
1698
- var func = isArray$1(collection) ? arrayFilter : baseFilter;
1699
- return func(collection, baseIteratee$2(predicate));
1700
- }
1701
- var filter_1 = filter;
1702
- const filter$1 = /* @__PURE__ */ getDefaultExportFromCjs(filter_1);
1703
- var baseIteratee$1 = _baseIteratee, isArrayLike$1 = isArrayLike_1, keys$2 = keys_1;
1704
- function createFind$1(findIndexFunc) {
1705
- return function(collection, predicate, fromIndex) {
1706
- var iterable = Object(collection);
1707
- if (!isArrayLike$1(collection)) {
1708
- var iteratee = baseIteratee$1(predicate);
1709
- collection = keys$2(collection);
1710
- predicate = function(key) {
1711
- return iteratee(iterable[key], key, iterable);
1712
- };
1713
- }
1714
- var index = findIndexFunc(collection, predicate, fromIndex);
1715
- return index > -1 ? iterable[iteratee ? collection[index] : index] : void 0;
1716
- };
1717
- }
1718
- var _createFind = createFind$1;
1719
- var reWhitespace = /\s/;
1720
- function trimmedEndIndex$1(string) {
1721
- var index = string.length;
1722
- while (index-- && reWhitespace.test(string.charAt(index))) {
1723
- }
1724
- return index;
1725
- }
1726
- var _trimmedEndIndex = trimmedEndIndex$1;
1727
- var trimmedEndIndex = _trimmedEndIndex;
1728
- var reTrimStart = /^\s+/;
1729
- function baseTrim$1(string) {
1730
- return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
1731
- }
1732
- var _baseTrim = baseTrim$1;
1733
- var baseTrim = _baseTrim, isObject$3 = isObject_1, isSymbol = isSymbol_1;
1734
- var NAN = 0 / 0;
1735
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
1736
- var reIsBinary = /^0b[01]+$/i;
1737
- var reIsOctal = /^0o[0-7]+$/i;
1738
- var freeParseInt = parseInt;
1739
- function toNumber$1(value) {
1740
- if (typeof value == "number") {
1741
- return value;
1742
- }
1743
- if (isSymbol(value)) {
1744
- return NAN;
1745
- }
1746
- if (isObject$3(value)) {
1747
- var other = typeof value.valueOf == "function" ? value.valueOf() : value;
1748
- value = isObject$3(other) ? other + "" : other;
1749
- }
1750
- if (typeof value != "string") {
1751
- return value === 0 ? value : +value;
1752
- }
1753
- value = baseTrim(value);
1754
- var isBinary = reIsBinary.test(value);
1755
- return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
1756
- }
1757
- var toNumber_1 = toNumber$1;
1758
- var toNumber = toNumber_1;
1759
- var INFINITY = 1 / 0, MAX_INTEGER = 17976931348623157e292;
1760
- function toFinite$1(value) {
1761
- if (!value) {
1762
- return value === 0 ? value : 0;
1763
- }
1764
- value = toNumber(value);
1765
- if (value === INFINITY || value === -INFINITY) {
1766
- var sign = value < 0 ? -1 : 1;
1767
- return sign * MAX_INTEGER;
1768
- }
1769
- return value === value ? value : 0;
1770
- }
1771
- var toFinite_1 = toFinite$1;
1772
- var toFinite = toFinite_1;
1773
- function toInteger$1(value) {
1774
- var result = toFinite(value), remainder = result % 1;
1775
- return result === result ? remainder ? result - remainder : result : 0;
1776
- }
1777
- var toInteger_1 = toInteger$1;
1778
- var baseFindIndex = _baseFindIndex, baseIteratee = _baseIteratee, toInteger = toInteger_1;
1779
- var nativeMax = Math.max;
1780
- function findIndex$1(array, predicate, fromIndex) {
1781
- var length = array == null ? 0 : array.length;
1782
- if (!length) {
1783
- return -1;
1784
- }
1785
- var index = fromIndex == null ? 0 : toInteger(fromIndex);
1786
- if (index < 0) {
1787
- index = nativeMax(length + index, 0);
1788
- }
1789
- return baseFindIndex(array, baseIteratee(predicate), index);
1790
- }
1791
- var findIndex_1 = findIndex$1;
1792
- var createFind = _createFind, findIndex = findIndex_1;
1793
- var find = createFind(findIndex);
1794
- var find_1 = find;
1795
- const find$1 = /* @__PURE__ */ getDefaultExportFromCjs(find_1);
1796
- var overArg = _overArg;
1797
- var getPrototype$3 = overArg(Object.getPrototypeOf, Object);
1798
- var _getPrototype = getPrototype$3;
1799
- var baseGetTag = _baseGetTag, getPrototype$2 = _getPrototype, isObjectLike$2 = isObjectLike_1;
1800
- var objectTag$1 = "[object Object]";
1801
- var funcProto = Function.prototype, objectProto$3 = Object.prototype;
1802
- var funcToString = funcProto.toString;
1803
- var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
1804
- var objectCtorString = funcToString.call(Object);
1805
- function isPlainObject(value) {
1806
- if (!isObjectLike$2(value) || baseGetTag(value) != objectTag$1) {
1807
- return false;
1808
- }
1809
- var proto = getPrototype$2(value);
1810
- if (proto === null) {
1811
- return true;
1812
- }
1813
- var Ctor = hasOwnProperty$3.call(proto, "constructor") && proto.constructor;
1814
- return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
1815
- }
1816
- var isPlainObject_1 = isPlainObject;
1817
- const isPlainObject$1 = /* @__PURE__ */ getDefaultExportFromCjs(isPlainObject_1);
1818
- function arrayEach$1(array, iteratee) {
1819
- var index = -1, length = array == null ? 0 : array.length;
1820
- while (++index < length) {
1821
- if (iteratee(array[index], index, array) === false) {
1822
- break;
1823
- }
1824
- }
1825
- return array;
1826
- }
1827
- var _arrayEach = arrayEach$1;
1828
- var getNative = _getNative;
1829
- var defineProperty$1 = function() {
1830
- try {
1831
- var func = getNative(Object, "defineProperty");
1832
- func({}, "", {});
1833
- return func;
1834
- } catch (e) {
1835
- }
1836
- }();
1837
- var _defineProperty = defineProperty$1;
1838
- var defineProperty = _defineProperty;
1839
- function baseAssignValue$2(object, key, value) {
1840
- if (key == "__proto__" && defineProperty) {
1841
- defineProperty(object, key, {
1842
- "configurable": true,
1843
- "enumerable": true,
1844
- "value": value,
1845
- "writable": true
1846
- });
1847
- } else {
1848
- object[key] = value;
1849
- }
1850
- }
1851
- var _baseAssignValue = baseAssignValue$2;
1852
- var baseAssignValue$1 = _baseAssignValue, eq = eq_1;
1853
- var objectProto$2 = Object.prototype;
1854
- var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
1855
- function assignValue$2(object, key, value) {
1856
- var objValue = object[key];
1857
- if (!(hasOwnProperty$2.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
1858
- baseAssignValue$1(object, key, value);
1859
- }
1860
- }
1861
- var _assignValue = assignValue$2;
1862
- var assignValue$1 = _assignValue, baseAssignValue = _baseAssignValue;
1863
- function copyObject$4(source, props, object, customizer) {
1864
- var isNew = !object;
1865
- object || (object = {});
1866
- var index = -1, length = props.length;
1867
- while (++index < length) {
1868
- var key = props[index];
1869
- var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
1870
- if (newValue === void 0) {
1871
- newValue = source[key];
1872
- }
1873
- if (isNew) {
1874
- baseAssignValue(object, key, newValue);
1875
- } else {
1876
- assignValue$1(object, key, newValue);
1877
- }
1878
- }
1879
- return object;
1880
- }
1881
- var _copyObject = copyObject$4;
1882
- var copyObject$3 = _copyObject, keys$1 = keys_1;
1883
- function baseAssign$1(object, source) {
1884
- return object && copyObject$3(source, keys$1(source), object);
1885
- }
1886
- var _baseAssign = baseAssign$1;
1887
- function nativeKeysIn$1(object) {
1888
- var result = [];
1889
- if (object != null) {
1890
- for (var key in Object(object)) {
1891
- result.push(key);
1892
- }
1893
- }
1894
- return result;
1895
- }
1896
- var _nativeKeysIn = nativeKeysIn$1;
1897
- var isObject$2 = isObject_1, isPrototype$1 = _isPrototype, nativeKeysIn = _nativeKeysIn;
1898
- var objectProto$1 = Object.prototype;
1899
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
1900
- function baseKeysIn$1(object) {
1901
- if (!isObject$2(object)) {
1902
- return nativeKeysIn(object);
1903
- }
1904
- var isProto = isPrototype$1(object), result = [];
1905
- for (var key in object) {
1906
- if (!(key == "constructor" && (isProto || !hasOwnProperty$1.call(object, key)))) {
1907
- result.push(key);
1908
- }
1909
- }
1910
- return result;
1911
- }
1912
- var _baseKeysIn = baseKeysIn$1;
1913
- var arrayLikeKeys = _arrayLikeKeys, baseKeysIn = _baseKeysIn, isArrayLike = isArrayLike_1;
1914
- function keysIn$3(object) {
1915
- return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
1916
- }
1917
- var keysIn_1 = keysIn$3;
1918
- var copyObject$2 = _copyObject, keysIn$2 = keysIn_1;
1919
- function baseAssignIn$1(object, source) {
1920
- return object && copyObject$2(source, keysIn$2(source), object);
1921
- }
1922
- var _baseAssignIn = baseAssignIn$1;
1923
- var _cloneBuffer = { exports: {} };
1924
- _cloneBuffer.exports;
1925
- (function(module2, exports2) {
1926
- var root2 = _root;
1927
- var freeExports = exports2 && !exports2.nodeType && exports2;
1928
- var freeModule = freeExports && true && module2 && !module2.nodeType && module2;
1929
- var moduleExports = freeModule && freeModule.exports === freeExports;
1930
- var Buffer2 = moduleExports ? root2.Buffer : void 0, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0;
1931
- function cloneBuffer2(buffer, isDeep) {
1932
- if (isDeep) {
1933
- return buffer.slice();
1934
- }
1935
- var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
1936
- buffer.copy(result);
1937
- return result;
1938
- }
1939
- module2.exports = cloneBuffer2;
1940
- })(_cloneBuffer, _cloneBuffer.exports);
1941
- var _cloneBufferExports = _cloneBuffer.exports;
1942
- function copyArray$1(source, array) {
1943
- var index = -1, length = source.length;
1944
- array || (array = Array(length));
1945
- while (++index < length) {
1946
- array[index] = source[index];
1947
- }
1948
- return array;
1949
- }
1950
- var _copyArray = copyArray$1;
1951
- var copyObject$1 = _copyObject, getSymbols$1 = _getSymbols;
1952
- function copySymbols$1(source, object) {
1953
- return copyObject$1(source, getSymbols$1(source), object);
1954
- }
1955
- var _copySymbols = copySymbols$1;
1956
- var arrayPush = _arrayPush, getPrototype$1 = _getPrototype, getSymbols = _getSymbols, stubArray = stubArray_1;
1957
- var nativeGetSymbols = Object.getOwnPropertySymbols;
1958
- var getSymbolsIn$2 = !nativeGetSymbols ? stubArray : function(object) {
1959
- var result = [];
1960
- while (object) {
1961
- arrayPush(result, getSymbols(object));
1962
- object = getPrototype$1(object);
1963
- }
1964
- return result;
1965
- };
1966
- var _getSymbolsIn = getSymbolsIn$2;
1967
- var copyObject = _copyObject, getSymbolsIn$1 = _getSymbolsIn;
1968
- function copySymbolsIn$1(source, object) {
1969
- return copyObject(source, getSymbolsIn$1(source), object);
1970
- }
1971
- var _copySymbolsIn = copySymbolsIn$1;
1972
- var baseGetAllKeys = _baseGetAllKeys, getSymbolsIn = _getSymbolsIn, keysIn$1 = keysIn_1;
1973
- function getAllKeysIn$1(object) {
1974
- return baseGetAllKeys(object, keysIn$1, getSymbolsIn);
1975
- }
1976
- var _getAllKeysIn = getAllKeysIn$1;
1977
- var objectProto = Object.prototype;
1978
- var hasOwnProperty = objectProto.hasOwnProperty;
1979
- function initCloneArray$1(array) {
1980
- var length = array.length, result = new array.constructor(length);
1981
- if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) {
1982
- result.index = array.index;
1983
- result.input = array.input;
1984
- }
1985
- return result;
1986
- }
1987
- var _initCloneArray = initCloneArray$1;
1988
- var Uint8Array2 = _Uint8Array;
1989
- function cloneArrayBuffer$3(arrayBuffer) {
1990
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
1991
- new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
1992
- return result;
1993
- }
1994
- var _cloneArrayBuffer = cloneArrayBuffer$3;
1995
- var cloneArrayBuffer$2 = _cloneArrayBuffer;
1996
- function cloneDataView$1(dataView, isDeep) {
1997
- var buffer = isDeep ? cloneArrayBuffer$2(dataView.buffer) : dataView.buffer;
1998
- return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
1999
- }
2000
- var _cloneDataView = cloneDataView$1;
2001
- var reFlags = /\w*$/;
2002
- function cloneRegExp$1(regexp) {
2003
- var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
2004
- result.lastIndex = regexp.lastIndex;
2005
- return result;
2006
- }
2007
- var _cloneRegExp = cloneRegExp$1;
2008
- var Symbol$1 = _Symbol;
2009
- var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
2010
- function cloneSymbol$1(symbol) {
2011
- return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
2012
- }
2013
- var _cloneSymbol = cloneSymbol$1;
2014
- var cloneArrayBuffer$1 = _cloneArrayBuffer;
2015
- function cloneTypedArray$1(typedArray, isDeep) {
2016
- var buffer = isDeep ? cloneArrayBuffer$1(typedArray.buffer) : typedArray.buffer;
2017
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
2018
- }
2019
- var _cloneTypedArray = cloneTypedArray$1;
2020
- var cloneArrayBuffer = _cloneArrayBuffer, cloneDataView = _cloneDataView, cloneRegExp = _cloneRegExp, cloneSymbol = _cloneSymbol, cloneTypedArray = _cloneTypedArray;
2021
- var boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]";
2022
- var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
2023
- function initCloneByTag$1(object, tag, isDeep) {
2024
- var Ctor = object.constructor;
2025
- switch (tag) {
2026
- case arrayBufferTag$1:
2027
- return cloneArrayBuffer(object);
2028
- case boolTag$1:
2029
- case dateTag$1:
2030
- return new Ctor(+object);
2031
- case dataViewTag$1:
2032
- return cloneDataView(object, isDeep);
2033
- case float32Tag$1:
2034
- case float64Tag$1:
2035
- case int8Tag$1:
2036
- case int16Tag$1:
2037
- case int32Tag$1:
2038
- case uint8Tag$1:
2039
- case uint8ClampedTag$1:
2040
- case uint16Tag$1:
2041
- case uint32Tag$1:
2042
- return cloneTypedArray(object, isDeep);
2043
- case mapTag$2:
2044
- return new Ctor();
2045
- case numberTag$1:
2046
- case stringTag$1:
2047
- return new Ctor(object);
2048
- case regexpTag$1:
2049
- return cloneRegExp(object);
2050
- case setTag$2:
2051
- return new Ctor();
2052
- case symbolTag$1:
2053
- return cloneSymbol(object);
2054
- }
2055
- }
2056
- var _initCloneByTag = initCloneByTag$1;
2057
- var isObject$1 = isObject_1;
2058
- var objectCreate = Object.create;
2059
- var baseCreate$1 = /* @__PURE__ */ function() {
2060
- function object() {
2061
- }
2062
- return function(proto) {
2063
- if (!isObject$1(proto)) {
2064
- return {};
2065
- }
2066
- if (objectCreate) {
2067
- return objectCreate(proto);
2068
- }
2069
- object.prototype = proto;
2070
- var result = new object();
2071
- object.prototype = void 0;
2072
- return result;
2073
- };
2074
- }();
2075
- var _baseCreate = baseCreate$1;
2076
- var baseCreate = _baseCreate, getPrototype = _getPrototype, isPrototype = _isPrototype;
2077
- function initCloneObject$1(object) {
2078
- return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
2079
- }
2080
- var _initCloneObject = initCloneObject$1;
2081
- var getTag$2 = _getTag, isObjectLike$1 = isObjectLike_1;
2082
- var mapTag$1 = "[object Map]";
2083
- function baseIsMap$1(value) {
2084
- return isObjectLike$1(value) && getTag$2(value) == mapTag$1;
2085
- }
2086
- var _baseIsMap = baseIsMap$1;
2087
- var baseIsMap = _baseIsMap, baseUnary$1 = _baseUnary, nodeUtil$1 = _nodeUtilExports;
2088
- var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
2089
- var isMap$1 = nodeIsMap ? baseUnary$1(nodeIsMap) : baseIsMap;
2090
- var isMap_1 = isMap$1;
2091
- var getTag$1 = _getTag, isObjectLike = isObjectLike_1;
2092
- var setTag$1 = "[object Set]";
2093
- function baseIsSet$1(value) {
2094
- return isObjectLike(value) && getTag$1(value) == setTag$1;
2095
- }
2096
- var _baseIsSet = baseIsSet$1;
2097
- var baseIsSet = _baseIsSet, baseUnary = _baseUnary, nodeUtil = _nodeUtilExports;
2098
- var nodeIsSet = nodeUtil && nodeUtil.isSet;
2099
- var isSet$1 = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
2100
- var isSet_1 = isSet$1;
2101
- var Stack = _Stack, arrayEach = _arrayEach, assignValue = _assignValue, baseAssign = _baseAssign, baseAssignIn = _baseAssignIn, cloneBuffer = _cloneBufferExports, copyArray = _copyArray, copySymbols = _copySymbols, copySymbolsIn = _copySymbolsIn, getAllKeys = _getAllKeys, getAllKeysIn = _getAllKeysIn, getTag = _getTag, initCloneArray = _initCloneArray, initCloneByTag = _initCloneByTag, initCloneObject = _initCloneObject, isArray = isArray_1, isBuffer = isBufferExports, isMap = isMap_1, isObject = isObject_1, isSet = isSet_1, keys = keys_1, keysIn = keysIn_1;
2102
- var CLONE_DEEP_FLAG$1 = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
2103
- var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", weakMapTag = "[object WeakMap]";
2104
- var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
2105
- var cloneableTags = {};
2106
- cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
2107
- cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
2108
- function baseClone$1(value, bitmask, customizer, key, object, stack) {
2109
- var result, isDeep = bitmask & CLONE_DEEP_FLAG$1, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
2110
- if (customizer) {
2111
- result = object ? customizer(value, key, object, stack) : customizer(value);
2112
- }
2113
- if (result !== void 0) {
2114
- return result;
2115
- }
2116
- if (!isObject(value)) {
2117
- return value;
2118
- }
2119
- var isArr = isArray(value);
2120
- if (isArr) {
2121
- result = initCloneArray(value);
2122
- if (!isDeep) {
2123
- return copyArray(value, result);
2124
- }
2125
- } else {
2126
- var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
2127
- if (isBuffer(value)) {
2128
- return cloneBuffer(value, isDeep);
2129
- }
2130
- if (tag == objectTag || tag == argsTag || isFunc && !object) {
2131
- result = isFlat || isFunc ? {} : initCloneObject(value);
2132
- if (!isDeep) {
2133
- return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
2134
- }
2135
- } else {
2136
- if (!cloneableTags[tag]) {
2137
- return object ? value : {};
2138
- }
2139
- result = initCloneByTag(value, tag, isDeep);
2140
- }
2141
- }
2142
- stack || (stack = new Stack());
2143
- var stacked = stack.get(value);
2144
- if (stacked) {
2145
- return stacked;
2146
- }
2147
- stack.set(value, result);
2148
- if (isSet(value)) {
2149
- value.forEach(function(subValue) {
2150
- result.add(baseClone$1(subValue, bitmask, customizer, subValue, value, stack));
2151
- });
2152
- } else if (isMap(value)) {
2153
- value.forEach(function(subValue, key2) {
2154
- result.set(key2, baseClone$1(subValue, bitmask, customizer, key2, value, stack));
2155
- });
2156
- }
2157
- var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
2158
- var props = isArr ? void 0 : keysFunc(value);
2159
- arrayEach(props || value, function(subValue, key2) {
2160
- if (props) {
2161
- key2 = subValue;
2162
- subValue = value[key2];
2163
- }
2164
- assignValue(result, key2, baseClone$1(subValue, bitmask, customizer, key2, value, stack));
2165
- });
2166
- return result;
2167
- }
2168
- var _baseClone = baseClone$1;
2169
- var baseClone = _baseClone, baseMatches = _baseMatches;
2170
- var CLONE_DEEP_FLAG = 1;
2171
- function matches(source) {
2172
- return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
2173
- }
2174
- var matches_1 = matches;
2175
- const matches$1 = /* @__PURE__ */ getDefaultExportFromCjs(matches_1);
2176
- const _CdnMetafileFiles = class _CdnMetafileFiles extends CdnBase {
403
+ class CdnMetafile extends CdnBase {
2177
404
  constructor() {
2178
405
  super(...arguments);
2179
- __publicField(this, "list", () => _CdnMetafileFiles.transformFiles(this.context.metafile.data.files));
2180
- __publicField(this, "filter", (options) => {
2181
- if (!options) {
2182
- throw new Error('Invalid param: missing required "options" parameter.');
2183
- }
2184
- if (!isFunction$3(options) && !isPlainObject$1(options)) {
2185
- throw new Error('Invalid param: "options" must be function or object.');
2186
- }
2187
- const files = _CdnMetafileFiles.transformFiles(this.context.metafile.data.files);
2188
- if (isFunction$3(options)) {
2189
- return files.filter(options);
2190
- }
2191
- return filter$1(files, matches$1(options));
2192
- });
2193
- __publicField(this, "find", (options) => {
2194
- if (!options) {
2195
- throw new Error('Invalid param: missing required "options" parameter.');
2196
- }
2197
- if (!isFunction$3(options) && !isPlainObject$1(options)) {
2198
- throw new Error('Invalid param: "options" must be function or object.');
2199
- }
2200
- const files = _CdnMetafileFiles.transformFiles(this.context.metafile.data.files);
2201
- if (isFunction$3(options)) {
2202
- return files.find(options);
2203
- }
2204
- return find$1(files, matches$1(options));
2205
- });
2206
- __publicField(this, "first", () => {
2207
- if (this.context.metafile.data.files.length === 0) {
2208
- throw new Error("File is missing in downloaded metafile.");
2209
- }
2210
- const files = _CdnMetafileFiles.transformFiles(this.context.metafile.data.files);
2211
- return files[0];
2212
- });
2213
- }
2214
- };
2215
- __publicField(_CdnMetafileFiles, "transformFiles", (files) => files.map(
2216
- (file) => file.toCdnFile()
2217
- ));
2218
- let CdnMetafileFiles = _CdnMetafileFiles;
2219
- class CdnMetafile extends CdnBase {
2220
- constructor(context) {
2221
- super(context);
2222
- __publicField(this, "files");
2223
406
  __publicField(this, "locales", (options) => {
2224
407
  const { excludeBaseLocale } = options || {};
2225
408
  const { locales } = this.context.metafile.data;
@@ -2233,7 +416,6 @@ class CdnMetafile extends CdnBase {
2233
416
  this.context.metafile.params = new MetafileParams(options.metafile);
2234
417
  await this.refresh();
2235
418
  });
2236
- this.files = new CdnMetafileFiles(context);
2237
419
  }
2238
420
  get projectUrl() {
2239
421
  return this.context.metafile.data.projectUrl;
@@ -2244,12 +426,10 @@ class CdnMetafile extends CdnBase {
2244
426
  get url() {
2245
427
  return this.context.metafile.params.url;
2246
428
  }
429
+ get files() {
430
+ return this.context.metafile.data.files.map((file) => file.toCdnFile());
431
+ }
2247
432
  }
2248
- function isUndefined(value) {
2249
- return value === void 0;
2250
- }
2251
- var isUndefined_1 = isUndefined;
2252
- const isUndefined$1 = /* @__PURE__ */ getDefaultExportFromCjs(isUndefined_1);
2253
433
  class LocalesMap {
2254
434
  constructor(options) {
2255
435
  __publicField(this, "data");
@@ -2321,17 +501,17 @@ class RequestBuilder {
2321
501
  this.request = new Request(this.context);
2322
502
  }
2323
503
  addFiles(files) {
2324
- if (!(isPlainObject$1(files) || isString$1(files) || isUndefined$1(files) || isArray$c(files))) {
504
+ if (!(isPlainObject(files) || isString(files) || isUndefined(files) || isArray(files))) {
2325
505
  throw new Error('Invalid param: "request.files" must be object, array, string or undefined.');
2326
506
  }
2327
- if (isArray$c(files)) {
507
+ if (isArray(files)) {
2328
508
  files.forEach((i) => {
2329
- if (!(isPlainObject$1(i) || isString$1(i))) {
509
+ if (!(isPlainObject(i) || isString(i))) {
2330
510
  throw new Error('Invalid param: array "request.files" must contain objects or strings.');
2331
511
  }
2332
512
  });
2333
513
  }
2334
- if (isString$1(files)) {
514
+ if (isString(files)) {
2335
515
  this.request.hasSingleFileResponse = true;
2336
516
  const file = this.context.metafile.data.files.find(
2337
517
  (i) => i.id === files
@@ -2340,16 +520,16 @@ class RequestBuilder {
2340
520
  throw new Error(`File not found: "${files}".`);
2341
521
  }
2342
522
  this.request.files = [file];
2343
- } else if (isUndefined$1(files)) {
523
+ } else if (isUndefined(files)) {
2344
524
  this.request.files = [...this.context.metafile.data.files];
2345
- } else if (isArray$c(files)) {
525
+ } else if (isArray(files)) {
2346
526
  this.request.files = files.map((file) => {
2347
527
  let metafileFile;
2348
- if (isString$1(file)) {
528
+ if (isString(file)) {
2349
529
  const foundFile = this.context.metafile.data.files.find(
2350
530
  (i) => i.id === file
2351
531
  );
2352
- if (isUndefined$1(foundFile)) {
532
+ if (isUndefined(foundFile)) {
2353
533
  throw new Error(`File not found: "${file}".`);
2354
534
  }
2355
535
  metafileFile = foundFile;
@@ -2357,19 +537,19 @@ class RequestBuilder {
2357
537
  const foundFile = this.context.metafile.data.files.find(
2358
538
  (i) => i.id === file.id
2359
539
  );
2360
- if (isUndefined$1(foundFile)) {
540
+ if (isUndefined(foundFile)) {
2361
541
  throw new Error(`File not found: "${file.id}".`);
2362
542
  }
2363
543
  metafileFile = foundFile;
2364
544
  }
2365
545
  return metafileFile;
2366
546
  });
2367
- } else if (isPlainObject$1(files)) {
547
+ } else if (isPlainObject(files)) {
2368
548
  this.request.hasSingleFileResponse = true;
2369
549
  const foundFile = this.context.metafile.data.files.find(
2370
550
  (i) => i.id === files.id
2371
551
  );
2372
- if (isUndefined$1(foundFile)) {
552
+ if (isUndefined(foundFile)) {
2373
553
  throw new Error(`File not found: "${files.id}".`);
2374
554
  }
2375
555
  this.request.files = [foundFile];
@@ -2377,17 +557,17 @@ class RequestBuilder {
2377
557
  return this;
2378
558
  }
2379
559
  addLocales(locales, excludeBaseLocale) {
2380
- if (!(isString$1(locales) || isUndefined$1(locales) || isArray$c(locales))) {
560
+ if (!(isString(locales) || isUndefined(locales) || isArray(locales))) {
2381
561
  throw new Error('Invalid param: "request.locales" must be array, string or undefined.');
2382
562
  }
2383
- if (isArray$c(locales)) {
563
+ if (isArray(locales)) {
2384
564
  locales.forEach((i) => {
2385
- if (!isString$1(i)) {
565
+ if (!isString(i)) {
2386
566
  throw new Error('Invalid param: array "request.locales" must contain strings.');
2387
567
  }
2388
568
  });
2389
569
  }
2390
- if (isString$1(locales)) {
570
+ if (isString(locales)) {
2391
571
  this.request.hasSingleLocaleResponse = true;
2392
572
  this.request.files.reduce(
2393
573
  (acc, cur) => {
@@ -2398,7 +578,7 @@ class RequestBuilder {
2398
578
  },
2399
579
  this.request.localesMap
2400
580
  );
2401
- } else if (isUndefined$1(locales)) {
581
+ } else if (isUndefined(locales)) {
2402
582
  this.request.files.reduce(
2403
583
  (acc, cur) => {
2404
584
  acc.data[cur.id] = excludeBaseLocale ? cur.locales.filter((metafileLocale) => !metafileLocale.isBaseLocale) : cur.locales;
@@ -2406,7 +586,7 @@ class RequestBuilder {
2406
586
  },
2407
587
  this.request.localesMap
2408
588
  );
2409
- } else if (isArray$c(locales)) {
589
+ } else if (isArray(locales)) {
2410
590
  this.request.files.reduce(
2411
591
  (acc, cur) => {
2412
592
  acc.data[cur.id] = cur.locales.filter(
@@ -2477,7 +657,7 @@ class CdnClient {
2477
657
  if (!options) {
2478
658
  throw new Error('Invalid param: missing required "options" parameter.');
2479
659
  }
2480
- if (!isString$1(options.metafile)) {
660
+ if (!isString(options.metafile)) {
2481
661
  throw new Error('Invalid param: "options.metafile" must be string.');
2482
662
  }
2483
663
  const cdn = new CdnClient(options);
@@ -2490,7 +670,6 @@ exports.CdnBase = CdnBase;
2490
670
  exports.CdnCache = CdnCache;
2491
671
  exports.CdnClient = CdnClient;
2492
672
  exports.CdnMetafile = CdnMetafile;
2493
- exports.CdnMetafileFiles = CdnMetafileFiles;
2494
673
  exports.Context = Context;
2495
674
  exports.FetchHttpAdapter = FetchHttpAdapter;
2496
675
  exports.LocalesCache = LocalesCache;
@@ -2504,4 +683,10 @@ exports.MetafileParams = MetafileParams;
2504
683
  exports.Request = Request;
2505
684
  exports.RequestBuilder = RequestBuilder;
2506
685
  exports.ResponseFactory = ResponseFactory;
686
+ exports.isArray = isArray;
687
+ exports.isPlainObject = isPlainObject;
688
+ exports.isString = isString;
689
+ exports.isUndefined = isUndefined;
690
+ exports.uniq = uniq;
691
+ exports.uniqBy = uniqBy;
2507
692
  //# sourceMappingURL=localazy-cdn-client.cjs.map