@dxos/util 0.8.4-main.f9ba587 → 0.8.4-main.fbb7a13
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/dist/lib/browser/index.mjs +393 -112
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +393 -112
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/array.d.ts +3 -2
- package/dist/types/src/array.d.ts.map +1 -1
- package/dist/types/src/assume.d.ts.map +1 -1
- package/dist/types/src/deep.d.ts.map +1 -1
- package/dist/types/src/defer.d.ts +1 -1
- package/dist/types/src/defer.d.ts.map +1 -1
- package/dist/types/src/di-key.d.ts +3 -3
- package/dist/types/src/di-key.d.ts.map +1 -1
- package/dist/types/src/error-format.d.ts +5 -0
- package/dist/types/src/error-format.d.ts.map +1 -0
- package/dist/types/src/filename.d.ts +9 -0
- package/dist/types/src/filename.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +5 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/json.d.ts +1 -1
- package/dist/types/src/json.d.ts.map +1 -1
- package/dist/types/src/object.d.ts +3 -0
- package/dist/types/src/object.d.ts.map +1 -1
- package/dist/types/src/platform.d.ts +4 -1
- package/dist/types/src/platform.d.ts.map +1 -1
- package/dist/types/src/retry.d.ts +32 -0
- package/dist/types/src/retry.d.ts.map +1 -0
- package/dist/types/src/safe-parse.d.ts +6 -4
- package/dist/types/src/safe-parse.d.ts.map +1 -1
- package/dist/types/src/safe-stringify.d.ts +22 -0
- package/dist/types/src/safe-stringify.d.ts.map +1 -0
- package/dist/types/src/string.d.ts +8 -0
- package/dist/types/src/string.d.ts.map +1 -1
- package/dist/types/src/string.test.d.ts +2 -0
- package/dist/types/src/string.test.d.ts.map +1 -0
- package/dist/types/src/to-fallback.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +23 -5
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/src/unit.d.ts +14 -0
- package/dist/types/src/unit.d.ts.map +1 -0
- package/dist/types/src/unit.test.d.ts +2 -0
- package/dist/types/src/unit.test.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -9
- package/src/array.test.ts +1 -1
- package/src/array.ts +9 -4
- package/src/assume.ts +0 -1
- package/src/binder.ts +2 -2
- package/src/circular-buffer.test.ts +1 -1
- package/src/complex.test.ts +1 -1
- package/src/deep.ts +2 -0
- package/src/defer.ts +1 -1
- package/src/error-format.ts +22 -0
- package/src/filename.ts +16 -0
- package/src/human-hash.test.ts +1 -1
- package/src/index.ts +5 -2
- package/src/json.ts +2 -7
- package/src/object.ts +3 -0
- package/src/platform.ts +11 -1
- package/src/position.test.ts +2 -2
- package/src/retry.ts +74 -0
- package/src/safe-parse.ts +21 -15
- package/src/safe-stringify.ts +146 -0
- package/src/sort.test.ts +1 -1
- package/src/string.test.ts +19 -0
- package/src/string.ts +36 -0
- package/src/to-fallback.ts +5 -4
- package/src/tree.test.ts +1 -1
- package/src/types.test.ts +11 -1
- package/src/types.ts +38 -10
- package/src/uint8array.test.ts +1 -1
- package/src/unit.test.ts +25 -0
- package/src/unit.ts +83 -0
- package/src/weak.test.ts +1 -1
- package/dist/types/src/explicit-resource-management-polyfill.d.ts +0 -1
- package/dist/types/src/explicit-resource-management-polyfill.d.ts.map +0 -1
- package/dist/types/src/first-two-chars.d.ts +0 -9
- package/dist/types/src/first-two-chars.d.ts.map +0 -1
- package/src/explicit-resource-management-polyfill.ts +0 -13
- package/src/first-two-chars.ts +0 -44
|
@@ -97,16 +97,24 @@ var intersectBy = (arrays, selector) => {
|
|
|
97
97
|
return lookups.every((lookup) => lookup.has(key));
|
|
98
98
|
});
|
|
99
99
|
};
|
|
100
|
+
var coerceArray = (arr) => {
|
|
101
|
+
if (arr === void 0) {
|
|
102
|
+
return [];
|
|
103
|
+
}
|
|
104
|
+
return Array.isArray(arr) ? arr : [
|
|
105
|
+
arr
|
|
106
|
+
];
|
|
107
|
+
};
|
|
100
108
|
|
|
101
109
|
// src/assume.ts
|
|
102
110
|
function assumeType(value) {
|
|
103
111
|
}
|
|
104
112
|
|
|
105
113
|
// src/binder.ts
|
|
106
|
-
import
|
|
114
|
+
import { promisify } from "@dxos/node-std/util";
|
|
107
115
|
var createBinder = (obj) => ({
|
|
108
116
|
fn: (fn) => fn.bind(obj),
|
|
109
|
-
async: (fn) =>
|
|
117
|
+
async: (fn) => promisify(fn.bind(obj))
|
|
110
118
|
});
|
|
111
119
|
|
|
112
120
|
// src/bitfield.ts
|
|
@@ -207,6 +215,7 @@ var CallbackCollection = class {
|
|
|
207
215
|
import { invariant as invariant2 } from "@dxos/invariant";
|
|
208
216
|
var __dxlog_file2 = "/__w/dxos/dxos/packages/common/util/src/callback.ts";
|
|
209
217
|
var Callback = class {
|
|
218
|
+
_callback;
|
|
210
219
|
call(...args) {
|
|
211
220
|
invariant2(this._callback, "Callback not set", {
|
|
212
221
|
F: __dxlog_file2,
|
|
@@ -301,9 +310,10 @@ var chunkArray = (array, size) => {
|
|
|
301
310
|
import { invariant as invariant3 } from "@dxos/invariant";
|
|
302
311
|
var __dxlog_file3 = "/__w/dxos/dxos/packages/common/util/src/circular-buffer.ts";
|
|
303
312
|
var CircularBuffer = class {
|
|
313
|
+
_buffer;
|
|
314
|
+
_nextIndex = 0;
|
|
315
|
+
_elementCount = 0;
|
|
304
316
|
constructor(size) {
|
|
305
|
-
this._nextIndex = 0;
|
|
306
|
-
this._elementCount = 0;
|
|
307
317
|
invariant3(size >= 1, void 0, {
|
|
308
318
|
F: __dxlog_file3,
|
|
309
319
|
L: 13,
|
|
@@ -374,10 +384,11 @@ import { inspect } from "@dxos/node-std/util";
|
|
|
374
384
|
import { inspectObject, raise } from "@dxos/debug";
|
|
375
385
|
var MAX_SERIALIZATION_LENGTH = 10;
|
|
376
386
|
var ComplexSet = class {
|
|
387
|
+
_projection;
|
|
388
|
+
_values = /* @__PURE__ */ new Map();
|
|
377
389
|
// prettier-ignore
|
|
378
390
|
constructor(_projection, values) {
|
|
379
391
|
this._projection = _projection;
|
|
380
|
-
this._values = /* @__PURE__ */ new Map();
|
|
381
392
|
if (values) {
|
|
382
393
|
for (const value of values) {
|
|
383
394
|
this.add(value);
|
|
@@ -467,11 +478,12 @@ var makeSet = (projection) => {
|
|
|
467
478
|
};
|
|
468
479
|
};
|
|
469
480
|
var ComplexMap = class _ComplexMap {
|
|
481
|
+
_keyProjection;
|
|
482
|
+
_keys = /* @__PURE__ */ new Map();
|
|
483
|
+
_values = /* @__PURE__ */ new Map();
|
|
470
484
|
// prettier-ignore
|
|
471
485
|
constructor(_keyProjection, entries2) {
|
|
472
486
|
this._keyProjection = _keyProjection;
|
|
473
|
-
this._keys = /* @__PURE__ */ new Map();
|
|
474
|
-
this._values = /* @__PURE__ */ new Map();
|
|
475
487
|
if (entries2) {
|
|
476
488
|
for (const [key, value] of entries2) {
|
|
477
489
|
this.set(key, value);
|
|
@@ -592,13 +604,11 @@ var getDeep = (obj, path) => {
|
|
|
592
604
|
// src/defer-function.ts
|
|
593
605
|
var deferFunction = (fnProvider) => (...args) => fnProvider()(...args);
|
|
594
606
|
|
|
595
|
-
// src/explicit-resource-management-polyfill.ts
|
|
596
|
-
Symbol.dispose ??= Symbol("Symbol.dispose");
|
|
597
|
-
Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose");
|
|
598
|
-
|
|
599
607
|
// src/defer.ts
|
|
608
|
+
import "@hazae41/symbol-dispose-polyfill";
|
|
600
609
|
var defer = (fn) => new DeferGuard(fn);
|
|
601
610
|
var DeferGuard = class {
|
|
611
|
+
_fn;
|
|
602
612
|
/**
|
|
603
613
|
* @internal
|
|
604
614
|
*/
|
|
@@ -614,6 +624,7 @@ var DeferGuard = class {
|
|
|
614
624
|
};
|
|
615
625
|
var deferAsync = (fn) => new DeferAsyncGuard(fn);
|
|
616
626
|
var DeferAsyncGuard = class {
|
|
627
|
+
_fn;
|
|
617
628
|
/**
|
|
618
629
|
* @internal
|
|
619
630
|
*/
|
|
@@ -628,6 +639,8 @@ var DeferAsyncGuard = class {
|
|
|
628
639
|
// src/entry.ts
|
|
629
640
|
var entry = (map, key) => new MapEntry(map, key);
|
|
630
641
|
var MapEntry = class {
|
|
642
|
+
_map;
|
|
643
|
+
_key;
|
|
631
644
|
/**
|
|
632
645
|
* @internal
|
|
633
646
|
*/
|
|
@@ -653,32 +666,11 @@ var MapEntry = class {
|
|
|
653
666
|
}
|
|
654
667
|
};
|
|
655
668
|
|
|
656
|
-
// src/
|
|
657
|
-
var
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
"",
|
|
662
|
-
""
|
|
663
|
-
];
|
|
664
|
-
let foundFirst = false;
|
|
665
|
-
for (let i = 0; i < characters.length; i++) {
|
|
666
|
-
const char = characters[i];
|
|
667
|
-
if (renderableCharRegex.test(char)) {
|
|
668
|
-
if (!foundFirst) {
|
|
669
|
-
result[0] = char;
|
|
670
|
-
foundFirst = true;
|
|
671
|
-
} else {
|
|
672
|
-
const textBetween = characters.slice(result[0].length, i).join("");
|
|
673
|
-
if (/[^\p{L}\p{N}_]/u.test(textBetween)) {
|
|
674
|
-
result[1] = char;
|
|
675
|
-
break;
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
return result;
|
|
681
|
-
};
|
|
669
|
+
// src/filename.ts
|
|
670
|
+
var createFilename = ({ parts = [], ext, date = /* @__PURE__ */ new Date() }) => [
|
|
671
|
+
date.toISOString().replace(/[:.]/g, "-"),
|
|
672
|
+
...parts
|
|
673
|
+
].join("_") + (ext ? `.${ext}` : "");
|
|
682
674
|
|
|
683
675
|
// src/for-each-async.ts
|
|
684
676
|
var forEachAsync = (items, fn) => Promise.all(items.map(fn));
|
|
@@ -944,6 +936,7 @@ var DEFAULT_WORDLIST = [
|
|
|
944
936
|
"zulu"
|
|
945
937
|
];
|
|
946
938
|
var HumanHasher = class {
|
|
939
|
+
wordlist;
|
|
947
940
|
/**
|
|
948
941
|
* Transforms hex digests to human-readable strings.
|
|
949
942
|
*
|
|
@@ -1109,7 +1102,7 @@ var arrayToString = (array) => arrayToBuffer(array).toString("hex");
|
|
|
1109
1102
|
// src/json.ts
|
|
1110
1103
|
var MAX_DEPTH = 5;
|
|
1111
1104
|
var LOG_MAX_DEPTH = 7;
|
|
1112
|
-
|
|
1105
|
+
var jsonReplacer = (key, value) => {
|
|
1113
1106
|
if (value !== null && typeof value === "object" && typeof value[inspect2.custom] === "function") {
|
|
1114
1107
|
return value[inspect2.custom]();
|
|
1115
1108
|
}
|
|
@@ -1122,7 +1115,7 @@ function jsonReplacer(key, value) {
|
|
|
1122
1115
|
}
|
|
1123
1116
|
}
|
|
1124
1117
|
return value;
|
|
1125
|
-
}
|
|
1118
|
+
};
|
|
1126
1119
|
var jsonify = (value, depth = 0, visitedObjects = /* @__PURE__ */ new WeakSet()) => {
|
|
1127
1120
|
if (depth > MAX_DEPTH) {
|
|
1128
1121
|
return null;
|
|
@@ -1209,31 +1202,10 @@ var deepMapValues = (value, fn) => {
|
|
|
1209
1202
|
return new DeepMapper(fn).map(value);
|
|
1210
1203
|
};
|
|
1211
1204
|
var DeepMapper = class {
|
|
1205
|
+
_fn;
|
|
1206
|
+
_cyclic = /* @__PURE__ */ new Map();
|
|
1212
1207
|
constructor(_fn) {
|
|
1213
1208
|
this._fn = _fn;
|
|
1214
|
-
this._cyclic = /* @__PURE__ */ new Map();
|
|
1215
|
-
this._recurse = (value) => {
|
|
1216
|
-
if (this._cyclic.has(value)) {
|
|
1217
|
-
return this._cyclic.get(value);
|
|
1218
|
-
}
|
|
1219
|
-
if (Array.isArray(value)) {
|
|
1220
|
-
const res = new Array(value.length);
|
|
1221
|
-
this._cyclic.set(value, res);
|
|
1222
|
-
for (let i = 0; i < value.length; i++) {
|
|
1223
|
-
res[i] = this._map(value[i], i);
|
|
1224
|
-
}
|
|
1225
|
-
return res;
|
|
1226
|
-
} else if (value !== null && typeof value === "object") {
|
|
1227
|
-
const res = {};
|
|
1228
|
-
this._cyclic.set(value, res);
|
|
1229
|
-
for (const key in value) {
|
|
1230
|
-
res[key] = this._map(value[key], key);
|
|
1231
|
-
}
|
|
1232
|
-
return res;
|
|
1233
|
-
} else {
|
|
1234
|
-
return value;
|
|
1235
|
-
}
|
|
1236
|
-
};
|
|
1237
1209
|
}
|
|
1238
1210
|
map(value) {
|
|
1239
1211
|
return this._map(value, void 0);
|
|
@@ -1244,36 +1216,37 @@ var DeepMapper = class {
|
|
|
1244
1216
|
}
|
|
1245
1217
|
return this._fn(value, this._recurse, key);
|
|
1246
1218
|
}
|
|
1219
|
+
_recurse = (value) => {
|
|
1220
|
+
if (this._cyclic.has(value)) {
|
|
1221
|
+
return this._cyclic.get(value);
|
|
1222
|
+
}
|
|
1223
|
+
if (Array.isArray(value)) {
|
|
1224
|
+
const res = new Array(value.length);
|
|
1225
|
+
this._cyclic.set(value, res);
|
|
1226
|
+
for (let i = 0; i < value.length; i++) {
|
|
1227
|
+
res[i] = this._map(value[i], i);
|
|
1228
|
+
}
|
|
1229
|
+
return res;
|
|
1230
|
+
} else if (value !== null && typeof value === "object") {
|
|
1231
|
+
const res = {};
|
|
1232
|
+
this._cyclic.set(value, res);
|
|
1233
|
+
for (const key in value) {
|
|
1234
|
+
res[key] = this._map(value[key], key);
|
|
1235
|
+
}
|
|
1236
|
+
return res;
|
|
1237
|
+
} else {
|
|
1238
|
+
return value;
|
|
1239
|
+
}
|
|
1240
|
+
};
|
|
1247
1241
|
};
|
|
1248
1242
|
var deepMapValuesAsync = (value, fn) => {
|
|
1249
1243
|
return new DeepMapperAsync(fn).map(value);
|
|
1250
1244
|
};
|
|
1251
1245
|
var DeepMapperAsync = class {
|
|
1246
|
+
_fn;
|
|
1247
|
+
_cyclic = /* @__PURE__ */ new Map();
|
|
1252
1248
|
constructor(_fn) {
|
|
1253
1249
|
this._fn = _fn;
|
|
1254
|
-
this._cyclic = /* @__PURE__ */ new Map();
|
|
1255
|
-
this._recurse = async (value) => {
|
|
1256
|
-
if (this._cyclic.has(value)) {
|
|
1257
|
-
return this._cyclic.get(value);
|
|
1258
|
-
}
|
|
1259
|
-
if (Array.isArray(value)) {
|
|
1260
|
-
const res = new Array(value.length);
|
|
1261
|
-
this._cyclic.set(value, res);
|
|
1262
|
-
for (let i = 0; i < value.length; i++) {
|
|
1263
|
-
res[i] = await this._map(value[i], i);
|
|
1264
|
-
}
|
|
1265
|
-
return res;
|
|
1266
|
-
} else if (value !== null && typeof value === "object") {
|
|
1267
|
-
const res = {};
|
|
1268
|
-
this._cyclic.set(value, res);
|
|
1269
|
-
for (const key in value) {
|
|
1270
|
-
res[key] = await this._map(value[key], key);
|
|
1271
|
-
}
|
|
1272
|
-
return res;
|
|
1273
|
-
} else {
|
|
1274
|
-
return value;
|
|
1275
|
-
}
|
|
1276
|
-
};
|
|
1277
1250
|
}
|
|
1278
1251
|
map(value) {
|
|
1279
1252
|
return this._map(value, void 0);
|
|
@@ -1284,6 +1257,28 @@ var DeepMapperAsync = class {
|
|
|
1284
1257
|
}
|
|
1285
1258
|
return this._fn(value, this._recurse, key);
|
|
1286
1259
|
}
|
|
1260
|
+
_recurse = async (value) => {
|
|
1261
|
+
if (this._cyclic.has(value)) {
|
|
1262
|
+
return this._cyclic.get(value);
|
|
1263
|
+
}
|
|
1264
|
+
if (Array.isArray(value)) {
|
|
1265
|
+
const res = new Array(value.length);
|
|
1266
|
+
this._cyclic.set(value, res);
|
|
1267
|
+
for (let i = 0; i < value.length; i++) {
|
|
1268
|
+
res[i] = await this._map(value[i], i);
|
|
1269
|
+
}
|
|
1270
|
+
return res;
|
|
1271
|
+
} else if (value !== null && typeof value === "object") {
|
|
1272
|
+
const res = {};
|
|
1273
|
+
this._cyclic.set(value, res);
|
|
1274
|
+
for (const key in value) {
|
|
1275
|
+
res[key] = await this._map(value[key], key);
|
|
1276
|
+
}
|
|
1277
|
+
return res;
|
|
1278
|
+
} else {
|
|
1279
|
+
return value;
|
|
1280
|
+
}
|
|
1281
|
+
};
|
|
1287
1282
|
};
|
|
1288
1283
|
var visitValues = (object, visitor) => {
|
|
1289
1284
|
if (Array.isArray(object)) {
|
|
@@ -1372,7 +1367,18 @@ var omit = (obj, keys2) => {
|
|
|
1372
1367
|
|
|
1373
1368
|
// src/platform.ts
|
|
1374
1369
|
var isNode = () => typeof process !== "undefined" && process.versions != null && process.versions.node != null;
|
|
1375
|
-
var
|
|
1370
|
+
var isBun = () => globalThis.Bun !== void 0;
|
|
1371
|
+
var isTauri = () => !!globalThis.__TAURI__;
|
|
1372
|
+
var isMobile = () => {
|
|
1373
|
+
let check = false;
|
|
1374
|
+
(function(a) {
|
|
1375
|
+
if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) {
|
|
1376
|
+
check = true;
|
|
1377
|
+
}
|
|
1378
|
+
})(navigator.userAgent || navigator.vendor || window.opera);
|
|
1379
|
+
return check;
|
|
1380
|
+
};
|
|
1381
|
+
var isMobileOrTablet = () => {
|
|
1376
1382
|
let check = false;
|
|
1377
1383
|
((a) => {
|
|
1378
1384
|
if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) {
|
|
@@ -1601,37 +1607,123 @@ var safeInstanceof = (tag) => (target) => {
|
|
|
1601
1607
|
};
|
|
1602
1608
|
|
|
1603
1609
|
// src/safe-parse.ts
|
|
1604
|
-
|
|
1610
|
+
function safeParseInt(str, defaultValue) {
|
|
1605
1611
|
try {
|
|
1606
|
-
const
|
|
1607
|
-
return isNaN(
|
|
1608
|
-
} catch
|
|
1612
|
+
const value = parseInt(str ?? "");
|
|
1613
|
+
return isNaN(value) ? defaultValue : value;
|
|
1614
|
+
} catch {
|
|
1609
1615
|
return defaultValue;
|
|
1610
1616
|
}
|
|
1611
|
-
}
|
|
1612
|
-
|
|
1617
|
+
}
|
|
1618
|
+
function safeParseFloat(str, defaultValue) {
|
|
1613
1619
|
try {
|
|
1614
|
-
|
|
1620
|
+
const value = parseFloat(str ?? "");
|
|
1621
|
+
return isNaN(value) ? defaultValue : value;
|
|
1615
1622
|
} catch {
|
|
1616
|
-
return defaultValue
|
|
1623
|
+
return defaultValue;
|
|
1617
1624
|
}
|
|
1618
|
-
}
|
|
1619
|
-
var safeParseJson = (
|
|
1620
|
-
if (
|
|
1625
|
+
}
|
|
1626
|
+
var safeParseJson = (str, defaultValue) => {
|
|
1627
|
+
if (str && str.length > 0) {
|
|
1621
1628
|
try {
|
|
1622
|
-
return JSON.parse(
|
|
1623
|
-
} catch
|
|
1629
|
+
return JSON.parse(str);
|
|
1630
|
+
} catch {
|
|
1624
1631
|
}
|
|
1625
1632
|
}
|
|
1626
1633
|
return defaultValue;
|
|
1627
1634
|
};
|
|
1628
1635
|
|
|
1636
|
+
// src/safe-stringify.ts
|
|
1637
|
+
var SKIP = Object.freeze({});
|
|
1638
|
+
function safeStringify(obj, filter = defaultFilter, indent = 2) {
|
|
1639
|
+
const seen = /* @__PURE__ */ new WeakMap();
|
|
1640
|
+
function replacer(key, value) {
|
|
1641
|
+
try {
|
|
1642
|
+
let path = key;
|
|
1643
|
+
if (!key) {
|
|
1644
|
+
path = "$";
|
|
1645
|
+
return value;
|
|
1646
|
+
} else if (this) {
|
|
1647
|
+
const parentPath = seen.get(this);
|
|
1648
|
+
path = parentPath ? `${parentPath}.${key}` : key;
|
|
1649
|
+
}
|
|
1650
|
+
if (value == null) {
|
|
1651
|
+
return value;
|
|
1652
|
+
}
|
|
1653
|
+
if (typeof value === "function") {
|
|
1654
|
+
return void 0;
|
|
1655
|
+
}
|
|
1656
|
+
if (typeof value === "object" && Object.getPrototypeOf(value) !== Object.prototype) {
|
|
1657
|
+
return void 0;
|
|
1658
|
+
}
|
|
1659
|
+
if (typeof value === "object" && value !== null) {
|
|
1660
|
+
const exists = seen.get(value);
|
|
1661
|
+
if (exists) {
|
|
1662
|
+
return `[${path} => ${exists}]`;
|
|
1663
|
+
}
|
|
1664
|
+
seen.set(value, path);
|
|
1665
|
+
}
|
|
1666
|
+
if (filter) {
|
|
1667
|
+
const filteredValue = filter?.(key, value);
|
|
1668
|
+
if (filteredValue !== void 0) {
|
|
1669
|
+
return filteredValue === SKIP ? void 0 : filteredValue;
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
return value;
|
|
1673
|
+
} catch (error) {
|
|
1674
|
+
return `ERROR: ${error.message}`;
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
return JSON.stringify(obj, replacer, indent);
|
|
1678
|
+
}
|
|
1679
|
+
var createReplacer = ({ omit: omit2, parse, maxDepth, maxArrayLen, maxStringLen } = {}) => {
|
|
1680
|
+
let currentDepth = 0;
|
|
1681
|
+
const depthMap = /* @__PURE__ */ new WeakMap();
|
|
1682
|
+
return function(key, value) {
|
|
1683
|
+
if (key === "") {
|
|
1684
|
+
currentDepth = 0;
|
|
1685
|
+
} else if (this && typeof this === "object") {
|
|
1686
|
+
const parentDepth = depthMap.get(this) ?? 0;
|
|
1687
|
+
currentDepth = parentDepth + 1;
|
|
1688
|
+
}
|
|
1689
|
+
if (typeof value === "function") {
|
|
1690
|
+
return SKIP;
|
|
1691
|
+
}
|
|
1692
|
+
if (value && typeof value === "object") {
|
|
1693
|
+
depthMap.set(value, currentDepth);
|
|
1694
|
+
if (maxDepth != null && currentDepth >= maxDepth) {
|
|
1695
|
+
return Array.isArray(value) ? `[{ length: ${value.length} }]` : `{ keys: ${Object.keys(value).length} }`;
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
if (omit2?.includes(key)) {
|
|
1699
|
+
return SKIP;
|
|
1700
|
+
}
|
|
1701
|
+
if (parse?.includes(key) && typeof value === "string") {
|
|
1702
|
+
try {
|
|
1703
|
+
return JSON.parse(value);
|
|
1704
|
+
} catch {
|
|
1705
|
+
return value;
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
if (maxArrayLen != null && Array.isArray(value) && value.length > maxArrayLen) {
|
|
1709
|
+
return `[length: ${value.length}]`;
|
|
1710
|
+
}
|
|
1711
|
+
if (maxStringLen != null && typeof value === "string" && value.length > maxStringLen) {
|
|
1712
|
+
return value.slice(0, maxStringLen) + "...";
|
|
1713
|
+
}
|
|
1714
|
+
return value;
|
|
1715
|
+
};
|
|
1716
|
+
};
|
|
1717
|
+
var defaultFilter = createReplacer();
|
|
1718
|
+
|
|
1629
1719
|
// src/sliding-window-summary.ts
|
|
1630
1720
|
import { invariant as invariant5 } from "@dxos/invariant";
|
|
1631
1721
|
var __dxlog_file5 = "/__w/dxos/dxos/packages/common/util/src/sliding-window-summary.ts";
|
|
1632
1722
|
var SlidingWindowSummary = class {
|
|
1723
|
+
_buffer;
|
|
1724
|
+
_sum = 0;
|
|
1725
|
+
_precision;
|
|
1633
1726
|
constructor(options) {
|
|
1634
|
-
this._sum = 0;
|
|
1635
1727
|
this._buffer = new CircularBuffer(options.dataPoints);
|
|
1636
1728
|
if (options.precision != null) {
|
|
1637
1729
|
invariant5(options.precision >= 0, void 0, {
|
|
@@ -1711,6 +1803,24 @@ var capitalize = (str) => {
|
|
|
1711
1803
|
}
|
|
1712
1804
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
1713
1805
|
};
|
|
1806
|
+
function trim(strings, ...values) {
|
|
1807
|
+
const raw = strings.reduce((out, str, i) => {
|
|
1808
|
+
out += str;
|
|
1809
|
+
if (i < values.length) {
|
|
1810
|
+
const match = str.match(/(^|\n)([ \t]*)$/);
|
|
1811
|
+
const baseIndent = match ? match[2] : "";
|
|
1812
|
+
const val = String(values[i]).replace(/\r?\n/g, "\n" + baseIndent);
|
|
1813
|
+
out += val;
|
|
1814
|
+
}
|
|
1815
|
+
return out;
|
|
1816
|
+
}, "");
|
|
1817
|
+
const lines = raw.split("\n");
|
|
1818
|
+
while (lines.length && !lines[0].trim()) lines.shift();
|
|
1819
|
+
while (lines.length && !lines[lines.length - 1].trim()) lines.pop();
|
|
1820
|
+
const minIndent = Math.min(...lines.filter((l) => l.trim()).map((l) => l.match(/^[ \t]*/)?.[0].length ?? 0));
|
|
1821
|
+
return lines.map((l) => l.slice(minIndent)).join("\n");
|
|
1822
|
+
}
|
|
1823
|
+
var kebabize = (str) => str.replace(/[A-Z]+(?![a-z])|[A-Z]/g, ($, ofs) => (ofs ? "-" : "") + $.toLowerCase());
|
|
1714
1824
|
|
|
1715
1825
|
// src/sum.ts
|
|
1716
1826
|
var sum = (values) => values.reduce((a, b) => a + b, 0);
|
|
@@ -1909,10 +2019,8 @@ var toFallback = (hash) => {
|
|
|
1909
2019
|
|
|
1910
2020
|
// src/tracer.ts
|
|
1911
2021
|
var Tracer = class {
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
this._recording = false;
|
|
1915
|
-
}
|
|
2022
|
+
_events = /* @__PURE__ */ new Map();
|
|
2023
|
+
_recording = false;
|
|
1916
2024
|
// TODO(burdon): Start/stop methods for recording data? By id?
|
|
1917
2025
|
// Alternatively, enable subscriptions to track/compute series.
|
|
1918
2026
|
// TODO(burdon): Hierarchical traces?
|
|
@@ -2013,7 +2121,7 @@ var stringifyTree = (node, ancestors = [], rows = []) => {
|
|
|
2013
2121
|
};
|
|
2014
2122
|
|
|
2015
2123
|
// src/types.ts
|
|
2016
|
-
var
|
|
2124
|
+
var isTruthy = (value) => !!value;
|
|
2017
2125
|
var isNonNullable = (value) => value != null;
|
|
2018
2126
|
var doAsync = async (fn) => fn();
|
|
2019
2127
|
var getProviderValue = (provider, arg) => {
|
|
@@ -2043,6 +2151,113 @@ var arrayMove = (array, from, to) => {
|
|
|
2043
2151
|
array.splice(to < 0 ? array.length + to : to, 0, array.splice(from, 1)[0]);
|
|
2044
2152
|
return array;
|
|
2045
2153
|
};
|
|
2154
|
+
function arraySwap(array, from, to) {
|
|
2155
|
+
const current = array[from];
|
|
2156
|
+
array[from] = array[to];
|
|
2157
|
+
array[to] = current;
|
|
2158
|
+
return array;
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
// src/unit.ts
|
|
2162
|
+
var createFormat = (unit) => {
|
|
2163
|
+
return (n, precision = unit.precision ?? 0) => {
|
|
2164
|
+
const value = n / unit.quotient;
|
|
2165
|
+
return {
|
|
2166
|
+
unit,
|
|
2167
|
+
value,
|
|
2168
|
+
formattedValue: value.toFixed(precision),
|
|
2169
|
+
toString: () => `${value.toFixed(precision)}${unit.symbol}`
|
|
2170
|
+
};
|
|
2171
|
+
};
|
|
2172
|
+
};
|
|
2173
|
+
var MS_SECONDS = 1e3;
|
|
2174
|
+
var MS_MINUTES = 60 * MS_SECONDS;
|
|
2175
|
+
var MS_HOURS = 60 * MS_MINUTES;
|
|
2176
|
+
var Unit = {
|
|
2177
|
+
// General.
|
|
2178
|
+
Percent: createFormat({
|
|
2179
|
+
symbol: "%",
|
|
2180
|
+
quotient: 1 / 100,
|
|
2181
|
+
precision: 2
|
|
2182
|
+
}),
|
|
2183
|
+
Thousand: createFormat({
|
|
2184
|
+
symbol: "k",
|
|
2185
|
+
quotient: 1e3,
|
|
2186
|
+
precision: 2
|
|
2187
|
+
}),
|
|
2188
|
+
// Bytes (note KB vs KiB).
|
|
2189
|
+
Gigabyte: createFormat({
|
|
2190
|
+
symbol: "GB",
|
|
2191
|
+
quotient: 1e3 * 1e3 * 1e3,
|
|
2192
|
+
precision: 2
|
|
2193
|
+
}),
|
|
2194
|
+
Megabyte: createFormat({
|
|
2195
|
+
symbol: "MB",
|
|
2196
|
+
quotient: 1e3 * 1e3,
|
|
2197
|
+
precision: 2
|
|
2198
|
+
}),
|
|
2199
|
+
Kilobyte: createFormat({
|
|
2200
|
+
symbol: "KB",
|
|
2201
|
+
quotient: 1e3,
|
|
2202
|
+
precision: 2
|
|
2203
|
+
}),
|
|
2204
|
+
Byte: createFormat({
|
|
2205
|
+
symbol: "B",
|
|
2206
|
+
quotient: 1
|
|
2207
|
+
}),
|
|
2208
|
+
// Time.
|
|
2209
|
+
Hour: createFormat({
|
|
2210
|
+
symbol: "h",
|
|
2211
|
+
quotient: MS_HOURS
|
|
2212
|
+
}),
|
|
2213
|
+
Minute: createFormat({
|
|
2214
|
+
symbol: "m",
|
|
2215
|
+
quotient: MS_MINUTES
|
|
2216
|
+
}),
|
|
2217
|
+
Second: createFormat({
|
|
2218
|
+
symbol: "s",
|
|
2219
|
+
quotient: MS_SECONDS,
|
|
2220
|
+
precision: 1
|
|
2221
|
+
}),
|
|
2222
|
+
Millisecond: createFormat({
|
|
2223
|
+
symbol: "ms",
|
|
2224
|
+
quotient: 1
|
|
2225
|
+
}),
|
|
2226
|
+
Duration: (n) => {
|
|
2227
|
+
const hours = Math.floor(n / MS_HOURS);
|
|
2228
|
+
const minutes = Math.floor(n % MS_HOURS / MS_MINUTES);
|
|
2229
|
+
if (hours) {
|
|
2230
|
+
const formattedValue = minutes ? `${hours}h ${minutes}m` : `${hours}h`;
|
|
2231
|
+
return {
|
|
2232
|
+
unit: {
|
|
2233
|
+
symbol: "h",
|
|
2234
|
+
quotient: MS_HOURS
|
|
2235
|
+
},
|
|
2236
|
+
value: hours,
|
|
2237
|
+
formattedValue,
|
|
2238
|
+
toString: () => formattedValue
|
|
2239
|
+
};
|
|
2240
|
+
}
|
|
2241
|
+
if (minutes) {
|
|
2242
|
+
const seconds2 = (n - MS_MINUTES * minutes) / MS_SECONDS;
|
|
2243
|
+
const formattedValue = seconds2 ? `${minutes}m ${seconds2}s` : `${minutes}m`;
|
|
2244
|
+
return {
|
|
2245
|
+
unit: {
|
|
2246
|
+
symbol: "m",
|
|
2247
|
+
quotient: MS_MINUTES
|
|
2248
|
+
},
|
|
2249
|
+
value: minutes,
|
|
2250
|
+
formattedValue,
|
|
2251
|
+
toString: () => formattedValue
|
|
2252
|
+
};
|
|
2253
|
+
}
|
|
2254
|
+
const seconds = n >= MS_SECONDS;
|
|
2255
|
+
if (seconds) {
|
|
2256
|
+
return Unit.Second(n);
|
|
2257
|
+
}
|
|
2258
|
+
return Unit.Millisecond(n);
|
|
2259
|
+
}
|
|
2260
|
+
};
|
|
2046
2261
|
|
|
2047
2262
|
// src/url.ts
|
|
2048
2263
|
var createUrl = (url, search) => {
|
|
@@ -2055,11 +2270,11 @@ var createUrl = (url, search) => {
|
|
|
2055
2270
|
|
|
2056
2271
|
// src/weak.ts
|
|
2057
2272
|
var WeakDictionary = class {
|
|
2273
|
+
_internal = /* @__PURE__ */ new Map();
|
|
2274
|
+
_finalization = new FinalizationRegistry((cleanUpCallback) => {
|
|
2275
|
+
cleanUpCallback();
|
|
2276
|
+
});
|
|
2058
2277
|
constructor(entries2) {
|
|
2059
|
-
this._internal = /* @__PURE__ */ new Map();
|
|
2060
|
-
this._finalization = new FinalizationRegistry((cleanUpCallback) => {
|
|
2061
|
-
cleanUpCallback();
|
|
2062
|
-
});
|
|
2063
2278
|
this._internal = new Map(entries2?.map(([key, value]) => [
|
|
2064
2279
|
key,
|
|
2065
2280
|
new WeakRef(value)
|
|
@@ -2147,6 +2362,58 @@ var WeakDictionary = class {
|
|
|
2147
2362
|
this._finalization.unregister(value);
|
|
2148
2363
|
}
|
|
2149
2364
|
};
|
|
2365
|
+
|
|
2366
|
+
// src/error-format.ts
|
|
2367
|
+
var formatErrorWithCauses = (error) => {
|
|
2368
|
+
const lines = [];
|
|
2369
|
+
let current = error;
|
|
2370
|
+
let level = 0;
|
|
2371
|
+
while (current) {
|
|
2372
|
+
const prefix = level === 0 ? "" : `Caused by: `;
|
|
2373
|
+
lines.push(prefix + (current.stack ?? String(current)));
|
|
2374
|
+
if (!(current.cause instanceof Error)) break;
|
|
2375
|
+
current = current.cause;
|
|
2376
|
+
level += 1;
|
|
2377
|
+
}
|
|
2378
|
+
return lines.join("\n\n");
|
|
2379
|
+
};
|
|
2380
|
+
|
|
2381
|
+
// src/retry.ts
|
|
2382
|
+
var DEFAULT_RETRY_OPTIONS = {
|
|
2383
|
+
count: 3,
|
|
2384
|
+
delayMs: 100,
|
|
2385
|
+
exponent: 2,
|
|
2386
|
+
retryOnError: async () => true,
|
|
2387
|
+
retryOnValue: async () => false
|
|
2388
|
+
};
|
|
2389
|
+
var retry = async (options, cb) => {
|
|
2390
|
+
const fullOptions = {
|
|
2391
|
+
...DEFAULT_RETRY_OPTIONS,
|
|
2392
|
+
...options
|
|
2393
|
+
};
|
|
2394
|
+
let numRetries = 0, currentDelay = fullOptions.delayMs;
|
|
2395
|
+
while (true) {
|
|
2396
|
+
let result;
|
|
2397
|
+
try {
|
|
2398
|
+
result = await cb();
|
|
2399
|
+
} catch (err) {
|
|
2400
|
+
if (numRetries > fullOptions.count || !await fullOptions.retryOnError(err)) {
|
|
2401
|
+
throw err;
|
|
2402
|
+
}
|
|
2403
|
+
await new Promise((resolve) => setTimeout(resolve, currentDelay));
|
|
2404
|
+
currentDelay *= fullOptions.exponent;
|
|
2405
|
+
numRetries++;
|
|
2406
|
+
continue;
|
|
2407
|
+
}
|
|
2408
|
+
if (!await fullOptions.retryOnValue(result)) {
|
|
2409
|
+
return result;
|
|
2410
|
+
}
|
|
2411
|
+
await new Promise((resolve) => setTimeout(resolve, currentDelay));
|
|
2412
|
+
currentDelay *= fullOptions.exponent;
|
|
2413
|
+
numRetries++;
|
|
2414
|
+
continue;
|
|
2415
|
+
}
|
|
2416
|
+
};
|
|
2150
2417
|
export {
|
|
2151
2418
|
BitField,
|
|
2152
2419
|
Callback,
|
|
@@ -2156,11 +2423,14 @@ export {
|
|
|
2156
2423
|
ComplexSet,
|
|
2157
2424
|
HumanHasher,
|
|
2158
2425
|
MapEntry,
|
|
2426
|
+
SKIP,
|
|
2159
2427
|
SlidingWindowSummary,
|
|
2160
2428
|
Tracer,
|
|
2429
|
+
Unit,
|
|
2161
2430
|
WeakDictionary,
|
|
2162
2431
|
accessBy,
|
|
2163
2432
|
arrayMove,
|
|
2433
|
+
arraySwap,
|
|
2164
2434
|
arrayToBuffer,
|
|
2165
2435
|
arrayToHex,
|
|
2166
2436
|
arrayToString,
|
|
@@ -2172,18 +2442,22 @@ export {
|
|
|
2172
2442
|
chunkArray,
|
|
2173
2443
|
clamp,
|
|
2174
2444
|
clearUndefined,
|
|
2445
|
+
coerceArray,
|
|
2175
2446
|
compareMulti,
|
|
2176
2447
|
compareObject,
|
|
2177
2448
|
compareScalar,
|
|
2178
2449
|
compareString,
|
|
2179
2450
|
createBinder,
|
|
2180
2451
|
createBucketReducer,
|
|
2452
|
+
createFilename,
|
|
2181
2453
|
createGroupReducer,
|
|
2454
|
+
createReplacer,
|
|
2182
2455
|
createSetDispatch,
|
|
2183
2456
|
createUrl,
|
|
2184
2457
|
decamelize,
|
|
2185
2458
|
deepMapValues,
|
|
2186
2459
|
deepMapValuesAsync,
|
|
2460
|
+
defaultFilter,
|
|
2187
2461
|
defaultMap,
|
|
2188
2462
|
defer,
|
|
2189
2463
|
deferAsync,
|
|
@@ -2195,12 +2469,12 @@ export {
|
|
|
2195
2469
|
entry,
|
|
2196
2470
|
exponentialBackoffInterval,
|
|
2197
2471
|
forEachAsync,
|
|
2472
|
+
formatErrorWithCauses,
|
|
2198
2473
|
get,
|
|
2199
2474
|
getAsyncProviderValue,
|
|
2200
2475
|
getDate,
|
|
2201
2476
|
getDebugName,
|
|
2202
2477
|
getDeep,
|
|
2203
|
-
getFirstTwoRenderableChars,
|
|
2204
2478
|
getHostPlatform,
|
|
2205
2479
|
getPrototypeSpecificInstanceId,
|
|
2206
2480
|
getProviderValue,
|
|
@@ -2216,14 +2490,19 @@ export {
|
|
|
2216
2490
|
intersectBy,
|
|
2217
2491
|
intersection,
|
|
2218
2492
|
iosCheck,
|
|
2493
|
+
isBun,
|
|
2494
|
+
isMobile,
|
|
2495
|
+
isMobileOrTablet,
|
|
2219
2496
|
isNode,
|
|
2220
2497
|
isNonNullable,
|
|
2221
|
-
|
|
2498
|
+
isTauri,
|
|
2499
|
+
isTruthy,
|
|
2222
2500
|
joinTables,
|
|
2223
2501
|
jsonKeyReplacer,
|
|
2224
2502
|
jsonReplacer,
|
|
2225
2503
|
jsonify,
|
|
2226
2504
|
jsonlogify,
|
|
2505
|
+
kebabize,
|
|
2227
2506
|
keyToEmoji,
|
|
2228
2507
|
keyToFallback,
|
|
2229
2508
|
keyToHue,
|
|
@@ -2232,7 +2511,6 @@ export {
|
|
|
2232
2511
|
makeSet,
|
|
2233
2512
|
mapValues,
|
|
2234
2513
|
median,
|
|
2235
|
-
mobileAndTabletCheck,
|
|
2236
2514
|
numericalValues,
|
|
2237
2515
|
omit,
|
|
2238
2516
|
orderKeys,
|
|
@@ -2248,12 +2526,14 @@ export {
|
|
|
2248
2526
|
removeBy,
|
|
2249
2527
|
removeProperties,
|
|
2250
2528
|
removeUndefinedProperties,
|
|
2529
|
+
retry,
|
|
2251
2530
|
safariCheck,
|
|
2252
2531
|
safeAwaitAll,
|
|
2253
2532
|
safeInstanceof,
|
|
2254
2533
|
safeParseFloat,
|
|
2255
2534
|
safeParseInt,
|
|
2256
2535
|
safeParseJson,
|
|
2536
|
+
safeStringify,
|
|
2257
2537
|
set,
|
|
2258
2538
|
setDeep,
|
|
2259
2539
|
sortKeys,
|
|
@@ -2266,6 +2546,7 @@ export {
|
|
|
2266
2546
|
toFallback,
|
|
2267
2547
|
toHue,
|
|
2268
2548
|
tracer,
|
|
2549
|
+
trim,
|
|
2269
2550
|
visitValues
|
|
2270
2551
|
};
|
|
2271
2552
|
//# sourceMappingURL=index.mjs.map
|