@synnaxlabs/x 0.36.0 → 0.38.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 (147) hide show
  1. package/.turbo/turbo-build.log +41 -37
  2. package/dist/binary.cjs +1 -1
  3. package/dist/binary.js +1 -1
  4. package/dist/box-BZ6d2d5A.cjs +1 -0
  5. package/dist/box-Cto-5Uxu.js +201 -0
  6. package/dist/box.cjs +1 -1
  7. package/dist/box.js +1 -1
  8. package/dist/caseconv.cjs +1 -1
  9. package/dist/caseconv.js +1 -1
  10. package/dist/compare.cjs +1 -1
  11. package/dist/compare.js +1 -1
  12. package/dist/external-C-dNgNQw.cjs +1 -0
  13. package/dist/external-Cax-LfQW.cjs +1 -0
  14. package/dist/external-DqPrWKvU.js +47 -0
  15. package/dist/external-vFGUdZf6.js +30 -0
  16. package/dist/index-BG3Scw3G.cjs +1 -0
  17. package/dist/{index-HQonyH7n.js → index-BVC_8Cg9.js} +1 -1
  18. package/dist/index-BfDeGfej.js +41 -0
  19. package/dist/{index-CYxQwEdX.cjs → index-CnclyYpG.cjs} +1 -1
  20. package/dist/index-D4NCYiQB.js +19 -0
  21. package/dist/index-Dd8DLyMx.cjs +1 -0
  22. package/dist/{index-BBa2mWG1.js → index-OHIRoCei.js} +1 -1
  23. package/dist/index-udOjA9d-.cjs +1 -0
  24. package/dist/index.cjs +2 -2
  25. package/dist/index.js +126 -124
  26. package/dist/kv.cjs +1 -1
  27. package/dist/kv.js +2 -2
  28. package/dist/link.cjs +1 -0
  29. package/dist/link.js +10 -0
  30. package/dist/{location-DLP2ZS0o.cjs → location-BIet4Mig.cjs} +1 -1
  31. package/dist/{location-Cn1ByVTZ.js → location-C5Ot4MVG.js} +1 -1
  32. package/dist/location.cjs +1 -1
  33. package/dist/location.js +1 -1
  34. package/dist/position-CvSNZkSD.cjs +1 -0
  35. package/dist/position-GeF1oEYk.js +85 -0
  36. package/dist/position.cjs +1 -1
  37. package/dist/position.js +1 -1
  38. package/dist/runtime.cjs +1 -1
  39. package/dist/runtime.js +1 -1
  40. package/dist/{scale-BI4wJF3b.cjs → scale-BTgf0Mr-.cjs} +1 -1
  41. package/dist/{scale-rZ1YKDFy.js → scale-Dh1UNRoC.js} +3 -3
  42. package/dist/scale.cjs +1 -1
  43. package/dist/scale.js +1 -1
  44. package/dist/series-BMhEEJZL.cjs +11 -0
  45. package/dist/{series-CnEQe1dh.js → series-DxDIugLj.js} +296 -286
  46. package/dist/spatial.cjs +1 -1
  47. package/dist/spatial.js +5 -5
  48. package/dist/src/breaker/breaker.d.ts +1 -1
  49. package/dist/src/breaker/breaker.d.ts.map +1 -1
  50. package/dist/src/caseconv/caseconv.d.ts +12 -6
  51. package/dist/src/caseconv/caseconv.d.ts.map +1 -1
  52. package/dist/src/deep/path.d.ts.map +1 -1
  53. package/dist/src/index.d.ts +2 -1
  54. package/dist/src/index.d.ts.map +1 -1
  55. package/dist/src/kv/external.d.ts +3 -0
  56. package/dist/src/kv/external.d.ts.map +1 -0
  57. package/dist/src/kv/index.d.ts +1 -1
  58. package/dist/src/kv/index.d.ts.map +1 -1
  59. package/dist/src/kv/mock.d.ts +24 -0
  60. package/dist/src/kv/mock.d.ts.map +1 -0
  61. package/dist/src/kv/mock.spec.d.ts +2 -0
  62. package/dist/src/kv/mock.spec.d.ts.map +1 -0
  63. package/dist/src/kv/types.d.ts +18 -18
  64. package/dist/src/kv/types.d.ts.map +1 -1
  65. package/dist/src/link/index.d.ts +2 -0
  66. package/dist/src/link/index.d.ts.map +1 -0
  67. package/dist/src/link/link.d.ts +2 -0
  68. package/dist/src/link/link.d.ts.map +1 -0
  69. package/dist/src/link/link.spec.d.ts +2 -0
  70. package/dist/src/link/link.spec.d.ts.map +1 -0
  71. package/dist/src/runtime/os.d.ts +1 -1
  72. package/dist/src/runtime/os.d.ts.map +1 -1
  73. package/dist/src/sleep/sleep.d.ts.map +1 -1
  74. package/dist/src/telem/index.d.ts +1 -1
  75. package/dist/src/telem/index.d.ts.map +1 -1
  76. package/dist/src/telem/series.d.ts +1 -0
  77. package/dist/src/telem/series.d.ts.map +1 -1
  78. package/dist/src/telem/telem.d.ts +2 -0
  79. package/dist/src/telem/telem.d.ts.map +1 -1
  80. package/dist/src/unique/index.d.ts +2 -0
  81. package/dist/src/unique/index.d.ts.map +1 -0
  82. package/dist/src/unique/unique.d.ts +42 -0
  83. package/dist/src/unique/unique.d.ts.map +1 -0
  84. package/dist/src/unique/unique.spec.d.ts +2 -0
  85. package/dist/src/unique/unique.spec.d.ts.map +1 -0
  86. package/dist/src/zodutil/index.d.ts.map +1 -1
  87. package/dist/src/zodutil/zodutil.d.ts +1 -16
  88. package/dist/src/zodutil/zodutil.d.ts.map +1 -1
  89. package/dist/telem.cjs +1 -1
  90. package/dist/telem.js +1 -1
  91. package/dist/unique.cjs +1 -1
  92. package/dist/unique.js +2 -2
  93. package/dist/url.cjs +1 -1
  94. package/dist/url.js +5 -5
  95. package/dist/{xy-LADI2wVU.cjs → xy-Budz-qz-.cjs} +1 -1
  96. package/dist/{xy-DQdccWlc.js → xy-DxjPL2DZ.js} +4 -4
  97. package/dist/xy.cjs +1 -1
  98. package/dist/xy.js +1 -1
  99. package/dist/zodutil-BfrF8jE3.js +23 -0
  100. package/dist/zodutil-DFJyyQd2.cjs +1 -0
  101. package/dist/zodutil.cjs +1 -1
  102. package/dist/zodutil.js +1 -1
  103. package/package.json +8 -10
  104. package/src/breaker/breaker.spec.ts +3 -4
  105. package/src/breaker/breaker.ts +3 -2
  106. package/src/caseconv/caseconv.spec.ts +20 -20
  107. package/src/caseconv/caseconv.ts +34 -5
  108. package/src/compare/compare.ts +2 -2
  109. package/src/deep/path.ts +1 -1
  110. package/src/index.ts +2 -1
  111. package/src/{unique.ts → kv/external.ts} +2 -1
  112. package/src/kv/index.ts +1 -1
  113. package/src/kv/mock.spec.ts +101 -0
  114. package/src/kv/mock.ts +58 -0
  115. package/src/kv/types.ts +22 -28
  116. package/src/link/index.ts +10 -0
  117. package/src/link/link.spec.ts +68 -0
  118. package/src/link/link.ts +21 -0
  119. package/src/runtime/os.ts +18 -2
  120. package/src/sleep/sleep.ts +1 -1
  121. package/src/telem/index.ts +1 -1
  122. package/src/telem/series.spec.ts +21 -0
  123. package/src/telem/series.ts +15 -9
  124. package/src/telem/telem.ts +34 -10
  125. package/src/unique/index.ts +10 -0
  126. package/src/unique/unique.spec.ts +192 -0
  127. package/src/unique/unique.ts +67 -0
  128. package/src/zodutil/index.ts +1 -1
  129. package/src/zodutil/zodutil.ts +1 -29
  130. package/tsconfig.tsbuildinfo +1 -1
  131. package/vite.config.ts +6 -8
  132. package/dist/box-BpSX4si6.cjs +0 -1
  133. package/dist/box-CYXc9-qp.js +0 -201
  134. package/dist/external-B3XSLDq5.cjs +0 -1
  135. package/dist/external-sVtvYJS6.js +0 -23
  136. package/dist/index-YsO0EMN8.cjs +0 -1
  137. package/dist/index-eue4dSQX.js +0 -45
  138. package/dist/index-h-QAL9T1.cjs +0 -1
  139. package/dist/position-DJXB-pDS.js +0 -85
  140. package/dist/position-JCN6-sJC.cjs +0 -1
  141. package/dist/series-BN9CILsQ.cjs +0 -11
  142. package/dist/src/unique.d.ts +0 -2
  143. package/dist/src/unique.d.ts.map +0 -1
  144. package/dist/types-BpAJW2TM.js +0 -11
  145. package/dist/types-zRwnQ1hc.cjs +0 -1
  146. package/dist/zodutil-BRjUdYAv.cjs +0 -1
  147. package/dist/zodutil-DI4gVZkT.js +0 -27
@@ -1,24 +1,24 @@
1
1
 
2
- > @synnaxlabs/x@0.36.0 build /home/runner/work/synnax/synnax/x/ts
2
+ > @synnaxlabs/x@0.38.0 build /home/runner/work/synnax/synnax/x/ts
3
3
  > tsc --noEmit && vite build
4
4
 
5
5
   Synnax - Production mode
6
- vite v6.0.3 building for production...
6
+ vite v6.0.7 building for production...
7
7
  transforming...
8
- ✓ 88 modules transformed.
8
+ ✓ 93 modules transformed.
9
9
  Generated an empty chunk: "destructor".
10
10
  rendering chunks...
11
11
 
12
12
  [vite:dts] Start generate declaration files...
13
13
  computing gzip size...
14
14
  dist/destructor.js  0.00 kB │ gzip: 0.02 kB
15
- dist/unique.js  0.06 kB │ gzip: 0.08 kB
16
- dist/kv.js  0.06 kB │ gzip: 0.08 kB
17
15
  dist/xy.js  0.07 kB │ gzip: 0.08 kB
18
16
  dist/box.js  0.07 kB │ gzip: 0.08 kB
19
17
  dist/binary.js  0.07 kB │ gzip: 0.08 kB
18
+ dist/kv.js  0.07 kB │ gzip: 0.09 kB
20
19
  dist/scale.js  0.07 kB │ gzip: 0.08 kB
21
20
  dist/location.js  0.07 kB │ gzip: 0.08 kB
21
+ dist/unique.js  0.07 kB │ gzip: 0.09 kB
22
22
  dist/bounds.js  0.07 kB │ gzip: 0.08 kB
23
23
  dist/change.js  0.07 kB │ gzip: 0.08 kB
24
24
  dist/compare.js  0.07 kB │ gzip: 0.09 kB
@@ -31,43 +31,45 @@ computing gzip size...
31
31
  dist/identity.js  0.10 kB │ gzip: 0.11 kB
32
32
  dist/toArray.js  0.15 kB │ gzip: 0.12 kB
33
33
  dist/search.js  0.26 kB │ gzip: 0.19 kB
34
- dist/types-BpAJW2TM.js  0.27 kB │ gzip: 0.21 kB
35
34
  dist/spatial-DozyssiN.js  0.28 kB │ gzip: 0.23 kB
36
35
  dist/record.js  0.29 kB │ gzip: 0.21 kB
37
36
  dist/change-DLl6DccR.js  0.30 kB │ gzip: 0.23 kB
38
37
  dist/debounce.js  0.36 kB │ gzip: 0.18 kB
38
+ dist/link.js  0.44 kB │ gzip: 0.34 kB
39
39
  dist/telem.js  0.45 kB │ gzip: 0.26 kB
40
+ dist/index-D4NCYiQB.js  0.45 kB │ gzip: 0.30 kB
40
41
  dist/spatial.js  0.58 kB │ gzip: 0.28 kB
41
42
  dist/direction-CScbfCdT.js  0.65 kB │ gzip: 0.37 kB
42
- dist/external-sVtvYJS6.js  0.86 kB │ gzip: 0.51 kB
43
- dist/zodutil-DI4gVZkT.js  0.91 kB │ gzip: 0.54 kB
43
+ dist/zodutil-BfrF8jE3.js  0.77 kB │ gzip: 0.48 kB
44
+ dist/external-vFGUdZf6.js  1.03 kB │ gzip: 0.57 kB
45
+ dist/external-DqPrWKvU.js  1.07 kB │ gzip: 0.46 kB
44
46
  dist/worker.js  1.17 kB │ gzip: 0.53 kB
45
47
  dist/base-DnZzEvvz.js  1.21 kB │ gzip: 0.51 kB
46
48
  dist/observe.js  1.41 kB │ gzip: 0.60 kB
47
49
  dist/dimensions-D-1PnJVI.js  1.49 kB │ gzip: 0.66 kB
48
50
  dist/path-DD6ytXzr.js  1.79 kB │ gzip: 0.72 kB
49
- dist/index-eue4dSQX.js  1.83 kB │ gzip: 0.88 kB
51
+ dist/index-BfDeGfej.js  1.87 kB │ gzip: 0.87 kB
50
52
  dist/url.js  1.98 kB │ gzip: 0.87 kB
51
- dist/position-DJXB-pDS.js  2.25 kB │ gzip: 1.06 kB
52
- dist/location-Cn1ByVTZ.js  2.81 kB │ gzip: 1.16 kB
53
- dist/index-HQonyH7n.js  2.90 kB │ gzip: 1.14 kB
54
- dist/index-BBa2mWG1.js  2.95 kB │ gzip: 1.12 kB
53
+ dist/position-GeF1oEYk.js  2.25 kB │ gzip: 1.06 kB
54
+ dist/location-C5Ot4MVG.js  2.81 kB │ gzip: 1.16 kB
55
+ dist/index-BVC_8Cg9.js  2.91 kB │ gzip: 1.15 kB
56
+ dist/index-OHIRoCei.js  2.95 kB │ gzip: 1.12 kB
55
57
  dist/deep.js  3.23 kB │ gzip: 1.28 kB
56
- dist/xy-DQdccWlc.js  3.76 kB │ gzip: 1.43 kB
57
- dist/box-CYXc9-qp.js  6.14 kB │ gzip: 2.17 kB
58
+ dist/xy-DxjPL2DZ.js  3.76 kB │ gzip: 1.43 kB
59
+ dist/box-Cto-5Uxu.js  6.14 kB │ gzip: 2.17 kB
58
60
  dist/bounds-BtccGJW0.js  6.52 kB │ gzip: 2.06 kB
59
- dist/scale-rZ1YKDFy.js  6.82 kB │ gzip: 2.03 kB
60
- dist/index.js  8.96 kB │ gzip: 3.34 kB
61
- dist/series-CnEQe1dh.js 63.13 kB │ gzip: 13.87 kB
62
- [vite:dts] Declaration files built in 4513ms.
61
+ dist/scale-Dh1UNRoC.js  6.82 kB │ gzip: 2.03 kB
62
+ dist/index.js  9.02 kB │ gzip: 3.35 kB
63
+ dist/series-DxDIugLj.js 63.74 kB │ gzip: 14.00 kB
64
+ [vite:dts] Declaration files built in 4136ms.
63
65
 
64
66
  Generated an empty chunk: "destructor".
65
67
  dist/destructor.cjs  0.01 kB │ gzip: 0.03 kB
66
- dist/unique.cjs  0.13 kB │ gzip: 0.14 kB
67
- dist/xy.cjs  0.13 kB │ gzip: 0.15 kB
68
- dist/box.cjs  0.14 kB │ gzip: 0.14 kB
69
- dist/kv.cjs  0.14 kB │ gzip: 0.14 kB
68
+ dist/xy.cjs  0.13 kB │ gzip: 0.14 kB
69
+ dist/box.cjs  0.14 kB │ gzip: 0.15 kB
70
70
  dist/scale.cjs  0.14 kB │ gzip: 0.15 kB
71
+ dist/unique.cjs  0.15 kB │ gzip: 0.15 kB
72
+ dist/kv.cjs  0.15 kB │ gzip: 0.15 kB
71
73
  dist/bounds.cjs  0.15 kB │ gzip: 0.15 kB
72
74
  dist/change.cjs  0.15 kB │ gzip: 0.15 kB
73
75
  dist/binary.cjs  0.15 kB │ gzip: 0.15 kB
@@ -81,33 +83,35 @@ Generated an empty chunk: "destructor".
81
83
  dist/dimensions.cjs  0.16 kB │ gzip: 0.15 kB
82
84
  dist/identity.cjs  0.16 kB │ gzip: 0.15 kB
83
85
  dist/toArray.cjs  0.19 kB │ gzip: 0.16 kB
84
- dist/types-zRwnQ1hc.cjs  0.21 kB │ gzip: 0.18 kB
85
86
  dist/change-C-YELKx6.cjs  0.23 kB │ gzip: 0.20 kB
86
87
  dist/spatial-BOhaO8xN.cjs  0.24 kB │ gzip: 0.21 kB
87
88
  dist/search.cjs  0.25 kB │ gzip: 0.22 kB
89
+ dist/index-udOjA9d-.cjs  0.32 kB │ gzip: 0.25 kB
88
90
  dist/debounce.cjs  0.33 kB │ gzip: 0.22 kB
89
91
  dist/record.cjs  0.33 kB │ gzip: 0.24 kB
92
+ dist/link.cjs  0.42 kB │ gzip: 0.30 kB
90
93
  dist/direction-D7qoo_GJ.cjs  0.53 kB │ gzip: 0.34 kB
91
94
  dist/telem.cjs  0.58 kB │ gzip: 0.28 kB
95
+ dist/zodutil-DFJyyQd2.cjs  0.62 kB │ gzip: 0.42 kB
92
96
  dist/spatial.cjs  0.63 kB │ gzip: 0.33 kB
93
- dist/external-B3XSLDq5.cjs  0.68 kB │ gzip: 0.45 kB
94
- dist/zodutil-BRjUdYAv.cjs  0.72 kB │ gzip: 0.46 kB
97
+ dist/external-C-dNgNQw.cjs  0.79 kB │ gzip: 0.40 kB
98
+ dist/external-Cax-LfQW.cjs  0.82 kB │ gzip: 0.50 kB
95
99
  dist/worker.cjs  0.94 kB │ gzip: 0.49 kB
96
100
  dist/observe.cjs  1.00 kB │ gzip: 0.47 kB
97
101
  dist/url.cjs  1.10 kB │ gzip: 0.60 kB
98
102
  dist/dimensions-zMcb9pMk.cjs  1.17 kB │ gzip: 0.58 kB
99
- dist/index-YsO0EMN8.cjs  1.34 kB │ gzip: 0.72 kB
100
103
  dist/path-1tZLZ4AN.cjs  1.35 kB │ gzip: 0.66 kB
101
104
  dist/base-B48bPNx5.cjs  1.38 kB │ gzip: 0.57 kB
102
- dist/position-JCN6-sJC.cjs  1.71 kB │ gzip: 0.94 kB
103
- dist/index-h-QAL9T1.cjs  2.23 kB │ gzip: 1.02 kB
104
- dist/index-CYxQwEdX.cjs  2.30 kB │ gzip: 1.01 kB
105
+ dist/index-Dd8DLyMx.cjs  1.38 kB │ gzip: 0.71 kB
106
+ dist/position-CvSNZkSD.cjs  1.71 kB │ gzip: 0.94 kB
107
+ dist/index-BG3Scw3G.cjs  2.24 kB │ gzip: 1.04 kB
108
+ dist/index-CnclyYpG.cjs  2.30 kB │ gzip: 1.01 kB
105
109
  dist/deep.cjs  2.39 kB │ gzip: 1.08 kB
106
- dist/location-DLP2ZS0o.cjs  2.40 kB │ gzip: 1.05 kB
107
- dist/xy-LADI2wVU.cjs  2.75 kB │ gzip: 1.28 kB
108
- dist/scale-BI4wJF3b.cjs  4.37 kB │ gzip: 1.60 kB
109
- dist/box-BpSX4si6.cjs  4.75 kB │ gzip: 1.96 kB
110
+ dist/location-BIet4Mig.cjs  2.40 kB │ gzip: 1.05 kB
111
+ dist/xy-Budz-qz-.cjs  2.75 kB │ gzip: 1.28 kB
112
+ dist/scale-BTgf0Mr-.cjs  4.37 kB │ gzip: 1.59 kB
113
+ dist/box-BZ6d2d5A.cjs  4.75 kB │ gzip: 1.96 kB
110
114
  dist/bounds-8aFLdbEj.cjs  4.89 kB │ gzip: 1.80 kB
111
- dist/index.cjs  7.38 kB │ gzip: 2.91 kB
112
- dist/series-BN9CILsQ.cjs 36.01 kB │ gzip: 9.57 kB
113
- ✓ built in 5.16s
115
+ dist/index.cjs  7.44 kB │ gzip: 2.92 kB
116
+ dist/series-BMhEEJZL.cjs 36.54 kB │ gzip: 9.70 kB
117
+ ✓ built in 4.67s
package/dist/binary.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CYxQwEdX.cjs");exports.binary=e.encoder;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CnclyYpG.cjs");exports.binary=e.encoder;
package/dist/binary.js CHANGED
@@ -1,4 +1,4 @@
1
- import { e } from "./index-BBa2mWG1.js";
1
+ import { e } from "./index-OHIRoCei.js";
2
2
  export {
3
3
  e as binary
4
4
  };
@@ -0,0 +1 @@
1
+ "use strict";const y=require("zod"),z=require("./direction-D7qoo_GJ.cjs"),x=require("./location-BIet4Mig.cjs"),i=require("./xy-Budz-qz-.cjs"),p=require("./base-B48bPNx5.cjs"),O=y.z.union([y.z.number(),y.z.string()]),H=y.z.object({top:O,left:O,width:O,height:O}),S=y.z.object({left:y.z.number(),top:y.z.number(),right:y.z.number(),bottom:y.z.number()}),N=y.z.object({one:p.xy,two:p.xy,root:x.corner}),I={one:i.ZERO,two:i.ZERO,root:x.TOP_LEFT},D={one:i.ZERO,two:i.ONE,root:x.BOTTOM_LEFT},R=(t,o)=>({one:t.one,two:t.two,root:o??t.root}),c=(t,o,e=0,n=0,s)=>{const r={one:{...i.ZERO},two:{...i.ZERO},root:s??x.TOP_LEFT};if(typeof t=="number"){if(typeof o!="number")throw new Error("Box constructor called with invalid arguments");return r.one={x:t,y:o},r.two={x:r.one.x+e,y:r.one.y+n},r}return"one"in t&&"two"in t&&"root"in t?{...t,root:s??t.root}:("getBoundingClientRect"in t&&(t=t.getBoundingClientRect()),"left"in t?(r.one={x:t.left,y:t.top},r.two={x:t.right,y:t.bottom},r):(r.one=t,o==null?r.two={x:r.one.x+e,y:r.one.y+n}:typeof o=="number"?r.two={x:r.one.x+o,y:r.one.y+e}:"width"in o?r.two={x:r.one.x+o.width,y:r.one.y+o.height}:"signedWidth"in o?r.two={x:r.one.x+o.signedWidth,y:r.one.y+o.signedHeight}:r.two=o,r))},G=(t,o,e)=>{const n=c(t);if(typeof o=="string"){if(e==null)throw new Error("Invalid arguments for resize");const s=z.construct(o);return c(n.one,void 0,s==="x"?e:d(n),s==="y"?e:l(n),n.root)}return c(n.one,o,void 0,void 0,n.root)},X=(t,o,e=!0)=>{const n=c(t);let s=(r,u)=>r<u;return e&&(s=(r,u)=>r<=u),"one"in o?s(f(n),f(o))&&s(a(o),a(n))&&s(w(n),w(o))&&s(h(o),h(n)):s(f(n),o.x)&&s(o.x,a(n))&&s(w(n),o.y)&&s(o.y,h(n))},$=(t,o)=>i.equals(t.one,o.one)&&i.equals(t.two,o.two)&&x.xyEquals(t.root,o.root),q=t=>({width:d(t),height:l(t)}),U=t=>({signedWidth:b(t),signedHeight:T(t)}),Y=t=>({top:w(t),left:f(t),width:d(t),height:l(t)}),M=(t,o,e=!1)=>{const n=z.construct(o)==="y"?T(t):b(t);return e?n:Math.abs(n)},_=(t,o)=>{const e=c(t);return{x:o.x==="center"?E(e).x:g(e,o.x),y:o.y==="center"?E(e).y:g(e,o.y)}},g=(t,o)=>{const e=c(t),n=x.xyCouple(e.root).includes(o)?Math.min:Math.max;return p.X_LOCATIONS.includes(o)?n(e.one.x,e.two.x):n(e.one.y,e.two.y)},k=t=>t.one.x===t.two.x&&t.one.y===t.two.y,d=t=>M(t,"x"),l=t=>M(t,"y"),b=t=>{const o=c(t);return o.two.x-o.one.x},T=t=>{const o=c(t);return o.two.y-o.one.y},C=t=>_(t,x.TOP_LEFT),J=t=>_(t,x.TOP_RIGHT),K=t=>_(t,x.BOTTOM_LEFT),Q=t=>_(t,x.BOTTOM_RIGHT),a=t=>g(t,"right"),h=t=>g(t,"bottom"),f=t=>g(t,"left"),w=t=>g(t,"top"),E=t=>i.translate(C(t),{x:b(t)/2,y:T(t)/2}),B=t=>{const o=c(t);return o.root.x==="left"?f(o):a(o)},L=t=>{const o=c(t);return o.root.y==="top"?w(o):h(o)},V=t=>({x:B(t),y:L(t)}),P=t=>{const o=c(t);return{lower:o.one.x,upper:o.two.x}},Z=t=>{const o=c(t);return{lower:o.one.y,upper:o.two.y}},v=(t,o)=>R(t,o),tt=(t,o)=>{const e=c(t),n=p.X_LOCATIONS.includes(o)?"x":p.Y_LOCATIONS.includes(o)?"y":null;if(n===null)throw new Error(`Invalid location: ${x.location}`);const s=o==="top"||o==="left"?Math.min:Math.max,r={...e.one},u={...e.two};return r[n]=s(e.one[n],e.two[n]),u[n]=s(e.one[n],e.two[n]),[r,u]},ot=(t,o)=>{const e=c(t),n=c(o),s=B(n)+(d(n)-d(e))/2,r=L(n)+(l(n)-l(e))/2;return c({x:s,y:r},q(e))},j=t=>typeof t!="object"||t==null?!1:"one"in t&&"two"in t&&"root"in t,nt=t=>d(t)/l(t),et=(t,o,e)=>{if(typeof o=="string"){if(e==null)throw new Error("Undefined amount passed into box.translate");const s=z.construct(o);o=i.construct(s,e)}const n=c(t);return c(i.translate(n.one,o),i.translate(n.two,o),void 0,void 0,n.root)},A=(t,o)=>{const e=Math.max(f(t),f(o)),n=Math.max(w(t),w(o)),s=Math.min(a(t),a(o)),r=Math.min(h(t),h(o));return e>s||n>r?I:c({x:e,y:n},{x:s,y:r},void 0,void 0,t.root)},W=t=>d(t)*l(t),rt=(t,o)=>{const e=c(t);return c(i.truncate(e.one,o),i.truncate(e.two,o),void 0,void 0,e.root)},F=(t,o,e,n,s,r)=>{const u={x:t,y:o},m={x:t+e,y:o+n};return s.x!==r.x&&(s.x==="center"?(u.x-=e/2,m.x-=e/2):(u.x-=e,m.x-=e)),s.y!==r.y&&(s.y==="center"?(u.y-=n/2,m.y-=n/2):(u.y-=n,m.y-=n)),c(u,m,void 0,void 0,r)},st=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:D,ZERO:I,area:W,areaIsZero:k,aspect:nt,bottom:h,bottomLeft:K,bottomRight:Q,box:N,center:E,construct:c,constructWithAlternateRoot:F,contains:X,copy:R,css:Y,cssBox:H,dim:M,dims:q,domRect:S,edgePoints:tt,equals:$,height:l,intersection:A,isBox:j,left:f,loc:g,positionInCenter:ot,reRoot:v,resize:G,right:a,root:V,signedDims:U,signedHeight:T,signedWidth:b,top:w,topLeft:C,topRight:J,translate:et,truncate:rt,width:d,x:B,xBounds:P,xyLoc:_,y:L,yBounds:Z},Symbol.toStringTag,{value:"Module"}));exports.area=W;exports.box=st;exports.construct=c;exports.constructWithAlternateRoot=F;exports.height=l;exports.intersection=A;exports.isBox=j;exports.width=d;exports.xBounds=P;exports.xyLoc=_;exports.yBounds=Z;
@@ -0,0 +1,201 @@
1
+ import { z as x } from "zod";
2
+ import { c as M } from "./direction-CScbfCdT.js";
3
+ import { c as S, T as E, B as H, b as Z, d as q, e as N, f as D, l as F } from "./location-C5Ot4MVG.js";
4
+ import { Z as p, O as G, e as $, t as O, c as X, a as C } from "./xy-DxjPL2DZ.js";
5
+ import { x as j, X as P, Y } from "./base-DnZzEvvz.js";
6
+ const h = x.union([x.number(), x.string()]), U = x.object({
7
+ top: h,
8
+ left: h,
9
+ width: h,
10
+ height: h
11
+ }), k = x.object({
12
+ left: x.number(),
13
+ top: x.number(),
14
+ right: x.number(),
15
+ bottom: x.number()
16
+ }), J = x.object({
17
+ one: j,
18
+ two: j,
19
+ root: S
20
+ }), R = { one: p, two: p, root: E }, K = { one: p, two: G, root: H }, W = (t, o) => ({
21
+ one: t.one,
22
+ two: t.two,
23
+ root: o ?? t.root
24
+ }), c = (t, o, e = 0, n = 0, r) => {
25
+ const s = {
26
+ one: { ...p },
27
+ two: { ...p },
28
+ root: r ?? E
29
+ };
30
+ if (typeof t == "number") {
31
+ if (typeof o != "number")
32
+ throw new Error("Box constructor called with invalid arguments");
33
+ return s.one = { x: t, y: o }, s.two = { x: s.one.x + e, y: s.one.y + n }, s;
34
+ }
35
+ return "one" in t && "two" in t && "root" in t ? { ...t, root: r ?? t.root } : ("getBoundingClientRect" in t && (t = t.getBoundingClientRect()), "left" in t ? (s.one = { x: t.left, y: t.top }, s.two = { x: t.right, y: t.bottom }, s) : (s.one = t, o == null ? s.two = { x: s.one.x + e, y: s.one.y + n } : typeof o == "number" ? s.two = { x: s.one.x + o, y: s.one.y + e } : "width" in o ? s.two = {
36
+ x: s.one.x + o.width,
37
+ y: s.one.y + o.height
38
+ } : "signedWidth" in o ? s.two = {
39
+ x: s.one.x + o.signedWidth,
40
+ y: s.one.y + o.signedHeight
41
+ } : s.two = o, s));
42
+ }, Q = (t, o, e) => {
43
+ const n = c(t);
44
+ if (typeof o == "string") {
45
+ if (e == null) throw new Error("Invalid arguments for resize");
46
+ const r = M(o);
47
+ return c(
48
+ n.one,
49
+ void 0,
50
+ r === "x" ? e : a(n),
51
+ r === "y" ? e : f(n),
52
+ n.root
53
+ );
54
+ }
55
+ return c(n.one, o, void 0, void 0, n.root);
56
+ }, V = (t, o, e = !0) => {
57
+ const n = c(t);
58
+ let r = (s, i) => s < i;
59
+ return e && (r = (s, i) => s <= i), "one" in o ? r(y(n), y(o)) && r(d(o), d(n)) && r(u(n), u(o)) && r(l(o), l(n)) : r(y(n), o.x) && r(o.x, d(n)) && r(u(n), o.y) && r(o.y, l(n));
60
+ }, v = (t, o) => $(t.one, o.one) && $(t.two, o.two) && Z(t.root, o.root), z = (t) => ({
61
+ width: a(t),
62
+ height: f(t)
63
+ }), tt = (t) => ({
64
+ signedWidth: _(t),
65
+ signedHeight: b(t)
66
+ }), ot = (t) => ({
67
+ top: u(t),
68
+ left: y(t),
69
+ width: a(t),
70
+ height: f(t)
71
+ }), B = (t, o, e = !1) => {
72
+ const n = M(o) === "y" ? b(t) : _(t);
73
+ return e ? n : Math.abs(n);
74
+ }, g = (t, o) => {
75
+ const e = c(t);
76
+ return {
77
+ x: o.x === "center" ? T(e).x : w(e, o.x),
78
+ y: o.y === "center" ? T(e).y : w(e, o.y)
79
+ };
80
+ }, w = (t, o) => {
81
+ const e = c(t), n = q(e.root).includes(o) ? Math.min : Math.max;
82
+ return P.includes(o) ? n(e.one.x, e.two.x) : n(e.one.y, e.two.y);
83
+ }, nt = (t) => t.one.x === t.two.x && t.one.y === t.two.y, a = (t) => B(t, "x"), f = (t) => B(t, "y"), _ = (t) => {
84
+ const o = c(t);
85
+ return o.two.x - o.one.x;
86
+ }, b = (t) => {
87
+ const o = c(t);
88
+ return o.two.y - o.one.y;
89
+ }, A = (t) => g(t, E), et = (t) => g(t, N), st = (t) => g(t, H), rt = (t) => g(t, D), d = (t) => w(t, "right"), l = (t) => w(t, "bottom"), y = (t) => w(t, "left"), u = (t) => w(t, "top"), T = (t) => O(A(t), {
90
+ x: _(t) / 2,
91
+ y: b(t) / 2
92
+ }), I = (t) => {
93
+ const o = c(t);
94
+ return o.root.x === "left" ? y(o) : d(o);
95
+ }, L = (t) => {
96
+ const o = c(t);
97
+ return o.root.y === "top" ? u(o) : l(o);
98
+ }, ct = (t) => ({ x: I(t), y: L(t) }), it = (t) => {
99
+ const o = c(t);
100
+ return { lower: o.one.x, upper: o.two.x };
101
+ }, xt = (t) => {
102
+ const o = c(t);
103
+ return { lower: o.one.y, upper: o.two.y };
104
+ }, yt = (t, o) => W(t, o), ut = (t, o) => {
105
+ const e = c(t), n = P.includes(o) ? "x" : Y.includes(o) ? "y" : null;
106
+ if (n === null) throw new Error(`Invalid location: ${F}`);
107
+ const r = o === "top" || o === "left" ? Math.min : Math.max, s = { ...e.one }, i = { ...e.two };
108
+ return s[n] = r(e.one[n], e.two[n]), i[n] = r(e.one[n], e.two[n]), [s, i];
109
+ }, at = (t, o) => {
110
+ const e = c(t), n = c(o), r = I(n) + (a(n) - a(e)) / 2, s = L(n) + (f(n) - f(e)) / 2;
111
+ return c({ x: r, y: s }, z(e));
112
+ }, ft = (t) => typeof t != "object" || t == null ? !1 : "one" in t && "two" in t && "root" in t, dt = (t) => a(t) / f(t), lt = (t, o, e) => {
113
+ if (typeof o == "string") {
114
+ if (e == null) throw new Error("Undefined amount passed into box.translate");
115
+ const r = M(o);
116
+ o = X(r, e);
117
+ }
118
+ const n = c(t);
119
+ return c(
120
+ O(n.one, o),
121
+ O(n.two, o),
122
+ void 0,
123
+ void 0,
124
+ n.root
125
+ );
126
+ }, wt = (t, o) => {
127
+ const e = Math.max(y(t), y(o)), n = Math.max(u(t), u(o)), r = Math.min(d(t), d(o)), s = Math.min(l(t), l(o));
128
+ return e > r || n > s ? R : c({ x: e, y: n }, { x: r, y: s }, void 0, void 0, t.root);
129
+ }, mt = (t) => a(t) * f(t), pt = (t, o) => {
130
+ const e = c(t);
131
+ return c(
132
+ C(e.one, o),
133
+ C(e.two, o),
134
+ void 0,
135
+ void 0,
136
+ e.root
137
+ );
138
+ }, gt = (t, o, e, n, r, s) => {
139
+ const i = { x: t, y: o }, m = { x: t + e, y: o + n };
140
+ return r.x !== s.x && (r.x === "center" ? (i.x -= e / 2, m.x -= e / 2) : (i.x -= e, m.x -= e)), r.y !== s.y && (r.y === "center" ? (i.y -= n / 2, m.y -= n / 2) : (i.y -= n, m.y -= n)), c(i, m, void 0, void 0, s);
141
+ }, Mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
142
+ __proto__: null,
143
+ DECIMAL: K,
144
+ ZERO: R,
145
+ area: mt,
146
+ areaIsZero: nt,
147
+ aspect: dt,
148
+ bottom: l,
149
+ bottomLeft: st,
150
+ bottomRight: rt,
151
+ box: J,
152
+ center: T,
153
+ construct: c,
154
+ constructWithAlternateRoot: gt,
155
+ contains: V,
156
+ copy: W,
157
+ css: ot,
158
+ cssBox: U,
159
+ dim: B,
160
+ dims: z,
161
+ domRect: k,
162
+ edgePoints: ut,
163
+ equals: v,
164
+ height: f,
165
+ intersection: wt,
166
+ isBox: ft,
167
+ left: y,
168
+ loc: w,
169
+ positionInCenter: at,
170
+ reRoot: yt,
171
+ resize: Q,
172
+ right: d,
173
+ root: ct,
174
+ signedDims: tt,
175
+ signedHeight: b,
176
+ signedWidth: _,
177
+ top: u,
178
+ topLeft: A,
179
+ topRight: et,
180
+ translate: lt,
181
+ truncate: pt,
182
+ width: a,
183
+ x: I,
184
+ xBounds: it,
185
+ xyLoc: g,
186
+ y: L,
187
+ yBounds: xt
188
+ }, Symbol.toStringTag, { value: "Module" }));
189
+ export {
190
+ gt as a,
191
+ Mt as b,
192
+ c,
193
+ mt as d,
194
+ ft as e,
195
+ it as f,
196
+ f as h,
197
+ wt as i,
198
+ a as w,
199
+ g as x,
200
+ xt as y
201
+ };
package/dist/box.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./box-BpSX4si6.cjs");exports.box=e.box;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./box-BZ6d2d5A.cjs");exports.box=e.box;
package/dist/box.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b as r } from "./box-CYXc9-qp.js";
1
+ import { b as r } from "./box-Cto-5Uxu.js";
2
2
  export {
3
3
  r as box
4
4
  };
package/dist/caseconv.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-YsO0EMN8.cjs");exports.caseconv=e.caseconv;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-Dd8DLyMx.cjs");exports.caseconv=e.caseconv;
package/dist/caseconv.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as c } from "./index-eue4dSQX.js";
1
+ import { a as c } from "./index-BfDeGfej.js";
2
2
  export {
3
3
  c as caseconv
4
4
  };
package/dist/compare.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-h-QAL9T1.cjs");exports.compare=e.compare;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BG3Scw3G.cjs");exports.compare=e.compare;
package/dist/compare.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as a } from "./index-HQonyH7n.js";
1
+ import { c as a } from "./index-BVC_8Cg9.js";
2
2
  export {
3
3
  a as compare
4
4
  };
@@ -0,0 +1 @@
1
+ "use strict";var o=Object.defineProperty;var l=(s,e,t)=>e in s?o(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var r=(s,e,t)=>l(s,typeof e!="symbol"?e+"":e,t);const n=require("zod");class c{constructor(){r(this,"store",new Map)}async get(e){return this.store.get(e)??null}async set(e,t){this.store.set(e,t)}async delete(e){this.store.delete(e)}async length(){return this.store.size}async clear(){this.store.clear()}}class a{constructor(){r(this,"store",new Map)}get(e){return this.store.get(e)??null}set(e,t){this.store.set(e,t)}delete(e){this.store.delete(e)}}const i=n.z.object({key:n.z.string(),value:n.z.string()}),u=Object.freeze(Object.defineProperty({__proto__:null,MockAsync:c,MockSync:a,stringPairZ:i},Symbol.toStringTag,{value:"Module"}));exports.external=u;
@@ -0,0 +1 @@
1
+ "use strict";const r=require("zod"),t=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null?"node":typeof window>"u"||window.document===void 0?"webworker":"browser",i=t(),u=["MacOS","Windows","Linux","Docker"],d=["macos","windows","linux","docker"],c={macos:"MacOS",windows:"Windows",linux:"Linux",docker:"Docker"},l=r.z.enum(u).or(r.z.enum(d).transform(e=>c[e]));let n;const f=()=>{if(typeof window>"u")return;const e=window.navigator.userAgent.toLowerCase();if(e.includes("mac"))return"MacOS";if(e.includes("win"))return"Windows";if(e.includes("linux"))return"Linux"},w=(e={})=>{const{force:o,default:s}=e;return o??n??(n=f(),n??s)},a=Object.freeze(Object.defineProperty({__proto__:null,OPERATING_SYSTEMS:u,RUNTIME:i,detect:t,getOS:w,osZ:l},Symbol.toStringTag,{value:"Module"}));exports.external=a;
@@ -0,0 +1,47 @@
1
+ var o = Object.defineProperty;
2
+ var l = (s, e, t) => e in s ? o(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var r = (s, e, t) => l(s, typeof e != "symbol" ? e + "" : e, t);
4
+ import { z as n } from "zod";
5
+ class c {
6
+ constructor() {
7
+ r(this, "store", /* @__PURE__ */ new Map());
8
+ }
9
+ async get(e) {
10
+ return this.store.get(e) ?? null;
11
+ }
12
+ async set(e, t) {
13
+ this.store.set(e, t);
14
+ }
15
+ async delete(e) {
16
+ this.store.delete(e);
17
+ }
18
+ async length() {
19
+ return this.store.size;
20
+ }
21
+ async clear() {
22
+ this.store.clear();
23
+ }
24
+ }
25
+ class a {
26
+ constructor() {
27
+ r(this, "store", /* @__PURE__ */ new Map());
28
+ }
29
+ get(e) {
30
+ return this.store.get(e) ?? null;
31
+ }
32
+ set(e, t) {
33
+ this.store.set(e, t);
34
+ }
35
+ delete(e) {
36
+ this.store.delete(e);
37
+ }
38
+ }
39
+ const i = n.object({ key: n.string(), value: n.string() }), h = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
40
+ __proto__: null,
41
+ MockAsync: c,
42
+ MockSync: a,
43
+ stringPairZ: i
44
+ }, Symbol.toStringTag, { value: "Module" }));
45
+ export {
46
+ h as e
47
+ };
@@ -0,0 +1,30 @@
1
+ import { z as r } from "zod";
2
+ const t = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", s = t(), u = ["MacOS", "Windows", "Linux", "Docker"], d = ["macos", "windows", "linux", "docker"], c = {
3
+ macos: "MacOS",
4
+ windows: "Windows",
5
+ linux: "Linux",
6
+ docker: "Docker"
7
+ }, f = r.enum(u).or(
8
+ r.enum(d).transform((e) => c[e])
9
+ );
10
+ let n;
11
+ const l = () => {
12
+ if (typeof window > "u") return;
13
+ const e = window.navigator.userAgent.toLowerCase();
14
+ if (e.includes("mac")) return "MacOS";
15
+ if (e.includes("win")) return "Windows";
16
+ if (e.includes("linux")) return "Linux";
17
+ }, w = (e = {}) => {
18
+ const { force: o, default: i } = e;
19
+ return o ?? n ?? (n = l(), n ?? i);
20
+ }, S = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
21
+ __proto__: null,
22
+ OPERATING_SYSTEMS: u,
23
+ RUNTIME: s,
24
+ detect: t,
25
+ getOS: w,
26
+ osZ: f
27
+ }, Symbol.toStringTag, { value: "Module" }));
28
+ export {
29
+ S as e
30
+ };
@@ -0,0 +1 @@
1
+ "use strict";const m=require("./index-udOjA9d-.cjs"),l=e=>e!=null&&typeof e=="object"&&"toString"in e,T=e=>{if(l(e))return(e==null?void 0:e.toString().length)===0;switch(typeof e){case"string":return e.length===0;case"number":return e===0;case"bigint":return e===0n;case"boolean":return!e;case"undefined":return!0;case"object":return e===null}},g=(e,t=!1)=>{const o=l(e)?"stringer":typeof e;let r;switch(o){case"string":r=(n,s)=>n.localeCompare(s);break;case"stringer":r=(n,s)=>n.toString().localeCompare(s.toString());break;case"number":r=(n,s)=>Number(n)-Number(s);break;case"bigint":r=(n,s)=>BigInt(n)-BigInt(s)>0n?1:-1;break;case"boolean":r=(n,s)=>Number(n)-Number(s);break;case"undefined":r=()=>0;break;default:return console.warn(`sortFunc: unknown type ${o}`),()=>-1}return t?h(r):r},A=(e,t,o)=>{const r=g(t[e],o);return(n,s)=>r(n[e],s[e])},E=(e,t)=>e.length!==t.length?e.length-t.length:e.every((o,r)=>o===t[r])?0:-1,b=(e,t)=>{if(e.length!==t.length)return e.length-t.length;if(e.length===0)return 0;const o=g(e[0]),r=[...e].sort(o),n=[...t].sort(o);return r.every((s,i)=>s===n[i])?0:-1},q=(e,t)=>{const o=m.unique$1(e),r=m.unique$1(t);return b(o,r)},_=(e,t)=>e===t?0:e==="first"&&t==="last"?1:-1,h=e=>(t,o)=>e(o,t),c=0,N=-1,f=1,p=e=>e<c,d=e=>e>c,y=e=>e>=c,S=e=>e===c,w=(e,t)=>{const o=/([a-zA-Z]+)|(\d+)/g,r=e.replace(/[\s_.-]+/g,"").match(o),n=t.replace(/[\s_.-]+/g,"").match(o);if(!r||!n)return 0;for(let s=0;s<Math.min(r.length,n.length);s++){const i=r[s],a=n[s];if(isNaN(Number(i))&&isNaN(Number(a))){const u=i.localeCompare(a);if(u!==0)return u}else if(!isNaN(Number(i))&&!isNaN(Number(a))){const u=Number(i)-Number(a);if(u!==0)return u}else return isNaN(Number(i))?-1:1}return r.length-n.length},F=Object.freeze(Object.defineProperty({__proto__:null,EQUAL:c,GREATER_THAN:f,LESS_THAN:N,isEqualTo:S,isGreaterThan:d,isGreaterThanEqual:y,isLessThan:p,newF:g,newFieldF:A,order:_,primitiveArrays:E,reverseF:h,stringsWithNumbers:w,uniqueUnorderedPrimitiveArrays:q,unorderedPrimitiveArrays:b},Symbol.toStringTag,{value:"Module"}));exports.EQUAL=c;exports.GREATER_THAN=f;exports.LESS_THAN=N;exports.compare=F;exports.isEqualTo=S;exports.isGreaterThan=d;exports.isLessThan=p;exports.isStringer=l;exports.newF=g;exports.primitiveIsZero=T;
@@ -1,4 +1,4 @@
1
- import { unique as l } from "./unique.js";
1
+ import { a as l } from "./index-D4NCYiQB.js";
2
2
  const m = (e) => e != null && typeof e == "object" && "toString" in e, w = (e) => {
3
3
  if (m(e)) return (e == null ? void 0 : e.toString().length) === 0;
4
4
  switch (typeof e) {
@@ -0,0 +1,41 @@
1
+ const m = (e) => {
2
+ const r = e.replace(/_[a-z]/g, (n) => n[1].toUpperCase());
3
+ return r.length > 1 && r[0] === r[0].toUpperCase() && r[1] === r[1].toUpperCase() || r.length === 0 ? r : r[0].toLowerCase() + r.slice(1);
4
+ }, u = (e) => {
5
+ const r = (n, s = o) => {
6
+ if (typeof n == "string") return e(n);
7
+ if (Array.isArray(n)) return n.map((c) => r(c, s));
8
+ if (!l(n)) return n;
9
+ s = v(s);
10
+ const y = {}, f = n;
11
+ return Object.keys(f).forEach((c) => {
12
+ let t = f[c];
13
+ const g = e(c);
14
+ s.recursive && (l(t) ? A(t, s.keepTypesOnRecursion) || (t = r(t, s)) : s.recursiveInArray && p(t) && (t = [...t].map((a) => {
15
+ let i = a;
16
+ return l(a) ? A(i, s.keepTypesOnRecursion) || (i = r(a, s)) : p(a) && (i = r({ key: a }, s).key), i;
17
+ }))), y[g] = t;
18
+ }), y;
19
+ };
20
+ return r;
21
+ }, C = u(m), O = (e) => (
22
+ // Don't convert the first character and don't convert a character that is after a
23
+ // non-alphanumeric character
24
+ e.replace(/([a-z0-9])([A-Z])/g, (r, n, s) => `${n}_${s.toLowerCase()}`)
25
+ ), k = u(O), T = (e) => e.length === 0 ? e : e[0].toUpperCase() + e.slice(1), o = {
26
+ recursive: !0,
27
+ recursiveInArray: !0,
28
+ keepTypesOnRecursion: [Number, String, Uint8Array]
29
+ }, v = (e = o) => (e.recursive == null ? e = o : e.recursiveInArray ?? (e.recursiveInArray = !1), e), p = (e) => e != null && Array.isArray(e), l = (e) => e != null && typeof e == "object" && !Array.isArray(e), A = (e, r) => (r || []).some((n) => e instanceof n), S = (e) => e.replace(/\s+/g, "-").replace(/([a-z0-9])([A-Z])/g, (r, n, s) => `${n}-${s.toLowerCase()}`).toLowerCase(), _ = u(S), d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
30
+ __proto__: null,
31
+ camelToSnake: k,
32
+ capitalize: T,
33
+ snakeToCamel: C,
34
+ toKebab: _
35
+ }, Symbol.toStringTag, { value: "Module" }));
36
+ export {
37
+ d as a,
38
+ k as b,
39
+ T as c,
40
+ C as s
41
+ };
@@ -1,3 +1,3 @@
1
- "use strict";var y=Object.defineProperty;var O=(o,e,t)=>e in o?y(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var i=(o,e,t)=>O(o,typeof e!="symbol"?e+"":e,t);const f=require("./index-YsO0EMN8.cjs"),p=require("./identity.cjs");class S{constructor(){i(this,"contentType","application/json");i(this,"decoder");i(this,"encoder");this.decoder=new TextDecoder,this.encoder=new TextEncoder}encode(e){return this.encoder.encode(this.encodeString(e)).buffer}decode(e,t){return this.decodeString(this.decoder.decode(e),t)}decodeString(e,t){const r=JSON.parse(e),n=f.snakeToCamel(r);return t!=null?t.parse(n):n}encodeString(e){const t=f.camelToSnake(e);return JSON.stringify(t,(r,n)=>ArrayBuffer.isView(n)?Array.from(n):p.isObject(n)&&"encode_value"in n?typeof n.value=="bigint"?n.value.toString():n.value:typeof n=="bigint"?n.toString():n)}static registerCustomType(){}}class g{constructor(){i(this,"contentType","text/csv")}encode(e){const t=this.encodeString(e);return new TextEncoder().encode(t).buffer}decode(e,t){const r=new TextDecoder().decode(e);return this.decodeString(r,t)}encodeString(e){if(!Array.isArray(e)||e.length===0||!p.isObject(e[0]))throw new Error("Payload must be an array of objects");const t=Object.keys(e[0]),r=[t.join(",")];return e.forEach(n=>{const d=t.map(s=>JSON.stringify(n[s]??""));r.push(d.join(","))}),r.join(`
1
+ "use strict";var y=Object.defineProperty;var O=(o,e,t)=>e in o?y(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var i=(o,e,t)=>O(o,typeof e!="symbol"?e+"":e,t);const f=require("./index-Dd8DLyMx.cjs"),p=require("./identity.cjs");class S{constructor(){i(this,"contentType","application/json");i(this,"decoder");i(this,"encoder");this.decoder=new TextDecoder,this.encoder=new TextEncoder}encode(e){return this.encoder.encode(this.encodeString(e)).buffer}decode(e,t){return this.decodeString(this.decoder.decode(e),t)}decodeString(e,t){const r=JSON.parse(e),n=f.snakeToCamel(r);return t!=null?t.parse(n):n}encodeString(e){const t=f.camelToSnake(e);return JSON.stringify(t,(r,n)=>ArrayBuffer.isView(n)?Array.from(n):p.isObject(n)&&"encode_value"in n?typeof n.value=="bigint"?n.value.toString():n.value:typeof n=="bigint"?n.toString():n)}static registerCustomType(){}}class g{constructor(){i(this,"contentType","text/csv")}encode(e){const t=this.encodeString(e);return new TextEncoder().encode(t).buffer}decode(e,t){const r=new TextDecoder().decode(e);return this.decodeString(r,t)}encodeString(e){if(!Array.isArray(e)||e.length===0||!p.isObject(e[0]))throw new Error("Payload must be an array of objects");const t=Object.keys(e[0]),r=[t.join(",")];return e.forEach(n=>{const d=t.map(s=>JSON.stringify(n[s]??""));r.push(d.join(","))}),r.join(`
2
2
  `)}decodeString(e,t){const[r,...n]=e.trim().split(`
3
3
  `).map(c=>c.trim());if(r.length===0)return t!=null?t.parse({}):{};const d=r.split(",").map(c=>c.trim()),s={};return d.forEach(c=>{s[c]=[]}),n.forEach(c=>{const C=c.split(",").map(u=>u.trim());d.forEach((u,T)=>{const l=this.parseValue(C[T]);l!=null&&s[u].push(l)})}),t!=null?t.parse(s):s}parseValue(e){if(e==null||e.length===0)return null;const t=Number(e);return isNaN(t)?e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e:t}static registerCustomType(){}}class h{constructor(){i(this,"contentType","text/plain")}encode(e){return new TextEncoder().encode(e).buffer}decode(e,t){const r=new TextDecoder().decode(e);return t!=null?t.parse(r):r}}const a=new S,E=new g,b=new h,w=[a],m=Object.freeze(Object.defineProperty({__proto__:null,CSVCodec:g,CSV_CODEC:E,ENCODERS:w,JSONCodec:S,JSON_CODEC:a,TEXT_CODEC:b,TextCodec:h},Symbol.toStringTag,{value:"Module"}));exports.JSON_CODEC=a;exports.encoder=m;
@@ -0,0 +1,19 @@
1
+ const a = (t) => [...new Set(t)], s = (t, o, u = !0) => {
2
+ const e = /* @__PURE__ */ new Map();
3
+ return t.forEach((n) => {
4
+ const r = o(n);
5
+ if (e.has(r)) {
6
+ if (u) return;
7
+ e.delete(r);
8
+ }
9
+ e.set(r, n);
10
+ }), Array.from(e.values());
11
+ }, c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12
+ __proto__: null,
13
+ by: s,
14
+ unique: a
15
+ }, Symbol.toStringTag, { value: "Module" }));
16
+ export {
17
+ a,
18
+ c as u
19
+ };
@@ -0,0 +1 @@
1
+ "use strict";const T=e=>{const r=e.replace(/_[a-z]/g,n=>n[1].toUpperCase());return r.length>1&&r[0]===r[0].toUpperCase()&&r[1]===r[1].toUpperCase()||r.length===0?r:r[0].toLowerCase()+r.slice(1)},u=e=>{const r=(n,s=o)=>{if(typeof n=="string")return e(n);if(Array.isArray(n))return n.map(c=>r(c,s));if(!l(n))return n;s=v(s);const y={},f=n;return Object.keys(f).forEach(c=>{let t=f[c];const C=e(c);s.recursive&&(l(t)?m(t,s.keepTypesOnRecursion)||(t=r(t,s)):s.recursiveInArray&&p(t)&&(t=[...t].map(a=>{let i=a;return l(a)?m(i,s.keepTypesOnRecursion)||(i=r(a,s)):p(a)&&(i=r({key:a},s).key),i}))),y[C]=t}),y};return r},A=u(T),O=e=>e.replace(/([a-z0-9])([A-Z])/g,(r,n,s)=>`${n}_${s.toLowerCase()}`),g=u(O),k=e=>e.length===0?e:e[0].toUpperCase()+e.slice(1),o={recursive:!0,recursiveInArray:!0,keepTypesOnRecursion:[Number,String,Uint8Array]},v=(e=o)=>(e.recursive==null?e=o:e.recursiveInArray??(e.recursiveInArray=!1),e),p=e=>e!=null&&Array.isArray(e),l=e=>e!=null&&typeof e=="object"&&!Array.isArray(e),m=(e,r)=>(r||[]).some(n=>e instanceof n),S=e=>e.replace(/\s+/g,"-").replace(/([a-z0-9])([A-Z])/g,(r,n,s)=>`${n}-${s.toLowerCase()}`).toLowerCase(),_=u(S),z=Object.freeze(Object.defineProperty({__proto__:null,camelToSnake:g,capitalize:k,snakeToCamel:A,toKebab:_},Symbol.toStringTag,{value:"Module"}));exports.camelToSnake=g;exports.capitalize=k;exports.caseconv=z;exports.snakeToCamel=A;
@@ -1,7 +1,7 @@
1
1
  var m = Object.defineProperty;
2
2
  var C = (o, e, t) => e in o ? m(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
3
  var i = (o, e, t) => C(o, typeof e != "symbol" ? e + "" : e, t);
4
- import { s as y, b } from "./index-eue4dSQX.js";
4
+ import { s as y, b } from "./index-BfDeGfej.js";
5
5
  import { isObject as l } from "./identity.js";
6
6
  class f {
7
7
  constructor() {
@@ -0,0 +1 @@
1
+ "use strict";const r=t=>[...new Set(t)],c=(t,o,s=!0)=>{const e=new Map;return t.forEach(u=>{const n=o(u);if(e.has(n)){if(s)return;e.delete(n)}e.set(n,u)}),Array.from(e.values())},i=Object.freeze(Object.defineProperty({__proto__:null,by:c,unique:r},Symbol.toStringTag,{value:"Module"}));exports.unique=i;exports.unique$1=r;