@wormhole-foundation/wormhole-connect 0.3.4-beta.1-development → 0.3.4-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 (52) hide show
  1. package/dist/assets/{cosmos-TcYN7x14.js → cosmos-9t5ds48M.js} +1 -1
  2. package/dist/assets/index-bti7uInf.js +3 -0
  3. package/dist/assets/{solana-r3vOVfGL.js → solana-QOFlt-jY.js} +2 -2
  4. package/dist/assets/{solanaEmbed.esm-8lU7Qhqn.js → solanaEmbed.esm-bag_3ej_.js} +1 -1
  5. package/dist/main.js +87 -87
  6. package/dist/src/routes/ntt/chains/evm/getMessage.d.ts +1 -0
  7. package/dist/src/routes/ntt/chains/evm/getMessage.d.ts.map +1 -1
  8. package/dist/src/routes/ntt/chains/solana/nttManager.d.ts.map +1 -1
  9. package/dist/src/views/Bridge/Send.d.ts.map +1 -1
  10. package/lib/{aptos-YJ42vr_W.js → aptos-A2P3fZwR.js} +1 -1
  11. package/lib/{aptos-vICYdEEI.mjs → aptos-LzsTT-yE.mjs} +1 -1
  12. package/lib/{ccip-DygNc1gH.mjs → ccip-EX9Uy7uh.mjs} +3 -3
  13. package/lib/{ccip-Mv-Y7qQB.js → ccip-MYRIWxwr.js} +1 -1
  14. package/lib/{cosmos-WJXFYQNK.mjs → cosmos-8BhxGLk5.mjs} +3 -3
  15. package/lib/{cosmos-cD2komSf.js → cosmos-LAGywRPJ.js} +1 -1
  16. package/lib/{evm-yjlqBufh.mjs → evm-4xBDvIbh.mjs} +4 -4
  17. package/lib/{evm-xkdI8pSv.js → evm-rkkBtxAA.js} +3 -3
  18. package/lib/{index-BuS92LIv.mjs → index-6l7AaQMo.mjs} +68 -68
  19. package/lib/{index-PiMnvd2A.js → index-DFThg9zD.js} +1 -1
  20. package/lib/{index-M1p_Eh-u.js → index-DiFBiIsU.js} +9 -9
  21. package/lib/index-FCAzcpcI.js +3 -0
  22. package/lib/{index-3M-btPTH.mjs → index-HrOVvUmR.mjs} +1 -1
  23. package/lib/{index-svQdWcUQ.js → index-IzBi7jkq.js} +1 -1
  24. package/lib/{index-NdIfNoUC.mjs → index-SXsxLkBQ.mjs} +2 -2
  25. package/lib/{index-mmUC6z11.mjs → index-TXf-Y_5p.mjs} +158 -145
  26. package/lib/{index-Ts0hMNcs.js → index-f0MmfW4C.js} +1 -1
  27. package/lib/{index-HJ7OgT39.mjs → index-oQ6mMVQe.mjs} +3 -3
  28. package/lib/{index.es-5oDTE27I.mjs → index.es-B2GmSqJ1.mjs} +1 -1
  29. package/lib/{index.es-lSW75x3B.js → index.es-JGv9-9pp.js} +1 -1
  30. package/lib/{index.es-m4cVHI1t.js → index.es-dyXbfeDn.js} +1 -1
  31. package/lib/{index.es-HvEoXVEz.js → index.es-i0PmGTV8.js} +2 -2
  32. package/lib/{index.es-uwiDXd7k.mjs → index.es-qoSsRT_G.mjs} +4 -4
  33. package/lib/{index.es-e1jl9j_3.mjs → index.es-wdCYxk2S.mjs} +2 -2
  34. package/lib/index.js +1 -1
  35. package/lib/index.mjs +1 -1
  36. package/lib/{libsodium-wrappers-XdwDixWb.mjs → libsodium-wrappers-ffJoUj0j.mjs} +1 -1
  37. package/lib/{libsodium-wrappers-6sU4RSpm.js → libsodium-wrappers-x1Tf86Kb.js} +1 -1
  38. package/lib/{sei-VsKceiXM.js → sei-ams4Dv3V.js} +1 -1
  39. package/lib/{sei-MWqmtPvc.mjs → sei-yioT3-Yb.mjs} +2 -2
  40. package/lib/{solana-azQ6daZ6.js → solana-2Gb2ijrF.js} +1 -1
  41. package/lib/{solana-wUE98qtT.mjs → solana-VyhiGF9X.mjs} +3 -3
  42. package/lib/{solanaEmbed.esm-TKwIiwFm.js → solanaEmbed.esm-AyFAReSD.js} +1 -1
  43. package/lib/{solanaEmbed.esm-NqE6Wm3_.mjs → solanaEmbed.esm-O2q9SxIk.mjs} +2 -2
  44. package/lib/src/routes/ntt/chains/evm/getMessage.d.ts +1 -0
  45. package/lib/src/routes/ntt/chains/evm/getMessage.d.ts.map +1 -1
  46. package/lib/src/routes/ntt/chains/solana/nttManager.d.ts.map +1 -1
  47. package/lib/src/views/Bridge/Send.d.ts.map +1 -1
  48. package/lib/{sui-QltJ7Szu.mjs → sui-8zqO_WMc.mjs} +1 -1
  49. package/lib/{sui-jKieURbL.js → sui-vAj128v8.js} +1 -1
  50. package/package.json +1 -1
  51. package/dist/assets/index-7UgR9Epe.js +0 -3
  52. package/lib/index-fGNWtA30.js +0 -3
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("./index-M1p_Eh-u.js"),kr=require("./dijkstra-dsi_GddY.js"),Qt=require("./index.es-m4cVHI1t.js"),pt=require("./index.es-lSW75x3B.js");require("react");require("react-dom");var Ar=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(o){e.addRange(o)}),t&&t.focus()}},Nr=Ar,mt={"text/plain":"Text","text/html":"Url",default:"Text"},Br="Copy to clipboard: #{key}, Enter";function Rr(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function Lr(e,t){var n,r,o,a,i,l,c=!1;t||(t={}),n=t.debug||!1;try{o=Nr(),a=document.createRange(),i=document.getSelection(),l=document.createElement("span"),l.textContent=e,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",function(s){if(s.stopPropagation(),t.format)if(s.preventDefault(),typeof s.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=mt[t.format]||mt.default;window.clipboardData.setData(d,e)}else s.clipboardData.clearData(),s.clipboardData.setData(t.format,e);t.onCopy&&(s.preventDefault(),t.onCopy(s.clipboardData))}),document.body.appendChild(l),a.selectNodeContents(l),i.addRange(a);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");c=!0}catch(s){n&&console.error("unable to copy using execCommand: ",s),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=Rr("message"in t?t.message:Br),window.prompt(r,e)}}finally{i&&(typeof i.removeRange=="function"?i.removeRange(a):i.removeAllRanges()),l&&document.body.removeChild(l),o()}return c}var Mr=Lr,Ge={},A={};Object.defineProperty(A,"__esModule",{value:!0});var Jt=A.getLocalStorage=ln=A.getLocalStorageOrThrow=an=A.getCrypto=on=A.getCryptoOrThrow=rn=A.getLocation=nn=A.getLocationOrThrow=tn=A.getNavigator=en=A.getNavigatorOrThrow=Zt=A.getDocument=Xt=A.getDocumentOrThrow=Gt=A.getFromWindowOrThrow=jt=A.getFromWindow=void 0;function Q(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}var jt=A.getFromWindow=Q;function re(e){const t=Q(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}var Gt=A.getFromWindowOrThrow=re;function Pr(){return re("document")}var Xt=A.getDocumentOrThrow=Pr;function Or(){return Q("document")}var Zt=A.getDocument=Or;function Ir(){return re("navigator")}var en=A.getNavigatorOrThrow=Ir;function Dr(){return Q("navigator")}var tn=A.getNavigator=Dr;function Ur(){return re("location")}var nn=A.getLocationOrThrow=Ur;function $r(){return Q("location")}var rn=A.getLocation=$r;function Wr(){return re("crypto")}var on=A.getCryptoOrThrow=Wr;function Fr(){return Q("crypto")}var an=A.getCrypto=Fr;function zr(){return re("localStorage")}var ln=A.getLocalStorageOrThrow=zr;function qr(){return Q("localStorage")}Jt=A.getLocalStorage=qr;Object.defineProperty(Ge,"__esModule",{value:!0});var cn=Ge.getWindowMetadata=void 0;const vt=A;function Hr(){let e,t;try{e=vt.getDocumentOrThrow(),t=vt.getLocationOrThrow()}catch{return null}function n(){const d=e.getElementsByTagName("link"),y=[];for(let _=0;_<d.length;_++){const h=d[_],b=h.getAttribute("rel");if(b&&b.toLowerCase().indexOf("icon")>-1){const f=h.getAttribute("href");if(f)if(f.toLowerCase().indexOf("https:")===-1&&f.toLowerCase().indexOf("http:")===-1&&f.indexOf("//")!==0){let v=t.protocol+"//"+t.host;if(f.indexOf("/")===0)v+=f;else{const m=t.pathname.split("/");m.pop();const g=m.join("/");v+=g+"/"+f}y.push(v)}else if(f.indexOf("//")===0){const v=t.protocol+f;y.push(v)}else y.push(f)}}return y}function r(...d){const y=e.getElementsByTagName("meta");for(let _=0;_<y.length;_++){const h=y[_],b=["itemprop","property","name"].map(f=>h.getAttribute(f)).filter(f=>f?d.includes(f):!1);if(b.length&&b){const f=h.getAttribute("content");if(f)return f}}return""}function o(){let d=r("name","og:site_name","og:title","twitter:title");return d||(d=e.title),d}function a(){return r("description","og:description","twitter:description","keywords")}const i=o(),l=a(),c=t.origin,u=n();return{description:l,url:c,icons:u,name:i}}cn=Ge.getWindowMetadata=Hr;var Kr=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var a=arguments[t],i=0,l=a.length;i<l;i++,o++)r[o]=a[i];return r},Vr=function(){function e(t,n,r){this.name=t,this.version=n,this.os=r,this.type="browser"}return e}(),Yr=function(){function e(t){this.version=t,this.type="node",this.name="node",this.os=B.dist.process.platform}return e}(),Qr=function(){function e(t,n,r,o){this.name=t,this.version=n,this.os=r,this.bot=o,this.type="bot-device"}return e}(),Jr=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),jr=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),Gr=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,Xr=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,wt=3,Zr=[["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",Gr]],yt=[["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 eo(e){return e?bt(e):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new jr:typeof navigator<"u"?bt(navigator.userAgent):ro()}function to(e){return e!==""&&Zr.reduce(function(t,n){var r=n[0],o=n[1];if(t)return t;var a=o.exec(e);return!!a&&[r,a]},!1)}function bt(e){var t=to(e);if(!t)return null;var n=t[0],r=t[1];if(n==="searchbot")return new Jr;var o=r[1]&&r[1].split(/[._]/).slice(0,3);o?o.length<wt&&(o=Kr(o,oo(wt-o.length))):o=[];var a=o.join("."),i=no(e),l=Xr.exec(e);return l&&l[1]?new Qr(n,a,i,l[1]):new Vr(n,a,i)}function no(e){for(var t=0,n=yt.length;t<n;t++){var r=yt[t],o=r[0],a=r[1],i=a.exec(e);if(i)return o}return null}function ro(){var e=typeof B.dist.process<"u"&&B.dist.process.version;return e?new Yr(B.dist.process.version.slice(1)):null}function oo(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}function Xe(e){return eo(e)}function xe(){const e=Xe();return e&&e.os?e.os:void 0}function sn(){const e=xe();return e?e.toLowerCase().includes("android"):!1}function un(){const e=xe();return e?e.toLowerCase().includes("ios")||e.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function ao(){return xe()?sn()||un():!1}function fn(){const e=Xe();return e&&e.name?e.name.toLowerCase()==="node":!1}function io(){return!fn()&&!!dn()}const lo=jt,co=Gt,so=Xt,uo=Zt,fo=en,dn=tn,_o=nn,ho=rn,go=on,po=an,mo=ln,Te=Jt;function vo(){return cn()}function wo(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return JSON.parse(e)}catch{return e}}function yo(e){return typeof e=="string"?e:JSON.stringify(e)}const _n=wo,hn=yo;function gn(e,t){const n=hn(t),r=Te();r&&r.setItem(e,n)}function bo(e){let t=null,n=null;const r=Te();return r&&(n=r.getItem(e)),t=n&&_n(n),t}function Co(e){const t=Te();t&&t.removeItem(e)}const pn="WALLETCONNECT_DEEPLINK_CHOICE";function Eo(e,t){const n=encodeURIComponent(e);return t.universalLink?`${t.universalLink}/wc?uri=${n}`:t.deepLink?`${t.deepLink}${t.deepLink.endsWith(":")?"//":"/"}wc?uri=${n}`:""}function xo(e){const t=e.href.split("?")[0];gn(pn,Object.assign(Object.assign({},e),{href:t}))}function mn(e,t){return e.filter(n=>n.name.toLowerCase().includes(t.toLowerCase()))[0]}function To(e,t){let n=e;return t&&(n=t.map(r=>mn(e,r)).filter(Boolean)),n}const vn="https://registry.walletconnect.com";function So(){return vn+"/api/v2/wallets"}function ko(){return vn+"/api/v2/dapps"}function wn(e,t="mobile"){var n;return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:(n=e.image_url.sm)!==null&&n!==void 0?n:"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}function Ao(e,t="mobile"){return Object.values(e).filter(n=>!!n[t].universal||!!n[t].native).map(n=>wn(n,t))}const No=Object.freeze(Object.defineProperty({__proto__:null,detectEnv:Xe,detectOS:xe,formatIOSMobile:Eo,formatMobileRegistry:Ao,formatMobileRegistryEntry:wn,getClientMeta:vo,getCrypto:po,getCryptoOrThrow:go,getDappRegistryUrl:ko,getDocument:uo,getDocumentOrThrow:so,getFromWindow:lo,getFromWindowOrThrow:co,getLocal:bo,getLocalStorage:Te,getLocalStorageOrThrow:mo,getLocation:ho,getLocationOrThrow:_o,getMobileLinkRegistry:To,getMobileRegistryEntry:mn,getNavigator:dn,getNavigatorOrThrow:fo,getWalletRegistryUrl:So,isAndroid:sn,isBrowser:io,isIOS:un,isMobile:ao,isNode:fn,mobileLinkChoiceKey:pn,removeLocal:Co,safeJsonParse:_n,safeJsonStringify:hn,saveMobileLinkInfo:xo,setLocal:gn},Symbol.toStringTag,{value:"Module"})),Bo=B.getAugmentedNamespace(No);var de={},Ro=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},yn={},K={},Lo={}.toString,Ze=Array.isArray||function(e){return Lo.call(e)=="[object Array]"},Mo=Ze;function Po(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},e.foo()===42}catch{return!1}}T.TYPED_ARRAY_SUPPORT=Po();var Ct=T.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function T(e,t,n){return!T.TYPED_ARRAY_SUPPORT&&!(this instanceof T)?new T(e,t,n):typeof e=="number"?bn(this,e):Fo(this,e,t,n)}T.TYPED_ARRAY_SUPPORT&&(T.prototype.__proto__=Uint8Array.prototype,T.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&T[Symbol.species]===T&&Object.defineProperty(T,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function et(e){if(e>=Ct)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ct.toString(16)+" bytes");return e|0}function Oo(e){return e!==e}function G(e,t){var n;return T.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(t),n.__proto__=T.prototype):(n=e,n===null&&(n=new T(t)),n.length=t),n}function bn(e,t){var n=G(e,t<0?0:et(t)|0);if(!T.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)n[r]=0;return n}function Io(e,t){var n=En(t)|0,r=G(e,n),o=r.write(t);return o!==n&&(r=r.slice(0,o)),r}function Fe(e,t){for(var n=t.length<0?0:et(t.length)|0,r=G(e,n),o=0;o<n;o+=1)r[o]=t[o]&255;return r}function Do(e,t,n,r){if(n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");var o;return n===void 0&&r===void 0?o=new Uint8Array(t):r===void 0?o=new Uint8Array(t,n):o=new Uint8Array(t,n,r),T.TYPED_ARRAY_SUPPORT?o.__proto__=T.prototype:o=Fe(e,o),o}function Uo(e,t){if(T.isBuffer(t)){var n=et(t.length)|0,r=G(e,n);return r.length===0||t.copy(r,0,0,n),r}if(t){if(typeof ArrayBuffer<"u"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||Oo(t.length)?G(e,0):Fe(e,t);if(t.type==="Buffer"&&Array.isArray(t.data))return Fe(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Cn(e,t){t=t||1/0;for(var n,r=e.length,o=null,a=[],i=0;i<r;++i){if(n=e.charCodeAt(i),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(i+1===r){(t-=3)>-1&&a.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return a}function En(e){if(T.isBuffer(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var t=e.length;return t===0?0:Cn(e).length}function $o(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function Wo(e,t,n,r){return $o(Cn(t,e.length-n),e,n,r)}function Fo(e,t,n,r){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer?Do(e,t,n,r):typeof t=="string"?Io(e,t):Uo(e,t)}T.prototype.write=function(t,n,r){n===void 0?(r=this.length,n=0):r===void 0&&typeof n=="string"?(r=this.length,n=0):isFinite(n)&&(n=n|0,isFinite(r)?r=r|0:r=void 0);var o=this.length-n;if((r===void 0||r>o)&&(r=o),t.length>0&&(r<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");return Wo(this,t,n,r)};T.prototype.slice=function(t,n){var r=this.length;t=~~t,n=n===void 0?r:~~n,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),n<t&&(n=t);var o;if(T.TYPED_ARRAY_SUPPORT)o=this.subarray(t,n),o.__proto__=T.prototype;else{var a=n-t;o=new T(a,void 0);for(var i=0;i<a;++i)o[i]=this[i+t]}return o};T.prototype.copy=function(t,n,r,o){if(r||(r=0),!o&&o!==0&&(o=this.length),n>=t.length&&(n=t.length),n||(n=0),o>0&&o<r&&(o=r),o===r||t.length===0||this.length===0)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-n<o-r&&(o=t.length-n+r);var a=o-r,i;if(this===t&&r<n&&n<o)for(i=a-1;i>=0;--i)t[i+n]=this[i+r];else if(a<1e3||!T.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+n]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+a),n);return a};T.prototype.fill=function(t,n,r){if(typeof t=="string"){if(typeof n=="string"?(n=0,r=this.length):typeof r=="string"&&(r=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}}else typeof t=="number"&&(t=t&255);if(n<0||this.length<n||this.length<r)throw new RangeError("Out of range index");if(r<=n)return this;n=n>>>0,r=r===void 0?this.length:r>>>0,t||(t=0);var a;if(typeof t=="number")for(a=n;a<r;++a)this[a]=t;else{var i=T.isBuffer(t)?t:new T(t),l=i.length;for(a=0;a<r-n;++a)this[a+n]=i[a%l]}return this};T.concat=function(t,n){if(!Mo(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return G(null,0);var r;if(n===void 0)for(n=0,r=0;r<t.length;++r)n+=t[r].length;var o=bn(null,n),a=0;for(r=0;r<t.length;++r){var i=t[r];if(!T.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(o,a),a+=i.length}return o};T.byteLength=En;T.prototype._isBuffer=!0;T.isBuffer=function(t){return!!(t!=null&&t._isBuffer)};K.alloc=function(e){var t=new T(e);return t.fill(0),t};K.from=function(e){return new T(e)};var O={},tt,zo=[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];O.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};O.getSymbolTotalCodewords=function(t){return zo[t]};O.getBCHDigit=function(e){for(var t=0;e!==0;)t++,e>>>=1;return t};O.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');tt=t};O.isKanjiModeEnabled=function(){return typeof tt<"u"};O.toSJIS=function(t){return tt(t)};var Se={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");var r=n.toLowerCase();switch(r){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,o){if(e.isValid(r))return r;try{return t(r)}catch{return o}}})(Se);function xn(){this.buffer=[],this.length=0}xn.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(var n=0;n<t;n++)this.putBit((e>>>t-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var qo=xn,Et=K;function _e(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=Et.alloc(e*e),this.reservedBit=Et.alloc(e*e)}_e.prototype.set=function(e,t,n,r){var o=e*this.size+t;this.data[o]=n,r&&(this.reservedBit[o]=!0)};_e.prototype.get=function(e,t){return this.data[e*this.size+t]};_e.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};_e.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var Ho=_e,Tn={};(function(e){var t=O.getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];for(var o=Math.floor(r/7)+2,a=t(r),i=a===145?26:Math.ceil((a-13)/(2*o-2))*2,l=[a-7],c=1;c<o-1;c++)l[c]=l[c-1]-i;return l.push(6),l.reverse()},e.getPositions=function(r){for(var o=[],a=e.getRowColCoords(r),i=a.length,l=0;l<i;l++)for(var c=0;c<i;c++)l===0&&c===0||l===0&&c===i-1||l===i-1&&c===0||o.push([a[l],a[c]]);return o}})(Tn);var Sn={},Ko=O.getSymbolSize,xt=7;Sn.getPositions=function(t){var n=Ko(t);return[[0,0],[n-xt,0],[0,n-xt]]};var kn={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){for(var a=o.size,i=0,l=0,c=0,u=null,s=null,d=0;d<a;d++){l=c=0,u=s=null;for(var y=0;y<a;y++){var _=o.get(d,y);_===u?l++:(l>=5&&(i+=t.N1+(l-5)),u=_,l=1),_=o.get(y,d),_===s?c++:(c>=5&&(i+=t.N1+(c-5)),s=_,c=1)}l>=5&&(i+=t.N1+(l-5)),c>=5&&(i+=t.N1+(c-5))}return i},e.getPenaltyN2=function(o){for(var a=o.size,i=0,l=0;l<a-1;l++)for(var c=0;c<a-1;c++){var u=o.get(l,c)+o.get(l,c+1)+o.get(l+1,c)+o.get(l+1,c+1);(u===4||u===0)&&i++}return i*t.N2},e.getPenaltyN3=function(o){for(var a=o.size,i=0,l=0,c=0,u=0;u<a;u++){l=c=0;for(var s=0;s<a;s++)l=l<<1&2047|o.get(u,s),s>=10&&(l===1488||l===93)&&i++,c=c<<1&2047|o.get(s,u),s>=10&&(c===1488||c===93)&&i++}return i*t.N3},e.getPenaltyN4=function(o){for(var a=0,i=o.data.length,l=0;l<i;l++)a+=o.data[l];var c=Math.abs(Math.ceil(a*100/i/5)-10);return c*t.N4};function n(r,o,a){switch(r){case e.Patterns.PATTERN000:return(o+a)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return a%3===0;case e.Patterns.PATTERN011:return(o+a)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(a/3))%2===0;case e.Patterns.PATTERN101:return o*a%2+o*a%3===0;case e.Patterns.PATTERN110:return(o*a%2+o*a%3)%2===0;case e.Patterns.PATTERN111:return(o*a%3+(o+a)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(o,a){for(var i=a.size,l=0;l<i;l++)for(var c=0;c<i;c++)a.isReserved(c,l)||a.xor(c,l,n(o,c,l))},e.getBestMask=function(o,a){for(var i=Object.keys(e.Patterns).length,l=0,c=1/0,u=0;u<i;u++){a(u),e.applyMask(u,o);var s=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(u,o),s<c&&(c=s,l=u)}return l}})(kn);var ke={},q=Se,pe=[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],me=[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];ke.getBlocksCount=function(t,n){switch(n){case q.L:return pe[(t-1)*4+0];case q.M:return pe[(t-1)*4+1];case q.Q:return pe[(t-1)*4+2];case q.H:return pe[(t-1)*4+3];default:return}};ke.getTotalCodewordsCount=function(t,n){switch(n){case q.L:return me[(t-1)*4+0];case q.M:return me[(t-1)*4+1];case q.Q:return me[(t-1)*4+2];case q.H:return me[(t-1)*4+3];default:return}};var An={},Ae={},Nn=K,ie=Nn.alloc(512),we=Nn.alloc(256);(function(){for(var t=1,n=0;n<255;n++)ie[n]=t,we[t]=n,t<<=1,t&256&&(t^=285);for(n=255;n<512;n++)ie[n]=ie[n-255]})();Ae.log=function(t){if(t<1)throw new Error("log("+t+")");return we[t]};Ae.exp=function(t){return ie[t]};Ae.mul=function(t,n){return t===0||n===0?0:ie[we[t]+we[n]]};(function(e){var t=K,n=Ae;e.mul=function(o,a){for(var i=t.alloc(o.length+a.length-1),l=0;l<o.length;l++)for(var c=0;c<a.length;c++)i[l+c]^=n.mul(o[l],a[c]);return i},e.mod=function(o,a){for(var i=t.from(o);i.length-a.length>=0;){for(var l=i[0],c=0;c<a.length;c++)i[c]^=n.mul(a[c],l);for(var u=0;u<i.length&&i[u]===0;)u++;i=i.slice(u)}return i},e.generateECPolynomial=function(o){for(var a=t.from([1]),i=0;i<o;i++)a=e.mul(a,[1,n.exp(i)]);return a}})(An);var Tt=K,Bn=An,Vo=B.bufferPolyfill.Buffer;function nt(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}nt.prototype.initialize=function(t){this.degree=t,this.genPoly=Bn.generateECPolynomial(this.degree)};nt.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var n=Tt.alloc(this.degree),r=Vo.concat([t,n],t.length+this.degree),o=Bn.mod(r,this.genPoly),a=this.degree-o.length;if(a>0){var i=Tt.alloc(this.degree);return o.copy(i,a),i}return o};var Yo=nt,Rn={},V={},rt={};rt.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var D={},Ln="[0-9]+",Qo="[A-Z $%*+\\-./:]+",se="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";se=se.replace(/u/g,"\\u");var Jo="(?:(?![A-Z0-9 $%*+\\-./:]|"+se+`)(?:.|[\r
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("./index-DiFBiIsU.js"),kr=require("./dijkstra-dsi_GddY.js"),Qt=require("./index.es-dyXbfeDn.js"),pt=require("./index.es-JGv9-9pp.js");require("react");require("react-dom");var Ar=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(o){e.addRange(o)}),t&&t.focus()}},Nr=Ar,mt={"text/plain":"Text","text/html":"Url",default:"Text"},Br="Copy to clipboard: #{key}, Enter";function Rr(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function Lr(e,t){var n,r,o,a,i,l,c=!1;t||(t={}),n=t.debug||!1;try{o=Nr(),a=document.createRange(),i=document.getSelection(),l=document.createElement("span"),l.textContent=e,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",function(s){if(s.stopPropagation(),t.format)if(s.preventDefault(),typeof s.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=mt[t.format]||mt.default;window.clipboardData.setData(d,e)}else s.clipboardData.clearData(),s.clipboardData.setData(t.format,e);t.onCopy&&(s.preventDefault(),t.onCopy(s.clipboardData))}),document.body.appendChild(l),a.selectNodeContents(l),i.addRange(a);var u=document.execCommand("copy");if(!u)throw new Error("copy command was unsuccessful");c=!0}catch(s){n&&console.error("unable to copy using execCommand: ",s),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=Rr("message"in t?t.message:Br),window.prompt(r,e)}}finally{i&&(typeof i.removeRange=="function"?i.removeRange(a):i.removeAllRanges()),l&&document.body.removeChild(l),o()}return c}var Mr=Lr,Ge={},A={};Object.defineProperty(A,"__esModule",{value:!0});var Jt=A.getLocalStorage=ln=A.getLocalStorageOrThrow=an=A.getCrypto=on=A.getCryptoOrThrow=rn=A.getLocation=nn=A.getLocationOrThrow=tn=A.getNavigator=en=A.getNavigatorOrThrow=Zt=A.getDocument=Xt=A.getDocumentOrThrow=Gt=A.getFromWindowOrThrow=jt=A.getFromWindow=void 0;function Q(e){let t;return typeof window<"u"&&typeof window[e]<"u"&&(t=window[e]),t}var jt=A.getFromWindow=Q;function re(e){const t=Q(e);if(!t)throw new Error(`${e} is not defined in Window`);return t}var Gt=A.getFromWindowOrThrow=re;function Pr(){return re("document")}var Xt=A.getDocumentOrThrow=Pr;function Or(){return Q("document")}var Zt=A.getDocument=Or;function Ir(){return re("navigator")}var en=A.getNavigatorOrThrow=Ir;function Dr(){return Q("navigator")}var tn=A.getNavigator=Dr;function Ur(){return re("location")}var nn=A.getLocationOrThrow=Ur;function $r(){return Q("location")}var rn=A.getLocation=$r;function Wr(){return re("crypto")}var on=A.getCryptoOrThrow=Wr;function Fr(){return Q("crypto")}var an=A.getCrypto=Fr;function zr(){return re("localStorage")}var ln=A.getLocalStorageOrThrow=zr;function qr(){return Q("localStorage")}Jt=A.getLocalStorage=qr;Object.defineProperty(Ge,"__esModule",{value:!0});var cn=Ge.getWindowMetadata=void 0;const vt=A;function Hr(){let e,t;try{e=vt.getDocumentOrThrow(),t=vt.getLocationOrThrow()}catch{return null}function n(){const d=e.getElementsByTagName("link"),y=[];for(let _=0;_<d.length;_++){const h=d[_],b=h.getAttribute("rel");if(b&&b.toLowerCase().indexOf("icon")>-1){const f=h.getAttribute("href");if(f)if(f.toLowerCase().indexOf("https:")===-1&&f.toLowerCase().indexOf("http:")===-1&&f.indexOf("//")!==0){let v=t.protocol+"//"+t.host;if(f.indexOf("/")===0)v+=f;else{const m=t.pathname.split("/");m.pop();const g=m.join("/");v+=g+"/"+f}y.push(v)}else if(f.indexOf("//")===0){const v=t.protocol+f;y.push(v)}else y.push(f)}}return y}function r(...d){const y=e.getElementsByTagName("meta");for(let _=0;_<y.length;_++){const h=y[_],b=["itemprop","property","name"].map(f=>h.getAttribute(f)).filter(f=>f?d.includes(f):!1);if(b.length&&b){const f=h.getAttribute("content");if(f)return f}}return""}function o(){let d=r("name","og:site_name","og:title","twitter:title");return d||(d=e.title),d}function a(){return r("description","og:description","twitter:description","keywords")}const i=o(),l=a(),c=t.origin,u=n();return{description:l,url:c,icons:u,name:i}}cn=Ge.getWindowMetadata=Hr;var Kr=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var a=arguments[t],i=0,l=a.length;i<l;i++,o++)r[o]=a[i];return r},Vr=function(){function e(t,n,r){this.name=t,this.version=n,this.os=r,this.type="browser"}return e}(),Yr=function(){function e(t){this.version=t,this.type="node",this.name="node",this.os=B.dist.process.platform}return e}(),Qr=function(){function e(t,n,r,o){this.name=t,this.version=n,this.os=r,this.bot=o,this.type="bot-device"}return e}(),Jr=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),jr=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),Gr=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,Xr=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,wt=3,Zr=[["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",Gr]],yt=[["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 eo(e){return e?bt(e):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new jr:typeof navigator<"u"?bt(navigator.userAgent):ro()}function to(e){return e!==""&&Zr.reduce(function(t,n){var r=n[0],o=n[1];if(t)return t;var a=o.exec(e);return!!a&&[r,a]},!1)}function bt(e){var t=to(e);if(!t)return null;var n=t[0],r=t[1];if(n==="searchbot")return new Jr;var o=r[1]&&r[1].split(/[._]/).slice(0,3);o?o.length<wt&&(o=Kr(o,oo(wt-o.length))):o=[];var a=o.join("."),i=no(e),l=Xr.exec(e);return l&&l[1]?new Qr(n,a,i,l[1]):new Vr(n,a,i)}function no(e){for(var t=0,n=yt.length;t<n;t++){var r=yt[t],o=r[0],a=r[1],i=a.exec(e);if(i)return o}return null}function ro(){var e=typeof B.dist.process<"u"&&B.dist.process.version;return e?new Yr(B.dist.process.version.slice(1)):null}function oo(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}function Xe(e){return eo(e)}function xe(){const e=Xe();return e&&e.os?e.os:void 0}function sn(){const e=xe();return e?e.toLowerCase().includes("android"):!1}function un(){const e=xe();return e?e.toLowerCase().includes("ios")||e.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1:!1}function ao(){return xe()?sn()||un():!1}function fn(){const e=Xe();return e&&e.name?e.name.toLowerCase()==="node":!1}function io(){return!fn()&&!!dn()}const lo=jt,co=Gt,so=Xt,uo=Zt,fo=en,dn=tn,_o=nn,ho=rn,go=on,po=an,mo=ln,Te=Jt;function vo(){return cn()}function wo(e){if(typeof e!="string")throw new Error(`Cannot safe json parse value of type ${typeof e}`);try{return JSON.parse(e)}catch{return e}}function yo(e){return typeof e=="string"?e:JSON.stringify(e)}const _n=wo,hn=yo;function gn(e,t){const n=hn(t),r=Te();r&&r.setItem(e,n)}function bo(e){let t=null,n=null;const r=Te();return r&&(n=r.getItem(e)),t=n&&_n(n),t}function Co(e){const t=Te();t&&t.removeItem(e)}const pn="WALLETCONNECT_DEEPLINK_CHOICE";function Eo(e,t){const n=encodeURIComponent(e);return t.universalLink?`${t.universalLink}/wc?uri=${n}`:t.deepLink?`${t.deepLink}${t.deepLink.endsWith(":")?"//":"/"}wc?uri=${n}`:""}function xo(e){const t=e.href.split("?")[0];gn(pn,Object.assign(Object.assign({},e),{href:t}))}function mn(e,t){return e.filter(n=>n.name.toLowerCase().includes(t.toLowerCase()))[0]}function To(e,t){let n=e;return t&&(n=t.map(r=>mn(e,r)).filter(Boolean)),n}const vn="https://registry.walletconnect.com";function So(){return vn+"/api/v2/wallets"}function ko(){return vn+"/api/v2/dapps"}function wn(e,t="mobile"){var n;return{name:e.name||"",shortName:e.metadata.shortName||"",color:e.metadata.colors.primary||"",logo:(n=e.image_url.sm)!==null&&n!==void 0?n:"",universalLink:e[t].universal||"",deepLink:e[t].native||""}}function Ao(e,t="mobile"){return Object.values(e).filter(n=>!!n[t].universal||!!n[t].native).map(n=>wn(n,t))}const No=Object.freeze(Object.defineProperty({__proto__:null,detectEnv:Xe,detectOS:xe,formatIOSMobile:Eo,formatMobileRegistry:Ao,formatMobileRegistryEntry:wn,getClientMeta:vo,getCrypto:po,getCryptoOrThrow:go,getDappRegistryUrl:ko,getDocument:uo,getDocumentOrThrow:so,getFromWindow:lo,getFromWindowOrThrow:co,getLocal:bo,getLocalStorage:Te,getLocalStorageOrThrow:mo,getLocation:ho,getLocationOrThrow:_o,getMobileLinkRegistry:To,getMobileRegistryEntry:mn,getNavigator:dn,getNavigatorOrThrow:fo,getWalletRegistryUrl:So,isAndroid:sn,isBrowser:io,isIOS:un,isMobile:ao,isNode:fn,mobileLinkChoiceKey:pn,removeLocal:Co,safeJsonParse:_n,safeJsonStringify:hn,saveMobileLinkInfo:xo,setLocal:gn},Symbol.toStringTag,{value:"Module"})),Bo=B.getAugmentedNamespace(No);var de={},Ro=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},yn={},K={},Lo={}.toString,Ze=Array.isArray||function(e){return Lo.call(e)=="[object Array]"},Mo=Ze;function Po(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},e.foo()===42}catch{return!1}}T.TYPED_ARRAY_SUPPORT=Po();var Ct=T.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function T(e,t,n){return!T.TYPED_ARRAY_SUPPORT&&!(this instanceof T)?new T(e,t,n):typeof e=="number"?bn(this,e):Fo(this,e,t,n)}T.TYPED_ARRAY_SUPPORT&&(T.prototype.__proto__=Uint8Array.prototype,T.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&T[Symbol.species]===T&&Object.defineProperty(T,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function et(e){if(e>=Ct)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Ct.toString(16)+" bytes");return e|0}function Oo(e){return e!==e}function G(e,t){var n;return T.TYPED_ARRAY_SUPPORT?(n=new Uint8Array(t),n.__proto__=T.prototype):(n=e,n===null&&(n=new T(t)),n.length=t),n}function bn(e,t){var n=G(e,t<0?0:et(t)|0);if(!T.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)n[r]=0;return n}function Io(e,t){var n=En(t)|0,r=G(e,n),o=r.write(t);return o!==n&&(r=r.slice(0,o)),r}function Fe(e,t){for(var n=t.length<0?0:et(t.length)|0,r=G(e,n),o=0;o<n;o+=1)r[o]=t[o]&255;return r}function Do(e,t,n,r){if(n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");var o;return n===void 0&&r===void 0?o=new Uint8Array(t):r===void 0?o=new Uint8Array(t,n):o=new Uint8Array(t,n,r),T.TYPED_ARRAY_SUPPORT?o.__proto__=T.prototype:o=Fe(e,o),o}function Uo(e,t){if(T.isBuffer(t)){var n=et(t.length)|0,r=G(e,n);return r.length===0||t.copy(r,0,0,n),r}if(t){if(typeof ArrayBuffer<"u"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||Oo(t.length)?G(e,0):Fe(e,t);if(t.type==="Buffer"&&Array.isArray(t.data))return Fe(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Cn(e,t){t=t||1/0;for(var n,r=e.length,o=null,a=[],i=0;i<r;++i){if(n=e.charCodeAt(i),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(i+1===r){(t-=3)>-1&&a.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return a}function En(e){if(T.isBuffer(e))return e.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;typeof e!="string"&&(e=""+e);var t=e.length;return t===0?0:Cn(e).length}function $o(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function Wo(e,t,n,r){return $o(Cn(t,e.length-n),e,n,r)}function Fo(e,t,n,r){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer?Do(e,t,n,r):typeof t=="string"?Io(e,t):Uo(e,t)}T.prototype.write=function(t,n,r){n===void 0?(r=this.length,n=0):r===void 0&&typeof n=="string"?(r=this.length,n=0):isFinite(n)&&(n=n|0,isFinite(r)?r=r|0:r=void 0);var o=this.length-n;if((r===void 0||r>o)&&(r=o),t.length>0&&(r<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");return Wo(this,t,n,r)};T.prototype.slice=function(t,n){var r=this.length;t=~~t,n=n===void 0?r:~~n,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),n<t&&(n=t);var o;if(T.TYPED_ARRAY_SUPPORT)o=this.subarray(t,n),o.__proto__=T.prototype;else{var a=n-t;o=new T(a,void 0);for(var i=0;i<a;++i)o[i]=this[i+t]}return o};T.prototype.copy=function(t,n,r,o){if(r||(r=0),!o&&o!==0&&(o=this.length),n>=t.length&&(n=t.length),n||(n=0),o>0&&o<r&&(o=r),o===r||t.length===0||this.length===0)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-n<o-r&&(o=t.length-n+r);var a=o-r,i;if(this===t&&r<n&&n<o)for(i=a-1;i>=0;--i)t[i+n]=this[i+r];else if(a<1e3||!T.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+n]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+a),n);return a};T.prototype.fill=function(t,n,r){if(typeof t=="string"){if(typeof n=="string"?(n=0,r=this.length):typeof r=="string"&&(r=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}}else typeof t=="number"&&(t=t&255);if(n<0||this.length<n||this.length<r)throw new RangeError("Out of range index");if(r<=n)return this;n=n>>>0,r=r===void 0?this.length:r>>>0,t||(t=0);var a;if(typeof t=="number")for(a=n;a<r;++a)this[a]=t;else{var i=T.isBuffer(t)?t:new T(t),l=i.length;for(a=0;a<r-n;++a)this[a+n]=i[a%l]}return this};T.concat=function(t,n){if(!Mo(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return G(null,0);var r;if(n===void 0)for(n=0,r=0;r<t.length;++r)n+=t[r].length;var o=bn(null,n),a=0;for(r=0;r<t.length;++r){var i=t[r];if(!T.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(o,a),a+=i.length}return o};T.byteLength=En;T.prototype._isBuffer=!0;T.isBuffer=function(t){return!!(t!=null&&t._isBuffer)};K.alloc=function(e){var t=new T(e);return t.fill(0),t};K.from=function(e){return new T(e)};var O={},tt,zo=[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];O.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};O.getSymbolTotalCodewords=function(t){return zo[t]};O.getBCHDigit=function(e){for(var t=0;e!==0;)t++,e>>>=1;return t};O.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');tt=t};O.isKanjiModeEnabled=function(){return typeof tt<"u"};O.toSJIS=function(t){return tt(t)};var Se={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");var r=n.toLowerCase();switch(r){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,o){if(e.isValid(r))return r;try{return t(r)}catch{return o}}})(Se);function xn(){this.buffer=[],this.length=0}xn.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(var n=0;n<t;n++)this.putBit((e>>>t-n-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var qo=xn,Et=K;function _e(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=Et.alloc(e*e),this.reservedBit=Et.alloc(e*e)}_e.prototype.set=function(e,t,n,r){var o=e*this.size+t;this.data[o]=n,r&&(this.reservedBit[o]=!0)};_e.prototype.get=function(e,t){return this.data[e*this.size+t]};_e.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n};_e.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var Ho=_e,Tn={};(function(e){var t=O.getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];for(var o=Math.floor(r/7)+2,a=t(r),i=a===145?26:Math.ceil((a-13)/(2*o-2))*2,l=[a-7],c=1;c<o-1;c++)l[c]=l[c-1]-i;return l.push(6),l.reverse()},e.getPositions=function(r){for(var o=[],a=e.getRowColCoords(r),i=a.length,l=0;l<i;l++)for(var c=0;c<i;c++)l===0&&c===0||l===0&&c===i-1||l===i-1&&c===0||o.push([a[l],a[c]]);return o}})(Tn);var Sn={},Ko=O.getSymbolSize,xt=7;Sn.getPositions=function(t){var n=Ko(t);return[[0,0],[n-xt,0],[0,n-xt]]};var kn={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){for(var a=o.size,i=0,l=0,c=0,u=null,s=null,d=0;d<a;d++){l=c=0,u=s=null;for(var y=0;y<a;y++){var _=o.get(d,y);_===u?l++:(l>=5&&(i+=t.N1+(l-5)),u=_,l=1),_=o.get(y,d),_===s?c++:(c>=5&&(i+=t.N1+(c-5)),s=_,c=1)}l>=5&&(i+=t.N1+(l-5)),c>=5&&(i+=t.N1+(c-5))}return i},e.getPenaltyN2=function(o){for(var a=o.size,i=0,l=0;l<a-1;l++)for(var c=0;c<a-1;c++){var u=o.get(l,c)+o.get(l,c+1)+o.get(l+1,c)+o.get(l+1,c+1);(u===4||u===0)&&i++}return i*t.N2},e.getPenaltyN3=function(o){for(var a=o.size,i=0,l=0,c=0,u=0;u<a;u++){l=c=0;for(var s=0;s<a;s++)l=l<<1&2047|o.get(u,s),s>=10&&(l===1488||l===93)&&i++,c=c<<1&2047|o.get(s,u),s>=10&&(c===1488||c===93)&&i++}return i*t.N3},e.getPenaltyN4=function(o){for(var a=0,i=o.data.length,l=0;l<i;l++)a+=o.data[l];var c=Math.abs(Math.ceil(a*100/i/5)-10);return c*t.N4};function n(r,o,a){switch(r){case e.Patterns.PATTERN000:return(o+a)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return a%3===0;case e.Patterns.PATTERN011:return(o+a)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(a/3))%2===0;case e.Patterns.PATTERN101:return o*a%2+o*a%3===0;case e.Patterns.PATTERN110:return(o*a%2+o*a%3)%2===0;case e.Patterns.PATTERN111:return(o*a%3+(o+a)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(o,a){for(var i=a.size,l=0;l<i;l++)for(var c=0;c<i;c++)a.isReserved(c,l)||a.xor(c,l,n(o,c,l))},e.getBestMask=function(o,a){for(var i=Object.keys(e.Patterns).length,l=0,c=1/0,u=0;u<i;u++){a(u),e.applyMask(u,o);var s=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(u,o),s<c&&(c=s,l=u)}return l}})(kn);var ke={},q=Se,pe=[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],me=[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];ke.getBlocksCount=function(t,n){switch(n){case q.L:return pe[(t-1)*4+0];case q.M:return pe[(t-1)*4+1];case q.Q:return pe[(t-1)*4+2];case q.H:return pe[(t-1)*4+3];default:return}};ke.getTotalCodewordsCount=function(t,n){switch(n){case q.L:return me[(t-1)*4+0];case q.M:return me[(t-1)*4+1];case q.Q:return me[(t-1)*4+2];case q.H:return me[(t-1)*4+3];default:return}};var An={},Ae={},Nn=K,ie=Nn.alloc(512),we=Nn.alloc(256);(function(){for(var t=1,n=0;n<255;n++)ie[n]=t,we[t]=n,t<<=1,t&256&&(t^=285);for(n=255;n<512;n++)ie[n]=ie[n-255]})();Ae.log=function(t){if(t<1)throw new Error("log("+t+")");return we[t]};Ae.exp=function(t){return ie[t]};Ae.mul=function(t,n){return t===0||n===0?0:ie[we[t]+we[n]]};(function(e){var t=K,n=Ae;e.mul=function(o,a){for(var i=t.alloc(o.length+a.length-1),l=0;l<o.length;l++)for(var c=0;c<a.length;c++)i[l+c]^=n.mul(o[l],a[c]);return i},e.mod=function(o,a){for(var i=t.from(o);i.length-a.length>=0;){for(var l=i[0],c=0;c<a.length;c++)i[c]^=n.mul(a[c],l);for(var u=0;u<i.length&&i[u]===0;)u++;i=i.slice(u)}return i},e.generateECPolynomial=function(o){for(var a=t.from([1]),i=0;i<o;i++)a=e.mul(a,[1,n.exp(i)]);return a}})(An);var Tt=K,Bn=An,Vo=B.bufferPolyfill.Buffer;function nt(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}nt.prototype.initialize=function(t){this.degree=t,this.genPoly=Bn.generateECPolynomial(this.degree)};nt.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");var n=Tt.alloc(this.degree),r=Vo.concat([t,n],t.length+this.degree),o=Bn.mod(r,this.genPoly),a=this.degree-o.length;if(a>0){var i=Tt.alloc(this.degree);return o.copy(i,a),i}return o};var Yo=nt,Rn={},V={},rt={};rt.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var D={},Ln="[0-9]+",Qo="[A-Z $%*+\\-./:]+",se="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";se=se.replace(/u/g,"\\u");var Jo="(?:(?![A-Z0-9 $%*+\\-./:]|"+se+`)(?:.|[\r
2
2
  ]))+`;D.KANJI=new RegExp(se,"g");D.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");D.BYTE=new RegExp(Jo,"g");D.NUMERIC=new RegExp(Ln,"g");D.ALPHANUMERIC=new RegExp(Qo,"g");var jo=new RegExp("^"+se+"$"),Go=new RegExp("^"+Ln+"$"),Xo=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");D.testKanji=function(t){return jo.test(t)};D.testNumeric=function(t){return Go.test(t)};D.testAlphanumeric=function(t){return Xo.test(t)};(function(e){var t=rt,n=D;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(a,i){if(!a.ccBits)throw new Error("Invalid mode: "+a);if(!t.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?a.ccBits[0]:i<27?a.ccBits[1]:a.ccBits[2]},e.getBestModeForData=function(a){return n.testNumeric(a)?e.NUMERIC:n.testAlphanumeric(a)?e.ALPHANUMERIC:n.testKanji(a)?e.KANJI:e.BYTE},e.toString=function(a){if(a&&a.id)return a.id;throw new Error("Invalid mode")},e.isValid=function(a){return a&&a.bit&&a.ccBits};function r(o){if(typeof o!="string")throw new Error("Param is not a string");var a=o.toLowerCase();switch(a){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(a,i){if(e.isValid(a))return a;try{return r(a)}catch{return i}}})(V);(function(e){var t=O,n=ke,r=Se,o=V,a=rt,i=Ze,l=7973,c=t.getBCHDigit(l);function u(_,h,b){for(var f=1;f<=40;f++)if(h<=e.getCapacity(f,b,_))return f}function s(_,h){return o.getCharCountIndicator(_,h)+4}function d(_,h){var b=0;return _.forEach(function(f){var v=s(f.mode,h);b+=v+f.getBitsLength()}),b}function y(_,h){for(var b=1;b<=40;b++){var f=d(_,b);if(f<=e.getCapacity(b,h,o.MIXED))return b}}e.from=function(h,b){return a.isValid(h)?parseInt(h,10):b},e.getCapacity=function(h,b,f){if(!a.isValid(h))throw new Error("Invalid QR Code version");typeof f>"u"&&(f=o.BYTE);var v=t.getSymbolTotalCodewords(h),m=n.getTotalCodewordsCount(h,b),g=(v-m)*8;if(f===o.MIXED)return g;var p=g-s(f,h);switch(f){case o.NUMERIC:return Math.floor(p/10*3);case o.ALPHANUMERIC:return Math.floor(p/11*2);case o.KANJI:return Math.floor(p/13);case o.BYTE:default:return Math.floor(p/8)}},e.getBestVersionForData=function(h,b){var f,v=r.from(b,r.M);if(i(h)){if(h.length>1)return y(h,v);if(h.length===0)return 1;f=h[0]}else f=h;return u(f.mode,f.getLength(),v)},e.getEncodedBits=function(h){if(!a.isValid(h)||h<7)throw new Error("Invalid QR Code version");for(var b=h<<12;t.getBCHDigit(b)-c>=0;)b^=l<<t.getBCHDigit(b)-c;return h<<12|b}})(Rn);var Mn={},ze=O,Pn=1335,Zo=21522,St=ze.getBCHDigit(Pn);Mn.getEncodedBits=function(t,n){for(var r=t.bit<<3|n,o=r<<10;ze.getBCHDigit(o)-St>=0;)o^=Pn<<ze.getBCHDigit(o)-St;return(r<<10|o)^Zo};var On={},ea=V;function X(e){this.mode=ea.NUMERIC,this.data=e.toString()}X.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};X.prototype.getLength=function(){return this.data.length};X.prototype.getBitsLength=function(){return X.getBitsLength(this.data.length)};X.prototype.write=function(t){var n,r,o;for(n=0;n+3<=this.data.length;n+=3)r=this.data.substr(n,3),o=parseInt(r,10),t.put(o,10);var a=this.data.length-n;a>0&&(r=this.data.substr(n),o=parseInt(r,10),t.put(o,a*3+1))};var ta=X,na=V,Me=["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 Z(e){this.mode=na.ALPHANUMERIC,this.data=e}Z.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};Z.prototype.getLength=function(){return this.data.length};Z.prototype.getBitsLength=function(){return Z.getBitsLength(this.data.length)};Z.prototype.write=function(t){var n;for(n=0;n+2<=this.data.length;n+=2){var r=Me.indexOf(this.data[n])*45;r+=Me.indexOf(this.data[n+1]),t.put(r,11)}this.data.length%2&&t.put(Me.indexOf(this.data[n]),6)};var ra=Z,oa=K,aa=V;function ee(e){this.mode=aa.BYTE,this.data=oa.from(e)}ee.getBitsLength=function(t){return t*8};ee.prototype.getLength=function(){return this.data.length};ee.prototype.getBitsLength=function(){return ee.getBitsLength(this.data.length)};ee.prototype.write=function(e){for(var t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)};var ia=ee,la=V,ca=O;function te(e){this.mode=la.KANJI,this.data=e}te.getBitsLength=function(t){return t*13};te.prototype.getLength=function(){return this.data.length};te.prototype.getBitsLength=function(){return te.getBitsLength(this.data.length)};te.prototype.write=function(e){var t;for(t=0;t<this.data.length;t++){var n=ca.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
3
3
  Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}};var sa=te;(function(e){var t=V,n=ta,r=ra,o=ia,a=sa,i=D,l=O,c=kr.dijkstraExports;function u(v){return unescape(encodeURIComponent(v)).length}function s(v,m,g){for(var p=[],E;(E=v.exec(g))!==null;)p.push({data:E[0],index:E.index,mode:m,length:E[0].length});return p}function d(v){var m=s(i.NUMERIC,t.NUMERIC,v),g=s(i.ALPHANUMERIC,t.ALPHANUMERIC,v),p,E;l.isKanjiModeEnabled()?(p=s(i.BYTE,t.BYTE,v),E=s(i.KANJI,t.KANJI,v)):(p=s(i.BYTE_KANJI,t.BYTE,v),E=[]);var S=m.concat(g,p,E);return S.sort(function(x,k){return x.index-k.index}).map(function(x){return{data:x.data,mode:x.mode,length:x.length}})}function y(v,m){switch(m){case t.NUMERIC:return n.getBitsLength(v);case t.ALPHANUMERIC:return r.getBitsLength(v);case t.KANJI:return a.getBitsLength(v);case t.BYTE:return o.getBitsLength(v)}}function _(v){return v.reduce(function(m,g){var p=m.length-1>=0?m[m.length-1]:null;return p&&p.mode===g.mode?(m[m.length-1].data+=g.data,m):(m.push(g),m)},[])}function h(v){for(var m=[],g=0;g<v.length;g++){var p=v[g];switch(p.mode){case t.NUMERIC:m.push([p,{data:p.data,mode:t.ALPHANUMERIC,length:p.length},{data:p.data,mode:t.BYTE,length:p.length}]);break;case t.ALPHANUMERIC:m.push([p,{data:p.data,mode:t.BYTE,length:p.length}]);break;case t.KANJI:m.push([p,{data:p.data,mode:t.BYTE,length:u(p.data)}]);break;case t.BYTE:m.push([{data:p.data,mode:t.BYTE,length:u(p.data)}])}}return m}function b(v,m){for(var g={},p={start:{}},E=["start"],S=0;S<v.length;S++){for(var x=v[S],k=[],R=0;R<x.length;R++){var N=x[R],Y=""+S+R;k.push(Y),g[Y]={node:N,lastCount:0},p[Y]={};for(var U=0;U<E.length;U++){var P=E[U];g[P]&&g[P].node.mode===N.mode?(p[P][Y]=y(g[P].lastCount+N.length,N.mode)-y(g[P].lastCount,N.mode),g[P].lastCount+=N.length):(g[P]&&(g[P].lastCount=N.length),p[P][Y]=y(N.length,N.mode)+4+t.getCharCountIndicator(N.mode,m))}}E=k}for(U=0;U<E.length;U++)p[E[U]].end=0;return{map:p,table:g}}function f(v,m){var g,p=t.getBestModeForData(v);if(g=t.from(m,p),g!==t.BYTE&&g.bit<p.bit)throw new Error('"'+v+'" cannot be encoded with mode '+t.toString(g)+`.
4
4
  Suggested mode is: `+t.toString(p));switch(g===t.KANJI&&!l.isKanjiModeEnabled()&&(g=t.BYTE),g){case t.NUMERIC:return new n(v);case t.ALPHANUMERIC:return new r(v);case t.KANJI:return new a(v);case t.BYTE:return new o(v)}}e.fromArray=function(m){return m.reduce(function(g,p){return typeof p=="string"?g.push(f(p,null)):p.data&&g.push(f(p.data,p.mode)),g},[])},e.fromString=function(m,g){for(var p=d(m,l.isKanjiModeEnabled()),E=h(p),S=b(E,g),x=c.find_path(S.map,"start","end"),k=[],R=1;R<x.length-1;R++)k.push(S.table[x[R]].node);return e.fromArray(_(k))},e.rawSplit=function(m){return e.fromArray(d(m,l.isKanjiModeEnabled()))}})(On);var kt=K,Ne=O,Pe=Se,ua=qo,fa=Ho,da=Tn,_a=Sn,qe=kn,He=ke,ha=Yo,ye=Rn,ga=Mn,pa=V,Oe=On,ma=Ze;function va(e,t){for(var n=e.size,r=_a.getPositions(t),o=0;o<r.length;o++)for(var a=r[o][0],i=r[o][1],l=-1;l<=7;l++)if(!(a+l<=-1||n<=a+l))for(var c=-1;c<=7;c++)i+c<=-1||n<=i+c||(l>=0&&l<=6&&(c===0||c===6)||c>=0&&c<=6&&(l===0||l===6)||l>=2&&l<=4&&c>=2&&c<=4?e.set(a+l,i+c,!0,!0):e.set(a+l,i+c,!1,!0))}function wa(e){for(var t=e.size,n=8;n<t-8;n++){var r=n%2===0;e.set(n,6,r,!0),e.set(6,n,r,!0)}}function ya(e,t){for(var n=da.getPositions(t),r=0;r<n.length;r++)for(var o=n[r][0],a=n[r][1],i=-2;i<=2;i++)for(var l=-2;l<=2;l++)i===-2||i===2||l===-2||l===2||i===0&&l===0?e.set(o+i,a+l,!0,!0):e.set(o+i,a+l,!1,!0)}function ba(e,t){for(var n=e.size,r=ye.getEncodedBits(t),o,a,i,l=0;l<18;l++)o=Math.floor(l/3),a=l%3+n-8-3,i=(r>>l&1)===1,e.set(o,a,i,!0),e.set(a,o,i,!0)}function Ie(e,t,n){var r=e.size,o=ga.getEncodedBits(t,n),a,i;for(a=0;a<15;a++)i=(o>>a&1)===1,a<6?e.set(a,8,i,!0):a<8?e.set(a+1,8,i,!0):e.set(r-15+a,8,i,!0),a<8?e.set(8,r-a-1,i,!0):a<9?e.set(8,15-a-1+1,i,!0):e.set(8,15-a-1,i,!0);e.set(r-8,8,1,!0)}function Ca(e,t){for(var n=e.size,r=-1,o=n-1,a=7,i=0,l=n-1;l>0;l-=2)for(l===6&&l--;;){for(var c=0;c<2;c++)if(!e.isReserved(o,l-c)){var u=!1;i<t.length&&(u=(t[i]>>>a&1)===1),e.set(o,l-c,u),a--,a===-1&&(i++,a=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}function Ea(e,t,n){var r=new ua;n.forEach(function(u){r.put(u.mode.bit,4),r.put(u.getLength(),pa.getCharCountIndicator(u.mode,e)),u.write(r)});var o=Ne.getSymbolTotalCodewords(e),a=He.getTotalCodewordsCount(e,t),i=(o-a)*8;for(r.getLengthInBits()+4<=i&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);for(var l=(i-r.getLengthInBits())/8,c=0;c<l;c++)r.put(c%2?17:236,8);return xa(r,e,t)}function xa(e,t,n){for(var r=Ne.getSymbolTotalCodewords(t),o=He.getTotalCodewordsCount(t,n),a=r-o,i=He.getBlocksCount(t,n),l=r%i,c=i-l,u=Math.floor(r/i),s=Math.floor(a/i),d=s+1,y=u-s,_=new ha(y),h=0,b=new Array(i),f=new Array(i),v=0,m=kt.from(e.buffer),g=0;g<i;g++){var p=g<c?s:d;b[g]=m.slice(h,h+p),f[g]=_.encode(b[g]),h+=p,v=Math.max(v,p)}var E=kt.alloc(r),S=0,x,k;for(x=0;x<v;x++)for(k=0;k<i;k++)x<b[k].length&&(E[S++]=b[k][x]);for(x=0;x<y;x++)for(k=0;k<i;k++)E[S++]=f[k][x];return E}function Ta(e,t,n,r){var o;if(ma(e))o=Oe.fromArray(e);else if(typeof e=="string"){var a=t;if(!a){var i=Oe.rawSplit(e);a=ye.getBestVersionForData(i,n)}o=Oe.fromString(e,a||40)}else throw new Error("Invalid data");var l=ye.getBestVersionForData(o,n);if(!l)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=l;else if(t<l)throw new Error(`
@@ -1,7 +1,7 @@
1
- import { d as $, p as Jt, s as Nr, g as jt, a9 as Br, ad as Rr } from "./index-mmUC6z11.mjs";
1
+ import { d as $, p as Jt, s as Nr, g as jt, a9 as Br, ad as Rr } from "./index-TXf-Y_5p.mjs";
2
2
  import { d as Lr } from "./dijkstra-_4avdlbo.mjs";
3
- import { Q as Mr } from "./index.es-e1jl9j_3.mjs";
4
- import { U as Pr, z as Or } from "./index.es-5oDTE27I.mjs";
3
+ import { Q as Mr } from "./index.es-wdCYxk2S.mjs";
4
+ import { U as Pr, z as Or } from "./index.es-B2GmSqJ1.mjs";
5
5
  import "react";
6
6
  import "react-dom";
7
7
  var Ir = function() {
@@ -1,4 +1,4 @@
1
- import { aR as Yr, D as kr, d as V, p as Xr } from "./index-mmUC6z11.mjs";
1
+ import { aR as Yr, D as kr, d as V, p as Xr } from "./index-TXf-Y_5p.mjs";
2
2
  var At = {}, Qe = {}, R = {}, wr = {};
3
3
  (function(e) {
4
4
  Object.defineProperty(e, "__esModule", { value: !0 });
@@ -1,4 +1,4 @@
1
- "use strict";const H=require("./index-M1p_Eh-u.js");var Tt={},nt={},M={},gr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(u,l){var _=u>>>16&65535,D=u&65535,w=l>>>16&65535,y=l&65535;return D*y+(_*y+D*w<<16>>>0)|0}e.mul=Math.imul||t;function r(u,l){return u+l|0}e.add=r;function i(u,l){return u-l|0}e.sub=i;function o(u,l){return u<<l|u>>>32-l}e.rotl=o;function s(u,l){return u<<32-l|u>>>l}e.rotr=s;function b(u){return typeof u=="number"&&isFinite(u)&&Math.floor(u)===u}e.isInteger=Number.isInteger||b,e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(u){return e.isInteger(u)&&u>=-e.MAX_SAFE_INTEGER&&u<=e.MAX_SAFE_INTEGER}})(gr);Object.defineProperty(M,"__esModule",{value:!0});var pr=gr;function Qr(e,t){return t===void 0&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16}M.readInt16BE=Qr;function Zr(e,t){return t===void 0&&(t=0),(e[t+0]<<8|e[t+1])>>>0}M.readUint16BE=Zr;function en(e,t){return t===void 0&&(t=0),(e[t+1]<<8|e[t])<<16>>16}M.readInt16LE=en;function tn(e,t){return t===void 0&&(t=0),(e[t+1]<<8|e[t])>>>0}M.readUint16LE=tn;function mr(e,t,r){return t===void 0&&(t=new Uint8Array(2)),r===void 0&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}M.writeUint16BE=mr;M.writeInt16BE=mr;function Sr(e,t,r){return t===void 0&&(t=new Uint8Array(2)),r===void 0&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}M.writeUint16LE=Sr;M.writeInt16LE=Sr;function wt(e,t){return t===void 0&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}M.readInt32BE=wt;function vt(e,t){return t===void 0&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}M.readUint32BE=vt;function yt(e,t){return t===void 0&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}M.readInt32LE=yt;function gt(e,t){return t===void 0&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}M.readUint32LE=gt;function et(e,t,r){return t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}M.writeUint32BE=et;M.writeInt32BE=et;function tt(e,t,r){return t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}M.writeUint32LE=tt;M.writeInt32LE=tt;function rn(e,t){t===void 0&&(t=0);var r=wt(e,t),i=wt(e,t+4);return r*4294967296+i-(i>>31)*4294967296}M.readInt64BE=rn;function nn(e,t){t===void 0&&(t=0);var r=vt(e,t),i=vt(e,t+4);return r*4294967296+i}M.readUint64BE=nn;function on(e,t){t===void 0&&(t=0);var r=yt(e,t),i=yt(e,t+4);return i*4294967296+r-(r>>31)*4294967296}M.readInt64LE=on;function an(e,t){t===void 0&&(t=0);var r=gt(e,t),i=gt(e,t+4);return i*4294967296+r}M.readUint64LE=an;function Or(e,t,r){return t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0),et(e/4294967296>>>0,t,r),et(e>>>0,t,r+4),t}M.writeUint64BE=Or;M.writeInt64BE=Or;function Cr(e,t,r){return t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0),tt(e>>>0,t,r),tt(e/4294967296>>>0,t,r+4),t}M.writeUint64LE=Cr;M.writeInt64LE=Cr;function un(e,t,r){if(r===void 0&&(r=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var i=0,o=1,s=e/8+r-1;s>=r;s--)i+=t[s]*o,o*=256;return i}M.readUintBE=un;function sn(e,t,r){if(r===void 0&&(r=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var i=0,o=1,s=r;s<r+e/8;s++)i+=t[s]*o,o*=256;return i}M.readUintLE=sn;function cn(e,t,r,i){if(r===void 0&&(r=new Uint8Array(e/8)),i===void 0&&(i=0),e%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!pr.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var o=1,s=e/8+i-1;s>=i;s--)r[s]=t/o&255,o*=256;return r}M.writeUintBE=cn;function fn(e,t,r,i){if(r===void 0&&(r=new Uint8Array(e/8)),i===void 0&&(i=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!pr.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var o=1,s=i;s<i+e/8;s++)r[s]=t/o&255,o*=256;return r}M.writeUintLE=fn;function hn(e,t){t===void 0&&(t=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getFloat32(t)}M.readFloat32BE=hn;function ln(e,t){t===void 0&&(t=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getFloat32(t,!0)}M.readFloat32LE=ln;function dn(e,t){t===void 0&&(t=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getFloat64(t)}M.readFloat64BE=dn;function Dn(e,t){t===void 0&&(t=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getFloat64(t,!0)}M.readFloat64LE=Dn;function bn(e,t,r){t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0);var i=new DataView(t.buffer,t.byteOffset,t.byteLength);return i.setFloat32(r,e),t}M.writeFloat32BE=bn;function _n(e,t,r){t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0);var i=new DataView(t.buffer,t.byteOffset,t.byteLength);return i.setFloat32(r,e,!0),t}M.writeFloat32LE=_n;function En(e,t,r){t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0);var i=new DataView(t.buffer,t.byteOffset,t.byteLength);return i.setFloat64(r,e),t}M.writeFloat64BE=En;function wn(e,t,r){t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0);var i=new DataView(t.buffer,t.byteOffset,t.byteLength);return i.setFloat64(r,e,!0),t}M.writeFloat64LE=wn;var pe={};Object.defineProperty(pe,"__esModule",{value:!0});function vn(e){for(var t=0;t<e.length;t++)e[t]=0;return e}pe.wipe=vn;Object.defineProperty(nt,"__esModule",{value:!0});var _e=M,pt=pe,yn=20;function gn(e,t,r){for(var i=1634760805,o=857760878,s=2036477234,b=1797285236,u=r[3]<<24|r[2]<<16|r[1]<<8|r[0],l=r[7]<<24|r[6]<<16|r[5]<<8|r[4],_=r[11]<<24|r[10]<<16|r[9]<<8|r[8],D=r[15]<<24|r[14]<<16|r[13]<<8|r[12],w=r[19]<<24|r[18]<<16|r[17]<<8|r[16],y=r[23]<<24|r[22]<<16|r[21]<<8|r[20],v=r[27]<<24|r[26]<<16|r[25]<<8|r[24],g=r[31]<<24|r[30]<<16|r[29]<<8|r[28],S=t[3]<<24|t[2]<<16|t[1]<<8|t[0],p=t[7]<<24|t[6]<<16|t[5]<<8|t[4],A=t[11]<<24|t[10]<<16|t[9]<<8|t[8],d=t[15]<<24|t[14]<<16|t[13]<<8|t[12],E=i,c=o,h=s,f=b,n=u,a=l,m=_,C=D,N=w,P=y,R=v,j=g,I=S,F=p,O=A,T=d,Y=0;Y<yn;Y+=2)E=E+n|0,I^=E,I=I>>>16|I<<16,N=N+I|0,n^=N,n=n>>>20|n<<12,c=c+a|0,F^=c,F=F>>>16|F<<16,P=P+F|0,a^=P,a=a>>>20|a<<12,h=h+m|0,O^=h,O=O>>>16|O<<16,R=R+O|0,m^=R,m=m>>>20|m<<12,f=f+C|0,T^=f,T=T>>>16|T<<16,j=j+T|0,C^=j,C=C>>>20|C<<12,h=h+m|0,O^=h,O=O>>>24|O<<8,R=R+O|0,m^=R,m=m>>>25|m<<7,f=f+C|0,T^=f,T=T>>>24|T<<8,j=j+T|0,C^=j,C=C>>>25|C<<7,c=c+a|0,F^=c,F=F>>>24|F<<8,P=P+F|0,a^=P,a=a>>>25|a<<7,E=E+n|0,I^=E,I=I>>>24|I<<8,N=N+I|0,n^=N,n=n>>>25|n<<7,E=E+a|0,T^=E,T=T>>>16|T<<16,R=R+T|0,a^=R,a=a>>>20|a<<12,c=c+m|0,I^=c,I=I>>>16|I<<16,j=j+I|0,m^=j,m=m>>>20|m<<12,h=h+C|0,F^=h,F=F>>>16|F<<16,N=N+F|0,C^=N,C=C>>>20|C<<12,f=f+n|0,O^=f,O=O>>>16|O<<16,P=P+O|0,n^=P,n=n>>>20|n<<12,h=h+C|0,F^=h,F=F>>>24|F<<8,N=N+F|0,C^=N,C=C>>>25|C<<7,f=f+n|0,O^=f,O=O>>>24|O<<8,P=P+O|0,n^=P,n=n>>>25|n<<7,c=c+m|0,I^=c,I=I>>>24|I<<8,j=j+I|0,m^=j,m=m>>>25|m<<7,E=E+a|0,T^=E,T=T>>>24|T<<8,R=R+T|0,a^=R,a=a>>>25|a<<7;_e.writeUint32LE(E+i|0,e,0),_e.writeUint32LE(c+o|0,e,4),_e.writeUint32LE(h+s|0,e,8),_e.writeUint32LE(f+b|0,e,12),_e.writeUint32LE(n+u|0,e,16),_e.writeUint32LE(a+l|0,e,20),_e.writeUint32LE(m+_|0,e,24),_e.writeUint32LE(C+D|0,e,28),_e.writeUint32LE(N+w|0,e,32),_e.writeUint32LE(P+y|0,e,36),_e.writeUint32LE(R+v|0,e,40),_e.writeUint32LE(j+g|0,e,44),_e.writeUint32LE(I+S|0,e,48),_e.writeUint32LE(F+p|0,e,52),_e.writeUint32LE(O+A|0,e,56),_e.writeUint32LE(T+d|0,e,60)}function Ur(e,t,r,i,o){if(o===void 0&&(o=0),e.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(i.length<r.length)throw new Error("ChaCha: destination is shorter than source");var s,b;if(o===0){if(t.length!==8&&t.length!==12)throw new Error("ChaCha nonce must be 8 or 12 bytes");s=new Uint8Array(16),b=s.length-t.length,s.set(t,b)}else{if(t.length!==16)throw new Error("ChaCha nonce with counter must be 16 bytes");s=t,b=o}for(var u=new Uint8Array(64),l=0;l<r.length;l+=64){gn(u,s,e);for(var _=l;_<l+64&&_<r.length;_++)i[_]=r[_]^u[_-l];mn(s,0,b)}return pt.wipe(u),o===0&&pt.wipe(s),i}nt.streamXOR=Ur;function pn(e,t,r,i){return i===void 0&&(i=0),pt.wipe(r),Ur(e,t,r,r,i)}nt.stream=pn;function mn(e,t,r){for(var i=1;r--;)i=i+(e[t]&255)|0,e[t]=i&255,i>>>=8,t++;if(i>0)throw new Error("ChaCha: counter overflow")}var Ar={},Ue={};Object.defineProperty(Ue,"__esModule",{value:!0});function Sn(e,t,r){return~(e-1)&t|e-1&r}Ue.select=Sn;function On(e,t){return(e|0)-(t|0)-1>>>31&1}Ue.lessOrEqual=On;function Nr(e,t){if(e.length!==t.length)return 0;for(var r=0,i=0;i<e.length;i++)r|=e[i]^t[i];return 1&r-1>>>8}Ue.compare=Nr;function Cn(e,t){return e.length===0||t.length===0?!1:Nr(e,t)!==0}Ue.equal=Cn;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Ue,r=pe;e.DIGEST_LENGTH=16;var i=function(){function b(u){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var l=u[0]|u[1]<<8;this._r[0]=l&8191;var _=u[2]|u[3]<<8;this._r[1]=(l>>>13|_<<3)&8191;var D=u[4]|u[5]<<8;this._r[2]=(_>>>10|D<<6)&7939;var w=u[6]|u[7]<<8;this._r[3]=(D>>>7|w<<9)&8191;var y=u[8]|u[9]<<8;this._r[4]=(w>>>4|y<<12)&255,this._r[5]=y>>>1&8190;var v=u[10]|u[11]<<8;this._r[6]=(y>>>14|v<<2)&8191;var g=u[12]|u[13]<<8;this._r[7]=(v>>>11|g<<5)&8065;var S=u[14]|u[15]<<8;this._r[8]=(g>>>8|S<<8)&8191,this._r[9]=S>>>5&127,this._pad[0]=u[16]|u[17]<<8,this._pad[1]=u[18]|u[19]<<8,this._pad[2]=u[20]|u[21]<<8,this._pad[3]=u[22]|u[23]<<8,this._pad[4]=u[24]|u[25]<<8,this._pad[5]=u[26]|u[27]<<8,this._pad[6]=u[28]|u[29]<<8,this._pad[7]=u[30]|u[31]<<8}return b.prototype._blocks=function(u,l,_){for(var D=this._fin?0:2048,w=this._h[0],y=this._h[1],v=this._h[2],g=this._h[3],S=this._h[4],p=this._h[5],A=this._h[6],d=this._h[7],E=this._h[8],c=this._h[9],h=this._r[0],f=this._r[1],n=this._r[2],a=this._r[3],m=this._r[4],C=this._r[5],N=this._r[6],P=this._r[7],R=this._r[8],j=this._r[9];_>=16;){var I=u[l+0]|u[l+1]<<8;w+=I&8191;var F=u[l+2]|u[l+3]<<8;y+=(I>>>13|F<<3)&8191;var O=u[l+4]|u[l+5]<<8;v+=(F>>>10|O<<6)&8191;var T=u[l+6]|u[l+7]<<8;g+=(O>>>7|T<<9)&8191;var Y=u[l+8]|u[l+9]<<8;S+=(T>>>4|Y<<12)&8191,p+=Y>>>1&8191;var Q=u[l+10]|u[l+11]<<8;A+=(Y>>>14|Q<<2)&8191;var J=u[l+12]|u[l+13]<<8;d+=(Q>>>11|J<<5)&8191;var X=u[l+14]|u[l+15]<<8;E+=(J>>>8|X<<8)&8191,c+=X>>>5|D;var U=0,L=U;L+=w*h,L+=y*(5*j),L+=v*(5*R),L+=g*(5*P),L+=S*(5*N),U=L>>>13,L&=8191,L+=p*(5*C),L+=A*(5*m),L+=d*(5*a),L+=E*(5*n),L+=c*(5*f),U+=L>>>13,L&=8191;var B=U;B+=w*f,B+=y*h,B+=v*(5*j),B+=g*(5*R),B+=S*(5*P),U=B>>>13,B&=8191,B+=p*(5*N),B+=A*(5*C),B+=d*(5*m),B+=E*(5*a),B+=c*(5*n),U+=B>>>13,B&=8191;var x=U;x+=w*n,x+=y*f,x+=v*h,x+=g*(5*j),x+=S*(5*R),U=x>>>13,x&=8191,x+=p*(5*P),x+=A*(5*N),x+=d*(5*C),x+=E*(5*m),x+=c*(5*a),U+=x>>>13,x&=8191;var $=U;$+=w*a,$+=y*n,$+=v*f,$+=g*h,$+=S*(5*j),U=$>>>13,$&=8191,$+=p*(5*R),$+=A*(5*P),$+=d*(5*N),$+=E*(5*C),$+=c*(5*m),U+=$>>>13,$&=8191;var K=U;K+=w*m,K+=y*a,K+=v*n,K+=g*f,K+=S*h,U=K>>>13,K&=8191,K+=p*(5*j),K+=A*(5*R),K+=d*(5*P),K+=E*(5*N),K+=c*(5*C),U+=K>>>13,K&=8191;var W=U;W+=w*C,W+=y*m,W+=v*a,W+=g*n,W+=S*f,U=W>>>13,W&=8191,W+=p*h,W+=A*(5*j),W+=d*(5*R),W+=E*(5*P),W+=c*(5*N),U+=W>>>13,W&=8191;var V=U;V+=w*N,V+=y*C,V+=v*m,V+=g*a,V+=S*n,U=V>>>13,V&=8191,V+=p*f,V+=A*h,V+=d*(5*j),V+=E*(5*R),V+=c*(5*P),U+=V>>>13,V&=8191;var q=U;q+=w*P,q+=y*N,q+=v*C,q+=g*m,q+=S*a,U=q>>>13,q&=8191,q+=p*n,q+=A*f,q+=d*h,q+=E*(5*j),q+=c*(5*R),U+=q>>>13,q&=8191;var G=U;G+=w*R,G+=y*P,G+=v*N,G+=g*C,G+=S*m,U=G>>>13,G&=8191,G+=p*a,G+=A*n,G+=d*f,G+=E*h,G+=c*(5*j),U+=G>>>13,G&=8191;var k=U;k+=w*j,k+=y*R,k+=v*P,k+=g*N,k+=S*C,U=k>>>13,k&=8191,k+=p*m,k+=A*a,k+=d*n,k+=E*f,k+=c*h,U+=k>>>13,k&=8191,U=(U<<2)+U|0,U=U+L|0,L=U&8191,U=U>>>13,B+=U,w=L,y=B,v=x,g=$,S=K,p=W,A=V,d=q,E=G,c=k,l+=16,_-=16}this._h[0]=w,this._h[1]=y,this._h[2]=v,this._h[3]=g,this._h[4]=S,this._h[5]=p,this._h[6]=A,this._h[7]=d,this._h[8]=E,this._h[9]=c},b.prototype.finish=function(u,l){l===void 0&&(l=0);var _=new Uint16Array(10),D,w,y,v;if(this._leftover){for(v=this._leftover,this._buffer[v++]=1;v<16;v++)this._buffer[v]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(D=this._h[1]>>>13,this._h[1]&=8191,v=2;v<10;v++)this._h[v]+=D,D=this._h[v]>>>13,this._h[v]&=8191;for(this._h[0]+=D*5,D=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=D,D=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=D,_[0]=this._h[0]+5,D=_[0]>>>13,_[0]&=8191,v=1;v<10;v++)_[v]=this._h[v]+D,D=_[v]>>>13,_[v]&=8191;for(_[9]-=8192,w=(D^1)-1,v=0;v<10;v++)_[v]&=w;for(w=~w,v=0;v<10;v++)this._h[v]=this._h[v]&w|_[v];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,y=this._h[0]+this._pad[0],this._h[0]=y&65535,v=1;v<8;v++)y=(this._h[v]+this._pad[v]|0)+(y>>>16)|0,this._h[v]=y&65535;return u[l+0]=this._h[0]>>>0,u[l+1]=this._h[0]>>>8,u[l+2]=this._h[1]>>>0,u[l+3]=this._h[1]>>>8,u[l+4]=this._h[2]>>>0,u[l+5]=this._h[2]>>>8,u[l+6]=this._h[3]>>>0,u[l+7]=this._h[3]>>>8,u[l+8]=this._h[4]>>>0,u[l+9]=this._h[4]>>>8,u[l+10]=this._h[5]>>>0,u[l+11]=this._h[5]>>>8,u[l+12]=this._h[6]>>>0,u[l+13]=this._h[6]>>>8,u[l+14]=this._h[7]>>>0,u[l+15]=this._h[7]>>>8,this._finished=!0,this},b.prototype.update=function(u){var l=0,_=u.length,D;if(this._leftover){D=16-this._leftover,D>_&&(D=_);for(var w=0;w<D;w++)this._buffer[this._leftover+w]=u[l+w];if(_-=D,l+=D,this._leftover+=D,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(_>=16&&(D=_-_%16,this._blocks(u,l,D),l+=D,_-=D),_){for(var w=0;w<_;w++)this._buffer[this._leftover+w]=u[l+w];this._leftover+=_}return this},b.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var u=new Uint8Array(16);return this.finish(u),u},b.prototype.clean=function(){return r.wipe(this._buffer),r.wipe(this._r),r.wipe(this._h),r.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},b}();e.Poly1305=i;function o(b,u){var l=new i(b);l.update(u);var _=l.digest();return l.clean(),_}e.oneTimeAuth=o;function s(b,u){return b.length!==e.DIGEST_LENGTH||u.length!==e.DIGEST_LENGTH?!1:t.equal(b,u)}e.equal=s})(Ar);(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=nt,r=Ar,i=pe,o=M,s=Ue;e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var b=new Uint8Array(16),u=function(){function l(_){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,_.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(_)}return l.prototype.seal=function(_,D,w,y){if(_.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var v=new Uint8Array(16);v.set(_,v.length-_.length);var g=new Uint8Array(32);t.stream(this._key,v,g,4);var S=D.length+this.tagLength,p;if(y){if(y.length!==S)throw new Error("ChaCha20Poly1305: incorrect destination length");p=y}else p=new Uint8Array(S);return t.streamXOR(this._key,v,D,p,4),this._authenticate(p.subarray(p.length-this.tagLength,p.length),g,p.subarray(0,p.length-this.tagLength),w),i.wipe(v),p},l.prototype.open=function(_,D,w,y){if(_.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(D.length<this.tagLength)return null;var v=new Uint8Array(16);v.set(_,v.length-_.length);var g=new Uint8Array(32);t.stream(this._key,v,g,4);var S=new Uint8Array(this.tagLength);if(this._authenticate(S,g,D.subarray(0,D.length-this.tagLength),w),!s.equal(S,D.subarray(D.length-this.tagLength,D.length)))return null;var p=D.length-this.tagLength,A;if(y){if(y.length!==p)throw new Error("ChaCha20Poly1305: incorrect destination length");A=y}else A=new Uint8Array(p);return t.streamXOR(this._key,v,D.subarray(0,D.length-this.tagLength),A,4),i.wipe(v),A},l.prototype.clean=function(){return i.wipe(this._key),this},l.prototype._authenticate=function(_,D,w,y){var v=new r.Poly1305(D);y&&(v.update(y),y.length%16>0&&v.update(b.subarray(y.length%16))),v.update(w),w.length%16>0&&v.update(b.subarray(w.length%16));var g=new Uint8Array(8);y&&o.writeUint64LE(y.length,g),v.update(g),o.writeUint64LE(w.length,g),v.update(g);for(var S=v.digest(),p=0;p<S.length;p++)_[p]=S[p];v.clean(),i.wipe(S),i.wipe(g)},l}();e.ChaCha20Poly1305=u})(Tt);var Tr={},qe={},It={};Object.defineProperty(It,"__esModule",{value:!0});function Un(e){return typeof e.saveState<"u"&&typeof e.restoreState<"u"&&typeof e.cleanSavedState<"u"}It.isSerializableHash=Un;Object.defineProperty(qe,"__esModule",{value:!0});var me=It,An=Ue,Nn=pe,Ir=function(){function e(t,r){this._finished=!1,this._inner=new t,this._outer=new t,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var i=new Uint8Array(this.blockSize);r.length>this.blockSize?this._inner.update(r).finish(i).clean():i.set(r);for(var o=0;o<i.length;o++)i[o]^=54;this._inner.update(i);for(var o=0;o<i.length;o++)i[o]^=106;this._outer.update(i),me.isSerializableHash(this._inner)&&me.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),Nn.wipe(i)}return e.prototype.reset=function(){if(!me.isSerializableHash(this._inner)||!me.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){me.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),me.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(t){return this._inner.update(t),this},e.prototype.finish=function(t){return this._finished?(this._outer.finish(t),this):(this._inner.finish(t),this._outer.update(t.subarray(0,this.digestLength)).finish(t),this._finished=!0,this)},e.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},e.prototype.saveState=function(){if(!me.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(t){if(!me.isSerializableHash(this._inner)||!me.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(t),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(t){if(!me.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(t)},e}();qe.HMAC=Ir;function Tn(e,t,r){var i=new Ir(e,t);i.update(r);var o=i.digest();return i.clean(),o}qe.hmac=Tn;qe.equal=An.equal;Object.defineProperty(Tr,"__esModule",{value:!0});var Vt=qe,qt=pe,In=function(){function e(t,r,i,o){i===void 0&&(i=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=t,this._info=o;var s=Vt.hmac(this._hash,i,r);this._hmac=new Vt.HMAC(t,s),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var t=this._counter[0];if(t===0)throw new Error("hkdf: cannot expand more");this._hmac.reset(),t>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(t){for(var r=new Uint8Array(t),i=0;i<r.length;i++)this._bufpos===this._buffer.length&&this._fillBuffer(),r[i]=this._buffer[this._bufpos++];return r},e.prototype.clean=function(){this._hmac.clean(),qt.wipe(this._buffer),qt.wipe(this._counter),this._bufpos=0},e}(),Fn=Tr.HKDF=In,ze={},it={},ot={};Object.defineProperty(ot,"__esModule",{value:!0});ot.BrowserRandomSource=void 0;const zt=65536;class Mn{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const t=typeof self<"u"?self.crypto||self.msCrypto:null;t&&t.getRandomValues!==void 0&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const r=new Uint8Array(t);for(let i=0;i<r.length;i+=zt)this._crypto.getRandomValues(r.subarray(i,i+Math.min(r.length-i,zt)));return r}}ot.BrowserRandomSource=Mn;var at={};Object.defineProperty(at,"__esModule",{value:!0});at.NodeRandomSource=void 0;const Pn=pe;class jn{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof H.commonjsRequire<"u"){const t=H.requireCryptoBrowserify();t&&t.randomBytes&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let r=this._crypto.randomBytes(t);if(r.length!==t)throw new Error("NodeRandomSource: got fewer bytes than requested");const i=new Uint8Array(t);for(let o=0;o<i.length;o++)i[o]=r[o];return(0,Pn.wipe)(r),i}}at.NodeRandomSource=jn;Object.defineProperty(it,"__esModule",{value:!0});it.SystemRandomSource=void 0;const Rn=ot,Ln=at;class Bn{constructor(){if(this.isAvailable=!1,this.name="",this._source=new Rn.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new Ln.NodeRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Node";return}}randomBytes(t){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(t)}}it.SystemRandomSource=Bn;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const t=it,r=M,i=pe;e.defaultRandomSource=new t.SystemRandomSource;function o(_,D=e.defaultRandomSource){return D.randomBytes(_)}e.randomBytes=o;function s(_=e.defaultRandomSource){const D=o(4,_),w=(0,r.readUint32LE)(D);return(0,i.wipe)(D),w}e.randomUint32=s;const b="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function u(_,D=b,w=e.defaultRandomSource){if(D.length<2)throw new Error("randomString charset is too short");if(D.length>256)throw new Error("randomString charset is too long");let y="";const v=D.length,g=256-256%v;for(;_>0;){const S=o(Math.ceil(_*256/g),w);for(let p=0;p<S.length&&_>0;p++){const A=S[p];A<g&&(y+=D.charAt(A%v),_--)}(0,i.wipe)(S)}return y}e.randomString=u;function l(_,D=b,w=e.defaultRandomSource){const y=Math.ceil(_/(Math.log(D.length)/Math.LN2));return u(y,D,w)}e.randomStringForEntropy=l})(ze);var ut={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=M,r=pe;e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var i=function(){function u(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return u.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},u.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},u.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._temp),this.reset()},u.prototype.update=function(l,_){if(_===void 0&&(_=l.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var D=0;if(this._bytesHashed+=_,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&_>0;)this._buffer[this._bufferLength++]=l[D++],_--;this._bufferLength===this.blockSize&&(s(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(_>=this.blockSize&&(D=s(this._temp,this._state,l,D,_),_%=this.blockSize);_>0;)this._buffer[this._bufferLength++]=l[D++],_--;return this},u.prototype.finish=function(l){if(!this._finished){var _=this._bytesHashed,D=this._bufferLength,w=_/536870912|0,y=_<<3,v=_%64<56?64:128;this._buffer[D]=128;for(var g=D+1;g<v-8;g++)this._buffer[g]=0;t.writeUint32BE(w,this._buffer,v-8),t.writeUint32BE(y,this._buffer,v-4),s(this._temp,this._state,this._buffer,0,v),this._finished=!0}for(var g=0;g<this.digestLength/4;g++)t.writeUint32BE(this._state[g],l,g*4);return this},u.prototype.digest=function(){var l=new Uint8Array(this.digestLength);return this.finish(l),l},u.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},u.prototype.restoreState=function(l){return this._state.set(l.state),this._bufferLength=l.bufferLength,l.buffer&&this._buffer.set(l.buffer),this._bytesHashed=l.bytesHashed,this._finished=!1,this},u.prototype.cleanSavedState=function(l){r.wipe(l.state),l.buffer&&r.wipe(l.buffer),l.bufferLength=0,l.bytesHashed=0},u}();e.SHA256=i;var o=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function s(u,l,_,D,w){for(;w>=64;){for(var y=l[0],v=l[1],g=l[2],S=l[3],p=l[4],A=l[5],d=l[6],E=l[7],c=0;c<16;c++){var h=D+c*4;u[c]=t.readUint32BE(_,h)}for(var c=16;c<64;c++){var f=u[c-2],n=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10;f=u[c-15];var a=(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3;u[c]=(n+u[c-7]|0)+(a+u[c-16]|0)}for(var c=0;c<64;c++){var n=(((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&A^~p&d)|0)+(E+(o[c]+u[c]|0)|0)|0,a=((y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10))+(y&v^y&g^v&g)|0;E=d,d=A,A=p,p=S+n|0,S=g,g=v,v=y,y=n+a|0}l[0]+=y,l[1]+=v,l[2]+=g,l[3]+=S,l[4]+=p,l[5]+=A,l[6]+=d,l[7]+=E,D+=64,w-=64}return D}function b(u){var l=new i;l.update(u);var _=l.digest();return l.clean(),_}e.hash=b})(ut);var Ft={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;const t=ze,r=pe;e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;function i(c){const h=new Float64Array(16);if(c)for(let f=0;f<c.length;f++)h[f]=c[f];return h}const o=new Uint8Array(32);o[0]=9;const s=i([56129,1]);function b(c){let h=1;for(let f=0;f<16;f++){let n=c[f]+h+65535;h=Math.floor(n/65536),c[f]=n-h*65536}c[0]+=h-1+37*(h-1)}function u(c,h,f){const n=~(f-1);for(let a=0;a<16;a++){const m=n&(c[a]^h[a]);c[a]^=m,h[a]^=m}}function l(c,h){const f=i(),n=i();for(let a=0;a<16;a++)n[a]=h[a];b(n),b(n),b(n);for(let a=0;a<2;a++){f[0]=n[0]-65517;for(let C=1;C<15;C++)f[C]=n[C]-65535-(f[C-1]>>16&1),f[C-1]&=65535;f[15]=n[15]-32767-(f[14]>>16&1);const m=f[15]>>16&1;f[14]&=65535,u(n,f,1-m)}for(let a=0;a<16;a++)c[2*a]=n[a]&255,c[2*a+1]=n[a]>>8}function _(c,h){for(let f=0;f<16;f++)c[f]=h[2*f]+(h[2*f+1]<<8);c[15]&=32767}function D(c,h,f){for(let n=0;n<16;n++)c[n]=h[n]+f[n]}function w(c,h,f){for(let n=0;n<16;n++)c[n]=h[n]-f[n]}function y(c,h,f){let n,a,m=0,C=0,N=0,P=0,R=0,j=0,I=0,F=0,O=0,T=0,Y=0,Q=0,J=0,X=0,U=0,L=0,B=0,x=0,$=0,K=0,W=0,V=0,q=0,G=0,k=0,Ae=0,Pe=0,$e=0,Qe=0,ht=0,Wt=0,ee=f[0],te=f[1],re=f[2],ne=f[3],ie=f[4],oe=f[5],ae=f[6],ue=f[7],se=f[8],ce=f[9],fe=f[10],he=f[11],le=f[12],de=f[13],De=f[14],be=f[15];n=h[0],m+=n*ee,C+=n*te,N+=n*re,P+=n*ne,R+=n*ie,j+=n*oe,I+=n*ae,F+=n*ue,O+=n*se,T+=n*ce,Y+=n*fe,Q+=n*he,J+=n*le,X+=n*de,U+=n*De,L+=n*be,n=h[1],C+=n*ee,N+=n*te,P+=n*re,R+=n*ne,j+=n*ie,I+=n*oe,F+=n*ae,O+=n*ue,T+=n*se,Y+=n*ce,Q+=n*fe,J+=n*he,X+=n*le,U+=n*de,L+=n*De,B+=n*be,n=h[2],N+=n*ee,P+=n*te,R+=n*re,j+=n*ne,I+=n*ie,F+=n*oe,O+=n*ae,T+=n*ue,Y+=n*se,Q+=n*ce,J+=n*fe,X+=n*he,U+=n*le,L+=n*de,B+=n*De,x+=n*be,n=h[3],P+=n*ee,R+=n*te,j+=n*re,I+=n*ne,F+=n*ie,O+=n*oe,T+=n*ae,Y+=n*ue,Q+=n*se,J+=n*ce,X+=n*fe,U+=n*he,L+=n*le,B+=n*de,x+=n*De,$+=n*be,n=h[4],R+=n*ee,j+=n*te,I+=n*re,F+=n*ne,O+=n*ie,T+=n*oe,Y+=n*ae,Q+=n*ue,J+=n*se,X+=n*ce,U+=n*fe,L+=n*he,B+=n*le,x+=n*de,$+=n*De,K+=n*be,n=h[5],j+=n*ee,I+=n*te,F+=n*re,O+=n*ne,T+=n*ie,Y+=n*oe,Q+=n*ae,J+=n*ue,X+=n*se,U+=n*ce,L+=n*fe,B+=n*he,x+=n*le,$+=n*de,K+=n*De,W+=n*be,n=h[6],I+=n*ee,F+=n*te,O+=n*re,T+=n*ne,Y+=n*ie,Q+=n*oe,J+=n*ae,X+=n*ue,U+=n*se,L+=n*ce,B+=n*fe,x+=n*he,$+=n*le,K+=n*de,W+=n*De,V+=n*be,n=h[7],F+=n*ee,O+=n*te,T+=n*re,Y+=n*ne,Q+=n*ie,J+=n*oe,X+=n*ae,U+=n*ue,L+=n*se,B+=n*ce,x+=n*fe,$+=n*he,K+=n*le,W+=n*de,V+=n*De,q+=n*be,n=h[8],O+=n*ee,T+=n*te,Y+=n*re,Q+=n*ne,J+=n*ie,X+=n*oe,U+=n*ae,L+=n*ue,B+=n*se,x+=n*ce,$+=n*fe,K+=n*he,W+=n*le,V+=n*de,q+=n*De,G+=n*be,n=h[9],T+=n*ee,Y+=n*te,Q+=n*re,J+=n*ne,X+=n*ie,U+=n*oe,L+=n*ae,B+=n*ue,x+=n*se,$+=n*ce,K+=n*fe,W+=n*he,V+=n*le,q+=n*de,G+=n*De,k+=n*be,n=h[10],Y+=n*ee,Q+=n*te,J+=n*re,X+=n*ne,U+=n*ie,L+=n*oe,B+=n*ae,x+=n*ue,$+=n*se,K+=n*ce,W+=n*fe,V+=n*he,q+=n*le,G+=n*de,k+=n*De,Ae+=n*be,n=h[11],Q+=n*ee,J+=n*te,X+=n*re,U+=n*ne,L+=n*ie,B+=n*oe,x+=n*ae,$+=n*ue,K+=n*se,W+=n*ce,V+=n*fe,q+=n*he,G+=n*le,k+=n*de,Ae+=n*De,Pe+=n*be,n=h[12],J+=n*ee,X+=n*te,U+=n*re,L+=n*ne,B+=n*ie,x+=n*oe,$+=n*ae,K+=n*ue,W+=n*se,V+=n*ce,q+=n*fe,G+=n*he,k+=n*le,Ae+=n*de,Pe+=n*De,$e+=n*be,n=h[13],X+=n*ee,U+=n*te,L+=n*re,B+=n*ne,x+=n*ie,$+=n*oe,K+=n*ae,W+=n*ue,V+=n*se,q+=n*ce,G+=n*fe,k+=n*he,Ae+=n*le,Pe+=n*de,$e+=n*De,Qe+=n*be,n=h[14],U+=n*ee,L+=n*te,B+=n*re,x+=n*ne,$+=n*ie,K+=n*oe,W+=n*ae,V+=n*ue,q+=n*se,G+=n*ce,k+=n*fe,Ae+=n*he,Pe+=n*le,$e+=n*de,Qe+=n*De,ht+=n*be,n=h[15],L+=n*ee,B+=n*te,x+=n*re,$+=n*ne,K+=n*ie,W+=n*oe,V+=n*ae,q+=n*ue,G+=n*se,k+=n*ce,Ae+=n*fe,Pe+=n*he,$e+=n*le,Qe+=n*de,ht+=n*De,Wt+=n*be,m+=38*B,C+=38*x,N+=38*$,P+=38*K,R+=38*W,j+=38*V,I+=38*q,F+=38*G,O+=38*k,T+=38*Ae,Y+=38*Pe,Q+=38*$e,J+=38*Qe,X+=38*ht,U+=38*Wt,a=1,n=m+a+65535,a=Math.floor(n/65536),m=n-a*65536,n=C+a+65535,a=Math.floor(n/65536),C=n-a*65536,n=N+a+65535,a=Math.floor(n/65536),N=n-a*65536,n=P+a+65535,a=Math.floor(n/65536),P=n-a*65536,n=R+a+65535,a=Math.floor(n/65536),R=n-a*65536,n=j+a+65535,a=Math.floor(n/65536),j=n-a*65536,n=I+a+65535,a=Math.floor(n/65536),I=n-a*65536,n=F+a+65535,a=Math.floor(n/65536),F=n-a*65536,n=O+a+65535,a=Math.floor(n/65536),O=n-a*65536,n=T+a+65535,a=Math.floor(n/65536),T=n-a*65536,n=Y+a+65535,a=Math.floor(n/65536),Y=n-a*65536,n=Q+a+65535,a=Math.floor(n/65536),Q=n-a*65536,n=J+a+65535,a=Math.floor(n/65536),J=n-a*65536,n=X+a+65535,a=Math.floor(n/65536),X=n-a*65536,n=U+a+65535,a=Math.floor(n/65536),U=n-a*65536,n=L+a+65535,a=Math.floor(n/65536),L=n-a*65536,m+=a-1+37*(a-1),a=1,n=m+a+65535,a=Math.floor(n/65536),m=n-a*65536,n=C+a+65535,a=Math.floor(n/65536),C=n-a*65536,n=N+a+65535,a=Math.floor(n/65536),N=n-a*65536,n=P+a+65535,a=Math.floor(n/65536),P=n-a*65536,n=R+a+65535,a=Math.floor(n/65536),R=n-a*65536,n=j+a+65535,a=Math.floor(n/65536),j=n-a*65536,n=I+a+65535,a=Math.floor(n/65536),I=n-a*65536,n=F+a+65535,a=Math.floor(n/65536),F=n-a*65536,n=O+a+65535,a=Math.floor(n/65536),O=n-a*65536,n=T+a+65535,a=Math.floor(n/65536),T=n-a*65536,n=Y+a+65535,a=Math.floor(n/65536),Y=n-a*65536,n=Q+a+65535,a=Math.floor(n/65536),Q=n-a*65536,n=J+a+65535,a=Math.floor(n/65536),J=n-a*65536,n=X+a+65535,a=Math.floor(n/65536),X=n-a*65536,n=U+a+65535,a=Math.floor(n/65536),U=n-a*65536,n=L+a+65535,a=Math.floor(n/65536),L=n-a*65536,m+=a-1+37*(a-1),c[0]=m,c[1]=C,c[2]=N,c[3]=P,c[4]=R,c[5]=j,c[6]=I,c[7]=F,c[8]=O,c[9]=T,c[10]=Y,c[11]=Q,c[12]=J,c[13]=X,c[14]=U,c[15]=L}function v(c,h){y(c,h,h)}function g(c,h){const f=i();for(let n=0;n<16;n++)f[n]=h[n];for(let n=253;n>=0;n--)v(f,f),n!==2&&n!==4&&y(f,f,h);for(let n=0;n<16;n++)c[n]=f[n]}function S(c,h){const f=new Uint8Array(32),n=new Float64Array(80),a=i(),m=i(),C=i(),N=i(),P=i(),R=i();for(let O=0;O<31;O++)f[O]=c[O];f[31]=c[31]&127|64,f[0]&=248,_(n,h);for(let O=0;O<16;O++)m[O]=n[O];a[0]=N[0]=1;for(let O=254;O>=0;--O){const T=f[O>>>3]>>>(O&7)&1;u(a,m,T),u(C,N,T),D(P,a,C),w(a,a,C),D(C,m,N),w(m,m,N),v(N,P),v(R,a),y(a,C,a),y(C,m,P),D(P,a,C),w(a,a,C),v(m,a),w(C,N,R),y(a,C,s),D(a,a,N),y(C,C,a),y(a,N,R),y(N,m,n),v(m,P),u(a,m,T),u(C,N,T)}for(let O=0;O<16;O++)n[O+16]=a[O],n[O+32]=C[O],n[O+48]=m[O],n[O+64]=N[O];const j=n.subarray(32),I=n.subarray(16);g(j,j),y(I,I,j);const F=new Uint8Array(32);return l(F,I),F}e.scalarMult=S;function p(c){return S(c,o)}e.scalarMultBase=p;function A(c){if(c.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const h=new Uint8Array(c);return{publicKey:p(h),secretKey:h}}e.generateKeyPairFromSeed=A;function d(c){const h=(0,t.randomBytes)(32,c),f=A(h);return(0,r.wipe)(h),f}e.generateKeyPair=d;function E(c,h,f=!1){if(c.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(h.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const n=S(c,h);if(f){let a=0;for(let m=0;m<n.length;m++)a|=n[m];if(a===0)throw new Error("X25519: invalid shared key")}return n}e.sharedKey=E})(Ft);function Mt(e){return globalThis.Buffer!=null?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function Fr(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?Mt(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function mt(e,t){t||(t=e.reduce((o,s)=>o+s.length,0));const r=Fr(t);let i=0;for(const o of e)r.set(o,i),i+=o.length;return Mt(r)}function xn(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),i=0;i<r.length;i++)r[i]=255;for(var o=0;o<e.length;o++){var s=e.charAt(o),b=s.charCodeAt(0);if(r[b]!==255)throw new TypeError(s+" is ambiguous");r[b]=o}var u=e.length,l=e.charAt(0),_=Math.log(u)/Math.log(256),D=Math.log(256)/Math.log(u);function w(g){if(g instanceof Uint8Array||(ArrayBuffer.isView(g)?g=new Uint8Array(g.buffer,g.byteOffset,g.byteLength):Array.isArray(g)&&(g=Uint8Array.from(g))),!(g instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(g.length===0)return"";for(var S=0,p=0,A=0,d=g.length;A!==d&&g[A]===0;)A++,S++;for(var E=(d-A)*D+1>>>0,c=new Uint8Array(E);A!==d;){for(var h=g[A],f=0,n=E-1;(h!==0||f<p)&&n!==-1;n--,f++)h+=256*c[n]>>>0,c[n]=h%u>>>0,h=h/u>>>0;if(h!==0)throw new Error("Non-zero carry");p=f,A++}for(var a=E-p;a!==E&&c[a]===0;)a++;for(var m=l.repeat(S);a<E;++a)m+=e.charAt(c[a]);return m}function y(g){if(typeof g!="string")throw new TypeError("Expected String");if(g.length===0)return new Uint8Array;var S=0;if(g[S]!==" "){for(var p=0,A=0;g[S]===l;)p++,S++;for(var d=(g.length-S)*_+1>>>0,E=new Uint8Array(d);g[S];){var c=r[g.charCodeAt(S)];if(c===255)return;for(var h=0,f=d-1;(c!==0||h<A)&&f!==-1;f--,h++)c+=u*E[f]>>>0,E[f]=c%256>>>0,c=c/256>>>0;if(c!==0)throw new Error("Non-zero carry");A=h,S++}if(g[S]!==" "){for(var n=d-A;n!==d&&E[n]===0;)n++;for(var a=new Uint8Array(p+(d-n)),m=p;n!==d;)a[m++]=E[n++];return a}}}function v(g){var S=y(g);if(S)return S;throw new Error(`Non-${t} character`)}return{encode:w,decodeUnsafe:y,decode:v}}var $n=xn,Hn=$n;const Kn=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},Wn=e=>new TextEncoder().encode(e),Vn=e=>new TextDecoder().decode(e);class qn{constructor(t,r,i){this.name=t,this.prefix=r,this.baseEncode=i}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class zn{constructor(t,r,i){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=i}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return Mr(this,t)}}class Gn{constructor(t){this.decoders=t}or(t){return Mr(this,t)}decode(t){const r=t[0],i=this.decoders[r];if(i)return i.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Mr=(e,t)=>new Gn({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class Yn{constructor(t,r,i,o){this.name=t,this.prefix=r,this.baseEncode=i,this.baseDecode=o,this.encoder=new qn(t,r,i),this.decoder=new zn(t,r,o)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const st=({name:e,prefix:t,encode:r,decode:i})=>new Yn(e,t,r,i),Ge=({prefix:e,name:t,alphabet:r})=>{const{encode:i,decode:o}=Hn(r,t);return st({prefix:e,name:t,encode:i,decode:s=>Kn(o(s))})},kn=(e,t,r,i)=>{const o={};for(let D=0;D<t.length;++D)o[t[D]]=D;let s=e.length;for(;e[s-1]==="=";)--s;const b=new Uint8Array(s*r/8|0);let u=0,l=0,_=0;for(let D=0;D<s;++D){const w=o[e[D]];if(w===void 0)throw new SyntaxError(`Non-${i} character`);l=l<<r|w,u+=r,u>=8&&(u-=8,b[_++]=255&l>>u)}if(u>=r||255&l<<8-u)throw new SyntaxError("Unexpected end of data");return b},Xn=(e,t,r)=>{const i=t[t.length-1]==="=",o=(1<<r)-1;let s="",b=0,u=0;for(let l=0;l<e.length;++l)for(u=u<<8|e[l],b+=8;b>r;)b-=r,s+=t[o&u>>b];if(b&&(s+=t[o&u<<r-b]),i)for(;s.length*r&7;)s+="=";return s},Z=({name:e,prefix:t,bitsPerChar:r,alphabet:i})=>st({prefix:t,name:e,encode(o){return Xn(o,i,r)},decode(o){return kn(o,i,r,e)}}),Jn=st({prefix:"\0",name:"identity",encode:e=>Vn(e),decode:e=>Wn(e)}),Qn=Object.freeze(Object.defineProperty({__proto__:null,identity:Jn},Symbol.toStringTag,{value:"Module"})),Zn=Z({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),ei=Object.freeze(Object.defineProperty({__proto__:null,base2:Zn},Symbol.toStringTag,{value:"Module"})),ti=Z({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),ri=Object.freeze(Object.defineProperty({__proto__:null,base8:ti},Symbol.toStringTag,{value:"Module"})),ni=Ge({prefix:"9",name:"base10",alphabet:"0123456789"}),ii=Object.freeze(Object.defineProperty({__proto__:null,base10:ni},Symbol.toStringTag,{value:"Module"})),oi=Z({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),ai=Z({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),ui=Object.freeze(Object.defineProperty({__proto__:null,base16:oi,base16upper:ai},Symbol.toStringTag,{value:"Module"})),si=Z({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),ci=Z({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),fi=Z({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),hi=Z({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),li=Z({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),di=Z({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Di=Z({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),bi=Z({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),_i=Z({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Ei=Object.freeze(Object.defineProperty({__proto__:null,base32:si,base32hex:li,base32hexpad:Di,base32hexpadupper:bi,base32hexupper:di,base32pad:fi,base32padupper:hi,base32upper:ci,base32z:_i},Symbol.toStringTag,{value:"Module"})),wi=Ge({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),vi=Ge({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),yi=Object.freeze(Object.defineProperty({__proto__:null,base36:wi,base36upper:vi},Symbol.toStringTag,{value:"Module"})),gi=Ge({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),pi=Ge({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),mi=Object.freeze(Object.defineProperty({__proto__:null,base58btc:gi,base58flickr:pi},Symbol.toStringTag,{value:"Module"})),Si=Z({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Oi=Z({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Ci=Z({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Ui=Z({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Ai=Object.freeze(Object.defineProperty({__proto__:null,base64:Si,base64pad:Oi,base64url:Ci,base64urlpad:Ui},Symbol.toStringTag,{value:"Module"})),Pr=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Ni=Pr.reduce((e,t,r)=>(e[r]=t,e),[]),Ti=Pr.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function Ii(e){return e.reduce((t,r)=>(t+=Ni[r],t),"")}function Fi(e){const t=[];for(const r of e){const i=Ti[r.codePointAt(0)];if(i===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(i)}return new Uint8Array(t)}const Mi=st({prefix:"🚀",name:"base256emoji",encode:Ii,decode:Fi}),Pi=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:Mi},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const Gt={...Qn,...ei,...ri,...ii,...ui,...Ei,...yi,...mi,...Ai,...Pi};function jr(e,t,r,i){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:i}}}const Yt=jr("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),lt=jr("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{e=e.substring(1);const t=Fr(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),Rr={utf8:Yt,"utf-8":Yt,hex:Gt.base16,latin1:lt,ascii:lt,binary:lt,...Gt};function ye(e,t="utf8"){const r=Rr[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?Mt(globalThis.Buffer.from(e,"utf-8")):r.decoder.decode(`${r.prefix}${e}`)}function ge(e,t="utf8"){const r=Rr[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):r.encoder.encode(e).substring(1)}var kt=function(e,t,r){if(r||arguments.length===2)for(var i=0,o=t.length,s;i<o;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return e.concat(s||Array.prototype.slice.call(t))},ji=function(){function e(t,r,i){this.name=t,this.version=r,this.os=i,this.type="browser"}return e}(),Ri=function(){function e(t){this.version=t,this.type="node",this.name="node",this.os=H.dist.process.platform}return e}(),Li=function(){function e(t,r,i,o){this.name=t,this.version=r,this.os=i,this.bot=o,this.type="bot-device"}return e}(),Bi=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),xi=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),$i=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,Hi=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Xt=3,Ki=[["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|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["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",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",$i]],Jt=[["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/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["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 Wi(e){return e?Qt(e):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new xi:typeof navigator<"u"?Qt(navigator.userAgent):zi()}function Vi(e){return e!==""&&Ki.reduce(function(t,r){var i=r[0],o=r[1];if(t)return t;var s=o.exec(e);return!!s&&[i,s]},!1)}function Qt(e){var t=Vi(e);if(!t)return null;var r=t[0],i=t[1];if(r==="searchbot")return new Bi;var o=i[1]&&i[1].split(".").join("_").split("_").slice(0,3);o?o.length<Xt&&(o=kt(kt([],o,!0),Gi(Xt-o.length),!0)):o=[];var s=o.join("."),b=qi(e),u=Hi.exec(e);return u&&u[1]?new Li(r,s,b,u[1]):new ji(r,s,b)}function qi(e){for(var t=0,r=Jt.length;t<r;t++){var i=Jt[t],o=i[0],s=i[1],b=s.exec(e);if(b)return o}return null}function zi(){var e=typeof H.dist.process<"u"&&H.dist.process.version;return e?new Ri(H.dist.process.version.slice(1)):null}function Gi(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}var Oe={};/*! *****************************************************************************
1
+ "use strict";const H=require("./index-DiFBiIsU.js");var Tt={},nt={},M={},gr={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(u,l){var _=u>>>16&65535,D=u&65535,w=l>>>16&65535,y=l&65535;return D*y+(_*y+D*w<<16>>>0)|0}e.mul=Math.imul||t;function r(u,l){return u+l|0}e.add=r;function i(u,l){return u-l|0}e.sub=i;function o(u,l){return u<<l|u>>>32-l}e.rotl=o;function s(u,l){return u<<32-l|u>>>l}e.rotr=s;function b(u){return typeof u=="number"&&isFinite(u)&&Math.floor(u)===u}e.isInteger=Number.isInteger||b,e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(u){return e.isInteger(u)&&u>=-e.MAX_SAFE_INTEGER&&u<=e.MAX_SAFE_INTEGER}})(gr);Object.defineProperty(M,"__esModule",{value:!0});var pr=gr;function Qr(e,t){return t===void 0&&(t=0),(e[t+0]<<8|e[t+1])<<16>>16}M.readInt16BE=Qr;function Zr(e,t){return t===void 0&&(t=0),(e[t+0]<<8|e[t+1])>>>0}M.readUint16BE=Zr;function en(e,t){return t===void 0&&(t=0),(e[t+1]<<8|e[t])<<16>>16}M.readInt16LE=en;function tn(e,t){return t===void 0&&(t=0),(e[t+1]<<8|e[t])>>>0}M.readUint16LE=tn;function mr(e,t,r){return t===void 0&&(t=new Uint8Array(2)),r===void 0&&(r=0),t[r+0]=e>>>8,t[r+1]=e>>>0,t}M.writeUint16BE=mr;M.writeInt16BE=mr;function Sr(e,t,r){return t===void 0&&(t=new Uint8Array(2)),r===void 0&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t}M.writeUint16LE=Sr;M.writeInt16LE=Sr;function wt(e,t){return t===void 0&&(t=0),e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}M.readInt32BE=wt;function vt(e,t){return t===void 0&&(t=0),(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}M.readUint32BE=vt;function yt(e,t){return t===void 0&&(t=0),e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}M.readInt32LE=yt;function gt(e,t){return t===void 0&&(t=0),(e[t+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}M.readUint32LE=gt;function et(e,t,r){return t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0),t[r+0]=e>>>24,t[r+1]=e>>>16,t[r+2]=e>>>8,t[r+3]=e>>>0,t}M.writeUint32BE=et;M.writeInt32BE=et;function tt(e,t,r){return t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0),t[r+0]=e>>>0,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24,t}M.writeUint32LE=tt;M.writeInt32LE=tt;function rn(e,t){t===void 0&&(t=0);var r=wt(e,t),i=wt(e,t+4);return r*4294967296+i-(i>>31)*4294967296}M.readInt64BE=rn;function nn(e,t){t===void 0&&(t=0);var r=vt(e,t),i=vt(e,t+4);return r*4294967296+i}M.readUint64BE=nn;function on(e,t){t===void 0&&(t=0);var r=yt(e,t),i=yt(e,t+4);return i*4294967296+r-(r>>31)*4294967296}M.readInt64LE=on;function an(e,t){t===void 0&&(t=0);var r=gt(e,t),i=gt(e,t+4);return i*4294967296+r}M.readUint64LE=an;function Or(e,t,r){return t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0),et(e/4294967296>>>0,t,r),et(e>>>0,t,r+4),t}M.writeUint64BE=Or;M.writeInt64BE=Or;function Cr(e,t,r){return t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0),tt(e>>>0,t,r),tt(e/4294967296>>>0,t,r+4),t}M.writeUint64LE=Cr;M.writeInt64LE=Cr;function un(e,t,r){if(r===void 0&&(r=0),e%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var i=0,o=1,s=e/8+r-1;s>=r;s--)i+=t[s]*o,o*=256;return i}M.readUintBE=un;function sn(e,t,r){if(r===void 0&&(r=0),e%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var i=0,o=1,s=r;s<r+e/8;s++)i+=t[s]*o,o*=256;return i}M.readUintLE=sn;function cn(e,t,r,i){if(r===void 0&&(r=new Uint8Array(e/8)),i===void 0&&(i=0),e%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!pr.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var o=1,s=e/8+i-1;s>=i;s--)r[s]=t/o&255,o*=256;return r}M.writeUintBE=cn;function fn(e,t,r,i){if(r===void 0&&(r=new Uint8Array(e/8)),i===void 0&&(i=0),e%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!pr.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var o=1,s=i;s<i+e/8;s++)r[s]=t/o&255,o*=256;return r}M.writeUintLE=fn;function hn(e,t){t===void 0&&(t=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getFloat32(t)}M.readFloat32BE=hn;function ln(e,t){t===void 0&&(t=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getFloat32(t,!0)}M.readFloat32LE=ln;function dn(e,t){t===void 0&&(t=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getFloat64(t)}M.readFloat64BE=dn;function Dn(e,t){t===void 0&&(t=0);var r=new DataView(e.buffer,e.byteOffset,e.byteLength);return r.getFloat64(t,!0)}M.readFloat64LE=Dn;function bn(e,t,r){t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0);var i=new DataView(t.buffer,t.byteOffset,t.byteLength);return i.setFloat32(r,e),t}M.writeFloat32BE=bn;function _n(e,t,r){t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0);var i=new DataView(t.buffer,t.byteOffset,t.byteLength);return i.setFloat32(r,e,!0),t}M.writeFloat32LE=_n;function En(e,t,r){t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0);var i=new DataView(t.buffer,t.byteOffset,t.byteLength);return i.setFloat64(r,e),t}M.writeFloat64BE=En;function wn(e,t,r){t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0);var i=new DataView(t.buffer,t.byteOffset,t.byteLength);return i.setFloat64(r,e,!0),t}M.writeFloat64LE=wn;var pe={};Object.defineProperty(pe,"__esModule",{value:!0});function vn(e){for(var t=0;t<e.length;t++)e[t]=0;return e}pe.wipe=vn;Object.defineProperty(nt,"__esModule",{value:!0});var _e=M,pt=pe,yn=20;function gn(e,t,r){for(var i=1634760805,o=857760878,s=2036477234,b=1797285236,u=r[3]<<24|r[2]<<16|r[1]<<8|r[0],l=r[7]<<24|r[6]<<16|r[5]<<8|r[4],_=r[11]<<24|r[10]<<16|r[9]<<8|r[8],D=r[15]<<24|r[14]<<16|r[13]<<8|r[12],w=r[19]<<24|r[18]<<16|r[17]<<8|r[16],y=r[23]<<24|r[22]<<16|r[21]<<8|r[20],v=r[27]<<24|r[26]<<16|r[25]<<8|r[24],g=r[31]<<24|r[30]<<16|r[29]<<8|r[28],S=t[3]<<24|t[2]<<16|t[1]<<8|t[0],p=t[7]<<24|t[6]<<16|t[5]<<8|t[4],A=t[11]<<24|t[10]<<16|t[9]<<8|t[8],d=t[15]<<24|t[14]<<16|t[13]<<8|t[12],E=i,c=o,h=s,f=b,n=u,a=l,m=_,C=D,N=w,P=y,R=v,j=g,I=S,F=p,O=A,T=d,Y=0;Y<yn;Y+=2)E=E+n|0,I^=E,I=I>>>16|I<<16,N=N+I|0,n^=N,n=n>>>20|n<<12,c=c+a|0,F^=c,F=F>>>16|F<<16,P=P+F|0,a^=P,a=a>>>20|a<<12,h=h+m|0,O^=h,O=O>>>16|O<<16,R=R+O|0,m^=R,m=m>>>20|m<<12,f=f+C|0,T^=f,T=T>>>16|T<<16,j=j+T|0,C^=j,C=C>>>20|C<<12,h=h+m|0,O^=h,O=O>>>24|O<<8,R=R+O|0,m^=R,m=m>>>25|m<<7,f=f+C|0,T^=f,T=T>>>24|T<<8,j=j+T|0,C^=j,C=C>>>25|C<<7,c=c+a|0,F^=c,F=F>>>24|F<<8,P=P+F|0,a^=P,a=a>>>25|a<<7,E=E+n|0,I^=E,I=I>>>24|I<<8,N=N+I|0,n^=N,n=n>>>25|n<<7,E=E+a|0,T^=E,T=T>>>16|T<<16,R=R+T|0,a^=R,a=a>>>20|a<<12,c=c+m|0,I^=c,I=I>>>16|I<<16,j=j+I|0,m^=j,m=m>>>20|m<<12,h=h+C|0,F^=h,F=F>>>16|F<<16,N=N+F|0,C^=N,C=C>>>20|C<<12,f=f+n|0,O^=f,O=O>>>16|O<<16,P=P+O|0,n^=P,n=n>>>20|n<<12,h=h+C|0,F^=h,F=F>>>24|F<<8,N=N+F|0,C^=N,C=C>>>25|C<<7,f=f+n|0,O^=f,O=O>>>24|O<<8,P=P+O|0,n^=P,n=n>>>25|n<<7,c=c+m|0,I^=c,I=I>>>24|I<<8,j=j+I|0,m^=j,m=m>>>25|m<<7,E=E+a|0,T^=E,T=T>>>24|T<<8,R=R+T|0,a^=R,a=a>>>25|a<<7;_e.writeUint32LE(E+i|0,e,0),_e.writeUint32LE(c+o|0,e,4),_e.writeUint32LE(h+s|0,e,8),_e.writeUint32LE(f+b|0,e,12),_e.writeUint32LE(n+u|0,e,16),_e.writeUint32LE(a+l|0,e,20),_e.writeUint32LE(m+_|0,e,24),_e.writeUint32LE(C+D|0,e,28),_e.writeUint32LE(N+w|0,e,32),_e.writeUint32LE(P+y|0,e,36),_e.writeUint32LE(R+v|0,e,40),_e.writeUint32LE(j+g|0,e,44),_e.writeUint32LE(I+S|0,e,48),_e.writeUint32LE(F+p|0,e,52),_e.writeUint32LE(O+A|0,e,56),_e.writeUint32LE(T+d|0,e,60)}function Ur(e,t,r,i,o){if(o===void 0&&(o=0),e.length!==32)throw new Error("ChaCha: key size must be 32 bytes");if(i.length<r.length)throw new Error("ChaCha: destination is shorter than source");var s,b;if(o===0){if(t.length!==8&&t.length!==12)throw new Error("ChaCha nonce must be 8 or 12 bytes");s=new Uint8Array(16),b=s.length-t.length,s.set(t,b)}else{if(t.length!==16)throw new Error("ChaCha nonce with counter must be 16 bytes");s=t,b=o}for(var u=new Uint8Array(64),l=0;l<r.length;l+=64){gn(u,s,e);for(var _=l;_<l+64&&_<r.length;_++)i[_]=r[_]^u[_-l];mn(s,0,b)}return pt.wipe(u),o===0&&pt.wipe(s),i}nt.streamXOR=Ur;function pn(e,t,r,i){return i===void 0&&(i=0),pt.wipe(r),Ur(e,t,r,r,i)}nt.stream=pn;function mn(e,t,r){for(var i=1;r--;)i=i+(e[t]&255)|0,e[t]=i&255,i>>>=8,t++;if(i>0)throw new Error("ChaCha: counter overflow")}var Ar={},Ue={};Object.defineProperty(Ue,"__esModule",{value:!0});function Sn(e,t,r){return~(e-1)&t|e-1&r}Ue.select=Sn;function On(e,t){return(e|0)-(t|0)-1>>>31&1}Ue.lessOrEqual=On;function Nr(e,t){if(e.length!==t.length)return 0;for(var r=0,i=0;i<e.length;i++)r|=e[i]^t[i];return 1&r-1>>>8}Ue.compare=Nr;function Cn(e,t){return e.length===0||t.length===0?!1:Nr(e,t)!==0}Ue.equal=Cn;(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Ue,r=pe;e.DIGEST_LENGTH=16;var i=function(){function b(u){this.digestLength=e.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var l=u[0]|u[1]<<8;this._r[0]=l&8191;var _=u[2]|u[3]<<8;this._r[1]=(l>>>13|_<<3)&8191;var D=u[4]|u[5]<<8;this._r[2]=(_>>>10|D<<6)&7939;var w=u[6]|u[7]<<8;this._r[3]=(D>>>7|w<<9)&8191;var y=u[8]|u[9]<<8;this._r[4]=(w>>>4|y<<12)&255,this._r[5]=y>>>1&8190;var v=u[10]|u[11]<<8;this._r[6]=(y>>>14|v<<2)&8191;var g=u[12]|u[13]<<8;this._r[7]=(v>>>11|g<<5)&8065;var S=u[14]|u[15]<<8;this._r[8]=(g>>>8|S<<8)&8191,this._r[9]=S>>>5&127,this._pad[0]=u[16]|u[17]<<8,this._pad[1]=u[18]|u[19]<<8,this._pad[2]=u[20]|u[21]<<8,this._pad[3]=u[22]|u[23]<<8,this._pad[4]=u[24]|u[25]<<8,this._pad[5]=u[26]|u[27]<<8,this._pad[6]=u[28]|u[29]<<8,this._pad[7]=u[30]|u[31]<<8}return b.prototype._blocks=function(u,l,_){for(var D=this._fin?0:2048,w=this._h[0],y=this._h[1],v=this._h[2],g=this._h[3],S=this._h[4],p=this._h[5],A=this._h[6],d=this._h[7],E=this._h[8],c=this._h[9],h=this._r[0],f=this._r[1],n=this._r[2],a=this._r[3],m=this._r[4],C=this._r[5],N=this._r[6],P=this._r[7],R=this._r[8],j=this._r[9];_>=16;){var I=u[l+0]|u[l+1]<<8;w+=I&8191;var F=u[l+2]|u[l+3]<<8;y+=(I>>>13|F<<3)&8191;var O=u[l+4]|u[l+5]<<8;v+=(F>>>10|O<<6)&8191;var T=u[l+6]|u[l+7]<<8;g+=(O>>>7|T<<9)&8191;var Y=u[l+8]|u[l+9]<<8;S+=(T>>>4|Y<<12)&8191,p+=Y>>>1&8191;var Q=u[l+10]|u[l+11]<<8;A+=(Y>>>14|Q<<2)&8191;var J=u[l+12]|u[l+13]<<8;d+=(Q>>>11|J<<5)&8191;var X=u[l+14]|u[l+15]<<8;E+=(J>>>8|X<<8)&8191,c+=X>>>5|D;var U=0,L=U;L+=w*h,L+=y*(5*j),L+=v*(5*R),L+=g*(5*P),L+=S*(5*N),U=L>>>13,L&=8191,L+=p*(5*C),L+=A*(5*m),L+=d*(5*a),L+=E*(5*n),L+=c*(5*f),U+=L>>>13,L&=8191;var B=U;B+=w*f,B+=y*h,B+=v*(5*j),B+=g*(5*R),B+=S*(5*P),U=B>>>13,B&=8191,B+=p*(5*N),B+=A*(5*C),B+=d*(5*m),B+=E*(5*a),B+=c*(5*n),U+=B>>>13,B&=8191;var x=U;x+=w*n,x+=y*f,x+=v*h,x+=g*(5*j),x+=S*(5*R),U=x>>>13,x&=8191,x+=p*(5*P),x+=A*(5*N),x+=d*(5*C),x+=E*(5*m),x+=c*(5*a),U+=x>>>13,x&=8191;var $=U;$+=w*a,$+=y*n,$+=v*f,$+=g*h,$+=S*(5*j),U=$>>>13,$&=8191,$+=p*(5*R),$+=A*(5*P),$+=d*(5*N),$+=E*(5*C),$+=c*(5*m),U+=$>>>13,$&=8191;var K=U;K+=w*m,K+=y*a,K+=v*n,K+=g*f,K+=S*h,U=K>>>13,K&=8191,K+=p*(5*j),K+=A*(5*R),K+=d*(5*P),K+=E*(5*N),K+=c*(5*C),U+=K>>>13,K&=8191;var W=U;W+=w*C,W+=y*m,W+=v*a,W+=g*n,W+=S*f,U=W>>>13,W&=8191,W+=p*h,W+=A*(5*j),W+=d*(5*R),W+=E*(5*P),W+=c*(5*N),U+=W>>>13,W&=8191;var V=U;V+=w*N,V+=y*C,V+=v*m,V+=g*a,V+=S*n,U=V>>>13,V&=8191,V+=p*f,V+=A*h,V+=d*(5*j),V+=E*(5*R),V+=c*(5*P),U+=V>>>13,V&=8191;var q=U;q+=w*P,q+=y*N,q+=v*C,q+=g*m,q+=S*a,U=q>>>13,q&=8191,q+=p*n,q+=A*f,q+=d*h,q+=E*(5*j),q+=c*(5*R),U+=q>>>13,q&=8191;var G=U;G+=w*R,G+=y*P,G+=v*N,G+=g*C,G+=S*m,U=G>>>13,G&=8191,G+=p*a,G+=A*n,G+=d*f,G+=E*h,G+=c*(5*j),U+=G>>>13,G&=8191;var k=U;k+=w*j,k+=y*R,k+=v*P,k+=g*N,k+=S*C,U=k>>>13,k&=8191,k+=p*m,k+=A*a,k+=d*n,k+=E*f,k+=c*h,U+=k>>>13,k&=8191,U=(U<<2)+U|0,U=U+L|0,L=U&8191,U=U>>>13,B+=U,w=L,y=B,v=x,g=$,S=K,p=W,A=V,d=q,E=G,c=k,l+=16,_-=16}this._h[0]=w,this._h[1]=y,this._h[2]=v,this._h[3]=g,this._h[4]=S,this._h[5]=p,this._h[6]=A,this._h[7]=d,this._h[8]=E,this._h[9]=c},b.prototype.finish=function(u,l){l===void 0&&(l=0);var _=new Uint16Array(10),D,w,y,v;if(this._leftover){for(v=this._leftover,this._buffer[v++]=1;v<16;v++)this._buffer[v]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(D=this._h[1]>>>13,this._h[1]&=8191,v=2;v<10;v++)this._h[v]+=D,D=this._h[v]>>>13,this._h[v]&=8191;for(this._h[0]+=D*5,D=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=D,D=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=D,_[0]=this._h[0]+5,D=_[0]>>>13,_[0]&=8191,v=1;v<10;v++)_[v]=this._h[v]+D,D=_[v]>>>13,_[v]&=8191;for(_[9]-=8192,w=(D^1)-1,v=0;v<10;v++)_[v]&=w;for(w=~w,v=0;v<10;v++)this._h[v]=this._h[v]&w|_[v];for(this._h[0]=(this._h[0]|this._h[1]<<13)&65535,this._h[1]=(this._h[1]>>>3|this._h[2]<<10)&65535,this._h[2]=(this._h[2]>>>6|this._h[3]<<7)&65535,this._h[3]=(this._h[3]>>>9|this._h[4]<<4)&65535,this._h[4]=(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14)&65535,this._h[5]=(this._h[6]>>>2|this._h[7]<<11)&65535,this._h[6]=(this._h[7]>>>5|this._h[8]<<8)&65535,this._h[7]=(this._h[8]>>>8|this._h[9]<<5)&65535,y=this._h[0]+this._pad[0],this._h[0]=y&65535,v=1;v<8;v++)y=(this._h[v]+this._pad[v]|0)+(y>>>16)|0,this._h[v]=y&65535;return u[l+0]=this._h[0]>>>0,u[l+1]=this._h[0]>>>8,u[l+2]=this._h[1]>>>0,u[l+3]=this._h[1]>>>8,u[l+4]=this._h[2]>>>0,u[l+5]=this._h[2]>>>8,u[l+6]=this._h[3]>>>0,u[l+7]=this._h[3]>>>8,u[l+8]=this._h[4]>>>0,u[l+9]=this._h[4]>>>8,u[l+10]=this._h[5]>>>0,u[l+11]=this._h[5]>>>8,u[l+12]=this._h[6]>>>0,u[l+13]=this._h[6]>>>8,u[l+14]=this._h[7]>>>0,u[l+15]=this._h[7]>>>8,this._finished=!0,this},b.prototype.update=function(u){var l=0,_=u.length,D;if(this._leftover){D=16-this._leftover,D>_&&(D=_);for(var w=0;w<D;w++)this._buffer[this._leftover+w]=u[l+w];if(_-=D,l+=D,this._leftover+=D,this._leftover<16)return this;this._blocks(this._buffer,0,16),this._leftover=0}if(_>=16&&(D=_-_%16,this._blocks(u,l,D),l+=D,_-=D),_){for(var w=0;w<_;w++)this._buffer[this._leftover+w]=u[l+w];this._leftover+=_}return this},b.prototype.digest=function(){if(this._finished)throw new Error("Poly1305 was finished");var u=new Uint8Array(16);return this.finish(u),u},b.prototype.clean=function(){return r.wipe(this._buffer),r.wipe(this._r),r.wipe(this._h),r.wipe(this._pad),this._leftover=0,this._fin=0,this._finished=!0,this},b}();e.Poly1305=i;function o(b,u){var l=new i(b);l.update(u);var _=l.digest();return l.clean(),_}e.oneTimeAuth=o;function s(b,u){return b.length!==e.DIGEST_LENGTH||u.length!==e.DIGEST_LENGTH?!1:t.equal(b,u)}e.equal=s})(Ar);(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=nt,r=Ar,i=pe,o=M,s=Ue;e.KEY_LENGTH=32,e.NONCE_LENGTH=12,e.TAG_LENGTH=16;var b=new Uint8Array(16),u=function(){function l(_){if(this.nonceLength=e.NONCE_LENGTH,this.tagLength=e.TAG_LENGTH,_.length!==e.KEY_LENGTH)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(_)}return l.prototype.seal=function(_,D,w,y){if(_.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var v=new Uint8Array(16);v.set(_,v.length-_.length);var g=new Uint8Array(32);t.stream(this._key,v,g,4);var S=D.length+this.tagLength,p;if(y){if(y.length!==S)throw new Error("ChaCha20Poly1305: incorrect destination length");p=y}else p=new Uint8Array(S);return t.streamXOR(this._key,v,D,p,4),this._authenticate(p.subarray(p.length-this.tagLength,p.length),g,p.subarray(0,p.length-this.tagLength),w),i.wipe(v),p},l.prototype.open=function(_,D,w,y){if(_.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(D.length<this.tagLength)return null;var v=new Uint8Array(16);v.set(_,v.length-_.length);var g=new Uint8Array(32);t.stream(this._key,v,g,4);var S=new Uint8Array(this.tagLength);if(this._authenticate(S,g,D.subarray(0,D.length-this.tagLength),w),!s.equal(S,D.subarray(D.length-this.tagLength,D.length)))return null;var p=D.length-this.tagLength,A;if(y){if(y.length!==p)throw new Error("ChaCha20Poly1305: incorrect destination length");A=y}else A=new Uint8Array(p);return t.streamXOR(this._key,v,D.subarray(0,D.length-this.tagLength),A,4),i.wipe(v),A},l.prototype.clean=function(){return i.wipe(this._key),this},l.prototype._authenticate=function(_,D,w,y){var v=new r.Poly1305(D);y&&(v.update(y),y.length%16>0&&v.update(b.subarray(y.length%16))),v.update(w),w.length%16>0&&v.update(b.subarray(w.length%16));var g=new Uint8Array(8);y&&o.writeUint64LE(y.length,g),v.update(g),o.writeUint64LE(w.length,g),v.update(g);for(var S=v.digest(),p=0;p<S.length;p++)_[p]=S[p];v.clean(),i.wipe(S),i.wipe(g)},l}();e.ChaCha20Poly1305=u})(Tt);var Tr={},qe={},It={};Object.defineProperty(It,"__esModule",{value:!0});function Un(e){return typeof e.saveState<"u"&&typeof e.restoreState<"u"&&typeof e.cleanSavedState<"u"}It.isSerializableHash=Un;Object.defineProperty(qe,"__esModule",{value:!0});var me=It,An=Ue,Nn=pe,Ir=function(){function e(t,r){this._finished=!1,this._inner=new t,this._outer=new t,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var i=new Uint8Array(this.blockSize);r.length>this.blockSize?this._inner.update(r).finish(i).clean():i.set(r);for(var o=0;o<i.length;o++)i[o]^=54;this._inner.update(i);for(var o=0;o<i.length;o++)i[o]^=106;this._outer.update(i),me.isSerializableHash(this._inner)&&me.isSerializableHash(this._outer)&&(this._innerKeyedState=this._inner.saveState(),this._outerKeyedState=this._outer.saveState()),Nn.wipe(i)}return e.prototype.reset=function(){if(!me.isSerializableHash(this._inner)||!me.isSerializableHash(this._outer))throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");return this._inner.restoreState(this._innerKeyedState),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.clean=function(){me.isSerializableHash(this._inner)&&this._inner.cleanSavedState(this._innerKeyedState),me.isSerializableHash(this._outer)&&this._outer.cleanSavedState(this._outerKeyedState),this._inner.clean(),this._outer.clean()},e.prototype.update=function(t){return this._inner.update(t),this},e.prototype.finish=function(t){return this._finished?(this._outer.finish(t),this):(this._inner.finish(t),this._outer.update(t.subarray(0,this.digestLength)).finish(t),this._finished=!0,this)},e.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},e.prototype.saveState=function(){if(!me.isSerializableHash(this._inner))throw new Error("hmac: can't saveState() because hash doesn't implement it");return this._inner.saveState()},e.prototype.restoreState=function(t){if(!me.isSerializableHash(this._inner)||!me.isSerializableHash(this._outer))throw new Error("hmac: can't restoreState() because hash doesn't implement it");return this._inner.restoreState(t),this._outer.restoreState(this._outerKeyedState),this._finished=!1,this},e.prototype.cleanSavedState=function(t){if(!me.isSerializableHash(this._inner))throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");this._inner.cleanSavedState(t)},e}();qe.HMAC=Ir;function Tn(e,t,r){var i=new Ir(e,t);i.update(r);var o=i.digest();return i.clean(),o}qe.hmac=Tn;qe.equal=An.equal;Object.defineProperty(Tr,"__esModule",{value:!0});var Vt=qe,qt=pe,In=function(){function e(t,r,i,o){i===void 0&&(i=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=t,this._info=o;var s=Vt.hmac(this._hash,i,r);this._hmac=new Vt.HMAC(t,s),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return e.prototype._fillBuffer=function(){this._counter[0]++;var t=this._counter[0];if(t===0)throw new Error("hkdf: cannot expand more");this._hmac.reset(),t>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},e.prototype.expand=function(t){for(var r=new Uint8Array(t),i=0;i<r.length;i++)this._bufpos===this._buffer.length&&this._fillBuffer(),r[i]=this._buffer[this._bufpos++];return r},e.prototype.clean=function(){this._hmac.clean(),qt.wipe(this._buffer),qt.wipe(this._counter),this._bufpos=0},e}(),Fn=Tr.HKDF=In,ze={},it={},ot={};Object.defineProperty(ot,"__esModule",{value:!0});ot.BrowserRandomSource=void 0;const zt=65536;class Mn{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const t=typeof self<"u"?self.crypto||self.msCrypto:null;t&&t.getRandomValues!==void 0&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const r=new Uint8Array(t);for(let i=0;i<r.length;i+=zt)this._crypto.getRandomValues(r.subarray(i,i+Math.min(r.length-i,zt)));return r}}ot.BrowserRandomSource=Mn;var at={};Object.defineProperty(at,"__esModule",{value:!0});at.NodeRandomSource=void 0;const Pn=pe;class jn{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof H.commonjsRequire<"u"){const t=H.requireCryptoBrowserify();t&&t.randomBytes&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let r=this._crypto.randomBytes(t);if(r.length!==t)throw new Error("NodeRandomSource: got fewer bytes than requested");const i=new Uint8Array(t);for(let o=0;o<i.length;o++)i[o]=r[o];return(0,Pn.wipe)(r),i}}at.NodeRandomSource=jn;Object.defineProperty(it,"__esModule",{value:!0});it.SystemRandomSource=void 0;const Rn=ot,Ln=at;class Bn{constructor(){if(this.isAvailable=!1,this.name="",this._source=new Rn.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new Ln.NodeRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Node";return}}randomBytes(t){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(t)}}it.SystemRandomSource=Bn;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const t=it,r=M,i=pe;e.defaultRandomSource=new t.SystemRandomSource;function o(_,D=e.defaultRandomSource){return D.randomBytes(_)}e.randomBytes=o;function s(_=e.defaultRandomSource){const D=o(4,_),w=(0,r.readUint32LE)(D);return(0,i.wipe)(D),w}e.randomUint32=s;const b="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function u(_,D=b,w=e.defaultRandomSource){if(D.length<2)throw new Error("randomString charset is too short");if(D.length>256)throw new Error("randomString charset is too long");let y="";const v=D.length,g=256-256%v;for(;_>0;){const S=o(Math.ceil(_*256/g),w);for(let p=0;p<S.length&&_>0;p++){const A=S[p];A<g&&(y+=D.charAt(A%v),_--)}(0,i.wipe)(S)}return y}e.randomString=u;function l(_,D=b,w=e.defaultRandomSource){const y=Math.ceil(_/(Math.log(D.length)/Math.LN2));return u(y,D,w)}e.randomStringForEntropy=l})(ze);var ut={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=M,r=pe;e.DIGEST_LENGTH=32,e.BLOCK_SIZE=64;var i=function(){function u(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return u.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},u.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},u.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._temp),this.reset()},u.prototype.update=function(l,_){if(_===void 0&&(_=l.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var D=0;if(this._bytesHashed+=_,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&_>0;)this._buffer[this._bufferLength++]=l[D++],_--;this._bufferLength===this.blockSize&&(s(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(_>=this.blockSize&&(D=s(this._temp,this._state,l,D,_),_%=this.blockSize);_>0;)this._buffer[this._bufferLength++]=l[D++],_--;return this},u.prototype.finish=function(l){if(!this._finished){var _=this._bytesHashed,D=this._bufferLength,w=_/536870912|0,y=_<<3,v=_%64<56?64:128;this._buffer[D]=128;for(var g=D+1;g<v-8;g++)this._buffer[g]=0;t.writeUint32BE(w,this._buffer,v-8),t.writeUint32BE(y,this._buffer,v-4),s(this._temp,this._state,this._buffer,0,v),this._finished=!0}for(var g=0;g<this.digestLength/4;g++)t.writeUint32BE(this._state[g],l,g*4);return this},u.prototype.digest=function(){var l=new Uint8Array(this.digestLength);return this.finish(l),l},u.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},u.prototype.restoreState=function(l){return this._state.set(l.state),this._bufferLength=l.bufferLength,l.buffer&&this._buffer.set(l.buffer),this._bytesHashed=l.bytesHashed,this._finished=!1,this},u.prototype.cleanSavedState=function(l){r.wipe(l.state),l.buffer&&r.wipe(l.buffer),l.bufferLength=0,l.bytesHashed=0},u}();e.SHA256=i;var o=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function s(u,l,_,D,w){for(;w>=64;){for(var y=l[0],v=l[1],g=l[2],S=l[3],p=l[4],A=l[5],d=l[6],E=l[7],c=0;c<16;c++){var h=D+c*4;u[c]=t.readUint32BE(_,h)}for(var c=16;c<64;c++){var f=u[c-2],n=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10;f=u[c-15];var a=(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3;u[c]=(n+u[c-7]|0)+(a+u[c-16]|0)}for(var c=0;c<64;c++){var n=(((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(p&A^~p&d)|0)+(E+(o[c]+u[c]|0)|0)|0,a=((y>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10))+(y&v^y&g^v&g)|0;E=d,d=A,A=p,p=S+n|0,S=g,g=v,v=y,y=n+a|0}l[0]+=y,l[1]+=v,l[2]+=g,l[3]+=S,l[4]+=p,l[5]+=A,l[6]+=d,l[7]+=E,D+=64,w-=64}return D}function b(u){var l=new i;l.update(u);var _=l.digest();return l.clean(),_}e.hash=b})(ut);var Ft={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sharedKey=e.generateKeyPair=e.generateKeyPairFromSeed=e.scalarMultBase=e.scalarMult=e.SHARED_KEY_LENGTH=e.SECRET_KEY_LENGTH=e.PUBLIC_KEY_LENGTH=void 0;const t=ze,r=pe;e.PUBLIC_KEY_LENGTH=32,e.SECRET_KEY_LENGTH=32,e.SHARED_KEY_LENGTH=32;function i(c){const h=new Float64Array(16);if(c)for(let f=0;f<c.length;f++)h[f]=c[f];return h}const o=new Uint8Array(32);o[0]=9;const s=i([56129,1]);function b(c){let h=1;for(let f=0;f<16;f++){let n=c[f]+h+65535;h=Math.floor(n/65536),c[f]=n-h*65536}c[0]+=h-1+37*(h-1)}function u(c,h,f){const n=~(f-1);for(let a=0;a<16;a++){const m=n&(c[a]^h[a]);c[a]^=m,h[a]^=m}}function l(c,h){const f=i(),n=i();for(let a=0;a<16;a++)n[a]=h[a];b(n),b(n),b(n);for(let a=0;a<2;a++){f[0]=n[0]-65517;for(let C=1;C<15;C++)f[C]=n[C]-65535-(f[C-1]>>16&1),f[C-1]&=65535;f[15]=n[15]-32767-(f[14]>>16&1);const m=f[15]>>16&1;f[14]&=65535,u(n,f,1-m)}for(let a=0;a<16;a++)c[2*a]=n[a]&255,c[2*a+1]=n[a]>>8}function _(c,h){for(let f=0;f<16;f++)c[f]=h[2*f]+(h[2*f+1]<<8);c[15]&=32767}function D(c,h,f){for(let n=0;n<16;n++)c[n]=h[n]+f[n]}function w(c,h,f){for(let n=0;n<16;n++)c[n]=h[n]-f[n]}function y(c,h,f){let n,a,m=0,C=0,N=0,P=0,R=0,j=0,I=0,F=0,O=0,T=0,Y=0,Q=0,J=0,X=0,U=0,L=0,B=0,x=0,$=0,K=0,W=0,V=0,q=0,G=0,k=0,Ae=0,Pe=0,$e=0,Qe=0,ht=0,Wt=0,ee=f[0],te=f[1],re=f[2],ne=f[3],ie=f[4],oe=f[5],ae=f[6],ue=f[7],se=f[8],ce=f[9],fe=f[10],he=f[11],le=f[12],de=f[13],De=f[14],be=f[15];n=h[0],m+=n*ee,C+=n*te,N+=n*re,P+=n*ne,R+=n*ie,j+=n*oe,I+=n*ae,F+=n*ue,O+=n*se,T+=n*ce,Y+=n*fe,Q+=n*he,J+=n*le,X+=n*de,U+=n*De,L+=n*be,n=h[1],C+=n*ee,N+=n*te,P+=n*re,R+=n*ne,j+=n*ie,I+=n*oe,F+=n*ae,O+=n*ue,T+=n*se,Y+=n*ce,Q+=n*fe,J+=n*he,X+=n*le,U+=n*de,L+=n*De,B+=n*be,n=h[2],N+=n*ee,P+=n*te,R+=n*re,j+=n*ne,I+=n*ie,F+=n*oe,O+=n*ae,T+=n*ue,Y+=n*se,Q+=n*ce,J+=n*fe,X+=n*he,U+=n*le,L+=n*de,B+=n*De,x+=n*be,n=h[3],P+=n*ee,R+=n*te,j+=n*re,I+=n*ne,F+=n*ie,O+=n*oe,T+=n*ae,Y+=n*ue,Q+=n*se,J+=n*ce,X+=n*fe,U+=n*he,L+=n*le,B+=n*de,x+=n*De,$+=n*be,n=h[4],R+=n*ee,j+=n*te,I+=n*re,F+=n*ne,O+=n*ie,T+=n*oe,Y+=n*ae,Q+=n*ue,J+=n*se,X+=n*ce,U+=n*fe,L+=n*he,B+=n*le,x+=n*de,$+=n*De,K+=n*be,n=h[5],j+=n*ee,I+=n*te,F+=n*re,O+=n*ne,T+=n*ie,Y+=n*oe,Q+=n*ae,J+=n*ue,X+=n*se,U+=n*ce,L+=n*fe,B+=n*he,x+=n*le,$+=n*de,K+=n*De,W+=n*be,n=h[6],I+=n*ee,F+=n*te,O+=n*re,T+=n*ne,Y+=n*ie,Q+=n*oe,J+=n*ae,X+=n*ue,U+=n*se,L+=n*ce,B+=n*fe,x+=n*he,$+=n*le,K+=n*de,W+=n*De,V+=n*be,n=h[7],F+=n*ee,O+=n*te,T+=n*re,Y+=n*ne,Q+=n*ie,J+=n*oe,X+=n*ae,U+=n*ue,L+=n*se,B+=n*ce,x+=n*fe,$+=n*he,K+=n*le,W+=n*de,V+=n*De,q+=n*be,n=h[8],O+=n*ee,T+=n*te,Y+=n*re,Q+=n*ne,J+=n*ie,X+=n*oe,U+=n*ae,L+=n*ue,B+=n*se,x+=n*ce,$+=n*fe,K+=n*he,W+=n*le,V+=n*de,q+=n*De,G+=n*be,n=h[9],T+=n*ee,Y+=n*te,Q+=n*re,J+=n*ne,X+=n*ie,U+=n*oe,L+=n*ae,B+=n*ue,x+=n*se,$+=n*ce,K+=n*fe,W+=n*he,V+=n*le,q+=n*de,G+=n*De,k+=n*be,n=h[10],Y+=n*ee,Q+=n*te,J+=n*re,X+=n*ne,U+=n*ie,L+=n*oe,B+=n*ae,x+=n*ue,$+=n*se,K+=n*ce,W+=n*fe,V+=n*he,q+=n*le,G+=n*de,k+=n*De,Ae+=n*be,n=h[11],Q+=n*ee,J+=n*te,X+=n*re,U+=n*ne,L+=n*ie,B+=n*oe,x+=n*ae,$+=n*ue,K+=n*se,W+=n*ce,V+=n*fe,q+=n*he,G+=n*le,k+=n*de,Ae+=n*De,Pe+=n*be,n=h[12],J+=n*ee,X+=n*te,U+=n*re,L+=n*ne,B+=n*ie,x+=n*oe,$+=n*ae,K+=n*ue,W+=n*se,V+=n*ce,q+=n*fe,G+=n*he,k+=n*le,Ae+=n*de,Pe+=n*De,$e+=n*be,n=h[13],X+=n*ee,U+=n*te,L+=n*re,B+=n*ne,x+=n*ie,$+=n*oe,K+=n*ae,W+=n*ue,V+=n*se,q+=n*ce,G+=n*fe,k+=n*he,Ae+=n*le,Pe+=n*de,$e+=n*De,Qe+=n*be,n=h[14],U+=n*ee,L+=n*te,B+=n*re,x+=n*ne,$+=n*ie,K+=n*oe,W+=n*ae,V+=n*ue,q+=n*se,G+=n*ce,k+=n*fe,Ae+=n*he,Pe+=n*le,$e+=n*de,Qe+=n*De,ht+=n*be,n=h[15],L+=n*ee,B+=n*te,x+=n*re,$+=n*ne,K+=n*ie,W+=n*oe,V+=n*ae,q+=n*ue,G+=n*se,k+=n*ce,Ae+=n*fe,Pe+=n*he,$e+=n*le,Qe+=n*de,ht+=n*De,Wt+=n*be,m+=38*B,C+=38*x,N+=38*$,P+=38*K,R+=38*W,j+=38*V,I+=38*q,F+=38*G,O+=38*k,T+=38*Ae,Y+=38*Pe,Q+=38*$e,J+=38*Qe,X+=38*ht,U+=38*Wt,a=1,n=m+a+65535,a=Math.floor(n/65536),m=n-a*65536,n=C+a+65535,a=Math.floor(n/65536),C=n-a*65536,n=N+a+65535,a=Math.floor(n/65536),N=n-a*65536,n=P+a+65535,a=Math.floor(n/65536),P=n-a*65536,n=R+a+65535,a=Math.floor(n/65536),R=n-a*65536,n=j+a+65535,a=Math.floor(n/65536),j=n-a*65536,n=I+a+65535,a=Math.floor(n/65536),I=n-a*65536,n=F+a+65535,a=Math.floor(n/65536),F=n-a*65536,n=O+a+65535,a=Math.floor(n/65536),O=n-a*65536,n=T+a+65535,a=Math.floor(n/65536),T=n-a*65536,n=Y+a+65535,a=Math.floor(n/65536),Y=n-a*65536,n=Q+a+65535,a=Math.floor(n/65536),Q=n-a*65536,n=J+a+65535,a=Math.floor(n/65536),J=n-a*65536,n=X+a+65535,a=Math.floor(n/65536),X=n-a*65536,n=U+a+65535,a=Math.floor(n/65536),U=n-a*65536,n=L+a+65535,a=Math.floor(n/65536),L=n-a*65536,m+=a-1+37*(a-1),a=1,n=m+a+65535,a=Math.floor(n/65536),m=n-a*65536,n=C+a+65535,a=Math.floor(n/65536),C=n-a*65536,n=N+a+65535,a=Math.floor(n/65536),N=n-a*65536,n=P+a+65535,a=Math.floor(n/65536),P=n-a*65536,n=R+a+65535,a=Math.floor(n/65536),R=n-a*65536,n=j+a+65535,a=Math.floor(n/65536),j=n-a*65536,n=I+a+65535,a=Math.floor(n/65536),I=n-a*65536,n=F+a+65535,a=Math.floor(n/65536),F=n-a*65536,n=O+a+65535,a=Math.floor(n/65536),O=n-a*65536,n=T+a+65535,a=Math.floor(n/65536),T=n-a*65536,n=Y+a+65535,a=Math.floor(n/65536),Y=n-a*65536,n=Q+a+65535,a=Math.floor(n/65536),Q=n-a*65536,n=J+a+65535,a=Math.floor(n/65536),J=n-a*65536,n=X+a+65535,a=Math.floor(n/65536),X=n-a*65536,n=U+a+65535,a=Math.floor(n/65536),U=n-a*65536,n=L+a+65535,a=Math.floor(n/65536),L=n-a*65536,m+=a-1+37*(a-1),c[0]=m,c[1]=C,c[2]=N,c[3]=P,c[4]=R,c[5]=j,c[6]=I,c[7]=F,c[8]=O,c[9]=T,c[10]=Y,c[11]=Q,c[12]=J,c[13]=X,c[14]=U,c[15]=L}function v(c,h){y(c,h,h)}function g(c,h){const f=i();for(let n=0;n<16;n++)f[n]=h[n];for(let n=253;n>=0;n--)v(f,f),n!==2&&n!==4&&y(f,f,h);for(let n=0;n<16;n++)c[n]=f[n]}function S(c,h){const f=new Uint8Array(32),n=new Float64Array(80),a=i(),m=i(),C=i(),N=i(),P=i(),R=i();for(let O=0;O<31;O++)f[O]=c[O];f[31]=c[31]&127|64,f[0]&=248,_(n,h);for(let O=0;O<16;O++)m[O]=n[O];a[0]=N[0]=1;for(let O=254;O>=0;--O){const T=f[O>>>3]>>>(O&7)&1;u(a,m,T),u(C,N,T),D(P,a,C),w(a,a,C),D(C,m,N),w(m,m,N),v(N,P),v(R,a),y(a,C,a),y(C,m,P),D(P,a,C),w(a,a,C),v(m,a),w(C,N,R),y(a,C,s),D(a,a,N),y(C,C,a),y(a,N,R),y(N,m,n),v(m,P),u(a,m,T),u(C,N,T)}for(let O=0;O<16;O++)n[O+16]=a[O],n[O+32]=C[O],n[O+48]=m[O],n[O+64]=N[O];const j=n.subarray(32),I=n.subarray(16);g(j,j),y(I,I,j);const F=new Uint8Array(32);return l(F,I),F}e.scalarMult=S;function p(c){return S(c,o)}e.scalarMultBase=p;function A(c){if(c.length!==e.SECRET_KEY_LENGTH)throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);const h=new Uint8Array(c);return{publicKey:p(h),secretKey:h}}e.generateKeyPairFromSeed=A;function d(c){const h=(0,t.randomBytes)(32,c),f=A(h);return(0,r.wipe)(h),f}e.generateKeyPair=d;function E(c,h,f=!1){if(c.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect secret key length");if(h.length!==e.PUBLIC_KEY_LENGTH)throw new Error("X25519: incorrect public key length");const n=S(c,h);if(f){let a=0;for(let m=0;m<n.length;m++)a|=n[m];if(a===0)throw new Error("X25519: invalid shared key")}return n}e.sharedKey=E})(Ft);function Mt(e){return globalThis.Buffer!=null?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function Fr(e=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?Mt(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function mt(e,t){t||(t=e.reduce((o,s)=>o+s.length,0));const r=Fr(t);let i=0;for(const o of e)r.set(o,i),i+=o.length;return Mt(r)}function xn(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),i=0;i<r.length;i++)r[i]=255;for(var o=0;o<e.length;o++){var s=e.charAt(o),b=s.charCodeAt(0);if(r[b]!==255)throw new TypeError(s+" is ambiguous");r[b]=o}var u=e.length,l=e.charAt(0),_=Math.log(u)/Math.log(256),D=Math.log(256)/Math.log(u);function w(g){if(g instanceof Uint8Array||(ArrayBuffer.isView(g)?g=new Uint8Array(g.buffer,g.byteOffset,g.byteLength):Array.isArray(g)&&(g=Uint8Array.from(g))),!(g instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(g.length===0)return"";for(var S=0,p=0,A=0,d=g.length;A!==d&&g[A]===0;)A++,S++;for(var E=(d-A)*D+1>>>0,c=new Uint8Array(E);A!==d;){for(var h=g[A],f=0,n=E-1;(h!==0||f<p)&&n!==-1;n--,f++)h+=256*c[n]>>>0,c[n]=h%u>>>0,h=h/u>>>0;if(h!==0)throw new Error("Non-zero carry");p=f,A++}for(var a=E-p;a!==E&&c[a]===0;)a++;for(var m=l.repeat(S);a<E;++a)m+=e.charAt(c[a]);return m}function y(g){if(typeof g!="string")throw new TypeError("Expected String");if(g.length===0)return new Uint8Array;var S=0;if(g[S]!==" "){for(var p=0,A=0;g[S]===l;)p++,S++;for(var d=(g.length-S)*_+1>>>0,E=new Uint8Array(d);g[S];){var c=r[g.charCodeAt(S)];if(c===255)return;for(var h=0,f=d-1;(c!==0||h<A)&&f!==-1;f--,h++)c+=u*E[f]>>>0,E[f]=c%256>>>0,c=c/256>>>0;if(c!==0)throw new Error("Non-zero carry");A=h,S++}if(g[S]!==" "){for(var n=d-A;n!==d&&E[n]===0;)n++;for(var a=new Uint8Array(p+(d-n)),m=p;n!==d;)a[m++]=E[n++];return a}}}function v(g){var S=y(g);if(S)return S;throw new Error(`Non-${t} character`)}return{encode:w,decodeUnsafe:y,decode:v}}var $n=xn,Hn=$n;const Kn=e=>{if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")},Wn=e=>new TextEncoder().encode(e),Vn=e=>new TextDecoder().decode(e);class qn{constructor(t,r,i){this.name=t,this.prefix=r,this.baseEncode=i}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class zn{constructor(t,r,i){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=i}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return Mr(this,t)}}class Gn{constructor(t){this.decoders=t}or(t){return Mr(this,t)}decode(t){const r=t[0],i=this.decoders[r];if(i)return i.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Mr=(e,t)=>new Gn({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class Yn{constructor(t,r,i,o){this.name=t,this.prefix=r,this.baseEncode=i,this.baseDecode=o,this.encoder=new qn(t,r,i),this.decoder=new zn(t,r,o)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const st=({name:e,prefix:t,encode:r,decode:i})=>new Yn(e,t,r,i),Ge=({prefix:e,name:t,alphabet:r})=>{const{encode:i,decode:o}=Hn(r,t);return st({prefix:e,name:t,encode:i,decode:s=>Kn(o(s))})},kn=(e,t,r,i)=>{const o={};for(let D=0;D<t.length;++D)o[t[D]]=D;let s=e.length;for(;e[s-1]==="=";)--s;const b=new Uint8Array(s*r/8|0);let u=0,l=0,_=0;for(let D=0;D<s;++D){const w=o[e[D]];if(w===void 0)throw new SyntaxError(`Non-${i} character`);l=l<<r|w,u+=r,u>=8&&(u-=8,b[_++]=255&l>>u)}if(u>=r||255&l<<8-u)throw new SyntaxError("Unexpected end of data");return b},Xn=(e,t,r)=>{const i=t[t.length-1]==="=",o=(1<<r)-1;let s="",b=0,u=0;for(let l=0;l<e.length;++l)for(u=u<<8|e[l],b+=8;b>r;)b-=r,s+=t[o&u>>b];if(b&&(s+=t[o&u<<r-b]),i)for(;s.length*r&7;)s+="=";return s},Z=({name:e,prefix:t,bitsPerChar:r,alphabet:i})=>st({prefix:t,name:e,encode(o){return Xn(o,i,r)},decode(o){return kn(o,i,r,e)}}),Jn=st({prefix:"\0",name:"identity",encode:e=>Vn(e),decode:e=>Wn(e)}),Qn=Object.freeze(Object.defineProperty({__proto__:null,identity:Jn},Symbol.toStringTag,{value:"Module"})),Zn=Z({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),ei=Object.freeze(Object.defineProperty({__proto__:null,base2:Zn},Symbol.toStringTag,{value:"Module"})),ti=Z({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),ri=Object.freeze(Object.defineProperty({__proto__:null,base8:ti},Symbol.toStringTag,{value:"Module"})),ni=Ge({prefix:"9",name:"base10",alphabet:"0123456789"}),ii=Object.freeze(Object.defineProperty({__proto__:null,base10:ni},Symbol.toStringTag,{value:"Module"})),oi=Z({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),ai=Z({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),ui=Object.freeze(Object.defineProperty({__proto__:null,base16:oi,base16upper:ai},Symbol.toStringTag,{value:"Module"})),si=Z({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),ci=Z({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),fi=Z({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),hi=Z({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),li=Z({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),di=Z({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),Di=Z({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),bi=Z({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),_i=Z({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Ei=Object.freeze(Object.defineProperty({__proto__:null,base32:si,base32hex:li,base32hexpad:Di,base32hexpadupper:bi,base32hexupper:di,base32pad:fi,base32padupper:hi,base32upper:ci,base32z:_i},Symbol.toStringTag,{value:"Module"})),wi=Ge({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),vi=Ge({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),yi=Object.freeze(Object.defineProperty({__proto__:null,base36:wi,base36upper:vi},Symbol.toStringTag,{value:"Module"})),gi=Ge({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),pi=Ge({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),mi=Object.freeze(Object.defineProperty({__proto__:null,base58btc:gi,base58flickr:pi},Symbol.toStringTag,{value:"Module"})),Si=Z({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Oi=Z({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Ci=Z({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Ui=Z({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),Ai=Object.freeze(Object.defineProperty({__proto__:null,base64:Si,base64pad:Oi,base64url:Ci,base64urlpad:Ui},Symbol.toStringTag,{value:"Module"})),Pr=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),Ni=Pr.reduce((e,t,r)=>(e[r]=t,e),[]),Ti=Pr.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);function Ii(e){return e.reduce((t,r)=>(t+=Ni[r],t),"")}function Fi(e){const t=[];for(const r of e){const i=Ti[r.codePointAt(0)];if(i===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(i)}return new Uint8Array(t)}const Mi=st({prefix:"🚀",name:"base256emoji",encode:Ii,decode:Fi}),Pi=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:Mi},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const Gt={...Qn,...ei,...ri,...ii,...ui,...Ei,...yi,...mi,...Ai,...Pi};function jr(e,t,r,i){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:i}}}const Yt=jr("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),lt=jr("ascii","a",e=>{let t="a";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},e=>{e=e.substring(1);const t=Fr(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}),Rr={utf8:Yt,"utf-8":Yt,hex:Gt.base16,latin1:lt,ascii:lt,binary:lt,...Gt};function ye(e,t="utf8"){const r=Rr[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?Mt(globalThis.Buffer.from(e,"utf-8")):r.decoder.decode(`${r.prefix}${e}`)}function ge(e,t="utf8"){const r=Rr[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8"):r.encoder.encode(e).substring(1)}var kt=function(e,t,r){if(r||arguments.length===2)for(var i=0,o=t.length,s;i<o;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return e.concat(s||Array.prototype.slice.call(t))},ji=function(){function e(t,r,i){this.name=t,this.version=r,this.os=i,this.type="browser"}return e}(),Ri=function(){function e(t){this.version=t,this.type="node",this.name="node",this.os=H.dist.process.platform}return e}(),Li=function(){function e(t,r,i,o){this.name=t,this.version=r,this.os=i,this.bot=o,this.type="bot-device"}return e}(),Bi=function(){function e(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null}return e}(),xi=function(){function e(){this.type="react-native",this.name="react-native",this.version=null,this.os=null}return e}(),$i=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,Hi=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,Xt=3,Ki=[["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|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["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",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",$i]],Jt=[["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/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["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 Wi(e){return e?Qt(e):typeof document>"u"&&typeof navigator<"u"&&navigator.product==="ReactNative"?new xi:typeof navigator<"u"?Qt(navigator.userAgent):zi()}function Vi(e){return e!==""&&Ki.reduce(function(t,r){var i=r[0],o=r[1];if(t)return t;var s=o.exec(e);return!!s&&[i,s]},!1)}function Qt(e){var t=Vi(e);if(!t)return null;var r=t[0],i=t[1];if(r==="searchbot")return new Bi;var o=i[1]&&i[1].split(".").join("_").split("_").slice(0,3);o?o.length<Xt&&(o=kt(kt([],o,!0),Gi(Xt-o.length),!0)):o=[];var s=o.join("."),b=qi(e),u=Hi.exec(e);return u&&u[1]?new Li(r,s,b,u[1]):new ji(r,s,b)}function qi(e){for(var t=0,r=Jt.length;t<r;t++){var i=Jt[t],o=i[0],s=i[1],b=s.exec(e);if(b)return o}return null}function zi(){var e=typeof H.dist.process<"u"&&H.dist.process.version;return e?new Ri(H.dist.process.version.slice(1)):null}function Gi(e){for(var t=[],r=0;r<e;r++)t.push("0");return t}var Oe={};/*! *****************************************************************************
2
2
  Copyright (c) Microsoft Corporation.
3
3
 
4
4
  Permission to use, copy, modify, and/or distribute this software for any
@@ -1,4 +1,4 @@
1
- "use strict";const M=require("./index-M1p_Eh-u.js"),l=require("./index.es-lSW75x3B.js"),xn=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,In=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Sn=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Pn(r,e){if(r==="__proto__"||r==="constructor"&&e&&typeof e=="object"&&"prototype"in e){On(r);return}return e}function On(r){console.warn(`[destr] Dropping "${r}" key to prevent prototype pollution.`)}function ri(r,e={}){if(typeof r!="string")return r;const t=r.trim();if(r[0]==='"'&&r.at(-1)==='"'&&!r.includes("\\"))return t.slice(1,-1);if(t.length<=9){const i=t.toLowerCase();if(i==="true")return!0;if(i==="false")return!1;if(i==="undefined")return;if(i==="null")return null;if(i==="nan")return Number.NaN;if(i==="infinity")return Number.POSITIVE_INFINITY;if(i==="-infinity")return Number.NEGATIVE_INFINITY}if(!Sn.test(r)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return r}try{if(xn.test(r)||In.test(r)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(r,Pn)}return JSON.parse(r)}catch(i){if(e.strict)throw i;return r}}function Rn(r){return!r||typeof r.then!="function"?Promise.resolve(r):r}function $e(r,...e){try{return Rn(r(...e))}catch(t){return Promise.reject(t)}}function Nn(r){const e=typeof r;return r===null||e!=="object"&&e!=="function"}function Tn(r){const e=Object.getPrototypeOf(r);return!e||e.isPrototypeOf(Object)}function ai(r){if(Nn(r))return String(r);if(Tn(r)||Array.isArray(r))return JSON.stringify(r);if(typeof r.toJSON=="function")return ai(r.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function Ws(){if(typeof M.dist.Buffer===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const Ni="base64:";function An(r){if(typeof r=="string")return r;Ws();const e=M.dist.Buffer.from(r).toString("base64");return Ni+e}function Fn(r){return typeof r!="string"||!r.startsWith(Ni)?r:(Ws(),M.dist.Buffer.from(r.slice(Ni.length),"base64"))}function Ye(r){return r?r.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function Cn(...r){return Ye(r.join(":"))}function ni(r){return r=Ye(r),r?r+":":""}const Ln="memory",Dn=()=>{const r=new Map;return{name:Ln,options:{},hasItem(e){return r.has(e)},getItem(e){return r.get(e)??null},getItemRaw(e){return r.get(e)??null},setItem(e,t){r.set(e,t)},setItemRaw(e,t){r.set(e,t)},removeItem(e){r.delete(e)},getKeys(){return Array.from(r.keys())},clear(){r.clear()},dispose(){r.clear()}}};function jn(r={}){const e={mounts:{"":r.driver||Dn()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},t=c=>{for(const d of e.mountpoints)if(c.startsWith(d))return{base:d,relativeKey:c.slice(d.length),driver:e.mounts[d]};return{base:"",relativeKey:c,driver:e.mounts[""]}},i=(c,d)=>e.mountpoints.filter(m=>m.startsWith(c)||d&&c.startsWith(m)).map(m=>({relativeBase:c.length>m.length?c.slice(m.length):void 0,mountpoint:m,driver:e.mounts[m]})),s=(c,d)=>{if(e.watching){d=Ye(d);for(const m of e.watchListeners)m(c,d)}},n=async()=>{if(!e.watching){e.watching=!0;for(const c in e.mounts)e.unwatch[c]=await os(e.mounts[c],s,c)}},a=async()=>{if(e.watching){for(const c in e.unwatch)await e.unwatch[c]();e.unwatch={},e.watching=!1}},h=(c,d,m)=>{const y=new Map,I=v=>{let N=y.get(v.base);return N||(N={driver:v.driver,base:v.base,items:[]},y.set(v.base,N)),N};for(const v of c){const N=typeof v=="string",z=Ye(N?v:v.key),K=N?void 0:v.value,q=N||!v.options?d:{...d,...v.options},k=t(z);I(k).items.push({key:z,value:K,relativeKey:k.relativeKey,options:q})}return Promise.all([...y.values()].map(v=>m(v))).then(v=>v.flat())},f={hasItem(c,d={}){c=Ye(c);const{relativeKey:m,driver:y}=t(c);return $e(y.hasItem,m,d)},getItem(c,d={}){c=Ye(c);const{relativeKey:m,driver:y}=t(c);return $e(y.getItem,m,d).then(I=>ri(I))},getItems(c,d){return h(c,d,m=>m.driver.getItems?$e(m.driver.getItems,m.items.map(y=>({key:y.relativeKey,options:y.options})),d).then(y=>y.map(I=>({key:Cn(m.base,I.key),value:ri(I.value)}))):Promise.all(m.items.map(y=>$e(m.driver.getItem,y.relativeKey,y.options).then(I=>({key:y.key,value:ri(I)})))))},getItemRaw(c,d={}){c=Ye(c);const{relativeKey:m,driver:y}=t(c);return y.getItemRaw?$e(y.getItemRaw,m,d):$e(y.getItem,m,d).then(I=>Fn(I))},async setItem(c,d,m={}){if(d===void 0)return f.removeItem(c);c=Ye(c);const{relativeKey:y,driver:I}=t(c);I.setItem&&(await $e(I.setItem,y,ai(d),m),I.watch||s("update",c))},async setItems(c,d){await h(c,d,async m=>{m.driver.setItems&&await $e(m.driver.setItems,m.items.map(y=>({key:y.relativeKey,value:ai(y.value),options:y.options})),d),m.driver.setItem&&await Promise.all(m.items.map(y=>$e(m.driver.setItem,y.relativeKey,ai(y.value),y.options)))})},async setItemRaw(c,d,m={}){if(d===void 0)return f.removeItem(c,m);c=Ye(c);const{relativeKey:y,driver:I}=t(c);if(I.setItemRaw)await $e(I.setItemRaw,y,d,m);else if(I.setItem)await $e(I.setItem,y,An(d),m);else return;I.watch||s("update",c)},async removeItem(c,d={}){typeof d=="boolean"&&(d={removeMeta:d}),c=Ye(c);const{relativeKey:m,driver:y}=t(c);y.removeItem&&(await $e(y.removeItem,m,d),(d.removeMeta||d.removeMata)&&await $e(y.removeItem,m+"$",d),y.watch||s("remove",c))},async getMeta(c,d={}){typeof d=="boolean"&&(d={nativeOnly:d}),c=Ye(c);const{relativeKey:m,driver:y}=t(c),I=Object.create(null);if(y.getMeta&&Object.assign(I,await $e(y.getMeta,m,d)),!d.nativeOnly){const v=await $e(y.getItem,m+"$",d).then(N=>ri(N));v&&typeof v=="object"&&(typeof v.atime=="string"&&(v.atime=new Date(v.atime)),typeof v.mtime=="string"&&(v.mtime=new Date(v.mtime)),Object.assign(I,v))}return I},setMeta(c,d,m={}){return this.setItem(c+"$",d,m)},removeMeta(c,d={}){return this.removeItem(c+"$",d)},async getKeys(c,d={}){c=ni(c);const m=i(c,!0);let y=[];const I=[];for(const v of m){const z=(await $e(v.driver.getKeys,v.relativeBase,d)).map(K=>v.mountpoint+Ye(K)).filter(K=>!y.some(q=>K.startsWith(q)));I.push(...z),y=[v.mountpoint,...y.filter(K=>!K.startsWith(v.mountpoint))]}return c?I.filter(v=>v.startsWith(c)&&!v.endsWith("$")):I.filter(v=>!v.endsWith("$"))},async clear(c,d={}){c=ni(c),await Promise.all(i(c,!1).map(async m=>{if(m.driver.clear)return $e(m.driver.clear,m.relativeBase,d);if(m.driver.removeItem){const y=await m.driver.getKeys(m.relativeBase||"",d);return Promise.all(y.map(I=>m.driver.removeItem(I,d)))}}))},async dispose(){await Promise.all(Object.values(e.mounts).map(c=>as(c)))},async watch(c){return await n(),e.watchListeners.push(c),async()=>{e.watchListeners=e.watchListeners.filter(d=>d!==c),e.watchListeners.length===0&&await a()}},async unwatch(){e.watchListeners=[],await a()},mount(c,d){if(c=ni(c),c&&e.mounts[c])throw new Error(`already mounted at ${c}`);return c&&(e.mountpoints.push(c),e.mountpoints.sort((m,y)=>y.length-m.length)),e.mounts[c]=d,e.watching&&Promise.resolve(os(d,s,c)).then(m=>{e.unwatch[c]=m}).catch(console.error),f},async unmount(c,d=!0){c=ni(c),!(!c||!e.mounts[c])&&(e.watching&&c in e.unwatch&&(e.unwatch[c](),delete e.unwatch[c]),d&&await as(e.mounts[c]),e.mountpoints=e.mountpoints.filter(m=>m!==c),delete e.mounts[c])},getMount(c=""){c=Ye(c)+":";const d=t(c);return{driver:d.driver,base:d.base}},getMounts(c="",d={}){return c=Ye(c),i(c,d.parents).map(y=>({driver:y.driver,base:y.mountpoint}))}};return f}function os(r,e,t){return r.watch?r.watch((i,s)=>e(i,t+s)):()=>{}}async function as(r){typeof r.dispose=="function"&&await $e(r.dispose)}function Nt(r){return new Promise((e,t)=>{r.oncomplete=r.onsuccess=()=>e(r.result),r.onabort=r.onerror=()=>t(r.error)})}function Ys(r,e){const t=indexedDB.open(r);t.onupgradeneeded=()=>t.result.createObjectStore(e);const i=Nt(t);return(s,n)=>i.then(a=>n(a.transaction(e,s).objectStore(e)))}let wi;function Wt(){return wi||(wi=Ys("keyval-store","keyval")),wi}function cs(r,e=Wt()){return e("readonly",t=>Nt(t.get(r)))}function $n(r,e,t=Wt()){return t("readwrite",i=>(i.put(e,r),Nt(i.transaction)))}function Mn(r,e=Wt()){return e("readwrite",t=>(t.delete(r),Nt(t.transaction)))}function qn(r=Wt()){return r("readwrite",e=>(e.clear(),Nt(e.transaction)))}function zn(r,e){return r.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},Nt(r.transaction)}function Un(r=Wt()){return r("readonly",e=>{if(e.getAllKeys)return Nt(e.getAllKeys());const t=[];return zn(e,i=>t.push(i.key)).then(()=>t)})}const Kn=r=>JSON.stringify(r,(e,t)=>typeof t=="bigint"?t.toString()+"n":t),Vn=r=>{const e=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,t=r.replace(e,'$1"$2n"$3');return JSON.parse(t,(i,s)=>typeof s=="string"&&s.match(/^\d+n$/)?BigInt(s.substring(0,s.length-1)):s)};function Qs(r){if(typeof r!="string")throw new Error(`Cannot safe json parse value of type ${typeof r}`);try{return Vn(r)}catch{return r}}function Xs(r){return typeof r=="string"?r:Kn(r)||""}const Bn="idb-keyval";var Hn=(r={})=>{const e=r.base&&r.base.length>0?`${r.base}:`:"",t=s=>e+s;let i;return r.dbName&&r.storeName&&(i=Ys(r.dbName,r.storeName)),{name:Bn,options:r,async hasItem(s){return!(typeof await cs(t(s),i)>"u")},async getItem(s){return await cs(t(s),i)??null},setItem(s,n){return $n(t(s),n,i)},removeItem(s){return Mn(t(s),i)},getKeys(){return Un(i)},clear(){return qn(i)}}};const Gn="WALLET_CONNECT_V2_INDEXED_DB",kn="keyvaluestorage";class Jn{constructor(){this.indexedDb=jn({driver:Hn({dbName:Gn,storeName:kn})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){const t=await this.indexedDb.getItem(e);if(t!==null)return t}async setItem(e,t){await this.indexedDb.setItem(e,Xs(t))}async removeItem(e){await this.indexedDb.removeItem(e)}}var bi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof M.dist.global<"u"?M.dist.global:typeof self<"u"?self:{},ci={exports:{}};(function(){let r;function e(){}r=e,r.prototype.getItem=function(t){return this.hasOwnProperty(t)?String(this[t]):null},r.prototype.setItem=function(t,i){this[t]=String(i)},r.prototype.removeItem=function(t){delete this[t]},r.prototype.clear=function(){const t=this;Object.keys(t).forEach(function(i){t[i]=void 0,delete t[i]})},r.prototype.key=function(t){return t=t||0,Object.keys(this)[t]},r.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof bi<"u"&&bi.localStorage?ci.exports=bi.localStorage:typeof window<"u"&&window.localStorage?ci.exports=window.localStorage:ci.exports=new e})();function Wn(r){var e;return[r[0],Qs((e=r[1])!=null?e:"")]}class Yn{constructor(){this.localStorage=ci.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(Wn)}async getItem(e){const t=this.localStorage.getItem(e);if(t!==null)return Qs(t)}async setItem(e,t){this.localStorage.setItem(e,Xs(t))}async removeItem(e){this.localStorage.removeItem(e)}}const Qn="wc_storage_version",hs=1,Xn=async(r,e,t)=>{const i=Qn,s=await e.getItem(i);if(s&&s>=hs){t(e);return}const n=await r.getKeys();if(!n.length){t(e);return}const a=[];for(;n.length;){const h=n.shift();if(!h)continue;const f=h.toLowerCase();if(f.includes("wc@")||f.includes("walletconnect")||f.includes("wc_")||f.includes("wallet_connect")){const c=await r.getItem(h);await e.setItem(h,c),a.push(h)}}await e.setItem(i,hs),t(e),Zn(r,a)},Zn=async(r,e)=>{e.length&&e.forEach(async t=>{await r.removeItem(t)})};let eo=class{constructor(){this.initialized=!1,this.setInitialized=t=>{this.storage=t,this.initialized=!0};const e=new Yn;this.storage=e;try{const t=new Jn;Xn(e,t,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{const t=setInterval(()=>{this.initialized&&(clearInterval(t),e())},20)})}};var Lt={};/*! *****************************************************************************
1
+ "use strict";const M=require("./index-DiFBiIsU.js"),l=require("./index.es-JGv9-9pp.js"),xn=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,In=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,Sn=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Pn(r,e){if(r==="__proto__"||r==="constructor"&&e&&typeof e=="object"&&"prototype"in e){On(r);return}return e}function On(r){console.warn(`[destr] Dropping "${r}" key to prevent prototype pollution.`)}function ri(r,e={}){if(typeof r!="string")return r;const t=r.trim();if(r[0]==='"'&&r.at(-1)==='"'&&!r.includes("\\"))return t.slice(1,-1);if(t.length<=9){const i=t.toLowerCase();if(i==="true")return!0;if(i==="false")return!1;if(i==="undefined")return;if(i==="null")return null;if(i==="nan")return Number.NaN;if(i==="infinity")return Number.POSITIVE_INFINITY;if(i==="-infinity")return Number.NEGATIVE_INFINITY}if(!Sn.test(r)){if(e.strict)throw new SyntaxError("[destr] Invalid JSON");return r}try{if(xn.test(r)||In.test(r)){if(e.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(r,Pn)}return JSON.parse(r)}catch(i){if(e.strict)throw i;return r}}function Rn(r){return!r||typeof r.then!="function"?Promise.resolve(r):r}function $e(r,...e){try{return Rn(r(...e))}catch(t){return Promise.reject(t)}}function Nn(r){const e=typeof r;return r===null||e!=="object"&&e!=="function"}function Tn(r){const e=Object.getPrototypeOf(r);return!e||e.isPrototypeOf(Object)}function ai(r){if(Nn(r))return String(r);if(Tn(r)||Array.isArray(r))return JSON.stringify(r);if(typeof r.toJSON=="function")return ai(r.toJSON());throw new Error("[unstorage] Cannot stringify value!")}function Ws(){if(typeof M.dist.Buffer===void 0)throw new TypeError("[unstorage] Buffer is not supported!")}const Ni="base64:";function An(r){if(typeof r=="string")return r;Ws();const e=M.dist.Buffer.from(r).toString("base64");return Ni+e}function Fn(r){return typeof r!="string"||!r.startsWith(Ni)?r:(Ws(),M.dist.Buffer.from(r.slice(Ni.length),"base64"))}function Ye(r){return r?r.split("?")[0].replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,""):""}function Cn(...r){return Ye(r.join(":"))}function ni(r){return r=Ye(r),r?r+":":""}const Ln="memory",Dn=()=>{const r=new Map;return{name:Ln,options:{},hasItem(e){return r.has(e)},getItem(e){return r.get(e)??null},getItemRaw(e){return r.get(e)??null},setItem(e,t){r.set(e,t)},setItemRaw(e,t){r.set(e,t)},removeItem(e){r.delete(e)},getKeys(){return Array.from(r.keys())},clear(){r.clear()},dispose(){r.clear()}}};function jn(r={}){const e={mounts:{"":r.driver||Dn()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},t=c=>{for(const d of e.mountpoints)if(c.startsWith(d))return{base:d,relativeKey:c.slice(d.length),driver:e.mounts[d]};return{base:"",relativeKey:c,driver:e.mounts[""]}},i=(c,d)=>e.mountpoints.filter(m=>m.startsWith(c)||d&&c.startsWith(m)).map(m=>({relativeBase:c.length>m.length?c.slice(m.length):void 0,mountpoint:m,driver:e.mounts[m]})),s=(c,d)=>{if(e.watching){d=Ye(d);for(const m of e.watchListeners)m(c,d)}},n=async()=>{if(!e.watching){e.watching=!0;for(const c in e.mounts)e.unwatch[c]=await os(e.mounts[c],s,c)}},a=async()=>{if(e.watching){for(const c in e.unwatch)await e.unwatch[c]();e.unwatch={},e.watching=!1}},h=(c,d,m)=>{const y=new Map,I=v=>{let N=y.get(v.base);return N||(N={driver:v.driver,base:v.base,items:[]},y.set(v.base,N)),N};for(const v of c){const N=typeof v=="string",z=Ye(N?v:v.key),K=N?void 0:v.value,q=N||!v.options?d:{...d,...v.options},k=t(z);I(k).items.push({key:z,value:K,relativeKey:k.relativeKey,options:q})}return Promise.all([...y.values()].map(v=>m(v))).then(v=>v.flat())},f={hasItem(c,d={}){c=Ye(c);const{relativeKey:m,driver:y}=t(c);return $e(y.hasItem,m,d)},getItem(c,d={}){c=Ye(c);const{relativeKey:m,driver:y}=t(c);return $e(y.getItem,m,d).then(I=>ri(I))},getItems(c,d){return h(c,d,m=>m.driver.getItems?$e(m.driver.getItems,m.items.map(y=>({key:y.relativeKey,options:y.options})),d).then(y=>y.map(I=>({key:Cn(m.base,I.key),value:ri(I.value)}))):Promise.all(m.items.map(y=>$e(m.driver.getItem,y.relativeKey,y.options).then(I=>({key:y.key,value:ri(I)})))))},getItemRaw(c,d={}){c=Ye(c);const{relativeKey:m,driver:y}=t(c);return y.getItemRaw?$e(y.getItemRaw,m,d):$e(y.getItem,m,d).then(I=>Fn(I))},async setItem(c,d,m={}){if(d===void 0)return f.removeItem(c);c=Ye(c);const{relativeKey:y,driver:I}=t(c);I.setItem&&(await $e(I.setItem,y,ai(d),m),I.watch||s("update",c))},async setItems(c,d){await h(c,d,async m=>{m.driver.setItems&&await $e(m.driver.setItems,m.items.map(y=>({key:y.relativeKey,value:ai(y.value),options:y.options})),d),m.driver.setItem&&await Promise.all(m.items.map(y=>$e(m.driver.setItem,y.relativeKey,ai(y.value),y.options)))})},async setItemRaw(c,d,m={}){if(d===void 0)return f.removeItem(c,m);c=Ye(c);const{relativeKey:y,driver:I}=t(c);if(I.setItemRaw)await $e(I.setItemRaw,y,d,m);else if(I.setItem)await $e(I.setItem,y,An(d),m);else return;I.watch||s("update",c)},async removeItem(c,d={}){typeof d=="boolean"&&(d={removeMeta:d}),c=Ye(c);const{relativeKey:m,driver:y}=t(c);y.removeItem&&(await $e(y.removeItem,m,d),(d.removeMeta||d.removeMata)&&await $e(y.removeItem,m+"$",d),y.watch||s("remove",c))},async getMeta(c,d={}){typeof d=="boolean"&&(d={nativeOnly:d}),c=Ye(c);const{relativeKey:m,driver:y}=t(c),I=Object.create(null);if(y.getMeta&&Object.assign(I,await $e(y.getMeta,m,d)),!d.nativeOnly){const v=await $e(y.getItem,m+"$",d).then(N=>ri(N));v&&typeof v=="object"&&(typeof v.atime=="string"&&(v.atime=new Date(v.atime)),typeof v.mtime=="string"&&(v.mtime=new Date(v.mtime)),Object.assign(I,v))}return I},setMeta(c,d,m={}){return this.setItem(c+"$",d,m)},removeMeta(c,d={}){return this.removeItem(c+"$",d)},async getKeys(c,d={}){c=ni(c);const m=i(c,!0);let y=[];const I=[];for(const v of m){const z=(await $e(v.driver.getKeys,v.relativeBase,d)).map(K=>v.mountpoint+Ye(K)).filter(K=>!y.some(q=>K.startsWith(q)));I.push(...z),y=[v.mountpoint,...y.filter(K=>!K.startsWith(v.mountpoint))]}return c?I.filter(v=>v.startsWith(c)&&!v.endsWith("$")):I.filter(v=>!v.endsWith("$"))},async clear(c,d={}){c=ni(c),await Promise.all(i(c,!1).map(async m=>{if(m.driver.clear)return $e(m.driver.clear,m.relativeBase,d);if(m.driver.removeItem){const y=await m.driver.getKeys(m.relativeBase||"",d);return Promise.all(y.map(I=>m.driver.removeItem(I,d)))}}))},async dispose(){await Promise.all(Object.values(e.mounts).map(c=>as(c)))},async watch(c){return await n(),e.watchListeners.push(c),async()=>{e.watchListeners=e.watchListeners.filter(d=>d!==c),e.watchListeners.length===0&&await a()}},async unwatch(){e.watchListeners=[],await a()},mount(c,d){if(c=ni(c),c&&e.mounts[c])throw new Error(`already mounted at ${c}`);return c&&(e.mountpoints.push(c),e.mountpoints.sort((m,y)=>y.length-m.length)),e.mounts[c]=d,e.watching&&Promise.resolve(os(d,s,c)).then(m=>{e.unwatch[c]=m}).catch(console.error),f},async unmount(c,d=!0){c=ni(c),!(!c||!e.mounts[c])&&(e.watching&&c in e.unwatch&&(e.unwatch[c](),delete e.unwatch[c]),d&&await as(e.mounts[c]),e.mountpoints=e.mountpoints.filter(m=>m!==c),delete e.mounts[c])},getMount(c=""){c=Ye(c)+":";const d=t(c);return{driver:d.driver,base:d.base}},getMounts(c="",d={}){return c=Ye(c),i(c,d.parents).map(y=>({driver:y.driver,base:y.mountpoint}))}};return f}function os(r,e,t){return r.watch?r.watch((i,s)=>e(i,t+s)):()=>{}}async function as(r){typeof r.dispose=="function"&&await $e(r.dispose)}function Nt(r){return new Promise((e,t)=>{r.oncomplete=r.onsuccess=()=>e(r.result),r.onabort=r.onerror=()=>t(r.error)})}function Ys(r,e){const t=indexedDB.open(r);t.onupgradeneeded=()=>t.result.createObjectStore(e);const i=Nt(t);return(s,n)=>i.then(a=>n(a.transaction(e,s).objectStore(e)))}let wi;function Wt(){return wi||(wi=Ys("keyval-store","keyval")),wi}function cs(r,e=Wt()){return e("readonly",t=>Nt(t.get(r)))}function $n(r,e,t=Wt()){return t("readwrite",i=>(i.put(e,r),Nt(i.transaction)))}function Mn(r,e=Wt()){return e("readwrite",t=>(t.delete(r),Nt(t.transaction)))}function qn(r=Wt()){return r("readwrite",e=>(e.clear(),Nt(e.transaction)))}function zn(r,e){return r.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},Nt(r.transaction)}function Un(r=Wt()){return r("readonly",e=>{if(e.getAllKeys)return Nt(e.getAllKeys());const t=[];return zn(e,i=>t.push(i.key)).then(()=>t)})}const Kn=r=>JSON.stringify(r,(e,t)=>typeof t=="bigint"?t.toString()+"n":t),Vn=r=>{const e=/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,t=r.replace(e,'$1"$2n"$3');return JSON.parse(t,(i,s)=>typeof s=="string"&&s.match(/^\d+n$/)?BigInt(s.substring(0,s.length-1)):s)};function Qs(r){if(typeof r!="string")throw new Error(`Cannot safe json parse value of type ${typeof r}`);try{return Vn(r)}catch{return r}}function Xs(r){return typeof r=="string"?r:Kn(r)||""}const Bn="idb-keyval";var Hn=(r={})=>{const e=r.base&&r.base.length>0?`${r.base}:`:"",t=s=>e+s;let i;return r.dbName&&r.storeName&&(i=Ys(r.dbName,r.storeName)),{name:Bn,options:r,async hasItem(s){return!(typeof await cs(t(s),i)>"u")},async getItem(s){return await cs(t(s),i)??null},setItem(s,n){return $n(t(s),n,i)},removeItem(s){return Mn(t(s),i)},getKeys(){return Un(i)},clear(){return qn(i)}}};const Gn="WALLET_CONNECT_V2_INDEXED_DB",kn="keyvaluestorage";class Jn{constructor(){this.indexedDb=jn({driver:Hn({dbName:Gn,storeName:kn})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){const t=await this.indexedDb.getItem(e);if(t!==null)return t}async setItem(e,t){await this.indexedDb.setItem(e,Xs(t))}async removeItem(e){await this.indexedDb.removeItem(e)}}var bi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof M.dist.global<"u"?M.dist.global:typeof self<"u"?self:{},ci={exports:{}};(function(){let r;function e(){}r=e,r.prototype.getItem=function(t){return this.hasOwnProperty(t)?String(this[t]):null},r.prototype.setItem=function(t,i){this[t]=String(i)},r.prototype.removeItem=function(t){delete this[t]},r.prototype.clear=function(){const t=this;Object.keys(t).forEach(function(i){t[i]=void 0,delete t[i]})},r.prototype.key=function(t){return t=t||0,Object.keys(this)[t]},r.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),typeof bi<"u"&&bi.localStorage?ci.exports=bi.localStorage:typeof window<"u"&&window.localStorage?ci.exports=window.localStorage:ci.exports=new e})();function Wn(r){var e;return[r[0],Qs((e=r[1])!=null?e:"")]}class Yn{constructor(){this.localStorage=ci.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(Wn)}async getItem(e){const t=this.localStorage.getItem(e);if(t!==null)return Qs(t)}async setItem(e,t){this.localStorage.setItem(e,Xs(t))}async removeItem(e){this.localStorage.removeItem(e)}}const Qn="wc_storage_version",hs=1,Xn=async(r,e,t)=>{const i=Qn,s=await e.getItem(i);if(s&&s>=hs){t(e);return}const n=await r.getKeys();if(!n.length){t(e);return}const a=[];for(;n.length;){const h=n.shift();if(!h)continue;const f=h.toLowerCase();if(f.includes("wc@")||f.includes("walletconnect")||f.includes("wc_")||f.includes("wallet_connect")){const c=await r.getItem(h);await e.setItem(h,c),a.push(h)}}await e.setItem(i,hs),t(e),Zn(r,a)},Zn=async(r,e)=>{e.length&&e.forEach(async t=>{await r.removeItem(t)})};let eo=class{constructor(){this.initialized=!1,this.setInitialized=t=>{this.storage=t,this.initialized=!0};const e=new Yn;this.storage=e;try{const t=new Jn;Xn(e,t,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{const t=setInterval(()=>{this.initialized&&(clearInterval(t),e())},20)})}};var Lt={};/*! *****************************************************************************
2
2
  Copyright (c) Microsoft Corporation.
3
3
 
4
4
  Permission to use, copy, modify, and/or distribute this software for any