@dcl/blog-site 0.3.1-24473826569.commit-b003ca7 → 0.3.1-24533807769.commit-2e68981
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/{QueryClientProvider-COL_hK7X.js → QueryClientProvider-Dv18L3Bf.js} +2 -2
- package/assets/SignInRedirect-CXE_9i3I.js +9 -0
- package/assets/WalletStateProvider-Bb79ArZ-.js +1 -0
- package/assets/Web3Inner-CgxSXeS_.js +1 -0
- package/assets/Web3SyncProvider-D6_GzSKM.js +2 -0
- package/assets/{X-le_324bT.js → X-Bfq5REIM.js} +1 -1
- package/assets/__federation_expose_App-c8Vsr-t8.js +1 -0
- package/assets/__federation_fn_import-BxyPyKYw.js +1 -0
- package/assets/__federation_shared_@dcl/core-web3/lazy-CB9aN5En.js +2 -0
- package/assets/__federation_shared_@dcl/core-web3-CKa_YLUg.js +2 -0
- package/assets/__federation_shared_@dcl/{hooks-BTGaRvFd.js → hooks-BUl9fwJ6.js} +3 -3
- package/assets/__federation_shared_@emotion/react-Dqhl2Mup.js +1 -0
- package/assets/__federation_shared_@emotion/{styled-DqVyGVak.js → styled-DWCD7TRI.js} +1 -1
- package/assets/__federation_shared_@reduxjs/toolkit-CwoXZkqO.js +1 -0
- package/assets/{__federation_shared_decentraland-ui2-D-eg6Y-Z.js → __federation_shared_decentraland-ui2-DhNprCzs.js} +4 -4
- package/assets/{__federation_shared_react-redux-DBpsOkjJ.js → __federation_shared_react-redux-BbbSoEti.js} +1 -1
- package/assets/__federation_shared_react-router-dom-CghPW3T5.js +49 -0
- package/assets/__federation_shared_viem-BSisS619.js +2 -0
- package/assets/__federation_shared_wagmi-BNNJMvLV.js +17 -0
- package/assets/{add-D1dmSQkT.js → add-CdrtIhqC.js} +1 -1
- package/assets/{all-wallets-D7ZW8z0W.js → all-wallets-Cmla8eMe.js} +1 -1
- package/assets/{app-store-DXUKFVFe.js → app-store-ma7uMa9T.js} +1 -1
- package/assets/{apple-DIq1NPD9.js → apple-bELCHYbt.js} +1 -1
- package/assets/{arrow-bottom-460TXeJf.js → arrow-bottom-DloKu1fV.js} +1 -1
- package/assets/{arrow-bottom-circle-CC70fB8z.js → arrow-bottom-circle-DzXI01oZ.js} +1 -1
- package/assets/{arrow-left-BQ0dsbdA.js → arrow-left-B55lkgKK.js} +1 -1
- package/assets/{arrow-right-8nY7uwA-.js → arrow-right-Bw7eQ4QH.js} +1 -1
- package/assets/{arrow-top-B9sp1rrY.js → arrow-top-Dn6leB_M.js} +1 -1
- package/assets/{auto-track-DkUeIWzK.js → auto-track-CkHj-ik-.js} +1 -1
- package/assets/{bank-DIeswBBe.js → bank-DH1VVekh.js} +1 -1
- package/assets/{basic-O_880rjt.js → basic-CpaLk7Rk.js} +1 -1
- package/assets/{biconomy-B6KCdEMG.js → biconomy-C-Aa3WOy.js} +1 -1
- package/assets/{browser-BLf4KEyW.js → browser-Cy2ntZlE.js} +1 -1
- package/assets/{card-D8EE5Jj-.js → card-DeDlu8qm.js} +1 -1
- package/assets/ccip-O3XMTSRc.js +1 -0
- package/assets/{checkmark-6GXbMfu0.js → checkmark-DNVFeB3s.js} +1 -1
- package/assets/{checkmark-bold-aY4y8YkK.js → checkmark-bold-DEcOisss.js} +1 -1
- package/assets/{chevron-bottom-CU2atHia.js → chevron-bottom-xDV_oQI6.js} +1 -1
- package/assets/{chevron-left-CMYKgteJ.js → chevron-left-BYtOhhqm.js} +1 -1
- package/assets/{chevron-right-DSqlSbLF.js → chevron-right-CfsnvkD5.js} +1 -1
- package/assets/{chevron-top--LC04sW-.js → chevron-top-CONIZzEr.js} +1 -1
- package/assets/{chrome-store-okUhgEDz.js → chrome-store-D9VGMy-w.js} +1 -1
- package/assets/{clock-DFiN_R95.js → clock-DRArrlZN.js} +1 -1
- package/assets/{close-I8fax_o0.js → close-BnL2HnLj.js} +1 -1
- package/assets/{coinPlaceholder-CkjlkAlk.js → coinPlaceholder-DspCsB1d.js} +1 -1
- package/assets/{compass-Cmm-IgwK.js → compass-CL9Ubv1C.js} +1 -1
- package/assets/{controller-C9vLFhgG.js → controller-BVrxdctz.js} +2 -2
- package/assets/{copy-CJx_8wmR.js → copy-DzcJW_6z.js} +1 -1
- package/assets/{core-BGnzhLwd.js → core-CNeX_97j.js} +3 -3
- package/assets/{createBundlerClient-CLw70W8T.js → createBundlerClient-BPAMiN0_.js} +4 -4
- package/assets/createClient-B3NJif4G.js +1 -0
- package/assets/{cursor-BLRNlN9P.js → cursor-VEXLPp4L.js} +1 -1
- package/assets/{cursor-transparent-sQ7KRm1T.js → cursor-transparent-eNYb23WQ.js} +1 -1
- package/assets/{decimals-ZXRJ3NZH.js → decimals-Bcje5XLK.js} +1 -1
- package/assets/{decimals-DSN2ezaI.js → decimals-QcoDvy79.js} +1 -1
- package/assets/{desktop-Cq9Q4PJu.js → desktop-B8dtxVkT.js} +1 -1
- package/assets/{detectExtension-DtOEyzLR.js → detectExtension-CCed483c.js} +1 -1
- package/assets/{disconnect-Q4CIgYaj.js → disconnect-5l_BrY-g.js} +1 -1
- package/assets/{discord-BFkGngrw.js → discord-vPm7sSnB.js} +1 -1
- package/assets/{emotion-react.browser.esm-CuRmxzDI.js → emotion-react.browser.esm-C-lDaXQ7.js} +1 -1
- package/assets/{emotion-use-insertion-effect-with-fallbacks.browser.esm-5PAiZm_X.js → emotion-use-insertion-effect-with-fallbacks.browser.esm-BLv21GTb.js} +1 -1
- package/assets/{encode-Bw3iNfCX.js → encode-D4fq-GtO.js} +2 -2
- package/assets/{engine-C9bXNE6k.js → engine-C-meN4xY.js} +1 -1
- package/assets/{estimate-gas-DKfjMwgj.js → estimate-gas-DFiVp-Bb.js} +3 -3
- package/assets/{estimate-l1-fee-C8GOcft6.js → estimate-l1-fee-lAfdaqWJ.js} +1 -1
- package/assets/{eth_getStorageAt-DLP3MFZC.js → eth_getStorageAt-DFwf_hwV.js} +1 -1
- package/assets/{etherscan-WGcUpO-N.js → etherscan-Ck2P6D17.js} +1 -1
- package/assets/{exclamation-triangle-B7j3vyUf.js → exclamation-triangle-DfbN77Lf.js} +1 -1
- package/assets/{extension-KO7c6KpI.js → extension-CtEMnFwe.js} +1 -1
- package/assets/{external-link-CY9fq540.js → external-link-B0IDyBri.js} +1 -1
- package/assets/{extractIPFS-CaNrw1G3.js → extractIPFS-DIosWHkP.js} +1 -1
- package/assets/{facebook-C4AmE2nx.js → facebook-C0UeZpYw.js} +1 -1
- package/assets/{farcaster-CQwGqHN5.js → farcaster-CYOZFCGP.js} +1 -1
- package/assets/{fee-data-hqf9C_Iq.js → fee-data-BpKOAsFJ.js} +1 -1
- package/assets/{fetchTokenMetadata-D6bwUi9C.js → fetchTokenMetadata-DqYbYFuX.js} +2 -2
- package/assets/{filters-DQUZT2YK.js → filters-NBQeHIU7.js} +1 -1
- package/assets/{get-ecosystem-wallet-info-CKFiqkc5.js → get-ecosystem-wallet-info-CDZa8BmK.js} +1 -1
- package/assets/{getBalance-DvZhqMEV.js → getBalance-Bw5byYn3.js} +1 -1
- package/assets/{getInstalledModules-CP7yfLcd.js → getInstalledModules-By8IApsm.js} +1 -1
- package/assets/{getNFT-DvCB6ap4.js → getNFT-DEyn-Dm_.js} +1 -1
- package/assets/{getNFT-DidYjmem.js → getNFT-YU4EH9Wq.js} +2 -2
- package/assets/{github-BIpJQrlC.js → github-C4rc0OEq.js} +1 -1
- package/assets/{google-un3Y6Ejx.js → google-kXTnc_BR.js} +1 -1
- package/assets/{help-circle-B-zpwtLD.js → help-circle-Bwzt3B2p.js} +1 -1
- package/assets/{id-B4_vIzsp.js → id-zOIHpH1K.js} +1 -1
- package/assets/{image-Czc86Anh.js → image-B1eT9feQ.js} +1 -1
- package/assets/{in-app-wallet-calls-D7-Z3B5h.js → in-app-wallet-calls-C61H1buU.js} +1 -1
- package/assets/{index-CcXGB7H0.js → index-AMqzEpe3.js} +1 -1
- package/assets/{index-DpyuVWzp.js → index-B5C7HYRN.js} +1 -1
- package/assets/index-BOPorWEt.js +2 -0
- package/assets/{index-BhvB7qtA.js → index-BjA_RJ3F.js} +2 -2
- package/assets/index-BjzJcZq6.js +1 -1
- package/assets/{index-D_Y0vnSs.js → index-BozJS3za.js} +1 -1
- package/assets/{index-vb2hjBpr.js → index-BqjaI3ay.js} +1 -1
- package/assets/{index-DdtNL2Jf.js → index-C1_xRJU5.js} +1 -1
- package/assets/{index-DMXpjhes.js → index-CQa-TpsF.js} +2 -2
- package/assets/{index-ClhPpkNy.js → index-CUrF8sCH.js} +3 -3
- package/assets/{index-DpRa9Hdk.js → index-CgX6dKUG.js} +1 -1
- package/assets/{index-BivApAxn.js → index-DD6DIvwj.js} +1 -1
- package/assets/{index-B7ehXAu4.js → index-DFwD9Y6T.js} +1 -1
- package/assets/index-Dy0yjznp.js +1 -1
- package/assets/index-IYkCvEK_.js +1 -0
- package/assets/index-Tsk25L8E.js +1 -0
- package/assets/{index.es-C-HzyBbb.js → index.es-CX6b-_J8.js} +1 -1
- package/assets/{index.es-C4Qj75ZL.js → index.es-Co6Vfgvo.js} +3 -3
- package/assets/{info-circle-D8V3i6qM.js → info-circle-BSc3Qu0H.js} +1 -1
- package/assets/{info-Cpg1N2vM.js → info-fCoUT5OA.js} +1 -1
- package/assets/jsx-runtime-DncYoG30.js +1 -1
- package/assets/{lightbulb-HefALNgp.js → lightbulb-CtEeQpR-.js} +1 -1
- package/assets/{mail-CgM9gIZJ.js → mail-CyEGKrO1.js} +1 -1
- package/assets/{mobile-U7c47SaE.js → mobile-va3MMBf-.js} +1 -1
- package/assets/{more-DdaQJYy6.js → more-CNKLmFKq.js} +1 -1
- package/assets/{network-placeholder-CLxfhasD.js → network-placeholder-COaPFv9Z.js} +1 -1
- package/assets/{nftPlaceholder-DLJ8_zDF.js → nftPlaceholder-CwqKeCBT.js} +1 -1
- package/assets/{off-BODMWvqU.js → off-BXJei5ZC.js} +1 -1
- package/assets/{openzeppelin-CElS1w4j.js → openzeppelin-5tViGSfu.js} +1 -1
- package/assets/{ownerOf-4VKl6Zed.js → ownerOf-B0jDYVPj.js} +1 -1
- package/assets/{parseNft-B3feBBr7.js → parseNft-C9UVkjKp.js} +2 -2
- package/assets/{play-store-2WBMZoJX.js → play-store-DPqFtu_u.js} +1 -1
- package/assets/{plus-C8q1mNaL.js → plus-BRStu8oq.js} +1 -1
- package/assets/{preload-helper-DJT5ZcG4.js → preload-helper-DtiUdDj_.js} +1 -1
- package/assets/{qr-code-SA-iW5ew.js → qr-code-zVq-PsFR.js} +1 -1
- package/assets/{qr-overlay-YOF5zF1q.js → qr-overlay-CzG9L326.js} +1 -1
- package/assets/{recycle-horizontal-DGKs-nfw.js → recycle-horizontal-BUcJt7KV.js} +1 -1
- package/assets/redux-Cj8EnDXU.js +1 -0
- package/assets/{refresh--yNxoDBw.js → refresh-DoJwoFWZ.js} +1 -1
- package/assets/remoteEntry.js +1 -1
- package/assets/{reown-logo-BQIpKPKW.js → reown-logo-VGJ4-w32.js} +1 -1
- package/assets/{resolveImplementation-DszFPOZ6.js → resolveImplementation-CDZMD3pd.js} +1 -1
- package/assets/{search-FtLcOObA.js → search-qfys2xfh.js} +1 -1
- package/assets/{send-CBJ-wiQ6.js → send-BNIku3tf.js} +1 -1
- package/assets/{send-batch-transaction-xxQ_5YMn.js → send-batch-transaction-DJsVdrRi.js} +1 -1
- package/assets/{send-eip712-transaction-DkxQV38B.js → send-eip712-transaction-zZlwlA8h.js} +2 -2
- package/assets/{send-gasless-transaction-XxHEAsLB.js → send-gasless-transaction-0zsgzkl7.js} +2 -2
- package/assets/serializeAuthorizationList-B224vId9.js +1 -0
- package/assets/{session-proposal-Bd5Fj6z3.js → session-proposal-DQKIaN0P.js} +1 -1
- package/assets/{session-request-B70r2YF_.js → session-request-DO6jaRLL.js} +2 -2
- package/assets/{signing-QGcxSI_9.js → signing-D7Amo-_J.js} +3 -3
- package/assets/slice-D08eqHRd.js +1 -0
- package/assets/slice-DH_M4Fq9.js +1 -0
- package/assets/{swapHorizontal-C1dSpyyi.js → swapHorizontal-D4EMXwCW.js} +1 -1
- package/assets/{swapHorizontalBold-Bh9HRSf4.js → swapHorizontalBold-DPzDpA5S.js} +1 -1
- package/assets/{swapHorizontalMedium-C5fWd_xG.js → swapHorizontalMedium-BO1_vkWp.js} +1 -1
- package/assets/{swapHorizontalRoundedBold-DQYZ6GUV.js → swapHorizontalRoundedBold-D5f2zm5T.js} +1 -1
- package/assets/{swapVertical-CwlEklWe.js → swapVertical-Cl2TRZgu.js} +1 -1
- package/assets/{telegram-D-nTXT2M.js → telegram-COuwS3-1.js} +1 -1
- package/assets/{thirdweb-DZCEFvuW.js → thirdweb-ChZTN2O0.js} +3 -3
- package/assets/{three-dots-C4qGqJn4.js → three-dots-DaJ9Yk_z.js} +1 -1
- package/assets/{totalSupply-BqaCXbYX.js → totalSupply-CeZQpDgj.js} +1 -1
- package/assets/{twitch-mLqsOtOs.js → twitch-ChHlcjtL.js} +1 -1
- package/assets/{twitterIcon-CtFxyGLw.js → twitterIcon-BHaGUsBd.js} +1 -1
- package/assets/uid-BE5dre25.js +44 -0
- package/assets/{verify-CeRpSmin.js → verify-BJHlq4Cl.js} +1 -1
- package/assets/{verify-filled-CjglFMsq.js → verify-filled-CUQ_cX7L.js} +1 -1
- package/assets/{w3m-modal-DR20hsnc.js → w3m-modal-BQt7iWW0.js} +1 -1
- package/assets/{wait-for-tx-receipt-DQdcSdtK.js → wait-for-tx-receipt-mEy_aAXI.js} +1 -1
- package/assets/{wallet-9AiGsIL8.js → wallet-Bqa5aoUK.js} +1 -1
- package/assets/{wallet-placeholder-CIamIV4f.js → wallet-placeholder-ZqWJAmHm.js} +1 -1
- package/assets/{walletconnect--HLqlkm7.js → walletconnect-DgD3JeRt.js} +1 -1
- package/assets/{wallets-CQmzEszx.js → wallets-DBEqpf9_.js} +5 -5
- package/assets/{warning-circle-o-FTEWCj.js → warning-circle-C-GR2K3_.js} +1 -1
- package/assets/{web-connector-CzTxyAHe.js → web-connector-DbEpPXWA.js} +3 -3
- package/assets/webSocket-D9rKCHPk.js +3 -0
- package/assets/{x-CADCUMm6.js → x-dxs8B49F.js} +1 -1
- package/index.html +15 -17
- package/package.json +3 -3
- package/assets/SignInRedirect-BXiSxuzq.js +0 -11
- package/assets/__federation_expose_App-BIkHFfNV.js +0 -1
- package/assets/__federation_fn_import-BVq5pY2g.js +0 -1
- package/assets/__federation_shared_@emotion/react-ClQAzdUp.js +0 -1
- package/assets/__federation_shared_@reduxjs/toolkit-DIZvwqf7.js +0 -1
- package/assets/__federation_shared_react-router-dom-DHUeCUPc.js +0 -49
- package/assets/__federation_shared_viem-Dko2-sEK.js +0 -2
- package/assets/__federation_shared_wagmi-Cn5GVo3x.js +0 -17
- package/assets/ccip-DK12c0R1.js +0 -1
- package/assets/createClient-BxosFBTN.js +0 -1
- package/assets/index-C8jSk8ge.js +0 -1
- package/assets/index-DDxTHrtr.js +0 -1
- package/assets/localBatchGatewayRequest-CRqIDg0k.js +0 -1
- package/assets/redux-BNDF-Lt-.js +0 -1
- package/assets/secp256k1-DcA0Bweb.js +0 -1
- package/assets/serializeTransaction-CMhv_BZC.js +0 -1
- package/assets/uid-B6XGct9S.js +0 -44
- package/assets/webSocket-CSarcF7y.js +0 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{importShared as O}from"./__federation_fn_import-BxyPyKYw.js";import{j as m}from"./jsx-runtime-DncYoG30.js";import{c as xi,E as Qt,u as Ma,r as Ii,i as Ai,d as Ri}from"./X-Bfq5REIM.js";import{a as It}from"./_commonjsHelpers-C4iS2aBk.js";import{r as Ba}from"./index-Dy0yjznp.js";import{c as oe,d as Ci}from"./rich-text-react-renderer.es5-D_tE7AHo.js";import{w as rs,t as _i,u as ns,j as Oi,v as Ha,g as Fa,h as ki,r as ji,b as Di,m as Li}from"./redux-Cj8EnDXU.js";import{d as $i}from"./index-BOPorWEt.js";var Ui=class extends Error{issues;constructor(e){super(e[0].message),this.name="SchemaError",this.issues=e}},Qa=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(Qa||{}),je="uninitialized",Gr="pending",gt="fulfilled",mt="rejected";function ss(e){return{status:e,isUninitialized:e===je,isLoading:e===Gr,isSuccess:e===gt,isError:e===mt}}const{createAction:nt,createSlice:Xe,createSelector:Ni,createAsyncThunk:as,combineReducers:Mi,createNextState:ln,isAnyOf:er,isAllOf:vr,isAction:Bi,isPending:Ga,isRejected:dn,isFulfilled:ze,isRejectedWithValue:hn,isAsyncThunkAction:os,prepareAutoBatched:ct,SHOULD_AUTOBATCH:Wa,isPlainObject:Et,nanoid:za}=await O("@reduxjs/toolkit");var is=Et;function fn(e,t){if(e===t||!(is(e)&&is(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),o=Object.keys(e);let l=n.length===o.length;const f=Array.isArray(t)?[]:{};for(const h of n)f[h]=fn(e[h],t[h]),l&&(l=e[h]===f[h]);return l?e:f}function Wr(e,t,n){return e.reduce((o,l,f)=>(t(l,f)&&o.push(n(l,f)),o),[]).flat()}function Hi(e){return new RegExp("(^|:)//").test(e)}function Fi(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function pn(e){return e!=null}function cs(e){return[...e?.values()??[]].filter(pn)}function Qi(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var Gi=e=>e.replace(/\/$/,""),Wi=e=>e.replace(/^\//,"");function zi(e,t){if(!e)return t;if(!t)return e;if(Hi(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=Gi(e),t=Wi(t),`${e}${n}${t}`}function tr(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}var zr=()=>new Map,us=(...e)=>fetch(...e),Vi=e=>e.status>=200&&e.status<=299,Ki=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function ls(e){if(!Et(e))return e;const t={...e};for(const[n,o]of Object.entries(t))o===void 0&&delete t[n];return t}var Yi=e=>typeof e=="object"&&(Et(e)||Array.isArray(e)||typeof e.toJSON=="function");function Ji({baseUrl:e,prepareHeaders:t=c=>c,fetchFn:n=us,paramsSerializer:o,isJsonContentType:l=Ki,jsonContentType:f="application/json",jsonReplacer:h,timeout:s,responseHandler:r,validateStatus:a,...i}={}){return typeof fetch>"u"&&n===us&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(d,u,p)=>{const{getState:g,extra:y,endpoint:w,forced:q,type:v}=u;let P,{url:b,headers:S=new Headers(i.headers),params:C=void 0,responseHandler:_=r??"json",validateStatus:I=a??Vi,timeout:T=s,...E}=typeof d=="string"?{url:d}:d,x,A=u.signal;T&&(x=new AbortController,u.signal.addEventListener("abort",x.abort),A=x.signal);let R={...i,signal:A,...E};S=new Headers(ls(S)),R.headers=await t(S,{getState:g,arg:d,extra:y,endpoint:w,forced:q,type:v,extraOptions:p})||S;const k=Yi(R.body);if(R.body!=null&&!k&&typeof R.body!="string"&&R.headers.delete("content-type"),!R.headers.has("content-type")&&k&&R.headers.set("content-type",f),k&&l(R.headers)&&(R.body=JSON.stringify(R.body,h)),R.headers.has("accept")||(_==="json"?R.headers.set("accept","application/json"):_==="text"&&R.headers.set("accept","text/plain, text/html, */*")),C){const H=~b.indexOf("?")?"&":"?",G=o?o(C):new URLSearchParams(ls(C));b+=H+G}b=zi(e,b);const L=new Request(b,R);P={request:new Request(b,R)};let D,j=!1,N=x&&setTimeout(()=>{j=!0,x.abort()},T);try{D=await n(L)}catch(H){return{error:{status:j?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(H)},meta:P}}finally{N&&clearTimeout(N),x?.signal.removeEventListener("abort",x.abort)}const F=D.clone();P.response=F;let Q,Y="";try{let H;if(await Promise.all([c(D,_).then(G=>Q=G,G=>H=G),F.text().then(G=>Y=G,()=>{})]),H)throw H}catch(H){return{error:{status:"PARSING_ERROR",originalStatus:D.status,data:Y,error:String(H)},meta:P}}return I(D,Q)?{data:Q,meta:P}:{error:{status:D.status,data:Q},meta:P}};async function c(d,u){if(typeof u=="function")return u(d);if(u==="content-type"&&(u=l(d.headers)?"json":"text"),u==="json"){const p=await d.text();return p.length?JSON.parse(p):null}return d.text()}}var ds=class{constructor(e,t=void 0){this.value=e,this.meta=t}},cr="__rtkq/",Va="online",Ka="offline",Xi="focus",Ya="focused",Zi="visibilitychange",ur=nt(`${cr}${Ya}`),gn=nt(`${cr}un${Ya}`),lr=nt(`${cr}${Va}`),mn=nt(`${cr}${Ka}`),kt=!1;function iy(e,t){function n(){const[o,l,f,h]=[ur,gn,lr,mn].map(a=>()=>e(a())),s=()=>{window.document.visibilityState==="visible"?o():l()};let r=()=>{kt=!1};if(!kt&&typeof window<"u"&&window.addEventListener){let a=function(c){Object.entries(i).forEach(([d,u])=>{c?window.addEventListener(d,u,!1):window.removeEventListener(d,u)})};const i={[Xi]:o,[Zi]:s,[Va]:f,[Ka]:h};a(!0),kt=!0,r=()=>{a(!1),kt=!1}}return r}return n()}var At="query",Ja="mutation",Xa="infinitequery";function dr(e){return e.type===At}function ec(e){return e.type===Ja}function hr(e){return e.type===Xa}function rr(e){return dr(e)||hr(e)}function yn(e,t,n,o,l,f){const h=tc(e)?e(t,n,o,l):e;return h?Wr(h,pn,s=>f(Za(s))):[]}function tc(e){return typeof e=="function"}function Za(e){return typeof e=="string"?{type:e}:e}const{formatProdErrorMessage:cy}=await O("@reduxjs/toolkit");function rc(e,t){return e.catch(t)}var rt=(e,t)=>e.endpointDefinitions[t],bt=Symbol("forceQueryFn"),Vr=e=>typeof e[bt]=="function";function nc({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:n,mutationThunk:o,api:l,context:f,getInternalState:h}){const s=P=>h(P)?.runningQueries,r=P=>h(P)?.runningMutations,{unsubscribeQueryResult:a,removeMutationResult:i,updateSubscriptionOptions:c}=l.internalActions;return{buildInitiateQuery:w,buildInitiateInfiniteQuery:q,buildInitiateMutation:v,getRunningQueryThunk:d,getRunningMutationThunk:u,getRunningQueriesThunk:p,getRunningMutationsThunk:g};function d(P,b){return S=>{const C=rt(f,P),_=e({queryArgs:b,endpointDefinition:C,endpointName:P});return s(S)?.get(_)}}function u(P,b){return S=>r(S)?.get(b)}function p(){return P=>cs(s(P))}function g(){return P=>cs(r(P))}function y(P,b){const S=(C,{subscribe:_=!0,forceRefetch:I,subscriptionOptions:T,[bt]:E,...x}={})=>(A,R)=>{const k=e({queryArgs:C,endpointDefinition:b,endpointName:P});let L;const U={...x,type:At,subscribe:_,forceRefetch:I,subscriptionOptions:T,endpointName:P,originalArgs:C,queryCacheKey:k,[bt]:E};if(dr(b))L=t(U);else{const{direction:M,initialPageParam:X}=x;L=n({...U,direction:M,initialPageParam:X})}const D=l.endpoints[P].select(C),j=A(L),N=D(R()),{requestId:F,abort:Q}=j,Y=N.requestId!==F,H=s(A)?.get(k),G=()=>D(R()),K=Object.assign(E?j.then(G):Y&&!H?Promise.resolve(N):Promise.all([H,j]).then(G),{arg:C,requestId:F,subscriptionOptions:T,queryCacheKey:k,abort:Q,async unwrap(){const M=await K;if(M.isError)throw M.error;return M.data},refetch:()=>A(S(C,{subscribe:!1,forceRefetch:!0})),unsubscribe(){_&&A(a({queryCacheKey:k,requestId:F}))},updateSubscriptionOptions(M){K.subscriptionOptions=M,A(c({endpointName:P,requestId:F,queryCacheKey:k,options:M}))}});if(!H&&!Y&&!E){const M=s(A);M.set(k,K),K.then(()=>{M.delete(k)})}return K};return S}function w(P,b){return y(P,b)}function q(P,b){return y(P,b)}function v(P){return(b,{track:S=!0,fixedCacheKey:C}={})=>(_,I)=>{const T=o({type:"mutation",endpointName:P,originalArgs:b,track:S,fixedCacheKey:C}),E=_(T),{requestId:x,abort:A,unwrap:R}=E,k=rc(E.unwrap().then(j=>({data:j})),j=>({error:j})),L=()=>{_(i({requestId:x,fixedCacheKey:C}))},U=Object.assign(k,{arg:E.arg,requestId:x,abort:A,unwrap:R,reset:L}),D=r(_);return D.set(x,U),U.then(()=>{D.delete(x)}),C&&(D.set(C,U),U.then(()=>{D.get(C)===U&&D.delete(C)})),U}}}var eo=class extends Ui{constructor(e,t,n,o){super(e),this.value=t,this.schemaName=n,this._bqMeta=o}},He=(e,t)=>Array.isArray(e)?e.includes(t):!!e;async function Fe(e,t,n,o){const l=await e["~standard"].validate(t);if(l.issues)throw new eo(l.issues,t,n,o);return l.value}function hs(e){return e}var ut=(e={})=>({...e,[Wa]:!0});function sc({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:o,api:l,assertTagType:f,selectors:h,onSchemaFailure:s,catchSchemaFailure:r,skipSchemaValidation:a}){const i=(E,x,A,R)=>(k,L)=>{const U=n[E],D=o({queryArgs:x,endpointDefinition:U,endpointName:E});if(k(l.internalActions.queryResultPatched({queryCacheKey:D,patches:A})),!R)return;const j=l.endpoints[E].select(x)(L()),N=yn(U.providesTags,j.data,void 0,x,{},f);k(l.internalActions.updateProvidedBy([{queryCacheKey:D,providedTags:N}]))};function c(E,x,A=0){const R=[x,...E];return A&&R.length>A?R.slice(0,-1):R}function d(E,x,A=0){const R=[...E,x];return A&&R.length>A?R.slice(1):R}const u=(E,x,A,R=!0)=>(k,L)=>{const D=l.endpoints[E].select(x)(L()),j={patches:[],inversePatches:[],undo:()=>k(l.util.patchQueryData(E,x,j.inversePatches,R))};if(D.status===je)return j;let N;if("data"in D)if(Oi(D.data)){const[F,Q,Y]=Ha(D.data,A);j.patches.push(...Q),j.inversePatches.push(...Y),N=F}else N=A(D.data),j.patches.push({op:"replace",path:[],value:N}),j.inversePatches.push({op:"replace",path:[],value:D.data});return j.patches.length===0||k(l.util.patchQueryData(E,x,j.patches,R)),j},p=(E,x,A)=>R=>R(l.endpoints[E].initiate(x,{subscribe:!1,forceRefetch:!0,[bt]:()=>({data:A})})),g=(E,x)=>E.query&&E[x]?E[x]:hs,y=async(E,{signal:x,abort:A,rejectWithValue:R,fulfillWithValue:k,dispatch:L,getState:U,extra:D})=>{const j=n[E.endpointName],{metaSchema:N,skipSchemaValidation:F=a}=j,Q=E.type===At;try{let Y=hs;const H={signal:x,abort:A,dispatch:L,getState:U,extra:D,endpoint:E.endpointName,type:E.type,forced:Q?w(E,U()):void 0,queryCacheKey:Q?E.queryCacheKey:void 0},G=Q?E[bt]:void 0;let K;const M=async(V,W,se,Ye)=>{if(W==null&&V.pages.length)return Promise.resolve({data:V});const De={queryArg:E.originalArgs,pageParam:W},Je=await X(De),Pe=Ye?c:d;return{data:{pages:Pe(V.pages,Je.data,se),pageParams:Pe(V.pageParams,W,se)},meta:Je.meta}};async function X(V){let W;const{extraOptions:se,argSchema:Ye,rawResponseSchema:De,responseSchema:Je}=j;if(Ye&&!He(F,"arg")&&(V=await Fe(Ye,V,"argSchema",{})),G?W=G():j.query?(Y=g(j,"transformResponse"),W=await t(j.query(V),H,se)):W=await j.queryFn(V,H,se,it=>t(it,H,se)),typeof process<"u",W.error)throw new ds(W.error,W.meta);let{data:Pe}=W;De&&!He(F,"rawResponse")&&(Pe=await Fe(De,W.data,"rawResponseSchema",W.meta));let Le=await Y(Pe,W.meta,V);return Je&&!He(F,"response")&&(Le=await Fe(Je,Le,"responseSchema",W.meta)),{...W,data:Le}}if(Q&&"infiniteQueryOptions"in j){const{infiniteQueryOptions:V}=j,{maxPages:W=1/0}=V;let se;const Ye={pages:[],pageParams:[]},De=h.selectQueryEntry(U(),E.queryCacheKey)?.data,Pe=w(E,U())&&!E.direction||!De?Ye:De;if("direction"in E&&E.direction&&Pe.pages.length){const Le=E.direction==="backward",qr=(Le?to:Kr)(V,Pe,E.originalArgs);se=await M(Pe,qr,W,Le)}else{const{initialPageParam:Le=V.initialPageParam}=E,it=De?.pageParams??[],qr=it[0]??Le,Si=it.length;se=await M(Pe,qr,W),G&&(se={data:se.data.pages[0]});for(let ts=1;ts<Si;ts++){const Ti=Kr(V,se.data,E.originalArgs);se=await M(se.data,Ti,W)}}K=se}else K=await X(E.originalArgs);return N&&!He(F,"meta")&&K.meta&&(K.meta=await Fe(N,K.meta,"metaSchema",K.meta)),k(K.data,ut({fulfilledTimeStamp:Date.now(),baseQueryMeta:K.meta}))}catch(Y){let H=Y;if(H instanceof ds){let G=g(j,"transformErrorResponse");const{rawErrorResponseSchema:K,errorResponseSchema:M}=j;let{value:X,meta:V}=H;try{K&&!He(F,"rawErrorResponse")&&(X=await Fe(K,X,"rawErrorResponseSchema",V)),N&&!He(F,"meta")&&(V=await Fe(N,V,"metaSchema",V));let W=await G(X,V,E.originalArgs);return M&&!He(F,"errorResponse")&&(W=await Fe(M,W,"errorResponseSchema",V)),R(W,ut({baseQueryMeta:V}))}catch(W){H=W}}try{if(H instanceof eo){const G={endpoint:E.endpointName,arg:E.originalArgs,type:E.type,queryCacheKey:Q?E.queryCacheKey:void 0};j.onSchemaFailure?.(H,G),s?.(H,G);const{catchSchemaFailure:K=r}=j;if(K)return R(K(H,G),ut({baseQueryMeta:H._bqMeta}))}}catch(G){H=G}throw console.error(H),H}};function w(E,x){const A=h.selectQueryEntry(x,E.queryCacheKey),R=h.selectConfig(x).refetchOnMountOrArgChange,k=A?.fulfilledTimeStamp,L=E.forceRefetch??(E.subscribe&&R);return L?L===!0||(Number(new Date)-Number(k))/1e3>=L:!1}const q=()=>as(`${e}/executeQuery`,y,{getPendingMeta({arg:x}){const A=n[x.endpointName];return ut({startedTimeStamp:Date.now(),...hr(A)?{direction:x.direction}:{}})},condition(x,{getState:A}){const R=A(),k=h.selectQueryEntry(R,x.queryCacheKey),L=k?.fulfilledTimeStamp,U=x.originalArgs,D=k?.originalArgs,j=n[x.endpointName],N=x.direction;return Vr(x)?!0:k?.status==="pending"?!1:w(x,R)||dr(j)&&j?.forceRefetch?.({currentArg:U,previousArg:D,endpointState:k,state:R})?!0:!(L&&!N)},dispatchConditionRejection:!0}),v=q(),P=q(),b=as(`${e}/executeMutation`,y,{getPendingMeta(){return ut({startedTimeStamp:Date.now()})}}),S=E=>"force"in E,C=E=>"ifOlderThan"in E,_=(E,x,A={})=>(R,k)=>{const L=S(A)&&A.force,U=C(A)&&A.ifOlderThan,D=(N=!0)=>{const F={forceRefetch:N,subscribe:!1};return l.endpoints[E].initiate(x,F)},j=l.endpoints[E].select(x)(k());if(L)R(D());else if(U){const N=j?.fulfilledTimeStamp;if(!N){R(D());return}(Number(new Date)-Number(new Date(N)))/1e3>=U&&R(D())}else R(D(!1))};function I(E){return x=>x?.meta?.arg?.endpointName===E}function T(E,x){return{matchPending:vr(Ga(E),I(x)),matchFulfilled:vr(ze(E),I(x)),matchRejected:vr(dn(E),I(x))}}return{queryThunk:v,mutationThunk:b,infiniteQueryThunk:P,prefetch:_,updateQueryData:u,upsertQueryData:p,patchQueryData:i,buildMatchThunkActions:T}}function Kr(e,{pages:t,pageParams:n},o){const l=t.length-1;return e.getNextPageParam(t[l],t,n[l],n,o)}function to(e,{pages:t,pageParams:n},o){return e.getPreviousPageParam?.(t[0],t,n[0],n,o)}function ro(e,t,n,o){return yn(n[e.meta.arg.endpointName][t],ze(e)?e.payload:void 0,hn(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,o)}function fs(e){return Fa(e)?ki(e):e}function jt(e,t,n){const o=e[t];o&&n(o)}function St(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function ps(e,t,n){const o=e[St(t)];o&&n(o)}var Dt={};function ac({reducerPath:e,queryThunk:t,mutationThunk:n,serializeQueryArgs:o,context:{endpointDefinitions:l,apiUid:f,extractRehydrationInfo:h,hasRehydrationInfo:s},assertTagType:r,config:a}){const i=nt(`${e}/resetApiState`);function c(I,T,E,x){I[T.queryCacheKey]??={status:je,endpointName:T.endpointName},jt(I,T.queryCacheKey,A=>{A.status=Gr,A.requestId=E&&A.requestId?A.requestId:x.requestId,T.originalArgs!==void 0&&(A.originalArgs=T.originalArgs),A.startedTimeStamp=x.startedTimeStamp;const R=l[x.arg.endpointName];hr(R)&&"direction"in T&&(A.direction=T.direction)})}function d(I,T,E,x){jt(I,T.arg.queryCacheKey,A=>{if(A.requestId!==T.requestId&&!x)return;const{merge:R}=l[T.arg.endpointName];if(A.status=gt,R)if(A.data!==void 0){const{fulfilledTimeStamp:k,arg:L,baseQueryMeta:U,requestId:D}=T;let j=ln(A.data,N=>R(N,E,{arg:L.originalArgs,baseQueryMeta:U,fulfilledTimeStamp:k,requestId:D}));A.data=j}else A.data=E;else A.data=l[T.arg.endpointName].structuralSharing??!0?fn(Fa(A.data)?ji(A.data):A.data,E):E;delete A.error,A.fulfilledTimeStamp=T.fulfilledTimeStamp})}const u=Xe({name:`${e}/queries`,initialState:Dt,reducers:{removeQueryResult:{reducer(I,{payload:{queryCacheKey:T}}){delete I[T]},prepare:ct()},cacheEntriesUpserted:{reducer(I,T){for(const E of T.payload){const{queryDescription:x,value:A}=E;c(I,x,!0,{arg:x,requestId:T.meta.requestId,startedTimeStamp:T.meta.timestamp}),d(I,{arg:x,requestId:T.meta.requestId,fulfilledTimeStamp:T.meta.timestamp,baseQueryMeta:{}},A,!0)}},prepare:I=>({payload:I.map(x=>{const{endpointName:A,arg:R,value:k}=x,L=l[A];return{queryDescription:{type:At,endpointName:A,originalArgs:x.arg,queryCacheKey:o({queryArgs:R,endpointDefinition:L,endpointName:A})},value:k}}),meta:{[Wa]:!0,requestId:za(),timestamp:Date.now()}})},queryResultPatched:{reducer(I,{payload:{queryCacheKey:T,patches:E}}){jt(I,T,x=>{x.data=ns(x.data,E.concat())})},prepare:ct()}},extraReducers(I){I.addCase(t.pending,(T,{meta:E,meta:{arg:x}})=>{const A=Vr(x);c(T,x,A,E)}).addCase(t.fulfilled,(T,{meta:E,payload:x})=>{const A=Vr(E.arg);d(T,E,x,A)}).addCase(t.rejected,(T,{meta:{condition:E,arg:x,requestId:A},error:R,payload:k})=>{jt(T,x.queryCacheKey,L=>{if(!E){if(L.requestId!==A)return;L.status=mt,L.error=k??R}})}).addMatcher(s,(T,E)=>{const{queries:x}=h(E);for(const[A,R]of Object.entries(x))(R?.status===gt||R?.status===mt)&&(T[A]=R)})}}),p=Xe({name:`${e}/mutations`,initialState:Dt,reducers:{removeMutationResult:{reducer(I,{payload:T}){const E=St(T);E in I&&delete I[E]},prepare:ct()}},extraReducers(I){I.addCase(n.pending,(T,{meta:E,meta:{requestId:x,arg:A,startedTimeStamp:R}})=>{A.track&&(T[St(E)]={requestId:x,status:Gr,endpointName:A.endpointName,startedTimeStamp:R})}).addCase(n.fulfilled,(T,{payload:E,meta:x})=>{x.arg.track&&ps(T,x,A=>{A.requestId===x.requestId&&(A.status=gt,A.data=E,A.fulfilledTimeStamp=x.fulfilledTimeStamp)})}).addCase(n.rejected,(T,{payload:E,error:x,meta:A})=>{A.arg.track&&ps(T,A,R=>{R.requestId===A.requestId&&(R.status=mt,R.error=E??x)})}).addMatcher(s,(T,E)=>{const{mutations:x}=h(E);for(const[A,R]of Object.entries(x))(R?.status===gt||R?.status===mt)&&A!==R?.requestId&&(T[A]=R)})}}),g={tags:{},keys:{}},y=Xe({name:`${e}/invalidation`,initialState:g,reducers:{updateProvidedBy:{reducer(I,T){for(const{queryCacheKey:E,providedTags:x}of T.payload){w(I,E);for(const{type:A,id:R}of x){const k=(I.tags[A]??={})[R||"__internal_without_id"]??=[];k.includes(E)||k.push(E)}I.keys[E]=x}},prepare:ct()}},extraReducers(I){I.addCase(u.actions.removeQueryResult,(T,{payload:{queryCacheKey:E}})=>{w(T,E)}).addMatcher(s,(T,E)=>{const{provided:x}=h(E);for(const[A,R]of Object.entries(x.tags??{}))for(const[k,L]of Object.entries(R)){const U=(T.tags[A]??={})[k||"__internal_without_id"]??=[];for(const D of L)U.includes(D)||U.push(D),T.keys[D]=x.keys[D]}}).addMatcher(er(ze(t),hn(t)),(T,E)=>{q(T,[E])}).addMatcher(u.actions.cacheEntriesUpserted.match,(T,E)=>{const x=E.payload.map(({queryDescription:A,value:R})=>({type:"UNKNOWN",payload:R,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:A}}));q(T,x)})}});function w(I,T){const E=fs(I.keys[T]??[]);for(const x of E){const A=x.type,R=x.id??"__internal_without_id",k=I.tags[A]?.[R];k&&(I.tags[A][R]=fs(k).filter(L=>L!==T))}delete I.keys[T]}function q(I,T){const E=T.map(x=>{const A=ro(x,"providesTags",l,r),{queryCacheKey:R}=x.meta.arg;return{queryCacheKey:R,providedTags:A}});y.caseReducers.updateProvidedBy(I,y.actions.updateProvidedBy(E))}const v=Xe({name:`${e}/subscriptions`,initialState:Dt,reducers:{updateSubscriptionOptions(I,T){},unsubscribeQueryResult(I,T){},internal_getRTKQSubscriptions(){}}}),P=Xe({name:`${e}/internalSubscriptions`,initialState:Dt,reducers:{subscriptionsUpdated:{reducer(I,T){return ns(I,T.payload)},prepare:ct()}}}),b=Xe({name:`${e}/config`,initialState:{online:Qi(),focused:Fi(),middlewareRegistered:!1,...a},reducers:{middlewareRegistered(I,{payload:T}){I.middlewareRegistered=I.middlewareRegistered==="conflict"||f!==T?"conflict":!0}},extraReducers:I=>{I.addCase(lr,T=>{T.online=!0}).addCase(mn,T=>{T.online=!1}).addCase(ur,T=>{T.focused=!0}).addCase(gn,T=>{T.focused=!1}).addMatcher(s,T=>({...T}))}}),S=Mi({queries:u.reducer,mutations:p.reducer,provided:y.reducer,subscriptions:P.reducer,config:b.reducer}),C=(I,T)=>S(i.match(T)?void 0:I,T),_={...b.actions,...u.actions,...v.actions,...P.actions,...p.actions,...y.actions,resetApiState:i};return{reducer:C,actions:_}}var ge=Symbol.for("RTKQ/skipToken"),no={status:je},gs=ln(no,()=>{}),ms=ln(no,()=>{});function oc({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const o=v=>gs,l=v=>ms;return{buildQuerySelector:d,buildInfiniteQuerySelector:u,buildMutationSelector:p,selectInvalidatedBy:g,selectCachedArgsForQuery:y,selectApiState:h,selectQueries:s,selectMutations:a,selectQueryEntry:r,selectConfig:i};function f(v){return{...v,...ss(v.status)}}function h(v){return v[t]}function s(v){return h(v)?.queries}function r(v,P){return s(v)?.[P]}function a(v){return h(v)?.mutations}function i(v){return h(v)?.config}function c(v,P,b){return S=>{if(S===ge)return n(o,b);const C=e({queryArgs:S,endpointDefinition:P,endpointName:v});return n(I=>r(I,C)??gs,b)}}function d(v,P){return c(v,P,f)}function u(v,P){const{infiniteQueryOptions:b}=P;function S(C){const _={...C,...ss(C.status)},{isLoading:I,isError:T,direction:E}=_,x=E==="forward",A=E==="backward";return{..._,hasNextPage:w(b,_.data,_.originalArgs),hasPreviousPage:q(b,_.data,_.originalArgs),isFetchingNextPage:I&&x,isFetchingPreviousPage:I&&A,isFetchNextPageError:T&&x,isFetchPreviousPageError:T&&A}}return c(v,P,S)}function p(){return v=>{let P;return typeof v=="object"?P=St(v)??ge:P=v,n(P===ge?l:C=>h(C)?.mutations?.[P]??ms,f)}}function g(v,P){const b=v[t],S=new Set,C=Wr(P,pn,Za);for(const _ of C){const I=b.provided.tags[_.type];if(!I)continue;let T=(_.id!==void 0?I[_.id]:Object.values(I).flat())??[];for(const E of T)S.add(E)}return Array.from(S.values()).flatMap(_=>{const I=b.queries[_];return I?{queryCacheKey:_,endpointName:I.endpointName,originalArgs:I.originalArgs}:[]})}function y(v,P){return Wr(Object.values(s(v)),b=>b?.endpointName===P&&b.status!==je,b=>b.originalArgs)}function w(v,P,b){return P?Kr(v,P,b)!=null:!1}function q(v,P,b){return!P||!v.getPreviousPageParam?!1:to(v,P,b)!=null}}const{formatProdErrorMessage:ic,formatProdErrorMessage:uy,formatProdErrorMessage:ly}=await O("@reduxjs/toolkit");var ys=WeakMap?new WeakMap:void 0,ws=({endpointName:e,queryArgs:t})=>{let n="";const o=ys?.get(t);if(typeof o=="string")n=o;else{const l=JSON.stringify(t,(f,h)=>(h=typeof h=="bigint"?{$bigint:h.toString()}:h,h=Et(h)?Object.keys(h).sort().reduce((s,r)=>(s[r]=h[r],s),{}):h,h));Et(t)&&ys?.set(t,l),n=l}return`${e}(${n})`};function so(...e){return function(n){const o=rs(a=>n.extractRehydrationInfo?.(a,{reducerPath:n.reducerPath??"api"})),l={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...n,extractRehydrationInfo:o,serializeQueryArgs(a){let i=ws;if("serializeQueryArgs"in a.endpointDefinition){const c=a.endpointDefinition.serializeQueryArgs;i=d=>{const u=c(d);return typeof u=="string"?u:ws({...d,queryArgs:u})}}else n.serializeQueryArgs&&(i=n.serializeQueryArgs);return i(a)},tagTypes:[...n.tagTypes||[]]},f={endpointDefinitions:{},batch(a){a()},apiUid:za(),extractRehydrationInfo:o,hasRehydrationInfo:rs(a=>o(a)!=null)},h={injectEndpoints:r,enhanceEndpoints({addTagTypes:a,endpoints:i}){if(a)for(const c of a)l.tagTypes.includes(c)||l.tagTypes.push(c);if(i)for(const[c,d]of Object.entries(i))typeof d=="function"?d(rt(f,c)):Object.assign(rt(f,c)||{},d);return h}},s=e.map(a=>a.init(h,l,f));function r(a){const i=a.endpoints({query:c=>({...c,type:At}),mutation:c=>({...c,type:Ja}),infiniteQuery:c=>({...c,type:Xa})});for(const[c,d]of Object.entries(i)){if(a.overrideExisting!==!0&&c in f.endpointDefinitions){if(a.overrideExisting==="throw")throw new Error(ic(39));continue}f.endpointDefinitions[c]=d;for(const u of s)u.injectEndpoint(c,d)}return h}return h.injectEndpoints({endpoints:n.endpoints})}}const{formatProdErrorMessage:cc}=await O("@reduxjs/toolkit");function ao(){return function(){throw new Error(cc(33))}}function Re(e,...t){return Object.assign(e,...t)}var uc=({api:e,queryThunk:t,internalState:n,mwApi:o})=>{const l=`${e.reducerPath}/subscriptions`;let f=null,h=null;const{updateSubscriptionOptions:s,unsubscribeQueryResult:r}=e.internalActions,a=(g,y)=>{if(s.match(y)){const{queryCacheKey:q,requestId:v,options:P}=y.payload,b=g.get(q);return b?.has(v)&&b.set(v,P),!0}if(r.match(y)){const{queryCacheKey:q,requestId:v}=y.payload,P=g.get(q);return P&&P.delete(v),!0}if(e.internalActions.removeQueryResult.match(y))return g.delete(y.payload.queryCacheKey),!0;if(t.pending.match(y)){const{meta:{arg:q,requestId:v}}=y,P=tr(g,q.queryCacheKey,zr);return q.subscribe&&P.set(v,q.subscriptionOptions??P.get(v)??{}),!0}let w=!1;if(t.rejected.match(y)){const{meta:{condition:q,arg:v,requestId:P}}=y;if(q&&v.subscribe){const b=tr(g,v.queryCacheKey,zr);b.set(P,v.subscriptionOptions??b.get(P)??{}),w=!0}}return w},i=()=>n.currentSubscriptions,u={getSubscriptions:i,getSubscriptionCount:g=>i().get(g)?.size??0,isRequestSubscribed:(g,y)=>!!i()?.get(g)?.get(y)};function p(g){return JSON.parse(JSON.stringify(Object.fromEntries([...g].map(([y,w])=>[y,Object.fromEntries(w)]))))}return(g,y)=>{if(f||(f=p(n.currentSubscriptions)),e.util.resetApiState.match(g))return f={},n.currentSubscriptions.clear(),h=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(g))return[!1,u];const w=a(n.currentSubscriptions,g);let q=!0;if(w){h||(h=setTimeout(()=>{const b=p(n.currentSubscriptions),[,S]=Ha(f,()=>b);y.next(e.internalActions.subscriptionsUpdated(S)),f=b,h=null},500));const v=typeof g.type=="string"&&!!g.type.startsWith(l),P=t.rejected.match(g)&&g.meta.condition&&!!g.meta.arg.subscribe;q=!v&&!P}return[q,!1]}},lc=2147483647/1e3-1,dc=({reducerPath:e,api:t,queryThunk:n,context:o,internalState:l,selectors:{selectQueryEntry:f,selectConfig:h},getRunningQueryThunk:s,mwApi:r})=>{const{removeQueryResult:a,unsubscribeQueryResult:i,cacheEntriesUpserted:c}=t.internalActions,d=er(i.match,n.fulfilled,n.rejected,c.match);function u(v){const P=l.currentSubscriptions.get(v);return P?P.size>0:!1}const p={};function g(v){for(const P of v.values())P?.abort?.()}const y=(v,P)=>{const b=P.getState(),S=h(b);if(d(v)){let C;if(c.match(v))C=v.payload.map(_=>_.queryDescription.queryCacheKey);else{const{queryCacheKey:_}=i.match(v)?v.payload:v.meta.arg;C=[_]}w(C,P,S)}if(t.util.resetApiState.match(v)){for(const[C,_]of Object.entries(p))_&&clearTimeout(_),delete p[C];g(l.runningQueries),g(l.runningMutations)}if(o.hasRehydrationInfo(v)){const{queries:C}=o.extractRehydrationInfo(v);w(Object.keys(C),P,S)}};function w(v,P,b){const S=P.getState();for(const C of v){const _=f(S,C);_?.endpointName&&q(C,_.endpointName,P,b)}}function q(v,P,b,S){const _=rt(o,P)?.keepUnusedDataFor??S.keepUnusedDataFor;if(_===1/0)return;const I=Math.max(0,Math.min(_,lc));if(!u(v)){const T=p[v];T&&clearTimeout(T),p[v]=setTimeout(()=>{if(!u(v)){const E=f(b.getState(),v);E?.endpointName&&b.dispatch(s(E.endpointName,E.originalArgs))?.abort(),b.dispatch(a({queryCacheKey:v}))}delete p[v]},I*1e3)}}return y},Ps=new Error("Promise never resolved before cacheEntryRemoved."),hc=({api:e,reducerPath:t,context:n,queryThunk:o,mutationThunk:l,internalState:f,selectors:{selectQueryEntry:h,selectApiState:s}})=>{const r=os(o),a=os(l),i=ze(o,l),c={},{removeQueryResult:d,removeMutationResult:u,cacheEntriesUpserted:p}=e.internalActions;function g(b,S,C){const _=c[b];_?.valueResolved&&(_.valueResolved({data:S,meta:C}),delete _.valueResolved)}function y(b){const S=c[b];S&&(delete c[b],S.cacheEntryRemoved())}function w(b){const{arg:S,requestId:C}=b.meta,{endpointName:_,originalArgs:I}=S;return[_,I,C]}const q=(b,S,C)=>{const _=v(b);function I(T,E,x,A){const R=h(C,E),k=h(S.getState(),E);!R&&k&&P(T,A,E,S,x)}if(o.pending.match(b)){const[T,E,x]=w(b);I(T,_,x,E)}else if(p.match(b))for(const{queryDescription:T,value:E}of b.payload){const{endpointName:x,originalArgs:A,queryCacheKey:R}=T;I(x,R,b.meta.requestId,A),g(R,E,{})}else if(l.pending.match(b)){if(S.getState()[t].mutations[_]){const[E,x,A]=w(b);P(E,x,_,S,A)}}else if(i(b))g(_,b.payload,b.meta.baseQueryMeta);else if(d.match(b)||u.match(b))y(_);else if(e.util.resetApiState.match(b))for(const T of Object.keys(c))y(T)};function v(b){return r(b)?b.meta.arg.queryCacheKey:a(b)?b.meta.arg.fixedCacheKey??b.meta.requestId:d.match(b)?b.payload.queryCacheKey:u.match(b)?St(b.payload):""}function P(b,S,C,_,I){const T=rt(n,b),E=T?.onCacheEntryAdded;if(!E)return;const x={},A=new Promise(j=>{x.cacheEntryRemoved=j}),R=Promise.race([new Promise(j=>{x.valueResolved=j}),A.then(()=>{throw Ps})]);R.catch(()=>{}),c[C]=x;const k=e.endpoints[b].select(rr(T)?S:C),L=_.dispatch((j,N,F)=>F),U={..._,getCacheEntry:()=>k(_.getState()),requestId:I,extra:L,updateCachedData:rr(T)?j=>_.dispatch(e.util.updateQueryData(b,S,j)):void 0,cacheDataLoaded:R,cacheEntryRemoved:A},D=E(S,U);Promise.resolve(D).catch(j=>{if(j!==Ps)throw j})}return q},fc=({api:e,context:{apiUid:t},reducerPath:n})=>(o,l)=>{e.util.resetApiState.match(o)&&l.dispatch(e.internalActions.middlewareRegistered(t))},pc=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:o,queryThunk:l,api:f,assertTagType:h,refetchQuery:s,internalState:r})=>{const{removeQueryResult:a}=f.internalActions,i=er(ze(o),hn(o)),c=er(ze(l,o),dn(l,o));let d=[],u=0;const p=(w,q)=>{(l.pending.match(w)||o.pending.match(w))&&u++,c(w)&&(u=Math.max(0,u-1)),i(w)?y(ro(w,"invalidatesTags",n,h),q):c(w)?y([],q):f.util.invalidateTags.match(w)&&y(yn(w.payload,void 0,void 0,void 0,void 0,h),q)};function g(){return u>0}function y(w,q){const v=q.getState(),P=v[e];if(d.push(...w),P.config.invalidationBehavior==="delayed"&&g())return;const b=d;if(d=[],b.length===0)return;const S=f.util.selectInvalidatedBy(v,b);t.batch(()=>{const C=Array.from(S.values());for(const{queryCacheKey:_}of C){const I=P.queries[_],T=tr(r.currentSubscriptions,_,zr);I&&(T.size===0?q.dispatch(a({queryCacheKey:_})):I.status!==je&&q.dispatch(s(I)))}})}return p},gc=({reducerPath:e,queryThunk:t,api:n,refetchQuery:o,internalState:l})=>{const{currentPolls:f,currentSubscriptions:h}=l,s=new Set;let r=null;const a=(y,w)=>{(n.internalActions.updateSubscriptionOptions.match(y)||n.internalActions.unsubscribeQueryResult.match(y))&&i(y.payload.queryCacheKey,w),(t.pending.match(y)||t.rejected.match(y)&&y.meta.condition)&&i(y.meta.arg.queryCacheKey,w),(t.fulfilled.match(y)||t.rejected.match(y)&&!y.meta.condition)&&c(y.meta.arg,w),n.util.resetApiState.match(y)&&(p(),r&&(clearTimeout(r),r=null),s.clear())};function i(y,w){s.add(y),r||(r=setTimeout(()=>{for(const q of s)d({queryCacheKey:q},w);s.clear(),r=null},0))}function c({queryCacheKey:y},w){const q=w.getState()[e],v=q.queries[y],P=h.get(y);if(!v||v.status===je)return;const{lowestPollingInterval:b,skipPollingIfUnfocused:S}=g(P);if(!Number.isFinite(b))return;const C=f.get(y);C?.timeout&&(clearTimeout(C.timeout),C.timeout=void 0);const _=Date.now()+b;f.set(y,{nextPollTimestamp:_,pollingInterval:b,timeout:setTimeout(()=>{(q.config.focused||!S)&&w.dispatch(o(v)),c({queryCacheKey:y},w)},b)})}function d({queryCacheKey:y},w){const v=w.getState()[e].queries[y],P=h.get(y);if(!v||v.status===je)return;const{lowestPollingInterval:b}=g(P);if(!Number.isFinite(b)){u(y);return}const S=f.get(y),C=Date.now()+b;(!S||C<S.nextPollTimestamp)&&c({queryCacheKey:y},w)}function u(y){const w=f.get(y);w?.timeout&&clearTimeout(w.timeout),f.delete(y)}function p(){for(const y of f.keys())u(y)}function g(y=new Map){let w=!1,q=Number.POSITIVE_INFINITY;for(const v of y.values())v.pollingInterval&&(q=Math.min(v.pollingInterval,q),w=v.skipPollingIfUnfocused||w);return{lowestPollingInterval:q,skipPollingIfUnfocused:w}}return a},mc=({api:e,context:t,queryThunk:n,mutationThunk:o})=>{const l=Ga(n,o),f=dn(n,o),h=ze(n,o),s={};return(a,i)=>{if(l(a)){const{requestId:c,arg:{endpointName:d,originalArgs:u}}=a.meta,p=rt(t,d),g=p?.onQueryStarted;if(g){const y={},w=new Promise((b,S)=>{y.resolve=b,y.reject=S});w.catch(()=>{}),s[c]=y;const q=e.endpoints[d].select(rr(p)?u:c),v=i.dispatch((b,S,C)=>C),P={...i,getCacheEntry:()=>q(i.getState()),requestId:c,extra:v,updateCachedData:rr(p)?b=>i.dispatch(e.util.updateQueryData(d,u,b)):void 0,queryFulfilled:w};g(u,P)}}else if(h(a)){const{requestId:c,baseQueryMeta:d}=a.meta;s[c]?.resolve({data:a.payload,meta:d}),delete s[c]}else if(f(a)){const{requestId:c,rejectedWithValue:d,baseQueryMeta:u}=a.meta;s[c]?.reject({error:a.payload??a.error,isUnhandledError:!d,meta:u}),delete s[c]}}},yc=({reducerPath:e,context:t,api:n,refetchQuery:o,internalState:l})=>{const{removeQueryResult:f}=n.internalActions,h=(r,a)=>{ur.match(r)&&s(a,"refetchOnFocus"),lr.match(r)&&s(a,"refetchOnReconnect")};function s(r,a){const i=r.getState()[e],c=i.queries,d=l.currentSubscriptions;t.batch(()=>{for(const u of d.keys()){const p=c[u],g=d.get(u);if(!g||!p)continue;const y=[...g.values()];(y.some(q=>q[a]===!0)||y.every(q=>q[a]===void 0)&&i.config[a])&&(g.size===0?r.dispatch(f({queryCacheKey:u})):p.status!==je&&r.dispatch(o(p)))}})}return h};function wc(e){const{reducerPath:t,queryThunk:n,api:o,context:l,getInternalState:f}=e,{apiUid:h}=l,s={invalidateTags:nt(`${t}/invalidateTags`)},r=d=>d.type.startsWith(`${t}/`),a=[fc,dc,pc,gc,hc,mc];return{middleware:d=>{let u=!1;const p=f(d.dispatch),g={...e,internalState:p,refetchQuery:c,isThisApiSliceAction:r,mwApi:d},y=a.map(v=>v(g)),w=uc(g),q=yc(g);return v=>P=>{if(!Bi(P))return v(P);u||(u=!0,d.dispatch(o.internalActions.middlewareRegistered(h)));const b={...d,next:v},S=d.getState(),[C,_]=w(P,b,S);let I;if(C?I=v(P):I=_,d.getState()[t]&&(q(P,b,S),r(P)||l.hasRehydrationInfo(P)))for(const T of y)T(P,b,S);return I}},actions:s};function c(d){return e.api.endpoints[d.endpointName].initiate(d.originalArgs,{subscribe:!1,forceRefetch:!0})}}var qs=Symbol(),oo=({createSelector:e=Ni}={})=>({name:qs,init(t,{baseQuery:n,tagTypes:o,reducerPath:l,serializeQueryArgs:f,keepUnusedDataFor:h,refetchOnMountOrArgChange:s,refetchOnFocus:r,refetchOnReconnect:a,invalidationBehavior:i,onSchemaFailure:c,catchSchemaFailure:d,skipSchemaValidation:u},p){_i();const g=M=>M;Object.assign(t,{reducerPath:l,endpoints:{},internalActions:{onOnline:lr,onOffline:mn,onFocus:ur,onFocusLost:gn},util:{}});const y=oc({serializeQueryArgs:f,reducerPath:l,createSelector:e}),{selectInvalidatedBy:w,selectCachedArgsForQuery:q,buildQuerySelector:v,buildInfiniteQuerySelector:P,buildMutationSelector:b}=y;Re(t.util,{selectInvalidatedBy:w,selectCachedArgsForQuery:q});const{queryThunk:S,infiniteQueryThunk:C,mutationThunk:_,patchQueryData:I,updateQueryData:T,upsertQueryData:E,prefetch:x,buildMatchThunkActions:A}=sc({baseQuery:n,reducerPath:l,context:p,api:t,serializeQueryArgs:f,assertTagType:g,selectors:y,onSchemaFailure:c,catchSchemaFailure:d,skipSchemaValidation:u}),{reducer:R,actions:k}=ac({context:p,queryThunk:S,mutationThunk:_,serializeQueryArgs:f,reducerPath:l,assertTagType:g,config:{refetchOnFocus:r,refetchOnReconnect:a,refetchOnMountOrArgChange:s,keepUnusedDataFor:h,reducerPath:l,invalidationBehavior:i}});Re(t.util,{patchQueryData:I,updateQueryData:T,upsertQueryData:E,prefetch:x,resetApiState:k.resetApiState,upsertQueryEntries:k.cacheEntriesUpserted}),Re(t.internalActions,k);const L=new WeakMap,U=M=>tr(L,M,()=>({currentSubscriptions:new Map,currentPolls:new Map,runningQueries:new Map,runningMutations:new Map})),{buildInitiateQuery:D,buildInitiateInfiniteQuery:j,buildInitiateMutation:N,getRunningMutationThunk:F,getRunningMutationsThunk:Q,getRunningQueriesThunk:Y,getRunningQueryThunk:H}=nc({queryThunk:S,mutationThunk:_,infiniteQueryThunk:C,api:t,serializeQueryArgs:f,context:p,getInternalState:U});Re(t.util,{getRunningMutationThunk:F,getRunningMutationsThunk:Q,getRunningQueryThunk:H,getRunningQueriesThunk:Y});const{middleware:G,actions:K}=wc({reducerPath:l,context:p,queryThunk:S,mutationThunk:_,infiniteQueryThunk:C,api:t,assertTagType:g,selectors:y,getRunningQueryThunk:H,getInternalState:U});return Re(t.util,K),Re(t,{reducer:R,middleware:G}),{name:qs,injectEndpoint(M,X){const V=t,W=V.endpoints[M]??={};dr(X)&&Re(W,{name:M,select:v(M,X),initiate:D(M,X)},A(S,M)),ec(X)&&Re(W,{name:M,select:b(),initiate:N(M)},A(_,M)),hr(X)&&Re(W,{name:M,select:P(M,X),initiate:j(M,X)},A(S,M))}}}});oo();function Gt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Gt=function(n){return typeof n}:Gt=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Gt(e)}function Pc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qc(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function vc(e,t,n){return t&&qc(e.prototype,t),e}function Ec(e,t){return t&&(Gt(t)==="object"||typeof t=="function")?t:Wt(e)}function Yr(e){return Yr=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Yr(e)}function Wt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jr(e,t)}function Jr(e,t){return Jr=Object.setPrototypeOf||function(o,l){return o.__proto__=l,o},Jr(e,t)}function zt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Sc=await O("react"),{PureComponent:Tc}=Sc;var xc=function(e){bc(t,e);function t(){var n,o;Pc(this,t);for(var l=arguments.length,f=new Array(l),h=0;h<l;h++)f[h]=arguments[h];return o=Ec(this,(n=Yr(t)).call.apply(n,[this].concat(f))),zt(Wt(o),"state",{bootstrapped:!1}),zt(Wt(o),"_unsubscribe",void 0),zt(Wt(o),"handlePersistorState",function(){var s=o.props.persistor,r=s.getState(),a=r.bootstrapped;a&&(o.props.onBeforeLift?Promise.resolve(o.props.onBeforeLift()).finally(function(){return o.setState({bootstrapped:!0})}):o.setState({bootstrapped:!0}),o._unsubscribe&&o._unsubscribe())}),o}return vc(t,[{key:"componentDidMount",value:function(){this._unsubscribe=this.props.persistor.subscribe(this.handlePersistorState),this.handlePersistorState()}},{key:"componentWillUnmount",value:function(){this._unsubscribe&&this._unsubscribe()}},{key:"render",value:function(){return typeof this.props.children=="function"?this.props.children(this.state.bootstrapped):this.state.bootstrapped?this.props.children:this.props.loading}}]),t}(Tc);zt(xc,"defaultProps",{children:null,loading:null});var wn="persist:",Pn="persist/FLUSH",fr="persist/REHYDRATE",qn="persist/PAUSE",vn="persist/PERSIST",En="persist/PURGE",bn="persist/REGISTER",Ic=-1;function Vt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vt=function(n){return typeof n}:Vt=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Vt(e)}function vs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,o)}return n}function Ac(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vs(n,!0).forEach(function(o){Rc(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vs(n).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Rc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cc(e,t,n,o){o.debug;var l=Ac({},n);return e&&Vt(e)==="object"&&Object.keys(e).forEach(function(f){f!=="_persist"&&t[f]===n[f]&&(l[f]=e[f])}),l}function _c(e){var t=e.blacklist||null,n=e.whitelist||null,o=e.transforms||[],l=e.throttle||0,f="".concat(e.keyPrefix!==void 0?e.keyPrefix:wn).concat(e.key),h=e.storage,s;e.serialize===!1?s=function(b){return b}:typeof e.serialize=="function"?s=e.serialize:s=Oc;var r=e.writeFailHandler||null,a={},i={},c=[],d=null,u=null,p=function(b){Object.keys(b).forEach(function(S){w(S)&&a[S]!==b[S]&&c.indexOf(S)===-1&&c.push(S)}),Object.keys(a).forEach(function(S){b[S]===void 0&&w(S)&&c.indexOf(S)===-1&&a[S]!==void 0&&c.push(S)}),d===null&&(d=setInterval(g,l)),a=b};function g(){if(c.length===0){d&&clearInterval(d),d=null;return}var P=c.shift(),b=o.reduce(function(S,C){return C.in(S,P,a)},a[P]);if(b!==void 0)try{i[P]=s(b)}catch(S){console.error("redux-persist/createPersistoid: error serializing state",S)}else delete i[P];c.length===0&&y()}function y(){Object.keys(i).forEach(function(P){a[P]===void 0&&delete i[P]}),u=h.setItem(f,s(i)).catch(q)}function w(P){return!(n&&n.indexOf(P)===-1&&P!=="_persist"||t&&t.indexOf(P)!==-1)}function q(P){r&&r(P)}var v=function(){for(;c.length!==0;)g();return u||Promise.resolve()};return{update:p,flush:v}}function Oc(e){return JSON.stringify(e)}function kc(e){var t=e.transforms||[],n="".concat(e.keyPrefix!==void 0?e.keyPrefix:wn).concat(e.key),o=e.storage;e.debug;var l;return e.deserialize===!1?l=function(h){return h}:typeof e.deserialize=="function"?l=e.deserialize:l=jc,o.getItem(n).then(function(f){if(f)try{var h={},s=l(f);return Object.keys(s).forEach(function(r){h[r]=t.reduceRight(function(a,i){return i.out(a,r,s)},l(s[r]))}),h}catch(r){throw r}else return})}function jc(e){return JSON.parse(e)}function Dc(e){var t=e.storage,n="".concat(e.keyPrefix!==void 0?e.keyPrefix:wn).concat(e.key);return t.removeItem(n,Lc)}function Lc(e){}function Es(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,o)}return n}function Ce(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Es(n,!0).forEach(function(o){$c(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Es(n).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function $c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uc(e,t){if(e==null)return{};var n=Nc(e,t),o,l;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(l=0;l<f.length;l++)o=f[l],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function Nc(e,t){if(e==null)return{};var n={},o=Object.keys(e),l,f;for(f=0;f<o.length;f++)l=o[f],!(t.indexOf(l)>=0)&&(n[l]=e[l]);return n}var Mc=5e3;function Bc(e,t){var n=e.version!==void 0?e.version:Ic;e.debug;var o=e.stateReconciler===void 0?Cc:e.stateReconciler,l=e.getStoredState||kc,f=e.timeout!==void 0?e.timeout:Mc,h=null,s=!1,r=!0,a=function(c){return c._persist.rehydrated&&h&&!r&&h.update(c),c};return function(i,c){var d=i||{},u=d._persist,p=Uc(d,["_persist"]),g=p;if(c.type===vn){var y=!1,w=function(_,I){y||(c.rehydrate(e.key,_,I),y=!0)};if(f&&setTimeout(function(){!y&&w(void 0,new Error('redux-persist: persist timed out for persist key "'.concat(e.key,'"')))},f),r=!1,h||(h=_c(e)),u)return Ce({},t(g,c),{_persist:u});if(typeof c.rehydrate!="function"||typeof c.register!="function")throw new Error("redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.");return c.register(e.key),l(e).then(function(C){var _=e.migrate||function(I,T){return Promise.resolve(I)};_(C,n).then(function(I){w(I)},function(I){w(void 0,I)})},function(C){w(void 0,C)}),Ce({},t(g,c),{_persist:{version:n,rehydrated:!1}})}else{if(c.type===En)return s=!0,c.result(Dc(e)),Ce({},t(g,c),{_persist:u});if(c.type===Pn)return c.result(h&&h.flush()),Ce({},t(g,c),{_persist:u});if(c.type===qn)r=!0;else if(c.type===fr){if(s)return Ce({},g,{_persist:Ce({},u,{rehydrated:!0})});if(c.key===e.key){var q=t(g,c),v=c.payload,P=o!==!1&&v!==void 0?o(v,i,q,e):q,b=Ce({},P,{_persist:Ce({},u,{rehydrated:!0})});return a(b)}}}if(!u)return t(i,c);var S=t(g,c);return S===g?i:a(Ce({},S,{_persist:u}))}}function bs(e){return Qc(e)||Fc(e)||Hc()}function Hc(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function Fc(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function Qc(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function Ss(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,o)}return n}function Xr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ss(n,!0).forEach(function(o){Gc(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ss(n).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Gc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var io={registry:[],bootstrapped:!1},Wc=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:io,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case bn:return Xr({},t,{registry:[].concat(bs(t.registry),[n.key])});case fr:var o=t.registry.indexOf(n.key),l=bs(t.registry);return l.splice(o,1),Xr({},t,{registry:l,bootstrapped:l.length===0});default:return t}};function zc(e,t,n){var o=Di(Wc,io,void 0),l=function(r){o.dispatch({type:bn,key:r})},f=function(r,a,i){var c={type:fr,payload:a,err:i,key:r};e.dispatch(c),o.dispatch(c)},h=Xr({},o,{purge:function(){var r=[];return e.dispatch({type:En,result:function(i){r.push(i)}}),Promise.all(r)},flush:function(){var r=[];return e.dispatch({type:Pn,result:function(i){r.push(i)}}),Promise.all(r)},pause:function(){e.dispatch({type:qn})},persist:function(){e.dispatch({type:vn,register:l,rehydrate:f})}});return h.persist(),h}var Sn={},Tn={};Tn.__esModule=!0;Tn.default=Yc;function Kt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Kt=function(n){return typeof n}:Kt=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Kt(e)}function Er(){}var Vc={getItem:Er,setItem:Er,removeItem:Er};function Kc(e){if((typeof self>"u"?"undefined":Kt(self))!=="object"||!(e in self))return!1;try{var t=self[e],n="redux-persist ".concat(e," test");t.setItem(n,"test"),t.getItem(n),t.removeItem(n)}catch{return!1}return!0}function Yc(e){var t="".concat(e,"Storage");return Kc(t)?self[t]:Vc}Sn.__esModule=!0;Sn.default=Zc;var Jc=Xc(Tn);function Xc(e){return e&&e.__esModule?e:{default:e}}function Zc(e){var t=(0,Jc.default)(e);return{getItem:function(o){return new Promise(function(l,f){l(t.getItem(o))})},setItem:function(o,l){return new Promise(function(f,h){f(t.setItem(o,l))})},removeItem:function(o){return new Promise(function(l,f){l(t.removeItem(o))})}}}var co=void 0,eu=tu(Sn);function tu(e){return e&&e.__esModule?e:{default:e}}var ru=(0,eu.default)("local");co=ru;const{createEntityAdapter:nu,createSlice:su}=await O("@reduxjs/toolkit"),yt=nu(),au=yt.getInitialState(),uo=su({name:"blog",initialState:au,reducers:{postUpserted:(e,t)=>yt.upsertOne(e,t),postsUpserted:(e,t)=>yt.upsertMany(e,t),postsClear:e=>yt.removeAll(e)}}),{postUpserted:dy,postsUpserted:br,postsClear:hy}=uo.actions,ou=uo.reducer;yt.getSelectors();const{formatProdErrorMessage:fy}=await O("@reduxjs/toolkit"),{batch:iu,useDispatch:cu,useSelector:uu,useStore:lu}=await O("react-redux");function Lt(e){return e.replace(e[0],e[0].toUpperCase())}var du="query",hu="mutation",fu="infinitequery";function pu(e){return e.type===du}function gu(e){return e.type===hu}function lo(e){return e.type===fu}function lt(e,...t){return Object.assign(e,...t)}const{formatProdErrorMessage:py,formatProdErrorMessage:mu}=await O("@reduxjs/toolkit"),{useEffect:Me,useRef:Ne,useMemo:ie,useContext:gy,useCallback:Qe,useDebugValue:Sr,useLayoutEffect:yu,useState:Ts}=await O("react"),{shallowEqual:wt,Provider:my,ReactReduxContext:yy}=await O("react-redux");var Tr=Symbol();function xr(e){const t=Ne(e),n=ie(()=>fn(t.current,e),[e]);return Me(()=>{t.current!==n&&(t.current=n)},[n]),n}function $t(e){const t=Ne(e);return Me(()=>{wt(t.current,e)||(t.current=e)},[e]),wt(t.current,e)?t.current:e}var wu=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Pu=wu(),qu=()=>typeof navigator<"u"&&navigator.product==="ReactNative",vu=qu(),Eu=()=>Pu||vu?yu:Me,bu=Eu(),xs=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:e.data===void 0,status:Qa.pending}:e;function Ir(e,...t){const n={};return t.forEach(o=>{n[o]=e[o]}),n}var Ar=["data","status","isLoading","isSuccess","isError","error"];function Su({api:e,moduleOptions:{batch:t,hooks:{useDispatch:n,useSelector:o,useStore:l},unstable__sideEffectsInRender:f,createSelector:h},serializeQueryArgs:s,context:r}){const a=f?S=>S():Me,i=S=>S.current?.unsubscribe?.(),c=r.endpointDefinitions;return{buildQueryHooks:v,buildInfiniteQueryHooks:P,buildMutationHook:b,usePrefetch:p};function d(S,C,_){if(C?.endpointName&&S.isUninitialized){const{endpointName:R}=C,k=c[R];_!==ge&&s({queryArgs:C.originalArgs,endpointDefinition:k,endpointName:R})===s({queryArgs:_,endpointDefinition:k,endpointName:R})&&(C=void 0)}let I=S.isSuccess?S.data:C?.data;I===void 0&&(I=S.data);const T=I!==void 0,E=S.isLoading,x=(!C||C.isLoading||C.isUninitialized)&&!T&&E,A=S.isSuccess||T&&(E&&!C?.isError||S.isUninitialized);return{...S,data:I,currentData:S.data,isFetching:E,isLoading:x,isSuccess:A}}function u(S,C,_){if(C?.endpointName&&S.isUninitialized){const{endpointName:R}=C,k=c[R];_!==ge&&s({queryArgs:C.originalArgs,endpointDefinition:k,endpointName:R})===s({queryArgs:_,endpointDefinition:k,endpointName:R})&&(C=void 0)}let I=S.isSuccess?S.data:C?.data;I===void 0&&(I=S.data);const T=I!==void 0,E=S.isLoading,x=(!C||C.isLoading||C.isUninitialized)&&!T&&E,A=S.isSuccess||E&&T;return{...S,data:I,currentData:S.data,isFetching:E,isLoading:x,isSuccess:A}}function p(S,C){const _=n(),I=$t(C);return Qe((T,E)=>_(e.util.prefetch(S,T,{...I,...E})),[S,_,I])}function g(S,C,{refetchOnReconnect:_,refetchOnFocus:I,refetchOnMountOrArgChange:T,skip:E=!1,pollingInterval:x=0,skipPollingIfUnfocused:A=!1,...R}={}){const{initiate:k}=e.endpoints[S],L=n(),U=Ne(void 0);if(!U.current){const M=L(e.internalActions.internal_getRTKQSubscriptions());U.current=M}const D=xr(E?ge:C),j=$t({refetchOnReconnect:_,refetchOnFocus:I,pollingInterval:x,skipPollingIfUnfocused:A}),N=R.initialPageParam,F=$t(N),Q=Ne(void 0);let{queryCacheKey:Y,requestId:H}=Q.current||{},G=!1;Y&&H&&(G=U.current.isRequestSubscribed(Y,H));const K=!G&&Q.current!==void 0;return a(()=>{K&&(Q.current=void 0)},[K]),a(()=>{const M=Q.current;if(D===ge){M?.unsubscribe(),Q.current=void 0;return}const X=Q.current?.subscriptionOptions;if(!M||M.arg!==D){M?.unsubscribe();const V=L(k(D,{subscriptionOptions:j,forceRefetch:T,...lo(c[S])?{initialPageParam:F}:{}}));Q.current=V}else j!==X&&M.updateSubscriptionOptions(j)},[L,k,T,D,j,K,F,S]),[Q,L,k,j]}function y(S,C){return(I,{skip:T=!1,selectFromResult:E}={})=>{const{select:x}=e.endpoints[S],A=xr(T?ge:I),R=Ne(void 0),k=ie(()=>h([x(A),(N,F)=>F,N=>A],C,{memoizeOptions:{resultEqualityCheck:wt}}),[x,A]),L=ie(()=>E?h([k],E,{devModeChecks:{identityFunctionCheck:"never"}}):k,[k,E]),U=o(N=>L(N,R.current),wt),D=l(),j=k(D.getState(),R.current);return bu(()=>{R.current=j},[j]),U}}function w(S){Me(()=>()=>{i(S),S.current=void 0},[S])}function q(S){if(!S.current)throw new Error(mu(38));return S.current.refetch()}function v(S){const C=(T,E={})=>{const[x]=g(S,T,E);return w(x),ie(()=>({refetch:()=>q(x)}),[x])},_=({refetchOnReconnect:T,refetchOnFocus:E,pollingInterval:x=0,skipPollingIfUnfocused:A=!1}={})=>{const{initiate:R}=e.endpoints[S],k=n(),[L,U]=Ts(Tr),D=Ne(void 0),j=$t({refetchOnReconnect:T,refetchOnFocus:E,pollingInterval:x,skipPollingIfUnfocused:A});a(()=>{const Y=D.current?.subscriptionOptions;j!==Y&&D.current?.updateSubscriptionOptions(j)},[j]);const N=Ne(j);a(()=>{N.current=j},[j]);const F=Qe(function(Y,H=!1){let G;return t(()=>{i(D),D.current=G=k(R(Y,{subscriptionOptions:N.current,forceRefetch:!H})),U(Y)}),G},[k,R]),Q=Qe(()=>{D.current?.queryCacheKey&&k(e.internalActions.removeQueryResult({queryCacheKey:D.current?.queryCacheKey}))},[k]);return Me(()=>()=>{i(D)},[]),Me(()=>{L!==Tr&&!D.current&&F(L,!0)},[L,F]),ie(()=>[F,L,{reset:Q}],[F,L,Q])},I=y(S,d);return{useQueryState:I,useQuerySubscription:C,useLazyQuerySubscription:_,useLazyQuery(T){const[E,x,{reset:A}]=_(T),R=I(x,{...T,skip:x===Tr}),k=ie(()=>({lastArg:x}),[x]);return ie(()=>[E,{...R,reset:A},k],[E,R,A,k])},useQuery(T,E){const x=C(T,E),A=I(T,{selectFromResult:T===ge||E?.skip?void 0:xs,...E}),R=Ir(A,...Ar);return Sr(R),ie(()=>({...A,...x}),[A,x])}}}function P(S){const C=(I,T={})=>{const[E,x,A,R]=g(S,I,T),k=Ne(R);a(()=>{k.current=R},[R]);const L=Qe(function(j,N){let F;return t(()=>{i(E),E.current=F=x(A(j,{subscriptionOptions:k.current,direction:N}))}),F},[E,x,A]);w(E);const U=xr(T.skip?ge:I),D=Qe(()=>q(E),[E]);return ie(()=>({trigger:L,refetch:D,fetchNextPage:()=>L(U,"forward"),fetchPreviousPage:()=>L(U,"backward")}),[D,L,U])},_=y(S,u);return{useInfiniteQueryState:_,useInfiniteQuerySubscription:C,useInfiniteQuery(I,T){const{refetch:E,fetchNextPage:x,fetchPreviousPage:A}=C(I,T),R=_(I,{selectFromResult:I===ge||T?.skip?void 0:xs,...T}),k=Ir(R,...Ar,"hasNextPage","hasPreviousPage");return Sr(k),ie(()=>({...R,fetchNextPage:x,fetchPreviousPage:A,refetch:E}),[R,x,A,E])}}}function b(S){return({selectFromResult:C,fixedCacheKey:_}={})=>{const{select:I,initiate:T}=e.endpoints[S],E=n(),[x,A]=Ts();Me(()=>()=>{x?.arg.fixedCacheKey||x?.reset()},[x]);const R=Qe(function(Y){const H=E(T(Y,{fixedCacheKey:_}));return A(H),H},[E,T,_]),{requestId:k}=x||{},L=ie(()=>I({fixedCacheKey:_,requestId:x?.requestId}),[_,x,I]),U=ie(()=>C?h([L],C):L,[C,L]),D=o(U,wt),j=_==null?x?.arg.originalArgs:void 0,N=Qe(()=>{t(()=>{x&&A(void 0),_&&E(e.internalActions.removeMutationResult({requestId:k,fixedCacheKey:_}))})},[E,_,x,k]),F=Ir(D,...Ar,"endpointName");Sr(F);const Q=ie(()=>({...D,originalArgs:j,reset:N}),[D,j,N]);return ie(()=>[R,Q],[R,Q])}}}var Tu=Symbol(),xu=({batch:e=iu,hooks:t={useDispatch:cu,useSelector:uu,useStore:lu},createSelector:n=Li,unstable__sideEffectsInRender:o=!1,...l}={})=>({name:Tu,init(f,{serializeQueryArgs:h},s){const r=f,{buildQueryHooks:a,buildInfiniteQueryHooks:i,buildMutationHook:c,usePrefetch:d}=Su({api:f,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:o,createSelector:n},serializeQueryArgs:h,context:s});return lt(r,{usePrefetch:d}),lt(s,{batch:e}),{injectEndpoint(u,p){if(pu(p)){const{useQuery:g,useLazyQuery:y,useLazyQuerySubscription:w,useQueryState:q,useQuerySubscription:v}=a(u);lt(r.endpoints[u],{useQuery:g,useLazyQuery:y,useLazyQuerySubscription:w,useQueryState:q,useQuerySubscription:v}),f[`use${Lt(u)}Query`]=g,f[`useLazy${Lt(u)}Query`]=y}if(gu(p)){const g=c(u);lt(r.endpoints[u],{useMutation:g}),f[`use${Lt(u)}Mutation`]=g}else if(lo(p)){const{useInfiniteQuery:g,useInfiniteQuerySubscription:y,useInfiniteQueryState:w}=i(u);lt(r.endpoints[u],{useInfiniteQuery:g,useInfiniteQuerySubscription:y,useInfiniteQueryState:w}),f[`use${Lt(u)}InfiniteQuery`]=g}}}}});const{configureStore:wy,formatProdErrorMessage:Py}=await O("@reduxjs/toolkit");await O("react");var xn=so(oo(),xu());const Iu="1H67SAMO2T",Au="d7f493e3a24525b7021451b81b1d294a",Ru="blog_contentful_prd",Cu="/auth",_u="/blog",Ou="https://cms.decentraland.zone/spaces/ea2ybdmmn1kv/environments/master",ku="0xfa04d2e2ba9aec166c93dfeeba7427b2303befa9",ju="0x7ad72b9f944ea9793cf4055d88f81138cc2c63a0",Du="https://notifications.decentraland.zone",Lu="https://peer.decentraland.zone",$u="f0S2L1sWumT8BPjBmIBDTN5gIWjhrRHG",Uu="e1adce863fe287bb6cf0e3fd90bdb77f",Nu={ALGOLIA_APP_ID:Iu,ALGOLIA_API_KEY:Au,ALGOLIA_BLOG_INDEX:Ru,AUTH_URL:Cu,BLOG_BASE_URL:_u,CMS_BASE_URL:Ou,MANA_TOKEN_ADDRESS_ETHEREUM:ku,MANA_TOKEN_ADDRESS_MATIC:ju,NOTIFICATIONS_API_URL:Du,PEER_URL:Lu,SEGMENT_API_KEY:$u,THIRDWEB_CLIENT_ID:Uu},Mu="1H67SAMO2T",Bu="fbdb16248a42878501d8fdf1d05ae309",Hu="blog_contentful_prd",Fu="https://decentraland.org/auth",Qu="https://decentraland.org/blog",Gu="https://cms.decentraland.org/spaces/ea2ybdmmn1kv/environments/master",Wu="0x0f5d2fb29fb7d3cfee444a200298f468908cc942",zu="0xa1c57f48f0deb89f569dfbe6e2b7f46d33606fd4",Vu="https://notifications.decentraland.org",Ku="https://peer.decentraland.org",Yu="f0S2L1sWumT8BPjBmIBDTN5gIWjhrRHG",Ju="e1adce863fe287bb6cf0e3fd90bdb77f",Xu={ALGOLIA_APP_ID:Mu,ALGOLIA_API_KEY:Bu,ALGOLIA_BLOG_INDEX:Hu,AUTH_URL:Fu,BLOG_BASE_URL:Qu,CMS_BASE_URL:Gu,MANA_TOKEN_ADDRESS_ETHEREUM:Wu,MANA_TOKEN_ADDRESS_MATIC:zu,NOTIFICATIONS_API_URL:Vu,PEER_URL:Ku,SEGMENT_API_KEY:Yu,THIRDWEB_CLIENT_ID:Ju},Zu="1H67SAMO2T",el="d7f493e3a24525b7021451b81b1d294a",tl="blog_contentful_prd",rl="https://decentraland.today/auth",nl="https://decentraland.today/blog",sl="https://cms.decentraland.zone/spaces/ea2ybdmmn1kv/environments/master",al="0xfa04d2e2ba9aec166c93dfeeba7427b2303befa9",ol="0x7ad72b9f944ea9793cf4055d88f81138cc2c63a0",il="https://notifications.decentraland.zone",cl="https://peer.decentraland.zone",ul="f0S2L1sWumT8BPjBmIBDTN5gIWjhrRHG",ll="e1adce863fe287bb6cf0e3fd90bdb77f",dl={ALGOLIA_APP_ID:Zu,ALGOLIA_API_KEY:el,ALGOLIA_BLOG_INDEX:tl,AUTH_URL:rl,BLOG_BASE_URL:nl,CMS_BASE_URL:sl,MANA_TOKEN_ADDRESS_ETHEREUM:al,MANA_TOKEN_ADDRESS_MATIC:ol,NOTIFICATIONS_API_URL:il,PEER_URL:cl,SEGMENT_API_KEY:ul,THIRDWEB_CLIENT_ID:ll},In=xi({[Qt.DEVELOPMENT]:Nu,[Qt.STAGING]:dl,[Qt.PRODUCTION]:Xu},{systemEnvVariables:{REACT_APP_DCL_DEFAULT_ENV:"dev"}}),re=e=>In.get(e),hl=re("PEER_URL");async function fl(e){try{const t=await fetch(`${hl}/lambdas/profiles/${e.toLowerCase()}`);if(!t.ok)return null;const n=await t.json();return Array.isArray(n)?n[0]:n}catch{return null}}const nr=xn({reducerPath:"profileClient",baseQuery:ao(),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 fl(t)}}catch{return{data:null}}},providesTags:(t,n,o)=>o?[{type:"Profile",id:o}]:[]})})}),{useGetProfileQuery:pl}=nr,ho=re("CMS_BASE_URL");if(!ho)throw new Error("CMS_BASE_URL environment variable is not set");const fo=ho,sr=xn({reducerPath:"cmsClient",baseQuery:Ji({baseUrl:fo}),tagTypes:["BlogPosts","BlogPost","Categories","Authors"],keepUnusedDataFor:300,refetchOnFocus:!1,refetchOnReconnect:!1,endpoints:()=>({})}),ar=xn({reducerPath:"algoliaClient",baseQuery:ao(),tagTypes:["SearchResults"],keepUnusedDataFor:300,refetchOnFocus:!1,refetchOnReconnect:!1,endpoints:()=>({})}),{combineReducers:gl,configureStore:ml}=await O("@reduxjs/toolkit"),{networkReducer:yl,transactionsReducer:wl,walletReducer:Pl}=await O("@dcl/core-web3"),ql={key:"blog",storage:co,whitelist:["ids","entities"]},vl=gl({blog:Bc(ql,ou),network:yl,transactions:wl,wallet:Pl,[sr.reducerPath]:sr.reducer,[ar.reducerPath]:ar.reducer,[nr.reducerPath]:nr.reducer}),Pt=ml({reducer:vl,middleware:e=>e({serializableCheck:{ignoredActions:[Pn,fr,qn,vn,En,bn]}}).concat(sr.middleware,ar.middleware,nr.middleware),devTools:!1}),qy=zc(Pt),Is=(e,t)=>e.id||t||"",An=async(e,t)=>{const n=fo,o=new URL(`${n}${e}`,window.location.origin),l=await fetch(o.toString());if(!l.ok)throw new Error(`CMS API error: ${l.status} ${l.statusText}`);return l.json()},Rr=new Map,dt=new Map,et=new Map,ve=new Map,ye=async e=>{const t=e;if(t?.sys?.type==="Link"&&t.sys.linkType==="Asset"){const n=t.sys.id;if(Rr.has(n))return Rr.get(n);if(dt.has(n))return dt.get(n);const o=An(`/assets/${n}`).then(l=>{const f=l;return Rr.set(n,f),dt.delete(n),f}).catch(()=>(dt.delete(n),e));return dt.set(n,o),o}return e};let Tt=null;const vy=e=>{Tt=e},qe=new Map,pe=new Map,As=()=>{if(!Tt)return new Map;const t=Tt.getState().cmsClient?.queries||{},n=Object.entries(t).find(([o])=>o.startsWith("getBlogCategories"));if(n&&n[1]?.data){const o=n[1].data,l=new Map;for(const f of o)f?.sys?.id&&l.set(f.sys.id,f);return l}return new Map},Rs=()=>{if(!Tt)return new Map;const t=Tt.getState().cmsClient?.queries||{},n=Object.entries(t).find(([o])=>o.startsWith("getBlogAuthors"));if(n&&n[1]?.data){const o=n[1].data,l=new Map;for(const f of o)f?.sys?.id&&l.set(f.sys.id,f);return l}return new Map},Zr=async e=>{if(et.has(e))return et.get(e);if(ve.has(e))return ve.get(e);const t=An(`/entries/${e}`).then(async n=>{const o=n;return o.fields?.image&&(o.fields.image=await ye(o.fields.image)),et.set(e,o),ve.delete(e),o}).catch(()=>{throw ve.delete(e),new Error(`Failed to fetch entry ${e}`)});return ve.set(e,t),t},El=async e=>{const t=e,n=e;if(t?.sys?.type==="Link"&&t.sys.linkType==="Entry"){const o=t.sys.id;if(qe.has(o))return qe.get(o);const f=As().get(o);if(f)return f.fields?.image&&(f.fields.image=await ye(f.fields.image)),qe.set(o,f),f;try{const h=await Zr(o);return qe.set(o,h),h}catch{return e}}if(n?.sys?.id&&n?.fields)return qe.has(n.sys.id)?qe.get(n.sys.id):(n.fields.image&&(n.fields.image=await ye(n.fields.image)),qe.set(n.sys.id,n),n);if(n?.sys?.id){if(qe.has(n.sys.id))return qe.get(n.sys.id);const l=As().get(n.sys.id);if(l)return l.fields?.image&&(l.fields.image=await ye(l.fields.image)),qe.set(n.sys.id,l),l}return e},bl=async e=>{const t=e,n=e;if(t?.sys?.type==="Link"&&t.sys.linkType==="Entry"){const o=t.sys.id;if(pe.has(o))return pe.get(o);const f=Rs().get(o);if(f)return f.fields?.image&&(f.fields.image=await ye(f.fields.image)),pe.set(o,f),f;try{const h=await Zr(o);return pe.set(o,h),h}catch{return e}}if(n?.sys?.id&&n?.fields)return pe.has(n.sys.id)?pe.get(n.sys.id):(n.fields.image&&(n.fields.image=await ye(n.fields.image)),pe.set(n.sys.id,n),n);if(n?.sys?.id){if(pe.has(n.sys.id))return pe.get(n.sys.id);const l=Rs().get(n.sys.id);if(l)return l.fields?.image&&(l.fields.image=await ye(l.fields.image)),pe.set(n.sys.id,l),l;try{const f=await Zr(n.sys.id);return pe.set(n.sys.id,f),f}catch{return e}}return e},Cs=async e=>{if(!e)return"";const o=(await ye({sys:{type:"Link",linkType:"Asset",id:e}}))?.fields?.file?.url||"";return o.startsWith("//")?`https:${o}`:o},_s=async e=>{if(!e)return"";if(et.has(e))return et.get(e)?.fields?.id;if(ve.has(e))return(await ve.get(e))?.fields?.id;try{const t=An(`/entries/${e}`);ve.set(e,t);const n=await t;return et.set(e,n),ve.delete(e),n?.fields?.id}catch{return ve.delete(e),""}};function Rn(e){if(!e)return"";const t=e,n=new Date(t.includes("T")?t:`${t}T00:00:00Z`);return Number.isNaN(n.getTime())?t:new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"short",day:"2-digit",year:"numeric"}).format(n)}const ht="/blog",ke={home:()=>"/",blogs:()=>ht,category:e=>`${ht}/${e}`,blog:(e,t)=>`${ht}/${e}/${t}`,author:e=>`${ht}/author/${e}`,search:e=>`${ht}/search?q=${encodeURIComponent(e)}`,twitter:e=>{const t=`${window.location.origin}${e.url}`;return`https://x.com/intent/post?text=${encodeURIComponent(e.title)}&url=${encodeURIComponent(t)}`},facebook:e=>{const t=`${window.location.origin}${e.url}`;return`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(t)}`}},po=e=>e?e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,""):"";function pr(e){if(!e||!e.sys||!e.fields||!e.fields.file)return null;const t=e.fields.file.url;return t?{id:e.sys.id,url:t.startsWith("//")?`https:${t}`:t,width:e.fields.file.details?.image?.width||0,height:e.fields.file.details?.image?.height||0,mimeType:e.fields.file.contentType||"image/jpeg"}:null}function en(e){if(!e||!e.sys||!e.fields)return null;const t=e.fields.id||po(e.fields.title||"");if(!t)return null;const n=pr(e.fields.image);return n?{id:e.sys.id,slug:t,title:e.fields.title||"",description:e.fields.description||"",image:n,isShownInMenu:e.fields.isShownInMenu??!0,url:ke.category(t)}:null}function Sl(e){return{id:e||"uncategorized",slug:"uncategorized",title:"Uncategorized",description:"Posts without a valid category",image:{id:"default-category-image",url:"https://decentraland.org/logos/png/color.png",width:200,height:200,mimeType:"image/png"},isShownInMenu:!1,url:ke.category("uncategorized")}}function Tl(e){return{id:e||"default-image",url:"https://decentraland.org/logos/png/color.png",width:1200,height:630,mimeType:"image/png"}}function Os(e){const t=e||"decentraland";return{id:e||"unknown",slug:t,title:"Decentraland",description:"Decentraland Team",image:{id:"default-avatar",url:"https://decentraland.org/logos/png/color.png",width:200,height:200,mimeType:"image/png"},url:ke.author(t)}}function Yt(e){if(!e||!e.sys||!e.fields)return Os(e?.sys?.id);if(Object.keys(e.fields).length===0)return Os(e.sys.id);const n=e.fields.title||"",o=e.fields.id||po(n)||e.sys.id,l=pr(e.fields.image);return l?{id:e.sys.id,slug:o,title:n,description:e.fields.description||"",image:l,url:ke.author(o)}:{id:e.sys.id,slug:o,title:n||"Decentraland",description:e.fields.description||"",image:{id:"default-avatar",url:"https://decentraland.org/logos/png/color.png",width:200,height:200,mimeType:"image/png"},url:ke.author(o)}}function Ut(e){if(!e||!e.sys||!e.fields)return null;let t=en(e.fields.category);t||(t=Sl(e.sys.id));const n=Yt(e.fields.author);let o=pr(e.fields.image);o||(o=Tl(e.sys.id));const l=e.fields.title||"",f=e.fields.id,h=e.fields.publishedDate,s=e.fields.body;return{id:e.sys.id,slug:f,title:l,description:e.fields.description||"",publishedDate:Rn(h),body:s||{},bodyAssets:{},image:o,category:t,author:n,url:ke.blog(t.slug,f)}}const Cr=e=>Pt.getState().blog.entities[e],Nt=async e=>{const t={...e,fields:{...e.fields}},[n,o,l]=await Promise.all([t.fields.category?El(t.fields.category):void 0,t.fields.author?bl(t.fields.author):void 0,t.fields.image?ye(t.fields.image):void 0]);return n&&(t.fields.category=n),o&&(t.fields.author=o),l&&(t.fields.image=l),t},Mt=async e=>{const t={...e,fields:{...e.fields}};return t.fields.image&&(t.fields.image=await ye(t.fields.image)),t},Ge=e=>{if(e instanceof Error)return e.message;if(typeof e=="object"&&e!==null&&"error"in e){const t=e.error;if(typeof t=="string")return t}return"Unknown error"},go=e=>{const t=[];if(e.nodeType===oe.BLOCKS.EMBEDDED_ASSET&&e.data?.target?.sys?.id&&t.push(e.data.target.sys.id),e.content)for(const n of e.content)t.push(...go(n));return t},_r=async e=>{const t=go(e),n=[...new Set(t)];if(n.length===0)return{};const o=await Promise.all(n.map(async f=>{const h=await ye({sys:{type:"Link",linkType:"Asset",id:f}}),s=pr(h);return{id:f,asset:s}})),l={};for(const{id:f,asset:h}of o)h&&(l[f]=h);return l},xl=sr.injectEndpoints({endpoints:e=>({getBlogPosts:e.query({serializeQueryArgs:({queryArgs:t})=>`posts-${t.category||"all"}-${t.author||"all"}`,merge:(t,n,{arg:o})=>{if(o.skip===0)return t.posts.length>n.posts.length?t:n;const l=new Set(t.posts.map(h=>h.id)),f=n.posts.filter(h=>!l.has(h.id));return{posts:[...t.posts,...f],total:n.total,hasMore:n.hasMore,nextCmsSkip:n.nextCmsSkip}},forceRefetch:({currentArg:t,previousArg:n})=>n?t?.skip!==n?.skip&&(t?.skip??0)>(n?.skip??0):!0,query:({category:t,author:n,limit:o=20,skip:l=0})=>({url:"/blog/posts",params:{category:t,author:n,limit:o,skip:l}}),transformResponse:async(t,n,{skip:o=0})=>{try{const l=t.total,h=(await Promise.all(t.items.map(async a=>{const i=a.sys?.id;if(i){const c=Cr(i);if(c)return c}try{const c=await Nt(a);return Ut(c)}catch{return null}}))).filter(a=>a!==null);h.length>0&&Pt.dispatch(br(h));const s=o+t.items.length,r=t.items.length===0?!1:s<l;return{posts:h,total:l,hasMore:r,nextCmsSkip:s}}catch(l){throw{status:"CUSTOM_ERROR",error:Ge(l)}}},keepUnusedDataFor:60,providesTags:t=>t?[...t.posts.map(({id:n})=>({type:"BlogPosts",id:n})),{type:"BlogPosts",id:"LIST"}]:[{type:"BlogPosts",id:"LIST"}]}),getBlogPost:e.query({query:({id:t})=>({url:`/entries/${t}`}),transformResponse:async(t,n,{id:o})=>{try{const l=Cr(o);if(l&&l.bodyAssets&&Object.keys(l.bodyAssets).length>0)return l;const f=await Nt(t),h=Ut(f);if(!h)throw{status:"CUSTOM_ERROR",error:"Failed to map blog post: missing required fields"};return h.body&&(h.bodyAssets=await _r(h.body)),Pt.dispatch(br([h])),h}catch(l){throw{status:"CUSTOM_ERROR",error:Ge(l)}}},providesTags:(t,n,o)=>t?[{type:"BlogPost",id:o.id}]:[]}),getBlogCategories:e.query({query:()=>({url:"/blog/categories"}),transformResponse:async t=>{try{return(await Promise.all(t.items.map(o=>Mt(o)))).map(o=>en(o)).filter(o=>o!==null)}catch(n){throw{status:"CUSTOM_ERROR",error:Ge(n)}}},providesTags:["Categories"]}),getBlogCategoryBySlug:e.query({query:()=>({url:"/blog/categories"}),transformResponse:async(t,n,{slug:o})=>{try{const l=t.items.find(s=>{const r=s.fields;return Is(r,s.sys.id)===o});if(!l)throw{status:"CUSTOM_ERROR",error:`Category with slug "${o}" not found`};const f=await Mt(l),h=en(f);if(!h)throw{status:"CUSTOM_ERROR",error:"Failed to map category: missing required fields"};return h}catch(l){throw{status:"CUSTOM_ERROR",error:Ge(l)}}},providesTags:(t,n,o)=>t?[{type:"Categories",id:o.slug}]:[]}),getBlogPostBySlug:e.query({query:({postSlug:t})=>({url:"/blog/posts",params:{slug:t}}),transformResponse:async(t,n,{postSlug:o})=>{try{const l=t.items.find(r=>r.fields.id===o);if(!l)throw{status:"CUSTOM_ERROR",error:`Post with slug "${o}" not found`};const f=l.sys?.id;if(f){const r=Cr(f);if(r&&r.bodyAssets&&Object.keys(r.bodyAssets).length>0)return r}const h=await Nt(l),s=Ut(h);if(!s)throw{status:"CUSTOM_ERROR",error:"Failed to map post: missing required fields"};return s.body&&(s.bodyAssets=await _r(s.body)),Pt.dispatch(br([s])),s}catch(l){throw{status:"CUSTOM_ERROR",error:Ge(l)}}},providesTags:(t,n,o)=>t?[{type:"BlogPost",id:`${o.categorySlug}/${o.postSlug}`}]:[]}),getBlogAuthors:e.query({query:()=>({url:"/blog/authors"}),transformResponse:async t=>{try{return(await Promise.all(t.items.map(o=>Mt(o)))).map(o=>Yt(o)).filter(o=>o!==null)}catch(n){throw{status:"CUSTOM_ERROR",error:n instanceof Error?n.message:"Unknown error"}}},providesTags:["Authors"]}),getBlogAuthor:e.query({query:({id:t})=>({url:`/entries/${t}`}),transformResponse:t=>{const n=Yt(t);if(!n)throw{status:"CUSTOM_ERROR",error:"Failed to map author: missing required fields"};return n},providesTags:(t,n,o)=>t?[{type:"Authors",id:o.id}]:[]}),getBlogAuthorBySlug:e.query({query:()=>({url:"/blog/authors"}),transformResponse:async(t,n,{slug:o})=>{try{const l=t.items.find(s=>{const r=s.fields;return Is(r,s.sys.id)===o});if(!l)throw{status:"CUSTOM_ERROR",error:`Author with slug "${o}" not found`};const f=await Mt(l),h=Yt(f);if(!h)throw{status:"CUSTOM_ERROR",error:"Failed to map author: missing required fields"};return h}catch(l){throw{status:"CUSTOM_ERROR",error:Ge(l)}}},providesTags:(t,n,o)=>t?[{type:"Authors",id:o.slug}]:[]}),getBlogPostPreview:e.query({queryFn:async({id:t,env:n,token:o,previewBaseUrl:l,spaceId:f})=>{try{const h=`${l}/spaces/${f}/environments/${n}/entries?content_type=blog_post&fields.id=${t}&access_token=${o}`,s=await fetch(h);if(!s.ok)return{error:{status:s.status,data:`Failed to fetch preview: ${s.statusText}`}};const r=await s.json();if(!r.items||r.items.length===0)return{error:{status:"CUSTOM_ERROR",error:`Preview post with id "${t}" not found`}};const a=r.items[0],i=await Nt(a),c=Ut(i);return c?(c.body&&(c.bodyAssets=await _r(c.body)),{data:c}):{error:{status:"CUSTOM_ERROR",error:"Failed to map preview post: missing required fields"}}}catch(h){return{error:{status:"CUSTOM_ERROR",error:Ge(h)}}}},providesTags:(t,n,o)=>t?[{type:"BlogPost",id:`preview-${o.id}`}]:[]})}),overrideExisting:!1}),{useGetBlogPostsQuery:mo,useGetBlogCategoriesQuery:Il,useGetBlogCategoryBySlugQuery:Al,useGetBlogPostBySlugQuery:Rl,useGetBlogAuthorBySlugQuery:Cl,useGetBlogPostPreviewQuery:_l}=xl,{createWeb3CoreConfig:Ol,thirdweb:kl}=await O("@dcl/core-web3"),ks=re("THIRDWEB_CLIENT_ID")??"",jl={dev:"dev",stg:"stg",prod:"prd"},Dl=jl[In.getEnv()]??"prd",Ey=Ol({environment:Dl,appMetadata:{name:"Decentraland Blog",description:"The official Decentraland Blog",url:typeof window<"u"?window.location.origin:"https://decentraland.org/blog"},additionalConnectors:[...ks?[kl({clientId:ks})]:[]]}),Ll={title:"Blog",default_description:"Stay up to date with Decentraland announcements, updates, community highlights, and more.",all_articles:"All articles",load_more:"Load More",nothing_to_show:"Nothing to show",related_post:"Related Articles",share:"Share",posts_by:"Posts by {author}"},$l={placeholder:"Search...",clear:"Clear search",searching:"Searching...",error:"Search error",no_matches:"No matches",try_something_else:"Try searching for something else",see_more_results:"See more results",results_for:"Search results for",no_results_for:"No results found for",title:"Search",title_with_query:"Search: {query}",description_with_query:'Search results for "{query}" in Decentraland Blog',description:"Search the Decentraland Blog"},Ul={generic:"Something went wrong. Please try again.",load_post:"Failed to load post. Please try again later.",load_posts:"Failed to load posts. Please try again later.",load_category:"Failed to load category. Please try again later.",load_author:"Failed to load author. Please try again later.",load_preview:"Failed to load preview. Please check your preview URL and try again."},Nl={mode:"Preview Mode",description:"You are viewing an unpublished post from Contentful",missing_params:"Missing preview parameters. Required: contentful_id, contentful_env, token"},Ml={default_image_alt:"Decentraland - A virtual world owned by its users"},by={blog:Ll,search:$l,error:Ul,preview:Nl,seo:Ml};var Cn={};Cn.match=Wl;Cn.parse=yo;var Bl=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,Hl=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,Fl=/^(?:(min|max)-)?(.+)/,Ql=/(em|rem|px|cm|mm|in|pt|pc)?$/,Gl=/(dpi|dpcm|dppx)?$/;function Wl(e,t){return yo(e).some(function(n){var o=n.inverse,l=n.type==="all"||t.type===n.type;if(l&&o||!(l||o))return!1;var f=n.expressions.every(function(h){var s=h.feature,r=h.modifier,a=h.value,i=t[s];if(!i)return!1;switch(s){case"orientation":case"scan":return i.toLowerCase()===a.toLowerCase();case"width":case"height":case"device-width":case"device-height":a=Ls(a),i=Ls(i);break;case"resolution":a=Ds(a),i=Ds(i);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":a=js(a),i=js(i);break;case"grid":case"color":case"color-index":case"monochrome":a=parseInt(a,10)||1,i=parseInt(i,10)||0;break}switch(r){case"min":return i>=a;case"max":return i<=a;default:return i===a}});return f&&!o||!f&&o})}function yo(e){return e.split(",").map(function(t){t=t.trim();var n=t.match(Bl),o=n[1],l=n[2],f=n[3]||"",h={};return h.inverse=!!o&&o.toLowerCase()==="not",h.type=l?l.toLowerCase():"all",f=f.match(/\([^\)]+\)/g)||[],h.expressions=f.map(function(s){var r=s.match(Hl),a=r[1].toLowerCase().match(Fl);return{modifier:a[1],feature:a[2],value:r[2]}}),h})}function js(e){var t=Number(e),n;return t||(n=e.match(/^(\d+)\s*\/\s*(\d+)$/),t=n[1]/n[2]),t}function Ds(e){var t=parseFloat(e),n=String(e).match(Gl)[1];switch(n){case"dpcm":return t/2.54;case"dppx":return t*96;default:return t}}function Ls(e){var t=parseFloat(e),n=String(e).match(Ql)[1];switch(n){case"em":return t*16;case"rem":return t*16;case"cm":return t*96/2.54;case"mm":return t*96/2.54/10;case"in":return t*96;case"pt":return t*72;case"pc":return t*72/12;default:return t}}var zl=Cn.match,$s=typeof window<"u"?window.matchMedia:null;function Vl(e,t,n){var o=this,l;$s&&!n&&(l=$s.call(window,e)),l?(this.matches=l.matches,this.media=l.media,l.addListener(s)):(this.matches=zl(e,t),this.media=e),this.addListener=f,this.removeListener=h,this.dispose=r;function f(a){l&&l.addListener(a)}function h(a){l&&l.removeListener(a)}function s(a){o.matches=a.matches,o.media=a.media}function r(){l&&l.removeListener(s)}}function Kl(e,t,n){return new Vl(e,t,n)}var Yl=Kl;const Jl=It(Yl);var Xl=/[A-Z]/g,Zl=/^ms-/,Or={};function ed(e){return"-"+e.toLowerCase()}function wo(e){if(Or.hasOwnProperty(e))return Or[e];var t=e.replace(Xl,ed);return Or[e]=Zl.test(t)?"-"+t:t}function td(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),o=Object.keys(t),l=n.length;if(o.length!==l)return!1;for(let f=0;f<l;f++){const h=n[f];if(e[h]!==t[h]||!Object.prototype.hasOwnProperty.call(t,h))return!1}return!0}var Po={exports:{}},rd="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",nd=rd,sd=nd;function qo(){}function vo(){}vo.resetWarningCache=qo;var ad=function(){function e(o,l,f,h,s,r){if(r!==sd){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:vo,resetWarningCache:qo};return n.PropTypes=n,n};Po.exports=ad();var od=Po.exports;const $=It(od),{createContext:id,useRef:cd,useEffect:Ve,useContext:ud,useState:gr}=await O("react"),ae=$.oneOfType([$.string,$.number]),Eo={all:$.bool,grid:$.bool,aural:$.bool,braille:$.bool,handheld:$.bool,print:$.bool,projection:$.bool,screen:$.bool,tty:$.bool,tv:$.bool,embossed:$.bool},ld={orientation:$.oneOf(["portrait","landscape"]),scan:$.oneOf(["progressive","interlace"]),aspectRatio:$.string,deviceAspectRatio:$.string,height:ae,deviceHeight:ae,width:ae,deviceWidth:ae,color:$.bool,colorIndex:$.bool,monochrome:$.bool,resolution:ae,type:Object.keys(Eo)},{type:Sy,...dd}=ld,hd={minAspectRatio:$.string,maxAspectRatio:$.string,minDeviceAspectRatio:$.string,maxDeviceAspectRatio:$.string,minHeight:ae,maxHeight:ae,minDeviceHeight:ae,maxDeviceHeight:ae,minWidth:ae,maxWidth:ae,minDeviceWidth:ae,maxDeviceWidth:ae,minColor:$.number,maxColor:$.number,minColorIndex:$.number,maxColorIndex:$.number,minMonochrome:$.number,maxMonochrome:$.number,minResolution:ae,maxResolution:ae,...dd},fd={...Eo,...hd};var pd={all:fd};const gd=e=>`not ${e}`,md=(e,t)=>{const n=wo(e);return typeof t=="number"&&(t=`${t}px`),t===!0?n:t===!1?gd(n):`(${n}: ${t})`},yd=e=>e.join(" and "),wd=e=>{const t=[];return Object.keys(pd.all).forEach(n=>{const o=e[n];o!=null&&t.push(md(n,o))}),yd(t)},Pd=id(void 0),qd=e=>e.query||wd(e),Us=e=>e?Object.keys(e).reduce((n,o)=>(n[wo(o)]=e[o],n),{}):void 0,bo=()=>{const e=cd(!1);return Ve(()=>{e.current=!0},[]),e.current},vd=e=>{const t=ud(Pd),n=()=>Us(e)||Us(t),[o,l]=gr(n);return Ve(()=>{const f=n();td(o,f)||l(f)},[e,t]),o},Ed=e=>{const t=()=>qd(e),[n,o]=gr(t);return Ve(()=>{const l=t();n!==l&&o(l)},[e]),n},bd=(e,t)=>{const n=()=>Jl(e,t||{},!!t),[o,l]=gr(n),f=bo();return Ve(()=>{if(f){const h=n();return l(h),()=>{h&&h.dispose()}}},[e,t]),o},Sd=e=>{const[t,n]=gr(e.matches);return Ve(()=>{const o=l=>{n(l.matches)};return e.addListener(o),n(e.matches),()=>{e.removeListener(o)}},[e]),t},Td=(e,t,n)=>{const o=vd(t),l=Ed(e);if(!l)throw new Error("Invalid or missing MediaQuery!");const f=bd(l,o),h=Sd(f);return bo(),Ve(()=>{},[h]),Ve(()=>()=>{f&&f.dispose()},[]),h},{useEffect:xd,useRef:Id,useState:Ad}=await O("react"),So=e=>{const[t,n]=Ad(!1),o=Id(null);return xd(()=>{if(!e)return;const l=new window.Image;if(o.current=l,l.src=e,l.complete){n(!0);return}return n(!1),l.onload=()=>n(!0),l.onerror=()=>n(!0),()=>{o.current&&(o.current.onload=null,o.current.onerror=null)}},[e]),t},{Link:_n}=await O("react-router-dom"),{Box:st,Skeleton:at,dclColors:Ns,styled:te}=await O("decentraland-ui2"),Ms=te(st)(()=>({width:"100%",margin:"0 40px 40px 0",position:"relative",display:"flex",justifyContent:"space-between","@media (max-width: 1096px)":{display:"none"}})),Rd=te(st)(({$imageUrl:e})=>({backgroundImage:`url("${e}")`,backgroundSize:"cover",backgroundPosition:"center",boxShadow:"0 2px 4px 0 rgba(0, 0, 0, 0.16)",borderRadius:"5px",width:"697px",paddingBottom:"calc(697px * 0.5)",marginRight:"31px",transition:"transform 250ms ease, box-shadow 250ms ease"})),Cd=te(_n)(()=>({display:"block","&:hover > div":{transform:"translate(0, -4px)",boxShadow:"0 10px 20px 0 rgba(0, 0, 0, 0.12)"}})),Bs=te(st)({width:"335px"}),_d=te("span")(({theme:e})=>({marginRight:"16px",color:e.palette.text.primary,fontSize:"13px",fontWeight:500,textDecoration:"none",textTransform:"uppercase",display:"inline"})),Od=te(_n)(()=>({color:Ns.neutral.gray3,fontSize:"13px",textDecoration:"none",textTransform:"uppercase",transition:"color 250ms ease",fontWeight:400,"&:hover":{color:Ns.neutral.gray2}})),kd=te(_n)(({theme:e})=>({textDecoration:"none",display:"block",color:e.palette.text.primary,"& h2, & h3":{fontSize:"34px",lineHeight:"42px",color:e.palette.text.primary,fontWeight:500},"&:visited, &:link, &:active":{color:e.palette.text.primary},"& *":{color:e.palette.text.primary}})),jd=te("p")(({theme:e})=>({display:"block",fontSize:"17px",lineHeight:"26px",letterSpacing:"-0.4px",margin:0,paddingTop:"8px",fontWeight:400,color:e.palette.text.primary})),Dd=te(st)(()=>({display:"flex",justifyContent:"space-between"})),Hs=te(at)(()=>({width:"697px",height:"348px"})),Ld=te(at)(()=>({width:"100%",height:"40px"})),$d=te(at)(()=>({width:"90%",height:"40px"})),Fs=te(at)(()=>({width:"100px"})),kr=te(at)(()=>({width:"100%"})),Ud=te(at)(()=>({width:"80%"})),Nd=te(st)(({theme:e})=>({marginTop:e.spacing(2)})),Md=te(st)(()=>({})),{Typography:Bd}=await O("decentraland-ui2"),Qs=e=>{const{post:t,loading:n}=e,o=So(t?.image?.url);return n?m.jsxs(Ms,{children:[m.jsx(Hs,{variant:"rectangular"}),m.jsxs(Bs,{children:[m.jsxs(Dd,{children:[m.jsx(Fs,{variant:"text"}),m.jsx(Fs,{variant:"text"})]}),m.jsx(Ld,{variant:"text"}),m.jsx($d,{variant:"text"}),m.jsxs(Nd,{children:[m.jsx(kr,{variant:"text"}),m.jsx(kr,{variant:"text"}),m.jsx(kr,{variant:"text"}),m.jsx(Ud,{variant:"text"})]})]})]}):m.jsxs(Ms,{children:[o?m.jsx(Cd,{to:t.url,children:m.jsx(Rd,{$imageUrl:t.image.url})}):m.jsx(Hs,{variant:"rectangular"}),m.jsxs(Bs,{children:[m.jsxs(Md,{children:[m.jsx(_d,{children:t.publishedDate}),m.jsx("span",{children:m.jsx(Od,{to:t.category.url,children:t.category.title})})]}),m.jsx(kd,{to:t.url,children:m.jsx(Bd,{variant:"h3",component:"h2",children:t.title})}),m.jsx(jd,{children:t.description})]})]})},{Link:On}=await O("react-router-dom"),{Box:kn,Card:Hd,CardContent:Fd,Skeleton:mr,dclColors:Gs,styled:he}=await O("decentraland-ui2"),Ws=he(Hd)(()=>({display:"flex",flexDirection:"column",width:"calc((100% - (32px * 2)) / 3)",marginRight:"32px",marginBottom:"40px",position:"relative",boxShadow:"none",backgroundColor:"transparent !important",background:"transparent !important","& .MuiPaper-root":{backgroundColor:"transparent !important",background:"transparent !important"},"@media (max-width: 1096px)":{width:"calc((100% - 24px) / 2)",marginRight:0},"@media (max-width: 568px)":{width:"100%"},"&:nth-of-type(3n)":{marginRight:0}})),Qd=he(kn,{shouldForwardProp:e=>e!=="$imageUrl"})(({$imageUrl:e})=>({backgroundImage:`url("${e}")`,backgroundSize:"cover",backgroundPosition:"center",boxShadow:"0 2px 4px 0 rgba(0, 0, 0, 0.16)",borderRadius:"5px",width:"100%",marginBottom:"12px",paddingBottom:"50%",transition:"transform 250ms ease, box-shadow 250ms ease"})),Gd=he(On)(()=>({display:"block","&:hover .post-card__image, &:hover > div":{transform:"translate(0, -4px)",boxShadow:"0 10px 20px 0 rgba(0, 0, 0, 0.12)"}})),zs=he(Fd)({width:"100%",padding:0,backgroundColor:"transparent !important",background:"transparent !important","&.MuiCardContent-root":{backgroundColor:"transparent !important",background:"transparent !important"},"&:last-child":{paddingBottom:0}}),Wd=he("span")(({theme:e})=>({marginRight:"16px",color:e.palette.text.primary,fontSize:"13px",fontWeight:500,textDecoration:"none",textTransform:"uppercase",display:"inline"})),zd=he(On)(()=>({color:Gs.neutral.gray3,fontSize:"13px",textDecoration:"none",textTransform:"uppercase",transition:"color 250ms ease",fontWeight:400,"&:hover":{color:Gs.neutral.gray2}})),Vd=he(On)(({theme:e})=>({textDecoration:"none",paddingTop:"8px",display:"block",color:e.palette.text.primary,"& h2, & h6":{fontSize:"20px",lineHeight:"28px",color:e.palette.text.primary,fontWeight:500},"&:visited, &:link, &:active":{color:e.palette.text.primary},"& *":{color:e.palette.text.primary}})),Kd=he(kn)(()=>({display:"flex",justifyContent:"space-between"})),Vs=he(mr)(()=>({height:"200px"})),Ks=he(mr)(()=>({width:"100px"})),Yd=he(mr)(()=>({width:"100%"})),Jd=he(mr)(()=>({width:"80%"})),Xd=he(kn)(()=>({})),{Typography:Zd}=await O("decentraland-ui2"),Jt=e=>{const{post:t,loading:n}=e,o=So(t?.image?.url);return n?m.jsxs(Ws,{elevation:0,children:[m.jsx(Vs,{variant:"rectangular"}),m.jsxs(zs,{children:[m.jsxs(Kd,{children:[m.jsx(Ks,{variant:"text"}),m.jsx(Ks,{variant:"text"})]}),m.jsx(Yd,{variant:"text"}),m.jsx(Jd,{variant:"text"})]})]}):m.jsxs(Ws,{elevation:0,children:[o?m.jsx(Gd,{to:t.url,children:m.jsx(Qd,{$imageUrl:t.image.url})}):m.jsx(Vs,{variant:"rectangular"}),m.jsxs(zs,{children:[m.jsxs(Xd,{children:[m.jsx(Wd,{children:t.publishedDate}),m.jsx("span",{children:m.jsx(zd,{to:t.category.url,children:t.category.title})})]}),m.jsx(Vd,{to:t.url,children:m.jsx(Zd,{variant:"h6",component:"h2",children:t.title})})]})]})},{Box:To,styled:xo}=await O("decentraland-ui2"),Ys=xo(To,{shouldForwardProp:e=>e!=="hasMainPost"})(({theme:e,hasMainPost:t})=>({display:"flex",flexWrap:"wrap",justifyContent:"flex-start",paddingBottom:e.spacing(2.5),"& > div:nth-of-type(3n)":{marginRight:e.spacing(4)},...t&&{"& > div:nth-of-type(3n + 1)":{marginRight:0}},...!t&&{"& > div:nth-of-type(3n + 3)":{marginRight:0}},"@media (max-width: 1096px)":{justifyContent:"space-between","& > div, & > div:nth-of-type(3n)":{marginRight:0}}}));xo(To)(()=>({display:"flex",flexWrap:"wrap",width:"100%",marginTop:0}));const{memo:eh}=await O("react"),jr=e=>"isPlaceholder"in e&&e.isPlaceholder===!0,jn=eh(e=>{const{posts:t,loading:n,hasMainPost:o=!1}=e,l=Td({minWidth:1096});if(n&&t.length===0){const h=o?7:6;return m.jsxs(Ys,{hasMainPost:o,children:[o&&m.jsx(Qs,{loading:!0}),Array.from(Array(h),(s,r)=>o&&r===0?null:m.jsx(Jt,{loading:!0},`skeleton-${r}`))]})}if(!t||t.length===0)return null;const f=t.find(h=>!jr(h));return m.jsxs(Ys,{hasMainPost:o,children:[o&&l&&f&&m.jsx(Qs,{post:f}),t.map(h=>o&&l&&!jr(h)&&h===f?null:jr(h)?m.jsx(Jt,{loading:!0},h.id):m.jsx(Jt,{post:h},h.id))]})}),{useCallback:Bt,useEffect:th,useMemo:rh,useState:nh}=await O("react"),{useNotifications:sh}=await O("@dcl/hooks"),{NotificationActiveTab:ah,Profile:oh,dclAddressUtils:ih}=await O("decentraland-ui2");function ch(e){const{identity:t,isConnected:n,locale:o="en"}=e,l=!!(t&&n),[f,h]=nh(!0),s=re("NOTIFICATIONS_API_URL")??"https://notifications.decentraland.org";th(()=>{l||h(!0)},[l]);const r=Bt(()=>{l&&h(b=>b&&!1)},[l]),{notifications:a,isLoading:i,isModalOpen:c,isNotificationsOnboarding:d,modalActiveTab:u,handleNotificationsOpen:p,handleOnBegin:g,handleOnChangeModalTab:y}=sh({identity:t??void 0,isNotificationsEnabled:l&&f,initialActiveTab:ah.NEWEST,notificationsUrl:s,onError:r}),w=Bt(()=>{f||h(!0),p()},[p,f]),q=Bt((b,S)=>{y(S)},[y]),v=Bt(b=>m.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[m.jsx(oh,{address:b,size:"normal",imageOnly:!0}),ih.shorten(b)]}),[]);return{notificationProps:rh(()=>{if(l)return{locale:o,isLoading:i,isOnboarding:d,isOpen:c,items:a,activeTab:u,onClick:w,onClose:w,onBegin:g,onChangeTab:q,renderProfile:v}},[l,o,i,d,c,a,u,w,g,q,v])}}const{useEffect:uh,useState:lh}=await O("react"),{useWalletState:dh}=await O("@dcl/core-web3/lazy");function hh(e){return!!(e&&e.expiration>new Date)}function Dr(e){try{return $i.localStorageGetIdentity(e.toLowerCase())??void 0}catch(t){console.error("[useAuthIdentity] Failed to get identity:",t);return}}function fh(){const{address:e}=dh(),t=e??void 0,[n,o]=lh(()=>t?Dr(t):void 0);return uh(()=>{if(!t){o(void 0);return}o(Dr(t));const l=setInterval(()=>{o(Dr(t))},1e3);return()=>clearInterval(l)},[t]),{identity:n,hasValidIdentity:hh(n),address:t}}const{clearWagmiState:ph}=await O("@dcl/core-web3");function gh(){return/^decentraland.(zone|org|today)$/.test(window.location.host)?"/blog":""}function mh(e,t){const n=gh(),o=new URL(e,window.location.origin);let l=o.pathname+o.search;return n&&l.startsWith(n)&&(l=l.slice(n.length)||"/"),`${n}${l}`}function yh(){const e=re("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 wh(){const e=window.location.pathname,t=window.location.search;return new URLSearchParams(t).get("redirectTo")??`${e}${t}`}function Io(e,t){const n=wh(),o=mh(n),l=yh();ph(),window.location.replace(`${l}/login?redirectTo=${encodeURIComponent(o)}`)}function Ee(){function e(t){return new Promise(n=>{let o=new XMLHttpRequest;o.open(t.method,t.url,!0),Object.keys(t.headers).forEach(s=>o.setRequestHeader(s,t.headers[s]));let l=(s,r)=>setTimeout(()=>{o.abort(),n({status:0,content:r,isTimedOut:!0})},s),f=l(t.connectTimeout,"Connection timeout"),h;o.onreadystatechange=()=>{o.readyState>o.OPENED&&h===void 0&&(clearTimeout(f),h=l(t.responseTimeout,"Socket timeout"))},o.onerror=()=>{o.status===0&&(clearTimeout(f),clearTimeout(h),n({content:o.responseText||"Network request failed",status:o.status,isTimedOut:!1}))},o.onload=()=>{clearTimeout(f),clearTimeout(h),n({content:o.responseText,status:o.status,isTimedOut:!1})},o.send(t.data)})}return{send:e}}function be(e){let t;const n=`algolia-client-js-${e.key}`;function o(){return t===void 0&&(t=e.localStorage||window.localStorage),t}function l(){return JSON.parse(o().getItem(n)||"{}")}function f(s){o().setItem(n,JSON.stringify(s))}function h(){const s=e.timeToLive?e.timeToLive*1e3:null,r=l(),a=Object.fromEntries(Object.entries(r).filter(([,c])=>c.timestamp!==void 0));if(f(a),!s)return;const i=Object.fromEntries(Object.entries(a).filter(([,c])=>{const d=new Date().getTime();return!(c.timestamp+s<d)}));f(i)}return{get(s,r,a={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(h(),l()[JSON.stringify(s)])).then(i=>Promise.all([i?i.value:r(),i!==void 0])).then(([i,c])=>Promise.all([i,c||a.miss(i)])).then(([i])=>i)},set(s,r){return Promise.resolve().then(()=>{const a=l();return a[JSON.stringify(s)]={timestamp:new Date().getTime(),value:r},o().setItem(n,JSON.stringify(a)),r})},delete(s){return Promise.resolve().then(()=>{const r=l();delete r[JSON.stringify(s)],o().setItem(n,JSON.stringify(r))})},clear(){return Promise.resolve().then(()=>{o().removeItem(n)})}}}function Ph(){return{get(e,t,n={miss:()=>Promise.resolve()}){return t().then(l=>Promise.all([l,n.miss(l)])).then(([l])=>l)},set(e,t){return Promise.resolve(t)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}}function ue(e){const t=[...e.caches],n=t.shift();return n===void 0?Ph():{get(o,l,f={miss:()=>Promise.resolve()}){return n.get(o,l,f).catch(()=>ue({caches:t}).get(o,l,f))},set(o,l){return n.set(o,l).catch(()=>ue({caches:t}).set(o,l))},delete(o){return n.delete(o).catch(()=>ue({caches:t}).delete(o))},clear(){return n.clear().catch(()=>ue({caches:t}).clear())}}}function z(e={serializable:!0}){let t={};return{get(n,o,l={miss:()=>Promise.resolve()}){const f=JSON.stringify(n);if(f in t)return Promise.resolve(e.serializable?JSON.parse(t[f]):t[f]);const h=o();return h.then(s=>l.miss(s)).then(()=>h)},set(n,o){return t[JSON.stringify(n)]=e.serializable?JSON.stringify(o):o,Promise.resolve(o)},delete(n){return delete t[JSON.stringify(n)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}function qh(e){const t={value:`Algolia for JavaScript (${e})`,add(n){const o=`; ${n.segment}${n.version!==void 0?` (${n.version})`:""}`;return t.value.indexOf(o)===-1&&(t.value=`${t.value}${o}`),t}};return t}function Se(e,t,n="WithinHeaders"){const o={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers(){return n==="WithinHeaders"?o:{}},queryParameters(){return n==="WithinQueryParameters"?o:{}}}}function Ue({func:e,validate:t,aggregator:n,error:o,timeout:l=()=>0}){const f=h=>new Promise((s,r)=>{e(h).then(async a=>(n&&await n(a),await t(a)?s(a):o&&await o.validate(a)?r(new Error(await o.message(a))):setTimeout(()=>{f(a).then(s).catch(r)},await l()))).catch(a=>{r(a)})});return f()}function Te({algoliaAgents:e,client:t,version:n}){const o=qh(n).add({segment:t,version:n});return e.forEach(l=>o.add(l)),o}function xe(){return{debug(e,t){return Promise.resolve()},info(e,t){return Promise.resolve()},error(e,t){return Promise.resolve()}}}var Js=2*60*1e3;function Xs(e,t="up"){const n=Date.now();function o(){return t==="up"||Date.now()-n>Js}function l(){return t==="timed out"&&Date.now()-n<=Js}return{...e,status:t,lastUpdate:n,isUp:o,isTimedOut:l}}var Ao=class extends Error{name="AlgoliaError";constructor(e,t){super(e),t&&(this.name=t)}},Ro=class extends Ao{stackTrace;constructor(e,t,n){super(e,n),this.stackTrace=t}},vh=class extends Ro{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please visit our help center https://alg.li/support-unreachable-hosts or reach out to the Algolia Support team: https://alg.li/support",e,"RetryError")}},or=class extends Ro{status;constructor(e,t,n,o="ApiError"){super(e,n,o),this.status=t}},Eh=class extends Ao{response;constructor(e,t){super(e,"DeserializationError"),this.response=t}},bh=class extends or{error;constructor(e,t,n,o){super(e,t,o,"DetailedApiError"),this.error=n}};function Co(e){const t=e;for(let n=e.length-1;n>0;n--){const o=Math.floor(Math.random()*(n+1)),l=e[n];t[n]=e[o],t[o]=l}return t}function Sh(e,t,n){const o=Th(n);let l=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${t.charAt(0)==="/"?t.substring(1):t}`;return o.length&&(l+=`?${o}`),l}function Th(e){return Object.keys(e).filter(t=>e[t]!==void 0).sort().map(t=>`${t}=${encodeURIComponent(Object.prototype.toString.call(e[t])==="[object Array]"?e[t].join(","):e[t]).replace(/\+/g,"%20")}`).join("&")}function xh(e,t){if(e.method==="GET"||e.data===void 0&&t.data===void 0)return;const n=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(n)}function Ih(e,t,n){const o={Accept:"application/json",...e,...t,...n},l={};return Object.keys(o).forEach(f=>{const h=o[f];l[f.toLowerCase()]=h}),l}function Ah(e){try{return JSON.parse(e.content)}catch(t){throw new Eh(t.message,e)}}function Rh({content:e,status:t},n){try{const o=JSON.parse(e);return"error"in o?new bh(o.message,t,o.error,n):new or(o.message,t,n)}catch{}return new or(e,t,n)}function Ch({isTimedOut:e,status:t}){return!e&&~~t===0}function _h({isTimedOut:e,status:t}){return e||Ch({isTimedOut:e,status:t})||~~(t/100)!==2&&~~(t/100)!==4}function Oh({status:e}){return~~(e/100)===2}function kh(e){return e.map(t=>_o(t))}function _o(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function Ie({hosts:e,hostsCache:t,baseHeaders:n,logger:o,baseQueryParameters:l,algoliaAgent:f,timeouts:h,requester:s,requestsCache:r,responsesCache:a}){async function i(u){const p=await Promise.all(u.map(v=>t.get(v,()=>Promise.resolve(Xs(v))))),g=p.filter(v=>v.isUp()),y=p.filter(v=>v.isTimedOut()),w=[...g,...y];return{hosts:w.length>0?w:u,getTimeout(v,P){return(y.length===0&&v===0?1:y.length+3+v)*P}}}async function c(u,p,g=!0){const y=[],w=xh(u,p),q=Ih(n,u.headers,p.headers),v=u.method==="GET"?{...u.data,...p.data}:{},P={...l,...u.queryParameters,...v};if(f.value&&(P["x-algolia-agent"]=f.value),p&&p.queryParameters)for(const I of Object.keys(p.queryParameters))!p.queryParameters[I]||Object.prototype.toString.call(p.queryParameters[I])==="[object Object]"?P[I]=p.queryParameters[I]:P[I]=p.queryParameters[I].toString();let b=0;const S=async(I,T)=>{const E=I.pop();if(E===void 0)throw new vh(kh(y));const x={...h,...p.timeouts},A={data:w,headers:q,method:u.method,url:Sh(E,u.path,P),connectTimeout:T(b,x.connect),responseTimeout:T(b,g?x.read:x.write)},R=L=>{const U={request:A,response:L,host:E,triesLeft:I.length};return y.push(U),U},k=await s.send(A);if(_h(k)){const L=R(k);return k.isTimedOut&&b++,o.info("Retryable failure",_o(L)),await t.set(E,Xs(E,k.isTimedOut?"timed out":"down")),S(I,T)}if(Oh(k))return Ah(k);throw R(k),Rh(k,y)},C=e.filter(I=>I.accept==="readWrite"||(g?I.accept==="read":I.accept==="write")),_=await i(C);return S([..._.hosts].reverse(),_.getTimeout)}function d(u,p={}){const g=u.useReadTransporter||u.method==="GET";if(!g)return c(u,p,g);const y=()=>c(u,p);if((p.cacheable||u.cacheable)!==!0)return y();const q={request:u,requestOptions:p,transporter:{queryParameters:l,headers:n}};return a.get(q,()=>r.get(q,()=>r.set(q,y()).then(v=>Promise.all([r.delete(q),v]),v=>Promise.all([r.delete(q),Promise.reject(v)])).then(([v,P])=>P)),{miss:v=>a.set(q,v)})}return{hostsCache:t,requester:s,timeouts:h,logger:o,algoliaAgent:f,baseHeaders:n,baseQueryParameters:l,hosts:e,request:d,requestsCache:r,responsesCache:a}}var Dn="1.7.0",Zs=["de","us"];function jh(e){return[{url:e?"analytics.{region}.algolia.com".replace("{region}",e):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]}function Dh({appId:e,apiKey:t,authMode:n,algoliaAgents:o,region:l,...f}){const h=Se(e,t,n),s=Ie({hosts:jh(l),...f,algoliaAgent:Te({algoliaAgents:o,client:"AbtestingV3",version:Dn}),baseHeaders:{"content-type":"text/plain",...h.headers(),...f.baseHeaders},baseQueryParameters:{...h.queryParameters(),...f.baseQueryParameters}});return{transporter:s,appId:e,apiKey:t,clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent(r,a){s.algoliaAgent.add({segment:r,version:a})},setClientApiKey({apiKey:r}){!n||n==="WithinHeaders"?s.baseHeaders["x-algolia-api-key"]=r:s.baseQueryParameters["x-algolia-api-key"]=r},addABTests(r,a){if(!r)throw new Error("Parameter `addABTestsRequest` is required when calling `addABTests`.");if(!r.name)throw new Error("Parameter `addABTestsRequest.name` is required when calling `addABTests`.");if(!r.variants)throw new Error("Parameter `addABTestsRequest.variants` is required when calling `addABTests`.");if(!r.metrics)throw new Error("Parameter `addABTestsRequest.metrics` is required when calling `addABTests`.");if(!r.endAt)throw new Error("Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.");const u={method:"POST",path:"/3/abtests",queryParameters:{},headers:{},data:r};return s.request(u,a)},customDelete({path:r,parameters:a},i){if(!r)throw new Error("Parameter `path` is required when calling `customDelete`.");const p={method:"DELETE",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return s.request(p,i)},customGet({path:r,parameters:a},i){if(!r)throw new Error("Parameter `path` is required when calling `customGet`.");const p={method:"GET",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return s.request(p,i)},customPost({path:r,parameters:a,body:i},c){if(!r)throw new Error("Parameter `path` is required when calling `customPost`.");const g={method:"POST",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:i||{}};return s.request(g,c)},customPut({path:r,parameters:a,body:i},c){if(!r)throw new Error("Parameter `path` is required when calling `customPut`.");const g={method:"PUT",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:i||{}};return s.request(g,c)},deleteABTest({id:r},a){if(!r)throw new Error("Parameter `id` is required when calling `deleteABTest`.");const u={method:"DELETE",path:"/3/abtests/{id}".replace("{id}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},estimateABTest(r,a){if(!r)throw new Error("Parameter `estimateABTestRequest` is required when calling `estimateABTest`.");if(!r.configuration)throw new Error("Parameter `estimateABTestRequest.configuration` is required when calling `estimateABTest`.");if(!r.variants)throw new Error("Parameter `estimateABTestRequest.variants` is required when calling `estimateABTest`.");const u={method:"POST",path:"/3/abtests/estimate",queryParameters:{},headers:{},data:r};return s.request(u,a)},getABTest({id:r},a){if(!r)throw new Error("Parameter `id` is required when calling `getABTest`.");const u={method:"GET",path:"/3/abtests/{id}".replace("{id}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},getTimeseries({id:r,startDate:a,endDate:i,metric:c},d){if(!r)throw new Error("Parameter `id` is required when calling `getTimeseries`.");const u="/3/abtests/{id}/timeseries".replace("{id}",encodeURIComponent(r)),p={},g={};a!==void 0&&(g.startDate=a.toString()),i!==void 0&&(g.endDate=i.toString()),c!==void 0&&(g.metric=c.toString());const y={method:"GET",path:u,queryParameters:g,headers:p};return s.request(y,d)},listABTests({offset:r,limit:a,indexPrefix:i,indexSuffix:c,direction:d}={},u=void 0){const p="/3/abtests",g={},y={};r!==void 0&&(y.offset=r.toString()),a!==void 0&&(y.limit=a.toString()),i!==void 0&&(y.indexPrefix=i.toString()),c!==void 0&&(y.indexSuffix=c.toString()),d!==void 0&&(y.direction=d.toString());const w={method:"GET",path:p,queryParameters:y,headers:g};return s.request(w,u)},scheduleABTest(r,a){if(!r)throw new Error("Parameter `scheduleABTestsRequest` is required when calling `scheduleABTest`.");if(!r.name)throw new Error("Parameter `scheduleABTestsRequest.name` is required when calling `scheduleABTest`.");if(!r.variants)throw new Error("Parameter `scheduleABTestsRequest.variants` is required when calling `scheduleABTest`.");if(!r.metrics)throw new Error("Parameter `scheduleABTestsRequest.metrics` is required when calling `scheduleABTest`.");if(!r.scheduledAt)throw new Error("Parameter `scheduleABTestsRequest.scheduledAt` is required when calling `scheduleABTest`.");if(!r.endAt)throw new Error("Parameter `scheduleABTestsRequest.endAt` is required when calling `scheduleABTest`.");const u={method:"POST",path:"/3/abtests/schedule",queryParameters:{},headers:{},data:r};return s.request(u,a)},stopABTest({id:r},a){if(!r)throw new Error("Parameter `id` is required when calling `stopABTest`.");const u={method:"POST",path:"/3/abtests/{id}/stop".replace("{id}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)}}}function Oo(e,t,n,o){if(!e||typeof e!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");if(n&&(typeof n!="string"||!Zs.includes(n)))throw new Error(`\`region\` must be one of the following: ${Zs.join(", ")}`);return Dh({appId:e,apiKey:t,region:n,timeouts:{connect:1e3,read:2e3,write:3e4},logger:xe(),requester:Ee(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:z(),requestsCache:z({serializable:!1}),hostsCache:ue({caches:[be({key:`${Dn}-${e}`}),z()]}),...o})}const Lh=Object.freeze(Object.defineProperty({__proto__:null,abtestingV3Client:Oo,apiClientVersion:Dn},Symbol.toStringTag,{value:"Module"}));var Ln="5.41.0",ea=["de","us"];function $h(e){return[{url:e?"analytics.{region}.algolia.com".replace("{region}",e):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]}function Uh({appId:e,apiKey:t,authMode:n,algoliaAgents:o,region:l,...f}){const h=Se(e,t,n),s=Ie({hosts:$h(l),...f,algoliaAgent:Te({algoliaAgents:o,client:"Abtesting",version:Ln}),baseHeaders:{"content-type":"text/plain",...h.headers(),...f.baseHeaders},baseQueryParameters:{...h.queryParameters(),...f.baseQueryParameters}});return{transporter:s,appId:e,apiKey:t,clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent(r,a){s.algoliaAgent.add({segment:r,version:a})},setClientApiKey({apiKey:r}){!n||n==="WithinHeaders"?s.baseHeaders["x-algolia-api-key"]=r:s.baseQueryParameters["x-algolia-api-key"]=r},addABTests(r,a){if(!r)throw new Error("Parameter `addABTestsRequest` is required when calling `addABTests`.");if(!r.name)throw new Error("Parameter `addABTestsRequest.name` is required when calling `addABTests`.");if(!r.variants)throw new Error("Parameter `addABTestsRequest.variants` is required when calling `addABTests`.");if(!r.endAt)throw new Error("Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.");const u={method:"POST",path:"/2/abtests",queryParameters:{},headers:{},data:r};return s.request(u,a)},customDelete({path:r,parameters:a},i){if(!r)throw new Error("Parameter `path` is required when calling `customDelete`.");const p={method:"DELETE",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return s.request(p,i)},customGet({path:r,parameters:a},i){if(!r)throw new Error("Parameter `path` is required when calling `customGet`.");const p={method:"GET",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return s.request(p,i)},customPost({path:r,parameters:a,body:i},c){if(!r)throw new Error("Parameter `path` is required when calling `customPost`.");const g={method:"POST",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:i||{}};return s.request(g,c)},customPut({path:r,parameters:a,body:i},c){if(!r)throw new Error("Parameter `path` is required when calling `customPut`.");const g={method:"PUT",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:i||{}};return s.request(g,c)},deleteABTest({id:r},a){if(!r)throw new Error("Parameter `id` is required when calling `deleteABTest`.");const u={method:"DELETE",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},estimateABTest(r,a){if(!r)throw new Error("Parameter `estimateABTestRequest` is required when calling `estimateABTest`.");if(!r.configuration)throw new Error("Parameter `estimateABTestRequest.configuration` is required when calling `estimateABTest`.");if(!r.variants)throw new Error("Parameter `estimateABTestRequest.variants` is required when calling `estimateABTest`.");const u={method:"POST",path:"/2/abtests/estimate",queryParameters:{},headers:{},data:r};return s.request(u,a)},getABTest({id:r},a){if(!r)throw new Error("Parameter `id` is required when calling `getABTest`.");const u={method:"GET",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},listABTests({offset:r,limit:a,indexPrefix:i,indexSuffix:c}={},d=void 0){const u="/2/abtests",p={},g={};r!==void 0&&(g.offset=r.toString()),a!==void 0&&(g.limit=a.toString()),i!==void 0&&(g.indexPrefix=i.toString()),c!==void 0&&(g.indexSuffix=c.toString());const y={method:"GET",path:u,queryParameters:g,headers:p};return s.request(y,d)},scheduleABTest(r,a){if(!r)throw new Error("Parameter `scheduleABTestsRequest` is required when calling `scheduleABTest`.");if(!r.name)throw new Error("Parameter `scheduleABTestsRequest.name` is required when calling `scheduleABTest`.");if(!r.variants)throw new Error("Parameter `scheduleABTestsRequest.variants` is required when calling `scheduleABTest`.");if(!r.scheduledAt)throw new Error("Parameter `scheduleABTestsRequest.scheduledAt` is required when calling `scheduleABTest`.");if(!r.endAt)throw new Error("Parameter `scheduleABTestsRequest.endAt` is required when calling `scheduleABTest`.");const u={method:"POST",path:"/2/abtests/schedule",queryParameters:{},headers:{},data:r};return s.request(u,a)},stopABTest({id:r},a){if(!r)throw new Error("Parameter `id` is required when calling `stopABTest`.");const u={method:"POST",path:"/2/abtests/{id}/stop".replace("{id}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)}}}function ko(e,t,n,o){if(!e||typeof e!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");if(n&&(typeof n!="string"||!ea.includes(n)))throw new Error(`\`region\` must be one of the following: ${ea.join(", ")}`);return Uh({appId:e,apiKey:t,region:n,timeouts:{connect:1e3,read:2e3,write:3e4},logger:xe(),requester:Ee(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:z(),requestsCache:z({serializable:!1}),hostsCache:ue({caches:[be({key:`${Ln}-${e}`}),z()]}),...o})}const Nh=Object.freeze(Object.defineProperty({__proto__:null,abtestingClient:ko,apiClientVersion:Ln},Symbol.toStringTag,{value:"Module"}));var $n="5.41.0",ta=["de","us"];function Mh(e){return[{url:e?"analytics.{region}.algolia.com".replace("{region}",e):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]}function Bh({appId:e,apiKey:t,authMode:n,algoliaAgents:o,region:l,...f}){const h=Se(e,t,n),s=Ie({hosts:Mh(l),...f,algoliaAgent:Te({algoliaAgents:o,client:"Analytics",version:$n}),baseHeaders:{"content-type":"text/plain",...h.headers(),...f.baseHeaders},baseQueryParameters:{...h.queryParameters(),...f.baseQueryParameters}});return{transporter:s,appId:e,apiKey:t,clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent(r,a){s.algoliaAgent.add({segment:r,version:a})},setClientApiKey({apiKey:r}){!n||n==="WithinHeaders"?s.baseHeaders["x-algolia-api-key"]=r:s.baseQueryParameters["x-algolia-api-key"]=r},customDelete({path:r,parameters:a},i){if(!r)throw new Error("Parameter `path` is required when calling `customDelete`.");const p={method:"DELETE",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return s.request(p,i)},customGet({path:r,parameters:a},i){if(!r)throw new Error("Parameter `path` is required when calling `customGet`.");const p={method:"GET",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return s.request(p,i)},customPost({path:r,parameters:a,body:i},c){if(!r)throw new Error("Parameter `path` is required when calling `customPost`.");const g={method:"POST",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:i||{}};return s.request(g,c)},customPut({path:r,parameters:a,body:i},c){if(!r)throw new Error("Parameter `path` is required when calling `customPut`.");const g={method:"PUT",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:i||{}};return s.request(g,c)},getAddToCartRate({index:r,startDate:a,endDate:i,tags:c},d){if(!r)throw new Error("Parameter `index` is required when calling `getAddToCartRate`.");const u="/2/conversions/addToCartRate",p={},g={};r!==void 0&&(g.index=r.toString()),a!==void 0&&(g.startDate=a.toString()),i!==void 0&&(g.endDate=i.toString()),c!==void 0&&(g.tags=c.toString());const y={method:"GET",path:u,queryParameters:g,headers:p};return s.request(y,d)},getAverageClickPosition({index:r,startDate:a,endDate:i,tags:c},d){if(!r)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");const u="/2/clicks/averageClickPosition",p={},g={};r!==void 0&&(g.index=r.toString()),a!==void 0&&(g.startDate=a.toString()),i!==void 0&&(g.endDate=i.toString()),c!==void 0&&(g.tags=c.toString());const y={method:"GET",path:u,queryParameters:g,headers:p};return s.request(y,d)},getClickPositions({index:r,startDate:a,endDate:i,tags:c},d){if(!r)throw new Error("Parameter `index` is required when calling `getClickPositions`.");const u="/2/clicks/positions",p={},g={};r!==void 0&&(g.index=r.toString()),a!==void 0&&(g.startDate=a.toString()),i!==void 0&&(g.endDate=i.toString()),c!==void 0&&(g.tags=c.toString());const y={method:"GET",path:u,queryParameters:g,headers:p};return s.request(y,d)},getClickThroughRate({index:r,startDate:a,endDate:i,tags:c},d){if(!r)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");const u="/2/clicks/clickThroughRate",p={},g={};r!==void 0&&(g.index=r.toString()),a!==void 0&&(g.startDate=a.toString()),i!==void 0&&(g.endDate=i.toString()),c!==void 0&&(g.tags=c.toString());const y={method:"GET",path:u,queryParameters:g,headers:p};return s.request(y,d)},getConversionRate({index:r,startDate:a,endDate:i,tags:c},d){if(!r)throw new Error("Parameter `index` is required when calling `getConversionRate`.");const u="/2/conversions/conversionRate",p={},g={};r!==void 0&&(g.index=r.toString()),a!==void 0&&(g.startDate=a.toString()),i!==void 0&&(g.endDate=i.toString()),c!==void 0&&(g.tags=c.toString());const y={method:"GET",path:u,queryParameters:g,headers:p};return s.request(y,d)},getNoClickRate({index:r,startDate:a,endDate:i,tags:c},d){if(!r)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");const u="/2/searches/noClickRate",p={},g={};r!==void 0&&(g.index=r.toString()),a!==void 0&&(g.startDate=a.toString()),i!==void 0&&(g.endDate=i.toString()),c!==void 0&&(g.tags=c.toString());const y={method:"GET",path:u,queryParameters:g,headers:p};return s.request(y,d)},getNoResultsRate({index:r,startDate:a,endDate:i,tags:c},d){if(!r)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");const u="/2/searches/noResultRate",p={},g={};r!==void 0&&(g.index=r.toString()),a!==void 0&&(g.startDate=a.toString()),i!==void 0&&(g.endDate=i.toString()),c!==void 0&&(g.tags=c.toString());const y={method:"GET",path:u,queryParameters:g,headers:p};return s.request(y,d)},getPurchaseRate({index:r,startDate:a,endDate:i,tags:c},d){if(!r)throw new Error("Parameter `index` is required when calling `getPurchaseRate`.");const u="/2/conversions/purchaseRate",p={},g={};r!==void 0&&(g.index=r.toString()),a!==void 0&&(g.startDate=a.toString()),i!==void 0&&(g.endDate=i.toString()),c!==void 0&&(g.tags=c.toString());const y={method:"GET",path:u,queryParameters:g,headers:p};return s.request(y,d)},getRevenue({index:r,startDate:a,endDate:i,tags:c},d){if(!r)throw new Error("Parameter `index` is required when calling `getRevenue`.");const u="/2/conversions/revenue",p={},g={};r!==void 0&&(g.index=r.toString()),a!==void 0&&(g.startDate=a.toString()),i!==void 0&&(g.endDate=i.toString()),c!==void 0&&(g.tags=c.toString());const y={method:"GET",path:u,queryParameters:g,headers:p};return s.request(y,d)},getSearchesCount({index:r,startDate:a,endDate:i,tags:c},d){if(!r)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");const u="/2/searches/count",p={},g={};r!==void 0&&(g.index=r.toString()),a!==void 0&&(g.startDate=a.toString()),i!==void 0&&(g.endDate=i.toString()),c!==void 0&&(g.tags=c.toString());const y={method:"GET",path:u,queryParameters:g,headers:p};return s.request(y,d)},getSearchesNoClicks({index:r,startDate:a,endDate:i,limit:c,offset:d,tags:u},p){if(!r)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");const g="/2/searches/noClicks",y={},w={};r!==void 0&&(w.index=r.toString()),a!==void 0&&(w.startDate=a.toString()),i!==void 0&&(w.endDate=i.toString()),c!==void 0&&(w.limit=c.toString()),d!==void 0&&(w.offset=d.toString()),u!==void 0&&(w.tags=u.toString());const q={method:"GET",path:g,queryParameters:w,headers:y};return s.request(q,p)},getSearchesNoResults({index:r,startDate:a,endDate:i,limit:c,offset:d,tags:u},p){if(!r)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");const g="/2/searches/noResults",y={},w={};r!==void 0&&(w.index=r.toString()),a!==void 0&&(w.startDate=a.toString()),i!==void 0&&(w.endDate=i.toString()),c!==void 0&&(w.limit=c.toString()),d!==void 0&&(w.offset=d.toString()),u!==void 0&&(w.tags=u.toString());const q={method:"GET",path:g,queryParameters:w,headers:y};return s.request(q,p)},getStatus({index:r},a){if(!r)throw new Error("Parameter `index` is required when calling `getStatus`.");const i="/2/status",c={},d={};r!==void 0&&(d.index=r.toString());const u={method:"GET",path:i,queryParameters:d,headers:c};return s.request(u,a)},getTopCountries({index:r,startDate:a,endDate:i,limit:c,offset:d,tags:u},p){if(!r)throw new Error("Parameter `index` is required when calling `getTopCountries`.");const g="/2/countries",y={},w={};r!==void 0&&(w.index=r.toString()),a!==void 0&&(w.startDate=a.toString()),i!==void 0&&(w.endDate=i.toString()),c!==void 0&&(w.limit=c.toString()),d!==void 0&&(w.offset=d.toString()),u!==void 0&&(w.tags=u.toString());const q={method:"GET",path:g,queryParameters:w,headers:y};return s.request(q,p)},getTopFilterAttributes({index:r,search:a,startDate:i,endDate:c,limit:d,offset:u,tags:p},g){if(!r)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");const y="/2/filters",w={},q={};r!==void 0&&(q.index=r.toString()),a!==void 0&&(q.search=a.toString()),i!==void 0&&(q.startDate=i.toString()),c!==void 0&&(q.endDate=c.toString()),d!==void 0&&(q.limit=d.toString()),u!==void 0&&(q.offset=u.toString()),p!==void 0&&(q.tags=p.toString());const v={method:"GET",path:y,queryParameters:q,headers:w};return s.request(v,g)},getTopFilterForAttribute({attribute:r,index:a,search:i,startDate:c,endDate:d,limit:u,offset:p,tags:g},y){if(!r)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!a)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");const w="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(r)),q={},v={};a!==void 0&&(v.index=a.toString()),i!==void 0&&(v.search=i.toString()),c!==void 0&&(v.startDate=c.toString()),d!==void 0&&(v.endDate=d.toString()),u!==void 0&&(v.limit=u.toString()),p!==void 0&&(v.offset=p.toString()),g!==void 0&&(v.tags=g.toString());const P={method:"GET",path:w,queryParameters:v,headers:q};return s.request(P,y)},getTopFiltersNoResults({index:r,search:a,startDate:i,endDate:c,limit:d,offset:u,tags:p},g){if(!r)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");const y="/2/filters/noResults",w={},q={};r!==void 0&&(q.index=r.toString()),a!==void 0&&(q.search=a.toString()),i!==void 0&&(q.startDate=i.toString()),c!==void 0&&(q.endDate=c.toString()),d!==void 0&&(q.limit=d.toString()),u!==void 0&&(q.offset=u.toString()),p!==void 0&&(q.tags=p.toString());const v={method:"GET",path:y,queryParameters:q,headers:w};return s.request(v,g)},getTopHits({index:r,search:a,clickAnalytics:i,revenueAnalytics:c,startDate:d,endDate:u,limit:p,offset:g,tags:y},w){if(!r)throw new Error("Parameter `index` is required when calling `getTopHits`.");const q="/2/hits",v={},P={};r!==void 0&&(P.index=r.toString()),a!==void 0&&(P.search=a.toString()),i!==void 0&&(P.clickAnalytics=i.toString()),c!==void 0&&(P.revenueAnalytics=c.toString()),d!==void 0&&(P.startDate=d.toString()),u!==void 0&&(P.endDate=u.toString()),p!==void 0&&(P.limit=p.toString()),g!==void 0&&(P.offset=g.toString()),y!==void 0&&(P.tags=y.toString());const b={method:"GET",path:q,queryParameters:P,headers:v};return s.request(b,w)},getTopSearches({index:r,clickAnalytics:a,revenueAnalytics:i,startDate:c,endDate:d,orderBy:u,direction:p,limit:g,offset:y,tags:w},q){if(!r)throw new Error("Parameter `index` is required when calling `getTopSearches`.");const v="/2/searches",P={},b={};r!==void 0&&(b.index=r.toString()),a!==void 0&&(b.clickAnalytics=a.toString()),i!==void 0&&(b.revenueAnalytics=i.toString()),c!==void 0&&(b.startDate=c.toString()),d!==void 0&&(b.endDate=d.toString()),u!==void 0&&(b.orderBy=u.toString()),p!==void 0&&(b.direction=p.toString()),g!==void 0&&(b.limit=g.toString()),y!==void 0&&(b.offset=y.toString()),w!==void 0&&(b.tags=w.toString());const S={method:"GET",path:v,queryParameters:b,headers:P};return s.request(S,q)},getUsersCount({index:r,startDate:a,endDate:i,tags:c},d){if(!r)throw new Error("Parameter `index` is required when calling `getUsersCount`.");const u="/2/users/count",p={},g={};r!==void 0&&(g.index=r.toString()),a!==void 0&&(g.startDate=a.toString()),i!==void 0&&(g.endDate=i.toString()),c!==void 0&&(g.tags=c.toString());const y={method:"GET",path:u,queryParameters:g,headers:p};return s.request(y,d)}}}function jo(e,t,n,o){if(!e||typeof e!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");if(n&&(typeof n!="string"||!ta.includes(n)))throw new Error(`\`region\` must be one of the following: ${ta.join(", ")}`);return Bh({appId:e,apiKey:t,region:n,timeouts:{connect:1e3,read:2e3,write:3e4},logger:xe(),requester:Ee(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:z(),requestsCache:z({serializable:!1}),hostsCache:ue({caches:[be({key:`${$n}-${e}`}),z()]}),...o})}const Hh=Object.freeze(Object.defineProperty({__proto__:null,analyticsClient:jo,apiClientVersion:$n},Symbol.toStringTag,{value:"Module"}));var Un="5.41.0",ra=["de","us"];function Fh(e){return[{url:e?"insights.{region}.algolia.io".replace("{region}",e):"insights.algolia.io",accept:"readWrite",protocol:"https"}]}function Qh({appId:e,apiKey:t,authMode:n,algoliaAgents:o,region:l,...f}){const h=Se(e,t,n),s=Ie({hosts:Fh(l),...f,algoliaAgent:Te({algoliaAgents:o,client:"Insights",version:Un}),baseHeaders:{"content-type":"text/plain",...h.headers(),...f.baseHeaders},baseQueryParameters:{...h.queryParameters(),...f.baseQueryParameters}});return{transporter:s,appId:e,apiKey:t,clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent(r,a){s.algoliaAgent.add({segment:r,version:a})},setClientApiKey({apiKey:r}){!n||n==="WithinHeaders"?s.baseHeaders["x-algolia-api-key"]=r:s.baseQueryParameters["x-algolia-api-key"]=r},customDelete({path:r,parameters:a},i){if(!r)throw new Error("Parameter `path` is required when calling `customDelete`.");const p={method:"DELETE",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return s.request(p,i)},customGet({path:r,parameters:a},i){if(!r)throw new Error("Parameter `path` is required when calling `customGet`.");const p={method:"GET",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return s.request(p,i)},customPost({path:r,parameters:a,body:i},c){if(!r)throw new Error("Parameter `path` is required when calling `customPost`.");const g={method:"POST",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:i||{}};return s.request(g,c)},customPut({path:r,parameters:a,body:i},c){if(!r)throw new Error("Parameter `path` is required when calling `customPut`.");const g={method:"PUT",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:i||{}};return s.request(g,c)},deleteUserToken({userToken:r},a){if(!r)throw new Error("Parameter `userToken` is required when calling `deleteUserToken`.");const u={method:"DELETE",path:"/1/usertokens/{userToken}".replace("{userToken}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},pushEvents(r,a){if(!r)throw new Error("Parameter `insightsEvents` is required when calling `pushEvents`.");if(!r.events)throw new Error("Parameter `insightsEvents.events` is required when calling `pushEvents`.");const u={method:"POST",path:"/1/events",queryParameters:{},headers:{},data:r};return s.request(u,a)}}}function Do(e,t,n,o){if(!e||typeof e!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");if(n&&(typeof n!="string"||!ra.includes(n)))throw new Error(`\`region\` must be one of the following: ${ra.join(", ")}`);return Qh({appId:e,apiKey:t,region:n,timeouts:{connect:1e3,read:2e3,write:3e4},logger:xe(),requester:Ee(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:z(),requestsCache:z({serializable:!1}),hostsCache:ue({caches:[be({key:`${Un}-${e}`}),z()]}),...o})}const Gh=Object.freeze(Object.defineProperty({__proto__:null,apiClientVersion:Un,insightsClient:Do},Symbol.toStringTag,{value:"Module"}));var Nn="5.41.0",na=["eu","us"];function Wh(e){return[{url:"personalization.{region}.algolia.com".replace("{region}",e),accept:"readWrite",protocol:"https"}]}function zh({appId:e,apiKey:t,authMode:n,algoliaAgents:o,region:l,...f}){const h=Se(e,t,n),s=Ie({hosts:Wh(l),...f,algoliaAgent:Te({algoliaAgents:o,client:"Personalization",version:Nn}),baseHeaders:{"content-type":"text/plain",...h.headers(),...f.baseHeaders},baseQueryParameters:{...h.queryParameters(),...f.baseQueryParameters}});return{transporter:s,appId:e,apiKey:t,clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent(r,a){s.algoliaAgent.add({segment:r,version:a})},setClientApiKey({apiKey:r}){!n||n==="WithinHeaders"?s.baseHeaders["x-algolia-api-key"]=r:s.baseQueryParameters["x-algolia-api-key"]=r},customDelete({path:r,parameters:a},i){if(!r)throw new Error("Parameter `path` is required when calling `customDelete`.");const p={method:"DELETE",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return s.request(p,i)},customGet({path:r,parameters:a},i){if(!r)throw new Error("Parameter `path` is required when calling `customGet`.");const p={method:"GET",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return s.request(p,i)},customPost({path:r,parameters:a,body:i},c){if(!r)throw new Error("Parameter `path` is required when calling `customPost`.");const g={method:"POST",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:i||{}};return s.request(g,c)},customPut({path:r,parameters:a,body:i},c){if(!r)throw new Error("Parameter `path` is required when calling `customPut`.");const g={method:"PUT",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:i||{}};return s.request(g,c)},deleteUserProfile({userToken:r},a){if(!r)throw new Error("Parameter `userToken` is required when calling `deleteUserProfile`.");const u={method:"DELETE",path:"/1/profiles/{userToken}".replace("{userToken}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},getPersonalizationStrategy(r){const d={method:"GET",path:"/1/strategies/personalization",queryParameters:{},headers:{}};return s.request(d,r)},getUserTokenProfile({userToken:r},a){if(!r)throw new Error("Parameter `userToken` is required when calling `getUserTokenProfile`.");const u={method:"GET",path:"/1/profiles/personalization/{userToken}".replace("{userToken}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},setPersonalizationStrategy(r,a){if(!r)throw new Error("Parameter `personalizationStrategyParams` is required when calling `setPersonalizationStrategy`.");if(!r.eventsScoring)throw new Error("Parameter `personalizationStrategyParams.eventsScoring` is required when calling `setPersonalizationStrategy`.");if(!r.facetsScoring)throw new Error("Parameter `personalizationStrategyParams.facetsScoring` is required when calling `setPersonalizationStrategy`.");if(!r.personalizationImpact)throw new Error("Parameter `personalizationStrategyParams.personalizationImpact` is required when calling `setPersonalizationStrategy`.");const u={method:"POST",path:"/1/strategies/personalization",queryParameters:{},headers:{},data:r};return s.request(u,a)}}}function Lo(e,t,n,o){if(!e||typeof e!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");if(!n||n&&(typeof n!="string"||!na.includes(n)))throw new Error(`\`region\` is required and must be one of the following: ${na.join(", ")}`);return zh({appId:e,apiKey:t,region:n,timeouts:{connect:1e3,read:2e3,write:3e4},logger:xe(),requester:Ee(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:z(),requestsCache:z({serializable:!1}),hostsCache:ue({caches:[be({key:`${Nn}-${e}`}),z()]}),...o})}const Vh=Object.freeze(Object.defineProperty({__proto__:null,apiClientVersion:Nn,personalizationClient:Lo},Symbol.toStringTag,{value:"Module"}));var Mn="5.41.0",sa=["eu","us"];function Kh(e){return[{url:"query-suggestions.{region}.algolia.com".replace("{region}",e),accept:"readWrite",protocol:"https"}]}function Yh({appId:e,apiKey:t,authMode:n,algoliaAgents:o,region:l,...f}){const h=Se(e,t,n),s=Ie({hosts:Kh(l),...f,algoliaAgent:Te({algoliaAgents:o,client:"QuerySuggestions",version:Mn}),baseHeaders:{"content-type":"text/plain",...h.headers(),...f.baseHeaders},baseQueryParameters:{...h.queryParameters(),...f.baseQueryParameters}});return{transporter:s,appId:e,apiKey:t,clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent(r,a){s.algoliaAgent.add({segment:r,version:a})},setClientApiKey({apiKey:r}){!n||n==="WithinHeaders"?s.baseHeaders["x-algolia-api-key"]=r:s.baseQueryParameters["x-algolia-api-key"]=r},createConfig(r,a){if(!r)throw new Error("Parameter `configurationWithIndex` is required when calling `createConfig`.");const u={method:"POST",path:"/1/configs",queryParameters:{},headers:{},data:r};return s.request(u,a)},customDelete({path:r,parameters:a},i){if(!r)throw new Error("Parameter `path` is required when calling `customDelete`.");const p={method:"DELETE",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return s.request(p,i)},customGet({path:r,parameters:a},i){if(!r)throw new Error("Parameter `path` is required when calling `customGet`.");const p={method:"GET",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return s.request(p,i)},customPost({path:r,parameters:a,body:i},c){if(!r)throw new Error("Parameter `path` is required when calling `customPost`.");const g={method:"POST",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:i||{}};return s.request(g,c)},customPut({path:r,parameters:a,body:i},c){if(!r)throw new Error("Parameter `path` is required when calling `customPut`.");const g={method:"PUT",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:i||{}};return s.request(g,c)},deleteConfig({indexName:r},a){if(!r)throw new Error("Parameter `indexName` is required when calling `deleteConfig`.");const u={method:"DELETE",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},getAllConfigs(r){const d={method:"GET",path:"/1/configs",queryParameters:{},headers:{}};return s.request(d,r)},getConfig({indexName:r},a){if(!r)throw new Error("Parameter `indexName` is required when calling `getConfig`.");const u={method:"GET",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},getConfigStatus({indexName:r},a){if(!r)throw new Error("Parameter `indexName` is required when calling `getConfigStatus`.");const u={method:"GET",path:"/1/configs/{indexName}/status".replace("{indexName}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},getLogFile({indexName:r},a){if(!r)throw new Error("Parameter `indexName` is required when calling `getLogFile`.");const u={method:"GET",path:"/1/logs/{indexName}".replace("{indexName}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},updateConfig({indexName:r,configuration:a},i){if(!r)throw new Error("Parameter `indexName` is required when calling `updateConfig`.");if(!a)throw new Error("Parameter `configuration` is required when calling `updateConfig`.");if(!a.sourceIndices)throw new Error("Parameter `configuration.sourceIndices` is required when calling `updateConfig`.");const p={method:"PUT",path:"/1/configs/{indexName}".replace("{indexName}",encodeURIComponent(r)),queryParameters:{},headers:{},data:a};return s.request(p,i)}}}function $o(e,t,n,o){if(!e||typeof e!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");if(!n||n&&(typeof n!="string"||!sa.includes(n)))throw new Error(`\`region\` is required and must be one of the following: ${sa.join(", ")}`);return Yh({appId:e,apiKey:t,region:n,timeouts:{connect:1e3,read:2e3,write:3e4},logger:xe(),requester:Ee(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:z(),requestsCache:z({serializable:!1}),hostsCache:ue({caches:[be({key:`${Mn}-${e}`}),z()]}),...o})}const Jh=Object.freeze(Object.defineProperty({__proto__:null,apiClientVersion:Mn,querySuggestionsClient:$o},Symbol.toStringTag,{value:"Module"}));var Rt="5.41.0";function Xh(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(Co([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function Zh({appId:e,apiKey:t,authMode:n,algoliaAgents:o,...l}){const f=Se(e,t,n),h=Ie({hosts:Xh(e),...l,algoliaAgent:Te({algoliaAgents:o,client:"Search",version:Rt}),baseHeaders:{"content-type":"text/plain",...f.headers(),...l.baseHeaders},baseQueryParameters:{...f.queryParameters(),...l.baseQueryParameters}});return{transporter:h,appId:e,apiKey:t,clearCache(){return Promise.all([h.requestsCache.clear(),h.responsesCache.clear()]).then(()=>{})},get _ua(){return h.algoliaAgent.value},addAlgoliaAgent(s,r){h.algoliaAgent.add({segment:s,version:r})},setClientApiKey({apiKey:s}){!n||n==="WithinHeaders"?h.baseHeaders["x-algolia-api-key"]=s:h.baseQueryParameters["x-algolia-api-key"]=s},waitForTask({indexName:s,taskID:r,maxRetries:a=50,timeout:i=d=>Math.min(d*200,5e3)},c){let d=0;return Ue({func:()=>this.getTask({indexName:s,taskID:r},c),validate:u=>u.status==="published",aggregator:()=>d+=1,error:{validate:()=>d>=a,message:()=>`The maximum number of retries exceeded. (${d}/${a})`},timeout:()=>i(d)})},waitForAppTask({taskID:s,maxRetries:r=50,timeout:a=c=>Math.min(c*200,5e3)},i){let c=0;return Ue({func:()=>this.getAppTask({taskID:s},i),validate:d=>d.status==="published",aggregator:()=>c+=1,error:{validate:()=>c>=r,message:()=>`The maximum number of retries exceeded. (${c}/${r})`},timeout:()=>a(c)})},waitForApiKey({operation:s,key:r,apiKey:a,maxRetries:i=50,timeout:c=u=>Math.min(u*200,5e3)},d){let u=0;const p={aggregator:()=>u+=1,error:{validate:()=>u>=i,message:()=>`The maximum number of retries exceeded. (${u}/${i})`},timeout:()=>c(u)};if(s==="update"){if(!a)throw new Error("`apiKey` is required when waiting for an `update` operation.");return Ue({...p,func:()=>this.getApiKey({key:r},d),validate:g=>{for(const y of Object.keys(a)){const w=a[y],q=g[y];if(Array.isArray(w)&&Array.isArray(q)){if(w.length!==q.length||w.some((v,P)=>v!==q[P]))return!1}else if(w!==q)return!1}return!0}})}return Ue({...p,func:()=>this.getApiKey({key:r},d).catch(g=>{if(g.status!==404)throw g}),validate:g=>s==="add"?g!==void 0:g===void 0})},browseObjects({indexName:s,browseParams:r,...a},i){return Ue({func:c=>this.browse({indexName:s,browseParams:{cursor:c?c.cursor:void 0,hitsPerPage:1e3,...r}},i),validate:c=>c.cursor===void 0,...a})},browseRules({indexName:s,searchRulesParams:r,...a},i){const c={...r,hitsPerPage:r?.hitsPerPage||1e3};return Ue({func:d=>this.searchRules({indexName:s,searchRulesParams:{...c,page:d?d.page+1:c.page||0}},i),validate:d=>d.hits.length<c.hitsPerPage,...a})},browseSynonyms({indexName:s,searchSynonymsParams:r,...a},i){const c={...r,page:r?.page||0,hitsPerPage:1e3};return Ue({func:d=>{const u=this.searchSynonyms({indexName:s,searchSynonymsParams:{...c,page:c.page}},i);return c.page+=1,u},validate:d=>d.hits.length<c.hitsPerPage,...a})},async chunkedBatch({indexName:s,objects:r,action:a="addObject",waitForTasks:i,batchSize:c=1e3},d){let u=[];const p=[],g=r.entries();for(const[y,w]of g)u.push({action:a,body:w}),(u.length===c||y===r.length-1)&&(p.push(await this.batch({indexName:s,batchWriteParams:{requests:u}},d)),u=[]);if(i)for(const y of p)await this.waitForTask({indexName:s,taskID:y.taskID});return p},async saveObjects({indexName:s,objects:r,waitForTasks:a,batchSize:i},c){return await this.chunkedBatch({indexName:s,objects:r,action:"addObject",waitForTasks:a,batchSize:i},c)},async deleteObjects({indexName:s,objectIDs:r,waitForTasks:a,batchSize:i},c){return await this.chunkedBatch({indexName:s,objects:r.map(d=>({objectID:d})),action:"deleteObject",waitForTasks:a,batchSize:i},c)},async partialUpdateObjects({indexName:s,objects:r,createIfNotExists:a,waitForTasks:i,batchSize:c},d){return await this.chunkedBatch({indexName:s,objects:r,action:a?"partialUpdateObject":"partialUpdateObjectNoCreate",batchSize:c,waitForTasks:i},d)},async replaceAllObjects({indexName:s,objects:r,batchSize:a,scopes:i},c){const d=Math.floor(Math.random()*1e6)+1e5,u=`${s}_tmp_${d}`;i===void 0&&(i=["settings","rules","synonyms"]);try{let p=await this.operationIndex({indexName:s,operationIndexParams:{operation:"copy",destination:u,scope:i}},c);const g=await this.chunkedBatch({indexName:u,objects:r,waitForTasks:!0,batchSize:a},c);await this.waitForTask({indexName:u,taskID:p.taskID}),p=await this.operationIndex({indexName:s,operationIndexParams:{operation:"copy",destination:u,scope:i}},c),await this.waitForTask({indexName:u,taskID:p.taskID});const y=await this.operationIndex({indexName:u,operationIndexParams:{operation:"move",destination:s}},c);return await this.waitForTask({indexName:u,taskID:y.taskID}),{copyOperationResponse:p,batchResponses:g,moveOperationResponse:y}}catch(p){throw await this.deleteIndex({indexName:u}),p}},async indexExists({indexName:s}){try{await this.getSettings({indexName:s})}catch(r){if(r instanceof or&&r.status===404)return!1;throw r}return!0},searchForHits(s,r){return this.search(s,r)},searchForFacets(s,r){return this.search(s,r)},addApiKey(s,r){if(!s)throw new Error("Parameter `apiKey` is required when calling `addApiKey`.");if(!s.acl)throw new Error("Parameter `apiKey.acl` is required when calling `addApiKey`.");const d={method:"POST",path:"/1/keys",queryParameters:{},headers:{},data:s};return h.request(d,r)},addOrUpdateObject({indexName:s,objectID:r,body:a},i){if(!s)throw new Error("Parameter `indexName` is required when calling `addOrUpdateObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `addOrUpdateObject`.");if(!a)throw new Error("Parameter `body` is required when calling `addOrUpdateObject`.");const p={method:"PUT",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:a};return h.request(p,i)},appendSource(s,r){if(!s)throw new Error("Parameter `source` is required when calling `appendSource`.");if(!s.source)throw new Error("Parameter `source.source` is required when calling `appendSource`.");const d={method:"POST",path:"/1/security/sources/append",queryParameters:{},headers:{},data:s};return h.request(d,r)},assignUserId({xAlgoliaUserID:s,assignUserIdParams:r},a){if(!s)throw new Error("Parameter `xAlgoliaUserID` is required when calling `assignUserId`.");if(!r)throw new Error("Parameter `assignUserIdParams` is required when calling `assignUserId`.");if(!r.cluster)throw new Error("Parameter `assignUserIdParams.cluster` is required when calling `assignUserId`.");const i="/1/clusters/mapping",c={},d={};s!==void 0&&(c["X-Algolia-User-ID"]=s.toString());const u={method:"POST",path:i,queryParameters:d,headers:c,data:r};return h.request(u,a)},batch({indexName:s,batchWriteParams:r},a){if(!s)throw new Error("Parameter `indexName` is required when calling `batch`.");if(!r)throw new Error("Parameter `batchWriteParams` is required when calling `batch`.");if(!r.requests)throw new Error("Parameter `batchWriteParams.requests` is required when calling `batch`.");const u={method:"POST",path:"/1/indexes/{indexName}/batch".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:r};return h.request(u,a)},batchAssignUserIds({xAlgoliaUserID:s,batchAssignUserIdsParams:r},a){if(!s)throw new Error("Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.");if(!r)throw new Error("Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`.");if(!r.cluster)throw new Error("Parameter `batchAssignUserIdsParams.cluster` is required when calling `batchAssignUserIds`.");if(!r.users)throw new Error("Parameter `batchAssignUserIdsParams.users` is required when calling `batchAssignUserIds`.");const i="/1/clusters/mapping/batch",c={},d={};s!==void 0&&(c["X-Algolia-User-ID"]=s.toString());const u={method:"POST",path:i,queryParameters:d,headers:c,data:r};return h.request(u,a)},batchDictionaryEntries({dictionaryName:s,batchDictionaryEntriesParams:r},a){if(!s)throw new Error("Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.");if(!r)throw new Error("Parameter `batchDictionaryEntriesParams` is required when calling `batchDictionaryEntries`.");if(!r.requests)throw new Error("Parameter `batchDictionaryEntriesParams.requests` is required when calling `batchDictionaryEntries`.");const u={method:"POST",path:"/1/dictionaries/{dictionaryName}/batch".replace("{dictionaryName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:r};return h.request(u,a)},browse({indexName:s,browseParams:r},a){if(!s)throw new Error("Parameter `indexName` is required when calling `browse`.");const u={method:"POST",path:"/1/indexes/{indexName}/browse".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0};return h.request(u,a)},clearObjects({indexName:s},r){if(!s)throw new Error("Parameter `indexName` is required when calling `clearObjects`.");const d={method:"POST",path:"/1/indexes/{indexName}/clear".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(d,r)},clearRules({indexName:s,forwardToReplicas:r},a){if(!s)throw new Error("Parameter `indexName` is required when calling `clearRules`.");const i="/1/indexes/{indexName}/rules/clear".replace("{indexName}",encodeURIComponent(s)),c={},d={};r!==void 0&&(d.forwardToReplicas=r.toString());const u={method:"POST",path:i,queryParameters:d,headers:c};return h.request(u,a)},clearSynonyms({indexName:s,forwardToReplicas:r},a){if(!s)throw new Error("Parameter `indexName` is required when calling `clearSynonyms`.");const i="/1/indexes/{indexName}/synonyms/clear".replace("{indexName}",encodeURIComponent(s)),c={},d={};r!==void 0&&(d.forwardToReplicas=r.toString());const u={method:"POST",path:i,queryParameters:d,headers:c};return h.request(u,a)},customDelete({path:s,parameters:r},a){if(!s)throw new Error("Parameter `path` is required when calling `customDelete`.");const u={method:"DELETE",path:"/{path}".replace("{path}",s),queryParameters:r||{},headers:{}};return h.request(u,a)},customGet({path:s,parameters:r},a){if(!s)throw new Error("Parameter `path` is required when calling `customGet`.");const u={method:"GET",path:"/{path}".replace("{path}",s),queryParameters:r||{},headers:{}};return h.request(u,a)},customPost({path:s,parameters:r,body:a},i){if(!s)throw new Error("Parameter `path` is required when calling `customPost`.");const p={method:"POST",path:"/{path}".replace("{path}",s),queryParameters:r||{},headers:{},data:a||{}};return h.request(p,i)},customPut({path:s,parameters:r,body:a},i){if(!s)throw new Error("Parameter `path` is required when calling `customPut`.");const p={method:"PUT",path:"/{path}".replace("{path}",s),queryParameters:r||{},headers:{},data:a||{}};return h.request(p,i)},deleteApiKey({key:s},r){if(!s)throw new Error("Parameter `key` is required when calling `deleteApiKey`.");const d={method:"DELETE",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(d,r)},deleteBy({indexName:s,deleteByParams:r},a){if(!s)throw new Error("Parameter `indexName` is required when calling `deleteBy`.");if(!r)throw new Error("Parameter `deleteByParams` is required when calling `deleteBy`.");const u={method:"POST",path:"/1/indexes/{indexName}/deleteByQuery".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:r};return h.request(u,a)},deleteIndex({indexName:s},r){if(!s)throw new Error("Parameter `indexName` is required when calling `deleteIndex`.");const d={method:"DELETE",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(d,r)},deleteObject({indexName:s,objectID:r},a){if(!s)throw new Error("Parameter `indexName` is required when calling `deleteObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteObject`.");const u={method:"DELETE",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return h.request(u,a)},deleteRule({indexName:s,objectID:r,forwardToReplicas:a},i){if(!s)throw new Error("Parameter `indexName` is required when calling `deleteRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteRule`.");const c="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(r)),d={},u={};a!==void 0&&(u.forwardToReplicas=a.toString());const p={method:"DELETE",path:c,queryParameters:u,headers:d};return h.request(p,i)},deleteSource({source:s},r){if(!s)throw new Error("Parameter `source` is required when calling `deleteSource`.");const d={method:"DELETE",path:"/1/security/sources/{source}".replace("{source}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(d,r)},deleteSynonym({indexName:s,objectID:r,forwardToReplicas:a},i){if(!s)throw new Error("Parameter `indexName` is required when calling `deleteSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteSynonym`.");const c="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(r)),d={},u={};a!==void 0&&(u.forwardToReplicas=a.toString());const p={method:"DELETE",path:c,queryParameters:u,headers:d};return h.request(p,i)},getApiKey({key:s},r){if(!s)throw new Error("Parameter `key` is required when calling `getApiKey`.");const d={method:"GET",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(d,r)},getAppTask({taskID:s},r){if(!s)throw new Error("Parameter `taskID` is required when calling `getAppTask`.");const d={method:"GET",path:"/1/task/{taskID}".replace("{taskID}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(d,r)},getDictionaryLanguages(s){const c={method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}};return h.request(c,s)},getDictionarySettings(s){const c={method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}};return h.request(c,s)},getLogs({offset:s,length:r,indexName:a,type:i}={},c=void 0){const d="/1/logs",u={},p={};s!==void 0&&(p.offset=s.toString()),r!==void 0&&(p.length=r.toString()),a!==void 0&&(p.indexName=a.toString()),i!==void 0&&(p.type=i.toString());const g={method:"GET",path:d,queryParameters:p,headers:u};return h.request(g,c)},getObject({indexName:s,objectID:r,attributesToRetrieve:a},i){if(!s)throw new Error("Parameter `indexName` is required when calling `getObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getObject`.");const c="/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(r)),d={},u={};a!==void 0&&(u.attributesToRetrieve=a.toString());const p={method:"GET",path:c,queryParameters:u,headers:d};return h.request(p,i)},getObjects(s,r){if(!s)throw new Error("Parameter `getObjectsParams` is required when calling `getObjects`.");if(!s.requests)throw new Error("Parameter `getObjectsParams.requests` is required when calling `getObjects`.");const d={method:"POST",path:"/1/indexes/*/objects",queryParameters:{},headers:{},data:s,useReadTransporter:!0,cacheable:!0};return h.request(d,r)},getRule({indexName:s,objectID:r},a){if(!s)throw new Error("Parameter `indexName` is required when calling `getRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getRule`.");const u={method:"GET",path:"/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return h.request(u,a)},getSettings({indexName:s,getVersion:r},a){if(!s)throw new Error("Parameter `indexName` is required when calling `getSettings`.");const i="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(s)),c={},d={};r!==void 0&&(d.getVersion=r.toString());const u={method:"GET",path:i,queryParameters:d,headers:c};return h.request(u,a)},getSources(s){const c={method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}};return h.request(c,s)},getSynonym({indexName:s,objectID:r},a){if(!s)throw new Error("Parameter `indexName` is required when calling `getSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getSynonym`.");const u={method:"GET",path:"/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return h.request(u,a)},getTask({indexName:s,taskID:r},a){if(!s)throw new Error("Parameter `indexName` is required when calling `getTask`.");if(!r)throw new Error("Parameter `taskID` is required when calling `getTask`.");const u={method:"GET",path:"/1/indexes/{indexName}/task/{taskID}".replace("{indexName}",encodeURIComponent(s)).replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return h.request(u,a)},getTopUserIds(s){const c={method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}};return h.request(c,s)},getUserId({userID:s},r){if(!s)throw new Error("Parameter `userID` is required when calling `getUserId`.");const d={method:"GET",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(d,r)},hasPendingMappings({getClusters:s}={},r=void 0){const a="/1/clusters/mapping/pending",i={},c={};s!==void 0&&(c.getClusters=s.toString());const d={method:"GET",path:a,queryParameters:c,headers:i};return h.request(d,r)},listApiKeys(s){const c={method:"GET",path:"/1/keys",queryParameters:{},headers:{}};return h.request(c,s)},listClusters(s){const c={method:"GET",path:"/1/clusters",queryParameters:{},headers:{}};return h.request(c,s)},listIndices({page:s,hitsPerPage:r}={},a=void 0){const i="/1/indexes",c={},d={};s!==void 0&&(d.page=s.toString()),r!==void 0&&(d.hitsPerPage=r.toString());const u={method:"GET",path:i,queryParameters:d,headers:c};return h.request(u,a)},listUserIds({page:s,hitsPerPage:r}={},a=void 0){const i="/1/clusters/mapping",c={},d={};s!==void 0&&(d.page=s.toString()),r!==void 0&&(d.hitsPerPage=r.toString());const u={method:"GET",path:i,queryParameters:d,headers:c};return h.request(u,a)},multipleBatch(s,r){if(!s)throw new Error("Parameter `batchParams` is required when calling `multipleBatch`.");if(!s.requests)throw new Error("Parameter `batchParams.requests` is required when calling `multipleBatch`.");const d={method:"POST",path:"/1/indexes/*/batch",queryParameters:{},headers:{},data:s};return h.request(d,r)},operationIndex({indexName:s,operationIndexParams:r},a){if(!s)throw new Error("Parameter `indexName` is required when calling `operationIndex`.");if(!r)throw new Error("Parameter `operationIndexParams` is required when calling `operationIndex`.");if(!r.operation)throw new Error("Parameter `operationIndexParams.operation` is required when calling `operationIndex`.");if(!r.destination)throw new Error("Parameter `operationIndexParams.destination` is required when calling `operationIndex`.");const u={method:"POST",path:"/1/indexes/{indexName}/operation".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:r};return h.request(u,a)},partialUpdateObject({indexName:s,objectID:r,attributesToUpdate:a,createIfNotExists:i},c){if(!s)throw new Error("Parameter `indexName` is required when calling `partialUpdateObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `partialUpdateObject`.");if(!a)throw new Error("Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.");const d="/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(r)),u={},p={};i!==void 0&&(p.createIfNotExists=i.toString());const g={method:"POST",path:d,queryParameters:p,headers:u,data:a};return h.request(g,c)},removeUserId({userID:s},r){if(!s)throw new Error("Parameter `userID` is required when calling `removeUserId`.");const d={method:"DELETE",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(d,r)},replaceSources({source:s},r){if(!s)throw new Error("Parameter `source` is required when calling `replaceSources`.");const d={method:"PUT",path:"/1/security/sources",queryParameters:{},headers:{},data:s};return h.request(d,r)},restoreApiKey({key:s},r){if(!s)throw new Error("Parameter `key` is required when calling `restoreApiKey`.");const d={method:"POST",path:"/1/keys/{key}/restore".replace("{key}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(d,r)},saveObject({indexName:s,body:r},a){if(!s)throw new Error("Parameter `indexName` is required when calling `saveObject`.");if(!r)throw new Error("Parameter `body` is required when calling `saveObject`.");const u={method:"POST",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:r};return h.request(u,a)},saveRule({indexName:s,objectID:r,rule:a,forwardToReplicas:i},c){if(!s)throw new Error("Parameter `indexName` is required when calling `saveRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `saveRule`.");if(!a)throw new Error("Parameter `rule` is required when calling `saveRule`.");if(!a.objectID)throw new Error("Parameter `rule.objectID` is required when calling `saveRule`.");if(!a.consequence)throw new Error("Parameter `rule.consequence` is required when calling `saveRule`.");const d="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(r)),u={},p={};i!==void 0&&(p.forwardToReplicas=i.toString());const g={method:"PUT",path:d,queryParameters:p,headers:u,data:a};return h.request(g,c)},saveRules({indexName:s,rules:r,forwardToReplicas:a,clearExistingRules:i},c){if(!s)throw new Error("Parameter `indexName` is required when calling `saveRules`.");if(!r)throw new Error("Parameter `rules` is required when calling `saveRules`.");const d="/1/indexes/{indexName}/rules/batch".replace("{indexName}",encodeURIComponent(s)),u={},p={};a!==void 0&&(p.forwardToReplicas=a.toString()),i!==void 0&&(p.clearExistingRules=i.toString());const g={method:"POST",path:d,queryParameters:p,headers:u,data:r};return h.request(g,c)},saveSynonym({indexName:s,objectID:r,synonymHit:a,forwardToReplicas:i},c){if(!s)throw new Error("Parameter `indexName` is required when calling `saveSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `saveSynonym`.");if(!a)throw new Error("Parameter `synonymHit` is required when calling `saveSynonym`.");if(!a.objectID)throw new Error("Parameter `synonymHit.objectID` is required when calling `saveSynonym`.");if(!a.type)throw new Error("Parameter `synonymHit.type` is required when calling `saveSynonym`.");const d="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{objectID}",encodeURIComponent(r)),u={},p={};i!==void 0&&(p.forwardToReplicas=i.toString());const g={method:"PUT",path:d,queryParameters:p,headers:u,data:a};return h.request(g,c)},saveSynonyms({indexName:s,synonymHit:r,forwardToReplicas:a,replaceExistingSynonyms:i},c){if(!s)throw new Error("Parameter `indexName` is required when calling `saveSynonyms`.");if(!r)throw new Error("Parameter `synonymHit` is required when calling `saveSynonyms`.");const d="/1/indexes/{indexName}/synonyms/batch".replace("{indexName}",encodeURIComponent(s)),u={},p={};a!==void 0&&(p.forwardToReplicas=a.toString()),i!==void 0&&(p.replaceExistingSynonyms=i.toString());const g={method:"POST",path:d,queryParameters:p,headers:u,data:r};return h.request(g,c)},search(s,r){if(s&&Array.isArray(s)&&(s={requests:s.map(({params:p,...g})=>g.type==="facet"?{...g,...p,type:"facet"}:{...g,...p,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}),!s)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!s.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");const d={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:s,useReadTransporter:!0,cacheable:!0};return h.request(d,r)},searchDictionaryEntries({dictionaryName:s,searchDictionaryEntriesParams:r},a){if(!s)throw new Error("Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.");if(!r)throw new Error("Parameter `searchDictionaryEntriesParams` is required when calling `searchDictionaryEntries`.");if(!r.query)throw new Error("Parameter `searchDictionaryEntriesParams.query` is required when calling `searchDictionaryEntries`.");const u={method:"POST",path:"/1/dictionaries/{dictionaryName}/search".replace("{dictionaryName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:r,useReadTransporter:!0,cacheable:!0};return h.request(u,a)},searchForFacetValues({indexName:s,facetName:r,searchForFacetValuesRequest:a},i){if(!s)throw new Error("Parameter `indexName` is required when calling `searchForFacetValues`.");if(!r)throw new Error("Parameter `facetName` is required when calling `searchForFacetValues`.");const p={method:"POST",path:"/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}",encodeURIComponent(s)).replace("{facetName}",encodeURIComponent(r)),queryParameters:{},headers:{},data:a||{},useReadTransporter:!0,cacheable:!0};return h.request(p,i)},searchRules({indexName:s,searchRulesParams:r},a){if(!s)throw new Error("Parameter `indexName` is required when calling `searchRules`.");const u={method:"POST",path:"/1/indexes/{indexName}/rules/search".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return h.request(u,a)},searchSingleIndex({indexName:s,searchParams:r},a){if(!s)throw new Error("Parameter `indexName` is required when calling `searchSingleIndex`.");const u={method:"POST",path:"/1/indexes/{indexName}/query".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return h.request(u,a)},searchSynonyms({indexName:s,searchSynonymsParams:r},a){if(!s)throw new Error("Parameter `indexName` is required when calling `searchSynonyms`.");const u={method:"POST",path:"/1/indexes/{indexName}/synonyms/search".replace("{indexName}",encodeURIComponent(s)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return h.request(u,a)},searchUserIds(s,r){if(!s)throw new Error("Parameter `searchUserIdsParams` is required when calling `searchUserIds`.");if(!s.query)throw new Error("Parameter `searchUserIdsParams.query` is required when calling `searchUserIds`.");const d={method:"POST",path:"/1/clusters/mapping/search",queryParameters:{},headers:{},data:s,useReadTransporter:!0,cacheable:!0};return h.request(d,r)},setDictionarySettings(s,r){if(!s)throw new Error("Parameter `dictionarySettingsParams` is required when calling `setDictionarySettings`.");if(!s.disableStandardEntries)throw new Error("Parameter `dictionarySettingsParams.disableStandardEntries` is required when calling `setDictionarySettings`.");const d={method:"PUT",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{},data:s};return h.request(d,r)},setSettings({indexName:s,indexSettings:r,forwardToReplicas:a},i){if(!s)throw new Error("Parameter `indexName` is required when calling `setSettings`.");if(!r)throw new Error("Parameter `indexSettings` is required when calling `setSettings`.");const c="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(s)),d={},u={};a!==void 0&&(u.forwardToReplicas=a.toString());const p={method:"PUT",path:c,queryParameters:u,headers:d,data:r};return h.request(p,i)},updateApiKey({key:s,apiKey:r},a){if(!s)throw new Error("Parameter `key` is required when calling `updateApiKey`.");if(!r)throw new Error("Parameter `apiKey` is required when calling `updateApiKey`.");if(!r.acl)throw new Error("Parameter `apiKey.acl` is required when calling `updateApiKey`.");const u={method:"PUT",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(s)),queryParameters:{},headers:{},data:r};return h.request(u,a)}}}function Uo(e,t,n){if(!e||typeof e!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");return Zh({appId:e,apiKey:t,timeouts:{connect:1e3,read:2e3,write:3e4},logger:xe(),requester:Ee(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:z(),requestsCache:z({serializable:!1}),hostsCache:ue({caches:[be({key:`${Rt}-${e}`}),z()]}),...n})}const ef=Object.freeze(Object.defineProperty({__proto__:null,apiClientVersion:Rt,searchClient:Uo},Symbol.toStringTag,{value:"Module"}));var Bn="1.41.0",aa=["eu","us"];function tf(e){return[{url:"data.{region}.algolia.com".replace("{region}",e),accept:"readWrite",protocol:"https"}]}function rf(e){return e.type==="onDemand"}function nf(e){return e.type==="schedule"}function sf(e){return e.type==="subscription"}function af({appId:e,apiKey:t,authMode:n,algoliaAgents:o,region:l,...f}){const h=Se(e,t,n),s=Ie({hosts:tf(l),...f,algoliaAgent:Te({algoliaAgents:o,client:"Ingestion",version:Bn}),baseHeaders:{"content-type":"text/plain",...h.headers(),...f.baseHeaders},baseQueryParameters:{...h.queryParameters(),...f.baseQueryParameters}});return{transporter:s,appId:e,apiKey:t,clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})},get _ua(){return s.algoliaAgent.value},addAlgoliaAgent(r,a){s.algoliaAgent.add({segment:r,version:a})},setClientApiKey({apiKey:r}){!n||n==="WithinHeaders"?s.baseHeaders["x-algolia-api-key"]=r:s.baseQueryParameters["x-algolia-api-key"]=r},async chunkedPush({indexName:r,objects:a,action:i="addObject",waitForTasks:c,batchSize:d=1e3,referenceIndexName:u},p){let g=[],y=0;const w=[],q=Math.floor(d/10)||d,v=a.entries();for(const[P,b]of v)if(g.push(b),(g.length===d||P===a.length-1)&&(w.push(await this.push({indexName:r,pushTaskPayload:{action:i,records:g},referenceIndexName:u},p)),g=[]),c&&w.length>0&&(w.length%q===0||P===a.length-1)){for(const S of w.slice(y,y+q)){if(!S.eventID)throw new Error("received unexpected response from the push endpoint, eventID must not be undefined");let C=0;await Ue({func:async()=>{if(S.eventID===void 0||!S.eventID)throw new Error("received unexpected response from the push endpoint, eventID must not be undefined");return this.getEvent({runID:S.runID,eventID:S.eventID}).catch(_=>{if(_.status!==404)throw _})},validate:_=>_!==void 0,aggregator:()=>C+=1,error:{validate:()=>C>=50,message:()=>`The maximum number of retries exceeded. (${C}/50)`},timeout:()=>Math.min(C*500,5e3)})}y+=q}return w},createAuthentication(r,a){if(!r)throw new Error("Parameter `authenticationCreate` is required when calling `createAuthentication`.");if(!r.type)throw new Error("Parameter `authenticationCreate.type` is required when calling `createAuthentication`.");if(!r.name)throw new Error("Parameter `authenticationCreate.name` is required when calling `createAuthentication`.");if(!r.input)throw new Error("Parameter `authenticationCreate.input` is required when calling `createAuthentication`.");const u={method:"POST",path:"/1/authentications",queryParameters:{},headers:{},data:r};return s.request(u,a)},createDestination(r,a){if(!r)throw new Error("Parameter `destinationCreate` is required when calling `createDestination`.");if(!r.type)throw new Error("Parameter `destinationCreate.type` is required when calling `createDestination`.");if(!r.name)throw new Error("Parameter `destinationCreate.name` is required when calling `createDestination`.");if(!r.input)throw new Error("Parameter `destinationCreate.input` is required when calling `createDestination`.");const u={method:"POST",path:"/1/destinations",queryParameters:{},headers:{},data:r};return s.request(u,a)},createSource(r,a){if(!r)throw new Error("Parameter `sourceCreate` is required when calling `createSource`.");if(!r.type)throw new Error("Parameter `sourceCreate.type` is required when calling `createSource`.");if(!r.name)throw new Error("Parameter `sourceCreate.name` is required when calling `createSource`.");const u={method:"POST",path:"/1/sources",queryParameters:{},headers:{},data:r};return s.request(u,a)},createTask(r,a){if(!r)throw new Error("Parameter `taskCreate` is required when calling `createTask`.");if(!r.sourceID)throw new Error("Parameter `taskCreate.sourceID` is required when calling `createTask`.");if(!r.destinationID)throw new Error("Parameter `taskCreate.destinationID` is required when calling `createTask`.");if(!r.action)throw new Error("Parameter `taskCreate.action` is required when calling `createTask`.");const u={method:"POST",path:"/2/tasks",queryParameters:{},headers:{},data:r};return s.request(u,a)},createTaskV1(r,a){if(!r)throw new Error("Parameter `taskCreate` is required when calling `createTaskV1`.");if(!r.sourceID)throw new Error("Parameter `taskCreate.sourceID` is required when calling `createTaskV1`.");if(!r.destinationID)throw new Error("Parameter `taskCreate.destinationID` is required when calling `createTaskV1`.");if(!r.trigger)throw new Error("Parameter `taskCreate.trigger` is required when calling `createTaskV1`.");if(!r.action)throw new Error("Parameter `taskCreate.action` is required when calling `createTaskV1`.");const u={method:"POST",path:"/1/tasks",queryParameters:{},headers:{},data:r};return s.request(u,a)},createTransformation(r,a){if(!r)throw new Error("Parameter `transformationCreate` is required when calling `createTransformation`.");if(!r.name)throw new Error("Parameter `transformationCreate.name` is required when calling `createTransformation`.");const u={method:"POST",path:"/1/transformations",queryParameters:{},headers:{},data:r};return s.request(u,a)},customDelete({path:r,parameters:a},i){if(!r)throw new Error("Parameter `path` is required when calling `customDelete`.");const p={method:"DELETE",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return s.request(p,i)},customGet({path:r,parameters:a},i){if(!r)throw new Error("Parameter `path` is required when calling `customGet`.");const p={method:"GET",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{}};return s.request(p,i)},customPost({path:r,parameters:a,body:i},c){if(!r)throw new Error("Parameter `path` is required when calling `customPost`.");const g={method:"POST",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:i||{}};return s.request(g,c)},customPut({path:r,parameters:a,body:i},c){if(!r)throw new Error("Parameter `path` is required when calling `customPut`.");const g={method:"PUT",path:"/{path}".replace("{path}",r),queryParameters:a||{},headers:{},data:i||{}};return s.request(g,c)},deleteAuthentication({authenticationID:r},a){if(!r)throw new Error("Parameter `authenticationID` is required when calling `deleteAuthentication`.");const u={method:"DELETE",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},deleteDestination({destinationID:r},a){if(!r)throw new Error("Parameter `destinationID` is required when calling `deleteDestination`.");const u={method:"DELETE",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},deleteSource({sourceID:r},a){if(!r)throw new Error("Parameter `sourceID` is required when calling `deleteSource`.");const u={method:"DELETE",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},deleteTask({taskID:r},a){if(!r)throw new Error("Parameter `taskID` is required when calling `deleteTask`.");const u={method:"DELETE",path:"/2/tasks/{taskID}".replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},deleteTaskV1({taskID:r},a){if(!r)throw new Error("Parameter `taskID` is required when calling `deleteTaskV1`.");const u={method:"DELETE",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},deleteTransformation({transformationID:r},a){if(!r)throw new Error("Parameter `transformationID` is required when calling `deleteTransformation`.");const u={method:"DELETE",path:"/1/transformations/{transformationID}".replace("{transformationID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},disableTask({taskID:r},a){if(!r)throw new Error("Parameter `taskID` is required when calling `disableTask`.");const u={method:"PUT",path:"/2/tasks/{taskID}/disable".replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},disableTaskV1({taskID:r},a){if(!r)throw new Error("Parameter `taskID` is required when calling `disableTaskV1`.");const u={method:"PUT",path:"/1/tasks/{taskID}/disable".replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},enableTask({taskID:r},a){if(!r)throw new Error("Parameter `taskID` is required when calling `enableTask`.");const u={method:"PUT",path:"/2/tasks/{taskID}/enable".replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},enableTaskV1({taskID:r},a){if(!r)throw new Error("Parameter `taskID` is required when calling `enableTaskV1`.");const u={method:"PUT",path:"/1/tasks/{taskID}/enable".replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},getAuthentication({authenticationID:r},a){if(!r)throw new Error("Parameter `authenticationID` is required when calling `getAuthentication`.");const u={method:"GET",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},getDestination({destinationID:r},a){if(!r)throw new Error("Parameter `destinationID` is required when calling `getDestination`.");const u={method:"GET",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},getEvent({runID:r,eventID:a},i){if(!r)throw new Error("Parameter `runID` is required when calling `getEvent`.");if(!a)throw new Error("Parameter `eventID` is required when calling `getEvent`.");const p={method:"GET",path:"/1/runs/{runID}/events/{eventID}".replace("{runID}",encodeURIComponent(r)).replace("{eventID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return s.request(p,i)},getRun({runID:r},a){if(!r)throw new Error("Parameter `runID` is required when calling `getRun`.");const u={method:"GET",path:"/1/runs/{runID}".replace("{runID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},getSource({sourceID:r},a){if(!r)throw new Error("Parameter `sourceID` is required when calling `getSource`.");const u={method:"GET",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},getTask({taskID:r},a){if(!r)throw new Error("Parameter `taskID` is required when calling `getTask`.");const u={method:"GET",path:"/2/tasks/{taskID}".replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},getTaskV1({taskID:r},a){if(!r)throw new Error("Parameter `taskID` is required when calling `getTaskV1`.");const u={method:"GET",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},getTransformation({transformationID:r},a){if(!r)throw new Error("Parameter `transformationID` is required when calling `getTransformation`.");const u={method:"GET",path:"/1/transformations/{transformationID}".replace("{transformationID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return s.request(u,a)},listAuthentications({itemsPerPage:r,page:a,type:i,platform:c,sort:d,order:u}={},p=void 0){const g="/1/authentications",y={},w={};r!==void 0&&(w.itemsPerPage=r.toString()),a!==void 0&&(w.page=a.toString()),i!==void 0&&(w.type=i.toString()),c!==void 0&&(w.platform=c.toString()),d!==void 0&&(w.sort=d.toString()),u!==void 0&&(w.order=u.toString());const q={method:"GET",path:g,queryParameters:w,headers:y};return s.request(q,p)},listDestinations({itemsPerPage:r,page:a,type:i,authenticationID:c,transformationID:d,sort:u,order:p}={},g=void 0){const y="/1/destinations",w={},q={};r!==void 0&&(q.itemsPerPage=r.toString()),a!==void 0&&(q.page=a.toString()),i!==void 0&&(q.type=i.toString()),c!==void 0&&(q.authenticationID=c.toString()),d!==void 0&&(q.transformationID=d.toString()),u!==void 0&&(q.sort=u.toString()),p!==void 0&&(q.order=p.toString());const v={method:"GET",path:y,queryParameters:q,headers:w};return s.request(v,g)},listEvents({runID:r,itemsPerPage:a,page:i,status:c,type:d,sort:u,order:p,startDate:g,endDate:y},w){if(!r)throw new Error("Parameter `runID` is required when calling `listEvents`.");const q="/1/runs/{runID}/events".replace("{runID}",encodeURIComponent(r)),v={},P={};a!==void 0&&(P.itemsPerPage=a.toString()),i!==void 0&&(P.page=i.toString()),c!==void 0&&(P.status=c.toString()),d!==void 0&&(P.type=d.toString()),u!==void 0&&(P.sort=u.toString()),p!==void 0&&(P.order=p.toString()),g!==void 0&&(P.startDate=g.toString()),y!==void 0&&(P.endDate=y.toString());const b={method:"GET",path:q,queryParameters:P,headers:v};return s.request(b,w)},listRuns({itemsPerPage:r,page:a,status:i,type:c,taskID:d,sort:u,order:p,startDate:g,endDate:y}={},w=void 0){const q="/1/runs",v={},P={};r!==void 0&&(P.itemsPerPage=r.toString()),a!==void 0&&(P.page=a.toString()),i!==void 0&&(P.status=i.toString()),c!==void 0&&(P.type=c.toString()),d!==void 0&&(P.taskID=d.toString()),u!==void 0&&(P.sort=u.toString()),p!==void 0&&(P.order=p.toString()),g!==void 0&&(P.startDate=g.toString()),y!==void 0&&(P.endDate=y.toString());const b={method:"GET",path:q,queryParameters:P,headers:v};return s.request(b,w)},listSources({itemsPerPage:r,page:a,type:i,authenticationID:c,sort:d,order:u}={},p=void 0){const g="/1/sources",y={},w={};r!==void 0&&(w.itemsPerPage=r.toString()),a!==void 0&&(w.page=a.toString()),i!==void 0&&(w.type=i.toString()),c!==void 0&&(w.authenticationID=c.toString()),d!==void 0&&(w.sort=d.toString()),u!==void 0&&(w.order=u.toString());const q={method:"GET",path:g,queryParameters:w,headers:y};return s.request(q,p)},listTasks({itemsPerPage:r,page:a,action:i,enabled:c,sourceID:d,sourceType:u,destinationID:p,triggerType:g,withEmailNotifications:y,sort:w,order:q}={},v=void 0){const P="/2/tasks",b={},S={};r!==void 0&&(S.itemsPerPage=r.toString()),a!==void 0&&(S.page=a.toString()),i!==void 0&&(S.action=i.toString()),c!==void 0&&(S.enabled=c.toString()),d!==void 0&&(S.sourceID=d.toString()),u!==void 0&&(S.sourceType=u.toString()),p!==void 0&&(S.destinationID=p.toString()),g!==void 0&&(S.triggerType=g.toString()),y!==void 0&&(S.withEmailNotifications=y.toString()),w!==void 0&&(S.sort=w.toString()),q!==void 0&&(S.order=q.toString());const C={method:"GET",path:P,queryParameters:S,headers:b};return s.request(C,v)},listTasksV1({itemsPerPage:r,page:a,action:i,enabled:c,sourceID:d,destinationID:u,triggerType:p,sort:g,order:y}={},w=void 0){const q="/1/tasks",v={},P={};r!==void 0&&(P.itemsPerPage=r.toString()),a!==void 0&&(P.page=a.toString()),i!==void 0&&(P.action=i.toString()),c!==void 0&&(P.enabled=c.toString()),d!==void 0&&(P.sourceID=d.toString()),u!==void 0&&(P.destinationID=u.toString()),p!==void 0&&(P.triggerType=p.toString()),g!==void 0&&(P.sort=g.toString()),y!==void 0&&(P.order=y.toString());const b={method:"GET",path:q,queryParameters:P,headers:v};return s.request(b,w)},listTransformations({itemsPerPage:r,page:a,sort:i,order:c,type:d}={},u=void 0){const p="/1/transformations",g={},y={};r!==void 0&&(y.itemsPerPage=r.toString()),a!==void 0&&(y.page=a.toString()),i!==void 0&&(y.sort=i.toString()),c!==void 0&&(y.order=c.toString()),d!==void 0&&(y.type=d.toString());const w={method:"GET",path:p,queryParameters:y,headers:g};return s.request(w,u)},push({indexName:r,pushTaskPayload:a,watch:i,referenceIndexName:c},d){if(!r)throw new Error("Parameter `indexName` is required when calling `push`.");if(!a)throw new Error("Parameter `pushTaskPayload` is required when calling `push`.");if(!a.action)throw new Error("Parameter `pushTaskPayload.action` is required when calling `push`.");if(!a.records)throw new Error("Parameter `pushTaskPayload.records` is required when calling `push`.");const u="/1/push/{indexName}".replace("{indexName}",encodeURIComponent(r)),p={},g={};i!==void 0&&(g.watch=i.toString()),c!==void 0&&(g.referenceIndexName=c.toString());const y={method:"POST",path:u,queryParameters:g,headers:p,data:a};return d={timeouts:{connect:18e4,read:18e4,write:18e4,...d?.timeouts}},s.request(y,d)},pushTask({taskID:r,pushTaskPayload:a,watch:i},c){if(!r)throw new Error("Parameter `taskID` is required when calling `pushTask`.");if(!a)throw new Error("Parameter `pushTaskPayload` is required when calling `pushTask`.");if(!a.action)throw new Error("Parameter `pushTaskPayload.action` is required when calling `pushTask`.");if(!a.records)throw new Error("Parameter `pushTaskPayload.records` is required when calling `pushTask`.");const d="/2/tasks/{taskID}/push".replace("{taskID}",encodeURIComponent(r)),u={},p={};i!==void 0&&(p.watch=i.toString());const g={method:"POST",path:d,queryParameters:p,headers:u,data:a};return c={timeouts:{connect:18e4,read:18e4,write:18e4,...c?.timeouts}},s.request(g,c)},replaceTask({taskID:r,taskReplace:a},i){if(!r)throw new Error("Parameter `taskID` is required when calling `replaceTask`.");if(!a)throw new Error("Parameter `taskReplace` is required when calling `replaceTask`.");if(!a.destinationID)throw new Error("Parameter `taskReplace.destinationID` is required when calling `replaceTask`.");if(!a.action)throw new Error("Parameter `taskReplace.action` is required when calling `replaceTask`.");const p={method:"PUT",path:"/2/tasks/{taskID}".replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:a};return s.request(p,i)},runSource({sourceID:r,runSourcePayload:a},i){if(!r)throw new Error("Parameter `sourceID` is required when calling `runSource`.");const p={method:"POST",path:"/1/sources/{sourceID}/run".replace("{sourceID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:a||{}};return s.request(p,i)},runTask({taskID:r,runTaskPayload:a},i){if(!r)throw new Error("Parameter `taskID` is required when calling `runTask`.");const p={method:"POST",path:"/2/tasks/{taskID}/run".replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:a||{}};return s.request(p,i)},runTaskV1({taskID:r,runTaskPayload:a},i){if(!r)throw new Error("Parameter `taskID` is required when calling `runTaskV1`.");const p={method:"POST",path:"/1/tasks/{taskID}/run".replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:a||{}};return s.request(p,i)},searchAuthentications(r,a){if(!r)throw new Error("Parameter `authenticationSearch` is required when calling `searchAuthentications`.");if(!r.authenticationIDs)throw new Error("Parameter `authenticationSearch.authenticationIDs` is required when calling `searchAuthentications`.");const u={method:"POST",path:"/1/authentications/search",queryParameters:{},headers:{},data:r};return s.request(u,a)},searchDestinations(r,a){if(!r)throw new Error("Parameter `destinationSearch` is required when calling `searchDestinations`.");if(!r.destinationIDs)throw new Error("Parameter `destinationSearch.destinationIDs` is required when calling `searchDestinations`.");const u={method:"POST",path:"/1/destinations/search",queryParameters:{},headers:{},data:r};return s.request(u,a)},searchSources(r,a){if(!r)throw new Error("Parameter `sourceSearch` is required when calling `searchSources`.");if(!r.sourceIDs)throw new Error("Parameter `sourceSearch.sourceIDs` is required when calling `searchSources`.");const u={method:"POST",path:"/1/sources/search",queryParameters:{},headers:{},data:r};return s.request(u,a)},searchTasks(r,a){if(!r)throw new Error("Parameter `taskSearch` is required when calling `searchTasks`.");if(!r.taskIDs)throw new Error("Parameter `taskSearch.taskIDs` is required when calling `searchTasks`.");const u={method:"POST",path:"/2/tasks/search",queryParameters:{},headers:{},data:r};return s.request(u,a)},searchTasksV1(r,a){if(!r)throw new Error("Parameter `taskSearch` is required when calling `searchTasksV1`.");if(!r.taskIDs)throw new Error("Parameter `taskSearch.taskIDs` is required when calling `searchTasksV1`.");const u={method:"POST",path:"/1/tasks/search",queryParameters:{},headers:{},data:r};return s.request(u,a)},searchTransformations(r,a){if(!r)throw new Error("Parameter `transformationSearch` is required when calling `searchTransformations`.");if(!r.transformationIDs)throw new Error("Parameter `transformationSearch.transformationIDs` is required when calling `searchTransformations`.");const u={method:"POST",path:"/1/transformations/search",queryParameters:{},headers:{},data:r};return s.request(u,a)},triggerDockerSourceDiscover({sourceID:r},a){if(!r)throw new Error("Parameter `sourceID` is required when calling `triggerDockerSourceDiscover`.");const u={method:"POST",path:"/1/sources/{sourceID}/discover".replace("{sourceID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return a={timeouts:{connect:18e4,read:18e4,write:18e4,...a?.timeouts}},s.request(u,a)},tryTransformation(r,a){if(!r)throw new Error("Parameter `transformationTry` is required when calling `tryTransformation`.");if(!r.sampleRecord)throw new Error("Parameter `transformationTry.sampleRecord` is required when calling `tryTransformation`.");const u={method:"POST",path:"/1/transformations/try",queryParameters:{},headers:{},data:r};return s.request(u,a)},tryTransformationBeforeUpdate({transformationID:r,transformationTry:a},i){if(!r)throw new Error("Parameter `transformationID` is required when calling `tryTransformationBeforeUpdate`.");if(!a)throw new Error("Parameter `transformationTry` is required when calling `tryTransformationBeforeUpdate`.");if(!a.sampleRecord)throw new Error("Parameter `transformationTry.sampleRecord` is required when calling `tryTransformationBeforeUpdate`.");const p={method:"POST",path:"/1/transformations/{transformationID}/try".replace("{transformationID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:a};return s.request(p,i)},updateAuthentication({authenticationID:r,authenticationUpdate:a},i){if(!r)throw new Error("Parameter `authenticationID` is required when calling `updateAuthentication`.");if(!a)throw new Error("Parameter `authenticationUpdate` is required when calling `updateAuthentication`.");const p={method:"PATCH",path:"/1/authentications/{authenticationID}".replace("{authenticationID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:a};return s.request(p,i)},updateDestination({destinationID:r,destinationUpdate:a},i){if(!r)throw new Error("Parameter `destinationID` is required when calling `updateDestination`.");if(!a)throw new Error("Parameter `destinationUpdate` is required when calling `updateDestination`.");const p={method:"PATCH",path:"/1/destinations/{destinationID}".replace("{destinationID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:a};return s.request(p,i)},updateSource({sourceID:r,sourceUpdate:a},i){if(!r)throw new Error("Parameter `sourceID` is required when calling `updateSource`.");if(!a)throw new Error("Parameter `sourceUpdate` is required when calling `updateSource`.");const p={method:"PATCH",path:"/1/sources/{sourceID}".replace("{sourceID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:a};return s.request(p,i)},updateTask({taskID:r,taskUpdate:a},i){if(!r)throw new Error("Parameter `taskID` is required when calling `updateTask`.");if(!a)throw new Error("Parameter `taskUpdate` is required when calling `updateTask`.");const p={method:"PATCH",path:"/2/tasks/{taskID}".replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:a};return s.request(p,i)},updateTaskV1({taskID:r,taskUpdate:a},i){if(!r)throw new Error("Parameter `taskID` is required when calling `updateTaskV1`.");if(!a)throw new Error("Parameter `taskUpdate` is required when calling `updateTaskV1`.");const p={method:"PATCH",path:"/1/tasks/{taskID}".replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:a};return s.request(p,i)},updateTransformation({transformationID:r,transformationCreate:a},i){if(!r)throw new Error("Parameter `transformationID` is required when calling `updateTransformation`.");if(!a)throw new Error("Parameter `transformationCreate` is required when calling `updateTransformation`.");if(!a.name)throw new Error("Parameter `transformationCreate.name` is required when calling `updateTransformation`.");const p={method:"PUT",path:"/1/transformations/{transformationID}".replace("{transformationID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:a};return s.request(p,i)},validateSource(r,a=void 0){const u={method:"POST",path:"/1/sources/validate",queryParameters:{},headers:{},data:r||{}};return a={timeouts:{connect:18e4,read:18e4,write:18e4,...a?.timeouts}},s.request(u,a)},validateSourceBeforeUpdate({sourceID:r,sourceUpdate:a},i){if(!r)throw new Error("Parameter `sourceID` is required when calling `validateSourceBeforeUpdate`.");if(!a)throw new Error("Parameter `sourceUpdate` is required when calling `validateSourceBeforeUpdate`.");const p={method:"POST",path:"/1/sources/{sourceID}/validate".replace("{sourceID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:a};return i={timeouts:{connect:18e4,read:18e4,write:18e4,...i?.timeouts}},s.request(p,i)}}}function tn(e,t,n,o){if(!e||typeof e!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");if(!n||n&&(typeof n!="string"||!aa.includes(n)))throw new Error(`\`region\` is required and must be one of the following: ${aa.join(", ")}`);return af({appId:e,apiKey:t,region:n,timeouts:{connect:25e3,read:25e3,write:25e3},logger:xe(),requester:Ee(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:z(),requestsCache:z({serializable:!1}),hostsCache:ue({caches:[be({key:`${Bn}-${e}`}),z()]}),...o})}const of=Object.freeze(Object.defineProperty({__proto__:null,apiClientVersion:Bn,ingestionClient:tn,isOnDemandTrigger:rf,isScheduleTrigger:nf,isSubscriptionTrigger:sf},Symbol.toStringTag,{value:"Module"}));var Hn="1.41.0";function cf(){return[{url:"status.algolia.com",accept:"readWrite",protocol:"https"}]}function uf({appId:e,apiKey:t,authMode:n,algoliaAgents:o,...l}){const f=Se(e,t,n),h=Ie({hosts:cf(),...l,algoliaAgent:Te({algoliaAgents:o,client:"Monitoring",version:Hn}),baseHeaders:{"content-type":"text/plain",...f.headers(),...l.baseHeaders},baseQueryParameters:{...f.queryParameters(),...l.baseQueryParameters}});return{transporter:h,appId:e,apiKey:t,clearCache(){return Promise.all([h.requestsCache.clear(),h.responsesCache.clear()]).then(()=>{})},get _ua(){return h.algoliaAgent.value},addAlgoliaAgent(s,r){h.algoliaAgent.add({segment:s,version:r})},setClientApiKey({apiKey:s}){!n||n==="WithinHeaders"?h.baseHeaders["x-algolia-api-key"]=s:h.baseQueryParameters["x-algolia-api-key"]=s},customDelete({path:s,parameters:r},a){if(!s)throw new Error("Parameter `path` is required when calling `customDelete`.");const u={method:"DELETE",path:"/{path}".replace("{path}",s),queryParameters:r||{},headers:{}};return h.request(u,a)},customGet({path:s,parameters:r},a){if(!s)throw new Error("Parameter `path` is required when calling `customGet`.");const u={method:"GET",path:"/{path}".replace("{path}",s),queryParameters:r||{},headers:{}};return h.request(u,a)},customPost({path:s,parameters:r,body:a},i){if(!s)throw new Error("Parameter `path` is required when calling `customPost`.");const p={method:"POST",path:"/{path}".replace("{path}",s),queryParameters:r||{},headers:{},data:a||{}};return h.request(p,i)},customPut({path:s,parameters:r,body:a},i){if(!s)throw new Error("Parameter `path` is required when calling `customPut`.");const p={method:"PUT",path:"/{path}".replace("{path}",s),queryParameters:r||{},headers:{},data:a||{}};return h.request(p,i)},getClusterIncidents({clusters:s},r){if(!s)throw new Error("Parameter `clusters` is required when calling `getClusterIncidents`.");const d={method:"GET",path:"/1/incidents/{clusters}".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(d,r)},getClusterStatus({clusters:s},r){if(!s)throw new Error("Parameter `clusters` is required when calling `getClusterStatus`.");const d={method:"GET",path:"/1/status/{clusters}".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(d,r)},getIncidents(s){const c={method:"GET",path:"/1/incidents",queryParameters:{},headers:{}};return h.request(c,s)},getIndexingTime({clusters:s},r){if(!s)throw new Error("Parameter `clusters` is required when calling `getIndexingTime`.");const d={method:"GET",path:"/1/indexing/{clusters}".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(d,r)},getLatency({clusters:s},r){if(!s)throw new Error("Parameter `clusters` is required when calling `getLatency`.");const d={method:"GET",path:"/1/latency/{clusters}".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(d,r)},getMetrics({metric:s,period:r},a){if(!s)throw new Error("Parameter `metric` is required when calling `getMetrics`.");if(!r)throw new Error("Parameter `period` is required when calling `getMetrics`.");const u={method:"GET",path:"/1/infrastructure/{metric}/period/{period}".replace("{metric}",encodeURIComponent(s)).replace("{period}",encodeURIComponent(r)),queryParameters:{},headers:{}};return h.request(u,a)},getReachability({clusters:s},r){if(!s)throw new Error("Parameter `clusters` is required when calling `getReachability`.");const d={method:"GET",path:"/1/reachability/{clusters}/probes".replace("{clusters}",encodeURIComponent(s)),queryParameters:{},headers:{}};return h.request(d,r)},getServers(s){const c={method:"GET",path:"/1/inventory/servers",queryParameters:{},headers:{}};return h.request(c,s)},getStatus(s){const c={method:"GET",path:"/1/status",queryParameters:{},headers:{}};return h.request(c,s)}}}function No(e,t,n){if(!e||typeof e!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");return uf({appId:e,apiKey:t,timeouts:{connect:1e3,read:2e3,write:3e4},logger:xe(),requester:Ee(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:z(),requestsCache:z({serializable:!1}),hostsCache:ue({caches:[be({key:`${Hn}-${e}`}),z()]}),...n})}const lf=Object.freeze(Object.defineProperty({__proto__:null,apiClientVersion:Hn,monitoringClient:No},Symbol.toStringTag,{value:"Module"}));var Fn="5.41.0";function df(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(Co([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function hf({appId:e,apiKey:t,authMode:n,algoliaAgents:o,...l}){const f=Se(e,t,n),h=Ie({hosts:df(e),...l,algoliaAgent:Te({algoliaAgents:o,client:"Recommend",version:Fn}),baseHeaders:{"content-type":"text/plain",...f.headers(),...l.baseHeaders},baseQueryParameters:{...f.queryParameters(),...l.baseQueryParameters}});return{transporter:h,appId:e,apiKey:t,clearCache(){return Promise.all([h.requestsCache.clear(),h.responsesCache.clear()]).then(()=>{})},get _ua(){return h.algoliaAgent.value},addAlgoliaAgent(s,r){h.algoliaAgent.add({segment:s,version:r})},setClientApiKey({apiKey:s}){!n||n==="WithinHeaders"?h.baseHeaders["x-algolia-api-key"]=s:h.baseQueryParameters["x-algolia-api-key"]=s},batchRecommendRules({indexName:s,model:r,recommendRule:a},i){if(!s)throw new Error("Parameter `indexName` is required when calling `batchRecommendRules`.");if(!r)throw new Error("Parameter `model` is required when calling `batchRecommendRules`.");const p={method:"POST",path:"/1/indexes/{indexName}/{model}/recommend/rules/batch".replace("{indexName}",encodeURIComponent(s)).replace("{model}",encodeURIComponent(r)),queryParameters:{},headers:{},data:a||{}};return h.request(p,i)},customDelete({path:s,parameters:r},a){if(!s)throw new Error("Parameter `path` is required when calling `customDelete`.");const u={method:"DELETE",path:"/{path}".replace("{path}",s),queryParameters:r||{},headers:{}};return h.request(u,a)},customGet({path:s,parameters:r},a){if(!s)throw new Error("Parameter `path` is required when calling `customGet`.");const u={method:"GET",path:"/{path}".replace("{path}",s),queryParameters:r||{},headers:{}};return h.request(u,a)},customPost({path:s,parameters:r,body:a},i){if(!s)throw new Error("Parameter `path` is required when calling `customPost`.");const p={method:"POST",path:"/{path}".replace("{path}",s),queryParameters:r||{},headers:{},data:a||{}};return h.request(p,i)},customPut({path:s,parameters:r,body:a},i){if(!s)throw new Error("Parameter `path` is required when calling `customPut`.");const p={method:"PUT",path:"/{path}".replace("{path}",s),queryParameters:r||{},headers:{},data:a||{}};return h.request(p,i)},deleteRecommendRule({indexName:s,model:r,objectID:a},i){if(!s)throw new Error("Parameter `indexName` is required when calling `deleteRecommendRule`.");if(!r)throw new Error("Parameter `model` is required when calling `deleteRecommendRule`.");if(!a)throw new Error("Parameter `objectID` is required when calling `deleteRecommendRule`.");const p={method:"DELETE",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{model}",encodeURIComponent(r)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return h.request(p,i)},getRecommendRule({indexName:s,model:r,objectID:a},i){if(!s)throw new Error("Parameter `indexName` is required when calling `getRecommendRule`.");if(!r)throw new Error("Parameter `model` is required when calling `getRecommendRule`.");if(!a)throw new Error("Parameter `objectID` is required when calling `getRecommendRule`.");const p={method:"GET",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(s)).replace("{model}",encodeURIComponent(r)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return h.request(p,i)},getRecommendStatus({indexName:s,model:r,taskID:a},i){if(!s)throw new Error("Parameter `indexName` is required when calling `getRecommendStatus`.");if(!r)throw new Error("Parameter `model` is required when calling `getRecommendStatus`.");if(!a)throw new Error("Parameter `taskID` is required when calling `getRecommendStatus`.");const p={method:"GET",path:"/1/indexes/{indexName}/{model}/task/{taskID}".replace("{indexName}",encodeURIComponent(s)).replace("{model}",encodeURIComponent(r)).replace("{taskID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return h.request(p,i)},getRecommendations(s,r){if(s&&Array.isArray(s)&&(s={requests:s}),!s)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!s.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");const d={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:s,useReadTransporter:!0,cacheable:!0};return h.request(d,r)},searchRecommendRules({indexName:s,model:r,searchRecommendRulesParams:a},i){if(!s)throw new Error("Parameter `indexName` is required when calling `searchRecommendRules`.");if(!r)throw new Error("Parameter `model` is required when calling `searchRecommendRules`.");const p={method:"POST",path:"/1/indexes/{indexName}/{model}/recommend/rules/search".replace("{indexName}",encodeURIComponent(s)).replace("{model}",encodeURIComponent(r)),queryParameters:{},headers:{},data:a||{},useReadTransporter:!0,cacheable:!0};return h.request(p,i)}}}function Mo(e,t,n){if(!e||typeof e!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");return hf({appId:e,apiKey:t,timeouts:{connect:1e3,read:2e3,write:3e4},logger:xe(),requester:Ee(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:z(),requestsCache:z({serializable:!1}),hostsCache:ue({caches:[be({key:`${Fn}-${e}`}),z()]}),...n})}const ff=Object.freeze(Object.defineProperty({__proto__:null,apiClientVersion:Fn,recommendClient:Mo},Symbol.toStringTag,{value:"Module"}));var Bo=Object.defineProperty,pf=Object.getOwnPropertyDescriptor,gf=Object.getOwnPropertyNames,mf=Object.prototype.hasOwnProperty,Ho=(e,t)=>{for(var n in t)Bo(e,n,{get:t[n],enumerable:!0})},yf=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of gf(t))!mf.call(e,l)&&l!==n&&Bo(e,l,{get:()=>t[l],enumerable:!(o=pf(t,l))||o.enumerable});return e},we=(e,t,n)=>(yf(e,t,"default"),n),Fo={};Ho(Fo,{algoliasearch:()=>rn,apiClientVersion:()=>Rt});var fe={};Ho(fe,{apiClientVersion:()=>Rt});we(fe,Lh);we(fe,Nh);we(fe,Hh);we(fe,Gh);we(fe,Vh);we(fe,Jh);we(fe,ef);we(fe,of);we(fe,lf);we(fe,ff);we(Fo,fe);function rn(e,t,n){if(!e||typeof e!="string")throw new Error("`appId` is missing.");if(!t||typeof t!="string")throw new Error("`apiKey` is missing.");const o=Uo(e,t,n);let l;if(n?.transformation){if(!n.transformation.region)throw new Error("`region` must be provided when leveraging the transformation pipeline");l=tn(e,t,n.transformation.region,n)}return{...o,async saveObjectsWithTransformation({indexName:f,objects:h,waitForTasks:s},r){if(!l)throw new Error("`transformation.region` must be provided at client instantiation before calling this method.");if(!n?.transformation?.region)throw new Error("`region` must be provided when leveraging the transformation pipeline");return l.chunkedPush({indexName:f,objects:h,action:"addObject",waitForTasks:s},r)},async partialUpdateObjectsWithTransformation({indexName:f,objects:h,createIfNotExists:s,waitForTasks:r},a){if(!l)throw new Error("`transformation.region` must be provided at client instantiation before calling this method.");if(!n?.transformation?.region)throw new Error("`region` must be provided when leveraging the transformation pipeline");return l.chunkedPush({indexName:f,objects:h,action:s?"partialUpdateObject":"partialUpdateObjectNoCreate",waitForTasks:r},a)},async replaceAllObjectsWithTransformation({indexName:f,objects:h,batchSize:s,scopes:r},a){if(!l)throw new Error("`transformation.region` must be provided at client instantiation before calling this method.");if(!n?.transformation?.region)throw new Error("`region` must be provided when leveraging the transformation pipeline");const i=Math.floor(Math.random()*1e6)+1e5,c=`${f}_tmp_${i}`;r===void 0&&(r=["settings","rules","synonyms"]);try{let d=await this.operationIndex({indexName:f,operationIndexParams:{operation:"copy",destination:c,scope:r}},a);const u=await l.chunkedPush({indexName:c,objects:h,waitForTasks:!0,batchSize:s,referenceIndexName:f},a);await this.waitForTask({indexName:c,taskID:d.taskID}),d=await this.operationIndex({indexName:f,operationIndexParams:{operation:"copy",destination:c,scope:r}},a),await this.waitForTask({indexName:c,taskID:d.taskID});const p=await this.operationIndex({indexName:c,operationIndexParams:{operation:"move",destination:f}},a);return await this.waitForTask({indexName:c,taskID:p.taskID}),{copyOperationResponse:d,watchResponses:u,moveOperationResponse:p}}catch(d){throw await this.deleteIndex({indexName:c}),d}},get _ua(){return o.transporter.algoliaAgent.value},initAbtesting:f=>ko(f.appId||e,f.apiKey||t,f.region,f.options),initAbtestingV3:f=>Oo(f.appId||e,f.apiKey||t,f.region,f.options),initAnalytics:f=>jo(f.appId||e,f.apiKey||t,f.region,f.options),initIngestion:f=>tn(f.appId||e,f.apiKey||t,f.region,f.options),initInsights:f=>Do(f.appId||e,f.apiKey||t,f.region,f.options),initMonitoring:(f={})=>No(f.appId||e,f.apiKey||t,f.options),initPersonalization:f=>Lo(f.appId||e,f.apiKey||t,f.region,f.options),initQuerySuggestions:f=>$o(f.appId||e,f.apiKey||t,f.region,f.options),initRecommend:(f={})=>Mo(f.appId||e,f.apiKey||t,f.options)}}const oa=re("ALGOLIA_APP_ID")||"",ia=re("ALGOLIA_API_KEY")||"",ca=re("ALGOLIA_BLOG_INDEX")||"decentraland-blog",wf=ar.injectEndpoints({endpoints:e=>({searchBlogPosts:e.query({queryFn:async({query:t,hitsPerPage:n=10,page:o=0})=>{try{if(t.length<3)return{data:{results:[],total:0,hasMore:!1}};const f=await rn(oa,ia).searchSingleIndex({indexName:ca,searchParams:{query:t,hitsPerPage:n,page:o}}),h=f.hits||[];return{data:{results:await Promise.all(h.map(async r=>{const i=r.imageObject?.sys?.id||"",d=r.categoryObject?.sys?.id||"",[u,p]=await Promise.all([Cs(i),_s(d)]);return{url:`/blog/${p}/${r.id}`,image:u,title:r._highlightResult?.title?.value||r.title,description:r._highlightResult?.description?.value||r.description}})),total:f.nbHits||0,hasMore:(o+1)*n<(f.nbHits||0)}}}catch(l){return{error:{status:"CUSTOM_ERROR",error:l instanceof Error?l.message:"Unknown error"}}}},providesTags:(t,n,o)=>[{type:"SearchResults",id:o.query}]}),searchBlog:e.query({queryFn:async({query:t,hitsPerPage:n=10,page:o=0})=>{try{if(t.length<3)return{data:[]};const h=(await rn(oa,ia).searchSingleIndex({indexName:ca,searchParams:{query:t,hitsPerPage:n,page:o}})).hits||[];return{data:await Promise.all(h.map(async r=>{const i=r.imageObject?.sys?.id||"",d=r.categoryObject?.sys?.id||"",[u,p]=await Promise.all([Cs(i),_s(d)]);return{id:r.id,categoryId:p,url:`/blog/${p}/${r.id}`,image:u,highlightedTitle:r._highlightResult?.title?.value||r.title,highlightedDescription:r._highlightResult?.description?.value||r.description}}))}}catch(l){return{error:{status:"CUSTOM_ERROR",error:l instanceof Error?l.message:"Unknown error"}}}},providesTags:(t,n,o)=>[{type:"SearchResults",id:o.query}]})}),overrideExisting:!1}),{useSearchBlogPostsQuery:Pf,useSearchBlogQuery:qf}=wf,{Link:Qo}=await O("react-router-dom"),{Box:le,dclColors:Qn,styled:ne}=await O("decentraland-ui2"),vf=ne(le,{shouldForwardProp:e=>e!=="$hasResults"})(({theme:e,$hasResults:t})=>({position:"relative",width:"auto",zIndex:t?e.zIndex.modal:1,[e.breakpoints.down("sm")]:{width:"100%"}})),Ef=ne(le)(({theme:e})=>({position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",zIndex:e.zIndex.modal-1})),bf=ne(le)(()=>({position:"relative",display:"flex",alignItems:"center",width:"100%"})),Sf=ne(le)(({theme:e})=>({width:"300px",padding:`${e.spacing(1.5)} ${e.spacing(5)} ${e.spacing(1.5)} ${e.spacing(2)}`,border:"1px solid rgba(255, 255, 255, 0.15)",borderRadius:e.spacing(1),backgroundColor:"rgba(255, 255, 255, 0.05)",color:e.palette.text.primary,fontSize:"15px",outline:"none",transition:"all 200ms ease","&::placeholder":{color:"rgba(255, 255, 255, 0.5)"},"&:focus":{backgroundColor:"rgba(255, 255, 255, 0.08)",borderColor:"rgba(255, 255, 255, 0.25)"},"@media (max-width: 1450px)":{width:"100%",marginBottom:e.spacing(2)}})).withComponent("input"),Tf=ne(le)(({theme:e})=>({position:"absolute",right:e.spacing(1.5),top:"50%",transform:"translateY(-50%)",background:"none",border:"none",color:"rgba(255, 255, 255, 0.5)",fontSize:"24px",cursor:"pointer",padding:e.spacing(.5),lineHeight:1,transition:"color 200ms ease","&:hover":{color:e.palette.text.primary}})).withComponent("button"),xf=ne(le)(({theme:e})=>({position:"absolute",top:`calc(100% + ${e.spacing(1)})`,right:0,width:"500px",maxWidth:"90vw",backgroundColor:e.palette.background.paper,borderRadius:e.spacing(1.5),boxShadow:"0 8px 24px rgba(0, 0, 0, 0.4)",listStyleType:"none",margin:0,padding:e.spacing(1),maxHeight:"600px",overflowY:"auto",zIndex:e.zIndex.modal+1,"@media (max-width: 1450px)":{width:`calc(100vw - ${e.spacing(6)})`,left:0,right:"auto"}})).withComponent("ul"),If=ne(le,{shouldForwardProp:e=>e!=="$selected"})(({theme:e,$selected:t})=>({borderRadius:e.spacing(1),backgroundColor:t?e.palette.action.hover:"transparent",transition:"background-color 200ms ease",marginBottom:e.spacing(.5),"&:last-child":{marginBottom:0}})).withComponent("li"),Af=ne(Qo)(({theme:e})=>({display:"flex",padding:e.spacing(1.5),textDecoration:"none",color:"inherit",gap:e.spacing(1.5)})),Rf=ne(le,{shouldForwardProp:e=>e!=="$image"})(({theme:e,$image:t})=>({width:"80px",height:"80px",flexShrink:0,borderRadius:e.spacing(1),backgroundColor:"rgba(255, 255, 255, 0.05)",backgroundImage:t?`url(${t})`:"none",backgroundSize:"cover",backgroundPosition:"center"})),Cf=ne(le)(({theme:e})=>({flex:1,display:"flex",flexDirection:"column",gap:e.spacing(.5),overflow:"hidden"})),_f=ne(le)(({theme:e})=>({color:e.palette.text.primary,fontSize:"15px",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& em":{fontStyle:"normal",color:Qn.base.primary}})),Of=ne(le)(({theme:e})=>({color:e.palette.text.secondary,fontSize:"13px",lineHeight:"1.5",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical","& em":{fontStyle:"normal",color:Qn.base.primary}})),Lr=ne(le)(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",padding:`${e.spacing(5)} ${e.spacing(2.5)}`,textAlign:"center",color:e.palette.text.secondary,"& strong":{color:e.palette.text.primary,fontSize:"17px",marginBottom:e.spacing(1)},"& span":{fontSize:"15px"}})).withComponent("li"),ua=ne(le)(({theme:e})=>({fontSize:"48px",marginBottom:e.spacing(2),opacity:.5})),kf=ne(le,{shouldForwardProp:e=>e!=="$selected"})(({theme:e,$selected:t})=>({borderRadius:e.spacing(1),backgroundColor:t?e.palette.action.hover:"transparent",transition:"background-color 200ms ease",marginTop:e.spacing(.5)})).withComponent("li"),jf=ne(Qo)(({theme:e})=>({display:"block",padding:e.spacing(1.5),textAlign:"center",color:Qn.base.primary,fontSize:"15px",fontWeight:500,textDecoration:"none",transition:"opacity 200ms ease","&:hover":{opacity:.8}})),{useCallback:la,useEffect:Df,useState:$r}=await O("react"),{useNavigate:Lf}=await O("react-router-dom"),{useTranslation:$f}=await O("@dcl/hooks");function Uf(e,t){if(typeof e=="object"&&e!==null&&"error"in e){const n=e.error;if(typeof n=="string")return n}return t}const Nf=({placeholder:e,onClose:t})=>{const{t:n}=$f(),o=Lf(),[l,f]=$r(""),[h,s]=$r(-1),[r,a]=$r("");Df(()=>{const q=setTimeout(()=>{a(l)},300);return()=>clearTimeout(q)},[l]);const{data:i=[],isLoading:c,error:d,isError:u}=qf({query:r,hitsPerPage:5,page:0},{skip:r.trim().length<=2}),p=la(()=>{f(""),s(-1),t?.()},[t]),g=la(q=>{const v=i.length>3?4:i.length;if(q.key==="ArrowUp")q.preventDefault(),s(P=>P<=0?v:P-1);else if(q.key==="ArrowDown")q.preventDefault(),s(P=>P>=v?0:P+1);else if(q.key==="Enter"){if(q.preventDefault(),h===4||h===-1)o(`/blog/search?q=${encodeURIComponent(l)}`);else if(h>=0&&i[h]){const P=i[h];o(`/blog/${P.categoryId}/${P.id}`)}p()}else q.key==="Escape"&&p()},[l,h,i,o,p]),y=l.trim().length>2,w=i.length>0;return m.jsxs(vf,{$hasResults:y,children:[y&&m.jsx(Ef,{onClick:p}),m.jsxs(bf,{children:[m.jsx(Sf,{type:"text",value:l,onChange:q=>f(q.target.value),onKeyDown:g,placeholder:e||n("search.placeholder")}),l&&m.jsx(Tf,{onClick:p,"aria-label":n("search.clear"),children:"×"})]}),y&&m.jsxs(xf,{children:[c&&m.jsx(Lr,{children:m.jsx("span",{children:n("search.searching")})}),!c&&u&&m.jsxs(Lr,{children:[m.jsx(ua,{children:"⚠️"}),m.jsx("strong",{children:n("search.error")}),m.jsx("span",{children:Uf(d,n("error.generic"))})]}),!c&&!u&&!w&&m.jsxs(Lr,{children:[m.jsx(ua,{children:"🔍"}),m.jsx("strong",{children:n("search.no_matches")}),m.jsx("span",{children:n("search.try_something_else")})]}),!c&&!u&&w&&i.slice(0,4).map((q,v)=>m.jsx(If,{$selected:v===h,onMouseEnter:()=>s(v),children:m.jsxs(Af,{to:`/blog/${q.categoryId}/${q.id}`,onClick:p,children:[m.jsx(Rf,{$image:q.image}),m.jsxs(Cf,{children:[m.jsx(_f,{dangerouslySetInnerHTML:{__html:q.highlightedTitle}}),m.jsx(Of,{dangerouslySetInnerHTML:{__html:q.highlightedDescription}})]})]})},q.id)),!c&&!u&&i.length>4&&m.jsx(kf,{$selected:h===4,onMouseEnter:()=>s(4),children:m.jsx(jf,{to:`/blog/search?q=${encodeURIComponent(l)}`,onClick:p,children:n("search.see_more_results")})})]})]})},{Link:Mf}=await O("react-router-dom"),{Box:ot,dclColors:Bf,styled:Ke}=await O("decentraland-ui2"),Hf="96px",Ff=Ke(ot,{shouldForwardProp:e=>e!=="$embedded"})(({$embedded:e})=>({width:"100%",...e&&{marginTop:Hf}})),Qf=Ke(ot)(({theme:e})=>({paddingTop:e.spacing(2),height:"84px",position:"relative",borderBottom:"1px solid",borderColor:e.palette.divider,display:"flex","@media (max-width: 1450px)":{height:"auto"}})),Gf=Ke(ot)(({theme:e})=>({display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",margin:"0 auto",padding:`0 ${e.spacing(3)}`,"@media (max-width: 1450px)":{flexDirection:"column-reverse",alignItems:"flex-start"}})),Wf=Ke(ot)(({theme:e})=>({overflowX:"auto",overflowY:"hidden",width:"auto","@media (max-width: 1450px)":{width:"100%",paddingBottom:e.spacing(1)}})).withComponent("nav"),zf=Ke(ot)(()=>({display:"flex",flexDirection:"row",listStyleType:"none",margin:0,padding:0,minWidth:"210px"})).withComponent("ul"),da=Ke(ot)(({theme:e})=>({marginRight:e.spacing(4),whiteSpace:"nowrap"})).withComponent("li"),ha=Ke(Mf,{shouldForwardProp:e=>e!=="$active"})(({theme:e,$active:t})=>({color:e.palette.text.primary,display:"flex",alignItems:"center",fontSize:"17px",fontWeight:t?700:400,height:"64px",padding:0,position:"relative",textDecoration:"none",WebkitTapHighlightColor:"transparent","&::after":{content:'""',position:"absolute",height:"1px",backgroundColor:Bf.base.primary,left:0,right:0,bottom:0,opacity:t?1:0,transition:"opacity 250ms ease"},"&:hover::after":{opacity:1}})),{useCallback:Vf,useMemo:Kf}=await O("react"),{useLocation:Yf}=await O("react-router-dom"),{useTranslation:Jf}=await O("@dcl/hooks"),fa=({active:e,embedded:t})=>{const{t:n}=Jf(),o=Yf(),{data:l=[]}=Il(),f=Kf(()=>l.filter(s=>s.isShownInMenu),[l]),h=Vf(s=>e?e==="all_articles"&&s==="/blog"?!0:`/blog/${e}`===s:o.pathname===s,[e,o.pathname]);return m.jsx(Ff,{$embedded:t,children:m.jsx(Qf,{children:m.jsxs(Gf,{children:[m.jsx(Wf,{children:m.jsxs(zf,{children:[m.jsx(da,{children:m.jsx(ha,{to:"/blog",$active:h("/blog")||e==="all_articles",children:n("blog.all_articles")})}),f.map(s=>m.jsx(da,{children:m.jsx(ha,{to:`/blog/${s.slug}`,$active:h(`/blog/${s.slug}`),children:s.title})},s.id))]})}),m.jsx(Nf,{})]})})})},{createContext:Xf,useContext:Ty}=await O("react"),Zf=Xf(!0),{Box:Go,styled:Wo}=await O("decentraland-ui2"),ep="66px",tp=Wo(Go)(()=>({minHeight:"100vh",display:"flex",flexDirection:"column",paddingTop:ep})),pa=Wo(Go)(({theme:e})=>({flex:1,padding:e.spacing(5,0,2,0),maxWidth:e.spacing(133),margin:"0 auto",[e.breakpoints.down("md")]:{padding:e.spacing(5,2,2,2)}})),{useCallback:ga,useContext:rp,useMemo:ma}=await O("react"),{useLocation:np}=await O("react-router-dom"),{useTokenBalance:ya}=await O("@dcl/core-web3"),{useWalletState:sp}=await O("@dcl/core-web3/lazy"),{usePageTracking:ap}=await O("@dcl/hooks"),{ChainId:Ht,Network:wa}=await O("@dcl/schemas"),{Footer:op,FooterLanding:ip,Navbar:cp,SupportedLanguage:up}=await O("decentraland-ui2"),Pa=In.is(Qt.PRODUCTION),qa=e=>{if(e===null)return;const t=Number(e);return Number.isFinite(t)?t:void 0};function de(e){const{children:t,activeCategory:n,banner:o,showBlogNavigation:l=!1,relatedPosts:f}=e,h=rp(Zf),s=np(),{address:r,isConnected:a,isConnecting:i,isDisconnecting:c,disconnect:d}=sp();ap(s.pathname);const{identity:u}=fh(),{notificationProps:p}=ch({identity:u,isConnected:a,locale:"en"}),{balance:g}=ya({tokenAddress:re("MANA_TOKEN_ADDRESS_ETHEREUM"),chainId:Pa?Ht.ETHEREUM_MAINNET:Ht.ETHEREUM_SEPOLIA}),{balance:y}=ya({tokenAddress:re("MANA_TOKEN_ADDRESS_MATIC"),chainId:Pa?Ht.MATIC_MAINNET:Ht.MATIC_AMOY}),{data:w}=pl(r??void 0,{skip:!r}),q=w?.avatars?.[0],v=ma(()=>{if(!a)return{};const C={},_=qa(g),I=qa(y);return _!==void 0&&(C[wa.ETHEREUM]=_),I!==void 0&&(C[wa.MATIC]=I),C},[a,g,y]),P=ga(()=>{Io()},[]),b=ga(()=>{d()},[d]),S=ma(()=>({activePage:"learn",isSignedIn:a,isSigningIn:i,isDisconnecting:c,address:r||void 0,avatar:q,manaBalances:v,notifications:p,onClickSignIn:P,onClickSignOut:b,onClickNavbarItem:C=>{const _=C.currentTarget;_?.href&&(window.location.href=_.href)}}),[a,i,c,r,q,v,p,P,b]);return h?m.jsxs(tp,{children:[m.jsx(cp,{...S}),l&&m.jsx(fa,{active:n}),o,m.jsx(pa,{children:t}),f,m.jsx(ip,{}),m.jsx(op,{languages:[{code:up.EN,name:"English",flag:"🇺🇸"}],hideSocialNetworks:!0})]}):m.jsxs(m.Fragment,{children:[l&&m.jsx(fa,{active:n,embedded:!0}),o,m.jsx(pa,{children:t}),f]})}function lp(e){return e&&typeof e=="object"&&"default"in e?e.default:e}var zo=Ba,dp=lp(zo);function va(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hp(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var fp=!!(typeof window<"u"&&window.document&&window.document.createElement);function pp(e,t,n){if(typeof e!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof t!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof n<"u"&&typeof n!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function o(l){return l.displayName||l.name||"Component"}return function(f){if(typeof f!="function")throw new Error("Expected WrappedComponent to be a React component.");var h=[],s;function r(){s=e(h.map(function(i){return i.props})),a.canUseDOM?t(s):n&&(s=n(s))}var a=function(i){hp(c,i);function c(){return i.apply(this,arguments)||this}c.peek=function(){return s},c.rewind=function(){if(c.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var p=s;return s=void 0,h=[],p};var d=c.prototype;return d.UNSAFE_componentWillMount=function(){h.push(this),r()},d.componentDidUpdate=function(){r()},d.componentWillUnmount=function(){var p=h.indexOf(this);h.splice(p,1),r()},d.render=function(){return dp.createElement(f,this.props)},c}(zo.PureComponent);return va(a,"displayName","SideEffect("+o(f)+")"),va(a,"canUseDOM",fp),a}}var gp=pp;const mp=It(gp);var yp=typeof Element<"u",wp=typeof Map=="function",Pp=typeof Set=="function",qp=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Xt(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,o,l;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(o=n;o--!==0;)if(!Xt(e[o],t[o]))return!1;return!0}var f;if(wp&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(f=e.entries();!(o=f.next()).done;)if(!t.has(o.value[0]))return!1;for(f=e.entries();!(o=f.next()).done;)if(!Xt(o.value[1],t.get(o.value[0])))return!1;return!0}if(Pp&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(f=e.entries();!(o=f.next()).done;)if(!t.has(o.value[0]))return!1;return!0}if(qp&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(o=n;o--!==0;)if(e[o]!==t[o])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(l=Object.keys(e),n=l.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,l[o]))return!1;if(yp&&e instanceof Element)return!1;for(o=n;o--!==0;)if(!((l[o]==="_owner"||l[o]==="__v"||l[o]==="__o")&&e.$$typeof)&&!Xt(e[l[o]],t[l[o]]))return!1;return!0}return e!==e&&t!==t}var vp=function(t,n){try{return Xt(t,n)}catch(o){if((o.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw o}};const Ep=It(vp);/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/var Ea=Object.getOwnPropertySymbols,bp=Object.prototype.hasOwnProperty,Sp=Object.prototype.propertyIsEnumerable;function Tp(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function xp(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var o=Object.getOwnPropertyNames(t).map(function(f){return t[f]});if(o.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(f){l[f]=f}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var Ip=xp()?Object.assign:function(e,t){for(var n,o=Tp(e),l,f=1;f<arguments.length;f++){n=Object(arguments[f]);for(var h in n)bp.call(n,h)&&(o[h]=n[h]);if(Ea){l=Ea(n);for(var s=0;s<l.length;s++)Sp.call(n,l[s])&&(o[l[s]]=n[l[s]])}}return o};const Ap=It(Ip),qt=await O("react");var We={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},B={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(B).map(function(e){return B[e]});var J={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src",TARGET:"target"},ir={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},xt={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},Rp=Object.keys(ir).reduce(function(e,t){return e[ir[t]]=t,e},{}),Cp=[B.NOSCRIPT,B.SCRIPT,B.STYLE],me="data-react-helmet",_p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Op=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},kp=function(){function e(t,n){for(var o=0;o<n.length;o++){var l=n[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,l.key,l)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),ce=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},jp=function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},ba=function(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n},Dp=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e},nn=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n===!1?String(t):String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},Lp=function(t){var n=tt(t,B.TITLE),o=tt(t,xt.TITLE_TEMPLATE);if(o&&n)return o.replace(/%s/g,function(){return Array.isArray(n)?n.join(""):n});var l=tt(t,xt.DEFAULT_TITLE);return n||l||void 0},$p=function(t){return tt(t,xt.ON_CHANGE_CLIENT_STATE)||function(){}},Ur=function(t,n){return n.filter(function(o){return typeof o[t]<"u"}).map(function(o){return o[t]}).reduce(function(o,l){return ce({},o,l)},{})},Up=function(t,n){return n.filter(function(o){return typeof o[B.BASE]<"u"}).map(function(o){return o[B.BASE]}).reverse().reduce(function(o,l){if(!o.length)for(var f=Object.keys(l),h=0;h<f.length;h++){var s=f[h],r=s.toLowerCase();if(t.indexOf(r)!==-1&&l[r])return o.concat(l)}return o},[])},ft=function(t,n,o){var l={};return o.filter(function(f){return Array.isArray(f[t])?!0:(typeof f[t]<"u"&&Hp("Helmet: "+t+' should be of type "Array". Instead found type "'+_p(f[t])+'"'),!1)}).map(function(f){return f[t]}).reverse().reduce(function(f,h){var s={};h.filter(function(d){for(var u=void 0,p=Object.keys(d),g=0;g<p.length;g++){var y=p[g],w=y.toLowerCase();n.indexOf(w)!==-1&&!(u===J.REL&&d[u].toLowerCase()==="canonical")&&!(w===J.REL&&d[w].toLowerCase()==="stylesheet")&&(u=w),n.indexOf(y)!==-1&&(y===J.INNER_HTML||y===J.CSS_TEXT||y===J.ITEM_PROP)&&(u=y)}if(!u||!d[u])return!1;var q=d[u].toLowerCase();return l[u]||(l[u]={}),s[u]||(s[u]={}),l[u][q]?!1:(s[u][q]=!0,!0)}).reverse().forEach(function(d){return f.push(d)});for(var r=Object.keys(s),a=0;a<r.length;a++){var i=r[a],c=Ap({},l[i],s[i]);l[i]=c}return f},[]).reverse()},tt=function(t,n){for(var o=t.length-1;o>=0;o--){var l=t[o];if(l.hasOwnProperty(n))return l[n]}return null},Np=function(t){return{baseTag:Up([J.HREF,J.TARGET],t),bodyAttributes:Ur(We.BODY,t),defer:tt(t,xt.DEFER),encode:tt(t,xt.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Ur(We.HTML,t),linkTags:ft(B.LINK,[J.REL,J.HREF],t),metaTags:ft(B.META,[J.NAME,J.CHARSET,J.HTTPEQUIV,J.PROPERTY,J.ITEM_PROP],t),noscriptTags:ft(B.NOSCRIPT,[J.INNER_HTML],t),onChangeClientState:$p(t),scriptTags:ft(B.SCRIPT,[J.SRC,J.INNER_HTML],t),styleTags:ft(B.STYLE,[J.CSS_TEXT],t),title:Lp(t),titleAttributes:Ur(We.TITLE,t)}},sn=function(){var e=Date.now();return function(t){var n=Date.now();n-e>16?(e=n,t(n)):setTimeout(function(){sn(t)},0)}}(),Sa=function(t){return clearTimeout(t)},Mp=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||sn:global.requestAnimationFrame||sn,Bp=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||Sa:global.cancelAnimationFrame||Sa,Hp=function(t){return console&&typeof console.warn=="function"&&console.warn(t)},pt=null,Fp=function(t){pt&&Bp(pt),t.defer?pt=Mp(function(){Ta(t,function(){pt=null})}):(Ta(t),pt=null)},Ta=function(t,n){var o=t.baseTag,l=t.bodyAttributes,f=t.htmlAttributes,h=t.linkTags,s=t.metaTags,r=t.noscriptTags,a=t.onChangeClientState,i=t.scriptTags,c=t.styleTags,d=t.title,u=t.titleAttributes;an(B.BODY,l),an(B.HTML,f),Qp(d,u);var p={baseTag:Ze(B.BASE,o),linkTags:Ze(B.LINK,h),metaTags:Ze(B.META,s),noscriptTags:Ze(B.NOSCRIPT,r),scriptTags:Ze(B.SCRIPT,i),styleTags:Ze(B.STYLE,c)},g={},y={};Object.keys(p).forEach(function(w){var q=p[w],v=q.newTags,P=q.oldTags;v.length&&(g[w]=v),P.length&&(y[w]=p[w].oldTags)}),n&&n(),a(t,g,y)},Vo=function(t){return Array.isArray(t)?t.join(""):t},Qp=function(t,n){typeof t<"u"&&document.title!==t&&(document.title=Vo(t)),an(B.TITLE,n)},an=function(t,n){var o=document.getElementsByTagName(t)[0];if(o){for(var l=o.getAttribute(me),f=l?l.split(","):[],h=[].concat(f),s=Object.keys(n),r=0;r<s.length;r++){var a=s[r],i=n[a]||"";o.getAttribute(a)!==i&&o.setAttribute(a,i),f.indexOf(a)===-1&&f.push(a);var c=h.indexOf(a);c!==-1&&h.splice(c,1)}for(var d=h.length-1;d>=0;d--)o.removeAttribute(h[d]);f.length===h.length?o.removeAttribute(me):o.getAttribute(me)!==s.join(",")&&o.setAttribute(me,s.join(","))}},Ze=function(t,n){var o=document.head||document.querySelector(B.HEAD),l=o.querySelectorAll(t+"["+me+"]"),f=Array.prototype.slice.call(l),h=[],s=void 0;return n&&n.length&&n.forEach(function(r){var a=document.createElement(t);for(var i in r)if(r.hasOwnProperty(i))if(i===J.INNER_HTML)a.innerHTML=r.innerHTML;else if(i===J.CSS_TEXT)a.styleSheet?a.styleSheet.cssText=r.cssText:a.appendChild(document.createTextNode(r.cssText));else{var c=typeof r[i]>"u"?"":r[i];a.setAttribute(i,c)}a.setAttribute(me,"true"),f.some(function(d,u){return s=u,a.isEqualNode(d)})?f.splice(s,1):h.push(a)}),f.forEach(function(r){return r.parentNode.removeChild(r)}),h.forEach(function(r){return o.appendChild(r)}),{oldTags:f,newTags:h}},Ko=function(t){return Object.keys(t).reduce(function(n,o){var l=typeof t[o]<"u"?o+'="'+t[o]+'"':""+o;return n?n+" "+l:l},"")},Gp=function(t,n,o,l){var f=Ko(o),h=Vo(n);return f?"<"+t+" "+me+'="true" '+f+">"+nn(h,l)+"</"+t+">":"<"+t+" "+me+'="true">'+nn(h,l)+"</"+t+">"},Wp=function(t,n,o){return n.reduce(function(l,f){var h=Object.keys(f).filter(function(a){return!(a===J.INNER_HTML||a===J.CSS_TEXT)}).reduce(function(a,i){var c=typeof f[i]>"u"?i:i+'="'+nn(f[i],o)+'"';return a?a+" "+c:c},""),s=f.innerHTML||f.cssText||"",r=Cp.indexOf(t)===-1;return l+"<"+t+" "+me+'="true" '+h+(r?"/>":">"+s+"</"+t+">")},"")},Yo=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce(function(o,l){return o[ir[l]||l]=t[l],o},n)},zp=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce(function(o,l){return o[Rp[l]||l]=t[l],o},n)},Vp=function(t,n,o){var l,f=(l={key:n},l[me]=!0,l),h=Yo(o,f);return[qt.createElement(B.TITLE,h,n)]},Kp=function(t,n){return n.map(function(o,l){var f,h=(f={key:l},f[me]=!0,f);return Object.keys(o).forEach(function(s){var r=ir[s]||s;if(r===J.INNER_HTML||r===J.CSS_TEXT){var a=o.innerHTML||o.cssText;h.dangerouslySetInnerHTML={__html:a}}else h[r]=o[s]}),qt.createElement(t,h)})},_e=function(t,n,o){switch(t){case B.TITLE:return{toComponent:function(){return Vp(t,n.title,n.titleAttributes)},toString:function(){return Gp(t,n.title,n.titleAttributes,o)}};case We.BODY:case We.HTML:return{toComponent:function(){return Yo(n)},toString:function(){return Ko(n)}};default:return{toComponent:function(){return Kp(t,n)},toString:function(){return Wp(t,n,o)}}}},Jo=function(t){var n=t.baseTag,o=t.bodyAttributes,l=t.encode,f=t.htmlAttributes,h=t.linkTags,s=t.metaTags,r=t.noscriptTags,a=t.scriptTags,i=t.styleTags,c=t.title,d=c===void 0?"":c,u=t.titleAttributes;return{base:_e(B.BASE,n,l),bodyAttributes:_e(We.BODY,o,l),htmlAttributes:_e(We.HTML,f,l),link:_e(B.LINK,h,l),meta:_e(B.META,s,l),noscript:_e(B.NOSCRIPT,r,l),script:_e(B.SCRIPT,a,l),style:_e(B.STYLE,i,l),title:_e(B.TITLE,{title:d,titleAttributes:u},l)}},Yp=function(t){var n,o;return o=n=function(l){jp(f,l);function f(){return Op(this,f),Dp(this,l.apply(this,arguments))}return f.prototype.shouldComponentUpdate=function(s){return!Ep(this.props,s)},f.prototype.mapNestedChildrenToProps=function(s,r){if(!r)return null;switch(s.type){case B.SCRIPT:case B.NOSCRIPT:return{innerHTML:r};case B.STYLE:return{cssText:r}}throw new Error("<"+s.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},f.prototype.flattenArrayTypeChildren=function(s){var r,a=s.child,i=s.arrayTypeChildren,c=s.newChildProps,d=s.nestedChildren;return ce({},i,(r={},r[a.type]=[].concat(i[a.type]||[],[ce({},c,this.mapNestedChildrenToProps(a,d))]),r))},f.prototype.mapObjectTypeChildren=function(s){var r,a,i=s.child,c=s.newProps,d=s.newChildProps,u=s.nestedChildren;switch(i.type){case B.TITLE:return ce({},c,(r={},r[i.type]=u,r.titleAttributes=ce({},d),r));case B.BODY:return ce({},c,{bodyAttributes:ce({},d)});case B.HTML:return ce({},c,{htmlAttributes:ce({},d)})}return ce({},c,(a={},a[i.type]=ce({},d),a))},f.prototype.mapArrayTypeChildrenToProps=function(s,r){var a=ce({},r);return Object.keys(s).forEach(function(i){var c;a=ce({},a,(c={},c[i]=s[i],c))}),a},f.prototype.warnOnInvalidChildren=function(s,r){return!0},f.prototype.mapChildrenToProps=function(s,r){var a=this,i={};return qt.Children.forEach(s,function(c){if(!(!c||!c.props)){var d=c.props,u=d.children,p=ba(d,["children"]),g=zp(p);switch(a.warnOnInvalidChildren(c,u),c.type){case B.LINK:case B.META:case B.NOSCRIPT:case B.SCRIPT:case B.STYLE:i=a.flattenArrayTypeChildren({child:c,arrayTypeChildren:i,newChildProps:g,nestedChildren:u});break;default:r=a.mapObjectTypeChildren({child:c,newProps:r,newChildProps:g,nestedChildren:u});break}}}),r=this.mapArrayTypeChildrenToProps(i,r),r},f.prototype.render=function(){var s=this.props,r=s.children,a=ba(s,["children"]),i=ce({},a);return r&&(i=this.mapChildrenToProps(r,i)),qt.createElement(t,i)},kp(f,null,[{key:"canUseDOM",set:function(s){t.canUseDOM=s}}]),f}(qt.Component),n.propTypes={base:$.object,bodyAttributes:$.object,children:$.oneOfType([$.arrayOf($.node),$.node]),defaultTitle:$.string,defer:$.bool,encodeSpecialCharacters:$.bool,htmlAttributes:$.object,link:$.arrayOf($.object),meta:$.arrayOf($.object),noscript:$.arrayOf($.object),onChangeClientState:$.func,script:$.arrayOf($.object),style:$.arrayOf($.object),title:$.string,titleAttributes:$.object,titleTemplate:$.string},n.defaultProps={defer:!0,encodeSpecialCharacters:!0},n.peek=t.peek,n.rewind=function(){var l=t.rewind();return l||(l=Jo({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),l},o},Jp=function(){return null},Xp=mp(Np,Fp,Jo)(Jp),on=Yp(Xp);on.renderStatic=on.rewind;var Oe=(e=>(e.WEBSITE="website",e.ARTICLE="article",e.PROFILE="profile",e))(Oe||{});const{useTranslation:Zp}=await O("@dcl/hooks"),eg="https://cms-images.decentraland.org/ea2ybdmmn1kv/7tYISdowuJYIbSIDqij87H/f3524d454d8e29702792a6b674f5550d/GI_Landscape.Small.png",Nr="Decentraland",tg="en_US",Ct=e=>{const{t}=Zp(),n={url:eg,width:1200,height:630,alt:t("seo.default_image_alt"),type:"image/jpeg"},{title:o,description:l,image:f=n,type:h=Oe.WEBSITE,url:s,locale:r=tg,author:a,publishedTime:i,modifiedTime:c,section:d,tags:u}=e,p=re("BLOG_BASE_URL")||"",g=o?`${o} | ${Nr}`:Nr,y=s||p,w=typeof f=="string"?{url:f}:f;return m.jsxs(on,{children:[m.jsx("title",{children:g}),m.jsx("meta",{name:"description",content:l}),m.jsx("link",{rel:"canonical",href:y}),m.jsx("meta",{property:"og:site_name",content:Nr}),m.jsx("meta",{property:"og:title",content:g}),m.jsx("meta",{property:"og:description",content:l}),m.jsx("meta",{property:"og:type",content:h}),m.jsx("meta",{property:"og:url",content:y}),m.jsx("meta",{property:"og:locale",content:r}),m.jsx("meta",{property:"og:image",content:w.url}),w.width&&m.jsx("meta",{property:"og:image:width",content:String(w.width)}),w.height&&m.jsx("meta",{property:"og:image:height",content:String(w.height)}),w.alt&&m.jsx("meta",{property:"og:image:alt",content:w.alt}),w.type&&m.jsx("meta",{property:"og:image:type",content:w.type}),m.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),m.jsx("meta",{name:"twitter:title",content:g}),m.jsx("meta",{name:"twitter:description",content:l}),m.jsx("meta",{name:"twitter:image",content:w.url}),w.alt&&m.jsx("meta",{name:"twitter:image:alt",content:w.alt}),h===Oe.ARTICLE&&a&&m.jsx("meta",{property:"article:author",content:a}),h===Oe.ARTICLE&&i&&m.jsx("meta",{property:"article:published_time",content:i}),h===Oe.ARTICLE&&c&&m.jsx("meta",{property:"article:modified_time",content:c}),h===Oe.ARTICLE&&d&&m.jsx("meta",{property:"article:section",content:d}),h===Oe.ARTICLE&&u?.map(q=>m.jsx("meta",{property:"article:tag",content:q},q))]})},{useCallback:rg,useEffect:xa,useMemo:ng,useRef:sg,useState:Ia}=await O("react"),{useInfiniteScroll:ag}=await O("@dcl/hooks"),og=7,Aa=6,ig=(e,t)=>Array.from({length:e},(n,o)=>({id:`placeholder-${t}-${o}`,isPlaceholder:!0}));function Gn({category:e,author:t}={}){const[n,o]=Ia(0),[l,f]=Ia(!1),h=sg(0),{data:s,isLoading:r,error:a,isFetching:i}=mo({category:e,author:t,limit:n===0?og:Aa,skip:n}),c=ng(()=>{const g=s?.posts??[];return l&&i?[...g,...ig(Aa,h.current)]:g},[s?.posts,l,i]),d=s?.hasMore??!0,u=r&&n===0;xa(()=>{o(0),f(!1),h.current=0},[e,t]),xa(()=>{i&&n>0?(h.current+=1,f(!0)):i||f(!1)},[i,n]);const p=rg(()=>{i||!d||!s||o(s.nextCmsSkip)},[i,d,s]);return ag({onLoadMore:p,hasMore:d,isLoading:i}),{posts:c,isLoading:r,isLoadingInitial:u,isFetching:i,hasMore:d,error:a}}const{Box:Xo,styled:Wn}=await O("decentraland-ui2"),cg=Wn(Xo)(({theme:e})=>({marginBottom:e.spacing(6),display:"flex",flexDirection:"column",alignItems:"left",gap:e.spacing(4)})),ug=Wn("img")(()=>({width:"150px",height:"150px",borderRadius:"50%",objectFit:"cover"})),cn=Wn(Xo)(({theme:e})=>({textAlign:"center",paddingTop:e.spacing(8),paddingBottom:e.spacing(8)})),{useParams:lg}=await O("react-router-dom"),{useTranslation:Zo}=await O("@dcl/hooks"),{CircularProgress:dg,Typography:Zt}=await O("decentraland-ui2"),hg=({author:e})=>{const{t}=Zo(),{posts:n,isLoadingInitial:o,error:l}=Gn({author:e.slug});return l?m.jsx(cn,{children:m.jsx(Zt,{color:"error",children:t("error.load_posts")})}):m.jsxs(m.Fragment,{children:[m.jsxs(cg,{children:[e.image&&m.jsx(ug,{src:e.image.url,alt:e.title}),m.jsx(Zt,{variant:"h5",children:e.title}),m.jsx(Zt,{variant:"body1",color:"textSecondary",children:e.description})]}),m.jsx(jn,{posts:n,loading:o,hasMainPost:!1})]})},xy=()=>{const{t:e}=Zo(),{authorSlug:t}=lg(),{data:n,isLoading:o,error:l}=Cl({slug:t||""}),f=re("BLOG_BASE_URL")||"";return l?m.jsx(de,{showBlogNavigation:!0,children:m.jsx(cn,{children:m.jsx(Zt,{color:"error",children:e("error.load_author")})})}):m.jsxs(de,{showBlogNavigation:!0,children:[m.jsx(Ct,{title:n?.title?e("blog.posts_by",{author:n.title}):void 0,description:n?.description||e("blog.default_description"),url:`${f}/author/${t}`,type:Oe.PROFILE,image:n?.image?{url:n.image.url,alt:n.title}:void 0}),o?m.jsx(cn,{children:m.jsx(dg,{})}):n?m.jsx(hg,{author:n},n.id):null]})},{Box:zn,styled:Vn}=await O("decentraland-ui2");Vn(zn)(({theme:e})=>({marginTop:e.spacing(6),display:"flex",justifyContent:"center"}));Vn(zn)(({theme:e})=>({display:"flex",justifyContent:"center",marginTop:e.spacing(6)}));const fg=Vn(zn)(({theme:e})=>({textAlign:"center",paddingTop:e.spacing(4),paddingBottom:e.spacing(4)})),{useMemo:pg}=await O("react"),{useTranslation:gg}=await O("@dcl/hooks"),{Typography:mg}=await O("decentraland-ui2"),Iy=()=>{const{t:e}=gg(),t=Ma(),{posts:n,isLoadingInitial:o,error:l}=Gn(),f=pg(()=>n.find(s=>!("isPlaceholder"in s)),[n]);return m.jsxs(de,{showBlogNavigation:!0,activeCategory:"all_articles",children:[m.jsx(Ct,{title:e("blog.title"),description:f?.description||e("blog.default_description"),image:f?.image?{url:f.image.url,width:f.image.width,height:f.image.height,alt:f.title}:void 0}),l?m.jsx(fg,{children:m.jsx(mg,{color:"error",children:e("error.load_posts")})}):m.jsx(jn,{posts:n,loading:o,hasMainPost:!t})]})},{Box:ei,Typography:yg,styled:Kn}=await O("decentraland-ui2"),wg=Kn(ei)(({theme:e,imageUrl:t})=>({backgroundImage:`linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url("${t}")`,backgroundSize:"cover",backgroundPosition:"center",width:"100%",height:"248px",display:"flex",alignItems:"center",justifyContent:"flex-start",marginBottom:e.spacing(6),[e.breakpoints.down("sm")]:{height:"180px",justifyContent:"center"}})),Pg=Kn(ei)(({theme:e})=>({textAlign:"left",color:e.palette.common.white,maxWidth:e.spacing(133),width:"100%",margin:"0 auto",padding:e.spacing(3),"& p":{fontSize:"18px",lineHeight:"28px",textShadow:"0 1px 2px rgba(0, 0, 0, 0.5)"},[e.breakpoints.down("sm")]:{textAlign:"center"}})),qg=Kn(yg)(({theme:e})=>({marginBottom:e.spacing(2),textShadow:"0 2px 4px rgba(0, 0, 0, 0.5)",[e.breakpoints.down("sm")]:{fontSize:e.typography.h4.fontSize,fontWeight:e.typography.h4.fontWeight,lineHeight:e.typography.h4.lineHeight}})),{memo:vg}=await O("react"),{Typography:Eg}=await O("decentraland-ui2"),bg=vg(e=>{const{category:t,description:n,image:o}=e;return m.jsx(wg,{imageUrl:o,children:m.jsxs(Pg,{children:[m.jsx(qg,{variant:"h3",children:t}),m.jsx(Eg,{variant:"body1",children:n})]})})}),{Box:Yn,styled:Jn}=await O("decentraland-ui2"),un=Jn(Yn)(({theme:e})=>({textAlign:"center",paddingTop:e.spacing(8),paddingBottom:e.spacing(8)}));Jn(Yn)(({theme:e})=>({display:"flex",justifyContent:"center",marginTop:e.spacing(6)}));Jn(Yn)(({theme:e})=>({display:"flex",justifyContent:"center",marginTop:e.spacing(6)}));const{useParams:Sg}=await O("react-router-dom"),{useTranslation:ti}=await O("@dcl/hooks"),{CircularProgress:Tg,Typography:ri}=await O("decentraland-ui2"),xg=({category:e})=>{const{t}=ti(),n=Ma(),{posts:o,isLoadingInitial:l,error:f}=Gn({category:e.slug});return f?m.jsx(un,{children:m.jsx(ri,{color:"error",children:t("error.load_posts")})}):m.jsx(jn,{posts:o,loading:l,hasMainPost:!n})},Ay=()=>{const{t:e}=ti(),{categorySlug:t}=Sg(),{data:n,isLoading:o,error:l}=Al({slug:t||""}),f=re("BLOG_BASE_URL")||"";return l?m.jsx(de,{showBlogNavigation:!0,activeCategory:t,children:m.jsx(un,{children:m.jsx(ri,{color:"error",children:e("error.load_category")})})}):m.jsxs(de,{showBlogNavigation:!0,activeCategory:t,banner:n?m.jsx(bg,{category:n.title,description:n.description,image:n.image.url}):void 0,children:[m.jsx(Ct,{title:n?.title,description:n?.description||e("blog.default_description"),url:`${f}/${t}`,image:n?.image?{url:n.image.url,width:n.image.width,height:n.image.height,alt:n.title}:void 0}),o?m.jsx(un,{children:m.jsx(Tg,{})}):n?m.jsx(xg,{category:n},n.id):null]})};var Xn={},Ig=Ai;Object.defineProperty(Xn,"__esModule",{value:!0});var ni=Xn.default=void 0;Cg(Ba);var Ag=Ig(Ii()),Rg=m;function si(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(si=function(o){return o?n:t})(e)}function Cg(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=si(t);if(n&&n.has(e))return n.get(e);var o={__proto__:null},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in e)if(f!=="default"&&Object.prototype.hasOwnProperty.call(e,f)){var h=l?Object.getOwnPropertyDescriptor(e,f):null;h&&(h.get||h.set)?Object.defineProperty(o,f,h):o[f]=e[f]}return o.default=e,n&&n.set(e,o),o}ni=Xn.default=(0,Ag.default)((0,Rg.jsx)("path",{d:"M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2m13 2h-2.5A3.5 3.5 0 0 0 12 8.5V11h-2v3h2v7h3v-7h3v-3h-3V9a1 1 0 0 1 1-1h2V5z"}),"Facebook");const{useDispatch:Ry,useSelector:_g}=await O("react-redux"),Og=_g,{Box:ai,Typography:kg,dclColors:jg,styled:yr}=await O("decentraland-ui2"),Dg=yr("section")(({theme:e})=>({backgroundColor:jg.neutral.softBlack2,paddingBottom:e.spacing(13),paddingTop:e.spacing(12),width:"100%"})),Lg=yr(ai)(({theme:e})=>({display:"flex",flexDirection:"column",gap:e.spacing(3),paddingLeft:e.spacing(2),paddingRight:e.spacing(2),width:"100%",maxWidth:e.spacing(136.875),margin:"0 auto"})),$g=yr(kg)(({theme:e})=>({...e.typography.h6,color:e.palette.text.primary})),Ug=yr(ai)(({theme:e})=>({display:"flex",flexWrap:"nowrap",justifyContent:"flex-start",gap:e.spacing(4),[e.breakpoints.down("xs")]:{justifyContent:"center",flexWrap:"wrap"}})),{memo:Ng}=await O("react"),{useTranslation:Mg}=await O("@dcl/hooks"),Bg=3,Hg=Ng(e=>{const{posts:t=[],loading:n=!1,maxItems:o=Bg}=e,l=t.slice(0,o),{t:f}=Mg();return n||l.length===0?null:m.jsx(Dg,{children:m.jsxs(Lg,{children:[m.jsx($g,{variant:"h6",children:f("blog.related_post")}),m.jsx(Ug,{children:l.map(h=>m.jsx(Jt,{post:h},h.id))})]})})});var Mr={exports:{}};/*!
|
|
6
|
+
* $script.js JS loader & dependency manager
|
|
7
|
+
* https://github.com/ded/script.js
|
|
8
|
+
* (c) Dustin Diaz 2014 | License MIT
|
|
9
|
+
*/var Ra;function Fg(){return Ra||(Ra=1,function(e){(function(t,n){e.exports?e.exports=n():this[t]=n()})("$script",function(){var t=document,n=t.getElementsByTagName("head")[0],o=!1,l="push",f="readyState",h="onreadystatechange",s={},r={},a={},i,c;function d(y,w){for(var q=0,v=y.length;q<v;++q)if(!w(y[q]))return o;return 1}function u(y,w){d(y,function(q){return w(q),1})}function p(y,w,q){y=y[l]?y:[y];var v=w&&w.call,P=v?w:q,b=v?y.join(""):w,S=y.length;function C(I){return I.call?I():s[I]}function _(){if(!--S){s[b]=1,P&&P();for(var I in r)d(I.split("|"),C)&&!u(r[I],C)&&(r[I]=[])}}return setTimeout(function(){u(y,function I(T,E){if(T===null)return _();if(!E&&!/^https?:\/\//.test(T)&&i&&(T=T.indexOf(".js")===-1?i+T+".js":i+T),a[T])return a[T]==2?_():setTimeout(function(){I(T,!0)},0);a[T]=1,g(T,_)})},0),p}function g(y,w){var q=t.createElement("script"),v;q.onload=q.onerror=q[h]=function(){q[f]&&!/^c|loade/.test(q[f])||v||(q.onload=q[h]=null,v=1,a[y]=2,w())},q.async=1,q.src=c?y+(y.indexOf("?")===-1?"?":"&")+c:y,n.insertBefore(q,n.lastChild)}return p.get=g,p.order=function(y,w,q){(function v(P){P=y.shift(),y.length?p(P,v):p(P,w,q)})()},p.path=function(y){i=y},p.urlArgs=function(y){c=y},p.ready=function(y,w,q){y=y[l]?y:[y];var v=[];return!u(y,function(P){s[P]||v[l](P)})&&d(y,function(P){return s[P]})?w():function(P){r[P]=r[P]||[],r[P][l](w),q&&q(v)}(y.join("|")),p},p.done=function(y){p([null],y)},p})}(Mr)),Mr.exports}const $e=await O("react");var Qg="https://platform.twitter.com/widgets.js",Br="createTweet",Gg=function(t){var n=$e.useRef(null),o=$e.useState(!0),l=o[0],f=o[1];return $e.useEffect(function(){var h=!0,s=Fg();return s(Qg,"twitter-embed",function(){if(!window.twttr){console.error("Failure to load window.twttr, aborting load");return}if(h){if(!window.twttr.widgets[Br]){console.error("Method "+Br+" is not present anymore in twttr.widget api");return}window.twttr.widgets[Br](t.tweetId,n?.current,t.options).then(function(r){f(!1),t.onLoad&&t.onLoad(r)})}}),function(){h=!1}},[]),$e.createElement($e.Fragment,null,l&&$e.createElement($e.Fragment,null,t.placeholder),$e.createElement("div",{ref:n}))};const{Link:Wg}=await O("react-router-dom"),{styled:ee}=await O("decentraland-ui2"),zg=ee("p")(({theme:e})=>({...e.typography.body1,lineHeight:2,letterSpacing:"-0.2px",marginTop:e.spacing(2.5),marginBottom:0})),Vg=ee("h1")(({theme:e})=>({...e.typography.h1,fontSize:e.typography.pxToRem(40),fontWeight:700,lineHeight:1.17,marginTop:0,paddingTop:e.spacing(1.375),marginBottom:0})),Kg=ee("h2")(({theme:e})=>({...e.typography.h2,fontSize:e.typography.pxToRem(32),fontWeight:700,lineHeight:1.17,marginTop:0,paddingTop:e.spacing(1.375),marginBottom:0})),Yg=ee("h3")(({theme:e})=>({...e.typography.h3,fontSize:e.typography.pxToRem(28),fontWeight:500,lineHeight:1.21,marginTop:e.spacing(8),marginBottom:0})),Jg=ee("h4")(({theme:e})=>({...e.typography.h4,fontSize:e.typography.pxToRem(24),lineHeight:1.2,letterSpacing:"0.3px",marginTop:e.spacing(4),marginBottom:0})),oi=ee("h5")(({theme:e})=>({...e.typography.h5,fontSize:e.typography.pxToRem(20),lineHeight:1.2,letterSpacing:"0.3px",marginTop:e.spacing(2),marginBottom:0})),Xg=ee(oi)(({theme:e})=>({fontSize:e.typography.pxToRem(18)})),Zg=ee("blockquote")(({theme:e})=>({borderLeft:"4px solid",borderColor:e.palette.primary.main,paddingLeft:e.spacing(2),marginTop:e.spacing(2),marginBottom:e.spacing(2),fontStyle:"italic"})),Ca=ee("img")(({theme:e})=>({maxWidth:"100%",marginTop:e.spacing(2),marginBottom:e.spacing(2)})),_a=ee("a")(({theme:e})=>({color:e.palette.primary.main,textDecoration:"none","&:hover":{color:e.palette.primary.dark}})),em=ee(Wg)(({theme:e})=>({color:e.palette.primary.main,textDecoration:"none","&:hover":{color:e.palette.primary.dark}})),tm=ee("iframe")(({theme:e})=>({height:760,width:560,border:`thin solid ${e.palette.divider}`,padding:e.spacing(.625),marginTop:e.spacing(2),marginBottom:e.spacing(2)})),rm=ee("div")(({theme:e})=>({marginTop:e.spacing(2),marginBottom:e.spacing(2)})),nm=ee("iframe")(({theme:e})=>({width:560,height:315,border:0,marginTop:e.spacing(2),marginBottom:e.spacing(2)})),sm=ee("iframe")(({theme:e})=>({width:400,height:480,border:0,marginTop:e.spacing(2),marginBottom:e.spacing(2)})),am=ee("li")(()=>({})),om=ee("ol")(({theme:e})=>({marginBottom:e.spacing(2)})),im=ee("ul")(({theme:e})=>({marginBottom:e.spacing(2)})),cm=e=>{const t=new URL(e),n=t.searchParams.has("v")?t.searchParams.get("v"):t.pathname.split("/").pop();return m.jsx(nm,{src:`https://www.youtube.com/embed/${n}`,title:"YouTube video player",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})},um=e=>{const t=e.split("/"),n=t[t.length-1].split("?")[0];return m.jsx(rm,{children:m.jsx(Gg,{tweetId:n,options:{theme:"dark"}})})},lm=e=>{let t;try{t=new URL(e)}catch{return null}const o=`https://www.instagram.com${t.pathname.endsWith("/")?t.pathname:`${t.pathname}/`}embed/`,l=e.includes("/reel/")?"Instagram Reel":"Instagram Post";return m.jsx(sm,{src:o,title:l,scrolling:"no",allowFullScreen:!0})},dm=(e,t)=>{const n=e.data?.target?.sys?.id;if(n&&t[n])return m.jsx(Ca,{src:t[n].url,alt:""});const o=e.data?.target?.fields?.file?.url;return o?m.jsx(Ca,{src:o.startsWith("//")?`https:${o}`:o,alt:""}):null},hm=e=>{const t=e.data.uri,o=e.content[0]?.value;if((t.includes("youtube.com")||t.includes("youtu.be"))&&o===t)return cm(t);if((t.includes("twitter.com")||t.includes("x.com"))&&o===t)return um(t);if(t.includes("instagram.com")&&o===t)try{if(new URL(t).hostname.endsWith("instagram.com"))return lm(t)}catch{}if(t.includes("linkedin.com")&&o===t)return m.jsx(tm,{src:t,title:"Embedded Linkedin Post"});const l=re("BLOG_BASE_URL")||"",f=t.startsWith(l),h=t.startsWith("#");if(f){const s=new URL(t,window.location.origin).pathname;return m.jsx(em,{to:s,children:o})}return h?m.jsx(_a,{href:t,target:"_self",children:o}):m.jsx(_a,{href:t,target:"_blank",rel:"noopener noreferrer",children:o})},{useMemo:fm}=await O("react"),pm=e=>({renderNode:{[oe.BLOCKS.PARAGRAPH]:(t,n)=>m.jsx(zg,{children:n}),[oe.BLOCKS.HEADING_1]:(t,n)=>m.jsx(Vg,{children:n}),[oe.BLOCKS.HEADING_2]:(t,n)=>m.jsx(Kg,{children:n}),[oe.BLOCKS.HEADING_3]:(t,n)=>m.jsx(Yg,{children:n}),[oe.BLOCKS.HEADING_4]:(t,n)=>m.jsx(Jg,{children:n}),[oe.BLOCKS.HEADING_5]:(t,n)=>m.jsx(oi,{children:n}),[oe.BLOCKS.HEADING_6]:(t,n)=>m.jsx(Xg,{children:n}),[oe.BLOCKS.UL_LIST]:(t,n)=>m.jsx(im,{children:n}),[oe.BLOCKS.OL_LIST]:(t,n)=>m.jsx(om,{children:n}),[oe.BLOCKS.LIST_ITEM]:(t,n)=>m.jsx(am,{children:n}),[oe.BLOCKS.QUOTE]:(t,n)=>m.jsx(Zg,{children:n}),[oe.BLOCKS.EMBEDDED_ASSET]:t=>dm(t,e),[oe.INLINES.HYPERLINK]:t=>hm(t)}}),ii=({document:e,assets:t={}})=>{if(!e||!e.content)return null;const n=fm(()=>pm(t),[t]);return m.jsx(m.Fragment,{children:Ci(e,n)})},{Link:ci}=await O("react-router-dom"),{Box:Be,Typography:_t,styled:Z}=await O("decentraland-ui2"),vt=Z(Be)(({theme:e})=>({textAlign:"center",paddingTop:e.spacing(8),paddingBottom:e.spacing(8)})),ui=Z(Be)(({theme:e})=>({maxWidth:e.spacing(96),width:"100%",margin:"0 auto",padding:0,[e.breakpoints.down("xs")]:{padding:`${e.spacing(4)} ${e.spacing(2)}`}})),li=Z(Be)(({theme:e})=>({marginBottom:e.spacing(5)})),di=Z(_t)(({theme:e})=>({...e.typography.caption,color:e.palette.text.primary,letterSpacing:e.typography.caption.letterSpacing,textTransform:"uppercase",display:"flex",alignItems:"center",gap:e.spacing(1)})),hi=Z("span")(({theme:e})=>({color:e.palette.text.secondary})),gm=Z(ci)(({theme:e})=>({color:"#5c5c6e",textDecoration:"none",WebkitTapHighlightColor:"transparent","&:hover":{textDecoration:"underline"},"&:focus-visible":{outline:`2px solid ${e.palette.primary.main}`,outlineOffset:2}})),fi=Z(Be)(({theme:e})=>({marginTop:e.spacing(1.5)})),pi=Z(_t)(({theme:e})=>({color:e.palette.text.primary})),gi=Z(_t)(({theme:e})=>({color:e.palette.text.primary,marginTop:e.spacing(1)})),mi=Z("img")(({theme:e})=>({width:"100%",height:"auto",borderRadius:e.spacing(2),marginBottom:e.spacing(5),objectFit:"cover",backgroundColor:e.palette.background.paper})),yi=Z(Be)(()=>({})),mm=Z(Be)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:e.spacing(5)})),ym=Z(ci)(({theme:e})=>({display:"inline-flex",alignItems:"center",gap:e.spacing(2),textDecoration:"none",color:e.palette.text.primary,WebkitTapHighlightColor:"transparent","&:focus-visible":{outline:`2px solid ${e.palette.primary.main}`,outlineOffset:2}})),wi=Z("img")(({theme:e})=>({width:e.spacing(4),height:e.spacing(4),borderRadius:"50%",objectFit:"cover",backgroundColor:e.palette.background.default})),Pi=Z(_t)(({theme:e})=>({...e.typography.body1,color:e.palette.text.primary})),qi=Z(Be)(()=>({})),wm=Z(Be)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1.5)})),Pm=Z(_t)(({theme:e})=>({...e.typography.caption,color:e.palette.text.secondary,textTransform:"uppercase"})),Oa=Z("a")(({theme:e})=>({display:"inline-flex",alignItems:"center",color:e.palette.text.secondary,textDecoration:"none","&:hover":{color:e.palette.text.primary},"&:focus-visible":{outline:`2px solid ${e.palette.primary.main}`,outlineOffset:2}})),{useMemo:Hr}=await O("react"),{useParams:qm}=await O("react-router-dom"),{useTranslation:vm}=await O("@dcl/hooks"),{CircularProgress:Em,Typography:bm}=await O("decentraland-ui2"),vi=3,Sm=10,Tm=vi*Sm,Cy=()=>{const{t:e}=vm(),{categorySlug:t,postSlug:n}=qm(),o=Og(g=>{for(const y of Object.values(g.cmsClient.queries))if(y?.endpointName==="getBlogPosts"&&y.status==="fulfilled"&&y.data){const q=y.data.posts.find(v=>v.category.slug===t&&v.slug===n);if(q)return q}return null}),{data:l,isLoading:f,error:h}=Rl({categorySlug:t||"",postSlug:n||""},{skip:!!o}),s=Hr(()=>o||l,[o,l]),{data:r,isLoading:a}=mo({category:s?.category.id,limit:Tm,skip:0},{skip:!s?.category.id}),i=Hr(()=>!r?.posts||!s?[]:r.posts.filter(g=>g.id!==s.id),[s,r?.posts]),c=Hr(()=>Rn(s?.publishedDate),[s?.publishedDate]),d=s?.author,u=!!d&&!!d.title,p=re("BLOG_BASE_URL")||"";return f&&!o?m.jsx(de,{showBlogNavigation:!0,activeCategory:t,children:m.jsx(vt,{children:m.jsx(Em,{})})}):h||!s?m.jsx(de,{showBlogNavigation:!0,activeCategory:t,children:m.jsx(vt,{children:m.jsx(bm,{color:"error",children:e("error.load_post")})})}):m.jsxs(de,{showBlogNavigation:!0,activeCategory:t,relatedPosts:m.jsx(Hg,{posts:i,loading:a,maxItems:vi}),children:[m.jsx(Ct,{title:s?.title,description:s?.description||e("blog.default_description"),url:s?`${p}/${t}/${n}`:p,type:Oe.ARTICLE,image:s?.image?{url:s.image.url,width:s.image.width,height:s.image.height,alt:s.title}:void 0,author:d?.title,publishedTime:s?.publishedDate,section:s?.category.title,tags:s?.category.title?[s.category.title]:void 0}),m.jsxs(ui,{children:[m.jsx(mi,{src:s.image.url,alt:s.title}),m.jsxs(li,{children:[m.jsxs(di,{as:"span",children:[c,m.jsx(hi,{children:"•"}),m.jsx(gm,{to:ke.category(s.category.slug),children:s.category.title})]}),m.jsx(fi,{children:m.jsx(pi,{variant:"h4",children:s.title})}),m.jsx(gi,{variant:"h6",children:s.description})]}),u&&m.jsxs(mm,{children:[m.jsx(yi,{children:m.jsxs(ym,{to:d.url,children:[d.image?.url&&m.jsx(wi,{src:d.image.url,alt:d.title}),m.jsx(Pi,{variant:"body2",children:d.title})]})}),m.jsxs(wm,{children:[m.jsx(Pm,{children:e("blog.share")}),m.jsx(Oa,{href:ke.twitter(s),target:"_blank",rel:"noopener noreferrer",children:m.jsx(Ri,{fontSize:"small"})}),m.jsx(Oa,{href:ke.facebook(s),target:"_blank",rel:"noopener noreferrer",children:m.jsx(ni,{fontSize:"small"})})]})]}),m.jsx(qi,{children:m.jsx(ii,{document:s.body,assets:s.bodyAssets})})]})]})},{Box:Ei,styled:Zn}=await O("decentraland-ui2"),xm=Zn(Ei)(({theme:e})=>({display:"inline-flex",alignItems:"center",gap:e.spacing(2)})),Im=Zn("span")(()=>({color:"#5c5c6e"})),Am=Zn(Ei)(({theme:e})=>({backgroundColor:e.palette.warning.main,color:e.palette.warning.contrastText,padding:e.spacing(2),borderRadius:e.spacing(1),maxWidth:e.spacing(96),margin:`0 auto ${e.spacing(4)}`,[e.breakpoints.down("xs")]:{margin:`0 ${e.spacing(2)} ${e.spacing(4)}`}})),{useMemo:ka}=await O("react"),{useSearchParams:Rm}=await O("react-router-dom"),{useTranslation:Cm}=await O("@dcl/hooks"),{CircularProgress:_m,Typography:Ft}=await O("decentraland-ui2"),Om="https://preview.contentful.com",km="ea2ybdmmn1kv",_y=()=>{const{t:e}=Cm(),[t]=Rm(),n=ka(()=>({id:t.get("contentful_id")??"",env:t.get("contentful_env")??"",token:t.get("token")??"",previewBaseUrl:Om,spaceId:km}),[t]),o=n.id&&n.env&&n.token,{data:l,isLoading:f,error:h}=_l(n,{skip:!o}),s=ka(()=>Rn(l?.publishedDate),[l?.publishedDate]),r=l?.author,a=!!r&&!!r.title;return o?f?m.jsx(de,{showBlogNavigation:!0,children:m.jsx(vt,{children:m.jsx(_m,{})})}):h||!l?m.jsx(de,{showBlogNavigation:!0,children:m.jsx(vt,{children:m.jsx(Ft,{color:"error",children:e("error.load_preview")})})}):m.jsxs(de,{showBlogNavigation:!0,children:[m.jsxs(Am,{children:[m.jsx(Ft,{variant:"h6",children:e("preview.mode")}),m.jsx(Ft,{variant:"body2",children:e("preview.description")})]}),m.jsxs(ui,{children:[m.jsx(mi,{src:l.image.url,alt:l.title}),m.jsxs(li,{children:[m.jsxs(di,{as:"span",children:[s,m.jsx(hi,{children:"•"}),m.jsx(Im,{children:l.category.title})]}),m.jsx(fi,{children:m.jsx(pi,{variant:"h4",children:l.title})}),m.jsx(gi,{variant:"h6",children:l.description})]}),a&&m.jsx(yi,{children:m.jsxs(xm,{children:[r.image?.url&&m.jsx(wi,{src:r.image.url,alt:r.title}),m.jsx(Pi,{variant:"body2",children:r.title})]})}),m.jsx(qi,{children:m.jsx(ii,{document:l.body,assets:l.bodyAssets})})]})]}):m.jsx(de,{showBlogNavigation:!0,children:m.jsx(vt,{children:m.jsx(Ft,{color:"error",children:e("preview.missing_params")})})})},{Box:es,Skeleton:wr,Typography:bi,styled:Ae}=await O("decentraland-ui2"),ja=Ae(es)(({theme:e})=>({margin:e.spacing(0,0,2),listStyleType:"none",flexGrow:1,borderRadius:e.spacing(1),backgroundColor:e.palette.background.paper,border:"transparent",position:"relative",display:"flex",alignItems:"flex-start",transition:"transform 250ms ease, box-shadow 250ms ease",boxShadow:e.shadows[1],height:"150px","& > a":{display:"flex",width:"100%",height:"100%",textDecoration:"none"},"&:hover":{transform:"translate(0, -4px)",boxShadow:e.shadows[2]},[e.breakpoints.down("sm")]:{height:"100px"}})),Da=Ae(es)(()=>({display:"flex",width:"100%",height:"100%"})),jm=Ae("img")(({theme:e})=>({flexShrink:0,width:"232px",height:"100%",objectFit:"cover",borderRadius:`${e.shape.borderRadius}px 0 0 ${e.shape.borderRadius}px`,[e.breakpoints.down("sm")]:{width:"33%"}})),La=Ae(es)(({theme:e})=>({padding:e.spacing(2.75,2.5,3,2.5),width:"100%",display:"flex",flexDirection:"column",justifyContent:"flex-start",overflow:"hidden","& em":{fontStyle:"normal",fontWeight:700,color:e.palette.primary.main},[e.breakpoints.down("sm")]:{padding:e.spacing(1.75)}})),Dm=Ae(bi)(({theme:e})=>({margin:`0 0 ${e.spacing(.5)}`,fontSize:e.typography.pxToRem(20),lineHeight:"28px",fontWeight:500,color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",[e.breakpoints.down("sm")]:{fontSize:e.typography.pxToRem(15),lineHeight:"18px"}})),Lm=Ae(bi)(({theme:e})=>({lineHeight:"24px",padding:0,margin:0,fontSize:e.typography.pxToRem(15),color:e.palette.text.secondary,textAlign:"left",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",[e.breakpoints.down("sm")]:{display:"none"}})),$m=Ae(wr)(({theme:e})=>({width:"232px",height:"100%",borderRadius:`${e.shape.borderRadius}px 0 0 ${e.shape.borderRadius}px`,flexShrink:0,[e.breakpoints.down("sm")]:{width:"33%"}})),Um=Ae(wr)(({theme:e})=>({width:"80%",height:e.spacing(3.5),marginBottom:e.spacing(1)})),Nm=Ae(wr)(({theme:e})=>({width:"100%",height:e.spacing(3),[e.breakpoints.down("sm")]:{display:"none"}})),Mm=Ae(wr)(({theme:e})=>({width:"60%",height:e.spacing(3),[e.breakpoints.down("sm")]:{display:"none"}})),{Link:Bm}=await O("react-router-dom"),Fr=e=>{const{result:t,loading:n}=e;return n?m.jsx(ja,{children:m.jsxs(Da,{children:[m.jsx($m,{variant:"rectangular"}),m.jsxs(La,{children:[m.jsx(Um,{variant:"text"}),m.jsx(Nm,{variant:"text"}),m.jsx(Mm,{variant:"text"})]})]})}):t?m.jsx(ja,{children:m.jsx(Bm,{to:t.url,children:m.jsxs(Da,{children:[t.image&&m.jsx(jm,{src:t.image,alt:""}),m.jsxs(La,{children:[m.jsx(Dm,{dangerouslySetInnerHTML:{__html:t.title}}),m.jsx(Lm,{dangerouslySetInnerHTML:{__html:t.description}})]})]})})}):null},{Box:Pr,Typography:Hm,styled:Ot}=await O("decentraland-ui2"),Fm=Ot(Hm)(({theme:e})=>({margin:e.spacing(4.5,0,3),...e.typography.h4,fontWeight:400,padding:e.spacing(0,2),"& span":{fontWeight:700}})),Qm=Ot(Pr)(({theme:e})=>({marginBottom:e.spacing(3)})),Gm=Ot(Pr)(({theme:e})=>({textAlign:"center",paddingTop:e.spacing(4),paddingBottom:e.spacing(4)})),Qr=Ot(Pr)(()=>({display:"flex",flexDirection:"column"})),Wm=Ot(Pr)(({theme:e})=>({display:"flex",justifyContent:"center",marginTop:e.spacing(4)})),{useEffect:$a,useMemo:zm,useState:Ua}=await O("react"),{useSearchParams:Vm}=await O("react-router-dom"),{useTranslation:Km}=await O("@dcl/hooks"),{Button:Ym,Typography:Na}=await O("decentraland-ui2"),Jm=10,Oy=()=>{const{t:e}=Km(),[t]=Vm(),[n,o]=Ua(0),[l,f]=Ua([]),h=zm(()=>t.get("q")||"",[t]),{data:s,isLoading:r,isFetching:a}=Pf({query:h,hitsPerPage:Jm,page:n},{skip:h.length<3});$a(()=>{o(0),f([])},[h]),$a(()=>{s?.results&&f(n===0?s.results:w=>[...w,...s.results])},[s,n]);const i=()=>{o(w=>w+1),setTimeout(()=>window.scrollBy({top:500,left:0,behavior:"smooth"}),0)},c=l.length>0,d=!r&&h.length>=3&&l.length===0&&s?.results.length===0,u=r&&l.length===0,p=s?.hasMore??!1,g=h?e("search.description_with_query",{query:h}):e("search.description"),y=re("BLOG_BASE_URL")||"";return m.jsxs(de,{showBlogNavigation:!0,children:[m.jsx(Ct,{title:h?e("search.title_with_query",{query:h}):e("search.title"),description:g,url:h?`${y}/search?q=${encodeURIComponent(h)}`:`${y}/search`}),h.length>=3&&m.jsx(Qm,{children:m.jsxs(Fm,{children:[e("search.results_for")," ",m.jsxs("span",{children:["“",h,"”"]})]})}),u&&m.jsx(Qr,{children:Array.from({length:5},(w,q)=>m.jsx(Fr,{loading:!0},q))}),c&&m.jsx(Qr,{children:l.map((w,q)=>m.jsx(Fr,{result:w},`${w.url}-${q}`))}),a&&!r&&m.jsx(Qr,{children:Array.from({length:3},(w,q)=>m.jsx(Fr,{loading:!0},`loading-more-${q}`))}),p&&c&&!a&&m.jsx(Wm,{children:m.jsx(Ym,{variant:"contained",onClick:i,children:e("blog.load_more")})}),d&&m.jsxs(Gm,{children:[m.jsx(Na,{variant:"h5",gutterBottom:!0,children:e("blog.nothing_to_show")}),m.jsxs(Na,{color:"textSecondary",children:[e("search.no_results_for")," “",h,"”"]})]})]})},{useEffect:Xm}=await O("react");function ky(){return Xm(()=>{Io()},[]),null}export{xy as A,Iy as B,Ay as C,xc as P,Zf as S,Pt as a,xl as b,_y as c,Oy as d,by as e,ky as f,Cy as g,re as h,vy as i,qy as p,iy as s,Ey as w};
|