autumn-js 0.0.108 → 0.0.109

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 (270) hide show
  1. package/dist/libraries/backend/better-auth.d.mts +18 -18
  2. package/dist/libraries/backend/better-auth.d.ts +18 -18
  3. package/dist/libraries/backend/better-auth.js +206 -103
  4. package/dist/libraries/backend/better-auth.mjs +7 -7
  5. package/dist/libraries/backend/{chunk-IOSEAUDJ.mjs → chunk-26E2Z26Q.mjs} +170 -102
  6. package/dist/libraries/backend/{chunk-5EKNB4IJ.mjs → chunk-BV3SY6BB.mjs} +1 -1
  7. package/dist/libraries/backend/{chunk-HHMIVOXX.mjs → chunk-CLW3UTC5.mjs} +36 -1
  8. package/dist/libraries/backend/{chunk-2RZ2FZX2.mjs → chunk-DMHG3POG.mjs} +6 -6
  9. package/dist/libraries/backend/{chunk-5H6HVCOP.mjs → chunk-TWERY4S2.mjs} +1 -1
  10. package/dist/libraries/backend/{chunk-3OLXYDCU.mjs → chunk-XEHT6LRT.mjs} +1 -1
  11. package/dist/libraries/backend/{chunk-K7JGEYUX.mjs → chunk-YTCNYNTM.mjs} +1 -1
  12. package/dist/libraries/backend/convex.js +203 -100
  13. package/dist/libraries/backend/convex.mjs +7 -7
  14. package/dist/libraries/backend/elysia.js +209 -106
  15. package/dist/libraries/backend/elysia.mjs +7 -7
  16. package/dist/libraries/backend/express.d.mts +1 -1
  17. package/dist/libraries/backend/express.d.ts +1 -1
  18. package/dist/libraries/backend/express.js +203 -100
  19. package/dist/libraries/backend/express.mjs +7 -7
  20. package/dist/libraries/backend/fastify.js +203 -100
  21. package/dist/libraries/backend/fastify.mjs +7 -7
  22. package/dist/libraries/backend/hono.js +203 -100
  23. package/dist/libraries/backend/hono.mjs +7 -7
  24. package/dist/libraries/backend/next.js +205 -102
  25. package/dist/libraries/backend/next.mjs +7 -7
  26. package/dist/libraries/backend/react-router.js +203 -100
  27. package/dist/libraries/backend/react-router.mjs +7 -7
  28. package/dist/libraries/backend/{referralTypes-CL2y5hbv.d.mts → referralTypes-CpEs5id9.d.mts} +219 -60
  29. package/dist/libraries/backend/{referralTypes-BpOamxCs.d.ts → referralTypes-PV0SFnx_.d.ts} +219 -60
  30. package/dist/libraries/backend/remix_dep.js +203 -100
  31. package/dist/libraries/backend/remix_dep.mjs +7 -7
  32. package/dist/libraries/backend/routes/backendRouter.js +203 -100
  33. package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
  34. package/dist/libraries/backend/routes/entityRoutes.js +167 -99
  35. package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
  36. package/dist/libraries/backend/routes/genRoutes.js +202 -99
  37. package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
  38. package/dist/libraries/backend/routes/productRoutes.js +167 -99
  39. package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
  40. package/dist/libraries/backend/routes/referralRoutes.js +167 -99
  41. package/dist/libraries/backend/routes/referralRoutes.mjs +3 -3
  42. package/dist/libraries/backend/supabase.js +203 -100
  43. package/dist/libraries/backend/supabase.mjs +7 -7
  44. package/dist/libraries/backend/tanstack.js +203 -100
  45. package/dist/libraries/backend/tanstack.mjs +7 -7
  46. package/dist/libraries/backend/utils/backendRes.js +167 -99
  47. package/dist/libraries/backend/utils/backendRes.mjs +1 -1
  48. package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
  49. package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
  50. package/dist/libraries/backend/utils/withAuth.js +167 -99
  51. package/dist/libraries/backend/utils/withAuth.mjs +2 -2
  52. package/dist/libraries/react/AutumnContext.d.mts +7 -5
  53. package/dist/libraries/react/AutumnContext.d.ts +7 -5
  54. package/dist/libraries/react/AutumnContext.js +175 -100
  55. package/dist/libraries/react/AutumnContext.mjs +4 -3
  56. package/dist/libraries/react/BaseAutumnProvider.d.mts +6 -5
  57. package/dist/libraries/react/BaseAutumnProvider.d.ts +6 -5
  58. package/dist/libraries/react/BaseAutumnProvider.js +327 -203
  59. package/dist/libraries/react/BaseAutumnProvider.mjs +10 -9
  60. package/dist/libraries/react/{ReactAutumnClient-BjRiaYDN.d.mts → ReactAutumnClient-C4CPCKrp.d.mts} +12 -7
  61. package/dist/libraries/react/{ReactAutumnClient-O2XzkzGM.d.ts → ReactAutumnClient-Cf3-brZx.d.ts} +12 -7
  62. package/dist/libraries/react/ReactAutumnProvider.d.mts +2 -1
  63. package/dist/libraries/react/ReactAutumnProvider.d.ts +2 -1
  64. package/dist/libraries/react/ReactAutumnProvider.js +327 -203
  65. package/dist/libraries/react/ReactAutumnProvider.mjs +11 -10
  66. package/dist/{next/client/attachTypes-DZlF8AAj.d.mts → libraries/react/attachTypes-BKzcsvuA.d.ts} +7 -7
  67. package/dist/libraries/react/{attachTypes-1Dbkyo_d.d.ts → attachTypes-C1BZ4HNs.d.mts} +3 -3
  68. package/dist/libraries/react/chunk-2H7G6M6Z.mjs +44 -0
  69. package/dist/libraries/react/chunk-3LLAOCW3.mjs +136 -0
  70. package/dist/libraries/react/{chunk-253MTZP3.mjs → chunk-BCLKTVUX.mjs} +7 -1
  71. package/dist/libraries/react/{chunk-6RNG47NV.mjs → chunk-BF36ZT6M.mjs} +12 -11
  72. package/dist/libraries/react/{chunk-KJLHVBV4.mjs → chunk-CQD37NSX.mjs} +16 -58
  73. package/dist/libraries/react/{chunk-2PVRCDDK.mjs → chunk-D3GL2QV3.mjs} +240 -381
  74. package/dist/libraries/react/{chunk-4CHWEUKX.mjs → chunk-FE5GYL7P.mjs} +2 -2
  75. package/dist/libraries/react/{chunk-MY2ODATB.mjs → chunk-HBCCTYA6.mjs} +6 -0
  76. package/dist/libraries/react/{chunk-XXGKLOAK.mjs → chunk-K7IJMDIV.mjs} +17 -3
  77. package/dist/libraries/react/{chunk-OEIUKLFH.mjs → chunk-MIITU3Q2.mjs} +37 -22
  78. package/dist/libraries/react/chunk-MS4UEBVX.mjs +223 -0
  79. package/dist/libraries/react/{chunk-OTYSAMRH.mjs → chunk-OXPO56ZD.mjs} +9 -4
  80. package/dist/libraries/react/chunk-PDCSW5VX.mjs +46 -0
  81. package/dist/libraries/react/{chunk-4QPHNIQ7.mjs → chunk-RFSQBGLO.mjs} +1 -1
  82. package/dist/libraries/react/{chunk-DRAIZ3UZ.mjs → chunk-T4Z5BKOW.mjs} +3 -3
  83. package/dist/libraries/react/{chunk-OM3ROIZO.mjs → chunk-TL2F3PPG.mjs} +2 -10
  84. package/dist/libraries/react/{chunk-LXD6AEZW.mjs → chunk-V2XCEJ4T.mjs} +3 -2
  85. package/dist/libraries/react/{chunk-3XJ7NFT2.mjs → chunk-VAWI6RK6.mjs} +51 -17
  86. package/dist/libraries/react/{chunk-7DINVACK.mjs → chunk-WSB47D4U.mjs} +2 -2
  87. package/dist/libraries/react/client/ReactAutumnClient.d.mts +6 -5
  88. package/dist/libraries/react/client/ReactAutumnClient.d.ts +6 -5
  89. package/dist/libraries/react/client/ReactAutumnClient.js +173 -99
  90. package/dist/libraries/react/client/ReactAutumnClient.mjs +3 -2
  91. package/dist/libraries/react/client/clientCompMethods.d.mts +6 -5
  92. package/dist/libraries/react/client/clientCompMethods.d.ts +6 -5
  93. package/dist/libraries/react/client/clientCusMethods.d.mts +6 -5
  94. package/dist/libraries/react/client/clientCusMethods.d.ts +6 -5
  95. package/dist/libraries/react/client/clientEntityMethods.d.mts +7 -6
  96. package/dist/libraries/react/client/clientEntityMethods.d.ts +7 -6
  97. package/dist/libraries/react/client/clientGenMethods.d.mts +9 -7
  98. package/dist/libraries/react/client/clientGenMethods.d.ts +9 -7
  99. package/dist/libraries/react/client/clientGenMethods.js +7 -0
  100. package/dist/libraries/react/client/clientGenMethods.mjs +3 -1
  101. package/dist/libraries/react/client/clientProdMethods.d.mts +6 -5
  102. package/dist/libraries/react/client/clientProdMethods.d.ts +6 -5
  103. package/dist/libraries/react/client/clientReferralMethods.d.mts +7 -6
  104. package/dist/libraries/react/client/clientReferralMethods.d.ts +7 -6
  105. package/dist/libraries/react/client/types/clientGenTypes.d.mts +12 -1
  106. package/dist/libraries/react/client/types/clientGenTypes.d.ts +12 -1
  107. package/dist/libraries/react/client/types/clientGenTypes.js +687 -25
  108. package/dist/libraries/react/client/types/clientGenTypes.mjs +8 -0
  109. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.mts +2 -2
  110. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.ts +2 -2
  111. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.js +354 -238
  112. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.mjs +24 -23
  113. package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.mts +2 -2
  114. package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.ts +2 -2
  115. package/dist/libraries/react/components/check-dialog/check-dialog-synced.css +1539 -0
  116. package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.mts +2 -3
  117. package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.ts +2 -3
  118. package/dist/libraries/react/components/check-dialog/check-dialog-synced.js +1489 -16
  119. package/dist/libraries/react/components/check-dialog/check-dialog-synced.mjs +36 -4
  120. package/dist/libraries/react/components/check-dialog/lib/check-content.d.mts +2 -2
  121. package/dist/libraries/react/components/check-dialog/lib/check-content.d.ts +2 -2
  122. package/dist/libraries/react/components/check-dialog/lib/check-content.js +6 -0
  123. package/dist/libraries/react/components/check-dialog/lib/check-content.mjs +1 -1
  124. package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.mts +1 -1
  125. package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.ts +1 -1
  126. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +1 -1
  127. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +1 -1
  128. package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +519 -399
  129. package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +24 -23
  130. package/dist/libraries/react/components/ui/button.d.mts +1 -1
  131. package/dist/libraries/react/components/ui/button.d.ts +1 -1
  132. package/dist/libraries/react/components/ui/dialog.mjs +2 -2
  133. package/dist/libraries/react/cusTypes-DG6zrQYk.d.ts +179 -0
  134. package/dist/libraries/react/cusTypes-DmFGAdnp.d.mts +179 -0
  135. package/dist/libraries/react/entTypes-BbmxlLGb.d.mts +31 -0
  136. package/dist/libraries/react/entTypes-DG9rJhum.d.ts +31 -0
  137. package/dist/libraries/react/{response-C7P_oYqV.d.ts → genTypes-CHD2Kdqf.d.ts} +12 -19
  138. package/dist/libraries/react/{response-dnzFyX91.d.mts → genTypes-CHerQ_Ka.d.mts} +12 -19
  139. package/dist/libraries/react/hooks/helpers/handleCheck.d.mts +31 -0
  140. package/dist/libraries/react/hooks/helpers/handleCheck.d.ts +31 -0
  141. package/dist/libraries/react/hooks/helpers/handleCheck.js +813 -0
  142. package/dist/libraries/react/hooks/helpers/handleCheck.mjs +11 -0
  143. package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +41 -0
  144. package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +41 -0
  145. package/dist/libraries/react/hooks/helpers/useAutumnBase.js +1024 -0
  146. package/dist/libraries/react/hooks/helpers/useAutumnBase.mjs +10 -0
  147. package/dist/libraries/react/hooks/{useDialog.js → helpers/useDialog.js} +1 -1
  148. package/dist/libraries/react/hooks/{useDialog.mjs → helpers/useDialog.mjs} +1 -1
  149. package/dist/libraries/react/hooks/useAnalytics.d.mts +19 -0
  150. package/dist/libraries/react/hooks/useAnalytics.d.ts +19 -0
  151. package/dist/libraries/react/hooks/{useAutumnBase.js → useAnalytics.js} +192 -465
  152. package/dist/libraries/react/hooks/{useAutumnBase.mjs → useAnalytics.mjs} +7 -7
  153. package/dist/libraries/react/hooks/useCustomer.d.mts +8 -6
  154. package/dist/libraries/react/hooks/useCustomer.d.ts +8 -6
  155. package/dist/libraries/react/hooks/useCustomer.js +309 -199
  156. package/dist/libraries/react/hooks/useCustomer.mjs +9 -8
  157. package/dist/libraries/react/hooks/useCustomerBase.d.mts +11 -9
  158. package/dist/libraries/react/hooks/useCustomerBase.d.ts +11 -9
  159. package/dist/libraries/react/hooks/useCustomerBase.js +309 -199
  160. package/dist/libraries/react/hooks/useCustomerBase.mjs +8 -7
  161. package/dist/libraries/react/hooks/useEntity.d.mts +10 -11
  162. package/dist/libraries/react/hooks/useEntity.d.ts +10 -11
  163. package/dist/libraries/react/hooks/useEntity.js +260 -189
  164. package/dist/libraries/react/hooks/useEntity.mjs +9 -8
  165. package/dist/libraries/react/hooks/useEntityBase.d.mts +12 -13
  166. package/dist/libraries/react/hooks/useEntityBase.d.ts +12 -13
  167. package/dist/libraries/react/hooks/useEntityBase.js +300 -229
  168. package/dist/libraries/react/hooks/useEntityBase.mjs +8 -7
  169. package/dist/libraries/react/hooks/usePaywall.d.mts +13 -0
  170. package/dist/libraries/react/hooks/usePaywall.d.ts +13 -0
  171. package/dist/libraries/react/hooks/{useAutumn.js → usePaywall.js} +202 -479
  172. package/dist/libraries/react/hooks/{useAutumn.mjs → usePaywall.mjs} +7 -8
  173. package/dist/libraries/react/hooks/usePricingTable.d.mts +1 -1
  174. package/dist/libraries/react/hooks/usePricingTable.d.ts +1 -1
  175. package/dist/libraries/react/hooks/usePricingTable.js +367 -293
  176. package/dist/libraries/react/hooks/usePricingTable.mjs +6 -5
  177. package/dist/libraries/react/hooks/usePricingTableBase.d.mts +8 -9
  178. package/dist/libraries/react/hooks/usePricingTableBase.d.ts +8 -9
  179. package/dist/libraries/react/hooks/usePricingTableBase.js +167 -467
  180. package/dist/libraries/react/hooks/usePricingTableBase.mjs +2 -12
  181. package/dist/libraries/react/hooks/useProductsBase.d.mts +18 -1
  182. package/dist/libraries/react/hooks/useProductsBase.d.ts +18 -1
  183. package/dist/libraries/react/hooks/useProductsBase.js +11 -947
  184. package/dist/libraries/react/hooks/useProductsBase.mjs +10 -19
  185. package/dist/libraries/react/index.d.mts +213 -53
  186. package/dist/libraries/react/index.d.ts +213 -53
  187. package/dist/libraries/react/index.js +620 -419
  188. package/dist/libraries/react/index.mjs +598 -399
  189. package/dist/libraries/react/prodTypes-Mrr6azoz.d.mts +236 -0
  190. package/dist/libraries/react/prodTypes-Mrr6azoz.d.ts +236 -0
  191. package/dist/next/{AutumnProvider-BKgOhoik.d.mts → AutumnProvider-BGyIGvAS.d.mts} +167 -31
  192. package/dist/next/{AutumnProvider-BKgOhoik.d.ts → AutumnProvider-BGyIGvAS.d.ts} +167 -31
  193. package/dist/next/AutumnProvider.d.mts +1 -1
  194. package/dist/next/AutumnProvider.d.ts +1 -1
  195. package/dist/next/client/NextAutumnClient.d.mts +9 -4
  196. package/dist/next/client/NextAutumnClient.d.ts +9 -4
  197. package/dist/next/client/NextAutumnProvider.d.mts +2 -1
  198. package/dist/next/client/NextAutumnProvider.d.ts +2 -1
  199. package/dist/{libraries/react/attachTypes-DoFoPh8g.d.mts → next/client/attachTypes-DJ4Lz7dN.d.ts} +5 -5
  200. package/dist/next/client/{attachTypes-CJ7OSUSn.d.ts → attachTypes-Hja4wFD-.d.mts} +1 -1
  201. package/dist/next/client/{clientAttachTypes-D84PT2G0.d.mts → clientAttachTypes-Dde-B-ga.d.mts} +9 -2
  202. package/dist/next/client/{clientAttachTypes-D0_L-cnv.d.ts → clientAttachTypes-SPRZ0-u3.d.ts} +9 -2
  203. package/dist/next/client/clientUtils.d.mts +3 -2
  204. package/dist/next/client/clientUtils.d.ts +3 -2
  205. package/dist/next/client/cusTypes-CGQNbPsC.d.ts +179 -0
  206. package/dist/next/client/cusTypes-CkonzuMA.d.mts +179 -0
  207. package/dist/next/client/{entTypes-C-7Uoct9.d.ts → entTypes-BYx5xBXO.d.ts} +1 -1
  208. package/dist/next/client/{entTypes-CXGgMuHO.d.mts → entTypes-DzTUirPM.d.mts} +1 -1
  209. package/dist/next/client/hooks/useAutumn.d.mts +6 -6
  210. package/dist/next/client/hooks/useAutumn.d.ts +6 -6
  211. package/dist/next/client/hooks/useAutumn.js +10 -3
  212. package/dist/next/client/hooks/useAutumn.mjs +10 -3
  213. package/dist/next/client/hooks/useCustomer.d.mts +13 -7
  214. package/dist/next/client/hooks/useCustomer.d.ts +13 -7
  215. package/dist/next/client/hooks/useEntity.d.mts +7 -8
  216. package/dist/next/client/hooks/useEntity.d.ts +7 -8
  217. package/dist/next/client/hooks/usePricingTable.d.mts +1 -1
  218. package/dist/next/client/hooks/usePricingTable.d.ts +1 -1
  219. package/dist/next/client/hooks/usePricingTable.js +6 -2
  220. package/dist/next/client/hooks/usePricingTable.mjs +6 -2
  221. package/dist/next/client/prodTypes-CCk7TL_t.d.mts +227 -0
  222. package/dist/next/client/prodTypes-CCk7TL_t.d.ts +227 -0
  223. package/dist/next/client/types.d.mts +3 -2
  224. package/dist/next/client/types.d.ts +3 -2
  225. package/dist/next/index.d.mts +34 -24
  226. package/dist/next/index.d.ts +34 -24
  227. package/dist/next/server/auth/withNextAuth.d.mts +1 -1
  228. package/dist/next/server/auth/withNextAuth.d.ts +1 -1
  229. package/dist/next/server/componentActions.d.mts +1 -1
  230. package/dist/next/server/componentActions.d.ts +1 -1
  231. package/dist/next/server/cusActions.d.mts +24 -1
  232. package/dist/next/server/cusActions.d.ts +24 -1
  233. package/dist/next/server/{cusTypes-_GDUnrai.d.mts → cusTypes-BpoYhIJ2.d.mts} +168 -32
  234. package/dist/next/server/{cusTypes-_GDUnrai.d.ts → cusTypes-BpoYhIJ2.d.ts} +168 -32
  235. package/dist/next/server/genActions.d.mts +1 -1
  236. package/dist/next/server/genActions.d.ts +1 -1
  237. package/dist/sdk/index.d.mts +193 -24
  238. package/dist/sdk/index.d.ts +193 -24
  239. package/dist/sdk/index.js +111 -56
  240. package/dist/sdk/index.mjs +108 -57
  241. package/dist/utils/encryptUtils.js +167 -99
  242. package/dist/utils/encryptUtils.mjs +167 -99
  243. package/package.json +3 -2
  244. package/tsup.config.ts +1 -11
  245. package/dist/compose/index.d.mts +0 -175
  246. package/dist/compose/index.d.ts +0 -175
  247. package/dist/compose/index.js +0 -78
  248. package/dist/compose/index.mjs +0 -47
  249. package/dist/libraries/react/chunk-3JJC2VU5.mjs +0 -67
  250. package/dist/libraries/react/chunk-KDD5RMQ3.mjs +0 -17
  251. package/dist/libraries/react/chunk-PC6V4RE7.mjs +0 -49
  252. package/dist/libraries/react/cusTypes-COIU0NG3.d.mts +0 -266
  253. package/dist/libraries/react/cusTypes-COIU0NG3.d.ts +0 -266
  254. package/dist/libraries/react/entTypes-BVPtpycG.d.mts +0 -17
  255. package/dist/libraries/react/entTypes-Ck3_WfOz.d.ts +0 -17
  256. package/dist/libraries/react/hooks/handleAllowed.d.mts +0 -15
  257. package/dist/libraries/react/hooks/handleAllowed.d.ts +0 -15
  258. package/dist/libraries/react/hooks/handleAllowed.js +0 -90
  259. package/dist/libraries/react/hooks/handleAllowed.mjs +0 -8
  260. package/dist/libraries/react/hooks/useAutumn.d.mts +0 -35
  261. package/dist/libraries/react/hooks/useAutumn.d.ts +0 -35
  262. package/dist/libraries/react/hooks/useAutumnBase.d.mts +0 -40
  263. package/dist/libraries/react/hooks/useAutumnBase.d.ts +0 -40
  264. package/dist/next/client/cusTypes-DT2ujoSl.d.mts +0 -266
  265. package/dist/next/client/cusTypes-DT2ujoSl.d.ts +0 -266
  266. package/dist/next/client/handleAllowed-B8TBAzfI.d.mts +0 -7
  267. package/dist/next/client/handleAllowed-B8TBAzfI.d.ts +0 -7
  268. package/dist/libraries/react/{chunk-JPLUWGH4.mjs → chunk-W5N4PVQU.mjs} +3 -3
  269. /package/dist/libraries/react/hooks/{useDialog.d.mts → helpers/useDialog.d.mts} +0 -0
  270. /package/dist/libraries/react/hooks/{useDialog.d.ts → helpers/useDialog.d.ts} +0 -0
@@ -42,16 +42,18 @@ __export(pricing_table_synced_exports, {
42
42
  usePricingTableContext: () => usePricingTableContext
43
43
  });
44
44
  module.exports = __toCommonJS(pricing_table_synced_exports);
45
- var import_react10 = __toESM(require("react"));
45
+ var import_react11 = __toESM(require("react"));
46
46
 
47
47
  // src/libraries/react/BaseAutumnProvider.tsx
48
- var import_react3 = require("react");
48
+ var import_react4 = require("react");
49
+ var import_react5 = require("react");
49
50
 
50
- // src/libraries/react/hooks/useDialog.tsx
51
+ // src/libraries/react/hooks/helpers/useDialog.tsx
51
52
  var import_react = require("react");
52
53
 
53
54
  // src/libraries/react/hooks/useCustomerBase.tsx
54
55
  var import_swr2 = __toESM(require("swr"));
56
+ var import_react3 = require("react");
55
57
 
56
58
  // src/libraries/react/errorUtils/logAuthError.ts
57
59
  var logAuthError = async (response) => {
@@ -138,6 +140,12 @@ var handleCheck = async ({
138
140
  }) => {
139
141
  return instance.post("/check", params);
140
142
  };
143
+ var handleQuery = async ({
144
+ instance,
145
+ params
146
+ }) => {
147
+ return instance.post("/query", params);
148
+ };
141
149
 
142
150
  // src/libraries/backend/constants.ts
143
151
  var autumnApiUrl = "https://api.useautumn.com/v1";
@@ -515,60 +523,32 @@ var Autumn = class {
515
523
  params
516
524
  });
517
525
  }
526
+ static query = (params) => staticWrapper(handleQuery, void 0, { params });
527
+ async query(params) {
528
+ return handleQuery({
529
+ instance: this,
530
+ params
531
+ });
532
+ }
518
533
  };
519
534
 
520
- // src/sdk/customers/entities/entTypes.ts
521
- var import_zod = require("zod");
522
- var EntityDataSchema = import_zod.z.object({
523
- name: import_zod.z.string().optional(),
524
- feature_id: import_zod.z.string()
525
- });
526
-
527
- // src/sdk/general/genTypes.ts
528
- var import_zod2 = require("zod");
529
- var CancelParamsSchema = import_zod2.z.object({
530
- customer_id: import_zod2.z.string(),
531
- product_id: import_zod2.z.string(),
532
- entity_id: import_zod2.z.string().optional(),
533
- cancel_immediately: import_zod2.z.boolean().optional()
534
- });
535
- var CancelResultSchema = import_zod2.z.object({
536
- success: import_zod2.z.boolean(),
537
- customer_id: import_zod2.z.string(),
538
- product_id: import_zod2.z.string()
539
- });
540
- var TrackParamsSchema = import_zod2.z.object({
541
- customer_id: import_zod2.z.string(),
542
- value: import_zod2.z.number().optional(),
543
- feature_id: import_zod2.z.string().optional(),
544
- event_name: import_zod2.z.string().optional(),
545
- entity_id: import_zod2.z.string().optional(),
546
- customer_data: import_zod2.z.any().optional(),
547
- idempotency_key: import_zod2.z.string().optional(),
548
- entity_data: import_zod2.z.any().optional()
549
- });
550
- var TrackResultSchema = import_zod2.z.object({
551
- id: import_zod2.z.string(),
552
- code: import_zod2.z.string(),
553
- customer_id: import_zod2.z.string(),
554
- feature_id: import_zod2.z.string().optional(),
555
- event_name: import_zod2.z.string().optional()
556
- });
557
- var CheckParamsSchema = import_zod2.z.object({
558
- customer_id: import_zod2.z.string(),
559
- feature_id: import_zod2.z.string().optional(),
560
- product_id: import_zod2.z.string().optional(),
561
- entity_id: import_zod2.z.string().optional(),
562
- customer_data: import_zod2.z.any().optional(),
563
- required_balance: import_zod2.z.number().optional(),
564
- send_event: import_zod2.z.boolean().optional(),
565
- with_preview: import_zod2.z.boolean().optional(),
566
- entity_data: EntityDataSchema.optional()
567
- });
535
+ // src/sdk/products/prodEnums.ts
536
+ var ProductItemInterval = /* @__PURE__ */ ((ProductItemInterval2) => {
537
+ ProductItemInterval2["Minute"] = "minute";
538
+ ProductItemInterval2["Hour"] = "hour";
539
+ ProductItemInterval2["Day"] = "day";
540
+ ProductItemInterval2["Week"] = "week";
541
+ ProductItemInterval2["Month"] = "month";
542
+ ProductItemInterval2["Quarter"] = "quarter";
543
+ ProductItemInterval2["SemiAnnual"] = "semi_annual";
544
+ ProductItemInterval2["Year"] = "year";
545
+ ProductItemInterval2["Multiple"] = "multiple";
546
+ return ProductItemInterval2;
547
+ })(ProductItemInterval || {});
568
548
 
569
549
  // src/sdk/customers/cusEnums.ts
570
- var import_zod3 = require("zod");
571
- var CustomerExpandEnum = import_zod3.z.enum([
550
+ var import_zod = require("zod");
551
+ var CustomerExpandEnum = import_zod.z.enum([
572
552
  "invoices",
573
553
  "rewards",
574
554
  "trials_used",
@@ -578,71 +558,161 @@ var CustomerExpandEnum = import_zod3.z.enum([
578
558
  ]);
579
559
 
580
560
  // src/sdk/customers/cusTypes.ts
581
- var import_zod4 = require("zod");
582
- var CustomerDataSchema = import_zod4.z.object({
583
- name: import_zod4.z.string().nullish(),
584
- email: import_zod4.z.string().nullish(),
585
- fingerprint: import_zod4.z.string().nullish()
561
+ var import_zod2 = require("zod");
562
+ var CoreCusFeatureSchema = import_zod2.z.object({
563
+ unlimited: import_zod2.z.boolean().optional(),
564
+ interval: import_zod2.z.nativeEnum(ProductItemInterval).optional(),
565
+ balance: import_zod2.z.number().optional(),
566
+ usage: import_zod2.z.number().optional(),
567
+ included_usage: import_zod2.z.number().optional(),
568
+ next_reset_at: import_zod2.z.number().optional(),
569
+ overage_allowed: import_zod2.z.boolean().optional(),
570
+ usage_limit: import_zod2.z.number().optional(),
571
+ breakdown: import_zod2.z.array(
572
+ import_zod2.z.object({
573
+ interval: import_zod2.z.nativeEnum(ProductItemInterval),
574
+ balance: import_zod2.z.number().optional(),
575
+ usage: import_zod2.z.number().optional(),
576
+ included_usage: import_zod2.z.number().optional(),
577
+ next_reset_at: import_zod2.z.number().optional()
578
+ })
579
+ ).optional(),
580
+ credit_schema: import_zod2.z.array(
581
+ import_zod2.z.object({
582
+ feature_id: import_zod2.z.string(),
583
+ credit_amount: import_zod2.z.number()
584
+ })
585
+ ).optional()
586
586
  });
587
- var CreateCustomerParamsSchema = import_zod4.z.object({
588
- id: import_zod4.z.string().nullish(),
589
- email: import_zod4.z.string().nullish(),
590
- name: import_zod4.z.string().nullish(),
591
- fingerprint: import_zod4.z.string().nullish(),
592
- metadata: import_zod4.z.record(import_zod4.z.any()).optional(),
593
- expand: import_zod4.z.array(CustomerExpandEnum).optional()
587
+ var CustomerDataSchema = import_zod2.z.object({
588
+ name: import_zod2.z.string().nullish(),
589
+ email: import_zod2.z.string().nullish(),
590
+ fingerprint: import_zod2.z.string().nullish()
594
591
  });
595
- var BillingPortalParamsSchema = import_zod4.z.object({
596
- return_url: import_zod4.z.string().optional()
592
+ var CreateCustomerParamsSchema = import_zod2.z.object({
593
+ id: import_zod2.z.string().nullish(),
594
+ email: import_zod2.z.string().nullish(),
595
+ name: import_zod2.z.string().nullish(),
596
+ fingerprint: import_zod2.z.string().nullish(),
597
+ metadata: import_zod2.z.record(import_zod2.z.any()).optional(),
598
+ expand: import_zod2.z.array(CustomerExpandEnum).optional()
599
+ });
600
+ var BillingPortalParamsSchema = import_zod2.z.object({
601
+ return_url: import_zod2.z.string().optional()
597
602
  });
598
603
 
599
- // src/sdk/referrals/referralTypes.ts
604
+ // src/sdk/general/checkTypes.ts
605
+ var import_zod3 = require("zod");
606
+ var CheckFeatureResultSchema = import_zod3.z.object({
607
+ allowed: import_zod3.z.boolean(),
608
+ feature_id: import_zod3.z.string(),
609
+ customer_id: import_zod3.z.string(),
610
+ entity_id: import_zod3.z.string().optional(),
611
+ required_balance: import_zod3.z.number()
612
+ }).extend(CoreCusFeatureSchema.shape);
613
+
614
+ // src/sdk/customers/entities/entTypes.ts
615
+ var import_zod4 = require("zod");
616
+ var EntityDataSchema = import_zod4.z.object({
617
+ name: import_zod4.z.string().optional(),
618
+ feature_id: import_zod4.z.string()
619
+ });
620
+
621
+ // src/sdk/general/genTypes.ts
600
622
  var import_zod5 = require("zod");
601
- var CreateReferralCodeParamsSchema = import_zod5.z.object({
623
+ var CancelParamsSchema = import_zod5.z.object({
602
624
  customer_id: import_zod5.z.string(),
603
- program_id: import_zod5.z.string()
625
+ product_id: import_zod5.z.string(),
626
+ entity_id: import_zod5.z.string().optional(),
627
+ cancel_immediately: import_zod5.z.boolean().optional()
604
628
  });
605
- var RedeemReferralCodeParamsSchema = import_zod5.z.object({
629
+ var CancelResultSchema = import_zod5.z.object({
630
+ success: import_zod5.z.boolean(),
631
+ customer_id: import_zod5.z.string(),
632
+ product_id: import_zod5.z.string()
633
+ });
634
+ var TrackParamsSchema = import_zod5.z.object({
635
+ customer_id: import_zod5.z.string(),
636
+ value: import_zod5.z.number().optional(),
637
+ feature_id: import_zod5.z.string().optional(),
638
+ event_name: import_zod5.z.string().optional(),
639
+ entity_id: import_zod5.z.string().optional(),
640
+ customer_data: import_zod5.z.any().optional(),
641
+ idempotency_key: import_zod5.z.string().optional(),
642
+ entity_data: import_zod5.z.any().optional()
643
+ });
644
+ var TrackResultSchema = import_zod5.z.object({
645
+ id: import_zod5.z.string(),
606
646
  code: import_zod5.z.string(),
607
- customer_id: import_zod5.z.string()
647
+ customer_id: import_zod5.z.string(),
648
+ feature_id: import_zod5.z.string().optional(),
649
+ event_name: import_zod5.z.string().optional()
650
+ });
651
+ var CheckParamsSchema = import_zod5.z.object({
652
+ customer_id: import_zod5.z.string(),
653
+ feature_id: import_zod5.z.string().optional(),
654
+ product_id: import_zod5.z.string().optional(),
655
+ entity_id: import_zod5.z.string().optional(),
656
+ customer_data: import_zod5.z.any().optional(),
657
+ required_balance: import_zod5.z.number().optional(),
658
+ send_event: import_zod5.z.boolean().optional(),
659
+ with_preview: import_zod5.z.boolean().optional(),
660
+ entity_data: EntityDataSchema.optional()
661
+ });
662
+ var QueryRangeEnum = import_zod5.z.enum(["24h", "7d", "30d", "90d", "last_cycle"]);
663
+ var QueryParamsSchema = import_zod5.z.object({
664
+ customer_id: import_zod5.z.string(),
665
+ feature_id: import_zod5.z.string().or(import_zod5.z.array(import_zod5.z.string())),
666
+ range: QueryRangeEnum.optional()
608
667
  });
609
668
 
610
- // src/sdk/general/attachTypes.ts
669
+ // src/sdk/referrals/referralTypes.ts
611
670
  var import_zod6 = require("zod");
612
- var AttachFeatureOptionsSchema = import_zod6.z.object({
613
- feature_id: import_zod6.z.string(),
614
- quantity: import_zod6.z.number()
615
- });
616
- var AttachParamsSchema = import_zod6.z.object({
671
+ var CreateReferralCodeParamsSchema = import_zod6.z.object({
617
672
  customer_id: import_zod6.z.string(),
618
- product_id: import_zod6.z.string().optional(),
619
- entity_id: import_zod6.z.string().optional(),
620
- options: import_zod6.z.array(AttachFeatureOptionsSchema).optional(),
621
- product_ids: import_zod6.z.array(import_zod6.z.string()).optional(),
622
- free_trial: import_zod6.z.boolean().optional(),
623
- success_url: import_zod6.z.string().optional(),
624
- metadata: import_zod6.z.record(import_zod6.z.string()).optional(),
625
- force_checkout: import_zod6.z.boolean().optional(),
626
- customer_data: CustomerDataSchema.optional(),
627
- entity_data: import_zod6.z.any().optional(),
628
- checkout_session_params: import_zod6.z.record(import_zod6.z.any()).optional(),
629
- reward: import_zod6.z.string().optional()
673
+ program_id: import_zod6.z.string()
630
674
  });
631
- var AttachResultSchema = import_zod6.z.object({
632
- checkout_url: import_zod6.z.string().optional(),
633
- customer_id: import_zod6.z.string(),
634
- product_ids: import_zod6.z.array(import_zod6.z.string()),
675
+ var RedeemReferralCodeParamsSchema = import_zod6.z.object({
635
676
  code: import_zod6.z.string(),
636
- message: import_zod6.z.string(),
637
- customer_data: import_zod6.z.any().optional()
677
+ customer_id: import_zod6.z.string()
638
678
  });
639
- var CheckoutParamsSchema = import_zod6.z.object({
640
- customer_id: import_zod6.z.string(),
641
- product_id: import_zod6.z.string(),
642
- entity_id: import_zod6.z.string().optional(),
643
- success_url: import_zod6.z.string().optional(),
679
+
680
+ // src/sdk/general/attachTypes.ts
681
+ var import_zod7 = require("zod");
682
+ var AttachFeatureOptionsSchema = import_zod7.z.object({
683
+ feature_id: import_zod7.z.string(),
684
+ quantity: import_zod7.z.number()
685
+ });
686
+ var AttachParamsSchema = import_zod7.z.object({
687
+ customer_id: import_zod7.z.string(),
688
+ product_id: import_zod7.z.string().optional(),
689
+ entity_id: import_zod7.z.string().optional(),
690
+ options: import_zod7.z.array(AttachFeatureOptionsSchema).optional(),
691
+ product_ids: import_zod7.z.array(import_zod7.z.string()).optional(),
692
+ free_trial: import_zod7.z.boolean().optional(),
693
+ success_url: import_zod7.z.string().optional(),
694
+ metadata: import_zod7.z.record(import_zod7.z.string()).optional(),
695
+ force_checkout: import_zod7.z.boolean().optional(),
644
696
  customer_data: CustomerDataSchema.optional(),
645
- options: import_zod6.z.array(AttachFeatureOptionsSchema).optional()
697
+ entity_data: import_zod7.z.any().optional(),
698
+ checkout_session_params: import_zod7.z.record(import_zod7.z.any()).optional(),
699
+ reward: import_zod7.z.string().optional()
700
+ });
701
+ var AttachResultSchema = import_zod7.z.object({
702
+ checkout_url: import_zod7.z.string().optional(),
703
+ customer_id: import_zod7.z.string(),
704
+ product_ids: import_zod7.z.array(import_zod7.z.string()),
705
+ code: import_zod7.z.string(),
706
+ message: import_zod7.z.string(),
707
+ customer_data: import_zod7.z.any().optional()
708
+ });
709
+ var CheckoutParamsSchema = import_zod7.z.object({
710
+ customer_id: import_zod7.z.string(),
711
+ product_id: import_zod7.z.string(),
712
+ entity_id: import_zod7.z.string().optional(),
713
+ success_url: import_zod7.z.string().optional(),
714
+ customer_data: CustomerDataSchema.optional(),
715
+ options: import_zod7.z.array(AttachFeatureOptionsSchema).optional()
646
716
  });
647
717
 
648
718
  // src/libraries/react/errorUtils/logFetchError.ts
@@ -756,6 +826,11 @@ async function openBillingPortalMethod(params) {
756
826
  const res = await this.post(`${this.prefix}/billing_portal`, snakeParams);
757
827
  return res;
758
828
  }
829
+ async function queryMethod(params) {
830
+ let snakeParams = toSnakeCase(params);
831
+ const res = await this.post(`${this.prefix}/query`, snakeParams);
832
+ return res;
833
+ }
759
834
 
760
835
  // src/libraries/react/client/clientProdMethods.ts
761
836
  async function listProductsMethod() {
@@ -939,6 +1014,7 @@ var AutumnClient = class {
939
1014
  track = trackMethod.bind(this);
940
1015
  openBillingPortal = openBillingPortalMethod.bind(this);
941
1016
  setupPayment = setupPaymentMethod.bind(this);
1017
+ query = queryMethod.bind(this);
942
1018
  entities = {
943
1019
  create: createEntityMethod.bind(this),
944
1020
  get: getEntityMethod.bind(this),
@@ -978,7 +1054,8 @@ var AutumnContext = (0, import_react2.createContext)({
978
1054
  },
979
1055
  setComponent: () => {
980
1056
  }
981
- }
1057
+ },
1058
+ paywallRef: { current: null }
982
1059
  });
983
1060
  var useAutumnContext = ({
984
1061
  AutumnContext: AutumnContext2,
@@ -1153,14 +1230,9 @@ var defaultSWRConfig = {
1153
1230
  refreshInterval: 0
1154
1231
  };
1155
1232
  var usePricingTableBase = ({
1156
- AutumnContext: AutumnContext2,
1233
+ client,
1157
1234
  params
1158
1235
  }) => {
1159
- const context = useAutumnContext({
1160
- AutumnContext: AutumnContext2,
1161
- name: "usePricingTable"
1162
- });
1163
- const client = context.client;
1164
1236
  const fetcher = async () => {
1165
1237
  try {
1166
1238
  const { data: data2, error: error2 } = await client.products.list();
@@ -1186,31 +1258,15 @@ var usePricingTableBase = ({
1186
1258
  };
1187
1259
  };
1188
1260
 
1189
- // src/libraries/react/hooks/useAutumnBase.tsx
1261
+ // src/libraries/react/hooks/helpers/useAutumnBase.tsx
1190
1262
  var useAutumnBase = ({
1191
- AutumnContext: AutumnContext2,
1263
+ // AutumnContext,
1264
+ context,
1265
+ client,
1192
1266
  refetchCustomer
1193
1267
  }) => {
1194
- const context = useAutumnContext({
1195
- AutumnContext: AutumnContext2,
1196
- name: "useAutumn"
1197
- });
1198
- const { attachDialog, paywallDialog } = context;
1199
- const client = context.client;
1200
- const { refetch: refetchPricingTable } = usePricingTableBase({
1201
- AutumnContext: AutumnContext2
1202
- });
1203
- let {
1204
- open: attachOpen,
1205
- setProps: setAttachProps,
1206
- setOpen: setAttachOpen,
1207
- setComponent: setAttachComponent
1208
- } = attachDialog;
1209
- let {
1210
- setProps: setCheckProps,
1211
- setOpen: setCheckOpen,
1212
- setComponent: setPaywallComponent
1213
- } = paywallDialog;
1268
+ const { attachDialog, paywallDialog } = context || {};
1269
+ const { refetch: refetchPricingTable } = usePricingTableBase({ client });
1214
1270
  const attachWithoutDialog = async (params) => {
1215
1271
  const result = await client.attach(params);
1216
1272
  if (result.error) {
@@ -1228,9 +1284,7 @@ var useAutumnBase = ({
1228
1284
  if (refetchCustomer) {
1229
1285
  await refetchCustomer();
1230
1286
  }
1231
- if (setAttachOpen) {
1232
- setAttachOpen(false);
1233
- }
1287
+ attachDialog?.setOpen(false);
1234
1288
  return result;
1235
1289
  };
1236
1290
  const checkout = async (params) => {
@@ -1248,9 +1302,9 @@ var useAutumnBase = ({
1248
1302
  return { data, error };
1249
1303
  }
1250
1304
  if (params.dialog) {
1251
- setAttachProps({ checkoutResult: data, attachParams: rest });
1252
- setAttachComponent(params.dialog);
1253
- setAttachOpen(true);
1305
+ attachDialog?.setProps({ checkoutResult: data, attachParams: rest });
1306
+ attachDialog?.setComponent(params.dialog);
1307
+ attachDialog?.setOpen(true);
1254
1308
  }
1255
1309
  return { data, error };
1256
1310
  };
@@ -1270,16 +1324,15 @@ var useAutumnBase = ({
1270
1324
  if (!preview) {
1271
1325
  return await attachWithoutDialog(rest);
1272
1326
  } else {
1273
- setAttachProps({ preview, attachParams: rest });
1274
- setAttachOpen(true);
1327
+ attachDialog?.setProps({ preview, attachParams: rest });
1328
+ attachDialog?.setOpen(true);
1275
1329
  }
1276
1330
  return checkRes;
1277
1331
  };
1278
1332
  const attach = async (params) => {
1279
1333
  const { dialog } = params;
1280
- let finalDialog = dialog;
1281
- if (finalDialog && !attachOpen) {
1282
- setAttachComponent(finalDialog);
1334
+ if (dialog && !attachDialog?.open) {
1335
+ attachDialog?.setComponent(dialog);
1283
1336
  return await attachWithDialog(params);
1284
1337
  }
1285
1338
  return await attachWithoutDialog(params);
@@ -1291,26 +1344,6 @@ var useAutumnBase = ({
1291
1344
  }
1292
1345
  return res;
1293
1346
  };
1294
- const check = async (params) => {
1295
- let { dialog, withPreview } = params;
1296
- if (dialog) {
1297
- setPaywallComponent(dialog);
1298
- }
1299
- const res = await client.check({
1300
- ...params,
1301
- withPreview: withPreview || dialog ? true : false
1302
- });
1303
- if (res.error) {
1304
- return res;
1305
- }
1306
- let data = res.data;
1307
- if (data && data.preview && dialog) {
1308
- let preview = data.preview;
1309
- setCheckProps({ preview });
1310
- setCheckOpen(true);
1311
- }
1312
- return res;
1313
- };
1314
1347
  const track = async (params) => {
1315
1348
  const res = await client.track(params);
1316
1349
  if (res.error) {
@@ -1364,7 +1397,7 @@ var useAutumnBase = ({
1364
1397
  };
1365
1398
  return {
1366
1399
  attach,
1367
- check,
1400
+ // check,
1368
1401
  track,
1369
1402
  cancel,
1370
1403
  openBillingPortal,
@@ -1373,7 +1406,7 @@ var useAutumnBase = ({
1373
1406
  };
1374
1407
  };
1375
1408
 
1376
- // src/libraries/react/hooks/handleAllowed.ts
1409
+ // src/libraries/react/hooks/helpers/handleCheck.ts
1377
1410
  var getCusFeature = ({
1378
1411
  customer,
1379
1412
  featureId,
@@ -1396,14 +1429,10 @@ var getCusFeature = ({
1396
1429
  requiredBalance
1397
1430
  };
1398
1431
  };
1399
- var handleFeatureAllowed = ({
1400
- customer,
1401
- params
1432
+ var getFeatureAllowed = ({
1433
+ cusFeature,
1434
+ requiredBalance
1402
1435
  }) => {
1403
- let { cusFeature, requiredBalance } = getCusFeature({
1404
- customer,
1405
- featureId: params.featureId
1406
- });
1407
1436
  if (!cusFeature) return false;
1408
1437
  if (cusFeature.type == "static") return true;
1409
1438
  if (cusFeature.unlimited || cusFeature.overage_allowed) return true;
@@ -1413,37 +1442,97 @@ var handleFeatureAllowed = ({
1413
1442
  }
1414
1443
  return (cusFeature.balance || 0) >= requiredBalance;
1415
1444
  };
1416
- var handleAllowed = ({
1445
+ var handleFeatureCheck = ({
1417
1446
  customer,
1447
+ isEntity,
1418
1448
  params
1419
1449
  }) => {
1420
- if (!customer) return false;
1421
- if (!params.featureId && !params.productId) {
1422
- throw new Error("allowed() requires either featureId or productId");
1450
+ let { cusFeature, requiredBalance } = getCusFeature({
1451
+ customer,
1452
+ featureId: params.featureId
1453
+ });
1454
+ let allowed = getFeatureAllowed({ cusFeature, requiredBalance });
1455
+ let result = {
1456
+ allowed,
1457
+ feature_id: params.featureId,
1458
+ customer_id: isEntity ? customer.customer_id : customer.id,
1459
+ required_balance: requiredBalance,
1460
+ ...cusFeature
1461
+ };
1462
+ if (isEntity) {
1463
+ result.entity_id = customer.id;
1464
+ }
1465
+ return CheckFeatureResultSchema.parse(result);
1466
+ };
1467
+ var handleProductCheck = ({
1468
+ customer,
1469
+ isEntity,
1470
+ params
1471
+ }) => {
1472
+ let product = customer.products.find((p) => p.id == params.productId);
1473
+ let allowed = product?.status === "active";
1474
+ let result = {
1475
+ allowed,
1476
+ customer_id: isEntity ? customer.customer_id : customer.id,
1477
+ product_id: params.productId
1478
+ };
1479
+ if (product) {
1480
+ result.status = product.status;
1423
1481
  }
1424
- if (params.featureId) {
1425
- return handleFeatureAllowed({ customer, params });
1482
+ if (isEntity) {
1483
+ result.entity_id = customer.id;
1426
1484
  }
1427
- if (params.productId) {
1428
- let product = customer.products.find((p) => p.id == params.productId);
1429
- if (!product) return false;
1430
- let status = product.status;
1431
- if (status == "scheduled") return false;
1432
- return true;
1485
+ return result;
1486
+ };
1487
+ var openDialog = ({
1488
+ result,
1489
+ params,
1490
+ context
1491
+ }) => {
1492
+ let open = result.allowed === false && params.dialog && context;
1493
+ if (!open) return;
1494
+ const isInRenderCycle = (() => {
1495
+ const stack = new Error().stack || "";
1496
+ return stack.includes("renderWithHooks") || stack.includes("updateFunctionComponent") || stack.includes("beginWork") || stack.includes("performUnitOfWork") || stack.includes("workLoop") || stack.includes("Component.render") || stack.includes("FunctionComponent");
1497
+ })();
1498
+ if (isInRenderCycle) {
1499
+ context.paywallRef.current = {
1500
+ component: params.dialog,
1501
+ open: true,
1502
+ props: params
1503
+ };
1504
+ } else {
1505
+ context.paywallDialog.setComponent(params.dialog);
1506
+ context.paywallDialog.setProps(params);
1507
+ context.paywallDialog.setOpen(true);
1433
1508
  }
1434
- return false;
1509
+ };
1510
+ var handleCheck2 = ({
1511
+ customer,
1512
+ isEntity,
1513
+ params,
1514
+ context
1515
+ }) => {
1516
+ if (!customer) {
1517
+ return {
1518
+ allowed: false,
1519
+ feature_id: "",
1520
+ customer_id: "",
1521
+ required_balance: 0
1522
+ };
1523
+ }
1524
+ if (!params.featureId && !params.productId) {
1525
+ throw new Error("allowed() requires either featureId or productId");
1526
+ }
1527
+ let result;
1528
+ if (params.featureId)
1529
+ result = handleFeatureCheck({ customer, params, isEntity });
1530
+ if (params.productId)
1531
+ result = handleProductCheck({ customer, params, isEntity });
1532
+ return result;
1435
1533
  };
1436
1534
 
1437
1535
  // src/libraries/react/hooks/useCustomerBase.tsx
1438
- var emptyDefaultFunctions = {
1439
- attach: "",
1440
- check: "",
1441
- track: "",
1442
- cancel: "",
1443
- openBillingPortal: "",
1444
- setupPayment: "",
1445
- checkout: ""
1446
- };
1447
1536
  var useCustomerBase = ({
1448
1537
  params,
1449
1538
  AutumnContext: AutumnContext2,
@@ -1454,7 +1543,6 @@ var useCustomerBase = ({
1454
1543
  context = useAutumnContext({
1455
1544
  AutumnContext: AutumnContext2,
1456
1545
  name: "useCustomer"
1457
- // errorIfNotInitialized: !authClientExists,
1458
1546
  });
1459
1547
  }
1460
1548
  if (!client) {
@@ -1484,13 +1572,13 @@ var useCustomerBase = ({
1484
1572
  fallbackData: null,
1485
1573
  ...params?.swrConfig
1486
1574
  });
1487
- let autumnFunctions = emptyDefaultFunctions;
1488
- if (AutumnContext2) {
1489
- autumnFunctions = useAutumnBase({
1490
- AutumnContext: AutumnContext2,
1491
- refetchCustomer: mutate
1492
- });
1493
- }
1575
+ const autumnFunctions = useAutumnBase({
1576
+ context,
1577
+ client,
1578
+ refetchCustomer: mutate
1579
+ });
1580
+ (0, import_react3.useEffect)(() => {
1581
+ }, [context?.paywallRef.current]);
1494
1582
  return {
1495
1583
  customer: error ? null : customer,
1496
1584
  isLoading,
@@ -1500,7 +1588,30 @@ var useCustomerBase = ({
1500
1588
  createEntity: client.entities.create,
1501
1589
  createReferralCode: client.referrals.createCode,
1502
1590
  redeemReferralCode: client.referrals.redeemCode,
1503
- allowed: (params2) => handleAllowed({ customer, params: params2 })
1591
+ check: (params2) => {
1592
+ const result = handleCheck2({
1593
+ customer,
1594
+ params: params2,
1595
+ isEntity: false,
1596
+ context
1597
+ });
1598
+ openDialog({
1599
+ result,
1600
+ params: params2,
1601
+ context
1602
+ });
1603
+ return result;
1604
+ },
1605
+ /** @deprecated Use check() instead */
1606
+ allowed: (params2) => {
1607
+ const result = handleCheck2({
1608
+ customer,
1609
+ params: params2,
1610
+ isEntity: false,
1611
+ context
1612
+ });
1613
+ return result.allowed;
1614
+ }
1504
1615
  };
1505
1616
  };
1506
1617
 
@@ -1520,19 +1631,29 @@ var useCustomer = (params) => {
1520
1631
 
1521
1632
  // src/libraries/react/hooks/usePricingTable.tsx
1522
1633
  var usePricingTable = (params) => {
1523
- return usePricingTableBase({
1634
+ const context = useAutumnContext({
1524
1635
  AutumnContext,
1636
+ name: "usePricingTable"
1637
+ });
1638
+ return usePricingTableBase({
1639
+ client: context.client,
1525
1640
  params
1526
1641
  });
1527
1642
  };
1528
1643
 
1529
1644
  // src/libraries/react/hooks/useEntityBase.tsx
1530
1645
  var import_swr3 = __toESM(require("swr"));
1531
- var import_react4 = require("react");
1646
+ var import_react6 = require("react");
1647
+
1648
+ // src/libraries/react/hooks/useAnalytics.tsx
1649
+ var import_swr4 = __toESM(require("swr"));
1650
+
1651
+ // src/libraries/react/hooks/usePaywall.tsx
1652
+ var import_swr5 = __toESM(require("swr"));
1532
1653
 
1533
1654
  // src/libraries/react/components/attach-dialog/attach-dialog-synced.tsx
1534
1655
  var AccordionPrimitive2 = __toESM(require("@radix-ui/react-accordion"));
1535
- var import_react8 = require("react");
1656
+ var import_react10 = require("react");
1536
1657
 
1537
1658
  // ../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
1538
1659
  function r(e) {
@@ -4060,13 +4181,13 @@ function cn(...inputs) {
4060
4181
  }
4061
4182
 
4062
4183
  // src/libraries/react/components/ui/button.tsx
4063
- var React3 = __toESM(require("react"));
4184
+ var React5 = __toESM(require("react"));
4064
4185
 
4065
4186
  // ../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs
4066
- var React2 = __toESM(require("react"), 1);
4187
+ var React4 = __toESM(require("react"), 1);
4067
4188
 
4068
4189
  // ../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
4069
- var React = __toESM(require("react"), 1);
4190
+ var React3 = __toESM(require("react"), 1);
4070
4191
  function setRef(ref, value) {
4071
4192
  if (typeof ref === "function") {
4072
4193
  return ref(value);
@@ -4099,7 +4220,7 @@ function composeRefs(...refs) {
4099
4220
  };
4100
4221
  }
4101
4222
  function useComposedRefs(...refs) {
4102
- return React.useCallback(composeRefs(...refs), refs);
4223
+ return React3.useCallback(composeRefs(...refs), refs);
4103
4224
  }
4104
4225
 
4105
4226
  // ../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs
@@ -4107,21 +4228,21 @@ var import_jsx_runtime3 = require("react/jsx-runtime");
4107
4228
  // @__NO_SIDE_EFFECTS__
4108
4229
  function createSlot(ownerName) {
4109
4230
  const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
4110
- const Slot22 = React2.forwardRef((props, forwardedRef) => {
4231
+ const Slot22 = React4.forwardRef((props, forwardedRef) => {
4111
4232
  const { children, ...slotProps } = props;
4112
- const childrenArray = React2.Children.toArray(children);
4233
+ const childrenArray = React4.Children.toArray(children);
4113
4234
  const slottable = childrenArray.find(isSlottable);
4114
4235
  if (slottable) {
4115
4236
  const newElement = slottable.props.children;
4116
4237
  const newChildren = childrenArray.map((child) => {
4117
4238
  if (child === slottable) {
4118
- if (React2.Children.count(newElement) > 1) return React2.Children.only(null);
4119
- return React2.isValidElement(newElement) ? newElement.props.children : null;
4239
+ if (React4.Children.count(newElement) > 1) return React4.Children.only(null);
4240
+ return React4.isValidElement(newElement) ? newElement.props.children : null;
4120
4241
  } else {
4121
4242
  return child;
4122
4243
  }
4123
4244
  });
4124
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React2.isValidElement(newElement) ? React2.cloneElement(newElement, void 0, newChildren) : null });
4245
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React4.isValidElement(newElement) ? React4.cloneElement(newElement, void 0, newChildren) : null });
4125
4246
  }
4126
4247
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
4127
4248
  });
@@ -4131,24 +4252,24 @@ function createSlot(ownerName) {
4131
4252
  var Slot = /* @__PURE__ */ createSlot("Slot");
4132
4253
  // @__NO_SIDE_EFFECTS__
4133
4254
  function createSlotClone(ownerName) {
4134
- const SlotClone = React2.forwardRef((props, forwardedRef) => {
4255
+ const SlotClone = React4.forwardRef((props, forwardedRef) => {
4135
4256
  const { children, ...slotProps } = props;
4136
- if (React2.isValidElement(children)) {
4257
+ if (React4.isValidElement(children)) {
4137
4258
  const childrenRef = getElementRef(children);
4138
4259
  const props2 = mergeProps(slotProps, children.props);
4139
- if (children.type !== React2.Fragment) {
4260
+ if (children.type !== React4.Fragment) {
4140
4261
  props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
4141
4262
  }
4142
- return React2.cloneElement(children, props2);
4263
+ return React4.cloneElement(children, props2);
4143
4264
  }
4144
- return React2.Children.count(children) > 1 ? React2.Children.only(null) : null;
4265
+ return React4.Children.count(children) > 1 ? React4.Children.only(null) : null;
4145
4266
  });
4146
4267
  SlotClone.displayName = `${ownerName}.SlotClone`;
4147
4268
  return SlotClone;
4148
4269
  }
4149
4270
  var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
4150
4271
  function isSlottable(child) {
4151
- return React2.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
4272
+ return React4.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
4152
4273
  }
4153
4274
  function mergeProps(slotProps, childProps) {
4154
4275
  const overrideProps = { ...childProps };
@@ -4257,7 +4378,7 @@ var buttonVariants = cva(
4257
4378
  }
4258
4379
  }
4259
4380
  );
4260
- var Button = React3.forwardRef(
4381
+ var Button = React5.forwardRef(
4261
4382
  ({ className, variant, size, asChild = false, ...props }, ref) => {
4262
4383
  const Comp = asChild ? Slot : "button";
4263
4384
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
@@ -4273,10 +4394,10 @@ var Button = React3.forwardRef(
4273
4394
  Button.displayName = "Button";
4274
4395
 
4275
4396
  // src/libraries/react/components/ui/dialog.tsx
4276
- var React26 = __toESM(require("react"));
4397
+ var React28 = __toESM(require("react"));
4277
4398
 
4278
4399
  // ../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@19.1.6_@types+react@19.1.8__@types+react@19.1._xkx6efnpqhhb4lkirxfs4qofci/node_modules/@radix-ui/react-dialog/dist/index.mjs
4279
- var React25 = __toESM(require("react"), 1);
4400
+ var React27 = __toESM(require("react"), 1);
4280
4401
 
4281
4402
  // ../node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.mjs
4282
4403
  function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
@@ -4289,18 +4410,18 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
4289
4410
  }
4290
4411
 
4291
4412
  // ../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.mjs
4292
- var React4 = __toESM(require("react"), 1);
4413
+ var React6 = __toESM(require("react"), 1);
4293
4414
  var import_jsx_runtime5 = require("react/jsx-runtime");
4294
4415
  function createContext22(rootComponentName, defaultContext) {
4295
- const Context = React4.createContext(defaultContext);
4416
+ const Context = React6.createContext(defaultContext);
4296
4417
  const Provider = (props) => {
4297
4418
  const { children, ...context } = props;
4298
- const value = React4.useMemo(() => context, Object.values(context));
4419
+ const value = React6.useMemo(() => context, Object.values(context));
4299
4420
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Context.Provider, { value, children });
4300
4421
  };
4301
4422
  Provider.displayName = rootComponentName + "Provider";
4302
4423
  function useContext22(consumerName) {
4303
- const context = React4.useContext(Context);
4424
+ const context = React6.useContext(Context);
4304
4425
  if (context) return context;
4305
4426
  if (defaultContext !== void 0) return defaultContext;
4306
4427
  throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
@@ -4310,19 +4431,19 @@ function createContext22(rootComponentName, defaultContext) {
4310
4431
  function createContextScope(scopeName, createContextScopeDeps = []) {
4311
4432
  let defaultContexts = [];
4312
4433
  function createContext32(rootComponentName, defaultContext) {
4313
- const BaseContext = React4.createContext(defaultContext);
4434
+ const BaseContext = React6.createContext(defaultContext);
4314
4435
  const index = defaultContexts.length;
4315
4436
  defaultContexts = [...defaultContexts, defaultContext];
4316
4437
  const Provider = (props) => {
4317
4438
  const { scope, children, ...context } = props;
4318
4439
  const Context = scope?.[scopeName]?.[index] || BaseContext;
4319
- const value = React4.useMemo(() => context, Object.values(context));
4440
+ const value = React6.useMemo(() => context, Object.values(context));
4320
4441
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Context.Provider, { value, children });
4321
4442
  };
4322
4443
  Provider.displayName = rootComponentName + "Provider";
4323
4444
  function useContext22(consumerName, scope) {
4324
4445
  const Context = scope?.[scopeName]?.[index] || BaseContext;
4325
- const context = React4.useContext(Context);
4446
+ const context = React6.useContext(Context);
4326
4447
  if (context) return context;
4327
4448
  if (defaultContext !== void 0) return defaultContext;
4328
4449
  throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
@@ -4331,11 +4452,11 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
4331
4452
  }
4332
4453
  const createScope = () => {
4333
4454
  const scopeContexts = defaultContexts.map((defaultContext) => {
4334
- return React4.createContext(defaultContext);
4455
+ return React6.createContext(defaultContext);
4335
4456
  });
4336
4457
  return function useScope(scope) {
4337
4458
  const contexts = scope?.[scopeName] || scopeContexts;
4338
- return React4.useMemo(
4459
+ return React6.useMemo(
4339
4460
  () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
4340
4461
  [scope, contexts]
4341
4462
  );
@@ -4358,7 +4479,7 @@ function composeContextScopes(...scopes) {
4358
4479
  const currentScope = scopeProps[`__scope${scopeName}`];
4359
4480
  return { ...nextScopes2, ...currentScope };
4360
4481
  }, {});
4361
- return React4.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
4482
+ return React6.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
4362
4483
  };
4363
4484
  };
4364
4485
  createScope.scopeName = baseScope.scopeName;
@@ -4366,18 +4487,18 @@ function composeContextScopes(...scopes) {
4366
4487
  }
4367
4488
 
4368
4489
  // ../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs
4369
- var React6 = __toESM(require("react"), 1);
4490
+ var React8 = __toESM(require("react"), 1);
4370
4491
 
4371
4492
  // ../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
4372
- var React5 = __toESM(require("react"), 1);
4373
- var useLayoutEffect2 = globalThis?.document ? React5.useLayoutEffect : () => {
4493
+ var React7 = __toESM(require("react"), 1);
4494
+ var useLayoutEffect2 = globalThis?.document ? React7.useLayoutEffect : () => {
4374
4495
  };
4375
4496
 
4376
4497
  // ../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs
4377
- var useReactId = React6[" useId ".trim().toString()] || (() => void 0);
4498
+ var useReactId = React8[" useId ".trim().toString()] || (() => void 0);
4378
4499
  var count = 0;
4379
4500
  function useId(deterministicId) {
4380
- const [id, setId] = React6.useState(useReactId());
4501
+ const [id, setId] = React8.useState(useReactId());
4381
4502
  useLayoutEffect2(() => {
4382
4503
  if (!deterministicId) setId((reactId) => reactId ?? String(count++));
4383
4504
  }, [deterministicId]);
@@ -4385,9 +4506,9 @@ function useId(deterministicId) {
4385
4506
  }
4386
4507
 
4387
4508
  // ../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
4388
- var React7 = __toESM(require("react"), 1);
4509
+ var React9 = __toESM(require("react"), 1);
4389
4510
  var React22 = __toESM(require("react"), 1);
4390
- var useInsertionEffect = React7[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
4511
+ var useInsertionEffect = React9[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
4391
4512
  function useControllableState({
4392
4513
  prop,
4393
4514
  defaultProp,
@@ -4402,8 +4523,8 @@ function useControllableState({
4402
4523
  const isControlled = prop !== void 0;
4403
4524
  const value = isControlled ? prop : uncontrolledProp;
4404
4525
  if (true) {
4405
- const isControlledRef = React7.useRef(prop !== void 0);
4406
- React7.useEffect(() => {
4526
+ const isControlledRef = React9.useRef(prop !== void 0);
4527
+ React9.useEffect(() => {
4407
4528
  const wasControlled = isControlledRef.current;
4408
4529
  if (wasControlled !== isControlled) {
4409
4530
  const from = wasControlled ? "controlled" : "uncontrolled";
@@ -4415,7 +4536,7 @@ function useControllableState({
4415
4536
  isControlledRef.current = isControlled;
4416
4537
  }, [isControlled, caller]);
4417
4538
  }
4418
- const setValue = React7.useCallback(
4539
+ const setValue = React9.useCallback(
4419
4540
  (nextValue) => {
4420
4541
  if (isControlled) {
4421
4542
  const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
@@ -4434,13 +4555,13 @@ function useUncontrolledState({
4434
4555
  defaultProp,
4435
4556
  onChange
4436
4557
  }) {
4437
- const [value, setValue] = React7.useState(defaultProp);
4438
- const prevValueRef = React7.useRef(value);
4439
- const onChangeRef = React7.useRef(onChange);
4558
+ const [value, setValue] = React9.useState(defaultProp);
4559
+ const prevValueRef = React9.useRef(value);
4560
+ const onChangeRef = React9.useRef(onChange);
4440
4561
  useInsertionEffect(() => {
4441
4562
  onChangeRef.current = onChange;
4442
4563
  }, [onChange]);
4443
- React7.useEffect(() => {
4564
+ React9.useEffect(() => {
4444
4565
  if (prevValueRef.current !== value) {
4445
4566
  onChangeRef.current?.(value);
4446
4567
  prevValueRef.current = value;
@@ -4454,10 +4575,10 @@ function isFunction(value) {
4454
4575
  var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
4455
4576
 
4456
4577
  // ../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@19.1.6_@types+react@19.1.8__@types+_ya5augm4xgo65hmrlxfyu743vi/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
4457
- var React11 = __toESM(require("react"), 1);
4578
+ var React13 = __toESM(require("react"), 1);
4458
4579
 
4459
4580
  // ../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.1.6_@types+react@19.1.8__@types+react@19._sqnj4wa3mllckai5din6afvope/node_modules/@radix-ui/react-primitive/dist/index.mjs
4460
- var React8 = __toESM(require("react"), 1);
4581
+ var React10 = __toESM(require("react"), 1);
4461
4582
  var ReactDOM = __toESM(require("react-dom"), 1);
4462
4583
  var import_jsx_runtime6 = require("react/jsx-runtime");
4463
4584
  var NODES = [
@@ -4481,7 +4602,7 @@ var NODES = [
4481
4602
  ];
4482
4603
  var Primitive = NODES.reduce((primitive, node) => {
4483
4604
  const Slot3 = createSlot(`Primitive.${node}`);
4484
- const Node2 = React8.forwardRef((props, forwardedRef) => {
4605
+ const Node2 = React10.forwardRef((props, forwardedRef) => {
4485
4606
  const { asChild, ...primitiveProps } = props;
4486
4607
  const Comp = asChild ? Slot3 : node;
4487
4608
  if (typeof window !== "undefined") {
@@ -4497,20 +4618,20 @@ function dispatchDiscreteCustomEvent(target, event) {
4497
4618
  }
4498
4619
 
4499
4620
  // ../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
4500
- var React9 = __toESM(require("react"), 1);
4621
+ var React11 = __toESM(require("react"), 1);
4501
4622
  function useCallbackRef(callback) {
4502
- const callbackRef = React9.useRef(callback);
4503
- React9.useEffect(() => {
4623
+ const callbackRef = React11.useRef(callback);
4624
+ React11.useEffect(() => {
4504
4625
  callbackRef.current = callback;
4505
4626
  });
4506
- return React9.useMemo(() => (...args) => callbackRef.current?.(...args), []);
4627
+ return React11.useMemo(() => (...args) => callbackRef.current?.(...args), []);
4507
4628
  }
4508
4629
 
4509
4630
  // ../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
4510
- var React10 = __toESM(require("react"), 1);
4631
+ var React12 = __toESM(require("react"), 1);
4511
4632
  function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
4512
4633
  const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
4513
- React10.useEffect(() => {
4634
+ React12.useEffect(() => {
4514
4635
  const handleKeyDown = (event) => {
4515
4636
  if (event.key === "Escape") {
4516
4637
  onEscapeKeyDown(event);
@@ -4528,12 +4649,12 @@ var CONTEXT_UPDATE = "dismissableLayer.update";
4528
4649
  var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
4529
4650
  var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
4530
4651
  var originalBodyPointerEvents;
4531
- var DismissableLayerContext = React11.createContext({
4652
+ var DismissableLayerContext = React13.createContext({
4532
4653
  layers: /* @__PURE__ */ new Set(),
4533
4654
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
4534
4655
  branches: /* @__PURE__ */ new Set()
4535
4656
  });
4536
- var DismissableLayer = React11.forwardRef(
4657
+ var DismissableLayer = React13.forwardRef(
4537
4658
  (props, forwardedRef) => {
4538
4659
  const {
4539
4660
  disableOutsidePointerEvents = false,
@@ -4544,10 +4665,10 @@ var DismissableLayer = React11.forwardRef(
4544
4665
  onDismiss,
4545
4666
  ...layerProps
4546
4667
  } = props;
4547
- const context = React11.useContext(DismissableLayerContext);
4548
- const [node, setNode] = React11.useState(null);
4668
+ const context = React13.useContext(DismissableLayerContext);
4669
+ const [node, setNode] = React13.useState(null);
4549
4670
  const ownerDocument = node?.ownerDocument ?? globalThis?.document;
4550
- const [, force] = React11.useState({});
4671
+ const [, force] = React13.useState({});
4551
4672
  const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
4552
4673
  const layers = Array.from(context.layers);
4553
4674
  const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
@@ -4580,7 +4701,7 @@ var DismissableLayer = React11.forwardRef(
4580
4701
  onDismiss();
4581
4702
  }
4582
4703
  }, ownerDocument);
4583
- React11.useEffect(() => {
4704
+ React13.useEffect(() => {
4584
4705
  if (!node) return;
4585
4706
  if (disableOutsidePointerEvents) {
4586
4707
  if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
@@ -4597,7 +4718,7 @@ var DismissableLayer = React11.forwardRef(
4597
4718
  }
4598
4719
  };
4599
4720
  }, [node, ownerDocument, disableOutsidePointerEvents, context]);
4600
- React11.useEffect(() => {
4721
+ React13.useEffect(() => {
4601
4722
  return () => {
4602
4723
  if (!node) return;
4603
4724
  context.layers.delete(node);
@@ -4605,7 +4726,7 @@ var DismissableLayer = React11.forwardRef(
4605
4726
  dispatchUpdate();
4606
4727
  };
4607
4728
  }, [node, context]);
4608
- React11.useEffect(() => {
4729
+ React13.useEffect(() => {
4609
4730
  const handleUpdate = () => force({});
4610
4731
  document.addEventListener(CONTEXT_UPDATE, handleUpdate);
4611
4732
  return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
@@ -4631,11 +4752,11 @@ var DismissableLayer = React11.forwardRef(
4631
4752
  );
4632
4753
  DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
4633
4754
  var BRANCH_NAME = "DismissableLayerBranch";
4634
- var DismissableLayerBranch = React11.forwardRef((props, forwardedRef) => {
4635
- const context = React11.useContext(DismissableLayerContext);
4636
- const ref = React11.useRef(null);
4755
+ var DismissableLayerBranch = React13.forwardRef((props, forwardedRef) => {
4756
+ const context = React13.useContext(DismissableLayerContext);
4757
+ const ref = React13.useRef(null);
4637
4758
  const composedRefs = useComposedRefs(forwardedRef, ref);
4638
- React11.useEffect(() => {
4759
+ React13.useEffect(() => {
4639
4760
  const node = ref.current;
4640
4761
  if (node) {
4641
4762
  context.branches.add(node);
@@ -4649,10 +4770,10 @@ var DismissableLayerBranch = React11.forwardRef((props, forwardedRef) => {
4649
4770
  DismissableLayerBranch.displayName = BRANCH_NAME;
4650
4771
  function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
4651
4772
  const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
4652
- const isPointerInsideReactTreeRef = React11.useRef(false);
4653
- const handleClickRef = React11.useRef(() => {
4773
+ const isPointerInsideReactTreeRef = React13.useRef(false);
4774
+ const handleClickRef = React13.useRef(() => {
4654
4775
  });
4655
- React11.useEffect(() => {
4776
+ React13.useEffect(() => {
4656
4777
  const handlePointerDown = (event) => {
4657
4778
  if (event.target && !isPointerInsideReactTreeRef.current) {
4658
4779
  let handleAndDispatchPointerDownOutsideEvent2 = function() {
@@ -4693,8 +4814,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
4693
4814
  }
4694
4815
  function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
4695
4816
  const handleFocusOutside = useCallbackRef(onFocusOutside);
4696
- const isFocusInsideReactTreeRef = React11.useRef(false);
4697
- React11.useEffect(() => {
4817
+ const isFocusInsideReactTreeRef = React13.useRef(false);
4818
+ React13.useEffect(() => {
4698
4819
  const handleFocus = (event) => {
4699
4820
  if (event.target && !isFocusInsideReactTreeRef.current) {
4700
4821
  const eventDetail = { originalEvent: event };
@@ -4727,13 +4848,13 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
4727
4848
  }
4728
4849
 
4729
4850
  // ../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.6_@types+react@19.1.8__@types+react@1_7liqdxmess7vaws2bkjw22mwva/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
4730
- var React12 = __toESM(require("react"), 1);
4851
+ var React14 = __toESM(require("react"), 1);
4731
4852
  var import_jsx_runtime8 = require("react/jsx-runtime");
4732
4853
  var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
4733
4854
  var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
4734
4855
  var EVENT_OPTIONS = { bubbles: false, cancelable: true };
4735
4856
  var FOCUS_SCOPE_NAME = "FocusScope";
4736
- var FocusScope = React12.forwardRef((props, forwardedRef) => {
4857
+ var FocusScope = React14.forwardRef((props, forwardedRef) => {
4737
4858
  const {
4738
4859
  loop = false,
4739
4860
  trapped = false,
@@ -4741,12 +4862,12 @@ var FocusScope = React12.forwardRef((props, forwardedRef) => {
4741
4862
  onUnmountAutoFocus: onUnmountAutoFocusProp,
4742
4863
  ...scopeProps
4743
4864
  } = props;
4744
- const [container, setContainer] = React12.useState(null);
4865
+ const [container, setContainer] = React14.useState(null);
4745
4866
  const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
4746
4867
  const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
4747
- const lastFocusedElementRef = React12.useRef(null);
4868
+ const lastFocusedElementRef = React14.useRef(null);
4748
4869
  const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
4749
- const focusScope = React12.useRef({
4870
+ const focusScope = React14.useRef({
4750
4871
  paused: false,
4751
4872
  pause() {
4752
4873
  this.paused = true;
@@ -4755,7 +4876,7 @@ var FocusScope = React12.forwardRef((props, forwardedRef) => {
4755
4876
  this.paused = false;
4756
4877
  }
4757
4878
  }).current;
4758
- React12.useEffect(() => {
4879
+ React14.useEffect(() => {
4759
4880
  if (trapped) {
4760
4881
  let handleFocusIn2 = function(event) {
4761
4882
  if (focusScope.paused || !container) return;
@@ -4791,7 +4912,7 @@ var FocusScope = React12.forwardRef((props, forwardedRef) => {
4791
4912
  };
4792
4913
  }
4793
4914
  }, [trapped, container, focusScope.paused]);
4794
- React12.useEffect(() => {
4915
+ React14.useEffect(() => {
4795
4916
  if (container) {
4796
4917
  focusScopesStack.add(focusScope);
4797
4918
  const previouslyFocusedElement = document.activeElement;
@@ -4822,7 +4943,7 @@ var FocusScope = React12.forwardRef((props, forwardedRef) => {
4822
4943
  };
4823
4944
  }
4824
4945
  }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
4825
- const handleKeyDown = React12.useCallback(
4946
+ const handleKeyDown = React14.useCallback(
4826
4947
  (event) => {
4827
4948
  if (!loop && !trapped) return;
4828
4949
  if (focusScope.paused) return;
@@ -4931,13 +5052,13 @@ function removeLinks(items) {
4931
5052
  }
4932
5053
 
4933
5054
  // ../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@19.1.6_@types+react@19.1.8__@types+react@19.1.8_5jmzxxd65wsdfod4yurl7mkae4/node_modules/@radix-ui/react-portal/dist/index.mjs
4934
- var React13 = __toESM(require("react"), 1);
5055
+ var React15 = __toESM(require("react"), 1);
4935
5056
  var import_react_dom = __toESM(require("react-dom"), 1);
4936
5057
  var import_jsx_runtime9 = require("react/jsx-runtime");
4937
5058
  var PORTAL_NAME = "Portal";
4938
- var Portal = React13.forwardRef((props, forwardedRef) => {
5059
+ var Portal = React15.forwardRef((props, forwardedRef) => {
4939
5060
  const { container: containerProp, ...portalProps } = props;
4940
- const [mounted, setMounted] = React13.useState(false);
5061
+ const [mounted, setMounted] = React15.useState(false);
4941
5062
  useLayoutEffect2(() => setMounted(true), []);
4942
5063
  const container = containerProp || mounted && globalThis?.document?.body;
4943
5064
  return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
@@ -4946,9 +5067,9 @@ Portal.displayName = PORTAL_NAME;
4946
5067
 
4947
5068
  // ../node_modules/.pnpm/@radix-ui+react-presence@1.1.4_@types+react-dom@19.1.6_@types+react@19.1.8__@types+react@19.1_2lguv7jzxii6s3eigxktbpwkji/node_modules/@radix-ui/react-presence/dist/index.mjs
4948
5069
  var React23 = __toESM(require("react"), 1);
4949
- var React14 = __toESM(require("react"), 1);
5070
+ var React16 = __toESM(require("react"), 1);
4950
5071
  function useStateMachine(initialState, machine) {
4951
- return React14.useReducer((state, event) => {
5072
+ return React16.useReducer((state, event) => {
4952
5073
  const nextState = machine[state][event];
4953
5074
  return nextState ?? state;
4954
5075
  }, initialState);
@@ -5071,10 +5192,10 @@ function getElementRef2(element) {
5071
5192
  }
5072
5193
 
5073
5194
  // ../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.2_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
5074
- var React15 = __toESM(require("react"), 1);
5195
+ var React17 = __toESM(require("react"), 1);
5075
5196
  var count2 = 0;
5076
5197
  function useFocusGuards() {
5077
- React15.useEffect(() => {
5198
+ React17.useEffect(() => {
5078
5199
  const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
5079
5200
  document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
5080
5201
  document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
@@ -5131,10 +5252,10 @@ function __spreadArray(to, from, pack) {
5131
5252
  }
5132
5253
 
5133
5254
  // ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.8_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/Combination.js
5134
- var React24 = __toESM(require("react"));
5255
+ var React26 = __toESM(require("react"));
5135
5256
 
5136
5257
  // ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.8_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/UI.js
5137
- var React18 = __toESM(require("react"));
5258
+ var React20 = __toESM(require("react"));
5138
5259
 
5139
5260
  // ../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.8_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
5140
5261
  var zeroRightClassName = "right-scroll-bar-position";
@@ -5153,9 +5274,9 @@ function assignRef(ref, value) {
5153
5274
  }
5154
5275
 
5155
5276
  // ../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.8_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useRef.js
5156
- var import_react5 = require("react");
5277
+ var import_react7 = require("react");
5157
5278
  function useCallbackRef2(initialValue, callback) {
5158
- var ref = (0, import_react5.useState)(function() {
5279
+ var ref = (0, import_react7.useState)(function() {
5159
5280
  return {
5160
5281
  // value
5161
5282
  value: initialValue,
@@ -5181,8 +5302,8 @@ function useCallbackRef2(initialValue, callback) {
5181
5302
  }
5182
5303
 
5183
5304
  // ../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.8_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
5184
- var React16 = __toESM(require("react"));
5185
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React16.useLayoutEffect : React16.useEffect;
5305
+ var React18 = __toESM(require("react"));
5306
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React18.useLayoutEffect : React18.useEffect;
5186
5307
  var currentValues = /* @__PURE__ */ new WeakMap();
5187
5308
  function useMergeRefs(refs, defaultValue) {
5188
5309
  var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
@@ -5299,7 +5420,7 @@ function createSidecarMedium(options) {
5299
5420
  }
5300
5421
 
5301
5422
  // ../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.1.8_react@19.1.0/node_modules/use-sidecar/dist/es2015/exports.js
5302
- var React17 = __toESM(require("react"));
5423
+ var React19 = __toESM(require("react"));
5303
5424
  var SideCar = function(_a) {
5304
5425
  var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
5305
5426
  if (!sideCar) {
@@ -5309,7 +5430,7 @@ var SideCar = function(_a) {
5309
5430
  if (!Target) {
5310
5431
  throw new Error("Sidecar medium not found");
5311
5432
  }
5312
- return React17.createElement(Target, __assign({}, rest));
5433
+ return React19.createElement(Target, __assign({}, rest));
5313
5434
  };
5314
5435
  SideCar.isSideCarExport = true;
5315
5436
  function exportSidecar(medium, exported) {
@@ -5324,9 +5445,9 @@ var effectCar = createSidecarMedium();
5324
5445
  var nothing = function() {
5325
5446
  return;
5326
5447
  };
5327
- var RemoveScroll = React18.forwardRef(function(props, parentRef) {
5328
- var ref = React18.useRef(null);
5329
- var _a = React18.useState({
5448
+ var RemoveScroll = React20.forwardRef(function(props, parentRef) {
5449
+ var ref = React20.useRef(null);
5450
+ var _a = React20.useState({
5330
5451
  onScrollCapture: nothing,
5331
5452
  onWheelCapture: nothing,
5332
5453
  onTouchMoveCapture: nothing
@@ -5335,11 +5456,11 @@ var RemoveScroll = React18.forwardRef(function(props, parentRef) {
5335
5456
  var SideCar2 = sideCar;
5336
5457
  var containerRef = useMergeRefs([ref, parentRef]);
5337
5458
  var containerProps = __assign(__assign({}, rest), callbacks);
5338
- return React18.createElement(
5339
- React18.Fragment,
5459
+ return React20.createElement(
5460
+ React20.Fragment,
5340
5461
  null,
5341
- enabled && React18.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
5342
- forwardProps ? React18.cloneElement(React18.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React18.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
5462
+ enabled && React20.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
5463
+ forwardProps ? React20.cloneElement(React20.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React20.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
5343
5464
  );
5344
5465
  });
5345
5466
  RemoveScroll.defaultProps = {
@@ -5353,13 +5474,13 @@ RemoveScroll.classNames = {
5353
5474
  };
5354
5475
 
5355
5476
  // ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.8_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
5356
- var React21 = __toESM(require("react"));
5477
+ var React25 = __toESM(require("react"));
5357
5478
 
5358
5479
  // ../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.8_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js
5359
- var React20 = __toESM(require("react"));
5480
+ var React24 = __toESM(require("react"));
5360
5481
 
5361
5482
  // ../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.8_react@19.1.0/node_modules/react-style-singleton/dist/es2015/hook.js
5362
- var React19 = __toESM(require("react"));
5483
+ var React21 = __toESM(require("react"));
5363
5484
 
5364
5485
  // ../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
5365
5486
  var currentNonce;
@@ -5423,7 +5544,7 @@ var stylesheetSingleton = function() {
5423
5544
  var styleHookSingleton = function() {
5424
5545
  var sheet = stylesheetSingleton();
5425
5546
  return function(styles, isDynamic) {
5426
- React19.useEffect(function() {
5547
+ React21.useEffect(function() {
5427
5548
  sheet.add(styles);
5428
5549
  return function() {
5429
5550
  sheet.remove();
@@ -5497,7 +5618,7 @@ var getCurrentUseCounter = function() {
5497
5618
  return isFinite(counter) ? counter : 0;
5498
5619
  };
5499
5620
  var useLockAttribute = function() {
5500
- React20.useEffect(function() {
5621
+ React24.useEffect(function() {
5501
5622
  document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
5502
5623
  return function() {
5503
5624
  var newCounter = getCurrentUseCounter() - 1;
@@ -5512,10 +5633,10 @@ var useLockAttribute = function() {
5512
5633
  var RemoveScrollBar = function(_a) {
5513
5634
  var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
5514
5635
  useLockAttribute();
5515
- var gap = React20.useMemo(function() {
5636
+ var gap = React24.useMemo(function() {
5516
5637
  return getGapWidth(gapMode);
5517
5638
  }, [gapMode]);
5518
- return React20.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
5639
+ return React24.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
5519
5640
  };
5520
5641
 
5521
5642
  // ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.8_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
@@ -5656,16 +5777,16 @@ var generateStyle = function(id) {
5656
5777
  var idCounter = 0;
5657
5778
  var lockStack = [];
5658
5779
  function RemoveScrollSideCar(props) {
5659
- var shouldPreventQueue = React21.useRef([]);
5660
- var touchStartRef = React21.useRef([0, 0]);
5661
- var activeAxis = React21.useRef();
5662
- var id = React21.useState(idCounter++)[0];
5663
- var Style2 = React21.useState(styleSingleton)[0];
5664
- var lastProps = React21.useRef(props);
5665
- React21.useEffect(function() {
5780
+ var shouldPreventQueue = React25.useRef([]);
5781
+ var touchStartRef = React25.useRef([0, 0]);
5782
+ var activeAxis = React25.useRef();
5783
+ var id = React25.useState(idCounter++)[0];
5784
+ var Style2 = React25.useState(styleSingleton)[0];
5785
+ var lastProps = React25.useRef(props);
5786
+ React25.useEffect(function() {
5666
5787
  lastProps.current = props;
5667
5788
  }, [props]);
5668
- React21.useEffect(function() {
5789
+ React25.useEffect(function() {
5669
5790
  if (props.inert) {
5670
5791
  document.body.classList.add("block-interactivity-".concat(id));
5671
5792
  var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
@@ -5681,7 +5802,7 @@ function RemoveScrollSideCar(props) {
5681
5802
  }
5682
5803
  return;
5683
5804
  }, [props.inert, props.lockRef.current, props.shards]);
5684
- var shouldCancelEvent = React21.useCallback(function(event, parent) {
5805
+ var shouldCancelEvent = React25.useCallback(function(event, parent) {
5685
5806
  if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
5686
5807
  return !lastProps.current.allowPinchZoom;
5687
5808
  }
@@ -5717,7 +5838,7 @@ function RemoveScrollSideCar(props) {
5717
5838
  var cancelingAxis = activeAxis.current || currentAxis;
5718
5839
  return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
5719
5840
  }, []);
5720
- var shouldPrevent = React21.useCallback(function(_event) {
5841
+ var shouldPrevent = React25.useCallback(function(_event) {
5721
5842
  var event = _event;
5722
5843
  if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
5723
5844
  return;
@@ -5744,7 +5865,7 @@ function RemoveScrollSideCar(props) {
5744
5865
  }
5745
5866
  }
5746
5867
  }, []);
5747
- var shouldCancel = React21.useCallback(function(name, delta, target, should) {
5868
+ var shouldCancel = React25.useCallback(function(name, delta, target, should) {
5748
5869
  var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
5749
5870
  shouldPreventQueue.current.push(event);
5750
5871
  setTimeout(function() {
@@ -5753,17 +5874,17 @@ function RemoveScrollSideCar(props) {
5753
5874
  });
5754
5875
  }, 1);
5755
5876
  }, []);
5756
- var scrollTouchStart = React21.useCallback(function(event) {
5877
+ var scrollTouchStart = React25.useCallback(function(event) {
5757
5878
  touchStartRef.current = getTouchXY(event);
5758
5879
  activeAxis.current = void 0;
5759
5880
  }, []);
5760
- var scrollWheel = React21.useCallback(function(event) {
5881
+ var scrollWheel = React25.useCallback(function(event) {
5761
5882
  shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
5762
5883
  }, []);
5763
- var scrollTouchMove = React21.useCallback(function(event) {
5884
+ var scrollTouchMove = React25.useCallback(function(event) {
5764
5885
  shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
5765
5886
  }, []);
5766
- React21.useEffect(function() {
5887
+ React25.useEffect(function() {
5767
5888
  lockStack.push(Style2);
5768
5889
  props.setCallbacks({
5769
5890
  onScrollCapture: scrollWheel,
@@ -5783,11 +5904,11 @@ function RemoveScrollSideCar(props) {
5783
5904
  };
5784
5905
  }, []);
5785
5906
  var removeScrollBar = props.removeScrollBar, inert = props.inert;
5786
- return React21.createElement(
5787
- React21.Fragment,
5907
+ return React25.createElement(
5908
+ React25.Fragment,
5788
5909
  null,
5789
- inert ? React21.createElement(Style2, { styles: generateStyle(id) }) : null,
5790
- removeScrollBar ? React21.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
5910
+ inert ? React25.createElement(Style2, { styles: generateStyle(id) }) : null,
5911
+ removeScrollBar ? React25.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
5791
5912
  );
5792
5913
  }
5793
5914
  function getOutermostShadowParent(node) {
@@ -5806,8 +5927,8 @@ function getOutermostShadowParent(node) {
5806
5927
  var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
5807
5928
 
5808
5929
  // ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.8_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/Combination.js
5809
- var ReactRemoveScroll = React24.forwardRef(function(props, ref) {
5810
- return React24.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
5930
+ var ReactRemoveScroll = React26.forwardRef(function(props, ref) {
5931
+ return React26.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
5811
5932
  });
5812
5933
  ReactRemoveScroll.classNames = RemoveScroll.classNames;
5813
5934
  var Combination_default = ReactRemoveScroll;
@@ -5947,8 +6068,8 @@ var Dialog = (props) => {
5947
6068
  onOpenChange,
5948
6069
  modal = true
5949
6070
  } = props;
5950
- const triggerRef = React25.useRef(null);
5951
- const contentRef = React25.useRef(null);
6071
+ const triggerRef = React27.useRef(null);
6072
+ const contentRef = React27.useRef(null);
5952
6073
  const [open, setOpen] = useControllableState({
5953
6074
  prop: openProp,
5954
6075
  defaultProp: defaultOpen ?? false,
@@ -5966,7 +6087,7 @@ var Dialog = (props) => {
5966
6087
  descriptionId: useId(),
5967
6088
  open,
5968
6089
  onOpenChange: setOpen,
5969
- onOpenToggle: React25.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
6090
+ onOpenToggle: React27.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
5970
6091
  modal,
5971
6092
  children
5972
6093
  }
@@ -5974,7 +6095,7 @@ var Dialog = (props) => {
5974
6095
  };
5975
6096
  Dialog.displayName = DIALOG_NAME;
5976
6097
  var TRIGGER_NAME = "DialogTrigger";
5977
- var DialogTrigger = React25.forwardRef(
6098
+ var DialogTrigger = React27.forwardRef(
5978
6099
  (props, forwardedRef) => {
5979
6100
  const { __scopeDialog, ...triggerProps } = props;
5980
6101
  const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
@@ -6002,11 +6123,11 @@ var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME2, {
6002
6123
  var DialogPortal = (props) => {
6003
6124
  const { __scopeDialog, forceMount, children, container } = props;
6004
6125
  const context = useDialogContext(PORTAL_NAME2, __scopeDialog);
6005
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React25.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Portal, { asChild: true, container, children: child }) })) });
6126
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React27.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Portal, { asChild: true, container, children: child }) })) });
6006
6127
  };
6007
6128
  DialogPortal.displayName = PORTAL_NAME2;
6008
6129
  var OVERLAY_NAME = "DialogOverlay";
6009
- var DialogOverlay = React25.forwardRef(
6130
+ var DialogOverlay = React27.forwardRef(
6010
6131
  (props, forwardedRef) => {
6011
6132
  const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
6012
6133
  const { forceMount = portalContext.forceMount, ...overlayProps } = props;
@@ -6016,7 +6137,7 @@ var DialogOverlay = React25.forwardRef(
6016
6137
  );
6017
6138
  DialogOverlay.displayName = OVERLAY_NAME;
6018
6139
  var Slot2 = createSlot("DialogOverlay.RemoveScroll");
6019
- var DialogOverlayImpl = React25.forwardRef(
6140
+ var DialogOverlayImpl = React27.forwardRef(
6020
6141
  (props, forwardedRef) => {
6021
6142
  const { __scopeDialog, ...overlayProps } = props;
6022
6143
  const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
@@ -6036,7 +6157,7 @@ var DialogOverlayImpl = React25.forwardRef(
6036
6157
  }
6037
6158
  );
6038
6159
  var CONTENT_NAME = "DialogContent";
6039
- var DialogContent = React25.forwardRef(
6160
+ var DialogContent = React27.forwardRef(
6040
6161
  (props, forwardedRef) => {
6041
6162
  const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
6042
6163
  const { forceMount = portalContext.forceMount, ...contentProps } = props;
@@ -6045,12 +6166,12 @@ var DialogContent = React25.forwardRef(
6045
6166
  }
6046
6167
  );
6047
6168
  DialogContent.displayName = CONTENT_NAME;
6048
- var DialogContentModal = React25.forwardRef(
6169
+ var DialogContentModal = React27.forwardRef(
6049
6170
  (props, forwardedRef) => {
6050
6171
  const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
6051
- const contentRef = React25.useRef(null);
6172
+ const contentRef = React27.useRef(null);
6052
6173
  const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
6053
- React25.useEffect(() => {
6174
+ React27.useEffect(() => {
6054
6175
  const content = contentRef.current;
6055
6176
  if (content) return hideOthers(content);
6056
6177
  }, []);
@@ -6079,11 +6200,11 @@ var DialogContentModal = React25.forwardRef(
6079
6200
  );
6080
6201
  }
6081
6202
  );
6082
- var DialogContentNonModal = React25.forwardRef(
6203
+ var DialogContentNonModal = React27.forwardRef(
6083
6204
  (props, forwardedRef) => {
6084
6205
  const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
6085
- const hasInteractedOutsideRef = React25.useRef(false);
6086
- const hasPointerDownOutsideRef = React25.useRef(false);
6206
+ const hasInteractedOutsideRef = React27.useRef(false);
6207
+ const hasPointerDownOutsideRef = React27.useRef(false);
6087
6208
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
6088
6209
  DialogContentImpl,
6089
6210
  {
@@ -6119,11 +6240,11 @@ var DialogContentNonModal = React25.forwardRef(
6119
6240
  );
6120
6241
  }
6121
6242
  );
6122
- var DialogContentImpl = React25.forwardRef(
6243
+ var DialogContentImpl = React27.forwardRef(
6123
6244
  (props, forwardedRef) => {
6124
6245
  const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
6125
6246
  const context = useDialogContext(CONTENT_NAME, __scopeDialog);
6126
- const contentRef = React25.useRef(null);
6247
+ const contentRef = React27.useRef(null);
6127
6248
  const composedRefs = useComposedRefs(forwardedRef, contentRef);
6128
6249
  useFocusGuards();
6129
6250
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
@@ -6158,7 +6279,7 @@ var DialogContentImpl = React25.forwardRef(
6158
6279
  }
6159
6280
  );
6160
6281
  var TITLE_NAME = "DialogTitle";
6161
- var DialogTitle = React25.forwardRef(
6282
+ var DialogTitle = React27.forwardRef(
6162
6283
  (props, forwardedRef) => {
6163
6284
  const { __scopeDialog, ...titleProps } = props;
6164
6285
  const context = useDialogContext(TITLE_NAME, __scopeDialog);
@@ -6167,7 +6288,7 @@ var DialogTitle = React25.forwardRef(
6167
6288
  );
6168
6289
  DialogTitle.displayName = TITLE_NAME;
6169
6290
  var DESCRIPTION_NAME = "DialogDescription";
6170
- var DialogDescription = React25.forwardRef(
6291
+ var DialogDescription = React27.forwardRef(
6171
6292
  (props, forwardedRef) => {
6172
6293
  const { __scopeDialog, ...descriptionProps } = props;
6173
6294
  const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
@@ -6176,7 +6297,7 @@ var DialogDescription = React25.forwardRef(
6176
6297
  );
6177
6298
  DialogDescription.displayName = DESCRIPTION_NAME;
6178
6299
  var CLOSE_NAME = "DialogClose";
6179
- var DialogClose = React25.forwardRef(
6300
+ var DialogClose = React27.forwardRef(
6180
6301
  (props, forwardedRef) => {
6181
6302
  const { __scopeDialog, ...closeProps } = props;
6182
6303
  const context = useDialogContext(CLOSE_NAME, __scopeDialog);
@@ -6208,7 +6329,7 @@ var TitleWarning = ({ titleId }) => {
6208
6329
  If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
6209
6330
 
6210
6331
  For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
6211
- React25.useEffect(() => {
6332
+ React27.useEffect(() => {
6212
6333
  if (titleId) {
6213
6334
  const hasTitle = document.getElementById(titleId);
6214
6335
  if (!hasTitle) console.error(MESSAGE);
@@ -6220,7 +6341,7 @@ var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
6220
6341
  var DescriptionWarning = ({ contentRef, descriptionId }) => {
6221
6342
  const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
6222
6343
  const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
6223
- React25.useEffect(() => {
6344
+ React27.useEffect(() => {
6224
6345
  const describedById = contentRef.current?.getAttribute("aria-describedby");
6225
6346
  if (descriptionId && describedById) {
6226
6347
  const hasDescription = document.getElementById(descriptionId);
@@ -6238,7 +6359,7 @@ var Description = DialogDescription;
6238
6359
  var Close = DialogClose;
6239
6360
 
6240
6361
  // ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.0/node_modules/lucide-react/dist/esm/createLucideIcon.js
6241
- var import_react7 = require("react");
6362
+ var import_react9 = require("react");
6242
6363
 
6243
6364
  // ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.0/node_modules/lucide-react/dist/esm/shared/src/utils.js
6244
6365
  var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
@@ -6262,7 +6383,7 @@ var hasA11yProp = (props) => {
6262
6383
  };
6263
6384
 
6264
6385
  // ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.0/node_modules/lucide-react/dist/esm/Icon.js
6265
- var import_react6 = require("react");
6386
+ var import_react8 = require("react");
6266
6387
 
6267
6388
  // ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.0/node_modules/lucide-react/dist/esm/defaultAttributes.js
6268
6389
  var defaultAttributes = {
@@ -6278,7 +6399,7 @@ var defaultAttributes = {
6278
6399
  };
6279
6400
 
6280
6401
  // ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.0/node_modules/lucide-react/dist/esm/Icon.js
6281
- var Icon = (0, import_react6.forwardRef)(
6402
+ var Icon = (0, import_react8.forwardRef)(
6282
6403
  ({
6283
6404
  color = "currentColor",
6284
6405
  size = 24,
@@ -6288,7 +6409,7 @@ var Icon = (0, import_react6.forwardRef)(
6288
6409
  children,
6289
6410
  iconNode,
6290
6411
  ...rest
6291
- }, ref) => (0, import_react6.createElement)(
6412
+ }, ref) => (0, import_react8.createElement)(
6292
6413
  "svg",
6293
6414
  {
6294
6415
  ref,
@@ -6302,7 +6423,7 @@ var Icon = (0, import_react6.forwardRef)(
6302
6423
  ...rest
6303
6424
  },
6304
6425
  [
6305
- ...iconNode.map(([tag, attrs]) => (0, import_react6.createElement)(tag, attrs)),
6426
+ ...iconNode.map(([tag, attrs]) => (0, import_react8.createElement)(tag, attrs)),
6306
6427
  ...Array.isArray(children) ? children : [children]
6307
6428
  ]
6308
6429
  )
@@ -6310,8 +6431,8 @@ var Icon = (0, import_react6.forwardRef)(
6310
6431
 
6311
6432
  // ../node_modules/.pnpm/lucide-react@0.523.0_react@19.1.0/node_modules/lucide-react/dist/esm/createLucideIcon.js
6312
6433
  var createLucideIcon = (iconName, iconNode) => {
6313
- const Component = (0, import_react7.forwardRef)(
6314
- ({ className, ...props }, ref) => (0, import_react7.createElement)(Icon, {
6434
+ const Component = (0, import_react9.forwardRef)(
6435
+ ({ className, ...props }, ref) => (0, import_react9.createElement)(Icon, {
6315
6436
  ref,
6316
6437
  iconNode,
6317
6438
  className: mergeClasses(
@@ -6350,7 +6471,7 @@ var DialogPortal2 = ({
6350
6471
  }) => {
6351
6472
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Portal2, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "au-root", children }) });
6352
6473
  };
6353
- var DialogOverlay2 = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
6474
+ var DialogOverlay2 = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
6354
6475
  Overlay,
6355
6476
  {
6356
6477
  ref,
@@ -6362,7 +6483,7 @@ var DialogOverlay2 = React26.forwardRef(({ className, ...props }, ref) => /* @__
6362
6483
  }
6363
6484
  ));
6364
6485
  DialogOverlay2.displayName = Overlay.displayName;
6365
- var DialogContent2 = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(DialogPortal2, { children: [
6486
+ var DialogContent2 = React28.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(DialogPortal2, { children: [
6366
6487
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DialogOverlay2, {}),
6367
6488
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
6368
6489
  Content,
@@ -6412,7 +6533,7 @@ var DialogFooter = ({
6412
6533
  }
6413
6534
  );
6414
6535
  DialogFooter.displayName = "DialogFooter";
6415
- var DialogTitle2 = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
6536
+ var DialogTitle2 = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
6416
6537
  Title,
6417
6538
  {
6418
6539
  ref,
@@ -6424,7 +6545,7 @@ var DialogTitle2 = React26.forwardRef(({ className, ...props }, ref) => /* @__PU
6424
6545
  }
6425
6546
  ));
6426
6547
  DialogTitle2.displayName = Title.displayName;
6427
- var DialogDescription2 = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
6548
+ var DialogDescription2 = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
6428
6549
  Description,
6429
6550
  {
6430
6551
  ref,
@@ -6587,11 +6708,11 @@ var getAttachContent = (checkoutResult) => {
6587
6708
  };
6588
6709
 
6589
6710
  // src/libraries/react/components/ui/accordion.tsx
6590
- var React27 = __toESM(require("react"));
6711
+ var React29 = __toESM(require("react"));
6591
6712
  var AccordionPrimitive = __toESM(require("@radix-ui/react-accordion"));
6592
6713
  var import_jsx_runtime13 = require("react/jsx-runtime");
6593
6714
  var Accordion = AccordionPrimitive.Root;
6594
- var AccordionItem = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
6715
+ var AccordionItem = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
6595
6716
  AccordionPrimitive.Item,
6596
6717
  {
6597
6718
  ref,
@@ -6600,7 +6721,7 @@ var AccordionItem = React27.forwardRef(({ className, ...props }, ref) => /* @__P
6600
6721
  }
6601
6722
  ));
6602
6723
  AccordionItem.displayName = "AccordionItem";
6603
- var AccordionTrigger = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AccordionPrimitive.Header, { className: "au-flex", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
6724
+ var AccordionTrigger = React29.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AccordionPrimitive.Header, { className: "au-flex", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
6604
6725
  AccordionPrimitive.Trigger,
6605
6726
  {
6606
6727
  ref,
@@ -6616,7 +6737,7 @@ var AccordionTrigger = React27.forwardRef(({ className, children, ...props }, re
6616
6737
  }
6617
6738
  ) }));
6618
6739
  AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
6619
- var AccordionContent = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
6740
+ var AccordionContent = React29.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
6620
6741
  AccordionPrimitive.Content,
6621
6742
  {
6622
6743
  ref,
@@ -6628,12 +6749,12 @@ var AccordionContent = React27.forwardRef(({ className, children, ...props }, re
6628
6749
  AccordionContent.displayName = AccordionPrimitive.Content.displayName;
6629
6750
 
6630
6751
  // src/libraries/react/components/ui/popover.tsx
6631
- var React28 = __toESM(require("react"));
6752
+ var React30 = __toESM(require("react"));
6632
6753
  var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"));
6633
6754
  var import_jsx_runtime14 = require("react/jsx-runtime");
6634
6755
  var Popover = PopoverPrimitive.Root;
6635
6756
  var PopoverTrigger = PopoverPrimitive.Trigger;
6636
- var PopoverContent = React28.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
6757
+ var PopoverContent = React30.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
6637
6758
  PopoverPrimitive.Content,
6638
6759
  {
6639
6760
  ref,
@@ -6649,9 +6770,9 @@ var PopoverContent = React28.forwardRef(({ className, align = "center", sideOffs
6649
6770
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
6650
6771
 
6651
6772
  // src/libraries/react/components/ui/input.tsx
6652
- var React29 = __toESM(require("react"));
6773
+ var React31 = __toESM(require("react"));
6653
6774
  var import_jsx_runtime15 = require("react/jsx-runtime");
6654
- var Input = React29.forwardRef(
6775
+ var Input = React31.forwardRef(
6655
6776
  ({ className, type, onClick, ...props }, ref) => {
6656
6777
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
6657
6778
  "input",
@@ -6682,13 +6803,13 @@ var formatCurrency = ({
6682
6803
  };
6683
6804
  function AttachDialog(params) {
6684
6805
  const { attach } = useCustomer();
6685
- const [checkoutResult, setCheckoutResult] = (0, import_react8.useState)(params?.checkoutResult);
6686
- (0, import_react8.useEffect)(() => {
6806
+ const [checkoutResult, setCheckoutResult] = (0, import_react10.useState)(params?.checkoutResult);
6807
+ (0, import_react10.useEffect)(() => {
6687
6808
  if (params.checkoutResult) {
6688
6809
  setCheckoutResult(params.checkoutResult);
6689
6810
  }
6690
6811
  }, [params.checkoutResult]);
6691
- const [loading, setLoading] = (0, import_react8.useState)(false);
6812
+ const [loading, setLoading] = (0, import_react10.useState)(false);
6692
6813
  if (!checkoutResult) {
6693
6814
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, {});
6694
6815
  }
@@ -6861,12 +6982,12 @@ var PrepaidItem = ({
6861
6982
  setCheckoutResult
6862
6983
  }) => {
6863
6984
  const { quantity = 0, billing_units: billingUnits = 1 } = item;
6864
- const [quantityInput, setQuantityInput] = (0, import_react8.useState)(
6985
+ const [quantityInput, setQuantityInput] = (0, import_react10.useState)(
6865
6986
  (quantity / billingUnits).toString()
6866
6987
  );
6867
6988
  const { checkout } = useCustomer();
6868
- const [loading, setLoading] = (0, import_react8.useState)(false);
6869
- const [open, setOpen] = (0, import_react8.useState)(false);
6989
+ const [loading, setLoading] = (0, import_react10.useState)(false);
6990
+ const [open, setOpen] = (0, import_react10.useState)(false);
6870
6991
  const scenario = checkoutResult.product.scenario;
6871
6992
  const handleSave = async () => {
6872
6993
  setLoading(true);
@@ -6970,23 +7091,22 @@ var PrepaidItem = ({
6970
7091
  };
6971
7092
 
6972
7093
  // src/libraries/react/components/check-dialog/check-dialog-synced.tsx
6973
- var import_react9 = require("react");
6974
7094
  var import_jsx_runtime17 = require("react/jsx-runtime");
6975
7095
 
6976
7096
  // src/libraries/react/components/pricing-table/pricing-table-synced.tsx
6977
- var import_react11 = require("react");
7097
+ var import_react12 = require("react");
6978
7098
 
6979
7099
  // src/libraries/react/components/ui/switch.tsx
6980
- var React34 = __toESM(require("react"));
7100
+ var React36 = __toESM(require("react"));
6981
7101
 
6982
7102
  // ../node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@19.1.6_@types+react@19.1.8__@types+react@19.1.8_uhx276sbw7dr3tfricp4xfbxsq/node_modules/@radix-ui/react-switch/dist/index.mjs
6983
- var React33 = __toESM(require("react"), 1);
7103
+ var React35 = __toESM(require("react"), 1);
6984
7104
 
6985
7105
  // ../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-use-previous/dist/index.mjs
6986
- var React31 = __toESM(require("react"), 1);
7106
+ var React33 = __toESM(require("react"), 1);
6987
7107
  function usePrevious(value) {
6988
- const ref = React31.useRef({ value, previous: value });
6989
- return React31.useMemo(() => {
7108
+ const ref = React33.useRef({ value, previous: value });
7109
+ return React33.useMemo(() => {
6990
7110
  if (ref.current.value !== value) {
6991
7111
  ref.current.previous = ref.current.value;
6992
7112
  ref.current.value = value;
@@ -6996,9 +7116,9 @@ function usePrevious(value) {
6996
7116
  }
6997
7117
 
6998
7118
  // ../node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.1.8_react@19.1.0/node_modules/@radix-ui/react-use-size/dist/index.mjs
6999
- var React32 = __toESM(require("react"), 1);
7119
+ var React34 = __toESM(require("react"), 1);
7000
7120
  function useSize(element) {
7001
- const [size, setSize] = React32.useState(void 0);
7121
+ const [size, setSize] = React34.useState(void 0);
7002
7122
  useLayoutEffect2(() => {
7003
7123
  if (element) {
7004
7124
  setSize({ width: element.offsetWidth, height: element.offsetHeight });
@@ -7037,7 +7157,7 @@ var import_jsx_runtime18 = require("react/jsx-runtime");
7037
7157
  var SWITCH_NAME = "Switch";
7038
7158
  var [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);
7039
7159
  var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
7040
- var Switch = React33.forwardRef(
7160
+ var Switch = React35.forwardRef(
7041
7161
  (props, forwardedRef) => {
7042
7162
  const {
7043
7163
  __scopeSwitch,
@@ -7051,9 +7171,9 @@ var Switch = React33.forwardRef(
7051
7171
  form,
7052
7172
  ...switchProps
7053
7173
  } = props;
7054
- const [button, setButton] = React33.useState(null);
7174
+ const [button, setButton] = React35.useState(null);
7055
7175
  const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
7056
- const hasConsumerStoppedPropagationRef = React33.useRef(false);
7176
+ const hasConsumerStoppedPropagationRef = React35.useRef(false);
7057
7177
  const isFormControl = button ? form || !!button.closest("form") : true;
7058
7178
  const [checked, setChecked] = useControllableState({
7059
7179
  prop: checkedProp,
@@ -7103,7 +7223,7 @@ var Switch = React33.forwardRef(
7103
7223
  );
7104
7224
  Switch.displayName = SWITCH_NAME;
7105
7225
  var THUMB_NAME = "SwitchThumb";
7106
- var SwitchThumb = React33.forwardRef(
7226
+ var SwitchThumb = React35.forwardRef(
7107
7227
  (props, forwardedRef) => {
7108
7228
  const { __scopeSwitch, ...thumbProps } = props;
7109
7229
  const context = useSwitchContext(THUMB_NAME, __scopeSwitch);
@@ -7120,7 +7240,7 @@ var SwitchThumb = React33.forwardRef(
7120
7240
  );
7121
7241
  SwitchThumb.displayName = THUMB_NAME;
7122
7242
  var BUBBLE_INPUT_NAME = "SwitchBubbleInput";
7123
- var SwitchBubbleInput = React33.forwardRef(
7243
+ var SwitchBubbleInput = React35.forwardRef(
7124
7244
  ({
7125
7245
  __scopeSwitch,
7126
7246
  control,
@@ -7128,11 +7248,11 @@ var SwitchBubbleInput = React33.forwardRef(
7128
7248
  bubbles = true,
7129
7249
  ...props
7130
7250
  }, forwardedRef) => {
7131
- const ref = React33.useRef(null);
7251
+ const ref = React35.useRef(null);
7132
7252
  const composedRefs = useComposedRefs(ref, forwardedRef);
7133
7253
  const prevChecked = usePrevious(checked);
7134
7254
  const controlSize = useSize(control);
7135
- React33.useEffect(() => {
7255
+ React35.useEffect(() => {
7136
7256
  const input = ref.current;
7137
7257
  if (!input) return;
7138
7258
  const inputProto = window.HTMLInputElement.prototype;
@@ -7177,7 +7297,7 @@ var Thumb = SwitchThumb;
7177
7297
 
7178
7298
  // src/libraries/react/components/ui/switch.tsx
7179
7299
  var import_jsx_runtime19 = require("react/jsx-runtime");
7180
- var Switch2 = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
7300
+ var Switch2 = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
7181
7301
  Root4,
7182
7302
  {
7183
7303
  className: cn(
@@ -7290,7 +7410,7 @@ function PricingTable({
7290
7410
  productDetails
7291
7411
  }) {
7292
7412
  const { checkout } = useCustomer();
7293
- const [isAnnual, setIsAnnual] = (0, import_react11.useState)(false);
7413
+ const [isAnnual, setIsAnnual] = (0, import_react12.useState)(false);
7294
7414
  const { products, isLoading, error } = usePricingTable({ productDetails });
7295
7415
  if (isLoading) {
7296
7416
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: loadingStyles, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(LoaderCircle, { style: spinnerStyles }) });
@@ -7347,7 +7467,7 @@ function PricingTable({
7347
7467
  }
7348
7468
  ) });
7349
7469
  }
7350
- var PricingTableContext = (0, import_react11.createContext)({
7470
+ var PricingTableContext = (0, import_react12.createContext)({
7351
7471
  isAnnualToggle: false,
7352
7472
  setIsAnnualToggle: () => {
7353
7473
  },
@@ -7355,7 +7475,7 @@ var PricingTableContext = (0, import_react11.createContext)({
7355
7475
  showFeatures: true
7356
7476
  });
7357
7477
  var usePricingTableContext = (componentName) => {
7358
- const context = (0, import_react11.useContext)(PricingTableContext);
7478
+ const context = (0, import_react12.useContext)(PricingTableContext);
7359
7479
  if (context === void 0) {
7360
7480
  throw new Error(`${componentName} must be used within <PricingTable />`);
7361
7481
  }
@@ -7522,8 +7642,8 @@ var PricingFeatureList = ({
7522
7642
  )) })
7523
7643
  ] });
7524
7644
  };
7525
- var PricingCardButton = import_react10.default.forwardRef(({ recommended, children, className, onClick, ...props }, ref) => {
7526
- const [loading, setLoading] = (0, import_react11.useState)(false);
7645
+ var PricingCardButton = import_react11.default.forwardRef(({ recommended, children, className, onClick, ...props }, ref) => {
7646
+ const [loading, setLoading] = (0, import_react12.useState)(false);
7527
7647
  const handleClick = async (e) => {
7528
7648
  setLoading(true);
7529
7649
  try {