@dxos/util 0.8.4-main.7ace549 → 0.8.4-main.937b3ca

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.
Files changed (41) hide show
  1. package/dist/lib/browser/index.mjs +126 -33
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node-esm/index.mjs +126 -33
  5. package/dist/lib/node-esm/index.mjs.map +4 -4
  6. package/dist/lib/node-esm/meta.json +1 -1
  7. package/dist/types/src/array.d.ts +2 -1
  8. package/dist/types/src/array.d.ts.map +1 -1
  9. package/dist/types/src/deep.d.ts.map +1 -1
  10. package/dist/types/src/defer.d.ts +1 -1
  11. package/dist/types/src/defer.d.ts.map +1 -1
  12. package/dist/types/src/filename.d.ts +9 -0
  13. package/dist/types/src/filename.d.ts.map +1 -0
  14. package/dist/types/src/index.d.ts +2 -0
  15. package/dist/types/src/index.d.ts.map +1 -1
  16. package/dist/types/src/platform.d.ts +4 -1
  17. package/dist/types/src/platform.d.ts.map +1 -1
  18. package/dist/types/src/retry.d.ts +32 -0
  19. package/dist/types/src/retry.d.ts.map +1 -0
  20. package/dist/types/src/safe-parse.d.ts +6 -4
  21. package/dist/types/src/safe-parse.d.ts.map +1 -1
  22. package/dist/types/src/safe-stringify.d.ts +9 -0
  23. package/dist/types/src/safe-stringify.d.ts.map +1 -1
  24. package/dist/types/src/types.d.ts +18 -4
  25. package/dist/types/src/types.d.ts.map +1 -1
  26. package/dist/types/tsconfig.tsbuildinfo +1 -1
  27. package/package.json +11 -6
  28. package/src/array.ts +8 -1
  29. package/src/deep.ts +2 -0
  30. package/src/defer.ts +1 -1
  31. package/src/filename.ts +16 -0
  32. package/src/index.ts +2 -0
  33. package/src/platform.ts +11 -1
  34. package/src/retry.ts +74 -0
  35. package/src/safe-parse.ts +19 -16
  36. package/src/safe-stringify.ts +65 -23
  37. package/src/types.test.ts +11 -1
  38. package/src/types.ts +29 -9
  39. package/dist/types/src/explicit-resource-management-polyfill.d.ts +0 -1
  40. package/dist/types/src/explicit-resource-management-polyfill.d.ts.map +0 -1
  41. package/src/explicit-resource-management-polyfill.ts +0 -13
@@ -1 +1 @@
1
- {"inputs":{"src/array-to-hex.ts":{"bytes":2461,"imports":[],"format":"esm"},"src/array.ts":{"bytes":11369,"imports":[],"format":"esm"},"src/assume.ts":{"bytes":1335,"imports":[],"format":"esm"},"src/binder.ts":{"bytes":1302,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true}],"format":"esm"},"src/bitfield.ts":{"bytes":8453,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/callback-collection.ts":{"bytes":3170,"imports":[],"format":"esm"},"src/callback.ts":{"bytes":5204,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/case.ts":{"bytes":4574,"imports":[],"format":"esm"},"src/chunk-array.ts":{"bytes":1195,"imports":[],"format":"esm"},"src/circular-buffer.ts":{"bytes":6257,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/clear-undefined.ts":{"bytes":1554,"imports":[],"format":"esm"},"src/complex.ts":{"bytes":21712,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/deep.ts":{"bytes":3983,"imports":[{"path":"lodash.get","kind":"import-statement","external":true},{"path":"lodash.set","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/defer-function.ts":{"bytes":1558,"imports":[],"format":"esm"},"src/explicit-resource-management-polyfill.ts":{"bytes":1429,"imports":[],"format":"esm"},"src/defer.ts":{"bytes":3674,"imports":[{"path":"src/explicit-resource-management-polyfill.ts","kind":"import-statement","original":"./explicit-resource-management-polyfill"}],"format":"esm"},"src/entry.ts":{"bytes":3002,"imports":[],"format":"esm"},"src/for-each-async.ts":{"bytes":785,"imports":[],"format":"esm"},"src/human-hash.ts":{"bytes":19761,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true}],"format":"esm"},"src/map.ts":{"bytes":1489,"imports":[],"format":"esm"},"src/instance-id.ts":{"bytes":4222,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/interval.ts":{"bytes":1819,"imports":[],"format":"esm"},"src/join-tables.ts":{"bytes":3063,"imports":[],"format":"esm"},"src/uint8array.ts":{"bytes":3745,"imports":[],"format":"esm"},"src/json.ts":{"bytes":13272,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"src/human-hash.ts","kind":"import-statement","original":"./human-hash"},{"path":"src/uint8array.ts","kind":"import-statement","original":"./uint8array"}],"format":"esm"},"src/map-values.ts":{"bytes":12881,"imports":[],"format":"esm"},"src/no-infer.ts":{"bytes":474,"imports":[],"format":"esm"},"src/object.ts":{"bytes":1070,"imports":[],"format":"esm"},"src/order-keys.ts":{"bytes":1598,"imports":[],"format":"esm"},"src/order.ts":{"bytes":4971,"imports":[],"format":"esm"},"src/pick.ts":{"bytes":3648,"imports":[],"format":"esm"},"src/platform.ts":{"bytes":11239,"imports":[],"format":"esm"},"src/position.ts":{"bytes":2499,"imports":[],"format":"esm"},"src/random.ts":{"bytes":1303,"imports":[],"format":"esm"},"src/range.ts":{"bytes":2611,"imports":[],"format":"esm"},"src/reducers.ts":{"bytes":12812,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/remove-undefined-keys.ts":{"bytes":4560,"imports":[],"format":"esm"},"src/safe-await.ts":{"bytes":2843,"imports":[],"format":"esm"},"src/safe-instanceof.ts":{"bytes":2680,"imports":[],"format":"esm"},"src/safe-parse.ts":{"bytes":2830,"imports":[],"format":"esm"},"src/safe-stringify.ts":{"bytes":8935,"imports":[],"format":"esm"},"src/sliding-window-summary.ts":{"bytes":7509,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/circular-buffer.ts","kind":"import-statement","original":"./circular-buffer"}],"format":"esm"},"src/sort.ts":{"bytes":3931,"imports":[],"format":"esm"},"src/string.ts":{"bytes":5646,"imports":[],"format":"esm"},"src/sum.ts":{"bytes":675,"imports":[],"format":"esm"},"src/throw-unhandled-error.ts":{"bytes":1163,"imports":[],"format":"esm"},"src/to-fallback.ts":{"bytes":14062,"imports":[],"format":"esm"},"src/tracer.ts":{"bytes":7225,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/tree.ts":{"bytes":6250,"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":8892,"imports":[],"format":"esm"},"src/unit.ts":{"bytes":8810,"imports":[],"format":"esm"},"src/url.ts":{"bytes":1627,"imports":[],"format":"esm"},"src/weak.ts":{"bytes":9591,"imports":[],"format":"esm"},"src/error-format.ts":{"bytes":2111,"imports":[],"format":"esm"},"src/index.ts":{"bytes":5171,"imports":[{"path":"src/array-to-hex.ts","kind":"import-statement","original":"./array-to-hex"},{"path":"src/array.ts","kind":"import-statement","original":"./array"},{"path":"src/assume.ts","kind":"import-statement","original":"./assume"},{"path":"src/binder.ts","kind":"import-statement","original":"./binder"},{"path":"src/bitfield.ts","kind":"import-statement","original":"./bitfield"},{"path":"src/callback-collection.ts","kind":"import-statement","original":"./callback-collection"},{"path":"src/callback.ts","kind":"import-statement","original":"./callback"},{"path":"src/case.ts","kind":"import-statement","original":"./case"},{"path":"src/chunk-array.ts","kind":"import-statement","original":"./chunk-array"},{"path":"src/circular-buffer.ts","kind":"import-statement","original":"./circular-buffer"},{"path":"src/clear-undefined.ts","kind":"import-statement","original":"./clear-undefined"},{"path":"src/complex.ts","kind":"import-statement","original":"./complex"},{"path":"src/deep.ts","kind":"import-statement","original":"./deep"},{"path":"src/defer-function.ts","kind":"import-statement","original":"./defer-function"},{"path":"src/defer.ts","kind":"import-statement","original":"./defer"},{"path":"src/entry.ts","kind":"import-statement","original":"./entry"},{"path":"src/for-each-async.ts","kind":"import-statement","original":"./for-each-async"},{"path":"src/human-hash.ts","kind":"import-statement","original":"./human-hash"},{"path":"src/instance-id.ts","kind":"import-statement","original":"./instance-id"},{"path":"src/interval.ts","kind":"import-statement","original":"./interval"},{"path":"src/join-tables.ts","kind":"import-statement","original":"./join-tables"},{"path":"src/json.ts","kind":"import-statement","original":"./json"},{"path":"src/map-values.ts","kind":"import-statement","original":"./map-values"},{"path":"src/map.ts","kind":"import-statement","original":"./map"},{"path":"src/no-infer.ts","kind":"import-statement","original":"./no-infer"},{"path":"src/object.ts","kind":"import-statement","original":"./object"},{"path":"src/order-keys.ts","kind":"import-statement","original":"./order-keys"},{"path":"src/order.ts","kind":"import-statement","original":"./order"},{"path":"src/pick.ts","kind":"import-statement","original":"./pick"},{"path":"src/platform.ts","kind":"import-statement","original":"./platform"},{"path":"src/position.ts","kind":"import-statement","original":"./position"},{"path":"src/random.ts","kind":"import-statement","original":"./random"},{"path":"src/range.ts","kind":"import-statement","original":"./range"},{"path":"src/reducers.ts","kind":"import-statement","original":"./reducers"},{"path":"src/remove-undefined-keys.ts","kind":"import-statement","original":"./remove-undefined-keys"},{"path":"src/safe-await.ts","kind":"import-statement","original":"./safe-await"},{"path":"src/safe-instanceof.ts","kind":"import-statement","original":"./safe-instanceof"},{"path":"src/safe-parse.ts","kind":"import-statement","original":"./safe-parse"},{"path":"src/safe-stringify.ts","kind":"import-statement","original":"./safe-stringify"},{"path":"src/sliding-window-summary.ts","kind":"import-statement","original":"./sliding-window-summary"},{"path":"src/sort.ts","kind":"import-statement","original":"./sort"},{"path":"src/string.ts","kind":"import-statement","original":"./string"},{"path":"src/sum.ts","kind":"import-statement","original":"./sum"},{"path":"src/throw-unhandled-error.ts","kind":"import-statement","original":"./throw-unhandled-error"},{"path":"src/to-fallback.ts","kind":"import-statement","original":"./to-fallback"},{"path":"src/tracer.ts","kind":"import-statement","original":"./tracer"},{"path":"src/tree.ts","kind":"import-statement","original":"./tree"},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"src/uint8array.ts","kind":"import-statement","original":"./uint8array"},{"path":"src/unit.ts","kind":"import-statement","original":"./unit"},{"path":"src/url.ts","kind":"import-statement","original":"./url"},{"path":"src/weak.ts","kind":"import-statement","original":"./weak"},{"path":"src/error-format.ts","kind":"import-statement","original":"./error-format"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":140295},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"lodash.get","kind":"import-statement","external":true},{"path":"lodash.set","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["BitField","Callback","CallbackCollection","CircularBuffer","ComplexMap","ComplexSet","HumanHasher","MapEntry","SKIP","SlidingWindowSummary","Tracer","Unit","WeakDictionary","accessBy","arrayMove","arrayToBuffer","arrayToHex","arrayToString","arraysEqual","assumeType","bufferToArray","byPosition","capitalize","chunkArray","clamp","clearUndefined","compareMulti","compareObject","compareScalar","compareString","createBinder","createBucketReducer","createGroupReducer","createReplacer","createSetDispatch","createUrl","decamelize","deepMapValues","deepMapValuesAsync","defaultFilter","defaultMap","defer","deferAsync","deferFunction","diff","distinctBy","doAsync","entries","entry","exponentialBackoffInterval","forEachAsync","formatErrorWithCauses","get","getAsyncProviderValue","getDate","getDebugName","getDeep","getHostPlatform","getPrototypeSpecificInstanceId","getProviderValue","hexToEmoji","hexToFallback","hexToHue","humanize","hyphenize","idEmoji","idHue","inferObjectOrder","inferRecordOrder","intersectBy","intersection","iosCheck","isNode","isNonNullable","isTruthy","joinTables","jsonKeyReplacer","jsonReplacer","jsonify","jsonlogify","kebabize","keyToEmoji","keyToFallback","keyToHue","keys","makeMap","makeSet","mapValues","median","mobileAndTabletCheck","numericalValues","omit","orderKeys","partition","pick","pickBy","randomInt","range","rangeFromTo","reduceGroupBy","reduceSeries","reduceSet","removeBy","removeProperties","removeUndefinedProperties","safariCheck","safeAwaitAll","safeInstanceof","safeParseFloat","safeParseInt","safeParseJson","safeStringify","set","setDeep","sortKeys","stringToArray","stringifyTree","stripUndefined","sum","throwUnhandledError","toEmoji","toFallback","toHue","tracer","trim","visitValues"],"entryPoint":"src/index.ts","inputs":{"src/array-to-hex.ts":{"bytesInOutput":341},"src/index.ts":{"bytesInOutput":0},"src/array.ts":{"bytesInOutput":1805},"src/assume.ts":{"bytesInOutput":31},"src/binder.ts":{"bytesInOutput":153},"src/bitfield.ts":{"bytesInOutput":1881},"src/callback-collection.ts":{"bytesInOutput":558},"src/callback.ts":{"bytesInOutput":1113},"src/case.ts":{"bytesInOutput":940},"src/chunk-array.ts":{"bytesInOutput":173},"src/circular-buffer.ts":{"bytesInOutput":1523},"src/clear-undefined.ts":{"bytesInOutput":223},"src/complex.ts":{"bytesInOutput":4440},"src/deep.ts":{"bytesInOutput":773},"src/defer-function.ts":{"bytesInOutput":72},"src/defer.ts":{"bytesInOutput":560},"src/entry.ts":{"bytesInOutput":487},"src/for-each-async.ts":{"bytesInOutput":62},"src/human-hash.ts":{"bytesInOutput":5674},"src/map.ts":{"bytesInOutput":193},"src/instance-id.ts":{"bytesInOutput":784},"src/interval.ts":{"bytesInOutput":290},"src/join-tables.ts":{"bytesInOutput":493},"src/json.ts":{"bytesInOutput":2958},"src/uint8array.ts":{"bytesInOutput":562},"src/map-values.ts":{"bytesInOutput":2490},"src/object.ts":{"bytesInOutput":82},"src/order-keys.ts":{"bytesInOutput":266},"src/order.ts":{"bytesInOutput":676},"src/pick.ts":{"bytesInOutput":482},"src/platform.ts":{"bytesInOutput":3211},"src/position.ts":{"bytesInOutput":271},"src/random.ts":{"bytesInOutput":148},"src/range.ts":{"bytesInOutput":371},"src/reducers.ts":{"bytesInOutput":2326},"src/remove-undefined-keys.ts":{"bytesInOutput":935},"src/safe-await.ts":{"bytesInOutput":345},"src/safe-instanceof.ts":{"bytesInOutput":371},"src/safe-parse.ts":{"bytesInOutput":476},"src/safe-stringify.ts":{"bytesInOutput":1944},"src/sliding-window-summary.ts":{"bytesInOutput":1807},"src/sort.ts":{"bytesInOutput":643},"src/string.ts":{"bytesInOutput":925},"src/sum.ts":{"bytesInOutput":57},"src/throw-unhandled-error.ts":{"bytesInOutput":90},"src/to-fallback.ts":{"bytesInOutput":4324},"src/tracer.ts":{"bytesInOutput":1390},"src/tree.ts":{"bytesInOutput":1193},"src/types.ts":{"bytesInOutput":907},"src/unit.ts":{"bytesInOutput":2168},"src/url.ts":{"bytesInOutput":246},"src/weak.ts":{"bytesInOutput":2054},"src/error-format.ts":{"bytesInOutput":366}},"bytes":59705}}}
1
+ {"inputs":{"src/array-to-hex.ts":{"bytes":2461,"imports":[],"format":"esm"},"src/array.ts":{"bytes":11972,"imports":[],"format":"esm"},"src/assume.ts":{"bytes":1335,"imports":[],"format":"esm"},"src/binder.ts":{"bytes":1302,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true}],"format":"esm"},"src/bitfield.ts":{"bytes":8453,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/callback-collection.ts":{"bytes":3170,"imports":[],"format":"esm"},"src/callback.ts":{"bytes":5204,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/case.ts":{"bytes":4574,"imports":[],"format":"esm"},"src/chunk-array.ts":{"bytes":1195,"imports":[],"format":"esm"},"src/circular-buffer.ts":{"bytes":6257,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/clear-undefined.ts":{"bytes":1554,"imports":[],"format":"esm"},"src/complex.ts":{"bytes":21712,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/deep.ts":{"bytes":4375,"imports":[{"path":"lodash.get","kind":"import-statement","external":true},{"path":"lodash.set","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/defer-function.ts":{"bytes":1558,"imports":[],"format":"esm"},"src/defer.ts":{"bytes":3655,"imports":[{"path":"@hazae41/symbol-dispose-polyfill","kind":"import-statement","external":true}],"format":"esm"},"src/entry.ts":{"bytes":3002,"imports":[],"format":"esm"},"src/filename.ts":{"bytes":1347,"imports":[],"format":"esm"},"src/for-each-async.ts":{"bytes":785,"imports":[],"format":"esm"},"src/human-hash.ts":{"bytes":19761,"imports":[{"path":"@dxos/keys","kind":"import-statement","external":true}],"format":"esm"},"src/map.ts":{"bytes":1489,"imports":[],"format":"esm"},"src/instance-id.ts":{"bytes":4222,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/interval.ts":{"bytes":1819,"imports":[],"format":"esm"},"src/join-tables.ts":{"bytes":3063,"imports":[],"format":"esm"},"src/uint8array.ts":{"bytes":3745,"imports":[],"format":"esm"},"src/json.ts":{"bytes":13272,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"src/human-hash.ts","kind":"import-statement","original":"./human-hash"},{"path":"src/uint8array.ts","kind":"import-statement","original":"./uint8array"}],"format":"esm"},"src/map-values.ts":{"bytes":12881,"imports":[],"format":"esm"},"src/no-infer.ts":{"bytes":474,"imports":[],"format":"esm"},"src/object.ts":{"bytes":1070,"imports":[],"format":"esm"},"src/order-keys.ts":{"bytes":1598,"imports":[],"format":"esm"},"src/order.ts":{"bytes":4971,"imports":[],"format":"esm"},"src/pick.ts":{"bytes":3648,"imports":[],"format":"esm"},"src/platform.ts":{"bytes":17195,"imports":[],"format":"esm"},"src/position.ts":{"bytes":2499,"imports":[],"format":"esm"},"src/random.ts":{"bytes":1303,"imports":[],"format":"esm"},"src/range.ts":{"bytes":2611,"imports":[],"format":"esm"},"src/reducers.ts":{"bytes":12812,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/remove-undefined-keys.ts":{"bytes":4560,"imports":[],"format":"esm"},"src/safe-await.ts":{"bytes":2843,"imports":[],"format":"esm"},"src/safe-instanceof.ts":{"bytes":2680,"imports":[],"format":"esm"},"src/safe-parse.ts":{"bytes":3395,"imports":[],"format":"esm"},"src/safe-stringify.ts":{"bytes":12563,"imports":[],"format":"esm"},"src/sliding-window-summary.ts":{"bytes":7509,"imports":[{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/circular-buffer.ts","kind":"import-statement","original":"./circular-buffer"}],"format":"esm"},"src/sort.ts":{"bytes":3931,"imports":[],"format":"esm"},"src/string.ts":{"bytes":5646,"imports":[],"format":"esm"},"src/sum.ts":{"bytes":675,"imports":[],"format":"esm"},"src/throw-unhandled-error.ts":{"bytes":1163,"imports":[],"format":"esm"},"src/to-fallback.ts":{"bytes":14062,"imports":[],"format":"esm"},"src/tracer.ts":{"bytes":7225,"imports":[{"path":"src/map.ts","kind":"import-statement","original":"./map"}],"format":"esm"},"src/tree.ts":{"bytes":6250,"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":10382,"imports":[],"format":"esm"},"src/unit.ts":{"bytes":8810,"imports":[],"format":"esm"},"src/url.ts":{"bytes":1627,"imports":[],"format":"esm"},"src/weak.ts":{"bytes":9591,"imports":[],"format":"esm"},"src/error-format.ts":{"bytes":2111,"imports":[],"format":"esm"},"src/retry.ts":{"bytes":4961,"imports":[],"format":"esm"},"src/index.ts":{"bytes":5340,"imports":[{"path":"src/array-to-hex.ts","kind":"import-statement","original":"./array-to-hex"},{"path":"src/array.ts","kind":"import-statement","original":"./array"},{"path":"src/assume.ts","kind":"import-statement","original":"./assume"},{"path":"src/binder.ts","kind":"import-statement","original":"./binder"},{"path":"src/bitfield.ts","kind":"import-statement","original":"./bitfield"},{"path":"src/callback-collection.ts","kind":"import-statement","original":"./callback-collection"},{"path":"src/callback.ts","kind":"import-statement","original":"./callback"},{"path":"src/case.ts","kind":"import-statement","original":"./case"},{"path":"src/chunk-array.ts","kind":"import-statement","original":"./chunk-array"},{"path":"src/circular-buffer.ts","kind":"import-statement","original":"./circular-buffer"},{"path":"src/clear-undefined.ts","kind":"import-statement","original":"./clear-undefined"},{"path":"src/complex.ts","kind":"import-statement","original":"./complex"},{"path":"src/deep.ts","kind":"import-statement","original":"./deep"},{"path":"src/defer-function.ts","kind":"import-statement","original":"./defer-function"},{"path":"src/defer.ts","kind":"import-statement","original":"./defer"},{"path":"src/entry.ts","kind":"import-statement","original":"./entry"},{"path":"src/filename.ts","kind":"import-statement","original":"./filename"},{"path":"src/for-each-async.ts","kind":"import-statement","original":"./for-each-async"},{"path":"src/human-hash.ts","kind":"import-statement","original":"./human-hash"},{"path":"src/instance-id.ts","kind":"import-statement","original":"./instance-id"},{"path":"src/interval.ts","kind":"import-statement","original":"./interval"},{"path":"src/join-tables.ts","kind":"import-statement","original":"./join-tables"},{"path":"src/json.ts","kind":"import-statement","original":"./json"},{"path":"src/map-values.ts","kind":"import-statement","original":"./map-values"},{"path":"src/map.ts","kind":"import-statement","original":"./map"},{"path":"src/no-infer.ts","kind":"import-statement","original":"./no-infer"},{"path":"src/object.ts","kind":"import-statement","original":"./object"},{"path":"src/order-keys.ts","kind":"import-statement","original":"./order-keys"},{"path":"src/order.ts","kind":"import-statement","original":"./order"},{"path":"src/pick.ts","kind":"import-statement","original":"./pick"},{"path":"src/platform.ts","kind":"import-statement","original":"./platform"},{"path":"src/position.ts","kind":"import-statement","original":"./position"},{"path":"src/random.ts","kind":"import-statement","original":"./random"},{"path":"src/range.ts","kind":"import-statement","original":"./range"},{"path":"src/reducers.ts","kind":"import-statement","original":"./reducers"},{"path":"src/remove-undefined-keys.ts","kind":"import-statement","original":"./remove-undefined-keys"},{"path":"src/safe-await.ts","kind":"import-statement","original":"./safe-await"},{"path":"src/safe-instanceof.ts","kind":"import-statement","original":"./safe-instanceof"},{"path":"src/safe-parse.ts","kind":"import-statement","original":"./safe-parse"},{"path":"src/safe-stringify.ts","kind":"import-statement","original":"./safe-stringify"},{"path":"src/sliding-window-summary.ts","kind":"import-statement","original":"./sliding-window-summary"},{"path":"src/sort.ts","kind":"import-statement","original":"./sort"},{"path":"src/string.ts","kind":"import-statement","original":"./string"},{"path":"src/sum.ts","kind":"import-statement","original":"./sum"},{"path":"src/throw-unhandled-error.ts","kind":"import-statement","original":"./throw-unhandled-error"},{"path":"src/to-fallback.ts","kind":"import-statement","original":"./to-fallback"},{"path":"src/tracer.ts","kind":"import-statement","original":"./tracer"},{"path":"src/tree.ts","kind":"import-statement","original":"./tree"},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"src/uint8array.ts","kind":"import-statement","original":"./uint8array"},{"path":"src/unit.ts","kind":"import-statement","original":"./unit"},{"path":"src/url.ts","kind":"import-statement","original":"./url"},{"path":"src/weak.ts","kind":"import-statement","original":"./weak"},{"path":"src/error-format.ts","kind":"import-statement","original":"./error-format"},{"path":"src/retry.ts","kind":"import-statement","original":"./retry"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":149645},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"lodash.get","kind":"import-statement","external":true},{"path":"lodash.set","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@hazae41/symbol-dispose-polyfill","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["BitField","Callback","CallbackCollection","CircularBuffer","ComplexMap","ComplexSet","HumanHasher","MapEntry","SKIP","SlidingWindowSummary","Tracer","Unit","WeakDictionary","accessBy","arrayMove","arraySwap","arrayToBuffer","arrayToHex","arrayToString","arraysEqual","assumeType","bufferToArray","byPosition","capitalize","chunkArray","clamp","clearUndefined","coerceArray","compareMulti","compareObject","compareScalar","compareString","createBinder","createBucketReducer","createFilename","createGroupReducer","createReplacer","createSetDispatch","createUrl","decamelize","deepMapValues","deepMapValuesAsync","defaultFilter","defaultMap","defer","deferAsync","deferFunction","diff","distinctBy","doAsync","entries","entry","exponentialBackoffInterval","forEachAsync","formatErrorWithCauses","get","getAsyncProviderValue","getDate","getDebugName","getDeep","getHostPlatform","getPrototypeSpecificInstanceId","getProviderValue","hexToEmoji","hexToFallback","hexToHue","humanize","hyphenize","idEmoji","idHue","inferObjectOrder","inferRecordOrder","intersectBy","intersection","iosCheck","isBun","isMobile","isMobileOrTablet","isNode","isNonNullable","isTauri","isTruthy","joinTables","jsonKeyReplacer","jsonReplacer","jsonify","jsonlogify","kebabize","keyToEmoji","keyToFallback","keyToHue","keys","makeMap","makeSet","mapValues","median","numericalValues","omit","orderKeys","partition","pick","pickBy","randomInt","range","rangeFromTo","reduceGroupBy","reduceSeries","reduceSet","removeBy","removeProperties","removeUndefinedProperties","retry","safariCheck","safeAwaitAll","safeInstanceof","safeParseFloat","safeParseInt","safeParseJson","safeStringify","set","setDeep","sortKeys","stringToArray","stringifyTree","stripUndefined","sum","throwUnhandledError","toEmoji","toFallback","toHue","tracer","trim","visitValues"],"entryPoint":"src/index.ts","inputs":{"src/array-to-hex.ts":{"bytesInOutput":341},"src/index.ts":{"bytesInOutput":0},"src/array.ts":{"bytesInOutput":1931},"src/assume.ts":{"bytesInOutput":31},"src/binder.ts":{"bytesInOutput":153},"src/bitfield.ts":{"bytesInOutput":1881},"src/callback-collection.ts":{"bytesInOutput":558},"src/callback.ts":{"bytesInOutput":1113},"src/case.ts":{"bytesInOutput":940},"src/chunk-array.ts":{"bytesInOutput":173},"src/circular-buffer.ts":{"bytesInOutput":1523},"src/clear-undefined.ts":{"bytesInOutput":223},"src/complex.ts":{"bytesInOutput":4440},"src/deep.ts":{"bytesInOutput":773},"src/defer-function.ts":{"bytesInOutput":72},"src/defer.ts":{"bytesInOutput":603},"src/entry.ts":{"bytesInOutput":487},"src/filename.ts":{"bytesInOutput":176},"src/for-each-async.ts":{"bytesInOutput":62},"src/human-hash.ts":{"bytesInOutput":5674},"src/map.ts":{"bytesInOutput":193},"src/instance-id.ts":{"bytesInOutput":784},"src/interval.ts":{"bytesInOutput":290},"src/join-tables.ts":{"bytesInOutput":493},"src/json.ts":{"bytesInOutput":2958},"src/uint8array.ts":{"bytesInOutput":562},"src/map-values.ts":{"bytesInOutput":2490},"src/object.ts":{"bytesInOutput":82},"src/order-keys.ts":{"bytesInOutput":266},"src/order.ts":{"bytesInOutput":676},"src/pick.ts":{"bytesInOutput":482},"src/platform.ts":{"bytesInOutput":5433},"src/position.ts":{"bytesInOutput":271},"src/random.ts":{"bytesInOutput":148},"src/range.ts":{"bytesInOutput":371},"src/reducers.ts":{"bytesInOutput":2326},"src/remove-undefined-keys.ts":{"bytesInOutput":935},"src/safe-await.ts":{"bytesInOutput":345},"src/safe-instanceof.ts":{"bytesInOutput":371},"src/safe-parse.ts":{"bytesInOutput":532},"src/safe-stringify.ts":{"bytesInOutput":2493},"src/sliding-window-summary.ts":{"bytesInOutput":1807},"src/sort.ts":{"bytesInOutput":643},"src/string.ts":{"bytesInOutput":925},"src/sum.ts":{"bytesInOutput":57},"src/throw-unhandled-error.ts":{"bytesInOutput":90},"src/to-fallback.ts":{"bytesInOutput":4324},"src/tracer.ts":{"bytesInOutput":1390},"src/tree.ts":{"bytesInOutput":1193},"src/types.ts":{"bytesInOutput":1044},"src/unit.ts":{"bytesInOutput":2168},"src/url.ts":{"bytesInOutput":246},"src/weak.ts":{"bytesInOutput":2054},"src/error-format.ts":{"bytesInOutput":366},"src/retry.ts":{"bytesInOutput":903}},"bytes":64037}}}
@@ -97,6 +97,14 @@ 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) {
@@ -597,6 +605,7 @@ var getDeep = (obj, path) => {
597
605
  var deferFunction = (fnProvider) => (...args) => fnProvider()(...args);
598
606
 
599
607
  // src/defer.ts
608
+ import "@hazae41/symbol-dispose-polyfill";
600
609
  var defer = (fn) => new DeferGuard(fn);
601
610
  var DeferGuard = class {
602
611
  _fn;
@@ -657,6 +666,12 @@ var MapEntry = class {
657
666
  }
658
667
  };
659
668
 
669
+ // src/filename.ts
670
+ var createFilename = ({ parts = [], ext, date = /* @__PURE__ */ new Date() }) => [
671
+ date.toISOString().replace(/[:.]/g, "-"),
672
+ ...parts
673
+ ].join("_") + (ext ? `.${ext}` : "");
674
+
660
675
  // src/for-each-async.ts
661
676
  var forEachAsync = (items, fn) => Promise.all(items.map(fn));
662
677
 
@@ -1352,7 +1367,18 @@ var omit = (obj, keys2) => {
1352
1367
 
1353
1368
  // src/platform.ts
1354
1369
  var isNode = () => typeof process !== "undefined" && process.versions != null && process.versions.node != null;
1355
- var mobileAndTabletCheck = () => {
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 = () => {
1356
1382
  let check = false;
1357
1383
  ((a) => {
1358
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))) {
@@ -1581,25 +1607,26 @@ var safeInstanceof = (tag) => (target) => {
1581
1607
  };
1582
1608
 
1583
1609
  // src/safe-parse.ts
1584
- var safeParseInt = (value, defaultValue) => {
1610
+ function safeParseInt(str, defaultValue) {
1585
1611
  try {
1586
- const n = parseInt(value ?? "");
1587
- return isNaN(n) ? defaultValue : n;
1612
+ const value = parseInt(str ?? "");
1613
+ return isNaN(value) ? defaultValue : value;
1588
1614
  } catch {
1589
1615
  return defaultValue;
1590
1616
  }
1591
- };
1592
- var safeParseFloat = (str, defaultValue) => {
1617
+ }
1618
+ function safeParseFloat(str, defaultValue) {
1593
1619
  try {
1594
- return parseFloat(str);
1620
+ const value = parseFloat(str ?? "");
1621
+ return isNaN(value) ? defaultValue : value;
1595
1622
  } catch {
1596
- return defaultValue ?? 0;
1623
+ return defaultValue;
1597
1624
  }
1598
- };
1599
- var safeParseJson = (data, defaultValue) => {
1600
- if (data && data.length > 0) {
1625
+ }
1626
+ var safeParseJson = (str, defaultValue) => {
1627
+ if (str && str.length > 0) {
1601
1628
  try {
1602
- return JSON.parse(data);
1629
+ return JSON.parse(str);
1603
1630
  } catch {
1604
1631
  }
1605
1632
  }
@@ -1609,29 +1636,45 @@ var safeParseJson = (data, defaultValue) => {
1609
1636
  // src/safe-stringify.ts
1610
1637
  var SKIP = Object.freeze({});
1611
1638
  function safeStringify(obj, filter = defaultFilter, indent = 2) {
1612
- const seen = /* @__PURE__ */ new WeakSet();
1639
+ const seen = /* @__PURE__ */ new WeakMap();
1613
1640
  function replacer(key, value) {
1614
- if (typeof value === "object" && value !== null) {
1615
- if (seen.has(value)) {
1616
- return "[Circular]";
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;
1617
1649
  }
1618
- seen.add(value);
1619
- }
1620
- if (filter) {
1621
- const v2 = filter?.(key, value);
1622
- if (v2 !== void 0) {
1623
- return v2 === SKIP ? void 0 : v2;
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;
1624
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}`;
1625
1675
  }
1626
- return value;
1627
1676
  }
1628
- let result = "";
1629
- try {
1630
- result = JSON.stringify(obj, replacer, indent);
1631
- } catch (error) {
1632
- result = `Error: ${error.message}`;
1633
- }
1634
- return result;
1677
+ return JSON.stringify(obj, replacer, indent);
1635
1678
  }
1636
1679
  var createReplacer = ({ omit: omit2, parse, maxDepth, maxArrayLen, maxStringLen } = {}) => {
1637
1680
  let currentDepth = 0;
@@ -1644,7 +1687,7 @@ var createReplacer = ({ omit: omit2, parse, maxDepth, maxArrayLen, maxStringLen
1644
1687
  currentDepth = parentDepth + 1;
1645
1688
  }
1646
1689
  if (typeof value === "function") {
1647
- return void 0;
1690
+ return SKIP;
1648
1691
  }
1649
1692
  if (value && typeof value === "object") {
1650
1693
  depthMap.set(value, currentDepth);
@@ -1653,7 +1696,7 @@ var createReplacer = ({ omit: omit2, parse, maxDepth, maxArrayLen, maxStringLen
1653
1696
  }
1654
1697
  }
1655
1698
  if (omit2?.includes(key)) {
1656
- return void 0;
1699
+ return SKIP;
1657
1700
  }
1658
1701
  if (parse?.includes(key) && typeof value === "string") {
1659
1702
  try {
@@ -2108,6 +2151,12 @@ var arrayMove = (array, from, to) => {
2108
2151
  array.splice(to < 0 ? array.length + to : to, 0, array.splice(from, 1)[0]);
2109
2152
  return array;
2110
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
+ }
2111
2160
 
2112
2161
  // src/unit.ts
2113
2162
  var createFormat = (unit) => {
@@ -2328,6 +2377,43 @@ var formatErrorWithCauses = (error) => {
2328
2377
  }
2329
2378
  return lines.join("\n\n");
2330
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
+ };
2331
2417
  export {
2332
2418
  BitField,
2333
2419
  Callback,
@@ -2344,6 +2430,7 @@ export {
2344
2430
  WeakDictionary,
2345
2431
  accessBy,
2346
2432
  arrayMove,
2433
+ arraySwap,
2347
2434
  arrayToBuffer,
2348
2435
  arrayToHex,
2349
2436
  arrayToString,
@@ -2355,12 +2442,14 @@ export {
2355
2442
  chunkArray,
2356
2443
  clamp,
2357
2444
  clearUndefined,
2445
+ coerceArray,
2358
2446
  compareMulti,
2359
2447
  compareObject,
2360
2448
  compareScalar,
2361
2449
  compareString,
2362
2450
  createBinder,
2363
2451
  createBucketReducer,
2452
+ createFilename,
2364
2453
  createGroupReducer,
2365
2454
  createReplacer,
2366
2455
  createSetDispatch,
@@ -2401,8 +2490,12 @@ export {
2401
2490
  intersectBy,
2402
2491
  intersection,
2403
2492
  iosCheck,
2493
+ isBun,
2494
+ isMobile,
2495
+ isMobileOrTablet,
2404
2496
  isNode,
2405
2497
  isNonNullable,
2498
+ isTauri,
2406
2499
  isTruthy,
2407
2500
  joinTables,
2408
2501
  jsonKeyReplacer,
@@ -2418,7 +2511,6 @@ export {
2418
2511
  makeSet,
2419
2512
  mapValues,
2420
2513
  median,
2421
- mobileAndTabletCheck,
2422
2514
  numericalValues,
2423
2515
  omit,
2424
2516
  orderKeys,
@@ -2434,6 +2526,7 @@ export {
2434
2526
  removeBy,
2435
2527
  removeProperties,
2436
2528
  removeUndefinedProperties,
2529
+ retry,
2437
2530
  safariCheck,
2438
2531
  safeAwaitAll,
2439
2532
  safeInstanceof,