@wormhole-foundation/wormhole-connect 0.3.0-beta.5-development → 0.3.0-beta.7-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.
- package/dist/assets/solana-r3vOVfGL.js +7 -0
- package/dist/main.js +8 -8
- package/dist/src/hooks/useExternalSearch.d.ts.map +1 -1
- package/dist/src/hooks/useFetchTokenPrices.d.ts.map +1 -1
- package/dist/src/routes/cctpManual/utils/attestation.d.ts.map +1 -1
- package/dist/src/routes/porticoBridge/porticoBridge.d.ts.map +1 -1
- package/dist/src/theme.d.ts.map +1 -1
- package/dist/src/utils/gas.d.ts +2 -1
- package/dist/src/utils/gas.d.ts.map +1 -1
- package/dist/src/utils/wallet/solana.d.ts.map +1 -1
- package/lib/{aptos-8Mrl9X6i.mjs → aptos-QdwVDDzw.mjs} +1 -1
- package/lib/{aptos-tebQQ3ZA.js → aptos-vhM1YtFf.js} +1 -1
- package/lib/{ccip-HJnlX_9S.mjs → ccip-EM_et4u1.mjs} +3 -3
- package/lib/{ccip-dCpwpTC_.js → ccip-finVNtKk.js} +1 -1
- package/lib/{cosmos-AFJ1XOrO.js → cosmos-fvmV1iIQ.js} +1 -1
- package/lib/{cosmos-nV16HvSD.mjs → cosmos-qCZ2N-2F.mjs} +3 -3
- package/lib/{evm-qZTmZv6E.js → evm-iXgJEzha.js} +3 -3
- package/lib/{evm-s1VmSVD6.mjs → evm-q7tplTE_.mjs} +4 -4
- package/lib/{index-TfurvHOR.js → index--nataACL.js} +1 -1
- package/lib/{index-aaFEhMHj.mjs → index-49J1iHnW.mjs} +119 -85
- package/lib/{index-5FmABmsD.mjs → index-DWWqC02d.mjs} +2 -2
- package/lib/{index-cLXEckE0.js → index-H-9aotAE.js} +1 -1
- package/lib/{index-Hc9ZLfg9.js → index-KhNenQBC.js} +7 -7
- package/lib/{index-8tyGYsKa.mjs → index-PAYEO8f8.mjs} +1 -1
- package/lib/{index-QjIV7nR2.js → index-U4tCg-MM.js} +1 -1
- package/lib/{index-Bb3TApAn.mjs → index-_ED2BW4O.mjs} +1 -1
- package/lib/{index-H90aaVbT.js → index-b7CigD4I.js} +1 -1
- package/lib/{index-NwD9aAK2.mjs → index-eFSkLRsX.mjs} +3 -3
- package/lib/{index.es-sXBX8dsm.mjs → index.es-JyYl3NEr.mjs} +2 -2
- package/lib/{index.es-qv9yd3Ok.mjs → index.es-MYE1njHi.mjs} +4 -4
- package/lib/{index.es-KO4vFhJP.js → index.es-SNGHSAN9.js} +2 -2
- package/lib/{index.es-wpPOI0qn.mjs → index.es-sg1QpZZ3.mjs} +1 -1
- package/lib/{index.es-HWWujjOD.js → index.es-vNsStN5y.js} +1 -1
- package/lib/{index.es-Z0ywZ73m.js → index.es-w5wVga5s.js} +1 -1
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/{libsodium-wrappers-mnGNKT5v.mjs → libsodium-wrappers-L_u7xnKv.mjs} +1 -1
- package/lib/{libsodium-wrappers-Bp8SfOD4.js → libsodium-wrappers-QMhW8rmN.js} +1 -1
- package/lib/{sei-Ou4E9w5L.js → sei-Z32sFnVE.js} +1 -1
- package/lib/{sei-fE2ayrOo.mjs → sei-ftKJobWd.mjs} +2 -2
- package/lib/{solana-aFYDy2Js.mjs → solana-FtJTzny-.mjs} +206 -205
- package/lib/{solana-thpdGOoo.js → solana-iiNlAnmz.js} +1 -1
- package/lib/{solanaEmbed.esm-XmdisVOz.js → solanaEmbed.esm-1dEuSeiE.js} +1 -1
- package/lib/{solanaEmbed.esm-sDjJSYg0.mjs → solanaEmbed.esm-r3X45UMo.mjs} +2 -2
- package/lib/src/hooks/useExternalSearch.d.ts.map +1 -1
- package/lib/src/hooks/useFetchTokenPrices.d.ts.map +1 -1
- package/lib/src/routes/cctpManual/utils/attestation.d.ts.map +1 -1
- package/lib/src/routes/porticoBridge/porticoBridge.d.ts.map +1 -1
- package/lib/src/theme.d.ts.map +1 -1
- package/lib/src/utils/gas.d.ts +2 -1
- package/lib/src/utils/gas.d.ts.map +1 -1
- package/lib/src/utils/wallet/solana.d.ts.map +1 -1
- package/lib/{sui-ftfGMqx7.mjs → sui-EPTYtByv.mjs} +1 -1
- package/lib/{sui-OJe7CfrJ.js → sui-WUBDbipL.js} +1 -1
- package/package.json +1 -1
- package/dist/assets/solana-3KZTbTeS.js +0 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as na, d as rn, e as ra, g as sa, C as aa, W as oa, a as ia, N as mr, b as ca, c as ae, h as la, f as br, i as ua, j as da, l as pa, m as ha, B as ma, n as ba, o as fr } from "./index-
|
|
2
|
-
import { s as Br } from "./index.es-
|
|
1
|
+
import { k as na, d as rn, e as ra, g as sa, C as aa, W as oa, a as ia, N as mr, b as ca, c as ae, h as la, f as br, i as ua, j as da, l as pa, m as ha, B as ma, n as ba, o as fr } from "./index-49J1iHnW.mjs";
|
|
2
|
+
import { s as Br } from "./index.es-sg1QpZZ3.mjs";
|
|
3
3
|
function m(e, t = {}) {
|
|
4
4
|
const { fees: n = e.fees, formatters: r = e.formatters, serializers: s = e.serializers } = t;
|
|
5
5
|
return {
|
|
@@ -4084,7 +4084,7 @@ async function Yt(e, t) {
|
|
|
4084
4084
|
});
|
|
4085
4085
|
return me === "0x" ? { data: void 0 } : { data: me };
|
|
4086
4086
|
} catch (k) {
|
|
4087
|
-
const A = Ni(k), { offchainLookup: N, offchainLookupSignature: U } = await import("./ccip-
|
|
4087
|
+
const A = Ni(k), { offchainLookup: N, offchainLookupSignature: U } = await import("./ccip-EM_et4u1.mjs");
|
|
4088
4088
|
if ((A == null ? void 0 : A.slice(0, 10)) === U && f)
|
|
4089
4089
|
return { data: await N(e, { data: A, to: f }) };
|
|
4090
4090
|
throw ki(k, {
|
|
@@ -12975,7 +12975,7 @@ Cn = async function() {
|
|
|
12975
12975
|
};
|
|
12976
12976
|
cr = /* @__PURE__ */ new WeakSet();
|
|
12977
12977
|
ea = async function() {
|
|
12978
|
-
const { EthereumProvider: e } = await import("./index.es-
|
|
12978
|
+
const { EthereumProvider: e } = await import("./index.es-MYE1njHi.mjs"), t = this.chains.map(({ id: n }) => n);
|
|
12979
12979
|
if (t.length) {
|
|
12980
12980
|
const {
|
|
12981
12981
|
projectId: n,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";const g=require("./index-Hc9ZLfg9.js");var Ne={},Ze={exports:{}},He={};(function(o){o.fetch=n(g.commonjsGlobal.fetch)&&n(g.commonjsGlobal.ReadableStream),o.writableStream=n(g.commonjsGlobal.WritableStream),o.abortController=n(g.commonjsGlobal.AbortController);var r;function f(){if(r!==void 0)return r;if(g.commonjsGlobal.XMLHttpRequest){r=new g.commonjsGlobal.XMLHttpRequest;try{r.open("GET",g.commonjsGlobal.XDomainRequest?"/":"https://example.com")}catch{r=null}}else r=null;return r}function u(b){var h=f();if(!h)return!1;try{return h.responseType=b,h.responseType===b}catch{}return!1}o.arraybuffer=o.fetch||u("arraybuffer"),o.msstream=!o.fetch&&u("ms-stream"),o.mozchunkedarraybuffer=!o.fetch&&u("moz-chunked-arraybuffer"),o.overrideMimeType=o.fetch||(f()?n(f().overrideMimeType):!1);function n(b){return typeof b=="function"}r=null})(He);var qe={},Ve=He,nt=g.requireInherits_browser(),Je=g.requireReadableBrowser(),Ce=qe.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},Ge=qe.IncomingMessage=function(o,r,f,u){var n=this;if(Je.Readable.call(n),n._mode=f,n.headers={},n.rawHeaders=[],n.trailers={},n.rawTrailers=[],n.on("end",function(){g.dist.process.nextTick(function(){n.emit("close")})}),f==="fetch"){let A=function(){h.read().then(function(d){if(!n._destroyed){if(u(d.done),d.done){n.push(null);return}n.push(g.dist.Buffer.from(d.value)),A()}}).catch(function(d){u(!0),n._destroyed||n.emit("error",d)})};if(n._fetchResponse=r,n.url=r.url,n.statusCode=r.status,n.statusMessage=r.statusText,r.headers.forEach(function(d,q){n.headers[q.toLowerCase()]=d,n.rawHeaders.push(q,d)}),Ve.writableStream){var b=new WritableStream({write:function(d){return u(!1),new Promise(function(q,ee){n._destroyed?ee():n.push(g.dist.Buffer.from(d))?q():n._resumeFetch=q})},close:function(){u(!0),n._destroyed||n.push(null)},abort:function(d){u(!0),n._destroyed||n.emit("error",d)}});try{r.body.pipeTo(b).catch(function(d){u(!0),n._destroyed||n.emit("error",d)});return}catch{}}var h=r.body.getReader();A()}else{n._xhr=o,n._pos=0,n.url=o.responseURL,n.statusCode=o.status,n.statusMessage=o.statusText;var a=o.getAllResponseHeaders().split(/\r?\n/);if(a.forEach(function(A){var d=A.match(/^([^:]+):\s*(.*)/);if(d){var q=d[1].toLowerCase();q==="set-cookie"?(n.headers[q]===void 0&&(n.headers[q]=[]),n.headers[q].push(d[2])):n.headers[q]!==void 0?n.headers[q]+=", "+d[2]:n.headers[q]=d[2],n.rawHeaders.push(d[1],d[2])}}),n._charset="x-user-defined",!Ve.overrideMimeType){var v=n.rawHeaders["mime-type"];if(v){var w=v.match(/;\s*charset=([^;])(;|$)/);w&&(n._charset=w[1].toLowerCase())}n._charset||(n._charset="utf-8")}}};nt(Ge,Je.Readable);Ge.prototype._read=function(){var o=this,r=o._resumeFetch;r&&(o._resumeFetch=null,r())};Ge.prototype._onXHRProgress=function(o){var r=this,f=r._xhr,u=null;switch(r._mode){case"text":if(u=f.responseText,u.length>r._pos){var n=u.substr(r._pos);if(r._charset==="x-user-defined"){for(var b=g.dist.Buffer.alloc(n.length),h=0;h<n.length;h++)b[h]=n.charCodeAt(h)&255;r.push(b)}else r.push(n,r._charset);r._pos=u.length}break;case"arraybuffer":if(f.readyState!==Ce.DONE||!f.response)break;u=f.response,r.push(g.dist.Buffer.from(new Uint8Array(u)));break;case"moz-chunked-arraybuffer":if(u=f.response,f.readyState!==Ce.LOADING||!u)break;r.push(g.dist.Buffer.from(new Uint8Array(u)));break;case"ms-stream":if(u=f.response,f.readyState!==Ce.LOADING)break;var a=new g.commonjsGlobal.MSStreamReader;a.onprogress=function(){a.result.byteLength>r._pos&&(r.push(g.dist.Buffer.from(new Uint8Array(a.result.slice(r._pos)))),r._pos=a.result.byteLength)},a.onload=function(){o(!0),r.push(null)},a.readAsArrayBuffer(u);break}r._xhr.readyState===Ce.DONE&&r._mode!=="ms-stream"&&(o(!0),r.push(null))};var ue=He,st=g.requireInherits_browser(),Qe=qe,ke=g.requireReadableBrowser(),at=Qe.IncomingMessage,Ye=Qe.readyStates;function it(o,r){return ue.fetch&&r?"fetch":ue.mozchunkedarraybuffer?"moz-chunked-arraybuffer":ue.msstream?"ms-stream":ue.arraybuffer&&o?"arraybuffer":"text"}var P=Ze.exports=function(o){var r=this;ke.Writable.call(r),r._opts=o,r._body=[],r._headers={},o.auth&&r.setHeader("Authorization","Basic "+g.dist.Buffer.from(o.auth).toString("base64")),Object.keys(o.headers).forEach(function(n){r.setHeader(n,o.headers[n])});var f,u=!0;if(o.mode==="disable-fetch"||"requestTimeout"in o&&!ue.abortController)u=!1,f=!0;else if(o.mode==="prefer-streaming")f=!1;else if(o.mode==="allow-wrong-content-type")f=!ue.overrideMimeType;else if(!o.mode||o.mode==="default"||o.mode==="prefer-fast")f=!0;else throw new Error("Invalid value for opts.mode");r._mode=it(f,u),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",function(){r._onFinish()})};st(P,ke.Writable);P.prototype.setHeader=function(o,r){var f=this,u=o.toLowerCase();ft.indexOf(u)===-1&&(f._headers[u]={name:o,value:r})};P.prototype.getHeader=function(o){var r=this._headers[o.toLowerCase()];return r?r.value:null};P.prototype.removeHeader=function(o){var r=this;delete r._headers[o.toLowerCase()]};P.prototype._onFinish=function(){var o=this;if(!o._destroyed){var r=o._opts;"timeout"in r&&r.timeout!==0&&o.setTimeout(r.timeout);var f=o._headers,u=null;r.method!=="GET"&&r.method!=="HEAD"&&(u=new Blob(o._body,{type:(f["content-type"]||{}).value||""}));var n=[];if(Object.keys(f).forEach(function(v){var w=f[v].name,A=f[v].value;Array.isArray(A)?A.forEach(function(d){n.push([w,d])}):n.push([w,A])}),o._mode==="fetch"){var b=null;if(ue.abortController){var h=new AbortController;b=h.signal,o._fetchAbortController=h,"requestTimeout"in r&&r.requestTimeout!==0&&(o._fetchTimer=g.commonjsGlobal.setTimeout(function(){o.emit("requestTimeout"),o._fetchAbortController&&o._fetchAbortController.abort()},r.requestTimeout))}g.commonjsGlobal.fetch(o._opts.url,{method:o._opts.method,headers:n,body:u||void 0,mode:"cors",credentials:r.withCredentials?"include":"same-origin",signal:b}).then(function(v){o._fetchResponse=v,o._resetTimers(!1),o._connect()},function(v){o._resetTimers(!0),o._destroyed||o.emit("error",v)})}else{var a=o._xhr=new g.commonjsGlobal.XMLHttpRequest;try{a.open(o._opts.method,o._opts.url,!0)}catch(v){g.dist.process.nextTick(function(){o.emit("error",v)});return}"responseType"in a&&(a.responseType=o._mode),"withCredentials"in a&&(a.withCredentials=!!r.withCredentials),o._mode==="text"&&"overrideMimeType"in a&&a.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in r&&(a.timeout=r.requestTimeout,a.ontimeout=function(){o.emit("requestTimeout")}),n.forEach(function(v){a.setRequestHeader(v[0],v[1])}),o._response=null,a.onreadystatechange=function(){switch(a.readyState){case Ye.LOADING:case Ye.DONE:o._onXHRProgress();break}},o._mode==="moz-chunked-arraybuffer"&&(a.onprogress=function(){o._onXHRProgress()}),a.onerror=function(){o._destroyed||(o._resetTimers(!0),o.emit("error",new Error("XHR error")))};try{a.send(u)}catch(v){g.dist.process.nextTick(function(){o.emit("error",v)});return}}}};function ut(o){try{var r=o.status;return r!==null&&r!==0}catch{return!1}}P.prototype._onXHRProgress=function(){var o=this;o._resetTimers(!1),!(!ut(o._xhr)||o._destroyed)&&(o._response||o._connect(),o._response._onXHRProgress(o._resetTimers.bind(o)))};P.prototype._connect=function(){var o=this;o._destroyed||(o._response=new at(o._xhr,o._fetchResponse,o._mode,o._resetTimers.bind(o)),o._response.on("error",function(r){o.emit("error",r)}),o.emit("response",o._response))};P.prototype._write=function(o,r,f){var u=this;u._body.push(o),f()};P.prototype._resetTimers=function(o){var r=this;g.commonjsGlobal.clearTimeout(r._socketTimer),r._socketTimer=null,o?(g.commonjsGlobal.clearTimeout(r._fetchTimer),r._fetchTimer=null):r._socketTimeout&&(r._socketTimer=g.commonjsGlobal.setTimeout(function(){r.emit("timeout")},r._socketTimeout))};P.prototype.abort=P.prototype.destroy=function(o){var r=this;r._destroyed=!0,r._resetTimers(!0),r._response&&(r._response._destroyed=!0),r._xhr?r._xhr.abort():r._fetchAbortController&&r._fetchAbortController.abort(),o&&r.emit("error",o)};P.prototype.end=function(o,r,f){var u=this;typeof o=="function"&&(f=o,o=void 0),ke.Writable.prototype.end.call(u,o,r,f)};P.prototype.setTimeout=function(o,r){var f=this;r&&f.once("timeout",r),f._socketTimeout=o,f._resetTimers(!1)};P.prototype.flushHeaders=function(){};P.prototype.setNoDelay=function(){};P.prototype.setSocketKeepAlive=function(){};var ft=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],ht=Ze.exports,lt=pt,ct=Object.prototype.hasOwnProperty;function pt(){for(var o={},r=0;r<arguments.length;r++){var f=arguments[r];for(var u in f)ct.call(f,u)&&(o[u]=f[u])}return o}var mt={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},Me={exports:{}},Ae={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Ae.exports;(function(o,r){(function(f){var u=r&&!r.nodeType&&r,n=o&&!o.nodeType&&o,b=typeof g.commonjsGlobal=="object"&&g.commonjsGlobal;(b.global===b||b.window===b||b.self===b)&&(f=b);var h,a=2147483647,v=36,w=1,A=26,d=38,q=700,ee=72,se=128,S="-",xe=/^xn--/,Oe=/[^\x20-\x7E]/,Ee=/[\x2E\u3002\uFF0E\uFF61]/g,Ue={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ce=v-w,F=Math.floor,te=String.fromCharCode,ae;function Z(i){throw new RangeError(Ue[i])}function pe(i,p){for(var y=i.length,T=[];y--;)T[y]=p(i[y]);return T}function be(i,p){var y=i.split("@"),T="";y.length>1&&(T=y[0]+"@",i=y[1]),i=i.replace(Ee,".");var R=i.split("."),I=pe(R,p).join(".");return T+I}function _e(i){for(var p=[],y=0,T=i.length,R,I;y<T;)R=i.charCodeAt(y++),R>=55296&&R<=56319&&y<T?(I=i.charCodeAt(y++),(I&64512)==56320?p.push(((R&1023)<<10)+(I&1023)+65536):(p.push(R),y--)):p.push(R);return p}function fe(i){return pe(i,function(p){var y="";return p>65535&&(p-=65536,y+=te(p>>>10&1023|55296),p=56320|p&1023),y+=te(p),y}).join("")}function re(i){return i-48<10?i-22:i-65<26?i-65:i-97<26?i-97:v}function he(i,p){return i+22+75*(i<26)-((p!=0)<<5)}function oe(i,p,y){var T=0;for(i=y?F(i/q):i>>1,i+=F(i/p);i>ce*A>>1;T+=v)i=F(i/ce);return F(T+(ce+1)*i/(i+d))}function Te(i){var p=[],y=i.length,T,R=0,I=se,x=ee,C,M,$,B,L,N,k,W,J;for(C=i.lastIndexOf(S),C<0&&(C=0),M=0;M<C;++M)i.charCodeAt(M)>=128&&Z("not-basic"),p.push(i.charCodeAt(M));for($=C>0?C+1:0;$<y;){for(B=R,L=1,N=v;$>=y&&Z("invalid-input"),k=re(i.charCodeAt($++)),(k>=v||k>F((a-R)/L))&&Z("overflow"),R+=k*L,W=N<=x?w:N>=x+A?A:N-x,!(k<W);N+=v)J=v-W,L>F(a/J)&&Z("overflow"),L*=J;T=p.length+1,x=oe(R-B,T,B==0),F(R/T)>a-I&&Z("overflow"),I+=F(R/T),R%=T,p.splice(R++,0,I)}return fe(p)}function we(i){var p,y,T,R,I,x,C,M,$,B,L,N=[],k,W,J,me;for(i=_e(i),k=i.length,p=se,y=0,I=ee,x=0;x<k;++x)L=i[x],L<128&&N.push(te(L));for(T=R=N.length,R&&N.push(S);T<k;){for(C=a,x=0;x<k;++x)L=i[x],L>=p&&L<C&&(C=L);for(W=T+1,C-p>F((a-y)/W)&&Z("overflow"),y+=(C-p)*W,p=C,x=0;x<k;++x)if(L=i[x],L<p&&++y>a&&Z("overflow"),L==p){for(M=y,$=v;B=$<=I?w:$>=I+A?A:$-I,!(M<B);$+=v)me=M-B,J=v-B,N.push(te(he(B+me%J,0))),M=F(me/J);N.push(te(he(M,0))),I=oe(y,W,T==R),y=0,++T}++y,++p}return N.join("")}function Ie(i){return be(i,function(p){return xe.test(p)?Te(p.slice(4).toLowerCase()):p})}function Le(i){return be(i,function(p){return Oe.test(p)?"xn--"+we(p):p})}if(h={version:"1.4.1",ucs2:{decode:_e,encode:fe},decode:Te,encode:we,toASCII:Le,toUnicode:Ie},u&&n)if(o.exports==u)n.exports=h;else for(ae in h)h.hasOwnProperty(ae)&&(u[ae]=h[ae]);else f.punycode=h})(g.commonjsGlobal)})(Ae,Ae.exports);var dt=Ae.exports;(function(o,r){Object.defineProperty(r,"__esModule",{value:!0});var f=dt,u=g.require$$2;function n(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var b=n(f),h=n(u),a={isString:function(e){return typeof e=="string"},isObject:function(e){return typeof e=="object"&&e!==null},isNull:function(e){return e===null},isNullOrUndefined:function(e){return e==null}},v=b.default,w=a,A=oe,d=we,q=Ie,ee=Te,se=S;function S(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var xe=/^([a-z0-9.+-]+:)/i,Oe=/:[0-9]*$/,Ee=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Ue=["<",">",'"',"`"," ","\r",`
|
|
1
|
+
"use strict";const g=require("./index-KhNenQBC.js");var Ne={},Ze={exports:{}},He={};(function(o){o.fetch=n(g.commonjsGlobal.fetch)&&n(g.commonjsGlobal.ReadableStream),o.writableStream=n(g.commonjsGlobal.WritableStream),o.abortController=n(g.commonjsGlobal.AbortController);var r;function f(){if(r!==void 0)return r;if(g.commonjsGlobal.XMLHttpRequest){r=new g.commonjsGlobal.XMLHttpRequest;try{r.open("GET",g.commonjsGlobal.XDomainRequest?"/":"https://example.com")}catch{r=null}}else r=null;return r}function u(b){var h=f();if(!h)return!1;try{return h.responseType=b,h.responseType===b}catch{}return!1}o.arraybuffer=o.fetch||u("arraybuffer"),o.msstream=!o.fetch&&u("ms-stream"),o.mozchunkedarraybuffer=!o.fetch&&u("moz-chunked-arraybuffer"),o.overrideMimeType=o.fetch||(f()?n(f().overrideMimeType):!1);function n(b){return typeof b=="function"}r=null})(He);var qe={},Ve=He,nt=g.requireInherits_browser(),Je=g.requireReadableBrowser(),Ce=qe.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},Ge=qe.IncomingMessage=function(o,r,f,u){var n=this;if(Je.Readable.call(n),n._mode=f,n.headers={},n.rawHeaders=[],n.trailers={},n.rawTrailers=[],n.on("end",function(){g.dist.process.nextTick(function(){n.emit("close")})}),f==="fetch"){let A=function(){h.read().then(function(d){if(!n._destroyed){if(u(d.done),d.done){n.push(null);return}n.push(g.dist.Buffer.from(d.value)),A()}}).catch(function(d){u(!0),n._destroyed||n.emit("error",d)})};if(n._fetchResponse=r,n.url=r.url,n.statusCode=r.status,n.statusMessage=r.statusText,r.headers.forEach(function(d,q){n.headers[q.toLowerCase()]=d,n.rawHeaders.push(q,d)}),Ve.writableStream){var b=new WritableStream({write:function(d){return u(!1),new Promise(function(q,ee){n._destroyed?ee():n.push(g.dist.Buffer.from(d))?q():n._resumeFetch=q})},close:function(){u(!0),n._destroyed||n.push(null)},abort:function(d){u(!0),n._destroyed||n.emit("error",d)}});try{r.body.pipeTo(b).catch(function(d){u(!0),n._destroyed||n.emit("error",d)});return}catch{}}var h=r.body.getReader();A()}else{n._xhr=o,n._pos=0,n.url=o.responseURL,n.statusCode=o.status,n.statusMessage=o.statusText;var a=o.getAllResponseHeaders().split(/\r?\n/);if(a.forEach(function(A){var d=A.match(/^([^:]+):\s*(.*)/);if(d){var q=d[1].toLowerCase();q==="set-cookie"?(n.headers[q]===void 0&&(n.headers[q]=[]),n.headers[q].push(d[2])):n.headers[q]!==void 0?n.headers[q]+=", "+d[2]:n.headers[q]=d[2],n.rawHeaders.push(d[1],d[2])}}),n._charset="x-user-defined",!Ve.overrideMimeType){var v=n.rawHeaders["mime-type"];if(v){var w=v.match(/;\s*charset=([^;])(;|$)/);w&&(n._charset=w[1].toLowerCase())}n._charset||(n._charset="utf-8")}}};nt(Ge,Je.Readable);Ge.prototype._read=function(){var o=this,r=o._resumeFetch;r&&(o._resumeFetch=null,r())};Ge.prototype._onXHRProgress=function(o){var r=this,f=r._xhr,u=null;switch(r._mode){case"text":if(u=f.responseText,u.length>r._pos){var n=u.substr(r._pos);if(r._charset==="x-user-defined"){for(var b=g.dist.Buffer.alloc(n.length),h=0;h<n.length;h++)b[h]=n.charCodeAt(h)&255;r.push(b)}else r.push(n,r._charset);r._pos=u.length}break;case"arraybuffer":if(f.readyState!==Ce.DONE||!f.response)break;u=f.response,r.push(g.dist.Buffer.from(new Uint8Array(u)));break;case"moz-chunked-arraybuffer":if(u=f.response,f.readyState!==Ce.LOADING||!u)break;r.push(g.dist.Buffer.from(new Uint8Array(u)));break;case"ms-stream":if(u=f.response,f.readyState!==Ce.LOADING)break;var a=new g.commonjsGlobal.MSStreamReader;a.onprogress=function(){a.result.byteLength>r._pos&&(r.push(g.dist.Buffer.from(new Uint8Array(a.result.slice(r._pos)))),r._pos=a.result.byteLength)},a.onload=function(){o(!0),r.push(null)},a.readAsArrayBuffer(u);break}r._xhr.readyState===Ce.DONE&&r._mode!=="ms-stream"&&(o(!0),r.push(null))};var ue=He,st=g.requireInherits_browser(),Qe=qe,ke=g.requireReadableBrowser(),at=Qe.IncomingMessage,Ye=Qe.readyStates;function it(o,r){return ue.fetch&&r?"fetch":ue.mozchunkedarraybuffer?"moz-chunked-arraybuffer":ue.msstream?"ms-stream":ue.arraybuffer&&o?"arraybuffer":"text"}var P=Ze.exports=function(o){var r=this;ke.Writable.call(r),r._opts=o,r._body=[],r._headers={},o.auth&&r.setHeader("Authorization","Basic "+g.dist.Buffer.from(o.auth).toString("base64")),Object.keys(o.headers).forEach(function(n){r.setHeader(n,o.headers[n])});var f,u=!0;if(o.mode==="disable-fetch"||"requestTimeout"in o&&!ue.abortController)u=!1,f=!0;else if(o.mode==="prefer-streaming")f=!1;else if(o.mode==="allow-wrong-content-type")f=!ue.overrideMimeType;else if(!o.mode||o.mode==="default"||o.mode==="prefer-fast")f=!0;else throw new Error("Invalid value for opts.mode");r._mode=it(f,u),r._fetchTimer=null,r._socketTimeout=null,r._socketTimer=null,r.on("finish",function(){r._onFinish()})};st(P,ke.Writable);P.prototype.setHeader=function(o,r){var f=this,u=o.toLowerCase();ft.indexOf(u)===-1&&(f._headers[u]={name:o,value:r})};P.prototype.getHeader=function(o){var r=this._headers[o.toLowerCase()];return r?r.value:null};P.prototype.removeHeader=function(o){var r=this;delete r._headers[o.toLowerCase()]};P.prototype._onFinish=function(){var o=this;if(!o._destroyed){var r=o._opts;"timeout"in r&&r.timeout!==0&&o.setTimeout(r.timeout);var f=o._headers,u=null;r.method!=="GET"&&r.method!=="HEAD"&&(u=new Blob(o._body,{type:(f["content-type"]||{}).value||""}));var n=[];if(Object.keys(f).forEach(function(v){var w=f[v].name,A=f[v].value;Array.isArray(A)?A.forEach(function(d){n.push([w,d])}):n.push([w,A])}),o._mode==="fetch"){var b=null;if(ue.abortController){var h=new AbortController;b=h.signal,o._fetchAbortController=h,"requestTimeout"in r&&r.requestTimeout!==0&&(o._fetchTimer=g.commonjsGlobal.setTimeout(function(){o.emit("requestTimeout"),o._fetchAbortController&&o._fetchAbortController.abort()},r.requestTimeout))}g.commonjsGlobal.fetch(o._opts.url,{method:o._opts.method,headers:n,body:u||void 0,mode:"cors",credentials:r.withCredentials?"include":"same-origin",signal:b}).then(function(v){o._fetchResponse=v,o._resetTimers(!1),o._connect()},function(v){o._resetTimers(!0),o._destroyed||o.emit("error",v)})}else{var a=o._xhr=new g.commonjsGlobal.XMLHttpRequest;try{a.open(o._opts.method,o._opts.url,!0)}catch(v){g.dist.process.nextTick(function(){o.emit("error",v)});return}"responseType"in a&&(a.responseType=o._mode),"withCredentials"in a&&(a.withCredentials=!!r.withCredentials),o._mode==="text"&&"overrideMimeType"in a&&a.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in r&&(a.timeout=r.requestTimeout,a.ontimeout=function(){o.emit("requestTimeout")}),n.forEach(function(v){a.setRequestHeader(v[0],v[1])}),o._response=null,a.onreadystatechange=function(){switch(a.readyState){case Ye.LOADING:case Ye.DONE:o._onXHRProgress();break}},o._mode==="moz-chunked-arraybuffer"&&(a.onprogress=function(){o._onXHRProgress()}),a.onerror=function(){o._destroyed||(o._resetTimers(!0),o.emit("error",new Error("XHR error")))};try{a.send(u)}catch(v){g.dist.process.nextTick(function(){o.emit("error",v)});return}}}};function ut(o){try{var r=o.status;return r!==null&&r!==0}catch{return!1}}P.prototype._onXHRProgress=function(){var o=this;o._resetTimers(!1),!(!ut(o._xhr)||o._destroyed)&&(o._response||o._connect(),o._response._onXHRProgress(o._resetTimers.bind(o)))};P.prototype._connect=function(){var o=this;o._destroyed||(o._response=new at(o._xhr,o._fetchResponse,o._mode,o._resetTimers.bind(o)),o._response.on("error",function(r){o.emit("error",r)}),o.emit("response",o._response))};P.prototype._write=function(o,r,f){var u=this;u._body.push(o),f()};P.prototype._resetTimers=function(o){var r=this;g.commonjsGlobal.clearTimeout(r._socketTimer),r._socketTimer=null,o?(g.commonjsGlobal.clearTimeout(r._fetchTimer),r._fetchTimer=null):r._socketTimeout&&(r._socketTimer=g.commonjsGlobal.setTimeout(function(){r.emit("timeout")},r._socketTimeout))};P.prototype.abort=P.prototype.destroy=function(o){var r=this;r._destroyed=!0,r._resetTimers(!0),r._response&&(r._response._destroyed=!0),r._xhr?r._xhr.abort():r._fetchAbortController&&r._fetchAbortController.abort(),o&&r.emit("error",o)};P.prototype.end=function(o,r,f){var u=this;typeof o=="function"&&(f=o,o=void 0),ke.Writable.prototype.end.call(u,o,r,f)};P.prototype.setTimeout=function(o,r){var f=this;r&&f.once("timeout",r),f._socketTimeout=o,f._resetTimers(!1)};P.prototype.flushHeaders=function(){};P.prototype.setNoDelay=function(){};P.prototype.setSocketKeepAlive=function(){};var ft=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],ht=Ze.exports,lt=pt,ct=Object.prototype.hasOwnProperty;function pt(){for(var o={},r=0;r<arguments.length;r++){var f=arguments[r];for(var u in f)ct.call(f,u)&&(o[u]=f[u])}return o}var mt={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},Me={exports:{}},Ae={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Ae.exports;(function(o,r){(function(f){var u=r&&!r.nodeType&&r,n=o&&!o.nodeType&&o,b=typeof g.commonjsGlobal=="object"&&g.commonjsGlobal;(b.global===b||b.window===b||b.self===b)&&(f=b);var h,a=2147483647,v=36,w=1,A=26,d=38,q=700,ee=72,se=128,S="-",xe=/^xn--/,Oe=/[^\x20-\x7E]/,Ee=/[\x2E\u3002\uFF0E\uFF61]/g,Ue={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ce=v-w,F=Math.floor,te=String.fromCharCode,ae;function Z(i){throw new RangeError(Ue[i])}function pe(i,p){for(var y=i.length,T=[];y--;)T[y]=p(i[y]);return T}function be(i,p){var y=i.split("@"),T="";y.length>1&&(T=y[0]+"@",i=y[1]),i=i.replace(Ee,".");var R=i.split("."),I=pe(R,p).join(".");return T+I}function _e(i){for(var p=[],y=0,T=i.length,R,I;y<T;)R=i.charCodeAt(y++),R>=55296&&R<=56319&&y<T?(I=i.charCodeAt(y++),(I&64512)==56320?p.push(((R&1023)<<10)+(I&1023)+65536):(p.push(R),y--)):p.push(R);return p}function fe(i){return pe(i,function(p){var y="";return p>65535&&(p-=65536,y+=te(p>>>10&1023|55296),p=56320|p&1023),y+=te(p),y}).join("")}function re(i){return i-48<10?i-22:i-65<26?i-65:i-97<26?i-97:v}function he(i,p){return i+22+75*(i<26)-((p!=0)<<5)}function oe(i,p,y){var T=0;for(i=y?F(i/q):i>>1,i+=F(i/p);i>ce*A>>1;T+=v)i=F(i/ce);return F(T+(ce+1)*i/(i+d))}function Te(i){var p=[],y=i.length,T,R=0,I=se,x=ee,C,M,$,B,L,N,k,W,J;for(C=i.lastIndexOf(S),C<0&&(C=0),M=0;M<C;++M)i.charCodeAt(M)>=128&&Z("not-basic"),p.push(i.charCodeAt(M));for($=C>0?C+1:0;$<y;){for(B=R,L=1,N=v;$>=y&&Z("invalid-input"),k=re(i.charCodeAt($++)),(k>=v||k>F((a-R)/L))&&Z("overflow"),R+=k*L,W=N<=x?w:N>=x+A?A:N-x,!(k<W);N+=v)J=v-W,L>F(a/J)&&Z("overflow"),L*=J;T=p.length+1,x=oe(R-B,T,B==0),F(R/T)>a-I&&Z("overflow"),I+=F(R/T),R%=T,p.splice(R++,0,I)}return fe(p)}function we(i){var p,y,T,R,I,x,C,M,$,B,L,N=[],k,W,J,me;for(i=_e(i),k=i.length,p=se,y=0,I=ee,x=0;x<k;++x)L=i[x],L<128&&N.push(te(L));for(T=R=N.length,R&&N.push(S);T<k;){for(C=a,x=0;x<k;++x)L=i[x],L>=p&&L<C&&(C=L);for(W=T+1,C-p>F((a-y)/W)&&Z("overflow"),y+=(C-p)*W,p=C,x=0;x<k;++x)if(L=i[x],L<p&&++y>a&&Z("overflow"),L==p){for(M=y,$=v;B=$<=I?w:$>=I+A?A:$-I,!(M<B);$+=v)me=M-B,J=v-B,N.push(te(he(B+me%J,0))),M=F(me/J);N.push(te(he(M,0))),I=oe(y,W,T==R),y=0,++T}++y,++p}return N.join("")}function Ie(i){return be(i,function(p){return xe.test(p)?Te(p.slice(4).toLowerCase()):p})}function Le(i){return be(i,function(p){return Oe.test(p)?"xn--"+we(p):p})}if(h={version:"1.4.1",ucs2:{decode:_e,encode:fe},decode:Te,encode:we,toASCII:Le,toUnicode:Ie},u&&n)if(o.exports==u)n.exports=h;else for(ae in h)h.hasOwnProperty(ae)&&(u[ae]=h[ae]);else f.punycode=h})(g.commonjsGlobal)})(Ae,Ae.exports);var dt=Ae.exports;(function(o,r){Object.defineProperty(r,"__esModule",{value:!0});var f=dt,u=g.require$$2;function n(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var b=n(f),h=n(u),a={isString:function(e){return typeof e=="string"},isObject:function(e){return typeof e=="object"&&e!==null},isNull:function(e){return e===null},isNullOrUndefined:function(e){return e==null}},v=b.default,w=a,A=oe,d=we,q=Ie,ee=Te,se=S;function S(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var xe=/^([a-z0-9.+-]+:)/i,Oe=/:[0-9]*$/,Ee=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Ue=["<",">",'"',"`"," ","\r",`
|
|
2
2
|
`," "],ce=["{","}","|","\\","^","`"].concat(Ue),F=["'"].concat(ce),te=["%","/","?",";","#"].concat(F),ae=["/","?","#"],Z=255,pe=/^[+a-z0-9A-Z_-]{0,63}$/,be=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_e={javascript:!0,"javascript:":!0},fe={javascript:!0,"javascript:":!0},re={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},he=h.default;function oe(e,s,t){if(e&&w.isObject(e)&&e instanceof S)return e;var c=new S;return c.parse(e,s,t),c}S.prototype.parse=function(e,s,t){if(!w.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var c=e.indexOf("?"),_=c!==-1&&c<e.indexOf("#")?"?":"#",D=e.split(_),H=/\\/g;D[0]=D[0].replace(H,"/"),e=D.join(_);var l=e;if(l=l.trim(),!t&&e.split("#").length===1){var K=Ee.exec(l);if(K)return this.path=l,this.href=l,this.pathname=K[1],K[2]?(this.search=K[2],s?this.query=he.parse(this.search.substr(1)):this.query=this.search.substr(1)):s&&(this.search="",this.query={}),this}var O=xe.exec(l);if(O){O=O[0];var ie=O.toLowerCase();this.protocol=ie,l=l.substr(O.length)}if(t||O||l.match(/^\/\/[^@\/]+@[^@\/]+/)){var de=l.substr(0,2)==="//";de&&!(O&&fe[O])&&(l=l.substr(2),this.slashes=!0)}if(!fe[O]&&(de||O&&!re[O])){for(var j=-1,E=0;E<ae.length;E++){var Q=l.indexOf(ae[E]);Q!==-1&&(j===-1||Q<j)&&(j=Q)}var ve,G;j===-1?G=l.lastIndexOf("@"):G=l.lastIndexOf("@",j),G!==-1&&(ve=l.slice(0,G),l=l.slice(G+1),this.auth=decodeURIComponent(ve)),j=-1;for(var E=0;E<te.length;E++){var Q=l.indexOf(te[E]);Q!==-1&&(j===-1||Q<j)&&(j=Q)}j===-1&&(j=l.length),this.host=l.slice(0,j),l=l.slice(j),this.parseHost(),this.hostname=this.hostname||"";var ye=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!ye)for(var m=this.hostname.split(/\./),E=0,U=m.length;E<U;E++){var V=m[E];if(V&&!V.match(pe)){for(var z="",X=0,Pe=V.length;X<Pe;X++)V.charCodeAt(X)>127?z+="x":z+=V[X];if(!z.match(pe)){var ne=m.slice(0,E),Y=m.slice(E+1),le=V.match(be);le&&(ne.push(le[1]),Y.unshift(le[2])),Y.length&&(l="/"+Y.join(".")+l),this.hostname=ne.join(".");break}}}this.hostname.length>Z?this.hostname="":this.hostname=this.hostname.toLowerCase(),ye||(this.hostname=v.toASCII(this.hostname));var Se=this.port?":"+this.port:"",rt=this.hostname||"";this.host=rt+Se,this.href+=this.host,ye&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),l[0]!=="/"&&(l="/"+l))}if(!_e[ie])for(var E=0,U=F.length;E<U;E++){var ge=F[E];if(l.indexOf(ge)!==-1){var je=encodeURIComponent(ge);je===ge&&(je=escape(ge)),l=l.split(ge).join(je)}}var Fe=l.indexOf("#");Fe!==-1&&(this.hash=l.substr(Fe),l=l.slice(0,Fe));var Re=l.indexOf("?");if(Re!==-1?(this.search=l.substr(Re),this.query=l.substr(Re+1),s&&(this.query=he.parse(this.query)),l=l.slice(0,Re)):s&&(this.search="",this.query={}),l&&(this.pathname=l),re[ie]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Se=this.pathname||"",ot=this.search||"";this.path=Se+ot}return this.href=this.format(),this};function Te(e){return w.isString(e)&&(e=oe(e)),e instanceof S?e.format():S.prototype.format.call(e)}S.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var s=this.protocol||"",t=this.pathname||"",c=this.hash||"",_=!1,D="";this.host?_=e+this.host:this.hostname&&(_=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(_+=":"+this.port)),this.query&&w.isObject(this.query)&&Object.keys(this.query).length&&(D=he.stringify(this.query));var H=this.search||D&&"?"+D||"";return s&&s.substr(-1)!==":"&&(s+=":"),this.slashes||(!s||re[s])&&_!==!1?(_="//"+(_||""),t&&t.charAt(0)!=="/"&&(t="/"+t)):_||(_=""),c&&c.charAt(0)!=="#"&&(c="#"+c),H&&H.charAt(0)!=="?"&&(H="?"+H),t=t.replace(/[?#]/g,function(l){return encodeURIComponent(l)}),H=H.replace("#","%23"),s+_+t+H+c};function we(e,s){return oe(e,!1,!0).resolve(s)}S.prototype.resolve=function(e){return this.resolveObject(oe(e,!1,!0)).format()};function Ie(e,s){return e?oe(e,!1,!0).resolveObject(s):s}S.prototype.resolveObject=function(e){if(w.isString(e)){var s=new S;s.parse(e,!1,!0),e=s}for(var t=new S,c=Object.keys(this),_=0;_<c.length;_++){var D=c[_];t[D]=this[D]}if(t.hash=e.hash,e.href==="")return t.href=t.format(),t;if(e.slashes&&!e.protocol){for(var H=Object.keys(e),l=0;l<H.length;l++){var K=H[l];K!=="protocol"&&(t[K]=e[K])}return re[t.protocol]&&t.hostname&&!t.pathname&&(t.path=t.pathname="/"),t.href=t.format(),t}if(e.protocol&&e.protocol!==t.protocol){if(!re[e.protocol]){for(var O=Object.keys(e),ie=0;ie<O.length;ie++){var de=O[ie];t[de]=e[de]}return t.href=t.format(),t}if(t.protocol=e.protocol,!e.host&&!fe[e.protocol]){for(var U=(e.pathname||"").split("/");U.length&&!(e.host=U.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),U[0]!==""&&U.unshift(""),U.length<2&&U.unshift(""),t.pathname=U.join("/")}else t.pathname=e.pathname;if(t.search=e.search,t.query=e.query,t.host=e.host||"",t.auth=e.auth,t.hostname=e.hostname||e.host,t.port=e.port,t.pathname||t.search){var j=t.pathname||"",E=t.search||"";t.path=j+E}return t.slashes=t.slashes||e.slashes,t.href=t.format(),t}var Q=t.pathname&&t.pathname.charAt(0)==="/",ve=e.host||e.pathname&&e.pathname.charAt(0)==="/",G=ve||Q||t.host&&e.pathname,ye=G,m=t.pathname&&t.pathname.split("/")||[],U=e.pathname&&e.pathname.split("/")||[],V=t.protocol&&!re[t.protocol];if(V&&(t.hostname="",t.port=null,t.host&&(m[0]===""?m[0]=t.host:m.unshift(t.host)),t.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(U[0]===""?U[0]=e.host:U.unshift(e.host)),e.host=null),G=G&&(U[0]===""||m[0]==="")),ve)t.host=e.host||e.host===""?e.host:t.host,t.hostname=e.hostname||e.hostname===""?e.hostname:t.hostname,t.search=e.search,t.query=e.query,m=U;else if(U.length)m||(m=[]),m.pop(),m=m.concat(U),t.search=e.search,t.query=e.query;else if(!w.isNullOrUndefined(e.search)){if(V){t.hostname=t.host=m.shift();var z=t.host&&t.host.indexOf("@")>0?t.host.split("@"):!1;z&&(t.auth=z.shift(),t.host=t.hostname=z.shift())}return t.search=e.search,t.query=e.query,(!w.isNull(t.pathname)||!w.isNull(t.search))&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!m.length)return t.pathname=null,t.search?t.path="/"+t.search:t.path=null,t.href=t.format(),t;for(var X=m.slice(-1)[0],Pe=(t.host||e.host||m.length>1)&&(X==="."||X==="..")||X==="",ne=0,Y=m.length;Y>=0;Y--)X=m[Y],X==="."?m.splice(Y,1):X===".."?(m.splice(Y,1),ne++):ne&&(m.splice(Y,1),ne--);if(!G&&!ye)for(;ne--;ne)m.unshift("..");G&&m[0]!==""&&(!m[0]||m[0].charAt(0)!=="/")&&m.unshift(""),Pe&&m.join("/").substr(-1)!=="/"&&m.push("");var le=m[0]===""||m[0]&&m[0].charAt(0)==="/";if(V){t.hostname=t.host=le?"":m.length?m.shift():"";var z=t.host&&t.host.indexOf("@")>0?t.host.split("@"):!1;z&&(t.auth=z.shift(),t.host=t.hostname=z.shift())}return G=G||t.host&&m.length,G&&!le&&m.unshift(""),m.length?t.pathname=m.join("/"):(t.pathname=null,t.path=null),(!w.isNull(t.pathname)||!w.isNull(t.search))&&(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=e.auth||t.auth,t.slashes=t.slashes||e.slashes,t.href=t.format(),t},S.prototype.parseHost=function(){var e=this.host,s=Oe.exec(e);s&&(s=s[0],s!==":"&&(this.port=s.substr(1)),e=e.substr(0,e.length-s.length)),e&&(this.hostname=e)};function Le(e,s){for(var t=0,c=e.length-1;c>=0;c--){var _=e[c];_==="."?e.splice(c,1):_===".."?(e.splice(c,1),t++):t&&(e.splice(c,1),t--)}if(s)for(;t--;t)e.unshift("..");return e}function i(){for(var e="",s=!1,t=arguments.length-1;t>=-1&&!s;t--){var c=t>=0?arguments[t]:"/";if(typeof c!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!c)continue;e=c+"/"+e,s=c.charAt(0)==="/"}return e=Le(p(e.split("/"),function(_){return!!_}),!s).join("/"),(s?"/":"")+e||"."}function p(e,s){if(e.filter)return e.filter(s);for(var t=[],c=0;c<e.length;c++)s(e[c],c,e)&&t.push(e[c]);return t}var y=function(e){function s(){var c=this||self;return delete e.prototype.__magic__,c}if(typeof globalThis=="object")return globalThis;if(this)return s();e.defineProperty(e.prototype,"__magic__",{configurable:!0,get:s});var t=__magic__;return t}(Object),T=ee,R=A,I=d,x=se,C=y.URL,M=y.URLSearchParams,$=/%/g,B=/\\/g,L=/\n/g,N=/\r/g,k=/\t/g,W=47;function J(e){var s=e??null;return!!(s!==null&&(s!=null&&s.href)&&(s!=null&&s.origin))}function me(e){if(e.hostname!=="")throw new TypeError('File URL host must be "localhost" or empty on browser');for(var s=e.pathname,t=0;t<s.length;t++)if(s[t]==="%"){var c=s.codePointAt(t+2)|32;if(s[t+1]==="2"&&c===102)throw new TypeError("File URL path must not include encoded / characters")}return decodeURIComponent(s)}function tt(e){return e.includes("%")&&(e=e.replace($,"%25")),e.includes("\\")&&(e=e.replace(B,"%5C")),e.includes(`
|
|
3
3
|
`)&&(e=e.replace(L,"%0A")),e.includes("\r")&&(e=e.replace(N,"%0D")),e.includes(" ")&&(e=e.replace(k,"%09")),e}var $e=function(s){if(typeof s>"u")throw new TypeError('The "domain" argument must be specified');return new C("http://"+s).hostname},Be=function(s){if(typeof s>"u")throw new TypeError('The "domain" argument must be specified');return new C("http://"+s).hostname},ze=function(s){var t=new C("file://"),c=i(s),_=s.charCodeAt(s.length-1);return _===W&&c[c.length-1]!=="/"&&(c+="/"),t.pathname=tt(c),t},Xe=function(s){if(!J(s)&&typeof s!="string")throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type '+typeof s+" ("+s+")");var t=new C(s);if(t.protocol!=="file:")throw new TypeError("The URL must be of scheme file");return me(t)},We=function(s,t){var c,_,D;if(t===void 0&&(t={}),!(s instanceof C))return T(s);if(typeof t!="object"||t===null)throw new TypeError('The "options" argument must be of type object.');var H=(c=t.auth)!=null?c:!0,l=(_=t.fragment)!=null?_:!0,K=(D=t.search)!=null?D:!0,O=new C(s.toString());return H||(O.username="",O.password=""),l||(O.hash=""),K||(O.search=""),O.toString()},Ke={format:We,parse:R,resolve:I,resolveObject:q,Url:x,URL:C,URLSearchParams:M,domainToASCII:$e,domainToUnicode:Be,pathToFileURL:ze,fileURLToPath:Xe};r.URL=C,r.URLSearchParams=M,r.Url=x,r.default=Ke,r.domainToASCII=$e,r.domainToUnicode=Be,r.fileURLToPath=Xe,r.format=We,r.parse=R,r.pathToFileURL=ze,r.resolve=I,r.resolveObject=q,r=o.exports=Ke})(Me,Me.exports);var De=Me.exports;(function(o){var r=ht,f=qe,u=lt,n=mt,b=De,h=o;h.request=function(a,v){typeof a=="string"?a=b.parse(a):a=u(a);var w=g.commonjsGlobal.location.protocol.search(/^https?:$/)===-1?"http:":"",A=a.protocol||w,d=a.hostname||a.host,q=a.port,ee=a.path||"/";d&&d.indexOf(":")!==-1&&(d="["+d+"]"),a.url=(d?A+"//"+d:"")+(q?":"+q:"")+ee,a.method=(a.method||"GET").toUpperCase(),a.headers=a.headers||{};var se=new r(a);return v&&se.on("response",v),se},h.get=function(v,w){var A=h.request(v,w);return A.end(),A},h.ClientRequest=r,h.IncomingMessage=f.IncomingMessage,h.Agent=function(){},h.Agent.defaultMaxSockets=4,h.globalAgent=new h.Agent,h.STATUS_CODES=n,h.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]})(Ne);var et={exports:{}};(function(o){var r=Ne,f=De,u=o.exports;for(var n in r)r.hasOwnProperty(n)&&(u[n]=r[n]);u.request=function(h,a){return h=b(h),r.request.call(this,h,a)},u.get=function(h,a){return h=b(h),r.get.call(this,h,a)};function b(h){if(typeof h=="string"&&(h=f.parse(h)),h.protocol||(h.protocol="https:"),h.protocol!=="https:")throw new Error('Protocol "'+h.protocol+'" not supported. Expected "https:"');return h}})(et);var vt=et.exports;exports.httpsBrowserifyExports=vt;exports.streamHttp=Ne;exports.urlExports=De;
|
|
@@ -202778,7 +202778,7 @@ class SolContracts extends ContractsAbstract {
|
|
|
202778
202778
|
throw new Error(`Wormhole circle relayer contract for domain ${Re} not found`);
|
|
202779
202779
|
}
|
|
202780
202780
|
}
|
|
202781
|
-
const SOLANA_SEQ_LOG = "Program log: Sequence: ", SOLANA_CHAIN_NAME = MAINNET_CONFIG$1.chains.solana.key, SOLANA_MAINNET_EMMITER_ID = "ec7372995d5cc8732397fb0ad35c0121e0eaa90d26f828a534cab54391b3a4f5", SOLANA_TESTNET_EMITTER_ID = "3b26409f8aaded3f5ddca184695aa6a0fa829b0c85caf84856324896d214ca98";
|
|
202781
|
+
const SOLANA_SEQ_LOG = "Program log: Sequence: ", SOLANA_CHAIN_NAME = MAINNET_CONFIG$1.chains.solana.key, SOLANA_FEE_PERCENTILE = 0.75, SOLANA_MAINNET_EMMITER_ID = "ec7372995d5cc8732397fb0ad35c0121e0eaa90d26f828a534cab54391b3a4f5", SOLANA_TESTNET_EMITTER_ID = "3b26409f8aaded3f5ddca184695aa6a0fa829b0c85caf84856324896d214ca98";
|
|
202782
202782
|
class SolanaContext extends RelayerAbstract {
|
|
202783
202783
|
constructor(Re, Fe) {
|
|
202784
202784
|
super(), this.type = Context.SOLANA, this.context = Re;
|
|
@@ -202887,7 +202887,12 @@ class SolanaContext extends RelayerAbstract {
|
|
|
202887
202887
|
throw new Error("no connection");
|
|
202888
202888
|
if (await this.getAssociatedTokenAccount(Re, Fe))
|
|
202889
202889
|
return;
|
|
202890
|
-
const qe = await this.mustGetForeignAsset(Re, SOLANA_CHAIN_NAME), We = await this.getAssociatedTokenAddress(Re, Fe), Ke = new PublicKey$4(Fe), Xe = new PublicKey$4(qe), Ze = new PublicKey$4(We), it = createAssociatedTokenAccountInstruction(Ke, Ze, Ke, Xe), Cn = new Transaction()
|
|
202890
|
+
const qe = await this.mustGetForeignAsset(Re, SOLANA_CHAIN_NAME), We = await this.getAssociatedTokenAddress(Re, Fe), Ke = new PublicKey$4(Fe), Xe = new PublicKey$4(qe), Ze = new PublicKey$4(We), it = createAssociatedTokenAccountInstruction(Ke, Ze, Ke, Xe), Cn = new Transaction();
|
|
202891
|
+
Cn.add(...await this.determineComputeBudget([
|
|
202892
|
+
Xe,
|
|
202893
|
+
Ze
|
|
202894
|
+
])), Cn.add(it);
|
|
202895
|
+
const { blockhash: dt } = await this.connection.getLatestBlockhash(Qe);
|
|
202891
202896
|
return Cn.recentBlockhash = dt, Cn.feePayer = Ke, Cn;
|
|
202892
202897
|
}
|
|
202893
202898
|
/**
|
|
@@ -202928,7 +202933,7 @@ class SolanaContext extends RelayerAbstract {
|
|
|
202928
202933
|
//Remaining funds destination
|
|
202929
202934
|
it
|
|
202930
202935
|
), { blockhash: tr } = await this.connection.getLatestBlockhash(Ke), Wn = new Transaction();
|
|
202931
|
-
return Wn.recentBlockhash = tr, Wn.feePayer = it, Wn.add(dt, sn, yt, Dt, $n, Fn), Wn.partialSign(yn, Cn), Wn;
|
|
202936
|
+
return Wn.add(...await this.determineComputeBudget([NATIVE_MINT])), Wn.recentBlockhash = tr, Wn.feePayer = it, Wn.add(dt, sn, yt, Dt, $n, Fn), Wn.partialSign(yn, Cn), Wn;
|
|
202932
202937
|
}
|
|
202933
202938
|
/**
|
|
202934
202939
|
* Prepare the transfer instructions for a token bridge transfer from Solana
|
|
@@ -202956,7 +202961,12 @@ class SolanaContext extends RelayerAbstract {
|
|
|
202956
202961
|
throw new Error("contracts not found");
|
|
202957
202962
|
const sn = this.context.toChainId(Qe);
|
|
202958
202963
|
Xe === void 0 && (Xe = Re);
|
|
202959
|
-
const yt = createNonce().readUInt32LE(0), Dt = createApproveAuthoritySignerInstruction(dt.token_bridge, qe, new PublicKey$4(Xe), Fe), yn = Keypair.generate(), $n = We === void 0 || We === CHAIN_ID_SOLANA$1 ? it ? createTransferNativeWithPayloadInstruction(this.connection, dt.token_bridge, dt.core, Re, yn.publicKey, qe, Ke, yt, Fe, Je, sn, it) : createTransferNativeInstruction(this.connection, dt.token_bridge, dt.core, Re, yn.publicKey, qe, Ke, yt, Fe, Ze || BigInt(0), Je, sn) : it ? createTransferWrappedWithPayloadInstruction(this.connection, dt.token_bridge, dt.core, Re, yn.publicKey, qe, Xe, We, Ke, yt, Fe, Je, sn, it) : createTransferWrappedInstruction(this.connection, dt.token_bridge, dt.core, Re, yn.publicKey, qe, Xe, We, Ke, yt, Fe, Ze || BigInt(0), Je, sn), Fn = new Transaction()
|
|
202964
|
+
const yt = createNonce().readUInt32LE(0), Dt = createApproveAuthoritySignerInstruction(dt.token_bridge, qe, new PublicKey$4(Xe), Fe), yn = Keypair.generate(), $n = We === void 0 || We === CHAIN_ID_SOLANA$1 ? it ? createTransferNativeWithPayloadInstruction(this.connection, dt.token_bridge, dt.core, Re, yn.publicKey, qe, Ke, yt, Fe, Je, sn, it) : createTransferNativeInstruction(this.connection, dt.token_bridge, dt.core, Re, yn.publicKey, qe, Ke, yt, Fe, Ze || BigInt(0), Je, sn) : it ? createTransferWrappedWithPayloadInstruction(this.connection, dt.token_bridge, dt.core, Re, yn.publicKey, qe, Xe, We, Ke, yt, Fe, Je, sn, it) : createTransferWrappedInstruction(this.connection, dt.token_bridge, dt.core, Re, yn.publicKey, qe, Xe, We, Ke, yt, Fe, Ze || BigInt(0), Je, sn), Fn = new Transaction();
|
|
202965
|
+
Fn.add(...await this.determineComputeBudget([
|
|
202966
|
+
new PublicKey$4(qe),
|
|
202967
|
+
new PublicKey$4(Ke)
|
|
202968
|
+
])), Fn.add(Dt, $n);
|
|
202969
|
+
const { blockhash: tr } = await this.connection.getLatestBlockhash(Cn);
|
|
202960
202970
|
return Fn.recentBlockhash = tr, Fn.feePayer = new PublicKey$4(Re), Fn.partialSign(yn), Fn;
|
|
202961
202971
|
}
|
|
202962
202972
|
async send(Re, Fe, Qe, Je, qe, We, Ke, Xe) {
|
|
@@ -203099,7 +203109,9 @@ class SolanaContext extends RelayerAbstract {
|
|
|
203099
203109
|
const Xe = parseTokenTransferVaa(Fe), { to: Ze } = this.parseRelayerPayload(Xe.tokenTransferPayload), it = new PublicKey$4(utils$P.arrayify(Ze));
|
|
203100
203110
|
if (!it.equals(new PublicKey$4(Je)))
|
|
203101
203111
|
throw new Error("recipient address does not match payer address");
|
|
203102
|
-
const Cn = Xe.tokenChain === MAINNET_CHAINS$1.solana, dt = Cn ? new PublicKey$4(Xe.tokenAddress) : deriveWrappedMintKey(We, Xe.tokenChain, Xe.tokenAddress), sn = new Transaction()
|
|
203112
|
+
const Cn = Xe.tokenChain === MAINNET_CHAINS$1.solana, dt = Cn ? new PublicKey$4(Xe.tokenAddress) : deriveWrappedMintKey(We, Xe.tokenChain, Xe.tokenAddress), sn = new Transaction();
|
|
203113
|
+
sn.add(...await this.determineComputeBudget([dt]));
|
|
203114
|
+
const yt = getAssociatedTokenAddressSync(dt, it);
|
|
203103
203115
|
await this.connection.getAccountInfo(yt) || sn.add(createAssociatedTokenAccountInstruction(it, yt, it, dt));
|
|
203104
203116
|
let yn;
|
|
203105
203117
|
Cn ? yn = await createCompleteNativeTransferWithRelayInstruction(this.connection, Ke, it, We, qe, Fe, it) : yn = await createCompleteWrappedTransferWithRelayInstruction(this.connection, Ke, it, We, qe, Fe, it), sn.add(yn);
|
|
@@ -203132,11 +203144,12 @@ class SolanaContext extends RelayerAbstract {
|
|
|
203132
203144
|
if (!Ze || !it || !Cn)
|
|
203133
203145
|
throw new Error("contracts not found");
|
|
203134
203146
|
const dt = this.context.getContext(We), sn = utils$P.arrayify(dt.formatAddress(Ke)), yt = this.context.toChainId(We), Dt = createNonce().readUint32LE(), yn = new Transaction();
|
|
203135
|
-
let Qn;
|
|
203136
203147
|
if (Re === NATIVE || Re.chain === SOLANA_CHAIN_NAME) {
|
|
203137
|
-
const
|
|
203138
|
-
|
|
203148
|
+
const $n = Re === NATIVE ? NATIVE_MINT : Re.address, Fn = Re === NATIVE;
|
|
203149
|
+
let tr = [NATIVE_MINT];
|
|
203150
|
+
if (Fn) {
|
|
203139
203151
|
const Wn = getAssociatedTokenAddressSync(NATIVE_MINT, new PublicKey$4(qe));
|
|
203152
|
+
tr.push(Wn);
|
|
203140
203153
|
try {
|
|
203141
203154
|
await getAccount(this.connection, Wn);
|
|
203142
203155
|
} catch (Kn) {
|
|
@@ -203147,14 +203160,13 @@ class SolanaContext extends RelayerAbstract {
|
|
|
203147
203160
|
throw Kn;
|
|
203148
203161
|
}
|
|
203149
203162
|
}
|
|
203150
|
-
|
|
203163
|
+
yn.add(...await this.determineComputeBudget(tr)), yn.add(await createTransferNativeTokensWithRelayInstruction(this.connection, Cn, qe, it, Ze, $n, BigInt(Fe), BigInt(Qe), sn, yt, Dt, Fn));
|
|
203151
203164
|
} else {
|
|
203152
|
-
const
|
|
203153
|
-
|
|
203165
|
+
const $n = await this.mustGetForeignAsset(Re, Je);
|
|
203166
|
+
yn.add(...await this.determineComputeBudget([new PublicKey$4($n)])), yn.add(await createTransferWrappedTokensWithRelayInstruction(this.connection, Cn, qe, it, Ze, $n, BigInt(Fe), BigInt(Qe), sn, yt, Dt));
|
|
203154
203167
|
}
|
|
203155
|
-
|
|
203156
|
-
|
|
203157
|
-
return yn.recentBlockhash = $n, yn.feePayer = new PublicKey$4(qe), yn;
|
|
203168
|
+
const { blockhash: Qn } = await this.connection.getLatestBlockhash("finalized");
|
|
203169
|
+
return yn.recentBlockhash = Qn, yn.feePayer = new PublicKey$4(qe), yn;
|
|
203158
203170
|
}
|
|
203159
203171
|
async calculateNativeTokenAmt(Re, Fe, Qe, Je) {
|
|
203160
203172
|
const qe = this.contracts.mustGetTokenBridgeRelayer(Re), We = await this.mustGetForeignAsset(Fe, Re), Ke = await this.fetchTokenDecimals(We, Re), Xe = await qe.calculateNativeSwapAmountOut(new PublicKey$4(We), BigNumber$2.from(Qe).toBigInt(), Ke);
|
|
@@ -203177,6 +203189,29 @@ class SolanaContext extends RelayerAbstract {
|
|
|
203177
203189
|
chain: "solana"
|
|
203178
203190
|
};
|
|
203179
203191
|
}
|
|
203192
|
+
async determineComputeBudget(Re = []) {
|
|
203193
|
+
var Qe;
|
|
203194
|
+
let Fe = 1e5;
|
|
203195
|
+
try {
|
|
203196
|
+
const Je = await ((Qe = this.connection) == null ? void 0 : Qe.getRecentPrioritizationFees({
|
|
203197
|
+
lockedWritableAccounts: Re
|
|
203198
|
+
}));
|
|
203199
|
+
if (Je) {
|
|
203200
|
+
const qe = Je.map((We) => We.prioritizationFee).sort((We, Ke) => We - Ke);
|
|
203201
|
+
Fe = qe[Math.floor(qe.length * SOLANA_FEE_PERCENTILE)];
|
|
203202
|
+
}
|
|
203203
|
+
} catch (Je) {
|
|
203204
|
+
console.error("Error fetching Solana recent fees", Je);
|
|
203205
|
+
}
|
|
203206
|
+
return console.info(`Setting Solana compute unit price to ${Fe} microLamports`), [
|
|
203207
|
+
ComputeBudgetProgram.setComputeUnitLimit({
|
|
203208
|
+
units: 25e4
|
|
203209
|
+
}),
|
|
203210
|
+
ComputeBudgetProgram.setComputeUnitPrice({
|
|
203211
|
+
microLamports: Fe
|
|
203212
|
+
})
|
|
203213
|
+
];
|
|
203214
|
+
}
|
|
203180
203215
|
}
|
|
203181
203216
|
class SuiRelayer {
|
|
203182
203217
|
constructor(Re, Fe, Qe) {
|
|
@@ -288026,7 +288061,7 @@ const walletConnection = {
|
|
|
288026
288061
|
if (Fe.getNetworkInfo().chainId !== e) {
|
|
288027
288062
|
if (Qe.context === Context.ETH)
|
|
288028
288063
|
try {
|
|
288029
|
-
const { switchChain: qe } = await import("./evm-
|
|
288064
|
+
const { switchChain: qe } = await import("./evm-q7tplTE_.mjs").then((We) => We.f);
|
|
288030
288065
|
await qe(Fe, e);
|
|
288031
288066
|
} catch (qe) {
|
|
288032
288067
|
if (qe instanceof NotSupported)
|
|
@@ -288034,7 +288069,7 @@ const walletConnection = {
|
|
|
288034
288069
|
throw qe;
|
|
288035
288070
|
}
|
|
288036
288071
|
if (Qe.context === Context.COSMOS) {
|
|
288037
|
-
const { switchChain: qe } = await import("./cosmos-
|
|
288072
|
+
const { switchChain: qe } = await import("./cosmos-qCZ2N-2F.mjs");
|
|
288038
288073
|
await qe(Fe, e);
|
|
288039
288074
|
}
|
|
288040
288075
|
return Fe.getAddress();
|
|
@@ -288043,7 +288078,7 @@ const walletConnection = {
|
|
|
288043
288078
|
const Re = walletConnection[e];
|
|
288044
288079
|
Re && await Re.disconnect();
|
|
288045
288080
|
}, watchAsset = async (e, Re) => {
|
|
288046
|
-
const Fe = walletConnection[Re], { watchAsset: Qe } = await import("./evm-
|
|
288081
|
+
const Fe = walletConnection[Re], { watchAsset: Qe } = await import("./evm-q7tplTE_.mjs").then((Je) => Je.f);
|
|
288047
288082
|
await Qe(e, Fe);
|
|
288048
288083
|
}, signAndSendTransaction = async (e, Re, Fe) => {
|
|
288049
288084
|
const Qe = config$1.chains[e], Je = walletConnection[Fe];
|
|
@@ -288053,23 +288088,23 @@ const walletConnection = {
|
|
|
288053
288088
|
case Context.ETH:
|
|
288054
288089
|
return Re.transactionHash;
|
|
288055
288090
|
case Context.SOLANA: {
|
|
288056
|
-
const { signAndSendTransaction: qe } = await import("./solana-
|
|
288091
|
+
const { signAndSendTransaction: qe } = await import("./solana-FtJTzny-.mjs");
|
|
288057
288092
|
return (await qe(Re, Je)).id;
|
|
288058
288093
|
}
|
|
288059
288094
|
case Context.SUI: {
|
|
288060
|
-
const { signAndSendTransaction: qe } = await import("./sui-
|
|
288095
|
+
const { signAndSendTransaction: qe } = await import("./sui-EPTYtByv.mjs");
|
|
288061
288096
|
return (await qe(Re, Je)).id;
|
|
288062
288097
|
}
|
|
288063
288098
|
case Context.APTOS: {
|
|
288064
|
-
const { signAndSendTransaction: qe } = await import("./aptos-
|
|
288099
|
+
const { signAndSendTransaction: qe } = await import("./aptos-QdwVDDzw.mjs");
|
|
288065
288100
|
return (await qe(Re, Je)).id;
|
|
288066
288101
|
}
|
|
288067
288102
|
case Context.SEI: {
|
|
288068
|
-
const { signAndSendTransaction: qe } = await import("./sei-
|
|
288103
|
+
const { signAndSendTransaction: qe } = await import("./sei-ftKJobWd.mjs");
|
|
288069
288104
|
return (await qe(Re, Je)).id;
|
|
288070
288105
|
}
|
|
288071
288106
|
case Context.COSMOS: {
|
|
288072
|
-
const { signAndSendTransaction: qe } = await import("./cosmos-
|
|
288107
|
+
const { signAndSendTransaction: qe } = await import("./cosmos-qCZ2N-2F.mjs");
|
|
288073
288108
|
return (await qe(Re, Je)).id;
|
|
288074
288109
|
}
|
|
288075
288110
|
default:
|
|
@@ -288102,30 +288137,30 @@ const walletConnection = {
|
|
|
288102
288137
|
if (e === void 0)
|
|
288103
288138
|
return [];
|
|
288104
288139
|
if (e.context === Context.ETH) {
|
|
288105
|
-
const { wallets: Re } = await import("./evm-
|
|
288140
|
+
const { wallets: Re } = await import("./evm-q7tplTE_.mjs").then((Fe) => Fe.f);
|
|
288106
288141
|
return Object.values(mapWallets(Re, Context.ETH));
|
|
288107
288142
|
} else if (e.context === Context.SOLANA) {
|
|
288108
|
-
const { fetchOptions: Re } = await import("./solana-
|
|
288143
|
+
const { fetchOptions: Re } = await import("./solana-FtJTzny-.mjs"), Fe = Re();
|
|
288109
288144
|
return Object.values(mapWallets(Fe, Context.SOLANA));
|
|
288110
288145
|
} else if (e.context === Context.SUI) {
|
|
288111
|
-
const Fe = await (await import("./sui-
|
|
288146
|
+
const Fe = await (await import("./sui-EPTYtByv.mjs")).fetchOptions();
|
|
288112
288147
|
return Object.values(mapWallets(Fe, Context.SUI));
|
|
288113
288148
|
} else if (e.context === Context.APTOS) {
|
|
288114
|
-
const Fe = (await import("./aptos-
|
|
288149
|
+
const Fe = (await import("./aptos-QdwVDDzw.mjs")).fetchOptions();
|
|
288115
288150
|
return Object.values(mapWallets(Fe, Context.APTOS));
|
|
288116
288151
|
} else if (e.context === Context.SEI) {
|
|
288117
|
-
const Fe = await (await import("./sei-
|
|
288152
|
+
const Fe = await (await import("./sei-ftKJobWd.mjs")).fetchOptions();
|
|
288118
288153
|
return Object.values(mapWallets(Fe, Context.SEI));
|
|
288119
288154
|
} else if (e.context === Context.COSMOS)
|
|
288120
288155
|
if (e.id !== CHAIN_ID_EVMOS$1) {
|
|
288121
288156
|
const {
|
|
288122
288157
|
wallets: { cosmos: Re }
|
|
288123
|
-
} = await import("./cosmos-
|
|
288158
|
+
} = await import("./cosmos-qCZ2N-2F.mjs");
|
|
288124
288159
|
return Object.values(mapWallets(Re, Context.COSMOS));
|
|
288125
288160
|
} else {
|
|
288126
288161
|
const {
|
|
288127
288162
|
wallets: { cosmosEvm: Re }
|
|
288128
|
-
} = await import("./cosmos-
|
|
288163
|
+
} = await import("./cosmos-qCZ2N-2F.mjs");
|
|
288129
288164
|
return Object.values(
|
|
288130
288165
|
mapWallets(Re, Context.COSMOS, ["OKX Wallet"])
|
|
288131
288166
|
);
|
|
@@ -291204,7 +291239,7 @@ const fetchIsVAAEnqueued = async (e) => {
|
|
|
291204
291239
|
var Xe;
|
|
291205
291240
|
const Ke = We.data;
|
|
291206
291241
|
if (!(!Ke || !((Xe = Ke.destinationTx) != null && Xe.txHash)))
|
|
291207
|
-
return
|
|
291242
|
+
return Ke.destinationTx.txHash;
|
|
291208
291243
|
}).catch(function(We) {
|
|
291209
291244
|
throw We;
|
|
291210
291245
|
});
|
|
@@ -291958,12 +291993,12 @@ function getForeignUSDCAddress(e) {
|
|
|
291958
291993
|
throw new Error("No foreign native USDC address");
|
|
291959
291994
|
return (Fe = Re.tokenId) == null ? void 0 : Fe.address;
|
|
291960
291995
|
}
|
|
291961
|
-
const CIRCLE_ATTESTATION = config$1.isMainnet ? "https://iris-api.circle.com/attestations/" : "https://iris-api-sandbox.circle.com/attestations/";
|
|
291962
291996
|
async function tryGetCircleAttestation(e) {
|
|
291963
|
-
|
|
291964
|
-
}).
|
|
291965
|
-
|
|
291966
|
-
|
|
291997
|
+
const Re = config$1.isMainnet ? "https://iris-api.circle.com/attestations/" : "https://iris-api-sandbox.circle.com/attestations/";
|
|
291998
|
+
return await axios$1.get(`${Re}${e}`).catch((Fe) => {
|
|
291999
|
+
}).then(async (Fe) => {
|
|
292000
|
+
if (Fe && Fe.status === 200 && Fe.data.status === "complete")
|
|
292001
|
+
return Fe.data.attestation;
|
|
291967
292002
|
});
|
|
291968
292003
|
}
|
|
291969
292004
|
const CCTP_LOG_TokenMessenger_DepositForBurn = "0x2fa9ca894982930190727e75500a97d8dc500233a5065e0f3126c48fbe0343c0", CCTP_LOG_MessageSent = "0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036";
|
|
@@ -295788,7 +295823,42 @@ async function getQuote(e, Re, Fe, Qe, Je) {
|
|
|
295788
295823
|
0
|
|
295789
295824
|
]))[0] };
|
|
295790
295825
|
}
|
|
295791
|
-
const CREATE_ORDER_API_URL = "https://thermae.fly.dev/api/order/create", FEE_TIER = 100, SLIPPAGE_BPS = 15, BPS_PER_HUNDRED_PERCENT = 1e4, RELAYER_FEE_API_URL = "https://gfx.relayers.xlabs.xyz/api/v1/swap/quote", OKU_TRADE_BASE_URL = "https://oku.trade/app", SWAP_ERROR = "This transaction will not succeed due to price movement."
|
|
295826
|
+
const CREATE_ORDER_API_URL = "https://thermae.fly.dev/api/order/create", FEE_TIER = 100, SLIPPAGE_BPS = 15, BPS_PER_HUNDRED_PERCENT = 1e4, RELAYER_FEE_API_URL = "https://gfx.relayers.xlabs.xyz/api/v1/swap/quote", OKU_TRADE_BASE_URL = "https://oku.trade/app", SWAP_ERROR = "This transaction will not succeed due to price movement.", getGasFallback = (e, Re, Fe) => {
|
|
295827
|
+
var Ke;
|
|
295828
|
+
const Qe = config$1.wh.toChainName(e), Je = (Ke = config$1.gasEstimates[Qe]) == null ? void 0 : Ke[Re];
|
|
295829
|
+
if (!Je || !Je[Fe])
|
|
295830
|
+
return BigNumber$2.from(0);
|
|
295831
|
+
const qe = BigNumber$2.from(Je[Fe]);
|
|
295832
|
+
return config$1.chains[Qe].context === Context.ETH ? parseUnits(qe.toString(), "gwei") : qe;
|
|
295833
|
+
}, estimateSendGas = async (e, Re, Fe, Qe, Je, qe, We, Ke) => {
|
|
295834
|
+
let Xe;
|
|
295835
|
+
try {
|
|
295836
|
+
Xe = await RouteOperator.getRoute(e).estimateSendGas(
|
|
295837
|
+
Re,
|
|
295838
|
+
Fe,
|
|
295839
|
+
Qe,
|
|
295840
|
+
Je,
|
|
295841
|
+
qe,
|
|
295842
|
+
We,
|
|
295843
|
+
Ke
|
|
295844
|
+
);
|
|
295845
|
+
} catch {
|
|
295846
|
+
Re === NATIVE ? Xe = getGasFallback(Qe, e, "sendNative") : Xe = getGasFallback(Qe, e, "sendToken");
|
|
295847
|
+
}
|
|
295848
|
+
if (!Xe)
|
|
295849
|
+
throw new Error("could not estimate send gas");
|
|
295850
|
+
return formatGasFee(Qe, Xe);
|
|
295851
|
+
}, estimateClaimGas = async (e, Re, Fe) => {
|
|
295852
|
+
let Qe;
|
|
295853
|
+
try {
|
|
295854
|
+
Qe = await RouteOperator.getRoute(e).estimateClaimGas(Re, Fe);
|
|
295855
|
+
} catch {
|
|
295856
|
+
Qe = getGasFallback(Re, e, "claim");
|
|
295857
|
+
}
|
|
295858
|
+
if (!Qe)
|
|
295859
|
+
throw new Error("could not estimate send gas");
|
|
295860
|
+
return formatGasFee(Re, Qe);
|
|
295861
|
+
}, estimateAverageGasFee = async (e, Re) => (await config$1.wh.mustGetProvider(e).getGasPrice()).mul(Re).mul(130).div(100);
|
|
295792
295862
|
class PorticoBridge extends BaseRoute {
|
|
295793
295863
|
constructor(Fe, Qe) {
|
|
295794
295864
|
super();
|
|
@@ -295925,10 +295995,10 @@ class PorticoBridge extends BaseRoute {
|
|
|
295925
295995
|
throw new Error("not implemented");
|
|
295926
295996
|
}
|
|
295927
295997
|
async estimateSendGas(Fe, Qe, Je, qe, We, Ke, Xe) {
|
|
295928
|
-
|
|
295998
|
+
return await estimateAverageGasFee(Je, 15e4);
|
|
295929
295999
|
}
|
|
295930
296000
|
async estimateClaimGas(Fe, Qe) {
|
|
295931
|
-
|
|
296001
|
+
return BigNumber$2.from(0);
|
|
295932
296002
|
}
|
|
295933
296003
|
getMinSendAmount(Fe) {
|
|
295934
296004
|
return 0;
|
|
@@ -314893,42 +314963,7 @@ function AlertBanner(e) {
|
|
|
314893
314963
|
}
|
|
314894
314964
|
) });
|
|
314895
314965
|
}
|
|
314896
|
-
const
|
|
314897
|
-
var Ke;
|
|
314898
|
-
const Qe = config$1.wh.toChainName(e), Je = (Ke = config$1.gasEstimates[Qe]) == null ? void 0 : Ke[Re];
|
|
314899
|
-
if (!Je || !Je[Fe])
|
|
314900
|
-
return BigNumber$2.from(0);
|
|
314901
|
-
const qe = BigNumber$2.from(Je[Fe]);
|
|
314902
|
-
return config$1.chains[Qe].context === Context.ETH ? parseUnits(qe.toString(), "gwei") : qe;
|
|
314903
|
-
}, estimateSendGas = async (e, Re, Fe, Qe, Je, qe, We, Ke) => {
|
|
314904
|
-
let Xe;
|
|
314905
|
-
try {
|
|
314906
|
-
Xe = await RouteOperator.getRoute(e).estimateSendGas(
|
|
314907
|
-
Re,
|
|
314908
|
-
Fe,
|
|
314909
|
-
Qe,
|
|
314910
|
-
Je,
|
|
314911
|
-
qe,
|
|
314912
|
-
We,
|
|
314913
|
-
Ke
|
|
314914
|
-
);
|
|
314915
|
-
} catch {
|
|
314916
|
-
Re === NATIVE ? Xe = getGasFallback(Qe, e, "sendNative") : Xe = getGasFallback(Qe, e, "sendToken");
|
|
314917
|
-
}
|
|
314918
|
-
if (!Xe)
|
|
314919
|
-
throw new Error("could not estimate send gas");
|
|
314920
|
-
return formatGasFee(Qe, Xe);
|
|
314921
|
-
}, estimateClaimGas = async (e, Re, Fe) => {
|
|
314922
|
-
let Qe;
|
|
314923
|
-
try {
|
|
314924
|
-
Qe = await RouteOperator.getRoute(e).estimateClaimGas(Re, Fe);
|
|
314925
|
-
} catch {
|
|
314926
|
-
Qe = getGasFallback(Re, e, "claim");
|
|
314927
|
-
}
|
|
314928
|
-
if (!Qe)
|
|
314929
|
-
throw new Error("could not estimate send gas");
|
|
314930
|
-
return formatGasFee(Re, Qe);
|
|
314931
|
-
}, useStyles$E = makeStyles()((e) => ({
|
|
314966
|
+
const useStyles$E = makeStyles()((e) => ({
|
|
314932
314967
|
body: {
|
|
314933
314968
|
width: "100%"
|
|
314934
314969
|
},
|
|
@@ -317985,24 +318020,24 @@ const FETCH_SWAP_INFO_INTERVAL = 6e4, usePorticoSwapInfo = () => {
|
|
|
317985
318020
|
We,
|
|
317986
318021
|
e
|
|
317987
318022
|
]);
|
|
317988
|
-
}, PRICES_FETCH_INTERVAL = 6e4 * 5, COINGECKO_URL = "https://api.coingecko.com/", COINGECKO_URL_PRO = "https://pro-api.coingecko.com/",
|
|
318023
|
+
}, PRICES_FETCH_INTERVAL = 6e4 * 5, COINGECKO_URL = "https://api.coingecko.com/", COINGECKO_URL_PRO = "https://pro-api.coingecko.com/", useFetchTokenPrices = () => {
|
|
317989
318024
|
const e = useDispatch();
|
|
317990
318025
|
useEffect(() => {
|
|
317991
318026
|
let Re = !1;
|
|
317992
|
-
const Fe = new AbortController(), Qe = Fe.signal, Je = new Headers({
|
|
318027
|
+
const Fe = new AbortController(), Qe = Fe.signal, Je = Object.values(config$1.tokens).filter((Ke) => !!Ke.coinGeckoId).map(({ coinGeckoId: Ke }) => Ke).join(","), qe = new Headers({
|
|
317993
318028
|
"Content-Type": "application/json",
|
|
317994
318029
|
...config$1.coinGeckoApiKey ? { "x-cg-pro-api-key": config$1.coinGeckoApiKey } : {}
|
|
317995
318030
|
});
|
|
317996
318031
|
return (async () => {
|
|
317997
318032
|
for (; !Re; ) {
|
|
317998
318033
|
try {
|
|
317999
|
-
const
|
|
318000
|
-
`${config$1.coinGeckoApiKey ? COINGECKO_URL_PRO : COINGECKO_URL}api/v3/simple/price?ids=${
|
|
318001
|
-
{ signal: Qe, headers:
|
|
318034
|
+
const Xe = await (await fetch(
|
|
318035
|
+
`${config$1.coinGeckoApiKey ? COINGECKO_URL_PRO : COINGECKO_URL}api/v3/simple/price?ids=${Je}&vs_currencies=usd${config$1.coinGeckoApiKey ? `?x_cg_pro_api_key=${config$1.coinGeckoApiKey}` : ""}`,
|
|
318036
|
+
{ signal: Qe, headers: qe }
|
|
318002
318037
|
)).json();
|
|
318003
|
-
Re || e(setPrices(
|
|
318004
|
-
} catch (
|
|
318005
|
-
Re || e(setPricesError(`Error fetching token prices: ${
|
|
318038
|
+
Re || e(setPrices(Xe));
|
|
318039
|
+
} catch (Ke) {
|
|
318040
|
+
Re || e(setPricesError(`Error fetching token prices: ${Ke}`));
|
|
318006
318041
|
}
|
|
318007
318042
|
await sleep(PRICES_FETCH_INTERVAL);
|
|
318008
318043
|
}
|
|
@@ -319586,7 +319621,6 @@ function Terms() {
|
|
|
319586
319621
|
config$1.showHamburgerMenu ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(FooterNavBar, {})
|
|
319587
319622
|
] });
|
|
319588
319623
|
}
|
|
319589
|
-
const VALID_CHAINS = config$1.chainsArr.filter((e) => e.key !== "wormchain").map((e) => e.key);
|
|
319590
319624
|
function useExternalSearch() {
|
|
319591
319625
|
const [e, Re] = useState(!1), [Fe, Qe] = useState(), [Je, qe] = useState();
|
|
319592
319626
|
return useEffect(() => {
|
|
@@ -319596,7 +319630,7 @@ function useExternalSearch() {
|
|
|
319596
319630
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
319597
319631
|
config$1.searchTx.chainName
|
|
319598
319632
|
);
|
|
319599
|
-
|
|
319633
|
+
config$1.chainsArr.filter((it) => it.key !== "wormchain").map((it) => it.key).includes(Xe) && (Re(!0), Qe(config$1.searchTx.txHash), qe(Xe));
|
|
319600
319634
|
}
|
|
319601
319635
|
}, []), {
|
|
319602
319636
|
hasExternalSearch: e,
|
|
@@ -319926,7 +319960,7 @@ const light = {
|
|
|
319926
319960
|
}
|
|
319927
319961
|
}, getDesignTokens = (e) => {
|
|
319928
319962
|
const Re = (e == null ? void 0 : e.mode) === "light" ? light : dark, Fe = Object.assign(Re, e);
|
|
319929
|
-
return createTheme(
|
|
319963
|
+
return createTheme({
|
|
319930
319964
|
components: {
|
|
319931
319965
|
MuiPaper: {
|
|
319932
319966
|
styleOverrides: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as _t, s as ce, T as N, o as ot, R as Do, a as C, t as U, p as q, y as gt } from "./index-
|
|
1
|
+
import { n as _t, s as ce, T as N, o as ot, R as Do, a as C, t as U, p as q, y as gt } from "./index-PAYEO8f8.mjs";
|
|
2
2
|
import { d as Uo } from "./dijkstra-_4avdlbo.mjs";
|
|
3
|
-
import { d as Wo } from "./index-
|
|
3
|
+
import { d as Wo } from "./index-49J1iHnW.mjs";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react-dom";
|
|
6
6
|
var jo = function(t) {
|