@bemoje/cli 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/lib/Help.cjs CHANGED
@@ -1,14 +1,4663 @@
1
1
  'use strict';
2
2
 
3
3
  var C = require('ansi-colors');
4
- var decorators = require('@mono/decorators');
4
+ var predicate = require('es-toolkit/predicate');
5
5
 
6
6
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
7
7
 
8
8
  var C__default = /*#__PURE__*/_interopDefault(C);
9
9
 
10
+ var __create = Object.create;
10
11
  var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
16
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
17
+ var __esm = (fn, res) => function __init() {
18
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
19
+ };
20
+ var __commonJS = (cb, mod) => function __require() {
21
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
22
+ };
23
+ var __copyProps = (to, from, except, desc) => {
24
+ if (from && typeof from === "object" || typeof from === "function") {
25
+ for (let key of __getOwnPropNames(from))
26
+ if (!__hasOwnProp.call(to, key) && key !== except)
27
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
28
+ }
29
+ return to;
30
+ };
31
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
32
+ // If the importer is in node compatibility mode or this is not an ESM
33
+ // file that has been converted to a CommonJS file using a Babel-
34
+ // compatible transform (i.e. "__esModule" has not been set), then set
35
+ // "default" to the CommonJS "module.exports" for node compatibility.
36
+ __defProp(target, "default", { value: mod, enumerable: true }) ,
37
+ mod
38
+ ));
39
+
40
+ // ../../node_modules/tsup/assets/cjs_shims.js
41
+ var init_cjs_shims = __esm({
42
+ "../../node_modules/tsup/assets/cjs_shims.js"() {
43
+ }
44
+ });
45
+
46
+ // ../../node_modules/es5-ext/function/noop.js
47
+ var require_noop = __commonJS({
48
+ "../../node_modules/es5-ext/function/noop.js"(exports$1, module) {
49
+ init_cjs_shims();
50
+ module.exports = function() {
51
+ };
52
+ }
53
+ });
54
+
55
+ // ../../node_modules/es5-ext/object/is-value.js
56
+ var require_is_value = __commonJS({
57
+ "../../node_modules/es5-ext/object/is-value.js"(exports$1, module) {
58
+ init_cjs_shims();
59
+ var _undefined = require_noop()();
60
+ module.exports = function(val) {
61
+ return val !== _undefined && val !== null;
62
+ };
63
+ }
64
+ });
65
+
66
+ // ../../node_modules/es5-ext/object/normalize-options.js
67
+ var require_normalize_options = __commonJS({
68
+ "../../node_modules/es5-ext/object/normalize-options.js"(exports$1, module) {
69
+ init_cjs_shims();
70
+ var isValue = require_is_value();
71
+ var forEach = Array.prototype.forEach;
72
+ var create = Object.create;
73
+ var process2 = /* @__PURE__ */ __name(function(src, obj) {
74
+ var key;
75
+ for (key in src) obj[key] = src[key];
76
+ }, "process");
77
+ module.exports = function(opts1) {
78
+ var result = create(null);
79
+ forEach.call(arguments, function(options) {
80
+ if (!isValue(options)) return;
81
+ process2(Object(options), result);
82
+ });
83
+ return result;
84
+ };
85
+ }
86
+ });
87
+
88
+ // ../../node_modules/es5-ext/math/sign/is-implemented.js
89
+ var require_is_implemented = __commonJS({
90
+ "../../node_modules/es5-ext/math/sign/is-implemented.js"(exports$1, module) {
91
+ init_cjs_shims();
92
+ module.exports = function() {
93
+ var sign = Math.sign;
94
+ if (typeof sign !== "function") return false;
95
+ return sign(10) === 1 && sign(-20) === -1;
96
+ };
97
+ }
98
+ });
99
+
100
+ // ../../node_modules/es5-ext/math/sign/shim.js
101
+ var require_shim = __commonJS({
102
+ "../../node_modules/es5-ext/math/sign/shim.js"(exports$1, module) {
103
+ init_cjs_shims();
104
+ module.exports = function(value) {
105
+ value = Number(value);
106
+ if (isNaN(value) || value === 0) return value;
107
+ return value > 0 ? 1 : -1;
108
+ };
109
+ }
110
+ });
111
+
112
+ // ../../node_modules/es5-ext/math/sign/index.js
113
+ var require_sign = __commonJS({
114
+ "../../node_modules/es5-ext/math/sign/index.js"(exports$1, module) {
115
+ init_cjs_shims();
116
+ module.exports = require_is_implemented()() ? Math.sign : require_shim();
117
+ }
118
+ });
119
+
120
+ // ../../node_modules/es5-ext/number/to-integer.js
121
+ var require_to_integer = __commonJS({
122
+ "../../node_modules/es5-ext/number/to-integer.js"(exports$1, module) {
123
+ init_cjs_shims();
124
+ var sign = require_sign();
125
+ var abs = Math.abs;
126
+ var floor = Math.floor;
127
+ module.exports = function(value) {
128
+ if (isNaN(value)) return 0;
129
+ value = Number(value);
130
+ if (value === 0 || !isFinite(value)) return value;
131
+ return sign(value) * floor(abs(value));
132
+ };
133
+ }
134
+ });
135
+
136
+ // ../../node_modules/es5-ext/number/to-pos-integer.js
137
+ var require_to_pos_integer = __commonJS({
138
+ "../../node_modules/es5-ext/number/to-pos-integer.js"(exports$1, module) {
139
+ init_cjs_shims();
140
+ var toInteger = require_to_integer();
141
+ var max = Math.max;
142
+ module.exports = function(value) {
143
+ return max(0, toInteger(value));
144
+ };
145
+ }
146
+ });
147
+
148
+ // ../../node_modules/memoizee/lib/resolve-length.js
149
+ var require_resolve_length = __commonJS({
150
+ "../../node_modules/memoizee/lib/resolve-length.js"(exports$1, module) {
151
+ init_cjs_shims();
152
+ var toPosInt = require_to_pos_integer();
153
+ module.exports = function(optsLength, fnLength, isAsync) {
154
+ var length;
155
+ if (isNaN(optsLength)) {
156
+ length = fnLength;
157
+ if (!(length >= 0)) return 1;
158
+ if (isAsync && length) return length - 1;
159
+ return length;
160
+ }
161
+ if (optsLength === false) return false;
162
+ return toPosInt(optsLength);
163
+ };
164
+ }
165
+ });
166
+
167
+ // ../../node_modules/es5-ext/object/valid-callable.js
168
+ var require_valid_callable = __commonJS({
169
+ "../../node_modules/es5-ext/object/valid-callable.js"(exports$1, module) {
170
+ init_cjs_shims();
171
+ module.exports = function(fn) {
172
+ if (typeof fn !== "function") throw new TypeError(fn + " is not a function");
173
+ return fn;
174
+ };
175
+ }
176
+ });
177
+
178
+ // ../../node_modules/es5-ext/object/valid-value.js
179
+ var require_valid_value = __commonJS({
180
+ "../../node_modules/es5-ext/object/valid-value.js"(exports$1, module) {
181
+ init_cjs_shims();
182
+ var isValue = require_is_value();
183
+ module.exports = function(value) {
184
+ if (!isValue(value)) throw new TypeError("Cannot use null or undefined");
185
+ return value;
186
+ };
187
+ }
188
+ });
189
+
190
+ // ../../node_modules/es5-ext/object/_iterate.js
191
+ var require_iterate = __commonJS({
192
+ "../../node_modules/es5-ext/object/_iterate.js"(exports$1, module) {
193
+ init_cjs_shims();
194
+ var callable = require_valid_callable();
195
+ var value = require_valid_value();
196
+ var bind = Function.prototype.bind;
197
+ var call = Function.prototype.call;
198
+ var keys = Object.keys;
199
+ var objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;
200
+ module.exports = function(method, defVal) {
201
+ return function(obj, cb) {
202
+ var list, thisArg = arguments[2], compareFn = arguments[3];
203
+ obj = Object(value(obj));
204
+ callable(cb);
205
+ list = keys(obj);
206
+ if (compareFn) {
207
+ list.sort(typeof compareFn === "function" ? bind.call(compareFn, obj) : void 0);
208
+ }
209
+ if (typeof method !== "function") method = list[method];
210
+ return call.call(method, list, function(key, index) {
211
+ if (!objPropertyIsEnumerable.call(obj, key)) return defVal;
212
+ return call.call(cb, thisArg, obj[key], key, obj, index);
213
+ });
214
+ };
215
+ };
216
+ }
217
+ });
218
+
219
+ // ../../node_modules/es5-ext/object/for-each.js
220
+ var require_for_each = __commonJS({
221
+ "../../node_modules/es5-ext/object/for-each.js"(exports$1, module) {
222
+ init_cjs_shims();
223
+ module.exports = require_iterate()("forEach");
224
+ }
225
+ });
226
+
227
+ // ../../node_modules/memoizee/lib/registered-extensions.js
228
+ var require_registered_extensions = __commonJS({
229
+ "../../node_modules/memoizee/lib/registered-extensions.js"() {
230
+ init_cjs_shims();
231
+ }
232
+ });
233
+
234
+ // ../../node_modules/es5-ext/object/assign/is-implemented.js
235
+ var require_is_implemented2 = __commonJS({
236
+ "../../node_modules/es5-ext/object/assign/is-implemented.js"(exports$1, module) {
237
+ init_cjs_shims();
238
+ module.exports = function() {
239
+ var assign = Object.assign, obj;
240
+ if (typeof assign !== "function") return false;
241
+ obj = {
242
+ foo: "raz"
243
+ };
244
+ assign(obj, {
245
+ bar: "dwa"
246
+ }, {
247
+ trzy: "trzy"
248
+ });
249
+ return obj.foo + obj.bar + obj.trzy === "razdwatrzy";
250
+ };
251
+ }
252
+ });
253
+
254
+ // ../../node_modules/es5-ext/object/keys/is-implemented.js
255
+ var require_is_implemented3 = __commonJS({
256
+ "../../node_modules/es5-ext/object/keys/is-implemented.js"(exports$1, module) {
257
+ init_cjs_shims();
258
+ module.exports = function() {
259
+ try {
260
+ Object.keys("primitive");
261
+ return true;
262
+ } catch (e) {
263
+ return false;
264
+ }
265
+ };
266
+ }
267
+ });
268
+
269
+ // ../../node_modules/es5-ext/object/keys/shim.js
270
+ var require_shim2 = __commonJS({
271
+ "../../node_modules/es5-ext/object/keys/shim.js"(exports$1, module) {
272
+ init_cjs_shims();
273
+ var isValue = require_is_value();
274
+ var keys = Object.keys;
275
+ module.exports = function(object) {
276
+ return keys(isValue(object) ? Object(object) : object);
277
+ };
278
+ }
279
+ });
280
+
281
+ // ../../node_modules/es5-ext/object/keys/index.js
282
+ var require_keys = __commonJS({
283
+ "../../node_modules/es5-ext/object/keys/index.js"(exports$1, module) {
284
+ init_cjs_shims();
285
+ module.exports = require_is_implemented3()() ? Object.keys : require_shim2();
286
+ }
287
+ });
288
+
289
+ // ../../node_modules/es5-ext/object/assign/shim.js
290
+ var require_shim3 = __commonJS({
291
+ "../../node_modules/es5-ext/object/assign/shim.js"(exports$1, module) {
292
+ init_cjs_shims();
293
+ var keys = require_keys();
294
+ var value = require_valid_value();
295
+ var max = Math.max;
296
+ module.exports = function(dest, src) {
297
+ var error, i, length = max(arguments.length, 2), assign;
298
+ dest = Object(value(dest));
299
+ assign = /* @__PURE__ */ __name(function(key) {
300
+ try {
301
+ dest[key] = src[key];
302
+ } catch (e) {
303
+ if (!error) error = e;
304
+ }
305
+ }, "assign");
306
+ for (i = 1; i < length; ++i) {
307
+ src = arguments[i];
308
+ keys(src).forEach(assign);
309
+ }
310
+ if (error !== void 0) throw error;
311
+ return dest;
312
+ };
313
+ }
314
+ });
315
+
316
+ // ../../node_modules/es5-ext/object/assign/index.js
317
+ var require_assign = __commonJS({
318
+ "../../node_modules/es5-ext/object/assign/index.js"(exports$1, module) {
319
+ init_cjs_shims();
320
+ module.exports = require_is_implemented2()() ? Object.assign : require_shim3();
321
+ }
322
+ });
323
+
324
+ // ../../node_modules/es5-ext/object/is-object.js
325
+ var require_is_object = __commonJS({
326
+ "../../node_modules/es5-ext/object/is-object.js"(exports$1, module) {
327
+ init_cjs_shims();
328
+ var isValue = require_is_value();
329
+ var map = {
330
+ function: true,
331
+ object: true
332
+ };
333
+ module.exports = function(value) {
334
+ return isValue(value) && map[typeof value] || false;
335
+ };
336
+ }
337
+ });
338
+
339
+ // ../../node_modules/es5-ext/error/custom.js
340
+ var require_custom = __commonJS({
341
+ "../../node_modules/es5-ext/error/custom.js"(exports$1, module) {
342
+ init_cjs_shims();
343
+ var assign = require_assign();
344
+ var isObject = require_is_object();
345
+ var isValue = require_is_value();
346
+ var captureStackTrace = Error.captureStackTrace;
347
+ module.exports = function(message) {
348
+ var err = new Error(message), code = arguments[1], ext = arguments[2];
349
+ if (!isValue(ext)) {
350
+ if (isObject(code)) {
351
+ ext = code;
352
+ code = null;
353
+ }
354
+ }
355
+ if (isValue(ext)) assign(err, ext);
356
+ if (isValue(code)) err.code = code;
357
+ if (captureStackTrace) captureStackTrace(err, module.exports);
358
+ return err;
359
+ };
360
+ }
361
+ });
362
+
363
+ // ../../node_modules/es5-ext/object/mixin.js
364
+ var require_mixin = __commonJS({
365
+ "../../node_modules/es5-ext/object/mixin.js"(exports$1, module) {
366
+ init_cjs_shims();
367
+ var value = require_valid_value();
368
+ var defineProperty = Object.defineProperty;
369
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
370
+ var getOwnPropertyNames = Object.getOwnPropertyNames;
371
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
372
+ module.exports = function(target, source) {
373
+ var error, sourceObject = Object(value(source));
374
+ target = Object(value(target));
375
+ getOwnPropertyNames(sourceObject).forEach(function(name) {
376
+ try {
377
+ defineProperty(target, name, getOwnPropertyDescriptor(source, name));
378
+ } catch (e) {
379
+ error = e;
380
+ }
381
+ });
382
+ if (typeof getOwnPropertySymbols === "function") {
383
+ getOwnPropertySymbols(sourceObject).forEach(function(symbol) {
384
+ try {
385
+ defineProperty(target, symbol, getOwnPropertyDescriptor(source, symbol));
386
+ } catch (e) {
387
+ error = e;
388
+ }
389
+ });
390
+ }
391
+ if (error !== void 0) throw error;
392
+ return target;
393
+ };
394
+ }
395
+ });
396
+
397
+ // ../../node_modules/es5-ext/function/_define-length.js
398
+ var require_define_length = __commonJS({
399
+ "../../node_modules/es5-ext/function/_define-length.js"(exports$1, module) {
400
+ init_cjs_shims();
401
+ var toPosInt = require_to_pos_integer();
402
+ var test = /* @__PURE__ */ __name(function(arg1, arg2) {
403
+ return arg2;
404
+ }, "test");
405
+ var desc;
406
+ var defineProperty;
407
+ var generate;
408
+ var mixin;
409
+ try {
410
+ Object.defineProperty(test, "length", {
411
+ configurable: true,
412
+ writable: false,
413
+ enumerable: false,
414
+ value: 1
415
+ });
416
+ } catch (ignore) {
417
+ }
418
+ if (test.length === 1) {
419
+ desc = {
420
+ configurable: true,
421
+ writable: false,
422
+ enumerable: false
423
+ };
424
+ defineProperty = Object.defineProperty;
425
+ module.exports = function(fn, length) {
426
+ length = toPosInt(length);
427
+ if (fn.length === length) return fn;
428
+ desc.value = length;
429
+ return defineProperty(fn, "length", desc);
430
+ };
431
+ } else {
432
+ mixin = require_mixin();
433
+ generate = /* @__PURE__ */ (function() {
434
+ var cache = [];
435
+ return function(length) {
436
+ var args, i = 0;
437
+ if (cache[length]) return cache[length];
438
+ args = [];
439
+ while (length--) args.push("a" + (++i).toString(36));
440
+ return new Function("fn", "return function (" + args.join(", ") + ") { return fn.apply(this, arguments); };");
441
+ };
442
+ })();
443
+ module.exports = function(src, length) {
444
+ var target;
445
+ length = toPosInt(length);
446
+ if (src.length === length) return src;
447
+ target = generate(length)(src);
448
+ try {
449
+ mixin(target, src);
450
+ } catch (ignore) {
451
+ }
452
+ return target;
453
+ };
454
+ }
455
+ }
456
+ });
457
+
458
+ // ../../node_modules/type/value/is.js
459
+ var require_is = __commonJS({
460
+ "../../node_modules/type/value/is.js"(exports$1, module) {
461
+ init_cjs_shims();
462
+ var _undefined = void 0;
463
+ module.exports = function(value) {
464
+ return value !== _undefined && value !== null;
465
+ };
466
+ }
467
+ });
468
+
469
+ // ../../node_modules/type/object/is.js
470
+ var require_is2 = __commonJS({
471
+ "../../node_modules/type/object/is.js"(exports$1, module) {
472
+ init_cjs_shims();
473
+ var isValue = require_is();
474
+ var possibleTypes = {
475
+ "object": true,
476
+ "function": true,
477
+ "undefined": true
478
+ };
479
+ module.exports = function(value) {
480
+ if (!isValue(value)) return false;
481
+ return hasOwnProperty.call(possibleTypes, typeof value);
482
+ };
483
+ }
484
+ });
485
+
486
+ // ../../node_modules/type/prototype/is.js
487
+ var require_is3 = __commonJS({
488
+ "../../node_modules/type/prototype/is.js"(exports$1, module) {
489
+ init_cjs_shims();
490
+ var isObject = require_is2();
491
+ module.exports = function(value) {
492
+ if (!isObject(value)) return false;
493
+ try {
494
+ if (!value.constructor) return false;
495
+ return value.constructor.prototype === value;
496
+ } catch (error) {
497
+ return false;
498
+ }
499
+ };
500
+ }
501
+ });
502
+
503
+ // ../../node_modules/type/function/is.js
504
+ var require_is4 = __commonJS({
505
+ "../../node_modules/type/function/is.js"(exports$1, module) {
506
+ init_cjs_shims();
507
+ var isPrototype = require_is3();
508
+ module.exports = function(value) {
509
+ if (typeof value !== "function") return false;
510
+ if (!hasOwnProperty.call(value, "length")) return false;
511
+ try {
512
+ if (typeof value.length !== "number") return false;
513
+ if (typeof value.call !== "function") return false;
514
+ if (typeof value.apply !== "function") return false;
515
+ } catch (error) {
516
+ return false;
517
+ }
518
+ return !isPrototype(value);
519
+ };
520
+ }
521
+ });
522
+
523
+ // ../../node_modules/type/plain-function/is.js
524
+ var require_is5 = __commonJS({
525
+ "../../node_modules/type/plain-function/is.js"(exports$1, module) {
526
+ init_cjs_shims();
527
+ var isFunction2 = require_is4();
528
+ var classRe = /^\s*class[\s{/}]/;
529
+ var functionToString = Function.prototype.toString;
530
+ module.exports = function(value) {
531
+ if (!isFunction2(value)) return false;
532
+ if (classRe.test(functionToString.call(value))) return false;
533
+ return true;
534
+ };
535
+ }
536
+ });
537
+
538
+ // ../../node_modules/es5-ext/string/#/contains/is-implemented.js
539
+ var require_is_implemented4 = __commonJS({
540
+ "../../node_modules/es5-ext/string/#/contains/is-implemented.js"(exports$1, module) {
541
+ init_cjs_shims();
542
+ var str = "razdwatrzy";
543
+ module.exports = function() {
544
+ if (typeof str.contains !== "function") return false;
545
+ return str.contains("dwa") === true && str.contains("foo") === false;
546
+ };
547
+ }
548
+ });
549
+
550
+ // ../../node_modules/es5-ext/string/#/contains/shim.js
551
+ var require_shim4 = __commonJS({
552
+ "../../node_modules/es5-ext/string/#/contains/shim.js"(exports$1, module) {
553
+ init_cjs_shims();
554
+ var indexOf = String.prototype.indexOf;
555
+ module.exports = function(searchString) {
556
+ return indexOf.call(this, searchString, arguments[1]) > -1;
557
+ };
558
+ }
559
+ });
560
+
561
+ // ../../node_modules/es5-ext/string/#/contains/index.js
562
+ var require_contains = __commonJS({
563
+ "../../node_modules/es5-ext/string/#/contains/index.js"(exports$1, module) {
564
+ init_cjs_shims();
565
+ module.exports = require_is_implemented4()() ? String.prototype.contains : require_shim4();
566
+ }
567
+ });
568
+
569
+ // ../../node_modules/d/index.js
570
+ var require_d = __commonJS({
571
+ "../../node_modules/d/index.js"(exports$1, module) {
572
+ init_cjs_shims();
573
+ var isValue = require_is();
574
+ var isPlainFunction = require_is5();
575
+ var assign = require_assign();
576
+ var normalizeOpts = require_normalize_options();
577
+ var contains = require_contains();
578
+ var d = module.exports = function(dscr, value) {
579
+ var c, e, w, options, desc;
580
+ if (arguments.length < 2 || typeof dscr !== "string") {
581
+ options = value;
582
+ value = dscr;
583
+ dscr = null;
584
+ } else {
585
+ options = arguments[2];
586
+ }
587
+ if (isValue(dscr)) {
588
+ c = contains.call(dscr, "c");
589
+ e = contains.call(dscr, "e");
590
+ w = contains.call(dscr, "w");
591
+ } else {
592
+ c = w = true;
593
+ e = false;
594
+ }
595
+ desc = {
596
+ value,
597
+ configurable: c,
598
+ enumerable: e,
599
+ writable: w
600
+ };
601
+ return !options ? desc : assign(normalizeOpts(options), desc);
602
+ };
603
+ d.gs = function(dscr, get, set) {
604
+ var c, e, options, desc;
605
+ if (typeof dscr !== "string") {
606
+ options = set;
607
+ set = get;
608
+ get = dscr;
609
+ dscr = null;
610
+ } else {
611
+ options = arguments[3];
612
+ }
613
+ if (!isValue(get)) {
614
+ get = void 0;
615
+ } else if (!isPlainFunction(get)) {
616
+ options = get;
617
+ get = set = void 0;
618
+ } else if (!isValue(set)) {
619
+ set = void 0;
620
+ } else if (!isPlainFunction(set)) {
621
+ options = set;
622
+ set = void 0;
623
+ }
624
+ if (isValue(dscr)) {
625
+ c = contains.call(dscr, "c");
626
+ e = contains.call(dscr, "e");
627
+ } else {
628
+ c = true;
629
+ e = false;
630
+ }
631
+ desc = {
632
+ get,
633
+ set,
634
+ configurable: c,
635
+ enumerable: e
636
+ };
637
+ return !options ? desc : assign(normalizeOpts(options), desc);
638
+ };
639
+ }
640
+ });
641
+
642
+ // ../../node_modules/event-emitter/index.js
643
+ var require_event_emitter = __commonJS({
644
+ "../../node_modules/event-emitter/index.js"(exports$1, module) {
645
+ init_cjs_shims();
646
+ var d = require_d();
647
+ var callable = require_valid_callable();
648
+ var apply = Function.prototype.apply;
649
+ var call = Function.prototype.call;
650
+ var create = Object.create;
651
+ var defineProperty = Object.defineProperty;
652
+ var defineProperties = Object.defineProperties;
653
+ var hasOwnProperty2 = Object.prototype.hasOwnProperty;
654
+ var descriptor = {
655
+ configurable: true,
656
+ enumerable: false,
657
+ writable: true
658
+ };
659
+ var on;
660
+ var once;
661
+ var off;
662
+ var emit;
663
+ var methods;
664
+ var descriptors;
665
+ var base;
666
+ on = /* @__PURE__ */ __name(function(type, listener) {
667
+ var data;
668
+ callable(listener);
669
+ if (!hasOwnProperty2.call(this, "__ee__")) {
670
+ data = descriptor.value = create(null);
671
+ defineProperty(this, "__ee__", descriptor);
672
+ descriptor.value = null;
673
+ } else {
674
+ data = this.__ee__;
675
+ }
676
+ if (!data[type]) data[type] = listener;
677
+ else if (typeof data[type] === "object") data[type].push(listener);
678
+ else data[type] = [
679
+ data[type],
680
+ listener
681
+ ];
682
+ return this;
683
+ }, "on");
684
+ once = /* @__PURE__ */ __name(function(type, listener) {
685
+ var once2, self2;
686
+ callable(listener);
687
+ self2 = this;
688
+ on.call(this, type, once2 = /* @__PURE__ */ __name(function() {
689
+ off.call(self2, type, once2);
690
+ apply.call(listener, this, arguments);
691
+ }, "once"));
692
+ once2.__eeOnceListener__ = listener;
693
+ return this;
694
+ }, "once");
695
+ off = /* @__PURE__ */ __name(function(type, listener) {
696
+ var data, listeners, candidate, i;
697
+ callable(listener);
698
+ if (!hasOwnProperty2.call(this, "__ee__")) return this;
699
+ data = this.__ee__;
700
+ if (!data[type]) return this;
701
+ listeners = data[type];
702
+ if (typeof listeners === "object") {
703
+ for (i = 0; candidate = listeners[i]; ++i) {
704
+ if (candidate === listener || candidate.__eeOnceListener__ === listener) {
705
+ if (listeners.length === 2) data[type] = listeners[i ? 0 : 1];
706
+ else listeners.splice(i, 1);
707
+ }
708
+ }
709
+ } else {
710
+ if (listeners === listener || listeners.__eeOnceListener__ === listener) {
711
+ delete data[type];
712
+ }
713
+ }
714
+ return this;
715
+ }, "off");
716
+ emit = /* @__PURE__ */ __name(function(type) {
717
+ var i, l, listener, listeners, args;
718
+ if (!hasOwnProperty2.call(this, "__ee__")) return;
719
+ listeners = this.__ee__[type];
720
+ if (!listeners) return;
721
+ if (typeof listeners === "object") {
722
+ l = arguments.length;
723
+ args = new Array(l - 1);
724
+ for (i = 1; i < l; ++i) args[i - 1] = arguments[i];
725
+ listeners = listeners.slice();
726
+ for (i = 0; listener = listeners[i]; ++i) {
727
+ apply.call(listener, this, args);
728
+ }
729
+ } else {
730
+ switch (arguments.length) {
731
+ case 1:
732
+ call.call(listeners, this);
733
+ break;
734
+ case 2:
735
+ call.call(listeners, this, arguments[1]);
736
+ break;
737
+ case 3:
738
+ call.call(listeners, this, arguments[1], arguments[2]);
739
+ break;
740
+ default:
741
+ l = arguments.length;
742
+ args = new Array(l - 1);
743
+ for (i = 1; i < l; ++i) {
744
+ args[i - 1] = arguments[i];
745
+ }
746
+ apply.call(listeners, this, args);
747
+ }
748
+ }
749
+ }, "emit");
750
+ methods = {
751
+ on,
752
+ once,
753
+ off,
754
+ emit
755
+ };
756
+ descriptors = {
757
+ on: d(on),
758
+ once: d(once),
759
+ off: d(off),
760
+ emit: d(emit)
761
+ };
762
+ base = defineProperties({}, descriptors);
763
+ module.exports = exports$1 = /* @__PURE__ */ __name(function(o) {
764
+ return o == null ? create(base) : defineProperties(Object(o), descriptors);
765
+ }, "exports");
766
+ exports$1.methods = methods;
767
+ }
768
+ });
769
+
770
+ // ../../node_modules/es5-ext/array/from/is-implemented.js
771
+ var require_is_implemented5 = __commonJS({
772
+ "../../node_modules/es5-ext/array/from/is-implemented.js"(exports$1, module) {
773
+ init_cjs_shims();
774
+ module.exports = function() {
775
+ var from = Array.from, arr, result;
776
+ if (typeof from !== "function") return false;
777
+ arr = [
778
+ "raz",
779
+ "dwa"
780
+ ];
781
+ result = from(arr);
782
+ return Boolean(result && result !== arr && result[1] === "dwa");
783
+ };
784
+ }
785
+ });
786
+
787
+ // ../../node_modules/ext/global-this/is-implemented.js
788
+ var require_is_implemented6 = __commonJS({
789
+ "../../node_modules/ext/global-this/is-implemented.js"(exports$1, module) {
790
+ init_cjs_shims();
791
+ module.exports = function() {
792
+ if (typeof globalThis !== "object") return false;
793
+ if (!globalThis) return false;
794
+ return globalThis.Array === Array;
795
+ };
796
+ }
797
+ });
798
+
799
+ // ../../node_modules/ext/global-this/implementation.js
800
+ var require_implementation = __commonJS({
801
+ "../../node_modules/ext/global-this/implementation.js"(exports$1, module) {
802
+ init_cjs_shims();
803
+ var naiveFallback = /* @__PURE__ */ __name(function() {
804
+ if (typeof self === "object" && self) return self;
805
+ if (typeof window === "object" && window) return window;
806
+ throw new Error("Unable to resolve global `this`");
807
+ }, "naiveFallback");
808
+ module.exports = (function() {
809
+ if (this) return this;
810
+ try {
811
+ Object.defineProperty(Object.prototype, "__global__", {
812
+ get: /* @__PURE__ */ __name(function() {
813
+ return this;
814
+ }, "get"),
815
+ configurable: true
816
+ });
817
+ } catch (error) {
818
+ return naiveFallback();
819
+ }
820
+ try {
821
+ if (!__global__) return naiveFallback();
822
+ return __global__;
823
+ } finally {
824
+ delete Object.prototype.__global__;
825
+ }
826
+ })();
827
+ }
828
+ });
829
+
830
+ // ../../node_modules/ext/global-this/index.js
831
+ var require_global_this = __commonJS({
832
+ "../../node_modules/ext/global-this/index.js"(exports$1, module) {
833
+ init_cjs_shims();
834
+ module.exports = require_is_implemented6()() ? globalThis : require_implementation();
835
+ }
836
+ });
837
+
838
+ // ../../node_modules/es6-symbol/is-implemented.js
839
+ var require_is_implemented7 = __commonJS({
840
+ "../../node_modules/es6-symbol/is-implemented.js"(exports$1, module) {
841
+ init_cjs_shims();
842
+ var global = require_global_this();
843
+ var validTypes = {
844
+ object: true,
845
+ symbol: true
846
+ };
847
+ module.exports = function() {
848
+ var Symbol2 = global.Symbol;
849
+ var symbol;
850
+ if (typeof Symbol2 !== "function") return false;
851
+ symbol = Symbol2("test symbol");
852
+ try {
853
+ String(symbol);
854
+ } catch (e) {
855
+ return false;
856
+ }
857
+ if (!validTypes[typeof Symbol2.iterator]) return false;
858
+ if (!validTypes[typeof Symbol2.toPrimitive]) return false;
859
+ if (!validTypes[typeof Symbol2.toStringTag]) return false;
860
+ return true;
861
+ };
862
+ }
863
+ });
864
+
865
+ // ../../node_modules/es6-symbol/is-symbol.js
866
+ var require_is_symbol = __commonJS({
867
+ "../../node_modules/es6-symbol/is-symbol.js"(exports$1, module) {
868
+ init_cjs_shims();
869
+ module.exports = function(value) {
870
+ if (!value) return false;
871
+ if (typeof value === "symbol") return true;
872
+ if (!value.constructor) return false;
873
+ if (value.constructor.name !== "Symbol") return false;
874
+ return value[value.constructor.toStringTag] === "Symbol";
875
+ };
876
+ }
877
+ });
878
+
879
+ // ../../node_modules/es6-symbol/validate-symbol.js
880
+ var require_validate_symbol = __commonJS({
881
+ "../../node_modules/es6-symbol/validate-symbol.js"(exports$1, module) {
882
+ init_cjs_shims();
883
+ var isSymbol = require_is_symbol();
884
+ module.exports = function(value) {
885
+ if (!isSymbol(value)) throw new TypeError(value + " is not a symbol");
886
+ return value;
887
+ };
888
+ }
889
+ });
890
+
891
+ // ../../node_modules/es6-symbol/lib/private/generate-name.js
892
+ var require_generate_name = __commonJS({
893
+ "../../node_modules/es6-symbol/lib/private/generate-name.js"(exports$1, module) {
894
+ init_cjs_shims();
895
+ var d = require_d();
896
+ var create = Object.create;
897
+ var defineProperty = Object.defineProperty;
898
+ var objPrototype = Object.prototype;
899
+ var created = create(null);
900
+ module.exports = function(desc) {
901
+ var postfix = 0, name, ie11BugWorkaround;
902
+ while (created[desc + (postfix || "")]) ++postfix;
903
+ desc += postfix || "";
904
+ created[desc] = true;
905
+ name = "@@" + desc;
906
+ defineProperty(objPrototype, name, d.gs(null, function(value) {
907
+ if (ie11BugWorkaround) return;
908
+ ie11BugWorkaround = true;
909
+ defineProperty(this, name, d(value));
910
+ ie11BugWorkaround = false;
911
+ }));
912
+ return name;
913
+ };
914
+ }
915
+ });
916
+
917
+ // ../../node_modules/es6-symbol/lib/private/setup/standard-symbols.js
918
+ var require_standard_symbols = __commonJS({
919
+ "../../node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(exports$1, module) {
920
+ init_cjs_shims();
921
+ var d = require_d();
922
+ var NativeSymbol = require_global_this().Symbol;
923
+ module.exports = function(SymbolPolyfill) {
924
+ return Object.defineProperties(SymbolPolyfill, {
925
+ // To ensure proper interoperability with other native functions (e.g. Array.from)
926
+ // fallback to eventual native implementation of given symbol
927
+ hasInstance: d("", NativeSymbol && NativeSymbol.hasInstance || SymbolPolyfill("hasInstance")),
928
+ isConcatSpreadable: d("", NativeSymbol && NativeSymbol.isConcatSpreadable || SymbolPolyfill("isConcatSpreadable")),
929
+ iterator: d("", NativeSymbol && NativeSymbol.iterator || SymbolPolyfill("iterator")),
930
+ match: d("", NativeSymbol && NativeSymbol.match || SymbolPolyfill("match")),
931
+ replace: d("", NativeSymbol && NativeSymbol.replace || SymbolPolyfill("replace")),
932
+ search: d("", NativeSymbol && NativeSymbol.search || SymbolPolyfill("search")),
933
+ species: d("", NativeSymbol && NativeSymbol.species || SymbolPolyfill("species")),
934
+ split: d("", NativeSymbol && NativeSymbol.split || SymbolPolyfill("split")),
935
+ toPrimitive: d("", NativeSymbol && NativeSymbol.toPrimitive || SymbolPolyfill("toPrimitive")),
936
+ toStringTag: d("", NativeSymbol && NativeSymbol.toStringTag || SymbolPolyfill("toStringTag")),
937
+ unscopables: d("", NativeSymbol && NativeSymbol.unscopables || SymbolPolyfill("unscopables"))
938
+ });
939
+ };
940
+ }
941
+ });
942
+
943
+ // ../../node_modules/es6-symbol/lib/private/setup/symbol-registry.js
944
+ var require_symbol_registry = __commonJS({
945
+ "../../node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(exports$1, module) {
946
+ init_cjs_shims();
947
+ var d = require_d();
948
+ var validateSymbol = require_validate_symbol();
949
+ var registry = /* @__PURE__ */ Object.create(null);
950
+ module.exports = function(SymbolPolyfill) {
951
+ return Object.defineProperties(SymbolPolyfill, {
952
+ for: d(function(key) {
953
+ if (registry[key]) return registry[key];
954
+ return registry[key] = SymbolPolyfill(String(key));
955
+ }),
956
+ keyFor: d(function(symbol) {
957
+ var key;
958
+ validateSymbol(symbol);
959
+ for (key in registry) {
960
+ if (registry[key] === symbol) return key;
961
+ }
962
+ return void 0;
963
+ })
964
+ });
965
+ };
966
+ }
967
+ });
968
+
969
+ // ../../node_modules/es6-symbol/polyfill.js
970
+ var require_polyfill = __commonJS({
971
+ "../../node_modules/es6-symbol/polyfill.js"(exports$1, module) {
972
+ init_cjs_shims();
973
+ var d = require_d();
974
+ var validateSymbol = require_validate_symbol();
975
+ var NativeSymbol = require_global_this().Symbol;
976
+ var generateName = require_generate_name();
977
+ var setupStandardSymbols = require_standard_symbols();
978
+ var setupSymbolRegistry = require_symbol_registry();
979
+ var create = Object.create;
980
+ var defineProperties = Object.defineProperties;
981
+ var defineProperty = Object.defineProperty;
982
+ var SymbolPolyfill;
983
+ var HiddenSymbol;
984
+ var isNativeSafe;
985
+ if (typeof NativeSymbol === "function") {
986
+ try {
987
+ String(NativeSymbol());
988
+ isNativeSafe = true;
989
+ } catch (ignore) {
990
+ }
991
+ } else {
992
+ NativeSymbol = null;
993
+ }
994
+ HiddenSymbol = /* @__PURE__ */ __name(function Symbol2(description) {
995
+ if (this instanceof HiddenSymbol) throw new TypeError("Symbol is not a constructor");
996
+ return SymbolPolyfill(description);
997
+ }, "Symbol");
998
+ module.exports = SymbolPolyfill = /* @__PURE__ */ __name(function Symbol2(description) {
999
+ var symbol;
1000
+ if (this instanceof Symbol2) throw new TypeError("Symbol is not a constructor");
1001
+ if (isNativeSafe) return NativeSymbol(description);
1002
+ symbol = create(HiddenSymbol.prototype);
1003
+ description = description === void 0 ? "" : String(description);
1004
+ return defineProperties(symbol, {
1005
+ __description__: d("", description),
1006
+ __name__: d("", generateName(description))
1007
+ });
1008
+ }, "Symbol");
1009
+ setupStandardSymbols(SymbolPolyfill);
1010
+ setupSymbolRegistry(SymbolPolyfill);
1011
+ defineProperties(HiddenSymbol.prototype, {
1012
+ constructor: d(SymbolPolyfill),
1013
+ toString: d("", function() {
1014
+ return this.__name__;
1015
+ })
1016
+ });
1017
+ defineProperties(SymbolPolyfill.prototype, {
1018
+ toString: d(function() {
1019
+ return "Symbol (" + validateSymbol(this).__description__ + ")";
1020
+ }),
1021
+ valueOf: d(function() {
1022
+ return validateSymbol(this);
1023
+ })
1024
+ });
1025
+ defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d("", function() {
1026
+ var symbol = validateSymbol(this);
1027
+ if (typeof symbol === "symbol") return symbol;
1028
+ return symbol.toString();
1029
+ }));
1030
+ defineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d("c", "Symbol"));
1031
+ defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toStringTag, d("c", SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]));
1032
+ defineProperty(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive, d("c", SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]));
1033
+ }
1034
+ });
1035
+
1036
+ // ../../node_modules/es6-symbol/index.js
1037
+ var require_es6_symbol = __commonJS({
1038
+ "../../node_modules/es6-symbol/index.js"(exports$1, module) {
1039
+ init_cjs_shims();
1040
+ module.exports = require_is_implemented7()() ? require_global_this().Symbol : require_polyfill();
1041
+ }
1042
+ });
1043
+
1044
+ // ../../node_modules/es5-ext/function/is-arguments.js
1045
+ var require_is_arguments = __commonJS({
1046
+ "../../node_modules/es5-ext/function/is-arguments.js"(exports$1, module) {
1047
+ init_cjs_shims();
1048
+ var objToString = Object.prototype.toString;
1049
+ var id = objToString.call(/* @__PURE__ */ (function() {
1050
+ return arguments;
1051
+ })());
1052
+ module.exports = function(value) {
1053
+ return objToString.call(value) === id;
1054
+ };
1055
+ }
1056
+ });
1057
+
1058
+ // ../../node_modules/es5-ext/function/is-function.js
1059
+ var require_is_function = __commonJS({
1060
+ "../../node_modules/es5-ext/function/is-function.js"(exports$1, module) {
1061
+ init_cjs_shims();
1062
+ var objToString = Object.prototype.toString;
1063
+ var isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);
1064
+ module.exports = function(value) {
1065
+ return typeof value === "function" && isFunctionStringTag(objToString.call(value));
1066
+ };
1067
+ }
1068
+ });
1069
+
1070
+ // ../../node_modules/es5-ext/string/is-string.js
1071
+ var require_is_string = __commonJS({
1072
+ "../../node_modules/es5-ext/string/is-string.js"(exports$1, module) {
1073
+ init_cjs_shims();
1074
+ var objToString = Object.prototype.toString;
1075
+ var id = objToString.call("");
1076
+ module.exports = function(value) {
1077
+ return typeof value === "string" || value && typeof value === "object" && (value instanceof String || objToString.call(value) === id) || false;
1078
+ };
1079
+ }
1080
+ });
1081
+
1082
+ // ../../node_modules/es5-ext/array/from/shim.js
1083
+ var require_shim5 = __commonJS({
1084
+ "../../node_modules/es5-ext/array/from/shim.js"(exports$1, module) {
1085
+ init_cjs_shims();
1086
+ var iteratorSymbol = require_es6_symbol().iterator;
1087
+ var isArguments = require_is_arguments();
1088
+ var isFunction2 = require_is_function();
1089
+ var toPosInt = require_to_pos_integer();
1090
+ var callable = require_valid_callable();
1091
+ var validValue = require_valid_value();
1092
+ var isValue = require_is_value();
1093
+ var isString = require_is_string();
1094
+ var isArray = Array.isArray;
1095
+ var call = Function.prototype.call;
1096
+ var desc = {
1097
+ configurable: true,
1098
+ enumerable: true,
1099
+ writable: true,
1100
+ value: null
1101
+ };
1102
+ var defineProperty = Object.defineProperty;
1103
+ module.exports = function(arrayLike) {
1104
+ var mapFn = arguments[1], thisArg = arguments[2], Context, i, j, arr, length, code, iterator, result, getIterator, value;
1105
+ arrayLike = Object(validValue(arrayLike));
1106
+ if (isValue(mapFn)) callable(mapFn);
1107
+ if (!this || this === Array || !isFunction2(this)) {
1108
+ if (!mapFn) {
1109
+ if (isArguments(arrayLike)) {
1110
+ length = arrayLike.length;
1111
+ if (length !== 1) return Array.apply(null, arrayLike);
1112
+ arr = new Array(1);
1113
+ arr[0] = arrayLike[0];
1114
+ return arr;
1115
+ }
1116
+ if (isArray(arrayLike)) {
1117
+ arr = new Array(length = arrayLike.length);
1118
+ for (i = 0; i < length; ++i) arr[i] = arrayLike[i];
1119
+ return arr;
1120
+ }
1121
+ }
1122
+ arr = [];
1123
+ } else {
1124
+ Context = this;
1125
+ }
1126
+ if (!isArray(arrayLike)) {
1127
+ if ((getIterator = arrayLike[iteratorSymbol]) !== void 0) {
1128
+ iterator = callable(getIterator).call(arrayLike);
1129
+ if (Context) arr = new Context();
1130
+ result = iterator.next();
1131
+ i = 0;
1132
+ while (!result.done) {
1133
+ value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;
1134
+ if (Context) {
1135
+ desc.value = value;
1136
+ defineProperty(arr, i, desc);
1137
+ } else {
1138
+ arr[i] = value;
1139
+ }
1140
+ result = iterator.next();
1141
+ ++i;
1142
+ }
1143
+ length = i;
1144
+ } else if (isString(arrayLike)) {
1145
+ length = arrayLike.length;
1146
+ if (Context) arr = new Context();
1147
+ for (i = 0, j = 0; i < length; ++i) {
1148
+ value = arrayLike[i];
1149
+ if (i + 1 < length) {
1150
+ code = value.charCodeAt(0);
1151
+ if (code >= 55296 && code <= 56319) value += arrayLike[++i];
1152
+ }
1153
+ value = mapFn ? call.call(mapFn, thisArg, value, j) : value;
1154
+ if (Context) {
1155
+ desc.value = value;
1156
+ defineProperty(arr, j, desc);
1157
+ } else {
1158
+ arr[j] = value;
1159
+ }
1160
+ ++j;
1161
+ }
1162
+ length = j;
1163
+ }
1164
+ }
1165
+ if (length === void 0) {
1166
+ length = toPosInt(arrayLike.length);
1167
+ if (Context) arr = new Context(length);
1168
+ for (i = 0; i < length; ++i) {
1169
+ value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];
1170
+ if (Context) {
1171
+ desc.value = value;
1172
+ defineProperty(arr, i, desc);
1173
+ } else {
1174
+ arr[i] = value;
1175
+ }
1176
+ }
1177
+ }
1178
+ if (Context) {
1179
+ desc.value = null;
1180
+ arr.length = length;
1181
+ }
1182
+ return arr;
1183
+ };
1184
+ }
1185
+ });
1186
+
1187
+ // ../../node_modules/es5-ext/array/from/index.js
1188
+ var require_from = __commonJS({
1189
+ "../../node_modules/es5-ext/array/from/index.js"(exports$1, module) {
1190
+ init_cjs_shims();
1191
+ module.exports = require_is_implemented5()() ? Array.from : require_shim5();
1192
+ }
1193
+ });
1194
+
1195
+ // ../../node_modules/es5-ext/array/to-array.js
1196
+ var require_to_array = __commonJS({
1197
+ "../../node_modules/es5-ext/array/to-array.js"(exports$1, module) {
1198
+ init_cjs_shims();
1199
+ var from = require_from();
1200
+ var isArray = Array.isArray;
1201
+ module.exports = function(arrayLike) {
1202
+ return isArray(arrayLike) ? arrayLike : from(arrayLike);
1203
+ };
1204
+ }
1205
+ });
1206
+
1207
+ // ../../node_modules/memoizee/lib/resolve-resolve.js
1208
+ var require_resolve_resolve = __commonJS({
1209
+ "../../node_modules/memoizee/lib/resolve-resolve.js"(exports$1, module) {
1210
+ init_cjs_shims();
1211
+ var toArray = require_to_array();
1212
+ var isValue = require_is_value();
1213
+ var callable = require_valid_callable();
1214
+ var slice = Array.prototype.slice;
1215
+ var resolveArgs;
1216
+ resolveArgs = /* @__PURE__ */ __name(function(args) {
1217
+ return this.map(function(resolve, i) {
1218
+ return resolve ? resolve(args[i]) : args[i];
1219
+ }).concat(slice.call(args, this.length));
1220
+ }, "resolveArgs");
1221
+ module.exports = function(resolvers) {
1222
+ resolvers = toArray(resolvers);
1223
+ resolvers.forEach(function(resolve) {
1224
+ if (isValue(resolve)) callable(resolve);
1225
+ });
1226
+ return resolveArgs.bind(resolvers);
1227
+ };
1228
+ }
1229
+ });
1230
+
1231
+ // ../../node_modules/memoizee/lib/resolve-normalize.js
1232
+ var require_resolve_normalize = __commonJS({
1233
+ "../../node_modules/memoizee/lib/resolve-normalize.js"(exports$1, module) {
1234
+ init_cjs_shims();
1235
+ var callable = require_valid_callable();
1236
+ module.exports = function(userNormalizer) {
1237
+ var normalizer;
1238
+ if (typeof userNormalizer === "function") return {
1239
+ set: userNormalizer,
1240
+ get: userNormalizer
1241
+ };
1242
+ normalizer = {
1243
+ get: callable(userNormalizer.get)
1244
+ };
1245
+ if (userNormalizer.set !== void 0) {
1246
+ normalizer.set = callable(userNormalizer.set);
1247
+ if (userNormalizer.delete) normalizer.delete = callable(userNormalizer.delete);
1248
+ if (userNormalizer.clear) normalizer.clear = callable(userNormalizer.clear);
1249
+ return normalizer;
1250
+ }
1251
+ normalizer.set = normalizer.get;
1252
+ return normalizer;
1253
+ };
1254
+ }
1255
+ });
1256
+
1257
+ // ../../node_modules/memoizee/lib/configure-map.js
1258
+ var require_configure_map = __commonJS({
1259
+ "../../node_modules/memoizee/lib/configure-map.js"(exports$1, module) {
1260
+ init_cjs_shims();
1261
+ var customError = require_custom();
1262
+ var defineLength = require_define_length();
1263
+ var d = require_d();
1264
+ var ee = require_event_emitter().methods;
1265
+ var resolveResolve = require_resolve_resolve();
1266
+ var resolveNormalize = require_resolve_normalize();
1267
+ var apply = Function.prototype.apply;
1268
+ var call = Function.prototype.call;
1269
+ var create = Object.create;
1270
+ var defineProperties = Object.defineProperties;
1271
+ var on = ee.on;
1272
+ var emit = ee.emit;
1273
+ module.exports = function(original, length, options) {
1274
+ var cache = create(null), conf, memLength, get, set, del, clear, extDel, extGet, extHas, normalizer, getListeners, setListeners, deleteListeners, memoized, resolve;
1275
+ if (length !== false) memLength = length;
1276
+ else if (isNaN(original.length)) memLength = 1;
1277
+ else memLength = original.length;
1278
+ if (options.normalizer) {
1279
+ normalizer = resolveNormalize(options.normalizer);
1280
+ get = normalizer.get;
1281
+ set = normalizer.set;
1282
+ del = normalizer.delete;
1283
+ clear = normalizer.clear;
1284
+ }
1285
+ if (options.resolvers != null) resolve = resolveResolve(options.resolvers);
1286
+ if (get) {
1287
+ memoized = defineLength(function(arg) {
1288
+ var id, result, args = arguments;
1289
+ if (resolve) args = resolve(args);
1290
+ id = get(args);
1291
+ if (id !== null) {
1292
+ if (hasOwnProperty.call(cache, id)) {
1293
+ if (getListeners) conf.emit("get", id, args, this);
1294
+ return cache[id];
1295
+ }
1296
+ }
1297
+ if (args.length === 1) result = call.call(original, this, args[0]);
1298
+ else result = apply.call(original, this, args);
1299
+ if (id === null) {
1300
+ id = get(args);
1301
+ if (id !== null) throw customError("Circular invocation", "CIRCULAR_INVOCATION");
1302
+ id = set(args);
1303
+ } else if (hasOwnProperty.call(cache, id)) {
1304
+ throw customError("Circular invocation", "CIRCULAR_INVOCATION");
1305
+ }
1306
+ cache[id] = result;
1307
+ if (setListeners) conf.emit("set", id, null, result);
1308
+ return result;
1309
+ }, memLength);
1310
+ } else if (length === 0) {
1311
+ memoized = /* @__PURE__ */ __name(function() {
1312
+ var result;
1313
+ if (hasOwnProperty.call(cache, "data")) {
1314
+ if (getListeners) conf.emit("get", "data", arguments, this);
1315
+ return cache.data;
1316
+ }
1317
+ if (arguments.length) result = apply.call(original, this, arguments);
1318
+ else result = call.call(original, this);
1319
+ if (hasOwnProperty.call(cache, "data")) {
1320
+ throw customError("Circular invocation", "CIRCULAR_INVOCATION");
1321
+ }
1322
+ cache.data = result;
1323
+ if (setListeners) conf.emit("set", "data", null, result);
1324
+ return result;
1325
+ }, "memoized");
1326
+ } else {
1327
+ memoized = /* @__PURE__ */ __name(function(arg) {
1328
+ var result, args = arguments, id;
1329
+ if (resolve) args = resolve(arguments);
1330
+ id = String(args[0]);
1331
+ if (hasOwnProperty.call(cache, id)) {
1332
+ if (getListeners) conf.emit("get", id, args, this);
1333
+ return cache[id];
1334
+ }
1335
+ if (args.length === 1) result = call.call(original, this, args[0]);
1336
+ else result = apply.call(original, this, args);
1337
+ if (hasOwnProperty.call(cache, id)) {
1338
+ throw customError("Circular invocation", "CIRCULAR_INVOCATION");
1339
+ }
1340
+ cache[id] = result;
1341
+ if (setListeners) conf.emit("set", id, null, result);
1342
+ return result;
1343
+ }, "memoized");
1344
+ }
1345
+ conf = {
1346
+ original,
1347
+ memoized,
1348
+ profileName: options.profileName,
1349
+ get: /* @__PURE__ */ __name(function(args) {
1350
+ if (resolve) args = resolve(args);
1351
+ if (get) return get(args);
1352
+ return String(args[0]);
1353
+ }, "get"),
1354
+ has: /* @__PURE__ */ __name(function(id) {
1355
+ return hasOwnProperty.call(cache, id);
1356
+ }, "has"),
1357
+ delete: /* @__PURE__ */ __name(function(id) {
1358
+ var result;
1359
+ if (!hasOwnProperty.call(cache, id)) return;
1360
+ if (del) del(id);
1361
+ result = cache[id];
1362
+ delete cache[id];
1363
+ if (deleteListeners) conf.emit("delete", id, result);
1364
+ }, "delete"),
1365
+ clear: /* @__PURE__ */ __name(function() {
1366
+ var oldCache = cache;
1367
+ if (clear) clear();
1368
+ cache = create(null);
1369
+ conf.emit("clear", oldCache);
1370
+ }, "clear"),
1371
+ on: /* @__PURE__ */ __name(function(type, listener) {
1372
+ if (type === "get") getListeners = true;
1373
+ else if (type === "set") setListeners = true;
1374
+ else if (type === "delete") deleteListeners = true;
1375
+ return on.call(this, type, listener);
1376
+ }, "on"),
1377
+ emit,
1378
+ updateEnv: /* @__PURE__ */ __name(function() {
1379
+ original = conf.original;
1380
+ }, "updateEnv")
1381
+ };
1382
+ if (get) {
1383
+ extDel = defineLength(function(arg) {
1384
+ var id, args = arguments;
1385
+ if (resolve) args = resolve(args);
1386
+ id = get(args);
1387
+ if (id === null) return;
1388
+ conf.delete(id);
1389
+ }, memLength);
1390
+ } else if (length === 0) {
1391
+ extDel = /* @__PURE__ */ __name(function() {
1392
+ return conf.delete("data");
1393
+ }, "extDel");
1394
+ } else {
1395
+ extDel = /* @__PURE__ */ __name(function(arg) {
1396
+ if (resolve) arg = resolve(arguments)[0];
1397
+ return conf.delete(arg);
1398
+ }, "extDel");
1399
+ }
1400
+ extGet = defineLength(function() {
1401
+ var id, args = arguments;
1402
+ if (length === 0) return cache.data;
1403
+ if (resolve) args = resolve(args);
1404
+ if (get) id = get(args);
1405
+ else id = String(args[0]);
1406
+ return cache[id];
1407
+ });
1408
+ extHas = defineLength(function() {
1409
+ var id, args = arguments;
1410
+ if (length === 0) return conf.has("data");
1411
+ if (resolve) args = resolve(args);
1412
+ if (get) id = get(args);
1413
+ else id = String(args[0]);
1414
+ if (id === null) return false;
1415
+ return conf.has(id);
1416
+ });
1417
+ defineProperties(memoized, {
1418
+ __memoized__: d(true),
1419
+ delete: d(extDel),
1420
+ clear: d(conf.clear),
1421
+ _get: d(extGet),
1422
+ _has: d(extHas)
1423
+ });
1424
+ return conf;
1425
+ };
1426
+ }
1427
+ });
1428
+
1429
+ // ../../node_modules/memoizee/plain.js
1430
+ var require_plain = __commonJS({
1431
+ "../../node_modules/memoizee/plain.js"(exports$1, module) {
1432
+ init_cjs_shims();
1433
+ var callable = require_valid_callable();
1434
+ var forEach = require_for_each();
1435
+ var extensions = require_registered_extensions();
1436
+ var configure = require_configure_map();
1437
+ var resolveLength = require_resolve_length();
1438
+ module.exports = /* @__PURE__ */ __name(function self2(fn) {
1439
+ var options, length, conf;
1440
+ callable(fn);
1441
+ options = Object(arguments[1]);
1442
+ if (options.async && options.promise) {
1443
+ throw new Error("Options 'async' and 'promise' cannot be used together");
1444
+ }
1445
+ if (hasOwnProperty.call(fn, "__memoized__") && !options.force) return fn;
1446
+ length = resolveLength(options.length, fn.length, options.async && extensions.async);
1447
+ conf = configure(fn, length, options);
1448
+ forEach(extensions, function(extFn, name) {
1449
+ if (options[name]) extFn(options[name], conf, options);
1450
+ });
1451
+ if (self2.__profiler__) self2.__profiler__(conf);
1452
+ conf.updateEnv();
1453
+ return conf.memoized;
1454
+ }, "self");
1455
+ }
1456
+ });
1457
+
1458
+ // ../../node_modules/memoizee/normalizers/primitive.js
1459
+ var require_primitive = __commonJS({
1460
+ "../../node_modules/memoizee/normalizers/primitive.js"(exports$1, module) {
1461
+ init_cjs_shims();
1462
+ module.exports = function(args) {
1463
+ var id, i, length = args.length;
1464
+ if (!length) return "";
1465
+ id = String(args[i = 0]);
1466
+ while (--length) id += "" + args[++i];
1467
+ return id;
1468
+ };
1469
+ }
1470
+ });
1471
+
1472
+ // ../../node_modules/memoizee/normalizers/get-primitive-fixed.js
1473
+ var require_get_primitive_fixed = __commonJS({
1474
+ "../../node_modules/memoizee/normalizers/get-primitive-fixed.js"(exports$1, module) {
1475
+ init_cjs_shims();
1476
+ module.exports = function(length) {
1477
+ if (!length) {
1478
+ return function() {
1479
+ return "";
1480
+ };
1481
+ }
1482
+ return function(args) {
1483
+ var id = String(args[0]), i = 0, currentLength = length;
1484
+ while (--currentLength) {
1485
+ id += "" + args[++i];
1486
+ }
1487
+ return id;
1488
+ };
1489
+ };
1490
+ }
1491
+ });
1492
+
1493
+ // ../../node_modules/es5-ext/number/is-nan/is-implemented.js
1494
+ var require_is_implemented8 = __commonJS({
1495
+ "../../node_modules/es5-ext/number/is-nan/is-implemented.js"(exports$1, module) {
1496
+ init_cjs_shims();
1497
+ module.exports = function() {
1498
+ var numberIsNaN = Number.isNaN;
1499
+ if (typeof numberIsNaN !== "function") return false;
1500
+ return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34);
1501
+ };
1502
+ }
1503
+ });
1504
+
1505
+ // ../../node_modules/es5-ext/number/is-nan/shim.js
1506
+ var require_shim6 = __commonJS({
1507
+ "../../node_modules/es5-ext/number/is-nan/shim.js"(exports$1, module) {
1508
+ init_cjs_shims();
1509
+ module.exports = function(value) {
1510
+ return value !== value;
1511
+ };
1512
+ }
1513
+ });
1514
+
1515
+ // ../../node_modules/es5-ext/number/is-nan/index.js
1516
+ var require_is_nan = __commonJS({
1517
+ "../../node_modules/es5-ext/number/is-nan/index.js"(exports$1, module) {
1518
+ init_cjs_shims();
1519
+ module.exports = require_is_implemented8()() ? Number.isNaN : require_shim6();
1520
+ }
1521
+ });
1522
+
1523
+ // ../../node_modules/es5-ext/array/#/e-index-of.js
1524
+ var require_e_index_of = __commonJS({
1525
+ "../../node_modules/es5-ext/array/#/e-index-of.js"(exports$1, module) {
1526
+ init_cjs_shims();
1527
+ var numberIsNaN = require_is_nan();
1528
+ var toPosInt = require_to_pos_integer();
1529
+ var value = require_valid_value();
1530
+ var indexOf = Array.prototype.indexOf;
1531
+ var objHasOwnProperty = Object.prototype.hasOwnProperty;
1532
+ var abs = Math.abs;
1533
+ var floor = Math.floor;
1534
+ module.exports = function(searchElement) {
1535
+ var i, length, fromIndex, val;
1536
+ if (!numberIsNaN(searchElement)) return indexOf.apply(this, arguments);
1537
+ length = toPosInt(value(this).length);
1538
+ fromIndex = arguments[1];
1539
+ if (isNaN(fromIndex)) fromIndex = 0;
1540
+ else if (fromIndex >= 0) fromIndex = floor(fromIndex);
1541
+ else fromIndex = toPosInt(this.length) - floor(abs(fromIndex));
1542
+ for (i = fromIndex; i < length; ++i) {
1543
+ if (objHasOwnProperty.call(this, i)) {
1544
+ val = this[i];
1545
+ if (numberIsNaN(val)) return i;
1546
+ }
1547
+ }
1548
+ return -1;
1549
+ };
1550
+ }
1551
+ });
1552
+
1553
+ // ../../node_modules/memoizee/normalizers/get.js
1554
+ var require_get = __commonJS({
1555
+ "../../node_modules/memoizee/normalizers/get.js"(exports$1, module) {
1556
+ init_cjs_shims();
1557
+ var indexOf = require_e_index_of();
1558
+ var create = Object.create;
1559
+ module.exports = function() {
1560
+ var lastId = 0, map = [], cache = create(null);
1561
+ return {
1562
+ get: /* @__PURE__ */ __name(function(args) {
1563
+ var index = 0, set = map, i, length = args.length;
1564
+ if (length === 0) return set[length] || null;
1565
+ if (set = set[length]) {
1566
+ while (index < length - 1) {
1567
+ i = indexOf.call(set[0], args[index]);
1568
+ if (i === -1) return null;
1569
+ set = set[1][i];
1570
+ ++index;
1571
+ }
1572
+ i = indexOf.call(set[0], args[index]);
1573
+ if (i === -1) return null;
1574
+ return set[1][i] || null;
1575
+ }
1576
+ return null;
1577
+ }, "get"),
1578
+ set: /* @__PURE__ */ __name(function(args) {
1579
+ var index = 0, set = map, i, length = args.length;
1580
+ if (length === 0) {
1581
+ set[length] = ++lastId;
1582
+ } else {
1583
+ if (!set[length]) {
1584
+ set[length] = [
1585
+ [],
1586
+ []
1587
+ ];
1588
+ }
1589
+ set = set[length];
1590
+ while (index < length - 1) {
1591
+ i = indexOf.call(set[0], args[index]);
1592
+ if (i === -1) {
1593
+ i = set[0].push(args[index]) - 1;
1594
+ set[1].push([
1595
+ [],
1596
+ []
1597
+ ]);
1598
+ }
1599
+ set = set[1][i];
1600
+ ++index;
1601
+ }
1602
+ i = indexOf.call(set[0], args[index]);
1603
+ if (i === -1) {
1604
+ i = set[0].push(args[index]) - 1;
1605
+ }
1606
+ set[1][i] = ++lastId;
1607
+ }
1608
+ cache[lastId] = args;
1609
+ return lastId;
1610
+ }, "set"),
1611
+ delete: /* @__PURE__ */ __name(function(id) {
1612
+ var index = 0, set = map, i, args = cache[id], length = args.length, path = [];
1613
+ if (length === 0) {
1614
+ delete set[length];
1615
+ } else if (set = set[length]) {
1616
+ while (index < length - 1) {
1617
+ i = indexOf.call(set[0], args[index]);
1618
+ if (i === -1) {
1619
+ return;
1620
+ }
1621
+ path.push(set, i);
1622
+ set = set[1][i];
1623
+ ++index;
1624
+ }
1625
+ i = indexOf.call(set[0], args[index]);
1626
+ if (i === -1) {
1627
+ return;
1628
+ }
1629
+ id = set[1][i];
1630
+ set[0].splice(i, 1);
1631
+ set[1].splice(i, 1);
1632
+ while (!set[0].length && path.length) {
1633
+ i = path.pop();
1634
+ set = path.pop();
1635
+ set[0].splice(i, 1);
1636
+ set[1].splice(i, 1);
1637
+ }
1638
+ }
1639
+ delete cache[id];
1640
+ }, "delete"),
1641
+ clear: /* @__PURE__ */ __name(function() {
1642
+ map = [];
1643
+ cache = create(null);
1644
+ }, "clear")
1645
+ };
1646
+ };
1647
+ }
1648
+ });
1649
+
1650
+ // ../../node_modules/memoizee/normalizers/get-1.js
1651
+ var require_get_1 = __commonJS({
1652
+ "../../node_modules/memoizee/normalizers/get-1.js"(exports$1, module) {
1653
+ init_cjs_shims();
1654
+ var indexOf = require_e_index_of();
1655
+ module.exports = function() {
1656
+ var lastId = 0, argsMap = [], cache = [];
1657
+ return {
1658
+ get: /* @__PURE__ */ __name(function(args) {
1659
+ var index = indexOf.call(argsMap, args[0]);
1660
+ return index === -1 ? null : cache[index];
1661
+ }, "get"),
1662
+ set: /* @__PURE__ */ __name(function(args) {
1663
+ argsMap.push(args[0]);
1664
+ cache.push(++lastId);
1665
+ return lastId;
1666
+ }, "set"),
1667
+ delete: /* @__PURE__ */ __name(function(id) {
1668
+ var index = indexOf.call(cache, id);
1669
+ if (index !== -1) {
1670
+ argsMap.splice(index, 1);
1671
+ cache.splice(index, 1);
1672
+ }
1673
+ }, "delete"),
1674
+ clear: /* @__PURE__ */ __name(function() {
1675
+ argsMap = [];
1676
+ cache = [];
1677
+ }, "clear")
1678
+ };
1679
+ };
1680
+ }
1681
+ });
1682
+
1683
+ // ../../node_modules/memoizee/normalizers/get-fixed.js
1684
+ var require_get_fixed = __commonJS({
1685
+ "../../node_modules/memoizee/normalizers/get-fixed.js"(exports$1, module) {
1686
+ init_cjs_shims();
1687
+ var indexOf = require_e_index_of();
1688
+ var create = Object.create;
1689
+ module.exports = function(length) {
1690
+ var lastId = 0, map = [
1691
+ [],
1692
+ []
1693
+ ], cache = create(null);
1694
+ return {
1695
+ get: /* @__PURE__ */ __name(function(args) {
1696
+ var index = 0, set = map, i;
1697
+ while (index < length - 1) {
1698
+ i = indexOf.call(set[0], args[index]);
1699
+ if (i === -1) return null;
1700
+ set = set[1][i];
1701
+ ++index;
1702
+ }
1703
+ i = indexOf.call(set[0], args[index]);
1704
+ if (i === -1) return null;
1705
+ return set[1][i] || null;
1706
+ }, "get"),
1707
+ set: /* @__PURE__ */ __name(function(args) {
1708
+ var index = 0, set = map, i;
1709
+ while (index < length - 1) {
1710
+ i = indexOf.call(set[0], args[index]);
1711
+ if (i === -1) {
1712
+ i = set[0].push(args[index]) - 1;
1713
+ set[1].push([
1714
+ [],
1715
+ []
1716
+ ]);
1717
+ }
1718
+ set = set[1][i];
1719
+ ++index;
1720
+ }
1721
+ i = indexOf.call(set[0], args[index]);
1722
+ if (i === -1) {
1723
+ i = set[0].push(args[index]) - 1;
1724
+ }
1725
+ set[1][i] = ++lastId;
1726
+ cache[lastId] = args;
1727
+ return lastId;
1728
+ }, "set"),
1729
+ delete: /* @__PURE__ */ __name(function(id) {
1730
+ var index = 0, set = map, i, path = [], args = cache[id];
1731
+ while (index < length - 1) {
1732
+ i = indexOf.call(set[0], args[index]);
1733
+ if (i === -1) {
1734
+ return;
1735
+ }
1736
+ path.push(set, i);
1737
+ set = set[1][i];
1738
+ ++index;
1739
+ }
1740
+ i = indexOf.call(set[0], args[index]);
1741
+ if (i === -1) {
1742
+ return;
1743
+ }
1744
+ id = set[1][i];
1745
+ set[0].splice(i, 1);
1746
+ set[1].splice(i, 1);
1747
+ while (!set[0].length && path.length) {
1748
+ i = path.pop();
1749
+ set = path.pop();
1750
+ set[0].splice(i, 1);
1751
+ set[1].splice(i, 1);
1752
+ }
1753
+ delete cache[id];
1754
+ }, "delete"),
1755
+ clear: /* @__PURE__ */ __name(function() {
1756
+ map = [
1757
+ [],
1758
+ []
1759
+ ];
1760
+ cache = create(null);
1761
+ }, "clear")
1762
+ };
1763
+ };
1764
+ }
1765
+ });
1766
+
1767
+ // ../../node_modules/es5-ext/object/map.js
1768
+ var require_map = __commonJS({
1769
+ "../../node_modules/es5-ext/object/map.js"(exports$1, module) {
1770
+ init_cjs_shims();
1771
+ var callable = require_valid_callable();
1772
+ var forEach = require_for_each();
1773
+ var call = Function.prototype.call;
1774
+ module.exports = function(obj, cb) {
1775
+ var result = {}, thisArg = arguments[2];
1776
+ callable(cb);
1777
+ forEach(obj, function(value, key, targetObj, index) {
1778
+ result[key] = call.call(cb, thisArg, value, key, targetObj, index);
1779
+ });
1780
+ return result;
1781
+ };
1782
+ }
1783
+ });
1784
+
1785
+ // ../../node_modules/next-tick/index.js
1786
+ var require_next_tick = __commonJS({
1787
+ "../../node_modules/next-tick/index.js"(exports$1, module) {
1788
+ init_cjs_shims();
1789
+ var ensureCallable = /* @__PURE__ */ __name(function(fn) {
1790
+ if (typeof fn !== "function") throw new TypeError(fn + " is not a function");
1791
+ return fn;
1792
+ }, "ensureCallable");
1793
+ var byObserver = /* @__PURE__ */ __name(function(Observer) {
1794
+ var node = document.createTextNode(""), queue, currentQueue, i = 0;
1795
+ new Observer(function() {
1796
+ var callback;
1797
+ if (!queue) {
1798
+ if (!currentQueue) return;
1799
+ queue = currentQueue;
1800
+ } else if (currentQueue) {
1801
+ queue = currentQueue.concat(queue);
1802
+ }
1803
+ currentQueue = queue;
1804
+ queue = null;
1805
+ if (typeof currentQueue === "function") {
1806
+ callback = currentQueue;
1807
+ currentQueue = null;
1808
+ callback();
1809
+ return;
1810
+ }
1811
+ node.data = i = ++i % 2;
1812
+ while (currentQueue) {
1813
+ callback = currentQueue.shift();
1814
+ if (!currentQueue.length) currentQueue = null;
1815
+ callback();
1816
+ }
1817
+ }).observe(node, {
1818
+ characterData: true
1819
+ });
1820
+ return function(fn) {
1821
+ ensureCallable(fn);
1822
+ if (queue) {
1823
+ if (typeof queue === "function") queue = [
1824
+ queue,
1825
+ fn
1826
+ ];
1827
+ else queue.push(fn);
1828
+ return;
1829
+ }
1830
+ queue = fn;
1831
+ node.data = i = ++i % 2;
1832
+ };
1833
+ }, "byObserver");
1834
+ module.exports = (function() {
1835
+ if (typeof process === "object" && process && typeof process.nextTick === "function") {
1836
+ return process.nextTick;
1837
+ }
1838
+ if (typeof queueMicrotask === "function") {
1839
+ return function(cb) {
1840
+ queueMicrotask(ensureCallable(cb));
1841
+ };
1842
+ }
1843
+ if (typeof document === "object" && document) {
1844
+ if (typeof MutationObserver === "function") return byObserver(MutationObserver);
1845
+ if (typeof WebKitMutationObserver === "function") return byObserver(WebKitMutationObserver);
1846
+ }
1847
+ if (typeof setImmediate === "function") {
1848
+ return function(cb) {
1849
+ setImmediate(ensureCallable(cb));
1850
+ };
1851
+ }
1852
+ if (typeof setTimeout === "function" || typeof setTimeout === "object") {
1853
+ return function(cb) {
1854
+ setTimeout(ensureCallable(cb), 0);
1855
+ };
1856
+ }
1857
+ return null;
1858
+ })();
1859
+ }
1860
+ });
1861
+
1862
+ // ../../node_modules/memoizee/ext/async.js
1863
+ var require_async = __commonJS({
1864
+ "../../node_modules/memoizee/ext/async.js"() {
1865
+ init_cjs_shims();
1866
+ var aFrom = require_from();
1867
+ var objectMap = require_map();
1868
+ var mixin = require_mixin();
1869
+ var defineLength = require_define_length();
1870
+ var nextTick = require_next_tick();
1871
+ var slice = Array.prototype.slice;
1872
+ var apply = Function.prototype.apply;
1873
+ var create = Object.create;
1874
+ require_registered_extensions().async = function(tbi, conf) {
1875
+ var waiting = create(null), cache = create(null), base = conf.memoized, original = conf.original, currentCallback, currentContext, currentArgs;
1876
+ conf.memoized = defineLength(function(arg) {
1877
+ var args = arguments, last = args[args.length - 1];
1878
+ if (typeof last === "function") {
1879
+ currentCallback = last;
1880
+ args = slice.call(args, 0, -1);
1881
+ }
1882
+ return base.apply(currentContext = this, currentArgs = args);
1883
+ }, base);
1884
+ try {
1885
+ mixin(conf.memoized, base);
1886
+ } catch (ignore) {
1887
+ }
1888
+ conf.on("get", function(id) {
1889
+ var cb, context, args;
1890
+ if (!currentCallback) return;
1891
+ if (waiting[id]) {
1892
+ if (typeof waiting[id] === "function") waiting[id] = [
1893
+ waiting[id],
1894
+ currentCallback
1895
+ ];
1896
+ else waiting[id].push(currentCallback);
1897
+ currentCallback = null;
1898
+ return;
1899
+ }
1900
+ cb = currentCallback;
1901
+ context = currentContext;
1902
+ args = currentArgs;
1903
+ currentCallback = currentContext = currentArgs = null;
1904
+ nextTick(function() {
1905
+ var data;
1906
+ if (hasOwnProperty.call(cache, id)) {
1907
+ data = cache[id];
1908
+ conf.emit("getasync", id, args, context);
1909
+ apply.call(cb, data.context, data.args);
1910
+ } else {
1911
+ currentCallback = cb;
1912
+ currentContext = context;
1913
+ currentArgs = args;
1914
+ base.apply(context, args);
1915
+ }
1916
+ });
1917
+ });
1918
+ conf.original = function() {
1919
+ var args, cb, origCb, result;
1920
+ if (!currentCallback) return apply.call(original, this, arguments);
1921
+ args = aFrom(arguments);
1922
+ cb = /* @__PURE__ */ __name(function self2(err) {
1923
+ var cb2, args2, id = self2.id;
1924
+ if (id == null) {
1925
+ nextTick(apply.bind(self2, this, arguments));
1926
+ return void 0;
1927
+ }
1928
+ delete self2.id;
1929
+ cb2 = waiting[id];
1930
+ delete waiting[id];
1931
+ if (!cb2) {
1932
+ return void 0;
1933
+ }
1934
+ args2 = aFrom(arguments);
1935
+ if (conf.has(id)) {
1936
+ if (err) {
1937
+ conf.delete(id);
1938
+ } else {
1939
+ cache[id] = {
1940
+ context: this,
1941
+ args: args2
1942
+ };
1943
+ conf.emit("setasync", id, typeof cb2 === "function" ? 1 : cb2.length);
1944
+ }
1945
+ }
1946
+ if (typeof cb2 === "function") {
1947
+ result = apply.call(cb2, this, args2);
1948
+ } else {
1949
+ cb2.forEach(function(cb3) {
1950
+ result = apply.call(cb3, this, args2);
1951
+ }, this);
1952
+ }
1953
+ return result;
1954
+ }, "self");
1955
+ origCb = currentCallback;
1956
+ currentCallback = currentContext = currentArgs = null;
1957
+ args.push(cb);
1958
+ result = apply.call(original, this, args);
1959
+ cb.cb = origCb;
1960
+ currentCallback = cb;
1961
+ return result;
1962
+ };
1963
+ conf.on("set", function(id) {
1964
+ if (!currentCallback) {
1965
+ conf.delete(id);
1966
+ return;
1967
+ }
1968
+ if (waiting[id]) {
1969
+ if (typeof waiting[id] === "function") waiting[id] = [
1970
+ waiting[id],
1971
+ currentCallback.cb
1972
+ ];
1973
+ else waiting[id].push(currentCallback.cb);
1974
+ } else {
1975
+ waiting[id] = currentCallback.cb;
1976
+ }
1977
+ delete currentCallback.cb;
1978
+ currentCallback.id = id;
1979
+ currentCallback = null;
1980
+ });
1981
+ conf.on("delete", function(id) {
1982
+ var result;
1983
+ if (hasOwnProperty.call(waiting, id)) return;
1984
+ if (!cache[id]) return;
1985
+ result = cache[id];
1986
+ delete cache[id];
1987
+ conf.emit("deleteasync", id, slice.call(result.args, 1));
1988
+ });
1989
+ conf.on("clear", function() {
1990
+ var oldCache = cache;
1991
+ cache = create(null);
1992
+ conf.emit("clearasync", objectMap(oldCache, function(data) {
1993
+ return slice.call(data.args, 1);
1994
+ }));
1995
+ });
1996
+ };
1997
+ }
1998
+ });
1999
+
2000
+ // ../../node_modules/es5-ext/object/primitive-set.js
2001
+ var require_primitive_set = __commonJS({
2002
+ "../../node_modules/es5-ext/object/primitive-set.js"(exports$1, module) {
2003
+ init_cjs_shims();
2004
+ var forEach = Array.prototype.forEach;
2005
+ var create = Object.create;
2006
+ module.exports = function(arg) {
2007
+ var set = create(null);
2008
+ forEach.call(arguments, function(name) {
2009
+ set[name] = true;
2010
+ });
2011
+ return set;
2012
+ };
2013
+ }
2014
+ });
2015
+
2016
+ // ../../node_modules/es5-ext/object/is-callable.js
2017
+ var require_is_callable = __commonJS({
2018
+ "../../node_modules/es5-ext/object/is-callable.js"(exports$1, module) {
2019
+ init_cjs_shims();
2020
+ module.exports = function(obj) {
2021
+ return typeof obj === "function";
2022
+ };
2023
+ }
2024
+ });
2025
+
2026
+ // ../../node_modules/es5-ext/object/validate-stringifiable.js
2027
+ var require_validate_stringifiable = __commonJS({
2028
+ "../../node_modules/es5-ext/object/validate-stringifiable.js"(exports$1, module) {
2029
+ init_cjs_shims();
2030
+ var isCallable = require_is_callable();
2031
+ module.exports = function(stringifiable) {
2032
+ try {
2033
+ if (stringifiable && isCallable(stringifiable.toString)) return stringifiable.toString();
2034
+ return String(stringifiable);
2035
+ } catch (e) {
2036
+ throw new TypeError("Passed argument cannot be stringifed");
2037
+ }
2038
+ };
2039
+ }
2040
+ });
2041
+
2042
+ // ../../node_modules/es5-ext/object/validate-stringifiable-value.js
2043
+ var require_validate_stringifiable_value = __commonJS({
2044
+ "../../node_modules/es5-ext/object/validate-stringifiable-value.js"(exports$1, module) {
2045
+ init_cjs_shims();
2046
+ var ensureValue = require_valid_value();
2047
+ var stringifiable = require_validate_stringifiable();
2048
+ module.exports = function(value) {
2049
+ return stringifiable(ensureValue(value));
2050
+ };
2051
+ }
2052
+ });
2053
+
2054
+ // ../../node_modules/es5-ext/safe-to-string.js
2055
+ var require_safe_to_string = __commonJS({
2056
+ "../../node_modules/es5-ext/safe-to-string.js"(exports$1, module) {
2057
+ init_cjs_shims();
2058
+ var isCallable = require_is_callable();
2059
+ module.exports = function(value) {
2060
+ try {
2061
+ if (value && isCallable(value.toString)) return value.toString();
2062
+ return String(value);
2063
+ } catch (e) {
2064
+ return "<Non-coercible to string value>";
2065
+ }
2066
+ };
2067
+ }
2068
+ });
2069
+
2070
+ // ../../node_modules/es5-ext/to-short-string-representation.js
2071
+ var require_to_short_string_representation = __commonJS({
2072
+ "../../node_modules/es5-ext/to-short-string-representation.js"(exports$1, module) {
2073
+ init_cjs_shims();
2074
+ var safeToString = require_safe_to_string();
2075
+ var reNewLine = /[\n\r\u2028\u2029]/g;
2076
+ module.exports = function(value) {
2077
+ var string = safeToString(value);
2078
+ if (string.length > 100) string = string.slice(0, 99) + "\u2026";
2079
+ string = string.replace(reNewLine, function(char) {
2080
+ return JSON.stringify(char).slice(1, -1);
2081
+ });
2082
+ return string;
2083
+ };
2084
+ }
2085
+ });
2086
+
2087
+ // ../../node_modules/is-promise/index.js
2088
+ var require_is_promise = __commonJS({
2089
+ "../../node_modules/is-promise/index.js"(exports$1, module) {
2090
+ init_cjs_shims();
2091
+ module.exports = isPromise;
2092
+ module.exports.default = isPromise;
2093
+ function isPromise(obj) {
2094
+ return !!obj && (typeof obj === "object" || typeof obj === "function") && typeof obj.then === "function";
2095
+ }
2096
+ __name(isPromise, "isPromise");
2097
+ }
2098
+ });
2099
+
2100
+ // ../../node_modules/memoizee/ext/promise.js
2101
+ var require_promise = __commonJS({
2102
+ "../../node_modules/memoizee/ext/promise.js"() {
2103
+ init_cjs_shims();
2104
+ var objectMap = require_map();
2105
+ var primitiveSet = require_primitive_set();
2106
+ var ensureString = require_validate_stringifiable_value();
2107
+ var toShortString = require_to_short_string_representation();
2108
+ var isPromise = require_is_promise();
2109
+ var nextTick = require_next_tick();
2110
+ var create = Object.create;
2111
+ var supportedModes = primitiveSet("then", "then:finally", "done", "done:finally");
2112
+ require_registered_extensions().promise = function(mode, conf) {
2113
+ var waiting = create(null), cache = create(null), promises = create(null);
2114
+ if (mode === true) {
2115
+ mode = null;
2116
+ } else {
2117
+ mode = ensureString(mode);
2118
+ if (!supportedModes[mode]) {
2119
+ throw new TypeError("'" + toShortString(mode) + "' is not valid promise mode");
2120
+ }
2121
+ }
2122
+ conf.on("set", function(id, ignore, promise) {
2123
+ var isFailed = false;
2124
+ if (!isPromise(promise)) {
2125
+ cache[id] = promise;
2126
+ conf.emit("setasync", id, 1);
2127
+ return;
2128
+ }
2129
+ waiting[id] = 1;
2130
+ promises[id] = promise;
2131
+ var onSuccess = /* @__PURE__ */ __name(function(result) {
2132
+ var count = waiting[id];
2133
+ if (isFailed) {
2134
+ throw new Error("Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode)\nConsider to rely on 'then' or 'done' mode instead.");
2135
+ }
2136
+ if (!count) return;
2137
+ delete waiting[id];
2138
+ cache[id] = result;
2139
+ conf.emit("setasync", id, count);
2140
+ }, "onSuccess");
2141
+ var onFailure = /* @__PURE__ */ __name(function() {
2142
+ isFailed = true;
2143
+ if (!waiting[id]) return;
2144
+ delete waiting[id];
2145
+ delete promises[id];
2146
+ conf.delete(id);
2147
+ }, "onFailure");
2148
+ var resolvedMode = mode;
2149
+ if (!resolvedMode) resolvedMode = "then";
2150
+ if (resolvedMode === "then") {
2151
+ var nextTickFailure = /* @__PURE__ */ __name(function() {
2152
+ nextTick(onFailure);
2153
+ }, "nextTickFailure");
2154
+ promise = promise.then(function(result) {
2155
+ nextTick(onSuccess.bind(this, result));
2156
+ }, nextTickFailure);
2157
+ if (typeof promise.finally === "function") {
2158
+ promise.finally(nextTickFailure);
2159
+ }
2160
+ } else if (resolvedMode === "done") {
2161
+ if (typeof promise.done !== "function") {
2162
+ throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");
2163
+ }
2164
+ promise.done(onSuccess, onFailure);
2165
+ } else if (resolvedMode === "done:finally") {
2166
+ if (typeof promise.done !== "function") {
2167
+ throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");
2168
+ }
2169
+ if (typeof promise.finally !== "function") {
2170
+ throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");
2171
+ }
2172
+ promise.done(onSuccess);
2173
+ promise.finally(onFailure);
2174
+ }
2175
+ });
2176
+ conf.on("get", function(id, args, context) {
2177
+ var promise;
2178
+ if (waiting[id]) {
2179
+ ++waiting[id];
2180
+ return;
2181
+ }
2182
+ promise = promises[id];
2183
+ var emit = /* @__PURE__ */ __name(function() {
2184
+ conf.emit("getasync", id, args, context);
2185
+ }, "emit");
2186
+ if (isPromise(promise)) {
2187
+ if (typeof promise.done === "function") promise.done(emit);
2188
+ else {
2189
+ promise.then(function() {
2190
+ nextTick(emit);
2191
+ });
2192
+ }
2193
+ } else {
2194
+ emit();
2195
+ }
2196
+ });
2197
+ conf.on("delete", function(id) {
2198
+ delete promises[id];
2199
+ if (waiting[id]) {
2200
+ delete waiting[id];
2201
+ return;
2202
+ }
2203
+ if (!hasOwnProperty.call(cache, id)) return;
2204
+ var result = cache[id];
2205
+ delete cache[id];
2206
+ conf.emit("deleteasync", id, [
2207
+ result
2208
+ ]);
2209
+ });
2210
+ conf.on("clear", function() {
2211
+ var oldCache = cache;
2212
+ cache = create(null);
2213
+ waiting = create(null);
2214
+ promises = create(null);
2215
+ conf.emit("clearasync", objectMap(oldCache, function(data) {
2216
+ return [
2217
+ data
2218
+ ];
2219
+ }));
2220
+ });
2221
+ };
2222
+ }
2223
+ });
2224
+
2225
+ // ../../node_modules/memoizee/ext/dispose.js
2226
+ var require_dispose = __commonJS({
2227
+ "../../node_modules/memoizee/ext/dispose.js"() {
2228
+ init_cjs_shims();
2229
+ var callable = require_valid_callable();
2230
+ var forEach = require_for_each();
2231
+ var extensions = require_registered_extensions();
2232
+ var apply = Function.prototype.apply;
2233
+ extensions.dispose = function(dispose, conf, options) {
2234
+ var del;
2235
+ callable(dispose);
2236
+ if (options.async && extensions.async || options.promise && extensions.promise) {
2237
+ conf.on("deleteasync", del = /* @__PURE__ */ __name(function(id, resultArray) {
2238
+ apply.call(dispose, null, resultArray);
2239
+ }, "del"));
2240
+ conf.on("clearasync", function(cache) {
2241
+ forEach(cache, function(result, id) {
2242
+ del(id, result);
2243
+ });
2244
+ });
2245
+ return;
2246
+ }
2247
+ conf.on("delete", del = /* @__PURE__ */ __name(function(id, result) {
2248
+ dispose(result);
2249
+ }, "del"));
2250
+ conf.on("clear", function(cache) {
2251
+ forEach(cache, function(result, id) {
2252
+ del(id, result);
2253
+ });
2254
+ });
2255
+ };
2256
+ }
2257
+ });
2258
+
2259
+ // ../../node_modules/timers-ext/max-timeout.js
2260
+ var require_max_timeout = __commonJS({
2261
+ "../../node_modules/timers-ext/max-timeout.js"(exports$1, module) {
2262
+ init_cjs_shims();
2263
+ module.exports = 2147483647;
2264
+ }
2265
+ });
2266
+
2267
+ // ../../node_modules/timers-ext/valid-timeout.js
2268
+ var require_valid_timeout = __commonJS({
2269
+ "../../node_modules/timers-ext/valid-timeout.js"(exports$1, module) {
2270
+ init_cjs_shims();
2271
+ var toPosInt = require_to_pos_integer();
2272
+ var maxTimeout = require_max_timeout();
2273
+ module.exports = function(value) {
2274
+ value = toPosInt(value);
2275
+ if (value > maxTimeout) throw new TypeError(value + " exceeds maximum possible timeout");
2276
+ return value;
2277
+ };
2278
+ }
2279
+ });
2280
+
2281
+ // ../../node_modules/memoizee/ext/max-age.js
2282
+ var require_max_age = __commonJS({
2283
+ "../../node_modules/memoizee/ext/max-age.js"() {
2284
+ init_cjs_shims();
2285
+ var aFrom = require_from();
2286
+ var forEach = require_for_each();
2287
+ var nextTick = require_next_tick();
2288
+ var isPromise = require_is_promise();
2289
+ var timeout = require_valid_timeout();
2290
+ var extensions = require_registered_extensions();
2291
+ var noop = Function.prototype;
2292
+ var max = Math.max;
2293
+ var min = Math.min;
2294
+ var create = Object.create;
2295
+ extensions.maxAge = function(maxAge, conf, options) {
2296
+ var timeouts, postfix, preFetchAge, preFetchTimeouts;
2297
+ maxAge = timeout(maxAge);
2298
+ if (!maxAge) return;
2299
+ timeouts = create(null);
2300
+ postfix = options.async && extensions.async || options.promise && extensions.promise ? "async" : "";
2301
+ conf.on("set" + postfix, function(id) {
2302
+ timeouts[id] = setTimeout(function() {
2303
+ conf.delete(id);
2304
+ }, maxAge);
2305
+ if (typeof timeouts[id].unref === "function") timeouts[id].unref();
2306
+ if (!preFetchTimeouts) return;
2307
+ if (preFetchTimeouts[id]) {
2308
+ if (preFetchTimeouts[id] !== "nextTick") clearTimeout(preFetchTimeouts[id]);
2309
+ }
2310
+ preFetchTimeouts[id] = setTimeout(function() {
2311
+ delete preFetchTimeouts[id];
2312
+ }, preFetchAge);
2313
+ if (typeof preFetchTimeouts[id].unref === "function") preFetchTimeouts[id].unref();
2314
+ });
2315
+ conf.on("delete" + postfix, function(id) {
2316
+ clearTimeout(timeouts[id]);
2317
+ delete timeouts[id];
2318
+ if (!preFetchTimeouts) return;
2319
+ if (preFetchTimeouts[id] !== "nextTick") clearTimeout(preFetchTimeouts[id]);
2320
+ delete preFetchTimeouts[id];
2321
+ });
2322
+ if (options.preFetch) {
2323
+ if (options.preFetch === true || isNaN(options.preFetch)) {
2324
+ preFetchAge = 0.333;
2325
+ } else {
2326
+ preFetchAge = max(min(Number(options.preFetch), 1), 0);
2327
+ }
2328
+ if (preFetchAge) {
2329
+ preFetchTimeouts = {};
2330
+ preFetchAge = (1 - preFetchAge) * maxAge;
2331
+ conf.on("get" + postfix, function(id, args, context) {
2332
+ if (!preFetchTimeouts[id]) {
2333
+ preFetchTimeouts[id] = "nextTick";
2334
+ nextTick(function() {
2335
+ var result;
2336
+ if (preFetchTimeouts[id] !== "nextTick") return;
2337
+ delete preFetchTimeouts[id];
2338
+ conf.delete(id);
2339
+ if (options.async) {
2340
+ args = aFrom(args);
2341
+ args.push(noop);
2342
+ }
2343
+ result = conf.memoized.apply(context, args);
2344
+ if (options.promise) {
2345
+ if (isPromise(result)) {
2346
+ if (typeof result.done === "function") result.done(noop, noop);
2347
+ else result.then(noop, noop);
2348
+ }
2349
+ }
2350
+ });
2351
+ }
2352
+ });
2353
+ }
2354
+ }
2355
+ conf.on("clear" + postfix, function() {
2356
+ forEach(timeouts, function(id) {
2357
+ clearTimeout(id);
2358
+ });
2359
+ timeouts = {};
2360
+ if (preFetchTimeouts) {
2361
+ forEach(preFetchTimeouts, function(id) {
2362
+ if (id !== "nextTick") clearTimeout(id);
2363
+ });
2364
+ preFetchTimeouts = {};
2365
+ }
2366
+ });
2367
+ };
2368
+ }
2369
+ });
2370
+
2371
+ // ../../node_modules/lru-queue/index.js
2372
+ var require_lru_queue = __commonJS({
2373
+ "../../node_modules/lru-queue/index.js"(exports$1, module) {
2374
+ init_cjs_shims();
2375
+ var toPosInt = require_to_pos_integer();
2376
+ var create = Object.create;
2377
+ var hasOwnProperty2 = Object.prototype.hasOwnProperty;
2378
+ module.exports = function(limit) {
2379
+ var size = 0, base = 1, queue = create(null), map = create(null), index = 0, del;
2380
+ limit = toPosInt(limit);
2381
+ return {
2382
+ hit: /* @__PURE__ */ __name(function(id) {
2383
+ var oldIndex = map[id], nuIndex = ++index;
2384
+ queue[nuIndex] = id;
2385
+ map[id] = nuIndex;
2386
+ if (!oldIndex) {
2387
+ ++size;
2388
+ if (size <= limit) return;
2389
+ id = queue[base];
2390
+ del(id);
2391
+ return id;
2392
+ }
2393
+ delete queue[oldIndex];
2394
+ if (base !== oldIndex) return;
2395
+ while (!hasOwnProperty2.call(queue, ++base)) continue;
2396
+ }, "hit"),
2397
+ delete: del = /* @__PURE__ */ __name(function(id) {
2398
+ var oldIndex = map[id];
2399
+ if (!oldIndex) return;
2400
+ delete queue[oldIndex];
2401
+ delete map[id];
2402
+ --size;
2403
+ if (base !== oldIndex) return;
2404
+ if (!size) {
2405
+ index = 0;
2406
+ base = 1;
2407
+ return;
2408
+ }
2409
+ while (!hasOwnProperty2.call(queue, ++base)) continue;
2410
+ }, "del"),
2411
+ clear: /* @__PURE__ */ __name(function() {
2412
+ size = 0;
2413
+ base = 1;
2414
+ queue = create(null);
2415
+ map = create(null);
2416
+ index = 0;
2417
+ }, "clear")
2418
+ };
2419
+ };
2420
+ }
2421
+ });
2422
+
2423
+ // ../../node_modules/memoizee/ext/max.js
2424
+ var require_max = __commonJS({
2425
+ "../../node_modules/memoizee/ext/max.js"() {
2426
+ init_cjs_shims();
2427
+ var toPosInteger = require_to_pos_integer();
2428
+ var lruQueue = require_lru_queue();
2429
+ var extensions = require_registered_extensions();
2430
+ extensions.max = function(max, conf, options) {
2431
+ var postfix, queue, hit;
2432
+ max = toPosInteger(max);
2433
+ if (!max) return;
2434
+ queue = lruQueue(max);
2435
+ postfix = options.async && extensions.async || options.promise && extensions.promise ? "async" : "";
2436
+ conf.on("set" + postfix, hit = /* @__PURE__ */ __name(function(id) {
2437
+ id = queue.hit(id);
2438
+ if (id === void 0) return;
2439
+ conf.delete(id);
2440
+ }, "hit"));
2441
+ conf.on("get" + postfix, hit);
2442
+ conf.on("delete" + postfix, queue.delete);
2443
+ conf.on("clear" + postfix, queue.clear);
2444
+ };
2445
+ }
2446
+ });
2447
+
2448
+ // ../../node_modules/memoizee/ext/ref-counter.js
2449
+ var require_ref_counter = __commonJS({
2450
+ "../../node_modules/memoizee/ext/ref-counter.js"() {
2451
+ init_cjs_shims();
2452
+ var d = require_d();
2453
+ var extensions = require_registered_extensions();
2454
+ var create = Object.create;
2455
+ var defineProperties = Object.defineProperties;
2456
+ extensions.refCounter = function(ignore, conf, options) {
2457
+ var cache, postfix;
2458
+ cache = create(null);
2459
+ postfix = options.async && extensions.async || options.promise && extensions.promise ? "async" : "";
2460
+ conf.on("set" + postfix, function(id, length) {
2461
+ cache[id] = length || 1;
2462
+ });
2463
+ conf.on("get" + postfix, function(id) {
2464
+ ++cache[id];
2465
+ });
2466
+ conf.on("delete" + postfix, function(id) {
2467
+ delete cache[id];
2468
+ });
2469
+ conf.on("clear" + postfix, function() {
2470
+ cache = {};
2471
+ });
2472
+ defineProperties(conf.memoized, {
2473
+ deleteRef: d(function() {
2474
+ var id = conf.get(arguments);
2475
+ if (id === null) return null;
2476
+ if (!cache[id]) return null;
2477
+ if (!--cache[id]) {
2478
+ conf.delete(id);
2479
+ return true;
2480
+ }
2481
+ return false;
2482
+ }),
2483
+ getRefCount: d(function() {
2484
+ var id = conf.get(arguments);
2485
+ if (id === null) return 0;
2486
+ if (!cache[id]) return 0;
2487
+ return cache[id];
2488
+ })
2489
+ });
2490
+ };
2491
+ }
2492
+ });
2493
+
2494
+ // ../../node_modules/memoizee/index.js
2495
+ var require_memoizee = __commonJS({
2496
+ "../../node_modules/memoizee/index.js"(exports$1, module) {
2497
+ init_cjs_shims();
2498
+ var normalizeOpts = require_normalize_options();
2499
+ var resolveLength = require_resolve_length();
2500
+ var plain = require_plain();
2501
+ module.exports = function(fn) {
2502
+ var options = normalizeOpts(arguments[1]), length;
2503
+ if (!options.normalizer) {
2504
+ length = options.length = resolveLength(options.length, fn.length, options.async);
2505
+ if (length !== 0) {
2506
+ if (options.primitive) {
2507
+ if (length === false) {
2508
+ options.normalizer = require_primitive();
2509
+ } else if (length > 1) {
2510
+ options.normalizer = require_get_primitive_fixed()(length);
2511
+ }
2512
+ } else if (length === false) options.normalizer = require_get()();
2513
+ else if (length === 1) options.normalizer = require_get_1()();
2514
+ else options.normalizer = require_get_fixed()(length);
2515
+ }
2516
+ }
2517
+ if (options.async) require_async();
2518
+ if (options.promise) require_promise();
2519
+ if (options.dispose) require_dispose();
2520
+ if (options.maxAge) require_max_age();
2521
+ if (options.max) require_max();
2522
+ if (options.refCounter) require_ref_counter();
2523
+ return plain(fn, options);
2524
+ };
2525
+ }
2526
+ });
2527
+
2528
+ // src/lib/Help.ts
2529
+ init_cjs_shims();
2530
+
2531
+ // ../decorators/src/assertDescriptorValueIsFunction.ts
2532
+ init_cjs_shims();
2533
+ function assertDescriptorValueIsFunction(key, descriptor) {
2534
+ if (!(typeof descriptor.value === "function" && descriptor.value !== Function.prototype)) {
2535
+ throw new TypeError(`"value" not a function for ${key} with descriptor: ${JSON.stringify(descriptor)}.`);
2536
+ }
2537
+ }
2538
+ __name(assertDescriptorValueIsFunction, "assertDescriptorValueIsFunction");
2539
+
2540
+ // ../decorators/src/lazyProp.ts
2541
+ init_cjs_shims();
2542
+
2543
+ // ../map/src/mapGetOrDefault.ts
2544
+ init_cjs_shims();
2545
+ function mapGetOrDefault(map, key, factory) {
2546
+ let value = map.get(key);
2547
+ if (value !== void 0 || map.has(key)) {
2548
+ return value;
2549
+ }
2550
+ value = factory(key, map);
2551
+ map.set(key, value);
2552
+ return value;
2553
+ }
2554
+ __name(mapGetOrDefault, "mapGetOrDefault");
2555
+
2556
+ // ../map/src/TimeoutWeakMap.ts
2557
+ init_cjs_shims();
2558
+ var TimeoutWeakMap = class {
2559
+ static {
2560
+ __name(this, "TimeoutWeakMap");
2561
+ }
2562
+ timeoutMs;
2563
+ wmap = /* @__PURE__ */ new WeakMap();
2564
+ /**
2565
+ * @param timeoutMs Default timeout in milliseconds for entries
2566
+ */
2567
+ constructor(timeoutMs) {
2568
+ this.timeoutMs = timeoutMs;
2569
+ }
2570
+ /**
2571
+ * Retrieves the value for the given key and refreshes its timeout.
2572
+ *
2573
+ * @param key The key to retrieve
2574
+ * @returns The value if found, undefined otherwise
2575
+ */
2576
+ get(key) {
2577
+ const vt = this.wmap.get(key);
2578
+ if (!vt) {
2579
+ return void 0;
2580
+ }
2581
+ const [value, timeout] = vt;
2582
+ timeout.refresh();
2583
+ return value;
2584
+ }
2585
+ /**
2586
+ * Sets a key-value pair with an optional custom timeout.
2587
+ *
2588
+ * @param key The key to set
2589
+ * @param value The value to associate with the key
2590
+ * @param timeoutMs Optional timeout override for this entry
2591
+ * @returns This instance for chaining
2592
+ */
2593
+ set(key, value, timeoutMs) {
2594
+ this.wmap.set(key, [
2595
+ value,
2596
+ setTimeout(() => {
2597
+ this.delete(key);
2598
+ }, timeoutMs ?? this.timeoutMs).unref()
2599
+ ]);
2600
+ return this;
2601
+ }
2602
+ /**
2603
+ * Removes a key-value pair and clears its timeout.
2604
+ *
2605
+ * @param key The key to delete
2606
+ * @returns True if the key existed and was deleted, false otherwise
2607
+ */
2608
+ delete(key) {
2609
+ const vt = this.wmap.get(key);
2610
+ if (!vt) {
2611
+ return false;
2612
+ }
2613
+ const timeout = vt[1];
2614
+ clearTimeout(timeout);
2615
+ return this.wmap.delete(key);
2616
+ }
2617
+ /**
2618
+ * Checks if a key exists in the map.
2619
+ * Does not refresh the timeout.
2620
+ *
2621
+ * @param key The key to check
2622
+ * @returns True if the key exists, false otherwise
2623
+ */
2624
+ has(key) {
2625
+ return this.wmap.has(key);
2626
+ }
2627
+ /**
2628
+ * Loads multiple key-value pairs into the map.
2629
+ *
2630
+ * @param entries Iterable of key-value pairs to load
2631
+ * @param timeoutMs Optional timeout override for all entries
2632
+ * @returns This instance for chaining
2633
+ */
2634
+ load(entries, timeoutMs) {
2635
+ for (const [key, value] of entries) {
2636
+ this.set(key, value, timeoutMs);
2637
+ }
2638
+ return this;
2639
+ }
2640
+ /**
2641
+ * Updates an existing value or creates a new one using an update function.
2642
+ *
2643
+ * @param key The key to update
2644
+ * @param update Function that receives the current value and returns the new value
2645
+ * @returns This instance for chaining
2646
+ */
2647
+ update(key, update) {
2648
+ return this.set(key, update(this.get(key), key, this));
2649
+ }
2650
+ /**
2651
+ * Gets a value or creates it using a factory function if it doesn't exist.
2652
+ * Refreshes timeout if the value exists.
2653
+ *
2654
+ * @param key The key to get or create
2655
+ * @param factory Function to create the value if it doesn't exist
2656
+ * @param timeoutMs Optional timeout override for new entries
2657
+ * @returns The existing or newly created value
2658
+ */
2659
+ getOrDefault(key, factory, timeoutMs) {
2660
+ const vt = this.wmap.get(key);
2661
+ if (vt) {
2662
+ const [value, timeout] = vt;
2663
+ timeout.refresh();
2664
+ return value;
2665
+ } else {
2666
+ const value = factory(key, this);
2667
+ this.set(key, value, timeoutMs);
2668
+ return value;
2669
+ }
2670
+ }
2671
+ };
2672
+
2673
+ // ../decorators/src/memoizeSync.ts
2674
+ init_cjs_shims();
2675
+ var import_memoizee = __toESM(require_memoizee());
2676
+
2677
+ // ../../node_modules/enhanced-ms/dist/index.js
2678
+ init_cjs_shims();
2679
+ var units = {
2680
+ nanosecond: 1e-6,
2681
+ microsecond: 1e-3,
2682
+ millisecond: 1,
2683
+ second: 1e3,
2684
+ minute: 6e4,
2685
+ hour: 36e5,
2686
+ day: 864e5,
2687
+ // 24 hours
2688
+ week: 6048e5,
2689
+ // 7 days
2690
+ month: 2628e6,
2691
+ // 28 days
2692
+ year: 31536e6,
2693
+ // 365 days
2694
+ decade: 31536e7,
2695
+ // 10 years
2696
+ century: 31536e8,
2697
+ // 100 years
2698
+ millennium: 31536e9
2699
+ };
2700
+ var UnitsMap = {
2701
+ nanosekundy: [
2702
+ "nanosekunda",
2703
+ "nanosekundy",
2704
+ "nanosekund"
2705
+ ],
2706
+ mikrosekundy: [
2707
+ "mikrosekunda",
2708
+ "mikrosekundy",
2709
+ "mikrosekund"
2710
+ ],
2711
+ milisekundy: [
2712
+ "milisekunda",
2713
+ "milisekundy",
2714
+ "milisekund"
2715
+ ],
2716
+ sekundy: [
2717
+ "sekunda",
2718
+ "sekundy",
2719
+ "sekund"
2720
+ ],
2721
+ minuty: [
2722
+ "minuta",
2723
+ "minuty",
2724
+ "minut"
2725
+ ],
2726
+ hodiny: [
2727
+ "hodina",
2728
+ "hodiny",
2729
+ "hodin"
2730
+ ],
2731
+ dny: [
2732
+ "den",
2733
+ "dny",
2734
+ "dn\xED"
2735
+ ],
2736
+ t\u00FDdny: [
2737
+ "t\xFDden",
2738
+ "t\xFDdny",
2739
+ "t\xFDdn\u016F"
2740
+ ],
2741
+ m\u011Bs\u00EDce: [
2742
+ "m\u011Bs\xEDc",
2743
+ "m\u011Bs\xEDce",
2744
+ "m\u011Bs\xEDc\u016F"
2745
+ ],
2746
+ roky: [
2747
+ "rok",
2748
+ "roky",
2749
+ "let"
2750
+ ],
2751
+ dek\u00E1dy: [
2752
+ "dek\xE1da",
2753
+ "dek\xE1dy",
2754
+ "dek\xE1d"
2755
+ ],
2756
+ stolet\u00ED: [
2757
+ "stolet\xED",
2758
+ "stolet\xED",
2759
+ "stolet\xED"
2760
+ ],
2761
+ tis\u00EDcilet\u00ED: [
2762
+ "tis\xEDcilet\xED",
2763
+ "tis\xEDcilet\xED",
2764
+ "tis\xEDcilet\xED"
2765
+ ]
2766
+ };
2767
+ function formatTime(unit, count) {
2768
+ const words = UnitsMap[unit];
2769
+ let word;
2770
+ if (count === 1) word = words[0];
2771
+ else if (count >= 2 && count <= 4) word = words[1];
2772
+ else word = words[2];
2773
+ return word || "";
2774
+ }
2775
+ __name(formatTime, "formatTime");
2776
+ var cs_default = {
2777
+ decimal: ",",
2778
+ and: "a",
2779
+ units: {
2780
+ nanosecond: {
2781
+ name: /* @__PURE__ */ __name((c) => formatTime("nanosekundy", c), "name"),
2782
+ abbreviation: "ns",
2783
+ matches: [
2784
+ "ns",
2785
+ "nanosekunda",
2786
+ "nanosekundy",
2787
+ "nanosekund"
2788
+ ]
2789
+ },
2790
+ microsecond: {
2791
+ name: /* @__PURE__ */ __name((c) => formatTime("mikrosekundy", c), "name"),
2792
+ abbreviation: "\u03BCs",
2793
+ matches: [
2794
+ "\u03BCs",
2795
+ "us",
2796
+ "mikrosekunda",
2797
+ "mikrosekundy",
2798
+ "mikrosekund"
2799
+ ]
2800
+ },
2801
+ millisecond: {
2802
+ name: /* @__PURE__ */ __name((c) => formatTime("milisekundy", c), "name"),
2803
+ abbreviation: "ms",
2804
+ matches: [
2805
+ "ms",
2806
+ "milisekunda",
2807
+ "milisekundy",
2808
+ "milisekund"
2809
+ ]
2810
+ },
2811
+ second: {
2812
+ name: /* @__PURE__ */ __name((c) => formatTime("sekundy", c), "name"),
2813
+ abbreviation: "s",
2814
+ matches: [
2815
+ "s",
2816
+ "sek",
2817
+ "sekunda",
2818
+ "sekundy",
2819
+ "sekund"
2820
+ ]
2821
+ },
2822
+ minute: {
2823
+ name: /* @__PURE__ */ __name((c) => formatTime("minuty", c), "name"),
2824
+ abbreviation: "min",
2825
+ matches: [
2826
+ "m",
2827
+ "min",
2828
+ "minuta",
2829
+ "minuty",
2830
+ "minut"
2831
+ ]
2832
+ },
2833
+ hour: {
2834
+ name: /* @__PURE__ */ __name((c) => formatTime("hodiny", c), "name"),
2835
+ abbreviation: "h",
2836
+ matches: [
2837
+ "h",
2838
+ "hod",
2839
+ "hodina",
2840
+ "hodiny",
2841
+ "hodin"
2842
+ ]
2843
+ },
2844
+ day: {
2845
+ name: /* @__PURE__ */ __name((c) => formatTime("dny", c), "name"),
2846
+ abbreviation: "d",
2847
+ matches: [
2848
+ "d",
2849
+ "den",
2850
+ "dny",
2851
+ "dn\xED"
2852
+ ]
2853
+ },
2854
+ week: {
2855
+ name: /* @__PURE__ */ __name((c) => formatTime("t\xFDdny", c), "name"),
2856
+ abbreviation: "t\xFDd.",
2857
+ matches: [
2858
+ "w",
2859
+ "t\xFDd",
2860
+ "t\xFDden",
2861
+ "t\xFDdny",
2862
+ "t\xFDdn\u016F"
2863
+ ]
2864
+ },
2865
+ month: {
2866
+ name: /* @__PURE__ */ __name((c) => formatTime("m\u011Bs\xEDce", c), "name"),
2867
+ abbreviation: "m\u011Bs.",
2868
+ matches: [
2869
+ "mo",
2870
+ "m\u011Bs",
2871
+ "m\u011Bs\xEDc",
2872
+ "m\u011Bs\xEDce",
2873
+ "m\u011Bs\xEDc\u016F"
2874
+ ]
2875
+ },
2876
+ year: {
2877
+ name: /* @__PURE__ */ __name((c) => formatTime("roky", c), "name"),
2878
+ abbreviation: "r.",
2879
+ matches: [
2880
+ "y",
2881
+ "r",
2882
+ "rok",
2883
+ "roky",
2884
+ "let"
2885
+ ]
2886
+ },
2887
+ decade: {
2888
+ name: /* @__PURE__ */ __name((c) => formatTime("dek\xE1dy", c), "name"),
2889
+ abbreviation: "dek.",
2890
+ matches: [
2891
+ "dek",
2892
+ "dek\xE1da",
2893
+ "dek\xE1dy",
2894
+ "dek\xE1d"
2895
+ ]
2896
+ },
2897
+ century: {
2898
+ name: /* @__PURE__ */ __name((c) => formatTime("stolet\xED", c), "name"),
2899
+ abbreviation: "stol.",
2900
+ matches: [
2901
+ "c",
2902
+ "stol",
2903
+ "stolet\xED"
2904
+ ]
2905
+ },
2906
+ millennium: {
2907
+ name: /* @__PURE__ */ __name((c) => formatTime("tis\xEDcilet\xED", c), "name"),
2908
+ abbreviation: "tis.",
2909
+ matches: [
2910
+ "mil",
2911
+ "tis",
2912
+ "tis\xEDcilet\xED"
2913
+ ]
2914
+ }
2915
+ }
2916
+ };
2917
+ var de_default = {
2918
+ decimal: ",",
2919
+ and: "und",
2920
+ units: {
2921
+ nanosecond: {
2922
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "Nanosekunde" : "Nanosekunden", "name"),
2923
+ abbreviation: "ns",
2924
+ matches: [
2925
+ "ns",
2926
+ "nanos",
2927
+ "nanosekunde",
2928
+ "nanosekunden"
2929
+ ]
2930
+ },
2931
+ microsecond: {
2932
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "Mikrosekunde" : "Mikrosekunden", "name"),
2933
+ abbreviation: "\u03BCs",
2934
+ matches: [
2935
+ "us",
2936
+ "mk",
2937
+ "mikrosekunde",
2938
+ "mikrosekunden",
2939
+ "mikros"
2940
+ ]
2941
+ },
2942
+ millisecond: {
2943
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "Millisekunde" : "Millisekunden", "name"),
2944
+ abbreviation: "ms",
2945
+ matches: [
2946
+ "ms",
2947
+ "ml",
2948
+ "mi",
2949
+ "millisekunde",
2950
+ "millisekunden",
2951
+ "millis"
2952
+ ]
2953
+ },
2954
+ second: {
2955
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "Sekunde" : "Sekunden", "name"),
2956
+ abbreviation: "Sek.",
2957
+ matches: [
2958
+ "s",
2959
+ "sekunde",
2960
+ "sekunden",
2961
+ "sek",
2962
+ "seks"
2963
+ ]
2964
+ },
2965
+ minute: {
2966
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "Minute" : "Minuten", "name"),
2967
+ abbreviation: "Min.",
2968
+ matches: [
2969
+ "m",
2970
+ "minute",
2971
+ "minuten",
2972
+ "min",
2973
+ "mins"
2974
+ ]
2975
+ },
2976
+ hour: {
2977
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "Stunde" : "Stunden", "name"),
2978
+ abbreviation: "Std.",
2979
+ matches: [
2980
+ "h",
2981
+ "stunde",
2982
+ "stunden",
2983
+ "st"
2984
+ ]
2985
+ },
2986
+ day: {
2987
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "Tag" : "Tage", "name"),
2988
+ abbreviation: "T.",
2989
+ matches: [
2990
+ "d",
2991
+ "t",
2992
+ "tag",
2993
+ "tage"
2994
+ ]
2995
+ },
2996
+ week: {
2997
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "Woche" : "Wochen", "name"),
2998
+ abbreviation: "W.",
2999
+ matches: [
3000
+ "w",
3001
+ "wo",
3002
+ "woche",
3003
+ "wochen"
3004
+ ]
3005
+ },
3006
+ month: {
3007
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "Monat" : "Monate", "name"),
3008
+ abbreviation: "M.",
3009
+ matches: [
3010
+ "mo",
3011
+ "monat",
3012
+ "monate"
3013
+ ]
3014
+ },
3015
+ year: {
3016
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "Jahr" : "Jahre", "name"),
3017
+ abbreviation: "J.",
3018
+ matches: [
3019
+ "y",
3020
+ "a",
3021
+ "j",
3022
+ "jahr",
3023
+ "jahre"
3024
+ ]
3025
+ },
3026
+ decade: {
3027
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "Jahrzehnt" : "Jahrzehnte", "name"),
3028
+ abbreviation: "Jz.",
3029
+ matches: [
3030
+ "jz",
3031
+ "jahrzehnt",
3032
+ "jahrzehnte"
3033
+ ]
3034
+ },
3035
+ century: {
3036
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "Jahrhundert" : "Jahrhunderte", "name"),
3037
+ abbreviation: "Jh.",
3038
+ matches: [
3039
+ "c",
3040
+ "jh",
3041
+ "jhd",
3042
+ "jahrhundert",
3043
+ "jahrhunderte"
3044
+ ]
3045
+ },
3046
+ millennium: {
3047
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "Jahrtausend" : "Jahrtausende", "name"),
3048
+ abbreviation: "Jt.",
3049
+ matches: [
3050
+ "jt",
3051
+ "jtd",
3052
+ "jtsd",
3053
+ "jahrt",
3054
+ "jahrtausend",
3055
+ "jahrtausende"
3056
+ ]
3057
+ }
3058
+ }
3059
+ };
3060
+ var en_default = {
3061
+ decimal: ".",
3062
+ and: "and",
3063
+ units: {
3064
+ nanosecond: {
3065
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "nanosecond" : "nanoseconds", "name"),
3066
+ abbreviation: "ns",
3067
+ matches: [
3068
+ "nanosecond",
3069
+ "nanoseconds",
3070
+ "ns"
3071
+ ]
3072
+ },
3073
+ microsecond: {
3074
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "microsecond" : "microseconds", "name"),
3075
+ abbreviation: "\u03BCs",
3076
+ matches: [
3077
+ "microsecond",
3078
+ "microseconds",
3079
+ "\u03BCs"
3080
+ ]
3081
+ },
3082
+ millisecond: {
3083
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "millisecond" : "milliseconds", "name"),
3084
+ abbreviation: "ms",
3085
+ matches: [
3086
+ "millisecond",
3087
+ "milliseconds",
3088
+ "ms"
3089
+ ]
3090
+ },
3091
+ second: {
3092
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "second" : "seconds", "name"),
3093
+ abbreviation: "s",
3094
+ matches: [
3095
+ "second",
3096
+ "seconds",
3097
+ "s"
3098
+ ]
3099
+ },
3100
+ minute: {
3101
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "minute" : "minutes", "name"),
3102
+ abbreviation: "m",
3103
+ matches: [
3104
+ "minute",
3105
+ "minutes",
3106
+ "m"
3107
+ ]
3108
+ },
3109
+ hour: {
3110
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "hour" : "hours", "name"),
3111
+ abbreviation: "h",
3112
+ matches: [
3113
+ "hour",
3114
+ "hours",
3115
+ "h"
3116
+ ]
3117
+ },
3118
+ day: {
3119
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "day" : "days", "name"),
3120
+ abbreviation: "d",
3121
+ matches: [
3122
+ "day",
3123
+ "days",
3124
+ "d"
3125
+ ]
3126
+ },
3127
+ week: {
3128
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "week" : "weeks", "name"),
3129
+ abbreviation: "w",
3130
+ matches: [
3131
+ "week",
3132
+ "weeks",
3133
+ "w"
3134
+ ]
3135
+ },
3136
+ month: {
3137
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "month" : "months", "name"),
3138
+ abbreviation: "mo",
3139
+ matches: [
3140
+ "month",
3141
+ "months",
3142
+ "mo"
3143
+ ]
3144
+ },
3145
+ year: {
3146
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "year" : "years", "name"),
3147
+ abbreviation: "y",
3148
+ matches: [
3149
+ "year",
3150
+ "years",
3151
+ "y"
3152
+ ]
3153
+ },
3154
+ decade: {
3155
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "decade" : "decades", "name"),
3156
+ abbreviation: "dec",
3157
+ matches: [
3158
+ "decade",
3159
+ "decades",
3160
+ "dec"
3161
+ ]
3162
+ },
3163
+ century: {
3164
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "century" : "centuries", "name"),
3165
+ abbreviation: "c",
3166
+ matches: [
3167
+ "century",
3168
+ "centuries",
3169
+ "c"
3170
+ ]
3171
+ },
3172
+ millennium: {
3173
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "millennium" : "millennia", "name"),
3174
+ abbreviation: "mil",
3175
+ matches: [
3176
+ "millennium",
3177
+ "millennia",
3178
+ "mil"
3179
+ ]
3180
+ }
3181
+ }
3182
+ };
3183
+ var es_default = {
3184
+ decimal: ",",
3185
+ and: "y",
3186
+ units: {
3187
+ nanosecond: {
3188
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "nanosegundo" : "nanosegundos", "name"),
3189
+ abbreviation: "ns",
3190
+ matches: [
3191
+ "nanosegundo",
3192
+ "nanosegundos",
3193
+ "ns"
3194
+ ]
3195
+ },
3196
+ microsecond: {
3197
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "microsegundo" : "microsegundos", "name"),
3198
+ abbreviation: "\u03BCs",
3199
+ matches: [
3200
+ "microsegundo",
3201
+ "microsegundos",
3202
+ "\u03BCs"
3203
+ ]
3204
+ },
3205
+ millisecond: {
3206
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "milisegundo" : "milisegundos", "name"),
3207
+ abbreviation: "ms",
3208
+ matches: [
3209
+ "milisegundo",
3210
+ "milisegundos",
3211
+ "ms"
3212
+ ]
3213
+ },
3214
+ second: {
3215
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "segundo" : "segundos", "name"),
3216
+ abbreviation: "s",
3217
+ matches: [
3218
+ "segundo",
3219
+ "segundos",
3220
+ "s"
3221
+ ]
3222
+ },
3223
+ minute: {
3224
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "minuto" : "minutos", "name"),
3225
+ abbreviation: "min",
3226
+ matches: [
3227
+ "minuto",
3228
+ "minutos",
3229
+ "min"
3230
+ ]
3231
+ },
3232
+ hour: {
3233
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "hora" : "horas", "name"),
3234
+ abbreviation: "h",
3235
+ matches: [
3236
+ "hora",
3237
+ "horas",
3238
+ "h"
3239
+ ]
3240
+ },
3241
+ day: {
3242
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "d\xEDa" : "d\xEDas", "name"),
3243
+ abbreviation: "d",
3244
+ matches: [
3245
+ "d\xEDa",
3246
+ "d\xEDas",
3247
+ "d"
3248
+ ]
3249
+ },
3250
+ week: {
3251
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "semana" : "semanas", "name"),
3252
+ abbreviation: "sem",
3253
+ matches: [
3254
+ "semana",
3255
+ "semanas",
3256
+ "sem"
3257
+ ]
3258
+ },
3259
+ month: {
3260
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "mes" : "meses", "name"),
3261
+ abbreviation: "mes",
3262
+ matches: [
3263
+ "mes",
3264
+ "meses",
3265
+ "mes"
3266
+ ]
3267
+ },
3268
+ year: {
3269
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "a\xF1o" : "a\xF1os", "name"),
3270
+ abbreviation: "a",
3271
+ matches: [
3272
+ "a\xF1o",
3273
+ "a\xF1os",
3274
+ "a"
3275
+ ]
3276
+ },
3277
+ decade: {
3278
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "d\xE9cada" : "d\xE9cadas", "name"),
3279
+ abbreviation: "d\xE9c",
3280
+ matches: [
3281
+ "d\xE9cada",
3282
+ "d\xE9cadas",
3283
+ "d\xE9c"
3284
+ ]
3285
+ },
3286
+ century: {
3287
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "siglo" : "siglos", "name"),
3288
+ abbreviation: "sig",
3289
+ matches: [
3290
+ "siglo",
3291
+ "siglos",
3292
+ "sig"
3293
+ ]
3294
+ },
3295
+ millennium: {
3296
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "milenio" : "milenios", "name"),
3297
+ abbreviation: "mil",
3298
+ matches: [
3299
+ "milenio",
3300
+ "milenios",
3301
+ "mil"
3302
+ ]
3303
+ }
3304
+ }
3305
+ };
3306
+ var fr_default = {
3307
+ decimal: ",",
3308
+ and: "et",
3309
+ units: {
3310
+ nanosecond: {
3311
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "nanoseconde" : "nanosecondes", "name"),
3312
+ abbreviation: "ns",
3313
+ matches: [
3314
+ "nanoseconde",
3315
+ "nanosecondes",
3316
+ "ns"
3317
+ ]
3318
+ },
3319
+ microsecond: {
3320
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "microseconde" : "microsecondes", "name"),
3321
+ abbreviation: "\u03BCs",
3322
+ matches: [
3323
+ "microseconde",
3324
+ "microsecondes",
3325
+ "\u03BCs"
3326
+ ]
3327
+ },
3328
+ millisecond: {
3329
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "milliseconde" : "millisecondes", "name"),
3330
+ abbreviation: "ms",
3331
+ matches: [
3332
+ "milliseconde",
3333
+ "millisecondes",
3334
+ "ms"
3335
+ ]
3336
+ },
3337
+ second: {
3338
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "seconde" : "secondes", "name"),
3339
+ abbreviation: "s",
3340
+ matches: [
3341
+ "seconde",
3342
+ "secondes",
3343
+ "s"
3344
+ ]
3345
+ },
3346
+ minute: {
3347
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "minute" : "minutes", "name"),
3348
+ abbreviation: "min",
3349
+ matches: [
3350
+ "minute",
3351
+ "minutes",
3352
+ "min"
3353
+ ]
3354
+ },
3355
+ hour: {
3356
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "heure" : "heures", "name"),
3357
+ abbreviation: "h",
3358
+ matches: [
3359
+ "heure",
3360
+ "heures",
3361
+ "h"
3362
+ ]
3363
+ },
3364
+ day: {
3365
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "jour" : "jours", "name"),
3366
+ abbreviation: "j",
3367
+ matches: [
3368
+ "jour",
3369
+ "jours",
3370
+ "j"
3371
+ ]
3372
+ },
3373
+ week: {
3374
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "semaine" : "semaines", "name"),
3375
+ abbreviation: "sem",
3376
+ matches: [
3377
+ "semaine",
3378
+ "semaines",
3379
+ "sem"
3380
+ ]
3381
+ },
3382
+ month: {
3383
+ name: /* @__PURE__ */ __name((_c) => "mois", "name"),
3384
+ // In French, the singular and plural form is identical.
3385
+ abbreviation: "mo",
3386
+ matches: [
3387
+ "mois",
3388
+ "mo"
3389
+ ]
3390
+ },
3391
+ year: {
3392
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "an" : "ans", "name"),
3393
+ abbreviation: "an",
3394
+ matches: [
3395
+ "an",
3396
+ "ans"
3397
+ ]
3398
+ },
3399
+ decade: {
3400
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "d\xE9cennie" : "d\xE9cennies", "name"),
3401
+ abbreviation: "dec",
3402
+ matches: [
3403
+ "d\xE9cennie",
3404
+ "d\xE9cennies",
3405
+ "dec"
3406
+ ]
3407
+ },
3408
+ century: {
3409
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "si\xE8cle" : "si\xE8cles", "name"),
3410
+ abbreviation: "si\xE8",
3411
+ matches: [
3412
+ "si\xE8cle",
3413
+ "si\xE8cles",
3414
+ "si\xE8"
3415
+ ]
3416
+ },
3417
+ millennium: {
3418
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "mill\xE9naire" : "mill\xE9naires", "name"),
3419
+ abbreviation: "mil",
3420
+ matches: [
3421
+ "mill\xE9naire",
3422
+ "mill\xE9naires",
3423
+ "mil"
3424
+ ]
3425
+ }
3426
+ }
3427
+ };
3428
+ var it_default = {
3429
+ decimal: ",",
3430
+ and: "e",
3431
+ units: {
3432
+ nanosecond: {
3433
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "nanosecondo" : "nanosecondi", "name"),
3434
+ abbreviation: "ns",
3435
+ matches: [
3436
+ "nanosecondo",
3437
+ "nanosecondi",
3438
+ "ns"
3439
+ ]
3440
+ },
3441
+ microsecond: {
3442
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "microsecondo" : "microsecondi", "name"),
3443
+ abbreviation: "\u03BCs",
3444
+ matches: [
3445
+ "microsecondo",
3446
+ "microsecondi",
3447
+ "\u03BCs"
3448
+ ]
3449
+ },
3450
+ millisecond: {
3451
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "millisecondo" : "millisecondi", "name"),
3452
+ abbreviation: "ms",
3453
+ matches: [
3454
+ "millisecondo",
3455
+ "millisecondi",
3456
+ "ms"
3457
+ ]
3458
+ },
3459
+ second: {
3460
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "secondo" : "secondi", "name"),
3461
+ abbreviation: "s",
3462
+ matches: [
3463
+ "secondo",
3464
+ "secondi",
3465
+ "s"
3466
+ ]
3467
+ },
3468
+ minute: {
3469
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "minuto" : "minuti", "name"),
3470
+ abbreviation: "min",
3471
+ matches: [
3472
+ "minuto",
3473
+ "minuti",
3474
+ "min"
3475
+ ]
3476
+ },
3477
+ hour: {
3478
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "ora" : "ore", "name"),
3479
+ abbreviation: "h",
3480
+ matches: [
3481
+ "ora",
3482
+ "ore",
3483
+ "h"
3484
+ ]
3485
+ },
3486
+ day: {
3487
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "giorno" : "giorni", "name"),
3488
+ abbreviation: "g",
3489
+ matches: [
3490
+ "giorno",
3491
+ "giorni",
3492
+ "g"
3493
+ ]
3494
+ },
3495
+ week: {
3496
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "settimana" : "settimane", "name"),
3497
+ abbreviation: "sett",
3498
+ matches: [
3499
+ "settimana",
3500
+ "settimane",
3501
+ "sett"
3502
+ ]
3503
+ },
3504
+ month: {
3505
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "mese" : "mesi", "name"),
3506
+ abbreviation: "mes",
3507
+ matches: [
3508
+ "mese",
3509
+ "mesi",
3510
+ "mes"
3511
+ ]
3512
+ },
3513
+ year: {
3514
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "anno" : "anni", "name"),
3515
+ abbreviation: "a",
3516
+ matches: [
3517
+ "anno",
3518
+ "anni",
3519
+ "a"
3520
+ ]
3521
+ },
3522
+ decade: {
3523
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "decennio" : "decenni", "name"),
3524
+ abbreviation: "dec",
3525
+ matches: [
3526
+ "decennio",
3527
+ "decenni",
3528
+ "dec"
3529
+ ]
3530
+ },
3531
+ century: {
3532
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "secolo" : "secoli", "name"),
3533
+ abbreviation: "sc",
3534
+ matches: [
3535
+ "secolo",
3536
+ "secoli",
3537
+ "sc"
3538
+ ]
3539
+ },
3540
+ millennium: {
3541
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "millennio" : "millenni", "name"),
3542
+ abbreviation: "mil",
3543
+ matches: [
3544
+ "millennio",
3545
+ "millenni",
3546
+ "mil"
3547
+ ]
3548
+ }
3549
+ }
3550
+ };
3551
+ var mi_default = {
3552
+ decimal: ".",
3553
+ and: "me te",
3554
+ units: {
3555
+ nanosecond: {
3556
+ name: "h\u0113kona nanomiri",
3557
+ matches: [
3558
+ "h\u0113kona nanomiri",
3559
+ "h\u0113konananomiri",
3560
+ "hekona nanomiri",
3561
+ "hekonananomiri"
3562
+ ]
3563
+ },
3564
+ microsecond: {
3565
+ name: "h\u0113kona miriona",
3566
+ matches: [
3567
+ "h\u0113kona miriona",
3568
+ "h\u0113konamiriona",
3569
+ "hekona miriona",
3570
+ "hekonamiriona"
3571
+ ]
3572
+ },
3573
+ millisecond: {
3574
+ name: "h\u0113kona miri",
3575
+ matches: [
3576
+ "h\u0113kona miri",
3577
+ "k\u0101konamiri",
3578
+ "hekona miri",
3579
+ "hekonamiri"
3580
+ ]
3581
+ },
3582
+ second: {
3583
+ name: "h\u0113kona",
3584
+ matches: [
3585
+ "h\u0113kona",
3586
+ "hekona"
3587
+ ]
3588
+ },
3589
+ minute: {
3590
+ name: "meneti",
3591
+ matches: [
3592
+ "meneti"
3593
+ ]
3594
+ },
3595
+ hour: {
3596
+ name: "h\u0101ora",
3597
+ matches: [
3598
+ "h\u0101ora",
3599
+ "haora"
3600
+ ]
3601
+ },
3602
+ day: {
3603
+ name: "r\u0101",
3604
+ matches: [
3605
+ "r\u0101",
3606
+ "ra"
3607
+ ]
3608
+ },
3609
+ week: {
3610
+ name: "wiki",
3611
+ matches: [
3612
+ "wiki"
3613
+ ]
3614
+ },
3615
+ month: {
3616
+ name: "marama",
3617
+ matches: [
3618
+ "marama"
3619
+ ]
3620
+ },
3621
+ year: {
3622
+ name: "tau",
3623
+ matches: [
3624
+ "tau",
3625
+ "houanga"
3626
+ ]
3627
+ },
3628
+ decade: {
3629
+ name: "tekau tau",
3630
+ matches: [
3631
+ "tekautau",
3632
+ "tekau tau"
3633
+ ]
3634
+ },
3635
+ century: {
3636
+ name: "rau tau",
3637
+ matches: [
3638
+ "rautau",
3639
+ "rau tau"
3640
+ ]
3641
+ },
3642
+ millennium: {
3643
+ name: "mano tau",
3644
+ matches: [
3645
+ "manotau",
3646
+ "mano tau"
3647
+ ]
3648
+ }
3649
+ }
3650
+ };
3651
+ var nl_default = {
3652
+ decimal: ",",
3653
+ and: "en",
3654
+ units: {
3655
+ nanosecond: {
3656
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "nanoseconde" : "nanoseconden", "name"),
3657
+ abbreviation: "ns",
3658
+ matches: [
3659
+ "nanoseconde",
3660
+ "nanoseconden",
3661
+ "ns"
3662
+ ]
3663
+ },
3664
+ microsecond: {
3665
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "microseconde" : "microseconden", "name"),
3666
+ abbreviation: "\u03BCs",
3667
+ matches: [
3668
+ "microseconde",
3669
+ "microseconden",
3670
+ "\u03BCs"
3671
+ ]
3672
+ },
3673
+ millisecond: {
3674
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "milliseconde" : "milliseconden", "name"),
3675
+ abbreviation: "ms",
3676
+ matches: [
3677
+ "milliseconde",
3678
+ "milliseconden",
3679
+ "ms"
3680
+ ]
3681
+ },
3682
+ second: {
3683
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "seconde" : "seconden", "name"),
3684
+ abbreviation: "s",
3685
+ matches: [
3686
+ "seconde",
3687
+ "seconden",
3688
+ "s"
3689
+ ]
3690
+ },
3691
+ minute: {
3692
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "minuut" : "minuten", "name"),
3693
+ abbreviation: "min",
3694
+ matches: [
3695
+ "minuut",
3696
+ "minuten",
3697
+ "min"
3698
+ ]
3699
+ },
3700
+ hour: {
3701
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "uur" : "uren", "name"),
3702
+ abbreviation: "h",
3703
+ matches: [
3704
+ "uur",
3705
+ "uren",
3706
+ "h"
3707
+ ]
3708
+ },
3709
+ day: {
3710
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "dag" : "dagen", "name"),
3711
+ abbreviation: "d",
3712
+ matches: [
3713
+ "dag",
3714
+ "dagen",
3715
+ "d"
3716
+ ]
3717
+ },
3718
+ week: {
3719
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "week" : "weken", "name"),
3720
+ abbreviation: "w",
3721
+ matches: [
3722
+ "week",
3723
+ "weken",
3724
+ "w"
3725
+ ]
3726
+ },
3727
+ month: {
3728
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "maand" : "maanden", "name"),
3729
+ abbreviation: "mnd",
3730
+ matches: [
3731
+ "maand",
3732
+ "maanden",
3733
+ "mnd"
3734
+ ]
3735
+ },
3736
+ year: {
3737
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "jaar" : "jaren", "name"),
3738
+ abbreviation: "jr",
3739
+ matches: [
3740
+ "jaar",
3741
+ "jaren",
3742
+ "jr"
3743
+ ]
3744
+ },
3745
+ decade: {
3746
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "decennium" : "decennia", "name"),
3747
+ abbreviation: "dec",
3748
+ matches: [
3749
+ "decennium",
3750
+ "decennia",
3751
+ "dec"
3752
+ ]
3753
+ },
3754
+ century: {
3755
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "eeuw" : "eeuwen", "name"),
3756
+ abbreviation: "eeuw",
3757
+ matches: [
3758
+ "eeuw",
3759
+ "eeuwen"
3760
+ ]
3761
+ },
3762
+ millennium: {
3763
+ name: /* @__PURE__ */ __name((c) => c === 1 ? "millennium" : "millennia", "name"),
3764
+ abbreviation: "mil",
3765
+ matches: [
3766
+ "millennium",
3767
+ "millennia",
3768
+ "mil"
3769
+ ]
3770
+ }
3771
+ }
3772
+ };
3773
+ var UnitsMap2 = {
3774
+ nanosekundy: [
3775
+ "nanosekunda",
3776
+ "nanosekundy",
3777
+ "nanosekund"
3778
+ ],
3779
+ mikrosekundy: [
3780
+ "mikrosekunda",
3781
+ "mikrosekundy",
3782
+ "mikrosekund"
3783
+ ],
3784
+ milisekundy: [
3785
+ "milisekunda",
3786
+ "milisekundy",
3787
+ "milisekund"
3788
+ ],
3789
+ sekundy: [
3790
+ "sekunda",
3791
+ "sekundy",
3792
+ "sekund"
3793
+ ],
3794
+ minuty: [
3795
+ "minuta",
3796
+ "minuty",
3797
+ "minut"
3798
+ ],
3799
+ godziny: [
3800
+ "godzina",
3801
+ "godziny",
3802
+ "godzin"
3803
+ ],
3804
+ dni: [
3805
+ "dzie\u0144",
3806
+ "dni",
3807
+ "dni"
3808
+ ],
3809
+ tygodnie: [
3810
+ "tydzie\u0144",
3811
+ "tygodnie",
3812
+ "tygodni"
3813
+ ],
3814
+ miesi\u0105ce: [
3815
+ "miesi\u0105c",
3816
+ "miesi\u0105ce",
3817
+ "miesi\u0119cy"
3818
+ ],
3819
+ lata: [
3820
+ "rok",
3821
+ "lata",
3822
+ "lat"
3823
+ ],
3824
+ dekady: [
3825
+ "dekada",
3826
+ "dekady",
3827
+ "dekad"
3828
+ ],
3829
+ wieki: [
3830
+ "wiek",
3831
+ "wieki",
3832
+ "wiek\xF3w"
3833
+ ],
3834
+ tysi\u0105clecia: [
3835
+ "tysi\u0105clecie",
3836
+ "tysi\u0105clecia",
3837
+ "tysi\u0105cleci"
3838
+ ]
3839
+ };
3840
+ function formatTime2(unit, count) {
3841
+ const words = UnitsMap2[unit];
3842
+ const lastDigit = count % 10;
3843
+ const lastTwoDigits = count % 100;
3844
+ let word;
3845
+ if (lastTwoDigits >= 11 && lastTwoDigits <= 19) word = words[2];
3846
+ else if (lastDigit === 1) word = words[0];
3847
+ else if (lastDigit >= 2 && lastDigit <= 4) word = words[1];
3848
+ else word = words[2];
3849
+ return word || "";
3850
+ }
3851
+ __name(formatTime2, "formatTime2");
3852
+ var pl_default = {
3853
+ decimal: ",",
3854
+ and: "i",
3855
+ units: {
3856
+ nanosecond: {
3857
+ name: /* @__PURE__ */ __name((c) => formatTime2("nanosekundy", c), "name"),
3858
+ abbreviation: "ns",
3859
+ matches: [
3860
+ "ns",
3861
+ "nanosekunda",
3862
+ "nanosekundy",
3863
+ "nanosekund"
3864
+ ]
3865
+ },
3866
+ microsecond: {
3867
+ name: /* @__PURE__ */ __name((c) => formatTime2("mikrosekundy", c), "name"),
3868
+ abbreviation: "\u03BCs",
3869
+ matches: [
3870
+ "\u03BCs",
3871
+ "us",
3872
+ "mikrosekunda",
3873
+ "mikrosekundy",
3874
+ "mikrosekund"
3875
+ ]
3876
+ },
3877
+ millisecond: {
3878
+ name: /* @__PURE__ */ __name((c) => formatTime2("milisekundy", c), "name"),
3879
+ abbreviation: "ms",
3880
+ matches: [
3881
+ "ms",
3882
+ "milisekunda",
3883
+ "milisekundy",
3884
+ "milisekund"
3885
+ ]
3886
+ },
3887
+ second: {
3888
+ name: /* @__PURE__ */ __name((c) => formatTime2("sekundy", c), "name"),
3889
+ abbreviation: "s",
3890
+ matches: [
3891
+ "s",
3892
+ "sek",
3893
+ "sekunda",
3894
+ "sekundy",
3895
+ "sekund"
3896
+ ]
3897
+ },
3898
+ minute: {
3899
+ name: /* @__PURE__ */ __name((c) => formatTime2("minuty", c), "name"),
3900
+ abbreviation: "min",
3901
+ matches: [
3902
+ "m",
3903
+ "min",
3904
+ "minuta",
3905
+ "minuty",
3906
+ "minut"
3907
+ ]
3908
+ },
3909
+ hour: {
3910
+ name: /* @__PURE__ */ __name((c) => formatTime2("godziny", c), "name"),
3911
+ abbreviation: "godz.",
3912
+ matches: [
3913
+ "h",
3914
+ "godz",
3915
+ "godzina",
3916
+ "godziny",
3917
+ "godzin"
3918
+ ]
3919
+ },
3920
+ day: {
3921
+ name: /* @__PURE__ */ __name((c) => formatTime2("dni", c), "name"),
3922
+ abbreviation: "d",
3923
+ matches: [
3924
+ "d",
3925
+ "dzie\u0144",
3926
+ "dni"
3927
+ ]
3928
+ },
3929
+ week: {
3930
+ name: /* @__PURE__ */ __name((c) => formatTime2("tygodnie", c), "name"),
3931
+ abbreviation: "tydz.",
3932
+ matches: [
3933
+ "w",
3934
+ "tydz",
3935
+ "tydzie\u0144",
3936
+ "tygodnie",
3937
+ "tygodni"
3938
+ ]
3939
+ },
3940
+ month: {
3941
+ name: /* @__PURE__ */ __name((c) => formatTime2("miesi\u0105ce", c), "name"),
3942
+ abbreviation: "mies.",
3943
+ matches: [
3944
+ "mo",
3945
+ "mies",
3946
+ "miesi\u0105c",
3947
+ "miesi\u0105ce",
3948
+ "miesi\u0119cy"
3949
+ ]
3950
+ },
3951
+ year: {
3952
+ name: /* @__PURE__ */ __name((c) => formatTime2("lata", c), "name"),
3953
+ abbreviation: "r.",
3954
+ matches: [
3955
+ "y",
3956
+ "r",
3957
+ "rok",
3958
+ "lata",
3959
+ "lat"
3960
+ ]
3961
+ },
3962
+ decade: {
3963
+ name: /* @__PURE__ */ __name((c) => formatTime2("dekady", c), "name"),
3964
+ abbreviation: "dek.",
3965
+ matches: [
3966
+ "dek",
3967
+ "dekada",
3968
+ "dekady",
3969
+ "dekad"
3970
+ ]
3971
+ },
3972
+ century: {
3973
+ name: /* @__PURE__ */ __name((c) => formatTime2("wieki", c), "name"),
3974
+ abbreviation: "w.",
3975
+ matches: [
3976
+ "c",
3977
+ "wiek",
3978
+ "wieki",
3979
+ "wiek\xF3w"
3980
+ ]
3981
+ },
3982
+ millennium: {
3983
+ name: /* @__PURE__ */ __name((c) => formatTime2("tysi\u0105clecia", c), "name"),
3984
+ abbreviation: "tys.",
3985
+ matches: [
3986
+ "mil",
3987
+ "tys",
3988
+ "tysi\u0105clecie",
3989
+ "tysi\u0105clecia",
3990
+ "tysi\u0105cleci"
3991
+ ]
3992
+ }
3993
+ }
3994
+ };
3995
+ var UnitsMap3 = {
3996
+ \u043D\u0430\u043D\u043E\u0441\u0435\u043A\u0443\u043D\u0434\u044B: [
3997
+ "\u043D\u0430\u043D\u043E\u0441\u0435\u043A\u0443\u043D\u0434\u0430",
3998
+ "\u043D\u0430\u043D\u043E\u0441\u0435\u043A\u0443\u043D\u0434\u044B",
3999
+ "\u043D\u0430\u043D\u043E\u0441\u0435\u043A\u0443\u043D\u0434"
4000
+ ],
4001
+ \u043C\u0438\u043A\u0440\u043E\u0441\u0435\u043A\u0443\u043D\u0434\u044B: [
4002
+ "\u043C\u0438\u043A\u0440\u043E\u0441\u0435\u043A\u0443\u043D\u0434\u0430",
4003
+ "\u043C\u0438\u043A\u0440\u043E\u0441\u0435\u043A\u0443\u043D\u0434\u044B",
4004
+ "\u043C\u0438\u043A\u0440\u043E\u0441\u0435\u043A\u0443\u043D\u0434"
4005
+ ],
4006
+ \u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u044B: [
4007
+ "\u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0430",
4008
+ "\u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u044B",
4009
+ "\u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434"
4010
+ ],
4011
+ \u0441\u0435\u043A\u0443\u043D\u0434\u044B: [
4012
+ "\u0441\u0435\u043A\u0443\u043D\u0434\u0430",
4013
+ "\u0441\u0435\u043A\u0443\u043D\u0434\u044B",
4014
+ "\u0441\u0435\u043A\u0443\u043D\u0434"
4015
+ ],
4016
+ \u043C\u0438\u043D\u0443\u0442\u044B: [
4017
+ "\u043C\u0438\u043D\u0443\u0442\u0430",
4018
+ "\u043C\u0438\u043D\u0443\u0442\u044B",
4019
+ "\u043C\u0438\u043D\u0443\u0442"
4020
+ ],
4021
+ \u0447\u0430\u0441\u044B: [
4022
+ "\u0447\u0430\u0441",
4023
+ "\u0447\u0430\u0441\u0430",
4024
+ "\u0447\u0430\u0441\u043E\u0432"
4025
+ ],
4026
+ \u0434\u043D\u0438: [
4027
+ "\u0434\u0435\u043D\u044C",
4028
+ "\u0434\u043D\u044F",
4029
+ "\u0434\u043D\u0435\u0439"
4030
+ ],
4031
+ \u043D\u0435\u0434\u0435\u043B\u0438: [
4032
+ "\u043D\u0435\u0434\u0435\u043B\u044F",
4033
+ "\u043D\u0435\u0434\u0435\u043B\u0438",
4034
+ "\u043D\u0435\u0434\u0435\u043B\u044C"
4035
+ ],
4036
+ \u043C\u0435\u0441\u044F\u0446\u044B: [
4037
+ "\u043C\u0435\u0441\u044F\u0446",
4038
+ "\u043C\u0435\u0441\u044F\u0446\u0430",
4039
+ "\u043C\u0435\u0441\u044F\u0446\u0435\u0432"
4040
+ ],
4041
+ \u0433\u043E\u0434\u044B: [
4042
+ "\u0433\u043E\u0434",
4043
+ "\u0433\u043E\u0434\u0430",
4044
+ "\u043B\u0435\u0442"
4045
+ ],
4046
+ \u0434\u0435\u0441\u044F\u0442\u0438\u043B\u0435\u0442\u0438\u044F: [
4047
+ "\u0434\u0435\u0441\u044F\u0442\u0438\u043B\u0435\u0442\u0438\u0435",
4048
+ "\u0434\u0435\u0441\u044F\u0442\u0438\u043B\u0435\u0442\u0438\u044F",
4049
+ "\u0434\u0435\u0441\u044F\u0442\u0438\u043B\u0435\u0442\u0438\u0439"
4050
+ ],
4051
+ \u0432\u0435\u043A\u0430: [
4052
+ "\u0432\u0435\u043A",
4053
+ "\u0432\u0435\u043A\u0430",
4054
+ "\u0432\u0435\u043A\u043E\u0432"
4055
+ ],
4056
+ \u0442\u044B\u0441\u044F\u0447\u0435\u043B\u0435\u0442\u0438\u044F: [
4057
+ "\u0442\u044B\u0441\u044F\u0447\u0435\u043B\u0435\u0442\u0438\u0435",
4058
+ "\u0442\u044B\u0441\u044F\u0447\u0435\u043B\u0435\u0442\u0438\u044F",
4059
+ "\u0442\u044B\u0441\u044F\u0447\u0435\u043B\u0435\u0442\u0438\u0439"
4060
+ ]
4061
+ };
4062
+ function formatTime3(unit, count) {
4063
+ const words = UnitsMap3[unit];
4064
+ const lastDigit = count % 10;
4065
+ const lastTwoDigits = count % 100;
4066
+ let word;
4067
+ if (lastTwoDigits >= 11 && lastTwoDigits <= 19) word = words[2];
4068
+ else if (lastDigit === 1) word = words[0];
4069
+ else if (lastDigit >= 2 && lastDigit <= 4) word = words[1];
4070
+ else word = words[2];
4071
+ return word || "";
4072
+ }
4073
+ __name(formatTime3, "formatTime3");
4074
+ var ru_default = {
4075
+ decimal: ".",
4076
+ and: "\u0438",
4077
+ units: {
4078
+ nanosecond: {
4079
+ name: /* @__PURE__ */ __name((c) => formatTime3("\u043D\u0430\u043D\u043E\u0441\u0435\u043A\u0443\u043D\u0434\u044B", c), "name"),
4080
+ abbreviation: "\u043D\u0441",
4081
+ matches: [
4082
+ "\u043D\u0441",
4083
+ "\u043D\u0430\u043D\u043E\u0441\u0435\u043A\u0443\u043D\u0434\u0430",
4084
+ "\u043D\u0430\u043D\u043E\u0441\u0435\u043A\u0443\u043D\u0434",
4085
+ "\u043D\u0430\u043D\u043E\u0441\u0435\u043A\u0443\u043D\u0434\u044B"
4086
+ ]
4087
+ },
4088
+ microsecond: {
4089
+ name: /* @__PURE__ */ __name((c) => formatTime3("\u043C\u0438\u043A\u0440\u043E\u0441\u0435\u043A\u0443\u043D\u0434\u044B", c), "name"),
4090
+ abbreviation: "\u043C\u043A\u0441",
4091
+ matches: [
4092
+ "\u043C\u043A\u0441",
4093
+ "\u043C\u0438\u043A\u0440\u043E\u0441\u0435\u043A\u0443\u043D\u0434\u0430",
4094
+ "\u043C\u0438\u043A\u0440\u043E\u0441\u0435\u043A\u0443\u043D\u0434",
4095
+ "\u043C\u0438\u043A\u0440\u043E\u0441\u0435\u043A\u0443\u043D\u0434\u044B"
4096
+ ]
4097
+ },
4098
+ millisecond: {
4099
+ name: /* @__PURE__ */ __name((c) => formatTime3("\u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u044B", c), "name"),
4100
+ abbreviation: "\u043C\u0441",
4101
+ matches: [
4102
+ "\u043C\u0441",
4103
+ "\u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0430",
4104
+ "\u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434",
4105
+ "\u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u044B",
4106
+ "\u043C\u0441\u0435\u043A"
4107
+ ]
4108
+ },
4109
+ second: {
4110
+ name: /* @__PURE__ */ __name((c) => formatTime3("\u0441\u0435\u043A\u0443\u043D\u0434\u044B", c), "name"),
4111
+ abbreviation: "\u0441",
4112
+ matches: [
4113
+ "\u0441",
4114
+ "\u0441\u0435\u043A\u0443\u043D\u0434\u0430",
4115
+ "\u0441\u0435\u043A\u0443\u043D\u0434",
4116
+ "\u0441\u0435\u043A\u0443\u043D\u0434\u044B",
4117
+ "\u0441\u0435\u043A"
4118
+ ]
4119
+ },
4120
+ minute: {
4121
+ name: /* @__PURE__ */ __name((c) => formatTime3("\u043C\u0438\u043D\u0443\u0442\u044B", c), "name"),
4122
+ abbreviation: "\u043C",
4123
+ matches: [
4124
+ "\u043C",
4125
+ "\u043C\u0438\u043D\u0443\u0442\u0430",
4126
+ "\u043C\u0438\u043D\u0443\u0442\u044B",
4127
+ "\u043C\u0438\u043D\u0443\u0442",
4128
+ "\u043C\u0438\u043D"
4129
+ ]
4130
+ },
4131
+ hour: {
4132
+ name: /* @__PURE__ */ __name((c) => formatTime3("\u0447\u0430\u0441\u044B", c), "name"),
4133
+ abbreviation: "\u0447",
4134
+ matches: [
4135
+ "\u0447",
4136
+ "\u0447\u0430\u0441",
4137
+ "\u0447\u0430\u0441\u0430",
4138
+ "\u0447\u0430\u0441\u043E\u0432"
4139
+ ]
4140
+ },
4141
+ day: {
4142
+ name: /* @__PURE__ */ __name((c) => formatTime3("\u0434\u043D\u0438", c), "name"),
4143
+ abbreviation: "\u0434",
4144
+ matches: [
4145
+ "\u0434",
4146
+ "\u0434\u0435\u043D\u044C",
4147
+ "\u0434\u043D\u044F",
4148
+ "\u0434\u043D\u0435\u0439"
4149
+ ]
4150
+ },
4151
+ week: {
4152
+ name: /* @__PURE__ */ __name((c) => formatTime3("\u043D\u0435\u0434\u0435\u043B\u0438", c), "name"),
4153
+ abbreviation: "\u043D",
4154
+ matches: [
4155
+ "\u043D",
4156
+ "\u043D\u0435\u0434\u0435\u043B\u044F",
4157
+ "\u043D\u0435\u0434\u0435\u043B\u0438",
4158
+ "\u043D\u0435\u0434\u0435\u043B\u044C"
4159
+ ]
4160
+ },
4161
+ month: {
4162
+ name: /* @__PURE__ */ __name((c) => formatTime3("\u043C\u0435\u0441\u044F\u0446\u044B", c), "name"),
4163
+ abbreviation: "\u043C\u0435\u0441",
4164
+ matches: [
4165
+ "\u043C\u0435\u0441",
4166
+ "\u043C\u0435\u0441\u044F\u0446",
4167
+ "\u043C\u0435\u0441\u044F\u0446\u0430",
4168
+ "\u043C\u0435\u0441\u044F\u0446\u0435\u0432"
4169
+ ]
4170
+ },
4171
+ year: {
4172
+ name: /* @__PURE__ */ __name((c) => formatTime3("\u0433\u043E\u0434\u044B", c), "name"),
4173
+ abbreviation: "\u0433",
4174
+ matches: [
4175
+ "\u0433",
4176
+ "\u0433\u043E\u0434",
4177
+ "\u0433\u043E\u0434\u0430",
4178
+ "\u043B\u0435\u0442",
4179
+ "\u043B"
4180
+ ]
4181
+ },
4182
+ decade: {
4183
+ name: /* @__PURE__ */ __name((c) => formatTime3("\u0434\u0435\u0441\u044F\u0442\u0438\u043B\u0435\u0442\u0438\u044F", c), "name"),
4184
+ abbreviation: "\u0434\u0441\u043B",
4185
+ matches: [
4186
+ "\u0434\u0435\u0441\u044F\u0442\u0438\u043B\u0435\u0442\u0438\u0435",
4187
+ "\u0434\u0435\u0441\u044F\u0442\u0438\u043B\u0435\u0442\u0438\u044F",
4188
+ "\u0434\u0435\u0441\u044F\u0442\u0438\u043B\u0435\u0442\u0438\u0439",
4189
+ "\u0434\u0435\u0441\u044F\u0442\u043A\u043E\u0432 \u043B\u0435\u0442",
4190
+ "\u0434\u0435\u0441\u044F\u0442\u043A\u0430 \u043B\u0435\u0442",
4191
+ "\u0434\u0435\u0441\u044F\u0442\u043E\u043A \u043B\u0435\u0442"
4192
+ ]
4193
+ },
4194
+ century: {
4195
+ name: /* @__PURE__ */ __name((c) => formatTime3("\u0432\u0435\u043A\u0430", c), "name"),
4196
+ abbreviation: "\u0432\u043A",
4197
+ matches: [
4198
+ "\u0432\u0435\u043A",
4199
+ "\u0432\u0435\u043A\u0430",
4200
+ "\u0432\u0435\u043A\u043E\u0432"
4201
+ ]
4202
+ },
4203
+ millennium: {
4204
+ name: /* @__PURE__ */ __name((c) => formatTime3("\u0442\u044B\u0441\u044F\u0447\u0435\u043B\u0435\u0442\u0438\u044F", c), "name"),
4205
+ abbreviation: "\u0442\u044B\u0441",
4206
+ matches: [
4207
+ "\u0442\u044B\u0441",
4208
+ "\u0442\u044B\u0441\u044F\u0447\u0435\u043B\u0435\u0442\u0438\u0435",
4209
+ "\u0442\u044B\u0441\u044F\u0447\u0430\u043B\u0435\u0442\u0438\u044F",
4210
+ "\u0442\u044B\u0441\u044F\u0447\u0430\u043B\u0435\u0442\u0438\u0439",
4211
+ "\u0442\u044B\u0441\u044F\u0447\u0430 \u043B\u0435\u0442",
4212
+ "\u0442\u044B\u0441\u044F\u0447\u0438 \u043B\u0435\u0442",
4213
+ "\u0442\u044B\u0441\u044F\u0447 \u043B\u0435\u0442"
4214
+ ]
4215
+ }
4216
+ }
4217
+ };
4218
+ var zh_CN_default = {
4219
+ decimal: ".",
4220
+ and: "\u548C",
4221
+ units: {
4222
+ nanosecond: {
4223
+ name: "\u7EB3\u79D2",
4224
+ abbreviation: "ns",
4225
+ matches: [
4226
+ "\u7EB3\u79D2",
4227
+ "ns"
4228
+ ]
4229
+ },
4230
+ microsecond: {
4231
+ name: "\u5FAE\u79D2",
4232
+ abbreviation: "\u03BCs",
4233
+ matches: [
4234
+ "\u5FAE\u79D2",
4235
+ "\u03BCs",
4236
+ "us"
4237
+ ]
4238
+ },
4239
+ millisecond: {
4240
+ name: "\u6BEB\u79D2",
4241
+ abbreviation: "ms",
4242
+ matches: [
4243
+ "\u6BEB\u79D2",
4244
+ "ms"
4245
+ ]
4246
+ },
4247
+ second: {
4248
+ name: "\u79D2",
4249
+ abbreviation: "s",
4250
+ matches: [
4251
+ "\u79D2",
4252
+ "s"
4253
+ ]
4254
+ },
4255
+ minute: {
4256
+ name: "\u5206\u949F",
4257
+ abbreviation: "\u5206",
4258
+ matches: [
4259
+ "\u5206\u949F",
4260
+ "\u5206",
4261
+ "m",
4262
+ "min"
4263
+ ]
4264
+ },
4265
+ hour: {
4266
+ name: "\u5C0F\u65F6",
4267
+ abbreviation: "\u65F6",
4268
+ matches: [
4269
+ "\u5C0F\u65F6",
4270
+ "\u65F6",
4271
+ "h",
4272
+ "hour"
4273
+ ]
4274
+ },
4275
+ day: {
4276
+ name: "\u5929",
4277
+ abbreviation: "\u5929",
4278
+ matches: [
4279
+ "\u5929",
4280
+ "\u65E5",
4281
+ "d",
4282
+ "day"
4283
+ ]
4284
+ },
4285
+ week: {
4286
+ name: "\u5468",
4287
+ abbreviation: "\u5468",
4288
+ matches: [
4289
+ "\u5468",
4290
+ "\u661F\u671F",
4291
+ "w",
4292
+ "week"
4293
+ ]
4294
+ },
4295
+ month: {
4296
+ name: "\u4E2A\u6708",
4297
+ abbreviation: "\u6708",
4298
+ matches: [
4299
+ "\u4E2A\u6708",
4300
+ "\u6708",
4301
+ "mo",
4302
+ "month"
4303
+ ]
4304
+ },
4305
+ year: {
4306
+ name: "\u5E74",
4307
+ abbreviation: "\u5E74",
4308
+ matches: [
4309
+ "\u5E74",
4310
+ "y",
4311
+ "year"
4312
+ ]
4313
+ },
4314
+ decade: {
4315
+ name: "\u5341\u5E74",
4316
+ abbreviation: "\u5341\u5E74",
4317
+ matches: [
4318
+ "\u5341\u5E74",
4319
+ "dec",
4320
+ "decade"
4321
+ ]
4322
+ },
4323
+ century: {
4324
+ name: "\u4E16\u7EAA",
4325
+ abbreviation: "\u4E16\u7EAA",
4326
+ matches: [
4327
+ "\u4E16\u7EAA",
4328
+ "c",
4329
+ "century"
4330
+ ]
4331
+ },
4332
+ millennium: {
4333
+ name: "\u5343\u5E74",
4334
+ abbreviation: "\u5343\u5E74",
4335
+ matches: [
4336
+ "\u5343\u5E74",
4337
+ "mil",
4338
+ "millennium"
4339
+ ]
4340
+ }
4341
+ }
4342
+ };
4343
+ var languages = {
4344
+ cs: cs_default,
4345
+ de: de_default,
4346
+ en: en_default,
4347
+ es: es_default,
4348
+ fr: fr_default,
4349
+ it: it_default,
4350
+ mi: mi_default,
4351
+ nl: nl_default,
4352
+ pl: pl_default,
4353
+ ru: ru_default,
4354
+ "zh-CN": zh_CN_default
4355
+ };
4356
+ function makeLanguage(languageDefinition) {
4357
+ const decimalSeparator = languageDefinition.decimal;
4358
+ const thousandSeparator = decimalSeparator === "." ? "," : ".";
4359
+ const matcherRegex = new RegExp(
4360
+ // biome-ignore lint/style/useTemplate: Better readability
4361
+ `(?![${decimalSeparator}${thousandSeparator}])[\\d${decimalSeparator}${thousandSeparator}]+|(?<=\\s|\\d)((?:-)?(` + // Units
4362
+ Object.values(languageDefinition.units).flatMap(({ matches }) => matches).sort((a, b) => b.length - a.length).join("|") + "))",
4363
+ "gi"
4364
+ );
4365
+ const timeUnits = Object.fromEntries(Object.entries(languageDefinition.units).flatMap(([unit, definition]) => [
4366
+ unit,
4367
+ ...definition.matches
4368
+ ].map((m) => [
4369
+ m,
4370
+ {
4371
+ ...definition,
4372
+ ms: units[unit]
4373
+ }
4374
+ ])));
4375
+ return {
4376
+ andValue: languageDefinition.and,
4377
+ decimalSeparator,
4378
+ thousandSeparator,
4379
+ matcherRegex,
4380
+ timeUnits,
4381
+ supportsAbbreviations: Object.values(timeUnits).every((u) => u.abbreviation)
4382
+ };
4383
+ }
4384
+ __name(makeLanguage, "makeLanguage");
4385
+ var languageCache = /* @__PURE__ */ new Map();
4386
+ function getLanguage(localeOrLanguageDefinition) {
4387
+ const languageDefinition = typeof localeOrLanguageDefinition === "string" ? languages[localeOrLanguageDefinition] : localeOrLanguageDefinition;
4388
+ if (!languageDefinition) throw new Error("Invalid language");
4389
+ const key = JSON.stringify(languageDefinition);
4390
+ if (languageCache.has(key)) return languageCache.get(key);
4391
+ const language = makeLanguage(languageDefinition);
4392
+ languageCache.set(key, language);
4393
+ return language;
4394
+ }
4395
+ __name(getLanguage, "getLanguage");
4396
+ function formatUnit(unit, count, options) {
4397
+ const { useAbbreviations, hideUnitNames, minimumDigits } = options;
4398
+ const amount = count.toString().padStart(minimumDigits, "0");
4399
+ if (hideUnitNames) return amount;
4400
+ const name = pluraliseUnit(unit, count, options);
4401
+ return `${amount}${useAbbreviations ? "" : " "}${name}`;
4402
+ }
4403
+ __name(formatUnit, "formatUnit");
4404
+ function pluraliseUnit(unit, count, options) {
4405
+ const { useAbbreviations } = options;
4406
+ const factory = useAbbreviations && unit.abbreviation ? unit.abbreviation : unit.name;
4407
+ return typeof factory === "function" ? factory(Math.abs(count)) : factory;
4408
+ }
4409
+ __name(pluraliseUnit, "pluraliseUnit");
4410
+ var parseUnits = {
4411
+ year: units.year,
4412
+ day: units.day,
4413
+ hour: units.hour,
4414
+ minute: units.minute,
4415
+ second: units.second,
4416
+ millisecond: units.millisecond,
4417
+ microsecond: units.microsecond,
4418
+ nanosecond: units.nanosecond
4419
+ };
4420
+ function parseMilliseconds(milliseconds, includedUnits = Object.keys(parseUnits)) {
4421
+ let remainingMs = milliseconds;
4422
+ const parsed = {};
4423
+ for (const key in parseUnits) {
4424
+ const unit = key;
4425
+ if (includedUnits.includes(unit)) {
4426
+ parsed[unit] = Math.trunc(remainingMs / parseUnits[unit]);
4427
+ remainingMs %= parseUnits[unit];
4428
+ } else {
4429
+ parsed[unit] = null;
4430
+ }
4431
+ }
4432
+ return parsed;
4433
+ }
4434
+ __name(parseMilliseconds, "parseMilliseconds");
4435
+ var defaultFormatOptions = {
4436
+ hideUnitNames: false,
4437
+ useAbbreviations: false,
4438
+ includeZero: false,
4439
+ includeMs: false,
4440
+ includeSubMs: false,
4441
+ includedUnits: [
4442
+ "year",
4443
+ "day",
4444
+ "hour",
4445
+ "minute",
4446
+ "second"
4447
+ ],
4448
+ unitLimit: -1,
4449
+ unitSeparator: " ",
4450
+ minimumDigits: 0
4451
+ };
4452
+ function resolveFormatOptions(options) {
4453
+ let { hideUnitNames = defaultFormatOptions.hideUnitNames, useAbbreviations = defaultFormatOptions.useAbbreviations, includeZero = defaultFormatOptions.includeZero, includeMs = defaultFormatOptions.includeMs, includeSubMs = defaultFormatOptions.includeSubMs, includedUnits = [
4454
+ ...defaultFormatOptions.includedUnits
4455
+ ], unitLimit = defaultFormatOptions.unitLimit, unitSeparator = defaultFormatOptions.unitSeparator, minimumDigits = defaultFormatOptions.minimumDigits } = options;
4456
+ if (typeof includeMs !== "boolean") throw new Error("Invalid includeMs option");
4457
+ if (typeof includeSubMs !== "boolean") throw new Error("Invalid includeSubMs option");
4458
+ if (typeof hideUnitNames !== "boolean") throw new Error("Invalid hideUnitNames option");
4459
+ if (typeof useAbbreviations !== "boolean") throw new Error("Invalid useAbbreviations option");
4460
+ if (typeof includeZero !== "boolean") throw new Error("Invalid includeZero option");
4461
+ if (!Array.isArray(includedUnits)) throw new Error("Invalid includedUnits option");
4462
+ if (typeof unitLimit !== "number") throw new Error("Invalid unitLimit option");
4463
+ if (typeof unitSeparator !== "string") throw new Error("Invalid unitSeparator option");
4464
+ if (typeof minimumDigits !== "number") throw new Error("Invalid minimumDigits option");
4465
+ if (includeSubMs) {
4466
+ if (includeMs === false) throw new Error("Conflicting options: `includeSubMs` is true while `includeMs` is false.");
4467
+ includeMs = true;
4468
+ }
4469
+ if (includeMs) includedUnits.push("millisecond");
4470
+ if (includeSubMs) includedUnits.push("microsecond", "nanosecond");
4471
+ return {
4472
+ hideUnitNames,
4473
+ useAbbreviations,
4474
+ includeZero,
4475
+ includedUnits,
4476
+ unitLimit,
4477
+ unitSeparator,
4478
+ minimumDigits,
4479
+ __transformDuration__: options.__transformDuration__
4480
+ };
4481
+ }
4482
+ __name(resolveFormatOptions, "resolveFormatOptions");
4483
+ var formatOptionsPresets = {
4484
+ short: {
4485
+ useAbbreviations: true,
4486
+ unitLimit: 2
4487
+ },
4488
+ fullPrecision: {
4489
+ includeMs: true,
4490
+ includeSubMs: true
4491
+ },
4492
+ colonNotation: {
4493
+ hideUnitNames: true,
4494
+ unitLimit: 3,
4495
+ includeZero: true,
4496
+ includedUnits: [
4497
+ "hour",
4498
+ "minute",
4499
+ "second"
4500
+ ],
4501
+ unitSeparator: ":",
4502
+ minimumDigits: 2,
4503
+ // I couldn't think of an option that would be better than this
4504
+ __transformDuration__: /* @__PURE__ */ __name((duration) => duration.replace(/^00:/, ""), "__transformDuration__")
4505
+ }
4506
+ };
4507
+ function resolveFormatPresetOptions(options = {}) {
4508
+ if (typeof options === "string") options = {
4509
+ extends: options
4510
+ };
4511
+ return {
4512
+ ...options.extends && formatOptionsPresets[options.extends],
4513
+ ...options,
4514
+ preset: void 0
4515
+ };
4516
+ }
4517
+ __name(resolveFormatPresetOptions, "resolveFormatPresetOptions");
4518
+ function formatMilliseconds(milliseconds, language = getLanguage("en"), options = {}) {
4519
+ const presetOptions = resolveFormatPresetOptions(options);
4520
+ const resolvedOptions = resolveFormatOptions(presetOptions);
4521
+ const { includedUnits } = resolvedOptions;
4522
+ const time = parseMilliseconds(milliseconds, includedUnits);
4523
+ const entries = [];
4524
+ for (const key in time) {
4525
+ const unit = key;
4526
+ const value = time[unit];
4527
+ entries.push({
4528
+ unit: language.timeUnits[unit],
4529
+ amount: value
4530
+ });
4531
+ }
4532
+ const { includeZero } = resolvedOptions;
4533
+ const filtered = entries.filter((entry) => {
4534
+ if (entry.amount === null) return false;
4535
+ if (entry.amount === 0) return includeZero;
4536
+ return true;
4537
+ });
4538
+ const { unitLimit } = resolvedOptions;
4539
+ const formatted = [];
4540
+ for (let i = 0; i < filtered.length; i++) {
4541
+ const entry = filtered.at(i);
4542
+ if (unitLimit !== -1 && formatted.length >= unitLimit) break;
4543
+ const format = formatUnit(entry.unit, entry.amount, resolvedOptions);
4544
+ formatted.push(format);
4545
+ }
4546
+ const { unitSeparator, __transformDuration__ } = resolvedOptions;
4547
+ const duration = formatted.join(unitSeparator) || null;
4548
+ return duration && __transformDuration__ ? __transformDuration__(duration) : duration;
4549
+ }
4550
+ __name(formatMilliseconds, "formatMilliseconds");
4551
+ function parseDuration(duration, language = getLanguage("en")) {
4552
+ const matches = duration.toLowerCase().match(language.matcherRegex);
4553
+ if (!matches || matches.length === 0) return 0;
4554
+ let total = 0;
4555
+ for (let i = 0; i < matches.length; i += 2) {
4556
+ const [amount, unit] = matches.slice(i, i + 2);
4557
+ const ms2 = language.timeUnits[unit]?.ms;
4558
+ if (ms2) total += Number(amount) * ms2;
4559
+ }
4560
+ return total;
4561
+ }
4562
+ __name(parseDuration, "parseDuration");
4563
+ function createMs(options = {}) {
4564
+ const language = getLanguage(options.language ?? "en");
4565
+ const defaultFormatOptions2 = (
4566
+ //
4567
+ resolveFormatPresetOptions(options.formatOptions)
4568
+ );
4569
+ function ms2(...args) {
4570
+ switch (typeof args[0]) {
4571
+ case "number": {
4572
+ const [milliseconds, additionalOptions] = args;
4573
+ if (Number.isNaN(milliseconds) || !Number.isFinite(milliseconds)) throw new TypeError("Expected a finite number");
4574
+ if (milliseconds < 0) throw new TypeError("Expected a positive number");
4575
+ const presetOptions = resolveFormatPresetOptions(additionalOptions);
4576
+ const formatOptions = {
4577
+ ...defaultFormatOptions2,
4578
+ ...presetOptions
4579
+ };
4580
+ return formatMilliseconds(milliseconds, language, formatOptions);
4581
+ }
4582
+ case "string": {
4583
+ const [duration] = args;
4584
+ return parseDuration(duration, language) ?? 0;
4585
+ }
4586
+ default:
4587
+ throw new TypeError("Expected a finite number or a string");
4588
+ }
4589
+ }
4590
+ __name(ms2, "ms2");
4591
+ return ms2;
4592
+ }
4593
+ __name(createMs, "createMs");
4594
+ var ms = createMs({
4595
+ language: "en"
4596
+ });
4597
+
4598
+ // ../decorators/src/memoizeSync.ts
4599
+ function memoizeSync(arg = {}) {
4600
+ const opts = typeof arg === "object" ? arg : {
4601
+ maxAge: typeof arg === "number" ? arg : ms(arg)
4602
+ };
4603
+ return /* @__PURE__ */ __name(function decorator(target, key, descriptor) {
4604
+ if (!descriptor) {
4605
+ throw new TypeError("descriptor is undefined");
4606
+ }
4607
+ const orig = descriptor.value;
4608
+ assertDescriptorValueIsFunction(key, descriptor);
4609
+ const options = {
4610
+ length: false,
4611
+ ...opts
4612
+ };
4613
+ if (opts.instancesShareCache) {
4614
+ Reflect.deleteProperty(options, "instancesShareCache");
4615
+ descriptor.value = (0, import_memoizee.default)(orig, options);
4616
+ } else {
4617
+ const wmap = /* @__PURE__ */ new WeakMap();
4618
+ descriptor.value = function(...args) {
4619
+ const memoized = mapGetOrDefault(wmap, this, () => {
4620
+ return (0, import_memoizee.default)(orig, options);
4621
+ });
4622
+ return memoized.apply(this, args);
4623
+ };
4624
+ }
4625
+ return descriptor;
4626
+ }, "decorator");
4627
+ }
4628
+ __name(memoizeSync, "memoizeSync");
4629
+
4630
+ // ../decorators/src/lazyProp.ts
4631
+ function lazyProp(targetOrTimeout, key, descriptor) {
4632
+ if (typeof targetOrTimeout === "number" || typeof targetOrTimeout === "string") {
4633
+ const maxAge = typeof targetOrTimeout === "number" ? targetOrTimeout : ms(targetOrTimeout);
4634
+ return createLazyPropDecorator(new TimeoutWeakMap(maxAge));
4635
+ } else {
4636
+ const decorator = createLazyPropDecorator(/* @__PURE__ */ new WeakMap());
4637
+ return decorator(targetOrTimeout, key, descriptor);
4638
+ }
4639
+ }
4640
+ __name(lazyProp, "lazyProp");
4641
+ function createLazyPropDecorator(map) {
4642
+ return function(target, key, descriptor) {
4643
+ const { get, value } = descriptor;
4644
+ if (predicate.isFunction(get)) {
4645
+ descriptor.get = function() {
4646
+ return mapGetOrDefault(map, this, () => {
4647
+ return get.call(this);
4648
+ });
4649
+ };
4650
+ return descriptor;
4651
+ }
4652
+ if (predicate.isFunction(value)) {
4653
+ return memoizeSync()(target, key, descriptor);
4654
+ }
4655
+ throw new TypeError('neither "get" nor "value" are functions');
4656
+ };
4657
+ }
4658
+ __name(createLazyPropDecorator, "createLazyPropDecorator");
4659
+
4660
+ // src/lib/Help.ts
12
4661
  function _ts_decorate(decorators, target, key, desc) {
13
4662
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
14
4663
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -20,7 +4669,7 @@ function _ts_metadata(k, v) {
20
4669
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
21
4670
  }
22
4671
  __name(_ts_metadata, "_ts_metadata");
23
- class Help {
4672
+ var Help = class {
24
4673
  static {
25
4674
  __name(this, "Help");
26
4675
  }
@@ -499,51 +5148,51 @@ ${itemIndentStr}`);
499
5148
  });
500
5149
  return output.join("\n");
501
5150
  }
502
- }
5151
+ };
503
5152
  _ts_decorate([
504
- decorators.lazyProp,
5153
+ lazyProp,
505
5154
  _ts_metadata("design:type", Function),
506
5155
  _ts_metadata("design:paramtypes", []),
507
5156
  _ts_metadata("design:returntype", Array)
508
5157
  ], Help.prototype, "visibleCommands", null);
509
5158
  _ts_decorate([
510
- decorators.lazyProp,
5159
+ lazyProp,
511
5160
  _ts_metadata("design:type", Function),
512
5161
  _ts_metadata("design:paramtypes", []),
513
5162
  _ts_metadata("design:returntype", Array)
514
5163
  ], Help.prototype, "visibleOptions", null);
515
5164
  _ts_decorate([
516
- decorators.lazyProp,
5165
+ lazyProp,
517
5166
  _ts_metadata("design:type", Function),
518
5167
  _ts_metadata("design:paramtypes", []),
519
5168
  _ts_metadata("design:returntype", Array)
520
5169
  ], Help.prototype, "visibleArguments", null);
521
5170
  _ts_decorate([
522
- decorators.lazyProp,
5171
+ lazyProp,
523
5172
  _ts_metadata("design:type", Function),
524
5173
  _ts_metadata("design:paramtypes", []),
525
5174
  _ts_metadata("design:returntype", Number)
526
5175
  ], Help.prototype, "longestSubcommandAliasLength", null);
527
5176
  _ts_decorate([
528
- decorators.lazyProp,
5177
+ lazyProp,
529
5178
  _ts_metadata("design:type", Function),
530
5179
  _ts_metadata("design:paramtypes", []),
531
5180
  _ts_metadata("design:returntype", Number)
532
5181
  ], Help.prototype, "longestSubcommandTermLength", null);
533
5182
  _ts_decorate([
534
- decorators.lazyProp,
5183
+ lazyProp,
535
5184
  _ts_metadata("design:type", Function),
536
5185
  _ts_metadata("design:paramtypes", []),
537
5186
  _ts_metadata("design:returntype", Number)
538
5187
  ], Help.prototype, "longestOptionTermLength", null);
539
5188
  _ts_decorate([
540
- decorators.lazyProp,
5189
+ lazyProp,
541
5190
  _ts_metadata("design:type", Function),
542
5191
  _ts_metadata("design:paramtypes", []),
543
5192
  _ts_metadata("design:returntype", Number)
544
5193
  ], Help.prototype, "longestArgumentTermLength", null);
545
5194
  _ts_decorate([
546
- decorators.lazyProp,
5195
+ lazyProp,
547
5196
  _ts_metadata("design:type", Function),
548
5197
  _ts_metadata("design:paramtypes", []),
549
5198
  _ts_metadata("design:returntype", Number)