PageSourceSearch

https://rentygo.vercel.app/_next/static/chunks/6044.7586f39da00971e4.js

js rentygo.vercel.app collected 2026-10-03 07:37:08 UTC 8,833 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6044],{49637:function(t,e,i){i.d(e,{A:function(){return h},C:function(){return o},R:function(){return l},S:function(){return p},U:function(){return w},a:function(){return d},b:function(){return u}});var s=i(42009),n=i(6475),a=i(65007);class o extends a.Z{constructor(t){let{chains:e=n.gL9,options:i}=t;super(),(0,s._)(this,"id",void 0),(0,s._)(this,"name",void 0),(0,s._)(this,"chains",void 0),(0,s._)(this,"options",void 0),(0,s._)(this,"ready",void 0),this.chains=e,this.options=i}getBlockExplorerUrls(t){const e=t.explorers?.map((t=>t.url))??[];return e.length>0?e:void 0}isChainUnsupported(t){return!this.chains.some((e=>e.chainId===t))}updateChains(t){this.chains=t}}class r extends Error{constructor(t,e){const{cause:i,code:n,data:a}=e;if(!Number.isInteger(n))throw new Error('"code" must be an integer.');if(!t||"string"!==typeof t)throw new Error('"message" must be a nonempty string.');super(t),(0,s._)(this,"cause",void 0),(0,s._)(this,"code",void 0),(0,s._)(this,"data",void 0),this.cause=i,this.code=n,this.data=a}}class c extends r{constructor(t,e){const{cause:i,code:s,data:n}=e;if(!(Number.isInteger(s)&&s>=1e3&&s<=4999))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,{cause:i,code:s,data:n})}}
1class h extends Error{constructor(){super(...arguments),(0,s._)(this,"name","AddChainError"),(0,s._)(this,"message","Error adding chain")}}class d extends Error{constructor(t){let{chainId:e,connectorId:i}=t;super(`Chain "${e}" not configured for connector "${i}".`),(0,s._)(this,"name","ChainNotConfigured")}}class u extends Error{constructor(){super(...arguments),(0,s._)(this,"name","ConnectorNotFoundError"),(0,s._)(this,"message","Connector not found")}}class l extends r{constructor(t){super("Resource unavailable",{cause:t,code:-32002}),(0,s._)(this,"name","ResourceUnavailable")}}class p extends c{constructor(t){super("Error switching chain",{cause:t,code:4902}),(0,s._)(this,"name","SwitchChainError")}}class w extends c{constructor(t){super("User rejected request",{cause:t,code:4001}),(0,s._)(this,"name","UserRejectedRequestError")}}},76044:function(t,e,i){i.r(e),i.d(e,{WalletConnectConnector:function(){return E}});var s=i(43290),n=i(87039),a=i(42009),o=i(19485),r=i(241),c=i(16441),h=i(49637);i(65007);const d="wagmi.requestedChains",u="wallet_addEthereumChain",l="last-used-chain-id";var p=new WeakMap,w=new WeakMap,g=new WeakMap,m=new WeakSet,f=new WeakSet,v=new WeakSet,C=new WeakSet,_=new WeakSet,b=new WeakSet,y=new WeakSet,I=new WeakSet;class E extends h.C{constructor(t){super({...t,options:{isNewChainsStale:!0,...t.options}}),(0,s._)(this,I),(0,s._)(this,y),(0,s._)(this,b),(0,s._)(this,_),(0,s._)(this,C),(0,s._)(this,v),(0,s._)(this,f),(0,s._)(this,m),(0,a._)(this,"id","walletConnect"),(0,a._)(this,"name","WalletConnect"),(0,a._)(this,"ready",!0),(0,n._)(this,p,{writable:!0,value:void 0}),(0,n._)(this,w,{writable:!0,value:void 0}),(0,n._)(this,g,{writable:!0,value:void 0}),(0,a._)(this,"onAccountsChanged",(t=>{0===t.length?this.emit("disconnect"):this.emit("change",{account:o.getAddress(t[0])})})),(0,a._)(this,"onChainChanged",(t=>{const e=Number(t),i=this.isChainUnsupported(e);(0,n.b)(this,g).setItem(l,String(t)),this.emit("change",{chain:{id:e,unsupported:i}})})),(0,a._)(this,"onDisconnect",(()=>{(0,s.a)(this,_,U).call(this,[]),(0,n.b)(this,g).removeItem(l),this.emit("disconnect")})),(0,a._)(this,"onDisplayUri",(t=>{this.emit("message",{type:"display_uri",data:t})})),(0,a._)(this,"onConnect",(()=>{this.emit("connect",{provider:(0,n.b)(this,p)})})),(0,n.a)(this,g,t.options.storage),(0,s.a)(this,m,S).call(this)}async connect(){let{chainId:t,pairingTopic:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let i=t;if(!i){const t=await(0,n.b)(this,g).getItem(l),e=t?parseInt(t):void 0;i=e&&!this.isChainUnsupported(e)?e:this.chains[0]?.chainId}if(!i)throw new Error("No chains found on connector.");const a=await this.getProvider();this.setupListeners();const c=await(0,s.a)(this,v,k).call(this);if(a.session&&c&&await a.disconnect(),!a.session||c){const t=this.chains.filter((t=>t.chainId!==i)).map((t=>t.chainId));this.emit("message",{type:"connecting"}),await a.connect({pairingTopic:e,chains:[i],optionalChains:t.length>0?t:[i]}),(0,s.a)(this,_,U).call(this,this.chains.map((t=>{let{chainId:e}=t;return e})))}const h=await a.enable();if(0===h.length)throw new Error("No accounts found on provider.");const d=o.getAddress(h[0]),u=await this.getChainId();return{account:d,chain:{id:u,unsupported:this.isChainUnsupported(u)},provider:new r.Q(a)}}catch(i){if(/user rejected/i.test(i?.message))throw new h.U(i);throw i}}async disconnect(){const t=await this.getProvider();try{await t.disconnect()}catch(e){if(!/No matching key/i.test(e.message))throw e}finally{(0,s.a)(this,C,x).call(this),(0,s.a)(this,_,U).call(this,[])}}async getAccount(){const{accounts:t}=await this.getProvider();if(0===t.length)throw new Error("No accounts found on provider.");return o.getAddress(t[0])}async getChainId(){const{chainId:t}=await this.getProvider();return t}async getProvider(){let{chainId:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,n.b)(this,p)||await(0,s.a)(this,m,S).call(this),t&&await this.switchChain(t),!(0,n.b)(this,p))throw new Error("No provider found.");return(0,n.b)(this,p)}async getSigner(){let{chainId:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[e,i]=await Promise.all([this.getProvider({chainId:t}),this.getAccount()]);
1return new r.Q(e,t).getSigner(i)}async isAuthorized(){try{const[t,e]=await Promise.all([this.getAccount(),this.getProvider()]),i=await(0,s.a)(this,v,k).call(this);if(!t)return!1;if(i&&e.session){try{await e.disconnect()}catch{}return!1}return!0}catch{return!1}}async switchChain(t){const e=this.chains.find((e=>e.chainId===t));if(!e)throw new h.S(new Error("chain not found on connector."));try{const i=await this.getProvider(),n=(0,s.a)(this,y,P).call(this),a=(0,s.a)(this,I,W).call(this);if(!n.includes(t)&&a.includes(u)){await i.request({method:u,params:[{chainId:c.hexValue(e.chainId),blockExplorerUrls:[e.explorers?.length?e.explorers[0]:void 0],chainName:e.name,nativeCurrency:e.nativeCurrency,rpcUrls:[...e.rpc]}]});const n=await(0,s.a)(this,b,A).call(this);n.push(t),(0,s.a)(this,_,U).call(this,n)}return await i.request({method:"wallet_switchEthereumChain",params:[{chainId:c.hexValue(t)}]}),e}catch(i){if(/user rejected request/i.test("string"===typeof i?i:i?.message))throw new h.U(i);throw new h.S(i)}}async setupListeners(){(0,n.b)(this,p)&&((0,s.a)(this,C,x).call(this),(0,n.b)(this,p).on("accountsChanged",this.onAccountsChanged),(0,n.b)(this,p).on("chainChanged",this.onChainChanged),(0,n.b)(this,p).on("disconnect",this.onDisconnect),(0,n.b)(this,p).on("session_delete",this.onDisconnect),(0,n.b)(this,p).on("display_uri",this.onDisplayUri),(0,n.b)(this,p).on("connect",this.onConnect))}}async function S(){return(0,n.b)(this,w)||(0,n.a)(this,w,(0,s.a)(this,f,N).call(this)),(0,n.b)(this,w)}async function N(){const{default:t,OPTIONAL_EVENTS:e,OPTIONAL_METHODS:s}=await Promise.all([i.e(6423),i.e(2139),i.e(5883)]).then(i.bind(i,2139)),[a,...o]=this.chains.map((t=>{let{chainId:e}=t;return e}));a&&(0,n.a)(this,p,await t.init({showQrModal:!1!==this.options.qrcode,projectId:this.options.projectId,optionalMethods:s,optionalEvents:e,chains:[a],optionalChains:o,metadata:{name:this.options.dappMetadata.name,description:this.options.dappMetadata.description||"",url:this.options.dappMetadata.url,icons:[this.options.dappMetadata.logoUrl||""]},rpcMap:Object.fromEntries(this.chains.map((t=>[t.chainId,t.rpc[0]])))}))}async function k(){if((0,s.a)(this,I,W).call(this).includes(u))return!1;if(!this.options.isNewChainsStale)return!1;const t=await(0,s.a)(this,b,A).call(this),e=this.chains.map((t=>{let{chainId:e}=t;return e})),i=(0,s.a)(this,y,P).call(this);return!(i.length&&!i.some((t=>e.includes(t))))&&!e.every((e=>t.includes(e)))}function x(){(0,n.b)(this,p)&&((0,n.b)(this,p).removeListener("accountsChanged",this.onAccountsChanged),(0,n.b)(this,p).removeListener("chainChanged",this.onChainChanged),(0,n.b)(this,p).removeListener("disconnect",this.onDisconnect),(0,n.b)(this,p).removeListener("session_delete",this.onDisconnect),(0,n.b)(this,p).removeListener("display_uri",this.onDisplayUri),(0,n.b)(this,p).removeListener("connect",this.onConnect))}function U(t){(0,n.b)(this,g).setItem(d,JSON.stringify(t))}async function A(){const t=await(0,n.b)(this,g).getItem(d);return t?JSON.parse(t):[]}function P(){if(!(0,n.b)(this,p))return[];const t=(0,n.b)(this,p).session?.namespaces.eip155?.chains?.map((t=>parseInt(t.split(":")[1]||"")));return t??[]}function W(){if(!(0,n.b)(this,p))return[];const t=(0,n.b)(this,p).session?.namespaces.eip155?.methods;return t??[]}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.