@stackframe/stack-shared 2.8.7 → 2.8.10

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 (476) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/config/format.d.cts +39 -0
  3. package/dist/config/format.d.ts +14 -13
  4. package/dist/config/format.js +147 -206
  5. package/dist/config/format.js.map +1 -0
  6. package/dist/config/schema.d.cts +724 -0
  7. package/dist/config/schema.d.ts +51 -48
  8. package/dist/config/schema.js +230 -172
  9. package/dist/config/schema.js.map +1 -0
  10. package/dist/crud.d.cts +102 -0
  11. package/dist/crud.d.ts +15 -13
  12. package/dist/crud.js +83 -128
  13. package/dist/crud.js.map +1 -0
  14. package/dist/esm/config/format.js +135 -0
  15. package/dist/esm/config/format.js.map +1 -0
  16. package/dist/esm/config/schema.js +199 -0
  17. package/dist/esm/config/schema.js.map +1 -0
  18. package/dist/esm/crud.js +60 -0
  19. package/dist/esm/crud.js.map +1 -0
  20. package/dist/esm/global.d.js +1 -0
  21. package/dist/esm/global.d.js.map +1 -0
  22. package/dist/esm/helpers/password.js +17 -0
  23. package/dist/esm/helpers/password.js.map +1 -0
  24. package/dist/esm/helpers/production-mode.js +50 -0
  25. package/dist/esm/helpers/production-mode.js.map +1 -0
  26. package/dist/esm/hooks/use-async-callback.js +38 -0
  27. package/dist/esm/hooks/use-async-callback.js.map +1 -0
  28. package/dist/esm/hooks/use-async-external-store.js +23 -0
  29. package/dist/esm/hooks/use-async-external-store.js.map +1 -0
  30. package/dist/esm/hooks/use-hash.js +17 -0
  31. package/dist/esm/hooks/use-hash.js.map +1 -0
  32. package/dist/esm/hooks/use-strict-memo.js +61 -0
  33. package/dist/esm/hooks/use-strict-memo.js.map +1 -0
  34. package/dist/esm/index.js +22 -0
  35. package/dist/esm/index.js.map +1 -0
  36. package/dist/esm/interface/adminInterface.js +244 -0
  37. package/dist/esm/interface/adminInterface.js.map +1 -0
  38. package/dist/esm/interface/clientInterface.js +2041 -0
  39. package/dist/esm/interface/clientInterface.js.map +1 -0
  40. package/dist/esm/interface/crud/contact-channels.js +77 -0
  41. package/dist/esm/interface/crud/contact-channels.js.map +1 -0
  42. package/dist/esm/interface/crud/current-user.js +65 -0
  43. package/dist/esm/interface/crud/current-user.js.map +1 -0
  44. package/dist/esm/interface/crud/email-templates.js +52 -0
  45. package/dist/esm/interface/crud/email-templates.js.map +1 -0
  46. package/dist/esm/interface/crud/emails.js +20 -0
  47. package/dist/esm/interface/crud/emails.js.map +1 -0
  48. package/dist/esm/interface/crud/internal-api-keys.js +69 -0
  49. package/dist/esm/interface/crud/internal-api-keys.js.map +1 -0
  50. package/dist/esm/interface/crud/oauth.js +24 -0
  51. package/dist/esm/interface/crud/oauth.js.map +1 -0
  52. package/dist/esm/interface/crud/project-api-keys.js +93 -0
  53. package/dist/esm/interface/crud/project-api-keys.js.map +1 -0
  54. package/dist/esm/interface/crud/project-permissions.js +113 -0
  55. package/dist/esm/interface/crud/project-permissions.js.map +1 -0
  56. package/dist/esm/interface/crud/projects.js +188 -0
  57. package/dist/esm/interface/crud/projects.js.map +1 -0
  58. package/dist/esm/interface/crud/sessions.js +62 -0
  59. package/dist/esm/interface/crud/sessions.js.map +1 -0
  60. package/dist/esm/interface/crud/svix-token.js +22 -0
  61. package/dist/esm/interface/crud/svix-token.js.map +1 -0
  62. package/dist/esm/interface/crud/team-invitation-details.js +23 -0
  63. package/dist/esm/interface/crud/team-invitation-details.js.map +1 -0
  64. package/dist/esm/interface/crud/team-invitation.js +36 -0
  65. package/dist/esm/interface/crud/team-invitation.js.map +1 -0
  66. package/dist/esm/interface/crud/team-member-profiles.js +62 -0
  67. package/dist/esm/interface/crud/team-member-profiles.js.map +1 -0
  68. package/dist/esm/interface/crud/team-memberships.js +60 -0
  69. package/dist/esm/interface/crud/team-memberships.js.map +1 -0
  70. package/dist/esm/interface/crud/team-permissions.js +114 -0
  71. package/dist/esm/interface/crud/team-permissions.js.map +1 -0
  72. package/dist/esm/interface/crud/teams.js +143 -0
  73. package/dist/esm/interface/crud/teams.js.map +1 -0
  74. package/dist/esm/interface/crud/users.js +139 -0
  75. package/dist/esm/interface/crud/users.js.map +1 -0
  76. package/dist/esm/interface/serverInterface.js +485 -0
  77. package/dist/esm/interface/serverInterface.js.map +1 -0
  78. package/dist/esm/interface/webhooks.js +21 -0
  79. package/dist/esm/interface/webhooks.js.map +1 -0
  80. package/dist/esm/known-errors.js +1223 -0
  81. package/dist/esm/known-errors.js.map +1 -0
  82. package/dist/esm/schema-fields.js +484 -0
  83. package/dist/esm/schema-fields.js.map +1 -0
  84. package/dist/esm/sessions.js +168 -0
  85. package/dist/esm/sessions.js.map +1 -0
  86. package/dist/esm/utils/api-keys.js +79 -0
  87. package/dist/esm/utils/api-keys.js.map +1 -0
  88. package/dist/esm/utils/arrays.js +78 -0
  89. package/dist/esm/utils/arrays.js.map +1 -0
  90. package/dist/esm/utils/base64.js +18 -0
  91. package/dist/esm/utils/base64.js.map +1 -0
  92. package/dist/esm/utils/booleans.js +12 -0
  93. package/dist/esm/utils/booleans.js.map +1 -0
  94. package/dist/esm/utils/browser-compat.js +21 -0
  95. package/dist/esm/utils/browser-compat.js.map +1 -0
  96. package/dist/esm/utils/bytes.js +160 -0
  97. package/dist/esm/utils/bytes.js.map +1 -0
  98. package/dist/esm/utils/caches.js +167 -0
  99. package/dist/esm/utils/caches.js.map +1 -0
  100. package/dist/esm/utils/compile-time.js +11 -0
  101. package/dist/esm/utils/compile-time.js.map +1 -0
  102. package/dist/esm/utils/crypto.js +25 -0
  103. package/dist/esm/utils/crypto.js.map +1 -0
  104. package/dist/esm/utils/dates.js +64 -0
  105. package/dist/esm/utils/dates.js.map +1 -0
  106. package/dist/esm/utils/dom.js +11 -0
  107. package/dist/esm/utils/dom.js.map +1 -0
  108. package/dist/esm/utils/env.js +58 -0
  109. package/dist/esm/utils/env.js.map +1 -0
  110. package/dist/esm/utils/errors.js +174 -0
  111. package/dist/esm/utils/errors.js.map +1 -0
  112. package/dist/esm/utils/fs.js +37 -0
  113. package/dist/esm/utils/fs.js.map +1 -0
  114. package/dist/esm/utils/functions.js +12 -0
  115. package/dist/esm/utils/functions.js.map +1 -0
  116. package/dist/esm/utils/geo.js +15 -0
  117. package/dist/esm/utils/geo.js.map +1 -0
  118. package/dist/esm/utils/globals.js +18 -0
  119. package/dist/esm/utils/globals.js.map +1 -0
  120. package/dist/esm/utils/hashes.js +55 -0
  121. package/dist/esm/utils/hashes.js.map +1 -0
  122. package/dist/esm/utils/html.js +13 -0
  123. package/dist/esm/utils/html.js.map +1 -0
  124. package/dist/esm/utils/http.js +60 -0
  125. package/dist/esm/utils/http.js.map +1 -0
  126. package/dist/esm/utils/ips.js +15 -0
  127. package/dist/esm/utils/ips.js.map +1 -0
  128. package/dist/esm/utils/json.js +31 -0
  129. package/dist/esm/utils/json.js.map +1 -0
  130. package/dist/esm/utils/jwt.js +87 -0
  131. package/dist/esm/utils/jwt.js.map +1 -0
  132. package/dist/esm/utils/locks.js +57 -0
  133. package/dist/esm/utils/locks.js.map +1 -0
  134. package/dist/esm/utils/maps.js +181 -0
  135. package/dist/esm/utils/maps.js.map +1 -0
  136. package/dist/esm/utils/math.js +8 -0
  137. package/dist/esm/utils/math.js.map +1 -0
  138. package/dist/esm/utils/node-http.js +42 -0
  139. package/dist/esm/utils/node-http.js.map +1 -0
  140. package/dist/esm/utils/numbers.js +32 -0
  141. package/dist/esm/utils/numbers.js.map +1 -0
  142. package/dist/esm/utils/oauth.js +10 -0
  143. package/dist/esm/utils/oauth.js.map +1 -0
  144. package/dist/esm/utils/objects.js +153 -0
  145. package/dist/esm/utils/objects.js.map +1 -0
  146. package/dist/esm/utils/passkey.js +1 -0
  147. package/dist/esm/utils/passkey.js.map +1 -0
  148. package/dist/esm/utils/promises.js +233 -0
  149. package/dist/esm/utils/promises.js.map +1 -0
  150. package/dist/esm/utils/proxies.js +128 -0
  151. package/dist/esm/utils/proxies.js.map +1 -0
  152. package/dist/esm/utils/react.js +78 -0
  153. package/dist/esm/utils/react.js.map +1 -0
  154. package/dist/esm/utils/results.js +141 -0
  155. package/dist/esm/utils/results.js.map +1 -0
  156. package/dist/esm/utils/sentry.js +20 -0
  157. package/dist/esm/utils/sentry.js.map +1 -0
  158. package/dist/esm/utils/stores.js +195 -0
  159. package/dist/esm/utils/stores.js.map +1 -0
  160. package/dist/esm/utils/strings.js +294 -0
  161. package/dist/esm/utils/strings.js.map +1 -0
  162. package/dist/esm/utils/strings.nicify.test.js +222 -0
  163. package/dist/esm/utils/strings.nicify.test.js.map +1 -0
  164. package/dist/esm/utils/types.js +1 -0
  165. package/dist/esm/utils/types.js.map +1 -0
  166. package/dist/esm/utils/unicode.js +11 -0
  167. package/dist/esm/utils/unicode.js.map +1 -0
  168. package/dist/esm/utils/urls.js +53 -0
  169. package/dist/esm/utils/urls.js.map +1 -0
  170. package/dist/esm/utils/uuids.js +16 -0
  171. package/dist/esm/utils/uuids.js.map +1 -0
  172. package/dist/global.d.d.cts +1 -0
  173. package/dist/global.d.d.ts +1 -0
  174. package/dist/global.d.js +2 -0
  175. package/dist/global.d.js.map +1 -0
  176. package/dist/helpers/password.d.cts +11 -0
  177. package/dist/helpers/password.d.ts +11 -2
  178. package/dist/helpers/password.js +41 -11
  179. package/dist/helpers/password.js.map +1 -0
  180. package/dist/helpers/production-mode.d.cts +12 -0
  181. package/dist/helpers/production-mode.d.ts +9 -3
  182. package/dist/helpers/production-mode.js +72 -45
  183. package/dist/helpers/production-mode.js.map +1 -0
  184. package/dist/hooks/use-async-callback.d.cts +6 -0
  185. package/dist/hooks/use-async-callback.d.ts +6 -3
  186. package/dist/hooks/use-async-callback.js +72 -30
  187. package/dist/hooks/use-async-callback.js.map +1 -0
  188. package/dist/hooks/use-async-external-store.d.cts +7 -0
  189. package/dist/hooks/use-async-external-store.d.ts +5 -2
  190. package/dist/hooks/use-async-external-store.js +47 -19
  191. package/dist/hooks/use-async-external-store.js.map +1 -0
  192. package/dist/hooks/use-hash.d.cts +3 -0
  193. package/dist/hooks/use-hash.d.ts +3 -1
  194. package/dist/hooks/use-hash.js +41 -8
  195. package/dist/hooks/use-hash.js.map +1 -0
  196. package/dist/hooks/use-strict-memo.d.cts +8 -0
  197. package/dist/hooks/use-strict-memo.d.ts +3 -1
  198. package/dist/hooks/use-strict-memo.js +78 -131
  199. package/dist/hooks/use-strict-memo.js.map +1 -0
  200. package/dist/index.d.cts +30 -0
  201. package/dist/index.d.ts +30 -4
  202. package/dist/index.js +42 -4
  203. package/dist/index.js.map +1 -0
  204. package/dist/interface/adminInterface.d.cts +94 -0
  205. package/dist/interface/adminInterface.d.ts +38 -15
  206. package/dist/interface/adminInterface.js +269 -174
  207. package/dist/interface/adminInterface.js.map +1 -0
  208. package/dist/interface/clientInterface.d.cts +260 -0
  209. package/dist/interface/clientInterface.d.ts +25 -18
  210. package/dist/interface/clientInterface.js +2054 -995
  211. package/dist/interface/clientInterface.js.map +1 -0
  212. package/dist/interface/crud/contact-channels.d.cts +180 -0
  213. package/dist/interface/crud/contact-channels.d.ts +30 -25
  214. package/dist/interface/crud/contact-channels.js +101 -59
  215. package/dist/interface/crud/contact-channels.js.map +1 -0
  216. package/dist/interface/crud/current-user.d.cts +205 -0
  217. package/dist/interface/crud/current-user.d.ts +17 -12
  218. package/dist/interface/crud/current-user.js +86 -56
  219. package/dist/interface/crud/current-user.js.map +1 -0
  220. package/dist/interface/crud/email-templates.d.cts +84 -0
  221. package/dist/interface/crud/email-templates.d.ts +24 -19
  222. package/dist/interface/crud/email-templates.js +77 -37
  223. package/dist/interface/crud/email-templates.js.map +1 -0
  224. package/dist/interface/crud/emails.d.cts +69 -0
  225. package/dist/interface/crud/emails.d.ts +12 -7
  226. package/dist/interface/crud/emails.js +54 -12
  227. package/dist/interface/crud/emails.js.map +1 -0
  228. package/dist/interface/crud/internal-api-keys.d.cts +139 -0
  229. package/dist/interface/crud/internal-api-keys.d.ts +22 -17
  230. package/dist/interface/crud/internal-api-keys.js +92 -54
  231. package/dist/interface/crud/internal-api-keys.js.map +1 -0
  232. package/dist/interface/crud/oauth.d.cts +34 -0
  233. package/dist/interface/crud/oauth.d.ts +16 -11
  234. package/dist/interface/crud/oauth.js +48 -14
  235. package/dist/interface/crud/oauth.js.map +1 -0
  236. package/dist/interface/crud/project-api-keys.d.cts +196 -0
  237. package/dist/interface/crud/project-api-keys.d.ts +18 -10
  238. package/dist/interface/crud/project-api-keys.js +121 -74
  239. package/dist/interface/crud/project-api-keys.js.map +1 -0
  240. package/dist/interface/crud/project-permissions.d.cts +160 -0
  241. package/dist/interface/crud/project-permissions.d.ts +38 -33
  242. package/dist/interface/crud/project-permissions.js +148 -90
  243. package/dist/interface/crud/project-permissions.js.map +1 -0
  244. package/dist/interface/crud/projects.d.cts +640 -0
  245. package/dist/interface/crud/projects.d.ts +36 -31
  246. package/dist/interface/crud/projects.js +218 -156
  247. package/dist/interface/crud/projects.js.map +1 -0
  248. package/dist/interface/crud/sessions.d.cts +149 -0
  249. package/dist/interface/crud/sessions.d.ts +21 -16
  250. package/dist/interface/crud/sessions.js +86 -50
  251. package/dist/interface/crud/sessions.js.map +1 -0
  252. package/dist/interface/crud/svix-token.d.cts +26 -0
  253. package/dist/interface/crud/svix-token.d.ts +14 -9
  254. package/dist/interface/crud/svix-token.js +46 -12
  255. package/dist/interface/crud/svix-token.js.map +1 -0
  256. package/dist/interface/crud/team-invitation-details.d.cts +30 -0
  257. package/dist/interface/crud/team-invitation-details.d.ts +12 -7
  258. package/dist/interface/crud/team-invitation-details.js +57 -15
  259. package/dist/interface/crud/team-invitation-details.js.map +1 -0
  260. package/dist/interface/crud/team-invitation.d.cts +49 -0
  261. package/dist/interface/crud/team-invitation.d.ts +13 -8
  262. package/dist/interface/crud/team-invitation.js +69 -27
  263. package/dist/interface/crud/team-invitation.js.map +1 -0
  264. package/dist/interface/crud/team-member-profiles.d.cts +229 -0
  265. package/dist/interface/crud/team-member-profiles.d.ts +20 -15
  266. package/dist/interface/crud/team-member-profiles.js +95 -49
  267. package/dist/interface/crud/team-member-profiles.js.map +1 -0
  268. package/dist/interface/crud/team-memberships.d.cts +74 -0
  269. package/dist/interface/crud/team-memberships.d.ts +22 -17
  270. package/dist/interface/crud/team-memberships.js +85 -45
  271. package/dist/interface/crud/team-memberships.js.map +1 -0
  272. package/dist/interface/crud/team-permissions.d.cts +168 -0
  273. package/dist/interface/crud/team-permissions.d.ts +38 -33
  274. package/dist/interface/crud/team-permissions.js +149 -91
  275. package/dist/interface/crud/team-permissions.js.map +1 -0
  276. package/dist/interface/crud/teams.d.cts +298 -0
  277. package/dist/interface/crud/teams.d.ts +45 -40
  278. package/dist/interface/crud/teams.js +177 -119
  279. package/dist/interface/crud/teams.js.map +1 -0
  280. package/dist/interface/crud/users.d.cts +469 -0
  281. package/dist/interface/crud/users.d.ts +31 -26
  282. package/dist/interface/crud/users.js +172 -118
  283. package/dist/interface/crud/users.js.map +1 -0
  284. package/dist/interface/serverInterface.d.cts +128 -0
  285. package/dist/interface/serverInterface.d.ts +29 -17
  286. package/dist/interface/serverInterface.js +506 -339
  287. package/dist/interface/serverInterface.js.map +1 -0
  288. package/dist/interface/webhooks.d.cts +292 -0
  289. package/dist/interface/webhooks.d.ts +6 -3
  290. package/dist/interface/webhooks.js +45 -15
  291. package/dist/interface/webhooks.js.map +1 -0
  292. package/dist/known-errors.d.cts +444 -0
  293. package/dist/known-errors.d.ts +12 -9
  294. package/dist/known-errors.js +1088 -561
  295. package/dist/known-errors.js.map +1 -0
  296. package/dist/schema-fields.d.cts +163 -0
  297. package/dist/schema-fields.d.ts +116 -114
  298. package/dist/schema-fields.js +593 -427
  299. package/dist/schema-fields.js.map +1 -0
  300. package/dist/sessions.d.cts +109 -0
  301. package/dist/sessions.d.ts +6 -3
  302. package/dist/sessions.js +201 -172
  303. package/dist/sessions.js.map +1 -0
  304. package/dist/utils/api-keys.d.cts +24 -0
  305. package/dist/utils/api-keys.d.ts +5 -4
  306. package/dist/utils/api-keys.js +106 -66
  307. package/dist/utils/api-keys.js.map +1 -0
  308. package/dist/utils/arrays.d.cts +18 -0
  309. package/dist/utils/arrays.d.ts +15 -13
  310. package/dist/utils/arrays.js +101 -168
  311. package/dist/utils/arrays.js.map +1 -0
  312. package/dist/utils/base64.d.cts +4 -0
  313. package/dist/utils/base64.d.ts +4 -2
  314. package/dist/utils/base64.js +41 -20
  315. package/dist/utils/base64.js.map +1 -0
  316. package/dist/utils/booleans.d.cts +6 -0
  317. package/dist/utils/booleans.d.ts +6 -4
  318. package/dist/utils/booleans.js +35 -27
  319. package/dist/utils/booleans.js.map +1 -0
  320. package/dist/utils/browser-compat.d.cts +8 -0
  321. package/dist/utils/browser-compat.d.ts +3 -1
  322. package/dist/utils/browser-compat.js +45 -16
  323. package/dist/utils/browser-compat.js.map +1 -0
  324. package/dist/utils/bytes.d.cts +15 -0
  325. package/dist/utils/bytes.d.ts +15 -13
  326. package/dist/utils/bytes.js +182 -270
  327. package/dist/utils/bytes.js.map +1 -0
  328. package/dist/utils/caches.d.cts +98 -0
  329. package/dist/utils/caches.d.ts +17 -14
  330. package/dist/utils/caches.js +188 -193
  331. package/dist/utils/caches.js.map +1 -0
  332. package/dist/utils/compile-time.d.cts +8 -0
  333. package/dist/utils/compile-time.d.ts +3 -1
  334. package/dist/utils/compile-time.js +35 -10
  335. package/dist/utils/compile-time.js.map +1 -0
  336. package/dist/utils/crypto.d.cts +8 -0
  337. package/dist/utils/crypto.d.ts +4 -2
  338. package/dist/utils/crypto.js +49 -21
  339. package/dist/utils/crypto.js.map +1 -0
  340. package/dist/utils/dates.d.cts +15 -0
  341. package/dist/utils/dates.d.ts +6 -4
  342. package/dist/utils/dates.js +83 -105
  343. package/dist/utils/dates.js.map +1 -0
  344. package/dist/utils/dom.d.cts +3 -0
  345. package/dist/utils/dom.d.ts +3 -1
  346. package/dist/utils/dom.js +35 -7
  347. package/dist/utils/dom.js.map +1 -0
  348. package/dist/utils/env.d.cts +9 -0
  349. package/dist/utils/env.d.ts +6 -4
  350. package/dist/utils/env.js +70 -43
  351. package/dist/utils/env.js.map +1 -0
  352. package/dist/utils/errors.d.cts +223 -0
  353. package/dist/utils/errors.d.ts +14 -11
  354. package/dist/utils/errors.js +148 -126
  355. package/dist/utils/errors.js.map +1 -0
  356. package/dist/utils/fs.d.cts +7 -0
  357. package/dist/utils/fs.d.ts +5 -3
  358. package/dist/utils/fs.js +70 -27
  359. package/dist/utils/fs.js.map +1 -0
  360. package/dist/utils/functions.d.cts +4 -0
  361. package/dist/utils/functions.d.ts +4 -2
  362. package/dist/utils/functions.js +35 -18
  363. package/dist/utils/functions.js.map +1 -0
  364. package/dist/utils/geo.d.cts +22 -0
  365. package/dist/utils/geo.d.ts +6 -3
  366. package/dist/utils/geo.js +39 -9
  367. package/dist/utils/geo.js.map +1 -0
  368. package/dist/utils/globals.d.cts +5 -0
  369. package/dist/utils/globals.d.ts +4 -2
  370. package/dist/utils/globals.js +41 -14
  371. package/dist/utils/globals.js.map +1 -0
  372. package/dist/utils/hashes.d.cts +7 -0
  373. package/dist/utils/hashes.d.ts +7 -5
  374. package/dist/utils/hashes.js +87 -41
  375. package/dist/utils/hashes.js.map +1 -0
  376. package/dist/utils/html.d.cts +4 -0
  377. package/dist/utils/html.d.ts +4 -2
  378. package/dist/utils/html.js +36 -37
  379. package/dist/utils/html.js.map +1 -0
  380. package/dist/utils/http.d.cts +43 -0
  381. package/dist/utils/http.d.ts +6 -4
  382. package/dist/utils/http.js +83 -83
  383. package/dist/utils/http.js.map +1 -0
  384. package/dist/utils/ips.d.cts +6 -0
  385. package/dist/utils/ips.d.ts +6 -4
  386. package/dist/utils/ips.js +48 -35
  387. package/dist/utils/ips.js.map +1 -0
  388. package/dist/utils/json.d.cts +13 -0
  389. package/dist/utils/json.d.ts +9 -6
  390. package/dist/utils/json.js +54 -157
  391. package/dist/utils/json.js.map +1 -0
  392. package/dist/utils/jwt.d.cts +44 -0
  393. package/dist/utils/jwt.d.ts +14 -11
  394. package/dist/utils/jwt.js +119 -84
  395. package/dist/utils/jwt.js.map +1 -0
  396. package/dist/utils/locks.d.cts +15 -0
  397. package/dist/utils/locks.d.ts +3 -2
  398. package/dist/utils/locks.js +76 -56
  399. package/dist/utils/locks.js.map +1 -0
  400. package/dist/utils/maps.d.cts +59 -0
  401. package/dist/utils/maps.d.ts +6 -4
  402. package/dist/utils/maps.js +207 -343
  403. package/dist/utils/maps.js.map +1 -0
  404. package/dist/utils/math.d.cts +6 -0
  405. package/dist/utils/math.d.ts +3 -1
  406. package/dist/utils/math.js +31 -16
  407. package/dist/utils/math.js.map +1 -0
  408. package/dist/utils/node-http.d.cts +15 -0
  409. package/dist/utils/node-http.d.ts +5 -5
  410. package/dist/utils/node-http.js +65 -36
  411. package/dist/utils/node-http.js.map +1 -0
  412. package/dist/utils/numbers.d.cts +5 -0
  413. package/dist/utils/numbers.d.ts +5 -3
  414. package/dist/utils/numbers.js +53 -66
  415. package/dist/utils/numbers.js.map +1 -0
  416. package/dist/utils/oauth.d.cts +8 -0
  417. package/dist/utils/oauth.d.ts +8 -6
  418. package/dist/utils/oauth.js +37 -4
  419. package/dist/utils/oauth.js.map +1 -0
  420. package/dist/utils/objects.d.cts +65 -0
  421. package/dist/utils/objects.d.ts +31 -30
  422. package/dist/utils/objects.js +196 -374
  423. package/dist/utils/objects.js.map +1 -0
  424. package/dist/utils/passkey.d.cts +1 -0
  425. package/dist/utils/passkey.d.ts +1 -1
  426. package/dist/utils/passkey.js +19 -1
  427. package/dist/utils/passkey.js.map +1 -0
  428. package/dist/utils/promises.d.cts +74 -0
  429. package/dist/utils/promises.d.ts +20 -18
  430. package/dist/utils/promises.js +252 -393
  431. package/dist/utils/promises.js.map +1 -0
  432. package/dist/utils/proxies.d.cts +4 -0
  433. package/dist/utils/proxies.d.ts +4 -2
  434. package/dist/utils/proxies.js +150 -161
  435. package/dist/utils/proxies.js.map +1 -0
  436. package/dist/utils/react.d.cts +25 -0
  437. package/dist/utils/react.d.ts +9 -6
  438. package/dist/utils/react.js +88 -134
  439. package/dist/utils/react.js.map +1 -0
  440. package/dist/utils/results.d.cts +78 -0
  441. package/dist/utils/results.d.ts +10 -9
  442. package/dist/utils/results.js +143 -324
  443. package/dist/utils/results.js.map +1 -0
  444. package/dist/utils/sentry.d.cts +5 -0
  445. package/dist/utils/sentry.d.ts +5 -2
  446. package/dist/utils/sentry.js +44 -14
  447. package/dist/utils/sentry.js.map +1 -0
  448. package/dist/utils/stores.d.cts +102 -0
  449. package/dist/utils/stores.d.ts +12 -9
  450. package/dist/utils/stores.js +219 -189
  451. package/dist/utils/stores.js.map +1 -0
  452. package/dist/utils/strings.d.cts +72 -0
  453. package/dist/utils/strings.d.ts +22 -20
  454. package/dist/utils/strings.js +299 -580
  455. package/dist/utils/strings.js.map +1 -0
  456. package/dist/utils/strings.nicify.test.d.cts +2 -0
  457. package/dist/utils/strings.nicify.test.d.ts +2 -1
  458. package/dist/utils/strings.nicify.test.js +168 -158
  459. package/dist/utils/strings.nicify.test.js.map +1 -0
  460. package/dist/utils/types.d.cts +23 -0
  461. package/dist/utils/types.d.ts +8 -6
  462. package/dist/utils/types.js +19 -1
  463. package/dist/utils/types.js.map +1 -0
  464. package/dist/utils/unicode.d.cts +3 -0
  465. package/dist/utils/unicode.d.ts +3 -1
  466. package/dist/utils/unicode.js +34 -21
  467. package/dist/utils/unicode.js.map +1 -0
  468. package/dist/utils/urls.d.cts +20 -0
  469. package/dist/utils/urls.d.ts +10 -8
  470. package/dist/utils/urls.js +76 -165
  471. package/dist/utils/urls.js.map +1 -0
  472. package/dist/utils/uuids.d.cts +4 -0
  473. package/dist/utils/uuids.d.ts +4 -2
  474. package/dist/utils/uuids.js +39 -35
  475. package/dist/utils/uuids.js.map +1 -0
  476. package/package.json +5 -5
@@ -0,0 +1,43 @@
1
+ declare const HTTP_METHODS: {
2
+ readonly GET: {
3
+ readonly safe: true;
4
+ readonly idempotent: true;
5
+ };
6
+ readonly POST: {
7
+ readonly safe: false;
8
+ readonly idempotent: false;
9
+ };
10
+ readonly PUT: {
11
+ readonly safe: false;
12
+ readonly idempotent: true;
13
+ };
14
+ readonly DELETE: {
15
+ readonly safe: false;
16
+ readonly idempotent: true;
17
+ };
18
+ readonly PATCH: {
19
+ readonly safe: false;
20
+ readonly idempotent: false;
21
+ };
22
+ readonly OPTIONS: {
23
+ readonly safe: true;
24
+ readonly idempotent: true;
25
+ };
26
+ readonly HEAD: {
27
+ readonly safe: true;
28
+ readonly idempotent: true;
29
+ };
30
+ readonly TRACE: {
31
+ readonly safe: true;
32
+ readonly idempotent: true;
33
+ };
34
+ readonly CONNECT: {
35
+ readonly safe: false;
36
+ readonly idempotent: false;
37
+ };
38
+ };
39
+ type HttpMethod = keyof typeof HTTP_METHODS;
40
+ declare function decodeBasicAuthorizationHeader(value: string): [string, string] | null;
41
+ declare function encodeBasicAuthorizationHeader(id: string, password: string): string;
42
+
43
+ export { HTTP_METHODS, type HttpMethod, decodeBasicAuthorizationHeader, encodeBasicAuthorizationHeader };
@@ -1,4 +1,4 @@
1
- export declare const HTTP_METHODS: {
1
+ declare const HTTP_METHODS: {
2
2
  readonly GET: {
3
3
  readonly safe: true;
4
4
  readonly idempotent: true;
@@ -36,6 +36,8 @@ export declare const HTTP_METHODS: {
36
36
  readonly idempotent: false;
37
37
  };
38
38
  };
39
- export type HttpMethod = keyof typeof HTTP_METHODS;
40
- export declare function decodeBasicAuthorizationHeader(value: string): [string, string] | null;
41
- export declare function encodeBasicAuthorizationHeader(id: string, password: string): string;
39
+ type HttpMethod = keyof typeof HTTP_METHODS;
40
+ declare function decodeBasicAuthorizationHeader(value: string): [string, string] | null;
41
+ declare function encodeBasicAuthorizationHeader(id: string, password: string): string;
42
+
43
+ export { HTTP_METHODS, type HttpMethod, decodeBasicAuthorizationHeader, encodeBasicAuthorizationHeader };
@@ -1,87 +1,87 @@
1
- import { decodeBase64, encodeBase64, isBase64 } from "./bytes";
2
- export const HTTP_METHODS = {
3
- "GET": {
4
- safe: true,
5
- idempotent: true,
6
- },
7
- "POST": {
8
- safe: false,
9
- idempotent: false,
10
- },
11
- "PUT": {
12
- safe: false,
13
- idempotent: true,
14
- },
15
- "DELETE": {
16
- safe: false,
17
- idempotent: true,
18
- },
19
- "PATCH": {
20
- safe: false,
21
- idempotent: false,
22
- },
23
- "OPTIONS": {
24
- safe: true,
25
- idempotent: true,
26
- },
27
- "HEAD": {
28
- safe: true,
29
- idempotent: true,
30
- },
31
- "TRACE": {
32
- safe: true,
33
- idempotent: true,
34
- },
35
- "CONNECT": {
36
- safe: false,
37
- idempotent: false,
38
- },
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
39
9
  };
40
- export function decodeBasicAuthorizationHeader(value) {
41
- const [type, encoded, ...rest] = value.split(' ');
42
- if (rest.length > 0)
43
- return null;
44
- if (!encoded)
45
- return null;
46
- if (type !== 'Basic')
47
- return null;
48
- if (!isBase64(encoded))
49
- return null;
50
- const decoded = new TextDecoder().decode(decodeBase64(encoded));
51
- const split = decoded.split(':');
52
- return [split[0], split.slice(1).join(':')];
53
- }
54
- import.meta.vitest?.test("decodeBasicAuthorizationHeader", ({ expect }) => {
55
- // Test with valid Basic Authorization header
56
- const username = "user";
57
- const password = "pass";
58
- const encoded = encodeBasicAuthorizationHeader(username, password);
59
- expect(decodeBasicAuthorizationHeader(encoded)).toEqual([username, password]);
60
- // Test with password containing colons
61
- const complexPassword = "pass:with:colons";
62
- const encodedComplex = encodeBasicAuthorizationHeader(username, complexPassword);
63
- expect(decodeBasicAuthorizationHeader(encodedComplex)).toEqual([username, complexPassword]);
64
- // Test with invalid headers
65
- expect(decodeBasicAuthorizationHeader("NotBasic dXNlcjpwYXNz")).toBe(null); // Wrong type
66
- expect(decodeBasicAuthorizationHeader("Basic")).toBe(null); // Missing encoded part
67
- expect(decodeBasicAuthorizationHeader("Basic not-base64")).toBe(null); // Not base64
68
- expect(decodeBasicAuthorizationHeader("Basic dXNlcjpwYXNz extra")).toBe(null); // Extra parts
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/utils/http.tsx
21
+ var http_exports = {};
22
+ __export(http_exports, {
23
+ HTTP_METHODS: () => HTTP_METHODS,
24
+ decodeBasicAuthorizationHeader: () => decodeBasicAuthorizationHeader,
25
+ encodeBasicAuthorizationHeader: () => encodeBasicAuthorizationHeader
69
26
  });
70
- export function encodeBasicAuthorizationHeader(id, password) {
71
- if (id.includes(':'))
72
- throw new Error("Basic authorization header id cannot contain ':'");
73
- return `Basic ${encodeBase64(new TextEncoder().encode(`${id}:${password}`))}`;
27
+ module.exports = __toCommonJS(http_exports);
28
+ var import_bytes = require("./bytes");
29
+ var HTTP_METHODS = {
30
+ "GET": {
31
+ safe: true,
32
+ idempotent: true
33
+ },
34
+ "POST": {
35
+ safe: false,
36
+ idempotent: false
37
+ },
38
+ "PUT": {
39
+ safe: false,
40
+ idempotent: true
41
+ },
42
+ "DELETE": {
43
+ safe: false,
44
+ idempotent: true
45
+ },
46
+ "PATCH": {
47
+ safe: false,
48
+ idempotent: false
49
+ },
50
+ "OPTIONS": {
51
+ safe: true,
52
+ idempotent: true
53
+ },
54
+ "HEAD": {
55
+ safe: true,
56
+ idempotent: true
57
+ },
58
+ "TRACE": {
59
+ safe: true,
60
+ idempotent: true
61
+ },
62
+ "CONNECT": {
63
+ safe: false,
64
+ idempotent: false
65
+ }
66
+ };
67
+ function decodeBasicAuthorizationHeader(value) {
68
+ const [type, encoded, ...rest] = value.split(" ");
69
+ if (rest.length > 0) return null;
70
+ if (!encoded) return null;
71
+ if (type !== "Basic") return null;
72
+ if (!(0, import_bytes.isBase64)(encoded)) return null;
73
+ const decoded = new TextDecoder().decode((0, import_bytes.decodeBase64)(encoded));
74
+ const split = decoded.split(":");
75
+ return [split[0], split.slice(1).join(":")];
76
+ }
77
+ function encodeBasicAuthorizationHeader(id, password) {
78
+ if (id.includes(":")) throw new Error("Basic authorization header id cannot contain ':'");
79
+ return `Basic ${(0, import_bytes.encodeBase64)(new TextEncoder().encode(`${id}:${password}`))}`;
74
80
  }
75
- import.meta.vitest?.test("encodeBasicAuthorizationHeader", ({ expect }) => {
76
- // Test with simple username and password
77
- const encoded = encodeBasicAuthorizationHeader("user", "pass");
78
- expect(encoded).toMatch(/^Basic [A-Za-z0-9+/=]+$/); // Should start with "Basic " followed by base64
79
- // Test with empty password
80
- const encodedEmptyPass = encodeBasicAuthorizationHeader("user", "");
81
- expect(encodedEmptyPass).toMatch(/^Basic [A-Za-z0-9+/=]+$/);
82
- // Test with password containing special characters
83
- const encodedSpecialChars = encodeBasicAuthorizationHeader("user", "p@ss!w0rd");
84
- expect(encodedSpecialChars).toMatch(/^Basic [A-Za-z0-9+/=]+$/);
85
- // Test with username containing colon should throw
86
- expect(() => encodeBasicAuthorizationHeader("user:name", "pass")).toThrow();
81
+ // Annotate the CommonJS export names for ESM import in node:
82
+ 0 && (module.exports = {
83
+ HTTP_METHODS,
84
+ decodeBasicAuthorizationHeader,
85
+ encodeBasicAuthorizationHeader
87
86
  });
87
+ //# sourceMappingURL=http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/http.tsx"],"sourcesContent":["import { decodeBase64, encodeBase64, isBase64 } from \"./bytes\";\n\nexport const HTTP_METHODS = {\n \"GET\": {\n safe: true,\n idempotent: true,\n },\n \"POST\": {\n safe: false,\n idempotent: false,\n },\n \"PUT\": {\n safe: false,\n idempotent: true,\n },\n \"DELETE\": {\n safe: false,\n idempotent: true,\n },\n \"PATCH\": {\n safe: false,\n idempotent: false,\n },\n \"OPTIONS\": {\n safe: true,\n idempotent: true,\n },\n \"HEAD\": {\n safe: true,\n idempotent: true,\n },\n \"TRACE\": {\n safe: true,\n idempotent: true,\n },\n \"CONNECT\": {\n safe: false,\n idempotent: false,\n },\n} as const;\nexport type HttpMethod = keyof typeof HTTP_METHODS;\n\nexport function decodeBasicAuthorizationHeader(value: string): [string, string] | null {\n const [type, encoded, ...rest] = value.split(' ');\n if (rest.length > 0) return null;\n if (!encoded) return null;\n if (type !== 'Basic') return null;\n if (!isBase64(encoded)) return null;\n const decoded = new TextDecoder().decode(decodeBase64(encoded));\n const split = decoded.split(':');\n return [split[0], split.slice(1).join(':')];\n}\nundefined?.test(\"decodeBasicAuthorizationHeader\", ({ expect }) => {\n // Test with valid Basic Authorization header\n const username = \"user\";\n const password = \"pass\";\n const encoded = encodeBasicAuthorizationHeader(username, password);\n expect(decodeBasicAuthorizationHeader(encoded)).toEqual([username, password]);\n\n // Test with password containing colons\n const complexPassword = \"pass:with:colons\";\n const encodedComplex = encodeBasicAuthorizationHeader(username, complexPassword);\n expect(decodeBasicAuthorizationHeader(encodedComplex)).toEqual([username, complexPassword]);\n\n // Test with invalid headers\n expect(decodeBasicAuthorizationHeader(\"NotBasic dXNlcjpwYXNz\")).toBe(null); // Wrong type\n expect(decodeBasicAuthorizationHeader(\"Basic\")).toBe(null); // Missing encoded part\n expect(decodeBasicAuthorizationHeader(\"Basic not-base64\")).toBe(null); // Not base64\n expect(decodeBasicAuthorizationHeader(\"Basic dXNlcjpwYXNz extra\")).toBe(null); // Extra parts\n});\n\nexport function encodeBasicAuthorizationHeader(id: string, password: string): string {\n if (id.includes(':')) throw new Error(\"Basic authorization header id cannot contain ':'\");\n return `Basic ${encodeBase64(new TextEncoder().encode(`${id}:${password}`))}`;\n}\nundefined?.test(\"encodeBasicAuthorizationHeader\", ({ expect }) => {\n // Test with simple username and password\n const encoded = encodeBasicAuthorizationHeader(\"user\", \"pass\");\n expect(encoded).toMatch(/^Basic [A-Za-z0-9+/=]+$/); // Should start with \"Basic \" followed by base64\n\n // Test with empty password\n const encodedEmptyPass = encodeBasicAuthorizationHeader(\"user\", \"\");\n expect(encodedEmptyPass).toMatch(/^Basic [A-Za-z0-9+/=]+$/);\n\n // Test with password containing special characters\n const encodedSpecialChars = encodeBasicAuthorizationHeader(\"user\", \"p@ss!w0rd\");\n expect(encodedSpecialChars).toMatch(/^Basic [A-Za-z0-9+/=]+$/);\n\n // Test with username containing colon should throw\n expect(() => encodeBasicAuthorizationHeader(\"user:name\", \"pass\")).toThrow();\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAqD;AAE9C,IAAM,eAAe;AAAA,EAC1B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,YAAY;AAAA,EACd;AAAA,EACA,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,YAAY;AAAA,EACd;AAAA,EACA,OAAO;AAAA,IACL,MAAM;AAAA,IACN,YAAY;AAAA,EACd;AAAA,EACA,UAAU;AAAA,IACR,MAAM;AAAA,IACN,YAAY;AAAA,EACd;AAAA,EACA,SAAS;AAAA,IACP,MAAM;AAAA,IACN,YAAY;AAAA,EACd;AAAA,EACA,WAAW;AAAA,IACT,MAAM;AAAA,IACN,YAAY;AAAA,EACd;AAAA,EACA,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,YAAY;AAAA,EACd;AAAA,EACA,SAAS;AAAA,IACP,MAAM;AAAA,IACN,YAAY;AAAA,EACd;AAAA,EACA,WAAW;AAAA,IACT,MAAM;AAAA,IACN,YAAY;AAAA,EACd;AACF;AAGO,SAAS,+BAA+B,OAAwC;AACrF,QAAM,CAAC,MAAM,SAAS,GAAG,IAAI,IAAI,MAAM,MAAM,GAAG;AAChD,MAAI,KAAK,SAAS,EAAG,QAAO;AAC5B,MAAI,CAAC,QAAS,QAAO;AACrB,MAAI,SAAS,QAAS,QAAO;AAC7B,MAAI,KAAC,uBAAS,OAAO,EAAG,QAAO;AAC/B,QAAM,UAAU,IAAI,YAAY,EAAE,WAAO,2BAAa,OAAO,CAAC;AAC9D,QAAM,QAAQ,QAAQ,MAAM,GAAG;AAC/B,SAAO,CAAC,MAAM,CAAC,GAAG,MAAM,MAAM,CAAC,EAAE,KAAK,GAAG,CAAC;AAC5C;AAoBO,SAAS,+BAA+B,IAAY,UAA0B;AACnF,MAAI,GAAG,SAAS,GAAG,EAAG,OAAM,IAAI,MAAM,kDAAkD;AACxF,SAAO,aAAS,2BAAa,IAAI,YAAY,EAAE,OAAO,GAAG,EAAE,IAAI,QAAQ,EAAE,CAAC,CAAC;AAC7E;","names":[]}
@@ -0,0 +1,6 @@
1
+ type Ipv4Address = `${number}.${number}.${number}.${number}`;
2
+ type Ipv6Address = string;
3
+ declare function isIpAddress(ip: string): ip is Ipv4Address | Ipv6Address;
4
+ declare function assertIpAddress(ip: string): asserts ip is Ipv4Address | Ipv6Address;
5
+
6
+ export { type Ipv4Address, type Ipv6Address, assertIpAddress, isIpAddress };
@@ -1,4 +1,6 @@
1
- export type Ipv4Address = `${number}.${number}.${number}.${number}`;
2
- export type Ipv6Address = string;
3
- export declare function isIpAddress(ip: string): ip is Ipv4Address | Ipv6Address;
4
- export declare function assertIpAddress(ip: string): asserts ip is Ipv4Address | Ipv6Address;
1
+ type Ipv4Address = `${number}.${number}.${number}.${number}`;
2
+ type Ipv6Address = string;
3
+ declare function isIpAddress(ip: string): ip is Ipv4Address | Ipv6Address;
4
+ declare function assertIpAddress(ip: string): asserts ip is Ipv4Address | Ipv6Address;
5
+
6
+ export { type Ipv4Address, type Ipv6Address, assertIpAddress, isIpAddress };
package/dist/utils/ips.js CHANGED
@@ -1,38 +1,51 @@
1
- import ipRegex from "ip-regex";
2
- export function isIpAddress(ip) {
3
- return ipRegex({ exact: true }).test(ip);
4
- }
5
- import.meta.vitest?.test("isIpAddress", ({ expect }) => {
6
- // Test valid IPv4 addresses
7
- expect(isIpAddress("192.168.1.1")).toBe(true);
8
- expect(isIpAddress("127.0.0.1")).toBe(true);
9
- expect(isIpAddress("0.0.0.0")).toBe(true);
10
- expect(isIpAddress("255.255.255.255")).toBe(true);
11
- // Test valid IPv6 addresses
12
- expect(isIpAddress("::1")).toBe(true);
13
- expect(isIpAddress("2001:db8::")).toBe(true);
14
- expect(isIpAddress("2001:db8:85a3:8d3:1319:8a2e:370:7348")).toBe(true);
15
- // Test invalid IP addresses
16
- expect(isIpAddress("")).toBe(false);
17
- expect(isIpAddress("not an ip")).toBe(false);
18
- expect(isIpAddress("256.256.256.256")).toBe(false);
19
- expect(isIpAddress("192.168.1")).toBe(false);
20
- expect(isIpAddress("192.168.1.1.1")).toBe(false);
21
- expect(isIpAddress("2001:db8::xyz")).toBe(false);
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/utils/ips.tsx
31
+ var ips_exports = {};
32
+ __export(ips_exports, {
33
+ assertIpAddress: () => assertIpAddress,
34
+ isIpAddress: () => isIpAddress
22
35
  });
23
- export function assertIpAddress(ip) {
24
- if (!isIpAddress(ip)) {
25
- throw new Error(`Invalid IP address: ${ip}`);
26
- }
36
+ module.exports = __toCommonJS(ips_exports);
37
+ var import_ip_regex = __toESM(require("ip-regex"), 1);
38
+ function isIpAddress(ip) {
39
+ return (0, import_ip_regex.default)({ exact: true }).test(ip);
40
+ }
41
+ function assertIpAddress(ip) {
42
+ if (!isIpAddress(ip)) {
43
+ throw new Error(`Invalid IP address: ${ip}`);
44
+ }
27
45
  }
28
- import.meta.vitest?.test("assertIpAddress", ({ expect }) => {
29
- // Test with valid IPv4 address
30
- expect(() => assertIpAddress("192.168.1.1")).not.toThrow();
31
- // Test with valid IPv6 address
32
- expect(() => assertIpAddress("::1")).not.toThrow();
33
- // Test with invalid IP addresses
34
- expect(() => assertIpAddress("")).toThrow("Invalid IP address: ");
35
- expect(() => assertIpAddress("not an ip")).toThrow("Invalid IP address: not an ip");
36
- expect(() => assertIpAddress("256.256.256.256")).toThrow("Invalid IP address: 256.256.256.256");
37
- expect(() => assertIpAddress("192.168.1")).toThrow("Invalid IP address: 192.168.1");
46
+ // Annotate the CommonJS export names for ESM import in node:
47
+ 0 && (module.exports = {
48
+ assertIpAddress,
49
+ isIpAddress
38
50
  });
51
+ //# sourceMappingURL=ips.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/ips.tsx"],"sourcesContent":["import ipRegex from \"ip-regex\";\n\nexport type Ipv4Address = `${number}.${number}.${number}.${number}`;\nexport type Ipv6Address = string;\n\nexport function isIpAddress(ip: string): ip is Ipv4Address | Ipv6Address {\n return ipRegex({ exact: true }).test(ip);\n}\nundefined?.test(\"isIpAddress\", ({ expect }) => {\n // Test valid IPv4 addresses\n expect(isIpAddress(\"192.168.1.1\")).toBe(true);\n expect(isIpAddress(\"127.0.0.1\")).toBe(true);\n expect(isIpAddress(\"0.0.0.0\")).toBe(true);\n expect(isIpAddress(\"255.255.255.255\")).toBe(true);\n\n // Test valid IPv6 addresses\n expect(isIpAddress(\"::1\")).toBe(true);\n expect(isIpAddress(\"2001:db8::\")).toBe(true);\n expect(isIpAddress(\"2001:db8:85a3:8d3:1319:8a2e:370:7348\")).toBe(true);\n\n // Test invalid IP addresses\n expect(isIpAddress(\"\")).toBe(false);\n expect(isIpAddress(\"not an ip\")).toBe(false);\n expect(isIpAddress(\"256.256.256.256\")).toBe(false);\n expect(isIpAddress(\"192.168.1\")).toBe(false);\n expect(isIpAddress(\"192.168.1.1.1\")).toBe(false);\n expect(isIpAddress(\"2001:db8::xyz\")).toBe(false);\n});\n\nexport function assertIpAddress(ip: string): asserts ip is Ipv4Address | Ipv6Address {\n if (!isIpAddress(ip)) {\n throw new Error(`Invalid IP address: ${ip}`);\n }\n}\nundefined?.test(\"assertIpAddress\", ({ expect }) => {\n // Test with valid IPv4 address\n expect(() => assertIpAddress(\"192.168.1.1\")).not.toThrow();\n\n // Test with valid IPv6 address\n expect(() => assertIpAddress(\"::1\")).not.toThrow();\n\n // Test with invalid IP addresses\n expect(() => assertIpAddress(\"\")).toThrow(\"Invalid IP address: \");\n expect(() => assertIpAddress(\"not an ip\")).toThrow(\"Invalid IP address: not an ip\");\n expect(() => assertIpAddress(\"256.256.256.256\")).toThrow(\"Invalid IP address: 256.256.256.256\");\n expect(() => assertIpAddress(\"192.168.1\")).toThrow(\"Invalid IP address: 192.168.1\");\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAoB;AAKb,SAAS,YAAY,IAA6C;AACvE,aAAO,gBAAAA,SAAQ,EAAE,OAAO,KAAK,CAAC,EAAE,KAAK,EAAE;AACzC;AAsBO,SAAS,gBAAgB,IAAqD;AACnF,MAAI,CAAC,YAAY,EAAE,GAAG;AACpB,UAAM,IAAI,MAAM,uBAAuB,EAAE,EAAE;AAAA,EAC7C;AACF;","names":["ipRegex"]}
@@ -0,0 +1,13 @@
1
+ import { Result } from './results.cjs';
2
+
3
+ type Json = null | boolean | number | string | Json[] | {
4
+ [key: string]: Json;
5
+ };
6
+ type ReadonlyJson = null | boolean | number | string | readonly ReadonlyJson[] | {
7
+ readonly [key: string]: ReadonlyJson;
8
+ };
9
+ declare function isJson(value: unknown): value is Json;
10
+ declare function parseJson(json: string): Result<Json>;
11
+ declare function stringifyJson(json: Json): Result<string>;
12
+
13
+ export { type Json, type ReadonlyJson, isJson, parseJson, stringifyJson };
@@ -1,10 +1,13 @@
1
- import { Result } from "./results";
2
- export type Json = null | boolean | number | string | Json[] | {
1
+ import { Result } from './results.js';
2
+
3
+ type Json = null | boolean | number | string | Json[] | {
3
4
  [key: string]: Json;
4
5
  };
5
- export type ReadonlyJson = null | boolean | number | string | readonly ReadonlyJson[] | {
6
+ type ReadonlyJson = null | boolean | number | string | readonly ReadonlyJson[] | {
6
7
  readonly [key: string]: ReadonlyJson;
7
8
  };
8
- export declare function isJson(value: unknown): value is Json;
9
- export declare function parseJson(json: string): Result<Json>;
10
- export declare function stringifyJson(json: Json): Result<string>;
9
+ declare function isJson(value: unknown): value is Json;
10
+ declare function parseJson(json: string): Result<Json>;
11
+ declare function stringifyJson(json: Json): Result<string>;
12
+
13
+ export { type Json, type ReadonlyJson, isJson, parseJson, stringifyJson };
@@ -1,161 +1,58 @@
1
- import { Result } from "./results";
2
- export function isJson(value) {
3
- switch (typeof value) {
4
- case "object": {
5
- if (value === null)
6
- return true;
7
- if (Array.isArray(value))
8
- return value.every(isJson);
9
- return Object.keys(value).every(k => typeof k === "string") && Object.values(value).every(isJson);
10
- }
11
- case "string":
12
- case "number":
13
- case "boolean": {
14
- return true;
15
- }
16
- default: {
17
- return false;
18
- }
19
- }
20
- }
21
- import.meta.vitest?.test("isJson", ({ expect }) => {
22
- // Test primitive values
23
- expect(isJson(null)).toBe(true);
24
- expect(isJson(true)).toBe(true);
25
- expect(isJson(false)).toBe(true);
26
- expect(isJson(123)).toBe(true);
27
- expect(isJson("string")).toBe(true);
28
- // Test arrays
29
- expect(isJson([])).toBe(true);
30
- expect(isJson([1, 2, 3])).toBe(true);
31
- expect(isJson(["a", "b", "c"])).toBe(true);
32
- expect(isJson([1, "a", true, null])).toBe(true);
33
- expect(isJson([1, [2, 3], { a: "b" }])).toBe(true);
34
- // Test objects
35
- expect(isJson({})).toBe(true);
36
- expect(isJson({ a: 1, b: 2 })).toBe(true);
37
- expect(isJson({ a: "string", b: true, c: null })).toBe(true);
38
- expect(isJson({ a: [1, 2, 3], b: { c: "d" } })).toBe(true);
39
- // Test invalid JSON values
40
- expect(isJson(undefined)).toBe(false);
41
- expect(isJson(() => { })).toBe(false);
42
- expect(isJson(Symbol())).toBe(false);
43
- expect(isJson(BigInt(123))).toBe(false);
44
- // Test arrays with invalid JSON values
45
- expect(isJson([1, undefined, 3])).toBe(false);
46
- expect(isJson([1, () => { }, 3])).toBe(false);
47
- // Test objects with invalid JSON values
48
- expect(isJson({ a: 1, b: undefined })).toBe(false);
49
- expect(isJson({ a: 1, b: () => { } })).toBe(false);
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/utils/json.tsx
21
+ var json_exports = {};
22
+ __export(json_exports, {
23
+ isJson: () => isJson,
24
+ parseJson: () => parseJson,
25
+ stringifyJson: () => stringifyJson
50
26
  });
51
- export function parseJson(json) {
52
- return Result.fromThrowing(() => JSON.parse(json));
27
+ module.exports = __toCommonJS(json_exports);
28
+ var import_results = require("./results");
29
+ function isJson(value) {
30
+ switch (typeof value) {
31
+ case "object": {
32
+ if (value === null) return true;
33
+ if (Array.isArray(value)) return value.every(isJson);
34
+ return Object.keys(value).every((k) => typeof k === "string") && Object.values(value).every(isJson);
35
+ }
36
+ case "string":
37
+ case "number":
38
+ case "boolean": {
39
+ return true;
40
+ }
41
+ default: {
42
+ return false;
43
+ }
44
+ }
53
45
  }
54
- import.meta.vitest?.test("parseJson", ({ expect }) => {
55
- // Test valid JSON strings
56
- const nullResult = parseJson("null");
57
- expect(nullResult.status).toBe("ok");
58
- if (nullResult.status === "ok") {
59
- expect(nullResult.data).toBe(null);
60
- }
61
- const trueResult = parseJson("true");
62
- expect(trueResult.status).toBe("ok");
63
- if (trueResult.status === "ok") {
64
- expect(trueResult.data).toBe(true);
65
- }
66
- const numberResult = parseJson("123");
67
- expect(numberResult.status).toBe("ok");
68
- if (numberResult.status === "ok") {
69
- expect(numberResult.data).toBe(123);
70
- }
71
- const stringResult = parseJson('"string"');
72
- expect(stringResult.status).toBe("ok");
73
- if (stringResult.status === "ok") {
74
- expect(stringResult.data).toBe("string");
75
- }
76
- const emptyArrayResult = parseJson("[]");
77
- expect(emptyArrayResult.status).toBe("ok");
78
- if (emptyArrayResult.status === "ok") {
79
- expect(emptyArrayResult.data).toEqual([]);
80
- }
81
- const arrayResult = parseJson("[1,2,3]");
82
- expect(arrayResult.status).toBe("ok");
83
- if (arrayResult.status === "ok") {
84
- expect(arrayResult.data).toEqual([1, 2, 3]);
85
- }
86
- const emptyObjectResult = parseJson("{}");
87
- expect(emptyObjectResult.status).toBe("ok");
88
- if (emptyObjectResult.status === "ok") {
89
- expect(emptyObjectResult.data).toEqual({});
90
- }
91
- const objectResult = parseJson('{"a":1,"b":"string"}');
92
- expect(objectResult.status).toBe("ok");
93
- if (objectResult.status === "ok") {
94
- expect(objectResult.data).toEqual({ a: 1, b: "string" });
95
- }
96
- // Test invalid JSON strings
97
- expect(parseJson("").status).toBe("error");
98
- expect(parseJson("undefined").status).toBe("error");
99
- expect(parseJson("{").status).toBe("error");
100
- expect(parseJson('{"a":1,}').status).toBe("error");
101
- expect(parseJson("function(){}").status).toBe("error");
102
- });
103
- export function stringifyJson(json) {
104
- return Result.fromThrowing(() => JSON.stringify(json));
46
+ function parseJson(json) {
47
+ return import_results.Result.fromThrowing(() => JSON.parse(json));
105
48
  }
106
- import.meta.vitest?.test("stringifyJson", ({ expect }) => {
107
- // Test primitive values
108
- const nullResult = stringifyJson(null);
109
- expect(nullResult.status).toBe("ok");
110
- if (nullResult.status === "ok") {
111
- expect(nullResult.data).toBe("null");
112
- }
113
- const trueResult = stringifyJson(true);
114
- expect(trueResult.status).toBe("ok");
115
- if (trueResult.status === "ok") {
116
- expect(trueResult.data).toBe("true");
117
- }
118
- const numberResult = stringifyJson(123);
119
- expect(numberResult.status).toBe("ok");
120
- if (numberResult.status === "ok") {
121
- expect(numberResult.data).toBe("123");
122
- }
123
- const stringResult = stringifyJson("string");
124
- expect(stringResult.status).toBe("ok");
125
- if (stringResult.status === "ok") {
126
- expect(stringResult.data).toBe('"string"');
127
- }
128
- // Test arrays
129
- const emptyArrayResult = stringifyJson([]);
130
- expect(emptyArrayResult.status).toBe("ok");
131
- if (emptyArrayResult.status === "ok") {
132
- expect(emptyArrayResult.data).toBe("[]");
133
- }
134
- const arrayResult = stringifyJson([1, 2, 3]);
135
- expect(arrayResult.status).toBe("ok");
136
- if (arrayResult.status === "ok") {
137
- expect(arrayResult.data).toBe("[1,2,3]");
138
- }
139
- // Test objects
140
- const emptyObjectResult = stringifyJson({});
141
- expect(emptyObjectResult.status).toBe("ok");
142
- if (emptyObjectResult.status === "ok") {
143
- expect(emptyObjectResult.data).toBe("{}");
144
- }
145
- const objectResult = stringifyJson({ a: 1, b: "string" });
146
- expect(objectResult.status).toBe("ok");
147
- if (objectResult.status === "ok") {
148
- expect(objectResult.data).toBe('{"a":1,"b":"string"}');
149
- }
150
- // Test nested structures
151
- const nested = { a: [1, 2, 3], b: { c: "d" } };
152
- const nestedResult = stringifyJson(nested);
153
- expect(nestedResult.status).toBe("ok");
154
- if (nestedResult.status === "ok") {
155
- expect(nestedResult.data).toBe('{"a":[1,2,3],"b":{"c":"d"}}');
156
- }
157
- // Test circular references (should error)
158
- const circular = { a: 1 };
159
- circular.self = circular;
160
- expect(stringifyJson(circular).status).toBe("error");
49
+ function stringifyJson(json) {
50
+ return import_results.Result.fromThrowing(() => JSON.stringify(json));
51
+ }
52
+ // Annotate the CommonJS export names for ESM import in node:
53
+ 0 && (module.exports = {
54
+ isJson,
55
+ parseJson,
56
+ stringifyJson
161
57
  });
58
+ //# sourceMappingURL=json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/json.tsx"],"sourcesContent":["import { Result } from \"./results\";\n\nexport type Json =\n | null\n | boolean\n | number\n | string\n | Json[]\n | { [key: string]: Json };\n\nexport type ReadonlyJson =\n | null\n | boolean\n | number\n | string\n | readonly ReadonlyJson[]\n | { readonly [key: string]: ReadonlyJson };\n\nexport function isJson(value: unknown): value is Json {\n switch (typeof value) {\n case \"object\": {\n if (value === null) return true;\n if (Array.isArray(value)) return value.every(isJson);\n return Object.keys(value).every(k => typeof k === \"string\") && Object.values(value).every(isJson);\n }\n case \"string\":\n case \"number\":\n case \"boolean\": {\n return true;\n }\n default: {\n return false;\n }\n }\n}\nundefined?.test(\"isJson\", ({ expect }) => {\n // Test primitive values\n expect(isJson(null)).toBe(true);\n expect(isJson(true)).toBe(true);\n expect(isJson(false)).toBe(true);\n expect(isJson(123)).toBe(true);\n expect(isJson(\"string\")).toBe(true);\n\n // Test arrays\n expect(isJson([])).toBe(true);\n expect(isJson([1, 2, 3])).toBe(true);\n expect(isJson([\"a\", \"b\", \"c\"])).toBe(true);\n expect(isJson([1, \"a\", true, null])).toBe(true);\n expect(isJson([1, [2, 3], { a: \"b\" }])).toBe(true);\n\n // Test objects\n expect(isJson({})).toBe(true);\n expect(isJson({ a: 1, b: 2 })).toBe(true);\n expect(isJson({ a: \"string\", b: true, c: null })).toBe(true);\n expect(isJson({ a: [1, 2, 3], b: { c: \"d\" } })).toBe(true);\n\n // Test invalid JSON values\n expect(isJson(undefined)).toBe(false);\n expect(isJson(() => {})).toBe(false);\n expect(isJson(Symbol())).toBe(false);\n expect(isJson(BigInt(123))).toBe(false);\n\n // Test arrays with invalid JSON values\n expect(isJson([1, undefined, 3])).toBe(false);\n expect(isJson([1, () => {}, 3])).toBe(false);\n\n // Test objects with invalid JSON values\n expect(isJson({ a: 1, b: undefined })).toBe(false);\n expect(isJson({ a: 1, b: () => {} })).toBe(false);\n});\n\nexport function parseJson(json: string): Result<Json> {\n return Result.fromThrowing(() => JSON.parse(json));\n}\nundefined?.test(\"parseJson\", ({ expect }) => {\n // Test valid JSON strings\n const nullResult = parseJson(\"null\");\n expect(nullResult.status).toBe(\"ok\");\n if (nullResult.status === \"ok\") {\n expect(nullResult.data).toBe(null);\n }\n\n const trueResult = parseJson(\"true\");\n expect(trueResult.status).toBe(\"ok\");\n if (trueResult.status === \"ok\") {\n expect(trueResult.data).toBe(true);\n }\n\n const numberResult = parseJson(\"123\");\n expect(numberResult.status).toBe(\"ok\");\n if (numberResult.status === \"ok\") {\n expect(numberResult.data).toBe(123);\n }\n\n const stringResult = parseJson('\"string\"');\n expect(stringResult.status).toBe(\"ok\");\n if (stringResult.status === \"ok\") {\n expect(stringResult.data).toBe(\"string\");\n }\n\n const emptyArrayResult = parseJson(\"[]\");\n expect(emptyArrayResult.status).toBe(\"ok\");\n if (emptyArrayResult.status === \"ok\") {\n expect(emptyArrayResult.data).toEqual([]);\n }\n\n const arrayResult = parseJson(\"[1,2,3]\");\n expect(arrayResult.status).toBe(\"ok\");\n if (arrayResult.status === \"ok\") {\n expect(arrayResult.data).toEqual([1, 2, 3]);\n }\n\n const emptyObjectResult = parseJson(\"{}\");\n expect(emptyObjectResult.status).toBe(\"ok\");\n if (emptyObjectResult.status === \"ok\") {\n expect(emptyObjectResult.data).toEqual({});\n }\n\n const objectResult = parseJson('{\"a\":1,\"b\":\"string\"}');\n expect(objectResult.status).toBe(\"ok\");\n if (objectResult.status === \"ok\") {\n expect(objectResult.data).toEqual({ a: 1, b: \"string\" });\n }\n\n // Test invalid JSON strings\n expect(parseJson(\"\").status).toBe(\"error\");\n expect(parseJson(\"undefined\").status).toBe(\"error\");\n expect(parseJson(\"{\").status).toBe(\"error\");\n expect(parseJson('{\"a\":1,}').status).toBe(\"error\");\n expect(parseJson(\"function(){}\").status).toBe(\"error\");\n});\n\nexport function stringifyJson(json: Json): Result<string> {\n return Result.fromThrowing(() => JSON.stringify(json));\n}\nundefined?.test(\"stringifyJson\", ({ expect }) => {\n // Test primitive values\n const nullResult = stringifyJson(null);\n expect(nullResult.status).toBe(\"ok\");\n if (nullResult.status === \"ok\") {\n expect(nullResult.data).toBe(\"null\");\n }\n\n const trueResult = stringifyJson(true);\n expect(trueResult.status).toBe(\"ok\");\n if (trueResult.status === \"ok\") {\n expect(trueResult.data).toBe(\"true\");\n }\n\n const numberResult = stringifyJson(123);\n expect(numberResult.status).toBe(\"ok\");\n if (numberResult.status === \"ok\") {\n expect(numberResult.data).toBe(\"123\");\n }\n\n const stringResult = stringifyJson(\"string\");\n expect(stringResult.status).toBe(\"ok\");\n if (stringResult.status === \"ok\") {\n expect(stringResult.data).toBe('\"string\"');\n }\n\n // Test arrays\n const emptyArrayResult = stringifyJson([]);\n expect(emptyArrayResult.status).toBe(\"ok\");\n if (emptyArrayResult.status === \"ok\") {\n expect(emptyArrayResult.data).toBe(\"[]\");\n }\n\n const arrayResult = stringifyJson([1, 2, 3]);\n expect(arrayResult.status).toBe(\"ok\");\n if (arrayResult.status === \"ok\") {\n expect(arrayResult.data).toBe(\"[1,2,3]\");\n }\n\n // Test objects\n const emptyObjectResult = stringifyJson({});\n expect(emptyObjectResult.status).toBe(\"ok\");\n if (emptyObjectResult.status === \"ok\") {\n expect(emptyObjectResult.data).toBe(\"{}\");\n }\n\n const objectResult = stringifyJson({ a: 1, b: \"string\" });\n expect(objectResult.status).toBe(\"ok\");\n if (objectResult.status === \"ok\") {\n expect(objectResult.data).toBe('{\"a\":1,\"b\":\"string\"}');\n }\n\n // Test nested structures\n const nested = { a: [1, 2, 3], b: { c: \"d\" } };\n const nestedResult = stringifyJson(nested);\n expect(nestedResult.status).toBe(\"ok\");\n if (nestedResult.status === \"ok\") {\n expect(nestedResult.data).toBe('{\"a\":[1,2,3],\"b\":{\"c\":\"d\"}}');\n }\n\n // Test circular references (should error)\n const circular: any = { a: 1 };\n circular.self = circular;\n expect(stringifyJson(circular).status).toBe(\"error\");\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAuB;AAkBhB,SAAS,OAAO,OAA+B;AACpD,UAAQ,OAAO,OAAO;AAAA,IACpB,KAAK,UAAU;AACb,UAAI,UAAU,KAAM,QAAO;AAC3B,UAAI,MAAM,QAAQ,KAAK,EAAG,QAAO,MAAM,MAAM,MAAM;AACnD,aAAO,OAAO,KAAK,KAAK,EAAE,MAAM,OAAK,OAAO,MAAM,QAAQ,KAAK,OAAO,OAAO,KAAK,EAAE,MAAM,MAAM;AAAA,IAClG;AAAA,IACA,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK,WAAW;AACd,aAAO;AAAA,IACT;AAAA,IACA,SAAS;AACP,aAAO;AAAA,IACT;AAAA,EACF;AACF;AAqCO,SAAS,UAAU,MAA4B;AACpD,SAAO,sBAAO,aAAa,MAAM,KAAK,MAAM,IAAI,CAAC;AACnD;AA2DO,SAAS,cAAc,MAA4B;AACxD,SAAO,sBAAO,aAAa,MAAM,KAAK,UAAU,IAAI,CAAC;AACvD;","names":[]}