@dcl/explore-site 0.0.1-24506067692.commit-7cbe267 → 0.0.1-24533810684.commit-08f2d1e
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/HomePage-DPGatVCF.js +3 -0
- package/assets/{QueryClientProvider-S2cSmCUs.js → QueryClientProvider-diWVe5Kl.js} +1 -1
- package/assets/{SensorsRounded-TwgeIrvl.js → SensorsRounded-B5CYaxPg.js} +1 -1
- package/assets/Web3Inner-z-tSs8sf.js +1 -0
- package/assets/Web3SyncProvider-CypbX7iI.js +3 -0
- package/assets/__federation_expose_App-Bndnzp1U.js +1 -0
- package/assets/__federation_fn_import-BPa8h49G.js +1 -0
- package/assets/__federation_shared_@dcl/core-web3/lazy-BxXRMbjM.js +1 -0
- package/assets/__federation_shared_@dcl/core-web3-Bg69b_qh.js +2 -0
- package/assets/__federation_shared_@dcl/{hooks-DWUL36eR.js → hooks-mIJ2xjF0.js} +3 -3
- package/assets/__federation_shared_@emotion/react-CyrdJVjV.js +1 -0
- package/assets/__federation_shared_@emotion/{styled-CutIM4hd.js → styled--75jFTzr.js} +1 -1
- package/assets/{__federation_shared_decentraland-ui2-OcYWz3BJ.js → __federation_shared_decentraland-ui2-dJS9Vwj5.js} +6 -6
- package/assets/{__federation_shared_react-redux-BsRWKqZd.js → __federation_shared_react-redux-PotGTJzf.js} +1 -1
- package/assets/{__federation_shared_react-router-dom-D6fN_MPs.js → __federation_shared_react-router-dom-BOdQQ4Uh.js} +1 -1
- package/assets/__federation_shared_viem-DDBJYZTJ.js +2 -0
- package/assets/{__federation_shared_wagmi-V68qkOak.js → __federation_shared_wagmi-CgLPXn48.js} +1 -1
- package/assets/{add-DYSzlqDi.js → add-B6OUNwc7.js} +1 -1
- package/assets/{all-wallets-Cz1_BP21.js → all-wallets-BwSwHRpq.js} +1 -1
- package/assets/{app-store-DJD6if64.js → app-store-CF95uJ5u.js} +1 -1
- package/assets/{apple-ONzgQNZb.js → apple-D-T8pMcm.js} +1 -1
- package/assets/{arrow-bottom-CS4hUU5K.js → arrow-bottom-DdhQXQwO.js} +1 -1
- package/assets/{arrow-bottom-circle-tskAwsAe.js → arrow-bottom-circle-CFQGU7p7.js} +1 -1
- package/assets/{arrow-left-lVGPT4Ol.js → arrow-left-BD_NkLWm.js} +1 -1
- package/assets/{arrow-right-DCzkLJ85.js → arrow-right-DkGqRZiP.js} +1 -1
- package/assets/{arrow-top-BfoirqVJ.js → arrow-top-moQ8S34l.js} +1 -1
- package/assets/{auto-track-ylAeu8GC.js → auto-track-DWK83jm7.js} +1 -1
- package/assets/{bank-C3Dt70oH.js → bank-wlox9c4u.js} +1 -1
- package/assets/{basic-t1j5X-od.js → basic-FS2Z04Mz.js} +1 -1
- package/assets/{biconomy-BA_1W9dm.js → biconomy-BrXNiP4h.js} +1 -1
- package/assets/{browser-CJ0usHLI.js → browser-CUQ2zQTB.js} +1 -1
- package/assets/{card-Cz1gdgq-.js → card-NrYjwqUv.js} +1 -1
- package/assets/{ccip-D79frVW8.js → ccip-B5vuDNHH.js} +1 -1
- package/assets/{checkmark-C5jp9GGl.js → checkmark-566o88C-.js} +1 -1
- package/assets/{checkmark-bold-BTecpTuR.js → checkmark-bold-3uwTX7px.js} +1 -1
- package/assets/{chevron-bottom-BkF7oESa.js → chevron-bottom-CfzwLSb9.js} +1 -1
- package/assets/{chevron-left-D1L-jaav.js → chevron-left-ClLgeGWx.js} +1 -1
- package/assets/{chevron-right-D5rt8sAi.js → chevron-right-aRPuH5to.js} +1 -1
- package/assets/{chevron-top-hc8gcFpH.js → chevron-top-YRpl4M0m.js} +1 -1
- package/assets/{chrome-store-ChFX3FT3.js → chrome-store-DsmdHqVO.js} +1 -1
- package/assets/{clock-CzLodk_r.js → clock-CZ7NDF6g.js} +1 -1
- package/assets/{close-BuQlpuUL.js → close-B5lXMNNb.js} +1 -1
- package/assets/{coinPlaceholder-B2Z6-yue.js → coinPlaceholder-BjCnyfne.js} +1 -1
- package/assets/{compass-CZUlvUVM.js → compass-CS_Os52w.js} +1 -1
- package/assets/{controller-BtDVd_aq.js → controller-DvdeaE6y.js} +2 -2
- package/assets/{copy-DJv2Nr5v.js → copy-fG_5Fn5Z.js} +1 -1
- package/assets/{core-C4Q-G7Te.js → core-D1JqYuOS.js} +15 -15
- package/assets/{createBundlerClient-Br8fYUWc.js → createBundlerClient-CubtDgsV.js} +1 -1
- package/assets/{createClient-C3MOjVgY.js → createClient-CR8DDHzD.js} +1 -1
- package/assets/{cursor-K6zf8P8P.js → cursor-CxCHAFeZ.js} +1 -1
- package/assets/{cursor-transparent-BEmzJfXZ.js → cursor-transparent-Cv37G82O.js} +1 -1
- package/assets/{decimals-CfK2GdYT.js → decimals-CM2j75PQ.js} +1 -1
- package/assets/{decimals-BZqhR7BL.js → decimals-oozSYzUv.js} +1 -1
- package/assets/{desktop-CR4ncbsC.js → desktop-CQ5gYxno.js} +1 -1
- package/assets/{detectExtension-DQJnzr-F.js → detectExtension-Cd7CtJnn.js} +1 -1
- package/assets/{disconnect-Cxy_6Sd8.js → disconnect-BWSZMzR2.js} +1 -1
- package/assets/{discord-CJNZyUSm.js → discord-CUDtk8iW.js} +1 -1
- package/assets/{emotion-react.browser.esm-IRopa27p.js → emotion-react.browser.esm-C8ovg3zA.js} +1 -1
- package/assets/{emotion-use-insertion-effect-with-fallbacks.browser.esm-Dek7Kpe6.js → emotion-use-insertion-effect-with-fallbacks.browser.esm-ZrBNnPxm.js} +1 -1
- package/assets/{engine-mOtmwA6L.js → engine-BKFHNloO.js} +1 -1
- package/assets/{estimate-l1-fee-k8yGsKsO.js → estimate-l1-fee-CiVfMTJb.js} +1 -1
- package/assets/{eth_estimateGas-CmhCqkRZ.js → eth_estimateGas-DXVJK7bi.js} +1 -1
- package/assets/{eth_getStorageAt-CGBucoOx.js → eth_getStorageAt-BiqM4f8H.js} +1 -1
- package/assets/{eth_getTransactionCount-y2QsTvLw.js → eth_getTransactionCount-CWjm-hBg.js} +1 -1
- package/assets/{etherscan-b5mqHDR2.js → etherscan-C0HSXHEU.js} +1 -1
- package/assets/{exclamation-triangle-Bg5fRZpy.js → exclamation-triangle-cVJGZMmD.js} +1 -1
- package/assets/{extension-D1_3D1KE.js → extension-D5mTVlMf.js} +1 -1
- package/assets/{external-link-DUCz1m1z.js → external-link-nqqrcr3l.js} +1 -1
- package/assets/{extractIPFS-BeKSWGjo.js → extractIPFS-Q-wepBuj.js} +1 -1
- package/assets/{facebook-CvV-xdYv.js → facebook-BD0Z6bjG.js} +1 -1
- package/assets/{farcaster-DMlzK8Ar.js → farcaster-D5t_BpGY.js} +1 -1
- package/assets/{fetchTokenMetadata-C4NefnOo.js → fetchTokenMetadata-D7lU3SIa.js} +2 -2
- package/assets/{filters-DHyStwez.js → filters-DgOMNkF7.js} +1 -1
- package/assets/{get-ecosystem-wallet-info-CbWTwKG3.js → get-ecosystem-wallet-info-C7wEYhAI.js} +1 -1
- package/assets/{getBalance-D8M0DbBu.js → getBalance-D2STxyF1.js} +1 -1
- package/assets/{getInstalledModules-BurEvMNK.js → getInstalledModules-DCfjvoma.js} +1 -1
- package/assets/{getNFT-DQZppzzw.js → getNFT-9G3EvIo6.js} +2 -2
- package/assets/{getNFT-CH18R735.js → getNFT-C-zNHqto.js} +1 -1
- package/assets/{github-IilSsxgO.js → github-EgnJPOkx.js} +1 -1
- package/assets/{google-CCs_wu3I.js → google-ChAeFwWG.js} +1 -1
- package/assets/{help-circle-D_kmea0Q.js → help-circle-HHwusGfv.js} +1 -1
- package/assets/{id-CEDDxPyO.js → id-C3aQusJ1.js} +1 -1
- package/assets/{image-CacISnw5.js → image-DCBEX8iI.js} +1 -1
- package/assets/{in-app-wallet-calls-ZBHxiKkB.js → in-app-wallet-calls-BeM3jls_.js} +1 -1
- package/assets/{index-D0B01M8T.js → index-BNo5TVn1.js} +1 -1
- package/assets/{index-CeMOFIJl.js → index-BTcCF8pz.js} +1 -1
- package/assets/{index-C_nL-yLJ.js → index-C8369Kt3.js} +1 -1
- package/assets/{index-DSbNI5uF.js → index-CJxT02Ns.js} +1 -1
- package/assets/{index-BXOfMki0.js → index-CZsU5YW3.js} +1 -1
- package/assets/{index-BH6zTRml.js → index-CvY3anJm.js} +1 -1
- package/assets/index-Cxm_S31E.js +1 -0
- package/assets/{index-Bm1VTLe0.js → index-D1OpWHUo.js} +1 -1
- package/assets/index-DIcECrTc.js +2 -0
- package/assets/{index-BSdPSW5L.js → index-DRyfynLp.js} +2 -2
- package/assets/{index-DP4gqdTC.js → index-Dd7Rwv7H.js} +2 -2
- package/assets/index-Dy0yjznp.js +1 -1
- package/assets/index-VfkM29PH.js +1 -1
- package/assets/{index-DCzaGJ0h.js → index-nPgQlNn6.js} +3 -3
- package/assets/{index.es-f9VeuVCb.js → index.es-DNUnpMVo.js} +3 -3
- package/assets/{index.es-CvfHWDxQ.js → index.es-qiXhv63q.js} +1 -1
- package/assets/{info-DZvM_7Tg.js → info-Cg-tEK6c.js} +1 -1
- package/assets/{info-circle-CbTMexJv.js → info-circle-A5OoaMHb.js} +1 -1
- package/assets/jsx-runtime-B1l0k91v.js +1 -1
- package/assets/{lightbulb-yx2Mb3EV.js → lightbulb-DklKm46X.js} +1 -1
- package/assets/{mail-Dr3LWsa7.js → mail-BSh1g2Jd.js} +1 -1
- package/assets/{mobile-cqKuurbN.js → mobile-DY0gT7mE.js} +1 -1
- package/assets/{more-B2cKG2Cj.js → more-BMDmshJx.js} +1 -1
- package/assets/{network-placeholder-3q6GFkiF.js → network-placeholder-DU1RU4mB.js} +1 -1
- package/assets/{nftPlaceholder-PhYi3Gz0.js → nftPlaceholder-ZQBNuzRA.js} +1 -1
- package/assets/{off-DUI09dYV.js → off-DworvT8U.js} +1 -1
- package/assets/{openzeppelin-BX7BOYoL.js → openzeppelin-Cwt7PzKv.js} +1 -1
- package/assets/{ownerOf-BC019JN1.js → ownerOf-C-ehsDvS.js} +1 -1
- package/assets/{parseNft-B8R4kPQV.js → parseNft-CW2Wd1uX.js} +2 -2
- package/assets/{play-store-JeT38BY2.js → play-store-BUEXP4Ts.js} +1 -1
- package/assets/{plus--DWdZlCp.js → plus-BSLABLbR.js} +1 -1
- package/assets/preload-helper-rvnS1VMA.js +1 -0
- package/assets/{qr-code-BJDvJfO3.js → qr-code-Bhv4LYqU.js} +1 -1
- package/assets/{qr-overlay-ClttGQRf.js → qr-overlay-CEcTSSu9.js} +1 -1
- package/assets/{recycle-horizontal-Lkcjnn5n.js → recycle-horizontal-DKMdpTCz.js} +1 -1
- package/assets/{refresh-BT1jR4Dn.js → refresh-87LbOihu.js} +1 -1
- package/assets/remoteEntry.js +1 -1
- package/assets/{reown-logo-BS-2dm8x.js → reown-logo-BtZP1pGS.js} +1 -1
- package/assets/{resolveImplementation-DhbopK-R.js → resolveImplementation-Bq8n-Bjt.js} +1 -1
- package/assets/{search-BSl5mmgI.js → search-D5S6Hyhz.js} +1 -1
- package/assets/{send-CHeQ9oTi.js → send-DpgbB-mt.js} +1 -1
- package/assets/{send-batch-transaction-D1oj-0uI.js → send-batch-transaction-BALEJgO_.js} +1 -1
- package/assets/{send-eip712-transaction-RoGj1xEp.js → send-eip712-transaction-Dhph80lu.js} +2 -2
- package/assets/{send-gasless-transaction-BA1ne_Zw.js → send-gasless-transaction-BKHuNzKw.js} +2 -2
- package/assets/serializeAuthorizationList-thWU7FBF.js +1 -0
- package/assets/{session-proposal-D3Df17qP.js → session-proposal-HTjdwE7s.js} +1 -1
- package/assets/{session-request-FSnknvu5.js → session-request-BfWU2VwD.js} +2 -2
- package/assets/{signing-CJBbgcWH.js → signing-CPQmF9YX.js} +5 -5
- package/assets/slice-Dr1G42o6.js +1 -0
- package/assets/{swapHorizontal-cske8D4e.js → swapHorizontal-CQZjmlYk.js} +1 -1
- package/assets/{swapHorizontalBold-b6nHPenD.js → swapHorizontalBold-DYoOkH_7.js} +1 -1
- package/assets/{swapHorizontalMedium-DV93kJ8d.js → swapHorizontalMedium-GdF4wR0W.js} +1 -1
- package/assets/{swapHorizontalRoundedBold-B-tUcUDQ.js → swapHorizontalRoundedBold-CLPmazpV.js} +1 -1
- package/assets/{swapVertical-b60outJ9.js → swapVertical-Cz87s-yZ.js} +1 -1
- package/assets/{telegram-DYtfIm5p.js → telegram-DZICyDKX.js} +1 -1
- package/assets/{thirdweb-CSjGe06A.js → thirdweb-84h-CMUL.js} +3 -3
- package/assets/{three-dots-BEq0F5FJ.js → three-dots-BNuEs7h-.js} +1 -1
- package/assets/{totalSupply-CqPmrflK.js → totalSupply-Cf3-EivY.js} +1 -1
- package/assets/{twitch-VNmCX4fc.js → twitch-EZfFCvsb.js} +1 -1
- package/assets/{twitterIcon-DQdyBmm7.js → twitterIcon-D-EPzD6z.js} +1 -1
- package/assets/uid-Cg2-wLF5.js +44 -0
- package/assets/{verify-Ch-jj4sL.js → verify-C66JnFn0.js} +1 -1
- package/assets/{verify-filled-DAsUJrHR.js → verify-filled-CTRYZAWt.js} +1 -1
- package/assets/{w3m-modal-CwL-F657.js → w3m-modal-C_eW6nP7.js} +1 -1
- package/assets/{wait-for-tx-receipt-8QHIPUR1.js → wait-for-tx-receipt-D0woCUzS.js} +1 -1
- package/assets/{wallet-VPqOEzNs.js → wallet-CfN0W2cy.js} +1 -1
- package/assets/{wallet-placeholder-x8qRsSsI.js → wallet-placeholder-3kYYEaa5.js} +1 -1
- package/assets/{walletconnect-CQuMWn29.js → walletconnect-bmCQ7zYa.js} +1 -1
- package/assets/{wallets-DA1wJowE.js → wallets-DPgFGNNu.js} +5 -5
- package/assets/{warning-circle-BJ1YmKtQ.js → warning-circle-DTFLsDBk.js} +1 -1
- package/assets/{web-connector-C73Vanyj.js → web-connector-B-b80tlH.js} +3 -3
- package/assets/webSocket-CO2AWAe6.js +3 -0
- package/assets/{x-C855X9Jf.js → x-Btssr2Ai.js} +1 -1
- package/index.html +14 -16
- package/package.json +3 -3
- package/assets/HomePage-DuWKLuFD.js +0 -3
- package/assets/__federation_expose_App-B4QxDAu7.js +0 -1
- package/assets/__federation_fn_import-chtkoWq_.js +0 -1
- package/assets/__federation_shared_@dcl/core-web3-CqeOHBSV.js +0 -2
- package/assets/__federation_shared_@emotion/react-ClHMF0dJ.js +0 -1
- package/assets/__federation_shared_viem-CX1dsuPM.js +0 -2
- package/assets/index-Dr-PyceS.js +0 -2
- package/assets/index-qLRO6nWB.js +0 -1
- package/assets/preload-helper-B1n3wPb0.js +0 -1
- package/assets/serializeTransaction-gwTERWWq.js +0 -1
- package/assets/uid-BU7APsHa.js +0 -44
- package/assets/webSocket-G5Mbc2fm.js +0 -3
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{importShared as I}from"./__federation_fn_import-BPa8h49G.js";import{j as n}from"./jsx-runtime-B1l0k91v.js";import{w as Hn,e as qo,g as Wn,b as Ho,h as Wr,i as zr,a as Wo,o as zo,d as Vo}from"./reselect-qCf8eESi.js";import{c as Go,E as Dt,r as we,i as _e,d as Vr,u as Yo,a as Ko,b as Jo,e as Xo}from"./SensorsRounded-B5CYaxPg.js";import{l as Zo}from"./index-DVftV2UM.js";var ei=class extends Error{issues;constructor(e){super(e[0].message),this.name="SchemaError",this.issues=e}},Gr=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(Gr||{}),ue="uninitialized",tn="pending",Qe="fulfilled",qe="rejected";function zn(e){return{status:e,isUninitialized:e===ue,isLoading:e===tn,isSuccess:e===Qe,isError:e===qe}}const{createAction:Re,createSlice:Te,createSelector:ti,createAsyncThunk:Vn,combineReducers:ni,createNextState:ln,isAnyOf:ut,isAllOf:Nt,isAction:ri,isPending:Yr,isRejected:dn,isFulfilled:Ce,isRejectedWithValue:un,isAsyncThunkAction:Gn,prepareAutoBatched:Ne,SHOULD_AUTOBATCH:Kr,isPlainObject:Ve,nanoid:Jr}=await I("@reduxjs/toolkit");var Yn=Ve;function pn(e,t){if(e===t||!(Yn(e)&&Yn(t)||Array.isArray(e)&&Array.isArray(t)))return t;const r=Object.keys(t),o=Object.keys(e);let a=r.length===o.length;const u=Array.isArray(t)?[]:{};for(const d of r)u[d]=pn(e[d],t[d]),a&&(a=e[d]===u[d]);return a?e:u}function nn(e,t,r){return e.reduce((o,a,u)=>(t(a,u)&&o.push(r(a,u)),o),[]).flat()}function oi(e){return new RegExp("(^|:)//").test(e)}function ii(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function fn(e){return e!=null}function Kn(e){return[...e?.values()??[]].filter(fn)}function ai(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var si=e=>e.replace(/\/$/,""),ci=e=>e.replace(/^\//,"");function li(e,t){if(!e)return t;if(!t)return e;if(oi(t))return t;const r=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=si(e),t=ci(t),`${e}${r}${t}`}function pt(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}var rn=()=>new Map,Jn=(...e)=>fetch(...e),di=e=>e.status>=200&&e.status<=299,ui=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function Xn(e){if(!Ve(e))return e;const t={...e};for(const[r,o]of Object.entries(t))o===void 0&&delete t[r];return t}var pi=e=>typeof e=="object"&&(Ve(e)||Array.isArray(e)||typeof e.toJSON=="function");function fi({baseUrl:e,prepareHeaders:t=f=>f,fetchFn:r=Jn,paramsSerializer:o,isJsonContentType:a=ui,jsonContentType:u="application/json",jsonReplacer:d,timeout:m,responseHandler:k,validateStatus:c,...b}={}){return typeof fetch>"u"&&r===Jn&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(C,x,R)=>{const{getState:T,extra:g,endpoint:j,forced:$,type:S}=x;let w,{url:h,headers:v=new Headers(b.headers),params:A=void 0,responseHandler:E=k??"json",validateStatus:_=c??di,timeout:s=m,...i}=typeof C=="string"?{url:C}:C,l,p=x.signal;s&&(l=new AbortController,x.signal.addEventListener("abort",l.abort),p=l.signal);let y={...b,signal:p,...i};v=new Headers(Xn(v)),y.headers=await t(v,{getState:T,arg:C,extra:g,endpoint:j,forced:$,type:S,extraOptions:R})||v;const P=pi(y.body);if(y.body!=null&&!P&&typeof y.body!="string"&&y.headers.delete("content-type"),!y.headers.has("content-type")&&P&&y.headers.set("content-type",u),P&&a(y.headers)&&(y.body=JSON.stringify(y.body,d)),y.headers.has("accept")||(E==="json"?y.headers.set("accept","application/json"):E==="text"&&y.headers.set("accept","text/plain, text/html, */*")),A){const U=~h.indexOf("?")?"&":"?",q=o?o(A):new URLSearchParams(Xn(A));h+=U+q}h=li(e,h);const D=new Request(h,y);w={request:new Request(h,y)};let M,L=!1,F=l&&setTimeout(()=>{L=!0,l.abort()},s);try{M=await r(D)}catch(U){return{error:{status:L?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(U)},meta:w}}finally{F&&clearTimeout(F),l?.signal.removeEventListener("abort",l.abort)}const B=M.clone();w.response=B;let Q,G="";try{let U;if(await Promise.all([f(M,E).then(q=>Q=q,q=>U=q),B.text().then(q=>G=q,()=>{})]),U)throw U}catch(U){return{error:{status:"PARSING_ERROR",originalStatus:M.status,data:G,error:String(U)},meta:w}}return _(M,Q)?{data:Q,meta:w}:{error:{status:M.status,data:Q},meta:w}};async function f(C,x){if(typeof x=="function")return x(C);if(x==="content-type"&&(x=a(C.headers)?"json":"text"),x==="json"){const R=await C.text();return R.length?JSON.parse(R):null}return C.text()}}var Zn=class{constructor(e,t=void 0){this.value=e,this.meta=t}},_t="__rtkq/",Xr="online",Zr="offline",gi="focus",eo="focused",hi="visibilitychange",St=Re(`${_t}${eo}`),gn=Re(`${_t}un${eo}`),kt=Re(`${_t}${Xr}`),hn=Re(`${_t}${Zr}`),tt=!1;function mi(e,t){function r(){const[o,a,u,d]=[St,gn,kt,hn].map(c=>()=>e(c())),m=()=>{window.document.visibilityState==="visible"?o():a()};let k=()=>{tt=!1};if(!tt&&typeof window<"u"&&window.addEventListener){let c=function(f){Object.entries(b).forEach(([C,x])=>{f?window.addEventListener(C,x,!1):window.removeEventListener(C,x)})};const b={[gi]:o,[hi]:m,[Xr]:u,[Zr]:d};c(!0),tt=!0,k=()=>{c(!1),tt=!1}}return k}return r()}var Ke="query",to="mutation",no="infinitequery";function At(e){return e.type===Ke}function yi(e){return e.type===to}function Et(e){return e.type===no}function ft(e){return At(e)||Et(e)}function mn(e,t,r,o,a,u){const d=bi(e)?e(t,r,o,a):e;return d?nn(d,fn,m=>u(ro(m))):[]}function bi(e){return typeof e=="function"}function ro(e){return typeof e=="string"?{type:e}:e}await I("@reduxjs/toolkit");function xi(e,t){return e.catch(t)}var Ie=(e,t)=>e.endpointDefinitions[t],Ge=Symbol("forceQueryFn"),on=e=>typeof e[Ge]=="function";function vi({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:r,mutationThunk:o,api:a,context:u,getInternalState:d}){const m=w=>d(w)?.runningQueries,k=w=>d(w)?.runningMutations,{unsubscribeQueryResult:c,removeMutationResult:b,updateSubscriptionOptions:f}=a.internalActions;return{buildInitiateQuery:j,buildInitiateInfiniteQuery:$,buildInitiateMutation:S,getRunningQueryThunk:C,getRunningMutationThunk:x,getRunningQueriesThunk:R,getRunningMutationsThunk:T};function C(w,h){return v=>{const A=Ie(u,w),E=e({queryArgs:h,endpointDefinition:A,endpointName:w});return m(v)?.get(E)}}function x(w,h){return v=>k(v)?.get(h)}function R(){return w=>Kn(m(w))}function T(){return w=>Kn(k(w))}function g(w,h){const v=(A,{subscribe:E=!0,forceRefetch:_,subscriptionOptions:s,[Ge]:i,...l}={})=>(p,y)=>{const P=e({queryArgs:A,endpointDefinition:h,endpointName:w});let D;const N={...l,type:Ke,subscribe:E,forceRefetch:_,subscriptionOptions:s,endpointName:w,originalArgs:A,queryCacheKey:P,[Ge]:i};if(At(h))D=t(N);else{const{direction:O,initialPageParam:K}=l;D=r({...N,direction:O,initialPageParam:K})}const M=a.endpoints[w].select(A),L=p(D),F=M(y()),{requestId:B,abort:Q}=L,G=F.requestId!==B,U=m(p)?.get(P),q=()=>M(y()),V=Object.assign(i?L.then(q):G&&!U?Promise.resolve(F):Promise.all([U,L]).then(q),{arg:A,requestId:B,subscriptionOptions:s,queryCacheKey:P,abort:Q,async unwrap(){const O=await V;if(O.isError)throw O.error;return O.data},refetch:()=>p(v(A,{subscribe:!1,forceRefetch:!0})),unsubscribe(){E&&p(c({queryCacheKey:P,requestId:B}))},updateSubscriptionOptions(O){V.subscriptionOptions=O,p(f({endpointName:w,requestId:B,queryCacheKey:P,options:O}))}});if(!U&&!G&&!i){const O=m(p);O.set(P,V),V.then(()=>{O.delete(P)})}return V};return v}function j(w,h){return g(w,h)}function $(w,h){return g(w,h)}function S(w){return(h,{track:v=!0,fixedCacheKey:A}={})=>(E,_)=>{const s=o({type:"mutation",endpointName:w,originalArgs:h,track:v,fixedCacheKey:A}),i=E(s),{requestId:l,abort:p,unwrap:y}=i,P=xi(i.unwrap().then(L=>({data:L})),L=>({error:L})),D=()=>{E(b({requestId:l,fixedCacheKey:A}))},N=Object.assign(P,{arg:i.arg,requestId:l,abort:p,unwrap:y,reset:D}),M=k(E);return M.set(l,N),N.then(()=>{M.delete(l)}),A&&(M.set(A,N),N.then(()=>{M.get(A)===N&&M.delete(A)})),N}}}var oo=class extends ei{constructor(e,t,r,o){super(e),this.value=t,this.schemaName=r,this._bqMeta=o}},be=(e,t)=>Array.isArray(e)?e.includes(t):!!e;async function xe(e,t,r,o){const a=await e["~standard"].validate(t);if(a.issues)throw new oo(a.issues,t,r,o);return a.value}function er(e){return e}var Fe=(e={})=>({...e,[Kr]:!0});function Ci({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:o,api:a,assertTagType:u,selectors:d,onSchemaFailure:m,catchSchemaFailure:k,skipSchemaValidation:c}){const b=(i,l,p,y)=>(P,D)=>{const N=r[i],M=o({queryArgs:l,endpointDefinition:N,endpointName:i});if(P(a.internalActions.queryResultPatched({queryCacheKey:M,patches:p})),!y)return;const L=a.endpoints[i].select(l)(D()),F=mn(N.providesTags,L.data,void 0,l,{},u);P(a.internalActions.updateProvidedBy([{queryCacheKey:M,providedTags:F}]))};function f(i,l,p=0){const y=[l,...i];return p&&y.length>p?y.slice(0,-1):y}function C(i,l,p=0){const y=[...i,l];return p&&y.length>p?y.slice(1):y}const x=(i,l,p,y=!0)=>(P,D)=>{const M=a.endpoints[i].select(l)(D()),L={patches:[],inversePatches:[],undo:()=>P(a.util.patchQueryData(i,l,L.inversePatches,y))};if(M.status===ue)return L;let F;if("data"in M)if(Ho(M.data)){const[B,Q,G]=Wr(M.data,p);L.patches.push(...Q),L.inversePatches.push(...G),F=B}else F=p(M.data),L.patches.push({op:"replace",path:[],value:F}),L.inversePatches.push({op:"replace",path:[],value:M.data});return L.patches.length===0||P(a.util.patchQueryData(i,l,L.patches,y)),L},R=(i,l,p)=>y=>y(a.endpoints[i].initiate(l,{subscribe:!1,forceRefetch:!0,[Ge]:()=>({data:p})})),T=(i,l)=>i.query&&i[l]?i[l]:er,g=async(i,{signal:l,abort:p,rejectWithValue:y,fulfillWithValue:P,dispatch:D,getState:N,extra:M})=>{const L=r[i.endpointName],{metaSchema:F,skipSchemaValidation:B=c}=L,Q=i.type===Ke;try{let G=er;const U={signal:l,abort:p,dispatch:D,getState:N,extra:M,endpoint:i.endpointName,type:i.type,forced:Q?j(i,N()):void 0,queryCacheKey:Q?i.queryCacheKey:void 0},q=Q?i[Ge]:void 0;let V;const O=async(W,H,X,ke)=>{if(H==null&&W.pages.length)return Promise.resolve({data:W});const fe={queryArg:i.originalArgs,pageParam:H},Ae=await K(fe),se=ke?f:C;return{data:{pages:se(W.pages,Ae.data,X),pageParams:se(W.pageParams,H,X)},meta:Ae.meta}};async function K(W){let H;const{extraOptions:X,argSchema:ke,rawResponseSchema:fe,responseSchema:Ae}=L;if(ke&&!be(B,"arg")&&(W=await xe(ke,W,"argSchema",{})),q?H=q():L.query?(G=T(L,"transformResponse"),H=await t(L.query(W),U,X)):H=await L.queryFn(W,U,X,Ee=>t(Ee,U,X)),typeof process<"u",H.error)throw new Zn(H.error,H.meta);let{data:se}=H;fe&&!be(B,"rawResponse")&&(se=await xe(fe,H.data,"rawResponseSchema",H.meta));let ge=await G(se,H.meta,W);return Ae&&!be(B,"response")&&(ge=await xe(Ae,ge,"responseSchema",H.meta)),{...H,data:ge}}if(Q&&"infiniteQueryOptions"in L){const{infiniteQueryOptions:W}=L,{maxPages:H=1/0}=W;let X;const ke={pages:[],pageParams:[]},fe=d.selectQueryEntry(N(),i.queryCacheKey)?.data,se=j(i,N())&&!i.direction||!fe?ke:fe;if("direction"in i&&i.direction&&se.pages.length){const ge=i.direction==="backward",et=(ge?io:an)(W,se,i.originalArgs);X=await O(se,et,H,ge)}else{const{initialPageParam:ge=W.initialPageParam}=i,Ee=fe?.pageParams??[],et=Ee[0]??ge,Qn=Ee.length;X=await O(se,et,H),q&&(X={data:X.data.pages[0]});for(let qn=1;qn<Qn;qn++){const Qo=an(W,X.data,i.originalArgs);X=await O(X.data,Qo,H)}}V=X}else V=await K(i.originalArgs);return F&&!be(B,"meta")&&V.meta&&(V.meta=await xe(F,V.meta,"metaSchema",V.meta)),P(V.data,Fe({fulfilledTimeStamp:Date.now(),baseQueryMeta:V.meta}))}catch(G){let U=G;if(U instanceof Zn){let q=T(L,"transformErrorResponse");const{rawErrorResponseSchema:V,errorResponseSchema:O}=L;let{value:K,meta:W}=U;try{V&&!be(B,"rawErrorResponse")&&(K=await xe(V,K,"rawErrorResponseSchema",W)),F&&!be(B,"meta")&&(W=await xe(F,W,"metaSchema",W));let H=await q(K,W,i.originalArgs);return O&&!be(B,"errorResponse")&&(H=await xe(O,H,"errorResponseSchema",W)),y(H,Fe({baseQueryMeta:W}))}catch(H){U=H}}try{if(U instanceof oo){const q={endpoint:i.endpointName,arg:i.originalArgs,type:i.type,queryCacheKey:Q?i.queryCacheKey:void 0};L.onSchemaFailure?.(U,q),m?.(U,q);const{catchSchemaFailure:V=k}=L;if(V)return y(V(U,q),Fe({baseQueryMeta:U._bqMeta}))}}catch(q){U=q}throw typeof process<"u",console.error(U),U}};function j(i,l){const p=d.selectQueryEntry(l,i.queryCacheKey),y=d.selectConfig(l).refetchOnMountOrArgChange,P=p?.fulfilledTimeStamp,D=i.forceRefetch??(i.subscribe&&y);return D?D===!0||(Number(new Date)-Number(P))/1e3>=D:!1}const $=()=>Vn(`${e}/executeQuery`,g,{getPendingMeta({arg:l}){const p=r[l.endpointName];return Fe({startedTimeStamp:Date.now(),...Et(p)?{direction:l.direction}:{}})},condition(l,{getState:p}){const y=p(),P=d.selectQueryEntry(y,l.queryCacheKey),D=P?.fulfilledTimeStamp,N=l.originalArgs,M=P?.originalArgs,L=r[l.endpointName],F=l.direction;return on(l)?!0:P?.status==="pending"?!1:j(l,y)||At(L)&&L?.forceRefetch?.({currentArg:N,previousArg:M,endpointState:P,state:y})?!0:!(D&&!F)},dispatchConditionRejection:!0}),S=$(),w=$(),h=Vn(`${e}/executeMutation`,g,{getPendingMeta(){return Fe({startedTimeStamp:Date.now()})}}),v=i=>"force"in i,A=i=>"ifOlderThan"in i,E=(i,l,p={})=>(y,P)=>{const D=v(p)&&p.force,N=A(p)&&p.ifOlderThan,M=(F=!0)=>{const B={forceRefetch:F,subscribe:!1};return a.endpoints[i].initiate(l,B)},L=a.endpoints[i].select(l)(P());if(D)y(M());else if(N){const F=L?.fulfilledTimeStamp;if(!F){y(M());return}(Number(new Date)-Number(new Date(F)))/1e3>=N&&y(M())}else y(M(!1))};function _(i){return l=>l?.meta?.arg?.endpointName===i}function s(i,l){return{matchPending:Nt(Yr(i),_(l)),matchFulfilled:Nt(Ce(i),_(l)),matchRejected:Nt(dn(i),_(l))}}return{queryThunk:S,mutationThunk:h,infiniteQueryThunk:w,prefetch:E,updateQueryData:x,upsertQueryData:R,patchQueryData:b,buildMatchThunkActions:s}}function an(e,{pages:t,pageParams:r},o){const a=t.length-1;return e.getNextPageParam(t[a],t,r[a],r,o)}function io(e,{pages:t,pageParams:r},o){return e.getPreviousPageParam?.(t[0],t,r[0],r,o)}function ao(e,t,r,o){return mn(r[e.meta.arg.endpointName][t],Ce(e)?e.payload:void 0,un(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,o)}function tr(e){return zr(e)?Wo(e):e}function nt(e,t,r){const o=e[t];o&&r(o)}function Ye(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function nr(e,t,r){const o=e[Ye(t)];o&&r(o)}var rt={};function wi({reducerPath:e,queryThunk:t,mutationThunk:r,serializeQueryArgs:o,context:{endpointDefinitions:a,apiUid:u,extractRehydrationInfo:d,hasRehydrationInfo:m},assertTagType:k,config:c}){const b=Re(`${e}/resetApiState`);function f(_,s,i,l){_[s.queryCacheKey]??={status:ue,endpointName:s.endpointName},nt(_,s.queryCacheKey,p=>{p.status=tn,p.requestId=i&&p.requestId?p.requestId:l.requestId,s.originalArgs!==void 0&&(p.originalArgs=s.originalArgs),p.startedTimeStamp=l.startedTimeStamp;const y=a[l.arg.endpointName];Et(y)&&"direction"in s&&(p.direction=s.direction)})}function C(_,s,i,l){nt(_,s.arg.queryCacheKey,p=>{if(p.requestId!==s.requestId&&!l)return;const{merge:y}=a[s.arg.endpointName];if(p.status=Qe,y)if(p.data!==void 0){const{fulfilledTimeStamp:P,arg:D,baseQueryMeta:N,requestId:M}=s;let L=ln(p.data,F=>y(F,i,{arg:D.originalArgs,baseQueryMeta:N,fulfilledTimeStamp:P,requestId:M}));p.data=L}else p.data=i;else p.data=a[s.arg.endpointName].structuralSharing??!0?pn(zr(p.data)?zo(p.data):p.data,i):i;delete p.error,p.fulfilledTimeStamp=s.fulfilledTimeStamp})}const x=Te({name:`${e}/queries`,initialState:rt,reducers:{removeQueryResult:{reducer(_,{payload:{queryCacheKey:s}}){delete _[s]},prepare:Ne()},cacheEntriesUpserted:{reducer(_,s){for(const i of s.payload){const{queryDescription:l,value:p}=i;f(_,l,!0,{arg:l,requestId:s.meta.requestId,startedTimeStamp:s.meta.timestamp}),C(_,{arg:l,requestId:s.meta.requestId,fulfilledTimeStamp:s.meta.timestamp,baseQueryMeta:{}},p,!0)}},prepare:_=>({payload:_.map(l=>{const{endpointName:p,arg:y,value:P}=l,D=a[p];return{queryDescription:{type:Ke,endpointName:p,originalArgs:l.arg,queryCacheKey:o({queryArgs:y,endpointDefinition:D,endpointName:p})},value:P}}),meta:{[Kr]:!0,requestId:Jr(),timestamp:Date.now()}})},queryResultPatched:{reducer(_,{payload:{queryCacheKey:s,patches:i}}){nt(_,s,l=>{l.data=Wn(l.data,i.concat())})},prepare:Ne()}},extraReducers(_){_.addCase(t.pending,(s,{meta:i,meta:{arg:l}})=>{const p=on(l);f(s,l,p,i)}).addCase(t.fulfilled,(s,{meta:i,payload:l})=>{const p=on(i.arg);C(s,i,l,p)}).addCase(t.rejected,(s,{meta:{condition:i,arg:l,requestId:p},error:y,payload:P})=>{nt(s,l.queryCacheKey,D=>{if(!i){if(D.requestId!==p)return;D.status=qe,D.error=P??y}})}).addMatcher(m,(s,i)=>{const{queries:l}=d(i);for(const[p,y]of Object.entries(l))(y?.status===Qe||y?.status===qe)&&(s[p]=y)})}}),R=Te({name:`${e}/mutations`,initialState:rt,reducers:{removeMutationResult:{reducer(_,{payload:s}){const i=Ye(s);i in _&&delete _[i]},prepare:Ne()}},extraReducers(_){_.addCase(r.pending,(s,{meta:i,meta:{requestId:l,arg:p,startedTimeStamp:y}})=>{p.track&&(s[Ye(i)]={requestId:l,status:tn,endpointName:p.endpointName,startedTimeStamp:y})}).addCase(r.fulfilled,(s,{payload:i,meta:l})=>{l.arg.track&&nr(s,l,p=>{p.requestId===l.requestId&&(p.status=Qe,p.data=i,p.fulfilledTimeStamp=l.fulfilledTimeStamp)})}).addCase(r.rejected,(s,{payload:i,error:l,meta:p})=>{p.arg.track&&nr(s,p,y=>{y.requestId===p.requestId&&(y.status=qe,y.error=i??l)})}).addMatcher(m,(s,i)=>{const{mutations:l}=d(i);for(const[p,y]of Object.entries(l))(y?.status===Qe||y?.status===qe)&&p!==y?.requestId&&(s[p]=y)})}}),T={tags:{},keys:{}},g=Te({name:`${e}/invalidation`,initialState:T,reducers:{updateProvidedBy:{reducer(_,s){for(const{queryCacheKey:i,providedTags:l}of s.payload){j(_,i);for(const{type:p,id:y}of l){const P=(_.tags[p]??={})[y||"__internal_without_id"]??=[];P.includes(i)||P.push(i)}_.keys[i]=l}},prepare:Ne()}},extraReducers(_){_.addCase(x.actions.removeQueryResult,(s,{payload:{queryCacheKey:i}})=>{j(s,i)}).addMatcher(m,(s,i)=>{const{provided:l}=d(i);for(const[p,y]of Object.entries(l.tags??{}))for(const[P,D]of Object.entries(y)){const N=(s.tags[p]??={})[P||"__internal_without_id"]??=[];for(const M of D)N.includes(M)||N.push(M),s.keys[M]=l.keys[M]}}).addMatcher(ut(Ce(t),un(t)),(s,i)=>{$(s,[i])}).addMatcher(x.actions.cacheEntriesUpserted.match,(s,i)=>{const l=i.payload.map(({queryDescription:p,value:y})=>({type:"UNKNOWN",payload:y,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:p}}));$(s,l)})}});function j(_,s){const i=tr(_.keys[s]??[]);for(const l of i){const p=l.type,y=l.id??"__internal_without_id",P=_.tags[p]?.[y];P&&(_.tags[p][y]=tr(P).filter(D=>D!==s))}delete _.keys[s]}function $(_,s){const i=s.map(l=>{const p=ao(l,"providesTags",a,k),{queryCacheKey:y}=l.meta.arg;return{queryCacheKey:y,providedTags:p}});g.caseReducers.updateProvidedBy(_,g.actions.updateProvidedBy(i))}const S=Te({name:`${e}/subscriptions`,initialState:rt,reducers:{updateSubscriptionOptions(_,s){},unsubscribeQueryResult(_,s){},internal_getRTKQSubscriptions(){}}}),w=Te({name:`${e}/internalSubscriptions`,initialState:rt,reducers:{subscriptionsUpdated:{reducer(_,s){return Wn(_,s.payload)},prepare:Ne()}}}),h=Te({name:`${e}/config`,initialState:{online:ai(),focused:ii(),middlewareRegistered:!1,...c},reducers:{middlewareRegistered(_,{payload:s}){_.middlewareRegistered=_.middlewareRegistered==="conflict"||u!==s?"conflict":!0}},extraReducers:_=>{_.addCase(kt,s=>{s.online=!0}).addCase(hn,s=>{s.online=!1}).addCase(St,s=>{s.focused=!0}).addCase(gn,s=>{s.focused=!1}).addMatcher(m,s=>({...s}))}}),v=ni({queries:x.reducer,mutations:R.reducer,provided:g.reducer,subscriptions:w.reducer,config:h.reducer}),A=(_,s)=>v(b.match(s)?void 0:_,s),E={...h.actions,...x.actions,...S.actions,...w.actions,...R.actions,...g.actions,resetApiState:b};return{reducer:A,actions:E}}var ae=Symbol.for("RTKQ/skipToken"),so={status:ue},rr=ln(so,()=>{}),or=ln(so,()=>{});function _i({serializeQueryArgs:e,reducerPath:t,createSelector:r}){const o=S=>rr,a=S=>or;return{buildQuerySelector:C,buildInfiniteQuerySelector:x,buildMutationSelector:R,selectInvalidatedBy:T,selectCachedArgsForQuery:g,selectApiState:d,selectQueries:m,selectMutations:c,selectQueryEntry:k,selectConfig:b};function u(S){return{...S,...zn(S.status)}}function d(S){return S[t]}function m(S){return d(S)?.queries}function k(S,w){return m(S)?.[w]}function c(S){return d(S)?.mutations}function b(S){return d(S)?.config}function f(S,w,h){return v=>{if(v===ae)return r(o,h);const A=e({queryArgs:v,endpointDefinition:w,endpointName:S});return r(_=>k(_,A)??rr,h)}}function C(S,w){return f(S,w,u)}function x(S,w){const{infiniteQueryOptions:h}=w;function v(A){const E={...A,...zn(A.status)},{isLoading:_,isError:s,direction:i}=E,l=i==="forward",p=i==="backward";return{...E,hasNextPage:j(h,E.data,E.originalArgs),hasPreviousPage:$(h,E.data,E.originalArgs),isFetchingNextPage:_&&l,isFetchingPreviousPage:_&&p,isFetchNextPageError:s&&l,isFetchPreviousPageError:s&&p}}return f(S,w,v)}function R(){return S=>{let w;return typeof S=="object"?w=Ye(S)??ae:w=S,r(w===ae?a:A=>d(A)?.mutations?.[w]??or,u)}}function T(S,w){const h=S[t],v=new Set,A=nn(w,fn,ro);for(const E of A){const _=h.provided.tags[E.type];if(!_)continue;let s=(E.id!==void 0?_[E.id]:Object.values(_).flat())??[];for(const i of s)v.add(i)}return Array.from(v.values()).flatMap(E=>{const _=h.queries[E];return _?{queryCacheKey:E,endpointName:_.endpointName,originalArgs:_.originalArgs}:[]})}function g(S,w){return nn(Object.values(m(S)),h=>h?.endpointName===w&&h.status!==ue,h=>h.originalArgs)}function j(S,w,h){return w?an(S,w,h)!=null:!1}function $(S,w,h){return!w||!S.getPreviousPageParam?!1:io(S,w,h)!=null}}const{formatProdErrorMessage:Si,formatProdErrorMessage:Ap,formatProdErrorMessage:Ep}=await I("@reduxjs/toolkit");var ir=WeakMap?new WeakMap:void 0,ar=({endpointName:e,queryArgs:t})=>{let r="";const o=ir?.get(t);if(typeof o=="string")r=o;else{const a=JSON.stringify(t,(u,d)=>(d=typeof d=="bigint"?{$bigint:d.toString()}:d,d=Ve(d)?Object.keys(d).sort().reduce((m,k)=>(m[k]=d[k],m),{}):d,d));Ve(t)&&ir?.set(t,a),r=a}return`${e}(${r})`};function ki(...e){return function(r){const o=Hn(c=>r.extractRehydrationInfo?.(c,{reducerPath:r.reducerPath??"api"})),a={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...r,extractRehydrationInfo:o,serializeQueryArgs(c){let b=ar;if("serializeQueryArgs"in c.endpointDefinition){const f=c.endpointDefinition.serializeQueryArgs;b=C=>{const x=f(C);return typeof x=="string"?x:ar({...C,queryArgs:x})}}else r.serializeQueryArgs&&(b=r.serializeQueryArgs);return b(c)},tagTypes:[...r.tagTypes||[]]},u={endpointDefinitions:{},batch(c){c()},apiUid:Jr(),extractRehydrationInfo:o,hasRehydrationInfo:Hn(c=>o(c)!=null)},d={injectEndpoints:k,enhanceEndpoints({addTagTypes:c,endpoints:b}){if(c)for(const f of c)a.tagTypes.includes(f)||a.tagTypes.push(f);if(b)for(const[f,C]of Object.entries(b))typeof C=="function"?C(Ie(u,f)):Object.assign(Ie(u,f)||{},C);return d}},m=e.map(c=>c.init(d,a,u));function k(c){const b=c.endpoints({query:f=>({...f,type:Ke}),mutation:f=>({...f,type:to}),infiniteQuery:f=>({...f,type:no})});for(const[f,C]of Object.entries(b)){if(c.overrideExisting!==!0&&f in u.endpointDefinitions){if(c.overrideExisting==="throw")throw new Error(Si(39));typeof process<"u";continue}typeof process<"u",u.endpointDefinitions[f]=C;for(const x of m)x.injectEndpoint(f,C)}return d}return d.injectEndpoints({endpoints:r.endpoints})}}const{formatProdErrorMessage:Ai}=await I("@reduxjs/toolkit");function Ei(){return function(){throw new Error(Ai(33))}}function le(e,...t){return Object.assign(e,...t)}var Ti=({api:e,queryThunk:t,internalState:r,mwApi:o})=>{const a=`${e.reducerPath}/subscriptions`;let u=null,d=null;const{updateSubscriptionOptions:m,unsubscribeQueryResult:k}=e.internalActions,c=(T,g)=>{if(m.match(g)){const{queryCacheKey:$,requestId:S,options:w}=g.payload,h=T.get($);return h?.has(S)&&h.set(S,w),!0}if(k.match(g)){const{queryCacheKey:$,requestId:S}=g.payload,w=T.get($);return w&&w.delete(S),!0}if(e.internalActions.removeQueryResult.match(g))return T.delete(g.payload.queryCacheKey),!0;if(t.pending.match(g)){const{meta:{arg:$,requestId:S}}=g,w=pt(T,$.queryCacheKey,rn);return $.subscribe&&w.set(S,$.subscriptionOptions??w.get(S)??{}),!0}let j=!1;if(t.rejected.match(g)){const{meta:{condition:$,arg:S,requestId:w}}=g;if($&&S.subscribe){const h=pt(T,S.queryCacheKey,rn);h.set(w,S.subscriptionOptions??h.get(w)??{}),j=!0}}return j},b=()=>r.currentSubscriptions,x={getSubscriptions:b,getSubscriptionCount:T=>b().get(T)?.size??0,isRequestSubscribed:(T,g)=>!!b()?.get(T)?.get(g)};function R(T){return JSON.parse(JSON.stringify(Object.fromEntries([...T].map(([g,j])=>[g,Object.fromEntries(j)]))))}return(T,g)=>{if(u||(u=R(r.currentSubscriptions)),e.util.resetApiState.match(T))return u={},r.currentSubscriptions.clear(),d=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(T))return[!1,x];const j=c(r.currentSubscriptions,T);let $=!0;if(j){d||(d=setTimeout(()=>{const h=R(r.currentSubscriptions),[,v]=Wr(u,()=>h);g.next(e.internalActions.subscriptionsUpdated(v)),u=h,d=null},500));const S=typeof T.type=="string"&&!!T.type.startsWith(a),w=t.rejected.match(T)&&T.meta.condition&&!!T.meta.arg.subscribe;$=!S&&!w}return[$,!1]}},ji=2147483647/1e3-1,Ii=({reducerPath:e,api:t,queryThunk:r,context:o,internalState:a,selectors:{selectQueryEntry:u,selectConfig:d},getRunningQueryThunk:m,mwApi:k})=>{const{removeQueryResult:c,unsubscribeQueryResult:b,cacheEntriesUpserted:f}=t.internalActions,C=ut(b.match,r.fulfilled,r.rejected,f.match);function x(S){const w=a.currentSubscriptions.get(S);return w?w.size>0:!1}const R={};function T(S){for(const w of S.values())w?.abort?.()}const g=(S,w)=>{const h=w.getState(),v=d(h);if(C(S)){let A;if(f.match(S))A=S.payload.map(E=>E.queryDescription.queryCacheKey);else{const{queryCacheKey:E}=b.match(S)?S.payload:S.meta.arg;A=[E]}j(A,w,v)}if(t.util.resetApiState.match(S)){for(const[A,E]of Object.entries(R))E&&clearTimeout(E),delete R[A];T(a.runningQueries),T(a.runningMutations)}if(o.hasRehydrationInfo(S)){const{queries:A}=o.extractRehydrationInfo(S);j(Object.keys(A),w,v)}};function j(S,w,h){const v=w.getState();for(const A of S){const E=u(v,A);E?.endpointName&&$(A,E.endpointName,w,h)}}function $(S,w,h,v){const E=Ie(o,w)?.keepUnusedDataFor??v.keepUnusedDataFor;if(E===1/0)return;const _=Math.max(0,Math.min(E,ji));if(!x(S)){const s=R[S];s&&clearTimeout(s),R[S]=setTimeout(()=>{if(!x(S)){const i=u(h.getState(),S);i?.endpointName&&h.dispatch(m(i.endpointName,i.originalArgs))?.abort(),h.dispatch(c({queryCacheKey:S}))}delete R[S]},_*1e3)}}return g},sr=new Error("Promise never resolved before cacheEntryRemoved."),Ri=({api:e,reducerPath:t,context:r,queryThunk:o,mutationThunk:a,internalState:u,selectors:{selectQueryEntry:d,selectApiState:m}})=>{const k=Gn(o),c=Gn(a),b=Ce(o,a),f={},{removeQueryResult:C,removeMutationResult:x,cacheEntriesUpserted:R}=e.internalActions;function T(h,v,A){const E=f[h];E?.valueResolved&&(E.valueResolved({data:v,meta:A}),delete E.valueResolved)}function g(h){const v=f[h];v&&(delete f[h],v.cacheEntryRemoved())}function j(h){const{arg:v,requestId:A}=h.meta,{endpointName:E,originalArgs:_}=v;return[E,_,A]}const $=(h,v,A)=>{const E=S(h);function _(s,i,l,p){const y=d(A,i),P=d(v.getState(),i);!y&&P&&w(s,p,i,v,l)}if(o.pending.match(h)){const[s,i,l]=j(h);_(s,E,l,i)}else if(R.match(h))for(const{queryDescription:s,value:i}of h.payload){const{endpointName:l,originalArgs:p,queryCacheKey:y}=s;_(l,y,h.meta.requestId,p),T(y,i,{})}else if(a.pending.match(h)){if(v.getState()[t].mutations[E]){const[i,l,p]=j(h);w(i,l,E,v,p)}}else if(b(h))T(E,h.payload,h.meta.baseQueryMeta);else if(C.match(h)||x.match(h))g(E);else if(e.util.resetApiState.match(h))for(const s of Object.keys(f))g(s)};function S(h){return k(h)?h.meta.arg.queryCacheKey:c(h)?h.meta.arg.fixedCacheKey??h.meta.requestId:C.match(h)?h.payload.queryCacheKey:x.match(h)?Ye(h.payload):""}function w(h,v,A,E,_){const s=Ie(r,h),i=s?.onCacheEntryAdded;if(!i)return;const l={},p=new Promise(L=>{l.cacheEntryRemoved=L}),y=Promise.race([new Promise(L=>{l.valueResolved=L}),p.then(()=>{throw sr})]);y.catch(()=>{}),f[A]=l;const P=e.endpoints[h].select(ft(s)?v:A),D=E.dispatch((L,F,B)=>B),N={...E,getCacheEntry:()=>P(E.getState()),requestId:_,extra:D,updateCachedData:ft(s)?L=>E.dispatch(e.util.updateQueryData(h,v,L)):void 0,cacheDataLoaded:y,cacheEntryRemoved:p},M=i(v,N);Promise.resolve(M).catch(L=>{if(L!==sr)throw L})}return $},Pi=({api:e,context:{apiUid:t},reducerPath:r})=>(o,a)=>{e.util.resetApiState.match(o)&&a.dispatch(e.internalActions.middlewareRegistered(t)),typeof process<"u"},Li=({reducerPath:e,context:t,context:{endpointDefinitions:r},mutationThunk:o,queryThunk:a,api:u,assertTagType:d,refetchQuery:m,internalState:k})=>{const{removeQueryResult:c}=u.internalActions,b=ut(Ce(o),un(o)),f=ut(Ce(a,o),dn(a,o));let C=[],x=0;const R=(j,$)=>{(a.pending.match(j)||o.pending.match(j))&&x++,f(j)&&(x=Math.max(0,x-1)),b(j)?g(ao(j,"invalidatesTags",r,d),$):f(j)?g([],$):u.util.invalidateTags.match(j)&&g(mn(j.payload,void 0,void 0,void 0,void 0,d),$)};function T(){return x>0}function g(j,$){const S=$.getState(),w=S[e];if(C.push(...j),w.config.invalidationBehavior==="delayed"&&T())return;const h=C;if(C=[],h.length===0)return;const v=u.util.selectInvalidatedBy(S,h);t.batch(()=>{const A=Array.from(v.values());for(const{queryCacheKey:E}of A){const _=w.queries[E],s=pt(k.currentSubscriptions,E,rn);_&&(s.size===0?$.dispatch(c({queryCacheKey:E})):_.status!==ue&&$.dispatch(m(_)))}})}return R},$i=({reducerPath:e,queryThunk:t,api:r,refetchQuery:o,internalState:a})=>{const{currentPolls:u,currentSubscriptions:d}=a,m=new Set;let k=null;const c=(g,j)=>{(r.internalActions.updateSubscriptionOptions.match(g)||r.internalActions.unsubscribeQueryResult.match(g))&&b(g.payload.queryCacheKey,j),(t.pending.match(g)||t.rejected.match(g)&&g.meta.condition)&&b(g.meta.arg.queryCacheKey,j),(t.fulfilled.match(g)||t.rejected.match(g)&&!g.meta.condition)&&f(g.meta.arg,j),r.util.resetApiState.match(g)&&(R(),k&&(clearTimeout(k),k=null),m.clear())};function b(g,j){m.add(g),k||(k=setTimeout(()=>{for(const $ of m)C({queryCacheKey:$},j);m.clear(),k=null},0))}function f({queryCacheKey:g},j){const $=j.getState()[e],S=$.queries[g],w=d.get(g);if(!S||S.status===ue)return;const{lowestPollingInterval:h,skipPollingIfUnfocused:v}=T(w);if(!Number.isFinite(h))return;const A=u.get(g);A?.timeout&&(clearTimeout(A.timeout),A.timeout=void 0);const E=Date.now()+h;u.set(g,{nextPollTimestamp:E,pollingInterval:h,timeout:setTimeout(()=>{($.config.focused||!v)&&j.dispatch(o(S)),f({queryCacheKey:g},j)},h)})}function C({queryCacheKey:g},j){const S=j.getState()[e].queries[g],w=d.get(g);if(!S||S.status===ue)return;const{lowestPollingInterval:h}=T(w);if(!Number.isFinite(h)){x(g);return}const v=u.get(g),A=Date.now()+h;(!v||A<v.nextPollTimestamp)&&f({queryCacheKey:g},j)}function x(g){const j=u.get(g);j?.timeout&&clearTimeout(j.timeout),u.delete(g)}function R(){for(const g of u.keys())x(g)}function T(g=new Map){let j=!1,$=Number.POSITIVE_INFINITY;for(const S of g.values())S.pollingInterval&&($=Math.min(S.pollingInterval,$),j=S.skipPollingIfUnfocused||j);return{lowestPollingInterval:$,skipPollingIfUnfocused:j}}return c},Mi=({api:e,context:t,queryThunk:r,mutationThunk:o})=>{const a=Yr(r,o),u=dn(r,o),d=Ce(r,o),m={};return(c,b)=>{if(a(c)){const{requestId:f,arg:{endpointName:C,originalArgs:x}}=c.meta,R=Ie(t,C),T=R?.onQueryStarted;if(T){const g={},j=new Promise((h,v)=>{g.resolve=h,g.reject=v});j.catch(()=>{}),m[f]=g;const $=e.endpoints[C].select(ft(R)?x:f),S=b.dispatch((h,v,A)=>A),w={...b,getCacheEntry:()=>$(b.getState()),requestId:f,extra:S,updateCachedData:ft(R)?h=>b.dispatch(e.util.updateQueryData(C,x,h)):void 0,queryFulfilled:j};T(x,w)}}else if(d(c)){const{requestId:f,baseQueryMeta:C}=c.meta;m[f]?.resolve({data:c.payload,meta:C}),delete m[f]}else if(u(c)){const{requestId:f,rejectedWithValue:C,baseQueryMeta:x}=c.meta;m[f]?.reject({error:c.payload??c.error,isUnhandledError:!C,meta:x}),delete m[f]}}},Di=({reducerPath:e,context:t,api:r,refetchQuery:o,internalState:a})=>{const{removeQueryResult:u}=r.internalActions,d=(k,c)=>{St.match(k)&&m(c,"refetchOnFocus"),kt.match(k)&&m(c,"refetchOnReconnect")};function m(k,c){const b=k.getState()[e],f=b.queries,C=a.currentSubscriptions;t.batch(()=>{for(const x of C.keys()){const R=f[x],T=C.get(x);if(!T||!R)continue;const g=[...T.values()];(g.some($=>$[c]===!0)||g.every($=>$[c]===void 0)&&b.config[c])&&(T.size===0?k.dispatch(u({queryCacheKey:x})):R.status!==ue&&k.dispatch(o(R)))}})}return d};function Ni(e){const{reducerPath:t,queryThunk:r,api:o,context:a,getInternalState:u}=e,{apiUid:d}=a,m={invalidateTags:Re(`${t}/invalidateTags`)},k=C=>C.type.startsWith(`${t}/`),c=[Pi,Ii,Li,$i,Ri,Mi];return{middleware:C=>{let x=!1;const R=u(C.dispatch),T={...e,internalState:R,refetchQuery:f,isThisApiSliceAction:k,mwApi:C},g=c.map(S=>S(T)),j=Ti(T),$=Di(T);return S=>w=>{if(!ri(w))return S(w);x||(x=!0,C.dispatch(o.internalActions.middlewareRegistered(d)));const h={...C,next:S},v=C.getState(),[A,E]=j(w,h,v);let _;if(A?_=S(w):_=E,C.getState()[t]&&($(w,h,v),k(w)||a.hasRehydrationInfo(w)))for(const s of g)s(w,h,v);return _}},actions:m};function f(C){return e.api.endpoints[C.endpointName].initiate(C.originalArgs,{subscribe:!1,forceRefetch:!0})}}var cr=Symbol(),Fi=({createSelector:e=ti}={})=>({name:cr,init(t,{baseQuery:r,tagTypes:o,reducerPath:a,serializeQueryArgs:u,keepUnusedDataFor:d,refetchOnMountOrArgChange:m,refetchOnFocus:k,refetchOnReconnect:c,invalidationBehavior:b,onSchemaFailure:f,catchSchemaFailure:C,skipSchemaValidation:x},R){qo();const T=O=>(typeof process<"u",O);Object.assign(t,{reducerPath:a,endpoints:{},internalActions:{onOnline:kt,onOffline:hn,onFocus:St,onFocusLost:gn},util:{}});const g=_i({serializeQueryArgs:u,reducerPath:a,createSelector:e}),{selectInvalidatedBy:j,selectCachedArgsForQuery:$,buildQuerySelector:S,buildInfiniteQuerySelector:w,buildMutationSelector:h}=g;le(t.util,{selectInvalidatedBy:j,selectCachedArgsForQuery:$});const{queryThunk:v,infiniteQueryThunk:A,mutationThunk:E,patchQueryData:_,updateQueryData:s,upsertQueryData:i,prefetch:l,buildMatchThunkActions:p}=Ci({baseQuery:r,reducerPath:a,context:R,api:t,serializeQueryArgs:u,assertTagType:T,selectors:g,onSchemaFailure:f,catchSchemaFailure:C,skipSchemaValidation:x}),{reducer:y,actions:P}=wi({context:R,queryThunk:v,infiniteQueryThunk:A,mutationThunk:E,serializeQueryArgs:u,reducerPath:a,assertTagType:T,config:{refetchOnFocus:k,refetchOnReconnect:c,refetchOnMountOrArgChange:m,keepUnusedDataFor:d,reducerPath:a,invalidationBehavior:b}});le(t.util,{patchQueryData:_,updateQueryData:s,upsertQueryData:i,prefetch:l,resetApiState:P.resetApiState,upsertQueryEntries:P.cacheEntriesUpserted}),le(t.internalActions,P);const D=new WeakMap,N=O=>pt(D,O,()=>({currentSubscriptions:new Map,currentPolls:new Map,runningQueries:new Map,runningMutations:new Map})),{buildInitiateQuery:M,buildInitiateInfiniteQuery:L,buildInitiateMutation:F,getRunningMutationThunk:B,getRunningMutationsThunk:Q,getRunningQueriesThunk:G,getRunningQueryThunk:U}=vi({queryThunk:v,mutationThunk:E,infiniteQueryThunk:A,api:t,serializeQueryArgs:u,context:R,getInternalState:N});le(t.util,{getRunningMutationThunk:B,getRunningMutationsThunk:Q,getRunningQueryThunk:U,getRunningQueriesThunk:G});const{middleware:q,actions:V}=Ni({reducerPath:a,context:R,queryThunk:v,mutationThunk:E,infiniteQueryThunk:A,api:t,assertTagType:T,selectors:g,getRunningQueryThunk:U,getInternalState:N});return le(t.util,V),le(t,{reducer:y,middleware:q}),{name:cr,injectEndpoint(O,K){const W=t,H=W.endpoints[O]??={};At(K)&&le(H,{name:O,select:S(O,K),initiate:M(O,K)},p(v,O)),yi(K)&&le(H,{name:O,select:h(),initiate:F(O)},p(E,O)),Et(K)&&le(H,{name:O,select:w(O,K),initiate:L(O,K)},p(v,O))}}}});await I("@reduxjs/toolkit");const{batch:Oi,useDispatch:Ui,useSelector:Bi,useStore:Qi}=await I("react-redux");function ot(e){return e.replace(e[0],e[0].toUpperCase())}var qi="query",Hi="mutation",Wi="infinitequery";function zi(e){return e.type===qi}function Vi(e){return e.type===Hi}function co(e){return e.type===Wi}function Oe(e,...t){return Object.assign(e,...t)}const{formatProdErrorMessage:Tp,formatProdErrorMessage:Gi}=await I("@reduxjs/toolkit"),{useEffect:me,useRef:he,useMemo:Z,useContext:jp,useCallback:ve,useDebugValue:Ft,useLayoutEffect:Yi,useState:lr}=await I("react"),{shallowEqual:We,Provider:Ip,ReactReduxContext:Rp}=await I("react-redux");var Ot=Symbol();function Ut(e){const t=he(e),r=Z(()=>pn(t.current,e),[e]);return me(()=>{t.current!==r&&(t.current=r)},[r]),r}function it(e){const t=he(e);return me(()=>{We(t.current,e)||(t.current=e)},[e]),We(t.current,e)?t.current:e}var Ki=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ji=Ki(),Xi=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Zi=Xi(),ea=()=>Ji||Zi?Yi:me,ta=ea(),dr=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:e.data===void 0,status:Gr.pending}:e;function Bt(e,...t){const r={};return t.forEach(o=>{r[o]=e[o]}),r}var Qt=["data","status","isLoading","isSuccess","isError","error"];function na({api:e,moduleOptions:{batch:t,hooks:{useDispatch:r,useSelector:o,useStore:a},unstable__sideEffectsInRender:u,createSelector:d},serializeQueryArgs:m,context:k}){const c=u?v=>v():me,b=v=>v.current?.unsubscribe?.(),f=k.endpointDefinitions;return{buildQueryHooks:S,buildInfiniteQueryHooks:w,buildMutationHook:h,usePrefetch:R};function C(v,A,E){if(A?.endpointName&&v.isUninitialized){const{endpointName:y}=A,P=f[y];E!==ae&&m({queryArgs:A.originalArgs,endpointDefinition:P,endpointName:y})===m({queryArgs:E,endpointDefinition:P,endpointName:y})&&(A=void 0)}let _=v.isSuccess?v.data:A?.data;_===void 0&&(_=v.data);const s=_!==void 0,i=v.isLoading,l=(!A||A.isLoading||A.isUninitialized)&&!s&&i,p=v.isSuccess||s&&(i&&!A?.isError||v.isUninitialized);return{...v,data:_,currentData:v.data,isFetching:i,isLoading:l,isSuccess:p}}function x(v,A,E){if(A?.endpointName&&v.isUninitialized){const{endpointName:y}=A,P=f[y];E!==ae&&m({queryArgs:A.originalArgs,endpointDefinition:P,endpointName:y})===m({queryArgs:E,endpointDefinition:P,endpointName:y})&&(A=void 0)}let _=v.isSuccess?v.data:A?.data;_===void 0&&(_=v.data);const s=_!==void 0,i=v.isLoading,l=(!A||A.isLoading||A.isUninitialized)&&!s&&i,p=v.isSuccess||i&&s;return{...v,data:_,currentData:v.data,isFetching:i,isLoading:l,isSuccess:p}}function R(v,A){const E=r(),_=it(A);return ve((s,i)=>E(e.util.prefetch(v,s,{..._,...i})),[v,E,_])}function T(v,A,{refetchOnReconnect:E,refetchOnFocus:_,refetchOnMountOrArgChange:s,skip:i=!1,pollingInterval:l=0,skipPollingIfUnfocused:p=!1,...y}={}){const{initiate:P}=e.endpoints[v],D=r(),N=he(void 0);if(!N.current){const O=D(e.internalActions.internal_getRTKQSubscriptions());N.current=O}const M=Ut(i?ae:A),L=it({refetchOnReconnect:E,refetchOnFocus:_,pollingInterval:l,skipPollingIfUnfocused:p}),F=y.initialPageParam,B=it(F),Q=he(void 0);let{queryCacheKey:G,requestId:U}=Q.current||{},q=!1;G&&U&&(q=N.current.isRequestSubscribed(G,U));const V=!q&&Q.current!==void 0;return c(()=>{V&&(Q.current=void 0)},[V]),c(()=>{const O=Q.current;if(typeof process<"u",M===ae){O?.unsubscribe(),Q.current=void 0;return}const K=Q.current?.subscriptionOptions;if(!O||O.arg!==M){O?.unsubscribe();const W=D(P(M,{subscriptionOptions:L,forceRefetch:s,...co(f[v])?{initialPageParam:B}:{}}));Q.current=W}else L!==K&&O.updateSubscriptionOptions(L)},[D,P,s,M,L,V,B,v]),[Q,D,P,L]}function g(v,A){return(_,{skip:s=!1,selectFromResult:i}={})=>{const{select:l}=e.endpoints[v],p=Ut(s?ae:_),y=he(void 0),P=Z(()=>d([l(p),(F,B)=>B,F=>p],A,{memoizeOptions:{resultEqualityCheck:We}}),[l,p]),D=Z(()=>i?d([P],i,{devModeChecks:{identityFunctionCheck:"never"}}):P,[P,i]),N=o(F=>D(F,y.current),We),M=a(),L=P(M.getState(),y.current);return ta(()=>{y.current=L},[L]),N}}function j(v){me(()=>()=>{b(v),v.current=void 0},[v])}function $(v){if(!v.current)throw new Error(Gi(38));return v.current.refetch()}function S(v){const A=(s,i={})=>{const[l]=T(v,s,i);return j(l),Z(()=>({refetch:()=>$(l)}),[l])},E=({refetchOnReconnect:s,refetchOnFocus:i,pollingInterval:l=0,skipPollingIfUnfocused:p=!1}={})=>{const{initiate:y}=e.endpoints[v],P=r(),[D,N]=lr(Ot),M=he(void 0),L=it({refetchOnReconnect:s,refetchOnFocus:i,pollingInterval:l,skipPollingIfUnfocused:p});c(()=>{const G=M.current?.subscriptionOptions;L!==G&&M.current?.updateSubscriptionOptions(L)},[L]);const F=he(L);c(()=>{F.current=L},[L]);const B=ve(function(G,U=!1){let q;return t(()=>{b(M),M.current=q=P(y(G,{subscriptionOptions:F.current,forceRefetch:!U})),N(G)}),q},[P,y]),Q=ve(()=>{M.current?.queryCacheKey&&P(e.internalActions.removeQueryResult({queryCacheKey:M.current?.queryCacheKey}))},[P]);return me(()=>()=>{b(M)},[]),me(()=>{D!==Ot&&!M.current&&B(D,!0)},[D,B]),Z(()=>[B,D,{reset:Q}],[B,D,Q])},_=g(v,C);return{useQueryState:_,useQuerySubscription:A,useLazyQuerySubscription:E,useLazyQuery(s){const[i,l,{reset:p}]=E(s),y=_(l,{...s,skip:l===Ot}),P=Z(()=>({lastArg:l}),[l]);return Z(()=>[i,{...y,reset:p},P],[i,y,p,P])},useQuery(s,i){const l=A(s,i),p=_(s,{selectFromResult:s===ae||i?.skip?void 0:dr,...i}),y=Bt(p,...Qt);return Ft(y),Z(()=>({...p,...l}),[p,l])}}}function w(v){const A=(_,s={})=>{const[i,l,p,y]=T(v,_,s),P=he(y);c(()=>{P.current=y},[y]);const D=ve(function(L,F){let B;return t(()=>{b(i),i.current=B=l(p(L,{subscriptionOptions:P.current,direction:F}))}),B},[i,l,p]);j(i);const N=Ut(s.skip?ae:_),M=ve(()=>$(i),[i]);return Z(()=>({trigger:D,refetch:M,fetchNextPage:()=>D(N,"forward"),fetchPreviousPage:()=>D(N,"backward")}),[M,D,N])},E=g(v,x);return{useInfiniteQueryState:E,useInfiniteQuerySubscription:A,useInfiniteQuery(_,s){const{refetch:i,fetchNextPage:l,fetchPreviousPage:p}=A(_,s),y=E(_,{selectFromResult:_===ae||s?.skip?void 0:dr,...s}),P=Bt(y,...Qt,"hasNextPage","hasPreviousPage");return Ft(P),Z(()=>({...y,fetchNextPage:l,fetchPreviousPage:p,refetch:i}),[y,l,p,i])}}}function h(v){return({selectFromResult:A,fixedCacheKey:E}={})=>{const{select:_,initiate:s}=e.endpoints[v],i=r(),[l,p]=lr();me(()=>()=>{l?.arg.fixedCacheKey||l?.reset()},[l]);const y=ve(function(G){const U=i(s(G,{fixedCacheKey:E}));return p(U),U},[i,s,E]),{requestId:P}=l||{},D=Z(()=>_({fixedCacheKey:E,requestId:l?.requestId}),[E,l,_]),N=Z(()=>A?d([D],A):D,[A,D]),M=o(N,We),L=E==null?l?.arg.originalArgs:void 0,F=ve(()=>{t(()=>{l&&p(void 0),E&&i(e.internalActions.removeMutationResult({requestId:P,fixedCacheKey:E}))})},[i,E,l,P]),B=Bt(M,...Qt,"endpointName");Ft(B);const Q=Z(()=>({...M,originalArgs:L,reset:F}),[M,L,F]);return Z(()=>[y,Q],[y,Q])}}}var ra=Symbol(),oa=({batch:e=Oi,hooks:t={useDispatch:Ui,useSelector:Bi,useStore:Qi},createSelector:r=Vo,unstable__sideEffectsInRender:o=!1,...a}={})=>({name:ra,init(u,{serializeQueryArgs:d},m){const k=u,{buildQueryHooks:c,buildInfiniteQueryHooks:b,buildMutationHook:f,usePrefetch:C}=na({api:u,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:o,createSelector:r},serializeQueryArgs:d,context:m});return Oe(k,{usePrefetch:C}),Oe(m,{batch:e}),{injectEndpoint(x,R){if(zi(R)){const{useQuery:T,useLazyQuery:g,useLazyQuerySubscription:j,useQueryState:$,useQuerySubscription:S}=c(x);Oe(k.endpoints[x],{useQuery:T,useLazyQuery:g,useLazyQuerySubscription:j,useQueryState:$,useQuerySubscription:S}),u[`use${ot(x)}Query`]=T,u[`useLazy${ot(x)}Query`]=g}if(Vi(R)){const T=f(x);Oe(k.endpoints[x],{useMutation:T}),u[`use${ot(x)}Mutation`]=T}else if(co(R)){const{useInfiniteQuery:T,useInfiniteQuerySubscription:g,useInfiniteQueryState:j}=b(x);Oe(k.endpoints[x],{useInfiniteQuery:T,useInfiniteQuerySubscription:g,useInfiniteQueryState:j}),u[`use${ot(x)}InfiniteQuery`]=T}}}}});await I("@reduxjs/toolkit");await I("react");var lo=ki(Fi(),oa());const ia="/auth",aa="pk_live_CE856A4938B36648",sa="https://notifications.decentraland.zone",ca="https://peer.decentraland.zone",la="f0S2L1sWumT8BPjBmIBDTN5gIWjhrRHG",da="https://events.decentraland.zone/api",ua="https://realm-provider-ea.decentraland.org/hot-scenes",pa="61570c542c2d66c659492e5b24a41522",fa="https://places.decentraland.zone/api",ga={AUTH_URL:ia,MAGIC_API_KEY:aa,NOTIFICATIONS_API_URL:sa,PEER_URL:ca,SEGMENT_API_KEY:la,EVENTS_API_URL:da,HOT_SCENES_URL:ua,WALLET_CONNECT_PROJECT_ID:pa,PLACES_API_URL:fa},ha="/auth",ma="pk_live_212568025B158355",ya="https://notifications.decentraland.org",ba="https://peer.decentraland.org",xa="f0S2L1sWumT8BPjBmIBDTN5gIWjhrRHG",va="https://events.decentraland.org/api",Ca="https://realm-provider-ea.decentraland.org/hot-scenes",wa="61570c542c2d66c659492e5b24a41522",_a="https://places.decentraland.org/api",Sa={AUTH_URL:ha,MAGIC_API_KEY:ma,NOTIFICATIONS_API_URL:ya,PEER_URL:ba,SEGMENT_API_KEY:xa,EVENTS_API_URL:va,HOT_SCENES_URL:Ca,WALLET_CONNECT_PROJECT_ID:wa,PLACES_API_URL:_a},ka="/auth",Aa="pk_live_CE856A4938B36648",Ea="https://notifications.decentraland.org",Ta="https://peer.decentraland.org",ja="f0S2L1sWumT8BPjBmIBDTN5gIWjhrRHG",Ia="https://events.decentraland.org/api",Ra="https://realm-provider-ea.decentraland.org/hot-scenes",Pa="61570c542c2d66c659492e5b24a41522",La="https://places.decentraland.org/api",$a={AUTH_URL:ka,MAGIC_API_KEY:Aa,NOTIFICATIONS_API_URL:Ea,PEER_URL:Ta,SEGMENT_API_KEY:ja,EVENTS_API_URL:Ia,HOT_SCENES_URL:Ra,WALLET_CONNECT_PROJECT_ID:Pa,PLACES_API_URL:La};var Ma={VITE_REACT_APP_WEBSITE_VERSION:"0.0.1-24533810684.commit-08f2d1e",VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/explore-site/0.0.1-24533810684.commit-08f2d1e",BASE_URL:"https://cdn.decentraland.org/@dcl/explore-site/0.0.1-24533810684.commit-08f2d1e",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Da=Go({[Dt.DEVELOPMENT]:ga,[Dt.STAGING]:$a,[Dt.PRODUCTION]:Sa},{systemEnvVariables:{REACT_APP_DCL_DEFAULT_ENV:Ma.VITE_REACT_APP_DCL_DEFAULT_ENV??"dev"}}),ce=e=>Da.get(e),uo=Zo.signedFetchFactory();function Na(e,t,r){return uo(e,{method:r,identity:t})}function ur(e,t){return t?uo(e,{method:"GET",identity:t}):fetch(e)}const Fa=5;function ze(e,t){return`${e},${t}`}function Oa(e,t){for(const[r,o]of t){const a=e.get(ze(r,o));if(a)return a}}function po(e){return e.toLowerCase().includes("genesis plaza")}function Ua(e){const t=e.find(o=>po(o.name)),r=t?ze(t.baseCoords[0],t.baseCoords[1]):"0,0";return{id:t?.id??"genesis-plaza",type:"place",title:t?.name??"Genesis Plaza",image:t?.thumbnail??"",users:t?.usersTotalCount??0,coordinates:r,creatorName:"Decentraland Foundation",isGenesisPlaza:!0}}function Ba(e,t,r=Fa){const o=t.filter(c=>c.usersTotalCount>=r),a=new Map(e.map(c=>[ze(c.x,c.y),c])),u=[],d=new Set,m=new Set;for(const c of o){const b=Oa(a,c.parcels);b&&!m.has(b.id)&&(u.push({id:b.id,type:"event",title:b.name,image:b.image||"",users:c.usersTotalCount,coordinates:ze(b.x,b.y),creatorAddress:b.user,creatorName:b.user_name||void 0,isGenesisPlaza:!1}),d.add(c.id),m.add(b.id))}u.sort((c,b)=>b.users-c.users);const k=o.filter(c=>!d.has(c.id)).sort((c,b)=>b.usersTotalCount-c.usersTotalCount);for(const c of k){const b=po(c.name);u.push({id:c.id,type:"place",title:c.name,image:c.thumbnail,users:c.usersTotalCount,coordinates:ze(c.baseCoords[0],c.baseCoords[1]),...b&&{creatorName:"Decentraland Foundation"},isGenesisPlaza:b})}return u.length===0&&u.push(Ua(t)),u}async function Qa(e,t){const{placesUrl:r,peerUrl:o}=t,a=e.filter(d=>d.type==="place");if(a.length===0)return e;const u=new Map;return await Promise.all(a.map(async d=>{const m={};if(r)try{const k=await fetch(`${r}/places?positions=${d.coordinates}`);if(k.ok){const b=(await k.json()).data?.[0];b&&(m.description=b.description||null,m.categories=b.categories||[])}}catch(k){console.warn("[LiveNow] places lookup failed for",d.coordinates,k)}if(o&&!d.creatorAddress)try{const k=await fetch(`${o}/content/entities/active`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pointers:[d.coordinates]})});if(k.ok){const b=(await k.json())[0]?.id;if(b){const f=await fetch(`${o}/content/deployments/?entityId=${encodeURIComponent(b)}`);if(f.ok){const x=(await f.json()).deployments?.[0]?.deployedBy;x&&(m.creatorAddress=x)}}}}catch(k){console.warn("[LiveNow] deployer lookup failed for",d.coordinates,k)}Object.keys(m).length>0&&u.set(d.id,m)})),u.size===0?e:e.map(d=>{const m=u.get(d.id);return m?{...d,...m}:d})}function pr(e){const t=new URLSearchParams;for(const[r,o]of Object.entries(e))o!==void 0&&t.set(r,String(o));return t.toString()}const gt=lo({reducerPath:"eventsClient",baseQuery:fi({baseUrl:"/"}),tagTypes:["Events","LiveNow"],keepUnusedDataFor:60,endpoints:e=>({getEvents:e.query({serializeQueryArgs:({queryArgs:{identity:t,...r}})=>({...r,authenticated:!!t}),queryFn:async t=>{try{const{identity:r,...o}=t,a=ce("EVENTS_API_URL"),u=pr(o),d=await ur(`${a}/events?${u}`,r);if(!d.ok)throw new Error(`Events API error: ${d.status}`);return{data:(await d.json()).data??[]}}catch(r){return{error:{status:"FETCH_ERROR",error:r instanceof Error?r.message:"Unknown error"}}}},providesTags:["Events"]}),getLiveNowCards:e.query({queryFn:async t=>{try{const r=ce("EVENTS_API_URL"),o=ce("HOT_SCENES_URL"),[a,u]=await Promise.all([fetch(`${r}/events?list=live&limit=20&order=asc&world=false`),fetch(o)]);if(!a.ok||!u.ok)throw new Error("Failed to fetch live events or hot scenes");const[d,m]=await Promise.all([a.json(),u.json()]),k=t&&"minUsers"in t?t.minUsers:void 0,c=Ba(d.data??[],m,k);return{data:await Qa(c,{placesUrl:ce("PLACES_API_URL"),peerUrl:ce("PEER_URL")})}}catch(r){return{error:{status:"FETCH_ERROR",error:r instanceof Error?r.message:"Unknown error"}}}},providesTags:["LiveNow"]}),getUpcomingEvents:e.query({serializeQueryArgs:({queryArgs:t})=>{if(t&&"identity"in t){const{identity:r,...o}=t;return{...o,authenticated:!!r}}return{authenticated:!1}},queryFn:async t=>{try{const r=t&&"identity"in t?t.identity:void 0,o=ce("EVENTS_API_URL"),a=new Date,u=new Date(a.getTime()+24*60*60*1e3),d=pr({list:"upcoming",limit:10,order:"asc",world:!1,from:a.toISOString(),to:u.toISOString()}),m=await ur(`${o}/events?${d}`,r);if(!m.ok)throw new Error(`Events API error: ${m.status}`);return{data:(await m.json()).data??[]}}catch(r){return{error:{status:"FETCH_ERROR",error:r instanceof Error?r.message:"Unknown error"}}}},providesTags:["Events"]}),toggleAttendee:e.mutation({queryFn:async({eventId:t,attending:r,identity:o})=>{try{const a=ce("EVENTS_API_URL"),u=r?"POST":"DELETE",d=encodeURIComponent(t),m=await Na(`${a}/events/${d}/attendees`,o,u);if(!m.ok)throw new Error(`Attendees API error: ${m.status}`);return{data:await m.json()}}catch(a){return{error:{status:"FETCH_ERROR",error:a instanceof Error?a.message:"Unknown error"}}}},invalidatesTags:["Events"]})})}),{useGetEventsQuery:qa,useGetLiveNowCardsQuery:fo,useGetUpcomingEventsQuery:Ha,useToggleAttendeeMutation:Wa}=gt;async function za(e){try{const t=ce("PEER_URL"),r=await fetch(`${t}/lambdas/profiles/${e.toLowerCase()}`);return r.ok?await r.json()??null:null}catch{return null}}const ht=lo({reducerPath:"profileClient",baseQuery:Ei(),tagTypes:["Profile"],keepUnusedDataFor:300,refetchOnFocus:!1,refetchOnReconnect:!1,endpoints:e=>({getProfile:e.query({queryFn:async t=>{if(!t)return{data:null};try{return{data:await za(t)}}catch{return{data:null}}},providesTags:(t,r,o)=>o?[{type:"Profile",id:o}]:[]})})}),{useGetProfileQuery:Pe}=ht,{combineReducers:Va,configureStore:Ga}=await I("@reduxjs/toolkit"),{networkReducer:Ya,transactionsReducer:Ka,walletReducer:Ja}=await I("@dcl/core-web3"),Xa=Va({network:Ya,transactions:Ka,wallet:Ja,[ht.reducerPath]:ht.reducer,[gt.reducerPath]:gt.reducer}),Za=Ga({reducer:Xa,middleware:e=>e().concat(ht.middleware,gt.middleware),devTools:!1});mi(Za.dispatch);const es={title:"Live Now"},ts={title:"Upcoming",starts_in_mins:"Starts in {count} mins",starts_in_hours:"Starts in {count} {count, plural, one {hour} other {hours}}",by_prefix:"By ",unknown_creator:"Unknown",remind_me:"Remind me",add_to_calendar:"Add to calendar",copy_link:"Copy link",copied:"Copied!"},ns={go_to_page:"Go to page {page}"},rs={close:"Close",jump_in:"Jump In",what_to_expect:"What to expect",schedule:"Schedule",remind_me:"Remind me",add_to_calendar:"Add to calendar",coming_soon:"Coming soon",copy_link:"Copy link",copied:"Copied!",by_prefix:"By ",unknown_creator:"Unknown",live_now:"Live Now",recurrent_weekly:"Repeats weekly",recurrent_daily:"Repeats daily",recurrent_monthly:"Repeats monthly"},os={title:"All Experiences",today:"Today",tomorrow:"Tomorrow",navigate_previous:"Navigate to previous dates",navigate_next:"Navigate to next dates",events_for_day:"Events for {day}",jump_in:"Jump In",add_to_calendar:"Add to calendar",remind_me:"Remind me",copy_link:"Copy link",copied:"Copied!",coming_soon:"Coming soon"},is={title:"Submit an Event",back:"Go back",sign_in_message:"To create an event you will need to sign in or create an account",sign_in:"Sign In",create_account:"Create Account",image_upload_label:"Upload event cover image",image_preview_alt:"Event cover preview",select_cover:"Select an Event Cover",choose_picture:"Choose a Picture",drop_hint:"from your gallery or drop it here",recommended_size:"(recommended size: 1340 × 670)",image_helper:"Upload a PNG, JPG, or GIF (1340×670px, max 500kb). Center visuals and text to fit all screen resolutions.",change_image:"Change Image",event_name:"Event Name",name_placeholder:"Be as descriptive as you can",event_description:"Event Description",description_placeholder:"Be as descriptive as you can",event_details:"Event Details",starts:"Starts",ends:"Ends",start_date:"Start date",start_time:"Start time",end_date:"End date",end_time:"End time",repeat_event:"Repeat Event",frequency:"Frequency",every_day:"Every Day",every_week:"Every Week",every_month:"Every Month",location:"Location",land:"Land",world:"World",coordinates:"Coordinates",coord_x:"X coordinate",coord_y:"Y coordinate",community:"Community",select_community:"Select community",community_tech:"Tech",community_art:"Art",community_music:"Music",community_gaming:"Gaming",email_label:"Email (Optional)",email_placeholder:"hello@example.com",additional_notes:"Additional Notes",notes_placeholder:"Be as descriptive as you can",cancel:"Cancel",submit:"Submit Event",submitting:"Submitting...",error_invalid_image_type:"Please upload a PNG, JPG, or GIF file.",error_image_too_large:"Image must be under 500kb."},as={title:"Want to Host Something?",subtitle:"Bring people together in minutes.",check_1:"Start something people can drop into.",check_2:"Shape the space to match your vibe.",check_3:"Go live and see who shows up.",create_event:"Create an Event",learn_more:"Learn More"},Pp={live_now:es,upcoming:ts,pagination:ns,event_detail:rs,all_experiences:os,create_event:is,host_banner:as},{useCallback:at,useMemo:ss,useState:fr}=await I("react"),{useTranslation:cs}=await I("@dcl/hooks"),ls=["image/png","image/jpeg","image/gif"],ds=500*1024,us={image:null,imagePreviewUrl:null,imageError:null,name:"",description:"",startDate:"",startTime:"",endDate:"",endTime:"",repeatEnabled:!1,frequency:"every_week",repeatEndDate:"",location:"land",coordX:"0",coordY:"0",community:"",email:"",notes:""};function ps(e){return ls.includes(e.type)?e.size>ds?"create_event.error_image_too_large":null:"create_event.error_invalid_image_type"}function fs(e){return e?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e):!0}function gs(){const{t:e}=cs(),[t,r]=fr(us),[o,a]=fr(!1),u=at((b,f)=>{r(C=>({...C,[b]:f}))},[]),d=at(b=>{const f=ps(b);if(f){r(x=>(x.imagePreviewUrl&&URL.revokeObjectURL(x.imagePreviewUrl),{...x,imageError:e(f),image:null,imagePreviewUrl:null}));return}const C=URL.createObjectURL(b);r(x=>(x.imagePreviewUrl&&URL.revokeObjectURL(x.imagePreviewUrl),{...x,image:b,imagePreviewUrl:C,imageError:null}))},[e]),m=at(()=>{r(b=>(b.imagePreviewUrl&&URL.revokeObjectURL(b.imagePreviewUrl),{...b,image:null,imagePreviewUrl:null,imageError:null}))},[]),k=ss(()=>{const b=t.name.trim()!==""&&t.description.trim()!==""&&t.startDate!==""&&t.startTime!==""&&t.endDate!==""&&t.endTime!==""&&t.location!==""&&t.coordX!==""&&t.coordY!=="",f=fs(t.email),C=t.imageError===null;return b&&f&&C},[t]),c=at(async()=>{if(!(!k||o)){a(!0);try{console.log("Submitting event:",t)}finally{a(!1)}}},[t,k,o]);return{form:t,setField:u,handleImageSelect:d,handleImageRemove:m,isFormValid:k,isSubmitting:o,handleSubmit:c}}const{Box:Tt,Typography:Je,styled:re}=await I("decentraland-ui2"),hs=re(Tt,{shouldForwardProp:e=>e!=="$hasImage"&&e!=="$hasError"})(({$hasImage:e,$hasError:t,theme:r})=>({position:"relative",border:e?"none":`2px dashed ${t?r.palette.error.main:"rgba(255, 255, 255, 0.23)"}`,borderRadius:12,minHeight:280,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:"pointer",overflow:"hidden",transition:"border-color 0.2s ease","&:hover":{borderColor:e?void 0:"rgba(255, 255, 255, 0.4)"}})),ms=re(Tt)({display:"flex",flexDirection:"column",alignItems:"center",gap:8,padding:24});re("svg")(({theme:e})=>({width:48,height:48,color:e.palette.text.disabled}));const ys=re(Je)(({theme:e})=>({fontSize:16,fontWeight:400,color:e.palette.text.primary})),bs=re("span")(({theme:e})=>({color:e.palette.primary.main,fontWeight:600,textDecoration:"underline",cursor:"pointer"})),xs=re(Je)(({theme:e})=>({fontSize:14,color:e.palette.text.secondary})),vs=re(Je)(({theme:e})=>({fontSize:12,color:e.palette.text.secondary})),Cs=re(Tt)(({theme:e})=>({display:"flex",alignItems:"flex-start",gap:4,marginTop:8,fontSize:12,letterSpacing:"0.4px",color:e.palette.text.secondary,lineHeight:1.66})),ws=re(Je)(({theme:e})=>({fontSize:12,color:e.palette.error.main,marginTop:4})),_s=re("img")({position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",borderRadius:12}),Ss=re(Tt)({position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0, 0, 0, 0.5)",opacity:0,transition:"opacity 0.2s ease",borderRadius:12,cursor:"pointer","&:hover":{opacity:1}}),ks=re(Je)(({theme:e})=>({fontSize:14,fontWeight:600,color:e.palette.common.white,textTransform:"uppercase"})),{useCallback:st,useRef:As}=await I("react"),{useTranslation:Es}=await I("@dcl/hooks");function Ts({imagePreviewUrl:e,imageError:t,onImageSelect:r,onImageRemove:o}){const{t:a}=Es(),u=As(null),d=st(()=>{u.current?.click()},[]),m=st(f=>{const C=f.target.files?.[0];C&&r(C),u.current&&(u.current.value="")},[r]),k=st(f=>{f.preventDefault(),f.stopPropagation()},[]),c=st(f=>{f.preventDefault(),f.stopPropagation();const C=f.dataTransfer.files[0];C&&r(C)},[r]),b=!!e;return n.jsxs("div",{children:[n.jsxs(hs,{$hasImage:b,$hasError:!!t,onClick:b?void 0:d,onDragOver:k,onDrop:c,role:"button",tabIndex:0,"aria-label":a("create_event.image_upload_label"),children:[e?n.jsxs(n.Fragment,{children:[n.jsx(_s,{src:e,alt:a("create_event.image_preview_alt")}),n.jsx(Ss,{onClick:o,children:n.jsx(ks,{children:a("create_event.change_image")})})]}):n.jsxs(ms,{children:[n.jsx("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z",fill:"rgba(240, 240, 240, 0.38)"})}),n.jsx(ys,{children:a("create_event.select_cover")}),n.jsxs(xs,{children:[n.jsx(bs,{onClick:d,children:a("create_event.choose_picture")})," ",a("create_event.drop_hint")]}),n.jsx(vs,{children:a("create_event.recommended_size")})]}),n.jsx("input",{ref:u,type:"file",accept:"image/png,image/jpeg,image/gif",onChange:m,style:{display:"none"},"aria-hidden":"true"})]}),n.jsxs(Cs,{children:[n.jsx("span",{children:"ⓘ"}),n.jsx("span",{children:a("create_event.image_helper")})]}),t&&n.jsx(ws,{children:t})]})}const{Box:js,styled:jt}=await I("decentraland-ui2"),Is=jt(js)({display:"flex",alignItems:"center",gap:8}),Rs=jt("button",{shouldForwardProp:e=>e!=="$checked"})(({$checked:e,theme:t})=>({position:"relative",width:36,height:20,borderRadius:10,border:"none",padding:0,cursor:"pointer",background:e?t.palette.primary.main:"rgba(255, 255, 255, 0.12)",transition:t.transitions.create("background-color",{duration:t.transitions.duration.standard}),"&:focus-visible":{outline:`2px solid ${t.palette.text.primary}`,outlineOffset:2}})),Ps=jt("span",{shouldForwardProp:e=>e!=="$checked"})(({$checked:e,theme:t})=>({position:"absolute",top:3,left:e?19:3,width:14,height:14,borderRadius:"50%",background:t.palette.common.white,transition:t.transitions.create("left",{duration:t.transitions.duration.standard})})),Ls=jt("span")(({theme:e})=>({fontSize:14,fontWeight:400,color:e.palette.text.primary}));function $s({label:e,checked:t,onChange:r}){return n.jsxs(Is,{children:[n.jsx(Ls,{children:e}),n.jsx(Rs,{$checked:t,onClick:()=>r(!t),role:"switch","aria-checked":t,"aria-label":e,children:n.jsx(Ps,{$checked:t})})]})}const{Box:te,Typography:Ms,styled:Y}=await I("decentraland-ui2"),Ds=Y(Ms)(({theme:e})=>({fontSize:"1.25rem",fontWeight:400,lineHeight:1.6,color:e.palette.text.primary,marginBottom:16})),ie=Y("label")(({theme:e})=>({display:"block",fontSize:12,fontWeight:400,color:e.palette.text.secondary,marginBottom:4})),qt=Y("input")(({theme:e})=>({width:"100%",height:48,background:"rgba(255, 255, 255, 0.06)",border:"1px solid rgba(255, 255, 255, 0.23)",borderRadius:6,padding:"12px 16px",fontSize:16,fontWeight:400,fontFamily:"Inter, Helvetica, Arial, sans-serif",color:e.palette.text.primary,outline:"none",boxSizing:"border-box",transition:e.transitions.create("border-color",{duration:e.transitions.duration.short}),"&::placeholder":{color:e.palette.text.disabled},"&:hover":{borderColor:e.palette.common.white},"&:focus":{borderColor:e.palette.primary.main}})),Ns=Y("textarea")(({theme:e})=>({width:"100%",minHeight:120,background:"rgba(255, 255, 255, 0.06)",border:"1px solid rgba(255, 255, 255, 0.23)",borderRadius:6,padding:"12px 16px",fontSize:16,fontWeight:400,fontFamily:"Inter, Helvetica, Arial, sans-serif",color:e.palette.text.primary,outline:"none",resize:"vertical",boxSizing:"border-box",transition:e.transitions.create("border-color",{duration:e.transitions.duration.short}),"&::placeholder":{color:e.palette.text.disabled},"&:hover":{borderColor:e.palette.common.white},"&:focus":{borderColor:e.palette.primary.main}})),gr=Y(te)(({theme:e})=>({display:"flex",gap:e.spacing(1),[e.breakpoints.down("sm")]:{flexDirection:"column"}})),ct=Y(te)({position:"relative",flex:1}),lt=Y("span")(({theme:e})=>({position:"absolute",left:12,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",color:e.palette.text.secondary,pointerEvents:"none",fontSize:20})),Ue=Y("input")(({theme:e})=>({width:"100%",height:48,background:"rgba(255, 255, 255, 0.06)",border:"1px solid rgba(255, 255, 255, 0.23)",borderRadius:6,padding:"8px 12px 8px 40px",fontSize:14,fontFamily:"Inter, Helvetica, Arial, sans-serif",color:e.palette.text.primary,outline:"none",boxSizing:"border-box",transition:e.transitions.create("border-color",{duration:e.transitions.duration.short}),"&:hover":{borderColor:e.palette.common.white},"&:focus":{borderColor:e.palette.primary.main},"&::-webkit-calendar-picker-indicator":{filter:"invert(1)",cursor:"pointer"}})),Ht=Y("select")(({theme:e})=>({width:"100%",height:48,background:"rgba(255, 255, 255, 0.06)",border:"1px solid rgba(255, 255, 255, 0.23)",borderRadius:6,padding:"8px 12px",fontSize:14,fontFamily:"Inter, Helvetica, Arial, sans-serif",color:e.palette.text.primary,outline:"none",appearance:"none",cursor:"pointer",boxSizing:"border-box",backgroundImage:`url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(240,240,240,0.7)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")`,backgroundRepeat:"no-repeat",backgroundPosition:"right 12px center",transition:e.transitions.create("border-color",{duration:e.transitions.duration.short}),"&:hover":{borderColor:e.palette.common.white},"&:focus":{borderColor:e.palette.primary.main},"& option":{background:"#1D1C20",color:e.palette.text.primary}})),Fs=Y(te)(({theme:e})=>({display:"flex",gap:e.spacing(2),[e.breakpoints.down("sm")]:{flexDirection:"column"}})),Os=Y(te)(({theme:e})=>({display:"flex",gap:e.spacing(1)})),hr=Y(te)({position:"relative",width:80}),mr=Y("span")(({theme:e})=>({position:"absolute",left:12,top:"50%",transform:"translateY(-50%)",fontSize:14,fontWeight:600,color:e.palette.text.secondary,pointerEvents:"none"})),yr=Y("input")(({theme:e})=>({width:"100%",height:48,background:"rgba(255, 255, 255, 0.06)",border:"1px solid rgba(255, 255, 255, 0.23)",borderRadius:6,padding:"8px 12px 8px 32px",fontSize:14,fontFamily:"Inter, Helvetica, Arial, sans-serif",color:e.palette.text.primary,outline:"none",boxSizing:"border-box",transition:e.transitions.create("border-color",{duration:e.transitions.duration.short}),"&:hover":{borderColor:e.palette.common.white},"&:focus":{borderColor:e.palette.primary.main}})),Us=Y(te,{shouldForwardProp:e=>e!=="$visible"})(({$visible:e,theme:t})=>({display:"flex",flexDirection:"column",gap:t.spacing(2),maxHeight:e?200:0,opacity:e?1:0,overflow:"hidden",transition:"max-height 0.3s ease, opacity 0.3s ease"})),ne=Y(te)({display:"flex",flexDirection:"column",gap:4}),Bs=Y(te)(({theme:e})=>({display:"flex",gap:e.spacing(2),[e.breakpoints.down("sm")]:{flexDirection:"column"}})),Qs=Y(te)(({theme:e})=>({width:"100%",maxWidth:1719,margin:"0 auto",padding:e.spacing(4,12.5,4,12.5),borderRadius:40,background:"rgba(0, 0, 0, 0.4)",display:"flex",flexDirection:"column",gap:e.spacing(8),[e.breakpoints.down("md")]:{padding:e.spacing(4,6,4,6),borderRadius:24},[e.breakpoints.down("sm")]:{padding:e.spacing(3,2,3,2),borderRadius:16}})),qs=Y(te)(({theme:e})=>({display:"flex",gap:e.spacing(4),[e.breakpoints.down("md")]:{flexDirection:"column"}})),Hs=Y(te)(({theme:e})=>({flex:1,display:"flex",flexDirection:"column",gap:e.spacing(3)})),Ws=Y(te)(({theme:e})=>({flex:1,display:"flex",flexDirection:"column",gap:e.spacing(3)})),zs=Y(te)(({theme:e})=>({display:"flex",justifyContent:"flex-end",gap:e.spacing(2),paddingTop:e.spacing(4)})),Vs=Y("button")(({theme:e})=>({background:"transparent",border:"1px solid rgba(255, 255, 255, 0.23)",borderRadius:6,color:e.palette.text.primary,fontFamily:"Inter, Helvetica, Arial, sans-serif",fontSize:"0.875rem",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.4px",padding:"6px 16px",minWidth:120,cursor:"pointer",transition:e.transitions.create("background-color",{duration:e.transitions.duration.standard}),"&:hover":{background:e.palette.action.hover},"&:focus-visible":{outline:`2px solid ${e.palette.text.primary}`,outlineOffset:2}})),Gs=Y("button")(({theme:e})=>({background:"linear-gradient(135deg, #FF2D55 0%, #FFBC5B 100%)",border:"none",borderRadius:6,color:e.palette.common.white,fontFamily:"Inter, Helvetica, Arial, sans-serif",fontSize:"0.875rem",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.4px",padding:"6px 16px",minWidth:140,cursor:"pointer",transition:e.transitions.create(["opacity","box-shadow"],{duration:e.transitions.duration.standard}),"&:hover":{opacity:.9,boxShadow:"0px 3px 1px -2px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 1px 5px 0px rgba(0,0,0,0.12)"},"&:disabled":{opacity:.5,pointerEvents:"none"},"&:focus-visible":{outline:`2px solid ${e.palette.text.primary}`,outlineOffset:2}})),{useTranslation:Ys}=await I("@dcl/hooks");function Ks({onCancel:e}){const{t}=Ys(),{form:r,setField:o,handleImageSelect:a,handleImageRemove:u,isFormValid:d,isSubmitting:m,handleSubmit:k}=gs();return n.jsxs(Qs,{children:[n.jsxs(qs,{children:[n.jsxs(Hs,{children:[n.jsx(Ts,{imagePreviewUrl:r.imagePreviewUrl,imageError:r.imageError,onImageSelect:a,onImageRemove:u}),n.jsxs(ne,{children:[n.jsx(ie,{htmlFor:"event-name",children:t("create_event.event_name")}),n.jsx(qt,{id:"event-name",placeholder:t("create_event.name_placeholder"),value:r.name,onChange:c=>o("name",c.target.value)})]}),n.jsxs(ne,{children:[n.jsx(ie,{htmlFor:"event-description",children:t("create_event.event_description")}),n.jsx(Ns,{id:"event-description",placeholder:t("create_event.description_placeholder"),value:r.description,onChange:c=>o("description",c.target.value)})]})]}),n.jsxs(Ws,{children:[n.jsx(Ds,{children:t("create_event.event_details")}),n.jsxs(ne,{children:[n.jsx(ie,{children:t("create_event.starts")}),n.jsxs(gr,{children:[n.jsxs(ct,{children:[n.jsx(lt,{children:"📅"}),n.jsx(Ue,{type:"date",value:r.startDate,onChange:c=>o("startDate",c.target.value),"aria-label":t("create_event.start_date")})]}),n.jsxs(ct,{children:[n.jsx(lt,{children:"🕐"}),n.jsx(Ue,{type:"time",value:r.startTime,onChange:c=>o("startTime",c.target.value),"aria-label":t("create_event.start_time")})]})]})]}),n.jsxs(ne,{children:[n.jsx(ie,{children:t("create_event.ends")}),n.jsxs(gr,{children:[n.jsxs(ct,{children:[n.jsx(lt,{children:"📅"}),n.jsx(Ue,{type:"date",value:r.endDate,onChange:c=>o("endDate",c.target.value),"aria-label":t("create_event.end_date")})]}),n.jsxs(ct,{children:[n.jsx(lt,{children:"🕐"}),n.jsx(Ue,{type:"time",value:r.endTime,onChange:c=>o("endTime",c.target.value),"aria-label":t("create_event.end_time")})]})]})]}),n.jsx($s,{label:t("create_event.repeat_event"),checked:r.repeatEnabled,onChange:c=>o("repeatEnabled",c)}),n.jsxs(Us,{$visible:r.repeatEnabled,children:[n.jsxs(ne,{children:[n.jsx(ie,{htmlFor:"frequency",children:t("create_event.frequency")}),n.jsxs(Ht,{id:"frequency",value:r.frequency,onChange:c=>o("frequency",c.target.value),children:[n.jsx("option",{value:"every_day",children:t("create_event.every_day")}),n.jsx("option",{value:"every_week",children:t("create_event.every_week")}),n.jsx("option",{value:"every_month",children:t("create_event.every_month")})]})]}),n.jsxs(ne,{children:[n.jsx(ie,{htmlFor:"repeat-end",children:t("create_event.ends")}),n.jsx(Ue,{id:"repeat-end",type:"date",value:r.repeatEndDate,onChange:c=>o("repeatEndDate",c.target.value)})]})]}),n.jsx(ne,{children:n.jsxs(Fs,{children:[n.jsxs(ne,{style:{flex:1},children:[n.jsx(ie,{htmlFor:"location",children:t("create_event.location")}),n.jsxs(Ht,{id:"location",value:r.location,onChange:c=>o("location",c.target.value),children:[n.jsx("option",{value:"land",children:t("create_event.land")}),n.jsx("option",{value:"world",children:t("create_event.world")})]})]}),n.jsxs(ne,{children:[n.jsx(ie,{children:t("create_event.coordinates")}),n.jsxs(Os,{children:[n.jsxs(hr,{children:[n.jsx(mr,{children:"X"}),n.jsx(yr,{value:r.coordX,onChange:c=>o("coordX",c.target.value),"aria-label":t("create_event.coord_x")})]}),n.jsxs(hr,{children:[n.jsx(mr,{children:"Y"}),n.jsx(yr,{value:r.coordY,onChange:c=>o("coordY",c.target.value),"aria-label":t("create_event.coord_y")})]})]})]})]})}),n.jsxs(ne,{children:[n.jsx(ie,{htmlFor:"community",children:t("create_event.community")}),n.jsxs(Ht,{id:"community",value:r.community,onChange:c=>o("community",c.target.value),children:[n.jsx("option",{value:"",children:t("create_event.select_community")}),n.jsx("option",{value:"tech",children:t("create_event.community_tech")}),n.jsx("option",{value:"art",children:t("create_event.community_art")}),n.jsx("option",{value:"music",children:t("create_event.community_music")}),n.jsx("option",{value:"gaming",children:t("create_event.community_gaming")})]})]}),n.jsxs(Bs,{children:[n.jsxs(ne,{style:{flex:1},children:[n.jsx(ie,{htmlFor:"email",children:t("create_event.email_label")}),n.jsx(qt,{id:"email",type:"email",placeholder:t("create_event.email_placeholder"),value:r.email,onChange:c=>o("email",c.target.value)})]}),n.jsxs(ne,{style:{flex:1},children:[n.jsx(ie,{htmlFor:"notes",children:t("create_event.additional_notes")}),n.jsx(qt,{id:"notes",placeholder:t("create_event.notes_placeholder"),value:r.notes,onChange:c=>o("notes",c.target.value)})]})]})]})]}),n.jsxs(zs,{children:[n.jsx(Vs,{type:"button",onClick:e,children:t("create_event.cancel")}),n.jsx(Gs,{type:"button",disabled:!d||m,onClick:k,children:t(m?"create_event.submitting":"create_event.submit")})]})]})}const{clearWagmiState:Js}=await I("@dcl/core-web3");function Xs(){const e=ce("AUTH_URL")??"/auth";return e.startsWith("http")||window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"?e:`${window.location.origin}${e.startsWith("/")?"":"/"}${e}`}function Zs(e){return e.startsWith("/")&&!e.startsWith("//")}function ec(){const e=window.location.pathname,t=window.location.search,o=new URLSearchParams(t).get("redirectTo");return o&&Zs(o)?o:`${e}${t}`}function mt(e){const t=e??ec(),r=Xs();Js(),window.location.replace(`${r}/login?redirectTo=${encodeURIComponent(t)}`)}const{Box:go,Typography:tc,styled:Xe}=await I("decentraland-ui2"),nc=Xe(go)({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:24,minHeight:"50vh",textAlign:"center"}),rc=Xe(tc)(({theme:e})=>({fontSize:16,fontWeight:400,lineHeight:1.5,color:e.palette.text.primary,maxWidth:400})),oc=Xe(go)({display:"flex",alignItems:"center",gap:16}),ic=Xe("button")(({theme:e})=>({background:e.palette.primary.main,border:"none",borderRadius:6,color:e.palette.common.white,fontFamily:"Inter, Helvetica, Arial, sans-serif",fontSize:"0.875rem",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.4px",padding:"6px 16px",cursor:"pointer",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{background:e.palette.primary.dark},"&:focus-visible":{outline:`2px solid ${e.palette.text.primary}`,outlineOffset:2}})),ac=Xe("button")(({theme:e})=>({background:"transparent",border:"1px solid rgba(255, 45, 85, 0.5)",borderRadius:6,color:e.palette.common.white,fontFamily:"Inter, Helvetica, Arial, sans-serif",fontSize:"0.875rem",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.4px",padding:"6px 16px",cursor:"pointer",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{background:"rgba(255, 45, 85, 0.08)"},"&:focus-visible":{outline:`2px solid ${e.palette.text.primary}`,outlineOffset:2}})),{useCallback:br}=await I("react"),{useTranslation:sc}=await I("@dcl/hooks"),{Logo:cc}=await I("decentraland-ui2");function lc(){const{t:e}=sc(),t=br(()=>{mt()},[]),r=br(()=>{mt("/auth/signup")},[]);return n.jsxs(nc,{children:[n.jsx(cc,{size:"huge"}),n.jsx(rc,{children:e("create_event.sign_in_message")}),n.jsxs(oc,{children:[n.jsx(ic,{onClick:t,children:e("create_event.sign_in")}),n.jsx(ac,{onClick:r,children:e("create_event.create_account")})]})]})}const{useCallback:Wt,useEffect:dc,useMemo:uc,useState:pc}=await I("react"),{useNotifications:fc}=await I("@dcl/hooks"),{NotificationActiveTab:gc}=await I("decentraland-ui2");function hc(e){const{identity:t,isConnected:r,locale:o="en"}=e,a=!!(t&&r),[u,d]=pc(!0),m=ce("NOTIFICATIONS_API_URL")??"https://notifications.decentraland.org";dc(()=>{a||d(!0)},[a]);const k=Wt(()=>{a&&d(w=>w&&!1)},[a]),{notifications:c,isLoading:b,isModalOpen:f,isNotificationsOnboarding:C,modalActiveTab:x,handleNotificationsOpen:R,handleOnBegin:T,handleOnChangeModalTab:g}=fc({identity:t??void 0,isNotificationsEnabled:a&&u,initialActiveTab:gc.NEWEST,notificationsUrl:m,onError:k}),j=Wt(()=>{u||d(!0),R()},[R,u]),$=Wt((w,h)=>{g(h)},[g]);return{notificationProps:uc(()=>{if(a)return{locale:o,isLoading:b,isOnboarding:C,isOpen:f,items:c,activeTab:x,onClick:j,onClose:j,onBegin:T,onChangeTab:$}},[a,o,b,C,f,c,x,j,T,$])}}const{createContext:mc}=await I("react"),yc={identity:void 0,hasValidIdentity:!1,address:void 0},bc=mc(yc),{useContext:xc}=await I("react");function Le(){return xc(bc)}const{Box:ho,styled:mo}=await I("decentraland-ui2"),vc=mo(ho)(()=>({minHeight:"100vh",display:"flex",flexDirection:"column",background:"linear-gradient(180deg, #1A0A2E 0%, #0D0116 100%)"})),Cc=mo(ho)({flex:1,width:"100%"}),{useCallback:xr,useMemo:wc}=await I("react"),{useLocation:_c}=await I("react-router-dom"),{useWalletState:Sc}=await I("@dcl/core-web3/lazy"),{usePageTracking:kc}=await I("@dcl/hooks"),{Footer:Ac,FooterLanding:Ec,Navbar:Tc,SupportedLanguage:jc}=await I("decentraland-ui2");function yo(e){const{children:t}=e,r=_c(),{address:o,isConnected:a,isConnecting:u,isDisconnecting:d,disconnect:m}=Sc();kc(r.pathname);const{identity:k}=Le(),{notificationProps:c}=hc({identity:k,isConnected:a,locale:"en"}),{data:b}=Pe(o??void 0,{skip:!o}),f=b?.avatars?.[0],C=xr(()=>{mt()},[]),x=xr(()=>{m()},[m]),R=wc(()=>({isSignedIn:a,isSigningIn:u,isDisconnecting:d,isActivity:!1,address:o||void 0,avatar:f,notifications:c,onClickSignIn:C,onClickSignOut:x,onClickNavbarItem:T=>{const g=T.currentTarget;g?.href&&(window.location.href=g.href)}}),[a,u,d,o,f,c,C,x]);return n.jsxs(vc,{children:[n.jsx(Tc,{...R}),n.jsx(Cc,{children:t}),n.jsx(Ec,{}),n.jsx(Ac,{languages:[{code:jc.EN,name:"English",flag:"🇺🇸"}],hideSocialNetworks:!0})]})}var yn={},Ic=_e;Object.defineProperty(yn,"__esModule",{value:!0});var bn=yn.default=void 0,Rc=Ic(we()),Pc=n;bn=yn.default=(0,Rc.default)((0,Pc.jsx)("path",{d:"M17.77 3.77 16 2 6 12l10 10 1.77-1.77L9.54 12z"}),"ArrowBackIosNew");const{Box:xn,Typography:Lc,styled:$e}=await I("decentraland-ui2"),$c=$e(xn)({position:"fixed",inset:0,zIndex:-1,background:"radial-gradient(ellipse at 50% 30%, #5B2D8E 0%, #2A1145 40%, #161518 100%)","&::after":{content:'""',position:"absolute",inset:0,background:"radial-gradient(ellipse at 50% 80%, rgba(105, 31, 169, 0.3) 0%, transparent 60%)"}}),Mc=$e(xn)(({theme:e})=>({position:"relative",minHeight:"100vh",padding:e.spacing(5,8,5,8),paddingTop:"calc(66px + 40px)",[e.breakpoints.down("lg")]:{padding:e.spacing(5,4,5,4),paddingTop:"calc(66px + 40px)"},[e.breakpoints.down("md")]:{padding:e.spacing(5,3,5,3),paddingTop:"calc(66px + 32px)"},[e.breakpoints.down("sm")]:{padding:e.spacing(3,2,3,2),paddingTop:"calc(66px + 24px)"}})),Dc=$e(xn)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),marginBottom:e.spacing(3)})),Nc=$e("button")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",padding:0,cursor:"pointer",color:e.palette.text.primary,"&:focus-visible":{outline:`2px solid ${e.palette.text.primary}`,outlineOffset:2}})),Fc=$e(bn)({fontSize:24}),Oc=$e(Lc)(({theme:e})=>({fontSize:"1.5rem",fontWeight:500,lineHeight:1.334,color:e.palette.text.primary})),{useCallback:Uc}=await I("react"),{useNavigate:Bc}=await I("react-router-dom"),{useWalletState:Qc}=await I("@dcl/core-web3/lazy"),{useTranslation:qc}=await I("@dcl/hooks");function Lp(){const{t:e}=qc(),t=Bc(),{isConnected:r}=Qc(),o=Uc(()=>{t("/")},[t]);return n.jsxs(yo,{children:[n.jsx($c,{}),n.jsxs(Mc,{children:[n.jsxs(Dc,{children:[n.jsx(Nc,{onClick:o,"aria-label":e("create_event.back"),children:n.jsx(Fc,{})}),n.jsx(Oc,{children:e("create_event.title")})]}),r?n.jsx(Ks,{onCancel:o}):n.jsx(lc,{})]})]})}const{useEffect:Hc,useState:Wc}=await I("react"),zc=5,bo=[{query:"(min-width: 1536px)",columns:zc},{query:"(min-width: 1200px)",columns:4},{query:"(min-width: 900px)",columns:3},{query:"(min-width: 600px)",columns:2}];function vr(){for(const{query:e,columns:t}of bo)if(window.matchMedia(e).matches)return t;return 1}function Vc(){const[e,t]=Wc(vr);return Hc(()=>{const r=bo.map(({query:a})=>window.matchMedia(a)),o=()=>{t(vr())};for(const a of r)a.addEventListener("change",o);return()=>{for(const a of r)a.removeEventListener("change",o)}},[]),e}function xo(e,t){if(t<1)return[];const r=[];for(let o=0;o<e.length;o+=t)r.push(e.slice(o,o+t));return r}function vn(e,t){const r=new Date(e);return r.setDate(r.getDate()+t),r}function Gc(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function Yc(e){const t=new Date(e);return t.setHours(23,59,59,999),t}function Cr(e){return{from:Gc(e).toISOString(),to:Yc(e).toISOString()}}function sn(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Kc(e,t,r=new Date){if(sn(e,r))return t("all_experiences.today");const o=vn(r,1);if(sn(e,o))return t("all_experiences.tomorrow");const a=e.toLocaleDateString(void 0,{weekday:"short"}),u=e.toLocaleDateString(void 0,{month:"short"}),d=e.getDate();return`${a}, ${u} ${d}`}function vo(e){return e.toLocaleDateString(void 0,{weekday:"long",month:"long",day:"numeric",year:"numeric"})}var Cn={},Jc=_e;Object.defineProperty(Cn,"__esModule",{value:!0});var Co=Cn.default=void 0,Xc=Jc(we()),Zc=n;Co=Cn.default=(0,Xc.default)((0,Zc.jsx)("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday");function el(e,t){return`https://decentraland.org/jump?position=${e},${t}`}function wn(e,t){return`https://decentraland.org/jump/event?position=${e},${t}`}function tl(e){const[t,r]=e.split(",").map(Number);return Number.isNaN(t)||Number.isNaN(r)?[0,0]:[t,r]}function _n(e){if(!e.startAt)return null;const t=u=>new Date(u).toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),r=t(e.startAt),o=e.finishAt?t(e.finishAt):r;return`https://calendar.google.com/calendar/render?${new URLSearchParams({action:"TEMPLATE",text:e.name,dates:`${r}/${o}`,details:`${e.description||""}
|
|
2
|
+
|
|
3
|
+
${e.url}`,location:`Decentraland ${e.x},${e.y}`}).toString()}`}var Sn={},nl=_e;Object.defineProperty(Sn,"__esModule",{value:!0});var wo=Sn.default=void 0,rl=nl(we()),ol=n;wo=Sn.default=(0,rl.default)((0,ol.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");const{Box:pe,Dialog:il,Typography:Se,styled:z}=await I("decentraland-ui2"),zt=64,al=z(il)(({theme:e})=>({"& .MuiBackdrop-root":{backgroundColor:"rgba(0, 0, 0, 0.8)"},"& .MuiDialog-paper":{borderRadius:e.spacing(2),maxWidth:880,width:"100%",maxHeight:"80vh",margin:0,overflowY:"auto",overflowX:"hidden",backgroundColor:"transparent",boxShadow:"0px 4px 25px 0px #FFFFFF40",display:"flex",flexDirection:"column",scrollbarWidth:"none"},"& .MuiDialog-paper::-webkit-scrollbar":{display:"none"},[e.breakpoints.down("sm")]:{"& .MuiDialog-paper":{borderRadius:0,maxWidth:"100%",maxHeight:`calc(100% - ${zt}px)`,height:`calc(100% - ${zt}px)`,margin:0,marginTop:zt,backgroundColor:"#1A0A2E"}}})),sl=z(pe)(({theme:e})=>({position:"relative",width:880,height:450,maxWidth:"100%",overflow:"hidden",flexShrink:0,[e.breakpoints.down("sm")]:{width:"100%",height:"auto"}})),cl=z("img")(({theme:e})=>({position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover",[e.breakpoints.down("sm")]:{position:"relative",aspectRatio:"16 / 9",height:"auto"}})),ll=z(pe)(({theme:e})=>({position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"linear-gradient(0deg, #000000 0%, rgba(0, 0, 0, 0.8) 30.02%, rgba(0, 0, 0, 0) 106.22%)",[e.breakpoints.down("sm")]:{display:"none"}})),dl=z("button")(({theme:e})=>({position:"absolute",top:e.spacing(1.5),right:e.spacing(1.5),width:40,height:40,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0, 0, 0, 0.4)",border:"none",borderRadius:"50%",cursor:"pointer",zIndex:2,padding:0,"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.6)"},"&:focus-visible":{outline:"2px solid #FCFCFC",outlineOffset:2},[e.breakpoints.down("sm")]:{top:e.spacing(1),left:e.spacing(1),right:"auto"}})),ul=z(wo)({fontSize:20,color:"#FCFCFC"}),pl=z(pe)(({theme:e})=>({position:"absolute",bottom:0,left:0,right:0,padding:e.spacing(0,3.75,6.25,3.75),zIndex:1,display:"flex",flexDirection:"column",gap:e.spacing(1),[e.breakpoints.down("sm")]:{position:"relative",padding:e.spacing(2),background:"linear-gradient(180deg, #1A0A2E 0%, #32134C 100%)"}})),fl=z(Se)({fontSize:14,fontWeight:600,color:"#FCFCFC",textTransform:"uppercase",letterSpacing:"0.04em"}),gl=z(Se)({fontSize:32,fontWeight:600,lineHeight:1.24,color:"#FCFCFC",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"}),hl=z(pe)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1)})),ml=z("img")(({theme:e})=>({width:e.spacing(3),height:e.spacing(3),borderRadius:"50%",border:"1.5px solid rgba(255, 255, 255, 0.5)",flexShrink:0,objectFit:"cover"})),yl=z(pe)(({theme:e})=>({width:e.spacing(3),height:e.spacing(3),borderRadius:"50%",backgroundColor:"#00B453",border:"1.5px solid rgba(255, 255, 255, 0.5)",flexShrink:0})),bl=z(Se)({fontSize:14,lineHeight:1,color:"#FCFCFC",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),xl=z("span")({color:"#FF2D55"}),vl=z(pe)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1)})),Cl=z("button")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(1),backgroundColor:"#FCFCFC",color:"#161518",border:"none",borderRadius:e.spacing(1),padding:e.spacing(1,2.5),fontSize:14,fontWeight:600,cursor:"pointer",whiteSpace:"nowrap",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:"#E0E0E0"},"&:focus-visible":{outline:"2px solid #FCFCFC",outlineOffset:2}})),wr=z("button")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(1),backgroundColor:"transparent",color:"#FCFCFC",border:"1px solid #FCFCFC",borderRadius:e.spacing(1),padding:e.spacing(1,2),fontSize:14,fontWeight:600,cursor:"pointer",whiteSpace:"nowrap",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:disabled":{opacity:.5,cursor:"default"},"&:hover:not(:disabled)":{backgroundColor:"rgba(255, 255, 255, 0.2)"},"&:focus-visible":{outline:"2px solid #FCFCFC",outlineOffset:2}})),wl=z("button")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",border:"1px solid #FCFCFC",borderRadius:e.spacing(1),padding:e.spacing(1,2),flexShrink:0,cursor:"pointer",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:"rgba(255, 255, 255, 0.2)"},"&:focus-visible":{outline:"2px solid #FCFCFC",outlineOffset:2}})),_l=z(Vr)({fontSize:18,color:"#FCFCFC"}),Sl=z(pe)(({theme:e})=>({background:"radial-gradient(47.37% 84.21% at 42.4% 26.48%, #6E31A7 0%, #32134C 100%)",padding:e.spacing(3.75,6.25),flex:1,[e.breakpoints.down("sm")]:{padding:e.spacing(3,2)}})),_r=z(Se)(({theme:e})=>({fontSize:14,fontWeight:600,lineHeight:1.75,textTransform:"uppercase",color:"#A09BA8",marginBottom:e.spacing(1)})),kl=z(Se)({fontSize:14,lineHeight:1.6,color:"#FCFCFC"}),Al=z(pe)(({theme:e})=>({height:1,backgroundColor:"rgba(255, 255, 255, 0.15)",margin:e.spacing(2,0)})),El=z(pe)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(1.5)})),Tl=z("button")({display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",padding:0,cursor:"pointer",color:"#A09BA8",flexShrink:0,"&:hover":{color:"#FCFCFC"},"&:focus-visible":{outline:"2px solid #FCFCFC",outlineOffset:2},"& .MuiSvgIcon-root":{fontSize:20}}),jl=z(Se)({fontSize:14,lineHeight:1.5,color:"#FCFCFC"}),Il=z(Se)(({theme:e})=>({fontSize:12,color:"#A09BA8",marginTop:e.spacing(.5)})),{useCallback:Rl}=await I("react"),{useTranslation:Pl}=await I("@dcl/hooks");function Ll(e){return new Date(e).toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"})}function Sr(e){return new Date(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit",hour12:!0})}function $l(e,t){switch(e){case"DAILY":return t("event_detail.recurrent_daily");case"WEEKLY":return t("event_detail.recurrent_weekly");case"MONTHLY":return t("event_detail.recurrent_monthly");default:return null}}function Ml({data:e}){const{t}=Pl(),r=!!e.description,o=!!e.startAt,a=Rl(()=>{const d=_n(e);d&&window.open(d,"_blank","noopener,noreferrer")},[e]);if(!r&&!o)return null;const u=e.recurrent?$l(e.recurrentFrequency,t):null;return n.jsxs(Sl,{children:[r&&n.jsxs(n.Fragment,{children:[n.jsx(_r,{children:t("event_detail.what_to_expect")}),n.jsx(kl,{children:e.description})]}),r&&o&&n.jsx(Al,{}),o&&e.startAt&&n.jsxs(n.Fragment,{children:[n.jsx(_r,{children:t("event_detail.schedule")}),n.jsxs(El,{children:[n.jsxs("div",{children:[n.jsxs(jl,{children:[Ll(e.startAt)," · ",Sr(e.startAt),e.finishAt&&` – ${Sr(e.finishAt)}`]}),u&&n.jsx(Il,{children:u})]}),n.jsx(Tl,{onClick:a,"aria-label":t("event_detail.add_to_calendar"),children:n.jsx(Co,{})})]})]})]})}var kn={},Dl=_e;Object.defineProperty(kn,"__esModule",{value:!0});var An=kn.default=void 0,Nl=Dl(we()),Fl=n;An=kn.default=(0,Nl.default)((0,Fl.jsx)("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zM9 14H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2zm-8 4H7v-2h2zm4 0h-2v-2h2zm4 0h-2v-2h2z"}),"CalendarMonth");const{useCallback:Ol,useEffect:kr,useRef:Ul,useState:Ar}=await I("react");function En(e,t){const{identity:r,hasValidIdentity:o}=Le(),[a,{isLoading:u}]=Wa({fixedCacheKey:`remind-${e}`}),[d,m]=Ar(!1),[k,c]=Ar(null),b=Ul(),f=!!t,C=k!==null?k:f;kr(()=>{k!==null&&k===f&&c(null)},[k,f]),kr(()=>()=>clearTimeout(b.current),[]);const x=Ol(R=>{if(R.stopPropagation(),u)return;if(!o||!r){mt();return}const T=!C;c(T),m(!0),clearTimeout(b.current),b.current=setTimeout(()=>m(!1),600),a({eventId:e,attending:T,identity:r}).unwrap().catch(()=>c(null))},[e,C,o,r,u,a]);return{isReminded:C,isLoading:u,isShaking:d,handleToggle:x}}const{styled:Tn}=await I("decentraland-ui2"),Bl="M5.4167 9.44547C5.44685 7.63928 6.21335 5.91687 7.55087 4.64979C8.88839 3.38271 10.6897 2.6725 12.5663 2.67236C14.4429 2.67223 16.2444 3.38217 17.5821 4.64907C18.9198 5.91596 19.6866 7.63825 19.717 9.44444L19.7173 12.2663L21.4284 15.9735C21.4888 16.1045 21.5143 16.2479 21.5025 16.3907C21.4907 16.5335 21.4421 16.6712 21.361 16.7914C21.2799 16.9115 21.169 17.0103 21.0382 17.0787C20.9074 17.1471 20.7609 17.183 20.6121 17.1831L15.3891 17.1835L15.3919 17.1891L9.73956 17.1894L9.74313 17.1835L4.52097 17.1824C4.37215 17.1824 4.2257 17.1465 4.0949 17.0782C3.96411 17.0099 3.85311 16.9112 3.77197 16.7911C3.69084 16.671 3.64213 16.5333 3.63028 16.3905C3.61843 16.2477 3.6438 16.1043 3.7041 15.9733L5.41606 12.2689L5.41581 9.44696L5.4167 9.44547ZM7.20443 9.44545L7.20361 12.4516C7.20351 12.5717 7.17727 12.6905 7.1266 12.8002L5.89689 15.4632L19.2368 15.4629L18.006 12.7997C17.9557 12.69 17.9298 12.5713 17.93 12.4514L17.9284 9.44595C17.9026 8.09324 17.3262 6.80431 16.3233 5.85649C15.3203 4.90867 13.971 4.37771 12.5655 4.37784C11.16 4.37797 9.81067 4.90918 8.80791 5.85719C7.80515 6.80519 7.22904 8.09422 7.20354 9.44694L7.20443 9.44545Z",Ql="M9.48535 18.7616C9.59625 19.475 9.96951 20.1265 10.5372 20.5974C11.1049 21.0683 11.8294 21.3274 12.5788 21.3275C13.3282 21.3277 14.0528 21.0689 14.6207 20.5982C15.1886 20.1276 15.5622 19.4763 15.6734 18.7629L9.48535 18.7616Z",ql="M15.6737 18.7625C15.5625 19.4758 15.1888 20.1277 14.621 20.5984C14.0531 21.069 13.3282 21.328 12.579 21.3279C11.8296 21.3277 11.1047 21.0683 10.537 20.5974C9.96927 20.1265 9.59613 19.4749 9.48522 18.7615L15.6737 18.7625ZM12.5663 2.67261C14.4428 2.67251 16.2442 3.38232 17.5819 4.64917C17.9225 4.97176 18.2253 5.32444 18.4891 5.69995L16.4413 7.74976L16.1805 7.48901C15.0869 6.3954 13.3142 6.39538 12.2206 7.48901C11.1271 8.58265 11.127 10.3554 12.2206 11.449L14.4608 13.6892C14.9859 14.2141 15.6988 14.5095 16.4413 14.5095C17.1837 14.5093 17.8958 14.2142 18.4208 13.6892L19.7567 12.3523L21.4286 15.9734C21.4889 16.1042 21.5135 16.2477 21.5018 16.3904C21.4901 16.5332 21.4423 16.6716 21.3612 16.7917C21.2801 16.9119 21.1687 17.0105 21.038 17.0789C20.9073 17.1472 20.7609 17.1832 20.6122 17.1833H15.3885L15.3915 17.1892H9.73913L9.74304 17.1833L4.52038 17.1824C4.37169 17.1823 4.22528 17.1462 4.0946 17.0779C3.96389 17.0095 3.85245 16.9108 3.77136 16.7908C3.69038 16.6708 3.64159 16.533 3.62975 16.3904C3.61793 16.2476 3.6437 16.1043 3.70397 15.9734L5.41589 12.2693V9.44702L5.41686 9.44507C5.44712 7.63911 6.21335 5.91712 7.55065 4.65015C8.88817 3.38306 10.6897 2.67274 12.5663 2.67261Z",Hl="M20.0042 6.3392C20.4417 5.90174 21.1508 5.90174 21.5882 6.3392C22.0257 6.77666 22.0257 7.48574 21.5882 7.9232L17.1075 12.4039C16.8974 12.614 16.6126 12.7321 16.3155 12.7321C16.0184 12.7321 15.7336 12.614 15.5235 12.4039L13.2832 10.1635C12.8457 9.72609 12.8457 9.01701 13.2832 8.57955C13.7206 8.14209 14.4297 8.14209 14.8672 8.57955L16.3155 10.0279L20.0042 6.3392Z",Wl=Tn("span")({position:"relative",display:"inline-flex",flexShrink:0,transformOrigin:"top center","@keyframes bellShake":{"0%":{transform:"rotate(0)"},"15%":{transform:"rotate(14deg)"},"30%":{transform:"rotate(-14deg)"},"45%":{transform:"rotate(10deg)"},"60%":{transform:"rotate(-8deg)"},"75%":{transform:"rotate(4deg)"},"85%":{transform:"rotate(-2deg)"},"100%":{transform:"rotate(0)"}},"&.shake":{animation:"bellShake 0.6s ease-in-out"}}),Er=Tn("svg")({position:"absolute",inset:0,transition:"opacity 0.3s ease"}),zl=Tn("path")({transformOrigin:"17px 9px",transition:"opacity 0.25s ease 0.15s, transform 0.25s ease 0.15s","&.hidden":{opacity:0,transform:"scale(0)",transition:"opacity 0.15s ease, transform 0.15s ease"}});function yt({active:e,shaking:t,className:r,size:o=18}){const a=[r,t?"shake":""].filter(Boolean).join(" ")||void 0;return n.jsxs(Wl,{className:a,style:{width:o,height:o},children:[n.jsxs(Er,{viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{opacity:e?0:1},children:[n.jsx("path",{d:Bl,fill:"currentColor"}),n.jsx("path",{d:Ql,fill:"currentColor"})]}),n.jsxs(Er,{viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",style:{opacity:e?1:0},children:[n.jsx("path",{d:ql,fill:"#FF2D55"}),n.jsx(zl,{className:e?"":"hidden",d:Hl,fill:"#FF2D55"})]})]})}const{useCallback:Vt,useState:Vl}=await I("react"),{useTranslation:Gl}=await I("@dcl/hooks"),{Tooltip:Gt,useTheme:Yl}=await I("decentraland-ui2"),Kl=`${window.location.origin}/dcl-logo.svg`.replace(/^http:\/\//,"https://");function Jl({data:e,onClose:t}){const{t:r}=Gl(),o=Yl(),a=Yo(o.breakpoints.down("sm")),[u,d]=Vl(!1),{isReminded:m,isLoading:k,isShaking:c,handleToggle:b}=En(e.id,e.attending),f=e.creatorName?.toLowerCase()==="decentraland foundation",{data:C}=Pe(e.creatorAddress,{skip:!e.creatorAddress||f}),x=C?.avatars?.[0],R=f?Kl:x?.avatar?.snapshots?.face256,T=f?"Decentraland Foundation":x?.name||e.creatorName,g=!!(R||T),j=Vt(()=>{window.open(e.url,"_blank","noopener,noreferrer")},[e.url]),$=Vt(()=>{navigator.clipboard?.writeText(e.url)?.then(()=>{d(!0),setTimeout(()=>d(!1),2e3)}).catch(h=>console.warn("[EventDetailModal] Failed to copy:",h))},[e.url]),S=Vt(()=>{const h=_n(e);h&&window.open(h,"_blank","noopener,noreferrer")},[e]),w=e.live?r("event_detail.live_now"):e.categories[0]||null;return n.jsx(n.Fragment,{children:n.jsxs(sl,{children:[e.image&&n.jsx(cl,{src:e.image,alt:e.name}),n.jsx(ll,{}),n.jsx(dl,{onClick:t,"aria-label":r("event_detail.close"),children:a?n.jsx(bn,{sx:{fontSize:20,color:"#FCFCFC"}}):n.jsx(ul,{})}),n.jsxs(pl,{children:[w&&n.jsx(fl,{children:w}),n.jsx(gl,{id:"event-detail-title",children:e.name}),g&&n.jsxs(hl,{children:[R?n.jsx(ml,{src:R,alt:T??""}):n.jsx(yl,{}),n.jsxs(bl,{children:[r("event_detail.by_prefix"),n.jsx(xl,{children:T})]})]}),n.jsxs(vl,{children:[n.jsx(Cl,{onClick:j,children:r("event_detail.jump_in")}),n.jsx(Gt,{title:r("event_detail.remind_me"),placement:"top",arrow:!0,children:n.jsx(wr,{onClick:b,disabled:k,"aria-label":r("event_detail.remind_me"),children:n.jsx(yt,{active:m,shaking:c,size:20})})}),e.startAt&&n.jsx(Gt,{title:r("event_detail.add_to_calendar"),placement:"top",arrow:!0,children:n.jsx(wr,{onClick:S,"aria-label":r("event_detail.add_to_calendar"),children:n.jsx(An,{fontSize:"small"})})}),n.jsx(Gt,{title:r(u?"event_detail.copied":"event_detail.copy_link"),placement:"top",arrow:!0,children:n.jsx(wl,{onClick:$,"aria-label":r("event_detail.copy_link"),children:n.jsx(_l,{})})})]})]})]})})}function jn({open:e,onClose:t,data:r}){return n.jsx(al,{open:e&&!!r,onClose:t,"aria-labelledby":"event-detail-title",fullWidth:!0,children:r&&n.jsxs(n.Fragment,{children:[n.jsx(Jl,{data:r,onClose:t}),n.jsx(Ml,{data:r})]})})}function _o(e){return{id:e.id,name:e.name,description:e.description,image:e.image,x:e.x,y:e.y,creatorAddress:e.user||void 0,creatorName:e.user_name||void 0,startAt:e.start_at,finishAt:e.finish_at,recurrent:e.recurrent,recurrentFrequency:e.recurrent_frequency,recurrentDates:e.recurrent_dates,totalAttendees:e.total_attendees,attending:e.attending,live:e.live,categories:e.categories,url:wn(e.x,e.y)}}function Xl(e){const[t,r]=tl(e.coordinates),o=e.type==="event"?wn(t,r):el(t,r);return{id:e.id,name:e.title,description:e.description||null,image:e.image||null,x:t,y:r,creatorAddress:e.creatorAddress,creatorName:e.creatorName,startAt:null,finishAt:null,recurrent:!1,recurrentFrequency:null,recurrentDates:[],totalAttendees:e.users,attending:void 0,live:!0,categories:e.categories||[],url:o}}const Zl="data:image/webp;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQq0AAAAAElFTkSuQmCC",ed="data:image/webp;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQq0AAAAAElFTkSuQmCC";var In={},td=_e;Object.defineProperty(In,"__esModule",{value:!0});var So=In.default=void 0,nd=td(we()),rd=n;So=In.default=(0,nd.default)((0,rd.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2m-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckBox");const{Box:Rn,Typography:Pn,styled:oe}=await I("decentraland-ui2"),od=oe("section")(({theme:e})=>({position:"relative",zIndex:8,overflow:"hidden",borderRadius:e.spacing(2),background:"radial-gradient(63.39% 112.69% at 49.33% 50.11%, #6B2A8A 0%, #1E0A2E 100%)",display:"flex",alignItems:"center",minHeight:240,[e.breakpoints.down("md")]:{flexDirection:"column",minHeight:"auto"}})),id=oe("img")(({theme:e})=>({width:200,height:"100%",objectFit:"contain",objectPosition:"bottom left",flexShrink:0,alignSelf:"flex-end",[e.breakpoints.down("lg")]:{width:160},[e.breakpoints.down("md")]:{display:"none"}})),ad=oe(Rn)(({theme:e})=>({flex:1,display:"flex",flexDirection:"column",gap:e.spacing(2),padding:e.spacing(4,3),zIndex:1,[e.breakpoints.down("sm")]:{padding:e.spacing(3,2)}})),sd=oe(Pn)(({theme:e})=>({fontSize:"1.5rem",fontWeight:600,lineHeight:1.334,color:e.palette.text.primary})),cd=oe(Pn)(({theme:e})=>({fontSize:16,fontWeight:400,lineHeight:1.5,color:e.palette.text.secondary})),Yt=oe(Rn)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1)})),Kt=oe(So)(({theme:e})=>({fontSize:20,color:e.palette.primary.main})),Jt=oe(Pn)(({theme:e})=>({fontSize:14,fontWeight:400,color:e.palette.text.primary})),ld=oe(Rn)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(2),marginTop:e.spacing(1),[e.breakpoints.down("sm")]:{flexDirection:"column",alignItems:"stretch"}})),dd=oe("button")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(.5),background:e.palette.primary.main,border:"none",borderRadius:6,color:e.palette.common.white,fontFamily:"Inter, Helvetica, Arial, sans-serif",fontSize:"0.875rem",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.4px",padding:"6px 16px",cursor:"pointer",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{background:e.palette.primary.dark},"&:focus-visible":{outline:`2px solid ${e.palette.text.primary}`,outlineOffset:2}})),ud=oe("button")(({theme:e})=>({background:"transparent",border:"1px solid rgba(255, 255, 255, 0.23)",borderRadius:6,color:e.palette.text.primary,fontFamily:"Inter, Helvetica, Arial, sans-serif",fontSize:"0.875rem",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.4px",padding:"6px 16px",cursor:"pointer",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{background:e.palette.action.hover},"&:focus-visible":{outline:`2px solid ${e.palette.text.primary}`,outlineOffset:2}})),pd=oe("img")(({theme:e})=>({width:420,height:"100%",objectFit:"cover",objectPosition:"center",flexShrink:0,borderRadius:`0 ${e.spacing(2)} ${e.spacing(2)} 0`,[e.breakpoints.down("lg")]:{width:320},[e.breakpoints.down("md")]:{width:"100%",height:200,borderRadius:`0 0 ${e.spacing(2)} ${e.spacing(2)}`}})),{useCallback:Tr}=await I("react"),{useNavigate:fd}=await I("react-router-dom"),{useTranslation:gd}=await I("@dcl/hooks"),hd="https://docs.decentraland.org/creator/events/";function md(){const{t:e}=gd(),t=fd(),r=Tr(()=>{t("/new-event")},[t]),o=Tr(()=>{window.open(hd,"_blank","noopener")},[]);return n.jsxs(od,{"aria-label":e("host_banner.title"),children:[n.jsx(id,{src:Zl,alt:"","aria-hidden":"true"}),n.jsxs(ad,{children:[n.jsx(sd,{children:e("host_banner.title")}),n.jsx(cd,{children:e("host_banner.subtitle")}),n.jsxs("div",{children:[n.jsxs(Yt,{children:[n.jsx(Kt,{}),n.jsx(Jt,{children:e("host_banner.check_1")})]}),n.jsxs(Yt,{children:[n.jsx(Kt,{}),n.jsx(Jt,{children:e("host_banner.check_2")})]}),n.jsxs(Yt,{children:[n.jsx(Kt,{}),n.jsx(Jt,{children:e("host_banner.check_3")})]})]}),n.jsxs(ld,{children:[n.jsxs(dd,{onClick:r,children:[n.jsx(Ko,{sx:{fontSize:18}}),e("host_banner.create_event")]}),n.jsx(ud,{onClick:o,children:e("host_banner.learn_more")})]})]}),n.jsx(pd,{src:ed,alt:"","aria-hidden":"true"})]})}const{useCallback:jr,useEffect:yd,useRef:Ir,useState:Rr}=await I("react");function ko(e){const t=wn(e.x,e.y),[r,o]=Rr(!1),[a,u]=Rr(!1),d=Ir(null),m=Ir(null);yd(()=>()=>{d.current&&clearTimeout(d.current),m.current&&clearTimeout(m.current)},[]);const k=jr(b=>{b.stopPropagation(),navigator.clipboard?.writeText(t)?.then(()=>{o(!0),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>o(!1),2e3)}).catch(f=>console.warn("[useCardActions] Failed to copy:",f))},[t]),c=jr(b=>{b.stopPropagation();const f=_n({name:e.name,description:e.description,startAt:e.startAt,finishAt:e.finishAt,x:e.x,y:e.y,url:t});f&&(window.open(f,"calendar","width=1090,height=870,noopener,noreferrer"),u(!0),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>u(!1),2e3))},[e.name,e.description,e.startAt,e.finishAt,e.x,e.y,t]);return{eventUrl:t,copied:r,calendarAdded:a,handleCopy:k,handleAddToCalendar:c}}function Ao(e,t){const r=Date.now(),a=new Date(e).getTime()-r;if(a<=0)return Pr(e);const u=Math.round(a/6e4);if(u<60)return t("upcoming.starts_in_mins",{count:u});const d=Math.round(u/60);return d<24?t("upcoming.starts_in_hours",{count:d}):Pr(e)}function Pr(e){return new Date(e).toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit",hour12:!0})}function bt({size:e=18,style:t,className:r}){return n.jsxs("svg",{width:e,height:e,viewBox:"0 0 25 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{flexShrink:0,...t},className:r,children:[n.jsx("path",{d:"M8.286 1.865v3.976M16.237 1.865v3.976",stroke:"currentColor",strokeWidth:"1.036",strokeLinecap:"round",strokeLinejoin:"round"}),n.jsx("rect",{x:"3.425",y:"4.142",width:"17.889",height:"17.889",rx:"3.667",stroke:"currentColor",strokeWidth:"2.073"}),n.jsx("path",{d:"M3.316 8.872h17.89",stroke:"currentColor",strokeWidth:"1.036",strokeLinecap:"round",strokeLinejoin:"round"}),n.jsx("path",{d:"M15.546 15.035h-2.665v2.665h-.888v-2.665H9.328v-.888h2.665v-2.665h.888v2.665h2.665v.888Z",fill:"currentColor"})]})}const{Box:It,Typography:Eo,dclColors:J,styled:ee}=await I("decentraland-ui2"),Ln="#D9D8DB",bd="#00B453",xt=ee("button")(()=>({display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:J.neutral.gray5,border:"none",borderRadius:8,padding:6,width:30,height:30,flexShrink:0,color:J.neutral.softBlack1,cursor:"pointer",transition:"background-color 0.2s ease, color 0.35s ease","&:hover":{backgroundColor:Ln},'&[data-active="true"]':{color:J.base.primary,transition:"color 0.15s ease"},"&:disabled":{opacity:.5,cursor:"default"},"&:focus-visible":{outline:`2px solid ${J.neutral.softWhite}`,outlineOffset:2}})),$n=ee("button")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:4,backgroundColor:J.neutral.gray5,border:"none",borderRadius:8,padding:6,minWidth:30,flexShrink:1,color:J.neutral.softBlack1,cursor:"pointer",overflow:"hidden",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:Ln},"&:focus-visible":{outline:`2px solid ${J.neutral.softWhite}`,outlineOffset:2}})),xd={fontSize:12,fontWeight:600,textTransform:"uppercase",whiteSpace:"nowrap"},vt=ee("span")({...xd,"@container (max-width: 340px)":{display:"none"}}),vd=ee("button")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:4,backgroundColor:J.neutral.softWhite,border:"none",borderRadius:8,padding:6,minWidth:30,flexShrink:1,color:J.base.primary,cursor:"pointer",overflow:"hidden",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:Ln},"&:disabled":{opacity:.5,cursor:"default"},"&:focus-visible":{outline:`2px solid ${J.neutral.softWhite}`,outlineOffset:2}})),To=ee(Vr)({fontSize:18,color:"inherit"}),Cd=ee("img")({width:19,height:19,borderRadius:"50%",border:`1.4px solid ${J.whiteTransparent.blurry}`,flexShrink:0,objectFit:"cover"}),wd=ee(It)({width:19,height:19,borderRadius:"50%",backgroundColor:bd,border:`1.4px solid ${J.whiteTransparent.blurry}`,flexShrink:0}),_d=ee(Eo)({fontSize:12,lineHeight:1,color:J.neutral.softWhite,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),Sd=ee("span")({color:J.base.primary}),kd=ee(It)({display:"flex",alignItems:"center",gap:8}),Ad=ee(It)({display:"flex",alignItems:"center",gap:8,backgroundColor:J.whiteTransparent.subtle,borderRadius:6,padding:"2px 8px 2px 4px",height:24,width:"fit-content",maxWidth:"100%",transition:"opacity 0.2s ease"}),Ed=ee(Jo)({fontSize:20,color:J.neutral.softWhite}),Td=ee(Eo)({fontSize:16,fontWeight:600,lineHeight:1.5,color:J.neutral.softWhite,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}),jd=ee(It)({position:"absolute",bottom:0,left:0,right:0,padding:12,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:4,opacity:0,transform:"translateY(8px)",transition:"opacity 0.2s ease, transform 0.2s ease",flexWrap:"nowrap"}),Id="0px 2px 12px 12px rgba(255, 255, 255, 0.3)";function jo({isReminded:e,isLoading:t,isShaking:r,label:o,onClick:a}){return e?n.jsxs(vd,{onClick:a,disabled:t,children:[n.jsx(yt,{active:!0,shaking:r}),n.jsx(vt,{children:o})]}):n.jsxs($n,{onClick:a,disabled:t,children:[n.jsx(yt,{active:!1,shaking:r}),n.jsx(vt,{children:o})]})}const{styled:Rd}=await I("decentraland-ui2"),Lr=Rd("button")(({theme:e})=>({display:"none",[e.breakpoints.down("md")]:{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,flexShrink:0,borderRadius:6,border:"none",backgroundColor:"rgba(255, 255, 255, 0.15)",cursor:"pointer",padding:0,color:"#FCFCFC","&:active":{backgroundColor:"rgba(255, 255, 255, 0.3)"}}})),{useCallback:Pd}=await I("react"),{useTranslation:Ld}=await I("@dcl/hooks"),{EventSmallCard:$d,Tooltip:$r}=await I("decentraland-ui2");function Ct({event:e,onClick:t,disableHover:r}){const{t:o}=Ld(),{hasValidIdentity:a}=Le(),{data:u}=Pe(e.user,{skip:!e.user}),d=u?.avatars?.[0],m=d?.avatar?.snapshots?.face256,k=d?.name||e.user_name||o("upcoming.unknown_creator"),{copied:c,calendarAdded:b,handleCopy:f,handleAddToCalendar:C}=ko({name:e.name,description:e.description,startAt:e.start_at,finishAt:e.finish_at,x:e.x,y:e.y}),{isReminded:x,isLoading:R,isShaking:T,handleToggle:g}=En(e.id,e.attending),j=Pd(()=>{t(e)},[t,e]),$=a?n.jsx(Lr,{onClick:g,disabled:R,"aria-label":o("upcoming.remind_me"),children:n.jsx(yt,{active:x,shaking:T,size:16})}):n.jsx(Lr,{onClick:C,"aria-label":o("upcoming.add_to_calendar"),children:n.jsx(An,{sx:{fontSize:16}})}),S=n.jsxs(n.Fragment,{children:[a?n.jsx(jo,{isReminded:x,isLoading:R,isShaking:T,label:o("upcoming.remind_me"),onClick:g}):n.jsxs($n,{onClick:C,children:[n.jsx(bt,{}),n.jsx(vt,{children:o("upcoming.add_to_calendar")})]}),a&&n.jsx($r,{title:o("upcoming.add_to_calendar"),placement:"top",arrow:!0,children:n.jsx(xt,{onClick:C,"data-active":b,children:n.jsx(bt,{})})}),n.jsx($r,{title:o(c?"upcoming.copied":"upcoming.copy_link"),placement:"top",arrow:!0,children:n.jsx(xt,{onClick:f,"data-active":c,children:n.jsx(To,{})})})]});return n.jsx($d,{image:e.image??void 0,title:e.name,creatorName:k,creatorAvatarUrl:m,timeLabel:Ao(e.start_at,o),onClick:j,disableHover:r,action:$,hoverActions:S})}Ct.displayName="UpcomingCard";const{Box:Rt,Typography:Md,dclColors:Mn,styled:Me}=await I("decentraland-ui2"),Dd=Me(Rt)({borderRadius:12,overflow:"hidden",cursor:"pointer",position:"relative",width:"100%",minWidth:0,"&:hover":{boxShadow:Id},'&:hover [data-role="hover-actions"]':{opacity:1,transform:"translateY(0)"},'&:hover [data-role="time-pill"], &:hover [data-role="creator-row"]':{opacity:0},'&:focus-within [data-role="hover-actions"]':{opacity:1,transform:"translateY(0)"},'&:focus-within [data-role="time-pill"], &:focus-within [data-role="creator-row"]':{opacity:0}}),Nd=Me(Rt)({width:"100%",aspectRatio:"16 / 9",overflow:"hidden",flexShrink:0}),Fd=Me("img")({width:"100%",height:"100%",objectFit:"cover",display:"block",pointerEvents:"none",userSelect:"none"}),Od=Me(Rt)({display:"flex",flexDirection:"column",gap:4,padding:12,position:"relative",backgroundColor:Mn.blackTransparent.blurry}),Ud=Me(Md)({fontWeight:600,fontSize:16,lineHeight:1.5,color:Mn.neutral.softWhite,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),Bd=Me(Rt)({width:"100%",minWidth:0,overflow:"hidden","& .MuiCard-root":{maxWidth:"100%",minWidth:0,width:"100%",maxHeight:"none",containerType:"inline-size",overflow:"hidden",animation:"none"},"& .MuiCardContent-root":{backgroundColor:Mn.blackTransparent.backdrop},"& .MuiCardMedia-root":{height:"min(62.5cqw, 200px)",pointerEvents:"none",userSelect:"none"},"& .MuiCardActionArea-root":{transition:"none",transform:"none"},"&& .MuiCardActionArea-root:hover":{transform:"none",boxShadow:"none"},"&& .MuiCard-root:hover":{boxShadow:"none"},"&& .MuiCardActionArea-root:hover .MuiCardMedia-root":{height:"min(62.5cqw, 200px)",transform:"none"},"& .MuiCardContent-root .MuiBox-root .MuiBox-root:has(.MuiAvatar-root)":{display:"none"},"& .MuiCardContent-root .MuiTypography-h6":{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",WebkitLineClamp:"unset",WebkitBoxOrient:"unset"}}),{memo:Qd,useCallback:qd}=await I("react"),{useTranslation:Hd}=await I("@dcl/hooks"),{Tooltip:Mr}=await I("decentraland-ui2"),Io=Qd(({event:e,onClick:t})=>{const{t:r}=Hd(),{hasValidIdentity:o}=Le(),{data:a}=Pe(e.user,{skip:!e.user}),u=a?.avatars?.[0],d=u?.avatar?.snapshots?.face256,m=u?.name||e.user_name||r("all_experiences.coming_soon"),{copied:k,handleCopy:c,handleAddToCalendar:b}=ko({name:e.name,description:e.description,startAt:e.start_at,finishAt:e.finish_at,x:e.x,y:e.y}),{isReminded:f,isLoading:C,isShaking:x,handleToggle:R}=En(e.id,e.attending),T=qd(()=>{t(e)},[t,e]);return n.jsxs(Dd,{onClick:T,children:[e.image&&n.jsx(Nd,{children:n.jsx(Fd,{src:e.image,alt:e.name,loading:"lazy"})}),n.jsxs(Od,{children:[n.jsx(Ud,{children:e.name}),n.jsxs(kd,{"data-role":"creator-row",children:[d?n.jsx(Cd,{src:d,alt:m}):n.jsx(wd,{}),n.jsxs(_d,{children:[r("upcoming.by_prefix"),n.jsx(Sd,{children:m})]})]}),n.jsxs(Ad,{"data-role":"time-pill",children:[n.jsx(Ed,{}),n.jsx(Td,{children:Ao(e.start_at,r)})]}),n.jsxs(jd,{"data-role":"hover-actions",children:[o?n.jsx(jo,{isReminded:f,isLoading:C,isShaking:x,label:r("all_experiences.remind_me"),onClick:R}):n.jsxs($n,{onClick:b,children:[n.jsx(bt,{}),n.jsx(vt,{children:r("all_experiences.add_to_calendar")})]}),o&&n.jsx(Mr,{title:r("all_experiences.add_to_calendar"),placement:"top",arrow:!0,children:n.jsx(xt,{onClick:b,children:n.jsx(bt,{})})}),n.jsx(Mr,{title:r(k?"all_experiences.copied":"all_experiences.copy_link"),placement:"top",arrow:!0,children:n.jsx(xt,{onClick:c,children:n.jsx(To,{})})})]})]})]})});Io.displayName="FutureCard";const{memo:Wd,useCallback:zd}=await I("react"),{BadgeGroup:Vd,EventCard:Gd,LiveBadge:Yd,UserCountBadge:Kd}=await I("decentraland-ui2"),Ro=Wd(({event:e,onClick:t})=>{const{data:r}=Pe(e.user,{skip:!e.user}),o=r?.avatars?.[0],a=zd(()=>{t(e)},[t,e]),u=o?.avatar?o:void 0;return n.jsx(Bd,{children:n.jsx(Gd,{image:e.image??"",sceneName:e.name,coordinates:`${e.x},${e.y}`,avatar:u,onClick:a,leftBadge:n.jsxs(Vd,{children:[n.jsx(Yd,{}),n.jsx(Kd,{count:e.total_attendees})]}),leftBadgeTransparent:!0,hideLocation:!0})})});Ro.displayName="LiveCard";const{memo:Jd}=await I("react"),Po=Jd(({event:e,onClick:t})=>e.live?n.jsx(Ro,{event:e,onClick:t}):n.jsx(Io,{event:e,onClick:t}));Po.displayName="AllExperiencesCard";var Dn={},Xd=_e;Object.defineProperty(Dn,"__esModule",{value:!0});var Nn=Dn.default=void 0,Zd=Xd(we()),eu=n;Nn=Dn.default=(0,Zd.default)((0,eu.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft");var Fn={},tu=_e;Object.defineProperty(Fn,"__esModule",{value:!0});var On=Fn.default=void 0,nu=tu(we()),ru=n;On=Fn.default=(0,nu.default)((0,ru.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight");const{Box:ou,Typography:iu,dclColors:wt,styled:Un}=await I("decentraland-ui2"),au=50,su=12,Dr=20,cu=Un(ou)({display:"flex",alignItems:"center",height:au,marginBottom:su,position:"relative",backgroundColor:wt.blackTransparent.backdrop,borderRadius:12,padding:0}),lu=Un(iu,{shouldForwardProp:e=>e!=="isToday"})(({isToday:e})=>({flex:1,textAlign:"center",fontWeight:600,fontSize:16,lineHeight:"100%",letterSpacing:0,color:e?wt.neutral.softWhite:"rgba(255, 255, 255, 0.7)"})),Nr=Un("button")(({disabled:e,side:t})=>({display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",padding:0,cursor:e?"default":"pointer",color:e?"rgba(255, 255, 255, 0.3)":wt.neutral.softWhite,height:Dr,width:Dr,position:"absolute",top:"50%",transform:"translateY(-50%)",[t]:8,zIndex:1,"&:focus-visible":{outline:`2px solid ${wt.neutral.softWhite}`,outlineOffset:2}})),{memo:du,useMemo:uu}=await I("react"),{useTranslation:pu}=await I("@dcl/hooks"),Lo=du(({startOffset:e,columnCount:t,today:r,onNavigateLeft:o,onNavigateRight:a})=>{const{t:u}=pu(),d=e>0,m=uu(()=>Array.from({length:t},(k,c)=>vn(r,e+c)),[r,e,t]);return n.jsxs(cu,{role:"navigation","aria-label":u("all_experiences.title"),children:[n.jsx(Nr,{side:"left",onClick:o,disabled:!d,"aria-label":u("all_experiences.navigate_previous"),"aria-disabled":!d,tabIndex:d?0:-1,children:n.jsx(Nn,{sx:{fontSize:20}})}),m.map((k,c)=>n.jsx(lu,{variant:"h6",isToday:e+c===0,"aria-label":vo(k),"aria-current":e+c===0?"date":void 0,children:Kc(k,u,r)},k.toISOString())),n.jsx(Nr,{side:"right",onClick:a,"aria-label":u("all_experiences.navigate_next"),children:n.jsx(On,{sx:{fontSize:20}})})]})});Lo.displayName="DateNavigation";const{Box:Pt,dclColors:$o,styled:Lt}=await I("decentraland-ui2"),fu=24,gu="calc(100vh - 280px)",hu=8,mu=8,cn=12,yu=200,bu=Lt(Pt)(({theme:e})=>({borderRadius:fu,backgroundColor:"rgba(179, 32, 255, 0.25)",border:`2px solid ${$o.whiteTransparent.subtle}`,display:"flex",flexDirection:"column",height:gu,overflow:"hidden",[e.breakpoints.down("sm")]:{height:"auto"}})),xu=Lt(Pt)({flex:1,overflowY:"auto",display:"flex",flexDirection:"column",gap:hu,padding:mu,scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),vu=Lt(Pt)({flex:1,minHeight:cn,backgroundColor:$o.whiteTransparent.subtle,borderRadius:cn}),Xt=Lt(Pt)({height:yu,borderRadius:cn,backgroundColor:"rgba(255, 255, 255, 0.08)",animation:"pulse 1.5s ease-in-out infinite","@keyframes pulse":{"0%, 100%":{opacity:.4},"50%":{opacity:.15}}}),{memo:Cu,useCallback:Zt,useEffect:wu,useRef:Fr,useState:_u}=await I("react"),Mo=Cu(({events:e,isLoading:t,dateLabel:r,renderCard:o})=>{const a=Fr(null),u=Fr({isDown:!1,startY:0,scrollTop:0}),[d,m]=_u(!1);wu(()=>{const f=a.current;if(!f)return;const C=()=>m(f.scrollHeight>f.clientHeight);C();const x=new ResizeObserver(C);return x.observe(f),()=>x.disconnect()},[e,t]);const k=Zt(f=>{const C=a.current;C&&(u.current={isDown:!0,startY:f.clientY,scrollTop:C.scrollTop})},[]),c=Zt(f=>{if(!u.current.isDown)return;const C=a.current;if(!C)return;f.preventDefault();const x=f.clientY-u.current.startY;C.scrollTop=u.current.scrollTop-x},[]),b=Zt(()=>{u.current.isDown=!1},[]);return n.jsx(bu,{role:"list","aria-label":r,children:n.jsxs(xu,{ref:a,onMouseDown:k,onMouseMove:c,onMouseUp:b,onMouseLeave:b,children:[t&&n.jsxs(n.Fragment,{children:[n.jsx(Xt,{role:"listitem","aria-hidden":"true"}),n.jsx(Xt,{role:"listitem","aria-hidden":"true"}),n.jsx(Xt,{role:"listitem","aria-hidden":"true"})]}),!t&&e.map(f=>n.jsx("div",{role:"listitem",children:o(f)},f.id)),!d&&n.jsx(vu,{"aria-hidden":"true"})]})})});Mo.displayName="DayColumn";const{Box:Bn,Typography:Su,styled:Ze}=await I("decentraland-ui2"),ku=28,Au=16,Eu="0.4s",Tu="0.15s",ju=Ze("section")(({theme:e})=>({position:"relative",zIndex:8,marginTop:e.spacing(4),animation:`slideUp ${Eu} ease-out ${Tu}`,"@keyframes slideUp":{from:{transform:"translateY(20px)"},to:{transform:"translateY(0)"}},marginLeft:e.spacing(-8),marginRight:e.spacing(-8),padding:e.spacing(8,8),background:"radial-gradient(63.39% 112.69% at 49.33% 50.11%, #6B2A8A 0%, #1E0A2E 100%)",[e.breakpoints.down("lg")]:{marginLeft:e.spacing(-4),marginRight:e.spacing(-4),padding:e.spacing(8,4)},[e.breakpoints.down("md")]:{marginLeft:e.spacing(-3),marginRight:e.spacing(-3),padding:e.spacing(6,3)},[e.breakpoints.down("sm")]:{marginLeft:0,marginRight:0,padding:e.spacing(4,2)}})),Iu=Ze(Su)(({theme:e})=>({fontWeight:500,fontSize:32,lineHeight:1.235,marginBottom:ku,[e.breakpoints.down("sm")]:{fontSize:24,textAlign:"center"}})),Ru=Ze(Bn)({display:"grid",gap:Au}),Pu=Ze(Bn)({display:"flex",gap:12,overflowX:"auto",scrollSnapType:"x mandatory",scrollBehavior:"smooth",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Lu=Ze(Bn)({display:"flex",flexDirection:"column",gap:12,flex:"0 0 100%",scrollSnapAlign:"start"}),{useCallback:Be,useEffect:$u,useMemo:He,useState:en}=await I("react"),{useTranslation:Mu}=await I("@dcl/hooks");function Du(e,t,r,o){const a=He(()=>Array.from({length:r},(b,f)=>vn(e,t+f)),[e,t,r]),u=He(()=>Cr(a[0]),[a]),d=He(()=>Cr(a[a.length-1]),[a]),{data:m=[],isLoading:k,isError:c}=qa({list:"active",from:u.from,to:d.to,order:"asc",world:!1,limit:200,identity:o});return He(()=>a.map(b=>({date:b,events:m.filter(f=>sn(new Date(f.start_at),b)),isLoading:k,isError:c})),[a,m,k,c])}function Nu(){const{t:e}=Mu(),{identity:t}=Le(),r=Vc(),[o,a]=en(0),[u,d]=en(null),[m,k]=en(()=>{const g=new Date;return g.setHours(0,0,0,0),g});$u(()=>{const g=()=>{const j=new Date;j.setHours(0,0,0,0),j.getTime()!==m.getTime()&&(k(j),a(0))};return document.addEventListener("visibilitychange",g),()=>document.removeEventListener("visibilitychange",g)},[m]);const c=Du(m,o,r,t),b=Be(()=>{a(g=>Math.max(0,g-r))},[r]),f=Be(()=>{a(g=>g+r)},[r]),C=Be(g=>{d(_o(g))},[]),x=Be(()=>{d(null)},[]),R=Be(g=>n.jsx(Po,{event:g,onClick:C}),[C]),T=He(()=>xo(c.flatMap(g=>g.events),2),[c]);return n.jsxs(ju,{"aria-label":e("all_experiences.title"),children:[n.jsx(Iu,{variant:"h4",children:e("all_experiences.title")}),n.jsx(Lo,{startOffset:o,columnCount:r,today:m,onNavigateLeft:b,onNavigateRight:f}),r<=1?n.jsx(Pu,{children:T.map((g,j)=>n.jsx(Lu,{children:g.map($=>n.jsx(Ct,{event:$,onClick:C},$.id))},j))}):n.jsx(Ru,{sx:{gridTemplateColumns:`repeat(${r}, 1fr)`},children:c.map(({date:g,events:j,isLoading:$})=>n.jsx(Mo,{events:j,isLoading:$,dateLabel:vo(g),renderCard:R},g.toISOString()))}),n.jsx(md,{}),n.jsx(jn,{open:!!u,onClose:x,data:u})]})}const{Box:Fu,styled:Do}=await I("decentraland-ui2"),No=Do(Fu)(({theme:e})=>({display:"flex",justifyContent:"center",gap:e.spacing(.75),marginTop:e.spacing(2)})),Fo=Do("button")(({theme:e,active:t})=>({width:8,height:8,borderRadius:"50%",border:"none",padding:0,cursor:"pointer",backgroundColor:t?e.palette.common.white:"rgba(255, 255, 255, 0.3)",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short})})),{memo:Ou,useCallback:Uu}=await I("react"),{BadgeGroup:Bu,EventCard:Qu,LiveBadge:qu,UserCountBadge:Hu}=await I("decentraland-ui2"),Wu=`${window.location.origin}/dcl-logo.svg`.replace(/^http:\/\//,"https://"),Oo=Ou(({card:e,onClick:t})=>{const r=e.title.toLowerCase().includes("genesis plaza"),{data:o}=Pe(e.creatorAddress,{skip:!e.creatorAddress}),a=o?.avatars?.[0],u=Uu(()=>{t(e)},[t,e]);let d;return r?d={name:e.creatorName??"Decentraland Foundation",ethAddress:"",avatar:{snapshots:{face256:Wu,body:""}}}:a?d={name:a.name??"",ethAddress:a.ethAddress??"",avatar:a.avatar}:e.creatorName&&(d={name:e.creatorName,ethAddress:""}),n.jsx(Qu,{image:e.image,sceneName:e.title,coordinates:e.coordinates,avatar:d,onClick:u,hoverEffect:"lift",leftBadge:n.jsxs(Bu,{children:[e.type==="event"&&n.jsx(qu,{}),n.jsx(Hu,{count:e.users})]}),leftBadgeTransparent:!0,hideLocation:!0})});Oo.displayName="LiveNowCardItem";const{Box:$t,IconButton:zu,Typography:Vu,styled:ye}=await I("decentraland-ui2"),Gu=ye("section")(({theme:e})=>({position:"relative",zIndex:10,marginTop:e.spacing(4),padding:e.spacing(4,3),background:"radial-gradient(63.39% 112.69% at 49.33% 50.11%, #A042CD 0%, #32134C 100%)",borderRadius:e.spacing(2),boxShadow:"0px 4px 25px 0px rgba(255, 255, 255, 0.25)",[e.breakpoints.down("sm")]:{padding:e.spacing(3,2),marginTop:0,marginLeft:0,marginRight:0,background:"radial-gradient(63.39% 112.69% at 49.33% 50.11%, #A042CD 0%, #32134C 100%)",borderRadius:0,boxShadow:"none"}})),Yu=ye($t)(({theme:e})=>({display:"flex",alignItems:"center",gap:8,marginBottom:24,[e.breakpoints.down("sm")]:{justifyContent:"center",padding:e.spacing(0,2)}})),Ku=ye(Vu)(({theme:e})=>({fontWeight:600,fontSize:32,[e.breakpoints.down("sm")]:{fontSize:24,textAlign:"center",width:"100%"}})),Or=62,Ur=60,Ju=ye($t,{shouldForwardProp:e=>e!=="fadeLeft"&&e!=="fadeRight"&&e!=="hasScroll"})(({theme:e,fadeLeft:t,fadeRight:r,hasScroll:o})=>{const a=[];return t&&a.push(`linear-gradient(to right, transparent, black ${Ur}px)`),r&&a.push(`linear-gradient(to left, transparent, black ${Ur}px)`),{position:"relative",...o?{overflowX:"auto",padding:"24px 16px 16px",margin:"-24px -16px -16px",scrollSnapType:"x mandatory",scrollPaddingInline:16,scrollBehavior:"smooth",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}:{overflow:"visible"},...a.length>0&&{maskImage:a.join(", "),WebkitMaskImage:a.join(", ")},...a.length>1&&{maskComposite:"intersect",WebkitMaskComposite:"source-in"},[e.breakpoints.down("sm")]:{maskImage:"none",WebkitMaskImage:"none"}}}),Br=ye(zu)(({theme:e,side:t})=>({position:"absolute",top:"50%",transform:"translateY(-50%)",[t]:e.spacing(1),zIndex:2,backgroundColor:"rgba(0, 0, 0, 0.5)",color:e.palette.common.white,"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.7)"},[e.breakpoints.down("sm")]:{display:"none"}})),Xu=ye($t)(({theme:e})=>({display:"flex",gap:e.spacing(2),justifyContent:"safe center",alignItems:"stretch","&::after":{content:'""',flexShrink:0,width:1},"& .MuiCard-root":{minWidth:"max(300px, calc((100% - 48px) / 4))",maxWidth:850,flex:"1 1 0",containerType:"inline-size",scrollSnapAlign:"start",overflow:"hidden"},"& .MuiCardActionArea-root":{height:"100%"},"&& .MuiCardMedia-root":{height:"min(62.5cqw, 297px)"},"&& .MuiCardActionArea-root:hover .MuiCardMedia-root":{height:"min(62.5cqw, 297px)"},"&& .MuiCardActionArea-root:hover .MuiCardContent-root > div:first-of-type > div:last-child":{marginBottom:0},"& .MuiCardContent-root .MuiTypography-h6":{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",WebkitLineClamp:"unset",WebkitBoxOrient:"unset"},"& .MuiCardContent-root .MuiBox-root .MuiBox-root:has(.MuiAvatar-root)":{maxWidth:"100%"},[e.breakpoints.down("sm")]:{"& .MuiCard-root":{minWidth:"unset",maxWidth:"unset",maxHeight:"none",flex:"0 0 100%"},"&& .MuiCardMedia-root":{height:`calc(62.5cqw - ${Or}px)`},"&& .MuiCardActionArea-root:hover .MuiCardMedia-root":{height:`calc(62.5cqw - ${Or}px)`},"&& .MuiCardActionArea-root:hover .MuiCardContent-root > div:first-of-type > div:last-child":{marginBottom:0},"&& .MuiCardContent-root > .MuiBox-root:last-child":{display:"flex",opacity:1,transform:"translateY(0)"}}})),Zu=ye(Xo)(({theme:e})=>({color:"#E00000",[e.breakpoints.down("sm")]:{display:"none"}})),ep=ye($t)({position:"relative"}),{useCallback:de,useEffect:tp,useMemo:np,useRef:Qr,useState:je}=await I("react"),{useTranslation:rp}=await I("@dcl/hooks"),qr=300;function op(){const{t:e}=rp(),t=np(()=>{const i=new URLSearchParams(window.location.search).get("minUsers");if(i!==null&&!Number.isNaN(Number(i)))return{minUsers:Number(i)}},[]),{data:r=[]}=fo(t,{pollingInterval:6e4}),[o,a]=je(0),[u,d]=je(!1),[m,k]=je(!1),[c,b]=je(1),[f,C]=je(!1),[x,R]=je(null),T=Qr(null),g=Qr({isDown:!1,startX:0,scrollLeft:0}),j=de(()=>{const s=T.current;if(!s)return;const i=s.scrollWidth>s.clientWidth,l=i&&s.clientWidth>0?Math.max(1,Math.ceil(s.scrollWidth/s.clientWidth)):1;d(s.scrollLeft>0),k(i&&s.scrollLeft+s.clientWidth<s.scrollWidth-1),b(l);const p=s.scrollWidth-s.clientWidth;if(p<=0)a(0);else{const y=s.scrollLeft/p;a(Math.round(y*(l-1)))}},[]);tp(()=>{const s=T.current;if(!s)return;j();const i=new ResizeObserver(j);return i.observe(s),()=>i.disconnect()},[r.length,j]);const $=de(s=>{const i=T.current;if(!i)return;const l=s==="left"?-qr:qr;i.scrollBy({left:l,behavior:"smooth"})},[]),S=de(s=>{const i=T.current;i&&(g.current={isDown:!0,startX:s.pageX-i.offsetLeft,scrollLeft:i.scrollLeft},C(!1))},[]),w=de(s=>{if(!g.current.isDown)return;const i=T.current;if(!i)return;s.preventDefault();const p=s.pageX-i.offsetLeft-g.current.startX;Math.abs(p)>5&&C(!0),i.scrollLeft=g.current.scrollLeft-p},[]),h=de(()=>{g.current.isDown=!1},[]),v=de(s=>{f&&s.stopPropagation()},[f]),A=de(s=>{const i=T.current;if(!i)return;const l=i.scrollWidth-i.clientWidth,p=c<=1?0:l*s/(c-1);i.scrollTo({left:p,behavior:"smooth"})},[c]),E=de(s=>{R(Xl(s))},[]),_=de(()=>{R(null)},[]);return r.length===0?null:n.jsxs(Gu,{children:[n.jsxs(Yu,{children:[n.jsx(Zu,{}),n.jsx(Ku,{variant:"h5",children:e("live_now.title")})]}),n.jsxs(ep,{children:[u&&n.jsx(Br,{side:"left",onClick:()=>$("left"),children:n.jsx(Nn,{})}),m&&n.jsx(Br,{side:"right",onClick:()=>$("right"),children:n.jsx(On,{})}),n.jsx(Ju,{ref:T,onScroll:j,fadeLeft:u,fadeRight:m,hasScroll:c>1,onMouseDown:S,onMouseMove:w,onMouseUp:h,onMouseLeave:h,onClickCapture:v,sx:{cursor:f?"grabbing":"grab"},children:n.jsx(Xu,{children:r.map(s=>n.jsx(Oo,{card:s,onClick:E},s.id))})})]}),c>1&&n.jsx(No,{children:Array.from({length:c},(s,i)=>n.jsx(Fo,{active:i===o,onClick:()=>A(i),"aria-label":e("pagination.go_to_page",{page:i+1})},i))}),n.jsx(jn,{open:!!x,onClose:_,data:x})]})}const{Box:Mt,Typography:ip,styled:De}=await I("decentraland-ui2"),ap="0.4s",sp=De("section")(({theme:e})=>({position:"relative",zIndex:9,marginTop:e.spacing(4),animation:`slideUp ${ap} ease-out`,"@keyframes slideUp":{from:{transform:"translateY(20px)"},to:{transform:"translateY(0)"}},marginLeft:e.spacing(-8),marginRight:e.spacing(-8),padding:e.spacing(4,8),[e.breakpoints.down("lg")]:{marginLeft:e.spacing(-4),marginRight:e.spacing(-4),padding:e.spacing(4,4)},[e.breakpoints.down("md")]:{marginLeft:e.spacing(-3),marginRight:e.spacing(-3),padding:e.spacing(4,3)},[e.breakpoints.down("sm")]:{marginLeft:0,marginRight:0,padding:e.spacing(3,2)}})),cp=De(ip)(({theme:e})=>({fontWeight:500,fontSize:32,lineHeight:1.235,marginBottom:32,[e.breakpoints.down("md")]:{textAlign:"center"},[e.breakpoints.down("sm")]:{fontSize:24}})),lp=De(Mt)(({theme:e})=>({display:"none",[e.breakpoints.down("md")]:{display:"block"}})),dp=De(Mt)({display:"flex",gap:12,overflowX:"auto",scrollSnapType:"x mandatory",scrollBehavior:"smooth",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),up=De(Mt)(()=>({display:"grid",gridTemplateColumns:"1fr 1fr",gap:12,flex:"0 0 100%",scrollSnapAlign:"start","@media (max-width: 600px)":{gridTemplateColumns:"1fr",justifyItems:"center","& > *:nth-of-type(n+3)":{display:"none"}}})),pp=De(Mt)(({theme:e})=>({display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(max(300px, calc((100% - 72px) / 4)), 1fr))",gap:24,[e.breakpoints.down("md")]:{display:"none"}})),{useCallback:dt,useMemo:fp,useRef:gp,useState:Hr}=await I("react"),{useTranslation:hp}=await I("@dcl/hooks"),mp=4;function yp(){const{t:e}=hp(),{identity:t}=Le(),{data:r=[]}=Ha(t?{identity:t}:void 0),[o,a]=Hr(null),[u,d]=Hr(0),m=gp(null),k=fp(()=>xo(r,mp),[r]),c=dt(()=>{const x=m.current;if(!x||x.clientWidth===0)return;const R=Math.round(x.scrollLeft/x.clientWidth);d(R)},[]),b=dt(x=>{const R=m.current;R&&R.scrollTo({left:x*R.clientWidth,behavior:"smooth"})},[]),f=dt(x=>{a(_o(x))},[]),C=dt(()=>{a(null)},[]);return r.length===0?null:n.jsxs(sp,{children:[n.jsx(cp,{variant:"h5",children:e("upcoming.title")}),n.jsx(pp,{children:r.map(x=>n.jsx(Ct,{event:x,onClick:f},x.id))}),n.jsxs(lp,{children:[n.jsx(dp,{ref:m,onScroll:c,children:k.map((x,R)=>n.jsx(up,{children:x.map(T=>n.jsx(Ct,{event:T,onClick:f,disableHover:!0},T.id))},R))}),k.length>1&&n.jsx(No,{children:k.map((x,R)=>n.jsx(Fo,{active:R===u,onClick:()=>b(R),"aria-label":e("pagination.go_to_page",{page:R+1})},R))})]}),n.jsx(jn,{open:!!o,onClose:C,data:o})]})}const bp="https://cdn.decentraland.org/@dcl/explore-site/0.0.1-24533810684.commit-08f2d1e/assets/top_background-Bnd2vX_F.webp",{Box:Uo,styled:Bo}=await I("decentraland-ui2"),xp=Bo(Uo)(({standalone:e,theme:t})=>({position:"relative",background:`url(${bp}) no-repeat top center, radial-gradient(61.64% 109.58% at 50% 54.49%, #A042CD 0%, #270537 100%)`,backgroundSize:"100% 700px, 100% auto","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,background:"linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%)",pointerEvents:"none"},overflow:"hidden",minHeight:"100vh",padding:t.spacing(5,8,0,8),[t.breakpoints.down("lg")]:{padding:t.spacing(5,4,0,4)},[t.breakpoints.down("md")]:{padding:t.spacing(5,3,0,3)},[t.breakpoints.down("sm")]:{padding:t.spacing(0,0,0,0),background:"#1A0A2E",backgroundSize:"unset","&::before":{display:"none"}},...!e&&{paddingTop:0}})),vp=Bo(Uo)(({standalone:e,theme:t})=>({position:"relative",zIndex:1,display:"flex",flexDirection:"column",gap:t.spacing(4),paddingTop:e?"66px":"96px",[t.breakpoints.down("sm")]:{paddingTop:"56px",gap:0}}));function $p({standalone:e=!0}){const{isLoading:t}=fo(),r=n.jsxs(xp,{component:"main",standalone:e,children:[n.jsx(vp,{standalone:e,children:n.jsx(op,{})}),!t&&n.jsx(yp,{}),!t&&n.jsx(Nu,{})]});return e?n.jsx(yo,{children:r}):r}export{Lp as C,$p as H,bc as I,Pp as e,ce as g,Za as s};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{importShared as Q}from"./__federation_fn_import-
|
|
1
|
+
import{importShared as Q}from"./__federation_fn_import-BPa8h49G.js";import{j as oe}from"./jsx-runtime-B1l0k91v.js";const ce="2.22.1",ue=()=>`@wagmi/core@${ce}`;var B=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},O,z;let C=class x extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return ue()}constructor(t,r={}){super(),O.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const n=r.cause instanceof x?r.cause.details:r.cause?.message?r.cause.message:r.details,a=r.cause instanceof x&&r.cause.docsPath||r.docsPath;this.message=[t||"An error occurred.","",...r.metaMessages?[...r.metaMessages,""]:[],...a?[`Docs: ${this.docsBaseUrl}${a}.html${r.docsSlug?`#${r.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join(`
|
|
2
2
|
`),r.cause&&(this.cause=r.cause),this.details=n,this.docsPath=a,this.metaMessages=r.metaMessages,this.shortMessage=t}walk(t){return B(this,O,"m",z).call(this,this,t)}};O=new WeakSet,z=function e(t,r){return r?.(t)?t:t.cause?B(this,O,"m",e).call(this,t.cause,r):t};class he extends C{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class $e extends C{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class Ke extends C{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class _e extends C{constructor(){super("Connector not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotFoundError"})}}class We extends C{constructor({address:t,connector:r}){super(`Account "${t}" not found for connector "${r.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class Ge extends C{constructor({connectionChainId:t,connectorChainId:r}){super(`The current chain of the connector (id: ${r}) does not match the connection's chain (id: ${t}).`,{metaMessages:[`Current Chain ID: ${r}`,`Expected Chain ID: ${t}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}class Qe extends C{constructor({connector:t}){super(`Connector "${t.name}" unavailable while reconnecting.`,{details:["During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.","All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.","This error commonly occurs for connectors that asynchronously inject after reconnection has already started."].join(" ")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorUnavailableReconnectingError"})}}class F extends C{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class Be extends C{constructor({connector:t}){super(`"${t.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}function ze(e){return e}const{getAddress:E,numberToHex:L,ResourceUnavailableRpcError:A,SwitchChainError:N,UserRejectedRequestError:b,withRetry:le,withTimeout:de}=await Q("viem");H.type="injected";function H(e={}){const{shimDisconnect:t=!0,unstable_shimAsyncInject:r}=e;function n(){const c=e.target;if(typeof c=="function"){const i=c();if(i)return i}return typeof c=="object"?c:typeof c=="string"?{...fe[c]??{id:c,name:`${c[0].toUpperCase()}${c.slice(1)}`,provider:`is${c[0].toUpperCase()}${c.slice(1)}`}}:{id:"injected",name:"Injected",provider(i){return i?.ethereum}}}let a,o,l,s;return c=>({get icon(){return n().icon},get id(){return n().id},get name(){return n().name},get supportsSimulation(){return!0},type:H.type,async setup(){const i=await this.getProvider();i?.on&&e.target&&(l||(l=this.onConnect.bind(this),i.on("connect",l)),a||(a=this.onAccountsChanged.bind(this),i.on("accountsChanged",a)))},async connect({chainId:i,isReconnecting:h,withCapabilities:y}={}){const d=await this.getProvider();if(!d)throw new F;let m=[];if(h)m=await this.getAccounts().catch(()=>[]);else if(t)try{m=(await d.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0]?.caveats?.[0]?.value?.map(u=>E(u)),m.length>0&&(m=await this.getAccounts())}catch(f){const u=f;if(u.code===b.code)throw new b(u);if(u.code===A.code)throw u}try{!m?.length&&!h&&(m=(await d.request({method:"eth_requestAccounts"})).map(p=>E(p))),l&&(d.removeListener("connect",l),l=void 0),a||(a=this.onAccountsChanged.bind(this),d.on("accountsChanged",a)),o||(o=this.onChainChanged.bind(this),d.on("chainChanged",o)),s||(s=this.onDisconnect.bind(this),d.on("disconnect",s));let f=await this.getChainId();return i&&f!==i&&(f=(await this.switchChain({chainId:i}).catch(p=>{if(p.code===b.code)throw p;return{id:f}}))?.id??f),t&&await c.storage?.removeItem(`${this.id}.disconnected`),e.target||await c.storage?.setItem("injected.connected",!0),{accounts:y?m.map(u=>({address:u,capabilities:{}})):m,chainId:f}}catch(f){const u=f;throw u.code===b.code?new b(u):u.code===A.code?new A(u):u}},async disconnect(){const i=await this.getProvider();if(!i)throw new F;o&&(i.removeListener("chainChanged",o),o=void 0),s&&(i.removeListener("disconnect",s),s=void 0),l||(l=this.onConnect.bind(this),i.on("connect",l));try{await de(()=>i.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}t&&await c.storage?.setItem(`${this.id}.disconnected`,!0),e.target||await c.storage?.removeItem("injected.connected")},async getAccounts(){const i=await this.getProvider();if(!i)throw new F;return(await i.request({method:"eth_accounts"})).map(y=>E(y))},async getChainId(){const i=await this.getProvider();if(!i)throw new F;const h=await i.request({method:"eth_chainId"});return Number(h)},async getProvider(){if(typeof window>"u")return;let i;const h=n();return typeof h.provider=="function"?i=h.provider(window):typeof h.provider=="string"?i=j(window,h.provider):i=h.provider,i&&!i.removeListener&&("off"in i&&typeof i.off=="function"?i.removeListener=i.off:i.removeListener=()=>{}),i},async isAuthorized(){try{if(t&&await c.storage?.getItem(`${this.id}.disconnected`)||!e.target&&!await c.storage?.getItem("injected.connected"))return!1;if(!await this.getProvider()){if(r!==void 0&&r!==!1){const d=async()=>(typeof window<"u"&&window.removeEventListener("ethereum#initialized",d),!!await this.getProvider()),m=typeof r=="number"?r:1e3;if(await Promise.race([...typeof window<"u"?[new Promise(u=>window.addEventListener("ethereum#initialized",()=>u(d()),{once:!0}))]:[],new Promise(u=>setTimeout(()=>u(d()),m))]))return!0}throw new F}return!!(await le(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:i,chainId:h}){const y=await this.getProvider();if(!y)throw new F;const d=c.chains.find(f=>f.id===h);if(!d)throw new N(new he);const m=new Promise(f=>{const u=p=>{"chainId"in p&&p.chainId===h&&(c.emitter.off("change",u),f())};c.emitter.on("change",u)});try{return await Promise.all([y.request({method:"wallet_switchEthereumChain",params:[{chainId:L(h)}]}).then(async()=>{await this.getChainId()===h&&c.emitter.emit("change",{chainId:h})}),m]),d}catch(f){const u=f;if(u.code===4902||u?.data?.originalError?.code===4902)try{const{default:p,...v}=d.blockExplorers??{};let g;i?.blockExplorerUrls?g=i.blockExplorerUrls:p&&(g=[p.url,...Object.values(v).map(P=>P.url)]);let w;i?.rpcUrls?.length?w=i.rpcUrls:w=[d.rpcUrls.default?.http[0]??""];const S={blockExplorerUrls:g,chainId:L(h),chainName:i?.chainName??d.name,iconUrls:i?.iconUrls,nativeCurrency:i?.nativeCurrency??d.nativeCurrency,rpcUrls:w};return await Promise.all([y.request({method:"wallet_addEthereumChain",params:[S]}).then(async()=>{if(await this.getChainId()===h)c.emitter.emit("change",{chainId:h});else throw new b(new Error("User rejected switch after adding network."))}),m]),d}catch(p){throw new b(p)}throw u.code===b.code?new b(u):new N(u)}},async onAccountsChanged(i){if(i.length===0)this.onDisconnect();else if(c.emitter.listenerCount("connect")){const h=(await this.getChainId()).toString();this.onConnect({chainId:h}),t&&await c.storage?.removeItem(`${this.id}.disconnected`)}else c.emitter.emit("change",{accounts:i.map(h=>E(h))})},onChainChanged(i){const h=Number(i);c.emitter.emit("change",{chainId:h})},async onConnect(i){const h=await this.getAccounts();if(h.length===0)return;const y=Number(i.chainId);c.emitter.emit("connect",{accounts:h,chainId:y});const d=await this.getProvider();d&&(l&&(d.removeListener("connect",l),l=void 0),a||(a=this.onAccountsChanged.bind(this),d.on("accountsChanged",a)),o||(o=this.onChainChanged.bind(this),d.on("chainChanged",o)),s||(s=this.onDisconnect.bind(this),d.on("disconnect",s)))},async onDisconnect(i){const h=await this.getProvider();i&&i.code===1013&&h&&(await this.getAccounts()).length||(c.emitter.emit("disconnect"),h&&(o&&(h.removeListener("chainChanged",o),o=void 0),s&&(h.removeListener("disconnect",s),s=void 0),l||(l=this.onConnect.bind(this),h.on("connect",l))))}})}const fe={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider(e){return e?.coinbaseWalletExtension?e.coinbaseWalletExtension:j(e,"isCoinbaseWallet")}},metaMask:{id:"metaMask",name:"MetaMask",provider(e){return j(e,t=>{if(!t.isMetaMask||t.isBraveWallet&&!t._events&&!t._state)return!1;const r=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"];for(const n of r)if(t[n])return!1;return!0})}},phantom:{id:"phantom",name:"Phantom",provider(e){return e?.phantom?.ethereum?e.phantom?.ethereum:j(e,"isPhantom")}}};function j(e,t){function r(a){return typeof t=="function"?t(a):typeof t=="string"?a[t]:!0}const n=e.ethereum;if(n?.providers)return n.providers.find(a=>r(a));if(n&&r(n))return n}var V=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},me=class extends V{#t;#r;#e;constructor(){super(),this.#e=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#r||this.setEventListener(this.#e)}onUnsubscribe(){this.hasListeners()||(this.#r?.(),this.#r=void 0)}setEventListener(e){this.#e=e,this.#r?.(),this.#r=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},pe=new me,ye={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ve=class{#t=ye;#r=!1;setTimeoutProvider(e){this.#t=e}setTimeout(e,t){return this.#t.setTimeout(e,t)}clearTimeout(e){this.#t.clearTimeout(e)}setInterval(e,t){return this.#t.setInterval(e,t)}clearInterval(e){this.#t.clearInterval(e)}},I=new ve;function ge(e){setTimeout(e,0)}var we=typeof window>"u"||"Deno"in globalThis;function $(){}function He(e,t){return typeof e=="function"?e(t):e}function be(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ce(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pe(e,t){return typeof e=="function"?e(t):e}function Se(e,t){return typeof e=="function"?e(t):e}function Ve(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:o,queryKey:l,stale:s}=e;if(l){if(n){if(t.queryHash!==Fe(l,t.options))return!1}else if(!R(t.queryKey,l))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||a&&a!==t.state.fetchStatus||o&&!o(t))}function Je(e,t){const{exact:r,status:n,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(T(t.options.mutationKey)!==T(o))return!1}else if(!R(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function Fe(e,t){return(t?.queryKeyHashFn||T)(e)}function T(e){return JSON.stringify(e,(t,r)=>M(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function R(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>R(e[r],t[r])):!1}var Ee=Object.prototype.hasOwnProperty;function J(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=K(e)&&K(t);if(!n&&!(M(e)&&M(t)))return t;const o=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),s=l.length,c=n?new Array(s):{};let i=0;for(let h=0;h<s;h++){const y=n?h:l[h],d=e[y],m=t[y];if(d===m){c[y]=d,(n?h<o:Ee.call(e,y))&&i++;continue}if(d===null||m===null||typeof d!="object"||typeof m!="object"){c[y]=m;continue}const f=J(d,m,r+1);c[y]=f,f===d&&i++}return o===s&&i===o?e:c}function Ze(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function K(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function M(e){if(!_(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!_(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function _(e){return Object.prototype.toString.call(e)==="[object Object]"}function je(e){return new Promise(t=>{I.setTimeout(t,e)})}function Oe(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?J(e,t):t}function Ae(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function xe(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Z=Symbol();function X(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Z?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Xe(e,t){return typeof e=="function"?e(...t):!!e}function Ie(e,t,r){let n=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??=t(),n||(n=!0,a.aborted?r():a.addEventListener("abort",r,{once:!0})),a)}),e}var Y=(()=>{let e=()=>we;return{isServer(){return e()},setIsServer(t){e=t}}})();function Te(){let e,t;const r=new Promise((a,o)=>{e=a,t=o});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),e(a)},r.reject=a=>{n({status:"rejected",reason:a}),t(a)},r}var Me=ge;function qe(){let e=[],t=0,r=s=>{s()},n=s=>{s()},a=Me;const o=s=>{t?e.push(s):a(()=>{r(s)})},l=()=>{const s=e;e=[],s.length&&a(()=>{n(()=>{s.forEach(c=>{r(c)})})})};return{batch:s=>{let c;t++;try{c=s()}finally{t--,t||l()}return c},batchCalls:s=>(...c)=>{o(()=>{s(...c)})},schedule:o,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{a=s}}}var ee=qe(),Ue=class extends V{#t=!0;#r;#e;constructor(){super(),this.#e=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#r||this.setEventListener(this.#e)}onUnsubscribe(){this.hasListeners()||(this.#r?.(),this.#r=void 0)}setEventListener(e){this.#e=e,this.#r?.(),this.#r=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#t}},te=new Ue;function Re(e){return Math.min(1e3*2**e,3e4)}function re(e){return(e??"online")==="online"?te.isOnline():!0}var q=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function ne(e){let t=!1,r=0,n;const a=Te(),o=()=>a.status!=="pending",l=u=>{if(!o()){const p=new q(u);d(p),e.onCancel?.(p)}},s=()=>{t=!0},c=()=>{t=!1},i=()=>pe.isFocused()&&(e.networkMode==="always"||te.isOnline())&&e.canRun(),h=()=>re(e.networkMode)&&e.canRun(),y=u=>{o()||(n?.(),a.resolve(u))},d=u=>{o()||(n?.(),a.reject(u))},m=()=>new Promise(u=>{n=p=>{(o()||i())&&u(p)},e.onPause?.()}).then(()=>{n=void 0,o()||e.onContinue?.()}),f=()=>{if(o())return;let u;const p=r===0?e.initialPromise:void 0;try{u=p??e.fn()}catch(v){u=Promise.reject(v)}Promise.resolve(u).then(y).catch(v=>{if(o())return;const g=e.retry??(Y.isServer()?0:3),w=e.retryDelay??Re,S=typeof w=="function"?w(r,v):w,P=g===!0||typeof g=="number"&&r<g||typeof g=="function"&&g(r,v);if(t||!P){d(v);return}r++,e.onFail?.(r,v),je(S).then(()=>i()?void 0:m()).then(()=>{t?d(v):f()})})};return{promise:a,status:()=>a.status,cancel:l,continue:()=>(n?.(),a),cancelRetry:s,continueRetry:c,canStart:h,start:()=>(h()?f():m().then(f),a)}}var se=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),be(this.gcTime)&&(this.#t=I.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Y.isServer()?1/0:5*60*1e3))}clearGcTimeout(){this.#t&&(I.clearTimeout(this.#t),this.#t=void 0)}},Ye=class extends se{#t;#r;#e;#s;#n;#o;#a;constructor(e){super(),this.#a=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#e=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=G(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=G(this.options);t.data!==void 0&&(this.setState(W(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#e.remove(this)}setData(e,t){const r=Oe(this.state.data,e,this.options);return this.#i({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#n?.promise;return this.#n?.cancel(e),t?t.then($).catch($):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Se(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Z||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Pe(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Ce(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#e.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#n&&(this.#a||this.#c()?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#e.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const s=this.observers.find(c=>c.options.queryFn);s&&this.setOptions(s.options)}const r=new AbortController,n=s=>{Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(this.#a=!0,r.signal)})},a=()=>{const s=X(this.options,t),i=(()=>{const h={client:this.#s,queryKey:this.queryKey,meta:this.meta};return n(h),h})();return this.#a=!1,this.options.persister?this.options.persister(s,i,this):s(i)},l=(()=>{const s={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:a};return n(s),s})();this.options.behavior?.onFetch(l,this),this.#r=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#i({type:"fetch",meta:l.fetchOptions?.meta}),this.#n=ne({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:s=>{s instanceof q&&s.revert&&this.setState({...this.#r,fetchStatus:"idle"}),r.abort()},onFail:(s,c)=>{this.#i({type:"failed",failureCount:s,error:c})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const s=await this.#n.start();if(s===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(s),this.#e.config.onSuccess?.(s,this),this.#e.config.onSettled?.(s,this.state.error,this),s}catch(s){if(s instanceof q){if(s.silent)return this.#n.promise;if(s.revert){if(this.state.data===void 0)throw s;return this.state.data}}throw this.#i({type:"error",error:s}),this.#e.config.onError?.(s,this),this.#e.config.onSettled?.(this.state.data,s,this),s}finally{this.scheduleGc()}}#i(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...De(r.data,this.options),fetchMeta:e.meta??null};case"success":const n={...r,...W(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#r=e.manual?n:void 0,n;case"error":const a=e.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),ee.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#e.notify({query:this,type:"updated",action:e})})}};function De(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:re(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function W(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function G(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}function et(e){return{onFetch:(t,r)=>{const n=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},c=0;const i=async()=>{let h=!1;const y=f=>{Ie(f,()=>t.signal,()=>h=!0)},d=X(t.options,t.fetchOptions),m=async(f,u,p)=>{if(h)return Promise.reject();if(u==null&&f.pages.length)return Promise.resolve(f);const g=(()=>{const k={client:t.client,queryKey:t.queryKey,pageParam:u,direction:p?"backward":"forward",meta:t.options.meta};return y(k),k})(),w=await d(g),{maxPages:S}=t.options,P=p?xe:Ae;return{pages:P(f.pages,w,S),pageParams:P(f.pageParams,u,S)}};if(a&&o.length){const f=a==="backward",u=f?ie:U,p={pages:o,pageParams:l},v=u(n,p);s=await m(p,v,f)}else{const f=e??o.length;do{const u=c===0?l[0]??n.initialPageParam:U(n,s);if(c>0&&u==null)break;s=await m(s,u),c++}while(c<f)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(i,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=i}}}function U(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function ie(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}function tt(e,t){return t?U(e,t)!=null:!1}function rt(e,t){return!t||!e.getPreviousPageParam?!1:ie(e,t)!=null}var nt=class extends se{#t;#r;#e;#s;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#e=e.mutationCache,this.#r=[],this.state=e.state||ke(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#r.includes(e)||(this.#r.push(e),this.clearGcTimeout(),this.#e.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#r=this.#r.filter(t=>t!==e),this.scheduleGc(),this.#e.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#r.length||(this.state.status==="pending"?this.scheduleGc():this.#e.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#n({type:"continue"})},r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=ne({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(o,l)=>{this.#n({type:"failed",failureCount:o,error:l})},onPause:()=>{this.#n({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#e.canRun(this)});const n=this.state.status==="pending",a=!this.#s.canStart();try{if(n)t();else{this.#n({type:"pending",variables:e,isPaused:a}),this.#e.config.onMutate&&await this.#e.config.onMutate(e,this,r);const l=await this.options.onMutate?.(e,r);l!==this.state.context&&this.#n({type:"pending",context:l,variables:e,isPaused:a})}const o=await this.#s.start();return await this.#e.config.onSuccess?.(o,e,this.state.context,this,r),await this.options.onSuccess?.(o,e,this.state.context,r),await this.#e.config.onSettled?.(o,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(o,null,e,this.state.context,r),this.#n({type:"success",data:o}),o}catch(o){try{await this.#e.config.onError?.(o,e,this.state.context,this,r)}catch(l){Promise.reject(l)}try{await this.options.onError?.(o,e,this.state.context,r)}catch(l){Promise.reject(l)}try{await this.#e.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,r)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,o,e,this.state.context,r)}catch(l){Promise.reject(l)}throw this.#n({type:"error",error:o}),o}finally{this.#e.runNext(this)}}#n(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),ee.batch(()=>{this.#r.forEach(r=>{r.onMutationUpdate(e)}),this.#e.notify({mutation:this,type:"updated",action:e})})}};function ke(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}const D=await Q("react");var ae=D.createContext(void 0),st=e=>{const t=D.useContext(ae);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},it=({client:e,children:t})=>(D.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),oe.jsx(ae.Provider,{value:e,children:t}));export{Y as A,C as B,he as C,be as D,Ce as E,I as F,De as G,Oe as H,tt as I,rt as J,ke as K,J as L,nt as M,Xe as N,st as O,F as P,Ye as Q,_e as R,V as S,$ as a,Ve as b,He as c,T as d,ze as e,pe as f,H as g,Fe as h,et as i,it as j,$e as k,Qe as l,Je as m,ee as n,te as o,R as p,Ke as q,Pe as r,Z as s,Ge as t,We as u,Be as v,ce as w,Te as x,Se as y,Ze as z};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as M}from"./jsx-runtime-B1l0k91v.js";import{importShared as S}from"./__federation_fn_import-
|
|
1
|
+
import{j as M}from"./jsx-runtime-B1l0k91v.js";import{importShared as S}from"./__federation_fn_import-BPa8h49G.js";import{c as xr,T as Wt,a as $r,k as wr}from"./emotion-react.browser.esm-C8ovg3zA.js";import{g as L}from"./_commonjsHelpers-C4iS2aBk.js";import{_ as g,b as Er,s as Tr}from"./emotion-use-insertion-effect-with-fallbacks.browser.esm-ZrBNnPxm.js";function Cr(e){const{host:t}=e;return t.endsWith(".org")||t.endsWith(".co")?G.PRODUCTION:t.endsWith(".today")||t.endsWith(".net")?G.STAGING:t.endsWith(".io")||t.endsWith(".zone")?G.DEVELOPMENT:null}function Or(e){const t=new URLSearchParams(e.search),r=t.get("ENV")||t.get("env");if(r){const n=r.toLowerCase();if(Ut(n))return n}return null}var yt={},G;(function(e){e.DEVELOPMENT="dev",e.STAGING="stg",e.PRODUCTION="prod"})(G||(G={}));function Kt(){return Object.values(G)}function Ut(e){return Kt().includes(e)}function ye(e){if(Ut(e))return e;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${e}", possible values are ${Kt().map(t=>`"${t}"`).join(", ")}.`)}function Rr(e={}){const{DCL_DEFAULT_ENV:t,REACT_APP_DCL_DEFAULT_ENV:r,VITE_DCL_DEFAULT_ENV:n,GATSBY_DCL_DEFAULT_ENV:o}=e;if(t&&r&&t!==r)throw new Error("You have defined both DCL_DEFAULT_ENV and REACT_APP_DCL_DEFAULT_ENV with different values");if(t&&n&&t!==n)throw new Error("You have defined both DCL_DEFAULT_ENV and VITE_DCL_DEFAULT_ENV with different values");if(t&&o&&t!==o)throw new Error("You have defined both DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");if(r&&o&&r!==o)throw new Error("You have defined both REACT_APP_DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");return t?ye(t):r?ye(r):n?ye(n):o?ye(o):G.PRODUCTION}function Ar(e){if(typeof window<"u"){const r=Or(window.location);if(r)return r;const n=Cr(window.location);if(n)return n}return Rr(typeof e>"u"&&typeof process=="object"&&typeof yt=="object"?yt:e)}function Ta(e,t){const r=Ar(t?.systemEnvVariables),n=e[r];return{get:(o,s="")=>{if(!n)throw new Error(`Could not find a config for env=${r}`);return o in n?n[o]:s},is:o=>r===o,getEnv:()=>r}}var Gt={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Gt);var ee=Gt.exports,Ue={};const Vt=await S("react");function N(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Yt(e){if(Vt.isValidElement(e)||!N(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Yt(e[r])}),t}function k(e,t,r={clone:!0}){const n=r.clone?g({},e):e;return N(e)&&N(t)&&Object.keys(t).forEach(o=>{Vt.isValidElement(t[o])?n[o]=t[o]:N(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&N(e[o])?n[o]=k(e[o],t[o],r):r.clone?n[o]=N(t[o])?Yt(t[o]):t[o]:n[o]=t[o]}),n}const Pr=Object.freeze(Object.defineProperty({__proto__:null,default:k,isPlainObject:N},Symbol.toStringTag,{value:"Module"}));function ie(e){let t="https://mui.com/production-error/?code="+e;for(let r=1;r<arguments.length;r+=1)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}const jr=Object.freeze(Object.defineProperty({__proto__:null,default:ie},Symbol.toStringTag,{value:"Module"}));var Ht={exports:{}},y={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-is.production.js
|
|
4
4
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as i}from"./__federation_fn_import-BPa8h49G.js";import{j as t}from"./jsx-runtime-B1l0k91v.js";import{u as o,W as r,a}from"./Web3SyncProvider-CypbX7iI.js";import{W as d}from"./index-DIcECrTc.js";const{useContext:l,useLayoutEffect:u}=await i("react");function f({children:s}){const e=o(),n=l(d);return u(()=>{n({address:e.address,isConnected:e.isConnected,isConnecting:e.isConnecting,isDisconnecting:e.isDisconnecting,disconnect:e.disconnect})},[e.address,e.isConnected,e.isConnecting,e.isDisconnecting,e.disconnect,n]),t.jsx(t.Fragment,{children:s})}const{useEffect:m}=await i("react");function p({config:s,queryClient:e,onLoad:n,children:c}){return m(()=>{n?.()},[n]),t.jsx(r,{config:s,queryClient:e,children:t.jsx(a,{children:t.jsx(f,{children:c})})})}export{p as Web3Inner};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const __vite__fileDeps=["assets/index-CVdhIPEJ.js","assets/index-CNMKbeE1.js","assets/index-CGCGB-at.js","assets/index-CZsU5YW3.js","assets/__federation_fn_import-BPa8h49G.js","assets/createBundlerClient-CubtDgsV.js","assets/uid-Cg2-wLF5.js","assets/preload-helper-rvnS1VMA.js","assets/createClient-CR8DDHzD.js","assets/hooks.module-Cpp96UEK.js","assets/index-CdrMQoR6.js","assets/_commonjsHelpers-C4iS2aBk.js","assets/index-nibyPLVP.js","assets/index-BFKCpVu3.js","assets/___vite-browser-external_commonjs-proxy-BqV5D26a.js","assets/inherits_browser-BlmhoU4v.js","assets/index-JFBsW0Hp.js","assets/tslib.es6-DbvBTznf.js","assets/index.es-DNUnpMVo.js","assets/index.es-lnOl8KxA.js","assets/index.es-CK2zTp8L.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
|
+
import{importShared as b}from"./__federation_fn_import-BPa8h49G.js";import{c as W}from"./_commonjsHelpers-C4iS2aBk.js";import{s as ke,b as te,c as Se}from"./slice-Dr1G42o6.js";import{_ as F}from"./preload-helper-rvnS1VMA.js";import{S as We,M as nt,n as E,m as Ae,a as M,h as Ge,Q as it,b as Oe,f as rt,o as Pe,r as Me,c as at,i as De,d as qe,p as xe,s as st,e as he,C as fe,P as Te,g as ot,j as ct}from"./QueryClientProvider-diWVe5Kl.js";import{j as H}from"./jsx-runtime-B1l0k91v.js";function lt(e){const{chain:t}=e,n=t.rpcUrls.default.http[0];if(!e.transports)return[n];const r=e.transports?.[t.id]?.({chain:t});return(r?.value?.transports||[r]).map(({value:a})=>a?.url||n)}var ut=class extends We{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new nt({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=G(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=G(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=G(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(u=>u.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=G(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){E.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Ae(t,n))}findAll(e={}){return this.getAll().filter(t=>Ae(e,t))}notify(e){E.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return E.batch(()=>Promise.all(e.map(t=>t.continue().catch(M))))}};function G(e){return e.options.scope?.id}var dt=class extends We{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,u=t.queryHash??Ge(r,t);let a=this.get(u);return a||(a=new it({client:e,queryKey:r,queryHash:u,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){E.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Oe(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Oe(e,n)):t}notify(e){E.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){E.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){E.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ht=class{#e;#t;#n;#r;#a;#i;#s;#o;constructor(e={}){this.#e=e.queryCache||new dt,this.#t=e.mutationCache||new ut,this.#n=e.defaultOptions||{},this.#r=new Map,this.#a=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#s=rt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=Pe.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#s?.(),this.#s=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Me(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=this.#e.get(r.queryHash)?.state.data,o=at(t,a);if(o!==void 0)return this.#e.build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return E.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;E.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return E.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=E.batch(()=>this.#e.findAll(e).map(u=>u.cancel(n)));return Promise.all(r).then(M).catch(M)}invalidateQueries(e,t={}){return E.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=E.batch(()=>this.#e.findAll(e).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let a=u.fetch(void 0,n);return n.throwOnError||(a=a.catch(M)),u.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(M)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Me(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(M).catch(M)}fetchInfiniteQuery(e){return e.behavior=De(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(M).catch(M)}ensureInfiniteQueryData(e){return e.behavior=De(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Pe.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(qe(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{xe(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#a.set(qe(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()],n={};return t.forEach(r=>{xe(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ge(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===st&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};const{createConnector:ft}=await b("wagmi"),{ChainId:Q}=await b("@dcl/schemas"),Re={[Q.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet?project=magic",[Q.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia?project=magic",[Q.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon?project=magic",[Q.MATIC_AMOY]:"https://rpc.decentraland.org/amoy?project=magic"};function gt(e){const{apiKey:t}=e;let n=null,r=null;async function u(a){const{Magic:o}=await F(async()=>{const{Magic:c}=await import("./index-CVdhIPEJ.js");return{Magic:c}},__vite__mapDeps([0,1])),{OAuthExtension:s}=await F(async()=>{const{OAuthExtension:c}=await import("./index-CGCGB-at.js");return{OAuthExtension:c}},__vite__mapDeps([2,1])),i=Re[a]||Re[Q.ETHEREUM_MAINNET];return new o(t,{extensions:[new s],network:{rpcUrl:i,chainId:a}})}return ft(a=>{async function o(){return r?await r.request({method:"eth_accounts"}):[]}async function s(i){r=await n.wallet.getProvider();const c=await o();return c.length===0?null:(await a.storage?.setItem("magicChainId",i),{accounts:c,chainId:i})}return{id:"magic",name:"Magic",type:"magic",async setup(){let i=!1;try{i=!!localStorage.getItem("dcl_magic_user_email")}catch{}const c=await a.storage?.getItem("magicChainId"),g=c??a.chains[0]?.id;if(!(!g||!c&&!i))try{if(n=await u(g),await n.user.isLoggedIn()){const l=await s(g);l&&a.emitter.emit("connect",l)}}catch{}},async connect({chainId:i}={}){const c=i??a.chains[0].id;if(n||(n=await u(c)),!await n.user.isLoggedIn())throw new Error("Magic: User is not logged in. Please authenticate via the auth dapp first.");const h=await s(c);if(!h)throw new Error("Magic: No accounts found");return h},async disconnect(){n&&await n.user.logout(),n=null,r=null,await a.storage?.removeItem("magicChainId")},async getAccounts(){return o()},async getChainId(){return await a.storage?.getItem("magicChainId")??a.chains[0].id},async getProvider(){return!r&&n&&(r=await n.wallet.getProvider()),r},async isAuthorized(){try{if(!n){const i=await a.storage?.getItem("magicChainId");if(!i)return!1;n=await u(i)}return await n.user.isLoggedIn()}catch{return!1}},async switchChain({chainId:i}){const c=a.chains.find(h=>h.id===i);if(!c)throw new Error(`Chain ${i} not configured`);if(n=await u(i),!await n.user.isLoggedIn())throw new Error("Magic: User is not logged in");return r=await n.wallet.getProvider(),await a.storage?.setItem("magicChainId",i),a.emitter.emit("change",{chainId:i}),c},onAccountsChanged(i){i.length===0?this.onDisconnect():a.emitter.emit("change",{accounts:i})},onChainChanged(i){const c=i.startsWith("0x")?parseInt(i,16):Number(i);a.emitter.emit("change",{chainId:c})},onDisconnect(){a.emitter.emit("disconnect"),n=null,r=null}}})}const{getAddress:N,numberToHex:z,SwitchChainError:B,UserRejectedRequestError:L}=await b("viem");Y.type="coinbaseWallet";function Y(e={}){return e.version==="3"||e.headlessMode?mt(e):pt(e)}function pt(e){let t,n,r,u;return he(a=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",rdns:"com.coinbase.wallet",type:Y.type,async connect({chainId:o,withCapabilities:s,...i}={}){try{const c=await this.getProvider(),g=(await c.request({method:"eth_requestAccounts",params:"instantOnboarding"in i&&i.instantOnboarding?[{onboarding:"instant"}]:[]})).map(l=>N(l));n||(n=this.onAccountsChanged.bind(this),c.on("accountsChanged",n)),r||(r=this.onChainChanged.bind(this),c.on("chainChanged",r)),u||(u=this.onDisconnect.bind(this),c.on("disconnect",u));let h=await this.getChainId();return o&&h!==o&&(h=(await this.switchChain({chainId:o}).catch(f=>{if(f.code===L.code)throw f;return{id:h}}))?.id??h),{accounts:s?g.map(l=>({address:l,capabilities:{}})):g,chainId:h}}catch(c){throw/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(c.message)?new L(c):c}},async disconnect(){const o=await this.getProvider();n&&(o.removeListener("accountsChanged",n),n=void 0),r&&(o.removeListener("chainChanged",r),r=void 0),u&&(o.removeListener("disconnect",u),u=void 0),o.disconnect(),o.close?.()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(s=>N(s))},async getChainId(){const s=await(await this.getProvider()).request({method:"eth_chainId"});return Number(s)},async getProvider(){if(!t){const o=typeof e.preference=="string"?{options:e.preference}:{...e.preference,options:e.preference?.options??"all"},{createCoinbaseWalletSDK:s}=await F(async()=>{const{createCoinbaseWalletSDK:c}=await import("./index-CZsU5YW3.js");return{createCoinbaseWalletSDK:c}},__vite__mapDeps([3,4,5,6,7,8,9,10,11,12]));t=s({...e,appChainIds:a.chains.map(c=>c.id),preference:o}).getProvider()}return t},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:o,chainId:s}){const i=a.chains.find(g=>g.id===s);if(!i)throw new B(new fe);const c=await this.getProvider();try{return await c.request({method:"wallet_switchEthereumChain",params:[{chainId:z(i.id)}]}),i}catch(g){if(g.code===4902)try{let h;o?.blockExplorerUrls?h=o.blockExplorerUrls:h=i.blockExplorers?.default.url?[i.blockExplorers?.default.url]:[];let l;o?.rpcUrls?.length?l=o.rpcUrls:l=[i.rpcUrls.default?.http[0]??""];const f={blockExplorerUrls:h,chainId:z(s),chainName:o?.chainName??i.name,iconUrls:o?.iconUrls,nativeCurrency:o?.nativeCurrency??i.nativeCurrency,rpcUrls:l};return await c.request({method:"wallet_addEthereumChain",params:[f]}),i}catch(h){throw new L(h)}throw new B(g)}},onAccountsChanged(o){o.length===0?this.onDisconnect():a.emitter.emit("change",{accounts:o.map(s=>N(s))})},onChainChanged(o){const s=Number(o);a.emitter.emit("change",{chainId:s})},async onDisconnect(o){a.emitter.emit("disconnect");const s=await this.getProvider();n&&(s.removeListener("accountsChanged",n),n=void 0),r&&(s.removeListener("chainChanged",r),r=void 0),u&&(s.removeListener("disconnect",u),u=void 0)}}))}function mt(e){let n,r,u,a,o;return he(s=>({id:"coinbaseWalletSDK",name:"Coinbase Wallet",rdns:"com.coinbase.wallet",type:Y.type,async connect({chainId:i,withCapabilities:c}={}){try{const g=await this.getProvider(),h=(await g.request({method:"eth_requestAccounts"})).map(f=>N(f));u||(u=this.onAccountsChanged.bind(this),g.on("accountsChanged",u)),a||(a=this.onChainChanged.bind(this),g.on("chainChanged",a)),o||(o=this.onDisconnect.bind(this),g.on("disconnect",o));let l=await this.getChainId();return i&&l!==i&&(l=(await this.switchChain({chainId:i}).catch(y=>{if(y.code===L.code)throw y;return{id:l}}))?.id??l),{accounts:c?h.map(f=>({address:f,capabilities:{}})):h,chainId:l}}catch(g){throw/(user closed modal|accounts received is empty|user denied account)/i.test(g.message)?new L(g):g}},async disconnect(){const i=await this.getProvider();u&&(i.removeListener("accountsChanged",u),u=void 0),a&&(i.removeListener("chainChanged",a),a=void 0),o&&(i.removeListener("disconnect",o),o=void 0),i.disconnect(),i.close()},async getAccounts(){return(await(await this.getProvider()).request({method:"eth_accounts"})).map(c=>N(c))},async getChainId(){const c=await(await this.getProvider()).request({method:"eth_chainId"});return Number(c)},async getProvider(){if(!r){const i=await(async()=>{const{default:f}=await F(async()=>{const{default:y}=await import("./index-BFKCpVu3.js").then(m=>m.i);return{default:y}},__vite__mapDeps([13,11,14,10,15,16,9,17]));return typeof f!="function"&&typeof f.default=="function"?f.default:f})();n=new i({...e,reloadOnDisconnect:!1});const c=n.walletExtension?.getChainId(),g=s.chains.find(f=>e.chainId?f.id===e.chainId:f.id===c)||s.chains[0],h=e.chainId||g?.id,l=e.jsonRpcUrl||g?.rpcUrls.default.http[0];r=n.makeWeb3Provider(l,h)}return r},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:i,chainId:c}){const g=s.chains.find(l=>l.id===c);if(!g)throw new B(new fe);const h=await this.getProvider();try{return await h.request({method:"wallet_switchEthereumChain",params:[{chainId:z(g.id)}]}),g}catch(l){if(l.code===4902)try{let f;i?.blockExplorerUrls?f=i.blockExplorerUrls:f=g.blockExplorers?.default.url?[g.blockExplorers?.default.url]:[];let y;i?.rpcUrls?.length?y=i.rpcUrls:y=[g.rpcUrls.default?.http[0]??""];const m={blockExplorerUrls:f,chainId:z(c),chainName:i?.chainName??g.name,iconUrls:i?.iconUrls,nativeCurrency:i?.nativeCurrency??g.nativeCurrency,rpcUrls:y};return await h.request({method:"wallet_addEthereumChain",params:[m]}),g}catch(f){throw new L(f)}throw new B(l)}},onAccountsChanged(i){i.length===0?this.onDisconnect():s.emitter.emit("change",{accounts:i.map(c=>N(c))})},onChainChanged(i){const c=Number(i);s.emitter.emit("change",{chainId:c})},async onDisconnect(i){s.emitter.emit("disconnect");const c=await this.getProvider();u&&(c.removeListener("accountsChanged",u),u=void 0),a&&(c.removeListener("chainChanged",a),a=void 0),o&&(c.removeListener("disconnect",o),o=void 0)}}))}const{getAddress:ne,numberToHex:Ne,SwitchChainError:wt,UserRejectedRequestError:$}=await b("viem");ge.type="walletConnect";function ge(e){const t=e.isNewChainsStale??!0;let n,r;const u="eip155";let a,o,s,i,c,g;return he(h=>({id:"walletConnect",name:"WalletConnect",type:ge.type,async setup(){const l=await this.getProvider().catch(()=>null);l&&(s||(s=this.onConnect.bind(this),l.on("connect",s)),c||(c=this.onSessionDelete.bind(this),l.on("session_delete",c)))},async connect({chainId:l,withCapabilities:f,...y}={}){try{const m=await this.getProvider();if(!m)throw new Te;i||(i=this.onDisplayUri,m.on("display_uri",i));let v=l;if(!v){const w=await h.storage?.getItem("state")??{};h.chains.some(I=>I.id===w.chainId)?v=w.chainId:v=h.chains[0]?.id}if(!v)throw new Error("No chains found on connector.");const S=await this.isChainsStale();if(m.session&&S&&await m.disconnect(),!m.session||S){const w=h.chains.filter(_=>_.id!==v).map(_=>_.id);await m.connect({optionalChains:[v,...w],..."pairingTopic"in y?{pairingTopic:y.pairingTopic}:{}}),this.setRequestedChainsIds(h.chains.map(_=>_.id))}const d=(await m.enable()).map(w=>ne(w));let p=await this.getChainId();return l&&p!==l&&(p=(await this.switchChain({chainId:l}).catch(_=>{if(_.code===$.code&&_.cause?.message!=="Missing or invalid. request() method: wallet_addEthereumChain")throw _;return{id:p}}))?.id??p),i&&(m.removeListener("display_uri",i),i=void 0),s&&(m.removeListener("connect",s),s=void 0),a||(a=this.onAccountsChanged.bind(this),m.on("accountsChanged",a)),o||(o=this.onChainChanged.bind(this),m.on("chainChanged",o)),g||(g=this.onDisconnect.bind(this),m.on("disconnect",g)),c||(c=this.onSessionDelete.bind(this),m.on("session_delete",c)),{accounts:f?d.map(w=>({address:w,capabilities:{}})):d,chainId:p}}catch(m){throw/(user rejected|connection request reset)/i.test(m?.message)?new $(m):m}},async disconnect(){const l=await this.getProvider();try{await l?.disconnect()}catch(f){if(!/No matching key/i.test(f.message))throw f}finally{o&&(l?.removeListener("chainChanged",o),o=void 0),g&&(l?.removeListener("disconnect",g),g=void 0),s||(s=this.onConnect.bind(this),l?.on("connect",s)),a&&(l?.removeListener("accountsChanged",a),a=void 0),c&&(l?.removeListener("session_delete",c),c=void 0),this.setRequestedChainsIds([])}},async getAccounts(){return(await this.getProvider()).accounts.map(f=>ne(f))},async getProvider({chainId:l}={}){async function f(){const y=h.chains.map(v=>v.id);if(!y.length)return;const{EthereumProvider:m}=await F(async()=>{const{EthereumProvider:v}=await import("./index.es-DNUnpMVo.js");return{EthereumProvider:v}},__vite__mapDeps([18,7,11,4,19,12,20]));return await m.init({...e,disableProviderPing:!0,optionalChains:y,projectId:e.projectId,rpcMap:Object.fromEntries(h.chains.map(v=>{const[S]=lt({chain:v,transports:h.transports});return[v.id,S]})),showQrModal:e.showQrModal??!0})}return n||(r||(r=f()),n=await r,n?.events.setMaxListeners(Number.POSITIVE_INFINITY)),l&&await this.switchChain?.({chainId:l}),n},async getChainId(){return(await this.getProvider()).chainId},async isAuthorized(){try{const[l,f]=await Promise.all([this.getAccounts(),this.getProvider()]);return l.length?await this.isChainsStale()&&f.session?(await f.disconnect().catch(()=>{}),!1):!0:!1}catch{return!1}},async switchChain({addEthereumChainParameter:l,chainId:f}){const y=await this.getProvider();if(!y)throw new Te;const m=h.chains.find(v=>v.id===f);if(!m)throw new wt(new fe);try{await Promise.all([new Promise(S=>{const d=({chainId:p})=>{p===f&&(h.emitter.off("change",d),S())};h.emitter.on("change",d)}),y.request({method:"wallet_switchEthereumChain",params:[{chainId:Ne(f)}]})]);const v=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...v,f]),m}catch(v){const S=v;if(/(user rejected)/i.test(S.message))throw new $(S);try{let d;l?.blockExplorerUrls?d=l.blockExplorerUrls:d=m.blockExplorers?.default.url?[m.blockExplorers?.default.url]:[];let p;l?.rpcUrls?.length?p=l.rpcUrls:p=[...m.rpcUrls.default.http];const w={blockExplorerUrls:d,chainId:Ne(f),chainName:l?.chainName??m.name,iconUrls:l?.iconUrls,nativeCurrency:l?.nativeCurrency??m.nativeCurrency,rpcUrls:p};await y.request({method:"wallet_addEthereumChain",params:[w]});const _=await this.getRequestedChainsIds();return this.setRequestedChainsIds([..._,f]),m}catch(d){throw new $(d)}}},onAccountsChanged(l){l.length===0?this.onDisconnect():h.emitter.emit("change",{accounts:l.map(f=>ne(f))})},onChainChanged(l){const f=Number(l);h.emitter.emit("change",{chainId:f})},async onConnect(l){const f=Number(l.chainId),y=await this.getAccounts();h.emitter.emit("connect",{accounts:y,chainId:f})},async onDisconnect(l){this.setRequestedChainsIds([]),h.emitter.emit("disconnect");const f=await this.getProvider();a&&(f.removeListener("accountsChanged",a),a=void 0),o&&(f.removeListener("chainChanged",o),o=void 0),g&&(f.removeListener("disconnect",g),g=void 0),c&&(f.removeListener("session_delete",c),c=void 0),s||(s=this.onConnect.bind(this),f.on("connect",s))},onDisplayUri(l){h.emitter.emit("message",{type:"display_uri",data:l})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){return n?n.session?.namespaces[u]?.accounts?.map(f=>Number.parseInt(f.split(":")[1]||"",10))??[]:[]},async getRequestedChainsIds(){return await h.storage?.getItem(this.requestedChainsStorageKey)??[]},async isChainsStale(){if(!t)return!1;const l=h.chains.map(m=>m.id),f=this.getNamespaceChainsIds();if(f.length&&!f.some(m=>l.includes(m)))return!1;const y=await this.getRequestedChainsIds();return!l.every(m=>y.includes(m))},async setRequestedChainsIds(l){await h.storage?.setItem(this.requestedChainsStorageKey,l)},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}}))}const{createConfig:yt,http:re}=await b("wagmi"),{ChainId:K}=await b("@dcl/schemas"),R={name:"Decentraland",description:"Decentraland dApp",url:"https://decentraland.org",icons:["https://cdn.decentraland.org/@dcl/marketplace-site/6.41.1/favicon.ico"]},vt="61570c542c2d66c659492e5b24a41522",_t="pk_live_CE856A4938B36648",Le="pk_live_212568025B158355",ie={dev:_t,stg:Le,prd:Le},Ct={[K.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[K.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[K.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[K.MATIC_AMOY]:"https://rpc.decentraland.org/amoy"},It=ke.reduce((e,t)=>{const n=Ct[t.id];return e[t.id]=n?re(n):re(),e},{});function bt(e,t){const n=t.trim();if(!n)return e;const r=e.replace(/\/+$/,""),u=n.startsWith("/")?n:`/${n}`;return`${r}${u}`}function Et(e){if(!e)return R;const t=e.url??(e.urlPath?bt(R.url,e.urlPath):R.url);return{name:e.name??R.name,description:e.description??R.description,url:t,icons:e.icons??R.icons}}function sn(e={}){const{walletConnectProjectId:t=vt,environment:n="prd",appMetadata:r,chains:u=ke,transports:a,connectors:o={},additionalConnectors:s=[]}=e;if(!Object.prototype.hasOwnProperty.call(ie,n))throw new Error(`Invalid environment "${n}". Expected one of: ${Object.keys(ie).join(", ")}`);const i=Et(r),{injected:c=!0,walletConnect:g=!0,coinbaseWallet:h=!0,magic:l=!0}=o,f=u.reduce((m,v)=>(m[v.id]=a?.[v.id]??It[v.id]??re(),m),{}),y=[];if(c&&y.push(ot()),g&&y.push(ge({projectId:t,metadata:{name:i.name,description:i.description??"",url:i.url,icons:i.icons??[]}})),h&&y.push(Y({appName:i.name})),l!==!1){const m=typeof l=="object"?l.apiKey:ie[n];y.push(gt({apiKey:m}))}return y.push(...s),yt({chains:u,transports:f,connectors:y})}function on(){if(typeof window>"u"||!window.localStorage)return;const e=[],{localStorage:t}=window;for(let n=0;n<t.length;n++){const r=t.key(n);r?.startsWith("wagmi.")&&e.push(r)}e.forEach(n=>t.removeItem(n))}function St(){typeof window>"u"||!window.localStorage||window.localStorage.removeItem("decentraland-connect-storage-key")}var $e={},O={},ae={exports:{}},se={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){if(r==null)throw new TypeError("Expected a string but received a ".concat(r));if(r.constructor.name!=="String")throw new TypeError("Expected a string but received a ".concat(r.constructor.name))}e.exports=t.default,e.exports.default=t.default})(se,se.exports);var pe=se.exports,oe={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function n(u){return Object.prototype.toString.call(u)==="[object RegExp]"}function r(u,a){for(var o=0;o<a.length;o++){var s=a[o];if(u===s||n(s)&&s.test(u))return!0}return!1}e.exports=t.default,e.exports.default=t.default})(oe,oe.exports);var At=oe.exports,ce={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(u,a){return u.indexOf(a)!==-1};t.default=n,e.exports=t.default,e.exports.default=t.default})(ce,ce.exports);var Ot=ce.exports,le={exports:{}},ue={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=arguments.length>1?arguments[1]:void 0;for(var a in u)typeof r[a]>"u"&&(r[a]=u[a]);return r}e.exports=t.default,e.exports.default=t.default})(ue,ue.exports);var Ke=ue.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var n=u(pe),r=u(Ke);function u(s){return s&&s.__esModule?s:{default:s}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function o(s,i){(0,n.default)(s),i=(0,r.default)(i,a),i.allow_trailing_dot&&s[s.length-1]==="."&&(s=s.substring(0,s.length-1)),i.allow_wildcard===!0&&s.indexOf("*.")===0&&(s=s.substring(2));var c=s.split("."),g=c[c.length-1];return i.require_tld&&(c.length<2||!i.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(g)||/\s/.test(g))||!i.allow_numeric_tld&&/^\d+$/.test(g)?!1:c.every(function(h){return!(h.length>63&&!i.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(h)||/[\uff01-\uff5e]/.test(h)||/^-|-$/.test(h)||!i.allow_underscores&&/_/.test(h))})}e.exports=t.default,e.exports.default=t.default})(le,le.exports);var Pt=le.exports,de={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var n=r(pe);function r(h){return h&&h.__esModule?h:{default:h}}function u(h){"@babel/helpers - typeof";return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},u(h)}var a="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",o="(".concat(a,"[.]){3}").concat(a),s=new RegExp("^".concat(o,"$")),i="(?:[0-9a-fA-F]{1,4})",c=new RegExp("^("+"(?:".concat(i,":){7}(?:").concat(i,"|:)|")+"(?:".concat(i,":){6}(?:").concat(o,"|:").concat(i,"|:)|")+"(?:".concat(i,":){5}(?::").concat(o,"|(:").concat(i,"){1,2}|:)|")+"(?:".concat(i,":){4}(?:(:").concat(i,"){0,1}:").concat(o,"|(:").concat(i,"){1,3}|:)|")+"(?:".concat(i,":){3}(?:(:").concat(i,"){0,2}:").concat(o,"|(:").concat(i,"){1,4}|:)|")+"(?:".concat(i,":){2}(?:(:").concat(i,"){0,3}:").concat(o,"|(:").concat(i,"){1,5}|:)|")+"(?:".concat(i,":){1}(?:(:").concat(i,"){0,4}:").concat(o,"|(:").concat(i,"){1,6}|:)|")+"(?::((?::".concat(i,"){0,5}:").concat(o,"|(?::").concat(i,"){1,7}|:))")+")(%[0-9a-zA-Z.]{1,})?$");function g(h){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,n.default)(h);var f=(u(l)==="object"?l.version:arguments[1])||"";return f?f.toString()==="4"?s.test(h):f.toString()==="6"?c.test(h):!1:g(h,{version:4})||g(h,{version:6})}e.exports=t.default,e.exports.default=t.default})(de,de.exports);var Mt=de.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=S;var n=i(pe),r=i(At),u=i(Ot),a=i(Pt),o=i(Mt),s=i(Ke);function i(d){return d&&d.__esModule?d:{default:d}}function c(d,p){return y(d)||f(d,p)||h(d,p)||g()}function g(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h(d,p){if(d){if(typeof d=="string")return l(d,p);var w={}.toString.call(d).slice(8,-1);return w==="Object"&&d.constructor&&(w=d.constructor.name),w==="Map"||w==="Set"?Array.from(d):w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w)?l(d,p):void 0}}function l(d,p){(p==null||p>d.length)&&(p=d.length);for(var w=0,_=Array(p);w<p;w++)_[w]=d[w];return _}function f(d,p){var w=d==null?null:typeof Symbol<"u"&&d[Symbol.iterator]||d["@@iterator"];if(w!=null){var _,I,x,q,A=[],C=!0,D=!1;try{if(x=(w=w.call(d)).next,p!==0)for(;!(C=(_=x.call(w)).done)&&(A.push(_.value),A.length!==p);C=!0);}catch(T){D=!0,I=T}finally{try{if(!C&&w.return!=null&&(q=w.return(),Object(q)!==q))return}finally{if(D)throw I}}return A}}function y(d){if(Array.isArray(d))return d}var m={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},v=/^\[([^\]]+)\](?::([0-9]+))?$/;function S(d,p){if((0,n.default)(d),!d||/[\s<>]/.test(d)||d.indexOf("mailto:")===0||(p=(0,s.default)(p,m),p.validate_length&&d.length>p.max_allowed_length)||!p.allow_fragments&&(0,u.default)(d,"#")||!p.allow_query_components&&((0,u.default)(d,"?")||(0,u.default)(d,"&")))return!1;var w,_,I,x,q,A,C,D;C=d.split("#"),d=C.shift(),C=d.split("?"),d=C.shift();var T=d.match(/^([a-z][a-z0-9+\-.]*):/i),ve=!1,Z=function(tt){return ve=!0,w=tt.toLowerCase(),p.require_valid_protocol&&p.protocols.indexOf(w)===-1?!1:d.substring(T[0].length)};if(T){var X=T[1],U=d.substring(T[0].length),ze=U.slice(0,2)==="//";if(ze){if(d=Z(X),d===!1)return!1}else{var _e=U.indexOf("/"),Ce=_e===-1?U:U.substring(0,_e),Ie=Ce.indexOf("@");if(Ie!==-1){var be=Ce.substring(0,Ie),Be=/^[a-zA-Z0-9\-_.%:]*$/,Ve=Be.test(be),Ye=/%[0-9a-fA-F]{2}/.test(be);if(Ve&&!Ye){if(p.require_protocol)return!1}else if(d=Z(X),d===!1)return!1}else{var Je=/^[0-9]/.test(U);if(Je){if(p.require_protocol)return!1}else if(d=Z(X),d===!1)return!1}}}else if(p.require_protocol)return!1;if(d.slice(0,2)==="//"){if(!ve&&!p.allow_protocol_relative_urls)return!1;d=d.slice(2)}if(d==="")return!1;if(C=d.split("/"),d=C.shift(),d===""&&!p.require_host)return!0;if(C=d.split("@"),C.length>1){if(p.disallow_auth||C[0]===""||(_=C.shift(),_.indexOf(":")>=0&&_.split(":").length>2))return!1;var Ze=_.split(":"),Ee=c(Ze,2),Xe=Ee[0],et=Ee[1];if(Xe===""&&et==="")return!1}x=C.join("@"),A=null,D=null;var ee=x.match(v);if(ee?(I="",D=ee[1],A=ee[2]||null):(C=x.split(":"),I=C.shift(),C.length&&(A=C.join(":"))),A!==null&&A.length>0){if(q=parseInt(A,10),!/^[0-9]+$/.test(A)||q<=0||q>65535)return!1}else if(p.require_port)return!1;return p.host_whitelist?(0,r.default)(I,p.host_whitelist):I===""&&!p.require_host?!0:!(!(0,o.default)(I)&&!(0,a.default)(I,p)&&(!D||!(0,o.default)(D,6))||(I=I||D,p.host_blacklist&&(0,r.default)(I,p.host_blacklist)))}e.exports=t.default,e.exports.default=t.default})(ae,ae.exports);var Dt=ae.exports,me={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.localStorageClearIdentity=e.localStorageStoreIdentity=e.localStorageGetIdentity=e.createMessage=e.SINGLE_SIGN_ON_TARGET=e.Action=void 0;var t;(function(s){s.GET="get",s.STORE="store",s.CLEAR="clear",s.PING="ping"})(t||(e.Action=t={})),e.SINGLE_SIGN_ON_TARGET="single-sign-on";function n(s){return{target:e.SINGLE_SIGN_ON_TARGET,...s}}e.createMessage=n;function r(s){const i=localStorage.getItem(o(s));if(!i)return null;let c;try{c=JSON.parse(i)}catch{return a(s),null}return c.expiration=new Date(c.expiration),c.expiration.getTime()<=Date.now()?(a(s),null):c}e.localStorageGetIdentity=r;function u(s,i){new Date(i.expiration).getTime()>Date.now()&&localStorage.setItem(o(s),JSON.stringify(i))}e.localStorageStoreIdentity=u;function a(s){localStorage.removeItem(o(s))}e.localStorageClearIdentity=a;function o(s){if(!/^0x[a-fA-F0-9]{40}$/.test(s))throw new Error("User must be a valid ethereum address");return`single-sign-on-${s.toLowerCase()}`}})(me);Object.defineProperty(O,"__esModule",{value:!0});O.clearIdentity=O.storeIdentity=O.getIdentity=O.init=void 0;const qt=Dt,P=me,He=P.SINGLE_SIGN_ON_TARGET,Ue=500,xt=5;let je=0,V="";const Tt={protocols:["https"],require_protocol:!0};function Rt(e,t={}){if(!(0,qt.default)(e,{...Tt,...t}))throw new Error(`Invalid url: ${e}`);if(V)throw new Error("Already initialized");const n=document.createElement("iframe");n.id=He,n.src=e,n.style.width="0",n.style.height="0",n.style.border="none",n.style.position="absolute",document.body.appendChild(n),V=e}O.init=Rt;async function Nt(e){let t;try{t=(await J(await we(),P.Action.GET,{user:e})).identity??null}catch(n){ye(n),t=(0,P.localStorageGetIdentity)(e)}return t}O.getIdentity=Nt;async function Lt(e,t){try{await J(await we(),P.Action.STORE,{user:e,identity:t})}catch(n){ye(n),(0,P.localStorageStoreIdentity)(e,t)}}O.storeIdentity=Lt;async function Ut(e){try{await J(await we(),P.Action.CLEAR,{user:e})}catch(t){ye(t),(0,P.localStorageClearIdentity)(e)}}O.clearIdentity=Ut;async function we(){if(!V)throw new Error("Not initialized");for(let e=0;e<xt;e++){const n=document.getElementById(He)?.contentWindow;if(!n){await jt(Ue);continue}try{await J(n,P.Action.PING,{},Ue)}catch{continue}return n}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function J(e,t,n,r=0){je++;const u=je;let a=null;const o=new Promise((s,i)=>{a=({data:c})=>{!c||c.target!==P.SINGLE_SIGN_ON_TARGET||c.id!==u||(c.error?i(new Error(c.error)):s(c))},window.addEventListener("message",a)});e.postMessage((0,P.createMessage)({id:u,action:t,...n}),V);try{return await(r?Promise.race([o,new Promise((s,i)=>setTimeout(()=>i(new Error("Did not receive a response in time")),r))]):o)}catch(s){throw s}finally{a&&window.removeEventListener("message",a)}}function jt(e){return new Promise(t=>setTimeout(t,e))}function ye(e){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",e.message)}(function(e){var t=W&&W.__createBinding||(Object.create?function(r,u,a,o){o===void 0&&(o=a);var s=Object.getOwnPropertyDescriptor(u,a);(!s||("get"in s?!u.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return u[a]}}),Object.defineProperty(r,o,s)}:function(r,u,a,o){o===void 0&&(o=a),r[o]=u[a]}),n=W&&W.__exportStar||function(r,u){for(var a in r)a!=="default"&&!Object.prototype.hasOwnProperty.call(u,a)&&t(u,r,a)};Object.defineProperty(e,"__esModule",{value:!0}),n(O,e),n(me,e)})($e);const k=e=>e.wallet,Qt=e=>k(e).address,Ft=e=>k(e).isConnected,kt=e=>k(e).isConnecting,Wt=e=>k(e).isDisconnecting,Gt=e=>k(e).error,{useCallback:Qe}=await b("react"),{useSelector:j}=await b("react-redux"),{useConnect:$t,useDisconnect:Kt}=await b("wagmi");function cn(){const e=j(Qt),t=j(Ft),n=j(kt),r=j(Wt),u=j(Gt),{connect:a,connectors:o,isPending:s}=$t(),{disconnect:i,isPending:c}=Kt(),g=Qe(l=>{a({connector:l})},[a]),h=Qe(()=>{e&&$e.localStorageClearIdentity(e),i(),St()},[e,i]);return{address:e,isConnected:t,isConnecting:n||s,isDisconnecting:r||c,error:u,connectors:o,connect:g,disconnect:h}}const{useMemo:Ht}=await b("react"),{WagmiProvider:zt}=await b("wagmi");function Bt(){return new ht({defaultOptions:{queries:{staleTime:1e3*60,retry:1}}})}function ln({config:e,queryClient:t,children:n}){const r=Ht(()=>t??Bt(),[t]);return H.jsx(zt,{config:e,children:H.jsx(ct,{client:r,children:n})})}const{useEffect:Fe}=await b("react"),{useDispatch:Vt}=await b("react-redux"),{useAccount:Yt,useChainId:Jt}=await b("wagmi");function un({children:e}){const t=Vt(),{address:n,isConnecting:r,isConnected:u,isReconnecting:a}=Yt(),o=Jt();return Fe(()=>{u&&n?(t(te.setAccount(n)),t(Se.setChain(o))):!u&&!r&&!a&&(t(te.reset()),t(Se.setChain(null)))},[t,n,u,r,a,o]),Fe(()=>{t(te.setConnecting(r||a))},[t,r,a]),H.jsx(H.Fragment,{children:e})}export{ln as W,un as a,on as b,St as c,$e as d,sn as e,Ft as f,Qt as g,kt as h,Wt as i,Gt as j,k,gt as m,cn as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as t}from"./__federation_fn_import-BPa8h49G.js";import{j as e}from"./jsx-runtime-B1l0k91v.js";import{s as n,I as l,e as i,H as c,C as m}from"./HomePage-DPGatVCF.js";const{useMemo:x}=await t("react"),{Provider:d}=await t("react-redux"),{Route:r,Routes:j}=await t("react-router-dom"),{TranslationProvider:u}=await t("@dcl/hooks");function v({identity:a,address:o}){const s=x(()=>({identity:a,hasValidIdentity:!!a,address:o}),[a,o]);return e.jsx(d,{store:n,children:e.jsx(l.Provider,{value:s,children:e.jsx(u,{locale:"en",translations:{en:i},fallbackLocale:"en",children:e.jsxs(j,{children:[e.jsx(r,{path:"/",element:e.jsx(c,{standalone:!1})}),e.jsx(r,{path:"/new-event",element:e.jsx(m,{})})]})})})})}export{v as default};
|