@antseed/gateway-console 0.1.4 → 0.1.6

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 (188) hide show
  1. package/dist/assets/Activity-CoD1LZfl.js +1 -0
  2. package/dist/assets/Audit-CNmmoaeN.js +1 -0
  3. package/dist/assets/ChainGate-CeDu6YYJ.js +1 -0
  4. package/dist/assets/ChannelClose-C_SM1g28.js +1 -0
  5. package/dist/assets/{Charts-DAh9h4sf.js → Charts-Dm9j6cVy.js} +1 -1
  6. package/dist/assets/{Chat-DznobJkE.js → Chat-D1yVH5Y-.js} +4 -4
  7. package/dist/assets/{ConnectWallet-DSqRjyNA.js → ConnectWallet-phY-Bf7w.js} +1 -1
  8. package/dist/assets/DataTable-D65CSQpj.js +1 -0
  9. package/dist/assets/{Disclosure-UjXa2WU7.js → Disclosure-DrGE-NkF.js} +1 -1
  10. package/dist/assets/{KeyHolder-e5NvqLQn.js → KeyHolder-CmffMcZD.js} +1 -1
  11. package/dist/assets/{Keys-CxaYteT3.js → Keys-BovEuhch.js} +1 -1
  12. package/dist/assets/Logs-B-T-V-pM.js +1 -0
  13. package/dist/assets/Members-tWNaQdIJ.js +1 -0
  14. package/dist/assets/{Migrate-I3FULNOQ.js → Migrate-IZJLx1xU.js} +1 -1
  15. package/dist/assets/Models-gJrRx-QV.js +1 -0
  16. package/dist/assets/OperatorActions-DfjEKPUD.js +1 -0
  17. package/dist/assets/{OperatorGateAlert-CCPFpK6Y.js → OperatorGateAlert-Bq1ilVp6.js} +1 -1
  18. package/dist/assets/{Overview-zEyUG_qA.js → Overview-CAxieiTF.js} +1 -1
  19. package/dist/assets/PeerPicker-JK4q0ZO9.js +1 -0
  20. package/dist/assets/PolicyEditor-BLo1sheV.js +1 -0
  21. package/dist/assets/PolicyField-CNEZju4W.js +1 -0
  22. package/dist/assets/Presets-DBRoMTo4.js +4 -0
  23. package/dist/assets/Providers-B3qO68z-.js +1 -0
  24. package/dist/assets/RequestLog-vl46fVIZ.js +1 -0
  25. package/dist/assets/Rewards-CRiw-wXO.js +2 -0
  26. package/dist/assets/RewardsClaim-D6P8go-K.js +1 -0
  27. package/dist/assets/Routing-YpzgjNx_.js +1 -0
  28. package/dist/assets/{Segmented-Qx6JB6EU.js → Segmented-YOSVapPh.js} +1 -1
  29. package/dist/assets/SelectField-Cog9tKMb.js +1 -0
  30. package/dist/assets/{Settings-CvfS7lxA.js → Settings-CSXJvDLz.js} +2 -2
  31. package/dist/assets/{Switch-Ba56zux7.js → Switch-CGhLd0Ay.js} +1 -1
  32. package/dist/assets/{Tabs-BmjCmD5T.js → Tabs-DuL015VX.js} +1 -1
  33. package/dist/assets/TextAreaField-Cxpnr6YH.js +1 -0
  34. package/dist/assets/{UsageByModel-BBqXiIqo.js → UsageByModel-5QuGhD1d.js} +1 -1
  35. package/dist/assets/Wallet-BOMYI48H.js +9 -0
  36. package/dist/assets/WalletConfirm-Dc0AMNYH.js +1 -0
  37. package/dist/assets/WalletFunding-CsUmR_iR.js +1 -0
  38. package/dist/assets/WalletSignIn-_VjhsjCt.js +1 -0
  39. package/dist/assets/Workspaces-Da-rLWlz.js +1 -0
  40. package/dist/assets/{add-1gRRQJKT.js → add-Btpjkoo6.js} +2 -2
  41. package/dist/assets/all-wallets-BfrjmkEM.js +6 -0
  42. package/dist/assets/{app-store-DFWwIQzp.js → app-store-CjAKxMNO.js} +2 -2
  43. package/dist/assets/{apple-DgwSchgH.js → apple-BcO7LcJZ.js} +2 -2
  44. package/dist/assets/arrow-bottom-DYhsTHhV.js +8 -0
  45. package/dist/assets/{arrow-bottom-circle-PbZ344lB.js → arrow-bottom-circle-DH3-k8Pr.js} +2 -2
  46. package/dist/assets/arrow-left-i-RgLGSY.js +8 -0
  47. package/dist/assets/arrow-right-Byrj5OIH.js +8 -0
  48. package/dist/assets/arrow-top-BvEWR8S0.js +8 -0
  49. package/dist/assets/{bank-wStsFuNb.js → bank-CqGqrPxl.js} +2 -2
  50. package/dist/assets/{basic-CsVGrHuh.js → basic-DWDkRcdy.js} +1 -1
  51. package/dist/assets/{browser-DlwffXFC.js → browser-CQNym1bY.js} +2 -2
  52. package/dist/assets/{bundle-full-sn1k_IQV.js → bundle-full-C55tgBr2.js} +1 -1
  53. package/dist/assets/{card-pVIbVhmB.js → card-D2zVsWGG.js} +2 -2
  54. package/dist/assets/ccip-2-SkbDQO.js +1 -0
  55. package/dist/assets/{checkmark-BpTw56ma.js → checkmark-FRmQx2A8.js} +2 -2
  56. package/dist/assets/{checkmark-bold-kTaP3XxB.js → checkmark-bold-BQmDzpHv.js} +2 -2
  57. package/dist/assets/chevron-bottom-iNshLmUE.js +8 -0
  58. package/dist/assets/chevron-left-DZ-hTSFy.js +8 -0
  59. package/dist/assets/chevron-right-ftn9B4r7.js +8 -0
  60. package/dist/assets/chevron-top-nKnnD3BB.js +8 -0
  61. package/dist/assets/{chrome-store-PaJUtH_w.js → chrome-store-Jvo-YJCr.js} +2 -2
  62. package/dist/assets/{clock-CMJ0qXc5.js → clock-J68M1oCn.js} +2 -2
  63. package/dist/assets/close-Bb5jO3su.js +8 -0
  64. package/dist/assets/{code-block-xCUZ4Wg2.js → code-block-6bmX2qDf.js} +2 -2
  65. package/dist/assets/coinPlaceholder-BzR2PaE2.js +8 -0
  66. package/dist/assets/{compass-CGS5aeKg.js → compass-_xiCm8H2.js} +2 -2
  67. package/dist/assets/{copy-BES3eNqf.js → copy-Cn8HQUQ0.js} +2 -2
  68. package/dist/assets/{core-Cw7VIz-a.js → core-z96MxYDt.js} +3 -3
  69. package/dist/assets/cursor-AmgDWaYf.js +3 -0
  70. package/dist/assets/{cursor-transparent-Dqx5HyjH.js → cursor-transparent-BtLB_SMp.js} +2 -2
  71. package/dist/assets/{desktop-83z42M8J.js → desktop-BbxKfMA_.js} +2 -2
  72. package/dist/assets/{disconnect-D49VmdOl.js → disconnect-BLztvIUd.js} +2 -2
  73. package/dist/assets/{discord-MHKJZWwF.js → discord-CHUWozPc.js} +2 -2
  74. package/dist/assets/{en_US-Y4ZOVFV4-CzjJ6dvA.js → en_US-Y4ZOVFV4-CAcvlKBB.js} +10 -10
  75. package/dist/assets/{etherscan-_rlcuy0M.js → etherscan-D5vLd5La.js} +2 -2
  76. package/dist/assets/{exclamation-triangle-Bw5MhRmd.js → exclamation-triangle-qrQeSTv8.js} +2 -2
  77. package/dist/assets/{extension-D7frsaxu.js → extension-4gVUPN7H.js} +2 -2
  78. package/dist/assets/external-link-B14WJWrF.js +8 -0
  79. package/dist/assets/{facebook-D2S1lToP.js → facebook-CIMBt82S.js} +1 -1
  80. package/dist/assets/{farcaster-BKD1k1GK.js → farcaster-c2htRu7g.js} +1 -1
  81. package/dist/assets/filters-Bv71E2AR.js +8 -0
  82. package/dist/assets/{github-CanBnK1J.js → github-UYR2U4eW.js} +2 -2
  83. package/dist/assets/{google-DcyjnYXY.js → google-n2NyY3Dw.js} +2 -2
  84. package/dist/assets/{help-circle-EWFFZOKF.js → help-circle-BLFRE_d4.js} +2 -2
  85. package/dist/assets/highlighted-body-KQOG7T2V-BPvcfizq.js +1 -0
  86. package/dist/assets/{id-CwpQkL3B.js → id-Bx-RYygz.js} +2 -2
  87. package/dist/assets/{image-Bru4L9C0.js → image-BOkMzreg.js} +2 -2
  88. package/dist/assets/index-BG30WuBG.js +91 -0
  89. package/dist/assets/index-D8vXwUTI.css +1 -0
  90. package/dist/assets/{index-DI3oIpGN.js → index-DUGIknuZ.js} +2 -2
  91. package/dist/assets/{index-BTqmifYb.js → index-DzFVk9QK.js} +1 -1
  92. package/dist/assets/{index-CO2ldxDL.js → index-FSpcDkTF.js} +3 -3
  93. package/dist/assets/index-RORHmLec.js +1 -0
  94. package/dist/assets/{index.es-Dajqanx_.js → index.es-CA2ape1X.js} +4 -4
  95. package/dist/assets/{info-BiKqTS2d.js → info-Cn0tJEtZ.js} +2 -2
  96. package/dist/assets/info-circle-Bu4Zfbo-.js +12 -0
  97. package/dist/assets/{lightbulb-DOHEz8mA.js → lightbulb-CEuGFxl3.js} +2 -2
  98. package/dist/assets/{limits-DETkh9Vy.js → limits-Cv54gck6.js} +1 -1
  99. package/dist/assets/{mail-B58fLIk0.js → mail-DTJ1wl6n.js} +1 -1
  100. package/dist/assets/{mermaid-MCJ5UELQ-CNEVzFUk.js → mermaid-MCJ5UELQ-BedJEojm.js} +6 -6
  101. package/dist/assets/{metamask-sdk-CgV17tbH.js → metamask-sdk-CQV3kKmz.js} +1 -1
  102. package/dist/assets/{mobile-Der0Vnyo.js → mobile-D5XkpStI.js} +2 -2
  103. package/dist/assets/{models-Ben8ko6c.js → models-DMYWCgsM.js} +1 -1
  104. package/dist/assets/more-DdrXAXX1.js +11 -0
  105. package/dist/assets/{network-placeholder-DgO-AHV1.js → network-placeholder-DYxULQKf.js} +2 -2
  106. package/dist/assets/{nftPlaceholder-DQN5ewFX.js → nftPlaceholder-DNCBtU2V.js} +2 -2
  107. package/dist/assets/off-x6tIm6IU.js +8 -0
  108. package/dist/assets/{play-store-DGLOVnal.js → play-store-DH_0xG8x.js} +1 -1
  109. package/dist/assets/{plus-BiSIXTnl.js → plus-D6bTrOQ5.js} +2 -2
  110. package/dist/assets/{qr-code-CqHp65c8.js → qr-code-nZ-ywovk.js} +1 -1
  111. package/dist/assets/{recycle-horizontal-CRSsOzCz.js → recycle-horizontal-Dfef9bS8.js} +2 -2
  112. package/dist/assets/refresh-DjaTupr6.js +8 -0
  113. package/dist/assets/{reown-logo-DHp9kF6o.js → reown-logo-8xfPxyEW.js} +1 -1
  114. package/dist/assets/search-CTyg9yLr.js +8 -0
  115. package/dist/assets/{secp256k1-eRLZxtys.js → secp256k1-C3GZOk0r.js} +1 -1
  116. package/dist/assets/{send-Ctv_HF2O.js → send-BRCwXyYl.js} +1 -1
  117. package/dist/assets/{swapHorizontal-zaD-84iv.js → swapHorizontal-DQysA-xv.js} +2 -2
  118. package/dist/assets/{swapHorizontalBold-f_5MNh3F.js → swapHorizontalBold-CfvpnhxX.js} +2 -2
  119. package/dist/assets/{swapHorizontalMedium-CnARNDiR.js → swapHorizontalMedium-Ei15IdQU.js} +1 -1
  120. package/dist/assets/{swapHorizontalRoundedBold-BxdOAjIc.js → swapHorizontalRoundedBold-BrdyV7V9.js} +2 -2
  121. package/dist/assets/{swapVertical-BS-jDYcd.js → swapVertical-Chu7IZEN.js} +2 -2
  122. package/dist/assets/{telegram-DfO33sxQ.js → telegram-WX2YRbPh.js} +2 -2
  123. package/dist/assets/{three-dots-K3AmCfOo.js → three-dots-DxlCOrsx.js} +2 -2
  124. package/dist/assets/{twitch-DfjpmeLa.js → twitch-DnDwl6Wp.js} +2 -2
  125. package/dist/assets/{twitterIcon-CXaUDkHK.js → twitterIcon-BRzgYnIv.js} +2 -2
  126. package/dist/assets/{usage-CjxizGfE.js → usage-CSmvbieU.js} +1 -1
  127. package/dist/assets/{useInfiniteQuery-Dm7RR6wI.js → useInfiniteQuery-Dd787Fyg.js} +1 -1
  128. package/dist/assets/{useTx-BRRWrJlB.js → useTx-BMOzJPjG.js} +1 -1
  129. package/dist/assets/{verify-CplHry9Z.js → verify-BDEQw6N7.js} +2 -2
  130. package/dist/assets/{verify-filled-CLSOHfSX.js → verify-filled-4pi90YF-.js} +2 -2
  131. package/dist/assets/{w3m-modal-CQNWLiT9.js → w3m-modal-0lsUnIxD.js} +1 -1
  132. package/dist/assets/{wallet-C3roxttu.js → wallet-Cdj3wKM9.js} +2 -2
  133. package/dist/assets/{wallet-placeholder-CC9q2-xU.js → wallet-placeholder-9WrqEYA6.js} +2 -2
  134. package/dist/assets/{walletconnect-Bnkz4udx.js → walletconnect-Dxw2wfHl.js} +3 -3
  135. package/dist/assets/warning-circle-BS-8TEUR.js +12 -0
  136. package/dist/assets/{x-5eg1spDB.js → x-BuEdoHYI.js} +2 -2
  137. package/dist/index.html +2 -2
  138. package/package.json +3 -3
  139. package/dist/assets/Activity-BsmDMcni.js +0 -1
  140. package/dist/assets/Audit-TIDz29y6.js +0 -1
  141. package/dist/assets/ChainGate-Dvm-SUef.js +0 -1
  142. package/dist/assets/ChannelClose-9Lq8KHLH.js +0 -1
  143. package/dist/assets/DataTable-CDFSD9Kq.js +0 -1
  144. package/dist/assets/Logs-CNCQTTeZ.js +0 -1
  145. package/dist/assets/Members-Bme-PLUh.js +0 -1
  146. package/dist/assets/Models-Bt59XWgD.js +0 -1
  147. package/dist/assets/OperatorActions-DTrUYN6Z.js +0 -1
  148. package/dist/assets/PolicyEditor-BdoaX9gK.js +0 -1
  149. package/dist/assets/PolicyField-DIPl0B1x.js +0 -1
  150. package/dist/assets/Presets-CoTmwoy_.js +0 -4
  151. package/dist/assets/Providers-BxpNjH9s.js +0 -1
  152. package/dist/assets/RequestLog-DhID_VN7.js +0 -1
  153. package/dist/assets/Rewards-XyWhpm9Z.js +0 -2
  154. package/dist/assets/RewardsClaim-BSNDTCMG.js +0 -1
  155. package/dist/assets/Routing-Du8GLQCH.js +0 -1
  156. package/dist/assets/SelectField-D8fxDUNO.js +0 -1
  157. package/dist/assets/TextAreaField-CF9_zjuC.js +0 -1
  158. package/dist/assets/Wallet-DggtuX-0.js +0 -9
  159. package/dist/assets/WalletConfirm-BQCbOnNv.js +0 -1
  160. package/dist/assets/WalletFunding-CvDkcGVU.js +0 -1
  161. package/dist/assets/WalletSignIn-B9g_MY0h.js +0 -1
  162. package/dist/assets/Workspaces-DUn5iA_D.js +0 -1
  163. package/dist/assets/all-wallets-vhiMb1eR.js +0 -6
  164. package/dist/assets/arrow-bottom-Cq4YmOQg.js +0 -8
  165. package/dist/assets/arrow-left-BLB_Dkvm.js +0 -8
  166. package/dist/assets/arrow-right-DpKTBsRx.js +0 -8
  167. package/dist/assets/arrow-top-DSAScZJW.js +0 -8
  168. package/dist/assets/ccip-DAldItLP.js +0 -1
  169. package/dist/assets/chevron-bottom-bMFNlOX_.js +0 -8
  170. package/dist/assets/chevron-left-BvUO5nig.js +0 -8
  171. package/dist/assets/chevron-right-CsjPzxKK.js +0 -8
  172. package/dist/assets/chevron-top-k0xp7Can.js +0 -8
  173. package/dist/assets/close-D_Xc77Yh.js +0 -8
  174. package/dist/assets/coinPlaceholder-D-kUAKbs.js +0 -8
  175. package/dist/assets/cursor-BG-gmA3f.js +0 -3
  176. package/dist/assets/external-link-C7l3-PhY.js +0 -8
  177. package/dist/assets/filters-LINb1X7z.js +0 -8
  178. package/dist/assets/highlighted-body-KQOG7T2V-4q_hgdCF.js +0 -1
  179. package/dist/assets/index-D5ERwHFX.js +0 -1
  180. package/dist/assets/index-DqdaAEyo.js +0 -91
  181. package/dist/assets/index-M34IaZVB.css +0 -1
  182. package/dist/assets/index-mLThkLKM.js +0 -1
  183. package/dist/assets/info-circle-BBN-kA77.js +0 -12
  184. package/dist/assets/more-BoKgpjap.js +0 -11
  185. package/dist/assets/off-M-ZEZL9r.js +0 -8
  186. package/dist/assets/refresh-CNcLCWXe.js +0 -8
  187. package/dist/assets/search-Bk2sMNiB.js +0 -8
  188. package/dist/assets/warning-circle-Be9gSeqg.js +0 -12
@@ -1,7 +1,7 @@
1
- import{D as re,F as ne,b2 as ge,b9 as xe,r as d,bf as ae,q as U,e as E,bt as ve,bc as be,b5 as K,f as fe,j as t,ac as D,bo as ye,T as O,B as y,n as $,C as ie,d as Se,P as je,Q as z,ad as we,k as A,V as le,M as ke,t as M,u as Pe,R as Re,s as Q,aG as Ne,a9 as W,aP as Ce,a8 as Me,E as Ie,I as G,A as Y,aF as Ue,Y as qe}from"./index-DqdaAEyo.js";import{a as J,S as Z}from"./PolicyEditor-BdoaX9gK.js";import{S as Te}from"./Segmented-Qx6JB6EU.js";import{S as I}from"./Switch-Ba56zux7.js";import{D as F}from"./Disclosure-UjXa2WU7.js";import{T as oe}from"./TextAreaField-CF9_zjuC.js";import{T as Oe,a as Ee}from"./Tabs-BmjCmD5T.js";import{D as Ae}from"./DataTable-CDFSD9Kq.js";import{S as B}from"./SelectField-D8fxDUNO.js";import"./roving-DkptacxO.js";import"./index-D5ERwHFX.js";function Fe(e){return Object.entries(e).map(([s,r])=>`${s}: ${r}`).join(`
1
+ import{F as re,G as ne,b as ge,br as xe,r as d,bw as ae,q as U,f as E,af as ve,a5 as be,ak as K,g as fe,j as t,ag as D,a9 as ye,T as O,B as y,o as $,D as ie,e as Se,P as je,Q as z,aA as we,l as A,W as le,M as ke,v as M,u as Pe,U as Re,t as Q,b0 as Ne,at as W,b9 as Ce,as as Me,E as Ie,I as G,C as J,a$ as Ue,Z as qe}from"./index-BG30WuBG.js";import{P as Y}from"./PeerPicker-JK4q0ZO9.js";import{S as Z}from"./PolicyEditor-BLo1sheV.js";import{S as Te}from"./Segmented-YOSVapPh.js";import{S as I}from"./Switch-CGhLd0Ay.js";import{D as F}from"./Disclosure-DrGE-NkF.js";import{T as oe}from"./TextAreaField-Cxpnr6YH.js";import{T as Oe,a as Ee}from"./Tabs-DuL015VX.js";import{D as Ae}from"./DataTable-D65CSQpj.js";import{S as B}from"./SelectField-Cog9tKMb.js";import"./roving-DkptacxO.js";function Fe(e){return Object.entries(e).map(([s,r])=>`${s}: ${r}`).join(`
2
2
  `)}function De(e){const s={};for(const[r,n]of e.split(`
3
3
  `).entries()){if(!n.trim())continue;const c=n.indexOf(":");if(c<=0)throw new Error(`Line ${r+1}: use "Name: value".`);const u=n.slice(0,c).trim();if(!/^[A-Za-z0-9!#$%&'*+.^_`|~-]+$/.test(u))throw new Error(`Line ${r+1}: "${u}" is not a valid header name.`);s[u]=n.slice(c+1).trim()}return s}const ce="••••";function $e(e){return e.split(`
4
4
  `).map(s=>{const r=s.indexOf(":");return r>0&&s.slice(r+1).trim()===ce?s.slice(0,r).trim():null}).filter(s=>!!s)}function X(e){return e.split(`
5
5
  `).map(s=>{const r=s.indexOf(":");return r>0&&s.slice(r+1).trim()===ce?`${s.slice(0,r)}: `:s}).join(`
6
6
  `)}function _e(e,s){if(!e||!s)return!1;try{return new URL(e).origin!==new URL(s).origin}catch{return e!==s}}function Le(e){const s={},r=(n,c,u)=>{const a=e[n].trim();if(a===""){c&&(s[n]="Required.");return}const h=Number(a);!Number.isFinite(h)||h<0?s[n]="Use a number of 0 or more.":u!==void 0&&h>u&&(s[n]=`At most ${u}.`)};return r("input",!0),r("output",!0),r("cached",!1),r("reputation",!0,100),s}function w(e,s={}){const r=e.trim();if(r==="")return s.required?"Required.":void 0;const n=Number(r),c=s.min??0;if(!Number.isFinite(n))return"Use a number.";if(s.integer&&!Number.isInteger(n))return"Use a whole number.";if(n<c)return`Use ${c} or more.`;if(s.max!==void 0&&n>s.max)return`At most ${s.max}.`}function V(e){return e.split(/[\n,]/).map(s=>s.trim()).filter(Boolean)}function ee(e){const s=e.find(r=>!/^(?:0x)?[0-9a-f]{40}$/i.test(r));return s?`"${s}" is not a 40-character hex seller id.`:void 0}function te(e){const s=e.find(r=>!/^https?:\/\/\S+$/.test(r));return s?`"${s}" is not an http(s) URL.`:void 0}function ue(e,s){return e.some(r=>r===s||s.startsWith(`${r}.`)||r.startsWith(`${s}.`))}function Be(){return t.jsxs("span",{className:"gc-override",children:[t.jsx("span",{className:"gc-attention","aria-hidden":"true"}),"Overridden by the buyer's environment or start flags"]})}function se(e){const s=e.routingPreferences,r=n=>n===null?"":String(n);return{allowMode:s.allowedPeerIds.length>0?"only":"any",allowedPeerIds:[...s.allowedPeerIds],blockedPeerIds:[...s.blockedPeerIds],minTrustScore:String(s.minTrustScore),minReputation:String(e.minPeerReputation),preferFree:s.preferFreePeers,softInputCap:String(s.maxInputUsdPerMillion),maxInput:String(e.maxPricing.inputUsdPerMillion),maxOutput:String(e.maxPricing.outputUsdPerMillion),maxCached:r(e.maxPricing.cachedInputUsdPerMillion),verify:e.verifier.enabled,requireVerified:e.verifier.require,verifiers:e.verifier.prefer.join(", "),sampleRate:r(e.evidence.sampleRate),maxSampleBytes:r(e.evidence.maxSampleBytes),autoSweep:e.payments.autoSweep,maxPerRequest:String(e.payments.maxPerRequestUsdc),maxReserve:String(e.payments.maxReserveUsdc),rpcUrl:e.payments.rpcUrl??"",fallbackRpcUrls:e.payments.fallbackRpcUrls.join(`
7
- `),peerRefreshMs:String(e.network.peerRefreshIntervalMs),metadataTimeoutMs:String(e.network.metadataFetchTimeoutMs),requestTimeoutMs:String(e.network.requestTimeoutMs),maxStreamMs:String(e.network.maxStreamDurationMs),perServiceMetadata:!e.network.disableMetadataV2Services}}function Ve(e){const s=Le({input:e.maxInput,output:e.maxOutput,cached:e.maxCached,reputation:e.minReputation}),r={maxInput:s.input,maxOutput:s.output,maxCached:s.cached,softInputCap:w(e.softInputCap,{required:!0}),allowedPeerIds:e.allowMode==="only"?ee(e.allowedPeerIds):void 0,blockedPeerIds:ee(e.blockedPeerIds),sampleRate:w(e.sampleRate,{max:1}),maxSampleBytes:w(e.maxSampleBytes,{min:1,integer:!0}),maxPerRequest:w(e.maxPerRequest,{required:!0,min:1e-6}),maxReserve:w(e.maxReserve,{required:!0,min:1e-6}),rpcUrl:e.rpcUrl.trim()?te([e.rpcUrl.trim()]):void 0,fallbackRpcUrls:te(V(e.fallbackRpcUrls)),peerRefreshMs:w(e.peerRefreshMs,{required:!0,min:1e3,integer:!0}),metadataTimeoutMs:w(e.metadataTimeoutMs,{required:!0,min:100,integer:!0}),requestTimeoutMs:w(e.requestTimeoutMs,{required:!0,min:1,integer:!0}),maxStreamMs:w(e.maxStreamMs,{required:!0,min:1,integer:!0})};return Object.fromEntries(Object.entries(r).filter(([,n])=>n))}function ze(e){const s=r=>r.trim()?Number(r):null;return{routingPreferences:{minTrustScore:Number(e.minTrustScore),maxInputUsdPerMillion:Number(e.softInputCap),preferFreePeers:e.preferFree,allowedPeerIds:e.allowMode==="only"?e.allowedPeerIds:[],blockedPeerIds:e.blockedPeerIds},maxPricing:{inputUsdPerMillion:Number(e.maxInput),outputUsdPerMillion:Number(e.maxOutput),cachedInputUsdPerMillion:s(e.maxCached)},minPeerReputation:Number(e.minReputation),verifier:{enabled:e.verify,require:e.verify&&e.requireVerified,prefer:e.verify?V(e.verifiers):[]},evidence:{sampleRate:s(e.sampleRate),maxSampleBytes:s(e.maxSampleBytes)},payments:{autoSweep:e.autoSweep,maxPerRequestUsdc:Number(e.maxPerRequest),maxReserveUsdc:Number(e.maxReserve),rpcUrl:e.rpcUrl.trim()||null,fallbackRpcUrls:V(e.fallbackRpcUrls)},network:{peerRefreshIntervalMs:Number(e.peerRefreshMs),metadataFetchTimeoutMs:Number(e.metadataTimeoutMs),requestTimeoutMs:Number(e.requestTimeoutMs),maxStreamDurationMs:Number(e.maxStreamMs),disableMetadataV2Services:!e.perServiceMetadata}}}const He=["allowMode","allowedPeerIds","blockedPeerIds","minTrustScore","preferFree","softInputCap"];function L(e,s){return Object.keys(s).filter(r=>JSON.stringify(e[r])!==JSON.stringify(s[r]))}function Ke(e){const s=r=>r.trim()&&Number.isFinite(Number(r))?Number(r):void 0;return{...e.allowMode==="only"&&e.allowedPeerIds.length>0?{allowedPeerIds:e.allowedPeerIds}:{},...e.blockedPeerIds.length>0?{blockedPeerIds:e.blockedPeerIds}:{},...s(e.minTrustScore)?{minTrustScore:s(e.minTrustScore)}:{},...s(e.minReputation)?{minReputation:s(e.minReputation)}:{},...s(e.maxInput)!==void 0?{maxInputUsdPerMillion:s(e.maxInput)}:{},...s(e.maxOutput)!==void 0?{maxOutputUsdPerMillion:s(e.maxOutput)}:{},...s(e.maxCached)!==void 0?{maxCachedInputUsdPerMillion:s(e.maxCached)}:{}}}function Qe({buyer:e}){const s=re(),r=ne(),n=ge(),c=xe(),u=d.useMemo(()=>se(e),[e]),[a,h]=d.useState(u),[k,P]=d.useState(u),[v,S]=d.useState(null),[b,p]=d.useState(!1),[j,g]=d.useState(!1),l=(i,R)=>h(N=>({...N,[i]:R})),m=i=>{h(i),P(i),S(null)},o=Ve(a),q=L(k,a);d.useEffect(()=>{L(k,u).length!==0&&(q.length===0||L(u,a).length===0?m(u):S(u))},[u]);const _=q.some(i=>!He.includes(i)),C=i=>ue(e.overrides,i)?t.jsx(Be,{}):void 0,H=(i,R)=>C(i)??R,f=ae({mutationFn:()=>E.settings.updateBuyer(ze(a)),onSuccess:i=>{const{restartRequired:R,...N}=i;s.setQueryData(U.settings,N),m(se(N.buyer)),s.invalidateQueries({queryKey:U.buyerLimits}),p(!1),g(R===!0),r(_?R?"Saved. Restart the buyer to apply them.":"Saved. The buyer is restarting.":"Saved. The buyer applies these at once.")}}),T=d.useMemo(()=>!n.data||n.data.length===0?null:{matched:ve(be(Ke(a)),n.data,c.data??[]).length,total:n.data.length},[a,n.data,c.data]),de=`${K(Number(a.maxInput))} in · ${K(Number(a.maxOutput))} out`,me=a.verify?a.requireVerified?"Required":"On":"Off",pe=`${a.autoSweep?"Auto-sweep on":"Auto-sweep off"} · ${fe(Number(a.maxPerRequest))} per request`,x=(i,R,N={})=>t.jsx(O,{size:"sm",className:N.className??"gc-num",label:R,inputMode:"decimal",placeholder:N.placeholder,value:a[i],error:o[i],hint:N.hint,onChange:he=>l(i,he.target.value)});return t.jsxs("div",{className:"gc-stack",children:[t.jsxs("div",{className:"gc-policy",children:[T&&(T.matched===0?t.jsxs(D,{tone:"warning",title:"No seller matches these settings",children:["None of the ",T.total," sellers this gateway sees passes them, so every request will fail."]}):t.jsxs("p",{className:"gc-muted","aria-live":"polite",children:["Matches ",T.matched," of ",T.total," sellers. Every key can only narrow this."]})),t.jsxs("div",{className:"gc-policy__cols",children:[t.jsxs("section",{className:"gc-policy__section",children:[t.jsx("h3",{children:"Sellers"}),t.jsx(Te,{label:"Which sellers may serve",value:a.allowMode,onChange:i=>l("allowMode",i),options:[{value:"any",label:"Any seller"},{value:"only",label:"Only these"}]}),a.allowMode==="only"&&t.jsxs(t.Fragment,{children:[t.jsx(J,{label:"Allowed sellers",value:a.allowedPeerIds,onChange:i=>l("allowedPeerIds",i),peers:n.data}),o.allowedPeerIds&&t.jsx("p",{className:"gc-warn",children:o.allowedPeerIds}),a.allowedPeerIds.length===0&&t.jsx("p",{className:"gc-fineprint",children:"With no sellers listed, any seller may serve."})]}),t.jsx(J,{label:"Blocked sellers",value:a.blockedPeerIds,onChange:i=>l("blockedPeerIds",i),peers:n.data}),o.blockedPeerIds&&t.jsx("p",{className:"gc-warn",children:o.blockedPeerIds}),t.jsx("p",{className:"gc-fineprint",children:"Blocked here means blocked for every key."})]}),t.jsxs("section",{className:"gc-policy__section",children:[t.jsx("h3",{children:"Quality and ranking"}),t.jsx(Z,{label:"Minimum trust score",clearable:!1,value:a.minTrustScore,onChange:i=>l("minTrustScore",i),hint:"Keys can raise it, not lower it."}),(ye(n.data)||a.minReputation!=="0")&&t.jsx(Z,{label:"Minimum reputation",clearable:!1,value:a.minReputation,onChange:i=>l("minReputation",i),hint:H("minPeerReputation","Applies to pinned sellers too.")}),t.jsx("div",{className:"gc-policy__switches",children:t.jsx(I,{checked:a.preferFree,onChange:i=>l("preferFree",i),label:"Free sellers first"})}),x("softInputCap","Soft input price limit $/M",{hint:"Pricier sellers rank lower; none is excluded.",className:"gc-num gc-num--wide"})]})]}),t.jsxs("div",{className:"gc-policy__advanced",children:[t.jsxs(F,{title:"Price caps",summary:de,children:[t.jsx("p",{className:"gc-fineprint",children:"Hard limits for every request, pinned sellers included."}),t.jsxs("div",{className:"gc-policy__caps",children:[x("maxInput","Input $/M",{hint:C("maxPricing.inputUsdPerMillion")}),x("maxOutput","Output $/M",{hint:C("maxPricing.outputUsdPerMillion")}),x("maxCached","Cached input $/M",{placeholder:"Same as input"})]})]}),t.jsxs(F,{title:"Verification",summary:me,children:[C("verifier"),t.jsxs("div",{className:"gc-policy__switches",children:[t.jsx(I,{checked:a.verify,onChange:i=>l("verify",i),label:"Verify sellers"}),t.jsx(I,{checked:a.verify&&a.requireVerified,disabled:!a.verify,onChange:i=>l("requireVerified",i),label:"Require verification"})]}),t.jsx(O,{size:"sm",label:"Verifiers",value:a.verifiers,disabled:!a.verify,placeholder:"Seller's trusted default",hint:"Ordered, comma-separated verifier ids, e.g. TEE attestation.",onChange:i=>l("verifiers",i.target.value)}),t.jsxs("div",{className:"gc-policy__caps",children:[x("sampleRate","Evidence sample rate",{placeholder:"Default",hint:"Share of responses kept, 0 to 1."}),x("maxSampleBytes","Largest sample (bytes)",{placeholder:"Default",className:"gc-num gc-num--wide"})]})]}),t.jsxs(F,{title:"Payments",summary:pe,children:[t.jsx(I,{checked:a.autoSweep,onChange:i=>l("autoSweep",i),label:"Sweep deposits automatically",description:"Move USDC that arrives in the workspace wallets into their deposits."}),t.jsxs("div",{className:"gc-policy__caps",children:[x("maxPerRequest","Max per request (USDC)",{className:"gc-num gc-num--wide"}),x("maxReserve","Max channel reserve (USDC)",{className:"gc-num gc-num--wide"})]}),t.jsx(O,{size:"sm",label:"Base RPC URL",value:a.rpcUrl,error:o.rpcUrl,placeholder:"Chain default",hint:H("payments.rpcUrl","Your own endpoint avoids public rate limits. Saved URLs show without their path; leave them as they are to keep them."),onChange:i=>l("rpcUrl",i.target.value)}),t.jsx(oe,{label:"Fallback RPC URLs",rows:2,mono:!0,value:a.fallbackRpcUrls,error:o.fallbackRpcUrls,hint:"One per line, tried in order.",onChange:i=>l("fallbackRpcUrls",i.target.value)})]}),t.jsxs(F,{title:"Network and timeouts",summary:`Refresh ${Math.round(Number(a.peerRefreshMs)/1e3)} s`,children:[t.jsxs("div",{className:"gc-policy__caps",children:[x("peerRefreshMs","Peer refresh (ms)",{className:"gc-num gc-num--wide"}),x("metadataTimeoutMs","Metadata timeout (ms)",{className:"gc-num gc-num--wide",hint:C("network.metadataFetchTimeoutMs")}),x("requestTimeoutMs","Response start timeout (ms)",{className:"gc-num gc-num--wide"}),x("maxStreamMs","Longest stream (ms)",{className:"gc-num gc-num--wide",hint:C("network.maxStreamDurationMs")})]}),t.jsx(I,{checked:a.perServiceMetadata,onChange:i=>l("perServiceMetadata",i),label:"Per-service attribution in signed metadata",description:C("network.disableMetadataV2Services")??"Tells sellers which service each request used."})]})]})]}),j&&t.jsxs(D,{tone:"warning",title:"Restart the buyer to apply",children:["Saved, but this buyer was not restarted automatically. Restart it (for example ",t.jsx("code",{children:"systemctl restart antseed-buyer"}),", or stop and start ",t.jsx("code",{children:"antseed buyer start"}),") to use the new settings."]}),v&&t.jsx(D,{tone:"warning",title:"Changed elsewhere",action:t.jsxs("div",{className:"gc-inline gc-inline--wrap",children:[t.jsx(y,{size:"sm",variant:"outline",onClick:()=>m(v),children:"Reload"}),t.jsx(y,{size:"sm",variant:"ghost",onClick:()=>{P(v),S(null)},children:"Keep editing"})]}),children:"Someone saved the buyer settings while you were editing them. Reload to see their version (your edits are dropped), or keep editing and save to replace it."}),!b&&f.error?t.jsx($,{error:f.error,title:"Could not save"}):null,t.jsxs("div",{className:"gc-actions",children:[t.jsx("span",{className:"gc-fineprint gc-actions__note",children:q.length===0?"No changes.":_?"Saving restarts the buyer.":"Applies at once, without a restart."}),t.jsx(y,{variant:"ghost",disabled:q.length===0||f.isPending,onClick:()=>m(v??k),children:"Reset"}),t.jsx(y,{disabled:q.length===0||Object.keys(o).length>0||f.isPending,onClick:()=>_?p(!0):f.mutate(),children:f.isPending?"Saving…":"Save"})]}),t.jsx(ie,{isOpen:b,busy:f.isPending,error:f.error,onClose:()=>{p(!1),f.reset()},onConfirm:()=>f.mutate(),title:"Restart the buyer?",confirmLabel:"Save and restart",tone:"primary",body:"These changes need a buyer restart. Requests in flight finish first; new requests wait a few seconds while it reconnects."})]})}const We=["general","buyer","observability","tokens","auth"];function Ge(){const e=we();return t.jsx(A,{title:"Gateway",children:t.jsx(z,{query:e,children:s=>t.jsx(le,{items:[["Public URL",s.publicUrl?t.jsx(ke,{children:s.publicUrl},"u"):t.jsx("span",{className:"gc-muted",children:"Not set. Clients use this console's address."})],["Version",s.version],["Buyer",s.buyer.reachable?t.jsx(M,{tone:"success",children:"Connected"},"b"):t.jsx(M,{tone:"danger",children:"Unreachable"},"b")],["Sellers seen",String(s.buyer.peers)],["Spend feed",s.spendFeed],["USDC top-ups (x402)",s.x402?"On":"Off"]]})})})}function Ye({settings:e}){const s=e.buyer;return t.jsx(A,{title:"Buyer",description:t.jsxs(t.Fragment,{children:["The top of every routing policy: workspaces, members, keys and presets can only narrow it. Saved to the config file of the buyer on port ",s.proxyPort,ue(s.overrides,"proxyPort")?" (set by its start flags)":"","."]}),children:t.jsx(Qe,{buyer:s})})}function Je({settings:e}){const s=re(),r=ne(),n=e.observability,[c,u]=d.useState(n.otlpEndpoint??""),[a,h]=d.useState(Fe(n.otlpHeaders)),[k,P]=d.useState(n.logContent),[v,S]=d.useState(n.retentionDays===null?"":String(n.retentionDays)),b=c.trim()&&!/^https?:\/\/\S+$/.test(c.trim())?"Use an http:// or https:// URL.":void 0,p=_e(n.otlpEndpoint,c.trim()||null)?$e(a):[],j=p.length?`Enter the value of ${p.join(", ")} again: saved values are not sent to a new endpoint.`:void 0,g=ae({mutationFn:()=>{if(b)throw new Error(b);if(j)throw new Error(j);const l=v===""?null:Number(v);return E.settings.setObservability({otlpEndpoint:c.trim()||null,otlpHeaders:De(a),logContent:k,retentionDays:l})},onSuccess:l=>{const{restartRequired:m,...o}=l;s.setQueryData(U.settings,o),r(m?"Observability saved. Restart the gateway to apply it.":"Observability saved")},onError:l=>{qe(l,"otlp_headers_required")&&h(X(a))}});return t.jsx(A,{title:"Observability",description:"Send one OpenTelemetry trace per request, and choose what the request log keeps.",children:t.jsxs("form",{className:"gc-stack",onSubmit:l=>{l.preventDefault(),g.mutate()},children:[t.jsx(O,{label:"OTLP/HTTP endpoint",placeholder:"https://otel.example.com/v1/traces",value:c,error:b,onChange:l=>u(l.target.value)}),t.jsx(oe,{label:"Headers",rows:3,mono:!0,placeholder:"Authorization: Bearer …",value:a,onChange:l=>h(l.target.value),error:j,hint:"One per line, as Name: value. Saved values show as ••••; leave them as they are to keep them (for the same endpoint only)."}),p.length>0&&t.jsx("div",{children:t.jsx(y,{size:"sm",variant:"outline",onClick:()=>h(X(a)),children:"Clear saved values to re-enter them"})}),t.jsx(I,{checked:k,onChange:P,label:"Store request and response bodies",description:"Off by default. Bodies can contain personal data; only turn this on if you need it."}),t.jsx(B,{label:"Keep the request log for",value:v,onChange:S,options:[{value:"7",label:"7 days"},{value:"30",label:"30 days"},{value:"90",label:"90 days"},{value:"365",label:"1 year"},{value:"",label:"Forever"}]}),g.error?t.jsx($,{error:g.error,title:"Could not save"}):null,t.jsx("div",{className:"gc-actions",children:t.jsx(y,{type:"submit",disabled:g.isPending,children:g.isPending?"Saving…":"Save"})})]})})}function Ze(){const{me:e}=Pe(),s=e.member.orgRole==="owner",r=Re(),[n,c]=d.useState(!1),[u,a]=d.useState(""),[h,k]=d.useState("read"),[P,v]=d.useState("90"),[S,b]=d.useState(null),[p,j]=d.useState(null),g=Q({mutationFn:()=>E.adminTokens.create(u.trim(),h,P==="never"?null:Number(P)),onSuccess:m=>{c(!1),a(""),b(m.secret)},invalidate:[U.adminTokens]}),l=Q({mutationFn:m=>E.adminTokens.revoke(m.id),onSuccess:()=>j(null),invalidate:[U.adminTokens]});return t.jsxs(A,{flush:!0,title:"Management tokens",description:t.jsxs(t.Fragment,{children:["For scripts and CI. Send as ",t.jsx("code",{children:"Authorization: Bearer …"})," to ",t.jsx("code",{children:"/console/api"}),"."]}),actions:t.jsx(y,{size:"sm",leadingIcon:t.jsx(G.plus,{size:14}),onClick:()=>c(!0),children:"New token"}),children:[t.jsx(z,{query:r,children:m=>t.jsx(Ae,{label:"Management tokens",rows:m,rowKey:o=>o.id,rowLabel:o=>o.label,actions:o=>[{label:"Revoke",tone:"danger",onSelect:()=>j(o)}],empty:t.jsx(Ie,{icon:t.jsx(G.keys,{size:18}),title:"No management tokens"}),columns:[{key:"label",header:"Name",render:o=>t.jsx(Ne,{name:o.label,hint:o.hint})},{key:"scope",header:"Scope",render:o=>o.scope==="admin"?t.jsx(M,{tone:"warning",children:"Admin"}):t.jsx(M,{children:"Read only"})},{key:"created",header:"Created",secondary:!0,optional:!0,render:o=>W(o.createdAt)},{key:"expires",header:"Expires",secondary:!0,render:o=>t.jsx(Ce,{at:o.expiresAt,format:W})},{key:"used",header:"Last used",secondary:!0,optional:!0,render:o=>Me(o.lastUsedAt)}]})}),t.jsx(Y,{isOpen:n,onClose:()=>c(!1),title:"New management token",children:t.jsxs("form",{className:"gc-stack",onSubmit:m=>{m.preventDefault(),g.mutate()},children:[t.jsx(O,{label:"Name",required:!0,value:u,onChange:m=>a(m.target.value),placeholder:"e.g. Terraform"}),t.jsx(B,{label:"Scope",value:h,onChange:m=>k(m),options:[{value:"read",label:"Read only (GET requests)"},{value:"admin",label:"Admin (everything an org admin can do)"}]}),t.jsx(B,{label:"Expires after",value:P,onChange:v,options:[{value:"30",label:"30 days"},{value:"90",label:"90 days"},{value:"365",label:"1 year"},...s?[{value:"never",label:"Never"}]:[]],hint:"Short-lived tokens limit the damage if one leaks."}),g.error?t.jsx($,{error:g.error,title:"Could not create the token"}):null,t.jsxs("div",{className:"gc-actions",children:[t.jsx(y,{variant:"ghost",onClick:()=>c(!1),children:"Cancel"}),t.jsx(y,{type:"submit",disabled:g.isPending||!u.trim(),children:"Create token"})]})]})}),t.jsx(Y,{isOpen:S!==null,onClose:()=>b(null),title:"Token created",children:S&&t.jsxs("div",{className:"gc-stack",children:[t.jsx(Ue,{secret:S}),t.jsx("div",{className:"gc-actions",children:t.jsx(y,{onClick:()=>b(null),children:"Done"})})]})}),t.jsx(ie,{isOpen:p!==null,busy:l.isPending,error:l.error,onClose:()=>j(null),onConfirm:()=>p&&l.mutate(p),title:"Revoke this token?",confirmLabel:"Revoke",body:`Anything using ${(p==null?void 0:p.label)??"this token"} loses access immediately.`})]})}function Xe({settings:e}){const s=e.auth,r=n=>n?t.jsx(M,{tone:"success",children:"On"}):t.jsx(M,{children:"Off"});return t.jsx(A,{title:"Sign-in methods",description:"Configured on the gateway host with environment variables. Read only here.",children:t.jsxs("div",{className:"gc-stack",children:[t.jsx(le,{items:[["Passkeys",r(s.passkey)],["Wallet (Sign-In with Ethereum)",r(s.wallet)],["OpenID Connect",s.oidc?t.jsx(M,{tone:"success",children:s.oidc.label},"o"):r(!1)],["Cloudflare Access",r(s.cloudflareAccess)],["API key view for key holders",r(s.apiKeyLogin)]]}),t.jsx(D,{tone:"info",title:"Using your own identity provider",children:"Set the OpenID Connect issuer, client id and secret in the gateway's environment and restart it, or put the console behind Cloudflare Access and enable trusted Access headers. The gateway docs list the exact variables. Antseed runs no sign-in service of its own."})]})})}function et({tab:e,settings:s}){return e==="buyer"?t.jsx(Ye,{settings:s}):e==="observability"?t.jsx(Je,{settings:s}):t.jsx(Xe,{settings:s})}function mt(){const[e,s]=d.useState(()=>{const n=new URLSearchParams(window.location.search).get("tab");return We.includes(n)?n:"general"}),r=Se({queryKey:U.settings,queryFn:E.settings.get});return d.useEffect(()=>{var n;(n=window.scrollTo)==null||n.call(window,0,0)},[e]),t.jsxs("div",{className:"gc-page",children:[t.jsx(je,{title:"Settings"}),t.jsx(Oe,{id:"gc-settings",label:"Settings sections",value:e,onChange:s,tabs:[{id:"general",label:"General"},{id:"buyer",label:"Buyer"},{id:"observability",label:"Observability"},{id:"tokens",label:"Management tokens"},{id:"auth",label:"Sign-in"}]}),t.jsxs(Ee,{tabsId:"gc-settings",tab:e,className:"gc-stack",children:[e==="general"&&t.jsx(Ge,{}),e==="tokens"&&t.jsx(Ze,{}),(e==="buyer"||e==="observability"||e==="auth")&&t.jsx(z,{query:r,children:n=>t.jsx(et,{tab:e,settings:n})}),r.error&&e==="general"?t.jsx($,{error:r.error}):null]})]})}export{mt as default};
7
+ `),peerRefreshMs:String(e.network.peerRefreshIntervalMs),metadataTimeoutMs:String(e.network.metadataFetchTimeoutMs),requestTimeoutMs:String(e.network.requestTimeoutMs),maxStreamMs:String(e.network.maxStreamDurationMs),perServiceMetadata:!e.network.disableMetadataV2Services}}function Ve(e){const s=Le({input:e.maxInput,output:e.maxOutput,cached:e.maxCached,reputation:e.minReputation}),r={maxInput:s.input,maxOutput:s.output,maxCached:s.cached,softInputCap:w(e.softInputCap,{required:!0}),allowedPeerIds:e.allowMode==="only"?ee(e.allowedPeerIds):void 0,blockedPeerIds:ee(e.blockedPeerIds),sampleRate:w(e.sampleRate,{max:1}),maxSampleBytes:w(e.maxSampleBytes,{min:1,integer:!0}),maxPerRequest:w(e.maxPerRequest,{required:!0,min:1e-6}),maxReserve:w(e.maxReserve,{required:!0,min:1e-6}),rpcUrl:e.rpcUrl.trim()?te([e.rpcUrl.trim()]):void 0,fallbackRpcUrls:te(V(e.fallbackRpcUrls)),peerRefreshMs:w(e.peerRefreshMs,{required:!0,min:1e3,integer:!0}),metadataTimeoutMs:w(e.metadataTimeoutMs,{required:!0,min:100,integer:!0}),requestTimeoutMs:w(e.requestTimeoutMs,{required:!0,min:1,integer:!0}),maxStreamMs:w(e.maxStreamMs,{required:!0,min:1,integer:!0})};return Object.fromEntries(Object.entries(r).filter(([,n])=>n))}function ze(e){const s=r=>r.trim()?Number(r):null;return{routingPreferences:{minTrustScore:Number(e.minTrustScore),maxInputUsdPerMillion:Number(e.softInputCap),preferFreePeers:e.preferFree,allowedPeerIds:e.allowMode==="only"?e.allowedPeerIds:[],blockedPeerIds:e.blockedPeerIds},maxPricing:{inputUsdPerMillion:Number(e.maxInput),outputUsdPerMillion:Number(e.maxOutput),cachedInputUsdPerMillion:s(e.maxCached)},minPeerReputation:Number(e.minReputation),verifier:{enabled:e.verify,require:e.verify&&e.requireVerified,prefer:e.verify?V(e.verifiers):[]},evidence:{sampleRate:s(e.sampleRate),maxSampleBytes:s(e.maxSampleBytes)},payments:{autoSweep:e.autoSweep,maxPerRequestUsdc:Number(e.maxPerRequest),maxReserveUsdc:Number(e.maxReserve),rpcUrl:e.rpcUrl.trim()||null,fallbackRpcUrls:V(e.fallbackRpcUrls)},network:{peerRefreshIntervalMs:Number(e.peerRefreshMs),metadataFetchTimeoutMs:Number(e.metadataTimeoutMs),requestTimeoutMs:Number(e.requestTimeoutMs),maxStreamDurationMs:Number(e.maxStreamMs),disableMetadataV2Services:!e.perServiceMetadata}}}const He=["allowMode","allowedPeerIds","blockedPeerIds","minTrustScore","preferFree","softInputCap"];function L(e,s){return Object.keys(s).filter(r=>JSON.stringify(e[r])!==JSON.stringify(s[r]))}function Ke(e){const s=r=>r.trim()&&Number.isFinite(Number(r))?Number(r):void 0;return{...e.allowMode==="only"&&e.allowedPeerIds.length>0?{allowedPeerIds:e.allowedPeerIds}:{},...e.blockedPeerIds.length>0?{blockedPeerIds:e.blockedPeerIds}:{},...s(e.minTrustScore)?{minTrustScore:s(e.minTrustScore)}:{},...s(e.minReputation)?{minReputation:s(e.minReputation)}:{},...s(e.maxInput)!==void 0?{maxInputUsdPerMillion:s(e.maxInput)}:{},...s(e.maxOutput)!==void 0?{maxOutputUsdPerMillion:s(e.maxOutput)}:{},...s(e.maxCached)!==void 0?{maxCachedInputUsdPerMillion:s(e.maxCached)}:{}}}function Qe({buyer:e}){const s=re(),r=ne(),n=ge(),c=xe(),u=d.useMemo(()=>se(e),[e]),[a,h]=d.useState(u),[k,P]=d.useState(u),[v,S]=d.useState(null),[b,p]=d.useState(!1),[j,g]=d.useState(!1),l=(i,R)=>h(N=>({...N,[i]:R})),m=i=>{h(i),P(i),S(null)},o=Ve(a),q=L(k,a);d.useEffect(()=>{L(k,u).length!==0&&(q.length===0||L(u,a).length===0?m(u):S(u))},[u]);const _=q.some(i=>!He.includes(i)),C=i=>ue(e.overrides,i)?t.jsx(Be,{}):void 0,H=(i,R)=>C(i)??R,f=ae({mutationFn:()=>E.settings.updateBuyer(ze(a)),onSuccess:i=>{const{restartRequired:R,...N}=i;s.setQueryData(U.settings,N),m(se(N.buyer)),s.invalidateQueries({queryKey:U.buyerLimits}),p(!1),g(R===!0),r(_?R?"Saved. Restart the buyer to apply them.":"Saved. The buyer is restarting.":"Saved. The buyer applies these at once.")}}),T=d.useMemo(()=>!n.data||n.data.length===0?null:{matched:ve(be(Ke(a)),n.data,c.data??[]).length,total:n.data.length},[a,n.data,c.data]),de=`${K(Number(a.maxInput))} in · ${K(Number(a.maxOutput))} out`,me=a.verify?a.requireVerified?"Required":"On":"Off",pe=`${a.autoSweep?"Auto-sweep on":"Auto-sweep off"} · ${fe(Number(a.maxPerRequest))} per request`,x=(i,R,N={})=>t.jsx(O,{size:"sm",className:N.className??"gc-num",label:R,inputMode:"decimal",placeholder:N.placeholder,value:a[i],error:o[i],hint:N.hint,onChange:he=>l(i,he.target.value)});return t.jsxs("div",{className:"gc-stack",children:[t.jsxs("div",{className:"gc-policy",children:[T&&(T.matched===0?t.jsxs(D,{tone:"warning",title:"No seller matches these settings",children:["None of the ",T.total," sellers this gateway sees passes them, so every request will fail."]}):t.jsxs("p",{className:"gc-muted","aria-live":"polite",children:["Matches ",T.matched," of ",T.total," sellers. Every key can only narrow this."]})),t.jsxs("div",{className:"gc-policy__cols",children:[t.jsxs("section",{className:"gc-policy__section",children:[t.jsx("h3",{children:"Sellers"}),t.jsx(Te,{label:"Which sellers may serve",value:a.allowMode,onChange:i=>l("allowMode",i),options:[{value:"any",label:"Any seller"},{value:"only",label:"Only these"}]}),a.allowMode==="only"&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{label:"Allowed sellers",value:a.allowedPeerIds,onChange:i=>l("allowedPeerIds",i),peers:n.data}),o.allowedPeerIds&&t.jsx("p",{className:"gc-warn",children:o.allowedPeerIds}),a.allowedPeerIds.length===0&&t.jsx("p",{className:"gc-fineprint",children:"With no sellers listed, any seller may serve."})]}),t.jsx(Y,{label:"Blocked sellers",value:a.blockedPeerIds,onChange:i=>l("blockedPeerIds",i),peers:n.data}),o.blockedPeerIds&&t.jsx("p",{className:"gc-warn",children:o.blockedPeerIds}),t.jsx("p",{className:"gc-fineprint",children:"Blocked here means blocked for every key."})]}),t.jsxs("section",{className:"gc-policy__section",children:[t.jsx("h3",{children:"Quality and ranking"}),t.jsx(Z,{label:"Minimum trust score",clearable:!1,value:a.minTrustScore,onChange:i=>l("minTrustScore",i),hint:"Keys can raise it, not lower it."}),(ye(n.data)||a.minReputation!=="0")&&t.jsx(Z,{label:"Minimum reputation",clearable:!1,value:a.minReputation,onChange:i=>l("minReputation",i),hint:H("minPeerReputation","Applies to pinned sellers too.")}),t.jsx("div",{className:"gc-policy__switches",children:t.jsx(I,{checked:a.preferFree,onChange:i=>l("preferFree",i),label:"Free sellers first"})}),x("softInputCap","Soft input price limit $/M",{hint:"Pricier sellers rank lower; none is excluded.",className:"gc-num gc-num--wide"})]})]}),t.jsxs("div",{className:"gc-policy__advanced",children:[t.jsxs(F,{title:"Price caps",summary:de,children:[t.jsx("p",{className:"gc-fineprint",children:"Hard limits for every request, pinned sellers included."}),t.jsxs("div",{className:"gc-policy__caps",children:[x("maxInput","Input $/M",{hint:C("maxPricing.inputUsdPerMillion")}),x("maxOutput","Output $/M",{hint:C("maxPricing.outputUsdPerMillion")}),x("maxCached","Cached input $/M",{placeholder:"Same as input"})]})]}),t.jsxs(F,{title:"Verification",summary:me,children:[C("verifier"),t.jsxs("div",{className:"gc-policy__switches",children:[t.jsx(I,{checked:a.verify,onChange:i=>l("verify",i),label:"Verify sellers"}),t.jsx(I,{checked:a.verify&&a.requireVerified,disabled:!a.verify,onChange:i=>l("requireVerified",i),label:"Require verification"})]}),t.jsx(O,{size:"sm",label:"Verifiers",value:a.verifiers,disabled:!a.verify,placeholder:"Seller's trusted default",hint:"Ordered, comma-separated verifier ids, e.g. TEE attestation.",onChange:i=>l("verifiers",i.target.value)}),t.jsxs("div",{className:"gc-policy__caps",children:[x("sampleRate","Evidence sample rate",{placeholder:"Default",hint:"Share of responses kept, 0 to 1."}),x("maxSampleBytes","Largest sample (bytes)",{placeholder:"Default",className:"gc-num gc-num--wide"})]})]}),t.jsxs(F,{title:"Payments",summary:pe,children:[t.jsx(I,{checked:a.autoSweep,onChange:i=>l("autoSweep",i),label:"Sweep deposits automatically",description:"Move USDC that arrives in the workspace wallets into their deposits."}),t.jsxs("div",{className:"gc-policy__caps",children:[x("maxPerRequest","Max per request (USDC)",{className:"gc-num gc-num--wide"}),x("maxReserve","Max channel reserve (USDC)",{className:"gc-num gc-num--wide"})]}),t.jsx(O,{size:"sm",label:"Base RPC URL",value:a.rpcUrl,error:o.rpcUrl,placeholder:"Chain default",hint:H("payments.rpcUrl","Your own endpoint avoids public rate limits. Saved URLs show without their path; leave them as they are to keep them."),onChange:i=>l("rpcUrl",i.target.value)}),t.jsx(oe,{label:"Fallback RPC URLs",rows:2,mono:!0,value:a.fallbackRpcUrls,error:o.fallbackRpcUrls,hint:"One per line, tried in order.",onChange:i=>l("fallbackRpcUrls",i.target.value)})]}),t.jsxs(F,{title:"Network and timeouts",summary:`Refresh ${Math.round(Number(a.peerRefreshMs)/1e3)} s`,children:[t.jsxs("div",{className:"gc-policy__caps",children:[x("peerRefreshMs","Peer refresh (ms)",{className:"gc-num gc-num--wide"}),x("metadataTimeoutMs","Metadata timeout (ms)",{className:"gc-num gc-num--wide",hint:C("network.metadataFetchTimeoutMs")}),x("requestTimeoutMs","Response start timeout (ms)",{className:"gc-num gc-num--wide"}),x("maxStreamMs","Longest stream (ms)",{className:"gc-num gc-num--wide",hint:C("network.maxStreamDurationMs")})]}),t.jsx(I,{checked:a.perServiceMetadata,onChange:i=>l("perServiceMetadata",i),label:"Per-service attribution in signed metadata",description:C("network.disableMetadataV2Services")??"Tells sellers which service each request used."})]})]})]}),j&&t.jsxs(D,{tone:"warning",title:"Restart the buyer to apply",children:["Saved, but this buyer was not restarted automatically. Restart it (for example ",t.jsx("code",{children:"systemctl restart antseed-buyer"}),", or stop and start ",t.jsx("code",{children:"antseed buyer start"}),") to use the new settings."]}),v&&t.jsx(D,{tone:"warning",title:"Changed elsewhere",action:t.jsxs("div",{className:"gc-inline gc-inline--wrap",children:[t.jsx(y,{size:"sm",variant:"outline",onClick:()=>m(v),children:"Reload"}),t.jsx(y,{size:"sm",variant:"ghost",onClick:()=>{P(v),S(null)},children:"Keep editing"})]}),children:"Someone saved the buyer settings while you were editing them. Reload to see their version (your edits are dropped), or keep editing and save to replace it."}),!b&&f.error?t.jsx($,{error:f.error,title:"Could not save"}):null,t.jsxs("div",{className:"gc-actions",children:[t.jsx("span",{className:"gc-fineprint gc-actions__note",children:q.length===0?"No changes.":_?"Saving restarts the buyer.":"Applies at once, without a restart."}),t.jsx(y,{variant:"ghost",disabled:q.length===0||f.isPending,onClick:()=>m(v??k),children:"Reset"}),t.jsx(y,{disabled:q.length===0||Object.keys(o).length>0||f.isPending,onClick:()=>_?p(!0):f.mutate(),children:f.isPending?"Saving…":"Save"})]}),t.jsx(ie,{isOpen:b,busy:f.isPending,error:f.error,onClose:()=>{p(!1),f.reset()},onConfirm:()=>f.mutate(),title:"Restart the buyer?",confirmLabel:"Save and restart",tone:"primary",body:"These changes need a buyer restart. Requests in flight finish first; new requests wait a few seconds while it reconnects."})]})}const We=["general","buyer","observability","tokens","auth"];function Ge(){const e=we();return t.jsx(A,{title:"Gateway",children:t.jsx(z,{query:e,children:s=>t.jsx(le,{items:[["Public URL",s.publicUrl?t.jsx(ke,{children:s.publicUrl},"u"):t.jsx("span",{className:"gc-muted",children:"Not set. Clients use this console's address."})],["Version",s.version],["Buyer",s.buyer.reachable?t.jsx(M,{tone:"success",children:"Connected"},"b"):t.jsx(M,{tone:"danger",children:"Unreachable"},"b")],["Sellers seen",String(s.buyer.peers)],["Spend feed",s.spendFeed],["USDC top-ups (x402)",s.x402?"On":"Off"]]})})})}function Je({settings:e}){const s=e.buyer;return t.jsx(A,{title:"Buyer",description:t.jsxs(t.Fragment,{children:["The top of every routing policy: workspaces, members, keys and presets can only narrow it. Saved to the config file of the buyer on port ",s.proxyPort,ue(s.overrides,"proxyPort")?" (set by its start flags)":"","."]}),children:t.jsx(Qe,{buyer:s})})}function Ye({settings:e}){const s=re(),r=ne(),n=e.observability,[c,u]=d.useState(n.otlpEndpoint??""),[a,h]=d.useState(Fe(n.otlpHeaders)),[k,P]=d.useState(n.logContent),[v,S]=d.useState(n.retentionDays===null?"":String(n.retentionDays)),b=c.trim()&&!/^https?:\/\/\S+$/.test(c.trim())?"Use an http:// or https:// URL.":void 0,p=_e(n.otlpEndpoint,c.trim()||null)?$e(a):[],j=p.length?`Enter the value of ${p.join(", ")} again: saved values are not sent to a new endpoint.`:void 0,g=ae({mutationFn:()=>{if(b)throw new Error(b);if(j)throw new Error(j);const l=v===""?null:Number(v);return E.settings.setObservability({otlpEndpoint:c.trim()||null,otlpHeaders:De(a),logContent:k,retentionDays:l})},onSuccess:l=>{const{restartRequired:m,...o}=l;s.setQueryData(U.settings,o),r(m?"Observability saved. Restart the gateway to apply it.":"Observability saved")},onError:l=>{qe(l,"otlp_headers_required")&&h(X(a))}});return t.jsx(A,{title:"Observability",description:"Send one OpenTelemetry trace per request, and choose what the request log keeps.",children:t.jsxs("form",{className:"gc-stack",onSubmit:l=>{l.preventDefault(),g.mutate()},children:[t.jsx(O,{label:"OTLP/HTTP endpoint",placeholder:"https://otel.example.com/v1/traces",value:c,error:b,onChange:l=>u(l.target.value)}),t.jsx(oe,{label:"Headers",rows:3,mono:!0,placeholder:"Authorization: Bearer …",value:a,onChange:l=>h(l.target.value),error:j,hint:"One per line, as Name: value. Saved values show as ••••; leave them as they are to keep them (for the same endpoint only)."}),p.length>0&&t.jsx("div",{children:t.jsx(y,{size:"sm",variant:"outline",onClick:()=>h(X(a)),children:"Clear saved values to re-enter them"})}),t.jsx(I,{checked:k,onChange:P,label:"Store request and response bodies",description:"Off by default. Bodies can contain personal data; only turn this on if you need it."}),t.jsx(B,{label:"Keep the request log for",value:v,onChange:S,options:[{value:"7",label:"7 days"},{value:"30",label:"30 days"},{value:"90",label:"90 days"},{value:"365",label:"1 year"},{value:"",label:"Forever"}]}),g.error?t.jsx($,{error:g.error,title:"Could not save"}):null,t.jsx("div",{className:"gc-actions",children:t.jsx(y,{type:"submit",disabled:g.isPending,children:g.isPending?"Saving…":"Save"})})]})})}function Ze(){const{me:e}=Pe(),s=e.member.orgRole==="owner",r=Re(),[n,c]=d.useState(!1),[u,a]=d.useState(""),[h,k]=d.useState("read"),[P,v]=d.useState("90"),[S,b]=d.useState(null),[p,j]=d.useState(null),g=Q({mutationFn:()=>E.adminTokens.create(u.trim(),h,P==="never"?null:Number(P)),onSuccess:m=>{c(!1),a(""),b(m.secret)},invalidate:[U.adminTokens]}),l=Q({mutationFn:m=>E.adminTokens.revoke(m.id),onSuccess:()=>j(null),invalidate:[U.adminTokens]});return t.jsxs(A,{flush:!0,title:"Management tokens",description:t.jsxs(t.Fragment,{children:["For scripts and CI. Send as ",t.jsx("code",{children:"Authorization: Bearer …"})," to ",t.jsx("code",{children:"/console/api"}),"."]}),actions:t.jsx(y,{size:"sm",leadingIcon:t.jsx(G.plus,{size:14}),onClick:()=>c(!0),children:"New token"}),children:[t.jsx(z,{query:r,children:m=>t.jsx(Ae,{label:"Management tokens",rows:m,rowKey:o=>o.id,rowLabel:o=>o.label,actions:o=>[{label:"Revoke",tone:"danger",onSelect:()=>j(o)}],empty:t.jsx(Ie,{icon:t.jsx(G.keys,{size:18}),title:"No management tokens"}),columns:[{key:"label",header:"Name",render:o=>t.jsx(Ne,{name:o.label,hint:o.hint})},{key:"scope",header:"Scope",render:o=>o.scope==="admin"?t.jsx(M,{tone:"warning",children:"Admin"}):t.jsx(M,{children:"Read only"})},{key:"created",header:"Created",secondary:!0,optional:!0,render:o=>W(o.createdAt)},{key:"expires",header:"Expires",secondary:!0,render:o=>t.jsx(Ce,{at:o.expiresAt,format:W})},{key:"used",header:"Last used",secondary:!0,optional:!0,render:o=>Me(o.lastUsedAt)}]})}),t.jsx(J,{isOpen:n,onClose:()=>c(!1),title:"New management token",children:t.jsxs("form",{className:"gc-stack",onSubmit:m=>{m.preventDefault(),g.mutate()},children:[t.jsx(O,{label:"Name",required:!0,value:u,onChange:m=>a(m.target.value),placeholder:"e.g. Terraform"}),t.jsx(B,{label:"Scope",value:h,onChange:m=>k(m),options:[{value:"read",label:"Read only (GET requests)"},{value:"admin",label:"Admin (everything an org admin can do)"}]}),t.jsx(B,{label:"Expires after",value:P,onChange:v,options:[{value:"30",label:"30 days"},{value:"90",label:"90 days"},{value:"365",label:"1 year"},...s?[{value:"never",label:"Never"}]:[]],hint:"Short-lived tokens limit the damage if one leaks."}),g.error?t.jsx($,{error:g.error,title:"Could not create the token"}):null,t.jsxs("div",{className:"gc-actions",children:[t.jsx(y,{variant:"ghost",onClick:()=>c(!1),children:"Cancel"}),t.jsx(y,{type:"submit",disabled:g.isPending||!u.trim(),children:"Create token"})]})]})}),t.jsx(J,{isOpen:S!==null,onClose:()=>b(null),title:"Token created",children:S&&t.jsxs("div",{className:"gc-stack",children:[t.jsx(Ue,{secret:S}),t.jsx("div",{className:"gc-actions",children:t.jsx(y,{onClick:()=>b(null),children:"Done"})})]})}),t.jsx(ie,{isOpen:p!==null,busy:l.isPending,error:l.error,onClose:()=>j(null),onConfirm:()=>p&&l.mutate(p),title:"Revoke this token?",confirmLabel:"Revoke",body:`Anything using ${(p==null?void 0:p.label)??"this token"} loses access immediately.`})]})}function Xe({settings:e}){const s=e.auth,r=n=>n?t.jsx(M,{tone:"success",children:"On"}):t.jsx(M,{children:"Off"});return t.jsx(A,{title:"Sign-in methods",description:"Configured on the gateway host with environment variables. Read only here.",children:t.jsxs("div",{className:"gc-stack",children:[t.jsx(le,{items:[["Passkeys",r(s.passkey)],["Wallet (Sign-In with Ethereum)",r(s.wallet)],["OpenID Connect",s.oidc?t.jsx(M,{tone:"success",children:s.oidc.label},"o"):r(!1)],["Cloudflare Access",r(s.cloudflareAccess)],["API key view for key holders",r(s.apiKeyLogin)]]}),t.jsx(D,{tone:"info",title:"Using your own identity provider",children:"Set the OpenID Connect issuer, client id and secret in the gateway's environment and restart it, or put the console behind Cloudflare Access and enable trusted Access headers. The gateway docs list the exact variables. Antseed runs no sign-in service of its own."})]})})}function et({tab:e,settings:s}){return e==="buyer"?t.jsx(Je,{settings:s}):e==="observability"?t.jsx(Ye,{settings:s}):t.jsx(Xe,{settings:s})}function mt(){const[e,s]=d.useState(()=>{const n=new URLSearchParams(window.location.search).get("tab");return We.includes(n)?n:"general"}),r=Se({queryKey:U.settings,queryFn:E.settings.get});return d.useEffect(()=>{var n;(n=window.scrollTo)==null||n.call(window,0,0)},[e]),t.jsxs("div",{className:"gc-page",children:[t.jsx(je,{title:"Settings"}),t.jsx(Oe,{id:"gc-settings",label:"Settings sections",value:e,onChange:s,tabs:[{id:"general",label:"General"},{id:"buyer",label:"Buyer"},{id:"observability",label:"Observability"},{id:"tokens",label:"Management tokens"},{id:"auth",label:"Sign-in"}]}),t.jsxs(Ee,{tabsId:"gc-settings",tab:e,className:"gc-stack",children:[e==="general"&&t.jsx(Ge,{}),e==="tokens"&&t.jsx(Ze,{}),(e==="buyer"||e==="observability"||e==="auth")&&t.jsx(z,{query:r,children:n=>t.jsx(et,{tab:e,settings:n})}),r.error&&e==="general"?t.jsx($,{error:r.error}):null]})]})}export{mt as default};
@@ -1 +1 @@
1
- import{r as e,j as s}from"./index-DqdaAEyo.js";function _({checked:a,onChange:r,label:l,description:t,disabled:n,className:o}){const c=e.useId(),i=e.useId();return s.jsxs("div",{className:["as-switch",o].filter(Boolean).join(" "),children:[s.jsx("button",{id:c,type:"button",role:"switch","aria-checked":a,"aria-describedby":t?i:void 0,disabled:n,className:a?"as-switch__track as-switch__track--on":"as-switch__track",onClick:()=>r(!a),children:s.jsx("span",{className:"as-switch__thumb"})}),s.jsxs("label",{htmlFor:c,className:"as-switch__text",children:[s.jsx("span",{className:"as-switch__label",children:l}),t&&s.jsx("span",{id:i,className:"as-switch__desc",children:t})]})]})}export{_ as S};
1
+ import{r as e,j as s}from"./index-BG30WuBG.js";function _({checked:a,onChange:r,label:l,description:t,disabled:n,className:o}){const c=e.useId(),i=e.useId();return s.jsxs("div",{className:["as-switch",o].filter(Boolean).join(" "),children:[s.jsx("button",{id:c,type:"button",role:"switch","aria-checked":a,"aria-describedby":t?i:void 0,disabled:n,className:a?"as-switch__track as-switch__track--on":"as-switch__track",onClick:()=>r(!a),children:s.jsx("span",{className:"as-switch__thumb"})}),s.jsxs("label",{htmlFor:c,className:"as-switch__text",children:[s.jsx("span",{className:"as-switch__label",children:l}),t&&s.jsx("span",{id:i,className:"as-switch__desc",children:t})]})]})}export{_ as S};
@@ -1 +1 @@
1
- import{r as _,j as l}from"./index-DqdaAEyo.js";import{r as j,f as I}from"./roving-DkptacxO.js";function u(a,n){return`${a}-tab-${n}`}function f(a,n){return`${a}-panel-${n}`}function y({value:a,onChange:n,tabs:e,id:s,label:o,className:x}){const p=_.useId(),d=s??p,m=Math.max(0,e.findIndex(t=>t.id===a));return l.jsx("div",{className:["as-tabs",x].filter(Boolean).join(" "),role:"tablist","aria-label":o,children:e.map((t,c)=>{const b=t.id===a;return l.jsx("button",{id:u(d,t.id),type:"button",role:"tab","aria-selected":b,"aria-controls":f(d,t.id),tabIndex:c===m?0:-1,className:b?"as-tabs__tab as-tabs__tab--on":"as-tabs__tab",onClick:()=>n(t.id),onKeyDown:r=>{const i=j(r,c,e.length);i!==null&&(r.preventDefault(),n(e[i].id),I(r,i,".as-tabs__tab"))},children:t.label},t.id)})})}function N({tabsId:a,tab:n,children:e,className:s,...o}){return l.jsx("div",{id:f(a,n),role:"tabpanel","aria-labelledby":u(a,n),tabIndex:0,className:["as-tabpanel",s].filter(Boolean).join(" "),...o,children:e})}export{y as T,N as a};
1
+ import{r as _,j as l}from"./index-BG30WuBG.js";import{r as j,f as I}from"./roving-DkptacxO.js";function u(a,n){return`${a}-tab-${n}`}function f(a,n){return`${a}-panel-${n}`}function y({value:a,onChange:n,tabs:e,id:s,label:o,className:x}){const p=_.useId(),d=s??p,m=Math.max(0,e.findIndex(t=>t.id===a));return l.jsx("div",{className:["as-tabs",x].filter(Boolean).join(" "),role:"tablist","aria-label":o,children:e.map((t,c)=>{const b=t.id===a;return l.jsx("button",{id:u(d,t.id),type:"button",role:"tab","aria-selected":b,"aria-controls":f(d,t.id),tabIndex:c===m?0:-1,className:b?"as-tabs__tab as-tabs__tab--on":"as-tabs__tab",onClick:()=>n(t.id),onKeyDown:r=>{const i=j(r,c,e.length);i!==null&&(r.preventDefault(),n(e[i].id),I(r,i,".as-tabs__tab"))},children:t.label},t.id)})})}function N({tabsId:a,tab:n,children:e,className:s,...o}){return l.jsx("div",{id:f(a,n),role:"tabpanel","aria-labelledby":u(a,n),tabIndex:0,className:["as-tabpanel",s].filter(Boolean).join(" "),...o,children:e})}export{y as T,N as a};
@@ -0,0 +1 @@
1
+ import{r as o,j as s,$ as c,a0 as m,a1 as u}from"./index-BG30WuBG.js";function j({label:a,hint:i,error:e,className:l,id:d,mono:r,...n}){const x=o.useId(),t=d??x;return s.jsxs("label",{className:u(l),htmlFor:t,children:[a&&s.jsx("span",{className:"as-field__label",children:a}),s.jsx("textarea",{id:t,className:c("as-field__textarea",r),"aria-invalid":e?!0:void 0,...n}),s.jsx(m,{error:e,hint:i})]})}export{j as T};
@@ -1 +1 @@
1
- import{r as y,d as q,j as t,L as O,n as x,E as j,I as C,l as M,g as b,f as R,h as v,e as w,q as I}from"./index-DqdaAEyo.js";import{a as L,b as U,c as B,t as N,s as _,O as F,d as $}from"./usage-CjxizGfE.js";import{S as c,O as A,a as H}from"./Charts-DAh9h4sf.js";const K=[{value:"spend",label:"Spend"},{value:"requests",label:"Requests"},{value:"tokens",label:"Tokens"}],z={spend:e=>R(e),requests:e=>b(e,{compact:!0}),tokens:e=>v(e)};function h(e){return e==="24h"?"hour":e==="90d"?"week":"day"}const D={input:c[0],cached:c[5],output:c[2]};function P(e,r){return e==="tokens"?`Tokens per ${h(r)} by type (input, cached input, output), UTC.`:`${K.find(l=>l.value===e).label} per ${h(r)} by model, UTC. The largest models get their own colour.`}function V({filter:e,range:r,now:l,metric:o,height:d}){const n=y.useMemo(()=>L(r,l),[r,l]),k={...e,from:n[0].from,to:n.at(-1).to-1,groupBy:$(r),splitBy:"model"},a=q({queryKey:I.usage(k),queryFn:()=>w.usage.report(k)}),i=y.useMemo(()=>U(a.data,n),[a.data,n]);if(a.isLoading)return t.jsx(O,{rows:1,height:d??240});if(a.error)return t.jsx(x,{error:a.error,onRetry:()=>void a.refetch()});const p=B(i);if(p===0)return t.jsx(j,{icon:t.jsx(C.activity,{size:18}),title:"No usage in this range",body:"Requests made with this workspace's keys show up here."});const m=o==="tokens"?N(i):_(i,o),f=m.series.map((s,u)=>({...s,color:o==="tokens"?D[s.key]:s.key===F?A:c[u%c.length]})),E=f.reduce((s,u)=>s+u.total,0),g=i.reduce((s,u)=>s+u.groups.reduce((S,T)=>S+M(T.spent),0),0);return t.jsxs(t.Fragment,{children:[t.jsx(H,{label:o==="tokens"?"tokens by type":`${o} by model`,labels:n.map(s=>s.label),columns:m.columns,series:f,format:z[o],height:d}),E===0&&t.jsxs("p",{className:"gc-fineprint",children:[b(p)," ",p===1?"request":"requests",", ",R(g)," recorded so far",o==="tokens"?" (no token counts reported yet)":"","."]})]})}export{K as M,V as U,P as c};
1
+ import{r as y,e as q,j as t,L as O,o as x,E as j,I as C,m as M,h as b,g as R,k as v,f as w,q as I}from"./index-BG30WuBG.js";import{a as L,b as U,c as B,t as N,s as _,O as F,d as $}from"./usage-CSmvbieU.js";import{S as c,O as A,a as H}from"./Charts-Dm9j6cVy.js";const K=[{value:"spend",label:"Spend"},{value:"requests",label:"Requests"},{value:"tokens",label:"Tokens"}],z={spend:e=>R(e),requests:e=>b(e,{compact:!0}),tokens:e=>v(e)};function h(e){return e==="24h"?"hour":e==="90d"?"week":"day"}const D={input:c[0],cached:c[5],output:c[2]};function P(e,r){return e==="tokens"?`Tokens per ${h(r)} by type (input, cached input, output), UTC.`:`${K.find(l=>l.value===e).label} per ${h(r)} by model, UTC. The largest models get their own colour.`}function V({filter:e,range:r,now:l,metric:o,height:d}){const n=y.useMemo(()=>L(r,l),[r,l]),k={...e,from:n[0].from,to:n.at(-1).to-1,groupBy:$(r),splitBy:"model"},a=q({queryKey:I.usage(k),queryFn:()=>w.usage.report(k)}),i=y.useMemo(()=>U(a.data,n),[a.data,n]);if(a.isLoading)return t.jsx(O,{rows:1,height:d??240});if(a.error)return t.jsx(x,{error:a.error,onRetry:()=>void a.refetch()});const p=B(i);if(p===0)return t.jsx(j,{icon:t.jsx(C.activity,{size:18}),title:"No usage in this range",body:"Requests made with this workspace's keys show up here."});const m=o==="tokens"?N(i):_(i,o),f=m.series.map((s,u)=>({...s,color:o==="tokens"?D[s.key]:s.key===F?A:c[u%c.length]})),E=f.reduce((s,u)=>s+u.total,0),g=i.reduce((s,u)=>s+u.groups.reduce((S,T)=>S+M(T.spent),0),0);return t.jsxs(t.Fragment,{children:[t.jsx(H,{label:o==="tokens"?"tokens by type":`${o} by model`,labels:n.map(s=>s.label),columns:m.columns,series:f,format:z[o],height:d}),E===0&&t.jsxs("p",{className:"gc-fineprint",children:[b(p)," ",p===1?"request":"requests",", ",R(g)," recorded so far",o==="tokens"?" (no token counts reported yet)":"","."]})]})}export{K as M,V as U,P as c};
@@ -0,0 +1,9 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/WalletFunding-CsUmR_iR.js","assets/index-BG30WuBG.js","assets/index-D8vXwUTI.css","assets/en_US-Y4ZOVFV4-CAcvlKBB.js","assets/clsx-B-dksMZM.js","assets/index-BwpQbdIU.js","assets/en_US-Y4ZOVFV4-CcVPgXVa.css","assets/useTx-BMOzJPjG.js","assets/ConnectWallet-phY-Bf7w.js","assets/OperatorGateAlert-Bq1ilVp6.js","assets/OperatorActions-DfjEKPUD.js","assets/ChannelClose-C_SM1g28.js"])))=>i.map(i=>d[i]);
2
+ import{j as e,r as L,Z as $t,f as K,F as ge,c3 as Zt,G as ie,c4 as _t,g as D,m as Y,c5 as It,aG as Xt,c0 as en,B as T,I as P,q as F,L as me,w as O,aL as Qe,C as G,ag as se,_ as pe,aD as oe,u as zt,H as ae,aA as tn,y as Ft,Q as le,E as Ye,c6 as nn,M as te,e as Ut,t as we,T as qt,Y as he,l as xe,a7 as rn,a8 as sn,v as $e,J as Ot,aF as on,N as Ze,c7 as an,aR as ln,as as cn,bf as dn,bS as un,P as hn,K as fn,i as gn,n as mn,c8 as pn,c9 as wn,bU as ce,ca as xn,aI as yn,cb as vn,cc as jn,cd as Cn,ce as bn,aJ as nt,cf as rt,cg as Nn}from"./index-BG30WuBG.js";import{C as ye}from"./ChainGate-CeDu6YYJ.js";import{b as An}from"./index-BwpQbdIU.js";import{r as En}from"./dijkstra-COg3n3zL.js";import{D as Vt}from"./DataTable-D65CSQpj.js";import{D as Sn}from"./Disclosure-DrGE-NkF.js";import{S as Bn}from"./Switch-CGhLd0Ay.js";const Mn="#2775CA";function kn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"12",fill:Mn}),e.jsx("text",{x:"12",y:"16.6",textAnchor:"middle",fontSize:"13.5",fontWeight:"700",fill:"#fff",children:"$"})]})}function Ln({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"#0052FF"}),e.jsx("rect",{x:"1",y:"10.95",width:"15.85",height:"2.1",fill:"#fff"})]})}const Rn="M788.1 340.9c-5.8 4.5-108.2 62.2-108.2 190.5 0 148.4 130.3 200.9 134.2 202.2-.6 3.2-20.7 71.9-68.7 141.9-42.8 61.6-87.5 123.1-155.5 123.1s-85.5-39.5-164-39.5c-76.5 0-103.7 40.8-165.9 40.8s-105.6-57-155.5-127C46.7 790.7 0 663 0 541.8c0-194.4 126.4-297.5 250.8-297.5 66.1 0 121.2 43.4 162.7 43.4 39.5 0 101.1-46 176.3-46 28.5 0 130.9 2.6 198.3 99.2zm-234-181.5c31.1-36.9 53.1-88.1 53.1-139.3 0-7.1-.6-14.3-1.9-20.1-50.6 1.9-110.8 33.7-147.1 75.8-28.5 32.4-55.1 83.6-55.1 135.5 0 7.8 1.3 15.6 1.9 18.1 3.2.6 8.4 1.3 13.6 1.3 45.4 0 102.5-30.4 135.5-71.3z";function Tn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"11.5",fill:"#fff",stroke:"#d5d7db"}),e.jsx("path",{d:Rn,fill:"#000",transform:"translate(7.3 6.4) scale(0.0115)"})]})}function st({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"11.5",fill:"#fff",stroke:"#d5d7db"}),e.jsx("circle",{cx:"9.4",cy:"12",r:"4.6",fill:"#EB001B"}),e.jsx("circle",{cx:"14.6",cy:"12",r:"4.6",fill:"#F79E1B",fillOpacity:"0.9"})]})}function Dn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"11.5",fill:"#fff",stroke:"#d5d7db"}),e.jsxs("g",{transform:"translate(6 6) scale(0.5)",children:[e.jsx("path",{fill:"#4285F4",d:"M23.49 12.27c0-.79-.07-1.54-.19-2.27H12v4.51h6.47c-.29 1.48-1.14 2.73-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"}),e.jsx("path",{fill:"#34A853",d:"M12 24c3.24 0 5.95-1.08 7.93-2.91l-3.86-3c-1.08.72-2.45 1.16-4.07 1.16-3.13 0-5.78-2.11-6.73-4.96H1.29v3.09C3.26 21.31 7.31 24 12 24z"}),e.jsx("path",{fill:"#FBBC05",d:"M5.27 14.29c-.25-.72-.38-1.49-.38-2.29s.14-1.57.38-2.29V6.62H1.29C.47 8.24 0 10.06 0 12s.47 3.76 1.29 5.38l3.98-3.09z"}),e.jsx("path",{fill:"#EA4335",d:"M12 4.75c1.77 0 3.35.61 4.6 1.8l3.42-3.42C17.95 1.19 15.24 0 12 0 7.31 0 3.26 2.69 1.29 6.62l3.98 3.09C6.22 6.86 8.87 4.75 12 4.75z"})]})]})}function it({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"#1434CB"}),e.jsx("text",{x:"12",y:"14.6",textAnchor:"middle",fontSize:"7",fontWeight:"800",fontStyle:"italic",fill:"#fff",children:"VISA"})]})}function Pn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"#016FD0"}),e.jsx("text",{x:"12",y:"14.6",textAnchor:"middle",fontSize:"6",fontWeight:"800",fill:"#fff",children:"AMEX"})]})}function _n({size:t=22}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 512 512","aria-hidden":"true",children:[e.jsx("rect",{width:"512",height:"512",rx:"64",fill:"#533AFD"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M120 392L392 334.317V120L120 178.357V392Z",fill:"#fff"})]})}function In({size:t=20}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 542.25 542.25",fill:"#34D399","aria-hidden":"true",children:[e.jsx("path",{d:"M493.18,424.48l-106.09,106.09c-7.48,7.48-17.63,11.69-28.21,11.69h-192.03l250.27-250.27,76.06,76.06c15.58,15.58,15.58,40.85,0,56.43Z"}),e.jsx("path",{d:"M375.41,0L125.14,250.27l-76.06-76.06c-15.58-15.58-15.58-40.85,0-56.43L155.16,11.69c7.48-7.48,17.63-11.69,28.21-11.69h192.03Z"}),e.jsx("path",{d:"M542.25,375.41l-250.27-250.27,76.06-76.06c15.58-15.58,40.85-15.58,56.43,0l106.09,106.09c7.48,7.48,11.69,17.63,11.69,28.21v192.03Z"}),e.jsx("path",{d:"M250.27,417.12l-76.06,76.06c-15.58,15.58-40.85,15.58-56.43,0L11.69,387.09c-7.48-7.48-11.69-17.63-11.69-28.21v-192.03l250.27,250.27Z"})]})}function zn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 2500 2500","aria-hidden":"true",children:[e.jsx("path",{fill:"#213147",d:"M226,760v980c0,63,33,120,88,152l849,490c54,31,121,31,175,0l849-490c54-31,88-89,88-152V760c0-63-33-120-88-152l-849-490c-54-31-121-31-175,0L314,608c-54,31-87,89-87,152H226z"}),e.jsx("path",{fill:"#12AAFF",d:"M1435,1440l-121,332c-3,9-3,19,0,29l208,571l241-139l-289-793C1467,1422,1442,1422,1435,1440z"}),e.jsx("path",{fill:"#12AAFF",d:"M1678,882c-7-18-32-18-39,0l-121,332c-3,9-3,19,0,29l341,935l241-139L1678,883V882z"}),e.jsx("path",{fill:"#9DCCED",d:"M1250,155c6,0,12,2,17,5l918,530c11,6,17,18,17,30v1060c0,12-7,24-17,30l-918,530c-5,3-11,5-17,5s-12-2-17-5l-918-530c-11-6-17-18-17-30V719c0-12,7-24,17-30l918-530c5-3,11-5,17-5l0,0V155z M1250,0c-33,0-65,8-95,25L237,555c-59,34-95,96-95,164v1060c0,68,36,130,95,164l918,530c29,17,62,25,95,25s65-8,95-25l918-530c59-34,95-96,95-164V719c0-68-36-130-95-164L1344,25c-29-17-62-25-95-25l0,0H1250z"}),e.jsx("polygon",{fill:"#213147",points:"642,2179 727,1947 897,2088 738,2234"}),e.jsx("path",{fill:"#fff",d:"M1172,644H939c-17,0-33,11-39,27L401,2039l241,139l550-1507c5-14-5-28-19-28L1172,644z"}),e.jsx("path",{fill:"#fff",d:"M1580,644h-233c-17,0-33,11-39,27L738,2233l241,139l620-1701c5-14-5-28-19-28V644z"})]})}function Fn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 2496 2496","aria-hidden":"true",children:[e.jsx("path",{fill:"#F0B90B",fillRule:"evenodd",clipRule:"evenodd",d:"M1248,0c689.3,0,1248,558.7,1248,1248s-558.7,1248-1248,1248S0,1937.3,0,1248S558.7,0,1248,0L1248,0z"}),e.jsxs("g",{fill:"#fff",children:[e.jsx("path",{d:"M685.9,1248l0.9,330l280.4,165v193.2l-444.5-260.7v-524L685.9,1248L685.9,1248z M685.9,918v192.3l-163.3-96.6V821.4l163.3-96.6l164.1,96.6L685.9,918L685.9,918z M1084.3,821.4l163.3-96.6l164.1,96.6L1247.6,918L1084.3,821.4L1084.3,821.4z"}),e.jsx("path",{d:"M803.9,1509.6v-193.2l163.3,96.6v192.3L803.9,1509.6L803.9,1509.6z M1084.3,1812.2l163.3,96.6l164.1-96.6v192.3l-164.1,96.6l-163.3-96.6V1812.2L1084.3,1812.2z M1645.9,821.4l163.3-96.6l164.1,96.6v192.3l-164.1,96.6V918L1645.9,821.4L1645.9,821.4L1645.9,821.4z M1809.2,1578l0.9-330l163.3-96.6v524l-444.5,260.7v-193.2L1809.2,1578L1809.2,1578L1809.2,1578z"}),e.jsx("polygon",{points:"1692.1,1509.6 1528.8,1605.3 1528.8,1413 1692.1,1316.4 1692.1,1509.6"}),e.jsx("path",{d:"M1692.1,986.4l0.9,193.2l-281.2,165v330.8l-163.3,95.7l-163.3-95.7v-330.8l-281.2-165V986.4L968,889.8l279.5,165.8l281.2-165.8l164.1,96.6H1692.1L1692.1,986.4z M803.9,656.5l443.7-261.6l444.5,261.6l-163.3,96.6l-281.2-165.8L967.2,753.1L803.9,656.5L803.9,656.5z"})]})]})}function Un({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"#6C00F6"}),e.jsx("path",{fill:"#fff",transform:"translate(5.5 6.15) scale(0.0731)",d:"M66.8,54.7l-16.7-9.7L0,74.1v58l50.1,29l50.1-29V41.9L128,25.8l27.8,16.1v32.2L128,90.2l-16.7-9.7v25.8l16.7,9.7l50.1-29V29L128,0L77.9,29v90.2l-27.8,16.1l-27.8-16.1V86.9l27.8-16.1l16.7,9.7V54.7z"})]})}function qn({size:t=18}){return e.jsxs("svg",{width:t,height:t,viewBox:"0 0 32 32","aria-hidden":"true",children:[e.jsx("circle",{cx:"16",cy:"16",r:"16",fill:"#627EEA"}),e.jsxs("g",{fill:"#fff",fillRule:"nonzero",children:[e.jsx("path",{fillOpacity:"0.602",d:"M16.498 4v8.87l7.497 3.35z"}),e.jsx("path",{d:"M16.498 4L9 16.22l7.498-3.35z"}),e.jsx("path",{fillOpacity:"0.602",d:"M16.498 21.968v6.027L24 17.616z"}),e.jsx("path",{d:"M16.498 27.995v-6.028L9 17.616z"}),e.jsx("path",{fillOpacity:"0.2",d:"M16.498 20.573l7.497-4.353-7.497-3.348z"}),e.jsx("path",{fillOpacity:"0.602",d:"M9 16.22l7.498 4.353v-7.701z"})]})]})}const On=6e4;function Vn(t,i,o=document){let n,r=!1,s=!1;const a=m=>{r||(s=m==="active",i.wallet.watch(t,m).catch(p=>{$t(p)&&p.status===409&&(r=!0)}))},c=()=>{clearInterval(n),a("active"),n=setInterval(()=>a("active"),On)},l=()=>{clearInterval(n),s&&a("background")},f=()=>o.visibilityState==="hidden"?l():c();return o.visibilityState!=="hidden"&&c(),o.addEventListener("visibilitychange",f),()=>{o.removeEventListener("visibilitychange",f),l(),r=!0}}function Hn(t){L.useEffect(()=>Vn(t,K),[t])}const fe=3e4;function Wn(t,i=fe,{minIntervalMs:o=fe,doc:n=document}={}){const r=Math.max(i,o);let s;const a=()=>{clearInterval(s),s=setInterval(t,r)},c=()=>{n.visibilityState==="hidden"?(clearInterval(s),s=void 0):(t(),a())};return n.visibilityState!=="hidden"&&a(),n.addEventListener("visibilitychange",c),()=>{clearInterval(s),n.removeEventListener("visibilitychange",c)}}function Kn(t,i=fe,o=fe){const n=ge(),r=JSON.stringify(t);L.useEffect(()=>Wn(()=>void n.invalidateQueries({queryKey:JSON.parse(r)}),i,{minIntervalMs:o}),[r,i,o,n])}var ee={},Ne,ot;function Jn(){return ot||(ot=1,Ne=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Ne}var Ae={},J={},at;function $(){if(at)return J;at=1;let t;const i=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return J.getSymbolSize=function(n){if(!n)throw new Error('"version" cannot be null or undefined');if(n<1||n>40)throw new Error('"version" should be in range from 1 to 40');return n*4+17},J.getSymbolTotalCodewords=function(n){return i[n]},J.getBCHDigit=function(o){let n=0;for(;o!==0;)n++,o>>>=1;return n},J.setToSJISFunction=function(n){if(typeof n!="function")throw new Error('"toSJISFunc" is not a valid function.');t=n},J.isKanjiModeEnabled=function(){return typeof t<"u"},J.toSJIS=function(n){return t(n)},J}var Ee={},lt;function Xe(){return lt||(lt=1,(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function i(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+o)}}t.isValid=function(n){return n&&typeof n.bit<"u"&&n.bit>=0&&n.bit<4},t.from=function(n,r){if(t.isValid(n))return n;try{return i(n)}catch{return r}}})(Ee)),Ee}var Se,ct;function Gn(){if(ct)return Se;ct=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(i){const o=Math.floor(i/8);return(this.buffer[o]>>>7-i%8&1)===1},put:function(i,o){for(let n=0;n<o;n++)this.putBit((i>>>o-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(i){const o=Math.floor(this.length/8);this.buffer.length<=o&&this.buffer.push(0),i&&(this.buffer[o]|=128>>>this.length%8),this.length++}},Se=t,Se}var Be,dt;function Qn(){if(dt)return Be;dt=1;function t(i){if(!i||i<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=i,this.data=new Uint8Array(i*i),this.reservedBit=new Uint8Array(i*i)}return t.prototype.set=function(i,o,n,r){const s=i*this.size+o;this.data[s]=n,r&&(this.reservedBit[s]=!0)},t.prototype.get=function(i,o){return this.data[i*this.size+o]},t.prototype.xor=function(i,o,n){this.data[i*this.size+o]^=n},t.prototype.isReserved=function(i,o){return this.reservedBit[i*this.size+o]},Be=t,Be}var Me={},ut;function Yn(){return ut||(ut=1,(function(t){const i=$().getSymbolSize;t.getRowColCoords=function(n){if(n===1)return[];const r=Math.floor(n/7)+2,s=i(n),a=s===145?26:Math.ceil((s-13)/(2*r-2))*2,c=[s-7];for(let l=1;l<r-1;l++)c[l]=c[l-1]-a;return c.push(6),c.reverse()},t.getPositions=function(n){const r=[],s=t.getRowColCoords(n),a=s.length;for(let c=0;c<a;c++)for(let l=0;l<a;l++)c===0&&l===0||c===0&&l===a-1||c===a-1&&l===0||r.push([s[c],s[l]]);return r}})(Me)),Me}var ke={},ht;function $n(){if(ht)return ke;ht=1;const t=$().getSymbolSize,i=7;return ke.getPositions=function(n){const r=t(n);return[[0,0],[r-i,0],[0,r-i]]},ke}var Le={},ft;function Zn(){return ft||(ft=1,(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const i={N1:3,N2:3,N3:40,N4:10};t.isValid=function(r){return r!=null&&r!==""&&!isNaN(r)&&r>=0&&r<=7},t.from=function(r){return t.isValid(r)?parseInt(r,10):void 0},t.getPenaltyN1=function(r){const s=r.size;let a=0,c=0,l=0,f=null,m=null;for(let p=0;p<s;p++){c=l=0,f=m=null;for(let g=0;g<s;g++){let d=r.get(p,g);d===f?c++:(c>=5&&(a+=i.N1+(c-5)),f=d,c=1),d=r.get(g,p),d===m?l++:(l>=5&&(a+=i.N1+(l-5)),m=d,l=1)}c>=5&&(a+=i.N1+(c-5)),l>=5&&(a+=i.N1+(l-5))}return a},t.getPenaltyN2=function(r){const s=r.size;let a=0;for(let c=0;c<s-1;c++)for(let l=0;l<s-1;l++){const f=r.get(c,l)+r.get(c,l+1)+r.get(c+1,l)+r.get(c+1,l+1);(f===4||f===0)&&a++}return a*i.N2},t.getPenaltyN3=function(r){const s=r.size;let a=0,c=0,l=0;for(let f=0;f<s;f++){c=l=0;for(let m=0;m<s;m++)c=c<<1&2047|r.get(f,m),m>=10&&(c===1488||c===93)&&a++,l=l<<1&2047|r.get(m,f),m>=10&&(l===1488||l===93)&&a++}return a*i.N3},t.getPenaltyN4=function(r){let s=0;const a=r.data.length;for(let l=0;l<a;l++)s+=r.data[l];return Math.abs(Math.ceil(s*100/a/5)-10)*i.N4};function o(n,r,s){switch(n){case t.Patterns.PATTERN000:return(r+s)%2===0;case t.Patterns.PATTERN001:return r%2===0;case t.Patterns.PATTERN010:return s%3===0;case t.Patterns.PATTERN011:return(r+s)%3===0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(s/3))%2===0;case t.Patterns.PATTERN101:return r*s%2+r*s%3===0;case t.Patterns.PATTERN110:return(r*s%2+r*s%3)%2===0;case t.Patterns.PATTERN111:return(r*s%3+(r+s)%2)%2===0;default:throw new Error("bad maskPattern:"+n)}}t.applyMask=function(r,s){const a=s.size;for(let c=0;c<a;c++)for(let l=0;l<a;l++)s.isReserved(l,c)||s.xor(l,c,o(r,l,c))},t.getBestMask=function(r,s){const a=Object.keys(t.Patterns).length;let c=0,l=1/0;for(let f=0;f<a;f++){s(f),t.applyMask(f,r);const m=t.getPenaltyN1(r)+t.getPenaltyN2(r)+t.getPenaltyN3(r)+t.getPenaltyN4(r);t.applyMask(f,r),m<l&&(l=m,c=f)}return c}})(Le)),Le}var de={},gt;function Ht(){if(gt)return de;gt=1;const t=Xe(),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return de.getBlocksCount=function(r,s){switch(s){case t.L:return i[(r-1)*4+0];case t.M:return i[(r-1)*4+1];case t.Q:return i[(r-1)*4+2];case t.H:return i[(r-1)*4+3];default:return}},de.getTotalCodewordsCount=function(r,s){switch(s){case t.L:return o[(r-1)*4+0];case t.M:return o[(r-1)*4+1];case t.Q:return o[(r-1)*4+2];case t.H:return o[(r-1)*4+3];default:return}},de}var Re={},re={},mt;function Xn(){if(mt)return re;mt=1;const t=new Uint8Array(512),i=new Uint8Array(256);return(function(){let n=1;for(let r=0;r<255;r++)t[r]=n,i[n]=r,n<<=1,n&256&&(n^=285);for(let r=255;r<512;r++)t[r]=t[r-255]})(),re.log=function(n){if(n<1)throw new Error("log("+n+")");return i[n]},re.exp=function(n){return t[n]},re.mul=function(n,r){return n===0||r===0?0:t[i[n]+i[r]]},re}var pt;function er(){return pt||(pt=1,(function(t){const i=Xn();t.mul=function(n,r){const s=new Uint8Array(n.length+r.length-1);for(let a=0;a<n.length;a++)for(let c=0;c<r.length;c++)s[a+c]^=i.mul(n[a],r[c]);return s},t.mod=function(n,r){let s=new Uint8Array(n);for(;s.length-r.length>=0;){const a=s[0];for(let l=0;l<r.length;l++)s[l]^=i.mul(r[l],a);let c=0;for(;c<s.length&&s[c]===0;)c++;s=s.slice(c)}return s},t.generateECPolynomial=function(n){let r=new Uint8Array([1]);for(let s=0;s<n;s++)r=t.mul(r,new Uint8Array([1,i.exp(s)]));return r}})(Re)),Re}var Te,wt;function tr(){if(wt)return Te;wt=1;const t=er();function i(o){this.genPoly=void 0,this.degree=o,this.degree&&this.initialize(this.degree)}return i.prototype.initialize=function(n){this.degree=n,this.genPoly=t.generateECPolynomial(this.degree)},i.prototype.encode=function(n){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(n.length+this.degree);r.set(n);const s=t.mod(r,this.genPoly),a=this.degree-s.length;if(a>0){const c=new Uint8Array(this.degree);return c.set(s,a),c}return s},Te=i,Te}var De={},Pe={},_e={},xt;function Wt(){return xt||(xt=1,_e.isValid=function(i){return!isNaN(i)&&i>=1&&i<=40}),_e}var q={},yt;function Kt(){if(yt)return q;yt=1;const t="[0-9]+",i="[A-Z $%*+\\-./:]+";let o="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";o=o.replace(/u/g,"\\u");const n="(?:(?![A-Z0-9 $%*+\\-./:]|"+o+`)(?:.|[\r
3
+ ]))+`;q.KANJI=new RegExp(o,"g"),q.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),q.BYTE=new RegExp(n,"g"),q.NUMERIC=new RegExp(t,"g"),q.ALPHANUMERIC=new RegExp(i,"g");const r=new RegExp("^"+o+"$"),s=new RegExp("^"+t+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return q.testKanji=function(l){return r.test(l)},q.testNumeric=function(l){return s.test(l)},q.testAlphanumeric=function(l){return a.test(l)},q}var vt;function Z(){return vt||(vt=1,(function(t){const i=Wt(),o=Kt();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(s,a){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!i.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?s.ccBits[0]:a<27?s.ccBits[1]:s.ccBits[2]},t.getBestModeForData=function(s){return o.testNumeric(s)?t.NUMERIC:o.testAlphanumeric(s)?t.ALPHANUMERIC:o.testKanji(s)?t.KANJI:t.BYTE},t.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},t.isValid=function(s){return s&&s.bit&&s.ccBits};function n(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+r)}}t.from=function(s,a){if(t.isValid(s))return s;try{return n(s)}catch{return a}}})(Pe)),Pe}var jt;function nr(){return jt||(jt=1,(function(t){const i=$(),o=Ht(),n=Xe(),r=Z(),s=Wt(),a=7973,c=i.getBCHDigit(a);function l(g,d,B){for(let E=1;E<=40;E++)if(d<=t.getCapacity(E,B,g))return E}function f(g,d){return r.getCharCountIndicator(g,d)+4}function m(g,d){let B=0;return g.forEach(function(E){const R=f(E.mode,d);B+=R+E.getBitsLength()}),B}function p(g,d){for(let B=1;B<=40;B++)if(m(g,B)<=t.getCapacity(B,d,r.MIXED))return B}t.from=function(d,B){return s.isValid(d)?parseInt(d,10):B},t.getCapacity=function(d,B,E){if(!s.isValid(d))throw new Error("Invalid QR Code version");typeof E>"u"&&(E=r.BYTE);const R=i.getSymbolTotalCodewords(d),A=o.getTotalCodewordsCount(d,B),y=(R-A)*8;if(E===r.MIXED)return y;const j=y-f(E,d);switch(E){case r.NUMERIC:return Math.floor(j/10*3);case r.ALPHANUMERIC:return Math.floor(j/11*2);case r.KANJI:return Math.floor(j/13);case r.BYTE:default:return Math.floor(j/8)}},t.getBestVersionForData=function(d,B){let E;const R=n.from(B,n.M);if(Array.isArray(d)){if(d.length>1)return p(d,R);if(d.length===0)return 1;E=d[0]}else E=d;return l(E.mode,E.getLength(),R)},t.getEncodedBits=function(d){if(!s.isValid(d)||d<7)throw new Error("Invalid QR Code version");let B=d<<12;for(;i.getBCHDigit(B)-c>=0;)B^=a<<i.getBCHDigit(B)-c;return d<<12|B}})(De)),De}var Ie={},Ct;function rr(){if(Ct)return Ie;Ct=1;const t=$(),i=1335,o=21522,n=t.getBCHDigit(i);return Ie.getEncodedBits=function(s,a){const c=s.bit<<3|a;let l=c<<10;for(;t.getBCHDigit(l)-n>=0;)l^=i<<t.getBCHDigit(l)-n;return(c<<10|l)^o},Ie}var ze={},Fe,bt;function sr(){if(bt)return Fe;bt=1;const t=Z();function i(o){this.mode=t.NUMERIC,this.data=o.toString()}return i.getBitsLength=function(n){return 10*Math.floor(n/3)+(n%3?n%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(n){let r,s,a;for(r=0;r+3<=this.data.length;r+=3)s=this.data.substr(r,3),a=parseInt(s,10),n.put(a,10);const c=this.data.length-r;c>0&&(s=this.data.substr(r),a=parseInt(s,10),n.put(a,c*3+1))},Fe=i,Fe}var Ue,Nt;function ir(){if(Nt)return Ue;Nt=1;const t=Z(),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(n){this.mode=t.ALPHANUMERIC,this.data=n}return o.getBitsLength=function(r){return 11*Math.floor(r/2)+6*(r%2)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(r){let s;for(s=0;s+2<=this.data.length;s+=2){let a=i.indexOf(this.data[s])*45;a+=i.indexOf(this.data[s+1]),r.put(a,11)}this.data.length%2&&r.put(i.indexOf(this.data[s]),6)},Ue=o,Ue}var qe,At;function or(){if(At)return qe;At=1;const t=Z();function i(o){this.mode=t.BYTE,typeof o=="string"?this.data=new TextEncoder().encode(o):this.data=new Uint8Array(o)}return i.getBitsLength=function(n){return n*8},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(o){for(let n=0,r=this.data.length;n<r;n++)o.put(this.data[n],8)},qe=i,qe}var Oe,Et;function ar(){if(Et)return Oe;Et=1;const t=Z(),i=$();function o(n){this.mode=t.KANJI,this.data=n}return o.getBitsLength=function(r){return r*13},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(n){let r;for(r=0;r<this.data.length;r++){let s=i.toSJIS(this.data[r]);if(s>=33088&&s<=40956)s-=33088;else if(s>=57408&&s<=60351)s-=49472;else throw new Error("Invalid SJIS character: "+this.data[r]+`
4
+ Make sure your charset is UTF-8`);s=(s>>>8&255)*192+(s&255),n.put(s,13)}},Oe=o,Oe}var St;function lr(){return St||(St=1,(function(t){const i=Z(),o=sr(),n=ir(),r=or(),s=ar(),a=Kt(),c=$(),l=En();function f(A){return unescape(encodeURIComponent(A)).length}function m(A,y,j){const w=[];let k;for(;(k=A.exec(j))!==null;)w.push({data:k[0],index:k.index,mode:y,length:k[0].length});return w}function p(A){const y=m(a.NUMERIC,i.NUMERIC,A),j=m(a.ALPHANUMERIC,i.ALPHANUMERIC,A);let w,k;return c.isKanjiModeEnabled()?(w=m(a.BYTE,i.BYTE,A),k=m(a.KANJI,i.KANJI,A)):(w=m(a.BYTE_KANJI,i.BYTE,A),k=[]),y.concat(j,w,k).sort(function(h,x){return h.index-x.index}).map(function(h){return{data:h.data,mode:h.mode,length:h.length}})}function g(A,y){switch(y){case i.NUMERIC:return o.getBitsLength(A);case i.ALPHANUMERIC:return n.getBitsLength(A);case i.KANJI:return s.getBitsLength(A);case i.BYTE:return r.getBitsLength(A)}}function d(A){return A.reduce(function(y,j){const w=y.length-1>=0?y[y.length-1]:null;return w&&w.mode===j.mode?(y[y.length-1].data+=j.data,y):(y.push(j),y)},[])}function B(A){const y=[];for(let j=0;j<A.length;j++){const w=A[j];switch(w.mode){case i.NUMERIC:y.push([w,{data:w.data,mode:i.ALPHANUMERIC,length:w.length},{data:w.data,mode:i.BYTE,length:w.length}]);break;case i.ALPHANUMERIC:y.push([w,{data:w.data,mode:i.BYTE,length:w.length}]);break;case i.KANJI:y.push([w,{data:w.data,mode:i.BYTE,length:f(w.data)}]);break;case i.BYTE:y.push([{data:w.data,mode:i.BYTE,length:f(w.data)}])}}return y}function E(A,y){const j={},w={start:{}};let k=["start"];for(let u=0;u<A.length;u++){const h=A[u],x=[];for(let v=0;v<h.length;v++){const S=h[v],C=""+u+v;x.push(C),j[C]={node:S,lastCount:0},w[C]={};for(let N=0;N<k.length;N++){const b=k[N];j[b]&&j[b].node.mode===S.mode?(w[b][C]=g(j[b].lastCount+S.length,S.mode)-g(j[b].lastCount,S.mode),j[b].lastCount+=S.length):(j[b]&&(j[b].lastCount=S.length),w[b][C]=g(S.length,S.mode)+4+i.getCharCountIndicator(S.mode,y))}}k=x}for(let u=0;u<k.length;u++)w[k[u]].end=0;return{map:w,table:j}}function R(A,y){let j;const w=i.getBestModeForData(A);if(j=i.from(y,w),j!==i.BYTE&&j.bit<w.bit)throw new Error('"'+A+'" cannot be encoded with mode '+i.toString(j)+`.
5
+ Suggested mode is: `+i.toString(w));switch(j===i.KANJI&&!c.isKanjiModeEnabled()&&(j=i.BYTE),j){case i.NUMERIC:return new o(A);case i.ALPHANUMERIC:return new n(A);case i.KANJI:return new s(A);case i.BYTE:return new r(A)}}t.fromArray=function(y){return y.reduce(function(j,w){return typeof w=="string"?j.push(R(w,null)):w.data&&j.push(R(w.data,w.mode)),j},[])},t.fromString=function(y,j){const w=p(y,c.isKanjiModeEnabled()),k=B(w),u=E(k,j),h=l.find_path(u.map,"start","end"),x=[];for(let v=1;v<h.length-1;v++)x.push(u.table[h[v]].node);return t.fromArray(d(x))},t.rawSplit=function(y){return t.fromArray(p(y,c.isKanjiModeEnabled()))}})(ze)),ze}var Bt;function cr(){if(Bt)return Ae;Bt=1;const t=$(),i=Xe(),o=Gn(),n=Qn(),r=Yn(),s=$n(),a=Zn(),c=Ht(),l=tr(),f=nr(),m=rr(),p=Z(),g=lr();function d(u,h){const x=u.size,v=s.getPositions(h);for(let S=0;S<v.length;S++){const C=v[S][0],N=v[S][1];for(let b=-1;b<=7;b++)if(!(C+b<=-1||x<=C+b))for(let M=-1;M<=7;M++)N+M<=-1||x<=N+M||(b>=0&&b<=6&&(M===0||M===6)||M>=0&&M<=6&&(b===0||b===6)||b>=2&&b<=4&&M>=2&&M<=4?u.set(C+b,N+M,!0,!0):u.set(C+b,N+M,!1,!0))}}function B(u){const h=u.size;for(let x=8;x<h-8;x++){const v=x%2===0;u.set(x,6,v,!0),u.set(6,x,v,!0)}}function E(u,h){const x=r.getPositions(h);for(let v=0;v<x.length;v++){const S=x[v][0],C=x[v][1];for(let N=-2;N<=2;N++)for(let b=-2;b<=2;b++)N===-2||N===2||b===-2||b===2||N===0&&b===0?u.set(S+N,C+b,!0,!0):u.set(S+N,C+b,!1,!0)}}function R(u,h){const x=u.size,v=f.getEncodedBits(h);let S,C,N;for(let b=0;b<18;b++)S=Math.floor(b/3),C=b%3+x-8-3,N=(v>>b&1)===1,u.set(S,C,N,!0),u.set(C,S,N,!0)}function A(u,h,x){const v=u.size,S=m.getEncodedBits(h,x);let C,N;for(C=0;C<15;C++)N=(S>>C&1)===1,C<6?u.set(C,8,N,!0):C<8?u.set(C+1,8,N,!0):u.set(v-15+C,8,N,!0),C<8?u.set(8,v-C-1,N,!0):C<9?u.set(8,15-C-1+1,N,!0):u.set(8,15-C-1,N,!0);u.set(v-8,8,1,!0)}function y(u,h){const x=u.size;let v=-1,S=x-1,C=7,N=0;for(let b=x-1;b>0;b-=2)for(b===6&&b--;;){for(let M=0;M<2;M++)if(!u.isReserved(S,b-M)){let U=!1;N<h.length&&(U=(h[N]>>>C&1)===1),u.set(S,b-M,U),C--,C===-1&&(N++,C=7)}if(S+=v,S<0||x<=S){S-=v,v=-v;break}}}function j(u,h,x){const v=new o;x.forEach(function(M){v.put(M.mode.bit,4),v.put(M.getLength(),p.getCharCountIndicator(M.mode,u)),M.write(v)});const S=t.getSymbolTotalCodewords(u),C=c.getTotalCodewordsCount(u,h),N=(S-C)*8;for(v.getLengthInBits()+4<=N&&v.put(0,4);v.getLengthInBits()%8!==0;)v.putBit(0);const b=(N-v.getLengthInBits())/8;for(let M=0;M<b;M++)v.put(M%2?17:236,8);return w(v,u,h)}function w(u,h,x){const v=t.getSymbolTotalCodewords(h),S=c.getTotalCodewordsCount(h,x),C=v-S,N=c.getBlocksCount(h,x),b=v%N,M=N-b,U=Math.floor(v/N),Q=Math.floor(C/N),ve=Q+1,ne=U-Q,_=new l(ne);let I=0;const V=new Array(N),et=new Array(N);let je=0;const Yt=new Uint8Array(u.buffer);for(let X=0;X<N;X++){const be=X<M?Q:ve;V[X]=Yt.slice(I,I+be),et[X]=_.encode(V[X]),I+=be,je=Math.max(je,be)}const Ce=new Uint8Array(v);let tt=0,H,W;for(H=0;H<je;H++)for(W=0;W<N;W++)H<V[W].length&&(Ce[tt++]=V[W][H]);for(H=0;H<ne;H++)for(W=0;W<N;W++)Ce[tt++]=et[W][H];return Ce}function k(u,h,x,v){let S;if(Array.isArray(u))S=g.fromArray(u);else if(typeof u=="string"){let U=h;if(!U){const Q=g.rawSplit(u);U=f.getBestVersionForData(Q,x)}S=g.fromString(u,U||40)}else throw new Error("Invalid data");const C=f.getBestVersionForData(S,x);if(!C)throw new Error("The amount of data is too big to be stored in a QR Code");if(!h)h=C;else if(h<C)throw new Error(`
6
+ The chosen QR Code version cannot contain this amount of data.
7
+ Minimum version required to store current data is: `+C+`.
8
+ `);const N=j(h,x,S),b=t.getSymbolSize(h),M=new n(b);return d(M,h),B(M),E(M,h),A(M,x,0),h>=7&&R(M,h),y(M,N),isNaN(v)&&(v=a.getBestMask(M,A.bind(null,M,x))),a.applyMask(v,M),A(M,x,v),{modules:M,version:h,errorCorrectionLevel:x,maskPattern:v,segments:S}}return Ae.create=function(h,x){if(typeof h>"u"||h==="")throw new Error("No input text");let v=i.M,S,C;return typeof x<"u"&&(v=i.from(x.errorCorrectionLevel,i.M),S=f.from(x.version),C=a.from(x.maskPattern),x.toSJISFunc&&t.setToSJISFunction(x.toSJISFunc)),k(h,S,v,C)},Ae}var Ve={},He={},Mt;function Jt(){return Mt||(Mt=1,(function(t){function i(o){if(typeof o=="number"&&(o=o.toString()),typeof o!="string")throw new Error("Color should be defined as hex string");let n=o.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+o);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(s){return[s,s]}))),n.length===6&&n.push("F","F");const r=parseInt(n.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+n.slice(0,6).join("")}}t.getOptions=function(n){n||(n={}),n.color||(n.color={});const r=typeof n.margin>"u"||n.margin===null||n.margin<0?4:n.margin,s=n.width&&n.width>=21?n.width:void 0,a=n.scale||4;return{width:s,scale:s?4:a,margin:r,color:{dark:i(n.color.dark||"#000000ff"),light:i(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},t.getScale=function(n,r){return r.width&&r.width>=n+r.margin*2?r.width/(n+r.margin*2):r.scale},t.getImageWidth=function(n,r){const s=t.getScale(n,r);return Math.floor((n+r.margin*2)*s)},t.qrToImageData=function(n,r,s){const a=r.modules.size,c=r.modules.data,l=t.getScale(a,s),f=Math.floor((a+s.margin*2)*l),m=s.margin*l,p=[s.color.light,s.color.dark];for(let g=0;g<f;g++)for(let d=0;d<f;d++){let B=(g*f+d)*4,E=s.color.light;if(g>=m&&d>=m&&g<f-m&&d<f-m){const R=Math.floor((g-m)/l),A=Math.floor((d-m)/l);E=p[c[R*a+A]?1:0]}n[B++]=E.r,n[B++]=E.g,n[B++]=E.b,n[B]=E.a}}})(He)),He}var kt;function dr(){return kt||(kt=1,(function(t){const i=Jt();function o(r,s,a){r.clearRect(0,0,s.width,s.height),s.style||(s.style={}),s.height=a,s.width=a,s.style.height=a+"px",s.style.width=a+"px"}function n(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(s,a,c){let l=c,f=a;typeof l>"u"&&(!a||!a.getContext)&&(l=a,a=void 0),a||(f=n()),l=i.getOptions(l);const m=i.getImageWidth(s.modules.size,l),p=f.getContext("2d"),g=p.createImageData(m,m);return i.qrToImageData(g.data,s,l),o(p,f,m),p.putImageData(g,0,0),f},t.renderToDataURL=function(s,a,c){let l=c;typeof l>"u"&&(!a||!a.getContext)&&(l=a,a=void 0),l||(l={});const f=t.render(s,a,l),m=l.type||"image/png",p=l.rendererOpts||{};return f.toDataURL(m,p.quality)}})(Ve)),Ve}var We={},Lt;function ur(){if(Lt)return We;Lt=1;const t=Jt();function i(r,s){const a=r.a/255,c=s+'="'+r.hex+'"';return a<1?c+" "+s+'-opacity="'+a.toFixed(2).slice(1)+'"':c}function o(r,s,a){let c=r+s;return typeof a<"u"&&(c+=" "+a),c}function n(r,s,a){let c="",l=0,f=!1,m=0;for(let p=0;p<r.length;p++){const g=Math.floor(p%s),d=Math.floor(p/s);!g&&!f&&(f=!0),r[p]?(m++,p>0&&g>0&&r[p-1]||(c+=f?o("M",g+a,.5+d+a):o("m",l,0),l=0,f=!1),g+1<s&&r[p+1]||(c+=o("h",m),m=0)):l++}return c}return We.render=function(s,a,c){const l=t.getOptions(a),f=s.modules.size,m=s.modules.data,p=f+l.margin*2,g=l.color.light.a?"<path "+i(l.color.light,"fill")+' d="M0 0h'+p+"v"+p+'H0z"/>':"",d="<path "+i(l.color.dark,"stroke")+' d="'+n(m,f,l.margin)+'"/>',B='viewBox="0 0 '+p+" "+p+'"',R='<svg xmlns="http://www.w3.org/2000/svg" '+(l.width?'width="'+l.width+'" height="'+l.width+'" ':"")+B+' shape-rendering="crispEdges">'+g+d+`</svg>
9
+ `;return typeof c=="function"&&c(null,R),R},We}var Rt;function hr(){if(Rt)return ee;Rt=1;const t=Jn(),i=cr(),o=dr(),n=ur();function r(s,a,c,l,f){const m=[].slice.call(arguments,1),p=m.length,g=typeof m[p-1]=="function";if(!g&&!t())throw new Error("Callback required as last argument");if(g){if(p<2)throw new Error("Too few arguments provided");p===2?(f=c,c=a,a=l=void 0):p===3&&(a.getContext&&typeof f>"u"?(f=l,l=void 0):(f=l,l=c,c=a,a=void 0))}else{if(p<1)throw new Error("Too few arguments provided");return p===1?(c=a,a=l=void 0):p===2&&!a.getContext&&(l=c,c=a,a=void 0),new Promise(function(d,B){try{const E=i.create(c,l);d(s(E,a,l))}catch(E){B(E)}})}try{const d=i.create(c,l);f(null,s(d,a,l))}catch(d){f(d)}}return ee.create=i.create,ee.toCanvas=r.bind(null,o.render),ee.toDataURL=r.bind(null,o.renderToDataURL),ee.toString=r.bind(null,function(s,a,c){return n.render(s,c)}),ee}var fr=hr();const gr=Zt(fr),mr="M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.72532 0 0.578514 4.81465 0.0491943 10.9512H15.8916V13.0488H0.0491943C0.578514 19.1853 5.72532 24 12 24Z";function Ke(t,i,o,n,r){return`M${t+r},${i} h${o-2*r} a${r},${r} 0 0 1 ${r},${r} v${n-2*r} a${r},${r} 0 0 1 ${-r},${r} h${-(o-2*r)} a${r},${r} 0 0 1 ${-r},${-r} v${-(n-2*r)} a${r},${r} 0 0 1 ${r},${-r} z`}function pr(t,i){return[Ke(t,i,7,7,2.2)+" "+Ke(t+1,i+1,5,5,1.6),Ke(t+2,i+2,3,3,1.05)]}function wr({text:t,label:i}){const o=L.useMemo(()=>{try{const g=gr.create(t,{errorCorrectionLevel:"Q"});return{size:g.modules.size,data:g.modules.data}}catch{return null}},[t]);if(!o)return e.jsx("div",{className:"gc-qr gc-qr--placeholder","aria-hidden":"true"});const{size:n,data:r}=o,s=n/2,a=n*.11,c=a+.6,l=a*.82,f=(g,d)=>g<7&&d<7||g<7&&d>=n-7||g>=n-7&&d<7,m=(g,d)=>Math.hypot(g+.5-s,d+.5-s)<c,p=[];for(let g=0;g<n;g++)for(let d=0;d<n;d++)r[g*n+d]&&(f(g,d)||m(g,d)||p.push(e.jsx("circle",{cx:d+.5,cy:g+.5,r:.34},`${g}-${d}`)));return e.jsxs("svg",{className:"gc-qr",viewBox:`0 0 ${n} ${n}`,role:"img","aria-label":i,children:[e.jsxs("g",{fill:"currentColor",children:[p,[[0,0],[n-7,0],[0,n-7]].map(([g,d])=>{const[B,E]=pr(g,d);return e.jsxs("g",{children:[e.jsx("path",{d:B,fillRule:"evenodd"}),e.jsx("path",{d:E})]},`${g}-${d}`)})]}),e.jsx("circle",{cx:s,cy:s,r:a,className:"gc-qr__badge"}),e.jsx("circle",{cx:s,cy:s,r:l,fill:"#fff"}),e.jsx("path",{d:mr,fill:"#0052FF",transform:`translate(${s-l}, ${s-l}) scale(${l*2/24})`})]})}const xr=L.lazy(()=>pe(()=>import("./WalletFunding-CsUmR_iR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))),yr=["5","10","25"],Tt=200,vr="https://antseed.mrdn.finance/";function jr(){const t=window.open("about:blank","_blank");return t&&(t.opener=null),t}function Cr(t,i){if(t.mode==="off")return{tone:"error",text:t.status==="buyer-unreachable"?"The buyer is not reachable, so deposits are not watched right now.":"This wallet is not watched for deposits right now; USDC sent to it is credited once the buyer watches it again."};const o=t.event&&t.event.seq>i?t.event:null;if(!o||o.phase==="deferred")return{tone:"idle",text:"Waiting for USDC on Base…"};const n=o.amount?D(o.amount):"USDC";return o.phase==="received"?{tone:"busy",text:`Received ${n}, preparing the deposit…`}:o.phase==="sweeping"?{tone:"busy",text:`Depositing ${n} to the credits…`}:o.phase==="credited"?{tone:"done",text:`${n} added to the balance`}:{tone:"error",text:o.error??"The deposit failed. USDC stays in the workspace wallet and is retried."}}function Dt({line:t}){return e.jsxs("div",{className:`gc-depwatch gc-depwatch--${t.tone}`,role:"status",children:[t.tone==="done"?e.jsx(P.check,{size:15}):e.jsx("span",{className:"gc-depwatch__dot","aria-hidden":"true"}),t.text]})}function Pt({amount:t,setAmount:i,firstDeposit:o}){return e.jsxs("div",{className:"gc-fund-amount",children:[e.jsx("span",{className:"gc-fund-amount__label",children:"Amount to add"}),e.jsxs("div",{className:"gc-fund-amount__row",children:[yr.map(n=>e.jsxs("button",{type:"button",className:t===n?"gc-preset gc-preset--on":"gc-preset","aria-pressed":t===n,onClick:()=>i(n),children:["$",n]},n)),e.jsxs("label",{className:"gc-fund-amount__input",children:[e.jsx("span",{"aria-hidden":"true",children:"$"}),e.jsx("input",{type:"text",inputMode:"decimal",value:t,"aria-label":"Amount in USD",onChange:n=>i(n.target.value.replace(/[^0-9.]/g,""))})]})]}),e.jsxs("span",{className:"gc-fineprint",children:["1 credit = 1 USDC",o?" · The first deposit must be at least $1":""]})]})}function Je({icon:t,title:i,caption:o,badges:n,onClick:r,arrow:s}){return e.jsxs("button",{type:"button",className:"gc-method",onClick:r,children:[e.jsx("span",{className:"gc-method__icon",children:t}),e.jsxs("span",{className:"gc-method__text",children:[e.jsx("span",{className:"gc-method__title",children:i}),e.jsx("span",{className:"gc-method__caption",children:o})]}),e.jsx("span",{className:"gc-method__badges","aria-hidden":"true",children:n}),s?e.jsx(P.right,{size:16,className:"gc-method__arrow"}):e.jsx(P.external,{size:14,className:"gc-method__arrow"})]})}function br({wallet:t,chain:i,workspaceId:o}){var ne;const[n,r]=L.useState("choose"),[s,a]=L.useState("10"),[c,l]=L.useState(!1),[f,m]=L.useState(null),[p,g]=L.useState(null),d=ge(),B=ie(),E=_t(o);Hn(o);const R=L.useRef(((ne=t.deposit.event)==null?void 0:ne.seq)??0),A=t.deposit.event!==null&&t.deposit.event.seq>R.current&&(t.deposit.event.phase==="received"||t.deposit.event.phase==="sweeping");Kn(F.wallet(o),A?4e3:8e3,4e3);const[y,j]=L.useState(null),w=t.deposit.event,k=w&&w.seq>R.current&&w.phase==="credited"?w:null;L.useEffect(()=>{k&&(B(`${k.amount?D(k.amount):"Your deposit"} added to the balance`),j(null),d.invalidateQueries({queryKey:["channels",o]}))},[k==null?void 0:k.seq]);const u=Number(s),h=Number.isFinite(u)&&u>=1,x=Y(t.available)+Y(t.reserved),v=Math.max(0,x-(E.data?It(E.data):0))+Y(t.walletUsdc),S=x===0,C=Xt(i,"usdc"),N=Cr(t.deposit,R.current),b=k!=null&&k.txHash?en(i,k.txHash):null;async function M(_){if(!h){m("Enter an amount of at least $1.");return}if(u>Tt){m(`Card deposits are limited to $${Tt}. Send more as USDC instead.`);return}g(_),m(null);try{const{url:I}=await K.wallet.cardLink(o,u,_),V=URL.canParse(I)?new URL(I).origin:null;if(!(V!=null&&V.startsWith("https://")))throw new Error("The gateway returned an invalid checkout link.");j({url:I,origin:V,provider:_})}catch(I){m(oe(I))}finally{g(null)}}function U(){const _=jr(),I=`${vr}?buyer=${encodeURIComponent(t.address)}`;_?_.location.replace(I):window.location.href=I}const Q=e.jsxs("div",{className:"gc-fund-balance",children:[e.jsx("span",{className:"gc-fund-balance__label",children:"Workspace balance"}),e.jsx("span",{className:"gc-fund-balance__value",children:D(v)}),e.jsxs("span",{className:"gc-fineprint",children:[D(t.available)," available · ",D(t.reserved)," reserved",Y(t.walletUsdc)>0?` · ${D(t.walletUsdc)} in the wallet`:""]})]});if(n==="wallet")return e.jsxs("div",{className:"gc-fund",children:[e.jsx(T,{variant:"link",size:"sm",leadingIcon:e.jsx(P.left,{size:14}),onClick:()=>r("crypto"),children:"Back"}),e.jsx(ye,{chain:i,children:_=>e.jsx(L.Suspense,{fallback:e.jsx(me,{rows:2}),children:e.jsx(xr,{action:"deposit",workspaceId:o,wallet:t,chain:_,onDone:()=>{B("Deposit confirmed"),d.invalidateQueries({queryKey:F.wallet(o)})}})})})]});if(n==="crypto")return e.jsxs("div",{className:"gc-fund",children:[e.jsx(T,{variant:"link",size:"sm",leadingIcon:e.jsx(P.left,{size:14}),onClick:()=>r("choose"),children:"All options"}),e.jsx(Pt,{amount:s,setAmount:a,firstDeposit:S}),e.jsxs("div",{className:"gc-fund-pay",children:[C&&i?e.jsx(wr,{text:An({usdcAddress:C,chainId:i.chainId,address:t.address},h?s:""),label:`Scan to send USDC on ${i.name} to this workspace's wallet`}):e.jsx("div",{className:"gc-qr gc-qr--placeholder","aria-hidden":"true"}),e.jsxs("div",{className:"gc-fund-pay__address",children:[e.jsx("code",{className:"gc-mono",title:t.address,children:O(t.address)}),e.jsx(Qe,{iconOnly:!0,value:t.address,label:"Copy address"})]}),e.jsx(Dt,{line:N}),e.jsx("span",{className:"gc-fineprint",children:"Credits update automatically · a small fixed relay fee is deducted"}),b&&e.jsx("a",{className:"gc-link gc-fineprint",href:b,target:"_blank",rel:"noopener noreferrer",children:"View transaction"}),e.jsxs("div",{className:"gc-fund-pay__warn",children:["Only send USDC on ",e.jsx("strong",{children:(i==null?void 0:i.name)??"Base"}),". Other tokens or networks are not deposited."]})]}),e.jsx(T,{variant:"link",size:"sm",trailingIcon:e.jsx(P.right,{size:14}),onClick:()=>r("wallet"),children:"No wallet on your phone? Pay from a connected wallet instead"})]});const ve=e.jsx(G,{isOpen:y!==null,onClose:()=>j(null),size:"md",title:"Secure checkout",bodyClassName:"gc-checkout",subtitle:y&&e.jsxs(e.Fragment,{children:[y.provider==="stripe"?"Card checkout by Outerfound, powered by Stripe (US only).":"Card checkout by Crossmint."," Closes by itself once the funds arrive."," ",e.jsx("a",{className:"gc-link",href:y.url,target:"_blank",rel:"noopener noreferrer",onClick:()=>j(null),children:"Open in a new tab"})]}),children:y&&e.jsx("iframe",{className:"gc-checkout__frame",src:y.url,title:"Antseed Pay checkout",allow:`payment ${y.origin}; clipboard-write`})});return e.jsxs("div",{className:"gc-fund",children:[ve,Q,e.jsx(Pt,{amount:s,setAmount:a,firstDeposit:S}),e.jsxs("button",{type:"button",className:"gc-method gc-method--primary",disabled:p!==null,onClick:()=>void M("crossmint"),children:[e.jsxs("span",{className:"gc-method__text",children:[e.jsx("span",{className:"gc-method__title",children:p==="crossmint"?"Opening checkout…":`Deposit${h?` ${D(u)}`:""} by card`}),e.jsx("span",{className:"gc-method__caption",children:"Powered by Crossmint"})]}),e.jsxs("span",{className:"gc-method__badges","aria-hidden":"true",children:[e.jsx(st,{}),e.jsx(Tn,{}),e.jsx(Dn,{}),e.jsx(it,{})]})]}),e.jsxs("div",{className:"gc-fund-group",children:[e.jsx(Je,{icon:e.jsx(Ln,{size:22}),title:"Quick deposit",caption:`USDC on ${(i==null?void 0:i.name)??"Base"}`,arrow:!0,onClick:()=>r("crypto"),badges:e.jsxs(e.Fragment,{children:[e.jsx(kn,{}),e.jsx("span",{className:"gc-fund-chip",children:e.jsx(P.qr,{size:12})})]})}),e.jsx("span",{className:"gc-fineprint",children:"* Deposited to the credits by the Antseed relayer network"})]}),f&&e.jsx(se,{tone:"danger",children:f}),e.jsxs("button",{type:"button",className:"gc-fund-more","aria-expanded":c,onClick:()=>l(_=>!_),children:["More options ",e.jsx(P.down,{size:16,className:c?"gc-fund-more__chevron gc-fund-more__chevron--open":"gc-fund-more__chevron"})]}),c&&e.jsxs("div",{className:"gc-fund-options",children:[e.jsx(Je,{icon:e.jsx(In,{}),title:"Deposit using Meridian",caption:"USDC from any chain",onClick:U,badges:e.jsxs(e.Fragment,{children:[e.jsx(qn,{}),e.jsx(zn,{}),e.jsx(Fn,{}),e.jsx(Un,{})]})}),e.jsx(Je,{icon:e.jsx(_n,{size:20}),title:p==="stripe"?"Opening checkout…":"Deposit using Outerfound",caption:"Card · US only",onClick:()=>void M("stripe"),badges:e.jsxs(e.Fragment,{children:[e.jsx(it,{}),e.jsx(st,{}),e.jsx(Pn,{})]})})]}),e.jsx(Dt,{line:N}),e.jsxs("div",{className:"gc-fund-trust",children:[e.jsxs("span",{children:[e.jsx(P.lock,{size:12})," Encrypted & secure · Non-custodial escrow on ",(i==null?void 0:i.name)??"Base"]}),e.jsxs("span",{children:[e.jsx(P.check,{size:12})," Pay per request · No subscriptions, no lock-in"]})]}),e.jsx("p",{className:"gc-fineprint gc-fund-fine",children:"Card checkout opens here and closes itself once the funds arrive. It is not available in every region."})]})}const Ge=t=>`wallet/deposits/${t}`;function ue(t){const i=Number(t);return`${i!==0&&Math.abs(i)<.01?i.toFixed(6).replace(/0+$/,""):i.toFixed(2)} USDC`}function Nr(t){if(t.kind==="direct")return t.sources[0]?`Wallet ${O(t.sources[0].from)}`:"Connected wallet";if(t.sources.length===0)return"Sent to the workspace wallet";if(t.sources.every(o=>o.minted))return"Card purchase";const i=[...new Set(t.sources.filter(o=>!o.minted).map(o=>O(o.from)))];return i.length===1?`Wallet ${i[0]}`:`${i.length} transfers`}function Gt(t){return Ut({queryKey:F.deposits(t),queryFn:()=>K.wallet.deposits(t)})}function Qt({deposit:t,workspaceId:i,onClose:o}){const[n,r]=L.useState(""),s=we({mutationFn:()=>K.wallet.approveDeposit(i,t.txHash,n.trim()||null),invalidate:[F.deposits(i)],toast:"Deposit approved",onSuccess:()=>{r(""),o()}});return e.jsx(G,{isOpen:t!==null,onClose:o,size:"sm",title:"Approve this deposit",subtitle:t?`${D(t.sent)} on ${he(t.time)}. Your name and the time are recorded on its confirmation.`:void 0,children:e.jsxs("div",{className:"gc-stack",children:[e.jsx(qt,{label:"Note (optional)",placeholder:"e.g. PO 1042, October AI budget",value:n,onChange:a=>r(a.target.value),maxLength:500}),s.error?e.jsx("p",{className:"gc-warn",children:oe(s.error)}):null,e.jsxs("div",{className:"gc-actions",children:[e.jsx(T,{variant:"ghost",onClick:o,children:"Cancel"}),e.jsx(T,{onClick:()=>s.mutate(),disabled:s.isPending,children:"Approve"})]})]})})}function Ar({isOpen:t,workspaceId:i,onClose:o}){const[n,r]=L.useState(""),s=we({mutationFn:()=>K.wallet.addDeposit(i,n.trim()),invalidate:[F.deposits(i)],toast:"Deposit added",onSuccess:()=>{r(""),o()}});return e.jsx(G,{isOpen:t,onClose:o,size:"sm",title:"Add a past deposit",subtitle:"Deposits are listed as they arrive. For one made before this list existed, paste the transaction that credited it: the sweep, or your deposit from a connected wallet.",children:e.jsxs("div",{className:"gc-stack",children:[e.jsx(qt,{label:"Transaction hash",placeholder:"0x…",value:n,onChange:a=>r(a.target.value),spellCheck:!1}),s.error?e.jsx("p",{className:"gc-warn",children:oe(s.error)}):null,e.jsxs("div",{className:"gc-actions",children:[e.jsx(T,{variant:"ghost",onClick:o,children:"Cancel"}),e.jsx(T,{onClick:()=>s.mutate(),disabled:s.isPending||!n.trim(),children:s.isPending?"Checking the chain…":"Add deposit"})]})]})})}function Er({workspaceId:t}){const i=Gt(t),[o,n]=L.useState(null),[r,s]=L.useState(!1),a=we({mutationFn:c=>K.wallet.unapproveDeposit(t,c.txHash),invalidate:[F.deposits(t)],toast:"Approval removed"});return e.jsxs("section",{id:"gc-deposits",className:"gc-anchor",children:[e.jsx(xe,{flush:!0,title:"Deposits",description:"USDC credited to this workspace. Approve a deposit to record it as an expense, and keep its confirmation for your books.",actions:e.jsx(T,{size:"sm",variant:"outline",onClick:()=>s(!0),children:"Add a past deposit"}),children:e.jsx(le,{query:i,children:c=>e.jsx(Vt,{label:"Deposits",rows:c,rowKey:l=>l.txHash,rowLabel:l=>`deposit of ${D(l.sent)} on ${he(l.time)}`,actions:l=>[{label:"View confirmation",onSelect:()=>Ft(Ge(l.txHash))},!l.approval&&{label:"Approve…",onSelect:()=>n(l)},l.approval&&{label:"Remove approval",onSelect:()=>a.mutate(l)}],empty:e.jsx(Ye,{icon:e.jsx(P.wallet,{size:18}),title:"No deposits yet",body:"Deposits show up here once they are credited. Add an earlier one by its transaction."}),columns:[{key:"date",header:"Date",render:l=>he(l.time)},{key:"amount",header:"Amount",align:"right",render:l=>e.jsx("a",{className:"gc-link",href:sn(Ge(l.txHash)),onClick:rn(Ge(l.txHash)),children:D(l.sent)})},{key:"from",header:"From",secondary:!0,render:l=>Nr(l)},{key:"approval",header:"Approval",render:l=>l.approval?e.jsxs("span",{title:l.approval.note??void 0,children:[e.jsx($e,{tone:"success",children:"Approved"})," ",e.jsxs("span",{className:"gc-muted",children:["by ",l.approval.by.replace(/ \(.*\)$/,"")]})]}):e.jsx(T,{size:"sm",variant:"outline",onClick:()=>n(l),children:"Approve"})}]})})}),e.jsx(Qt,{deposit:o,workspaceId:t,onClose:()=>n(null)}),e.jsx(Ar,{isOpen:r,workspaceId:t,onClose:()=>s(!1)})]})}function z({label:t,children:i}){return e.jsxs("div",{className:"gc-doc__row",children:[e.jsx("dt",{children:t}),e.jsx("dd",{children:i})]})}function Sr({txHash:t}){var m,p;const{workspace:i}=zt(),o=Gt(i.id),n=ae(),r=tn(),[s,a]=L.useState(null),c=((m=n.data)==null?void 0:m.explorerUrl)??null,l=g=>c?e.jsx("a",{className:"gc-link",href:`${c.replace(/\/$/,"")}/tx/${g}`,target:"_blank",rel:"noreferrer",children:e.jsx(te,{children:g})}):e.jsx(te,{children:g}),f=((p=r.data)==null?void 0:p.publicUrl)??window.location.origin;return e.jsxs("div",{className:"gc-page",children:[e.jsx("div",{className:"gc-inline gc-no-print",children:e.jsx(T,{variant:"ghost",size:"sm",leadingIcon:e.jsx(P.left,{size:14}),onClick:()=>Ft("wallet"),children:"Wallet & Funding"})}),e.jsx(le,{query:o,children:g=>{var B,E;const d=g.find(R=>R.txHash===t.toLowerCase());return d?e.jsxs(e.Fragment,{children:[e.jsxs("article",{className:"gc-doc","aria-label":"Deposit confirmation",children:[e.jsxs("header",{className:"gc-doc__head",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"gc-doc__title",children:"Deposit confirmation"}),e.jsx("p",{className:"gc-doc__ref",children:d.reference})]}),e.jsx(nn,{})]}),e.jsxs("dl",{className:"gc-doc__rows",children:[e.jsx(z,{label:"Workspace",children:d.workspaceName}),e.jsx(z,{label:"Gateway",children:f.replace(/^https?:\/\//,"")}),e.jsx(z,{label:"Date",children:new Date(d.time).toUTCString().replace("GMT","UTC")}),e.jsx(z,{label:"Amount sent",children:ue(d.sent)}),d.kind==="relay"&&e.jsx(z,{label:"Relay fee",children:ue(d.fee)}),e.jsx(z,{label:"Credited to the balance",children:ue(d.credited)}),e.jsxs(z,{label:"Network",children:[((B=n.data)==null?void 0:B.name)??"Base"," · USDC"]}),e.jsx(z,{label:"Workspace wallet",children:e.jsx(te,{children:d.wallet})}),e.jsx(z,{label:"Deposit transaction",children:l(d.txHash)}),e.jsx(z,{label:"Funded from",children:d.sources.length===0?e.jsx("span",{className:"gc-muted",children:"Not found on-chain within the half hour before the deposit."}):e.jsx("ul",{className:"gc-doc__sources",children:d.sources.map(R=>e.jsxs("li",{children:[ue(R.amount)," ",R.minted?"minted into the wallet by the USDC issuer (a card purchase)":e.jsxs(e.Fragment,{children:["from ",e.jsx(te,{children:R.from})]}),e.jsx("br",{}),l(R.txHash)]},R.txHash))})}),e.jsx(z,{label:"Approval",children:d.approval?e.jsxs(e.Fragment,{children:["Approved by ",d.approval.by," on ",new Date(d.approval.at).toUTCString().replace("GMT","UTC"),d.approval.note?e.jsxs(e.Fragment,{children:[e.jsx("br",{}),"Note: ",d.approval.note]}):null]}):e.jsx("span",{className:"gc-muted",children:"Not approved yet"})})]}),e.jsxs("footer",{className:"gc-doc__foot",children:["Issued by this Antseed gateway from the transaction records on ",((E=n.data)==null?void 0:E.name)??"Base",", which anyone can check with the links above. The amount moved into the workspace's prepaid credits, which pay AI providers per request. This is a confirmation of the deposit, not an invoice."]})]}),e.jsxs("div",{className:"gc-inline gc-no-print",children:[e.jsx(T,{leadingIcon:e.jsx(P.download,{size:14}),onClick:()=>window.print(),children:"Print or save as PDF"}),!d.approval&&e.jsx(T,{variant:"outline",onClick:()=>a(d),children:"Approve…"})]}),e.jsx(Qt,{deposit:s,workspaceId:i.id,onClose:()=>a(null)})]}):e.jsx(Ye,{icon:e.jsx(P.wallet,{size:18}),title:"Deposit not found",body:"It is not a deposit of this workspace. Add it by its transaction on Wallet & Funding."})}})]})}const Br=L.lazy(()=>pe(()=>import("./OperatorActions-DfjEKPUD.js"),__vite__mapDeps([10,1,2,7,3,4,5,6,8]))),Mr={info:"neutral",success:"success",warning:"warning",danger:"danger"},kr={authorize:"Authorize a wallet",manage:"Transfer or remove the authorized wallet"};function Lr({workspaceId:t,action:i,onActionChange:o}){const n=Ot(t),r=ae(),s=ie(),{apply:a,refresh:c}=on(t),[l,f]=L.useState(null),m=i!==void 0?i:l,p=w=>o?o(w):f(w),[g,d]=L.useState(!1),[B,E]=L.useState(!1),[R,A]=L.useState(null);async function y(){E(!0),A(null);try{await c()}catch(w){A(w)}finally{E(!1)}}return e.jsxs(xe,{title:"Authorized wallet",description:"Receives this workspace's withdrawals and ANTS rewards, and is the only wallet that can sign them.",children:[e.jsx(le,{query:n,rows:2,children:w=>{var k;return e.jsx(Rr,{state:w,explorerUrl:((k=r.data)==null?void 0:k.explorerUrl)??null,refreshing:B,onReload:()=>void y(),onAction:p,onLink:()=>d(!0)})}}),R?e.jsx(se,{tone:"danger",children:oe(R)}):null,e.jsx(G,{isOpen:m!==null&&n.data!==void 0,onClose:()=>p(null),size:"md",title:m?kr[m]:"",subtitle:m==="manage"&&n.data?`Signed by ${O(n.data.operator)} itself; the gateway cannot do it.`:"Withdrawals and ANTS rewards will go to the wallet you authorize, and only it can hand the role on.",children:m&&n.data&&e.jsx(ye,{chain:r.data,error:r.error,children:w=>e.jsx(L.Suspense,{fallback:e.jsx(me,{rows:2}),children:e.jsx(Br,{mode:m,workspaceId:t,state:n.data,chain:w,onStale:()=>void y(),onChanged:k=>{a(k),p(null),s(Ze(k.operator)?`Authorized wallet is now ${O(k.operator)}`:"Authorized wallet removed")}})})})}),g&&n.data&&e.jsx(an,{isOpen:!0,startWith:"wallet",onClose:()=>d(!1),intro:e.jsxs("p",{className:"gc-muted",children:["Connect ",e.jsx("code",{className:"gc-mono",children:O(n.data.operator)})," and sign the message to add it as one of your sign-in methods. It then shows here as your wallet, and you can manage it."]}),onCredentialAdded:()=>{y(),s("Wallet linked to your account")}})]})}function Rr({state:t,explorerUrl:i,refreshing:o,onReload:n,onAction:r,onLink:s}){const a=ln(t,null),c=Ze(t.operator),l=i&&c?`${i.replace(/\/+$/,"")}/address/${t.operator}`:null,f=c&&t.relation!=="self";return e.jsxs("div",{className:"gc-operator",children:[e.jsxs("div",{className:"gc-operator__main",children:[e.jsxs("div",{className:"gc-operator__title",children:[e.jsx("span",{className:"gc-strong",children:a.title}),c&&e.jsx(Qe,{iconOnly:!0,value:t.operator,label:"Copy address"}),e.jsx($e,{tone:Mr[a.tone],children:a.badge})]}),e.jsx("p",{className:"gc-operator__summary",children:a.summary}),e.jsxs("p",{className:"gc-fineprint gc-operator__meta",children:[l&&e.jsxs(e.Fragment,{children:[e.jsx("a",{className:"gc-link",href:l,target:"_blank",rel:"noopener noreferrer",children:"explorer"})," · "]}),"Checked ",cn(t.checkedAt)," ·"," ",e.jsx(T,{variant:"link",size:"sm",disabled:o,onClick:n,children:o?"checking…":"check again"})]})]}),e.jsxs("div",{className:"gc-operator__actions",children:[a.canAuthorize&&e.jsx(T,{size:"sm",onClick:()=>r("authorize"),children:"Authorize a wallet"}),a.canLink&&e.jsx(T,{size:"sm",onClick:s,children:"Link to my account"}),f&&e.jsx(T,{size:"sm",variant:"outline",onClick:()=>r("manage"),children:"Transfer or remove"})]}),(a.body!==a.summary||t.relation==="none"&&!t.canAuthorize)&&e.jsxs(Sn,{className:"gc-operator__details",title:"What does this mean?",children:[e.jsx("p",{className:"gc-muted",children:a.body}),t.relation==="none"&&!t.canAuthorize&&e.jsx("p",{className:"gc-fineprint",children:"Only the organization owner can authorize a wallet, with one of their own sign-in wallets added at least 24 hours ago."})]})]})}const Tr=L.lazy(()=>pe(()=>import("./WalletFunding-CsUmR_iR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))),Dr=L.lazy(()=>pe(()=>import("./ChannelClose-C_SM1g28.js"),__vite__mapDeps([11,1,2,7,3,4,5,6,8,9])));function Pr(t,i=15e3){const[o,n]=L.useState(()=>Date.now());return L.useEffect(()=>{if(!t)return;n(Date.now());const r=setInterval(()=>n(Date.now()),i);return()=>clearInterval(r)},[t,i]),o}function _r({workspaceId:t,canCooperate:i,onAuthorize:o}){const[n,r]=L.useState(!1),[s,a]=L.useState(null),[c,l]=L.useState(()=>new Set),f=ge(),m=ie(),p=ae(),g=Ut({queryKey:F.channels(t,n),queryFn:()=>K.wallet.channels(t,n)}),d=g.data??[],B=d.some(u=>u.status==="closing"),E=Pr(B),R=async()=>{const u=await K.wallet.channels(t,n,!0);f.setQueryData(F.channels(t,n),u),f.invalidateQueries({queryKey:["channels",t]}),f.invalidateQueries({queryKey:F.wallet(t)})},A=d.map(yn).filter(u=>u!==null&&u>E).sort((u,h)=>u-h)[0];L.useEffect(()=>{if(A===void 0)return;const u=setTimeout(()=>void R().catch(()=>{}),Math.max(1e3,A-Date.now()+5e3));return()=>clearTimeout(u)},[A]);const y=we({mutationFn:u=>K.wallet.closeChannel(t,u.peerId),onSuccess:()=>{a(null),m("Channel closed by the seller")},onError:(u,h)=>l(x=>new Set(x).add(h.channelId)),invalidate:[["channels",t],F.wallet(t)]}),j=(u,h=c.has(u.channelId))=>{y.reset();const x=rt(u,h||!i);x==="cooperative"?a({channel:u,mode:"cooperative"}):x==="on-chain"?a({channel:u,mode:"request"}):x==="withdraw"&&a({channel:u,mode:"withdraw"})},w=vn(d),k=u=>u.sellerName??O(u.peerId);return e.jsx("section",{id:"gc-channels",className:"gc-anchor",children:e.jsxs(xe,{flush:!0,title:"Payment channels",description:"Funds reserved with sellers. Closing a channel returns what was not spent.",actions:e.jsx(Bn,{checked:n,onChange:r,label:"Include closed"}),children:[w.count>0&&e.jsxs(se,{tone:"warning",title:`${w.count} channel${w.count===1?"":"s"} ready to withdraw`,action:e.jsx(T,{size:"sm",onClick:()=>j(d.find(u=>u.status==="withdrawable")),children:"Withdraw"}),children:["About ",D(w.amount)," of unused reserve can return to the balance. The authorized wallet signs the withdrawal."]}),e.jsx(le,{query:g,children:u=>e.jsx(Vt,{label:"Payment channels",rows:u,rowKey:h=>h.channelId,rowLabel:h=>`channel with ${k(h)}`,actions:h=>{const x=rt(h,c.has(h.channelId)||!i);return[x==="cooperative"&&{label:"Close channel",onSelect:()=>j(h)},(x==="cooperative"||x==="on-chain")&&{label:"Close on chain",onSelect:()=>j(h,!0)},x==="withdraw"&&{label:"Withdraw reserve",onSelect:()=>j(h)}]},empty:e.jsx(Ye,{icon:e.jsx(P.wallet,{size:18}),title:n?"No channels yet":"No open channels",body:"A channel opens the first time a seller serves this workspace."}),columns:[{key:"seller",header:"Seller",render:h=>h.sellerName??e.jsx(te,{title:h.peerId,children:O(h.peerId)})},{key:"status",header:"Status",render:h=>e.jsx($e,{tone:Cn(h),children:jn(h,E)})},{key:"reserved",header:"Reserved",align:"right",render:h=>D(h.reserved)},{key:"spent",header:"Spent",align:"right",render:h=>D(h.spent)},{key:"returns",header:"Returns on close",align:"right",secondary:!0,optional:!0,render:h=>bn(h)?D(nt(h)):"—"},{key:"opened",header:"Opened",secondary:!0,render:h=>he(h.openedAt)}]})}),!i&&d.some(u=>u.canCooperativeClose)&&e.jsx("p",{className:"gc-fineprint gc-panel-note",children:"Asking a seller to close needs an organization admin; you can still close on chain with the authorized wallet."}),e.jsx(G,{isOpen:(s==null?void 0:s.mode)==="cooperative",onClose:()=>{a(null),y.reset()},size:"md",title:"Close this channel?",subtitle:s?`With ${k(s.channel)}. About ${D(nt(s.channel))} returns to the balance.`:void 0,footer:s&&e.jsxs("div",{className:"gc-actions",children:[e.jsx(T,{variant:"ghost",onClick:()=>{a(null),y.reset()},children:"Cancel"}),y.error?e.jsxs(e.Fragment,{children:[e.jsx(T,{variant:"outline",disabled:y.isPending,onClick:()=>y.mutate(s.channel),children:"Try again"}),e.jsx(T,{onClick:()=>{y.reset(),a({channel:s.channel,mode:"request"})},children:"Close on chain instead"})]}):e.jsx(T,{disabled:y.isPending,onClick:()=>y.mutate(s.channel),children:y.isPending?"Asking the seller…":"Close channel"})]}),children:e.jsxs("div",{className:"gc-stack",children:[e.jsx("p",{className:"gc-muted",children:"The seller settles what was spent and the rest returns to your available balance at once. A new channel opens if this seller is used again."}),y.isPending&&e.jsx("p",{className:"gc-fineprint",children:"Waiting for the seller (up to a minute)…"}),y.error?e.jsx(se,{tone:"danger",title:"The seller did not close it",children:Nn(oe(y.error))}):null]})}),e.jsx(G,{isOpen:(s==null?void 0:s.mode)==="request"||(s==null?void 0:s.mode)==="withdraw",onClose:()=>a(null),size:"md",title:(s==null?void 0:s.mode)==="withdraw"?"Withdraw the unused reserve":"Close on chain",subtitle:s?`Channel with ${k(s.channel)}. Does not need the seller.`:void 0,children:s&&s.mode!=="cooperative"&&e.jsx(ye,{chain:p.data,error:p.error,children:u=>e.jsx(L.Suspense,{fallback:e.jsx(me,{rows:2}),children:e.jsx(Dr,{workspaceId:t,channel:s.channel,chain:u,step:s.mode,onAuthorize:()=>{a(null),o()},onDone:h=>{R().catch(()=>{}),h==="request"?m("Close requested. Withdraw in 15 minutes."):(m("Reserve returned to the balance"),a(null))}})})})})]})})}function Ir({wallet:t,workspaceId:i,onWithdraw:o}){const n=_t(i),r=n.data?It(n.data):null,s=()=>{const c=document.getElementById("gc-channels");if(!c)return;c.scrollIntoView({behavior:"smooth",block:"start"}),c.classList.remove("gc-flash"),c.offsetWidth,c.classList.add("gc-flash");let l=!1;const f=()=>{var p;if(l)return;l=!0;const m=c.querySelectorAll('[aria-haspopup="menu"]');m.length===1?m[0].click():(p=m[0])==null||p.focus({preventScroll:!0})};window.addEventListener("scrollend",f,{once:!0}),window.setTimeout(f,700)},a=pn(t);return zr(t,a),e.jsxs(xe,{title:"Balance",actions:e.jsx(T,{size:"sm",variant:"outline",onClick:o,children:"Withdraw"}),children:[wn(t)&&e.jsx("div",{className:"gc-panel-alert",children:e.jsx(se,{tone:"warning",title:"The whole balance is reserved in channels",action:e.jsx(T,{size:"sm",variant:"outline",onClick:s,children:"Manage channels"}),children:"Nothing is available for new sellers or withdrawals. Close channels you no longer use to return their unused reserve, or add funds."})}),e.jsxs("div",{className:"gc-grid gc-grid--4 gc-figures",children:[e.jsx(ce,{label:"Available",value:D(t.available),strong:!0}),e.jsx(ce,{label:"Reserved in channels",value:D(t.reserved)}),e.jsx(ce,{label:"Authorized, not yet charged",value:r===null?"…":D(r)}),e.jsx(ce,{label:"Credit limit",value:t.creditLimit===null?"None":D(t.creditLimit)})]}),a?e.jsxs("p",{className:"gc-wallet-meta gc-pending",role:"status",children:[e.jsx("span",{className:"gc-attention","aria-hidden":"true"}),e.jsxs("span",{children:[e.jsxs("strong",{children:["Pending: ",D(t.walletUsdc)]})," arrived in the workspace wallet and is moving into the available balance. This page updates by itself."]})]}):Y(t.walletUsdc)>0&&e.jsxs("p",{className:"gc-fineprint gc-wallet-meta",children:[D(t.walletUsdc)," in the wallet, not deposited yet. ",xn(t)]}),e.jsxs("p",{className:"gc-fineprint gc-wallet-meta",children:["Workspace wallet ",e.jsx(te,{title:t.address,children:O(t.address)})," ",e.jsx(Qe,{iconOnly:!0,value:t.address,label:"Copy address"}),e.jsx("span",{"aria-hidden":"true",children:"·"})," Authorized spend is charged from channel reserves when sellers settle. Withdrawals go to the authorized wallet below."]})]})}function zr(t,i){const o=ie(),n=L.useRef(null);L.useEffect(()=>{if(i){n.current??(n.current=Y(t.available));return}if(n.current===null)return;const r=Y(t.available)-n.current;n.current=null,r>0&&o(`Payment received: ${D(String(r))} added to the available balance`)},[i,t.available,o])}function Fr({wallet:t,workspaceId:i,isOpen:o,onClose:n,onAuthorize:r}){const s=ge(),a=ie(),c=ae(),l=Ot(i),f=l.data&&Ze(l.data.operator)?l.data.operator:null;return e.jsx(G,{isOpen:o,onClose:n,title:"Withdraw",subtitle:`${D(t.available)} available. ${f?`Sent to the authorized wallet ${O(f)}, which must sign it.`:"Withdrawals go to the authorized wallet, which must sign them."}`,children:e.jsx(ye,{chain:c.data,error:c.error,children:m=>e.jsx(L.Suspense,{fallback:e.jsx(me,{rows:2}),children:e.jsx(Tr,{action:"withdraw",workspaceId:i,wallet:t,chain:m,onAuthorize:()=>{n(),r()},onDone:()=>{a("Withdrawal confirmed"),s.invalidateQueries({queryKey:F.wallet(i)})}})})})})}function Gr(){const t=dn();return t.rest[0]==="deposits"&&t.rest[1]?e.jsx(Sr,{txHash:t.rest[1]}):e.jsx(Ur,{})}function Ur(){const{workspace:t,viewer:i}=zt(),o=un(t.id),n=ae(),[r,s]=L.useState(()=>new URLSearchParams(window.location.search).get("fund")==="1"?"fund":null),[a,c]=L.useState(null);return e.jsxs("div",{className:"gc-page",children:[e.jsx(hn,{title:"Wallet & Funding",description:`Credits that pay for ${t.name}'s requests.`,actions:e.jsx(T,{variant:"brand",leadingIcon:e.jsx(P.plus,{size:14}),onClick:()=>s("fund"),children:"Add funds"})}),e.jsx(le,{query:o,rows:2,children:l=>e.jsxs(e.Fragment,{children:[e.jsx(fn,{stale:l.stale}),e.jsx(Ir,{wallet:l,workspaceId:t.id,onWithdraw:()=>s("withdraw")}),e.jsx(Lr,{workspaceId:t.id,action:a,onActionChange:c}),gn(i)&&e.jsx(Er,{workspaceId:t.id}),e.jsx(G,{isOpen:r==="fund",onClose:()=>s(null),size:"md",title:"Add funds",subtitle:`Credits that pay for ${t.name}'s requests.`,children:e.jsx(br,{wallet:l,chain:n.data,workspaceId:t.id})}),e.jsx(Fr,{wallet:l,workspaceId:t.id,isOpen:r==="withdraw",onClose:()=>s(null),onAuthorize:()=>c("authorize")})]})}),e.jsx(_r,{workspaceId:t.id,canCooperate:mn(i),onAuthorize:()=>c("authorize")})]})}export{Gr as default};
@@ -0,0 +1 @@
1
+ import{j as s,r as c,B as o,w as m,aE as g,aD as w,ag as x}from"./index-BG30WuBG.js";import{C as j}from"./ConnectWallet-phY-Bf7w.js";import{W as y,u as C,a as p,b as W,w as E}from"./en_US-Y4ZOVFV4-CAcvlKBB.js";import"./clsx-B-dksMZM.js";import"./index-BwpQbdIU.js";function k({onConfirmed:e}){const{address:t,isConnected:u}=C(),{disconnect:d}=p(),{signMessageAsync:h}=W(),[n,r]=c.useState(!1),[i,l]=c.useState(null);return!u||!t?s.jsx(j,{label:"Connect your wallet",size:"sm",variant:"outline",fullWidth:!1}):s.jsxs("div",{className:"gc-stack gc-stack--tight",children:[s.jsxs("div",{className:"gc-inline gc-inline--wrap",children:[s.jsx(o,{size:"sm",disabled:n,onClick:async()=>{r(!0),l(null);try{e(await g(t,async a=>{try{return await h({message:a})}catch(f){throw new Error(E(f,"Signing was cancelled."))}}))}catch(a){l(w(a))}finally{r(!1)}},children:n?"Check your wallet…":`Confirm with ${m(t)}`}),s.jsx(o,{size:"sm",variant:"ghost",onClick:()=>d(),children:"Use a different wallet"})]}),i&&s.jsx(x,{tone:"danger",children:i})]})}function A(e){return s.jsx(y,{chain:null,children:s.jsx(k,{...e})})}export{A as default};
@@ -0,0 +1 @@
1
+ import{j as s,ag as N,J as M,aF as Q,r as E,aG as C,aH as G,m as j,g as b,w as T,T as k,B as W}from"./index-BG30WuBG.js";import{B as Y,r as H,m as K,c as B,n as J,o as z,p as L,q as U,t as V,W as X,u as R,v as O}from"./en_US-Y4ZOVFV4-CAcvlKBB.js";import{u as q,a as F,T as P,D as A,s as Z}from"./useTx-BMOzJPjG.js";import{a as ee,C as te}from"./ConnectWallet-phY-Bf7w.js";import{O as ne}from"./OperatorGateAlert-Bq1ilVp6.js";import"./clsx-B-dksMZM.js";import"./index-BwpQbdIU.js";class se extends Y{constructor({value:t}){super(`Number \`${t}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}function ae(n,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(n))throw new se({value:n});let[a,e="0"]=n.split(".");const i=a.startsWith("-");if(i&&(a=a.slice(1)),e=e.replace(/(0+)$/,""),e.length>t){const[d,r,c]=[e.slice(0,t-1),e.slice(t-1,t),e.slice(t)],o=Math.round(+`${r}.${c}`);o>9?e=`${BigInt(d)+BigInt(1)}0`.padStart(d.length+1,"0"):e=`${d}${o}`,e.length>t&&(e=e.slice(1),a=`${BigInt(a)+1n}`),e=e.slice(0,t)}else e=e.padEnd(t,"0");return BigInt(`${i?"-":""}${a}${e}`)}function re(n,t={}){return{async queryFn({queryKey:a}){const e=t.abi;if(!e)throw new Error("abi is required");const{functionName:i,scopeKey:d,...r}=a[1],c=(()=>{const o=a[1];if(o.address)return{address:o.address};if(o.code)return{code:o.code};throw new Error("address or code is required")})();if(!i)throw new Error("functionName is required");return H(n,{abi:e,functionName:i,args:r.args,...c,...r})},queryKey:oe(t)}}function oe(n={}){const{abi:t,...a}=n;return["readContract",K(a)]}function D(n={}){const{abi:t,address:a,functionName:e,query:i={}}=n,d=n.code,r=B(n),c=J({config:r}),o=re(r,{...n,chainId:n.chainId??c}),u=!!((a||d)&&t&&e&&(i.enabled??!0));return z({...i,...o,enabled:u,structuralSharing:i.structuralSharing??L})}const I=U(["function balanceOf(address account) view returns (uint256)","function allowance(address owner, address spender) view returns (uint256)","function approve(address spender, uint256 amount) returns (bool)"]),ie=U(["function deposit(address buyer, uint256 amount) external","function withdraw(address buyer, uint256 amount) external","function setOperator(address buyer, address operator, uint256 nonce, bytes buyerSig) external","function transferOperator(address buyer, address newOperator) external"]),$=1;function _(n){try{return ae(n.trim()||"0",6)}catch{return 0n}}function de({wallet:n,chain:t,onDone:a}){const{address:e}=R(),i=q(t.chainId),{writeContractAsync:d}=F(),[r,c]=E.useState(""),o=C(t,"usdc"),u=C(t,"deposits"),v=D({address:o??void 0,abi:I,functionName:"balanceOf",args:e?[e]:void 0,chainId:t.chainId,query:{enabled:!!o&&!!e,staleTime:6e4,refetchOnWindowFocus:!1}}),l=D({address:o??void 0,abi:I,functionName:"allowance",args:e&&u?[e,u]:void 0,chainId:t.chainId,query:{enabled:!!o&&!!e&&!!u,staleTime:6e4,refetchOnWindowFocus:!1}});if(!o||!u)return s.jsx(N,{tone:"warning",children:"The gateway did not report the USDC and deposits contract addresses."});if(!e)return s.jsx(te,{label:"Connect wallet to pay"});const f=_(r),p=v.data,x=j(n.available)+j(n.reserved)===0;let m=null;r!==""&&(f<=0n||!/^\d+(\.\d{0,6})?$/.test(r.trim())?m="Enter an amount like 20 or 12.50.":x&&Number(r)<$?m=`The first deposit is at least ${$} USDC.`:p!==void 0&&f>p&&(m=`Your wallet holds ${b(Number(O(p,6)))} USDC.`));const w=l.data!==void 0&&l.data<f;async function g(){const h=[];((await l.refetch()).data??0n)<f&&h.push({label:"Approve USDC",send:()=>d({address:o,abi:I,functionName:"approve",args:[u,f],chainId:t.chainId})}),h.push({label:"Deposit",send:()=>d({address:u,abi:ie,functionName:"deposit",args:[n.address,f],chainId:t.chainId})});const S=await i.run(h);S&&(c(""),v.refetch(),a(S))}return s.jsxs("div",{className:"gc-stack",children:[s.jsxs("div",{className:"gc-kv",children:[s.jsx("span",{children:"Paying from"}),s.jsx("code",{children:T(e)}),s.jsx("span",{children:p!==void 0?`${b(Number(O(p,6)))} USDC`:"…"})]}),s.jsx(k,{label:"Amount (USDC)",inputMode:"decimal",placeholder:"20",value:r,error:m,onChange:h=>c(h.target.value)}),s.jsx(P,{chain:t,runner:i}),s.jsx(W,{fullWidth:!0,disabled:i.running||!r||!!m,onClick:()=>void g(),children:i.running?"Working…":`Pay ${r?b(Number(r)):""} USDC`}),s.jsxs("p",{className:"gc-fineprint",children:[w?"You will confirm two transactions: a one-time USDC approval, then the deposit.":"You will confirm one transaction."," Network fees are paid in ETH on ",t.name,"."]})]})}function ce({workspaceId:n,wallet:t,chain:a,onDone:e,onAuthorize:i}){const{address:d}=R(),r=B(),c=q(a.chainId),{writeContractAsync:o}=F(),u=M(n),{refresh:v}=Q(n),[l,f]=E.useState(""),p=C(a,"deposits");if(!p)return s.jsx(N,{tone:"warning",children:"The gateway did not report the deposits contract address."});const x=G(u.data,d,"withdraw");if(!x.ok)return s.jsx(ne,{gate:x,state:u.data,connected:d,onAuthorize:i});const m=_(l),w=j(t.available);let g=null;return l!==""&&(m<=0n||!/^\d+(\.\d{0,6})?$/.test(l.trim())?g="Enter an amount like 20 or 12.50.":Number(l)>w&&(g=`Only ${b(w)} is available.`)),s.jsxs("div",{className:"gc-stack",children:[s.jsxs("div",{className:"gc-kv",children:[s.jsx("span",{children:"Sending to"}),s.jsx("code",{children:T(d)}),s.jsxs("span",{children:[b(w)," available"]})]}),s.jsx(k,{label:"Amount (USDC)",inputMode:"decimal",value:l,error:g,onChange:h=>f(h.target.value)}),s.jsx(P,{chain:a,runner:c,done:"Withdrawal confirmed."}),s.jsx(W,{fullWidth:!0,disabled:c.running||!l||!!g,onClick:async()=>{const h=[t.address,m],y=await c.run([{label:"Withdraw",check:()=>Z(r,{account:d,address:p,abi:A,functionName:"withdraw",args:h,chainId:a.chainId}),send:()=>o({address:p,abi:A,functionName:"withdraw",args:h,chainId:a.chainId})}],{onStale:()=>void v().catch(()=>{})});y&&(f(""),e(y))},children:c.running?"Working…":"Withdraw"}),s.jsx("p",{className:"gc-fineprint",children:"Reserved funds in open channels stay locked until the channels close."})]})}const ue={deposit:de,withdraw:ce};function be(n){if(!V(n.wallet.address))return s.jsxs(N,{tone:"warning",children:["This workspace has no wallet address yet, so it cannot ",n.action==="deposit"?"receive deposits":"withdraw",". Reload once the gateway has set up the workspace wallet."]});const t=ue[n.action];return s.jsx(X,{chain:n.chain,children:s.jsxs("div",{className:"gc-stack",children:[s.jsx(ee,{}),s.jsx(t,{...n})]})})}export{be as default};
@@ -0,0 +1 @@
1
+ import{j as e,r as l,w as x,B as u,ag as v,f as w,aD as k}from"./index-BG30WuBG.js";import{W,u as b,a as A,b as B,C as I,w as D}from"./en_US-Y4ZOVFV4-CAcvlKBB.js";import"./clsx-B-dksMZM.js";import"./index-BwpQbdIU.js";function E({ready:t,open:i}){const r=l.useRef(!1);return l.useEffect(()=>{t&&!r.current&&(r.current=!0,i())},[t,i]),null}function F({enrollment:t,onSignedIn:i,autoConnect:r,actionLabel:o,onError:c}){const{address:n,isConnected:j}=b(),{disconnect:m}=A(),{signMessageAsync:y}=B(),[d,f]=l.useState(!1),[g,h]=l.useState(null),p=o?o(x(n)):`Sign in as ${x(n)}`;async function C(){if(n){f(!0),h(null);try{const{message:s}=await w.auth.walletNonce(n);let a;try{a=await y({message:s})}catch(S){throw new Error(D(S,"Signing was cancelled."))}i(await w.auth.walletVerify(s,a,t))}catch(s){c!=null&&c(s)||h(k(s))}finally{f(!1)}}}return e.jsxs("div",{className:"gc-stack",children:[!j||!n?e.jsx(I.Custom,{children:({openConnectModal:s,mounted:a})=>e.jsxs(e.Fragment,{children:[r&&e.jsx(E,{ready:a,open:s}),e.jsx(u,{variant:"outline",fullWidth:!0,disabled:!a,onClick:s,children:"Connect a wallet"})]})}):e.jsxs(e.Fragment,{children:[e.jsx(u,{variant:"outline",fullWidth:!0,disabled:d,onClick:()=>void C(),children:d?"Check your wallet…":p}),e.jsx(u,{variant:"ghost",size:"sm",onClick:()=>m(),children:"Use a different wallet"})]}),g&&e.jsx(v,{tone:"danger",children:g})]})}function O(t){return e.jsx(W,{chain:null,children:e.jsx(F,{...t})})}export{O as default};
@@ -0,0 +1 @@
1
+ import{u as S,n as W,p as L,s as I,r as p,t as A,j as s,P as O,B as b,I as z,l as B,Q as F,v as w,M as C,w as N,x as M,y as D,z as E,A as T,C as q,D as V,q as f,f as v,T as P,o as R}from"./index-BG30WuBG.js";import{u as K,a as Q,P as _}from"./PolicyField-CNEZju4W.js";import{l as G,d as H,L as U}from"./limits-Cv54gck6.js";import{D as J}from"./DataTable-D65CSQpj.js";import"./PolicyEditor-BLo1sheV.js";import"./PeerPicker-JK4q0ZO9.js";import"./SelectField-Cog9tKMb.js";import"./Segmented-YOSVapPh.js";import"./roving-DkptacxO.js";import"./Switch-CGhLd0Ay.js";import"./Disclosure-DrGE-NkF.js";function X({initial:r,onDone:d}){const{viewer:g}=S(),h=W(g),[i,k]=p.useState((r==null?void 0:r.name)??""),[y,x]=p.useState(G(r==null?void 0:r.limits)),[m,c]=p.useState(""),n=K(r==null?void 0:r.routingPolicy),o=Q(),l=A({mutationFn:()=>{const t={name:i.trim(),limits:H(y),routingPolicy:n.build()};return o.save([t.routingPolicy],e=>{if(r){const{limits:a,...j}=t;return v.workspaces.update(r.id,h?{...j,limits:a}:j,e)}return v.workspaces.create(m.trim()?{...t,buyerIdentity:m.trim()}:t,e)})},onSuccess:d,invalidate:[f.group("workspaces"),f.me],toast:r?"Workspace saved":"Workspace created"}),u=r?"Save":"Create workspace";return s.jsxs("form",{className:"gc-stack",onSubmit:t=>{t.preventDefault(),l.mutate()},children:[s.jsx(P,{label:"Name",required:!0,value:i,onChange:t=>k(t.target.value)}),!r&&s.jsx(P,{label:"Buyer identity (optional)",value:m,onChange:t=>c(t.target.value),hint:"Leave blank to create a new wallet for this workspace. Enter an existing identity name to reuse its wallet."}),h?s.jsxs("div",{children:[s.jsx("div",{className:"as-field__label gc-label-row",children:"Workspace budgets (USD)"}),s.jsx(U,{idPrefix:"ws-limit",value:y,onChange:x})]}):s.jsxs("p",{className:"gc-muted",children:["Budgets: ",E(r==null?void 0:r.limits),". Organization admins set them."]}),s.jsx(_,{draft:n.draft,setDraft:n.setDraft}),l.error?s.jsx(R,{error:l.error,title:"Could not save"}):null,s.jsxs("div",{className:"gc-actions",children:[s.jsx(b,{variant:"ghost",onClick:d,children:"Cancel"}),s.jsx(b,{type:"submit",disabled:l.isPending||!i.trim(),children:l.isPending?"Saving…":u})]}),o.dialog]})}function ie(){const{viewer:r,setWorkspaceId:d,workspace:g,me:h}=S(),i=W(r),k=t=>i||h.workspaces.some(e=>e.workspace.id===t.id&&e.role==="admin"),y=L(),x=I(),m=t=>{var e;return(e=x.data)==null?void 0:e.find(a=>a.workspaceId===t.id)},[c,n]=p.useState(null),[o,l]=p.useState(null),u=A({mutationFn:t=>v.workspaces.remove(t.id),onSuccess:()=>l(null),invalidate:[f.group("workspaces"),f.me]});return s.jsxs("div",{className:"gc-page",children:[s.jsx(O,{title:"Workspaces",description:"Each workspace has its own wallet, budgets, routing policy, members and keys.",actions:i&&s.jsx(b,{variant:"brand",leadingIcon:s.jsx(z.plus,{size:14}),onClick:()=>n("new"),children:"New workspace"})}),s.jsx(B,{flush:!0,children:s.jsx(F,{query:y,children:t=>s.jsx(J,{label:"Workspaces",rows:t,rowKey:e=>e.id,rowLabel:e=>e.name,onRowClick:e=>k(e)&&n(e),actions:e=>[e.id!==g.id&&{label:"Open",onSelect:()=>d(e.id)},{label:"Members",onSelect:()=>{d(e.id),D("members")}},k(e)&&{label:"Edit",onSelect:()=>n(e)},i&&!e.isDefault&&{label:"Delete",tone:"danger",onSelect:()=>l(e)}],columns:[{key:"name",header:"Name",sortValue:e=>e.name,render:e=>s.jsxs("span",{className:"gc-strong",children:[e.name," ",e.isDefault&&s.jsx(w,{children:"Default"})," ",e.id===g.id&&s.jsx(w,{tone:"info",children:"Open"})]})},{key:"wallet",header:"Wallet",secondary:!0,render:e=>e.walletAddress?s.jsx(C,{title:e.walletAddress,children:N(e.walletAddress)}):s.jsx("span",{className:"gc-muted",children:e.buyerIdentity})},{key:"operator",header:"Authorized wallet",secondary:!0,render:e=>{const a=m(e);return a?a.relation===null?s.jsx("span",{className:"gc-muted",title:"The wallet or the chain could not be read",children:"unknown"}):M(a)?s.jsxs("span",{className:"gc-inline",children:[s.jsx(w,{tone:"warning",children:"Not set"}),a.canAuthorize&&s.jsx(b,{variant:"link",size:"sm",onClick:j=>{j.stopPropagation(),d(e.id),D("wallet")},children:"Authorize"})]}):a.relation==="self"?s.jsx("span",{className:"gc-muted",children:"Workspace wallet"}):s.jsx(C,{title:a.operator??void 0,children:N(a.operator)}):s.jsx("span",{className:"gc-muted",children:x.isLoading?"…":"—"})}},{key:"members",header:"Members",align:"right",secondary:!0,sortValue:e=>e.memberCount,render:e=>e.memberCount},{key:"keys",header:"Keys",align:"right",sortValue:e=>e.keyCount,render:e=>e.keyCount},{key:"limits",header:"Budgets",secondary:!0,optional:!0,render:e=>s.jsx("span",{className:"gc-muted",children:E(e.limits)})},{key:"policy",header:"Routing",secondary:!0,optional:!0,render:e=>s.jsx("span",{className:"gc-muted",children:T(e.routingPolicy)})}]})})}),s.jsx(q,{isOpen:c!==null,onClose:()=>n(null),size:"lg",title:c==="new"?"New workspace":"Edit workspace",children:c!==null&&s.jsx(X,{initial:c==="new"?null:c,onDone:()=>n(null)})}),s.jsx(V,{isOpen:o!==null,busy:u.isPending,error:u.error,onClose:()=>{l(null),u.reset()},onConfirm:()=>o&&u.mutate(o),title:"Delete this workspace?",confirmLabel:"Delete workspace",body:s.jsxs(s.Fragment,{children:["Deleting ",s.jsx("strong",{children:o==null?void 0:o.name})," is only possible once it has no active keys and no balance. Withdraw funds and revoke keys first."]})})]})}export{ie as default};
@@ -1,4 +1,4 @@
1
- import{w as o}from"./core-Cw7VIz-a.js";import"./index-DqdaAEyo.js";import"./index.es-Dajqanx_.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CzjJ6dvA.js";import"./clsx-B-dksMZM.js";import"./index-D5ERwHFX.js";import"./index-BwpQbdIU.js";const C=o`<svg
1
+ import{w as o}from"./core-z96MxYDt.js";import"./index-BG30WuBG.js";import"./index.es-CA2ape1X.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CAcvlKBB.js";import"./clsx-B-dksMZM.js";import"./index-BwpQbdIU.js";const m=o`<svg
2
2
  width="14"
3
3
  height="14"
4
4
  viewBox="0 0 14 14"
@@ -12,4 +12,4 @@ import{w as o}from"./core-Cw7VIz-a.js";import"./index-DqdaAEyo.js";import"./inde
12
12
  d="M7.0023 0.875C7.48571 0.875 7.8776 1.26675 7.8776 1.75V6.125H12.2541C12.7375 6.125 13.1294 6.51675 13.1294 7C13.1294 7.48325 12.7375 7.875 12.2541 7.875H7.8776V12.25C7.8776 12.7332 7.48571 13.125 7.0023 13.125C6.51889 13.125 6.12701 12.7332 6.12701 12.25V7.875H1.75054C1.26713 7.875 0.875244 7.48325 0.875244 7C0.875244 6.51675 1.26713 6.125 1.75054 6.125H6.12701V1.75C6.12701 1.26675 6.51889 0.875 7.0023 0.875Z"
13
13
  fill="#667dff"
14
14
  /></svg
15
- >`;export{C as addSvg};
15
+ >`;export{m as addSvg};
@@ -0,0 +1,6 @@
1
+ import{w as o}from"./core-z96MxYDt.js";import"./index-BG30WuBG.js";import"./index.es-CA2ape1X.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CAcvlKBB.js";import"./clsx-B-dksMZM.js";import"./index-BwpQbdIU.js";const e=o`<svg fill="none" viewBox="0 0 24 24">
2
+ <path
3
+ style="fill: var(--wui-color-accent-100);"
4
+ d="M10.2 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM10.2 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0Z"
5
+ />
6
+ </svg>`;export{e as allWalletsSvg};
@@ -1,4 +1,4 @@
1
- import{w as t}from"./core-Cw7VIz-a.js";import"./index-DqdaAEyo.js";import"./index.es-Dajqanx_.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CzjJ6dvA.js";import"./clsx-B-dksMZM.js";import"./index-D5ERwHFX.js";import"./index-BwpQbdIU.js";const m=t`
1
+ import{w as t}from"./core-z96MxYDt.js";import"./index-BG30WuBG.js";import"./index.es-CA2ape1X.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CAcvlKBB.js";import"./clsx-B-dksMZM.js";import"./index-BwpQbdIU.js";const s=t`
2
2
  <svg width="36" height="36">
3
3
  <path
4
4
  d="M28.724 0H7.271A7.269 7.269 0 0 0 0 7.272v21.46A7.268 7.268 0 0 0 7.271 36H28.73A7.272 7.272 0 0 0 36 28.728V7.272A7.275 7.275 0 0 0 28.724 0Z"
@@ -14,4 +14,4 @@ import{w as t}from"./core-Cw7VIz-a.js";import"./index-DqdaAEyo.js";import"./inde
14
14
  <stop offset="1" stop-color="#2072F3" />
15
15
  </linearGradient>
16
16
  </defs>
17
- </svg>`;export{m as appStoreSvg};
17
+ </svg>`;export{s as appStoreSvg};
@@ -1,4 +1,4 @@
1
- import{w as i}from"./core-Cw7VIz-a.js";import"./index-DqdaAEyo.js";import"./index.es-Dajqanx_.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CzjJ6dvA.js";import"./clsx-B-dksMZM.js";import"./index-D5ERwHFX.js";import"./index-BwpQbdIU.js";const o=i`<svg fill="none" viewBox="0 0 40 40">
1
+ import{w as i}from"./core-z96MxYDt.js";import"./index-BG30WuBG.js";import"./index.es-CA2ape1X.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CAcvlKBB.js";import"./clsx-B-dksMZM.js";import"./index-BwpQbdIU.js";const a=i`<svg fill="none" viewBox="0 0 40 40">
2
2
  <g clip-path="url(#a)">
3
3
  <g clip-path="url(#b)">
4
4
  <circle cx="20" cy="19.89" r="20" fill="#000" />
@@ -15,4 +15,4 @@ import{w as i}from"./core-Cw7VIz-a.js";import"./index-DqdaAEyo.js";import"./inde
15
15
  <clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
16
16
  <clipPath id="c"><path fill="#fff" d="M8 7.89h24v24H8z" /></clipPath>
17
17
  </defs>
18
- </svg>`;export{o as appleSvg};
18
+ </svg>`;export{a as appleSvg};
@@ -0,0 +1,8 @@
1
+ import{w as o}from"./core-z96MxYDt.js";import"./index-BG30WuBG.js";import"./index.es-CA2ape1X.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CAcvlKBB.js";import"./clsx-B-dksMZM.js";import"./index-BwpQbdIU.js";const v=o`<svg fill="none" viewBox="0 0 14 15">
2
+ <path
3
+ fill="currentColor"
4
+ fill-rule="evenodd"
5
+ d="M7 1.99a1 1 0 0 1 1 1v7.58l2.46-2.46a1 1 0 0 1 1.41 1.42L7.7 13.69a1 1 0 0 1-1.41 0L2.12 9.53A1 1 0 0 1 3.54 8.1L6 10.57V3a1 1 0 0 1 1-1Z"
6
+ clip-rule="evenodd"
7
+ />
8
+ </svg>`;export{v as arrowBottomSvg};
@@ -1,4 +1,4 @@
1
- import{w as o}from"./core-Cw7VIz-a.js";import"./index-DqdaAEyo.js";import"./index.es-Dajqanx_.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CzjJ6dvA.js";import"./clsx-B-dksMZM.js";import"./index-D5ERwHFX.js";import"./index-BwpQbdIU.js";const n=o`<svg
1
+ import{w as o}from"./core-z96MxYDt.js";import"./index-BG30WuBG.js";import"./index.es-CA2ape1X.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CAcvlKBB.js";import"./clsx-B-dksMZM.js";import"./index-BwpQbdIU.js";const m=o`<svg
2
2
  fill="none"
3
3
  viewBox="0 0 21 20"
4
4
  >
@@ -8,4 +8,4 @@ import{w as o}from"./core-Cw7VIz-a.js";import"./index-DqdaAEyo.js";import"./inde
8
8
  d="M10.5 2.42908C6.31875 2.42908 2.92859 5.81989 2.92859 10.0034C2.92859 14.1869 6.31875 17.5777 10.5 17.5777C14.6813 17.5777 18.0714 14.1869 18.0714 10.0034C18.0714 5.81989 14.6813 2.42908 10.5 2.42908ZM0.928589 10.0034C0.928589 4.71596 5.21355 0.429077 10.5 0.429077C15.7865 0.429077 20.0714 4.71596 20.0714 10.0034C20.0714 15.2908 15.7865 19.5777 10.5 19.5777C5.21355 19.5777 0.928589 15.2908 0.928589 10.0034ZM10.5 5.75003C11.0523 5.75003 11.5 6.19774 11.5 6.75003L11.5 10.8343L12.7929 9.54137C13.1834 9.15085 13.8166 9.15085 14.2071 9.54137C14.5976 9.9319 14.5976 10.5651 14.2071 10.9556L11.2071 13.9556C10.8166 14.3461 10.1834 14.3461 9.79291 13.9556L6.79291 10.9556C6.40239 10.5651 6.40239 9.9319 6.79291 9.54137C7.18343 9.15085 7.8166 9.15085 8.20712 9.54137L9.50002 10.8343L9.50002 6.75003C9.50002 6.19774 9.94773 5.75003 10.5 5.75003Z"
9
9
  clip-rule="evenodd"
10
10
  /></svg
11
- >`;export{n as arrowBottomCircleSvg};
11
+ >`;export{m as arrowBottomCircleSvg};
@@ -0,0 +1,8 @@
1
+ import{w as o}from"./core-z96MxYDt.js";import"./index-BG30WuBG.js";import"./index.es-CA2ape1X.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CAcvlKBB.js";import"./clsx-B-dksMZM.js";import"./index-BwpQbdIU.js";const a=o`<svg fill="none" viewBox="0 0 14 15">
2
+ <path
3
+ fill="currentColor"
4
+ fill-rule="evenodd"
5
+ d="M13 7.99a1 1 0 0 1-1 1H4.4l2.46 2.46a1 1 0 1 1-1.41 1.41L1.29 8.7a1 1 0 0 1 0-1.41L5.46 3.1a1 1 0 0 1 1.41 1.42L4.41 6.99H12a1 1 0 0 1 1 1Z"
6
+ clip-rule="evenodd"
7
+ />
8
+ </svg>`;export{a as arrowLeftSvg};
@@ -0,0 +1,8 @@
1
+ import{w as o}from"./core-z96MxYDt.js";import"./index-BG30WuBG.js";import"./index.es-CA2ape1X.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CAcvlKBB.js";import"./clsx-B-dksMZM.js";import"./index-BwpQbdIU.js";const a=o`<svg fill="none" viewBox="0 0 14 15">
2
+ <path
3
+ fill="currentColor"
4
+ fill-rule="evenodd"
5
+ d="M1 7.99a1 1 0 0 1 1-1h7.58L7.12 4.53A1 1 0 1 1 8.54 3.1l4.16 4.17a1 1 0 0 1 0 1.41l-4.16 4.17a1 1 0 1 1-1.42-1.41l2.46-2.46H2a1 1 0 0 1-1-1Z"
6
+ clip-rule="evenodd"
7
+ />
8
+ </svg>`;export{a as arrowRightSvg};
@@ -0,0 +1,8 @@
1
+ import{w as o}from"./core-z96MxYDt.js";import"./index-BG30WuBG.js";import"./index.es-CA2ape1X.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CAcvlKBB.js";import"./clsx-B-dksMZM.js";import"./index-BwpQbdIU.js";const a=o`<svg fill="none" viewBox="0 0 14 15">
2
+ <path
3
+ fill="currentColor"
4
+ fill-rule="evenodd"
5
+ d="M7 13.99a1 1 0 0 1-1-1V5.4L3.54 7.86a1 1 0 0 1-1.42-1.41L6.3 2.28a1 1 0 0 1 1.41 0l4.17 4.17a1 1 0 1 1-1.41 1.41L8 5.4v7.59a1 1 0 0 1-1 1Z"
6
+ clip-rule="evenodd"
7
+ />
8
+ </svg>`;export{a as arrowTopSvg};
@@ -1,4 +1,4 @@
1
- import{w as o}from"./core-Cw7VIz-a.js";import"./index-DqdaAEyo.js";import"./index.es-Dajqanx_.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CzjJ6dvA.js";import"./clsx-B-dksMZM.js";import"./index-D5ERwHFX.js";import"./index-BwpQbdIU.js";const n=o`<svg
1
+ import{w as o}from"./core-z96MxYDt.js";import"./index-BG30WuBG.js";import"./index.es-CA2ape1X.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CAcvlKBB.js";import"./clsx-B-dksMZM.js";import"./index-BwpQbdIU.js";const m=o`<svg
2
2
  xmlns="http://www.w3.org/2000/svg"
3
3
  width="12"
4
4
  height="13"
@@ -11,4 +11,4 @@ import{w as o}from"./core-Cw7VIz-a.js";import"./index-DqdaAEyo.js";import"./inde
11
11
  d="M5.61391 1.57124C5.85142 1.42873 6.14813 1.42873 6.38564 1.57124L11.0793 4.38749C11.9179 4.89067 11.5612 6.17864 10.5832 6.17864H9.96398V10.0358H10.2854C10.6996 10.0358 11.0354 10.3716 11.0354 10.7858C11.0354 11.2 10.6996 11.5358 10.2854 11.5358H1.71416C1.29995 11.5358 0.964172 11.2 0.964172 10.7858C0.964172 10.3716 1.29995 10.0358 1.71416 10.0358H2.03558L2.03558 6.17864H1.41637C0.438389 6.17864 0.0816547 4.89066 0.920263 4.38749L5.61391 1.57124ZM3.53554 6.17864V10.0358H5.24979V6.17864H3.53554ZM6.74976 6.17864V10.0358H8.46401V6.17864H6.74976ZM8.64913 4.67864H3.35043L5.99978 3.089L8.64913 4.67864Z"
12
12
  fill="currentColor"
13
13
  /></svg
14
- >`;export{n as bankSvg};
14
+ >`;export{m as bankSvg};
@@ -1,4 +1,4 @@
1
- import{i as N,e as G,r as q,c as O,d as c,k as M,n as z,O as ee,q as k,E as te,R as U,z as Me,g as K,B as j,D as ft,t as yn,W as pt,C as Xt,h as mi,T as Zt,m as Xe,M as tn,F as nn,w as Ne,x as vi,f as xn}from"./core-Cw7VIz-a.js";import{n as u,c as T,o as W,r as I,U as he,e as Cn,f as Rn,a as $n}from"./index-CO2ldxDL.js";import{c3 as In}from"./index-DqdaAEyo.js";import{r as En}from"./dijkstra-COg3n3zL.js";import"./index.es-Dajqanx_.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CzjJ6dvA.js";import"./clsx-B-dksMZM.js";import"./index-D5ERwHFX.js";import"./index-BwpQbdIU.js";const Wn=N`
1
+ import{i as N,e as G,r as q,c as O,d as c,k as M,n as z,O as ee,q as k,E as te,R as U,z as Me,g as K,B as j,D as ft,t as yn,W as pt,C as Xt,h as mi,T as Zt,m as Xe,M as tn,F as nn,w as Ne,x as vi,f as xn}from"./core-z96MxYDt.js";import{n as u,c as T,o as W,r as I,U as he,e as Cn,f as Rn,a as $n}from"./index-FSpcDkTF.js";import{c3 as In}from"./index-BG30WuBG.js";import{r as En}from"./dijkstra-COg3n3zL.js";import"./index.es-CA2ape1X.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CAcvlKBB.js";import"./clsx-B-dksMZM.js";import"./index-BwpQbdIU.js";const Wn=N`
2
2
  :host {
3
3
  position: relative;
4
4
  background-color: var(--wui-color-gray-glass-002);
@@ -1,4 +1,4 @@
1
- import{w as o}from"./core-Cw7VIz-a.js";import"./index-DqdaAEyo.js";import"./index.es-Dajqanx_.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CzjJ6dvA.js";import"./clsx-B-dksMZM.js";import"./index-D5ERwHFX.js";import"./index-BwpQbdIU.js";const p=o`<svg fill="none" viewBox="0 0 20 20">
1
+ import{w as l}from"./core-z96MxYDt.js";import"./index-BG30WuBG.js";import"./index.es-CA2ape1X.js";import"./events-DQ172AOg.js";import"./en_US-Y4ZOVFV4-CAcvlKBB.js";import"./clsx-B-dksMZM.js";import"./index-BwpQbdIU.js";const m=l`<svg fill="none" viewBox="0 0 20 20">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -11,4 +11,4 @@ import{w as o}from"./core-Cw7VIz-a.js";import"./index-DqdaAEyo.js";import"./inde
11
11
  d="M6.03 8.63c-1.46-.3-2.72-.75-3.6-1.35l-.02-.01-.14-.11a1 1 0 0 1 1.2-1.6l.1.08c.6.4 1.52.74 2.69 1 .16-.99.39-1.88.67-2.65.3-.79.68-1.5 1.15-2.02A2.58 2.58 0 0 1 9.99 1c.8 0 1.45.44 1.92.97.47.52.84 1.23 1.14 2.02.29.77.52 1.66.68 2.64a8 8 0 0 0 2.7-1l.26-.18h.48a1 1 0 0 1 .12 2c-.86.51-2.01.91-3.34 1.18a22.24 22.24 0 0 1-.03 3.19c1.45.29 2.7.73 3.58 1.31a1 1 0 0 1-1.1 1.68c-.6-.4-1.56-.76-2.75-1-.15.8-.36 1.55-.6 2.2-.3.79-.67 1.5-1.14 2.02-.47.53-1.12.97-1.92.97-.8 0-1.45-.44-1.91-.97a6.51 6.51 0 0 1-1.15-2.02c-.24-.65-.44-1.4-.6-2.2-1.18.24-2.13.6-2.73.99a1 1 0 1 1-1.1-1.67c.88-.58 2.12-1.03 3.57-1.31a22.03 22.03 0 0 1-.04-3.2Zm2.2-1.7c.15-.86.34-1.61.58-2.24.24-.65.51-1.12.76-1.4.25-.28.4-.29.42-.29.03 0 .17.01.42.3.25.27.52.74.77 1.4.23.62.43 1.37.57 2.22a19.96 19.96 0 0 1-3.52 0Zm-.18 4.6a20.1 20.1 0 0 1-.03-2.62 21.95 21.95 0 0 0 3.94 0 20.4 20.4 0 0 1-.03 2.63 21.97 21.97 0 0 0-3.88 0Zm.27 2c.13.66.3 1.26.49 1.78.24.65.51 1.12.76 1.4.25.28.4.29.42.29.03 0 .17-.01.42-.3.25-.27.52-.74.77-1.4.19-.5.36-1.1.49-1.78a20.03 20.03 0 0 0-3.35 0Z"
12
12
  clip-rule="evenodd"
13
13
  />
14
- </svg>`;export{p as browserSvg};
14
+ </svg>`;export{m as browserSvg};