@privy-io/react-auth 1.82.0 → 1.83.0

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.
@@ -1,118 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var B=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Rn=(e,t,n)=>(B(e,t,"read from private field"),n?n.call(e):t.get(e)),Dn= exports.b =(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Fn= exports.c =(e,t,n,r)=>(B(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Nn=(e,t,n)=>(B(e,t,"access private method"),n);var te="1.82.0";var ne="34357d3c125c2bcf2ce2bc3309d98715",Bn= exports.K ="https://auth.privy.io",$n= exports.L =2e4,Gn= exports.M =1400,Yn= exports.N =2500,zn= exports.O =4e3,qn= exports.P =te;var Vn="privy:token",Xn= exports.R ="privy-token",Zn= exports.S ="privy:refresh_token",Jn= exports.T ="privy-refresh-token",Qn= exports.U ="privy:id_token",eo= exports.V ="privy-id-token",to= exports.W ="privy-session",no= exports.X ="privy:session_transfer_token",At="privy:wallet",oo= exports.Y ="privy:caid",ro= exports.Z =e=>`privy:guest:${e}`,io= exports._ =e=>`privy:cross-app:${e}`,so= exports.$ ="privy:state_code",ao= exports.aa ="privy:code_verifier",lo= exports.ba ="privy:headless_oauth",co= exports.ca =e=>`${At}:${e}`,po= exports.da ="privy:connectors",uo= exports.ea ="privy:connections";var mo=12e4,ho= exports.ga =1,fo= exports.ha ="0x1",go= exports.ia =3e4,yo= exports.ja ="https://api.moonpay.com/v1",bo= exports.ka ="https://api.moonpay.com/v1",Eo= exports.la ="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",vo= exports.ma ="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI";var Co="deprecated";var oe={id:42161,name:"Arbitrum One",network:"arbitrum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://arbitrum-mainnet.rpc.privy.systems"]},alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]},default:{http:["https://arb1.arbitrum.io/rpc"]},public:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://arbiscan.io"},default:{name:"Arbiscan",url:"https://arbiscan.io"}}};var re={id:421614,name:"Arbitrum Sepolia",network:"arbitrum-sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://arbitrum-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]},public:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-explorer.arbitrum.io"}},testnet:!0};var ie={id:43114,name:"Avalanche",network:"avalanche",nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]},public:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://snowtrace.io"},default:{name:"SnowTrace",url:"https://snowtrace.io"}}};var se={id:43113,name:"Avalanche Fuji",network:"avalanche-fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]},public:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://testnet.snowtrace.io"},default:{name:"SnowTrace",url:"https://testnet.snowtrace.io"}},testnet:!0};var ae={id:8453,network:"base",name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://base-mainnet.rpc.privy.systems"]},blast:{http:["https://base-mainnet.blastapi.io"],webSocket:["wss://base-mainnet.blastapi.io"]},default:{http:["https://mainnet.base.org"]},public:{http:["https://mainnet.base.org"]}},blockExplorers:{etherscan:{name:"Basescan",url:"https://basescan.org"},default:{name:"Basescan",url:"https://basescan.org"}}};var le={id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://base-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia.base.org"]},public:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://base-sepolia.blockscout.com"}},testnet:!0};var ce={id:80085,network:"berachain-artio",name:"Berachain Artio",nativeCurrency:{name:"BERA",symbol:"BERA",decimals:18},rpcUrls:{default:{http:["https://berachain-artio.rpc.privy.systems"]},public:{http:["https://berachain-artio.rpc.privy.systems"]}},blockExplorers:{default:{name:"Beratrail",url:"https://artio.beratrail.io"}},testnet:!0};var pe={id:42220,name:"Celo Mainnet",network:"celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]},infura:{http:["https://celo-mainnet.infura.io/v3"]},public:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/mainnet"},etherscan:{name:"CeloScan",url:"https://celoscan.io"}},testnet:!1};var ue={id:44787,name:"Celo Alfajores Testnet",network:"celo-alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]},infura:{http:["https://celo-alfajores.infura.io/v3"]},public:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/alfajores"},etherscan:{name:"CeloScan",url:"https://alfajores.celoscan.io/"}},testnet:!0};var de={id:314,name:"Filecoin - Mainnet",network:"filecoin-mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]},public:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"},filscan:{name:"Filscan",url:"https://filscan.io"},filscout:{name:"Filscout",url:"https://filscout.io/en"},glif:{name:"Glif",url:"https://explorer.glif.io"}}};var me={id:314159,name:"Filecoin - Calibration testnet",network:"filecoin-calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]},public:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}}};var he={id:17069,name:"Garnet Holesky",network:"garnet-holesky",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.garnetchain.com"]},public:{http:["https://rpc.garnetchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.garnetchain.com"}}};var fe={id:17e3,name:"Holesky",network:"holesky",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky.publicnode.com"]},public:{http:["https://ethereum-holesky.publicnode.com"]}},blockExplorers:{etherscan:{name:"EtherScan",url:"https://holesky.etherscan.io"},default:{name:"EtherScan",url:"https://holesky.etherscan.io"}}};var ge={id:59144,network:"linea-mainnet",name:"Linea Mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]},public:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build"},etherscan:{name:"Etherscan",url:"https://lineascan.build"}},testnet:!1};var ye={id:59140,network:"linea-testnet",name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{infura:{http:["https://linea-goerli.infura.io/v3"],webSocket:["wss://linea-goerli.infura.io/ws/v3"]},default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]},public:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build"},etherscan:{name:"Etherscan",url:"https://goerli.lineascan.build"}},testnet:!0};var be={id:42,network:"lukso",name:"LUKSO",nativeCurrency:{name:"LUKSO",symbol:"LYX",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.lukso.network"],webSocket:["wss://ws-rpc.mainnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Mainnet Explorer",url:"https://explorer.execution.mainnet.lukso.network"}}};var L={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://mainnet.rpc.privy.systems"]},alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}}};var Ee={id:10,name:"OP Mainnet",network:"optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://optimism-mainnet.rpc.privy.systems"]},alchemy:{http:["https://opt-mainnet.g.alchemy.com/v2"],webSocket:["wss://opt-mainnet.g.alchemy.com/v2"]},infura:{http:["https://optimism-mainnet.infura.io/v3"],webSocket:["wss://optimism-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.optimism.io"]},public:{http:["https://mainnet.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://optimistic.etherscan.io"},default:{name:"Optimism Explorer",url:"https://explorer.optimism.io"}}};var ve={id:11155420,name:"Optimism Sepolia",network:"optimism-sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://optimism-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia.optimism.io"]},public:{http:["https://sepolia.optimism.io"]},infura:{http:["https://optimism-sepolia.infura.io/v3"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com"}},testnet:!0};var Ce={id:137,name:"Polygon Mainnet",network:"matic",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{privy:{http:["https://polygon-mainnet.rpc.privy.systems"]},alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}}};var we={id:80002,name:"Polygon Amoy",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{privy:{http:["https://polygon-amoy.rpc.privy.systems"]},infura:{http:["https://polygon-amoy.infura.io/v3"],webSocket:["wss://polygon-amoy.infura.io/ws/v3"]},default:{http:["https://rpc-amoy.polygon.technology"]}},blockExplorers:{default:{name:"OK LINK",url:"https://www.oklink.com/amoy"}},testnet:!0};var Ae={id:690,name:"Redstone",network:"redstone",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.redstonechain.com"]},public:{http:["https://rpc.redstonechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.redstone.xyz/"}}};var xe={id:11155111,network:"sepolia",name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"SEP",decimals:18},rpcUrls:{privy:{http:["https://sepolia.rpc.privy.systems"]},alchemy:{http:["https://eth-sepolia.g.alchemy.com/v2"],webSocket:["wss://eth-sepolia.g.alchemy.com/v2"]},infura:{http:["https://sepolia.infura.io/v3"],webSocket:["wss://sepolia.infura.io/ws/v3"]},default:{http:["https://rpc.sepolia.org"]},public:{http:["https://rpc.sepolia.org"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://sepolia.etherscan.io"},default:{name:"Etherscan",url:"https://sepolia.etherscan.io"}},testnet:!0};var _e={id:7777777,name:"Zora",network:"zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]},public:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy"}}};var Se={id:999999999,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]},public:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/"}},testnet:!0};var Pe={id:999,name:"Zora Goerli Testnet",network:"zora-testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]},public:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy"}},testnet:!0};var R=[oe,re,xe,L,Ee,ve,Ce,we,pe,ue,de,me,ae,le,ce,be,ge,ye,ie,se,_e,Pe,Se,fe,Ae,he],Cr= exports.Fa =new Set(R.map(e=>e.id));var _react = require('react');var o=()=>{throw new Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")};var I=_react.createContext.call(void 0, {ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:o,login:o,connectOrCreateWallet:o,linkEmail:o,linkPhone:o,linkFarcaster:o,linkWallet:o,startCrossAppAuthFlow:o,linkGoogle:o,linkTwitter:o,linkDiscord:o,linkGithub:o,linkSpotify:o,linkInstagram:o,linkTelegram:o,linkTiktok:o,linkLinkedIn:o,linkApple:o,linkPasskey:o,updateEmail:o,updatePhone:o,logout:o,getAccessToken:o,getEthereumProvider:o,getEthersProvider:o,getWeb3jsProvider:o,unlinkEmail:o,unlinkPhone:o,unlinkWallet:o,unlinkGoogle:o,unlinkTwitter:o,unlinkDiscord:o,unlinkGithub:o,unlinkSpotify:o,unlinkInstagram:o,unlinkTiktok:o,unlinkLinkedIn:o,unlinkApple:o,unlinkCrossAppAccount:o,unlinkFarcaster:o,unlinkTelegram:o,unlinkPasskey:o,setActiveWallet:o,forkSession:o,createWallet:o,importWallet:o,signMessage:o,signTypedData:o,enrollInMfa:o,initEnrollmentWithSms:o,initEnrollmentWithTotp:o,initEnrollmentWithPasskey:o,promptMfa:o,init:o,submitEnrollmentWithSms:o,submitEnrollmentWithTotp:o,submitEnrollmentWithPasskey:o,unenroll:o,submit:o,cancel:o,sendTransaction:o,exportWallet:o,setWalletPassword:o,setWalletRecovery:o,requestFarcasterSignerFromWarpcast:o,getFarcasterSignerPublicKey:o,signFarcasterMessage:o,createGuestAccount:o,initLoginWithEmail:o,initLoginWithSms:o,otpState:{status:"initial"},loginWithCode:o,fundWallet:o,initLoginWithHeadlessOAuth:o,loginWithHeadlessOAuth:o,generateSiweMessage:o,linkWithSiwe:o,signMessageWithCrossAppWallet:o,signTypedDataWithCrossAppWallet:o,sendTransactionWithCrossAppWallet:o,isHeadlessOAuthLoading:!1,isModalOpen:!1,mfaMethods:[],setCustomMetadata:o}),Te= exports.Oa =()=>_react.useContext.call(void 0, I);var Tr={login:{onComplete:[],onError:[],onOAuthLoginComplete:[]},logout:{onSuccess:[]},connectWallet:{onSuccess:[],onError:[]},createWallet:{onSuccess:[],onError:[]},linkAccount:{onSuccess:[],onError:[]},configureMfa:{onMfaRequired:[]},setWalletPassword:{onSuccess:[],onError:[]},setWalletRecovery:{onSuccess:[],onError:[]},signMessage:{onSuccess:[],onError:[]},signTypedData:{onSuccess:[],onError:[]},sendTransaction:{onSuccess:[],onError:[]},accessToken:{onAccessTokenGranted:[],onAccessTokenRemoved:[]},oAuthAuthorization:{onOAuthTokenGrant:[]},fundWallet:{onUserExited:[]},setCustomMetadata:{onSuccess:[],onError:[]},customAuth:{onAuthenticated:[],onUnauthenticated:[]}},kt= exports.Ra =_react.createContext.call(void 0, void 0),ke=()=>_react.useContext.call(void 0, kt);function y(e,t){if(!t)return;let r=ke().current[e];return _react.useEffect.call(void 0, ()=>{for(let[i,s]of Object.entries(t))r.hasOwnProperty(i)||console.warn(`Invalid event type "${i}" for action "${e}"`),_optionalChain([r, 'access', _2 => _2[i], 'optionalAccess', _3 => _3.push, 'call', _4 => _4(s)]);return()=>{for(let[i,s]of Object.entries(t))r.hasOwnProperty(i)||console.warn(`Invalid event type "${i}" for action "${e}"`),r[i]=_optionalChain([r, 'access', _5 => _5[i], 'optionalAccess', _6 => _6.filter, 'call', _7 => _7(l=>l!==s)])}},[t])}function Wt(e,t,n,...r){for(let i of e.current[t][n])i(...r)}function kr(){let e=ke();return(t,n,...r)=>Wt(e,t,n,...r)}function Mr(e){let{logout:t}=_react.useContext.call(void 0, I);return y("logout",e),{logout:t}}var Mt=_react.createContext.call(void 0, null);function Dr(){let e=_react.useContext.call(void 0, Mt);if(e===null)throw new Error("`useWallets` was called outside the PrivyProvider component");return e}function Kr(e){let{login:t}=_react.useContext.call(void 0, I);return y("login",e),{login:t}}var Yr=e=>{y("fundWallet",e);let{fundWallet:t}=Te();return{fundWallet:t}};var _ofetch = require('ofetch');var E=class extends Error{constructor(n,r,i){super(n);r instanceof Error&&(this.cause=r),this.privyErrorCode=i}toString(){return`${this.type}${this.privyErrorCode?`-${this.privyErrorCode}`:""}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}},D= exports.f =class extends E{constructor(n,r,i,s,l){super(i,s,l);this.type=n;this.status=r}},g= exports.g =class extends E{constructor(n,r,i){super(n,r,i);this.type="client_error"}},We= exports.h =class extends g{constructor(){super("Request timed out",void 0,"client_request_timeout")}};var b=class extends E{constructor(n,r,i){super(n,r,i);this.type="connector_error"}},Vr= exports.j =e=>{if(e instanceof E)return e;if(!(e instanceof _ofetch.FetchError))return Dt(e);if(!e.response)return new D("api_error",null,e.message,e);let{type:t,message:n,error:r,code:i}=e.data;return new D(t||"ApiError",e.response.status,n||r,e,i)},Dt= exports.k =e=>e instanceof E?e:e instanceof Error?new g(e.message,e):new g(`Internal error: ${e}`);var Ie=class extends g{constructor(){super("Method called before `ready`. Ensure you wait until `ready` is true before calling.")}},Oe= exports.m =class extends g{constructor(t="Embedded wallet error",n){super(t,n,"unknown_embedded_wallet_error")}},Ue= exports.n =class extends g{constructor(t="User must be authenticated"){super(t,void 0,"must_be_authenticated")}};var Me=class extends g{constructor(t){super("This application is in development mode and must be upgraded to production to log in new users.",t,"max_accounts_reached")}};var $=class{constructor(){this._cache={}}get(t){return this._cache[t]}put(t,n){n!==void 0?this._cache[t]=n:this.del(t)}del(t){delete this._cache[t]}getKeys(){return Object.keys(this._cache)}},F=class{get(t){let n=localStorage.getItem(t);return n===null?void 0:JSON.parse(n)}put(t,n){n!==void 0?localStorage.setItem(t,JSON.stringify(n)):this.del(t)}del(t){localStorage.removeItem(t)}getKeys(){return Object.entries(localStorage).map(([t])=>t)}};function Zr(){try{let e="privy:__session_storage__test",t="blobby",n=new F;return n.put(e,t),n.del(e),!0}catch (e2){return!1}}function Ft(){return typeof window<"u"&&window.localStorage?new F:new $}var P=Ft();function Le(){let e=window,t=e.ethereum;if(!t)return[];let n=[];if(_optionalChain([t, 'access', _8 => _8.providers, 'optionalAccess', _9 => _9.length]))for(let r of t.providers)r&&n.push(r);return n.push(e.ethereum),n}var N=e=>{if(e.isApexWallet)return"Apex Wallet";if(e.isAvalanche)return"Core Wallet";if(e.isBackpack)return"Backpack";if(e.isBifrost)return"Bifrost Wallet";if(e.isBitKeep)return"BitKeep";if(e.isBitski)return"Bitski";if(e.isBlockWallet)return"BlockWallet";if(e.isBraveWallet)return"Brave Wallet";if(e.isClover)return"Clover";if(e.isCoin98)return"Coin98 Wallet";if(e.isCoinbaseWallet)return"Coinbase Wallet";if(e.isDawn)return"Dawn Wallet";if(e.isDefiant)return"Defiant";if(e.isDesig)return"Desig Wallet";if(e.isEnkrypt)return"Enkrypt";if(e.isExodus)return"Exodus";if(e.isFordefi)return"Fordefi";if(e.isFrame)return"Frame";if(e.isFrontier)return"Frontier Wallet";if(e.isGamestop)return"GameStop Wallet";if(e.isHaqqWallet)return"HAQQ Wallet";if(e.isHyperPay)return"HyperPay Wallet";if(e.isImToken)return"ImToken";if(e.isHaloWallet)return"Halo Wallet";if(e.isKuCoinWallet)return"KuCoin Wallet";if(e.isMathWallet)return"MathWallet";if(e.isNovaWallet)return"Nova Wallet";if(e.isOkxWallet||e.isOKExWallet)return"OKX Wallet";if(e.isOneInchIOSWallet||e.isOneInchAndroidWallet)return"1inch Wallet";if(e.isOneKey)return"OneKey Wallet";if(e.isOpera)return"Opera";if(e.isPhantom)return"Phantom";if(e.isPortal)return"Ripio Portal";if(e.isRabby)return"Rabby Wallet";if(e.isRainbow)return"Rainbow";if(e.isSafePal)return"SafePal Wallet";if(e.isStatus)return"Status";if(e.isSubWallet)return"SubWallet";if(e.isTalisman)return"Talisman";if(e.isTally||e.isTaho)return"Taho";if(e.isTokenPocket)return"TokenPocket";if(e.isTokenary)return"Tokenary";if(e.isTrust||e.isTrustWallet)return"Trust Wallet";if(e.isTTWallet)return"TTWallet";if(e.isXDEFI)return"XDEFI Wallet";if(e.isZeal)return"Zeal";if(e.isZerion)return"Zerion";if(e.isMetaMask)return"MetaMask"};var G=(e,t)=>{if(!e.isMetaMask)return!1;if(e.isMetaMask&&!t)return!0;if(e.isBraveWallet&&!e._events&&!e._state||N(e)!=="MetaMask")return!1;if(e.providers){for(let n of e.providers)if(!G(n))return!1}return!0},ti= exports.r =()=>!!("phantom"in window&&_optionalChain([window, 'optionalAccess', _10 => _10.phantom, 'optionalAccess', _11 => _11.ethereum, 'optionalAccess', _12 => _12.isPhantom])),ni= exports.s =()=>{let e=window;if(!e.ethereum)return!1;if(e.ethereum.isCoinbaseWallet)return!0;if(e.ethereum.providers){for(let t of e.ethereum.providers)if(t&&t.isCoinbaseWallet)return!0}return!1};var _providers = require('@ethersproject/providers');var li=(e,t)=>{let n=[],r=[];for(let[i,s]of e.entries())i<t?n.push(s):r.push(s);return[n,r]},ci= exports.u =e=>!!String(e).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),pi= exports.v =(e,t)=>{let n=e.slice(0),r=[];for(;n.length;)r.push(n.splice(0,t));return r},Y= exports.w =(e,t=3,n=4,r="ethereum")=>{if(!e)return"";let i=r==="ethereum"?2:0,s=3;if(t+n+i+s>=e.length)return e;let l=e.slice(0,i+t),c=e.slice(e.length-n,e.length);return`${l}...${c}`},Nt= exports.x =e=>new Promise(t=>setTimeout(t,e));function ui(e,{interval:t=100,timeout:n=5e3}={}){return new Promise((r,i)=>{let s=0,l,c=()=>{if(s>=n){i("Max attempts reached without result");return}if(l=e(),s+=t,l!=null){r(l);return}setTimeout(c,t)};c()})}var di=(e,t={})=>{let n=t.delayMs||150,r=t.maxAttempts||270;return new Promise(async(i,s)=>{let l=!1,c=0;for(;!l&&c<r;){if(_optionalChain([t, 'access', _13 => _13.abortSignal, 'optionalAccess', _14 => _14.aborted]))return;e().then(a=>{l=!0,i(a)},(...a)=>{l=!0,s(...a)}),c+=1,await Nt(n)}l||s(new Error("Exceeded max attempts before resolving function"))})},mi= exports.A =(e,t,n={},r={})=>{let i=new URL(t,e);for(let[l,c]of Object.entries(n))c!==void 0&&i.searchParams.set(l,c);let s=Object.entries(r);if(s.length>0){let l=new URLSearchParams;for(let[c,a]of s)l.append(c,a);i.hash=l.toString()}return i.href};var hi=e=>e.replace(/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g,""),fi= exports.C =e=>typeof e=="string"?e:"0x"+e.toString(16);async function gi(e,t,n,r=3e3){let i=!1,s=window;return new Promise(l=>{s.ethereum?c():(window.addEventListener("ethereum#initialized",c,{once:!0}),setTimeout(()=>{c()},r));function c(){if(i)return;i=!0,window.removeEventListener("ethereum#initialized",c);let a=e.getProviders();console.debug("Detected injected providers:",a.map(u=>u.info));let p=[];for(let u of a)t.includes("coinbase_wallet")&&u.info.rdns==="com.coinbase.wallet"||p.push({type:u.info.name.toLowerCase().replace(/\s/g,"_"),eip6963InjectedProvider:u});for(let u of Le()){let f=N(u);if(!a.some(d=>d.info.name===f)){if(G(u,!0)&&!p.find(d=>d.type==="metamask")){p.push({type:"metamask",legacyInjectedProvider:u});continue}if(f==="Phantom"&&!p.find(d=>d.type==="phantom")){p.push({type:"phantom",legacyInjectedProvider:u});continue}if(f==="Coinbase Wallet"&&!p.find(d=>d.type==="coinbase_wallet"&&_optionalChain([n, 'optionalAccess', _15 => _15.coinbaseWallet, 'optionalAccess', _16 => _16.connectionOptions])!=="smartWalletOnly")){p.push({type:"coinbase_wallet",legacyInjectedProvider:u});continue}p.find(d=>d.type==="unknown_browser_extension")||p.push({type:"unknown_browser_extension",legacyInjectedProvider:u})}}l(p)}})}function yi(e){return`eip155:${String(Number(e))}`}var bi=(e,t,n,r)=>{let i=Number(e),s=t.find(l=>l.id===i);if(!s)throw new b(`Unsupported chainId ${e}`,4901);return Ht(s,n,r)},Ht= exports.G =(e,t,n)=>{let r=e.id,i=Number(e.id),s;if(e.rpcUrls.privyWalletOverride&&e.rpcUrls.privyWalletOverride.http[0])s=e.rpcUrls.privyWalletOverride.http[0];else if(t.rpcUrls&&t.rpcUrls[i])s=t.rpcUrls[i];else if(_optionalChain([e, 'access', _17 => _17.rpcUrls, 'access', _18 => _18.privy, 'optionalAccess', _19 => _19.http, 'access', _20 => _20[0]])){let l=new URL(e.rpcUrls.privy.http[0]);l.searchParams.append("privyAppId",n),s=l.toString()}else _optionalChain([e, 'access', _21 => _21.rpcUrls, 'access', _22 => _22.public, 'optionalAccess', _23 => _23.http, 'access', _24 => _24[0]])?s=e.rpcUrls.public.http[0]:s=_optionalChain([e, 'access', _25 => _25.rpcUrls, 'access', _26 => _26.default, 'optionalAccess', _27 => _27.http, 'access', _28 => _28[0]]);if(!s)throw new b(`No RPC url found for ${r}`);return s},Re=(e,t)=>{let n=Number(e),r=t.find(i=>i.id===n);if(!r)throw new b(`Unsupported chainId ${e}`,4901);return _optionalChain([r, 'access', _29 => _29.blockExplorers, 'optionalAccess', _30 => _30.default, 'access', _31 => _31.url])},Ei= exports.H =(e,t,n,r)=>{let i=Number(e),s=t.find(c=>c.id===i);if(!s)throw new b(`Unsupported chainId ${e}`,4901);let l;if(s.rpcUrls.privyWalletOverride&&s.rpcUrls.privyWalletOverride.http[0]?l=new (0, _providers.StaticJsonRpcProvider)(s.rpcUrls.privyWalletOverride.http[0]):n.rpcUrls&&n.rpcUrls[i]?l=new (0, _providers.StaticJsonRpcProvider)(n.rpcUrls[i]):_optionalChain([s, 'access', _32 => _32.rpcUrls, 'access', _33 => _33.privy, 'optionalAccess', _34 => _34.http, 'access', _35 => _35[0]])?l=new (0, _providers.StaticJsonRpcProvider)({url:s.rpcUrls.privy.http[0],headers:{"privy-app-id":r.appId}}):_optionalChain([s, 'access', _36 => _36.rpcUrls, 'access', _37 => _37.public, 'optionalAccess', _38 => _38.http, 'access', _39 => _39[0]])?l=new (0, _providers.StaticJsonRpcProvider)(s.rpcUrls.public.http[0]):l=new (0, _providers.StaticJsonRpcProvider)(_optionalChain([s, 'access', _40 => _40.rpcUrls, 'access', _41 => _41.default, 'optionalAccess', _42 => _42.http, 'access', _43 => _43[0]])),!l)throw new b(`No RPC url found for ${e}`);return l},vi= exports.I =e=>{let t={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},n=_nullishCoalesce(e.types.EIP712Domain, () => (Object.entries(e.domain).map(([r,i])=>{if(i!=null&&typeof r=="string"&&r in t)return{name:r,type:t[r]}}).filter(r=>r!==void 0)));return{...e,types:{...e.types,EIP712Domain:n}}};function Ci(e,{min:t,max:n}){return Math.min(Math.max(e,t),n)}var _jsxruntime = require('react/jsx-runtime');var Fe=({...e})=>_jsxruntime.jsx.call(void 0, "svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:_jsxruntime.jsx.call(void 0, "path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.37126 11.0323C2.37126 12.696 3.90598 13.4421 5.40654 13.4468C8.91753 13.4468 12.8021 11.2897 12.7819 7.67984C12.7673 5.07728 10.3748 2.86167 7.54357 2.88296C4.8495 2.88296 2.21821 4.6411 2.21803 7.03628C2.21803 7.67951 2.58722 8.30178 3.55231 8.37184C2.74763 9.16826 2.37126 10.1225 2.37126 11.0323ZM7.55283 8.68012C8.11562 8.68012 8.57186 8.13217 8.57186 7.45624C8.57186 6.78032 8.11562 6.23237 7.55283 6.23237C6.99003 6.23237 6.53379 6.78032 6.53379 7.45624C6.53379 8.13217 6.99003 8.68012 7.55283 8.68012ZM10.4747 8.68012C11.0375 8.68012 11.4937 8.13217 11.4937 7.45625C11.4937 6.78032 11.0375 6.23237 10.4747 6.23237C9.91186 6.23237 9.45562 6.78032 9.45562 7.45625C9.45562 8.13217 9.91186 8.68012 10.4747 8.68012Z",fill:e.color||"var(--privy-color-foreground-3)"})});var m={appearance:{landingHeader:"Log in or sign up",theme:"light",accentColor:"#676FFF",walletList:["detected_wallets","metamask","coinbase_wallet","rainbow","wallet_connect"]},walletConnectCloudProjectId:ne,rpcConfig:{rpcUrls:{},rpcTimeouts:{}},externalWallets:{coinbaseWallet:{connectionOptions:"all"}},captchaEnabled:!1,_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}};var Ne=({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],n=[];e.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`");for(let r of e.primary.slice(1))t.includes(r)?console.warn(`Duplicated login method: ${r}`):t.push(r);for(let r of _nullishCoalesce(e.overflow, () => ([])))!t.includes(r)&&!n.includes(r)?n.push(r):console.warn(`Duplicated login method: ${r}`);return{primary:t,overflow:n}};var jt=new Set(["coinbase_wallet","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","wallet_connect","detected_wallets","rabby_wallet","safe"]),He=e=>jt.has(e),je=(e,t,n)=>n.indexOf(e)===t,Ke=({input:e,overrides:t})=>t?t.primary.concat(_nullishCoalesce(t.overflow, () => ([]))).filter(He).filter(je):e?e.filter(He).filter(je):m.appearance.walletList;var _tinycolor2 = require('tinycolor2'); var _tinycolor22 = _interopRequireDefault(_tinycolor2);var Be="#FFFFFF",Kt="#040217",Bt=Be,$t="#1E1E1D";function Gt(e){return e<.8&&e>.2&&console.warn("Background color is not light or dark enough, which could lead to accessibility issues."),e>.5?"light":"dark"}function h(e,t){let n=Math.max(0,Math.min(1,e.toHsl().l+t));return _tinycolor22.default.call(void 0, {...e.toHsl(),l:n})}var Yt="#51BA81",zt="#FFB74D",qt="#EC6351",Vt=Be,Xt=Kt;function $e({backgroundTheme:e,accentHex:t}){let n;switch(e){case"light":n=Bt;break;case"dark":n=$t;break;default:n=e;break}let r=_tinycolor22.default.call(void 0, n),i=_tinycolor22.default.call(void 0, t),s=_tinycolor22.default.call(void 0, Yt),l=_tinycolor22.default.call(void 0, zt),c=_tinycolor22.default.call(void 0, qt),a=Gt(r.getLuminance()),p=h(r,a==="light"?-.04:.11),u=h(r,a==="light"?-.88:.87),f=h(r,a==="light"?-.7:.75),d=h(r,a==="light"?-.43:.45).desaturate(a==="light"?60:20),C=h(r,a==="light"?-.08:.25).desaturate(a==="light"?60:20),w=h(i,.15),A=h(i,-.06),x=h(c,.3),_=h(l,.3),S=_tinycolor22.default.call(void 0, i.getLuminance()>.5?Xt:Vt),U=h(s,-.16),M=h(s,.4);return{colorScheme:a,background:r.toHslString(),background2:p.toHslString(),foreground:u.toHslString(),foreground2:f.toHslString(),foreground3:d.toHslString(),foreground4:C.toHslString(),accent:i.toHslString(),accentLight:w.toHslString(),accentDark:A.toHslString(),foregroundAccent:S.toHslString(),success:s.toHslString(),successDark:U.toHslString(),successLight:M.toHslString(),error:c.toHslString(),errorLight:x.toHslString(),warn:l.toHslString(),warnLight:_.toHslString()}}function z(e,t,n){let r=n?console.warn:()=>{},i,s,l,c,a,p,u,f,d,C,w,A,x,_,S;_optionalChain([t, 'optionalAccess', _44 => _44.loginMethods])?(i=t.loginMethods.includes("email"),s=t.loginMethods.includes("sms"),c=t.loginMethods.includes("wallet"),a=t.loginMethods.includes("google"),p=t.loginMethods.includes("twitter"),u=t.loginMethods.includes("discord"),d=t.loginMethods.includes("spotify"),C=t.loginMethods.includes("instagram"),f=t.loginMethods.includes("tiktok"),A=t.loginMethods.includes("github"),w=t.loginMethods.includes("linkedin"),x=t.loginMethods.includes("apple"),_=t.loginMethods.includes("farcaster"),S=t.loginMethods.includes("telegram")):(i=e.emailAuth,s=e.smsAuth,c=e.walletAuth,a=e.googleOAuth,p=e.twitterOAuth,u=e.discordOAuth,A=e.githubOAuth,d=e.spotifyOAuth,C=e.instagramOAuth,f=e.tiktokOAuth,w=e.linkedinOAuth,x=e.appleOAuth,_=e.farcasterAuth,S=e.telegramAuth),typeof window<"u"&&typeof window.PublicKeyCredential!="function"?l=!1:e.passkeyAuth&&(l=!0);let U=[i,s].filter(Boolean),M=[a,p,u,A,d,C,f,w,x,_,S].filter(Boolean),j=[c].filter(Boolean);if(U.length+M.length+j.length===0)throw new Error("You must enable at least one login method");let k=_optionalChain([t, 'optionalAccess', _45 => _45.appearance, 'optionalAccess', _46 => _46.showWalletLoginFirst])!==void 0?_optionalChain([t, 'optionalAccess', _47 => _47.appearance, 'optionalAccess', _48 => _48.showWalletLoginFirst]):e.showWalletLoginFirst;k&&j.length===0?(r("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),k=!1):!k&&M.length+U.length===0&&(r("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),k=!0);let ht=_nullishCoalesce(_optionalChain([t, 'optionalAccess', _49 => _49.externalWallets, 'optionalAccess', _50 => _50.walletConnect, 'optionalAccess', _51 => _51.enabled]), () => (!0));_optionalChain([t, 'optionalAccess', _52 => _52.loginMethods])&&t.loginMethodsAndOrder&&r("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let ft=Ke({input:_optionalChain([t, 'optionalAccess', _53 => _53.appearance, 'optionalAccess', _54 => _54.walletList]),overrides:_optionalChain([t, 'optionalAccess', _55 => _55.loginMethodsAndOrder])}),gt=Ne({input:_optionalChain([t, 'optionalAccess', _56 => _56.loginMethodsAndOrder])}),yt=_nullishCoalesce(_optionalChain([t, 'optionalAccess', _57 => _57.intl, 'optionalAccess', _58 => _58.defaultCountry]), () => ("US")),{chains:bt,defaultChain:Et}=Zt({additionalChains:_optionalChain([t, 'optionalAccess', _59 => _59.additionalChains]),supportedChains:_optionalChain([t, 'optionalAccess', _60 => _60.supportedChains]),defaultChainFromConfig:_optionalChain([t, 'optionalAccess', _61 => _61.defaultChain]),hasRpcConfigDefined:Object.keys(_nullishCoalesce(_optionalChain([t, 'optionalAccess', _62 => _62.rpcConfig, 'optionalAccess', _63 => _63.rpcUrls]), () => ({}))).length>0}),vt=!!_optionalChain([t, 'optionalAccess', _64 => _64.defaultChain]),K=_optionalChain([t, 'optionalAccess', _65 => _65.customAuth, 'optionalAccess', _66 => _66.getCustomAccessToken])&&_optionalChain([t, 'optionalAccess', _67 => _67.customAuth, 'optionalAccess', _68 => _68.enabled])!==!1,W,Q=!(_nullishCoalesce(e.enforceWalletUis, () => (!0)));if(_nullishCoalesce(e.legacyWalletUiConfig, () => (!0))?K?W=_nullishCoalesce(_optionalChain([t, 'optionalAccess', _69 => _69.embeddedWallets, 'optionalAccess', _70 => _70.noPromptOnSignature]), () => (!0)):W=_nullishCoalesce(_optionalChain([t, 'optionalAccess', _71 => _71.embeddedWallets, 'optionalAccess', _72 => _72.noPromptOnSignature]), () => (Q)):W=Q,_optionalChain([t, 'optionalAccess', _73 => _73.embeddedWallets, 'optionalAccess', _74 => _74.waitForTransactionConfirmation])===!1&&W!==!0)throw new Error("Overriding `config.embeddedWallets.waitForTransactionConfirmation` requires that you disable wallet UIs in the dashboard.");let{requireUserPasswordOnCreate:ee,...Ct}=_nullishCoalesce(_optionalChain([t, 'optionalAccess', _75 => _75.embeddedWallets]), () => ({}));return{id:e.id,name:e.name,allowlistConfig:e.allowlistConfig,legacyWalletUiConfig:e.legacyWalletUiConfig,appearance:{logo:_nullishCoalesce(_optionalChain([t, 'optionalAccess', _76 => _76.appearance, 'optionalAccess', _77 => _77.logo]), () => (e.logoUrl)),landingHeader:_nullishCoalesce(_optionalChain([t, 'optionalAccess', _78 => _78.appearance, 'optionalAccess', _79 => _79.landingHeader]), () => (m.appearance.landingHeader)),loginMessage:typeof _optionalChain([t, 'optionalAccess', _80 => _80.appearance, 'optionalAccess', _81 => _81.loginMessage])=="string"?_optionalChain([t, 'optionalAccess', _82 => _82.appearance, 'optionalAccess', _83 => _83.loginMessage, 'access', _84 => _84.slice, 'call', _85 => _85(0,100)]):_optionalChain([t, 'optionalAccess', _86 => _86.appearance, 'optionalAccess', _87 => _87.loginMessage]),palette:$e({backgroundTheme:_nullishCoalesce(_optionalChain([t, 'optionalAccess', _88 => _88.appearance, 'optionalAccess', _89 => _89.theme]), () => (m.appearance.theme)),accentHex:_nullishCoalesce(_nullishCoalesce(_optionalChain([t, 'optionalAccess', _90 => _90.appearance, 'optionalAccess', _91 => _91.accentColor]), () => (e.accentColor)), () => (m.appearance.accentColor))}),loginGroupPriority:k?"web3-first":"web2-first",hideDirectWeb2Inputs:!!_optionalChain([t, 'optionalAccess', _92 => _92.appearance, 'optionalAccess', _93 => _93.hideDirectWeb2Inputs]),walletList:ft},loginMethods:{wallet:c,email:i,sms:s,passkey:l,google:a,twitter:p,discord:u,github:A,spotify:d,instagram:C,tiktok:f,linkedin:w,apple:x,farcaster:_,telegram:S},loginMethodsAndOrder:gt,legal:{termsAndConditionsUrl:_nullishCoalesce(_optionalChain([t, 'optionalAccess', _94 => _94.legal, 'optionalAccess', _95 => _95.termsAndConditionsUrl]), () => (e.termsAndConditionsUrl)),privacyPolicyUrl:_nullishCoalesce(_optionalChain([t, 'optionalAccess', _96 => _96.legal, 'optionalAccess', _97 => _97.privacyPolicyUrl]), () => (e.privacyPolicyUrl)),requireUsersAcceptTerms:_nullishCoalesce(e.requireUsersAcceptTerms, () => (!1))},walletConnectCloudProjectId:_nullishCoalesce(_nullishCoalesce(_optionalChain([t, 'optionalAccess', _98 => _98.walletConnectCloudProjectId]), () => (e.walletConnectCloudProjectId)), () => (m.walletConnectCloudProjectId)),rpcConfig:{rpcUrls:_nullishCoalesce(_optionalChain([t, 'optionalAccess', _99 => _99.rpcConfig, 'optionalAccess', _100 => _100.rpcUrls]), () => (m.rpcConfig.rpcUrls)),rpcTimeouts:_nullishCoalesce(_optionalChain([t, 'optionalAccess', _101 => _101.rpcConfig, 'optionalAccess', _102 => _102.rpcTimeouts]), () => (m.rpcConfig.rpcTimeouts))},chains:bt,defaultChain:Et,intl:{defaultCountry:yt},shouldEnforceDefaultChainOnConnect:vt,captchaEnabled:_nullishCoalesce(e.captchaEnabled, () => (m.captchaEnabled)),captchaSiteKey:e.captchaSiteKey,externalWallets:{coinbaseWallet:{connectionOptions:_nullishCoalesce(_optionalChain([t, 'optionalAccess', _103 => _103.externalWallets, 'optionalAccess', _104 => _104.coinbaseWallet, 'optionalAccess', _105 => _105.connectionOptions]), () => (m.externalWallets.coinbaseWallet.connectionOptions))},walletConnect:{enabled:ht}},embeddedWallets:{...e.embeddedWalletConfig,...typeof ee=="boolean"?{requireUserOwnedRecoveryOnCreate:ee}:{},...K?{createOnLogin:"all-users",requireUserOwnedRecoveryOnCreate:!1,userOwnedRecoveryOptions:["user-passcode"]}:{},waitForTransactionConfirmation:!0,priceDisplay:{primary:"fiat-currency",secondary:"native-token"},...Ct,noPromptOnSignature:W},mfa:{methods:_nullishCoalesce(e.mfaMethods, () => ([])),noPromptOnMfaRequired:_nullishCoalesce(_optionalChain([t, 'optionalAccess', _106 => _106.mfa, 'optionalAccess', _107 => _107.noPromptOnMfaRequired]), () => (!1))},customAuth:K?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:e.telegramAuthConfiguration},headless:!!_optionalChain([t, 'optionalAccess', _108 => _108.headless]),render:{standalone:_nullishCoalesce(_optionalChain([t, 'optionalAccess', _109 => _109._render, 'optionalAccess', _110 => _110.standalone]), () => (m._render.standalone))},fundingConfig:e.fundingConfig,fundingMethodConfig:{..._nullishCoalesce(_optionalChain([t, 'optionalAccess', _111 => _111.fundingMethodConfig]), () => (m.fundingMethodConfig)),moonpay:{..._nullishCoalesce(_optionalChain([t, 'optionalAccess', _112 => _112.fundingMethodConfig, 'optionalAccess', _113 => _113.moonpay]), () => (m.fundingMethodConfig.moonpay)),useSandbox:_nullishCoalesce(_nullishCoalesce(_optionalChain([t, 'optionalAccess', _114 => _114.fundingMethodConfig, 'optionalAccess', _115 => _115.moonpay, 'access', _116 => _116.useSandbox]), () => (_optionalChain([t, 'optionalAccess', _117 => _117.fiatOnRamp, 'optionalAccess', _118 => _118.useSandbox]))), () => (m.fundingMethodConfig.moonpay.useSandbox))}}}}function Ge(e,t){if(!e)return{legacyCreateEmbeddedWalletFlag:t};let{appearance:n,additionalChains:r,supportedChains:i,defaultChain:s,...l}=e;return{...l,...r?{additionalChains:r.map(a=>a.id)}:void 0,...i?{supportedChains:i.map(a=>a.id)}:void 0,...s?{defaultChain:s.id}:void 0,legacyCreateEmbeddedWalletFlag:t}}function Zt({additionalChains:e,supportedChains:t,defaultChainFromConfig:n,hasRpcConfigDefined:r}){let i;if(e&&t&&console.warn("You should only specify one of `additionalChains` or `supportedChains`. Using `supportedChains`."),t){if(t.length===0)throw new Error("`supportedChains` must contain at least one chain");t.filter(a=>a.rpcUrls.privyWalletOverride).length>0&&r&&console.warn("You have specified at least one `supportedChain` with `privyWalletOverride` but also have `rpcConfig` defined. The `rpcConfig` will be ignored. `rpcConfig` is deprecated and you should use `privyWalletOverride` in a `supportedChain`."),i=t.map(a=>a.rpcUrls.privyWalletOverride?a:_nullishCoalesce(R.find(u=>u.id===a.id), () => (a)))}else i=R.concat(_nullishCoalesce(e, () => ([])));let s=t?i[0]:L,l=_nullishCoalesce(n, () => (s));if(!i.find(c=>c.id===l.id))throw new Error("`defaultChain` must be included in `supportedChains`");return{chains:i,defaultChain:l}}var Ye=function(e,t=0){let n=3735928559^t,r=1103547991^t;for(let i=0,s;i<e.length;i++)s=e.charCodeAt(i),n=Math.imul(n^s,2654435761),r=Math.imul(r^s,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),4294967296*(2097151&r)+(n>>>0)};var Ve={showWalletLoginFirst:!0,allowlistConfig:{errorTitle:null,errorDetail:null,errorCtaText:null,errorCtaLink:null},walletAuth:!0,emailAuth:!0,smsAuth:!1,googleOAuth:!1,twitterOAuth:!1,discordOAuth:!1,githubOAuth:!1,linkedinOAuth:!1,appleOAuth:!1,termsAndConditionsUrl:null,privacyPolicyUrl:null,embeddedWalletConfig:{createOnLogin:"off",requireUserOwnedRecoveryOnCreate:!1,userOwnedRecoveryOptions:["user-passcode"]},fiatOnRampEnabled:!1,captchaEnabled:!1,captchaSiteKey:""},tn= exports.Ga =z(Ve,void 0,!1),q=_react.createContext.call(void 0, {appConfig:tn,isServerConfigLoaded:!1}),Gi= exports.Ha =({children:e,legacyCreateEmbeddedWalletFlag:t,client:n,clientConfig:r})=>{let[i,s]=_react.useState.call(void 0, null),l=_react.useMemo.call(void 0, ()=>z(_nullishCoalesce(i, () => (Ve)),r,!!i),[i,r]);return _react.useEffect.call(void 0, ()=>{if(!i)return;let c=Ge(r,t),a=Ye(JSON.stringify(c)).toString(),p=`privy:sent:${i.id}:${a}`;localStorage.getItem(p)||(n.createAnalyticsEvent({eventName:"sdk_initialize",payload:c}),localStorage.setItem(p,"t"))},[r,t,i]),_react.useEffect.call(void 0, ()=>{i||(async()=>{try{let a=await n.getServerConfig();a.customApiUrl&&n.updateApiUrl(a.customApiUrl),s(a)}catch(a){console.warn("Error generating app config: ",a)}})()},[]),_jsxruntime.jsx.call(void 0, q.Provider,{value:{appConfig:l,isServerConfigLoaded:!!i},children:e})},Xe= exports.Ia =()=>{let{appConfig:e}=_react.useContext.call(void 0, q);return e},Yi= exports.Ja =()=>{let{isServerConfigLoaded:e}=_react.useContext.call(void 0, q);return e};var sn=_react.createContext.call(void 0, {isNewUserThisSession:!1,walletConnectionStatus:null,connectors:[],rpcConfig:{rpcUrls:{}},showFiatPrices:!0,chains:[],clientAnalyticsId:null,pendingTransaction:null,appId:"notAdded",customAuthStatus:{status:"not-enabled"},nativeTokenSymbolForChainId:o,initializeWalletProxy:o,getAuthMeta:o,getAuthFlow:o,closePrivyModal:o,openPrivyModal:o,connectWallet:o,initLoginWithWallet:o,loginWithWallet:o,initLoginWithFarcaster:o,loginWithFarcaster:o,loginWithCode:o,initLoginWithEmail:o,initLoginWithSms:o,initUpdateEmail:o,initUpdatePhone:o,resendEmailCode:o,resendSmsCode:o,initLoginWithHeadlessOAuth:o,loginWithHeadlessOAuth:o,crossAppAuthFlow:o,initLoginWithOAuth:o,recoveryOAuthFlow:o,loginWithOAuth:o,initLoginWithPasskey:o,loginWithPasskey:o,initLinkWithPasskey:o,linkWithPasskey:o,refreshUser:o,loginWithGuestAccountFlow:o,walletProxy:null,createAnalyticsEvent:o,acceptTerms:o,getUsdTokenPrice:o,recoverEmbeddedEthereumWallet:o,getMoonpaySignedUrl:o,initCoinbaseOnRamp:o,getCoinbaseOnRampStatus:o,updateWallets:o,fundWallet:o,setReadyToTrue:o,requestFarcasterSignerStatus:o,initLoginWithTelegram:o,loginWithTelegram:o,generateSiweMessage:o,linkWithSiwe:o,embeddedSolanaWallet:null,createEmbeddedSolanaWallet:o,recoverEmbeddedSolanaWallet:o,exportSolanaWallet:o,solanaSignMessage:o,connectCoinbaseSmartWallet:o,setCustomMetadataForUser:o}),Ze= exports.Ma =()=>_react.useContext.call(void 0, sn);var Qi=e=>{let[t,n]=_react.useState.call(void 0, "auto");return _react.useEffect.call(void 0, ()=>{let r=new ResizeObserver(i=>{n(_nullishCoalesce(_optionalChain([i, 'access', _119 => _119[0], 'optionalAccess', _120 => _120.contentRect, 'access', _121 => _121.height]), () => ("auto")))});return e.current&&r.observe(e.current),()=>{e.current&&r.unobserve(e.current)}},[e.current]),t};var _styledcomponents = require('styled-components'); var _styledcomponents2 = _interopRequireDefault(_styledcomponents);var V=_styledcomponents2.default.div`
2
- margin-top: 16px;
3
- font-size: 13px;
4
- text-align: center;
5
- color: var(--privy-color-foreground-3);
6
-
7
- && > a {
8
- color: var(--privy-color-accent);
9
- }
10
- `;function os(e){let{legal:{privacyPolicyUrl:t,termsAndConditionsUrl:n,requireUsersAcceptTerms:r}}=e.app;if(r&&!e.alwaysShowImplicitConsent)return _jsxruntime.jsx.call(void 0, V,{});if(!n&&!t)return _jsxruntime.jsx.call(void 0, V,{});let i=!!(t&&n);return _jsxruntime.jsxs.call(void 0, V,{children:["By logging in I agree to the"," ",n&&_jsxruntime.jsx.call(void 0, "a",{href:n,target:"_blank",children:i?"Terms":"Terms of Service"}),i&&" & ",t&&_jsxruntime.jsx.call(void 0, "a",{href:t,target:"_blank",children:"Privacy Policy"})]})}var rs=()=>_jsxruntime.jsxs.call(void 0, cn,{children:[_jsxruntime.jsx.call(void 0, Fe,{}),_jsxruntime.jsx.call(void 0, "a",{href:"https://www.privy.io/",target:"_blank",children:"Protected by Privy"})]}),cn= exports.Xa =_styledcomponents2.default.div`
11
- display: flex;
12
- align-items: center;
13
- justify-content: center;
14
- padding-top: 8px;
15
- padding-bottom: 12px;
16
- gap: 2px;
17
-
18
- font-size: 13px;
19
-
20
- && svg {
21
- height: 14px;
22
- width: 14px;
23
- margin-bottom: 2px;
24
- opacity: 0.5;
25
- }
26
-
27
- && a {
28
- color: var(--privy-color-foreground-3);
29
- &:hover {
30
- text-decoration: underline;
31
- }
32
- }
33
-
34
- @media all and (display-mode: standalone) {
35
- padding-bottom: 30px;
36
- }
37
- `;var tt=_react.createContext.call(void 0, {}),ms= exports._a =({children:e})=>{let t=Xe(),[n,r]=_react.useState.call(void 0, {});return y("login",{onComplete:(i,s,l,c,a)=>{!a||a.type==="passkey"||a.type==="cross_app"||a.type==="wallet"&&a.walletClientType==="privy"||(P.put(et(t.id),a.type),a.type==="wallet"?(P.put(X(t.id),a.walletClientType),r({accountType:a.type,walletClientType:a.walletClientType})):(P.del(X(t.id)),r({accountType:a.type})))}}),_react.useEffect.call(void 0, ()=>{if(!t.id)return;let i=P.get(et(t.id)),s=P.get(X(t.id));i&&r(i==="wallet"?{accountType:i,walletClientType:s}:{accountType:i})},[t.id]),_jsxruntime.jsx.call(void 0, tt.Provider,{value:n,children:e})},et=e=>`privy:${e}:recent-login-method`,X=e=>`privy:${e}:recent-login-wallet-client`,hs= exports.$a =()=>_react.useContext.call(void 0, tt);var gn=_styledcomponents.keyframes`
38
- from, to {
39
- background: var(--privy-color-foreground-4);
40
- color: var(--privy-color-foreground-4);
41
- }
42
-
43
- 50% {
44
- background: var(--privy-color-foreground-accent);
45
- color: var(--privy-color-foreground-accent);
46
- }
47
- `,ot= exports.Ya =_styledcomponents.css`
48
- ${e=>e.$isLoading?_styledcomponents.css`
49
- width: 35%;
50
- animation: ${gn} 2s linear infinite;
51
- border-radius: var(--privy-border-radius-sm);
52
- `:""}
53
- `;var it=({children:e,color:t,isLoading:n,isPulsing:r,className:i})=>_jsxruntime.jsx.call(void 0, En,{$color:t,$isLoading:n,$isPulsing:r,className:i,children:e}),En=_styledcomponents2.default.span`
54
- padding: 0.125rem 0.5rem;
55
- font-size: 0.75rem;
56
- font-weight: 500;
57
- line-height: 1.125rem; /* 150% */
58
- border-radius: var(--privy-border-radius-sm);
59
-
60
- ${e=>{let t,n;e.$color==="green"&&(t="var(--privy-color-success-dark)",n="var(--privy-color-success-light)"),e.$color==="red"&&(t="var(--privy-color-error)",n="var(--privy-color-error-light)"),e.$color==="gray"&&(t="var(--privy-color-foreground-2)",n="var(--privy-color-background-2)");let r=_styledcomponents.keyframes`
61
- from, to {
62
- background-color: ${n};
63
- }
64
-
65
- 50% {
66
- background-color: rgba(${n}, 0.8);
67
- }
68
- `;return _styledcomponents.css`
69
- color: ${t};
70
- background-color: ${n};
71
- ${e.$isPulsing&&_styledcomponents.css`
72
- animation: ${r} 3s linear infinite;
73
- `};
74
- `}}
75
-
76
- ${ot}
77
- `;var st=_styledcomponents2.default.div`
78
- display: flex;
79
- flex-direction: column;
80
- `;var at=_styledcomponents2.default.span`
81
- text-align: left;
82
- font-size: 0.75rem;
83
- font-weight: 500;
84
- line-height: 1.125rem; /* 150% */
85
-
86
- color: var(--privy-color-error);
87
- `;var lt=_styledcomponents2.default.span`
88
- color: var(--privy-color-foreground-3);
89
- font-size: 0.75rem;
90
- font-weight: 500;
91
- line-height: 1.125rem; /* 150% */
92
- `;var _Square2StackIcon = require('@heroicons/react/24/outline/Square2StackIcon'); var _Square2StackIcon2 = _interopRequireDefault(_Square2StackIcon);var pt=({address:e,showCopyIcon:t,url:n,className:r})=>n?_jsxruntime.jsx.call(void 0, "a",{title:e,className:r,href:`${n}/address/${e}`,target:"_blank",children:Y(e)}):_jsxruntime.jsxs.call(void 0, "button",{title:e,className:r,onClick:()=>navigator.clipboard.writeText(e).catch(console.error),children:[Y(e),t&&_jsxruntime.jsx.call(void 0, Sn,{})]}),Sn=_styledcomponents2.default.call(void 0, _Square2StackIcon2.default)`
93
- && {
94
- display: inline;
95
- }
96
- stroke-width: 2;
97
- height: 0.875rem;
98
- width: 0.875rem;
99
- margin-left: 0.125rem;
100
- color: var(--privy-color-foreground-3);
101
- `;var Wn=_styledcomponents.css`
102
- && {
103
- border-width: 1px;
104
- padding: 0.5rem 1rem;
105
- }
106
-
107
- width: 100%;
108
- text-align: left;
109
- border: solid 1px var(--privy-color-foreground-4);
110
- border-radius: var(--privy-border-radius-md);
111
- display: flex;
112
- justify-content: space-between;
113
- align-items: center;
114
-
115
- ${e=>e.$state==="error"?"border-color: var(--privy-color-error);":""}
116
- `,ut= exports.eb =_styledcomponents2.default.div`
117
- ${Wn}
118
- `;var Ks=({errMsg:e,balance:t,address:n,isLoading:r,className:i,title:s,isPulsing:l,showIcon:c,statusColor:a="green"})=>{let p;return a?p=a:e?p="red":p="green",_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsxs.call(void 0, ut,{className:i,$state:e?"error":void 0,children:[_jsxruntime.jsxs.call(void 0, st,{children:[_jsxruntime.jsx.call(void 0, lt,{children:s||"Pay with"}),_jsxruntime.jsx.call(void 0, pt,{address:n,showCopyIcon:c||!!e})]}),t!==void 0&&_jsxruntime.jsx.call(void 0, it,{isLoading:r,isPulsing:l,color:p,children:t})]}),e&&_jsxruntime.jsx.call(void 0, at,{style:{marginTop:"0.25rem"},children:e})]})};var _bignumber = require('@ethersproject/bignumber');var _units = require('@ethersproject/units');var _jssdkcore = require('@privy-io/js-sdk-core');var Mn=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:2}),mt=e=>Mn.format(e),Xs= exports.jb =(e,t)=>{let n=mt(t*parseFloat(e));return n!=="$0.00"?n:"<$0.01"},Zs= exports.kb =(e,t)=>{let n=mt(t*parseFloat(_units.formatEther.call(void 0, e)));return n==="$0.00"?"<$0.01":n},Js= exports.lb =(e,t,n=6,r=!1)=>{let s=parseFloat(_units.formatEther.call(void 0, e)).toFixed(n).replace(/0+$/,"").replace(/\.$/,"");return r?`${s} ${t}`:`${s==="0"?"<0.001":s} ${t}`},Qs= exports.mb =e=>e.map(_jssdkcore.QuantityToBigNumber).reduce((t,n)=>t.add(n),_bignumber.BigNumber.from(0)).toHexString(),ea= exports.nb =(e,t)=>{let{chains:n}=Ze(),r=`https://etherscan.io/address/${t}`,i=`${Re(e,n)}/address/${t}`;if(!i)return r;try{new URL(i)}catch (e3){return r}return i};var na=({color:e,...t})=>_jsxruntime.jsx.call(void 0, "svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 115.77 122.88",xmlSpace:"preserve",...t,children:_jsxruntime.jsx.call(void 0, "g",{children:_jsxruntime.jsx.call(void 0, "path",{fill:e||"currentColor",className:"st0",d:"M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.57,7.33-4.1,9.86c-2.51,2.5-5.98,4.06-9.82,4.07v0.02h-0.02h-61.7H40.1v-0.02 c-3.84-0.01-7.34-1.57-9.86-4.1c-2.5-2.51-4.06-5.98-4.07-9.82h-0.02v-0.02V92.51H13.96h-0.01v-0.02c-3.84-0.01-7.34-1.57-9.86-4.1 c-2.5-2.51-4.06-5.98-4.07-9.82H0v-0.02V13.96v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07V0h0.02h61.7 h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02V13.96L89.62,13.96z M79.04,21.69v-7.73v-0.02h0.02 c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v64.59v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h12.19V35.65 v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07v-0.02h0.02H79.04L79.04,21.69z M105.18,108.92V35.65v-0.02 h0.02c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v73.27v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h61.7h0.02 v0.02c0.91,0,1.75-0.39,2.37-1.01c0.61-0.61,1-1.46,1-2.37h-0.02V108.92L105.18,108.92z"})})});exports.a = Rn; exports.b = Dn; exports.c = Fn; exports.d = Nn; exports.e = E; exports.f = D; exports.g = g; exports.h = We; exports.i = b; exports.j = Vr; exports.k = Dt; exports.l = Ie; exports.m = Oe; exports.n = Ue; exports.o = Me; exports.p = Zr; exports.q = P; exports.r = ti; exports.s = ni; exports.t = li; exports.u = ci; exports.v = pi; exports.w = Y; exports.x = Nt; exports.y = ui; exports.z = di; exports.A = mi; exports.B = hi; exports.C = fi; exports.D = gi; exports.E = yi; exports.F = bi; exports.G = Ht; exports.H = Ei; exports.I = vi; exports.J = Ci; exports.K = Bn; exports.L = $n; exports.M = Gn; exports.N = Yn; exports.O = zn; exports.P = qn; exports.Q = Vn; exports.R = Xn; exports.S = Zn; exports.T = Jn; exports.U = Qn; exports.V = eo; exports.W = to; exports.X = no; exports.Y = oo; exports.Z = ro; exports._ = io; exports.$ = so; exports.aa = ao; exports.ba = lo; exports.ca = co; exports.da = po; exports.ea = uo; exports.fa = mo; exports.ga = ho; exports.ha = fo; exports.ia = go; exports.ja = yo; exports.ka = bo; exports.la = Eo; exports.ma = vo; exports.na = Co; exports.oa = Fe; exports.pa = oe; exports.qa = re; exports.ra = ie; exports.sa = se; exports.ta = ae; exports.ua = le; exports.va = pe; exports.wa = ge; exports.xa = L; exports.ya = Ee; exports.za = ve; exports.Aa = Ce; exports.Ba = we; exports.Ca = xe; exports.Da = _e; exports.Ea = R; exports.Fa = Cr; exports.Ga = tn; exports.Ha = Gi; exports.Ia = Xe; exports.Ja = Yi; exports.Ka = o; exports.La = sn; exports.Ma = Ze; exports.Na = I; exports.Oa = Te; exports.Pa = Qi; exports.Qa = Tr; exports.Ra = kt; exports.Sa = y; exports.Ta = Wt; exports.Ua = kr; exports.Va = os; exports.Wa = rs; exports.Xa = cn; exports.Ya = ot; exports.Za = it; exports._a = ms; exports.$a = hs; exports.ab = Mr; exports.bb = at; exports.cb = pt; exports.db = Wn; exports.eb = ut; exports.fb = Ks; exports.gb = na; exports.hb = Mt; exports.ib = Dr; exports.jb = Xs; exports.kb = Zs; exports.lb = Js; exports.mb = Qs; exports.nb = ea; exports.ob = Kr; exports.pb = Yr;
@@ -1,118 +0,0 @@
1
- var B=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Rn=(e,t,n)=>(B(e,t,"read from private field"),n?n.call(e):t.get(e)),Dn=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Fn=(e,t,n,r)=>(B(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Nn=(e,t,n)=>(B(e,t,"access private method"),n);var te="1.82.0";var ne="34357d3c125c2bcf2ce2bc3309d98715",Bn="https://auth.privy.io",$n=2e4,Gn=1400,Yn=2500,zn=4e3,qn=te;var Vn="privy:token",Xn="privy-token",Zn="privy:refresh_token",Jn="privy-refresh-token",Qn="privy:id_token",eo="privy-id-token",to="privy-session",no="privy:session_transfer_token",At="privy:wallet",oo="privy:caid",ro=e=>`privy:guest:${e}`,io=e=>`privy:cross-app:${e}`,so="privy:state_code",ao="privy:code_verifier",lo="privy:headless_oauth",co=e=>`${At}:${e}`,po="privy:connectors",uo="privy:connections";var mo=12e4,ho=1,fo="0x1",go=3e4,yo="https://api.moonpay.com/v1",bo="https://api.moonpay.com/v1",Eo="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",vo="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI";var Co="deprecated";var oe={id:42161,name:"Arbitrum One",network:"arbitrum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://arbitrum-mainnet.rpc.privy.systems"]},alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]},default:{http:["https://arb1.arbitrum.io/rpc"]},public:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://arbiscan.io"},default:{name:"Arbiscan",url:"https://arbiscan.io"}}};var re={id:421614,name:"Arbitrum Sepolia",network:"arbitrum-sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://arbitrum-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]},public:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-explorer.arbitrum.io"}},testnet:!0};var ie={id:43114,name:"Avalanche",network:"avalanche",nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]},public:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://snowtrace.io"},default:{name:"SnowTrace",url:"https://snowtrace.io"}}};var se={id:43113,name:"Avalanche Fuji",network:"avalanche-fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]},public:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://testnet.snowtrace.io"},default:{name:"SnowTrace",url:"https://testnet.snowtrace.io"}},testnet:!0};var ae={id:8453,network:"base",name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://base-mainnet.rpc.privy.systems"]},blast:{http:["https://base-mainnet.blastapi.io"],webSocket:["wss://base-mainnet.blastapi.io"]},default:{http:["https://mainnet.base.org"]},public:{http:["https://mainnet.base.org"]}},blockExplorers:{etherscan:{name:"Basescan",url:"https://basescan.org"},default:{name:"Basescan",url:"https://basescan.org"}}};var le={id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://base-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia.base.org"]},public:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://base-sepolia.blockscout.com"}},testnet:!0};var ce={id:80085,network:"berachain-artio",name:"Berachain Artio",nativeCurrency:{name:"BERA",symbol:"BERA",decimals:18},rpcUrls:{default:{http:["https://berachain-artio.rpc.privy.systems"]},public:{http:["https://berachain-artio.rpc.privy.systems"]}},blockExplorers:{default:{name:"Beratrail",url:"https://artio.beratrail.io"}},testnet:!0};var pe={id:42220,name:"Celo Mainnet",network:"celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]},infura:{http:["https://celo-mainnet.infura.io/v3"]},public:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/mainnet"},etherscan:{name:"CeloScan",url:"https://celoscan.io"}},testnet:!1};var ue={id:44787,name:"Celo Alfajores Testnet",network:"celo-alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]},infura:{http:["https://celo-alfajores.infura.io/v3"]},public:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/alfajores"},etherscan:{name:"CeloScan",url:"https://alfajores.celoscan.io/"}},testnet:!0};var de={id:314,name:"Filecoin - Mainnet",network:"filecoin-mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]},public:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"},filscan:{name:"Filscan",url:"https://filscan.io"},filscout:{name:"Filscout",url:"https://filscout.io/en"},glif:{name:"Glif",url:"https://explorer.glif.io"}}};var me={id:314159,name:"Filecoin - Calibration testnet",network:"filecoin-calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]},public:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}}};var he={id:17069,name:"Garnet Holesky",network:"garnet-holesky",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.garnetchain.com"]},public:{http:["https://rpc.garnetchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.garnetchain.com"}}};var fe={id:17e3,name:"Holesky",network:"holesky",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky.publicnode.com"]},public:{http:["https://ethereum-holesky.publicnode.com"]}},blockExplorers:{etherscan:{name:"EtherScan",url:"https://holesky.etherscan.io"},default:{name:"EtherScan",url:"https://holesky.etherscan.io"}}};var ge={id:59144,network:"linea-mainnet",name:"Linea Mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]},public:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build"},etherscan:{name:"Etherscan",url:"https://lineascan.build"}},testnet:!1};var ye={id:59140,network:"linea-testnet",name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{infura:{http:["https://linea-goerli.infura.io/v3"],webSocket:["wss://linea-goerli.infura.io/ws/v3"]},default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]},public:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build"},etherscan:{name:"Etherscan",url:"https://goerli.lineascan.build"}},testnet:!0};var be={id:42,network:"lukso",name:"LUKSO",nativeCurrency:{name:"LUKSO",symbol:"LYX",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.lukso.network"],webSocket:["wss://ws-rpc.mainnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Mainnet Explorer",url:"https://explorer.execution.mainnet.lukso.network"}}};var L={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://mainnet.rpc.privy.systems"]},alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}}};var Ee={id:10,name:"OP Mainnet",network:"optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://optimism-mainnet.rpc.privy.systems"]},alchemy:{http:["https://opt-mainnet.g.alchemy.com/v2"],webSocket:["wss://opt-mainnet.g.alchemy.com/v2"]},infura:{http:["https://optimism-mainnet.infura.io/v3"],webSocket:["wss://optimism-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.optimism.io"]},public:{http:["https://mainnet.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://optimistic.etherscan.io"},default:{name:"Optimism Explorer",url:"https://explorer.optimism.io"}}};var ve={id:11155420,name:"Optimism Sepolia",network:"optimism-sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://optimism-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia.optimism.io"]},public:{http:["https://sepolia.optimism.io"]},infura:{http:["https://optimism-sepolia.infura.io/v3"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com"}},testnet:!0};var Ce={id:137,name:"Polygon Mainnet",network:"matic",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{privy:{http:["https://polygon-mainnet.rpc.privy.systems"]},alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}}};var we={id:80002,name:"Polygon Amoy",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{privy:{http:["https://polygon-amoy.rpc.privy.systems"]},infura:{http:["https://polygon-amoy.infura.io/v3"],webSocket:["wss://polygon-amoy.infura.io/ws/v3"]},default:{http:["https://rpc-amoy.polygon.technology"]}},blockExplorers:{default:{name:"OK LINK",url:"https://www.oklink.com/amoy"}},testnet:!0};var Ae={id:690,name:"Redstone",network:"redstone",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.redstonechain.com"]},public:{http:["https://rpc.redstonechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.redstone.xyz/"}}};var xe={id:11155111,network:"sepolia",name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"SEP",decimals:18},rpcUrls:{privy:{http:["https://sepolia.rpc.privy.systems"]},alchemy:{http:["https://eth-sepolia.g.alchemy.com/v2"],webSocket:["wss://eth-sepolia.g.alchemy.com/v2"]},infura:{http:["https://sepolia.infura.io/v3"],webSocket:["wss://sepolia.infura.io/ws/v3"]},default:{http:["https://rpc.sepolia.org"]},public:{http:["https://rpc.sepolia.org"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://sepolia.etherscan.io"},default:{name:"Etherscan",url:"https://sepolia.etherscan.io"}},testnet:!0};var _e={id:7777777,name:"Zora",network:"zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]},public:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy"}}};var Se={id:999999999,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]},public:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/"}},testnet:!0};var Pe={id:999,name:"Zora Goerli Testnet",network:"zora-testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]},public:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy"}},testnet:!0};var R=[oe,re,xe,L,Ee,ve,Ce,we,pe,ue,de,me,ae,le,ce,be,ge,ye,ie,se,_e,Pe,Se,fe,Ae,he],Cr=new Set(R.map(e=>e.id));import{createContext as xt,useContext as _t}from"react";var o=()=>{throw new Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")};var I=xt({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:o,login:o,connectOrCreateWallet:o,linkEmail:o,linkPhone:o,linkFarcaster:o,linkWallet:o,startCrossAppAuthFlow:o,linkGoogle:o,linkTwitter:o,linkDiscord:o,linkGithub:o,linkSpotify:o,linkInstagram:o,linkTelegram:o,linkTiktok:o,linkLinkedIn:o,linkApple:o,linkPasskey:o,updateEmail:o,updatePhone:o,logout:o,getAccessToken:o,getEthereumProvider:o,getEthersProvider:o,getWeb3jsProvider:o,unlinkEmail:o,unlinkPhone:o,unlinkWallet:o,unlinkGoogle:o,unlinkTwitter:o,unlinkDiscord:o,unlinkGithub:o,unlinkSpotify:o,unlinkInstagram:o,unlinkTiktok:o,unlinkLinkedIn:o,unlinkApple:o,unlinkCrossAppAccount:o,unlinkFarcaster:o,unlinkTelegram:o,unlinkPasskey:o,setActiveWallet:o,forkSession:o,createWallet:o,importWallet:o,signMessage:o,signTypedData:o,enrollInMfa:o,initEnrollmentWithSms:o,initEnrollmentWithTotp:o,initEnrollmentWithPasskey:o,promptMfa:o,init:o,submitEnrollmentWithSms:o,submitEnrollmentWithTotp:o,submitEnrollmentWithPasskey:o,unenroll:o,submit:o,cancel:o,sendTransaction:o,exportWallet:o,setWalletPassword:o,setWalletRecovery:o,requestFarcasterSignerFromWarpcast:o,getFarcasterSignerPublicKey:o,signFarcasterMessage:o,createGuestAccount:o,initLoginWithEmail:o,initLoginWithSms:o,otpState:{status:"initial"},loginWithCode:o,fundWallet:o,initLoginWithHeadlessOAuth:o,loginWithHeadlessOAuth:o,generateSiweMessage:o,linkWithSiwe:o,signMessageWithCrossAppWallet:o,signTypedDataWithCrossAppWallet:o,sendTransactionWithCrossAppWallet:o,isHeadlessOAuthLoading:!1,isModalOpen:!1,mfaMethods:[],setCustomMetadata:o}),Te=()=>_t(I);import{useContext as It}from"react";import{createContext as St,useContext as Pt,useEffect as Tt}from"react";var Tr={login:{onComplete:[],onError:[],onOAuthLoginComplete:[]},logout:{onSuccess:[]},connectWallet:{onSuccess:[],onError:[]},createWallet:{onSuccess:[],onError:[]},linkAccount:{onSuccess:[],onError:[]},configureMfa:{onMfaRequired:[]},setWalletPassword:{onSuccess:[],onError:[]},setWalletRecovery:{onSuccess:[],onError:[]},signMessage:{onSuccess:[],onError:[]},signTypedData:{onSuccess:[],onError:[]},sendTransaction:{onSuccess:[],onError:[]},accessToken:{onAccessTokenGranted:[],onAccessTokenRemoved:[]},oAuthAuthorization:{onOAuthTokenGrant:[]},fundWallet:{onUserExited:[]},setCustomMetadata:{onSuccess:[],onError:[]},customAuth:{onAuthenticated:[],onUnauthenticated:[]}},kt=St(void 0),ke=()=>Pt(kt);function y(e,t){if(!t)return;let r=ke().current[e];return Tt(()=>{for(let[i,s]of Object.entries(t))r.hasOwnProperty(i)||console.warn(`Invalid event type "${i}" for action "${e}"`),r[i]?.push(s);return()=>{for(let[i,s]of Object.entries(t))r.hasOwnProperty(i)||console.warn(`Invalid event type "${i}" for action "${e}"`),r[i]=r[i]?.filter(l=>l!==s)}},[t])}function Wt(e,t,n,...r){for(let i of e.current[t][n])i(...r)}function kr(){let e=ke();return(t,n,...r)=>Wt(e,t,n,...r)}function Mr(e){let{logout:t}=It(I);return y("logout",e),{logout:t}}import{createContext as Ot,useContext as Ut}from"react";var Mt=Ot(null);function Dr(){let e=Ut(Mt);if(e===null)throw new Error("`useWallets` was called outside the PrivyProvider component");return e}import{useContext as Lt}from"react";function Kr(e){let{login:t}=Lt(I);return y("login",e),{login:t}}var Yr=e=>{y("fundWallet",e);let{fundWallet:t}=Te();return{fundWallet:t}};import{FetchError as Rt}from"ofetch";var E=class extends Error{constructor(n,r,i){super(n);r instanceof Error&&(this.cause=r),this.privyErrorCode=i}toString(){return`${this.type}${this.privyErrorCode?`-${this.privyErrorCode}`:""}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}},D=class extends E{constructor(n,r,i,s,l){super(i,s,l);this.type=n;this.status=r}},g=class extends E{constructor(n,r,i){super(n,r,i);this.type="client_error"}},We=class extends g{constructor(){super("Request timed out",void 0,"client_request_timeout")}};var b=class extends E{constructor(n,r,i){super(n,r,i);this.type="connector_error"}},Vr=e=>{if(e instanceof E)return e;if(!(e instanceof Rt))return Dt(e);if(!e.response)return new D("api_error",null,e.message,e);let{type:t,message:n,error:r,code:i}=e.data;return new D(t||"ApiError",e.response.status,n||r,e,i)},Dt=e=>e instanceof E?e:e instanceof Error?new g(e.message,e):new g(`Internal error: ${e}`);var Ie=class extends g{constructor(){super("Method called before `ready`. Ensure you wait until `ready` is true before calling.")}},Oe=class extends g{constructor(t="Embedded wallet error",n){super(t,n,"unknown_embedded_wallet_error")}},Ue=class extends g{constructor(t="User must be authenticated"){super(t,void 0,"must_be_authenticated")}};var Me=class extends g{constructor(t){super("This application is in development mode and must be upgraded to production to log in new users.",t,"max_accounts_reached")}};var $=class{constructor(){this._cache={}}get(t){return this._cache[t]}put(t,n){n!==void 0?this._cache[t]=n:this.del(t)}del(t){delete this._cache[t]}getKeys(){return Object.keys(this._cache)}},F=class{get(t){let n=localStorage.getItem(t);return n===null?void 0:JSON.parse(n)}put(t,n){n!==void 0?localStorage.setItem(t,JSON.stringify(n)):this.del(t)}del(t){localStorage.removeItem(t)}getKeys(){return Object.entries(localStorage).map(([t])=>t)}};function Zr(){try{let e="privy:__session_storage__test",t="blobby",n=new F;return n.put(e,t),n.del(e),!0}catch{return!1}}function Ft(){return typeof window<"u"&&window.localStorage?new F:new $}var P=Ft();function Le(){let e=window,t=e.ethereum;if(!t)return[];let n=[];if(t.providers?.length)for(let r of t.providers)r&&n.push(r);return n.push(e.ethereum),n}var N=e=>{if(e.isApexWallet)return"Apex Wallet";if(e.isAvalanche)return"Core Wallet";if(e.isBackpack)return"Backpack";if(e.isBifrost)return"Bifrost Wallet";if(e.isBitKeep)return"BitKeep";if(e.isBitski)return"Bitski";if(e.isBlockWallet)return"BlockWallet";if(e.isBraveWallet)return"Brave Wallet";if(e.isClover)return"Clover";if(e.isCoin98)return"Coin98 Wallet";if(e.isCoinbaseWallet)return"Coinbase Wallet";if(e.isDawn)return"Dawn Wallet";if(e.isDefiant)return"Defiant";if(e.isDesig)return"Desig Wallet";if(e.isEnkrypt)return"Enkrypt";if(e.isExodus)return"Exodus";if(e.isFordefi)return"Fordefi";if(e.isFrame)return"Frame";if(e.isFrontier)return"Frontier Wallet";if(e.isGamestop)return"GameStop Wallet";if(e.isHaqqWallet)return"HAQQ Wallet";if(e.isHyperPay)return"HyperPay Wallet";if(e.isImToken)return"ImToken";if(e.isHaloWallet)return"Halo Wallet";if(e.isKuCoinWallet)return"KuCoin Wallet";if(e.isMathWallet)return"MathWallet";if(e.isNovaWallet)return"Nova Wallet";if(e.isOkxWallet||e.isOKExWallet)return"OKX Wallet";if(e.isOneInchIOSWallet||e.isOneInchAndroidWallet)return"1inch Wallet";if(e.isOneKey)return"OneKey Wallet";if(e.isOpera)return"Opera";if(e.isPhantom)return"Phantom";if(e.isPortal)return"Ripio Portal";if(e.isRabby)return"Rabby Wallet";if(e.isRainbow)return"Rainbow";if(e.isSafePal)return"SafePal Wallet";if(e.isStatus)return"Status";if(e.isSubWallet)return"SubWallet";if(e.isTalisman)return"Talisman";if(e.isTally||e.isTaho)return"Taho";if(e.isTokenPocket)return"TokenPocket";if(e.isTokenary)return"Tokenary";if(e.isTrust||e.isTrustWallet)return"Trust Wallet";if(e.isTTWallet)return"TTWallet";if(e.isXDEFI)return"XDEFI Wallet";if(e.isZeal)return"Zeal";if(e.isZerion)return"Zerion";if(e.isMetaMask)return"MetaMask"};var G=(e,t)=>{if(!e.isMetaMask)return!1;if(e.isMetaMask&&!t)return!0;if(e.isBraveWallet&&!e._events&&!e._state||N(e)!=="MetaMask")return!1;if(e.providers){for(let n of e.providers)if(!G(n))return!1}return!0},ti=()=>!!("phantom"in window&&window?.phantom?.ethereum?.isPhantom),ni=()=>{let e=window;if(!e.ethereum)return!1;if(e.ethereum.isCoinbaseWallet)return!0;if(e.ethereum.providers){for(let t of e.ethereum.providers)if(t&&t.isCoinbaseWallet)return!0}return!1};import{StaticJsonRpcProvider as O}from"@ethersproject/providers";var li=(e,t)=>{let n=[],r=[];for(let[i,s]of e.entries())i<t?n.push(s):r.push(s);return[n,r]},ci=e=>!!String(e).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),pi=(e,t)=>{let n=e.slice(0),r=[];for(;n.length;)r.push(n.splice(0,t));return r},Y=(e,t=3,n=4,r="ethereum")=>{if(!e)return"";let i=r==="ethereum"?2:0,s=3;if(t+n+i+s>=e.length)return e;let l=e.slice(0,i+t),c=e.slice(e.length-n,e.length);return`${l}...${c}`},Nt=e=>new Promise(t=>setTimeout(t,e));function ui(e,{interval:t=100,timeout:n=5e3}={}){return new Promise((r,i)=>{let s=0,l,c=()=>{if(s>=n){i("Max attempts reached without result");return}if(l=e(),s+=t,l!=null){r(l);return}setTimeout(c,t)};c()})}var di=(e,t={})=>{let n=t.delayMs||150,r=t.maxAttempts||270;return new Promise(async(i,s)=>{let l=!1,c=0;for(;!l&&c<r;){if(t.abortSignal?.aborted)return;e().then(a=>{l=!0,i(a)},(...a)=>{l=!0,s(...a)}),c+=1,await Nt(n)}l||s(new Error("Exceeded max attempts before resolving function"))})},mi=(e,t,n={},r={})=>{let i=new URL(t,e);for(let[l,c]of Object.entries(n))c!==void 0&&i.searchParams.set(l,c);let s=Object.entries(r);if(s.length>0){let l=new URLSearchParams;for(let[c,a]of s)l.append(c,a);i.hash=l.toString()}return i.href};var hi=e=>e.replace(/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g,""),fi=e=>typeof e=="string"?e:"0x"+e.toString(16);async function gi(e,t,n,r=3e3){let i=!1,s=window;return new Promise(l=>{s.ethereum?c():(window.addEventListener("ethereum#initialized",c,{once:!0}),setTimeout(()=>{c()},r));function c(){if(i)return;i=!0,window.removeEventListener("ethereum#initialized",c);let a=e.getProviders();console.debug("Detected injected providers:",a.map(u=>u.info));let p=[];for(let u of a)t.includes("coinbase_wallet")&&u.info.rdns==="com.coinbase.wallet"||p.push({type:u.info.name.toLowerCase().replace(/\s/g,"_"),eip6963InjectedProvider:u});for(let u of Le()){let f=N(u);if(!a.some(d=>d.info.name===f)){if(G(u,!0)&&!p.find(d=>d.type==="metamask")){p.push({type:"metamask",legacyInjectedProvider:u});continue}if(f==="Phantom"&&!p.find(d=>d.type==="phantom")){p.push({type:"phantom",legacyInjectedProvider:u});continue}if(f==="Coinbase Wallet"&&!p.find(d=>d.type==="coinbase_wallet"&&n?.coinbaseWallet?.connectionOptions!=="smartWalletOnly")){p.push({type:"coinbase_wallet",legacyInjectedProvider:u});continue}p.find(d=>d.type==="unknown_browser_extension")||p.push({type:"unknown_browser_extension",legacyInjectedProvider:u})}}l(p)}})}function yi(e){return`eip155:${String(Number(e))}`}var bi=(e,t,n,r)=>{let i=Number(e),s=t.find(l=>l.id===i);if(!s)throw new b(`Unsupported chainId ${e}`,4901);return Ht(s,n,r)},Ht=(e,t,n)=>{let r=e.id,i=Number(e.id),s;if(e.rpcUrls.privyWalletOverride&&e.rpcUrls.privyWalletOverride.http[0])s=e.rpcUrls.privyWalletOverride.http[0];else if(t.rpcUrls&&t.rpcUrls[i])s=t.rpcUrls[i];else if(e.rpcUrls.privy?.http[0]){let l=new URL(e.rpcUrls.privy.http[0]);l.searchParams.append("privyAppId",n),s=l.toString()}else e.rpcUrls.public?.http[0]?s=e.rpcUrls.public.http[0]:s=e.rpcUrls.default?.http[0];if(!s)throw new b(`No RPC url found for ${r}`);return s},Re=(e,t)=>{let n=Number(e),r=t.find(i=>i.id===n);if(!r)throw new b(`Unsupported chainId ${e}`,4901);return r.blockExplorers?.default.url},Ei=(e,t,n,r)=>{let i=Number(e),s=t.find(c=>c.id===i);if(!s)throw new b(`Unsupported chainId ${e}`,4901);let l;if(s.rpcUrls.privyWalletOverride&&s.rpcUrls.privyWalletOverride.http[0]?l=new O(s.rpcUrls.privyWalletOverride.http[0]):n.rpcUrls&&n.rpcUrls[i]?l=new O(n.rpcUrls[i]):s.rpcUrls.privy?.http[0]?l=new O({url:s.rpcUrls.privy.http[0],headers:{"privy-app-id":r.appId}}):s.rpcUrls.public?.http[0]?l=new O(s.rpcUrls.public.http[0]):l=new O(s.rpcUrls.default?.http[0]),!l)throw new b(`No RPC url found for ${e}`);return l},vi=e=>{let t={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},n=e.types.EIP712Domain??Object.entries(e.domain).map(([r,i])=>{if(i!=null&&typeof r=="string"&&r in t)return{name:r,type:t[r]}}).filter(r=>r!==void 0);return{...e,types:{...e.types,EIP712Domain:n}}};function Ci(e,{min:t,max:n}){return Math.min(Math.max(e,t),n)}import{jsx as De}from"react/jsx-runtime";var Fe=({...e})=>De("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:De("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.37126 11.0323C2.37126 12.696 3.90598 13.4421 5.40654 13.4468C8.91753 13.4468 12.8021 11.2897 12.7819 7.67984C12.7673 5.07728 10.3748 2.86167 7.54357 2.88296C4.8495 2.88296 2.21821 4.6411 2.21803 7.03628C2.21803 7.67951 2.58722 8.30178 3.55231 8.37184C2.74763 9.16826 2.37126 10.1225 2.37126 11.0323ZM7.55283 8.68012C8.11562 8.68012 8.57186 8.13217 8.57186 7.45624C8.57186 6.78032 8.11562 6.23237 7.55283 6.23237C6.99003 6.23237 6.53379 6.78032 6.53379 7.45624C6.53379 8.13217 6.99003 8.68012 7.55283 8.68012ZM10.4747 8.68012C11.0375 8.68012 11.4937 8.13217 11.4937 7.45625C11.4937 6.78032 11.0375 6.23237 10.4747 6.23237C9.91186 6.23237 9.45562 6.78032 9.45562 7.45625C9.45562 8.13217 9.91186 8.68012 10.4747 8.68012Z",fill:e.color||"var(--privy-color-foreground-3)"})});import{useContext as qe,useEffect as ze,useMemo as Jt,useState as Qt}from"react";import{createContext as en}from"react";var m={appearance:{landingHeader:"Log in or sign up",theme:"light",accentColor:"#676FFF",walletList:["detected_wallets","metamask","coinbase_wallet","rainbow","wallet_connect"]},walletConnectCloudProjectId:ne,rpcConfig:{rpcUrls:{},rpcTimeouts:{}},externalWallets:{coinbaseWallet:{connectionOptions:"all"}},captchaEnabled:!1,_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}};var Ne=({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],n=[];e.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`");for(let r of e.primary.slice(1))t.includes(r)?console.warn(`Duplicated login method: ${r}`):t.push(r);for(let r of e.overflow??[])!t.includes(r)&&!n.includes(r)?n.push(r):console.warn(`Duplicated login method: ${r}`);return{primary:t,overflow:n}};var jt=new Set(["coinbase_wallet","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","wallet_connect","detected_wallets","rabby_wallet","safe"]),He=e=>jt.has(e),je=(e,t,n)=>n.indexOf(e)===t,Ke=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(He).filter(je):e?e.filter(He).filter(je):m.appearance.walletList;import v from"tinycolor2";var Be="#FFFFFF",Kt="#040217",Bt=Be,$t="#1E1E1D";function Gt(e){return e<.8&&e>.2&&console.warn("Background color is not light or dark enough, which could lead to accessibility issues."),e>.5?"light":"dark"}function h(e,t){let n=Math.max(0,Math.min(1,e.toHsl().l+t));return v({...e.toHsl(),l:n})}var Yt="#51BA81",zt="#FFB74D",qt="#EC6351",Vt=Be,Xt=Kt;function $e({backgroundTheme:e,accentHex:t}){let n;switch(e){case"light":n=Bt;break;case"dark":n=$t;break;default:n=e;break}let r=v(n),i=v(t),s=v(Yt),l=v(zt),c=v(qt),a=Gt(r.getLuminance()),p=h(r,a==="light"?-.04:.11),u=h(r,a==="light"?-.88:.87),f=h(r,a==="light"?-.7:.75),d=h(r,a==="light"?-.43:.45).desaturate(a==="light"?60:20),C=h(r,a==="light"?-.08:.25).desaturate(a==="light"?60:20),w=h(i,.15),A=h(i,-.06),x=h(c,.3),_=h(l,.3),S=v(i.getLuminance()>.5?Xt:Vt),U=h(s,-.16),M=h(s,.4);return{colorScheme:a,background:r.toHslString(),background2:p.toHslString(),foreground:u.toHslString(),foreground2:f.toHslString(),foreground3:d.toHslString(),foreground4:C.toHslString(),accent:i.toHslString(),accentLight:w.toHslString(),accentDark:A.toHslString(),foregroundAccent:S.toHslString(),success:s.toHslString(),successDark:U.toHslString(),successLight:M.toHslString(),error:c.toHslString(),errorLight:x.toHslString(),warn:l.toHslString(),warnLight:_.toHslString()}}function z(e,t,n){let r=n?console.warn:()=>{},i,s,l,c,a,p,u,f,d,C,w,A,x,_,S;t?.loginMethods?(i=t.loginMethods.includes("email"),s=t.loginMethods.includes("sms"),c=t.loginMethods.includes("wallet"),a=t.loginMethods.includes("google"),p=t.loginMethods.includes("twitter"),u=t.loginMethods.includes("discord"),d=t.loginMethods.includes("spotify"),C=t.loginMethods.includes("instagram"),f=t.loginMethods.includes("tiktok"),A=t.loginMethods.includes("github"),w=t.loginMethods.includes("linkedin"),x=t.loginMethods.includes("apple"),_=t.loginMethods.includes("farcaster"),S=t.loginMethods.includes("telegram")):(i=e.emailAuth,s=e.smsAuth,c=e.walletAuth,a=e.googleOAuth,p=e.twitterOAuth,u=e.discordOAuth,A=e.githubOAuth,d=e.spotifyOAuth,C=e.instagramOAuth,f=e.tiktokOAuth,w=e.linkedinOAuth,x=e.appleOAuth,_=e.farcasterAuth,S=e.telegramAuth),typeof window<"u"&&typeof window.PublicKeyCredential!="function"?l=!1:e.passkeyAuth&&(l=!0);let U=[i,s].filter(Boolean),M=[a,p,u,A,d,C,f,w,x,_,S].filter(Boolean),j=[c].filter(Boolean);if(U.length+M.length+j.length===0)throw new Error("You must enable at least one login method");let k=t?.appearance?.showWalletLoginFirst!==void 0?t?.appearance?.showWalletLoginFirst:e.showWalletLoginFirst;k&&j.length===0?(r("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),k=!1):!k&&M.length+U.length===0&&(r("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),k=!0);let ht=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&r("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let ft=Ke({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder}),gt=Ne({input:t?.loginMethodsAndOrder}),yt=t?.intl?.defaultCountry??"US",{chains:bt,defaultChain:Et}=Zt({additionalChains:t?.additionalChains,supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain,hasRpcConfigDefined:Object.keys(t?.rpcConfig?.rpcUrls??{}).length>0}),vt=!!t?.defaultChain,K=t?.customAuth?.getCustomAccessToken&&t?.customAuth?.enabled!==!1,W,Q=!(e.enforceWalletUis??!0);if(e.legacyWalletUiConfig??!0?K?W=t?.embeddedWallets?.noPromptOnSignature??!0:W=t?.embeddedWallets?.noPromptOnSignature??Q:W=Q,t?.embeddedWallets?.waitForTransactionConfirmation===!1&&W!==!0)throw new Error("Overriding `config.embeddedWallets.waitForTransactionConfirmation` requires that you disable wallet UIs in the dashboard.");let{requireUserPasswordOnCreate:ee,...Ct}=t?.embeddedWallets??{};return{id:e.id,name:e.name,allowlistConfig:e.allowlistConfig,legacyWalletUiConfig:e.legacyWalletUiConfig,appearance:{logo:t?.appearance?.logo??e.logoUrl,landingHeader:t?.appearance?.landingHeader??m.appearance.landingHeader,loginMessage:typeof t?.appearance?.loginMessage=="string"?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,palette:$e({backgroundTheme:t?.appearance?.theme??m.appearance.theme,accentHex:t?.appearance?.accentColor??e.accentColor??m.appearance.accentColor}),loginGroupPriority:k?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:ft},loginMethods:{wallet:c,email:i,sms:s,passkey:l,google:a,twitter:p,discord:u,github:A,spotify:d,instagram:C,tiktok:f,linkedin:w,apple:x,farcaster:_,telegram:S},loginMethodsAndOrder:gt,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.termsAndConditionsUrl,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacyPolicyUrl,requireUsersAcceptTerms:e.requireUsersAcceptTerms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.walletConnectCloudProjectId??m.walletConnectCloudProjectId,rpcConfig:{rpcUrls:t?.rpcConfig?.rpcUrls??m.rpcConfig.rpcUrls,rpcTimeouts:t?.rpcConfig?.rpcTimeouts??m.rpcConfig.rpcTimeouts},chains:bt,defaultChain:Et,intl:{defaultCountry:yt},shouldEnforceDefaultChainOnConnect:vt,captchaEnabled:e.captchaEnabled??m.captchaEnabled,captchaSiteKey:e.captchaSiteKey,externalWallets:{coinbaseWallet:{connectionOptions:t?.externalWallets?.coinbaseWallet?.connectionOptions??m.externalWallets.coinbaseWallet.connectionOptions},walletConnect:{enabled:ht}},embeddedWallets:{...e.embeddedWalletConfig,...typeof ee=="boolean"?{requireUserOwnedRecoveryOnCreate:ee}:{},...K?{createOnLogin:"all-users",requireUserOwnedRecoveryOnCreate:!1,userOwnedRecoveryOptions:["user-passcode"]}:{},waitForTransactionConfirmation:!0,priceDisplay:{primary:"fiat-currency",secondary:"native-token"},...Ct,noPromptOnSignature:W},mfa:{methods:e.mfaMethods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},customAuth:K?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:e.telegramAuthConfiguration},headless:!!t?.headless,render:{standalone:t?._render?.standalone??m._render.standalone},fundingConfig:e.fundingConfig,fundingMethodConfig:{...t?.fundingMethodConfig??m.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??m.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??t?.fiatOnRamp?.useSandbox??m.fundingMethodConfig.moonpay.useSandbox}}}}function Ge(e,t){if(!e)return{legacyCreateEmbeddedWalletFlag:t};let{appearance:n,additionalChains:r,supportedChains:i,defaultChain:s,...l}=e;return{...l,...r?{additionalChains:r.map(a=>a.id)}:void 0,...i?{supportedChains:i.map(a=>a.id)}:void 0,...s?{defaultChain:s.id}:void 0,legacyCreateEmbeddedWalletFlag:t}}function Zt({additionalChains:e,supportedChains:t,defaultChainFromConfig:n,hasRpcConfigDefined:r}){let i;if(e&&t&&console.warn("You should only specify one of `additionalChains` or `supportedChains`. Using `supportedChains`."),t){if(t.length===0)throw new Error("`supportedChains` must contain at least one chain");t.filter(a=>a.rpcUrls.privyWalletOverride).length>0&&r&&console.warn("You have specified at least one `supportedChain` with `privyWalletOverride` but also have `rpcConfig` defined. The `rpcConfig` will be ignored. `rpcConfig` is deprecated and you should use `privyWalletOverride` in a `supportedChain`."),i=t.map(a=>a.rpcUrls.privyWalletOverride?a:R.find(u=>u.id===a.id)??a)}else i=R.concat(e??[]);let s=t?i[0]:L,l=n??s;if(!i.find(c=>c.id===l.id))throw new Error("`defaultChain` must be included in `supportedChains`");return{chains:i,defaultChain:l}}var Ye=function(e,t=0){let n=3735928559^t,r=1103547991^t;for(let i=0,s;i<e.length;i++)s=e.charCodeAt(i),n=Math.imul(n^s,2654435761),r=Math.imul(r^s,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),4294967296*(2097151&r)+(n>>>0)};import{jsx as nn}from"react/jsx-runtime";var Ve={showWalletLoginFirst:!0,allowlistConfig:{errorTitle:null,errorDetail:null,errorCtaText:null,errorCtaLink:null},walletAuth:!0,emailAuth:!0,smsAuth:!1,googleOAuth:!1,twitterOAuth:!1,discordOAuth:!1,githubOAuth:!1,linkedinOAuth:!1,appleOAuth:!1,termsAndConditionsUrl:null,privacyPolicyUrl:null,embeddedWalletConfig:{createOnLogin:"off",requireUserOwnedRecoveryOnCreate:!1,userOwnedRecoveryOptions:["user-passcode"]},fiatOnRampEnabled:!1,captchaEnabled:!1,captchaSiteKey:""},tn=z(Ve,void 0,!1),q=en({appConfig:tn,isServerConfigLoaded:!1}),Gi=({children:e,legacyCreateEmbeddedWalletFlag:t,client:n,clientConfig:r})=>{let[i,s]=Qt(null),l=Jt(()=>z(i??Ve,r,!!i),[i,r]);return ze(()=>{if(!i)return;let c=Ge(r,t),a=Ye(JSON.stringify(c)).toString(),p=`privy:sent:${i.id}:${a}`;localStorage.getItem(p)||(n.createAnalyticsEvent({eventName:"sdk_initialize",payload:c}),localStorage.setItem(p,"t"))},[r,t,i]),ze(()=>{i||(async()=>{try{let a=await n.getServerConfig();a.customApiUrl&&n.updateApiUrl(a.customApiUrl),s(a)}catch(a){console.warn("Error generating app config: ",a)}})()},[]),nn(q.Provider,{value:{appConfig:l,isServerConfigLoaded:!!i},children:e})},Xe=()=>{let{appConfig:e}=qe(q);return e},Yi=()=>{let{isServerConfigLoaded:e}=qe(q);return e};import{createContext as on,useContext as rn}from"react";var sn=on({isNewUserThisSession:!1,walletConnectionStatus:null,connectors:[],rpcConfig:{rpcUrls:{}},showFiatPrices:!0,chains:[],clientAnalyticsId:null,pendingTransaction:null,appId:"notAdded",customAuthStatus:{status:"not-enabled"},nativeTokenSymbolForChainId:o,initializeWalletProxy:o,getAuthMeta:o,getAuthFlow:o,closePrivyModal:o,openPrivyModal:o,connectWallet:o,initLoginWithWallet:o,loginWithWallet:o,initLoginWithFarcaster:o,loginWithFarcaster:o,loginWithCode:o,initLoginWithEmail:o,initLoginWithSms:o,initUpdateEmail:o,initUpdatePhone:o,resendEmailCode:o,resendSmsCode:o,initLoginWithHeadlessOAuth:o,loginWithHeadlessOAuth:o,crossAppAuthFlow:o,initLoginWithOAuth:o,recoveryOAuthFlow:o,loginWithOAuth:o,initLoginWithPasskey:o,loginWithPasskey:o,initLinkWithPasskey:o,linkWithPasskey:o,refreshUser:o,loginWithGuestAccountFlow:o,walletProxy:null,createAnalyticsEvent:o,acceptTerms:o,getUsdTokenPrice:o,recoverEmbeddedEthereumWallet:o,getMoonpaySignedUrl:o,initCoinbaseOnRamp:o,getCoinbaseOnRampStatus:o,updateWallets:o,fundWallet:o,setReadyToTrue:o,requestFarcasterSignerStatus:o,initLoginWithTelegram:o,loginWithTelegram:o,generateSiweMessage:o,linkWithSiwe:o,embeddedSolanaWallet:null,createEmbeddedSolanaWallet:o,recoverEmbeddedSolanaWallet:o,exportSolanaWallet:o,solanaSignMessage:o,connectCoinbaseSmartWallet:o,setCustomMetadataForUser:o}),Ze=()=>rn(sn);import{useEffect as an,useState as ln}from"react";var Qi=e=>{let[t,n]=ln("auto");return an(()=>{let r=new ResizeObserver(i=>{n(i[0]?.contentRect.height??"auto")});return e.current&&r.observe(e.current),()=>{e.current&&r.unobserve(e.current)}},[e.current]),t};import Je from"styled-components";import{jsx as T,jsxs as Qe}from"react/jsx-runtime";var V=Je.div`
2
- margin-top: 16px;
3
- font-size: 13px;
4
- text-align: center;
5
- color: var(--privy-color-foreground-3);
6
-
7
- && > a {
8
- color: var(--privy-color-accent);
9
- }
10
- `;function os(e){let{legal:{privacyPolicyUrl:t,termsAndConditionsUrl:n,requireUsersAcceptTerms:r}}=e.app;if(r&&!e.alwaysShowImplicitConsent)return T(V,{});if(!n&&!t)return T(V,{});let i=!!(t&&n);return Qe(V,{children:["By logging in I agree to the"," ",n&&T("a",{href:n,target:"_blank",children:i?"Terms":"Terms of Service"}),i&&" & ",t&&T("a",{href:t,target:"_blank",children:"Privacy Policy"})]})}var rs=()=>Qe(cn,{children:[T(Fe,{}),T("a",{href:"https://www.privy.io/",target:"_blank",children:"Protected by Privy"})]}),cn=Je.div`
11
- display: flex;
12
- align-items: center;
13
- justify-content: center;
14
- padding-top: 8px;
15
- padding-bottom: 12px;
16
- gap: 2px;
17
-
18
- font-size: 13px;
19
-
20
- && svg {
21
- height: 14px;
22
- width: 14px;
23
- margin-bottom: 2px;
24
- opacity: 0.5;
25
- }
26
-
27
- && a {
28
- color: var(--privy-color-foreground-3);
29
- &:hover {
30
- text-decoration: underline;
31
- }
32
- }
33
-
34
- @media all and (display-mode: standalone) {
35
- padding-bottom: 30px;
36
- }
37
- `;import{useContext as pn,useEffect as un,useState as dn}from"react";import{createContext as mn}from"react";import{jsx as hn}from"react/jsx-runtime";var tt=mn({}),ms=({children:e})=>{let t=Xe(),[n,r]=dn({});return y("login",{onComplete:(i,s,l,c,a)=>{!a||a.type==="passkey"||a.type==="cross_app"||a.type==="wallet"&&a.walletClientType==="privy"||(P.put(et(t.id),a.type),a.type==="wallet"?(P.put(X(t.id),a.walletClientType),r({accountType:a.type,walletClientType:a.walletClientType})):(P.del(X(t.id)),r({accountType:a.type})))}}),un(()=>{if(!t.id)return;let i=P.get(et(t.id)),s=P.get(X(t.id));i&&r(i==="wallet"?{accountType:i,walletClientType:s}:{accountType:i})},[t.id]),hn(tt.Provider,{value:n,children:e})},et=e=>`privy:${e}:recent-login-method`,X=e=>`privy:${e}:recent-login-wallet-client`,hs=()=>pn(tt);import yn,{css as rt,keyframes as bn}from"styled-components";import{keyframes as fn,css as nt}from"styled-components";var gn=fn`
38
- from, to {
39
- background: var(--privy-color-foreground-4);
40
- color: var(--privy-color-foreground-4);
41
- }
42
-
43
- 50% {
44
- background: var(--privy-color-foreground-accent);
45
- color: var(--privy-color-foreground-accent);
46
- }
47
- `,ot=nt`
48
- ${e=>e.$isLoading?nt`
49
- width: 35%;
50
- animation: ${gn} 2s linear infinite;
51
- border-radius: var(--privy-border-radius-sm);
52
- `:""}
53
- `;import{jsx as vn}from"react/jsx-runtime";var it=({children:e,color:t,isLoading:n,isPulsing:r,className:i})=>vn(En,{$color:t,$isLoading:n,$isPulsing:r,className:i,children:e}),En=yn.span`
54
- padding: 0.125rem 0.5rem;
55
- font-size: 0.75rem;
56
- font-weight: 500;
57
- line-height: 1.125rem; /* 150% */
58
- border-radius: var(--privy-border-radius-sm);
59
-
60
- ${e=>{let t,n;e.$color==="green"&&(t="var(--privy-color-success-dark)",n="var(--privy-color-success-light)"),e.$color==="red"&&(t="var(--privy-color-error)",n="var(--privy-color-error-light)"),e.$color==="gray"&&(t="var(--privy-color-foreground-2)",n="var(--privy-color-background-2)");let r=bn`
61
- from, to {
62
- background-color: ${n};
63
- }
64
-
65
- 50% {
66
- background-color: rgba(${n}, 0.8);
67
- }
68
- `;return rt`
69
- color: ${t};
70
- background-color: ${n};
71
- ${e.$isPulsing&&rt`
72
- animation: ${r} 3s linear infinite;
73
- `};
74
- `}}
75
-
76
- ${ot}
77
- `;import Cn from"styled-components";var st=Cn.div`
78
- display: flex;
79
- flex-direction: column;
80
- `;import wn from"styled-components";var at=wn.span`
81
- text-align: left;
82
- font-size: 0.75rem;
83
- font-weight: 500;
84
- line-height: 1.125rem; /* 150% */
85
-
86
- color: var(--privy-color-error);
87
- `;import An from"styled-components";var lt=An.span`
88
- color: var(--privy-color-foreground-3);
89
- font-size: 0.75rem;
90
- font-weight: 500;
91
- line-height: 1.125rem; /* 150% */
92
- `;import xn from"@heroicons/react/24/outline/Square2StackIcon";import _n from"styled-components";import{jsx as ct,jsxs as Pn}from"react/jsx-runtime";var pt=({address:e,showCopyIcon:t,url:n,className:r})=>n?ct("a",{title:e,className:r,href:`${n}/address/${e}`,target:"_blank",children:Y(e)}):Pn("button",{title:e,className:r,onClick:()=>navigator.clipboard.writeText(e).catch(console.error),children:[Y(e),t&&ct(Sn,{})]}),Sn=_n(xn)`
93
- && {
94
- display: inline;
95
- }
96
- stroke-width: 2;
97
- height: 0.875rem;
98
- width: 0.875rem;
99
- margin-left: 0.125rem;
100
- color: var(--privy-color-foreground-3);
101
- `;import Tn,{css as kn}from"styled-components";var Wn=kn`
102
- && {
103
- border-width: 1px;
104
- padding: 0.5rem 1rem;
105
- }
106
-
107
- width: 100%;
108
- text-align: left;
109
- border: solid 1px var(--privy-color-foreground-4);
110
- border-radius: var(--privy-border-radius-md);
111
- display: flex;
112
- justify-content: space-between;
113
- align-items: center;
114
-
115
- ${e=>e.$state==="error"?"border-color: var(--privy-color-error);":""}
116
- `,ut=Tn.div`
117
- ${Wn}
118
- `;import{Fragment as In,jsx as H,jsxs as Z}from"react/jsx-runtime";var Ks=({errMsg:e,balance:t,address:n,isLoading:r,className:i,title:s,isPulsing:l,showIcon:c,statusColor:a="green"})=>{let p;return a?p=a:e?p="red":p="green",Z(In,{children:[Z(ut,{className:i,$state:e?"error":void 0,children:[Z(st,{children:[H(lt,{children:s||"Pay with"}),H(pt,{address:n,showCopyIcon:c||!!e})]}),t!==void 0&&H(it,{isLoading:r,isPulsing:l,color:p,children:t})]}),e&&H(at,{style:{marginTop:"0.25rem"},children:e})]})};import{BigNumber as On}from"@ethersproject/bignumber";import{formatEther as dt}from"@ethersproject/units";import{QuantityToBigNumber as Un}from"@privy-io/js-sdk-core";var Mn=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:2}),mt=e=>Mn.format(e),Xs=(e,t)=>{let n=mt(t*parseFloat(e));return n!=="$0.00"?n:"<$0.01"},Zs=(e,t)=>{let n=mt(t*parseFloat(dt(e)));return n==="$0.00"?"<$0.01":n},Js=(e,t,n=6,r=!1)=>{let s=parseFloat(dt(e)).toFixed(n).replace(/0+$/,"").replace(/\.$/,"");return r?`${s} ${t}`:`${s==="0"?"<0.001":s} ${t}`},Qs=e=>e.map(Un).reduce((t,n)=>t.add(n),On.from(0)).toHexString(),ea=(e,t)=>{let{chains:n}=Ze(),r=`https://etherscan.io/address/${t}`,i=`${Re(e,n)}/address/${t}`;if(!i)return r;try{new URL(i)}catch{return r}return i};import{jsx as J}from"react/jsx-runtime";var na=({color:e,...t})=>J("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 115.77 122.88",xmlSpace:"preserve",...t,children:J("g",{children:J("path",{fill:e||"currentColor",className:"st0",d:"M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.57,7.33-4.1,9.86c-2.51,2.5-5.98,4.06-9.82,4.07v0.02h-0.02h-61.7H40.1v-0.02 c-3.84-0.01-7.34-1.57-9.86-4.1c-2.5-2.51-4.06-5.98-4.07-9.82h-0.02v-0.02V92.51H13.96h-0.01v-0.02c-3.84-0.01-7.34-1.57-9.86-4.1 c-2.5-2.51-4.06-5.98-4.07-9.82H0v-0.02V13.96v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07V0h0.02h61.7 h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02V13.96L89.62,13.96z M79.04,21.69v-7.73v-0.02h0.02 c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v64.59v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h12.19V35.65 v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07v-0.02h0.02H79.04L79.04,21.69z M105.18,108.92V35.65v-0.02 h0.02c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v73.27v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h61.7h0.02 v0.02c0.91,0,1.75-0.39,2.37-1.01c0.61-0.61,1-1.46,1-2.37h-0.02V108.92L105.18,108.92z"})})});export{Rn as a,Dn as b,Fn as c,Nn as d,E as e,D as f,g,We as h,b as i,Vr as j,Dt as k,Ie as l,Oe as m,Ue as n,Me as o,Zr as p,P as q,ti as r,ni as s,li as t,ci as u,pi as v,Y as w,Nt as x,ui as y,di as z,mi as A,hi as B,fi as C,gi as D,yi as E,bi as F,Ht as G,Ei as H,vi as I,Ci as J,Bn as K,$n as L,Gn as M,Yn as N,zn as O,qn as P,Vn as Q,Xn as R,Zn as S,Jn as T,Qn as U,eo as V,to as W,no as X,oo as Y,ro as Z,io as _,so as $,ao as aa,lo as ba,co as ca,po as da,uo as ea,mo as fa,ho as ga,fo as ha,go as ia,yo as ja,bo as ka,Eo as la,vo as ma,Co as na,Fe as oa,oe as pa,re as qa,ie as ra,se as sa,ae as ta,le as ua,pe as va,ge as wa,L as xa,Ee as ya,ve as za,Ce as Aa,we as Ba,xe as Ca,_e as Da,R as Ea,Cr as Fa,tn as Ga,Gi as Ha,Xe as Ia,Yi as Ja,o as Ka,sn as La,Ze as Ma,I as Na,Te as Oa,Qi as Pa,Tr as Qa,kt as Ra,y as Sa,Wt as Ta,kr as Ua,os as Va,rs as Wa,cn as Xa,ot as Ya,it as Za,ms as _a,hs as $a,Mr as ab,at as bb,pt as cb,Wn as db,ut as eb,Ks as fb,na as gb,Mt as hb,Dr as ib,Xs as jb,Zs as kb,Js as lb,Qs as mb,ea as nb,Kr as ob,Yr as pb};