@dcl/auth-site 4.12.1-23265207440.commit-a5ffaee → 4.13.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.
- package/assets/{ConstantsUtil-M5yW8-jA.js → ConstantsUtil-DVDJ9-59.js} +1 -1
- package/assets/{ContentfulRichText-D5a4a3rf.js → ContentfulRichText-DWKKtbaL.js} +1 -1
- package/assets/{ExchangeController-K4dWpzlN.js → ExchangeController-B3daLrEK.js} +1 -1
- package/assets/{HelpersUtil-DlAzAF4O.js → HelpersUtil-BHAt7p7-.js} +1 -1
- package/assets/{NetworkUtil-BrV4QYNW.js → NetworkUtil-DR6mflW_.js} +1 -1
- package/assets/{SwapController-BhabUlNi.js → SwapController-CilNfc8_.js} +1 -1
- package/assets/{biconomy-DOWm-w-n.js → biconomy-I-I_-viH.js} +1 -1
- package/assets/{browser-Bd7g5QP2.js → browser-D_MxC_xM.js} +1 -1
- package/assets/{ccip-eVPQhOKi.js → ccip-BVm-SJRP.js} +1 -1
- package/assets/{chains-176Xw5JH.js → chains-BjggsxcF.js} +1 -1
- package/assets/{common-Cqs2IA5v.js → common-Cg9enf0K.js} +1 -1
- package/assets/{controller-DyfP9sLB.js → controller-YkSgIit7.js} +2 -2
- package/assets/{data-capture-D5_2fLso.js → data-capture-_0qp1I11.js} +1 -1
- package/assets/{email-DnEShvFk.js → email-BFU4tW-g.js} +1 -1
- package/assets/{embedded-wallet-DYXscQ66.js → embedded-wallet-0YSXlRLN.js} +1 -1
- package/assets/{engine-C-Yz7eXx.js → engine-BQ4cCNig.js} +1 -1
- package/assets/{estimate-l1-fee-XdVvOFs7.js → estimate-l1-fee-Da92HnxG.js} +1 -1
- package/assets/{ethereum-CEHvWqGp.js → ethereum-CSpZIkDL.js} +1 -1
- package/assets/{extractIPFS-D__CSQqh.js → extractIPFS-Dx0Y4SRE.js} +1 -1
- package/assets/{features-CZxuFnoj.js → features-DHcL4BPI.js} +1 -1
- package/assets/{fetchTokenMetadata-CG79NU3-.js → fetchTokenMetadata-DFQmdwU0.js} +1 -1
- package/assets/{fortmatic-DKEABnlX.js → fortmatic-PiPz63cA.js} +1 -1
- package/assets/{get-ecosystem-wallet-info-3-CvIBpv.js → get-ecosystem-wallet-info-7SR8j0n3.js} +1 -1
- package/assets/{getBalance-C-HFrUIb.js → getBalance-B8pR12qo.js} +1 -1
- package/assets/{getInstalledModules-B-y2-Apy.js → getInstalledModules-C3CN3nsq.js} +1 -1
- package/assets/{getNFT-D-SQ3bNw.js → getNFT-CNx90u7Y.js} +2 -2
- package/assets/{getNFT-Cyqa8Plr.js → getNFT-DQ9pTnZz.js} +1 -1
- package/assets/{if-defined-CT5YX5TG.js → if-defined-iZO3hIik.js} +1 -1
- package/assets/{in-app-wallet-calls-C6XORNPV.js → in-app-wallet-calls-DK_8WpWI.js} +1 -1
- package/assets/{index-Bs_xOXhp.js → index-0-Kt-XuY.js} +1 -1
- package/assets/{index-DZqmV02G.js → index-B37hV-1M.js} +1 -1
- package/assets/{index-CL_MAWLe.js → index-BOxoe9iD.js} +1 -1
- package/assets/{index-BjAWPWu_.js → index-BZSJ7SQx.js} +1 -1
- package/assets/{index-DqcaeYJj.js → index-Bd59me9m.js} +1 -1
- package/assets/{index-DF9L3XKL.js → index-BflN8Fol.js} +1 -1
- package/assets/{index-BxsND-28.js → index-BgOYWWqu.js} +1 -1
- package/assets/{index-CgB_tpN6.js → index-BhHkIX9V.js} +1 -1
- package/assets/{index-BcQ2gsv4.js → index-ByDiAiaR.js} +1 -1
- package/assets/{index-CHDNpoUG.js → index-C-EtPQNp.js} +1 -1
- package/assets/{index-I2dplyKh.js → index-C2a-lbUm.js} +1 -1
- package/assets/{index-Dpk5wJEj.js → index-C7L8RvD2.js} +1 -1
- package/assets/{index-Dr-J0hnN.js → index-CCRTp4CS.js} +1 -1
- package/assets/{index-Bc2QoNvn.js → index-CMEPbAeF.js} +1 -1
- package/assets/{index-Cy4E4P8Q.js → index-CTWfmTjn.js} +1 -1
- package/assets/{index-_vzAsYiN.js → index-CZZQ1lyq.js} +1 -1
- package/assets/{index-b_vLmZ-7.js → index-ClM4RDfq.js} +1 -1
- package/assets/{index-DgZlGZQe.js → index-ClRj3W0F.js} +1 -1
- package/assets/{index-D-y6nvNL.js → index-CneAbBkn.js} +1 -1
- package/assets/{index-Dl7pBYho.js → index-Csg1UaG_.js} +1 -1
- package/assets/{index-BkIL5Y4C.js → index-Cu_eih66.js} +1 -1
- package/assets/{index-BaqR43pB.js → index-D1DJwSXv.js} +1 -1
- package/assets/{index-Dp6mOny_.js → index-D5-iUL2o.js} +1 -1
- package/assets/{index-CSo98Cv8.js → index-D9_ZabeD.js} +1 -1
- package/assets/{index-YohvwMrd.js → index-DBXXJ_WR.js} +1 -1
- package/assets/{index-Cve5bLpP.js → index-DDdwpWme.js} +1 -1
- package/assets/{index-NFJCpBUZ.js → index-DKO2Lqk9.js} +1 -1
- package/assets/{index-DBXc8GaK.js → index-DLGhVOZC.js} +1 -1
- package/assets/{index-BBNzpLJg.js → index-DPaCwYzC.js} +1 -1
- package/assets/{index-BJsIuSQS.js → index-DQYdE8eP.js} +4 -4
- package/assets/{index-Cbm6EVpv.js → index-DToUKYEP.js} +1 -1
- package/assets/{index-CxU3SPMY.js → index-DjJo22x7.js} +1 -1
- package/assets/{index-C2ZT7n-h.js → index-Djd4M15b.js} +1 -1
- package/assets/{index-MpTKcH0D.js → index-DmmR5d3o.js} +1 -1
- package/assets/{index-BWLGPCDE.js → index-Dpol20Vd.js} +2 -2
- package/assets/{index-BgyBq7wF.js → index-DthuVNQ1.js} +1 -1
- package/assets/{index-D_BjQmbB.js → index-DwZ8OrHm.js} +1 -1
- package/assets/{index-iqDoByK8.js → index-Dxnh_GgF.js} +1 -1
- package/assets/index-JBb9zsWZ.css +1 -0
- package/assets/{index-CUIi0dE5.js → index-KAbp35d_.js} +1 -1
- package/assets/{index-13DXQnYT.js → index-LKuo9a6w.js} +9 -9
- package/assets/{index-BsGGLSPc.js → index-Sb1wL6e8.js} +1 -1
- package/assets/{index-rFu5MCqn.js → index-Y5nwbQF0.js} +1 -1
- package/assets/{index-S7FdaTA_.js → index-npINf2bx.js} +1 -1
- package/assets/{index.es-dkT2ml83.js → index.es-BKa4G3np.js} +1 -1
- package/assets/{index.es-xpQlHN7l.js → index.es-C1dPuf3P.js} +1 -1
- package/assets/{index.es--3fyxn8y.js → index.es-PznRBg0j.js} +1 -1
- package/assets/{native-DFOEqv-a.js → native-DWDSv76y.js} +1 -1
- package/assets/{networks-BwFuUvvC.js → networks-CKRJjRvO.js} +1 -1
- package/assets/{onramp-D13xKkds.js → onramp-BuKsSlVi.js} +1 -1
- package/assets/{openzeppelin-DrUGNPMN.js → openzeppelin-C54adYNY.js} +1 -1
- package/assets/{ownerOf-DgwIkt-E.js → ownerOf-B8xWJ7sB.js} +1 -1
- package/assets/{parseNft-C0KgiGJ8.js → parseNft-CUnHB6I-.js} +2 -2
- package/assets/{pay-with-exchange-BUoAg3fJ.js → pay-with-exchange-DYs1OZpJ.js} +1 -1
- package/assets/{qr-overlay-JoNyL3_J.js → qr-overlay-CYUCNKUD.js} +3 -3
- package/assets/{receive-BgOG4IS6.js → receive-B99PnNJ_.js} +1 -1
- package/assets/{ref-Bbbt4Rvo.js → ref-HI9jQKHI.js} +1 -1
- package/assets/{resolveImplementation-HLsp9dy1.js → resolveImplementation-PkVc6wz5.js} +1 -1
- package/assets/{secp256k1-xSyt8XU9.js → secp256k1-DjC8XqRH.js} +1 -1
- package/assets/{send-CX8J2Bf6.js → send-D3KodVD_.js} +1 -1
- package/assets/{send-eip712-transaction-C88HGddx.js → send-eip712-transaction-DsSDYKPJ.js} +1 -1
- package/assets/{send-gasless-transaction-CG-T45-r.js → send-gasless-transaction-Bt02CTph.js} +2 -2
- package/assets/{session-proposal-C0kfr8bU.js → session-proposal-CXuSp5a6.js} +1 -1
- package/assets/{session-request-Bl3tqUKv.js → session-request-CqZZHlKp.js} +2 -2
- package/assets/{socials-Be-AypbT.js → socials-B6qFh_y-.js} +1 -1
- package/assets/{swaps-D_E6Q8ug.js → swaps-BHai77zi.js} +1 -1
- package/assets/{thirdweb-B4uPXbkw.js → thirdweb-BqnCxuFo.js} +5 -5
- package/assets/{totalSupply-BttU0uj3.js → totalSupply-CyM0J-JB.js} +1 -1
- package/assets/{transactions-BYQTZN1L.js → transactions-CAYX0Nwv.js} +1 -1
- package/assets/{ui-CSTbCQwk.js → ui-BBwYSKNx.js} +5 -5
- package/assets/{vendor-DahexbvH.js → vendor-DsHXTNqy.js} +1 -1
- package/assets/{w3m-modal-BoUklqWf.js → w3m-modal-hLuyv0Zr.js} +1 -1
- package/assets/{wallets-CZg5vQWs.js → wallets-BXXt9e5T.js} +5 -5
- package/assets/{web-connector-DB6vmoMW.js → web-connector-D9A_ue3s.js} +3 -3
- package/index.html +5 -5
- package/package.json +2 -2
- package/assets/index-BltYrK2m.css +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/in-app-wallet-calls-
|
|
2
|
-
import{ab as p,as as g,s as w,o as q,b as I,f as y,_ as b,at as Q,l as P,P as D,t as F,N as A,F as H,au as k,av as O,aw as J}from"./thirdweb-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/in-app-wallet-calls-DK_8WpWI.js","assets/thirdweb-BqnCxuFo.js","assets/passkeys-C1wTOzLk.js","assets/uint8-array-DZKEMhA1.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{ab as p,as as g,s as w,o as q,b as I,f as y,_ as b,at as Q,l as P,P as D,t as F,N as A,F as H,au as k,av as O,aw as J}from"./thirdweb-BqnCxuFo.js";import{a0 as Y,p as U,a1 as N,a2 as B,a3 as Z,a4 as K,a5 as X,a6 as ee,a7 as te}from"./wallets-BXXt9e5T.js";import"./ui-BBwYSKNx.js";import"./vendor-DsHXTNqy.js";import"./index-LKuo9a6w.js";import"./index.es-C1dPuf3P.js";import"./ethereum-CSpZIkDL.js";const T=new Map,ie={getItem:async i=>T.get(i)??null,removeItem:async i=>{T.delete(i)},setItem:async(i,e)=>{T.set(i,e)}};async function W({authToken:i,client:e,ecosystem:t}){const r=await p(e,t)(`${g("inAppWallet")}/api/2024-05-05/accounts`,{headers:{Authorization:`Bearer embedded-wallet-token:${i}`,"Content-Type":"application/json"},method:"GET"});if(!r.ok){const l=await r.text().catch(()=>"Unknown error");throw new Error(`Failed to get user info: ${l}`)}return await r.json()}const ae=g("inAppWallet"),ne=`${ae}/`,R=`${ne}api/2023-10-20`,re=`${R}/embedded-wallet/validate-custom-jwt`,se=`${R}/embedded-wallet/validate-custom-auth-endpoint`,M=(i,e)=>e instanceof Error?`${i}: ${e.message}`:`${i}: ${w(e)}`;async function oe(i){const t=await p(i.client,i.ecosystem)(se,{body:w({developerClientId:i.client.clientId,payload:i.payload}),headers:{"Content-Type":"application/json"},method:"POST"});if(!t.ok){const a=await t.json();throw new Error(`Custom auth endpoint authentication error: ${a.message}`)}try{const{verifiedToken:a}=await t.json();return{storedToken:a}}catch(a){throw new Error(M("Malformed response from post auth_endpoint authentication",a))}}const z=i=>{if(!Y.includes(i))throw new Error(`Unknown auth option ${i}`);switch(i){case"wallet":return"siwe";default:return i}},v=({authOption:i,client:e,ecosystem:t,mode:a="popup",redirectUrl:r,authFlow:l})=>{if(a==="popup"&&r)throw new Error("Redirect URL is not supported for popup mode");if(a==="window"&&!r)throw new Error("Redirect URL is required for window mode");const c=z(i);let n=`${g("inAppWallet")}/api/2024-05-05/login/${c}?clientId=${e.clientId}`;if(t!=null&&t.partnerId?n=`${n}&ecosystemId=${t.id}&ecosystemPartnerId=${t.partnerId}`:t&&(n=`${n}&ecosystemId=${t.id}`),a!=="popup"){const o=new URL(r||window.location.href);o.searchParams.set("walletId",(t==null?void 0:t.id)||"inApp"),o.searchParams.set("authProvider",i),l&&o.searchParams.set("authFlow",l),n=`${n}&redirectUrl=${encodeURIComponent(o.toString())}`}return n},S=({authOption:i,client:e,ecosystem:t})=>{const a=z(i);let r=`${g("inAppWallet")}/api/2024-05-05/login/${a}/callback?clientId=${e.clientId}`;return t!=null&&t.partnerId?r=`${r}&ecosystemId=${t.id}&ecosystemPartnerId=${t.partnerId}`:t&&(r=`${r}&ecosystemId=${t.id}`),r};async function ce(i){const e=p(i.client,i.ecosystem),t=v({authOption:"backend",client:i.client,ecosystem:i.ecosystem}),a=await e(`${t}`,{body:w({walletSecret:i.walletSecret}),headers:{"Content-Type":"application/json"},method:"POST"});if(!a.ok){const r=await a.text();throw new Error(`Failed to generate backend account: ${r}`)}return await a.json()}async function le(i){let e=await i.storage.getGuestSessionId();e||(e=q(32),i.storage.saveGuestSessionId(e));const t=p(i.client,i.ecosystem),a=S({authOption:"guest",client:i.client,ecosystem:i.ecosystem}),r=await t(`${a}`,{body:w({sessionId:e}),headers:{"Content-Type":"application/json"},method:"POST"});if(!r.ok){const l=await r.text();throw new Error(`Failed to generate guest account: ${r.status} ${r.statusText} ${l}`)}return await r.json()}async function de(i){const t=await p(i.client,i.ecosystem)(re,{body:w({developerClientId:i.client.clientId,jwt:i.jwt}),headers:{"Content-Type":"application/json"},method:"POST"});if(!t.ok){const a=await t.json();throw new Error(`JWT authentication error: ${a.message}`)}try{const{verifiedToken:a}=await t.json();return{storedToken:a}}catch(a){throw new Error(M("Malformed response from post jwt authentication",a))}}function x(){return`${g("inAppWallet")}/api/2024-05-05/login/passkey/callback`}function G(i,e){return`${g("inAppWallet")}/api/2024-05-05/login/passkey?type=${i}${e?`&username=${e}`:""}`}async function ue(i){var d,u,h;if(!i.passkeyClient.isAvailable())throw new Error("Passkeys are not available on this device");const e=p(i.client,i.ecosystem),t=i.username??we(i.ecosystem),r=await(await e(G("sign-up",t))).json();if(!r.challenge)throw new Error("No challenge received");const l=r.challenge,c=await i.passkeyClient.register({challenge:l,name:t,rp:i.rp}),n={};(d=i.ecosystem)!=null&&d.partnerId&&(n["x-ecosystem-partner-id"]=i.ecosystem.partnerId),(u=i.ecosystem)!=null&&u.id&&(n["x-ecosystem-id"]=i.ecosystem.id);const s=await(await e(x(),{body:w({authenticatorData:c.authenticatorData,clientData:c.clientData,credential:{algorithm:c.credential.algorithm,publicKey:c.credential.publicKey},credentialId:c.credentialId,origin:c.origin,rpId:i.rp.id,serverVerificationId:r.serverVerificationId,type:"sign-up",username:t}),headers:{"Content-Type":"application/json",...n},method:"POST"})).json();if(!s||!s.storedToken)throw new Error(`Error verifying passkey: ${s.message??"unknown error"}`);return await((h=i.storage)==null?void 0:h.savePasskeyCredentialId(c.credentialId)),s}async function he(i){var s,d,u,h;if(!i.passkeyClient.isAvailable())throw new Error("Passkeys are not available on this device");const e=p(i.client,i.ecosystem),[t,a]=await Promise.all([e(G("sign-in")).then(f=>f.json()),(s=i.storage)==null?void 0:s.getPasskeyCredentialId()]);if(!t.challenge)throw new Error("No challenge received");const r=t.challenge,l=await i.passkeyClient.authenticate({challenge:r,credentialId:a??void 0,rp:i.rp}),c={};(d=i.ecosystem)!=null&&d.partnerId&&(c["x-ecosystem-partner-id"]=i.ecosystem.partnerId),(u=i.ecosystem)!=null&&u.id&&(c["x-ecosystem-id"]=i.ecosystem.id);const o=await(await e(x(),{body:w({authenticatorData:l.authenticatorData,clientData:l.clientData,credentialId:l.credentialId,origin:l.origin,rpId:i.rp.id,serverVerificationId:t.serverVerificationId,signature:l.signature,type:"sign-in"}),headers:{"Content-Type":"application/json",...c},method:"POST"})).json();if(!o||!o.storedToken)throw new Error(`Error verifying passkey: ${o.message??"unknown error"}`);return await((h=i.storage)==null?void 0:h.savePasskeyCredentialId(l.credentialId)),o}function we(i){return`${(i==null?void 0:i.id)??"wallet"}-${new Date().toISOString()}`}function pe(i){let a=[`${i.domain} wants you to sign in with your Ethereum account:`,i.address].join(`
|
|
3
3
|
`);a=[a,i.statement].join(`
|
|
4
4
|
|
|
5
5
|
`),i.statement&&(a+=`
|
|
6
6
|
`);const r=[];if(i.uri){const d=`URI: ${i.uri}`;r.push(d)}const l=`Version: ${i.version}`;if(r.push(l),i.chain_id){const d=`Chain ID: ${i.chain_id}`||"1";r.push(d)}const c=`Nonce: ${i.nonce}`;r.push(c);const n=`Issued At: ${i.issued_at}`;r.push(n);const o=`Expiration Time: ${i.expiration_time}`;if(r.push(o),i.invalid_before){const d=`Not Before: ${i.invalid_before}`;r.push(d)}i.resources&&r.push(["Resources:",...i.resources.map(d=>`- ${d}`)].join(`
|
|
7
7
|
`));const s=r.join(`
|
|
8
8
|
`);return[a,s].join(`
|
|
9
|
-
`)}async function ge(i){const{payload:e,account:t}=i,a=await t.signMessage({message:pe(e)});return{payload:e,signature:a}}const me=["xyz.abs"];async function fe(i){const{wallet:e,client:t,ecosystem:a,chain:r}=i,l=me.includes(e.id)?r||I(1):I(1),c=e.getAccount()||await e.connect({chain:l,client:t}),n=p(t,a),o=await(async()=>{const u=v({authOption:"wallet",client:i.client,ecosystem:i.ecosystem}),h=await n(`${u}&address=${c.address}&chainId=${l.id}`);if(!h.ok)throw new Error("Failed to generate SIWE login payload");return await h.json()})(),{signature:s}=await ge({account:c,payload:o});return await(async()=>{const u=S({authOption:"wallet",client:i.client,ecosystem:i.ecosystem}),h=await n(`${u}&signature=${s}&payload=${encodeURIComponent(o)}`,{body:w({payload:o,signature:s}),headers:{"Content-Type":"application/json"},method:"POST"});if(!h.ok)throw new Error("Failed to verify SIWE signature");return await h.json()})()}async function ye({client:i,payload:e,storage:t}){const a=await t.getAuthCookie(),r=t.ecosystem,l=p(i,r);if(!a)throw new Error("No auth token found when signing message");const c={address:e.address,chainId:e.chainId,nonce:Number(e.nonce)},n=await l(`${g("inAppWallet")}/api/v1/enclave-wallet/sign-authorization`,{body:w(c),headers:{Authorization:`Bearer embedded-wallet-token:${a}`,"Content-Type":"application/json","x-thirdweb-client-id":i.clientId},method:"POST"});if(!n.ok)throw new Error(`Failed to sign message - ${n.status} ${n.statusText}`);return await n.json()}async function be({client:i,payload:{message:e,isRaw:t,originalMessage:a,chainId:r},storage:l}){const c=await l.getAuthCookie(),n=l.ecosystem,o=p(i,n);if(!c)throw new Error("No auth token found when signing message");const s=await o(`${g("inAppWallet")}/api/v1/enclave-wallet/sign-message`,{body:w({messagePayload:{chainId:r,isRaw:t,message:e,originalMessage:a}}),headers:{Authorization:`Bearer embedded-wallet-token:${c}`,"Content-Type":"application/json","x-thirdweb-client-id":i.clientId},method:"POST"});if(!s.ok)throw new Error(`Failed to sign message - ${s.status} ${s.statusText}`);return await s.json()}async function Ie({client:i,payload:e,storage:t}){const a=await t.getAuthCookie(),r=t.ecosystem,l=p(i,r);if(!a)throw new Error("No auth token found when signing transaction");const c=await l(`${g("inAppWallet")}/api/v1/enclave-wallet/sign-transaction`,{body:w({transactionPayload:e}),headers:{Authorization:`Bearer embedded-wallet-token:${a}`,"Content-Type":"application/json","x-thirdweb-client-id":i.clientId},method:"POST"});if(!c.ok)throw new Error(`Failed to sign transaction - ${c.status} ${c.statusText}`);return(await c.json()).signature}async function ve({client:i,payload:e,storage:t}){const a=await t.getAuthCookie(),r=t.ecosystem,l=p(i,r);if(!a)throw new Error("No auth token found when signing typed data");const c=await l(`${g("inAppWallet")}/api/v1/enclave-wallet/sign-typed-data`,{body:w({...e}),headers:{Authorization:`Bearer embedded-wallet-token:${a}`,"Content-Type":"application/json","x-thirdweb-client-id":i.clientId},method:"POST"});if(!c.ok)throw new Error(`Failed to sign typed data - ${c.status} ${c.statusText}`);return await c.json()}class ke{constructor({client:e,ecosystem:t,address:a,storage:r}){Object.defineProperty(this,"client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ecosystem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"address",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"localStorage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.client=e,this.ecosystem=t,this.address=a,this.localStorage=r}async postWalletSetUp(e){await this.localStorage.saveAuthCookie(e.storedToken.cookieString)}async getUserWalletStatus(){var l,c;const e=await this.localStorage.getAuthCookie();if(!e)return{status:"Logged Out"};const t=await W({authToken:e,client:this.client,ecosystem:this.ecosystem});if(!t)return{status:"Logged Out"};const a=t.wallets[0],r={email:(l=t.linkedAccounts.find(n=>n.details.email!==void 0))==null?void 0:l.details.email,phoneNumber:(c=t.linkedAccounts.find(n=>n.details.phone!==void 0))==null?void 0:c.details.phone,recoveryShareManagement:"ENCLAVE",userWalletId:t.id||""};return a?{account:await this.getAccount(),authDetails:r,status:"Logged In, Wallet Initialized",walletAddress:a.address}:{authDetails:r,status:"Logged In, Wallet Uninitialized"}}async getAccount(){const e=this.client,t=this.localStorage,a=this.address,r=this.ecosystem,l=async n=>{const o=P({chain:I(n.chainId),client:e}),s={chainId:A(n.chainId),data:n.data,gas:m(n.gas),nonce:m(n.nonce)||A(await b(async()=>{const{eth_getTransactionCount:d}=await import("./thirdweb-B4uPXbkw.js").then(u=>u.ck);return{eth_getTransactionCount:d}},[]).then(({eth_getTransactionCount:d})=>d(o,{address:y(this.address),blockTag:"pending"}))),to:n.to?y(n.to):void 0,value:m(n.value)};return n.authorizationList&&n.authorizationList.length>0?(s.type=4,s.authorizationList=n.authorizationList,s.maxFeePerGas=m(n.maxFeePerGas),s.maxPriorityFeePerGas=m(n.maxPriorityFeePerGas)):m(n.maxFeePerGas)?(s.maxFeePerGas=m(n.maxFeePerGas),s.maxPriorityFeePerGas=m(n.maxPriorityFeePerGas),s.type=2):(s.gasPrice=m(n.gasPrice),s.type=0),Ie({client:e,payload:s,storage:t})},c={address:y(a),async sendTransaction(n){const o=P({chain:I(n.chainId),client:e}),s=await l(n),d=await D(o,s);return F({chainId:n.chainId,client:e,contractAddress:n.to??void 0,ecosystem:r,gasPrice:n.gasPrice,transactionHash:d,walletAddress:a,walletType:"inApp"}),{transactionHash:d}},async signAuthorization(n){const o=await ye({client:e,payload:n,storage:t});return{address:y(o.address),chainId:Number.parseInt(o.chainId),nonce:BigInt(o.nonce),r:BigInt(o.r),s:BigInt(o.s),yParity:Number.parseInt(o.yParity)}},async signMessage({message:n,originalMessage:o,chainId:s}){const d=typeof n=="string"?{chainId:s,isRaw:!1,message:n,originalMessage:o}:{chainId:s,isRaw:!0,message:typeof n.raw=="string"?n.raw:Q(n.raw),originalMessage:o},{signature:u}=await be({client:e,payload:d,storage:t});return u},async signTransaction(n){if(!n.chainId)throw new Error("chainId required in tx to sign");return l({chainId:n.chainId,...n})},async signTypedData(n){const o=U(n),{signature:s}=await ve({client:e,payload:o,storage:t});return s},sendCalls:async n=>{const{inAppWalletSendCalls:o}=await b(async()=>{const{inAppWalletSendCalls:f}=await import("./in-app-wallet-calls-C6XORNPV.js");return{inAppWalletSendCalls:f}},__vite__mapDeps([0,1])),s=n.calls[0];if(!s)throw new Error("No calls to send");const d=s.client,u=s.chain||n.chain,h=await o({account:c,calls:n.calls,chain:u});return{chain:u,client:d,id:h}},getCallsStatus:async n=>{const{inAppWalletGetCallsStatus:o}=await b(async()=>{const{inAppWalletGetCallsStatus:s}=await import("./in-app-wallet-calls-C6XORNPV.js");return{inAppWalletGetCallsStatus:s}},__vite__mapDeps([0,1]));return o(n)},getCallsStatusRaw:async n=>{const{inAppWalletGetCallsStatusRaw:o}=await b(async()=>{const{inAppWalletGetCallsStatusRaw:s}=await import("./in-app-wallet-calls-C6XORNPV.js");return{inAppWalletGetCallsStatusRaw:s}},__vite__mapDeps([0,1]));return o(n)},getCapabilities:async n=>({[n.chainId??1]:{atomic:{status:"unsupported"},paymasterService:{supported:!1}}})};return c}}function m(i){return i===void 0||H(i)?i:A(i)}const Te={backgroundColor:"transparent",border:"none",colorScheme:"light",display:"none",height:"100%",pointerEvents:"all",position:"fixed",right:"0px",top:"0px",width:"100%",zIndex:"2147483646"},L=new Map;class Le{constructor({link:e,baseUrl:t,iframeId:a,container:r,onIframeInitialize:l,localStorage:c,clientId:n,ecosystem:o}){if(Object.defineProperty(this,"iframe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"POLLING_INTERVAL_SECONDS",{enumerable:!0,configurable:!0,writable:!0,value:1.4}),Object.defineProperty(this,"iframeBaseUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"localStorage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ecosystem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.localStorage=c,this.clientId=n,this.ecosystem=o,this.iframeBaseUrl=t,typeof document>"u")return;r=r??document.body;let s=document.getElementById(a);const d=new URL(e);if(!s||s.src!==d.href){s=document.createElement("iframe");const u={...Te};Object.assign(s.style,u),s.setAttribute("id",a),s.setAttribute("fetchpriority","high"),r.appendChild(s),s.src=d.href;const h=f=>{if(f.data.eventType==="ewsIframeLoaded"){if(window.removeEventListener("message",h),!s){console.warn("thirdweb iFrame not found");return}this.onIframeLoadHandler(s,l)()}};window.addEventListener("message",h)}this.iframe=s}async onIframeLoadedInitVariables(){var e,t;return{authCookie:await this.localStorage.getAuthCookie(),clientId:this.clientId,deviceShareStored:await this.localStorage.getDeviceShare(),ecosystemId:(e=this.ecosystem)==null?void 0:e.id,partnerId:(t=this.ecosystem)==null?void 0:t.partnerId,walletUserId:await this.localStorage.getWalletUserId()}}onIframeLoadHandler(e,t){return async()=>{var l;const a=new MessageChannel,r=new Promise((c,n)=>{a.port1.onmessage=o=>{const{data:s}=o;a.port1.close(),s.success||n(new Error(s.error)),L.set(e.src,!0),t&&t(),c(!0)}});(l=e==null?void 0:e.contentWindow)==null||l.postMessage({data:await this.onIframeLoadedInitVariables(),eventType:"initIframe"},this.iframeBaseUrl,[a.port2]),await r}}async call({procedureName:e,params:t,showIframe:a=!1}){var c;if(!this.iframe)throw new Error("Iframe not found. You are likely calling this from the backend where the DOM is not available.");for(;!L.get(this.iframe.src);)await k(this.POLLING_INTERVAL_SECONDS*1e3);a&&(this.iframe.style.display="block",await k(.005*1e3));const r=new MessageChannel,l=new Promise((n,o)=>{r.port1.onmessage=async s=>{const{data:d}=s;r.port1.close(),a&&(await k(.1*1e3),this.iframe&&(this.iframe.style.display="none")),d.success?n(d.data):o(new Error(d.error))}});return(c=this.iframe.contentWindow)==null||c.postMessage({data:{...t,...await this.onIframeLoadedInitVariables()},eventType:e},this.iframeBaseUrl,[r.port2]),l}destroy(){this.iframe&&L.delete(this.iframe.src)}}class Pe extends Le{constructor({clientId:e,baseUrl:t,ecosystem:a}){super({baseUrl:t,clientId:e,container:typeof document>"u"?void 0:document.body,ecosystem:a,iframeId:We+((a==null?void 0:a.id)||""),link:Ae({baseUrl:t,clientId:e,ecosystem:a,path:Z}).href,localStorage:new N({clientId:e,ecosystem:a,storage:B})}),this.clientId=e,this.ecosystem=a}}function Ae({clientId:i,baseUrl:e,path:t,ecosystem:a,queryParams:r}){var c;const l=new URL(`${t}`,e);if(r)for(const n of Object.keys(r))l.searchParams.set(n,((c=r[n])==null?void 0:c.toString())||"");return l.searchParams.set("clientId",i),(a==null?void 0:a.partnerId)!==void 0&&l.searchParams.set("partnerId",a.partnerId),(a==null?void 0:a.id)!==void 0&&l.searchParams.set("ecosystemId",a.id),l}const We="thirdweb-in-app-wallet-iframe";async function Se({client:i,ecosystem:e,authToken:t}){const r=await p(i,e)(`${g("inAppWallet")}/api/v1/enclave-wallet/generate`,{headers:{Authorization:`Bearer embedded-wallet-token:${t}`,"Content-Type":"application/json","x-thirdweb-client-id":i.clientId},method:"POST"});if(!r.ok)throw new Error(`Failed to generate wallet - ${r.status} ${r.statusText}`);const{wallet:l}=await r.json();return l}class Ee{constructor({baseUrl:e,querier:t,preLogin:a,postLogin:r,client:l,ecosystem:c}){Object.defineProperty(this,"LoginQuerier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"preLogin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"postLogin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"baseUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ecosystem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.baseUrl=e,this.LoginQuerier=t,this.preLogin=a,this.postLogin=r,this.client=l,this.ecosystem=c}async sendEmailLoginOtp({email:e}){return await this.LoginQuerier.call({params:{email:e},procedureName:"sendThirdwebEmailLoginOtp"})}async sendSmsLoginOtp({phoneNumber:e}){return await this.LoginQuerier.call({params:{phoneNumber:e},procedureName:"sendThirdwebSmsLoginOtp"})}}class Oe extends Ee{async authenticateWithModal(){return this.LoginQuerier.call({params:void 0,procedureName:"loginWithThirdwebModal",showIframe:!0})}async loginWithModal(){await this.preLogin();const e=await this.authenticateWithModal();return this.postLogin(e)}async authenticateWithIframe({email:e}){return this.LoginQuerier.call({params:{email:e},procedureName:"loginWithThirdwebModal",showIframe:!0})}async loginWithIframe({email:e}){await this.preLogin();const t=await this.authenticateWithIframe({email:e});return this.postLogin(t)}async authenticateWithCustomJwt({encryptionKey:e,jwt:t}){if(!e||e.length===0)throw new Error("Encryption key is required for custom jwt auth");return this.LoginQuerier.call({params:{encryptionKey:e,jwt:t},procedureName:"loginWithCustomJwt"})}async loginWithCustomJwt({encryptionKey:e,jwt:t}){if(!e||e.length===0)throw new Error("Encryption key is required for custom jwt auth");await this.preLogin();const a=await this.authenticateWithCustomJwt({encryptionKey:e,jwt:t});return this.postLogin(a)}async authenticateWithCustomAuthEndpoint({encryptionKey:e,payload:t}){return this.LoginQuerier.call({params:{encryptionKey:e,payload:t},procedureName:"loginWithCustomAuthEndpoint"})}async loginWithCustomAuthEndpoint({encryptionKey:e,payload:t}){if(!e||e.length===0)throw new Error("Encryption key is required for custom auth");await this.preLogin();const a=await this.authenticateWithCustomAuthEndpoint({encryptionKey:e,payload:t});return this.postLogin(a)}async authenticateWithEmailOtp({email:e,otp:t,recoveryCode:a}){return this.LoginQuerier.call({params:{email:e,otp:t,recoveryCode:a},procedureName:"verifyThirdwebEmailLoginOtp"})}async loginWithEmailOtp({email:e,otp:t,recoveryCode:a}){const r=await this.authenticateWithEmailOtp({email:e,otp:t,recoveryCode:a});return this.postLogin(r)}async authenticateWithSmsOtp({phoneNumber:e,otp:t,recoveryCode:a}){return this.LoginQuerier.call({params:{otp:t,phoneNumber:e,recoveryCode:a},procedureName:"verifyThirdwebSmsLoginOtp"})}async loginWithSmsOtp({phoneNumber:e,otp:t,recoveryCode:a}){const r=await this.authenticateWithSmsOtp({otp:t,phoneNumber:e,recoveryCode:a});return this.postLogin(r)}}class Ce{constructor({client:e,querier:t,onAuthSuccess:a,ecosystem:r,baseUrl:l,localStorage:c}){Object.defineProperty(this,"client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ecosystem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"AuthQuerier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"localStorage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"onAuthSuccess",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"BaseLogin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.client=e,this.ecosystem=r,this.AuthQuerier=t,this.localStorage=c,this.onAuthSuccess=a,this.BaseLogin=new Oe({baseUrl:l,client:e,ecosystem:r,postLogin:async n=>this.postLogin(n),preLogin:async()=>{await this.preLogin()},querier:t})}async preLogin(){await this.logout()}async postLogin({storedToken:e,walletDetails:t}){return e.shouldStoreCookieString&&await this.localStorage.saveAuthCookie(e.cookieString),await this.onAuthSuccess({storedToken:e,walletDetails:t})}async loginWithAuthToken(e,t){var l;e.storedToken.authProvider!=="Backend"&&await this.preLogin();const a=await W({authToken:e.storedToken.cookieString,client:this.client,ecosystem:this.ecosystem});if(!a)throw new Error("Cannot login, no user found for auth token");if(a.wallets.length>0&&((l=a.wallets[0])==null?void 0:l.type)==="enclave")return this.postLogin({storedToken:e.storedToken,walletDetails:{walletAddress:a.wallets[0].address}});if(a.wallets.length===0){const c=await Se({authToken:e.storedToken.cookieString,client:this.client,ecosystem:this.ecosystem});return this.postLogin({storedToken:e.storedToken,walletDetails:{walletAddress:c.address}})}const r=await this.AuthQuerier.call({params:{recoveryCode:t,storedToken:e.storedToken},procedureName:"loginWithStoredTokenDetails"});return this.postLogin(r)}async loginWithModal(){return this.BaseLogin.loginWithModal()}async authenticateWithModal(){return this.BaseLogin.authenticateWithModal()}async loginWithIframe(e){return this.BaseLogin.loginWithIframe(e)}async authenticateWithIframe(e){return this.BaseLogin.authenticateWithIframe(e)}async loginWithCustomJwt(e){return this.BaseLogin.loginWithCustomJwt(e)}async authenticateWithCustomJwt(e){return this.BaseLogin.authenticateWithCustomJwt(e)}async loginWithCustomAuthEndpoint(e){return this.BaseLogin.loginWithCustomAuthEndpoint(e)}async authenticateWithCustomAuthEndpoint(e){return this.BaseLogin.authenticateWithCustomAuthEndpoint(e)}async sendEmailLoginOtp({email:e}){return this.BaseLogin.sendEmailLoginOtp({email:e})}async sendSmsLoginOtp({phoneNumber:e}){return this.BaseLogin.sendSmsLoginOtp({phoneNumber:e})}async loginWithEmailOtp(e){return await this.preLogin(),this.BaseLogin.loginWithEmailOtp(e)}async authenticateWithEmailOtp(e){return this.BaseLogin.authenticateWithEmailOtp(e)}async loginWithSmsOtp(e){return await this.preLogin(),this.BaseLogin.loginWithSmsOtp(e)}async authenticateWithSmsOtp(e){return this.BaseLogin.authenticateWithSmsOtp(e)}async logout(){const e=await this.localStorage.removeAuthCookie(),t=await this.localStorage.removeWalletUserId();return{success:e||t}}}const $e="width=350, height=500",C=({isWindowOpenedByFn:i,win:e,closeOpenedWindow:t})=>{i?e==null||e.close():e&&t?t(e):e&&e.close()};async function $(i){const e=v({...i,mode:i.mode||"redirect",authFlow:i.authFlow});i.mode==="redirect"?window.location.href=e:window.open(e),await new Promise(t=>setTimeout(t,5e3))}const je=async i=>{let e=i.openedWindow,t=!1;if(e||(e=window.open(v({...i,mode:"popup"}),`Login to ${i.authOption}`,$e),t=!0),!e)throw new Error("Something went wrong opening pop-up");return await new Promise((r,l)=>{const c=window.setInterval(async()=>{e.closed&&(clearInterval(c),window.removeEventListener("message",n),l(new Error("User closed login window")))},1e3),n=async o=>{if(o.origin===g("inAppWallet")){if(typeof o.data!="object"){l(new Error("Invalid event data"));return}switch(o.data.eventType){case"oauthSuccessResult":{window.removeEventListener("message",n),clearInterval(c),C({closeOpenedWindow:i.closeOpenedWindow,isWindowOpenedByFn:t,win:e}),o.data.authResult&&r(o.data.authResult);break}case"oauthFailureResult":{window.removeEventListener("message",n),clearInterval(c),C({closeOpenedWindow:i.closeOpenedWindow,isWindowOpenedByFn:t,win:e}),l(new Error(o.data.errorString));break}}}};window.addEventListener("message",n)})},_e=async i=>{const{client:e,ecosystem:t}=i,a=v({authOption:i.strategy,client:e,ecosystem:t}),r={"Content-Type":"application/json","x-client-id":e.clientId};t!=null&&t.id&&(r["x-ecosystem-id"]=t.id),t!=null&&t.partnerId&&(r["x-ecosystem-partner-id"]=t.partnerId);const l=(()=>{switch(i.strategy){case"email":return{email:i.email};case"phone":return{phone:i.phoneNumber}}})(),c=await fetch(a,{body:w(l),headers:r,method:"POST"});if(!c.ok){const n=await c.text();let o;try{const s=JSON.parse(n);s&&typeof s.message=="string"&&(o=s.message)}catch{}throw new Error(o||"Failed to send verification code")}return await c.json()},j=async i=>{const{client:e,ecosystem:t}=i,a=S({authOption:i.strategy,client:i.client,ecosystem:i.ecosystem}),r={"Content-Type":"application/json","x-client-id":e.clientId};t!=null&&t.id&&(r["x-ecosystem-id"]=t.id),t!=null&&t.partnerId&&(r["x-ecosystem-partner-id"]=t.partnerId);const l=(()=>{switch(i.strategy){case"email":return{code:i.verificationCode,email:i.email};case"phone":return{code:i.verificationCode,phone:i.phoneNumber}}})(),c=await fetch(a,{body:w(l),headers:r,method:"POST"});if(!c.ok)throw new Error("Failed to verify verification code");return await c.json()};class _{constructor({client:e,ecosystem:t,querier:a,localStorage:r}){Object.defineProperty(this,"client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ecosystem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"walletManagerQuerier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"localStorage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.client=e,this.ecosystem=t,this.walletManagerQuerier=a,this.localStorage=r}async postWalletSetUp(e){e.deviceShareStored&&await this.localStorage.saveDeviceShare(e.deviceShareStored,e.storedToken.authDetails.userWalletId)}async getUserWalletStatus(){const e=await this.walletManagerQuerier.call({params:void 0,procedureName:"getUserStatus"});return e.status==="Logged In, Wallet Initialized"?{status:"Logged In, Wallet Initialized",...e.user,account:await this.getAccount()}:e.status==="Logged In, New Device"?{status:"Logged In, New Device",...e.user}:e.status==="Logged In, Wallet Uninitialized"?{status:"Logged In, Wallet Uninitialized",...e.user}:{status:e.status}}async getAccount(){var c;const e=this.walletManagerQuerier,t=this.client,a=(c=this.ecosystem)==null?void 0:c.partnerId,{address:r}=await e.call({params:void 0,procedureName:"getAddress"}),l=async n=>{const o={chainId:n.chainId,data:n.data,gasLimit:n.gas,nonce:n.nonce,to:n.to??void 0,value:n.value};n.maxFeePerGas?(o.accessList=n.accessList,o.maxFeePerGas=n.maxFeePerGas,o.maxPriorityFeePerGas=n.maxPriorityFeePerGas,o.type=2):(o.gasPrice=n.gasPrice,o.type=0);const s=O().rpc,{signedTransaction:d}=await e.call({params:{chainId:n.chainId,partnerId:a,rpcEndpoint:`https://${n.chainId}.${s}`,transaction:o},procedureName:"signTransaction"});return d};return{address:y(r),async sendTransaction(n){const o=P({chain:I(n.chainId),client:t}),s=await l(n),d=await D(o,s);return F({chainId:n.chainId,client:t,contractAddress:n.to??void 0,gasPrice:n.gasPrice,transactionHash:d,walletAddress:r,walletType:"inApp"}),{transactionHash:d}},async signMessage({message:n}){const o=typeof n=="string"?n:n.raw instanceof Uint8Array?n.raw:J(n.raw),{signedMessage:s}=await e.call({params:{chainId:1,message:o,partnerId:a},procedureName:"signMessage"});return s},async signTransaction(n){if(!n.chainId)throw new Error("chainId required in tx to sign");return l({...n,chainId:n.chainId})},async signTypedData(n){var E;const o=U(n);(E=o.types)!=null&&E.EIP712Domain&&(o.types.EIP712Domain=void 0);const s=o.domain,d=s==null?void 0:s.chainId,h={...s!=null&&s.verifyingContract?{verifyingContract:s==null?void 0:s.verifyingContract}:{},name:s==null?void 0:s.name,version:s==null?void 0:s.version};d&&(h.chainId=d);const f=O().rpc,{signedTypedData:V}=await e.call({params:{chainId:Number.parseInt(BigInt(d||1).toString()),domain:h,message:o.message,partnerId:a,rpcEndpoint:`https://${d}.${f}`,types:o.types},procedureName:"signTypedDataV4"});return V}}}}class Ge{isClientIdLegacyPaper(e){return e.indexOf("-")>0&&e.length===36}constructor({client:e,onAuthSuccess:t,ecosystem:a,passkeyDomain:r,storage:l}){if(Object.defineProperty(this,"client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ecosystem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"querier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"storage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"wallet",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"auth",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"passkeyDomain",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.isClientIdLegacyPaper(e.clientId))throw new Error("You are using a legacy clientId. Please use the clientId found on the thirdweb dashboard settings page");const c=g("inAppWallet");this.client=e,this.ecosystem=a,this.passkeyDomain=r,this.storage=new N({clientId:e.clientId,ecosystem:a,storage:l??Fe()}),this.querier=new Pe({baseUrl:c,clientId:e.clientId,ecosystem:a}),this.auth=new Ce({baseUrl:c,client:e,ecosystem:a,localStorage:this.storage,onAuthSuccess:async n=>{if(t==null||t(n),n.storedToken.authDetails.walletType==="sharded"&&(await this.querier.call({params:{storedToken:n.storedToken},procedureName:"migrateFromShardToEnclave"})||console.warn("Failed to migrate from sharded to enclave wallet, continuing with sharded wallet")),this.wallet=await this.initializeWallet(n.storedToken.cookieString),!this.wallet)throw new Error("Failed to initialize wallet");const o="deviceShareStored"in n.walletDetails?n.walletDetails.deviceShareStored:void 0;return await this.wallet.postWalletSetUp({deviceShareStored:o,storedToken:n.storedToken}),this.wallet instanceof _&&await this.querier.call({params:{authCookie:n.storedToken.cookieString,clientId:this.client.clientId,deviceShareStored:"deviceShareStored"in n.walletDetails?n.walletDetails.deviceShareStored:null,ecosystemId:a==null?void 0:a.id,partnerId:a==null?void 0:a.partnerId,walletUserId:n.storedToken.authDetails.userWalletId},procedureName:"initIframe"}),{user:{account:await this.wallet.getAccount(),authDetails:n.storedToken.authDetails,status:"Logged In, Wallet Initialized",walletAddress:n.walletDetails.walletAddress}}},querier:this.querier})}async initializeWallet(e){var r;const t=await this.storage.getAuthCookie();if(!e&&t===null)throw new Error("No auth token provided and no stored auth token found to initialize the wallet");const a=await W({authToken:e||t,client:this.client,ecosystem:this.ecosystem});if(!a)throw new Error("Cannot initialize wallet, no user logged in");if(a.wallets.length===0)throw new Error("Cannot initialize wallet, this user does not have a wallet generated yet");return((r=a.wallets[0])==null?void 0:r.type)==="enclave"?new ke({address:a.wallets[0].address,client:this.client,ecosystem:this.ecosystem,storage:this.storage}):new _({client:this.client,ecosystem:this.ecosystem,localStorage:this.storage,querier:this.querier})}async getUser(){if(!this.wallet){const e=await this.storage.getAuthCookie();if(!e)return{status:"Logged Out"};this.wallet=await this.initializeWallet(e)}if(!this.wallet)throw new Error("Wallet not initialized");return await this.wallet.getUserWalletStatus()}getAccount(){if(!this.wallet)throw new Error("Wallet not initialized");return this.wallet.getAccount()}async preAuthenticate(e){return _e({...e,client:this.client,ecosystem:this.ecosystem})}async authenticateWithRedirect(e,t,a){return $({authOption:e,client:this.client,ecosystem:this.ecosystem,mode:t,redirectUrl:a})}async loginWithAuthToken(e,t){return this.auth.loginWithAuthToken(e,t)}async authenticate(e){const t=e.strategy;switch(t){case"email":return j({...e,client:this.client,ecosystem:this.ecosystem});case"phone":return j({...e,client:this.client,ecosystem:this.ecosystem});case"auth_endpoint":return oe({client:this.client,ecosystem:this.ecosystem,payload:e.payload});case"jwt":return de({client:this.client,ecosystem:this.ecosystem,jwt:e.jwt});case"passkey":return this.passkeyAuth(e);case"iframe_email_verification":return this.auth.authenticateWithIframe({email:e.email});case"iframe":return this.auth.authenticateWithModal();case"apple":case"facebook":case"google":case"telegram":case"github":case"twitch":case"farcaster":case"line":case"x":case"tiktok":case"epic":case"steam":case"coinbase":case"discord":return je({authOption:t,client:this.client,closeOpenedWindow:e.closeOpenedWindow,ecosystem:this.ecosystem,openedWindow:e.openedWindow});case"guest":return le({client:this.client,ecosystem:this.ecosystem,storage:this.storage});case"backend":return ce({client:this.client,ecosystem:this.ecosystem,walletSecret:e.walletSecret});case"wallet":return fe({client:this.client,ecosystem:this.ecosystem,wallet:e.wallet,chain:e.chain})}}async connect(e){const t=e.strategy;switch(t){case"auth_endpoint":case"jwt":{const a=await this.authenticate(e);return await this.loginWithAuthToken(a,e.encryptionKey)}case"iframe_email_verification":return this.auth.loginWithIframe({email:e.email});case"iframe":return this.auth.loginWithModal();case"passkey":{const a=await this.passkeyAuth(e);return this.loginWithAuthToken(a)}case"backend":case"phone":case"email":case"wallet":case"apple":case"facebook":case"google":case"farcaster":case"telegram":case"github":case"line":case"x":case"tiktok":case"epic":case"guest":case"coinbase":case"twitch":case"steam":case"discord":{const a=await this.authenticate(e);return await this.auth.loginWithAuthToken(a)}default:De(t)}}async logout(){return await this.auth.logout()}async passkeyAuth(e){const{PasskeyWebClient:t}=await b(async()=>{const{PasskeyWebClient:n}=await import("./passkeys-C1wTOzLk.js");return{PasskeyWebClient:n}},__vite__mapDeps([2,3])),{passkeyName:a,storeLastUsedPasskey:r=!0}=e,l=new t,c=this.storage;return e.type==="sign-up"?ue({client:this.client,ecosystem:this.ecosystem,passkeyClient:l,rp:{id:this.passkeyDomain??window.location.hostname,name:this.passkeyDomain??window.document.title},storage:r?c:void 0,username:a}):he({client:this.client,ecosystem:this.ecosystem,passkeyClient:l,rp:{id:this.passkeyDomain??window.location.hostname,name:this.passkeyDomain??window.document.title},storage:r?c:void 0})}async linkProfileWithRedirect(e,t,a){return $({authOption:e,client:this.client,ecosystem:this.ecosystem,mode:t,redirectUrl:a,authFlow:"link"})}async linkProfile(e){if("strategy"in e&&K.includes(e.strategy)&&"mode"in e&&e.mode!=="popup"&&e.mode!==void 0)return await this.linkProfileWithRedirect(e.strategy,e.mode,"redirectUrl"in e?e.redirectUrl:void 0),[];const{storedToken:t}=await this.authenticate(e);return await X({client:e.client,ecosystem:e.ecosystem||this.ecosystem,storage:this.storage,tokenToLink:t.cookieString})}async unlinkProfile(e,t){return await ee({allowAccountDeletion:t,client:this.client,ecosystem:this.ecosystem,profileToUnlink:e,storage:this.storage})}async getProfiles(){return te({client:this.client,ecosystem:this.ecosystem,storage:this.storage})}}function De(i,e){throw new Error(`Invalid param: ${i}`)}function Fe(){return typeof window<"u"&&window.localStorage?B:ie}export{Ge as InAppWebConnector};
|
|
9
|
+
`)}async function ge(i){const{payload:e,account:t}=i,a=await t.signMessage({message:pe(e)});return{payload:e,signature:a}}const me=["xyz.abs"];async function fe(i){const{wallet:e,client:t,ecosystem:a,chain:r}=i,l=me.includes(e.id)?r||I(1):I(1),c=e.getAccount()||await e.connect({chain:l,client:t}),n=p(t,a),o=await(async()=>{const u=v({authOption:"wallet",client:i.client,ecosystem:i.ecosystem}),h=await n(`${u}&address=${c.address}&chainId=${l.id}`);if(!h.ok)throw new Error("Failed to generate SIWE login payload");return await h.json()})(),{signature:s}=await ge({account:c,payload:o});return await(async()=>{const u=S({authOption:"wallet",client:i.client,ecosystem:i.ecosystem}),h=await n(`${u}&signature=${s}&payload=${encodeURIComponent(o)}`,{body:w({payload:o,signature:s}),headers:{"Content-Type":"application/json"},method:"POST"});if(!h.ok)throw new Error("Failed to verify SIWE signature");return await h.json()})()}async function ye({client:i,payload:e,storage:t}){const a=await t.getAuthCookie(),r=t.ecosystem,l=p(i,r);if(!a)throw new Error("No auth token found when signing message");const c={address:e.address,chainId:e.chainId,nonce:Number(e.nonce)},n=await l(`${g("inAppWallet")}/api/v1/enclave-wallet/sign-authorization`,{body:w(c),headers:{Authorization:`Bearer embedded-wallet-token:${a}`,"Content-Type":"application/json","x-thirdweb-client-id":i.clientId},method:"POST"});if(!n.ok)throw new Error(`Failed to sign message - ${n.status} ${n.statusText}`);return await n.json()}async function be({client:i,payload:{message:e,isRaw:t,originalMessage:a,chainId:r},storage:l}){const c=await l.getAuthCookie(),n=l.ecosystem,o=p(i,n);if(!c)throw new Error("No auth token found when signing message");const s=await o(`${g("inAppWallet")}/api/v1/enclave-wallet/sign-message`,{body:w({messagePayload:{chainId:r,isRaw:t,message:e,originalMessage:a}}),headers:{Authorization:`Bearer embedded-wallet-token:${c}`,"Content-Type":"application/json","x-thirdweb-client-id":i.clientId},method:"POST"});if(!s.ok)throw new Error(`Failed to sign message - ${s.status} ${s.statusText}`);return await s.json()}async function Ie({client:i,payload:e,storage:t}){const a=await t.getAuthCookie(),r=t.ecosystem,l=p(i,r);if(!a)throw new Error("No auth token found when signing transaction");const c=await l(`${g("inAppWallet")}/api/v1/enclave-wallet/sign-transaction`,{body:w({transactionPayload:e}),headers:{Authorization:`Bearer embedded-wallet-token:${a}`,"Content-Type":"application/json","x-thirdweb-client-id":i.clientId},method:"POST"});if(!c.ok)throw new Error(`Failed to sign transaction - ${c.status} ${c.statusText}`);return(await c.json()).signature}async function ve({client:i,payload:e,storage:t}){const a=await t.getAuthCookie(),r=t.ecosystem,l=p(i,r);if(!a)throw new Error("No auth token found when signing typed data");const c=await l(`${g("inAppWallet")}/api/v1/enclave-wallet/sign-typed-data`,{body:w({...e}),headers:{Authorization:`Bearer embedded-wallet-token:${a}`,"Content-Type":"application/json","x-thirdweb-client-id":i.clientId},method:"POST"});if(!c.ok)throw new Error(`Failed to sign typed data - ${c.status} ${c.statusText}`);return await c.json()}class ke{constructor({client:e,ecosystem:t,address:a,storage:r}){Object.defineProperty(this,"client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ecosystem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"address",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"localStorage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.client=e,this.ecosystem=t,this.address=a,this.localStorage=r}async postWalletSetUp(e){await this.localStorage.saveAuthCookie(e.storedToken.cookieString)}async getUserWalletStatus(){var l,c;const e=await this.localStorage.getAuthCookie();if(!e)return{status:"Logged Out"};const t=await W({authToken:e,client:this.client,ecosystem:this.ecosystem});if(!t)return{status:"Logged Out"};const a=t.wallets[0],r={email:(l=t.linkedAccounts.find(n=>n.details.email!==void 0))==null?void 0:l.details.email,phoneNumber:(c=t.linkedAccounts.find(n=>n.details.phone!==void 0))==null?void 0:c.details.phone,recoveryShareManagement:"ENCLAVE",userWalletId:t.id||""};return a?{account:await this.getAccount(),authDetails:r,status:"Logged In, Wallet Initialized",walletAddress:a.address}:{authDetails:r,status:"Logged In, Wallet Uninitialized"}}async getAccount(){const e=this.client,t=this.localStorage,a=this.address,r=this.ecosystem,l=async n=>{const o=P({chain:I(n.chainId),client:e}),s={chainId:A(n.chainId),data:n.data,gas:m(n.gas),nonce:m(n.nonce)||A(await b(async()=>{const{eth_getTransactionCount:d}=await import("./thirdweb-BqnCxuFo.js").then(u=>u.ck);return{eth_getTransactionCount:d}},[]).then(({eth_getTransactionCount:d})=>d(o,{address:y(this.address),blockTag:"pending"}))),to:n.to?y(n.to):void 0,value:m(n.value)};return n.authorizationList&&n.authorizationList.length>0?(s.type=4,s.authorizationList=n.authorizationList,s.maxFeePerGas=m(n.maxFeePerGas),s.maxPriorityFeePerGas=m(n.maxPriorityFeePerGas)):m(n.maxFeePerGas)?(s.maxFeePerGas=m(n.maxFeePerGas),s.maxPriorityFeePerGas=m(n.maxPriorityFeePerGas),s.type=2):(s.gasPrice=m(n.gasPrice),s.type=0),Ie({client:e,payload:s,storage:t})},c={address:y(a),async sendTransaction(n){const o=P({chain:I(n.chainId),client:e}),s=await l(n),d=await D(o,s);return F({chainId:n.chainId,client:e,contractAddress:n.to??void 0,ecosystem:r,gasPrice:n.gasPrice,transactionHash:d,walletAddress:a,walletType:"inApp"}),{transactionHash:d}},async signAuthorization(n){const o=await ye({client:e,payload:n,storage:t});return{address:y(o.address),chainId:Number.parseInt(o.chainId),nonce:BigInt(o.nonce),r:BigInt(o.r),s:BigInt(o.s),yParity:Number.parseInt(o.yParity)}},async signMessage({message:n,originalMessage:o,chainId:s}){const d=typeof n=="string"?{chainId:s,isRaw:!1,message:n,originalMessage:o}:{chainId:s,isRaw:!0,message:typeof n.raw=="string"?n.raw:Q(n.raw),originalMessage:o},{signature:u}=await be({client:e,payload:d,storage:t});return u},async signTransaction(n){if(!n.chainId)throw new Error("chainId required in tx to sign");return l({chainId:n.chainId,...n})},async signTypedData(n){const o=U(n),{signature:s}=await ve({client:e,payload:o,storage:t});return s},sendCalls:async n=>{const{inAppWalletSendCalls:o}=await b(async()=>{const{inAppWalletSendCalls:f}=await import("./in-app-wallet-calls-DK_8WpWI.js");return{inAppWalletSendCalls:f}},__vite__mapDeps([0,1])),s=n.calls[0];if(!s)throw new Error("No calls to send");const d=s.client,u=s.chain||n.chain,h=await o({account:c,calls:n.calls,chain:u});return{chain:u,client:d,id:h}},getCallsStatus:async n=>{const{inAppWalletGetCallsStatus:o}=await b(async()=>{const{inAppWalletGetCallsStatus:s}=await import("./in-app-wallet-calls-DK_8WpWI.js");return{inAppWalletGetCallsStatus:s}},__vite__mapDeps([0,1]));return o(n)},getCallsStatusRaw:async n=>{const{inAppWalletGetCallsStatusRaw:o}=await b(async()=>{const{inAppWalletGetCallsStatusRaw:s}=await import("./in-app-wallet-calls-DK_8WpWI.js");return{inAppWalletGetCallsStatusRaw:s}},__vite__mapDeps([0,1]));return o(n)},getCapabilities:async n=>({[n.chainId??1]:{atomic:{status:"unsupported"},paymasterService:{supported:!1}}})};return c}}function m(i){return i===void 0||H(i)?i:A(i)}const Te={backgroundColor:"transparent",border:"none",colorScheme:"light",display:"none",height:"100%",pointerEvents:"all",position:"fixed",right:"0px",top:"0px",width:"100%",zIndex:"2147483646"},L=new Map;class Le{constructor({link:e,baseUrl:t,iframeId:a,container:r,onIframeInitialize:l,localStorage:c,clientId:n,ecosystem:o}){if(Object.defineProperty(this,"iframe",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"POLLING_INTERVAL_SECONDS",{enumerable:!0,configurable:!0,writable:!0,value:1.4}),Object.defineProperty(this,"iframeBaseUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"localStorage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientId",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ecosystem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.localStorage=c,this.clientId=n,this.ecosystem=o,this.iframeBaseUrl=t,typeof document>"u")return;r=r??document.body;let s=document.getElementById(a);const d=new URL(e);if(!s||s.src!==d.href){s=document.createElement("iframe");const u={...Te};Object.assign(s.style,u),s.setAttribute("id",a),s.setAttribute("fetchpriority","high"),r.appendChild(s),s.src=d.href;const h=f=>{if(f.data.eventType==="ewsIframeLoaded"){if(window.removeEventListener("message",h),!s){console.warn("thirdweb iFrame not found");return}this.onIframeLoadHandler(s,l)()}};window.addEventListener("message",h)}this.iframe=s}async onIframeLoadedInitVariables(){var e,t;return{authCookie:await this.localStorage.getAuthCookie(),clientId:this.clientId,deviceShareStored:await this.localStorage.getDeviceShare(),ecosystemId:(e=this.ecosystem)==null?void 0:e.id,partnerId:(t=this.ecosystem)==null?void 0:t.partnerId,walletUserId:await this.localStorage.getWalletUserId()}}onIframeLoadHandler(e,t){return async()=>{var l;const a=new MessageChannel,r=new Promise((c,n)=>{a.port1.onmessage=o=>{const{data:s}=o;a.port1.close(),s.success||n(new Error(s.error)),L.set(e.src,!0),t&&t(),c(!0)}});(l=e==null?void 0:e.contentWindow)==null||l.postMessage({data:await this.onIframeLoadedInitVariables(),eventType:"initIframe"},this.iframeBaseUrl,[a.port2]),await r}}async call({procedureName:e,params:t,showIframe:a=!1}){var c;if(!this.iframe)throw new Error("Iframe not found. You are likely calling this from the backend where the DOM is not available.");for(;!L.get(this.iframe.src);)await k(this.POLLING_INTERVAL_SECONDS*1e3);a&&(this.iframe.style.display="block",await k(.005*1e3));const r=new MessageChannel,l=new Promise((n,o)=>{r.port1.onmessage=async s=>{const{data:d}=s;r.port1.close(),a&&(await k(.1*1e3),this.iframe&&(this.iframe.style.display="none")),d.success?n(d.data):o(new Error(d.error))}});return(c=this.iframe.contentWindow)==null||c.postMessage({data:{...t,...await this.onIframeLoadedInitVariables()},eventType:e},this.iframeBaseUrl,[r.port2]),l}destroy(){this.iframe&&L.delete(this.iframe.src)}}class Pe extends Le{constructor({clientId:e,baseUrl:t,ecosystem:a}){super({baseUrl:t,clientId:e,container:typeof document>"u"?void 0:document.body,ecosystem:a,iframeId:We+((a==null?void 0:a.id)||""),link:Ae({baseUrl:t,clientId:e,ecosystem:a,path:Z}).href,localStorage:new N({clientId:e,ecosystem:a,storage:B})}),this.clientId=e,this.ecosystem=a}}function Ae({clientId:i,baseUrl:e,path:t,ecosystem:a,queryParams:r}){var c;const l=new URL(`${t}`,e);if(r)for(const n of Object.keys(r))l.searchParams.set(n,((c=r[n])==null?void 0:c.toString())||"");return l.searchParams.set("clientId",i),(a==null?void 0:a.partnerId)!==void 0&&l.searchParams.set("partnerId",a.partnerId),(a==null?void 0:a.id)!==void 0&&l.searchParams.set("ecosystemId",a.id),l}const We="thirdweb-in-app-wallet-iframe";async function Se({client:i,ecosystem:e,authToken:t}){const r=await p(i,e)(`${g("inAppWallet")}/api/v1/enclave-wallet/generate`,{headers:{Authorization:`Bearer embedded-wallet-token:${t}`,"Content-Type":"application/json","x-thirdweb-client-id":i.clientId},method:"POST"});if(!r.ok)throw new Error(`Failed to generate wallet - ${r.status} ${r.statusText}`);const{wallet:l}=await r.json();return l}class Ee{constructor({baseUrl:e,querier:t,preLogin:a,postLogin:r,client:l,ecosystem:c}){Object.defineProperty(this,"LoginQuerier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"preLogin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"postLogin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"baseUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ecosystem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.baseUrl=e,this.LoginQuerier=t,this.preLogin=a,this.postLogin=r,this.client=l,this.ecosystem=c}async sendEmailLoginOtp({email:e}){return await this.LoginQuerier.call({params:{email:e},procedureName:"sendThirdwebEmailLoginOtp"})}async sendSmsLoginOtp({phoneNumber:e}){return await this.LoginQuerier.call({params:{phoneNumber:e},procedureName:"sendThirdwebSmsLoginOtp"})}}class Oe extends Ee{async authenticateWithModal(){return this.LoginQuerier.call({params:void 0,procedureName:"loginWithThirdwebModal",showIframe:!0})}async loginWithModal(){await this.preLogin();const e=await this.authenticateWithModal();return this.postLogin(e)}async authenticateWithIframe({email:e}){return this.LoginQuerier.call({params:{email:e},procedureName:"loginWithThirdwebModal",showIframe:!0})}async loginWithIframe({email:e}){await this.preLogin();const t=await this.authenticateWithIframe({email:e});return this.postLogin(t)}async authenticateWithCustomJwt({encryptionKey:e,jwt:t}){if(!e||e.length===0)throw new Error("Encryption key is required for custom jwt auth");return this.LoginQuerier.call({params:{encryptionKey:e,jwt:t},procedureName:"loginWithCustomJwt"})}async loginWithCustomJwt({encryptionKey:e,jwt:t}){if(!e||e.length===0)throw new Error("Encryption key is required for custom jwt auth");await this.preLogin();const a=await this.authenticateWithCustomJwt({encryptionKey:e,jwt:t});return this.postLogin(a)}async authenticateWithCustomAuthEndpoint({encryptionKey:e,payload:t}){return this.LoginQuerier.call({params:{encryptionKey:e,payload:t},procedureName:"loginWithCustomAuthEndpoint"})}async loginWithCustomAuthEndpoint({encryptionKey:e,payload:t}){if(!e||e.length===0)throw new Error("Encryption key is required for custom auth");await this.preLogin();const a=await this.authenticateWithCustomAuthEndpoint({encryptionKey:e,payload:t});return this.postLogin(a)}async authenticateWithEmailOtp({email:e,otp:t,recoveryCode:a}){return this.LoginQuerier.call({params:{email:e,otp:t,recoveryCode:a},procedureName:"verifyThirdwebEmailLoginOtp"})}async loginWithEmailOtp({email:e,otp:t,recoveryCode:a}){const r=await this.authenticateWithEmailOtp({email:e,otp:t,recoveryCode:a});return this.postLogin(r)}async authenticateWithSmsOtp({phoneNumber:e,otp:t,recoveryCode:a}){return this.LoginQuerier.call({params:{otp:t,phoneNumber:e,recoveryCode:a},procedureName:"verifyThirdwebSmsLoginOtp"})}async loginWithSmsOtp({phoneNumber:e,otp:t,recoveryCode:a}){const r=await this.authenticateWithSmsOtp({otp:t,phoneNumber:e,recoveryCode:a});return this.postLogin(r)}}class Ce{constructor({client:e,querier:t,onAuthSuccess:a,ecosystem:r,baseUrl:l,localStorage:c}){Object.defineProperty(this,"client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ecosystem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"AuthQuerier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"localStorage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"onAuthSuccess",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"BaseLogin",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.client=e,this.ecosystem=r,this.AuthQuerier=t,this.localStorage=c,this.onAuthSuccess=a,this.BaseLogin=new Oe({baseUrl:l,client:e,ecosystem:r,postLogin:async n=>this.postLogin(n),preLogin:async()=>{await this.preLogin()},querier:t})}async preLogin(){await this.logout()}async postLogin({storedToken:e,walletDetails:t}){return e.shouldStoreCookieString&&await this.localStorage.saveAuthCookie(e.cookieString),await this.onAuthSuccess({storedToken:e,walletDetails:t})}async loginWithAuthToken(e,t){var l;e.storedToken.authProvider!=="Backend"&&await this.preLogin();const a=await W({authToken:e.storedToken.cookieString,client:this.client,ecosystem:this.ecosystem});if(!a)throw new Error("Cannot login, no user found for auth token");if(a.wallets.length>0&&((l=a.wallets[0])==null?void 0:l.type)==="enclave")return this.postLogin({storedToken:e.storedToken,walletDetails:{walletAddress:a.wallets[0].address}});if(a.wallets.length===0){const c=await Se({authToken:e.storedToken.cookieString,client:this.client,ecosystem:this.ecosystem});return this.postLogin({storedToken:e.storedToken,walletDetails:{walletAddress:c.address}})}const r=await this.AuthQuerier.call({params:{recoveryCode:t,storedToken:e.storedToken},procedureName:"loginWithStoredTokenDetails"});return this.postLogin(r)}async loginWithModal(){return this.BaseLogin.loginWithModal()}async authenticateWithModal(){return this.BaseLogin.authenticateWithModal()}async loginWithIframe(e){return this.BaseLogin.loginWithIframe(e)}async authenticateWithIframe(e){return this.BaseLogin.authenticateWithIframe(e)}async loginWithCustomJwt(e){return this.BaseLogin.loginWithCustomJwt(e)}async authenticateWithCustomJwt(e){return this.BaseLogin.authenticateWithCustomJwt(e)}async loginWithCustomAuthEndpoint(e){return this.BaseLogin.loginWithCustomAuthEndpoint(e)}async authenticateWithCustomAuthEndpoint(e){return this.BaseLogin.authenticateWithCustomAuthEndpoint(e)}async sendEmailLoginOtp({email:e}){return this.BaseLogin.sendEmailLoginOtp({email:e})}async sendSmsLoginOtp({phoneNumber:e}){return this.BaseLogin.sendSmsLoginOtp({phoneNumber:e})}async loginWithEmailOtp(e){return await this.preLogin(),this.BaseLogin.loginWithEmailOtp(e)}async authenticateWithEmailOtp(e){return this.BaseLogin.authenticateWithEmailOtp(e)}async loginWithSmsOtp(e){return await this.preLogin(),this.BaseLogin.loginWithSmsOtp(e)}async authenticateWithSmsOtp(e){return this.BaseLogin.authenticateWithSmsOtp(e)}async logout(){const e=await this.localStorage.removeAuthCookie(),t=await this.localStorage.removeWalletUserId();return{success:e||t}}}const $e="width=350, height=500",C=({isWindowOpenedByFn:i,win:e,closeOpenedWindow:t})=>{i?e==null||e.close():e&&t?t(e):e&&e.close()};async function $(i){const e=v({...i,mode:i.mode||"redirect",authFlow:i.authFlow});i.mode==="redirect"?window.location.href=e:window.open(e),await new Promise(t=>setTimeout(t,5e3))}const je=async i=>{let e=i.openedWindow,t=!1;if(e||(e=window.open(v({...i,mode:"popup"}),`Login to ${i.authOption}`,$e),t=!0),!e)throw new Error("Something went wrong opening pop-up");return await new Promise((r,l)=>{const c=window.setInterval(async()=>{e.closed&&(clearInterval(c),window.removeEventListener("message",n),l(new Error("User closed login window")))},1e3),n=async o=>{if(o.origin===g("inAppWallet")){if(typeof o.data!="object"){l(new Error("Invalid event data"));return}switch(o.data.eventType){case"oauthSuccessResult":{window.removeEventListener("message",n),clearInterval(c),C({closeOpenedWindow:i.closeOpenedWindow,isWindowOpenedByFn:t,win:e}),o.data.authResult&&r(o.data.authResult);break}case"oauthFailureResult":{window.removeEventListener("message",n),clearInterval(c),C({closeOpenedWindow:i.closeOpenedWindow,isWindowOpenedByFn:t,win:e}),l(new Error(o.data.errorString));break}}}};window.addEventListener("message",n)})},_e=async i=>{const{client:e,ecosystem:t}=i,a=v({authOption:i.strategy,client:e,ecosystem:t}),r={"Content-Type":"application/json","x-client-id":e.clientId};t!=null&&t.id&&(r["x-ecosystem-id"]=t.id),t!=null&&t.partnerId&&(r["x-ecosystem-partner-id"]=t.partnerId);const l=(()=>{switch(i.strategy){case"email":return{email:i.email};case"phone":return{phone:i.phoneNumber}}})(),c=await fetch(a,{body:w(l),headers:r,method:"POST"});if(!c.ok){const n=await c.text();let o;try{const s=JSON.parse(n);s&&typeof s.message=="string"&&(o=s.message)}catch{}throw new Error(o||"Failed to send verification code")}return await c.json()},j=async i=>{const{client:e,ecosystem:t}=i,a=S({authOption:i.strategy,client:i.client,ecosystem:i.ecosystem}),r={"Content-Type":"application/json","x-client-id":e.clientId};t!=null&&t.id&&(r["x-ecosystem-id"]=t.id),t!=null&&t.partnerId&&(r["x-ecosystem-partner-id"]=t.partnerId);const l=(()=>{switch(i.strategy){case"email":return{code:i.verificationCode,email:i.email};case"phone":return{code:i.verificationCode,phone:i.phoneNumber}}})(),c=await fetch(a,{body:w(l),headers:r,method:"POST"});if(!c.ok)throw new Error("Failed to verify verification code");return await c.json()};class _{constructor({client:e,ecosystem:t,querier:a,localStorage:r}){Object.defineProperty(this,"client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ecosystem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"walletManagerQuerier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"localStorage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.client=e,this.ecosystem=t,this.walletManagerQuerier=a,this.localStorage=r}async postWalletSetUp(e){e.deviceShareStored&&await this.localStorage.saveDeviceShare(e.deviceShareStored,e.storedToken.authDetails.userWalletId)}async getUserWalletStatus(){const e=await this.walletManagerQuerier.call({params:void 0,procedureName:"getUserStatus"});return e.status==="Logged In, Wallet Initialized"?{status:"Logged In, Wallet Initialized",...e.user,account:await this.getAccount()}:e.status==="Logged In, New Device"?{status:"Logged In, New Device",...e.user}:e.status==="Logged In, Wallet Uninitialized"?{status:"Logged In, Wallet Uninitialized",...e.user}:{status:e.status}}async getAccount(){var c;const e=this.walletManagerQuerier,t=this.client,a=(c=this.ecosystem)==null?void 0:c.partnerId,{address:r}=await e.call({params:void 0,procedureName:"getAddress"}),l=async n=>{const o={chainId:n.chainId,data:n.data,gasLimit:n.gas,nonce:n.nonce,to:n.to??void 0,value:n.value};n.maxFeePerGas?(o.accessList=n.accessList,o.maxFeePerGas=n.maxFeePerGas,o.maxPriorityFeePerGas=n.maxPriorityFeePerGas,o.type=2):(o.gasPrice=n.gasPrice,o.type=0);const s=O().rpc,{signedTransaction:d}=await e.call({params:{chainId:n.chainId,partnerId:a,rpcEndpoint:`https://${n.chainId}.${s}`,transaction:o},procedureName:"signTransaction"});return d};return{address:y(r),async sendTransaction(n){const o=P({chain:I(n.chainId),client:t}),s=await l(n),d=await D(o,s);return F({chainId:n.chainId,client:t,contractAddress:n.to??void 0,gasPrice:n.gasPrice,transactionHash:d,walletAddress:r,walletType:"inApp"}),{transactionHash:d}},async signMessage({message:n}){const o=typeof n=="string"?n:n.raw instanceof Uint8Array?n.raw:J(n.raw),{signedMessage:s}=await e.call({params:{chainId:1,message:o,partnerId:a},procedureName:"signMessage"});return s},async signTransaction(n){if(!n.chainId)throw new Error("chainId required in tx to sign");return l({...n,chainId:n.chainId})},async signTypedData(n){var E;const o=U(n);(E=o.types)!=null&&E.EIP712Domain&&(o.types.EIP712Domain=void 0);const s=o.domain,d=s==null?void 0:s.chainId,h={...s!=null&&s.verifyingContract?{verifyingContract:s==null?void 0:s.verifyingContract}:{},name:s==null?void 0:s.name,version:s==null?void 0:s.version};d&&(h.chainId=d);const f=O().rpc,{signedTypedData:V}=await e.call({params:{chainId:Number.parseInt(BigInt(d||1).toString()),domain:h,message:o.message,partnerId:a,rpcEndpoint:`https://${d}.${f}`,types:o.types},procedureName:"signTypedDataV4"});return V}}}}class Ge{isClientIdLegacyPaper(e){return e.indexOf("-")>0&&e.length===36}constructor({client:e,onAuthSuccess:t,ecosystem:a,passkeyDomain:r,storage:l}){if(Object.defineProperty(this,"client",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ecosystem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"querier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"storage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"wallet",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"auth",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"passkeyDomain",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.isClientIdLegacyPaper(e.clientId))throw new Error("You are using a legacy clientId. Please use the clientId found on the thirdweb dashboard settings page");const c=g("inAppWallet");this.client=e,this.ecosystem=a,this.passkeyDomain=r,this.storage=new N({clientId:e.clientId,ecosystem:a,storage:l??Fe()}),this.querier=new Pe({baseUrl:c,clientId:e.clientId,ecosystem:a}),this.auth=new Ce({baseUrl:c,client:e,ecosystem:a,localStorage:this.storage,onAuthSuccess:async n=>{if(t==null||t(n),n.storedToken.authDetails.walletType==="sharded"&&(await this.querier.call({params:{storedToken:n.storedToken},procedureName:"migrateFromShardToEnclave"})||console.warn("Failed to migrate from sharded to enclave wallet, continuing with sharded wallet")),this.wallet=await this.initializeWallet(n.storedToken.cookieString),!this.wallet)throw new Error("Failed to initialize wallet");const o="deviceShareStored"in n.walletDetails?n.walletDetails.deviceShareStored:void 0;return await this.wallet.postWalletSetUp({deviceShareStored:o,storedToken:n.storedToken}),this.wallet instanceof _&&await this.querier.call({params:{authCookie:n.storedToken.cookieString,clientId:this.client.clientId,deviceShareStored:"deviceShareStored"in n.walletDetails?n.walletDetails.deviceShareStored:null,ecosystemId:a==null?void 0:a.id,partnerId:a==null?void 0:a.partnerId,walletUserId:n.storedToken.authDetails.userWalletId},procedureName:"initIframe"}),{user:{account:await this.wallet.getAccount(),authDetails:n.storedToken.authDetails,status:"Logged In, Wallet Initialized",walletAddress:n.walletDetails.walletAddress}}},querier:this.querier})}async initializeWallet(e){var r;const t=await this.storage.getAuthCookie();if(!e&&t===null)throw new Error("No auth token provided and no stored auth token found to initialize the wallet");const a=await W({authToken:e||t,client:this.client,ecosystem:this.ecosystem});if(!a)throw new Error("Cannot initialize wallet, no user logged in");if(a.wallets.length===0)throw new Error("Cannot initialize wallet, this user does not have a wallet generated yet");return((r=a.wallets[0])==null?void 0:r.type)==="enclave"?new ke({address:a.wallets[0].address,client:this.client,ecosystem:this.ecosystem,storage:this.storage}):new _({client:this.client,ecosystem:this.ecosystem,localStorage:this.storage,querier:this.querier})}async getUser(){if(!this.wallet){const e=await this.storage.getAuthCookie();if(!e)return{status:"Logged Out"};this.wallet=await this.initializeWallet(e)}if(!this.wallet)throw new Error("Wallet not initialized");return await this.wallet.getUserWalletStatus()}getAccount(){if(!this.wallet)throw new Error("Wallet not initialized");return this.wallet.getAccount()}async preAuthenticate(e){return _e({...e,client:this.client,ecosystem:this.ecosystem})}async authenticateWithRedirect(e,t,a){return $({authOption:e,client:this.client,ecosystem:this.ecosystem,mode:t,redirectUrl:a})}async loginWithAuthToken(e,t){return this.auth.loginWithAuthToken(e,t)}async authenticate(e){const t=e.strategy;switch(t){case"email":return j({...e,client:this.client,ecosystem:this.ecosystem});case"phone":return j({...e,client:this.client,ecosystem:this.ecosystem});case"auth_endpoint":return oe({client:this.client,ecosystem:this.ecosystem,payload:e.payload});case"jwt":return de({client:this.client,ecosystem:this.ecosystem,jwt:e.jwt});case"passkey":return this.passkeyAuth(e);case"iframe_email_verification":return this.auth.authenticateWithIframe({email:e.email});case"iframe":return this.auth.authenticateWithModal();case"apple":case"facebook":case"google":case"telegram":case"github":case"twitch":case"farcaster":case"line":case"x":case"tiktok":case"epic":case"steam":case"coinbase":case"discord":return je({authOption:t,client:this.client,closeOpenedWindow:e.closeOpenedWindow,ecosystem:this.ecosystem,openedWindow:e.openedWindow});case"guest":return le({client:this.client,ecosystem:this.ecosystem,storage:this.storage});case"backend":return ce({client:this.client,ecosystem:this.ecosystem,walletSecret:e.walletSecret});case"wallet":return fe({client:this.client,ecosystem:this.ecosystem,wallet:e.wallet,chain:e.chain})}}async connect(e){const t=e.strategy;switch(t){case"auth_endpoint":case"jwt":{const a=await this.authenticate(e);return await this.loginWithAuthToken(a,e.encryptionKey)}case"iframe_email_verification":return this.auth.loginWithIframe({email:e.email});case"iframe":return this.auth.loginWithModal();case"passkey":{const a=await this.passkeyAuth(e);return this.loginWithAuthToken(a)}case"backend":case"phone":case"email":case"wallet":case"apple":case"facebook":case"google":case"farcaster":case"telegram":case"github":case"line":case"x":case"tiktok":case"epic":case"guest":case"coinbase":case"twitch":case"steam":case"discord":{const a=await this.authenticate(e);return await this.auth.loginWithAuthToken(a)}default:De(t)}}async logout(){return await this.auth.logout()}async passkeyAuth(e){const{PasskeyWebClient:t}=await b(async()=>{const{PasskeyWebClient:n}=await import("./passkeys-C1wTOzLk.js");return{PasskeyWebClient:n}},__vite__mapDeps([2,3])),{passkeyName:a,storeLastUsedPasskey:r=!0}=e,l=new t,c=this.storage;return e.type==="sign-up"?ue({client:this.client,ecosystem:this.ecosystem,passkeyClient:l,rp:{id:this.passkeyDomain??window.location.hostname,name:this.passkeyDomain??window.document.title},storage:r?c:void 0,username:a}):he({client:this.client,ecosystem:this.ecosystem,passkeyClient:l,rp:{id:this.passkeyDomain??window.location.hostname,name:this.passkeyDomain??window.document.title},storage:r?c:void 0})}async linkProfileWithRedirect(e,t,a){return $({authOption:e,client:this.client,ecosystem:this.ecosystem,mode:t,redirectUrl:a,authFlow:"link"})}async linkProfile(e){if("strategy"in e&&K.includes(e.strategy)&&"mode"in e&&e.mode!=="popup"&&e.mode!==void 0)return await this.linkProfileWithRedirect(e.strategy,e.mode,"redirectUrl"in e?e.redirectUrl:void 0),[];const{storedToken:t}=await this.authenticate(e);return await X({client:e.client,ecosystem:e.ecosystem||this.ecosystem,storage:this.storage,tokenToLink:t.cookieString})}async unlinkProfile(e,t){return await ee({allowAccountDeletion:t,client:this.client,ecosystem:this.ecosystem,profileToUnlink:e,storage:this.storage})}async getProfiles(){return te({client:this.client,ecosystem:this.ecosystem,storage:this.storage})}}function De(i,e){throw new Error(`Invalid param: ${i}`)}function Fe(){return typeof window<"u"&&window.localStorage?B:ie}export{Ge as InAppWebConnector};
|
package/index.html
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
<link rel="shortcut icon" type="image/x-icon" href="https://decentraland.org/images/icons/favicon-32x32.png" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Decentraland | Authorization</title>
|
|
8
|
-
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/auth-site/4.
|
|
9
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/auth-site/4.
|
|
10
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/auth-site/4.
|
|
11
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/auth-site/4.
|
|
12
|
-
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/auth-site/4.
|
|
8
|
+
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/auth-site/4.13.0/assets/index-LKuo9a6w.js"></script>
|
|
9
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/auth-site/4.13.0/assets/thirdweb-BqnCxuFo.js">
|
|
10
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/auth-site/4.13.0/assets/vendor-DsHXTNqy.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/auth-site/4.13.0/assets/ui-BBwYSKNx.js">
|
|
12
|
+
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/auth-site/4.13.0/assets/index-JBb9zsWZ.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/auth-site",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.13.0",
|
|
4
4
|
"description": "Auth website",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
],
|
|
18
18
|
"author": "Decentraland",
|
|
19
19
|
"license": "Apache-2.0",
|
|
20
|
-
"homepage": "https://cdn.decentraland.org/@dcl/auth-site/4.
|
|
20
|
+
"homepage": "https://cdn.decentraland.org/@dcl/auth-site/4.13.0",
|
|
21
21
|
"commit": "a5ffaee338748200635ecf377fae91d4816403ad"
|
|
22
22
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._button_149jw_1{min-height:46px}._icon_149jw_5{min-width:32px;min-height:32px;background-size:contain;background-repeat:no-repeat;background-position:center}._icon-metamask-mobile_149jw_13,._icon-metamask_149jw_13{background-image:url("data:image/svg+xml,%3csvg%20width='64'%20height='64'%20viewBox='0%200%201025%201025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_542_3186)'%3e%3cpath%20d='M862.005%20871.546L689.114%20820.065L558.73%20898.006L467.763%20897.968L337.303%20820.065L164.488%20871.546L111.92%20694.087L164.488%20497.133L111.92%20330.613L164.488%20124.233L434.526%20285.567H591.967L862.005%20124.233L914.573%20330.613L862.005%20497.133L914.573%20694.087L862.005%20871.546Z'%20fill='%23FF5C16'/%3e%3cpath%20d='M164.527%20124.233L434.566%20285.68L423.826%20396.479L164.527%20124.233Z'%20fill='%23FF5C16'/%3e%3cpath%20d='M337.34%20694.163L456.155%20784.672L337.34%20820.065V694.163Z'%20fill='%23FF5C16'/%3e%3cpath%20d='M446.659%20544.525L423.823%20396.554L277.65%20497.169L277.574%20497.132V497.207L278.026%20600.776L337.302%20544.525H337.34H446.659Z'%20fill='%23FF5C16'/%3e%3cpath%20d='M862.005%20124.233L591.967%20285.68L602.669%20396.479L862.005%20124.233Z'%20fill='%23FF5C16'/%3e%3cpath%20d='M689.19%20694.163L570.375%20784.672L689.19%20820.065V694.163Z'%20fill='%23FF5C16'/%3e%3cpath%20d='M748.922%20497.207H748.96H748.922V497.132L748.884%20497.169L602.711%20396.554L579.875%20544.525H689.194L748.508%20600.776L748.922%20497.207Z'%20fill='%23FF5C16'/%3e%3cpath%20d='M337.303%20820.062L164.488%20871.544L111.92%20694.16H337.303V820.062Z'%20fill='%23E34807'/%3e%3cpath%20d='M446.623%20544.487L479.634%20758.4L433.886%20639.463L277.953%20600.776L337.267%20544.487H446.586H446.623Z'%20fill='%23E34807'/%3e%3cpath%20d='M689.188%20820.062L862.003%20871.544L914.571%20694.16H689.188V820.062Z'%20fill='%23E34807'/%3e%3cpath%20d='M579.87%20544.487L546.859%20758.4L592.607%20639.463L748.54%20600.776L689.189%20544.487H579.87Z'%20fill='%23E34807'/%3e%3cpath%20d='M111.92%20694.085L164.488%20497.131H277.538L277.952%20600.737L433.886%20639.424L479.633%20758.361L456.119%20784.556L337.304%20694.047H111.92V694.085Z'%20fill='%23FF8D5D'/%3e%3cpath%20d='M914.573%20694.085L862.004%20497.131H748.955L748.54%20600.737L592.607%20639.424L546.859%20758.361L570.374%20784.556L689.189%20694.047H914.573V694.085Z'%20fill='%23FF8D5D'/%3e%3cpath%20d='M591.969%20285.567H513.249H434.528L423.826%20396.366L479.635%20758.25H546.862L602.709%20396.366L591.969%20285.567Z'%20fill='%23FF8D5D'/%3e%3cpath%20d='M164.488%20124.233L111.92%20330.613L164.488%20497.133H277.538L423.787%20396.479L164.488%20124.233Z'%20fill='%23661800'/%3e%3cpath%20d='M413.951%20587.451H362.739L334.854%20614.781L433.923%20639.349L413.951%20587.413V587.451Z'%20fill='%23661800'/%3e%3cpath%20d='M862.006%20124.233L914.574%20330.613L862.006%20497.133H748.956L602.707%20396.479L862.006%20124.233Z'%20fill='%23661800'/%3e%3cpath%20d='M612.617%20587.451H663.904L691.79%20614.819L592.607%20639.424L612.617%20587.413V587.451Z'%20fill='%23661800'/%3e%3cpath%20d='M558.692%20827.41L570.373%20784.635L546.859%20758.44H479.594L456.08%20784.635L467.762%20827.41'%20fill='%23661800'/%3e%3cpath%20d='M558.689%20827.407V898.043H467.76V827.407H558.689Z'%20fill='%23C0C4CD'/%3e%3cpath%20d='M337.34%20819.99L467.837%20898.007V827.372L456.155%20784.597L337.34%20819.99Z'%20fill='%23E7EBF6'/%3e%3cpath%20d='M689.19%20819.99L558.693%20898.007V827.372L570.375%20784.597L689.19%20819.99Z'%20fill='%23E7EBF6'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_542_3186'%3e%3crect%20width='1024'%20height='1024'%20fill='white'%20transform='translate(0.986328%200.5)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e")}._icon-dapper_149jw_18{background-image:url(https://cdn.decentraland.org/@dcl/auth-site/4.12.1-23265207440.commit-a5ffaee/assets/dapper-BT_mEW8_.png)}._icon-fortmatic_149jw_22{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAABYlAAAWJQFJUiTwAAAJ1klEQVR42u3dy4slZxnH8e7THcm48YYgiJCF/0AEE3VnJMbxlupLelR0I2TqdPfcIhJBXATEhZcQBC94IaA7VyIGFAfdBAXRhUQk6MIYHEFDVi6i05cqn7fqrdN1wiw6cWa6TvXnCz/e080kXbz1vt/3eevUqbO0BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAToDpWpXbOmVV5ISyksZhGeMxjUXcVgnocAxgHBb1sl64/Z3eSWC1LOrHon2iLKqvRStyyxNj7qsxBr8Rr8s8DpctSCew+kd7JrL3mY/X9eWtyDmRW59LMdYe/WRdx1b0t+0WoF4hgJMRwJ2Ra5E4GfX1JAOR25D/7G7GmCvqn+VxOCGAk6sA/rmz3gjgMItA5JYmtgD7Fx9qXl/N41AFQABCACAAIQAQgBAACEAIAAQgBAACEAIAAQgBgACEAEAAQgAgACEAEIAQAAhACAAEIAQAAhACAAEIAYAAhAAIgACEAAiAAIQACIAAhAAIwOAUAiAAEQIgABECIAARAiAAEQIgABECIAARAiAAEQIgABECIAARAiAAEQIgABECIAARAiAAEQIggOOmmrVFTryOgSMjyDQLoCyqmQDi9yYmAeQUWQDtYDmI1/syqvz3wmZzrn+ex+FEBUAAN5RAWilkXEmT/7OfaM7xr9M4jNVfBUAAc3vEw+31ZoC8GNmKnI18OErGD8kYUn9wWlRFnNN7swAilYlJALPV/3Bno2n/Pr2vWnbGRjwWrfwEcKMKYKetAK5F3pgHympkRRY/5dHrSVcBEAEBzFcA640Irk0frF/XCkAlABAAAAIAQAAACAAAAQAgAAAEAIAAABAAAAIACIAAAAIgAIAACAAgAAIACIAAAAIgAIAACAAgAAIACIAAAAIgAIAACAAgAAIACIAAAAIgAIAACAAgAAIACIAAAAIgAIAACAAgAAIACIAAAAIgAIAACAAggGELII6vacuPVs3r6VrXynFT5v5q+rGoZq9BAAtTAUzvMmj/X8pCHxLAAgpgereBezPYXtePBLBgAuhWrekHmlL2qXKt/ku0z8Sx/1GOlT9Efz0XW6dv5f6c2AIQwMJdA5jeX6fXz1/equudjbrelWMlndtHPtac36t5HK7YChDA4l0EbAXwbJr80e7HsR/IsXL94mZzrn+aK4CVdCEVBLCIFcCfd1sBDKf/hp/9iw817VNdBWALQAAEQAAgAAIgABAAARAACIAACAAEQAAEAAIgAAIAARAAAYAACIAAQAAEQAAgAAIgABAAARAACIAACAAEQAAEAAIgAAIAARAAAYAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAATG4CIAACEAIgAAIQAiAAAhACIAACEAIggPEJoHq26b+i3oscDC5tn1bxuiIAEMBNFkBZVNeunKvrC5vDSppgu5t58qsAQAA3XwDl+5stwA8iT4cIrsYx/nIYqVN+Ecf0u9Sf5dAqgCILoOgEUK10fQoCGLwAmuM5O/wBG/149/YibAEKFQABLGAFkFev1I/L0S637QASEyof5z2DFECuAMriaAtQqgAIYFEEEKV1255tLgI2QhhYJn0BDHELcKnZAlQ/bvoxXQMgAAJYpC3AwEv/QQugzAIIkf5QBUAABHCKBFAWzbF0AnjiSACVE0cABHBqKoCtpn1UBUAABHDaKoC1mQDOtddU6pXzBEAABHBqBFDl1/dmAUycNQIggJELIB1HnNPD7fbcvhh5UxbA8sMqAAIggFNRARykW5Wj/U06xji+JIClKwRAAAQw/gog2r3Laf+/Vj3e7f9LdwESAAGcggqgPYauAvhIK4BqxRkjAAIYuwDi78dxtPv/tfqF/v5fBUAABHAatgDdDUBr9Y+640yT323ABEAAYxZAe/dfqgAOLm42P2/k41P+EwABjF0A+e8f7mw05/Rvkdfm8n9J+U8ABDBmAeS/W+ar//HzF/urPwEQAAGMuwJoVv/t9rz+O/K2fGzLUx8AIgACGLUAqnw+9y61q//X87hb6bYAIAACGKMAiua233b1X5+t/m/tzuWVCyY/ARDAaAVQFker/+X2k39fyKv+aj42J4oACGCMAugmf3fff/ztP0Xu6Ca+C38EQAAjFUC+37/KEjjcbd/6e29e/fPDSl38IwACGKMAqt4XkXSl/5f7F/48/psACGCcApj9jThve/mLP57ujqm74m/vTwAEMEYBHF30289flvpC5C158k/6EgABEMB4BFD13u8/yE/72Y/ckyf9ajf5rf4EQADjEkDVW/mbyZ/v+Hsgj6928tv3EwABjEwAxdzKv7+9Pvv9ejvpq/b9/nUrPwEQwKgEUPa+cjxd8Mtv9V2P3N8v++37CYAAxiSAYu5Kf9Xc499e7f9H5B39sj+xbfITAAGMQgBVWcyt+vvpd/l9/l9F3pz3+qu9Y/CkXwIggBEIoL/qpzGyl27vzVf7H5uV+t0n/NZrZT8BEMCCC6B62Tf4HKa9fjon+Su9fh//v3f19vmTLAEX/AiAABZWAO1z+6rex3kP0vf4pdU+l/v/it9f6q/63WrvrT4CIIDFE8DRKp//TV7t99MjvHc3Zyt+uqvvS5E39P5GU/J/erNd9a38BEAAAxdAr22u4pf5Wf3NRb32wl7z4M406fNbe8+URfVI9wz/XO6v9u/rt99fzAHStXc2b+HkBzdMu4Fwwkn7ze12kD5fZgGkL5Bw5o5HTNru3vt35kne79vZZE99nCZ8+uBOmvStdKu/xr/5dgj3vvKBo8mdyv1pPgf2+gtfAVT9CuClK+fyIBhI0rGkY2oeI/Vg/fosKwJ45RXAu9Pefa5/t+ZW+JdiMj8X7U+i/Xy07wkBnJmXSbPPbyf+hok/tgrgjji5j0f7ZOQ7ke8OIWV7LE/GYPxKVABn8kB04o5dAeQJW9R3Rb4f+V705zfTZ/Mjn4t8Kvr2fdG+/XxRv+YGC0Ss9tWkzA/u8EGeMQ6StcV5KktUAU7Yq5T8Ma8Jpe/nS3v7SZrsW2frpd38fn7p6T2jvgiYMklPaxla8p5z0k1+K9CrqvCW5vqz9zp9K2/zxZwxwdNEfzj/N+f182kYINXRAMlJA6H/80mm7LVlFoAtwCvaAsza8uX9GTk/m+wVsQIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABo+R+M9RwtBsH6aAAAAABJRU5ErkJggg==)}._icon-wallet-connect_149jw_26{background-image:url(https://cdn.decentraland.org/@dcl/auth-site/4.12.1-23265207440.commit-a5ffaee/assets/wallet-connect-CniBuHFv.png)}._icon-samsung-blockchain-wallet_149jw_30{background-image:url("data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%20300%20300'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;'%3e%3cg%20transform='matrix(0.766553,0,0,0.766553,35.0615,35.0613)'%3e%3cpath%20d='M297.462,105.461C293.768,77.602%20283.912,52.349%20266.521,33.86L266.515,33.86C248.024,16.47%20222.778,6.61%20194.918,2.919C168.309,-0.604%20150.189,0.26%20150.189,0.26C150.189,0.26%20132.07,-0.604%20105.46,2.919C77.595,6.611%2052.351,16.471%2033.86,33.86L33.857,33.86C16.469,52.35%206.61,77.603%202.914,105.461C-0.612,132.068%200.265,150.191%200.265,150.191C0.265,150.191%20-0.612,168.307%202.914,194.92C6.61,222.779%2016.469,248.025%2033.858,266.519L33.861,266.523C52.352,283.909%2077.596,293.77%20105.461,297.461C132.071,300.987%20150.19,300.119%20150.19,300.119C150.19,300.119%20168.309,300.987%20194.919,297.461C222.778,293.77%20248.024,283.908%20266.516,266.523L266.522,266.519C283.914,248.026%20293.769,222.78%20297.463,194.92C300.986,168.308%20300.118,150.191%20300.118,150.191C300.118,150.191%20300.985,132.069%20297.462,105.461'%20style='fill:rgb(30,75,198);fill-rule:nonzero;'/%3e%3cpath%20d='M233.959,176.377L233.959,124.004C240.433,121.056%20244.939,114.546%20244.939,106.97C244.939,96.631%20236.557,88.247%20226.217,88.247C222.378,88.247%20218.813,89.407%20215.842,91.387L169.111,64.408C169.126,64.09%20169.158,63.776%20169.158,63.452C169.158,53.112%20160.776,44.729%20150.434,44.729C140.094,44.729%20131.711,53.112%20131.711,63.452C131.711,63.694%20131.738,63.929%20131.748,64.17L84.984,91.17C82.086,89.328%2078.658,88.247%2074.969,88.247C64.629,88.247%2056.246,96.63%2056.246,106.97C56.246,114.257%2060.418,120.554%2066.493,123.649L66.493,176.73C60.418,179.826%2056.246,186.123%2056.246,193.411C56.246,203.75%2064.629,212.129%2074.969,212.129C78.657,212.129%2082.083,211.05%2084.981,209.209L131.748,236.211C131.737,236.451%20131.711,236.688%20131.711,236.929C131.711,247.269%20140.094,255.651%20150.434,255.651C160.776,255.651%20169.158,247.269%20169.158,236.929C169.158,236.608%20169.126,236.291%20169.111,235.972L215.845,208.993C218.813,210.972%20222.381,212.13%20226.217,212.13C236.557,212.13%20244.939,203.751%20244.939,193.412C244.939,185.832%20240.433,179.323%20233.959,176.377ZM207.49,193.411C207.49,194.234%20207.561,195.042%20207.664,195.836L161.984,222.209C158.801,219.708%20154.796,218.205%20150.434,218.205C145.989,218.205%20141.91,219.761%20138.7,222.351L93.454,196.227C93.595,195.305%2093.689,194.372%2093.689,193.412C93.689,185.548%2088.838,178.829%2081.97,176.055L81.97,124.327C88.838,121.555%2093.689,114.834%2093.689,106.972C93.689,106.013%2093.594,105.078%2093.454,104.158L138.701,78.034C141.911,80.621%20145.989,82.178%20150.433,82.178C154.795,82.178%20158.8,80.675%20161.98,78.173L207.663,104.548C207.56,105.344%20207.489,106.149%20207.489,106.972C207.489,114.548%20211.999,121.057%20218.473,124.005L218.473,176.379C212,179.323%20207.49,185.832%20207.49,193.411Z'%20style='fill:white;fill-rule:nonzero;'/%3e%3cpath%20d='M169.342,139.168C169.342,128.816%20160.948,120.418%20150.594,120.418C140.236,120.418%20131.84,128.816%20131.84,139.168C131.84,146.598%20136.171,152.994%20142.434,156.03L142.434,179.959L158.752,179.959L158.752,156.03C165.013,152.994%20169.342,146.599%20169.342,139.168'%20style='fill:rgb(69,210,249);'/%3e%3c/g%3e%3c/svg%3e")}._icon-coinbase_149jw_34,._icon-wallet-link_149jw_35{background-image:url("data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%201250%201250'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;'%3e%3cpath%20d='M145.833,625.001c0,-264.46%20214.708,-479.168%20479.168,-479.168c264.458,0%20479.166,214.708%20479.166,479.168c-0,264.458%20-214.708,479.166%20-479.166,479.166c-264.46,-0%20-479.168,-214.708%20-479.168,-479.166Z'%20style='fill:url(%23_Linear1);'/%3e%3cpath%20d='M624.617,346.7c153.386,-0%20277.916,124.53%20277.916,277.917c0,153.386%20-124.53,277.916%20-277.916,277.916c-153.387,0%20-277.917,-124.53%20-277.917,-277.916c-0,-153.387%20124.53,-277.917%20277.917,-277.917Zm91.318,208.515c0,-12.096%20-9.821,-21.916%20-21.917,-21.916l-138.803,-0c-12.096,-0%20-21.916,9.82%20-21.916,21.916l-0,138.803c-0,12.096%209.82,21.917%2021.916,21.917l138.803,0c12.096,0%2021.917,-9.821%2021.917,-21.917l0,-138.803Z'%20style='fill:%23fff;'/%3e%3cdefs%3e%3clinearGradient%20id='_Linear1'%20x1='0'%20y1='0'%20x2='1'%20y2='0'%20gradientUnits='userSpaceOnUse'%20gradientTransform='matrix(5.8681e-14,-958.333,958.333,5.8681e-14,625.001,1104.17)'%3e%3cstop%20offset='0'%20style='stop-color:%23124bdc;stop-opacity:1'/%3e%3cstop%20offset='1'%20style='stop-color:%232d65f8;stop-opacity:1'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")}._icon-google_149jw_39{background-image:url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1013_5889)'%3e%3cpath%20d='M12%2010.2725V13.9516H17.1127C16.8882%2015.1347%2016.2145%2016.1366%2015.2041%2016.8102L18.2872%2019.2025C20.0836%2017.5444%2021.1199%2015.1089%2021.1199%2012.2157C21.1199%2011.5421%2021.0595%2010.8943%2020.9472%2010.2726L12%2010.2725Z'%20fill='%234285F4'/%3e%3cpath%20d='M6.67582%2013.8081L5.98045%2014.3404L3.51904%2016.2576C5.08222%2019.3581%208.28607%2021.4999%2011.9997%2021.4999C14.5646%2021.4999%2016.715%2020.6536%2018.2869%2019.2027L15.2037%2016.8104C14.3574%2017.3804%2013.2778%2017.7259%2011.9997%2017.7259C9.5297%2017.7259%207.43112%2016.0591%206.6797%2013.8136L6.67582%2013.8081Z'%20fill='%2334A853'/%3e%3cpath%20d='M3.51902%207.74219C2.87132%209.02032%202.5%2010.4626%202.5%2011.9999C2.5%2013.5371%202.87132%2014.9794%203.51902%2016.2575C3.51902%2016.2661%206.67998%2013.8048%206.67998%2013.8048C6.48998%2013.2348%206.37768%2012.6303%206.37768%2011.9998C6.37768%2011.3692%206.48998%2010.7647%206.67998%2010.1947L3.51902%207.74219Z'%20fill='%23FBBC05'/%3e%3cpath%20d='M11.9999%206.28272C13.399%206.28272%2014.6426%206.76635%2015.6358%207.69909L18.3562%204.97867C16.7067%203.44142%2014.5649%202.5%2011.9999%202.5C8.28627%202.5%205.08222%204.63318%203.51904%207.74228L6.67991%2010.195C7.43123%207.94953%209.52989%206.28272%2011.9999%206.28272Z'%20fill='%23EA4335'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1013_5889'%3e%3crect%20width='19'%20height='19'%20fill='white'%20transform='translate(2.5%202.5)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e")}._icon-discord_149jw_43{background-image:url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1013_5875)'%3e%3cpath%20d='M18.6534%205.99368C17.4294%205.44168%2016.1174%205.03368%2014.7454%204.80168C14.7332%204.79933%2014.7205%204.80084%2014.7092%204.806C14.6979%204.81116%2014.6884%204.81972%2014.6822%204.83048C14.5142%205.12568%2014.327%205.51048%2014.1958%205.81448C12.7407%205.59707%2011.2613%205.59707%209.8062%205.81448C9.66007%205.47756%209.49528%205.14906%209.3126%204.83048C9.30641%204.81958%209.29704%204.81084%209.28575%204.8054C9.27445%204.79997%209.26177%204.79811%209.2494%204.80008C7.8782%205.03208%206.5662%205.44008%205.3414%205.99288C5.33086%205.9973%205.32193%206.00483%205.3158%206.01448C2.8262%209.67448%202.1438%2013.2441%202.479%2016.7689C2.47993%2016.7775%202.48261%2016.7859%202.48687%2016.7934C2.49114%2016.801%202.4969%2016.8076%202.5038%2016.8129C3.95691%2017.8708%205.57767%2018.6767%207.2982%2019.1969C7.31019%2019.2006%207.32302%2019.2006%207.33501%2019.1968C7.347%2019.1931%207.35759%2019.1859%207.3654%2019.1761C7.73563%2018.6809%208.06372%2018.1556%208.3462%2017.6057C8.35012%2017.5982%208.35238%2017.5899%208.35282%2017.5814C8.35327%2017.5729%208.35189%2017.5645%208.34878%2017.5566C8.34567%2017.5487%208.3409%2017.5416%208.3348%2017.5357C8.32869%2017.5298%208.3214%2017.5253%208.3134%2017.5225C7.7966%2017.3279%207.29587%2017.093%206.8158%2016.8201C6.80717%2016.8152%206.7999%2016.8082%206.79464%2016.7997C6.78938%2016.7913%206.7863%2016.7817%206.78566%2016.7718C6.78503%2016.7619%206.78687%2016.752%206.79101%2016.7429C6.79515%2016.7339%206.80147%2016.7261%206.8094%2016.7201C6.9102%2016.6457%207.011%2016.5681%207.107%2016.4905C7.11564%2016.4835%207.12605%2016.4791%207.13707%2016.4776C7.14808%2016.4762%207.15928%2016.4779%207.1694%2016.4825C10.311%2017.8937%2013.7134%2017.8937%2016.8182%2016.4825C16.8283%2016.4776%2016.8397%2016.4757%2016.8508%2016.477C16.862%2016.4783%2016.8726%2016.4827%2016.8814%2016.4897C16.9774%2016.5681%2017.0774%2016.6457%2017.179%2016.7201C17.187%2016.7259%2017.1934%2016.7337%2017.1977%2016.7426C17.202%2016.7516%2017.204%2016.7615%2017.2035%2016.7714C17.203%2016.7813%2017.2001%2016.7909%2017.195%2016.7994C17.1899%2016.8079%2017.1827%2016.815%2017.1742%2016.8201C16.6958%2017.0953%2016.1982%2017.3281%2015.6758%2017.5217C15.6678%2017.5246%2015.6605%2017.5292%2015.6544%2017.5351C15.6483%2017.5411%2015.6435%2017.5483%2015.6404%2017.5563C15.6373%2017.5642%2015.6359%2017.5727%2015.6364%2017.5812C15.6368%2017.5898%2015.6391%2017.5981%2015.643%2017.6057C15.931%2018.1553%2016.2606%2018.6785%2016.623%2019.1753C16.6305%2019.1855%2016.641%2019.1931%2016.6531%2019.1971C16.6651%2019.2011%2016.6781%2019.2013%2016.6902%2019.1977C18.4137%2018.679%2020.0371%2017.8727%2021.4918%2016.8129C21.4989%2016.8079%2021.5049%2016.8015%2021.5093%2016.794C21.5137%2016.7866%2021.5165%2016.7783%2021.5174%2016.7697C21.9174%2012.6945%2020.847%209.15368%2018.6782%206.01608C18.6729%206.00588%2018.6641%205.99793%2018.6534%205.99368ZM8.8158%2014.6225C7.8702%2014.6225%207.0902%2013.7673%207.0902%2012.7185C7.0902%2011.6689%207.855%2010.8145%208.8158%2010.8145C9.7838%2010.8145%2010.5566%2011.6761%2010.5414%2012.7185C10.5414%2013.7681%209.7766%2014.6225%208.8158%2014.6225V14.6225ZM15.1958%2014.6225C14.2494%2014.6225%2013.4702%2013.7673%2013.4702%2012.7185C13.4702%2011.6689%2014.2342%2010.8145%2015.1958%2010.8145C16.1638%2010.8145%2016.9366%2011.6761%2016.9214%2012.7185C16.9214%2013.7681%2016.1646%2014.6225%2015.1958%2014.6225V14.6225Z'%20fill='%235865F2'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1013_5875'%3e%3crect%20width='19.2'%20height='19.2'%20fill='white'%20transform='translate(2.3999%202.3999)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e")}._icon-apple_149jw_47{background-image:url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1013_5872)'%3e%3cpath%20d='M19.7521%2017.3068C19.4648%2017.9706%2019.1247%2018.5816%2018.7306%2019.1434C18.1935%2019.9092%2017.7537%2020.4393%2017.4147%2020.7337C16.8893%2021.2169%2016.3264%2021.4644%2015.7236%2021.4784C15.2908%2021.4784%2014.7689%2021.3553%2014.1614%2021.1055C13.5519%2020.8568%2012.9917%2020.7337%2012.4796%2020.7337C11.9424%2020.7337%2011.3664%2020.8568%2010.7502%2021.1055C10.133%2021.3553%209.63589%2021.4855%209.25579%2021.4984C8.67771%2021.523%208.10152%2021.2685%207.52637%2020.7337C7.15929%2020.4135%206.70013%2019.8647%206.15009%2019.0871C5.55994%2018.2567%205.07475%2017.2939%204.69464%2016.1961C4.28756%2015.0104%204.0835%2013.8622%204.0835%2012.7507C4.0835%2011.4773%204.35864%2010.3791%204.90974%209.45884C5.34285%208.71962%205.91905%208.1365%206.6402%207.70843C7.36136%207.28035%208.14057%207.06221%208.97971%207.04825C9.43886%207.04825%2010.041%207.19028%2010.7892%207.46941C11.5354%207.74947%2012.0145%207.8915%2012.2245%207.8915C12.3815%207.8915%2012.9138%207.72543%2013.816%207.39435C14.6692%207.08731%2015.3893%206.96018%2015.9792%207.01026C17.5778%207.13926%2018.7787%207.76941%2019.5774%208.90469C18.1477%209.77092%2017.4405%2010.9842%2017.4546%2012.5406C17.4675%2013.7529%2017.9073%2014.7618%2018.7717%2015.5628C19.1634%2015.9346%2019.6008%2016.2219%2020.0876%2016.426C19.982%2016.7321%2019.8706%2017.0253%2019.7521%2017.3068V17.3068ZM16.086%202.88011C16.086%203.83033%2015.7388%204.71754%2015.0468%205.53874C14.2118%206.51498%2013.2018%207.0791%2012.1065%206.99008C12.0926%206.87609%2012.0845%206.75611%2012.0845%206.63003C12.0845%205.71782%2012.4816%204.74158%2013.1868%203.94337C13.5389%203.53922%2013.9866%203.20318%2014.5296%202.93511C15.0715%202.67104%2015.584%202.52501%2016.066%202.5C16.0801%202.62703%2016.086%202.75407%2016.086%202.8801V2.88011Z'%20fill='black'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1013_5872'%3e%3crect%20width='19'%20height='19'%20fill='white'%20transform='translate(2.5%202.5)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e")}._icon-x_149jw_51{background-image:url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.5081%204.50732H20.1788L14.3442%2011.1759L21.2082%2020.2504H15.8337L11.6243%2014.7468L6.80771%2020.2504H4.13543L10.3761%2013.1176L3.7915%204.50732H9.30238L13.1074%209.53784L17.5081%204.50732ZM16.5708%2018.6519H18.0507L8.49827%206.02189H6.91024L16.5708%2018.6519Z'%20fill='black'/%3e%3c/svg%3e")}._container_16sx6_1{display:flex;flex-direction:column;width:100%;margin-bottom:24px}._label_16sx6_8{color:#ffffffb3;font-size:12px;font-weight:500;text-transform:uppercase;letter-spacing:.5px;margin-bottom:8px}._inputWrapper_16sx6_17{display:flex;align-items:center;gap:12px}._input_16sx6_17{flex:1;background:#ffffff1a;border:1px solid rgba(255,255,255,.2);border-radius:8px;padding:14px 16px;color:#fff;font-size:16px;outline:none;transition:border-color .2s,background-color .2s}._input_16sx6_17::placeholder{color:#ffffff80}._input_16sx6_17:focus{border-color:#fff6;background:#ffffff26}._input_16sx6_17:disabled{opacity:.6;cursor:not-allowed}._nextButton_16sx6_49{position:relative;background:#ff2d55;color:#fff;border:none;border-radius:8px;padding:14px 28px;font-size:14px;font-weight:600;letter-spacing:.5px;cursor:pointer;transition:background-color .2s,opacity .2s;min-width:90px;display:flex;align-items:center;justify-content:center}._textHidden_16sx6_67{visibility:hidden}._nextButton_16sx6_49:hover:not(:disabled){background:#e6284d}._nextButton_16sx6_49:disabled{opacity:.5;cursor:not-allowed}._spinner_16sx6_80{position:absolute;width:18px;height:18px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:_spin_16sx6_80 .8s linear infinite}@keyframes _spin_16sx6_80{to{transform:rotate(360deg)}}._inputError_16sx6_96{border-color:#ff6b6b}._inputError_16sx6_96:focus{border-color:#ff6b6b}._error_16sx6_104{color:#ff6b6b;font-size:13px;margin:8px 0 0}._error_16sx6_104:before{content:"⚠";margin-right:6px}._errorLogo_eokec_1{width:40px;height:40px;background-repeat:no-repeat;background-size:cover;background-position:right;background-image:url("data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cellipse%20cx='12'%20cy='12.5'%20rx='12'%20ry='12'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M15.6464%208.90655C15.9808%209.24055%2015.9806%209.78182%2015.6458%2010.1155L9.6422%2016.0993C9.30741%2016.433%208.76486%2016.4328%208.43038%2016.0988C8.0959%2015.7648%208.09615%2015.2235%208.43095%2014.8898L14.4345%208.90599C14.7693%208.5723%2015.3119%208.57255%2015.6464%208.90655Z'%20fill='%23FCFCFC'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M15.6464%2016.099C15.3119%2016.433%2014.7693%2016.4332%2014.4345%2016.0996L8.43095%2010.1157C8.09616%209.78204%208.0959%209.24077%208.43038%208.90677C8.76486%208.57277%209.30741%208.57252%209.64221%208.9062L15.6458%2014.89C15.9806%2015.2237%2015.9808%2015.765%2015.6464%2016.099Z'%20fill='%23FCFCFC'/%3e%3c/svg%3e")}._logo_eokec_10{width:40px;height:40px;background-image:url("data:image/svg+xml,%3csvg%20width='40'%20height='40'%20viewBox='0%200%2040%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20%2040C31.0457%2040%2040%2031.0457%2040%2020C40%208.9543%2031.0457%200%2020%200C8.9543%200%200%208.9543%200%2020C0%2031.0457%208.9543%2040%2020%2040Z'%20fill='url(%23paint0_linear_997_9740)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M8%2036C11.34%2038.51%2015.5%2040%2020%2040C24.5%2040%2028.66%2038.51%2032%2036H8Z'%20fill='%23FF2D55'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.00049%2032C5.14049%2033.51%206.49049%2034.86%208.00049%2036H32.0005C33.5105%2034.86%2034.8605%2033.51%2036.0005%2032H4.00049Z'%20fill='%23FFA25A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M26.8304%2028H1.67041C2.29041%2029.43%203.08041%2030.77%204.00041%2032H26.8404V28H26.8304Z'%20fill='%23FFC95B'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14.1704%2013V28H26.6704L14.1704%2013Z'%20fill='url(%23paint1_linear_997_9740)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M1.67041%2028H14.1704V13L1.67041%2028Z'%20fill='%23FCFCFC'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M26.8301%2021.0005V32.0005H36.0001L26.8301%2021.0005Z'%20fill='url(%23paint2_linear_997_9740)'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M17.6699%2032.0005H26.8299V21.0005L17.6699%2032.0005Z'%20fill='%23FCFCFC'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M26.8301%2018C29.5915%2018%2031.8301%2015.7614%2031.8301%2013C31.8301%2010.2386%2029.5915%208%2026.8301%208C24.0687%208%2021.8301%2010.2386%2021.8301%2013C21.8301%2015.7614%2024.0687%2018%2026.8301%2018Z'%20fill='%23FFC95B'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M14.1699%2010C15.5506%2010%2016.6699%208.88071%2016.6699%207.5C16.6699%206.11929%2015.5506%205%2014.1699%205C12.7892%205%2011.6699%206.11929%2011.6699%207.5C11.6699%208.88071%2012.7892%2010%2014.1699%2010Z'%20fill='%23FFC95B'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_997_9740'%20x1='20'%20y1='-8.28426'%20x2='-8.28426'%20y2='20'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23FF2D55'/%3e%3cstop%20offset='1'%20stop-color='%23FFBC5B'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_997_9740'%20x1='14.1662'%20y1='13'%20x2='14.1662'%20y2='28'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A524B3'/%3e%3cstop%20offset='1'%20stop-color='%23FF2D55'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_997_9740'%20x1='26.827'%20y1='21.0005'%20x2='26.827'%20y2='32.0005'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A524B3'/%3e%3cstop%20offset='1'%20stop-color='%23FF2D55'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e")}._title_eokec_16{font-size:36px;font-weight:600;line-height:44px;margin-top:32px}._subtitle_eokec_23,._description_eokec_30{font-size:24px;font-weight:400;line-height:29.05px;margin-top:16px}._closeWindow_eokec_37{font-size:16px;font-weight:400;margin-top:40px}._errorMessage_eokec_43{padding:15px;border-radius:10px;margin-top:30px;line-break:anywhere;background-color:#201116bf;color:#fff;display:flex;align-items:flex-start;gap:8px}@media (max-width: 767px){._errorMessage_eokec_43{padding:15px;border-radius:10px;margin-top:30px;background-color:var(--primary);color:#fff}}.CustomWearablePreview{position:relative;width:100%;height:100%}.CustomWearablePreview .WearablePreview{background-color:unset}._main_1urbu_1{font-family:system-ui,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;color:var(--text);position:absolute;display:grid;grid-template-columns:50% 50%;height:100%;width:100%;justify-content:space-evenly}._left_1urbu_12{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;height:100%;width:100%;max-width:500px;margin-left:150px}._right_1urbu_23{height:100%}._right_1urbu_23 .CustomWearablePreview{right:8%}._changeAccount_1urbu_31{margin-top:150px;border-top:1px solid white;padding-top:20px;width:350px}._changeAccount_1urbu_31 a{color:#fff;text-decoration:underline;font-size:16px}@media (max-width: 767px){._main_1urbu_1{display:flex;flex-direction:column}._left_1urbu_12{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;max-width:inherit;width:100%;padding:20px;margin-left:0}}._container_15kql_1{font-family:system-ui,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;width:100%;height:100vh;display:flex;overflow:hidden}._background_15kql_9{position:fixed;height:100vh;width:100vw;background-size:cover;background-repeat:no-repeat;background-position:right;background-image:url(https://cdn.decentraland.org/@dcl/auth-site/4.12.1-23265207440.commit-a5ffaee/assets/background-q68SxPSF.svg);z-index:-1}._left_15kql_20{flex:1;padding:1rem;color:#fff;display:flex;justify-content:center;align-items:center}._errorMessage_15kql_29{padding:15px;border-radius:10px;margin-top:30px;background-color:var(--primary);line-break:anywhere;color:#fff}._fieldLabel_15kql_38{color:#fff!important;opacity:70%;display:block;margin-bottom:4px;font-size:14px;font-weight:500}._fieldInput_15kql_47{width:100%;background:transparent;border:none;color:#fff;font-size:16px;padding:8px 0;outline:none}._fieldMessage_15kql_57{color:#fff!important;opacity:70%;margin-top:4px;font-size:13px}._field_15kql_38{margin-bottom:16px}._checkbox_15kql_68{width:18px;height:18px;margin-right:10px;cursor:pointer;accent-color:white}._randomizeButton_15kql_76{display:flex;align-items:center;justify-content:center;gap:8px}._container_15kql_1 input{border-bottom:2px solid rgba(255,255,255,.7)!important}._container_15kql_1 input::placeholder{color:#fff!important;opacity:70%}._leftInner_15kql_92{max-width:500px;display:flex;flex-direction:column}._logo_15kql_98{width:64px;height:64px}._title_15kql_103{font-size:30px;font-weight:600;line-height:36px;margin-top:24px}._subtitle_15kql_110{font-size:30px;font-weight:400;line-height:36px}._meetYourAvatar_15kql_116{font-size:18px;font-weight:600;line-height:22px;margin-top:24px}._meetYourAvatarDescription_15kql_123{font-size:14px;font-weight:400;line-height:17px;margin-top:24px}._randomize_15kql_76{margin-top:16px}._continue_15kql_135{width:75%;margin-top:24px}._logoSmall_15kql_140{width:40px;height:40px}._back_15kql_9{margin-top:26px;display:flex;align-items:center;gap:8px;cursor:pointer}._back_15kql_9>span{font-size:14px;font-weight:600;line-height:18px}._name_15kql_159{margin-top:24px}._agree_15kql_163{margin-top:24px;display:flex;align-items:center}._agree_15kql_163 a{color:#fff;font-weight:700;text-decoration:underline}._error_15kql_29{display:flex;align-items:center;gap:4px}._error_15kql_29>img{width:16px;height:16px}._emailError_15kql_187{margin-bottom:8px}._agreeError_15kql_191{opacity:70%;margin-top:8px;font-size:15px}._jumpIn_15kql_197{margin-top:24px}._right_15kql_201{flex:1;width:100%;position:relative;right:6.3%}@media screen and (max-width: 768px){._container_15kql_1{overflow:unset;height:unset}._mobileContainer_15kql_214{padding:24px;color:#fff}._meetYourAvatar_15kql_116,._meetYourAvatarDescription_15kql_123{margin-top:12px}._mobilePreviewContainer_15kql_227{position:relative;display:flex;flex-direction:column}._mobilePreviewOverlay_15kql_233{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:10}._mobilePreviewContainer_15kql_227 .CustomWearablePreview{height:500px}._mobileButtons_15kql_247{display:flex;gap:16px}._randomize_15kql_76{flex:1;margin-top:0}._continue_15kql_135{flex:1;margin-top:0;width:unset}._mobileCompleteYourProfile_15kql_263{margin-top:47px}._agree_15kql_163{display:flex}}._main_qbssu_1{background-color:#000;width:100%;height:100%}._warningImage_1yr2e_1{height:64px;width:64px;margin-bottom:24px}._content_1yr2e_7{display:flex;flex-direction:column;align-items:center}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}html{height:100%;overflow-x:hidden}body{margin:0;min-width:100%;min-height:100dvh;min-height:100vh;height:100%;overflow-x:hidden}#root{height:100%;min-height:100%}
|