@dcl/marketplace-site 8.5.0 → 8.5.1-21680912652.commit-d48a892

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 (66) hide show
  1. package/assets/{ConstantsUtil-BBwoRzg5.js → ConstantsUtil-CZo4AIJN.js} +1 -1
  2. package/assets/{ContentfulRichText-BvUJdBw_.js → ContentfulRichText-CcgXNAID.js} +2 -2
  3. package/assets/{ExchangeController-DXanemuf.js → ExchangeController-B8c4o1BI.js} +1 -1
  4. package/assets/{HelpersUtil-D1jd3Yqr.js → HelpersUtil-CmP-jdyL.js} +1 -1
  5. package/assets/{NetworkUtil-DcSzNVLZ.js → NetworkUtil-DTyZ8q6D.js} +1 -1
  6. package/assets/{SwapController-BmC-cnFH.js → SwapController-Dpg4qslP.js} +1 -1
  7. package/assets/{ccip-zn8CxqCF.js → ccip-x9NJkiDS.js} +1 -1
  8. package/assets/{data-capture-DtKsWK_M.js → data-capture-Dktxal5Q.js} +1 -1
  9. package/assets/{email-DBBcqfrS.js → email-CU5S_Kp2.js} +1 -1
  10. package/assets/{embedded-wallet-3k9eoe5A.js → embedded-wallet-x9q-QPnQ.js} +1 -1
  11. package/assets/{features-CYkjdUvH.js → features-JeKogeSS.js} +1 -1
  12. package/assets/{fortmatic-3Thtf8_-.js → fortmatic-h3ZC4Qxl.js} +1 -1
  13. package/assets/{if-defined-CRKIxS50.js → if-defined-dvLamhup.js} +1 -1
  14. package/assets/{index-hXyE7xKv.js → index-A_tzhMTJ.js} +1 -1
  15. package/assets/{index-BJYoROjq.js → index-B6-Qkmcq.js} +1 -1
  16. package/assets/{index-FrEP3KYT.js → index-BC6KrNg-.js} +1 -1
  17. package/assets/{index-DK-RYAgi.js → index-BFPRjeCr.js} +1 -1
  18. package/assets/{index-Nx4uYLlw.js → index-BFi13ib0.js} +5 -5
  19. package/assets/{index-BZ2UYs0z.js → index-BFx8BKJa.js} +1 -1
  20. package/assets/{index-mWwhz_qL.js → index-BH9iPzOB.js} +1 -1
  21. package/assets/{index-asrlA7uZ.js → index-BKxESs1x.js} +1 -1
  22. package/assets/{index-DQQdbGoN.js → index-BMwgFyWK.js} +1 -1
  23. package/assets/{index-0PxbQuAu.js → index-BR6_L63H.js} +1 -1
  24. package/assets/{index-CN_MR9Dg.js → index-BUCVOGqS.js} +1 -1
  25. package/assets/{index-BvVQysP6.js → index-BkHskCCB.js} +1 -1
  26. package/assets/{index-D_3tHX1G.js → index-BkY9n4AL.js} +1 -1
  27. package/assets/{index-QN8TfcYg.js → index-BnWQs8n8.js} +63 -63
  28. package/assets/{index-CtykDCn5.js → index-BtywWPXW.js} +1 -1
  29. package/assets/{index-D5Mrbdyt.js → index-BwFmkp_P.js} +1 -1
  30. package/assets/{index-hq0ItLX_.js → index-CA2MJGUf.js} +1 -1
  31. package/assets/{index-CHDYdtG8.js → index-CQ3nL6LP.js} +1 -1
  32. package/assets/{index-CVPtBd5s.js → index-ClK6LpXx.js} +1 -1
  33. package/assets/{index-DzBOHR3n.js → index-CqjGZNEa.js} +1 -1
  34. package/assets/{index-CCR1vrpd.js → index-CsFJQVW9.js} +1 -1
  35. package/assets/{index-BQTHtUNO.js → index-CuASO_PR.js} +1 -1
  36. package/assets/{index-BFA6bhV1.js → index-DIXyWpWV.js} +1 -1
  37. package/assets/{index-rTZlN425.js → index-DWMScBBl.js} +1 -1
  38. package/assets/{index-B_GCj-no.js → index-D_yaETbS.js} +1 -1
  39. package/assets/{index-C0fZuqTE.js → index-DpAWrFke.js} +1 -1
  40. package/assets/{index-DSVb15t5.js → index-DtbpZVQD.js} +1 -1
  41. package/assets/{index-fzJguS3V.js → index-Dz2oqzTO.js} +1 -1
  42. package/assets/{index-9iyA552s.js → index-DzJ6Kk_r.js} +1 -1
  43. package/assets/{index-BheuGL3D.js → index-GQcRGldg.js} +1 -1
  44. package/assets/{index-BtagzXhz.js → index-R6WQ1mAt.js} +1 -1
  45. package/assets/{index-B3A91d1c.css → index-WwUvbsKI.css} +4 -4
  46. package/assets/{index-DMJy9o5I.js → index-YsNz8aIw.js} +1 -1
  47. package/assets/{index-DRqpoEMM.js → index-ZSLbHjYA.js} +1 -1
  48. package/assets/{index-D_FHYXgF.js → index-b4ng8nfw.js} +1 -1
  49. package/assets/{index-FfJQfBqc.js → index-fFuyW1Ck.js} +1 -1
  50. package/assets/{index-CCcjSx3c.js → index-mpYAIuJb.js} +1 -1
  51. package/assets/{index-4ODpqUWx.js → index-nRZfmszt.js} +1 -1
  52. package/assets/{networks-D5_63F9v.js → networks-C-3mHf2c.js} +1 -1
  53. package/assets/{onramp-CH9FX4Il.js → onramp-DHDL4G8R.js} +1 -1
  54. package/assets/{pay-with-exchange-DgG0QYLn.js → pay-with-exchange-BiR8Zuk5.js} +1 -1
  55. package/assets/{receive-BP1IM4GO.js → receive-BIMIAsnR.js} +1 -1
  56. package/assets/{ref-DdvOXIm7.js → ref-CmQS_rAF.js} +1 -1
  57. package/assets/{rich-text-react-renderer.es5-gcT0lGmL.js → rich-text-react-renderer.es5-D39CfQ30.js} +1 -1
  58. package/assets/{secp256k1-Bgr5OFi9.js → secp256k1-D12u7RHA.js} +1 -1
  59. package/assets/{send-BA8uWNzJ.js → send-gzAZPgPn.js} +1 -1
  60. package/assets/{socials-Tp04xgxP.js → socials-D7Yt2wn6.js} +1 -1
  61. package/assets/{swaps-BGWM8UP5.js → swaps-BaBlaLm8.js} +1 -1
  62. package/assets/{transactions-CQ-VMwfz.js → transactions-opuo2cbW.js} +1 -1
  63. package/assets/{verifyHash-ByJ7CBU6.js → verifyHash-vPuwxLHS.js} +3 -3
  64. package/assets/{w3m-modal-tNfANM3_.js → w3m-modal-DJ2DudpB.js} +1 -1
  65. package/index.html +5 -5
  66. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- import{a9 as Ft,L as H,aa as Na,ab as Sn,ac as Ta,ad as Pa,ae as yt,af as Oa,ag as Xo,b as _n,ah as kn,g as xa}from"./index-QN8TfcYg.js";function Fa(e,i){for(var t=0;t<i.length;t++){const r=i[t];if(typeof r!="string"&&!Array.isArray(r)){for(const h in r)if(h!=="default"&&!(h in e)){const u=Object.getOwnPropertyDescriptor(r,h);u&&Object.defineProperty(e,h,u.get?u:{enumerable:!0,get:()=>r[h]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Jt={},Fe={},Be={},Qn;function Ba(){if(Qn)return Be;Qn=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.walletLogo=void 0;const e=(i,t)=>{let r;switch(i){case"standard":return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};return Be.walletLogo=e,Be}var De={},Kn;function Da(){return Kn||(Kn=1,Object.defineProperty(De,"__esModule",{value:!0}),De.LINK_API_URL=void 0,De.LINK_API_URL="https://www.walletlink.org"),De}var P={},Gt={},de={},Xn;function Bt(){return Xn||(Xn=1,Object.defineProperty(de,"__esModule",{value:!0}),de.errorValues=de.standardErrorCodes=void 0,de.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}},de.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}}),de}var je={},Zt={},Yn;function In(){return Yn||(Yn=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=e.getErrorCode=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const i=Bt(),t="Unspecified error message.";e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function r(a,s=t){if(a&&Number.isInteger(a)){const p=a.toString();if(l(i.errorValues,p))return i.errorValues[p].message;if(f(a))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return s}e.getMessageFromCode=r;function h(a){if(!Number.isInteger(a))return!1;const s=a.toString();return!!(i.errorValues[s]||f(a))}e.isValidCode=h;function u(a){var s;if(typeof a=="number")return a;if(c(a))return(s=a.code)!==null&&s!==void 0?s:a.errorCode}e.getErrorCode=u;function c(a){return typeof a=="object"&&a!==null&&(typeof a.code=="number"||typeof a.errorCode=="number")}function g(a,{shouldIncludeStack:s=!1}={}){const p={};if(a&&typeof a=="object"&&!Array.isArray(a)&&l(a,"code")&&h(a.code)){const m=a;p.code=m.code,m.message&&typeof m.message=="string"?(p.message=m.message,l(m,"data")&&(p.data=m.data)):(p.message=r(p.code),p.data={originalError:o(a)})}else p.code=i.standardErrorCodes.rpc.internal,p.message=n(a,"message")?a.message:t,p.data={originalError:o(a)};return s&&(p.stack=n(a,"stack")?a.stack:void 0),p}e.serialize=g;function f(a){return a>=-32099&&a<=-32e3}function o(a){return a&&typeof a=="object"&&!Array.isArray(a)?Object.assign({},a):a}function l(a,s){return Object.prototype.hasOwnProperty.call(a,s)}function n(a,s){return typeof a=="object"&&a!==null&&s in a&&typeof a[s]=="string"}}(Zt)),Zt}var es;function ja(){if(es)return je;es=1,Object.defineProperty(je,"__esModule",{value:!0}),je.standardErrors=void 0;const e=Bt(),i=In();je.standardErrors={rpc:{parse:f=>t(e.standardErrorCodes.rpc.parse,f),invalidRequest:f=>t(e.standardErrorCodes.rpc.invalidRequest,f),invalidParams:f=>t(e.standardErrorCodes.rpc.invalidParams,f),methodNotFound:f=>t(e.standardErrorCodes.rpc.methodNotFound,f),internal:f=>t(e.standardErrorCodes.rpc.internal,f),server:f=>{if(!f||typeof f!="object"||Array.isArray(f))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:o}=f;if(!Number.isInteger(o)||o>-32005||o<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return t(o,f)},invalidInput:f=>t(e.standardErrorCodes.rpc.invalidInput,f),resourceNotFound:f=>t(e.standardErrorCodes.rpc.resourceNotFound,f),resourceUnavailable:f=>t(e.standardErrorCodes.rpc.resourceUnavailable,f),transactionRejected:f=>t(e.standardErrorCodes.rpc.transactionRejected,f),methodNotSupported:f=>t(e.standardErrorCodes.rpc.methodNotSupported,f),limitExceeded:f=>t(e.standardErrorCodes.rpc.limitExceeded,f)},provider:{userRejectedRequest:f=>r(e.standardErrorCodes.provider.userRejectedRequest,f),unauthorized:f=>r(e.standardErrorCodes.provider.unauthorized,f),unsupportedMethod:f=>r(e.standardErrorCodes.provider.unsupportedMethod,f),disconnected:f=>r(e.standardErrorCodes.provider.disconnected,f),chainDisconnected:f=>r(e.standardErrorCodes.provider.chainDisconnected,f),unsupportedChain:f=>r(e.standardErrorCodes.provider.unsupportedChain,f),custom:f=>{if(!f||typeof f!="object"||Array.isArray(f))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:o,message:l,data:n}=f;if(!l||typeof l!="string")throw new Error('"message" must be a nonempty string');return new c(o,l,n)}}};function t(f,o){const[l,n]=h(o);return new u(f,l||(0,i.getMessageFromCode)(f),n)}function r(f,o){const[l,n]=h(o);return new c(f,l||(0,i.getMessageFromCode)(f),n)}function h(f){if(f){if(typeof f=="string")return[f];if(typeof f=="object"&&!Array.isArray(f)){const{message:o,data:l}=f;if(o&&typeof o!="string")throw new Error("Must specify string message.");return[o||void 0,l]}}return[]}class u extends Error{constructor(o,l,n){if(!Number.isInteger(o))throw new Error('"code" must be an integer.');if(!l||typeof l!="string")throw new Error('"message" must be a nonempty string.');super(l),this.code=o,n!==void 0&&(this.data=n)}}class c extends u{constructor(o,l,n){if(!g(o))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(o,l,n)}}function g(f){return Number.isInteger(f)&&f>=1e3&&f<=4999}return je}var $e={},qe={},ts;function An(){if(ts)return qe;ts=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.isErrorResponse=void 0;function e(i){return i.errorMessage!==void 0}return qe.isErrorResponse=e,qe}var He={},rs;function Ln(){return rs||(rs=1,Object.defineProperty(He,"__esModule",{value:!0}),He.LIB_VERSION=void 0,He.LIB_VERSION="3.9.3"),He}var ns;function $a(){if(ns)return $e;ns=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.serializeError=void 0;const e=An(),i=Ln(),t=Bt(),r=In();function h(g,f){const o=(0,r.serialize)(u(g),{shouldIncludeStack:!0}),l=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");l.searchParams.set("version",i.LIB_VERSION),l.searchParams.set("code",o.code.toString());const n=c(o.data,f);return n&&l.searchParams.set("method",n),l.searchParams.set("message",o.message),Object.assign(Object.assign({},o),{docUrl:l.href})}$e.serializeError=h;function u(g){return typeof g=="string"?{message:g,code:t.standardErrorCodes.rpc.internal}:(0,e.isErrorResponse)(g)?Object.assign(Object.assign({},g),{message:g.errorMessage,code:g.errorCode,data:{method:g.method}}):g}function c(g,f){const o=g==null?void 0:g.method;if(o)return o;if(f!==void 0){if(typeof f=="string")return f;if(Array.isArray(f)){if(f.length>0)return f[0].method}else return f.method}}return $e}var ss;function Dt(){return ss||(ss=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=e.serializeError=e.getMessageFromCode=e.getErrorCode=void 0;const i=Bt();Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return i.standardErrorCodes}});const t=ja();Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return t.standardErrors}});const r=$a();Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}});const h=In();Object.defineProperty(e,"getErrorCode",{enumerable:!0,get:function(){return h.getErrorCode}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return h.getMessageFromCode}})}(Gt)),Gt}var J={},is;function jt(){if(is)return J;is=1,Object.defineProperty(J,"__esModule",{value:!0}),J.ProviderType=J.RegExpString=J.IntNumber=J.BigIntString=J.AddressString=J.HexString=J.OpaqueType=void 0;function e(){return r=>r}J.OpaqueType=e,J.HexString=e(),J.AddressString=e(),J.BigIntString=e();function i(r){return Math.floor(r)}J.IntNumber=i,J.RegExpString=e();var t;return function(r){r.CoinbaseWallet="CoinbaseWallet",r.MetaMask="MetaMask",r.Unselected=""}(t||(J.ProviderType=t={})),J}var os;function ae(){if(os)return P;os=1;var e=P&&P.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(P,"__esModule",{value:!0}),P.isMobileWeb=P.getLocation=P.isInIFrame=P.createQrUrl=P.getFavicon=P.range=P.isBigNumber=P.ensureParsedJSONObject=P.ensureBN=P.ensureRegExpString=P.ensureIntNumber=P.ensureBuffer=P.ensureAddressString=P.ensureEvenLengthHexString=P.ensureHexString=P.isHexString=P.prepend0x=P.strip0x=P.has0xPrefix=P.hexStringFromIntNumber=P.intNumberFromHexString=P.bigIntStringFromBN=P.hexStringFromBuffer=P.hexStringToUint8Array=P.uint8ArrayToHex=P.randomBytesHex=void 0;const i=e(Ft()),t=Dt(),r=jt(),h=/^[0-9]*$/,u=/^[a-f0-9]*$/;function c(R){return g(crypto.getRandomValues(new Uint8Array(R)))}P.randomBytesHex=c;function g(R){return[...R].map(I=>I.toString(16).padStart(2,"0")).join("")}P.uint8ArrayToHex=g;function f(R){return new Uint8Array(R.match(/.{1,2}/g).map(I=>parseInt(I,16)))}P.hexStringToUint8Array=f;function o(R,I=!1){const M=R.toString("hex");return(0,r.HexString)(I?`0x${M}`:M)}P.hexStringFromBuffer=o;function l(R){return(0,r.BigIntString)(R.toString(10))}P.bigIntStringFromBN=l;function n(R){return(0,r.IntNumber)(new i.default(w(R,!1),16).toNumber())}P.intNumberFromHexString=n;function a(R){return(0,r.HexString)(`0x${new i.default(R).toString(16)}`)}P.hexStringFromIntNumber=a;function s(R){return R.startsWith("0x")||R.startsWith("0X")}P.has0xPrefix=s;function p(R){return s(R)?R.slice(2):R}P.strip0x=p;function m(R){return s(R)?`0x${R.slice(2)}`:`0x${R}`}P.prepend0x=m;function b(R){if(typeof R!="string")return!1;const I=p(R).toLowerCase();return u.test(I)}P.isHexString=b;function d(R,I=!1){if(typeof R=="string"){const M=p(R).toLowerCase();if(u.test(M))return(0,r.HexString)(I?`0x${M}`:M)}throw t.standardErrors.rpc.invalidParams(`"${String(R)}" is not a hexadecimal string`)}P.ensureHexString=d;function w(R,I=!1){let M=d(R,!1);return M.length%2===1&&(M=(0,r.HexString)(`0${M}`)),I?(0,r.HexString)(`0x${M}`):M}P.ensureEvenLengthHexString=w;function y(R){if(typeof R=="string"){const I=p(R).toLowerCase();if(b(I)&&I.length===40)return(0,r.AddressString)(m(I))}throw t.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(R)}`)}P.ensureAddressString=y;function v(R){if(H.isBuffer(R))return R;if(typeof R=="string"){if(b(R)){const I=w(R,!1);return H.from(I,"hex")}return H.from(R,"utf8")}throw t.standardErrors.rpc.invalidParams(`Not binary data: ${String(R)}`)}P.ensureBuffer=v;function E(R){if(typeof R=="number"&&Number.isInteger(R))return(0,r.IntNumber)(R);if(typeof R=="string"){if(h.test(R))return(0,r.IntNumber)(Number(R));if(b(R))return(0,r.IntNumber)(new i.default(w(R,!1),16).toNumber())}throw t.standardErrors.rpc.invalidParams(`Not an integer: ${String(R)}`)}P.ensureIntNumber=E;function C(R){if(R instanceof RegExp)return(0,r.RegExpString)(R.toString());throw t.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(R)}`)}P.ensureRegExpString=C;function _(R){if(R!==null&&(i.default.isBN(R)||T(R)))return new i.default(R.toString(10),10);if(typeof R=="number")return new i.default(E(R));if(typeof R=="string"){if(h.test(R))return new i.default(R,10);if(b(R))return new i.default(w(R,!1),16)}throw t.standardErrors.rpc.invalidParams(`Not an integer: ${String(R)}`)}P.ensureBN=_;function S(R){if(typeof R=="string")return JSON.parse(R);if(typeof R=="object")return R;throw t.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(R)}`)}P.ensureParsedJSONObject=S;function T(R){if(R==null||typeof R.constructor!="function")return!1;const{constructor:I}=R;return typeof I.config=="function"&&typeof I.EUCLID=="number"}P.isBigNumber=T;function N(R,I){return Array.from({length:I-R},(M,L)=>R+L)}P.range=N;function x(){const R=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:I,host:M}=document.location,L=R?R.getAttribute("href"):null;return!L||L.startsWith("javascript:")||L.startsWith("vbscript:")?null:L.startsWith("http://")||L.startsWith("https://")||L.startsWith("data:")?L:L.startsWith("//")?I+L:`${I}//${M}${L}`}P.getFavicon=x;function B(R,I,M,L,O,j){const F=L?"parent-id":"id",$=new URLSearchParams({[F]:R,secret:I,server:M,v:O,chainId:j.toString()}).toString();return`${M}/#/link?${$}`}P.createQrUrl=B;function W(){try{return window.frameElement!==null}catch{return!1}}P.isInIFrame=W;function A(){try{return W()&&window.top?window.top.location:window.location}catch{return window.location}}P.getLocation=A;function k(){var R;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((R=window==null?void 0:window.navigator)===null||R===void 0?void 0:R.userAgent)}return P.isMobileWeb=k,P}var Ue={},as;function qa(){if(as)return Ue;as=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.ScopedLocalStorage=void 0;let e=class{constructor(t){this.scope=t}setItem(t,r){localStorage.setItem(this.scopedKey(t),r)}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t))}clear(){const t=this.scopedKey(""),r=[];for(let h=0;h<localStorage.length;h++){const u=localStorage.key(h);typeof u=="string"&&u.startsWith(t)&&r.push(u)}r.forEach(h=>localStorage.removeItem(h))}scopedKey(t){return`${this.scope}:${t}`}};return Ue.ScopedLocalStorage=e,Ue}var he={},Qt={exports:{}},cs;function Ha(){return cs||(cs=1,function(e){var i=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function h(f,o,l){this.fn=f,this.context=o,this.once=l||!1}function u(f,o,l,n,a){if(typeof l!="function")throw new TypeError("The listener must be a function");var s=new h(l,n||f,a),p=t?t+o:o;return f._events[p]?f._events[p].fn?f._events[p]=[f._events[p],s]:f._events[p].push(s):(f._events[p]=s,f._eventsCount++),f}function c(f,o){--f._eventsCount===0?f._events=new r:delete f._events[o]}function g(){this._events=new r,this._eventsCount=0}g.prototype.eventNames=function(){var o=[],l,n;if(this._eventsCount===0)return o;for(n in l=this._events)i.call(l,n)&&o.push(t?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(l)):o},g.prototype.listeners=function(o){var l=t?t+o:o,n=this._events[l];if(!n)return[];if(n.fn)return[n.fn];for(var a=0,s=n.length,p=new Array(s);a<s;a++)p[a]=n[a].fn;return p},g.prototype.listenerCount=function(o){var l=t?t+o:o,n=this._events[l];return n?n.fn?1:n.length:0},g.prototype.emit=function(o,l,n,a,s,p){var m=t?t+o:o;if(!this._events[m])return!1;var b=this._events[m],d=arguments.length,w,y;if(b.fn){switch(b.once&&this.removeListener(o,b.fn,void 0,!0),d){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,l),!0;case 3:return b.fn.call(b.context,l,n),!0;case 4:return b.fn.call(b.context,l,n,a),!0;case 5:return b.fn.call(b.context,l,n,a,s),!0;case 6:return b.fn.call(b.context,l,n,a,s,p),!0}for(y=1,w=new Array(d-1);y<d;y++)w[y-1]=arguments[y];b.fn.apply(b.context,w)}else{var v=b.length,E;for(y=0;y<v;y++)switch(b[y].once&&this.removeListener(o,b[y].fn,void 0,!0),d){case 1:b[y].fn.call(b[y].context);break;case 2:b[y].fn.call(b[y].context,l);break;case 3:b[y].fn.call(b[y].context,l,n);break;case 4:b[y].fn.call(b[y].context,l,n,a);break;default:if(!w)for(E=1,w=new Array(d-1);E<d;E++)w[E-1]=arguments[E];b[y].fn.apply(b[y].context,w)}}return!0},g.prototype.on=function(o,l,n){return u(this,o,l,n,!1)},g.prototype.once=function(o,l,n){return u(this,o,l,n,!0)},g.prototype.removeListener=function(o,l,n,a){var s=t?t+o:o;if(!this._events[s])return this;if(!l)return c(this,s),this;var p=this._events[s];if(p.fn)p.fn===l&&(!a||p.once)&&(!n||p.context===n)&&c(this,s);else{for(var m=0,b=[],d=p.length;m<d;m++)(p[m].fn!==l||a&&!p[m].once||n&&p[m].context!==n)&&b.push(p[m]);b.length?this._events[s]=b.length===1?b[0]:b:c(this,s)}return this},g.prototype.removeAllListeners=function(o){var l;return o?(l=t?t+o:o,this._events[l]&&c(this,l)):(this._events=new r,this._eventsCount=0),this},g.prototype.off=g.prototype.removeListener,g.prototype.addListener=g.prototype.on,g.prefixed=t,g.EventEmitter=g,e.exports=g}(Qt)),Qt.exports}var We={},Ve={},ze={},us;function Mn(){return us||(us=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.EVENTS=void 0,ze.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}),ze}var X={},ls;function Nn(){if(ls)return X;ls=1,Object.defineProperty(X,"__esModule",{value:!0}),X.RelayAbstract=X.APP_VERSION_KEY=X.LOCAL_STORAGE_ADDRESSES_KEY=X.WALLET_USER_NAME_KEY=void 0;const e=Dt();X.WALLET_USER_NAME_KEY="walletUsername",X.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",X.APP_VERSION_KEY="AppVersion";let i=class{async makeEthereumJSONRPCRequest(r,h){if(!h)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(h,{method:"POST",body:JSON.stringify(r),mode:"cors",headers:{"Content-Type":"application/json"}}).then(u=>u.json()).then(u=>{if(!u)throw e.standardErrors.rpc.parse({});const c=u,{error:g}=c;if(g)throw(0,e.serializeError)(g,r.method);return c})}};return X.RelayAbstract=i,X}var Je={},ds;function Tn(){if(ds)return Je;ds=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.Session=void 0;const e=Na(),i=ae(),t="session:id",r="session:secret",h="session:linked";let u=class Yo{constructor(g,f,o,l){this._storage=g,this._id=f||(0,i.randomBytesHex)(16),this._secret=o||(0,i.randomBytesHex)(32),this._key=new e.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!l}static load(g){const f=g.getItem(t),o=g.getItem(h),l=g.getItem(r);return f&&l?new Yo(g,f,l,o==="1"):null}static hash(g){return new e.sha256().update(g).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(g){this._linked=g,this.persistLinked()}save(){return this._storage.setItem(t,this._id),this._storage.setItem(r,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(h,this._linked?"1":"0")}};return Je.Session=u,Je}var Ge={},Ze={},hs;function Ua(){if(hs)return Ze;hs=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.Cipher=void 0;const e=ae();let i=class{constructor(r){this.secret=r}async encrypt(r){const h=this.secret;if(h.length!==64)throw Error("secret must be 256 bits");const u=crypto.getRandomValues(new Uint8Array(12)),c=await crypto.subtle.importKey("raw",(0,e.hexStringToUint8Array)(h),{name:"aes-gcm"},!1,["encrypt","decrypt"]),g=new TextEncoder,f=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:u},c,g.encode(r)),o=16,l=f.slice(f.byteLength-o),n=f.slice(0,f.byteLength-o),a=new Uint8Array(l),s=new Uint8Array(n),p=new Uint8Array([...u,...a,...s]);return(0,e.uint8ArrayToHex)(p)}async decrypt(r){const h=this.secret;if(h.length!==64)throw Error("secret must be 256 bits");return new Promise((u,c)=>{(async function(){const g=await crypto.subtle.importKey("raw",(0,e.hexStringToUint8Array)(h),{name:"aes-gcm"},!1,["encrypt","decrypt"]),f=(0,e.hexStringToUint8Array)(r),o=f.slice(0,12),l=f.slice(12,28),n=f.slice(28),a=new Uint8Array([...n,...l]),s={name:"AES-GCM",iv:new Uint8Array(o)};try{const p=await window.crypto.subtle.decrypt(s,g,a),m=new TextDecoder;u(m.decode(p))}catch(p){c(p)}})()})}};return Ze.Cipher=i,Ze}var Qe={},fs;function Wa(){if(fs)return Qe;fs=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.WalletLinkHTTP=void 0;let e=class{constructor(t,r,h){this.linkAPIUrl=t,this.sessionId=r;const u=`${r}:${h}`;this.auth=`Basic ${btoa(u)}`}async markUnseenEventsAsSeen(t){return Promise.all(t.map(r=>fetch(`${this.linkAPIUrl}/events/${r.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(r=>console.error("Unabled to mark event as failed:",r))}async fetchUnseenEvents(){var t;const r=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(r.ok){const{events:h,error:u}=await r.json();if(u)throw new Error(`Check unseen events failed: ${u}`);const c=(t=h==null?void 0:h.filter(g=>g.event==="Web3Response").map(g=>({type:"Event",sessionId:this.sessionId,eventId:g.id,event:g.event,data:g.data})))!==null&&t!==void 0?t:[];return this.markUnseenEventsAsSeen(c),c}throw new Error(`Check unseen events failed: ${r.status}`)}};return Qe.WalletLinkHTTP=e,Qe}var fe={},gs;function Va(){if(gs)return fe;gs=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.WalletLinkWebSocket=fe.ConnectionState=void 0;var e;(function(t){t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED"})(e||(fe.ConnectionState=e={}));let i=class{setConnectionStateListener(r){this.connectionStateListener=r}setIncomingDataListener(r){this.incomingDataListener=r}constructor(r,h=WebSocket){this.WebSocketClass=h,this.webSocket=null,this.pendingData=[],this.url=r.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((r,h)=>{var u;let c;try{this.webSocket=c=new this.WebSocketClass(this.url)}catch(g){h(g);return}(u=this.connectionStateListener)===null||u===void 0||u.call(this,e.CONNECTING),c.onclose=g=>{var f;this.clearWebSocket(),h(new Error(`websocket error ${g.code}: ${g.reason}`)),(f=this.connectionStateListener)===null||f===void 0||f.call(this,e.DISCONNECTED)},c.onopen=g=>{var f;r(),(f=this.connectionStateListener)===null||f===void 0||f.call(this,e.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(l=>this.sendData(l)),this.pendingData=[])},c.onmessage=g=>{var f,o;if(g.data==="h")(f=this.incomingDataListener)===null||f===void 0||f.call(this,{type:"Heartbeat"});else try{const l=JSON.parse(g.data);(o=this.incomingDataListener)===null||o===void 0||o.call(this,l)}catch{}}})}disconnect(){var r;const{webSocket:h}=this;if(h){this.clearWebSocket(),(r=this.connectionStateListener)===null||r===void 0||r.call(this,e.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{h.close()}catch{}}}sendData(r){const{webSocket:h}=this;if(!h){this.pendingData.push(r),this.connect();return}h.send(r)}clearWebSocket(){const{webSocket:r}=this;r&&(this.webSocket=null,r.onclose=null,r.onerror=null,r.onmessage=null,r.onopen=null)}};return fe.WalletLinkWebSocket=i,fe}var ps;function za(){if(ps)return Ge;ps=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.WalletLinkConnection=void 0;const e=jt(),i=Ua(),t=Mn(),r=Nn(),h=Tn(),u=Wa(),c=Va(),g=1e4,f=6e4;let o=class{constructor({session:n,linkAPIUrl:a,listener:s,diagnostic:p,WebSocketClass:m=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,e.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=d=>{if(!d)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",y=>d.JsonRpcUrl&&this.handleChainUpdated(y,d.JsonRpcUrl)]]).forEach((y,v)=>{const E=d[v];E!==void 0&&y(E)})},this.handleDestroyed=d=>{var w,y;d==="1"&&((w=this.listener)===null||w===void 0||w.resetAndReload(),(y=this.diagnostic)===null||y===void 0||y.log(t.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:h.Session.hash(this.session.id)}))},this.handleAccountUpdated=async d=>{var w,y;try{const v=await this.cipher.decrypt(d);(w=this.listener)===null||w===void 0||w.accountUpdated(v)}catch{(y=this.diagnostic)===null||y===void 0||y.log(t.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(d,w)=>{var y,v;try{const E=await this.cipher.decrypt(w);(y=this.listener)===null||y===void 0||y.metadataUpdated(d,E)}catch{(v=this.diagnostic)===null||v===void 0||v.log(t.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:d})}},this.handleWalletUsernameUpdated=async d=>{this.handleMetadataUpdated(r.WALLET_USER_NAME_KEY,d)},this.handleAppVersionUpdated=async d=>{this.handleMetadataUpdated(r.APP_VERSION_KEY,d)},this.handleChainUpdated=async(d,w)=>{var y,v;try{const E=await this.cipher.decrypt(d),C=await this.cipher.decrypt(w);(y=this.listener)===null||y===void 0||y.chainUpdated(E,C)}catch{(v=this.diagnostic)===null||v===void 0||v.log(t.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=n,this.cipher=new i.Cipher(n.secret),this.diagnostic=p,this.listener=s;const b=new c.WalletLinkWebSocket(`${a}/rpc`,m);b.setConnectionStateListener(async d=>{var w;(w=this.diagnostic)===null||w===void 0||w.log(t.EVENTS.CONNECTED_STATE_CHANGE,{state:d,sessionIdHash:h.Session.hash(n.id)});let y=!1;switch(d){case c.ConnectionState.DISCONNECTED:if(!this.destroyed){const v=async()=>{await new Promise(E=>setTimeout(E,5e3)),this.destroyed||b.connect().catch(()=>{v()})};v()}break;case c.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),y=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},g),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case c.ConnectionState.CONNECTING:break}this.connected!==y&&(this.connected=y)}),b.setIncomingDataListener(d=>{var w,y,v;switch(d.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const E=d.type==="IsLinkedOK"?d.linked:void 0;(w=this.diagnostic)===null||w===void 0||w.log(t.EVENTS.LINKED,{sessionIdHash:h.Session.hash(n.id),linked:E,type:d.type,onlineGuests:d.onlineGuests}),this.linked=E||d.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{(y=this.diagnostic)===null||y===void 0||y.log(t.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:h.Session.hash(n.id),metadata_keys:d&&d.metadata?Object.keys(d.metadata):void 0}),this.handleSessionMetadataUpdated(d.metadata);break}case"Event":{this.handleIncomingEvent(d);break}}d.id!==void 0&&((v=this.requestResolutions.get(d.id))===null||v===void 0||v(d))}),this.ws=b,this.http=new u.WalletLinkHTTP(a,n.id,n.key)}connect(){var n;if(this.destroyed)throw new Error("instance is destroyed");(n=this.diagnostic)===null||n===void 0||n.log(t.EVENTS.STARTED_CONNECTING,{sessionIdHash:h.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var n;this.destroyed=!0,this.ws.disconnect(),(n=this.diagnostic)===null||n===void 0||n.log(t.EVENTS.DISCONNECTED,{sessionIdHash:h.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(n){var a,s;this._connected=n,n&&((a=this.onceConnected)===null||a===void 0||a.call(this)),(s=this.listener)===null||s===void 0||s.connectedUpdated(n)}setOnceConnected(n){return new Promise(a=>{this.connected?n().then(a):this.onceConnected=()=>{n().then(a),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(n){var a,s;this._linked=n,n&&((a=this.onceLinked)===null||a===void 0||a.call(this)),(s=this.listener)===null||s===void 0||s.linkedUpdated(n)}setOnceLinked(n){return new Promise(a=>{this.linked?n().then(a):this.onceLinked=()=>{n().then(a),this.onceLinked=void 0}})}async handleIncomingEvent(n){var a,s;if(!(n.type!=="Event"||n.event!=="Web3Response"))try{const p=await this.cipher.decrypt(n.data),m=JSON.parse(p);if(m.type!=="WEB3_RESPONSE")return;(a=this.listener)===null||a===void 0||a.handleWeb3ResponseMessage(m)}catch{(s=this.diagnostic)===null||s===void 0||s.log(t.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(n=>setTimeout(n,250));try{await this.fetchUnseenEventsAPI()}catch(n){console.error("Unable to check for unseen events",n)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(a=>this.handleIncomingEvent(a))}async setSessionMetadata(n,a){const s={type:"SetSessionConfig",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[n]:a}};return this.setOnceConnected(async()=>{const p=await this.makeRequest(s);if(p.type==="Fail")throw new Error(p.error||"failed to set session metadata")})}async publishEvent(n,a,s=!1){const p=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},a),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),m={type:"PublishEvent",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:n,data:p,callWebhook:s};return this.setOnceLinked(async()=>{const b=await this.makeRequest(m);if(b.type==="Fail")throw new Error(b.error||"failed to publish event");return b.eventId})}sendData(n){this.ws.sendData(JSON.stringify(n))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>g*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(n,a=f){const s=n.id;this.sendData(n);let p;return Promise.race([new Promise((m,b)=>{p=window.setTimeout(()=>{b(new Error(`request ${s} timed out`))},a)}),new Promise(m=>{this.requestResolutions.set(s,b=>{clearTimeout(p),m(b),this.requestResolutions.delete(s)})})])}async authenticate(){const n={type:"HostSession",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},a=await this.makeRequest(n);if(a.type==="Fail")throw new Error(a.error||"failed to authentcate")}sendIsLinked(){const n={type:"IsLinked",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(n)}sendGetSessionConfig(){const n={type:"GetSessionConfig",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(n)}};return Ge.WalletLinkConnection=o,Ge}var Ke={},ge={},Rt={},ms;function Ja(){return ms||(ms=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'),Rt}var bs;function ea(){if(bs)return ge;bs=1;var e=ge&&ge.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ge,"__esModule",{value:!0}),ge.injectCssReset=void 0;const i=e(Ja());function t(){const r=document.createElement("style");r.type="text/css",r.appendChild(document.createTextNode(i.default)),document.documentElement.appendChild(r)}return ge.injectCssReset=t,ge}var Xe={};const Z=Sn(Ta);var pe={};const $t=Sn(Pa);var ie={},Ye={},ys;function Ga(){if(ys)return Ye;ys=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.CloseIcon=void 0;const e=Z;function i(t){return(0,e.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),(0,e.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}return Ye.CloseIcon=i,Ye}var et={},ws;function Za(){if(ws)return et;ws=1,Object.defineProperty(et,"__esModule",{value:!0}),et.CoinbaseWalletRound=void 0;const e=Z;function i(t){return(0,e.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),(0,e.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,e.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,e.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}return et.CoinbaseWalletRound=i,et}var tt={},vs;function Qa(){if(vs)return tt;vs=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.QRCodeIcon=void 0;const e=Z;function i(t){return(0,e.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t),(0,e.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,e.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,e.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,e.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}return tt.QRCodeIcon=i,tt}var me={},Kt,Es;function Ka(){if(Es)return Kt;Es=1;function e(s){this.mode=t.MODE_8BIT_BYTE,this.data=s,this.parsedData=[];for(var p=0,m=this.data.length;p<m;p++){var b=[],d=this.data.charCodeAt(p);d>65536?(b[0]=240|(d&1835008)>>>18,b[1]=128|(d&258048)>>>12,b[2]=128|(d&4032)>>>6,b[3]=128|d&63):d>2048?(b[0]=224|(d&61440)>>>12,b[1]=128|(d&4032)>>>6,b[2]=128|d&63):d>128?(b[0]=192|(d&1984)>>>6,b[1]=128|d&63):b[0]=d,this.parsedData.push(b)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}e.prototype={getLength:function(s){return this.parsedData.length},write:function(s){for(var p=0,m=this.parsedData.length;p<m;p++)s.put(this.parsedData[p],8)}};function i(s,p){this.typeNumber=s,this.errorCorrectLevel=p,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}i.prototype={addData:function(s){var p=new e(s);this.dataList.push(p),this.dataCache=null},isDark:function(s,p){if(s<0||this.moduleCount<=s||p<0||this.moduleCount<=p)throw new Error(s+","+p);return this.modules[s][p]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(s,p){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var m=0;m<this.moduleCount;m++){this.modules[m]=new Array(this.moduleCount);for(var b=0;b<this.moduleCount;b++)this.modules[m][b]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(s,p),this.typeNumber>=7&&this.setupTypeNumber(s),this.dataCache==null&&(this.dataCache=i.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,p)},setupPositionProbePattern:function(s,p){for(var m=-1;m<=7;m++)if(!(s+m<=-1||this.moduleCount<=s+m))for(var b=-1;b<=7;b++)p+b<=-1||this.moduleCount<=p+b||(0<=m&&m<=6&&(b==0||b==6)||0<=b&&b<=6&&(m==0||m==6)||2<=m&&m<=4&&2<=b&&b<=4?this.modules[s+m][p+b]=!0:this.modules[s+m][p+b]=!1)},getBestMaskPattern:function(){for(var s=0,p=0,m=0;m<8;m++){this.makeImpl(!0,m);var b=u.getLostPoint(this);(m==0||s>b)&&(s=b,p=m)}return p},createMovieClip:function(s,p,m){var b=s.createEmptyMovieClip(p,m),d=1;this.make();for(var w=0;w<this.modules.length;w++)for(var y=w*d,v=0;v<this.modules[w].length;v++){var E=v*d,C=this.modules[w][v];C&&(b.beginFill(0,100),b.moveTo(E,y),b.lineTo(E+d,y),b.lineTo(E+d,y+d),b.lineTo(E,y+d),b.endFill())}return b},setupTimingPattern:function(){for(var s=8;s<this.moduleCount-8;s++)this.modules[s][6]==null&&(this.modules[s][6]=s%2==0);for(var p=8;p<this.moduleCount-8;p++)this.modules[6][p]==null&&(this.modules[6][p]=p%2==0)},setupPositionAdjustPattern:function(){for(var s=u.getPatternPosition(this.typeNumber),p=0;p<s.length;p++)for(var m=0;m<s.length;m++){var b=s[p],d=s[m];if(this.modules[b][d]==null)for(var w=-2;w<=2;w++)for(var y=-2;y<=2;y++)w==-2||w==2||y==-2||y==2||w==0&&y==0?this.modules[b+w][d+y]=!0:this.modules[b+w][d+y]=!1}},setupTypeNumber:function(s){for(var p=u.getBCHTypeNumber(this.typeNumber),m=0;m<18;m++){var b=!s&&(p>>m&1)==1;this.modules[Math.floor(m/3)][m%3+this.moduleCount-8-3]=b}for(var m=0;m<18;m++){var b=!s&&(p>>m&1)==1;this.modules[m%3+this.moduleCount-8-3][Math.floor(m/3)]=b}},setupTypeInfo:function(s,p){for(var m=this.errorCorrectLevel<<3|p,b=u.getBCHTypeInfo(m),d=0;d<15;d++){var w=!s&&(b>>d&1)==1;d<6?this.modules[d][8]=w:d<8?this.modules[d+1][8]=w:this.modules[this.moduleCount-15+d][8]=w}for(var d=0;d<15;d++){var w=!s&&(b>>d&1)==1;d<8?this.modules[8][this.moduleCount-d-1]=w:d<9?this.modules[8][15-d-1+1]=w:this.modules[8][15-d-1]=w}this.modules[this.moduleCount-8][8]=!s},mapData:function(s,p){for(var m=-1,b=this.moduleCount-1,d=7,w=0,y=this.moduleCount-1;y>0;y-=2)for(y==6&&y--;;){for(var v=0;v<2;v++)if(this.modules[b][y-v]==null){var E=!1;w<s.length&&(E=(s[w]>>>d&1)==1);var C=u.getMask(p,b,y-v);C&&(E=!E),this.modules[b][y-v]=E,d--,d==-1&&(w++,d=7)}if(b+=m,b<0||this.moduleCount<=b){b-=m,m=-m;break}}}},i.PAD0=236,i.PAD1=17,i.createData=function(s,p,m){for(var b=o.getRSBlocks(s,p),d=new l,w=0;w<m.length;w++){var y=m[w];d.put(y.mode,4),d.put(y.getLength(),u.getLengthInBits(y.mode,s)),y.write(d)}for(var v=0,w=0;w<b.length;w++)v+=b[w].dataCount;if(d.getLengthInBits()>v*8)throw new Error("code length overflow. ("+d.getLengthInBits()+">"+v*8+")");for(d.getLengthInBits()+4<=v*8&&d.put(0,4);d.getLengthInBits()%8!=0;)d.putBit(!1);for(;!(d.getLengthInBits()>=v*8||(d.put(i.PAD0,8),d.getLengthInBits()>=v*8));)d.put(i.PAD1,8);return i.createBytes(d,b)},i.createBytes=function(s,p){for(var m=0,b=0,d=0,w=new Array(p.length),y=new Array(p.length),v=0;v<p.length;v++){var E=p[v].dataCount,C=p[v].totalCount-E;b=Math.max(b,E),d=Math.max(d,C),w[v]=new Array(E);for(var _=0;_<w[v].length;_++)w[v][_]=255&s.buffer[_+m];m+=E;var S=u.getErrorCorrectPolynomial(C),T=new f(w[v],S.getLength()-1),N=T.mod(S);y[v]=new Array(S.getLength()-1);for(var _=0;_<y[v].length;_++){var x=_+N.getLength()-y[v].length;y[v][_]=x>=0?N.get(x):0}}for(var B=0,_=0;_<p.length;_++)B+=p[_].totalCount;for(var W=new Array(B),A=0,_=0;_<b;_++)for(var v=0;v<p.length;v++)_<w[v].length&&(W[A++]=w[v][_]);for(var _=0;_<d;_++)for(var v=0;v<p.length;v++)_<y[v].length&&(W[A++]=y[v][_]);return W};for(var t={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},r={L:1,M:0,Q:3,H:2},h={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},u={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(s){for(var p=s<<10;u.getBCHDigit(p)-u.getBCHDigit(u.G15)>=0;)p^=u.G15<<u.getBCHDigit(p)-u.getBCHDigit(u.G15);return(s<<10|p)^u.G15_MASK},getBCHTypeNumber:function(s){for(var p=s<<12;u.getBCHDigit(p)-u.getBCHDigit(u.G18)>=0;)p^=u.G18<<u.getBCHDigit(p)-u.getBCHDigit(u.G18);return s<<12|p},getBCHDigit:function(s){for(var p=0;s!=0;)p++,s>>>=1;return p},getPatternPosition:function(s){return u.PATTERN_POSITION_TABLE[s-1]},getMask:function(s,p,m){switch(s){case h.PATTERN000:return(p+m)%2==0;case h.PATTERN001:return p%2==0;case h.PATTERN010:return m%3==0;case h.PATTERN011:return(p+m)%3==0;case h.PATTERN100:return(Math.floor(p/2)+Math.floor(m/3))%2==0;case h.PATTERN101:return p*m%2+p*m%3==0;case h.PATTERN110:return(p*m%2+p*m%3)%2==0;case h.PATTERN111:return(p*m%3+(p+m)%2)%2==0;default:throw new Error("bad maskPattern:"+s)}},getErrorCorrectPolynomial:function(s){for(var p=new f([1],0),m=0;m<s;m++)p=p.multiply(new f([1,c.gexp(m)],0));return p},getLengthInBits:function(s,p){if(1<=p&&p<10)switch(s){case t.MODE_NUMBER:return 10;case t.MODE_ALPHA_NUM:return 9;case t.MODE_8BIT_BYTE:return 8;case t.MODE_KANJI:return 8;default:throw new Error("mode:"+s)}else if(p<27)switch(s){case t.MODE_NUMBER:return 12;case t.MODE_ALPHA_NUM:return 11;case t.MODE_8BIT_BYTE:return 16;case t.MODE_KANJI:return 10;default:throw new Error("mode:"+s)}else if(p<41)switch(s){case t.MODE_NUMBER:return 14;case t.MODE_ALPHA_NUM:return 13;case t.MODE_8BIT_BYTE:return 16;case t.MODE_KANJI:return 12;default:throw new Error("mode:"+s)}else throw new Error("type:"+p)},getLostPoint:function(s){for(var p=s.getModuleCount(),m=0,b=0;b<p;b++)for(var d=0;d<p;d++){for(var w=0,y=s.isDark(b,d),v=-1;v<=1;v++)if(!(b+v<0||p<=b+v))for(var E=-1;E<=1;E++)d+E<0||p<=d+E||v==0&&E==0||y==s.isDark(b+v,d+E)&&w++;w>5&&(m+=3+w-5)}for(var b=0;b<p-1;b++)for(var d=0;d<p-1;d++){var C=0;s.isDark(b,d)&&C++,s.isDark(b+1,d)&&C++,s.isDark(b,d+1)&&C++,s.isDark(b+1,d+1)&&C++,(C==0||C==4)&&(m+=3)}for(var b=0;b<p;b++)for(var d=0;d<p-6;d++)s.isDark(b,d)&&!s.isDark(b,d+1)&&s.isDark(b,d+2)&&s.isDark(b,d+3)&&s.isDark(b,d+4)&&!s.isDark(b,d+5)&&s.isDark(b,d+6)&&(m+=40);for(var d=0;d<p;d++)for(var b=0;b<p-6;b++)s.isDark(b,d)&&!s.isDark(b+1,d)&&s.isDark(b+2,d)&&s.isDark(b+3,d)&&s.isDark(b+4,d)&&!s.isDark(b+5,d)&&s.isDark(b+6,d)&&(m+=40);for(var _=0,d=0;d<p;d++)for(var b=0;b<p;b++)s.isDark(b,d)&&_++;var S=Math.abs(100*_/p/p-50)/5;return m+=S*10,m}},c={glog:function(s){if(s<1)throw new Error("glog("+s+")");return c.LOG_TABLE[s]},gexp:function(s){for(;s<0;)s+=255;for(;s>=256;)s-=255;return c.EXP_TABLE[s]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},g=0;g<8;g++)c.EXP_TABLE[g]=1<<g;for(var g=8;g<256;g++)c.EXP_TABLE[g]=c.EXP_TABLE[g-4]^c.EXP_TABLE[g-5]^c.EXP_TABLE[g-6]^c.EXP_TABLE[g-8];for(var g=0;g<255;g++)c.LOG_TABLE[c.EXP_TABLE[g]]=g;function f(s,p){if(s.length==null)throw new Error(s.length+"/"+p);for(var m=0;m<s.length&&s[m]==0;)m++;this.num=new Array(s.length-m+p);for(var b=0;b<s.length-m;b++)this.num[b]=s[b+m]}f.prototype={get:function(s){return this.num[s]},getLength:function(){return this.num.length},multiply:function(s){for(var p=new Array(this.getLength()+s.getLength()-1),m=0;m<this.getLength();m++)for(var b=0;b<s.getLength();b++)p[m+b]^=c.gexp(c.glog(this.get(m))+c.glog(s.get(b)));return new f(p,0)},mod:function(s){if(this.getLength()-s.getLength()<0)return this;for(var p=c.glog(this.get(0))-c.glog(s.get(0)),m=new Array(this.getLength()),b=0;b<this.getLength();b++)m[b]=this.get(b);for(var b=0;b<s.getLength();b++)m[b]^=c.gexp(c.glog(s.get(b))+p);return new f(m,0).mod(s)}};function o(s,p){this.totalCount=s,this.dataCount=p}o.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],o.getRSBlocks=function(s,p){var m=o.getRsBlockTable(s,p);if(m==null)throw new Error("bad rs block @ typeNumber:"+s+"/errorCorrectLevel:"+p);for(var b=m.length/3,d=[],w=0;w<b;w++)for(var y=m[w*3+0],v=m[w*3+1],E=m[w*3+2],C=0;C<y;C++)d.push(new o(v,E));return d},o.getRsBlockTable=function(s,p){switch(p){case r.L:return o.RS_BLOCK_TABLE[(s-1)*4+0];case r.M:return o.RS_BLOCK_TABLE[(s-1)*4+1];case r.Q:return o.RS_BLOCK_TABLE[(s-1)*4+2];case r.H:return o.RS_BLOCK_TABLE[(s-1)*4+3];default:return}};function l(){this.buffer=[],this.length=0}l.prototype={get:function(s){var p=Math.floor(s/8);return(this.buffer[p]>>>7-s%8&1)==1},put:function(s,p){for(var m=0;m<p;m++)this.putBit((s>>>p-m-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(s){var p=Math.floor(this.length/8);this.buffer.length<=p&&this.buffer.push(0),s&&(this.buffer[p]|=128>>>this.length%8),this.length++}};var n=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function a(s){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof s=="string"&&(s={content:s}),s)for(var p in s)this.options[p]=s[p];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function m(E){switch(E){case"L":return r.L;case"M":return r.M;case"Q":return r.Q;case"H":return r.H;default:throw new Error("Unknwon error correction level: "+E)}}function b(E,C){for(var _=d(E),S=1,T=0,N=0,x=n.length;N<=x;N++){var B=n[N];if(!B)throw new Error("Content too long: expected "+T+" but got "+_);switch(C){case"L":T=B[0];break;case"M":T=B[1];break;case"Q":T=B[2];break;case"H":T=B[3];break;default:throw new Error("Unknwon error correction level: "+C)}if(_<=T)break;S++}if(S>n.length)throw new Error("Content too long");return S}function d(E){var C=encodeURI(E).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return C.length+(C.length!=E?3:0)}var w=this.options.content,y=b(w,this.options.ecl),v=m(this.options.ecl);this.qrcode=new i(y,v),this.qrcode.addData(w),this.qrcode.make()}return a.prototype.svg=function(s){var p=this.options||{},m=this.qrcode.modules;typeof s>"u"&&(s={container:p.container||"svg"});for(var b=typeof p.pretty<"u"?!!p.pretty:!0,d=b?" ":"",w=b?`\r
1
+ import{a9 as Ft,L as H,aa as Na,ab as Sn,ac as Ta,ad as Pa,ae as yt,af as Oa,ag as Xo,b as _n,ah as kn,g as xa}from"./index-BnWQs8n8.js";function Fa(e,i){for(var t=0;t<i.length;t++){const r=i[t];if(typeof r!="string"&&!Array.isArray(r)){for(const h in r)if(h!=="default"&&!(h in e)){const u=Object.getOwnPropertyDescriptor(r,h);u&&Object.defineProperty(e,h,u.get?u:{enumerable:!0,get:()=>r[h]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Jt={},Fe={},Be={},Qn;function Ba(){if(Qn)return Be;Qn=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.walletLogo=void 0;const e=(i,t)=>{let r;switch(i){case"standard":return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return r=t,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${r}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return r=(.1*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return r=(.25*t).toFixed(2),`data:image/svg+xml,%3Csvg width='${t}' height='${r}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return r=t,`data:image/svg+xml,%3Csvg width='${t}' height='${r}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};return Be.walletLogo=e,Be}var De={},Kn;function Da(){return Kn||(Kn=1,Object.defineProperty(De,"__esModule",{value:!0}),De.LINK_API_URL=void 0,De.LINK_API_URL="https://www.walletlink.org"),De}var P={},Gt={},de={},Xn;function Bt(){return Xn||(Xn=1,Object.defineProperty(de,"__esModule",{value:!0}),de.errorValues=de.standardErrorCodes=void 0,de.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}},de.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}}),de}var je={},Zt={},Yn;function In(){return Yn||(Yn=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=e.getErrorCode=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const i=Bt(),t="Unspecified error message.";e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function r(a,s=t){if(a&&Number.isInteger(a)){const p=a.toString();if(l(i.errorValues,p))return i.errorValues[p].message;if(f(a))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return s}e.getMessageFromCode=r;function h(a){if(!Number.isInteger(a))return!1;const s=a.toString();return!!(i.errorValues[s]||f(a))}e.isValidCode=h;function u(a){var s;if(typeof a=="number")return a;if(c(a))return(s=a.code)!==null&&s!==void 0?s:a.errorCode}e.getErrorCode=u;function c(a){return typeof a=="object"&&a!==null&&(typeof a.code=="number"||typeof a.errorCode=="number")}function g(a,{shouldIncludeStack:s=!1}={}){const p={};if(a&&typeof a=="object"&&!Array.isArray(a)&&l(a,"code")&&h(a.code)){const m=a;p.code=m.code,m.message&&typeof m.message=="string"?(p.message=m.message,l(m,"data")&&(p.data=m.data)):(p.message=r(p.code),p.data={originalError:o(a)})}else p.code=i.standardErrorCodes.rpc.internal,p.message=n(a,"message")?a.message:t,p.data={originalError:o(a)};return s&&(p.stack=n(a,"stack")?a.stack:void 0),p}e.serialize=g;function f(a){return a>=-32099&&a<=-32e3}function o(a){return a&&typeof a=="object"&&!Array.isArray(a)?Object.assign({},a):a}function l(a,s){return Object.prototype.hasOwnProperty.call(a,s)}function n(a,s){return typeof a=="object"&&a!==null&&s in a&&typeof a[s]=="string"}}(Zt)),Zt}var es;function ja(){if(es)return je;es=1,Object.defineProperty(je,"__esModule",{value:!0}),je.standardErrors=void 0;const e=Bt(),i=In();je.standardErrors={rpc:{parse:f=>t(e.standardErrorCodes.rpc.parse,f),invalidRequest:f=>t(e.standardErrorCodes.rpc.invalidRequest,f),invalidParams:f=>t(e.standardErrorCodes.rpc.invalidParams,f),methodNotFound:f=>t(e.standardErrorCodes.rpc.methodNotFound,f),internal:f=>t(e.standardErrorCodes.rpc.internal,f),server:f=>{if(!f||typeof f!="object"||Array.isArray(f))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:o}=f;if(!Number.isInteger(o)||o>-32005||o<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return t(o,f)},invalidInput:f=>t(e.standardErrorCodes.rpc.invalidInput,f),resourceNotFound:f=>t(e.standardErrorCodes.rpc.resourceNotFound,f),resourceUnavailable:f=>t(e.standardErrorCodes.rpc.resourceUnavailable,f),transactionRejected:f=>t(e.standardErrorCodes.rpc.transactionRejected,f),methodNotSupported:f=>t(e.standardErrorCodes.rpc.methodNotSupported,f),limitExceeded:f=>t(e.standardErrorCodes.rpc.limitExceeded,f)},provider:{userRejectedRequest:f=>r(e.standardErrorCodes.provider.userRejectedRequest,f),unauthorized:f=>r(e.standardErrorCodes.provider.unauthorized,f),unsupportedMethod:f=>r(e.standardErrorCodes.provider.unsupportedMethod,f),disconnected:f=>r(e.standardErrorCodes.provider.disconnected,f),chainDisconnected:f=>r(e.standardErrorCodes.provider.chainDisconnected,f),unsupportedChain:f=>r(e.standardErrorCodes.provider.unsupportedChain,f),custom:f=>{if(!f||typeof f!="object"||Array.isArray(f))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:o,message:l,data:n}=f;if(!l||typeof l!="string")throw new Error('"message" must be a nonempty string');return new c(o,l,n)}}};function t(f,o){const[l,n]=h(o);return new u(f,l||(0,i.getMessageFromCode)(f),n)}function r(f,o){const[l,n]=h(o);return new c(f,l||(0,i.getMessageFromCode)(f),n)}function h(f){if(f){if(typeof f=="string")return[f];if(typeof f=="object"&&!Array.isArray(f)){const{message:o,data:l}=f;if(o&&typeof o!="string")throw new Error("Must specify string message.");return[o||void 0,l]}}return[]}class u extends Error{constructor(o,l,n){if(!Number.isInteger(o))throw new Error('"code" must be an integer.');if(!l||typeof l!="string")throw new Error('"message" must be a nonempty string.');super(l),this.code=o,n!==void 0&&(this.data=n)}}class c extends u{constructor(o,l,n){if(!g(o))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(o,l,n)}}function g(f){return Number.isInteger(f)&&f>=1e3&&f<=4999}return je}var $e={},qe={},ts;function An(){if(ts)return qe;ts=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.isErrorResponse=void 0;function e(i){return i.errorMessage!==void 0}return qe.isErrorResponse=e,qe}var He={},rs;function Ln(){return rs||(rs=1,Object.defineProperty(He,"__esModule",{value:!0}),He.LIB_VERSION=void 0,He.LIB_VERSION="3.9.3"),He}var ns;function $a(){if(ns)return $e;ns=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.serializeError=void 0;const e=An(),i=Ln(),t=Bt(),r=In();function h(g,f){const o=(0,r.serialize)(u(g),{shouldIncludeStack:!0}),l=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");l.searchParams.set("version",i.LIB_VERSION),l.searchParams.set("code",o.code.toString());const n=c(o.data,f);return n&&l.searchParams.set("method",n),l.searchParams.set("message",o.message),Object.assign(Object.assign({},o),{docUrl:l.href})}$e.serializeError=h;function u(g){return typeof g=="string"?{message:g,code:t.standardErrorCodes.rpc.internal}:(0,e.isErrorResponse)(g)?Object.assign(Object.assign({},g),{message:g.errorMessage,code:g.errorCode,data:{method:g.method}}):g}function c(g,f){const o=g==null?void 0:g.method;if(o)return o;if(f!==void 0){if(typeof f=="string")return f;if(Array.isArray(f)){if(f.length>0)return f[0].method}else return f.method}}return $e}var ss;function Dt(){return ss||(ss=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=e.serializeError=e.getMessageFromCode=e.getErrorCode=void 0;const i=Bt();Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return i.standardErrorCodes}});const t=ja();Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return t.standardErrors}});const r=$a();Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}});const h=In();Object.defineProperty(e,"getErrorCode",{enumerable:!0,get:function(){return h.getErrorCode}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return h.getMessageFromCode}})}(Gt)),Gt}var J={},is;function jt(){if(is)return J;is=1,Object.defineProperty(J,"__esModule",{value:!0}),J.ProviderType=J.RegExpString=J.IntNumber=J.BigIntString=J.AddressString=J.HexString=J.OpaqueType=void 0;function e(){return r=>r}J.OpaqueType=e,J.HexString=e(),J.AddressString=e(),J.BigIntString=e();function i(r){return Math.floor(r)}J.IntNumber=i,J.RegExpString=e();var t;return function(r){r.CoinbaseWallet="CoinbaseWallet",r.MetaMask="MetaMask",r.Unselected=""}(t||(J.ProviderType=t={})),J}var os;function ae(){if(os)return P;os=1;var e=P&&P.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(P,"__esModule",{value:!0}),P.isMobileWeb=P.getLocation=P.isInIFrame=P.createQrUrl=P.getFavicon=P.range=P.isBigNumber=P.ensureParsedJSONObject=P.ensureBN=P.ensureRegExpString=P.ensureIntNumber=P.ensureBuffer=P.ensureAddressString=P.ensureEvenLengthHexString=P.ensureHexString=P.isHexString=P.prepend0x=P.strip0x=P.has0xPrefix=P.hexStringFromIntNumber=P.intNumberFromHexString=P.bigIntStringFromBN=P.hexStringFromBuffer=P.hexStringToUint8Array=P.uint8ArrayToHex=P.randomBytesHex=void 0;const i=e(Ft()),t=Dt(),r=jt(),h=/^[0-9]*$/,u=/^[a-f0-9]*$/;function c(R){return g(crypto.getRandomValues(new Uint8Array(R)))}P.randomBytesHex=c;function g(R){return[...R].map(I=>I.toString(16).padStart(2,"0")).join("")}P.uint8ArrayToHex=g;function f(R){return new Uint8Array(R.match(/.{1,2}/g).map(I=>parseInt(I,16)))}P.hexStringToUint8Array=f;function o(R,I=!1){const M=R.toString("hex");return(0,r.HexString)(I?`0x${M}`:M)}P.hexStringFromBuffer=o;function l(R){return(0,r.BigIntString)(R.toString(10))}P.bigIntStringFromBN=l;function n(R){return(0,r.IntNumber)(new i.default(w(R,!1),16).toNumber())}P.intNumberFromHexString=n;function a(R){return(0,r.HexString)(`0x${new i.default(R).toString(16)}`)}P.hexStringFromIntNumber=a;function s(R){return R.startsWith("0x")||R.startsWith("0X")}P.has0xPrefix=s;function p(R){return s(R)?R.slice(2):R}P.strip0x=p;function m(R){return s(R)?`0x${R.slice(2)}`:`0x${R}`}P.prepend0x=m;function b(R){if(typeof R!="string")return!1;const I=p(R).toLowerCase();return u.test(I)}P.isHexString=b;function d(R,I=!1){if(typeof R=="string"){const M=p(R).toLowerCase();if(u.test(M))return(0,r.HexString)(I?`0x${M}`:M)}throw t.standardErrors.rpc.invalidParams(`"${String(R)}" is not a hexadecimal string`)}P.ensureHexString=d;function w(R,I=!1){let M=d(R,!1);return M.length%2===1&&(M=(0,r.HexString)(`0${M}`)),I?(0,r.HexString)(`0x${M}`):M}P.ensureEvenLengthHexString=w;function y(R){if(typeof R=="string"){const I=p(R).toLowerCase();if(b(I)&&I.length===40)return(0,r.AddressString)(m(I))}throw t.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(R)}`)}P.ensureAddressString=y;function v(R){if(H.isBuffer(R))return R;if(typeof R=="string"){if(b(R)){const I=w(R,!1);return H.from(I,"hex")}return H.from(R,"utf8")}throw t.standardErrors.rpc.invalidParams(`Not binary data: ${String(R)}`)}P.ensureBuffer=v;function E(R){if(typeof R=="number"&&Number.isInteger(R))return(0,r.IntNumber)(R);if(typeof R=="string"){if(h.test(R))return(0,r.IntNumber)(Number(R));if(b(R))return(0,r.IntNumber)(new i.default(w(R,!1),16).toNumber())}throw t.standardErrors.rpc.invalidParams(`Not an integer: ${String(R)}`)}P.ensureIntNumber=E;function C(R){if(R instanceof RegExp)return(0,r.RegExpString)(R.toString());throw t.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(R)}`)}P.ensureRegExpString=C;function _(R){if(R!==null&&(i.default.isBN(R)||T(R)))return new i.default(R.toString(10),10);if(typeof R=="number")return new i.default(E(R));if(typeof R=="string"){if(h.test(R))return new i.default(R,10);if(b(R))return new i.default(w(R,!1),16)}throw t.standardErrors.rpc.invalidParams(`Not an integer: ${String(R)}`)}P.ensureBN=_;function S(R){if(typeof R=="string")return JSON.parse(R);if(typeof R=="object")return R;throw t.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(R)}`)}P.ensureParsedJSONObject=S;function T(R){if(R==null||typeof R.constructor!="function")return!1;const{constructor:I}=R;return typeof I.config=="function"&&typeof I.EUCLID=="number"}P.isBigNumber=T;function N(R,I){return Array.from({length:I-R},(M,L)=>R+L)}P.range=N;function x(){const R=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:I,host:M}=document.location,L=R?R.getAttribute("href"):null;return!L||L.startsWith("javascript:")||L.startsWith("vbscript:")?null:L.startsWith("http://")||L.startsWith("https://")||L.startsWith("data:")?L:L.startsWith("//")?I+L:`${I}//${M}${L}`}P.getFavicon=x;function B(R,I,M,L,O,j){const F=L?"parent-id":"id",$=new URLSearchParams({[F]:R,secret:I,server:M,v:O,chainId:j.toString()}).toString();return`${M}/#/link?${$}`}P.createQrUrl=B;function W(){try{return window.frameElement!==null}catch{return!1}}P.isInIFrame=W;function A(){try{return W()&&window.top?window.top.location:window.location}catch{return window.location}}P.getLocation=A;function k(){var R;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((R=window==null?void 0:window.navigator)===null||R===void 0?void 0:R.userAgent)}return P.isMobileWeb=k,P}var Ue={},as;function qa(){if(as)return Ue;as=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.ScopedLocalStorage=void 0;let e=class{constructor(t){this.scope=t}setItem(t,r){localStorage.setItem(this.scopedKey(t),r)}getItem(t){return localStorage.getItem(this.scopedKey(t))}removeItem(t){localStorage.removeItem(this.scopedKey(t))}clear(){const t=this.scopedKey(""),r=[];for(let h=0;h<localStorage.length;h++){const u=localStorage.key(h);typeof u=="string"&&u.startsWith(t)&&r.push(u)}r.forEach(h=>localStorage.removeItem(h))}scopedKey(t){return`${this.scope}:${t}`}};return Ue.ScopedLocalStorage=e,Ue}var he={},Qt={exports:{}},cs;function Ha(){return cs||(cs=1,function(e){var i=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function h(f,o,l){this.fn=f,this.context=o,this.once=l||!1}function u(f,o,l,n,a){if(typeof l!="function")throw new TypeError("The listener must be a function");var s=new h(l,n||f,a),p=t?t+o:o;return f._events[p]?f._events[p].fn?f._events[p]=[f._events[p],s]:f._events[p].push(s):(f._events[p]=s,f._eventsCount++),f}function c(f,o){--f._eventsCount===0?f._events=new r:delete f._events[o]}function g(){this._events=new r,this._eventsCount=0}g.prototype.eventNames=function(){var o=[],l,n;if(this._eventsCount===0)return o;for(n in l=this._events)i.call(l,n)&&o.push(t?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(l)):o},g.prototype.listeners=function(o){var l=t?t+o:o,n=this._events[l];if(!n)return[];if(n.fn)return[n.fn];for(var a=0,s=n.length,p=new Array(s);a<s;a++)p[a]=n[a].fn;return p},g.prototype.listenerCount=function(o){var l=t?t+o:o,n=this._events[l];return n?n.fn?1:n.length:0},g.prototype.emit=function(o,l,n,a,s,p){var m=t?t+o:o;if(!this._events[m])return!1;var b=this._events[m],d=arguments.length,w,y;if(b.fn){switch(b.once&&this.removeListener(o,b.fn,void 0,!0),d){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,l),!0;case 3:return b.fn.call(b.context,l,n),!0;case 4:return b.fn.call(b.context,l,n,a),!0;case 5:return b.fn.call(b.context,l,n,a,s),!0;case 6:return b.fn.call(b.context,l,n,a,s,p),!0}for(y=1,w=new Array(d-1);y<d;y++)w[y-1]=arguments[y];b.fn.apply(b.context,w)}else{var v=b.length,E;for(y=0;y<v;y++)switch(b[y].once&&this.removeListener(o,b[y].fn,void 0,!0),d){case 1:b[y].fn.call(b[y].context);break;case 2:b[y].fn.call(b[y].context,l);break;case 3:b[y].fn.call(b[y].context,l,n);break;case 4:b[y].fn.call(b[y].context,l,n,a);break;default:if(!w)for(E=1,w=new Array(d-1);E<d;E++)w[E-1]=arguments[E];b[y].fn.apply(b[y].context,w)}}return!0},g.prototype.on=function(o,l,n){return u(this,o,l,n,!1)},g.prototype.once=function(o,l,n){return u(this,o,l,n,!0)},g.prototype.removeListener=function(o,l,n,a){var s=t?t+o:o;if(!this._events[s])return this;if(!l)return c(this,s),this;var p=this._events[s];if(p.fn)p.fn===l&&(!a||p.once)&&(!n||p.context===n)&&c(this,s);else{for(var m=0,b=[],d=p.length;m<d;m++)(p[m].fn!==l||a&&!p[m].once||n&&p[m].context!==n)&&b.push(p[m]);b.length?this._events[s]=b.length===1?b[0]:b:c(this,s)}return this},g.prototype.removeAllListeners=function(o){var l;return o?(l=t?t+o:o,this._events[l]&&c(this,l)):(this._events=new r,this._eventsCount=0),this},g.prototype.off=g.prototype.removeListener,g.prototype.addListener=g.prototype.on,g.prefixed=t,g.EventEmitter=g,e.exports=g}(Qt)),Qt.exports}var We={},Ve={},ze={},us;function Mn(){return us||(us=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.EVENTS=void 0,ze.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}),ze}var X={},ls;function Nn(){if(ls)return X;ls=1,Object.defineProperty(X,"__esModule",{value:!0}),X.RelayAbstract=X.APP_VERSION_KEY=X.LOCAL_STORAGE_ADDRESSES_KEY=X.WALLET_USER_NAME_KEY=void 0;const e=Dt();X.WALLET_USER_NAME_KEY="walletUsername",X.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",X.APP_VERSION_KEY="AppVersion";let i=class{async makeEthereumJSONRPCRequest(r,h){if(!h)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(h,{method:"POST",body:JSON.stringify(r),mode:"cors",headers:{"Content-Type":"application/json"}}).then(u=>u.json()).then(u=>{if(!u)throw e.standardErrors.rpc.parse({});const c=u,{error:g}=c;if(g)throw(0,e.serializeError)(g,r.method);return c})}};return X.RelayAbstract=i,X}var Je={},ds;function Tn(){if(ds)return Je;ds=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.Session=void 0;const e=Na(),i=ae(),t="session:id",r="session:secret",h="session:linked";let u=class Yo{constructor(g,f,o,l){this._storage=g,this._id=f||(0,i.randomBytesHex)(16),this._secret=o||(0,i.randomBytesHex)(32),this._key=new e.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!l}static load(g){const f=g.getItem(t),o=g.getItem(h),l=g.getItem(r);return f&&l?new Yo(g,f,l,o==="1"):null}static hash(g){return new e.sha256().update(g).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(g){this._linked=g,this.persistLinked()}save(){return this._storage.setItem(t,this._id),this._storage.setItem(r,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(h,this._linked?"1":"0")}};return Je.Session=u,Je}var Ge={},Ze={},hs;function Ua(){if(hs)return Ze;hs=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.Cipher=void 0;const e=ae();let i=class{constructor(r){this.secret=r}async encrypt(r){const h=this.secret;if(h.length!==64)throw Error("secret must be 256 bits");const u=crypto.getRandomValues(new Uint8Array(12)),c=await crypto.subtle.importKey("raw",(0,e.hexStringToUint8Array)(h),{name:"aes-gcm"},!1,["encrypt","decrypt"]),g=new TextEncoder,f=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:u},c,g.encode(r)),o=16,l=f.slice(f.byteLength-o),n=f.slice(0,f.byteLength-o),a=new Uint8Array(l),s=new Uint8Array(n),p=new Uint8Array([...u,...a,...s]);return(0,e.uint8ArrayToHex)(p)}async decrypt(r){const h=this.secret;if(h.length!==64)throw Error("secret must be 256 bits");return new Promise((u,c)=>{(async function(){const g=await crypto.subtle.importKey("raw",(0,e.hexStringToUint8Array)(h),{name:"aes-gcm"},!1,["encrypt","decrypt"]),f=(0,e.hexStringToUint8Array)(r),o=f.slice(0,12),l=f.slice(12,28),n=f.slice(28),a=new Uint8Array([...n,...l]),s={name:"AES-GCM",iv:new Uint8Array(o)};try{const p=await window.crypto.subtle.decrypt(s,g,a),m=new TextDecoder;u(m.decode(p))}catch(p){c(p)}})()})}};return Ze.Cipher=i,Ze}var Qe={},fs;function Wa(){if(fs)return Qe;fs=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.WalletLinkHTTP=void 0;let e=class{constructor(t,r,h){this.linkAPIUrl=t,this.sessionId=r;const u=`${r}:${h}`;this.auth=`Basic ${btoa(u)}`}async markUnseenEventsAsSeen(t){return Promise.all(t.map(r=>fetch(`${this.linkAPIUrl}/events/${r.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(r=>console.error("Unabled to mark event as failed:",r))}async fetchUnseenEvents(){var t;const r=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(r.ok){const{events:h,error:u}=await r.json();if(u)throw new Error(`Check unseen events failed: ${u}`);const c=(t=h==null?void 0:h.filter(g=>g.event==="Web3Response").map(g=>({type:"Event",sessionId:this.sessionId,eventId:g.id,event:g.event,data:g.data})))!==null&&t!==void 0?t:[];return this.markUnseenEventsAsSeen(c),c}throw new Error(`Check unseen events failed: ${r.status}`)}};return Qe.WalletLinkHTTP=e,Qe}var fe={},gs;function Va(){if(gs)return fe;gs=1,Object.defineProperty(fe,"__esModule",{value:!0}),fe.WalletLinkWebSocket=fe.ConnectionState=void 0;var e;(function(t){t[t.DISCONNECTED=0]="DISCONNECTED",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED"})(e||(fe.ConnectionState=e={}));let i=class{setConnectionStateListener(r){this.connectionStateListener=r}setIncomingDataListener(r){this.incomingDataListener=r}constructor(r,h=WebSocket){this.WebSocketClass=h,this.webSocket=null,this.pendingData=[],this.url=r.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((r,h)=>{var u;let c;try{this.webSocket=c=new this.WebSocketClass(this.url)}catch(g){h(g);return}(u=this.connectionStateListener)===null||u===void 0||u.call(this,e.CONNECTING),c.onclose=g=>{var f;this.clearWebSocket(),h(new Error(`websocket error ${g.code}: ${g.reason}`)),(f=this.connectionStateListener)===null||f===void 0||f.call(this,e.DISCONNECTED)},c.onopen=g=>{var f;r(),(f=this.connectionStateListener)===null||f===void 0||f.call(this,e.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(l=>this.sendData(l)),this.pendingData=[])},c.onmessage=g=>{var f,o;if(g.data==="h")(f=this.incomingDataListener)===null||f===void 0||f.call(this,{type:"Heartbeat"});else try{const l=JSON.parse(g.data);(o=this.incomingDataListener)===null||o===void 0||o.call(this,l)}catch{}}})}disconnect(){var r;const{webSocket:h}=this;if(h){this.clearWebSocket(),(r=this.connectionStateListener)===null||r===void 0||r.call(this,e.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{h.close()}catch{}}}sendData(r){const{webSocket:h}=this;if(!h){this.pendingData.push(r),this.connect();return}h.send(r)}clearWebSocket(){const{webSocket:r}=this;r&&(this.webSocket=null,r.onclose=null,r.onerror=null,r.onmessage=null,r.onopen=null)}};return fe.WalletLinkWebSocket=i,fe}var ps;function za(){if(ps)return Ge;ps=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.WalletLinkConnection=void 0;const e=jt(),i=Ua(),t=Mn(),r=Nn(),h=Tn(),u=Wa(),c=Va(),g=1e4,f=6e4;let o=class{constructor({session:n,linkAPIUrl:a,listener:s,diagnostic:p,WebSocketClass:m=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,e.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=d=>{if(!d)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",y=>d.JsonRpcUrl&&this.handleChainUpdated(y,d.JsonRpcUrl)]]).forEach((y,v)=>{const E=d[v];E!==void 0&&y(E)})},this.handleDestroyed=d=>{var w,y;d==="1"&&((w=this.listener)===null||w===void 0||w.resetAndReload(),(y=this.diagnostic)===null||y===void 0||y.log(t.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:h.Session.hash(this.session.id)}))},this.handleAccountUpdated=async d=>{var w,y;try{const v=await this.cipher.decrypt(d);(w=this.listener)===null||w===void 0||w.accountUpdated(v)}catch{(y=this.diagnostic)===null||y===void 0||y.log(t.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(d,w)=>{var y,v;try{const E=await this.cipher.decrypt(w);(y=this.listener)===null||y===void 0||y.metadataUpdated(d,E)}catch{(v=this.diagnostic)===null||v===void 0||v.log(t.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:d})}},this.handleWalletUsernameUpdated=async d=>{this.handleMetadataUpdated(r.WALLET_USER_NAME_KEY,d)},this.handleAppVersionUpdated=async d=>{this.handleMetadataUpdated(r.APP_VERSION_KEY,d)},this.handleChainUpdated=async(d,w)=>{var y,v;try{const E=await this.cipher.decrypt(d),C=await this.cipher.decrypt(w);(y=this.listener)===null||y===void 0||y.chainUpdated(E,C)}catch{(v=this.diagnostic)===null||v===void 0||v.log(t.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=n,this.cipher=new i.Cipher(n.secret),this.diagnostic=p,this.listener=s;const b=new c.WalletLinkWebSocket(`${a}/rpc`,m);b.setConnectionStateListener(async d=>{var w;(w=this.diagnostic)===null||w===void 0||w.log(t.EVENTS.CONNECTED_STATE_CHANGE,{state:d,sessionIdHash:h.Session.hash(n.id)});let y=!1;switch(d){case c.ConnectionState.DISCONNECTED:if(!this.destroyed){const v=async()=>{await new Promise(E=>setTimeout(E,5e3)),this.destroyed||b.connect().catch(()=>{v()})};v()}break;case c.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),y=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},g),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case c.ConnectionState.CONNECTING:break}this.connected!==y&&(this.connected=y)}),b.setIncomingDataListener(d=>{var w,y,v;switch(d.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const E=d.type==="IsLinkedOK"?d.linked:void 0;(w=this.diagnostic)===null||w===void 0||w.log(t.EVENTS.LINKED,{sessionIdHash:h.Session.hash(n.id),linked:E,type:d.type,onlineGuests:d.onlineGuests}),this.linked=E||d.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{(y=this.diagnostic)===null||y===void 0||y.log(t.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:h.Session.hash(n.id),metadata_keys:d&&d.metadata?Object.keys(d.metadata):void 0}),this.handleSessionMetadataUpdated(d.metadata);break}case"Event":{this.handleIncomingEvent(d);break}}d.id!==void 0&&((v=this.requestResolutions.get(d.id))===null||v===void 0||v(d))}),this.ws=b,this.http=new u.WalletLinkHTTP(a,n.id,n.key)}connect(){var n;if(this.destroyed)throw new Error("instance is destroyed");(n=this.diagnostic)===null||n===void 0||n.log(t.EVENTS.STARTED_CONNECTING,{sessionIdHash:h.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var n;this.destroyed=!0,this.ws.disconnect(),(n=this.diagnostic)===null||n===void 0||n.log(t.EVENTS.DISCONNECTED,{sessionIdHash:h.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(n){var a,s;this._connected=n,n&&((a=this.onceConnected)===null||a===void 0||a.call(this)),(s=this.listener)===null||s===void 0||s.connectedUpdated(n)}setOnceConnected(n){return new Promise(a=>{this.connected?n().then(a):this.onceConnected=()=>{n().then(a),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(n){var a,s;this._linked=n,n&&((a=this.onceLinked)===null||a===void 0||a.call(this)),(s=this.listener)===null||s===void 0||s.linkedUpdated(n)}setOnceLinked(n){return new Promise(a=>{this.linked?n().then(a):this.onceLinked=()=>{n().then(a),this.onceLinked=void 0}})}async handleIncomingEvent(n){var a,s;if(!(n.type!=="Event"||n.event!=="Web3Response"))try{const p=await this.cipher.decrypt(n.data),m=JSON.parse(p);if(m.type!=="WEB3_RESPONSE")return;(a=this.listener)===null||a===void 0||a.handleWeb3ResponseMessage(m)}catch{(s=this.diagnostic)===null||s===void 0||s.log(t.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(n=>setTimeout(n,250));try{await this.fetchUnseenEventsAPI()}catch(n){console.error("Unable to check for unseen events",n)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(a=>this.handleIncomingEvent(a))}async setSessionMetadata(n,a){const s={type:"SetSessionConfig",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[n]:a}};return this.setOnceConnected(async()=>{const p=await this.makeRequest(s);if(p.type==="Fail")throw new Error(p.error||"failed to set session metadata")})}async publishEvent(n,a,s=!1){const p=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},a),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),m={type:"PublishEvent",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:n,data:p,callWebhook:s};return this.setOnceLinked(async()=>{const b=await this.makeRequest(m);if(b.type==="Fail")throw new Error(b.error||"failed to publish event");return b.eventId})}sendData(n){this.ws.sendData(JSON.stringify(n))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>g*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(n,a=f){const s=n.id;this.sendData(n);let p;return Promise.race([new Promise((m,b)=>{p=window.setTimeout(()=>{b(new Error(`request ${s} timed out`))},a)}),new Promise(m=>{this.requestResolutions.set(s,b=>{clearTimeout(p),m(b),this.requestResolutions.delete(s)})})])}async authenticate(){const n={type:"HostSession",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},a=await this.makeRequest(n);if(a.type==="Fail")throw new Error(a.error||"failed to authentcate")}sendIsLinked(){const n={type:"IsLinked",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(n)}sendGetSessionConfig(){const n={type:"GetSessionConfig",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(n)}};return Ge.WalletLinkConnection=o,Ge}var Ke={},ge={},Rt={},ms;function Ja(){return ms||(ms=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'),Rt}var bs;function ea(){if(bs)return ge;bs=1;var e=ge&&ge.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ge,"__esModule",{value:!0}),ge.injectCssReset=void 0;const i=e(Ja());function t(){const r=document.createElement("style");r.type="text/css",r.appendChild(document.createTextNode(i.default)),document.documentElement.appendChild(r)}return ge.injectCssReset=t,ge}var Xe={};const Z=Sn(Ta);var pe={};const $t=Sn(Pa);var ie={},Ye={},ys;function Ga(){if(ys)return Ye;ys=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.CloseIcon=void 0;const e=Z;function i(t){return(0,e.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),(0,e.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}return Ye.CloseIcon=i,Ye}var et={},ws;function Za(){if(ws)return et;ws=1,Object.defineProperty(et,"__esModule",{value:!0}),et.CoinbaseWalletRound=void 0;const e=Z;function i(t){return(0,e.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),(0,e.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,e.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,e.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}return et.CoinbaseWalletRound=i,et}var tt={},vs;function Qa(){if(vs)return tt;vs=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.QRCodeIcon=void 0;const e=Z;function i(t){return(0,e.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t),(0,e.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,e.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,e.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,e.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}return tt.QRCodeIcon=i,tt}var me={},Kt,Es;function Ka(){if(Es)return Kt;Es=1;function e(s){this.mode=t.MODE_8BIT_BYTE,this.data=s,this.parsedData=[];for(var p=0,m=this.data.length;p<m;p++){var b=[],d=this.data.charCodeAt(p);d>65536?(b[0]=240|(d&1835008)>>>18,b[1]=128|(d&258048)>>>12,b[2]=128|(d&4032)>>>6,b[3]=128|d&63):d>2048?(b[0]=224|(d&61440)>>>12,b[1]=128|(d&4032)>>>6,b[2]=128|d&63):d>128?(b[0]=192|(d&1984)>>>6,b[1]=128|d&63):b[0]=d,this.parsedData.push(b)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}e.prototype={getLength:function(s){return this.parsedData.length},write:function(s){for(var p=0,m=this.parsedData.length;p<m;p++)s.put(this.parsedData[p],8)}};function i(s,p){this.typeNumber=s,this.errorCorrectLevel=p,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}i.prototype={addData:function(s){var p=new e(s);this.dataList.push(p),this.dataCache=null},isDark:function(s,p){if(s<0||this.moduleCount<=s||p<0||this.moduleCount<=p)throw new Error(s+","+p);return this.modules[s][p]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(s,p){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var m=0;m<this.moduleCount;m++){this.modules[m]=new Array(this.moduleCount);for(var b=0;b<this.moduleCount;b++)this.modules[m][b]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(s,p),this.typeNumber>=7&&this.setupTypeNumber(s),this.dataCache==null&&(this.dataCache=i.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,p)},setupPositionProbePattern:function(s,p){for(var m=-1;m<=7;m++)if(!(s+m<=-1||this.moduleCount<=s+m))for(var b=-1;b<=7;b++)p+b<=-1||this.moduleCount<=p+b||(0<=m&&m<=6&&(b==0||b==6)||0<=b&&b<=6&&(m==0||m==6)||2<=m&&m<=4&&2<=b&&b<=4?this.modules[s+m][p+b]=!0:this.modules[s+m][p+b]=!1)},getBestMaskPattern:function(){for(var s=0,p=0,m=0;m<8;m++){this.makeImpl(!0,m);var b=u.getLostPoint(this);(m==0||s>b)&&(s=b,p=m)}return p},createMovieClip:function(s,p,m){var b=s.createEmptyMovieClip(p,m),d=1;this.make();for(var w=0;w<this.modules.length;w++)for(var y=w*d,v=0;v<this.modules[w].length;v++){var E=v*d,C=this.modules[w][v];C&&(b.beginFill(0,100),b.moveTo(E,y),b.lineTo(E+d,y),b.lineTo(E+d,y+d),b.lineTo(E,y+d),b.endFill())}return b},setupTimingPattern:function(){for(var s=8;s<this.moduleCount-8;s++)this.modules[s][6]==null&&(this.modules[s][6]=s%2==0);for(var p=8;p<this.moduleCount-8;p++)this.modules[6][p]==null&&(this.modules[6][p]=p%2==0)},setupPositionAdjustPattern:function(){for(var s=u.getPatternPosition(this.typeNumber),p=0;p<s.length;p++)for(var m=0;m<s.length;m++){var b=s[p],d=s[m];if(this.modules[b][d]==null)for(var w=-2;w<=2;w++)for(var y=-2;y<=2;y++)w==-2||w==2||y==-2||y==2||w==0&&y==0?this.modules[b+w][d+y]=!0:this.modules[b+w][d+y]=!1}},setupTypeNumber:function(s){for(var p=u.getBCHTypeNumber(this.typeNumber),m=0;m<18;m++){var b=!s&&(p>>m&1)==1;this.modules[Math.floor(m/3)][m%3+this.moduleCount-8-3]=b}for(var m=0;m<18;m++){var b=!s&&(p>>m&1)==1;this.modules[m%3+this.moduleCount-8-3][Math.floor(m/3)]=b}},setupTypeInfo:function(s,p){for(var m=this.errorCorrectLevel<<3|p,b=u.getBCHTypeInfo(m),d=0;d<15;d++){var w=!s&&(b>>d&1)==1;d<6?this.modules[d][8]=w:d<8?this.modules[d+1][8]=w:this.modules[this.moduleCount-15+d][8]=w}for(var d=0;d<15;d++){var w=!s&&(b>>d&1)==1;d<8?this.modules[8][this.moduleCount-d-1]=w:d<9?this.modules[8][15-d-1+1]=w:this.modules[8][15-d-1]=w}this.modules[this.moduleCount-8][8]=!s},mapData:function(s,p){for(var m=-1,b=this.moduleCount-1,d=7,w=0,y=this.moduleCount-1;y>0;y-=2)for(y==6&&y--;;){for(var v=0;v<2;v++)if(this.modules[b][y-v]==null){var E=!1;w<s.length&&(E=(s[w]>>>d&1)==1);var C=u.getMask(p,b,y-v);C&&(E=!E),this.modules[b][y-v]=E,d--,d==-1&&(w++,d=7)}if(b+=m,b<0||this.moduleCount<=b){b-=m,m=-m;break}}}},i.PAD0=236,i.PAD1=17,i.createData=function(s,p,m){for(var b=o.getRSBlocks(s,p),d=new l,w=0;w<m.length;w++){var y=m[w];d.put(y.mode,4),d.put(y.getLength(),u.getLengthInBits(y.mode,s)),y.write(d)}for(var v=0,w=0;w<b.length;w++)v+=b[w].dataCount;if(d.getLengthInBits()>v*8)throw new Error("code length overflow. ("+d.getLengthInBits()+">"+v*8+")");for(d.getLengthInBits()+4<=v*8&&d.put(0,4);d.getLengthInBits()%8!=0;)d.putBit(!1);for(;!(d.getLengthInBits()>=v*8||(d.put(i.PAD0,8),d.getLengthInBits()>=v*8));)d.put(i.PAD1,8);return i.createBytes(d,b)},i.createBytes=function(s,p){for(var m=0,b=0,d=0,w=new Array(p.length),y=new Array(p.length),v=0;v<p.length;v++){var E=p[v].dataCount,C=p[v].totalCount-E;b=Math.max(b,E),d=Math.max(d,C),w[v]=new Array(E);for(var _=0;_<w[v].length;_++)w[v][_]=255&s.buffer[_+m];m+=E;var S=u.getErrorCorrectPolynomial(C),T=new f(w[v],S.getLength()-1),N=T.mod(S);y[v]=new Array(S.getLength()-1);for(var _=0;_<y[v].length;_++){var x=_+N.getLength()-y[v].length;y[v][_]=x>=0?N.get(x):0}}for(var B=0,_=0;_<p.length;_++)B+=p[_].totalCount;for(var W=new Array(B),A=0,_=0;_<b;_++)for(var v=0;v<p.length;v++)_<w[v].length&&(W[A++]=w[v][_]);for(var _=0;_<d;_++)for(var v=0;v<p.length;v++)_<y[v].length&&(W[A++]=y[v][_]);return W};for(var t={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},r={L:1,M:0,Q:3,H:2},h={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},u={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(s){for(var p=s<<10;u.getBCHDigit(p)-u.getBCHDigit(u.G15)>=0;)p^=u.G15<<u.getBCHDigit(p)-u.getBCHDigit(u.G15);return(s<<10|p)^u.G15_MASK},getBCHTypeNumber:function(s){for(var p=s<<12;u.getBCHDigit(p)-u.getBCHDigit(u.G18)>=0;)p^=u.G18<<u.getBCHDigit(p)-u.getBCHDigit(u.G18);return s<<12|p},getBCHDigit:function(s){for(var p=0;s!=0;)p++,s>>>=1;return p},getPatternPosition:function(s){return u.PATTERN_POSITION_TABLE[s-1]},getMask:function(s,p,m){switch(s){case h.PATTERN000:return(p+m)%2==0;case h.PATTERN001:return p%2==0;case h.PATTERN010:return m%3==0;case h.PATTERN011:return(p+m)%3==0;case h.PATTERN100:return(Math.floor(p/2)+Math.floor(m/3))%2==0;case h.PATTERN101:return p*m%2+p*m%3==0;case h.PATTERN110:return(p*m%2+p*m%3)%2==0;case h.PATTERN111:return(p*m%3+(p+m)%2)%2==0;default:throw new Error("bad maskPattern:"+s)}},getErrorCorrectPolynomial:function(s){for(var p=new f([1],0),m=0;m<s;m++)p=p.multiply(new f([1,c.gexp(m)],0));return p},getLengthInBits:function(s,p){if(1<=p&&p<10)switch(s){case t.MODE_NUMBER:return 10;case t.MODE_ALPHA_NUM:return 9;case t.MODE_8BIT_BYTE:return 8;case t.MODE_KANJI:return 8;default:throw new Error("mode:"+s)}else if(p<27)switch(s){case t.MODE_NUMBER:return 12;case t.MODE_ALPHA_NUM:return 11;case t.MODE_8BIT_BYTE:return 16;case t.MODE_KANJI:return 10;default:throw new Error("mode:"+s)}else if(p<41)switch(s){case t.MODE_NUMBER:return 14;case t.MODE_ALPHA_NUM:return 13;case t.MODE_8BIT_BYTE:return 16;case t.MODE_KANJI:return 12;default:throw new Error("mode:"+s)}else throw new Error("type:"+p)},getLostPoint:function(s){for(var p=s.getModuleCount(),m=0,b=0;b<p;b++)for(var d=0;d<p;d++){for(var w=0,y=s.isDark(b,d),v=-1;v<=1;v++)if(!(b+v<0||p<=b+v))for(var E=-1;E<=1;E++)d+E<0||p<=d+E||v==0&&E==0||y==s.isDark(b+v,d+E)&&w++;w>5&&(m+=3+w-5)}for(var b=0;b<p-1;b++)for(var d=0;d<p-1;d++){var C=0;s.isDark(b,d)&&C++,s.isDark(b+1,d)&&C++,s.isDark(b,d+1)&&C++,s.isDark(b+1,d+1)&&C++,(C==0||C==4)&&(m+=3)}for(var b=0;b<p;b++)for(var d=0;d<p-6;d++)s.isDark(b,d)&&!s.isDark(b,d+1)&&s.isDark(b,d+2)&&s.isDark(b,d+3)&&s.isDark(b,d+4)&&!s.isDark(b,d+5)&&s.isDark(b,d+6)&&(m+=40);for(var d=0;d<p;d++)for(var b=0;b<p-6;b++)s.isDark(b,d)&&!s.isDark(b+1,d)&&s.isDark(b+2,d)&&s.isDark(b+3,d)&&s.isDark(b+4,d)&&!s.isDark(b+5,d)&&s.isDark(b+6,d)&&(m+=40);for(var _=0,d=0;d<p;d++)for(var b=0;b<p;b++)s.isDark(b,d)&&_++;var S=Math.abs(100*_/p/p-50)/5;return m+=S*10,m}},c={glog:function(s){if(s<1)throw new Error("glog("+s+")");return c.LOG_TABLE[s]},gexp:function(s){for(;s<0;)s+=255;for(;s>=256;)s-=255;return c.EXP_TABLE[s]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},g=0;g<8;g++)c.EXP_TABLE[g]=1<<g;for(var g=8;g<256;g++)c.EXP_TABLE[g]=c.EXP_TABLE[g-4]^c.EXP_TABLE[g-5]^c.EXP_TABLE[g-6]^c.EXP_TABLE[g-8];for(var g=0;g<255;g++)c.LOG_TABLE[c.EXP_TABLE[g]]=g;function f(s,p){if(s.length==null)throw new Error(s.length+"/"+p);for(var m=0;m<s.length&&s[m]==0;)m++;this.num=new Array(s.length-m+p);for(var b=0;b<s.length-m;b++)this.num[b]=s[b+m]}f.prototype={get:function(s){return this.num[s]},getLength:function(){return this.num.length},multiply:function(s){for(var p=new Array(this.getLength()+s.getLength()-1),m=0;m<this.getLength();m++)for(var b=0;b<s.getLength();b++)p[m+b]^=c.gexp(c.glog(this.get(m))+c.glog(s.get(b)));return new f(p,0)},mod:function(s){if(this.getLength()-s.getLength()<0)return this;for(var p=c.glog(this.get(0))-c.glog(s.get(0)),m=new Array(this.getLength()),b=0;b<this.getLength();b++)m[b]=this.get(b);for(var b=0;b<s.getLength();b++)m[b]^=c.gexp(c.glog(s.get(b))+p);return new f(m,0).mod(s)}};function o(s,p){this.totalCount=s,this.dataCount=p}o.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],o.getRSBlocks=function(s,p){var m=o.getRsBlockTable(s,p);if(m==null)throw new Error("bad rs block @ typeNumber:"+s+"/errorCorrectLevel:"+p);for(var b=m.length/3,d=[],w=0;w<b;w++)for(var y=m[w*3+0],v=m[w*3+1],E=m[w*3+2],C=0;C<y;C++)d.push(new o(v,E));return d},o.getRsBlockTable=function(s,p){switch(p){case r.L:return o.RS_BLOCK_TABLE[(s-1)*4+0];case r.M:return o.RS_BLOCK_TABLE[(s-1)*4+1];case r.Q:return o.RS_BLOCK_TABLE[(s-1)*4+2];case r.H:return o.RS_BLOCK_TABLE[(s-1)*4+3];default:return}};function l(){this.buffer=[],this.length=0}l.prototype={get:function(s){var p=Math.floor(s/8);return(this.buffer[p]>>>7-s%8&1)==1},put:function(s,p){for(var m=0;m<p;m++)this.putBit((s>>>p-m-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(s){var p=Math.floor(this.length/8);this.buffer.length<=p&&this.buffer.push(0),s&&(this.buffer[p]|=128>>>this.length%8),this.length++}};var n=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function a(s){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof s=="string"&&(s={content:s}),s)for(var p in s)this.options[p]=s[p];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function m(E){switch(E){case"L":return r.L;case"M":return r.M;case"Q":return r.Q;case"H":return r.H;default:throw new Error("Unknwon error correction level: "+E)}}function b(E,C){for(var _=d(E),S=1,T=0,N=0,x=n.length;N<=x;N++){var B=n[N];if(!B)throw new Error("Content too long: expected "+T+" but got "+_);switch(C){case"L":T=B[0];break;case"M":T=B[1];break;case"Q":T=B[2];break;case"H":T=B[3];break;default:throw new Error("Unknwon error correction level: "+C)}if(_<=T)break;S++}if(S>n.length)throw new Error("Content too long");return S}function d(E){var C=encodeURI(E).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return C.length+(C.length!=E?3:0)}var w=this.options.content,y=b(w,this.options.ecl),v=m(this.options.ecl);this.qrcode=new i(y,v),this.qrcode.addData(w),this.qrcode.make()}return a.prototype.svg=function(s){var p=this.options||{},m=this.qrcode.modules;typeof s>"u"&&(s={container:p.container||"svg"});for(var b=typeof p.pretty<"u"?!!p.pretty:!0,d=b?" ":"",w=b?`\r
2
2
  `:"",y=p.width,v=p.height,E=m.length,C=y/(E+2*p.padding),_=v/(E+2*p.padding),S=typeof p.join<"u"?!!p.join:!1,T=typeof p.swap<"u"?!!p.swap:!1,N=typeof p.xmlDeclaration<"u"?!!p.xmlDeclaration:!0,x=typeof p.predefined<"u"?!!p.predefined:!1,B=x?d+'<defs><path id="qrmodule" d="M0 0 h'+_+" v"+C+' H0 z" style="fill:'+p.color+';shape-rendering:crispEdges;" /></defs>'+w:"",W=d+'<rect x="0" y="0" width="'+y+'" height="'+v+'" style="fill:'+p.background+';shape-rendering:crispEdges;"/>'+w,A="",k="",R=0;R<E;R++)for(var I=0;I<E;I++){var M=m[I][R];if(M){var L=I*C+p.padding*C,O=R*_+p.padding*_;if(T){var j=L;L=O,O=j}if(S){var F=C+L,$=_+O;L=Number.isInteger(L)?Number(L):L.toFixed(2),O=Number.isInteger(O)?Number(O):O.toFixed(2),F=Number.isInteger(F)?Number(F):F.toFixed(2),$=Number.isInteger($)?Number($):$.toFixed(2),k+="M"+L+","+O+" V"+$+" H"+F+" V"+O+" H"+L+" Z "}else x?A+=d+'<use x="'+L.toString()+'" y="'+O.toString()+'" href="#qrmodule" />'+w:A+=d+'<rect x="'+L.toString()+'" y="'+O.toString()+'" width="'+C+'" height="'+_+'" style="fill:'+p.color+';shape-rendering:crispEdges;"/>'+w}}S&&(A=d+'<path x="0" y="0" style="fill:'+p.color+';shape-rendering:crispEdges;" d="'+k+'" />');let U="";if(this.options.image!==void 0&&this.options.image.svg){const ce=y*this.options.image.width/100,Zn=v*this.options.image.height/100,La=y/2-ce/2,Ma=v/2-Zn/2;U+=`<svg x="${La}" y="${Ma}" width="${ce}" height="${Zn}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,U+=this.options.image.svg+w,U+="</svg>"}var D="";switch(s.container){case"svg":N&&(D+='<?xml version="1.0" standalone="yes"?>'+w),D+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+y+'" height="'+v+'">'+w,D+=B+W+A,D+=U,D+="</svg>";break;case"svg-viewbox":N&&(D+='<?xml version="1.0" standalone="yes"?>'+w),D+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+y+" "+v+'">'+w,D+=B+W+A,D+=U,D+="</svg>";break;case"g":D+='<g width="'+y+'" height="'+v+'">'+w,D+=B+W+A,D+=U,D+="</g>";break;default:D+=(B+W+A+U).replace(/^\s+/,"");break}return D},Kt=a,Kt}var _s;function Xa(){if(_s)return me;_s=1;var e=me&&me.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(me,"__esModule",{value:!0}),me.QRCode=void 0;const i=Z,t=$t,r=e(Ka()),h=u=>{const[c,g]=(0,t.useState)("");return(0,t.useEffect)(()=>{var f,o;const l=new r.default({content:u.content,background:u.bgColor||"#ffffff",color:u.fgColor||"#000000",container:"svg",ecl:"M",width:(f=u.width)!==null&&f!==void 0?f:256,height:(o=u.height)!==null&&o!==void 0?o:256,padding:0,image:u.image}),n=H.from(l.svg(),"utf8").toString("base64");g(`data:image/svg+xml;base64,${n}`)},[u.bgColor,u.content,u.fgColor,u.height,u.image,u.width]),c?(0,i.h)("img",{src:c,alt:"QR Code"}):null};return me.QRCode=h,me}var be={},Ct={},Rs;function Ya(){return Rs||(Rs=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}"),Ct}var Cs;function ec(){if(Cs)return be;Cs=1;var e=be&&be.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(be,"__esModule",{value:!0}),be.Spinner=void 0;const i=Z,t=e(Ya()),r=h=>{var u;const c=(u=h.size)!==null&&u!==void 0?u:64,g=h.color||"#000";return(0,i.h)("div",{class:"-cbwsdk-spinner"},(0,i.h)("style",null,t.default),(0,i.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:c,height:c}},(0,i.h)("circle",{style:{cx:50,cy:50,r:45,stroke:g}})))};return be.Spinner=r,be}var St={},Ss;function tc(){return Ss||(Ss=1,Object.defineProperty(St,"__esModule",{value:!0}),St.default=".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer;border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}"),St}var ks;function rc(){if(ks)return ie;ks=1;var e=ie&&ie.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(ie,"__esModule",{value:!0}),ie.CoinbaseWalletSteps=ie.ConnectContent=void 0;const i=e(yt),t=Z,r=ae(),h=Ln(),u=Ga(),c=Za(),g=Qa(),f=Xa(),o=ec(),l=e(tc()),n={title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",steps:m},a=b=>b==="light"?"#FFFFFF":"#0A0B0D";function s(b){const{theme:d}=b,w=(0,r.createQrUrl)(b.sessionId,b.sessionSecret,b.linkAPIUrl,b.isParentConnection,b.version,b.chainId),y=n.steps;return(0,t.h)("div",{"data-testid":"connect-content",className:(0,i.default)("-cbwsdk-connect-content",d)},(0,t.h)("style",null,l.default),(0,t.h)("div",{className:"-cbwsdk-connect-content-header"},(0,t.h)("h2",{className:(0,i.default)("-cbwsdk-connect-content-heading",d)},"Scan to connect with our mobile app"),b.onCancel&&(0,t.h)("button",{type:"button",className:"-cbwsdk-cancel-button",onClick:b.onCancel},(0,t.h)(u.CloseIcon,{fill:d==="light"?"#0A0B0D":"#FFFFFF"}))),(0,t.h)("div",{className:"-cbwsdk-connect-content-layout"},(0,t.h)("div",{className:"-cbwsdk-connect-content-column-left"},(0,t.h)(p,{title:n.title,description:n.description,theme:d})),(0,t.h)("div",{className:"-cbwsdk-connect-content-column-right"},(0,t.h)("div",{className:"-cbwsdk-connect-content-qr-wrapper"},(0,t.h)(f.QRCode,{content:w,width:200,height:200,fgColor:"#000",bgColor:"transparent"}),(0,t.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:h.LIB_VERSION}),(0,t.h)("input",{type:"hidden",value:w})),(0,t.h)(y,{theme:d}),!b.isConnected&&(0,t.h)("div",{"data-testid":"connecting-spinner",className:(0,i.default)("-cbwsdk-connect-content-qr-connecting",d)},(0,t.h)(o.Spinner,{size:36,color:d==="dark"?"#FFF":"#000"}),(0,t.h)("p",null,"Connecting...")))))}ie.ConnectContent=s;function p({title:b,description:d,theme:w}){return(0,t.h)("div",{className:(0,i.default)("-cbwsdk-connect-item",w)},(0,t.h)("div",null,(0,t.h)(c.CoinbaseWalletRound,null)),(0,t.h)("div",{className:"-cbwsdk-connect-item-copy-wrapper"},(0,t.h)("h3",{className:"-cbwsdk-connect-item-title"},b),(0,t.h)("p",{className:"-cbwsdk-connect-item-description"},d)))}function m({theme:b}){return(0,t.h)("ol",{className:"-cbwsdk-wallet-steps"},(0,t.h)("li",{className:(0,i.default)("-cbwsdk-wallet-steps-item",b)},(0,t.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,t.h)("li",{className:(0,i.default)("-cbwsdk-wallet-steps-item",b)},(0,t.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},(0,t.h)("span",null,"Tap ",(0,t.h)("strong",null,"Scan")," "),(0,t.h)("span",{className:(0,i.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",b)},(0,t.h)(g.QRCodeIcon,{fill:a(b)})))))}return ie.CoinbaseWalletSteps=m,ie}var ye={},rt={},Is;function nc(){if(Is)return rt;Is=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.ArrowLeftIcon=void 0;const e=Z;function i(t){return(0,e.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},t),(0,e.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}return rt.ArrowLeftIcon=i,rt}var nt={},As;function sc(){if(As)return nt;As=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.LaptopIcon=void 0;const e=Z;function i(t){return(0,e.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},t),(0,e.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,e.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}return nt.LaptopIcon=i,nt}var st={},Ls;function ic(){if(Ls)return st;Ls=1,Object.defineProperty(st,"__esModule",{value:!0}),st.SafeIcon=void 0;const e=Z;function i(t){return(0,e.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},t),(0,e.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z"}))}return st.SafeIcon=i,st}var kt={},Ms;function oc(){return Ms||(Ms=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.default=".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}"),kt}var Ns;function ac(){if(Ns)return ye;Ns=1;var e=ye&&ye.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(ye,"__esModule",{value:!0}),ye.TryExtensionContent=void 0;const i=e(yt),t=Z,r=$t,h=nc(),u=sc(),c=ic(),g=e(oc());function f({theme:o}){const[l,n]=(0,r.useState)(!1),a=(0,r.useCallback)(()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")},[]),s=(0,r.useCallback)(()=>{l?window.location.reload():(a(),n(!0))},[a,l]);return(0,t.h)("div",{class:(0,i.default)("-cbwsdk-try-extension",o)},(0,t.h)("style",null,g.default),(0,t.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,t.h)("h3",{class:(0,i.default)("-cbwsdk-try-extension-heading",o)},"Or try the Coinbase Wallet browser extension"),(0,t.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,t.h)("button",{class:(0,i.default)("-cbwsdk-try-extension-cta",o),onClick:s},l?"Refresh":"Install"),(0,t.h)("div",null,!l&&(0,t.h)(h.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:o==="light"?"#0052FF":"#588AF5"})))),(0,t.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,t.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,t.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,t.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,t.h)("span",{class:(0,i.default)("-cbwsdk-try-extension-list-item-icon",o)},(0,t.h)(u.LaptopIcon,{fill:o==="light"?"#0A0B0D":"#FFFFFF"}))),(0,t.h)("div",{class:(0,i.default)("-cbwsdk-try-extension-list-item-copy",o)},"Connect with dapps with just one click on your desktop browser")),(0,t.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,t.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,t.h)("span",{class:(0,i.default)("-cbwsdk-try-extension-list-item-icon",o)},(0,t.h)(c.SafeIcon,{fill:o==="light"?"#0A0B0D":"#FFFFFF"}))),(0,t.h)("div",{class:(0,i.default)("-cbwsdk-try-extension-list-item-copy",o)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}return ye.TryExtensionContent=f,ye}var It={},Ts;function cc(){return Ts||(Ts=1,Object.defineProperty(It,"__esModule",{value:!0}),It.default=".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}"),It}var Ps;function uc(){if(Ps)return pe;Ps=1;var e=pe&&pe.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(pe,"__esModule",{value:!0}),pe.ConnectDialog=void 0;const i=e(yt),t=Z,r=$t,h=rc(),u=ac(),c=e(cc()),g=f=>{const{isOpen:o,darkMode:l}=f,[n,a]=(0,r.useState)(!o),[s,p]=(0,r.useState)(!o);(0,r.useEffect)(()=>{const b=[window.setTimeout(()=>{p(!o)},10)];return o?a(!1):b.push(window.setTimeout(()=>{a(!0)},360)),()=>{b.forEach(window.clearTimeout)}},[o]);const m=l?"dark":"light";return(0,t.h)("div",{class:(0,i.default)("-cbwsdk-connect-dialog-container",n&&"-cbwsdk-connect-dialog-container-hidden")},(0,t.h)("style",null,c.default),(0,t.h)("div",{class:(0,i.default)("-cbwsdk-connect-dialog-backdrop",m,s&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,t.h)("div",{class:"-cbwsdk-connect-dialog"},(0,t.h)("div",{class:(0,i.default)("-cbwsdk-connect-dialog-box",s&&"-cbwsdk-connect-dialog-box-hidden")},f.connectDisabled?null:(0,t.h)(h.ConnectContent,{theme:m,version:f.version,sessionId:f.sessionId,sessionSecret:f.sessionSecret,linkAPIUrl:f.linkAPIUrl,isConnected:f.isConnected,isParentConnection:f.isParentConnection,chainId:f.chainId,onCancel:f.onCancel}),(0,t.h)(u.TryExtensionContent,{theme:m}))))};return pe.ConnectDialog=g,pe}var Os;function lc(){if(Os)return Xe;Os=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.LinkFlow=void 0;const e=Z,i=uc();let t=class{constructor(h){this.connected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=h.darkMode,this.version=h.version,this.sessionId=h.sessionId,this.sessionSecret=h.sessionSecret,this.linkAPIUrl=h.linkAPIUrl,this.isParentConnection=h.isParentConnection}attach(h){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",h.appendChild(this.root),this.render()}setConnected(h){this.connected!==h&&(this.connected=h,this.render())}setChainId(h){this.chainId!==h&&(this.chainId=h,this.render())}detach(){var h;this.root&&((0,e.render)(null,this.root),(h=this.root.parentElement)===null||h===void 0||h.removeChild(this.root))}setConnectDisabled(h){this.connectDisabled=h}open(h){this.isOpen=!0,this.onCancel=h.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){this.root&&(0,e.render)((0,e.h)(i.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.connected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}};return Xe.LinkFlow=t,Xe}var it={},At={},xs;function dc(){return xs||(xs=1,Object.defineProperty(At,"__esModule",{value:!0}),At.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"),At}var Fs;function ta(){return Fs||(Fs=1,function(e){var i=it&&it.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(e,"__esModule",{value:!0}),e.SnackbarInstance=e.SnackbarContainer=e.Snackbar=void 0;const t=i(yt),r=Z,h=$t,u=i(dc()),c="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",g="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwuNTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";class f{constructor(a){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=a.darkMode}attach(a){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",a.appendChild(this.root),this.render()}presentItem(a){const s=this.nextItemKey++;return this.items.set(s,a),this.render(),()=>{this.items.delete(s),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,r.render)((0,r.h)("div",null,(0,r.h)(e.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([a,s])=>(0,r.h)(e.SnackbarInstance,Object.assign({},s,{key:a}))))),this.root)}}e.Snackbar=f;const o=n=>(0,r.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-container")},(0,r.h)("style",null,u.default),(0,r.h)("div",{class:"-cbwsdk-snackbar"},n.children));e.SnackbarContainer=o;const l=({autoExpand:n,message:a,menuItems:s})=>{const[p,m]=(0,h.useState)(!0),[b,d]=(0,h.useState)(n??!1);(0,h.useEffect)(()=>{const y=[window.setTimeout(()=>{m(!1)},1),window.setTimeout(()=>{d(!0)},1e4)];return()=>{y.forEach(window.clearTimeout)}});const w=()=>{d(!b)};return(0,r.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-instance",p&&"-cbwsdk-snackbar-instance-hidden",b&&"-cbwsdk-snackbar-instance-expanded")},(0,r.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:w},(0,r.h)("img",{src:c,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,r.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},a),(0,r.h)("div",{class:"-gear-container"},!b&&(0,r.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,r.h)("img",{src:g,class:"-gear-icon",title:"Expand"}))),s&&s.length>0&&(0,r.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},s.map((y,v)=>(0,r.h)("div",{class:(0,t.default)("-cbwsdk-snackbar-instance-menu-item",y.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:y.onClick,key:v},(0,r.h)("svg",{width:y.svgWidth,height:y.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,r.h)("path",{"fill-rule":y.defaultFillRule,"clip-rule":y.defaultClipRule,d:y.path,fill:"#AAAAAA"})),(0,r.h)("span",{class:(0,t.default)("-cbwsdk-snackbar-instance-menu-item-info",y.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},y.info)))))};e.SnackbarInstance=l}(it)),it}var Bs;function ra(){if(Bs)return Ke;Bs=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.WalletLinkRelayUI=void 0;const e=ea(),i=lc(),t=ta();let r=class{constructor(u){this.standalone=null,this.attached=!1,this.snackbar=new t.Snackbar({darkMode:u.darkMode}),this.linkFlow=new i.LinkFlow({darkMode:u.darkMode,version:u.version,sessionId:u.session.id,sessionSecret:u.session.secret,linkAPIUrl:u.linkAPIUrl,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const u=document.documentElement,c=document.createElement("div");c.className="-cbwsdk-css-reset",u.appendChild(c),this.linkFlow.attach(c),this.snackbar.attach(c),this.attached=!0,(0,e.injectCssReset)()}setConnected(u){this.linkFlow.setConnected(u)}setChainId(u){this.linkFlow.setChainId(u)}setConnectDisabled(u){this.linkFlow.setConnectDisabled(u)}addEthereumChain(){}watchAsset(){}switchEthereumChain(){}requestEthereumAccounts(u){this.linkFlow.open({onCancel:u.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}showConnecting(u){let c;return u.isUnlinkedErrorState?c={autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:u.onResetConnection}]}:c={message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:u.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:u.onResetConnection}]},this.snackbar.presentItem(c)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(u){this.standalone=u}isStandalone(){var u;return(u=this.standalone)!==null&&u!==void 0?u:!1}};return Ke.WalletLinkRelayUI=r,Ke}var Ds;function na(){if(Ds)return Ve;Ds=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.WalletLinkRelay=void 0;const e=Dt(),i=jt(),t=ae(),r=Mn(),h=Nn(),u=Tn(),c=za(),g=An(),f=ra();let o=class Ne extends h.RelayAbstract{constructor(n){var a;super(),this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.linkedUpdated=b=>{var d;this.isLinked=b;const w=this.storage.getItem(h.LOCAL_STORAGE_ADDRESSES_KEY);if(b&&(this.session.linked=b),this.isUnlinkedErrorState=!1,w){const y=w.split(" "),v=this.storage.getItem("IsStandaloneSigning")==="true";if(y[0]!==""&&!b&&this.session.linked&&!v){this.isUnlinkedErrorState=!0;const E=this.getSessionIdHash();(d=this.diagnostic)===null||d===void 0||d.log(r.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:E})}}},this.metadataUpdated=(b,d)=>{this.storage.setItem(b,d)},this.chainUpdated=(b,d)=>{this.chainCallbackParams.chainId===b&&this.chainCallbackParams.jsonRpcUrl===d||(this.chainCallbackParams={chainId:b,jsonRpcUrl:d},this.chainCallback&&this.chainCallback(b,d))},this.accountUpdated=b=>{this.accountsCallback&&this.accountsCallback([b]),Ne.accountRequestCallbackIds.size>0&&(Array.from(Ne.accountRequestCallbackIds.values()).forEach(d=>{const w={type:"WEB3_RESPONSE",id:d,response:{method:"requestEthereumAccounts",result:[b]}};this.invokeCallback(Object.assign(Object.assign({},w),{id:d}))}),Ne.accountRequestCallbackIds.clear())},this.connectedUpdated=b=>{this.ui.setConnected(b)},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=n.linkAPIUrl,this.storage=n.storage,this.options=n;const{session:s,ui:p,connection:m}=this.subscribe();this._session=s,this.connection=m,this.relayEventManager=n.relayEventManager,this.diagnostic=n.diagnosticLogger,this._reloadOnDisconnect=(a=n.reloadOnDisconnect)!==null&&a!==void 0?a:!0,this.ui=p}subscribe(){const n=u.Session.load(this.storage)||new u.Session(this.storage).save(),{linkAPIUrl:a,diagnostic:s}=this,p=new c.WalletLinkConnection({session:n,linkAPIUrl:a,diagnostic:s,listener:this}),{version:m,darkMode:b}=this.options,d=this.options.uiConstructor({linkAPIUrl:a,version:m,darkMode:b,session:n});return p.connect(),{session:n,ui:d,connection:p}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(n=>setTimeout(()=>n(null),1e3))]).then(()=>{var n,a;const s=this.ui.isStandalone();(n=this.diagnostic)===null||n===void 0||n.log(r.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const p=u.Session.load(this.storage);if((p==null?void 0:p.id)===this._session.id?this.storage.clear():p&&((a=this.diagnostic)===null||a===void 0||a.log(r.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:u.Session.hash(p.id)})),this._reloadOnDisconnect){this.ui.reloadUI();return}this.accountsCallback&&this.accountsCallback([],!0);const{session:m,ui:b,connection:d}=this.subscribe();this._session=m,this.connection=d,this.ui=b,s&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.options.headlessMode||this.attachUI()}).catch(n=>{var a;(a=this.diagnostic)===null||a===void 0||a.log(r.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${n}`,sessionIdHash:this.getSessionIdHash()})})}setAppInfo(n,a){this.appName=n,this.appLogoUrl=a}getStorageItem(n){return this.storage.getItem(n)}get session(){return this._session}setStorageItem(n,a){this.storage.setItem(n,a)}signEthereumMessage(n,a,s,p){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,t.hexStringFromBuffer)(n,!0),address:a,addPrefix:s,typedDataJson:p||null}})}ethereumAddressFromSignedMessage(n,a,s){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,t.hexStringFromBuffer)(n,!0),signature:(0,t.hexStringFromBuffer)(a,!0),addPrefix:s}})}signEthereumTransaction(n){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:n.fromAddress,toAddress:n.toAddress,weiValue:(0,t.bigIntStringFromBN)(n.weiValue),data:(0,t.hexStringFromBuffer)(n.data,!0),nonce:n.nonce,gasPriceInWei:n.gasPriceInWei?(0,t.bigIntStringFromBN)(n.gasPriceInWei):null,maxFeePerGas:n.gasPriceInWei?(0,t.bigIntStringFromBN)(n.gasPriceInWei):null,maxPriorityFeePerGas:n.gasPriceInWei?(0,t.bigIntStringFromBN)(n.gasPriceInWei):null,gasLimit:n.gasLimit?(0,t.bigIntStringFromBN)(n.gasLimit):null,chainId:n.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(n){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:n.fromAddress,toAddress:n.toAddress,weiValue:(0,t.bigIntStringFromBN)(n.weiValue),data:(0,t.hexStringFromBuffer)(n.data,!0),nonce:n.nonce,gasPriceInWei:n.gasPriceInWei?(0,t.bigIntStringFromBN)(n.gasPriceInWei):null,maxFeePerGas:n.maxFeePerGas?(0,t.bigIntStringFromBN)(n.maxFeePerGas):null,maxPriorityFeePerGas:n.maxPriorityFeePerGas?(0,t.bigIntStringFromBN)(n.maxPriorityFeePerGas):null,gasLimit:n.gasLimit?(0,t.bigIntStringFromBN)(n.gasLimit):null,chainId:n.chainId,shouldSubmit:!0}})}submitEthereumTransaction(n,a){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,t.hexStringFromBuffer)(n,!0),chainId:a}})}scanQRCode(n){return this.sendRequest({method:"scanQRCode",params:{regExp:n}})}getQRCodeUrl(){return(0,t.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(n,a){return this.sendRequest({method:"generic",params:{action:a,data:n}})}sendGenericMessage(n){return this.sendRequest(n)}sendRequest(n){let a=null;const s=(0,t.randomBytesHex)(8),p=b=>{this.publishWeb3RequestCanceledEvent(s),this.handleErrorResponse(s,n.method,b),a==null||a()};return{promise:new Promise((b,d)=>{this.ui.isStandalone()||(a=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:p,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(s,w=>{if(a==null||a(),(0,g.isErrorResponse)(w))return d(new Error(w.errorMessage));b(w)}),this.ui.isStandalone()?this.sendRequestStandalone(s,n):this.publishWeb3RequestEvent(s,n)}),cancel:p}}setConnectDisabled(n){this.ui.setConnectDisabled(n)}setAccountsCallback(n){this.accountsCallback=n}setChainCallback(n){this.chainCallback=n}setDappDefaultChainCallback(n){this.dappDefaultChain=n,this.ui instanceof f.WalletLinkRelayUI&&this.ui.setChainId(n)}publishWeb3RequestEvent(n,a){var s;const p={type:"WEB3_REQUEST",id:n,request:a},m=u.Session.load(this.storage);(s=this.diagnostic)===null||s===void 0||s.log(r.EVENTS.WEB3_REQUEST,{eventId:p.id,method:`relay::${a.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:m?u.Session.hash(m.id):"",isSessionMismatched:((m==null?void 0:m.id)!==this._session.id).toString()}),this.publishEvent("Web3Request",p,!0).then(b=>{var d;(d=this.diagnostic)===null||d===void 0||d.log(r.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:p.id,method:`relay::${a.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:m?u.Session.hash(m.id):"",isSessionMismatched:((m==null?void 0:m.id)!==this._session.id).toString()})}).catch(b=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:p.id,response:{method:a.method,errorMessage:b.message}})})}publishWeb3RequestCanceledEvent(n){const a={type:"WEB3_REQUEST_CANCELED",id:n};this.publishEvent("Web3RequestCanceled",a,!1).then()}publishEvent(n,a,s){return this.connection.publishEvent(n,a,s)}handleWeb3ResponseMessage(n){var a;const{response:s}=n;if((a=this.diagnostic)===null||a===void 0||a.log(r.EVENTS.WEB3_RESPONSE,{eventId:n.id,method:`relay::${s.method}`,sessionIdHash:this.getSessionIdHash()}),s.method==="requestEthereumAccounts"){Ne.accountRequestCallbackIds.forEach(p=>this.invokeCallback(Object.assign(Object.assign({},n),{id:p}))),Ne.accountRequestCallbackIds.clear();return}this.invokeCallback(n)}handleErrorResponse(n,a,s,p){var m;const b=(m=s==null?void 0:s.message)!==null&&m!==void 0?m:(0,e.getMessageFromCode)(p);this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:{method:a,errorMessage:b,errorCode:p}})}invokeCallback(n){const a=this.relayEventManager.callbacks.get(n.id);a&&(a(n.response),this.relayEventManager.callbacks.delete(n.id))}requestEthereumAccounts(){const n={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},a=(0,t.randomBytesHex)(8),s=m=>{this.publishWeb3RequestCanceledEvent(a),this.handleErrorResponse(a,n.method,m)};return{promise:new Promise((m,b)=>{if(this.relayEventManager.callbacks.set(a,d=>{if(this.ui.hideRequestEthereumAccounts(),(0,g.isErrorResponse)(d))return b(new Error(d.errorMessage));m(d)}),this.ui.inlineAccountsResponse()){const d=w=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:a,response:{method:"requestEthereumAccounts",result:w}})};this.ui.requestEthereumAccounts({onCancel:s,onAccounts:d})}else{const d=e.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>s(d)})}Ne.accountRequestCallbackIds.add(a),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(a,n)}),cancel:s}}selectProvider(n){const a={method:"selectProvider"},s=(0,t.randomBytesHex)(8),p=b=>{this.publishWeb3RequestCanceledEvent(s),this.handleErrorResponse(s,a.method,b)},m=new Promise((b,d)=>{this.relayEventManager.callbacks.set(s,v=>{if((0,g.isErrorResponse)(v))return d(new Error(v.errorMessage));b(v)});const w=v=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:s,response:{method:"selectProvider",result:i.ProviderType.Unselected}})},y=v=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:s,response:{method:"selectProvider",result:v}})};this.ui.selectProvider&&this.ui.selectProvider({onApprove:y,onCancel:w,providerOptions:n})});return{cancel:p,promise:m}}watchAsset(n,a,s,p,m,b){const d={method:"watchAsset",params:{type:n,options:{address:a,symbol:s,decimals:p,image:m},chainId:b}};let w=null;const y=(0,t.randomBytesHex)(8),v=C=>{this.publishWeb3RequestCanceledEvent(y),this.handleErrorResponse(y,d.method,C),w==null||w()};this.ui.inlineWatchAsset()||(w=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:v,onResetConnection:this.resetAndReload}));const E=new Promise((C,_)=>{this.relayEventManager.callbacks.set(y,N=>{if(w==null||w(),(0,g.isErrorResponse)(N))return _(new Error(N.errorMessage));C(N)});const S=N=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:y,response:{method:"watchAsset",result:!1}})},T=()=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:y,response:{method:"watchAsset",result:!0}})};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:T,onCancel:S,type:n,address:a,symbol:s,decimals:p,image:m,chainId:b}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(y,d)});return{cancel:v,promise:E}}addEthereumChain(n,a,s,p,m,b){const d={method:"addEthereumChain",params:{chainId:n,rpcUrls:a,blockExplorerUrls:p,chainName:m,iconUrls:s,nativeCurrency:b}};let w=null;const y=(0,t.randomBytesHex)(8),v=C=>{this.publishWeb3RequestCanceledEvent(y),this.handleErrorResponse(y,d.method,C),w==null||w()};return this.ui.inlineAddEthereumChain(n)||(w=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:v,onResetConnection:this.resetAndReload})),{promise:new Promise((C,_)=>{this.relayEventManager.callbacks.set(y,N=>{if(w==null||w(),(0,g.isErrorResponse)(N))return _(new Error(N.errorMessage));C(N)});const S=N=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:y,response:{method:"addEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},T=N=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:y,response:{method:"addEthereumChain",result:{isApproved:!0,rpcUrl:N}}})};this.ui.inlineAddEthereumChain(n)&&this.ui.addEthereumChain({onCancel:S,onApprove:T,chainId:d.params.chainId,rpcUrls:d.params.rpcUrls,blockExplorerUrls:d.params.blockExplorerUrls,chainName:d.params.chainName,iconUrls:d.params.iconUrls,nativeCurrency:d.params.nativeCurrency}),!this.ui.inlineAddEthereumChain(n)&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(y,d)}),cancel:v}}switchEthereumChain(n,a){const s={method:"switchEthereumChain",params:Object.assign({chainId:n},{address:a})},p=(0,t.randomBytesHex)(8),m=d=>{this.publishWeb3RequestCanceledEvent(p),this.handleErrorResponse(p,s.method,d)};return{promise:new Promise((d,w)=>{this.relayEventManager.callbacks.set(p,E=>{if((0,g.isErrorResponse)(E)&&E.errorCode)return w(e.standardErrors.provider.custom({code:E.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,g.isErrorResponse)(E))return w(new Error(E.errorMessage));d(E)});const y=E=>{var C;if(E){const _=(C=(0,e.getErrorCode)(E))!==null&&C!==void 0?C:e.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(p,"switchEthereumChain",E instanceof Error?E:e.standardErrors.provider.unsupportedChain(n),_)}else this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:p,response:{method:"switchEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},v=E=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:p,response:{method:"switchEthereumChain",result:{isApproved:!0,rpcUrl:E}}})};this.ui.switchEthereumChain({onCancel:y,onApprove:v,chainId:s.params.chainId,address:s.params.address}),!this.ui.inlineSwitchEthereumChain()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(p,s)}),cancel:m}}inlineAddEthereumChain(n){return this.ui.inlineAddEthereumChain(n)}getSessionIdHash(){return u.Session.hash(this._session.id)}sendRequestStandalone(n,a){const s=m=>{this.handleErrorResponse(n,a.method,m)},p=m=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:n,response:m})};switch(a.method){case"signEthereumMessage":this.ui.signEthereumMessage({request:a,onSuccess:p,onCancel:s});break;case"signEthereumTransaction":this.ui.signEthereumTransaction({request:a,onSuccess:p,onCancel:s});break;case"submitEthereumTransaction":this.ui.submitEthereumTransaction({request:a,onSuccess:p,onCancel:s});break;case"ethereumAddressFromSignedMessage":this.ui.ethereumAddressFromSignedMessage({request:a,onSuccess:p});break;default:s();break}}};return Ve.WalletLinkRelay=o,o.accountRequestCallbackIds=new Set,Ve}var ot={},we={},ve={},js;function hc(){return js||(js=1,function(e){var i=ve&&ve.__createBinding||(Object.create?function(r,h,u,c){c===void 0&&(c=u);var g=Object.getOwnPropertyDescriptor(h,u);(!g||("get"in g?!h.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return h[u]}}),Object.defineProperty(r,c,g)}:function(r,h,u,c){c===void 0&&(c=u),r[c]=h[u]}),t=ve&&ve.__exportStar||function(r,h){for(var u in r)u!=="default"&&!Object.prototype.hasOwnProperty.call(h,u)&&i(h,r,u)};Object.defineProperty(e,"__esModule",{value:!0}),t(ta(),e)}(ve)),ve}var Lt={},$s;function fc(){return $s||($s=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.default=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}"),Lt}var qs;function gc(){if(qs)return we;qs=1;var e=we&&we.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(we,"__esModule",{value:!0}),we.RedirectDialog=void 0;const i=e(yt),t=Z,r=ea(),h=hc(),u=e(fc());let c=class{constructor(){this.root=null}attach(){const o=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",o.appendChild(this.root),(0,r.injectCssReset)()}present(o){this.render(o)}clear(){this.render(null)}render(o){this.root&&((0,t.render)(null,this.root),o&&(0,t.render)((0,t.h)(g,Object.assign({},o,{onDismiss:()=>{this.clear()}})),this.root))}};we.RedirectDialog=c;const g=({title:f,buttonText:o,darkMode:l,onButtonClick:n,onDismiss:a})=>{const s=l?"dark":"light";return(0,t.h)(h.SnackbarContainer,{darkMode:l},(0,t.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,t.h)("style",null,u.default),(0,t.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:a}),(0,t.h)("div",{class:(0,i.default)("-cbwsdk-redirect-dialog-box",s)},(0,t.h)("p",null,f),(0,t.h)("button",{onClick:n},o))))};return we}var Hs;function sa(){if(Hs)return ot;Hs=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.MobileRelayUI=void 0;const e=gc();let i=class{constructor(r){this.attached=!1,this.darkMode=!1,this.redirectDialog=new e.RedirectDialog,this.darkMode=r.darkMode}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}setConnected(r){}redirectToCoinbaseWallet(r){const h=new URL("https://go.cb-w.com/walletlink");h.searchParams.append("redirect_url",window.location.href),r&&h.searchParams.append("wl_url",r);const u=document.createElement("a");u.target="cbw-opener",u.href=h.href,u.rel="noreferrer noopener",u.click()}openCoinbaseWalletDeeplink(r){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",darkMode:this.darkMode,onButtonClick:()=>{this.redirectToCoinbaseWallet(r)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(r)},99)}showConnecting(r){return()=>{this.redirectDialog.clear()}}hideRequestEthereumAccounts(){this.redirectDialog.clear()}requestEthereumAccounts(){}addEthereumChain(){}watchAsset(){}selectProvider(){}switchEthereumChain(){}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}reloadUI(){}setStandalone(){}setConnectDisabled(){}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}};return ot.MobileRelayUI=i,ot}var Us;function ia(){if(Us)return We;Us=1,Object.defineProperty(We,"__esModule",{value:!0}),We.MobileRelay=void 0;const e=ae(),i=na(),t=sa();let r=class extends i.WalletLinkRelay{constructor(u){var c;super(u),this._enableMobileWalletLink=(c=u.enableMobileWalletLink)!==null&&c!==void 0?c:!1}requestEthereumAccounts(){return this._enableMobileWalletLink?super.requestEthereumAccounts():{promise:new Promise(()=>{const u=(0,e.getLocation)();u.href=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(u.href)}`}),cancel:()=>{}}}publishWeb3RequestEvent(u,c){if(super.publishWeb3RequestEvent(u,c),!(this._enableMobileWalletLink&&this.ui instanceof t.MobileRelayUI))return;let g=!1;switch(c.method){case"requestEthereumAccounts":case"connectAndSignIn":g=!0,this.ui.openCoinbaseWalletDeeplink(this.getQRCodeUrl());break;case"switchEthereumChain":return;default:g=!0,this.ui.openCoinbaseWalletDeeplink();break}g&&window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0})}handleWeb3ResponseMessage(u){super.handleWeb3ResponseMessage(u)}connectAndSignIn(u){if(!this._enableMobileWalletLink)throw new Error("connectAndSignIn is supported only when enableMobileWalletLink is on");return this.sendRequest({method:"connectAndSignIn",params:{appName:this.appName,appLogoUrl:this.appLogoUrl,domain:window.location.hostname,aud:window.location.href,version:"1",type:"eip4361",nonce:u.nonce,iat:new Date().toISOString(),chainId:`eip155:${this.dappDefaultChain}`,statement:u.statement,resources:u.resources}})}};return We.MobileRelay=r,We}var Xt,Ws;function oa(){if(Ws)return Xt;Ws=1;const e=Oa(),i=Ft();function t(n){return H.allocUnsafe(n).fill(0)}function r(n,a,s){const p=t(a);return n=u(n),s?n.length<a?(n.copy(p),p):n.slice(0,a):n.length<a?(n.copy(p,a-n.length),p):n.slice(-a)}function h(n,a){return r(n,a,!0)}function u(n){if(!H.isBuffer(n))if(Array.isArray(n))n=H.from(n);else if(typeof n=="string")o(n)?n=H.from(f(l(n)),"hex"):n=H.from(n);else if(typeof n=="number")n=intToBuffer(n);else if(n==null)n=H.allocUnsafe(0);else if(i.isBN(n))n=n.toArrayLike(H);else if(n.toArray)n=H.from(n.toArray());else throw new Error("invalid type");return n}function c(n){return n=u(n),"0x"+n.toString("hex")}function g(n,a){return n=u(n),a||(a=256),e("keccak"+a).update(n).digest()}function f(n){return n.length%2?"0"+n:n}function o(n){return typeof n=="string"&&n.match(/^0x[0-9A-Fa-f]*$/)}function l(n){return typeof n=="string"&&n.startsWith("0x")?n.slice(2):n}return Xt={zeros:t,setLength:r,setLengthRight:h,isHexString:o,stripHexPrefix:l,toBuffer:u,bufferToHex:c,keccak:g},Xt}var Yt,Vs;function pc(){if(Vs)return Yt;Vs=1;const e=oa(),i=Ft();function t(s){return s.startsWith("int[")?"int256"+s.slice(3):s==="int"?"int256":s.startsWith("uint[")?"uint256"+s.slice(4):s==="uint"?"uint256":s.startsWith("fixed[")?"fixed128x128"+s.slice(5):s==="fixed"?"fixed128x128":s.startsWith("ufixed[")?"ufixed128x128"+s.slice(6):s==="ufixed"?"ufixed128x128":s}function r(s){return parseInt(/^\D+(\d+)$/.exec(s)[1],10)}function h(s){var p=/^\D+(\d+)x(\d+)$/.exec(s);return[parseInt(p[1],10),parseInt(p[2],10)]}function u(s){var p=s.match(/(.*)\[(.*?)\]$/);return p?p[2]===""?"dynamic":parseInt(p[2],10):null}function c(s){var p=typeof s;if(p==="string")return e.isHexString(s)?new i(e.stripHexPrefix(s),16):new i(s,10);if(p==="number")return new i(s);if(s.toArray)return s;throw new Error("Argument is not a number")}function g(s,p){var m,b,d,w;if(s==="address")return g("uint160",c(p));if(s==="bool")return g("uint8",p?1:0);if(s==="string")return g("bytes",new H(p,"utf8"));if(o(s)){if(typeof p.length>"u")throw new Error("Not an array?");if(m=u(s),m!=="dynamic"&&m!==0&&p.length>m)throw new Error("Elements exceed array size: "+m);d=[],s=s.slice(0,s.lastIndexOf("[")),typeof p=="string"&&(p=JSON.parse(p));for(w in p)d.push(g(s,p[w]));if(m==="dynamic"){var y=g("uint256",p.length);d.unshift(y)}return H.concat(d)}else{if(s==="bytes")return p=new H(p),d=H.concat([g("uint256",p.length),p]),p.length%32!==0&&(d=H.concat([d,e.zeros(32-p.length%32)])),d;if(s.startsWith("bytes")){if(m=r(s),m<1||m>32)throw new Error("Invalid bytes<N> width: "+m);return e.setLengthRight(p,32)}else if(s.startsWith("uint")){if(m=r(s),m%8||m<8||m>256)throw new Error("Invalid uint<N> width: "+m);if(b=c(p),b.bitLength()>m)throw new Error("Supplied uint exceeds width: "+m+" vs "+b.bitLength());if(b<0)throw new Error("Supplied uint is negative");return b.toArrayLike(H,"be",32)}else if(s.startsWith("int")){if(m=r(s),m%8||m<8||m>256)throw new Error("Invalid int<N> width: "+m);if(b=c(p),b.bitLength()>m)throw new Error("Supplied int exceeds width: "+m+" vs "+b.bitLength());return b.toTwos(256).toArrayLike(H,"be",32)}else if(s.startsWith("ufixed")){if(m=h(s),b=c(p),b<0)throw new Error("Supplied ufixed is negative");return g("uint256",b.mul(new i(2).pow(new i(m[1]))))}else if(s.startsWith("fixed"))return m=h(s),g("int256",c(p).mul(new i(2).pow(new i(m[1]))))}throw new Error("Unsupported or invalid type: "+s)}function f(s){return s==="string"||s==="bytes"||u(s)==="dynamic"}function o(s){return s.lastIndexOf("]")===s.length-1}function l(s,p){var m=[],b=[],d=32*s.length;for(var w in s){var y=t(s[w]),v=p[w],E=g(y,v);f(y)?(m.push(g("uint256",d)),b.push(E),d+=E.length):m.push(E)}return H.concat(m.concat(b))}function n(s,p){if(s.length!==p.length)throw new Error("Number of types are not matching the values");for(var m,b,d=[],w=0;w<s.length;w++){var y=t(s[w]),v=p[w];if(y==="bytes")d.push(v);else if(y==="string")d.push(new H(v,"utf8"));else if(y==="bool")d.push(new H(v?"01":"00","hex"));else if(y==="address")d.push(e.setLength(v,20));else if(y.startsWith("bytes")){if(m=r(y),m<1||m>32)throw new Error("Invalid bytes<N> width: "+m);d.push(e.setLengthRight(v,m))}else if(y.startsWith("uint")){if(m=r(y),m%8||m<8||m>256)throw new Error("Invalid uint<N> width: "+m);if(b=c(v),b.bitLength()>m)throw new Error("Supplied uint exceeds width: "+m+" vs "+b.bitLength());d.push(b.toArrayLike(H,"be",m/8))}else if(y.startsWith("int")){if(m=r(y),m%8||m<8||m>256)throw new Error("Invalid int<N> width: "+m);if(b=c(v),b.bitLength()>m)throw new Error("Supplied int exceeds width: "+m+" vs "+b.bitLength());d.push(b.toTwos(m).toArrayLike(H,"be",m/8))}else throw new Error("Unsupported or invalid type: "+y)}return H.concat(d)}function a(s,p){return e.keccak(n(s,p))}return Yt={rawEncode:l,solidityPack:n,soliditySHA3:a},Yt}var er,zs;function mc(){if(zs)return er;zs=1;const e=oa(),i=pc(),t={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},r={encodeData(u,c,g,f=!0){const o=["bytes32"],l=[this.hashType(u,g)];if(f){const n=(a,s,p)=>{if(g[s]!==void 0)return["bytes32",p==null?"0x0000000000000000000000000000000000000000000000000000000000000000":e.keccak(this.encodeData(s,p,g,f))];if(p===void 0)throw new Error(`missing value for field ${a} of type ${s}`);if(s==="bytes")return["bytes32",e.keccak(p)];if(s==="string")return typeof p=="string"&&(p=H.from(p,"utf8")),["bytes32",e.keccak(p)];if(s.lastIndexOf("]")===s.length-1){const m=s.slice(0,s.lastIndexOf("[")),b=p.map(d=>n(a,m,d));return["bytes32",e.keccak(i.rawEncode(b.map(([d])=>d),b.map(([,d])=>d)))]}return[s,p]};for(const a of g[u]){const[s,p]=n(a.name,a.type,c[a.name]);o.push(s),l.push(p)}}else for(const n of g[u]){let a=c[n.name];if(a!==void 0)if(n.type==="bytes")o.push("bytes32"),a=e.keccak(a),l.push(a);else if(n.type==="string")o.push("bytes32"),typeof a=="string"&&(a=H.from(a,"utf8")),a=e.keccak(a),l.push(a);else if(g[n.type]!==void 0)o.push("bytes32"),a=e.keccak(this.encodeData(n.type,a,g,f)),l.push(a);else{if(n.type.lastIndexOf("]")===n.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");o.push(n.type),l.push(a)}}return i.rawEncode(o,l)},encodeType(u,c){let g="",f=this.findTypeDependencies(u,c).filter(o=>o!==u);f=[u].concat(f.sort());for(const o of f){if(!c[o])throw new Error("No type definition specified: "+o);g+=o+"("+c[o].map(({name:n,type:a})=>a+" "+n).join(",")+")"}return g},findTypeDependencies(u,c,g=[]){if(u=u.match(/^\w*/)[0],g.includes(u)||c[u]===void 0)return g;g.push(u);for(const f of c[u])for(const o of this.findTypeDependencies(f.type,c,g))!g.includes(o)&&g.push(o);return g},hashStruct(u,c,g,f=!0){return e.keccak(this.encodeData(u,c,g,f))},hashType(u,c){return e.keccak(this.encodeType(u,c))},sanitizeData(u){const c={};for(const g in t.properties)u[g]&&(c[g]=u[g]);return c.types&&(c.types=Object.assign({EIP712Domain:[]},c.types)),c},hash(u,c=!0){const g=this.sanitizeData(u),f=[H.from("1901","hex")];return f.push(this.hashStruct("EIP712Domain",g.domain,g.types,c)),g.primaryType!=="EIP712Domain"&&f.push(this.hashStruct(g.primaryType,g.message,g.types,c)),e.keccak(H.concat(f))}};er={TYPED_MESSAGE_SCHEMA:t,TypedDataUtils:r,hashForSignTypedDataLegacy:function(u){return h(u.data)},hashForSignTypedData_v3:function(u){return r.hash(u.data,!1)},hashForSignTypedData_v4:function(u){return r.hash(u.data)}};function h(u){const c=new Error("Expect argument to be non-empty array");if(typeof u!="object"||!u.length)throw c;const g=u.map(function(l){return l.type==="bytes"?e.toBuffer(l.value):l.value}),f=u.map(function(l){return l.type}),o=u.map(function(l){if(!l.name)throw c;return l.type+" "+l.name});return i.soliditySHA3(["bytes32","bytes32"],[i.soliditySHA3(new Array(u.length).fill("string"),o),i.soliditySHA3(f,g)])}return er}var Ee={},Js;function bc(){if(Js)return Ee;Js=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.filterFromParam=Ee.FilterPolyfill=void 0;const e=jt(),i=ae(),t=5*60*1e3,r={jsonrpc:"2.0",id:0};let h=class{constructor(a){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,e.IntNumber)(1),this.REQUEST_THROTTLE_INTERVAL=1e3,this.lastFetchTimestamp=new Date(0),this.resolvers=[],this.provider=a}async newFilter(a){const s=u(a),p=this.makeFilterId(),m=await this.setInitialCursorPosition(p,s.fromBlock);return console.info(`Installing new log filter(${p}):`,s,"initial cursor position:",m),this.logFilters.set(p,s),this.setFilterTimeout(p),(0,i.hexStringFromIntNumber)(p)}async newBlockFilter(){const a=this.makeFilterId(),s=await this.setInitialCursorPosition(a,"latest");return console.info(`Installing new block filter (${a}) with initial cursor position:`,s),this.blockFilters.add(a),this.setFilterTimeout(a),(0,i.hexStringFromIntNumber)(a)}async newPendingTransactionFilter(){const a=this.makeFilterId(),s=await this.setInitialCursorPosition(a,"latest");return console.info(`Installing new block filter (${a}) with initial cursor position:`,s),this.pendingTransactionFilters.add(a),this.setFilterTimeout(a),(0,i.hexStringFromIntNumber)(a)}uninstallFilter(a){const s=(0,i.intNumberFromHexString)(a);return console.info(`Uninstalling filter (${s})`),this.deleteFilter(s),!0}getFilterChanges(a){const s=(0,i.intNumberFromHexString)(a);return this.timeouts.has(s)&&this.setFilterTimeout(s),this.logFilters.has(s)?this.getLogFilterChanges(s):this.blockFilters.has(s)?this.getBlockFilterChanges(s):this.pendingTransactionFilters.has(s)?this.getPendingTransactionFilterChanges(s):Promise.resolve(o())}async getFilterLogs(a){const s=(0,i.intNumberFromHexString)(a),p=this.logFilters.get(s);return p?this.sendAsyncPromise(Object.assign(Object.assign({},r),{method:"eth_getLogs",params:[c(p)]})):o()}makeFilterId(){return(0,e.IntNumber)(++this.nextFilterId)}sendAsyncPromise(a){return new Promise((s,p)=>{this.provider.sendAsync(a,(m,b)=>{if(m)return p(m);if(Array.isArray(b)||b==null)return p(new Error(`unexpected response received: ${JSON.stringify(b)}`));s(b)})})}deleteFilter(a){console.info(`Deleting filter (${a})`),this.logFilters.delete(a),this.blockFilters.delete(a),this.pendingTransactionFilters.delete(a),this.cursors.delete(a),this.timeouts.delete(a)}async getLogFilterChanges(a){const s=this.logFilters.get(a),p=this.cursors.get(a);if(!p||!s)return o();const m=await this.getCurrentBlockHeight(),b=s.toBlock==="latest"?m:s.toBlock;if(p>m||p>Number(s.toBlock))return l();console.info(`Fetching logs from ${p} to ${b} for filter ${a}`);const d=await this.sendAsyncPromise(Object.assign(Object.assign({},r),{method:"eth_getLogs",params:[c(Object.assign(Object.assign({},s),{fromBlock:p,toBlock:b}))]}));if(Array.isArray(d.result)){const w=d.result.map(v=>(0,i.intNumberFromHexString)(v.blockNumber||"0x0")),y=Math.max(...w);if(y&&y>p){const v=(0,e.IntNumber)(y+1);console.info(`Moving cursor position for filter (${a}) from ${p} to ${v}`),this.cursors.set(a,v)}}return d}async getBlockFilterChanges(a){const s=this.cursors.get(a);if(!s)return o();const p=await this.getCurrentBlockHeight();if(s>p)return l();console.info(`Fetching blocks from ${s} to ${p} for filter (${a})`);const m=(await Promise.all((0,i.range)(s,p+1).map(d=>this.getBlockHashByNumber((0,e.IntNumber)(d))))).filter(d=>!!d),b=(0,e.IntNumber)(s+m.length);return console.info(`Moving cursor position for filter (${a}) from ${s} to ${b}`),this.cursors.set(a,b),Object.assign(Object.assign({},r),{result:m})}async getPendingTransactionFilterChanges(a){return Promise.resolve(l())}async setInitialCursorPosition(a,s){const p=await this.getCurrentBlockHeight(),m=typeof s=="number"&&s>p?s:p;return this.cursors.set(a,m),m}setFilterTimeout(a){const s=this.timeouts.get(a);s&&window.clearTimeout(s);const p=window.setTimeout(()=>{console.info(`Filter (${a}) timed out`),this.deleteFilter(a)},t);this.timeouts.set(a,p)}async getCurrentBlockHeight(){const a=new Date;if(a.getTime()-this.lastFetchTimestamp.getTime()>this.REQUEST_THROTTLE_INTERVAL){this.lastFetchTimestamp=a;const s=await this._getCurrentBlockHeight();this.currentBlockHeight=s,this.resolvers.forEach(p=>p(s)),this.resolvers=[]}return this.currentBlockHeight?this.currentBlockHeight:new Promise(s=>this.resolvers.push(s))}async _getCurrentBlockHeight(){const{result:a}=await this.sendAsyncPromise(Object.assign(Object.assign({},r),{method:"eth_blockNumber",params:[]}));return(0,i.intNumberFromHexString)((0,i.ensureHexString)(a))}async getBlockHashByNumber(a){const s=await this.sendAsyncPromise(Object.assign(Object.assign({},r),{method:"eth_getBlockByNumber",params:[(0,i.hexStringFromIntNumber)(a),!1]}));return s.result&&typeof s.result.hash=="string"?(0,i.ensureHexString)(s.result.hash):null}};Ee.FilterPolyfill=h;function u(n){return{fromBlock:g(n.fromBlock),toBlock:g(n.toBlock),addresses:n.address===void 0?null:Array.isArray(n.address)?n.address:[n.address],topics:n.topics||[]}}Ee.filterFromParam=u;function c(n){const a={fromBlock:f(n.fromBlock),toBlock:f(n.toBlock),topics:n.topics};return n.addresses!==null&&(a.address=n.addresses),a}function g(n){if(n===void 0||n==="latest"||n==="pending")return"latest";if(n==="earliest")return(0,e.IntNumber)(0);if((0,i.isHexString)(n))return(0,i.intNumberFromHexString)(n);throw new Error(`Invalid block option: ${String(n)}`)}function f(n){return n==="latest"?n:(0,i.hexStringFromIntNumber)(n)}function o(){return Object.assign(Object.assign({},r),{error:{code:-32e3,message:"filter not found"}})}function l(){return Object.assign(Object.assign({},r),{result:[]})}return Ee}var at={},_e={},Re={},tr,Gs;function Pn(){if(Gs)return tr;Gs=1,tr=e;function e(i){i=i||{};var t=i.max||Number.MAX_SAFE_INTEGER,r=typeof i.start<"u"?i.start:Math.floor(Math.random()*t);return function(){return r=r%t,r++}}return tr}var rr,Zs;function yc(){if(Zs)return rr;Zs=1;const e=(i,t)=>function(){const r=t.promiseModule,h=new Array(arguments.length);for(let u=0;u<arguments.length;u++)h[u]=arguments[u];return new r((u,c)=>{t.errorFirst?h.push(function(g,f){if(t.multiArgs){const o=new Array(arguments.length-1);for(let l=1;l<arguments.length;l++)o[l-1]=arguments[l];g?(o.unshift(g),c(o)):u(o)}else g?c(g):u(f)}):h.push(function(g){if(t.multiArgs){const f=new Array(arguments.length-1);for(let o=0;o<arguments.length;o++)f[o]=arguments[o];u(f)}else u(g)}),i.apply(this,h)})};return rr=(i,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);const r=u=>{const c=g=>typeof g=="string"?u===g:g.test(u);return t.include?t.include.some(c):!t.exclude.some(c)};let h;typeof i=="function"?h=function(){return t.excludeMain?i.apply(this,arguments):e(i,t).apply(this,arguments)}:h=Object.create(Object.getPrototypeOf(i));for(const u in i){const c=i[u];h[u]=typeof c=="function"&&r(u)?e(c,t):c}return h},rr}var Ce={},Mt={},Qs;function On(){if(Qs)return Mt;Qs=1,Object.defineProperty(Mt,"__esModule",{value:!0});const e=Xo();function i(h,u,c){try{Reflect.apply(h,u,c)}catch(g){setTimeout(()=>{throw g})}}function t(h){const u=h.length,c=new Array(u);for(let g=0;g<u;g+=1)c[g]=h[g];return c}class r extends e.EventEmitter{emit(u,...c){let g=u==="error";const f=this._events;if(f!==void 0)g=g&&f.error===void 0;else if(!g)return!1;if(g){let l;if(c.length>0&&([l]=c),l instanceof Error)throw l;const n=new Error(`Unhandled error.${l?` (${l.message})`:""}`);throw n.context=l,n}const o=f[u];if(o===void 0)return!1;if(typeof o=="function")i(o,this,c);else{const l=o.length,n=t(o);for(let a=0;a<l;a+=1)i(n[a],this,c)}return!0}}return Mt.default=r,Mt}var Ks;function aa(){if(Ks)return Ce;Ks=1;var e=Ce&&Ce.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.BaseBlockTracker=void 0;const i=e(On()),t=1e3,r=(g,f)=>g+f,h=["sync","latest"];let u=class extends i.default{constructor(f){super(),this._blockResetDuration=f.blockResetDuration||20*t,this._usePastBlocks=f.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(o=>this.once("latest",o))}removeAllListeners(f){return f?super.removeAllListeners(f):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(f){h.includes(f)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return h.map(f=>this.listenerCount(f)).reduce(r)}_shouldUseNewBlock(f){const o=this._currentBlock;if(!o)return!0;const l=c(f),n=c(o);return this._usePastBlocks&&l<n||l>n}_newPotentialLatest(f){this._shouldUseNewBlock(f)&&this._setCurrentBlock(f)}_setCurrentBlock(f){const o=this._currentBlock;this._currentBlock=f,this.emit("latest",f),this.emit("sync",{oldBlock:o,newBlock:f})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}};Ce.BaseBlockTracker=u;function c(g){return Number.parseInt(g,16)}return Ce}var nr={},Se={},Y={};class ca extends TypeError{constructor(i,t){let r;const{message:h,explanation:u,...c}=i,{path:g}=i,f=g.length===0?h:`At path: ${g.join(".")} -- ${h}`;super(u??f),u!=null&&(this.cause=f),Object.assign(this,c),this.name=this.constructor.name,this.failures=()=>r??(r=[i,...t()])}}function wc(e){return K(e)&&typeof e[Symbol.iterator]=="function"}function K(e){return typeof e=="object"&&e!=null}function Xs(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const i=Object.getPrototypeOf(e);return i===null||i===Object.prototype}function z(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function vc(e){const{done:i,value:t}=e.next();return i?void 0:t}function Ec(e,i,t,r){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:h,branch:u}=i,{type:c}=t,{refinement:g,message:f=`Expected a value of type \`${c}\`${g?` with refinement \`${g}\``:""}, but received: \`${z(r)}\``}=e;return{value:r,type:c,refinement:g,key:h[h.length-1],path:h,branch:u,...e,message:f}}function*Rn(e,i,t,r){wc(e)||(e=[e]);for(const h of e){const u=Ec(h,i,t,r);u&&(yield u)}}function*xn(e,i,t={}){const{path:r=[],branch:h=[e],coerce:u=!1,mask:c=!1}=t,g={path:r,branch:h};if(u&&(e=i.coercer(e,g),c&&i.type!=="type"&&K(i.schema)&&K(e)&&!Array.isArray(e)))for(const o in e)i.schema[o]===void 0&&delete e[o];let f="valid";for(const o of i.validator(e,g))o.explanation=t.message,f="not_valid",yield[o,void 0];for(let[o,l,n]of i.entries(e,g)){const a=xn(l,n,{path:o===void 0?r:[...r,o],branch:o===void 0?h:[...h,l],coerce:u,mask:c,message:t.message});for(const s of a)s[0]?(f=s[0].refinement!=null?"not_refined":"not_valid",yield[s[0],void 0]):u&&(l=s[1],o===void 0?e=l:e instanceof Map?e.set(o,l):e instanceof Set?e.add(l):K(e)&&(l!==void 0||o in e)&&(e[o]=l))}if(f!=="not_valid")for(const o of i.refiner(e,g))o.explanation=t.message,f="not_refined",yield[o,void 0];f==="valid"&&(yield[void 0,e])}class V{constructor(i){const{type:t,schema:r,validator:h,refiner:u,coercer:c=f=>f,entries:g=function*(){}}=i;this.type=t,this.schema=r,this.entries=g,this.coercer=c,h?this.validator=(f,o)=>{const l=h(f,o);return Rn(l,o,this,f)}:this.validator=()=>[],u?this.refiner=(f,o)=>{const l=u(f,o);return Rn(l,o,this,f)}:this.refiner=()=>[]}assert(i,t){return ua(i,this,t)}create(i,t){return la(i,this,t)}is(i){return Fn(i,this)}mask(i,t){return da(i,this,t)}validate(i,t={}){return Oe(i,this,t)}}function ua(e,i,t){const r=Oe(e,i,{message:t});if(r[0])throw r[0]}function la(e,i,t){const r=Oe(e,i,{coerce:!0,message:t});if(r[0])throw r[0];return r[1]}function da(e,i,t){const r=Oe(e,i,{coerce:!0,mask:!0,message:t});if(r[0])throw r[0];return r[1]}function Fn(e,i){return!Oe(e,i)[0]}function Oe(e,i,t={}){const r=xn(e,i,t),h=vc(r);return h[0]?[new ca(h[0],function*(){for(const c of r)c[0]&&(yield c[0])}),void 0]:[void 0,h[1]]}function _c(...e){const i=e[0].type==="type",t=e.map(h=>h.schema),r=Object.assign({},...t);return i?vt(r):wt(r)}function Q(e,i){return new V({type:e,schema:null,validator:i})}function Rc(e,i){return new V({...e,refiner:(t,r)=>t===void 0||e.refiner(t,r),validator(t,r){return t===void 0?!0:(i(t,r),e.validator(t,r))}})}function Cc(e){return new V({type:"dynamic",schema:null,*entries(i,t){yield*e(i,t).entries(i,t)},validator(i,t){return e(i,t).validator(i,t)},coercer(i,t){return e(i,t).coercer(i,t)},refiner(i,t){return e(i,t).refiner(i,t)}})}function Sc(e){let i;return new V({type:"lazy",schema:null,*entries(t,r){i??(i=e()),yield*i.entries(t,r)},validator(t,r){return i??(i=e()),i.validator(t,r)},coercer(t,r){return i??(i=e()),i.coercer(t,r)},refiner(t,r){return i??(i=e()),i.refiner(t,r)}})}function kc(e,i){const{schema:t}=e,r={...t};for(const h of i)delete r[h];switch(e.type){case"type":return vt(r);default:return wt(r)}}function Ic(e){const i=e instanceof V,t=i?{...e.schema}:{...e};for(const r in t)t[r]=ha(t[r]);return i&&e.type==="type"?vt(t):wt(t)}function Ac(e,i){const{schema:t}=e,r={};for(const h of i)r[h]=t[h];switch(e.type){case"type":return vt(r);default:return wt(r)}}function Lc(e,i){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),Q(e,i)}function Mc(){return Q("any",()=>!0)}function Nc(e){return new V({type:"array",schema:e,*entries(i){if(e&&Array.isArray(i))for(const[t,r]of i.entries())yield[t,r,e]},coercer(i){return Array.isArray(i)?i.slice():i},validator(i){return Array.isArray(i)||`Expected an array value, but received: ${z(i)}`}})}function Tc(){return Q("bigint",e=>typeof e=="bigint")}function Pc(){return Q("boolean",e=>typeof e=="boolean")}function Oc(){return Q("date",e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${z(e)}`)}function xc(e){const i={},t=e.map(r=>z(r)).join();for(const r of e)i[r]=r;return new V({type:"enums",schema:i,validator(r){return e.includes(r)||`Expected one of \`${t}\`, but received: ${z(r)}`}})}function Fc(){return Q("func",e=>typeof e=="function"||`Expected a function, but received: ${z(e)}`)}function Bc(e){return Q("instance",i=>i instanceof e||`Expected a \`${e.name}\` instance, but received: ${z(i)}`)}function Dc(){return Q("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${z(e)}`)}function jc(e){return new V({type:"intersection",schema:null,*entries(i,t){for(const r of e)yield*r.entries(i,t)},*validator(i,t){for(const r of e)yield*r.validator(i,t)},*refiner(i,t){for(const r of e)yield*r.refiner(i,t)}})}function $c(e){const i=z(e),t=typeof e;return new V({type:"literal",schema:t==="string"||t==="number"||t==="boolean"?e:null,validator(r){return r===e||`Expected the literal \`${i}\`, but received: ${z(r)}`}})}function qc(e,i){return new V({type:"map",schema:null,*entries(t){if(e&&i&&t instanceof Map)for(const[r,h]of t.entries())yield[r,r,e],yield[r,h,i]},coercer(t){return t instanceof Map?new Map(t):t},validator(t){return t instanceof Map||`Expected a \`Map\` object, but received: ${z(t)}`}})}function Bn(){return Q("never",()=>!1)}function Hc(e){return new V({...e,validator:(i,t)=>i===null||e.validator(i,t),refiner:(i,t)=>i===null||e.refiner(i,t)})}function Uc(){return Q("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${z(e)}`)}function wt(e){const i=e?Object.keys(e):[],t=Bn();return new V({type:"object",schema:e||null,*entries(r){if(e&&K(r)){const h=new Set(Object.keys(r));for(const u of i)h.delete(u),yield[u,r[u],e[u]];for(const u of h)yield[u,r[u],t]}},validator(r){return K(r)||`Expected an object, but received: ${z(r)}`},coercer(r){return K(r)?{...r}:r}})}function ha(e){return new V({...e,validator:(i,t)=>i===void 0||e.validator(i,t),refiner:(i,t)=>i===void 0||e.refiner(i,t)})}function Wc(e,i){return new V({type:"record",schema:null,*entries(t){if(K(t))for(const r in t){const h=t[r];yield[r,r,e],yield[r,h,i]}},validator(t){return K(t)||`Expected an object, but received: ${z(t)}`}})}function Vc(){return Q("regexp",e=>e instanceof RegExp)}function zc(e){return new V({type:"set",schema:null,*entries(i){if(e&&i instanceof Set)for(const t of i)yield[t,t,e]},coercer(i){return i instanceof Set?new Set(i):i},validator(i){return i instanceof Set||`Expected a \`Set\` object, but received: ${z(i)}`}})}function fa(){return Q("string",e=>typeof e=="string"||`Expected a string, but received: ${z(e)}`)}function Jc(e){const i=Bn();return new V({type:"tuple",schema:null,*entries(t){if(Array.isArray(t)){const r=Math.max(e.length,t.length);for(let h=0;h<r;h++)yield[h,t[h],e[h]||i]}},validator(t){return Array.isArray(t)||`Expected an array, but received: ${z(t)}`}})}function vt(e){const i=Object.keys(e);return new V({type:"type",schema:e,*entries(t){if(K(t))for(const r of i)yield[r,t[r],e[r]]},validator(t){return K(t)||`Expected an object, but received: ${z(t)}`},coercer(t){return K(t)?{...t}:t}})}function Gc(e){const i=e.map(t=>t.type).join(" | ");return new V({type:"union",schema:null,coercer(t){for(const r of e){const[h,u]=r.validate(t,{coerce:!0});if(!h)return u}return t},validator(t,r){const h=[];for(const u of e){const[...c]=xn(t,u,r),[g]=c;if(g[0])for(const[f]of c)f&&h.push(f);else return[]}return[`Expected the value to satisfy a union of \`${i}\`, but received: ${z(t)}`,...h]}})}function ga(){return Q("unknown",()=>!0)}function Dn(e,i,t){return new V({...e,coercer:(r,h)=>Fn(r,i)?e.coercer(t(r,h),h):e.coercer(r,h)})}function Zc(e,i,t={}){return Dn(e,ga(),r=>{const h=typeof i=="function"?i():i;if(r===void 0)return h;if(!t.strict&&Xs(r)&&Xs(h)){const u={...r};let c=!1;for(const g in h)u[g]===void 0&&(u[g]=h[g],c=!0);if(c)return u}return r})}function Qc(e){return Dn(e,fa(),i=>i.trim())}function Kc(e){return Te(e,"empty",i=>{const t=pa(i);return t===0||`Expected an empty ${e.type} but received one with a size of \`${t}\``})}function pa(e){return e instanceof Map||e instanceof Set?e.size:e.length}function Xc(e,i,t={}){const{exclusive:r}=t;return Te(e,"max",h=>r?h<i:h<=i||`Expected a ${e.type} less than ${r?"":"or equal to "}${i} but received \`${h}\``)}function Yc(e,i,t={}){const{exclusive:r}=t;return Te(e,"min",h=>r?h>i:h>=i||`Expected a ${e.type} greater than ${r?"":"or equal to "}${i} but received \`${h}\``)}function eu(e){return Te(e,"nonempty",i=>pa(i)>0||`Expected a nonempty ${e.type} but received an empty one`)}function tu(e,i){return Te(e,"pattern",t=>i.test(t)||`Expected a ${e.type} matching \`/${i.source}/\` but received "${t}"`)}function ru(e,i,t=i){const r=`Expected a ${e.type}`,h=i===t?`of \`${i}\``:`between \`${i}\` and \`${t}\``;return Te(e,"size",u=>{if(typeof u=="number"||u instanceof Date)return i<=u&&u<=t||`${r} ${h} but received \`${u}\``;if(u instanceof Map||u instanceof Set){const{size:c}=u;return i<=c&&c<=t||`${r} with a size ${h} but received one with a size of \`${c}\``}else{const{length:c}=u;return i<=c&&c<=t||`${r} with a length ${h} but received one with a length of \`${c}\``}})}function Te(e,i,t){return new V({...e,*refiner(r,h){yield*e.refiner(r,h);const u=t(r,h),c=Rn(u,h,e,r);for(const g of c)yield{...g,refinement:i}}})}const nu=Object.freeze(Object.defineProperty({__proto__:null,Struct:V,StructError:ca,any:Mc,array:Nc,assert:ua,assign:_c,bigint:Tc,boolean:Pc,coerce:Dn,create:la,date:Oc,defaulted:Zc,define:Q,deprecated:Rc,dynamic:Cc,empty:Kc,enums:xc,func:Fc,instance:Bc,integer:Dc,intersection:jc,is:Fn,lazy:Sc,literal:$c,map:qc,mask:da,max:Xc,min:Yc,never:Bn,nonempty:eu,nullable:Hc,number:Uc,object:wt,omit:kc,optional:ha,partial:Ic,pattern:tu,pick:Ac,record:Wc,refine:Te,regexp:Vc,set:zc,size:ru,string:fa,struct:Lc,trimmed:Qc,tuple:Jc,type:vt,union:Gc,unknown:ga,validate:Oe},Symbol.toStringTag,{value:"Module"})),Pe=Sn(nu);var Ys;function le(){if(Ys)return Y;Ys=1,Object.defineProperty(Y,"__esModule",{value:!0}),Y.assertExhaustive=Y.assertStruct=Y.assert=Y.AssertionError=void 0;const e=Pe;function i(o){return typeof o=="object"&&o!==null&&"message"in o}function t(o){var l,n;return typeof((n=(l=o==null?void 0:o.prototype)===null||l===void 0?void 0:l.constructor)===null||n===void 0?void 0:n.name)=="string"}function r(o){const l=i(o)?o.message:String(o);return l.endsWith(".")?l.slice(0,-1):l}function h(o,l){return t(o)?new o({message:l}):o({message:l})}class u extends Error{constructor(l){super(l.message),this.code="ERR_ASSERTION"}}Y.AssertionError=u;function c(o,l="Assertion failed.",n=u){if(!o)throw l instanceof Error?l:h(n,l)}Y.assert=c;function g(o,l,n="Assertion failed",a=u){try{(0,e.assert)(o,l)}catch(s){throw h(a,`${n}: ${r(s)}.`)}}Y.assertStruct=g;function f(o){throw new Error("Invalid branch reached. Should be detected during compilation.")}return Y.assertExhaustive=f,Y}var ct={},ei;function ma(){if(ei)return ct;ei=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.base64=void 0;const e=Pe,i=le(),t=(r,h={})=>{var u,c;const g=(u=h.paddingRequired)!==null&&u!==void 0?u:!1,f=(c=h.characterSet)!==null&&c!==void 0?c:"base64";let o;f==="base64"?o=String.raw`[A-Za-z0-9+\/]`:((0,i.assert)(f==="base64url"),o=String.raw`[-_A-Za-z0-9]`);let l;return g?l=new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):l=new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,e.pattern)(r,l)};return ct.base64=t,ct}var q={},sr={},ti;function qt(){return ti||(ti=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.remove0x=e.add0x=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.StrictHexStruct=e.HexStruct=void 0;const i=Pe,t=le();e.HexStruct=(0,i.pattern)((0,i.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,i.pattern)((0,i.string)(),/^0x[0-9a-f]+$/iu);function r(o){return(0,i.is)(o,e.HexStruct)}e.isHexString=r;function h(o){return(0,i.is)(o,e.StrictHexStruct)}e.isStrictHexString=h;function u(o){(0,t.assert)(r(o),"Value must be a hexadecimal string.")}e.assertIsHexString=u;function c(o){(0,t.assert)(h(o),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=c;function g(o){return o.startsWith("0x")?o:o.startsWith("0X")?`0x${o.substring(2)}`:`0x${o}`}e.add0x=g;function f(o){return o.startsWith("0x")||o.startsWith("0X")?o.substring(2):o}e.remove0x=f}(sr)),sr}var ri;function ba(){if(ri)return q;ri=1,Object.defineProperty(q,"__esModule",{value:!0}),q.createDataView=q.concatBytes=q.valueToBytes=q.stringToBytes=q.numberToBytes=q.signedBigIntToBytes=q.bigIntToBytes=q.hexToBytes=q.bytesToString=q.bytesToNumber=q.bytesToSignedBigInt=q.bytesToBigInt=q.bytesToHex=q.assertIsBytes=q.isBytes=void 0;const e=le(),i=qt(),t=48,r=58,h=87;function u(){const _=[];return()=>{if(_.length===0)for(let S=0;S<256;S++)_.push(S.toString(16).padStart(2,"0"));return _}}const c=u();function g(_){return _ instanceof Uint8Array}q.isBytes=g;function f(_){(0,e.assert)(g(_),"Value must be a Uint8Array.")}q.assertIsBytes=f;function o(_){if(f(_),_.length===0)return"0x";const S=c(),T=new Array(_.length);for(let N=0;N<_.length;N++)T[N]=S[_[N]];return(0,i.add0x)(T.join(""))}q.bytesToHex=o;function l(_){f(_);const S=o(_);return BigInt(S)}q.bytesToBigInt=l;function n(_){f(_);let S=BigInt(0);for(const T of _)S=(S<<BigInt(8))+BigInt(T);return BigInt.asIntN(_.length*8,S)}q.bytesToSignedBigInt=n;function a(_){f(_);const S=l(_);return(0,e.assert)(S<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(S)}q.bytesToNumber=a;function s(_){return f(_),new TextDecoder().decode(_)}q.bytesToString=s;function p(_){var S;if(((S=_==null?void 0:_.toLowerCase)===null||S===void 0?void 0:S.call(_))==="0x")return new Uint8Array;(0,i.assertIsHexString)(_);const T=(0,i.remove0x)(_).toLowerCase(),N=T.length%2===0?T:`0${T}`,x=new Uint8Array(N.length/2);for(let B=0;B<x.length;B++){const W=N.charCodeAt(B*2),A=N.charCodeAt(B*2+1),k=W-(W<r?t:h),R=A-(A<r?t:h);x[B]=k*16+R}return x}q.hexToBytes=p;function m(_){(0,e.assert)(typeof _=="bigint","Value must be a bigint."),(0,e.assert)(_>=BigInt(0),"Value must be a non-negative bigint.");const S=_.toString(16);return p(S)}q.bigIntToBytes=m;function b(_,S){(0,e.assert)(S>0);const T=_>>BigInt(31);return!((~_&T)+(_&~T)>>BigInt(S*8+-1))}function d(_,S){(0,e.assert)(typeof _=="bigint","Value must be a bigint."),(0,e.assert)(typeof S=="number","Byte length must be a number."),(0,e.assert)(S>0,"Byte length must be greater than 0."),(0,e.assert)(b(_,S),"Byte length is too small to represent the given value.");let T=_;const N=new Uint8Array(S);for(let x=0;x<N.length;x++)N[x]=Number(BigInt.asUintN(8,T)),T>>=BigInt(8);return N.reverse()}q.signedBigIntToBytes=d;function w(_){(0,e.assert)(typeof _=="number","Value must be a number."),(0,e.assert)(_>=0,"Value must be a non-negative number."),(0,e.assert)(Number.isSafeInteger(_),"Value is not a safe integer. Use `bigIntToBytes` instead.");const S=_.toString(16);return p(S)}q.numberToBytes=w;function y(_){return(0,e.assert)(typeof _=="string","Value must be a string."),new TextEncoder().encode(_)}q.stringToBytes=y;function v(_){if(typeof _=="bigint")return m(_);if(typeof _=="number")return w(_);if(typeof _=="string")return _.startsWith("0x")?p(_):y(_);if(g(_))return _;throw new TypeError(`Unsupported value type: "${typeof _}".`)}q.valueToBytes=v;function E(_){const S=new Array(_.length);let T=0;for(let x=0;x<_.length;x++){const B=v(_[x]);S[x]=B,T+=B.length}const N=new Uint8Array(T);for(let x=0,B=0;x<S.length;x++)N.set(S[x],B),B+=S[x].length;return N}q.concatBytes=E;function C(_){if(typeof H<"u"&&_ instanceof H){const S=_.buffer.slice(_.byteOffset,_.byteOffset+_.byteLength);return new DataView(S)}return new DataView(_.buffer,_.byteOffset,_.byteLength)}return q.createDataView=C,q}var ut={},ni;function su(){if(ni)return ut;ni=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.ChecksumStruct=void 0;const e=Pe,i=ma();return ut.ChecksumStruct=(0,e.size)((0,i.base64)((0,e.string)(),{paddingRequired:!0}),44,44),ut}var ee={},si;function iu(){if(si)return ee;si=1,Object.defineProperty(ee,"__esModule",{value:!0}),ee.createHex=ee.createBytes=ee.createBigInt=ee.createNumber=void 0;const e=Pe,i=le(),t=ba(),r=qt(),h=(0,e.union)([(0,e.number)(),(0,e.bigint)(),(0,e.string)(),r.StrictHexStruct]),u=(0,e.coerce)((0,e.number)(),h,Number),c=(0,e.coerce)((0,e.bigint)(),h,BigInt);(0,e.union)([r.StrictHexStruct,(0,e.instance)(Uint8Array)]);const g=(0,e.coerce)((0,e.instance)(Uint8Array),(0,e.union)([r.StrictHexStruct]),t.hexToBytes),f=(0,e.coerce)(r.StrictHexStruct,(0,e.instance)(Uint8Array),t.bytesToHex);function o(s){try{const p=(0,e.create)(s,u);return(0,i.assert)(Number.isFinite(p),`Expected a number-like value, got "${s}".`),p}catch(p){throw p instanceof e.StructError?new Error(`Expected a number-like value, got "${s}".`):p}}ee.createNumber=o;function l(s){try{return(0,e.create)(s,c)}catch(p){throw p instanceof e.StructError?new Error(`Expected a number-like value, got "${String(p.value)}".`):p}}ee.createBigInt=l;function n(s){if(typeof s=="string"&&s.toLowerCase()==="0x")return new Uint8Array;try{return(0,e.create)(s,g)}catch(p){throw p instanceof e.StructError?new Error(`Expected a bytes-like value, got "${String(p.value)}".`):p}}ee.createBytes=n;function a(s){if(s instanceof Uint8Array&&s.length===0||typeof s=="string"&&s.toLowerCase()==="0x")return"0x";try{return(0,e.create)(s,f)}catch(p){throw p instanceof e.StructError?new Error(`Expected a bytes-like value, got "${String(p.value)}".`):p}}return ee.createHex=a,ee}var te={},ii;function ou(){if(ii)return te;ii=1;var e=te&&te.__classPrivateFieldSet||function(c,g,f,o,l){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!l)throw new TypeError("Private accessor was defined without a setter");if(typeof g=="function"?c!==g||!l:!g.has(c))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?l.call(c,f):l?l.value=f:g.set(c,f),f},i=te&&te.__classPrivateFieldGet||function(c,g,f,o){if(f==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof g=="function"?c!==g||!o:!g.has(c))throw new TypeError("Cannot read private member from an object whose class did not declare it");return f==="m"?o:f==="a"?o.call(c):o?o.value:g.get(c)},t,r;Object.defineProperty(te,"__esModule",{value:!0}),te.FrozenSet=te.FrozenMap=void 0;class h{constructor(g){t.set(this,void 0),e(this,t,new Map(g),"f"),Object.freeze(this)}get size(){return i(this,t,"f").size}[(t=new WeakMap,Symbol.iterator)](){return i(this,t,"f")[Symbol.iterator]()}entries(){return i(this,t,"f").entries()}forEach(g,f){return i(this,t,"f").forEach((o,l,n)=>g.call(f,o,l,this))}get(g){return i(this,t,"f").get(g)}has(g){return i(this,t,"f").has(g)}keys(){return i(this,t,"f").keys()}values(){return i(this,t,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([g,f])=>`${String(g)} => ${String(f)}`).join(", ")} `:""}}`}}te.FrozenMap=h;class u{constructor(g){r.set(this,void 0),e(this,r,new Set(g),"f"),Object.freeze(this)}get size(){return i(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return i(this,r,"f")[Symbol.iterator]()}entries(){return i(this,r,"f").entries()}forEach(g,f){return i(this,r,"f").forEach((o,l,n)=>g.call(f,o,l,this))}has(g){return i(this,r,"f").has(g)}keys(){return i(this,r,"f").keys()}values(){return i(this,r,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(g=>String(g)).join(", ")} `:""}}`}}return te.FrozenSet=u,Object.freeze(h),Object.freeze(h.prototype),Object.freeze(u),Object.freeze(u.prototype),te}var ir={},oi;function au(){return oi||(oi=1,Object.defineProperty(ir,"__esModule",{value:!0})),ir}var or={},ai;function cu(){return ai||(ai=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=void 0;const i=Pe,t=le(),r=()=>(0,i.define)("finite number",E=>(0,i.is)(E,(0,i.number)())&&Number.isFinite(E));e.UnsafeJsonStruct=(0,i.union)([(0,i.literal)(null),(0,i.boolean)(),r(),(0,i.string)(),(0,i.array)((0,i.lazy)(()=>e.UnsafeJsonStruct)),(0,i.record)((0,i.string)(),(0,i.lazy)(()=>e.UnsafeJsonStruct))]),e.JsonStruct=(0,i.define)("Json",(E,C)=>{function _(S,T){const x=[...T.validator(S,C)];return x.length>0?x:!0}try{const S=_(E,e.UnsafeJsonStruct);return S!==!0?S:_(JSON.parse(JSON.stringify(E)),e.UnsafeJsonStruct)}catch(S){return S instanceof RangeError?"Circular reference detected":!1}});function h(E){return(0,i.is)(E,e.JsonStruct)}e.isValidJson=h;function u(E){(0,t.assertStruct)(E,e.JsonStruct,"Invalid JSON value");const C=JSON.stringify(E);return new TextEncoder().encode(C).byteLength}e.getJsonSize=u,e.jsonrpc2="2.0",e.JsonRpcVersionStruct=(0,i.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,i.nullable)((0,i.union)([(0,i.number)(),(0,i.string)()])),e.JsonRpcErrorStruct=(0,i.object)({code:(0,i.integer)(),message:(0,i.string)(),data:(0,i.optional)(e.JsonStruct),stack:(0,i.optional)((0,i.string)())}),e.JsonRpcParamsStruct=(0,i.optional)((0,i.union)([(0,i.record)((0,i.string)(),e.JsonStruct),(0,i.array)(e.JsonStruct)])),e.JsonRpcRequestStruct=(0,i.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,i.string)(),params:e.JsonRpcParamsStruct}),e.JsonRpcNotificationStruct=(0,i.omit)(e.JsonRpcRequestStruct,["id"]);function c(E){return(0,i.is)(E,e.JsonRpcNotificationStruct)}e.isJsonRpcNotification=c;function g(E,C){(0,t.assertStruct)(E,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",C)}e.assertIsJsonRpcNotification=g;function f(E){return(0,i.is)(E,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=f;function o(E,C){(0,t.assertStruct)(E,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",C)}e.assertIsJsonRpcRequest=o,e.PendingJsonRpcResponseStruct=(0,i.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,i.optional)((0,i.unknown)()),error:(0,i.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,i.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,i.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,i.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]);function l(E){return(0,i.is)(E,e.PendingJsonRpcResponseStruct)}e.isPendingJsonRpcResponse=l;function n(E,C){(0,t.assertStruct)(E,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",C)}e.assertIsPendingJsonRpcResponse=n;function a(E){return(0,i.is)(E,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=a;function s(E,C){(0,t.assertStruct)(E,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",C)}e.assertIsJsonRpcResponse=s;function p(E){return(0,i.is)(E,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=p;function m(E,C){(0,t.assertStruct)(E,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",C)}e.assertIsJsonRpcSuccess=m;function b(E){return(0,i.is)(E,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=b;function d(E,C){(0,t.assertStruct)(E,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",C)}e.assertIsJsonRpcFailure=d;function w(E){return(0,i.is)(E,e.JsonRpcErrorStruct)}e.isJsonRpcError=w;function y(E,C){(0,t.assertStruct)(E,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",C)}e.assertIsJsonRpcError=y;function v(E){const{permitEmptyString:C,permitFractions:_,permitNull:S}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},E);return N=>!!(typeof N=="number"&&(_||Number.isInteger(N))||typeof N=="string"&&(C||N.length>0)||S&&N===null)}e.getJsonRpcIdValidator=v}(or)),or}var ar={},ci;function uu(){return ci||(ci=1,Object.defineProperty(ar,"__esModule",{value:!0})),ar}var oe={},Nt={exports:{}},cr,ui;function lu(){if(ui)return cr;ui=1;var e=1e3,i=e*60,t=i*60,r=t*24,h=r*7,u=r*365.25;cr=function(l,n){n=n||{};var a=typeof l;if(a==="string"&&l.length>0)return c(l);if(a==="number"&&isFinite(l))return n.long?f(l):g(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))};function c(l){if(l=String(l),!(l.length>100)){var n=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(n){var a=parseFloat(n[1]),s=(n[2]||"ms").toLowerCase();switch(s){case"years":case"year":case"yrs":case"yr":case"y":return a*u;case"weeks":case"week":case"w":return a*h;case"days":case"day":case"d":return a*r;case"hours":case"hour":case"hrs":case"hr":case"h":return a*t;case"minutes":case"minute":case"mins":case"min":case"m":return a*i;case"seconds":case"second":case"secs":case"sec":case"s":return a*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}function g(l){var n=Math.abs(l);return n>=r?Math.round(l/r)+"d":n>=t?Math.round(l/t)+"h":n>=i?Math.round(l/i)+"m":n>=e?Math.round(l/e)+"s":l+"ms"}function f(l){var n=Math.abs(l);return n>=r?o(l,n,r,"day"):n>=t?o(l,n,t,"hour"):n>=i?o(l,n,i,"minute"):n>=e?o(l,n,e,"second"):l+" ms"}function o(l,n,a,s){var p=n>=a*1.5;return Math.round(l/a)+" "+s+(p?"s":"")}return cr}var ur,li;function du(){if(li)return ur;li=1;function e(i){r.debug=r,r.default=r,r.coerce=o,r.disable=c,r.enable=u,r.enabled=g,r.humanize=lu(),r.destroy=l,Object.keys(i).forEach(n=>{r[n]=i[n]}),r.names=[],r.skips=[],r.formatters={};function t(n){let a=0;for(let s=0;s<n.length;s++)a=(a<<5)-a+n.charCodeAt(s),a|=0;return r.colors[Math.abs(a)%r.colors.length]}r.selectColor=t;function r(n){let a,s=null,p,m;function b(...d){if(!b.enabled)return;const w=b,y=Number(new Date),v=y-(a||y);w.diff=v,w.prev=a,w.curr=y,a=y,d[0]=r.coerce(d[0]),typeof d[0]!="string"&&d.unshift("%O");let E=0;d[0]=d[0].replace(/%([a-zA-Z%])/g,(_,S)=>{if(_==="%%")return"%";E++;const T=r.formatters[S];if(typeof T=="function"){const N=d[E];_=T.call(w,N),d.splice(E,1),E--}return _}),r.formatArgs.call(w,d),(w.log||r.log).apply(w,d)}return b.namespace=n,b.useColors=r.useColors(),b.color=r.selectColor(n),b.extend=h,b.destroy=r.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>s!==null?s:(p!==r.namespaces&&(p=r.namespaces,m=r.enabled(n)),m),set:d=>{s=d}}),typeof r.init=="function"&&r.init(b),b}function h(n,a){const s=r(this.namespace+(typeof a>"u"?":":a)+n);return s.log=this.log,s}function u(n){r.save(n),r.namespaces=n,r.names=[],r.skips=[];let a;const s=(typeof n=="string"?n:"").split(/[\s,]+/),p=s.length;for(a=0;a<p;a++)s[a]&&(n=s[a].replace(/\*/g,".*?"),n[0]==="-"?r.skips.push(new RegExp("^"+n.slice(1)+"$")):r.names.push(new RegExp("^"+n+"$")))}function c(){const n=[...r.names.map(f),...r.skips.map(f).map(a=>"-"+a)].join(",");return r.enable(""),n}function g(n){if(n[n.length-1]==="*")return!0;let a,s;for(a=0,s=r.skips.length;a<s;a++)if(r.skips[a].test(n))return!1;for(a=0,s=r.names.length;a<s;a++)if(r.names[a].test(n))return!0;return!1}function f(n){return n.toString().substring(2,n.toString().length-2).replace(/\.\*\?$/,"*")}function o(n){return n instanceof Error?n.stack||n.message:n}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}return ur=e,ur}var di;function hu(){return di||(di=1,function(e,i){var t={};i.formatArgs=h,i.save=u,i.load=c,i.useColors=r,i.storage=g(),i.destroy=(()=>{let o=!1;return()=>{o||(o=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),i.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function h(o){if(o[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+o[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;o.splice(1,0,l,"color: inherit");let n=0,a=0;o[0].replace(/%[a-zA-Z%]/g,s=>{s!=="%%"&&(n++,s==="%c"&&(a=n))}),o.splice(a,0,l)}i.log=console.debug||console.log||(()=>{});function u(o){try{o?i.storage.setItem("debug",o):i.storage.removeItem("debug")}catch{}}function c(){let o;try{o=i.storage.getItem("debug")}catch{}return!o&&typeof _n<"u"&&"env"in _n&&(o=t.DEBUG),o}function g(){try{return localStorage}catch{}}e.exports=du()(i);const{formatters:f}=e.exports;f.j=function(o){try{return JSON.stringify(o)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}}(Nt,Nt.exports)),Nt.exports}var hi;function fu(){if(hi)return oe;hi=1;var e=oe&&oe.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(oe,"__esModule",{value:!0}),oe.createModuleLogger=oe.createProjectLogger=void 0;const t=(0,e(hu()).default)("metamask");function r(u){return t.extend(u)}oe.createProjectLogger=r;function h(u,c){return u.extend(c)}return oe.createModuleLogger=h,oe}var lr={},fi;function gu(){return fi||(fi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0;function i(o){return Array.isArray(o)&&o.length>0}e.isNonEmptyArray=i;function t(o){return o==null}e.isNullOrUndefined=t;function r(o){return!!o&&typeof o=="object"&&!Array.isArray(o)}e.isObject=r;const h=(o,l)=>Object.hasOwnProperty.call(o,l);e.hasProperty=h,function(o){o[o.Null=4]="Null",o[o.Comma=1]="Comma",o[o.Wrapper=1]="Wrapper",o[o.True=4]="True",o[o.False=5]="False",o[o.Quote=1]="Quote",o[o.Colon=1]="Colon",o[o.Date=24]="Date"}(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function u(o){if(typeof o!="object"||o===null)return!1;try{let l=o;for(;Object.getPrototypeOf(l)!==null;)l=Object.getPrototypeOf(l);return Object.getPrototypeOf(o)===l}catch{return!1}}e.isPlainObject=u;function c(o){return o.charCodeAt(0)<=127}e.isASCII=c;function g(o){var l;return o.split("").reduce((a,s)=>c(s)?a+1:a+2,0)+((l=o.match(e.ESCAPE_CHARACTERS_REGEXP))!==null&&l!==void 0?l:[]).length}e.calculateStringSize=g;function f(o){return o.toString().length}e.calculateNumberSize=f}(lr)),lr}var re={},gi;function pu(){if(gi)return re;gi=1,Object.defineProperty(re,"__esModule",{value:!0}),re.hexToBigInt=re.hexToNumber=re.bigIntToHex=re.numberToHex=void 0;const e=le(),i=qt(),t=c=>((0,e.assert)(typeof c=="number","Value must be a number."),(0,e.assert)(c>=0,"Value must be a non-negative number."),(0,e.assert)(Number.isSafeInteger(c),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,i.add0x)(c.toString(16)));re.numberToHex=t;const r=c=>((0,e.assert)(typeof c=="bigint","Value must be a bigint."),(0,e.assert)(c>=0,"Value must be a non-negative bigint."),(0,i.add0x)(c.toString(16)));re.bigIntToHex=r;const h=c=>{(0,i.assertIsHexString)(c);const g=parseInt(c,16);return(0,e.assert)(Number.isSafeInteger(g),"Value is not a safe integer. Use `hexToBigInt` instead."),g};re.hexToNumber=h;const u=c=>((0,i.assertIsHexString)(c),BigInt((0,i.add0x)(c)));return re.hexToBigInt=u,re}var dr={},pi;function mu(){return pi||(pi=1,Object.defineProperty(dr,"__esModule",{value:!0})),dr}var hr={},mi;function bu(){return mi||(mi=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,function(u){u[u.Millisecond=1]="Millisecond",u[u.Second=1e3]="Second",u[u.Minute=6e4]="Minute",u[u.Hour=36e5]="Hour",u[u.Day=864e5]="Day",u[u.Week=6048e5]="Week",u[u.Year=31536e6]="Year"}(e.Duration||(e.Duration={}));const i=u=>Number.isInteger(u)&&u>=0,t=(u,c)=>{if(!i(u))throw new Error(`"${c}" must be a non-negative integer. Received: "${u}".`)};function r(u,c){return t(u,"count"),u*c}e.inMilliseconds=r;function h(u){return t(u,"timestamp"),Date.now()-u}e.timeSince=h}(hr)),hr}var fr={},bi;function yu(){return bi||(bi=1,Object.defineProperty(fr,"__esModule",{value:!0})),fr}var gr={},Tt={exports:{}},pr,yi;function Ht(){if(yi)return pr;yi=1;const e="2.0.0",i=256,t=Number.MAX_SAFE_INTEGER||9007199254740991,r=16,h=i-6;return pr={MAX_LENGTH:i,MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:h,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},pr}var mr,wi;function Ut(){if(wi)return mr;wi=1;var e={};return mr=typeof _n=="object"&&e&&e.NODE_DEBUG&&/\bsemver\b/i.test(e.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{},mr}var vi;function Et(){return vi||(vi=1,function(e,i){const{MAX_SAFE_COMPONENT_LENGTH:t,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:h}=Ht(),u=Ut();i=e.exports={};const c=i.re=[],g=i.safeRe=[],f=i.src=[],o=i.safeSrc=[],l=i.t={};let n=0;const a="[a-zA-Z0-9-]",s=[["\\s",1],["\\d",h],[a,r]],p=b=>{for(const[d,w]of s)b=b.split(`${d}*`).join(`${d}{0,${w}}`).split(`${d}+`).join(`${d}{1,${w}}`);return b},m=(b,d,w)=>{const y=p(d),v=n++;u(b,v,d),l[b]=v,f[v]=d,o[v]=y,c[v]=new RegExp(d,w?"g":void 0),g[v]=new RegExp(y,w?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${a}*`),m("MAINVERSION",`(${f[l.NUMERICIDENTIFIER]})\\.(${f[l.NUMERICIDENTIFIER]})\\.(${f[l.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${f[l.NUMERICIDENTIFIERLOOSE]})\\.(${f[l.NUMERICIDENTIFIERLOOSE]})\\.(${f[l.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${f[l.NONNUMERICIDENTIFIER]}|${f[l.NUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${f[l.NONNUMERICIDENTIFIER]}|${f[l.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASE",`(?:-(${f[l.PRERELEASEIDENTIFIER]}(?:\\.${f[l.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${f[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${f[l.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${a}+`),m("BUILD",`(?:\\+(${f[l.BUILDIDENTIFIER]}(?:\\.${f[l.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${f[l.MAINVERSION]}${f[l.PRERELEASE]}?${f[l.BUILD]}?`),m("FULL",`^${f[l.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${f[l.MAINVERSIONLOOSE]}${f[l.PRERELEASELOOSE]}?${f[l.BUILD]}?`),m("LOOSE",`^${f[l.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${f[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${f[l.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${f[l.XRANGEIDENTIFIER]})(?:\\.(${f[l.XRANGEIDENTIFIER]})(?:\\.(${f[l.XRANGEIDENTIFIER]})(?:${f[l.PRERELEASE]})?${f[l.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${f[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${f[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${f[l.XRANGEIDENTIFIERLOOSE]})(?:${f[l.PRERELEASELOOSE]})?${f[l.BUILD]}?)?)?`),m("XRANGE",`^${f[l.GTLT]}\\s*${f[l.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${f[l.GTLT]}\\s*${f[l.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${t}})(?:\\.(\\d{1,${t}}))?(?:\\.(\\d{1,${t}}))?`),m("COERCE",`${f[l.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",f[l.COERCEPLAIN]+`(?:${f[l.PRERELEASE]})?(?:${f[l.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",f[l.COERCE],!0),m("COERCERTLFULL",f[l.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${f[l.LONETILDE]}\\s+`,!0),i.tildeTrimReplace="$1~",m("TILDE",`^${f[l.LONETILDE]}${f[l.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${f[l.LONETILDE]}${f[l.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${f[l.LONECARET]}\\s+`,!0),i.caretTrimReplace="$1^",m("CARET",`^${f[l.LONECARET]}${f[l.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${f[l.LONECARET]}${f[l.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${f[l.GTLT]}\\s*(${f[l.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${f[l.GTLT]}\\s*(${f[l.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${f[l.GTLT]}\\s*(${f[l.LOOSEPLAIN]}|${f[l.XRANGEPLAIN]})`,!0),i.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${f[l.XRANGEPLAIN]})\\s+-\\s+(${f[l.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${f[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${f[l.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(Tt,Tt.exports)),Tt.exports}var br,Ei;function jn(){if(Ei)return br;Ei=1;const e=Object.freeze({loose:!0}),i=Object.freeze({});return br=r=>r?typeof r!="object"?e:r:i,br}var yr,_i;function ya(){if(_i)return yr;_i=1;const e=/^[0-9]+$/,i=(r,h)=>{if(typeof r=="number"&&typeof h=="number")return r===h?0:r<h?-1:1;const u=e.test(r),c=e.test(h);return u&&c&&(r=+r,h=+h),r===h?0:u&&!c?-1:c&&!u?1:r<h?-1:1};return yr={compareIdentifiers:i,rcompareIdentifiers:(r,h)=>i(h,r)},yr}var wr,Ri;function G(){if(Ri)return wr;Ri=1;const e=Ut(),{MAX_LENGTH:i,MAX_SAFE_INTEGER:t}=Ht(),{safeRe:r,t:h}=Et(),u=jn(),{compareIdentifiers:c}=ya();class g{constructor(o,l){if(l=u(l),o instanceof g){if(o.loose===!!l.loose&&o.includePrerelease===!!l.includePrerelease)return o;o=o.version}else if(typeof o!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof o}".`);if(o.length>i)throw new TypeError(`version is longer than ${i} characters`);e("SemVer",o,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const n=o.trim().match(l.loose?r[h.LOOSE]:r[h.FULL]);if(!n)throw new TypeError(`Invalid Version: ${o}`);if(this.raw=o,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>t||this.major<0)throw new TypeError("Invalid major version");if(this.minor>t||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>t||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){const s=+a;if(s>=0&&s<t)return s}return a}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(o){if(e("SemVer.compare",this.version,this.options,o),!(o instanceof g)){if(typeof o=="string"&&o===this.version)return 0;o=new g(o,this.options)}return o.version===this.version?0:this.compareMain(o)||this.comparePre(o)}compareMain(o){return o instanceof g||(o=new g(o,this.options)),this.major<o.major?-1:this.major>o.major?1:this.minor<o.minor?-1:this.minor>o.minor?1:this.patch<o.patch?-1:this.patch>o.patch?1:0}comparePre(o){if(o instanceof g||(o=new g(o,this.options)),this.prerelease.length&&!o.prerelease.length)return-1;if(!this.prerelease.length&&o.prerelease.length)return 1;if(!this.prerelease.length&&!o.prerelease.length)return 0;let l=0;do{const n=this.prerelease[l],a=o.prerelease[l];if(e("prerelease compare",l,n,a),n===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(n===void 0)return-1;if(n===a)continue;return c(n,a)}while(++l)}compareBuild(o){o instanceof g||(o=new g(o,this.options));let l=0;do{const n=this.build[l],a=o.build[l];if(e("build compare",l,n,a),n===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(n===void 0)return-1;if(n===a)continue;return c(n,a)}while(++l)}inc(o,l,n){if(o.startsWith("pre")){if(!l&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(l){const a=`-${l}`.match(this.options.loose?r[h.PRERELEASELOOSE]:r[h.PRERELEASE]);if(!a||a[1]!==l)throw new Error(`invalid identifier: ${l}`)}}switch(o){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",l,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",l,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",l,n),this.inc("pre",l,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",l,n),this.inc("pre",l,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const a=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[a];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(l===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(l){let s=[l,a];n===!1&&(s=[l]),c(this.prerelease[0],l)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${o}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return wr=g,wr}var vr,Ci;function xe(){if(Ci)return vr;Ci=1;const e=G();return vr=(t,r,h=!1)=>{if(t instanceof e)return t;try{return new e(t,r)}catch(u){if(!h)return null;throw u}},vr}var Er,Si;function wu(){if(Si)return Er;Si=1;const e=xe();return Er=(t,r)=>{const h=e(t,r);return h?h.version:null},Er}var _r,ki;function vu(){if(ki)return _r;ki=1;const e=xe();return _r=(t,r)=>{const h=e(t.trim().replace(/^[=v]+/,""),r);return h?h.version:null},_r}var Rr,Ii;function Eu(){if(Ii)return Rr;Ii=1;const e=G();return Rr=(t,r,h,u,c)=>{typeof h=="string"&&(c=u,u=h,h=void 0);try{return new e(t instanceof e?t.version:t,h).inc(r,u,c).version}catch{return null}},Rr}var Cr,Ai;function _u(){if(Ai)return Cr;Ai=1;const e=xe();return Cr=(t,r)=>{const h=e(t,null,!0),u=e(r,null,!0),c=h.compare(u);if(c===0)return null;const g=c>0,f=g?h:u,o=g?u:h,l=!!f.prerelease.length;if(!!o.prerelease.length&&!l){if(!o.patch&&!o.minor)return"major";if(o.compareMain(f)===0)return o.minor&&!o.patch?"minor":"patch"}const a=l?"pre":"";return h.major!==u.major?a+"major":h.minor!==u.minor?a+"minor":h.patch!==u.patch?a+"patch":"prerelease"},Cr}var Sr,Li;function Ru(){if(Li)return Sr;Li=1;const e=G();return Sr=(t,r)=>new e(t,r).major,Sr}var kr,Mi;function Cu(){if(Mi)return kr;Mi=1;const e=G();return kr=(t,r)=>new e(t,r).minor,kr}var Ir,Ni;function Su(){if(Ni)return Ir;Ni=1;const e=G();return Ir=(t,r)=>new e(t,r).patch,Ir}var Ar,Ti;function ku(){if(Ti)return Ar;Ti=1;const e=xe();return Ar=(t,r)=>{const h=e(t,r);return h&&h.prerelease.length?h.prerelease:null},Ar}var Lr,Pi;function ne(){if(Pi)return Lr;Pi=1;const e=G();return Lr=(t,r,h)=>new e(t,h).compare(new e(r,h)),Lr}var Mr,Oi;function Iu(){if(Oi)return Mr;Oi=1;const e=ne();return Mr=(t,r,h)=>e(r,t,h),Mr}var Nr,xi;function Au(){if(xi)return Nr;xi=1;const e=ne();return Nr=(t,r)=>e(t,r,!0),Nr}var Tr,Fi;function $n(){if(Fi)return Tr;Fi=1;const e=G();return Tr=(t,r,h)=>{const u=new e(t,h),c=new e(r,h);return u.compare(c)||u.compareBuild(c)},Tr}var Pr,Bi;function Lu(){if(Bi)return Pr;Bi=1;const e=$n();return Pr=(t,r)=>t.sort((h,u)=>e(h,u,r)),Pr}var Or,Di;function Mu(){if(Di)return Or;Di=1;const e=$n();return Or=(t,r)=>t.sort((h,u)=>e(u,h,r)),Or}var xr,ji;function Wt(){if(ji)return xr;ji=1;const e=ne();return xr=(t,r,h)=>e(t,r,h)>0,xr}var Fr,$i;function qn(){if($i)return Fr;$i=1;const e=ne();return Fr=(t,r,h)=>e(t,r,h)<0,Fr}var Br,qi;function wa(){if(qi)return Br;qi=1;const e=ne();return Br=(t,r,h)=>e(t,r,h)===0,Br}var Dr,Hi;function va(){if(Hi)return Dr;Hi=1;const e=ne();return Dr=(t,r,h)=>e(t,r,h)!==0,Dr}var jr,Ui;function Hn(){if(Ui)return jr;Ui=1;const e=ne();return jr=(t,r,h)=>e(t,r,h)>=0,jr}var $r,Wi;function Un(){if(Wi)return $r;Wi=1;const e=ne();return $r=(t,r,h)=>e(t,r,h)<=0,$r}var qr,Vi;function Ea(){if(Vi)return qr;Vi=1;const e=wa(),i=va(),t=Wt(),r=Hn(),h=qn(),u=Un();return qr=(g,f,o,l)=>{switch(f){case"===":return typeof g=="object"&&(g=g.version),typeof o=="object"&&(o=o.version),g===o;case"!==":return typeof g=="object"&&(g=g.version),typeof o=="object"&&(o=o.version),g!==o;case"":case"=":case"==":return e(g,o,l);case"!=":return i(g,o,l);case">":return t(g,o,l);case">=":return r(g,o,l);case"<":return h(g,o,l);case"<=":return u(g,o,l);default:throw new TypeError(`Invalid operator: ${f}`)}},qr}var Hr,zi;function Nu(){if(zi)return Hr;zi=1;const e=G(),i=xe(),{safeRe:t,t:r}=Et();return Hr=(u,c)=>{if(u instanceof e)return u;if(typeof u=="number"&&(u=String(u)),typeof u!="string")return null;c=c||{};let g=null;if(!c.rtl)g=u.match(c.includePrerelease?t[r.COERCEFULL]:t[r.COERCE]);else{const s=c.includePrerelease?t[r.COERCERTLFULL]:t[r.COERCERTL];let p;for(;(p=s.exec(u))&&(!g||g.index+g[0].length!==u.length);)(!g||p.index+p[0].length!==g.index+g[0].length)&&(g=p),s.lastIndex=p.index+p[1].length+p[2].length;s.lastIndex=-1}if(g===null)return null;const f=g[2],o=g[3]||"0",l=g[4]||"0",n=c.includePrerelease&&g[5]?`-${g[5]}`:"",a=c.includePrerelease&&g[6]?`+${g[6]}`:"";return i(`${f}.${o}.${l}${n}${a}`,c)},Hr}var Ur,Ji;function Tu(){if(Ji)return Ur;Ji=1;class e{constructor(){this.max=1e3,this.map=new Map}get(t){const r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}delete(t){return this.map.delete(t)}set(t,r){if(!this.delete(t)&&r!==void 0){if(this.map.size>=this.max){const u=this.map.keys().next().value;this.delete(u)}this.map.set(t,r)}return this}}return Ur=e,Ur}var Wr,Gi;function se(){if(Gi)return Wr;Gi=1;const e=/\s+/g;class i{constructor(k,R){if(R=h(R),k instanceof i)return k.loose===!!R.loose&&k.includePrerelease===!!R.includePrerelease?k:new i(k.raw,R);if(k instanceof u)return this.raw=k.value,this.set=[[k]],this.formatted=void 0,this;if(this.options=R,this.loose=!!R.loose,this.includePrerelease=!!R.includePrerelease,this.raw=k.trim().replace(e," "),this.set=this.raw.split("||").map(I=>this.parseRange(I.trim())).filter(I=>I.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const I=this.set[0];if(this.set=this.set.filter(M=>!m(M[0])),this.set.length===0)this.set=[I];else if(this.set.length>1){for(const M of this.set)if(M.length===1&&b(M[0])){this.set=[M];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let k=0;k<this.set.length;k++){k>0&&(this.formatted+="||");const R=this.set[k];for(let I=0;I<R.length;I++)I>0&&(this.formatted+=" "),this.formatted+=R[I].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(k){const I=((this.options.includePrerelease&&s)|(this.options.loose&&p))+":"+k,M=r.get(I);if(M)return M;const L=this.options.loose,O=L?f[o.HYPHENRANGELOOSE]:f[o.HYPHENRANGE];k=k.replace(O,B(this.options.includePrerelease)),c("hyphen replace",k),k=k.replace(f[o.COMPARATORTRIM],l),c("comparator trim",k),k=k.replace(f[o.TILDETRIM],n),c("tilde trim",k),k=k.replace(f[o.CARETTRIM],a),c("caret trim",k);let j=k.split(" ").map(D=>w(D,this.options)).join(" ").split(/\s+/).map(D=>x(D,this.options));L&&(j=j.filter(D=>(c("loose invalid filter",D,this.options),!!D.match(f[o.COMPARATORLOOSE])))),c("range list",j);const F=new Map,$=j.map(D=>new u(D,this.options));for(const D of $){if(m(D))return[D];F.set(D.value,D)}F.size>1&&F.has("")&&F.delete("");const U=[...F.values()];return r.set(I,U),U}intersects(k,R){if(!(k instanceof i))throw new TypeError("a Range is required");return this.set.some(I=>d(I,R)&&k.set.some(M=>d(M,R)&&I.every(L=>M.every(O=>L.intersects(O,R)))))}test(k){if(!k)return!1;if(typeof k=="string")try{k=new g(k,this.options)}catch{return!1}for(let R=0;R<this.set.length;R++)if(W(this.set[R],k,this.options))return!0;return!1}}Wr=i;const t=Tu(),r=new t,h=jn(),u=Vt(),c=Ut(),g=G(),{safeRe:f,t:o,comparatorTrimReplace:l,tildeTrimReplace:n,caretTrimReplace:a}=Et(),{FLAG_INCLUDE_PRERELEASE:s,FLAG_LOOSE:p}=Ht(),m=A=>A.value==="<0.0.0-0",b=A=>A.value==="",d=(A,k)=>{let R=!0;const I=A.slice();let M=I.pop();for(;R&&I.length;)R=I.every(L=>M.intersects(L,k)),M=I.pop();return R},w=(A,k)=>(A=A.replace(f[o.BUILD],""),c("comp",A,k),A=C(A,k),c("caret",A),A=v(A,k),c("tildes",A),A=S(A,k),c("xrange",A),A=N(A,k),c("stars",A),A),y=A=>!A||A.toLowerCase()==="x"||A==="*",v=(A,k)=>A.trim().split(/\s+/).map(R=>E(R,k)).join(" "),E=(A,k)=>{const R=k.loose?f[o.TILDELOOSE]:f[o.TILDE];return A.replace(R,(I,M,L,O,j)=>{c("tilde",A,I,M,L,O,j);let F;return y(M)?F="":y(L)?F=`>=${M}.0.0 <${+M+1}.0.0-0`:y(O)?F=`>=${M}.${L}.0 <${M}.${+L+1}.0-0`:j?(c("replaceTilde pr",j),F=`>=${M}.${L}.${O}-${j} <${M}.${+L+1}.0-0`):F=`>=${M}.${L}.${O} <${M}.${+L+1}.0-0`,c("tilde return",F),F})},C=(A,k)=>A.trim().split(/\s+/).map(R=>_(R,k)).join(" "),_=(A,k)=>{c("caret",A,k);const R=k.loose?f[o.CARETLOOSE]:f[o.CARET],I=k.includePrerelease?"-0":"";return A.replace(R,(M,L,O,j,F)=>{c("caret",A,M,L,O,j,F);let $;return y(L)?$="":y(O)?$=`>=${L}.0.0${I} <${+L+1}.0.0-0`:y(j)?L==="0"?$=`>=${L}.${O}.0${I} <${L}.${+O+1}.0-0`:$=`>=${L}.${O}.0${I} <${+L+1}.0.0-0`:F?(c("replaceCaret pr",F),L==="0"?O==="0"?$=`>=${L}.${O}.${j}-${F} <${L}.${O}.${+j+1}-0`:$=`>=${L}.${O}.${j}-${F} <${L}.${+O+1}.0-0`:$=`>=${L}.${O}.${j}-${F} <${+L+1}.0.0-0`):(c("no pr"),L==="0"?O==="0"?$=`>=${L}.${O}.${j}${I} <${L}.${O}.${+j+1}-0`:$=`>=${L}.${O}.${j}${I} <${L}.${+O+1}.0-0`:$=`>=${L}.${O}.${j} <${+L+1}.0.0-0`),c("caret return",$),$})},S=(A,k)=>(c("replaceXRanges",A,k),A.split(/\s+/).map(R=>T(R,k)).join(" ")),T=(A,k)=>{A=A.trim();const R=k.loose?f[o.XRANGELOOSE]:f[o.XRANGE];return A.replace(R,(I,M,L,O,j,F)=>{c("xRange",A,I,M,L,O,j,F);const $=y(L),U=$||y(O),D=U||y(j),ce=D;return M==="="&&ce&&(M=""),F=k.includePrerelease?"-0":"",$?M===">"||M==="<"?I="<0.0.0-0":I="*":M&&ce?(U&&(O=0),j=0,M===">"?(M=">=",U?(L=+L+1,O=0,j=0):(O=+O+1,j=0)):M==="<="&&(M="<",U?L=+L+1:O=+O+1),M==="<"&&(F="-0"),I=`${M+L}.${O}.${j}${F}`):U?I=`>=${L}.0.0${F} <${+L+1}.0.0-0`:D&&(I=`>=${L}.${O}.0${F} <${L}.${+O+1}.0-0`),c("xRange return",I),I})},N=(A,k)=>(c("replaceStars",A,k),A.trim().replace(f[o.STAR],"")),x=(A,k)=>(c("replaceGTE0",A,k),A.trim().replace(f[k.includePrerelease?o.GTE0PRE:o.GTE0],"")),B=A=>(k,R,I,M,L,O,j,F,$,U,D,ce)=>(y(I)?R="":y(M)?R=`>=${I}.0.0${A?"-0":""}`:y(L)?R=`>=${I}.${M}.0${A?"-0":""}`:O?R=`>=${R}`:R=`>=${R}${A?"-0":""}`,y($)?F="":y(U)?F=`<${+$+1}.0.0-0`:y(D)?F=`<${$}.${+U+1}.0-0`:ce?F=`<=${$}.${U}.${D}-${ce}`:A?F=`<${$}.${U}.${+D+1}-0`:F=`<=${F}`,`${R} ${F}`.trim()),W=(A,k,R)=>{for(let I=0;I<A.length;I++)if(!A[I].test(k))return!1;if(k.prerelease.length&&!R.includePrerelease){for(let I=0;I<A.length;I++)if(c(A[I].semver),A[I].semver!==u.ANY&&A[I].semver.prerelease.length>0){const M=A[I].semver;if(M.major===k.major&&M.minor===k.minor&&M.patch===k.patch)return!0}return!1}return!0};return Wr}var Vr,Zi;function Vt(){if(Zi)return Vr;Zi=1;const e=Symbol("SemVer ANY");class i{static get ANY(){return e}constructor(l,n){if(n=t(n),l instanceof i){if(l.loose===!!n.loose)return l;l=l.value}l=l.trim().split(/\s+/).join(" "),c("comparator",l,n),this.options=n,this.loose=!!n.loose,this.parse(l),this.semver===e?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(l){const n=this.options.loose?r[h.COMPARATORLOOSE]:r[h.COMPARATOR],a=l.match(n);if(!a)throw new TypeError(`Invalid comparator: ${l}`);this.operator=a[1]!==void 0?a[1]:"",this.operator==="="&&(this.operator=""),a[2]?this.semver=new g(a[2],this.options.loose):this.semver=e}toString(){return this.value}test(l){if(c("Comparator.test",l,this.options.loose),this.semver===e||l===e)return!0;if(typeof l=="string")try{l=new g(l,this.options)}catch{return!1}return u(l,this.operator,this.semver,this.options)}intersects(l,n){if(!(l instanceof i))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new f(l.value,n).test(this.value):l.operator===""?l.value===""?!0:new f(this.value,n).test(l.semver):(n=t(n),n.includePrerelease&&(this.value==="<0.0.0-0"||l.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||l.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&l.operator.startsWith(">")||this.operator.startsWith("<")&&l.operator.startsWith("<")||this.semver.version===l.semver.version&&this.operator.includes("=")&&l.operator.includes("=")||u(this.semver,"<",l.semver,n)&&this.operator.startsWith(">")&&l.operator.startsWith("<")||u(this.semver,">",l.semver,n)&&this.operator.startsWith("<")&&l.operator.startsWith(">")))}}Vr=i;const t=jn(),{safeRe:r,t:h}=Et(),u=Ea(),c=Ut(),g=G(),f=se();return Vr}var zr,Qi;function zt(){if(Qi)return zr;Qi=1;const e=se();return zr=(t,r,h)=>{try{r=new e(r,h)}catch{return!1}return r.test(t)},zr}var Jr,Ki;function Pu(){if(Ki)return Jr;Ki=1;const e=se();return Jr=(t,r)=>new e(t,r).set.map(h=>h.map(u=>u.value).join(" ").trim().split(" ")),Jr}var Gr,Xi;function Ou(){if(Xi)return Gr;Xi=1;const e=G(),i=se();return Gr=(r,h,u)=>{let c=null,g=null,f=null;try{f=new i(h,u)}catch{return null}return r.forEach(o=>{f.test(o)&&(!c||g.compare(o)===-1)&&(c=o,g=new e(c,u))}),c},Gr}var Zr,Yi;function xu(){if(Yi)return Zr;Yi=1;const e=G(),i=se();return Zr=(r,h,u)=>{let c=null,g=null,f=null;try{f=new i(h,u)}catch{return null}return r.forEach(o=>{f.test(o)&&(!c||g.compare(o)===1)&&(c=o,g=new e(c,u))}),c},Zr}var Qr,eo;function Fu(){if(eo)return Qr;eo=1;const e=G(),i=se(),t=Wt();return Qr=(h,u)=>{h=new i(h,u);let c=new e("0.0.0");if(h.test(c)||(c=new e("0.0.0-0"),h.test(c)))return c;c=null;for(let g=0;g<h.set.length;++g){const f=h.set[g];let o=null;f.forEach(l=>{const n=new e(l.semver.version);switch(l.operator){case">":n.prerelease.length===0?n.patch++:n.prerelease.push(0),n.raw=n.format();case"":case">=":(!o||t(n,o))&&(o=n);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${l.operator}`)}}),o&&(!c||t(c,o))&&(c=o)}return c&&h.test(c)?c:null},Qr}var Kr,to;function Bu(){if(to)return Kr;to=1;const e=se();return Kr=(t,r)=>{try{return new e(t,r).range||"*"}catch{return null}},Kr}var Xr,ro;function Wn(){if(ro)return Xr;ro=1;const e=G(),i=Vt(),{ANY:t}=i,r=se(),h=zt(),u=Wt(),c=qn(),g=Un(),f=Hn();return Xr=(l,n,a,s)=>{l=new e(l,s),n=new r(n,s);let p,m,b,d,w;switch(a){case">":p=u,m=g,b=c,d=">",w=">=";break;case"<":p=c,m=f,b=u,d="<",w="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(h(l,n,s))return!1;for(let y=0;y<n.set.length;++y){const v=n.set[y];let E=null,C=null;if(v.forEach(_=>{_.semver===t&&(_=new i(">=0.0.0")),E=E||_,C=C||_,p(_.semver,E.semver,s)?E=_:b(_.semver,C.semver,s)&&(C=_)}),E.operator===d||E.operator===w||(!C.operator||C.operator===d)&&m(l,C.semver))return!1;if(C.operator===w&&b(l,C.semver))return!1}return!0},Xr}var Yr,no;function Du(){if(no)return Yr;no=1;const e=Wn();return Yr=(t,r,h)=>e(t,r,">",h),Yr}var en,so;function ju(){if(so)return en;so=1;const e=Wn();return en=(t,r,h)=>e(t,r,"<",h),en}var tn,io;function $u(){if(io)return tn;io=1;const e=se();return tn=(t,r,h)=>(t=new e(t,h),r=new e(r,h),t.intersects(r,h)),tn}var rn,oo;function qu(){if(oo)return rn;oo=1;const e=zt(),i=ne();return rn=(t,r,h)=>{const u=[];let c=null,g=null;const f=t.sort((a,s)=>i(a,s,h));for(const a of f)e(a,r,h)?(g=a,c||(c=a)):(g&&u.push([c,g]),g=null,c=null);c&&u.push([c,null]);const o=[];for(const[a,s]of u)a===s?o.push(a):!s&&a===f[0]?o.push("*"):s?a===f[0]?o.push(`<=${s}`):o.push(`${a} - ${s}`):o.push(`>=${a}`);const l=o.join(" || "),n=typeof r.raw=="string"?r.raw:String(r);return l.length<n.length?l:r},rn}var nn,ao;function Hu(){if(ao)return nn;ao=1;const e=se(),i=Vt(),{ANY:t}=i,r=zt(),h=ne(),u=(n,a,s={})=>{if(n===a)return!0;n=new e(n,s),a=new e(a,s);let p=!1;e:for(const m of n.set){for(const b of a.set){const d=f(m,b,s);if(p=p||d!==null,d)continue e}if(p)return!1}return!0},c=[new i(">=0.0.0-0")],g=[new i(">=0.0.0")],f=(n,a,s)=>{if(n===a)return!0;if(n.length===1&&n[0].semver===t){if(a.length===1&&a[0].semver===t)return!0;s.includePrerelease?n=c:n=g}if(a.length===1&&a[0].semver===t){if(s.includePrerelease)return!0;a=g}const p=new Set;let m,b;for(const S of n)S.operator===">"||S.operator===">="?m=o(m,S,s):S.operator==="<"||S.operator==="<="?b=l(b,S,s):p.add(S.semver);if(p.size>1)return null;let d;if(m&&b){if(d=h(m.semver,b.semver,s),d>0)return null;if(d===0&&(m.operator!==">="||b.operator!=="<="))return null}for(const S of p){if(m&&!r(S,String(m),s)||b&&!r(S,String(b),s))return null;for(const T of a)if(!r(S,String(T),s))return!1;return!0}let w,y,v,E,C=b&&!s.includePrerelease&&b.semver.prerelease.length?b.semver:!1,_=m&&!s.includePrerelease&&m.semver.prerelease.length?m.semver:!1;C&&C.prerelease.length===1&&b.operator==="<"&&C.prerelease[0]===0&&(C=!1);for(const S of a){if(E=E||S.operator===">"||S.operator===">=",v=v||S.operator==="<"||S.operator==="<=",m){if(_&&S.semver.prerelease&&S.semver.prerelease.length&&S.semver.major===_.major&&S.semver.minor===_.minor&&S.semver.patch===_.patch&&(_=!1),S.operator===">"||S.operator===">="){if(w=o(m,S,s),w===S&&w!==m)return!1}else if(m.operator===">="&&!r(m.semver,String(S),s))return!1}if(b){if(C&&S.semver.prerelease&&S.semver.prerelease.length&&S.semver.major===C.major&&S.semver.minor===C.minor&&S.semver.patch===C.patch&&(C=!1),S.operator==="<"||S.operator==="<="){if(y=l(b,S,s),y===S&&y!==b)return!1}else if(b.operator==="<="&&!r(b.semver,String(S),s))return!1}if(!S.operator&&(b||m)&&d!==0)return!1}return!(m&&v&&!b&&d!==0||b&&E&&!m&&d!==0||_||C)},o=(n,a,s)=>{if(!n)return a;const p=h(n.semver,a.semver,s);return p>0?n:p<0||a.operator===">"&&n.operator===">="?a:n},l=(n,a,s)=>{if(!n)return a;const p=h(n.semver,a.semver,s);return p<0?n:p>0||a.operator==="<"&&n.operator==="<="?a:n};return nn=u,nn}var sn,co;function Uu(){if(co)return sn;co=1;const e=Et(),i=Ht(),t=G(),r=ya(),h=xe(),u=wu(),c=vu(),g=Eu(),f=_u(),o=Ru(),l=Cu(),n=Su(),a=ku(),s=ne(),p=Iu(),m=Au(),b=$n(),d=Lu(),w=Mu(),y=Wt(),v=qn(),E=wa(),C=va(),_=Hn(),S=Un(),T=Ea(),N=Nu(),x=Vt(),B=se(),W=zt(),A=Pu(),k=Ou(),R=xu(),I=Fu(),M=Bu(),L=Wn(),O=Du(),j=ju(),F=$u(),$=qu(),U=Hu();return sn={parse:h,valid:u,clean:c,inc:g,diff:f,major:o,minor:l,patch:n,prerelease:a,compare:s,rcompare:p,compareLoose:m,compareBuild:b,sort:d,rsort:w,gt:y,lt:v,eq:E,neq:C,gte:_,lte:S,cmp:T,coerce:N,Comparator:x,Range:B,satisfies:W,toComparators:A,maxSatisfying:k,minSatisfying:R,minVersion:I,validRange:M,outside:L,gtr:O,ltr:j,intersects:F,simplifyRange:$,subset:U,SemVer:t,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:r.compareIdentifiers,rcompareIdentifiers:r.rcompareIdentifiers},sn}var uo;function Wu(){return uo||(uo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const i=Uu(),t=Pe,r=le();e.VersionStruct=(0,t.refine)((0,t.string)(),"Version",n=>(0,i.valid)(n)===null?`Expected SemVer version, got "${n}"`:!0),e.VersionRangeStruct=(0,t.refine)((0,t.string)(),"Version range",n=>(0,i.validRange)(n)===null?`Expected SemVer range, got "${n}"`:!0);function h(n){return(0,t.is)(n,e.VersionStruct)}e.isValidSemVerVersion=h;function u(n){return(0,t.is)(n,e.VersionRangeStruct)}e.isValidSemVerRange=u;function c(n){(0,r.assertStruct)(n,e.VersionStruct)}e.assertIsSemVerVersion=c;function g(n){(0,r.assertStruct)(n,e.VersionRangeStruct)}e.assertIsSemVerRange=g;function f(n,a){return(0,i.gt)(n,a)}e.gtVersion=f;function o(n,a){return(0,i.gtr)(n,a)}e.gtRange=o;function l(n,a){return(0,i.satisfies)(n,a,{includePrerelease:!0})}e.satisfiesVersionRange=l}(gr)),gr}var lo;function Vu(){return lo||(lo=1,function(e){var i=Se&&Se.__createBinding||(Object.create?function(r,h,u,c){c===void 0&&(c=u);var g=Object.getOwnPropertyDescriptor(h,u);(!g||("get"in g?!h.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return h[u]}}),Object.defineProperty(r,c,g)}:function(r,h,u,c){c===void 0&&(c=u),r[c]=h[u]}),t=Se&&Se.__exportStar||function(r,h){for(var u in r)u!=="default"&&!Object.prototype.hasOwnProperty.call(h,u)&&i(h,r,u)};Object.defineProperty(e,"__esModule",{value:!0}),t(le(),e),t(ma(),e),t(ba(),e),t(su(),e),t(iu(),e),t(ou(),e),t(au(),e),t(qt(),e),t(cu(),e),t(uu(),e),t(fu(),e),t(gu(),e),t(pu(),e),t(mu(),e),t(bu(),e),t(yu(),e),t(Wu(),e)}(Se)),Se}var ho;function zu(){return ho||(ho=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createModuleLogger=e.projectLogger=void 0;const i=Vu();Object.defineProperty(e,"createModuleLogger",{enumerable:!0,get:function(){return i.createModuleLogger}}),e.projectLogger=(0,i.createProjectLogger)("eth-block-tracker")}(nr)),nr}var fo;function Ju(){if(fo)return Re;fo=1;var e=Re&&Re.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.PollingBlockTracker=void 0;const i=e(Pn()),t=e(yc()),r=aa(),h=zu(),u=(0,h.createModuleLogger)(h.projectLogger,"polling-block-tracker"),c=(0,i.default)(),g=1e3;let f=class extends r.BaseBlockTracker{constructor(n={}){var a;if(!n.provider)throw new Error("PollingBlockTracker - no provider specified.");super(Object.assign(Object.assign({},n),{blockResetDuration:(a=n.blockResetDuration)!==null&&a!==void 0?a:n.pollingInterval})),this._provider=n.provider,this._pollingInterval=n.pollingInterval||20*g,this._retryTimeout=n.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=n.keepEventLoopActive===void 0?!0:n.keepEventLoopActive,this._setSkipCacheFlag=n.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var n;this._isRunning;)try{await this._updateLatestBlock();const a=o(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await a}catch(a){const s=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:
3
3
  ${(n=a.stack)!==null&&n!==void 0?n:a}`);try{this.emit("error",s)}catch{console.error(s)}const p=o(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await p}}async _updateLatestBlock(){const n=await this._fetchLatestBlock();this._newPotentialLatest(n)}async _fetchLatestBlock(){const n={jsonrpc:"2.0",id:c(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(n.skipCache=!0),u("Making request",n);const a=await(0,t.default)(s=>this._provider.sendAsync(n,s))();if(u("Got response",a),a.error)throw new Error(`PollingBlockTracker - encountered error fetching block:
4
4
  ${a.error.message}`);return a.result}};Re.PollingBlockTracker=f;function o(l,n){return new Promise(a=>{const s=setTimeout(a,l);s.unref&&n&&s.unref()})}return Re}var ke={},go;function Gu(){if(go)return ke;go=1;var e=ke&&ke.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(ke,"__esModule",{value:!0}),ke.SubscribeBlockTracker=void 0;const i=e(Pn()),t=aa(),r=(0,i.default)();let h=class extends t.BaseBlockTracker{constructor(c={}){if(!c.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(c),this._provider=c.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}async _start(){if(this._subscriptionId===void 0||this._subscriptionId===null)try{const c=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(c)}catch(c){this.emit("error",c)}}async _end(){if(this._subscriptionId!==null&&this._subscriptionId!==void 0)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(c){this.emit("error",c)}}_call(c,...g){return new Promise((f,o)=>{this._provider.sendAsync({id:r(),method:c,params:g,jsonrpc:"2.0"},(l,n)=>{l?o(l):f(n.result)})})}_handleSubData(c,g){var f;g.method==="eth_subscription"&&((f=g.params)===null||f===void 0?void 0:f.subscription)===this._subscriptionId&&this._newPotentialLatest(g.params.result.number)}};return ke.SubscribeBlockTracker=h,ke}var po;function Zu(){return po||(po=1,function(e){var i=_e&&_e.__createBinding||(Object.create?function(r,h,u,c){c===void 0&&(c=u),Object.defineProperty(r,c,{enumerable:!0,get:function(){return h[u]}})}:function(r,h,u,c){c===void 0&&(c=u),r[c]=h[u]}),t=_e&&_e.__exportStar||function(r,h){for(var u in r)u!=="default"&&!Object.prototype.hasOwnProperty.call(h,u)&&i(h,r,u)};Object.defineProperty(e,"__esModule",{value:!0}),t(Ju(),e),t(Gu(),e)}(_e)),_e}var Ie={},lt={},dt={},mo;function _a(){if(mo)return dt;mo=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.getUniqueId=void 0;const e=4294967295;let i=Math.floor(Math.random()*e);function t(){return i=(i+1)%e,i}return dt.getUniqueId=t,dt}var bo;function Qu(){if(bo)return lt;bo=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.createIdRemapMiddleware=void 0;const e=_a();function i(){return(t,r,h,u)=>{const c=t.id,g=e.getUniqueId();t.id=g,r.id=g,h(f=>{t.id=c,r.id=c,f()})}}return lt.createIdRemapMiddleware=i,lt}var ht={},yo;function Ku(){if(yo)return ht;yo=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.createAsyncMiddleware=void 0;function e(i){return async(t,r,h,u)=>{let c;const g=new Promise(n=>{c=n});let f=null,o=!1;const l=async()=>{o=!0,h(n=>{f=n,c()}),await g};try{await i(t,r,l),o?(await g,f(null)):u(null)}catch(n){f?f(n):u(n)}}}return ht.createAsyncMiddleware=e,ht}var ft={},wo;function Xu(){if(wo)return ft;wo=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.createScaffoldMiddleware=void 0;function e(i){return(t,r,h,u)=>{const c=i[t.method];return c===void 0?h():typeof c=="function"?c(t,r,h,u):(r.result=c,u())}}return ft.createScaffoldMiddleware=e,ft}var Ae={},Pt={},vo;function Yu(){if(vo)return Pt;vo=1,Object.defineProperty(Pt,"__esModule",{value:!0});const e=Xo();function i(h,u,c){try{Reflect.apply(h,u,c)}catch(g){setTimeout(()=>{throw g})}}function t(h){const u=h.length,c=new Array(u);for(let g=0;g<u;g+=1)c[g]=h[g];return c}class r extends e.EventEmitter{emit(u,...c){let g=u==="error";const f=this._events;if(f!==void 0)g=g&&f.error===void 0;else if(!g)return!1;if(g){let l;if(c.length>0&&([l]=c),l instanceof Error)throw l;const n=new Error(`Unhandled error.${l?` (${l.message})`:""}`);throw n.context=l,n}const o=f[u];if(o===void 0)return!1;if(typeof o=="function")i(o,this,c);else{const l=o.length,n=t(o);for(let a=0;a<l;a+=1)i(n[a],this,c)}return!0}}return Pt.default=r,Pt}var on={},Le={},an,Eo;function el(){if(Eo)return an;Eo=1,an=u,u.default=u,u.stable=o,u.stableStringify=o;var e="[...]",i="[Circular]",t=[],r=[];function h(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function u(a,s,p,m){typeof m>"u"&&(m=h()),g(a,"",0,[],void 0,0,m);var b;try{r.length===0?b=JSON.stringify(a,s,p):b=JSON.stringify(a,n(s),p)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;t.length!==0;){var d=t.pop();d.length===4?Object.defineProperty(d[0],d[1],d[3]):d[0][d[1]]=d[2]}}return b}function c(a,s,p,m){var b=Object.getOwnPropertyDescriptor(m,p);b.get!==void 0?b.configurable?(Object.defineProperty(m,p,{value:a}),t.push([m,p,s,b])):r.push([s,p,a]):(m[p]=a,t.push([m,p,s]))}function g(a,s,p,m,b,d,w){d+=1;var y;if(typeof a=="object"&&a!==null){for(y=0;y<m.length;y++)if(m[y]===a){c(i,a,s,b);return}if(typeof w.depthLimit<"u"&&d>w.depthLimit){c(e,a,s,b);return}if(typeof w.edgesLimit<"u"&&p+1>w.edgesLimit){c(e,a,s,b);return}if(m.push(a),Array.isArray(a))for(y=0;y<a.length;y++)g(a[y],y,y,m,a,d,w);else{var v=Object.keys(a);for(y=0;y<v.length;y++){var E=v[y];g(a[E],E,y,m,a,d,w)}}m.pop()}}function f(a,s){return a<s?-1:a>s?1:0}function o(a,s,p,m){typeof m>"u"&&(m=h());var b=l(a,"",0,[],void 0,0,m)||a,d;try{r.length===0?d=JSON.stringify(b,s,p):d=JSON.stringify(b,n(s),p)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;t.length!==0;){var w=t.pop();w.length===4?Object.defineProperty(w[0],w[1],w[3]):w[0][w[1]]=w[2]}}return d}function l(a,s,p,m,b,d,w){d+=1;var y;if(typeof a=="object"&&a!==null){for(y=0;y<m.length;y++)if(m[y]===a){c(i,a,s,b);return}try{if(typeof a.toJSON=="function")return}catch{return}if(typeof w.depthLimit<"u"&&d>w.depthLimit){c(e,a,s,b);return}if(typeof w.edgesLimit<"u"&&p+1>w.edgesLimit){c(e,a,s,b);return}if(m.push(a),Array.isArray(a))for(y=0;y<a.length;y++)l(a[y],y,y,m,a,d,w);else{var v={},E=Object.keys(a).sort(f);for(y=0;y<E.length;y++){var C=E[y];l(a[C],C,y,m,a,d,w),v[C]=a[C]}if(typeof b<"u")t.push([b,s,a]),b[s]=v;else return v}m.pop()}}function n(a){return a=typeof a<"u"?a:function(s,p){return p},function(s,p){if(r.length>0)for(var m=0;m<r.length;m++){var b=r[m];if(b[1]===s&&b[0]===p){p=b[2],r.splice(m,1);break}}return a.call(this,s,p)}}return an}var _o;function Vn(){if(_o)return Le;_o=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.EthereumProviderError=Le.EthereumRpcError=void 0;const e=el();class i extends Error{constructor(c,g,f){if(!Number.isInteger(c))throw new Error('"code" must be an integer.');if(!g||typeof g!="string")throw new Error('"message" must be a nonempty string.');super(g),this.code=c,f!==void 0&&(this.data=f)}serialize(){const c={code:this.code,message:this.message};return this.data!==void 0&&(c.data=this.data),this.stack&&(c.stack=this.stack),c}toString(){return e.default(this.serialize(),h,2)}}Le.EthereumRpcError=i;class t extends i{constructor(c,g,f){if(!r(c))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(c,g,f)}}Le.EthereumProviderError=t;function r(u){return Number.isInteger(u)&&u>=1e3&&u<=4999}function h(u,c){if(c!=="[Circular]")return c}return Le}var cn={},Me={},Ro;function zn(){return Ro||(Ro=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.errorValues=Me.errorCodes=void 0,Me.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},Me.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}),Me}var Co;function Ra(){return Co||(Co=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const i=zn(),t=Vn(),r=i.errorCodes.rpc.internal,h="Unspecified error message. This is a bug, please report it.",u={code:r,message:c(r)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function c(a,s=h){if(Number.isInteger(a)){const p=a.toString();if(n(i.errorValues,p))return i.errorValues[p].message;if(o(a))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return s}e.getMessageFromCode=c;function g(a){if(!Number.isInteger(a))return!1;const s=a.toString();return!!(i.errorValues[s]||o(a))}e.isValidCode=g;function f(a,{fallbackError:s=u,shouldIncludeStack:p=!1}={}){var m,b;if(!s||!Number.isInteger(s.code)||typeof s.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(a instanceof t.EthereumRpcError)return a.serialize();const d={};if(a&&typeof a=="object"&&!Array.isArray(a)&&n(a,"code")&&g(a.code)){const y=a;d.code=y.code,y.message&&typeof y.message=="string"?(d.message=y.message,n(y,"data")&&(d.data=y.data)):(d.message=c(d.code),d.data={originalError:l(a)})}else{d.code=s.code;const y=(m=a)===null||m===void 0?void 0:m.message;d.message=y&&typeof y=="string"?y:s.message,d.data={originalError:l(a)}}const w=(b=a)===null||b===void 0?void 0:b.stack;return p&&a&&w&&typeof w=="string"&&(d.stack=w),d}e.serializeError=f;function o(a){return a>=-32099&&a<=-32e3}function l(a){return a&&typeof a=="object"&&!Array.isArray(a)?Object.assign({},a):a}function n(a,s){return Object.prototype.hasOwnProperty.call(a,s)}}(cn)),cn}var gt={},So;function tl(){if(So)return gt;So=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.ethErrors=void 0;const e=Vn(),i=Ra(),t=zn();gt.ethErrors={rpc:{parse:c=>r(t.errorCodes.rpc.parse,c),invalidRequest:c=>r(t.errorCodes.rpc.invalidRequest,c),invalidParams:c=>r(t.errorCodes.rpc.invalidParams,c),methodNotFound:c=>r(t.errorCodes.rpc.methodNotFound,c),internal:c=>r(t.errorCodes.rpc.internal,c),server:c=>{if(!c||typeof c!="object"||Array.isArray(c))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:g}=c;if(!Number.isInteger(g)||g>-32005||g<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return r(g,c)},invalidInput:c=>r(t.errorCodes.rpc.invalidInput,c),resourceNotFound:c=>r(t.errorCodes.rpc.resourceNotFound,c),resourceUnavailable:c=>r(t.errorCodes.rpc.resourceUnavailable,c),transactionRejected:c=>r(t.errorCodes.rpc.transactionRejected,c),methodNotSupported:c=>r(t.errorCodes.rpc.methodNotSupported,c),limitExceeded:c=>r(t.errorCodes.rpc.limitExceeded,c)},provider:{userRejectedRequest:c=>h(t.errorCodes.provider.userRejectedRequest,c),unauthorized:c=>h(t.errorCodes.provider.unauthorized,c),unsupportedMethod:c=>h(t.errorCodes.provider.unsupportedMethod,c),disconnected:c=>h(t.errorCodes.provider.disconnected,c),chainDisconnected:c=>h(t.errorCodes.provider.chainDisconnected,c),custom:c=>{if(!c||typeof c!="object"||Array.isArray(c))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:g,message:f,data:o}=c;if(!f||typeof f!="string")throw new Error('"message" must be a nonempty string');return new e.EthereumProviderError(g,f,o)}}};function r(c,g){const[f,o]=u(g);return new e.EthereumRpcError(c,f||i.getMessageFromCode(c),o)}function h(c,g){const[f,o]=u(g);return new e.EthereumProviderError(c,f||i.getMessageFromCode(c),o)}function u(c){if(c){if(typeof c=="string")return[c];if(typeof c=="object"&&!Array.isArray(c)){const{message:g,data:f}=c;if(g&&typeof g!="string")throw new Error("Must specify string message.");return[g||void 0,f]}}return[]}return gt}var ko;function rl(){return ko||(ko=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const i=Vn();Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return i.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return i.EthereumProviderError}});const t=Ra();Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return t.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return t.getMessageFromCode}});const r=tl();Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return r.ethErrors}});const h=zn();Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return h.errorCodes}})}(on)),on}var Io;function Ca(){if(Io)return Ae;Io=1;var e=Ae&&Ae.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.JsonRpcEngine=void 0;const i=e(Yu()),t=rl();let r=class ue extends i.default{constructor(){super(),this._middleware=[]}push(c){this._middleware.push(c)}handle(c,g){if(g&&typeof g!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(c)?g?this._handleBatch(c,g):this._handleBatch(c):g?this._handle(c,g):this._promiseHandle(c)}asMiddleware(){return async(c,g,f,o)=>{try{const[l,n,a]=await ue._runAllMiddleware(c,g,this._middleware);return n?(await ue._runReturnHandlers(a),o(l)):f(async s=>{try{await ue._runReturnHandlers(a)}catch(p){return s(p)}return s()})}catch(l){return o(l)}}}async _handleBatch(c,g){try{const f=await Promise.all(c.map(this._promiseHandle.bind(this)));return g?g(null,f):f}catch(f){if(g)return g(f);throw f}}_promiseHandle(c){return new Promise(g=>{this._handle(c,(f,o)=>{g(o)})})}async _handle(c,g){if(!c||Array.isArray(c)||typeof c!="object"){const n=new t.EthereumRpcError(t.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof c}`,{request:c});return g(n,{id:void 0,jsonrpc:"2.0",error:n})}if(typeof c.method!="string"){const n=new t.EthereumRpcError(t.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof c.method}`,{request:c});return g(n,{id:c.id,jsonrpc:"2.0",error:n})}const f=Object.assign({},c),o={id:f.id,jsonrpc:f.jsonrpc};let l=null;try{await this._processRequest(f,o)}catch(n){l=n}return l&&(delete o.result,o.error||(o.error=t.serializeError(l))),g(l,o)}async _processRequest(c,g){const[f,o,l]=await ue._runAllMiddleware(c,g,this._middleware);if(ue._checkForCompletion(c,g,o),await ue._runReturnHandlers(l),f)throw f}static async _runAllMiddleware(c,g,f){const o=[];let l=null,n=!1;for(const a of f)if([l,n]=await ue._runMiddleware(c,g,a,o),n)break;return[l,n,o.reverse()]}static _runMiddleware(c,g,f,o){return new Promise(l=>{const n=s=>{const p=s||g.error;p&&(g.error=t.serializeError(p)),l([p,!0])},a=s=>{g.error?n(g.error):(s&&(typeof s!="function"&&n(new t.EthereumRpcError(t.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof s}" for request: