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