@wormhole-foundation/wormhole-connect 1.1.3-beta.2-development → 1.1.3-beta.3-development

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 (102) hide show
  1. package/dist/assets/{ccip-CuVLQT8d.js → ccip-DIYM0gy6.js} +1 -1
  2. package/dist/assets/{evm-Dc3QdSOA.js → evm-Y-JIomWz.js} +4 -4
  3. package/dist/assets/{index-EVjhBEXw.js → index--B3_-qch.js} +2 -2
  4. package/dist/assets/{index-BJGeA_ds.js → index-C1YrzzPV.js} +1 -1
  5. package/dist/assets/{index-BIssGeVa.js → index-sR4FP7OJ.js} +1 -1
  6. package/dist/assets/{index.es-BObgTr8H.js → index.es-CRUh0v3x.js} +2 -2
  7. package/dist/main.js +4 -4
  8. package/lib/{algorand-CLoiUadv.mjs → algorand-D_QRI-bg.mjs} +3 -3
  9. package/lib/{algorand-BAFj4ZGa.js → algorand-wRfrbOd6.js} +1 -1
  10. package/lib/{aptos-C45UOjMk.mjs → aptos-39dGPUrb.mjs} +3 -3
  11. package/lib/{aptos-CHkHb9Wn.js → aptos-BYA8pulJ.js} +1 -1
  12. package/lib/{aptos-B0EUzhLn.mjs → aptos-D8si2udZ.mjs} +1 -1
  13. package/lib/{aptos-DLBpR9Uw.js → aptos-j2PEnEen.js} +2 -2
  14. package/lib/{ccip-D6nl66Of.mjs → ccip-CAsSiarY.mjs} +1 -1
  15. package/lib/{ccip-DwcFzOh0.js → ccip-D2DyQ2dl.js} +1 -1
  16. package/lib/{cosmos-BEyKk7pN.js → cosmos--SblITfP.js} +11 -11
  17. package/lib/{cosmos-Bc34YeqV.mjs → cosmos-5QBTeSdf.mjs} +5 -5
  18. package/lib/{cosmwasm-BBIEjp_6.mjs → cosmwasm-BvDytCXd.mjs} +3545 -3545
  19. package/lib/{cosmwasm-DPmjLuio.js → cosmwasm-qpOclFcW.js} +3 -3
  20. package/lib/{events-D9h1HjEa.mjs → events-Cq1VEeNf.mjs} +1 -1
  21. package/lib/{events-B2ZyXE4l.js → events-DSOd4gvB.js} +1 -1
  22. package/lib/{evm--fmrvZiP.js → evm-C-UXATlx.js} +4 -4
  23. package/lib/{evm-sG77B7Ln.mjs → evm-CEwMJ8_A.mjs} +6 -6
  24. package/lib/{evm-D6zAQuRU.js → evm-DG7I4Frq.js} +1 -1
  25. package/lib/{evm-DsRkB-Yc.mjs → evm-DMvzqxcS.mjs} +7 -7
  26. package/lib/{index-DinZIMWa.mjs → index-74c6g32z.mjs} +225 -225
  27. package/lib/{index-DWJ5r15M.mjs → index-7zA9RXv7.mjs} +19853 -19856
  28. package/lib/{index-Cpjj11xV.mjs → index-B8T2NaoX.mjs} +45 -45
  29. package/lib/{index-DPtc-UxP.mjs → index-B8ULFzIF.mjs} +6 -6
  30. package/lib/{index-B7Optu6I.js → index-B9Hz7aqe.js} +1 -1
  31. package/lib/{index-jydTi-hN.mjs → index-BHWO1nl8.mjs} +2 -2
  32. package/lib/{index-ByOoS9NO.js → index-BLp_eTrc.js} +1 -1
  33. package/lib/{index-CvdPwRnL.js → index-BQtbCwXd.js} +1 -1
  34. package/lib/{index-CEovIwuS.js → index-BU_DiszY.js} +92 -92
  35. package/lib/{index-XMIcJZyr.js → index-BbxY_HAX.js} +16 -16
  36. package/lib/{index-CY9fp7fB.mjs → index-Beu3v0JF.mjs} +15 -15
  37. package/lib/{index-D4u8CUKC.mjs → index-BhXfWaSE.mjs} +3 -3
  38. package/lib/{index-B9gBvn5a.mjs → index-BjeY05EL.mjs} +801 -802
  39. package/lib/{index-BT10pzLw.mjs → index-BoUKkFOJ.mjs} +1 -1
  40. package/lib/{index-CVaT6qZW.js → index-C6PC2n3L.js} +1 -1
  41. package/lib/{index-BYnoX4S7.mjs → index-CAqvcaXu.mjs} +15 -15
  42. package/lib/{index-DGq7mQyb.mjs → index-CDHEzcRs.mjs} +10 -10
  43. package/lib/{index-U1A3Ir4_.js → index-CFV9DDDi.js} +1 -1
  44. package/lib/{index-CQY-qyc8.mjs → index-CHNFj7US.mjs} +2 -2
  45. package/lib/{index-DrDopLyp.mjs → index-CIbRMQ53.mjs} +2 -2
  46. package/lib/{index-BFWViYNu.mjs → index-COFRyIUZ.mjs} +7 -7
  47. package/lib/{index-BJ9DGQK7.js → index-CREWpYSc.js} +1 -1
  48. package/lib/{index-CL7evJIB.js → index-CV_U2daN.js} +1 -1
  49. package/lib/{index-CNe0Pean.js → index-CxgmuQ6m.js} +1 -1
  50. package/lib/{index-DugvE6YD.mjs → index-D-p3qNTZ.mjs} +30 -30
  51. package/lib/{index-Cb5M1Ban.mjs → index-D9X9k3PB.mjs} +1 -1
  52. package/lib/{index-IC9ubiMJ.mjs → index-DJghGbqc.mjs} +3 -3
  53. package/lib/{index-Bx7B-3Uk.js → index-DP78DD_7.js} +1 -1
  54. package/lib/{index-OldEBluq.js → index-D_iRGURG.js} +1 -1
  55. package/lib/{index-PcZU5a1K.js → index-DcOE-jqI.js} +1 -1
  56. package/lib/{index-BO1rJrRP.mjs → index-DefP3AL4.mjs} +9 -9
  57. package/lib/{index-C96ibHXm.js → index-DgKzux63.js} +1 -1
  58. package/lib/{index-D_3BlFSH.js → index-DhjRrhjF.js} +1 -1
  59. package/lib/{index-CyPbCf5y.js → index-DhvcbRay.js} +1 -1
  60. package/lib/{index-C010ECjb.js → index-DjAPVIrd.js} +1 -1
  61. package/lib/{index-CaQpF1dj.js → index-Dpwwqt_Y.js} +1 -1
  62. package/lib/{index-Bl8-vKcf.js → index-DqRdsXVl.js} +1 -1
  63. package/lib/{index-jgZQQCfy.mjs → index-DuVadmtW.mjs} +18 -18
  64. package/lib/{index--8OR2IWG.mjs → index-SSdHQ2f1.mjs} +2 -2
  65. package/lib/{index-B_vsKDJm.js → index-X48SyxVx.js} +1 -1
  66. package/lib/{index-DdhKN5Tn.mjs → index-evqr6zVJ.mjs} +2 -2
  67. package/lib/{index-BxxpLnjr.mjs → index-hY0mf_OS.mjs} +26 -26
  68. package/lib/{index-mE3wnazE.js → index-oE-cAvjh.js} +1 -1
  69. package/lib/{index-Ci0O-yiU.js → index-oRg2LZn2.js} +1 -1
  70. package/lib/{index-D0RnzOoN.js → index-pIxA5tC9.js} +1 -1
  71. package/lib/{index-CnElB0dt.mjs → index-vZrnrwrk.mjs} +2 -2
  72. package/lib/{index.es-DbGYkQrs.js → index.es-CwS3KgtR.js} +2 -2
  73. package/lib/{index.es-DV6jIgX3.mjs → index.es-De3BB9Gs.mjs} +5 -5
  74. package/lib/index.js +1 -1
  75. package/lib/index.mjs +1 -1
  76. package/lib/{keccak-BvCC2Kx2.js → keccak-B1lZAzij.js} +1 -1
  77. package/lib/{keccak-C0uJwxei.mjs → keccak-BIkgLtG3.mjs} +1 -1
  78. package/lib/{libsodium-wrappers-BS68glUg.mjs → libsodium-wrappers-BVHsOzCM.mjs} +1 -1
  79. package/lib/{libsodium-wrappers-yq_uVk2-.js → libsodium-wrappers-G-nqImEg.js} +1 -1
  80. package/lib/{pako.esm-DZDXjYQj.js → pako.esm-Bp8XA5UR.js} +1 -1
  81. package/lib/{pako.esm-CWQc3qGc.mjs → pako.esm-CuMQ9lDX.mjs} +2 -2
  82. package/lib/{pbkdf2-DbRuCUvp.js → pbkdf2-DvmY7GlQ.js} +1 -1
  83. package/lib/{pbkdf2-B3V9L7S5.mjs → pbkdf2-QaxjQpDb.mjs} +1 -1
  84. package/lib/{sei-D3Eq9BDV.js → sei-B9drTJKa.js} +1 -1
  85. package/lib/{sei-Bty4vIw4.mjs → sei-DgoF7Bn_.mjs} +3 -3
  86. package/lib/{signer-Dw6nmaHE.js → signer-BEIw02y1.js} +1 -1
  87. package/lib/{signer-zHoIaQqc.mjs → signer-DNX7OGg4.mjs} +1 -1
  88. package/lib/solana-BRb7NfyR.js +1 -0
  89. package/lib/{solana-C-e817Or.mjs → solana-CoAz_ENY.mjs} +4 -4
  90. package/lib/solana-D2xBFYbL.mjs +16 -0
  91. package/lib/{solana-9m57XHRZ.js → solana-iqc7Fvik.js} +1 -1
  92. package/lib/{solanaEmbed.esm-ByzcN6RA.mjs → solanaEmbed.esm-D-2IZyVE.mjs} +3 -3
  93. package/lib/{solanaEmbed.esm-DBOgwSJE.js → solanaEmbed.esm-DjEXAVdT.js} +1 -1
  94. package/lib/{sui-B3dbw4a7.js → sui-CLKF35u2.js} +2 -2
  95. package/lib/{sui-CKgX0Mjn.mjs → sui-C_RZoPbB.mjs} +4 -4
  96. package/lib/{sui-rey0HjGu.mjs → sui-CrvrUATE.mjs} +1 -1
  97. package/lib/{sui-lQcSerf0.js → sui-qNwHoAbu.js} +1 -1
  98. package/lib/{unsignedTransaction-DcJyFS5R.js → unsignedTransaction-CJyRAIyq.js} +1 -1
  99. package/lib/{unsignedTransaction-sTI31PuJ.mjs → unsignedTransaction-XgGjCBSt.mjs} +2 -2
  100. package/package.json +1 -1
  101. package/lib/solana-CV7qftfl.mjs +0 -16
  102. package/lib/solana-GdBZhG_3.js +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("./index-CEovIwuS.js"),xu=require("./dijkstra-CtFxn7S9.js"),kt=require("./events-B2ZyXE4l.js"),F=require("./index-CVaT6qZW.js"),T=require("./index-ByOoS9NO.js");let Nu=class extends T.r{constructor(e){super(e),this.events=new kt.eventsExports.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async request(e,r){return this.requestStrict(T.formatJsonRpcRequest(e.method,e.params||[],e.id||T.getBigIntRpcId().toString()),r)}async requestStrict(e,r){return new Promise(async(i,n)=>{if(!this.connection.connected)try{await this.open()}catch(s){n(s)}this.events.on(`${e.id}`,s=>{T.isJsonRpcError(s)?n(s.error):i(s.result)});try{await this.connection.send(e,r)}catch(s){n(s)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),T.isJsonRpcResponse(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}};var Cu=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],i=0;i<t.rangeCount;i++)r.push(t.getRangeAt(i));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;break}return t.removeAllRanges(),function(){t.type==="Caret"&&t.removeAllRanges(),t.rangeCount||r.forEach(function(n){t.addRange(n)}),e&&e.focus()}},Ru=Cu,Bo={"text/plain":"Text","text/html":"Url",default:"Text"},Tu="Copy to clipboard: #{key}, Enter";function Pu(t){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}function Ou(t,e){var r,i,n,s,o,a,h=!1;e||(e={}),r=e.debug||!1;try{n=Ru(),s=document.createRange(),o=document.getSelection(),a=document.createElement("span"),a.textContent=t,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(f){if(f.stopPropagation(),e.format)if(f.preventDefault(),typeof f.clipboardData>"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var m=Bo[e.format]||Bo.default;window.clipboardData.setData(m,t)}else f.clipboardData.clearData(),f.clipboardData.setData(e.format,t);e.onCopy&&(f.preventDefault(),e.onCopy(f.clipboardData))}),document.body.appendChild(a),s.selectNodeContents(a),o.addRange(s);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");h=!0}catch(f){r&&console.error("unable to copy using execCommand: ",f),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),h=!0}catch(m){r&&console.error("unable to copy using clipboardData: ",m),r&&console.error("falling back to prompt"),i=Pu("message"in e?e.message:Tu),window.prompt(i,t)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(s):o.removeAllRanges()),a&&document.body.removeChild(a),n()}return h}var ku=Ou,Bu={}.toString,to=Array.isArray||function(t){return Bu.call(t)=="[object Array]"},Du=K.requireElliptic(),ro={},le={};Object.defineProperty(le,"__esModule",{value:!0});var kc=le.getLocalStorage=Vc=le.getLocalStorageOrThrow=Kc=le.getCrypto=jc=le.getCryptoOrThrow=zc=le.getLocation=$c=le.getLocationOrThrow=Uc=le.getNavigator=qc=le.getNavigatorOrThrow=Lc=le.getDocument=Fc=le.getDocumentOrThrow=Dc=le.getFromWindowOrThrow=Bc=le.getFromWindow=void 0;function Vr(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}var Bc=le.getFromWindow=Vr;function ui(t){const e=Vr(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}var Dc=le.getFromWindowOrThrow=ui;function Fu(){return ui("document")}var Fc=le.getDocumentOrThrow=Fu;function Lu(){return Vr("document")}var Lc=le.getDocument=Lu;function qu(){return ui("navigator")}var qc=le.getNavigatorOrThrow=qu;function Uu(){return Vr("navigator")}var Uc=le.getNavigator=Uu;function $u(){return ui("location")}var $c=le.getLocationOrThrow=$u;function zu(){return Vr("location")}var zc=le.getLocation=zu;function ju(){return ui("crypto")}var jc=le.getCryptoOrThrow=ju;function Ku(){return Vr("crypto")}var Kc=le.getCrypto=Ku;function Vu(){return ui("localStorage")}var Vc=le.getLocalStorageOrThrow=Vu;function Wu(){return Vr("localStorage")}kc=le.getLocalStorage=Wu;Object.defineProperty(ro,"__esModule",{value:!0});var Wc=ro.getWindowMetadata=void 0;const Do=le;function Hu(){let t,e;try{t=Do.getDocumentOrThrow(),e=Do.getLocationOrThrow()}catch{return null}function r(){const m=t.getElementsByTagName("link"),b=[];for(let v=0;v<m.length;v++){const E=m[v],x=E.getAttribute("rel");if(x&&x.toLowerCase().indexOf("icon")>-1){const S=E.getAttribute("href");if(S)if(S.toLowerCase().indexOf("https:")===-1&&S.toLowerCase().indexOf("http:")===-1&&S.indexOf("//")!==0){let N=e.protocol+"//"+e.host;if(S.indexOf("/")===0)N+=S;else{const R=e.pathname.split("/");R.pop();const O=R.join("/");N+=O+"/"+S}b.push(N)}else if(S.indexOf("//")===0){const N=e.protocol+S;b.push(N)}else b.push(S)}}return b}function i(...m){const b=t.getElementsByTagName("meta");for(let v=0;v<b.length;v++){const E=b[v],x=["itemprop","property","name"].map(S=>E.getAttribute(S)).filter(S=>S?m.includes(S):!1);if(x.length&&x){const S=E.getAttribute("content");if(S)return S}}return""}function n(){let m=i("name","og:site_name","og:title","twitter:title");return m||(m=t.title),m}function s(){return i("description","og:description","twitter:description","keywords")}const o=n(),a=s(),h=e.origin,u=r();return{description:a,url:h,icons:u,name:o}}Wc=ro.getWindowMetadata=Hu;var Ju=function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var i=Array(t),n=0,e=0;e<r;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,n++)i[n]=s[o];return i},Qu=function(){function t(e,r,i){this.name=e,this.version=r,this.os=i,this.type="browser"}return t}(),Gu=function(){function t(e){this.version=e,this.type="node",this.name="node",this.os=K.dist.process.platform}return t}(),Yu=function(){function t(e,r,i,n){this.name=e,this.version=r,this.os=i,this.bot=n,this.type="bot-device"}return t}(),Xu=function(){function t(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return t}(),Zu=function(){function t(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return t}(),ed=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,td=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Fo=3,rd=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",ed]],Lo=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function id(t){return t?qo(t):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new Zu:typeof navigator<"u"?qo(navigator.userAgent):od()}function nd(t){return t!==""&&rd.reduce(function(e,r){var i=r[0],n=r[1];if(e)return e;var s=n.exec(t);return!!s&&[i,s]},!1)}function qo(t){var e=nd(t);if(!e)return null;var r=e[0],i=e[1];if(r==="searchbot")return new Xu;var n=i[1]&&i[1].split(/[._]/).slice(0,3);n?n.length<Fo&&(n=Ju(n,ad(Fo-n.length))):n=[];var s=n.join("."),o=sd(t),a=td.exec(t);return a&&a[1]?new Yu(r,s,o,a[1]):new Qu(r,s,o)}function sd(t){for(var e=0,r=Lo.length;e<r;e++){var i=Lo[e],n=i[0],s=i[1],o=s.exec(t);if(o)return n}return null}function od(){var t=typeof K.dist.process<"u"&&K.dist.process.version;return t?new Gu(K.dist.process.version.slice(1)):null}function ad(t){for(var e=[],r=0;r<t;r++)e.push("0");return e}function io(t){return id(t)}function Tn(){const t=io();return t&&t.os?t.os:void 0}function Hc(){const t=Tn();return t?t.toLowerCase().includes("android"):!1}function Jc(){const t=Tn();return t?t.toLowerCase().includes("ios")||t.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function cd(){return Tn()?Hc()||Jc():!1}function Qc(){const t=io();return t&&t.name?t.name.toLowerCase()==="node":!1}function hd(){return!Qc()&&!!Gc()}const ld=Bc,ud=Dc,dd=Fc,fd=Lc,pd=qc,Gc=Uc,gd=$c,md=zc,yd=jc,vd=Kc,wd=Vc,Pn=kc;function _d(){return Wc()}function bd(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return JSON.parse(t)}catch{return t}}function Ad(t){return typeof t=="string"?t:JSON.stringify(t)}const Yc=bd,Xc=Ad;function Zc(t,e){const r=Xc(e),i=Pn();i&&i.setItem(t,r)}function Ed(t){let e=null,r=null;const i=Pn();return i&&(r=i.getItem(t)),e=r&&Yc(r),e}function Sd(t){const e=Pn();e&&e.removeItem(t)}const eh="WALLETCONNECT_DEEPLINK_CHOICE";function Id(t,e){const r=encodeURIComponent(t);return e.universalLink?`${e.universalLink}/wc?uri=${r}`:e.deepLink?`${e.deepLink}${e.deepLink.endsWith(":")?"//":"/"}wc?uri=${r}`:""}function Md(t){const e=t.href.split("?")[0];Zc(eh,Object.assign(Object.assign({},t),{href:e}))}function th(t,e){return t.filter(r=>r.name.toLowerCase().includes(e.toLowerCase()))[0]}function xd(t,e){let r=t;return e&&(r=e.map(i=>th(t,i)).filter(Boolean)),r}const rh="https://registry.walletconnect.com";function Nd(){return rh+"/api/v2/wallets"}function Cd(){return rh+"/api/v2/dapps"}function ih(t,e="mobile"){var r;return{name:t.name||"",shortName:t.metadata.shortName||"",color:t.metadata.colors.primary||"",logo:(r=t.image_url.sm)!==null&&r!==void 0?r:"",universalLink:t[e].universal||"",deepLink:t[e].native||""}}function Rd(t,e="mobile"){return Object.values(t).filter(r=>!!r[e].universal||!!r[e].native).map(r=>ih(r,e))}const Td=Object.freeze(Object.defineProperty({__proto__:null,detectEnv:io,detectOS:Tn,formatIOSMobile:Id,formatMobileRegistry:Rd,formatMobileRegistryEntry:ih,getClientMeta:_d,getCrypto:vd,getCryptoOrThrow:yd,getDappRegistryUrl:Cd,getDocument:fd,getDocumentOrThrow:dd,getFromWindow:ld,getFromWindowOrThrow:ud,getLocal:Ed,getLocalStorage:Pn,getLocalStorageOrThrow:wd,getLocation:md,getLocationOrThrow:gd,getMobileLinkRegistry:xd,getMobileRegistryEntry:th,getNavigator:Gc,getNavigatorOrThrow:pd,getWalletRegistryUrl:Nd,isAndroid:Hc,isBrowser:hd,isIOS:Jc,isMobile:cd,isNode:Qc,mobileLinkChoiceKey:eh,removeLocal:Sd,safeJsonParse:Yc,safeJsonStringify:Xc,saveMobileLinkInfo:Md,setLocal:Zc},Symbol.toStringTag,{value:"Module"})),Pd=K.getAugmentedNamespace(Td);var Wi={},Od=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},nh={},_r={},kd=to;function Bd(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},t.foo()===42}catch{return!1}}ne.TYPED_ARRAY_SUPPORT=Bd();var Uo=ne.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function ne(t,e,r){return!ne.TYPED_ARRAY_SUPPORT&&!(this instanceof ne)?new ne(t,e,r):typeof t=="number"?sh(this,t):zd(this,t,e,r)}ne.TYPED_ARRAY_SUPPORT&&(ne.prototype.__proto__=Uint8Array.prototype,ne.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&ne[Symbol.species]===ne&&Object.defineProperty(ne,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function no(t){if(t>=Uo)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Uo.toString(16)+" bytes");return t|0}function Dd(t){return t!==t}function ii(t,e){var r;return ne.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=ne.prototype):(r=t,r===null&&(r=new ne(e)),r.length=e),r}function sh(t,e){var r=ii(t,e<0?0:no(e)|0);if(!ne.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)r[i]=0;return r}function Fd(t,e){var r=ah(e)|0,i=ii(t,r),n=i.write(e);return n!==r&&(i=i.slice(0,n)),i}function ks(t,e){for(var r=e.length<0?0:no(e.length)|0,i=ii(t,r),n=0;n<r;n+=1)i[n]=e[n]&255;return i}function Ld(t,e,r,i){if(r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");var n;return r===void 0&&i===void 0?n=new Uint8Array(e):i===void 0?n=new Uint8Array(e,r):n=new Uint8Array(e,r,i),ne.TYPED_ARRAY_SUPPORT?n.__proto__=ne.prototype:n=ks(t,n),n}function qd(t,e){if(ne.isBuffer(e)){var r=no(e.length)|0,i=ii(t,r);return i.length===0||e.copy(i,0,0,r),i}if(e){if(typeof ArrayBuffer<"u"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||Dd(e.length)?ii(t,0):ks(t,e);if(e.type==="Buffer"&&Array.isArray(e.data))return ks(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function oh(t,e){e=e||1/0;for(var r,i=t.length,n=null,s=[],o=0;o<i;++o){if(r=t.charCodeAt(o),r>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(o+1===i){(e-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(e-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return s}function ah(t){if(ne.isBuffer(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var e=t.length;return e===0?0:oh(t).length}function Ud(t,e,r,i){for(var n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function $d(t,e,r,i){return Ud(oh(e,t.length-r),t,r,i)}function zd(t,e,r,i){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?Ld(t,e,r,i):typeof e=="string"?Fd(t,e):qd(t,e)}ne.prototype.write=function(e,r,i){r===void 0?(i=this.length,r=0):i===void 0&&typeof r=="string"?(i=this.length,r=0):isFinite(r)&&(r=r|0,isFinite(i)?i=i|0:i=void 0);var n=this.length-r;if((i===void 0||i>n)&&(i=n),e.length>0&&(i<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");return $d(this,e,r,i)};ne.prototype.slice=function(e,r){var i=this.length;e=~~e,r=r===void 0?i:~~r,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),r<e&&(r=e);var n;if(ne.TYPED_ARRAY_SUPPORT)n=this.subarray(e,r),n.__proto__=ne.prototype;else{var s=r-e;n=new ne(s,void 0);for(var o=0;o<s;++o)n[o]=this[o+e]}return n};ne.prototype.copy=function(e,r,i,n){if(i||(i=0),!n&&n!==0&&(n=this.length),r>=e.length&&(r=e.length),r||(r=0),n>0&&n<i&&(n=i),n===i||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-r<n-i&&(n=e.length-r+i);var s=n-i,o;if(this===e&&i<r&&r<n)for(o=s-1;o>=0;--o)e[o+r]=this[o+i];else if(s<1e3||!ne.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+r]=this[o+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+s),r);return s};ne.prototype.fill=function(e,r,i){if(typeof e=="string"){if(typeof r=="string"?(r=0,i=this.length):typeof i=="string"&&(i=this.length),e.length===1){var n=e.charCodeAt(0);n<256&&(e=n)}}else typeof e=="number"&&(e=e&255);if(r<0||this.length<r||this.length<i)throw new RangeError("Out of range index");if(i<=r)return this;r=r>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);var s;if(typeof e=="number")for(s=r;s<i;++s)this[s]=e;else{var o=ne.isBuffer(e)?e:new ne(e),a=o.length;for(s=0;s<i-r;++s)this[s+r]=o[s%a]}return this};ne.concat=function(e,r){if(!kd(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return ii(null,0);var i;if(r===void 0)for(r=0,i=0;i<e.length;++i)r+=e[i].length;var n=sh(null,r),s=0;for(i=0;i<e.length;++i){var o=e[i];if(!ne.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,s),s+=o.length}return n};ne.byteLength=ah;ne.prototype._isBuffer=!0;ne.isBuffer=function(e){return!!(e!=null&&e._isBuffer)};_r.alloc=function(t){var e=new ne(t);return e.fill(0),e};_r.from=function(t){return new ne(t)};var wt={},so,jd=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];wt.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};wt.getSymbolTotalCodewords=function(e){return jd[e]};wt.getBCHDigit=function(t){for(var e=0;t!==0;)e++,t>>>=1;return e};wt.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');so=e};wt.isKanjiModeEnabled=function(){return typeof so<"u"};wt.toSJIS=function(e){return so(e)};var On={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(r){if(typeof r!="string")throw new Error("Param is not a string");var i=r.toLowerCase();switch(i){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+r)}}t.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},t.from=function(i,n){if(t.isValid(i))return i;try{return e(i)}catch{return n}}})(On);function ch(){this.buffer=[],this.length=0}ch.prototype={get:function(t){var e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(var r=0;r<e;r++)this.putBit((t>>>e-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Kd=ch,$o=_r;function Hi(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=$o.alloc(t*t),this.reservedBit=$o.alloc(t*t)}Hi.prototype.set=function(t,e,r,i){var n=t*this.size+e;this.data[n]=r,i&&(this.reservedBit[n]=!0)};Hi.prototype.get=function(t,e){return this.data[t*this.size+e]};Hi.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r};Hi.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var Vd=Hi,hh={};(function(t){var e=wt.getSymbolSize;t.getRowColCoords=function(i){if(i===1)return[];for(var n=Math.floor(i/7)+2,s=e(i),o=s===145?26:Math.ceil((s-13)/(2*n-2))*2,a=[s-7],h=1;h<n-1;h++)a[h]=a[h-1]-o;return a.push(6),a.reverse()},t.getPositions=function(i){for(var n=[],s=t.getRowColCoords(i),o=s.length,a=0;a<o;a++)for(var h=0;h<o;h++)a===0&&h===0||a===0&&h===o-1||a===o-1&&h===0||n.push([s[a],s[h]]);return n}})(hh);var lh={},Wd=wt.getSymbolSize,zo=7;lh.getPositions=function(e){var r=Wd(e);return[[0,0],[r-zo,0],[0,r-zo]]};var uh={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},t.from=function(n){return t.isValid(n)?parseInt(n,10):void 0},t.getPenaltyN1=function(n){for(var s=n.size,o=0,a=0,h=0,u=null,f=null,m=0;m<s;m++){a=h=0,u=f=null;for(var b=0;b<s;b++){var v=n.get(m,b);v===u?a++:(a>=5&&(o+=e.N1+(a-5)),u=v,a=1),v=n.get(b,m),v===f?h++:(h>=5&&(o+=e.N1+(h-5)),f=v,h=1)}a>=5&&(o+=e.N1+(a-5)),h>=5&&(o+=e.N1+(h-5))}return o},t.getPenaltyN2=function(n){for(var s=n.size,o=0,a=0;a<s-1;a++)for(var h=0;h<s-1;h++){var u=n.get(a,h)+n.get(a,h+1)+n.get(a+1,h)+n.get(a+1,h+1);(u===4||u===0)&&o++}return o*e.N2},t.getPenaltyN3=function(n){for(var s=n.size,o=0,a=0,h=0,u=0;u<s;u++){a=h=0;for(var f=0;f<s;f++)a=a<<1&2047|n.get(u,f),f>=10&&(a===1488||a===93)&&o++,h=h<<1&2047|n.get(f,u),f>=10&&(h===1488||h===93)&&o++}return o*e.N3},t.getPenaltyN4=function(n){for(var s=0,o=n.data.length,a=0;a<o;a++)s+=n.data[a];var h=Math.abs(Math.ceil(s*100/o/5)-10);return h*e.N4};function r(i,n,s){switch(i){case t.Patterns.PATTERN000:return(n+s)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return s%3===0;case t.Patterns.PATTERN011:return(n+s)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(s/3))%2===0;case t.Patterns.PATTERN101:return n*s%2+n*s%3===0;case t.Patterns.PATTERN110:return(n*s%2+n*s%3)%2===0;case t.Patterns.PATTERN111:return(n*s%3+(n+s)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}t.applyMask=function(n,s){for(var o=s.size,a=0;a<o;a++)for(var h=0;h<o;h++)s.isReserved(h,a)||s.xor(h,a,r(n,h,a))},t.getBestMask=function(n,s){for(var o=Object.keys(t.Patterns).length,a=0,h=1/0,u=0;u<o;u++){s(u),t.applyMask(u,n);var f=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(u,n),f<h&&(h=f,a=u)}return a}})(uh);var kn={},yr=On,rn=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],nn=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];kn.getBlocksCount=function(e,r){switch(r){case yr.L:return rn[(e-1)*4+0];case yr.M:return rn[(e-1)*4+1];case yr.Q:return rn[(e-1)*4+2];case yr.H:return rn[(e-1)*4+3];default:return}};kn.getTotalCodewordsCount=function(e,r){switch(r){case yr.L:return nn[(e-1)*4+0];case yr.M:return nn[(e-1)*4+1];case yr.Q:return nn[(e-1)*4+2];case yr.H:return nn[(e-1)*4+3];default:return}};var dh={},Bn={},fh=_r,Oi=fh.alloc(512),vn=fh.alloc(256);(function(){for(var e=1,r=0;r<255;r++)Oi[r]=e,vn[e]=r,e<<=1,e&256&&(e^=285);for(r=255;r<512;r++)Oi[r]=Oi[r-255]})();Bn.log=function(e){if(e<1)throw new Error("log("+e+")");return vn[e]};Bn.exp=function(e){return Oi[e]};Bn.mul=function(e,r){return e===0||r===0?0:Oi[vn[e]+vn[r]]};(function(t){var e=_r,r=Bn;t.mul=function(n,s){for(var o=e.alloc(n.length+s.length-1),a=0;a<n.length;a++)for(var h=0;h<s.length;h++)o[a+h]^=r.mul(n[a],s[h]);return o},t.mod=function(n,s){for(var o=e.from(n);o.length-s.length>=0;){for(var a=o[0],h=0;h<s.length;h++)o[h]^=r.mul(s[h],a);for(var u=0;u<o.length&&o[u]===0;)u++;o=o.slice(u)}return o},t.generateECPolynomial=function(n){for(var s=e.from([1]),o=0;o<n;o++)s=t.mul(s,[1,r.exp(o)]);return s}})(dh);var jo=_r,ph=dh,Hd=K.bufferPolyfill.Buffer;function oo(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}oo.prototype.initialize=function(e){this.degree=e,this.genPoly=ph.generateECPolynomial(this.degree)};oo.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");var r=jo.alloc(this.degree),i=Hd.concat([e,r],e.length+this.degree),n=ph.mod(i,this.genPoly),s=this.degree-n.length;if(s>0){var o=jo.alloc(this.degree);return n.copy(o,s),o}return n};var Jd=oo,gh={},br={},ao={};ao.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Ht={},mh="[0-9]+",Qd="[A-Z $%*+\\-./:]+",Ui="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Ui=Ui.replace(/u/g,"\\u");var Gd="(?:(?![A-Z0-9 $%*+\\-./:]|"+Ui+`)(?:.|[\r
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("./index-BU_DiszY.js"),xu=require("./dijkstra-CtFxn7S9.js"),kt=require("./events-DSOd4gvB.js"),F=require("./index-C6PC2n3L.js"),T=require("./index-BLp_eTrc.js");let Nu=class extends T.r{constructor(e){super(e),this.events=new kt.eventsExports.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,r){this.events.on(e,r)}once(e,r){this.events.once(e,r)}off(e,r){this.events.off(e,r)}removeListener(e,r){this.events.removeListener(e,r)}async request(e,r){return this.requestStrict(T.formatJsonRpcRequest(e.method,e.params||[],e.id||T.getBigIntRpcId().toString()),r)}async requestStrict(e,r){return new Promise(async(i,n)=>{if(!this.connection.connected)try{await this.open()}catch(s){n(s)}this.events.on(`${e.id}`,s=>{T.isJsonRpcError(s)?n(s.error):i(s.result)});try{await this.connection.send(e,r)}catch(s){n(s)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),T.isJsonRpcResponse(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&e.code===3e3&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),typeof e=="string"&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}};var Cu=function(){var t=document.getSelection();if(!t.rangeCount)return function(){};for(var e=document.activeElement,r=[],i=0;i<t.rangeCount;i++)r.push(t.getRangeAt(i));switch(e.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":e.blur();break;default:e=null;break}return t.removeAllRanges(),function(){t.type==="Caret"&&t.removeAllRanges(),t.rangeCount||r.forEach(function(n){t.addRange(n)}),e&&e.focus()}},Ru=Cu,Bo={"text/plain":"Text","text/html":"Url",default:"Text"},Tu="Copy to clipboard: #{key}, Enter";function Pu(t){var e=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return t.replace(/#{\s*key\s*}/g,e)}function Ou(t,e){var r,i,n,s,o,a,h=!1;e||(e={}),r=e.debug||!1;try{n=Ru(),s=document.createRange(),o=document.getSelection(),a=document.createElement("span"),a.textContent=t,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(f){if(f.stopPropagation(),e.format)if(f.preventDefault(),typeof f.clipboardData>"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var m=Bo[e.format]||Bo.default;window.clipboardData.setData(m,t)}else f.clipboardData.clearData(),f.clipboardData.setData(e.format,t);e.onCopy&&(f.preventDefault(),e.onCopy(f.clipboardData))}),document.body.appendChild(a),s.selectNodeContents(a),o.addRange(s);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");h=!0}catch(f){r&&console.error("unable to copy using execCommand: ",f),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),h=!0}catch(m){r&&console.error("unable to copy using clipboardData: ",m),r&&console.error("falling back to prompt"),i=Pu("message"in e?e.message:Tu),window.prompt(i,t)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(s):o.removeAllRanges()),a&&document.body.removeChild(a),n()}return h}var ku=Ou,Bu={}.toString,to=Array.isArray||function(t){return Bu.call(t)=="[object Array]"},Du=K.requireElliptic(),ro={},le={};Object.defineProperty(le,"__esModule",{value:!0});var kc=le.getLocalStorage=Vc=le.getLocalStorageOrThrow=Kc=le.getCrypto=jc=le.getCryptoOrThrow=zc=le.getLocation=$c=le.getLocationOrThrow=Uc=le.getNavigator=qc=le.getNavigatorOrThrow=Lc=le.getDocument=Fc=le.getDocumentOrThrow=Dc=le.getFromWindowOrThrow=Bc=le.getFromWindow=void 0;function Vr(t){let e;return typeof window<"u"&&typeof window[t]<"u"&&(e=window[t]),e}var Bc=le.getFromWindow=Vr;function ui(t){const e=Vr(t);if(!e)throw new Error(`${t} is not defined in Window`);return e}var Dc=le.getFromWindowOrThrow=ui;function Fu(){return ui("document")}var Fc=le.getDocumentOrThrow=Fu;function Lu(){return Vr("document")}var Lc=le.getDocument=Lu;function qu(){return ui("navigator")}var qc=le.getNavigatorOrThrow=qu;function Uu(){return Vr("navigator")}var Uc=le.getNavigator=Uu;function $u(){return ui("location")}var $c=le.getLocationOrThrow=$u;function zu(){return Vr("location")}var zc=le.getLocation=zu;function ju(){return ui("crypto")}var jc=le.getCryptoOrThrow=ju;function Ku(){return Vr("crypto")}var Kc=le.getCrypto=Ku;function Vu(){return ui("localStorage")}var Vc=le.getLocalStorageOrThrow=Vu;function Wu(){return Vr("localStorage")}kc=le.getLocalStorage=Wu;Object.defineProperty(ro,"__esModule",{value:!0});var Wc=ro.getWindowMetadata=void 0;const Do=le;function Hu(){let t,e;try{t=Do.getDocumentOrThrow(),e=Do.getLocationOrThrow()}catch{return null}function r(){const m=t.getElementsByTagName("link"),b=[];for(let v=0;v<m.length;v++){const E=m[v],x=E.getAttribute("rel");if(x&&x.toLowerCase().indexOf("icon")>-1){const S=E.getAttribute("href");if(S)if(S.toLowerCase().indexOf("https:")===-1&&S.toLowerCase().indexOf("http:")===-1&&S.indexOf("//")!==0){let N=e.protocol+"//"+e.host;if(S.indexOf("/")===0)N+=S;else{const R=e.pathname.split("/");R.pop();const O=R.join("/");N+=O+"/"+S}b.push(N)}else if(S.indexOf("//")===0){const N=e.protocol+S;b.push(N)}else b.push(S)}}return b}function i(...m){const b=t.getElementsByTagName("meta");for(let v=0;v<b.length;v++){const E=b[v],x=["itemprop","property","name"].map(S=>E.getAttribute(S)).filter(S=>S?m.includes(S):!1);if(x.length&&x){const S=E.getAttribute("content");if(S)return S}}return""}function n(){let m=i("name","og:site_name","og:title","twitter:title");return m||(m=t.title),m}function s(){return i("description","og:description","twitter:description","keywords")}const o=n(),a=s(),h=e.origin,u=r();return{description:a,url:h,icons:u,name:o}}Wc=ro.getWindowMetadata=Hu;var Ju=function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var i=Array(t),n=0,e=0;e<r;e++)for(var s=arguments[e],o=0,a=s.length;o<a;o++,n++)i[n]=s[o];return i},Qu=function(){function t(e,r,i){this.name=e,this.version=r,this.os=i,this.type="browser"}return t}(),Gu=function(){function t(e){this.version=e,this.type="node",this.name="node",this.os=K.dist.process.platform}return t}(),Yu=function(){function t(e,r,i,n){this.name=e,this.version=r,this.os=i,this.bot=n,this.type="bot-device"}return t}(),Xu=function(){function t(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return t}(),Zu=function(){function t(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return t}(),ed=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,td=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Fo=3,rd=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",ed]],Lo=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function id(t){return t?qo(t):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new Zu:typeof navigator<"u"?qo(navigator.userAgent):od()}function nd(t){return t!==""&&rd.reduce(function(e,r){var i=r[0],n=r[1];if(e)return e;var s=n.exec(t);return!!s&&[i,s]},!1)}function qo(t){var e=nd(t);if(!e)return null;var r=e[0],i=e[1];if(r==="searchbot")return new Xu;var n=i[1]&&i[1].split(/[._]/).slice(0,3);n?n.length<Fo&&(n=Ju(n,ad(Fo-n.length))):n=[];var s=n.join("."),o=sd(t),a=td.exec(t);return a&&a[1]?new Yu(r,s,o,a[1]):new Qu(r,s,o)}function sd(t){for(var e=0,r=Lo.length;e<r;e++){var i=Lo[e],n=i[0],s=i[1],o=s.exec(t);if(o)return n}return null}function od(){var t=typeof K.dist.process<"u"&&K.dist.process.version;return t?new Gu(K.dist.process.version.slice(1)):null}function ad(t){for(var e=[],r=0;r<t;r++)e.push("0");return e}function io(t){return id(t)}function Tn(){const t=io();return t&&t.os?t.os:void 0}function Hc(){const t=Tn();return t?t.toLowerCase().includes("android"):!1}function Jc(){const t=Tn();return t?t.toLowerCase().includes("ios")||t.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function cd(){return Tn()?Hc()||Jc():!1}function Qc(){const t=io();return t&&t.name?t.name.toLowerCase()==="node":!1}function hd(){return!Qc()&&!!Gc()}const ld=Bc,ud=Dc,dd=Fc,fd=Lc,pd=qc,Gc=Uc,gd=$c,md=zc,yd=jc,vd=Kc,wd=Vc,Pn=kc;function _d(){return Wc()}function bd(t){if(typeof t!="string")throw new Error(`Cannot safe json parse value of type ${typeof t}`);try{return JSON.parse(t)}catch{return t}}function Ad(t){return typeof t=="string"?t:JSON.stringify(t)}const Yc=bd,Xc=Ad;function Zc(t,e){const r=Xc(e),i=Pn();i&&i.setItem(t,r)}function Ed(t){let e=null,r=null;const i=Pn();return i&&(r=i.getItem(t)),e=r&&Yc(r),e}function Sd(t){const e=Pn();e&&e.removeItem(t)}const eh="WALLETCONNECT_DEEPLINK_CHOICE";function Id(t,e){const r=encodeURIComponent(t);return e.universalLink?`${e.universalLink}/wc?uri=${r}`:e.deepLink?`${e.deepLink}${e.deepLink.endsWith(":")?"//":"/"}wc?uri=${r}`:""}function Md(t){const e=t.href.split("?")[0];Zc(eh,Object.assign(Object.assign({},t),{href:e}))}function th(t,e){return t.filter(r=>r.name.toLowerCase().includes(e.toLowerCase()))[0]}function xd(t,e){let r=t;return e&&(r=e.map(i=>th(t,i)).filter(Boolean)),r}const rh="https://registry.walletconnect.com";function Nd(){return rh+"/api/v2/wallets"}function Cd(){return rh+"/api/v2/dapps"}function ih(t,e="mobile"){var r;return{name:t.name||"",shortName:t.metadata.shortName||"",color:t.metadata.colors.primary||"",logo:(r=t.image_url.sm)!==null&&r!==void 0?r:"",universalLink:t[e].universal||"",deepLink:t[e].native||""}}function Rd(t,e="mobile"){return Object.values(t).filter(r=>!!r[e].universal||!!r[e].native).map(r=>ih(r,e))}const Td=Object.freeze(Object.defineProperty({__proto__:null,detectEnv:io,detectOS:Tn,formatIOSMobile:Id,formatMobileRegistry:Rd,formatMobileRegistryEntry:ih,getClientMeta:_d,getCrypto:vd,getCryptoOrThrow:yd,getDappRegistryUrl:Cd,getDocument:fd,getDocumentOrThrow:dd,getFromWindow:ld,getFromWindowOrThrow:ud,getLocal:Ed,getLocalStorage:Pn,getLocalStorageOrThrow:wd,getLocation:md,getLocationOrThrow:gd,getMobileLinkRegistry:xd,getMobileRegistryEntry:th,getNavigator:Gc,getNavigatorOrThrow:pd,getWalletRegistryUrl:Nd,isAndroid:Hc,isBrowser:hd,isIOS:Jc,isMobile:cd,isNode:Qc,mobileLinkChoiceKey:eh,removeLocal:Sd,safeJsonParse:Yc,safeJsonStringify:Xc,saveMobileLinkInfo:Md,setLocal:Zc},Symbol.toStringTag,{value:"Module"})),Pd=K.getAugmentedNamespace(Td);var Wi={},Od=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},nh={},_r={},kd=to;function Bd(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},t.foo()===42}catch{return!1}}ne.TYPED_ARRAY_SUPPORT=Bd();var Uo=ne.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function ne(t,e,r){return!ne.TYPED_ARRAY_SUPPORT&&!(this instanceof ne)?new ne(t,e,r):typeof t=="number"?sh(this,t):zd(this,t,e,r)}ne.TYPED_ARRAY_SUPPORT&&(ne.prototype.__proto__=Uint8Array.prototype,ne.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&ne[Symbol.species]===ne&&Object.defineProperty(ne,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function no(t){if(t>=Uo)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Uo.toString(16)+" bytes");return t|0}function Dd(t){return t!==t}function ii(t,e){var r;return ne.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=ne.prototype):(r=t,r===null&&(r=new ne(e)),r.length=e),r}function sh(t,e){var r=ii(t,e<0?0:no(e)|0);if(!ne.TYPED_ARRAY_SUPPORT)for(var i=0;i<e;++i)r[i]=0;return r}function Fd(t,e){var r=ah(e)|0,i=ii(t,r),n=i.write(e);return n!==r&&(i=i.slice(0,n)),i}function ks(t,e){for(var r=e.length<0?0:no(e.length)|0,i=ii(t,r),n=0;n<r;n+=1)i[n]=e[n]&255;return i}function Ld(t,e,r,i){if(r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(i||0))throw new RangeError("'length' is out of bounds");var n;return r===void 0&&i===void 0?n=new Uint8Array(e):i===void 0?n=new Uint8Array(e,r):n=new Uint8Array(e,r,i),ne.TYPED_ARRAY_SUPPORT?n.__proto__=ne.prototype:n=ks(t,n),n}function qd(t,e){if(ne.isBuffer(e)){var r=no(e.length)|0,i=ii(t,r);return i.length===0||e.copy(i,0,0,r),i}if(e){if(typeof ArrayBuffer<"u"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||Dd(e.length)?ii(t,0):ks(t,e);if(e.type==="Buffer"&&Array.isArray(e.data))return ks(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function oh(t,e){e=e||1/0;for(var r,i=t.length,n=null,s=[],o=0;o<i;++o){if(r=t.charCodeAt(o),r>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}else if(o+1===i){(e-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(e-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return s}function ah(t){if(ne.isBuffer(t))return t.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;typeof t!="string"&&(t=""+t);var e=t.length;return e===0?0:oh(t).length}function Ud(t,e,r,i){for(var n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function $d(t,e,r,i){return Ud(oh(e,t.length-r),t,r,i)}function zd(t,e,r,i){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?Ld(t,e,r,i):typeof e=="string"?Fd(t,e):qd(t,e)}ne.prototype.write=function(e,r,i){r===void 0?(i=this.length,r=0):i===void 0&&typeof r=="string"?(i=this.length,r=0):isFinite(r)&&(r=r|0,isFinite(i)?i=i|0:i=void 0);var n=this.length-r;if((i===void 0||i>n)&&(i=n),e.length>0&&(i<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");return $d(this,e,r,i)};ne.prototype.slice=function(e,r){var i=this.length;e=~~e,r=r===void 0?i:~~r,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),r<e&&(r=e);var n;if(ne.TYPED_ARRAY_SUPPORT)n=this.subarray(e,r),n.__proto__=ne.prototype;else{var s=r-e;n=new ne(s,void 0);for(var o=0;o<s;++o)n[o]=this[o+e]}return n};ne.prototype.copy=function(e,r,i,n){if(i||(i=0),!n&&n!==0&&(n=this.length),r>=e.length&&(r=e.length),r||(r=0),n>0&&n<i&&(n=i),n===i||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-r<n-i&&(n=e.length-r+i);var s=n-i,o;if(this===e&&i<r&&r<n)for(o=s-1;o>=0;--o)e[o+r]=this[o+i];else if(s<1e3||!ne.TYPED_ARRAY_SUPPORT)for(o=0;o<s;++o)e[o+r]=this[o+i];else Uint8Array.prototype.set.call(e,this.subarray(i,i+s),r);return s};ne.prototype.fill=function(e,r,i){if(typeof e=="string"){if(typeof r=="string"?(r=0,i=this.length):typeof i=="string"&&(i=this.length),e.length===1){var n=e.charCodeAt(0);n<256&&(e=n)}}else typeof e=="number"&&(e=e&255);if(r<0||this.length<r||this.length<i)throw new RangeError("Out of range index");if(i<=r)return this;r=r>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);var s;if(typeof e=="number")for(s=r;s<i;++s)this[s]=e;else{var o=ne.isBuffer(e)?e:new ne(e),a=o.length;for(s=0;s<i-r;++s)this[s+r]=o[s%a]}return this};ne.concat=function(e,r){if(!kd(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return ii(null,0);var i;if(r===void 0)for(r=0,i=0;i<e.length;++i)r+=e[i].length;var n=sh(null,r),s=0;for(i=0;i<e.length;++i){var o=e[i];if(!ne.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,s),s+=o.length}return n};ne.byteLength=ah;ne.prototype._isBuffer=!0;ne.isBuffer=function(e){return!!(e!=null&&e._isBuffer)};_r.alloc=function(t){var e=new ne(t);return e.fill(0),e};_r.from=function(t){return new ne(t)};var wt={},so,jd=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];wt.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};wt.getSymbolTotalCodewords=function(e){return jd[e]};wt.getBCHDigit=function(t){for(var e=0;t!==0;)e++,t>>>=1;return e};wt.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');so=e};wt.isKanjiModeEnabled=function(){return typeof so<"u"};wt.toSJIS=function(e){return so(e)};var On={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(r){if(typeof r!="string")throw new Error("Param is not a string");var i=r.toLowerCase();switch(i){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+r)}}t.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},t.from=function(i,n){if(t.isValid(i))return i;try{return e(i)}catch{return n}}})(On);function ch(){this.buffer=[],this.length=0}ch.prototype={get:function(t){var e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(var r=0;r<e;r++)this.putBit((t>>>e-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var Kd=ch,$o=_r;function Hi(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=$o.alloc(t*t),this.reservedBit=$o.alloc(t*t)}Hi.prototype.set=function(t,e,r,i){var n=t*this.size+e;this.data[n]=r,i&&(this.reservedBit[n]=!0)};Hi.prototype.get=function(t,e){return this.data[t*this.size+e]};Hi.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r};Hi.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var Vd=Hi,hh={};(function(t){var e=wt.getSymbolSize;t.getRowColCoords=function(i){if(i===1)return[];for(var n=Math.floor(i/7)+2,s=e(i),o=s===145?26:Math.ceil((s-13)/(2*n-2))*2,a=[s-7],h=1;h<n-1;h++)a[h]=a[h-1]-o;return a.push(6),a.reverse()},t.getPositions=function(i){for(var n=[],s=t.getRowColCoords(i),o=s.length,a=0;a<o;a++)for(var h=0;h<o;h++)a===0&&h===0||a===0&&h===o-1||a===o-1&&h===0||n.push([s[a],s[h]]);return n}})(hh);var lh={},Wd=wt.getSymbolSize,zo=7;lh.getPositions=function(e){var r=Wd(e);return[[0,0],[r-zo,0],[0,r-zo]]};var uh={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},t.from=function(n){return t.isValid(n)?parseInt(n,10):void 0},t.getPenaltyN1=function(n){for(var s=n.size,o=0,a=0,h=0,u=null,f=null,m=0;m<s;m++){a=h=0,u=f=null;for(var b=0;b<s;b++){var v=n.get(m,b);v===u?a++:(a>=5&&(o+=e.N1+(a-5)),u=v,a=1),v=n.get(b,m),v===f?h++:(h>=5&&(o+=e.N1+(h-5)),f=v,h=1)}a>=5&&(o+=e.N1+(a-5)),h>=5&&(o+=e.N1+(h-5))}return o},t.getPenaltyN2=function(n){for(var s=n.size,o=0,a=0;a<s-1;a++)for(var h=0;h<s-1;h++){var u=n.get(a,h)+n.get(a,h+1)+n.get(a+1,h)+n.get(a+1,h+1);(u===4||u===0)&&o++}return o*e.N2},t.getPenaltyN3=function(n){for(var s=n.size,o=0,a=0,h=0,u=0;u<s;u++){a=h=0;for(var f=0;f<s;f++)a=a<<1&2047|n.get(u,f),f>=10&&(a===1488||a===93)&&o++,h=h<<1&2047|n.get(f,u),f>=10&&(h===1488||h===93)&&o++}return o*e.N3},t.getPenaltyN4=function(n){for(var s=0,o=n.data.length,a=0;a<o;a++)s+=n.data[a];var h=Math.abs(Math.ceil(s*100/o/5)-10);return h*e.N4};function r(i,n,s){switch(i){case t.Patterns.PATTERN000:return(n+s)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return s%3===0;case t.Patterns.PATTERN011:return(n+s)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(s/3))%2===0;case t.Patterns.PATTERN101:return n*s%2+n*s%3===0;case t.Patterns.PATTERN110:return(n*s%2+n*s%3)%2===0;case t.Patterns.PATTERN111:return(n*s%3+(n+s)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}t.applyMask=function(n,s){for(var o=s.size,a=0;a<o;a++)for(var h=0;h<o;h++)s.isReserved(h,a)||s.xor(h,a,r(n,h,a))},t.getBestMask=function(n,s){for(var o=Object.keys(t.Patterns).length,a=0,h=1/0,u=0;u<o;u++){s(u),t.applyMask(u,n);var f=t.getPenaltyN1(n)+t.getPenaltyN2(n)+t.getPenaltyN3(n)+t.getPenaltyN4(n);t.applyMask(u,n),f<h&&(h=f,a=u)}return a}})(uh);var kn={},yr=On,rn=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],nn=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];kn.getBlocksCount=function(e,r){switch(r){case yr.L:return rn[(e-1)*4+0];case yr.M:return rn[(e-1)*4+1];case yr.Q:return rn[(e-1)*4+2];case yr.H:return rn[(e-1)*4+3];default:return}};kn.getTotalCodewordsCount=function(e,r){switch(r){case yr.L:return nn[(e-1)*4+0];case yr.M:return nn[(e-1)*4+1];case yr.Q:return nn[(e-1)*4+2];case yr.H:return nn[(e-1)*4+3];default:return}};var dh={},Bn={},fh=_r,Oi=fh.alloc(512),vn=fh.alloc(256);(function(){for(var e=1,r=0;r<255;r++)Oi[r]=e,vn[e]=r,e<<=1,e&256&&(e^=285);for(r=255;r<512;r++)Oi[r]=Oi[r-255]})();Bn.log=function(e){if(e<1)throw new Error("log("+e+")");return vn[e]};Bn.exp=function(e){return Oi[e]};Bn.mul=function(e,r){return e===0||r===0?0:Oi[vn[e]+vn[r]]};(function(t){var e=_r,r=Bn;t.mul=function(n,s){for(var o=e.alloc(n.length+s.length-1),a=0;a<n.length;a++)for(var h=0;h<s.length;h++)o[a+h]^=r.mul(n[a],s[h]);return o},t.mod=function(n,s){for(var o=e.from(n);o.length-s.length>=0;){for(var a=o[0],h=0;h<s.length;h++)o[h]^=r.mul(s[h],a);for(var u=0;u<o.length&&o[u]===0;)u++;o=o.slice(u)}return o},t.generateECPolynomial=function(n){for(var s=e.from([1]),o=0;o<n;o++)s=t.mul(s,[1,r.exp(o)]);return s}})(dh);var jo=_r,ph=dh,Hd=K.bufferPolyfill.Buffer;function oo(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}oo.prototype.initialize=function(e){this.degree=e,this.genPoly=ph.generateECPolynomial(this.degree)};oo.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");var r=jo.alloc(this.degree),i=Hd.concat([e,r],e.length+this.degree),n=ph.mod(i,this.genPoly),s=this.degree-n.length;if(s>0){var o=jo.alloc(this.degree);return n.copy(o,s),o}return n};var Jd=oo,gh={},br={},ao={};ao.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Ht={},mh="[0-9]+",Qd="[A-Z $%*+\\-./:]+",Ui="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Ui=Ui.replace(/u/g,"\\u");var Gd="(?:(?![A-Z0-9 $%*+\\-./:]|"+Ui+`)(?:.|[\r
2
2
  ]))+`;Ht.KANJI=new RegExp(Ui,"g");Ht.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Ht.BYTE=new RegExp(Gd,"g");Ht.NUMERIC=new RegExp(mh,"g");Ht.ALPHANUMERIC=new RegExp(Qd,"g");var Yd=new RegExp("^"+Ui+"$"),Xd=new RegExp("^"+mh+"$"),Zd=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Ht.testKanji=function(e){return Yd.test(e)};Ht.testNumeric=function(e){return Xd.test(e)};Ht.testAlphanumeric=function(e){return Zd.test(e)};(function(t){var e=ao,r=Ht;t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(s,o){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!e.isValid(o))throw new Error("Invalid version: "+o);return o>=1&&o<10?s.ccBits[0]:o<27?s.ccBits[1]:s.ccBits[2]},t.getBestModeForData=function(s){return r.testNumeric(s)?t.NUMERIC:r.testAlphanumeric(s)?t.ALPHANUMERIC:r.testKanji(s)?t.KANJI:t.BYTE},t.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},t.isValid=function(s){return s&&s.bit&&s.ccBits};function i(n){if(typeof n!="string")throw new Error("Param is not a string");var s=n.toLowerCase();switch(s){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+n)}}t.from=function(s,o){if(t.isValid(s))return s;try{return i(s)}catch{return o}}})(br);(function(t){var e=wt,r=kn,i=On,n=br,s=ao,o=to,a=7973,h=e.getBCHDigit(a);function u(v,E,x){for(var S=1;S<=40;S++)if(E<=t.getCapacity(S,x,v))return S}function f(v,E){return n.getCharCountIndicator(v,E)+4}function m(v,E){var x=0;return v.forEach(function(S){var N=f(S.mode,E);x+=N+S.getBitsLength()}),x}function b(v,E){for(var x=1;x<=40;x++){var S=m(v,x);if(S<=t.getCapacity(x,E,n.MIXED))return x}}t.from=function(E,x){return s.isValid(E)?parseInt(E,10):x},t.getCapacity=function(E,x,S){if(!s.isValid(E))throw new Error("Invalid QR Code version");typeof S>"u"&&(S=n.BYTE);var N=e.getSymbolTotalCodewords(E),R=r.getTotalCodewordsCount(E,x),O=(N-R)*8;if(S===n.MIXED)return O;var C=O-f(S,E);switch(S){case n.NUMERIC:return Math.floor(C/10*3);case n.ALPHANUMERIC:return Math.floor(C/11*2);case n.KANJI:return Math.floor(C/13);case n.BYTE:default:return Math.floor(C/8)}},t.getBestVersionForData=function(E,x){var S,N=i.from(x,i.M);if(o(E)){if(E.length>1)return b(E,N);if(E.length===0)return 1;S=E[0]}else S=E;return u(S.mode,S.getLength(),N)},t.getEncodedBits=function(E){if(!s.isValid(E)||E<7)throw new Error("Invalid QR Code version");for(var x=E<<12;e.getBCHDigit(x)-h>=0;)x^=a<<e.getBCHDigit(x)-h;return E<<12|x}})(gh);var yh={},Bs=wt,vh=1335,ef=21522,Ko=Bs.getBCHDigit(vh);yh.getEncodedBits=function(e,r){for(var i=e.bit<<3|r,n=i<<10;Bs.getBCHDigit(n)-Ko>=0;)n^=vh<<Bs.getBCHDigit(n)-Ko;return(i<<10|n)^ef};var wh={},tf=br;function ni(t){this.mode=tf.NUMERIC,this.data=t.toString()}ni.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};ni.prototype.getLength=function(){return this.data.length};ni.prototype.getBitsLength=function(){return ni.getBitsLength(this.data.length)};ni.prototype.write=function(e){var r,i,n;for(r=0;r+3<=this.data.length;r+=3)i=this.data.substr(r,3),n=parseInt(i,10),e.put(n,10);var s=this.data.length-r;s>0&&(i=this.data.substr(r),n=parseInt(i,10),e.put(n,s*3+1))};var rf=ni,nf=br,ns=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function si(t){this.mode=nf.ALPHANUMERIC,this.data=t}si.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};si.prototype.getLength=function(){return this.data.length};si.prototype.getBitsLength=function(){return si.getBitsLength(this.data.length)};si.prototype.write=function(e){var r;for(r=0;r+2<=this.data.length;r+=2){var i=ns.indexOf(this.data[r])*45;i+=ns.indexOf(this.data[r+1]),e.put(i,11)}this.data.length%2&&e.put(ns.indexOf(this.data[r]),6)};var sf=si,of=_r,af=br;function oi(t){this.mode=af.BYTE,this.data=of.from(t)}oi.getBitsLength=function(e){return e*8};oi.prototype.getLength=function(){return this.data.length};oi.prototype.getBitsLength=function(){return oi.getBitsLength(this.data.length)};oi.prototype.write=function(t){for(var e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)};var cf=oi,hf=br,lf=wt;function ai(t){this.mode=hf.KANJI,this.data=t}ai.getBitsLength=function(e){return e*13};ai.prototype.getLength=function(){return this.data.length};ai.prototype.getBitsLength=function(){return ai.getBitsLength(this.data.length)};ai.prototype.write=function(t){var e;for(e=0;e<this.data.length;e++){var r=lf.toSJIS(this.data[e]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
3
3
  Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),t.put(r,13)}};var uf=ai;(function(t){var e=br,r=rf,i=sf,n=cf,s=uf,o=Ht,a=wt,h=xu.dijkstraExports;function u(N){return unescape(encodeURIComponent(N)).length}function f(N,R,O){for(var C=[],D;(D=N.exec(O))!==null;)C.push({data:D[0],index:D.index,mode:R,length:D[0].length});return C}function m(N){var R=f(o.NUMERIC,e.NUMERIC,N),O=f(o.ALPHANUMERIC,e.ALPHANUMERIC,N),C,D;a.isKanjiModeEnabled()?(C=f(o.BYTE,e.BYTE,N),D=f(o.KANJI,e.KANJI,N)):(C=f(o.BYTE_KANJI,e.BYTE,N),D=[]);var L=R.concat(O,C,D);return L.sort(function($,U){return $.index-U.index}).map(function($){return{data:$.data,mode:$.mode,length:$.length}})}function b(N,R){switch(R){case e.NUMERIC:return r.getBitsLength(N);case e.ALPHANUMERIC:return i.getBitsLength(N);case e.KANJI:return s.getBitsLength(N);case e.BYTE:return n.getBitsLength(N)}}function v(N){return N.reduce(function(R,O){var C=R.length-1>=0?R[R.length-1]:null;return C&&C.mode===O.mode?(R[R.length-1].data+=O.data,R):(R.push(O),R)},[])}function E(N){for(var R=[],O=0;O<N.length;O++){var C=N[O];switch(C.mode){case e.NUMERIC:R.push([C,{data:C.data,mode:e.ALPHANUMERIC,length:C.length},{data:C.data,mode:e.BYTE,length:C.length}]);break;case e.ALPHANUMERIC:R.push([C,{data:C.data,mode:e.BYTE,length:C.length}]);break;case e.KANJI:R.push([C,{data:C.data,mode:e.BYTE,length:u(C.data)}]);break;case e.BYTE:R.push([{data:C.data,mode:e.BYTE,length:u(C.data)}])}}return R}function x(N,R){for(var O={},C={start:{}},D=["start"],L=0;L<N.length;L++){for(var $=N[L],U=[],ee=0;ee<$.length;ee++){var oe=$[ee],te=""+L+ee;U.push(te),O[te]={node:oe,lastCount:0},C[te]={};for(var he=0;he<D.length;he++){var c=D[he];O[c]&&O[c].node.mode===oe.mode?(C[c][te]=b(O[c].lastCount+oe.length,oe.mode)-b(O[c].lastCount,oe.mode),O[c].lastCount+=oe.length):(O[c]&&(O[c].lastCount=oe.length),C[c][te]=b(oe.length,oe.mode)+4+e.getCharCountIndicator(oe.mode,R))}}D=U}for(he=0;he<D.length;he++)C[D[he]].end=0;return{map:C,table:O}}function S(N,R){var O,C=e.getBestModeForData(N);if(O=e.from(R,C),O!==e.BYTE&&O.bit<C.bit)throw new Error('"'+N+'" cannot be encoded with mode '+e.toString(O)+`.
4
4
  Suggested mode is: `+e.toString(C));switch(O===e.KANJI&&!a.isKanjiModeEnabled()&&(O=e.BYTE),O){case e.NUMERIC:return new r(N);case e.ALPHANUMERIC:return new i(N);case e.KANJI:return new s(N);case e.BYTE:return new n(N)}}t.fromArray=function(R){return R.reduce(function(O,C){return typeof C=="string"?O.push(S(C,null)):C.data&&O.push(S(C.data,C.mode)),O},[])},t.fromString=function(R,O){for(var C=m(R,a.isKanjiModeEnabled()),D=E(C),L=x(D,O),$=h.find_path(L.map,"start","end"),U=[],ee=1;ee<$.length-1;ee++)U.push(L.table[$[ee]].node);return t.fromArray(v(U))},t.rawSplit=function(R){return t.fromArray(m(R,a.isKanjiModeEnabled()))}})(wh);var Vo=_r,Dn=wt,ss=On,df=Kd,ff=Vd,pf=hh,gf=lh,Ds=uh,Fs=kn,mf=Jd,wn=gh,yf=yh,vf=br,os=wh,wf=to;function _f(t,e){for(var r=t.size,i=gf.getPositions(e),n=0;n<i.length;n++)for(var s=i[n][0],o=i[n][1],a=-1;a<=7;a++)if(!(s+a<=-1||r<=s+a))for(var h=-1;h<=7;h++)o+h<=-1||r<=o+h||(a>=0&&a<=6&&(h===0||h===6)||h>=0&&h<=6&&(a===0||a===6)||a>=2&&a<=4&&h>=2&&h<=4?t.set(s+a,o+h,!0,!0):t.set(s+a,o+h,!1,!0))}function bf(t){for(var e=t.size,r=8;r<e-8;r++){var i=r%2===0;t.set(r,6,i,!0),t.set(6,r,i,!0)}}function Af(t,e){for(var r=pf.getPositions(e),i=0;i<r.length;i++)for(var n=r[i][0],s=r[i][1],o=-2;o<=2;o++)for(var a=-2;a<=2;a++)o===-2||o===2||a===-2||a===2||o===0&&a===0?t.set(n+o,s+a,!0,!0):t.set(n+o,s+a,!1,!0)}function Ef(t,e){for(var r=t.size,i=wn.getEncodedBits(e),n,s,o,a=0;a<18;a++)n=Math.floor(a/3),s=a%3+r-8-3,o=(i>>a&1)===1,t.set(n,s,o,!0),t.set(s,n,o,!0)}function as(t,e,r){var i=t.size,n=yf.getEncodedBits(e,r),s,o;for(s=0;s<15;s++)o=(n>>s&1)===1,s<6?t.set(s,8,o,!0):s<8?t.set(s+1,8,o,!0):t.set(i-15+s,8,o,!0),s<8?t.set(8,i-s-1,o,!0):s<9?t.set(8,15-s-1+1,o,!0):t.set(8,15-s-1,o,!0);t.set(i-8,8,1,!0)}function Sf(t,e){for(var r=t.size,i=-1,n=r-1,s=7,o=0,a=r-1;a>0;a-=2)for(a===6&&a--;;){for(var h=0;h<2;h++)if(!t.isReserved(n,a-h)){var u=!1;o<e.length&&(u=(e[o]>>>s&1)===1),t.set(n,a-h,u),s--,s===-1&&(o++,s=7)}if(n+=i,n<0||r<=n){n-=i,i=-i;break}}}function If(t,e,r){var i=new df;r.forEach(function(u){i.put(u.mode.bit,4),i.put(u.getLength(),vf.getCharCountIndicator(u.mode,t)),u.write(i)});var n=Dn.getSymbolTotalCodewords(t),s=Fs.getTotalCodewordsCount(t,e),o=(n-s)*8;for(i.getLengthInBits()+4<=o&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);for(var a=(o-i.getLengthInBits())/8,h=0;h<a;h++)i.put(h%2?17:236,8);return Mf(i,t,e)}function Mf(t,e,r){for(var i=Dn.getSymbolTotalCodewords(e),n=Fs.getTotalCodewordsCount(e,r),s=i-n,o=Fs.getBlocksCount(e,r),a=i%o,h=o-a,u=Math.floor(i/o),f=Math.floor(s/o),m=f+1,b=u-f,v=new mf(b),E=0,x=new Array(o),S=new Array(o),N=0,R=Vo.from(t.buffer),O=0;O<o;O++){var C=O<h?f:m;x[O]=R.slice(E,E+C),S[O]=v.encode(x[O]),E+=C,N=Math.max(N,C)}var D=Vo.alloc(i),L=0,$,U;for($=0;$<N;$++)for(U=0;U<o;U++)$<x[U].length&&(D[L++]=x[U][$]);for($=0;$<b;$++)for(U=0;U<o;U++)D[L++]=S[U][$];return D}function xf(t,e,r,i){var n;if(wf(t))n=os.fromArray(t);else if(typeof t=="string"){var s=e;if(!s){var o=os.rawSplit(t);s=wn.getBestVersionForData(o,r)}n=os.fromString(t,s||40)}else throw new Error("Invalid data");var a=wn.getBestVersionForData(n,r);if(!a)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=a;else if(e<a)throw new Error(`
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CEovIwuS.js");class o extends Error{constructor(r){super(r)}}class s extends o{constructor(){super(...arguments),this.name="TokenOwnerOffCurveError"}}const n=e.struct([e.u32("mintAuthorityOption"),e.publicKey("mintAuthority"),e.u64("supply"),e.u8("decimals"),e.bool("isInitialized"),e.u32("freezeAuthorityOption"),e.publicKey("freezeAuthority")]);n.span;async function f(t,r,u=!1,i=e.TOKEN_PROGRAM_ID,O=e.ASSOCIATED_TOKEN_PROGRAM_ID){if(!u&&!e.PublicKey.isOnCurve(r.toBuffer()))throw new s;const[c]=await e.PublicKey.findProgramAddress([r.toBuffer(),i.toBuffer(),t.toBuffer()],O);return c}exports.ASSOCIATED_TOKEN_PROGRAM_ID=e.ASSOCIATED_TOKEN_PROGRAM_ID;exports.TOKEN_PROGRAM_ID=e.TOKEN_PROGRAM_ID;exports.MintLayout=n;exports.TokenError=o;exports.TokenOwnerOffCurveError=s;exports.getAssociatedTokenAddress=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BU_DiszY.js");class o extends Error{constructor(r){super(r)}}class s extends o{constructor(){super(...arguments),this.name="TokenOwnerOffCurveError"}}const n=e.struct([e.u32("mintAuthorityOption"),e.publicKey("mintAuthority"),e.u64("supply"),e.u8("decimals"),e.bool("isInitialized"),e.u32("freezeAuthorityOption"),e.publicKey("freezeAuthority")]);n.span;async function f(t,r,u=!1,i=e.TOKEN_PROGRAM_ID,O=e.ASSOCIATED_TOKEN_PROGRAM_ID){if(!u&&!e.PublicKey.isOnCurve(r.toBuffer()))throw new s;const[c]=await e.PublicKey.findProgramAddress([r.toBuffer(),i.toBuffer(),t.toBuffer()],O);return c}exports.ASSOCIATED_TOKEN_PROGRAM_ID=e.ASSOCIATED_TOKEN_PROGRAM_ID;exports.TOKEN_PROGRAM_ID=e.TOKEN_PROGRAM_ID;exports.MintLayout=n;exports.TokenError=o;exports.TokenOwnerOffCurveError=s;exports.getAssociatedTokenAddress=f;