typetify 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/README.md +108 -0
  3. package/dist/async/index.js +1 -49
  4. package/dist/async/index.mjs +1 -4
  5. package/dist/chunk-272Z3AXV.js +1 -0
  6. package/dist/chunk-4HQERWI6.mjs +1 -0
  7. package/dist/chunk-4JG7CFRK.js +1 -0
  8. package/dist/chunk-5FBZYPQM.mjs +1 -0
  9. package/dist/chunk-5LWNMYHB.js +1 -0
  10. package/dist/chunk-5XQRYI2Q.mjs +1 -0
  11. package/dist/chunk-6HA2SN23.js +1 -0
  12. package/dist/chunk-6NWIIOHH.js +1 -0
  13. package/dist/chunk-7LBL6CYT.js +1 -0
  14. package/dist/chunk-7V3EDYJD.mjs +1 -0
  15. package/dist/chunk-B3R73UK5.mjs +1 -0
  16. package/dist/chunk-EAHFED6V.mjs +1 -0
  17. package/dist/chunk-EKSHS4DL.mjs +1 -0
  18. package/dist/chunk-FYQNKDT3.mjs +1 -0
  19. package/dist/chunk-GKOA3XGQ.js +1 -0
  20. package/dist/chunk-I4YSQ4HB.js +1 -0
  21. package/dist/chunk-JZXLCA2E.mjs +1 -0
  22. package/dist/chunk-M5OMYDI7.mjs +1 -0
  23. package/dist/chunk-MPY3WRLG.mjs +1 -0
  24. package/dist/chunk-MSOFO6QN.js +1 -0
  25. package/dist/chunk-NENRAPOL.mjs +1 -0
  26. package/dist/chunk-NOW4Q26G.mjs +1 -0
  27. package/dist/chunk-P4UNM7SF.js +1 -0
  28. package/dist/chunk-P5E2JDCX.mjs +1 -0
  29. package/dist/chunk-Q7SUL7MD.js +1 -0
  30. package/dist/chunk-QKNZICUO.mjs +1 -0
  31. package/dist/chunk-RHMANSTA.mjs +1 -0
  32. package/dist/chunk-SF64HETW.js +1 -0
  33. package/dist/chunk-T66YO63J.js +1 -0
  34. package/dist/chunk-TNK6EVQK.mjs +1 -0
  35. package/dist/chunk-TSJFKV3R.js +1 -0
  36. package/dist/chunk-TVCWWECJ.mjs +1 -0
  37. package/dist/chunk-W5I352FJ.js +1 -0
  38. package/dist/chunk-WAT4QJB2.js +1 -0
  39. package/dist/chunk-WCG5ODRX.mjs +1 -0
  40. package/dist/chunk-WDFIRO2J.js +1 -0
  41. package/dist/chunk-WOT6VMZA.js +1 -0
  42. package/dist/chunk-WQPSXQT5.js +1 -0
  43. package/dist/chunk-WS743BFA.js +1 -0
  44. package/dist/chunk-XPY5CWKZ.mjs +1 -0
  45. package/dist/collection/index.js +1 -125
  46. package/dist/collection/index.mjs +1 -4
  47. package/dist/core/index.js +1 -41
  48. package/dist/core/index.mjs +1 -4
  49. package/dist/decorator/index.js +1 -57
  50. package/dist/decorator/index.mjs +1 -4
  51. package/dist/dx/index.js +1 -53
  52. package/dist/dx/index.mjs +1 -4
  53. package/dist/flow/index.js +1 -50
  54. package/dist/flow/index.mjs +1 -5
  55. package/dist/fn/index.js +1 -37
  56. package/dist/fn/index.mjs +1 -4
  57. package/dist/guards/index.js +1 -233
  58. package/dist/guards/index.mjs +1 -4
  59. package/dist/index.js +3 -2507
  60. package/dist/index.mjs +3 -1546
  61. package/dist/input/index.js +1 -74
  62. package/dist/input/index.mjs +1 -5
  63. package/dist/iterator/index.js +1 -85
  64. package/dist/iterator/index.mjs +1 -4
  65. package/dist/logic/index.js +1 -201
  66. package/dist/logic/index.mjs +1 -4
  67. package/dist/math/index.js +1 -45
  68. package/dist/math/index.mjs +1 -4
  69. package/dist/narrowing/index.js +1 -141
  70. package/dist/narrowing/index.mjs +1 -4
  71. package/dist/object/index.js +1 -113
  72. package/dist/object/index.mjs +1 -4
  73. package/dist/result/index.js +1 -86
  74. package/dist/result/index.mjs +1 -5
  75. package/dist/schema/index.js +1 -110
  76. package/dist/schema/index.mjs +1 -5
  77. package/dist/string/index.js +1 -49
  78. package/dist/string/index.mjs +1 -4
  79. package/dist/typed/index.js +1 -193
  80. package/dist/typed/index.mjs +1 -4
  81. package/package.json +8 -3
  82. package/dist/async/index.js.map +0 -1
  83. package/dist/async/index.mjs.map +0 -1
  84. package/dist/chunk-2LJ6NZ6K.js +0 -108
  85. package/dist/chunk-2LJ6NZ6K.js.map +0 -1
  86. package/dist/chunk-4NXETABV.mjs +0 -116
  87. package/dist/chunk-4NXETABV.mjs.map +0 -1
  88. package/dist/chunk-6ZBTL74K.js +0 -129
  89. package/dist/chunk-6ZBTL74K.js.map +0 -1
  90. package/dist/chunk-7G4ZSMQX.js +0 -470
  91. package/dist/chunk-7G4ZSMQX.js.map +0 -1
  92. package/dist/chunk-CN3GYRJN.mjs +0 -137
  93. package/dist/chunk-CN3GYRJN.mjs.map +0 -1
  94. package/dist/chunk-CNTE6ZVH.js +0 -359
  95. package/dist/chunk-CNTE6ZVH.js.map +0 -1
  96. package/dist/chunk-CWHYQWNU.mjs +0 -224
  97. package/dist/chunk-CWHYQWNU.mjs.map +0 -1
  98. package/dist/chunk-DBENOSTA.js +0 -156
  99. package/dist/chunk-DBENOSTA.js.map +0 -1
  100. package/dist/chunk-DWIG5GF2.js +0 -135
  101. package/dist/chunk-DWIG5GF2.js.map +0 -1
  102. package/dist/chunk-EAUTTWTQ.mjs +0 -231
  103. package/dist/chunk-EAUTTWTQ.mjs.map +0 -1
  104. package/dist/chunk-FEX5C4OH.mjs +0 -1007
  105. package/dist/chunk-FEX5C4OH.mjs.map +0 -1
  106. package/dist/chunk-FN553YPU.js +0 -441
  107. package/dist/chunk-FN553YPU.js.map +0 -1
  108. package/dist/chunk-FT2EK4AM.mjs +0 -420
  109. package/dist/chunk-FT2EK4AM.mjs.map +0 -1
  110. package/dist/chunk-FXWYPHA3.mjs +0 -13
  111. package/dist/chunk-FXWYPHA3.mjs.map +0 -1
  112. package/dist/chunk-GS3PP67B.js +0 -200
  113. package/dist/chunk-GS3PP67B.js.map +0 -1
  114. package/dist/chunk-IGA3VEZM.mjs +0 -503
  115. package/dist/chunk-IGA3VEZM.mjs.map +0 -1
  116. package/dist/chunk-J5LGTIGS.mjs +0 -9
  117. package/dist/chunk-J5LGTIGS.mjs.map +0 -1
  118. package/dist/chunk-JB6UXRKD.mjs +0 -97
  119. package/dist/chunk-JB6UXRKD.mjs.map +0 -1
  120. package/dist/chunk-JQAQV75V.js +0 -561
  121. package/dist/chunk-JQAQV75V.js.map +0 -1
  122. package/dist/chunk-JQHUBZ4M.js +0 -88
  123. package/dist/chunk-JQHUBZ4M.js.map +0 -1
  124. package/dist/chunk-LT7JK7RJ.js +0 -87
  125. package/dist/chunk-LT7JK7RJ.js.map +0 -1
  126. package/dist/chunk-N6IUADIP.mjs +0 -414
  127. package/dist/chunk-N6IUADIP.mjs.map +0 -1
  128. package/dist/chunk-OEJK37LO.mjs +0 -328
  129. package/dist/chunk-OEJK37LO.mjs.map +0 -1
  130. package/dist/chunk-OKB3MS5F.js +0 -547
  131. package/dist/chunk-OKB3MS5F.js.map +0 -1
  132. package/dist/chunk-OPVES6W2.js +0 -16
  133. package/dist/chunk-OPVES6W2.js.map +0 -1
  134. package/dist/chunk-OWNUKWXV.js +0 -291
  135. package/dist/chunk-OWNUKWXV.js.map +0 -1
  136. package/dist/chunk-POD52NJ3.mjs +0 -526
  137. package/dist/chunk-POD52NJ3.mjs.map +0 -1
  138. package/dist/chunk-PQTXSQ4P.js +0 -369
  139. package/dist/chunk-PQTXSQ4P.js.map +0 -1
  140. package/dist/chunk-PZ5AY32C.js +0 -11
  141. package/dist/chunk-PZ5AY32C.js.map +0 -1
  142. package/dist/chunk-QFR7DVAJ.mjs +0 -63
  143. package/dist/chunk-QFR7DVAJ.mjs.map +0 -1
  144. package/dist/chunk-S535LAXW.js +0 -1054
  145. package/dist/chunk-S535LAXW.js.map +0 -1
  146. package/dist/chunk-SGQNLTRK.js +0 -73
  147. package/dist/chunk-SGQNLTRK.js.map +0 -1
  148. package/dist/chunk-SRDWUHDY.mjs +0 -188
  149. package/dist/chunk-SRDWUHDY.mjs.map +0 -1
  150. package/dist/chunk-TXU7NTT4.js +0 -249
  151. package/dist/chunk-TXU7NTT4.js.map +0 -1
  152. package/dist/chunk-TZEWREAC.mjs +0 -277
  153. package/dist/chunk-TZEWREAC.mjs.map +0 -1
  154. package/dist/chunk-V6CWFDIJ.mjs +0 -123
  155. package/dist/chunk-V6CWFDIJ.mjs.map +0 -1
  156. package/dist/chunk-X55EORNF.js +0 -259
  157. package/dist/chunk-X55EORNF.js.map +0 -1
  158. package/dist/chunk-YBJC5WMX.mjs +0 -341
  159. package/dist/chunk-YBJC5WMX.mjs.map +0 -1
  160. package/dist/chunk-YOPAXITF.mjs +0 -75
  161. package/dist/chunk-YOPAXITF.mjs.map +0 -1
  162. package/dist/chunk-ZE4FDBRI.mjs +0 -79
  163. package/dist/chunk-ZE4FDBRI.mjs.map +0 -1
  164. package/dist/collection/index.js.map +0 -1
  165. package/dist/collection/index.mjs.map +0 -1
  166. package/dist/core/index.js.map +0 -1
  167. package/dist/core/index.mjs.map +0 -1
  168. package/dist/decorator/index.js.map +0 -1
  169. package/dist/decorator/index.mjs.map +0 -1
  170. package/dist/dx/index.js.map +0 -1
  171. package/dist/dx/index.mjs.map +0 -1
  172. package/dist/flow/index.js.map +0 -1
  173. package/dist/flow/index.mjs.map +0 -1
  174. package/dist/fn/index.js.map +0 -1
  175. package/dist/fn/index.mjs.map +0 -1
  176. package/dist/guards/index.js.map +0 -1
  177. package/dist/guards/index.mjs.map +0 -1
  178. package/dist/index.js.map +0 -1
  179. package/dist/index.mjs.map +0 -1
  180. package/dist/input/index.js.map +0 -1
  181. package/dist/input/index.mjs.map +0 -1
  182. package/dist/iterator/index.js.map +0 -1
  183. package/dist/iterator/index.mjs.map +0 -1
  184. package/dist/logic/index.js.map +0 -1
  185. package/dist/logic/index.mjs.map +0 -1
  186. package/dist/math/index.js.map +0 -1
  187. package/dist/math/index.mjs.map +0 -1
  188. package/dist/narrowing/index.js.map +0 -1
  189. package/dist/narrowing/index.mjs.map +0 -1
  190. package/dist/object/index.js.map +0 -1
  191. package/dist/object/index.mjs.map +0 -1
  192. package/dist/result/index.js.map +0 -1
  193. package/dist/result/index.mjs.map +0 -1
  194. package/dist/schema/index.js.map +0 -1
  195. package/dist/schema/index.mjs.map +0 -1
  196. package/dist/string/index.js.map +0 -1
  197. package/dist/string/index.mjs.map +0 -1
  198. package/dist/typed/index.js.map +0 -1
  199. package/dist/typed/index.mjs.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,70 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [2.1.0] - 2026-02-07
9
+
10
+ ### Added
11
+ - **Namespace Export Fix**: All categories now properly exported in `_` namespace
12
+ - Added `logic` module (28 functions: `when`, `unless`, `ifElse`, `cond`, etc.)
13
+ - Added `iterator` module (24 functions: `lazyRange`, `lazyMap`, `lazyFilter`, etc.)
14
+ - Added `narrowing` module (34 functions: `filterDefined`, `assertType`, `refine`, etc.)
15
+ - Added `schema` module (27 functions: `string`, `number`, `parse`, `validate`, etc.)
16
+ - Added `array` module (49 functions: `unionWith`, `without`, `union`, etc.)
17
+
18
+ ### Fixed
19
+ - Fixed `_.unionWith is not a function` error
20
+ - Fixed missing Array category functions in namespace
21
+ - Fixed TypeScript unique symbol export limitations for `typed` module
22
+
23
+ ### Changed
24
+ - Optimized bundle: enabled minification, removed sourcemaps
25
+ - Improved README with comparison table, real-world examples, and migration guide
26
+
27
+ ## [2.0.0] - 2026-02-06
28
+
29
+ ### Added
30
+ - 15 new utility modules across 9 new categories:
31
+ - **Reactive**: `signal`, `computed`, `effect`, `batch`, `createUndoableState`
32
+ - **Cache**: `smartCache`, `memoize`
33
+ - **Event**: `createEventBus`, `createTypedEmitter`
34
+ - **Pipeline**: `pipe`, `pipeAsync`, `flow`, `createMiddleware`, `compose`
35
+ - **DI**: `createContainer`, `createTypedContainer`
36
+ - **Env**: `env`, `createEnv`
37
+ - **Router**: `route`, `createRouter`
38
+ - **Form**: `createForm`, `field`
39
+ - **Feature**: `createFeatureFlags`, `flag`
40
+
41
+ ### Changed
42
+ - Updated documentation with all new categories
43
+ - Enhanced homepage example with type-safe event bus showcase
44
+
45
+ ## [1.0.0] - 2026-02-04
46
+
47
+ ### Added
48
+ - Initial public release
49
+ - 18 utility modules:
50
+ - **Core**: `isDefined`, `isNil`, `assert`, `assertDefined`, `fail`, `noop`, `identity`, `unreachable`
51
+ - **Guards**: `isObject`, `isString`, `isNumber`, `hasKey`, `hasKeys`, `isEmpty`, and 50+ type guards
52
+ - **Object**: `pick`, `omit`, `keysTyped`, `mapObject`, `get`, `set`, `merge`, `clone`
53
+ - **Async**: `awaitTo`, `retry`, `sleep`, `withTimeout`, `debounce`, `throttle`, `parallel`
54
+ - **Collection**: `unique`, `groupBy`, `partition`, `chunk`, `compact`, `sortBy`, `range`
55
+ - **Input**: `safeJsonParse`, `parseNumber`, `parseBoolean`, `parseDate`, `coerceArray`, `defaults`
56
+ - **Flow**: `pipe`, `tap`, `when`, `match`, `tryCatch`, `ifElse`
57
+ - **DX**: `debug`, `invariant`, `assertNever`, `todo`, `measure`
58
+ - **Typed**: `defineConst`, `defineEnum`, `brand`, `narrow`, `model`, `v`
59
+ - **String**: `capitalize`, `camelCase`, `kebabCase`, `snakeCase`, `truncate`
60
+ - **Fn**: `partial`, `curry`, `once`, `memoize`, `negate`
61
+ - **Math**: `clamp`, `round`, `sum`, `average`, `random`
62
+ - **Result**: `ok`, `err`, `Result`, `fromPromise`, `map`, `flatMap`
63
+ - **Iterator**: `createIterator`, `lazyRange`, `lazyMap`, `lazyFilter`
64
+ - **Decorator**: `memoize`, `debounce`, `throttle`, `log`, `deprecated`
65
+ - **Logic**: `when`, `unless`, `cond`, `match`, `coalesce`, `defaultTo`
66
+ - **Narrowing**: `filterDefined`, `assertType`, `refine`, `narrow`
67
+ - **Schema**: `string`, `number`, `object`, `array`, `parse`, `validate`
68
+ - Complete TypeScript support with full type inference
69
+ - Zero dependencies
70
+ - Tree-shakable ESM and CJS builds
package/README.md CHANGED
@@ -52,12 +52,38 @@ Boring, predictable API. No config, no setup, just functions that work.
52
52
  </tr>
53
53
  </table>
54
54
 
55
+ ## Why Typetify?
56
+
57
+ | Feature | Lodash | Ramda | Typetify |
58
+ |---------|--------|-------|----------|
59
+ | TypeScript-first | ❌ | ❌ | ✅ |
60
+ | Runtime safety | ❌ | ❌ | ✅ |
61
+ | Type narrowing | ❌ | ❌ | ✅ |
62
+ | Zero dependencies | ❌ | ✅ | ✅ |
63
+ | Tree-shakable | ⚠️ | ✅ | ✅ |
64
+ | Bundle size | 72KB | 51KB | **~15KB** |
65
+ | Modern syntax | ❌ | ⚠️ | ✅ |
66
+
55
67
  ## Installation
56
68
 
57
69
  ```bash
70
+ # npm
58
71
  npm install typetify
72
+
73
+ # pnpm (faster)
74
+ pnpm add typetify
75
+
76
+ # yarn
77
+ yarn add typetify
78
+
79
+ # bun (fastest)
80
+ bun add typetify
59
81
  ```
60
82
 
83
+ **Requirements:**
84
+ - Node.js >= 18
85
+ - TypeScript >= 5.0 (recommended)
86
+
61
87
  ## Quick Start
62
88
 
63
89
  ```typescript
@@ -88,6 +114,29 @@ if (result.ok) {
88
114
  }
89
115
  ```
90
116
 
117
+ ## Migrating from Lodash
118
+
119
+ Typetify is designed to be a drop-in replacement for common Lodash patterns:
120
+
121
+ | Lodash | Typetify | Benefit |
122
+ |--------|----------|--------|
123
+ | `_.isNil(x)` | `isNil(x)` | Same API, better types |
124
+ | `_.pick(obj, keys)` | `pick(obj, keys)` | Type-safe keys |
125
+ | `_.omit(obj, keys)` | `omit(obj, keys)` | Type-safe keys |
126
+ | `_.uniq(arr)` | `unique(arr)` | Same behavior |
127
+ | `_.groupBy(arr, fn)` | `groupBy(arr, fn)` | Better inference |
128
+ | `_.chunk(arr, n)` | `chunk(arr, n)` | Same API |
129
+ | `_.debounce(fn, ms)` | `debounce(fn, ms)` | Simpler API |
130
+
131
+ **Bonus:** Use the `_` namespace to avoid migration conflicts:
132
+
133
+ ```typescript
134
+ import { _ } from 'typetify'
135
+
136
+ // Works exactly like Lodash
137
+ const result = _.pick(user, ['id', 'name'])
138
+ ```
139
+
91
140
  ### Using Underscore `_` (Lodash-style)
92
141
 
93
142
  If you have naming conflicts with existing functions, use the underscore `_` namespace:
@@ -353,6 +402,65 @@ type PartialUser = DeepPartial<User>
353
402
  type MergedConfig = Merge<DefaultConfig, UserConfig>
354
403
  ```
355
404
 
405
+ ## Real-World Examples
406
+
407
+ ### API Response Validation
408
+
409
+ ```typescript
410
+ import { hasKeys, isDefined, awaitTo } from 'typetify'
411
+
412
+ async function fetchUser(id: string) {
413
+ const [error, response] = await awaitTo(fetch(`/api/users/${id}`))
414
+ if (error) return { error: 'Network error' }
415
+
416
+ const data = await response.json()
417
+
418
+ // Runtime validation
419
+ if (!hasKeys(data, ['id', 'name', 'email'])) {
420
+ return { error: 'Invalid response format' }
421
+ }
422
+
423
+ return { data }
424
+ }
425
+ ```
426
+
427
+ ### Form Data Processing
428
+
429
+ ```typescript
430
+ import { parseNumber, parseBoolean, compact, defaults } from 'typetify'
431
+
432
+ function processFormData(formData: FormData) {
433
+ return {
434
+ age: parseNumber(formData.get('age')),
435
+ newsletter: parseBoolean(formData.get('newsletter')),
436
+ tags: compact(formData.getAll('tags')),
437
+ bio: defaults(formData.get('bio'), 'No bio provided'),
438
+ }
439
+ }
440
+ ```
441
+
442
+ ### Safe Error Handling
443
+
444
+ ```typescript
445
+ import { awaitTo, retry, withTimeout } from 'typetify'
446
+
447
+ async function fetchWithRetry(url: string) {
448
+ const [error, data] = await awaitTo(
449
+ retry(
450
+ () => withTimeout(fetch(url), 5000),
451
+ { attempts: 3, delay: 1000 }
452
+ )
453
+ )
454
+
455
+ if (error) {
456
+ console.error('Failed after retries:', error)
457
+ return null
458
+ }
459
+
460
+ return data
461
+ }
462
+ ```
463
+
356
464
  ## Tree Shaking
357
465
 
358
466
  Import only what you need:
@@ -1,49 +1 @@
1
- 'use strict';
2
-
3
- var chunkGS3PP67B_js = require('../chunk-GS3PP67B.js');
4
- require('../chunk-PZ5AY32C.js');
5
-
6
-
7
-
8
- Object.defineProperty(exports, "awaitTo", {
9
- enumerable: true,
10
- get: function () { return chunkGS3PP67B_js.awaitTo; }
11
- });
12
- Object.defineProperty(exports, "debounce", {
13
- enumerable: true,
14
- get: function () { return chunkGS3PP67B_js.debounce; }
15
- });
16
- Object.defineProperty(exports, "defer", {
17
- enumerable: true,
18
- get: function () { return chunkGS3PP67B_js.defer; }
19
- });
20
- Object.defineProperty(exports, "once", {
21
- enumerable: true,
22
- get: function () { return chunkGS3PP67B_js.once; }
23
- });
24
- Object.defineProperty(exports, "onceAsync", {
25
- enumerable: true,
26
- get: function () { return chunkGS3PP67B_js.onceAsync; }
27
- });
28
- Object.defineProperty(exports, "parallel", {
29
- enumerable: true,
30
- get: function () { return chunkGS3PP67B_js.parallel; }
31
- });
32
- Object.defineProperty(exports, "retry", {
33
- enumerable: true,
34
- get: function () { return chunkGS3PP67B_js.retry; }
35
- });
36
- Object.defineProperty(exports, "sleep", {
37
- enumerable: true,
38
- get: function () { return chunkGS3PP67B_js.sleep; }
39
- });
40
- Object.defineProperty(exports, "throttle", {
41
- enumerable: true,
42
- get: function () { return chunkGS3PP67B_js.throttle; }
43
- });
44
- Object.defineProperty(exports, "withTimeout", {
45
- enumerable: true,
46
- get: function () { return chunkGS3PP67B_js.withTimeout; }
47
- });
48
- //# sourceMappingURL=index.js.map
49
- //# sourceMappingURL=index.js.map
1
+ 'use strict';var chunkWAT4QJB2_js=require('../chunk-WAT4QJB2.js');require('../chunk-WOT6VMZA.js');Object.defineProperty(exports,"awaitTo",{enumerable:true,get:function(){return chunkWAT4QJB2_js.a}});Object.defineProperty(exports,"debounce",{enumerable:true,get:function(){return chunkWAT4QJB2_js.e}});Object.defineProperty(exports,"defer",{enumerable:true,get:function(){return chunkWAT4QJB2_js.i}});Object.defineProperty(exports,"once",{enumerable:true,get:function(){return chunkWAT4QJB2_js.g}});Object.defineProperty(exports,"onceAsync",{enumerable:true,get:function(){return chunkWAT4QJB2_js.h}});Object.defineProperty(exports,"parallel",{enumerable:true,get:function(){return chunkWAT4QJB2_js.j}});Object.defineProperty(exports,"retry",{enumerable:true,get:function(){return chunkWAT4QJB2_js.d}});Object.defineProperty(exports,"sleep",{enumerable:true,get:function(){return chunkWAT4QJB2_js.b}});Object.defineProperty(exports,"throttle",{enumerable:true,get:function(){return chunkWAT4QJB2_js.f}});Object.defineProperty(exports,"withTimeout",{enumerable:true,get:function(){return chunkWAT4QJB2_js.c}});
@@ -1,4 +1 @@
1
- export { awaitTo, debounce, defer, once, onceAsync, parallel, retry, sleep, throttle, withTimeout } from '../chunk-SRDWUHDY.mjs';
2
- import '../chunk-J5LGTIGS.mjs';
3
- //# sourceMappingURL=index.mjs.map
4
- //# sourceMappingURL=index.mjs.map
1
+ export{a as awaitTo,e as debounce,i as defer,g as once,h as onceAsync,j as parallel,d as retry,b as sleep,f as throttle,c as withTimeout}from'../chunk-QKNZICUO.mjs';import'../chunk-JZXLCA2E.mjs';
@@ -0,0 +1 @@
1
+ 'use strict';var chunkP4UNM7SF_js=require('./chunk-P4UNM7SF.js'),chunkWOT6VMZA_js=require('./chunk-WOT6VMZA.js');var x={};chunkWOT6VMZA_js.a(x,{compose:()=>c,constant:()=>B,ifElse:()=>C,match:()=>s,pipe:()=>p,tap:()=>a,tryCatch:()=>l,tryCatchAsync:()=>A,unless:()=>T,when:()=>i});function p(r,...n){return n.reduce((e,t)=>t(e),r)}function c(...r){return n=>r.reduceRight((e,t)=>t(e),n)}function a(r){return n=>(r(n),n)}function i(r,n){return e=>r(e)?n(e):e}function T(r,n){return e=>r(e)?e:n(e)}function s(){let r=[],n={with(e,t){return r.push({when:e,then:t}),n},otherwise(e){return t=>{for(let u of r)if(u.when(t))return u.then(t);return e(t)}},run(e){for(let t of r)if(t.when(e))return t.then(e)}};return n}function l(r){try{return chunkP4UNM7SF_js.a(r())}catch(n){return chunkP4UNM7SF_js.b(n instanceof Error?n:new Error(String(n)))}}async function A(r){try{let n=await r();return chunkP4UNM7SF_js.a(n)}catch(n){return chunkP4UNM7SF_js.b(n instanceof Error?n:new Error(String(n)))}}function C(r,n,e){return t=>r(t)?n(t):e(t)}function B(r){return ()=>r}exports.a=p;exports.b=c;exports.c=a;exports.d=i;exports.e=T;exports.f=s;exports.g=l;exports.h=A;exports.i=C;exports.j=B;exports.k=x;
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-JZXLCA2E.mjs';var j={};a$1(j,{chunk:()=>p,compact:()=>d,countBy:()=>q,difference:()=>k,drop:()=>R,dropWhile:()=>P,findLast:()=>S,first:()=>x,flatten:()=>m,groupBy:()=>s,head:()=>I,indexBy:()=>T,init:()=>L,intersection:()=>A,last:()=>y,maxBy:()=>W,minBy:()=>v,partition:()=>c,range:()=>h,sample:()=>B,shuffle:()=>b,sortBy:()=>a,sumBy:()=>z,tail:()=>E,take:()=>w,takeWhile:()=>M,unique:()=>l,unzip:()=>K,zip:()=>g});function l(e,n){if(!n)return [...new Set(e)];let t=new Set,r=[];for(let o of e){let i=n(o);t.has(i)||(t.add(i),r.push(o));}return r}function s(e,n){let t={};for(let r of e){let o=n(r);o in t||(t[o]=[]),t[o].push(r);}return t}function T(e,n){let t={};for(let r of e){let o=n(r);t[o]=r;}return t}function c(e,n){let t=[],r=[];for(let o of e)n(o)?t.push(o):r.push(o);return [t,r]}function p(e,n){if(n<=0)throw new Error("Chunk size must be greater than 0");let t=[];for(let r=0;r<e.length;r+=n)t.push(e.slice(r,r+n));return t}function d(e){return e.filter(n=>n!=null)}function m(e){let n=[];for(let t of e)Array.isArray(t)?n.push(...t):n.push(t);return n}function a(e,n,t="asc"){let r=[...e].sort((o,i)=>{let u=n(o),f=n(i);return u<f?-1:u>f?1:0});return t==="desc"?r.reverse():r}function x(e){return e[0]}function y(e){return e[e.length-1]}function h(e,n,t=1){if(t===0)throw new Error("Step cannot be 0");let r=[];if(t>0)for(let o=e;o<n;o+=t)r.push(o);else for(let o=e;o>n;o+=t)r.push(o);return r}function b(e){let n=[...e];for(let t=n.length-1;t>0;t--){let r=Math.floor(Math.random()*(t+1)),o=n[t];n[t]=n[r],n[r]=o;}return n}function B(e){if(e.length===0)return;let n=Math.floor(Math.random()*e.length);return e[n]}function g(e,n){let t=Math.min(e.length,n.length),r=[];for(let o=0;o<t;o++)r.push([e[o],n[o]]);return r}function K(e){let n=[],t=[];for(let[r,o]of e)n.push(r),t.push(o);return [n,t]}function k(e,n){let t=new Set(n);return e.filter(r=>!t.has(r))}function A(e,n){let t=new Set(n);return e.filter(r=>t.has(r))}function w(e,n){return n<=0?[]:e.slice(0,n)}function R(e,n){return n<=0?[...e]:e.slice(n)}function M(e,n){let t=[];for(let r=0;r<e.length;r++){let o=e[r];if(!n(o,r))break;t.push(o);}return t}function P(e,n){let t=0;for(let r=0;r<e.length;r++){if(!n(e[r],r)){t=r;break}t=e.length;}return e.slice(t)}function S(e,n){for(let t=e.length-1;t>=0;t--){let r=e[t];if(n(r,t))return r}}function q(e,n){let t={};for(let r of e){let o=n(r);t[o]=(t[o]??0)+1;}return t}function W(e,n){if(e.length===0)return;let t=e[0],r=n(t);for(let o=1;o<e.length;o++){let i=e[o],u=n(i);u>r&&(r=u,t=i);}return t}function v(e,n){if(e.length===0)return;let t=e[0],r=n(t);for(let o=1;o<e.length;o++){let i=e[o],u=n(i);u<r&&(r=u,t=i);}return t}function z(e,n){let t=0;for(let r of e)t+=n(r);return t}function I(e){return e[0]}function E(e){return e.slice(1)}function L(e){return e.slice(0,-1)}export{I as A,E as B,L as C,j as D,l as a,s as b,T as c,c as d,p as e,d as f,m as g,a as h,x as i,y as j,h as k,b as l,B as m,g as n,K as o,k as p,A as q,w as r,R as s,M as t,P as u,S as v,q as w,W as x,v as y,z};
@@ -0,0 +1 @@
1
+ 'use strict';var chunkWOT6VMZA_js=require('./chunk-WOT6VMZA.js');var x={};chunkWOT6VMZA_js.a(x,{ary:()=>c,curry:()=>p,flip:()=>s,memoize:()=>y,negate:()=>T,partial:()=>i,unary:()=>f});function y(n,e){let r=new Map;return function(...t){let o=e?e(...t):t[0];if(r.has(o))return r.get(o);let u=n.apply(this,t);return r.set(o,u),u}}function T(n){return function(...e){return !n(...e)}}function s(n){return function(e,r){return n(r,e)}}function i(n,...e){return function(...r){return n(...e,...r)}}function p(n){let e=n.length;function r(...a){return a.length>=e?n(...a):(...t)=>r(...a,...t)}return r}function c(n,e){return function(...r){return n(...r.slice(0,e))}}function f(n){return function(e){return n(e)}}exports.a=y;exports.b=T;exports.c=s;exports.d=i;exports.e=p;exports.f=c;exports.g=f;exports.h=x;
@@ -0,0 +1 @@
1
+ function t(r){return {ok:true,value:r}}function o(r){return {ok:false,error:r}}export{t as a,o as b};
@@ -0,0 +1 @@
1
+ 'use strict';var chunkWOT6VMZA_js=require('./chunk-WOT6VMZA.js');var j={};chunkWOT6VMZA_js.a(j,{chunk:()=>p,compact:()=>d,countBy:()=>q,difference:()=>k,drop:()=>R,dropWhile:()=>P,findLast:()=>S,first:()=>x,flatten:()=>m,groupBy:()=>s,head:()=>I,indexBy:()=>T,init:()=>L,intersection:()=>A,last:()=>y,maxBy:()=>W,minBy:()=>v,partition:()=>c,range:()=>h,sample:()=>B,shuffle:()=>b,sortBy:()=>a,sumBy:()=>z,tail:()=>E,take:()=>w,takeWhile:()=>M,unique:()=>l,unzip:()=>K,zip:()=>g});function l(e,n){if(!n)return [...new Set(e)];let t=new Set,r=[];for(let o of e){let i=n(o);t.has(i)||(t.add(i),r.push(o));}return r}function s(e,n){let t={};for(let r of e){let o=n(r);o in t||(t[o]=[]),t[o].push(r);}return t}function T(e,n){let t={};for(let r of e){let o=n(r);t[o]=r;}return t}function c(e,n){let t=[],r=[];for(let o of e)n(o)?t.push(o):r.push(o);return [t,r]}function p(e,n){if(n<=0)throw new Error("Chunk size must be greater than 0");let t=[];for(let r=0;r<e.length;r+=n)t.push(e.slice(r,r+n));return t}function d(e){return e.filter(n=>n!=null)}function m(e){let n=[];for(let t of e)Array.isArray(t)?n.push(...t):n.push(t);return n}function a(e,n,t="asc"){let r=[...e].sort((o,i)=>{let u=n(o),f=n(i);return u<f?-1:u>f?1:0});return t==="desc"?r.reverse():r}function x(e){return e[0]}function y(e){return e[e.length-1]}function h(e,n,t=1){if(t===0)throw new Error("Step cannot be 0");let r=[];if(t>0)for(let o=e;o<n;o+=t)r.push(o);else for(let o=e;o>n;o+=t)r.push(o);return r}function b(e){let n=[...e];for(let t=n.length-1;t>0;t--){let r=Math.floor(Math.random()*(t+1)),o=n[t];n[t]=n[r],n[r]=o;}return n}function B(e){if(e.length===0)return;let n=Math.floor(Math.random()*e.length);return e[n]}function g(e,n){let t=Math.min(e.length,n.length),r=[];for(let o=0;o<t;o++)r.push([e[o],n[o]]);return r}function K(e){let n=[],t=[];for(let[r,o]of e)n.push(r),t.push(o);return [n,t]}function k(e,n){let t=new Set(n);return e.filter(r=>!t.has(r))}function A(e,n){let t=new Set(n);return e.filter(r=>t.has(r))}function w(e,n){return n<=0?[]:e.slice(0,n)}function R(e,n){return n<=0?[...e]:e.slice(n)}function M(e,n){let t=[];for(let r=0;r<e.length;r++){let o=e[r];if(!n(o,r))break;t.push(o);}return t}function P(e,n){let t=0;for(let r=0;r<e.length;r++){if(!n(e[r],r)){t=r;break}t=e.length;}return e.slice(t)}function S(e,n){for(let t=e.length-1;t>=0;t--){let r=e[t];if(n(r,t))return r}}function q(e,n){let t={};for(let r of e){let o=n(r);t[o]=(t[o]??0)+1;}return t}function W(e,n){if(e.length===0)return;let t=e[0],r=n(t);for(let o=1;o<e.length;o++){let i=e[o],u=n(i);u>r&&(r=u,t=i);}return t}function v(e,n){if(e.length===0)return;let t=e[0],r=n(t);for(let o=1;o<e.length;o++){let i=e[o],u=n(i);u<r&&(r=u,t=i);}return t}function z(e,n){let t=0;for(let r of e)t+=n(r);return t}function I(e){return e[0]}function E(e){return e.slice(1)}function L(e){return e.slice(0,-1)}exports.A=I;exports.B=E;exports.C=L;exports.D=j;exports.a=l;exports.b=s;exports.c=T;exports.d=c;exports.e=p;exports.f=d;exports.g=m;exports.h=a;exports.i=x;exports.j=y;exports.k=h;exports.l=b;exports.m=B;exports.n=g;exports.o=K;exports.p=k;exports.q=A;exports.r=w;exports.s=R;exports.t=M;exports.u=P;exports.v=S;exports.w=q;exports.x=W;exports.y=v;exports.z=z;
@@ -0,0 +1 @@
1
+ import {a as a$2,b}from'./chunk-5FBZYPQM.mjs';import {a as a$1}from'./chunk-JZXLCA2E.mjs';var U={};a$1(U,{andThen:()=>f,err:()=>b,fromNullable:()=>c,isErr:()=>E,isOk:()=>a,mapErr:()=>i,mapOption:()=>m,mapResult:()=>u,matchOption:()=>s,matchResult:()=>T,none:()=>p,ok:()=>a$2,orElse:()=>l,some:()=>o,toNullable:()=>k,unwrap:()=>x,unwrapOption:()=>O,unwrapOptionOr:()=>R,unwrapOr:()=>y});function o(r){return {some:true,value:r}}function p(){return {some:false}}function u(r,e){return r.ok?a$2(e(r.value)):r}function m(r,e){return r.some?o(e(r.value)):r}function i(r,e){return r.ok?r:b(e(r.error))}function f(r,e){return r.ok?e(r.value):r}function l(r,e){return r.ok?r:e(r.error)}function T(r,e){return r.ok?e.ok(r.value):e.err(r.error)}function s(r,e){return r.some?e.some(r.value):e.none()}function a(r){return r.ok}function E(r){return !r.ok}function x(r){if(r.ok)return r.value;throw r.error instanceof Error?r.error:new Error(String(r.error))}function O(r){if(r.some)return r.value;throw new Error("Called unwrapOption on None")}function y(r,e){return r.ok?r.value:e}function R(r,e){return r.some?r.value:e}function c(r){return r==null?p():o(r)}function k(r){return r.some?r.value:null}export{o as a,p as b,u as c,m as d,i as e,f,l as g,T as h,s as i,a as j,E as k,x as l,O as m,y as n,R as o,c as p,k as q,U as r};
@@ -0,0 +1 @@
1
+ 'use strict';var chunkWOT6VMZA_js=require('./chunk-WOT6VMZA.js');var a={};chunkWOT6VMZA_js.a(a,{assert:()=>t,assertDefined:()=>i,fail:()=>f,identity:()=>u,isDefined:()=>r,isNil:()=>o,noop:()=>s,unreachable:()=>d});function r(e){return e!=null}function o(e){return e==null}function t(e,n="Assertion failed"){if(!e)throw new Error(n)}function i(e,n="Value is not defined"){if(e==null)throw new Error(n)}function f(e){throw new Error(e)}function s(){}function u(e){return e}function d(e,n){throw new Error(n??`Unreachable code reached with value: ${JSON.stringify(e)}`)}exports.a=r;exports.b=o;exports.c=t;exports.d=i;exports.e=f;exports.f=s;exports.g=u;exports.h=d;exports.i=a;
@@ -0,0 +1 @@
1
+ 'use strict';function b(e){return Object.freeze(e)}function K(e){let t={};for(let n of e)t[n]=n;return Object.freeze(t)}function h(...e){return e}function w(e){return new Map(e)}function S(e){return new Set(e)}function v(e){return e}function R(e,t){return t(e)?e:void 0}function x(e={}){return {set(t,n){return x({...e,[t]:n})},build(){return e},current(){return e}}}function E(e){return {config:e,getInitialState:()=>e.initial,transition:(t,n)=>{let r=e.states[t];return r&&"on"in r?r.on[n]??t:t}}}function M(){return new Proxy({},{get:(e,t)=>n=>({type:t,...n})})}function V(){let e=new Map;return {on(t,n){return e.has(t)||e.set(t,new Set),e.get(t).add(n),()=>{e.get(t)?.delete(n);}},emit(t,n){e.get(t)?.forEach(r=>r(n));},off(t,n){e.get(t)?.delete(n);},clear(){e.clear();}}}function _(e,t){return {initialState:e,reduce:(n,r)=>{let o=t[r.type];return o?o(n,r):n}}}var A=Symbol("string"),U=Symbol("number"),O=Symbol("boolean"),I=Symbol("date"),D=Symbol("bigint"),B=Symbol("symbol"),P=Symbol("any"),j=Symbol("unknown"),N=Symbol("null"),C=Symbol("undefined"),q={string:{[A]:true},number:{[U]:true},boolean:{[O]:true},date:{[I]:true},bigint:{[D]:true},symbol:{[B]:true},any:{[P]:true},unknown:{[j]:true},null:{[N]:true},undefined:{[C]:true},array:e=>({__array:e}),optional:e=>({__optional:e}),nullable:e=>({__nullable:e}),literal:e=>({__literal:e}),enum:(...e)=>({__enum:e}),union:(...e)=>({__union:e}),record:e=>({__record:e}),tuple:(...e)=>({__tuple:e}),ref:()=>({__ref:null})};function d(e){return {__schema:null,__definition:e,create(n){return n},partial(n){return n},is(n){if(typeof n!="object"||n===null)return false;for(let r of Object.keys(e))if(!(r in n)){let o=e[r];if(o&&typeof o=="object"&&"__optional"in o)continue;return false}return true},extend(n){return d({...e,...n})},pick(...n){let r={};for(let o of n)r[o]=e[o];return d(r)},omit(...n){let r={...e};for(let o of n)delete r[o];return d(r)},asPartial(){let n={};for(let r of Object.keys(e))n[r]={__optional:e[r]};return d(n)},asRequired(){let n={};for(let r of Object.keys(e)){let o=e[r];o&&typeof o=="object"&&"__optional"in o?n[r]=o.__optional:n[r]=o;}return d(n)}}}function F(e){return d(e)}function W(e,t){return d({...e.__definition,...t.__definition})}function $(e,...t){return e.pick(...t)}function H(e,...t){return e.omit(...t)}function i(e,t){return {parse:e,safeParse(r){try{return {ok:!0,value:e(r)}}catch(o){return {ok:false,error:o instanceof Error?o:new Error(String(o))}}},is(r){if(t)return t(r);try{return e(r),!0}catch{return false}},T:void 0,optional(){return i(r=>r===void 0?void 0:e(r),r=>r===void 0||(t?t(r):true))},nullable(){return i(r=>r===null?null:e(r),r=>r===null||(t?t(r):true))},default(r){return i(o=>o==null?r:e(o))},transform(r){return i(o=>r(e(o)))},refine(r,o="Validation failed"){return i(s=>{let a=e(s);if(!r(a))throw new Error(o);return a})}}}function T(){return i(e=>{if(typeof e!="string")throw new Error(`Expected string, got ${typeof e}`);return e},e=>typeof e=="string")}function L(){return i(e=>{if(typeof e!="number"||Number.isNaN(e))throw new Error(`Expected number, got ${typeof e}`);return e},e=>typeof e=="number"&&!Number.isNaN(e))}function J(){return i(e=>{if(typeof e!="boolean")throw new Error(`Expected boolean, got ${typeof e}`);return e},e=>typeof e=="boolean")}function G(){return i(e=>{if(e instanceof Date)return e;if(typeof e=="string"||typeof e=="number"){let t=new Date(e);if(Number.isNaN(t.getTime()))throw new Error("Invalid date");return t}throw new Error(`Expected date, got ${typeof e}`)},e=>e instanceof Date&&!Number.isNaN(e.getTime()))}function z(e){return i(t=>{if(t!==e)throw new Error(`Expected ${String(e)}, got ${String(t)}`);return e},t=>t===e)}function Y(...e){return i(t=>{if(!e.includes(t))throw new Error(`Expected one of [${e.join(", ")}], got ${String(t)}`);return t},t=>e.includes(t))}function Z(){let e=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return T().refine(t=>e.test(t),"Invalid email")}function Q(){return T().refine(e=>{try{return new URL(e),!0}catch{return false}},"Invalid URL")}function X(){let e=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return T().refine(t=>e.test(t),"Invalid UUID")}function u(e){let n=i(r=>{if(typeof r!="object"||r===null)throw new Error(`Expected object, got ${typeof r}`);let o={},s=e;for(let a of Object.keys(s)){let p=s[a];p&&(o[a]=p.parse(r[a]));}return o},r=>{if(typeof r!="object"||r===null)return false;let o=e;for(let s of Object.keys(o)){let a=o[s];if(a&&!a.is(r[s]))return false}return true});return n.schema=e,n.pick=(...r)=>{let o={};for(let s of r)o[s]=e[s];return u(o)},n.omit=(...r)=>{let o={...e};for(let s of r)delete o[s];return u(o)},n.extend=r=>u({...e,...r}),n.partial=()=>{let r={},o=e;for(let s of Object.keys(o)){let a=o[s];a&&(r[s]=a.optional());}return u(r)},n.merge=r=>u({...e,...r.schema}),n}function ee(e){return i(t=>{if(!Array.isArray(t))throw new Error(`Expected array, got ${typeof t}`);return t.map((n,r)=>{try{return e.parse(n)}catch(o){throw new Error(`[${r}]: ${o instanceof Error?o.message:String(o)}`)}})},t=>Array.isArray(t)&&t.every(n=>e.is(n)))}function te(...e){return i(t=>{if(!Array.isArray(t))throw new Error(`Expected tuple, got ${typeof t}`);if(t.length!==e.length)throw new Error(`Expected ${e.length} elements, got ${t.length}`);return e.map((n,r)=>n.parse(t[r]))},t=>Array.isArray(t)&&t.length===e.length&&e.every((n,r)=>n.is(t[r])))}function ne(e){return i(t=>{if(typeof t!="object"||t===null||Array.isArray(t))throw new Error(`Expected record, got ${typeof t}`);let n={};for(let[r,o]of Object.entries(t))n[r]=e.parse(o);return n},t=>typeof t!="object"||t===null||Array.isArray(t)?false:Object.values(t).every(n=>e.is(n)))}function re(...e){return i(t=>{for(let n of e){let r=n.safeParse(t);if(r.ok)return r.value}throw new Error("Value does not match any union member")},t=>e.some(n=>n.is(t)))}function oe(e,t){return i(n=>{let r=e.parse(n),o=t.parse(n);return {...r,...o}},n=>e.is(n)&&t.is(n))}var se={string:T,number:L,boolean:J,date:G,email:Z,url:Q,uuid:X,literal:z,enum:Y,object:u,array:ee,tuple:te,record:ne,union:re,intersection:oe,any:()=>i(e=>e),unknown:()=>i(e=>e),null:()=>i(e=>{if(e!==null)throw new Error("Expected null");return null}),undefined:()=>i(e=>{if(e!==void 0)throw new Error("Expected undefined")})};var l=class{_items=[];_listeners=new Set;get items(){return this._items}get length(){return this._items.length}notify(){for(let t of this._listeners)t(this._items);}add(t){return this._items.push(t),this.notify(),t}addMany(t){return this._items.push(...t),this.notify(),t}update(t,n){let r=this._items.findIndex(t);if(r!==-1)return this._items[r]={...this._items[r],...n},this.notify(),this._items[r]}updateWhere(t,n,r){return this.update(o=>o[t]===n,r)}remove(t){let n=[];return this._items=this._items.filter(r=>t(r)?(n.push(r),false):true),n.length>0&&this.notify(),n}removeWhere(t,n){return this.remove(o=>o[t]===n)[0]}clear(){this._items=[],this.notify();}findOne(t){return this._items.find(t)}find(t,n){return this._items.find(r=>r[t]===n)}findMany(t){return this._items.filter(t)}where(t){return this.findMany(t)}whereEquals(t,n){return this._items.filter(r=>r[t]===n)}some(t){return this._items.some(t)}every(t){return this._items.every(t)}has(t,n){return this._items.some(r=>r[t]===n)}first(){return this._items[0]}last(){return this._items[this._items.length-1]}at(t){return this._items.at(t)}map(t){return this._items.map(t)}pluck(t){return this._items.map(n=>n[t])}pick(...t){return this._items.map(n=>{let r={};for(let o of t)r[o]=n[o];return r})}omit(...t){return this._items.map(n=>{let r={...n};for(let o of t)delete r[o];return r})}sortBy(t,n="asc"){return [...this._items].sort((r,o)=>{let s=r[t],a=o[t];return s<a?n==="asc"?-1:1:s>a?n==="asc"?1:-1:0})}groupBy(t){let n=new Map;for(let r of this._items){let o=r[t],s=n.get(o)||[];s.push(r),n.set(o,s);}return n}unique(t){return [...new Set(this._items.map(n=>n[t]))]}count(t){return t?this._items.filter(t).length:this._items.length}subscribe(t){return this._listeners.add(t),()=>this._listeners.delete(t)}toArray(){return [...this._items]}toJSON(){return JSON.stringify(this._items)}fromJSON(t){this._items=JSON.parse(t),this.notify();}},c=class extends l{constructor(n){super();this.idKey=n;}byId(n){return this.find(this.idKey,n)}updateById(n,r){return this.updateWhere(this.idKey,n,r)}removeById(n){return this.removeWhere(this.idKey,n)}hasId(n){return this.has(this.idKey,n)}},ie={async get(e){return typeof localStorage>"u"?null:localStorage.getItem(e)},async set(e,t){typeof localStorage>"u"||localStorage.setItem(e,t);},async remove(e){typeof localStorage>"u"||localStorage.removeItem(e);}},f=class extends l{constructor(n,r=ie){super();this.storageKey=n;this.storage=r;}autoSaveEnabled=false;unsubscribe;async save(){await this.storage.set(this.storageKey,this.toJSON());}async load(){let n=await this.storage.get(this.storageKey);n&&this.fromJSON(n);}enableAutoSave(){this.autoSaveEnabled||(this.autoSaveEnabled=true,this.unsubscribe=this.subscribe(()=>{this.save();}));}disableAutoSave(){this.autoSaveEnabled=false,this.unsubscribe?.();}};function ae(e){return new l}function de(e,t){return new c(t)}function ue(e,t,n){return new f(t,n)}function le(e,t){if(t?.persist){let n=new f(t.persist,t.storage);return t.autoSave&&n.enableAutoSave(),n}return t?.idKey?new c(t.idKey):new l}function Te(){return {idle:()=>({status:"idle"}),loading:()=>({status:"loading"}),success:e=>({status:"success",data:e}),error:e=>({status:"error",error:e}),isIdle:e=>e.status==="idle",isLoading:e=>e.status==="loading",isSuccess:e=>e.status==="success",isError:e=>e.status==="error",map:(e,t)=>e.status==="success"?{status:"success",data:t(e.data)}:e,getOrElse:(e,t)=>e.status==="success"?e.data:t}}function ce(e){return {pristine:()=>({status:"pristine",values:e}),dirty:(t,n)=>({status:"dirty",values:t,touched:n}),validating:t=>({status:"validating",values:t}),invalid:(t,n)=>({status:"invalid",values:t,errors:n}),submitting:t=>({status:"submitting",values:t}),submitted:t=>({status:"submitted",values:t}),error:(t,n)=>({status:"error",values:t,error:n}),canSubmit:t=>t.status==="dirty"||t.status==="pristine",isSubmitting:t=>t.status==="submitting",hasErrors:t=>t.status==="invalid"}}function fe(){return {closed:()=>({isOpen:false}),open:e=>({isOpen:true,data:e}),isOpen:e=>e.isOpen}}function ye(e){return {init:()=>({current:e,past:[],future:[],canUndo:false,canRedo:false}),push:(t,n)=>({current:n,past:[...t.past,t.current],future:[],canUndo:true,canRedo:false}),undo:t=>t.past.length===0?t:{current:t.past[t.past.length-1],past:t.past.slice(0,-1),future:[t.current,...t.future],canUndo:t.past.length>1,canRedo:true},redo:t=>t.future.length===0?t:{current:t.future[0],past:[...t.past,t.current],future:t.future.slice(1),canUndo:true,canRedo:t.future.length>1}}}function pe(e,t){return new y(e,t,{})}var y=class e{value;discriminant;handlers;result=void 0;matched=false;constructor(t,n,r){this.value=t,this.discriminant=n,this.handlers=r;}with(t,n){let r={...this.handlers,[t]:n},o=new e(this.value,this.discriminant,r),s=this.value[this.discriminant];return !this.matched&&s===t?(o.result=n(this.value),o.matched=true):(o.result=this.result,o.matched=this.matched),o}exhaustive(){if(this.matched)return this.result;throw new Error(`No handler matched for discriminant value: ${String(this.value[this.discriminant])}`)}otherwise(t){return this.matched?this.result:t(this.value)}run(){return this.exhaustive()}};function xe(e,t){let n=t[e];if(!n)throw new Error(`No handler for value: ${String(e)}`);return n()}function m(e,t,n){let r=e[t],o=n[r];return o(e)}function me(){return e=>(t,n)=>m(t,e,n)}function ge(e){return e}function ke(e){}function be(e){throw new Error(`Unexpected value: ${JSON.stringify(e)}`)}function Ke(e){return e}function he(e){return e}function we(e,t){return {...e,...t}}function Se(...e){return Object.assign({},...e)}function k(e,t){let n={...e};for(let r of Object.keys(t)){let o=t[r],s=e[r];g(o)&&g(s)?n[r]=k(s,o):n[r]=o;}return n}function g(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}function ve(e,t,n){let r={...e,...t};for(let o of Object.keys(n)){let s=n[o];s&&o in e&&o in t&&(r[o]=s(e[o],t[o]));}return r}function Re(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function Ee(e,t){let n={...e};for(let r of t)delete n[r];return n}function Me(e,t){let n={};for(let r of Object.keys(e)){let o=t[r];o!==void 0?n[o]=e[r]:n[r]=e[r];}return n}function Ve(e){return Object.fromEntries(e)}function _e(e,t){let n={};for(let r of Object.keys(e))n[r]=t(e[r],r);return n}function Ae(e,t){let n={};for(let r of Object.keys(e)){let o=t(r);n[o]=e[r];}return n}exports.A=ye;exports.B=pe;exports.C=xe;exports.D=m;exports.E=me;exports.F=ge;exports.G=ke;exports.H=be;exports.I=Ke;exports.J=he;exports.K=we;exports.L=Se;exports.M=k;exports.N=ve;exports.O=Re;exports.P=Ee;exports.Q=Me;exports.R=Ve;exports.S=_e;exports.T=Ae;exports.a=b;exports.b=K;exports.c=h;exports.d=w;exports.e=S;exports.f=v;exports.g=R;exports.h=x;exports.i=E;exports.j=M;exports.k=V;exports.l=_;exports.m=q;exports.n=d;exports.o=F;exports.p=W;exports.q=$;exports.r=H;exports.s=se;exports.t=ae;exports.u=de;exports.v=ue;exports.w=le;exports.x=Te;exports.y=ce;exports.z=fe;
@@ -0,0 +1 @@
1
+ 'use strict';var chunkWOT6VMZA_js=require('./chunk-WOT6VMZA.js');var T={};chunkWOT6VMZA_js.a(T,{assertNever:()=>a,debug:()=>s,deprecated:()=>g,exhaustive:()=>c,getLogLevel:()=>w,invariant:()=>u,log:()=>L,measure:()=>p,measureAsync:()=>v,setLogLevel:()=>x,todo:()=>f});function s(e){return r=>(console.log(`[${e}]`,r),r)}function u(e,r){if(!e)throw new Error(`Invariant violation: ${r}`)}function a(e,r){throw new Error(r??`Unexpected value: ${JSON.stringify(e)}`)}function c(e){throw new Error(`Exhaustive check failed: ${JSON.stringify(e)}`)}function f(e="Not implemented"){throw new Error(`TODO: ${e}`)}var l=new Set;function g(e){l.has(e)||(l.add(e),console.warn(`[DEPRECATED] ${e}`));}function p(e){let r=performance.now(),n=e(),t=performance.now()-r;return {result:n,duration:t}}async function v(e){let r=performance.now(),n=await e(),t=performance.now()-r;return {result:n,duration:t}}var d={debug:0,info:1,warn:2,error:3},i="info";function x(e){i=e;}function w(){return i}function o(e){return d[e]>=d[i]}var L={debug(e,...r){o("debug")&&console.debug(`[DEBUG] ${e}`,...r);},info(e,...r){o("info")&&console.info(`[INFO] ${e}`,...r);},warn(e,...r){o("warn")&&console.warn(`[WARN] ${e}`,...r);},error(e,...r){o("error")&&console.error(`[ERROR] ${e}`,...r);}};exports.a=s;exports.b=u;exports.c=a;exports.d=c;exports.e=f;exports.f=g;exports.g=p;exports.h=v;exports.i=x;exports.j=w;exports.k=L;exports.l=T;
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-JZXLCA2E.mjs';var B={};a$1(B,{clone:()=>b,cloneDeep:()=>K,deepGet:()=>i,deepGetOr:()=>S,deepHas:()=>D,deepMerge:()=>l,deepPath:()=>G,deepPluck:()=>N,deepSet:()=>A,entriesTyped:()=>P,filterObject:()=>j,fromEntriesTyped:()=>g,get:()=>w,has:()=>V,invert:()=>O,isEqual:()=>a,keysTyped:()=>x,mapObject:()=>h,mergeShallow:()=>m,omit:()=>p,paths:()=>U,pick:()=>T,set:()=>y,transform:()=>v,unset:()=>d,valuesTyped:()=>k});function T(e,t){let r={};for(let n of t)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function p(e,t){let r={...e},n=new Set(t);for(let o of n)delete r[o];return r}function x(e){return Object.keys(e)}function k(e){return Object.values(e)}function P(e){return Object.entries(e)}function g(e){return Object.fromEntries(e)}function h(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function j(e,t){let r={};for(let n of Object.keys(e))t(e[n],n)&&(r[n]=e[n]);return r}function m(e,t){return {...e,...t}}function b(e){return Array.isArray(e)?[...e]:{...e}}function K(e){return structuredClone(e)}function w(e,t){let r=e;for(let n of t){if(r==null||typeof r!="object")return;r=r[n];}return r}function y(e,t,r){if(t.length===0)return r;let[n,...o]=t;if(n===void 0)return e;let s=e[n],f=o.length===0?r:y(typeof s=="object"&&s!==null?s:{},o,r);if(Array.isArray(e)){let u=[...e];return u[n]=f,u}return {...e,[n]:f}}function O(e){let t={};for(let r of Object.keys(e)){let n=e[r];n!==void 0&&(t[String(n)]=r);}return t}function l(e,t){let r={...e};for(let n of Object.keys(t)){let o=t[n],s=e[n];R(o)&&R(s)?r[n]=l(s,o):r[n]=o;}return r}function R(e){if(e===null||typeof e!="object")return false;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function a(e,t){if(e===t)return true;if(e===null||t===null)return e===t;if(typeof e!=typeof t)return false;if(typeof e!="object"||typeof t!="object")return e===t;if(Array.isArray(e)!==Array.isArray(t))return false;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return false;for(let o=0;o<e.length;o++)if(!a(e[o],t[o]))return false;return true}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.toString()===t.toString();let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return false;for(let o of r)if(!n.includes(o)||!a(e[o],t[o]))return false;return true}function V(e,t){if(t.length===0)return true;let r=e;for(let n of t){if(r==null||typeof r!="object"||!(n in r))return false;r=r[n];}return true}function d(e,t){if(t.length===0)return e;let r=t[0],n=t.slice(1);if(n.length===0){let s={...e};return delete s[r],s}let o=e[r];return o==null||typeof o!="object"?e:{...e,[r]:d(o,n)}}function U(e){let t=[];function r(n,o){if(n===null||typeof n!="object"){o.length>0&&t.push(o);return}if(Array.isArray(n)){n.length===0?t.push(o):n.forEach((f,u)=>{r(f,[...o,u]);});return}let s=Object.keys(n);if(s.length===0)t.push(o);else for(let f of s)r(n[f],[...o,f]);}return r(e,[]),t}function v(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function i(e,t){let r=t.split("."),n=e;for(let o of r){if(n==null||typeof n!="object")return;n=n[o];}return n}function S(e,t,r){return i(e,t)??r}function A(e,t,r){let n=t.split("."),o=structuredClone(e),s=o;for(let u=0;u<n.length-1;u++){let c=n[u];(s[c]===void 0||s[c]===null)&&(s[c]={}),s=s[c];}let f=n[n.length-1];return s[f]=r,o}function D(e,t){return i(e,t)!==void 0}function G(){return e=>t=>i(t,e)}function N(e,t){return e.map(r=>i(r,t))}export{B as A,T as a,p as b,x as c,k as d,P as e,g as f,h as g,j as h,m as i,b as j,K as k,w as l,y as m,O as n,l as o,a as p,V as q,d as r,U as s,v as t,i as u,S as v,A as w,D as x,G as y,N as z};
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-JZXLCA2E.mjs';var T={};a$1(T,{assertNever:()=>a,debug:()=>s,deprecated:()=>g,exhaustive:()=>c,getLogLevel:()=>w,invariant:()=>u,log:()=>L,measure:()=>p,measureAsync:()=>v,setLogLevel:()=>x,todo:()=>f});function s(e){return r=>(console.log(`[${e}]`,r),r)}function u(e,r){if(!e)throw new Error(`Invariant violation: ${r}`)}function a(e,r){throw new Error(r??`Unexpected value: ${JSON.stringify(e)}`)}function c(e){throw new Error(`Exhaustive check failed: ${JSON.stringify(e)}`)}function f(e="Not implemented"){throw new Error(`TODO: ${e}`)}var l=new Set;function g(e){l.has(e)||(l.add(e),console.warn(`[DEPRECATED] ${e}`));}function p(e){let r=performance.now(),n=e(),t=performance.now()-r;return {result:n,duration:t}}async function v(e){let r=performance.now(),n=await e(),t=performance.now()-r;return {result:n,duration:t}}var d={debug:0,info:1,warn:2,error:3},i="info";function x(e){i=e;}function w(){return i}function o(e){return d[e]>=d[i]}var L={debug(e,...r){o("debug")&&console.debug(`[DEBUG] ${e}`,...r);},info(e,...r){o("info")&&console.info(`[INFO] ${e}`,...r);},warn(e,...r){o("warn")&&console.warn(`[WARN] ${e}`,...r);},error(e,...r){o("error")&&console.error(`[ERROR] ${e}`,...r);}};export{s as a,u as b,a as c,c as d,f as e,g as f,p as g,v as h,x as i,w as j,L as k,T as l};
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-JZXLCA2E.mjs';var P={};a$1(P,{createIterator:()=>a,cycle:()=>v,enumerate:()=>p,fromAsync:()=>u,iterEvery:()=>w,iterFind:()=>L,iterForEach:()=>x,iterReduce:()=>h,iterSome:()=>k,lazyChunk:()=>m,lazyFilter:()=>y,lazyFlatten:()=>I,lazyMap:()=>s,lazyRange:()=>c,lazySkip:()=>d,lazyTake:()=>T,lazyZip:()=>b,repeat:()=>z,toArray:()=>U});function a(o){let n=()=>typeof o=="function"?o():o[Symbol.iterator]();return {[Symbol.iterator](){return n()},map(e){let t=this;return a(function*(){let r=0;for(let i of t)yield e(i,r++);})},filter(e){let t=this;return a(function*(){let r=0;for(let i of t)e(i,r++)&&(yield i);})},take(e){let t=this;return a(function*(){let r=0;for(let i of t){if(r>=e)break;yield i,r++;}})},skip(e){let t=this;return a(function*(){let r=0;for(let i of t)r>=e&&(yield i),r++;})},takeWhile(e){let t=this;return a(function*(){for(let r of t){if(!e(r))break;yield r;}})},skipWhile(e){let t=this;return a(function*(){let r=true;for(let i of t)r&&e(i)||(r=false,yield i);})},flatMap(e){let t=this;return a(function*(){for(let r of t)yield*e(r);})},flatten(){let e=this;return a(function*(){for(let t of e)yield*t;})},chunk(e){let t=this;return a(function*(){let r=[];for(let i of t)r.push(i),r.length===e&&(yield r,r=[]);r.length>0&&(yield r);})},enumerate(){let e=this;return a(function*(){let t=0;for(let r of e)yield [t++,r];})},zip(e){let t=this;return a(function*(){let r=t[Symbol.iterator](),i=e[Symbol.iterator]();for(;;){let l=r.next(),f=i.next();if(l.done||f.done)break;yield [l.value,f.value];}})},concat(...e){let t=this;return a(function*(){yield*t;for(let r of e)yield*r;})},unique(e){let t=this;return a(function*(){let r=new Set;for(let i of t){let l=e?e(i):i;r.has(l)||(r.add(l),yield i);}})},toArray(){return [...this]},reduce(e,t){let r=t;for(let i of this)r=e(r,i);return r},forEach(e){let t=0;for(let r of this)e(r,t++);},find(e){for(let t of this)if(e(t))return t},some(e){for(let t of this)if(e(t))return true;return false},every(e){for(let t of this)if(!e(t))return false;return true},first(){for(let e of this)return e},last(){let e;for(let t of this)e=t;return e},count(){let e=0;for(let t of this)e++;return e},collect(e){return e(this)}}}function c(o,n,e=1){return a(function*(){if(e>0)for(let t=o;t<n;t+=e)yield t;else if(e<0)for(let t=o;t>n;t+=e)yield t;})}function s(o,n){return a(function*(){let e=0;for(let t of o)yield n(t,e++);})}function y(o,n){return a(function*(){let e=0;for(let t of o)n(t,e++)&&(yield t);})}function T(o,n){return a(function*(){let e=0;for(let t of o){if(e>=n)break;yield t,e++;}})}function d(o,n){return a(function*(){let e=0;for(let t of o)e>=n&&(yield t),e++;})}function m(o,n){return a(function*(){let e=[];for(let t of o)e.push(t),e.length===n&&(yield e,e=[]);e.length>0&&(yield e);})}function I(o){return a(function*(){for(let n of o)yield*n;})}function b(o,n){return a(function*(){let e=o[Symbol.iterator](),t=n[Symbol.iterator]();for(;;){let r=e.next(),i=t.next();if(r.done||i.done)break;yield [r.value,i.value];}})}function p(o){return a(function*(){let n=0;for(let e of o)yield [n++,e];})}function v(o){return a(function*(){let n=[];for(let e of o)n.push(e),yield e;if(n.length!==0)for(;;)for(let e of n)yield e;})}function z(o,n){return a(function*(){if(n===void 0)for(;;)yield o;else for(let e=0;e<n;e++)yield o;})}function u(o){let n=()=>typeof o=="function"?o():o[Symbol.asyncIterator]();return {[Symbol.asyncIterator](){return n()},map(e){let t=this;return u(async function*(){let r=0;for await(let i of t)yield await e(i,r++);})},filter(e){let t=this;return u(async function*(){for await(let r of t)await e(r)&&(yield r);})},take(e){let t=this;return u(async function*(){let r=0;for await(let i of t){if(r>=e)break;yield i,r++;}})},skip(e){let t=this;return u(async function*(){let r=0;for await(let i of t)r>=e&&(yield i),r++;})},async toArray(){let e=[];for await(let t of this)e.push(t);return e},async reduce(e,t){let r=t;for await(let i of this)r=await e(r,i);return r},async forEach(e){let t=0;for await(let r of this)await e(r,t++);},async find(e){for await(let t of this)if(await e(t))return t},async first(){for await(let e of this)return e},async count(){let e=0;for await(let t of this)e++;return e}}}function U(o){return [...o]}function h(o,n,e){let t=e;for(let r of o)t=n(t,r);return t}function x(o,n){let e=0;for(let t of o)n(t,e++);}function L(o,n){for(let e of o)if(n(e))return e}function k(o,n){for(let e of o)if(n(e))return true;return false}function w(o,n){for(let e of o)if(!n(e))return false;return true}export{a,c as b,s as c,y as d,T as e,d as f,m as g,I as h,b as i,p as j,v as k,z as l,u as m,U as n,h as o,x as p,L as q,k as r,w as s,P as t};
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-JZXLCA2E.mjs';var a={};a$1(a,{assert:()=>t,assertDefined:()=>i,fail:()=>f,identity:()=>u,isDefined:()=>r,isNil:()=>o,noop:()=>s,unreachable:()=>d});function r(e){return e!=null}function o(e){return e==null}function t(e,n="Assertion failed"){if(!e)throw new Error(n)}function i(e,n="Value is not defined"){if(e==null)throw new Error(n)}function f(e){throw new Error(e)}function s(){}function u(e){return e}function d(e,n){throw new Error(n??`Unreachable code reached with value: ${JSON.stringify(e)}`)}export{r as a,o as b,t as c,i as d,f as e,s as f,u as g,d as h,a as i};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-JZXLCA2E.mjs';var C={};a(C,{camelCase:()=>o,capitalize:()=>n,kebabCase:()=>p,pascalCase:()=>c,slugify:()=>g,snakeCase:()=>s,template:()=>u,truncate:()=>l,uncapitalize:()=>i,words:()=>f});function n(e){return e.length===0?"":e.charAt(0).toUpperCase()+e.slice(1)}function i(e){return e.length===0?"":e.charAt(0).toLowerCase()+e.slice(1)}function o(e){return e.replace(/[-_\s]+(.)?/g,(r,t)=>t?t.toUpperCase():"").replace(/^[A-Z]/,r=>r.toLowerCase())}function p(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}function s(e){return e.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[\s-]+/g,"_").toLowerCase()}function c(e){return e.replace(/[-_\s]+(.)?/g,(r,t)=>t?t.toUpperCase():"").replace(/^[a-z]/,r=>r.toUpperCase())}function l(e,r,t="..."){return e.length<=r?e:e.slice(0,r)+t}function g(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/[\s_]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function u(e,r){return e.replace(/\{\{(\w+)\}\}/g,(t,a)=>a in r?String(r[a]):`{{${a}}}`)}function f(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/[-_]+/g," ").trim().split(/\s+/).filter(Boolean)}export{n as a,i as b,o as c,p as d,s as e,c as f,l as g,g as h,u as i,f as j,C as k};
@@ -0,0 +1 @@
1
+ 'use strict';var chunkWOT6VMZA_js=require('./chunk-WOT6VMZA.js');var rn={};chunkWOT6VMZA_js.a(rn,{allDefined:()=>S,allTrue:()=>R,allTruthy:()=>G,allWhere:()=>W,and:()=>g,andThen:()=>C,anyTrue:()=>B,chain:()=>u,coalesce:()=>v,coalesceLazy:()=>z,cond:()=>x,condBy:()=>w,condLazy:()=>h,defaultTo:()=>L,defaultToIf:()=>j,defaultToIfEmpty:()=>N,defaultToLazy:()=>K,firstDefined:()=>V,firstTruthy:()=>F,firstWhere:()=>E,get:()=>f,getOr:()=>i,getOrLazy:()=>q,getPath:()=>H,getPathOr:()=>M,getTyped:()=>I,ifElse:()=>y,ifElseLazy:()=>s,matchLazy:()=>D,matchType:()=>b,matchValue:()=>m,matchWithDefault:()=>k,not:()=>A,notFn:()=>U,optional:()=>_,optionalChain:()=>nn,optionalOr:()=>$,or:()=>P,orThen:()=>O,safe:()=>Y,tryGet:()=>J,tryGetOr:()=>Q,tryGetResult:()=>X,unless:()=>c,unlessValue:()=>p,unwrap:()=>Z,when:()=>T,whenValue:()=>a});function T(n,e){if(n)return e()}function a(n,e){return n?e:void 0}function c(n,e){if(!n)return e()}function p(n,e){return n?void 0:e}function y(n,e,r){return n?e:r}function s(n,e,r){return n?e():r()}function x(...n){for(let[e,r]of n)if(e)return r}function h(...n){for(let[e,r]of n)if(e)return r()}function w(n,...e){for(let[r,t]of e)if(r(n))return t}function m(n,e){return e[n]}function k(n,e,r){let t=e[n];return t!==void 0?t:r}function D(n,e){return e[n]()}function b(n,e){for(let[r,t]of e)if(r(n))return t(n)}function g(...n){if(n.length===0)return;for(let r=0;r<n.length-1;r++){let t=n[r];if(!t)return t}let e=n[n.length-1];return typeof e=="function"?e():e}function R(...n){return n.every(Boolean)}function C(n,e){return n.every(Boolean)?e():void 0}function P(...n){if(n.length!==0){for(let e of n)if(e)return e;return n[n.length-1]}}function B(...n){return n.some(Boolean)}function O(n,e){return n.some(Boolean)?e():void 0}function A(n){return !n}function U(n){return (...e)=>!n(...e)}function v(...n){for(let e of n)if(e!=null)return e}function z(...n){for(let e of n){let r=e();if(r!=null)return r}}function L(n,e){return n??e}function K(n,e){return n??e()}function j(n,e,r){return e(n)?n:r}function N(n,e){return n==null||n===""||Array.isArray(n)&&n.length===0||typeof n=="object"&&Object.keys(n).length===0?e:n}function F(n){for(let e of n)if(e)return e}function E(n,e){for(let r of n)if(e(r))return r}function V(n){for(let e of n)if(e!=null)return e}function G(n){return n.every(Boolean)}function W(n,e){return n.every(e)}function S(n){return n.every(e=>e!=null)}function f(n,...e){let r=n;for(let t of e){if(r==null)return;r=r[t];}return r}function I(n,e){return f(n,...e)}function H(n,e){let r=e.split(".").map(t=>{let o=Number(t);return Number.isNaN(o)?t:o});return f(n,...r)}function i(n,e,...r){let t=n;for(let o of r){if(t==null)return e;t=t[o];}return t??e}function M(n,e,r){let t=r.split(".").map(o=>{let l=Number(o);return Number.isNaN(l)?o:l});return i(n,e,...t)}function q(n,e,...r){let t=n;for(let o of r){if(t==null)return e();t=t[o];}return t??e()}function J(n){try{return n()}catch{return}}function Q(n,e){try{return n()}catch{return e}}function X(n){try{return {ok:!0,value:n()}}catch(e){return {ok:false,error:e}}}function Y(n){let e={get(r,t){if(r==null)return d();let o=r[t];return o==null?d():typeof o=="object"?new Proxy(o,e):o}};return n==null?d():new Proxy(n,e)}function d(){let n={get(){return d()}};return new Proxy({},n)}function Z(n){if(n!=null&&!(typeof n=="object"&&Object.keys(n).length===0))return n}function u(n){return {map(e){return n==null?u(void 0):u(e(n))},flatMap(e){return n==null?u(void 0):e(n)},filter(e){return n==null?u(void 0):e(n)?u(n):u(void 0)},tap(e){return n!=null&&e(n),u(n)},value(){return n??void 0},valueOr(e){return n??e},valueOrThrow(e){if(n==null)throw new Error(e??"Value is null or undefined");return n}}}function _(n,e){if(n!=null)return e(n)}function $(n,e,r){return n==null?r:e(n)}function nn(n,...e){let r=n;for(let t of e){if(r==null)return;r=t(r);}return r??void 0}exports.A=N;exports.B=F;exports.C=E;exports.D=V;exports.E=G;exports.F=W;exports.G=S;exports.H=f;exports.I=I;exports.J=H;exports.K=i;exports.L=M;exports.M=q;exports.N=J;exports.O=Q;exports.P=X;exports.Q=Y;exports.R=Z;exports.S=u;exports.T=_;exports.U=$;exports.V=nn;exports.W=rn;exports.a=T;exports.b=a;exports.c=c;exports.d=p;exports.e=y;exports.f=s;exports.g=x;exports.h=h;exports.i=w;exports.j=m;exports.k=k;exports.l=D;exports.m=b;exports.n=g;exports.o=R;exports.p=C;exports.q=P;exports.r=B;exports.s=O;exports.t=A;exports.u=U;exports.v=v;exports.w=z;exports.x=L;exports.y=K;exports.z=j;
@@ -0,0 +1 @@
1
+ 'use strict';var chunkWOT6VMZA_js=require('./chunk-WOT6VMZA.js');var j={};chunkWOT6VMZA_js.a(j,{Bind:()=>d,Debounce:()=>y,Deprecated:()=>g,Frozen:()=>b,Lazy:()=>x,Log:()=>T,Measure:()=>h,Memoize:()=>f,Retry:()=>m,Sealed:()=>k,Throttle:()=>w,Validate:()=>D});function f(t){return function(i,u,n){let e=n.value;if(typeof e!="function")throw new Error("@Memoize can only be applied to methods");let r=new Map;return n.value=function(...o){let a=t?t(...o):o[0];if(r.has(a))return r.get(a);let s=e.apply(this,o);return r.set(a,s),s},n}}function y(t){return function(i,u,n){let e=n.value;if(typeof e!="function")throw new Error("@Debounce can only be applied to methods");let r;return n.value=function(...o){r!==void 0&&clearTimeout(r),r=setTimeout(()=>{e.apply(this,o);},t);},n}}function w(t){return function(i,u,n){let e=n.value;if(typeof e!="function")throw new Error("@Throttle can only be applied to methods");let r=0,o;return n.value=function(...a){let s=Date.now(),p=t-(s-r);p<=0?(o!==void 0&&(clearTimeout(o),o=void 0),r=s,e.apply(this,a)):o===void 0&&(o=setTimeout(()=>{r=Date.now(),o=void 0,e.apply(this,a);},p));},n}}function d(){return function(t,i,u){let n=u.value;if(typeof n!="function")throw new Error("@Bind can only be applied to methods");return {configurable:true,enumerable:false,get(){let e=n.bind(this);return Object.defineProperty(this,i,{value:e,configurable:true,writable:true}),e}}}}function T(t){let i=t?.prefix??"";return function(u,n,e){let r=e.value;if(typeof r!="function")throw new Error("@Log can only be applied to methods");return e.value=function(...o){let a=String(n),s=o.map(c=>JSON.stringify(c)).join(", "),p=r.apply(this,o);return p instanceof Promise?p.then(c=>(console.log(`${i}${a}(${s}) => ${JSON.stringify(c)}`),c)):(console.log(`${i}${a}(${s}) => ${JSON.stringify(p)}`),p)},e}}function h(t){return function(i,u,n){let e=n.value;if(typeof e!="function")throw new Error("@Measure can only be applied to methods");let r=t?.label??String(u);return n.value=function(...o){let a=performance.now(),s=e.apply(this,o);if(s instanceof Promise)return s.finally(()=>{let c=performance.now()-a;console.log(`${r} took ${c.toFixed(2)}ms`);});let p=performance.now()-a;return console.log(`${r} took ${p.toFixed(2)}ms`),s},n}}function m(t){let i=t?.attempts??3,u=t?.delay??0,n=t?.onRetry;return function(e,r,o){let a=o.value;if(typeof a!="function")throw new Error("@Retry can only be applied to methods");return o.value=async function(...s){let p;for(let c=1;c<=i;c++)try{let l=a.apply(this,s);return l instanceof Promise?await l:l}catch(l){p=l,c<i&&(n?.(l,c),u>0&&await new Promise(P=>setTimeout(P,u)));}throw p},o}}function g(t){return function(i,u,n){let e=n.value;if(typeof e!="function")throw new Error("@Deprecated can only be applied to methods");let r=String(u),o=t?`${r} is deprecated: ${t}`:`${r} is deprecated`;return n.value=function(...a){return console.warn(o),e.apply(this,a)},n}}function k(){return function(t){return Object.seal(t),Object.seal(t.prototype),t}}function b(){return function(t){return Object.freeze(t),Object.freeze(t.prototype),t}}function D(t,i){return function(u,n,e){let r=e.value;if(typeof r!="function")throw new Error("@Validate can only be applied to methods");let o=String(n);return e.value=function(...a){if(!t(...a))throw new Error(i??`Validation failed for ${o}`);return r.apply(this,a)},e}}function x(){return function(t,i,u){let n=u.get;if(typeof n!="function")throw new Error("@Lazy can only be applied to getters");return u.get=function(){let e=n.call(this);return Object.defineProperty(this,i,{value:e,configurable:false,writable:false}),e},u}}exports.a=f;exports.b=y;exports.c=w;exports.d=d;exports.e=T;exports.f=h;exports.g=m;exports.h=g;exports.i=k;exports.j=b;exports.k=D;exports.l=x;exports.m=j;
@@ -0,0 +1 @@
1
+ var d=Object.defineProperty;var e=(c,a)=>{for(var b in a)d(c,b,{get:a[b],enumerable:true});};export{e as a};
@@ -0,0 +1 @@
1
+ function b(e){return Object.freeze(e)}function K(e){let t={};for(let n of e)t[n]=n;return Object.freeze(t)}function h(...e){return e}function w(e){return new Map(e)}function S(e){return new Set(e)}function v(e){return e}function R(e,t){return t(e)?e:void 0}function x(e={}){return {set(t,n){return x({...e,[t]:n})},build(){return e},current(){return e}}}function E(e){return {config:e,getInitialState:()=>e.initial,transition:(t,n)=>{let r=e.states[t];return r&&"on"in r?r.on[n]??t:t}}}function M(){return new Proxy({},{get:(e,t)=>n=>({type:t,...n})})}function V(){let e=new Map;return {on(t,n){return e.has(t)||e.set(t,new Set),e.get(t).add(n),()=>{e.get(t)?.delete(n);}},emit(t,n){e.get(t)?.forEach(r=>r(n));},off(t,n){e.get(t)?.delete(n);},clear(){e.clear();}}}function _(e,t){return {initialState:e,reduce:(n,r)=>{let o=t[r.type];return o?o(n,r):n}}}var A=Symbol("string"),U=Symbol("number"),O=Symbol("boolean"),I=Symbol("date"),D=Symbol("bigint"),B=Symbol("symbol"),P=Symbol("any"),j=Symbol("unknown"),N=Symbol("null"),C=Symbol("undefined"),q={string:{[A]:true},number:{[U]:true},boolean:{[O]:true},date:{[I]:true},bigint:{[D]:true},symbol:{[B]:true},any:{[P]:true},unknown:{[j]:true},null:{[N]:true},undefined:{[C]:true},array:e=>({__array:e}),optional:e=>({__optional:e}),nullable:e=>({__nullable:e}),literal:e=>({__literal:e}),enum:(...e)=>({__enum:e}),union:(...e)=>({__union:e}),record:e=>({__record:e}),tuple:(...e)=>({__tuple:e}),ref:()=>({__ref:null})};function d(e){return {__schema:null,__definition:e,create(n){return n},partial(n){return n},is(n){if(typeof n!="object"||n===null)return false;for(let r of Object.keys(e))if(!(r in n)){let o=e[r];if(o&&typeof o=="object"&&"__optional"in o)continue;return false}return true},extend(n){return d({...e,...n})},pick(...n){let r={};for(let o of n)r[o]=e[o];return d(r)},omit(...n){let r={...e};for(let o of n)delete r[o];return d(r)},asPartial(){let n={};for(let r of Object.keys(e))n[r]={__optional:e[r]};return d(n)},asRequired(){let n={};for(let r of Object.keys(e)){let o=e[r];o&&typeof o=="object"&&"__optional"in o?n[r]=o.__optional:n[r]=o;}return d(n)}}}function F(e){return d(e)}function W(e,t){return d({...e.__definition,...t.__definition})}function $(e,...t){return e.pick(...t)}function H(e,...t){return e.omit(...t)}function i(e,t){return {parse:e,safeParse(r){try{return {ok:!0,value:e(r)}}catch(o){return {ok:false,error:o instanceof Error?o:new Error(String(o))}}},is(r){if(t)return t(r);try{return e(r),!0}catch{return false}},T:void 0,optional(){return i(r=>r===void 0?void 0:e(r),r=>r===void 0||(t?t(r):true))},nullable(){return i(r=>r===null?null:e(r),r=>r===null||(t?t(r):true))},default(r){return i(o=>o==null?r:e(o))},transform(r){return i(o=>r(e(o)))},refine(r,o="Validation failed"){return i(s=>{let a=e(s);if(!r(a))throw new Error(o);return a})}}}function T(){return i(e=>{if(typeof e!="string")throw new Error(`Expected string, got ${typeof e}`);return e},e=>typeof e=="string")}function L(){return i(e=>{if(typeof e!="number"||Number.isNaN(e))throw new Error(`Expected number, got ${typeof e}`);return e},e=>typeof e=="number"&&!Number.isNaN(e))}function J(){return i(e=>{if(typeof e!="boolean")throw new Error(`Expected boolean, got ${typeof e}`);return e},e=>typeof e=="boolean")}function G(){return i(e=>{if(e instanceof Date)return e;if(typeof e=="string"||typeof e=="number"){let t=new Date(e);if(Number.isNaN(t.getTime()))throw new Error("Invalid date");return t}throw new Error(`Expected date, got ${typeof e}`)},e=>e instanceof Date&&!Number.isNaN(e.getTime()))}function z(e){return i(t=>{if(t!==e)throw new Error(`Expected ${String(e)}, got ${String(t)}`);return e},t=>t===e)}function Y(...e){return i(t=>{if(!e.includes(t))throw new Error(`Expected one of [${e.join(", ")}], got ${String(t)}`);return t},t=>e.includes(t))}function Z(){let e=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return T().refine(t=>e.test(t),"Invalid email")}function Q(){return T().refine(e=>{try{return new URL(e),!0}catch{return false}},"Invalid URL")}function X(){let e=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return T().refine(t=>e.test(t),"Invalid UUID")}function u(e){let n=i(r=>{if(typeof r!="object"||r===null)throw new Error(`Expected object, got ${typeof r}`);let o={},s=e;for(let a of Object.keys(s)){let p=s[a];p&&(o[a]=p.parse(r[a]));}return o},r=>{if(typeof r!="object"||r===null)return false;let o=e;for(let s of Object.keys(o)){let a=o[s];if(a&&!a.is(r[s]))return false}return true});return n.schema=e,n.pick=(...r)=>{let o={};for(let s of r)o[s]=e[s];return u(o)},n.omit=(...r)=>{let o={...e};for(let s of r)delete o[s];return u(o)},n.extend=r=>u({...e,...r}),n.partial=()=>{let r={},o=e;for(let s of Object.keys(o)){let a=o[s];a&&(r[s]=a.optional());}return u(r)},n.merge=r=>u({...e,...r.schema}),n}function ee(e){return i(t=>{if(!Array.isArray(t))throw new Error(`Expected array, got ${typeof t}`);return t.map((n,r)=>{try{return e.parse(n)}catch(o){throw new Error(`[${r}]: ${o instanceof Error?o.message:String(o)}`)}})},t=>Array.isArray(t)&&t.every(n=>e.is(n)))}function te(...e){return i(t=>{if(!Array.isArray(t))throw new Error(`Expected tuple, got ${typeof t}`);if(t.length!==e.length)throw new Error(`Expected ${e.length} elements, got ${t.length}`);return e.map((n,r)=>n.parse(t[r]))},t=>Array.isArray(t)&&t.length===e.length&&e.every((n,r)=>n.is(t[r])))}function ne(e){return i(t=>{if(typeof t!="object"||t===null||Array.isArray(t))throw new Error(`Expected record, got ${typeof t}`);let n={};for(let[r,o]of Object.entries(t))n[r]=e.parse(o);return n},t=>typeof t!="object"||t===null||Array.isArray(t)?false:Object.values(t).every(n=>e.is(n)))}function re(...e){return i(t=>{for(let n of e){let r=n.safeParse(t);if(r.ok)return r.value}throw new Error("Value does not match any union member")},t=>e.some(n=>n.is(t)))}function oe(e,t){return i(n=>{let r=e.parse(n),o=t.parse(n);return {...r,...o}},n=>e.is(n)&&t.is(n))}var se={string:T,number:L,boolean:J,date:G,email:Z,url:Q,uuid:X,literal:z,enum:Y,object:u,array:ee,tuple:te,record:ne,union:re,intersection:oe,any:()=>i(e=>e),unknown:()=>i(e=>e),null:()=>i(e=>{if(e!==null)throw new Error("Expected null");return null}),undefined:()=>i(e=>{if(e!==void 0)throw new Error("Expected undefined")})};var l=class{_items=[];_listeners=new Set;get items(){return this._items}get length(){return this._items.length}notify(){for(let t of this._listeners)t(this._items);}add(t){return this._items.push(t),this.notify(),t}addMany(t){return this._items.push(...t),this.notify(),t}update(t,n){let r=this._items.findIndex(t);if(r!==-1)return this._items[r]={...this._items[r],...n},this.notify(),this._items[r]}updateWhere(t,n,r){return this.update(o=>o[t]===n,r)}remove(t){let n=[];return this._items=this._items.filter(r=>t(r)?(n.push(r),false):true),n.length>0&&this.notify(),n}removeWhere(t,n){return this.remove(o=>o[t]===n)[0]}clear(){this._items=[],this.notify();}findOne(t){return this._items.find(t)}find(t,n){return this._items.find(r=>r[t]===n)}findMany(t){return this._items.filter(t)}where(t){return this.findMany(t)}whereEquals(t,n){return this._items.filter(r=>r[t]===n)}some(t){return this._items.some(t)}every(t){return this._items.every(t)}has(t,n){return this._items.some(r=>r[t]===n)}first(){return this._items[0]}last(){return this._items[this._items.length-1]}at(t){return this._items.at(t)}map(t){return this._items.map(t)}pluck(t){return this._items.map(n=>n[t])}pick(...t){return this._items.map(n=>{let r={};for(let o of t)r[o]=n[o];return r})}omit(...t){return this._items.map(n=>{let r={...n};for(let o of t)delete r[o];return r})}sortBy(t,n="asc"){return [...this._items].sort((r,o)=>{let s=r[t],a=o[t];return s<a?n==="asc"?-1:1:s>a?n==="asc"?1:-1:0})}groupBy(t){let n=new Map;for(let r of this._items){let o=r[t],s=n.get(o)||[];s.push(r),n.set(o,s);}return n}unique(t){return [...new Set(this._items.map(n=>n[t]))]}count(t){return t?this._items.filter(t).length:this._items.length}subscribe(t){return this._listeners.add(t),()=>this._listeners.delete(t)}toArray(){return [...this._items]}toJSON(){return JSON.stringify(this._items)}fromJSON(t){this._items=JSON.parse(t),this.notify();}},c=class extends l{constructor(n){super();this.idKey=n;}byId(n){return this.find(this.idKey,n)}updateById(n,r){return this.updateWhere(this.idKey,n,r)}removeById(n){return this.removeWhere(this.idKey,n)}hasId(n){return this.has(this.idKey,n)}},ie={async get(e){return typeof localStorage>"u"?null:localStorage.getItem(e)},async set(e,t){typeof localStorage>"u"||localStorage.setItem(e,t);},async remove(e){typeof localStorage>"u"||localStorage.removeItem(e);}},f=class extends l{constructor(n,r=ie){super();this.storageKey=n;this.storage=r;}autoSaveEnabled=false;unsubscribe;async save(){await this.storage.set(this.storageKey,this.toJSON());}async load(){let n=await this.storage.get(this.storageKey);n&&this.fromJSON(n);}enableAutoSave(){this.autoSaveEnabled||(this.autoSaveEnabled=true,this.unsubscribe=this.subscribe(()=>{this.save();}));}disableAutoSave(){this.autoSaveEnabled=false,this.unsubscribe?.();}};function ae(e){return new l}function de(e,t){return new c(t)}function ue(e,t,n){return new f(t,n)}function le(e,t){if(t?.persist){let n=new f(t.persist,t.storage);return t.autoSave&&n.enableAutoSave(),n}return t?.idKey?new c(t.idKey):new l}function Te(){return {idle:()=>({status:"idle"}),loading:()=>({status:"loading"}),success:e=>({status:"success",data:e}),error:e=>({status:"error",error:e}),isIdle:e=>e.status==="idle",isLoading:e=>e.status==="loading",isSuccess:e=>e.status==="success",isError:e=>e.status==="error",map:(e,t)=>e.status==="success"?{status:"success",data:t(e.data)}:e,getOrElse:(e,t)=>e.status==="success"?e.data:t}}function ce(e){return {pristine:()=>({status:"pristine",values:e}),dirty:(t,n)=>({status:"dirty",values:t,touched:n}),validating:t=>({status:"validating",values:t}),invalid:(t,n)=>({status:"invalid",values:t,errors:n}),submitting:t=>({status:"submitting",values:t}),submitted:t=>({status:"submitted",values:t}),error:(t,n)=>({status:"error",values:t,error:n}),canSubmit:t=>t.status==="dirty"||t.status==="pristine",isSubmitting:t=>t.status==="submitting",hasErrors:t=>t.status==="invalid"}}function fe(){return {closed:()=>({isOpen:false}),open:e=>({isOpen:true,data:e}),isOpen:e=>e.isOpen}}function ye(e){return {init:()=>({current:e,past:[],future:[],canUndo:false,canRedo:false}),push:(t,n)=>({current:n,past:[...t.past,t.current],future:[],canUndo:true,canRedo:false}),undo:t=>t.past.length===0?t:{current:t.past[t.past.length-1],past:t.past.slice(0,-1),future:[t.current,...t.future],canUndo:t.past.length>1,canRedo:true},redo:t=>t.future.length===0?t:{current:t.future[0],past:[...t.past,t.current],future:t.future.slice(1),canUndo:true,canRedo:t.future.length>1}}}function pe(e,t){return new y(e,t,{})}var y=class e{value;discriminant;handlers;result=void 0;matched=false;constructor(t,n,r){this.value=t,this.discriminant=n,this.handlers=r;}with(t,n){let r={...this.handlers,[t]:n},o=new e(this.value,this.discriminant,r),s=this.value[this.discriminant];return !this.matched&&s===t?(o.result=n(this.value),o.matched=true):(o.result=this.result,o.matched=this.matched),o}exhaustive(){if(this.matched)return this.result;throw new Error(`No handler matched for discriminant value: ${String(this.value[this.discriminant])}`)}otherwise(t){return this.matched?this.result:t(this.value)}run(){return this.exhaustive()}};function xe(e,t){let n=t[e];if(!n)throw new Error(`No handler for value: ${String(e)}`);return n()}function m(e,t,n){let r=e[t],o=n[r];return o(e)}function me(){return e=>(t,n)=>m(t,e,n)}function ge(e){return e}function ke(e){}function be(e){throw new Error(`Unexpected value: ${JSON.stringify(e)}`)}function Ke(e){return e}function he(e){return e}function we(e,t){return {...e,...t}}function Se(...e){return Object.assign({},...e)}function k(e,t){let n={...e};for(let r of Object.keys(t)){let o=t[r],s=e[r];g(o)&&g(s)?n[r]=k(s,o):n[r]=o;}return n}function g(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&Object.getPrototypeOf(e)===Object.prototype}function ve(e,t,n){let r={...e,...t};for(let o of Object.keys(n)){let s=n[o];s&&o in e&&o in t&&(r[o]=s(e[o],t[o]));}return r}function Re(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function Ee(e,t){let n={...e};for(let r of t)delete n[r];return n}function Me(e,t){let n={};for(let r of Object.keys(e)){let o=t[r];o!==void 0?n[o]=e[r]:n[r]=e[r];}return n}function Ve(e){return Object.fromEntries(e)}function _e(e,t){let n={};for(let r of Object.keys(e))n[r]=t(e[r],r);return n}function Ae(e,t){let n={};for(let r of Object.keys(e)){let o=t(r);n[o]=e[r];}return n}export{ye as A,pe as B,xe as C,m as D,me as E,ge as F,ke as G,be as H,Ke as I,he as J,we as K,Se as L,k as M,ve as N,Re as O,Ee as P,Me as Q,Ve as R,_e as S,Ae as T,b as a,K as b,h as c,w as d,S as e,v as f,R as g,x as h,E as i,M as j,V as k,_ as l,q as m,d as n,F as o,W as p,$ as q,H as r,se as s,ae as t,de as u,ue as v,le as w,Te as x,ce as y,fe as z};
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-JZXLCA2E.mjs';var rn={};a$1(rn,{allDefined:()=>S,allTrue:()=>R,allTruthy:()=>G,allWhere:()=>W,and:()=>g,andThen:()=>C,anyTrue:()=>B,chain:()=>u,coalesce:()=>v,coalesceLazy:()=>z,cond:()=>x,condBy:()=>w,condLazy:()=>h,defaultTo:()=>L,defaultToIf:()=>j,defaultToIfEmpty:()=>N,defaultToLazy:()=>K,firstDefined:()=>V,firstTruthy:()=>F,firstWhere:()=>E,get:()=>f,getOr:()=>i,getOrLazy:()=>q,getPath:()=>H,getPathOr:()=>M,getTyped:()=>I,ifElse:()=>y,ifElseLazy:()=>s,matchLazy:()=>D,matchType:()=>b,matchValue:()=>m,matchWithDefault:()=>k,not:()=>A,notFn:()=>U,optional:()=>_,optionalChain:()=>nn,optionalOr:()=>$,or:()=>P,orThen:()=>O,safe:()=>Y,tryGet:()=>J,tryGetOr:()=>Q,tryGetResult:()=>X,unless:()=>c,unlessValue:()=>p,unwrap:()=>Z,when:()=>T,whenValue:()=>a});function T(n,e){if(n)return e()}function a(n,e){return n?e:void 0}function c(n,e){if(!n)return e()}function p(n,e){return n?void 0:e}function y(n,e,r){return n?e:r}function s(n,e,r){return n?e():r()}function x(...n){for(let[e,r]of n)if(e)return r}function h(...n){for(let[e,r]of n)if(e)return r()}function w(n,...e){for(let[r,t]of e)if(r(n))return t}function m(n,e){return e[n]}function k(n,e,r){let t=e[n];return t!==void 0?t:r}function D(n,e){return e[n]()}function b(n,e){for(let[r,t]of e)if(r(n))return t(n)}function g(...n){if(n.length===0)return;for(let r=0;r<n.length-1;r++){let t=n[r];if(!t)return t}let e=n[n.length-1];return typeof e=="function"?e():e}function R(...n){return n.every(Boolean)}function C(n,e){return n.every(Boolean)?e():void 0}function P(...n){if(n.length!==0){for(let e of n)if(e)return e;return n[n.length-1]}}function B(...n){return n.some(Boolean)}function O(n,e){return n.some(Boolean)?e():void 0}function A(n){return !n}function U(n){return (...e)=>!n(...e)}function v(...n){for(let e of n)if(e!=null)return e}function z(...n){for(let e of n){let r=e();if(r!=null)return r}}function L(n,e){return n??e}function K(n,e){return n??e()}function j(n,e,r){return e(n)?n:r}function N(n,e){return n==null||n===""||Array.isArray(n)&&n.length===0||typeof n=="object"&&Object.keys(n).length===0?e:n}function F(n){for(let e of n)if(e)return e}function E(n,e){for(let r of n)if(e(r))return r}function V(n){for(let e of n)if(e!=null)return e}function G(n){return n.every(Boolean)}function W(n,e){return n.every(e)}function S(n){return n.every(e=>e!=null)}function f(n,...e){let r=n;for(let t of e){if(r==null)return;r=r[t];}return r}function I(n,e){return f(n,...e)}function H(n,e){let r=e.split(".").map(t=>{let o=Number(t);return Number.isNaN(o)?t:o});return f(n,...r)}function i(n,e,...r){let t=n;for(let o of r){if(t==null)return e;t=t[o];}return t??e}function M(n,e,r){let t=r.split(".").map(o=>{let l=Number(o);return Number.isNaN(l)?o:l});return i(n,e,...t)}function q(n,e,...r){let t=n;for(let o of r){if(t==null)return e();t=t[o];}return t??e()}function J(n){try{return n()}catch{return}}function Q(n,e){try{return n()}catch{return e}}function X(n){try{return {ok:!0,value:n()}}catch(e){return {ok:false,error:e}}}function Y(n){let e={get(r,t){if(r==null)return d();let o=r[t];return o==null?d():typeof o=="object"?new Proxy(o,e):o}};return n==null?d():new Proxy(n,e)}function d(){let n={get(){return d()}};return new Proxy({},n)}function Z(n){if(n!=null&&!(typeof n=="object"&&Object.keys(n).length===0))return n}function u(n){return {map(e){return n==null?u(void 0):u(e(n))},flatMap(e){return n==null?u(void 0):e(n)},filter(e){return n==null?u(void 0):e(n)?u(n):u(void 0)},tap(e){return n!=null&&e(n),u(n)},value(){return n??void 0},valueOr(e){return n??e},valueOrThrow(e){if(n==null)throw new Error(e??"Value is null or undefined");return n}}}function _(n,e){if(n!=null)return e(n)}function $(n,e,r){return n==null?r:e(n)}function nn(n,...e){let r=n;for(let t of e){if(r==null)return;r=t(r);}return r??void 0}export{N as A,F as B,E as C,V as D,G as E,W as F,S as G,f as H,I,H as J,i as K,M as L,q as M,J as N,Q as O,X as P,Y as Q,Z as R,u as S,_ as T,$ as U,nn as V,rn as W,T as a,a as b,c,p as d,y as e,s as f,x as g,h,w as i,m as j,k,D as l,b as m,g as n,R as o,C as p,P as q,B as r,O as s,A as t,U as u,v,z as w,L as x,K as y,j as z};
@@ -0,0 +1 @@
1
+ 'use strict';var chunkWOT6VMZA_js=require('./chunk-WOT6VMZA.js');var B={};chunkWOT6VMZA_js.a(B,{clone:()=>b,cloneDeep:()=>K,deepGet:()=>i,deepGetOr:()=>S,deepHas:()=>D,deepMerge:()=>l,deepPath:()=>G,deepPluck:()=>N,deepSet:()=>A,entriesTyped:()=>P,filterObject:()=>j,fromEntriesTyped:()=>g,get:()=>w,has:()=>V,invert:()=>O,isEqual:()=>a,keysTyped:()=>x,mapObject:()=>h,mergeShallow:()=>m,omit:()=>p,paths:()=>U,pick:()=>T,set:()=>y,transform:()=>v,unset:()=>d,valuesTyped:()=>k});function T(e,t){let r={};for(let n of t)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function p(e,t){let r={...e},n=new Set(t);for(let o of n)delete r[o];return r}function x(e){return Object.keys(e)}function k(e){return Object.values(e)}function P(e){return Object.entries(e)}function g(e){return Object.fromEntries(e)}function h(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function j(e,t){let r={};for(let n of Object.keys(e))t(e[n],n)&&(r[n]=e[n]);return r}function m(e,t){return {...e,...t}}function b(e){return Array.isArray(e)?[...e]:{...e}}function K(e){return structuredClone(e)}function w(e,t){let r=e;for(let n of t){if(r==null||typeof r!="object")return;r=r[n];}return r}function y(e,t,r){if(t.length===0)return r;let[n,...o]=t;if(n===void 0)return e;let s=e[n],f=o.length===0?r:y(typeof s=="object"&&s!==null?s:{},o,r);if(Array.isArray(e)){let u=[...e];return u[n]=f,u}return {...e,[n]:f}}function O(e){let t={};for(let r of Object.keys(e)){let n=e[r];n!==void 0&&(t[String(n)]=r);}return t}function l(e,t){let r={...e};for(let n of Object.keys(t)){let o=t[n],s=e[n];R(o)&&R(s)?r[n]=l(s,o):r[n]=o;}return r}function R(e){if(e===null||typeof e!="object")return false;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function a(e,t){if(e===t)return true;if(e===null||t===null)return e===t;if(typeof e!=typeof t)return false;if(typeof e!="object"||typeof t!="object")return e===t;if(Array.isArray(e)!==Array.isArray(t))return false;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return false;for(let o=0;o<e.length;o++)if(!a(e[o],t[o]))return false;return true}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.toString()===t.toString();let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return false;for(let o of r)if(!n.includes(o)||!a(e[o],t[o]))return false;return true}function V(e,t){if(t.length===0)return true;let r=e;for(let n of t){if(r==null||typeof r!="object"||!(n in r))return false;r=r[n];}return true}function d(e,t){if(t.length===0)return e;let r=t[0],n=t.slice(1);if(n.length===0){let s={...e};return delete s[r],s}let o=e[r];return o==null||typeof o!="object"?e:{...e,[r]:d(o,n)}}function U(e){let t=[];function r(n,o){if(n===null||typeof n!="object"){o.length>0&&t.push(o);return}if(Array.isArray(n)){n.length===0?t.push(o):n.forEach((f,u)=>{r(f,[...o,u]);});return}let s=Object.keys(n);if(s.length===0)t.push(o);else for(let f of s)r(n[f],[...o,f]);}return r(e,[]),t}function v(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}function i(e,t){let r=t.split("."),n=e;for(let o of r){if(n==null||typeof n!="object")return;n=n[o];}return n}function S(e,t,r){return i(e,t)??r}function A(e,t,r){let n=t.split("."),o=structuredClone(e),s=o;for(let u=0;u<n.length-1;u++){let c=n[u];(s[c]===void 0||s[c]===null)&&(s[c]={}),s=s[c];}let f=n[n.length-1];return s[f]=r,o}function D(e,t){return i(e,t)!==void 0}function G(){return e=>t=>i(t,e)}function N(e,t){return e.map(r=>i(r,t))}exports.A=B;exports.a=T;exports.b=p;exports.c=x;exports.d=k;exports.e=P;exports.f=g;exports.g=h;exports.h=j;exports.i=m;exports.j=b;exports.k=K;exports.l=w;exports.m=y;exports.n=O;exports.o=l;exports.p=a;exports.q=V;exports.r=d;exports.s=U;exports.t=v;exports.u=i;exports.v=S;exports.w=A;exports.x=D;exports.y=G;exports.z=N;
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-JZXLCA2E.mjs';var j={};a(j,{Bind:()=>d,Debounce:()=>y,Deprecated:()=>g,Frozen:()=>b,Lazy:()=>x,Log:()=>T,Measure:()=>h,Memoize:()=>f,Retry:()=>m,Sealed:()=>k,Throttle:()=>w,Validate:()=>D});function f(t){return function(i,u,n){let e=n.value;if(typeof e!="function")throw new Error("@Memoize can only be applied to methods");let r=new Map;return n.value=function(...o){let a=t?t(...o):o[0];if(r.has(a))return r.get(a);let s=e.apply(this,o);return r.set(a,s),s},n}}function y(t){return function(i,u,n){let e=n.value;if(typeof e!="function")throw new Error("@Debounce can only be applied to methods");let r;return n.value=function(...o){r!==void 0&&clearTimeout(r),r=setTimeout(()=>{e.apply(this,o);},t);},n}}function w(t){return function(i,u,n){let e=n.value;if(typeof e!="function")throw new Error("@Throttle can only be applied to methods");let r=0,o;return n.value=function(...a){let s=Date.now(),p=t-(s-r);p<=0?(o!==void 0&&(clearTimeout(o),o=void 0),r=s,e.apply(this,a)):o===void 0&&(o=setTimeout(()=>{r=Date.now(),o=void 0,e.apply(this,a);},p));},n}}function d(){return function(t,i,u){let n=u.value;if(typeof n!="function")throw new Error("@Bind can only be applied to methods");return {configurable:true,enumerable:false,get(){let e=n.bind(this);return Object.defineProperty(this,i,{value:e,configurable:true,writable:true}),e}}}}function T(t){let i=t?.prefix??"";return function(u,n,e){let r=e.value;if(typeof r!="function")throw new Error("@Log can only be applied to methods");return e.value=function(...o){let a=String(n),s=o.map(c=>JSON.stringify(c)).join(", "),p=r.apply(this,o);return p instanceof Promise?p.then(c=>(console.log(`${i}${a}(${s}) => ${JSON.stringify(c)}`),c)):(console.log(`${i}${a}(${s}) => ${JSON.stringify(p)}`),p)},e}}function h(t){return function(i,u,n){let e=n.value;if(typeof e!="function")throw new Error("@Measure can only be applied to methods");let r=t?.label??String(u);return n.value=function(...o){let a=performance.now(),s=e.apply(this,o);if(s instanceof Promise)return s.finally(()=>{let c=performance.now()-a;console.log(`${r} took ${c.toFixed(2)}ms`);});let p=performance.now()-a;return console.log(`${r} took ${p.toFixed(2)}ms`),s},n}}function m(t){let i=t?.attempts??3,u=t?.delay??0,n=t?.onRetry;return function(e,r,o){let a=o.value;if(typeof a!="function")throw new Error("@Retry can only be applied to methods");return o.value=async function(...s){let p;for(let c=1;c<=i;c++)try{let l=a.apply(this,s);return l instanceof Promise?await l:l}catch(l){p=l,c<i&&(n?.(l,c),u>0&&await new Promise(P=>setTimeout(P,u)));}throw p},o}}function g(t){return function(i,u,n){let e=n.value;if(typeof e!="function")throw new Error("@Deprecated can only be applied to methods");let r=String(u),o=t?`${r} is deprecated: ${t}`:`${r} is deprecated`;return n.value=function(...a){return console.warn(o),e.apply(this,a)},n}}function k(){return function(t){return Object.seal(t),Object.seal(t.prototype),t}}function b(){return function(t){return Object.freeze(t),Object.freeze(t.prototype),t}}function D(t,i){return function(u,n,e){let r=e.value;if(typeof r!="function")throw new Error("@Validate can only be applied to methods");let o=String(n);return e.value=function(...a){if(!t(...a))throw new Error(i??`Validation failed for ${o}`);return r.apply(this,a)},e}}function x(){return function(t,i,u){let n=u.get;if(typeof n!="function")throw new Error("@Lazy can only be applied to getters");return u.get=function(){let e=n.call(this);return Object.defineProperty(this,i,{value:e,configurable:false,writable:false}),e},u}}export{f as a,y as b,w as c,d,T as e,h as f,m as g,g as h,k as i,b as j,D as k,x as l,j as m};
@@ -0,0 +1 @@
1
+ import {a as a$2,b as b$1}from'./chunk-5FBZYPQM.mjs';import {a as a$1}from'./chunk-JZXLCA2E.mjs';var S={};a$1(S,{clamp:()=>y,coerceArray:()=>c,coerceString:()=>a,defaults:()=>x,isEmail:()=>b,isIpAddress:()=>R,isUrl:()=>l,isUuid:()=>N,parseBoolean:()=>p,parseDate:()=>m,parseInteger:()=>d,parseNumber:()=>u,parseUrl:()=>w,safeJsonParse:()=>f,safeJsonStringify:()=>s,trimAll:()=>g});function f(r){try{let n=JSON.parse(r);return a$2(n)}catch(n){return b$1(n instanceof Error?n:new Error(String(n)))}}function s(r,n,e){try{let t=JSON.stringify(r,n,e);return a$2(t)}catch(t){return b$1(t instanceof Error?t:new Error(String(t)))}}function u(r){if(r!=null){if(typeof r=="number")return Number.isNaN(r)?void 0:r;if(typeof r=="string"){let n=r.trim();if(n==="")return;let e=Number(n);return Number.isNaN(e)?void 0:e}}}function d(r){if(r!=null){if(typeof r=="number")return Number.isNaN(r)?void 0:Math.trunc(r);if(typeof r=="string"){let n=r.trim();if(n==="")return;let e=parseInt(n,10);return Number.isNaN(e)?void 0:e}}}function p(r){if(r!=null){if(typeof r=="boolean")return r;if(typeof r=="number")return r===1?true:r===0?false:void 0;if(typeof r=="string"){let n=r.toLowerCase().trim();if(["true","1","yes","on"].includes(n))return true;if(["false","0","no","off"].includes(n))return false}}}function m(r){if(r!=null){if(r instanceof Date)return Number.isNaN(r.getTime())?void 0:r;if(typeof r=="number"){let n=new Date(r);return Number.isNaN(n.getTime())?void 0:n}if(typeof r=="string"){let n=r.trim();if(n==="")return;let e=new Date(n);return Number.isNaN(e.getTime())?void 0:e}}}function a(r){return r==null?"":typeof r=="string"?r:String(r)}function c(r){return r==null?[]:Array.isArray(r)?[...r]:[r]}function g(r){let n={...r};for(let e of Object.keys(n)){let t=n[e];typeof t=="string"&&(n[e]=t.trim());}return n}function x(r,n,e={}){let{treatEmptyStringAsNull:t=true}=e;return r==null||t&&r===""?n:r}function y(r,n,e){if(n>e)throw new Error("min must be less than or equal to max");return Math.min(Math.max(r,n),e)}function b(r){return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)}function l(r){try{return new URL(r),!0}catch{return false}}function N(r){return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(r)}function R(r){return A(r)||k(r)}function A(r){return /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(r)}function k(r){return /^(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$|^::(?:[0-9a-fA-F]{1,4}:){0,6}[0-9a-fA-F]{1,4}$|^(?:[0-9a-fA-F]{1,4}:){1,7}:$|^(?:[0-9a-fA-F]{1,4}:){0,6}::(?:[0-9a-fA-F]{1,4}:){0,5}[0-9a-fA-F]{1,4}$/.test(r)}function w(r){try{return new URL(r)}catch{return}}export{f as a,s as b,u as c,d,p as e,m as f,a as g,c as h,g as i,x as j,y as k,b as l,l as m,N as n,R as o,w as p,S as q};
@@ -0,0 +1 @@
1
+ 'use strict';function t(r){return {ok:true,value:r}}function o(r){return {ok:false,error:r}}exports.a=t;exports.b=o;
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-JZXLCA2E.mjs';var x={};a(x,{ary:()=>c,curry:()=>p,flip:()=>s,memoize:()=>y,negate:()=>T,partial:()=>i,unary:()=>f});function y(n,e){let r=new Map;return function(...t){let o=e?e(...t):t[0];if(r.has(o))return r.get(o);let u=n.apply(this,t);return r.set(o,u),u}}function T(n){return function(...e){return !n(...e)}}function s(n){return function(e,r){return n(r,e)}}function i(n,...e){return function(...r){return n(...e,...r)}}function p(n){let e=n.length;function r(...a){return a.length>=e?n(...a):(...t)=>r(...a,...t)}return r}function c(n,e){return function(...r){return n(...r.slice(0,e))}}function f(n){return function(e){return n(e)}}export{y as a,T as b,s as c,i as d,p as e,c as f,f as g,x as h};
@@ -0,0 +1 @@
1
+ 'use strict';var chunkP4UNM7SF_js=require('./chunk-P4UNM7SF.js'),chunkWOT6VMZA_js=require('./chunk-WOT6VMZA.js');var S={};chunkWOT6VMZA_js.a(S,{clamp:()=>y,coerceArray:()=>c,coerceString:()=>a,defaults:()=>x,isEmail:()=>b,isIpAddress:()=>R,isUrl:()=>l,isUuid:()=>N,parseBoolean:()=>p,parseDate:()=>m,parseInteger:()=>d,parseNumber:()=>u,parseUrl:()=>w,safeJsonParse:()=>f,safeJsonStringify:()=>s,trimAll:()=>g});function f(r){try{let n=JSON.parse(r);return chunkP4UNM7SF_js.a(n)}catch(n){return chunkP4UNM7SF_js.b(n instanceof Error?n:new Error(String(n)))}}function s(r,n,e){try{let t=JSON.stringify(r,n,e);return chunkP4UNM7SF_js.a(t)}catch(t){return chunkP4UNM7SF_js.b(t instanceof Error?t:new Error(String(t)))}}function u(r){if(r!=null){if(typeof r=="number")return Number.isNaN(r)?void 0:r;if(typeof r=="string"){let n=r.trim();if(n==="")return;let e=Number(n);return Number.isNaN(e)?void 0:e}}}function d(r){if(r!=null){if(typeof r=="number")return Number.isNaN(r)?void 0:Math.trunc(r);if(typeof r=="string"){let n=r.trim();if(n==="")return;let e=parseInt(n,10);return Number.isNaN(e)?void 0:e}}}function p(r){if(r!=null){if(typeof r=="boolean")return r;if(typeof r=="number")return r===1?true:r===0?false:void 0;if(typeof r=="string"){let n=r.toLowerCase().trim();if(["true","1","yes","on"].includes(n))return true;if(["false","0","no","off"].includes(n))return false}}}function m(r){if(r!=null){if(r instanceof Date)return Number.isNaN(r.getTime())?void 0:r;if(typeof r=="number"){let n=new Date(r);return Number.isNaN(n.getTime())?void 0:n}if(typeof r=="string"){let n=r.trim();if(n==="")return;let e=new Date(n);return Number.isNaN(e.getTime())?void 0:e}}}function a(r){return r==null?"":typeof r=="string"?r:String(r)}function c(r){return r==null?[]:Array.isArray(r)?[...r]:[r]}function g(r){let n={...r};for(let e of Object.keys(n)){let t=n[e];typeof t=="string"&&(n[e]=t.trim());}return n}function x(r,n,e={}){let{treatEmptyStringAsNull:t=true}=e;return r==null||t&&r===""?n:r}function y(r,n,e){if(n>e)throw new Error("min must be less than or equal to max");return Math.min(Math.max(r,n),e)}function b(r){return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)}function l(r){try{return new URL(r),!0}catch{return false}}function N(r){return /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(r)}function R(r){return A(r)||k(r)}function A(r){return /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(r)}function k(r){return /^(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$|^::(?:[0-9a-fA-F]{1,4}:){0,6}[0-9a-fA-F]{1,4}$|^(?:[0-9a-fA-F]{1,4}:){1,7}:$|^(?:[0-9a-fA-F]{1,4}:){0,6}::(?:[0-9a-fA-F]{1,4}:){0,5}[0-9a-fA-F]{1,4}$/.test(r)}function w(r){try{return new URL(r)}catch{return}}exports.a=f;exports.b=s;exports.c=u;exports.d=d;exports.e=p;exports.f=m;exports.g=a;exports.h=c;exports.i=g;exports.j=x;exports.k=y;exports.l=b;exports.m=l;exports.n=N;exports.o=R;exports.p=w;exports.q=S;
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-JZXLCA2E.mjs';var b={};a(b,{awaitTo:()=>l,debounce:()=>T,defer:()=>x,once:()=>y,onceAsync:()=>P,parallel:()=>w,retry:()=>c,sleep:()=>d,throttle:()=>p,withTimeout:()=>f});async function l(e){try{return [null,await e]}catch(t){return [t,null]}}function d(e){return new Promise(t=>setTimeout(t,e))}async function f(e,t,n="Operation timed out"){let r,o=new Promise((s,i)=>{r=setTimeout(()=>{i(new Error(n));},t);});try{return await Promise.race([e,o])}finally{r!==void 0&&clearTimeout(r);}}async function c(e,t={}){let{attempts:n=3,delay:r=1e3,backoff:o=1,onRetry:s}=t,i,u=r;for(let a=1;a<=n;a++)try{return await e()}catch(m){i=m instanceof Error?m:new Error(String(m)),a<n&&(s?.(i,a),await new Promise(v=>setTimeout(v,u)),u*=o);}throw i}function T(e,t){let n,r=(...o)=>{n!==void 0&&clearTimeout(n),n=setTimeout(()=>{e(...o),n=void 0;},t);};return r.cancel=()=>{n!==void 0&&(clearTimeout(n),n=void 0);},r}function p(e,t){let n=0,r,o=(...s)=>{let i=Date.now(),u=t-(i-n);u<=0?(r!==void 0&&(clearTimeout(r),r=void 0),n=i,e(...s)):r===void 0&&(r=setTimeout(()=>{n=Date.now(),r=void 0,e(...s);},u));};return o.cancel=()=>{r!==void 0&&(clearTimeout(r),r=void 0);},o}function y(e){let t=false,n;return((...r)=>(t||(t=true,n=e(...r)),n))}function P(e){let t;return ()=>(t===void 0&&(t=e()),t)}function x(){let e,t;return {promise:new Promise((r,o)=>{e=r,t=o;}),resolve:e,reject:t}}async function w(e,t={}){let{concurrency:n=1/0}=t;if(e.length===0)return [];if(n===1/0||n>=e.length)return Promise.all(e.map(u=>u()));let r=new Array(e.length),o=0;async function s(){for(;o<e.length;){let u=o++,a=e[u];a&&(r[u]=await a());}}let i=Array.from({length:Math.min(n,e.length)},()=>s());return await Promise.all(i),r}export{l as a,d as b,f as c,c as d,T as e,p as f,y as g,P as h,x as i,w as j,b as k};
@@ -0,0 +1 @@
1
+ import {b as b$1,a as a$1}from'./chunk-5FBZYPQM.mjs';import {a}from'./chunk-JZXLCA2E.mjs';var G={};a(G,{anySchema:()=>_,array:()=>T,boolean:()=>y,createGuard:()=>P,createParser:()=>D,date:()=>j,email:()=>U,intersection:()=>I,is:()=>J,literal:()=>k,nullable:()=>R,number:()=>x,object:()=>b,optional:()=>w,parse:()=>g,parseJson:()=>K,record:()=>V,safeParse:()=>S,string:()=>h,tuple:()=>A,union:()=>E,unknownSchema:()=>$,url:()=>O,uuid:()=>N,validate:()=>B});function m(e,n){return {_type:void 0,_tag:e,_validate:n,parse(r){let i=this._validate(r,[]);if(i.ok)return i.value;let s=i.error.map(o=>o.path.length>0?`${o.path.join(".")}: ${o.message}`:o.message).join("; ");throw new TypeError(`Validation failed: ${s}`)},safeParse(r){return this._validate(r,[])},is(r){return this._validate(r,[]).ok},optional(){return m(`${e} | undefined`,(r,i)=>r===void 0?a$1(void 0):n(r,i))},nullable(){return m(`${e} | null`,(r,i)=>r===null?a$1(null):n(r,i))},default(r){return m(e,(i,a)=>i===void 0?a$1(r):n(i,a))},transform(r){return m(`transform(${e})`,(i,a)=>{let s=n(i,a);if(!s.ok)return s;try{return a$1(r(s.value))}catch(o){return b$1([{path:a,message:o instanceof Error?o.message:"Transform failed",expected:"valid transformation",received:String(i)}])}})},refine(r,i="Refinement failed"){return m(`refine(${e})`,(a,s)=>{let o=n(a,s);return o.ok?r(o.value)?o:b$1([{path:s,message:i,expected:"value passing refinement",received:String(a)}]):o})}}}function f(e,n,t,r){return {path:e,message:n,expected:t,received:typeof r=="object"?JSON.stringify(r)?.slice(0,50)??"object":String(r)}}function h(){return m("string",(e,n)=>typeof e=="string"?a$1(e):b$1([f(n,"Expected string","string",e)]))}function x(){return m("number",(e,n)=>typeof e=="number"&&!Number.isNaN(e)?a$1(e):b$1([f(n,"Expected number","number",e)]))}function y(){return m("boolean",(e,n)=>typeof e=="boolean"?a$1(e):b$1([f(n,"Expected boolean","boolean",e)]))}function k(e){return m(`literal(${JSON.stringify(e)})`,(n,t)=>n===e?a$1(e):b$1([f(t,`Expected ${JSON.stringify(e)}`,String(e),n)]))}function T(e){let n=e;return m(`array(${n._tag})`,(t,r)=>{if(!Array.isArray(t))return b$1([f(r,"Expected array","array",t)]);let i=[],a=[];for(let s=0;s<t.length;s++){let o=n._validate(t[s],[...r,s]);o.ok?i.push(o.value):a.push(...o.error);}return a.length>0?b$1(a):a$1(i)})}function b(e){let n=Object.entries(e),t=`object({ ${n.map(([r,i])=>`${r}: ${i._tag}`).join(", ")} })`;return m(t,(r,i)=>{if(typeof r!="object"||r===null||Array.isArray(r))return b$1([f(i,"Expected object","object",r)]);let a=r,s={},o=[];for(let[l,d]of n){let p=d._validate(a[l],[...i,l]);p.ok?s[l]=p.value:o.push(...p.error);}return o.length>0?b$1(o):a$1(s)})}function w(e){return e.optional()}function R(e){return e.nullable()}function E(e){let n=e,t=`union(${n.map(r=>r._tag).join(" | ")})`;return m(t,(r,i)=>{for(let a of n){let s=a._validate(r,i);if(s.ok)return a$1(s.value)}return b$1([f(i,`Expected one of: ${n.map(a=>a._tag).join(", ")}`,t,r)])})}function I(e,n){let t=e,r=n,i=`intersection(${t._tag} & ${r._tag})`;return m(i,(a,s)=>{let o=t._validate(a,s);if(!o.ok)return o;let l=r._validate(a,s);return l.ok?a$1({...o.value,...l.value}):l})}function V(e){let n=e,t=`record(${n._tag})`;return m(t,(r,i)=>{if(typeof r!="object"||r===null||Array.isArray(r))return b$1([f(i,"Expected object","object",r)]);let a=r,s={},o=[];for(let[l,d]of Object.entries(a)){let p=n._validate(d,[...i,l]);p.ok?s[l]=p.value:o.push(...p.error);}return o.length>0?b$1(o):a$1(s)})}function A(e){let n=e,t=`tuple([${n.map(r=>r._tag).join(", ")}])`;return m(t,(r,i)=>{if(!Array.isArray(r))return b$1([f(i,"Expected array","array",r)]);if(r.length!==n.length)return b$1([f(i,`Expected tuple of length ${n.length}`,`[${n.map(o=>o._tag).join(", ")}]`,r)]);let a=[],s=[];for(let o=0;o<n.length;o++){let l=n[o]._validate(r[o],[...i,o]);l.ok?a.push(l.value):s.push(...l.error);}return s.length>0?b$1(s):a$1(a)})}function $(){return m("unknown",e=>a$1(e))}function _(){return m("any",e=>a$1(e))}function j(){return m("date",(e,n)=>{if(e instanceof Date&&!Number.isNaN(e.getTime()))return a$1(e);if(typeof e=="string"){let t=new Date(e);if(!Number.isNaN(t.getTime()))return a$1(t)}return b$1([f(n,"Expected valid date","Date",e)])})}function U(){let e=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return m("email",(n,t)=>typeof n!="string"?b$1([f(t,"Expected string","string",n)]):e.test(n)?a$1(n):b$1([f(t,"Expected valid email","email",n)]))}function O(){return m("url",(e,n)=>{if(typeof e!="string")return b$1([f(n,"Expected string","string",e)]);try{return new URL(e),a$1(e)}catch{return b$1([f(n,"Expected valid URL","url",e)])}})}function N(){let e=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return m("uuid",(n,t)=>typeof n!="string"?b$1([f(t,"Expected string","string",n)]):e.test(n)?a$1(n):b$1([f(t,"Expected valid UUID","uuid",n)]))}function g(e,n){return e.parse(n)}function S(e,n){return e.safeParse(n)}function B(e,n){let t=e.safeParse(n);return t.ok?[]:t.error}function J(e,n){return e.is(n)}function K(e,n){try{let t=JSON.parse(n);return S(e,t)}catch(t){return {ok:false,error:[{path:[],message:t instanceof Error?t.message:"Invalid JSON",expected:"valid JSON",received:n.slice(0,50)}]}}}function P(e){return n=>e.is(n)}function D(e){return n=>g(e,n)}export{h as a,x as b,y as c,k as d,T as e,b as f,w as g,R as h,E as i,I as j,V as k,A as l,$ as m,_ as n,j as o,U as p,O as q,N as r,g as s,S as t,B as u,J as v,K as w,P as x,D as y,G as z};
@@ -0,0 +1 @@
1
+ 'use strict';var chunkWOT6VMZA_js=require('./chunk-WOT6VMZA.js');var h={};chunkWOT6VMZA_js.a(h,{average:()=>o,max:()=>i,median:()=>u,min:()=>d,percentage:()=>m,randomFloat:()=>l,randomInt:()=>a,round:()=>f,sum:()=>t});function t(r){let e=0;for(let n of r)e+=n;return e}function o(r){if(r.length===0)return NaN;let e=0;for(let n of r)e+=n;return e/r.length}function u(r){if(r.length===0)return NaN;let e=[...r].sort((p,c)=>p-c),n=Math.floor(e.length/2);return e.length%2===0?(e[n-1]+e[n])/2:e[n]}function f(r,e=0){let n=Math.pow(10,e);return Math.round(r*n)/n}function a(r,e){return r=Math.ceil(r),e=Math.floor(e),Math.floor(Math.random()*(e-r+1))+r}function l(r,e){return Math.random()*(e-r)+r}function m(r,e){return e===0?0:r/e*100}function d(r){if(r.length===0)return;let e=r[0];for(let n=1;n<r.length;n++)r[n]<e&&(e=r[n]);return e}function i(r){if(r.length===0)return;let e=r[0];for(let n=1;n<r.length;n++)r[n]>e&&(e=r[n]);return e}exports.a=t;exports.b=o;exports.c=u;exports.d=f;exports.e=a;exports.f=l;exports.g=m;exports.h=d;exports.i=i;exports.j=h;
@@ -0,0 +1 @@
1
+ 'use strict';var chunkWOT6VMZA_js=require('./chunk-WOT6VMZA.js');var Q={};chunkWOT6VMZA_js.a(Q,{allOf:()=>B,arrayOf:()=>O,assertCondition:()=>S,assertDefined:()=>y,assertNotNull:()=>x,assertType:()=>i,chainNullable:()=>K,createAssertion:()=>c,createDiscriminantGuard:()=>h,excludeNull:()=>v,excludeNullish:()=>k,excludeUndefined:()=>m,exhaustiveCheck:()=>g,filterBy:()=>s,filterByGuard:()=>o,filterByRefinement:()=>f,filterDefined:()=>d,filterDefinedFn:()=>a,filterTruthy:()=>T,filterTruthyFn:()=>l,literal:()=>C,mapNullable:()=>E,narrowUnion:()=>G,not:()=>N,nullable:()=>j,objectOf:()=>U,oneOf:()=>D,optional:()=>V,partitionByGuard:()=>p,refine:()=>A,switchUnion:()=>w,withDefault:()=>R,withDefaultLazy:()=>b});function d(e){return e.filter(n=>n!=null)}function a(){return e=>d(e)}function T(e){return e.filter(n=>!!n)}function l(){return e=>T(e)}function o(e,n){return e.filter(n)}function f(e,n){return e.filter(n)}function s(e){return n=>o(n,e)}function p(e,n){let r=[],t=[];for(let u of e)n(u)?r.push(u):t.push(u);return [r,t]}function i(e,n,r){if(!n(e))throw typeof r=="function"?r():new TypeError(r??"Type assertion failed")}function y(e,n){if(e==null)throw new TypeError(n??"Expected value to be defined")}function x(e,n){if(e===null)throw new TypeError(n??"Expected value to not be null")}function S(e,n){if(!e)throw new TypeError(n??"Assertion failed")}function c(e,n){return (r,t)=>{i(r,e,t??n);}}function G(e,n,r){return e[n]===r}function h(){return (e,n)=>r=>r[e]===n}function w(e,n,r){let t=e[n],u=r[t];return u(e)}function g(e,n){throw new Error(n??`Exhaustive check failed: unexpected value ${JSON.stringify(e)}`)}function v(e,n){if(e===null)throw new Error(n??"Unexpected null value");return e}function m(e,n){if(e===void 0)throw new Error(n??"Unexpected undefined value");return e}function k(e,n){if(e==null)throw new Error(n??"Unexpected null or undefined value");return e}function R(e,n){return e??n}function b(e,n){return e??n()}function E(e,n){if(e===null)return null;if(e!==void 0)return n(e)}function K(e,...n){let r=e;for(let t of n){if(r==null)return r;r=t(r);}return r}function A(e,...n){return(r=>{if(!e(r))return false;for(let t of n)if(!t(r))return false;return true})}function D(...e){return(n=>e.some(r=>r(n)))}function B(...e){return(n=>e.every(r=>r(n)))}function N(e){return(n=>!e(n))}function O(e){return n=>Array.isArray(n)&&n.every(e)}function U(e){return n=>{if(typeof n!="object"||n===null)return false;let r=n;return Object.entries(e).every(([t,u])=>u(r[t]))}}function C(e){return n=>n===e}function V(e){return n=>n===void 0||e(n)}function j(e){return n=>n===null||e(n)}exports.A=B;exports.B=N;exports.C=O;exports.D=U;exports.E=C;exports.F=V;exports.G=j;exports.H=Q;exports.a=d;exports.b=a;exports.c=T;exports.d=l;exports.e=o;exports.f=f;exports.g=s;exports.h=p;exports.i=i;exports.j=y;exports.k=x;exports.l=S;exports.m=c;exports.n=G;exports.o=h;exports.p=w;exports.q=g;exports.r=v;exports.s=m;exports.t=k;exports.u=R;exports.v=b;exports.w=E;exports.x=K;exports.y=A;exports.z=D;
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-JZXLCA2E.mjs';var h={};a$1(h,{average:()=>o,max:()=>i,median:()=>u,min:()=>d,percentage:()=>m,randomFloat:()=>l,randomInt:()=>a,round:()=>f,sum:()=>t});function t(r){let e=0;for(let n of r)e+=n;return e}function o(r){if(r.length===0)return NaN;let e=0;for(let n of r)e+=n;return e/r.length}function u(r){if(r.length===0)return NaN;let e=[...r].sort((p,c)=>p-c),n=Math.floor(e.length/2);return e.length%2===0?(e[n-1]+e[n])/2:e[n]}function f(r,e=0){let n=Math.pow(10,e);return Math.round(r*n)/n}function a(r,e){return r=Math.ceil(r),e=Math.floor(e),Math.floor(Math.random()*(e-r+1))+r}function l(r,e){return Math.random()*(e-r)+r}function m(r,e){return e===0?0:r/e*100}function d(r){if(r.length===0)return;let e=r[0];for(let n=1;n<r.length;n++)r[n]<e&&(e=r[n]);return e}function i(r){if(r.length===0)return;let e=r[0];for(let n=1;n<r.length;n++)r[n]>e&&(e=r[n]);return e}export{t as a,o as b,u as c,f as d,a as e,l as f,m as g,d as h,i,h as j};
@@ -0,0 +1 @@
1
+ 'use strict';var chunkWOT6VMZA_js=require('./chunk-WOT6VMZA.js');var mn={};chunkWOT6VMZA_js.a(mn,{castArray:()=>M,cloneDeepWith:()=>p,cloneWith:()=>h,conformsTo:()=>O,eq:()=>I,gt:()=>_,gte:()=>L,hasKey:()=>E,hasKeys:()=>R,isArguments:()=>W,isArray:()=>g,isArrayBuffer:()=>B,isArrayLike:()=>c,isArrayLikeObject:()=>V,isBoolean:()=>w,isBuffer:()=>P,isDate:()=>A,isElement:()=>X,isEmpty:()=>s,isEqualWith:()=>a,isError:()=>T,isFinite:()=>G,isFunction:()=>d,isInteger:()=>D,isLength:()=>U,isMap:()=>q,isMatch:()=>b,isMatchWith:()=>H,isNaN:()=>Y,isNative:()=>C,isNonEmpty:()=>S,isNull:()=>J,isNumber:()=>l,isObject:()=>y,isObjectLike:()=>Z,isPlainObject:()=>k,isPromise:()=>N,isRegExp:()=>$,isSafeInteger:()=>z,isSet:()=>v,isString:()=>x,isSymbol:()=>j,isTypedArray:()=>nn,isUndefined:()=>Q,isWeakMap:()=>rn,isWeakSet:()=>en,lt:()=>F,lte:()=>K,toArray:()=>tn,toFinite:()=>m,toInteger:()=>f,toLength:()=>on,toNumber:()=>un,toPlainObject:()=>fn,toSafeInteger:()=>sn,toString:()=>pn});function y(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}function k(n){if(typeof n!="object"||n===null)return false;let r=Object.getPrototypeOf(n);return r===null||r===Object.prototype}function x(n){return typeof n=="string"}function l(n){return typeof n=="number"&&!Number.isNaN(n)}function w(n){return typeof n=="boolean"}function d(n){return typeof n=="function"}function g(n,r){return Array.isArray(n)?r?n.every(r):true:false}function A(n){return n instanceof Date&&!Number.isNaN(n.getTime())}function N(n){return n instanceof Promise||n!==null&&typeof n=="object"&&"then"in n&&typeof n.then=="function"}function T(n){return n instanceof Error}function j(n){return typeof n=="symbol"}function E(n,r){return n!==null&&typeof n=="object"&&r in n}function R(n,r){return n===null||typeof n!="object"?false:r.every(e=>e in n)}function s(n){return n==null?true:typeof n=="string"?n.trim().length===0:Array.isArray(n)?n.length===0:n instanceof Map||n instanceof Set?n.size===0:typeof n=="object"?Object.keys(n).length===0:false}function S(n){return !s(n)}function M(n){return Array.isArray(n)?[...n]:[n]}function h(n,r){let e=r(n);if(e!==void 0)return e;if(n===null||typeof n!="object")return n;if(Array.isArray(n))return n.map(o=>{let i=r(o);return i!==void 0?i:o});let t={};for(let o of Object.keys(n)){let i=n[o],u=r(i);t[o]=u!==void 0?u:i;}return t}function p(n,r){let e=r(n);if(e!==void 0)return e;if(n===null||typeof n!="object")return n;if(Array.isArray(n))return n.map(o=>p(o,r));let t={};for(let o of Object.keys(n))t[o]=p(n[o],r);return t}function O(n,r){for(let e of Object.keys(r)){let t=r[e];if(t&&!t(n[e]))return false}return true}function I(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}function _(n,r){return n>r}function L(n,r){return n>=r}function F(n,r){return n<r}function K(n,r){return n<=r}function W(n){return Object.prototype.toString.call(n)==="[object Arguments]"}function B(n){return n instanceof ArrayBuffer}function c(n){if(n==null||typeof n=="function")return false;let r=n.length;return typeof r=="number"&&r>=0&&r<=Number.MAX_SAFE_INTEGER&&Number.isInteger(r)}function V(n){return typeof n=="object"&&n!==null&&c(n)}function P(n){return typeof Buffer>"u"?false:Buffer.isBuffer(n)}function X(n){return typeof Element>"u"?false:n instanceof Element}function a(n,r,e){let t=e(n,r);if(t!==void 0)return t;if(n===r)return true;if(n===null||r===null)return n===r;if(typeof n!=typeof r)return false;if(typeof n=="object"&&typeof r=="object"){let o=Object.keys(n),i=Object.keys(r);if(o.length!==i.length)return false;for(let u of o)if(!a(n[u],r[u],e))return false;return true}return false}function G(n){return typeof n=="number"&&Number.isFinite(n)}function D(n){return typeof n=="number"&&Number.isInteger(n)}function U(n){return typeof n=="number"&&n>=0&&n<=Number.MAX_SAFE_INTEGER&&Number.isInteger(n)}function q(n){return n instanceof Map}function b(n,r){for(let e of Object.keys(r)){if(!(e in n))return false;let t=n[e],o=r[e];if(typeof o=="object"&&o!==null&&typeof t=="object"&&t!==null){if(!b(t,o))return false}else if(t!==o)return false}return true}function H(n,r,e){for(let t of Object.keys(r)){if(!(t in n))return false;let o=n[t],i=r[t],u=e(o,i,t);if(u!==void 0){if(!u)return false}else if(o!==i)return false}return true}function Y(n){return typeof n=="number"&&Number.isNaN(n)}function C(n){return typeof n!="function"?false:Function.prototype.toString.call(n).includes("[native code]")}function J(n){return n===null}function Q(n){return n===void 0}function Z(n){return typeof n=="object"&&n!==null}function $(n){return n instanceof RegExp}function z(n){return typeof n=="number"&&Number.isSafeInteger(n)}function v(n){return n instanceof Set}function nn(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function rn(n){return n instanceof WeakMap}function en(n){return n instanceof WeakSet}function tn(n){return n==null?[]:Array.isArray(n)?[...n]:typeof n=="string"?[...n]:typeof n=="object"&&n!==null?Object.values(n):[]}function m(n){if(n==null)return 0;if(typeof n=="number")return Number.isFinite(n)?n:n>0?Number.MAX_VALUE:-Number.MAX_VALUE;let r=Number(n);return Number.isNaN(r)?0:Number.isFinite(r)?r:r>0?Number.MAX_VALUE:-Number.MAX_VALUE}function f(n){let r=m(n);return r===0?0:Math.trunc(r)}function on(n){let e=f(n);return e<0?0:e>4294967295?4294967295:e}function un(n){return typeof n=="number"?n:typeof n=="symbol"?NaN:Number(n)}function fn(n){if(n==null)return {};if(typeof n!="object")return {};let r={};for(let e in n)r[e]=n[e];return r}function sn(n){let r=f(n);return r<Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:r>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:r}function pn(n){return n==null?"":typeof n=="string"?n:Array.isArray(n)?n.join(","):Object.is(n,-0)?"-0":String(n)}exports.$=fn;exports.A=c;exports.B=V;exports.C=P;exports.D=X;exports.E=a;exports.F=G;exports.G=D;exports.H=U;exports.I=q;exports.J=b;exports.K=H;exports.L=Y;exports.M=C;exports.N=J;exports.O=Q;exports.P=Z;exports.Q=$;exports.R=z;exports.S=v;exports.T=nn;exports.U=rn;exports.V=en;exports.W=tn;exports.X=m;exports.Y=f;exports.Z=on;exports._=un;exports.a=y;exports.aa=sn;exports.b=k;exports.ba=pn;exports.c=x;exports.ca=mn;exports.d=l;exports.e=w;exports.f=d;exports.g=g;exports.h=A;exports.i=N;exports.j=T;exports.k=j;exports.l=E;exports.m=R;exports.n=s;exports.o=S;exports.p=M;exports.q=h;exports.r=p;exports.s=O;exports.t=I;exports.u=_;exports.v=L;exports.w=F;exports.x=K;exports.y=W;exports.z=B;
@@ -0,0 +1 @@
1
+ import {a as a$2,b}from'./chunk-5FBZYPQM.mjs';import {a as a$1}from'./chunk-JZXLCA2E.mjs';var x={};a$1(x,{compose:()=>c,constant:()=>B,ifElse:()=>C,match:()=>s,pipe:()=>p,tap:()=>a,tryCatch:()=>l,tryCatchAsync:()=>A,unless:()=>T,when:()=>i});function p(r,...n){return n.reduce((e,t)=>t(e),r)}function c(...r){return n=>r.reduceRight((e,t)=>t(e),n)}function a(r){return n=>(r(n),n)}function i(r,n){return e=>r(e)?n(e):e}function T(r,n){return e=>r(e)?e:n(e)}function s(){let r=[],n={with(e,t){return r.push({when:e,then:t}),n},otherwise(e){return t=>{for(let u of r)if(u.when(t))return u.then(t);return e(t)}},run(e){for(let t of r)if(t.when(e))return t.then(e)}};return n}function l(r){try{return a$2(r())}catch(n){return b(n instanceof Error?n:new Error(String(n)))}}async function A(r){try{let n=await r();return a$2(n)}catch(n){return b(n instanceof Error?n:new Error(String(n)))}}function C(r,n,e){return t=>r(t)?n(t):e(t)}function B(r){return ()=>r}export{p as a,c as b,a as c,i as d,T as e,s as f,l as g,A as h,C as i,B as j,x as k};
@@ -0,0 +1 @@
1
+ 'use strict';var chunkP4UNM7SF_js=require('./chunk-P4UNM7SF.js'),chunkWOT6VMZA_js=require('./chunk-WOT6VMZA.js');var U={};chunkWOT6VMZA_js.a(U,{andThen:()=>f,err:()=>chunkP4UNM7SF_js.b,fromNullable:()=>c,isErr:()=>E,isOk:()=>a,mapErr:()=>i,mapOption:()=>m,mapResult:()=>u,matchOption:()=>s,matchResult:()=>T,none:()=>p,ok:()=>chunkP4UNM7SF_js.a,orElse:()=>l,some:()=>o,toNullable:()=>k,unwrap:()=>x,unwrapOption:()=>O,unwrapOptionOr:()=>R,unwrapOr:()=>y});function o(r){return {some:true,value:r}}function p(){return {some:false}}function u(r,e){return r.ok?chunkP4UNM7SF_js.a(e(r.value)):r}function m(r,e){return r.some?o(e(r.value)):r}function i(r,e){return r.ok?r:chunkP4UNM7SF_js.b(e(r.error))}function f(r,e){return r.ok?e(r.value):r}function l(r,e){return r.ok?r:e(r.error)}function T(r,e){return r.ok?e.ok(r.value):e.err(r.error)}function s(r,e){return r.some?e.some(r.value):e.none()}function a(r){return r.ok}function E(r){return !r.ok}function x(r){if(r.ok)return r.value;throw r.error instanceof Error?r.error:new Error(String(r.error))}function O(r){if(r.some)return r.value;throw new Error("Called unwrapOption on None")}function y(r,e){return r.ok?r.value:e}function R(r,e){return r.some?r.value:e}function c(r){return r==null?p():o(r)}function k(r){return r.some?r.value:null}exports.a=o;exports.b=p;exports.c=u;exports.d=m;exports.e=i;exports.f=f;exports.g=l;exports.h=T;exports.i=s;exports.j=a;exports.k=E;exports.l=x;exports.m=O;exports.n=y;exports.o=R;exports.p=c;exports.q=k;exports.r=U;
@@ -0,0 +1 @@
1
+ 'use strict';var chunkWOT6VMZA_js=require('./chunk-WOT6VMZA.js');var b={};chunkWOT6VMZA_js.a(b,{awaitTo:()=>l,debounce:()=>T,defer:()=>x,once:()=>y,onceAsync:()=>P,parallel:()=>w,retry:()=>c,sleep:()=>d,throttle:()=>p,withTimeout:()=>f});async function l(e){try{return [null,await e]}catch(t){return [t,null]}}function d(e){return new Promise(t=>setTimeout(t,e))}async function f(e,t,n="Operation timed out"){let r,o=new Promise((s,i)=>{r=setTimeout(()=>{i(new Error(n));},t);});try{return await Promise.race([e,o])}finally{r!==void 0&&clearTimeout(r);}}async function c(e,t={}){let{attempts:n=3,delay:r=1e3,backoff:o=1,onRetry:s}=t,i,u=r;for(let a=1;a<=n;a++)try{return await e()}catch(m){i=m instanceof Error?m:new Error(String(m)),a<n&&(s?.(i,a),await new Promise(v=>setTimeout(v,u)),u*=o);}throw i}function T(e,t){let n,r=(...o)=>{n!==void 0&&clearTimeout(n),n=setTimeout(()=>{e(...o),n=void 0;},t);};return r.cancel=()=>{n!==void 0&&(clearTimeout(n),n=void 0);},r}function p(e,t){let n=0,r,o=(...s)=>{let i=Date.now(),u=t-(i-n);u<=0?(r!==void 0&&(clearTimeout(r),r=void 0),n=i,e(...s)):r===void 0&&(r=setTimeout(()=>{n=Date.now(),r=void 0,e(...s);},u));};return o.cancel=()=>{r!==void 0&&(clearTimeout(r),r=void 0);},o}function y(e){let t=false,n;return((...r)=>(t||(t=true,n=e(...r)),n))}function P(e){let t;return ()=>(t===void 0&&(t=e()),t)}function x(){let e,t;return {promise:new Promise((r,o)=>{e=r,t=o;}),resolve:e,reject:t}}async function w(e,t={}){let{concurrency:n=1/0}=t;if(e.length===0)return [];if(n===1/0||n>=e.length)return Promise.all(e.map(u=>u()));let r=new Array(e.length),o=0;async function s(){for(;o<e.length;){let u=o++,a=e[u];a&&(r[u]=await a());}}let i=Array.from({length:Math.min(n,e.length)},()=>s());return await Promise.all(i),r}exports.a=l;exports.b=d;exports.c=f;exports.d=c;exports.e=T;exports.f=p;exports.g=y;exports.h=P;exports.i=x;exports.j=w;exports.k=b;