@dcl/builder-site 7.14.4-19500651590.commit-4962afd → 7.15.1-19538849409.commit-d14b139
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/Back-ZsLUVy1g.js +1 -0
- package/assets/CollectionProvider.container-uJr3lZil.js +1 -0
- package/assets/{CollectionStatus.container-SecVXoKZ.js → CollectionStatus.container-9X5IoOn5.js} +1 -1
- package/assets/{ConfirmDelete-8N9eX1ru.js → ConfirmDelete-CA2L-Skf.js} +1 -1
- package/assets/{FileSaver.min-D7RIIP64.js → FileSaver.min-ZuWif8aZ.js} +1 -1
- package/assets/ItemProvider.container-CjGDZDff.js +2 -0
- package/assets/JumpIn.container-CdyIdr0_.js +1 -0
- package/assets/LandAction-DziYppMO.js +1 -0
- package/assets/LandProviderPage-D2QKDdZY.js +1 -0
- package/assets/{LoggedInDetailPage.container-BLLfFAse.js → LoggedInDetailPage.container-Csb5m2_j.js} +1 -1
- package/assets/{Navigation-pnQrAplR.css → Navigation-eWzTCzeF.css} +1 -1
- package/assets/Navigation.container-y4FFd-GN.js +1 -0
- package/assets/{NotFound-BTo5pEaG.js → NotFound-B7VCcIXy.js} +1 -1
- package/assets/OptionsDropdown-jZL_--46.js +1 -0
- package/assets/{RentalPeriod-DiTpnn81.js → RentalPeriod-JAWHxlYW.js} +1 -1
- package/assets/{SDKTag-B1AaBZZp.js → SDKTag-Ccjd_z9v.js} +1 -1
- package/assets/SceneStats.container-DmnFSI1C.js +1 -0
- package/assets/{SignInRequired-cMu1CrC_.js → SignInRequired-mtEpLI08.js} +1 -1
- package/assets/{ThirdPartyKindBadge-85NbLCqg.js → ThirdPartyKindBadge-BACCwzlv.js} +1 -1
- package/assets/{dataReader-J2q5Wk51.js → dataReader-D-o5nsUo.js} +1 -1
- package/assets/{date-C90QIauR.js → date-CsB_aCW0.js} +1 -1
- package/assets/{fortmatic-B5_sXpTq.js → fortmatic-D4y5YugR.js} +1 -1
- package/assets/hooks-rT1rGpek.js +1 -0
- package/assets/{index-DmE6V3G4.js → index-9waCOWHc.js} +1 -1
- package/assets/{index-Bw-h-gaz.css → index-B1GtOexf.css} +1 -1
- package/assets/{index-CflCMh4p.js → index-B30X9lMN.js} +2 -2
- package/assets/index-B6XLgvpo.js +1 -0
- package/assets/{index-LbPj94fr.js → index-BBiC05k5.js} +257 -255
- package/assets/{index-C1EVXuav.css → index-BDxYXeoz.css} +7 -7
- package/assets/{index-D1LVGfhr.js → index-BESMP50y.js} +1 -1
- package/assets/{index-s99GEmyW.js → index-BG9Rx1U6.js} +1 -1
- package/assets/{index-Cd58ce0H.css → index-BJgoLxg7.css} +1 -1
- package/assets/{index-DXqNJi0c.css → index-BKWi0PSU.css} +1 -1
- package/assets/index-BcpMC6BP.js +1 -0
- package/assets/{index-DmfVh-eI.js → index-BsLVze0k.js} +1 -1
- package/assets/{index-3ivXi3H6.css → index-BuGCLIl3.css} +1 -1
- package/assets/index-BvhKSuJT.js +1 -0
- package/assets/{index-Dddu1BYO.css → index-C6_Jw0GT.css} +1 -1
- package/assets/index-C86jF4fj.js +1 -0
- package/assets/index-CBEoZ1C5.js +1 -0
- package/assets/index-CFPn78iZ.js +1 -0
- package/assets/index-CHCtkrrc.js +1 -0
- package/assets/index-CLiJemZp.js +1 -0
- package/assets/{index-y3QMYVxY.js → index-CNfheHgy.js} +4 -4
- package/assets/index-CUismusC.js +1 -0
- package/assets/{index-B8mjr01h.js → index-ChnEfxMB.js} +1 -1
- package/assets/{index-CKyzF9VZ.js → index-CiUz0f2N.js} +1 -1
- package/assets/{index-BpZF6T44.js → index-CtH3hFX_.js} +2 -2
- package/assets/index-Cwmdw4c5.js +1 -0
- package/assets/index-D0PsfRHY.js +1 -0
- package/assets/{index-BaBcvmM1.js → index-D1dU8-cU.js} +1 -1
- package/assets/index-D2rBduXA.js +1 -0
- package/assets/index-D7EGMc15.js +1 -0
- package/assets/index-DAZ-2oN-.js +1 -0
- package/assets/index-DDX8N02a.js +1 -0
- package/assets/index-DGFNkzIy.js +1 -0
- package/assets/index-DJ2opjyW.js +1 -0
- package/assets/{index-DuO-zVHz.css → index-DMY-09Tv.css} +1 -1
- package/assets/index-DMztfj0E.js +1 -0
- package/assets/{index-CJm4yYRA.css → index-DPrPIr3D.css} +1 -1
- package/assets/{index-CIoA4Sd_.js → index-D_tl6Ti0.js} +1 -1
- package/assets/{index-BBq_p2Jh.js → index-Da4B3df5.js} +1 -1
- package/assets/{index-CBnSo8Zh.js → index-DkDkxZiN.js} +1 -1
- package/assets/index-DqZFkwT9.js +1 -0
- package/assets/index-DqwtLHAm.js +1 -0
- package/assets/{index-Lx6kdj9H.js → index-G1xGAAUL.js} +1 -1
- package/assets/{index-DV7YxGZN.js → index-PWgjRNFR.js} +1 -1
- package/assets/index-QSs3tcP6.js +1 -0
- package/assets/index-R4aipHOZ.js +1 -0
- package/assets/{index-BItWASwT.js → index-VdUBAH6Y.js} +1 -1
- package/assets/index-dF2xsorm.js +1 -0
- package/assets/index-dLNC7ZA9.js +1 -0
- package/assets/{index-DTuQuNzL.js → index-irJlF35K.js} +1 -1
- package/assets/{index.es-BM4hfwnw.js → index.es-Bc2cr_c-.js} +4 -4
- package/assets/selectors-B801NyQF.js +1 -0
- package/index.html +3 -3
- package/package.json +3 -3
- package/assets/Back-qfVBk6YN.js +0 -1
- package/assets/CollectionProvider.container-Dz4kU__V.js +0 -1
- package/assets/ItemProvider.container-BtouewED.js +0 -1
- package/assets/JumpIn.container-va_LyMbu.js +0 -1
- package/assets/LandAction-CUgZ-nVw.js +0 -1
- package/assets/LandProviderPage-D194_isC.js +0 -1
- package/assets/Navigation.container-m_5Xay6X.js +0 -1
- package/assets/OptionsDropdown-Dkcmv78a.js +0 -1
- package/assets/SceneStats.container-gb6NrI8H.js +0 -1
- package/assets/hooks-B-YhDlyt.js +0 -1
- package/assets/index--eP8RdN-.js +0 -1
- package/assets/index-4S3D4LaD.js +0 -1
- package/assets/index-B2y05o7K.js +0 -1
- package/assets/index-B9la4WTD.js +0 -1
- package/assets/index-BGOe_558.js +0 -1
- package/assets/index-BGbyjzTe.js +0 -1
- package/assets/index-BGrJJYrs.js +0 -1
- package/assets/index-Bc3TZncd.js +0 -1
- package/assets/index-Bl5LC4b1.js +0 -1
- package/assets/index-C1clPxBD.js +0 -1
- package/assets/index-CFPRYeOi.js +0 -1
- package/assets/index-CHuI3qPX.js +0 -1
- package/assets/index-CO7NEMGF.js +0 -1
- package/assets/index-CgXwvFq0.js +0 -1
- package/assets/index-Ci5vJnfQ.js +0 -1
- package/assets/index-CztsBLiJ.js +0 -1
- package/assets/index-DLuf0EV2.js +0 -1
- package/assets/index-D_fzj-h4.js +0 -1
- package/assets/index-DdHxFx5i.js +0 -1
- package/assets/index-DztvhgAB.js +0 -1
- package/assets/index-G58uvV_v.js +0 -1
- package/assets/index-Nu8JUQec.js +0 -1
- package/assets/index-ocFbUjKw.js +0 -1
- package/assets/index-poJQMTAu.js +0 -1
- package/assets/selectors-CSnw6goy.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bq as d,br as u,aR as o,bs as L}from"./index-BBiC05k5.js";const f=n=>typeof n=="object"&&n!==null&&"en-US"in n,i=n=>n.campaign,s=n=>i(n).data,b=n=>i(n).loading,y=n=>i(n).error,T=n=>d(b(n),u),U=n=>{var e;return(e=s(n))==null?void 0:e.mainTag},z=n=>{var e;return((e=s(n))==null?void 0:e.name)||null},m=n=>{var e;return((e=s(n))==null?void 0:e.assets)||null},S=(n,e)=>{var t;return((t=s(n))==null?void 0:t.banners[e])??null},A=(n,e)=>{const t=m(n),r=S(n,e);return r?Object.entries(r).reduce((c,[p,g])=>{if(f(g)){const a=g["en-US"];if(o.isSysLink(a)){const l=t==null?void 0:t[a.sys.id];l&&(c[a.sys.id]=l)}}return c},{}):{}},E=n=>{const e=L(n);return["en","zh","es"].includes(e)?e==="en"?o.ContentfulLocale.enUS:e:o.ContentfulLocale.enUS};export{A as a,y as b,E as c,U as d,z as e,S as g,T as i};
|
package/index.html
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<meta itemprop="image" content="https://decentraland.org/images/logo.png" />
|
|
33
33
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
|
34
34
|
<meta name="theme-color" content="#000000" />
|
|
35
|
-
<link rel="manifest" href="https://cdn.decentraland.org/@dcl/builder-site/7.
|
|
35
|
+
<link rel="manifest" href="https://cdn.decentraland.org/@dcl/builder-site/7.15.1-19538849409.commit-d14b139/manifest.json" />
|
|
36
36
|
|
|
37
37
|
<style>
|
|
38
38
|
.loading-overlay {
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
</style>
|
|
72
72
|
|
|
73
73
|
<title>Builder | Decentraland</title>
|
|
74
|
-
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/builder-site/7.
|
|
75
|
-
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/builder-site/7.
|
|
74
|
+
<script type="module" crossorigin src="https://cdn.decentraland.org/@dcl/builder-site/7.15.1-19538849409.commit-d14b139/assets/index-BBiC05k5.js"></script>
|
|
75
|
+
<link rel="stylesheet" crossorigin href="https://cdn.decentraland.org/@dcl/builder-site/7.15.1-19538849409.commit-d14b139/assets/index-BDxYXeoz.css">
|
|
76
76
|
</head>
|
|
77
77
|
<body class="dcl-loading">
|
|
78
78
|
<div id="load-messages-wrapper"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/builder-site",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.15.1-19538849409.commit-d14b139",
|
|
4
4
|
"description": "Builder website",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
"type": "git",
|
|
14
14
|
"url": "https://github.com/decentraland/builder.git"
|
|
15
15
|
},
|
|
16
|
-
"homepage": "https://cdn.decentraland.org/@dcl/builder-site/7.
|
|
17
|
-
"commit": "
|
|
16
|
+
"homepage": "https://cdn.decentraland.org/@dcl/builder-site/7.15.1-19538849409.commit-d14b139",
|
|
17
|
+
"commit": "d14b1398b77b369624f7e9dadb5ef1e62009b6c2"
|
|
18
18
|
}
|
package/assets/Back-qfVBk6YN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Z as i,D as r,H as e,M as m}from"./index-LbPj94fr.js";const l="_main_mqj5n_1",k={main:l};function x(t){const{onClick:a,absolute:o,...n}=t,s=i(),c=r.useCallback(()=>{s.goBack()},[s]);return e.jsx(m.Back,{...n,className:k.main,onClick:s.length&&!o?c:a})}export{x as B};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var D=Object.defineProperty;var O=(C,a,e)=>a in C?D(C,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):C[a]=e;var A=(C,a,e)=>O(C,typeof a!="symbol"?a+"":a,e);import{D as L,fV as U,H as S,a4 as y,a5 as g,fe as M,ft as R,eB as G,eA as j,fW as q,fX as H,de as $,bD as _,fo as b,eF as z,fY as N,fZ as Q,f_ as Z,eG as k,fq as B,f$ as V,g0 as x}from"./index-LbPj94fr.js";import{e as W}from"./hooks-B-YhDlyt.js";const u=1,X=50;class Y extends L.PureComponent{constructor(){super(...arguments);A(this,"state",{initialPage:u})}fetchCollectionItems(e=u){const{id:c,onFetchCollectionItems:i,itemsPageSize:s,fetchCollectionItemsOptions:o}=this.props;c&&i(c,{page:e,limit:s||X,...o})}componentDidMount(){const{id:e,onFetchCollection:c,isConnected:i,itemsPage:s}=this.props;e&&i&&(c(e),this.fetchCollectionItems(s))}componentDidUpdate(e,c){const{id:i,isConnected:s,collection:o,items:h,itemsPage:n,itemsPageSize:r,itemSelected:d,fetchCollectionItemsOptions:f,paginatedItems:m,onFetchCollection:I,onChangePage:E}=this.props,P=!e.isConnected&&s;if(i&&P&&(I(i),this.fetchCollectionItems(n)),o&&m.length&&d&&Array.isArray(n)&&(this.state.initialPage===u||c.initialPage<this.state.initialPage)&&!m.find(l=>l.id===d)){const l=n[n.length-1],F=Math.ceil(h.length/r),T=Math.min(F,l+1);n.includes(T)||this.setState({initialPage:T},()=>E(T))}i&&i!==e.id&&(o||I(i),this.fetchCollectionItems(u));const p=!U(n,e.itemsPage),t=!U(f,e.fetchCollectionItemsOptions);if(i&&(n&&p||t)){const l=e.itemsPage;this.fetchCollectionItems(Array.isArray(n)&&Array.isArray(l)?n.filter(F=>!(l!=null&&l.includes(F))):n)}}render(){const{collection:e,paginatedCollections:c,items:i,paginatedItems:s,curation:o,itemCurations:h,isLoadingCollection:n,isLoadingCollectionItems:r,children:d,onFetchCollectionItems:f}=this.props,{initialPage:m}=this.state;return S.jsx(S.Fragment,{children:d({collection:e,items:i,paginatedItems:s,initialPage:m,paginatedCollections:c,curation:o,itemCurations:h,isLoadingCollection:n,isLoadingCollectionItems:r,onFetchCollectionItemsPages:f})})}}const v=C=>{const{id:a,itemsPageSize:e}=C,c=W(),i=y(),s=a||c,o=g(t=>s?M(t,s):null),h=g(t=>o?R(t,o.id):[]),n=g(t=>o?G(t,o.id,e||x):[]),r=g(t=>j(t,e||x)??[]),d=g(t=>o?q(t,o.id):[]),f=g(t=>s?H(t,s):null),m=g($),I=g(t=>_(z(t),b)),E=g(t=>_(Q(t),N)||_(k(t),Z)),P=L.useCallback(t=>{i(B(t))},[]),p=L.useCallback((t,l)=>{i(V(t,l))},[]);return S.jsx(Y,{...C,id:s,collection:o,items:h,paginatedCollections:r,paginatedItems:n,itemCurations:d,curation:f,isConnected:m,isLoadingCollection:I,isLoadingCollectionItems:E,onFetchCollection:P,onFetchCollectionItems:p})};export{v as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var F=Object.defineProperty;var T=(c,n,e)=>n in c?F(c,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):c[n]=e;var p=(c,n,e)=>T(c,typeof n!="symbol"?n+"":n,e);import{D as r,H as E,a4 as _,a5 as I,fl as R,fm as S,de as x,bD as m,fn as L,eG as C,fo as U,fk as D,dZ as M,a6 as P,a7 as Q,fp as b,fq as j}from"./index-LbPj94fr.js";import{d as k}from"./hooks-B-YhDlyt.js";class q extends r.PureComponent{constructor(){super(...arguments);p(this,"state",{loadedItemId:void 0})}componentDidMount(){const{id:e,item:o,onFetchItem:s,onFetchCollection:i,isConnected:l,collection:d}=this.props;l&&e&&!o&&this.setState({loadedItemId:e},()=>s(e)),l&&e&&(o!=null&&o.collectionId)&&!d&&i(o.collectionId)}componentDidUpdate(){const{id:e,item:o,collection:s,onFetchItem:i,onFetchCollection:l,isConnected:d}=this.props,{loadedItemId:u}=this.state;d&&e&&!o&&u!==e&&this.setState({loadedItemId:e},()=>i(e)),d&&e&&(o!=null&&o.collectionId)&&!s&&l(o.collectionId)}render(){const{item:e,collection:o,isLoading:s,children:i}=this.props;return E.jsx(E.Fragment,{children:i(e,o,s)})}}const N=({id:c,children:n})=>{const e=_(),o=k(),s=c||o,i=I(R),l=I(S),d=I(x),u=I(t=>m(C(t),L)||m(C(t),U)||m(C(t),D)||m(C(t),M)||P(t)||Q(t)),a=r.useMemo(()=>i.find(t=>t.id===s)||null,[i,s]),f=r.useMemo(()=>a&&a.collectionId&&l.find(t=>t.id===a.collectionId)||null,[a,l]),h=r.useCallback(t=>e(b(t)),[e]),g=r.useCallback(t=>e(j(t)),[e]);return E.jsx(q,{id:s,item:a,collection:f,isLoading:u,isConnected:d,onFetchItem:h,onFetchCollection:g,children:n})};export{N as I};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r=Object.defineProperty;var p=(t,s,e)=>s in t?r(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var o=(t,s,e)=>p(t,typeof s!="symbol"?s+"":s,e);import{D as d,c7 as u,c8 as x,c9 as h,H as c,ca as I,a1 as l,N as J,X as C}from"./index-LbPj94fr.js";let f=class extends d.PureComponent{constructor(){super(...arguments);o(this,"jumpToLand",()=>{const{land:e}=this.props;if(e){const n=u(e),[a,i]=x(n),m=window.open(h(a,i),"_blank,noreferrer");m&&m.focus()}});o(this,"handleClick",()=>{const{land:e,onJumpIn:n}=this.props;return e?this.jumpToLand():n()})}render(){const{size:e="medium",text:n,active:a=!1,disabled:i=!1}=this.props;return n?c.jsxs(I.Button,{basic:!0,className:"JumpInContainer",size:e,disabled:i,onClick:this.handleClick,children:[c.jsx("span",{className:l("JumpIn",e,{active:a})}),c.jsx("span",{className:l("text",{active:a}),children:n})]}):c.jsx("button",{"aria-label":"Jump in",className:l("JumpIn",e,{active:a}),onClick:this.handleClick})}};const j=(t,s)=>({onJumpIn:()=>{var e,n;return t(C("SeeInWorldModal",{itemIds:(e=s.items)==null?void 0:e.map(a=>a.id),collectionId:(n=s==null?void 0:s.collection)==null?void 0:n.id}))}}),g=J(void 0,j)(f);export{g as J};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aX as r,D as o,H as s,M as e,K as c,bH as d}from"./index-LbPj94fr.js";import{B as h}from"./Back-qfVBk6YN.js";class x extends o.PureComponent{render(){const{land:a,title:t,subtitle:n,children:i,history:l}=this.props;return s.jsxs("div",{className:"LandAction",children:[s.jsx(e.Row,{height:48,children:s.jsx(h,{absolute:!0,onClick:()=>l.push(c.landDetail(a.id))})}),s.jsx(e.Row,{className:"main",children:s.jsxs(e.Narrow,{children:[s.jsx(e.Column,{children:s.jsx(d,{landId:a.id,width:240,height:240,isDraggable:!1})}),s.jsxs(e.Column,{className:"content",children:[t?s.jsxs(e.Section,{children:[s.jsx(e.Header,{className:"title",size:"large",children:t}),n?s.jsx("span",{className:"subtitle",children:n}):null]}):null,i]})]})})]})}}const p=r(x);export{p as L};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as l,H as n,a5 as d,bQ as j,c5 as P,a6 as F,a7 as N,bM as v,bN as C,bD as y,c6 as E,M as L,ag as I,ai as b}from"./index-LbPj94fr.js";import{N as f}from"./NotFound-BTo5pEaG.js";import{a as M}from"./hooks-B-YhDlyt.js";let S=class extends l.PureComponent{render(){const{id:a,land:i,isLoading:e,deployments:r,rental:s,children:t}=this.props;return n.jsx(n.Fragment,{children:t(a,i,e,{deployments:r,rental:s})})}};const D=({id:g,children:a})=>{const i=M(),e=g||i,r=d(j),s=d(P),t=d(F),u=d(N),c=d(v),o=l.useMemo(()=>r.find(m=>m.id===e)||null,[r,e]),p=l.useMemo(()=>o&&o.id in c?c[o.id]:[],[o,c]),x=d(m=>o?C(m,o):null),h=l.useMemo(()=>y(s,E)||t||u,[s,t,u]);return n.jsx(S,{id:e,land:o,isLoading:h,deployments:p,rental:x,children:a})},R=D;class Q extends l.PureComponent{renderLoading(){return n.jsx(L.Center,{children:n.jsx(L.Loader,{active:!0,size:"large"})})}renderNotFound(){return n.jsx(f,{})}render(){const{className:a,children:i}=this.props,e=["LandProviderPage"];return a&&e.push(a),n.jsxs(n.Fragment,{children:[n.jsx(I,{}),n.jsx(L.Page,{className:e.join(" "),children:n.jsx(R,{children:(r,s,t,{deployments:u,rental:c})=>n.jsxs(n.Fragment,{children:[t?this.renderLoading():null,!t&&!(r&&s)?this.renderNotFound():null,r&&s?i(s,{deployments:u,rental:c}):null]})})}),n.jsx(b,{})]})}}export{Q as L};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var _=Object.defineProperty;var R=(e,t,o)=>t in e?_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var p=(e,t,o)=>R(e,typeof t!="symbol"?t+"":t,o);import{b4 as u,b5 as M,H as s,b6 as P,b7 as W,b8 as $,b9 as V,ba as H,bb as G,bc as F,bd as z,be as K,bf as Y,aM as D,a5 as x,bg as q,a9 as Q,bh as X,D as m,bi as O,bj as Z,ae as J,N as w,G as d,M as r,bk as ee,a4 as se,T as ne,U as te,ad as ae,bl as oe,bm as ie,bn as re,X as ce,bo as le,bp as de,bq as B,Z as U,K as C,a0 as ue,ag as ge,a1 as Ce,ai as he,br as me}from"./index-LbPj94fr.js";import{g as Se,a as xe,i as be,b as je,c as Le}from"./selectors-CSnw6goy.js";const I=(e,t,o)=>{var l,i;if(!o)return"";const n=(i=(l=e[o.sys.id])==null?void 0:l.fields.file[t])==null?void 0:i.url;return n?n.startsWith("https:")||n.startsWith("http:")?n:`https:${n}`:""},pe=e=>{switch(e){case"left":return"flex-start";case"center":return"center";case"right":return"flex-end";default:return"flex-start"}},Te=e=>{var N,y,E,k,v;const{isLoading:t,onClick:o,fields:n,assets:l,locale:i=u.ContentfulLocale.enUS,error:g}=e,a=M();if(t)return s.jsx(P,{children:s.jsx(W,{})});if(!n||g)return null;const S=I(l,u.ContentfulLocale.enUS,a?n.mobileBackground[u.ContentfulLocale.enUS]:n.fullSizeBackground[u.ContentfulLocale.enUS]),j=a?n.mobileTitle[i]:n.desktopTitle[i],L=(N=a?n.mobileTitleAlignment[u.ContentfulLocale.enUS]:n.desktopTitleAlignment[u.ContentfulLocale.enUS])==null?void 0:N.toLowerCase(),b=a?n.mobileText[i]:n.desktopText[i],h=(y=a?n.mobileTextAlignment[u.ContentfulLocale.enUS]:n.desktopTextAlignment[u.ContentfulLocale.enUS])==null?void 0:y.toLowerCase(),T=pe((E=a?n.mobileButtonAlignment[u.ContentfulLocale.enUS]:n.desktopButtonAlignment[u.ContentfulLocale.enUS])==null?void 0:E.toLowerCase());return s.jsxs($,{background:S,children:[s.jsxs(V,{children:[s.jsx(H,{variant:"h1",textAlign:L,children:j}),s.jsx(G,{textAlign:h,children:b?F(b):null}),n.showButton[u.ContentfulLocale.enUS]&&((k=n.buttonLink)!=null&&k[u.ContentfulLocale.enUS])&&((v=n.buttonsText)!=null&&v[i])?s.jsx(z,{justifyContent:T,children:s.jsx(K,{onClick:o,href:n.buttonLink[u.ContentfulLocale.enUS],variant:"contained",disableElevation:!0,children:n.buttonsText[i]})}):null]}),n.logo&&n.logo[u.ContentfulLocale.enUS]&&s.jsx(Y,{src:I(l,u.ContentfulLocale.enUS,n.logo[u.ContentfulLocale.enUS]),alt:"Banner logo"})]})},fe=()=>{const e=D();return x(t=>q(t,e.search))},We=()=>{const e=D(),t=x(Q);return X(e.search,t)},Ne=e=>{const{fields:t,id:o,...n}=e,l=m.useCallback(i=>{const g=i;g.preventDefault();const a=O();a&&a.track("CLICK_BANNER",{id:t==null?void 0:t.id,location:o}),Z(300).then(()=>{window.location.href=g.target.href})},[t==null?void 0:t.id,o]);return J.createElement(Te,{onClick:l,fields:t,...n})},ye=(e,t)=>({fields:Se(e,t.id)??null,assets:xe(e,t.id),isLoading:be(e),error:je(e),locale:Le(e)}),Ee=w(ye)(Ne),ke="Sign in from sync toast";class ve extends m.PureComponent{constructor(){super(...arguments);p(this,"state",{isSynced:!1});p(this,"analytics",O());p(this,"handleRetry",()=>{const{onRetry:o}=this.props;o()});p(this,"handleLogin",()=>{var o;(o=this.analytics)==null||o.track(ke),this.props.onOpenModal("WalletLoginModal")})}componentWillReceiveProps(o){o.syncCount>0&&this.props.syncCount===0?this.setState({isSynced:!1}):o.syncCount===0&&this.props.syncCount>0&&this.setState({isSynced:!0})}render(){const{syncCount:o,errorCount:n,projectCount:l,didDismissSignInToast:i,didDismissSyncedToast:g,isLoggedIn:a,onDismissSignInToast:S,onDismissSyncedToast:j}=this.props,{isSynced:L}=this.state,b=L&&!g,h=!a&&!i&&l>0;return o>0?s.jsx("div",{className:"SyncToast",children:s.jsx("div",{className:"message",children:d("sync.loading")})}):n>0?s.jsx("div",{className:"SyncToast",children:s.jsxs("div",{className:"message",children:[s.jsx("div",{className:"error-indicator"}),d("sync.error",{errorCount:n}),s.jsx(r.Button,{basic:!0,onClick:this.handleRetry,children:d("sync.retry")})]})}):b?s.jsx("div",{className:"SyncToast",children:s.jsxs("div",{className:"message",children:[d("sync.success"),s.jsx(r.Close,{small:!0,onClick:j})]})}):h?s.jsx("div",{className:"SyncToast",children:s.jsxs("div",{className:"message",children:[s.jsx(ee,{id:"toasts.localstorage",values:{sign_in:s.jsxs("span",{className:"sign-in",onClick:this.handleLogin,children:[" ",d("global.sign_in")," "]})}}),s.jsx(r.Close,{small:!0,onClick:S})]})}):null}}const Ie=()=>{const e=se(),t=fe(),o=x(h=>ne(h).size),n=x(h=>te(h).size),l=t.length,i=x(ae),g=x(oe),a=x(ie),S=m.useCallback(()=>{e(re())},[e]),j=m.useCallback((h,T)=>{e(ce(h,T))},[e]),L=m.useCallback(()=>{e(le())},[e]),b=m.useCallback(()=>{e(de())},[e]);return s.jsx(ve,{syncCount:o,errorCount:n,projectCount:l,isLoggedIn:i,didDismissSignInToast:g,didDismissSyncedToast:a,onRetry:S,onOpenModal:j,onDismissSignInToast:L,onDismissSyncedToast:b})};var c=(e=>(e.OVERVIEW="overview",e.SCENES="scenes",e.LAND="land",e.COLLECTIONS="collections",e.NAMES="names",e.WORLDS="worlds",e.CURATION="curation",e))(c||{});const Ae="builderCampaignBanner",f="builder-last-visited-section",A=B(),De=[c.COLLECTIONS,c.SCENES,c.LAND,c.NAMES],Oe=e=>{const{isLoggingIn:t,isLoggedIn:o}=e,n=U();m.useEffect(()=>{const a=A.getItem(f)??"";o&&!n.length&&a!==C.root()&&n.push(a)},[o,n]);const l=m.useCallback(a=>{A.setItem(f,a),n.push(a)},[n]),i=a=>{switch(a){case c.COLLECTIONS:return l(C.collections());case c.SCENES:return l(C.scenes());case c.LAND:return l(C.land());case c.NAMES:return l(C.ens());default:throw new Error("Invalid NavigationTab")}},g=a=>{switch(a){case c.COLLECTIONS:return"https://docs.decentraland.org/creator/wearables/wearables-overview/#collections";case c.SCENES:return"https://docs.decentraland.org/creator/editor/about-scene-editor/";case c.LAND:return"https://docs.decentraland.org/player/market/land-manager/";case c.NAMES:return"https://decentraland.org/blog/project-updates/manage-names-in-the-builder/";default:throw new Error("Invalid Navigation Tab")}};return t?s.jsx(ue,{}):s.jsxs(s.Fragment,{children:[s.jsx(ge,{}),s.jsxs(r.Page,{isFullscreen:!0,className:"HomePage",children:[s.jsx(_e,{activeTab:c.OVERVIEW,children:s.jsx(Ie,{})}),s.jsx(Ee,{id:Ae}),s.jsxs(r.Container,{children:[s.jsx("h1",{className:"title",children:d("home_page.title")}),s.jsx(r.Card.Group,{itemsPerRow:4,centered:!0,children:De.map((a,S)=>s.jsxs(r.Card,{children:[s.jsxs(r.Card.Content,{textAlign:"center",children:[s.jsx(r.Card.Header,{children:d(`home_page.${a}.card_title`)}),s.jsxs(r.Card.Description,{children:[s.jsx("p",{className:"card-description",children:d(`home_page.${a}.card_description`)}),s.jsx("div",{className:Ce("card-image",a)})]})]}),s.jsxs(r.Card.Content,{extra:!0,children:[s.jsx(r.Button,{primary:!0,content:d(`home_page.${a}.cta_label`),onClick:()=>i(a)}),s.jsx(r.Button,{as:"a",basic:!0,content:d("global.learn_more"),href:g(a),rel:"noopener noreferrer",target:"_blank"})]})]},S))})]})]}),s.jsx(he,{})]})},$e=Oe,we=B();function Be({activeTab:e,isFullscreen:t,isCommitteeMember:o,children:n}){const l=U(),i=m.useCallback(g=>{we.setItem(f,g),l.push(g)},[]);return s.jsx("div",{className:"Navigation",children:s.jsxs(r.Tabs,{isFullscreen:t,children:[n,s.jsx(r.Tabs.Tab,{active:e===c.OVERVIEW,onClick:()=>i(C.root()),children:d("navigation.overview")}),s.jsx(r.Tabs.Tab,{active:e===c.COLLECTIONS,onClick:()=>i(C.collections()),children:d("navigation.collections")}),s.jsx(r.Tabs.Tab,{active:e===c.SCENES,onClick:()=>i(C.scenes()),children:d("navigation.scenes")}),s.jsx(r.Tabs.Tab,{active:e===c.LAND,onClick:()=>i(C.land()),children:d("navigation.land")}),s.jsx(r.Tabs.Tab,{active:e===c.NAMES,onClick:()=>i(C.ens()),children:d("navigation.names")}),s.jsx(r.Tabs.Tab,{active:e===c.WORLDS,onClick:()=>i(C.worlds()),children:d("navigation.worlds")}),o?s.jsx(r.Tabs.Tab,{active:e===c.CURATION,onClick:()=>i(C.curation()),children:d("navigation.curation")}):null]})})}const Ue=e=>({isCommitteeMember:me(e)}),_e=w(Ue)(Be);export{Ee as B,$e as H,c as N,Ie as S,fe as a,_e as b,Ae as c,We as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ae as a,H as o,M as s,a1 as d,bC as i}from"./index-LbPj94fr.js";const c="_OptionsDropdown_db7mu_1",l={OptionsDropdown:c},m=t=>{const{options:e,className:p}=t;return o.jsx(s.Dropdown,{className:d(l.OptionsDropdown,p),direction:"left",onClick:i(),children:o.jsx(s.Dropdown.Menu,{children:e.map((n,r)=>o.jsx(s.Dropdown.Item,{text:n.text,onClick:n.handler},r))})})},w=a.memo(m);export{w as O};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var m=Object.defineProperty;var S=(s,t,e)=>t in s?m(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e;var o=(s,t,e)=>S(s,typeof t!="symbol"?t+"":t,e);import{cb as h,cc as u,D as l,H as a,M as x,G as r,N as y,cd as b,ce as g}from"./index-LbPj94fr.js";import{f}from"./date-C90QIauR.js";const d=s=>s.stats,j=s=>d(s).data,E=s=>d(s).loading,L=h(u,j,(s,t)=>Object.values(s).reduce((e,n)=>(e[n.id]=n.base in t.weekly?t.weekly[n.base]:null,e),{}));class i extends l.PureComponent{render(){const{label:t,children:e}=this.props;return a.jsxs("div",{className:"Stats",children:[a.jsx("div",{className:"label",children:t}),a.jsx("div",{className:"value",children:e})]})}}let _=class extends l.PureComponent{constructor(){super(...arguments);o(this,"fetchStats",e=>{const{stats:n,isLoading:c,onFetchStats:p}=this.props;!n&&!c&&p(e)});o(this,"renderValue",(e,n="0")=>{const{isLoading:c}=this.props;return!e&&c?a.jsx(x.Loader,{active:!0,size:"mini"}):e||n})}componentWillMount(){this.fetchStats(this.props.deployment.base)}componentWillReceiveProps(e){e.deployment.base!==this.props.deployment.base&&this.fetchStats(e.deployment.base)}render(){const{stats:e}=this.props;return a.jsxs(a.Fragment,{children:[a.jsx(i,{label:r("analytics.users"),children:this.renderValue(e&&e.users.toLocaleString())}),a.jsx(i,{label:r("analytics.sessions"),children:this.renderValue(e&&e.sessions.toLocaleString())}),a.jsx(i,{label:r("analytics.median_session_time"),children:this.renderValue(e&&f(e.medianSessionTime),"0s")}),a.jsx(i,{label:r("analytics.max_concurrent_users"),children:this.renderValue(e&&e.maxConcurrentUsers.toLocaleString())})]})}};const T=(s,t)=>({stats:L(s)[t.deployment.id],isLoading:E(s).some(e=>e.type===b&&e.payload.base===t.deployment.base)}),v=s=>({onFetchStats:t=>s(g(t))}),W=y(T,v)(_);export{W as S,i as a};
|
package/assets/hooks-B-YhDlyt.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aM as r,D as o,bs as s,bt as n,bu as c,bv as m,bw as u,bx as l,by as d,bz as h,bA as i,bh as I,aS as F}from"./index-LbPj94fr.js";const C=()=>{const e=r();return o.useMemo(()=>n(e.search),[e.search])},P=()=>{const e=r();return o.useMemo(()=>c(e.search),[e.search])},S=()=>{const e=r();return o.useMemo(()=>m(e.search),[e.search])},M=()=>{const e=r();return o.useMemo(()=>u(e.pathname),[e.pathname])},U=()=>{const e=r();return o.useMemo(()=>l(e.pathname),[e.pathname])},b=()=>{const e=r();return o.useMemo(()=>d(e.pathname),[e.pathname])},G=()=>{const e=r();return o.useMemo(()=>h(e.pathname),[e.pathname])},N=()=>{const e=r();return o.useMemo(()=>s(e.pathname),[e.pathname])},j=()=>{const e=r();return o.useMemo(()=>i(e.pathname),[e.pathname])},w=e=>{const t=r();return o.useMemo(()=>I(t.search,e),[t.search,e])},y=(e,t)=>{const a=r();return o.useMemo(()=>F(a.search,e,t),[a.search,e,t])};export{M as a,N as b,U as c,j as d,G as e,w as f,P as g,S as h,C as i,b as j,y as u};
|
package/assets/index--eP8RdN-.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var h=Object.defineProperty;var m=(a,s,e)=>s in a?h(a,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[s]=e;var r=(a,s,e)=>m(a,typeof s!="symbol"?s+"":s,e);import{D as p,H as t,G as d,bk as g,M as o,L as u,K as x,cj as b,bP as j,b4 as E,N,cl as L}from"./index-LbPj94fr.js";import{L as D}from"./LandAction-CUgZ-nVw.js";import{L as P}from"./LandProviderPage-D194_isC.js";import"./Back-qfVBk6YN.js";import"./NotFound-BTo5pEaG.js";import"./hooks-B-YhDlyt.js";let f=class extends p.PureComponent{constructor(){super(...arguments);r(this,"state",{});r(this,"handleNameChange",(e,n)=>{this.setState({name:n.value})});r(this,"handleDescriptionChange",(e,n)=>{this.setState({description:n.value})})}getName(e){return typeof this.state.name>"u"?e.name:this.state.name}getDescription(e){return typeof this.state.description>"u"?e.description||"":this.state.description}render(){const{onEdit:e}=this.props,{name:n,description:c}=this.state,l=!n&&!c;return t.jsx(P,{className:"LandEditPage",children:i=>t.jsx(D,{land:i,title:d("edit_page.title"),subtitle:t.jsx(g,{id:"edit_page.subtitle",values:{name:t.jsx("strong",{children:i.name})}}),children:t.jsxs(o.Form,{onSubmit:()=>e(i,this.getName(i),this.getDescription(i)),children:[t.jsx(o.Field,{label:"Name",value:this.getName(i),onChange:this.handleNameChange}),t.jsx(o.Field,{label:"Description",value:this.getDescription(i),onChange:this.handleDescriptionChange}),t.jsxs(o.Row,{children:[t.jsx(u,{className:"cancel",to:x.landDetail(i.id),children:t.jsx(o.Button,{children:d("global.cancel")})}),t.jsx(b,{type:"submit",primary:!0,disabled:l||!this.getName(i)||i.role!==j.OWNER,network:E.Network.ETHEREUM,children:d("global.submit")})]})]})})})}};const v=a=>({onEdit:(s,e,n)=>a(L(s,e,n))}),T=N(null,v)(f);export{T as default};
|
package/assets/index-4S3D4LaD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ak as o}from"./index-LbPj94fr.js";export{o as default};
|
package/assets/index-B2y05o7K.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var ht=Object.defineProperty;var mt=(i,m,e)=>m in i?ht(i,m,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[m]=e;var c=(i,m,e)=>mt(i,typeof m!="symbol"?m+"":m,e);import{ae as q,H as t,M as d,G as r,bk as $,bJ as gt,D as b,gt as X,L as te,K as F,cj as Fe,b4 as P,N as He,bD as G,gu as pt,eF as ut,gv as Ct,gw as It,gx as bt,gy as _t,gz as xt,gA as Et,gB as vt,gC as jt,gD as H,et as St,gE as K,gF as Pe,a4 as se,Z as _e,a5 as C,aG as ae,gG as ft,de as xe,br as Ve,fe as Ee,ft as Tt,fW as wt,fX as yt,eC as ge,gm as Pt,gH as At,gI as Nt,fZ as Rt,eG as Ue,gJ as Mt,gK as Dt,gL as Lt,gM as Ot,fo as kt,fY as Bt,f_ as Wt,aM as ve,gN as Ft,gO as Ht,eU as Ae,bK as Vt,ad as Ut,eJ as je,gP as $e,X as Ge,ew as $t,er as Ye,fG as ee,dG as pe,es as Gt,eX as ue,gQ as Je,bi as Se,fV as ze,e_ as L,eu as z,fC as qe,fD as Ce,J as V,f9 as Ie,dF as Yt,eS as Jt,fl as zt,gR as qt,gS as Ze,gT as Ke,gU as Qe,fd as fe,eD as Zt,gV as Kt,gW as Qt,fK as Xe,eM as Xt,eL as et,eN as es,eP as ts,eQ as ss,gX as as,gY as ns,gZ as is,g_ as Ne,g$ as de,h0 as ls,eg as os,h1 as rs,h2 as ds,h3 as cs,h4 as hs,h5 as ms,h6 as gs,h7 as ps,h8 as us,h9 as Cs,ha as Is,hb as bs,fm as _s,hc as xs,hd as Es,he as vs,hf as js,hg as Ss,hh as fs,hi as Ts,hj as ws,f$ as ys,bU as ie,hk as Ps,hl as Re,hm as As,hn as Ns,eW as Me,fH as ce,ho as he,eV as Rs,eR as De,eY as Ms,eZ as Le,e$ as Oe,f0 as ke,hp as Ds,hq as Ls,f1 as Os,f2 as Be,f3 as We,hr as ks,fc as Bs,hs as Ws,ht as Fs,hu as Hs,hv as tt,hw as Vs,hx as Us,hy as $s,hz as Gs,hA as Ys,eI as Js,hB as zs,fg as qs,ff as Zs,fi as Ks,hC as Qs}from"./index-LbPj94fr.js";import{g as oe,h as Te,i as we}from"./hooks-B-YhDlyt.js";import{J as Xs}from"./JumpIn.container-va_LyMbu.js";import{C as ea}from"./CollectionProvider.container-Dz4kU__V.js";import{C as st}from"./ConfirmDelete-8N9eX1ru.js";import{C as at}from"./CollectionStatus.container-SecVXoKZ.js";import{d as ta,e as sa,c as aa}from"./selectors-CSnw6goy.js";import{I as na}from"./ItemProvider.container-BtouewED.js";const ia=({open:i,assignee:m,onConfirm:e,onClose:s})=>t.jsxs(d.Modal,{size:"tiny",className:"ConfirmApprovalModal",open:i,children:[t.jsx(d.Modal.Header,{children:r("curation_page.confirm_not_assigned_curation_modal.title")}),t.jsxs(d.Modal.Content,{children:[t.jsx("div",{className:"message-container",children:t.jsx($,{id:"curation_page.confirm_not_assigned_curation_modal.body",values:{assignee:t.jsx("strong",{children:t.jsx(gt,{textOnly:!0,address:m})})}})}),t.jsx("span",{children:t.jsx($,{id:"curation_page.confirm_not_assigned_curation_modal.confirm_footer"})})]}),t.jsxs(d.Modal.Actions,{children:[t.jsx(d.Button,{onClick:s,children:r("global.cancel")}),t.jsx(d.Button,{primary:!0,onClick:e,children:r("curation_page.confirm_not_assigned_curation_modal.confirm_button")})]})]}),la=q.memo(ia);var D=(i=>(i.REJECT_COLLECTION="REJECT_COLLECTION",i.REJECT_CURATION="REJECT_CURATION",i.DISABLE_COLLECTION="DISABLE_COLLECTION",i.DISABLE_THIRD_PARTY="DISABLE_THIRD_PARTY",i))(D||{});const U="item_editor.top_panel.rejection_modal",oa=({open:i,type:m,isLoading:e,thirdParty:s,hasPendingTransaction:a,onDisableThirdParty:n,collection:l,curation:o,onReject:h,onRejectCuration:g,onClose:p})=>{const E=b.useMemo(()=>{switch(m){case D.DISABLE_COLLECTION:return U+".disable_collection";case D.REJECT_CURATION:return U+".reject_curation";case D.DISABLE_THIRD_PARTY:return U+".disable_third_party";default:return""}},[m]),w=()=>{switch(m){case D.DISABLE_COLLECTION:h(l);break;case D.REJECT_CURATION:g(o.collectionId);break;case D.DISABLE_THIRD_PARTY:s&&n(s.id);break}},S=m===D.DISABLE_COLLECTION&&!l.isApproved||m===D.DISABLE_THIRD_PARTY&&!(s!=null&&s.isApproved)||m===D.REJECT_COLLECTION&&!l.isApproved||m===D.REJECT_CURATION&&(o==null?void 0:o.status)===X.REJECTED;return t.jsx(d.Modal,{size:"tiny",className:"RejectionModal",open:i,children:a?t.jsx(ra,{i18nKey:E}):S?t.jsx(da,{link:l.forumLink,onClose:p}):t.jsx(ca,{i18nKey:E,isLoading:e,onClose:p,onConfirm:w})})},ra=({i18nKey:i})=>t.jsxs(t.Fragment,{children:[t.jsx(d.Modal.Header,{children:r(`${i}.title`)}),t.jsxs("div",{className:"loading-transaction",children:[t.jsx("div",{className:"danger-text",children:r(`${i}.tx_pending`)}),t.jsx("small",{className:"danger-text",children:t.jsx($,{id:U+".visit_activity",values:{activity_link:t.jsx(te,{to:F.activity(),children:r("global.activity")})}})}),t.jsx(d.Loader,{active:!0,size:"large"})]})]}),da=({link:i,onClose:m})=>t.jsxs(t.Fragment,{children:[t.jsx(d.Modal.Header,{children:r(U+".veredict_explanation")}),t.jsx(d.Modal.Content,{children:r(U+".go_to_forum")}),t.jsxs(d.Modal.Actions,{children:[t.jsx("a",{href:i,className:"forum-link",target:"_blank",rel:"noopener noreferrer",children:t.jsxs(d.Button,{secondary:!0,icon:!0,labelPosition:"right",children:[t.jsx("div",{children:r(U+".forum_link")}),t.jsx("div",{className:"discussion",children:r(U+".discussion")}),t.jsx(d.Icon,{name:"chevron right"})]})}),t.jsx(d.Button,{basic:!0,onClick:m,children:r("global.done")})]})]}),ca=({i18nKey:i,isLoading:m,onConfirm:e,onClose:s})=>t.jsxs(t.Fragment,{children:[t.jsx(d.Modal.Header,{children:r(`${i}.title`)}),t.jsx(d.Modal.Content,{children:r(`${i}.subtitle`)}),t.jsxs(d.Modal.Actions,{children:[t.jsx(Fe,{primary:!0,onClick:e,disabled:m,loading:m,network:P.Network.MATIC,children:r(`${i}.action`)}),t.jsx(d.Button,{disabled:m,onClick:s,children:r("global.cancel")})]})]}),ha=q.memo(oa),ma=(i,m)=>({isLoading:G(ut(i),pt)||G(It(i),Ct)||bt(i),hasPendingTransaction:_t(i)||!!(m.thirdParty&&xt(i,m.thirdParty.id))}),ga=i=>({onReject:m=>i(Et(m)),onRejectCuration:m=>i(vt(m)),onDisableThirdParty:m=>i(jt(m))}),pa=He(ma,ga)(ha);var y=(i=>(i[i.APPROVE=0]="APPROVE",i[i.REJECT=1]="REJECT",i[i.ENABLE=2]="ENABLE",i[i.DISABLE=3]="DISABLE",i[i.DEPLOY_MISSING_ENTITIES=4]="DEPLOY_MISSING_ENTITIES",i))(y||{});let ua=class extends q.PureComponent{constructor(){super(...arguments);c(this,"state",{currentVeredict:void 0,showRejectionModal:null,showApproveConfirmModal:!1});c(this,"handleBack",()=>{const{history:e}=this.props;e.push(F.curation())});c(this,"handleConfirmApprovalModal",(e,s)=>{const{address:a,onInitiateApprovalFlow:n,onInitiateTPApprovalFlow:l,onSetAssignee:o}=this.props;this.setState({showApproveConfirmModal:!1}),a&&o(e.id,a,s),H(e)?l(e):n(e)});c(this,"setShowRejectionModal",e=>this.setState({showRejectionModal:e}));c(this,"renderPage",e=>{const{items:s,itemCurations:a,curation:n,totalItems:l,thirdParty:o}=this.props,{showRejectionModal:h,showApproveConfirmModal:g}=this.state,{chainId:p}=this.props,E=St(e);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"actions",children:t.jsx("div",{className:"back",onClick:this.handleBack})}),t.jsxs("div",{className:"title",children:[e.name," · ",r(`collection.type.${E}`),t.jsx(Xs,{size:"small",active:!0,collection:e,chainId:p,items:H(e)?s:void 0,text:r("global.see_in_decentraland")})]}),t.jsx("div",{className:"actions",children:t.jsx("span",{className:"button-container",children:H(e)&&l!==void 0?this.renderTPButtons(e,n,a):this.renderButtons(e,n)})}),h&&t.jsx(pa,{type:h,open:!0,collection:e,curation:n,thirdParty:o,onClose:()=>this.setShowRejectionModal(null)}),(n==null?void 0:n.assignee)&&g&&t.jsx(la,{open:!0,assignee:n.assignee,onConfirm:()=>this.handleConfirmApprovalModal(e,n),onClose:()=>this.setState({showApproveConfirmModal:!1})})]})});c(this,"renderButton",(e,s,a)=>{const{address:n,thirdParty:l,onInitiateApprovalFlow:o,onInitiateTPApprovalFlow:h,onDeployMissingEntities:g,reviewedItems:p,totalItems:E}=this.props,w={[y.APPROVE]:()=>a!=null&&a.assignee&&n!==(a==null?void 0:a.assignee)?this.setState({showApproveConfirmModal:!0}):H(s)?h(s):o(s),[y.ENABLE]:()=>o(s),[y.DISABLE]:()=>this.setShowRejectionModal(l?D.DISABLE_THIRD_PARTY:D.DISABLE_COLLECTION),[y.REJECT]:()=>{(a==null?void 0:a.status)===X.PENDING?this.setShowRejectionModal(D.REJECT_CURATION):this.setShowRejectionModal(D.REJECT_COLLECTION)},[y.DEPLOY_MISSING_ENTITIES]:()=>g(s)},S={[y.APPROVE]:"approve",[y.ENABLE]:"enable",[y.DISABLE]:"disable",[y.REJECT]:"reject",[y.DEPLOY_MISSING_ENTITIES]:"deploy_missing_entities"},j=e===y.APPROVE||e===y.ENABLE||e===y.DEPLOY_MISSING_ENTITIES,x=!H(s)||!!E&&p.length>=K(E);return t.jsx(d.Popup,{content:r("item_editor.top_panel.items_pending_to_review"),disabled:x,position:"bottom center",trigger:t.jsx("div",{children:t.jsx(d.Button,{primary:j,onClick:()=>w[e](),disabled:H(s)&&e===y.APPROVE&&!!E&&p.length<K(E),children:r(`item_editor.top_panel.${S[e]}`)})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})});c(this,"renderTPButtons",(e,s,a)=>{const{reviewedItems:n,totalItems:l,thirdParty:o}=this.props,h=a==null?void 0:a.some(g=>g.status===X.PENDING);return t.jsxs(t.Fragment,{children:[t.jsxs(d.Header,{sub:!0,children:[h?r("item_editor.top_panel.reviewed_counter",{count:n.length,threshold:K(l)}):r("item_editor.top_panel.not_enough_items_to_curate_more"),n.length>=K(l)?t.jsx(d.Icon,{name:"check circle"}):null]}),h&&this.renderButton(y.APPROVE,e,s),h&&this.renderButton(y.REJECT,e,s),!h&&(o==null?void 0:o.isApproved)&&this.renderButton(y.DISABLE,e,null)]})});c(this,"renderButtons",(e,s)=>s&&e.isApproved&&s.status==="pending"?t.jsxs(t.Fragment,{children:[this.renderButton(y.APPROVE,e,s),this.renderButton(y.REJECT,e,s)]}):s&&e.isApproved&&(s.status==="approved"||s.status==="rejected")?t.jsxs(t.Fragment,{children:[this.renderButton(y.DISABLE,e,s),this.props.hasCollectionMissingEntities&&this.renderButton(y.DEPLOY_MISSING_ENTITIES,e,s)]}):Pe(e)&&e.isApproved?t.jsxs(t.Fragment,{children:[this.renderButton(y.DISABLE,e,s),this.props.hasCollectionMissingEntities&&this.renderButton(y.DEPLOY_MISSING_ENTITIES,e,s)]}):Pe(e)?this.renderButton(y.ENABLE,e,s):t.jsxs(t.Fragment,{children:[this.renderButton(y.APPROVE,e,s),this.renderButton(y.REJECT,e,s)]}))}render(){const{collection:e,items:s,isCommitteeMember:a,isReviewing:n,isConnected:l,isLoading:o}=this.props,h=!e||o&&!s.length;return a&&n&&l?t.jsx("div",{className:"TopPanel",children:h?t.jsx(d.Loader,{size:"small",active:!0}):this.renderPage(e)}):null}};const Ca=({reviewedItems:i})=>{const m=se(),e=_e(),s=oe(),a=Te(),n=C(ae),l=C(ft),o=C(xe),h=C(Ve),g=C(u=>s?Ee(u,s):null),p=C(u=>g?Tt(u,g.id):[]),E=C(u=>g?wt(u,g.id):[]),w=C(u=>s?yt(u,s):null),S=C(u=>s?ge(u,s):void 0),j=C(u=>g&&H(g)?Pt(u,g):null),x=C(u=>s?At(u,s):!1),f=C(u=>G(Nt(u),kt)||G(Rt(u),Bt)||G(Ue(u),Wt)),T=b.useCallback((u,N,k)=>{m(Mt(u,N,k))},[m]),R=b.useCallback(u=>{m(Dt(u))},[m]),M=b.useCallback(u=>{m(Lt(u))},[m]),I=b.useCallback(u=>{m(Ot(u))},[m]);return t.jsx(ua,{address:n,items:p,totalItems:(S==null?void 0:S.total)||null,collection:g,itemCurations:E,thirdParty:j,curation:w,chainId:l,isConnected:o,isReviewing:a,isCommitteeMember:h,selectedCollectionId:s,hasCollectionMissingEntities:x,isLoading:f,reviewedItems:i,onSetAssignee:T,onInitiateTPApprovalFlow:R,onInitiateApprovalFlow:M,onDeployMissingEntities:I,history:e})},Ia=Ca,nt=()=>{const{search:i}=ve();return C(e=>Ft(e,i))},ba="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.22722%2012.7164C4.07574%2012.5731%204%2012.3582%204%2012.2149C4%2012.0716%204.07574%2011.8567%204.22722%2011.7134L5.28757%2010.7104C5.59053%2010.4239%206.04497%2010.4239%206.34793%2010.7104L9.35858%2013.8448C9.51006%2013.9881%209.73728%2013.9881%209.88876%2013.8448L17.6521%206.21493C17.955%205.92836%2018.4095%205.92836%2018.7124%206.21493L19.7728%207.21791C20.0757%207.50448%2020.0757%207.93433%2019.7728%208.2209L10.116%2017.7851C9.9645%2017.9284%209.81302%2018%209.5858%2018C9.35858%2018%209.2071%2017.9284%209.05562%2017.7851L4.22722%2012.7164Z'%20fill='white'/%3e%3c/svg%3e",_a=i=>{const{collectionId:m}=i,[e,s]=b.useState(!1),[a,n]=b.useState(null),l=_e(),o=ve(),h=b.useMemo(()=>Ht(o.search),[o.search]);b.useEffect(()=>{h&&(s(!0),n(h))},[h]);function g(){s(!1);const p=new URLSearchParams(o.search);p.delete("newItem"),l.replace({search:p.toString()})}return e&&a&&m?t.jsx(d.Toast,{type:d.ToastType.INFO,title:r("sagas.item.item_added_toast.title"),closable:!0,icon:t.jsx("div",{className:"ItemAddedToast icon-container",children:t.jsx("img",{src:ba,alt:r("sagas.item.item_added_toast.title")})}),onClose:g,body:t.jsx($,{id:"sagas.item.item_added_toast.body",values:{name:a,br:()=>t.jsx("br",{}),b:p=>t.jsx("strong",{children:p}),"collection-link":p=>t.jsx(te,{to:F.collectionDetail(m),children:t.jsx(d.Button,{className:"ItemAddedToast view-collection-link",basic:!0,children:p})})}})}):null},xa=q.memo(_a),Ea=({collection:i,address:m,hasUserOrphanItems:e,isLoggedIn:s,isReviewing:a,onOpenModal:n,onDeleteCollection:l})=>{var I,u;const o=ve(),h=_e(),g=((I=o.state)==null?void 0:I.fromParam)===Ae.COLLECTIONS,p=((u=o.state)==null?void 0:u.fromParam)===Ae.TP_COLLECTIONS,E=b.useCallback(()=>{h.push(F.collections())},[h]),w=b.useCallback(()=>{if(i&&(g||p)){const N=g?F.collectionDetail:F.thirdPartyCollectionDetail;h.push(N(i.id))}else h.push(F.itemEditor())},[g,p,h,i]),S=b.useCallback(()=>{n("CreateCollectionModal")},[n]),j=b.useCallback(()=>{i&&n("CreateSingleItemModal",{collectionId:i.id})},[i,n]),x=b.useCallback(()=>{i&&n("AddExistingItemModal",{collectionId:i.id})},[i,n]),f=b.useCallback(()=>{i&&n("EditCollectionNameModal",{collection:i})},[i,n]),T=b.useCallback(()=>{i&&l(i)},[i,l]),R=b.useCallback(()=>{const N=i&&Vt(i.owner,m||"");return i?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:`block ${g||p?"close":"back"}`,onClick:w}),t.jsxs("div",{className:"title",children:[t.jsx(te,{to:F.collectionDetail(i.id),children:i.name}),t.jsx(at,{collection:i})]}),N&&!i.isPublished?t.jsx(d.Dropdown,{trigger:t.jsx("div",{className:"block actions"}),inline:!0,direction:"left",children:t.jsxs(d.Dropdown.Menu,{children:[t.jsx(d.Dropdown.Item,{onClick:f,children:r("item_editor.left_panel.actions.edit_name")}),t.jsx(d.Dropdown.Item,{onClick:j,children:r("item_editor.left_panel.actions.new_item")}),e&&t.jsx(d.Dropdown.Item,{onClick:x,children:r("item_editor.left_panel.actions.add_existing_item")}),t.jsx(st,{name:i.name,onDelete:T,trigger:t.jsx(d.Dropdown.Item,{text:r("global.delete")})})]})}):null]}):null},[i,m,e,g,p]),M=b.useCallback(()=>t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"block close",onClick:E}),t.jsx("div",{className:"title",children:e?r("item_editor.left_panel.title"):r("item_editor.left_panel.title_alternative")}),s?t.jsx(d.Dropdown,{trigger:t.jsx("div",{className:"block add"}),inline:!0,direction:"left",children:t.jsx(d.Dropdown.Menu,{children:t.jsx(d.Dropdown.Item,{onClick:S,children:r("item_editor.left_panel.actions.new_collection")})})}):t.jsx("div",{className:"block"})]}),[e,s]);return a?null:t.jsx(d.Row,{grow:!1,shrink:!1,className:"Header",children:i?R():M()})},va=()=>{const i=oe();return C(m=>i?Ee(m,i):null)},ja=()=>{const i=se(),m=C(ae),e=C(Ut),s=Te(),a=C(je),n=va(),l=C(p=>!!(n&&m&&$e(p,m,n))),o=b.useCallback((p,E)=>i(Ge(p,E)),[i]),h=b.useCallback(p=>i($t(p)),[i]),g=b.useCallback(p=>i(Ye(p)),[i]);return t.jsx(Ea,{address:m,collection:n??void 0,isLoggedIn:e,isReviewing:s,onOpenModal:o,onDeleteCollection:h,onDeleteItem:g,hasEditRights:l,hasUserOrphanItems:a})},B=10;class W extends b.PureComponent{constructor(){super(...arguments);c(this,"state",{isCollapsed:!1});c(this,"handleToggle",()=>{this.setState({isCollapsed:!this.state.isCollapsed})})}render(){const{label:e,children:s}=this.props,{isCollapsed:a}=this.state,n=!a;return t.jsxs("div",{className:`Collapsable ${n?"is-open":""}`.trim(),children:[t.jsxs("div",{className:"header",onClick:this.handleToggle,children:[t.jsx("div",{className:"label",children:e}),t.jsx("div",{className:"handle"})]}),t.jsx("div",{className:"content",children:n?s:null})]})}}class Sa extends b.PureComponent{constructor(){super(...arguments);c(this,"handleClick",()=>{const{item:e,onClick:s}=this.props;s(e)})}renderToggleItem(){const{item:e,isVisible:s,isPlayingEmote:a}=this.props;return ee(e)?t.jsx(d.Icon,{className:"toggle-emote",name:s&&a?"pause":"play",onClick:this.handleClick}):t.jsx("div",{className:`toggle ${s?"is-visible":"is-hidden"}`,onClick:this.handleClick})}render(){const{item:e,isSelected:s,selectedCollectionId:a,bodyShape:n}=this.props;return t.jsx("div",{className:`SidebarItem ${s?"is-selected":""}`,children:t.jsxs(te,{to:F.itemEditor({itemId:e.id,collectionId:a||void 0,newItem:void 0}),children:[t.jsx(pe,{item:e}),t.jsxs("div",{className:"name",children:[t.jsx(Gt,{item:e}),e.name]}),t.jsx(d.Popup,{content:r("item_editor.left_panel.invalid_representation_tooltip",{bodyShape:t.jsx("b",{children:r(`body_shapes.${ue(e)}`).toLowerCase()})}),disabled:Je(e,n),position:"top center",trigger:this.renderToggleItem()})]})})}}var A=(i=>(i.TO_REVIEW="to-review",i.REVIEWED="reviewed",i.ALL_ITEMS="all-items",i))(A||{});const fa={[A.TO_REVIEW]:1,[A.REVIEWED]:1,[A.ALL_ITEMS]:1};class Ta extends b.PureComponent{constructor(){super(...arguments);c(this,"state",{currentTab:A.TO_REVIEW,currentPages:fa,reviewedTabPage:1,showGetMoreSamplesModal:!1,showAllItemsTabChangeModal:!1});c(this,"analytics",Se());c(this,"handleReviewItemsTrigger",e=>{const{items:s,onReviewItems:a}=this.props,{currentTab:n}=this.state;this.getIsReviewingTPItems()&&n===A.TO_REVIEW&&!ze(s,e==null?void 0:e.items)&&a()});c(this,"isVisible",e=>{const{visibleItems:s}=this.props;return s.some(a=>a.id===e.id)});c(this,"handleClick",e=>{var g;const{bodyShape:s,visibleItems:a,wearableController:n,isPlayingEmote:l,onSetItems:o}=this.props;if(!Je(e,s))return;let h=a.filter(p=>p.id!==e.id);if(ee(e))if(this.isVisible(e)){l?n==null||n.emote.pause():n==null||n.emote.play();return}else h=h.filter(p=>p.type!==L.EMOTE);this.isVisible(e)||(h.push(e),(g=this.analytics)==null||g.track("Preview Item",{ITEM_ID:e!=null&&e.urn?z(e.urn)?qe(e.urn):Ce(e.urn):null,ITEM_TYPE:e.type,ITEM_NAME:e.name,ITEM_IS_THIRD_PARTY:z(e.urn)})),o(h)});c(this,"handleTabChange",e=>{const{onLoadPage:s,onReviewItems:a,onResetReviewedItems:n}=this.props,{currentPages:l}=this.state;e===A.ALL_ITEMS?this.setState({showAllItemsTabChangeModal:!1},()=>{n(),s(l[A.ALL_ITEMS])}):e===A.TO_REVIEW&&a(),this.setState({currentTab:e})});c(this,"handleGetRandomSampleClick",()=>{const{showSamplesModalAgain:e,onLoadRandomPage:s}=this.props;e?this.setState({showGetMoreSamplesModal:!0}):s()});c(this,"handleModalProceed",()=>{const{onLoadRandomPage:e}=this.props;e(),this.setState({showGetMoreSamplesModal:!1})});c(this,"handlePageChange",(e,s)=>{const{currentTab:a}=this.state,{onLoadPage:n}=this.props;this.setState(l=>({currentPages:{...l.currentPages,[a]:+s.activePage}})),a!==A.REVIEWED&&n(+s.activePage)});c(this,"handleSwitchToAllItemsTab",()=>{const{reviewedItems:e}=this.props;e.length>0?this.setState({showAllItemsTabChangeModal:!0}):this.handleTabChange(A.ALL_ITEMS)});c(this,"getIsReviewingTPItems",()=>{const{collection:e,isReviewing:s}=this.props;return e?z(e.urn)&&s:!1});c(this,"renderSidebarItem",e=>{const{collection:s,selectedItemId:a,bodyShape:n,isPlayingEmote:l}=this.props;return t.jsx(Sa,{item:e,isSelected:a===e.id,isVisible:this.isVisible(e),isPlayingEmote:l,selectedCollectionId:(s==null?void 0:s.id)??null,bodyShape:n,onClick:this.handleClick},e.id)});c(this,"renderSidebarCategory",e=>{const s=e.filter(Ie),a=e.filter(ee);return e.length===0?t.jsx("div",{className:"empty",children:t.jsx("div",{className:"subtitle",children:r("item_editor.left_panel.empty_collection")})}):s.length===0||a.length===0?e.map(this.renderSidebarItem):t.jsxs(t.Fragment,{children:[t.jsx(W,{label:this.renderCollapsableLabel(L.WEARABLE),children:s.map(this.renderSidebarItem)}),t.jsx(W,{label:this.renderCollapsableLabel(L.EMOTE),children:a.map(this.renderSidebarItem)})]})});c(this,"renderTabPagination",e=>{const{currentTab:s,currentPages:a}=this.state,n=a[s],l=Math.ceil(e/B);return l>1?t.jsx(d.Pagination,{siblingRange:0,firstItem:null,lastItem:null,totalPages:l,activePage:n,onPageChange:this.handlePageChange}):null});c(this,"renderPaginationStats",e=>{const{currentPages:s,currentTab:a}=this.state,n=s[a],l=(n-1)*B,o=n*B;return t.jsx(d.Header,{sub:!0,children:r("item_editor.left_panel.reviewed_tab.page_counter",{pageStart:l,pageEnd:o>e?e:o,total:e})})});c(this,"renderTabContent",()=>{const{items:e,isLoading:s,totalItems:a,reviewedItems:n}=this.props,{currentTab:l,currentPages:o}=this.state,h=this.getIsReviewingTPItems(),g=o[l];if(s)return t.jsx(d.Loader,{size:"large",active:!0});switch(l){case A.TO_REVIEW:return t.jsxs(t.Fragment,{children:[this.renderSidebarCategory(e),!h&&a?this.renderTabPagination(a):null]});case A.REVIEWED:{const p=n.slice((g-1)*B,g*B);return t.jsxs(t.Fragment,{children:[n.length?this.renderPaginationStats(n.length):null,this.renderSidebarCategory(p),n.length?this.renderTabPagination(n.length):null]})}case A.ALL_ITEMS:return t.jsxs(t.Fragment,{children:[e.length&&a?this.renderPaginationStats(a):null,this.renderSidebarCategory(e),e.length&&a?this.renderTabPagination(a):null]});default:return null}});c(this,"renderTabHeader",()=>{const{isLoading:e,totalItems:s,reviewedItems:a}=this.props,{currentTab:n}=this.state;let l;const o=!s||s<B||a.length===s;switch(n){case A.TO_REVIEW:l=t.jsx(d.Popup,{content:r("item_editor.top_panel.not_enough_items_to_curate_more"),disabled:!o,position:"bottom center",trigger:t.jsx("div",{children:t.jsxs(d.Button,{disabled:e||o,primary:!0,className:"random-sample-button",onClick:this.handleGetRandomSampleClick,children:[t.jsx(d.Icon,{name:"random"}),r("item_editor.left_panel.get_random_sample")]})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0});break;case A.REVIEWED:l=t.jsx($,{id:"item_editor.left_panel.reviewed_samples",values:{reviewed_samples_bold:t.jsx("b",{children:r("item_editor.left_panel.reviewed_samples_bold",{count:a.length})}),total:K(s??1)}});break;default:return null}return t.jsxs("div",{className:"tab-header",children:[" ",l," "]})});c(this,"renderModal",()=>{const{onToggleShowSamplesModalAgain:e,showSamplesModalAgain:s}=this.props,{showGetMoreSamplesModal:a}=this.state;return t.jsxs(d.Modal,{open:a,size:"small",className:"ConfirmNewSampleModal",children:[t.jsx(d.Modal.Header,{children:r("item_editor.left_panel.get_more_samples_modal.title")}),t.jsxs(d.Modal.Content,{children:[t.jsx($,{id:"item_editor.left_panel.get_more_samples_modal.content",values:{count:10,tabName:t.jsx("b",{children:A.REVIEWED})}}),t.jsxs("div",{className:"checkbox-container",onClick:e,children:[t.jsx(d.Checkbox,{checked:!s}),r("item_editor.left_panel.get_more_samples_modal.dont_show_again")]})]}),t.jsxs(d.Modal.Actions,{children:[t.jsx(d.Button,{onClick:()=>this.setState({showGetMoreSamplesModal:!1}),children:r("global.cancel")}),t.jsx(d.Button,{primary:!0,onClick:this.handleModalProceed,children:r("item_editor.left_panel.get_more_samples_modal.understood")})]})]})});c(this,"renderAllItemsTabChangeModal",()=>{const{showAllItemsTabChangeModal:e}=this.state;return t.jsxs(d.Modal,{open:e,size:"small",className:"ConfirmNewSampleModal",children:[t.jsx(d.Modal.Header,{children:r("item_editor.left_panel.all_items_check.title")}),t.jsx(d.Modal.Content,{children:r("item_editor.left_panel.all_items_check.content")}),t.jsxs(d.Modal.Actions,{children:[t.jsx(d.Button,{onClick:()=>this.setState({showAllItemsTabChangeModal:!1}),children:r("global.cancel")}),t.jsx(d.Button,{primary:!0,onClick:()=>this.handleTabChange(A.ALL_ITEMS),children:r("item_editor.left_panel.get_more_samples_modal.understood")})]})]})});c(this,"renderTabs",()=>{const{currentTab:e}=this.state;return t.jsxs(d.Tabs,{isFullscreen:!0,children:[t.jsx(d.Tabs.Tab,{active:e===A.TO_REVIEW,onClick:()=>this.handleTabChange(A.TO_REVIEW),children:r("item_editor.left_panel.to_review")}),t.jsx(d.Tabs.Tab,{active:e===A.REVIEWED,onClick:()=>this.handleTabChange(A.REVIEWED),children:r("item_editor.left_panel.reviewed")}),t.jsx(d.Tabs.Tab,{active:e===A.ALL_ITEMS,onClick:this.handleSwitchToAllItemsTab,children:r("item_editor.left_panel.all_items")})]})})}componentDidMount(){this.handleReviewItemsTrigger()}componentDidUpdate(e){this.handleReviewItemsTrigger(e)}renderCollapsableLabel(e){return t.jsxs(t.Fragment,{children:[t.jsx(V,{name:e}),t.jsx($,{id:`item_editor.left_panel.${e}`})]})}render(){return t.jsxs(d.Section,{className:"Items",children:[this.getIsReviewingTPItems()?t.jsxs(t.Fragment,{children:[this.renderTabs(),this.renderTabHeader()]}):null,this.renderTabContent(),this.renderModal(),this.renderAllItemsTabChangeModal()]})}}class wa extends b.PureComponent{render(){const{collection:m,isSelected:e}=this.props;return t.jsx("div",{className:`SidebarCollection ${e?"is-selected":""}`,children:t.jsxs(te,{to:F.itemEditor({collectionId:m.id}),children:[t.jsx(Yt,{collectionId:m.id}),t.jsxs("div",{className:"wrapper",children:[t.jsxs("div",{className:"name",children:[t.jsx(at,{collection:m}),m.name]}),t.jsx("div",{className:"count",children:r("item_editor.left_panel.items_count",{count:m.itemCount})})]})]})})}}class ya extends b.PureComponent{constructor(){super(...arguments);c(this,"state",{currentPage:1});c(this,"handlePageChange",(e,s)=>{const{onLoadPage:a}=this.props;this.setState({currentPage:+s.activePage}),a(+s.activePage)})}render(){const{collections:e,isLoading:s,items:a,selectedCollectionId:n,totalCollections:l}=this.props,{currentPage:o}=this.state;if(e.length===0)return null;const h=Math.ceil(l/B);return s?t.jsx(d.Loader,{size:"small",active:!0}):!s&&a.length===0&&e.length===0?t.jsx("div",{className:"empty",children:t.jsx("div",{className:"subtitle",children:r("collections_page.empty_description")})}):t.jsx(t.Fragment,{children:t.jsxs(d.Section,{className:"Collections",children:[e.map(g=>t.jsx(wa,{collection:g,items:a,isSelected:g.id===n},g.id)),h>1?t.jsx(d.Pagination,{siblingRange:0,firstItem:null,lastItem:null,totalPages:h,activePage:o,onPageChange:this.handlePageChange}):null]})})}}var J=(i=>(i.COLLECTIONS="collections",i.ORPHAN_ITEMS="orphanItems",i))(J||{});const Y=1;let Pa=class extends b.PureComponent{constructor(){super(...arguments);c(this,"state",this.getInitialState());c(this,"handleToggleShowSamplesModalAgain",()=>{this.setState(e=>({showSamplesModalAgain:!e.showSamplesModalAgain}))});c(this,"fetchResource",()=>{const{address:e,onFetchCollections:s,onFetchOrphanItems:a,isReviewing:n,selectedCollectionId:l}=this.props,{pages:o}=this.state;if(e&&!n&&!l){const h=o[o.length-1];(this.isCollectionTabActive()?s:a)(e,{limit:B,page:h})}});c(this,"loadPage",e=>{this.setState({pages:[e]},()=>this.fetchResource())});c(this,"getRandomPage",(e,s)=>Math.floor(Math.random()*(s-e+1)+e));c(this,"loadRandomPage",e=>{const{pages:s}=this.state,{totalItems:a,totalCollections:n,onSetReviewedItems:l}=this.props,o=this.isCollectionTabActive()?n:a,h=Math.ceil(o/B);if(h>s.length){const g=[...Array(h).keys()].map(p=>p+1).filter(p=>!s.includes(p));if(g.length>0){const p=g[Math.floor(Math.random()*g.length)];this.setState(E=>({pages:[...E.pages,p]}),this.fetchResource)}}l(e)});c(this,"handleTabChange",e=>{this.setState({currentTab:e,pages:[Y]},this.fetchResource)});c(this,"isCollectionTabActive",()=>{const{selectedCollectionId:e}=this.props,{currentTab:s}=this.state;return s===J.COLLECTIONS&&!e})}getInitialState(){const{selectedCollectionId:e,selectedItemId:s}=this.props;let a=J.COLLECTIONS;return!e&&s&&(a=J.ORPHAN_ITEMS),{pages:[Y],currentTab:a,initialPage:Y,showSamplesModalAgain:!0}}componentDidMount(){const{address:e,hasUserOrphanItems:s,selectedItem:a,onFetchOrphanItem:n,onSetItems:l}=this.props;this.fetchResource(),e&&s===void 0&&n(e),a&&l([a])}componentDidUpdate(e,s){const{isConnected:a,address:n,selectedCollectionId:l,selectedItemId:o,selectedItem:h,orphanItems:g,totalItems:p,visibleItems:E,hasUserOrphanItems:w,onSetItems:S,onFetchOrphanItem:j}=this.props,{initialPage:x,pages:f}=this.state;if(!l&&n&&o&&p&&(x===Y||s.initialPage<x)){if(!g.find(T=>T.id===o)){const T=Math.ceil(p/B),R=f[f.length-1],M=Math.min(T,R+1);f.includes(M)||this.setState({pages:[M],initialPage:M},this.fetchResource)}}else if(e.selectedItemId&&o&&e.selectedItemId!==o){const T=E.filter(R=>R.type!==L.EMOTE);S(T)}else n&&a&&(a!==e.isConnected||e.selectedCollectionId&&!l)&&this.setState({pages:[Y]},this.fetchResource),e.selectedCollectionId!==l&&this.setState({pages:[Y]}),n&&n!==e.address&&w===void 0&&j(n);!e.selectedItem&&h&&h.type!==L.EMOTE&&S([h]),e.selectedCollectionId!==l&&S([])}componentWillUnmount(){const{onSetItems:e}=this.props;e([])}getItems(e,s,a){const{selectedCollectionId:n,orphanItems:l,isReviewing:o}=this.props;return n&&e?Jt(e)&&o?s.filter(h=>!!(a!=null&&a.find(g=>g.itemId===h.id&&g.status===X.PENDING))):s:l}render(){const{items:e,totalItems:s,totalCollections:a,collections:n,selectedItemId:l,selectedCollectionId:o,visibleItems:h,bodyShape:g,reviewedItems:p,isReviewing:E,isPlayingEmote:w,isConnected:S,wearableController:j,isLoading:x,hasUserOrphanItems:f,onSetItems:T,onSetReviewedItems:R,onResetReviewedItems:M}=this.props,{pages:I,showSamplesModalAgain:u}=this.state,N=!o&&f,k=this.isCollectionTabActive()&&!o,_=!this.isCollectionTabActive()||o;return t.jsx("div",{className:"LeftPanel",children:S?t.jsx(ea,{id:o,itemSelected:l,itemsPage:I,itemsPageSize:B,fetchCollectionItemsOptions:{status:E?X.PENDING:void 0},onChangePage:v=>this.setState({pages:[v]}),children:({paginatedCollections:v,collection:O,paginatedItems:re,initialPage:lt,isLoadingCollection:ot,isLoadingCollectionItems:rt,itemCurations:dt})=>{const Z=this.getItems(O,re,dt),ye=this.isCollectionTabActive(),ct=o&&O?lt:this.state.initialPage;return t.jsxs(t.Fragment,{children:[t.jsx(ja,{}),N?t.jsxs(d.Tabs,{isFullscreen:!0,children:[t.jsx(d.Tabs.Tab,{active:ye,onClick:()=>this.handleTabChange(J.COLLECTIONS),children:r("collections_page.collections")}),t.jsx(d.Tabs.Tab,{active:!ye,onClick:()=>this.handleTabChange(J.ORPHAN_ITEMS),children:r("item_editor.left_panel.items")})]}):null,k?t.jsx(ya,{collections:v,totalCollections:a||n.length,items:e,hasHeader:Z.length>0,selectedCollectionId:o,onLoadPage:this.loadPage,isLoading:ot}):null,_?t.jsxs(t.Fragment,{children:[t.jsx(Ta,{items:Z,totalItems:s||Z.length,hasHeader:!o&&n.length>0,selectedItemId:l,collection:O,isReviewing:E,isPlayingEmote:w,visibleItems:h,bodyShape:g,onResetReviewedItems:M,reviewedItems:p,onSetItems:T,wearableController:j,initialPage:ct,isLoading:rt||x,onToggleShowSamplesModalAgain:this.handleToggleShowSamplesModalAgain,showSamplesModalAgain:u,onReviewItems:()=>R(Z),onLoadRandomPage:()=>this.loadRandomPage(Z),onLoadPage:this.loadPage}),t.jsx(xa,{collectionId:o})]}):null]})}}):null})}};const Aa=i=>{const m=se(),e=oe(),s=we(),a=Te(),n=nt(),l=C(_=>ae(_)),o=C(_=>xe(_)),h=C(_=>zt(_)),g=C(_=>qt(_)),p=C(_=>Ze(_)),E=C(_=>Ke(_)),w=C(_=>Qe(_)),S=C(_=>je(_)),j=C(_=>Ue(_)),x=C(_=>s?fe(_,s):null),f=C(_=>{if(e)return ge(_,e);if(l)return ge(_,l)}),T=C(_=>e?void 0:Zt(_)),R=C(_=>l&&!e?Kt(_,l,f==null?void 0:f.limit):Qt(_)),M=b.useMemo(()=>G(j,ts)||G(j,ss),[j]),I=b.useCallback(_=>m(Xe(_)),[m]),u=b.useCallback((_,v)=>m(Xt(_,v)),[m]),N=b.useCallback((_,v)=>m(et(_,v)),[m]),k=b.useCallback(_=>m(es(_)),[m]);return t.jsx(Pa,{...i,address:l,isConnected:o,items:h,totalItems:(f==null?void 0:f.total)||null,totalCollections:(T==null?void 0:T.total)||null,orphanItems:R,collections:g,selectedItemId:s,selectedItem:x,selectedCollectionId:e,visibleItems:n,bodyShape:p,wearableController:E,isReviewing:a,isLoading:M,isPlayingEmote:w,hasUserOrphanItems:S,onSetItems:I,onFetchCollections:u,onFetchOrphanItems:N,onFetchOrphanItem:k})},Na=Aa;var Q=(i=>(i[i.ZOOM_IN=0]="ZOOM_IN",i[i.ZOOM_OUT=1]="ZOOM_OUT",i[i.PAN_CAMERA_Y=2]="PAN_CAMERA_Y",i[i.CHANGE_CAMERA_ALPHA=3]="CHANGE_CAMERA_ALPHA",i))(Q||{});class me extends q.PureComponent{constructor(){super(...arguments);c(this,"handleAvatarColorChange",(e,s)=>{const{currentColor:a,colors:n,onChange:l}=this.props;if(a.toHexString()!==s.value){const o=n.find(h=>h.toHexString()===s.value);l(o)}});c(this,"renderItem",(e,s)=>{const a=e.toHexString();return t.jsx(d.Dropdown.Item,{value:a,onClick:this.handleAvatarColorChange,children:t.jsx("i",{className:"color",style:{background:a}})},s)})}render(){const{currentColor:e,colors:s,label:a}=this.props,n=e.toHexString();return t.jsx(d.Dropdown,{inline:!0,direction:"right",className:"AvatarColorDropdown Select",value:n,trigger:t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:a}),t.jsx("div",{className:"value",children:t.jsx("i",{className:"color",style:{background:n}})}),t.jsx("div",{className:"handle"})]}),children:t.jsx(d.Dropdown.Menu,{className:"colors-menu",children:s.map(this.renderItem)})})}}let Ra=class extends q.PureComponent{constructor(){super(...arguments);c(this,"handleAvatarChangeWearable",(e,s)=>{const{wearable:a,category:n,bodyShape:l,onChange:o,baseWearables:h}=this.props,g=s.value?h.find(p=>p.id===s.value):null;a!==g&&o(n,l,g??null)})}render(){const{wearable:e,bodyShape:s,category:a,label:n,isNullable:l,baseWearables:o}=this.props,h=as(o,a,s).map(p=>({value:p.id,text:ns(p)}));l&&h.push({value:"",text:r("global.none")});const g=e?h.find(p=>p.value===e.id):null;return t.jsx(d.Dropdown,{inline:!0,direction:"right",className:"AvatarWearableDropdown Select",value:e?e.id:"",options:h,scrolling:!0,onChange:this.handleAvatarChangeWearable,trigger:t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:n}),t.jsx("div",{className:"value",children:g?g.text:r("global.none")}),t.jsx("div",{className:"handle"})]})})}};const Ma=i=>({baseWearables:is(i)}),ne=He(Ma)(Ra);let Da=class extends b.PureComponent{constructor(){super(...arguments);c(this,"state",{showSceneBoundaries:!1,isShowingAvatarAttributes:!1,isLoading:!1});c(this,"analytics",Se());c(this,"handleToggleShowingAvatarAttributes",()=>{this.setState({isShowingAvatarAttributes:!this.state.isShowingAvatarAttributes})});c(this,"handleBodyShapeChange",(e,{value:s})=>{const{onSetBodyShape:a}=this.props;a(s)});c(this,"handleAnimationChange",(e,{value:s})=>{const{emotes:a,visibleItems:n,onSetAvatarAnimation:l,onSetItems:o}=this.props,h=a.find(p=>p.id===s),g=n.filter(p=>p.type!==L.EMOTE);g.forEach(p=>{var E;(E=this.analytics)==null||E.track("Play Emote",{EMOTE_PLAYED_BASE:!h,EMOTE_PLAYED_ITEM_ID:h!=null&&h.urn?Ce(h.urn):null,EMOTE_PLAYED_NAME:h?h.name:s,PREVIEWED_WEARABLE_ITEM_ID:p!=null&&p.urn?z(p.urn)?qe(p.urn):Ce(p.urn):null,PREVIEWED_WEARABLE_NAME:p.name})}),h?g.push(h):l(s),o(g)});c(this,"handleSkinColorChange",e=>{const{onSetSkinColor:s}=this.props;s(e)});c(this,"handleEyeColorChange",e=>{const{onSetEyeColor:s}=this.props;s(e)});c(this,"handleHairColorChange",e=>{const{onSetHairColor:s}=this.props;s(e)});c(this,"handleWearableChange",(e,s,a)=>{const{onSetBaseWearable:n}=this.props;n(e,s,a)});c(this,"handleWearablePreviewLoad",()=>{const{wearableController:e,onSetWearablePreviewController:s}=this.props;e||s(Ne.createController("wearable-editor")),this.setState({isLoading:!1})});c(this,"handleControlActionChange",async e=>{const{wearableController:s}=this.props,a=.1;if(s)switch(await(s==null?void 0:s.emote.pause()),e){case Q.ZOOM_IN:{await(s==null?void 0:s.scene.changeZoom(a));break}case Q.ZOOM_OUT:{await(s==null?void 0:s.scene.changeZoom(-a));break}}});c(this,"handlePlayEmote",()=>{const{wearableController:e,isPlayingEmote:s,visibleItems:a,onSetAvatarAnimation:n,onSetItems:l}=this.props,o=a.filter(h=>h.type!==L.EMOTE);s?(n(P.PreviewEmote.IDLE),l(o)):e==null||e.emote.play()});c(this,"renderEmotePlayButton",()=>{const{isPlayingEmote:e}=this.props,s=e?"stop":"play",a=e?r("item_editor.center_panel.stop"):r("item_editor.center_panel.play_emote");return t.jsxs(d.Button,{icon:!0,onClick:this.handlePlayEmote,children:[t.jsx(d.Icon,{name:s}),t.jsx("span",{children:a})]})});c(this,"renderEmoteDropdownButton",()=>{const{collection:e,emotes:s,isPlayingEmote:a}=this.props,n=!!e,l=s.length>0;return a?null:t.jsx(d.Dropdown,{className:"avatar-animation button icon",floating:!0,scrolling:!0,children:t.jsxs(d.Dropdown.Menu,{children:[l&&t.jsxs(t.Fragment,{children:[t.jsx(d.Dropdown.Header,{content:n?r("item_editor.center_panel.from_collection"):r("item_editor.center_panel.from_items")}),t.jsx(d.Dropdown.Divider,{}),s.map(o=>t.jsx(d.Dropdown.Item,{value:o.id,text:o.name,onClick:this.handleAnimationChange},o.id)),t.jsx(d.Dropdown.Divider,{}),t.jsx(d.Dropdown.Header,{content:r("item_editor.center_panel.default")}),t.jsx(d.Dropdown.Divider,{})]}),P.PreviewEmote.schema.enum.map(o=>t.jsx(d.Dropdown.Item,{value:o,text:r(`emotes.${o}`),onClick:this.handleAnimationChange},o))]})})});c(this,"renderEmoteSelector",()=>t.jsx(d.Popup,{content:r("item_editor.center_panel.disabled_animation_dropdown"),disabled:!0,position:"top center",trigger:t.jsx("div",{className:"avatar-animation-dropdown-wrapper option",children:t.jsxs(d.Button.Group,{children:[this.renderEmotePlayButton(),this.renderEmoteDropdownButton()]})})}))}componentDidMount(){const{address:e,collection:s,emotes:a,selectedBaseWearables:n,hasUserOrphanItems:l,onFetchBaseWearables:o,onFetchOrphanItems:h,onFetchCollectionItems:g}=this.props,p=a.length>0;n||o(),p||(s&&!H(s)?g(s.id):e&&l&&h(e)),this.setState({isLoading:!0})}componentWillUnmount(){const{onSetWearablePreviewController:e}=this.props;e(null)}renderSelectTrigger(e,s){return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:e}),t.jsx("div",{className:"value",children:s}),t.jsx("div",{className:"handle"})]})}getDropdownAttributes(e,s,a){const n=s.find(l=>l.value===e);return{value:e,options:s,trigger:this.renderSelectTrigger(a,n?n.text:"")}}render(){const{bodyShape:e,skinColor:s,eyeColor:a,hairColor:n,emote:l,selectedBaseWearables:o,selectedItem:h,visibleItems:g,isImportFilesModalOpen:p,wearableController:E}=this.props,{isShowingAvatarAttributes:w,showSceneBoundaries:S,isLoading:j}=this.state,x=g.some(ee)&&(h==null?void 0:h.type)===L.EMOTE,f=l===P.PreviewEmote.JUMP?1:void 0;return t.jsxs("div",{className:`CenterPanel ${p?"import-files-modal-is-open":""}`,children:[t.jsx(Ne,{id:"wearable-editor",profile:"default",bodyShape:e,emote:l,zoom:f,skin:de(s),eyes:de(a),hair:de(n),urns:o?Object.values(o).map(T=>T?T.id:null).filter(T=>T!==null):[],base64s:g.map(ls),disableAutoRotate:!0,disableBackground:!0,wheelZoom:1.5,wheelStart:100,dev:os,onUpdate:()=>this.setState({isLoading:!0}),onLoad:this.handleWearablePreviewLoad,disableDefaultEmotes:x,showSceneBoundaries:S}),x?t.jsxs("div",{className:"zoom-controls",children:[t.jsx(d.Button,{className:"zoom-control zoom-in-control",onClick:()=>this.handleControlActionChange(Q.ZOOM_IN),children:t.jsx(d.Icon,{name:"plus"})}),t.jsx(d.Button,{className:"zoom-control zoom-out-control",onClick:()=>this.handleControlActionChange(Q.ZOOM_OUT),children:t.jsx(d.Icon,{name:"minus"})})]}):null,j&&t.jsx(d.Center,{children:t.jsx(d.Loader,{active:!0})}),t.jsxs("div",{className:"footer",children:[x&&!j&&E?t.jsx("div",{className:"emote-controls-container",children:t.jsx(rs,{className:"emote-controls",wearablePreviewId:"wearable-editor",wearablePreviewController:E})}):null,t.jsxs("div",{className:"options",children:[t.jsx("div",{className:`option ${w?"active":""}`,onClick:this.handleToggleShowingAvatarAttributes,children:t.jsx(d.Icon,{name:"user"})}),x?null:this.renderEmoteSelector(),t.jsx("div",{className:`option ${S?"active":""}`,children:t.jsx(V,{name:"cylinder",onClick:()=>this.setState(T=>({showSceneBoundaries:!T.showSceneBoundaries}))})})]}),t.jsxs("div",{className:`avatar-attributes ${w?"active":""}`,children:[t.jsx("div",{className:"dropdown-container",children:t.jsx(d.Dropdown,{inline:!0,direction:"right",className:"Select",onChange:this.handleBodyShapeChange,...this.getDropdownAttributes(e,[{value:P.BodyShape.MALE,text:r("body_shapes.male")},{value:P.BodyShape.FEMALE,text:r("body_shapes.female")}],r("wearable.category.body_shape"))})}),t.jsx("div",{className:"dropdown-container",children:t.jsx(me,{currentColor:s,colors:ds(),label:r("wearable.color.skin"),onChange:this.handleSkinColorChange})}),t.jsx("div",{className:"dropdown-container",children:t.jsx(me,{currentColor:a,colors:cs(),label:r("wearable.color.eye"),onChange:this.handleEyeColorChange})}),t.jsx("div",{className:"dropdown-container",children:t.jsx(me,{currentColor:n,colors:hs(),label:r("wearable.color.hair"),onChange:this.handleHairColorChange})}),t.jsx("div",{className:"dropdown-container",children:o&&t.jsx(ne,{wearable:o[P.WearableCategory.HAIR],category:P.WearableCategory.HAIR,bodyShape:e,label:r("wearable.category.hair"),onChange:this.handleWearableChange,isNullable:!0})}),t.jsx("div",{className:"dropdown-container",children:o&&t.jsx(ne,{wearable:o[P.WearableCategory.FACIAL_HAIR],category:P.WearableCategory.FACIAL_HAIR,bodyShape:e,label:r("wearable.category.facial_hair"),onChange:this.handleWearableChange,isNullable:!0})}),t.jsx("div",{className:"dropdown-container",children:o&&t.jsx(ne,{wearable:o[P.WearableCategory.UPPER_BODY],category:P.WearableCategory.UPPER_BODY,bodyShape:e,label:r("wearable.category.upper_body"),onChange:this.handleWearableChange})}),t.jsx("div",{className:"dropdown-container",children:o&&t.jsx(ne,{wearable:o[P.WearableCategory.LOWER_BODY],category:P.WearableCategory.LOWER_BODY,bodyShape:e,label:r("wearable.category.lower_body"),onChange:this.handleWearableChange})})]})]})]})}};const La=()=>{const i=se(),m=C(ae),e=C(Ze),s=C(ms),a=C(gs),n=C(ps),l=C(us),o=C(Cs),h=nt(),g=C(Ke),p=C(Is),E=C(Qe),w=C(bs),S=C(je),j=C(_s),x=oe(),f=we(),T=C(v=>f?fe(v,f):null),R=b.useMemo(()=>x?j.find(v=>v.id===x):void 0,[j,x]),M=b.useMemo(()=>x?p.filter(v=>v.collectionId===x):p.filter(v=>!v.collectionId),[p,x]),I=o?o[e]:null,N=b.useMemo(()=>!h.some(ee)&&l===P.PreviewEmote.IDLE,[h,l])?!1:E,k="CreateSingleItemModal"in w,_=b.useMemo(()=>({onSetBodyShape:v=>{i(xs(v))},onSetAvatarAnimation:v=>{i(Es(v))},onSetSkinColor:v=>{i(vs(v))},onSetEyeColor:v=>{i(js(v))},onSetHairColor:v=>{i(Ss(v))},onSetBaseWearable:(v,O,re)=>{i(fs(v,O,re))},onFetchBaseWearables:()=>{i(Ts())},onSetWearablePreviewController:v=>{i(ws(v))},onSetItems:v=>{i(Xe(v))},onFetchOrphanItems:(v,O)=>{i(et(v,O))},onFetchCollectionItems:(v,O)=>{i(ys(v,O))}}),[i]);return t.jsx(Da,{address:m,bodyShape:e,collection:R,selectedItem:T,selectedBaseWearables:I,skinColor:s,eyeColor:a,hairColor:n,emote:l,visibleItems:h,wearableController:g,emotes:M,isPlayingEmote:N,isImportFilesModalOpen:k,hasUserOrphanItems:S,..._})},Oa=La;class ka extends b.PureComponent{constructor(){super(...arguments);c(this,"handleChange",e=>{const{value:s,maxLength:a,onChange:n}=this.props,l=e.target.value;s!==l&&n(a?l.slice(0,a):l)})}render(){const{label:e,disabled:s,value:a}=this.props;return t.jsxs("div",{className:`Input ${s?"is-disabled":""}`.trim(),children:[t.jsx("div",{className:"label",children:e}),t.jsx("input",{value:a||"",onChange:this.handleChange,disabled:s})]})}}class le extends b.PureComponent{constructor(){super(...arguments);c(this,"state",{value:this.props.value});c(this,"handleChange",(e,s)=>{const{value:a,onChange:n}=this.props,l=s.value;l!==a&&(this.setState({value:l}),n(l))})}componentWillReceiveProps(e){const{itemId:s,value:a}=e;(s!==this.props.itemId||a!==this.state.value)&&this.setState({value:a})}renderTrigger(){const{label:e,options:s}=this.props,{value:a}=this.state,n=s.find(l=>l.value===a);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:e}),t.jsx("div",{className:"value",children:n?n.text:r("item_editor.right_panel.select_placeholder")}),t.jsx("div",{className:"handle"})]})}render(){const{options:e,disabled:s}=this.props,{value:a}=this.state;return t.jsx(d.Dropdown,{className:`Select ${a?"":"blank"}`.trim(),trigger:this.renderTrigger(),inline:!0,direction:"right",scrolling:e.length>4,value:a||void 0,options:e,disabled:s,onChange:this.handleChange})}}c(le,"defaultProps",{disabled:!1});class be extends b.PureComponent{constructor(){super(...arguments);c(this,"state",{value:this.props.value});c(this,"handleChange",(e,s)=>{const{onChange:a}=this.props,{value:n}=this.state,l=s.value,o=[...n];for(const h of l)n.includes(h)||o.push(h);o.length!==n.length&&(this.setState({value:o}),a(o))});c(this,"handleRemove",e=>{const{onChange:s}=this.props,a=this.state.value.filter(n=>n!==e);this.setState({value:a}),s(a)})}componentWillReceiveProps(e){const{itemId:s,value:a}=e;(s!==this.props.itemId||a!==this.state.value)&&this.setState({value:a})}renderTrigger(){const{label:e,info:s,options:a}=this.props,{value:n}=this.state,l=a.reduce((o,h)=>(o[h.value]=h.text,o),{});return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"label",children:[e,s?t.jsx(ie,{content:s,className:"info"}):null]}),t.jsx("div",{className:"values",children:n.length>0?n.map(o=>t.jsxs("div",{className:"value",children:[l[o],t.jsx("div",{className:"remove",onClick:h=>{this.handleRemove(o),h.stopPropagation()}})]},o)):t.jsx("div",{className:"placeholder",children:r("item_editor.right_panel.select_placeholder")})}),t.jsx("div",{className:"handle"})]})}render(){const{options:e,disabled:s}=this.props,{value:a}=this.state;return t.jsx(d.Dropdown,{inline:!0,multiple:!0,className:`MultiSelect ${a.length>0?"":"blank"}`.trim(),trigger:this.renderTrigger(),direction:"right",value:a,scrolling:!1,options:e.filter(n=>!a.includes(n.value)),disabled:s,onChange:this.handleChange,closeOnChange:!0})}}c(be,"defaultProps",{disabled:!1});class it extends b.PureComponent{constructor(){super(...arguments);c(this,"state",{draft:"",value:this.props.value});c(this,"handleChange",e=>{this.setState({draft:e.target.value})});c(this,"handleAdd",()=>{const{onChange:e}=this.props,{draft:s,value:a}=this.state,n=s.trim();if(n!=="")if(a.includes(n))this.setState({draft:""});else{const l=[...a,n];this.setState({value:l,draft:""}),e(l)}});c(this,"handleKeyDown",e=>{if(e.key==="#"){e.preventDefault();return}else if(e.keyCode===Ps||e.keyCode===Re||e.keyCode===As)this.handleAdd();else if(e.keyCode===Ns||e.keyCode===Re){const{draft:s,value:a}=this.state,n=a[a.length-1];n&&s===""&&this.handleRemove(n)}});c(this,"handleRemove",e=>{const{onChange:s}=this.props,a=this.state.value.filter(n=>n!==e);this.setState({value:a}),s(a)})}componentWillReceiveProps(e){const{itemId:s,value:a}=e;(s!==this.props.itemId||a!==this.state.value)&&this.setState({value:a})}render(){const{isDisabled:e}=this.props,{draft:s,value:a}=this.state;return t.jsx("div",{className:`Tags ${a.length>0?"":"blank"} ${e?"is-disabled":""}`.trim(),children:t.jsxs("div",{className:"values",children:[a.map(n=>t.jsxs("div",{className:"value",children:[n,t.jsx("div",{className:"remove",onClick:l=>{this.handleRemove(n),l.stopPropagation()}})]},n)),t.jsx("input",{value:s,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleAdd,disabled:e})]})})}}c(it,"defaultProps",{isDisabled:!1});let Ba=class extends b.PureComponent{constructor(){super(...arguments);c(this,"analytics",Se());c(this,"state",this.getInitialState());c(this,"thumbnailInput",b.createRef());c(this,"handleDeleteItem",()=>{const{onDeleteItem:e}=this.props,{selectedItem:s}=this.props;e(s)});c(this,"handleAddRepresentationToItem",()=>{const{selectedItem:e,onOpenModal:s}=this.props;s("CreateSingleItemModal",{item:e,addRepresentation:!0})});c(this,"handleChangeItemFile",()=>{const{selectedItem:e,onOpenModal:s}=this.props;s("CreateSingleItemModal",{item:e,changeItemFile:!0})});c(this,"handleOpenVideoDialog",(e={})=>{const{selectedItem:s,onOpenModal:a}=this.props;a("EditVideoModal",{item:s,onSaveVideo:this.handleSaveVideo,...e})});c(this,"handleSaveVideo",e=>{this.setState({video:URL.createObjectURL(e),contents:{...this.state.contents,[Me]:e},isDirty:!0})});c(this,"handleChangeName",e=>{this.setState({name:e,isDirty:this.isDirty({name:e})})});c(this,"handleChangeDescription",(e,s)=>{const a=s.value??"";this.setState({description:a,isDirty:this.isDirty({description:a})})});c(this,"handleChangeUtility",(e,s)=>{const a=s.value??"";this.setState({utility:a,isDirty:this.isDirty({utility:a})})});c(this,"handleChangeRarity",e=>{this.setState({rarity:e,isDirty:this.isDirty({rarity:e})})});c(this,"handleAllowVrmExport",(e,{checked:s})=>{const a={...this.state.data,blockVrmExport:!s};this.setState({data:a,isDirty:this.isDirty({data:a})})});c(this,"handleAllowOutlineCompatible",(e,{checked:s})=>{const a={...this.state.data,outlineCompatible:s};this.setState({data:a,isDirty:this.isDirty({data:a})})});c(this,"handleChangeCategory",e=>{let s;ce(this.state.data)?s={...this.state.data,category:e}:(s={...this.state.data,category:e},e===P.WearableCategory.SKIN&&(s=this.setReplaces(s,[]),s=this.setHides(s,[]))),this.setState({data:s,isDirty:this.isDirty({data:s})})});c(this,"handlePlayModeChange",e=>{const s={...this.state.data,loop:e===he.LOOP};this.setState({data:s,isDirty:this.isDirty({data:s})})});c(this,"handleChangeReplaces",e=>{const s=this.setReplaces(this.state.data,e);this.setState({data:s,isDirty:this.isDirty({data:s})})});c(this,"handleChangeHides",(e,s)=>{const a=this.state.data.hides;let n=[];s==="wearable"?n=[...a.filter(o=>!P.WearableCategory.schema.enum.includes(o)),...e]:n=[...a.filter(o=>!P.BodyPartCategory.schema.enum.includes(o)),...e];const l=this.setHides(this.state.data,n);this.setState({data:l,isDirty:this.isDirty({data:l})})});c(this,"handleChangeTags",e=>{const s={...this.state.data,tags:e};this.setState({data:s,isDirty:this.isDirty({data:s})})});c(this,"handleOnSaveItem",async()=>{var w,S;const{selectedItem:e,itemStatus:s,onSaveItem:a}=this.props,{name:n,description:l,utility:o,rarity:h,contents:g,data:p,isDirty:E}=this.state;if(E&&e){let j=p;j&&!ce(j)&&(j={...j,removesDefaultHiding:j.category===P.WearableCategory.UPPER_BODY||(w=j.hides)!=null&&w.includes(P.WearableCategory.UPPER_BODY)?[P.BodyPartCategory.HANDS]:[],..."blockVrmExport"in j?{blockVrmExport:j.blockVrmExport}:{},..."outlineCompatible"in j?{outlineCompatible:j.outlineCompatible}:{}});const x={...e.contents,...await Rs(g)},f={...e,name:n,description:l,rarity:h,data:j,contents:x,utility:o??void 0};s&&[De.UNPUBLISHED,De.UNDER_REVIEW].includes(s)&&(f.video=x[Me]),a(f,g),z(f.urn)&&((S=this.analytics)==null||S.track("Edit Item",{contents:g})),this.setState({isDirty:!1}),this.handleOnResetItem()}});c(this,"handleOnResetItem",()=>{const{selectedItem:e}=this.props;e&&this.setItem(e)});c(this,"handleOpenThumbnailDialog",()=>{const{selectedItem:e,onOpenModal:s}=this.props;(e==null?void 0:e.type)===L.EMOTE?s("EditThumbnailModal",{onSaveThumbnail:this.handleEmoteThumbnailChange,item:e}):this.thumbnailInput.current&&this.thumbnailInput.current.click()});c(this,"handleEmoteThumbnailChange",e=>{const s=Ms(e);this.setState({thumbnail:e,contents:{[Le]:s},isDirty:!0})});c(this,"handleThumbnailChange",async e=>{const{files:s}=e.target;if(s&&s.length>0){const a=s[0],n=await Oe(a),l=await Oe(a,1024,1024),o=URL.createObjectURL(n);this.setState({thumbnail:o,contents:{[Le]:l},isDirty:!0})}});c(this,"handleDownloadItem",()=>{const{selectedItemId:e,onDownload:s}=this.props;e&&s(e)})}componentDidMount(){const{selectedItem:e}=this.props;e&&this.setItem(e)}componentDidUpdate(e){const{selectedItemId:s,selectedItem:a}=this.props;e.selectedItemId!==s?a?this.setItem(a):this.setState(this.getInitialState()):a&&(!e.selectedItem||this.hasSavedItem())&&this.setItem(a)}setItem(e){var a;const s=e.data;Ie(e)&&((a=s.replaces)!=null&&a.length)&&(s.hides=s.hides.concat(s.replaces),s.replaces=[]),this.setState({thumbnail:"",video:"",name:e.name,description:e.description,utility:e.utility||"",rarity:e.rarity,data:e.data,hasItem:!0,isDirty:!1})}getInitialState(){return{name:"",description:"",utility:"",thumbnail:"",video:"",rarity:void 0,contents:{},data:void 0,hasItem:!1,isDirty:!1}}setReplaces(e,s){return{...e,replaces:s,representations:e.representations.map(a=>({...a,overrideReplaces:s}))}}setHides(e,s){return{...e,hides:s,representations:e.representations.map(a=>({...a,overrideHides:s}))}}canEditItemMetadata(e){const{collection:s,canEditSelectedItem:a}=this.props;return!e||s&&ke(s)?!1:a}isSkin(){const{data:e}=this.state;return(e==null?void 0:e.category)===P.WearableCategory.SKIN}isDirty(e={}){const{selectedItem:s}=this.props,{hasItem:a}=this.state;return a?this.hasStateItemChanged({...this.state,...e},s):!1}hasSavedItem(){const{selectedItem:e}=this.props,{isDirty:s}=this.state;return e&&!s&&this.hasStateItemChanged(this.state,e)}hasStateItemChanged(e,s){return e.name!==s.name||e.description!==s.description||e.utility!==s.utility||e.rarity!==s.rarity||!ze(e.data,s.data)}asCategorySelect(e,s){return s.map(a=>({value:a,text:r(`${e}.category.${a}`)}))}asRaritySelect(e){return e.map(s=>({value:s,text:r(`wearable.rarity.${s}`)}))}asPlayModeSelect(e){return e.map(s=>({value:s,text:r(`emote.play_mode.${s}.text`),description:r(`emote.play_mode.${s}.description`)}))}renderOverrides(e){const s=this.canEditItemMetadata(e),a=this.state.data;if(!e||ce(a))return null;const n=Ds(e.contents,a.category),l=Ls(e.contents),o=a.hides.filter(g=>n.includes(g)),h=a.hides.filter(g=>l.includes(g));return t.jsxs(t.Fragment,{children:[t.jsx(be,{itemId:e.id,label:r("item_editor.right_panel.base_body"),info:r("item_editor.right_panel.base_body_info"),value:h,options:this.asCategorySelect(e.type,l),disabled:!s,onChange:g=>this.handleChangeHides(g,"bodypart")}),t.jsx(be,{itemId:e.id,label:r("item_editor.right_panel.wearables"),info:r("item_editor.right_panel.wearables_info"),value:o,options:this.asCategorySelect(e.type,o.some(g=>g===P.WearableCategory.BODY_SHAPE)?n:n.filter(g=>g!==P.WearableCategory.BODY_SHAPE)),disabled:!s,onChange:g=>this.handleChangeHides(g,"wearable")})]})}renderModelDetails(e){const{isDownloading:s}=this.props,{thumbnail:a}=this.state,n=this.canEditItemMetadata(e),l=s?t.jsx(d.Loader,{active:!0,size:"tiny",className:"donwload-item-loader"}):t.jsx(V,{name:"export",className:"download-item-button",onClick:this.handleDownloadItem});return t.jsxs("div",{className:"details",children:[n?t.jsxs(t.Fragment,{children:[t.jsx(V,{name:"edit",className:"edit-item-file",onClick:this.handleChangeItemFile}),l,t.jsxs("div",{className:"thumbnail-container",children:[t.jsx(pe,{item:e,src:a,hasBadge:!0,badgeSize:"small"}),t.jsxs("div",{className:"thumbnail-edit-container",children:[t.jsx("input",{type:"file",ref:this.thumbnailInput,onChange:this.handleThumbnailChange,accept:"image/png"}),t.jsx("div",{className:"thumbnail-edit-background"}),t.jsx(V,{name:"camera",onClick:this.handleOpenThumbnailDialog})]})]})]}):t.jsxs(t.Fragment,{children:[l,t.jsx(pe,{item:e,src:a,hasBadge:!0,badgeSize:"small"})]}),t.jsx(Os,{item:e})]})}renderVideoDetails(e){if(!Be(e))return null;const s=this.canEditItemMetadata(e),a=s?()=>this.handleOpenVideoDialog():()=>this.handleOpenVideoDialog({viewOnly:!0});return t.jsx("div",{className:"details",children:s?t.jsxs(t.Fragment,{children:[t.jsx(V,{name:"edit",className:"edit-item-file",onClick:a}),t.jsx(V,{name:"play",className:"play-video-button",onClick:a}),t.jsx(We,{item:e,src:this.state.video,showMetrics:!0,onClick:a})]}):t.jsxs(t.Fragment,{children:[ks(e)&&t.jsx(V,{name:"play",className:"play-video-button",onClick:a}),t.jsx(We,{item:e,src:this.state.video,showMetrics:!0})]})})}renderPermissions(e){return t.jsx(Bs,{requiredPermissions:e.data.requiredPermissions})}render(){const{selectedItemId:e,address:s,isWearableUtilityEnabled:a,isConnected:n,error:l,isCampaignEnabled:o,isVrmOptOutEnabled:h,campaignName:g,campaignTag:p}=this.props,{name:E,description:w,utility:S,rarity:j,data:x,isDirty:f,hasItem:T}=this.state,R=P.Rarity.getRarities(),M=Ws();return t.jsx("div",{className:"RightPanel",children:n?t.jsx(na,{id:e,children:(I,u,N)=>{var O;const k=u&&ke(u),_=this.canEditItemMetadata(I),v=I?Ie(I)?Fs(I.contents):Hs():[];return N?t.jsx(d.Loader,{size:"massive",active:!0}):T||!e?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"header",children:[t.jsx("div",{className:"title",children:r("item_editor.right_panel.properties")}),I&&tt(I,s)&&!I.isPublished&&!k?t.jsx(d.Dropdown,{trigger:t.jsx("div",{className:"actions"}),inline:!0,direction:"left",children:t.jsxs(d.Dropdown.Menu,{children:[ue(I)!==null?t.jsx(d.Dropdown.Item,{text:r("item_detail_page.add_representation",{bodyShape:r(`body_shapes.${ue(I)}`).toLowerCase()}),onClick:this.handleAddRepresentationToItem}):null,t.jsx(st,{name:E,onDelete:this.handleDeleteItem,trigger:t.jsx(d.Dropdown.Item,{text:r("global.delete")})})]})}):null]}),t.jsxs("div",{className:"container",children:[t.jsx(W,{label:r("item_editor.right_panel.details"),children:I?t.jsxs(t.Fragment,{children:[this.renderModelDetails(I),this.renderVideoDetails(I)]}):null}),t.jsx(W,{label:r("item_editor.right_panel.basics"),children:I?t.jsxs(t.Fragment,{children:[t.jsx(ka,{label:r("global.name"),value:E,disabled:!_,maxLength:Vs,onChange:this.handleChangeName}),t.jsx(d.TextAreaField,{maxLength:Us,onChange:this.handleChangeDescription,label:r("global.description"),placeholder:r("item_editor.right_panel.description_placeholder"),disabled:!_,value:w,rows:"2",cols:"12"}),a?t.jsx(d.TextAreaField,{maxLength:$s,onChange:this.handleChangeUtility,label:r("global.utility"),placeholder:r("item_editor.right_panel.utility_placeholder"),disabled:!_,value:S,tooltip:{content:r("item_editor.right_panel.utility_tooltip")},rows:"2",cols:"12"}):null,t.jsx(le,{itemId:I.id,label:r("global.category"),value:x.category,options:this.asCategorySelect(I.type,v),disabled:!_,onChange:this.handleChangeCategory}),!(I.urn&&z(I.urn))&&t.jsx(le,{itemId:I.id,label:r("global.rarity"),value:j,options:this.asRaritySelect(R),disabled:I.isPublished||!_,onChange:this.handleChangeRarity})]}):null}),(I==null?void 0:I.type)===L.WEARABLE&&t.jsx(W,{label:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"overrides-label-panel",children:r("item_editor.right_panel.overrides")}),t.jsx(ie,{content:r("item_editor.right_panel.overrides_info"),className:"info"})]}),children:this.renderOverrides(I)}),(I==null?void 0:I.type)===L.EMOTE&&t.jsx(W,{label:r("item_editor.right_panel.animation"),children:I?t.jsx(le,{itemId:I.id,label:r("create_single_item_modal.play_mode_label"),value:x.loop?he.LOOP:he.SIMPLE,options:this.asPlayModeSelect(M),disabled:!_,onChange:this.handlePlayModeChange}):null}),I&&Be(I)&&((O=I.data.requiredPermissions)!=null&&O.length)?t.jsx(W,{label:r("item_editor.right_panel.required_permissions"),children:this.renderPermissions(I)}):null,t.jsx(W,{label:r("item_editor.right_panel.tags"),children:I?t.jsxs(t.Fragment,{children:[t.jsx(it,{itemId:I.id,value:x.tags,onChange:this.handleChangeTags,isDisabled:!_}),o&&g&&p&&_&&t.jsx("p",{className:"event-tag",children:r("item_editor.right_panel.event_tag",{event_tag:t.jsx("span",{children:p}),event_name:t.jsx("span",{children:g})})})]}):null}),(I==null?void 0:I.type)===L.WEARABLE&&h&&t.jsx(W,{label:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"overrides-label-panel",children:r("item_editor.right_panel.copyright.title")}),t.jsx(ie,{content:r("item_editor.right_panel.copyright.info"),className:"info"})]}),children:t.jsx("div",{className:"right-panel-copyright-section",children:t.jsxs("div",{className:"right-panel-export-protection",children:[t.jsx("span",{children:r("item_editor.right_panel.copyright.vrm_export")}),t.jsx(d.Checkbox,{toggle:!0,label:x!=null&&x.blockVrmExport?r("item_editor.right_panel.copyright.disabled"):r("item_editor.right_panel.copyright.enabled"),checked:!(x!=null&&x.blockVrmExport),onChange:this.handleAllowVrmExport,"aria-label":r("item_editor.right_panel.copyright.vrm_export")})]})})}),(I==null?void 0:I.type)===L.WEARABLE&&t.jsx(W,{label:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"overrides-label-panel",children:r("item_editor.right_panel.outline_compatible.title")}),t.jsx(ie,{content:r("item_editor.right_panel.outline_compatible.info"),className:"info"})]}),children:t.jsx("div",{className:"right-panel-copyright-section",children:t.jsxs("div",{className:"right-panel-export-protection",children:[t.jsx("span",{children:r("item_editor.right_panel.outline_compatible.title")}),t.jsx(d.Checkbox,{toggle:!0,label:(x==null?void 0:x.outlineCompatible)!==!1?r("item_editor.right_panel.copyright.enabled"):r("item_editor.right_panel.copyright.disabled"),checked:(x==null?void 0:x.outlineCompatible)!==!1,onChange:this.handleAllowOutlineCompatible,"aria-label":r("item_editor.right_panel.outline_compatible.title")})]})})}),f?t.jsxs("div",{className:"edit-buttons",children:[t.jsx(d.Button,{secondary:!0,onClick:this.handleOnResetItem,children:r("global.cancel")}),t.jsx(Fe,{primary:!0,onClick:this.handleOnSaveItem,network:P.Network.MATIC,children:r("global.save")})]}):l&&e?t.jsxs("p",{className:"danger-text",children:[r("global.error_ocurred"),": ",l]}):null]})]}):null}}):null})}};const Wa=()=>{const i=se(),m=we(),e=C(u=>ae(u)),s=C(u=>xe(u)),a=C(u=>Gs(u)),n=C(u=>Ys(u)),l=C(u=>Ve(u)),o=C(u=>Js(u)),h=C(u=>ta(u)),g=C(u=>zs(u)),p=C(u=>qs(u)),E=C(u=>m?fe(u,m):null),w=C(u=>m&&E&&E.collectionId?Ee(u,E.collectionId):null),S=C(u=>{const N=sa(u),k=aa(u);return N==null?void 0:N[k]}),j=C(u=>Zs(u)),x=C(u=>!E||!e?!1:w?$e(u,e,w):tt(E,e)),f=b.useMemo(()=>m?j[m]:null,[m,j]),T=b.useCallback((u,N)=>i(Ks(u,N)),[i]),R=b.useCallback(u=>i(Ye(u)),[i]),M=b.useCallback((u,N)=>i(Ge(u,N)),[i]),I=b.useCallback(u=>i(Qs(u)),[i]);return t.jsx(Ba,{address:e,collection:w,selectedItem:E,selectedItemId:m,canEditSelectedItem:x,itemStatus:f,error:a,isConnected:s,isDownloading:n,isCommitteeMember:l,isCampaignEnabled:o,campaignTag:h,campaignName:S,isVrmOptOutEnabled:g,isWearableUtilityEnabled:p,onSaveItem:T,onDeleteItem:R,onOpenModal:M,onDownload:I})},Fa=Wa;class tn extends b.PureComponent{constructor(){super(...arguments);c(this,"state",{reviewedItems:[]});c(this,"handleOnSetReviewedItems",e=>{this.setState(s=>({reviewedItems:[...s.reviewedItems,...e.filter(a=>!s.reviewedItems.some(n=>n.id===a.id))]}))});c(this,"handleResetReviewedItems",()=>{this.setState({reviewedItems:[]})})}render(){const{reviewedItems:e}=this.state;return t.jsx(t.Fragment,{children:t.jsxs("div",{className:"ItemEditorPage",children:[t.jsx(Ia,{reviewedItems:e}),t.jsxs("div",{className:"content",children:[t.jsx(Na,{reviewedItems:e,onResetReviewedItems:this.handleResetReviewedItems,onSetReviewedItems:this.handleOnSetReviewedItems}),t.jsx(Oa,{}),t.jsx(Fa,{})]})]})})}}export{tn as default};
|
package/assets/index-B9la4WTD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aM as ye,ae as te,Z as ne,H as e,cU as z,G as n,N as Re,cV as me,a1 as ae,cW as Y,M as s,cX as Q,cY as De,cZ as M,cG as Pe,D as l,K as k,aA as le,bJ as Ae,a4 as ge,a5 as _,c_ as We,c$ as pe,d0 as Oe,bD as L,d1 as Ue,cM as xe,d2 as se,d3 as Ce,d4 as je,d5 as de,d6 as ue,d7 as K,d8 as G,J as be,$ as he,cI as Be,d9 as Me,da as Ie,cJ as He,db as $e,c5 as Fe,dc as ze,a6 as Ke,ad as Ge,dd as Ye,de as Qe,cN as Ve,X,df as qe,cO as Je,cP as Xe,c6 as Ze,dg as es}from"./index-LbPj94fr.js";import{a as we,N as ss}from"./Navigation.container-m_5Xay6X.js";import{L as ts}from"./LoggedInDetailPage.container-BLLfFAse.js";import"./selectors-CSnw6goy.js";import"./SignInRequired-cMu1CrC_.js";var B=(t=>(t.DESC="DESC",t.ASC="ASC",t))(B||{});const Ne="tab";var b=(t=>(t.DCL="dcl",t.ENS="ens",t.CONTRIBUTOR="contributor",t))(b||{});const Ee=()=>{const t=ye(),a=new URLSearchParams(t.search),c=a.get(Ne),m={urlSearchParams:a,pathname:t.pathname};switch(c){case"dcl":m.tab="dcl";break;case"ens":m.tab="ens";break;case"contributor":m.tab="contributor";break}return m},ns=({isWorldContributorEnabled:t})=>{const{tab:a,pathname:c,urlSearchParams:m}=Ee(),d=ne(),g=o=>{const i=new URLSearchParams(m);i.set(Ne,o),d.push(`${c}?${i.toString()}`)};return!a||a===b.CONTRIBUTOR&&!t?(g(b.DCL),null):e.jsxs(z,{children:[e.jsx(z.Tab,{active:a===b.DCL,onClick:()=>g(b.DCL),children:n("worlds_list_page.name_tabs.dcl_names")}),e.jsx(z.Tab,{active:a===b.ENS,onClick:()=>g(b.ENS),children:n("worlds_list_page.name_tabs.ens_names")}),t&&e.jsx(z.Tab,{active:a===b.CONTRIBUTOR,onClick:()=>g(b.CONTRIBUTOR),children:n("worlds_list_page.name_tabs.contributor_names")})]})},as=te.memo(ns),ls=t=>({isWorldContributorEnabled:me(t)}),rs=Re(ls)(as),os="_container_12bci_1",is="_used_12bci_7",cs="_description_12bci_13",ds="_link_12bci_20",us="_space_12bci_27",bs="_current_12bci_33",hs="_bar_12bci_38",T={container:os,used:is,description:cs,link:ds,space:us,current:bs,bar:hs},_s="worlds-storage-current-mbs",ms="worlds-storage-bar-front",gs="worlds-storage",ps=({maxBytes:t,currentBytes:a,className:c,onViewDetails:m})=>{const d=Q(t),g=Q(a),o=g*100/d;return e.jsxs("div",{"data-testid":gs,className:ae(T.container,c),children:[e.jsx("span",{className:T.used,children:n("worlds_list_page.worlds_storage.used")}),e.jsxs("div",{className:T.description,children:[e.jsx("span",{children:n("worlds_list_page.worlds_storage.description")})," ",e.jsx("span",{className:T.link,onClick:m,children:n("worlds_list_page.worlds_storage.link")})]}),e.jsxs("div",{className:T.space,children:[e.jsxs("div",{"data-testid":_s,children:[e.jsx("span",{className:T.current,children:Y(g)})," / ",Y(d)," Mb"]}),e.jsx(s.Progress,{"data-testid":ms,percent:Math.trunc(o),className:T.bar,size:"small"})]})]})},xs=te.memo(ps),Cs="_worldUrl_1sb6i_1",js="_rightContainer_1sb6i_7",ws="_copyUrn_1sb6i_13",Z={worldUrl:Cs,rightContainer:js,copyUrn:ws};function Se({ens:t,deploymentsByWorlds:a}){const c=De(t.subdomain);return M(a,t)?e.jsxs("div",{className:Z.worldUrl,children:[e.jsx("span",{children:c}),e.jsxs("div",{className:Z.rightContainer,children:[e.jsx(Pe,{role:"button",text:c,showPopup:!0,children:e.jsx(s.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:ae("copy",Z.copyUrn),name:"copy outline"})}),e.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",children:e.jsx(s.Icon,{name:"external alternate"})})]})]}):e.jsx("span",{className:"empty-url",children:n("worlds_list_page.table.empty_url")})}function Te({deploymentsByWorlds:t,ens:a,projects:c,onEditScene:m,onUnpublishScene:d,onPublishScene:g}){const o=t[a.subdomain];return M(t,a)?e.jsxs("div",{className:"publish-scene",children:[e.jsx(s.Popup,{content:o==null?void 0:o.name,on:"hover",trigger:e.jsx("span",{children:o==null?void 0:o.name})}),c.find(i=>i.id===(o==null?void 0:o.projectId))?m&&e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>m(a),children:n("worlds_list_page.table.edit_scene")}):d&&e.jsx(s.Popup,{content:n("worlds_list_page.table.scene_published_outside_builder"),on:"hover",position:"top center",trigger:e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>d(a),children:n("worlds_list_page.table.unpublish_scene")})})]}):e.jsxs("div",{className:"publish-scene",children:[e.jsx("span",{children:"-"}),g&&e.jsx(s.Button,{primary:!0,size:"small",onClick:g,children:n("worlds_list_page.table.publish_scene")})]})}function Ns({items:t,deploymentsByWorlds:a,projects:c,loading:m,error:d,onUnpublishWorld:g}){const o=ne(),i=l.useCallback(()=>{o.push(k.scenes())},[o]),N=l.useCallback(p=>{const{projectId:x}=a[p.subdomain];o.push(k.sceneDetail(x))},[a,k,o]),E=l.useCallback(p=>{var C;const x=(C=a[p.subdomain])==null?void 0:C.id;x&&g(x)},[a,g]);return d?e.jsx(s.Message,{error:!0,size:"tiny",visible:!0,content:d.message,header:n("worlds_list_page.error_title")}):m?e.jsx(s.Loader,{active:!0,size:"big"}):t.length?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"1",children:n("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"1",children:n("worlds_list_page.table.owner")}),e.jsx(s.Table.HeaderCell,{width:"2",children:n("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:n("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",children:n("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",children:n("worlds_list_page.table.permissions")})]})}),e.jsx(s.Table.Body,{children:t.map((p,x)=>{var v,y;const C=(v=p.userPermissions)==null?void 0:v.includes("deployment"),f=(y=p.userPermissions)==null?void 0:y.map(R=>n(`worlds_list_page.table.user_permissions.${R}`)).join("/");return e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:1,children:p.name}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Ae,{address:p.nftOwnerAddress||""})}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Se,{deploymentsByWorlds:a,ens:p})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Te,{deploymentsByWorlds:a,ens:p,projects:c,onEditScene:C?N:void 0,onPublishScene:C?i:void 0,onUnpublishScene:C?E:void 0})}),e.jsx(s.Table.Cell,{width:1,children:Y(Q(Number(p.size)||0))}),e.jsx(s.Table.Cell,{width:1,children:f})]},x)})})]}):e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:"empty-icon dcl-icon"}),e.jsx("div",{className:"empty-title",children:n("worlds_list_page.empty_contributor_list.title")}),e.jsx("div",{className:"empty-description",children:n("worlds_list_page.empty_contributor_list.description",{b:p=>e.jsx("b",{children:p})})}),e.jsx(s.Button,{as:"a",href:`${le.get("MARKETPLACE_WEB_URL")}/names/claim`,target:"_blank",className:"empty-action",primary:!0,children:n("worlds_list_page.empty_list.cta")})]})}const Es=()=>{const t=ge(),a=we(),c=_(We),m=_(pe),d=_(Oe),g=_(i=>L(xe(i),Ue)||L(Ce(i),se)),o=l.useCallback(i=>t(je(i)),[t]);return e.jsx(Ns,{items:c,deploymentsByWorlds:m,projects:a,loading:g,error:d,onUnpublishWorld:o})},_e="Worlds List Page Action",Ss=le.get("ENS_DOMAINS_URL",""),Ts=le.get("MARKETPLACE_WEB_URL"),ee=12,Ls=t=>{const{ensList:a,externalNames:c,error:m,deploymentsByWorlds:d,isLoading:g,projects:o,worldsWalletStats:i,isConnected:N,isWorldContributorEnabled:E,ensTotal:p,onOpenYourStorageModal:x,onOpenWorldsForENSOwnersAnnouncementModal:C,onUnpublishWorld:f,onOpenPermissionsModal:v,onFetchContributableNames:y,onFetchENSList:R}=t,[I,D]=l.useState(B.DESC),[O,U]=l.useState(1),{tab:h}=Ee(),P=ne();l.useEffect(()=>{N&&E&&y()},[N,E]),l.useEffect(()=>{h===b.DCL&&R(ee,(O-1)*ee)},[R,O]);const A=l.useCallback(()=>{h===b.DCL?(de(_e,{action:"Click Claim NAME"}),window.open(`${Ts}/names/claim`,"_blank","noopener,noreferrer")):(de(_e,{action:"Click Claim ENS Domain"}),window.open(Ss,"_blank","noopener,noreferrer"))},[h]),V=l.useCallback(()=>{P.push(k.scenes())},[k,P]),q=l.useCallback(u=>{const{projectId:r}=d[u.subdomain];P.push(k.sceneDetail(r))},[d,k,P]),w=l.useCallback(u=>{var j;const r=(j=d[u.subdomain])==null?void 0:j.id;r&&f(r)},[d,f]),W=l.useCallback((u,r)=>{U(+r.activePage)},[]),re=l.useCallback(()=>e.jsx(s.Dropdown,{direction:"left",value:I,options:[{value:B.ASC,text:n("global.order.name_asc")},{value:B.DESC,text:n("global.order.name_desc")}],onChange:(u,{value:r})=>D(r)}),[I,D]),oe=l.useCallback(u=>{let r=M(d,u)?"active":"inactive";if(r==="active"&&i&&!ue(u.subdomain))switch(K(i).status){case G.BLOCKED:{r="blocked";break}case G.TO_BE_BLOCKED:r="warning"}return e.jsx("span",{className:`world-status ${r}`,children:n(`worlds_list_page.table.status_${r}`)})},[K,ue,M]),ie=l.useCallback((u,r)=>{var F;const j=h===b.DCL?r==null?void 0:r.dclNames:r==null?void 0:r.ensNames;if(!M(d,u)||!j)return"-";const S=(F=j.find(ve=>ve.name===u.subdomain))==null?void 0:F.size,J=h===b.ENS?" / 25":"";return Y(Q(Number(S)))+J},[h]),Le=l.useCallback((u,r)=>{v(r)},[]),H=l.useCallback(()=>{const u=h===b.DCL?p:c.length,r=Math.ceil(u/ee),j=h===b.DCL?a:c;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{children:e.jsx(s.Row,{children:e.jsx(s.Header,{sub:!0,className:"items-count",children:n("ens_list_page.items",{count:t.ensTotal.toLocaleString()})})})}),e.jsx(s.Column,{align:"right",children:e.jsx(s.Row,{children:re()})}),e.jsx(s.Column,{align:"right",grow:!1,shrink:!0,children:e.jsx(s.Row,{children:e.jsx("div",{className:"actions",children:e.jsx(s.Button,{basic:!0,onClick:A,children:e.jsx(be,{name:"add-active"})})})})})]})})}),e.jsx(s.Container,{children:e.jsxs(s.Section,{className:"table-section",children:[e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"2",children:n("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"2",children:n("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:n("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:n("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:n("worlds_list_page.table.status")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center"})]})}),e.jsx(s.Table.Body,{children:j.map((S,J)=>e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:2,children:S.name}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Se,{deploymentsByWorlds:d,ens:S})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Te,{deploymentsByWorlds:d,ens:S,projects:o,onEditScene:q,onPublishScene:V,onUnpublishScene:w})}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:ie(S,i)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:oe(S)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:e.jsx(s.Button,{basic:!0,onClick:F=>Le(F,S.subdomain),children:"Permissions"})})]},J))})]}),r>1&&e.jsx(s.Pagination,{firstItem:null,lastItem:null,totalPages:r,activePage:O,onPageChange:W})]})})]})},[h,a,c,A,re,ie,oe,W,p]),$=l.useCallback(()=>e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:ae("empty-icon",h===b.DCL?"dcl-icon":"ens-icon")}),e.jsx("div",{className:"empty-title",children:h===b.DCL?n("worlds_list_page.empty_list.title"):n("worlds_list_page.empty_list.title_ens")}),e.jsx("div",{className:"empty-description",children:h===b.DCL?n("worlds_list_page.empty_list.description",{b:u=>e.jsx("b",{children:u})}):n("worlds_list_page.empty_list.description_ens",{b:u=>e.jsx("b",{children:u})})}),e.jsx(s.Button,{className:"empty-action",primary:!0,onClick:A,children:h===b.DCL?n("worlds_list_page.empty_list.cta"):n("worlds_list_page.empty_list.cta_ens")})]}),[h,A]),ce=l.useCallback(()=>{if(!i)return null;const u=K(i);if(u.status===G.OK)return null;let r;return u.status===G.TO_BE_BLOCKED?r=n("worlds_list_page.worlds_warning_message.to_be_blocked",{toBeBlockedAt:u.toBeBlockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}):r=n("worlds_list_page.worlds_warning_message.blocked",{blockedAt:u.blockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}),e.jsxs("div",{className:"insufficient-storage-message",children:[e.jsx("div",{children:e.jsx(be,{name:"alert-warning"})}),e.jsx("div",{children:r})]})},[i,K]),ke=l.useCallback(()=>a.length?e.jsxs("div",{children:[i?e.jsx(xs,{maxBytes:Number(i.maxAllowedSpace),currentBytes:Number(i.usedSpace),className:"worlds-storage",onViewDetails:()=>{x({stats:i})}}):null,ce(),H()]}):e.jsx("div",{children:$()}),[a,i,H,$,ce,x]),fe=l.useCallback(()=>e.jsx("div",{children:c.length>0?H():$()}),[c,$,H]);return l.useEffect(()=>{D(B.ASC),U(1)},[h,U,D]),l.useEffect(()=>{he()&&C()},[he,C]),e.jsx(ts,{className:"WorldListPage view",error:m,activeTab:ss.WORLDS,isLoading:g,isPageFullscreen:!0,children:e.jsxs(s.Container,{children:[e.jsx("h1",{children:n("worlds_list_page.title")}),e.jsx(rs,{}),h===b.DCL&&ke(),h===b.ENS&&fe(),h===b.CONTRIBUTOR&&E&&e.jsx(Es,{})]})})},ks=te.memo(Ls),fs=()=>{const t=ge(),a=we(),c=_(Be),m=_(Me),d=_(pe),g=_(Ie),o=_(He),i=_($e),N=_(xe),E=_(Ce),p=_(Fe),x=_(ze),C=_(Ke),f=_(Ge),v=_(Ye),y=_(Qe),R=_(me),I=_(Ve),D=(o==null?void 0:o.message)??i??void 0,O=l.useMemo(()=>L(N,Xe)||L(E,se)||L(p,Ze)||L(x,se)||L(N,es)||C,[N,E,p,x,C]),U=l.useCallback(w=>t(X("WorldsYourStorageModal",w)),[t]),h=l.useCallback((w,W)=>t(X("WorldPermissionsModal",{worldName:w,isCollaboratorsTabShown:W})),[t]),P=l.useCallback(()=>t(X("WorldsForENSOwnersAnnouncementModal")),[t]),A=l.useCallback(w=>t(je(w)),[t]),V=l.useCallback(()=>t(qe()),[t]),q=l.useCallback((w,W)=>t(Je(w,W)),[t]);return e.jsx(ks,{ensList:c,externalNames:m,deploymentsByWorlds:d,projects:a,worldsPermissions:g,error:D,isLoading:O,isLoggedIn:f,worldsWalletStats:v,isConnected:y,isWorldContributorEnabled:R,ensTotal:I,onOpenYourStorageModal:U,onOpenPermissionsModal:h,onOpenWorldsForENSOwnersAnnouncementModal:P,onUnpublishWorld:A,onFetchContributableNames:V,onFetchENSList:q})},As=fs;export{As as default};
|
package/assets/index-BGOe_558.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var ue=Object.defineProperty;var he=(n,t,e)=>t in n?ue(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var v=(n,t,e)=>he(n,typeof t!="symbol"?t+"":t,e);import{bV as x,bW as b,cf as j,hD as ge,gt as T,gF as fe,Z as me,D as A,hE as J,K as ve,H as o,G as c,M as l,dF as pe,eS as K,bJ as V,N as re,aG as we,ev as Ce,X as Te,ex as xe,ae as _e,ey as O,bk as be,hF as ye,eA as Ee,eD as De,ec as Oe,br as Se,hG as Pe,a7 as je,bD as q,hH as Me,eF as Ne,gw as Le,eI as Ue,eM as ke,hI as Re,eO as Ye,hJ as Ae}from"./index-LbPj94fr.js";import{d as Ie,e as We,c as Fe}from"./selectors-CSnw6goy.js";import{N as Be}from"./NotFound-BTo5pEaG.js";import{L as He}from"./LoggedInDetailPage.container-BLLfFAse.js";import{N as $e}from"./Navigation.container-m_5Xay6X.js";import{C as qe}from"./CollectionStatus.container-SecVXoKZ.js";import{C as Ge,T as Qe}from"./ThirdPartyKindBadge-85NbLCqg.js";import{s as I,a as Ve}from"./date-C90QIauR.js";import{g as X,e as Xe,l as Je}from"./index-BaBcvmM1.js";import"./SignInRequired-cMu1CrC_.js";function Ke(n,t){x(2,arguments);var e=b(n).getTime(),a=j(t);return new Date(e+a)}function Ze(n){return x(1,arguments),n instanceof Date||ge(n)==="object"&&Object.prototype.toString.call(n)==="[object Date]"}function ze(n){if(x(1,arguments),!Ze(n)&&typeof n!="number")return!1;var t=b(n);return!isNaN(Number(t))}function et(n,t){x(2,arguments);var e=j(t);return Ke(n,-e)}var tt=864e5;function at(n){x(1,arguments);var t=b(n),e=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var a=t.getTime(),r=e-a;return Math.floor(r/tt)+1}function W(n){x(1,arguments);var t=1,e=b(n),a=e.getUTCDay(),r=(a<t?7:0)+a-t;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function ne(n){x(1,arguments);var t=b(n),e=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(e+1,0,4),a.setUTCHours(0,0,0,0);var r=W(a),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var s=W(i);return t.getTime()>=r.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function rt(n){x(1,arguments);var t=ne(n),e=new Date(0);e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0);var a=W(e);return a}var nt=6048e5;function it(n){x(1,arguments);var t=b(n),e=W(t).getTime()-rt(t).getTime();return Math.round(e/nt)+1}function ie(n,t){var e,a,r,i,s,u,f,h;x(1,arguments);var p=b(n),w=p.getUTCFullYear(),g=X(),m=j((e=(a=(r=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:g.firstWeekContainsDate)!==null&&a!==void 0?a:(f=g.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&e!==void 0?e:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var _=new Date(0);_.setUTCFullYear(w+1,0,m),_.setUTCHours(0,0,0,0);var M=I(_,t),D=new Date(0);D.setUTCFullYear(w,0,m),D.setUTCHours(0,0,0,0);var B=I(D,t);return p.getTime()>=M.getTime()?w+1:p.getTime()>=B.getTime()?w:w-1}function ot(n,t){var e,a,r,i,s,u,f,h;x(1,arguments);var p=X(),w=j((e=(a=(r=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:p.firstWeekContainsDate)!==null&&a!==void 0?a:(f=p.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&e!==void 0?e:1),g=ie(n,t),m=new Date(0);m.setUTCFullYear(g,0,w),m.setUTCHours(0,0,0,0);var _=I(m,t);return _}var st=6048e5;function lt(n,t){x(1,arguments);var e=b(n),a=I(e,t).getTime()-ot(e,t).getTime();return Math.round(a/st)+1}function d(n,t){for(var e=n<0?"-":"",a=Math.abs(n).toString();a.length<t;)a="0"+a;return e+a}var E={y:function(t,e){var a=t.getUTCFullYear(),r=a>0?a:1-a;return d(e==="yy"?r%100:r,e.length)},M:function(t,e){var a=t.getUTCMonth();return e==="M"?String(a+1):d(a+1,2)},d:function(t,e){return d(t.getUTCDate(),e.length)},a:function(t,e){var a=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h:function(t,e){return d(t.getUTCHours()%12||12,e.length)},H:function(t,e){return d(t.getUTCHours(),e.length)},m:function(t,e){return d(t.getUTCMinutes(),e.length)},s:function(t,e){return d(t.getUTCSeconds(),e.length)},S:function(t,e){var a=e.length,r=t.getUTCMilliseconds(),i=Math.floor(r*Math.pow(10,a-3));return d(i,e.length)}},P={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ct={G:function(t,e,a){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return a.era(r,{width:"abbreviated"});case"GGGGG":return a.era(r,{width:"narrow"});case"GGGG":default:return a.era(r,{width:"wide"})}},y:function(t,e,a){if(e==="yo"){var r=t.getUTCFullYear(),i=r>0?r:1-r;return a.ordinalNumber(i,{unit:"year"})}return E.y(t,e)},Y:function(t,e,a,r){var i=ie(t,r),s=i>0?i:1-i;if(e==="YY"){var u=s%100;return d(u,2)}return e==="Yo"?a.ordinalNumber(s,{unit:"year"}):d(s,e.length)},R:function(t,e){var a=ne(t);return d(a,e.length)},u:function(t,e){var a=t.getUTCFullYear();return d(a,e.length)},Q:function(t,e,a){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return d(r,2);case"Qo":return a.ordinalNumber(r,{unit:"quarter"});case"QQQ":return a.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,a){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return d(r,2);case"qo":return a.ordinalNumber(r,{unit:"quarter"});case"qqq":return a.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,a){var r=t.getUTCMonth();switch(e){case"M":case"MM":return E.M(t,e);case"Mo":return a.ordinalNumber(r+1,{unit:"month"});case"MMM":return a.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,a){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return d(r+1,2);case"Lo":return a.ordinalNumber(r+1,{unit:"month"});case"LLL":return a.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,a,r){var i=lt(t,r);return e==="wo"?a.ordinalNumber(i,{unit:"week"}):d(i,e.length)},I:function(t,e,a){var r=it(t);return e==="Io"?a.ordinalNumber(r,{unit:"week"}):d(r,e.length)},d:function(t,e,a){return e==="do"?a.ordinalNumber(t.getUTCDate(),{unit:"date"}):E.d(t,e)},D:function(t,e,a){var r=at(t);return e==="Do"?a.ordinalNumber(r,{unit:"dayOfYear"}):d(r,e.length)},E:function(t,e,a){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return a.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(r,{width:"short",context:"formatting"});case"EEEE":default:return a.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,a,r){var i=t.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return d(s,2);case"eo":return a.ordinalNumber(s,{unit:"day"});case"eee":return a.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(i,{width:"short",context:"formatting"});case"eeee":default:return a.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,a,r){var i=t.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return d(s,e.length);case"co":return a.ordinalNumber(s,{unit:"day"});case"ccc":return a.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(i,{width:"narrow",context:"standalone"});case"cccccc":return a.day(i,{width:"short",context:"standalone"});case"cccc":default:return a.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,a){var r=t.getUTCDay(),i=r===0?7:r;switch(e){case"i":return String(i);case"ii":return d(i,e.length);case"io":return a.ordinalNumber(i,{unit:"day"});case"iii":return a.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(r,{width:"short",context:"formatting"});case"iiii":default:return a.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,a){var r=t.getUTCHours(),i=r/12>=1?"pm":"am";switch(e){case"a":case"aa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,a){var r=t.getUTCHours(),i;switch(r===12?i=P.noon:r===0?i=P.midnight:i=r/12>=1?"pm":"am",e){case"b":case"bb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,a){var r=t.getUTCHours(),i;switch(r>=17?i=P.evening:r>=12?i=P.afternoon:r>=4?i=P.morning:i=P.night,e){case"B":case"BB":case"BBB":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,a){if(e==="ho"){var r=t.getUTCHours()%12;return r===0&&(r=12),a.ordinalNumber(r,{unit:"hour"})}return E.h(t,e)},H:function(t,e,a){return e==="Ho"?a.ordinalNumber(t.getUTCHours(),{unit:"hour"}):E.H(t,e)},K:function(t,e,a){var r=t.getUTCHours()%12;return e==="Ko"?a.ordinalNumber(r,{unit:"hour"}):d(r,e.length)},k:function(t,e,a){var r=t.getUTCHours();return r===0&&(r=24),e==="ko"?a.ordinalNumber(r,{unit:"hour"}):d(r,e.length)},m:function(t,e,a){return e==="mo"?a.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):E.m(t,e)},s:function(t,e,a){return e==="so"?a.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):E.s(t,e)},S:function(t,e){return E.S(t,e)},X:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();if(s===0)return"Z";switch(e){case"X":return z(s);case"XXXX":case"XX":return S(s);case"XXXXX":case"XXX":default:return S(s,":")}},x:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"x":return z(s);case"xxxx":case"xx":return S(s);case"xxxxx":case"xxx":default:return S(s,":")}},O:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Z(s,":");case"OOOO":default:return"GMT"+S(s,":")}},z:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Z(s,":");case"zzzz":default:return"GMT"+S(s,":")}},t:function(t,e,a,r){var i=r._originalDate||t,s=Math.floor(i.getTime()/1e3);return d(s,e.length)},T:function(t,e,a,r){var i=r._originalDate||t,s=i.getTime();return d(s,e.length)}};function Z(n,t){var e=n>0?"-":"+",a=Math.abs(n),r=Math.floor(a/60),i=a%60;if(i===0)return e+String(r);var s=t;return e+String(r)+s+d(i,2)}function z(n,t){if(n%60===0){var e=n>0?"-":"+";return e+d(Math.abs(n)/60,2)}return S(n,t)}function S(n,t){var e=t||"",a=n>0?"-":"+",r=Math.abs(n),i=d(Math.floor(r/60),2),s=d(r%60,2);return a+i+e+s}var ee=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},oe=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},dt=function(t,e){var a=t.match(/(P+)(p+)?/)||[],r=a[1],i=a[2];if(!i)return ee(t,e);var s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",ee(r,e)).replace("{{time}}",oe(i,e))},ut={p:oe,P:dt},ht=["D","DD"],gt=["YY","YYYY"];function ft(n){return ht.indexOf(n)!==-1}function mt(n){return gt.indexOf(n)!==-1}function te(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var vt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wt=/^'([^]*?)'?$/,Ct=/''/g,Tt=/[a-zA-Z]/;function xt(n,t,e){var a,r,i,s,u,f,h,p,w,g,m,_,M,D;x(2,arguments);var B=String(t),N=X(),L=(a=(r=void 0)!==null&&r!==void 0?r:N.locale)!==null&&a!==void 0?a:Je,H=j((i=(s=(u=(f=void 0)!==null&&f!==void 0?f:void 0)!==null&&u!==void 0?u:N.firstWeekContainsDate)!==null&&s!==void 0?s:(h=N.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(H>=1&&H<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var $=j((w=(g=(m=(_=void 0)!==null&&_!==void 0?_:void 0)!==null&&m!==void 0?m:N.weekStartsOn)!==null&&g!==void 0?g:(M=N.locale)===null||M===void 0||(D=M.options)===null||D===void 0?void 0:D.weekStartsOn)!==null&&w!==void 0?w:0);if(!($>=0&&$<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!L.localize)throw new RangeError("locale must contain localize property");if(!L.formatLong)throw new RangeError("locale must contain formatLong property");var R=b(n);if(!ze(R))throw new RangeError("Invalid time value");var se=Xe(R),le=et(R,se),ce={firstWeekContainsDate:H,weekStartsOn:$,locale:L,_originalDate:R},de=B.match(pt).map(function(C){var y=C[0];if(y==="p"||y==="P"){var Y=ut[y];return Y(C,L.formatLong)}return C}).join("").match(vt).map(function(C){if(C==="''")return"'";var y=C[0];if(y==="'")return _t(C);var Y=ct[y];if(Y)return mt(C)&&te(C,t,String(n)),ft(C)&&te(C,t,String(n)),Y(le,C,L.localize,ce);if(y.match(Tt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return C}).join("");return de}function _t(n){var t=n.match(wt);return t?t[1].replace(Ct,"'"):n}const bt=(n,t)=>{if(n.isApproved){if(!t||t.status==="approved")return T.APPROVED;if(t.status==="rejected")return T.REJECTED}else{if(!t&&fe(n))return T.DISABLED;if(t&&t.status==="rejected")return T.REJECTED}return t&&t.status==="pending"&&t.assignee?T.UNDER_REVIEW:T.TO_REVIEW};function yt(n){const{collection:t,curation:e,address:a,itemCount:r,onOpenModal:i}=n,s=me(),u=A.useCallback(g=>{window.open(t.forumLink,"_blank"),g.preventDefault(),g.stopPropagation()},[t]),f=A.useCallback((g,m=J.SELF_ASSIGN)=>{i("EditCurationAssigneeModal",{collectionId:t.id,type:m}),g.preventDefault(),g.stopPropagation()},[i,t]),h=A.useCallback(()=>{s.push(ve.itemEditor({collectionId:t.id,isReviewing:"true"}))},[s,t]),p=A.useCallback(()=>{switch(bt(t,e)){case T.APPROVED:return o.jsxs("div",{className:"approved action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.approved")})," ",o.jsx(l.Icon,{name:"check"})]});case T.REJECTED:return o.jsxs("div",{className:"rejected action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.rejected")})," ",o.jsx(l.Icon,{name:"close"})]});case T.DISABLED:return o.jsxs("div",{className:"disabled action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.disabled")})," ",o.jsx(l.Icon,{name:"close"})]});case T.UNDER_REVIEW:return o.jsxs("span",{children:[" ",c("collection_row.under_review")]});case T.TO_REVIEW:return o.jsxs("span",{children:[" ",c("collection_row.to_review")]});default:return o.jsxs("span",{children:[" ",c("collection_row.to_review")]})}},[t,e]),w=new Date((e==null?void 0:e.createdAt)||t.createdAt);return o.jsxs(l.Table.Row,{className:"CollectionRow",onClick:h,children:[o.jsx(l.Table.Cell,{width:5,children:o.jsxs("div",{className:"image-column",children:[o.jsx(pe,{collectionId:t.id}),o.jsxs("div",{className:"info",children:[o.jsxs("div",{className:"title",children:[o.jsx(qe,{collection:t}),t.name]}),o.jsx("div",{className:"subtitle name",children:c("collection_row.items",{count:r})})]})]})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx(Ge,{isThirdParty:K(t)})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx(Qe,{isProgrammatic:t.isProgrammatic})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{children:K(t)?"-":o.jsx(V,{textOnly:!0,address:t.owner})})}),o.jsx(l.Table.Cell,{width:3,children:o.jsxs("div",{title:xt(w,"d MMMM yyyy HH:mm"),children:[o.jsx("span",{children:c(e?"collection_row.review_request":"collection_row.published")})," ",Ve(w,{addSuffix:!0})]})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"actions text-centered",children:p()})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"edit-container",children:e!=null&&e.assignee?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"curator-name",children:[o.jsx(V,{textOnly:!0,address:e.assignee}),a===e.assignee?o.jsxs(o.Fragment,{children:[" (",c("collection_row.you"),")"]}):null," "]}),e.status!==T.APPROVED||!t.isApproved?o.jsx(l.Icon,{name:"pencil",onClick:g=>f(g,J.REASSIGN)}):null]}):o.jsxs("div",{className:"assignee-container",children:[c("collection_row.unassigned"),o.jsx("span",{className:"link",onClick:f,children:c("collection_row.assign_to_me")})]})})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"text-centered",children:t.forumLink?o.jsx("span",{className:"link",onClick:u,children:c("collection_row.link")}):c("collection_row.no_forum_post")})})]},t.id)}const Et=(n,t)=>({address:we(n),itemCount:Ce(n,t.collection.id)}),Dt=n=>({onOpenModal:(t,e)=>n(Te(t,e))}),Ot=re(Et,Dt)(yt);var F=(n=>(n.ALL_STATUS="ALL_STATUS",n))(F||{}),k=(n=>(n.ALL_TYPES="ALL_TYPES",n))(k||{});const U={...T,...F},ae={...xe,...k},G=12,Q="all";let St=class extends _e.PureComponent{constructor(){super(...arguments);v(this,"state",{sortBy:O.CREATED_AT_DESC,filterByStatus:F.ALL_STATUS,filterByTags:[],filterByType:k.ALL_TYPES,assignee:Q,searchText:"",page:1});v(this,"getFetchParams",e=>{const{assignee:a,filterByStatus:r,filterByType:i,page:s,searchText:u,sortBy:f,filterByTags:h}=this.state;return{page:s,limit:G,assignee:a!==Q?a:void 0,status:r!==F.ALL_STATUS?r:void 0,type:i!==k.ALL_TYPES?i:void 0,q:u||void 0,sort:f,tag:h.length>0?h:void 0,isPublished:!0,...e}});v(this,"fetchCollections",()=>{const{onFetchCollections:e}=this.props;e(this.getFetchParams())});v(this,"updateParam",e=>{this.setState(e,this.fetchCollections)});v(this,"handleSortChange",(e,{value:a})=>{this.updateParam({sortBy:a,page:1})});v(this,"handleStatusChange",(e,{value:a})=>{this.updateParam({filterByStatus:`${a}`,page:1})});v(this,"handleTypeChange",(e,{value:a})=>{this.updateParam({filterByType:`${a}`,page:1})});v(this,"handleAssigneeChange",(e,{value:a})=>{this.updateParam({assignee:`${a}`,page:1})});v(this,"handleSearchChange",e=>{const{searchText:a}=this.state;e!==a&&this.updateParam({searchText:e,page:1})});v(this,"handlePageChange",(e,a)=>{this.updateParam({page:+a.activePage})});v(this,"handleOnCampaignToggleChange",(e,a)=>{const{campaignTag:r}=this.props,{checked:i}=a;r&&(i?this.updateParam({filterByTags:[...this.state.filterByTags,r]}):this.updateParam({filterByTags:[...this.state.filterByTags.filter(s=>s!==r)]}))});v(this,"renderSortDropdown",()=>{const{sortBy:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:O.MOST_RELEVANT,text:c("curation_page.order.most_relevant")},{value:O.CREATED_AT_DESC,text:c("global.order.newest")},{value:O.NAME_ASC,text:c("global.order.name_asc")},{value:O.NAME_DESC,text:c("global.order.name_desc")}],onChange:this.handleSortChange})});v(this,"renderTypesFilterDropdown",()=>{const{filterByType:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:k.ALL_TYPES,text:c("curation_page.filter.all_types")},{value:ae.STANDARD,text:c("curation_page.filter.standard")},{value:ae.THIRD_PARTY,text:c("curation_page.filter.third_party")}],onChange:this.handleTypeChange})});v(this,"renderStatusFilterDropdown",()=>{const{filterByStatus:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:U.ALL_STATUS,text:c("curation_page.filter.all_status")},{value:U.UNDER_REVIEW,text:c("curation_page.filter.under_review")},{value:U.TO_REVIEW,text:c("curation_page.filter.to_review")},{value:U.APPROVED,text:c("curation_page.filter.approved")},{value:U.REJECTED,text:c("curation_page.filter.rejected")}],onChange:this.handleStatusChange})});v(this,"renderAssigneeFilterDropdown",()=>{const{committeeMembers:e,wallet:a}=this.props,{assignee:r}=this.state;return o.jsx(l.Dropdown,{className:"assignees",direction:"left",value:r,options:[{value:Q,text:c("curation_page.filter.all_assignees")},...e.reduce((i,s)=>(s===a.address?i.unshift(s):i.push(s),i),[]).map(i=>({value:i,text:o.jsx(V,{textOnly:!0,address:i})}))],onChange:this.handleAssigneeChange})});v(this,"renderCampaignFilterToggle",()=>{const{isCampaignEnabled:e,campaignName:a,campaignTag:r}=this.props,{filterByTags:i}=this.state;return e&&a&&r?o.jsx(l.Radio,{toggle:!0,className:"filterByCampaignTag",checked:i.includes(r),onChange:this.handleOnCampaignToggleChange,label:a}):null})}componentDidMount(){const{onFetchCollections:e,wallet:a,isLoadingCommittee:r,isCommitteeMember:i}=this.props;a&&!r&&i&&e({page:1,limit:G,isPublished:!0,sort:O.MOST_RELEVANT})}componentDidUpdate(e){const{onFetchCollections:a,wallet:r,isLoadingCommittee:i,isCommitteeMember:s}=this.props;r&&!i&&s&&e.isCommitteeMember!==s&&a({page:1,limit:G,isPublished:!0,sort:O.MOST_RELEVANT})}renderPage(){const{isLoadingCollectionsData:e,isLoadingCommittee:a,collections:r,curationsByCollectionId:i,paginationData:s}=this.props,{page:u,searchText:f}=this.state,h=s==null?void 0:s.total,p=s==null?void 0:s.totalPages,w=r,g=e||a||!s;return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"filters",children:o.jsxs(l.Container,{children:[s?o.jsx(l.Row,{className:"text-filter-row",children:o.jsx(l.TextFilter,{placeholder:c("curation_page.search_placeholder"),value:f,onChange:this.handleSearchChange})}):null,o.jsxs(l.Row,{children:[o.jsx(l.Column,{grow:!1,shrink:!1,children:o.jsx(l.Row,{children:!e&&!!h&&h>0&&o.jsx(l.Header,{sub:!0,children:c("collections_page.results",{count:h})})})}),o.jsx(l.Column,{align:"right",shrink:!1,children:o.jsxs(l.Row,{children:[this.renderCampaignFilterToggle(),this.renderAssigneeFilterDropdown(),this.renderTypesFilterDropdown(),this.renderStatusFilterDropdown(),this.renderSortDropdown()]})})]})]})}),g?o.jsx(l.Loader,{active:!0,size:"large"}):o.jsxs(l.Container,{children:[o.jsxs(l.Section,{children:[o.jsx(l.Table,{basic:"very",children:r.length>0?o.jsxs(o.Fragment,{children:[o.jsx(l.Table.Header,{children:o.jsxs(l.Table.Row,{children:[o.jsx(l.Table.HeaderCell,{children:c("collection_row.collection")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.type")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.kind")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.owner")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.date")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.status")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.assignee")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.discussion")})]})}),o.jsx(l.Table.Body,{children:w.map(m=>o.jsx(Ot,{collection:m,curation:i[m.id]||null},m.id))})]}):null}),r.length===0?o.jsx(l.Empty,{height:200,children:o.jsx("div",{children:o.jsx(be,{id:"curation_page.empty_collections"})})}):null]}),!!p&&p>1&&o.jsx(l.Pagination,{className:"pagination",firstItem:null,lastItem:null,totalPages:p,activePage:u,onPageChange:this.handlePageChange})]})]})}render(){const{isCommitteeMember:e,isConnecting:a,isLoadingCommittee:r}=this.props,i=a||r;return o.jsx(He,{className:"CurationPage",activeTab:$e.CURATION,isLoading:i,children:e?this.renderPage():o.jsx(Be,{})})}};const Pt=n=>{var r;const t=ye(n),e=Ee(n),a=De(n);return{wallet:Oe(n),collections:e,paginationData:a,curationsByCollectionId:t,isCommitteeMember:Se(n),committeeMembers:Pe(n),isConnecting:je(n),isLoadingCommittee:q(Me(n),Re),isLoadingCollectionsData:q(Ne(n),Ye)||q(Le(n),Ae),isCampaignEnabled:Ue(n),campaignTag:Ie(n),campaignName:(r=We(n))==null?void 0:r[Fe(n)]}},jt=n=>({onFetchCollections:t=>n(ke(void 0,t))}),Ht=re(Pt,jt)(St);export{Ht as default};
|
package/assets/index-BGbyjzTe.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var V=Object.defineProperty;var X=(s,t,a)=>t in s?V(s,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[t]=a;var I=(s,t,a)=>X(s,typeof t!="symbol"?t+"":t,a);import{aA as G,D as l,ef as J,H as e,bH as Z,bZ as ee,b_ as se,eg as te,eh as ne,G as i,ei as ae,a1 as A,K as T,cG as oe,M as n,az as le,bI as ie,N as K,aX as ce,c3 as re,X as Q,ej as de,ek as ue,bD as D,el as me,em as ge,T as pe,en as he,b0 as W,eo as _e,ae as xe,Z as je,ag as be,ai as Se,I as Ce,a4 as De,a5 as N,c4 as ye,S as Ee,O as Ne,cM as ke,d3 as B,c5 as fe,V as Ie,W as Te,Y as Me,ep as Re,cP as Le,eq as we,d2 as ve,c6 as Pe}from"./index-LbPj94fr.js";import{c as Oe}from"./hooks-B-YhDlyt.js";import{B as $e}from"./Back-qfVBk6YN.js";import{N as Fe}from"./NotFound-BTo5pEaG.js";import{S as Ae}from"./SDKTag-B1AaBZZp.js";import{a as U,S as Be}from"./SceneStats.container-gb6NrI8H.js";import"./date-C90QIauR.js";import"./index-BaBcvmM1.js";const H=G.get("EXPLORER_URL",""),Ue=G.get("WORLDS_CONTENT_SERVER","");let He=class extends l.PureComponent{constructor(){super(...arguments);I(this,"getHighlightLayer",(a,o)=>(u,_)=>{const{deployment:m,landTiles:g}=this.props,c=ie(u,_),x=g[c];return x&&m.parcels.some(d=>d===c)?{color:a[x.land.role],scale:o}:null});I(this,"renderThumbnail",()=>{const{deployment:a,landTiles:o,project:u}=this.props,[_,m]=J(a.base);return(a.base in o?o[a.base].land.id:null)?e.jsx("div",{className:"atlas-wrapper",children:e.jsx(Z,{x:_,y:m,isDraggable:!1,zoom:.75,layers:[this.getHighlightLayer(ee,1.4),this.getHighlightLayer(se,1.2)]})}):e.jsx("div",{className:"thumbnail-wrapper",children:e.jsx("img",{className:"thumbnail",src:u.thumbnail,alt:u.description})})});I(this,"getExplorerUrl",a=>te?`${H}/?realm=${Ue}/world/${a}&NETWORK=sepolia`:`${H}/world/${a}`)}render(){const{project:a,deployment:o,landTiles:u,history:_,onOpenModal:m}=this.props,g=o.base in u?u[o.base].land.id:null,c=o.world?o.world:o.base,x=ne(a,o);let d=i("scene_detail_page.published");return x===ae.NEEDS_SYNC&&(d=i("scene_detail_page.unsynced")),e.jsxs("div",{className:A("DeploymentDetail",{clickable:g}),onClick:()=>g&&_.push(T.landDetail(g)),children:[this.renderThumbnail(),e.jsx(U,{label:i("scene_detail_page.status"),children:d}),e.jsx(U,{label:i("scene_detail_page.location"),children:e.jsxs("div",{className:A({"world-url":o.world}),children:[c,o.world?e.jsxs(e.Fragment,{children:[e.jsx(oe,{role:"button",text:this.getExplorerUrl(o.world),showPopup:!0,children:e.jsx(n.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:"link copy",name:"copy outline"})}),e.jsx("a",{href:this.getExplorerUrl(o.world),target:"_blank",rel:"noopener noreferrer",children:e.jsx(n.Icon,{name:"external alternate"})})]}):null]})}),e.jsx(Be,{deployment:o}),e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsx(n.Dropdown.Menu,{children:e.jsx(n.Dropdown.Item,{text:i("scene_detail_page.actions.unpublish"),onClick:()=>m("DeployModal",{view:le.CLEAR_DEPLOYMENT,deploymentId:o.id})})})})]})}};const ze=s=>({landTiles:re(s)}),Ge=s=>({onOpenModal:(t,a)=>s(Q(t,a))}),Ke=K(ze,Ge)(ce(He)),Qe="https://cdn.decentraland.org/@dcl/builder-site/7.14.4-19500651590.commit-4962afd/assets/automatic_migrate-DQYv7lI_.webp",We="https://cdn.decentraland.org/@dcl/builder-site/7.14.4-19500651590.commit-4962afd/assets/migrate_smart_items-D2zNoKEa.webp";var h=(s=>(s.INFO="info",s.MIGRATE="migrate",s))(h||{});function z(s){return s&&s.sdk6?Object.values(s.sdk6.components).filter(a=>a.type===de.Script).length:0}const Ye="_modalContainer_5geih_1",qe="_subtitle_5geih_20",Ve="_content_5geih_27",Xe="_actions_5geih_35",Je="_loadingMessage_5geih_53",Ze="_loader_5geih_57",C={modalContainer:Ye,subtitle:qe,content:Ve,actions:Xe,loadingMessage:Je,loader:Ze};function es({project:s,scene:t,isLoading:a,isSavingSDK6Copy:o,isSavingScene:u,onNavigate:_,onClose:m,onMigrateScene:g}){const[c,x]=l.useState(h.INFO),[d,y]=l.useState(!1),j=l.useMemo(()=>z(t)>0,[t]),b=l.useCallback(()=>{x(h.INFO)},[]),r=l.useCallback(()=>{a||m()},[a,m]),S=l.useCallback(()=>{switch(c){case h.INFO:return ue;case h.MIGRATE:return s!=null&&s.thumbnail?s.thumbnail:j?We:Qe}},[c,j,s]),M=l.useCallback(()=>{switch(c){case h.INFO:x(h.MIGRATE);break;case h.MIGRATE:s&&g(s,d);break}},[c,d,s,g]),R=()=>c===h.MIGRATE&&j?{smartItemsCount:z(t)}:{},L=()=>!a||c!==h.MIGRATE?e.jsx(n.Button,{disabled:a,primary:!0,onClick:M,children:i(`migrate_to_sdk7_modal.${E}.action`)}):o?e.jsxs("span",{className:C.loadingMessage,children:[e.jsx(n.Loader,{size:"tiny",inline:!0,className:C.loader}),i("migrate_to_sdk7_modal.saving_copy")]}):u?e.jsxs("span",{className:C.loadingMessage,children:[e.jsx(n.Loader,{size:"tiny"}),i("migrate_to_sdk7_modal.migrating_scene")]}):null,E=j?`${c}_smart_items`:c,w=!a&&(c!==h.MIGRATE||j);return e.jsxs(n.Modal,{open:!0,className:C.modalContainer,onClose:r,children:[e.jsx(n.ModalNavigation,{title:i(`migrate_to_sdk7_modal.${E}.title`),onBack:c!==h.INFO?b:void 0,onClose:r}),e.jsxs(n.ModalContent,{className:C.content,children:[e.jsx("p",{className:C.subtitle,children:i(`migrate_to_sdk7_modal.${E}.subtitle`,{b:k=>e.jsx("b",{children:k}),br:()=>e.jsx("br",{}),...R()})}),e.jsx("div",{style:{width:"648px",height:"324px",backgroundPosition:"center",backgroundSize:"cover",backgroundImage:`url(${S()}`}}),c===h.MIGRATE&&e.jsx(n.Checkbox,{disabled:a,checked:d,label:i("migrate_to_sdk7_modal.save_a_copy"),onChange:(k,{checked:v})=>{y(!!v)}})]}),e.jsxs(n.ModalActions,{className:C.actions,children:[L(),w&&e.jsx(n.Button,{disabled:a,secondary:!0,onClick:()=>_(T.sceneEditor(s==null?void 0:s.id)),children:i("migrate_to_sdk7_modal.use_legacy_builder")})]})]})}const ss=(s,t)=>{var a,o;return{isLoading:D(ge(s),me),isSavingScene:!!((a=t.project)!=null&&a.id)&&pe(s).has((o=t.project)==null?void 0:o.id),isSavingSDK6Copy:D(W(s),he)}},ts=s=>({onMigrateScene:(t,a)=>s(_e(t,a))}),ns=K(ss,ts)(es),as=s=>{const{project:t,scene:a,isLoading:o,deployments:u,onOpenModal:_,onDelete:m,onDuplicate:g,onLoadProjectScene:c}=s,[x,d]=l.useState(!1),[y,j]=l.useState(!1),b=je();l.useEffect(()=>{t&&!a&&c(t)},[t,a,c]);const r=()=>e.jsx(n.Center,{children:e.jsx(n.Loader,{active:!0,size:"large"})}),S=()=>e.jsx(Fe,{}),M=l.useCallback(()=>{_("EditProjectModal")},[_]),R=l.useCallback(()=>{d(!0)},[d]),L=l.useCallback(()=>{g(t)},[t,g]),E=l.useCallback(()=>{m(t),d(!1)},[t,m,d]),w=l.useCallback(()=>{d(!1)},[d]),k=l.useCallback(()=>{a!=null&&a.sdk6?j(!0):b.push(T.inspector(t==null?void 0:t.id))},[t,a,b]),v=()=>{const{project:p,isLoading:f,isLoadingDeployments:P}=s;return f||P||!p?null:e.jsx(Ce,{projectId:p.id,className:"deployment-status"})},$=l.useCallback(p=>{b.push(p)},[b]),Y=(p,f)=>{const{isLoadingDeployments:P,onOpenModal:q,scene:O}=s;return e.jsxs(e.Fragment,{children:[e.jsxs(n.Section,{size:"large",children:[e.jsxs(n.Row,{children:[e.jsx(n.Column,{children:e.jsxs(n.Row,{children:[e.jsx($e,{absolute:!0,onClick:()=>$(T.scenes())}),e.jsxs(n.Header,{className:"name",children:[p.title,e.jsx(n.Icon,{name:"edit outline",onClick:M})]})]})}),e.jsx(n.Column,{className:"actions",align:"right",children:e.jsxs(n.Row,{children:[e.jsxs(n.Button,{inverted:!0,className:"download-button",onClick:()=>q("ExportModal",{project:p}),children:[e.jsx(n.Icon,{name:"download"}),i("scene_detail_page.download_scene")]}),e.jsxs(n.Button,{primary:!0,className:"edit-button",disabled:!O,loading:!O,onClick:k,children:[e.jsx(n.Icon,{name:"edit outline"}),i("scene_detail_page.edit_scene")]}),e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("scene_detail_page.actions.duplicate"),onClick:L}),e.jsx(n.Dropdown.Item,{text:i("scene_detail_page.actions.delete"),onClick:R})]})})]})})]}),e.jsxs(n.Row,{className:"status-container",children:[v(),e.jsx(Ae,{scene:O})]})]}),e.jsx(n.Section,{children:e.jsx("div",{className:"header-image",style:{backgroundImage:p.thumbnail?`url(${p.thumbnail})`:""}})}),e.jsxs(n.Section,{className:p.description?"":"no-margin-bottom",children:[e.jsx(n.Header,{sub:!0,children:i("scene_detail_page.published_in")}),P?e.jsx(n.Loader,{active:!0,size:"small"}):f.length===0?e.jsxs(n.Empty,{className:"empty-deployments-container",children:[e.jsx("div",{className:"empty-deployments-thumbnail"}),i("scene_detail_page.no_deployments")]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"deployments",children:f.map(F=>e.jsx(Ke,{project:p,deployment:F},F.id))}),e.jsx("div",{className:"notice",children:i("analytics.notice")})]})]}),p.description?e.jsxs(n.Section,{className:"description no-margin-bottom",children:[e.jsx(n.Header,{sub:!0,children:i("scene_detail_page.description")}),e.jsx("p",{className:"description-content",children:p.description})]}):null]})};return e.jsxs(e.Fragment,{children:[e.jsx(be,{}),e.jsxs(n.Page,{className:"SceneDetailPage",isFullscreen:!0,children:[o&&!t?r():null,!o&&!t?S():null,t?e.jsxs(e.Fragment,{children:[Y(t,u),e.jsx(n.Confirm,{size:"tiny",open:x,header:i("project_card.confirm_delete_header",{title:t.title}),content:i("project_card.confirm_delete_content",{title:t.title}),confirmButton:e.jsx(n.Button,{primary:!0,children:i("global.confirm")}),cancelButton:e.jsx(n.Button,{secondary:!0,children:i("global.cancel")}),onCancel:w,onConfirm:E})]}):null,y&&e.jsx(ns,{project:t,scene:a,onNavigate:$,onClose:()=>j(!1)})]}),e.jsx(Se,{})]})},os=xe.memo(as),ls=()=>{const s=De(),t=Oe(),a=N(ye),o=l.useMemo(()=>t&&t in a?a[t]:null,[t,a]),u=N(Ee),_=l.useMemo(()=>t&&t in u?u[t]:[],[t,u]),m=N(Ne),g=l.useMemo(()=>o&&m[o.sceneId],[o,m]),c=N(r=>D(W(r),Re)),x=N(r=>D(ke(r),Le)||D(B(r),we)||D(B(r),ve)||D(fe(r),Pe)),d=l.useCallback((r,S)=>s(Q(r,S)),[s]),y=l.useCallback(r=>s(Ie(r)),[s]),j=l.useCallback(r=>s(Te(r)),[s]),b=l.useCallback((r,S)=>s(Me(r,S)),[s]);return e.jsx(os,{project:o,deployments:_,scene:g,isLoading:c,isLoadingDeployments:x,onOpenModal:d,onDelete:y,onDuplicate:j,onLoadProjectScene:b})},xs=ls;export{xs as default};
|
package/assets/index-BGrJJYrs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bi as b,Z as _,D as c,K as d,H as s,ag as g,M as l,G as n,hK as x,J as h,ai as k,N as v,hL as C,hM as j}from"./index-LbPj94fr.js";import{b as N,N as T}from"./Navigation.container-m_5Xay6X.js";import"./selectors-CSnw6goy.js";var r=(e=>(e.ACTIVE="active",e.COMING_SOON="coming_soon",e))(r||{});const E="_titleContainer_5ka3v_1",S="_backButton_5ka3v_8",B="_title_5ka3v_1",f="_templates_5ka3v_26",I="_subtitle_5ka3v_32",a={titleContainer:E,backButton:S,title:B,templates:f,subtitle:I},y=({templates:e,onLoadTemplates:u})=>{const i=b(),o=_();c.useEffect(()=>{u()},[u]);const p=c.useCallback(()=>{o.push(d.scenes())},[o]),m=c.useCallback(t=>{i==null||i.track("Go to template detail",{id:t.id,name:t.title,description:t.description}),o.push(d.templateDetail(t.id))},[i,o]);return s.jsxs(s.Fragment,{children:[s.jsx(g,{}),s.jsxs(l.Page,{isFullscreen:!0,className:"ScenesPage",children:[s.jsx(N,{activeTab:T.SCENES}),s.jsxs("div",{className:a.titleContainer,children:[s.jsx(l.Button,{className:a.backButton,basic:!0,icon:s.jsx(l.Icon,{name:"arrow alternate circle left outline"}),onClick:p,"aria-label":n("templates_page.back_to_scenes")}),s.jsx("h2",{className:a.title,children:n("templates_page.title")})]}),s.jsx("div",{className:a.templates,children:Object.values(e).map(t=>s.jsx(x,{title:t.title,description:t.description,videoSrc:t.video,imgSrc:t.thumbnail,subtitle:s.jsxs("span",{className:a.subtitle,children:[s.jsx(h,{name:"scene-parcel"}),n("templates_page.parcels",{size:t.layout.rows*t.layout.cols})]}),tag:t.templateStatus!==r.ACTIVE?{label:n("templates_page.coming_soon"),color:"#716B7C"}:void 0,disabled:t.templateStatus!==r.ACTIVE,onClick:m.bind(null,t)},t.id))})]}),s.jsx(k,{})]})},A=e=>({templates:C(e)}),G=e=>({onLoadTemplates:()=>e(j())}),F=v(A,G)(y);export{F as default};
|
package/assets/index-Bc3TZncd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aM as be,Z as F,D as n,ae as je,H as e,G as s,L as de,K as E,dG as me,M as t,N as U,er as Ie,X as he,es as Se,et as Z,a1 as Ne,dF as Ce,eu as fe,ev as ue,ew as Re,ex as ce,J as ve,ey as f,aW as oe,ez as w,aG as we,eA as Le,eB as De,eC as Ee,eD as Ae,eE as Oe,bD as G,eF as Pe,eG as ie,eH as ye,eI as ke,eJ as Me,eK as He,eL as $e,eM as Be,eN as Fe,eO as Ue,eP as Ve,eQ as ze}from"./index-LbPj94fr.js";import{B as qe,c as Ge,N as Ye}from"./Navigation.container-m_5Xay6X.js";import{L as Ze}from"./LoggedInDetailPage.container-BLLfFAse.js";import{O as ge}from"./OptionsDropdown-Dkcmv78a.js";import{a as B}from"./date-C90QIauR.js";import{C as _e}from"./CollectionStatus.container-SecVXoKZ.js";import"./selectors-CSnw6goy.js";import"./SignInRequired-cMu1CrC_.js";import"./index-BaBcvmM1.js";const Qe=l=>l.ui.collection,We=l=>Qe(l).view,re=20;function Je(l){const{search:a,pathname:c}=be(),d=F(),r=d.push.bind(d),o=n.useMemo(()=>{var i;return((i=l==null?void 0:l.pageSize)==null?void 0:i.toString())??re.toString()},[l==null?void 0:l.pageSize]),x=n.useMemo(()=>{const i=new URLSearchParams(a);return i.delete("page"),i.delete("first"),i.delete("offset"),i.delete("sortBy"),Object.fromEntries(i.entries())},[a]),u=n.useMemo(()=>new URLSearchParams(a).get("sortBy"),[a])??void 0,[g,b,A]=n.useMemo(()=>{const i=new URLSearchParams(a),_=parseInt(i.get("page")??"1"),p=parseInt(i.get("first")??o),I=(_-1)*p;return[_,p,I]},[o,a]),j=n.useCallback(()=>{const i=new URLSearchParams(a);i.set("page",(g+1).toString()),r(`${c}?${i.toString()}`)},[a,g,r,c]),S=n.useCallback(i=>{const _=new URLSearchParams(a);_.set("page",i.toString()),r(`${c}?${_.toString()}`)},[a,r,c]),O=n.useCallback(i=>{const _=new URLSearchParams(a);_.set("page","1"),_.set("sortBy",i),r(`${c}?${_.toString()}`)},[c,r,a]),V=n.useCallback((i,_,p={clearOldFilters:!1})=>{const I=new URLSearchParams(p.clearOldFilters?{}:a);I.set("page","1"),p.clearOldFilters&&u&&I.set("sortBy",u),I.set(i,_),r(`${c}?${I.toString()}`)},[c,r,a,u]),R=l!=null&&l.count?Math.ceil((l==null?void 0:l.count)/((l==null?void 0:l.pageSize)??re)):void 0,N=R?g<R:void 0;return{page:g,pages:R,hasMorePages:N,first:b,offset:A,sortBy:u,filters:x,goToNextPage:j,goToPage:S,changeSorting:O,changeFilter:V}}const Ke="data:image/svg+xml,%3csvg%20width='32'%20height='32'%20viewBox='0%200%2032%2032'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M18%2018H28V28H18V18Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M4%204H14V14H4V4Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M18%204H28V14H18V4Z'%20fill='%23A09BA8'/%3e%3cpath%20d='M4%2018H14V28H4V18Z'%20fill='%23A09BA8'/%3e%3c/svg%3e",Xe=l=>{const{item:a,onDeleteItem:c,onOpenModal:d}=l,[r,o]=n.useState(!1),x=n.useCallback(()=>o(!1),[o]),u=n.useCallback(()=>o(!0),[o]),g=n.useCallback(()=>d("MoveItemToCollectionModal"),[d]),b=n.useCallback(()=>{o(!1),c()},[o,c]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"ItemCard is-card",children:[e.jsx(ge,{className:"options-dropdown",options:[{text:s("item_card.move_to_collection"),handler:g},{text:s("global.delete"),handler:u}]}),e.jsxs(de,{to:E.itemDetail(a.id),children:[e.jsx(me,{item:a}),e.jsxs(t.Card.Content,{children:[e.jsx("div",{className:"text",title:a.name,children:a.name}),e.jsx("div",{className:"subtitle",children:s(`item.type.${a.type}`)})]})]})]}),e.jsx(t.Confirm,{size:"tiny",open:r,header:s("item_card.confirm_delete_header",{name:a.name}),content:s("item_card.confirm_delete_content",{name:a.name}),confirmButton:e.jsx(t.Button,{primary:!0,children:s("global.confirm")}),cancelButton:e.jsx(t.Button,{secondary:!0,children:s("global.cancel")}),onCancel:x,onConfirm:b})]})},ea=je.memo(Xe),aa=(l,a)=>({onDeleteItem:()=>l(Ie(a.item)),onOpenModal:c=>l(he(c,{item:a.item}))}),ta=U(void 0,aa)(ea),la="_ItemRow_xmdia_1",sa="_image_xmdia_7",na="_name_xmdia_21",ca="_title_xmdia_29",oa="_imageColumn_xmdia_30",ia="_published_xmdia_35",D={ItemRow:la,image:sa,name:na,title:ca,imageColumn:oa,published:ia};function ra(l){const{item:a}=l,c=F(),d=n.useCallback(()=>{c.push(E.itemDetail(a.id))},[c]);return e.jsxs(t.Table.Row,{className:D.ItemRow,onClick:d,children:[e.jsx(t.Table.Cell,{width:4,children:e.jsxs("div",{className:D.imageColumn,children:[e.jsx(me,{className:D.image,item:a}),e.jsxs("div",{className:D.title,children:[e.jsx(Se,{item:a}),e.jsx("div",{className:D.name,children:a.name})]})]})}),e.jsx(t.Table.Cell,{width:3,children:B(a.createdAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:B(a.updatedAt,{addSuffix:!0})})]})}const da=l=>{const{collection:a,onDeleteCollection:c,itemCount:d}=l,[r,o]=n.useState(!1),x=n.useCallback(()=>o(!1),[o]),u=n.useCallback(()=>o(!0),[o]),g=n.useCallback(()=>{o(!1),c()},[o,c]),b=Z(a);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"CollectionCard is-card",children:[!a.isPublished&&e.jsx(ge,{className:Ne({"empty-collection-options":d===0},"options-dropdown"),options:[{text:s("global.delete"),handler:u}]}),e.jsxs(de,{to:E.collectionDetail(a.id,b),children:[e.jsx(Ce,{collectionId:a.id}),e.jsxs(t.Card.Content,{children:[e.jsxs("div",{className:"text",title:a.name,children:[e.jsx(_e,{collection:a})," ",a.name]}),e.jsxs("div",{className:"subtitle",children:[s(`collection.type.${b}`)," · ",s("collection_card.item_count",{count:d})]}),!a.isMappingComplete&&fe(a.urn)&&e.jsxs("div",{className:"pending-migration",children:[e.jsx(t.Icon,{name:"warning circle"})," ",s("item_status.pending_migration")]})]})]})]}),e.jsx(t.Confirm,{size:"tiny",open:r,header:s("collection_card.confirm_delete_header",{name:a.name}),content:s("collection_card.confirm_delete_content",{name:a.name}),confirmButton:e.jsx(t.Button,{primary:!0,children:s("global.confirm")}),cancelButton:e.jsx(t.Button,{secondary:!0,children:s("global.cancel")}),onCancel:x,onConfirm:g,className:"delete-collection-confirm"})]})},ma=n.memo(da),ha=(l,a)=>({itemCount:ue(l,a.collection.id)}),Ca=(l,a)=>({onDeleteCollection:()=>l(Re(a.collection))}),ua=U(ha,Ca)(ma),ga="_CollectionRow_k7d4q_1",_a="_image_k7d4q_7",xa="_name_k7d4q_16",pa="_title_k7d4q_24",Ta="_imageColumn_k7d4q_25",ba="_published_k7d4q_30",L={CollectionRow:ga,image:_a,name:xa,title:pa,imageColumn:Ta,published:ba};function ja(l){const{collection:a,itemCount:c}=l,d=F(),r=n.useCallback(()=>{d.push(E.collectionDetail(a.id,Z(a)))},[d]),o=Z(a);return e.jsxs(t.Table.Row,{className:L.CollectionRow,onClick:r,children:[e.jsx(t.Table.Cell,{width:3,children:e.jsxs("div",{className:L.imageColumn,children:[e.jsx(Ce,{className:L.image,collectionId:a.id}),e.jsxs("div",{className:L.title,children:[e.jsx(_e,{collection:a}),e.jsx("div",{className:L.name,children:a.name})]})]})}),e.jsx(t.Table.Cell,{width:3,children:s(`collection.type.${o}`)}),e.jsx(t.Table.Cell,{width:2,children:c}),e.jsx(t.Table.Cell,{width:3,children:B(a.createdAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:B(a.updatedAt,{addSuffix:!0})}),e.jsx(t.Table.Cell,{width:3,children:a.isPublished?e.jsxs("div",{className:L.published,children:[s("global.published")," ",e.jsx(t.Icon,{name:"check"})]}):null})]})}const Ia=(l,a)=>({itemCount:ue(l,a.collection.id)}),Sa=U(Ia)(ja);var m=(l=>(l.STANDARD_COLLECTIONS="standard_collections",l.THIRD_PARTY_COLLECTIONS="third_party_collections",l.ITEMS="orphan_items",l))(m||{});const Y=20;function Na(l){const{address:a,items:c,collections:d,view:r,collectionsPaginationData:o,itemsPaginationData:x,hasUserOrphanItems:u,isLoadingItems:g,isLoadingCollections:b,isLoadingOrphanItem:A,isLinkedWearablesPaymentsEnabled:j,isThirdPartyManager:S,onFetchCollections:O,onFetchOrphanItem:V,onFetchOrphanItems:R,onOpenModal:N,onSetView:i}=l,_=F(),{page:p,pages:I,goToPage:Q,filters:P,changeFilter:y,sortBy:k,changeSorting:W}=Je({pageSize:Y,count:o==null?void 0:o.total}),h=P.section??m.STANDARD_COLLECTIONS,M=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS,[J,xe]=n.useState(P.search??""),H=n.useRef(null);n.useEffect(()=>{u===void 0&&a&&V(a)},[a,u]),n.useEffect(()=>{a&&(h===m.ITEMS?R(a,{page:p,limit:Y}):O(a,{page:p,limit:Y,q:P.search??void 0,type:h===m.STANDARD_COLLECTIONS?ce.STANDARD:ce.THIRD_PARTY,sort:k}))},[a,p,h,P.search,k,R,O]);const pe=n.useCallback(()=>{N("CreateThirdPartyCollectionModal")},[N]),$=n.useCallback(()=>{N(j?"CreateCollectionSelectorModal":"CreateCollectionModal")},[N,j]),K=n.useCallback((C,T)=>{xe(T.value),H.current&&(clearTimeout(H.current),H.current=null),H.current=setTimeout(()=>{y("search",T.value)},500)},[y]),X=n.useCallback(()=>{_.push(E.itemEditor())},[_]),ee=n.useCallback((C,{value:T})=>{W(T)},[W]),z=n.useCallback(C=>{h!==C&&y("section",C)},[a,h,y]),ae=n.useCallback(()=>e.jsx(t.Card.Group,{children:M?d.map((C,T)=>e.jsx(ua,{collection:C},T)):g?e.jsx(t.Loader,{size:"large",active:!0}):c.map((C,T)=>e.jsx(ta,{item:C},T))}),[c,d,g,M,h]),te=n.useCallback(()=>M?e.jsx(t.Section,{children:e.jsxs(t.Table,{basic:"very",children:[e.jsx(t.Table.Header,{children:e.jsxs(t.Table.Row,{children:[e.jsx(t.Table.HeaderCell,{children:s("collections_page.collection")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.type")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.items")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.created_at")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.last_modified")}),e.jsx(t.Table.HeaderCell,{})]})}),e.jsx(t.Table.Body,{children:d.map(C=>e.jsx(Sa,{collection:C},C.id))})]})}):e.jsx(t.Section,{children:e.jsxs(t.Table,{basic:"very",children:[e.jsx(t.Table.Header,{children:e.jsxs(t.Table.Row,{children:[e.jsx(t.Table.HeaderCell,{children:s("global.item")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.created_at")}),e.jsx(t.Table.HeaderCell,{children:s("collections_page.last_modified")})]})}),e.jsx(t.Table.Body,{children:c.map(C=>e.jsx(ra,{item:C},C.id))})]})}),[c,d,M]),le=n.useCallback((C,T)=>{p!==T.activePage&&Q(Number(T.activePage))},[p,Q]),se=n.useCallback(()=>e.jsxs("div",{className:"collections-main-actions",children:[h!==m.ITEMS&&e.jsx(t.Field,{placeholder:s("itemdrawer.search_items"),className:"collections-search-field",input:{icon:"search"},onChange:K,icon:e.jsx(t.Icon,{name:"search",className:"searchIcon"}),iconPosition:"left",value:J,isClearable:!0}),e.jsxs(t.Row,{className:"actions",grow:!1,children:[S&&!j&&e.jsx(t.Button,{className:"action-button",size:"small",basic:!0,onClick:pe,children:s("collections_page.new_third_party_collection")}),e.jsxs(t.Button,{className:"action-button open-editor",size:"small",basic:!0,onClick:X,children:[e.jsx(ve,{name:"cube"}),s("item_editor.open")]}),e.jsxs(t.Button,{className:"action-button",size:"small",primary:!0,onClick:$,children:[e.jsx(t.Icon,{name:"plus square"})," ",s("collections_page.new_collection")]})]})]}),[J,S,j,K,X,$]),ne=n.useCallback(()=>e.jsx(t.Column,{align:"right",children:e.jsxs(t.Row,{className:"actions",children:[h===m.STANDARD_COLLECTIONS||m.THIRD_PARTY_COLLECTIONS&&e.jsx(t.Dropdown,{direction:"left",value:k,options:[{value:f.MOST_RELEVANT,text:s("curation_page.order.most_relevant")},{value:f.CREATED_AT_DESC,text:s("global.order.newest")},{value:f.CREATED_AT_ASC,text:s("global.order.oldest")},{value:f.UPDATED_AT_DESC,text:s("global.order.updated_at_desc")},{value:f.UPDATED_AT_ASC,text:s("global.order.updated_at_asc")},{value:f.NAME_DESC,text:s("global.order.name_desc")},{value:f.NAME_ASC,text:s("global.order.name_asc")}],onChange:ee}),e.jsx(oe,{className:"grid",icon:"grid",isActive:r===w.GRID,onClick:()=>i(w.GRID)}),e.jsx(oe,{className:"list",icon:"table",isActive:r===w.LIST,onClick:()=>i(w.LIST)})]})}),[r,i,k,ee]),Te=n.useCallback(()=>{const C=o==null?void 0:o.total,T=x==null?void 0:x.total,v=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS?C:T,q=h===m.STANDARD_COLLECTIONS||h===m.THIRD_PARTY_COLLECTIONS?I:x==null?void 0:x.totalPages;return A?e.jsx(t.Loader,{active:!0,size:"large"}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"banner-container",children:e.jsx(qe,{id:Ge})}),e.jsx("div",{className:"filters",children:e.jsxs(t.Container,{children:[(u||S||j)&&e.jsxs("div",{className:"action-tabs-container",children:[e.jsx("img",{src:Ke,className:"collections-icon"}),e.jsxs(t.Tabs,{isFullscreen:!0,children:[e.jsx(t.Tabs.Tab,{active:h===m.STANDARD_COLLECTIONS,onClick:()=>z(m.STANDARD_COLLECTIONS),children:s("collections_page.collections")}),(S||j)&&e.jsx(t.Tabs.Tab,{active:h===m.THIRD_PARTY_COLLECTIONS,onClick:()=>z(m.THIRD_PARTY_COLLECTIONS),children:s("collections_page.third_party_collections")}),u&&e.jsx(t.Tabs.Tab,{active:h===m.ITEMS,onClick:()=>z(m.ITEMS),children:s("collections_page.single_items")})]})]}),se(),e.jsxs(t.Row,{height:30,children:[e.jsx(t.Column,{children:e.jsx(t.Row,{children:!g&&!b&&!!v&&v>0&&e.jsx(t.Header,{sub:!0,children:s("collections_page.results",{count:v})})})}),ne()]})]})}),g||b||v===void 0?e.jsx(t.Loader,{active:!0,size:"large"}):v>0?e.jsxs(e.Fragment,{children:[r===w.GRID?ae():r===w.LIST?te():null,!!q&&q>1&&e.jsx(t.Pagination,{className:"pagination",firstItem:null,lastItem:null,totalPages:q,activePage:p,onPageChange:le})]}):e.jsxs("div",{className:"empty",children:[e.jsx(t.Header,{className:"title",size:"large",children:s("collections_page.no_items")}),e.jsx("div",{className:"empty-description",children:s("collections_page.empty_description")}),e.jsx("div",{className:"create-new-wrapper",children:e.jsx("div",{className:"create-new create-new-collection",onClick:$,children:e.jsx("div",{className:"text",children:s("collections_page.new_collection")})})})]})]})},[p,I,o,x,r,u,g,b,A,j,S,le,$,ae,te,ne,se]);return e.jsx(Ze,{className:"CollectionsPage",activeTab:Ye.COLLECTIONS,children:Te()})}const fa=l=>{const a=we(l),c=Le(l),d=a?De(l,a):[],r=a?Ee(l,a):null,o=Ae(l);return{items:d,address:a,collections:c,collectionsPaginationData:o,itemsPaginationData:r,view:We(l),isThirdPartyManager:Oe(l),isLoadingCollections:G(Pe(l),Ue),isLoadingItems:G(ie(l),Ve),isLoadingOrphanItem:G(ie(l),ze),isLinkedWearablesPaymentsEnabled:ye(l),isCampaignEnabled:ke(l),hasUserOrphanItems:Me(l)}},Ra=l=>({onSetView:a=>l(He(a)),onOpenModal:(a,c)=>l(he(a,c)),onFetchOrphanItems:(a,c)=>l($e(a,c)),onFetchCollections:(a,c)=>l(Be(a,c)),onFetchOrphanItem:a=>l(Fe(a))}),ka=U(fa,Ra)(Na);export{ka as default};
|
package/assets/index-Bl5LC4b1.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var B=Object.defineProperty;var D=(e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>D(e,typeof t!="symbol"?t+"":t,n);import{Z as f,D as d,az as $,aA as m,aB as v,G as _,H as s,M as o,J as N,I as U,N as T,as as C,aC as V,aD as w,aE as k,aF as y,X as O,aG as M,ad as A,aH as G,aI as J,aJ as X,aK as z}from"./index-LbPj94fr.js";import{S as H}from"./SignInRequired-cMu1CrC_.js";const K="_container_1abv2_1",q="_nameContainer_1abv2_8",F="_editNameBtn_1abv2_20",Y="_actions_1abv2_30",W="_downloadBtn_1abv2_36",Z="_button_1abv2_13",I={container:K,nameContainer:q,editNameBtn:F,actions:Y,downloadBtn:W,button:Z},Q=m.get("EXPLORER_URL",""),ee=m.get("BUILDER_SERVER_URL",""),se=m.get("PEER_TESTING_URL","");function te({currentProject:e,metrics:t,limits:n,areEntitiesOutOfBoundaries:r,isUploading:c,onOpenModal:l}){const b=f(),E=d.useCallback(()=>{l("ExportModal",{project:e})},[e,l]),u=d.useCallback(()=>{l("EditProjectModal")},[l]),a=d.useCallback(()=>{l("DeployModal",{view:$.NONE,projectId:e.id})},[l,e]),h=d.useMemo(()=>{if(!e)return"";const i=new URL(Q);return i.searchParams.set("skipSetup","true"),i.searchParams.set("realm",`${ee}/projects/${e.id}`),i.searchParams.set("DEBUG_MODE","true"),m.is(v.Env.DEVELOPMENT)?(i.searchParams.set("NETWORK","sepolia"),i.searchParams.set("DEBUG_SCENE_LOG","")):i.searchParams.set("CATALYST",se),i.toString()},[]),g=d.useMemo(()=>Object.keys(t).some(i=>t[i]>n[i]),[t]),x=d.useMemo(()=>c||r,[t,n,r,c]),j=d.useMemo(()=>c||!x,[c,x]),L=d.useCallback(()=>r?_("topbar.bounds_exceeded",{br:s.jsx("br",{})}):g?_("topbar.limits_exceeded"):null,[r,g]),S=d.useCallback(()=>{b.goBack()},[b]);return s.jsxs("div",{className:I.container,children:[s.jsxs("div",{className:I.nameContainer,children:[s.jsx(o.Button,{basic:!0,"aria-label":_("inspector.top_bar.back"),onClick:S,children:s.jsx(o.Icon,{name:"chevron left"})}),e&&s.jsxs(o.Button,{basic:!0,onClick:u,disabled:c,className:I.editNameBtn,children:[e.title,s.jsx(N,{name:"layout",className:"edit-project-icon"})]}),c&&s.jsx(N,{name:"cloud-upload",className:"cloud-upload-indicator is-uploading"})]}),s.jsxs("div",{className:I.actions,children:[e?s.jsx(U,{projectId:e.id}):null,s.jsx(o.Popup,{content:_("inspector.top_bar.download"),trigger:s.jsx(o.Button,{secondary:!0,"aria-label":_("inspector.top_bar.download"),size:"small",className:I.downloadBtn,disabled:c,onClick:E,children:s.jsx(o.Icon,{name:"download"})})}),s.jsxs(o.Button,{as:"a",href:h,target:"_blank",secondary:!0,size:"small",disabled:c,children:[s.jsx(o.Icon,{name:"eye"}),_("inspector.top_bar.preview")]}),s.jsx(o.Popup,{content:L(),position:"bottom center",disabled:j,trigger:s.jsx("span",{children:s.jsxs(o.Button,{primary:!0,size:"small",disabled:x,onClick:a,children:[s.jsx(o.Icon,{name:"globe"}),_("inspector.top_bar.publish")]})}),on:"hover"})]})]})}const ne=e=>({currentProject:C(e),metrics:V(e),limits:w(e),areEntitiesOutOfBoundaries:k(e)>0,isUploading:y(e)}),ae=e=>({onOpenModal:(t,n)=>e(O(t,n))}),oe=T(ne,ae)(te);var p={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.14.4-19500651590.commit-4962afd"};const re=e=>e.replace(/\/$/,""),P=re(p.VITE_BASE_URL);let ce=class extends d.PureComponent{constructor(){super(...arguments);R(this,"state",{isLoaded:!1});R(this,"refIframe",n=>{const{onConnect:r}=this.props;n&&(n.onload=()=>{this.setState({isLoaded:!0})},r(n.id))})}componentDidMount(){const{onOpen:n}=this.props;n()}render(){const{scene:n,project:r,isLoggedIn:c,isReloading:l,address:b=""}=this.props;if(!c)return s.jsx(H,{});let E=`${P}/inspector-index.html`,u=`${P}/bin/index.js`;p.VITE_INSPECTOR_PORT&&(E=`http://localhost:${p.VITE_INSPECTOR_PORT}`,u=`${E}/bin/index.js`);let a=`?dataLayerRpcParentUrl=${window.location.origin}`;if(p.VITE_BIN_INDEX_JS_DEV_PORT&&p.VITE_BIN_INDEX_JS_DEV_PATH){const h=btoa(p.VITE_BIN_INDEX_JS_DEV_PATH);u=`http://localhost:${p.VITE_BIN_INDEX_JS_DEV_PORT}/content/contents/b64-${h}`}return a=a.concat(`&binIndexJsUrl=${u}`),a=a.concat(`&contentUrl=${m.get("INSPECTOR_CONTENT_URL")}`),a=a.concat(`&segmentKey=${m.get("INSPECTOR_SEGMENT_API_KEY")}`),a=a.concat(`&segmentAppId=${m.get("INSPECTOR_SEGMENT_APP_ID")}`),a=a.concat(`&segmentUserId=${b}`),r!=null&&r.id&&(a=a.concat(`&projectId=${r.id}`)),s.jsxs("div",{className:"InspectorPage",children:[(!this.state.isLoaded||l)&&s.jsx(o.Loader,{active:!0}),n&&!l&&s.jsxs(s.Fragment,{children:[s.jsx(oe,{}),s.jsx("iframe",{ref:this.refIframe,title:"inspector",id:"inspector",src:`${E}${a}`})]})]})}};const ie=e=>({address:M(e),isLoggedIn:A(e),scene:G(e),project:C(e),isReloading:J(e)}),de=e=>({onOpen:()=>e(X()),onConnect:t=>e(z(t))}),Ee=T(ie,de)(ce);export{Ee as default};
|
package/assets/index-C1clPxBD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var y=Object.defineProperty;var E=(o,r,e)=>r in o?y(o,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[r]=e;var d=(o,r,e)=>E(o,typeof r!="symbol"?r+"":r,e);import{D as g,az as L,H as s,L as F,K as v,J as C,G as h,N as I,O as M,R as A,X as P,aL as i,ag as D,M as n,ai as b,a4 as w,Z as T,aM as O,a5 as m,ab as R,aN as B,aO as k,aP as W,ad as z,aQ as _,aR as G,aS as U,aT as H,ac as K}from"./index-LbPj94fr.js";import{B as V}from"./Back-qfVBk6YN.js";const Z=["page","sortBy","sortOrder","group","ethAddress"];var j;let $=(j=class extends g.PureComponent{constructor(){super(...arguments);d(this,"state",{isDeleting:!1});d(this,"handleOnClick",()=>{const{onClick:e,pool:t}=this.props;e&&e(t)});d(this,"handleConfirmDeleteProject",()=>{this.setState({isDeleting:!0})});d(this,"handleCancelDeleteProject",()=>{this.setState({isDeleting:!1})});d(this,"handleClearDeployment",()=>{const{pool:e,onOpenModal:t}=this.props;t("DeployModal",{view:L.CLEAR_DEPLOYMENT,projectId:e.id})})}render(){const{pool:e}=this.props,t=e.statistics?e.statistics.parcels:e.layout.cols*e.layout.rows;return s.jsxs(F,{to:v.poolView(e.id,"pool"),className:"PoolCard",children:[s.jsx("div",{className:"thumbnail",style:{backgroundImage:`url(${e.thumbnail})`}}),s.jsxs("div",{className:"project-data",children:[s.jsx("div",{className:"title-wrapper",children:s.jsx("div",{className:"title",children:e.title})}),s.jsx("div",{className:"description",title:e.description,children:s.jsxs("div",{className:"component-list",children:[s.jsxs("div",{className:"component",children:[s.jsx(C,{name:"scene-parcel"})," ",h("public_page.parcel_count",{parcels:t})]}),e.statistics&&s.jsxs("div",{className:"component",children:[s.jsx(C,{name:"scene-object"})," ",h("public_page.item_count",{items:e.statistics.transforms})]})]})})]})]})}},d(j,"defaultProps",{items:0}),j);const q=(o,r)=>{const{pool:e}=r,t=M(o)[e.sceneId];return{items:t&&t.sdk6?t.sdk6.metrics.entities:0,deploymentStatus:A(o)[r.pool.id]}},J=o=>({onOpenModal:(r,e)=>o(P(r,e))}),Q=I(q,J)($);let X=class extends g.PureComponent{constructor(){super(...arguments);d(this,"handleChangeGroup",(e,t)=>{const{group:l,...a}=this.getFilters(),c=1;t.value==="all"?this.handleChangeFilters({...a,page:c}):this.handleChangeFilters({...a,page:c,group:t.value})});d(this,"handleChangeUser",(e,t)=>{const{ethAddress:l,...a}=this.getFilters(),c=1;t.value==="all"?this.handleChangeFilters({...a,page:c}):this.handleChangeFilters({...a,page:c,ethAddress:t.value})});d(this,"handleChangeSort",(e,t)=>{const l=this.getFilters(),a=1;if(t.value&&l.sortBy!==t.value)switch(t.value){case i.NAME:this.handleChangeFilters({...l,page:a,sortBy:t.value,sortOrder:"asc"});break;default:this.handleChangeFilters({...l,page:a,sortBy:t.value,sortOrder:"desc"})}});d(this,"handlePageChange",(e,t)=>{const l=this.getFilters(),a=Number(t.activePage);!Number.isNaN(a)&&a>0&&this.handleChangeFilters({...l,page:a})});d(this,"handleNavigateToScenes",()=>{const{history:e}=this.props;e.push(v.scenes())})}componentDidMount(){const{location:e}=this.props,t=this.getFilters();(e.search===""||e.search==="?")&&(t.sortBy=i.NEWEST,t.sortOrder="desc"),this.handleChangeFilters(t)}getFilters(e=this.props){return Z.reduce((t,l)=>{const a=e[l];return a!==void 0&&(t[l]=a),t},{})}handleChangeFilters(e){const{history:t,onLoadPools:l}=this.props;t.push(v.poolSearch(e)),l(e)}render(){const{pools:e,total:t,totalPages:l,isLoggedIn:a}=this.props,c=this.getFilters(),u={firstItem:null,lastItem:null};return c.page===1&&(u.prevItem=null),c.page===l&&(u.nextItem=null),s.jsxs(s.Fragment,{children:[s.jsx(D,{}),s.jsx(n.Page,{isFullscreen:!0,children:s.jsxs("div",{className:"SceneListPage",children:[s.jsxs(n.Container,{children:[s.jsx(n.Section,{className:"navigation",children:s.jsxs(n.Row,{children:[s.jsx(V,{absolute:!0,onClick:this.handleNavigateToScenes}),s.jsx(n.Narrow,{children:s.jsxs(n.Row,{children:[s.jsx(n.Column,{children:s.jsx(n.Row,{children:s.jsx(n.Header,{size:"large",children:h("scene_list_page.projects_title")})})}),s.jsx(n.Column,{align:"right",children:s.jsxs(n.Row,{children:[s.jsx(n.Responsive,{minWidth:1025,as:g.Fragment,children:a&&s.jsx(n.Dropdown,{direction:"left",value:c.ethAddress||"all",options:[{value:"all",text:h("scene_list_page.filters.all_users")},{value:"me",text:h("scene_list_page.filters.only_me")}],onChange:this.handleChangeUser})}),s.jsx(n.Dropdown,{direction:"left",value:c.sortBy,options:[{value:i.NEWEST,text:h("scene_list_page.filters.newest")},{value:i.NAME,text:h("scene_list_page.filters.name")},{value:i.LIKES,text:h("scene_list_page.filters.likes")},{value:i.ITEMS,text:h("scene_list_page.filters.items")},{value:i.SMART_ITEMS,text:h("scene_list_page.filters.smart_items")},{value:i.SIZE,text:h("scene_list_page.filters.size")}],onChange:this.handleChangeSort})]})})]})})]})}),s.jsx(n.Narrow,{children:s.jsxs("div",{className:"PoolCardList",children:[e===null&&s.jsx(n.Loader,{active:!0,size:"huge"}),Array.isArray(e)&&t===0&&s.jsx("div",{className:"empty-projects",children:h("scene_list_page.no_projects")}),Array.isArray(e)&&t!==0&&s.jsx(s.Fragment,{children:e.map(x=>s.jsx(Q,{pool:x},x.id))})]})})]}),s.jsx(n.Container,{children:t!==null&&l!==null&&s.jsx(n.Pagination,{totalPages:l,activePage:c.page,onPageChange:this.handlePageChange,...u})})]})}),s.jsx(b,{})]})}};const Y=()=>{const o=w(),r=T(),e=O(),t=m(R),l=m(B),a=m(k),c=m(W),u=m(z),x=g.useMemo(()=>{const p=new URLSearchParams(e.search);return{group:_(p.get("group")),ethAddress:_(p.get("eth_address")),page:G(p.get("page"),1),sortBy:U(p.get("sort_by")??"",[i.NEWEST,i.LIKES,i.NAME,i.SIZE,i.ITEMS,i.SMART_ITEMS],i.NEWEST),sortOrder:H(p.get("sort_order"),"desc")}},[e.search]),S=g.useCallback((p,N)=>o(P(p,N)),[o]),f=g.useCallback(p=>o(K(p)),[o]);return s.jsx(X,{pools:t,poolGroups:l,total:a,totalPages:c,isLoggedIn:u,onOpenModal:S,onLoadPools:f,history:r,location:e,...x})},ne=Y;export{ne as default};
|
package/assets/index-CFPRYeOi.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var $=Object.defineProperty;var W=(n,t,s)=>t in n?$(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s;var h=(n,t,s)=>W(n,typeof t!="symbol"?t+"":t,s);import{D as p,E as A,F as G,G as a,H as e,I as H,J as E,L as w,K as D,M as o,N as q,O as z,P as J,Q as I,R as K,S as V,T as Z,U as Q,V as X,W as Y,X as B,Y as ee,Z as se,$ as te,a0 as ne,a1 as oe,a2 as _,a3 as ae,a4 as ce,a5 as S,a6 as re,a7 as le,a8 as ie,a9 as de,aa as pe,ab as je,ac as he}from"./index-LbPj94fr.js";import{N as ue,S as me,u as ge,a as xe}from"./Navigation.container-m_5Xay6X.js";import{O as Pe}from"./OptionsDropdown-Dkcmv78a.js";import{S as Ce}from"./SDKTag-B1AaBZZp.js";import{L as Se}from"./LoggedInDetailPage.container-BLLfFAse.js";import{u as _e}from"./hooks-B-YhDlyt.js";import"./selectors-CSnw6goy.js";import"./SignInRequired-cMu1CrC_.js";var k;let fe=(k=class extends p.PureComponent{constructor(){super(...arguments);h(this,"state",{isDeleting:!1});h(this,"handleOnClick",()=>{const{onClick:s,project:c}=this.props;s&&s(c)});h(this,"handleConfirmDeleteProject",()=>{this.setState({isDeleting:!0})});h(this,"handleCancelDeleteProject",()=>{this.setState({isDeleting:!1})});h(this,"handleDeleteProject",()=>{const{project:s,onDeleteProject:c}=this.props;c(s),this.setState({isDeleting:!1})});h(this,"handleDuplicateProject",()=>{const{project:s,onDuplicateProject:c}=this.props;c(s)});h(this,"handleExportScene",()=>{this.props.onOpenModal("ExportModal",{project:this.props.project})})}componentDidMount(){this.props.onLoadProjectScene(this.props.project,this.props.type)}render(){const{project:s,parcels:c,items:r,onClick:j,isUploading:u,hasError:C,scene:m}=this.props,{isDeleting:l}=this.state,g="likes"in s;let i={},x="ProjectCard",P=A(s,m);P&&(P&&G(P)&&(P+=`?updated_at=${+new Date(s.updatedAt)}`),i={backgroundImage:`url(${P})`},x+=" has-thumbnail");const v=[{text:a("scenes_page.project_actions.duplicate_project"),handler:this.handleDuplicateProject},{text:a("scenes_page.project_actions.export_project"),handler:this.handleExportScene},{text:a("scenes_page.project_actions.delete_project"),handler:this.handleConfirmDeleteProject}],f=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"project-thumbnail",style:i}),g?null:e.jsxs(e.Fragment,{children:[e.jsx(H,{projectId:s.id,className:"deployment-status"}),e.jsxs("div",{className:"options-container",children:[e.jsx(Ce,{scene:m}),e.jsx(Pe,{className:"options-dropdown",options:v})]})]}),e.jsxs("div",{className:"project-data",children:[e.jsxs("div",{className:"title-wrapper",children:[e.jsx("div",{className:"title",children:s.title}),u?e.jsx(E,{name:"cloud-upload",className:"is-uploading"}):null,!u&&C?e.jsx("div",{className:"error-indicator"}):null]}),e.jsxs("div",{className:"description",title:s.description,children:[e.jsx(E,{name:"scene-parcel"})," ",a("public_page.parcel_count",{parcels:c}),e.jsx(E,{name:"scene-object"})," ",a("project_card.item_count",{items:r})]})]})]});return e.jsxs(e.Fragment,{children:[j?e.jsx("div",{className:x,onClick:this.handleOnClick,children:f}):e.jsx(w,{to:g?D.poolView(s.id,"pool"):D.sceneDetail(s.id),className:x,children:f}),e.jsx(o.Confirm,{size:"tiny",open:l,header:a("project_card.confirm_delete_header",{title:s.title}),content:a("project_card.confirm_delete_content",{title:s.title}),confirmButton:e.jsx(o.Button,{primary:!0,children:a("global.confirm")}),cancelButton:e.jsx(o.Button,{secondary:!0,children:a("global.cancel")}),onCancel:this.handleCancelDeleteProject,onConfirm:this.handleDeleteProject})]})}},h(k,"defaultProps",{items:0,parcels:0}),k);const Ne=(n,t)=>{const{project:s}=t,c=s.layout.cols*s.layout.rows,r=z(n)[s.sceneId],j=r&&r.sdk6?Object.keys(r.sdk6.entities).length-c:0,u=J(n)[s.id]?I.POOL:I.PROJECT;return{parcels:c,items:j,scene:r,deploymentStatus:K(n)[t.project.id],deployments:V(n)[t.project.id],isUploading:Z(n).has(s.id),hasError:Q(n).has(s.id),type:u}},De=n=>({onDeleteProject:t=>n(X(t)),onDuplicateProject:t=>n(Y(t)),onOpenModal:(t,s)=>n(B(t,s)),onLoadProjectScene:(t,s)=>n(ee(t,s))}),L=q(Ne,De)(fe),F=n=>{const{page:t,poolList:s,projects:c,sortBy:r,totalPages:j,isFetching:u,isLoggingIn:C,onLoadFromScenePool:m,onOpenModal:l}=n,g=se();p.useEffect(()=>{m({sortBy:"updated_at",sortOrder:"desc"})},[m,l]),p.useEffect(()=>{te()&&l("WorldsForENSOwnersAnnouncementModal")},[l]);const i=p.useCallback(()=>{l("ImportModal")},[l]),x=p.useCallback(()=>{l("SceneCreationModal")},[l]),P=()=>e.jsx(o.Button,{inverted:!0,className:"import-scene",onClick:i,children:a("scenes_page.upload_scene")}),v=()=>e.jsx(o.Button,{primary:!0,className:"create-scene",onClick:x,children:a("scenes_page.create_scene")}),f=()=>e.jsx(o.Dropdown,{direction:"left",value:r,options:[{value:_.NEWEST,text:a("scenes_page.sort.newest")},{value:_.NAME,text:a("scenes_page.sort.name")},{value:_.SIZE,text:a("scenes_page.sort.size")}],onChange:R}),M=()=>c.length>0?e.jsx("div",{className:"CardList",children:c.map(d=>e.jsx(L,{project:d},d.id))}):e.jsxs("div",{className:"no-scenes-container",children:[e.jsx("h3",{className:"no-scenes-title",children:a("scenes_page.no_scenes.title")}),e.jsx("span",{className:"no-scenes-description",children:a("scenes_page.no_scenes.description",{a:d=>e.jsx("a",{rel:"noreferrer",target:"_blank",href:"https://docs.decentraland.org/creator/development-guide/sdk-101/",children:d})})}),e.jsx(ae,{})]}),N=p.useCallback((d={})=>{g.push(D.scenes({page:t,sortBy:r,...d}))},[t,r,g]),R=p.useCallback((d,{value:b})=>N({sortBy:b}),[N]),T=p.useCallback((d,{activePage:b})=>N({page:b}),[N]);if(C||u)return e.jsx(ne,{});const O=j>1,y={firstItem:null,lastItem:null};t===1&&(y.prevItem=null),t===j&&(y.nextItem=null);const U=()=>e.jsxs(e.Fragment,{children:[e.jsx(me,{}),e.jsxs(o.Container,{children:[e.jsxs(o.Section,{className:"projects-menu",children:[e.jsxs(o.Row,{children:[e.jsx(o.Column,{children:e.jsx(o.Header,{children:a("scenes_page.my_scenes")})}),e.jsx(o.Column,{align:"right",children:e.jsxs("div",{className:"actions",children:[P(),v()]})})]}),e.jsxs(o.Row,{className:"actions",children:[e.jsx(o.Column,{children:e.jsx("div",{className:"items-count",children:a("scenes_page.results",{count:c.length})})}),e.jsx(o.Column,{align:"right",children:c.length>1?f():null})]})]}),e.jsxs(o.Section,{className:oe("project-cards",{"has-pagination":O}),children:[M(),O?e.jsx(o.Pagination,{...y,activePage:t,totalPages:j,onPageChange:T}):null]}),s?e.jsxs(e.Fragment,{children:[e.jsxs(o.Row,{children:[e.jsx(o.Row,{className:"scene-pool-menu",children:e.jsx(o.Header,{sub:!0,children:a("scenes_page.from_scene_pool")})}),e.jsx(o.Row,{align:"right",children:e.jsx(w,{to:D.poolSearch(),children:e.jsxs(o.Button,{basic:!0,children:[a("global.view_more")," ",e.jsx(o.Icon,{name:"chevron right"})]})})})]}),e.jsx("div",{className:"scene-pool-projects",children:s.map(d=>e.jsx(L,{project:d},d.id))})]}):null]})]});return e.jsx(Se,{className:"ScenesPage",activeTab:ue.SCENES,children:U()})};F.defaultProps={projects:[]};const ve=()=>{const n=ce(),t=ge(),s=xe(),c=_e(Object.values(_),_.NEWEST),r=S(i=>re(i)||le(i)),j=S(ie),u=S(de),C=S(pe),m=S(je),l=p.useCallback((i,x)=>n(B(i,x)),[n]),g=p.useCallback(i=>n(he(i)),[n]);return e.jsx(F,{projects:s,isLoggingIn:r,isFetching:j,page:t,sortBy:c,totalPages:u,didCreate:C,poolList:m,onOpenModal:l,onLoadFromScenePool:g})},Me=ve;export{Me as default};
|
package/assets/index-CHuI3qPX.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var D=Object.defineProperty;var F=(n,a,e)=>a in n?D(n,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[a]=e;var h=(n,a,e)=>F(n,typeof a!="symbol"?a+"":a,e);import{D as w,K as y,dj as O,dk as P,dl as U,dh as q,dm as v,H as s,M as r,G as t,cj as C,b4 as T,bk as H,L as I,N as M,aX as Q,di as G,dn as V,cJ as z,bD as E,cM as p,dp as J,dq as K,dr as X,ds as $,dt as Y,du as Z,dv as ss,dw as L,dx as k,cT as es,cP as ns}from"./index-LbPj94fr.js";import{L as as}from"./LandProviderPage-D194_isC.js";import{L as ts}from"./LandAction-CUgZ-nVw.js";import"./NotFound-BTo5pEaG.js";import"./hooks-B-YhDlyt.js";import"./Back-qfVBk6YN.js";class os extends w.PureComponent{constructor(){super(...arguments);h(this,"handleFinish",()=>{const{onNavigate:e}=this.props;e(y.ens())});h(this,"handleSetResolver",()=>{const{onSetENSResolver:e,ens:o}=this.props;e(o)});h(this,"handleReclaim",()=>{const{onReclaimName:e,ens:o}=this.props;e(o)});h(this,"handleSetContent",()=>{const{onSetENSContent:e,ens:o,land:d}=this.props;e(o,d)});h(this,"handleBack",()=>{this.props.onBack()})}render(){const{ens:e,land:o,isLoading:d,isWaitingTxSetContent:i,isWaitingTxSetResolver:l,isWaitingTxReclaim:R,error:x}=this.props,N=e.ensOwnerAddress!==e.nftOwnerAddress,c=!O(e)&&e.resolver.toLowerCase()===P.toLowerCase(),m=!U(e)&&q(e,o),g=c||m,S=x&&x.code===4001,_=S&&x.origin===v.RESOLVER,b=S&&x.origin===v.CONTENT,B=S,W=c&&!l&&!_?"grey-button":"",f=m&&!i&&!b?"grey-button":"",u=_||g||N||l||R,j=b||_||B||!c||N||m||l||i||R;return s.jsxs(r.Form,{className:"LandAssignENSForm",children:[s.jsx(r.Row,{children:s.jsx("p",{className:"message",children:t("land_assign_ens_page.set_name_message",{strong:A=>s.jsx("strong",{children:A})})})}),s.jsx(r.Row,{children:s.jsxs("div",{className:u?"box box-disabled":"box",children:[s.jsx("h3",{children:t("land_assign_ens_page.set_resolver")}),s.jsxs("div",{className:"message-box",children:[s.jsx("p",{children:t("land_assign_ens_page.set_resolver_explanation")}),s.jsx(C,{type:"submit",disabled:u,onClick:this.handleSetResolver,className:W,loading:l,primary:!0,network:T.Network.ETHEREUM,children:_?t("global.retry_tx"):c?s.jsxs(s.Fragment,{children:[t("global.approved_tx"),l?null:s.jsx(r.Icon,{name:"check"})]}):t("global.submit")})]})]})}),s.jsx(r.Row,{children:s.jsxs("div",{className:j?"box box-disabled":"box",children:[s.jsx("h3",{children:t("land_assign_ens_page.set_content")}),s.jsxs("div",{className:"message-box",children:[s.jsx("p",{children:t("land_assign_ens_page.set_content_explanation")}),s.jsx(C,{type:"submit",disabled:j,onClick:this.handleSetContent,className:f,loading:i,primary:!0,network:T.Network.ETHEREUM,children:b?t("global.retry_tx"):m?s.jsxs(s.Fragment,{children:[t("global.approved_tx"),i?null:s.jsx(r.Icon,{name:"check"})]}):t("global.submit")})]})]})}),s.jsxs(r.Row,{className:"confirmation-buttons",children:[s.jsx(r.Button,{onClick:this.handleBack,disabled:g,children:t("global.back")}),s.jsx(r.Button,{disabled:!c||!m||d||i||l,onClick:this.handleFinish,primary:!0,children:t("global.finish")})]})]})}}let is=class extends w.PureComponent{constructor(){super(...arguments);h(this,"handleGoBack",()=>{this.props.history.goBack()})}render(){const{ens:e,isLoading:o,error:d,isWaitingTxSetContent:i,isWaitingTxReclaim:l,isWaitingTxSetResolver:R,history:x,onSetENSResolver:N,onSetENSContent:c,onReclaimName:m}=this.props;return s.jsx(as,{children:g=>e?s.jsx(ts,{land:g,title:t("land_assign_ens_page.title",{name:e.subdomain}),subtitle:s.jsx(H,{id:"land_assign_ens_page.subtitle",values:{land:s.jsx(I,{to:y.landDetail(g.id),children:g.name})}}),children:s.jsx(os,{land:g,ens:e,error:d,isLoading:o,isWaitingTxSetResolver:R,isWaitingTxSetContent:i,isWaitingTxReclaim:l,onSetENSContent:c,onSetENSResolver:N,onReclaimName:m,onBack:this.handleGoBack,onNavigate:S=>x.push(S)})}):s.jsx(r.Loader,{active:!0,size:"large"})})}};const rs=(n,a)=>{const{landId:e,subdomain:o}=a.match.params,d=G(n),i=V(d,o);return{ens:i,error:z(n),isWaitingTxSetResolver:E(p(n),L)||J(n),isWaitingTxSetContent:E(p(n),k)||K(n,e),isWaitingTxReclaim:i?X(n,i.subdomain)||$(n):!1,isLoading:E(p(n),L)||E(p(n),k)||E(p(n),es)||E(p(n),ns)}},ls=n=>({onSetENSResolver:a=>n(Y(a)),onSetENSContent:(a,e)=>n(Z(a,e)),onReclaimName:a=>n(ss(a))}),Ss=M(rs,ls)(Q(is));export{Ss as default};
|
package/assets/index-CO7NEMGF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var x=Object.defineProperty;var j=(i,n,t)=>n in i?x(i,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[n]=t;var d=(i,n,t)=>j(i,typeof n!="symbol"?n+"":n,t);import{D as C,b$ as h,H as e,M as s,G as r,eb as b,cF as v,cG as y,bk as u,bJ as S,ch as A,N as _,ec as T,ed as z,ee as N}from"./index-LbPj94fr.js";import{L as P}from"./LoggedInDetailPage.container-BLLfFAse.js";import{S as f}from"./SignInRequired-cMu1CrC_.js";import"./Navigation.container-m_5Xay6X.js";import"./selectors-CSnw6goy.js";let G=class extends C.PureComponent{constructor(){super(...arguments);d(this,"timeoutId",null);d(this,"state",{hasCopiedText:!1,type:h.PARCEL,managerAddress:""});d(this,"handleOnCopy",()=>{this.timeoutId&&clearTimeout(this.timeoutId),this.setState({hasCopiedText:!0}),this.timeoutId=setTimeout(()=>{this.timeoutId=null,this.setState({hasCopiedText:!1})},1200)});d(this,"handleAddressChange",(t,a)=>{this.setState({managerAddress:a.value})});d(this,"handleTypeChange",(t,a)=>{this.setState({type:a.value})});d(this,"handleAddAuthorization",()=>{const{onSetUpdateManager:t}=this.props,{managerAddress:a,type:c}=this.state;t(a,c,!0)})}renderPage(){const{authorizations:t,wallet:a,onSetUpdateManager:c}=this.props,{hasCopiedText:g,managerAddress:o,type:m}=this.state,p=A(o);return e.jsx(s.Grid,{children:a===null?e.jsx(s.Loader,{size:"big",active:!0}):e.jsxs(e.Fragment,{children:[e.jsxs(s.Grid.Row,{children:[e.jsx(s.Grid.Column,{computer:4,mobile:16,children:e.jsx("div",{className:"left-column secondary-text",children:r("global.address")})}),e.jsxs(s.Grid.Column,{computer:12,mobile:16,children:[e.jsx("div",{className:"blockie-container",children:e.jsx(s.Blockie,{seed:a.address,scale:12})}),e.jsxs("div",{className:"address-container",children:[e.jsx("div",{className:"address",children:b()?v(a.address):a.address}),e.jsx(y,{role:"button",text:a.address,onCopy:this.handleOnCopy,children:g?e.jsx("span",{children:r("settings_page.copied")}):e.jsx("span",{className:"link",children:r("settings_page.copy_address")})})]})]})]}),e.jsxs(s.Grid.Row,{children:[e.jsx(s.Grid.Column,{computer:4,mobile:16,children:e.jsx("div",{className:"left-column secondary-text",children:r("settings_page.authorizations")})}),e.jsxs(s.Grid.Column,{computer:12,mobile:16,children:[e.jsx(s.Section,{className:"authoziations-disclaimer",children:r("settings_page.disclaimer",{emphasis:e.jsx("strong",{children:r("settings_page.emphasis")})})}),e.jsxs(s.Row,{className:"authorization-action",children:[e.jsx(u,{id:"settings_page.authorization_action",values:{address:e.jsx(s.Field,{value:o,onChange:this.handleAddressChange,placeholder:"0x...",error:o.length>0&&!p}),type:e.jsx(s.Dropdown,{options:[{text:"Parcels",value:h.PARCEL},{text:"Estates",value:h.ESTATE}],value:m,onChange:this.handleTypeChange})}}),e.jsx(s.Button,{size:"small",primary:!0,disabled:o.length===0||!p,onClick:this.handleAddAuthorization,children:r("global.submit")})]}),t.length>0?e.jsxs(s.Section,{children:[e.jsx(s.Header,{sub:!0,children:r("settings_page.authorizations_title")}),t.map(l=>e.jsxs(s.Row,{className:"authorization",children:[e.jsx(u,{id:"settings_page.authorization",values:{address:e.jsx(S,{address:l.address}),type:e.jsxs("span",{children:[" ",e.jsx("strong",{children:r(`global.${l.type}_plural`)})," "]})}}),e.jsx(s.Button,{basic:!0,onClick:()=>c(l.address,l.type,!1),children:r("global.revoke")})]}))]}):null]})]})]})})}renderLogin(){return e.jsx(f,{})}renderLoading(){return e.jsx("div",{className:"center",children:e.jsx(s.Loader,{active:!0,size:"huge"})})}render(){return e.jsx(P,{className:"SettingsPage",children:this.renderPage()})}};const L=i=>({wallet:T(i),authorizations:z(i)}),R=i=>({onSetUpdateManager:(n,t,a)=>i(N(n,t,a))}),B=_(L,R)(G);export{B as default};
|
package/assets/index-CgXwvFq0.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{N as n,al as s,am as r,an as i,ao as m,ap as d,aq as g,ad as t,ar as c,as as u,at as S,X as l,au as I,av as P,aw as p,ax as y,ay as O}from"./index-LbPj94fr.js";const R=a=>({isPreviewing:r(a),isSidebarOpen:i(a),isReady:m(a),isLoading:d(a),isFetching:g(a),isLoggedIn:t(a),isScreenshotReady:c(a),currentProject:u(a),numItems:S(a)}),C=a=>({onOpenModal:(e,o)=>a(l(e,o)),onCloseEditor:()=>a(I()),onZoomIn:()=>a(P()),onZoomOut:()=>a(p()),onResetCamera:()=>a(y()),onTakeScreenshot:()=>a(O())}),L=n(R,C)(s);export{L as default};
|