@tempoxyz/id 0.0.0-pr-293.sha-db2bcd0 → 0.0.0-pr-293.sha-e314a6e

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 (377) hide show
  1. package/dist/app/client/assets/Account-BYLpNFf3.css +1 -0
  2. package/dist/app/client/assets/Account-DKlYpUaF.js +1 -0
  3. package/dist/app/client/assets/Amount-ZdtluGf-.css +1 -0
  4. package/dist/app/client/assets/Amount-uCaXmEC1.js +1 -0
  5. package/dist/app/client/assets/{Approval-lMS61Hor.js → Approval-_VTK0bIA.js} +1 -1
  6. package/dist/app/client/assets/{Authentication-CNU_hdsE.js → Authentication-CcZraW4V.js} +1 -1
  7. package/dist/app/client/assets/Callout-Cpp2tekO.js +1 -0
  8. package/dist/app/client/assets/Callout-DBfEmP7q.css +1 -0
  9. package/dist/app/client/assets/{Chain-CgM0gkul.js → Chain-BaJbQHEq.js} +1 -1
  10. package/dist/app/client/assets/{Check-l6Xt-h8M.js → Check-T-Kf-w2J.js} +1 -1
  11. package/dist/app/client/assets/{ChevronRight-Dgx1CBfS.js → ChevronRight-Cb0izsfB.js} +1 -1
  12. package/dist/app/client/assets/{ChooseAccount-DKQvWYym.js → ChooseAccount-BbdtokuQ.js} +1 -1
  13. package/dist/app/client/assets/{Client-B3HiaUR7.js → Client-XdlKOIjT.js} +1 -1
  14. package/dist/app/client/assets/{Close-CHeDbDyp.js → Close-9qiwSZoT.js} +1 -1
  15. package/dist/app/client/assets/{Cloud-BnBzwFJQ.js → Cloud-yU0Kxv28.js} +1 -1
  16. package/dist/app/client/assets/CodeInput-BqRteSwD.css +1 -0
  17. package/dist/app/client/assets/CodeInput-C8ad0edh.js +1 -0
  18. package/dist/app/client/assets/Deposit-CclrAoXL.css +1 -0
  19. package/dist/app/client/assets/Deposit-b5yx-L71.js +1 -0
  20. package/dist/app/client/assets/DevTools-BYkmtuV5.css +1 -0
  21. package/dist/app/client/assets/DevTools-Cgd0Ogan.js +1 -0
  22. package/dist/app/client/assets/{DeviceApproval-DKQklicf.js → DeviceApproval-CGdmL9U5.js} +1 -1
  23. package/dist/app/client/assets/{Fingerprint-CVLZp0fE.js → Fingerprint-081gQp_i.js} +1 -1
  24. package/dist/app/client/assets/{Globe-RAkdkLVn.js → Globe-D4HEnXoi.js} +1 -1
  25. package/dist/app/client/assets/Grant-5a-n1gJH.css +1 -0
  26. package/dist/app/client/assets/Grant-C-7ibHJb.js +1 -0
  27. package/dist/app/client/assets/Hex-C9KeV7_9.css +1 -0
  28. package/dist/app/client/assets/Hex-COpLAksw.js +10 -0
  29. package/dist/app/client/assets/IconChip-Cr71cqFZ.js +1 -0
  30. package/dist/app/client/assets/IconChip-yqaQ2y_d.css +1 -0
  31. package/dist/app/client/assets/InputGroup-BMExR1w7.js +1 -0
  32. package/dist/app/client/assets/InputGroup-BlZvt9In.css +1 -0
  33. package/dist/app/client/assets/Inter-cyrillic-e3OmmzmJ.woff2 +0 -0
  34. package/dist/app/client/assets/Inter-cyrillic-ext-DOWZeO4Q.woff2 +0 -0
  35. package/dist/app/client/assets/Inter-greek-BD3ujQlX.woff2 +0 -0
  36. package/dist/app/client/assets/Inter-greek-ext-CXEwbus4.woff2 +0 -0
  37. package/dist/app/client/assets/Inter-latin-BDFm4vTb.woff2 +0 -0
  38. package/dist/app/client/assets/Inter-latin-ext-E7a9JEPe.woff2 +0 -0
  39. package/dist/app/client/assets/Inter-symbols-DEch7Rxr.woff2 +0 -0
  40. package/dist/app/client/assets/Inter-vietnamese-Bg9723vR.woff2 +0 -0
  41. package/dist/app/client/assets/Loader-CVy-jQh9.js +1 -0
  42. package/dist/app/client/assets/{PopoverPopup-AaR182Lw.js → PopoverPopup-CQv00nl_.js} +1 -1
  43. package/dist/app/client/assets/Rows-CT3nC-Gp.js +1 -0
  44. package/dist/app/client/assets/Rows-DPGTUdA8.css +1 -0
  45. package/dist/app/client/assets/{Separator-C1NRk_mW.js → Separator-Doxz2kha.js} +1 -1
  46. package/dist/app/client/assets/SignIn-D2D3rbzT.js +1 -0
  47. package/dist/app/client/assets/SignIn-mlBTwUq4.css +1 -0
  48. package/dist/app/client/assets/Stack-D7Yt22Ed.css +1 -0
  49. package/dist/app/client/assets/Stack-qm24zmlV.js +1 -0
  50. package/dist/app/client/assets/ToolbarRootContext-Ctu7JTLk.js +1 -0
  51. package/dist/app/client/assets/Tooltip-arQraM0D.js +1 -0
  52. package/dist/app/client/assets/Tooltip-d3y9ESUJ.css +1 -0
  53. package/dist/app/client/assets/___-I98bns4o.css +1 -0
  54. package/dist/app/client/assets/___.flows-8Dmgeehd.js +5 -0
  55. package/dist/app/client/assets/{authorize-BQ1QbDZ8.js → authorize-DAtsqrNM.js} +1 -1
  56. package/dist/app/client/assets/{choose-account-Da0fLaYb.js → choose-account-DEFRgijo.js} +1 -1
  57. package/dist/app/client/assets/{deposit-CwKR_KjX.js → deposit--QiYWQfo.js} +1 -1
  58. package/dist/app/client/assets/{device-CCwq2oAs.js → device-Bq9xs5K6.js} +1 -1
  59. package/dist/app/client/assets/{error-Dj24A5n4.js → error-IQXxc1eM.js} +1 -1
  60. package/dist/app/client/assets/{getPseudoElementBounds-DH_jjqMh.js → getPseudoElementBounds-4olojy3W.js} +1 -1
  61. package/dist/app/client/assets/index-CyFheDuU.js +13 -0
  62. package/dist/app/client/assets/index-DSkPoKOK.css +1 -0
  63. package/dist/app/client/assets/{lazyRouteComponent-108fI1-o.js → lazyRouteComponent-Dz0rIGYN.js} +1 -1
  64. package/dist/app/client/assets/{login--cK4-SN_.js → login-B0BjHqjo.js} +1 -1
  65. package/dist/app/client/assets/pathUSD-BMh6ajrW.css +1 -0
  66. package/dist/app/client/assets/pathUSD-DuAfAKZZ.js +1 -0
  67. package/dist/app/client/assets/{removable-CZFK4Sbw.js → removable-CbJQgeuY.js} +1 -1
  68. package/dist/app/client/assets/{routes-BEKA6M9o.js → routes-BkBTe_Iu.js} +1 -1
  69. package/dist/app/client/assets/{suspense-ClIj0Mjn.js → suspense-Djz3yPi6.js} +1 -1
  70. package/dist/app/client/assets/useNavigate-B3GfD6JV.js +1 -0
  71. package/dist/app/client/assets/{useRegisterFieldControl-r_mKBm9D.js → useRegisterFieldControl-C8uwO_R4.js} +1 -1
  72. package/dist/app/client/assets/zyzz-DYC-X0_B.css +1 -0
  73. package/dist/app/client/assets/zyzz.config-DJRBo25J.js +2 -0
  74. package/dist/app/server/.vite/manifest.json +640 -608
  75. package/dist/app/server/assets/Account-BYLpNFf3.css +1 -0
  76. package/dist/app/server/assets/Account-g1_Uaj86.js +2 -0
  77. package/dist/app/server/assets/Account-g1_Uaj86.js.map +1 -0
  78. package/dist/app/server/assets/Amount-BXSuv2fx.js +2 -0
  79. package/dist/app/server/assets/Amount-BXSuv2fx.js.map +1 -0
  80. package/dist/app/server/assets/Amount-ZdtluGf-.css +1 -0
  81. package/dist/app/server/assets/{Approval-DhLkTvkI.js → Approval-DA8fDZIl.js} +2 -2
  82. package/dist/app/server/assets/{Approval-DhLkTvkI.js.map → Approval-DA8fDZIl.js.map} +1 -1
  83. package/dist/app/server/assets/{Authentication-Odm8-gfs.js → Authentication-BJgy8lyC.js} +2 -2
  84. package/dist/app/server/assets/{Authentication-Odm8-gfs.js.map → Authentication-BJgy8lyC.js.map} +1 -1
  85. package/dist/app/server/assets/{Authentication-DLWMd2mA.js → Authentication-CsSh3HGu.js} +2 -2
  86. package/dist/app/server/assets/{Authentication-DLWMd2mA.js.map → Authentication-CsSh3HGu.js.map} +1 -1
  87. package/dist/app/server/assets/Callout-DBfEmP7q.css +1 -0
  88. package/dist/app/server/assets/Callout-DlcQ5BUo.js +2 -0
  89. package/dist/app/server/assets/Callout-DlcQ5BUo.js.map +1 -0
  90. package/dist/app/server/assets/{Chain-CQgBRAXx.js → Chain-C9RGZDJm.js} +2 -2
  91. package/dist/app/server/assets/{Chain-CQgBRAXx.js.map → Chain-C9RGZDJm.js.map} +1 -1
  92. package/dist/app/server/assets/{Check-BwwQ6kDn.js → Check-CQIa-Y5d.js} +2 -2
  93. package/dist/app/server/assets/{Check-BwwQ6kDn.js.map → Check-CQIa-Y5d.js.map} +1 -1
  94. package/dist/app/server/assets/{ChevronRight-B_ft-uyS.js → ChevronRight-wzF9Mh2e.js} +2 -2
  95. package/dist/app/server/assets/{ChevronRight-B_ft-uyS.js.map → ChevronRight-wzF9Mh2e.js.map} +1 -1
  96. package/dist/app/server/assets/{ChooseAccount-FJJ2kRPk.js → ChooseAccount-De_YweJM.js} +2 -2
  97. package/dist/app/server/assets/{ChooseAccount-FJJ2kRPk.js.map → ChooseAccount-De_YweJM.js.map} +1 -1
  98. package/dist/app/server/assets/{Client-D3gnMDTr.js → Client-BAXSFa9e.js} +2 -2
  99. package/dist/app/server/assets/{Client-D3gnMDTr.js.map → Client-BAXSFa9e.js.map} +1 -1
  100. package/dist/app/server/assets/{ClientOnly-CbQVNHub.js → ClientOnly-B8k5xDwz.js} +2 -2
  101. package/dist/app/server/assets/{ClientOnly-CbQVNHub.js.map → ClientOnly-B8k5xDwz.js.map} +1 -1
  102. package/dist/app/server/assets/{Close-ChRMz-uR.js → Close-C74hwnOn.js} +2 -2
  103. package/dist/app/server/assets/{Close-ChRMz-uR.js.map → Close-C74hwnOn.js.map} +1 -1
  104. package/dist/app/server/assets/{Cloud-C3_mtq_Y.js → Cloud-CYXeneSe.js} +2 -2
  105. package/dist/app/server/assets/{Cloud-C3_mtq_Y.js.map → Cloud-CYXeneSe.js.map} +1 -1
  106. package/dist/app/server/assets/CodeInput-BqRteSwD.css +1 -0
  107. package/dist/app/server/assets/CodeInput-DdkMKOyq.js +2 -0
  108. package/dist/app/server/assets/CodeInput-DdkMKOyq.js.map +1 -0
  109. package/dist/app/server/assets/{Credential-D82PNwyx.js → Credential-DXcfPJEP.js} +2 -2
  110. package/dist/app/server/assets/{Credential-D82PNwyx.js.map → Credential-DXcfPJEP.js.map} +1 -1
  111. package/dist/app/server/assets/Deposit-CclrAoXL.css +1 -0
  112. package/dist/app/server/assets/Deposit-DOp5HCDX.js +2 -0
  113. package/dist/app/server/assets/Deposit-DOp5HCDX.js.map +1 -0
  114. package/dist/app/server/assets/DevTools-BYkmtuV5.css +1 -0
  115. package/dist/app/server/assets/DevTools-CxdPUN3V.js +2 -0
  116. package/dist/app/server/assets/DevTools-CxdPUN3V.js.map +1 -0
  117. package/dist/app/server/assets/{DeviceApproval-BhWgrv9l.js → DeviceApproval-o7T8XlX3.js} +2 -2
  118. package/dist/app/server/assets/{DeviceApproval-BhWgrv9l.js.map → DeviceApproval-o7T8XlX3.js.map} +1 -1
  119. package/dist/app/server/assets/{ExecutionError-DSSCSoHl.js → ExecutionError-DoRNvh3D.js} +2 -2
  120. package/dist/app/server/assets/{ExecutionError-DSSCSoHl.js.map → ExecutionError-DoRNvh3D.js.map} +1 -1
  121. package/dist/app/server/assets/{Faucet-Cv-nQMBR.js → Faucet-jp6zNWHE.js} +2 -2
  122. package/dist/app/server/assets/{Faucet-Cv-nQMBR.js.map → Faucet-jp6zNWHE.js.map} +1 -1
  123. package/dist/app/server/assets/{Fingerprint-B0Iay4Ws.js → Fingerprint-CAqjOS3T.js} +2 -2
  124. package/dist/app/server/assets/{Fingerprint-B0Iay4Ws.js.map → Fingerprint-CAqjOS3T.js.map} +1 -1
  125. package/dist/app/server/assets/{Globe-C6rnzTY0.js → Globe-BZ_5dGqa.js} +2 -2
  126. package/dist/app/server/assets/{Globe-C6rnzTY0.js.map → Globe-BZ_5dGqa.js.map} +1 -1
  127. package/dist/app/server/assets/Grant-5a-n1gJH.css +1 -0
  128. package/dist/app/{client/assets/Grant-DurkleN7.js → server/assets/Grant-BwOC2P94.js} +2 -1
  129. package/dist/app/server/assets/Grant-BwOC2P94.js.map +1 -0
  130. package/dist/app/server/assets/Hex-67thYs-f.js +11 -0
  131. package/dist/app/server/assets/Hex-67thYs-f.js.map +1 -0
  132. package/dist/app/server/assets/Hex-C9KeV7_9.css +1 -0
  133. package/dist/app/server/assets/IconChip-Cmufss8d.js +2 -0
  134. package/dist/app/server/assets/IconChip-Cmufss8d.js.map +1 -0
  135. package/dist/app/server/assets/IconChip-yqaQ2y_d.css +1 -0
  136. package/dist/app/server/assets/InputGroup-BlZvt9In.css +1 -0
  137. package/dist/app/server/assets/InputGroup-Bn2KM9pd.js +2 -0
  138. package/dist/app/server/assets/InputGroup-Bn2KM9pd.js.map +1 -0
  139. package/dist/app/server/assets/Inter-cyrillic-e3OmmzmJ.woff2 +0 -0
  140. package/dist/app/server/assets/Inter-cyrillic-ext-DOWZeO4Q.woff2 +0 -0
  141. package/dist/app/server/assets/Inter-greek-BD3ujQlX.woff2 +0 -0
  142. package/dist/app/server/assets/Inter-greek-ext-CXEwbus4.woff2 +0 -0
  143. package/dist/app/server/assets/Inter-latin-BDFm4vTb.woff2 +0 -0
  144. package/dist/app/server/assets/Inter-latin-ext-E7a9JEPe.woff2 +0 -0
  145. package/dist/app/server/assets/Inter-symbols-DEch7Rxr.woff2 +0 -0
  146. package/dist/app/server/assets/Inter-vietnamese-Bg9723vR.woff2 +0 -0
  147. package/dist/app/server/assets/Loader-DvDbd8kj.js +2 -0
  148. package/dist/app/server/assets/{Loader-Ivf5dWFl.js.map → Loader-DvDbd8kj.js.map} +1 -1
  149. package/dist/app/server/assets/{Match-DusFDz9D.js → Match-C65vhhhD.js} +2 -2
  150. package/dist/app/server/assets/{Match-DusFDz9D.js.map → Match-C65vhhhD.js.map} +1 -1
  151. package/dist/app/server/assets/PopoverPopup-kuWGUSYM.js +2 -0
  152. package/dist/app/server/assets/{PopoverPopup-D98JOZVe.js.map → PopoverPopup-kuWGUSYM.js.map} +1 -1
  153. package/dist/app/server/assets/Rows-DPGTUdA8.css +1 -0
  154. package/dist/app/server/assets/Rows-eTPur_py.js +2 -0
  155. package/dist/app/server/assets/Rows-eTPur_py.js.map +1 -0
  156. package/dist/app/server/assets/{Separator-B6od-9JY.js → Separator-BPNenixO.js} +2 -2
  157. package/dist/app/server/assets/{Separator-B6od-9JY.js.map → Separator-BPNenixO.js.map} +1 -1
  158. package/dist/app/server/assets/SignIn-CVPZSR-8.js +2 -0
  159. package/dist/app/server/assets/SignIn-CVPZSR-8.js.map +1 -0
  160. package/dist/app/server/assets/SignIn-mlBTwUq4.css +1 -0
  161. package/dist/app/server/assets/Stack-D7Yt22Ed.css +1 -0
  162. package/dist/app/server/assets/Stack-DQMZBUUB.js +2 -0
  163. package/dist/app/server/assets/Stack-DQMZBUUB.js.map +1 -0
  164. package/dist/app/server/assets/ToolbarRootContext-5168W3t4.js +2 -0
  165. package/dist/app/server/assets/{ToolbarRootContext-BCmWBQ7n.js.map → ToolbarRootContext-5168W3t4.js.map} +1 -1
  166. package/dist/app/server/assets/Tooltip-DR3nssae.js +2 -0
  167. package/dist/app/server/assets/Tooltip-DR3nssae.js.map +1 -0
  168. package/dist/app/server/assets/Tooltip-d3y9ESUJ.css +1 -0
  169. package/dist/app/server/assets/___-I98bns4o.css +1 -0
  170. package/dist/app/server/assets/___.flows-D_J822MU.js +6 -0
  171. package/dist/app/server/assets/___.flows-D_J822MU.js.map +1 -0
  172. package/dist/app/server/assets/_tanstack-start-manifest_v-DQjMcFpU.js +1 -0
  173. package/dist/app/server/assets/{_zyzz__2Fhome_2Frunner_2Fwork_2Fid_2Fid_2Fsrc_2Fapp_2Froutes_2F_5B__5D.flows.tsx-Drf_Iqhc.js → _zyzz__2Fhome_2Frunner_2Fwork_2Fid_2Fid_2Fsrc_2Fapp_2Froutes_2F_5B__5D.flows.tsx-EmCsnNUQ.js} +2 -2
  174. package/dist/app/server/assets/{_zyzz__2Fhome_2Frunner_2Fwork_2Fid_2Fid_2Fsrc_2Fapp_2Froutes_2F_5B__5D.flows.tsx-Drf_Iqhc.js.map → _zyzz__2Fhome_2Frunner_2Fwork_2Fid_2Fid_2Fsrc_2Fapp_2Froutes_2F_5B__5D.flows.tsx-EmCsnNUQ.js.map} +1 -1
  175. package/dist/app/server/assets/{accessKey-CxNqjouy.js → accessKey-DlBe71R7.js} +4 -4
  176. package/dist/app/server/assets/{accessKey-CxNqjouy.js.map → accessKey-DlBe71R7.js.map} +1 -1
  177. package/dist/app/server/assets/{authorize-D_5EG0WN.js → authorize-C3nY01zc.js} +2 -2
  178. package/dist/app/server/assets/{authorize-D_5EG0WN.js.map → authorize-C3nY01zc.js.map} +1 -1
  179. package/dist/app/server/assets/{authorize-pZETCSux.js → authorize-C9tfZ34z.js} +2 -2
  180. package/dist/app/server/assets/{authorize-pZETCSux.js.map → authorize-C9tfZ34z.js.map} +1 -1
  181. package/dist/app/server/assets/{authorize-DXYo-K2n-08rIhXFT.js → authorize-DXYo-K2n-Bc8o9t1x.js} +2 -2
  182. package/dist/app/server/assets/{authorize-DXYo-K2n-08rIhXFT.js.map → authorize-DXYo-K2n-Bc8o9t1x.js.map} +1 -1
  183. package/dist/app/server/assets/{choose-account-BOPrs9l7.js → choose-account-DNfcLweT.js} +2 -2
  184. package/dist/app/server/assets/{choose-account-BOPrs9l7.js.map → choose-account-DNfcLweT.js.map} +1 -1
  185. package/dist/app/server/assets/{choose-account-MDW4jp29.js → choose-account-Lq0qFqBr.js} +2 -2
  186. package/dist/app/server/assets/{choose-account-MDW4jp29.js.map → choose-account-Lq0qFqBr.js.map} +1 -1
  187. package/dist/app/server/assets/{core-Dxqe4Tzf.js → core-Ci_AVqAl.js} +2 -2
  188. package/dist/app/server/assets/{core-Dxqe4Tzf.js.map → core-Ci_AVqAl.js.map} +1 -1
  189. package/dist/app/server/assets/default-u_dwuiYb-D3URkhAV.js +2 -0
  190. package/dist/app/server/assets/{default-u_dwuiYb-BZX-cEte.js.map → default-u_dwuiYb-D3URkhAV.js.map} +1 -1
  191. package/dist/app/server/assets/{deposit-AgLrOoA3.js → deposit-Ch8VqCtG.js} +2 -2
  192. package/dist/app/server/assets/{deposit-AgLrOoA3.js.map → deposit-Ch8VqCtG.js.map} +1 -1
  193. package/dist/app/server/assets/{deposit-Cjt69KmJ.js → deposit-xQrouL3f.js} +2 -2
  194. package/dist/app/server/assets/{deposit-Cjt69KmJ.js.map → deposit-xQrouL3f.js.map} +1 -1
  195. package/dist/app/server/assets/{device-TEgIth9V.js → device-BAsgIC7D.js} +2 -2
  196. package/dist/app/server/assets/{device-TEgIth9V.js.map → device-BAsgIC7D.js.map} +1 -1
  197. package/dist/app/server/assets/{device-DO_RH0Or.js → device-BV99aHMG.js} +2 -2
  198. package/dist/app/server/assets/{device-DO_RH0Or.js.map → device-BV99aHMG.js.map} +1 -1
  199. package/dist/app/server/assets/dist-BhIyCFP8.js +1 -0
  200. package/dist/app/server/assets/{dist-C9wLcfH8.js → dist-C-Rzwa6V.js} +2 -2
  201. package/dist/app/server/assets/{dist-C9wLcfH8.js.map → dist-C-Rzwa6V.js.map} +1 -1
  202. package/dist/app/server/assets/{dist-SBl0rlY-.js → dist-CJN10pUl.js} +2 -2
  203. package/dist/app/server/assets/{dist-SBl0rlY-.js.map → dist-CJN10pUl.js.map} +1 -1
  204. package/dist/app/server/assets/{effect-QlVUlMFu-aB2jdYth.js → effect-QlVUlMFu-svPBY1dH.js} +2 -2
  205. package/dist/app/server/assets/{effect-QlVUlMFu-aB2jdYth.js.map → effect-QlVUlMFu-svPBY1dH.js.map} +1 -1
  206. package/dist/app/server/assets/{error-BDVg4EUJ.js → error-CHeOE_lh.js} +2 -2
  207. package/dist/app/server/assets/{error-BDVg4EUJ.js.map → error-CHeOE_lh.js.map} +1 -1
  208. package/dist/app/server/assets/{error-Yg6jqry-.js → error-PecJkSHO.js} +2 -2
  209. package/dist/app/server/assets/{error-Yg6jqry-.js.map → error-PecJkSHO.js.map} +1 -1
  210. package/dist/app/server/assets/{factory-BPswjDEW.js → factory-Bs0vLkBr.js} +2 -2
  211. package/dist/app/server/assets/{factory-BPswjDEW.js.map → factory-Bs0vLkBr.js.map} +1 -1
  212. package/dist/app/server/assets/getPseudoElementBounds-DIn3v91B.js +2 -0
  213. package/dist/app/server/assets/{getPseudoElementBounds-BdqJhx6M.js.map → getPseudoElementBounds-DIn3v91B.js.map} +1 -1
  214. package/dist/app/server/assets/{index-CLddUTqr-Bavq3Qss.js → index-CLddUTqr-CmUyZRXY.js} +2 -2
  215. package/dist/app/server/assets/{index-CLddUTqr-Bavq3Qss.js.map → index-CLddUTqr-CmUyZRXY.js.map} +1 -1
  216. package/dist/app/server/assets/{index-DZEfthgZ--TkOBRwP.js → index-DZEfthgZ-Bkf7F_aP.js} +2 -2
  217. package/dist/app/server/assets/{index-DZEfthgZ--TkOBRwP.js.map → index-DZEfthgZ-Bkf7F_aP.js.map} +1 -1
  218. package/dist/app/server/assets/{kysely-adapter-BVql8na5.js → kysely-adapter-DhztbDJz.js} +1 -1
  219. package/dist/app/server/assets/{lazyRouteComponent-BXabRVTE.js → lazyRouteComponent-DOSE663E.js} +2 -2
  220. package/dist/app/server/assets/{lazyRouteComponent-BXabRVTE.js.map → lazyRouteComponent-DOSE663E.js.map} +1 -1
  221. package/dist/app/server/assets/{login-BR3Vh4Jw.js → login-6K4ND-gN.js} +2 -2
  222. package/dist/app/server/assets/{login-BR3Vh4Jw.js.map → login-6K4ND-gN.js.map} +1 -1
  223. package/dist/app/server/assets/{login-DtRzF4FQ.js → login-CGq85v-9.js} +2 -2
  224. package/dist/app/server/assets/{login-DtRzF4FQ.js.map → login-CGq85v-9.js.map} +1 -1
  225. package/dist/app/server/assets/{matchContext-Cuq8aYzA.js → matchContext-BHbopc_c.js} +2 -2
  226. package/dist/app/server/assets/{matchContext-Cuq8aYzA.js.map → matchContext-BHbopc_c.js.map} +1 -1
  227. package/dist/app/server/assets/{mutation-BseSOMT8.js → mutation-D0MCZKRo.js} +2 -2
  228. package/dist/app/server/assets/{mutation-BseSOMT8.js.map → mutation-D0MCZKRo.js.map} +1 -1
  229. package/dist/app/server/assets/pathUSD-BMh6ajrW.css +1 -0
  230. package/dist/app/server/assets/pathUSD-DqRWfB70.js +2 -0
  231. package/dist/app/server/assets/pathUSD-DqRWfB70.js.map +1 -0
  232. package/dist/app/server/assets/{query-lzX3sTGO.js → query-BfAOtP6H.js} +2 -2
  233. package/dist/app/server/assets/{query-lzX3sTGO.js.map → query-BfAOtP6H.js.map} +1 -1
  234. package/dist/app/server/assets/react-dom-BbDIEd_j.css +1 -0
  235. package/dist/app/server/assets/{react-dom-DtwtyQPy.js → react-dom-pSpaua7D.js} +1 -1
  236. package/dist/app/server/assets/{react-dom-DtwtyQPy.js.map → react-dom-pSpaua7D.js.map} +1 -1
  237. package/dist/app/server/assets/{removable-HVB1MGzn.js → removable-BIS_RRBc.js} +2 -2
  238. package/dist/app/server/assets/{removable-HVB1MGzn.js.map → removable-BIS_RRBc.js.map} +1 -1
  239. package/dist/app/server/assets/{resolveError-DSqzEjUE.js → resolveError-DPXmbkOB.js} +2 -2
  240. package/dist/app/server/assets/{resolveError-DSqzEjUE.js.map → resolveError-DPXmbkOB.js.map} +1 -1
  241. package/dist/app/server/assets/{router-uhTdTHZE.js → router-nrTsbXpb.js} +2 -2
  242. package/dist/app/server/assets/router-nrTsbXpb.js.map +1 -0
  243. package/dist/app/server/assets/routes-BgiIzrOt.css +1 -0
  244. package/dist/app/server/assets/{routes-CeDOMpI-.js → routes-ClVSwEtU.js} +2 -2
  245. package/dist/app/server/assets/{routes-CeDOMpI-.js.map → routes-ClVSwEtU.js.map} +1 -1
  246. package/dist/app/server/assets/routes-DM3C9lXZ.js +2 -0
  247. package/dist/app/server/assets/routes-DM3C9lXZ.js.map +1 -0
  248. package/dist/app/server/assets/{schemas-fV27l6kI.js → schemas-CFw4XgfH.js} +2 -2
  249. package/dist/app/server/assets/{schemas-fV27l6kI.js.map → schemas-CFw4XgfH.js.map} +1 -1
  250. package/dist/app/server/assets/{secp256k1-5tp4GQIt.js → secp256k1-BmATpikU.js} +2 -2
  251. package/dist/app/server/assets/{secp256k1-5tp4GQIt.js.map → secp256k1-BmATpikU.js.map} +1 -1
  252. package/dist/app/server/assets/{sury-CWZTCd75-BPXRo6iz.js → sury-CWZTCd75-B2_9nmQ-.js} +2 -2
  253. package/dist/app/server/assets/{sury-CWZTCd75-BPXRo6iz.js.map → sury-CWZTCd75-B2_9nmQ-.js.map} +1 -1
  254. package/dist/app/server/assets/{suspense-CVCU9Kbi.js → suspense-gv0MCXZ8.js} +2 -2
  255. package/dist/app/server/assets/{suspense-CVCU9Kbi.js.map → suspense-gv0MCXZ8.js.map} +1 -1
  256. package/dist/app/server/assets/{useNavigate-D9psnozp.js → useNavigate-gn6-bYOz.js} +2 -2
  257. package/dist/app/server/assets/{useNavigate-D9psnozp.js.map → useNavigate-gn6-bYOz.js.map} +1 -1
  258. package/dist/app/server/assets/useRegisterFieldControl-DMeVvRtG.js +2 -0
  259. package/dist/app/server/assets/{useRegisterFieldControl-UOdCWAKS.js.map → useRegisterFieldControl-DMeVvRtG.js.map} +1 -1
  260. package/dist/app/server/assets/{utils-Dst7Jy9U.js → utils-CJnLBS6t.js} +2 -2
  261. package/dist/app/server/assets/{utils-Dst7Jy9U.js.map → utils-CJnLBS6t.js.map} +1 -1
  262. package/dist/app/server/assets/{valibot--1zFm7rT-LDsJca69.js → valibot--1zFm7rT-DAm9l6Yd.js} +2 -2
  263. package/dist/app/server/assets/{valibot--1zFm7rT-LDsJca69.js.map → valibot--1zFm7rT-DAm9l6Yd.js.map} +1 -1
  264. package/dist/app/server/assets/{valibot-D_HTw1Gn-DY-tIZ72.js → valibot-D_HTw1Gn-B_uu9X0a.js} +2 -2
  265. package/dist/app/server/assets/{valibot-D_HTw1Gn-DY-tIZ72.js.map → valibot-D_HTw1Gn-B_uu9X0a.js.map} +1 -1
  266. package/dist/app/server/assets/{zod-Bwrt9trS-Cf4c1iF8.js → zod-Bwrt9trS-DDq3sdx6.js} +2 -2
  267. package/dist/app/server/assets/{zod-Bwrt9trS-Cf4c1iF8.js.map → zod-Bwrt9trS-DDq3sdx6.js.map} +1 -1
  268. package/dist/app/server/assets/{zod-DSgpEGAE-IkLVlUaZ.js → zod-DSgpEGAE-Dzlub58Z.js} +2 -2
  269. package/dist/app/server/assets/{zod-DSgpEGAE-IkLVlUaZ.js.map → zod-DSgpEGAE-Dzlub58Z.js.map} +1 -1
  270. package/dist/app/server/assets/zyzz-6R2K52xP.css +1 -0
  271. package/dist/app/server/assets/{zyzz.config-DYq-16_0.js → zyzz.config-CW977vYL.js} +3 -3
  272. package/dist/app/server/assets/zyzz.config-CW977vYL.js.map +1 -0
  273. package/dist/app/server/index.js +3 -3
  274. package/package.json +1 -1
  275. package/dist/app/client/assets/Account-DiXbQ7gq.css +0 -1
  276. package/dist/app/client/assets/Account-JXT-dSA8.js +0 -1
  277. package/dist/app/client/assets/Amount-C5uw89Ge.js +0 -1
  278. package/dist/app/client/assets/Amount-Ck6sPRDT.css +0 -1
  279. package/dist/app/client/assets/Callout-DE0CvxbE.css +0 -1
  280. package/dist/app/client/assets/Callout-D_dLrptL.js +0 -1
  281. package/dist/app/client/assets/CodeInput-CXbj-o_B.js +0 -1
  282. package/dist/app/client/assets/CodeInput-C_clyqA2.css +0 -1
  283. package/dist/app/client/assets/Deposit-CAkrtNYZ.css +0 -1
  284. package/dist/app/client/assets/Deposit-Cv7IQBO0.js +0 -1
  285. package/dist/app/client/assets/DevTools-CnWAfvO2.js +0 -1
  286. package/dist/app/client/assets/DevTools-DLG9O0YT.css +0 -1
  287. package/dist/app/client/assets/Grant-B6bmC4rh.css +0 -1
  288. package/dist/app/client/assets/Hex-BR5nHbFT.js +0 -10
  289. package/dist/app/client/assets/Hex-CriDfcNg.css +0 -1
  290. package/dist/app/client/assets/IconChip-BVqRSUpG.css +0 -1
  291. package/dist/app/client/assets/IconChip-ClKbN-8M.js +0 -1
  292. package/dist/app/client/assets/InputGroup-4QFqa-T2.css +0 -1
  293. package/dist/app/client/assets/InputGroup-CEI6gBId.js +0 -1
  294. package/dist/app/client/assets/Inter-Variable-DiVDrmQJ.woff2 +0 -0
  295. package/dist/app/client/assets/Loader-CtzJeMeX.js +0 -1
  296. package/dist/app/client/assets/Rows-DgpXomcK.js +0 -1
  297. package/dist/app/client/assets/Rows-oSTffNii.css +0 -1
  298. package/dist/app/client/assets/SignIn-CjGB1wk9.js +0 -1
  299. package/dist/app/client/assets/SignIn-Dz1G9XNf.css +0 -1
  300. package/dist/app/client/assets/Stack-90EFgtQe.js +0 -1
  301. package/dist/app/client/assets/Stack-CKvHhjzW.css +0 -1
  302. package/dist/app/client/assets/ToolbarRootContext-dnisUzmP.js +0 -1
  303. package/dist/app/client/assets/Tooltip-9TI_rDvs.css +0 -1
  304. package/dist/app/client/assets/Tooltip-C3H_9mgz.js +0 -1
  305. package/dist/app/client/assets/___-7yUISk6H.css +0 -1
  306. package/dist/app/client/assets/___.flows-DwoJPGMf.js +0 -5
  307. package/dist/app/client/assets/index-BXTO-7dr.css +0 -1
  308. package/dist/app/client/assets/index-CkKM7xlX.js +0 -13
  309. package/dist/app/client/assets/pathUSD-DY3ycgMd.js +0 -1
  310. package/dist/app/client/assets/pathUSD-Dn2NadYx.css +0 -1
  311. package/dist/app/client/assets/useNavigate-DsbQ8bTr.js +0 -1
  312. package/dist/app/client/assets/zyzz-MTPfhrAv.css +0 -1
  313. package/dist/app/client/assets/zyzz.config-ENEfJGzk.js +0 -2
  314. package/dist/app/server/assets/Account-BqjoGTzm.js +0 -2
  315. package/dist/app/server/assets/Account-BqjoGTzm.js.map +0 -1
  316. package/dist/app/server/assets/Account-DiXbQ7gq.css +0 -1
  317. package/dist/app/server/assets/Amount-Ck6sPRDT.css +0 -1
  318. package/dist/app/server/assets/Amount-CmypanEu.js +0 -2
  319. package/dist/app/server/assets/Amount-CmypanEu.js.map +0 -1
  320. package/dist/app/server/assets/Callout-DE0CvxbE.css +0 -1
  321. package/dist/app/server/assets/Callout-_eafmkya.js +0 -2
  322. package/dist/app/server/assets/Callout-_eafmkya.js.map +0 -1
  323. package/dist/app/server/assets/CodeInput-CRxIP0KX.js +0 -2
  324. package/dist/app/server/assets/CodeInput-CRxIP0KX.js.map +0 -1
  325. package/dist/app/server/assets/CodeInput-C_clyqA2.css +0 -1
  326. package/dist/app/server/assets/Deposit-CAkrtNYZ.css +0 -1
  327. package/dist/app/server/assets/Deposit-CiWidviP.js +0 -2
  328. package/dist/app/server/assets/Deposit-CiWidviP.js.map +0 -1
  329. package/dist/app/server/assets/DevTools-BJcNvNjx.js +0 -2
  330. package/dist/app/server/assets/DevTools-BJcNvNjx.js.map +0 -1
  331. package/dist/app/server/assets/DevTools-DLG9O0YT.css +0 -1
  332. package/dist/app/server/assets/Grant-B6bmC4rh.css +0 -1
  333. package/dist/app/server/assets/Grant-N8RQy7lZ.js +0 -2
  334. package/dist/app/server/assets/Grant-N8RQy7lZ.js.map +0 -1
  335. package/dist/app/server/assets/Hex-CriDfcNg.css +0 -1
  336. package/dist/app/server/assets/Hex-vNjxlXvk.js +0 -11
  337. package/dist/app/server/assets/Hex-vNjxlXvk.js.map +0 -1
  338. package/dist/app/server/assets/IconChip-BQdjH8i6.js +0 -2
  339. package/dist/app/server/assets/IconChip-BQdjH8i6.js.map +0 -1
  340. package/dist/app/server/assets/IconChip-BVqRSUpG.css +0 -1
  341. package/dist/app/server/assets/InputGroup-4QFqa-T2.css +0 -1
  342. package/dist/app/server/assets/InputGroup-BhUIBTgI.js +0 -2
  343. package/dist/app/server/assets/InputGroup-BhUIBTgI.js.map +0 -1
  344. package/dist/app/server/assets/Inter-Variable-DiVDrmQJ.woff2 +0 -0
  345. package/dist/app/server/assets/Loader-Ivf5dWFl.js +0 -2
  346. package/dist/app/server/assets/PopoverPopup-D98JOZVe.js +0 -2
  347. package/dist/app/server/assets/Rows-BuyZXkPa.js +0 -2
  348. package/dist/app/server/assets/Rows-BuyZXkPa.js.map +0 -1
  349. package/dist/app/server/assets/Rows-oSTffNii.css +0 -1
  350. package/dist/app/server/assets/SignIn-D7jl6zbw.js +0 -2
  351. package/dist/app/server/assets/SignIn-D7jl6zbw.js.map +0 -1
  352. package/dist/app/server/assets/SignIn-Dz1G9XNf.css +0 -1
  353. package/dist/app/server/assets/Stack-C3ecM7vx.js +0 -2
  354. package/dist/app/server/assets/Stack-C3ecM7vx.js.map +0 -1
  355. package/dist/app/server/assets/Stack-CKvHhjzW.css +0 -1
  356. package/dist/app/server/assets/ToolbarRootContext-BCmWBQ7n.js +0 -2
  357. package/dist/app/server/assets/Tooltip-9TI_rDvs.css +0 -1
  358. package/dist/app/server/assets/Tooltip-D3NLigmC.js +0 -2
  359. package/dist/app/server/assets/Tooltip-D3NLigmC.js.map +0 -1
  360. package/dist/app/server/assets/___-7yUISk6H.css +0 -1
  361. package/dist/app/server/assets/___.flows-DRvHKxBR.js +0 -6
  362. package/dist/app/server/assets/___.flows-DRvHKxBR.js.map +0 -1
  363. package/dist/app/server/assets/_tanstack-start-manifest_v-BIobT_5u.js +0 -1
  364. package/dist/app/server/assets/default-u_dwuiYb-BZX-cEte.js +0 -2
  365. package/dist/app/server/assets/dist-k0uWU-Rh.js +0 -1
  366. package/dist/app/server/assets/getPseudoElementBounds-BdqJhx6M.js +0 -2
  367. package/dist/app/server/assets/pathUSD-CVs71wGH.js +0 -2
  368. package/dist/app/server/assets/pathUSD-CVs71wGH.js.map +0 -1
  369. package/dist/app/server/assets/pathUSD-Dn2NadYx.css +0 -1
  370. package/dist/app/server/assets/react-dom-bupMaze0.css +0 -1
  371. package/dist/app/server/assets/router-uhTdTHZE.js.map +0 -1
  372. package/dist/app/server/assets/routes-ZveUsG66.js +0 -2
  373. package/dist/app/server/assets/routes-ZveUsG66.js.map +0 -1
  374. package/dist/app/server/assets/routes-dxKeFXjL.css +0 -1
  375. package/dist/app/server/assets/useRegisterFieldControl-UOdCWAKS.js +0 -2
  376. package/dist/app/server/assets/zyzz-DuvTIyXM.css +0 -1
  377. package/dist/app/server/assets/zyzz.config-DYq-16_0.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"login-BR3Vh4Jw.js","names":["useMutation","useRouter","parseResponse","useEffect","useState","Authentication","Client","SignIn","style","CeremonyError","Error","name","Route","Page","props","client","use","router","link","setLink","undefined","passkey","mutationFn","variables","assertion","ceremony","v1","auth","verify","$post","json","oauthQuery","resend","sendCode","send","isSuccess","timer","window","setTimeout","reset","sentDelay","clearTimeout","linked","code","email","options","response","userCode","user_code","allowCredentials","publicKey","sign","getFn","request","navigator","credentials","get","error","cause","submitEmail","event","preventDefault","isPending","mutate","String","FormData","currentTarget","submitCode","form","onError","linkFailed","field","elements","namedItem","HTMLInputElement","value","focus","onSuccess","data","continueTo","verifiedDelay","redirect","location","assign","returnTo","navigate","to","signInWithGoogle","page","URL","href","searchParams","delete","url","origin","set","pathname","search","oauth_query","signInWithPasskey","applyPasskey","step","sendAgain","changeEmail","startOver","failed","isIdle","styles","className","Boolean","message","google","passkeys","reason","names","includes","params","URLSearchParams","has","toString","_styles","SplitComponent","useLoaderData","component","Client.use","useState","Authentication.sign","reason","Client.reason","Client.message","require_react","useRouter","__toESM","require_jsx_runtime","use","reason","message$1","useMutation","sign","SignIn","Route","import_react","import_jsx_runtime","CeremonyError","Page","client","router","link","setLink","passkey","assertion","variables","ceremony","parseResponse","oauthQuery","resend","sendCode","send","timer","sentDelay","verify","linked","email","options","publicKey","props","request","allowCredentials","error","submitEmail","event","submitCode","form","linkFailed","field","continueTo","data","verifiedDelay","signInWithGoogle","page","url","oauth_query","signInWithPasskey","applyPasskey","sendAgain","changeEmail","startOver","failed","styles","message","reason$1","names","params","SplitComponent"],"sources":["../../../routes/login.tsx?tsr-split=component"],"sourcesContent":["/**\n * The sign-in page: an emailed code, Google, or a passkey. A wallet.tempo passkey without an email\n * waits for the code that links it. @module\n */\nimport { useMutation } from '@tanstack/react-query'\nimport { createFileRoute, useRouter } from '@tanstack/react-router'\nimport { type InferResponseType, parseResponse } from 'hono/client'\nimport { type FormEvent, useEffect, useState } from 'react'\nimport { Authentication } from 'webauthx/client'\nimport * as Client from '../lib/Client.js'\nimport * as Loader from '../lib/Loader.js'\nimport { SignIn } from '../screens/SignIn.js'\nimport { style } from '../zyzz.config.js'\n\n/** A signed passkey assertion, as the browser returns it. */\ntype Assertion = Awaited<ReturnType<typeof Authentication.sign>>\n\n/** A passkey verification's response: a signed-in user, or the email step. */\ntype PasskeyResult = InferResponseType<\n Client.Client['v1']['auth']['passkey']['verify']['$post'],\n 200\n>\n\n/** Wraps a failure of the browser's passkey ceremony. */\nclass CeremonyError extends Error {\n override name = 'Page.CeremonyError'\n}\n\nexport const Route = createFileRoute('/login')({\n component: () => <Page {...Route.useLoaderData()} />,\n /**\n * Redirects a signed-in user to `return_to` or the account, unless the request is signed.\n * Otherwise returns the sign-in methods.\n */\n loader: async (match): Promise<Page.Props> => {\n const query = new URLSearchParams(match.location.searchStr)\n const signed = query.has('sig')\n const returnTo = query.get('return_to')\n const client = Client.create()\n const [session, methods] = await Promise.all([\n parseResponse(client.v1.auth.session.$get()),\n parseResponse(\n client.v1.auth.methods.$get({\n query: {\n // The API names the app only from a signed authorization request.\n ...(signed ? { oauth_query: query.toString() } : {}),\n ...(returnTo ? { return_to: returnTo } : {}),\n },\n }),\n ),\n ])\n if (session.user && !signed)\n Loader.redirect({ href: methods.return_to ?? '/' })\n\n return {\n // Better Auth sends its other failures here too, with their own codes. Only the failed route of\n // a provider sign-in sends `access_denied`.\n failed: methods.google && query.get('error') === 'access_denied',\n google: methods.google,\n passkeys: methods.passkeys,\n request: methods.app\n ? {\n app: methods.app,\n host: methods.host,\n key: methods.request?.key ?? null,\n verified: methods.verified,\n }\n : null,\n returnTo: methods.return_to,\n userCode: methods.user_code,\n }\n },\n // The loader reads the whole query, so a change to any parameter loads the page again.\n loaderDeps: (match) => ({ search: match.search }),\n server: {\n handlers: {\n // The sign-in form posts here only when it is submitted before the page hydrates, and the page\n // then sends the code itself. The redirect keeps the query, so an app's signed authorization\n // request stays on the page.\n POST: (options) =>\n new Response(null, {\n headers: { location: `/login${new URL(options.request.url).search}` },\n status: 303,\n }),\n },\n },\n})\n\n/** Renders the page. */\nfunction Page(props: Page.Props) {\n const client = Client.use()\n const router = useRouter()\n // The email step's link, while a wallet.tempo passkey waits for the code that links it.\n const [link, setLink] = useState<string | undefined>(undefined)\n const passkey = useMutation({\n async mutationFn(variables: { assertion?: Assertion | undefined }) {\n const assertion = variables.assertion ?? (await ceremony({}))\n return parseResponse(\n client.v1.auth.passkey.verify.$post({\n json: { assertion, ...oauthQuery() },\n }),\n )\n },\n })\n const resend = useMutation({ mutationFn: sendCode })\n const send = useMutation({ mutationFn: sendCode })\n\n // The confirmation of a resent code clears after a short time, so the button offers a resend again.\n useEffect(() => {\n if (!resend.isSuccess) return\n const timer = window.setTimeout(() => resend.reset(), sentDelay)\n return () => window.clearTimeout(timer)\n }, [resend.isSuccess, resend.reset])\n\n const verify = useMutation({\n async mutationFn(variables: { code: string; email: string }) {\n // The link's passkey signs again, so a page left at the email step links nothing for the next\n // person, who cannot sign with it.\n const linked = link ? { assertion: await ceremony({ link }), link } : {}\n return parseResponse(\n client.v1.auth.code.verify.$post({\n json: { ...variables, ...linked, ...oauthQuery() },\n }),\n )\n },\n })\n const email = send.isSuccess ? send.variables.email : undefined\n\n /** Requests passkey options and signs them. With `link`, it requests the email step's passkey. */\n async function ceremony(options: { link?: string | undefined }) {\n const { link } = options\n const response = await parseResponse(\n client.v1.auth.passkey.options.$post({\n json: {\n ...(link ? { link } : {}),\n ...oauthQuery(),\n // The API reads the device app from the code itself, so the code selects its realms.\n ...(props.userCode ? { user_code: props.userCode } : {}),\n },\n }),\n )\n // The response reads optional fields as possibly `undefined`, which the ceremony's options\n // omit instead.\n const { allowCredentials, ...publicKey } = response.options.publicKey\n try {\n return await Authentication.sign({\n // ox types the request with optional members that the DOM types leave out when absent. The\n // object is the one that ox built for `navigator.credentials.get`.\n getFn: (request) =>\n navigator.credentials.get(request as CredentialRequestOptions),\n options: {\n publicKey: {\n ...publicKey,\n ...(allowCredentials ? { allowCredentials } : {}),\n },\n },\n })\n } catch (error) {\n throw new CeremonyError('Passkey ceremony failed.', { cause: error })\n }\n }\n\n function sendCode(variables: { email: string }) {\n return parseResponse(client.v1.auth.code.$post({ json: variables }))\n }\n\n function submitEmail(event: FormEvent<HTMLFormElement>) {\n event.preventDefault()\n // One sign-in runs at a time, since a passkey sign-in sets its own session.\n if (send.isPending || passkey.isPending) return\n passkey.reset()\n send.mutate({\n email: String(new FormData(event.currentTarget).get('email')),\n })\n }\n\n function submitCode(event: FormEvent<HTMLFormElement>) {\n event.preventDefault()\n // A complete code submits the form, and Enter can submit it again before the first returns.\n if (!email || verify.isPending || verify.isSuccess) return\n const form = event.currentTarget\n resend.reset()\n verify.mutate(\n { code: String(new FormData(form).get('code')), email },\n {\n onError(error) {\n // An expired link, or a passkey that does not sign again, leaves the code valid, so the next\n // attempt signs in with email only.\n if (linkFailed(error)) setLink(undefined)\n // The refused code clears, so the next one can be typed at once.\n const field = form.elements.namedItem('code')\n if (!(field instanceof HTMLInputElement)) return\n field.value = ''\n field.focus()\n },\n onSuccess(data) {\n // The accepted code shows green for a moment, so the sign-in confirms it before it\n // continues. The router renders a failed navigation itself, so the timer need not wait.\n window.setTimeout(() => continueTo(data), verifiedDelay)\n },\n },\n )\n }\n\n /** Continues to the app's redirect, to `returnTo`, or to the account. */\n function continueTo(data: { redirect: string | null }) {\n if (data.redirect) window.location.assign(data.redirect)\n // The device page loads as a document, so its loader reads the code on the server, where a\n // refused lookup logs nothing in the browser.\n else if (props.returnTo) window.location.assign(props.returnTo)\n else void router.navigate({ to: '/' })\n }\n\n /** Redirects the browser to Google, which returns here or continues the app's request. */\n function signInWithGoogle() {\n const page = new URL(window.location.href)\n // The next attempt drops the failure of the last one.\n page.searchParams.delete('error')\n const url = new URL('/v1/auth/oauth/google', window.location.origin)\n // A path, which Tempo ID resolves against its own origin.\n url.searchParams.set('return_to', page.pathname + page.search)\n const { oauth_query } = oauthQuery()\n if (oauth_query) url.searchParams.set('oauth_query', oauth_query)\n window.location.assign(url)\n }\n\n function signInWithPasskey() {\n if (passkey.isPending) return\n send.reset()\n // The result applies through the call's own callback, which a reset drops, so a sign-in that\n // returns after the email path takes over sets no link.\n passkey.mutate({}, { onSuccess: applyPasskey })\n }\n\n /** Continues a passkey sign-in, or requests the email for a wallet.tempo passkey. */\n function applyPasskey(data: PasskeyResult) {\n if ('step' in data) setLink(data.step.link)\n else continueTo({ redirect: data.redirect })\n }\n\n function sendAgain() {\n if (!email || verify.isPending || verify.isSuccess) return\n verify.reset()\n resend.mutate({ email })\n }\n\n // A reset mutation drops the callbacks of its request, so a result that returns after the\n // address changes updates nothing. The passkey's link clears too, so the code of another address\n // in a shared browser links nothing.\n function changeEmail() {\n passkey.reset()\n resend.reset()\n send.reset()\n setLink(undefined)\n verify.reset()\n }\n\n // A tab left at the email step can reach the next person, who drops the passkey's link here. The\n // reset drops a pending code request too, so its result does not open the code step.\n function startOver() {\n passkey.reset()\n send.reset()\n setLink(undefined)\n }\n\n const error = (() => {\n if (email) return verify.error ?? resend.error\n return send.error ?? passkey.error\n })()\n // The failure of a Google sign-in shows until another sign-in starts.\n const failed = props.failed && send.isIdle && passkey.isIdle\n\n return (\n <main {...styles.page()}>\n <SignIn\n autoFocus\n // Sign-in returns only to the device page, so any `return_to` names a device approval.\n device={Boolean(props.returnTo)}\n email={email}\n error={(() => {\n if (error) return message(error, { code: Boolean(email) })\n if (failed)\n return 'Sign-in with Google failed. Try again, or continue with email.'\n return undefined\n })()}\n invalid={Boolean(email ? verify.error : send.error)}\n linking={Boolean(link)}\n onChangeEmail={changeEmail}\n onGoogle={props.google ? signInWithGoogle : undefined}\n onPasskey={props.passkeys ? signInWithPasskey : undefined}\n onResend={sendAgain}\n onStartOver={startOver}\n onSubmitCode={submitCode}\n onSubmitEmail={submitEmail}\n passkeyPending={passkey.isPending}\n request={props.request ?? undefined}\n resend={(() => {\n if (resend.isPending) return 'pending'\n if (resend.isSuccess) return 'sent'\n return 'idle'\n })()}\n sending={send.isPending}\n verified={verify.isSuccess}\n verifying={verify.isPending}\n />\n </main>\n )\n}\n\ndeclare namespace Page {\n type Props = {\n /** Whether a Google sign-in returned here with `error`. */\n failed: boolean\n /** Whether the deployment offers Google sign-in. */\n google: boolean\n /** Whether the app's realms offer passkey sign-in. */\n passkeys: boolean\n /** The app's request that the sign-in continues, with its key, or `null`. */\n request: SignIn.Props['request'] | null\n /** The device page's path that sign-in returns to, or `null` for the account. */\n returnTo: string | null\n /** The device page's user code, or `null`. */\n userCode: string | null\n }\n}\n\n/** Milliseconds that the button shows \"Code sent\" after a resend. */\nconst sentDelay = 5000\n\n/** Milliseconds that an accepted code shows green. */\nconst verifiedDelay = 500\n\n/** Returns whether `error` refused the email step's link, which leaves the code valid. */\nfunction linkFailed(error: unknown) {\n if (error instanceof CeremonyError) return true\n const reason = Client.reason(error)\n return (\n reason === 'passkey_link_expired' ||\n reason === 'passkey_not_permitted' ||\n reason === 'webauthn_rejected'\n )\n}\n\n/** Returns the message for `error`, such as for a canceled ceremony. */\nfunction message(error: unknown, options: message.Options) {\n // At the code step, only the link's passkey runs a ceremony, and its failure drops the link. An\n // expired or refused link keeps the refusal's own message.\n if (\n options.code &&\n (error instanceof CeremonyError ||\n Client.reason(error) === 'webauthn_rejected')\n )\n return 'Your passkey did not confirm the sign-in. Enter the code again to sign in with email only.'\n if (!(error instanceof CeremonyError)) return Client.message(error)\n if (names(error).includes('NotAllowedError'))\n return 'Passkey sign-in was canceled. Try again, or continue with email.'\n return 'Passkey sign-in failed. Try again, or continue with email.'\n}\n\ndeclare namespace message {\n type Options = {\n /** Whether the page shows the code step, where a refused link drops the link. */\n code: boolean\n }\n}\n\n/** Returns the names of `error` and its causes. */\nfunction names(error: unknown): readonly string[] {\n if (!(error instanceof Error)) return []\n return [error.name, ...names(error.cause)]\n}\n\n/** Returns the page's signed request as `oauth_query`, without a Google `error`, or nothing. */\nfunction oauthQuery(): { oauth_query?: string } {\n const params = new URLSearchParams(window.location.search)\n if (!params.has('sig')) return {}\n params.delete('error')\n return { oauth_query: params.toString() }\n}\n\nnamespace styles {\n export const page = style({\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'center',\n minHeight: '100dvh !custom',\n paddingBlock: '64',\n paddingInline: '16',\n })\n}\n"],"mappings":"A,wTAwBMS,EAAN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AK,EAClC,OACEwD,IAAW,wBACXA,IAAW,yBACXA,IAAW,mBAEf,CAGA,SAASH,EAAQrD,EAAgBZ,EAA0B,CAYzD,OAREA,EAAQF,OACPc,aAAiBhD,GAChBH,EAAcmD,CAAK,IAAM,qBAEpB,6FACHA,aAAiBhD,EACnByG,EAAMzD,CAAK,CAAC,CAAC0D,SAAS,iBAAiB,EAClC,mEACF,6DAHuC7G,EAAemD,CAAK,CAIpE,CAUA,SAASyD,EAAMzD,EAAmC,CAEhD,OADMA,aAAiB/C,MAChB,CAAC+C,EAAM9C,KAAM,GAAGuG,EAAMzD,EAAMC,KAAK,CAAC,EADH,CAAA,CAExC,CAGA,SAAS3B,GAAuC,CAC9C,IAAMqF,EAAS,IAAIC,gBAAgBhF,OAAO6C,SAASe,MAAM,EAGzD,OAFKmB,EAAOE,IAAI,KAAK,GACrBF,EAAOxB,OAAO,OAAO,EACd,CAAEM,YAAakB,EAAOG,SAAS,CAAE,GAFT,CAAC,CAGlC,CAEA,IAAUZ,GAAV,SAAAa,EAAA,CACeA,EAAAhC,KAAO,CAQtB,EAAA,CAAAmB,AAAAA,IAAA,CAAA,CAAA,E,WAxWmB,EAAAmC,EAAA,IAAA,CAACE,EAAD,CAAM,GAAIpI,EAAM8G,cAAc,CAAC,CAAA,E"}
1
+ {"version":3,"file":"login-6K4ND-gN.js","names":["useMutation","useRouter","parseResponse","useEffect","useState","Authentication","Client","SignIn","style","CeremonyError","Error","name","Route","Page","props","client","use","router","link","setLink","undefined","passkey","mutationFn","variables","assertion","ceremony","v1","auth","verify","$post","json","oauthQuery","resend","sendCode","send","isSuccess","timer","window","setTimeout","reset","sentDelay","clearTimeout","linked","code","email","options","response","userCode","user_code","allowCredentials","publicKey","sign","getFn","request","navigator","credentials","get","error","cause","submitEmail","event","preventDefault","isPending","mutate","String","FormData","currentTarget","submitCode","form","onError","linkFailed","field","elements","namedItem","HTMLInputElement","value","focus","onSuccess","data","continueTo","verifiedDelay","redirect","location","assign","returnTo","navigate","to","signInWithGoogle","page","URL","href","searchParams","delete","url","origin","set","pathname","search","oauth_query","signInWithPasskey","applyPasskey","step","sendAgain","changeEmail","startOver","failed","isIdle","styles","className","Boolean","message","google","passkeys","reason","names","includes","params","URLSearchParams","has","toString","_styles","SplitComponent","useLoaderData","component","Client.use","useState","Authentication.sign","reason","Client.reason","Client.message","require_react","useRouter","__toESM","require_jsx_runtime","use","reason","message$1","useMutation","sign","SignIn","Route","import_react","import_jsx_runtime","CeremonyError","Page","client","router","link","setLink","passkey","assertion","variables","ceremony","parseResponse","oauthQuery","resend","sendCode","send","timer","sentDelay","verify","linked","email","options","publicKey","props","request","allowCredentials","error","submitEmail","event","submitCode","form","linkFailed","field","continueTo","data","verifiedDelay","signInWithGoogle","page","url","oauth_query","signInWithPasskey","applyPasskey","sendAgain","changeEmail","startOver","failed","styles","message","reason$1","names","params","SplitComponent"],"sources":["../../../routes/login.tsx?tsr-split=component"],"sourcesContent":["/**\n * The sign-in page: an emailed code, Google, or a passkey. A wallet.tempo passkey without an email\n * waits for the code that links it. @module\n */\nimport { useMutation } from '@tanstack/react-query'\nimport { createFileRoute, useRouter } from '@tanstack/react-router'\nimport { type InferResponseType, parseResponse } from 'hono/client'\nimport { type FormEvent, useEffect, useState } from 'react'\nimport { Authentication } from 'webauthx/client'\nimport * as Client from '../lib/Client.js'\nimport * as Loader from '../lib/Loader.js'\nimport { SignIn } from '../screens/SignIn.js'\nimport { style } from '../zyzz.config.js'\n\n/** A signed passkey assertion, as the browser returns it. */\ntype Assertion = Awaited<ReturnType<typeof Authentication.sign>>\n\n/** A passkey verification's response: a signed-in user, or the email step. */\ntype PasskeyResult = InferResponseType<\n Client.Client['v1']['auth']['passkey']['verify']['$post'],\n 200\n>\n\n/** Wraps a failure of the browser's passkey ceremony. */\nclass CeremonyError extends Error {\n override name = 'Page.CeremonyError'\n}\n\nexport const Route = createFileRoute('/login')({\n component: () => <Page {...Route.useLoaderData()} />,\n /**\n * Redirects a signed-in user to `return_to` or the account, unless the request is signed.\n * Otherwise returns the sign-in methods.\n */\n loader: async (match): Promise<Page.Props> => {\n const query = new URLSearchParams(match.location.searchStr)\n const signed = query.has('sig')\n const returnTo = query.get('return_to')\n const client = Client.create()\n const [session, methods] = await Promise.all([\n parseResponse(client.v1.auth.session.$get()),\n parseResponse(\n client.v1.auth.methods.$get({\n query: {\n // The API names the app only from a signed authorization request.\n ...(signed ? { oauth_query: query.toString() } : {}),\n ...(returnTo ? { return_to: returnTo } : {}),\n },\n }),\n ),\n ])\n if (session.user && !signed)\n Loader.redirect({ href: methods.return_to ?? '/' })\n\n return {\n // Better Auth sends its other failures here too, with their own codes. Only the failed route of\n // a provider sign-in sends `access_denied`.\n failed: methods.google && query.get('error') === 'access_denied',\n google: methods.google,\n passkeys: methods.passkeys,\n request: methods.app\n ? {\n app: methods.app,\n host: methods.host,\n key: methods.request?.key ?? null,\n verified: methods.verified,\n }\n : null,\n returnTo: methods.return_to,\n userCode: methods.user_code,\n }\n },\n // The loader reads the whole query, so a change to any parameter loads the page again.\n loaderDeps: (match) => ({ search: match.search }),\n server: {\n handlers: {\n // The sign-in form posts here only when it is submitted before the page hydrates, and the page\n // then sends the code itself. The redirect keeps the query, so an app's signed authorization\n // request stays on the page.\n POST: (options) =>\n new Response(null, {\n headers: { location: `/login${new URL(options.request.url).search}` },\n status: 303,\n }),\n },\n },\n})\n\n/** Renders the page. */\nfunction Page(props: Page.Props) {\n const client = Client.use()\n const router = useRouter()\n // The email step's link, while a wallet.tempo passkey waits for the code that links it.\n const [link, setLink] = useState<string | undefined>(undefined)\n const passkey = useMutation({\n async mutationFn(variables: { assertion?: Assertion | undefined }) {\n const assertion = variables.assertion ?? (await ceremony({}))\n return parseResponse(\n client.v1.auth.passkey.verify.$post({\n json: { assertion, ...oauthQuery() },\n }),\n )\n },\n })\n const resend = useMutation({ mutationFn: sendCode })\n const send = useMutation({ mutationFn: sendCode })\n\n // The confirmation of a resent code clears after a short time, so the button offers a resend again.\n useEffect(() => {\n if (!resend.isSuccess) return\n const timer = window.setTimeout(() => resend.reset(), sentDelay)\n return () => window.clearTimeout(timer)\n }, [resend.isSuccess, resend.reset])\n\n const verify = useMutation({\n async mutationFn(variables: { code: string; email: string }) {\n // The link's passkey signs again, so a page left at the email step links nothing for the next\n // person, who cannot sign with it.\n const linked = link ? { assertion: await ceremony({ link }), link } : {}\n return parseResponse(\n client.v1.auth.code.verify.$post({\n json: { ...variables, ...linked, ...oauthQuery() },\n }),\n )\n },\n })\n const email = send.isSuccess ? send.variables.email : undefined\n\n /** Requests passkey options and signs them. With `link`, it requests the email step's passkey. */\n async function ceremony(options: { link?: string | undefined }) {\n const { link } = options\n const response = await parseResponse(\n client.v1.auth.passkey.options.$post({\n json: {\n ...(link ? { link } : {}),\n ...oauthQuery(),\n // The API reads the device app from the code itself, so the code selects its realms.\n ...(props.userCode ? { user_code: props.userCode } : {}),\n },\n }),\n )\n // The response reads optional fields as possibly `undefined`, which the ceremony's options\n // omit instead.\n const { allowCredentials, ...publicKey } = response.options.publicKey\n try {\n return await Authentication.sign({\n // ox types the request with optional members that the DOM types leave out when absent. The\n // object is the one that ox built for `navigator.credentials.get`.\n getFn: (request) =>\n navigator.credentials.get(request as CredentialRequestOptions),\n options: {\n publicKey: {\n ...publicKey,\n ...(allowCredentials ? { allowCredentials } : {}),\n },\n },\n })\n } catch (error) {\n throw new CeremonyError('Passkey ceremony failed.', { cause: error })\n }\n }\n\n function sendCode(variables: { email: string }) {\n return parseResponse(client.v1.auth.code.$post({ json: variables }))\n }\n\n function submitEmail(event: FormEvent<HTMLFormElement>) {\n event.preventDefault()\n // One sign-in runs at a time, since a passkey sign-in sets its own session.\n if (send.isPending || passkey.isPending) return\n passkey.reset()\n send.mutate({\n email: String(new FormData(event.currentTarget).get('email')),\n })\n }\n\n function submitCode(event: FormEvent<HTMLFormElement>) {\n event.preventDefault()\n // A complete code submits the form, and Enter can submit it again before the first returns.\n if (!email || verify.isPending || verify.isSuccess) return\n const form = event.currentTarget\n resend.reset()\n verify.mutate(\n { code: String(new FormData(form).get('code')), email },\n {\n onError(error) {\n // An expired link, or a passkey that does not sign again, leaves the code valid, so the next\n // attempt signs in with email only.\n if (linkFailed(error)) setLink(undefined)\n // The refused code clears, so the next one can be typed at once.\n const field = form.elements.namedItem('code')\n if (!(field instanceof HTMLInputElement)) return\n field.value = ''\n field.focus()\n },\n onSuccess(data) {\n // The accepted code shows green for a moment, so the sign-in confirms it before it\n // continues. The router renders a failed navigation itself, so the timer need not wait.\n window.setTimeout(() => continueTo(data), verifiedDelay)\n },\n },\n )\n }\n\n /** Continues to the app's redirect, to `returnTo`, or to the account. */\n function continueTo(data: { redirect: string | null }) {\n if (data.redirect) window.location.assign(data.redirect)\n // The device page loads as a document, so its loader reads the code on the server, where a\n // refused lookup logs nothing in the browser.\n else if (props.returnTo) window.location.assign(props.returnTo)\n else void router.navigate({ to: '/' })\n }\n\n /** Redirects the browser to Google, which returns here or continues the app's request. */\n function signInWithGoogle() {\n const page = new URL(window.location.href)\n // The next attempt drops the failure of the last one.\n page.searchParams.delete('error')\n const url = new URL('/v1/auth/oauth/google', window.location.origin)\n // A path, which Tempo ID resolves against its own origin.\n url.searchParams.set('return_to', page.pathname + page.search)\n const { oauth_query } = oauthQuery()\n if (oauth_query) url.searchParams.set('oauth_query', oauth_query)\n window.location.assign(url)\n }\n\n function signInWithPasskey() {\n if (passkey.isPending) return\n send.reset()\n // The result applies through the call's own callback, which a reset drops, so a sign-in that\n // returns after the email path takes over sets no link.\n passkey.mutate({}, { onSuccess: applyPasskey })\n }\n\n /** Continues a passkey sign-in, or requests the email for a wallet.tempo passkey. */\n function applyPasskey(data: PasskeyResult) {\n if ('step' in data) setLink(data.step.link)\n else continueTo({ redirect: data.redirect })\n }\n\n function sendAgain() {\n if (!email || verify.isPending || verify.isSuccess) return\n verify.reset()\n resend.mutate({ email })\n }\n\n // A reset mutation drops the callbacks of its request, so a result that returns after the\n // address changes updates nothing. The passkey's link clears too, so the code of another address\n // in a shared browser links nothing.\n function changeEmail() {\n passkey.reset()\n resend.reset()\n send.reset()\n setLink(undefined)\n verify.reset()\n }\n\n // A tab left at the email step can reach the next person, who drops the passkey's link here. The\n // reset drops a pending code request too, so its result does not open the code step.\n function startOver() {\n passkey.reset()\n send.reset()\n setLink(undefined)\n }\n\n const error = (() => {\n if (email) return verify.error ?? resend.error\n return send.error ?? passkey.error\n })()\n // The failure of a Google sign-in shows until another sign-in starts.\n const failed = props.failed && send.isIdle && passkey.isIdle\n\n return (\n <main {...styles.page()}>\n <SignIn\n autoFocus\n // Sign-in returns only to the device page, so any `return_to` names a device approval.\n device={Boolean(props.returnTo)}\n email={email}\n error={(() => {\n if (error) return message(error, { code: Boolean(email) })\n if (failed)\n return 'Sign-in with Google failed. Try again, or continue with email.'\n return undefined\n })()}\n invalid={Boolean(email ? verify.error : send.error)}\n linking={Boolean(link)}\n onChangeEmail={changeEmail}\n onGoogle={props.google ? signInWithGoogle : undefined}\n onPasskey={props.passkeys ? signInWithPasskey : undefined}\n onResend={sendAgain}\n onStartOver={startOver}\n onSubmitCode={submitCode}\n onSubmitEmail={submitEmail}\n passkeyPending={passkey.isPending}\n request={props.request ?? undefined}\n resend={(() => {\n if (resend.isPending) return 'pending'\n if (resend.isSuccess) return 'sent'\n return 'idle'\n })()}\n sending={send.isPending}\n verified={verify.isSuccess}\n verifying={verify.isPending}\n />\n </main>\n )\n}\n\ndeclare namespace Page {\n type Props = {\n /** Whether a Google sign-in returned here with `error`. */\n failed: boolean\n /** Whether the deployment offers Google sign-in. */\n google: boolean\n /** Whether the app's realms offer passkey sign-in. */\n passkeys: boolean\n /** The app's request that the sign-in continues, with its key, or `null`. */\n request: SignIn.Props['request'] | null\n /** The device page's path that sign-in returns to, or `null` for the account. */\n returnTo: string | null\n /** The device page's user code, or `null`. */\n userCode: string | null\n }\n}\n\n/** Milliseconds that the button shows \"Code sent\" after a resend. */\nconst sentDelay = 5000\n\n/** Milliseconds that an accepted code shows green. */\nconst verifiedDelay = 500\n\n/** Returns whether `error` refused the email step's link, which leaves the code valid. */\nfunction linkFailed(error: unknown) {\n if (error instanceof CeremonyError) return true\n const reason = Client.reason(error)\n return (\n reason === 'passkey_link_expired' ||\n reason === 'passkey_not_permitted' ||\n reason === 'webauthn_rejected'\n )\n}\n\n/** Returns the message for `error`, such as for a canceled ceremony. */\nfunction message(error: unknown, options: message.Options) {\n // At the code step, only the link's passkey runs a ceremony, and its failure drops the link. An\n // expired or refused link keeps the refusal's own message.\n if (\n options.code &&\n (error instanceof CeremonyError ||\n Client.reason(error) === 'webauthn_rejected')\n )\n return 'Your passkey did not confirm the sign-in. Enter the code again to sign in with email only.'\n if (!(error instanceof CeremonyError)) return Client.message(error)\n if (names(error).includes('NotAllowedError'))\n return 'Passkey sign-in was canceled. Try again, or continue with email.'\n return 'Passkey sign-in failed. Try again, or continue with email.'\n}\n\ndeclare namespace message {\n type Options = {\n /** Whether the page shows the code step, where a refused link drops the link. */\n code: boolean\n }\n}\n\n/** Returns the names of `error` and its causes. */\nfunction names(error: unknown): readonly string[] {\n if (!(error instanceof Error)) return []\n return [error.name, ...names(error.cause)]\n}\n\n/** Returns the page's signed request as `oauth_query`, without a Google `error`, or nothing. */\nfunction oauthQuery(): { oauth_query?: string } {\n const params = new URLSearchParams(window.location.search)\n if (!params.has('sig')) return {}\n params.delete('error')\n return { oauth_query: params.toString() }\n}\n\nnamespace styles {\n export const page = style({\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'center',\n minHeight: '100dvh !custom',\n paddingBlock: '64',\n paddingInline: '16',\n })\n}\n"],"mappings":"A,wTAwBMS,EAAN,cAA4BC,KAAM,CAChCC,KAAgB,oBAClB,EA+DA,SAASE,EAAKC,EAAmB,CAC/B,IAAMC,EAAST,EAAW,EACpBW,EAAShB,EAAU,EAEnB,CAACiB,EAAMC,IAAAA,EAAWf,EAAAA,SAAAA,CAA6BgB,IAAAA,EAAS,EACxDC,EAAUrB,EAAY,CAC1B,MAAMsB,WAAWC,EAAkD,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C,mEACF,6DAHuC7G,EAAemD,CAAK,CAIpE,CAUA,SAASyD,EAAMzD,EAAmC,CAEhD,OADMA,aAAiB/C,MAChB,CAAC+C,EAAM9C,KAAM,GAAGuG,EAAMzD,EAAMC,KAAK,CAAC,EADH,CAAA,CAExC,CAGA,SAAS3B,GAAuC,CAC9C,IAAMqF,EAAS,IAAIC,gBAAgBhF,OAAO6C,SAASe,MAAM,EAGzD,OAFKmB,EAAOE,IAAI,KAAK,GACrBF,EAAOxB,OAAO,OAAO,EACd,CAAEM,YAAakB,EAAOG,SAAS,CAAE,GAFT,CAAC,CAGlC,CAEA,IAAUZ,GAAV,SAAAa,EAAA,CACeA,EAAAhC,KAAO,CAQtB,EAAA,CAAAmB,AAAAA,IAAA,CAAA,CAAA,E,WAxWmB,EAAAmC,EAAA,IAAA,CAACE,EAAD,CAAM,GAAIpI,EAAM8G,cAAc,CAAC,CAAA,E"}
@@ -1,2 +1,2 @@
1
- import"./react-dom-DtwtyQPy.js";import{n as e,t}from"./lazyRouteComponent-BXabRVTE.js";import{n,o as r}from"./Client-D3gnMDTr.js";import"./zyzz.config-DYq-16_0.js";import{t as i}from"./Loader-Ivf5dWFl.js";var a=e(`/login`)({component:t(()=>import(`./login-BR3Vh4Jw.js`),`component`),loader:async e=>{let t=new URLSearchParams(e.location.searchStr),a=t.has(`sig`),o=t.get(`return_to`),s=n(),[c,l]=await Promise.all([r(s.v1.auth.session.$get()),r(s.v1.auth.methods.$get({query:{...a?{oauth_query:t.toString()}:{},...o?{return_to:o}:{}}}))]);return c.user&&!a&&i({href:l.return_to??`/`}),{failed:l.google&&t.get(`error`)===`access_denied`,google:l.google,passkeys:l.passkeys,request:l.app?{app:l.app,host:l.host,key:l.request?.key??null,verified:l.verified}:null,returnTo:l.return_to,userCode:l.user_code}},loaderDeps:e=>({search:e.search}),server:{handlers:{POST:e=>new Response(null,{headers:{location:`/login${new URL(e.request.url).search}`},status:303})}}}),o;(function(e){e.page=1})(o||={});export{a as t};
2
- //# sourceMappingURL=login-DtRzF4FQ.js.map
1
+ import"./react-dom-pSpaua7D.js";import{n as e,t}from"./lazyRouteComponent-DOSE663E.js";import{n,o as r}from"./Client-BAXSFa9e.js";import"./zyzz.config-CW977vYL.js";import{t as i}from"./Loader-DvDbd8kj.js";var a=e(`/login`)({component:t(()=>import(`./login-6K4ND-gN.js`),`component`),loader:async e=>{let t=new URLSearchParams(e.location.searchStr),a=t.has(`sig`),o=t.get(`return_to`),s=n(),[c,l]=await Promise.all([r(s.v1.auth.session.$get()),r(s.v1.auth.methods.$get({query:{...a?{oauth_query:t.toString()}:{},...o?{return_to:o}:{}}}))]);return c.user&&!a&&i({href:l.return_to??`/`}),{failed:l.google&&t.get(`error`)===`access_denied`,google:l.google,passkeys:l.passkeys,request:l.app?{app:l.app,host:l.host,key:l.request?.key??null,verified:l.verified}:null,returnTo:l.return_to,userCode:l.user_code}},loaderDeps:e=>({search:e.search}),server:{handlers:{POST:e=>new Response(null,{headers:{location:`/login${new URL(e.request.url).search}`},status:303})}}}),o;(function(e){e.page=1})(o||={});export{a as t};
2
+ //# sourceMappingURL=login-CGq85v-9.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"login-DtRzF4FQ.js","names":["createFileRoute","parseResponse","Authentication","Client","Loader","style","Assertion","Awaited","ReturnType","sign","PasskeyResult","InferResponseType","CeremonyError","Error","name","Route","component","lazyRouteComponent","$$splitComponentImporter","loader","match","Promise","Page","Props","query","URLSearchParams","location","searchStr","signed","has","returnTo","get","client","create","session","methods","all","v1","auth","$get","oauth_query","toString","return_to","user","redirect","href","failed","google","passkeys","request","app","host","key","verified","userCode","user_code","loaderDeps","search","server","handlers","POST","options","Response","headers","URL","url","status","styles","page","Client.create","createFileRoute","parseResponse","redirect","Route","lazyRouteComponent","query","match","signed","returnTo","client","create","session","methods","options","styles"],"sources":["../../../routes/login.tsx"],"sourcesContent":["/**\n * The sign-in page: an emailed code, Google, or a passkey. A wallet.tempo passkey without an email\n * waits for the code that links it. @module\n */\nimport { useMutation } from '@tanstack/react-query'\nimport { createFileRoute, useRouter } from '@tanstack/react-router'\nimport { type InferResponseType, parseResponse } from 'hono/client'\nimport { type FormEvent, useEffect, useState } from 'react'\nimport { Authentication } from 'webauthx/client'\nimport * as Client from '../lib/Client.js'\nimport * as Loader from '../lib/Loader.js'\nimport { SignIn } from '../screens/SignIn.js'\nimport { style } from '../zyzz.config.js'\n\n/** A signed passkey assertion, as the browser returns it. */\ntype Assertion = Awaited<ReturnType<typeof Authentication.sign>>\n\n/** A passkey verification's response: a signed-in user, or the email step. */\ntype PasskeyResult = InferResponseType<\n Client.Client['v1']['auth']['passkey']['verify']['$post'],\n 200\n>\n\n/** Wraps a failure of the browser's passkey ceremony. */\nclass CeremonyError extends Error {\n override name = 'Page.CeremonyError'\n}\n\nexport const Route = createFileRoute('/login')({\n component: () => <Page {...Route.useLoaderData()} />,\n /**\n * Redirects a signed-in user to `return_to` or the account, unless the request is signed.\n * Otherwise returns the sign-in methods.\n */\n loader: async (match): Promise<Page.Props> => {\n const query = new URLSearchParams(match.location.searchStr)\n const signed = query.has('sig')\n const returnTo = query.get('return_to')\n const client = Client.create()\n const [session, methods] = await Promise.all([\n parseResponse(client.v1.auth.session.$get()),\n parseResponse(\n client.v1.auth.methods.$get({\n query: {\n // The API names the app only from a signed authorization request.\n ...(signed ? { oauth_query: query.toString() } : {}),\n ...(returnTo ? { return_to: returnTo } : {}),\n },\n }),\n ),\n ])\n if (session.user && !signed)\n Loader.redirect({ href: methods.return_to ?? '/' })\n\n return {\n // Better Auth sends its other failures here too, with their own codes. Only the failed route of\n // a provider sign-in sends `access_denied`.\n failed: methods.google && query.get('error') === 'access_denied',\n google: methods.google,\n passkeys: methods.passkeys,\n request: methods.app\n ? {\n app: methods.app,\n host: methods.host,\n key: methods.request?.key ?? null,\n verified: methods.verified,\n }\n : null,\n returnTo: methods.return_to,\n userCode: methods.user_code,\n }\n },\n // The loader reads the whole query, so a change to any parameter loads the page again.\n loaderDeps: (match) => ({ search: match.search }),\n server: {\n handlers: {\n // The sign-in form posts here only when it is submitted before the page hydrates, and the page\n // then sends the code itself. The redirect keeps the query, so an app's signed authorization\n // request stays on the page.\n POST: (options) =>\n new Response(null, {\n headers: { location: `/login${new URL(options.request.url).search}` },\n status: 303,\n }),\n },\n },\n})\n\n/** Renders the page. */\nfunction Page(props: Page.Props) {\n const client = Client.use()\n const router = useRouter()\n // The email step's link, while a wallet.tempo passkey waits for the code that links it.\n const [link, setLink] = useState<string | undefined>(undefined)\n const passkey = useMutation({\n async mutationFn(variables: { assertion?: Assertion | undefined }) {\n const assertion = variables.assertion ?? (await ceremony({}))\n return parseResponse(\n client.v1.auth.passkey.verify.$post({\n json: { assertion, ...oauthQuery() },\n }),\n )\n },\n })\n const resend = useMutation({ mutationFn: sendCode })\n const send = useMutation({ mutationFn: sendCode })\n\n // The confirmation of a resent code clears after a short time, so the button offers a resend again.\n useEffect(() => {\n if (!resend.isSuccess) return\n const timer = window.setTimeout(() => resend.reset(), sentDelay)\n return () => window.clearTimeout(timer)\n }, [resend.isSuccess, resend.reset])\n\n const verify = useMutation({\n async mutationFn(variables: { code: string; email: string }) {\n // The link's passkey signs again, so a page left at the email step links nothing for the next\n // person, who cannot sign with it.\n const linked = link ? { assertion: await ceremony({ link }), link } : {}\n return parseResponse(\n client.v1.auth.code.verify.$post({\n json: { ...variables, ...linked, ...oauthQuery() },\n }),\n )\n },\n })\n const email = send.isSuccess ? send.variables.email : undefined\n\n /** Requests passkey options and signs them. With `link`, it requests the email step's passkey. */\n async function ceremony(options: { link?: string | undefined }) {\n const { link } = options\n const response = await parseResponse(\n client.v1.auth.passkey.options.$post({\n json: {\n ...(link ? { link } : {}),\n ...oauthQuery(),\n // The API reads the device app from the code itself, so the code selects its realms.\n ...(props.userCode ? { user_code: props.userCode } : {}),\n },\n }),\n )\n // The response reads optional fields as possibly `undefined`, which the ceremony's options\n // omit instead.\n const { allowCredentials, ...publicKey } = response.options.publicKey\n try {\n return await Authentication.sign({\n // ox types the request with optional members that the DOM types leave out when absent. The\n // object is the one that ox built for `navigator.credentials.get`.\n getFn: (request) =>\n navigator.credentials.get(request as CredentialRequestOptions),\n options: {\n publicKey: {\n ...publicKey,\n ...(allowCredentials ? { allowCredentials } : {}),\n },\n },\n })\n } catch (error) {\n throw new CeremonyError('Passkey ceremony failed.', { cause: error })\n }\n }\n\n function sendCode(variables: { email: string }) {\n return parseResponse(client.v1.auth.code.$post({ json: variables }))\n }\n\n function submitEmail(event: FormEvent<HTMLFormElement>) {\n event.preventDefault()\n // One sign-in runs at a time, since a passkey sign-in sets its own session.\n if (send.isPending || passkey.isPending) return\n passkey.reset()\n send.mutate({\n email: String(new FormData(event.currentTarget).get('email')),\n })\n }\n\n function submitCode(event: FormEvent<HTMLFormElement>) {\n event.preventDefault()\n // A complete code submits the form, and Enter can submit it again before the first returns.\n if (!email || verify.isPending || verify.isSuccess) return\n const form = event.currentTarget\n resend.reset()\n verify.mutate(\n { code: String(new FormData(form).get('code')), email },\n {\n onError(error) {\n // An expired link, or a passkey that does not sign again, leaves the code valid, so the next\n // attempt signs in with email only.\n if (linkFailed(error)) setLink(undefined)\n // The refused code clears, so the next one can be typed at once.\n const field = form.elements.namedItem('code')\n if (!(field instanceof HTMLInputElement)) return\n field.value = ''\n field.focus()\n },\n onSuccess(data) {\n // The accepted code shows green for a moment, so the sign-in confirms it before it\n // continues. The router renders a failed navigation itself, so the timer need not wait.\n window.setTimeout(() => continueTo(data), verifiedDelay)\n },\n },\n )\n }\n\n /** Continues to the app's redirect, to `returnTo`, or to the account. */\n function continueTo(data: { redirect: string | null }) {\n if (data.redirect) window.location.assign(data.redirect)\n // The device page loads as a document, so its loader reads the code on the server, where a\n // refused lookup logs nothing in the browser.\n else if (props.returnTo) window.location.assign(props.returnTo)\n else void router.navigate({ to: '/' })\n }\n\n /** Redirects the browser to Google, which returns here or continues the app's request. */\n function signInWithGoogle() {\n const page = new URL(window.location.href)\n // The next attempt drops the failure of the last one.\n page.searchParams.delete('error')\n const url = new URL('/v1/auth/oauth/google', window.location.origin)\n // A path, which Tempo ID resolves against its own origin.\n url.searchParams.set('return_to', page.pathname + page.search)\n const { oauth_query } = oauthQuery()\n if (oauth_query) url.searchParams.set('oauth_query', oauth_query)\n window.location.assign(url)\n }\n\n function signInWithPasskey() {\n if (passkey.isPending) return\n send.reset()\n // The result applies through the call's own callback, which a reset drops, so a sign-in that\n // returns after the email path takes over sets no link.\n passkey.mutate({}, { onSuccess: applyPasskey })\n }\n\n /** Continues a passkey sign-in, or requests the email for a wallet.tempo passkey. */\n function applyPasskey(data: PasskeyResult) {\n if ('step' in data) setLink(data.step.link)\n else continueTo({ redirect: data.redirect })\n }\n\n function sendAgain() {\n if (!email || verify.isPending || verify.isSuccess) return\n verify.reset()\n resend.mutate({ email })\n }\n\n // A reset mutation drops the callbacks of its request, so a result that returns after the\n // address changes updates nothing. The passkey's link clears too, so the code of another address\n // in a shared browser links nothing.\n function changeEmail() {\n passkey.reset()\n resend.reset()\n send.reset()\n setLink(undefined)\n verify.reset()\n }\n\n // A tab left at the email step can reach the next person, who drops the passkey's link here. The\n // reset drops a pending code request too, so its result does not open the code step.\n function startOver() {\n passkey.reset()\n send.reset()\n setLink(undefined)\n }\n\n const error = (() => {\n if (email) return verify.error ?? resend.error\n return send.error ?? passkey.error\n })()\n // The failure of a Google sign-in shows until another sign-in starts.\n const failed = props.failed && send.isIdle && passkey.isIdle\n\n return (\n <main {...styles.page()}>\n <SignIn\n autoFocus\n // Sign-in returns only to the device page, so any `return_to` names a device approval.\n device={Boolean(props.returnTo)}\n email={email}\n error={(() => {\n if (error) return message(error, { code: Boolean(email) })\n if (failed)\n return 'Sign-in with Google failed. Try again, or continue with email.'\n return undefined\n })()}\n invalid={Boolean(email ? verify.error : send.error)}\n linking={Boolean(link)}\n onChangeEmail={changeEmail}\n onGoogle={props.google ? signInWithGoogle : undefined}\n onPasskey={props.passkeys ? signInWithPasskey : undefined}\n onResend={sendAgain}\n onStartOver={startOver}\n onSubmitCode={submitCode}\n onSubmitEmail={submitEmail}\n passkeyPending={passkey.isPending}\n request={props.request ?? undefined}\n resend={(() => {\n if (resend.isPending) return 'pending'\n if (resend.isSuccess) return 'sent'\n return 'idle'\n })()}\n sending={send.isPending}\n verified={verify.isSuccess}\n verifying={verify.isPending}\n />\n </main>\n )\n}\n\ndeclare namespace Page {\n type Props = {\n /** Whether a Google sign-in returned here with `error`. */\n failed: boolean\n /** Whether the deployment offers Google sign-in. */\n google: boolean\n /** Whether the app's realms offer passkey sign-in. */\n passkeys: boolean\n /** The app's request that the sign-in continues, with its key, or `null`. */\n request: SignIn.Props['request'] | null\n /** The device page's path that sign-in returns to, or `null` for the account. */\n returnTo: string | null\n /** The device page's user code, or `null`. */\n userCode: string | null\n }\n}\n\n/** Milliseconds that the button shows \"Code sent\" after a resend. */\nconst sentDelay = 5000\n\n/** Milliseconds that an accepted code shows green. */\nconst verifiedDelay = 500\n\n/** Returns whether `error` refused the email step's link, which leaves the code valid. */\nfunction linkFailed(error: unknown) {\n if (error instanceof CeremonyError) return true\n const reason = Client.reason(error)\n return (\n reason === 'passkey_link_expired' ||\n reason === 'passkey_not_permitted' ||\n reason === 'webauthn_rejected'\n )\n}\n\n/** Returns the message for `error`, such as for a canceled ceremony. */\nfunction message(error: unknown, options: message.Options) {\n // At the code step, only the link's passkey runs a ceremony, and its failure drops the link. An\n // expired or refused link keeps the refusal's own message.\n if (\n options.code &&\n (error instanceof CeremonyError ||\n Client.reason(error) === 'webauthn_rejected')\n )\n return 'Your passkey did not confirm the sign-in. Enter the code again to sign in with email only.'\n if (!(error instanceof CeremonyError)) return Client.message(error)\n if (names(error).includes('NotAllowedError'))\n return 'Passkey sign-in was canceled. Try again, or continue with email.'\n return 'Passkey sign-in failed. Try again, or continue with email.'\n}\n\ndeclare namespace message {\n type Options = {\n /** Whether the page shows the code step, where a refused link drops the link. */\n code: boolean\n }\n}\n\n/** Returns the names of `error` and its causes. */\nfunction names(error: unknown): readonly string[] {\n if (!(error instanceof Error)) return []\n return [error.name, ...names(error.cause)]\n}\n\n/** Returns the page's signed request as `oauth_query`, without a Google `error`, or nothing. */\nfunction oauthQuery(): { oauth_query?: string } {\n const params = new URLSearchParams(window.location.search)\n if (!params.has('sig')) return {}\n params.delete('error')\n return { oauth_query: params.toString() }\n}\n\nnamespace styles {\n export const page = style({\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'center',\n minHeight: '100dvh !custom',\n paddingBlock: '64',\n paddingInline: '16',\n })\n}\n"],"mappings":"A,6MA4BA,IAAae,EAAQf,EAAgB,QAAQ,CAAC,CAAC,CAC7CgB,UAASC,M,8BAAA,WAAA,EAKTE,OAAQ,KAAOC,IAA+B,CAC5C,IAAMI,EAAQ,IAAIC,gBAAgBL,EAAMM,SAASC,SAAS,EACpDC,EAASJ,EAAMK,IAAI,KAAK,EACxBC,EAAWN,EAAMO,IAAI,WAAW,EAChCC,EAAS7B,EAAc,EACvB,CAAC+B,EAASC,GAAW,MAAMd,QAAQe,IAAI,CAC3CnC,EAAc+B,EAAOK,GAAGC,KAAKJ,QAAQK,KAAK,CAAC,EAC3CtC,EACE+B,EAAOK,GAAGC,KAAKH,QAAQI,KAAK,CAC1Bf,MAAO,CAEL,GAAII,EAAS,CAAEY,YAAahB,EAAMiB,SAAS,CAAE,EAAI,CAAC,EAClD,GAAIX,EAAW,CAAEY,UAAWZ,CAAS,EAAI,CAAC,CAC5C,CACF,CAAC,CACH,CAAC,CACF,EAID,OAHII,EAAQS,MAAQ,CAACf,GACnBxB,EAAgB,CAAEyC,KAAMV,EAAQO,WAAa,GAAI,CAAC,EAE7C,CAGLI,OAAQX,EAAQY,QAAUvB,EAAMO,IAAI,OAAO,IAAM,gBACjDgB,OAAQZ,EAAQY,OAChBC,SAAUb,EAAQa,SAClBC,QAASd,EAAQe,IACb,CACEA,IAAKf,EAAQe,IACbC,KAAMhB,EAAQgB,KACdC,IAAKjB,EAAQc,SAASG,KAAO,KAC7BC,SAAUlB,EAAQkB,QACpB,EACA,KACJvB,SAAUK,EAAQO,UAClBY,SAAUnB,EAAQoB,SACpB,CACF,EAEAC,WAAapC,IAAW,CAAEqC,OAAQrC,EAAMqC,MAAO,GAC/CC,OAAQ,CACNC,SAAU,CAIRC,KAAOC,GACL,IAAIC,SAAS,KAAM,CACjBC,QAAS,CAAErC,SAAU,SAAS,IAAIsC,IAAIH,EAAQZ,QAAQgB,GAAG,CAAC,CAACR,QAAS,EACpES,OAAQ,GACV,CAAC,CACL,CACF,CACF,CAAC,EAsSSC,GAAV,SAAA,EAAA,CACeC,EAAAA,KAAO,CAQtB,EAAA,CAAA,AAAAgB,IAAA,CAAA,CAAA,E"}
1
+ {"version":3,"file":"login-CGq85v-9.js","names":["createFileRoute","parseResponse","Authentication","Client","Loader","style","Assertion","Awaited","ReturnType","sign","PasskeyResult","InferResponseType","CeremonyError","Error","name","Route","component","lazyRouteComponent","$$splitComponentImporter","loader","match","Promise","Page","Props","query","URLSearchParams","location","searchStr","signed","has","returnTo","get","client","create","session","methods","all","v1","auth","$get","oauth_query","toString","return_to","user","redirect","href","failed","google","passkeys","request","app","host","key","verified","userCode","user_code","loaderDeps","search","server","handlers","POST","options","Response","headers","URL","url","status","styles","page","Client.create","createFileRoute","parseResponse","redirect","Route","lazyRouteComponent","query","match","signed","returnTo","client","create","session","methods","options","styles"],"sources":["../../../routes/login.tsx"],"sourcesContent":["/**\n * The sign-in page: an emailed code, Google, or a passkey. A wallet.tempo passkey without an email\n * waits for the code that links it. @module\n */\nimport { useMutation } from '@tanstack/react-query'\nimport { createFileRoute, useRouter } from '@tanstack/react-router'\nimport { type InferResponseType, parseResponse } from 'hono/client'\nimport { type FormEvent, useEffect, useState } from 'react'\nimport { Authentication } from 'webauthx/client'\nimport * as Client from '../lib/Client.js'\nimport * as Loader from '../lib/Loader.js'\nimport { SignIn } from '../screens/SignIn.js'\nimport { style } from '../zyzz.config.js'\n\n/** A signed passkey assertion, as the browser returns it. */\ntype Assertion = Awaited<ReturnType<typeof Authentication.sign>>\n\n/** A passkey verification's response: a signed-in user, or the email step. */\ntype PasskeyResult = InferResponseType<\n Client.Client['v1']['auth']['passkey']['verify']['$post'],\n 200\n>\n\n/** Wraps a failure of the browser's passkey ceremony. */\nclass CeremonyError extends Error {\n override name = 'Page.CeremonyError'\n}\n\nexport const Route = createFileRoute('/login')({\n component: () => <Page {...Route.useLoaderData()} />,\n /**\n * Redirects a signed-in user to `return_to` or the account, unless the request is signed.\n * Otherwise returns the sign-in methods.\n */\n loader: async (match): Promise<Page.Props> => {\n const query = new URLSearchParams(match.location.searchStr)\n const signed = query.has('sig')\n const returnTo = query.get('return_to')\n const client = Client.create()\n const [session, methods] = await Promise.all([\n parseResponse(client.v1.auth.session.$get()),\n parseResponse(\n client.v1.auth.methods.$get({\n query: {\n // The API names the app only from a signed authorization request.\n ...(signed ? { oauth_query: query.toString() } : {}),\n ...(returnTo ? { return_to: returnTo } : {}),\n },\n }),\n ),\n ])\n if (session.user && !signed)\n Loader.redirect({ href: methods.return_to ?? '/' })\n\n return {\n // Better Auth sends its other failures here too, with their own codes. Only the failed route of\n // a provider sign-in sends `access_denied`.\n failed: methods.google && query.get('error') === 'access_denied',\n google: methods.google,\n passkeys: methods.passkeys,\n request: methods.app\n ? {\n app: methods.app,\n host: methods.host,\n key: methods.request?.key ?? null,\n verified: methods.verified,\n }\n : null,\n returnTo: methods.return_to,\n userCode: methods.user_code,\n }\n },\n // The loader reads the whole query, so a change to any parameter loads the page again.\n loaderDeps: (match) => ({ search: match.search }),\n server: {\n handlers: {\n // The sign-in form posts here only when it is submitted before the page hydrates, and the page\n // then sends the code itself. The redirect keeps the query, so an app's signed authorization\n // request stays on the page.\n POST: (options) =>\n new Response(null, {\n headers: { location: `/login${new URL(options.request.url).search}` },\n status: 303,\n }),\n },\n },\n})\n\n/** Renders the page. */\nfunction Page(props: Page.Props) {\n const client = Client.use()\n const router = useRouter()\n // The email step's link, while a wallet.tempo passkey waits for the code that links it.\n const [link, setLink] = useState<string | undefined>(undefined)\n const passkey = useMutation({\n async mutationFn(variables: { assertion?: Assertion | undefined }) {\n const assertion = variables.assertion ?? (await ceremony({}))\n return parseResponse(\n client.v1.auth.passkey.verify.$post({\n json: { assertion, ...oauthQuery() },\n }),\n )\n },\n })\n const resend = useMutation({ mutationFn: sendCode })\n const send = useMutation({ mutationFn: sendCode })\n\n // The confirmation of a resent code clears after a short time, so the button offers a resend again.\n useEffect(() => {\n if (!resend.isSuccess) return\n const timer = window.setTimeout(() => resend.reset(), sentDelay)\n return () => window.clearTimeout(timer)\n }, [resend.isSuccess, resend.reset])\n\n const verify = useMutation({\n async mutationFn(variables: { code: string; email: string }) {\n // The link's passkey signs again, so a page left at the email step links nothing for the next\n // person, who cannot sign with it.\n const linked = link ? { assertion: await ceremony({ link }), link } : {}\n return parseResponse(\n client.v1.auth.code.verify.$post({\n json: { ...variables, ...linked, ...oauthQuery() },\n }),\n )\n },\n })\n const email = send.isSuccess ? send.variables.email : undefined\n\n /** Requests passkey options and signs them. With `link`, it requests the email step's passkey. */\n async function ceremony(options: { link?: string | undefined }) {\n const { link } = options\n const response = await parseResponse(\n client.v1.auth.passkey.options.$post({\n json: {\n ...(link ? { link } : {}),\n ...oauthQuery(),\n // The API reads the device app from the code itself, so the code selects its realms.\n ...(props.userCode ? { user_code: props.userCode } : {}),\n },\n }),\n )\n // The response reads optional fields as possibly `undefined`, which the ceremony's options\n // omit instead.\n const { allowCredentials, ...publicKey } = response.options.publicKey\n try {\n return await Authentication.sign({\n // ox types the request with optional members that the DOM types leave out when absent. The\n // object is the one that ox built for `navigator.credentials.get`.\n getFn: (request) =>\n navigator.credentials.get(request as CredentialRequestOptions),\n options: {\n publicKey: {\n ...publicKey,\n ...(allowCredentials ? { allowCredentials } : {}),\n },\n },\n })\n } catch (error) {\n throw new CeremonyError('Passkey ceremony failed.', { cause: error })\n }\n }\n\n function sendCode(variables: { email: string }) {\n return parseResponse(client.v1.auth.code.$post({ json: variables }))\n }\n\n function submitEmail(event: FormEvent<HTMLFormElement>) {\n event.preventDefault()\n // One sign-in runs at a time, since a passkey sign-in sets its own session.\n if (send.isPending || passkey.isPending) return\n passkey.reset()\n send.mutate({\n email: String(new FormData(event.currentTarget).get('email')),\n })\n }\n\n function submitCode(event: FormEvent<HTMLFormElement>) {\n event.preventDefault()\n // A complete code submits the form, and Enter can submit it again before the first returns.\n if (!email || verify.isPending || verify.isSuccess) return\n const form = event.currentTarget\n resend.reset()\n verify.mutate(\n { code: String(new FormData(form).get('code')), email },\n {\n onError(error) {\n // An expired link, or a passkey that does not sign again, leaves the code valid, so the next\n // attempt signs in with email only.\n if (linkFailed(error)) setLink(undefined)\n // The refused code clears, so the next one can be typed at once.\n const field = form.elements.namedItem('code')\n if (!(field instanceof HTMLInputElement)) return\n field.value = ''\n field.focus()\n },\n onSuccess(data) {\n // The accepted code shows green for a moment, so the sign-in confirms it before it\n // continues. The router renders a failed navigation itself, so the timer need not wait.\n window.setTimeout(() => continueTo(data), verifiedDelay)\n },\n },\n )\n }\n\n /** Continues to the app's redirect, to `returnTo`, or to the account. */\n function continueTo(data: { redirect: string | null }) {\n if (data.redirect) window.location.assign(data.redirect)\n // The device page loads as a document, so its loader reads the code on the server, where a\n // refused lookup logs nothing in the browser.\n else if (props.returnTo) window.location.assign(props.returnTo)\n else void router.navigate({ to: '/' })\n }\n\n /** Redirects the browser to Google, which returns here or continues the app's request. */\n function signInWithGoogle() {\n const page = new URL(window.location.href)\n // The next attempt drops the failure of the last one.\n page.searchParams.delete('error')\n const url = new URL('/v1/auth/oauth/google', window.location.origin)\n // A path, which Tempo ID resolves against its own origin.\n url.searchParams.set('return_to', page.pathname + page.search)\n const { oauth_query } = oauthQuery()\n if (oauth_query) url.searchParams.set('oauth_query', oauth_query)\n window.location.assign(url)\n }\n\n function signInWithPasskey() {\n if (passkey.isPending) return\n send.reset()\n // The result applies through the call's own callback, which a reset drops, so a sign-in that\n // returns after the email path takes over sets no link.\n passkey.mutate({}, { onSuccess: applyPasskey })\n }\n\n /** Continues a passkey sign-in, or requests the email for a wallet.tempo passkey. */\n function applyPasskey(data: PasskeyResult) {\n if ('step' in data) setLink(data.step.link)\n else continueTo({ redirect: data.redirect })\n }\n\n function sendAgain() {\n if (!email || verify.isPending || verify.isSuccess) return\n verify.reset()\n resend.mutate({ email })\n }\n\n // A reset mutation drops the callbacks of its request, so a result that returns after the\n // address changes updates nothing. The passkey's link clears too, so the code of another address\n // in a shared browser links nothing.\n function changeEmail() {\n passkey.reset()\n resend.reset()\n send.reset()\n setLink(undefined)\n verify.reset()\n }\n\n // A tab left at the email step can reach the next person, who drops the passkey's link here. The\n // reset drops a pending code request too, so its result does not open the code step.\n function startOver() {\n passkey.reset()\n send.reset()\n setLink(undefined)\n }\n\n const error = (() => {\n if (email) return verify.error ?? resend.error\n return send.error ?? passkey.error\n })()\n // The failure of a Google sign-in shows until another sign-in starts.\n const failed = props.failed && send.isIdle && passkey.isIdle\n\n return (\n <main {...styles.page()}>\n <SignIn\n autoFocus\n // Sign-in returns only to the device page, so any `return_to` names a device approval.\n device={Boolean(props.returnTo)}\n email={email}\n error={(() => {\n if (error) return message(error, { code: Boolean(email) })\n if (failed)\n return 'Sign-in with Google failed. Try again, or continue with email.'\n return undefined\n })()}\n invalid={Boolean(email ? verify.error : send.error)}\n linking={Boolean(link)}\n onChangeEmail={changeEmail}\n onGoogle={props.google ? signInWithGoogle : undefined}\n onPasskey={props.passkeys ? signInWithPasskey : undefined}\n onResend={sendAgain}\n onStartOver={startOver}\n onSubmitCode={submitCode}\n onSubmitEmail={submitEmail}\n passkeyPending={passkey.isPending}\n request={props.request ?? undefined}\n resend={(() => {\n if (resend.isPending) return 'pending'\n if (resend.isSuccess) return 'sent'\n return 'idle'\n })()}\n sending={send.isPending}\n verified={verify.isSuccess}\n verifying={verify.isPending}\n />\n </main>\n )\n}\n\ndeclare namespace Page {\n type Props = {\n /** Whether a Google sign-in returned here with `error`. */\n failed: boolean\n /** Whether the deployment offers Google sign-in. */\n google: boolean\n /** Whether the app's realms offer passkey sign-in. */\n passkeys: boolean\n /** The app's request that the sign-in continues, with its key, or `null`. */\n request: SignIn.Props['request'] | null\n /** The device page's path that sign-in returns to, or `null` for the account. */\n returnTo: string | null\n /** The device page's user code, or `null`. */\n userCode: string | null\n }\n}\n\n/** Milliseconds that the button shows \"Code sent\" after a resend. */\nconst sentDelay = 5000\n\n/** Milliseconds that an accepted code shows green. */\nconst verifiedDelay = 500\n\n/** Returns whether `error` refused the email step's link, which leaves the code valid. */\nfunction linkFailed(error: unknown) {\n if (error instanceof CeremonyError) return true\n const reason = Client.reason(error)\n return (\n reason === 'passkey_link_expired' ||\n reason === 'passkey_not_permitted' ||\n reason === 'webauthn_rejected'\n )\n}\n\n/** Returns the message for `error`, such as for a canceled ceremony. */\nfunction message(error: unknown, options: message.Options) {\n // At the code step, only the link's passkey runs a ceremony, and its failure drops the link. An\n // expired or refused link keeps the refusal's own message.\n if (\n options.code &&\n (error instanceof CeremonyError ||\n Client.reason(error) === 'webauthn_rejected')\n )\n return 'Your passkey did not confirm the sign-in. Enter the code again to sign in with email only.'\n if (!(error instanceof CeremonyError)) return Client.message(error)\n if (names(error).includes('NotAllowedError'))\n return 'Passkey sign-in was canceled. Try again, or continue with email.'\n return 'Passkey sign-in failed. Try again, or continue with email.'\n}\n\ndeclare namespace message {\n type Options = {\n /** Whether the page shows the code step, where a refused link drops the link. */\n code: boolean\n }\n}\n\n/** Returns the names of `error` and its causes. */\nfunction names(error: unknown): readonly string[] {\n if (!(error instanceof Error)) return []\n return [error.name, ...names(error.cause)]\n}\n\n/** Returns the page's signed request as `oauth_query`, without a Google `error`, or nothing. */\nfunction oauthQuery(): { oauth_query?: string } {\n const params = new URLSearchParams(window.location.search)\n if (!params.has('sig')) return {}\n params.delete('error')\n return { oauth_query: params.toString() }\n}\n\nnamespace styles {\n export const page = style({\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'center',\n minHeight: '100dvh !custom',\n paddingBlock: '64',\n paddingInline: '16',\n })\n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F,CAAC,EAsSSC,GAAV,SAAA,EAAA,CACeC,EAAAA,KAAO,CAQtB,EAAA,CAAA,AAAAgB,IAAA,CAAA,CAAA,E"}
@@ -1,2 +1,2 @@
1
- import{E as e,j as t}from"./react-dom-DtwtyQPy.js";function n(){throw Error(`Invariant failed`)}var r=t(e(),1),i=r.createContext(void 0),a=r.createContext(void 0);export{i as n,n as r,a as t};
2
- //# sourceMappingURL=matchContext-Cuq8aYzA.js.map
1
+ import{E as e,j as t}from"./react-dom-pSpaua7D.js";function n(){throw Error(`Invariant failed`)}var r=t(e(),1),i=r.createContext(void 0),a=r.createContext(void 0);export{i as n,n as r,a as t};
2
+ //# sourceMappingURL=matchContext-BHbopc_c.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"matchContext-Cuq8aYzA.js","names":["require_react","__toESM","invariant","import_react","matchContext","dummyMatchContext"],"sources":["../../../../../node_modules/.pnpm/@tanstack+router-core@1.171.34/node_modules/@tanstack/router-core/dist/esm/invariant.js","../../../../../node_modules/.pnpm/@tanstack+react-router@1.170.41_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/matchContext.js"],"sourcesContent":["//#region src/invariant.ts\nfunction invariant() {\n\tthrow new Error(\"Invariant failed\");\n}\n//#endregion\nexport { invariant };\n\n//# sourceMappingURL=invariant.js.map","\"use client\";\nimport * as React$1 from \"react\";\n//#region src/matchContext.tsx\nvar matchContext = React$1.createContext(void 0);\nvar dummyMatchContext = React$1.createContext(void 0);\n//#endregion\nexport { dummyMatchContext, matchContext };\n\n//# sourceMappingURL=matchContext.js.map"],"ignoreList":[0,1],"mappings":"A,mDACA,SAASE,GAAY,CACpB,MAAU,MAAM,kBAAkB,CACnC,C,eCAIE,EAAAD,EAAuB,cAAc,IAAK,EAAC,EAC3CE,EAAAF,EAA4B,cAAc,IAAK,EAAC,E"}
1
+ {"version":3,"file":"matchContext-BHbopc_c.js","names":["require_react","__toESM","invariant","import_react","matchContext","dummyMatchContext"],"sources":["../../../../../node_modules/.pnpm/@tanstack+router-core@1.171.34/node_modules/@tanstack/router-core/dist/esm/invariant.js","../../../../../node_modules/.pnpm/@tanstack+react-router@1.170.41_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/@tanstack/react-router/dist/esm/matchContext.js"],"sourcesContent":["//#region src/invariant.ts\nfunction invariant() {\n\tthrow new Error(\"Invariant failed\");\n}\n//#endregion\nexport { invariant };\n\n//# sourceMappingURL=invariant.js.map","\"use client\";\nimport * as React$1 from \"react\";\n//#region src/matchContext.tsx\nvar matchContext = React$1.createContext(void 0);\nvar dummyMatchContext = React$1.createContext(void 0);\n//#endregion\nexport { dummyMatchContext, matchContext };\n\n//# sourceMappingURL=matchContext.js.map"],"ignoreList":[0,1],"mappings":"A,mDACA,SAASE,GAAY,CACpB,MAAU,MAAM,kBAAkB,CACnC,C,eCAIE,EAAAD,EAAuB,cAAc,IAAK,EAAC,EAC3CE,EAAAF,EAA4B,cAAc,IAAK,EAAC,E"}
@@ -1,2 +1,2 @@
1
- import{i as e,o as t,t as n}from"./removable-HVB1MGzn.js";var r=class extends n{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||i(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(t){let n=()=>{this.#i({type:`continue`})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},i=this.#r=e({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),a=this.state.status===`pending`,o=!i.canStart();try{if(a)n();else{this.#i({type:`pending`,variables:t,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,r);let e=await this.options.onMutate?.(t,r);e!==this.state.context&&this.#i({type:`pending`,context:e,variables:t,isPaused:o})}let e=await i.start();return await this.#n.config.onSuccess?.(e,t,this.state.context,this,r),await this.options.onSuccess?.(e,t,this.state.context,r),await this.#n.config.onSettled?.(e,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(e,null,t,this.state.context,r),this.#i({type:`success`,data:e}),e}catch(e){try{await this.#n.config.onError?.(e,t,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onError?.(e,t,this.state.context,r)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,r)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:e}),e}finally{this.#r===i&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let n=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=n(this.state),t.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function i(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}export{i as n,r as t};
2
- //# sourceMappingURL=mutation-BseSOMT8.js.map
1
+ import{i as e,o as t,t as n}from"./removable-BIS_RRBc.js";var r=class extends n{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||i(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(t){let n=()=>{this.#i({type:`continue`})},r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},i=this.#r=e({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),a=this.state.status===`pending`,o=!i.canStart();try{if(a)n();else{this.#i({type:`pending`,variables:t,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,r);let e=await this.options.onMutate?.(t,r);e!==this.state.context&&this.#i({type:`pending`,context:e,variables:t,isPaused:o})}let e=await i.start();return await this.#n.config.onSuccess?.(e,t,this.state.context,this,r),await this.options.onSuccess?.(e,t,this.state.context,r),await this.#n.config.onSettled?.(e,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(e,null,t,this.state.context,r),this.#i({type:`success`,data:e}),e}catch(e){try{await this.#n.config.onError?.(e,t,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onError?.(e,t,this.state.context,r)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,r)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,r)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:e}),e}finally{this.#r===i&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let n=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=n(this.state),t.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function i(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}export{i as n,r as t};
2
+ //# sourceMappingURL=mutation-D0MCZKRo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mutation-BseSOMT8.js","names":["createRetryer","notifyManager","Removable","Mutation","#client","config","#mutationCache","#observers","getDefaultState","options","observer","x","#retryer","onContinue","#dispatch","mutationFnContext","retryer","variables","restored","isPaused","context","data","error","reducer","action","state"],"sources":["../../../../../node_modules/.pnpm/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/mutation.js"],"sourcesContent":["import { notifyManager } from \"./notifyManager.js\";\nimport { createRetryer } from \"./retryer.js\";\nimport { Removable } from \"./removable.js\";\n//#region src/mutation.ts\n/**\n* Represents a single mutation attempt. A `Mutation` holds the mutation's\n* options, state (data/error/status), and the `MutationObserver`s currently\n* subscribed to it.\n*\n* Instances are created and managed internally by `MutationCache`; application\n* code typically interacts with mutations indirectly through `QueryClient` or\n* a framework hook like `useMutation`. Direct access to a `Mutation` instance\n* is possible via `mutationCache.find()`/`getAll()` for inspecting cache state.\n*\n* @example\n* ```ts\n* const mutationCache = queryClient.getMutationCache()\n*\n* const mutation = mutationCache.find({ mutationKey: ['addPost'] })\n* ```\n*/\nvar Mutation = class extends Removable {\n\t#client;\n\t#observers;\n\t#mutationCache;\n\t#retryer;\n\tconstructor(config) {\n\t\tsuper();\n\t\tthis.#client = config.client;\n\t\tthis.mutationId = config.mutationId;\n\t\tthis.#mutationCache = config.mutationCache;\n\t\tthis.#observers = [];\n\t\tthis.state = config.state || getDefaultState();\n\t\tthis.setOptions(config.options);\n\t\tthis.scheduleGc();\n\t}\n\t/** @internal */\n\tsetOptions(options) {\n\t\tthis.options = options;\n\t\tthis.updateGcTime(this.options.gcTime);\n\t}\n\t/**\n\t* The `meta` object passed in the mutation's options, if any.\n\t*/\n\tget meta() {\n\t\treturn this.options.meta;\n\t}\n\t/** @internal */\n\taddObserver(observer) {\n\t\tif (!this.#observers.includes(observer)) {\n\t\t\tthis.#observers.push(observer);\n\t\t\tthis.clearGcTimeout();\n\t\t\tthis.#mutationCache.notify({\n\t\t\t\ttype: \"observerAdded\",\n\t\t\t\tmutation: this,\n\t\t\t\tobserver\n\t\t\t});\n\t\t}\n\t}\n\t/** @internal */\n\tremoveObserver(observer) {\n\t\tthis.#observers = this.#observers.filter((x) => x !== observer);\n\t\tthis.scheduleGc();\n\t\tthis.#mutationCache.notify({\n\t\t\ttype: \"observerRemoved\",\n\t\t\tmutation: this,\n\t\t\tobserver\n\t\t});\n\t}\n\toptionalRemove() {\n\t\tif (!this.#observers.length) {\n\t\t\tif (this.state.status === \"pending\") this.scheduleGc();\n\t\t\telse this.#mutationCache.remove(this);\n\t\t}\n\t}\n\t/**\n\t* Resumes a mutation that is currently paused or was restored from a\n\t* dehydrated, still-`pending` state.\n\t*\n\t* - If this mutation has an active retryer (it paused mid-attempt, e.g. due\n\t* to the network mode or scope-based queuing), its retryer is resumed.\n\t* - Otherwise, if the mutation's status is still `pending` (e.g. it was\n\t* dehydrated while an attempt was in flight and never got a retryer in\n\t* this instance), `execute` is called again with the last known variables.\n\t* - Otherwise the mutation has already settled and this resolves immediately\n\t* without running anything again.\n\t*\n\t* @example\n\t* ```ts\n\t* // typically driven by reconnect handling, e.g. queryClient.resumePausedMutations()\n\t* const mutation = mutationCache.find({ mutationKey: ['addPost'] })\n\t* await mutation?.continue()\n\t* ```\n\t*\n\t* @see {@link Mutation#execute}\n\t*/\n\tcontinue() {\n\t\treturn this.#retryer?.continue() ?? (this.state.status === \"pending\" ? this.execute(this.state.variables) : Promise.resolve());\n\t}\n\t/**\n\t* Runs the mutation function for the given variables through a retryer, and\n\t* drives the mutation's state and lifecycle callbacks through to settlement.\n\t*\n\t* If this mutation's state is already `pending` when `execute` is called\n\t* (i.e. it was restored, still in-flight, from a dehydrated state), the\n\t* `onMutate` step is skipped and a `continue` action is dispatched to\n\t* unpause it; otherwise a `pending` action is dispatched first, then the\n\t* mutation cache's `onMutate` and the mutation's own `onMutate` option are\n\t* awaited in that order, and the resulting context is stored.\n\t*\n\t* The mutation function is then run (subject to `retry`/`retryDelay`/\n\t* `networkMode`, and to the mutation cache's scope-based serialization).\n\t* On success, the cache's `onSuccess`/`onSettled` callbacks run before the\n\t* mutation's own `onSuccess`/`onSettled` options, a `success` action is\n\t* dispatched, and the resolved data is returned. On failure, the same\n\t* cache-then-option ordering is used for `onError`/`onSettled`, but each of\n\t* those four callbacks is individually caught so that a throwing callback\n\t* cannot mask the original error; an `error` action is then dispatched and\n\t* the original error is re-thrown.\n\t*\n\t* @example\n\t* ```ts\n\t* // Called internally by `MutationObserver.mutate` and `Mutation.continue` —\n\t* // applications normally trigger mutations through those, not this method.\n\t* const data = await mutation.execute(variables)\n\t* ```\n\t*\n\t* @see {@link Mutation#continue}\n\t*/\n\tasync execute(variables) {\n\t\tconst onContinue = () => {\n\t\t\tthis.#dispatch({ type: \"continue\" });\n\t\t};\n\t\tconst mutationFnContext = {\n\t\t\tclient: this.#client,\n\t\t\tmeta: this.options.meta,\n\t\t\tmutationKey: this.options.mutationKey\n\t\t};\n\t\tconst retryer = this.#retryer = createRetryer({\n\t\t\tfn: () => {\n\t\t\t\tif (!this.options.mutationFn) return Promise.reject(/* @__PURE__ */ new Error(\"No mutationFn found\"));\n\t\t\t\treturn this.options.mutationFn(variables, mutationFnContext);\n\t\t\t},\n\t\t\tonFail: (failureCount, error) => {\n\t\t\t\tthis.#dispatch({\n\t\t\t\t\ttype: \"failed\",\n\t\t\t\t\tfailureCount,\n\t\t\t\t\terror\n\t\t\t\t});\n\t\t\t},\n\t\t\tonPause: () => {\n\t\t\t\tthis.#dispatch({ type: \"pause\" });\n\t\t\t},\n\t\t\tonContinue,\n\t\t\tretry: this.options.retry ?? 0,\n\t\t\tretryDelay: this.options.retryDelay,\n\t\t\tnetworkMode: this.options.networkMode,\n\t\t\tcanRun: () => this.#mutationCache.canRun(this)\n\t\t});\n\t\tconst restored = this.state.status === \"pending\";\n\t\tconst isPaused = !retryer.canStart();\n\t\ttry {\n\t\t\tif (restored) onContinue();\n\t\t\telse {\n\t\t\t\tthis.#dispatch({\n\t\t\t\t\ttype: \"pending\",\n\t\t\t\t\tvariables,\n\t\t\t\t\tisPaused\n\t\t\t\t});\n\t\t\t\tif (this.#mutationCache.config.onMutate) await this.#mutationCache.config.onMutate(variables, this, mutationFnContext);\n\t\t\t\tconst context = await this.options.onMutate?.(variables, mutationFnContext);\n\t\t\t\tif (context !== this.state.context) this.#dispatch({\n\t\t\t\t\ttype: \"pending\",\n\t\t\t\t\tcontext,\n\t\t\t\t\tvariables,\n\t\t\t\t\tisPaused\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst data = await retryer.start();\n\t\t\tawait this.#mutationCache.config.onSuccess?.(data, variables, this.state.context, this, mutationFnContext);\n\t\t\tawait this.options.onSuccess?.(data, variables, this.state.context, mutationFnContext);\n\t\t\tawait this.#mutationCache.config.onSettled?.(data, null, this.state.variables, this.state.context, this, mutationFnContext);\n\t\t\tawait this.options.onSettled?.(data, null, variables, this.state.context, mutationFnContext);\n\t\t\tthis.#dispatch({\n\t\t\t\ttype: \"success\",\n\t\t\t\tdata\n\t\t\t});\n\t\t\treturn data;\n\t\t} catch (error) {\n\t\t\ttry {\n\t\t\t\tawait this.#mutationCache.config.onError?.(error, variables, this.state.context, this, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.options.onError?.(error, variables, this.state.context, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.#mutationCache.config.onSettled?.(void 0, error, this.state.variables, this.state.context, this, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.options.onSettled?.(void 0, error, variables, this.state.context, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\tthis.#dispatch({\n\t\t\t\ttype: \"error\",\n\t\t\t\terror\n\t\t\t});\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tif (this.#retryer === retryer) this.#retryer = void 0;\n\t\t\tthis.#mutationCache.runNext(this);\n\t\t}\n\t}\n\t#dispatch(action) {\n\t\tconst reducer = (state) => {\n\t\t\tswitch (action.type) {\n\t\t\t\tcase \"failed\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tfailureCount: action.failureCount,\n\t\t\t\t\tfailureReason: action.error\n\t\t\t\t};\n\t\t\t\tcase \"pause\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tisPaused: true\n\t\t\t\t};\n\t\t\t\tcase \"continue\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tisPaused: false\n\t\t\t\t};\n\t\t\t\tcase \"pending\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tcontext: action.context,\n\t\t\t\t\tdata: void 0,\n\t\t\t\t\tfailureCount: 0,\n\t\t\t\t\tfailureReason: null,\n\t\t\t\t\terror: null,\n\t\t\t\t\tisPaused: action.isPaused,\n\t\t\t\t\tstatus: \"pending\",\n\t\t\t\t\tvariables: action.variables,\n\t\t\t\t\tsubmittedAt: Date.now()\n\t\t\t\t};\n\t\t\t\tcase \"success\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tdata: action.data,\n\t\t\t\t\tfailureCount: 0,\n\t\t\t\t\tfailureReason: null,\n\t\t\t\t\terror: null,\n\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\tisPaused: false\n\t\t\t\t};\n\t\t\t\tcase \"error\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tdata: void 0,\n\t\t\t\t\terror: action.error,\n\t\t\t\t\tfailureCount: state.failureCount + 1,\n\t\t\t\t\tfailureReason: action.error,\n\t\t\t\t\tisPaused: false,\n\t\t\t\t\tstatus: \"error\"\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\tthis.state = reducer(this.state);\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.#observers.forEach((observer) => {\n\t\t\t\tobserver.onMutationUpdate(action);\n\t\t\t});\n\t\t\tthis.#mutationCache.notify({\n\t\t\t\tmutation: this,\n\t\t\t\ttype: \"updated\",\n\t\t\t\taction\n\t\t\t});\n\t\t});\n\t}\n};\nfunction getDefaultState() {\n\treturn {\n\t\tcontext: void 0,\n\t\tdata: void 0,\n\t\terror: null,\n\t\tfailureCount: 0,\n\t\tfailureReason: null,\n\t\tisPaused: false,\n\t\tstatus: \"idle\",\n\t\tvariables: void 0,\n\t\ts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UAClB,YAAa,KAAK,IAAI,CACvB,EACA,IAAK,UAAW,MAAO,CACtB,GAAGC,EACH,KAAMD,EAAO,KACb,aAAc,EACd,cAAe,KACf,MAAO,KACP,OAAQ,UACR,SAAU,EACX,EACA,IAAK,QAAS,MAAO,CACpB,GAAGC,EACH,KAAM,IAAK,GACX,MAAOD,EAAO,MACd,aAAcC,EAAM,aAAe,EACnC,cAAeD,EAAO,MACtB,SAAU,GACV,OAAQ,OACT,CACD,CACD,EACA,KAAK,MAAQD,EAAQ,KAAK,KAAK,EAC/BtB,EAAc,UAAY,CACzB,KAAKM,GAAW,QAAS,GAAa,CACrCG,EAAS,iBAAiBc,CAAM,CACjC,CAAC,EACD,KAAKlB,GAAe,OAAO,CAC1B,SAAU,KACV,KAAM,UACN,QACD,CAAC,CACF,CAAC,CACF,CACD,EACA,SAASE,GAAkB,CAC1B,MAAO,CACN,QAAS,IAAK,GACd,KAAM,IAAK,GACX,MAAO,KACP,aAAc,EACd,cAAe,KACf,SAAU,GACV,OAAQ,OACR,UAAW,IAAK,GAChB,YAAa,CACd,CACD,C"}
1
+ {"version":3,"file":"mutation-D0MCZKRo.js","names":["createRetryer","notifyManager","Removable","Mutation","#client","config","#mutationCache","#observers","getDefaultState","options","observer","x","#retryer","onContinue","#dispatch","mutationFnContext","retryer","variables","restored","isPaused","context","data","error","reducer","action","state"],"sources":["../../../../../node_modules/.pnpm/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/mutation.js"],"sourcesContent":["import { notifyManager } from \"./notifyManager.js\";\nimport { createRetryer } from \"./retryer.js\";\nimport { Removable } from \"./removable.js\";\n//#region src/mutation.ts\n/**\n* Represents a single mutation attempt. A `Mutation` holds the mutation's\n* options, state (data/error/status), and the `MutationObserver`s currently\n* subscribed to it.\n*\n* Instances are created and managed internally by `MutationCache`; application\n* code typically interacts with mutations indirectly through `QueryClient` or\n* a framework hook like `useMutation`. Direct access to a `Mutation` instance\n* is possible via `mutationCache.find()`/`getAll()` for inspecting cache state.\n*\n* @example\n* ```ts\n* const mutationCache = queryClient.getMutationCache()\n*\n* const mutation = mutationCache.find({ mutationKey: ['addPost'] })\n* ```\n*/\nvar Mutation = class extends Removable {\n\t#client;\n\t#observers;\n\t#mutationCache;\n\t#retryer;\n\tconstructor(config) {\n\t\tsuper();\n\t\tthis.#client = config.client;\n\t\tthis.mutationId = config.mutationId;\n\t\tthis.#mutationCache = config.mutationCache;\n\t\tthis.#observers = [];\n\t\tthis.state = config.state || getDefaultState();\n\t\tthis.setOptions(config.options);\n\t\tthis.scheduleGc();\n\t}\n\t/** @internal */\n\tsetOptions(options) {\n\t\tthis.options = options;\n\t\tthis.updateGcTime(this.options.gcTime);\n\t}\n\t/**\n\t* The `meta` object passed in the mutation's options, if any.\n\t*/\n\tget meta() {\n\t\treturn this.options.meta;\n\t}\n\t/** @internal */\n\taddObserver(observer) {\n\t\tif (!this.#observers.includes(observer)) {\n\t\t\tthis.#observers.push(observer);\n\t\t\tthis.clearGcTimeout();\n\t\t\tthis.#mutationCache.notify({\n\t\t\t\ttype: \"observerAdded\",\n\t\t\t\tmutation: this,\n\t\t\t\tobserver\n\t\t\t});\n\t\t}\n\t}\n\t/** @internal */\n\tremoveObserver(observer) {\n\t\tthis.#observers = this.#observers.filter((x) => x !== observer);\n\t\tthis.scheduleGc();\n\t\tthis.#mutationCache.notify({\n\t\t\ttype: \"observerRemoved\",\n\t\t\tmutation: this,\n\t\t\tobserver\n\t\t});\n\t}\n\toptionalRemove() {\n\t\tif (!this.#observers.length) {\n\t\t\tif (this.state.status === \"pending\") this.scheduleGc();\n\t\t\telse this.#mutationCache.remove(this);\n\t\t}\n\t}\n\t/**\n\t* Resumes a mutation that is currently paused or was restored from a\n\t* dehydrated, still-`pending` state.\n\t*\n\t* - If this mutation has an active retryer (it paused mid-attempt, e.g. due\n\t* to the network mode or scope-based queuing), its retryer is resumed.\n\t* - Otherwise, if the mutation's status is still `pending` (e.g. it was\n\t* dehydrated while an attempt was in flight and never got a retryer in\n\t* this instance), `execute` is called again with the last known variables.\n\t* - Otherwise the mutation has already settled and this resolves immediately\n\t* without running anything again.\n\t*\n\t* @example\n\t* ```ts\n\t* // typically driven by reconnect handling, e.g. queryClient.resumePausedMutations()\n\t* const mutation = mutationCache.find({ mutationKey: ['addPost'] })\n\t* await mutation?.continue()\n\t* ```\n\t*\n\t* @see {@link Mutation#execute}\n\t*/\n\tcontinue() {\n\t\treturn this.#retryer?.continue() ?? (this.state.status === \"pending\" ? this.execute(this.state.variables) : Promise.resolve());\n\t}\n\t/**\n\t* Runs the mutation function for the given variables through a retryer, and\n\t* drives the mutation's state and lifecycle callbacks through to settlement.\n\t*\n\t* If this mutation's state is already `pending` when `execute` is called\n\t* (i.e. it was restored, still in-flight, from a dehydrated state), the\n\t* `onMutate` step is skipped and a `continue` action is dispatched to\n\t* unpause it; otherwise a `pending` action is dispatched first, then the\n\t* mutation cache's `onMutate` and the mutation's own `onMutate` option are\n\t* awaited in that order, and the resulting context is stored.\n\t*\n\t* The mutation function is then run (subject to `retry`/`retryDelay`/\n\t* `networkMode`, and to the mutation cache's scope-based serialization).\n\t* On success, the cache's `onSuccess`/`onSettled` callbacks run before the\n\t* mutation's own `onSuccess`/`onSettled` options, a `success` action is\n\t* dispatched, and the resolved data is returned. On failure, the same\n\t* cache-then-option ordering is used for `onError`/`onSettled`, but each of\n\t* those four callbacks is individually caught so that a throwing callback\n\t* cannot mask the original error; an `error` action is then dispatched and\n\t* the original error is re-thrown.\n\t*\n\t* @example\n\t* ```ts\n\t* // Called internally by `MutationObserver.mutate` and `Mutation.continue` —\n\t* // applications normally trigger mutations through those, not this method.\n\t* const data = await mutation.execute(variables)\n\t* ```\n\t*\n\t* @see {@link Mutation#continue}\n\t*/\n\tasync execute(variables) {\n\t\tconst onContinue = () => {\n\t\t\tthis.#dispatch({ type: \"continue\" });\n\t\t};\n\t\tconst mutationFnContext = {\n\t\t\tclient: this.#client,\n\t\t\tmeta: this.options.meta,\n\t\t\tmutationKey: this.options.mutationKey\n\t\t};\n\t\tconst retryer = this.#retryer = createRetryer({\n\t\t\tfn: () => {\n\t\t\t\tif (!this.options.mutationFn) return Promise.reject(/* @__PURE__ */ new Error(\"No mutationFn found\"));\n\t\t\t\treturn this.options.mutationFn(variables, mutationFnContext);\n\t\t\t},\n\t\t\tonFail: (failureCount, error) => {\n\t\t\t\tthis.#dispatch({\n\t\t\t\t\ttype: \"failed\",\n\t\t\t\t\tfailureCount,\n\t\t\t\t\terror\n\t\t\t\t});\n\t\t\t},\n\t\t\tonPause: () => {\n\t\t\t\tthis.#dispatch({ type: \"pause\" });\n\t\t\t},\n\t\t\tonContinue,\n\t\t\tretry: this.options.retry ?? 0,\n\t\t\tretryDelay: this.options.retryDelay,\n\t\t\tnetworkMode: this.options.networkMode,\n\t\t\tcanRun: () => this.#mutationCache.canRun(this)\n\t\t});\n\t\tconst restored = this.state.status === \"pending\";\n\t\tconst isPaused = !retryer.canStart();\n\t\ttry {\n\t\t\tif (restored) onContinue();\n\t\t\telse {\n\t\t\t\tthis.#dispatch({\n\t\t\t\t\ttype: \"pending\",\n\t\t\t\t\tvariables,\n\t\t\t\t\tisPaused\n\t\t\t\t});\n\t\t\t\tif (this.#mutationCache.config.onMutate) await this.#mutationCache.config.onMutate(variables, this, mutationFnContext);\n\t\t\t\tconst context = await this.options.onMutate?.(variables, mutationFnContext);\n\t\t\t\tif (context !== this.state.context) this.#dispatch({\n\t\t\t\t\ttype: \"pending\",\n\t\t\t\t\tcontext,\n\t\t\t\t\tvariables,\n\t\t\t\t\tisPaused\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst data = await retryer.start();\n\t\t\tawait this.#mutationCache.config.onSuccess?.(data, variables, this.state.context, this, mutationFnContext);\n\t\t\tawait this.options.onSuccess?.(data, variables, this.state.context, mutationFnContext);\n\t\t\tawait this.#mutationCache.config.onSettled?.(data, null, this.state.variables, this.state.context, this, mutationFnContext);\n\t\t\tawait this.options.onSettled?.(data, null, variables, this.state.context, mutationFnContext);\n\t\t\tthis.#dispatch({\n\t\t\t\ttype: \"success\",\n\t\t\t\tdata\n\t\t\t});\n\t\t\treturn data;\n\t\t} catch (error) {\n\t\t\ttry {\n\t\t\t\tawait this.#mutationCache.config.onError?.(error, variables, this.state.context, this, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.options.onError?.(error, variables, this.state.context, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.#mutationCache.config.onSettled?.(void 0, error, this.state.variables, this.state.context, this, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.options.onSettled?.(void 0, error, variables, this.state.context, mutationFnContext);\n\t\t\t} catch (e) {\n\t\t\t\tPromise.reject(e);\n\t\t\t}\n\t\t\tthis.#dispatch({\n\t\t\t\ttype: \"error\",\n\t\t\t\terror\n\t\t\t});\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tif (this.#retryer === retryer) this.#retryer = void 0;\n\t\t\tthis.#mutationCache.runNext(this);\n\t\t}\n\t}\n\t#dispatch(action) {\n\t\tconst reducer = (state) => {\n\t\t\tswitch (action.type) {\n\t\t\t\tcase \"failed\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tfailureCount: action.failureCount,\n\t\t\t\t\tfailureReason: action.error\n\t\t\t\t};\n\t\t\t\tcase \"pause\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tisPaused: true\n\t\t\t\t};\n\t\t\t\tcase \"continue\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tisPaused: false\n\t\t\t\t};\n\t\t\t\tcase \"pending\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tcontext: action.context,\n\t\t\t\t\tdata: void 0,\n\t\t\t\t\tfailureCount: 0,\n\t\t\t\t\tfailureReason: null,\n\t\t\t\t\terror: null,\n\t\t\t\t\tisPaused: action.isPaused,\n\t\t\t\t\tstatus: \"pending\",\n\t\t\t\t\tvariables: action.variables,\n\t\t\t\t\tsubmittedAt: Date.now()\n\t\t\t\t};\n\t\t\t\tcase \"success\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tdata: action.data,\n\t\t\t\t\tfailureCount: 0,\n\t\t\t\t\tfailureReason: null,\n\t\t\t\t\terror: null,\n\t\t\t\t\tstatus: \"success\",\n\t\t\t\t\tisPaused: false\n\t\t\t\t};\n\t\t\t\tcase \"error\": return {\n\t\t\t\t\t...state,\n\t\t\t\t\tdata: void 0,\n\t\t\t\t\terror: action.error,\n\t\t\t\t\tfailureCount: state.failureCount + 1,\n\t\t\t\t\tfailureReason: action.error,\n\t\t\t\t\tisPaused: false,\n\t\t\t\t\tstatus: \"error\"\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t\tthis.state = reducer(this.state);\n\t\tnotifyManager.batch(() => {\n\t\t\tthis.#observers.forEach((observer) => {\n\t\t\t\tobserver.onMutationUpdate(action);\n\t\t\t});\n\t\t\tthis.#mutationCache.notify({\n\t\t\t\tmutation: this,\n\t\t\t\ttype: \"updated\",\n\t\t\t\taction\n\t\t\t});\n\t\t});\n\t}\n};\nfunction getDefaultState() {\n\treturn {\n\t\tcontext: void 0,\n\t\tdata: void 0,\n\t\terror: null,\n\t\tfailureCount: 0,\n\t\tfailureReason: null,\n\t\tisPaused: false,\n\t\tstatus: \"idle\",\n\t\tvariables: void 0,\n\t\tsubmittedAt: 0\n\t};\n}\n//#endregion\nexport { Mutation, getDefaultState };\n\n//# sourceMappingURL=mutation.js.map"],"ignoreList":[0],"mappings":"A,0DAqBA,IAAIG,EAAW,cAAcD,CAAU,CACtC,GACA,GACA,GACA,GACA,YAAY,EAAQ,CACnB,MAAM,EACN,KAAKE,GAAUC,EAAO,OACtB,KAAK,WAAaA,EAAO,WACzB,KAAKC,GAAiBD,EAAO,cAC7B,KAAKE,GAAa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OACT,CACD,CACD,EACA,KAAK,MAAQD,EAAQ,KAAK,KAAK,EAC/BtB,EAAc,UAAY,CACzB,KAAKM,GAAW,QAAS,GAAa,CACrCG,EAAS,iBAAiBc,CAAM,CACjC,CAAC,EACD,KAAKlB,GAAe,OAAO,CAC1B,SAAU,KACV,KAAM,UACN,QACD,CAAC,CACF,CAAC,CACF,CACD,EACA,SAASE,GAAkB,CAC1B,MAAO,CACN,QAAS,IAAK,GACd,KAAM,IAAK,GACX,MAAO,KACP,aAAc,EACd,cAAe,KACf,SAAU,GACV,OAAQ,OACR,UAAW,IAAK,GAChB,YAAa,CACd,CACD,C"}
@@ -0,0 +1 @@
1
+ .z_tds_2f_web-UGjdnU0{display:flex}.z_tds_2f_web-UGjdnU1{flex-direction:row}.z_tds_2f_web-UGjdnU2{&:where([data-align=baseline]){align-items:baseline}}.z_tds_2f_web-UGjdnU3{&:where([data-align=center]){align-items:center}}.z_tds_2f_web-UGjdnU4{&:where([data-align=end]){align-items:flex-end}}.z_tds_2f_web-UGjdnU5{&:where([data-align=start]){align-items:flex-start}}.z_tds_2f_web-UGjdnU6{&:where([data-align=stretch]){align-items:stretch}}.z_tds_2f_web-UGjdnU7{&:where([data-gap="0"]){gap:var(--z-tds_2f_web-spacing-0,0rem)}}.z_tds_2f_web-UGjdnU8{&:where([data-gap="4"]){gap:var(--z-tds_2f_web-spacing-4,.25rem)}}.z_tds_2f_web-UGjdnU9{&:where([data-gap="48"]){gap:var(--z-tds_2f_web-spacing-48,3rem)}}.z_tds_2f_web-UGjdnUa{&:where([data-gap="64"]){gap:var(--z-tds_2f_web-spacing-64,4rem)}}.z_tds_2f_web-UGjdnUb{&:where([data-gap="8"]){gap:var(--z-tds_2f_web-spacing-8,.5rem)}}.z_tds_2f_web-UGjdnUc{&:where([data-gap="12"]){gap:var(--z-tds_2f_web-spacing-12,.75rem)}}.z_tds_2f_web-UGjdnUd{&:where([data-gap="16"]){gap:var(--z-tds_2f_web-spacing-16,1rem)}}.z_tds_2f_web-UGjdnUe{&:where([data-gap="24"]){gap:var(--z-tds_2f_web-spacing-24,1.5rem)}}.z_tds_2f_web-UGjdnUf{&:where([data-gap="32"]){gap:var(--z-tds_2f_web-spacing-32,2rem)}}.z_tds_2f_web-UGjdnUg{&:where([data-justify=between]){justify-content:space-between}}.z_tds_2f_web-UGjdnUh{&:where([data-justify=center]){justify-content:center}}.z_tds_2f_web-UGjdnUi{&:where([data-justify=end]){justify-content:flex-end}}.z_tds_2f_web-UGjdnUj{&:where([data-justify=start]){justify-content:flex-start}}.z_tds_2f_web-UGjdnUk{&:where([data-wrap=false]){flex-wrap:nowrap}}.z_tds_2f_web-UGjdnUl{&:where([data-wrap=true]){flex-wrap:wrap}}.z_tds_2f_web-DlNeLz0{background-color:currentColor}.z_tds_2f_web-DlNeLz1{border-radius:var(--z-tds_2f_web-radius-full,9999px)}.z_tds_2f_web-DlNeLz2{flex-shrink:0}.z_tds_2f_web-DlNeLz3{height:var(--z-tds_2f_web-spacing-6,.375rem)}.z_tds_2f_web-DlNeLz4{width:var(--z-tds_2f_web-spacing-6,.375rem)}.z_tds_2f_web-DlNeLz5{align-items:center}.z_tds_2f_web-DlNeLz6{border:1px solid}.z_tds_2f_web-DlNeLz7{border-color:#0000}.z_tds_2f_web-DlNeLz8{box-sizing:border-box}.z_tds_2f_web-DlNeLz9{column-gap:var(--z-tds_2f_web-spacing-6,.375rem)}.z_tds_2f_web-DlNeLza{display:inline-flex}.z_tds_2f_web-DlNeLzb{height:var(--z-tds_2f_web-spacing-24,1.5rem)}.z_tds_2f_web-DlNeLzc{padding-inline:var(--z-tds_2f_web-spacing-8,.5rem)}.z_tds_2f_web-DlNeLzd{font-family:var(--z-tds_2f_web-typography-label-12-fontFamily,Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji")}.z_tds_2f_web-DlNeLze{font-size:var(--z-tds_2f_web-typography-label-12-fontSize,12px)}.z_tds_2f_web-DlNeLzf{font-weight:var(--z-tds_2f_web-typography-label-12-fontWeight,450)}.z_tds_2f_web-DlNeLzg{letter-spacing:var(--z-tds_2f_web-typography-label-12-letterSpacing,.01px)}.z_tds_2f_web-DlNeLzh{line-height:var(--z-tds_2f_web-typography-label-12-lineHeight,16px)}.z_tds_2f_web-DlNeLzi{white-space:nowrap}.z_tds_2f_web-DlNeLzj{&>svg{flex-shrink:0}}.z_tds_2f_web-DlNeLzk{&>svg{height:var(--z-tds_2f_web-spacing-12,.75rem)}}.z_tds_2f_web-DlNeLzl{&>svg{width:var(--z-tds_2f_web-spacing-12,.75rem)}}.z_tds_2f_web-DlNeLzm{&:is(button,a){cursor:pointer}}.z_tds_2f_web-DlNeLzn{&:is(button,a){outline-color:#0000}}.z_tds_2f_web-DlNeLzo{&:is(button,a){outline-offset:var(--z-tds_2f_web-outlineOffset-0,0px)}}.z_tds_2f_web-DlNeLzp{&:is(button,a){outline-style:solid}}.z_tds_2f_web-DlNeLzq{&:is(button,a){outline-width:var(--z-tds_2f_web-outlineWidth-2,2px)}}.z_tds_2f_web-DlNeLzr{&:is(button,a){text-decoration:none}}.z_tds_2f_web-DlNeLzs{&:is(button,a){transition-duration:var(--z-tds_2f_web-transitionDuration-160,.16s)}}.z_tds_2f_web-DlNeLzt{&:is(button,a){transition-property:opacity,outline-color,outline-offset,scale}}.z_tds_2f_web-DlNeLzu{&:is(button,a){transition-timing-function:var(--z-tds_2f_web-ease-snappy,cubic-bezier(.23, 1, .32, 1))}}.z_tds_2f_web-DlNeLzv{&:is(button,a):active{scale:var(--z-tds_2f_web-scale-press,.98)}}.z_tds_2f_web-DlNeLzw{&:is(button,a):focus-visible{outline-color:var(--z-tds_2f_web-color-blue-700,#4471ed)}}.z_tds_2f_web-DlNeLzx{&:is(button,a):focus-visible{outline-offset:var(--z-tds_2f_web-outlineOffset-2,2px)}}.z_tds_2f_web-DlNeLzy{&:is(button,a):hover{opacity:.8}}.z_tds_2f_web-DlNeLzz{&:is(button):disabled{cursor:default}}.z_tds_2f_web-DlNeLz10{&:is(button):disabled{opacity:var(--z-tds_2f_web-opacity-disabled,.4)}}@media (prefers-reduced-motion:reduce){.z_tds_2f_web-DlNeLz11{&:is(button,a){transition-property:opacity,outline-color}}.z_tds_2f_web-DlNeLz12{&:is(button,a):active{scale:none}}}.z_tds_2f_web-DlNeLz13{&:where([data-intent=accent]){background-color:var(--z-tds_2f_web-color-purple-100,light-dark(#faf0ff,#231528))}}.z_tds_2f_web-DlNeLz14{&:where([data-intent=accent]){color:var(--z-tds_2f_web-color-purple-900,light-dark(#8a03ae,#cf79ef))}}.z_tds_2f_web-DlNeLz15{&:where([data-intent=info]){background-color:var(--z-tds_2f_web-color-blue-100,light-dark(#f2f6fe,#161b29))}}.z_tds_2f_web-DlNeLz16{&:where([data-intent=info]){color:var(--z-tds_2f_web-color-blue-900,light-dark(#3d64cd,#7498fb))}}.z_tds_2f_web-DlNeLz17{&:where([data-intent=negative]){background-color:var(--z-tds_2f_web-color-red-100,light-dark(#fff0ed,#2a1410))}}.z_tds_2f_web-DlNeLz18{&:where([data-intent=negative]){color:var(--z-tds_2f_web-color-red-900,light-dark(#cf2203,#f55c45))}}.z_tds_2f_web-DlNeLz19{&:where([data-intent=neutral]){background-color:var(--z-tds_2f_web-color-grayAlpha-100,light-dark(#0000000d,#ffffff12))}}.z_tds_2f_web-DlNeLz1a{&:where([data-intent=neutral]){color:var(--z-tds_2f_web-color-gray-900,light-dark(#4d4d4d,#bcbbbb))}}.z_tds_2f_web-DlNeLz1b{&:where([data-intent=positive]){background-color:var(--z-tds_2f_web-color-green-100,light-dark(#ecfcf1,#052315))}}.z_tds_2f_web-DlNeLz1c{&:where([data-intent=positive]){color:var(--z-tds_2f_web-color-green-900,light-dark(#037c46,#59e5a4))}}.z_tds_2f_web-DlNeLz1d{&:where([data-intent=warning]){background-color:var(--z-tds_2f_web-color-amber-100,light-dark(#fff5ef,#2d1504))}}.z_tds_2f_web-DlNeLz1e{&:where([data-intent=warning]){color:var(--z-tds_2f_web-color-amber-900,light-dark(#a55008,#fa8e36))}}.z_tds_2f_web-DlNeLz1f{&:where([data-shape=pill]){border-radius:var(--z-tds_2f_web-radius-full,9999px)}}.z_tds_2f_web-DlNeLz1g{&:where([data-shape=rounded]){border-radius:var(--z-tds_2f_web-radius-8,.5rem)}}.z_tds_2f_web-DlNeLz1h{&:where([data-size=large]){height:var(--z-tds_2f_web-spacing-32,2rem)}}.z_tds_2f_web-DlNeLz1i{&:where([data-size=large]){padding-inline:var(--z-tds_2f_web-spacing-12,.75rem)}}.z_tds_2f_web-DlNeLz1j{&:where([data-size=large]){font-family:var(--z-tds_2f_web-typography-label-14-fontFamily,Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji")}}.z_tds_2f_web-DlNeLz1k{&:where([data-size=large]){font-size:var(--z-tds_2f_web-typography-label-14-fontSize,14px)}}.z_tds_2f_web-DlNeLz1l{&:where([data-size=large]){font-weight:var(--z-tds_2f_web-typography-label-14-fontWeight,450)}}.z_tds_2f_web-DlNeLz1m{&:where([data-size=large]){letter-spacing:var(--z-tds_2f_web-typography-label-14-letterSpacing,-.09px)}}.z_tds_2f_web-DlNeLz1n{&:where([data-size=large]){line-height:var(--z-tds_2f_web-typography-label-14-lineHeight,20px)}}.z_tds_2f_web-DlNeLz1o{&:where([data-size=small]){height:var(--z-tds_2f_web-spacing-20,1.25rem)}}.z_tds_2f_web-DlNeLz1p{&:where([data-size=small]){padding-inline:var(--z-tds_2f_web-spacing-6,.375rem)}}.z_tds_2f_web-DlNeLz1q{&:where([data-variant=outlined]):where(*,.__zyzz-compound-0){background-color:#0000}}.z_tds_2f_web-DlNeLz1r{&:where([data-variant=outlined]):where(*,.__zyzz-compound-0){border-color:currentColor}}.z_tds_2f_web-DlNeLz1s{&:where([data-variant=plain]):where(*,.__zyzz-compound-1){background-color:#0000}}.z_tds_2f_web-DlNeLz1t{&:where([data-variant=plain]):where(*,.__zyzz-compound-1){padding-inline:var(--z-tds_2f_web-spacing-0,0rem)}}
@@ -0,0 +1,2 @@
1
+ import{s as e}from"./react-dom-pSpaua7D.js";import{l as t,o as n}from"./zyzz.config-CW977vYL.js";function r(e){let{align:t,className:r,gap:a,justify:o,ref:s,render:c,vars:l,wrap:u,...d}=e;return n({defaultTagName:`div`,props:{...d,...i.inline({align:t,className:r,gap:a,justify:o,style:e.style,vars:l,wrap:u})},ref:s,render:c})}var i;(function(e){e.inline=((e={})=>{let t=e.className,n=e.style,r=e.vars,i=r?{...r,...n}:n,a=t?`z_tds_2f_web-UGjdnU0 z_tds_2f_web-UGjdnU1 z_tds_2f_web-UGjdnU2 z_tds_2f_web-UGjdnU3 z_tds_2f_web-UGjdnU4 z_tds_2f_web-UGjdnU5 z_tds_2f_web-UGjdnU6 z_tds_2f_web-UGjdnU7 z_tds_2f_web-UGjdnU8 z_tds_2f_web-UGjdnU9 z_tds_2f_web-UGjdnUa z_tds_2f_web-UGjdnUb z_tds_2f_web-UGjdnUc z_tds_2f_web-UGjdnUd z_tds_2f_web-UGjdnUe z_tds_2f_web-UGjdnUf z_tds_2f_web-UGjdnUg z_tds_2f_web-UGjdnUh z_tds_2f_web-UGjdnUi z_tds_2f_web-UGjdnUj z_tds_2f_web-UGjdnUk z_tds_2f_web-UGjdnUl `+t:`z_tds_2f_web-UGjdnU0 z_tds_2f_web-UGjdnU1 z_tds_2f_web-UGjdnU2 z_tds_2f_web-UGjdnU3 z_tds_2f_web-UGjdnU4 z_tds_2f_web-UGjdnU5 z_tds_2f_web-UGjdnU6 z_tds_2f_web-UGjdnU7 z_tds_2f_web-UGjdnU8 z_tds_2f_web-UGjdnU9 z_tds_2f_web-UGjdnUa z_tds_2f_web-UGjdnUb z_tds_2f_web-UGjdnUc z_tds_2f_web-UGjdnUd z_tds_2f_web-UGjdnUe z_tds_2f_web-UGjdnUf z_tds_2f_web-UGjdnUg z_tds_2f_web-UGjdnUh z_tds_2f_web-UGjdnUi z_tds_2f_web-UGjdnUj z_tds_2f_web-UGjdnUk z_tds_2f_web-UGjdnUl`,o=i?{className:a,style:i}:{className:a},s;return s=Object.hasOwn(e,`align`)?e.align:void 0,s===void 0&&(s=`center`),s!=null&&(o[`data-align`]=String(s)),s=Object.hasOwn(e,`gap`)?e.gap:void 0,s===void 0&&(s=`8`),s!=null&&(o[`data-gap`]=String(s)),s=Object.hasOwn(e,`justify`)?e.justify:void 0,s===void 0&&(s=`start`),s!=null&&(o[`data-justify`]=String(s)),s=Object.hasOwn(e,`wrap`)?e.wrap:void 0,s===void 0&&(s=`false`),s!=null&&(o[`data-wrap`]=String(s)),o})})(i||={});var a=e();function o(e){let{className:t,intent:r,ref:i,render:a,shape:o,size:c,variant:l,vars:u,...d}=e;return n({defaultTagName:`span`,props:{...d,...s.tag({className:t,intent:r,shape:o,size:c,style:e.style,variant:l,vars:u})},ref:i,render:a})}(function(e){function t(e){let{className:t,vars:n,...r}=e;return(0,a.jsx)(`span`,{"aria-hidden":`true`,...r,...s.dot({className:t,style:e.style,vars:n})})}e.Dot=t})(o||={});var s;(function(e){e.dot=t({className:`z_tds_2f_web-DlNeLz0 z_tds_2f_web-DlNeLz1 z_tds_2f_web-DlNeLz2 z_tds_2f_web-DlNeLz3 z_tds_2f_web-DlNeLz4`}),e.tag=((e={})=>{let t=e.className,n=e.style,r=e.vars,i=r?{...r,...n}:n,a=t?`z_tds_2f_web-DlNeLz5 z_tds_2f_web-DlNeLz6 z_tds_2f_web-DlNeLz7 z_tds_2f_web-DlNeLz8 z_tds_2f_web-DlNeLz9 z_tds_2f_web-DlNeLza z_tds_2f_web-DlNeLzb z_tds_2f_web-DlNeLzc z_tds_2f_web-DlNeLzd z_tds_2f_web-DlNeLze z_tds_2f_web-DlNeLzf z_tds_2f_web-DlNeLzg z_tds_2f_web-DlNeLzh z_tds_2f_web-DlNeLzi z_tds_2f_web-DlNeLzj z_tds_2f_web-DlNeLzk z_tds_2f_web-DlNeLzl z_tds_2f_web-DlNeLzm z_tds_2f_web-DlNeLzn z_tds_2f_web-DlNeLzo z_tds_2f_web-DlNeLzp z_tds_2f_web-DlNeLzq z_tds_2f_web-DlNeLzr z_tds_2f_web-DlNeLzs z_tds_2f_web-DlNeLzt z_tds_2f_web-DlNeLzu z_tds_2f_web-DlNeLzv z_tds_2f_web-DlNeLzw z_tds_2f_web-DlNeLzx z_tds_2f_web-DlNeLzy z_tds_2f_web-DlNeLzz z_tds_2f_web-DlNeLz10 z_tds_2f_web-DlNeLz11 z_tds_2f_web-DlNeLz12 z_tds_2f_web-DlNeLz13 z_tds_2f_web-DlNeLz14 z_tds_2f_web-DlNeLz15 z_tds_2f_web-DlNeLz16 z_tds_2f_web-DlNeLz17 z_tds_2f_web-DlNeLz18 z_tds_2f_web-DlNeLz19 z_tds_2f_web-DlNeLz1a z_tds_2f_web-DlNeLz1b z_tds_2f_web-DlNeLz1c z_tds_2f_web-DlNeLz1d z_tds_2f_web-DlNeLz1e z_tds_2f_web-DlNeLz1f z_tds_2f_web-DlNeLz1g z_tds_2f_web-DlNeLz1h z_tds_2f_web-DlNeLz1i z_tds_2f_web-DlNeLz1j z_tds_2f_web-DlNeLz1k z_tds_2f_web-DlNeLz1l z_tds_2f_web-DlNeLz1m z_tds_2f_web-DlNeLz1n z_tds_2f_web-DlNeLz1o z_tds_2f_web-DlNeLz1p z_tds_2f_web-DlNeLz1q z_tds_2f_web-DlNeLz1r z_tds_2f_web-DlNeLz1s z_tds_2f_web-DlNeLz1t `+t:`z_tds_2f_web-DlNeLz5 z_tds_2f_web-DlNeLz6 z_tds_2f_web-DlNeLz7 z_tds_2f_web-DlNeLz8 z_tds_2f_web-DlNeLz9 z_tds_2f_web-DlNeLza z_tds_2f_web-DlNeLzb z_tds_2f_web-DlNeLzc z_tds_2f_web-DlNeLzd z_tds_2f_web-DlNeLze z_tds_2f_web-DlNeLzf z_tds_2f_web-DlNeLzg z_tds_2f_web-DlNeLzh z_tds_2f_web-DlNeLzi z_tds_2f_web-DlNeLzj z_tds_2f_web-DlNeLzk z_tds_2f_web-DlNeLzl z_tds_2f_web-DlNeLzm z_tds_2f_web-DlNeLzn z_tds_2f_web-DlNeLzo z_tds_2f_web-DlNeLzp z_tds_2f_web-DlNeLzq z_tds_2f_web-DlNeLzr z_tds_2f_web-DlNeLzs z_tds_2f_web-DlNeLzt z_tds_2f_web-DlNeLzu z_tds_2f_web-DlNeLzv z_tds_2f_web-DlNeLzw z_tds_2f_web-DlNeLzx z_tds_2f_web-DlNeLzy z_tds_2f_web-DlNeLzz z_tds_2f_web-DlNeLz10 z_tds_2f_web-DlNeLz11 z_tds_2f_web-DlNeLz12 z_tds_2f_web-DlNeLz13 z_tds_2f_web-DlNeLz14 z_tds_2f_web-DlNeLz15 z_tds_2f_web-DlNeLz16 z_tds_2f_web-DlNeLz17 z_tds_2f_web-DlNeLz18 z_tds_2f_web-DlNeLz19 z_tds_2f_web-DlNeLz1a z_tds_2f_web-DlNeLz1b z_tds_2f_web-DlNeLz1c z_tds_2f_web-DlNeLz1d z_tds_2f_web-DlNeLz1e z_tds_2f_web-DlNeLz1f z_tds_2f_web-DlNeLz1g z_tds_2f_web-DlNeLz1h z_tds_2f_web-DlNeLz1i z_tds_2f_web-DlNeLz1j z_tds_2f_web-DlNeLz1k z_tds_2f_web-DlNeLz1l z_tds_2f_web-DlNeLz1m z_tds_2f_web-DlNeLz1n z_tds_2f_web-DlNeLz1o z_tds_2f_web-DlNeLz1p z_tds_2f_web-DlNeLz1q z_tds_2f_web-DlNeLz1r z_tds_2f_web-DlNeLz1s z_tds_2f_web-DlNeLz1t`,o=i?{className:a,style:i}:{className:a},s;return s=Object.hasOwn(e,`intent`)?e.intent:void 0,s===void 0&&(s=`neutral`),s!=null&&(o[`data-intent`]=String(s)),s=Object.hasOwn(e,`shape`)?e.shape:void 0,s===void 0&&(s=`pill`),s!=null&&(o[`data-shape`]=String(s)),s=Object.hasOwn(e,`size`)?e.size:void 0,s===void 0&&(s=`medium`),s!=null&&(o[`data-size`]=String(s)),s=Object.hasOwn(e,`variant`)?e.variant:void 0,s===void 0&&(s=`soft`),s!=null&&(o[`data-variant`]=String(s)),o})})(s||={});var c=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cg%20fill='none'%3e%3ccircle%20cx='16'%20cy='16'%20r='16'%20fill='%233e73c4'/%3e%3cg%20fill='%23fff'%3e%3cpath%20d='M20.02%2018.12c0-2.12-1.28-2.85-3.84-3.15-1.83-.25-2.2-.73-2.2-1.58s.62-1.4%201.84-1.4c1.1%200%201.7.37%202%201.28a.46.46%200%200%200%20.43.3h.98a.42.42%200%200%200%20.43-.42v-.06a3.04%203.04%200%200%200-2.75-2.5V9.15c0-.24-.18-.42-.48-.48h-.92c-.24%200-.42.18-.48.48v1.4c-1.83.24-3%201.45-3%202.97%200%202%201.23%202.8%203.79%203.1%201.7.3%202.25.66%202.25%201.64%200%20.97-.85%201.63-2%201.63-1.6%200-2.14-.66-2.32-1.57-.06-.25-.25-.37-.43-.37h-1.04a.42.42%200%200%200-.42.43v.06c.24%201.51%201.22%202.6%203.23%202.91v1.46c0%20.24.18.42.48.48h.92c.24%200%20.42-.18.49-.48v-1.46c1.82-.3%203.04-1.58%203.04-3.22z'/%3e%3cpath%20d='M12.9%2024.5a9.03%209.03%200%200%201-5.43-11.66%209%209%200%200%201%205.42-5.4c.25-.12.37-.3.37-.6v-.86c0-.24-.12-.42-.37-.48-.06%200-.18%200-.24.06a10.9%2010.9%200%200%200-7.13%2013.72c1.1%203.4%203.72%206%207.13%207.1.24.12.49%200%20.55-.24.06-.06.06-.13.06-.25v-.85c0-.18-.19-.42-.37-.54m6.46-18.94c-.24-.12-.49%200-.55.24-.06.06-.06.13-.06.25v.85c0%20.24.19.48.37.6a9.03%209.03%200%200%201%205.42%2011.66%209%209%200%200%201-5.42%205.4c-.25.12-.37.3-.37.6v.86c0%20.24.12.42.37.48.06%200%20.18%200%20.24-.06a10.9%2010.9%200%200%200%207.13-13.72%2011.03%2011.03%200%200%200-7.13-7.16'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e`,l=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'%3e%3ccircle%20cx='256'%20cy='256'%20r='256'%20fill='%2300805e'/%3e%3cpath%20fill='%23f0f0f0'%20d='M386.895%20186.535v-58.196H125.106v58.196h101.797V244.7h58.195v-58.165zM226.934%20361.061v58.197h58.164v-58.197h58.165v-116.36h-58.165v116.36zm-.001-116.36h-58.195v116.36h58.195z'/%3e%3c/svg%3e`,u=`/assets/pathUSD-BvaO6ooS.svg`;export{r as a,o as i,l as n,c as r,u as t};
2
+ //# sourceMappingURL=pathUSD-DqRWfB70.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathUSD-DqRWfB70.js","names":["styles","_jsx","require_jsx_runtime","create","useRender","Inline","attributes","props","styles$1","external","input","style","vars","inline","className","result","value","\"align\"","\"gap\"","\"justify\"","\"wrap\"","import_jsx_runtime","Tag","styles","Dot","\"intent\"","\"shape\"","\"size\"","\"variant\"","USDC_e_default","USDT0_default","pathUSD_default"],"sources":["../../../../../node_modules/.pnpm/@tempoxyz+ds@0.2.6_@types+react@19.3.0_react-dom@19.3.0_react@19.3.0__react-native@0.86_f564df10a26f3190a3aaf6288ad1f3d1/node_modules/@tempoxyz/ds/dist/web/components/Inline.js","../../../../../node_modules/.pnpm/@tempoxyz+ds@0.2.6_@types+react@19.3.0_react-dom@19.3.0_react@19.3.0__react-native@0.86_f564df10a26f3190a3aaf6288ad1f3d1/node_modules/@tempoxyz/ds/dist/web/components/Tag.css","../../../../../node_modules/.pnpm/@tempoxyz+ds@0.2.6_@types+react@19.3.0_react-dom@19.3.0_react@19.3.0__react-native@0.86_f564df10a26f3190a3aaf6288ad1f3d1/node_modules/@tempoxyz/ds/dist/web/components/Tag.js","../../../components/icons/USDC.e.svg?url","../../../components/icons/USDT0.svg?url","../../../components/icons/pathUSD.svg?url"],"sourcesContent":["import { useRender } from '@base-ui/react/use-render';\nimport { variants } from '../zyzz.config.js';\n/**\n * Lays out children in a horizontal flex row with a spacing-token `gap`. Renders a `div`, and\n * `render` swaps the element.\n *\n * - Set `wrap` when the row can outgrow narrow viewports, so items reflow instead of overflowing.\n * - Keep DOM order matching visual order, so reading and focus order follow the layout.\n *\n * @example\n * <Inline gap=\"12\" justify=\"between\" wrap>\n * <Button>Send</Button>\n * <Button variant=\"secondary\">Receive</Button>\n * </Inline>\n *\n * @see {@link https://base-ui.com/react/utils/use-render | Base UI useRender}\n * @see {@link https://www.w3.org/WAI/WCAG22/Understanding/reflow.html | WCAG 2.2 Reflow}\n * @see {@link https://www.w3.org/WAI/WCAG22/Understanding/meaningful-sequence.html | WCAG 2.2 Meaningful Sequence}\n */\nexport function Inline(props) {\n const { align, className, gap, justify, ref, render, vars, wrap, ...attributes } = props;\n return useRender({\n defaultTagName: 'div',\n props: {\n ...attributes,\n ...styles.inline({ align, className, gap, justify, style: props.style, vars, wrap }),\n },\n ref,\n render,\n });\n}\nvar styles;\n(function (styles) {\n styles.inline = ((input={})=>{const external=input.className,style=input.style,vars=input.vars,inline=vars?{...vars,...style}:style,className=external?\"z_tds_2f_web-UGjdnU0 z_tds_2f_web-UGjdnU1 z_tds_2f_web-UGjdnU2 z_tds_2f_web-UGjdnU3 z_tds_2f_web-UGjdnU4 z_tds_2f_web-UGjdnU5 z_tds_2f_web-UGjdnU6 z_tds_2f_web-UGjdnU7 z_tds_2f_web-UGjdnU8 z_tds_2f_web-UGjdnU9 z_tds_2f_web-UGjdnUa z_tds_2f_web-UGjdnUb z_tds_2f_web-UGjdnUc z_tds_2f_web-UGjdnUd z_tds_2f_web-UGjdnUe z_tds_2f_web-UGjdnUf z_tds_2f_web-UGjdnUg z_tds_2f_web-UGjdnUh z_tds_2f_web-UGjdnUi z_tds_2f_web-UGjdnUj z_tds_2f_web-UGjdnUk z_tds_2f_web-UGjdnUl\"+\" \"+external:\"z_tds_2f_web-UGjdnU0 z_tds_2f_web-UGjdnU1 z_tds_2f_web-UGjdnU2 z_tds_2f_web-UGjdnU3 z_tds_2f_web-UGjdnU4 z_tds_2f_web-UGjdnU5 z_tds_2f_web-UGjdnU6 z_tds_2f_web-UGjdnU7 z_tds_2f_web-UGjdnU8 z_tds_2f_web-UGjdnU9 z_tds_2f_web-UGjdnUa z_tds_2f_web-UGjdnUb z_tds_2f_web-UGjdnUc z_tds_2f_web-UGjdnUd z_tds_2f_web-UGjdnUe z_tds_2f_web-UGjdnUf z_tds_2f_web-UGjdnUg z_tds_2f_web-UGjdnUh z_tds_2f_web-UGjdnUi z_tds_2f_web-UGjdnUj z_tds_2f_web-UGjdnUk z_tds_2f_web-UGjdnUl\",result=inline?{className,style:inline}:{className};let value;value=Object.hasOwn(input,\"align\")?input[\"align\"]:void 0;if(value===void 0)value=\"center\";if(value!==null&&value!==void 0)result[\"data-align\"]=String(value);value=Object.hasOwn(input,\"gap\")?input[\"gap\"]:void 0;if(value===void 0)value=\"8\";if(value!==null&&value!==void 0)result[\"data-gap\"]=String(value);value=Object.hasOwn(input,\"justify\")?input[\"justify\"]:void 0;if(value===void 0)value=\"start\";if(value!==null&&value!==void 0)result[\"data-justify\"]=String(value);value=Object.hasOwn(input,\"wrap\")?input[\"wrap\"]:void 0;if(value===void 0)value=\"false\";if(value!==null&&value!==void 0)result[\"data-wrap\"]=String(value);return result});\n})(styles || (styles = {}));\n//# sourceMappingURL=Inline.js.map\nimport './Inline.css';\n",".z_tds_2f_web-DlNeLz0{background-color:currentColor}.z_tds_2f_web-DlNeLz1{border-radius:var(--z-tds_2f_web-radius-full,9999px)}.z_tds_2f_web-DlNeLz2{flex-shrink:0}.z_tds_2f_web-DlNeLz3{height:var(--z-tds_2f_web-spacing-6,.375rem)}.z_tds_2f_web-DlNeLz4{width:var(--z-tds_2f_web-spacing-6,.375rem)}.z_tds_2f_web-DlNeLz5{align-items:center}.z_tds_2f_web-DlNeLz6{border:1px solid}.z_tds_2f_web-DlNeLz7{border-color:#0000}.z_tds_2f_web-DlNeLz8{box-sizing:border-box}.z_tds_2f_web-DlNeLz9{column-gap:var(--z-tds_2f_web-spacing-6,.375rem)}.z_tds_2f_web-DlNeLza{display:inline-flex}.z_tds_2f_web-DlNeLzb{height:var(--z-tds_2f_web-spacing-24,1.5rem)}.z_tds_2f_web-DlNeLzc{padding-inline:var(--z-tds_2f_web-spacing-8,.5rem)}.z_tds_2f_web-DlNeLzd{font-family:var(--z-tds_2f_web-typography-label-12-fontFamily,Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\")}.z_tds_2f_web-DlNeLze{font-size:var(--z-tds_2f_web-typography-label-12-fontSize,12px)}.z_tds_2f_web-DlNeLzf{font-weight:var(--z-tds_2f_web-typography-label-12-fontWeight,450)}.z_tds_2f_web-DlNeLzg{letter-spacing:var(--z-tds_2f_web-typography-label-12-letterSpacing,.01px)}.z_tds_2f_web-DlNeLzh{line-height:var(--z-tds_2f_web-typography-label-12-lineHeight,16px)}.z_tds_2f_web-DlNeLzi{white-space:nowrap}.z_tds_2f_web-DlNeLzj{&>svg{flex-shrink:0}}.z_tds_2f_web-DlNeLzk{&>svg{height:var(--z-tds_2f_web-spacing-12,.75rem)}}.z_tds_2f_web-DlNeLzl{&>svg{width:var(--z-tds_2f_web-spacing-12,.75rem)}}.z_tds_2f_web-DlNeLzm{&:is(button,a){cursor:pointer}}.z_tds_2f_web-DlNeLzn{&:is(button,a){outline-color:#0000}}.z_tds_2f_web-DlNeLzo{&:is(button,a){outline-offset:var(--z-tds_2f_web-outlineOffset-0,0px)}}.z_tds_2f_web-DlNeLzp{&:is(button,a){outline-style:solid}}.z_tds_2f_web-DlNeLzq{&:is(button,a){outline-width:var(--z-tds_2f_web-outlineWidth-2,2px)}}.z_tds_2f_web-DlNeLzr{&:is(button,a){text-decoration:none}}.z_tds_2f_web-DlNeLzs{&:is(button,a){transition-duration:var(--z-tds_2f_web-transitionDuration-160,.16s)}}.z_tds_2f_web-DlNeLzt{&:is(button,a){transition-property:opacity,outline-color,outline-offset,scale}}.z_tds_2f_web-DlNeLzu{&:is(button,a){transition-timing-function:var(--z-tds_2f_web-ease-snappy,cubic-bezier(.23, 1, .32, 1))}}.z_tds_2f_web-DlNeLzv{&:is(button,a):active{scale:var(--z-tds_2f_web-scale-press,.98)}}.z_tds_2f_web-DlNeLzw{&:is(button,a):focus-visible{outline-color:var(--z-tds_2f_web-color-blue-700,#4471ed)}}.z_tds_2f_web-DlNeLzx{&:is(button,a):focus-visible{outline-offset:var(--z-tds_2f_web-outlineOffset-2,2px)}}.z_tds_2f_web-DlNeLzy{&:is(button,a):hover{opacity:.8}}.z_tds_2f_web-DlNeLzz{&:is(button):disabled{cursor:default}}.z_tds_2f_web-DlNeLz10{&:is(button):disabled{opacity:var(--z-tds_2f_web-opacity-disabled,.4)}}@media (prefers-reduced-motion:reduce){.z_tds_2f_web-DlNeLz11{&:is(button,a){transition-property:opacity,outline-color}}.z_tds_2f_web-DlNeLz12{&:is(button,a):active{scale:none}}}.z_tds_2f_web-DlNeLz13{&:where([data-intent=accent]){background-color:var(--z-tds_2f_web-color-purple-100,light-dark(#faf0ff,#231528))}}.z_tds_2f_web-DlNeLz14{&:where([data-intent=accent]){color:var(--z-tds_2f_web-color-purple-900,light-dark(#8a03ae,#cf79ef))}}.z_tds_2f_web-DlNeLz15{&:where([data-intent=info]){background-color:var(--z-tds_2f_web-color-blue-100,light-dark(#f2f6fe,#161b29))}}.z_tds_2f_web-DlNeLz16{&:where([data-intent=info]){color:var(--z-tds_2f_web-color-blue-900,light-dark(#3d64cd,#7498fb))}}.z_tds_2f_web-DlNeLz17{&:where([data-intent=negative]){background-color:var(--z-tds_2f_web-color-red-100,light-dark(#fff0ed,#2a1410))}}.z_tds_2f_web-DlNeLz18{&:where([data-intent=negative]){color:var(--z-tds_2f_web-color-red-900,light-dark(#cf2203,#f55c45))}}.z_tds_2f_web-DlNeLz19{&:where([data-intent=neutral]){background-color:var(--z-tds_2f_web-color-grayAlpha-100,light-dark(#0000000d,#ffffff12))}}.z_tds_2f_web-DlNeLz1a{&:where([data-intent=neutral]){color:var(--z-tds_2f_web-color-gray-900,light-dark(#4d4d4d,#bcbbbb))}}.z_tds_2f_web-DlNeLz1b{&:where([data-intent=positive]){background-color:var(--z-tds_2f_web-color-green-100,light-dark(#ecfcf1,#052315))}}.z_tds_2f_web-DlNeLz1c{&:where([data-intent=positive]){color:var(--z-tds_2f_web-color-green-900,light-dark(#037c46,#59e5a4))}}.z_tds_2f_web-DlNeLz1d{&:where([data-intent=warning]){background-color:var(--z-tds_2f_web-color-amber-100,light-dark(#fff5ef,#2d1504))}}.z_tds_2f_web-DlNeLz1e{&:where([data-intent=warning]){color:var(--z-tds_2f_web-color-amber-900,light-dark(#a55008,#fa8e36))}}.z_tds_2f_web-DlNeLz1f{&:where([data-shape=pill]){border-radius:var(--z-tds_2f_web-radius-full,9999px)}}.z_tds_2f_web-DlNeLz1g{&:where([data-shape=rounded]){border-radius:var(--z-tds_2f_web-radius-8,.5rem)}}.z_tds_2f_web-DlNeLz1h{&:where([data-size=large]){height:var(--z-tds_2f_web-spacing-32,2rem)}}.z_tds_2f_web-DlNeLz1i{&:where([data-size=large]){padding-inline:var(--z-tds_2f_web-spacing-12,.75rem)}}.z_tds_2f_web-DlNeLz1j{&:where([data-size=large]){font-family:var(--z-tds_2f_web-typography-label-14-fontFamily,Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", \"Noto Sans\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\")}}.z_tds_2f_web-DlNeLz1k{&:where([data-size=large]){font-size:var(--z-tds_2f_web-typography-label-14-fontSize,14px)}}.z_tds_2f_web-DlNeLz1l{&:where([data-size=large]){font-weight:var(--z-tds_2f_web-typography-label-14-fontWeight,450)}}.z_tds_2f_web-DlNeLz1m{&:where([data-size=large]){letter-spacing:var(--z-tds_2f_web-typography-label-14-letterSpacing,-.09px)}}.z_tds_2f_web-DlNeLz1n{&:where([data-size=large]){line-height:var(--z-tds_2f_web-typography-label-14-lineHeight,20px)}}.z_tds_2f_web-DlNeLz1o{&:where([data-size=small]){height:var(--z-tds_2f_web-spacing-20,1.25rem)}}.z_tds_2f_web-DlNeLz1p{&:where([data-size=small]){padding-inline:var(--z-tds_2f_web-spacing-6,.375rem)}}.z_tds_2f_web-DlNeLz1q{&:where([data-variant=outlined]):where(*,.__zyzz-compound-0){background-color:#0000}}.z_tds_2f_web-DlNeLz1r{&:where([data-variant=outlined]):where(*,.__zyzz-compound-0){border-color:currentColor}}.z_tds_2f_web-DlNeLz1s{&:where([data-variant=plain]):where(*,.__zyzz-compound-1){background-color:#0000}}.z_tds_2f_web-DlNeLz1t{&:where([data-variant=plain]):where(*,.__zyzz-compound-1){padding-inline:var(--z-tds_2f_web-spacing-0,0rem)}}","\nimport { Props as __zyzzProps } from 'zyzz/runtime';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { useRender } from '@base-ui/react/use-render';\nimport { style, variants } from '../zyzz.config.js';\n/**\n * A compact status or metadata label, rendered as a `span`. Pass `render`, such as\n * `<button type=\"button\" />` or an `a` element, to make it interactive. Those tags keep the badge\n * look and add pointer, focus-visible and press feedback.\n *\n * - Keep the text to a word or two that names a status or attribute.\n * - Do not rely on `intent` color alone. The text or a leading icon must carry the meaning.\n * - Render a static tag for display. Reach for `render` only when the tag performs an action.\n *\n * @example\n * <Tag intent=\"positive\">\n * <Tag.Dot />\n * Active\n * </Tag>\n *\n * @see {@link https://base-ui.com/react/utils/use-render | Base UI useRender}\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/span | MDN span element}\n * @see {@link https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html | WCAG 2.2 Use of Color}\n * @see {@link https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html | WCAG 2.2 Contrast (Minimum)}\n */\nexport function Tag(props) {\n const { className, intent, ref, render, shape, size, variant, vars, ...attributes } = props;\n return useRender({\n defaultTagName: 'span',\n props: {\n ...attributes,\n ...styles.tag({ className, intent, shape, size, style: props.style, variant, vars }),\n },\n ref,\n render,\n });\n}\n(function (Tag) {\n /** A 6px dot in the tag's text color, hidden from assistive technology. Place it before text. */\n function Dot(props) {\n const { className, vars, ...attributes } = props;\n return (_jsx(\"span\", { \"aria-hidden\": \"true\", ...attributes, ...styles.dot({ className, style: props.style, vars }) }));\n }\n Tag.Dot = Dot;\n})(Tag || (Tag = {}));\nvar styles;\n(function (styles) {\n styles.dot = /*#__PURE__*/__zyzzProps.create({className:\"z_tds_2f_web-DlNeLz0 z_tds_2f_web-DlNeLz1 z_tds_2f_web-DlNeLz2 z_tds_2f_web-DlNeLz3 z_tds_2f_web-DlNeLz4\"});\n styles.tag = ((input={})=>{const external=input.className,style=input.style,vars=input.vars,inline=vars?{...vars,...style}:style,className=external?\"z_tds_2f_web-DlNeLz5 z_tds_2f_web-DlNeLz6 z_tds_2f_web-DlNeLz7 z_tds_2f_web-DlNeLz8 z_tds_2f_web-DlNeLz9 z_tds_2f_web-DlNeLza z_tds_2f_web-DlNeLzb z_tds_2f_web-DlNeLzc z_tds_2f_web-DlNeLzd z_tds_2f_web-DlNeLze z_tds_2f_web-DlNeLzf z_tds_2f_web-DlNeLzg z_tds_2f_web-DlNeLzh z_tds_2f_web-DlNeLzi z_tds_2f_web-DlNeLzj z_tds_2f_web-DlNeLzk z_tds_2f_web-DlNeLzl z_tds_2f_web-DlNeLzm z_tds_2f_web-DlNeLzn z_tds_2f_web-DlNeLzo z_tds_2f_web-DlNeLzp z_tds_2f_web-DlNeLzq z_tds_2f_web-DlNeLzr z_tds_2f_web-DlNeLzs z_tds_2f_web-DlNeLzt z_tds_2f_web-DlNeLzu z_tds_2f_web-DlNeLzv z_tds_2f_web-DlNeLzw z_tds_2f_web-DlNeLzx z_tds_2f_web-DlNeLzy z_tds_2f_web-DlNeLzz z_tds_2f_web-DlNeLz10 z_tds_2f_web-DlNeLz11 z_tds_2f_web-DlNeLz12 z_tds_2f_web-DlNeLz13 z_tds_2f_web-DlNeLz14 z_tds_2f_web-DlNeLz15 z_tds_2f_web-DlNeLz16 z_tds_2f_web-DlNeLz17 z_tds_2f_web-DlNeLz18 z_tds_2f_web-DlNeLz19 z_tds_2f_web-DlNeLz1a z_tds_2f_web-DlNeLz1b z_tds_2f_web-DlNeLz1c z_tds_2f_web-DlNeLz1d z_tds_2f_web-DlNeLz1e z_tds_2f_web-DlNeLz1f z_tds_2f_web-DlNeLz1g z_tds_2f_web-DlNeLz1h z_tds_2f_web-DlNeLz1i z_tds_2f_web-DlNeLz1j z_tds_2f_web-DlNeLz1k z_tds_2f_web-DlNeLz1l z_tds_2f_web-DlNeLz1m z_tds_2f_web-DlNeLz1n z_tds_2f_web-DlNeLz1o z_tds_2f_web-DlNeLz1p z_tds_2f_web-DlNeLz1q z_tds_2f_web-DlNeLz1r z_tds_2f_web-DlNeLz1s z_tds_2f_web-DlNeLz1t\"+\" \"+external:\"z_tds_2f_web-DlNeLz5 z_tds_2f_web-DlNeLz6 z_tds_2f_web-DlNeLz7 z_tds_2f_web-DlNeLz8 z_tds_2f_web-DlNeLz9 z_tds_2f_web-DlNeLza z_tds_2f_web-DlNeLzb z_tds_2f_web-DlNeLzc z_tds_2f_web-DlNeLzd z_tds_2f_web-DlNeLze z_tds_2f_web-DlNeLzf z_tds_2f_web-DlNeLzg z_tds_2f_web-DlNeLzh z_tds_2f_web-DlNeLzi z_tds_2f_web-DlNeLzj z_tds_2f_web-DlNeLzk z_tds_2f_web-DlNeLzl z_tds_2f_web-DlNeLzm z_tds_2f_web-DlNeLzn z_tds_2f_web-DlNeLzo z_tds_2f_web-DlNeLzp z_tds_2f_web-DlNeLzq z_tds_2f_web-DlNeLzr z_tds_2f_web-DlNeLzs z_tds_2f_web-DlNeLzt z_tds_2f_web-DlNeLzu z_tds_2f_web-DlNeLzv z_tds_2f_web-DlNeLzw z_tds_2f_web-DlNeLzx z_tds_2f_web-DlNeLzy z_tds_2f_web-DlNeLzz z_tds_2f_web-DlNeLz10 z_tds_2f_web-DlNeLz11 z_tds_2f_web-DlNeLz12 z_tds_2f_web-DlNeLz13 z_tds_2f_web-DlNeLz14 z_tds_2f_web-DlNeLz15 z_tds_2f_web-DlNeLz16 z_tds_2f_web-DlNeLz17 z_tds_2f_web-DlNeLz18 z_tds_2f_web-DlNeLz19 z_tds_2f_web-DlNeLz1a z_tds_2f_web-DlNeLz1b z_tds_2f_web-DlNeLz1c z_tds_2f_web-DlNeLz1d z_tds_2f_web-DlNeLz1e z_tds_2f_web-DlNeLz1f z_tds_2f_web-DlNeLz1g z_tds_2f_web-DlNeLz1h z_tds_2f_web-DlNeLz1i z_tds_2f_web-DlNeLz1j z_tds_2f_web-DlNeLz1k z_tds_2f_web-DlNeLz1l z_tds_2f_web-DlNeLz1m z_tds_2f_web-DlNeLz1n z_tds_2f_web-DlNeLz1o z_tds_2f_web-DlNeLz1p z_tds_2f_web-DlNeLz1q z_tds_2f_web-DlNeLz1r z_tds_2f_web-DlNeLz1s z_tds_2f_web-DlNeLz1t\",result=inline?{className,style:inline}:{className};let value;value=Object.hasOwn(input,\"intent\")?input[\"intent\"]:void 0;if(value===void 0)value=\"neutral\";if(value!==null&&value!==void 0)result[\"data-intent\"]=String(value);value=Object.hasOwn(input,\"shape\")?input[\"shape\"]:void 0;if(value===void 0)value=\"pill\";if(value!==null&&value!==void 0)result[\"data-shape\"]=String(value);value=Object.hasOwn(input,\"size\")?input[\"size\"]:void 0;if(value===void 0)value=\"medium\";if(value!==null&&value!==void 0)result[\"data-size\"]=String(value);value=Object.hasOwn(input,\"variant\")?input[\"variant\"]:void 0;if(value===void 0)value=\"soft\";if(value!==null&&value!==void 0)result[\"data-variant\"]=String(value);return result});\n})(styles || (styles = {}));\n//# sourceMappingURL=Tag.js.map\nimport './Tag.css';\n","export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cg%20fill='none'%3e%3ccircle%20cx='16'%20cy='16'%20r='16'%20fill='%233e73c4'/%3e%3cg%20fill='%23fff'%3e%3cpath%20d='M20.02%2018.12c0-2.12-1.28-2.85-3.84-3.15-1.83-.25-2.2-.73-2.2-1.58s.62-1.4%201.84-1.4c1.1%200%201.7.37%202%201.28a.46.46%200%200%200%20.43.3h.98a.42.42%200%200%200%20.43-.42v-.06a3.04%203.04%200%200%200-2.75-2.5V9.15c0-.24-.18-.42-.48-.48h-.92c-.24%200-.42.18-.48.48v1.4c-1.83.24-3%201.45-3%202.97%200%202%201.23%202.8%203.79%203.1%201.7.3%202.25.66%202.25%201.64%200%20.97-.85%201.63-2%201.63-1.6%200-2.14-.66-2.32-1.57-.06-.25-.25-.37-.43-.37h-1.04a.42.42%200%200%200-.42.43v.06c.24%201.51%201.22%202.6%203.23%202.91v1.46c0%20.24.18.42.48.48h.92c.24%200%20.42-.18.49-.48v-1.46c1.82-.3%203.04-1.58%203.04-3.22z'/%3e%3cpath%20d='M12.9%2024.5a9.03%209.03%200%200%201-5.43-11.66%209%209%200%200%201%205.42-5.4c.25-.12.37-.3.37-.6v-.86c0-.24-.12-.42-.37-.48-.06%200-.18%200-.24.06a10.9%2010.9%200%200%200-7.13%2013.72c1.1%203.4%203.72%206%207.13%207.1.24.12.49%200%20.55-.24.06-.06.06-.13.06-.25v-.85c0-.18-.19-.42-.37-.54m6.46-18.94c-.24-.12-.49%200-.55.24-.06.06-.06.13-.06.25v.85c0%20.24.19.48.37.6a9.03%209.03%200%200%201%205.42%2011.66%209%209%200%200%201-5.42%205.4c-.25.12-.37.3-.37.6v.86c0%20.24.12.42.37.48.06%200%20.18%200%20.24-.06a10.9%2010.9%200%200%200%207.13-13.72%2011.03%2011.03%200%200%200-7.13-7.16'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'%3e%3ccircle%20cx='256'%20cy='256'%20r='256'%20fill='%2300805e'/%3e%3cpath%20fill='%23f0f0f0'%20d='M386.895%20186.535v-58.196H125.106v58.196h101.797V244.7h58.195v-58.165zM226.934%20361.061v58.197h58.164v-58.197h58.165v-116.36h-58.165v116.36zm-.001-116.36h-58.195v116.36h58.195z'/%3e%3c/svg%3e\"","export default import.meta.ROLLDOWN_FILE_URL_aLISaAY6NSiJFT$6GdtrfA"],"ignoreList":[0,1,2],"mappings":"A,iGAmBA,SAAgBK,EAAO,EAAO,CAC1B,GAAM,CAAE,QAAO,YAAW,MAAK,UAAS,MAAK,SAAQ,OAAM,OAAM,GAAGC,GAAeC,EACnF,OAAOH,EAAU,CACb,eAAgB,MAChB,MAAO,CACH,GAAGE,EACH,GAAGN,EAAO,OAAO,CAAE,QAAO,YAAW,MAAK,UAAS,MAAOO,EAAM,MAAO,OAAM,MAAK,CAAC,CACvF,EACA,MACA,QACJ,CAAC,CACL,CACA,IAAIP,GACH,SAAU,EAAQ,CACf,EAAO,SAAW,EAAM,CAAC,IAAI,CAAC,IAAMS,EAASC,EAAM,UAAUC,EAAMD,EAAM,MAAME,EAAKF,EAAM,KAAKG,EAAOD,EAAK,CAAC,GAAGA,EAAK,GAAGD,CAAK,EAAEA,EAAMG,EAAUL,EAAS,idAAodA,EAAS,gdAAgdM,EAAOF,EAAO,CAAC,YAAU,MAAMA,CAAM,EAAE,CAAC,WAAS,EAAMG,EAAgnB,MAA1mB,GAAM,OAAO,OAAON,EAAM,OAAO,EAAEA,EAAMO,MAAS,IAAK,GAAKD,IAAQ,IAAK,KAAE,EAAM,UAAYA,GAAQ,OAAqB,EA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AM,CAAC,IAAI,CAAC,IAAMM,EAASC,EAAM,UAAUC,EAAMD,EAAM,MAAME,EAAKF,EAAM,KAAKG,EAAOD,EAAK,CAAC,GAAGA,EAAK,GAAGD,CAAK,EAAEA,EAAMG,EAAUL,EAAS,kyCAAqyCA,EAAS,iyCAAiyCM,EAAOF,EAAO,CAAC,YAAU,MAAMA,CAAM,EAAE,CAAC,WAAS,EAAMG,EAA6nB,MAAvnB,GAAM,OAAO,OAAON,EAAM,QAAQ,EAAEA,EAAMe,OAAU,IAAK,GAAKT,IAAQ,IAAK,KAAE,EAAM,WAAaA,GAAQ,OAAqB,EAAO,eAAe,OAAOA,CAAK,GAAE,EAAM,OAAO,OAAON,EAAM,OAAO,EAAEA,EAAMgB,MAAS,IAAK,GAAKV,IAAQ,IAAK,KAAE,EAAM,QAAUA,GAAQ,OAAqB,EAAO,cAAc,OAAOA,CAAK,GAAE,EAAM,OAAO,OAAON,EAAM,MAAM,EAAEA,EAAMiB,KAAQ,IAAK,GAAKX,IAAQ,IAAK,KAAE,EAAM,UAAYA,GAAQ,OAAqB,EAAO,aAAa,OAAOA,CAAK,GAAE,EAAM,OAAO,OAAON,EAAM,SAAS,EAAEA,EAAMkB,QAAW,IAAK,GAAKZ,IAAQ,IAAK,KAAE,EAAM,QAAUA,GAAQ,OAAqB,EAAO,gBAAgB,OAAOA,CAAK,GAASD,CAAM,EACx6G,EAAA,CAAG,AAAWQ,IAAS,CAAC,CAAE,ECjD1B,IAAAM,EAAe,o7CCAfC,EAAe,mYCAfC,EAAe,+B"}
@@ -1,2 +1,2 @@
1
- import{D as e,O as t,S as n,b as r,d as i,f as a,i as o,n as s,o as c,p as l,r as u,t as d,u as f,w as p}from"./removable-HVB1MGzn.js";function m(e){return{onFetch:(t,n)=>{let r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],c=t.state.data?.pageParams||[],u={pages:[],pageParams:[]},d=0,p=async()=>{let n=!1,p=e=>{f(e,()=>t.signal,()=>n=!0)},m=l(t.options,t.fetchOptions),_=async(e,r,o)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let s=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:o?`backward`:`forward`,meta:t.options.meta};return p(e),e})(),c=await m(s),{maxPages:l}=t.options,u=o?a:i;return{pages:u(e.pages,c,l),pageParams:u(e.pageParams,r,l)}};if(o&&s.length){let e=o===`backward`,t=e?g:h,n={pages:s,pageParams:c};u=await _(n,t(r,n),e)}else{let t=e??s.length;do{let e=d===0?c[0]??r.initialPageParam:h(r,u);if(d>0&&e==null)break;u=await _(u,e),d++}while(d<t)}return u};t.fetchFn=t.options.persister?()=>t.options.persister?.(p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):p}}}function h(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function g(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var _=class extends d{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=b(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=b(this.options);e.data!==void 0&&(this.setState(y(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let r=n(this.state.data,e,this.options);return this.#c({data:r,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(r).catch(r):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>p(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===e||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>p(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!t(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=l(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?m(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let c=this.#a=o({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof s&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await c.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof s){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===c&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...v(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...y(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),c.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function v(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:u(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function y(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function b(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}export{v as n,_ as t};
2
- //# sourceMappingURL=query-lzX3sTGO.js.map
1
+ import{D as e,O as t,S as n,b as r,d as i,f as a,i as o,n as s,o as c,p as l,r as u,t as d,u as f,w as p}from"./removable-BIS_RRBc.js";function m(e){return{onFetch:(t,n)=>{let r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],c=t.state.data?.pageParams||[],u={pages:[],pageParams:[]},d=0,p=async()=>{let n=!1,p=e=>{f(e,()=>t.signal,()=>n=!0)},m=l(t.options,t.fetchOptions),_=async(e,r,o)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let s=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:o?`backward`:`forward`,meta:t.options.meta};return p(e),e})(),c=await m(s),{maxPages:l}=t.options,u=o?a:i;return{pages:u(e.pages,c,l),pageParams:u(e.pageParams,r,l)}};if(o&&s.length){let e=o===`backward`,t=e?g:h,n={pages:s,pageParams:c};u=await _(n,t(r,n),e)}else{let t=e??s.length;do{let e=d===0?c[0]??r.initialPageParam:h(r,u);if(d>0&&e==null)break;u=await _(u,e),d++}while(d<t)}return u};t.fetchFn=t.options.persister?()=>t.options.persister?.(p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):p}}}function h(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function g(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var _=class extends d{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=b(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=b(this.options);e.data!==void 0&&(this.setState(y(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let r=n(this.state.data,e,this.options);return this.#c({data:r,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(r).catch(r):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>p(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===e||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>p(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!t(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=l(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?m(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let c=this.#a=o({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof s&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await c.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof s){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===c&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...v(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...y(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),c.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function v(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:u(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function y(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function b(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}export{v as n,_ as t};
2
+ //# sourceMappingURL=query-BfAOtP6H.js.map