ts-data-forge 11.0.0 → 12.0.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 (185) hide show
  1. package/README.md +2 -2
  2. package/dist/number/branded-types/finite-number.d.mts +47 -61
  3. package/dist/number/branded-types/finite-number.d.mts.map +1 -1
  4. package/dist/number/branded-types/finite-number.mjs +37 -41
  5. package/dist/number/branded-types/finite-number.mjs.map +1 -1
  6. package/dist/number/branded-types/int.d.mts +40 -46
  7. package/dist/number/branded-types/int.d.mts.map +1 -1
  8. package/dist/number/branded-types/int.mjs +29 -31
  9. package/dist/number/branded-types/int.mjs.map +1 -1
  10. package/dist/number/branded-types/int16.d.mts +71 -59
  11. package/dist/number/branded-types/int16.d.mts.map +1 -1
  12. package/dist/number/branded-types/int16.mjs +56 -47
  13. package/dist/number/branded-types/int16.mjs.map +1 -1
  14. package/dist/number/branded-types/int32.d.mts +71 -59
  15. package/dist/number/branded-types/int32.d.mts.map +1 -1
  16. package/dist/number/branded-types/int32.mjs +56 -47
  17. package/dist/number/branded-types/int32.mjs.map +1 -1
  18. package/dist/number/branded-types/negative-finite-number.d.mts +76 -60
  19. package/dist/number/branded-types/negative-finite-number.d.mts.map +1 -1
  20. package/dist/number/branded-types/negative-finite-number.mjs +62 -49
  21. package/dist/number/branded-types/negative-finite-number.mjs.map +1 -1
  22. package/dist/number/branded-types/negative-int.d.mts +66 -49
  23. package/dist/number/branded-types/negative-int.d.mts.map +1 -1
  24. package/dist/number/branded-types/negative-int.mjs +48 -39
  25. package/dist/number/branded-types/negative-int.mjs.map +1 -1
  26. package/dist/number/branded-types/negative-safe-int.d.mts +64 -57
  27. package/dist/number/branded-types/negative-safe-int.d.mts.map +1 -1
  28. package/dist/number/branded-types/negative-safe-int.mjs +49 -44
  29. package/dist/number/branded-types/negative-safe-int.mjs.map +1 -1
  30. package/dist/number/branded-types/non-negative-finite-number.d.mts +80 -65
  31. package/dist/number/branded-types/non-negative-finite-number.d.mts.map +1 -1
  32. package/dist/number/branded-types/non-negative-finite-number.mjs +65 -53
  33. package/dist/number/branded-types/non-negative-finite-number.mjs.map +1 -1
  34. package/dist/number/branded-types/non-negative-int16.d.mts +71 -58
  35. package/dist/number/branded-types/non-negative-int16.d.mts.map +1 -1
  36. package/dist/number/branded-types/non-negative-int16.mjs +55 -45
  37. package/dist/number/branded-types/non-negative-int16.mjs.map +1 -1
  38. package/dist/number/branded-types/non-negative-int32.d.mts +71 -59
  39. package/dist/number/branded-types/non-negative-int32.d.mts.map +1 -1
  40. package/dist/number/branded-types/non-negative-int32.mjs +55 -46
  41. package/dist/number/branded-types/non-negative-int32.mjs.map +1 -1
  42. package/dist/number/branded-types/non-positive-finite-number.d.mts +70 -55
  43. package/dist/number/branded-types/non-positive-finite-number.d.mts.map +1 -1
  44. package/dist/number/branded-types/non-positive-finite-number.mjs +55 -43
  45. package/dist/number/branded-types/non-positive-finite-number.mjs.map +1 -1
  46. package/dist/number/branded-types/non-positive-int.d.mts +46 -146
  47. package/dist/number/branded-types/non-positive-int.d.mts.map +1 -1
  48. package/dist/number/branded-types/non-positive-int.mjs +33 -108
  49. package/dist/number/branded-types/non-positive-int.mjs.map +1 -1
  50. package/dist/number/branded-types/non-positive-safe-int.d.mts +62 -54
  51. package/dist/number/branded-types/non-positive-safe-int.d.mts.map +1 -1
  52. package/dist/number/branded-types/non-positive-safe-int.mjs +46 -41
  53. package/dist/number/branded-types/non-positive-safe-int.mjs.map +1 -1
  54. package/dist/number/branded-types/non-zero-finite-number.d.mts +62 -49
  55. package/dist/number/branded-types/non-zero-finite-number.d.mts.map +1 -1
  56. package/dist/number/branded-types/non-zero-finite-number.mjs +46 -37
  57. package/dist/number/branded-types/non-zero-finite-number.mjs.map +1 -1
  58. package/dist/number/branded-types/non-zero-int.d.mts +51 -38
  59. package/dist/number/branded-types/non-zero-int.d.mts.map +1 -1
  60. package/dist/number/branded-types/non-zero-int.mjs +31 -27
  61. package/dist/number/branded-types/non-zero-int.mjs.map +1 -1
  62. package/dist/number/branded-types/non-zero-int16.d.mts +59 -54
  63. package/dist/number/branded-types/non-zero-int16.d.mts.map +1 -1
  64. package/dist/number/branded-types/non-zero-int16.mjs +44 -41
  65. package/dist/number/branded-types/non-zero-int16.mjs.map +1 -1
  66. package/dist/number/branded-types/non-zero-int32.d.mts +59 -55
  67. package/dist/number/branded-types/non-zero-int32.d.mts.map +1 -1
  68. package/dist/number/branded-types/non-zero-int32.mjs +44 -42
  69. package/dist/number/branded-types/non-zero-int32.mjs.map +1 -1
  70. package/dist/number/branded-types/non-zero-safe-int.d.mts +60 -55
  71. package/dist/number/branded-types/non-zero-safe-int.d.mts.map +1 -1
  72. package/dist/number/branded-types/non-zero-safe-int.mjs +44 -42
  73. package/dist/number/branded-types/non-zero-safe-int.mjs.map +1 -1
  74. package/dist/number/branded-types/non-zero-uint16.d.mts +59 -54
  75. package/dist/number/branded-types/non-zero-uint16.d.mts.map +1 -1
  76. package/dist/number/branded-types/non-zero-uint16.mjs +43 -41
  77. package/dist/number/branded-types/non-zero-uint16.mjs.map +1 -1
  78. package/dist/number/branded-types/non-zero-uint32.d.mts +59 -54
  79. package/dist/number/branded-types/non-zero-uint32.d.mts.map +1 -1
  80. package/dist/number/branded-types/non-zero-uint32.mjs +43 -41
  81. package/dist/number/branded-types/non-zero-uint32.mjs.map +1 -1
  82. package/dist/number/branded-types/positive-finite-number.d.mts +82 -64
  83. package/dist/number/branded-types/positive-finite-number.d.mts.map +1 -1
  84. package/dist/number/branded-types/positive-finite-number.mjs +67 -52
  85. package/dist/number/branded-types/positive-finite-number.mjs.map +1 -1
  86. package/dist/number/branded-types/positive-int.d.mts +53 -70
  87. package/dist/number/branded-types/positive-int.d.mts.map +1 -1
  88. package/dist/number/branded-types/positive-int.mjs +42 -52
  89. package/dist/number/branded-types/positive-int.mjs.map +1 -1
  90. package/dist/number/branded-types/positive-int16.d.mts +68 -58
  91. package/dist/number/branded-types/positive-int16.d.mts.map +1 -1
  92. package/dist/number/branded-types/positive-int16.mjs +52 -45
  93. package/dist/number/branded-types/positive-int16.mjs.map +1 -1
  94. package/dist/number/branded-types/positive-int32.d.mts +68 -58
  95. package/dist/number/branded-types/positive-int32.d.mts.map +1 -1
  96. package/dist/number/branded-types/positive-int32.mjs +52 -45
  97. package/dist/number/branded-types/positive-int32.mjs.map +1 -1
  98. package/dist/number/branded-types/positive-safe-int.d.mts +72 -61
  99. package/dist/number/branded-types/positive-safe-int.d.mts.map +1 -1
  100. package/dist/number/branded-types/positive-safe-int.mjs +56 -48
  101. package/dist/number/branded-types/positive-safe-int.mjs.map +1 -1
  102. package/dist/number/branded-types/positive-uint16.d.mts +68 -58
  103. package/dist/number/branded-types/positive-uint16.d.mts.map +1 -1
  104. package/dist/number/branded-types/positive-uint16.mjs +52 -45
  105. package/dist/number/branded-types/positive-uint16.mjs.map +1 -1
  106. package/dist/number/branded-types/positive-uint32.d.mts +68 -59
  107. package/dist/number/branded-types/positive-uint32.d.mts.map +1 -1
  108. package/dist/number/branded-types/positive-uint32.mjs +52 -46
  109. package/dist/number/branded-types/positive-uint32.mjs.map +1 -1
  110. package/dist/number/branded-types/safe-int.d.mts +52 -66
  111. package/dist/number/branded-types/safe-int.d.mts.map +1 -1
  112. package/dist/number/branded-types/safe-int.mjs +45 -47
  113. package/dist/number/branded-types/safe-int.mjs.map +1 -1
  114. package/dist/number/branded-types/safe-uint.d.mts +68 -58
  115. package/dist/number/branded-types/safe-uint.d.mts.map +1 -1
  116. package/dist/number/branded-types/safe-uint.mjs +53 -46
  117. package/dist/number/branded-types/safe-uint.mjs.map +1 -1
  118. package/dist/number/branded-types/uint.d.mts +72 -55
  119. package/dist/number/branded-types/uint.d.mts.map +1 -1
  120. package/dist/number/branded-types/uint.mjs +52 -45
  121. package/dist/number/branded-types/uint.mjs.map +1 -1
  122. package/dist/number/branded-types/uint16.d.mts +66 -59
  123. package/dist/number/branded-types/uint16.d.mts.map +1 -1
  124. package/dist/number/branded-types/uint16.mjs +51 -45
  125. package/dist/number/branded-types/uint16.mjs.map +1 -1
  126. package/dist/number/branded-types/uint32.d.mts +66 -57
  127. package/dist/number/branded-types/uint32.d.mts.map +1 -1
  128. package/dist/number/branded-types/uint32.mjs +50 -45
  129. package/dist/number/branded-types/uint32.mjs.map +1 -1
  130. package/dist/number/enum/int8.d.mts +62 -66
  131. package/dist/number/enum/int8.d.mts.map +1 -1
  132. package/dist/number/enum/int8.mjs +57 -51
  133. package/dist/number/enum/int8.mjs.map +1 -1
  134. package/dist/number/enum/uint8.d.mts +66 -59
  135. package/dist/number/enum/uint8.d.mts.map +1 -1
  136. package/dist/number/enum/uint8.mjs +57 -51
  137. package/dist/number/enum/uint8.mjs.map +1 -1
  138. package/dist/number/refined-number-utils.d.mts +9 -9
  139. package/dist/number/refined-number-utils.d.mts.map +1 -1
  140. package/dist/number/refined-number-utils.mjs +7 -7
  141. package/dist/number/refined-number-utils.mjs.map +1 -1
  142. package/package.json +2 -1
  143. package/src/number/branded-types/finite-number.mts +47 -61
  144. package/src/number/branded-types/int.mts +40 -46
  145. package/src/number/branded-types/int16.mts +72 -60
  146. package/src/number/branded-types/int32.mts +72 -60
  147. package/src/number/branded-types/negative-finite-number.mts +78 -71
  148. package/src/number/branded-types/negative-finite-number.test.mts +4 -4
  149. package/src/number/branded-types/negative-int.mts +68 -60
  150. package/src/number/branded-types/negative-int.test.mts +5 -5
  151. package/src/number/branded-types/negative-safe-int.mts +66 -68
  152. package/src/number/branded-types/negative-safe-int.test.mts +4 -4
  153. package/src/number/branded-types/non-negative-finite-number.mts +81 -66
  154. package/src/number/branded-types/non-negative-int16.mts +72 -59
  155. package/src/number/branded-types/non-negative-int32.mts +72 -60
  156. package/src/number/branded-types/non-positive-finite-number.mts +71 -56
  157. package/src/number/branded-types/non-positive-finite-number.test.mts +7 -7
  158. package/src/number/branded-types/non-positive-int.mts +47 -147
  159. package/src/number/branded-types/non-positive-int.test.mts +7 -7
  160. package/src/number/branded-types/non-positive-safe-int.mts +63 -55
  161. package/src/number/branded-types/non-positive-safe-int.test.mts +7 -7
  162. package/src/number/branded-types/non-zero-finite-number.mts +62 -51
  163. package/src/number/branded-types/non-zero-int.mts +51 -38
  164. package/src/number/branded-types/non-zero-int16.mts +60 -55
  165. package/src/number/branded-types/non-zero-int32.mts +60 -56
  166. package/src/number/branded-types/non-zero-safe-int.mts +61 -56
  167. package/src/number/branded-types/non-zero-uint16.mts +60 -55
  168. package/src/number/branded-types/non-zero-uint32.mts +60 -55
  169. package/src/number/branded-types/positive-finite-number.mts +83 -65
  170. package/src/number/branded-types/positive-int.mts +54 -71
  171. package/src/number/branded-types/positive-int16.mts +69 -59
  172. package/src/number/branded-types/positive-int32.mts +69 -59
  173. package/src/number/branded-types/positive-safe-int.mts +73 -62
  174. package/src/number/branded-types/positive-uint16.mts +69 -59
  175. package/src/number/branded-types/positive-uint32.mts +69 -60
  176. package/src/number/branded-types/safe-int.mts +53 -67
  177. package/src/number/branded-types/safe-uint.mts +69 -59
  178. package/src/number/branded-types/uint.mts +73 -56
  179. package/src/number/branded-types/uint16.mts +67 -60
  180. package/src/number/branded-types/uint32.mts +67 -58
  181. package/src/number/enum/int8.mts +70 -73
  182. package/src/number/enum/int8.test.mts +7 -4
  183. package/src/number/enum/uint8.mts +74 -66
  184. package/src/number/enum/uint8.test.mts +7 -4
  185. package/src/number/refined-number-utils.mts +22 -19
@@ -1,18 +1,24 @@
1
1
  import { type SafeUint as TtfImported_SafeUint } from 'ts-type-forge';
2
2
  export type SafeUint = TtfImported_SafeUint;
3
3
  /**
4
- * Checks if a number is a SafeUint.
4
+ * Type guard that checks if a value is a non-negative safe integer.
5
5
  *
6
- * @param value The value to check.
7
- * @returns `true` if the value is a SafeUint, `false` otherwise.
6
+ * Returns `true` for a non-negative safe integer — a value with no fractional
7
+ * component.
8
+ *
9
+ * @param value - The value to check
10
+ * @returns `true` if the value is a non-negative safe integer, `false` otherwise
8
11
  */
9
12
  export declare const isSafeUint: (a: number) => a is TtfImported_SafeUint;
10
13
  /**
11
- * Casts a number to a SafeUint type.
14
+ * Casts a `number` to the `SafeUint` branded type.
15
+ *
16
+ * Validates that the value is a non-negative safe integer and returns it with
17
+ * the `SafeUint` brand. Throws a `TypeError` otherwise.
12
18
  *
13
- * @param value The value to cast.
14
- * @returns The value as a SafeUint type.
15
- * @throws {TypeError} If the value is not a non-negative safe integer.
19
+ * @param value - The value to cast
20
+ * @returns The value as a `SafeUint`
21
+ * @throws {TypeError} If the value is not a non-negative safe integer
16
22
  */
17
23
  export declare const asSafeUint: <N extends number>(x: N) => number & {
18
24
  readonly "> -2^16": true;
@@ -28,103 +34,107 @@ export declare const asSafeUint: <N extends number>(x: N) => number & {
28
34
  'TSTypeForgeInternals--edd2f9ce-7ca5-45b0-9d1a-bd61b9b5d9c3': unknown;
29
35
  }> & N;
30
36
  /**
31
- * Namespace providing type-safe arithmetic operations for safe unsigned
32
- * integers.
37
+ * Namespace providing type-safe operations for the `SafeUint` branded type.
33
38
  *
34
- * All operations automatically clamp results to the safe unsigned integer range
35
- * [0, MAX_SAFE_INTEGER]. This ensures that all arithmetic maintains both the
36
- * non-negative constraint and IEEE 754 precision guarantees, preventing
37
- * precision loss while ensuring results are never negative.
39
+ * The `SafeUint` type represents a non-negative safe integer. Division (`div`)
40
+ * uses floor division.
38
41
  */
39
42
  export declare const SafeUint: {
40
43
  /**
41
- * Type guard to check if a value is a SafeUint.
44
+ * Type guard that checks if a value is a non-negative safe integer.
42
45
  *
43
- * @param value The value to check.
44
- * @returns `true` if the value is a non-negative safe integer, `false`
45
- * otherwise.
46
+ * @param value - The value to check
47
+ * @returns `true` if the value is a non-negative safe integer, `false` otherwise
48
+ * @see {@link isSafeUint} for usage examples
46
49
  */
47
50
  readonly is: (a: number) => a is TtfImported_SafeUint;
48
51
  /**
49
- * The minimum value for a safe unsigned integer.
50
- *
51
- * @readonly
52
+ * The smallest value representable as `SafeUint` (the lower saturation target
53
+ * of `fromNumber`).
52
54
  */
53
55
  readonly MIN_VALUE: 0;
54
56
  /**
55
- * The maximum safe integer value (2^53 - 1).
56
- *
57
- * @readonly
57
+ * The largest value representable as `SafeUint` (the upper saturation target
58
+ * of `fromNumber`).
58
59
  */
59
60
  readonly MAX_VALUE: TtfImported_SafeUint;
60
61
  /**
61
- * Returns the smaller of two SafeUint values.
62
+ * Returns the smallest of the given non-negative safe integers.
62
63
  *
63
- * @param a The first SafeUint.
64
- * @param b The second SafeUint.
65
- * @returns The minimum value as a SafeUint.
64
+ * @param values - The non-negative safe integers to compare (at least one required)
65
+ * @returns The smallest value as a `SafeUint`
66
66
  */
67
67
  readonly min: (...values: readonly import("ts-type-forge").WithSmallInt<TtfImported_SafeUint>[]) => TtfImported_SafeUint;
68
68
  /**
69
- * Returns the larger of two SafeUint values.
69
+ * Returns the largest of the given non-negative safe integers.
70
70
  *
71
- * @param a The first SafeUint.
72
- * @param b The second SafeUint.
73
- * @returns The maximum value as a SafeUint.
71
+ * @param values - The non-negative safe integers to compare (at least one required)
72
+ * @returns The largest value as a `SafeUint`
74
73
  */
75
74
  readonly max: (...values: readonly import("ts-type-forge").WithSmallInt<TtfImported_SafeUint>[]) => TtfImported_SafeUint;
76
75
  /**
77
- * Clamps a number to the safe unsigned integer range.
76
+ * Converts an arbitrary `number` into a `SafeUint`, rounding to the nearest
77
+ * integer and saturating the result into the range `[MIN_VALUE, MAX_VALUE]`.
78
+ *
79
+ * Unlike `asSafeUint`, this is total: out-of-range inputs are clamped to the
80
+ * nearest representable `SafeUint` instead of throwing.
78
81
  *
79
- * @param value The number to clamp.
80
- * @returns The value clamped to [0, MAX_SAFE_INTEGER] as a SafeUint.
82
+ * @param value - The value to convert
83
+ * @returns The value as a `SafeUint`
81
84
  */
82
- readonly clamp: (x: number) => TtfImported_SafeUint;
85
+ readonly fromNumber: (x: number) => TtfImported_SafeUint;
83
86
  /**
84
- * Generates a random SafeUint value within the valid range.
87
+ * Generates a random `SafeUint` within the given range.
88
+ *
89
+ * The range is inclusive on both ends.
85
90
  *
86
- * @returns A random SafeUint between 0 and MAX_SAFE_INTEGER.
91
+ * @param min - The minimum value (inclusive)
92
+ * @param max - The maximum value (inclusive)
93
+ * @returns A random `SafeUint` in `[min, max]`
87
94
  */
88
95
  readonly random: (min?: import("ts-type-forge").WithSmallInt<TtfImported_SafeUint> | undefined, max?: import("ts-type-forge").WithSmallInt<TtfImported_SafeUint> | undefined) => TtfImported_SafeUint;
89
96
  /**
90
- * Raises a SafeUint to the power of another SafeUint.
97
+ * Raises `a` to the power `b`, returning `a ** b` as a `SafeUint` (floored to
98
+ * an integer).
91
99
  *
92
- * @param a The base SafeUint.
93
- * @param b The exponent SafeUint.
94
- * @returns `a ** b` clamped to [0, MAX_SAFE_INTEGER] as a SafeUint.
100
+ * @param a - The base non-negative safe integer
101
+ * @param b - The exponent non-negative safe integer
102
+ * @returns `a ** b` as a `SafeUint`
95
103
  */
96
104
  readonly pow: (x: import("ts-type-forge").WithSmallInt<TtfImported_SafeUint>, y: import("ts-type-forge").WithSmallInt<TtfImported_SafeUint>) => TtfImported_SafeUint;
97
105
  /**
98
- * Adds two SafeUint values.
106
+ * Adds two non-negative safe integers, returning `a + b` as a `SafeUint`.
99
107
  *
100
- * @param a The first SafeUint.
101
- * @param b The second SafeUint.
102
- * @returns `a + b` clamped to [0, MAX_SAFE_INTEGER] as a SafeUint.
108
+ * @param a - The first non-negative safe integer
109
+ * @param b - The second non-negative safe integer
110
+ * @returns The sum of `a` and `b` as a `SafeUint`
103
111
  */
104
112
  readonly add: (x: import("ts-type-forge").WithSmallInt<TtfImported_SafeUint>, y: import("ts-type-forge").WithSmallInt<TtfImported_SafeUint>) => TtfImported_SafeUint;
105
113
  /**
106
- * Subtracts one SafeUint from another.
114
+ * Subtracts two non-negative safe integers, returning `a - b` as a
115
+ * `SafeUint`.
107
116
  *
108
- * @param a The minuend SafeUint.
109
- * @param b The subtrahend SafeUint.
110
- * @returns `a - b` clamped to [0, MAX_SAFE_INTEGER] as a SafeUint (minimum
111
- * 0).
117
+ * @param a - The first non-negative safe integer
118
+ * @param b - The second non-negative safe integer
119
+ * @returns The difference of `a` and `b` as a `SafeUint`
112
120
  */
113
121
  readonly sub: (x: import("ts-type-forge").WithSmallInt<TtfImported_SafeUint>, y: import("ts-type-forge").WithSmallInt<TtfImported_SafeUint>) => TtfImported_SafeUint;
114
122
  /**
115
- * Multiplies two SafeUint values.
123
+ * Multiplies two non-negative safe integers, returning `a * b` as a
124
+ * `SafeUint`.
116
125
  *
117
- * @param a The first SafeUint.
118
- * @param b The second SafeUint.
119
- * @returns `a * b` clamped to [0, MAX_SAFE_INTEGER] as a SafeUint.
126
+ * @param a - The first non-negative safe integer
127
+ * @param b - The second non-negative safe integer
128
+ * @returns The product of `a` and `b` as a `SafeUint`
120
129
  */
121
130
  readonly mul: (x: import("ts-type-forge").WithSmallInt<TtfImported_SafeUint>, y: import("ts-type-forge").WithSmallInt<TtfImported_SafeUint>) => TtfImported_SafeUint;
122
131
  /**
123
- * Divides one SafeUint by another using floor division.
132
+ * Divides two non-negative safe integers using floor division (`⌊a / b⌋`):
133
+ * the result is `a / b` rounded toward negative infinity, as a `SafeUint`.
124
134
  *
125
- * @param a The dividend SafeUint.
126
- * @param b The divisor SafeUint.
127
- * @returns `⌊a / b⌋` clamped to [0, MAX_SAFE_INTEGER] as a SafeUint.
135
+ * @param a - The dividend
136
+ * @param b - The divisor (must be non-zero)
137
+ * @returns The floored quotient as a `SafeUint`
128
138
  */
129
139
  readonly div: (x: import("ts-type-forge").WithSmallInt<TtfImported_SafeUint>, y: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | import("ts-type-forge").NormalizeBrandUnion<number & {
130
140
  readonly "!=0": true;
@@ -1 +1 @@
1
- {"version":3,"file":"safe-uint.d.mts","sourceRoot":"","sources":["../../../src/number/branded-types/safe-uint.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,IAAI,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAItE,MAAM,MAAM,QAAQ,GAAG,oBAAoB,CAAC;AAgC5C;;;;;GAKG;AACH,eAAO,MAAM,UAAU,0CAAK,CAAC;AAE7B;;;;;;GAMG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;MAAW,CAAC;AAEnC;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ;IACnB;;;;;;OAMG;;IAGH;;;;OAIG;;IAGH;;;;OAIG;;IAGH;;;;;;OAMG;;IAGH;;;;;;OAMG;;IAGH;;;;;OAKG;;IAGH;;;;OAIG;;IAGH;;;;;;OAMG;;IAGH;;;;;;OAMG;;IAGH;;;;;;;OAOG;;IAGH;;;;;;OAMG;;IAGH;;;;;;OAMG;;;;;;;;;;;;;;;CAEK,CAAC"}
1
+ {"version":3,"file":"safe-uint.d.mts","sourceRoot":"","sources":["../../../src/number/branded-types/safe-uint.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,IAAI,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAItE,MAAM,MAAM,QAAQ,GAAG,oBAAoB,CAAC;AAgC5C;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,0CAAK,CAAC;AAE7B;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;MAAW,CAAC;AAEnC;;;;;GAKG;AACH,eAAO,MAAM,QAAQ;IACnB;;;;;;OAMG;;IAGH;;;OAGG;;IAGH;;;OAGG;;IAGH;;;;;OAKG;;IAGH;;;;;OAKG;;IAGH;;;;;;;;;OASG;;IAGH;;;;;;;;OAQG;;IAGH;;;;;;;OAOG;;IAGH;;;;;;OAMG;;IAGH;;;;;;;OAOG;;IAGH;;;;;;;OAOG;;IAGH;;;;;;;OAOG;;;;;;;;;;;;;;;CAEK,CAAC"}
@@ -6,8 +6,8 @@ const {
6
6
  MIN_VALUE,
7
7
  add,
8
8
  castType,
9
- clamp,
10
9
  div,
10
+ fromNumber,
11
11
  is,
12
12
  max: max_,
13
13
  min: min_,
@@ -26,93 +26,100 @@ const isSafeUint = is;
26
26
  const asSafeUint = castType;
27
27
  const SafeUint = {
28
28
  /**
29
- * Type guard to check if a value is a SafeUint.
29
+ * Type guard that checks if a value is a non-negative safe integer.
30
30
  *
31
- * @param value The value to check.
32
- * @returns `true` if the value is a non-negative safe integer, `false`
33
- * otherwise.
31
+ * @param value - The value to check
32
+ * @returns `true` if the value is a non-negative safe integer, `false` otherwise
33
+ * @see {@link isSafeUint} for usage examples
34
34
  */
35
35
  is,
36
36
  /**
37
- * The minimum value for a safe unsigned integer.
38
- *
39
- * @readonly
37
+ * The smallest value representable as `SafeUint` (the lower saturation target
38
+ * of `fromNumber`).
40
39
  */
41
40
  MIN_VALUE,
42
41
  /**
43
- * The maximum safe integer value (2^53 - 1).
44
- *
45
- * @readonly
42
+ * The largest value representable as `SafeUint` (the upper saturation target
43
+ * of `fromNumber`).
46
44
  */
47
45
  MAX_VALUE,
48
46
  /**
49
- * Returns the smaller of two SafeUint values.
47
+ * Returns the smallest of the given non-negative safe integers.
50
48
  *
51
- * @param a The first SafeUint.
52
- * @param b The second SafeUint.
53
- * @returns The minimum value as a SafeUint.
49
+ * @param values - The non-negative safe integers to compare (at least one required)
50
+ * @returns The smallest value as a `SafeUint`
54
51
  */
55
52
  min: min_,
56
53
  /**
57
- * Returns the larger of two SafeUint values.
54
+ * Returns the largest of the given non-negative safe integers.
58
55
  *
59
- * @param a The first SafeUint.
60
- * @param b The second SafeUint.
61
- * @returns The maximum value as a SafeUint.
56
+ * @param values - The non-negative safe integers to compare (at least one required)
57
+ * @returns The largest value as a `SafeUint`
62
58
  */
63
59
  max: max_,
64
60
  /**
65
- * Clamps a number to the safe unsigned integer range.
61
+ * Converts an arbitrary `number` into a `SafeUint`, rounding to the nearest
62
+ * integer and saturating the result into the range `[MIN_VALUE, MAX_VALUE]`.
66
63
  *
67
- * @param value The number to clamp.
68
- * @returns The value clamped to [0, MAX_SAFE_INTEGER] as a SafeUint.
64
+ * Unlike `asSafeUint`, this is total: out-of-range inputs are clamped to the
65
+ * nearest representable `SafeUint` instead of throwing.
66
+ *
67
+ * @param value - The value to convert
68
+ * @returns The value as a `SafeUint`
69
69
  */
70
- clamp,
70
+ fromNumber,
71
71
  /**
72
- * Generates a random SafeUint value within the valid range.
72
+ * Generates a random `SafeUint` within the given range.
73
+ *
74
+ * The range is inclusive on both ends.
73
75
  *
74
- * @returns A random SafeUint between 0 and MAX_SAFE_INTEGER.
76
+ * @param min - The minimum value (inclusive)
77
+ * @param max - The maximum value (inclusive)
78
+ * @returns A random `SafeUint` in `[min, max]`
75
79
  */
76
80
  random,
77
81
  /**
78
- * Raises a SafeUint to the power of another SafeUint.
82
+ * Raises `a` to the power `b`, returning `a ** b` as a `SafeUint` (floored to
83
+ * an integer).
79
84
  *
80
- * @param a The base SafeUint.
81
- * @param b The exponent SafeUint.
82
- * @returns `a ** b` clamped to [0, MAX_SAFE_INTEGER] as a SafeUint.
85
+ * @param a - The base non-negative safe integer
86
+ * @param b - The exponent non-negative safe integer
87
+ * @returns `a ** b` as a `SafeUint`
83
88
  */
84
89
  pow,
85
90
  /**
86
- * Adds two SafeUint values.
91
+ * Adds two non-negative safe integers, returning `a + b` as a `SafeUint`.
87
92
  *
88
- * @param a The first SafeUint.
89
- * @param b The second SafeUint.
90
- * @returns `a + b` clamped to [0, MAX_SAFE_INTEGER] as a SafeUint.
93
+ * @param a - The first non-negative safe integer
94
+ * @param b - The second non-negative safe integer
95
+ * @returns The sum of `a` and `b` as a `SafeUint`
91
96
  */
92
97
  add,
93
98
  /**
94
- * Subtracts one SafeUint from another.
99
+ * Subtracts two non-negative safe integers, returning `a - b` as a
100
+ * `SafeUint`.
95
101
  *
96
- * @param a The minuend SafeUint.
97
- * @param b The subtrahend SafeUint.
98
- * @returns `a - b` clamped to [0, MAX_SAFE_INTEGER] as a SafeUint (minimum
99
- * 0).
102
+ * @param a - The first non-negative safe integer
103
+ * @param b - The second non-negative safe integer
104
+ * @returns The difference of `a` and `b` as a `SafeUint`
100
105
  */
101
106
  sub,
102
107
  /**
103
- * Multiplies two SafeUint values.
108
+ * Multiplies two non-negative safe integers, returning `a * b` as a
109
+ * `SafeUint`.
104
110
  *
105
- * @param a The first SafeUint.
106
- * @param b The second SafeUint.
107
- * @returns `a * b` clamped to [0, MAX_SAFE_INTEGER] as a SafeUint.
111
+ * @param a - The first non-negative safe integer
112
+ * @param b - The second non-negative safe integer
113
+ * @returns The product of `a` and `b` as a `SafeUint`
108
114
  */
109
115
  mul,
110
116
  /**
111
- * Divides one SafeUint by another using floor division.
117
+ * Divides two non-negative safe integers using floor division (`⌊a / b⌋`):
118
+ * the result is `a / b` rounded toward negative infinity, as a `SafeUint`.
112
119
  *
113
- * @param a The dividend SafeUint.
114
- * @param b The divisor SafeUint.
115
- * @returns `⌊a / b⌋` clamped to [0, MAX_SAFE_INTEGER] as a SafeUint.
120
+ * @param a - The dividend
121
+ * @param b - The divisor (must be non-zero)
122
+ * @returns The floored quotient as a `SafeUint`
116
123
  */
117
124
  div
118
125
  };
@@ -1 +1 @@
1
- {"version":3,"file":"safe-uint.mjs","sources":["../../../src/number/branded-types/safe-uint.mts"],"sourcesContent":["import { type SafeUint as TtfImported_SafeUint } from 'ts-type-forge';\nimport { expectType } from '../../expect-type.mjs';\nimport { TsDataForgeInternals } from '../refined-number-utils.mjs';\n\nexport type SafeUint = TtfImported_SafeUint;\n\ntype ElementType = SafeUint;\n\nconst typeNameInMessage = 'a non-negative safe integer';\n\nconst {\n MAX_VALUE,\n MIN_VALUE,\n add,\n castType,\n clamp,\n div,\n is,\n max: max_,\n min: min_,\n mul,\n pow,\n random,\n sub,\n} = TsDataForgeInternals.RefinedNumberUtils.operatorsForInteger<\n ElementType,\n 0,\n SafeUint\n>({\n integerOrSafeInteger: 'SafeInteger',\n MIN_VALUE: 0,\n // eslint-disable-next-line total-functions/no-unsafe-type-assertion, math/prefer-number-max-safe-integer\n MAX_VALUE: Number.MAX_SAFE_INTEGER as SafeUint,\n typeNameInMessage,\n} as const);\n\n/**\n * Checks if a number is a SafeUint.\n *\n * @param value The value to check.\n * @returns `true` if the value is a SafeUint, `false` otherwise.\n */\nexport const isSafeUint = is;\n\n/**\n * Casts a number to a SafeUint type.\n *\n * @param value The value to cast.\n * @returns The value as a SafeUint type.\n * @throws {TypeError} If the value is not a non-negative safe integer.\n */\nexport const asSafeUint = castType;\n\n/**\n * Namespace providing type-safe arithmetic operations for safe unsigned\n * integers.\n *\n * All operations automatically clamp results to the safe unsigned integer range\n * [0, MAX_SAFE_INTEGER]. This ensures that all arithmetic maintains both the\n * non-negative constraint and IEEE 754 precision guarantees, preventing\n * precision loss while ensuring results are never negative.\n */\nexport const SafeUint = {\n /**\n * Type guard to check if a value is a SafeUint.\n *\n * @param value The value to check.\n * @returns `true` if the value is a non-negative safe integer, `false`\n * otherwise.\n */\n is,\n\n /**\n * The minimum value for a safe unsigned integer.\n *\n * @readonly\n */\n MIN_VALUE,\n\n /**\n * The maximum safe integer value (2^53 - 1).\n *\n * @readonly\n */\n MAX_VALUE,\n\n /**\n * Returns the smaller of two SafeUint values.\n *\n * @param a The first SafeUint.\n * @param b The second SafeUint.\n * @returns The minimum value as a SafeUint.\n */\n min: min_,\n\n /**\n * Returns the larger of two SafeUint values.\n *\n * @param a The first SafeUint.\n * @param b The second SafeUint.\n * @returns The maximum value as a SafeUint.\n */\n max: max_,\n\n /**\n * Clamps a number to the safe unsigned integer range.\n *\n * @param value The number to clamp.\n * @returns The value clamped to [0, MAX_SAFE_INTEGER] as a SafeUint.\n */\n clamp,\n\n /**\n * Generates a random SafeUint value within the valid range.\n *\n * @returns A random SafeUint between 0 and MAX_SAFE_INTEGER.\n */\n random,\n\n /**\n * Raises a SafeUint to the power of another SafeUint.\n *\n * @param a The base SafeUint.\n * @param b The exponent SafeUint.\n * @returns `a ** b` clamped to [0, MAX_SAFE_INTEGER] as a SafeUint.\n */\n pow,\n\n /**\n * Adds two SafeUint values.\n *\n * @param a The first SafeUint.\n * @param b The second SafeUint.\n * @returns `a + b` clamped to [0, MAX_SAFE_INTEGER] as a SafeUint.\n */\n add,\n\n /**\n * Subtracts one SafeUint from another.\n *\n * @param a The minuend SafeUint.\n * @param b The subtrahend SafeUint.\n * @returns `a - b` clamped to [0, MAX_SAFE_INTEGER] as a SafeUint (minimum\n * 0).\n */\n sub,\n\n /**\n * Multiplies two SafeUint values.\n *\n * @param a The first SafeUint.\n * @param b The second SafeUint.\n * @returns `a * b` clamped to [0, MAX_SAFE_INTEGER] as a SafeUint.\n */\n mul,\n\n /**\n * Divides one SafeUint by another using floor division.\n *\n * @param a The dividend SafeUint.\n * @param b The divisor SafeUint.\n * @returns `⌊a / b⌋` clamped to [0, MAX_SAFE_INTEGER] as a SafeUint.\n */\n div,\n} as const;\n\nexpectType<\n keyof typeof SafeUint,\n keyof TsDataForgeInternals.RefinedNumberUtils.NumberClass<\n ElementType,\n 'int' | 'non-negative' | 'range'\n >\n>('=');\n\nexpectType<\n typeof SafeUint,\n TsDataForgeInternals.RefinedNumberUtils.NumberClass<\n ElementType,\n 'int' | 'non-negative' | 'range'\n >\n>('<=');\n"],"names":[],"mappings":";;AAQA,MAAM,iBAAA,GAAoB,6BAAA;AAE1B,MAAM;AAAA,EACJ,SAAA;AAAA,EACA,SAAA;AAAA,EACA,GAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AAAA,EACA,GAAA;AAAA,EACA,EAAA;AAAA,EACA,GAAA,EAAK,IAAA;AAAA,EACL,GAAA,EAAK,IAAA;AAAA,EACL,GAAA;AAAA,EACA,GAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAA,GAAI,oBAAA,CAAqB,mBAAmB,mBAAA,CAI1C;AAAA,EACA,oBAAA,EAAsB,aAAA;AAAA,EACtB,SAAA,EAAW,CAAA;AAAA;AAAA,EAEX,WAAW,MAAA,CAAO,gBAAA;AAAA,EAClB;AACF,CAAU,CAAA;AAQH,MAAM,UAAA,GAAa;AASnB,MAAM,UAAA,GAAa;AAWnB,MAAM,QAAA,GAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQtB,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASL,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQL,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA;AACF;;;;"}
1
+ {"version":3,"file":"safe-uint.mjs","sources":["../../../src/number/branded-types/safe-uint.mts"],"sourcesContent":["import { type SafeUint as TtfImported_SafeUint } from 'ts-type-forge';\nimport { expectType } from '../../expect-type.mjs';\nimport { TsDataForgeInternals } from '../refined-number-utils.mjs';\n\nexport type SafeUint = TtfImported_SafeUint;\n\ntype ElementType = SafeUint;\n\nconst typeNameInMessage = 'a non-negative safe integer';\n\nconst {\n MAX_VALUE,\n MIN_VALUE,\n add,\n castType,\n div,\n fromNumber,\n is,\n max: max_,\n min: min_,\n mul,\n pow,\n random,\n sub,\n} = TsDataForgeInternals.RefinedNumberUtils.operatorsForInteger<\n ElementType,\n 0,\n SafeUint\n>({\n integerOrSafeInteger: 'SafeInteger',\n MIN_VALUE: 0,\n // eslint-disable-next-line total-functions/no-unsafe-type-assertion, math/prefer-number-max-safe-integer\n MAX_VALUE: Number.MAX_SAFE_INTEGER as SafeUint,\n typeNameInMessage,\n} as const);\n\n/**\n * Type guard that checks if a value is a non-negative safe integer.\n *\n * Returns `true` for a non-negative safe integer — a value with no fractional\n * component.\n *\n * @param value - The value to check\n * @returns `true` if the value is a non-negative safe integer, `false` otherwise\n */\nexport const isSafeUint = is;\n\n/**\n * Casts a `number` to the `SafeUint` branded type.\n *\n * Validates that the value is a non-negative safe integer and returns it with\n * the `SafeUint` brand. Throws a `TypeError` otherwise.\n *\n * @param value - The value to cast\n * @returns The value as a `SafeUint`\n * @throws {TypeError} If the value is not a non-negative safe integer\n */\nexport const asSafeUint = castType;\n\n/**\n * Namespace providing type-safe operations for the `SafeUint` branded type.\n *\n * The `SafeUint` type represents a non-negative safe integer. Division (`div`)\n * uses floor division.\n */\nexport const SafeUint = {\n /**\n * Type guard that checks if a value is a non-negative safe integer.\n *\n * @param value - The value to check\n * @returns `true` if the value is a non-negative safe integer, `false` otherwise\n * @see {@link isSafeUint} for usage examples\n */\n is,\n\n /**\n * The smallest value representable as `SafeUint` (the lower saturation target\n * of `fromNumber`).\n */\n MIN_VALUE,\n\n /**\n * The largest value representable as `SafeUint` (the upper saturation target\n * of `fromNumber`).\n */\n MAX_VALUE,\n\n /**\n * Returns the smallest of the given non-negative safe integers.\n *\n * @param values - The non-negative safe integers to compare (at least one required)\n * @returns The smallest value as a `SafeUint`\n */\n min: min_,\n\n /**\n * Returns the largest of the given non-negative safe integers.\n *\n * @param values - The non-negative safe integers to compare (at least one required)\n * @returns The largest value as a `SafeUint`\n */\n max: max_,\n\n /**\n * Converts an arbitrary `number` into a `SafeUint`, rounding to the nearest\n * integer and saturating the result into the range `[MIN_VALUE, MAX_VALUE]`.\n *\n * Unlike `asSafeUint`, this is total: out-of-range inputs are clamped to the\n * nearest representable `SafeUint` instead of throwing.\n *\n * @param value - The value to convert\n * @returns The value as a `SafeUint`\n */\n fromNumber,\n\n /**\n * Generates a random `SafeUint` within the given range.\n *\n * The range is inclusive on both ends.\n *\n * @param min - The minimum value (inclusive)\n * @param max - The maximum value (inclusive)\n * @returns A random `SafeUint` in `[min, max]`\n */\n random,\n\n /**\n * Raises `a` to the power `b`, returning `a ** b` as a `SafeUint` (floored to\n * an integer).\n *\n * @param a - The base non-negative safe integer\n * @param b - The exponent non-negative safe integer\n * @returns `a ** b` as a `SafeUint`\n */\n pow,\n\n /**\n * Adds two non-negative safe integers, returning `a + b` as a `SafeUint`.\n *\n * @param a - The first non-negative safe integer\n * @param b - The second non-negative safe integer\n * @returns The sum of `a` and `b` as a `SafeUint`\n */\n add,\n\n /**\n * Subtracts two non-negative safe integers, returning `a - b` as a\n * `SafeUint`.\n *\n * @param a - The first non-negative safe integer\n * @param b - The second non-negative safe integer\n * @returns The difference of `a` and `b` as a `SafeUint`\n */\n sub,\n\n /**\n * Multiplies two non-negative safe integers, returning `a * b` as a\n * `SafeUint`.\n *\n * @param a - The first non-negative safe integer\n * @param b - The second non-negative safe integer\n * @returns The product of `a` and `b` as a `SafeUint`\n */\n mul,\n\n /**\n * Divides two non-negative safe integers using floor division (`⌊a / b⌋`):\n * the result is `a / b` rounded toward negative infinity, as a `SafeUint`.\n *\n * @param a - The dividend\n * @param b - The divisor (must be non-zero)\n * @returns The floored quotient as a `SafeUint`\n */\n div,\n} as const;\n\nexpectType<\n keyof typeof SafeUint,\n keyof TsDataForgeInternals.RefinedNumberUtils.NumberClass<\n ElementType,\n 'int' | 'non-negative' | 'range'\n >\n>('=');\n\nexpectType<\n typeof SafeUint,\n TsDataForgeInternals.RefinedNumberUtils.NumberClass<\n ElementType,\n 'int' | 'non-negative' | 'range'\n >\n>('<=');\n"],"names":[],"mappings":";;AAQA,MAAM,iBAAA,GAAoB,6BAAA;AAE1B,MAAM;AAAA,EACJ,SAAA;AAAA,EACA,SAAA;AAAA,EACA,GAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAA;AAAA,EACA,UAAA;AAAA,EACA,EAAA;AAAA,EACA,GAAA,EAAK,IAAA;AAAA,EACL,GAAA,EAAK,IAAA;AAAA,EACL,GAAA;AAAA,EACA,GAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAA,GAAI,oBAAA,CAAqB,mBAAmB,mBAAA,CAI1C;AAAA,EACA,oBAAA,EAAsB,aAAA;AAAA,EACtB,SAAA,EAAW,CAAA;AAAA;AAAA,EAEX,WAAW,MAAA,CAAO,gBAAA;AAAA,EAClB;AACF,CAAU,CAAA;AAWH,MAAM,UAAA,GAAa;AAYnB,MAAM,UAAA,GAAa;AAQnB,MAAM,QAAA,GAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQtB,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQL,GAAA,EAAK,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYL,UAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA;AACF;;;;"}