@dcl/auth-site 4.11.1 → 4.11.2-22147838408.commit-6a0fdff
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-D3z0Ivcf.js → ConstantsUtil-C_K1SnKP.js} +1 -1
- package/assets/{ContentfulRichText-CwpvNDfp.js → ContentfulRichText-D7cvqZqg.js} +1 -1
- package/assets/{ExchangeController-CTLvTe3M.js → ExchangeController-BKXFD5n3.js} +1 -1
- package/assets/{HelpersUtil-DH_bWYgR.js → HelpersUtil-DhM-iGQ8.js} +1 -1
- package/assets/{NetworkUtil-CvUeN6SC.js → NetworkUtil-CqZCcssm.js} +1 -1
- package/assets/{SwapController-VNxvM-ru.js → SwapController-DVI2as9x.js} +1 -1
- package/assets/{biconomy-uWrBqu14.js → biconomy-_l5k1QFR.js} +1 -1
- package/assets/{ccip-Ck0vdRb6.js → ccip-Db3Qm8Vz.js} +1 -1
- package/assets/{data-capture-DxdkC-zs.js → data-capture-CGm5GYdr.js} +1 -1
- package/assets/{email-m-hvq9yR.js → email-NPKm8bgI.js} +1 -1
- package/assets/{embedded-wallet-DXYZl8dW.js → embedded-wallet-CKcD2_oV.js} +1 -1
- package/assets/{engine-BP9MbTaa.js → engine-BushGAHS.js} +1 -1
- package/assets/{extractIPFS-BlR9XZBt.js → extractIPFS-CqyC14nL.js} +1 -1
- package/assets/{features-DjfnSO5o.js → features-CntsZnkL.js} +1 -1
- package/assets/{fortmatic-D4w5-MB9.js → fortmatic-Bt8Fcu-T.js} +1 -1
- package/assets/{getInstalledModules-BA7RCafO.js → getInstalledModules-DEFUlnhB.js} +1 -1
- package/assets/{if-defined-c44XlOr2.js → if-defined-D_hYwNPf.js} +1 -1
- package/assets/{in-app-wallet-calls-DWwXEW-I.js → in-app-wallet-calls-DbPzZopg.js} +1 -1
- package/assets/{index-Bn3JX8yK.js → index-70czSl7P.js} +1 -1
- package/assets/index-85xIh8VB.css +1 -0
- package/assets/{index-DJBFB3mB.js → index-B3wiCJNu.js} +1 -1
- package/assets/{index-CjVg1Y56.js → index-BBqQD5Df.js} +1 -1
- package/assets/{index-Dg3K1Vw3.js → index-BJsO_lau.js} +4 -4
- package/assets/{index-B4r2T0V7.js → index-BQkvzpAz.js} +1 -1
- package/assets/{index-CMByj6EO.js → index-BTVrkTvz.js} +1 -1
- package/assets/{index-CQ3wP0_P.js → index-BVnlkGy_.js} +1 -1
- package/assets/{index-z_PZPv2z.js → index-BcPJh_uW.js} +1 -1
- package/assets/{index-C5HCss9t.js → index-BiEDTNxz.js} +1 -1
- package/assets/{index-Du-zsiof.js → index-BrktIKr6.js} +1 -1
- package/assets/{index-B8V_Gua3.js → index-BvEQCU2R.js} +1 -1
- package/assets/{index-ooAMiJ4y.js → index-C1vclBA-.js} +1 -1
- package/assets/{index-DXE0HB_s.js → index-CLl82xyi.js} +1 -1
- package/assets/index-CPD4QoJl.js +1 -0
- package/assets/{index-rUP73pzB.js → index-CVHrGrAd.js} +180 -176
- package/assets/{index-BK4EaQoQ.js → index-CW-NyuqI.js} +1 -1
- package/assets/{index-hv8BmCVq.js → index-CeX3QpcR.js} +1 -1
- package/assets/{index-B7S3qNGA.js → index-Cgket37h.js} +1 -1
- package/assets/{index-BpA6Si5_.js → index-CgtPi5eV.js} +1 -1
- package/assets/{index-B_hPWAv-.js → index-CkUSAaWv.js} +3 -3
- package/assets/{index-CZXXMblS.js → index-CpYCQTz1.js} +1 -1
- package/assets/{index-CkBzHXTa.js → index-CrJ0KZX-.js} +1 -1
- package/assets/{index-ByvTWpYB.js → index-Cuz4eb5l.js} +1 -1
- package/assets/{index-BSDoeqBk.js → index-CzizMSLh.js} +1 -1
- package/assets/{index-BkHQ3jRF.js → index-D4BkODlj.js} +1 -1
- package/assets/{index-DtxEqR9I.js → index-DCs1R-5H.js} +1 -1
- package/assets/{index-CI9qYMNa.js → index-DTXV3RIH.js} +1 -1
- package/assets/{index-DrzZEjxU.js → index-DUYQUJtF.js} +2 -2
- package/assets/{index-LXq3A1tO.js → index-D_K6LAzY.js} +1 -1
- package/assets/{index-COGXVD6s.js → index-DuLpoTCS.js} +1 -1
- package/assets/{index-BTpLgKXg.js → index-DzNC2WEc.js} +1 -1
- package/assets/{index-BHPGJDn1.js → index-Lmx9xS3j.js} +1 -1
- package/assets/{index-DXxU6Q6U.js → index-O2-NnXm1.js} +1 -1
- package/assets/{index-C5UHmImP.js → index-RLQ8trXC.js} +1 -1
- package/assets/{index-CWtZsUgg.js → index-UlZA1Kcj.js} +1 -1
- package/assets/{index-BfOpfRfr.js → index-VV3QxQlT.js} +1 -1
- package/assets/{index-DgLFkUD1.js → index-Z2tzVExf.js} +1 -1
- package/assets/{index-DxwRNqgX.js → index-fovbPRLG.js} +1 -1
- package/assets/{index-lGPNwbxe.js → index-kIUXSgnA.js} +1 -1
- package/assets/{index-Db4gjeSL.js → index-z2k9-LrZ.js} +1 -1
- package/assets/{networks-D_o5yDwd.js → networks-CJcotx5e.js} +1 -1
- package/assets/{onramp-IF4ngNfj.js → onramp-DD-HHTU2.js} +1 -1
- package/assets/{openzeppelin-Dx6i2B2r.js → openzeppelin-BJrVwg-K.js} +1 -1
- package/assets/{parse-typed-data-DFH4Wadf.js → parse-typed-data-B4oF8vZ-.js} +1 -1
- package/assets/{passkeys-B7dJQJDN.js → passkeys-DnaNEVFD.js} +1 -1
- package/assets/{pay-with-exchange-e-xM6cxq.js → pay-with-exchange-DJW46eff.js} +1 -1
- package/assets/{receive-DcGe3k64.js → receive-CHThFYLO.js} +1 -1
- package/assets/{ref-tRykIzet.js → ref-BIMXqnvv.js} +1 -1
- package/assets/{resolveImplementation-CY2AZ4BU.js → resolveImplementation-BrMPklf8.js} +1 -1
- package/assets/{secp256k1-BNq3uWuW.js → secp256k1-DSxHFf2j.js} +1 -1
- package/assets/{send-WJTqnbjw.js → send-BVdA5jqJ.js} +1 -1
- package/assets/{send-eip712-transaction-CwY5vZTA.js → send-eip712-transaction-B0Ed5W9G.js} +1 -1
- package/assets/{send-gasless-transaction-Hnb2WBcO.js → send-gasless-transaction-B_LrslW2.js} +2 -2
- package/assets/{socials-BQk98Z9K.js → socials-DfDHhY30.js} +1 -1
- package/assets/{swaps-DyVYpdw2.js → swaps-BuSfLQpv.js} +1 -1
- package/assets/{thirdweb-D6clKR4w.js → thirdweb-DVPvYSAe.js} +3 -3
- package/assets/{transactions-Bl3b8qIX.js → transactions-qYSa16pm.js} +1 -1
- package/assets/{ui-byNMPSE1.css → ui-Cg2KU6mE.css} +3 -3
- package/assets/{ui-DNHWrHSH.js → ui-xtM5k7h3.js} +5 -5
- package/assets/{vendor-BgiNx-Ph.js → vendor-BFHicODy.js} +1 -1
- package/assets/{verifyHash-B-nU7EV3.js → verifyHash-Cq1jWSNg.js} +3 -3
- package/assets/{w3m-modal-B205prEk.js → w3m-modal-Br99BBQB.js} +1 -1
- package/assets/{web-connector-BKWKHTzg.js → web-connector-CQnOoVv7.js} +3 -3
- package/index.html +6 -6
- package/package.json +3 -3
- package/assets/index-B6Hui9GU.js +0 -5
- package/assets/index-BEPqkRql.js +0 -1
- package/assets/index-CY-fRScv.css +0 -1
- package/assets/index-dCX8yVbC.js +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{K as w,ai as p,i as g,r as X,T as b,m as y,_ as I,aj as Z,b as P,A as M,ad as z,y as W,j as ee,ak as v,al as $,am as te}from"./thirdweb-D6clKR4w.js";import{a as ae}from"./types-DC0Zmj1B.js";import{p as G}from"./parse-typed-data-DFH4Wadf.js";const x={async getItem(a){try{if(typeof window<"u"&&window.localStorage)return localStorage.getItem(a)}catch{}return null},async removeItem(a){typeof window<"u"&&window.localStorage&&localStorage.removeItem(a)},async setItem(a,e){try{typeof window<"u"&&window.localStorage&&localStorage.setItem(a,e)}catch{}}},ne="/sdk/2022-08-12/embedded-wallet",A=a=>`thirdwebEwsWalletUserId-${a}`,ie="walletToken",T=a=>`${ie}-${a}`,j=a=>`passkey-credential-id-${a}`,re="a",E=(a,e)=>`${re}-${a}-${e}`,D=a=>`walletConnectSessions-${a}`,U=a=>`thirdweb_guest_session_id_${a}`,F=new Map;class V{constructor({storage:e,clientId:t,ecosystem:n}){Object.defineProperty(this,"key",{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,"ecosystem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.storage=e,this.key=se(t,n==null?void 0:n.id),this.ecosystem=n}async getItem(e){return this.storage?this.storage.getItem(e):F.get(e)??null}async setItem(e,t){if(this.storage)return this.storage.setItem(e,t);F.set(e,t)}async removeItem(e){const t=await this.getItem(e);return this.storage&&t?(this.storage.removeItem(e),!0):!1}async getWalletConnectSessions(){return this.getItem(D(this.key))}async saveWalletConnectSessions(e){await this.setItem(D(this.key),e)}async savePasskeyCredentialId(e){await this.setItem(j(this.key),e)}async getPasskeyCredentialId(){return this.getItem(j(this.key))}async saveAuthCookie(e){await this.setItem(T(this.key),e)}async getAuthCookie(){return this.getItem(T(this.key))}async removeAuthCookie(){return this.removeItem(T(this.key))}async saveDeviceShare(e,t){await this.saveWalletUserId(t),await this.setItem(E(this.key,t),e)}async getDeviceShare(){const e=await this.getWalletUserId();return e?this.getItem(E(this.key,e)):null}async removeDeviceShare(){const e=await this.getWalletUserId();return e?this.removeItem(E(this.key,e)):!1}async getWalletUserId(){return this.getItem(A(this.key))}async saveWalletUserId(e){await this.setItem(A(this.key),e)}async removeWalletUserId(){return this.removeItem(A(this.key))}async getGuestSessionId(){return this.getItem(U(this.key))}async saveGuestSessionId(e){await this.setItem(U(this.key),e)}}const se=(a,e)=>`${a}${e?`-${e}`:""}`,S=new Map,oe={getItem:async a=>S.get(a)??null,removeItem:async a=>{S.delete(a)},setItem:async(a,e)=>{S.set(a,e)}};async function O({authToken:a,client:e,ecosystem:t}){const r=await w(e,t)(`${p("inAppWallet")}/api/2024-05-05/accounts`,{headers:{Authorization:`Bearer embedded-wallet-token:${a}`,"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 ce=p("inAppWallet"),le=`${ce}/`,H=`${le}api/2023-10-20`,ue=`${H}/embedded-wallet/validate-custom-jwt`,de=`${H}/embedded-wallet/validate-custom-auth-endpoint`,q=(a,e)=>e instanceof Error?`${a}: ${e.message}`:`${a}: ${g(e)}`;async function he(a){const t=await w(a.client,a.ecosystem)(de,{body:g({developerClientId:a.client.clientId,payload:a.payload}),headers:{"Content-Type":"application/json"},method:"POST"});if(!t.ok){const n=await t.json();throw new Error(`Custom auth endpoint authentication error: ${n.message}`)}try{const{verifiedToken:n}=await t.json();return{storedToken:n}}catch(n){throw new Error(q("Malformed response from post auth_endpoint authentication",n))}}const Q=a=>{if(!ae.includes(a))throw new Error(`Unknown auth option ${a}`);switch(a){case"wallet":return"siwe";default:return a}},k=({authOption:a,client:e,ecosystem:t,mode:n="popup",redirectUrl:r})=>{if(n==="popup"&&r)throw new Error("Redirect URL is not supported for popup mode");if(n==="window"&&!r)throw new Error("Redirect URL is required for window mode");const l=Q(a);let o=`${p("inAppWallet")}/api/2024-05-05/login/${l}?clientId=${e.clientId}`;if(t!=null&&t.partnerId?o=`${o}&ecosystemId=${t.id}&ecosystemPartnerId=${t.partnerId}`:t&&(o=`${o}&ecosystemId=${t.id}`),n!=="popup"){const i=new URL(r||window.location.href);i.searchParams.set("walletId",(t==null?void 0:t.id)||"inApp"),i.searchParams.set("authProvider",a),o=`${o}&redirectUrl=${encodeURIComponent(i.toString())}`}return o},C=({authOption:a,client:e,ecosystem:t})=>{const n=Q(a);let r=`${p("inAppWallet")}/api/2024-05-05/login/${n}/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 we(a){const e=w(a.client,a.ecosystem),t=k({authOption:"backend",client:a.client,ecosystem:a.ecosystem}),n=await e(`${t}`,{body:g({walletSecret:a.walletSecret}),headers:{"Content-Type":"application/json"},method:"POST"});if(!n.ok){const r=await n.text();throw new Error(`Failed to generate backend account: ${r}`)}return await n.json()}async function pe(a){let e=await a.storage.getGuestSessionId();e||(e=X(32),a.storage.saveGuestSessionId(e));const t=w(a.client,a.ecosystem),n=C({authOption:"guest",client:a.client,ecosystem:a.ecosystem}),r=await t(`${n}`,{body:g({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 ge(a){const t=await w(a.client,a.ecosystem)(ue,{body:g({developerClientId:a.client.clientId,jwt:a.jwt}),headers:{"Content-Type":"application/json"},method:"POST"});if(!t.ok){const n=await t.json();throw new Error(`JWT authentication error: ${n.message}`)}try{const{verifiedToken:n}=await t.json();return{storedToken:n}}catch(n){throw new Error(q("Malformed response from post jwt authentication",n))}}async function me({client:a,ecosystem:e,tokenToLink:t,storage:n}){const r=w(a,e),l=p("inAppWallet"),o=await n.getAuthCookie();if(!o)throw new Error("Failed to link account, no user logged in");const i={Authorization:`Bearer iaw-auth-token:${o}`,"Content-Type":"application/json"},c=await r(`${l}/api/2024-05-05/account/connect`,{body:g({accountAuthTokenToConnect:t}),headers:i,method:"POST"});if(!c.ok){const u=await c.json();throw new Error(u.message||"Failed to link account.")}const{linkedAccounts:s}=await c.json();return s??[]}async function fe({client:a,ecosystem:e,profileToUnlink:t,allowAccountDeletion:n=!1,storage:r}){const l=w(a,e),o=p("inAppWallet"),i=await r.getAuthCookie();if(!i)throw new Error("Failed to unlink account, no user logged in");const c={Authorization:`Bearer iaw-auth-token:${i}`,"Content-Type":"application/json"},s=await l(`${o}/api/2024-05-05/account/disconnect`,{body:g({allowAccountDeletion:n,details:t.details,type:t.type}),headers:c,method:"POST"});if(!s.ok){const d=await s.json();throw new Error(d.message||"Failed to unlink account.")}const{linkedAccounts:u}=await s.json();return u??[]}async function ye({client:a,ecosystem:e,storage:t}){const n=w(a,e),r=p("inAppWallet"),l=await t.getAuthCookie();if(!l)throw new Error("Failed to get linked accounts, no user logged in");const o={Authorization:`Bearer iaw-auth-token:${l}`,"Content-Type":"application/json"},i=await n(`${r}/api/2024-05-05/accounts`,{headers:o,method:"GET"});if(!i.ok){const s=await i.json();throw new Error(s.message||"Failed to get linked accounts.")}const{linkedAccounts:c}=await i.json();return c??[]}function J(){return`${p("inAppWallet")}/api/2024-05-05/login/passkey/callback`}function K(a,e){return`${p("inAppWallet")}/api/2024-05-05/login/passkey?type=${a}${e?`&username=${e}`:""}`}async function Ie(a){var u,d,h;if(!a.passkeyClient.isAvailable())throw new Error("Passkeys are not available on this device");const e=w(a.client,a.ecosystem),t=a.username??ke(a.ecosystem),r=await(await e(K("sign-up",t))).json();if(!r.challenge)throw new Error("No challenge received");const l=r.challenge,o=await a.passkeyClient.register({challenge:l,name:t,rp:a.rp}),i={};(u=a.ecosystem)!=null&&u.partnerId&&(i["x-ecosystem-partner-id"]=a.ecosystem.partnerId),(d=a.ecosystem)!=null&&d.id&&(i["x-ecosystem-id"]=a.ecosystem.id);const s=await(await e(J(),{body:g({authenticatorData:o.authenticatorData,clientData:o.clientData,credential:{algorithm:o.credential.algorithm,publicKey:o.credential.publicKey},credentialId:o.credentialId,origin:o.origin,rpId:a.rp.id,serverVerificationId:r.serverVerificationId,type:"sign-up",username:t}),headers:{"Content-Type":"application/json",...i},method:"POST"})).json();if(!s||!s.storedToken)throw new Error(`Error verifying passkey: ${s.message??"unknown error"}`);return await((h=a.storage)==null?void 0:h.savePasskeyCredentialId(o.credentialId)),s}async function be(a){var s,u,d,h;if(!a.passkeyClient.isAvailable())throw new Error("Passkeys are not available on this device");const e=w(a.client,a.ecosystem),[t,n]=await Promise.all([e(K("sign-in")).then(f=>f.json()),(s=a.storage)==null?void 0:s.getPasskeyCredentialId()]);if(!t.challenge)throw new Error("No challenge received");const r=t.challenge,l=await a.passkeyClient.authenticate({challenge:r,credentialId:n??void 0,rp:a.rp}),o={};(u=a.ecosystem)!=null&&u.partnerId&&(o["x-ecosystem-partner-id"]=a.ecosystem.partnerId),(d=a.ecosystem)!=null&&d.id&&(o["x-ecosystem-id"]=a.ecosystem.id);const c=await(await e(J(),{body:g({authenticatorData:l.authenticatorData,clientData:l.clientData,credentialId:l.credentialId,origin:l.origin,rpId:a.rp.id,serverVerificationId:t.serverVerificationId,signature:l.signature,type:"sign-in"}),headers:{"Content-Type":"application/json",...o},method:"POST"})).json();if(!c||!c.storedToken)throw new Error(`Error verifying passkey: ${c.message??"unknown error"}`);return await((h=a.storage)==null?void 0:h.savePasskeyCredentialId(l.credentialId)),c}function ke(a){return`${(a==null?void 0:a.id)??"wallet"}-${new Date().toISOString()}`}function ve(a){let n=[`${a.domain} wants you to sign in with your Ethereum account:`,a.address].join(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/in-app-wallet-calls-DbPzZopg.js","assets/thirdweb-DVPvYSAe.js","assets/passkeys-DnaNEVFD.js","assets/index-CVHrGrAd.js","assets/ui-xtM5k7h3.js","assets/vendor-BFHicODy.js","assets/ui-Cg2KU6mE.css","assets/index-85xIh8VB.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{K as w,ai as p,i as g,r as X,T as b,m as y,_ as I,aj as Z,b as P,A as M,ad as z,y as W,j as ee,ak as v,al as $,am as te}from"./thirdweb-DVPvYSAe.js";import{a as ae}from"./types-DC0Zmj1B.js";import{p as G}from"./parse-typed-data-B4oF8vZ-.js";const x={async getItem(a){try{if(typeof window<"u"&&window.localStorage)return localStorage.getItem(a)}catch{}return null},async removeItem(a){typeof window<"u"&&window.localStorage&&localStorage.removeItem(a)},async setItem(a,e){try{typeof window<"u"&&window.localStorage&&localStorage.setItem(a,e)}catch{}}},ne="/sdk/2022-08-12/embedded-wallet",A=a=>`thirdwebEwsWalletUserId-${a}`,ie="walletToken",T=a=>`${ie}-${a}`,j=a=>`passkey-credential-id-${a}`,re="a",E=(a,e)=>`${re}-${a}-${e}`,D=a=>`walletConnectSessions-${a}`,U=a=>`thirdweb_guest_session_id_${a}`,F=new Map;class V{constructor({storage:e,clientId:t,ecosystem:n}){Object.defineProperty(this,"key",{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,"ecosystem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.storage=e,this.key=se(t,n==null?void 0:n.id),this.ecosystem=n}async getItem(e){return this.storage?this.storage.getItem(e):F.get(e)??null}async setItem(e,t){if(this.storage)return this.storage.setItem(e,t);F.set(e,t)}async removeItem(e){const t=await this.getItem(e);return this.storage&&t?(this.storage.removeItem(e),!0):!1}async getWalletConnectSessions(){return this.getItem(D(this.key))}async saveWalletConnectSessions(e){await this.setItem(D(this.key),e)}async savePasskeyCredentialId(e){await this.setItem(j(this.key),e)}async getPasskeyCredentialId(){return this.getItem(j(this.key))}async saveAuthCookie(e){await this.setItem(T(this.key),e)}async getAuthCookie(){return this.getItem(T(this.key))}async removeAuthCookie(){return this.removeItem(T(this.key))}async saveDeviceShare(e,t){await this.saveWalletUserId(t),await this.setItem(E(this.key,t),e)}async getDeviceShare(){const e=await this.getWalletUserId();return e?this.getItem(E(this.key,e)):null}async removeDeviceShare(){const e=await this.getWalletUserId();return e?this.removeItem(E(this.key,e)):!1}async getWalletUserId(){return this.getItem(A(this.key))}async saveWalletUserId(e){await this.setItem(A(this.key),e)}async removeWalletUserId(){return this.removeItem(A(this.key))}async getGuestSessionId(){return this.getItem(U(this.key))}async saveGuestSessionId(e){await this.setItem(U(this.key),e)}}const se=(a,e)=>`${a}${e?`-${e}`:""}`,S=new Map,oe={getItem:async a=>S.get(a)??null,removeItem:async a=>{S.delete(a)},setItem:async(a,e)=>{S.set(a,e)}};async function O({authToken:a,client:e,ecosystem:t}){const r=await w(e,t)(`${p("inAppWallet")}/api/2024-05-05/accounts`,{headers:{Authorization:`Bearer embedded-wallet-token:${a}`,"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 ce=p("inAppWallet"),le=`${ce}/`,H=`${le}api/2023-10-20`,ue=`${H}/embedded-wallet/validate-custom-jwt`,de=`${H}/embedded-wallet/validate-custom-auth-endpoint`,q=(a,e)=>e instanceof Error?`${a}: ${e.message}`:`${a}: ${g(e)}`;async function he(a){const t=await w(a.client,a.ecosystem)(de,{body:g({developerClientId:a.client.clientId,payload:a.payload}),headers:{"Content-Type":"application/json"},method:"POST"});if(!t.ok){const n=await t.json();throw new Error(`Custom auth endpoint authentication error: ${n.message}`)}try{const{verifiedToken:n}=await t.json();return{storedToken:n}}catch(n){throw new Error(q("Malformed response from post auth_endpoint authentication",n))}}const Q=a=>{if(!ae.includes(a))throw new Error(`Unknown auth option ${a}`);switch(a){case"wallet":return"siwe";default:return a}},k=({authOption:a,client:e,ecosystem:t,mode:n="popup",redirectUrl:r})=>{if(n==="popup"&&r)throw new Error("Redirect URL is not supported for popup mode");if(n==="window"&&!r)throw new Error("Redirect URL is required for window mode");const l=Q(a);let o=`${p("inAppWallet")}/api/2024-05-05/login/${l}?clientId=${e.clientId}`;if(t!=null&&t.partnerId?o=`${o}&ecosystemId=${t.id}&ecosystemPartnerId=${t.partnerId}`:t&&(o=`${o}&ecosystemId=${t.id}`),n!=="popup"){const i=new URL(r||window.location.href);i.searchParams.set("walletId",(t==null?void 0:t.id)||"inApp"),i.searchParams.set("authProvider",a),o=`${o}&redirectUrl=${encodeURIComponent(i.toString())}`}return o},C=({authOption:a,client:e,ecosystem:t})=>{const n=Q(a);let r=`${p("inAppWallet")}/api/2024-05-05/login/${n}/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 we(a){const e=w(a.client,a.ecosystem),t=k({authOption:"backend",client:a.client,ecosystem:a.ecosystem}),n=await e(`${t}`,{body:g({walletSecret:a.walletSecret}),headers:{"Content-Type":"application/json"},method:"POST"});if(!n.ok){const r=await n.text();throw new Error(`Failed to generate backend account: ${r}`)}return await n.json()}async function pe(a){let e=await a.storage.getGuestSessionId();e||(e=X(32),a.storage.saveGuestSessionId(e));const t=w(a.client,a.ecosystem),n=C({authOption:"guest",client:a.client,ecosystem:a.ecosystem}),r=await t(`${n}`,{body:g({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 ge(a){const t=await w(a.client,a.ecosystem)(ue,{body:g({developerClientId:a.client.clientId,jwt:a.jwt}),headers:{"Content-Type":"application/json"},method:"POST"});if(!t.ok){const n=await t.json();throw new Error(`JWT authentication error: ${n.message}`)}try{const{verifiedToken:n}=await t.json();return{storedToken:n}}catch(n){throw new Error(q("Malformed response from post jwt authentication",n))}}async function me({client:a,ecosystem:e,tokenToLink:t,storage:n}){const r=w(a,e),l=p("inAppWallet"),o=await n.getAuthCookie();if(!o)throw new Error("Failed to link account, no user logged in");const i={Authorization:`Bearer iaw-auth-token:${o}`,"Content-Type":"application/json"},c=await r(`${l}/api/2024-05-05/account/connect`,{body:g({accountAuthTokenToConnect:t}),headers:i,method:"POST"});if(!c.ok){const u=await c.json();throw new Error(u.message||"Failed to link account.")}const{linkedAccounts:s}=await c.json();return s??[]}async function fe({client:a,ecosystem:e,profileToUnlink:t,allowAccountDeletion:n=!1,storage:r}){const l=w(a,e),o=p("inAppWallet"),i=await r.getAuthCookie();if(!i)throw new Error("Failed to unlink account, no user logged in");const c={Authorization:`Bearer iaw-auth-token:${i}`,"Content-Type":"application/json"},s=await l(`${o}/api/2024-05-05/account/disconnect`,{body:g({allowAccountDeletion:n,details:t.details,type:t.type}),headers:c,method:"POST"});if(!s.ok){const d=await s.json();throw new Error(d.message||"Failed to unlink account.")}const{linkedAccounts:u}=await s.json();return u??[]}async function ye({client:a,ecosystem:e,storage:t}){const n=w(a,e),r=p("inAppWallet"),l=await t.getAuthCookie();if(!l)throw new Error("Failed to get linked accounts, no user logged in");const o={Authorization:`Bearer iaw-auth-token:${l}`,"Content-Type":"application/json"},i=await n(`${r}/api/2024-05-05/accounts`,{headers:o,method:"GET"});if(!i.ok){const s=await i.json();throw new Error(s.message||"Failed to get linked accounts.")}const{linkedAccounts:c}=await i.json();return c??[]}function J(){return`${p("inAppWallet")}/api/2024-05-05/login/passkey/callback`}function K(a,e){return`${p("inAppWallet")}/api/2024-05-05/login/passkey?type=${a}${e?`&username=${e}`:""}`}async function Ie(a){var u,d,h;if(!a.passkeyClient.isAvailable())throw new Error("Passkeys are not available on this device");const e=w(a.client,a.ecosystem),t=a.username??ke(a.ecosystem),r=await(await e(K("sign-up",t))).json();if(!r.challenge)throw new Error("No challenge received");const l=r.challenge,o=await a.passkeyClient.register({challenge:l,name:t,rp:a.rp}),i={};(u=a.ecosystem)!=null&&u.partnerId&&(i["x-ecosystem-partner-id"]=a.ecosystem.partnerId),(d=a.ecosystem)!=null&&d.id&&(i["x-ecosystem-id"]=a.ecosystem.id);const s=await(await e(J(),{body:g({authenticatorData:o.authenticatorData,clientData:o.clientData,credential:{algorithm:o.credential.algorithm,publicKey:o.credential.publicKey},credentialId:o.credentialId,origin:o.origin,rpId:a.rp.id,serverVerificationId:r.serverVerificationId,type:"sign-up",username:t}),headers:{"Content-Type":"application/json",...i},method:"POST"})).json();if(!s||!s.storedToken)throw new Error(`Error verifying passkey: ${s.message??"unknown error"}`);return await((h=a.storage)==null?void 0:h.savePasskeyCredentialId(o.credentialId)),s}async function be(a){var s,u,d,h;if(!a.passkeyClient.isAvailable())throw new Error("Passkeys are not available on this device");const e=w(a.client,a.ecosystem),[t,n]=await Promise.all([e(K("sign-in")).then(f=>f.json()),(s=a.storage)==null?void 0:s.getPasskeyCredentialId()]);if(!t.challenge)throw new Error("No challenge received");const r=t.challenge,l=await a.passkeyClient.authenticate({challenge:r,credentialId:n??void 0,rp:a.rp}),o={};(u=a.ecosystem)!=null&&u.partnerId&&(o["x-ecosystem-partner-id"]=a.ecosystem.partnerId),(d=a.ecosystem)!=null&&d.id&&(o["x-ecosystem-id"]=a.ecosystem.id);const c=await(await e(J(),{body:g({authenticatorData:l.authenticatorData,clientData:l.clientData,credentialId:l.credentialId,origin:l.origin,rpId:a.rp.id,serverVerificationId:t.serverVerificationId,signature:l.signature,type:"sign-in"}),headers:{"Content-Type":"application/json",...o},method:"POST"})).json();if(!c||!c.storedToken)throw new Error(`Error verifying passkey: ${c.message??"unknown error"}`);return await((h=a.storage)==null?void 0:h.savePasskeyCredentialId(l.credentialId)),c}function ke(a){return`${(a==null?void 0:a.id)??"wallet"}-${new Date().toISOString()}`}function ve(a){let n=[`${a.domain} wants you to sign in with your Ethereum account:`,a.address].join(`
|
|
3
3
|
`);n=[n,a.statement].join(`
|
|
4
4
|
|
|
5
5
|
`),a.statement&&(n+=`
|
|
6
6
|
`);const r=[];if(a.uri){const u=`URI: ${a.uri}`;r.push(u)}const l=`Version: ${a.version}`;if(r.push(l),a.chain_id){const u=`Chain ID: ${a.chain_id}`||"1";r.push(u)}const o=`Nonce: ${a.nonce}`;r.push(o);const i=`Issued At: ${a.issued_at}`;r.push(i);const c=`Expiration Time: ${a.expiration_time}`;if(r.push(c),a.invalid_before){const u=`Not Before: ${a.invalid_before}`;r.push(u)}a.resources&&r.push(["Resources:",...a.resources.map(u=>`- ${u}`)].join(`
|
|
7
7
|
`));const s=r.join(`
|
|
8
8
|
`);return[n,s].join(`
|
|
9
|
-
`)}async function Ae(a){const{payload:e,account:t}=a,n=await t.signMessage({message:ve(e)});return{payload:e,signature:n}}const Te=["xyz.abs"];async function Ee(a){const{wallet:e,client:t,ecosystem:n,chain:r}=a,l=Te.includes(e.id)?r||b(1):b(1),o=e.getAccount()||await e.connect({chain:l,client:t}),i=w(t,n),c=await(async()=>{const d=k({authOption:"wallet",client:a.client,ecosystem:a.ecosystem}),h=await i(`${d}&address=${o.address}&chainId=${l.id}`);if(!h.ok)throw new Error("Failed to generate SIWE login payload");return await h.json()})(),{signature:s}=await Ae({account:o,payload:c});return await(async()=>{const d=C({authOption:"wallet",client:a.client,ecosystem:a.ecosystem}),h=await i(`${d}&signature=${s}&payload=${encodeURIComponent(c)}`,{body:g({payload:c,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 Se({client:a,payload:e,storage:t}){const n=await t.getAuthCookie(),r=t.ecosystem,l=w(a,r);if(!n)throw new Error("No auth token found when signing message");const o={address:e.address,chainId:e.chainId,nonce:Number(e.nonce)},i=await l(`${p("inAppWallet")}/api/v1/enclave-wallet/sign-authorization`,{body:g(o),headers:{Authorization:`Bearer embedded-wallet-token:${n}`,"Content-Type":"application/json","x-thirdweb-client-id":a.clientId},method:"POST"});if(!i.ok)throw new Error(`Failed to sign message - ${i.status} ${i.statusText}`);return await i.json()}async function Le({client:a,payload:{message:e,isRaw:t,originalMessage:n,chainId:r},storage:l}){const o=await l.getAuthCookie(),i=l.ecosystem,c=w(a,i);if(!o)throw new Error("No auth token found when signing message");const s=await c(`${p("inAppWallet")}/api/v1/enclave-wallet/sign-message`,{body:g({messagePayload:{chainId:r,isRaw:t,message:e,originalMessage:n}}),headers:{Authorization:`Bearer embedded-wallet-token:${o}`,"Content-Type":"application/json","x-thirdweb-client-id":a.clientId},method:"POST"});if(!s.ok)throw new Error(`Failed to sign message - ${s.status} ${s.statusText}`);return await s.json()}async function Pe({client:a,payload:e,storage:t}){const n=await t.getAuthCookie(),r=t.ecosystem,l=w(a,r);if(!n)throw new Error("No auth token found when signing transaction");const o=await l(`${p("inAppWallet")}/api/v1/enclave-wallet/sign-transaction`,{body:g({transactionPayload:e}),headers:{Authorization:`Bearer embedded-wallet-token:${n}`,"Content-Type":"application/json","x-thirdweb-client-id":a.clientId},method:"POST"});if(!o.ok)throw new Error(`Failed to sign transaction - ${o.status} ${o.statusText}`);return(await o.json()).signature}async function We({client:a,payload:e,storage:t}){const n=await t.getAuthCookie(),r=t.ecosystem,l=w(a,r);if(!n)throw new Error("No auth token found when signing typed data");const o=await l(`${p("inAppWallet")}/api/v1/enclave-wallet/sign-typed-data`,{body:g({...e}),headers:{Authorization:`Bearer embedded-wallet-token:${n}`,"Content-Type":"application/json","x-thirdweb-client-id":a.clientId},method:"POST"});if(!o.ok)throw new Error(`Failed to sign typed data - ${o.status} ${o.statusText}`);return await o.json()}class Oe{constructor({client:e,ecosystem:t,address:n,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=n,this.localStorage=r}async postWalletSetUp(e){await this.localStorage.saveAuthCookie(e.storedToken.cookieString)}async getUserWalletStatus(){var l,o;const e=await this.localStorage.getAuthCookie();if(!e)return{status:"Logged Out"};const t=await O({authToken:e,client:this.client,ecosystem:this.ecosystem});if(!t)return{status:"Logged Out"};const n=t.wallets[0],r={email:(l=t.linkedAccounts.find(i=>i.details.email!==void 0))==null?void 0:l.details.email,phoneNumber:(o=t.linkedAccounts.find(i=>i.details.phone!==void 0))==null?void 0:o.details.phone,recoveryShareManagement:"ENCLAVE",userWalletId:t.id||""};return n?{account:await this.getAccount(),authDetails:r,status:"Logged In, Wallet Initialized",walletAddress:n.address}:{authDetails:r,status:"Logged In, Wallet Uninitialized"}}async getAccount(){const e=this.client,t=this.localStorage,n=this.address,r=this.ecosystem,l=async i=>{const c=P({chain:b(i.chainId),client:e}),s={chainId:W(i.chainId),data:i.data,gas:m(i.gas),nonce:m(i.nonce)||W(await I(async()=>{const{eth_getTransactionCount:u}=await import("./thirdweb-D6clKR4w.js").then(d=>d.ax);return{eth_getTransactionCount:u}},[]).then(({eth_getTransactionCount:u})=>u(c,{address:y(this.address),blockTag:"pending"}))),to:i.to?y(i.to):void 0,value:m(i.value)};return i.authorizationList&&i.authorizationList.length>0?(s.type=4,s.authorizationList=i.authorizationList,s.maxFeePerGas=m(i.maxFeePerGas),s.maxPriorityFeePerGas=m(i.maxPriorityFeePerGas)):m(i.maxFeePerGas)?(s.maxFeePerGas=m(i.maxFeePerGas),s.maxPriorityFeePerGas=m(i.maxPriorityFeePerGas),s.type=2):(s.gasPrice=m(i.gasPrice),s.type=0),Pe({client:e,payload:s,storage:t})},o={address:y(n),async sendTransaction(i){const c=P({chain:b(i.chainId),client:e}),s=await l(i),u=await M(c,s);return z({chainId:i.chainId,client:e,contractAddress:i.to??void 0,ecosystem:r,gasPrice:i.gasPrice,transactionHash:u,walletAddress:n,walletType:"inApp"}),{transactionHash:u}},async signAuthorization(i){const c=await Se({client:e,payload:i,storage:t});return{address:y(c.address),chainId:Number.parseInt(c.chainId),nonce:BigInt(c.nonce),r:BigInt(c.r),s:BigInt(c.s),yParity:Number.parseInt(c.yParity)}},async signMessage({message:i,originalMessage:c,chainId:s}){const u=typeof i=="string"?{chainId:s,isRaw:!1,message:i,originalMessage:c}:{chainId:s,isRaw:!0,message:typeof i.raw=="string"?i.raw:Z(i.raw),originalMessage:c},{signature:d}=await Le({client:e,payload:u,storage:t});return d},async signTransaction(i){if(!i.chainId)throw new Error("chainId required in tx to sign");return l({chainId:i.chainId,...i})},async signTypedData(i){const c=G(i),{signature:s}=await We({client:e,payload:c,storage:t});return s},sendCalls:async i=>{const{inAppWalletSendCalls:c}=await I(async()=>{const{inAppWalletSendCalls:f}=await import("./in-app-wallet-calls-DWwXEW-I.js");return{inAppWalletSendCalls:f}},__vite__mapDeps([0,1])),s=i.calls[0];if(!s)throw new Error("No calls to send");const u=s.client,d=s.chain||i.chain,h=await c({account:o,calls:i.calls,chain:d});return{chain:d,client:u,id:h}},getCallsStatus:async i=>{const{inAppWalletGetCallsStatus:c}=await I(async()=>{const{inAppWalletGetCallsStatus:s}=await import("./in-app-wallet-calls-DWwXEW-I.js");return{inAppWalletGetCallsStatus:s}},__vite__mapDeps([0,1]));return c(i)},getCallsStatusRaw:async i=>{const{inAppWalletGetCallsStatusRaw:c}=await I(async()=>{const{inAppWalletGetCallsStatusRaw:s}=await import("./in-app-wallet-calls-DWwXEW-I.js");return{inAppWalletGetCallsStatusRaw:s}},__vite__mapDeps([0,1]));return c(i)},getCapabilities:async i=>({[i.chainId??1]:{atomic:{status:"unsupported"},paymasterService:{supported:!1}}})};return o}}function m(a){return a===void 0||ee(a)?a:W(a)}const Ce={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 _e{constructor({link:e,baseUrl:t,iframeId:n,container:r,onIframeInitialize:l,localStorage:o,clientId:i,ecosystem:c}){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=o,this.clientId=i,this.ecosystem=c,this.iframeBaseUrl=t,typeof document>"u")return;r=r??document.body;let s=document.getElementById(n);const u=new URL(e);if(!s||s.src!==u.href){s=document.createElement("iframe");const d={...Ce};Object.assign(s.style,d),s.setAttribute("id",n),s.setAttribute("fetchpriority","high"),r.appendChild(s),s.src=u.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 n=new MessageChannel,r=new Promise((o,i)=>{n.port1.onmessage=c=>{const{data:s}=c;n.port1.close(),s.success||i(new Error(s.error)),L.set(e.src,!0),t&&t(),o(!0)}});(l=e==null?void 0:e.contentWindow)==null||l.postMessage({data:await this.onIframeLoadedInitVariables(),eventType:"initIframe"},this.iframeBaseUrl,[n.port2]),await r}}async call({procedureName:e,params:t,showIframe:n=!1}){var o;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 v(this.POLLING_INTERVAL_SECONDS*1e3);n&&(this.iframe.style.display="block",await v(.005*1e3));const r=new MessageChannel,l=new Promise((i,c)=>{r.port1.onmessage=async s=>{const{data:u}=s;r.port1.close(),n&&(await v(.1*1e3),this.iframe&&(this.iframe.style.display="none")),u.success?i(u.data):c(new Error(u.error))}});return(o=this.iframe.contentWindow)==null||o.postMessage({data:{...t,...await this.onIframeLoadedInitVariables()},eventType:e},this.iframeBaseUrl,[r.port2]),l}destroy(){this.iframe&&L.delete(this.iframe.src)}}class $e extends _e{constructor({clientId:e,baseUrl:t,ecosystem:n}){super({baseUrl:t,clientId:e,container:typeof document>"u"?void 0:document.body,ecosystem:n,iframeId:De+((n==null?void 0:n.id)||""),link:je({baseUrl:t,clientId:e,ecosystem:n,path:ne}).href,localStorage:new V({clientId:e,ecosystem:n,storage:x})}),this.clientId=e,this.ecosystem=n}}function je({clientId:a,baseUrl:e,path:t,ecosystem:n,queryParams:r}){var o;const l=new URL(`${t}`,e);if(r)for(const i of Object.keys(r))l.searchParams.set(i,((o=r[i])==null?void 0:o.toString())||"");return l.searchParams.set("clientId",a),(n==null?void 0:n.partnerId)!==void 0&&l.searchParams.set("partnerId",n.partnerId),(n==null?void 0:n.id)!==void 0&&l.searchParams.set("ecosystemId",n.id),l}const De="thirdweb-in-app-wallet-iframe";async function Ue({client:a,ecosystem:e,authToken:t}){const r=await w(a,e)(`${p("inAppWallet")}/api/v1/enclave-wallet/generate`,{headers:{Authorization:`Bearer embedded-wallet-token:${t}`,"Content-Type":"application/json","x-thirdweb-client-id":a.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 Fe{constructor({baseUrl:e,querier:t,preLogin:n,postLogin:r,client:l,ecosystem:o}){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=n,this.postLogin=r,this.client=l,this.ecosystem=o}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 Ne extends Fe{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 n=await this.authenticateWithCustomJwt({encryptionKey:e,jwt:t});return this.postLogin(n)}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 n=await this.authenticateWithCustomAuthEndpoint({encryptionKey:e,payload:t});return this.postLogin(n)}async authenticateWithEmailOtp({email:e,otp:t,recoveryCode:n}){return this.LoginQuerier.call({params:{email:e,otp:t,recoveryCode:n},procedureName:"verifyThirdwebEmailLoginOtp"})}async loginWithEmailOtp({email:e,otp:t,recoveryCode:n}){const r=await this.authenticateWithEmailOtp({email:e,otp:t,recoveryCode:n});return this.postLogin(r)}async authenticateWithSmsOtp({phoneNumber:e,otp:t,recoveryCode:n}){return this.LoginQuerier.call({params:{otp:t,phoneNumber:e,recoveryCode:n},procedureName:"verifyThirdwebSmsLoginOtp"})}async loginWithSmsOtp({phoneNumber:e,otp:t,recoveryCode:n}){const r=await this.authenticateWithSmsOtp({otp:t,phoneNumber:e,recoveryCode:n});return this.postLogin(r)}}class Re{constructor({client:e,querier:t,onAuthSuccess:n,ecosystem:r,baseUrl:l,localStorage:o}){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=o,this.onAuthSuccess=n,this.BaseLogin=new Ne({baseUrl:l,client:e,ecosystem:r,postLogin:async i=>this.postLogin(i),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 n=await O({authToken:e.storedToken.cookieString,client:this.client,ecosystem:this.ecosystem});if(!n)throw new Error("Cannot login, no user found for auth token");if(n.wallets.length>0&&((l=n.wallets[0])==null?void 0:l.type)==="enclave")return this.postLogin({storedToken:e.storedToken,walletDetails:{walletAddress:n.wallets[0].address}});if(n.wallets.length===0){const o=await Ue({authToken:e.storedToken.cookieString,client:this.client,ecosystem:this.ecosystem});return this.postLogin({storedToken:e.storedToken,walletDetails:{walletAddress:o.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 Be="width=350, height=500",N=({isWindowOpenedByFn:a,win:e,closeOpenedWindow:t})=>{a?e==null||e.close():e&&t?t(e):e&&e.close()};async function Me(a){const e=k({...a,mode:a.mode||"redirect"});a.mode==="redirect"?window.location.href=e:window.open(e),await new Promise(t=>setTimeout(t,5e3))}const ze=async a=>{let e=a.openedWindow,t=!1;if(e||(e=window.open(k({...a,mode:"popup"}),`Login to ${a.authOption}`,Be),t=!0),!e)throw new Error("Something went wrong opening pop-up");return await new Promise((r,l)=>{const o=window.setInterval(async()=>{e.closed&&(clearInterval(o),window.removeEventListener("message",i),l(new Error("User closed login window")))},1e3),i=async c=>{if(c.origin===p("inAppWallet")){if(typeof c.data!="object"){l(new Error("Invalid event data"));return}switch(c.data.eventType){case"oauthSuccessResult":{window.removeEventListener("message",i),clearInterval(o),N({closeOpenedWindow:a.closeOpenedWindow,isWindowOpenedByFn:t,win:e}),c.data.authResult&&r(c.data.authResult);break}case"oauthFailureResult":{window.removeEventListener("message",i),clearInterval(o),N({closeOpenedWindow:a.closeOpenedWindow,isWindowOpenedByFn:t,win:e}),l(new Error(c.data.errorString));break}}}};window.addEventListener("message",i)})},Ge=async a=>{const{client:e,ecosystem:t}=a,n=k({authOption:a.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(a.strategy){case"email":return{email:a.email};case"phone":return{phone:a.phoneNumber}}})(),o=await fetch(n,{body:g(l),headers:r,method:"POST"});if(!o.ok){const i=await o.text();let c;try{const s=JSON.parse(i);s&&typeof s.message=="string"&&(c=s.message)}catch{}throw new Error(c||"Failed to send verification code")}return await o.json()},R=async a=>{const{client:e,ecosystem:t}=a,n=C({authOption:a.strategy,client:a.client,ecosystem:a.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(a.strategy){case"email":return{code:a.verificationCode,email:a.email};case"phone":return{code:a.verificationCode,phone:a.phoneNumber}}})(),o=await fetch(n,{body:g(l),headers:r,method:"POST"});if(!o.ok)throw new Error("Failed to verify verification code");return await o.json()};class B{constructor({client:e,ecosystem:t,querier:n,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=n,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 o;const e=this.walletManagerQuerier,t=this.client,n=(o=this.ecosystem)==null?void 0:o.partnerId,{address:r}=await e.call({params:void 0,procedureName:"getAddress"}),l=async i=>{const c={chainId:i.chainId,data:i.data,gasLimit:i.gas,nonce:i.nonce,to:i.to??void 0,value:i.value};i.maxFeePerGas?(c.accessList=i.accessList,c.maxFeePerGas=i.maxFeePerGas,c.maxPriorityFeePerGas=i.maxPriorityFeePerGas,c.type=2):(c.gasPrice=i.gasPrice,c.type=0);const s=$().rpc,{signedTransaction:u}=await e.call({params:{chainId:i.chainId,partnerId:n,rpcEndpoint:`https://${i.chainId}.${s}`,transaction:c},procedureName:"signTransaction"});return u};return{address:y(r),async sendTransaction(i){const c=P({chain:b(i.chainId),client:t}),s=await l(i),u=await M(c,s);return z({chainId:i.chainId,client:t,contractAddress:i.to??void 0,gasPrice:i.gasPrice,transactionHash:u,walletAddress:r,walletType:"inApp"}),{transactionHash:u}},async signMessage({message:i}){const c=typeof i=="string"?i:i.raw instanceof Uint8Array?i.raw:te(i.raw),{signedMessage:s}=await e.call({params:{chainId:1,message:c,partnerId:n},procedureName:"signMessage"});return s},async signTransaction(i){if(!i.chainId)throw new Error("chainId required in tx to sign");return l({...i,chainId:i.chainId})},async signTypedData(i){var _;const c=G(i);(_=c.types)!=null&&_.EIP712Domain&&(c.types.EIP712Domain=void 0);const s=c.domain,u=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};u&&(h.chainId=u);const f=$().rpc,{signedTypedData:Y}=await e.call({params:{chainId:Number.parseInt(BigInt(u||1).toString()),domain:h,message:c.message,partnerId:n,rpcEndpoint:`https://${u}.${f}`,types:c.types},procedureName:"signTypedDataV4"});return Y}}}}class Je{isClientIdLegacyPaper(e){return e.indexOf("-")>0&&e.length===36}constructor({client:e,onAuthSuccess:t,ecosystem:n,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 o=p("inAppWallet");this.client=e,this.ecosystem=n,this.passkeyDomain=r,this.storage=new V({clientId:e.clientId,ecosystem:n,storage:l??Ve()}),this.querier=new $e({baseUrl:o,clientId:e.clientId,ecosystem:n}),this.auth=new Re({baseUrl:o,client:e,ecosystem:n,localStorage:this.storage,onAuthSuccess:async i=>{if(t==null||t(i),i.storedToken.authDetails.walletType==="sharded"&&(await this.querier.call({params:{storedToken:i.storedToken},procedureName:"migrateFromShardToEnclave"})||console.warn("Failed to migrate from sharded to enclave wallet, continuing with sharded wallet")),this.wallet=await this.initializeWallet(i.storedToken.cookieString),!this.wallet)throw new Error("Failed to initialize wallet");const c="deviceShareStored"in i.walletDetails?i.walletDetails.deviceShareStored:void 0;return await this.wallet.postWalletSetUp({deviceShareStored:c,storedToken:i.storedToken}),this.wallet instanceof B&&await this.querier.call({params:{authCookie:i.storedToken.cookieString,clientId:this.client.clientId,deviceShareStored:"deviceShareStored"in i.walletDetails?i.walletDetails.deviceShareStored:null,ecosystemId:n==null?void 0:n.id,partnerId:n==null?void 0:n.partnerId,walletUserId:i.storedToken.authDetails.userWalletId},procedureName:"initIframe"}),{user:{account:await this.wallet.getAccount(),authDetails:i.storedToken.authDetails,status:"Logged In, Wallet Initialized",walletAddress:i.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 n=await O({authToken:e||t,client:this.client,ecosystem:this.ecosystem});if(!n)throw new Error("Cannot initialize wallet, no user logged in");if(n.wallets.length===0)throw new Error("Cannot initialize wallet, this user does not have a wallet generated yet");return((r=n.wallets[0])==null?void 0:r.type)==="enclave"?new Oe({address:n.wallets[0].address,client:this.client,ecosystem:this.ecosystem,storage:this.storage}):new B({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 Ge({...e,client:this.client,ecosystem:this.ecosystem})}async authenticateWithRedirect(e,t,n){return Me({authOption:e,client:this.client,ecosystem:this.ecosystem,mode:t,redirectUrl:n})}async loginWithAuthToken(e,t){return this.auth.loginWithAuthToken(e,t)}async authenticate(e){const t=e.strategy;switch(t){case"email":return R({...e,client:this.client,ecosystem:this.ecosystem});case"phone":return R({...e,client:this.client,ecosystem:this.ecosystem});case"auth_endpoint":return he({client:this.client,ecosystem:this.ecosystem,payload:e.payload});case"jwt":return ge({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 ze({authOption:t,client:this.client,closeOpenedWindow:e.closeOpenedWindow,ecosystem:this.ecosystem,openedWindow:e.openedWindow});case"guest":return pe({client:this.client,ecosystem:this.ecosystem,storage:this.storage});case"backend":return we({client:this.client,ecosystem:this.ecosystem,walletSecret:e.walletSecret});case"wallet":return Ee({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 n=await this.authenticate(e);return await this.loginWithAuthToken(n,e.encryptionKey)}case"iframe_email_verification":return this.auth.loginWithIframe({email:e.email});case"iframe":return this.auth.loginWithModal();case"passkey":{const n=await this.passkeyAuth(e);return this.loginWithAuthToken(n)}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 n=await this.authenticate(e);return await this.auth.loginWithAuthToken(n)}default:xe(t)}}async logout(){return await this.auth.logout()}async passkeyAuth(e){const{PasskeyWebClient:t}=await I(async()=>{const{PasskeyWebClient:i}=await import("./passkeys-B7dJQJDN.js");return{PasskeyWebClient:i}},__vite__mapDeps([2,3,1,4,5,6,7])),{passkeyName:n,storeLastUsedPasskey:r=!0}=e,l=new t,o=this.storage;return e.type==="sign-up"?Ie({client:this.client,ecosystem:this.ecosystem,passkeyClient:l,rp:{id:this.passkeyDomain??window.location.hostname,name:this.passkeyDomain??window.document.title},storage:r?o:void 0,username:n}):be({client:this.client,ecosystem:this.ecosystem,passkeyClient:l,rp:{id:this.passkeyDomain??window.location.hostname,name:this.passkeyDomain??window.document.title},storage:r?o:void 0})}async linkProfile(e){const{storedToken:t}=await this.authenticate(e);return await me({client:e.client,ecosystem:e.ecosystem||this.ecosystem,storage:this.storage,tokenToLink:t.cookieString})}async unlinkProfile(e,t){return await fe({allowAccountDeletion:t,client:this.client,ecosystem:this.ecosystem,profileToUnlink:e,storage:this.storage})}async getProfiles(){return ye({client:this.client,ecosystem:this.ecosystem,storage:this.storage})}}function xe(a,e){throw new Error(`Invalid param: ${a}`)}function Ve(){return typeof window<"u"&&window.localStorage?x:oe}export{Je as InAppWebConnector};
|
|
9
|
+
`)}async function Ae(a){const{payload:e,account:t}=a,n=await t.signMessage({message:ve(e)});return{payload:e,signature:n}}const Te=["xyz.abs"];async function Ee(a){const{wallet:e,client:t,ecosystem:n,chain:r}=a,l=Te.includes(e.id)?r||b(1):b(1),o=e.getAccount()||await e.connect({chain:l,client:t}),i=w(t,n),c=await(async()=>{const d=k({authOption:"wallet",client:a.client,ecosystem:a.ecosystem}),h=await i(`${d}&address=${o.address}&chainId=${l.id}`);if(!h.ok)throw new Error("Failed to generate SIWE login payload");return await h.json()})(),{signature:s}=await Ae({account:o,payload:c});return await(async()=>{const d=C({authOption:"wallet",client:a.client,ecosystem:a.ecosystem}),h=await i(`${d}&signature=${s}&payload=${encodeURIComponent(c)}`,{body:g({payload:c,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 Se({client:a,payload:e,storage:t}){const n=await t.getAuthCookie(),r=t.ecosystem,l=w(a,r);if(!n)throw new Error("No auth token found when signing message");const o={address:e.address,chainId:e.chainId,nonce:Number(e.nonce)},i=await l(`${p("inAppWallet")}/api/v1/enclave-wallet/sign-authorization`,{body:g(o),headers:{Authorization:`Bearer embedded-wallet-token:${n}`,"Content-Type":"application/json","x-thirdweb-client-id":a.clientId},method:"POST"});if(!i.ok)throw new Error(`Failed to sign message - ${i.status} ${i.statusText}`);return await i.json()}async function Le({client:a,payload:{message:e,isRaw:t,originalMessage:n,chainId:r},storage:l}){const o=await l.getAuthCookie(),i=l.ecosystem,c=w(a,i);if(!o)throw new Error("No auth token found when signing message");const s=await c(`${p("inAppWallet")}/api/v1/enclave-wallet/sign-message`,{body:g({messagePayload:{chainId:r,isRaw:t,message:e,originalMessage:n}}),headers:{Authorization:`Bearer embedded-wallet-token:${o}`,"Content-Type":"application/json","x-thirdweb-client-id":a.clientId},method:"POST"});if(!s.ok)throw new Error(`Failed to sign message - ${s.status} ${s.statusText}`);return await s.json()}async function Pe({client:a,payload:e,storage:t}){const n=await t.getAuthCookie(),r=t.ecosystem,l=w(a,r);if(!n)throw new Error("No auth token found when signing transaction");const o=await l(`${p("inAppWallet")}/api/v1/enclave-wallet/sign-transaction`,{body:g({transactionPayload:e}),headers:{Authorization:`Bearer embedded-wallet-token:${n}`,"Content-Type":"application/json","x-thirdweb-client-id":a.clientId},method:"POST"});if(!o.ok)throw new Error(`Failed to sign transaction - ${o.status} ${o.statusText}`);return(await o.json()).signature}async function We({client:a,payload:e,storage:t}){const n=await t.getAuthCookie(),r=t.ecosystem,l=w(a,r);if(!n)throw new Error("No auth token found when signing typed data");const o=await l(`${p("inAppWallet")}/api/v1/enclave-wallet/sign-typed-data`,{body:g({...e}),headers:{Authorization:`Bearer embedded-wallet-token:${n}`,"Content-Type":"application/json","x-thirdweb-client-id":a.clientId},method:"POST"});if(!o.ok)throw new Error(`Failed to sign typed data - ${o.status} ${o.statusText}`);return await o.json()}class Oe{constructor({client:e,ecosystem:t,address:n,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=n,this.localStorage=r}async postWalletSetUp(e){await this.localStorage.saveAuthCookie(e.storedToken.cookieString)}async getUserWalletStatus(){var l,o;const e=await this.localStorage.getAuthCookie();if(!e)return{status:"Logged Out"};const t=await O({authToken:e,client:this.client,ecosystem:this.ecosystem});if(!t)return{status:"Logged Out"};const n=t.wallets[0],r={email:(l=t.linkedAccounts.find(i=>i.details.email!==void 0))==null?void 0:l.details.email,phoneNumber:(o=t.linkedAccounts.find(i=>i.details.phone!==void 0))==null?void 0:o.details.phone,recoveryShareManagement:"ENCLAVE",userWalletId:t.id||""};return n?{account:await this.getAccount(),authDetails:r,status:"Logged In, Wallet Initialized",walletAddress:n.address}:{authDetails:r,status:"Logged In, Wallet Uninitialized"}}async getAccount(){const e=this.client,t=this.localStorage,n=this.address,r=this.ecosystem,l=async i=>{const c=P({chain:b(i.chainId),client:e}),s={chainId:W(i.chainId),data:i.data,gas:m(i.gas),nonce:m(i.nonce)||W(await I(async()=>{const{eth_getTransactionCount:u}=await import("./thirdweb-DVPvYSAe.js").then(d=>d.ax);return{eth_getTransactionCount:u}},[]).then(({eth_getTransactionCount:u})=>u(c,{address:y(this.address),blockTag:"pending"}))),to:i.to?y(i.to):void 0,value:m(i.value)};return i.authorizationList&&i.authorizationList.length>0?(s.type=4,s.authorizationList=i.authorizationList,s.maxFeePerGas=m(i.maxFeePerGas),s.maxPriorityFeePerGas=m(i.maxPriorityFeePerGas)):m(i.maxFeePerGas)?(s.maxFeePerGas=m(i.maxFeePerGas),s.maxPriorityFeePerGas=m(i.maxPriorityFeePerGas),s.type=2):(s.gasPrice=m(i.gasPrice),s.type=0),Pe({client:e,payload:s,storage:t})},o={address:y(n),async sendTransaction(i){const c=P({chain:b(i.chainId),client:e}),s=await l(i),u=await M(c,s);return z({chainId:i.chainId,client:e,contractAddress:i.to??void 0,ecosystem:r,gasPrice:i.gasPrice,transactionHash:u,walletAddress:n,walletType:"inApp"}),{transactionHash:u}},async signAuthorization(i){const c=await Se({client:e,payload:i,storage:t});return{address:y(c.address),chainId:Number.parseInt(c.chainId),nonce:BigInt(c.nonce),r:BigInt(c.r),s:BigInt(c.s),yParity:Number.parseInt(c.yParity)}},async signMessage({message:i,originalMessage:c,chainId:s}){const u=typeof i=="string"?{chainId:s,isRaw:!1,message:i,originalMessage:c}:{chainId:s,isRaw:!0,message:typeof i.raw=="string"?i.raw:Z(i.raw),originalMessage:c},{signature:d}=await Le({client:e,payload:u,storage:t});return d},async signTransaction(i){if(!i.chainId)throw new Error("chainId required in tx to sign");return l({chainId:i.chainId,...i})},async signTypedData(i){const c=G(i),{signature:s}=await We({client:e,payload:c,storage:t});return s},sendCalls:async i=>{const{inAppWalletSendCalls:c}=await I(async()=>{const{inAppWalletSendCalls:f}=await import("./in-app-wallet-calls-DbPzZopg.js");return{inAppWalletSendCalls:f}},__vite__mapDeps([0,1])),s=i.calls[0];if(!s)throw new Error("No calls to send");const u=s.client,d=s.chain||i.chain,h=await c({account:o,calls:i.calls,chain:d});return{chain:d,client:u,id:h}},getCallsStatus:async i=>{const{inAppWalletGetCallsStatus:c}=await I(async()=>{const{inAppWalletGetCallsStatus:s}=await import("./in-app-wallet-calls-DbPzZopg.js");return{inAppWalletGetCallsStatus:s}},__vite__mapDeps([0,1]));return c(i)},getCallsStatusRaw:async i=>{const{inAppWalletGetCallsStatusRaw:c}=await I(async()=>{const{inAppWalletGetCallsStatusRaw:s}=await import("./in-app-wallet-calls-DbPzZopg.js");return{inAppWalletGetCallsStatusRaw:s}},__vite__mapDeps([0,1]));return c(i)},getCapabilities:async i=>({[i.chainId??1]:{atomic:{status:"unsupported"},paymasterService:{supported:!1}}})};return o}}function m(a){return a===void 0||ee(a)?a:W(a)}const Ce={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 _e{constructor({link:e,baseUrl:t,iframeId:n,container:r,onIframeInitialize:l,localStorage:o,clientId:i,ecosystem:c}){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=o,this.clientId=i,this.ecosystem=c,this.iframeBaseUrl=t,typeof document>"u")return;r=r??document.body;let s=document.getElementById(n);const u=new URL(e);if(!s||s.src!==u.href){s=document.createElement("iframe");const d={...Ce};Object.assign(s.style,d),s.setAttribute("id",n),s.setAttribute("fetchpriority","high"),r.appendChild(s),s.src=u.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 n=new MessageChannel,r=new Promise((o,i)=>{n.port1.onmessage=c=>{const{data:s}=c;n.port1.close(),s.success||i(new Error(s.error)),L.set(e.src,!0),t&&t(),o(!0)}});(l=e==null?void 0:e.contentWindow)==null||l.postMessage({data:await this.onIframeLoadedInitVariables(),eventType:"initIframe"},this.iframeBaseUrl,[n.port2]),await r}}async call({procedureName:e,params:t,showIframe:n=!1}){var o;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 v(this.POLLING_INTERVAL_SECONDS*1e3);n&&(this.iframe.style.display="block",await v(.005*1e3));const r=new MessageChannel,l=new Promise((i,c)=>{r.port1.onmessage=async s=>{const{data:u}=s;r.port1.close(),n&&(await v(.1*1e3),this.iframe&&(this.iframe.style.display="none")),u.success?i(u.data):c(new Error(u.error))}});return(o=this.iframe.contentWindow)==null||o.postMessage({data:{...t,...await this.onIframeLoadedInitVariables()},eventType:e},this.iframeBaseUrl,[r.port2]),l}destroy(){this.iframe&&L.delete(this.iframe.src)}}class $e extends _e{constructor({clientId:e,baseUrl:t,ecosystem:n}){super({baseUrl:t,clientId:e,container:typeof document>"u"?void 0:document.body,ecosystem:n,iframeId:De+((n==null?void 0:n.id)||""),link:je({baseUrl:t,clientId:e,ecosystem:n,path:ne}).href,localStorage:new V({clientId:e,ecosystem:n,storage:x})}),this.clientId=e,this.ecosystem=n}}function je({clientId:a,baseUrl:e,path:t,ecosystem:n,queryParams:r}){var o;const l=new URL(`${t}`,e);if(r)for(const i of Object.keys(r))l.searchParams.set(i,((o=r[i])==null?void 0:o.toString())||"");return l.searchParams.set("clientId",a),(n==null?void 0:n.partnerId)!==void 0&&l.searchParams.set("partnerId",n.partnerId),(n==null?void 0:n.id)!==void 0&&l.searchParams.set("ecosystemId",n.id),l}const De="thirdweb-in-app-wallet-iframe";async function Ue({client:a,ecosystem:e,authToken:t}){const r=await w(a,e)(`${p("inAppWallet")}/api/v1/enclave-wallet/generate`,{headers:{Authorization:`Bearer embedded-wallet-token:${t}`,"Content-Type":"application/json","x-thirdweb-client-id":a.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 Fe{constructor({baseUrl:e,querier:t,preLogin:n,postLogin:r,client:l,ecosystem:o}){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=n,this.postLogin=r,this.client=l,this.ecosystem=o}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 Ne extends Fe{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 n=await this.authenticateWithCustomJwt({encryptionKey:e,jwt:t});return this.postLogin(n)}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 n=await this.authenticateWithCustomAuthEndpoint({encryptionKey:e,payload:t});return this.postLogin(n)}async authenticateWithEmailOtp({email:e,otp:t,recoveryCode:n}){return this.LoginQuerier.call({params:{email:e,otp:t,recoveryCode:n},procedureName:"verifyThirdwebEmailLoginOtp"})}async loginWithEmailOtp({email:e,otp:t,recoveryCode:n}){const r=await this.authenticateWithEmailOtp({email:e,otp:t,recoveryCode:n});return this.postLogin(r)}async authenticateWithSmsOtp({phoneNumber:e,otp:t,recoveryCode:n}){return this.LoginQuerier.call({params:{otp:t,phoneNumber:e,recoveryCode:n},procedureName:"verifyThirdwebSmsLoginOtp"})}async loginWithSmsOtp({phoneNumber:e,otp:t,recoveryCode:n}){const r=await this.authenticateWithSmsOtp({otp:t,phoneNumber:e,recoveryCode:n});return this.postLogin(r)}}class Re{constructor({client:e,querier:t,onAuthSuccess:n,ecosystem:r,baseUrl:l,localStorage:o}){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=o,this.onAuthSuccess=n,this.BaseLogin=new Ne({baseUrl:l,client:e,ecosystem:r,postLogin:async i=>this.postLogin(i),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 n=await O({authToken:e.storedToken.cookieString,client:this.client,ecosystem:this.ecosystem});if(!n)throw new Error("Cannot login, no user found for auth token");if(n.wallets.length>0&&((l=n.wallets[0])==null?void 0:l.type)==="enclave")return this.postLogin({storedToken:e.storedToken,walletDetails:{walletAddress:n.wallets[0].address}});if(n.wallets.length===0){const o=await Ue({authToken:e.storedToken.cookieString,client:this.client,ecosystem:this.ecosystem});return this.postLogin({storedToken:e.storedToken,walletDetails:{walletAddress:o.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 Be="width=350, height=500",N=({isWindowOpenedByFn:a,win:e,closeOpenedWindow:t})=>{a?e==null||e.close():e&&t?t(e):e&&e.close()};async function Me(a){const e=k({...a,mode:a.mode||"redirect"});a.mode==="redirect"?window.location.href=e:window.open(e),await new Promise(t=>setTimeout(t,5e3))}const ze=async a=>{let e=a.openedWindow,t=!1;if(e||(e=window.open(k({...a,mode:"popup"}),`Login to ${a.authOption}`,Be),t=!0),!e)throw new Error("Something went wrong opening pop-up");return await new Promise((r,l)=>{const o=window.setInterval(async()=>{e.closed&&(clearInterval(o),window.removeEventListener("message",i),l(new Error("User closed login window")))},1e3),i=async c=>{if(c.origin===p("inAppWallet")){if(typeof c.data!="object"){l(new Error("Invalid event data"));return}switch(c.data.eventType){case"oauthSuccessResult":{window.removeEventListener("message",i),clearInterval(o),N({closeOpenedWindow:a.closeOpenedWindow,isWindowOpenedByFn:t,win:e}),c.data.authResult&&r(c.data.authResult);break}case"oauthFailureResult":{window.removeEventListener("message",i),clearInterval(o),N({closeOpenedWindow:a.closeOpenedWindow,isWindowOpenedByFn:t,win:e}),l(new Error(c.data.errorString));break}}}};window.addEventListener("message",i)})},Ge=async a=>{const{client:e,ecosystem:t}=a,n=k({authOption:a.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(a.strategy){case"email":return{email:a.email};case"phone":return{phone:a.phoneNumber}}})(),o=await fetch(n,{body:g(l),headers:r,method:"POST"});if(!o.ok){const i=await o.text();let c;try{const s=JSON.parse(i);s&&typeof s.message=="string"&&(c=s.message)}catch{}throw new Error(c||"Failed to send verification code")}return await o.json()},R=async a=>{const{client:e,ecosystem:t}=a,n=C({authOption:a.strategy,client:a.client,ecosystem:a.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(a.strategy){case"email":return{code:a.verificationCode,email:a.email};case"phone":return{code:a.verificationCode,phone:a.phoneNumber}}})(),o=await fetch(n,{body:g(l),headers:r,method:"POST"});if(!o.ok)throw new Error("Failed to verify verification code");return await o.json()};class B{constructor({client:e,ecosystem:t,querier:n,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=n,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 o;const e=this.walletManagerQuerier,t=this.client,n=(o=this.ecosystem)==null?void 0:o.partnerId,{address:r}=await e.call({params:void 0,procedureName:"getAddress"}),l=async i=>{const c={chainId:i.chainId,data:i.data,gasLimit:i.gas,nonce:i.nonce,to:i.to??void 0,value:i.value};i.maxFeePerGas?(c.accessList=i.accessList,c.maxFeePerGas=i.maxFeePerGas,c.maxPriorityFeePerGas=i.maxPriorityFeePerGas,c.type=2):(c.gasPrice=i.gasPrice,c.type=0);const s=$().rpc,{signedTransaction:u}=await e.call({params:{chainId:i.chainId,partnerId:n,rpcEndpoint:`https://${i.chainId}.${s}`,transaction:c},procedureName:"signTransaction"});return u};return{address:y(r),async sendTransaction(i){const c=P({chain:b(i.chainId),client:t}),s=await l(i),u=await M(c,s);return z({chainId:i.chainId,client:t,contractAddress:i.to??void 0,gasPrice:i.gasPrice,transactionHash:u,walletAddress:r,walletType:"inApp"}),{transactionHash:u}},async signMessage({message:i}){const c=typeof i=="string"?i:i.raw instanceof Uint8Array?i.raw:te(i.raw),{signedMessage:s}=await e.call({params:{chainId:1,message:c,partnerId:n},procedureName:"signMessage"});return s},async signTransaction(i){if(!i.chainId)throw new Error("chainId required in tx to sign");return l({...i,chainId:i.chainId})},async signTypedData(i){var _;const c=G(i);(_=c.types)!=null&&_.EIP712Domain&&(c.types.EIP712Domain=void 0);const s=c.domain,u=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};u&&(h.chainId=u);const f=$().rpc,{signedTypedData:Y}=await e.call({params:{chainId:Number.parseInt(BigInt(u||1).toString()),domain:h,message:c.message,partnerId:n,rpcEndpoint:`https://${u}.${f}`,types:c.types},procedureName:"signTypedDataV4"});return Y}}}}class Je{isClientIdLegacyPaper(e){return e.indexOf("-")>0&&e.length===36}constructor({client:e,onAuthSuccess:t,ecosystem:n,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 o=p("inAppWallet");this.client=e,this.ecosystem=n,this.passkeyDomain=r,this.storage=new V({clientId:e.clientId,ecosystem:n,storage:l??Ve()}),this.querier=new $e({baseUrl:o,clientId:e.clientId,ecosystem:n}),this.auth=new Re({baseUrl:o,client:e,ecosystem:n,localStorage:this.storage,onAuthSuccess:async i=>{if(t==null||t(i),i.storedToken.authDetails.walletType==="sharded"&&(await this.querier.call({params:{storedToken:i.storedToken},procedureName:"migrateFromShardToEnclave"})||console.warn("Failed to migrate from sharded to enclave wallet, continuing with sharded wallet")),this.wallet=await this.initializeWallet(i.storedToken.cookieString),!this.wallet)throw new Error("Failed to initialize wallet");const c="deviceShareStored"in i.walletDetails?i.walletDetails.deviceShareStored:void 0;return await this.wallet.postWalletSetUp({deviceShareStored:c,storedToken:i.storedToken}),this.wallet instanceof B&&await this.querier.call({params:{authCookie:i.storedToken.cookieString,clientId:this.client.clientId,deviceShareStored:"deviceShareStored"in i.walletDetails?i.walletDetails.deviceShareStored:null,ecosystemId:n==null?void 0:n.id,partnerId:n==null?void 0:n.partnerId,walletUserId:i.storedToken.authDetails.userWalletId},procedureName:"initIframe"}),{user:{account:await this.wallet.getAccount(),authDetails:i.storedToken.authDetails,status:"Logged In, Wallet Initialized",walletAddress:i.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 n=await O({authToken:e||t,client:this.client,ecosystem:this.ecosystem});if(!n)throw new Error("Cannot initialize wallet, no user logged in");if(n.wallets.length===0)throw new Error("Cannot initialize wallet, this user does not have a wallet generated yet");return((r=n.wallets[0])==null?void 0:r.type)==="enclave"?new Oe({address:n.wallets[0].address,client:this.client,ecosystem:this.ecosystem,storage:this.storage}):new B({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 Ge({...e,client:this.client,ecosystem:this.ecosystem})}async authenticateWithRedirect(e,t,n){return Me({authOption:e,client:this.client,ecosystem:this.ecosystem,mode:t,redirectUrl:n})}async loginWithAuthToken(e,t){return this.auth.loginWithAuthToken(e,t)}async authenticate(e){const t=e.strategy;switch(t){case"email":return R({...e,client:this.client,ecosystem:this.ecosystem});case"phone":return R({...e,client:this.client,ecosystem:this.ecosystem});case"auth_endpoint":return he({client:this.client,ecosystem:this.ecosystem,payload:e.payload});case"jwt":return ge({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 ze({authOption:t,client:this.client,closeOpenedWindow:e.closeOpenedWindow,ecosystem:this.ecosystem,openedWindow:e.openedWindow});case"guest":return pe({client:this.client,ecosystem:this.ecosystem,storage:this.storage});case"backend":return we({client:this.client,ecosystem:this.ecosystem,walletSecret:e.walletSecret});case"wallet":return Ee({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 n=await this.authenticate(e);return await this.loginWithAuthToken(n,e.encryptionKey)}case"iframe_email_verification":return this.auth.loginWithIframe({email:e.email});case"iframe":return this.auth.loginWithModal();case"passkey":{const n=await this.passkeyAuth(e);return this.loginWithAuthToken(n)}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 n=await this.authenticate(e);return await this.auth.loginWithAuthToken(n)}default:xe(t)}}async logout(){return await this.auth.logout()}async passkeyAuth(e){const{PasskeyWebClient:t}=await I(async()=>{const{PasskeyWebClient:i}=await import("./passkeys-DnaNEVFD.js");return{PasskeyWebClient:i}},__vite__mapDeps([2,3,1,4,5,6,7])),{passkeyName:n,storeLastUsedPasskey:r=!0}=e,l=new t,o=this.storage;return e.type==="sign-up"?Ie({client:this.client,ecosystem:this.ecosystem,passkeyClient:l,rp:{id:this.passkeyDomain??window.location.hostname,name:this.passkeyDomain??window.document.title},storage:r?o:void 0,username:n}):be({client:this.client,ecosystem:this.ecosystem,passkeyClient:l,rp:{id:this.passkeyDomain??window.location.hostname,name:this.passkeyDomain??window.document.title},storage:r?o:void 0})}async linkProfile(e){const{storedToken:t}=await this.authenticate(e);return await me({client:e.client,ecosystem:e.ecosystem||this.ecosystem,storage:this.storage,tokenToLink:t.cookieString})}async unlinkProfile(e,t){return await fe({allowAccountDeletion:t,client:this.client,ecosystem:this.ecosystem,profileToUnlink:e,storage:this.storage})}async getProfiles(){return ye({client:this.client,ecosystem:this.ecosystem,storage:this.storage})}}function xe(a,e){throw new Error(`Invalid param: ${a}`)}function Ve(){return typeof window<"u"&&window.localStorage?x:oe}export{Je as InAppWebConnector};
|
package/index.html
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
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.11.
|
|
9
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/auth-site/4.11.
|
|
10
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/auth-site/4.11.
|
|
11
|
-
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/auth-site/4.11.
|
|
12
|
-
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/auth-site/4.11.
|
|
13
|
-
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/auth-site/4.11.
|
|
8
|
+
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/auth-site/4.11.2-22147838408.commit-6a0fdff/assets/index-CVHrGrAd.js"></script>
|
|
9
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/auth-site/4.11.2-22147838408.commit-6a0fdff/assets/thirdweb-DVPvYSAe.js">
|
|
10
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/auth-site/4.11.2-22147838408.commit-6a0fdff/assets/vendor-BFHicODy.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="https://cdn.decentraland.org/@dcl/auth-site/4.11.2-22147838408.commit-6a0fdff/assets/ui-xtM5k7h3.js">
|
|
12
|
+
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/auth-site/4.11.2-22147838408.commit-6a0fdff/assets/ui-Cg2KU6mE.css">
|
|
13
|
+
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/auth-site/4.11.2-22147838408.commit-6a0fdff/assets/index-85xIh8VB.css">
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
|
16
16
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/auth-site",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.2-22147838408.commit-6a0fdff",
|
|
4
4
|
"description": "Auth website",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
"type": "git",
|
|
18
18
|
"url": "https://github.com/decentraland/auth.git"
|
|
19
19
|
},
|
|
20
|
-
"homepage": "https://cdn.decentraland.org/@dcl/auth-site/4.11.
|
|
21
|
-
"commit": "
|
|
20
|
+
"homepage": "https://cdn.decentraland.org/@dcl/auth-site/4.11.2-22147838408.commit-6a0fdff",
|
|
21
|
+
"commit": "6a0fdff9bb0f74762773d2dfc2ab0eaaf7b827e7"
|
|
22
22
|
}
|
package/assets/index-B6Hui9GU.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{p as ut}from"./thirdweb-D6clKR4w.js";var U=(e=>(e.MissingApiKey="MISSING_API_KEY",e.ModalNotReady="MODAL_NOT_READY",e.MalformedResponse="MALFORMED_RESPONSE",e.InvalidArgument="INVALID_ARGUMENT",e.ExtensionNotInitialized="EXTENSION_NOT_INITIALIZED",e.IncompatibleExtensions="INCOMPATIBLE_EXTENSIONS",e))(U||{}),j=(e=>(e.SyncWeb3Method="SYNC_WEB3_METHOD",e.DuplicateIframe="DUPLICATE_IFRAME",e.ReactNativeEndpointConfiguration="REACT_NATIVE_ENDPOINT_CONFIGURATION",e.DeprecationNotice="DEPRECATION_NOTICE",e.ProductAnnouncement="ANNOUNCEMENT",e))(j||{}),_e=(e=>(e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.MagicLinkFailedVerification=-1e4]="MagicLinkFailedVerification",e[e.MagicLinkExpired=-10001]="MagicLinkExpired",e[e.MagicLinkRateLimited=-10002]="MagicLinkRateLimited",e[e.MagicLinkInvalidRedirectURL=-10006]="MagicLinkInvalidRedirectURL",e[e.UserAlreadyLoggedIn=-10003]="UserAlreadyLoggedIn",e[e.UpdateEmailFailed=-10004]="UpdateEmailFailed",e[e.UserRequestEditEmail=-10005]="UserRequestEditEmail",e[e.InactiveRecipient=-10010]="InactiveRecipient",e[e.AccessDeniedToUser=-10011]="AccessDeniedToUser",e[e.RedirectLoginComplete=-10015]="RedirectLoginComplete",e))(_e||{}),M=(e=>(e.MetaMask="metamask",e.CoinbaseWallet="coinbase_wallet",e))(M||{}),ae=(e=>(e.WalletSelected="wallet_selected",e.WalletConnected="wallet_connected",e.WalletRejected="wallet_rejected",e))(ae||{}),h=(e=>(e.LoginWithSms="magic_auth_login_with_sms",e.LoginWithEmailOTP="magic_auth_login_with_email_otp",e.LoginWithMagicLink="magic_auth_login_with_magic_link",e.LoginWithCredential="magic_auth_login_with_credential",e.SetAuthorizationToken="magic_auth_set_authorization_token",e.GetIdToken="magic_auth_get_id_token",e.GenerateIdToken="magic_auth_generate_id_token",e.GetMetadata="magic_auth_get_metadata",e.IsLoggedIn="magic_is_logged_in",e.Logout="magic_auth_logout",e.UpdateEmail="magic_auth_update_email",e.UserSettings="magic_auth_settings",e.UserSettingsTestMode="magic_auth_settings_testing_mode",e.LoginWithSmsTestMode="magic_auth_login_with_sms_testing_mode",e.LoginWithEmailOTPTestMode="magic_auth_login_with_email_otp_testing_mode",e.LoginWithMagicLinkTestMode="magic_login_with_magic_link_testing_mode",e.LoginWithCredentialTestMode="magic_auth_login_with_credential_testing_mode",e.GetIdTokenTestMode="magic_auth_get_id_token_testing_mode",e.GenerateIdTokenTestMode="magic_auth_generate_id_token_testing_mode",e.GetMetadataTestMode="magic_auth_get_metadata_testing_mode",e.IsLoggedInTestMode="magic_auth_is_logged_in_testing_mode",e.LogoutTestMode="magic_auth_logout_testing_mode",e.UpdateEmailTestMode="magic_auth_update_email_testing_mode",e.IntermediaryEvent="magic_intermediary_event",e.RequestAccounts="eth_requestAccounts",e.GetInfo="magic_get_info",e.ShowUI="magic_wallet",e.NFTPurchase="magic_nft_purchase",e.NFTCheckout="magic_nft_checkout",e.NFTTransfer="magic_nft_transfer",e.RequestUserInfoWithUI="mc_request_user_info",e.Disconnect="mc_disconnect",e.RecoverAccount="magic_auth_recover_account",e.RecoverAccountTestMode="magic_auth_recover_account_testing_mode",e.MagicBoxHeartBeat="magic_box_heart_beat",e.AutoConnect="mc_auto_connect",e.Login="mc_login",e.EncryptV1="magic_auth_encrypt_v1",e.DecryptV1="magic_auth_decrypt_v1",e.ShowNFTs="magic_show_nfts",e.ShowOnRamp="magic_show_fiat_onramp",e.ShowSendTokensUI="magic_show_send_tokens_ui",e.ShowAddress="magic_show_address",e.ShowBalances="magic_show_balances",e.SendGaslessTransaction="eth_sendGaslessTransaction",e))(h||{}),k=(e=>(e.MAGIC_HANDLE_RESPONSE="MAGIC_HANDLE_RESPONSE",e.MAGIC_OVERLAY_READY="MAGIC_OVERLAY_READY",e.MAGIC_SHOW_OVERLAY="MAGIC_SHOW_OVERLAY",e.MAGIC_HIDE_OVERLAY="MAGIC_HIDE_OVERLAY",e.MAGIC_HANDLE_EVENT="MAGIC_HANDLE_EVENT",e.MAGIC_MG_BOX_SEND_RECEIPT="MAGIC_MG_BOX_SEND_RECEIPT",e.MAGIC_SEND_PRODUCT_ANNOUNCEMENT="MAGIC_SEND_PRODUCT_ANNOUNCEMENT",e))(k||{}),ce=(e=>(e.MAGIC_HANDLE_REQUEST="MAGIC_HANDLE_REQUEST",e))(ce||{}),dt=(e=>(e.UpdateEmail="update-email",e.MFA="mfa",e.Recovery="recovery",e))(dt||{}),ht=(e=>(e.Retry="retry",e))(ht||{}),pt=(e=>(e.EmailSent="email-sent",e.EmailNotDeliverable="email-not-deliverable",e))(pt||{}),B=(e=>(e.VerifyEmailOtp="verify-email-otp",e.Cancel="cancel",e))(B||{}),mt=(e=>(e.EmailOTPSent="email-otp-sent",e.InvalidEmailOtp="invalid-email-otp",e.ExpiredEmailOtp="expired-email-otp",e))(mt||{}),ge=(e=>(e.Retry="device-retry",e))(ge||{}),Et=(e=>(e.DeviceApproved="device-approved",e.DeviceNeedsApproval="device-needs-approval",e.DeviceVerificationLinkExpired="device-verification-link-expired",e.DeviceVerificationEmailSent="device-verification-email-sent",e))(Et||{}),b=(e=>(e.Retry="Recency/auth-factor-retry",e.Cancel="Recency/auth-factor-verification-cancel",e.VerifyEmailOtp="Recency/auth-factor-verify-email-otp",e))(b||{}),ft=(e=>(e.PrimaryAuthFactorNeedsVerification="Recency/auth-factor-needs-verification",e.PrimaryAuthFactorVerified="Recency/auth-factor-verified",e.InvalidEmailOtp="Recency/auth-factor-invalid-email-otp",e.EmailExpired="Recency/auth-factor-verification-email-expired",e.EmailSent="Recency/auth-factor-verification-email-sent",e.EmailNotDeliverable="Recency/auth-factor-verification-email-not-deliverable",e))(ft||{}),P=(e=>(e.RetryWithNewEmail="UpdateEmail/retry-with-new-email",e.Cancel="UpdateEmail/new-email-verification-cancel",e.VerifyEmailOtp="UpdateEmail/new-email-verify-otp",e))(P||{}),gt=(e=>(e.NewAuthFactorNeedsVerification="UpdateEmail/new-email-needs-verification",e.EmailUpdated="UpdateEmail/email-updated",e.InvalidEmailOtp="UpdateEmail/new-email-invalid-email-otp",e.EmailExpired="UpdateEmail/new-email-verification-email-expired",e.EmailSent="UpdateEmail/new-email-verification-email-sent",e.EmailNotDeliverable="UpdateEmail/new-email-verification-email-not-deliverable",e.InvalidEmail="UpdateEmail/new-email-invalid",e.EmailAlreadyExists="UpdateEmail/new-email-already-exists",e))(gt||{}),vt=(e=>(e.Harmony="HARMONY",e))(vt||{}),_t=(e=>(e.PhoneNumber="phone_number",e))(_t||{}),Ee={},It=Object.create,pe=Object.defineProperty,yt=Object.defineProperties,wt=Object.getOwnPropertyDescriptor,Rt=Object.getOwnPropertyDescriptors,$t=Object.getOwnPropertyNames,Te=Object.getOwnPropertySymbols,Nt=Object.getPrototypeOf,He=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,Le=(e,t,r)=>t in e?pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ie=(e,t)=>{for(var r in t||(t={}))He.call(t,r)&&Le(e,r,t[r]);if(Te)for(var r of Te(t))At.call(t,r)&&Le(e,r,t[r]);return e},ye=(e,t)=>yt(e,Rt(t)),Ot=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Mt=(e,t)=>{for(var r in t)pe(e,r,{get:t[r],enumerable:!0})},Tt=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of $t(t))!He.call(e,n)&&n!==r&&pe(e,n,{get:()=>t[n],enumerable:!(i=wt(t,n))||i.enumerable});return e},Lt=(e,t,r)=>(r=e!=null?It(Nt(e)):{},Tt(!e||!e.__esModule?pe(r,"default",{value:e,enumerable:!0}):r,e)),_=(e,t,r)=>new Promise((i,n)=>{var s=u=>{try{o(r.next(u))}catch(l){n(l)}},a=u=>{try{o(r.throw(u))}catch(l){n(l)}},o=u=>u.done?i(u.value):Promise.resolve(u.value).then(s,a);o((r=r.apply(e,t)).next())}),St=Ot((e,t)=>{var r=Object.prototype.hasOwnProperty,i="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(i=!1));function s(l,c,d){this.fn=l,this.context=c,this.once=d||!1}function a(l,c,d,f,v){if(typeof d!="function")throw new TypeError("The listener must be a function");var I=new s(d,f||l,v),$=i?i+c:c;return l._events[$]?l._events[$].fn?l._events[$]=[l._events[$],I]:l._events[$].push(I):(l._events[$]=I,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var l=[],c,d;if(this._eventsCount===0)return l;for(d in c=this._events)r.call(c,d)&&l.push(i?d.slice(1):d);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},u.prototype.listeners=function(l){var c=i?i+l:l,d=this._events[c];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,v=d.length,I=new Array(v);f<v;f++)I[f]=d[f].fn;return I},u.prototype.listenerCount=function(l){var c=i?i+l:l,d=this._events[c];return d?d.fn?1:d.length:0},u.prototype.emit=function(l,c,d,f,v,I){var $=i?i+l:l;if(!this._events[$])return!1;var p=this._events[$],L=arguments.length,C,y;if(p.fn){switch(p.once&&this.removeListener(l,p.fn,void 0,!0),L){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,c),!0;case 3:return p.fn.call(p.context,c,d),!0;case 4:return p.fn.call(p.context,c,d,f),!0;case 5:return p.fn.call(p.context,c,d,f,v),!0;case 6:return p.fn.call(p.context,c,d,f,v,I),!0}for(y=1,C=new Array(L-1);y<L;y++)C[y-1]=arguments[y];p.fn.apply(p.context,C)}else{var ct=p.length,V;for(y=0;y<ct;y++)switch(p[y].once&&this.removeListener(l,p[y].fn,void 0,!0),L){case 1:p[y].fn.call(p[y].context);break;case 2:p[y].fn.call(p[y].context,c);break;case 3:p[y].fn.call(p[y].context,c,d);break;case 4:p[y].fn.call(p[y].context,c,d,f);break;default:if(!C)for(V=1,C=new Array(L-1);V<L;V++)C[V-1]=arguments[V];p[y].fn.apply(p[y].context,C)}}return!0},u.prototype.on=function(l,c,d){return a(this,l,c,d,!1)},u.prototype.once=function(l,c,d){return a(this,l,c,d,!0)},u.prototype.removeListener=function(l,c,d,f){var v=i?i+l:l;if(!this._events[v])return this;if(!c)return o(this,v),this;var I=this._events[v];if(I.fn)I.fn===c&&(!f||I.once)&&(!d||I.context===d)&&o(this,v);else{for(var $=0,p=[],L=I.length;$<L;$++)(I[$].fn!==c||f&&!I[$].once||d&&I[$].context!==d)&&p.push(I[$]);p.length?this._events[v]=p.length===1?p[0]:p:o(this,v)}return this},u.prototype.removeAllListeners=function(l){var c;return l?(c=i?i+l:l,this._events[c]&&o(this,c)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=i,u.EventEmitter=u,typeof t<"u"&&(t.exports=u)});function Ct(e){let t={exports:{}};return e(t,t.exports),t.exports}var bt=Number.MAX_SAFE_INTEGER||9007199254740991,we={MAX_LENGTH:256,MAX_SAFE_INTEGER:bt,MAX_SAFE_COMPONENT_LENGTH:16},Pt=typeof ut=="object"&&Ee&&Ee.NODE_DEBUG&&/\bsemver\b/i.test(Ee.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{},E=Pt,ee=Ct(function(e,t){let{MAX_SAFE_COMPONENT_LENGTH:r}=we,i=(t=e.exports={}).re=[],n=t.src=[],s=t.t={},a=0,o=(u,l,c)=>{let d=a++;E(d,l),s[u]=d,n[d]=l,i[d]=new RegExp(l,c?"g":void 0)};o("NUMERICIDENTIFIER","0|[1-9]\\d*"),o("NUMERICIDENTIFIERLOOSE","[0-9]+"),o("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),o("MAINVERSION",`(${n[s.NUMERICIDENTIFIER]})\\.(${n[s.NUMERICIDENTIFIER]})\\.(${n[s.NUMERICIDENTIFIER]})`),o("MAINVERSIONLOOSE",`(${n[s.NUMERICIDENTIFIERLOOSE]})\\.(${n[s.NUMERICIDENTIFIERLOOSE]})\\.(${n[s.NUMERICIDENTIFIERLOOSE]})`),o("PRERELEASEIDENTIFIER",`(?:${n[s.NUMERICIDENTIFIER]}|${n[s.NONNUMERICIDENTIFIER]})`),o("PRERELEASEIDENTIFIERLOOSE",`(?:${n[s.NUMERICIDENTIFIERLOOSE]}|${n[s.NONNUMERICIDENTIFIER]})`),o("PRERELEASE",`(?:-(${n[s.PRERELEASEIDENTIFIER]}(?:\\.${n[s.PRERELEASEIDENTIFIER]})*))`),o("PRERELEASELOOSE",`(?:-?(${n[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${n[s.PRERELEASEIDENTIFIERLOOSE]})*))`),o("BUILDIDENTIFIER","[0-9A-Za-z-]+"),o("BUILD",`(?:\\+(${n[s.BUILDIDENTIFIER]}(?:\\.${n[s.BUILDIDENTIFIER]})*))`),o("FULLPLAIN",`v?${n[s.MAINVERSION]}${n[s.PRERELEASE]}?${n[s.BUILD]}?`),o("FULL",`^${n[s.FULLPLAIN]}$`),o("LOOSEPLAIN",`[v=\\s]*${n[s.MAINVERSIONLOOSE]}${n[s.PRERELEASELOOSE]}?${n[s.BUILD]}?`),o("LOOSE",`^${n[s.LOOSEPLAIN]}$`),o("GTLT","((?:<|>)?=?)"),o("XRANGEIDENTIFIERLOOSE",`${n[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),o("XRANGEIDENTIFIER",`${n[s.NUMERICIDENTIFIER]}|x|X|\\*`),o("XRANGEPLAIN",`[v=\\s]*(${n[s.XRANGEIDENTIFIER]})(?:\\.(${n[s.XRANGEIDENTIFIER]})(?:\\.(${n[s.XRANGEIDENTIFIER]})(?:${n[s.PRERELEASE]})?${n[s.BUILD]}?)?)?`),o("XRANGEPLAINLOOSE",`[v=\\s]*(${n[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[s.XRANGEIDENTIFIERLOOSE]})(?:${n[s.PRERELEASELOOSE]})?${n[s.BUILD]}?)?)?`),o("XRANGE",`^${n[s.GTLT]}\\s*${n[s.XRANGEPLAIN]}$`),o("XRANGELOOSE",`^${n[s.GTLT]}\\s*${n[s.XRANGEPLAINLOOSE]}$`),o("COERCE",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),o("COERCERTL",n[s.COERCE],!0),o("LONETILDE","(?:~>?)"),o("TILDETRIM",`(\\s*)${n[s.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",o("TILDE",`^${n[s.LONETILDE]}${n[s.XRANGEPLAIN]}$`),o("TILDELOOSE",`^${n[s.LONETILDE]}${n[s.XRANGEPLAINLOOSE]}$`),o("LONECARET","(?:\\^)"),o("CARETTRIM",`(\\s*)${n[s.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",o("CARET",`^${n[s.LONECARET]}${n[s.XRANGEPLAIN]}$`),o("CARETLOOSE",`^${n[s.LONECARET]}${n[s.XRANGEPLAINLOOSE]}$`),o("COMPARATORLOOSE",`^${n[s.GTLT]}\\s*(${n[s.LOOSEPLAIN]})$|^$`),o("COMPARATOR",`^${n[s.GTLT]}\\s*(${n[s.FULLPLAIN]})$|^$`),o("COMPARATORTRIM",`(\\s*)${n[s.GTLT]}\\s*(${n[s.LOOSEPLAIN]}|${n[s.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",o("HYPHENRANGE",`^\\s*(${n[s.XRANGEPLAIN]})\\s+-\\s+(${n[s.XRANGEPLAIN]})\\s*$`),o("HYPHENRANGELOOSE",`^\\s*(${n[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${n[s.XRANGEPLAINLOOSE]})\\s*$`),o("STAR","(<|>)?=?\\s*\\*"),o("GTE0","^\\s*>=\\s*0.0.0\\s*$"),o("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}),Se=/^[0-9]+$/,kt=(e,t)=>{let r=Se.test(e),i=Se.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1},Ut={compareIdentifiers:kt},{MAX_LENGTH:Ce,MAX_SAFE_INTEGER:re}=we,{re:be,t:Pe}=ee,{compareIdentifiers:H}=Ut,w=class{constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof w){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Ce)throw new TypeError(`version is longer than ${Ce} characters`);E("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let r=e.trim().match(t.loose?be[Pe.LOOSE]:be[Pe.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>re||this.major<0)throw new TypeError("Invalid major version");if(this.minor>re||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>re||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<re)return n}return i}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(E("SemVer.compare",this.version,this.options,e),!(e instanceof w)){if(typeof e=="string"&&e===this.version)return 0;e=new w(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof w||(e=new w(e,this.options)),H(this.major,e.major)||H(this.minor,e.minor)||H(this.patch,e.patch)}comparePre(e){if(e instanceof w||(e=new w(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let r=this.prerelease[t],i=e.prerelease[t];if(E("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r!==i)return H(r,i)}while(++t)}compareBuild(e){e instanceof w||(e=new w(e,this.options));let t=0;do{let r=this.build[t],i=e.build[t];if(E("prerelease compare",t,r,i),r===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(r===void 0)return-1;if(r!==i)return H(r,i)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t),this.inc("pre",t);break;case"major":this.minor===0&&this.patch===0&&this.prerelease.length!==0||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":this.patch===0&&this.prerelease.length!==0||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]=="number"&&(this.prerelease[r]++,r=-2);r===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}},Dt=(e,t,r)=>new w(e,r).compare(new w(t,r)),q=Dt,Gt=(e,t,r)=>q(e,t,r)===0,xt=Gt,Ft=(e,t,r)=>q(e,t,r)!==0,Wt=Ft,jt=(e,t,r)=>q(e,t,r)>0,qt=jt,Vt=(e,t,r)=>q(e,t,r)>=0,Ht=Vt,Xt=(e,t,r)=>q(e,t,r)<0,Bt=Xt,Kt=(e,t,r)=>q(e,t,r)<=0,Yt=Kt,zt=(e,t,r,i)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return xt(e,r,i);case"!=":return Wt(e,r,i);case">":return qt(e,r,i);case">=":return Ht(e,r,i);case"<":return Bt(e,r,i);case"<=":return Yt(e,r,i);default:throw new TypeError(`Invalid operator: ${t}`)}},fe=zt,X=Symbol("SemVer ANY"),Q=class{static get ANY(){return X}constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof Q){if(e.loose===!!t.loose)return e;e=e.value}E("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===X?this.value="":this.value=this.operator+this.semver.version,E("comp",this)}parse(e){let t=this.options.loose?ke[Ue.COMPARATORLOOSE]:ke[Ue.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=r[1]!==void 0?r[1]:"",this.operator==="="&&(this.operator=""),r[2]?this.semver=new w(r[2],this.options.loose):this.semver=X}toString(){return this.value}test(e){if(E("Comparator.test",e,this.options.loose),this.semver===X||e===X)return!0;if(typeof e=="string")try{e=new w(e,this.options)}catch{return!1}return fe(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof Q))throw new TypeError("a Comparator is required");if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""||new F(e.value,t).test(this.value);if(e.operator==="")return e.value===""||new F(this.value,t).test(e.semver);let r=!(this.operator!==">="&&this.operator!==">"||e.operator!==">="&&e.operator!==">"),i=!(this.operator!=="<="&&this.operator!=="<"||e.operator!=="<="&&e.operator!=="<"),n=this.semver.version===e.semver.version,s=!(this.operator!==">="&&this.operator!=="<="||e.operator!==">="&&e.operator!=="<="),a=fe(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),o=fe(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return r||i||n&&s||a||o}},{re:ke,t:Ue}=ee,F=class{constructor(e,t){if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof F)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new F(e.raw,t);if(e instanceof Q)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(r=>this.parseRange(r.trim())).filter(r=>r.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){let{loose:t}=this.options;e=e.trim();let r=t?N[R.HYPHENRANGELOOSE]:N[R.HYPHENRANGE];e=e.replace(r,cr(this.options.includePrerelease)),E("hyphen replace",e),e=e.replace(N[R.COMPARATORTRIM],Jt),E("comparator trim",e,N[R.COMPARATORTRIM]),e=(e=(e=e.replace(N[R.TILDETRIM],Qt)).replace(N[R.CARETTRIM],Zt)).split(/\s+/).join(" ");let i=t?N[R.COMPARATORLOOSE]:N[R.COMPARATOR];return e.split(" ").map(n=>er(n,this.options)).join(" ").split(/\s+/).map(n=>lr(n,this.options)).filter(this.options.loose?n=>!!n.match(i):()=>!0).map(n=>new Q(n,this.options))}intersects(e,t){if(!(e instanceof F))throw new TypeError("a Range is required");return this.set.some(r=>De(r,t)&&e.set.some(i=>De(i,t)&&r.every(n=>i.every(s=>n.intersects(s,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new w(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(ur(this.set[t],e,this.options))return!0;return!1}},{re:N,t:R,comparatorTrimReplace:Jt,tildeTrimReplace:Qt,caretTrimReplace:Zt}=ee,De=(e,t)=>{let r=!0,i=e.slice(),n=i.pop();for(;r&&i.length;)r=i.every(s=>n.intersects(s,t)),n=i.pop();return r},er=(e,t)=>(E("comp",e,t),e=ir(e,t),E("caret",e),e=tr(e,t),E("tildes",e),e=sr(e,t),E("xrange",e),e=ar(e,t),E("stars",e),e),A=e=>!e||e.toLowerCase()==="x"||e==="*",tr=(e,t)=>e.trim().split(/\s+/).map(r=>rr(r,t)).join(" "),rr=(e,t)=>{let r=t.loose?N[R.TILDELOOSE]:N[R.TILDE];return e.replace(r,(i,n,s,a,o)=>{let u;return E("tilde",e,i,n,s,a,o),A(n)?u="":A(s)?u=`>=${n}.0.0 <${+n+1}.0.0-0`:A(a)?u=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`:o?(E("replaceTilde pr",o),u=`>=${n}.${s}.${a}-${o} <${n}.${+s+1}.0-0`):u=`>=${n}.${s}.${a} <${n}.${+s+1}.0-0`,E("tilde return",u),u})},ir=(e,t)=>e.trim().split(/\s+/).map(r=>nr(r,t)).join(" "),nr=(e,t)=>{E("caret",e,t);let r=t.loose?N[R.CARETLOOSE]:N[R.CARET],i=t.includePrerelease?"-0":"";return e.replace(r,(n,s,a,o,u)=>{let l;return E("caret",e,n,s,a,o,u),A(s)?l="":A(a)?l=`>=${s}.0.0${i} <${+s+1}.0.0-0`:A(o)?l=s==="0"?`>=${s}.${a}.0${i} <${s}.${+a+1}.0-0`:`>=${s}.${a}.0${i} <${+s+1}.0.0-0`:u?(E("replaceCaret pr",u),l=s==="0"?a==="0"?`>=${s}.${a}.${o}-${u} <${s}.${a}.${+o+1}-0`:`>=${s}.${a}.${o}-${u} <${s}.${+a+1}.0-0`:`>=${s}.${a}.${o}-${u} <${+s+1}.0.0-0`):(E("no pr"),l=s==="0"?a==="0"?`>=${s}.${a}.${o}${i} <${s}.${a}.${+o+1}-0`:`>=${s}.${a}.${o}${i} <${s}.${+a+1}.0-0`:`>=${s}.${a}.${o} <${+s+1}.0.0-0`),E("caret return",l),l})},sr=(e,t)=>(E("replaceXRanges",e,t),e.split(/\s+/).map(r=>or(r,t)).join(" ")),or=(e,t)=>{e=e.trim();let r=t.loose?N[R.XRANGELOOSE]:N[R.XRANGE];return e.replace(r,(i,n,s,a,o,u)=>{E("xRange",e,i,n,s,a,o,u);let l=A(s),c=l||A(a),d=c||A(o),f=d;return n==="="&&f&&(n=""),u=t.includePrerelease?"-0":"",l?i=n===">"||n==="<"?"<0.0.0-0":"*":n&&f?(c&&(a=0),o=0,n===">"?(n=">=",c?(s=+s+1,a=0,o=0):(a=+a+1,o=0)):n==="<="&&(n="<",c?s=+s+1:a=+a+1),n==="<"&&(u="-0"),i=`${n+s}.${a}.${o}${u}`):c?i=`>=${s}.0.0${u} <${+s+1}.0.0-0`:d&&(i=`>=${s}.${a}.0${u} <${s}.${+a+1}.0-0`),E("xRange return",i),i})},ar=(e,t)=>(E("replaceStars",e,t),e.trim().replace(N[R.STAR],"")),lr=(e,t)=>(E("replaceGTE0",e,t),e.trim().replace(N[t.includePrerelease?R.GTE0PRE:R.GTE0],"")),cr=e=>(t,r,i,n,s,a,o,u,l,c,d,f,v)=>`${r=A(i)?"":A(n)?`>=${i}.0.0${e?"-0":""}`:A(s)?`>=${i}.${n}.0${e?"-0":""}`:a?`>=${r}`:`>=${r}${e?"-0":""}`} ${u=A(l)?"":A(c)?`<${+l+1}.0.0-0`:A(d)?`<${l}.${+c+1}.0-0`:f?`<=${l}.${c}.${d}-${f}`:e?`<${l}.${c}.${+d+1}-0`:`<=${u}`}`.trim(),ur=(e,t,r)=>{for(let i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let i=0;i<e.length;i++)if(E(e[i].semver),e[i].semver!==Q.ANY&&e[i].semver.prerelease.length>0){let n=e[i].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0},dr=(e,t,r)=>{try{t=new F(t,r)}catch{return!1}return t.test(e)},{MAX_LENGTH:hr}=we,{re:Ge,t:xe}=ee,pr=(e,t)=>{if(t&&typeof t=="object"||(t={loose:!!t,includePrerelease:!1}),e instanceof w)return e;if(typeof e!="string"||e.length>hr||!(t.loose?Ge[xe.LOOSE]:Ge[xe.FULL]).test(e))return null;try{return new w(e,t)}catch{return null}},mr=pr,{re:ie,t:ne}=ee,Er=(e,t)=>{if(e instanceof w)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;let r=null;if((t=t||{}).rtl){let i;for(;(i=ie[ne.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),ie[ne.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;ie[ne.COERCERTL].lastIndex=-1}else r=e.match(ie[ne.COERCE]);return r===null?null:mr(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)};function fr(e){return String.fromCharCode(parseInt(e.slice(1),16))}function gr(e){return`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`}function vr(e){return btoa(encodeURIComponent(e).replace(/%[0-9A-F]{2}/g,fr))}function _r(e){return decodeURIComponent(Array.from(atob(e),gr).join(""))}function Xe(e){return vr(JSON.stringify(e))}function Ir(e){return JSON.parse(_r(e))}function K(e){return typeof e>"u"}function yr(e){return e===null}function Be(e){return yr(e)||K(e)}function wr(e){return Be(e)?!1:!K(e.jsonrpc)&&!K(e.id)&&(!K(e.result)||!K(e.error))}function Rr(e){return Be(e)?!1:typeof e=="number"&&Object.values(_e).includes(e)}function ue(e){if(!e)return!0;for(let t in e)if(Object.hasOwnProperty.call(e,t))return!1;return!0}var g={};function _i(e,t){return Object.assign(g,t),e}var $r={"magic-sdk":"magic-sdk","@magic-sdk/react-native":"magic-sdk-rn","@magic-sdk/react-native-bare":"magic-sdk-rn-bare","@magic-sdk/react-native-expo":"magic-sdk-rn-expo"},D=class extends Error{constructor(e,t){super(`Magic SDK Error: [${e}] ${t}`),this.code=e,this.rawMessage=t,this.__proto__=Error,Object.setPrototypeOf(this,D.prototype)}},de=class extends Error{constructor(e){super(),this.__proto__=Error;let t=Number(e==null?void 0:e.code);this.rawMessage=(e==null?void 0:e.message)||"Internal error",this.code=Rr(t)?t:_e.InternalError,this.message=`Magic RPC Error: [${this.code}] ${this.rawMessage}`,this.data=(e==null?void 0:e.data)||void 0,Object.setPrototypeOf(this,de.prototype)}},te=class{constructor(e,t){this.code=e,this.rawMessage=t,this.message=`Magic SDK Warning: [${e}] ${t}`}log(){console.warn(this.message)}},Ke=class extends Error{constructor(e,t,r,i){super(`Magic Extension Error (${e.name}): [${t}] ${r}`),this.code=t,this.rawMessage=r,this.data=i,this.__proto__=Error,Object.setPrototypeOf(this,Ke.prototype)}},Fe=class{constructor(e,t,r){this.code=t,this.rawMessage=r,this.message=`Magic Extension Warning (${e.name}): [${t}] ${r}`}log(){console.warn(this.message)}};function Nr(){return new D(U.MissingApiKey,"Please provide an API key that you acquired from the Magic developer dashboard.")}function Ar(){return new D(U.ModalNotReady,"Modal is not ready.")}function Or(){return new D(U.MalformedResponse,"Response from the Magic iframe is malformed.")}function Mr(e){return new D(U.ExtensionNotInitialized,`Extensions must be initialized with a Magic SDK instance before \`Extension.${e}\` can be accessed. Do not invoke \`Extension.${e}\` inside an extension constructor.`)}function Tr(e){let t=`Some extensions are incompatible with \`${g.sdkName}@${g.version}\`:`;return e.filter(r=>typeof r.compat<"u"&&r.compat!==null).forEach(r=>{let i=r.compat[g.sdkName];typeof i=="string"?t+=`
|
|
2
|
-
- Extension \`${r.name}\` supports version(s) \`${i}\``:i||(t+=`
|
|
3
|
-
- Extension \`${r.name}\` does not support ${g.platform} environments.`)}),new D(U.IncompatibleExtensions,t)}function Lr(e){let t=r=>{let i=r+1,n=i%10,s=i%100;return n===1&&s!==11?`${i}st`:n===2&&s!==12?`${i}nd`:n===3&&s!==13?`${i}rd`:`${i}th`};return new D(U.InvalidArgument,`Invalid ${t(e.argument)} argument given to \`${e.procedure}\`.
|
|
4
|
-
Expected: \`${e.expected}\`
|
|
5
|
-
Received: \`${e.received}\``)}function Ii(){return new te(j.DuplicateIframe,"Duplicate iframes found.")}function Sr(){return new te(j.SyncWeb3Method,"Non-async web3 methods are deprecated in web3 > 1.0 and are not supported by the Magic web3 provider. Please use an async method instead.")}function Cr(){return new te(j.ReactNativeEndpointConfiguration,`CUSTOM DOMAINS ARE NOT SUPPORTED WHEN USING MAGIC SDK WITH REACT NATIVE! The \`endpoint\` parameter SHOULD NOT be provided. The Magic \`<iframe>\` is automatically wrapped by a WebView pointed at \`${g.defaultEndpoint}\`. Changing this default behavior will lead to unexpected results and potentially security-threatening bugs.`)}function Y(e){let{method:t,removalVersions:r,useInstead:i}=e,n=r[g.sdkName],s=i?` Use \`${i}\` instead.`:"",a=`\`${t}\` will be removed from \`${g.sdkName}\` in version \`${n}\`.${s}`;return new te(j.DeprecationNotice,a)}function*br(){let e=0;for(;;)e<Number.MAX_SAFE_INTEGER?yield++e:e=0}var Pr=br();function Ye(){return Pr.next().value}var ze=Symbol("Payload pre-processed by Magic SDK");function Je(e){return Object.defineProperty(e,ze,{value:!0,enumerable:!1}),e}function kr(e){return!!e[ze]}function he(e){var t,r,i;return kr(e)||(e.jsonrpc=(t=e.jsonrpc)!=null?t:"2.0",e.id=Ye(),e.method=(r=e.method)!=null?r:"noop",e.params=(i=e.params)!=null?i:[],Je(e)),e}function m(e,t=[]){return Je({params:t,method:e,jsonrpc:"2.0",id:Ye()})}var Re=class{constructor(e){e instanceof Re?(this._jsonrpc=e.payload.jsonrpc,this._id=e.payload.id,this._result=e.payload.result,this._error=e.payload.error):wr(e)?(this._jsonrpc=e.jsonrpc,this._id=e.id,this._result=e.result,this._error=e.error):(this._jsonrpc=e.jsonrpc,this._id=e.id,this._result=void 0,this._error=void 0)}applyError(e){return this._error=e,this}applyResult(e){return this._result=e,this}get hasError(){return typeof this._error<"u"&&this._error!==null}get hasResult(){return typeof this._result<"u"}get payload(){return{jsonrpc:this._jsonrpc,id:this._id,result:this._result,error:this._error}}},Ur=Lt(St()),Dr=class extends Ur.default{};function Qe(){let e=new Dr;return{emitter:e,createChainingEmitterMethod:(t,r)=>(...i)=>(e[t].apply(e,i),r),createBoundEmitterMethod:t=>(...r)=>e[t].apply(e,r)}}var Ze=Symbol("isPromiEvent");function Gr(e){return!!e[Ze]}function Z(e){let t=et(e),{createBoundEmitterMethod:r,createChainingEmitterMethod:i}=Qe(),n=Symbol("Promise.then"),s=Symbol("Promise.catch"),a=Symbol("Promise.finally"),o=(c,d)=>(...f)=>{let v=d[c].apply(d,f);return u(v)},u=c=>Object.assign(c,{[Ze]:!0,[n]:c[n]||c.then,[s]:c[s]||c.catch,[a]:c[a]||c.finally,then:o(n,c),catch:o(s,c),finally:o(a,c),on:i("on",c),once:i("once",c),addListener:i("addListener",c),off:i("off",c),removeListener:i("removeListener",c),removeAllListeners:i("removeAllListeners",c),emit:r("emit"),eventNames:r("eventNames"),listeners:r("listeners"),listenerCount:r("listenerCount")}),l=u(t.then(c=>(l.emit("done",c),l.emit("settled"),c),c=>{throw l.emit("error",c),l.emit("settled"),c}));return l}function et(e){return new Promise((t,r)=>{let i=e(t,r);Promise.resolve(i).catch(r)})}var G=class{constructor(e){this.sdk=e}get overlay(){return this.sdk.overlay}request(e){let t=this.overlay.post(ce.MAGIC_HANDLE_REQUEST,he(e)),r=Z((n,s)=>{t.then(a=>{if(i(),a.hasError)s(new de(a.payload.error));else if(a.hasResult)n(a.payload.result);else throw Or()}).catch(a=>{i(),s(a)})}),i=this.overlay.on(k.MAGIC_HANDLE_EVENT,n=>{var s;let{response:a}=n.data;if(a.id===e.id&&((s=a.result)!=null&&s.event)){let{event:o,params:u=[]}=a.result;r.emit(o,...u)}});return r}createIntermediaryEvent(e,t){return r=>{let i=m(h.IntermediaryEvent,[{payloadId:t,eventType:e,args:r}]);this.request(i)}}};function xr(e,t){let[r]=e.split(".").map(Number);return r>=t}var z={"magic-sdk":"v18.0.0","@magic-sdk/react-native":"v14.0.0","@magic-sdk/react-native-bare":"v19.0.0","@magic-sdk/react-native-expo":"v19.0.0"},Fr=class extends G{loginWithMagicLink(e){let t=g.sdkName==="@magic-sdk/react-native"||g.sdkName==="@magic-sdk/react-native-bare"||g.sdkName==="@magic-sdk/react-native-expo";if(t&&xr(g.version,19))throw new Error("loginWithMagicLink() is deprecated for this package, please utlize a passcode method like loginWithSMS or loginWithEmailOTP instead.");t&&Y({method:"auth.loginWithMagicLink()",removalVersions:z,useInstead:"auth.loginWithEmailOTP()"}).log();let{email:r,showUI:i=!0,redirectURI:n,overrides:s}=e,a=m(this.sdk.testMode?h.LoginWithMagicLinkTestMode:h.LoginWithMagicLink,[{email:r,showUI:i,redirectURI:n,overrides:s}]);return this.request(a)}loginWithSMS(e){let{phoneNumber:t}=e,r=m(this.sdk.testMode?h.LoginWithSmsTestMode:h.LoginWithSms,[{phoneNumber:t,showUI:!0}]);return this.request(r)}loginWithEmailOTP(e){let{email:t,showUI:r,deviceCheckUI:i,overrides:n}=e,s=m(this.sdk.testMode?h.LoginWithEmailOTPTestMode:h.LoginWithEmailOTP,[{email:t,showUI:r,deviceCheckUI:i,overrides:n}]),a=this.request(s);return!i&&a&&a.on(ge.Retry,()=>{this.createIntermediaryEvent(ge.Retry,s.id)()}),!r&&a&&(a.on(B.VerifyEmailOtp,o=>{this.createIntermediaryEvent(B.VerifyEmailOtp,s.id)(o)}),a.on(B.Cancel,()=>{this.createIntermediaryEvent(B.Cancel,s.id)()})),a}loginWithCredential(e){let t=e??"";if(!e&&g.platform==="web"){t=window.location.search;let i=window.location.origin+window.location.pathname;window.history.replaceState(null,"",i)}let r=m(this.sdk.testMode?h.LoginWithCredentialTestMode:h.LoginWithCredential,[t]);return this.request(r)}setAuthorizationToken(e){let t=m(h.SetAuthorizationToken,[{jwt:e}]);return this.request(t)}updateEmailWithUI(e){let{email:t,showUI:r=!0}=e,i=m(this.sdk.testMode?h.UpdateEmailTestMode:h.UpdateEmail,[{email:t,showUI:r}]),n=this.request(i);return r||(n.on(b.Retry,()=>{this.createIntermediaryEvent(b.Retry,i.id)()}),n.on(b.Cancel,()=>{this.createIntermediaryEvent(b.Cancel,i.id)()}),n.on(b.VerifyEmailOtp,s=>{this.createIntermediaryEvent(b.VerifyEmailOtp,i.id)(s)}),n.on(P.RetryWithNewEmail,s=>{this.createIntermediaryEvent(P.RetryWithNewEmail,i.id)(s)}),n.on(P.Cancel,()=>{this.createIntermediaryEvent(P.Cancel,i.id)()}),n.on(P.VerifyEmailOtp,s=>{this.createIntermediaryEvent(P.VerifyEmailOtp,i.id)(s)})),n}},tt={};Mt(tt,{clear:()=>Wr,getItem:()=>O,iterate:()=>rt,key:()=>qr,keys:()=>Vr,length:()=>jr,removeItem:()=>W,setItem:()=>T});var se;function S(e){return(...t)=>_(this,null,function*(){return se||(se=yield g.configureStorage()),yield se.ready(),se[e](...t)})}var O=S("getItem"),T=S("setItem"),W=S("removeItem"),Wr=S("clear"),jr=S("length"),qr=S("key"),Vr=S("keys"),rt=S("iterate");function Hr(){let e=window.crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&191|128;let t="";return t+=e[0].toString(16),t+=e[1].toString(16),t+=e[2].toString(16),t+=e[3].toString(16),t+="-",t+=e[4].toString(16),t+=e[5].toString(16),t+="-",t+=e[6].toString(16),t+=e[7].toString(16),t+="-",t+=e[8].toString(16),t+=e[9].toString(16),t+="-",t+=e[10].toString(16),t+=e[11].toString(16),t+=e[12].toString(16),t+=e[13].toString(16),t+=e[14].toString(16),t+=e[15].toString(16),t}var it="STORE_KEY_PRIVATE_KEY",ve="STORE_KEY_PUBLIC_JWK",nt="ECDSA",Xr="P-256",Br={name:nt,namedCurve:Xr};function me(){let e=typeof window<"u"&&!!window.crypto,t=e&&!!window.crypto.subtle;return e&&t}function Kr(){return _(this,null,function*(){let e=yield Yr();if(!e){console.info("unable to create public key or webcrypto is unsupported");return}let{subtle:t}=window.crypto,r=yield O(it);if(!r||!t){console.info("unable to find private key or webcrypto unsupported");return}let i={iat:Math.floor(new Date().getTime()/1e3),jti:Hr()},n={typ:"dpop+jwt",alg:"ES256",jwk:e},s={protected:We(JSON.stringify(n)),claims:We(JSON.stringify(i))},a=Jr(`${s.protected}.${s.claims}`),o={name:nt,hash:{name:"SHA-256"}},u=Zr(new Uint8Array(yield t.sign(o,r,a)));return`${s.protected}.${s.claims}.${u}`})}function Yr(){return _(this,null,function*(){if(!me()){console.info("webcrypto is not supported");return}return(yield O(ve))||(yield zr()),O(ve)})}function zr(){return _(this,null,function*(){let{subtle:e}=window.crypto,t=yield e.generateKey(Br,!1,["sign"]),r=yield e.exportKey("jwk",t.publicKey);yield T(it,t.privateKey),yield T(ve,r)})}function We(e){return st(Qr(e))}function Jr(e){return new TextEncoder().encode(e)}function st(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+/g,"")}function Qr(e){return encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(t,r)=>String.fromCharCode(parseInt(r,16)))}function Zr(e){let t="";return e.forEach(r=>{t+=String.fromCharCode(r)}),st(t)}var $e="ds",Ne="ek",Ae="iv",Oe="AES-GCM",ei=256;function Me(){return _(this,null,function*(){let e=[];yield rt((t,r,i)=>{r.startsWith(`${$e}_`)&&e.push(r)});for(let t of e)yield W(t)})}function ot(e){let t="",r=new Uint8Array(e),i=r.byteLength;for(let n=0;n<i;n++)t+=String.fromCharCode(r[n]);return window.btoa(t)}function at(e){let t=window.atob(e),r=t.length,i=new Uint8Array(r);for(let n=0;n<r;n++)i[n]=t.charCodeAt(n);return i.buffer}function ti(){return _(this,null,function*(){if(!me()){console.info("webcrypto is not supported");return}let{crypto:e}=window;return(yield O(Ae))||e.getRandomValues(new Uint8Array(12))})}function ri(){return _(this,null,function*(){if(!me()){console.info("webcrypto is not supported");return}let{subtle:e}=window.crypto;return(yield O(Ne))||(yield e.generateKey({name:Oe,length:ei},!1,["encrypt","decrypt"]))})}function ii(e,t){return _(this,null,function*(){let r=yield ti(),i=yield ri();if(!r||!i||!e)return;let n=at(e),{subtle:s}=window.crypto,a=yield s.encrypt({name:Oe,iv:r},i,n),o=ot(a);yield T(`${$e}_${t}`,o),yield T(Ne,i),yield T(Ae,r)})}function ni(e){return _(this,null,function*(){let t=yield O(`${$e}_${e}`),r=yield O(Ae),i=yield O(Ne);if(!r||!t||!i||!me())return;let{subtle:n}=window.crypto,s=yield n.decrypt({name:Oe,iv:r},i,at(t));return ot(s)})}function je(e,t){return t?new URL(e,t):new URL(e)}var si=class extends G{constructor(){super(...arguments),this.localForageKey="mc_active_wallet",this.localForageIsLoggedInKey="magic_auth_is_logged_in",this.userLoggedOutCallbacks=[]}getIdToken(e){let t=m(this.sdk.testMode?h.GetIdTokenTestMode:h.GetIdToken,[e]);return this.request(t)}generateIdToken(e){let t=m(this.sdk.testMode?h.GenerateIdTokenTestMode:h.GenerateIdToken,[e]);return this.request(t)}getInfo(){return _(this,null,function*(){let e=yield O(this.localForageKey),t=m(h.GetInfo,[{walletType:e}]);return this.request(t)})}isLoggedIn(){return Z((e,t)=>_(this,null,function*(){try{let r=!1;this.sdk.useStorageCache&&(r=(yield O(this.localForageIsLoggedInKey))==="true",r&&e(!0));let i=m(this.sdk.testMode?h.IsLoggedInTestMode:h.IsLoggedIn),n=yield this.request(i);this.sdk.useStorageCache&&(n?T(this.localForageIsLoggedInKey,!0):W(this.localForageIsLoggedInKey),r&&!n&&this.emitUserLoggedOut(!0)),e(n)}catch(r){t(r)}}))}logout(){return W(this.localForageKey),W(this.localForageIsLoggedInKey),Me(),Z((e,t)=>_(this,null,function*(){try{let r=m(this.sdk.testMode?h.LogoutTestMode:h.Logout),i=yield this.request(r);this.sdk.useStorageCache&&this.emitUserLoggedOut(i),e(i)}catch(r){t(r)}}))}requestInfoWithUI(e){let t=m(h.RequestUserInfoWithUI,e?[e]:[]);return this.request(t)}showSettings(e){let t=m(this.sdk.testMode?h.UserSettingsTestMode:h.UserSettings,[e]);return this.request(t)}recoverAccount(e){let t=m(this.sdk.testMode?h.RecoverAccountTestMode:h.RecoverAccount,[e]);return this.request(t)}getMetadata(){Y({method:"user.getMetadata()",removalVersions:z,useInstead:"user.getInfo()"}).log();let e=m(this.sdk.testMode?h.GetMetadataTestMode:h.GetMetadata);return this.request(e)}onUserLoggedOut(e){this.userLoggedOutCallbacks.push(e)}emitUserLoggedOut(e){this.userLoggedOutCallbacks.forEach(t=>{t(e)})}},oi=class extends G{constructor(){super(...arguments),this.localForageKey="mc_active_wallet"}connectWithUI(){let e=Z((t,r)=>_(this,null,function*(){try{if(this.isMetaMaskBrowser()&&(yield this.isWalletEnabled(M.MetaMask))){let o=yield this.autoConnectIfWalletBrowser(M.MetaMask);t(o);return}if(this.isCoinbaseWalletBrowser()&&(yield this.isWalletEnabled(M.CoinbaseWallet))){let o=yield this.autoConnectIfWalletBrowser(M.CoinbaseWallet);t(o);return}let i=this.getUserEnv(),n=m(h.Login,[i]),s=this.request(n);s.on(ae.WalletSelected,o=>this.handleWalletSelected(ye(Ie({},o),{payloadId:n.id}))),s.on("id-token-created",o=>{e.emit("id-token-created",o)});let a=yield s;a.error&&r(a),t(a)}catch(i){r(i)}}));return e}showUI(){return this.request(m(h.ShowUI))}showAddress(){return this.request(m(h.ShowAddress))}showSendTokensUI(){return this.request(m(h.ShowSendTokensUI))}showOnRamp(){return this.request(m(h.ShowOnRamp))}showNFTs(){return this.request(m(h.ShowNFTs))}showBalances(){return this.request(m(h.ShowBalances))}sendGaslessTransaction(e,t){return this.request(m(h.SendGaslessTransaction,[e,t]))}getInfo(){return _(this,null,function*(){Y({method:"wallet.getInfo()",removalVersions:z,useInstead:"user.getInfo()"}).log();let e=yield O(this.localForageKey),t=m(h.GetInfo,[{walletType:e}]);return this.request(t)})}disconnect(){Y({method:"wallet.disconnect()",removalVersions:z,useInstead:"user.logout()"}).log(),W(this.localForageKey),Me();let e=m(h.Disconnect);return this.request(e)}requestUserInfoWithUI(e){Y({method:"wallet.requestUserInfoWithUI()",removalVersions:z,useInstead:"user.requestUserInfoWithUI()"}).log();let t=m(h.RequestUserInfoWithUI,e?[e]:[]);return this.request(t)}getProvider(){return _(this,null,function*(){switch(yield O(this.localForageKey)){case M.MetaMask:return this.getMetaMaskProvider();case M.CoinbaseWallet:return this.getCoinbaseProvider();default:return this.sdk.rpcProvider}})}isMetaMaskInstalled(){var e,t,r;return((e=window.ethereum)==null?void 0:e.isMetaMask)||!!((r=(t=window.ethereum)==null?void 0:t.providers)!=null&&r.find(i=>i==null?void 0:i.isMetaMask))}isMetaMaskBrowser(){return this.isMobile()&&this.isMetaMaskInstalled()}getMetaMaskProvider(){var e,t;return((t=(e=window.ethereum)==null?void 0:e.providers)==null?void 0:t.find(r=>r==null?void 0:r.isMetaMask))||window.ethereum}connectToMetaMask(){if(this.isMobile()&&!this.isMetaMaskInstalled()){let e=`https://metamask.app.link/dapp/${window.location.href.replace(/(^\w+:|^)\/\//,"")}`;window.location.href=e}return this.getMetaMaskProvider().request({method:"eth_requestAccounts"})}isCoinbaseWalletInstalled(){var e,t,r;return((e=window.ethereum)==null?void 0:e.isCoinbaseWallet)||!!((r=(t=window.ethereum)==null?void 0:t.providers)!=null&&r.find(i=>i==null?void 0:i.isCoinbaseWallet))}isCoinbaseWalletBrowser(){var e;return!!((e=window.ethereum)!=null&&e.isCoinbaseBrowser)}getCoinbaseProvider(){var e,t;return((t=(e=window.ethereum)==null?void 0:e.providers)==null?void 0:t.find(r=>r==null?void 0:r.isCoinbaseWallet))||window.ethereum}connectToCoinbaseWallet(){if(this.isMobile()&&!this.isCoinbaseWalletBrowser()){let e=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(window.location.href)}`;window.location.href=e}return this.getCoinbaseProvider().request({method:"eth_requestAccounts"})}isMobile(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|BB|PlayBook|IEMobile|Windows Phone|Silk|Opera Mini/i.test(navigator.userAgent)}getUserEnv(){return{env:{isMetaMaskInstalled:this.isMetaMaskInstalled(),isCoinbaseWalletInstalled:this.isCoinbaseWalletInstalled()}}}connectToThirdPartyWallet(e){switch(e){case M.MetaMask:return this.connectToMetaMask();case M.CoinbaseWallet:return this.connectToCoinbaseWallet();default:throw new Error(`Invalid provider: ${e}. Must be one of "metamask" or "coinbase_wallet".`)}}isWalletEnabled(e){let t=m("mc_is_wallet_enabled",[{wallet:e}]);return this.request(t)}handleWalletSelected(e){return _(this,null,function*(){try{let t=yield this.connectToThirdPartyWallet(e.wallet);yield T(this.localForageKey,e.wallet),this.createIntermediaryEvent(ae.WalletConnected,e.payloadId)(t)}catch(t){console.error(t),this.createIntermediaryEvent(ae.WalletRejected,e.payloadId)()}})}autoConnectIfWalletBrowser(e){return _(this,null,function*(){let t;e===M.MetaMask&&(t=yield this.getMetaMaskProvider().request({method:"eth_requestAccounts"})),e===M.CoinbaseWallet&&(t=yield this.getCoinbaseProvider().request({method:"eth_requestAccounts"})),yield T(this.localForageKey,e);let r=m(h.AutoConnect,[{wallet:e,address:t}]);return this.request(r)})}},{createBoundEmitterMethod:oe,createChainingEmitterMethod:x}=Qe(),ai=class extends G{constructor(){super(...arguments),this.isMagic=!0,this.on=x("on",this),this.once=x("once",this),this.addListener=x("addListener",this),this.off=x("off",this),this.removeListener=x("removeListener",this),this.removeAllListeners=x("removeAllListeners",this),this.emit=oe("emit"),this.eventNames=oe("eventNames"),this.listeners=oe("listeners"),this.listenerCount=oe("listenerCount")}sendAsync(e,t){if(!t)throw Lr({procedure:"Magic.rpcProvider.sendAsync",argument:1,expected:"function",received:t===null?"null":typeof t});if(Array.isArray(e))this.overlay.post(ce.MAGIC_HANDLE_REQUEST,e.map(r=>{let i=he(r);return this.prefixPayloadMethodForTestMode(i),i})).then(r=>{t(null,r.map(i=>ye(Ie({},i.payload),{error:i.hasError?new de(i.payload.error):null})))});else{let r=he(e);this.prefixPayloadMethodForTestMode(r),this.overlay.post(ce.MAGIC_HANDLE_REQUEST,r).then(i=>{t(i.hasError?new de(i.payload.error):null,i.payload)})}}send(e,t){if(typeof e=="string"){let i=m(e,Array.isArray(t)?t:[]);return this.request(i)}if(Array.isArray(e)||t){this.sendAsync(e,t);return}let r=Sr();return r.log(),new Re(e).applyError({code:-32603,message:r.rawMessage}).payload}enable(){let e=m(h.Login);return this.request(e)}request(e){return this.prefixPayloadMethodForTestMode(e),super.request(e)}prefixPayloadMethodForTestMode(e){let t="testMode/eth/";this.sdk.testMode&&(e.method=`${t}${e.method}`)}},qe=["request","overlay","sdk"];function li(e){let t=Object.getPrototypeOf(e),r=[t];for(;t!==G.prototype;)t=Object.getPrototypeOf(t),r.push(t);return r}var lt=class extends G{constructor(){super(void 0),this.__sdk_access_field_descriptors__=new Map,this.__is_initialized__=!1,this.utils={createPromiEvent:Z,isPromiEvent:Gr,encodeJSON:Xe,decodeJSON:Ir,createJsonRpcRequestPayload:m,standardizeJsonRpcRequestPayload:he,storage:tt};let e=[this,...li(this)];qe.forEach(t=>{let r=e.map(a=>Object.getOwnPropertyDescriptor(a,t)),i=r.findIndex(a=>!!a),n=i>0,s=r[i];s&&(this.__sdk_access_field_descriptors__.set(t,{descriptor:s,isPrototypeField:n}),Object.defineProperty(this,t,{configurable:!0,get:()=>{throw Mr(t)}}))})}init(e){this.__is_initialized__||(qe.forEach(t=>{if(this.__sdk_access_field_descriptors__.has(t)){let{descriptor:r,isPrototypeField:i}=this.__sdk_access_field_descriptors__.get(t);i?delete this[t]:Object.defineProperty(this,t,r)}}),this.sdk=e,this.__is_initialized__=!0)}createDeprecationWarning(e){let{method:t,removalVersion:r,useInstead:i}=e,n=i?` Use \`${i}\` instead.`:"",s=`\`${t}\` will be removed from this Extension in version \`${r}\`.${n}`;return new Fe(this,"DEPRECATION_NOTICE",s)}createWarning(e,t){return new Fe(this,e,t)}createError(e,t,r){return new Ke(this,e,t,r)}},ci=class extends lt{},J=class extends lt{};J.Internal=ci,J.Anonymous="anonymous extension";var ui=class extends G{purchase(e){let t=m(h.NFTPurchase,[e]);return this.request(t)}checkout(e){let t=m(h.NFTCheckout,[e]);return this.request(t)}transfer(e){let t=m(h.NFTTransfer,[e]);return this.request(t)}};function Ve(e){return e.compat&&e.compat[g.sdkName]!=null?typeof e.compat[g.sdkName]=="string"?dr(Er(g.version),e.compat[g.sdkName]):!!e.compat[g.sdkName]:!0}function di(e,t,r){return!t&&!r?`${e}_eth_mainnet`:r?`${e}_${JSON.stringify(r)}`:t?typeof t=="string"?`${e}_eth_${t}`:`${e}_${t.rpcUrl}_${t.chainId}_${t.chainType}`:`${e}_unknown`}function hi(e){var t;let r=(t=e==null?void 0:e.extensions)!=null?t:[],i={},n=[];if(Array.isArray(r)?r.forEach(s=>{Ve(s)?(s.init(this),(s.name||s.name!==J.Anonymous)&&(this[s.name]=s),s instanceof J.Internal&&(ue(s.config)||(i[s.name]=s.config))):n.push(s)}):Object.keys(r).forEach(s=>{if(Ve(r[s])){r[s].init(this);let a=r[s];this[s]=a,a instanceof J.Internal&&(ue(a.config)||(i[r[s].name]=a.config))}else n.push(r[s])}),n.length)throw Tr(n);return i}var le=class{constructor(e,t){this.apiKey=e;var r;if(!e)throw Nr();g.platform==="react-native"&&(t!=null&&t.endpoint)&&Cr().log();let{defaultEndpoint:i,version:n}=g;this.testMode=!!(t!=null&&t.testMode),this.useStorageCache=!!(t!=null&&t.useStorageCache),this.endpoint=je((r=t==null?void 0:t.endpoint)!=null?r:i).origin,this.auth=new Fr(this),this.user=new si(this),this.wallet=new oi(this),this.nft=new ui(this),this.rpcProvider=new ai(this);let s=hi.call(this,t);this.parameters=Xe(ye(Ie({API_KEY:this.apiKey,DOMAIN_ORIGIN:window.location?window.location.origin:"",ETH_NETWORK:t==null?void 0:t.network,host:je(this.endpoint).host,sdk:$r[g.sdkName],version:n,ext:ue(s)?void 0:s,locale:(t==null?void 0:t.locale)||"en_US"},g.bundleId?{bundleId:g.bundleId}:{}),{meta:t==null?void 0:t.meta})),this.networkHash=di(this.apiKey,t==null?void 0:t.network,ue(s)?void 0:s),t!=null&&t.deferPreload||this.preload()}get overlay(){if(!le.__overlays__.has(this.parameters)){let e=new g.ViewController(this.endpoint,this.parameters,this.networkHash);e.init(),le.__overlays__.set(this.parameters,e)}return le.__overlays__.get(this.parameters)}preload(){return _(this,null,function*(){yield this.overlay.checkIsReadyForRequest})}},pi=le;pi.__overlays__=new Map;function mi(e,t){return t&&Array.isArray(e)?e.find(r=>r.id===t):e}function Ei(e,t){var r;let i=(r=t.data.response)==null?void 0:r.id,n=mi(e,i);if(i&&n){let s=new Re(n).applyResult(t.data.response.result).applyError(t.data.response.error);return{id:i,response:s}}return{}}function fi(e,t,r){return _(this,null,function*(){var i;let n=yield O("rt"),s;if(g.platform==="web")try{s=(i=yield O("jwt"))!=null?i:yield Kr()}catch(u){console.error("webcrypto error",u)}let a={msgType:e,payload:t};s&&(a.jwt=s),s&&n&&(a.rt=n);let o=yield ni(r);return o&&(a.deviceShare=o),a})}function gi(e){return _(this,null,function*(){!e.data.rt||(yield T("rt",e.data.rt))})}var yi=class{constructor(e,t,r){this.endpoint=e,this.parameters=t,this.networkHash=r,this.messageHandlers=new Set,this.isConnectedToInternet=!0,this.checkIsReadyForRequest=this.waitForReady(),this.isReadyForRequest=!1,this.listen()}post(e,t){return _(this,null,function*(){return et((r,i)=>_(this,null,function*(){if(!this.isConnectedToInternet){let l=Ar();i(l)}this.isReadyForRequest||(yield this.waitForReady());let n=[],s=Array.isArray(t)?t.map(l=>l.id):[],a=yield fi(`${e}-${this.parameters}`,t,this.networkHash);yield this._post(a);let o=l=>c=>{var d;let{id:f,response:v}=Ei(t,c);if(gi(c),((d=v==null?void 0:v.payload.error)==null?void 0:d.message)==="User denied account access.")Me();else if(c.data.deviceShare){let{deviceShare:I}=c.data;ii(I,this.networkHash)}f&&v&&Array.isArray(t)&&s.includes(f)?(n.push(v),n.length===t.length&&(l(),r(n))):f&&v&&!Array.isArray(t)&&f===t.id&&(l(),r(v))},u=this.on(k.MAGIC_HANDLE_RESPONSE,o(()=>u()))}))})}on(e,t){let r=t.bind(window),i=n=>{n.data.msgType===`${e}-${this.parameters}`&&r(n)};return this.messageHandlers.add(i),()=>this.messageHandlers.delete(i)}waitForReady(){return new Promise(e=>{let t=this.on(k.MAGIC_OVERLAY_READY,()=>{this.isReadyForRequest=!0,e(),t()})})}listen(){this.on(k.MAGIC_HIDE_OVERLAY,()=>{this.hideOverlay()}),this.on(k.MAGIC_SHOW_OVERLAY,()=>{this.showOverlay()}),this.on(k.MAGIC_SEND_PRODUCT_ANNOUNCEMENT,e=>{e.data.response.result.product_announcement&&new te(j.ProductAnnouncement,e.data.response.result.product_announcement).log()})}};export{pi as $,D as A,yi as B,ae as E,B as I,je as J,_i as K,gt as L,pt as N,ft as O,ge as R,Et as T,P as U,Ke as V,te as W,de as _,J as a,mt as b,ht as c,ce as d,_e as e,k as f,dt as g,b as h,U as i,vt as k,Ar as m,j as p,Ii as q,Fe as s,M as u,h as v,Gr as x,_t as y};
|
package/assets/index-BEPqkRql.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as g}from"./index-B6Hui9GU.js";import"./thirdweb-D6clKR4w.js";var m=Object.defineProperty,v=Object.defineProperties,y=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,d=(e,r,t)=>r in e?m(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,h=(e,r)=>{for(var t in r||(r={}))w.call(r,t)&&d(e,t,r[t]);if(c)for(var t of c(r))f.call(r,t)&&d(e,t,r[t]);return e},_=(e,r)=>v(e,y(r)),p=(e,r,t)=>new Promise((n,s)=>{var l=a=>{try{o(t.next(a))}catch(u){s(u)}},i=a=>{try{o(t.throw(a))}catch(u){s(u)}},o=a=>a.done?n(a.value):Promise.resolve(a.value).then(l,i);o((t=t.apply(e,r)).next())}),b=(e=>(e.Start="magic_oauth_login_with_redirect_start",e.Verify="magic_oauth_login_with_redirect_verify",e.Popup="magic_oauth_login_with_popup",e.VerifyTelegramData="magic_oauth_verify_telegram_data",e))(b||{}),R=(e=>(e.InvalidRequest="invalid_request",e.InvalidClient="invalid_client",e.InvalidScope="invalid_scope",e.InvalidGrant="invalid_grant",e.UnauthorizedClient="unauthorized_client",e.UnsupportedResponseType="unsupported_response_type",e.UnsupportedGrantType="unsupported_grant_type",e.UnsupportedTokenType="unsupported_token_type",e.AccessDenied="access_denied",e.ServerError="server_error",e.TemporarilyUnavailable="temporarily_unavailable",e))(R||{}),I=class extends g.Internal{constructor(){super(),this.name="oauth2",this.config={},this.compat={"magic-sdk":">=2.4.6","@magic-sdk/react-native":!1,"@magic-sdk/react-native-bare":!1,"@magic-sdk/react-native-expo":!1},this.seamlessTelegramLogin()}loginWithRedirect(e){return this.utils.createPromiEvent((r,t)=>p(this,null,function*(){var n;let s=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_redirect_start",[_(h({},e),{apiKey:this.sdk.apiKey,platform:"web"})]),l=yield this.request(s),i=l,o=l;if(o.error&&t(this.createError(o.error,(n=o.error_description)!=null?n:"An error occurred.",{errorURI:o.error_uri,provider:o.provider})),i!=null&&i.oauthAuthoriationURI){let a=i.useMagicServerCallback?new URL(i.oauthAuthoriationURI,this.sdk.endpoint).href:i.oauthAuthoriationURI;i!=null&&i.shouldReturnURI?r(a):window.location.href=a}r(null)}))}getRedirectResult(e,r){let t=r||window.location.search,n=window.location.origin+window.location.pathname;return window.history.replaceState(null,"",n),P.call(this,t,e)}loginWithPopup(e){let r=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_popup",[_(h({},e),{apiKey:this.sdk.apiKey,platform:"web"})]);return this.request(r)}seamlessTelegramLogin(){try{if(!window.location.hash.toString().includes("#tgWebAppData"))return;let e=document.createElement("script");e.src="https://telegram.org/js/telegram-web-app.js",document.head.prepend(e),e.onload=()=>p(this,null,function*(){var r;try{let t=(r=window.Telegram)==null?void 0:r.WebApp.initData,n=this.utils.createJsonRpcRequestPayload("magic_oauth_verify_telegram_data",[{userData:t,isMiniApp:!0}]);yield this.request(n)}catch(t){console.log("Error while verifying telegram data",t)}})}catch(e){console.log("Error while loading telegram-web-app script",e)}}};function P(e,r){return this.utils.createPromiEvent((t,n)=>p(this,null,function*(){var s;let l=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_redirect_verify",[{authorizationResponseParams:e,magicApiKey:this.sdk.apiKey,platform:"web",lifespan:r}]),i=yield this.request(l),o=i,a=i;a.error&&n(this.createError(a.error,(s=a.error_description)!=null?s:"An error occurred.",{errorURI:a.error_uri,provider:a.provider})),t(o)}))}export{R as OAuthErrorCode,I as OAuthExtension,b as OAuthPayloadMethods};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._button_1uvkr_1.ui.small.primary.button{min-height:46px}._icon_1uvkr_5{min-width:32px;min-height:32px;background-size:contain;background-repeat:no-repeat;background-position:center}._icon-metamask-mobile_1uvkr_13,._icon-metamask_1uvkr_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_1uvkr_18{background-image:url(https://cdn.decentraland.org/@dcl/auth-site/4.11.1/assets/dapper-BT_mEW8_.png)}._icon-fortmatic_1uvkr_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_1uvkr_26{background-image:url(https://cdn.decentraland.org/@dcl/auth-site/4.11.1/assets/wallet-connect-CniBuHFv.png)}._icon-samsung-blockchain-wallet_1uvkr_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_1uvkr_34,._icon-wallet-link_1uvkr_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_1uvkr_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_1uvkr_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_1uvkr_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_1uvkr_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_kf1sq_1{display:flex;flex-direction:column;width:100%;margin-bottom:24px}._label_kf1sq_8{color:#ffffffb3;font-size:12px;font-weight:500;text-transform:uppercase;letter-spacing:.5px;margin-bottom:8px}._inputWrapper_kf1sq_17{display:flex;align-items:center;gap:12px}._input_kf1sq_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_kf1sq_17::placeholder{color:#ffffff80}._input_kf1sq_17:focus{border-color:#fff6;background:#ffffff26}._input_kf1sq_17:disabled{opacity:.6;cursor:not-allowed}._nextButton_kf1sq_49{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}._nextButton_kf1sq_49:hover:not(:disabled){background:#e6284d}._nextButton_kf1sq_49:disabled{opacity:.5;cursor:not-allowed}._spinner_kf1sq_75{width:18px;height:18px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:_spin_kf1sq_75 .8s linear infinite}@keyframes _spin_kf1sq_75{to{transform:rotate(360deg)}}._inputError_kf1sq_90{border-color:#ff6b6b}._inputError_kf1sq_90:focus{border-color:#ff6b6b}._error_kf1sq_98{color:#ff6b6b;font-size:13px;margin:8px 0 0}._error_kf1sq_98:before{content:"⚠";margin-right:6px}.CustomWearablePreview{position:relative;width:100%;height:100%}.CustomWearablePreview .WearablePreview{background-color:unset}._background_15z4a_1{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.11.1/assets/custom-welcome-background-BxlFQma9.webp)}._main_15z4a_11{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_15z4a_22{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;height:100%;width:100%;max-width:500px;margin-left:150px}._right_15z4a_33{height:100%}._right_15z4a_33 .CustomWearablePreview{right:8%}._changeAccount_15z4a_41{margin-top:150px;border-top:1px solid white;padding-top:20px;width:350px}._changeAccount_15z4a_41 a{color:#fff;text-decoration:underline;font-size:16px}@media(max-width:767px){._main_15z4a_11{display:flex;flex-direction:column}._left_15z4a_22{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;max-width:inherit;width:100%;padding:20px;margin-left:0}}._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}}._code_y07nb_1{font-size:100px;font-weight:700;line-height:121.02px;margin-top:40px}._buttons_y07nb_8{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:24px;margin-top:40px;z-index:1}._noButton_y07nb_18.ui.button,._noButton_y07nb_18.ui.button:hover,._yesButton_y07nb_20.ui.button,._yesButton_y07nb_20.ui.button:hover{background:#fff;color:#000;display:flex}._noButton_y07nb_18.ui.button i{color:red;font-size:20px}._yesButton_y07nb_20.ui.button i{color:green;font-size:20px}._communityBubble_y07nb_37{position:absolute;bottom:20px;right:20px}._timeoutMessage_y07nb_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}._container_1m216_1{font-family:system-ui,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;width:100%;height:100vh;display:flex;overflow:hidden}._background_1m216_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.11.1/assets/background-q68SxPSF.svg);z-index:-1}._left_1m216_20{flex:1;padding:1rem;color:#fff;display:flex;justify-content:center;align-items:center}._errorMessage_1m216_29{padding:15px;border-radius:10px;margin-top:30px;background-color:var(--primary);line-break:anywhere;color:#fff}._container_1m216_1 .message{color:#fff!important;opacity:70%}._container_1m216_1 .ui.sub.header>label{color:#fff!important;opacity:70%}._container_1m216_1 input{border-bottom:2px solid rgba(255,255,255,.7)!important}._container_1m216_1 input::placeholder{color:#fff!important;opacity:70%}._leftInner_1m216_57{max-width:500px;display:flex;flex-direction:column}._logo_1m216_63{width:64px;height:64px}._title_1m216_68{font-size:30px;font-weight:600;line-height:36px;margin-top:24px}._subtitle_1m216_75{font-size:30px;font-weight:400;line-height:36px}._meetYourAvatar_1m216_81{font-size:18px;font-weight:600;line-height:22px;margin-top:24px}._meetYourAvatarDescription_1m216_88{font-size:14px;font-weight:400;line-height:17px;margin-top:24px}._randomize_1m216_95{margin-top:16px}._randomize_1m216_95>.button{display:flex;align-items:center;justify-content:center;gap:8px}._continue_1m216_106{width:75%;margin-top:24px}._logoSmall_1m216_111{width:40px;height:40px}._back_1m216_9{margin-top:26px;display:flex;align-items:center;gap:8px;cursor:pointer}._back_1m216_9>span{font-size:14px;font-weight:600;line-height:18px}._name_1m216_130{margin-top:24px}._agree_1m216_134{margin-top:24px;display:flex;align-items:center}._agree_1m216_134 .checkbox{margin-right:10px}._agree_1m216_134 .ui.checkbox input[type=checkbox].hidden~label:before{border:2px solid rgba(255,255,255,.7)}._agree_1m216_134 a{color:#fff;font-weight:700;text-decoration:underline}._error_1m216_29{display:flex;align-items:center;gap:4px}._error_1m216_29>img{width:16px;height:16px}._emailError_1m216_165{margin-bottom:8px}._agreeError_1m216_169{opacity:70%;margin-top:8px;font-size:15px}._jumpIn_1m216_175{margin-top:24px}._right_1m216_179{flex:1;width:100%;position:relative;right:6.3%}@media screen and (max-width:768px){._container_1m216_1{overflow:unset;height:unset}._mobileContainer_1m216_192{padding:24px;color:#fff}._meetYourAvatar_1m216_81,._meetYourAvatarDescription_1m216_88{margin-top:12px}._mobilePreviewContainer_1m216_205{position:relative;display:flex;flex-direction:column}._mobilePreviewOverlay_1m216_211{position:absolute;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:10}._mobilePreviewContainer_1m216_205 .CustomWearablePreview{height:500px}._mobileButtons_1m216_225{display:flex;gap:16px}._randomize_1m216_95{flex:1;margin-top:0}._randomize_1m216_95>.button{width:100%}._continue_1m216_106{flex:1;margin-top:0;width:unset}._continue_1m216_106>.button{width:100%;transform:scale(1.05)}._mobileCompleteYourProfile_1m216_250{margin-top:47px}._mobileContainer_1m216_192 .dcl.field{min-width:unset}._agree_1m216_134{display:flex}}._main_qbssu_1{background-color:#000;width:100%;height:100%}._warningImage_xwxyz_1{height:64px;width:64px;margin-bottom:24px}.ui.modal>.content._content_xwxyz_7{display:flex;flex-direction:column;align-items:center}._modal_1am1p_1{background:linear-gradient(135deg,#952dc6,#32134c)!important;border-radius:16px!important;max-width:480px!important;margin:auto!important}._modal_1am1p_1 .ui.modal>.content{background:transparent!important;padding:0!important}._header_1am1p_13{display:flex;justify-content:space-between;align-items:center;padding:16px 20px}._backButton_1am1p_20{background:none;border:none;color:#fff;font-size:14px;font-weight:600;cursor:pointer;display:flex;align-items:center;gap:4px;padding:8px 12px;transition:opacity .2s}._backButton_1am1p_20:hover:not(:disabled){opacity:.8}._backButton_1am1p_20:disabled{opacity:.5;cursor:not-allowed}._backIcon_1am1p_43{font-size:20px;line-height:1}._closeButton_1am1p_48{background:none;border:none;color:#fff;font-size:28px;cursor:pointer;padding:4px 12px;line-height:1;transition:opacity .2s}._closeButton_1am1p_48:hover:not(:disabled){opacity:.8}._closeButton_1am1p_48:disabled{opacity:.5;cursor:not-allowed}._main_1am1p_68{padding:0 40px 40px}._content_1am1p_8{display:flex;flex-direction:column;align-items:center;text-align:center}._emailIconContainer_1am1p_79{width:100px;height:100px;border-radius:50%;background:#ffffff26;display:flex;align-items:center;justify-content:center;margin-bottom:24px}._emailIcon_1am1p_79{width:48px;height:48px;background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='currentColor'%3e%3cpath%20d='M1.5%208.67v8.58a3%203%200%20003%203h15a3%203%200%20003-3V8.67l-8.928%205.493a3%203%200%2001-3.144%200L1.5%208.67z'%20/%3e%3cpath%20d='M22.5%206.908V6.75a3%203%200%2000-3-3h-15a3%203%200%2000-3%203v.158l9.714%205.978a1.5%201.5%200%20001.572%200L22.5%206.908z'%20/%3e%3c/svg%3e");background-size:contain;background-repeat:no-repeat;background-position:center;filter:brightness(0) invert(1)}._title_1am1p_100{color:#fff;font-size:28px;font-weight:600;margin:0 0 12px}._subtitle_1am1p_107{color:#ffffffd9;font-size:14px;line-height:1.5;margin:0 0 32px;max-width:340px}._subtitle_1am1p_107 strong{color:#fff;font-weight:600}._otpContainer_1am1p_120{display:flex;gap:12px;margin-bottom:24px}._otpInput_1am1p_126{width:52px;height:60px;border:2px solid rgba(255,255,255,.3);border-radius:12px;background:transparent;color:#fff;font-size:24px;font-weight:600;text-align:center;outline:none;transition:border-color .2s,background-color .2s}._otpInput_1am1p_126:focus{border-color:#fff;background:#ffffff1a}._otpInput_1am1p_126:disabled{opacity:.5;cursor:not-allowed}._otpInput_1am1p_126::placeholder{color:#ffffff4d}._otpInputError_1am1p_154{border-color:#f44!important;background:#ff44441a}@keyframes _shake_1am1p_179{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-6px)}20%,40%,60%,80%{transform:translate(6px)}}._shake_1am1p_179{animation:_shake_1am1p_179 .5s ease-in-out}._verifyingContainer_1am1p_183{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:16px}._verifyingLoader_1am1p_191{width:16px!important;height:16px!important}._verifyingLoader_1am1p_191:before,._verifyingLoader_1am1p_191:after{width:16px!important;height:16px!important;border-color:#ffffff4d!important}._verifyingLoader_1am1p_191:after{border-top-color:#fff!important}._verifyingText_1am1p_207{color:#ffffffd9;font-size:14px}._errorMessage_1am1p_212{color:#ff6b6b;font-size:14px;margin:0 0 16px}._errorMessage_1am1p_212:before{content:"⚠";margin-right:6px}._resendText_1am1p_223{color:#ffffffb3;font-size:14px;margin:8px 0 0}._resendLink_1am1p_229{color:var(--primary);cursor:pointer;text-decoration:underline;transition:color .2s}._resendLink_1am1p_229:hover{color:#ffb3b3}._buttonContainer_1am1p_240{display:flex;flex-direction:column;gap:12px;width:100%;max-width:280px;margin-top:16px}._primaryButton_1am1p_249{background:#ff8a8a;color:#fff;border:none;border-radius:8px;padding:14px 24px;font-size:16px;font-weight:600;cursor:pointer;transition:background-color .2s}._primaryButton_1am1p_249:hover{background:#ff9d9d}._secondaryButton_1am1p_265{background:transparent;color:#fff;border:2px solid rgba(255,255,255,.3);border-radius:8px;padding:12px 24px;font-size:16px;font-weight:500;cursor:pointer;transition:border-color .2s,background-color .2s}._secondaryButton_1am1p_265:hover{border-color:#fff;background:#ffffff1a}._loader_1am1p_282{margin-top:16px!important}._loader_1am1p_282:before,._loader_1am1p_282:after{border-color:#ffffff4d!important}._loader_1am1p_282:after{border-top-color:#fff!important}._resendLinkError_1am1p_295{color:#fff;font-size:14px;cursor:pointer;text-decoration:underline;transition:opacity .2s}._resendLinkError_1am1p_295:hover{opacity:.8}@media screen and (max-width:700px){._modal_1am1p_1{width:90%!important;max-width:400px!important;min-width:auto!important;min-height:auto!important;height:auto!important;margin:auto!important;border-radius:16px!important;top:auto!important;padding:0!important}}@media screen and (max-width:480px){._modal_1am1p_1{width:90%!important;max-width:360px!important}._main_1am1p_68{padding:0 24px 32px}._title_1am1p_100{font-size:22px}._subtitle_1am1p_107{font-size:13px}._otpContainer_1am1p_120{gap:8px}._otpInput_1am1p_126{width:42px;height:50px;font-size:20px;border-radius:10px}._emailIconContainer_1am1p_79{width:80px;height:80px;margin-bottom:20px}._emailIcon_1am1p_79{width:40px;height:40px}}._container_hiegh_1{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:flex;align-items:center;justify-content:center}._background_hiegh_13{position:absolute;top:0;left:0;right:0;bottom:0;background-image:url(https://cdn.decentraland.org/@dcl/auth-site/4.11.1/assets/custom-welcome-background-BxlFQma9.webp);background-size:cover;background-position:center;background-repeat:no-repeat;z-index:-1}._content_hiegh_26{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:40px}._title_hiegh_35{color:#fff;font-size:28px;font-weight:500;margin:24px 0 0;letter-spacing:.5px}._subtitle_hiegh_43{color:#ffffffd9;font-size:16px;margin:12px 0 0;max-width:400px}._spinner_hiegh_50{margin-top:24px;color:#fc9965}._retryButton_hiegh_55{margin-top:24px;background:#ff2d55;color:#fff;border:none;border-radius:8px;padding:14px 32px;font-size:16px;font-weight:600;cursor:pointer;transition:background-color .2s}._retryButton_hiegh_55:hover{background:#e6284d}._main_1mz76_1{display:grid;grid-template-columns:40% 60%;height:100%;position:relative}._background_1mz76_8{width:100%;height:100%;top:0;left:0;position:absolute;background-repeat:no-repeat;background-size:cover;background-position:right;animation:_move-background_1mz76_1 10s linear infinite alternate;z-index:-1}._main_1mz76_1:before{content:"";position:fixed;width:100%;height:350%;background:radial-gradient(ellipse at 0 50%,transparent 10%,#e02dd3 40%,#491975 70%);top:-100%;transform:rotate(180deg);overflow:hidden}._main_1mz76_1._newUserMain_1mz76_32:before{background:linear-gradient(89.65deg,#952dc600 29.59%,#5e1e828f 39.08%,#4b196abf 45.36%,#40175ddb 54.22%,#32134c 72.84%)}._left_1mz76_36{width:100%;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:start;padding:80px 0}._leftInfo_1mz76_46{height:100%;width:100%;max-width:420px;display:flex;flex-direction:column;justify-content:space-between}._right_1mz76_55{display:flex;flex-direction:row;align-items:end;justify-content:center;width:100%;z-index:1}._mainContainer_1mz76_64{display:flex;flex-direction:column;gap:48px}._footer_1mz76_70{display:flex;flex-direction:column;margin-bottom:96px;font-size:18px;width:100%;align-items:center}._footer_1mz76_70>p{color:#fff}._footer_1mz76_70 a{color:#fff;text-decoration:underline}._newUserInfo_1mz76_89{font-size:16px;line-height:150%;letter-spacing:0px}._newUserInfo_1mz76_89 span{color:var(--Primary-Base-Primary, #FF2D55);text-decoration:underline;text-transform:uppercase;cursor:pointer}._guestInfo_1mz76_102,._guestInfo_1mz76_102 a{color:#fff;font-size:16px}._guestInfo_1mz76_102{border-top:1px solid white;padding-top:15px;display:flex;gap:5px}._guestInfo_1mz76_102 a{text-decoration:underline}@media screen and (max-width:1440px){._main_1mz76_1{grid-template-columns:50% 50%}}@media screen and (max-width:800px){._main_1mz76_1{display:flex;height:auto}._background_1mz76_8{display:none}._main_1mz76_1:before{background:radial-gradient(ellipse at 0 50%,#e02dd3,#491975 70%)}._main_1mz76_1._newUserMain_1mz76_32:before{background:linear-gradient(144.23deg,#491975 10.31%,#d72ccd 102.43%)}._left_1mz76_36{padding:20px}}@keyframes _move-background_1mz76_1{0%{transform:translate(0)}to{transform:translate(10%)}}:root{--background: #18141a;--danger: #ffa900;--error: #ff0000;--primary: #ff2d55;--secondary: #242129;--primary-hover: #ff3d61;--secondary-hover: #28262c;--secondary-on-modal: #67637033;--secondary-on-modal-hover: #6763704d;--card-on-modal: #67637033;--text: #ffffff;--secondary-text: #676370;--text-on-primary: #ffffff;--text-on-secondary: #ffffff;--divider: #67637033;--dropdown: #716b7c;--dropdown-hover: #24212933;--popup: #676370;--popup-text: #ffffff;--navbar-popup: #242129;--navbar-popup-hover: #67637033;--card: #242129;--outline: 1px solid #00000005;--toast: #3d3b43;--toast-text: #ffffff;--modal: #242129;--dimmer: #000000dd;--text-area-border: #676370;--clear-divider: #a09ba8;--navbar-icons: #fff;--shadow-1: 0px 2px 4px 0px rgba(0, 0, 0, .16);--shadow-2: 0px 10px 20px 0px rgba(0, 0, 0, .24);--shadow-3: 0px 16px 32px 0px rgba(0, 0, 0, .32);--shadow-4: 0px 8px 16px 12px rgba(0, 0, 0, .8);--shadow-color-1: 0px 2px 4px 0px rgba(0, 0, 0, .16);--shadow-color-2: 0px 10px 20px 0px rgba(0, 0, 0, .24);--shadow-color-3: 0px 16px 32px 0px rgba(0, 0, 0, .32);--brightness: brightness(100);--notification-onboarding-bell: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAxySURBVHgB7Z1dbBTXFcf/d3ZDSISTpVVivA7S5iEGqQEm/qB+KkueEiUEeGiVoFQxUgvKE01TRepDi2kfqrQhH08UNx9GilLyBIhUTVupOC8VjrGZQJCC87KRYA1UVRZMGj48c3PO2LvsrPd75+POen7Ssju7w+56/3POPffce88VaAPSejpxHTd0C2ZKM7UNEkjQ0ykpZMo+QUo6FolF/1EgI4AcpMjRUY7O/wywcpoWN1ZguTFmjOUQcgRCSL8+mLasOV3I2CYSRYdECt5AF4AwpDA/YdFPGSfHEDJCITBb6DXr+hAJulXC0staoy/InIA2Rt/h2LJYbOykcTIDxVFWYKeoMg0FIetmsQ+pLLZyArP7laZ8gX64bcFZauOQ2KMiJg6p5saVEXhB2L2qWmu9CAFDSvnW1NmJUShA4ALbAZNpvUcPU2gvMtRm7wta6MAEbheLrYOMFtN2BuW6fRd4UB9M3Tble0tAWAfcRt8VE/v8DsZi8JG+9QN7TEsepodrsfTQTSmHulZ1L5+5fPET+IQvFrxUrbYKmWUxbbMf1uy5BS9xq61EYt6aH7pJ1nwSHuKZwJyo+N6DD/yB8rzD5CiWI6IU/k2e6O5MJrJXsv+AR3jiom2XPGcdkQI6IurBM5ftusAD+oBumuII2q9f6zWeiKzBRfrWbdxmmjiBSNxmSN0yrdP8G8JFXGuD+9ZvpPwxDkftbUvwb/dsctXqzMzlC5/BBVwR2BZXYhQRLiG3uSVyywJH4nqFOyK3FGRxe0Fu+QgiPIME2j559tOjaJKmBeau0C3TPB2mMduQkotZ8c0T5/5joAmaiqLnxbVOROL6QsLU5o7wb44maErgeXGjrpCPpG5b1hGdsoNokIYF7l0/8AYicX2HAlk9bn6zFw3SUBTNAwfzueWIIJAQgzRAcbWRAYq6g6woqFKGHKU0H6s3pVm3i46CKmVI8Nh6vSfXZcG96zfuJf8wjCVIB9lAD5YhjXuQRNx+zMxgDrOwMIZvMYkbyNKxrwjx0tSZ8TdrnlbrhKXqmlnYHfTvc7jPflyL47iOEVz1U+i6XHUcNSB3sDdM4nbc14GeNY/YtzVr1tDxCnR0dBRen52dxfkvpjF9/ktMnprC7LXZRe/BVrofD9gWWy9bsMK+jSCHgyS0D+Rd9eZqJ1W14IU5yycQAvoGerH7xZ/bwhYLWg0We8uT2x0is0jD+D5aYQz/p/f4n+3CvUaT2uZTn1eeklv1El2YkK40W7Y+hV0kbDLZhUY5eOBth7hp3NuyuHfeB3gZ/4XXSMEelq6pClS04N51A0P0srIC96x9BL965Zfo6+9FM5wnF73jx88XjtkdH0RnQ265FvvxNT7ANXhNNSuu8teIhrMmfrHj+WfJan9Wtysux/4/vu443oX7XRWXeRkrbXftdeBlCdvTPlzutbLh4bz1qpmO5Hb25Vdeaknc6fPTmJyYKhyzsNz2egFfOD6Q6n90MF3uhbICCyH2QEFYXLbcVvng/cOOYy9F4Pa4w92pb2VZaIsXseiT7UVhUr3prm6Jy0x/8aXjuA/eTSNjcVlkr+FVI+WseJHAvPgaisFdILfEtfvB5KLzsABut72l9OAu+AFZ8SLtHAJz1oquhCEoRLK7C8O//y3cYiY74zjOpx69JOmXwJDbSseMHQJTSjINxdjyzNNN9XErcW32OvxmhX+rdBOa9e1Q8RMOgQU0pdwzW69brnmpICS2Fh8XBF5wz2koxNPPPAW3ua/D2R2a8WFwYBq34BesYbGbLgispHve+jTcpqvE3WcXhv28ZBq34SfFbrogMLnnrVCInrU9rra9eThBkkwmHc95LQCPF/tJsZsuCKyae+7rfwxesenxHzmOD8K7kpSnApgMQFoW8hi2wJzcwHwBT2Xo7++DV2x+fJPj2MsZGR/hGwRAIp/0sAXmwp5QjK5u991zHh6B4uRJMTx+6zbHSVye6REEljZvxbbAXLUVitHR4U3yPw+nPothK3ZzJgZ7hBEPXX8tKN2c5ntb4GKfrQqlgZDbsBWnS1w1C/IBZtEqLO5uXPZ/Il4RAnKDfa/rekIzl30NxZg8Mw6v4bz0jp/8FNmLzvTlLgpHdjc5wsR9Xp7JEaS4eazYvSu1OJYv2UIp3GU6+M4BO2NWDFvyFlxsSCTuS7OLf45SJyqIy8TnbuiaigGWn3Bfu5zILBKLvItcLQdL5URjUU/hJl7D1/a5Qba55bCEmaJxMm3Jr1bIizxy4C84fuxvjtc4+MonKnhosXjwXhVLrYjQdE1IsQERtsg8LMm3ZIUuGlssi5q/KY/E/Xw5RuuNiuBpuMf/fhQj7x6wH/NE+rBCg5TkooVMkNIRJdjJkIUpubwKIpvN2tE2R94cnI38+e2yqyJUgrq/qTh1iCMLrkF+KUwxf33/Q+UFZthFpxDRriS8n88ZESSRwO1OJHCbEwnc5rDAod9hM6IykcDtTSZy0W2MEMhpAiKDiPZEipxmCfkVItoSC7hKFiyjNrgJvJ4z5gZCSEOjjHRTdYi9pJXV+37R1b0K6kMuWpOxDBSDC6yoTpfHkwLdgNpfQ5uL31DOgrd4sOjMbUonz6vIXHy5oRmGwW1wBgrRN+Ddqga3KDd5XimEyBjGWG5+4juEMla8u8miZkFQOnleJWic396tZX7iuzB928+2Gtz2hmnBN1uxqiJTkmOM722BNSseuAWzuCPvHEDY4AtSRZE5wOJ7u6R/9sqFTFdn9y8ABLItHbdlh95/F3fffTfCCH9/aubs6rWKkJv8fPxFflC0ADy4dtjNKjpBwZasStAlIQpN7p0F4MI8hgDgqalhCapqwRWBVICMtbBTWkFgS5sbRQD0rOlBu6CKBVuxO+WFHQWc+tb98ITfpRz4R2kXC56dvY6xfwfbISHrHZs8O16oAu+o4We7aaml4SNc9XUSEW5B7e+h4mPHgP+Cm45Gl0JMsXtmHAJz2lICgQRbEW4gRo2SXVgWTdmJSW0UEaFEk073zJStkhlEsNUsHKS5lQEb/s3vFq0PDguUmjQmz3y6qLhY+YrvUuxDSLCDNBcySNnsjKPMf9iQUnur3PNlBbZ38BDhmYz32quvt7zSj1f3Z0tqSYcG0mrq7MnRci9VnDZLyeqdCAm8fnf/n95AsxwsU7ohVFTxuBX3D+YBiGTnQ2mEZHkpi8zV3HkIr5FBCxZ35MDbCC229Y5XNMaqG0R3P7j6KynUKvFfDRb5nx//y57xuGZt9RToKWq3Oaj6KMyWC3tTrO1sjJVer1lrPkwRdTGc/uSqsn39fYU6G9xO23smkbhhDqjuIEarWa99Bmqg64MpzbROIyrWohYCOUvTHjNqbC9b1UUzly5dyHWteugmPXwCEeog8erpM+NHa51W93YgYXXVbQkHVmfGH67n1LpXF5oxu9sUDUQEje2axeZ6T6/povNErloRLPHr02fHP6739LoFZmYuXzzZ9WByJbmIQUT4jxRvTZ0bH27kvzS8ANyK3x7mxDYi/IXaXSt+zzAapGGBeczY1LTtYcpVhx4Wl9pdXoqCBml6U72BHwzopiZOIOofe0ud/d1KNF2jY+LchEFXR2gGJMKKkNjZrLhMQ0FWKTNXLn7R1bn6K2r9tyHCfSy5c+rzicNogZYEZmauXDAikT2AxT03MYoWaVlgJhLZZVwSl3FFYIZFTnZ285pUToQEsogt9FBARXHNc626Zedbuow9+mTJE5AyhYj6sbtC1nbDmHA1x+B6pTuO+OxcadRPrhshhDHfz51wPYHk6ebyvY8OvEnffg8iKkPpR85QNZPEqAfX2uByzFzJfkwDFLzjI+euo3a5GGpveeCAc8uXLmU820HaUwvOE7XLTngFIA+/tpLAqP+zfKT30Y3D9InsspdmepOt1hT7yGrfhE946qJLoczXWGdy9YdkySvpylpSeyay1Vox7clGxnLd+dyA4C3ILU2+1+5um4XlpUD2apFAPj9getcNDEFoe9tOaOom8uqQoIQtfA0oAgtN/cE9UobbdQdtsaUoI3Aedt2msIboi72AsMDBkxRHeX2uKsLmUU7gPPMT7s20gPaCqtN12VqlwDFLu2fUq0RFqygrcDF3xBZb6QdNI6gNNXkwQApDdVGLCYXApSxE4LqQcpMUQvcsQBPICAkSVHzCtR9Vc7/1EEqBS9H1dCI+d0Nn0Sm5myBRNtCfluC9kSUnVWSZJbDCnsRvWyBZZYbuMhTgXYWwDK6Cz8W0w2ChtfgOKTTeABTIJ8wAAAAASUVORK5CYII=);--navbar-menu-enabled: #ecebed;--navbar-menu-hover: #fff;--navbar-item-text-enabled: #cfcdd4;--navbar-item-text-hover: #fff;--navbar-item-border-enabled: #716b7c;--navbar-item-border-hover: #cfcdd4;--usermenu-item-text-enabled: #cfcdd4;--usermenu-item-border-enabled: #cfcdd4}: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%}#root{height:100%}body{margin:0;min-width:100vw;min-height:100dvh;min-height:100vh}
|